[Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.291,2.292 palette.cpp,2.19,2.20 script_v6.cpp,1.412,1.413 script_v6he.cpp,2.130,2.131 script_v72he.cpp,2.150,2.151 script_v8.cpp,2.275,2.276 script_v90he.cpp,2.79,2.80 scumm.cpp,1.244,1.245 scumm.h,1.507,1.508
Travis Howell
kirben at users.sourceforge.net
Sun Oct 3 21:19:05 CEST 2004
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.289,2.290 script_v80he.cpp,2.47,2.48 script_v90he.cpp,2.77,2.78
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.290,2.291 resource.cpp,1.280,1.281 script_v90he.cpp,2.78,2.79 scumm.cpp,1.243,1.244 scumm.h,1.506,1.507 vars.cpp,1.107,1.108
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23313/scumm
Modified Files:
intern.h palette.cpp script_v6.cpp script_v6he.cpp
script_v72he.cpp script_v8.cpp script_v90he.cpp scumm.cpp
scumm.h
Log Message:
Add missing roomOps case for HE games.
Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.291
retrieving revision 2.292
diff -u -d -r2.291 -r2.292
--- intern.h 4 Oct 2004 02:23:01 -0000 2.291
+++ intern.h 4 Oct 2004 04:04:36 -0000 2.292
@@ -823,6 +823,7 @@
};
int _heObject, _heObjectNum;
+ int _hePaletteNum;
struct WizParameters {
byte filename[260];
Index: palette.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/palette.cpp,v
retrieving revision 2.19
retrieving revision 2.20
diff -u -d -r2.19 -r2.20
--- palette.cpp 21 Sep 2004 13:54:30 -0000 2.19
+++ palette.cpp 4 Oct 2004 04:04:36 -0000 2.20
@@ -356,7 +356,7 @@
const byte *new_pal;
int i;
- new_pal = getPalettePtr(resID);
+ new_pal = getPalettePtr(resID, _roomResource);
new_pal += start*3;
@@ -447,7 +447,7 @@
void ScummEngine::setupShadowPalette(int redScale, int greenScale, int blueScale, int startColor, int endColor, int start, int end) {
- const byte *basepal = getPalettePtr(_curPalIndex);
+ const byte *basepal = getPalettePtr(_curPalIndex, _roomResource);
const byte *compareptr;
const byte *pal = basepal + start * 3;
byte *table = _shadowPalette + start;
@@ -533,7 +533,7 @@
const byte *palptr;
int color, idx, j;
- palptr = getPalettePtr(_curPalIndex);
+ palptr = getPalettePtr(_curPalIndex, _roomResource);
for (j = startColor; j <= endColor; j++) {
idx = (_heversion == 70) ? _HEV7ActorPalette[j] : j;
cptr = palptr + idx * 3;
@@ -591,7 +591,7 @@
byte *cur;
int j;
- cptr = getPalettePtr(_curPalIndex) + startColor * 3;
+ cptr = getPalettePtr(_curPalIndex, _roomResource) + startColor * 3;
cur = _currentPalette + startColor * 3;
for (j = startColor; j <= endColor; j++) {
@@ -757,11 +757,11 @@
setDirtyColors(idx, idx);
}
-void ScummEngine::setPalette(int palindex) {
+void ScummEngine::setPalette(int palindex, int room) {
const byte *pals;
_curPalIndex = palindex;
- pals = getPalettePtr(_curPalIndex);
+ pals = getPalettePtr(_curPalIndex, room);
setPaletteFromPtr(pals);
}
@@ -784,10 +784,10 @@
return offs + READ_LE_UINT32(offs + idx * sizeof(uint32));
}
-const byte *ScummEngine::getPalettePtr(int palindex) {
+const byte *ScummEngine::getPalettePtr(int palindex, int room) {
const byte *cptr;
- cptr = getResourceAddress(rtRoom, _roomResource);
+ cptr = getResourceAddress(rtRoom, room);
assert(cptr);
if (_CLUT_offs) {
cptr += _CLUT_offs;
Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.412
retrieving revision 1.413
diff -u -d -r1.412 -r1.413
--- script_v6.cpp 29 Sep 2004 08:40:14 -0000 1.412
+++ script_v6.cpp 4 Oct 2004 04:04:36 -0000 1.413
@@ -1754,7 +1754,7 @@
if (_gameId == GID_SAMNMAX && vm.slot[_currentScript].number == 64)
setDirtyColors(0, 255);
else
- setPalette(a);
+ setPalette(a, _roomResource);
break;
default:
error("o6_roomOps: default case %d", op);
Index: script_v6he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6he.cpp,v
retrieving revision 2.130
retrieving revision 2.131
diff -u -d -r2.130 -r2.131
--- script_v6he.cpp 2 Oct 2004 22:26:34 -0000 2.130
+++ script_v6he.cpp 4 Oct 2004 04:04:36 -0000 2.131
@@ -535,7 +535,7 @@
case 213: // SO_ROOM_NEW_PALETTE
a = pop();
- setPalette(a);
+ setPalette(a, _roomResource);
break;
case 220:
a = pop();
@@ -558,7 +558,7 @@
case 236: // HE 7.2
b = pop();
a = pop();
- warning("o60_roomOps: case %d (%d, %d)", op, b, a);
+ setPalette(a, b);
break;
default:
error("o60_roomOps: default case %d", op);
Index: script_v72he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v72he.cpp,v
retrieving revision 2.150
retrieving revision 2.151
diff -u -d -r2.150 -r2.151
--- script_v72he.cpp 4 Oct 2004 00:01:06 -0000 2.150
+++ script_v72he.cpp 4 Oct 2004 04:04:36 -0000 2.151
@@ -1006,7 +1006,7 @@
case 213: // SO_ROOM_NEW_PALETTE
a = pop();
- setPalette(a);
+ setPalette(a, _roomResource);
break;
case 220:
@@ -1031,7 +1031,7 @@
case 236:
b = pop();
a = pop();
- warning("o72_roomOps: case %d (%d, %d)", op, b, a);
+ setPalette(a, b);
break;
default:
Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.275
retrieving revision 2.276
diff -u -d -r2.275 -r2.276
--- script_v8.cpp 28 Sep 2004 19:28:58 -0000 2.275
+++ script_v8.cpp 4 Oct 2004 04:04:36 -0000 2.276
@@ -867,7 +867,7 @@
break;
case 0x5C: // SO_ROOM_NEW_PALETTE New palette
a = pop();
- setPalette(a);
+ setPalette(a, _roomResource);
break;
case 0x5D: // SO_ROOM_SAVE_GAME Save game
_saveTemporaryState = true;
Index: script_v90he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v90he.cpp,v
retrieving revision 2.79
retrieving revision 2.80
diff -u -d -r2.79 -r2.80
--- script_v90he.cpp 4 Oct 2004 02:23:01 -0000 2.79
+++ script_v90he.cpp 4 Oct 2004 04:04:37 -0000 2.80
@@ -1238,16 +1238,23 @@
}
void ScummEngine_v90he::o90_paletteOps() {
- int subOp = fetchScriptByte();
+ int idx, state;
+
+ byte subOp = fetchScriptByte();
subOp -= 57;
switch (subOp) {
case 0:
- pop();
+ _hePaletteNum = pop();
break;
case 6:
- pop();
- pop();
+ {
+ state = pop();
+ idx = pop();
+ const uint8 *dataPtr = getResourceAddress(rtImage, idx);
+ const uint8 *pal = findWrappedBlock(MKID('RGBS'), dataPtr, state, 0);
+ assert(pal);
+ }
break;
case 9:
pop();
@@ -1274,11 +1281,12 @@
case 160:
break;
case 198:
+ _hePaletteNum = 0;
break;
default:
error("o90_paletteOps: Unknown case %d", subOp);
}
- debug(1,"o90_paletteOps stub (%d)", subOp);
+ debug(0,"o90_paletteOps stub (%d)", subOp);
}
Index: scumm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.cpp,v
retrieving revision 1.244
retrieving revision 1.245
diff -u -d -r1.244 -r1.245
--- scumm.cpp 4 Oct 2004 02:23:01 -0000 1.244
+++ scumm.cpp 4 Oct 2004 04:04:37 -0000 1.245
@@ -2343,7 +2343,7 @@
}
if (_PALS_offs || _CLUT_offs)
- setPalette(0);
+ setPalette(0, _roomResource);
initBGBuffers(_roomHeight);
}
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.507
retrieving revision 1.508
diff -u -d -r1.507 -r1.508
--- scumm.h 4 Oct 2004 02:23:02 -0000 1.507
+++ scumm.h 4 Oct 2004 04:04:37 -0000 1.508
@@ -960,12 +960,12 @@
void clampCameraPos(Common::Point *pt);
void actorFollowCamera(int act);
- const byte *getPalettePtr(int palindex);
+ const byte *getPalettePtr(int palindex, int room);
void setupAmigaPalette();
void setupEGAPalette();
void setupV1ManiacPalette();
void setupV1ZakPalette();
- void setPalette(int pal);
+ void setPalette(int pal, int room);
void setPaletteFromPtr(const byte *ptr, int numcolor = -1);
void setPalColor(int index, int r, int g, int b);
void setDirtyColors(int min, int max);
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.289,2.290 script_v80he.cpp,2.47,2.48 script_v90he.cpp,2.77,2.78
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.290,2.291 resource.cpp,1.280,1.281 script_v90he.cpp,2.78,2.79 scumm.cpp,1.243,1.244 scumm.h,1.506,1.507 vars.cpp,1.107,1.108
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list