MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / LoadLevelObjects

Function LoadLevelObjects

Source/objects.cpp:3783–3805  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3781}
3782
3783void LoadLevelObjects(uint16_t filesWidths[65])
3784{
3785 if (HeadlessMode)
3786 return;
3787
3788 for (const ObjectData objectData : AllObjects) {
3789 if (leveltype == objectData.olvltype) {
3790 filesWidths[objectData.ofindex] = objectData.animWidth;
3791 }
3792 }
3793
3794 for (int i = OFILE_L1BRAZ; i <= OFILE_L5BOOKS; i++) {
3795 if (filesWidths[i] == 0) {
3796 continue;
3797 }
3798
3799 ObjFileList[numobjfiles] = static_cast<object_graphic_id>(i);
3800 char filestr[32];
3801 *BufCopy(filestr, "objects\\", ObjMasterLoadList[i]) = '\0';
3802 pObjCels[numobjfiles] = LoadCel(filestr, filesWidths[i]);
3803 numobjfiles++;
3804 }
3805}
3806
3807void InitObjectGFX()
3808{

Callers 2

InitObjectGFXFunction · 0.85
SetMapObjectsFunction · 0.85

Calls 2

LoadCelFunction · 0.85
BufCopyFunction · 0.50

Tested by

no test coverage detected