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

Function xSTUnLoadScene

src/SB/Core/x/xstransvc.cpp:153–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153void xSTUnLoadScene(U32 sid, S32 flg_hiphop)
154{
155 st_STRAN_SCENE* sdata;
156 if (sid == 0)
157 {
158 S32 cnt = XST_cnt_locked();
159
160 for (int i = 0; i < cnt; i++)
161 {
162 sdata = XST_nth_locked(i);
163 if (sdata->spkg != NULL)
164 {
165 g_pkrf->Done(sdata->spkg);
166 }
167 sdata->spkg = NULL;
168 }
169 XST_unlock_all();
170 }
171 else
172 {
173 sdata = XST_find_bySID(sid, (flg_hiphop & 3) == 2 ? 1 : 0);
174 if (sdata != NULL)
175 {
176 if (sdata->spkg != NULL)
177 {
178 g_pkrf->Done(sdata->spkg);
179 }
180 sdata->spkg = NULL;
181 }
182 XST_unlock(sdata);
183 }
184}
185
186F32 xSTLoadStep(U32)
187{

Callers 2

zEntPlayer_UnloadSoundsFunction · 0.50
zSceneExitFunction · 0.50

Calls 6

XST_cnt_lockedFunction · 0.85
XST_nth_lockedFunction · 0.85
XST_unlock_allFunction · 0.85
XST_unlockFunction · 0.85
XST_find_bySIDFunction · 0.70
DoneMethod · 0.45

Tested by

no test coverage detected