diff options
| author | James Brown | 2002-09-23 15:43:29 +0000 | 
|---|---|---|
| committer | James Brown | 2002-09-23 15:43:29 +0000 | 
| commit | 412075437b712cdf91dae5c569026bd8c742a491 (patch) | |
| tree | a183a0cce58a1a4dd009755e024c4c3aa966eecb /scumm/gfx.cpp | |
| parent | 536692556b9495ac7cbb53e1275ad2e6aadf500b (diff) | |
| download | scummvm-rg350-412075437b712cdf91dae5c569026bd8c742a491.tar.gz scummvm-rg350-412075437b712cdf91dae5c569026bd8c742a491.tar.bz2 scummvm-rg350-412075437b712cdf91dae5c569026bd8c742a491.zip | |
Patch #612847: Sam and Max painting subgame fix
svn-id: r5008
Diffstat (limited to 'scumm/gfx.cpp')
| -rw-r--r-- | scumm/gfx.cpp | 20 | 
1 files changed, 19 insertions, 1 deletions
| diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index ce8e06c8af..30fce35d6a 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -2661,7 +2661,25 @@ void Scumm::swapPalColors(int a, int b)  	ap[2] = bp[2];  	bp[2] = t; -	setDirtyColors(a, b); +	setDirtyColors(a, a); +	setDirtyColors(b, b); +} + +void Scumm::copyPalColor(int dst, int src) +{ +	byte *dp, *sp; + +	if ((uint) dst >= 256 || (uint) src >= 256) +		error("copyPalColor: invalid values, %d, %d", dst, src); + +	dp = &_currentPalette[dst * 3]; +	sp = &_currentPalette[src * 3]; + +	dp[0] = sp[0]; +	dp[1] = sp[1]; +	dp[2] = sp[2]; + +	setDirtyColors(dst, dst);  }  void Gdi::resetBackground(int top, int bottom, int strip) | 
