aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2005-03-02 23:57:20 +0000
committerTravis Howell2005-03-02 23:57:20 +0000
commit120b3851967d3c4839b80ee64de58411078cea43 (patch)
tree530d9b396b0b348f83c8950c20ebce9120e3ec8a
parentbad34c12cd3bdb26d6feb46daccb15cc97dd3783 (diff)
downloadscummvm-rg350-120b3851967d3c4839b80ee64de58411078cea43.tar.gz
scummvm-rg350-120b3851967d3c4839b80ee64de58411078cea43.tar.bz2
scummvm-rg350-120b3851967d3c4839b80ee64de58411078cea43.zip
Sync paletteOps in HE90
svn-id: r16978
-rw-r--r--scumm/script_v100he.cpp1
-rw-r--r--scumm/script_v90he.cpp64
2 files changed, 40 insertions, 25 deletions
diff --git a/scumm/script_v100he.cpp b/scumm/script_v100he.cpp
index cecc945f61..d0433a31b0 100644
--- a/scumm/script_v100he.cpp
+++ b/scumm/script_v100he.cpp
@@ -1360,6 +1360,7 @@ void ScummEngine_v100he::o100_redim2dimArray() {
void ScummEngine_v100he::o100_paletteOps() {
int a, b, c, d, e;
+
byte subOp = fetchScriptByte();
switch (subOp) {
case 0:
diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp
index eadcdb64ce..a03375fc22 100644
--- a/scumm/script_v90he.cpp
+++ b/scumm/script_v90he.cpp
@@ -1974,12 +1974,6 @@ void ScummEngine_v90he::o90_getPaletteData() {
switch (subOp) {
case 0:
- pop();
- pop();
- pop();
- pop();
- pop();
- pop();
break;
case 7:
pop();
@@ -2007,7 +2001,7 @@ void ScummEngine_v90he::o90_getPaletteData() {
}
void ScummEngine_v90he::o90_paletteOps() {
- int idx, state;
+ int a, b, c, d, e;
byte subOp = fetchScriptByte();
subOp -= 57;
@@ -2017,37 +2011,57 @@ void ScummEngine_v90he::o90_paletteOps() {
_hePaletteNum = pop();
break;
case 6:
- {
- state = pop();
- idx = pop();
- const uint8 *dataPtr = getResourceAddress(rtImage, idx);
- const uint8 *pal = findWrappedBlock(MKID('RGBS'), dataPtr, state, 0);
- assert(pal);
+ b = pop();
+ a = pop();
+ if (_hePaletteNum != 0) {
+ setHEPaletteFromImage(_hePaletteNum, a, b);
}
break;
case 9:
- pop();
- pop();
- pop();
- pop();
- pop();
+ e = pop();
+ d = pop();
+ c = pop();
+ b = pop();
+ a = pop();
+ if (_hePaletteNum != 0) {
+ for (; a <= b; ++a) {
+ setHEPaletteColor(_hePaletteNum, a, c, d, e);
+ }
+ }
break;
case 13:
- pop();
- pop();
- pop();
+ c = pop();
+ b = pop();
+ a = pop();
+ if (_hePaletteNum) {
+ for (; a <= b; ++a) {
+ copyHEPaletteColor(_hePaletteNum, a, c);
+ }
+ }
break;
case 19: //HE99+
- pop();
+ a = pop();
+ if (_hePaletteNum != 0) {
+ setHEPaletteFromCostume(_hePaletteNum, a);
+ }
break;
case 29:
- pop();
+ a = pop();
+ if (_hePaletteNum != 0) {
+ copyHEPalette(_hePaletteNum, a);
+ }
break;
case 118:
- pop();
- pop();
+ b = pop();
+ a = pop();
+ if (_hePaletteNum != 0) {
+ setHEPaletteFromRoom(_hePaletteNum, a, b);
+ }
break;
case 160:
+ if (_hePaletteNum != 0) {
+ restoreHEPalette(_hePaletteNum);
+ }
break;
case 198:
_hePaletteNum = 0;