mirror of
https://github.com/LostArtefacts/TR2X.git
synced 2024-11-30 09:30:50 +00:00
types: settle on GAME_OBJECT_ID variable naming
This commit is contained in:
parent
b34fbda928
commit
033dfa4412
@ -399,7 +399,7 @@
|
||||
<rect width="12" height="12" x="300" y="90" class="decompiled"><title>void __cdecl Overlay_DrawAmmoInfo(void);</title></rect>
|
||||
<rect width="12" height="12" x="315" y="90" class="decompiled"><title>void __cdecl Overlay_InitialisePickUpDisplay(void);</title></rect>
|
||||
<rect width="12" height="12" x="330" y="90" class="decompiled"><title>void __cdecl Overlay_DrawPickups(bool pickup_state);</title></rect>
|
||||
<rect width="12" height="12" x="345" y="90" class="decompiled"><title>void __cdecl Overlay_AddDisplayPickup(GAME_OBJECT_ID object_num);</title></rect>
|
||||
<rect width="12" height="12" x="345" y="90" class="decompiled"><title>void __cdecl Overlay_AddDisplayPickup(GAME_OBJECT_ID object_id);</title></rect>
|
||||
<rect width="12" height="12" x="360" y="90" class="decompiled"><title>void __cdecl Overlay_DisplayModeInfo(char* string);</title></rect>
|
||||
<rect width="12" height="12" x="375" y="90" class="decompiled"><title>void __cdecl Overlay_DrawModeInfo(void);</title></rect>
|
||||
<rect width="12" height="12" x="390" y="90" class="decompiled"><title>int32_t __cdecl Inv_Display(int32_t inventory_mode);</title></rect>
|
||||
@ -415,12 +415,12 @@
|
||||
<rect width="12" height="12" x="540" y="90" class="decompiled"><title>void __cdecl Inv_RingIsNotOpen(RING_INFO *ring);</title></rect>
|
||||
<rect width="12" height="12" x="555" y="90" class="decompiled"><title>void __cdecl Inv_RingNotActive(INVENTORY_ITEM *inv_item);</title></rect>
|
||||
<rect width="12" height="12" x="570" y="90" class="decompiled"><title>void __cdecl Inv_RingActive(void);</title></rect>
|
||||
<rect width="12" height="12" x="585" y="90" class="decompiled"><title>int32_t __cdecl Inv_AddItem(GAME_OBJECT_ID object_num);</title></rect>
|
||||
<rect width="12" height="12" x="585" y="90" class="decompiled"><title>int32_t __cdecl Inv_AddItem(GAME_OBJECT_ID object_id);</title></rect>
|
||||
<rect width="12" height="12" x="600" y="90" class="decompiled"><title>void __cdecl Inv_InsertItem(INVENTORY_ITEM *inv_item);</title></rect>
|
||||
<rect width="12" height="12" x="615" y="90" class="decompiled"><title>int32_t __cdecl Inv_RequestItem(GAME_OBJECT_ID object_num);</title></rect>
|
||||
<rect width="12" height="12" x="615" y="90" class="decompiled"><title>int32_t __cdecl Inv_RequestItem(GAME_OBJECT_ID object_id);</title></rect>
|
||||
<rect width="12" height="12" x="630" y="90" class="decompiled"><title>void __cdecl Inv_RemoveAllItems(void);</title></rect>
|
||||
<rect width="12" height="12" x="645" y="90" class="decompiled"><title>int32_t __cdecl Inv_RemoveItem(GAME_OBJECT_ID object_num);</title></rect>
|
||||
<rect width="12" height="12" x="660" y="90" class="decompiled"><title>int32_t __cdecl Inv_GetItemOption(GAME_OBJECT_ID object_num);</title></rect>
|
||||
<rect width="12" height="12" x="645" y="90" class="decompiled"><title>int32_t __cdecl Inv_RemoveItem(GAME_OBJECT_ID object_id);</title></rect>
|
||||
<rect width="12" height="12" x="660" y="90" class="decompiled"><title>int32_t __cdecl Inv_GetItemOption(GAME_OBJECT_ID object_id);</title></rect>
|
||||
<rect width="12" height="12" x="675" y="90" class="decompiled"><title>void __cdecl Inv_RemoveInventoryText(void);</title></rect>
|
||||
<rect width="12" height="12" x="690" y="90" class="decompiled"><title>void __cdecl Inv_Ring_Init(RING_INFO *ring, int16_t type, INVENTORY_ITEM **list, int16_t qty, int16_t current, IMOTION_INFO *imo);</title></rect>
|
||||
<rect width="12" height="12" x="705" y="90" class="decompiled"><title>void __cdecl Inv_Ring_GetView(RING_INFO *ring, PHD_3DPOS *viewer);</title></rect>
|
||||
@ -460,7 +460,7 @@
|
||||
<rect width="12" height="12" x="465" y="105" class="decompiled"><title>void __cdecl Item_RemoveDrawn(int16_t item_num);</title></rect>
|
||||
<rect width="12" height="12" x="480" y="105" class="decompiled"><title>void __cdecl Item_AddActive(int16_t item_num);</title></rect>
|
||||
<rect width="12" height="12" x="495" y="105" class="decompiled"><title>void __cdecl Item_NewRoom(int16_t item_num, int16_t room_num);</title></rect>
|
||||
<rect width="12" height="12" x="510" y="105" class="decompiled"><title>int32_t __cdecl Item_GlobalReplace(GAME_OBJECT_ID src_object_num, GAME_OBJECT_ID dst_object_num);</title></rect>
|
||||
<rect width="12" height="12" x="510" y="105" class="decompiled"><title>int32_t __cdecl Item_GlobalReplace(GAME_OBJECT_ID src_object_id, GAME_OBJECT_ID dst_object_id);</title></rect>
|
||||
<rect width="12" height="12" x="525" y="105" class="decompiled"><title>void __cdecl Effect_InitialiseArray(void);</title></rect>
|
||||
<rect width="12" height="12" x="540" y="105" class="decompiled"><title>int16_t __cdecl Effect_Create(int16_t room_num);</title></rect>
|
||||
<rect width="12" height="12" x="555" y="105" class="decompiled"><title>void __cdecl Effect_Kill(int16_t fx_num);</title></rect>
|
||||
@ -637,7 +637,7 @@
|
||||
<rect width="12" height="12" x="120" y="165" class="known"><title>void __cdecl Flare_Control(int16_t item_num);</title></rect>
|
||||
<rect width="12" height="12" x="135" y="165" class="decompiled"><title>void __cdecl Lara_Control(int16_t item_num);</title></rect>
|
||||
<rect width="12" height="12" x="150" y="165" class="decompiled"><title>void __cdecl Lara_Animate(ITEM_INFO *item);</title></rect>
|
||||
<rect width="12" height="12" x="165" y="165" class="decompiled"><title>void __cdecl Lara_UseItem(GAME_OBJECT_ID object_num);</title></rect>
|
||||
<rect width="12" height="12" x="165" y="165" class="decompiled"><title>void __cdecl Lara_UseItem(GAME_OBJECT_ID object_id);</title></rect>
|
||||
<rect width="12" height="12" x="180" y="165" class="decompiled"><title>void __cdecl Lara_CheatGetStuff(void);</title></rect>
|
||||
<rect width="12" height="12" x="195" y="165" class="decompiled"><title>void __cdecl Lara_ControlExtra(int16_t item_num);</title></rect>
|
||||
<rect width="12" height="12" x="210" y="165" class="decompiled"><title>void __cdecl Lara_InitialiseLoad(int16_t item_num);</title></rect>
|
||||
@ -1325,7 +1325,7 @@
|
||||
<rect width="35.22" height="36.05" x="104.17" y="81.80" class="decompiled"><title>void __cdecl Output_InsertGT3_Sorted(const PHD_VBUF *vtx0, const PHD_VBUF *vtx1, const PHD_VBUF *vtx2, const PHD_TEXTURE *texture, const PHD_UV *uv0, const PHD_UV *uv1, const PHD_UV *uv2, SORT_TYPE sort_type);</title></rect>
|
||||
<rect width="35.22" height="35.66" x="104.17" y="120.85" class="decompiled"><title>void __cdecl Option_Controls(INVENTORY_ITEM *item);</title></rect>
|
||||
<rect width="35.22" height="34.90" x="104.17" y="159.51" class="decompiled"><title>BOOL __cdecl GF_LoadFromFile(const char *file_name);</title></rect>
|
||||
<rect width="35.22" height="34.49" x="104.17" y="197.42" class="decompiled"><title>int32_t __cdecl Inv_AddItem(GAME_OBJECT_ID object_num);</title></rect>
|
||||
<rect width="35.22" height="34.49" x="104.17" y="197.42" class="decompiled"><title>int32_t __cdecl Inv_AddItem(GAME_OBJECT_ID object_id);</title></rect>
|
||||
<rect width="35.22" height="33.49" x="104.17" y="234.91" class="decompiled"><title>void __cdecl Room_TestTriggers(int16_t *data, int32_t heavy);</title></rect>
|
||||
<rect width="35.22" height="33.06" x="104.17" y="271.40" class="decompiled"><title>void __cdecl Collide_GetCollisionInfo(COLL_INFO *coll, int32_t xpos, int32_t ypos, int32_t zpos, int16_t room_num, int32_t obj_height);</title></rect>
|
||||
<rect width="35.22" height="32.62" x="104.17" y="307.45" class="decompiled"><title>void __cdecl Lara_Control(int16_t item_num);</title></rect>
|
||||
@ -1596,7 +1596,7 @@
|
||||
<rect width="13.11" height="13.49" x="733.89" y="76.23" class="decompiled"><title>int32_t __cdecl Output_ZedClipper(int32_t vtx_count, POINT_INFO *pts, VERTEX_INFO *vtx);</title></rect>
|
||||
<rect width="13.48" height="13.11" x="448.61" y="92.72" class="decompiled"><title>void __cdecl Output_DrawClippedPoly_Textured(int32_t vtx_count);</title></rect>
|
||||
<rect width="13.48" height="13.11" x="448.61" y="108.84" class="known"><title>void __cdecl DoSnowEffect(ITEM_INFO *skidoo);</title></rect>
|
||||
<rect width="13.48" height="13.06" x="448.61" y="124.95" class="decompiled"><title>void __cdecl Lara_UseItem(GAME_OBJECT_ID object_num);</title></rect>
|
||||
<rect width="13.48" height="13.06" x="448.61" y="124.95" class="decompiled"><title>void __cdecl Lara_UseItem(GAME_OBJECT_ID object_id);</title></rect>
|
||||
<rect width="13.48" height="13.01" x="448.61" y="141.01" class="decompiled"><title>void __cdecl Inv_Ring_DoMotions(RING_INFO *ring);</title></rect>
|
||||
<rect width="13.48" height="13.01" x="448.61" y="157.03" class="known"><title>void __cdecl DartEmitterControl(int16_t item_num);</title></rect>
|
||||
<rect width="13.48" height="12.96" x="448.61" y="173.04" class="decompiled"><title>void __cdecl Output_InsertTransQuad_Sorted(int32_t x, int32_t y, int32_t width, int32_t height, int32_t z);</title></rect>
|
||||
@ -1641,7 +1641,7 @@
|
||||
<rect width="12.25" height="12.02" x="465.10" y="230.12" class="known"><title>int32_t __cdecl S_SaveGame(const void *save_data, uint32_t save_size, int32_t slot_num);</title></rect>
|
||||
<rect width="12.25" height="11.97" x="465.10" y="245.14" class="decompiled"><title>int32_t __cdecl GameStats(int32_t level_num);</title></rect>
|
||||
<rect width="12.25" height="11.91" x="465.10" y="260.11" class="decompiled"><title>int32_t __cdecl Game_Cutscene_Start(int32_t level_num);</title></rect>
|
||||
<rect width="12.25" height="11.80" x="465.10" y="275.02" class="decompiled"><title>int32_t __cdecl Inv_RemoveItem(GAME_OBJECT_ID object_num);</title></rect>
|
||||
<rect width="12.25" height="11.80" x="465.10" y="275.02" class="decompiled"><title>int32_t __cdecl Inv_RemoveItem(GAME_OBJECT_ID object_id);</title></rect>
|
||||
<rect width="12.25" height="11.80" x="465.10" y="289.83" class="decompiled"><title>int16_t __cdecl TitleSequence(void);</title></rect>
|
||||
<rect width="12.25" height="11.75" x="465.10" y="304.63" class="decompiled"><title>void __cdecl Inv_Ring_Init(RING_INFO *ring, int16_t type, INVENTORY_ITEM **list, int16_t qty, int16_t current, IMOTION_INFO *imo);</title></rect>
|
||||
<rect width="12.25" height="11.75" x="465.10" y="319.38" class="decompiled"><title>void __cdecl ScreenshotPCX(void);</title></rect>
|
||||
@ -1760,7 +1760,7 @@
|
||||
<rect width="9.54" height="9.97" x="521.63" y="162.64" class="known"><title>BOOL __cdecl S_ReloadLevelGraphics(BOOL reload_palettes, BOOL reload_tex_pages);</title></rect>
|
||||
<rect width="9.54" height="9.97" x="521.63" y="175.61" class="known"><title>void __thiscall SE_LoadBitmapResource(BITMAP_RESOURCE *bmpRsrc, LPCTSTR lpName);</title></rect>
|
||||
<rect width="9.54" height="9.84" x="521.63" y="188.59" class="known"><title>void __cdecl Splash(ITEM_INFO *item);</title></rect>
|
||||
<rect width="9.54" height="9.77" x="521.63" y="201.42" class="decompiled"><title>int32_t __cdecl Inv_GetItemOption(GAME_OBJECT_ID object_num);</title></rect>
|
||||
<rect width="9.54" height="9.77" x="521.63" y="201.42" class="decompiled"><title>int32_t __cdecl Inv_GetItemOption(GAME_OBJECT_ID object_id);</title></rect>
|
||||
<rect width="9.54" height="9.77" x="521.63" y="214.20" class="decompiled"><title>void __cdecl Gun_AimWeapon(WEAPON_INFO *winfo, LARA_ARM *arm);</title></rect>
|
||||
<rect width="9.54" height="9.71" x="521.63" y="226.97" class="decompiled"><title>void __cdecl Requester_ChangeItem(REQUEST_INFO *req, int32_t item, const char *text1, uint32_t flags1, const char *text2, uint32_t flags2);</title></rect>
|
||||
<rect width="9.54" height="9.71" x="521.63" y="239.68" class="decompiled"><title>void __cdecl Option_Compass(INVENTORY_ITEM *item);</title></rect>
|
||||
@ -1943,7 +1943,7 @@
|
||||
<rect width="7.43" height="7.03" x="578.55" y="328.40" class="known"><title>void __cdecl S_SyncPictureBufferPalette(void);</title></rect>
|
||||
<rect width="7.43" height="6.95" x="578.55" y="338.43" class="known"><title>void __cdecl S_SaveSettings(void);</title></rect>
|
||||
<rect width="7.43" height="6.87" x="578.55" y="348.38" class="decompiled"><title>BOUNDS_16 *__cdecl Item_GetBoundsAccurate(const ITEM_INFO *item);</title></rect>
|
||||
<rect width="7.43" height="6.87" x="578.55" y="358.26" class="decompiled"><title>int32_t __cdecl Item_GlobalReplace(GAME_OBJECT_ID src_object_num, GAME_OBJECT_ID dst_object_num);</title></rect>
|
||||
<rect width="7.43" height="6.87" x="578.55" y="358.26" class="decompiled"><title>int32_t __cdecl Item_GlobalReplace(GAME_OBJECT_ID src_object_id, GAME_OBJECT_ID dst_object_id);</title></rect>
|
||||
<rect width="7.43" height="6.87" x="578.55" y="368.13" class="decompiled"><title>void __cdecl Lara_State_StepRight(ITEM_INFO *item, COLL_INFO *coll);</title></rect>
|
||||
<rect width="7.23" height="7.06" x="588.98" y="206.76" class="decompiled"><title>void __cdecl Lara_State_StepLeft(ITEM_INFO *item, COLL_INFO *coll);</title></rect>
|
||||
<rect width="7.23" height="7.06" x="599.21" y="206.76" class="decompiled"><title>void __cdecl Gun_Pistols_Draw(LARA_GUN_TYPE weapon_type);</title></rect>
|
||||
@ -1961,7 +1961,7 @@
|
||||
<rect width="6.90" height="7.06" x="720.37" y="206.76" class="decompiled"><title>void __cdecl Creature_Collision(int16_t item_num, ITEM_INFO *lara_item, COLL_INFO *coll);</title></rect>
|
||||
<rect width="6.90" height="7.06" x="730.27" y="206.76" class="known"><title>void __cdecl LaraBubbles(ITEM_INFO *item);</title></rect>
|
||||
<rect width="6.82" height="7.06" x="740.18" y="206.76" class="decompiled"><title>void __cdecl Door_Collision(int16_t item_num, ITEM_INFO *lara_item, COLL_INFO *coll);</title></rect>
|
||||
<rect width="7.29" height="6.60" x="588.98" y="216.82" class="decompiled"><title>int32_t __cdecl Inv_RequestItem(GAME_OBJECT_ID object_num);</title></rect>
|
||||
<rect width="7.29" height="6.60" x="588.98" y="216.82" class="decompiled"><title>int32_t __cdecl Inv_RequestItem(GAME_OBJECT_ID object_id);</title></rect>
|
||||
<rect width="7.29" height="6.60" x="599.26" y="216.82" class="decompiled"><title>bool __cdecl Music_Init(void);</title></rect>
|
||||
<rect width="7.20" height="6.60" x="609.55" y="216.82" class="known"><title>int16_t __cdecl Knife(int32_t x, int32_t y, int32_t z, int16_t speed, PHD_ANGLE yrot, int16_t room_num);</title></rect>
|
||||
<rect width="7.20" height="6.60" x="619.75" y="216.82" class="known"><title>void __cdecl DrawHair(void);</title></rect>
|
||||
@ -1989,7 +1989,7 @@
|
||||
<rect width="6.68" height="6.52" x="588.98" y="312.84" class="known"><title>BOOL __cdecl UT_CenterWindow(HWND hWnd);</title></rect>
|
||||
<rect width="6.68" height="6.43" x="588.98" y="322.36" class="known"><title>void __cdecl UT_MemBlt(BYTE *dstBuf, DWORD dstX, DWORD dstY, DWORD width, DWORD height, DWORD dstPitch, BYTE *srcBuf, DWORD srcX, DWORD srcY, DWORD srcPitch);</title></rect>
|
||||
<rect width="6.68" height="6.26" x="588.98" y="331.79" class="decompiled"><title>int32_t __cdecl Output_VisibleZClip(const PHD_VBUF *vtx0, const PHD_VBUF *vtx1, const PHD_VBUF *vtx2);</title></rect>
|
||||
<rect width="6.68" height="6.26" x="588.98" y="341.05" class="decompiled"><title>void __cdecl Overlay_AddDisplayPickup(GAME_OBJECT_ID object_num);</title></rect>
|
||||
<rect width="6.68" height="6.26" x="588.98" y="341.05" class="decompiled"><title>void __cdecl Overlay_AddDisplayPickup(GAME_OBJECT_ID object_id);</title></rect>
|
||||
<rect width="6.68" height="6.26" x="588.98" y="350.31" class="decompiled"><title>int16_t __cdecl Effect_Create(int16_t room_num);</title></rect>
|
||||
<rect width="6.68" height="6.26" x="588.98" y="359.57" class="known"><title>void *__cdecl game_malloc(size_t alloc_size, GAME_BUFFER buf_index);</title></rect>
|
||||
<rect width="6.68" height="6.17" x="588.98" y="368.83" class="decompiled"><title>void __cdecl Output_SetFarZ(int32_t far_z);</title></rect>
|
||||
|
Before Width: | Height: | Size: 364 KiB After Width: | Height: | Size: 364 KiB |
@ -530,7 +530,7 @@ typedef struct __unaligned {
|
||||
int32_t floor;
|
||||
uint32_t touch_bits;
|
||||
uint32_t mesh_bits;
|
||||
int16_t object_num;
|
||||
int16_t object_id;
|
||||
int16_t current_anim_state;
|
||||
int16_t goal_anim_state;
|
||||
int16_t required_anim_state;
|
||||
@ -643,7 +643,7 @@ typedef struct __unaligned {
|
||||
XYZ_32 pos;
|
||||
XYZ_16 rot;
|
||||
int16_t room_num;
|
||||
int16_t object_num;
|
||||
int16_t object_id;
|
||||
int16_t next_fx;
|
||||
int16_t next_active;
|
||||
int16_t speed;
|
||||
@ -713,7 +713,7 @@ typedef struct __unaligned {
|
||||
|
||||
typedef struct __unaligned {
|
||||
char *string;
|
||||
int16_t obj_num;
|
||||
int16_t object_id;
|
||||
int16_t frames_total;
|
||||
int16_t current_frame;
|
||||
int16_t goal_frame;
|
||||
@ -3208,7 +3208,7 @@ typedef enum {
|
||||
0x00421CF0 0x0132 + void __cdecl Overlay_DrawAmmoInfo(void);
|
||||
0x00421E40 0x0015 + void __cdecl Overlay_InitialisePickUpDisplay(void);
|
||||
0x00421E60 0x00FD + void __cdecl Overlay_DrawPickups(bool pickup_state);
|
||||
0x00421F60 0x006C + void __cdecl Overlay_AddDisplayPickup(GAME_OBJECT_ID object_num);
|
||||
0x00421F60 0x006C + void __cdecl Overlay_AddDisplayPickup(GAME_OBJECT_ID object_id);
|
||||
0x00421FD0 0x007A + void __cdecl Overlay_DisplayModeInfo(char* string);
|
||||
0x00422050 0x002C + void __cdecl Overlay_DrawModeInfo(void);
|
||||
|
||||
@ -3228,12 +3228,12 @@ typedef enum {
|
||||
0x00423DB0 0x0081 + void __cdecl Inv_RingIsNotOpen(RING_INFO *ring);
|
||||
0x00423E40 0x0369 + void __cdecl Inv_RingNotActive(INVENTORY_ITEM *inv_item);
|
||||
0x004242B0 0x0032 + void __cdecl Inv_RingActive(void);
|
||||
0x004242F0 0x06BE + int32_t __cdecl Inv_AddItem(GAME_OBJECT_ID object_num);
|
||||
0x004242F0 0x06BE + int32_t __cdecl Inv_AddItem(GAME_OBJECT_ID object_id);
|
||||
0x00424B00 0x0129 + void __cdecl Inv_InsertItem(INVENTORY_ITEM *inv_item);
|
||||
0x00424C30 0x0077 + int32_t __cdecl Inv_RequestItem(GAME_OBJECT_ID object_num);
|
||||
0x00424C30 0x0077 + int32_t __cdecl Inv_RequestItem(GAME_OBJECT_ID object_id);
|
||||
0x00424CB0 0x001B + void __cdecl Inv_RemoveAllItems(void);
|
||||
0x00424CD0 0x0110 + int32_t __cdecl Inv_RemoveItem(GAME_OBJECT_ID object_num);
|
||||
0x00424DE0 0x00C1 + int32_t __cdecl Inv_GetItemOption(GAME_OBJECT_ID object_num);
|
||||
0x00424CD0 0x0110 + int32_t __cdecl Inv_RemoveItem(GAME_OBJECT_ID object_id);
|
||||
0x00424DE0 0x00C1 + int32_t __cdecl Inv_GetItemOption(GAME_OBJECT_ID object_id);
|
||||
0x00424FD0 0x0024 + void __cdecl Inv_RemoveInventoryText(void);
|
||||
0x00425000 0x010F + void __cdecl Inv_Ring_Init(RING_INFO *ring, int16_t type, INVENTORY_ITEM **list, int16_t qty, int16_t current, IMOTION_INFO *imo);
|
||||
0x00425110 0x0060 + void __cdecl Inv_Ring_GetView(RING_INFO *ring, PHD_3DPOS *viewer);
|
||||
@ -3277,7 +3277,7 @@ typedef enum {
|
||||
0x00427100 0x006F + void __cdecl Item_RemoveDrawn(int16_t item_num);
|
||||
0x00427170 0x005A + void __cdecl Item_AddActive(int16_t item_num);
|
||||
0x004271D0 0x009C + void __cdecl Item_NewRoom(int16_t item_num, int16_t room_num);
|
||||
0x00427270 0x007C + int32_t __cdecl Item_GlobalReplace(GAME_OBJECT_ID src_object_num, GAME_OBJECT_ID dst_object_num);
|
||||
0x00427270 0x007C + int32_t __cdecl Item_GlobalReplace(GAME_OBJECT_ID src_object_id, GAME_OBJECT_ID dst_object_id);
|
||||
0x004272F0 0x0030 + void __cdecl Effect_InitialiseArray(void);
|
||||
0x00427320 0x006C + int16_t __cdecl Effect_Create(int16_t room_num);
|
||||
0x00427390 0x00E3 + void __cdecl Effect_Kill(int16_t fx_num);
|
||||
@ -3468,7 +3468,7 @@ typedef enum {
|
||||
# game/laramisc.c
|
||||
0x004302E0 0x0668 + void __cdecl Lara_Control(int16_t item_num);
|
||||
0x00430970 0x02CD + void __cdecl Lara_Animate(ITEM_INFO *item);
|
||||
0x00430C70 0x013F + void __cdecl Lara_UseItem(GAME_OBJECT_ID object_num);
|
||||
0x00430C70 0x013F + void __cdecl Lara_UseItem(GAME_OBJECT_ID object_id);
|
||||
0x00430E30 0x00BA + void __cdecl Lara_CheatGetStuff(void);
|
||||
0x00430EF0 0x001B + void __cdecl Lara_ControlExtra(int16_t item_num);
|
||||
0x00430F10 0x0021 + void __cdecl Lara_InitialiseLoad(int16_t item_num);
|
||||
|
@ -1214,7 +1214,7 @@ int32_t __cdecl Game_Cutscene_Control(const int32_t nframes)
|
||||
|
||||
for (int32_t id = g_NextItemActive; id != NO_ITEM;) {
|
||||
const ITEM_INFO *const item = &g_Items[id];
|
||||
const OBJECT_INFO *obj = &g_Objects[item->object_num];
|
||||
const OBJECT_INFO *obj = &g_Objects[item->object_id];
|
||||
if (obj->control != NULL) {
|
||||
obj->control(id);
|
||||
}
|
||||
@ -1223,7 +1223,7 @@ int32_t __cdecl Game_Cutscene_Control(const int32_t nframes)
|
||||
|
||||
for (int32_t id = g_NextEffectActive; id != NO_ITEM;) {
|
||||
const FX_INFO *const fx = &g_Effects[id];
|
||||
const OBJECT_INFO *const obj = &g_Objects[fx->object_num];
|
||||
const OBJECT_INFO *const obj = &g_Objects[fx->object_id];
|
||||
if (obj->control != NULL) {
|
||||
obj->control(id);
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ int32_t __cdecl Effect_ExplodingDeath(
|
||||
const int16_t item_num, const int32_t mesh_bits, const int16_t damage)
|
||||
{
|
||||
ITEM_INFO *const item = &g_Items[item_num];
|
||||
const OBJECT_INFO *const object = &g_Objects[item->object_num];
|
||||
const OBJECT_INFO *const object = &g_Objects[item->object_id];
|
||||
|
||||
S_CalculateLight(item->pos.x, item->pos.y, item->pos.z, item->room_num);
|
||||
|
||||
@ -45,7 +45,7 @@ int32_t __cdecl Effect_ExplodingDeath(
|
||||
fx->speed = Random_GetControl() >> 8;
|
||||
fx->fall_speed = -Random_GetControl() >> 8;
|
||||
fx->counter = damage;
|
||||
fx->object_num = O_BODY_PART;
|
||||
fx->object_id = O_BODY_PART;
|
||||
fx->frame_num = object->mesh_idx;
|
||||
fx->shade = g_LsAdder - 0x300;
|
||||
}
|
||||
@ -93,7 +93,7 @@ int32_t __cdecl Effect_ExplodingDeath(
|
||||
fx->speed = Random_GetControl() >> 8;
|
||||
fx->fall_speed = -Random_GetControl() >> 8;
|
||||
fx->counter = damage;
|
||||
fx->object_num = O_BODY_PART;
|
||||
fx->object_id = O_BODY_PART;
|
||||
fx->frame_num = object->mesh_idx + i;
|
||||
fx->shade = g_LsAdder - 0x300;
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ static COMMAND_RESULT Console_Cmd_Teleport(const char *const args)
|
||||
for (int16_t item_num = 0; item_num < Item_GetTotalCount();
|
||||
item_num++) {
|
||||
const ITEM_INFO *const item = &g_Items[item_num];
|
||||
if (Object_IsObjectType(item->object_num, g_PickupObjects)
|
||||
if (Object_IsObjectType(item->object_id, g_PickupObjects)
|
||||
&& (item->status == IS_INVISIBLE
|
||||
|| item->status == IS_DEACTIVATED)) {
|
||||
continue;
|
||||
@ -177,7 +177,7 @@ static COMMAND_RESULT Console_Cmd_Teleport(const char *const args)
|
||||
|
||||
bool is_matched = false;
|
||||
for (int32_t i = 0; i < match_count; i++) {
|
||||
if (matching_objs[i] == item->object_num) {
|
||||
if (matching_objs[i] == item->object_id) {
|
||||
is_matched = true;
|
||||
break;
|
||||
}
|
||||
@ -198,12 +198,11 @@ static COMMAND_RESULT Console_Cmd_Teleport(const char *const args)
|
||||
best_item->pos.x, best_item->pos.y - STEP_L,
|
||||
best_item->pos.z)) {
|
||||
Console_Log(
|
||||
GS(OSD_POS_SET_ITEM),
|
||||
Object_GetName(best_item->object_num));
|
||||
GS(OSD_POS_SET_ITEM), Object_GetName(best_item->object_id));
|
||||
} else {
|
||||
Console_Log(
|
||||
GS(OSD_POS_SET_ITEM_FAIL),
|
||||
Object_GetName(best_item->object_num));
|
||||
Object_GetName(best_item->object_id));
|
||||
}
|
||||
return CR_SUCCESS;
|
||||
} else {
|
||||
@ -372,7 +371,7 @@ static COMMAND_RESULT Console_Cmd_Kill(const char *args)
|
||||
|
||||
bool is_matched = false;
|
||||
for (int32_t i = 0; i < match_count; i++) {
|
||||
if (matching_objs[i] == item->object_num) {
|
||||
if (matching_objs[i] == item->object_id) {
|
||||
is_matched = true;
|
||||
break;
|
||||
}
|
||||
@ -443,10 +442,10 @@ static COMMAND_RESULT Console_Cmd_GiveItem(const char *args)
|
||||
GAME_OBJECT_ID *matching_objs = Object_IdsFromName(
|
||||
args, &match_count, Console_Cmd_CanTargetObjectPickup);
|
||||
for (int32_t i = 0; i < match_count; i++) {
|
||||
const GAME_OBJECT_ID obj_id = matching_objs[i];
|
||||
if (g_Objects[obj_id].loaded) {
|
||||
Inv_AddItemNTimes(obj_id, num);
|
||||
Console_Log(GS(OSD_GIVE_ITEM), Object_GetName(obj_id));
|
||||
const GAME_OBJECT_ID object_id = matching_objs[i];
|
||||
if (g_Objects[object_id].loaded) {
|
||||
Inv_AddItemNTimes(object_id, num);
|
||||
Console_Log(GS(OSD_GIVE_ITEM), Object_GetName(object_id));
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ void __cdecl Creature_AIInfo(ITEM_INFO *const item, AI_INFO *const info)
|
||||
return;
|
||||
}
|
||||
|
||||
switch (item->object_num) {
|
||||
switch (item->object_id) {
|
||||
case O_BANDIT_1:
|
||||
case O_BANDIT_2:
|
||||
Creature_GetBaddieTarget(creature->item_num, false);
|
||||
@ -111,7 +111,7 @@ void __cdecl Creature_AIInfo(ITEM_INFO *const item, AI_INFO *const info)
|
||||
info->enemy_zone_num |= BOX_BLOCKED;
|
||||
}
|
||||
|
||||
const OBJECT_INFO *const object = &g_Objects[item->object_num];
|
||||
const OBJECT_INFO *const object = &g_Objects[item->object_id];
|
||||
const int32_t z = enemy->pos.z
|
||||
- ((object->pivot_length * Math_Cos(item->rot.y)) >> W2V_SHIFT)
|
||||
- item->pos.z;
|
||||
@ -306,7 +306,7 @@ int32_t __cdecl Creature_CheckBaddieOverlap(const int16_t item_num)
|
||||
const int32_t x = item->pos.x;
|
||||
const int32_t y = item->pos.y;
|
||||
const int32_t z = item->pos.z;
|
||||
const int32_t radius = SQUARE(g_Objects[item->object_num].radius);
|
||||
const int32_t radius = SQUARE(g_Objects[item->object_id].radius);
|
||||
|
||||
int16_t link = g_Rooms[item->room_num].item_num;
|
||||
while (link != NO_ITEM && link != item_num) {
|
||||
@ -331,12 +331,12 @@ void __cdecl Creature_Die(const int16_t item_num, const bool explode)
|
||||
{
|
||||
ITEM_INFO *const item = &g_Items[item_num];
|
||||
|
||||
if (item->object_num == O_DRAGON_FRONT) {
|
||||
if (item->object_id == O_DRAGON_FRONT) {
|
||||
item->hit_points = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (item->object_num == O_SKIDMAN) {
|
||||
if (item->object_id == O_SKIDMAN) {
|
||||
if (explode) {
|
||||
Effect_ExplodingDeath(item_num, -1, 0);
|
||||
}
|
||||
@ -355,7 +355,7 @@ void __cdecl Creature_Die(const int16_t item_num, const bool explode)
|
||||
Item_RemoveActive(item_num);
|
||||
}
|
||||
|
||||
if (g_Objects[item->object_num].intelligent) {
|
||||
if (g_Objects[item->object_id].intelligent) {
|
||||
LOT_DisableBaddieAI(item_num);
|
||||
}
|
||||
item->flags |= IF_ONE_SHOT;
|
||||
@ -365,7 +365,7 @@ void __cdecl Creature_Die(const int16_t item_num, const bool explode)
|
||||
g_PrevItemActive = item_num;
|
||||
}
|
||||
|
||||
if (g_Objects[item->object_num].intelligent) {
|
||||
if (g_Objects[item->object_id].intelligent) {
|
||||
int16_t pickup_num = item->carried_item;
|
||||
while (pickup_num != NO_ITEM) {
|
||||
ITEM_INFO *const pickup = &g_Items[pickup_num];
|
||||
@ -381,7 +381,7 @@ int32_t __cdecl Creature_Animate(
|
||||
{
|
||||
ITEM_INFO *const item = &g_Items[item_num];
|
||||
const CREATURE_INFO *const creature = item->data;
|
||||
const OBJECT_INFO *const object = &g_Objects[item->object_num];
|
||||
const OBJECT_INFO *const object = &g_Objects[item->object_id];
|
||||
if (creature == NULL) {
|
||||
return false;
|
||||
}
|
||||
@ -566,7 +566,7 @@ int32_t __cdecl Creature_Animate(
|
||||
const int32_t ceiling =
|
||||
Room_GetCeiling(sector, item->pos.x, y, item->pos.z);
|
||||
const int32_t min_y =
|
||||
item->object_num == O_SHARK ? 128 : bounds->min_y;
|
||||
item->object_id == O_SHARK ? 128 : bounds->min_y;
|
||||
if (item->pos.y + min_y + dy < ceiling) {
|
||||
if (item->pos.y + min_y < ceiling) {
|
||||
item->pos.x = old.x;
|
||||
@ -802,7 +802,7 @@ void __cdecl Creature_Kill(
|
||||
ITEM_INFO *const item, const int32_t kill_anim, const int32_t kill_state,
|
||||
const int32_t lara_kill_state)
|
||||
{
|
||||
item->anim_num = g_Objects[item->object_num].anim_idx + kill_anim;
|
||||
item->anim_num = g_Objects[item->object_id].anim_idx + kill_anim;
|
||||
item->frame_num = g_Anims[item->anim_num].frame_base;
|
||||
item->current_anim_state = kill_state;
|
||||
|
||||
@ -849,10 +849,10 @@ void __cdecl Creature_GetBaddieTarget(
|
||||
}
|
||||
|
||||
ITEM_INFO *target = &g_Items[target_item_num];
|
||||
const int16_t object_num = target->object_num;
|
||||
if (goody && object_num != O_BANDIT_1 && object_num != O_BANDIT_2) {
|
||||
const GAME_OBJECT_ID object_id = target->object_id;
|
||||
if (goody && object_id != O_BANDIT_1 && object_id != O_BANDIT_2) {
|
||||
continue;
|
||||
} else if (!goody && object_num != O_MONK_1 && object_num != O_MONK_2) {
|
||||
} else if (!goody && object_id != O_MONK_1 && object_id != O_MONK_2) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -945,12 +945,12 @@ int32_t __cdecl Creature_CanTargetEnemy(
|
||||
|
||||
bool Creature_IsEnemy(const ITEM_INFO *const item)
|
||||
{
|
||||
return Object_IsObjectType(item->object_num, g_EnemyObjects)
|
||||
return Object_IsObjectType(item->object_id, g_EnemyObjects)
|
||||
|| (g_IsMonkAngry
|
||||
&& (item->object_num == O_MONK_1 || item->object_num == O_MONK_2));
|
||||
&& (item->object_id == O_MONK_1 || item->object_id == O_MONK_2));
|
||||
}
|
||||
|
||||
bool Creature_IsAlly(const ITEM_INFO *const item)
|
||||
{
|
||||
return Object_IsObjectType(item->object_num, g_FriendObjects);
|
||||
return Object_IsObjectType(item->object_id, g_FriendObjects);
|
||||
}
|
||||
|
@ -117,12 +117,12 @@ void __cdecl Effect_NewRoom(const int16_t fx_num, const int16_t room_num)
|
||||
void __cdecl Effect_Draw(const int16_t fx_num)
|
||||
{
|
||||
const FX_INFO *const fx = &g_Effects[fx_num];
|
||||
const OBJECT_INFO *const object = &g_Objects[fx->object_num];
|
||||
const OBJECT_INFO *const object = &g_Objects[fx->object_id];
|
||||
if (!object->loaded) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (fx->object_num == O_GLOW) {
|
||||
if (fx->object_id == O_GLOW) {
|
||||
Output_DrawSprite(
|
||||
(fx->rot.y << 16) | (unsigned __int16)fx->rot.x, fx->pos.x,
|
||||
fx->pos.y, fx->pos.z, g_Objects[O_GLOW].mesh_idx, fx->shade,
|
||||
|
@ -140,7 +140,7 @@ int32_t __cdecl Game_Control(int32_t nframes, const bool demo_mode)
|
||||
while (item_num != NO_ITEM) {
|
||||
ITEM_INFO *const item = &g_Items[item_num];
|
||||
const int16_t next = item->next_active;
|
||||
const OBJECT_INFO *object = &g_Objects[item->object_num];
|
||||
const OBJECT_INFO *object = &g_Objects[item->object_id];
|
||||
if (!(item->flags & IF_KILLED) && object->control != NULL) {
|
||||
object->control(item_num);
|
||||
}
|
||||
@ -152,7 +152,7 @@ int32_t __cdecl Game_Control(int32_t nframes, const bool demo_mode)
|
||||
int16_t fx_num = g_NextEffectActive;
|
||||
while (fx_num != NO_ITEM) {
|
||||
FX_INFO *const fx = &g_Effects[fx_num];
|
||||
const OBJECT_INFO *const object = &g_Objects[fx->object_num];
|
||||
const OBJECT_INFO *const object = &g_Objects[fx->object_id];
|
||||
const int32_t next = fx->next_active;
|
||||
if (object->control != NULL) {
|
||||
object->control(fx_num);
|
||||
|
@ -325,7 +325,7 @@ void __cdecl Gun_HitTarget(
|
||||
}
|
||||
|
||||
if (!g_IsMonkAngry
|
||||
&& (item->object_num == O_MONK_1 || item->object_num == O_MONK_2)) {
|
||||
&& (item->object_id == O_MONK_1 || item->object_id == O_MONK_2)) {
|
||||
CREATURE_INFO *const creature = item->data;
|
||||
creature->flags += damage;
|
||||
if ((creature->flags & 0xFFF) > MONK_FRIENDLY_FIRE_THRESHOLD
|
||||
@ -340,7 +340,7 @@ void __cdecl Gun_SmashItem(
|
||||
{
|
||||
ITEM_INFO *const item = &g_Items[item_num];
|
||||
|
||||
switch (item->object_num) {
|
||||
switch (item->object_id) {
|
||||
case O_WINDOW_1:
|
||||
SmashWindow(item_num);
|
||||
break;
|
||||
|
@ -146,7 +146,7 @@ void __cdecl Gun_Rifle_FireHarpoon(void)
|
||||
}
|
||||
|
||||
ITEM_INFO *const item = &g_Items[item_num];
|
||||
item->object_num = O_HARPOON_BOLT;
|
||||
item->object_id = O_HARPOON_BOLT;
|
||||
item->room_num = g_LaraItem->room_num;
|
||||
|
||||
XYZ_32 offset = {
|
||||
@ -200,7 +200,7 @@ void __cdecl Gun_Rifle_FireGrenade(void)
|
||||
}
|
||||
|
||||
ITEM_INFO *const item = &g_Items[item_num];
|
||||
item->object_num = O_GRENADE;
|
||||
item->object_id = O_GRENADE;
|
||||
item->room_num = g_LaraItem->room_num;
|
||||
|
||||
XYZ_32 offset = {
|
||||
@ -235,19 +235,19 @@ void __cdecl Gun_Rifle_Draw(const LARA_GUN_TYPE weapon_type)
|
||||
} else {
|
||||
g_Lara.weapon_item = Item_Create();
|
||||
item = &g_Items[g_Lara.weapon_item];
|
||||
item->object_num = Gun_GetWeaponAnim(weapon_type);
|
||||
item->object_id = Gun_GetWeaponAnim(weapon_type);
|
||||
if (weapon_type == LGT_GRENADE) {
|
||||
item->anim_num = g_Objects[O_LARA_GRENADE].anim_idx;
|
||||
} else {
|
||||
item->anim_num = g_Objects[item->object_num].anim_idx + 1;
|
||||
item->anim_num = g_Objects[item->object_id].anim_idx + 1;
|
||||
}
|
||||
item->frame_num = g_Anims[item->anim_num].frame_base;
|
||||
item->goal_anim_state = LA_G_DRAW;
|
||||
item->current_anim_state = LA_G_DRAW;
|
||||
item->status = IS_ACTIVE;
|
||||
item->room_num = NO_ROOM;
|
||||
g_Lara.right_arm.frame_base = g_Objects[item->object_num].frame_base;
|
||||
g_Lara.left_arm.frame_base = g_Objects[item->object_num].frame_base;
|
||||
g_Lara.right_arm.frame_base = g_Objects[item->object_id].frame_base;
|
||||
g_Lara.left_arm.frame_base = g_Objects[item->object_id].frame_base;
|
||||
}
|
||||
Item_Animate(item);
|
||||
|
||||
|
@ -49,7 +49,7 @@ int32_t __cdecl Inv_AddItem(const GAME_OBJECT_ID object_id)
|
||||
|
||||
for (int32_t i = 0; i < g_Inv_MainObjectsCount; i++) {
|
||||
const INVENTORY_ITEM *const inv_item = g_Inv_MainList[i];
|
||||
if (inv_item->obj_num == inv_object_id) {
|
||||
if (inv_item->object_id == inv_object_id) {
|
||||
const int32_t qty = object_id == O_FLARES_ITEM ? FLARE_AMMO_QTY : 1;
|
||||
g_Inv_MainQtys[i] += qty;
|
||||
return true;
|
||||
@ -58,7 +58,7 @@ int32_t __cdecl Inv_AddItem(const GAME_OBJECT_ID object_id)
|
||||
|
||||
for (int32_t i = 0; i < g_Inv_KeyObjectsCount; i++) {
|
||||
const INVENTORY_ITEM *const inv_item = g_Inv_KeysList[i];
|
||||
if (inv_item->obj_num == inv_object_id) {
|
||||
if (inv_item->object_id == inv_object_id) {
|
||||
g_Inv_KeysQtys[i]++;
|
||||
return true;
|
||||
}
|
||||
@ -293,25 +293,25 @@ int32_t __cdecl Inv_AddItem(const GAME_OBJECT_ID object_id)
|
||||
}
|
||||
}
|
||||
|
||||
void Inv_AddItemNTimes(GAME_OBJECT_ID object_num, int32_t qty)
|
||||
void Inv_AddItemNTimes(GAME_OBJECT_ID object_id, int32_t qty)
|
||||
{
|
||||
for (int32_t i = 0; i < qty; i++) {
|
||||
Inv_AddItem(object_num);
|
||||
Inv_AddItem(object_id);
|
||||
}
|
||||
}
|
||||
|
||||
int32_t __cdecl Inv_RequestItem(const GAME_OBJECT_ID object_num)
|
||||
int32_t __cdecl Inv_RequestItem(const GAME_OBJECT_ID object_id)
|
||||
{
|
||||
const GAME_OBJECT_ID inv_object_id = Inv_GetItemOption(object_num);
|
||||
const GAME_OBJECT_ID inv_object_id = Inv_GetItemOption(object_id);
|
||||
|
||||
for (int32_t i = 0; i < g_Inv_MainObjectsCount; i++) {
|
||||
if (g_Inv_MainList[i]->obj_num == inv_object_id) {
|
||||
if (g_Inv_MainList[i]->object_id == inv_object_id) {
|
||||
return g_Inv_MainQtys[i];
|
||||
}
|
||||
}
|
||||
|
||||
for (int32_t i = 0; i < g_Inv_KeyObjectsCount; i++) {
|
||||
if (g_Inv_KeysList[i]->obj_num == inv_object_id) {
|
||||
if (g_Inv_KeysList[i]->object_id == inv_object_id) {
|
||||
return g_Inv_KeysQtys[i];
|
||||
}
|
||||
}
|
||||
@ -332,7 +332,7 @@ int32_t Inv_RemoveItem(const GAME_OBJECT_ID object_id)
|
||||
const GAME_OBJECT_ID inv_object_id = Inv_GetItemOption(object_id);
|
||||
|
||||
for (int32_t i = 0; i < g_Inv_MainObjectsCount; i++) {
|
||||
if (g_Inv_MainList[i]->obj_num == inv_object_id) {
|
||||
if (g_Inv_MainList[i]->object_id == inv_object_id) {
|
||||
g_Inv_MainQtys[i]--;
|
||||
if (g_Inv_MainQtys[i] > 0) {
|
||||
return true;
|
||||
@ -346,7 +346,7 @@ int32_t Inv_RemoveItem(const GAME_OBJECT_ID object_id)
|
||||
}
|
||||
|
||||
for (int32_t i = 0; i < g_Inv_KeyObjectsCount; i++) {
|
||||
if (g_Inv_KeysList[i]->obj_num == inv_object_id) {
|
||||
if (g_Inv_KeysList[i]->object_id == inv_object_id) {
|
||||
g_Inv_KeysQtys[i]--;
|
||||
if (g_Inv_KeysQtys[i] > 0) {
|
||||
return true;
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
void __cdecl Inv_InsertItem(INVENTORY_ITEM *inv_item);
|
||||
int32_t __cdecl Inv_AddItem(GAME_OBJECT_ID object_id);
|
||||
void Inv_AddItemNTimes(GAME_OBJECT_ID object_num, int32_t qty);
|
||||
int32_t __cdecl Inv_RequestItem(GAME_OBJECT_ID object_num);
|
||||
void Inv_AddItemNTimes(GAME_OBJECT_ID object_id, int32_t qty);
|
||||
int32_t __cdecl Inv_RequestItem(GAME_OBJECT_ID object_id);
|
||||
void __cdecl Inv_RemoveAllItems(void);
|
||||
int32_t __cdecl Inv_RemoveItem(GAME_OBJECT_ID object_num);
|
||||
int32_t __cdecl Inv_RemoveItem(GAME_OBJECT_ID object_id);
|
||||
|
@ -111,8 +111,8 @@ void __cdecl Inv_Construct(void)
|
||||
inv_item->y_rot = 0;
|
||||
inv_item->y_trans = 0;
|
||||
inv_item->z_trans = 0;
|
||||
if (inv_item->obj_num == O_PASSPORT_OPTION) {
|
||||
inv_item->obj_num = O_PASSPORT_CLOSED;
|
||||
if (inv_item->object_id == O_PASSPORT_OPTION) {
|
||||
inv_item->object_id = O_PASSPORT_CLOSED;
|
||||
}
|
||||
}
|
||||
|
||||
@ -126,8 +126,8 @@ void __cdecl Inv_Construct(void)
|
||||
inv_item->y_rot = 0;
|
||||
inv_item->y_trans = 0;
|
||||
inv_item->z_trans = 0;
|
||||
if (inv_item->obj_num == O_PASSPORT_OPTION) {
|
||||
inv_item->obj_num = O_PASSPORT_CLOSED;
|
||||
if (inv_item->object_id == O_PASSPORT_OPTION) {
|
||||
inv_item->object_id = O_PASSPORT_CLOSED;
|
||||
}
|
||||
}
|
||||
|
||||
@ -451,7 +451,7 @@ int32_t __cdecl Inv_Display(int32_t inventory_mode)
|
||||
g_Input = 0;
|
||||
g_InputDB = 0;
|
||||
|
||||
switch (inv_item->obj_num) {
|
||||
switch (inv_item->object_id) {
|
||||
case O_COMPASS_OPTION:
|
||||
Sound_Effect(SFX_MENU_STOPWATCH, 0, SPM_ALWAYS);
|
||||
break;
|
||||
@ -612,8 +612,8 @@ int32_t __cdecl Inv_Display(int32_t inventory_mode)
|
||||
|
||||
case RNG_SELECTED: {
|
||||
INVENTORY_ITEM *inv_item = ring.list[ring.current_object];
|
||||
if (inv_item->obj_num == O_PASSPORT_CLOSED) {
|
||||
inv_item->obj_num = O_PASSPORT_OPTION;
|
||||
if (inv_item->object_id == O_PASSPORT_CLOSED) {
|
||||
inv_item->object_id = O_PASSPORT_OPTION;
|
||||
}
|
||||
|
||||
bool busy = false;
|
||||
@ -644,17 +644,17 @@ int32_t __cdecl Inv_Display(int32_t inventory_mode)
|
||||
|
||||
if ((g_InputDB & IN_SELECT) != 0) {
|
||||
inv_item->sprite_list = NULL;
|
||||
g_Inv_Chosen = inv_item->obj_num;
|
||||
g_Inv_Chosen = inv_item->object_id;
|
||||
if (ring.type != RT_MAIN) {
|
||||
g_Inv_OptionCurrent = ring.current_object;
|
||||
} else {
|
||||
g_Inv_MainCurrent = ring.current_object;
|
||||
}
|
||||
if (g_Inv_Mode == INV_TITLE_MODE
|
||||
&& (inv_item->obj_num == O_DETAIL_OPTION
|
||||
|| inv_item->obj_num == O_SOUND_OPTION
|
||||
|| inv_item->obj_num == O_CONTROL_OPTION
|
||||
|| inv_item->obj_num == O_GAMMA_OPTION)) {
|
||||
&& (inv_item->object_id == O_DETAIL_OPTION
|
||||
|| inv_item->object_id == O_SOUND_OPTION
|
||||
|| inv_item->object_id == O_CONTROL_OPTION
|
||||
|| inv_item->object_id == O_GAMMA_OPTION)) {
|
||||
Inv_Ring_MotionSetup(
|
||||
&ring, RNG_CLOSING_ITEM, RNG_DESELECT, 0);
|
||||
} else {
|
||||
@ -682,8 +682,8 @@ int32_t __cdecl Inv_Display(int32_t inventory_mode)
|
||||
INVENTORY_ITEM *inv_item = ring.list[ring.current_object];
|
||||
for (int32_t frame = 0; frame < g_Inv_NFrames; frame++) {
|
||||
if (!Inv_AnimateInventoryItem(inv_item)) {
|
||||
if (inv_item->obj_num == O_PASSPORT_OPTION) {
|
||||
inv_item->obj_num = O_PASSPORT_CLOSED;
|
||||
if (inv_item->object_id == O_PASSPORT_OPTION) {
|
||||
inv_item->object_id = O_PASSPORT_CLOSED;
|
||||
inv_item->current_frame = 0;
|
||||
}
|
||||
|
||||
@ -774,7 +774,7 @@ int32_t __cdecl Inv_Display(int32_t inventory_mode)
|
||||
|
||||
void __cdecl Inv_SelectMeshes(INVENTORY_ITEM *const inv_item)
|
||||
{
|
||||
switch (inv_item->obj_num) {
|
||||
switch (inv_item->object_id) {
|
||||
case O_PASSPORT_OPTION:
|
||||
if (inv_item->current_frame < 4) {
|
||||
inv_item->meshes_drawn = PM_COMMON | PM_IN_FRONT;
|
||||
@ -837,7 +837,7 @@ void __cdecl Inv_DrawInventoryItem(INVENTORY_ITEM *const inv_item)
|
||||
int32_t minutes;
|
||||
int32_t hours;
|
||||
int32_t seconds;
|
||||
if (inv_item->obj_num == O_COMPASS_OPTION) {
|
||||
if (inv_item->object_id == O_COMPASS_OPTION) {
|
||||
const int32_t total_seconds =
|
||||
g_SaveGame.statistics.timer / FRAMES_PER_SECOND;
|
||||
hours = (total_seconds % 43200) * PHD_DEGREE * -360 / 43200;
|
||||
@ -851,7 +851,7 @@ void __cdecl Inv_DrawInventoryItem(INVENTORY_ITEM *const inv_item)
|
||||
|
||||
Matrix_TranslateRel(0, inv_item->y_trans, inv_item->z_trans);
|
||||
Matrix_RotYXZ(inv_item->y_rot, inv_item->x_rot, 0);
|
||||
const OBJECT_INFO *const obj = &g_Objects[inv_item->obj_num];
|
||||
const OBJECT_INFO *const obj = &g_Objects[inv_item->object_id];
|
||||
if ((obj->flags & 1) == 0) {
|
||||
return;
|
||||
}
|
||||
@ -944,7 +944,7 @@ void __cdecl Inv_DrawInventoryItem(INVENTORY_ITEM *const inv_item)
|
||||
Matrix_RotYXZsuperpack(&rot, 0);
|
||||
bone += 4;
|
||||
|
||||
if (inv_item->obj_num == O_COMPASS_OPTION) {
|
||||
if (inv_item->object_id == O_COMPASS_OPTION) {
|
||||
if (mesh_idx == 6) {
|
||||
Matrix_RotZ(seconds);
|
||||
const int32_t tmp = inv_item->reserved[0];
|
||||
@ -1096,7 +1096,7 @@ void __cdecl Inv_RingIsNotOpen(RING_INFO *const ring)
|
||||
void __cdecl Inv_RingNotActive(const INVENTORY_ITEM *const inv_item)
|
||||
{
|
||||
if (g_Inv_ItemText[0] == NULL) {
|
||||
switch (inv_item->obj_num) {
|
||||
switch (inv_item->object_id) {
|
||||
case O_PASSPORT_OPTION:
|
||||
break;
|
||||
case O_PUZZLE_OPTION_1:
|
||||
@ -1150,8 +1150,8 @@ void __cdecl Inv_RingNotActive(const INVENTORY_ITEM *const inv_item)
|
||||
}
|
||||
}
|
||||
|
||||
const int32_t qty = Inv_RequestItem(inv_item->obj_num);
|
||||
switch (inv_item->obj_num) {
|
||||
const int32_t qty = Inv_RequestItem(inv_item->object_id);
|
||||
switch (inv_item->object_id) {
|
||||
case O_SHOTGUN_OPTION:
|
||||
Inv_ShowAmmoQuantity(
|
||||
"%5d", g_Lara.shotgun_ammo.ammo / SHOTGUN_AMMO_CLIP);
|
||||
|
@ -106,7 +106,7 @@ void __cdecl Item_Kill(const int16_t item_num)
|
||||
void __cdecl Item_Initialise(const int16_t item_num)
|
||||
{
|
||||
ITEM_INFO *const item = &g_Items[item_num];
|
||||
item->anim_num = g_Objects[item->object_num].anim_idx;
|
||||
item->anim_num = g_Objects[item->object_id].anim_idx;
|
||||
item->frame_num = g_Anims[item->anim_num].frame_base;
|
||||
item->goal_anim_state = g_Anims[item->anim_num].current_anim_state;
|
||||
item->current_anim_state = item->goal_anim_state;
|
||||
@ -115,7 +115,7 @@ void __cdecl Item_Initialise(const int16_t item_num)
|
||||
item->rot.z = 0;
|
||||
item->speed = 0;
|
||||
item->fall_speed = 0;
|
||||
item->hit_points = g_Objects[item->object_num].hit_points;
|
||||
item->hit_points = g_Objects[item->object_id].hit_points;
|
||||
item->timer = 0;
|
||||
item->mesh_bits = 0xFFFFFFFF;
|
||||
item->touch_bits = 0;
|
||||
@ -132,7 +132,7 @@ void __cdecl Item_Initialise(const int16_t item_num)
|
||||
if ((item->flags & IF_INVISIBLE) != 0) {
|
||||
item->status = IS_INVISIBLE;
|
||||
item->flags &= ~IF_INVISIBLE;
|
||||
} else if (g_Objects[item->object_num].intelligent) {
|
||||
} else if (g_Objects[item->object_id].intelligent) {
|
||||
item->status = IS_INVISIBLE;
|
||||
}
|
||||
|
||||
@ -161,8 +161,8 @@ void __cdecl Item_Initialise(const int16_t item_num)
|
||||
item->hit_points *= 2;
|
||||
}
|
||||
|
||||
if (g_Objects[item->object_num].initialise != NULL) {
|
||||
g_Objects[item->object_num].initialise(item_num);
|
||||
if (g_Objects[item->object_id].initialise != NULL) {
|
||||
g_Objects[item->object_id].initialise(item_num);
|
||||
}
|
||||
}
|
||||
|
||||
@ -215,7 +215,7 @@ void __cdecl Item_RemoveDrawn(const int16_t item_num)
|
||||
void __cdecl Item_AddActive(const int16_t item_num)
|
||||
{
|
||||
ITEM_INFO *const item = &g_Items[item_num];
|
||||
if (g_Objects[item->object_num].control == NULL) {
|
||||
if (g_Objects[item->object_id].control == NULL) {
|
||||
item->status = IS_INACTIVE;
|
||||
return;
|
||||
}
|
||||
@ -258,7 +258,7 @@ void __cdecl Item_NewRoom(const int16_t item_num, const int16_t room_num)
|
||||
}
|
||||
|
||||
int32_t __cdecl Item_GlobalReplace(
|
||||
const int32_t src_object_num, const int32_t dst_object_num)
|
||||
const GAME_OBJECT_ID src_object_id, const GAME_OBJECT_ID dst_object_id)
|
||||
{
|
||||
int32_t changed = 0;
|
||||
|
||||
@ -266,8 +266,8 @@ int32_t __cdecl Item_GlobalReplace(
|
||||
int16_t j = g_Rooms[i].item_num;
|
||||
while (j != NO_ITEM) {
|
||||
ITEM_INFO *const item = &g_Items[j];
|
||||
if (item->object_num == src_object_num) {
|
||||
item->object_num = dst_object_num;
|
||||
if (item->object_id == src_object_id) {
|
||||
item->object_id = dst_object_id;
|
||||
changed++;
|
||||
}
|
||||
j = item->next_item;
|
||||
@ -293,7 +293,7 @@ void __cdecl Item_ClearKilled(void)
|
||||
|
||||
bool Item_IsSmashable(const ITEM_INFO *item)
|
||||
{
|
||||
return (item->object_num == O_WINDOW_1 || item->object_num == O_BELL);
|
||||
return (item->object_id == O_WINDOW_1 || item->object_id == O_BELL);
|
||||
}
|
||||
|
||||
void __cdecl Item_ShiftCol(ITEM_INFO *const item, COLL_INFO *const coll)
|
||||
@ -533,7 +533,7 @@ void __cdecl Item_Animate(ITEM_INFO *const item)
|
||||
break;
|
||||
}
|
||||
|
||||
if (g_Objects[item->object_num].water_creature) {
|
||||
if (g_Objects[item->object_id].water_creature) {
|
||||
Sound_Effect(sound_id, &item->pos, SPM_UNDERWATER);
|
||||
} else if (item->room_num == NO_ROOM) {
|
||||
item->pos.x = g_LaraItem->pos.x;
|
||||
@ -541,8 +541,8 @@ void __cdecl Item_Animate(ITEM_INFO *const item)
|
||||
item->pos.z = g_LaraItem->pos.z;
|
||||
Sound_Effect(
|
||||
sound_id, &item->pos,
|
||||
item->object_num == O_LARA_HARPOON ? SPM_ALWAYS
|
||||
: SPM_NORMAL);
|
||||
item->object_id == O_LARA_HARPOON ? SPM_ALWAYS
|
||||
: SPM_NORMAL);
|
||||
} else if (g_Rooms[item->room_num].flags & RF_UNDERWATER) {
|
||||
if (type == ACE_ALL || type == ACE_WATER) {
|
||||
Sound_Effect(sound_id, &item->pos, SPM_NORMAL);
|
||||
|
@ -12,7 +12,7 @@ void __cdecl Item_RemoveDrawn(int16_t item_num);
|
||||
void __cdecl Item_AddActive(int16_t item_num);
|
||||
void __cdecl Item_NewRoom(int16_t item_num, int16_t room_num);
|
||||
int32_t __cdecl Item_GlobalReplace(
|
||||
int32_t src_object_num, int32_t dst_object_num);
|
||||
GAME_OBJECT_ID src_object_id, GAME_OBJECT_ID dst_object_id);
|
||||
void __cdecl Item_ClearKilled(void);
|
||||
void __cdecl Item_ShiftCol(ITEM_INFO *item, COLL_INFO *coll);
|
||||
void __cdecl Item_UpdateRoom(ITEM_INFO *item, int32_t height);
|
||||
|
@ -155,8 +155,8 @@ bool Lara_Cheat_OpenNearestDoor(void)
|
||||
const int32_t max_dist = SQUARE((WALL_L * 2) >> shift);
|
||||
for (int item_num = 0; item_num < g_LevelItemCount; item_num++) {
|
||||
ITEM_INFO *const item = &g_Items[item_num];
|
||||
if (!Object_IsObjectType(item->object_num, g_DoorObjects)
|
||||
&& !Object_IsObjectType(item->object_num, g_TrapdoorObjects)) {
|
||||
if (!Object_IsObjectType(item->object_id, g_DoorObjects)
|
||||
&& !Object_IsObjectType(item->object_id, g_TrapdoorObjects)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -367,7 +367,7 @@ bool Lara_Cheat_Teleport(int32_t x, int32_t y, int32_t z)
|
||||
bool Lara_Cheat_KillEnemy(const int16_t item_num)
|
||||
{
|
||||
ITEM_INFO *const item = &g_Items[item_num];
|
||||
if ((item->hit_points == DONT_TARGET && item->object_num != O_WINSTON)) {
|
||||
if ((item->hit_points == DONT_TARGET && item->object_id != O_WINSTON)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ void __cdecl Lara_HandleAboveWater(ITEM_INFO *const item, COLL_INFO *const coll)
|
||||
g_Lara.look = 1;
|
||||
|
||||
if (g_Lara.skidoo != NO_ITEM) {
|
||||
if (g_Items[g_Lara.skidoo].object_num == O_SKIDOO_FAST) {
|
||||
if (g_Items[g_Lara.skidoo].object_id == O_SKIDOO_FAST) {
|
||||
if (SkidooControl()) {
|
||||
return;
|
||||
}
|
||||
@ -632,11 +632,11 @@ void __cdecl Lara_Animate(ITEM_INFO *const item)
|
||||
item->pos.z += (item->speed * Math_Cos(g_Lara.move_angle)) >> W2V_SHIFT;
|
||||
}
|
||||
|
||||
void __cdecl Lara_UseItem(const GAME_OBJECT_ID object_num)
|
||||
void __cdecl Lara_UseItem(const GAME_OBJECT_ID object_id)
|
||||
{
|
||||
ITEM_INFO *const item = g_LaraItem;
|
||||
|
||||
switch (object_num) {
|
||||
switch (object_id) {
|
||||
case O_PISTOL_ITEM:
|
||||
case O_PISTOL_OPTION:
|
||||
g_Lara.request_gun_type = LGT_PISTOLS;
|
||||
@ -912,22 +912,22 @@ void __cdecl Lara_InitialiseMeshes(const int32_t level_num)
|
||||
|
||||
const START_INFO *const start = &g_SaveGame.start[level_num];
|
||||
|
||||
GAME_OBJECT_ID holster_obj_num = NO_OBJECT;
|
||||
GAME_OBJECT_ID holster_object_id = NO_OBJECT;
|
||||
if (start->gun_type != LGT_UNARMED) {
|
||||
if (start->gun_type == LGT_MAGNUMS) {
|
||||
holster_obj_num = O_LARA_MAGNUMS;
|
||||
holster_object_id = O_LARA_MAGNUMS;
|
||||
} else if (start->gun_type == LGT_UZIS) {
|
||||
holster_obj_num = O_LARA_UZIS;
|
||||
holster_object_id = O_LARA_UZIS;
|
||||
} else {
|
||||
holster_obj_num = O_LARA_PISTOLS;
|
||||
holster_object_id = O_LARA_PISTOLS;
|
||||
}
|
||||
}
|
||||
|
||||
if (holster_obj_num != NO_OBJECT) {
|
||||
if (holster_object_id != NO_OBJECT) {
|
||||
g_Lara.mesh_ptrs[LM_THIGH_L] =
|
||||
g_Meshes[g_Objects[holster_obj_num].mesh_idx + LM_THIGH_L];
|
||||
g_Meshes[g_Objects[holster_object_id].mesh_idx + LM_THIGH_L];
|
||||
g_Lara.mesh_ptrs[LM_THIGH_R] =
|
||||
g_Meshes[g_Objects[holster_obj_num].mesh_idx + LM_THIGH_R];
|
||||
g_Meshes[g_Objects[holster_object_id].mesh_idx + LM_THIGH_R];
|
||||
}
|
||||
|
||||
if (start->gun_type == LGT_FLARE) {
|
||||
@ -969,7 +969,7 @@ void Lara_GetOffVehicle(void)
|
||||
{
|
||||
if (g_Lara.skidoo != NO_ITEM) {
|
||||
ITEM_INFO *const vehicle = &g_Items[g_Lara.skidoo];
|
||||
vehicle->anim_num = g_Objects[vehicle->object_num].anim_idx;
|
||||
vehicle->anim_num = g_Objects[vehicle->object_id].anim_idx;
|
||||
vehicle->frame_num = g_Anims[vehicle->anim_num].frame_base;
|
||||
g_Lara.skidoo = NO_ITEM;
|
||||
|
||||
|
@ -13,7 +13,7 @@ void __cdecl Lara_ControlExtra(int16_t item_num);
|
||||
|
||||
void __cdecl Lara_Animate(ITEM_INFO *item);
|
||||
|
||||
void __cdecl Lara_UseItem(GAME_OBJECT_ID object_num);
|
||||
void __cdecl Lara_UseItem(GAME_OBJECT_ID object_id);
|
||||
|
||||
void __cdecl Lara_InitialiseLoad(int16_t item_num);
|
||||
|
||||
|
@ -32,7 +32,7 @@ void __cdecl Lara_Draw(const ITEM_INFO *const item)
|
||||
}
|
||||
}
|
||||
|
||||
const OBJECT_INFO *const object = &g_Objects[item->object_num];
|
||||
const OBJECT_INFO *const object = &g_Objects[item->object_id];
|
||||
if (g_Lara.hit_direction < 0) {
|
||||
frame = frames[0];
|
||||
} else {
|
||||
@ -345,7 +345,7 @@ void __cdecl Lara_Draw_I(
|
||||
const ITEM_INFO *const item, const FRAME_INFO *const frame1,
|
||||
const FRAME_INFO *const frame2, const int32_t frac, const int32_t rate)
|
||||
{
|
||||
const OBJECT_INFO *const object = &g_Objects[item->object_num];
|
||||
const OBJECT_INFO *const object = &g_Objects[item->object_id];
|
||||
const BOUNDS_16 *const bounds = Item_GetBoundsAccurate(item);
|
||||
|
||||
if (g_Lara.skidoo == NO_ITEM) {
|
||||
|
@ -856,7 +856,7 @@ void __cdecl Lara_GetJointAbsPosition(XYZ_32 *vec, int32_t joint)
|
||||
}
|
||||
|
||||
const FRAME_INFO *frame_ptr = NULL;
|
||||
const OBJECT_INFO *obj = &g_Objects[g_LaraItem->object_num];
|
||||
const OBJECT_INFO *obj = &g_Objects[g_LaraItem->object_id];
|
||||
if (g_Lara.hit_direction >= 0) {
|
||||
LARA_ANIMATION anim_num;
|
||||
switch (g_Lara.hit_direction) {
|
||||
@ -951,7 +951,7 @@ void __cdecl Lara_GetJointAbsPosition_I(
|
||||
ITEM_INFO *item, XYZ_32 *vec, FRAME_INFO *frame1, FRAME_INFO *frame2,
|
||||
int32_t frac, int32_t rate)
|
||||
{
|
||||
const OBJECT_INFO *obj = &g_Objects[item->object_num];
|
||||
const OBJECT_INFO *obj = &g_Objects[item->object_id];
|
||||
|
||||
Matrix_PushUnit();
|
||||
g_MatrixPtr->_03 = 0;
|
||||
@ -1066,7 +1066,7 @@ void __cdecl Lara_BaddieCollision(ITEM_INFO *lara_item, COLL_INFO *coll)
|
||||
const int16_t next_item_num = item->next_item;
|
||||
|
||||
if (item->collidable && item->status != IS_INVISIBLE) {
|
||||
const OBJECT_INFO *const object = &g_Objects[item->object_num];
|
||||
const OBJECT_INFO *const object = &g_Objects[item->object_id];
|
||||
if (object->collision) {
|
||||
// clang-format off
|
||||
const XYZ_32 d = {
|
||||
@ -1200,7 +1200,7 @@ int32_t __cdecl Lara_MovePosition(
|
||||
.z = item->pos.z + shift.z,
|
||||
};
|
||||
|
||||
if (item->object_num == O_FLARE_ITEM) {
|
||||
if (item->object_id == O_FLARE_ITEM) {
|
||||
int16_t room_num = lara_item->room_num;
|
||||
const SECTOR_INFO *const sector =
|
||||
Room_GetSector(new_pos.x, new_pos.y, new_pos.z, &room_num);
|
||||
|
@ -347,8 +347,8 @@ static void __cdecl Level_LoadObjects(VFILE *const file)
|
||||
const int32_t num_objects = VFile_ReadS32(file);
|
||||
LOG_INFO("objects: %d", num_objects);
|
||||
for (int32_t i = 0; i < num_objects; i++) {
|
||||
const GAME_OBJECT_ID object_num = VFile_ReadS32(file);
|
||||
OBJECT_INFO *const object = &g_Objects[object_num];
|
||||
const GAME_OBJECT_ID object_id = VFile_ReadS32(file);
|
||||
OBJECT_INFO *const object = &g_Objects[object_id];
|
||||
object->mesh_count = VFile_ReadS16(file);
|
||||
object->mesh_idx = VFile_ReadS16(file);
|
||||
object->bone_idx = VFile_ReadS32(file);
|
||||
@ -484,7 +484,7 @@ static void __cdecl Level_LoadItems(VFILE *const file)
|
||||
|
||||
for (int32_t i = 0; i < num_items; i++) {
|
||||
ITEM_INFO *const item = &g_Items[i];
|
||||
item->object_num = VFile_ReadS16(file);
|
||||
item->object_id = VFile_ReadS16(file);
|
||||
item->room_num = VFile_ReadS16(file);
|
||||
item->pos.x = VFile_ReadS32(file);
|
||||
item->pos.y = VFile_ReadS32(file);
|
||||
@ -493,9 +493,9 @@ static void __cdecl Level_LoadItems(VFILE *const file)
|
||||
item->shade1 = VFile_ReadS16(file);
|
||||
item->shade2 = VFile_ReadS16(file);
|
||||
item->flags = VFile_ReadS16(file);
|
||||
if (item->object_num < 0 || item->object_num >= O_NUMBER_OF) {
|
||||
if (item->object_id < 0 || item->object_id >= O_NUMBER_OF) {
|
||||
Shell_ExitSystemFmt(
|
||||
"Bad object number (%d) on item %d", item->object_num, i);
|
||||
"Bad object number (%d) on item %d", item->object_id, i);
|
||||
goto finish;
|
||||
}
|
||||
Item_Initialise(i);
|
||||
|
@ -121,7 +121,7 @@ void __cdecl LOT_InitialiseSlot(const int16_t item_num, const int32_t slot)
|
||||
creature->lot.block_mask = BOX_BLOCKED;
|
||||
creature->lot.fly = 0;
|
||||
|
||||
switch (item->object_num) {
|
||||
switch (item->object_id) {
|
||||
case O_LARA:
|
||||
creature->lot.step = WALL_L * 20;
|
||||
creature->lot.drop = -WALL_L * 20;
|
||||
@ -137,7 +137,7 @@ void __cdecl LOT_InitialiseSlot(const int16_t item_num, const int32_t slot)
|
||||
creature->lot.step = WALL_L * 20;
|
||||
creature->lot.drop = -WALL_L * 20;
|
||||
creature->lot.fly = STEP_L / 16;
|
||||
if (item->object_num == O_SHARK) {
|
||||
if (item->object_id == O_SHARK) {
|
||||
creature->lot.block_mask = BOX_BLOCKABLE;
|
||||
}
|
||||
break;
|
||||
|
@ -40,7 +40,7 @@ void __cdecl Bird_Initialise(const int16_t item_num)
|
||||
{
|
||||
Creature_Initialise(item_num);
|
||||
ITEM_INFO *const item = &g_Items[item_num];
|
||||
if (item->object_num == O_CROW) {
|
||||
if (item->object_id == O_CROW) {
|
||||
item->anim_num = g_Objects[O_CROW].anim_idx + CROW_START_ANIM;
|
||||
item->frame_num = g_Anims[item->anim_num].frame_base;
|
||||
item->goal_anim_state = BIRD_ANIM_EAT;
|
||||
@ -78,7 +78,7 @@ void __cdecl Bird_Control(const int16_t item_num)
|
||||
break;
|
||||
|
||||
default:
|
||||
if (item->object_num == O_CROW) {
|
||||
if (item->object_id == O_CROW) {
|
||||
item->anim_num = g_Objects[O_CROW].anim_idx + CROW_DIE_ANIM;
|
||||
} else {
|
||||
item->anim_num = g_Objects[O_EAGLE].anim_idx + BIRD_DIE_ANIM;
|
||||
@ -134,7 +134,7 @@ void __cdecl Bird_Control(const int16_t item_num)
|
||||
if (!bird->flags && item->touch_bits) {
|
||||
g_LaraItem->hit_points -= BIRD_DAMAGE;
|
||||
g_LaraItem->hit_status = 1;
|
||||
if (item->object_num == O_CROW) {
|
||||
if (item->object_id == O_CROW) {
|
||||
Creature_Effect(item, &m_CrowBite, DoBloodSplat);
|
||||
} else {
|
||||
Creature_Effect(item, &m_BirdBite, DoBloodSplat);
|
||||
|
@ -34,7 +34,7 @@ void __cdecl BodyPart_Control(const int16_t fx_num)
|
||||
splash_fx->rot.y = 0;
|
||||
splash_fx->speed = 0;
|
||||
splash_fx->frame_num = 0;
|
||||
splash_fx->object_num = O_SPLASH;
|
||||
splash_fx->object_id = O_SPLASH;
|
||||
}
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ void __cdecl BodyPart_Control(const int16_t fx_num)
|
||||
fx->speed = 0;
|
||||
fx->frame_num = 0;
|
||||
fx->counter = 0;
|
||||
fx->object_num = O_EXPLOSION;
|
||||
fx->object_id = O_EXPLOSION;
|
||||
fx->shade = HIGH_LIGHT;
|
||||
Sound_Effect(SFX_EXPLOSION1, &fx->pos, SPM_NORMAL);
|
||||
} else {
|
||||
@ -68,7 +68,7 @@ void __cdecl BodyPart_Control(const int16_t fx_num)
|
||||
fx->speed = 0;
|
||||
fx->frame_num = 0;
|
||||
fx->counter = 0;
|
||||
fx->object_num = O_EXPLOSION;
|
||||
fx->object_id = O_EXPLOSION;
|
||||
fx->shade = HIGH_LIGHT;
|
||||
Sound_Effect(SFX_EXPLOSION1, &fx->pos, SPM_NORMAL);
|
||||
g_Lara.spaz_effect_count = 5;
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
typedef struct {
|
||||
int32_t score;
|
||||
GAME_OBJECT_ID obj_id;
|
||||
GAME_OBJECT_ID object_id;
|
||||
} MATCH;
|
||||
|
||||
static const INVENTORY_ITEM *const m_InvItems[] = {
|
||||
@ -63,7 +63,7 @@ ENUM_STRING_MAP ENUM_STRING_MAP(GAME_OBJECT_ID)[] = {
|
||||
static int32_t Object_NameMatch(const char *user_input, const char *name);
|
||||
static void Object_TryMatch(
|
||||
VECTOR *matches, const char *user_input, const char *name,
|
||||
GAME_OBJECT_ID obj_id);
|
||||
GAME_OBJECT_ID object_id);
|
||||
|
||||
static int32_t Object_NameMatch(
|
||||
const char *const user_input, const char *const name)
|
||||
@ -90,26 +90,26 @@ static int32_t Object_NameMatch(
|
||||
|
||||
static void Object_TryMatch(
|
||||
VECTOR *const matches, const char *const user_input, const char *const name,
|
||||
const GAME_OBJECT_ID obj_id)
|
||||
const GAME_OBJECT_ID object_id)
|
||||
{
|
||||
int32_t score = Object_NameMatch(user_input, name);
|
||||
if (!g_Objects[obj_id].loaded) {
|
||||
if (!g_Objects[object_id].loaded) {
|
||||
score -= GOOD_MATCH_THRESHOLD;
|
||||
}
|
||||
if (score > 0) {
|
||||
MATCH match = {
|
||||
.score = score,
|
||||
.obj_id = obj_id,
|
||||
.object_id = object_id,
|
||||
};
|
||||
Vector_Add(matches, &match);
|
||||
}
|
||||
}
|
||||
|
||||
const char *Object_GetName(const GAME_OBJECT_ID obj_id)
|
||||
const char *Object_GetName(const GAME_OBJECT_ID object_id)
|
||||
{
|
||||
// TODO: remove this in favor of changing the INVENTORY_ITEM.text directly
|
||||
// clang-format off
|
||||
switch (obj_id) {
|
||||
switch (object_id) {
|
||||
case O_PUZZLE_ITEM_1: return g_GF_Puzzle1Strings[g_CurrentLevel];
|
||||
case O_PUZZLE_ITEM_2: return g_GF_Puzzle2Strings[g_CurrentLevel];
|
||||
case O_PUZZLE_ITEM_3: return g_GF_Puzzle3Strings[g_CurrentLevel];
|
||||
@ -124,16 +124,17 @@ const char *Object_GetName(const GAME_OBJECT_ID obj_id)
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
return m_ObjectNames[obj_id] != NULL ? (const char *)m_ObjectNames[obj_id]
|
||||
: m_DefaultObjectNames[obj_id];
|
||||
return m_ObjectNames[object_id] != NULL
|
||||
? (const char *)m_ObjectNames[object_id]
|
||||
: m_DefaultObjectNames[object_id];
|
||||
}
|
||||
|
||||
void Object_SetName(const GAME_OBJECT_ID obj_id, const char *const name)
|
||||
void Object_SetName(const GAME_OBJECT_ID object_id, const char *const name)
|
||||
{
|
||||
assert(obj_id >= 0);
|
||||
assert(obj_id < O_NUMBER_OF);
|
||||
Memory_FreePointer(&m_ObjectNames[obj_id]);
|
||||
m_ObjectNames[obj_id] = Memory_DupStr(name);
|
||||
assert(object_id >= 0);
|
||||
assert(object_id < O_NUMBER_OF);
|
||||
Memory_FreePointer(&m_ObjectNames[object_id]);
|
||||
m_ObjectNames[object_id] = Memory_DupStr(name);
|
||||
}
|
||||
|
||||
GAME_OBJECT_ID *Object_IdsFromName(
|
||||
@ -147,20 +148,21 @@ GAME_OBJECT_ID *Object_IdsFromName(
|
||||
for (const INVENTORY_ITEM *const *item_ptr = m_InvItems; *item_ptr != NULL;
|
||||
item_ptr++) {
|
||||
const INVENTORY_ITEM *const item = *item_ptr;
|
||||
const GAME_OBJECT_ID obj_id =
|
||||
Object_GetCognateInverse(item->obj_num, g_ItemToInvObjectMap);
|
||||
if (filter != NULL && !filter(obj_id)) {
|
||||
const GAME_OBJECT_ID object_id =
|
||||
Object_GetCognateInverse(item->object_id, g_ItemToInvObjectMap);
|
||||
if (filter != NULL && !filter(object_id)) {
|
||||
continue;
|
||||
}
|
||||
Object_TryMatch(matches, user_input, item->string, obj_id);
|
||||
Object_TryMatch(matches, user_input, item->string, object_id);
|
||||
}
|
||||
|
||||
// Store matches from hardcoded strings
|
||||
for (GAME_OBJECT_ID obj_id = 0; obj_id < O_NUMBER_OF; obj_id++) {
|
||||
if (filter != NULL && !filter(obj_id)) {
|
||||
for (GAME_OBJECT_ID object_id = 0; object_id < O_NUMBER_OF; object_id++) {
|
||||
if (filter != NULL && !filter(object_id)) {
|
||||
continue;
|
||||
}
|
||||
Object_TryMatch(matches, user_input, Object_GetName(obj_id), obj_id);
|
||||
Object_TryMatch(
|
||||
matches, user_input, Object_GetName(object_id), object_id);
|
||||
}
|
||||
|
||||
// If we got a perfect match, discard poor matches
|
||||
@ -192,7 +194,7 @@ GAME_OBJECT_ID *Object_IdsFromName(
|
||||
for (int i = 0; i < matches->count; i++) {
|
||||
const MATCH *const match = Vector_Get(matches, i);
|
||||
LOG_DEBUG(
|
||||
"%d. %s (%d)", i, Object_GetName(match->obj_id), match->score);
|
||||
"%d. %s (%d)", i, Object_GetName(match->object_id), match->score);
|
||||
}
|
||||
|
||||
// Make sure the returned matching object ids are unique
|
||||
@ -204,13 +206,13 @@ GAME_OBJECT_ID *Object_IdsFromName(
|
||||
const MATCH *const match = Vector_Get(matches, i);
|
||||
bool is_unique = true;
|
||||
for (int32_t j = 0; j < unique_count; j++) {
|
||||
if (match->obj_id == unique_ids[j]) {
|
||||
if (match->object_id == unique_ids[j]) {
|
||||
is_unique = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (is_unique) {
|
||||
unique_ids[unique_count++] = match->obj_id;
|
||||
unique_ids[unique_count++] = match->object_id;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,8 +8,8 @@ extern ENUM_STRING_MAP ENUM_STRING_MAP(GAME_OBJECT_ID)[];
|
||||
|
||||
void Object_SetupNames(void);
|
||||
|
||||
const char *Object_GetName(GAME_OBJECT_ID obj_id);
|
||||
void Object_SetName(GAME_OBJECT_ID obj_id, const char *name);
|
||||
const char *Object_GetName(GAME_OBJECT_ID object_id);
|
||||
void Object_SetName(GAME_OBJECT_ID object_id, const char *name);
|
||||
|
||||
// Return a list of object ids that match given string.
|
||||
// out_match_count may be NULL.
|
||||
|
@ -235,7 +235,7 @@ void __cdecl Boat_DoShift(const int32_t boat_num)
|
||||
while (item_num != NO_ITEM) {
|
||||
ITEM_INFO *item = &g_Items[item_num];
|
||||
|
||||
if (item->object_num == O_BOAT && item_num != boat_num
|
||||
if (item->object_id == O_BOAT && item_num != boat_num
|
||||
&& g_Lara.skidoo != item_num) {
|
||||
const int32_t dx = item->pos.x - boat->pos.x;
|
||||
const int32_t dz = item->pos.z - boat->pos.z;
|
||||
@ -248,7 +248,7 @@ void __cdecl Boat_DoShift(const int32_t boat_num)
|
||||
break;
|
||||
}
|
||||
|
||||
if (item->object_num == O_GONDOLA
|
||||
if (item->object_id == O_GONDOLA
|
||||
&& item->current_anim_state == GONDOLA_FLOATING) {
|
||||
const int32_t c = Math_Cos(item->rot.y);
|
||||
const int32_t s = Math_Sin(item->rot.y);
|
||||
@ -288,7 +288,7 @@ void __cdecl Boat_DoWakeEffect(const ITEM_INFO *const boat)
|
||||
}
|
||||
|
||||
FX_INFO *const fx = &g_Effects[fx_num];
|
||||
fx->object_num = O_WATER_SPRITE;
|
||||
fx->object_id = O_WATER_SPRITE;
|
||||
fx->room_num = boat->room_num;
|
||||
fx->frame_num = frame;
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
void __cdecl Option_DoInventory(INVENTORY_ITEM *const item)
|
||||
{
|
||||
switch (item->obj_num) {
|
||||
switch (item->object_id) {
|
||||
case O_PASSPORT_OPTION:
|
||||
Option_Passport(item);
|
||||
break;
|
||||
@ -66,7 +66,7 @@ void __cdecl Option_DoInventory(INVENTORY_ITEM *const item)
|
||||
|
||||
void __cdecl Option_ShutdownInventory(INVENTORY_ITEM *const item)
|
||||
{
|
||||
switch (item->obj_num) {
|
||||
switch (item->object_id) {
|
||||
case O_PASSPORT_OPTION:
|
||||
Option_Passport_Shutdown();
|
||||
break;
|
||||
|
@ -243,10 +243,10 @@ void __cdecl Overlay_DrawPickups(const bool timed)
|
||||
}
|
||||
}
|
||||
|
||||
void __cdecl Overlay_AddDisplayPickup(const int16_t obj_num)
|
||||
void __cdecl Overlay_AddDisplayPickup(const GAME_OBJECT_ID object_id)
|
||||
{
|
||||
if (obj_num == O_SECRET_1 || obj_num == O_SECRET_2
|
||||
|| obj_num == O_SECRET_3) {
|
||||
if (object_id == O_SECRET_1 || object_id == O_SECRET_2
|
||||
|| object_id == O_SECRET_3) {
|
||||
Music_Play(g_GameFlow.secret_track, false);
|
||||
}
|
||||
|
||||
@ -254,7 +254,7 @@ void __cdecl Overlay_AddDisplayPickup(const int16_t obj_num)
|
||||
PICKUP_INFO *const pickup = &g_Pickups[i];
|
||||
if (pickup->timer <= 0) {
|
||||
pickup->timer = 2.5 * FRAMES_PER_SECOND;
|
||||
pickup->sprite = g_Objects[obj_num].mesh_idx;
|
||||
pickup->sprite = g_Objects[object_id].mesh_idx;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -11,6 +11,6 @@ void __cdecl Overlay_MakeAmmoString(char *string);
|
||||
void __cdecl Overlay_DrawAmmoInfo(void);
|
||||
void __cdecl Overlay_InitialisePickUpDisplay(void);
|
||||
void __cdecl Overlay_DrawPickups(const bool pickup_state);
|
||||
void __cdecl Overlay_AddDisplayPickup(int16_t obj_num);
|
||||
void __cdecl Overlay_AddDisplayPickup(GAME_OBJECT_ID object_id);
|
||||
void __cdecl Overlay_DisplayModeInfo(const char *string);
|
||||
void __cdecl Overlay_DrawModeInfo(void);
|
||||
|
@ -314,7 +314,7 @@ int32_t __cdecl Room_GetHeight(
|
||||
const int16_t value = TRIGGER_VALUE(trigger);
|
||||
const ITEM_INFO *const item = &g_Items[value];
|
||||
const OBJECT_INFO *const object =
|
||||
&g_Objects[item->object_num];
|
||||
&g_Objects[item->object_id];
|
||||
if (object->floor) {
|
||||
object->floor(item, x, y, z, &height);
|
||||
}
|
||||
@ -492,7 +492,7 @@ void __cdecl Room_TestTriggers(const int16_t *fd, bool heavy)
|
||||
}
|
||||
|
||||
if (!item->active) {
|
||||
if (g_Objects[item->object_num].intelligent) {
|
||||
if (g_Objects[item->object_id].intelligent) {
|
||||
if (item->status == IS_INACTIVE) {
|
||||
item->touch_bits = 0;
|
||||
item->status = IS_ACTIVE;
|
||||
@ -721,7 +721,7 @@ int32_t __cdecl Room_GetCeiling(
|
||||
const int16_t value = TRIGGER_VALUE(trigger);
|
||||
const ITEM_INFO *const item = &g_Items[value];
|
||||
const OBJECT_INFO *const object =
|
||||
&g_Objects[item->object_num];
|
||||
&g_Objects[item->object_id];
|
||||
if (object->ceiling) {
|
||||
object->ceiling(item, x, y, z, &height);
|
||||
}
|
||||
@ -872,7 +872,7 @@ void __cdecl Room_RemoveFlipItems(const ROOM_INFO *const r)
|
||||
while (item_num != NO_ITEM) {
|
||||
ITEM_INFO *const item = &g_Items[item_num];
|
||||
|
||||
switch (item->object_num) {
|
||||
switch (item->object_id) {
|
||||
case O_MOVABLE_BLOCK_1:
|
||||
case O_MOVABLE_BLOCK_2:
|
||||
case O_MOVABLE_BLOCK_3:
|
||||
@ -884,7 +884,7 @@ void __cdecl Room_RemoveFlipItems(const ROOM_INFO *const r)
|
||||
break;
|
||||
}
|
||||
|
||||
if (item->flags & IF_ONE_SHOT && g_Objects[item->object_num].intelligent
|
||||
if (item->flags & IF_ONE_SHOT && g_Objects[item->object_id].intelligent
|
||||
&& item->hit_points <= 0) {
|
||||
Item_RemoveDrawn(item_num);
|
||||
item->flags |= IF_KILLED;
|
||||
@ -900,7 +900,7 @@ void __cdecl Room_AddFlipItems(const ROOM_INFO *const r)
|
||||
while (item_num != NO_ITEM) {
|
||||
const ITEM_INFO *const item = &g_Items[item_num];
|
||||
|
||||
switch (item->object_num) {
|
||||
switch (item->object_id) {
|
||||
case O_MOVABLE_BLOCK_1:
|
||||
case O_MOVABLE_BLOCK_2:
|
||||
case O_MOVABLE_BLOCK_3:
|
||||
|
@ -424,7 +424,7 @@ void __cdecl Room_DrawSingleRoomObjects(const int16_t room_num)
|
||||
while (item_num != NO_ITEM) {
|
||||
ITEM_INFO *const item = &g_Items[item_num];
|
||||
if (item->status != IS_INVISIBLE) {
|
||||
const OBJECT_INFO *const object = &g_Objects[item->object_num];
|
||||
const OBJECT_INFO *const object = &g_Objects[item->object_id];
|
||||
object->draw_routine(item);
|
||||
}
|
||||
item_num = item->next_item;
|
||||
|
@ -546,7 +546,7 @@ typedef struct __unaligned {
|
||||
int32_t floor;
|
||||
uint32_t touch_bits;
|
||||
uint32_t mesh_bits;
|
||||
int16_t object_num;
|
||||
int16_t object_id;
|
||||
int16_t current_anim_state;
|
||||
int16_t goal_anim_state;
|
||||
int16_t required_anim_state;
|
||||
@ -659,7 +659,7 @@ typedef struct __unaligned {
|
||||
XYZ_32 pos;
|
||||
XYZ_16 rot;
|
||||
int16_t room_num;
|
||||
int16_t object_num;
|
||||
int16_t object_id;
|
||||
int16_t next_fx;
|
||||
int16_t next_active;
|
||||
int16_t speed;
|
||||
@ -729,7 +729,7 @@ typedef struct __unaligned {
|
||||
|
||||
typedef struct __unaligned {
|
||||
char *string;
|
||||
int16_t obj_num;
|
||||
int16_t object_id;
|
||||
int16_t frames_total;
|
||||
int16_t current_frame;
|
||||
int16_t goal_frame;
|
||||
|
Loading…
Reference in New Issue
Block a user