diff options
| author | Florian Kagerer | 2010-02-07 16:12:31 +0000 | 
|---|---|---|
| committer | Florian Kagerer | 2010-02-07 16:12:31 +0000 | 
| commit | d4a0375f7e5f02f47b16d8cf1a057e15611b230b (patch) | |
| tree | 9205ab1d45a90a3040449c43246957f16ee8000d | |
| parent | 5d23dd6fa328cec3756de012046d33b6816ca935 (diff) | |
| download | scummvm-rg350-d4a0375f7e5f02f47b16d8cf1a057e15611b230b.tar.gz scummvm-rg350-d4a0375f7e5f02f47b16d8cf1a057e15611b230b.tar.bz2 scummvm-rg350-d4a0375f7e5f02f47b16d8cf1a057e15611b230b.zip | |
LOL: fixed handling of invalid monster attack sfx in the Urbish mines (should fix bug no #2945950)
svn-id: r47967
| -rw-r--r-- | engines/kyra/gui_lol.cpp | 2 | ||||
| -rw-r--r-- | engines/kyra/lol.cpp | 8 | ||||
| -rw-r--r-- | engines/kyra/lol.h | 2 | ||||
| -rw-r--r-- | engines/kyra/scene_lol.cpp | 2 | ||||
| -rw-r--r-- | engines/kyra/sound_lol.cpp | 2 | ||||
| -rw-r--r-- | engines/kyra/sprites_lol.cpp | 2 | 
6 files changed, 9 insertions, 9 deletions
| diff --git a/engines/kyra/gui_lol.cpp b/engines/kyra/gui_lol.cpp index 3c7a13219a..b890dcc9e9 100644 --- a/engines/kyra/gui_lol.cpp +++ b/engines/kyra/gui_lol.cpp @@ -1474,7 +1474,7 @@ int LoLEngine::clickedInventoryScroll(Button *button) {  int LoLEngine::clickedWall(Button *button) {  	int block = calcNewBlockPosition(_currentBlock, _currentDirection);  	int dir = _currentDirection ^ 2; -	uint8 type = _wllBuffer3[_levelBlockProperties[block].walls[dir]]; +	uint8 type = _specialWallTypes[_levelBlockProperties[block].walls[dir]];  	int res = 0;  	switch (type) { diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp index db49a70eca..bb221406e1 100644 --- a/engines/kyra/lol.cpp +++ b/engines/kyra/lol.cpp @@ -133,7 +133,7 @@ LoLEngine::LoLEngine(OSystem *system, const GameFlags &flags) : KyraEngine_v1(sy  	memset(_visibleBlockIndex, 0, sizeof(_visibleBlockIndex));  	_smoothScrollModeNormal = 1; -	_wllVmpMap = _wllBuffer3 = _wllBuffer4 = _wllWallFlags = 0; +	_wllVmpMap = _specialWallTypes = _wllBuffer4 = _wllWallFlags = 0;  	_wllShapeMap = 0;  	_lvlShapeTop = _lvlShapeBottom = _lvlShapeLeftRight = 0;  	_levelBlockProperties = 0; @@ -338,7 +338,7 @@ LoLEngine::~LoLEngine() {  	delete[] _wllVmpMap;  	delete[] _wllShapeMap; -	delete[] _wllBuffer3; +	delete[] _specialWallTypes;  	delete[] _wllBuffer4;  	delete[] _wllWallFlags;  	delete[] _lvlShapeTop; @@ -458,8 +458,8 @@ Common::Error LoLEngine::init() {  	memset(_wllVmpMap, 0, 80);  	_wllShapeMap = new int8[80];  	memset(_wllShapeMap, 0, 80); -	_wllBuffer3 = new uint8[80]; -	memset(_wllBuffer3, 0, 80); +	_specialWallTypes = new uint8[80]; +	memset(_specialWallTypes, 0, 80);  	_wllBuffer4 = new uint8[80];  	memset(_wllBuffer4, 0, 80);  	_wllWallFlags = new uint8[80]; diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h index d4e7187fe6..375c7f98fa 100644 --- a/engines/kyra/lol.h +++ b/engines/kyra/lol.h @@ -1117,7 +1117,7 @@ private:  	uint8 *_wllVmpMap;  	int8 *_wllShapeMap; -	uint8 *_wllBuffer3; +	uint8 *_specialWallTypes;  	uint8 *_wllBuffer4;  	uint8 *_wllWallFlags; diff --git a/engines/kyra/scene_lol.cpp b/engines/kyra/scene_lol.cpp index 60d4749774..8fcf3d6839 100644 --- a/engines/kyra/scene_lol.cpp +++ b/engines/kyra/scene_lol.cpp @@ -170,7 +170,7 @@ void LoLEngine::loadLevelWallData(int index, bool mapShapes) {  				_wllShapeMap[c] = *d;  		}  		d += 2; -		_wllBuffer3[c] = *d; +		_specialWallTypes[c] = *d;  		d += 2;  		_wllWallFlags[c] = *d;  		d += 2; diff --git a/engines/kyra/sound_lol.cpp b/engines/kyra/sound_lol.cpp index ad090609d1..1bcb77c89d 100644 --- a/engines/kyra/sound_lol.cpp +++ b/engines/kyra/sound_lol.cpp @@ -164,7 +164,7 @@ void LoLEngine::snd_playSoundEffect(int track, int volume) {  		return;  	_lastSfxTrack = track; -	if (track == -1) +	if (track == -1 || track >= _ingameSoundListSize)  		return;  	volume &= 0xff; diff --git a/engines/kyra/sprites_lol.cpp b/engines/kyra/sprites_lol.cpp index 035a54cfd3..77ac3b9d7f 100644 --- a/engines/kyra/sprites_lol.cpp +++ b/engines/kyra/sprites_lol.cpp @@ -1433,7 +1433,7 @@ int LoLEngine::walkMonsterCalcNextStep(MonsterInPlay *monster) {  		uint8 w = _levelBlockProperties[_monsterCurBlock].walls[(s >> 1) ^ 2];  		if (_wllWallFlags[w] & 0x20) { -			if (_wllBuffer3[w] == 5) { +			if (_specialWallTypes[w] == 5) {  				openCloseDoor(_monsterCurBlock, 1);  				return -1;  			} | 
