aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2014-06-03 22:46:59 +0200
committerStrangerke2014-06-03 22:46:59 +0200
commitc5072db8fb6706768ad4a116c9cb3bd3c5f5efa3 (patch)
tree88149146b8408cb33bf7de8cedf704da53193bcb /engines
parent516ad6e84377e14c4cbba9f25b99a523c1b0d276 (diff)
downloadscummvm-rg350-c5072db8fb6706768ad4a116c9cb3bd3c5f5efa3.tar.gz
scummvm-rg350-c5072db8fb6706768ad4a116c9cb3bd3c5f5efa3.tar.bz2
scummvm-rg350-c5072db8fb6706768ad4a116c9cb3bd3c5f5efa3.zip
CGE2: Fix remaining shadowed variables
Diffstat (limited to 'engines')
-rw-r--r--engines/cge2/cge2_main.cpp12
-rw-r--r--engines/cge2/sound.cpp6
-rw-r--r--engines/cge2/vga13h.cpp12
3 files changed, 14 insertions, 16 deletions
diff --git a/engines/cge2/cge2_main.cpp b/engines/cge2/cge2_main.cpp
index 9ab9eb0c0b..a60b31bf34 100644
--- a/engines/cge2/cge2_main.cpp
+++ b/engines/cge2/cge2_main.cpp
@@ -818,13 +818,11 @@ void CGE2Engine::switchHero(int sex) {
}
Sprite *CGE2Engine::spriteAt(int x, int y) {
- Sprite *spr = NULL, *tail = _vga->_showQ->last();
- if (tail) {
- for (spr = tail->_prev; spr; spr = spr->_prev) {
- if (!spr->_flags._hide && !spr->_flags._tran) {
- if (spr->getShp()->solidAt(x - spr->_pos2D.x, y - spr->_pos2D.y))
- break;
- }
+ Sprite *spr = NULL, *queueTail = _vga->_showQ->last();
+ if (queueTail) {
+ for (spr = queueTail->_prev; spr; spr = spr->_prev) {
+ if (!spr->_flags._hide && !spr->_flags._tran && spr->getShp()->solidAt(x - spr->_pos2D.x, y - spr->_pos2D.y))
+ break;
}
}
return spr;
diff --git a/engines/cge2/sound.cpp b/engines/cge2/sound.cpp
index b497ebf27b..c657a37e46 100644
--- a/engines/cge2/sound.cpp
+++ b/engines/cge2/sound.cpp
@@ -125,9 +125,9 @@ void Fx::clear() {
}
Common::String Fx::name(int ref, int sub) {
- char name[] = "%.2dfx%.2d.WAV\0";
- char subn[] = "%.2dfx%.2d?.WAV\0";
- char *p = (sub) ? subn : name;
+ char fxname[] = "%.2dfx%.2d.WAV\0";
+ char subName[] = "%.2dfx%.2d?.WAV\0";
+ char *p = (sub) ? subName : fxname;
Common::String filename = Common::String::format(p, ref >> 8, ref & 0xFF);
if (sub)
filename.setChar('@' + sub, 6);
diff --git a/engines/cge2/vga13h.cpp b/engines/cge2/vga13h.cpp
index 644c75395d..334aa99716 100644
--- a/engines/cge2/vga13h.cpp
+++ b/engines/cge2/vga13h.cpp
@@ -367,13 +367,13 @@ Sprite *Sprite::expand() {
setShapeList(shapeList, shpcnt);
if (_file[2] == '~') { // FLY-type sprite
- Seq *curSeq = _ext->_seq;
- int x = (curSeq + 1)->_dx, y = (curSeq + 1)->_dy, z = (curSeq + 1)->_dz;
+ Seq *nextSeq = _ext->_seq;
+ int x = (nextSeq + 1)->_dx, y = (nextSeq + 1)->_dy, z = (nextSeq + 1)->_dz;
// random position
- curSeq->_dx = _vm->newRandom(x + x) - x;
- curSeq->_dy = _vm->newRandom(y + y) - y;
- curSeq->_dz = _vm->newRandom(z + z) - z;
- gotoxyz(_pos3D + V3D(curSeq->_dx, curSeq->_dy, curSeq->_dz));
+ nextSeq->_dx = _vm->newRandom(x + x) - x;
+ nextSeq->_dy = _vm->newRandom(y + y) - y;
+ nextSeq->_dz = _vm->newRandom(z + z) - z;
+ gotoxyz(_pos3D + V3D(nextSeq->_dx, nextSeq->_dy, nextSeq->_dz));
}
return this;