23 #ifndef TINSEL_PALETTE_H // prevent multiple includes 24 #define TINSEL_PALETTE_H 26 #include "tinsel/dw.h" 30 typedef uint32 COLORREF;
32 #define TINSEL_RGB(r,g,b) ((COLORREF)((uint8)(r)|((uint16)(g)<<8))|(((uint32)(uint8)(b))<<16)) 33 #define TINSEL_PSX_RGB(r,g,b) ((uint16)(((uint8)(r))|((uint16)(g)<<5)|(((uint16)(b))<<10))) 53 #define BLACK (TINSEL_RGB(0, 0, 0)) 54 #define WHITE (TINSEL_RGB(MAX_INTENSITY, MAX_INTENSITY, MAX_INTENSITY)) 55 #define RED (TINSEL_RGB(MAX_INTENSITY, 0, 0)) 56 #define GREEN (TINSEL_RGB(0, MAX_INTENSITY, 0)) 57 #define BLUE (TINSEL_RGB(0, 0, MAX_INTENSITY)) 58 #define YELLOW (TINSEL_RGB(MAX_INTENSITY, MAX_INTENSITY, 0)) 59 #define MAGENTA (TINSEL_RGB(MAX_INTENSITY, 0, MAX_INTENSITY)) 60 #define CYAN (TINSEL_RGB(0, MAX_INTENSITY, MAX_INTENSITY)) 79 #define PALETTE_MOVED 0x8000 // when this bit is set in the "posInDAC" 83 #define HasPalMoved(pPal) (((pPal) != NULL) && ((pPal)->posInDAC & PALETTE_MOVED)) 90 void ResetPalAllocator();
96 void psxPaletteMapper(
PALQ *originalPal, uint8 *psxClut, byte *mapperTable);
98 void PalettesToVideoDAC();
100 void UpdateDACqueueHandle(
110 void UpdateDACqueue(
int posInDAC, COLORREF color);
125 PALQ *GetNextPalette(
128 COLORREF GetBgndColor();
133 void FadingPalette(
PALQ *pPalQ,
bool bFading);
135 void CreateTranslucentPalette(
SCNHANDLE BackPal);
137 void NoFadingPalettes();
146 int TranslucentColor();
149 #define BoxColor (TinselVersion == 3 ? DarkGreen : TranslucentColor) 151 int HighlightColor();
155 void SetTalkColorRef(COLORREF colRef);
157 COLORREF GetTalkColorRef();
159 void SetTagColorRef(COLORREF colRef);
161 COLORREF GetTagColorRef();
163 void SetTalkTextOffset(
int offset);
165 void SetTranslucencyOffset(
int offset);
169 #endif // TINSEL_PALETTE_H COLORREF palRGB[MAX_COLORS]
actual palette colors
Definition: palette.h:64
int objCount
number of objects using this palette
Definition: palette.h:71
Blue used in translucent rectangles.
Definition: palette.h:46
SCNHANDLE hPal
handle to palette data struct
Definition: palette.h:70
uint32 SCNHANDLE
Definition: dw.h:31
Blue used in translucent rectangles.
Definition: palette.h:47
int32 numColors
number of colors in the palette
Definition: palette.h:73
number of bits per pixel for VGA 256
Definition: palette.h:37
index of first foreground color in Video DAC
Definition: palette.h:43
maximum number of colors - for VGA 256
Definition: palette.h:36
index of background color in Video DAC
Definition: palette.h:42
byte palette[MAX_COLORS *3]
actual palette colors (RGB values)
Definition: palette.h:65
int32 numColors
number of colors in the palette
Definition: palette.h:63
Blue used in translucent rectangles.
Definition: palette.h:44
number of palettes
Definition: palette.h:39
int posInDAC
palette position in the video DAC
Definition: palette.h:72
the biggest value R, G or B can have
Definition: palette.h:38
Blue used in translucent rectangles.
Definition: palette.h:45