mirror of
https://github.com/LostArtefacts/TR2X.git
synced 2024-12-02 19:06:47 +00:00
port Room_RemoveFlipItems
This commit is contained in:
parent
0dc2b046c1
commit
ef9b7c9edd
@ -69,10 +69,10 @@
|
||||
</g>
|
||||
<g transform="translate(0 116)">
|
||||
<text x="0" y="7.50">Tomb2.exe progress according to the physical function order:</text>
|
||||
<text class="todo" style="font-size: 12px; " x="747" y="9"><tspan text-anchor="end"><tspan class="decompiled">47.62% (580)</tspan> · <tspan class="known">49.92% (608)</tspan> · <tspan class="todo">0% (0)</tspan> · <tspan class="unused">2.46% (30)</tspan></tspan></text>
|
||||
<text class="todo" style="font-size: 12px; " x="747" y="9"><tspan text-anchor="end"><tspan class="decompiled">47.70% (581)</tspan> · <tspan class="known">49.84% (607)</tspan> · <tspan class="todo">0% (0)</tspan> · <tspan class="unused">2.46% (30)</tspan></tspan></text>
|
||||
<g transform="translate(0 20)">
|
||||
<rect width="355.71" height="6" x="0" y="0" class="decompiled"/>
|
||||
<rect width="372.89" height="6" x="355.71" y="0" class="known"/>
|
||||
<rect width="356.33" height="6" x="0" y="0" class="decompiled"/>
|
||||
<rect width="372.27" height="6" x="356.33" y="0" class="known"/>
|
||||
<rect width="18.40" height="6" x="728.60" y="0" class="unused"/>
|
||||
</g>
|
||||
<g transform="translate(0 31)">
|
||||
@ -260,7 +260,7 @@
|
||||
<rect width="12" height="12" x="465" y="45" class="decompiled"><title>int32_t __cdecl LOS_ClipTarget(const GAME_VECTOR *start, GAME_VECTOR *target, const FLOOR_INFO *floor);</title></rect>
|
||||
<rect width="12" height="12" x="480" y="45" class="decompiled"><title>int32_t __cdecl LOS_CheckSmashable(const GAME_VECTOR *start, GAME_VECTOR *target);</title></rect>
|
||||
<rect width="12" height="12" x="495" y="45" class="decompiled"><title>void __cdecl Room_FlipMap(void);</title></rect>
|
||||
<rect width="12" height="12" x="510" y="45" class="known"><title>void __cdecl Room_RemoveFlipItems(ROOM_INFO *r);</title></rect>
|
||||
<rect width="12" height="12" x="510" y="45" class="decompiled"><title>void __cdecl Room_RemoveFlipItems(ROOM_INFO *r);</title></rect>
|
||||
<rect width="12" height="12" x="525" y="45" class="known"><title>void __cdecl Room_AddFlipItems(ROOM_INFO *r);</title></rect>
|
||||
<rect width="12" height="12" x="540" y="45" class="known"><title>void __cdecl Control_TriggerMusicTrack(int16_t value, int16_t flags, int16_t type);</title></rect>
|
||||
<rect width="12" height="12" x="555" y="45" class="known"><title>void __cdecl Control_TriggerMusicNormalTrack(int16_t value, int16_t flags, int16_t type);</title></rect>
|
||||
@ -1298,10 +1298,10 @@
|
||||
</g>
|
||||
<g transform="translate(0 546)">
|
||||
<text x="0" y="7.50">Tomb2.exe progress according to the function sizes:</text>
|
||||
<text class="todo" style="font-size: 12px; " x="747" y="9"><tspan text-anchor="end"><tspan class="decompiled">45.13%</tspan> · <tspan class="known">54.54%</tspan> · <tspan class="todo">0%</tspan> · <tspan class="unused">0.33%</tspan></tspan></text>
|
||||
<text class="todo" style="font-size: 12px; " x="747" y="9"><tspan text-anchor="end"><tspan class="decompiled">45.18%</tspan> · <tspan class="known">54.50%</tspan> · <tspan class="todo">0%</tspan> · <tspan class="unused">0.33%</tspan></tspan></text>
|
||||
<g transform="translate(0 20)">
|
||||
<rect width="337.14" height="6" x="0" y="0" class="decompiled"/>
|
||||
<rect width="407.42" height="6" x="337.14" y="0" class="known"/>
|
||||
<rect width="337.46" height="6" x="0" y="0" class="decompiled"/>
|
||||
<rect width="407.10" height="6" x="337.46" y="0" class="known"/>
|
||||
<rect width="2.44" height="6" x="744.56" y="0" class="unused"/>
|
||||
</g>
|
||||
<g transform="translate(0 31)">
|
||||
@ -1859,7 +1859,7 @@
|
||||
<rect width="8.17" height="8.22" x="545.84" y="322.19" class="known"><title>void __cdecl AdjustTextureUVs(bool reset_uv_add);</title></rect>
|
||||
<rect width="8.17" height="8.15" x="545.84" y="333.42" class="decompiled"><title>void __cdecl Output_DrawScreenSprite2D(int32_t sx, int32_t sy, int32_t sz, int32_t scale_h, int32_t scale_v, int16_t sprite_idx, int16_t shade, uint16_t flags);</title></rect>
|
||||
<rect width="8.17" height="8.15" x="545.84" y="344.56" class="decompiled"><title>void __cdecl Lara_Control_Cutscene(int16_t item_num);</title></rect>
|
||||
<rect width="8.17" height="8.15" x="545.84" y="355.71" class="known"><title>void __cdecl Room_RemoveFlipItems(ROOM_INFO *r);</title></rect>
|
||||
<rect width="8.17" height="8.15" x="545.84" y="355.71" class="decompiled"><title>void __cdecl Room_RemoveFlipItems(ROOM_INFO *r);</title></rect>
|
||||
<rect width="8.17" height="8.15" x="545.84" y="366.85" class="known"><title>void __cdecl floor_shake_effect(ITEM_INFO *item);</title></rect>
|
||||
<rect width="7.88" height="8.45" x="557.01" y="185.54" class="decompiled"><title>void __cdecl Lara_State_DeathSlide(ITEM_INFO *item, COLL_INFO *coll);</title></rect>
|
||||
<rect width="7.88" height="8.45" x="557.01" y="196.99" class="decompiled"><title>void __cdecl Lara_Col_Compress( ITEM_INFO *item, COLL_INFO *coll );</title></rect>
|
||||
|
Before Width: | Height: | Size: 361 KiB After Width: | Height: | Size: 361 KiB |
@ -2847,7 +2847,7 @@ typedef enum {
|
||||
0x00416260 0x00DA + int32_t __cdecl LOS_ClipTarget(const GAME_VECTOR *start, GAME_VECTOR *target, const FLOOR_INFO *floor);
|
||||
0x00416340 0x02FE + int32_t __cdecl LOS_CheckSmashable(const GAME_VECTOR *start, GAME_VECTOR *target);
|
||||
0x00416640 0x00B3 + void __cdecl Room_FlipMap(void);
|
||||
0x00416700 0x0096 - void __cdecl Room_RemoveFlipItems(ROOM_INFO *r);
|
||||
0x00416700 0x0096 + void __cdecl Room_RemoveFlipItems(ROOM_INFO *r);
|
||||
0x004167A0 0x005C - void __cdecl Room_AddFlipItems(ROOM_INFO *r);
|
||||
0x00416800 0x0024 - void __cdecl Control_TriggerMusicTrack(int16_t value, int16_t flags, int16_t type);
|
||||
0x00416830 0x00DA - void __cdecl Control_TriggerMusicNormalTrack(int16_t value, int16_t flags, int16_t type);
|
||||
|
@ -848,3 +848,32 @@ void __cdecl Room_FlipMap(void)
|
||||
|
||||
g_FlipStatus = !g_FlipStatus;
|
||||
}
|
||||
|
||||
void __cdecl Room_RemoveFlipItems(const ROOM_INFO *const r)
|
||||
{
|
||||
int16_t item_num = r->item_num;
|
||||
|
||||
while (item_num != NO_ITEM) {
|
||||
ITEM_INFO *const item = &g_Items[item_num];
|
||||
|
||||
switch (item->object_num) {
|
||||
case O_MOVABLE_BLOCK_1:
|
||||
case O_MOVABLE_BLOCK_2:
|
||||
case O_MOVABLE_BLOCK_3:
|
||||
case O_MOVABLE_BLOCK_4:
|
||||
Room_AlterFloorHeight(item, WALL_L);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (item->flags & IF_ONE_SHOT && g_Objects[item->object_num].intelligent
|
||||
&& item->hit_points <= 0) {
|
||||
Item_RemoveDrawn(item_num);
|
||||
item->flags |= IF_KILLED;
|
||||
}
|
||||
|
||||
item_num = item->next_item;
|
||||
}
|
||||
}
|
||||
|
@ -23,3 +23,4 @@ int16_t __cdecl Room_GetDoor(const FLOOR_INFO *floor);
|
||||
void __cdecl Room_TestTriggers(const int16_t *fd, bool heavy);
|
||||
void __cdecl Room_AlterFloorHeight(const ITEM_INFO *item, int32_t height);
|
||||
void __cdecl Room_FlipMap(void);
|
||||
void __cdecl Room_RemoveFlipItems(const ROOM_INFO *r);
|
||||
|
@ -8,7 +8,6 @@
|
||||
#define Output_InsertInventoryBackground ((void __cdecl (*)(const int16_t *obj_ptr))0x00401D50)
|
||||
#define Game_Control ((int32_t __cdecl (*)(int32_t nframes, int32_t demo_mode))0x00414390)
|
||||
#define Camera_RefreshFromTrigger ((void __cdecl (*)(int16_t type, const int16_t *data))0x00415100)
|
||||
#define Room_RemoveFlipItems ((void __cdecl (*)(ROOM_INFO *r))0x00416700)
|
||||
#define Room_AddFlipItems ((void __cdecl (*)(ROOM_INFO *r))0x004167A0)
|
||||
#define Control_TriggerMusicTrack ((void __cdecl (*)(int16_t value, int16_t flags, int16_t type))0x00416800)
|
||||
#define Control_TriggerMusicNormalTrack ((void __cdecl (*)(int16_t value, int16_t flags, int16_t type))0x00416830)
|
||||
|
@ -248,6 +248,7 @@ static void Inject_Room(const bool enable)
|
||||
INJECT(enable, 0x004151F0, Room_TestTriggers);
|
||||
INJECT(enable, 0x004340B0, Room_AlterFloorHeight);
|
||||
INJECT(enable, 0x00416640, Room_FlipMap);
|
||||
INJECT(enable, 0x00416700, Room_RemoveFlipItems);
|
||||
}
|
||||
|
||||
static void Inject_Matrix(const bool enable)
|
||||
|
Loading…
Reference in New Issue
Block a user