23#ifndef TINSEL_PALETTE_H
24#define TINSEL_PALETTE_H
30typedef 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
83#define HasPalMoved(pPal) (((pPal) != NULL) && ((pPal)->posInDAC & PALETTE_MOVED))
90void ResetPalAllocator();
96void psxPaletteMapper(
PALQ *originalPal, uint8 *psxClut,
byte *mapperTable);
98void PalettesToVideoDAC();
100void UpdateDACqueueHandle(
110void UpdateDACqueue(
int posInDAC, COLORREF color);
128COLORREF GetBgndColor();
133void FadingPalette(
PALQ *pPalQ,
bool bFading);
135void CreateTranslucentPalette(
SCNHANDLE BackPal);
137void NoFadingPalettes();
146int TranslucentColor();
149#define BoxColor (TinselVersion == 3 ? DarkGreen : TranslucentColor)
155void SetTalkColorRef(COLORREF colRef);
157COLORREF GetTalkColorRef();
159void SetTagColorRef(COLORREF colRef);
161COLORREF GetTagColorRef();
163void SetTalkTextOffset(
int offset);
165void SetTranslucencyOffset(
int offset);
uint32 SCNHANDLE
Definition: dw.h:31
@ BITS_PER_PIXEL
number of bits per pixel for VGA 256
Definition: palette.h:37
@ TBLUE4
Blue used in translucent rectangles.
Definition: palette.h:47
@ FGND_DAC_INDEX
index of first foreground color in Video DAC
Definition: palette.h:43
@ TBLUE1
Blue used in translucent rectangles.
Definition: palette.h:44
@ MAX_COLORS
maximum number of colors - for VGA 256
Definition: palette.h:36
@ NUM_PALETTES
number of palettes
Definition: palette.h:39
@ BGND_DAC_INDEX
index of background color in Video DAC
Definition: palette.h:42
@ TBLUE2
Blue used in translucent rectangles.
Definition: palette.h:45
@ MAX_INTENSITY
the biggest value R, G or B can have
Definition: palette.h:38
@ TBLUE3
Blue used in translucent rectangles.
Definition: palette.h:46
int32 numColors
number of colors in the palette
Definition: palette.h:63
byte palette[MAX_COLORS *3]
actual palette colors (RGB values)
Definition: palette.h:65
COLORREF palRGB[MAX_COLORS]
actual palette colors
Definition: palette.h:64
int32 numColors
number of colors in the palette
Definition: palette.h:73
int objCount
number of objects using this palette
Definition: palette.h:71
SCNHANDLE hPal
handle to palette data struct
Definition: palette.h:70
int posInDAC
palette position in the video DAC
Definition: palette.h:72