Searches thru all object ids for a specific name Returns the found id, or -1 if not found
| 295 | // Searches thru all object ids for a specific name |
| 296 | // Returns the found id, or -1 if not found |
| 297 | int 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 |
| 310 | int GetObjectImage(int handle) { |
no outgoing calls
no test coverage detected