mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-05-08 11:38:16 +03:00
port FxLaraBubbles
This commit is contained in:
parent
f7a710dc21
commit
0f86ffa8fb
5 changed files with 41 additions and 7 deletions
|
@ -215,7 +215,7 @@
|
|||
<rect width="12.00" height="12.00" x="168.00" y="73.00" fill="lightpink"/>
|
||||
<rect width="12.00" height="12.00" x="182.00" y="73.00" fill="lightpink"/>
|
||||
<rect width="12.00" height="12.00" x="196.00" y="73.00" fill="lightpink"/>
|
||||
<rect width="12.00" height="12.00" x="210.00" y="73.00" fill="lightpink"/>
|
||||
<rect width="12.00" height="12.00" x="210.00" y="73.00" fill="forestgreen"/>
|
||||
<rect width="12.00" height="12.00" x="224.00" y="73.00" fill="forestgreen"/>
|
||||
<rect width="12.00" height="12.00" x="238.00" y="73.00" fill="lightpink"/>
|
||||
<rect width="12.00" height="12.00" x="252.00" y="73.00" fill="lightpink"/>
|
||||
|
@ -1031,7 +1031,7 @@
|
|||
<rect width="11.16" height="11.48" x="525.71" y="379.93" fill="forestgreen"/>
|
||||
<rect width="11.16" height="11.48" x="525.71" y="393.41" fill="lightpink"/>
|
||||
<rect width="11.16" height="11.42" x="525.71" y="406.88" fill="lightpink"/>
|
||||
<rect width="11.16" height="11.19" x="525.71" y="420.30" fill="lightpink"/>
|
||||
<rect width="11.16" height="11.19" x="525.71" y="420.30" fill="forestgreen"/>
|
||||
<rect width="11.16" height="11.19" x="525.71" y="433.49" fill="lightpink"/>
|
||||
<rect width="11.16" height="11.19" x="525.71" y="446.68" fill="forestgreen"/>
|
||||
<rect width="11.16" height="11.08" x="525.71" y="459.88" fill="forestgreen"/>
|
||||
|
@ -1459,10 +1459,10 @@
|
|||
<rect width="-0.46" height="0.42" x="695.22" y="535.58" fill="mistyrose"/>
|
||||
<rect width="-0.76" height="-0.18" x="696.76" y="535.58" fill="mistyrose"/>
|
||||
<rect width="-0.76" height="-1.39" x="696.76" y="537.39" fill="lightpink"/>
|
||||
<rect width="12.00" height="12.00" x="0.00" y="564.50" fill="forestgreen"/><text alignment-baseline="central" x="17.00" y="570.50" style="font-family: sans-serif; font-size: 15px">Functions decompiled (count): 34.57%</text>
|
||||
<rect width="12.00" height="12.00" x="0.00" y="582.50" fill="forestgreen"/><text alignment-baseline="central" x="17.00" y="588.50" style="font-family: sans-serif; font-size: 15px">Functions decompiled (bytesize): 34.54%</text>
|
||||
<rect width="12.00" height="12.00" x="0.00" y="600.50" fill="lightpink"/><text alignment-baseline="central" x="17.00" y="606.50" style="font-family: sans-serif; font-size: 15px">Functions not decompiled, but with known names (count): 51.44%</text>
|
||||
<rect width="12.00" height="12.00" x="0.00" y="618.50" fill="lightpink"/><text alignment-baseline="central" x="17.00" y="624.50" style="font-family: sans-serif; font-size: 15px">Functions not decompiled, but with known names (bytesize): 49.49%</text>
|
||||
<rect width="12.00" height="12.00" x="0.00" y="564.50" fill="forestgreen"/><text alignment-baseline="central" x="17.00" y="570.50" style="font-family: sans-serif; font-size: 15px">Functions decompiled (count): 34.71%</text>
|
||||
<rect width="12.00" height="12.00" x="0.00" y="582.50" fill="forestgreen"/><text alignment-baseline="central" x="17.00" y="588.50" style="font-family: sans-serif; font-size: 15px">Functions decompiled (bytesize): 34.64%</text>
|
||||
<rect width="12.00" height="12.00" x="0.00" y="600.50" fill="lightpink"/><text alignment-baseline="central" x="17.00" y="606.50" style="font-family: sans-serif; font-size: 15px">Functions not decompiled, but with known names (count): 51.30%</text>
|
||||
<rect width="12.00" height="12.00" x="0.00" y="618.50" fill="lightpink"/><text alignment-baseline="central" x="17.00" y="624.50" style="font-family: sans-serif; font-size: 15px">Functions not decompiled, but with known names (bytesize): 49.39%</text>
|
||||
<rect width="12.00" height="12.00" x="0.00" y="636.50" fill="mistyrose"/><text alignment-baseline="central" x="17.00" y="642.50" style="font-family: sans-serif; font-size: 15px">Functions not decompiled, with unknown names (count): 13.99%</text>
|
||||
<rect width="12.00" height="12.00" x="0.00" y="654.50" fill="mistyrose"/><text alignment-baseline="central" x="17.00" y="660.50" style="font-family: sans-serif; font-size: 15px">Functions not decompiled, with unknown names (bytesize): 15.97%</text>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 110 KiB After Width: | Height: | Size: 110 KiB |
|
@ -292,7 +292,7 @@ ControlRicochet1 0x0041A4D0 0x00000030 *
|
|||
Twinkle ---------- ---------- -
|
||||
ControlTwinkle 0x0041A500 0x0000004C *
|
||||
ItemSparkle 0x0041A550 0x00000115 *
|
||||
FxLaraBubbles 0x0041A670 0x000000E8 -
|
||||
FxLaraBubbles 0x0041A670 0x000000E8 +
|
||||
ControlBubble1 0x0041A760 0x000000FF +
|
||||
Splash 0x0041A860 0x000000CD *
|
||||
ControlSplash1 0x0041A930 0x0000007A *
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
#define MAGNUM_AMMO_QTY (MAGNUM_AMMO_CLIP * 2)
|
||||
#define UZI_AMMO_QTY (UZI_AMMO_CLIP * 2)
|
||||
#define SHOTGUN_AMMO_QTY (SHOTGUN_AMMO_CLIP * NUM_SG_SHELLS)
|
||||
#define SFX_UNDERWATER 1
|
||||
#define SFX_ALWAYS 2
|
||||
#define NUM_EFFECTS 100
|
||||
#define DEATH_WAIT (10 * 30)
|
||||
|
|
|
@ -1,11 +1,42 @@
|
|||
#include "3dsystem/phd_math.h"
|
||||
#include "game/control.h"
|
||||
#include "game/effects.h"
|
||||
#include "game/game.h"
|
||||
#include "game/items.h"
|
||||
#include "game/sphere.h"
|
||||
#include "game/vars.h"
|
||||
#include "config.h"
|
||||
#include "util.h"
|
||||
|
||||
void FxLaraBubbles(ITEM_INFO* item)
|
||||
{
|
||||
int32_t count = (GetRandomDraw() * 3) / 0x8000;
|
||||
if (!count) {
|
||||
return;
|
||||
}
|
||||
|
||||
SoundEffect(37, &item->pos, SFX_UNDERWATER);
|
||||
|
||||
PHD_VECTOR offset;
|
||||
offset.x = 0;
|
||||
offset.y = 0;
|
||||
offset.z = 50;
|
||||
GetJointAbsPosition(item, &offset, LM_HEAD);
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
int16_t fx_num = CreateEffect(item->room_number);
|
||||
if (fx_num != NO_ITEM) {
|
||||
FX_INFO* fx = &Effects[fx_num];
|
||||
fx->pos.x = offset.x;
|
||||
fx->pos.y = offset.y;
|
||||
fx->pos.z = offset.z;
|
||||
fx->speed = 10 + ((GetRandomDraw() * 6) / 0x8000);
|
||||
fx->frame_number = -((GetRandomDraw() * 3) / 0x8000);
|
||||
fx->object_number = O_BUBBLES1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ControlBubble1(int16_t fx_num)
|
||||
{
|
||||
FX_INFO* fx = &Effects[fx_num];
|
||||
|
@ -60,6 +91,7 @@ void FxChainBlock(ITEM_INFO* item)
|
|||
|
||||
void T1MInjectGameEffects()
|
||||
{
|
||||
INJECT(0x0041A670, FxLaraBubbles);
|
||||
INJECT(0x0041A760, ControlBubble1);
|
||||
INJECT(0x0041AD00, FxChainBlock);
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#define DoBloodSplat ((int16_t (*)(int32_t x, int32_t y, int32_t z, int16_t speed, PHD_ANGLE direction, int16_t room_num))0x0041A310)
|
||||
// clang-format on
|
||||
|
||||
void FxLaraBubbles(ITEM_INFO* item);
|
||||
void ControlBubble1(int16_t fx_num);
|
||||
void FxChainBlock(ITEM_INFO* item);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue