diff options
Diffstat (limited to 'engines/cruise/object.cpp')
-rw-r--r-- | engines/cruise/object.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/engines/cruise/object.cpp b/engines/cruise/object.cpp index e0426c7273..044f779f83 100644 --- a/engines/cruise/object.cpp +++ b/engines/cruise/object.cpp @@ -306,4 +306,30 @@ void objectReset(void) { } } +const char *getObjectName(int index, const char *string) { + const char *ptr = string; + + if (!string) + return NULL; + + int i = 0; +// int j = 0; + + while (i < index) { + ptr += strlen(ptr) + 1; + i++; + } + return ptr; +} + +int getObjectClass(int overlayIdx, int objIdx) { + objDataStruct *pObjectData = getObjectDataFromOverlay(overlayIdx, objIdx); + + if (pObjectData) { + return pObjectData->_class; + } else { + return -11; + } +} + } // End of namespace Cruise |