[Scummvm-cvs-logs] scummvm master -> 374056015382987479ef543b4edf2aad3adfc1d2

Strangerke Strangerke at scummvm.org
Fri Dec 25 02:23:40 CET 2015


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
3740560153 LAB: Use constant for breadcrumbs-related loops


Commit: 374056015382987479ef543b4edf2aad3adfc1d2
    https://github.com/scummvm/scummvm/commit/374056015382987479ef543b4edf2aad3adfc1d2
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-12-25T02:18:07+01:00

Commit Message:
LAB: Use constant for breadcrumbs-related loops

Changed paths:
    engines/lab/savegame.cpp



diff --git a/engines/lab/savegame.cpp b/engines/lab/savegame.cpp
index 37675ba..0bdaf74 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;






More information about the Scummvm-git-logs mailing list