aboutsummaryrefslogtreecommitdiff
path: root/engines/lab
diff options
context:
space:
mode:
authorStrangerke2015-12-25 02:18:07 +0100
committerStrangerke2015-12-25 02:18:07 +0100
commit374056015382987479ef543b4edf2aad3adfc1d2 (patch)
tree23f0c61547c2250836990160ea15365d606a6ca9 /engines/lab
parentf2194d595dd50c9ee58a4543264392ff2208d7f7 (diff)
downloadscummvm-rg350-374056015382987479ef543b4edf2aad3adfc1d2.tar.gz
scummvm-rg350-374056015382987479ef543b4edf2aad3adfc1d2.tar.bz2
scummvm-rg350-374056015382987479ef543b4edf2aad3adfc1d2.zip
LAB: Use constant for breadcrumbs-related loops
Diffstat (limited to 'engines/lab')
-rw-r--r--engines/lab/savegame.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/lab/savegame.cpp b/engines/lab/savegame.cpp
index 37675ba26f..0bdaf74865 100644
--- a/engines/lab/savegame.cpp
+++ b/engines/lab/savegame.cpp
@@ -147,7 +147,7 @@ bool LabEngine::saveGame(int slot, const Common::String desc) {
_tilePuzzle->save(file);
// Breadcrumbs
- for (uint i = 0; i < 128; i++) {
+ for (uint i = 0; i < MAX_CRUMBS; i++) {
file->writeUint16LE(_breadCrumbs[i]._roomNum);
file->writeUint16LE(_breadCrumbs[i]._direction);
}
@@ -184,7 +184,7 @@ bool LabEngine::loadGame(int slot) {
_tilePuzzle->load(file);
// Breadcrumbs
- for (int i = 0; i < 128; i++) {
+ for (int i = 0; i < MAX_CRUMBS; i++) {
_breadCrumbs[i]._roomNum = file->readUint16LE();
_breadCrumbs[i]._direction = file->readUint16LE();
}
@@ -192,7 +192,7 @@ bool LabEngine::loadGame(int slot) {
_droppingCrumbs = (_breadCrumbs[0]._roomNum != 0);
_followingCrumbs = false;
- for (int i = 0; i < 128; i++) {
+ for (int i = 0; i < MAX_CRUMBS; i++) {
if (_breadCrumbs[i]._roomNum == 0)
break;
_numCrumbs = i;