102 Dalmatians: Puppies to the Rescue
Decompilation Source Reference | GitLab repository
Loading...
Searching...
No Matches
state.c
Go to the documentation of this file.
1/* Recovered game implementation; original addresses identify provenance. */
17#include "pcdogs/game/globals.h"
26#include "pcdogs/level/types.h"
30#include "pcdogs/menu/globals.h"
31#include "pcdogs/menu/types.h"
37#include "pcdogs/save/globals.h"
40#include "pcdogs/ui/functions.h"
41#include "pcdogs/ui/globals.h"
42#include <math.h>
43#include <stdarg.h>
44#include <string.h>
45
46// Original pcdogs.exe: 0x426de0
47// Loads saved level progress into menu counters or initializes bonus-level progress. Milestone levels use fixed sentinel values instead of ordinary saved counts.
48void Menu_LoadLevelProgressState(int32_t level_id)
49{
50 int32_t resolved_level_id = Level_PassthroughIndex(level_id);
51 int32_t save_index = Level_GetSaveArrayIndex(resolved_level_id);
52
53 if (resolved_level_id == 0xb || resolved_level_id == 0x10 || resolved_level_id == 0x15 || resolved_level_id == 0x1a)
54 {
55 Menu_Selection = 0x65;
57
58 return;
59 }
60
61 if (resolved_level_id < 7 || resolved_level_id >= 0x1b)
62 {
63 if (resolved_level_id >= 0x1b && resolved_level_id < 0x21)
64 Level_InitializeBonusData(resolved_level_id, save_index);
65
66 return;
67 }
68
69 int32_t completion_bits = (int32_t)(int8_t)g_collectiblesData.level_completion_flags[save_index];
70 int32_t completed_collectible_count = 0;
71
72 Menu_Selection = (int32_t)(int8_t)g_collectiblesData.level_best_scores[save_index];
74
75 for (int32_t i = 0; i < 6; i += 1)
76 {
77 if (completion_bits & UI_COMPLETION_FIRST_ITEM << ((uint8_t)i & UI_BIT_INDEX_MASK))
78 completed_collectible_count += 1;
79 }
80
81 g_submenuCount = completed_collectible_count;
82}
83
84// Original pcdogs.exe: 0x427850
85// Releases shared menu material and package resources when the shared material section exists and clears the shared-section pointer.
100
101// Original pcdogs.exe: 0x4278b0
102// Rearms completed bone, puppy, and life-counter animations by changing terminal state UI_COUNTER_ANIMATION_FINISHED to zero.
114
115// Original pcdogs.exe: 0x4278f0
116// Updates and renders the in-level counters, confirmation prompt, and animated slot icons according to pause and transition flags. It preserves the distinct displayed-count sentinels and forwards the lives widget's right edge to the prompt renderer.
118{
119 uint32_t frame_flags = Game_FrameTransitionFlags;
120 int16_t current_level_id = g_currentLevelID;
121
122 if ((uint8_t)frame_flags & (GAME_TRANSITION_UNLOAD_LEVEL | GAME_TRANSITION_SCRIPT_PAUSED) || current_level_id < LEVEL_CAMPAIGN_FIRST || current_level_id >= LEVEL_BONUS_FIRST || Game_PauseStateCounter)
123 {
124 if (current_level_id == 6)
125 {
126 if (!(frame_flags & GAME_TRANSITION_CHEAT_ENABLED))
127 g_menuItems[0] = (int32_t)g_collectiblesData.max_world_reached;
128 else
129 {
130 int32_t cheat_window_height = Graphics_WindowHeight;
131 int32_t cheat_window_width = Graphics_WindowWidth;
132
134 ((int64_t)(cheat_window_height * 0x142) / cheat_window_height + 0x20)
136 (uint32_t)(uint16_t)((int64_t)(cheat_window_width * 0x14) / cheat_window_width),
137 "Cheater!", 0, NULL);
138 frame_flags = Game_FrameTransitionFlags;
139 g_menuItems[0] = 0x14;
140 }
141 }
142
143 uint8_t show_lives_flag = ((uint8_t)~frame_flags >> 4) & (GAME_TRANSITION_SCRIPT_PAUSED >> 4);
144
145 g_livesUICurrentValue = (uint16_t)(uint8_t)show_lives_flag | UI_LIVES_DISABLED_BASE;
146 g_boneCounterUIState = 0xffff;
147 g_puppyCounterUIState = 0xffff;
148
149 return;
150 }
151
152 if (!(frame_flags & GAME_TRANSITION_BONUS_REPLAY))
153 {
154 if ((uint8_t)((uint32_t)frame_flags >> 8) & (GAME_TRANSITION_MENU_ACTIVE >> 8))
155 {
158
161
164 }
165 }
166 else if (((char)g_frameCounter & UI_PROMPT_BLINK_FRAME_MASK) > 7)
167 {
168 char *text = String_GetByIndex(0);
169 int32_t window_width_low = Graphics_WindowWidth;
170
172 (uint32_t)(uint16_t)(window_width_low / 2) | (Graphics_WindowHeight - 0x30) << UI_PACKED_Y_SHIFT,
173 text, UI_TEXT_ALIGN_CENTER, NULL);
174 }
175
176 struct Menu_LevelProgressInfo out_info;
177
178 Menu_GetPlayerLevelInfo(&out_info);
179
180 int16_t displayed_bone_count = g_boneCounterUIState;
181 int16_t level_bone_count = out_info.level_bone_count;
182
183 if (displayed_bone_count == -1)
184 {
185 displayed_bone_count = level_bone_count;
187 g_boneCounterUIState = displayed_bone_count;
188 }
189
190 int16_t displayed_puppy_count = g_puppyCounterUIState;
191 int16_t level_puppy_count = out_info.level_puppy_count;
192
193 if (displayed_puppy_count == -1)
194 {
195 displayed_puppy_count = level_puppy_count;
197 g_puppyCounterUIState = displayed_puppy_count;
198 }
199
200 int16_t displayed_player_bone_count = g_livesUICurrentValue;
201
202 if (displayed_player_bone_count < 0)
203 {
205
206 if (displayed_player_bone_count == -1)
207 {
208 displayed_player_bone_count = 0;
210 }
211 }
212
215
218
219 if ((out_info.player_bone_count != displayed_player_bone_count || out_info.player_lives != UI_LivesCounterLastValue) && UI_LivesCounterAnimState == UI_COUNTER_ANIMATION_FINISHED)
221
223 {
224 if (Menu_IsInGame())
225 return;
226
229 }
230
231 if (level_bone_count >= 0)
232 {
235 }
236
237 if (level_puppy_count >= 0)
238 {
240 }
241
243 (int32_t)out_info.player_lives));
245}
246
247// Original pcdogs.exe: 0x428790
248// Advances material animation controllers and renders the icon counts for the eight menu slots.
250{
251 int32_t width = Graphics_WindowWidth;
252 int32_t draw_x = (int32_t)((uint32_t)width * 20) / width;
253
254 for (size_t slot = 0; slot < sizeof(g_menuSlots) / sizeof(g_menuSlots[0]); ++slot)
255 {
256 uint32_t icons = g_menuSlots[slot];
257 if (!icons || !g_currentUseableMats[slot].material_table_entry)
258 continue;
259
260 struct Material_FrameSet *frames = g_currentUseableMats[slot].frame_set;
261 if (frames)
262 {
263 struct Material_FrameData **frame = frames->frame_ptr_array;
264 uint32_t remaining = (uint32_t)(int32_t)frames->frame_count;
265 do
266 {
267 Animation_ProcessController((struct Material_Node **)g_currentUseableMats[slot].material_section,
268 &(*frame)->material_node_ref_packed, (uint32_t)g_frameCounter << MATH_Q12_SHIFT);
269 ++frame;
270 } while (--remaining);
271 }
272
273 do
274 {
275 struct Graphics_Render_SpriteContext *sprite =
276 (struct Graphics_Render_SpriteContext *)g_currentUseableMats[slot].material_table_entry;
277 int32_t icon_height = sprite && sprite->textureDescriptor
279 : 1;
280 int32_t height = Graphics_WindowHeight;
281 int32_t bottom_margin = (int32_t)((uint32_t)height * 32) / height;
282 uint32_t draw_y = (uint32_t)height - bottom_margin - icon_height;
283 Graphics_RenderTexturedSprite((draw_y << UI_PACKED_Y_SHIFT) | (uint16_t)draw_x, 0, sprite, 0, 0, 0);
284
285 sprite = (struct Graphics_Render_SpriteContext *)g_currentUseableMats[slot].material_table_entry;
286 int32_t icon_width = sprite && sprite->textureDescriptor
288 : 1;
289 width = Graphics_WindowWidth;
290 draw_x += (int32_t)((uint32_t)width * 3) / width + icon_width;
291 } while (--icons);
292 }
293}
294
295// Original pcdogs.exe: 0x428970
296// Collects player lives, collected bones, and level bone/puppy totals for the HUD and refreshes completion bits. Missing actors produce zeroed output, and excluded levels use sentinel totals.
298{
299 struct Actor_State *player_actor = Entity_GetCurrentOrFirstActiveActor();
300
301 if (!player_actor)
302 {
303 *out_info = (struct Menu_LevelProgressInfo){0};
304
305 return;
306 }
307
308 void *record_ptr = player_actor->record_ptr;
309 int16_t bone_count_or_level_id = ((struct Player_ControllerRecordView *)record_ptr)->collected_bones;
310
311 out_info->player_bone_count = bone_count_or_level_id;
312
313 if (bone_count_or_level_id < 0)
314 out_info->player_bone_count = 0;
315
316 out_info->player_lives = ((struct Player_ControllerRecordView *)record_ptr)->lives_remaining;
317 bone_count_or_level_id = g_currentLevelID;
318
319 if (bone_count_or_level_id < LEVEL_CAMPAIGN_FIRST || bone_count_or_level_id >= LEVEL_BONUS_FIRST || bone_count_or_level_id == LEVEL_WORLD_ONE_BOSS || bone_count_or_level_id == LEVEL_WORLD_TWO_BOSS || bone_count_or_level_id == LEVEL_WORLD_THREE_BOSS || bone_count_or_level_id == LEVEL_WORLD_FOUR_BOSS)
320 {
321 out_info->level_bone_count = 0xffff;
322 out_info->level_puppy_count = 0xffff;
323
324 return;
325 }
326
327 out_info->level_bone_count = (*(uint16_t *)&Menu_Selection);
328
329 int16_t puppy_count_or_completion_bits = (*(uint16_t *)&g_submenuCount);
330
331 out_info->level_puppy_count = puppy_count_or_completion_bits;
332
333 if (!(*(uint16_t *)&g_submenuCount))
334 return;
335
336 uint8_t completion_bits = g_currentLevelCompletionBits;
337
338 for (size_t i = 0; i < sizeof(g_menuItems) / sizeof(g_menuItems[0]); ++i)
339 {
340 if (g_menuItems[i])
341 completion_bits |= UI_COMPLETION_FIRST_ITEM << i;
342 }
343
344 g_currentLevelCompletionBits = completion_bits;
345}
346
347// Original pcdogs.exe: 0x428a40
348// Returns a full-width true value exactly for menu states eleven and twelve.
350{
351 char menu_state = g_menuState;
352
353 return menu_state == MENU_STATE_GAMEPLAY_FIRST || menu_state == MENU_STATE_GAMEPLAY_SECOND;
354}
355
356// Original pcdogs.exe: 0x428c50
357// Resets pause/menu transition state, rearms completed HUD animations, and marks displayed counters uninitialized.
367
368// Original pcdogs.exe: 0x429260
369// Updates six menu navigation pulses from controller transitions and keyboard keys, then refreshes the held-state bytes.
371{
372 char previous_buttons = g_inputStatePreviousP1[0].button_bits;
373
375 g_menuInputLeft = 0;
376 g_menuInputUp = 0;
377 g_menuInputDown = 0;
380
381 uint8_t current_buttons = g_inputStateCurrentP1[0].button_bits;
382
383 if (current_buttons & INPUT_BUTTON_UP && !(previous_buttons & INPUT_BUTTON_UP) && !g_menuInputUpHeld)
384 g_menuInputUp = 1;
385
386 if (current_buttons & INPUT_BUTTON_DOWN && !(previous_buttons & INPUT_BUTTON_DOWN) && !g_menuInputDownHeld)
387 g_menuInputDown = 1;
388
389 if (current_buttons & INPUT_BUTTON_RIGHT && !(previous_buttons & INPUT_BUTTON_RIGHT) && !g_menuInputRightHeld)
391
392 if (current_buttons & INPUT_BUTTON_LEFT && !(previous_buttons & INPUT_BUTTON_LEFT) && !g_menuInputLeftHeld)
393 g_menuInputLeft = 1;
394
395 if (current_buttons & INPUT_BUTTON_ACTION_2 && !(previous_buttons & INPUT_BUTTON_ACTION_2) && !g_menuInputCancelHeld)
397
398 if (current_buttons & INPUT_BUTTON_CONFIRM && !(previous_buttons & INPUT_BUTTON_CONFIRM) && !g_menuInputConfirmHeld)
400
403
406
408 g_menuInputUp = 1;
409
411 g_menuInputDown = 1;
412
414 g_menuInputLeft = 1;
415
418
421 else
423
426 else
428
429 if (Input_IsKeyPressedAsync(VK_UP) || (g_inputStateCurrentP1[0].button_bits & INPUT_BUTTON_UP && !(g_inputStatePreviousP1[0].button_bits & INPUT_BUTTON_UP)))
431 else
433
434 if (Input_IsKeyPressedAsync(VK_DOWN) || (g_inputStateCurrentP1[0].button_bits & INPUT_BUTTON_DOWN && !(g_inputStatePreviousP1[0].button_bits & INPUT_BUTTON_DOWN)))
436 else
438
439 if (Input_IsKeyPressedAsync(VK_RIGHT) || (g_inputStateCurrentP1[0].button_bits & INPUT_BUTTON_RIGHT && !(g_inputStatePreviousP1[0].button_bits & INPUT_BUTTON_RIGHT)))
441 else
443
444 if (!Input_IsKeyPressedAsync(VK_LEFT) &&
446 {
448
449 return;
450 }
451
453}
454
455// Original pcdogs.exe: 0x42bb10
456// Clears menu transition state and dispatches the selected resume, fade, or menu-transition action. Target -1 stops after cleanup, and only the designated resume paths resume sounds.
457void Menu_HandleSelection(int32_t target_menu)
458{
459 uint32_t frame_flags = Game_FrameTransitionFlags;
460
464
465 if (target_menu == MENU_TRANSITION_RESUME)
466 {
468
469 /* tailcall */
470 return Audio_ResumeAllSounds();
471 }
472
473 if (target_menu == MENU_TRANSITION_RESTORE_MUSIC)
474 {
476
477 /* tailcall */
478 return Audio_ResumeAllSounds();
479 }
480
481 if (target_menu == MENU_TRANSITION_CLEANUP_ONLY)
482 return;
483
484 Menu_ProcessMenuTransition(target_menu);
485 g_livesUICurrentValue = 0xffff;
486 g_boneCounterUIState = 0xffff;
487 g_puppyCounterUIState = 0xffff;
488}
489
490// Original pcdogs.exe: 0x42bb90
491// Advances the pause-entry countdown or starts a fifteen-tick transition when level, input, and actor gates permit it. The midpoint refreshes completion state and flags.
492void Menu_CheckPauseInput(char allow_pause)
493{
494 uint8_t pause_timer = g_pauseTransitionTimer;
495
496 if (pause_timer)
497 {
498 pause_timer -= 1;
499 g_pauseTransitionTimer = pause_timer;
500
501 if (pause_timer == MENU_PLAYER_TRANSITION_MIDPOINT_FRAME)
502 {
505 }
506
507 return;
508 }
509
510 int16_t level_id = g_currentLevelID;
511
512 if (level_id < LEVEL_CAMPAIGN_FIRST || level_id >= LEVEL_BONUS_FIRST || (*(uint8_t *)&Game_FrameTransitionFlags) & GAME_TRANSITION_SCRIPT_PAUSED)
513 return;
514
515 if (allow_pause || (INPUT_BUTTON_SPECIAL & g_inputStateCurrentP1[0].button_bits && !(g_inputStatePreviousP1[0].button_bits & INPUT_BUTTON_SPECIAL)))
516 {
517 struct Actor_State *player_actor = Entity_GetCurrentOrFirstActiveActor();
518
519 g_pauseCompletionActor = player_actor;
520
521 if (player_actor && !((struct Player_ControllerRecordView *)player_actor->record_ptr)->death_stage)
522 {
526 }
527 }
528}
529
530// Original pcdogs.exe: 0x42ce30
531// Converts a menu exit choice into title, level, reload, or quit transition state. It also clears pause state and sets the skip-title flag only for the corresponding target.
532void Menu_ProcessMenuTransition(int32_t target_menu)
533{
534 if (target_menu == MENU_TRANSITION_TITLE)
536 else if (target_menu == MENU_TRANSITION_LEVEL_SELECT)
538 else if (!target_menu)
539 {
540 char highest_world_byte = Save_GetGameHighestWorld();
541 int32_t highest_world_index = (int32_t)highest_world_byte;
542
543 if ((int64_t)highest_world_index % 5)
544 {
545 g_levelIndex = highest_world_byte + 7;
547 }
548 else
549 {
551 g_levelIndex = (char)(highest_world_index / 5);
552 }
553 }
554 else if (target_menu == MENU_TRANSITION_RELOAD_LEVEL)
555 {
556 g_levelIndex = (*(uint8_t *)&g_currentLevelID);
558 }
559
562
563 if (target_menu == MENU_TRANSITION_SKIP_TITLE)
564 {
567
568 return;
569 }
570
571 if (target_menu == MENU_TRANSITION_QUIT)
573}
bool Animation_ProcessController(struct Material_Node **material_nodes, Animation_PackedControllerState *packed_controller_state_in_out, int32_t frame_count_q12)
Definition controller.c:133
#define g_boneCounterUIState
Definition globals.h:28
void Audio_FadeInMusic(void)
Definition music.c:228
int32_t Audio_SetMusicFadeTarget(int32_t target_volume, int16_t frame_count)
Definition music.c:194
void Audio_ResumeAllSounds(void)
Definition channels.c:546
int32_t Audio_PlaySound3D(struct Audio_SoundDefinition *sound_def, struct Math_Vec3I32 *position)
Definition spatial.c:176
#define g_soundDefinitionTable
Definition globals.h:54
void Camera_StartRollEffect(int16_t amplitude, int16_t duration_ticks)
Definition effects.c:26
struct Actor_State * Entity_GetCurrentOrFirstActiveActor(void)
Definition lifecycle.c:753
#define GAME_TRANSITION_GAME_OVER
Definition constants.h:28
#define GAME_OVERLAY_SKIP_NODE_ANIMATION
Definition constants.h:34
#define GAME_TRANSITION_RESPAWN_PENDING
Definition constants.h:31
#define GAME_TRANSITION_BONUS_REPLAY
Definition constants.h:27
#define GAME_TRANSITION_CHEAT_ENABLED
Definition constants.h:11
#define GAME_TRANSITION_SCRIPT_PAUSED
Definition constants.h:20
#define GAME_TRANSITION_UNLOAD_LEVEL
Definition constants.h:19
#define GAME_TRANSITION_MENU_ACTIVE
Definition constants.h:7
void Game_TriggerPause(int32_t pause_type)
Definition loop.c:61
void Player_SetCompletionFlags(struct Actor_State *actor)
Definition player.c:664
#define Game_FrameTransitionFlags
Definition globals.h:47
#define Game_FrameOverlayFlags
Definition globals.h:44
#define Game_PauseStateCounter
Definition globals.h:71
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 Graphics_WindowHeight
Definition globals.h:143
#define INPUT_BUTTON_CONFIRM
Definition constants.h:11
#define INPUT_BUTTON_UP
Definition constants.h:6
#define INPUT_BUTTON_LEFT
Definition constants.h:4
#define INPUT_BUTTON_RIGHT
Definition constants.h:5
#define INPUT_BUTTON_DOWN
Definition constants.h:7
#define INPUT_BUTTON_ACTION_2
Definition constants.h:9
#define INPUT_BUTTON_SPECIAL
Definition constants.h:16
#define g_inputStatePreviousP1
Definition globals.h:65
#define g_inputStateCurrentP1
Definition globals.h:72
BOOL Input_IsKeyPressedAsync(int32_t v_key)
Definition state.c:310
@ LEVEL_WORLD_TWO_BOSS
Definition constants.h:87
@ LEVEL_WORLD_ONE_BOSS
Definition constants.h:86
@ LEVEL_WORLD_FOUR_BOSS
Definition constants.h:89
@ LEVEL_BONUS_FIRST
Definition constants.h:90
@ LEVEL_WORLD_THREE_BOSS
Definition constants.h:88
@ LEVEL_LOAD_WORLD_HUB
Definition constants.h:43
@ LEVEL_LOAD_DIRECT
Definition constants.h:44
@ LEVEL_LOAD_TITLE
Definition constants.h:37
@ LEVEL_LOAD_STORY
Definition constants.h:42
int32_t Level_GetSaveArrayIndex(int32_t level_id)
Definition progress.c:30
int32_t Level_PassthroughIndex(int32_t level_id)
Definition progress.c:23
void Level_InitializeBonusData(int32_t level_id, int32_t save_index)
Definition progress.c:51
#define g_levelIndex
Definition globals.h:100
#define g_currentLevelCompletionBits
Definition globals.h:61
#define g_currentLevelID
Definition globals.h:43
void Material_ReleaseSectionTextures(struct Material_SectionHeader *material_section)
Definition textures.c:368
#define MATH_Q12_SHIFT
Definition constants.h:8
#define MATH_Q12_ONE
Definition constants.h:9
#define MENU_PLAYER_TRANSITION_MIDPOINT_FRAME
Definition constants.h:140
#define MENU_PLAYER_TRANSITION_FRAMES
Definition constants.h:139
@ MENU_STATE_GAMEPLAY_SECOND
Definition constants.h:19
@ MENU_STATE_CLOSED
Definition constants.h:7
@ MENU_STATE_GAMEPLAY_FIRST
Definition constants.h:18
@ MENU_TRANSITION_RESUME
Definition constants.h:53
@ MENU_TRANSITION_RELOAD_LEVEL
Definition constants.h:57
@ MENU_TRANSITION_TITLE
Definition constants.h:56
@ MENU_TRANSITION_LEVEL_SELECT
Definition constants.h:55
@ MENU_TRANSITION_QUIT
Definition constants.h:58
@ MENU_TRANSITION_SKIP_TITLE
Definition constants.h:59
@ MENU_TRANSITION_RESTORE_MUSIC
Definition constants.h:54
#define MENU_TRANSITION_CLEANUP_ONLY
Definition constants.h:63
void Menu_RenderConfirmPrompt(int32_t right_edge_x)
Definition rendering.c:23
#define g_menuInputConfirm
Definition globals.h:96
#define g_menuInputDownHeld
Definition globals.h:111
#define g_menuInputDown
Definition globals.h:87
#define g_menuItems
Definition globals.h:162
#define g_menuSlots
Definition globals.h:165
#define Menu_LoadState
Definition globals.h:153
#define g_menuState
Definition globals.h:39
#define g_menuInputUp
Definition globals.h:84
#define g_menuInputRight
Definition globals.h:93
#define g_menuInitialEntryFlag
Definition globals.h:168
#define g_pauseCompletionActor
Definition globals.h:75
#define g_menuInputLeft
Definition globals.h:90
#define Menu_Selection
Definition globals.h:171
#define g_menuInputCancelHeld
Definition globals.h:105
#define g_menuInputUpHeld
Definition globals.h:108
#define g_menuInputLeftHeld
Definition globals.h:117
#define g_menuInputConfirmHeld
Definition globals.h:102
#define g_menuInputRightHeld
Definition globals.h:114
#define g_menuInputCancel
Definition globals.h:99
#define g_menuStoredFadeLevel
Definition globals.h:69
void Menu_UpdatePauseMenu()
Definition state.c:117
void Menu_ClearTransitionFlags()
Definition state.c:103
void Menu_UpdateInput()
Definition state.c:370
void Menu_ShutdownResources()
Definition state.c:86
void Menu_ProcessMenuTransition(int32_t target_menu)
Definition state.c:532
void Menu_HandleSelection(int32_t target_menu)
Definition state.c:457
void Menu_CheckPauseInput(char allow_pause)
Definition state.c:492
void Menu_GetPlayerLevelInfo(struct Menu_LevelProgressInfo *out_info)
Definition state.c:297
void Menu_AnimateSlots()
Definition state.c:249
void Menu_LoadLevelProgressState(int32_t level_id)
Definition state.c:48
void Menu_ResetState()
Definition state.c:358
BOOL Menu_IsInGame()
Definition state.c:349
void Pkg_CleanupResourceHandle(void *resource_data)
Definition resources.c:380
void Pkg_FreeResourceData(void *resource_data)
Definition resources.c:387
#define g_sharedSoundDataBase
Definition globals.h:84
#define g_sharedMaterialSection
Definition globals.h:108
#define g_resourceDataBuffer
Definition globals.h:81
void Window_RequestClose()
Definition window.c:101
#define g_pauseTransitionTimer
Definition globals.h:189
void Save_SetGameComplete(uint8_t complete)
Definition progress.c:20
int32_t Save_GetGameHighestWorld(void)
Definition progress.c:142
int32_t Save_IsGameComplete(void)
Definition progress.c:27
#define g_collectiblesData
Definition globals.h:21
void * record_ptr
Definition types.h:477
struct Material_RuntimeDescriptor * textureDescriptor
Definition types.h:570
struct Material_FrameData ** frame_ptr_array
Definition types.h:63
int16_t frame_count
Definition types.h:62
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 level_puppy_count
Definition types.h:62
int16_t player_bone_count
Definition types.h:63
int16_t player_lives
Definition types.h:64
int16_t level_bone_count
Definition types.h:61
char * String_GetByIndex(int32_t string_id)
Definition strings.c:66
#define UI_PROMPT_BLINK_FRAME_MASK
Definition constants.h:79
#define UI_TEXT_ALIGN_CENTER
Definition constants.h:6
#define UI_PACKED_Y_SHIFT
Definition constants.h:93
#define UI_COUNTER_REARM_FRAME
Definition constants.h:76
#define UI_BIT_INDEX_MASK
Definition constants.h:81
#define UI_COUNTER_HOLD_FRAME
Definition constants.h:77
#define UI_LIVES_DISABLED_BASE
Definition constants.h:80
#define UI_COMPLETION_FIRST_ITEM
Definition constants.h:82
#define UI_COUNTER_ANIMATION_FINISHED
Definition constants.h:74
int32_t UI_UpdateLives(int32_t icon_count, int32_t lives)
Definition hud.c:272
void UI_UpdatePuppyCounter(int32_t puppy_count)
Definition hud.c:156
void UI_UpdateBoneCounter(int32_t bone_count)
Definition hud.c:43
void UI_RenderText(uint32_t packed_xy, char const *text, uint32_t text_flags, void *font_context)
Definition text.c:226
#define g_skipTitleScreen
Definition globals.h:50
#define UI_PuppyCounterAnimState
Definition globals.h:23
#define UI_LivesCounterLastValue
Definition globals.h:44
#define g_puppyCounterUIState
Definition globals.h:47
#define g_livesUICurrentValue
Definition globals.h:32
#define UI_BoneCounterAnimState
Definition globals.h:26
#define UI_LivesCounterAnimState
Definition globals.h:29
#define g_resourceHandle1
Definition values.h:408
#define g_frameCounter
Definition values.h:501
#define g_currentUseableMats
Definition values.h:750
#define g_bonusCheckpointIndex1Based
Definition values.h:405
#define g_submenuCount
Definition values.h:822