Skip to content
29 changes: 29 additions & 0 deletions src/SB/Game/zNPCSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,31 @@ void NPCWidget_ScenePostInit()
{
}

void NPCWidget_Find(en_NPC_UI_WIDGETS)
{
zSceneFindObject(g_hash_uiwidgets[1]);
}

void NPCWidget::Init(en_NPC_UI_WIDGETS)
{
}

void NPCTarget::TargetClear()
{
ent_target = 0; //0x4?
typ_target = NPC_TGT_NONE;
}

void NPCBlinker::Reset()
{
}

void Firework_Release(Firework* firework)
{
firework->Cleanup();
firework->fwstate = FW_STAT_UNUSED;
}

void Firework_ScenePrepare()
{
NPAR_PartySetup(NPAR_TYP_FIREWORKS, NULL, NULL);
Expand All @@ -119,6 +144,10 @@ void Firework_SceneFinish()
Firework_SceneReset(1);
}

void Firework::Cleanup()
{
}

void Firework_SceneReset(int)
{
}
Expand Down
46 changes: 45 additions & 1 deletion src/SB/Game/zNPCSupport.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,41 @@ enum en_NPC_UI_WIDGETS
NPC_UI_WIDGETS_unk // Come back after more data is put in
};

enum en_fwstate
{
FW_STAT_UNUSED,
FW_STAT_READY,
FW_STAT_FLIGHT,
FW_STAT_BOOM,
FW_STAT_DONE,
FW_STAT_NOMORE,
FW_STAT_FORCE = 0x7fffffff
};

enum en_fwstyle
{
FW_STYL_DEFAULT,
FW_STYL_JULY4TH,
FW_STYL_XMAS,
FW_STYL_STPATS,
FW_STYL_VALENTINE,
FW_STYL_NOMORE,
FW_STYL_FORCE = 0x7fffffff
};

struct NPCTarget
{
en_npctgt typ_target;
union
{
xEnt* ent_target;
xEnt* ent_target; //0x4
xBase* bas_target;
xVec3 pos_target;
zMovePoint* nav_target;
};
zNPCCommon* npc_owner;

void TargetClear();
};

struct NPCBlinker
Expand All @@ -62,6 +86,25 @@ struct NPCWidget
U32 Off(zNPCCommon* npc, U32 theman);
U32 On(zNPCCommon* npc, U32 theman);
void Reset();
void Init(en_NPC_UI_WIDGETS);
};

struct Firework
{
struct
{
en_fwstate fwstate : 8;
en_fwstyle fwstyle : 8;
S32 flg_firework : 16; //0x2
};
F32 tym_lifespan;
F32 tmr_remain; //0x14?
xVec3 pos;
xVec3 vel;

void FlyFlyFly(F32 dt);
void Update(F32 dt);
void Cleanup();
};

bool NPCC_ForceTalkOk();
Expand All @@ -82,6 +125,7 @@ void Firework_SceneReset(S32);
void Firework_ScenePrepare();
void Firework_SceneFinish();
void Firework_Timestep(F32 dt);
void Firework_Release(Firework*);
RwTexture* NPCC_FindRWTexture(U32 hashid);
RwTexture* NPCC_FindRWTexture(const char* txtrname);
RwRaster* NPCC_FindRWRaster(const char* txtrname);
Expand Down