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

Function zNPCGlyph_ScenePrepare

src/SB/Game/zNPCGlyph.cpp:55–93  ·  view source on GitHub ↗

Nonmatching

Source from the content-addressed store, hash-verified

53
54// Nonmatching
55void zNPCGlyph_ScenePrepare()
56{
57 S32 i;
58 NPCGlyph* glist = NULL;
59
60 for (i = 0; i < 10; i++)
61 {
62 g_cnt_activeGlyphs[i] = 0;
63 }
64
65 char** strs = &g_strz_glyphmodel[NPC_GLYPH_SHINYONE];
66
67 for (en_npcglyph gtyp = NPC_GLYPH_SHINYONE; gtyp < NPC_GLYPH_NOMORE;
68 gtyp = (en_npcglyph)(gtyp + 1), strs++)
69 {
70 S32 cnt = zNPCGlyph_TypeToList(gtyp, &glist);
71
72 if (glist == NULL || cnt < 1)
73 {
74 continue;
75 }
76
77 RpAtomic* model_data = NULL;
78 if (*strs != NULL)
79 {
80 U32 aid = xStrHash(*strs);
81 if (aid != 0)
82 {
83 model_data = (RpAtomic*)xSTFindAsset(aid, NULL);
84 }
85 }
86
87 for (i = 0; i < cnt; i++)
88 {
89 NPCGlyph* glyph = &glist[i];
90 glyph->Init(gtyp, model_data);
91 }
92 }
93}
94
95void zNPCGlyph_SceneFinish()
96{

Callers 1

NPCSupport_ScenePrepareFunction · 0.70

Calls 4

zNPCGlyph_TypeToListFunction · 0.70
xStrHashFunction · 0.50
xSTFindAssetFunction · 0.50
InitMethod · 0.45

Tested by

no test coverage detected