mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-24 13:13:58 +00:00
Add another variable which improves readability.
svn-id: r14791
This commit is contained in:
parent
d71604c20c
commit
eb7671f0a7
@ -2335,7 +2335,7 @@ void ScummEngine::readMAXS(int blockSize) {
|
||||
error("MAXS block of size %d not supported, please report", blockSize);
|
||||
_numVariables = _fileHandle.readUint16LE();
|
||||
_fileHandle.readUint16LE();
|
||||
_numBitVariables = _fileHandle.readUint16LE();
|
||||
_numBitVariables = _numRoomVariables = _fileHandle.readUint16LE();
|
||||
_numLocalObjects = _fileHandle.readUint16LE();
|
||||
_numArray = _fileHandle.readUint16LE();
|
||||
_fileHandle.readUint16LE();
|
||||
@ -2429,7 +2429,7 @@ void ScummEngine::allocateArrays() {
|
||||
_inventory = (uint16 *)calloc(_numInventory, sizeof(uint16));
|
||||
_verbs = (VerbSlot *)calloc(_numVerbs, sizeof(VerbSlot));
|
||||
_objs = (ObjectData *)calloc(_numLocalObjects, sizeof(ObjectData));
|
||||
_roomVars = (int32 *)calloc(_numBitVariables, sizeof(int32));
|
||||
_roomVars = (int32 *)calloc(_numRoomVariables, sizeof(int32));
|
||||
_scummVars = (int32 *)calloc(_numVariables, sizeof(int32));
|
||||
_bitVars = (byte *)calloc(_numBitVariables >> 3, 1);
|
||||
_images = (uint16 *)calloc(_numImages, sizeof(uint16));
|
||||
|
@ -518,7 +518,7 @@ int ScummEngine::readVar(uint var) {
|
||||
if (var & 0x8000) {
|
||||
if (_gameId == GID_PAJAMA) {
|
||||
var &= 0xFFF;
|
||||
checkRange(_numBitVariables, 0, var, "Room variable %d out of range(w)");
|
||||
checkRange(_numRoomVariables - 1, 0, var, "Room variable %d out of range(w)");
|
||||
return _roomVars[var];
|
||||
|
||||
} else if ((_gameId == GID_ZAK256) || (_features & GF_OLD_BUNDLE) ||
|
||||
@ -601,7 +601,7 @@ void ScummEngine::writeVar(uint var, int value) {
|
||||
if (var & 0x8000) {
|
||||
if (_gameId == GID_PAJAMA) {
|
||||
var &= 0xFFF;
|
||||
checkRange(_numBitVariables, 0, var, "Room variable %d out of range(w)");
|
||||
checkRange(_numRoomVariables - 1, 0, var, "Room variable %d out of range(w)");
|
||||
_roomVars[var] = value;
|
||||
|
||||
} else if ((_gameId == GID_ZAK256) || (_features & GF_OLD_BUNDLE) ||
|
||||
|
@ -496,6 +496,7 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
|
||||
_bitVars = NULL;
|
||||
_numVariables = 0;
|
||||
_numBitVariables = 0;
|
||||
_numRoomVariables = 0;
|
||||
_numLocalObjects = 0;
|
||||
_numGlobalObjects = 0;
|
||||
_numArray = 0;
|
||||
|
@ -481,7 +481,7 @@ protected:
|
||||
int _numGlobalObjects, _numArray, _numVerbs, _numFlObject;
|
||||
int _numInventory, _numRooms, _numScripts, _numSounds;
|
||||
int _numNewNames, _numGlobalScripts;
|
||||
int _numActors, _numImages;
|
||||
int _numActors, _numImages, _numRoomVariables;
|
||||
public:
|
||||
int _numCostumes; // FIXME - should be protected, used by Actor::remapActorPalette
|
||||
int _numCharsets; // FIXME - should be protected, used by CharsetRenderer
|
||||
|
Loading…
x
Reference in New Issue
Block a user