port LaraAsBackJump

This commit is contained in:
rr- 2021-02-13 14:58:52 +01:00
parent aaed09ce4d
commit 3f4344171d
4 changed files with 16 additions and 6 deletions

View file

@ -338,7 +338,7 @@
<rect width="12" height="12" x="504" y="84" fill="forestgreen"/> <rect width="12" height="12" x="504" y="84" fill="forestgreen"/>
<rect width="12" height="12" x="518" y="84" fill="forestgreen"/> <rect width="12" height="12" x="518" y="84" fill="forestgreen"/>
<rect width="12" height="12" x="532" y="84" fill="forestgreen"/> <rect width="12" height="12" x="532" y="84" fill="forestgreen"/>
<rect width="12" height="12" x="546" y="84" fill="lightpink"/> <rect width="12" height="12" x="546" y="84" fill="forestgreen"/>
<rect width="12" height="12" x="560" y="84" fill="lightpink"/> <rect width="12" height="12" x="560" y="84" fill="lightpink"/>
<rect width="12" height="12" x="574" y="84" fill="lightpink"/> <rect width="12" height="12" x="574" y="84" fill="lightpink"/>
<rect width="12" height="12" x="588" y="84" fill="lightpink"/> <rect width="12" height="12" x="588" 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="672" y="182" fill="mistyrose"/>
<rect width="12" height="12" x="686" 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="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.13%</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.28%</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.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.43%</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.61%</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.47%</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.55%</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.54%</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="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> <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> </svg>

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Before After
Before After

View file

@ -342,7 +342,7 @@ LaraAsFastTurn 0x00422F30 0x0000004B +
LaraAsStepRight 0x00422F80 0x00000073 + LaraAsStepRight 0x00422F80 0x00000073 +
LaraAsStepLeft 0x00423000 0x00000073 + LaraAsStepLeft 0x00423000 0x00000073 +
LaraAsSlide 0x00423080 0x00000027 + LaraAsSlide 0x00423080 0x00000027 +
LaraAsBackJump 0x004230B0 0x0000001C - LaraAsBackJump 0x004230B0 0x0000001C +
LaraAsRightJump 0x004230D0 0x00000013 - LaraAsRightJump 0x004230D0 0x00000013 -
LaraAsFallback 0x004230F0 0x0000002C - LaraAsFallback 0x004230F0 0x0000002C -
LaraAsHangLeft 0x00423120 0x00000035 - LaraAsHangLeft 0x00423120 0x00000035 -

View file

@ -436,6 +436,14 @@ void __cdecl LaraAsSlide(ITEM_INFO* item, COLL_INFO* coll)
} }
} }
void __cdecl LaraAsBackJump(ITEM_INFO* item, COLL_INFO* coll)
{
Camera.target_angle = ONE_DEGREE * 135;
if (item->fall_speed > LARA_FASTFALL_SPEED) {
item->goal_anim_state = AS_FASTFALL;
}
}
int16_t __cdecl LaraFloorFront(ITEM_INFO* item, PHD_ANGLE ang, int32_t dist) 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); int32_t x = item->pos.x + ((phd_sin(ang) * dist) >> W2V_SHIFT);
@ -467,4 +475,5 @@ void TR1MInjectLara()
INJECT(0x00422F80, LaraAsStepRight); INJECT(0x00422F80, LaraAsStepRight);
INJECT(0x00423000, LaraAsStepLeft); INJECT(0x00423000, LaraAsStepLeft);
INJECT(0x00423080, LaraAsSlide); INJECT(0x00423080, LaraAsSlide);
INJECT(0x004230B0, LaraAsBackJump);
} }

View file

@ -30,6 +30,7 @@ void __cdecl LaraAsFastTurn(ITEM_INFO* item, COLL_INFO* coll);
void __cdecl LaraAsStepRight(ITEM_INFO* item, COLL_INFO* coll); void __cdecl LaraAsStepRight(ITEM_INFO* item, COLL_INFO* coll);
void __cdecl LaraAsStepLeft(ITEM_INFO* item, COLL_INFO* coll); void __cdecl LaraAsStepLeft(ITEM_INFO* item, COLL_INFO* coll);
void __cdecl LaraAsSlide(ITEM_INFO* item, COLL_INFO* coll); void __cdecl LaraAsSlide(ITEM_INFO* item, COLL_INFO* coll);
void __cdecl LaraAsBackJump(ITEM_INFO* item, COLL_INFO* coll);
int16_t __cdecl LaraFloorFront(ITEM_INFO* item, PHD_ANGLE ang, int32_t dist); int16_t __cdecl LaraFloorFront(ITEM_INFO* item, PHD_ANGLE ang, int32_t dist);
void __cdecl UseItem(__int16 object_num); void __cdecl UseItem(__int16 object_num);