22 #ifndef M4_GRAPHICS_KRN_PAL_H 23 #define M4_GRAPHICS_KRN_PAL_H 25 #include "m4/m4_types.h" 26 #include "m4/adv_r/adv_hotspot.h" 27 #include "m4/wscript/ws_machine.h" 31 #define TO_GREY (int32)0 32 #define TO_COLOR (int32)1 33 #define TO_BLACK (int32)2 36 RGB8 _myFXPalette[256];
38 bool _myCycleReq =
false;
39 bool _myCycleFinished =
true;
40 bool _myCycleDACrefresh =
false;
41 int32 _myCycleDelayTicks = 6;
42 int32 _myCycleStartTime = 0;
43 int32 _myCycleEndTime = 0;
44 int32 _myCycleEndDelayTime = 0;
45 int32 _myCycleStartIndex = 0;
46 int32 _myCycleEndIndex = 0;
47 int32 _myCycleTrigger = 0;
48 int32 _myCycleNeverStopCycling =
false;
50 bool _myFadeReq =
false;
51 bool _myFadeFinished =
true;
52 bool _myFadeDACrefresh =
false;
53 int32 _myFadeDelayTicks = 3;
54 int32 _myFadeStartTime = 0;
55 int32 _myFadeEndTime = 0;
56 int32 _myFadeEndDelayTime = 0;
57 int32 _myFadeStartIndex = 0;
58 int32 _myFadeEndIndex = 0;
59 int32 _myFadeTrigger = 0;
60 frac16 _myFadeStartPercentFrac = 0x10000;
61 frac16 _myFadeCurrPercentFrac = 0x10000;
62 frac16 _myFadePercentFrac = 0;
66 RGB8 *_fadeToMe =
nullptr;
67 RGB8 *_trick =
nullptr;
68 RGB8 *_picPal =
nullptr;
69 int32 _seriesHash = 0;
70 machine *_seriesAnim8 =
nullptr;
71 uint8 _translation[32];
73 int32 _colorAreaX1 = -1;
74 int32 _colorAreaY1 = -1;
75 int32 _colorAreaX2 = -1;
76 int32 _colorAreaY2 = -1;
78 int32 _greyAreaX1 = -1;
79 int32 _greyAreaY1 = -1;
80 int32 _greyAreaX2 = -1;
81 int32 _greyAreaY2 = -1;
83 bool _greyVideoMode =
false;
86 void pal_fade_set_start(
RGB8 *origPalette, int32 percent);
87 void pal_fade_set_start(int32 percent);
88 void pal_fade_init(
RGB8 *origPalette, int32 firstPalEntry, int32 lastPalEntry, int32 targetPercent, int32 numTicks, int32 triggerNum);
89 void pal_fade_init(int32 firstPalEntry, int32 lastPalEntry, int32 targetPercent, int32 numTicks, int32 triggerNum);
91 void disable_player_commands_and_fade_init(
int trigger);
92 void pal_cycle_init(int32 firstPalEntry, int32 lastPalEntry, int32 delayTicks,
93 int32 totalTicks = -1, int32 triggerNum = -1);
119 void DAC_tint_range(
const RGB8 *tintColor, int32 percent, int32 firstPalEntry, int32 lastPalEntry,
bool transparent);
121 void kernel_examine_inventory_object(
const char *picName,
RGB8 *pal,
122 int steps,
int delay, int32 x, int32 y, int32 trigger,
123 const char *digiName, int32 digiTrigger);
124 void kernel_examine_inventory_object(
const char *picName,
int steps,
int delay,
125 int32 x, int32 y, int32 triggerNum,
const char *digiName =
nullptr, int32 digiTrigger = -1);
126 void kernel_unexamine_inventory_object(
RGB8 *pal,
int steps,
int delay);
128 void remap_buffer_with_luminance_map(
Buffer *src, int32 x1, int32 y1, int32 x2, int32 y2);
129 void krn_SetGreyVideoMode(int32 grey_x1, int32 grey_y1, int32 grey_x2, int32 grey_y2, int32 color_x1, int32 color_y1, int32 color_x2, int32 color_y2);
130 void krn_UnsetGreyVideoMode(
void);
131 bool krn_GetGreyMode(
void);
132 void krn_UpdateGreyArea(
Buffer *greyOutThisBuffer, int32 scrnX, int32 scrnY,
133 int32 greyX1, int32 greyY1, int32 greyX2, int32 greyY2);
134 void krn_ChangeBufferLuminance(
Buffer *target, int32 percent);
136 void krn_pal_game_task();
137 void krn_fade_from_grey(
RGB8 *pal, int32 steps, int32 delay, int32 fadeType);
138 void krn_fade_to_grey(
RGB8 *pal, int32 steps, int32 delay);
Definition: ws_machine.h:153
void DAC_tint_range(const RGB8 *tintColor, int32 percent, int32 firstPalEntry, int32 lastPalEntry, bool transparent)
intptr frac16
Definition: m4_types.h:46
Definition: m4_types.h:88
Definition: m4_types.h:67
Definition: database.h:28
Definition: adv_hotspot.h:30