types: rename death_count to death_timer

This commit is contained in:
Marcin Kurczewski 2024-08-27 22:28:42 +02:00
parent 4a95c94eae
commit 9e1687b31a
No known key found for this signature in database
GPG Key ID: CC65E6FD28CAE42A
5 changed files with 13 additions and 13 deletions

View File

@ -1195,7 +1195,7 @@ typedef struct __unaligned {
int16_t hit_direction;
int16_t air;
int16_t dive_count;
int16_t death_count;
int16_t death_timer;
int16_t current_active;
int16_t spaz_effect_count;
int16_t flare_age;

View File

@ -66,8 +66,8 @@ int32_t __cdecl Game_Control(int32_t nframes, const bool demo_mode)
}
}
if (g_Lara.death_count > DEATH_WAIT
|| (g_Lara.death_count > DEATH_WAIT_INPUT && g_Input != 0)
if (g_Lara.death_timer > DEATH_WAIT
|| (g_Lara.death_timer > DEATH_WAIT_INPUT && g_Input != 0)
|| g_OverlayStatus == 2) {
if (demo_mode) {
return g_GameFlow.on_death_demo_mode;
@ -90,7 +90,7 @@ int32_t __cdecl Game_Control(int32_t nframes, const bool demo_mode)
}
if (((g_Input & 0xC00100) != 0 || g_OverlayStatus <= 0)
&& g_Lara.death_count == 0 && !g_Lara.extra_anim) {
&& g_Lara.death_timer == 0 && !g_Lara.extra_anim) {
if (g_OverlayStatus > 0) {
if (g_GameFlow.load_save_disabled) {
g_OverlayStatus = 0;

View File

@ -413,17 +413,17 @@ void __cdecl Lara_Control(const int16_t item_num)
if (item->hit_points <= 0) {
item->hit_points = -1;
if (!g_Lara.death_count) {
if (!g_Lara.death_timer) {
Music_Stop();
}
g_Lara.death_count++;
g_Lara.death_timer++;
if (item->flags & IF_ONE_SHOT) {
g_Lara.death_count++;
g_Lara.death_timer++;
return;
}
} else if (g_GF_NoFloor && item->pos.y >= g_GF_NoFloor) {
item->hit_points = -1;
g_Lara.death_count = 9 * FRAMES_PER_SECOND;
g_Lara.death_timer = 9 * FRAMES_PER_SECOND;
}
COLL_INFO coll;
@ -703,7 +703,7 @@ void __cdecl Lara_Initialise(const GF_LEVEL_TYPE type)
g_Lara.hit_frame = 0;
g_Lara.air = LARA_MAX_AIR;
g_Lara.dive_count = 0;
g_Lara.death_count = 0;
g_Lara.death_timer = 0;
g_Lara.current_active = 0;
g_Lara.spaz_effect_count = 0;
g_Lara.flare_age = 0;

View File

@ -708,7 +708,7 @@ void __cdecl Lara_State_Extra_YetiKill(ITEM_INFO *item, COLL_INFO *coll)
g_Camera.target_distance = CAM_YETI_KILL_DISTANCE;
g_Lara.hit_direction = -1;
if (item->frame_num < g_Anims[item->anim_num].frame_end - 30) {
g_Lara.death_count = 1;
g_Lara.death_timer = 1;
}
}
@ -727,7 +727,7 @@ void __cdecl Lara_State_Extra_SharkKill(ITEM_INFO *item, COLL_INFO *coll)
}
if (item->frame_num < g_Anims[item->anim_num].frame_end - 30) {
g_Lara.death_count = 1;
g_Lara.death_timer = 1;
}
}
@ -751,7 +751,7 @@ void __cdecl Lara_State_Extra_DinoKill(ITEM_INFO *item, COLL_INFO *coll)
g_Camera.target_elevation = CAM_DINO_KILL_ELEVATION;
g_Lara.hit_direction = -1;
if (item->frame_num < g_Anims[item->anim_num].frame_end - 30) {
g_Lara.death_count = 1;
g_Lara.death_timer = 1;
}
}

View File

@ -1211,7 +1211,7 @@ typedef struct __unaligned {
int16_t hit_direction;
int16_t air;
int16_t dive_count;
int16_t death_count;
int16_t death_timer;
int16_t current_active;
int16_t spaz_effect_count;
int16_t flare_age;