102 Dalmatians: Puppies to the Rescue
Decompilation Source Reference | GitLab repository
Loading...
Searching...
No Matches
transitions.c
Go to the documentation of this file.
1/* Recovered game implementation; original addresses identify provenance. */
11#include "pcdogs/camera/types.h"
13#include "pcdogs/game/globals.h"
21#include "pcdogs/input/types.h"
24#include "pcdogs/level/types.h"
26#include "pcdogs/menu/globals.h"
27#include "pcdogs/menu/types.h"
35#include "pcdogs/scene/types.h"
39#include "pcdogs/ui/constants.h"
40#include "pcdogs/ui/functions.h"
41#include <math.h>
42#include <stdarg.h>
43#include <string.h>
44
45// Original pcdogs.exe: 0x4063f0
46// Selects linked transition nodes and returns true while activation is pending. A negative mode resumes the saved transition without reading timing data; a new timed transition borrows three Q12 durations and does not validate negative values or deadline overflow.
47BOOL Level_TriggerTransition(int32_t target_level_index, int32_t transition_mode, struct Level_TransitionTimingData const *transition_timing)
48{
49 uint32_t game_frame_transition_flags = Game_FrameTransitionFlags;
50 char level_transition_flag = (char)(*(uint32_t *)&g_levelTransitionFlag);
51 int32_t target_level_index_1;
52
53 if (transition_mode >= 0)
54 {
55 target_level_index_1 = target_level_index;
56 game_frame_transition_flags &= ~GAME_TRANSITION_RESUMED;
57 Game_FrameTransitionFlags = game_frame_transition_flags;
58 }
59 else
60 {
61 if (!(game_frame_transition_flags & GAME_TRANSITION_RESUMED))
62 {
63 // The first resume call marks the transition and returns. The next call resumes the saved transition mode.
64 if (!((uint8_t)game_frame_transition_flags & GAME_TRANSITION_SCRIPT_PAUSED) && Camera_UpdateFollow_CurrentCameraCell == (struct Scene_Node *)pkg_resource_current_level_data->cam_default)
66
67 game_frame_transition_flags |= GAME_TRANSITION_RESUMED;
68 Game_FrameTransitionFlags = game_frame_transition_flags;
69
70 return 0;
71 }
72
73 target_level_index_1 = (uint8_t)g_levelTransitionState;
74
75 if (target_level_index_1 == LEVEL_TRANSITION_IDLE)
76 target_level_index_1 = LEVEL_TRANSITION_TARGET_NONE;
77
78 transition_mode = (uint32_t)level_transition_flag;
79 }
80
81 if (!((uint8_t)game_frame_transition_flags & GAME_TRANSITION_SCRIPT_PAUSED))
83 else
85
86 struct Scene_Node *eligible_transition_node = NULL;
87 struct Scene_Node *selected_transition_node = NULL;
88
89 if (target_level_index_1 == LEVEL_TRANSITION_DEFAULT)
90 {
91 selected_transition_node = (struct Scene_Node *)(pkg_resource_current_level_data->cam_default);
92
93 if (transition_mode != (int32_t)level_transition_flag)
94 {
95 struct Level_Data *current_level = pkg_resource_current_level_data;
96
98 current_level->cam_current = NULL;
99 }
100 }
101
102 struct Scene_Node *scan_node = (struct Scene_Node *)g_objectNodeRoot->normal_table;
103
104 if (scan_node)
105 {
106 while (true)
107 {
108 struct Scene_Node *transition_template_node = scan_node->first_child;
109
110 if (transition_template_node && transition_template_node->node_type == SCENE_NODE_SCALAR_PARAMETERS)
111 {
112 struct Scene_Node *transition_selector_record = transition_template_node->variant_payload_ptr;
113 int32_t node_transition_id;
114
115 if (transition_selector_record)
116 {
117 node_transition_id = (uint8_t)transition_selector_record->type_specific_secondary_render_or_sound_index;
118 }
119
120 if (transition_selector_record && target_level_index_1 == node_transition_id)
121 {
122 selected_transition_node = (struct Scene_Node *)(scan_node);
123
124 if (eligible_transition_node)
125 break;
126 }
127 else if (!(scan_node->traversal_flags & LEVEL_NODE_TRANSITION_ELIGIBLE))
128 {
130 eligible_transition_node = scan_node;
131
132 if (selected_transition_node)
133 break;
134
135 if (target_level_index_1 == LEVEL_TRANSITION_TARGET_NONE)
136 break;
137 }
138 }
139
140 scan_node = scan_node->next_in_resource_list;
141
142 if (!scan_node)
143 break;
144 }
145 }
146
147 if (selected_transition_node)
148 {
149 if (target_level_index_1 != LEVEL_TRANSITION_DEFAULT
150 ? target_level_index_1 < LEVEL_TRANSITION_DEFAULT && (selected_transition_node->traversal_flags & LEVEL_NODE_TRANSITION_ELIGIBLE)
151 : (struct Scene_Node *)pkg_resource_current_level_data->cam_current != selected_transition_node)
152 {
153 int32_t frame_counter_2 = g_frameCounter;
154 int32_t current_transition_id = (uint8_t)(g_levelTransitionState);
155 int32_t level_transition_start_frame;
156
157 if (target_level_index_1 == current_transition_id && target_level_index_1 != LEVEL_TRANSITION_TARGET_NONE)
158 level_transition_start_frame = g_levelTransitionStartFrame;
159 else
160 {
161 if (target_level_index_1 != current_transition_id)
162 g_levelTransitionState = (uint8_t)target_level_index_1;
163
164 level_transition_start_frame =
165
166 ((transition_timing->start_delay_fp12 * LEVEL_TRANSITION_FRAMES_PER_SECOND) >> MATH_Q12_SHIFT) + frame_counter_2;
167 g_levelTransitionStartFrame = level_transition_start_frame;
168
169 int32_t transition_mid_deadline = ((transition_timing->mid_duration_fp12 * LEVEL_TRANSITION_FRAMES_PER_SECOND) >> MATH_Q12_SHIFT) + level_transition_start_frame;
170
171 g_levelTransitionMidFrame = transition_mid_deadline;
172
173 int32_t end_duration_fp12 = transition_timing->end_duration_fp12;
174
175 g_cameraTransitionFrameCounter = frame_counter_2;
176 g_levelTransitionEndFrame = ((end_duration_fp12 * LEVEL_TRANSITION_FRAMES_PER_SECOND) >> MATH_Q12_SHIFT) + transition_mid_deadline;
177
178 uint8_t transition_mode_byte = (uint8_t)transition_mode;
179
180 g_levelTransitionFlag = transition_mode_byte;
181
182 if (transition_mode_byte)
184 else
185 g_cameraTransitionCountdown = transition_mid_deadline - frame_counter_2;
186 }
187
188 if (eligible_transition_node)
189 {
190 int32_t outgoing_node_flags = eligible_transition_node->model_runtime_flags;
191
192 outgoing_node_flags &= ~LEVEL_NODE_TRANSITION_ACTIVE;
193 eligible_transition_node->model_runtime_flags = outgoing_node_flags;
194 level_transition_start_frame = g_levelTransitionStartFrame;
195 frame_counter_2 = g_frameCounter;
196 }
197
198 if ((uint32_t)frame_counter_2 < (uint32_t)level_transition_start_frame)
199 return 1;
200
202
203 if (eligible_transition_node)
204 {
205 struct Actor_State *actor = (struct Actor_State *)(eligible_transition_node->next_in_resource_list);
206
207 if (actor && actor->attachment_transform_node == eligible_transition_node->first_child->variant_payload_ptr)
208 {
209 ((struct Scene_Node *)actor)->lod_config_ptr->first_child = (struct Scene_Node *)actor->next_actor;
210 Actor_SetMovingLeft(actor);
211 }
212
213 eligible_transition_node->lod_config_ptr->first_child =
214 eligible_transition_node->next_sibling;
215 Actor_SetMovingLeft((struct Actor_State *)(eligible_transition_node));
216 }
217
219 {
220 pkg_resource_current_level_data->cam_current = NULL;
221
222 struct Scene_Node *lod_config_ptr = selected_transition_node->lod_config_ptr;
223
224 selected_transition_node->next_sibling = lod_config_ptr->first_child;
225 lod_config_ptr->first_child = selected_transition_node;
226 Scene_InitNodeState(selected_transition_node);
227 Actor_SetMovingRight((struct Actor_State *)(selected_transition_node));
228 selected_transition_node->model_runtime_flags |= LEVEL_NODE_TRANSITION_INITIALIZED;
229 Scene_TraverseNodeTree(selected_transition_node, (struct Actor_State *)(selected_transition_node), SCENE_NODE_RESET_REQUESTED);
230
231 struct Scene_Node *next_in_resource_list_1 =
232 selected_transition_node->next_in_resource_list;
233
234 if (next_in_resource_list_1 && next_in_resource_list_1->first_child == selected_transition_node->first_child->variant_payload_ptr)
235 {
236 struct Scene_Node *lod_config_ptr_1 = next_in_resource_list_1->lod_config_ptr;
237
238 next_in_resource_list_1->next_sibling = lod_config_ptr_1->first_child;
239 lod_config_ptr_1->first_child = next_in_resource_list_1;
240 Scene_InitNodeState(next_in_resource_list_1);
241 Actor_SetMovingRight((struct Actor_State *)(next_in_resource_list_1));
242 next_in_resource_list_1->model_runtime_flags |= LEVEL_NODE_TRANSITION_INITIALIZED;
243 Scene_TraverseNodeTree(next_in_resource_list_1, (struct Actor_State *)(next_in_resource_list_1), SCENE_NODE_RESET_REQUESTED);
244 }
245 }
246 else
247 pkg_resource_current_level_data->cam_current = (struct Pkg_CameraDef *)(selected_transition_node);
248 }
249
250 int32_t frame_counter = g_frameCounter;
251 bool mid_deadline_reached = (uint32_t)frame_counter >= (uint32_t)g_levelTransitionMidFrame;
252
253 Camera_UpdateFollow_CurrentCameraCell = selected_transition_node;
254
255 if (!mid_deadline_reached)
256 return 1;
257
259
262 else
263 {
264 next_in_resource_list = selected_transition_node->next_in_resource_list;
265
268 }
269
270 int32_t level_transition_end_frame = g_levelTransitionEndFrame;
271
272 if ((uint32_t)frame_counter <= (uint32_t)level_transition_end_frame)
273 {
274 if ((uint32_t)frame_counter < (uint32_t)level_transition_end_frame)
275 return 1;
276
278 {
279 selected_transition_node->model_runtime_flags |= LEVEL_NODE_TRANSITION_ACTIVE;
280
283 }
284
286 }
287
289 return 1;
290
292 return 1;
293 }
294 else if (target_level_index_1 == LEVEL_TRANSITION_TARGET_NONE)
295 {
296 if (eligible_transition_node)
297 {
298 struct Actor_State *transition_actor = (struct Actor_State *)(eligible_transition_node->next_in_resource_list);
299
300 if (transition_actor && transition_actor->attachment_transform_node == eligible_transition_node->first_child->variant_payload_ptr)
301 {
302 ((struct Scene_Node *)transition_actor)->lod_config_ptr->first_child = (struct Scene_Node *)transition_actor->next_actor;
303 Actor_SetMovingLeft(transition_actor);
304 }
305
306 eligible_transition_node->lod_config_ptr->first_child =
307 eligible_transition_node->next_sibling;
308 Actor_SetMovingLeft((struct Actor_State *)(eligible_transition_node));
309 }
310
311 pkg_resource_current_level_data->cam_current = NULL;
314 }
315
316 return 0;
317}
318
319// Original pcdogs.exe: 0x42d6e0
320// Updates and renders the world-selection menu, including selection sounds, fade-out, and delayed resource cleanup.
322{
323 struct Menu_ActionResult out_result;
324 char level_select_state = g_levelSelectState;
325
326 if (level_select_state != LEVEL_WORLD_SELECT_FADE_OUT)
327 {
328 if (level_select_state == LEVEL_WORLD_SELECT_WAIT_UNLOAD)
329 {
330 int32_t unload_delay_counter = g_unloadDelayCounter;
331
332 if (unload_delay_counter)
333 {
334 g_unloadDelayCounter = unload_delay_counter - 1;
335
336 if (unload_delay_counter != 1)
337 {
339
340 return 0;
341 }
342 }
343
345
346 int32_t level_select_slot = (int32_t)g_levelSelectSlot;
347
349
350 return level_select_slot;
351 }
352
353 if (level_select_state == LEVEL_WORLD_SELECT_INITIALIZE)
354 {
358 }
359 else
360 {
361 Menu_HandleSaveGameLogic(&out_result, (int32_t)g_levelSelectSlot, 0);
362
363 uint8_t sound_effect = out_result.sound_effect;
364
366 Audio_PlaySound3D(&g_soundDefinitionTable[(int32_t)(int8_t)sound_effect], NULL);
367
368 struct Menu_ActionResult menu_action = out_result;
369
370 if (menu_action.action != MENU_ACTION_COMPLETE)
371 {
372 if (menu_action.action == MENU_ACTION_BACK)
373 {
375
376 return 1;
377 }
378
379 g_levelSelectSlot = menu_action.selected_index;
380 }
381 else if ((char)menu_action.selected_index >= 0)
382 {
384
385 struct Menu_ActionResult selected_action = out_result;
386
389 g_levelIndex = selected_action.selected_index;
390 g_levelSelectSlot = selected_action.action;
391 }
392 }
393 }
394 else if (!g_levelSelectFadeCounter)
395 {
398
399 return 0;
400 }
401
403
404 char level_select_fade_counter = g_levelSelectFadeCounter;
405
406 if (!level_select_fade_counter)
407 {
408 uint32_t highlight_tint = Color_UpdateGradient(&Menu_HighlightGradient);
409
412 Menu_RenderSaveGame((int32_t)g_levelSelectSlot, highlight_tint, 0);
414
415 return 0;
416 }
417
418 g_levelSelectFadeCounter = level_select_fade_counter - 1;
419
420 if (level_select_fade_counter == 1)
421 {
424
425 return 0;
426 }
427
428 int32_t fade_delta = MATH_Q12_ONE - (int32_t)g_levelSelectFadeCounter * MATH_Q12_ONE;
429
432
433 return 0;
434}
435
436// Original pcdogs.exe: 0x42d8c0
437// Runs the main menu and options submenu with navigation, music fades, and delayed cleanup. It returns the menu action while maintaining the current selection and transition state.
439{
440 char menu_state_or_fade_timer = g_mainMenuState;
441 struct Menu_ActionResult out_result;
442 uint32_t highlight_tint;
443
444 if (menu_state_or_fade_timer == LEVEL_MAIN_MENU_FADE_OUT)
445 {
446 menu_state_or_fade_timer = g_menuFadeTimer;
447
448 if (menu_state_or_fade_timer)
449 {
450 g_menuFadeTimer = menu_state_or_fade_timer - 1;
451 }
452
453 if (menu_state_or_fade_timer && menu_state_or_fade_timer != 1)
454 {
455 if (g_menuFadeTimer <= 0)
457 else
458 {
459 highlight_tint = (uint8_t)g_menuGradientColorValue;
460 }
461 }
462 else
463 {
465 {
468
469 return 0;
470 }
471
474 }
475 }
476 else
477 {
478 if (menu_state_or_fade_timer == LEVEL_MAIN_MENU_WAIT_UNLOAD)
479 {
480 int32_t unload_delay_counter = g_unloadDelayCounter;
481
482 if (unload_delay_counter)
483 g_unloadDelayCounter = unload_delay_counter - 1;
484
485 if (!unload_delay_counter || unload_delay_counter == 1)
486 {
489
490 return 0;
491 }
492 }
493 else if (menu_state_or_fade_timer == LEVEL_MAIN_MENU_INITIALIZE)
494 {
497 g_mainMenuSelection = menu_state_or_fade_timer;
500 }
501 else if (menu_state_or_fade_timer == LEVEL_MAIN_MENU_OPTIONS)
502 {
504
505 if (out_result.action == MENU_ACTION_COMPLETE || out_result.action == MENU_ACTION_BACK)
507 else
509
510 int32_t sound_effect = (int32_t)(int8_t)out_result.sound_effect;
511
512 if (sound_effect != ((int32_t)AUDIO_INVALID_SOUND_INDEX))
514 }
515 else if (!(INPUT_BUTTON_CONFIRM & g_inputStateCurrentP1[0].button_bits) || g_inputStatePreviousP1[0].button_bits & INPUT_BUTTON_CONFIRM)
516 {
517 int32_t current_up_button = Input_CheckButtonState(0, (const struct Input_State *)(&g_inputStateCurrentP1), INPUT_ANALOG_COMBINED_POSITIVE_Y, 1);
518 int32_t previous_up_button;
519
520 if (current_up_button >= INPUT_DIGITAL_STRENGTH)
522
523 if (current_up_button >= INPUT_DIGITAL_STRENGTH && previous_up_button < INPUT_DIGITAL_STRENGTH)
524 {
525 char main_menu_selection_2 = g_mainMenuSelection;
526
527 g_mainMenuSelection = main_menu_selection_2 - 1;
528
529 if (main_menu_selection_2 - 1 < 0)
531
533 }
535 {
536 char next_menu_selection = g_mainMenuSelection + 1;
537
538 g_mainMenuSelection = next_menu_selection;
539
540 if (next_menu_selection == LEVEL_MENU_CHOICE_COUNT)
542
544 }
545 }
546 else
547 {
548 int32_t main_menu_selection = (int32_t)g_mainMenuSelection;
549
550 if (main_menu_selection == LEVEL_MENU_NEW_STORY)
551 {
557 }
558 else
559 {
560 if (main_menu_selection == LEVEL_MENU_WORLD_SELECT)
561 {
563
564 return 1;
565 }
566
567 if (main_menu_selection == LEVEL_MENU_OPTIONS)
568 {
572 }
573 }
574
576 }
577
578 if (g_menuFadeTimer <= 0)
580 else
581 {
582 highlight_tint = (uint8_t)g_menuGradientColorValue;
583 }
584 }
585
587
589 {
592
594 }
595
597
598 BOOL hold_animation = (uint8_t)(g_menuFadeTimer > 0);
599
600 Title_UpdateSpots(hold_animation);
601
602 int32_t button_set;
603
605 {
606 int32_t menu_item_index = 0;
608 int32_t menu_item_y_offset = 0;
609
610 do
611 {
612 int32_t item_highlight_color;
613
614 if ((int32_t)g_mainMenuSelection != menu_item_index)
615 item_highlight_color = 0;
616 else
617 {
618 uint32_t highlight_component = (uint32_t)(uint8_t)highlight_tint;
619
620 item_highlight_color = ((highlight_component | ((int32_t)0xffff8000)) << 8 | highlight_component) << 8 | (highlight_tint & 0xffffff);
621 }
622
623 char *text = String_GetByIndex(menu_string_ids[menu_item_index]);
624 int32_t window_height_half = Graphics_WindowHeight / 2;
625 int32_t window_width_half = Graphics_WindowWidth / 2;
626
628 (window_height_half + menu_item_y_offset - LEVEL_MENU_ROW_SPACING) << 0x10 | (uint32_t)(uint16_t)window_width_half,
629 text, item_highlight_color | UI_TEXT_ALIGN_CENTER, NULL);
630 menu_item_y_offset += LEVEL_MENU_ROW_SPACING;
631 menu_item_index += 1;
632 } while (menu_item_y_offset < LEVEL_MENU_ROW_SPACING * LEVEL_MENU_CHOICE_COUNT);
633
634 button_set = UI_PROMPT_CONFIRM;
635 }
636 else
637 button_set = Menu_RenderOptionsMenu((int32_t)g_optionsMenuSelection, highlight_tint);
638
639 UI_RenderButtonPrompts(button_set);
640
641 char menu_fade_timer = g_menuFadeTimer;
642
643 if (!menu_fade_timer)
644 {
646
648 }
649
650 if (menu_fade_timer > 0)
651 {
654
656 }
657
658 g_menuFadeTimer = menu_fade_timer + 1;
659
660 if (menu_fade_timer == -1)
661 {
663
665 }
666
667 Graphics_DrawFullscreenFadeOverlay((-((int32_t)(menu_fade_timer + 1)) << MATH_Q12_SHIFT) / LEVEL_MENU_FADE_IN_FRAMES);
669
671}
void Actor_SetMovingRight(struct Actor_State *actor)
Definition movement.c:572
void Actor_SetMovingLeft(struct Actor_State *actor)
Definition movement.c:583
#define AUDIO_INVALID_SOUND_INDEX
Definition constants.h:49
void Audio_StopAllSounds(void)
Definition channels.c:39
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
#define g_soundDefinitionTable
Definition globals.h:54
#define g_cameraTransitionCountdown
Definition globals.h:36
struct Scene_Node * global_type_Camera_UpdateFollow_CurrentCameraCell
Definition globals.h:29
#define g_cameraTransitionFrameCounter
Definition globals.h:39
#define Camera_UpdateFollow_CurrentCameraCell
Definition globals.h:30
#define GAME_TRANSITION_SCRIPT_PAUSED
Definition constants.h:20
#define GAME_TRANSITION_RESUMED
Definition constants.h:15
void Game_BackupSettings(void)
Definition loop.c:32
#define Game_FrameTransitionFlags
Definition globals.h:47
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_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
@ INPUT_ANALOG_COMBINED_NEGATIVE_Y
Definition constants.h:97
@ INPUT_ANALOG_COMBINED_POSITIVE_Y
Definition constants.h:96
#define INPUT_DIGITAL_STRENGTH
Definition constants.h:43
int32_t Input_CheckButtonState(int32_t state_index, struct Input_State const *state_table, int32_t control_code, int32_t mode_or_threshold)
Definition state.c:27
#define g_inputStatePreviousP1
Definition globals.h:65
#define g_inputStateCurrentP1
Definition globals.h:72
@ LEVEL_STRING_NEW_STORY
Definition constants.h:127
@ LEVEL_STRING_WORLD_SELECT
Definition constants.h:128
@ LEVEL_STRING_OPTIONS
Definition constants.h:129
@ LEVEL_MENU_RESULT_PENDING
Definition constants.h:122
#define LEVEL_MENU_FADE_FRAMES
Definition constants.h:98
#define LEVEL_MENU_FADE_IN_FRAMES
Definition constants.h:110
#define LEVEL_TRANSITION_FRAMES_PER_SECOND
Definition constants.h:24
#define LEVEL_MENU_MUSIC_FADE_OUT_FRAMES
Definition constants.h:111
@ LEVEL_WORLD_SELECT_WAIT_UNLOAD
Definition constants.h:71
@ LEVEL_WORLD_SELECT_FADE_OUT
Definition constants.h:70
@ LEVEL_WORLD_SELECT_INPUT
Definition constants.h:69
@ LEVEL_WORLD_SELECT_INITIALIZE
Definition constants.h:68
#define LEVEL_NODE_TRANSITION_ELIGIBLE
Definition constants.h:9
#define LEVEL_MENU_BACKGROUND_TOP_RGB
Definition constants.h:104
#define LEVEL_MENU_UNLOAD_DELAY_FRAMES
Definition constants.h:99
@ LEVEL_MENU_OPTIONS
Definition constants.h:78
@ LEVEL_MENU_NEW_STORY
Definition constants.h:76
@ LEVEL_MENU_WORLD_SELECT
Definition constants.h:77
@ LEVEL_MENU_CHOICE_COUNT
Definition constants.h:79
@ LEVEL_MAIN_MENU_WAIT_UNLOAD
Definition constants.h:63
@ LEVEL_MAIN_MENU_INITIALIZE
Definition constants.h:59
@ LEVEL_MAIN_MENU_INPUT
Definition constants.h:60
@ LEVEL_MAIN_MENU_OPTIONS
Definition constants.h:61
@ LEVEL_MAIN_MENU_FADE_OUT
Definition constants.h:62
#define LEVEL_MENU_BACKGROUND_BOTTOM_RGB
Definition constants.h:105
#define LEVEL_NODE_TRANSITION_ACTIVE
Definition constants.h:11
#define LEVEL_MENU_ROW_SPACING
Definition constants.h:106
#define LEVEL_TRANSITION_TARGET_NONE
Definition constants.h:25
@ LEVEL_TRANSITION_DEFAULT
Definition constants.h:29
@ LEVEL_TRANSITION_IDLE
Definition constants.h:30
#define LEVEL_NODE_TRANSITION_INITIALIZED
Definition constants.h:10
#define LEVEL_MENU_FADE_IN_TIMER
Definition constants.h:109
#define g_levelTransitionState
Definition globals.h:118
#define g_levelTransitionEndFrame
Definition globals.h:55
#define g_levelIndex
Definition globals.h:100
#define g_levelSelectState
Definition globals.h:67
#define g_levelSelectSlot
Definition globals.h:70
#define g_levelTransitionMidFrame
Definition globals.h:52
#define g_levelTransitionFlag
Definition globals.h:46
#define g_levelSelectFadeCounter
Definition globals.h:73
#define g_levelTransitionStartFrame
Definition globals.h:49
#define MATH_Q12_SHIFT
Definition constants.h:8
#define MATH_Q12_ONE
Definition constants.h:9
@ MENU_ACTION_COMPLETE
Definition constants.h:35
@ MENU_ACTION_BACK
Definition constants.h:34
void Menu_ProcessOptionsInput(struct Menu_ActionResult *out_result, int32_t selected_row)
Definition options.c:336
void Menu_HandleSaveGameLogic(struct Menu_ActionResult *out_result, int32_t selected_slot, int32_t allow_save)
Definition save.c:234
void Menu_RenderSaveGame(int32_t slot_index, uint32_t highlight_tint, BOOL allow_save)
Definition save.c:59
int32_t Menu_RenderOptionsMenu(int32_t selected_option_index, uint32_t highlight_tint)
Definition options.c:554
#define g_mainMenuState
Definition globals.h:135
#define g_optionsMenuSelection
Definition globals.h:141
#define g_mainMenuSelection
Definition globals.h:138
#define Menu_HighlightGradient
Definition globals.h:156
#define g_menuFadeTimer
Definition globals.h:144
#define g_menuGradientColorValue
Definition globals.h:159
#define pkg_resource_current_level_data
Definition globals.h:117
HRESULT D3D_ClearViewport()
#define SCENE_NODE_RESET_REQUESTED
Definition constants.h:26
@ SCENE_NODE_SCALAR_PARAMETERS
Definition constants.h:15
void Scene_TraverseNodeTree(struct Scene_Node *node, struct Actor_State *actor, uint32_t traversal_flags)
Definition rendering.c:39
void Scene_InitNodeState(struct Scene_Node *node)
Definition state.c:32
#define g_objectNodeRoot
Definition globals.h:12
struct Scene_TransformNodePrefix * attachment_transform_node
Definition types.h:379
struct Actor_State * next_actor
Definition types.h:378
struct Pkg_CameraDef * cam_current
Definition types.h:42
uint8_t action
Definition types.h:10
uint8_t sound_effect
Definition types.h:12
uint8_t selected_index
Definition types.h:11
struct Scene_Node * lod_config_ptr
Definition types.h:208
struct Scene_Node * next_sibling
Definition types.h:113
char type_specific_secondary_render_or_sound_index
Definition types.h:132
uint8_t traversal_flags
Definition types.h:130
uint8_t node_type
Definition types.h:129
struct Scene_Node * next_in_resource_list
Definition types.h:112
uint32_t model_runtime_flags
Definition types.h:173
void * variant_payload_ptr
Definition types.h:140
struct Scene_Node * first_child
Definition types.h:114
char * String_GetByIndex(int32_t string_id)
Definition strings.c:66
int32_t Level_UpdateInterLevelMenu()
BOOL Level_TriggerTransition(int32_t target_level_index, int32_t transition_mode, struct Level_TransitionTimingData const *transition_timing)
Definition transitions.c:47
int32_t Level_UpdateWorldSelectMenu()
#define UI_SOUND_NONE
Definition constants.h:84
#define UI_TEXT_ALIGN_CENTER
Definition constants.h:6
#define UI_PROMPT_CONFIRM
Definition constants.h:67
void Title_InitializeSpots(void)
Definition title.c:40
void UI_RenderButtonPrompts(int32_t button_set)
Definition hud.c:771
void UI_RenderText(uint32_t packed_xy, char const *text, uint32_t text_flags, void *font_context)
Definition text.c:226
void Title_UpdateSpots(BOOL hold_animation)
Definition title.c:156
void Title_CleanupScreenResources(void)
Definition title.c:238
#define g_unloadDelayCounter
Definition values.h:534
#define g_frameCounter
Definition values.h:501