diff options
| -rw-r--r-- | engines/avalanche/animation.cpp | 17 | ||||
| -rw-r--r-- | engines/avalanche/gyro.cpp | 6 | ||||
| -rw-r--r-- | engines/avalanche/lucerna.cpp | 10 | ||||
| -rw-r--r-- | engines/avalanche/scrolls.cpp | 4 | 
4 files changed, 15 insertions, 22 deletions
| diff --git a/engines/avalanche/animation.cpp b/engines/avalanche/animation.cpp index b476fe9d05..e15ecfaab7 100644 --- a/engines/avalanche/animation.cpp +++ b/engines/avalanche/animation.cpp @@ -95,14 +95,10 @@ void AnimationType::init(byte spritenum, bool doCheck, Animation *anim) {  		_info._xWidth++;  	for (byte i = 0; i < _stat._frameNum; i++) {  		_info._sil[_animCount] = new SilType[11 * (_info._yLength + 1)]; -		//getmem(sil[totalnum-1], 11 * (a.yl + 1));  		_info._mani[_animCount] = new ManiType[_info._size - 6]; -		//getmem(mani[totalnum-1], a.size - 6);  		for (byte j = 0; j <= _info._yLength; j++)  			inf.read((*_info._sil[_animCount])[j], _info._xWidth); -			//blockread(inf, (*sil[totalnum-1])[fv], xw);  		inf.read(*_info._mani[_animCount], _info._size - 6); -		//blockread(inf, *mani[totalnum-1], a.size - 6);  		_animCount++;  	} @@ -427,7 +423,6 @@ byte Animation::geidaPed(byte which) {  void Animation::catacombMove(byte ped) {  	int32 here;  	uint16 xy_uint16; -	byte fv;  	// XY_uint16 is cat_x+cat_y*256. Thus, every room in the  	// catacombs has a different number for it. @@ -703,14 +698,14 @@ void Animation::catacombMove(byte ped) {  		_vm->_celer->drawBackgroundSprite(-1, -1, 2);  		break;      // [5,7] : "Ite Mingite" sign.  	case 258: -		for (fv = 0; fv <= 2; fv++) { // [2,1] : Art gallery - pictures -			_vm->_celer->drawBackgroundSprite(130 + fv * 120, 70, 15); -			_vm->_celer->drawBackgroundSprite(184 + fv * 120, 78, 16); +		for (int i = 0; i <= 2; i++) { // [2,1] : Art gallery - pictures +			_vm->_celer->drawBackgroundSprite(130 + i * 120, 70, 15); +			_vm->_celer->drawBackgroundSprite(184 + i * 120, 78, 16);  		}  		break;  	case 1287: -		for (fv = 10; fv <= 13; fv++) -			_vm->_celer->drawBackgroundSprite(-1, -1, fv); +		for (int i = 10; i <= 13; i++) +			_vm->_celer->drawBackgroundSprite(-1, -1, i);  		break; // [7,5] : 4 candles.  	case 776:  		_vm->_celer->drawBackgroundSprite(-1, -1, 10); @@ -733,8 +728,6 @@ void Animation::catacombMove(byte ped) {  	}  } - -  // This proc gets called whenever you touch a line defined as _vm->_gyro->special.  void Animation::dawnDelay() {  	_vm->_timer->addTimer(2, Timer::kProcDawnDelay, Timer::kReasonDawndelay); diff --git a/engines/avalanche/gyro.cpp b/engines/avalanche/gyro.cpp index 7866100e38..398a7a710a 100644 --- a/engines/avalanche/gyro.cpp +++ b/engines/avalanche/gyro.cpp @@ -173,9 +173,9 @@ Gyro::Gyro(AvalancheEngine *vm) : _interrogation(0), _onCanDoPageSwap(true) {  	_vm = vm;  	// Needed because of Lucerna::load_also() -	for (int fv = 0; fv < 31; fv++) { -		for (int ff = 0; ff < 2; ff++) -			_also[fv][ff] = 0; +	for (int i = 0; i < 31; i++) { +		for (int j = 0; j < 2; j++) +			_also[i][j] = 0;  	}  	_totalTime = 0; diff --git a/engines/avalanche/lucerna.cpp b/engines/avalanche/lucerna.cpp index 65e1478e18..c8c76d4553 100644 --- a/engines/avalanche/lucerna.cpp +++ b/engines/avalanche/lucerna.cpp @@ -935,9 +935,9 @@ void Lucerna::drawScore() {  	CursorMan.showMouse(false); -	for (byte fv = 0; fv < 3; fv++) { -		if (_vm->_gyro->_scoreToDisplay[fv] != numbers[fv]) -			_vm->_graphics->drawPicture(_vm->_graphics->_surface, _vm->_gyro->_digits[numbers[fv]], 250 + (fv + 1) * 15, 177); +	for (byte i = 0; i < 3; i++) { +		if (_vm->_gyro->_scoreToDisplay[i] != numbers[i]) +			_vm->_graphics->drawPicture(_vm->_graphics->_surface, _vm->_gyro->_digits[numbers[i]], 250 + (i + 1) * 15, 177);  	}  	CursorMan.showMouse(true); @@ -947,12 +947,12 @@ void Lucerna::drawScore() {  }  void Lucerna::incScore(byte num) {     // Add on no. of points -	for (byte q = 1; q <= num; q++) { +	for (byte i = 1; i <= num; i++) {  		_vm->_gyro->_dnascore++;  #if 0  		if (soundfx) { -			for (byte fv = 1; fv <= 97; fv++) +			for (byte j = 1; j <= 97; j++)  				sound(177 + dna.score * 3);  		}  		nosound; diff --git a/engines/avalanche/scrolls.cpp b/engines/avalanche/scrolls.cpp index 87fdb0b768..26aea4bd37 100644 --- a/engines/avalanche/scrolls.cpp +++ b/engines/avalanche/scrolls.cpp @@ -290,13 +290,13 @@ void Scrolls::drawSign(Common::String fn, int16 xl, int16 yl, int16 y) {  #if 0  	uint16 st = (y - 1) * 80 + (40 - xl / 2) + ((1 - _vm->_gyro->cp) * _vm->_gyro->pagetop);  	byte bit; -	for (uint16 fv = 1; fv <= yl; fv++) +	for (uint16 i = 1; i <= yl; i++)  		for (bit = 0; bit <= 3; bit++) {  			port[0x3c4] = 2;  			port[0x3ce] = 4;  			port[0x3c5] = 1 << bit;  			port[0x3cf] = bit; -			blockread(f, mem[0xa000 * st + (fv * 80)], xl); +			blockread(f, mem[0xa000 * st + (i * 80)], xl);  		}  	bit = getpixel(0, 0);  #endif | 
