Skip to content

Commit

Permalink
Decompile more of zNPCGoalStd, with some other functions (#338)
Browse files Browse the repository at this point in the history
  • Loading branch information
tgsm authored Aug 1, 2024
1 parent 2798d36 commit dd325c2
Show file tree
Hide file tree
Showing 8 changed files with 953 additions and 51 deletions.
4 changes: 4 additions & 0 deletions src/SB/Core/x/xBehaviour.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ struct xPsyche : RyzMemData
xGoal* GetCurGoal() const;
S32 GIDOfActive() const;
S32 GIDOfPending() const;
S32 GIDOfSafety() const
{
return gid_safegoal;
}
S32 Timestep(F32 dt, void* updCtxt);
xGoal* FindGoal(S32 gid);
S32 GoalSet(S32 gid, S32 r5);
Expand Down
2 changes: 1 addition & 1 deletion src/SB/Core/x/xNPCBasic.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ struct xNPCBasic : xEnt, xFactoryInst
{
S32 flg_basenpc : 16;
S32 inUpdate : 8;
U32 flg_upward : 8;
S32 flg_upward : 8;
} flags1;

// Offset: 0xE8
Expand Down
14 changes: 12 additions & 2 deletions src/SB/Game/zMovePoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,18 @@

struct zMovePoint : xMovePoint
{
F32 RadiusZone();
F32 Delay();
F32 RadiusZone()
{
return asset->zoneRadius;
}
F32 Delay()
{
return asset->delay;
}
xVec3* PosGet()
{
return pos;
}
U32 NumNodes();
U8 IsOn();
};
Expand Down
7 changes: 3 additions & 4 deletions src/SB/Game/zNPCGoalRobo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,9 +453,9 @@ xPsyche* xGoal::GetPsyche() const
return psyche;
}

xVec3* zNPCCommon::XZVecToPlayer(xVec3* unk1, F32* unk2)
void zNPCCommon::XZVecToPlayer(xVec3* unk1, F32* unk2)
{
return zNPCCommon::XZVecToPos(unk1, xEntGetPos(&globals.player.ent), unk2);
XZVecToPos(unk1, xEntGetPos(&globals.player.ent), unk2);
}

RwMatrix* zNPCCommon::BoneMat(S32 unk) const
Expand All @@ -468,8 +468,7 @@ RwV3d* zNPCCommon::BonePos(S32 unk) const
return &this->model->Mat[unk].pos;
}

// Return type is probably wrong
S32 zNPCCommon::XYZDstSqToPlayer(xVec3* unk)
F32 zNPCCommon::XYZDstSqToPlayer(xVec3* unk)
{
return XYZDstSqToPos(xEntGetPos(&globals.player.ent), unk);
}
Expand Down
Loading

0 comments on commit dd325c2

Please sign in to comment.