Skip to content
Open
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
37 changes: 29 additions & 8 deletions src/SB/Core/x/xNPCBasic.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ enum en_npcdcat
eNPCDCAT_Ten = 10,
eNPCDCAT_Eleven = 11,
eNPCDCAT_Thirteen = 13,
eNPCDCAT_Fourteen = 14,
};

struct xNPCBasic : xEnt, xFactoryInst
Expand Down Expand Up @@ -62,7 +63,10 @@ struct xNPCBasic : xEnt, xFactoryInst
// Offset: 0x138
xShadowSimpleCache simpShadow_embedded;

xNPCBasic(S32);
xNPCBasic(S32 value)
{
myNPCType = value;
}

S32 SelfType() const;
void RestoreColFlags()
Expand All @@ -76,16 +80,25 @@ struct xNPCBasic : xEnt, xFactoryInst
}

void DBG_PStatClear();
void DBG_PStatCont(en_npcperf stat);
void DBG_PStatOn(en_npcperf stat);
void DBG_PStatOn(en_npcperf stat)
{
}

void DBG_PStatCont(en_npcperf stat)
{
}
S32 DBG_IsNormLog(en_npcdcat input, S32 input2);
void DBG_HaltOnMe(U32, char*);

// DO NOT CHANGE THE ORDER OF THESE, the order determines the
// vtable layout which needs to remain fixed.
virtual void Init(xEntAsset* asset);
virtual void PostInit();
virtual void Setup();
virtual void PostInit()
{
}
virtual void Setup()
{
}

virtual void PostSetup()
{
Expand All @@ -95,10 +108,18 @@ struct xNPCBasic : xEnt, xFactoryInst
virtual void Process(xScene* xscn, F32 dt);
virtual void BUpdate(xVec3*);
virtual void NewTime(xScene* xscn, F32 dt);
virtual void Move(xScene* xscn, F32 dt, xEntFrame* frm);
virtual void Move(xScene* xscn, F32 dt, xEntFrame* frm)
{
}
virtual S32 SysEvent(xBase* from, xBase* to, U32 toEvent, const F32* toParam,
xBase* toParamWidget, S32* handled);
virtual void Render();
xBase* toParamWidget, S32* handled)
{
return 1;
}
virtual void Render()
{
xEntRender(this);
}
virtual void Save(xSerial*) const;
virtual void Load(xSerial*);
virtual void CollideReview();
Expand Down
5 changes: 5 additions & 0 deletions src/SB/Core/x/xSnd.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,9 @@ inline U32 xSndPlay3D(U32 id, F32 vol, F32 pitch, U32 priority, U32 flags, xEnt*
return xSndPlay3D(id, vol, pitch, priority, flags, ent, radius / 4.0f, radius, category, delay);
}

inline U32 xSndIsPlaying(U32 assetID, U32 parid)
{
return iSndIsPlaying(assetID, parid);
}

#endif
2 changes: 1 addition & 1 deletion src/SB/Game/zLasso.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ struct zLassoGuideList // Size: 0xE0
void zLasso_scenePrepare();
void zLasso_InitTimer(zLasso* lasso, F32 interpTime);
void zLasso_ResetTimer(zLasso* lasso, F32 interpTime);
void zLasso_AddGuide(xEnt* ent, xAnimState* lassoAnim, xModelInstance modelInst);
void zLasso_AddGuide(xEnt* ent, xAnimState* lassoAnim, xModelInstance* modelInst);
void zLasso_SetGuide(xEnt* ent, xAnimState* lassoAnim);
void zLasso_InterpToGuide(zLasso* lasso);

Expand Down
3 changes: 2 additions & 1 deletion src/SB/Game/zNPCSndTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ struct NPCSndQueue //0x14
};

void NPCS_Startup();
void NPCS_Shutdown();
void NPCS_SndTimersUpdate(F32 dt);
void NPCS_SndTimersReset();
void NPCS_SndTypePlayed(en_NPC_SOUND sndtype, F32 delayNext);
S32 NPCS_SndOkToPlay(en_NPC_SOUND sndtype);
void NPCS_SndTablePrepare(NPCSndTrax* trax);
NPCSndProp* NPCS_SndFindProps(en_NPC_SOUND sndtype);
en_NPC_SOUND NPCS_SndTypeFromHash(U32 aid_snd, NPCSndTrax* cust, NPCSndTrax* share);
void NPCS_Shutdown();
U32 NPCS_SndPickSimilar(en_NPC_SOUND sndtype, NPCSndTrax* cust, NPCSndTrax* share);

#endif
4 changes: 2 additions & 2 deletions src/SB/Game/zNPCSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -843,9 +843,9 @@ S32 NPCC_LampStatus()
return g_pc_playerInvisible == 0 ? true : false;
}

bool NPCC_ForceTalkOk()
U32 NPCC_ForceTalkOk()
{
return globals.player.g.DisableForceConversation == 0 ? 1 : 0;
return globals.player.g.DisableForceConversation == 0;
}

RwRaster* NPCC_FindRWRaster(const char* txtrname)
Expand Down
3 changes: 2 additions & 1 deletion src/SB/Game/zNPCSupport.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,14 @@ struct Firework
void Detonate();
};

bool NPCC_ForceTalkOk();
U32 NPCC_ForceTalkOk();
void NPCWidget_Startup();
void NPCWidget_Shutdown();
void NPCWidget_ScenePrepare();
void NPCWidget_SceneFinish();
void NPCWidget_SceneReset();
void NPCWidget_ScenePostInit();
NPCWidget* NPCWidget_Find(en_NPC_UI_WIDGETS which);
void NPCSupport_Startup();
void NPCSupport_ScenePrepare();
void NPCSupport_SceneFinish();
Expand Down
Loading