102 Dalmatians: Puppies to the Rescue
Decompilation Source Reference | GitLab repository
Loading...
Searching...
No Matches
title.c
Go to the documentation of this file.
1/* Recovered game implementation; original addresses identify provenance. */
13#include "pcdogs/game/globals.h"
24#include "pcdogs/menu/types.h"
25#include "pcdogs/menu/globals.h"
31#include "pcdogs/ui/functions.h"
32#include "pcdogs/ui/globals.h"
33#include "pcdogs/ui/types.h"
34#include <math.h>
35#include <stdarg.h>
36#include <string.h>
37
38// Original pcdogs.exe: 0x443a90
39// Randomly selects title spots and schedules their staggered animation starts. If no spots are retained, the scheduling loop has no terminating recovery path.
41{
42 struct Graphics_Render_SpriteContext *out_sprite;
43
46
47 int32_t i = 0;
49
50 do
51 {
52 if (Math_GenerateRandom(0x64) >= 0x14)
53 {
55
57 spot->animation_frame = 0;
58 spot->start_tick = 0;
60 &out_sprite);
61
62 int32_t grid_cell_width = Graphics_WindowWidth / 6;
63 int32_t grid_window_height = Graphics_WindowHeight;
64
65 spot->x = (int16_t)((int64_t)i % 6) * (uint16_t)grid_cell_width;
66
67 struct Graphics_Render_SpriteContext *width_sprite = out_sprite;
68
69 spot->y = (int16_t)(grid_window_height / 4) * (int16_t)(i / 6);
70
71 struct Material_RuntimeDescriptor *texture_descriptor;
72
73 if (width_sprite)
74 texture_descriptor = width_sprite->textureDescriptor;
75
76 int32_t sprite_width;
77
78 if (!width_sprite || !texture_descriptor)
79 sprite_width = 1;
80 else
81 {
82 int32_t sprite_width_minus_one = (uint8_t)(texture_descriptor->dimensions_minus_1.width);
83
84 sprite_width = sprite_width_minus_one + 1;
85 }
86
87 int16_t random_offset_x = Math_GenerateRandom(grid_cell_width - sprite_width);
88
89 spot->x += random_offset_x;
90
91 struct Graphics_Render_SpriteContext *height_sprite = out_sprite;
92 struct Material_RuntimeDescriptor *height_descriptor;
93
94 if (height_sprite)
95 height_descriptor = height_sprite->textureDescriptor;
96
97 int32_t sprite_height;
98
99 if (!height_sprite || !height_descriptor)
100 sprite_height = 1;
101 else
102 {
103 int32_t sprite_height_minus_one = (uint8_t)(height_descriptor->dimensions_minus_1.height);
104
105 sprite_height = sprite_height_minus_one + 1;
106 }
107
108 int32_t random_window_height = Graphics_WindowHeight;
109 int16_t random_offset_y = Math_GenerateRandom((random_window_height / 4) - sprite_height);
110
111 spot->y += random_offset_y;
112 spot = &spot[1];
113 }
114
115 i += 1;
116 } while (i < 0x18);
117
118 int16_t active_spot_count = (int16_t)(((char *)spot - (char *)&g_titleSpotsDataArray) / 0xc);
119 struct Title_SpotRecord *previous_spot = NULL;
120
121 g_titleSpotsActiveCount = active_spot_count;
122
123 int32_t remaining_unscheduled_spots = (int32_t)active_spot_count;
124
125 while (true)
126 {
127 uint32_t chosen_spot_index = Math_GenerateRandom((int32_t)g_titleSpotsActiveCount);
128 struct Title_SpotRecord *chosen_spot = &g_titleSpotsDataArray[chosen_spot_index];
129
130 if (!chosen_spot->start_tick)
131 {
132 chosen_spot->flip_x = Math_GenerateRandom(2);
133 chosen_spot->flip_y = Math_GenerateRandom(2);
134
135 if (previous_spot)
136 chosen_spot->start_tick =
137 Math_GenerateRandom(7) + previous_spot->start_tick + 3;
138 else
140
141 previous_spot = chosen_spot;
142
143 int32_t remaining_before_schedule = remaining_unscheduled_spots;
144
145 remaining_unscheduled_spots -= 1;
147
148 if (remaining_before_schedule == 1)
149 break;
150 }
151 }
152}
153
154// Original pcdogs.exe: 0x443c50
155// Updates and renders title spots, restarting their cycle as needed. Holding animation freezes shared timing and sound, but visible spots can still advance their local onset frames.
156void Title_UpdateSpots(BOOL hold_animation)
157{
158 if (!hold_animation)
159 {
160 int16_t next_frame = g_titleSpotsFrameCounter + 1;
161 bool cycle_incomplete = next_frame != g_titleSpotsCycleLength;
162
163 g_titleSpotsFrameCounter = next_frame;
164
165 if (!cycle_incomplete)
166 {
168
169 return;
170 }
171
172 if (next_frame < UI_TITLE_SPOT_FADE_FRAMES)
173 return;
174 }
175
176 int32_t i = 0;
177
179 return;
180
181 struct Title_SpotRecord *spot = &g_titleSpotsDataArray[0];
182
183 do
184 {
185 int16_t start_tick = spot->start_tick;
186 int16_t current_frame_short = g_titleSpotsFrameCounter;
187
188 if (current_frame_short >= start_tick)
189 {
190 if (current_frame_short == start_tick && !hold_animation)
192
193 int32_t spot_start_frame = (int32_t)spot->start_tick;
194 int32_t current_frame = (int32_t)g_titleSpotsFrameCounter;
196
197 if (current_frame <= spot_start_frame + UI_TITLE_SPOT_HOLD_FRAMES || current_frame - spot_start_frame - UI_TITLE_SPOT_HOLD_FRAMES < UI_TITLE_SPOT_FADE_FRAMES)
198 {
199 if (current_frame > spot_start_frame + UI_TITLE_SPOT_HOLD_FRAMES)
200 {
201 int32_t fade_elapsed_times_intensity = (current_frame - spot_start_frame - UI_TITLE_SPOT_HOLD_FRAMES) * UI_TITLE_SPOT_INTENSITY;
202 uint32_t fade_intensity = (uint32_t)(UI_TITLE_SPOT_INTENSITY - fade_elapsed_times_intensity / UI_TITLE_SPOT_FADE_FRAMES);
203
204 render_flags =
205 ((fade_intensity | UI_TITLE_PACKED_COLOR_PREFIX) << 8 | fade_intensity) << 8 | ((UI_TITLE_SPOT_INTENSITY - fade_elapsed_times_intensity / UI_TITLE_SPOT_FADE_FRAMES) & GRAPHICS_COLOR_RGB_MASK);
206 }
207
208 struct Graphics_Render_SpriteContext *title_spot_material08;
209
211 (int32_t)spot->sequence_base + (int32_t)spot->animation_frame,
212 &title_spot_material08);
213
214 if (spot->flip_x)
215 render_flags |= SPRITE_RENDER_ROTATE_QUARTER;
216
217 if (spot->flip_y)
218 render_flags |= SPRITE_RENDER_ROTATE_HALF;
219
220 uint32_t packed_xy = (uint16_t)spot->x | ((uint32_t)(uint16_t)spot->y << UI_PACKED_Y_SHIFT);
221
222 Graphics_RenderTexturedSprite(packed_xy, 0, title_spot_material08, render_flags, 0, 0);
223
224 char animation_frame = spot->animation_frame;
225
226 if (animation_frame < UI_TITLE_SPOT_FINAL_ANIMATION_FRAME)
227 spot->animation_frame = animation_frame + 1;
228 }
229 }
230
231 i += 1;
232 spot = &spot[1];
233 } while (i < (int32_t)g_titleSpotsActiveCount);
234}
235
236// Original pcdogs.exe: 0x443e70
237// Stops title audio and releases title resources without clearing their stored pointers. Cleanup is therefore intended to run once per allocation.
248
249// Original pcdogs.exe: 0x443ec0
250// Runs the title load, fade, input and attract-replay state machine, returning whether display continues. Command -1 resets state and either returns without cleanup or schedules delayed cleanup according to frame flag 0x20000.
251uint8_t Title_UpdateAndRenderScreen(int32_t command)
252{
253 if (command == UI_TITLE_COMMAND_RESET)
254 {
255 uint32_t cleanup_frame_flags = Game_FrameTransitionFlags;
256
259
260 if (!(cleanup_frame_flags & GAME_TRANSITION_BONUS_REPLAY))
261 {
262 return 0;
263 }
264
267 }
268 else
269 {
270 int32_t update_state = (int32_t)g_titleScreenState;
271
272 switch (update_state)
273 {
274 case TITLE_STATE_LOAD:
275 {
277
278 uint8_t result = PKG_LoadTitleScreenResources();
279
280 if (!result)
281 return result;
282
285
286 return !g_skipTitleScreen;
287 break;
288 }
289
291 {
293
294 void *old_bonus_replay_resource = PKG_ResourceTitleBonusReplayResource;
295
296 if (old_bonus_replay_resource)
297 Pkg_FreeResourceMemory(old_bonus_replay_resource);
298
299 // TOC[35] 0x23: Bonus level state/unlock data
303
304 return 1;
305 break;
306 }
307
309 {
310 int16_t fade_in_frame = g_titleScreenCounter + 1;
311
312 g_titleScreenCounter = fade_in_frame;
313
314 if (fade_in_frame == UI_TITLE_FADE_IN_FRAMES)
315 {
320
321 break;
322 }
323
324 int32_t fade_in_numerator = (UI_TITLE_FADE_IN_FRAMES - (int32_t)fade_in_frame) * MATH_Q12_ONE;
325
326 g_titleScreenFadeLevel = (uint16_t)(fade_in_numerator / UI_TITLE_FADE_IN_FRAMES);
327
328 break;
329 }
330
332 {
333 int16_t wait_frame = g_titleScreenCounter + 1;
334
335 g_titleScreenCounter = wait_frame;
336
337 if (wait_frame == UI_TITLE_WAIT_FOR_SPOTS_FRAMES)
338 {
341 }
342
343 break;
344 }
345
347 {
349
350 if (Input_IsKeyPressedAsync(VK_ESCAPE))
351 {
354
355 return 0;
356 }
357
358 char previous_buttons = g_inputStatePreviousP1[0].button_bits;
359 int32_t confirm_button = g_inputStateCurrentP1[0].button_bits & INPUT_BUTTON_CONFIRM;
360
361 if ((!confirm_button || previous_buttons & INPUT_BUTTON_CONFIRM) && g_titleScreenCounter != UI_TITLE_ATTRACT_REPLAY_DELAY_FRAMES)
362 break;
363
364 if (confirm_button && !(previous_buttons & INPUT_BUTTON_CONFIRM))
365 {
369 }
371 {
375 }
376
378
379 break;
380 }
381
383 {
384 int16_t fade_out_frame = g_titleScreenCounter;
385
386 g_titleScreenCounter = fade_out_frame + 1;
387
388 if (fade_out_frame == UI_TITLE_FADE_OUT_FRAMES)
389 {
390 uint32_t cleanup_frame_flags = Game_FrameTransitionFlags;
391
394
395 if (!(cleanup_frame_flags & GAME_TRANSITION_BONUS_REPLAY))
396 {
397 return 0;
398 }
399
402
403 break;
404 }
405
406 int32_t fade_out_numerator = (int32_t)(int16_t)(fade_out_frame + 1) * MATH_Q12_ONE;
407
408 g_titleScreenFadeLevel = (uint16_t)(fade_out_numerator / UI_TITLE_FADE_OUT_FRAMES);
409
410 break;
411 }
412
414 {
416
417 int32_t unload_delay = g_unloadDelayCounter;
418
419 if (unload_delay)
420 g_unloadDelayCounter = unload_delay - 1;
421
422 if (unload_delay && unload_delay != 1)
423 break;
424
427
428 return 0;
429 break;
430 }
431
432 default:
433 break;
434 }
435 }
436
438
440 {
443
444 return 1;
445 }
446
447 struct Graphics_Render_SpriteContext *title_sprite;
448
449 Graphics_ClearScreenAndRenderRectangle(0xfc8639, 0xfc8639, 0xd6ff8e, 0xd6ff8e);
450
451 char render_state = g_titleScreenState;
452
453 if (render_state >= TITLE_STATE_WAIT_FOR_SPOTS)
454 {
455 BOOL hold_animation = (uint8_t)(render_state == TITLE_STATE_FADE_OUT);
456
457 Title_UpdateSpots(hold_animation);
458 }
459
460 int32_t lower_shadow_window_width = Graphics_WindowWidth;
461 int32_t lower_shadow_draw_x = (int64_t)(lower_shadow_window_width * 0x8a) / lower_shadow_window_width + (int64_t)(lower_shadow_window_width << 2) / lower_shadow_window_width;
462
463 for (int32_t lower_shadow_frame = 0; lower_shadow_frame < 2; lower_shadow_frame += 1)
464 {
465 Material_FindTextureByFrame(&g_titleSpotsMaterialIndex[4], lower_shadow_frame, &title_sprite);
466
467 int32_t lower_shadow_window_height = Graphics_WindowHeight;
468
470 ((int64_t)(lower_shadow_window_height * 2) / lower_shadow_window_height + (int64_t)(lower_shadow_window_height * 0xdc) / lower_shadow_window_height + 5) << UI_PACKED_Y_SHIFT | (uint32_t)(uint16_t)lower_shadow_draw_x,
472
473 struct Graphics_Render_SpriteContext *lower_shadow_sprite = title_sprite;
474 struct Material_RuntimeDescriptor *lower_shadow_descriptor;
475
476 if (lower_shadow_sprite)
477 lower_shadow_descriptor = lower_shadow_sprite->textureDescriptor;
478
479 int32_t lower_shadow_width;
480
481 if (!lower_shadow_sprite || !lower_shadow_descriptor)
482 lower_shadow_width = 1;
483 else
484 {
485 int32_t lower_shadow_width_minus_one = (uint8_t)(lower_shadow_descriptor->dimensions_minus_1.width);
486
487 lower_shadow_width = lower_shadow_width_minus_one + 1;
488 }
489
490 lower_shadow_draw_x += lower_shadow_width;
491 }
492
493 int32_t upper_shadow_window_width = Graphics_WindowWidth;
494 int32_t frame_index = 0;
495 int32_t upper_shadow_draw_x = (int64_t)(upper_shadow_window_width * 0x36) / upper_shadow_window_width;
496
497 do
498 {
499 Material_FindTextureByFrame(&g_titleSpotsMaterialIndex[1], frame_index, &title_sprite);
500
501 int32_t upper_shadow_window_height = Graphics_WindowHeight;
502
504 ((int64_t)(upper_shadow_window_height * 0x44) / upper_shadow_window_height) << UI_PACKED_Y_SHIFT | (uint32_t)(uint16_t)upper_shadow_draw_x,
506
507 struct Graphics_Render_SpriteContext *upper_shadow_sprite = title_sprite;
508 struct Material_RuntimeDescriptor *upper_shadow_descriptor;
509
510 if (upper_shadow_sprite)
511 upper_shadow_descriptor = upper_shadow_sprite->textureDescriptor;
512
513 int32_t upper_shadow_width;
514
515 if (!upper_shadow_sprite || !upper_shadow_descriptor)
516 upper_shadow_width = 1;
517 else
518 {
519 int32_t upper_shadow_width_minus_one = (uint8_t)(upper_shadow_descriptor->dimensions_minus_1.width);
520
521 upper_shadow_width = upper_shadow_width_minus_one + 1;
522 }
523
524 upper_shadow_draw_x += upper_shadow_width;
525 frame_index += 1;
526 } while (frame_index < 3);
527
528 int32_t lower_logo_window_width = Graphics_WindowWidth;
529 int32_t lower_logo_frame = 0;
530 int32_t lower_logo_draw_x = (int64_t)(lower_logo_window_width * 0x8a) / lower_logo_window_width;
531
532 do
533 {
534 Material_FindTextureByFrame(&g_titleSpotsMaterialIndex[3], lower_logo_frame, &title_sprite);
535
536 int32_t lower_logo_window_height = Graphics_WindowHeight;
537
539 ((int64_t)(lower_logo_window_height * 0xdc) / lower_logo_window_height + 5) << UI_PACKED_Y_SHIFT | (uint32_t)(uint16_t)lower_logo_draw_x,
540 0, title_sprite, 0, 0, 0);
541
542 struct Graphics_Render_SpriteContext *lower_logo_sprite = title_sprite;
543 struct Material_RuntimeDescriptor *lower_logo_descriptor;
544
545 if (lower_logo_sprite)
546 lower_logo_descriptor = lower_logo_sprite->textureDescriptor;
547
548 int32_t lower_logo_width;
549
550 if (!lower_logo_sprite || !lower_logo_descriptor)
551 lower_logo_width = 1;
552 else
553 {
554 int32_t lower_logo_width_minus_one = (uint8_t)(lower_logo_descriptor->dimensions_minus_1.width);
555
556 lower_logo_width = lower_logo_width_minus_one + 1;
557 }
558
559 lower_logo_draw_x += lower_logo_width;
560 lower_logo_frame += 1;
561 } while (lower_logo_frame < 2);
562
563 int32_t upper_logo_window_width = Graphics_WindowWidth;
564 int32_t upper_logo_frame = 0;
565 int32_t upper_logo_draw_x = (int64_t)(upper_logo_window_width * 0x36) / upper_logo_window_width;
566
567 do
568 {
569 Material_FindTextureByFrame(g_titleSpotsMaterialIndex, upper_logo_frame, &title_sprite);
570
571 int32_t upper_logo_window_height = Graphics_WindowHeight;
572
574 ((int64_t)(upper_logo_window_height * 0x44) / upper_logo_window_height) << UI_PACKED_Y_SHIFT | (uint32_t)(uint16_t)upper_logo_draw_x,
575 0, title_sprite, 0, 0, 0);
576
577 struct Graphics_Render_SpriteContext *upper_logo_sprite = title_sprite;
578 struct Material_RuntimeDescriptor *upper_logo_descriptor;
579
580 if (upper_logo_sprite)
581 upper_logo_descriptor = upper_logo_sprite->textureDescriptor;
582
583 int32_t upper_logo_width;
584
585 if (!upper_logo_sprite || !upper_logo_descriptor)
586 upper_logo_width = 1;
587 else
588 {
589 int32_t upper_logo_width_minus_one = (uint8_t)(upper_logo_descriptor->dimensions_minus_1.width);
590
591 upper_logo_width = upper_logo_width_minus_one + 1;
592 }
593
594 upper_logo_draw_x += upper_logo_width;
595 upper_logo_frame += 1;
596 } while (upper_logo_frame < 3);
597
599
600 struct Graphics_Render_SpriteContext *sprite = title_sprite;
601 struct Material_RuntimeDescriptor *company_logo_descriptor;
602
603 if (sprite)
604 company_logo_descriptor = sprite->textureDescriptor;
605
606 int32_t company_logo_width;
607
608 if (!sprite || !company_logo_descriptor)
609 company_logo_width = 1;
610 else
611 {
612 int32_t company_logo_width_minus_one = (uint8_t)(company_logo_descriptor->dimensions_minus_1.width);
613
614 company_logo_width = company_logo_width_minus_one + 1;
615 }
616
617 int32_t company_window_width = Graphics_WindowWidth;
618 int32_t company_window_height = Graphics_WindowHeight;
619
621 (uint32_t)((int16_t)(company_window_width / 2) - (int16_t)(company_logo_width >> 1)) | ((int64_t)(company_window_height * 0x1a4) / company_window_height) << UI_PACKED_Y_SHIFT,
622 0, sprite, 0, 0, 0);
623
624 int16_t fade_level = g_titleScreenFadeLevel;
625
626 if (fade_level)
627 {
628 Graphics_DrawFullscreenFadeOverlay((int32_t)fade_level);
630
631 return 1;
632 }
633
635 {
636 uint32_t prompt_gradient = Color_UpdateGradient(&Menu_HighlightGradient);
637 uint32_t prompt_highlight_channel = (uint32_t)(uint8_t)prompt_gradient;
638 char *text = String_GetByIndex(0x12);
639 int32_t prompt_window_height = Graphics_WindowHeight;
640 int32_t prompt_window_width = Graphics_WindowWidth;
641
643 ((int64_t)(prompt_window_height * 0x172) / prompt_window_height) << UI_PACKED_Y_SHIFT | (uint32_t)(uint16_t)(prompt_window_width / 2),
644 text, ((prompt_highlight_channel | UI_TITLE_PROMPT_COLOR_PREFIX) << 8 | prompt_highlight_channel) << 8 | (prompt_gradient & GRAPHICS_COLOR_RGB_MASK), NULL);
645 }
646
648
649 return 1;
650}
void Audio_StartMusicWithFade(struct Audio_MusicStreamRecord *stream_record)
Definition music.c:268
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
int32_t Audio_PlaySound3D(struct Audio_SoundDefinition *sound_def, struct Math_Vec3I32 *position)
Definition spatial.c:176
void Audio_StopMusicAndPause(void)
Definition music.c:245
void Audio_InitializeLevelAudio(void)
Definition system.c:151
#define g_soundDefinitionTable
Definition globals.h:54
#define GAME_TRANSITION_BONUS_REPLAY
Definition constants.h:27
#define GAME_UNLOAD_DELAY_FRAMES
Definition constants.h:46
bool Replay_LoadBonusReplay(uint8_t const *bonus_replay_source)
Definition replay.c:14
#define Game_FrameTransitionFlags
Definition globals.h:47
#define SPRITE_RENDER_EXPLICIT_COLOR
Definition constants.h:33
#define SPRITE_RENDER_BLEND_MODE_SHIFT
Definition constants.h:36
@ GRAPHICS_BLEND_ALPHA_DIM
Definition constants.h:46
#define SPRITE_RENDER_ROTATE_QUARTER
Definition constants.h:34
#define GRAPHICS_COLOR_RGB_MASK
Definition constants.h:38
#define SPRITE_RENDER_ROTATE_HALF
Definition constants.h:35
void Graphics_DrawFullscreenFadeOverlay(int32_t opacity12)
Definition effects.c:307
void Graphics_ClearScreenAndRenderRectangle(uint32_t top_left_color, uint32_t top_right_color, uint32_t bottom_left_color, uint32_t bottom_right_color)
Definition primitives.c:779
void Graphics_EndRendering(void)
Definition frame.c:156
uint32_t Color_UpdateGradient(struct Menu_ColorGradientState *gradient_state)
Definition effects.c:340
void Graphics_BeginRendering(uint32_t clear_color)
Definition frame.c:124
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
void Graphics_IncrementPassCounter(void)
Definition frame.c:141
#define Graphics_WindowWidth
Definition globals.h:140
#define Graphics_WindowHeight
Definition globals.h:143
#define INPUT_BUTTON_CONFIRM
Definition constants.h:11
BOOL Input_IsKeyPressedAsync(int32_t v_key)
Definition state.c:310
#define g_inputStatePreviousP1
Definition globals.h:65
#define g_inputStateCurrentP1
Definition globals.h:72
#define g_inputToggleMaskP1
Definition globals.h:69
void Material_ReleaseSectionTextures(struct Material_SectionHeader *material_section)
Definition textures.c:368
int32_t Material_FindTextureByFrame(struct Material_RefEntry *material_ref, int32_t frame_index, struct Graphics_Render_SpriteContext **out_sprite)
Definition textures.c:325
#define MATH_Q12_ONE
Definition constants.h:9
uint32_t Math_GenerateRandom(uint32_t range)
#define Menu_HighlightGradient
Definition globals.h:156
void Pkg_FreeResourceMemory(void *user_ptr)
Definition resources.c:342
void Pkg_CleanupResourceHandle(void *resource_data)
Definition resources.c:380
void * PKG_LoadEntry(int32_t toc_index, void *dest_buffer, int32_t unused_mode)
Definition archive.c:18
void Pkg_FreeResourceData(void *resource_data)
Definition resources.c:387
uint8_t PKG_LoadTitleScreenResources(void)
Definition resources.c:401
#define PKG_ResourceTitleMaterialBase
Definition globals.h:93
#define PKG_ResourceTitlePackage
Definition globals.h:96
#define PKG_ResourceTitleBonusReplayResource
Definition globals.h:99
void Window_RequestClose()
Definition window.c:101
HRESULT D3D_ClearViewport()
void Config_ApplySettings(void)
Definition config.c:19
struct Material_RuntimeDescriptor * textureDescriptor
Definition types.h:570
struct Math_SizeU8 dimensions_minus_1
Definition types.h:264
uint8_t width
Definition types.h:347
uint8_t height
Definition types.h:348
int16_t y
Definition types.h:27
uint8_t flip_x
Definition types.h:28
uint8_t flip_y
Definition types.h:29
char sequence_base
Definition types.h:30
char animation_frame
Definition types.h:31
int16_t x
Definition types.h:26
int16_t start_tick
Definition types.h:32
char * String_GetByIndex(int32_t string_id)
Definition strings.c:66
void Title_InitializeSpots()
Definition title.c:40
uint8_t Title_UpdateAndRenderScreen(int32_t command)
Definition title.c:251
void Title_CleanupScreenResources()
Definition title.c:238
void Title_UpdateSpots(BOOL hold_animation)
Definition title.c:156
#define UI_TITLE_ATTRACT_REPLAY_DELAY_FRAMES
Definition constants.h:116
#define UI_TITLE_COMMAND_RESET
Definition constants.h:87
#define UI_TITLE_PROMPT_COLOR_PREFIX
Definition constants.h:65
#define UI_TITLE_SPOT_FINAL_ANIMATION_FRAME
Definition constants.h:112
#define UI_TITLE_FADE_IN_FRAMES
Definition constants.h:113
#define UI_TITLE_SPOT_INTENSITY
Definition constants.h:111
#define UI_PACKED_Y_SHIFT
Definition constants.h:93
#define UI_TITLE_WAIT_FOR_SPOTS_FRAMES
Definition constants.h:115
#define UI_TITLE_SPOT_CYCLE_TAIL_FRAMES
Definition constants.h:110
#define UI_TITLE_PACKED_COLOR_PREFIX
Definition constants.h:15
#define UI_TITLE_FADE_OUT_FRAMES
Definition constants.h:114
#define UI_TITLE_SPOT_HOLD_FRAMES
Definition constants.h:109
#define UI_TITLE_SPOT_COLOR_RGB
Definition constants.h:16
#define UI_TITLE_SHADOW_COLOR_RGB
Definition constants.h:86
#define UI_TITLE_SPOT_FADE_FRAMES
Definition constants.h:108
@ TITLE_STATE_WAIT_FOR_INPUT
Definition constants.h:40
@ TITLE_STATE_WAIT_FOR_SPOTS
Definition constants.h:39
@ TITLE_STATE_DELAYED_UNLOAD
Definition constants.h:42
@ TITLE_STATE_FADE_OUT
Definition constants.h:41
@ TITLE_STATE_START_MUSIC
Definition constants.h:37
@ TITLE_STATE_LOAD
Definition constants.h:36
@ TITLE_STATE_FADE_IN
Definition constants.h:38
void UI_RenderText(uint32_t packed_xy, char const *text, uint32_t text_flags, void *font_context)
Definition text.c:226
#define g_titleSpotsFrameCounter
Definition globals.h:86
#define g_skipTitleScreen
Definition globals.h:50
#define g_titleMusicStreamRecord
Definition globals.h:56
#define g_titleScreenFadeLevel
Definition globals.h:68
#define Title_ResourceHandle0
Definition globals.h:80
#define Title_ResourceHandle1
Definition globals.h:77
#define g_titleSpotsActiveCount
Definition globals.h:53
#define g_titleSpotsDataArray
Definition globals.h:71
#define g_titleScreenCounter
Definition globals.h:62
#define g_titleSpotsMaterialIndex
Definition globals.h:65
#define g_titleSpotsCycleLength
Definition globals.h:59
#define g_titleScreenState
Definition globals.h:74
#define g_titleSoundDefTable
Definition globals.h:83
#define g_unloadDelayCounter
Definition values.h:534