diff options
| -rw-r--r-- | scumm/intern.h | 1 | ||||
| -rw-r--r-- | scumm/palette_he.cpp | 8 | ||||
| -rw-r--r-- | scumm/script_v90he.cpp | 14 | 
3 files changed, 16 insertions, 7 deletions
| diff --git a/scumm/intern.h b/scumm/intern.h index 06e1ab6962..7b73fa8e14 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -1003,6 +1003,7 @@ protected:  	uint8 *getHEPaletteIndex(int palSlot);  	int getHEPaletteColor(int palSlot, int color);  	int getPaletteUnk1(int palSlot, int arg_4, int arg_8, int start, int end); +	int getPaletteUnk2(int palSlot, int unk1, int unk2);  	void setHEPaletteColor(int palSlot, uint8 color, uint8 r, uint8 g, uint8 b);  	void setHEPaletteFromPtr(int palSlot, const uint8 *palData); diff --git a/scumm/palette_he.cpp b/scumm/palette_he.cpp index ed2c27ab26..4999e0891a 100644 --- a/scumm/palette_he.cpp +++ b/scumm/palette_he.cpp @@ -131,6 +131,14 @@ int ScummEngine_v90he::getPaletteUnk1(int palSlot, int arg_4, int arg_8, int sta  	return bestitem;  } +int ScummEngine_v90he::getPaletteUnk2(int palSlot, int unk1, int unk2) { +	assert(palSlot >= 1 && palSlot <= _numPalettes); +	assert(unk1 >= 1 && unk1 <= 255); + +	return _hePalettes[palSlot * 1024 + unk1 * 3 + unk2 / 3]; +} + +  int ScummEngine_v90he::getHEPaletteColor(int palSlot, int color) {  	assert(palSlot >= 1 && palSlot <= _numPalettes);  	assert(color >= 1 && color <= 255); diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp index 28bfc3175f..4a99c17d5b 100644 --- a/scumm/script_v90he.cpp +++ b/scumm/script_v90he.cpp @@ -2273,10 +2273,10 @@ void ScummEngine_v90he::o90_getPaletteData() {  		push(getPaletteUnk1(palSlot, b, c, d, e));  		break;  	case 7: -		pop(); -		pop(); -		pop(); -		push(0); +		c = pop(); +		b = pop(); +		palSlot = pop(); +		push(getPaletteUnk2(palSlot, b, c));  		break;  	case 21:  		color = pop(); @@ -2284,9 +2284,9 @@ void ScummEngine_v90he::o90_getPaletteData() {  		push(getHEPaletteColor(palSlot, color));  		break;  	case 87: -		pop(); -		pop(); -		push(0); +		c = pop(); +		b = pop(); +		push(getPaletteUnk2(1, b, c));  		break;  	case 172:  		pop(); | 
