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

Function AddMonsterType

Source/monster.cpp:149–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149int AddMonsterType(int type, int placeflag)
150{
151 BOOL done = FALSE;
152 int i;
153
154 for (i = 0; i < nummtypes && !done; i++) {
155 done = Monsters[i].mtype == type;
156 }
157
158 i--;
159
160 if (!done) {
161 i = nummtypes;
162 nummtypes++;
163 Monsters[i].mtype = type;
164 monstimgtot += monsterdata[type].mImage;
165 InitMonsterGFX(i);
166 InitMonsterSND(i);
167 }
168
169 Monsters[i].mPlaceFlags |= placeflag;
170 return i;
171}
172
173void GetLevelMTypes()
174{

Callers 3

GetLevelMTypesFunction · 0.85
PlaceQuestMonstersFunction · 0.85
SetMapMonstersFunction · 0.85

Calls 2

InitMonsterGFXFunction · 0.85
InitMonsterSNDFunction · 0.85

Tested by

no test coverage detected