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

Method Setup

src/SB/Game/zNPCTypeCommon.cpp:327–430  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

325}
326
327void zNPCCommon::Setup()
328{
329 xSceneID2Name(globals.sceneCur, this->id);
330
331 xNPCBasic::Setup();
332
333 this->DBG_InstName();
334 this->DBG_RptDataSize();
335
336 this->npcsetass = zNPCSettings_Find(this->npcass->npcProps);
337
338 this->ParseLinks();
339
340 if (this->LassoInit())
341 {
342 this->LassoSetup();
343 }
344
345 this->SelfSetup();
346 this->DBG_AddTweakers();
347
348 switch (this->SelfType())
349 {
350 case NPC_TYPE_HAMMER:
351 case NPC_TYPE_HAMSPIN:
352 this->explosion = (zShrapnelAsset*)xSTFindAsset(xStrHash("hammer_shrapnel"), NULL);
353 break;
354 case NPC_TYPE_TARTAR:
355 this->explosion = (zShrapnelAsset*)xSTFindAsset(xStrHash("tartar_shrapnel"), NULL);
356 break;
357 case NPC_TYPE_FODDER:
358 this->explosion = (zShrapnelAsset*)xSTFindAsset(xStrHash("fodder_shrapnel"), NULL);
359 break;
360 case NPC_TYPE_FODBZZT:
361 this->explosion = (zShrapnelAsset*)xSTFindAsset(xStrHash("robot_0a_bzzt_shrapnel"), NULL);
362 break;
363 case NPC_TYPE_CHOMPER:
364 this->explosion =
365 (zShrapnelAsset*)xSTFindAsset(xStrHash("robot_0a_chomper_shrapnel"), NULL);
366 break;
367 case NPC_TYPE_GLOVE:
368 this->explosion = (zShrapnelAsset*)xSTFindAsset(xStrHash("g-love_shrapnel"), NULL);
369 break;
370 case NPC_TYPE_MONSOON:
371 this->explosion =
372 (zShrapnelAsset*)xSTFindAsset(xStrHash("robot_4a_monsoon_shrapnel"), NULL);
373 break;
374 case NPC_TYPE_SLEEPY:
375 this->explosion =
376 (zShrapnelAsset*)xSTFindAsset(xStrHash("robot_sleepy-time_shrapnel"), NULL);
377 break;
378 case NPC_TYPE_ARFARF:
379 this->explosion = (zShrapnelAsset*)xSTFindAsset(xStrHash("robot_arf_shrapnel"), NULL);
380 break;
381 case NPC_TYPE_CHUCK:
382 this->explosion = (zShrapnelAsset*)xSTFindAsset(xStrHash("robot_chuck_shrapnel"), NULL);
383 break;
384 case NPC_TYPE_SLICK:

Callers

nothing calls this directly

Calls 15

DBG_InstNameMethod · 0.95
DBG_RptDataSizeMethod · 0.95
ParseLinksMethod · 0.95
LassoInitMethod · 0.95
LassoSetupMethod · 0.95
SelfSetupMethod · 0.95
DBG_AddTweakersMethod · 0.95
ResetMethod · 0.95
xSceneID2NameFunction · 0.85
zNPCSettings_FindFunction · 0.85
SelfTypeMethod · 0.80
ImmTranIsOnMethod · 0.80

Tested by

no test coverage detected