Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decompile more of zNPCGoalStd, with some other functions #338

Merged
merged 1 commit into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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