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

Method get_text

src/SB/Game/zTaskBox.cpp:309–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

307}
308
309U32 ztaskbox::get_text(U32 textID)
310{
311 U32 id = textID;
312 xGroup* group = (xGroup*)zSceneFindObject(textID);
313 if (group != NULL)
314 {
315 if (group->baseType != eBaseTypeGroup)
316 {
317 return 0;
318 }
319
320 id = group->get_any();
321 }
322
323 if (id == 0)
324 {
325 return 0;
326 }
327
328 // What type is this?
329 void* asset = xSTFindAsset(id, NULL);
330 if (asset == NULL)
331 {
332 return 0;
333 }
334 else
335 {
336 // HACK
337 return (U32)asset + 4;
338 }
339}
340
341S32 ztaskbox::cb_dispatch(xBase*, xBase* to, U32 event, const F32*, xBase*)
342{

Callers 3

start_talkMethod · 0.45
var_textFunction · 0.45
setupMethod · 0.45

Calls 3

zSceneFindObjectFunction · 0.85
get_anyMethod · 0.80
xSTFindAssetFunction · 0.50

Tested by

no test coverage detected