Skip to content

Commit 4f2f2a3

Browse files
Partial matches for more Jellyfish functions (#395)
* Match zNPCGoalJellyAttack::Enter(float, void*) My first Function in god knows how long. * Even more functions out of the way Thanks to Square for helping with ZapperStop! * Even more functions out of the way Thanks to Square for helping with ZapperStop! * Thank you, Square
1 parent 877c936 commit 4f2f2a3

File tree

3 files changed

+48
-1
lines changed

3 files changed

+48
-1
lines changed

src/SB/Game/zEntSimpleObj.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,18 @@
55
void zEntSimpleObj_Move(xEnt*, xScene*, F32, xEntFrame*)
66
{
77
}
8+
9+
void zEntSimpleObj_Setup(zEntSimpleObj *arg0)
10+
{
11+
zEntSetup((zEnt *) arg0);
12+
}
13+
14+
void zEntSimpleObj_Save(zEntSimpleObj *arg0, xSerial *arg1)
15+
{
16+
zEntSave((zEnt *) arg0, arg1);
17+
}
18+
19+
void zEntSimpleObj_Load(zEntSimpleObj *arg0, xSerial *arg1)
20+
{
21+
zEntLoad((zEnt *) arg0, arg1);
22+
}

src/SB/Game/zNPCGoalAmbient.cpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,28 @@ S32 zNPCGoalJellyAttack::Enter(F32 arg0, void* arg1)
2626
zNPCGoalJellyAttack::ZapperStart();
2727
return zNPCGoalPushAnim::Enter(arg0, arg1);
2828
}
29+
30+
S32 zNPCGoalJellyAttack::Exit(F32 arg0, void* arg1)
31+
{
32+
zNPCGoalJellyAttack::ZapperStop();
33+
return zNPCGoalPushAnim::Exit(arg0, arg1);
34+
}
35+
36+
S32 zNPCGoalJellyAttack::Process(en_trantype* arg0, F32 arg1, void* arg2, xScene* arg3)
37+
{
38+
zNPCGoalJellyAttack::ZapperUpdate();
39+
return zNPCGoalPushAnim::Process(arg0, arg1, arg2, arg3);
40+
}
41+
42+
S32 zNPCGoalJellyAttack::ZapperStop()
43+
{
44+
zNPC_SNDStop((_tageNPCSnd) 4);
45+
for (S32 i = 0; i< 3; ++i)
46+
{
47+
if(zap_lytnin[i] != NULL)
48+
{
49+
zLightningKill(zap_lytnin[i]);
50+
}
51+
zap_lytnin[i] = NULL;
52+
}
53+
}

src/SB/Game/zNPCGoalAmbient.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#include "zNPCGoalStd.h"
77
#include "zNPCSndTable.h"
88
#include "zNPCTypeAmbient.h"
9+
#include "zNPCSupport.h"
10+
#include "zLightning.h"
911

1012

1113
xFactoryInst* GOALCreate_Ambient(S32 who, RyzMemGrow* grow, void*);
@@ -22,9 +24,14 @@ struct zNPCGoalJellyBirth : zNPCGoalCommon
2224

2325
struct zNPCGoalJellyAttack : zNPCGoalPushAnim
2426
{
27+
class zLightning * zap_lytnin[3];
2528
U32 lastAnimTime;
2629
S32 Enter(F32 dt, void* updCtxt);
27-
S32 ZapperStart();
30+
S32 Exit(F32 dt, void* updCtxt);
31+
S32 Process(en_trantype* trantyp, F32 dt, void* updCxt, xScene* xscn);
32+
S32 ZapperStart();
33+
S32 ZapperStop();
34+
S32 ZapperUpdate();
2835
};
2936

3037
#endif

0 commit comments

Comments
 (0)