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

Method Setup

src/SB/Game/zNPCTypeDuplotron.cpp:111–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111void zNPCDuplotron::Setup()
112{
113 RwTexture* tmp_txtr;
114 en_SM_WAVE_MODE wm;
115
116 this->spawner = zNPCSpawner_GetInstance();
117 if (this->spawner != NULL)
118 {
119 this->spawner->Subscribe(this);
120 }
121 zNPCCommon::Setup();
122 if (this->spawner != NULL)
123 {
124 switch (this->npcset.duploWaveMode)
125 {
126 case NPCP_DUPOWAVE_DISCREET:
127 wm = SM_WAVE_DISCREET;
128 break;
129
130 case NPCP_DUPOWAVE_CONTINUOUS:
131 default:
132 wm = SM_WAVE_CONTINUOUS;
133 break;
134 }
135
136 this->spawner->SetWaveMode(wm, this->npcset.duploSpawnDelay,
137 this->npcset.duploSpawnLifeMax);
138 }
139 this->cfg_npc->snd_trax = g_sndTrax_Duplotron;
140 NPCS_SndTablePrepare(g_sndTrax_Duplotron);
141 if ((this->rast_blinky == NULL) &&
142 (tmp_txtr = NPCC_FindRWTexture("fx_duplotron_lamp"), tmp_txtr != NULL))
143 {
144 this->rast_blinky = tmp_txtr->raster;
145 }
146 return;
147}
148
149void zNPCDuplotron::ParseINI()
150{

Callers

nothing calls this directly

Calls 6

NPCC_FindRWTextureFunction · 0.85
SetWaveModeMethod · 0.80
zNPCSpawner_GetInstanceFunction · 0.70
NPCS_SndTablePrepareFunction · 0.70
SetupFunction · 0.50
SubscribeMethod · 0.45

Tested by

no test coverage detected