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

Method select_texture_unit

src/SB/Core/x/xDecal.cpp:346–360  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

344}
345
346S32 xDecalEmitter::select_texture_unit()
347{
348 switch (this->cfg.texture.mode)
349 {
350 case TM_RANDOM:
351 return (xrand() / 8192) % this->texture.units;
352 case TM_CYCLE:
353 S32 id = this->texture.prev;
354 this->texture.prev = this->texture.prev + 1;
355 return id % this->texture.units;
356 case TM_DEFAULT:
357 default:
358 return 0;
359 }
360}

Callers 1

emitMethod · 0.95

Calls 1

xrandFunction · 0.85

Tested by

no test coverage detected