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

Function GLYF_Acquire

src/SB/Game/zNPCGlyph.cpp:308–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306}
307
308NPCGlyph* GLYF_Acquire(en_npcglyph gtyp)
309{
310 NPCGlyph* glist = NULL;
311 NPCGlyph* ret = NULL;
312 S32 cnt = zNPCGlyph_TypeToList(gtyp, &glist);
313
314 if (glist == NULL || cnt < 1)
315 {
316 return NULL;
317 }
318
319 NPCGlyph* glyph = NULL;
320 for (S32 i = 0; cnt > 0; i++, cnt--)
321 {
322 glyph = &glist[i];
323 if (glyph->flg_glyph & (1 << 0))
324 {
325 continue;
326 }
327
328 glyph->Reset();
329 glyph->flg_glyph = (1 << 0);
330 g_cnt_activeGlyphs[gtyp]++;
331 ret = glyph;
332 break;
333 }
334
335 return ret;
336}
337
338void NPCGlyph::Reset()
339{

Callers 2

GlyphStartMethod · 0.70
EnterMethod · 0.70

Calls 2

zNPCGlyph_TypeToListFunction · 0.70
ResetMethod · 0.45

Tested by

no test coverage detected