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

Method Init

src/SB/Game/zNPCTypeBossSandy.cpp:304–373  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

302}
303
304void zNPCBSandy::Init(xEntAsset* asset)
305{
306 S32 i;
307 xEnt* ent;
308 char objName[32];
309 xMarkerAsset* laserMarker;
310 U32 colorPicker;
311 RwRGBA* _col;
312 // RwRGBA* _col;
313 // RwRGBA* _col;
314 // RwRGBA* _col;
315
316 zNPCCommon::Init(asset);
317 sSandyPtr = this;
318
319 this->round = 1;
320 this->firstTimeR1Csn = 1;
321 this->boundFlags = (U32*)xMemAlloc(gActiveHeap, 13 * sizeof(U32), 0x0);
322 this->boundList = (xEnt**)xMemAlloc(gActiveHeap, 13 * sizeof(xEnt*), 0x0);
323 this->curveNode[0].time = 0.0f;
324 this->curveNode[0].scale = 1.0f;
325 colorPicker = 255.0f;
326 this->curveNode[1].color.a = 0xff;
327 this->curveNodeAlpha = 1.0f;
328 this->laserShow.set_curve(&this->curveNode[0], 0x6);
329 this->laserShow.cfg.life_time = 0.5f;
330 this->laserShow.cfg.blend_src = 0x5;
331 this->laserShow.cfg.blend_dst = 0x2;
332 this->laserShow.refresh_config();
333 this->laserShow.set_texture(xStrHash("lightning"));
334
335 for (i = 0; i < 30; i++)
336 {
337 sNFSoundValue[i] = xStrHash(sNFSoundLabel[i]);
338 }
339
340 RwIm3DVertexSetPos(&this->iconVert[0], 1.0f, 0.0f, 1.0f);
341 RwIm3DVertexSetPos(&this->iconVert[1], -1.0f, 1.0f, 1.0f);
342 RwIm3DVertexSetPos(&this->iconVert[2], 0.0f, -1.0f, -1.0f);
343 RwIm3DVertexSetPos(&this->iconVert[3], -1.0f, 0.0f, -1.0f);
344
345 RwIm3DVertexSetRGBA(&this->iconVert[0], 0xff, 0xff, 0xff, 0xff);
346 RwIm3DVertexSetRGBA(&this->iconVert[1], 0xff, 0xff, 0xff, 0xff);
347 RwIm3DVertexSetRGBA(&this->iconVert[2], 0xff, 0xff, 0xff, 0xff);
348 RwIm3DVertexSetRGBA(&this->iconVert[3], 0xff, 0xff, 0xff, 0xff);
349
350 RwIm3DVertexSetUV(&this->iconVert[0], 0.0f, 0.0f);
351 RwIm3DVertexSetUV(&this->iconVert[1], 1.0f, 0.0f);
352 RwIm3DVertexSetUV(&this->iconVert[2], 0.0f, 1.0f);
353 RwIm3DVertexSetUV(&this->iconVert[3], 1.0f, 1.0f);
354
355 this->wireLight[0] = 0;
356 this->wireLight[1] = 0;
357
358 xDebugAddTweak("NPC|zNPCBSandy|Newsfish", "Speak", &newsfish_cb, 0, 0);
359 xDebugAddSelectTweak("NPC|zNPCBSandy|NewsfishComment", &sCurrNFSound, 0, &sNFSoundValue[0], 0x1e, 0, 0, 0);
360 xDebugAddTweak("NPC|zNPCBSandy|Shockwave|Do It", "Go", &shockwave_cb, 0, 0);
361

Callers

nothing calls this directly

Calls 8

xDebugAddSelectTweakFunction · 0.85
xDebugAddTweakFunction · 0.70
InitFunction · 0.50
xMemAllocFunction · 0.50
xStrHashFunction · 0.50
set_curveMethod · 0.45
refresh_configMethod · 0.45
set_textureMethod · 0.45

Tested by

no test coverage detected