22 #ifndef SCI_GRAPHICS_PALETTE_H 23 #define SCI_GRAPHICS_PALETTE_H 25 #include "common/array.h" 26 #include "sci/graphics/helpers.h" 31 class ResourceManager;
35 #define SCI_PALETTE_MATCH_PERFECT 0x8000 36 #define SCI_PALETTE_MATCH_COLORMASK 0xFF 47 bool isUsing16bitColorMatch();
54 void set(
Palette *sciPal,
bool force,
bool forceRealMerge =
false,
bool includeFirstColor =
true);
55 bool insert(
Palette *newPalette,
Palette *destPalette,
bool includeFirstColor =
false);
56 bool merge(
Palette *pFrom,
bool force,
bool forceRealMerge);
57 uint16 matchColor(byte r, byte g, byte b,
bool force16BitColorMatch =
false);
61 void setOnScreen(
bool update=
true);
62 void copySysPaletteToScreen(
bool update);
64 void drewPicture(GuiResourceId pictureId);
66 bool kernelSetFromResource(GuiResourceId resourceId,
bool force);
67 void kernelSetFlag(uint16 fromColor, uint16 toColor, uint16 flag);
68 void kernelUnsetFlag(uint16 fromColor, uint16 toColor, uint16 flag);
69 void kernelSetIntensity(uint16 fromColor, uint16 toColor, uint16 intensity,
bool setPalette);
70 int16 kernelFindColor(uint16 r, uint16 g, uint16 b,
bool force16BitColorMatch =
false);
71 bool kernelAnimate(byte fromColor, byte toColor,
int speed);
72 void kernelAnimateSet();
74 void kernelRestore(
reg_t memoryHandle);
75 void kernelAssertPalette(GuiResourceId resourceId);
77 void kernelSyncScreenPalette();
79 bool kernelPalVaryInit(GuiResourceId resourceId, uint16 ticks, uint16 stepStop, uint16 direction);
80 int16 kernelPalVaryReverse(int16 ticks, uint16 stepStop, int16 direction);
81 int16 kernelPalVaryGetCurrentStep();
82 int16 kernelPalVaryChangeTarget(GuiResourceId resourceId);
83 void kernelPalVaryChangeTicks(uint16 ticks);
84 void kernelPalVaryPause(
bool pause);
85 void kernelPalVaryDeinit();
87 void palVaryPrepareForTransition();
88 void palVaryProcess(
int signal,
bool setPalette);
90 void delayForPalVaryWorkaround();
97 byte findMacIconBarColor(byte r, byte g, byte b);
98 bool colorIsFromMacClut(byte index);
102 void palVaryInstallTimer();
103 void palVaryRemoveTimer();
104 bool palVaryLoadTargetPalette(GuiResourceId resourceId);
105 static void palVaryCallback(
void *refCon);
106 void palVaryIncreaseSignal();
111 bool _sysPaletteChanged;
113 bool _use16bitColorMatch;
117 GuiResourceId _palVaryResourceId;
121 int16 _palVaryStepStop;
122 int16 _palVaryDirection;
123 uint16 _palVaryTicks;
126 bool _palVaryZeroTick;
127 uint16 _totalScreenColors;
129 void loadMacIconBarPalette();
135 #endif // SCI_GRAPHICS_PALETTE_H
Definition: serializer.h:79
Definition: resource.h:327
Definition: serializer.h:308
Definition: helpers.h:247
Definition: vm_types.h:39