MCPcopy Create free account
hub / github.com/Meridian59/Meridian59 / GetMaxObjectNum

Function GetMaxObjectNum

roomedit/source/objects.cpp:160–180  ·  view source on GitHub ↗

get the number of objets of a given type minus one */

Source from the content-addressed store, hash-verified

158 get the number of objets of a given type minus one
159*/
160SHORT GetMaxObjectNum (int objtype)
161{
162 switch (objtype)
163 {
164 case OBJ_THINGS:
165 return NumThings - 1;
166 case OBJ_LINEDEFS:
167 return NumLineDefs - 1;
168 case OBJ_SIDEDEFS:
169 return NumSideDefs - 1;
170 case OBJ_VERTEXES:
171 return NumVertexes - 1;
172 case OBJ_SEGS:
173 return NumSegs - 1;
174 case OBJ_SSECTORS:
175 return NumSSectors - 1;
176 case OBJ_SECTORS:
177 return NumSectors - 1;
178 }
179 return -1;
180}
181
182
183/*

Callers 5

ChangeModeMethod · 0.85
CmSearchPrevMethod · 0.85
CmSearchNextMethod · 0.85
CmSearchJumpMethod · 0.85
CmEditAddMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected