MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / FindObjectIDName

Function FindObjectIDName

Descent3/objinfo.cpp:297–307  ·  view source on GitHub ↗

Searches thru all object ids for a specific name Returns the found id, or -1 if not found

Source from the content-addressed store, hash-verified

295// Searches thru all object ids for a specific name
296// Returns the found id, or -1 if not found
297int FindObjectIDName(const char *name) {
298 int i;
299
300 ASSERT(name != NULL);
301
302 for (i = 0; i < MAX_OBJECT_IDS; i++)
303 if ((Object_info[i].type != OBJ_NONE) && !stricmp(name, Object_info[i].name))
304 return i;
305
306 return -1;
307}
308
309// Given an object handle, returns an index to that object's model
310int GetObjectImage(int handle) {

Callers 15

mng_RenamePageFunction · 0.85
mng_PopAddonPagesFunction · 0.85
mng_LoadNetGenericPageFunction · 0.85
mng_LoadLocalGenericPageFunction · 0.85
SetAmbTypeMethod · 0.85
AddPageFromUserMethod · 0.85
ProcessPageFromFileMethod · 0.85
InputObjectNameFunction · 0.85
OnGenericAddNewMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected