Skip to content

Commit

Permalink
const: rename LARA_AIR to LARA_MAX_AIR
Browse files Browse the repository at this point in the history
  • Loading branch information
rr- committed May 7, 2024
1 parent 7291f56 commit 7351e7c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions src/game/lara/lara.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void Lara_Control(void)

if (g_Lara.water_status == LWS_ABOVE_WATER && room_submerged) {
g_Lara.water_status = LWS_UNDERWATER;
g_Lara.air = LARA_AIR;
g_Lara.air = LARA_MAX_AIR;
item->pos.y += 100;
item->gravity_status = 0;
Item_UpdateRoom(item, 0);
Expand Down Expand Up @@ -168,7 +168,7 @@ void Lara_Control(void)

switch (g_Lara.water_status) {
case LWS_ABOVE_WATER:
g_Lara.air = LARA_AIR;
g_Lara.air = LARA_MAX_AIR;
Lara_HandleAboveWater(item, &coll);
break;

Expand All @@ -186,8 +186,8 @@ void Lara_Control(void)
case LWS_SURFACE:
if (item->hit_points >= 0) {
g_Lara.air += 10;
if (g_Lara.air > LARA_AIR) {
g_Lara.air = LARA_AIR;
if (g_Lara.air > LARA_MAX_AIR) {
g_Lara.air = LARA_MAX_AIR;
}
}
Lara_HandleSurface(item, &coll);
Expand Down Expand Up @@ -453,7 +453,7 @@ void Lara_Initialise(int32_t level_num)
g_LaraItem->hit_points = g_Config.start_lara_hitpoints;
}

g_Lara.air = LARA_AIR;
g_Lara.air = LARA_MAX_AIR;
g_Lara.torso_rot.y = 0;
g_Lara.torso_rot.x = 0;
g_Lara.torso_rot.z = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/game/lara/lara_cheat.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ bool Lara_Cheat_EnterFlyMode(void)
g_Lara.spaz_effect = NULL;
g_Lara.hit_frame = 0;
g_Lara.hit_direction = -1;
g_Lara.air = LARA_AIR;
g_Lara.air = LARA_MAX_AIR;
g_Lara.death_timer = 0;
g_Lara.mesh_effects = 0;
Lara_InitialiseMeshes(g_CurrentLevel);
Expand Down
6 changes: 3 additions & 3 deletions src/game/overlay.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ static void Overlay_BarSetupHealth(void)

static void Overlay_BarSetupAir(void)
{
m_AirBar.type = BT_LARA_AIR;
m_AirBar.value = LARA_AIR;
m_AirBar.max_value = LARA_AIR;
m_AirBar.type = BT_LARA_MAX_AIR;
m_AirBar.value = LARA_MAX_AIR;
m_AirBar.max_value = LARA_MAX_AIR;
m_AirBar.show_mode = g_Config.airbar_show_mode;
m_AirBar.show = false;
m_AirBar.blink = false;
Expand Down
2 changes: 1 addition & 1 deletion src/global/const.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#define GRAVITY 6
#define FASTFALL_SPEED 128
#define LARA_MAX_HITPOINTS 1000
#define LARA_AIR 1800
#define LARA_MAX_AIR 1800
#define LARA_TURN_UNDO (2 * PHD_DEGREE) // = 364
#define LARA_TURN_RATE ((PHD_DEGREE / 4) + LARA_TURN_UNDO) // = 409
#define LARA_SLOW_TURN ((PHD_DEGREE * 2) + LARA_TURN_UNDO) // = 728
Expand Down
2 changes: 1 addition & 1 deletion src/global/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ typedef enum GAMEFLOW_SEQUENCE_TYPE {

typedef enum BAR_TYPE {
BT_LARA_HEALTH = 0,
BT_LARA_AIR = 1,
BT_LARA_MAX_AIR = 1,
BT_ENEMY_HEALTH = 2,
BT_PROGRESS = 3,
} BAR_TYPE;
Expand Down

0 comments on commit 7351e7c

Please sign in to comment.