The function ImageAsset.getExplicitCellIndex now returns a -1 if no such cell exisits.
@@ -625,7 +625,7 @@ S32 ImageAsset::getExplicitCellIndex(const char* regionName)
{
// No, so warn.
Con::warnf( "ImageAsset() - Cannot perform explicit cell operation when not in explicit mode." );
- return NULL;
+ return -1;
}
// Set up a frame counter
@@ -649,9 +649,8 @@ S32 ImageAsset::getExplicitCellIndex(const char* regionName)
- // Didn't find it, so warn
- Con::warnf( "ImageAsset::getExplicitCellIndex() - Cannot find %s cell.", regionName );
+ // Didn't find it, so return -1
@@ -578,7 +578,7 @@ ConsoleMethodWithDocs(ImageAsset, getExplicitCellName, ConsoleString, 3, 3, (cel
/*! Gets the CELL index number in Explicit Mode.
@param cellName The cell name to use to find the specific index.
- @return The specified CELL index number.
+ @return The specified CELL index number or -1 if no such cell exists.
*/
ConsoleMethodWithDocs(ImageAsset, getExplicitCellIndex, ConsoleInt, 3, 3, (cellName))