diff options
| author | Travis Howell | 2004-06-27 15:41:01 +0000 | 
|---|---|---|
| committer | Travis Howell | 2004-06-27 15:41:01 +0000 | 
| commit | c026a0a5e18d1d4089b5f6e42bfde90b73feb2e1 (patch) | |
| tree | 0327b62202d77e0b35e642efc95f6f71aca71f91 | |
| parent | 9ef85b62813b90c6c4d6a41e4c7f025b0354801a (diff) | |
| download | scummvm-rg350-c026a0a5e18d1d4089b5f6e42bfde90b73feb2e1.tar.gz scummvm-rg350-c026a0a5e18d1d4089b5f6e42bfde90b73feb2e1.tar.bz2 scummvm-rg350-c026a0a5e18d1d4089b5f6e42bfde90b73feb2e1.zip | |
Another palette change needed for HE 7.0 games.
Rename a few HE sound vars
svn-id: r14084
| -rw-r--r-- | scumm/actor.cpp | 2 | ||||
| -rw-r--r-- | scumm/akos.cpp | 3 | ||||
| -rw-r--r-- | scumm/bomp.cpp | 13 | ||||
| -rw-r--r-- | scumm/bomp.h | 2 | ||||
| -rw-r--r-- | scumm/script_v7he.cpp | 16 | ||||
| -rw-r--r-- | scumm/scumm.h | 2 | 
6 files changed, 22 insertions, 16 deletions
| diff --git a/scumm/actor.cpp b/scumm/actor.cpp index f30327ccde..197504af5c 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -981,6 +981,8 @@ void Actor::drawActorCostume() {  	bcr->_shadow_mode = shadow_mode;  	if (_vm->_features & GF_SMALL_HEADER)  		bcr->_shadow_table = NULL; +	else if (_vm->_heversion == 70) +		bcr->_shadow_table = _vm->_he_actor_palette;  	else  		bcr->_shadow_table = _vm->_shadowPalette; diff --git a/scumm/akos.cpp b/scumm/akos.cpp index 66c9e84f96..c5aaf2967d 100644 --- a/scumm/akos.cpp +++ b/scumm/akos.cpp @@ -959,7 +959,8 @@ void AkosRenderer::akos16Decompress(byte *dest, int32 pitch, const byte *src, in  			bompApplyMask(akos16.buffer, maskptr, maskbit, t_width, transparency);  			maskptr += maskpitch;  		} -		bompApplyShadow(_shadow_mode, _shadow_table, akos16.buffer, dest, t_width, transparency); +		bool humongous = (_vm->_features & GF_HUMONGOUS); +		bompApplyShadow(_shadow_mode, _shadow_table, akos16.buffer, dest, t_width, transparency, humongous);  		if (numskip_after != 0)	{  			akos16SkipData(numskip_after); diff --git a/scumm/bomp.cpp b/scumm/bomp.cpp index 016ce4abbe..36e9cfc2a7 100644 --- a/scumm/bomp.cpp +++ b/scumm/bomp.cpp @@ -29,7 +29,7 @@ namespace Scumm {  static void bompScaleFuncX(byte *line_buffer, byte *scaling_x_ptr, byte skip, int32 size); -static void bompApplyShadow0(const byte *line_buffer, byte *dst, int32 size, byte transparency); +static void bompApplyShadow0(const byte *shadowPalette, const byte *line_buffer, byte *dst, int32 size, byte transparency, byte humongous);  static void bompApplyShadow1(const byte *shadowPalette, const byte *line_buffer, byte *dst, int32 size, byte transparency);  static void bompApplyShadow3(const byte *shadowPalette, const byte *line_buffer, byte *dst, int32 size, byte transparency);  static void bompApplyActorPalette(byte *actorPalette, byte *line_buffer, int32 size); @@ -111,11 +111,11 @@ void bompApplyMask(byte *line_buffer, byte *mask, byte maskbit, int32 size, byte  	}  } -void bompApplyShadow(int shadowMode, const byte *shadowPalette, const byte *line_buffer, byte *dst, int32 size, byte transparency) { +void bompApplyShadow(int shadowMode, const byte *shadowPalette, const byte *line_buffer, byte *dst, int32 size, byte transparency, byte humongous) {  	assert(size > 0);  	switch(shadowMode) {  	case 0: -		bompApplyShadow0(line_buffer, dst, size, transparency); +		bompApplyShadow0(shadowPalette, line_buffer, dst, size, transparency, humongous);  		break;  	case 1:  		bompApplyShadow1(shadowPalette, line_buffer, dst, size, transparency); @@ -127,11 +127,14 @@ void bompApplyShadow(int shadowMode, const byte *shadowPalette, const byte *line  		error("Unknown shadow mode %d", shadowMode);  	}  } -void bompApplyShadow0(const byte *line_buffer, byte *dst, int32 size, byte transparency) { +void bompApplyShadow0(const byte *shadowPalette, const byte *line_buffer, byte *dst, int32 size, byte transparency, byte humongous = false) {  	while (size-- > 0) {  		byte tmp = *line_buffer++;  		if (tmp != transparency) { -			*dst = tmp; +			if (humongous) + 				*dst = shadowPalette[tmp]; +			else +				*dst = tmp;  		}  		dst++;  	} diff --git a/scumm/bomp.h b/scumm/bomp.h index d32296f371..5a287893a2 100644 --- a/scumm/bomp.h +++ b/scumm/bomp.h @@ -29,7 +29,7 @@ namespace Scumm {  int32 setupBompScale(byte *scaling, int32 size, byte scale);  void bompApplyMask(byte *line_buffer, byte *mask, byte maskbit, int32 size, byte transparency); -void bompApplyShadow(int shadowMode, const byte *shadowPalette, const byte *line_buffer, byte *dst, int32 size, byte transparency); +void bompApplyShadow(int shadowMode, const byte *shadowPalette, const byte *line_buffer, byte *dst, int32 size, byte transparency, byte humongous = false);  void decompressBomp(byte *dst, const byte *src, int w, int h);  void bompDecodeLine(byte *dst, const byte *src, int size); diff --git a/scumm/script_v7he.cpp b/scumm/script_v7he.cpp index 639fa462d1..af72a58fea 100644 --- a/scumm/script_v7he.cpp +++ b/scumm/script_v7he.cpp @@ -665,32 +665,32 @@ void ScummEngine_v7he::o7_startSound() {  		break;  	case 230: -		_heSndVar2 = pop(); +		_heSndTimer = pop();  		break;  	case 231: -		_heSndVar3 = pop(); +		_heSndOffset = pop();  		break;  	case 232:  		_heSndSoundId = pop(); -		_heSndVar3 = 0; +		_heSndTimer = 0;  		_heSndSoundFreq = 11025; -		_heSndVar2 = VAR(VAR_MUSIC_TIMER); +		_heSndTimer = VAR(VAR_MUSIC_TIMER);  		break;  	case 245: -		_heSndVar5 |= 1; +		_heSndLoop |= 1;  		break;  	case 255: -		// _sound->addSoundToQueue(_heSndSoundId, _heSndVar3, _heSndVar2, _heSndVar5); +		// _sound->addSoundToQueue(_heSndSoundId, _heSndOffset, _heSndTimer, _heSndLoop);  		// FIXME: Music resources (Id 4000+?) are currently unsupported,  		// so don't attempt to play them.   		if (_heSndSoundId < 4000)  			_sound->addSoundToQueue(_heSndSoundId); -		debug(1, "o7_startSound stub (%d, %d, %d, %d)", _heSndSoundId, _heSndVar3, _heSndVar2, _heSndVar5); -		_heSndVar5 = 0; +		debug(1, "o7_startSound stub (%d, %d, %d, %d)", _heSndSoundId, _heSndOffset, _heSndTimer, _heSndLoop); +		_heSndLoop = 0;  		break;  	default: diff --git a/scumm/scumm.h b/scumm/scumm.h index be150b4049..42597009f1 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -1012,7 +1012,7 @@ public:  	byte _proc_special_palette[256];  	byte _roomPalette[256];  	byte *_shadowPalette; -	int _heSndSoundFreq, _heSndVar2, _heSndVar3, _heSndSoundId, _heSndVar5; +	int _heSndSoundFreq, _heSndOffset, _heSndTimer, _heSndSoundId, _heSndLoop;  protected:  	int _shadowPaletteSize; | 
