102 Dalmatians: Puppies to the Rescue
Decompilation Source Reference | GitLab repository
Loading...
Searching...
No Matches
effects.c
Go to the documentation of this file.
1/* Recovered game implementation; original addresses identify provenance. */
19#include "pcdogs/menu/types.h"
23#include <math.h>
24#include <stdarg.h>
25#include <string.h>
26
27// Original pcdogs.exe: 0x405f80
28// Advances screen-transition fades, draws curtain or iris overlays, and applies pause-edge audio changes according to the transition flags.
30{
31 uint32_t transition_flags = Game_FrameTransitionFlags;
32 uint32_t fade_frames_remaining = g_fadeCounter;
33 uint32_t initial_fade_frames = fade_frames_remaining;
34
35 if (fade_frames_remaining)
36 {
37 if (!((uint8_t)((uint32_t)transition_flags >> 8) & (GAME_TRANSITION_MENU_ACTIVE >> 8)))
38 {
39 fade_frames_remaining -= 1;
40 g_fadeCounter = fade_frames_remaining;
41 }
42 }
44 return;
45
46 int32_t opacity12 = (int32_t)(fade_frames_remaining << 0xc) / 0xa;
47
48 if ((uint8_t)transition_flags & GAME_TRANSITION_SCRIPT_PAUSED)
49 opacity12 = MATH_Q12_ONE - opacity12;
50
51 int32_t border_height = ((Graphics_WindowHeight / 8) * opacity12) >> 12;
52
53 if (!fade_frames_remaining)
54 {
55 int32_t opaque_border_packed_height = (border_height + 1) << 0x10;
56
57 Graphics_DrawRectangle(0, (uint32_t)(uint16_t)(Graphics_WindowWidth + 1) | opaque_border_packed_height, MATH_Q12_ONE, 0);
58 Graphics_DrawRectangle((Graphics_WindowHeight - border_height) << 0x10,
59 (uint32_t)(uint16_t)(Graphics_WindowWidth + 1) | opaque_border_packed_height, MATH_Q12_ONE, 0);
60
62 {
63 uint32_t button_bits = g_inputStateCurrentP1[0].button_bits;
64
65 if (button_bits != INPUT_STATE_DISABLED && (uint8_t)button_bits & INPUT_BUTTON_CONFIRM && !(g_inputStatePreviousP1[0].button_bits & INPUT_BUTTON_CONFIRM) && !initial_fade_frames)
66 {
67 uint32_t skip_transition_flags = Game_FrameTransitionFlags;
68
69 skip_transition_flags |= GAME_TRANSITION_FADE_COUNTDOWN;
71 Game_FrameTransitionFlags = skip_transition_flags;
75
76 return;
77 }
78 }
79 }
80 else
81 {
82 int32_t fading_border_packed_height = (border_height + 1) << 0x10;
83
84 Graphics_DrawFadeOverlay(0, (uint32_t)(uint16_t)(Graphics_WindowWidth + 1) | fading_border_packed_height,
85 opacity12);
86 Graphics_DrawFadeOverlay((Graphics_WindowHeight - border_height) << 0x10,
87 (uint32_t)(uint16_t)(Graphics_WindowWidth + 1) | fading_border_packed_height, opacity12);
88 }
89
91 return;
92
93 int32_t frame_index = g_frameCounter;
94 int32_t transition_mid_frame = g_levelTransitionMidFrame;
95 int32_t transition_fraction_q12;
96 int32_t transition_boundary_frame;
97
98 if ((uint32_t)frame_index <= (uint32_t)transition_mid_frame)
99 {
100 transition_boundary_frame = g_levelTransitionStartFrame;
101
102 if ((uint32_t)frame_index >= (uint32_t)transition_boundary_frame)
103 transition_fraction_q12 = 0;
104 else
105 transition_fraction_q12 = Math_EaseInOutQuadraticQ12(((uint32_t)(transition_boundary_frame - frame_index) << 0xc) / (uint32_t)(transition_boundary_frame - g_cameraTransitionFrameCounter));
106 }
107 else
108 {
109 transition_boundary_frame = g_levelTransitionEndFrame;
110
111 if ((uint32_t)frame_index < (uint32_t)transition_boundary_frame)
112 transition_fraction_q12 = Math_EaseInOutQuadraticQ12(
113 ((uint32_t)(transition_mid_frame * 0xfffff + frame_index) << 0xc) / (uint32_t)(transition_boundary_frame - transition_mid_frame));
114 else
115 transition_fraction_q12 = MATH_Q12_ONE;
116 }
117
118 if (g_levelTransitionFlag == 1)
119 {
120 Graphics_DrawFullscreenFadeOverlay(MATH_Q12_ONE - transition_fraction_q12);
121
122 return;
123 }
124
125 if (transition_fraction_q12 == MATH_Q12_ONE)
126 return;
127
128 struct Graphics_Render_SpriteContext *sprite =
129 (struct Graphics_Render_SpriteContext *)Shared_TextureDataRefsCursor[1].material_table_entry;
130 int32_t window_height = Graphics_WindowHeight;
131 int32_t half_width_q12 = Graphics_WindowWidth << 0xc >> 1;
132 int32_t inner_half_height_q12 = (window_height - (window_height / 8) * 2) << 12 >> 1;
133 int64_t half_width_squared_product = (int64_t)(half_width_q12)*half_width_q12;
134 int64_t half_height_squared_product = (int64_t)(inner_half_height_q12)*inner_half_height_q12;
135 int32_t radius_squared_q12 = (int32_t)((uint64_t)half_height_squared_product >> 12) + (int32_t)((uint64_t)half_width_squared_product >> 12);
136 int64_t radius_product = (int64_t)Math_SqrtFP12(radius_squared_q12) * transition_fraction_q12;
137 int32_t transition_radius = (int32_t)(uint32_t)((uint64_t)radius_product >> 12) >> 12;
138 int32_t left_border_width = (Graphics_WindowWidth >> 1) - transition_radius;
139
140 if (left_border_width > 0)
141 {
142 uint32_t side_border_packed_width = (uint32_t)((uint16_t)left_border_width + 1);
143
144 Graphics_DrawRectangle(0, (Graphics_WindowHeight + 1) << 0x10 | side_border_packed_width, MATH_Q12_ONE, 0);
145 Graphics_DrawRectangle((uint32_t)(uint16_t)(left_border_width + (transition_radius << 1)),
146 (Graphics_WindowHeight + 1) << 0x10 | side_border_packed_width, MATH_Q12_ONE, 0);
147 }
148
149 int32_t top_border_height = (Graphics_WindowHeight >> 1) - transition_radius;
150
151 if (top_border_height > 0)
152 {
153 int32_t top_border_packed_height = (top_border_height + 1) << 0x10;
154
155 Graphics_DrawRectangle(0, (uint32_t)(uint16_t)(Graphics_WindowWidth + 1) | top_border_packed_height, MATH_Q12_ONE,
156 0);
157 Graphics_DrawRectangle((top_border_height + (transition_radius << 1)) << 0x10,
158 (uint32_t)(uint16_t)(Graphics_WindowWidth + 1) | top_border_packed_height, MATH_Q12_ONE, 0);
159 }
160
161 uint32_t packed_xy = top_border_height << 0x10 | (left_border_width & 0xffff);
162 int32_t packed_wh = transition_radius << 0x10 | (uint32_t)(uint16_t)transition_radius;
163
164 // Direct Font_RenderGlyph call for screen border rendering - PS1-scale colors.
165 // Sidecar's Font_RenderGlyph hook covers this call site.
166 Graphics_RenderTexturedSprite(packed_xy, packed_wh, sprite, 0, 0, 0);
167 // Direct Font_RenderGlyph call for screen border rendering - PS1-scale colors.
168 // Sidecar's Font_RenderGlyph hook covers this call site.
169 Graphics_RenderTexturedSprite((uint32_t)((uint16_t)transition_radius + 1) + packed_xy, packed_wh, sprite,
170 0x8000000, 0, 0);
171 // Direct Font_RenderGlyph call for screen border rendering - PS1-scale colors.
172 // Sidecar's Font_RenderGlyph hook covers this call site.
173 Graphics_RenderTexturedSprite(((transition_radius + 1) << 0x10) + packed_xy, packed_wh, sprite, 0x10000000,
174 0, 0);
175 // Direct Font_RenderGlyph call for screen border rendering - PS1-scale colors.
176 // Sidecar's Font_RenderGlyph hook covers this call site.
177 Graphics_RenderTexturedSprite(packed_wh + packed_xy, packed_wh + 0x10001, sprite, 0x18000000, 0,
178 0);
179}
180
181// Original pcdogs.exe: 0x418080
182// Draws a rectangle with four independently colored corners and temporarily disables supported depth testing.
183void Graphics_DrawFilledRectangleGradient(int32_t packed_origin_xy, int32_t packed_size_wh, uint32_t top_left_rgb, uint32_t top_right_rgb, uint32_t bottom_left_rgb, uint32_t bottom_right_rgb)
184{
185 int32_t left = (int16_t)packed_origin_xy;
186 int32_t top = (int16_t)((uint32_t)packed_origin_xy >> 16);
187 int32_t right = left + (int16_t)packed_size_wh;
188 int32_t bottom = top + (int16_t)((uint32_t)packed_size_wh >> 16);
189
191
192 uint8_t alpha = D3D_SetBlendMode(0);
193 uint32_t capabilities = g_graphicsCapabilities;
194
196
197 if (capabilities & GRAPHICS_CAP_DEPTH_BUFFER)
198 g_d3dDevice7->lpVtbl->SetRenderState(g_d3dDevice7, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE);
199
200 D3D_SetTextureColorOperation(D3DTOP_DISABLE);
201
202 /* Native DrawPrimitive consumes four contiguous 20-byte FVF 0x44 vertices. */
203 struct D3D_TransformedVertexNoTex vertices[4];
204 const uint32_t colors[4] = {top_left_rgb, top_right_rgb, bottom_left_rgb, bottom_right_rgb};
205
206 const union
207 {
208 uint32_t bits;
209 float value;
211
212 for (unsigned i = 0; i < 4; ++i)
213 {
214 vertices[i].screen.x = (float)((i & 1) ? right : left);
215 vertices[i].screen.y = (float)((i & 2) ? bottom : top);
216 vertices[i].depth = depth.value;
217 vertices[i].rhw = depth.value;
218 vertices[i].diffuse_color = ((uint32_t)alpha << 24) | ((colors[i] & 0xff) << 16) | (colors[i] & 0xff00) | ((colors[i] >> 16) & 0xff);
219 }
220
221 g_d3dDevice7->lpVtbl->DrawPrimitive(g_d3dDevice7, D3DPT_TRIANGLESTRIP, (D3DFVF_XYZRHW | D3DFVF_DIFFUSE), vertices, 4, 0);
222
224 g_d3dDevice7->lpVtbl->SetRenderState(g_d3dDevice7, D3DRENDERSTATE_ZENABLE, D3DZB_TRUE);
225}
226
227// Original pcdogs.exe: 0x418300
228// Draws a black rectangle with alpha derived from Q12 opacity, temporarily disabling supported depth testing. Alpha conversion retains byte truncation.
229void Graphics_DrawFadeOverlay(int32_t packed_origin_xy, int32_t packed_size_wh, int32_t opacity12)
230{
231 int32_t left = (int32_t)(int16_t)packed_origin_xy;
232 int32_t top = (int32_t)(int16_t)(packed_origin_xy >> 0x10);
233
235
236 // Check bit 0x2000 of g_graphicsCapabilities: hardware Z-buffer support
237 uint8_t alpha = (uint8_t)((opacity12 * 0xff) >> 12);
238
239 // Convert 12-bit fixed-point fade_level (0-0x1000) to 8-bit alpha (0-0xFF) and shift to ARGB format
241
242 bool depth_state_unavailable = !(g_graphicsCapabilities_high_byte & (GRAPHICS_CAP_DEPTH_BUFFER >> 8));
243
245
246 if (!depth_state_unavailable)
247 {
248 IDirect3DDevice7 *disable_depth_device = g_d3dDevice7;
249 // Extract Y coordinate from packed pos parameter (high 16 bits)
250 disable_depth_device->lpVtbl->SetRenderState(disable_depth_device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE);
251 }
252
253 // Set blend mode 3 for transparency (fade overlay)
254 D3D_SetTextureColorOperation(D3DTOP_DISABLE);
255
256 long double left_precise = (long double)left;
257 // If hardware supports lighting, disable it (SetRenderState(D3DRENDERSTATE_LIGHTING, 0))
258 float top_left_x = (float)left_precise;
259 long double top_precise = (long double)top;
260 // IDirect3DDevice7::DrawPrimitive(D3DPT_TRIANGLESTRIP, FVF=0x44, vertices, 4, 0) - Draw fullscreen fade quad
261 // Set vertex format 1 for screen-space vertices
262 uint32_t alpha_color = (uint32_t)alpha << 24;
263 float top_left_y = (float)top_precise;
264 long double right_precise = (long double)((int32_t)(int16_t)packed_size_wh + left);
265
266 // Convert fade_level (0-0x1000) to alpha byte (0-0xFF) in high byte (ARGB format)
267 // Calculate right and bottom edges of quad
268 float top_right_x = (float)right_precise;
269 float top_right_y = (float)top_precise;
270
271 IDirect3DDevice7 *draw_device = g_d3dDevice7;
272
273 float bottom_right_x = (float)right_precise;
274 float bottom_left_x = (float)left_precise;
275 long double bottom_precise = (long double)((int32_t)(int16_t)(packed_size_wh >> 0x10) + top);
276 float bottom_left_y = (float)bottom_precise;
277 float bottom_right_y = (float)bottom_precise;
278
279 // Initialize all 4 vertices with same Z value (0x358637bd magic constant for screen quads)
280 // DrawPrimitive: TRIANGLESTRIP (5), FVF 0x44, 4 vertices for fullscreen quad
281 // z = rhw = 1.00e-06 (near-zero for screen-space 2D overlay)
282 // Re-enable lighting if it was disabled
283 // IDirect3DDevice7::DrawPrimitive(D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW|D3DFVF_DIFFUSE, vertices, 4, 0)
284 struct
285 {
286 float x, y, z, rhw;
287 uint32_t color;
288 } vertices[4] = {
289 {top_left_x, top_left_y, 9.99999997e-7f, 9.99999997e-7f, (uint32_t)alpha_color},
290 {top_right_x, top_right_y, 9.99999997e-7f, 9.99999997e-7f, (uint32_t)alpha_color},
291 {bottom_left_x, bottom_left_y, 9.99999997e-7f, 9.99999997e-7f, (uint32_t)alpha_color},
292 {bottom_right_x, bottom_right_y, 9.99999997e-7f, 9.99999997e-7f, (uint32_t)alpha_color}};
293
294 draw_device->lpVtbl->DrawPrimitive(draw_device, D3DPT_TRIANGLESTRIP, (D3DFVF_XYZRHW | D3DFVF_DIFFUSE), vertices, 4, 0);
295
296 // Re-enable Z-buffer if hardware supports it
298 {
299 IDirect3DDevice7 *restore_depth_device = g_d3dDevice7;
300 // IDirect3DDevice7::SetRenderState(D3DRS_ZENABLE, FALSE) - disable Z-buffer for 2D overlay
301 restore_depth_device->lpVtbl->SetRenderState(restore_depth_device, D3DRENDERSTATE_ZENABLE, D3DZB_TRUE);
302 }
303}
304
305// Original pcdogs.exe: 0x418460
306// Draws a fade overlay covering the current window at the supplied Q12 opacity.
308{
310 Graphics_WindowHeight << 0x10 | (uint32_t)(uint16_t)Graphics_WindowWidth, opacity12);
311}
312
313// Original pcdogs.exe: 0x418490
314// Implements the disabled fade backend by returning zero without rendering.
315bool Graphics_DisabledFadeBackendStub(int32_t fade_level)
316{
317 (void)fade_level;
318 return false;
319}
320
321// Original pcdogs.exe: 0x42c3b0
322// Initializes an oscillating byte-intensity gradient from packed bounds and hold durations. Step calculation divides by the supplied step count without a zero check.
323void Graphics_InitializeColorGradient(struct Menu_ColorGradientState *gradient_state, int32_t step_count, uint32_t packed_hold_frames, uint32_t packed_intensity_bounds)
324{
325 gradient_state->lowHoldFrames = (uint8_t)packed_hold_frames;
326 gradient_state->lowValue = (uint8_t)packed_intensity_bounds;
327 gradient_state->highHoldFrames = (char)(packed_hold_frames >> 0x10);
328
329 uint8_t high_intensity = (char)(packed_intensity_bounds >> 0x10);
330
331 gradient_state->highValue = high_intensity;
332 gradient_state->currentValue = (uint8_t)packed_intensity_bounds;
333 gradient_state->holdTimer = 0;
334 gradient_state->stepCount = (uint8_t)step_count;
335 gradient_state->signedStep = (char)((int64_t)((int32_t)high_intensity - (int32_t)(packed_intensity_bounds & 0xff) + step_count - 1) / step_count);
336}
337
338// Original pcdogs.exe: 0x42c400
339// Advances an intensity gradient, holds at its limits and reverses the signed step at each endpoint.
340uint32_t Color_UpdateGradient(struct Menu_ColorGradientState *gradient_state)
341{
342 uint8_t hold_timer = gradient_state->holdTimer;
343
344 if (hold_timer)
345 {
346 gradient_state->holdTimer = hold_timer - 1;
347
348 int32_t held_intensity = (uint8_t)(gradient_state->currentValue);
349
350 return held_intensity;
351 }
352
353 char signed_step = gradient_state->signedStep;
354 int32_t current_intensity = (uint8_t)(gradient_state->currentValue);
355 int32_t high_intensity = (uint8_t)(gradient_state->highValue);
356 int32_t next_intensity = current_intensity + (int32_t)signed_step;
357
358 if (next_intensity >= high_intensity)
359 {
360 uint8_t clamped_high_intensity = (uint8_t)high_intensity;
361
362 gradient_state->holdTimer = gradient_state->highHoldFrames;
363 gradient_state->currentValue = clamped_high_intensity;
364 gradient_state->signedStep = -(signed_step);
365
366 return (uint32_t)clamped_high_intensity;
367 }
368
369 int32_t low_intensity = (uint8_t)(gradient_state->lowValue);
370
371 if (next_intensity <= low_intensity)
372 {
373 next_intensity = low_intensity;
374 gradient_state->holdTimer = gradient_state->lowHoldFrames;
375 gradient_state->signedStep = -(signed_step);
376 }
377
378 gradient_state->currentValue = (uint8_t)next_intensity;
379
380 return next_intensity & 0xff;
381}
382
383// Original pcdogs.exe: 0x42c470
384// Computes the two text-gradient colors, optionally adjusting each channel toward black or white and clamping to the byte range.
385void Graphics_ComputeColorGradient(uint32_t *out_top_color, uint32_t *out_bottom_color, uint32_t text_flags)
386{
387 const uint32_t base_colors[2] = {0xfc8639, 0xd6ff8e};
388 uint32_t colors[2];
389
390 for (unsigned row = 0; row < 2; ++row)
391 {
392 colors[row] = base_colors[row];
393
394 if (text_flags & SPRITE_RENDER_EXPLICIT_COLOR)
395 {
396 colors[row] = 0;
397
398 for (unsigned shift = 0; shift < 24; shift += 8)
399 {
400 int32_t base_channel = (base_colors[row] >> shift) & 255;
401 int32_t channel_adjustment = ((text_flags >> shift) & 255) - 128;
402 int32_t adjusted_channel = base_channel + ((channel_adjustment * (channel_adjustment <= 0 ? base_channel : 255 - base_channel)) >> 7);
403
404 if (adjusted_channel < 0)
405 adjusted_channel = 0;
406
407 if (adjusted_channel > 255)
408 adjusted_channel = 255;
409
410 colors[row] |= (uint32_t)adjusted_channel << shift;
411 }
412 }
413 }
414
415 *out_top_color = colors[0];
416 *out_bottom_color = colors[1];
417}
418
419// Original pcdogs.exe: 0x440340
420// Advances pause or screen-fade countdowns and draws the corresponding fullscreen opacity. Pause fading takes precedence and countdown arithmetic retains signed-byte interpretation.
422{
423 (void)camera;
424 uint8_t remaining_frames = Game_PauseStateCounter;
425
426 if (remaining_frames)
427 {
428 Game_PauseStateCounter = remaining_frames - 1;
429 Graphics_DrawFullscreenFadeOverlay(((0xa - (int32_t)(int8_t)(remaining_frames - 1)) * MATH_Q12_ONE) / 0xa);
430
431 return;
432 }
433
434 remaining_frames = g_screenFadeDuration;
435
436 if (!remaining_frames)
437 return;
438
439 g_screenFadeDuration = remaining_frames - 1;
440
441 if ((int8_t)(remaining_frames - 1) >= 7)
442 {
444
445 return;
446 }
447
448 Graphics_DrawFullscreenFadeOverlay(((int32_t)(int8_t)(remaining_frames - 1) * MATH_Q12_ONE) / 7);
449}
450
451// Original pcdogs.exe: 0x440640
452// Adjusts four packed RGB colors by the current material's centered channel offsets, clamps each channel and clears the high byte.
453void Graphics_AdjustColorQuadRGB(uint32_t const *input_colors, uint32_t *output_colors)
454{
456 int32_t red_adjust_byte = (uint8_t)(material->color_adjust.r);
457 int32_t green_adjust_byte = (uint8_t)(material->color_adjust.g);
458 int32_t blue_adjust_byte = (uint8_t)(material->color_adjust.b);
459 const uint32_t *input_color_cursor = input_colors;
460 int32_t blue_adjust = blue_adjust_byte - 0x80;
461
462 for (unsigned color_index = 0; color_index < 4; ++color_index)
463 {
464 uint32_t source_rgb = *input_color_cursor & 0xffffff;
465
466 input_color_cursor = &input_color_cursor[1];
467
468 int32_t source_red = (uint8_t)source_rgb;
469 int32_t adjusted_red = source_red + red_adjust_byte - 0x80;
470
471 if (adjusted_red < 0)
472 adjusted_red = 0;
473 else if (adjusted_red > 0xff)
474 adjusted_red = 0xff;
475
476 int32_t source_green = (uint8_t)((uint8_t)((uint32_t)source_rgb >> 8));
477 int32_t adjusted_green = source_green + green_adjust_byte - 0x80;
478
479 if (adjusted_green < 0)
480 adjusted_green = 0;
481 else if (adjusted_green > 0xff)
482 adjusted_green = 0xff;
483
484 int32_t source_blue = (uint8_t)((uint8_t)((uint32_t)source_rgb >> 16));
485 int32_t adjusted_blue = source_blue + blue_adjust;
486
487 if (adjusted_blue < 0)
488 adjusted_blue = 0;
489 else if (adjusted_blue > 0xff)
490 adjusted_blue = 0xff;
491
492 *output_colors = ((uint32_t)adjusted_blue << 16) | ((uint32_t)adjusted_green << 8) | (uint32_t)adjusted_red;
493 output_colors = &output_colors[1];
494 }
495}
void Audio_PauseAllSounds(void)
Definition channels.c:525
void Audio_UpdateSoundChannels(int32_t channel_mask)
Definition channels.c:275
int32_t Audio_SetMusicFadeTarget(int32_t target_volume, int16_t frame_count)
Definition music.c:194
@ CAMERA_SCREEN_BORDER_SKIPPABLE
Definition constants.h:31
#define g_cameraTransitionFrameCounter
Definition globals.h:39
#define GAME_TRANSITION_FADE_COUNTDOWN
Definition constants.h:25
#define GAME_OVERLAY_SKIP_NODE_ANIMATION
Definition constants.h:34
#define GAME_TRANSITION_SCRIPT_PAUSED
Definition constants.h:20
#define GAME_TRANSITION_MENU_ACTIVE
Definition constants.h:7
#define Game_FrameTransitionFlags
Definition globals.h:47
#define Game_FrameOverlayFlags
Definition globals.h:44
#define Game_PauseStateCounter
Definition globals.h:71
#define GRAPHICS_CAP_DEPTH_BUFFER
Definition constants.h:16
#define GRAPHICS_SCREEN_QUAD_DEPTH_BITS
Definition constants.h:77
#define SPRITE_RENDER_EXPLICIT_COLOR
Definition constants.h:33
void Graphics_UpdateScreenTransitionEffects()
Definition effects.c:29
void Graphics_UpdateFadeCounters(struct Camera *camera)
Definition effects.c:421
void Graphics_ComputeColorGradient(uint32_t *out_top_color, uint32_t *out_bottom_color, uint32_t text_flags)
Definition effects.c:385
void Graphics_DrawFullscreenFadeOverlay(int32_t opacity12)
Definition effects.c:307
void Graphics_AdjustColorQuadRGB(uint32_t const *input_colors, uint32_t *output_colors)
Definition effects.c:453
void Graphics_InitializeColorGradient(struct Menu_ColorGradientState *gradient_state, int32_t step_count, uint32_t packed_hold_frames, uint32_t packed_intensity_bounds)
Definition effects.c:323
void Graphics_DrawFilledRectangleGradient(int32_t packed_origin_xy, int32_t packed_size_wh, uint32_t top_left_rgb, uint32_t top_right_rgb, uint32_t bottom_left_rgb, uint32_t bottom_right_rgb)
Definition effects.c:183
uint32_t Color_UpdateGradient(struct Menu_ColorGradientState *gradient_state)
Definition effects.c:340
bool Graphics_DisabledFadeBackendStub(int32_t fade_level)
Definition effects.c:315
void Graphics_DrawFadeOverlay(int32_t packed_origin_xy, int32_t packed_size_wh, int32_t opacity12)
Definition effects.c:229
void Graphics_DrawRectangle(int32_t packed_origin_xy, int32_t packed_size_wh, int32_t blend_flags, uint32_t rgb_color)
Definition primitives.c:629
void Graphics_RenderTexturedSprite(uint32_t packed_xy, uint32_t packed_wh, struct Graphics_Render_SpriteContext *sprite, uint32_t render_flags, uint32_t rotation_angle, uint32_t rotation_pivot_xy)
Definition sprites.c:43
#define Graphics_WindowWidth
Definition globals.h:140
#define g_graphicsCapabilities_high_byte
Definition globals.h:335
#define g_graphicsCapabilities
Definition globals.h:284
#define Graphics_WindowHeight
Definition globals.h:143
#define graphics_text_rendering_mode
Definition globals.h:293
#define INPUT_BUTTON_CONFIRM
Definition constants.h:11
#define INPUT_STATE_DISABLED
Definition constants.h:20
#define g_inputStatePreviousP1
Definition globals.h:65
#define g_inputStateCurrentP1
Definition globals.h:72
#define g_levelTransitionEndFrame
Definition globals.h:55
#define g_levelTransitionMidFrame
Definition globals.h:52
#define g_levelTransitionFlag
Definition globals.h:46
#define g_levelTransitionStartFrame
Definition globals.h:49
#define g_currentRenderMaterial
Definition globals.h:15
#define MATH_Q12_ONE
Definition constants.h:9
int32_t Math_SqrtFP12(uint32_t value)
int32_t Math_EaseInOutQuadraticQ12(int32_t input_q12)
Definition fixed_point.c:24
#define Shared_TextureDataRefsCursor
Definition globals.h:114
uint8_t D3D_SetBlendMode(int32_t blend_mode)
void D3D_SetTextureColorOperation(DWORD color_operation)
struct D3D_TransformedVertexNoTex::@374050323141060103245254175054163133141064310235 screen
struct Math_ColorRGB8 color_adjust
Definition types.h:375
uint8_t b
Definition types.h:40
uint8_t g
Definition types.h:39
uint8_t r
Definition types.h:38
uint8_t lowHoldFrames
Definition types.h:23
uint8_t highHoldFrames
Definition types.h:24
#define g_d3dDevice7
Definition values.h:792
#define g_frameCounter
Definition values.h:501
#define g_screenBorderStateFlag
Definition values.h:144
#define g_screenFadeCounter
Definition values.h:624
#define g_screenFadeDuration
Definition values.h:621
#define g_fadeCounter
Definition values.h:147