diff --git a/engines/immortal/disk.cpp b/engines/immortal/disk.cpp index 1e706f56f5d..1a757e0392b 100644 --- a/engines/immortal/disk.cpp +++ b/engines/immortal/disk.cpp @@ -271,6 +271,8 @@ void ProDOSDisk::getFileEntry(FileEntry *f) { */ void ProDOSDisk::searchDirectory(DirHeader *h, uint16 p, uint16 n, Common::String path) { + // NB: p for previous set, but not currently used. This debug message silences any set-but-unused compiler warnings + debug(10, "searchDirectory(h:%p prev: %d next:%d, path:%s", (void *)h, p, n, path.c_str()); int currPos; int parsedFiles = 0; diff --git a/engines/immortal/flameSet.cpp b/engines/immortal/flameSet.cpp index 8bb4ec3abce..98842e26b40 100644 --- a/engines/immortal/flameSet.cpp +++ b/engines/immortal/flameSet.cpp @@ -46,7 +46,7 @@ void Room::flameFreeAll() { } void Room::flameDrawAll(uint16 vX, uint16 vY) { - for (int i = 0; i < _fset.size(); i++) { + for (uint i = 0; i < _fset.size(); i++) { // For every flame in the room, add the sprite to the sprite table univAddSprite(vX, vY, _fset[i]._x, _fset[i]._y, g_immortal->_cycPtrs[g_immortal->_cycles[_fset[i]._c]._cycList]._sName, cycleGetFrame(_fset[i]._c), 0); if (cycleAdvance(_fset[i]._c) == true) { @@ -61,7 +61,7 @@ bool Room::roomLighted() { return true; // Very simple, just checks every torch and if any of them are lit, we say the room is lit - for (int i = 0; i < _fset.size(); i++) { + for (uint i = 0; i < _fset.size(); i++) { if (_fset[i]._p != kFlameOff) { return true; } @@ -78,7 +78,7 @@ void Room::lightTorch(uint8 x, uint8 y) { * check both x,y and flame pattern. Neato. */ - for (int i = 0; i < _fset.size(); i++) { + for (uint i = 0; i < _fset.size(); i++) { if (_fset[i]._p == kFlameOff) { if (Utilities::inside(kLightTorchX, x, y, _fset[i]._x + 16, _fset[i]._y + 8)) { _fset[i]._p = kFlameNormal; @@ -89,7 +89,7 @@ void Room::lightTorch(uint8 x, uint8 y) { } void Room::flameSetRoom(Common::Array &allFlames) { - for (int i = 0; i < allFlames.size(); i++) { + for (uint i = 0; i < allFlames.size(); i++) { Flame f; f._p = allFlames[i]._p; f._x = allFlames[i]._x; diff --git a/engines/immortal/kernal.cpp b/engines/immortal/kernal.cpp index 2db5382ed75..f2256853233 100644 --- a/engines/immortal/kernal.cpp +++ b/engines/immortal/kernal.cpp @@ -900,7 +900,7 @@ void ImmortalEngine::fade(uint16 pal[], int dir, int delay) { // Originally used a branch, but this is functionally identical and much cleaner count = dir * 256; - while ((count >= 0) && (count <= 256)) { + while (count <= 256) { fadePal(pal, count, target); Utilities::delay8(delay); setColors(target); diff --git a/engines/immortal/level.cpp b/engines/immortal/level.cpp index 1fa299e72ae..5b114de97fa 100644 --- a/engines/immortal/level.cpp +++ b/engines/immortal/level.cpp @@ -69,16 +69,16 @@ void ImmortalEngine::levelLoadFile(int l) { // Create the rooms and doors, then populate the rooms with their objects and actors - for (int d = 0; d < _stories[l]._doors.size(); d++) { + for (uint d = 0; d < _stories[l]._doors.size(); d++) { doorNew(_stories[l]._doors[d]); } - for (int r = 0; r < _stories[l]._rooms.size(); r++) { + for (uint r = 0; r < _stories[l]._rooms.size(); r++) { _rooms[r] = new Room(_stories[l]._rooms[r]._x, _stories[l]._rooms[r]._y, _stories[l]._rooms[r]._flags); Common::Array allFlames(_stories[l]._flames[r].size()); if (_stories[l]._flames[r].size() > 0) { - for (int f = 0; f < _stories[l]._flames[r].size(); f++) { + for (uint f = 0; f < _stories[l]._flames[r].size(); f++) { SFlame sf; sf._p = _stories[l]._flames[r][f]._p; sf._x = _stories[l]._flames[r][f]._x; @@ -89,13 +89,13 @@ void ImmortalEngine::levelLoadFile(int l) { _allFlames[r] = allFlames; if (_stories[l]._objects[r].size() > 0) { - for (int o = 0; o < _stories[l]._objects[r].size(); o++) { + for (uint o = 0; o < _stories[l]._objects[r].size(); o++) { //objNew(_stories[l]._objects[r][o]); } } if (_stories[l]._monsters[r].size() > 0) { - for (int m = 0; m < _stories[l]._monsters[r].size(); m++) { + for (uint m = 0; m < _stories[l]._monsters[r].size(); m++) { //monstNew(_stories[l]._monsters[r][m]); } } diff --git a/engines/immortal/logic.cpp b/engines/immortal/logic.cpp index 7cf5d084979..038aa9223b4 100644 --- a/engines/immortal/logic.cpp +++ b/engines/immortal/logic.cpp @@ -49,11 +49,11 @@ void ImmortalEngine::restartLogic() { cycleFreeAll(); levelInit(); //roomInit(); <-- will be run in constructor of room - //monstInit(); <-- room.initMonsters() \ - //objectInit(); <-- room.initObjects() + //monstInit(); <-- room.initMonsters() -| + //objectInit(); <-- room.initObjects() | //doorInit(); <-- room.initDoors() |- probably all get run from room constructor - //sparkInit(); <-- room.initSparks() - //bulletInit(); <-- room.initProjectiles() / + //sparkInit(); <-- room.initSparks() | + //bulletInit(); <-- room.initProjectiles() -| //objectInit(); <-- again? Odd... //genericSpriteInit(); <-- room.initGenSprites()