MCPcopy Create free account
hub / github.com/diasurgical/devilution / InitObjectGFX

Function InitObjectGFX

Source/objects.cpp:80–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78};
79
80void InitObjectGFX()
81{
82 BOOLEAN fileload[56];
83 char filestr[32];
84 int i, j;
85
86 memset(fileload, FALSE, sizeof(fileload));
87
88 for (i = 0; AllObjects[i].oload != -1; i++) {
89 if (AllObjects[i].oload == 1
90 && (int)currlevel >= AllObjects[i].ominlvl
91 && (int)currlevel <= AllObjects[i].omaxlvl) {
92 fileload[AllObjects[i].ofindex] = TRUE;
93 }
94 if (AllObjects[i].otheme != THEME_NONE) {
95 for (j = 0; j < numthemes; j++) {
96 if (themes[j].ttype == AllObjects[i].otheme)
97 fileload[AllObjects[i].ofindex] = TRUE;
98 }
99 }
100
101 if (AllObjects[i].oquest != -1) {
102 if (QuestStatus(AllObjects[i].oquest))
103 fileload[AllObjects[i].ofindex] = TRUE;
104 }
105 }
106
107 for (i = 0; i < 56; i++) {
108 if (fileload[i]) {
109 ObjFileList[numobjfiles] = i;
110 sprintf(filestr, "Objects\\%s.CEL", ObjMasterLoadList[i]);
111 pObjCels[numobjfiles] = LoadFileInMem(filestr, NULL);
112 numobjfiles++;
113 }
114 }
115}
116
117void FreeObjectGFX()
118{

Callers 1

LoadAllGFXFunction · 0.85

Calls 2

QuestStatusFunction · 0.85
LoadFileInMemFunction · 0.85

Tested by

no test coverage detected