MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / NPCPS_MsgPoolReset

Function NPCPS_MsgPoolReset

src/SB/Game/zNPCMessenger.cpp:174–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172}
173
174static void NPCPS_MsgPoolReset(NPCPSData* npc)
175{
176 npc->quelist.cnt = 0;
177 S32 max_msgs = npc->quelist.max;
178 memset(npc->msgblob, 0, max_msgs * sizeof(NPCMsg));
179 npc->msgfree = NULL;
180
181 for (S32 i = 0; i < max_msgs; i++)
182 {
183 NPCMsg* current_msg = &npc->msgblob[i];
184
185 current_msg->next = npc->msgfree;
186 npc->msgfree = current_msg;
187 }
188}
189
190static void NPCPS_CltPoolInit(NPCPSData* npc, S32 unk)
191{

Callers 2

zNPCMsg_SceneResetFunction · 0.85
NPCPS_MsgPoolInitFunction · 0.85

Calls 1

memsetFunction · 0.85

Tested by

no test coverage detected