port LaraAsFallBack

This commit is contained in:
rr- 2021-02-13 14:58:54 +01:00
parent d468fb2041
commit 0077680839
4 changed files with 19 additions and 7 deletions

View file

@ -340,7 +340,7 @@
<rect width="12" height="12" x="532" y="84" fill="forestgreen"/>
<rect width="12" height="12" x="546" y="84" fill="forestgreen"/>
<rect width="12" height="12" x="560" y="84" fill="forestgreen"/>
<rect width="12" height="12" x="574" y="84" fill="lightpink"/>
<rect width="12" height="12" x="574" y="84" fill="forestgreen"/>
<rect width="12" height="12" x="588" y="84" fill="lightpink"/>
<rect width="12" height="12" x="602" y="84" fill="lightpink"/>
<rect width="12" height="12" x="616" y="84" fill="lightpink"/>
@ -700,10 +700,10 @@
<rect width="12" height="12" x="672" y="182" fill="mistyrose"/>
<rect width="12" height="12" x="686" y="182" fill="mistyrose"/>
<rect width="12" height="12" x="0" y="196" fill="lightpink"/>
<rect width="12" height="12" x="0" y="224.5" fill="forestgreen"/><text alignment-baseline="central" x="17" y="230.5" style="font-family: sans-serif; font-size: 15px">Functions decompiled (count): 6.42%</text>
<rect width="12" height="12" x="0" y="242.5" fill="forestgreen"/><text alignment-baseline="central" x="17" y="248.5" style="font-family: sans-serif; font-size: 15px">Functions decompiled (bytesize): 3.44%</text>
<rect width="12" height="12" x="0" y="260.5" fill="lightpink"/><text alignment-baseline="central" x="17" y="266.5" style="font-family: sans-serif; font-size: 15px">Functions not decompiled, but with known names (count): 74.32%</text>
<rect width="12" height="12" x="0" y="278.5" fill="lightpink"/><text alignment-baseline="central" x="17" y="284.5" style="font-family: sans-serif; font-size: 15px">Functions not decompiled, but with known names (bytesize): 76.53%</text>
<rect width="12" height="12" x="0" y="224.5" fill="forestgreen"/><text alignment-baseline="central" x="17" y="230.5" style="font-family: sans-serif; font-size: 15px">Functions decompiled (count): 6.56%</text>
<rect width="12" height="12" x="0" y="242.5" fill="forestgreen"/><text alignment-baseline="central" x="17" y="248.5" style="font-family: sans-serif; font-size: 15px">Functions decompiled (bytesize): 3.46%</text>
<rect width="12" height="12" x="0" y="260.5" fill="lightpink"/><text alignment-baseline="central" x="17" y="266.5" style="font-family: sans-serif; font-size: 15px">Functions not decompiled, but with known names (count): 74.18%</text>
<rect width="12" height="12" x="0" y="278.5" fill="lightpink"/><text alignment-baseline="central" x="17" y="284.5" style="font-family: sans-serif; font-size: 15px">Functions not decompiled, but with known names (bytesize): 76.52%</text>
<rect width="12" height="12" x="0" y="296.5" fill="mistyrose"/><text alignment-baseline="central" x="17" y="302.5" style="font-family: sans-serif; font-size: 15px">Functions not decompiled, with unknown names (count): 19.26%</text>
<rect width="12" height="12" x="0" y="314.5" fill="mistyrose"/><text alignment-baseline="central" x="17" y="320.5" style="font-family: sans-serif; font-size: 15px">Functions not decompiled, with unknown names (bytesize): 20.03%</text>
</svg>

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Before After
Before After

View file

@ -344,7 +344,7 @@ LaraAsStepLeft 0x00423000 0x00000073 +
LaraAsSlide 0x00423080 0x00000027 +
LaraAsBackJump 0x004230B0 0x0000001C +
LaraAsRightJump 0x004230D0 0x00000013 +
LaraAsFallback 0x004230F0 0x0000002C -
LaraAsFallBack 0x004230F0 0x0000002C +
LaraAsHangLeft 0x00423120 0x00000035 -
LaraAsHangRight 0x00423160 0x00000035 -
LaraAsSlideBack 0x004231A0 0x00000014 -

View file

@ -329,7 +329,7 @@ void __cdecl LaraAsCompress(ITEM_INFO* item, COLL_INFO* coll)
Lara.move_angle = item->pos.y_rot - 0x8000;
}
if (item->fall_speed > 131)
if (item->fall_speed > LARA_FASTFALL_SPEED)
item->goal_anim_state = AS_FASTFALL;
}
@ -465,6 +465,16 @@ void __cdecl LaraAsUpJump(ITEM_INFO* item, COLL_INFO* coll)
}
}
void __cdecl LaraAsFallBack(ITEM_INFO* item, COLL_INFO* coll)
{
if (item->fall_speed > LARA_FASTFALL_SPEED) {
item->goal_anim_state = AS_FASTFALL;
}
if ((Input & IN_ACTION) && Lara.gun_status == LG_ARMLESS) {
item->goal_anim_state = AS_REACH;
}
}
int16_t __cdecl LaraFloorFront(ITEM_INFO* item, PHD_ANGLE ang, int32_t dist)
{
int32_t x = item->pos.x + ((phd_sin(ang) * dist) >> W2V_SHIFT);
@ -498,4 +508,5 @@ void TR1MInjectLara()
INJECT(0x00423080, LaraAsSlide);
INJECT(0x004230B0, LaraAsBackJump);
INJECT(0x004230D0, LaraAsRightJump);
INJECT(0x004230F0, LaraAsFallBack);
}

View file

@ -34,6 +34,7 @@ void __cdecl LaraAsBackJump(ITEM_INFO* item, COLL_INFO* coll);
void __cdecl LaraAsRightJump(ITEM_INFO* item, COLL_INFO* coll);
void __cdecl LaraAsLeftJump(ITEM_INFO* item, COLL_INFO* coll);
void __cdecl LaraAsUpJump(ITEM_INFO* item, COLL_INFO* coll);
void __cdecl LaraAsFallBack(ITEM_INFO* item, COLL_INFO* coll);
int16_t __cdecl LaraFloorFront(ITEM_INFO* item, PHD_ANGLE ang, int32_t dist);
void __cdecl UseItem(__int16 object_num);