| 303 | } |
| 304 | |
| 305 | S32 script_simobject_find(const char* classname, const char* name) |
| 306 | { |
| 307 | SimObject *object; |
| 308 | if( Sim::findObject( name, object ) ) |
| 309 | { |
| 310 | // if we specified a classname do type checking |
| 311 | if (classname && dStrlen(classname)) |
| 312 | { |
| 313 | AbstractClassRep* ocr = object->getClassRep(); |
| 314 | while (ocr) |
| 315 | { |
| 316 | if (!dStricmp(ocr->getClassName(), classname)) |
| 317 | return object->getId(); |
| 318 | ocr = ocr->getParentClass(); |
| 319 | } |
| 320 | |
| 321 | } |
| 322 | |
| 323 | // invalid type |
| 324 | return 0; |
| 325 | } |
| 326 | |
| 327 | // didn't find object |
| 328 | return 0; |
| 329 | } |
| 330 | |
| 331 | void script_export_callback_string(StringCallback cb, const char *nameSpace, const char *funcName, const char* usage, S32 minArgs, S32 maxArgs) |
| 332 | { |
nothing calls this directly
no test coverage detected