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

Function xEntInit

src/SB/Core/x/xEnt.cpp:261–304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259}
260
261void xEntInit(xEnt* ent, xEntAsset* asset)
262{
263 xBaseInit(ent, asset);
264
265 // non-matching: instruction order
266
267 ent->asset = asset;
268 ent->update = xEntUpdate;
269 ent->bupdate = xEntDefaultBoundUpdate;
270 ent->render = xEntRender;
271 ent->move = NULL;
272 ent->transl = xEntDefaultTranslate;
273 ent->flags = asset->flags;
274 ent->miscflags = 0;
275 ent->moreFlags = asset->moreFlags;
276 ent->subType = asset->subtype;
277 ent->pflags = asset->pflags;
278 ent->ffx = NULL;
279 ent->num_ffx = 0;
280 ent->driver = NULL;
281 ent->model = NULL;
282 ent->collModel = NULL;
283 ent->camcollModel = NULL;
284 ent->frame = NULL;
285 ent->collis = NULL;
286 ent->lightKit = NULL;
287 ent->simpShadow = NULL;
288 ent->entShadow = NULL;
289 ent->baseFlags |= 0x20;
290
291 xGridBoundInit(&ent->gridb, ent);
292
293 ent->anim_coll = NULL;
294
295 if (all_ents_box_init)
296 {
297 iBoxInitBoundVec(&all_ents_box, &asset->pos);
298 all_ents_box_init = 0;
299 }
300 else
301 {
302 iBoxBoundVec(&all_ents_box, &all_ents_box, &asset->pos);
303 }
304}
305
306void xEntInitForType(xEnt* ent)
307{

Callers 4

zUI_InitFunction · 0.85
zEntInitFunction · 0.85
InitMethod · 0.85
xEntBoulder_InitFunction · 0.85

Calls 4

xBaseInitFunction · 0.85
xGridBoundInitFunction · 0.85
iBoxInitBoundVecFunction · 0.85
iBoxBoundVecFunction · 0.85

Tested by

no test coverage detected