mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 21:59:17 +00:00
Validate room number
svn-id: r11162
This commit is contained in:
parent
0f98be649b
commit
d3936b616c
@ -169,7 +169,13 @@ public:
|
|||||||
int16 gameState(int index);
|
int16 gameState(int index);
|
||||||
void gameState(int index, int16 newValue);
|
void gameState(int index, int16 newValue);
|
||||||
|
|
||||||
const char *roomName(uint16 roomNum) const { return _roomName[roomNum] ; }
|
const char *roomName(uint16 roomNum) const {
|
||||||
|
if (roomNum >= 1 && roomNum <= _numRooms)
|
||||||
|
return _roomName[roomNum];
|
||||||
|
else
|
||||||
|
error("Invalid room number: %i", roomNum);
|
||||||
|
}
|
||||||
|
|
||||||
const char *objectName(uint16 objNum) const { return _objName[objNum]; }
|
const char *objectName(uint16 objNum) const { return _objName[objNum]; }
|
||||||
const char *objectTextualDescription(uint16 objNum) const { return _objDescription[objNum]; }
|
const char *objectTextualDescription(uint16 objNum) const { return _objDescription[objNum]; }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user