diff --git a/src/game/draw.c b/src/game/draw.c index b190dd3f0..e8d7dac5a 100644 --- a/src/game/draw.c +++ b/src/game/draw.c @@ -470,10 +470,10 @@ void __cdecl DrawLara(ITEM_INFO* item) int16_t* frmptr[2]; PHD_MATRIX saved_matrix; - int top = PhdTop; - int left = PhdLeft; - int bottom = PhdBottom; - int right = PhdRight; + int32_t top = PhdTop; + int32_t left = PhdLeft; + int32_t bottom = PhdBottom; + int32_t right = PhdRight; PhdBottom = PhdWinMaxY; PhdTop = 0; PhdLeft = 0; @@ -495,6 +495,7 @@ void __cdecl DrawLara(ITEM_INFO* item) object = &Objects[item->object_number]; if (Lara.hit_direction >= 0) { switch (Lara.hit_direction) { + default: case DIR_NORTH: frame = Anims[AA_SPAZ_FORWARD].frame_ptr; break; @@ -583,7 +584,7 @@ void __cdecl DrawLara(ITEM_INFO* item) phd_PopMatrix(); - int fire_arms = 0; + int32_t fire_arms = 0; if (Lara.gun_status == LGS_READY || Lara.gun_status == LGS_DRAW || Lara.gun_status == LGS_UNDRAW) { fire_arms = Lara.gun_type; @@ -830,7 +831,8 @@ void __cdecl CalculateObjectLighting(ITEM_INFO* item, int16_t* frame) } void __cdecl DrawLaraInt( - ITEM_INFO* item, int16_t* frame1, int16_t* frame2, int frac, int rate) + ITEM_INFO* item, int16_t* frame1, int16_t* frame2, int32_t frac, + int32_t rate) { PHD_MATRIX saved_matrix; @@ -913,7 +915,7 @@ void __cdecl DrawLaraInt( phd_PopMatrix_I(); - int fire_arms = 0; + int32_t fire_arms = 0; if (Lara.gun_status == LGS_READY || Lara.gun_status == LGS_DRAW || Lara.gun_status == LGS_UNDRAW) { fire_arms = Lara.gun_type; @@ -1185,7 +1187,7 @@ void __cdecl phd_RotYXZpack_I(int32_t r1, int32_t r2) PhdMatrixPtr = old_matrix; } -void __cdecl phd_PutPolygons_I(int16_t* ptr, int clip) +void __cdecl phd_PutPolygons_I(int16_t* ptr, int32_t clip) { phd_PushMatrix(); InterpolateMatrix(); diff --git a/src/game/draw.h b/src/game/draw.h index 3a206494f..daf624f79 100644 --- a/src/game/draw.h +++ b/src/game/draw.h @@ -23,7 +23,8 @@ void __cdecl DrawLara(ITEM_INFO* item); void __cdecl DrawGunFlash(int32_t weapon_type, int32_t clip); void __cdecl CalculateObjectLighting(ITEM_INFO* item, int16_t* frame); void __cdecl DrawLaraInt( - ITEM_INFO* item, int16_t* frame1, int16_t* frame2, int frac, int rate); + ITEM_INFO* item, int16_t* frame1, int16_t* frame2, int32_t frac, + int32_t rate); void __cdecl InitInterpolate(int32_t frac, int32_t rate); void __cdecl phd_PushMatrix_I(); @@ -36,7 +37,7 @@ void __cdecl phd_RotX_I(int16_t ang); void __cdecl phd_RotZ_I(int16_t ang); void __cdecl phd_RotYXZ_I(int16_t y, int16_t x, int16_t z); void __cdecl phd_RotYXZpack_I(int32_t r1, int32_t r2); -void __cdecl phd_PutPolygons_I(int16_t* ptr, int clip); +void __cdecl phd_PutPolygons_I(int16_t* ptr, int32_t clip); void __cdecl InterpolateMatrix(); void __cdecl InterpolateArmMatrix(); diff --git a/src/game/lara.h b/src/game/lara.h index 18a05bcdb..d4741a307 100644 --- a/src/game/lara.h +++ b/src/game/lara.h @@ -5,7 +5,7 @@ #include "util.h" // clang-format off -#define UpdateLaraRoom ((void __cdecl(*)(ITEM_INFO* item, int height))0x004126A0) +#define UpdateLaraRoom ((void __cdecl(*)(ITEM_INFO* item, int32_t height))0x004126A0) #define ShiftItem ((void __cdecl(*)(ITEM_INFO* item, COLL_INFO *coll))0x00412660) #define InitialiseEvilLara ((void __cdecl(*)(int16_t item_num))0x00428420) #define ControlEvilLara ((void __cdecl(*)(int16_t item_num))0x00428450)