mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 14:51:40 +00:00
IMMORTAL: Fix Various GCC Compiler Warnings
This commit is contained in:
parent
95bf4b15b3
commit
dba9d52d40
@ -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;
|
||||
|
||||
|
@ -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<SFlame> &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;
|
||||
|
@ -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);
|
||||
|
@ -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<SFlame> 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]);
|
||||
}
|
||||
}
|
||||
|
@ -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()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user