[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.229.2.11,1.229.2.12 actor.h,1.51.2.2,1.51.2.3 akos.cpp,1.107.2.7,1.107.2.8 costume.cpp,1.126.2.3,1.126.2.4 palette.cpp,2.4.2.2,2.4.2.3 resource.cpp,1.188.2.3,1.188.2.4 saveload.cpp,1.140.2.8,1.140.2.9 saveload.h,1.32.2.3,1.32.2.4 script_v2.cpp,2.230.2.6,2.230.2.7 script_v5.cpp,1.226.2.5,1.226.2.6 script_v6.cpp,1.293.2.24,1.293.2.25 script_v6he.cpp,2.15.2.9,2.15.2.10 scumm.h,1.369.2.9,1.369.2.10 scummvm.cpp,2.577.2.29,2.577.2.30 sound.cpp,1.320.2.10,1.320.2.11 sound.h,1.62.2.3,1.62.2.4 string.cpp,1.193.2.9,1.193.2.10 vars.cpp,1.71.2.5,1.71.2.6
Travis Howell
kirben at users.sourceforge.net
Fri Aug 13 20:08:03 CEST 2004
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3242/scumm
Modified Files:
Tag: branch-0-6-0
actor.cpp actor.h akos.cpp costume.cpp palette.cpp
resource.cpp saveload.cpp saveload.h script_v2.cpp
script_v5.cpp script_v6.cpp script_v6he.cpp scumm.h
scummvm.cpp sound.cpp sound.h string.cpp vars.cpp
Log Message:
Back port save game related changes.
HE 7.0 specifics can be safely ignored.
Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.229.2.11
retrieving revision 1.229.2.12
diff -u -d -r1.229.2.11 -r1.229.2.12
--- actor.cpp 13 Aug 2004 02:48:41 -0000 1.229.2.11
+++ actor.cpp 14 Aug 2004 03:07:32 -0000 1.229.2.12
@@ -46,6 +46,7 @@
Actor::Actor() {
assert(_vm != 0);
+ offs_x = offs_y = 0;
top = bottom = 0;
number = 0;
needRedraw = needBgReset = costumeNeedsInit = visible = false;
@@ -88,7 +89,7 @@
talkColor = 15;
talkPosX = 0;
talkPosY = -80;
- scaley = scalex = 0xFF;
+ boxscale = scaley = scalex = 0xFF;
charset = 0;
memset(sound, 0, sizeof(sound));
targetFacing = facing;
@@ -422,6 +423,8 @@
if (_vm->_version >= 6 && (_vm->getBoxFlags(walkbox) & kBoxIgnoreScale))
return;
+ boxscale = _vm->getBoxScale(walkbox);
+
uint16 scale = _vm->getScale(walkbox, _pos.x, _pos.y);
assert(scale <= 0xFF);
@@ -813,6 +816,17 @@
}
}
+static const int v1MMActorTalkColor[25] = {
+ 1, 7, 2, 14, 8, 1, 3, 7, 7, 12, 1, 13, 1, 4, 5, 5, 4, 3, 1, 5, 1, 1, 1, 7, 7
+};
+
+void ScummEngine::setupV1ActorTalkColor() {
+ int i;
+
+ for (i = 1; i < _numActors; i++)
+ _actors[i].talkColor = v1MMActorTalkColor[i];
+}
+
void ScummEngine::showActors() {
int i;
@@ -969,8 +983,8 @@
bcr->_actorID = number;
- bcr->_actorX = _pos.x - _vm->virtscr[0].xstart;
- bcr->_actorY = _pos.y - elevation;
+ bcr->_actorX = _pos.x + offs_x - _vm->virtscr[0].xstart;
+ bcr->_actorY = _pos.y + offs_y - elevation;
if (_vm->_version <= 2) {
// HACK: We have to adjust the x position by one strip (8 pixels) in
@@ -985,8 +999,12 @@
bcr->_actorX += 8;
}
- bcr->_scaleX = scalex;
- bcr->_scaleY = scaley;
+ if (_vm->_version == 4 && boxscale & 0x8000) {
+ bcr->_scaleX = bcr->_scaleY = _vm->getScale(walkbox, _pos.x, _pos.y);
+ } else {
+ bcr->_scaleX = scalex;
+ bcr->_scaleY = scaley;
+ }
bcr->_shadow_mode = shadow_mode;
if (_vm->_features & GF_SMALL_HEADER)
@@ -1200,7 +1218,7 @@
return;
}
- if (((_gameId == GID_MANIAC) && (_version == 1)) || getTalkingActor() > 0x7F) {
+ if (getTalkingActor() > 0x7F) {
_charsetColor = (byte)_string[0].color;
} else {
a = derefActor(getTalkingActor(), "actorTalk(2)");
@@ -1763,6 +1781,8 @@
static const SaveLoadEntry actorEntries[] = {
MKLINE(Actor, _pos.x, sleInt16, VER(8)),
MKLINE(Actor, _pos.y, sleInt16, VER(8)),
+ MKLINE(Actor, offs_x, sleInt16, VER(32)),
+ MKLINE(Actor, offs_y, sleInt16, VER(32)),
MKLINE(Actor, top, sleInt16, VER(8)),
MKLINE(Actor, bottom, sleInt16, VER(8)),
MKLINE(Actor, elevation, sleInt16, VER(8)),
@@ -1774,6 +1794,7 @@
MKLINE(Actor, talkFrequency, sleInt16, VER(16)),
MKLINE(Actor, talkPan, sleInt16, VER(24)),
MKLINE(Actor, talkVolume, sleInt16, VER(29)),
+ MKLINE(Actor, boxscale, sleUint16, VER(34)),
MKLINE(Actor, scalex, sleByte, VER(8)),
MKLINE(Actor, scaley, sleByte, VER(8)),
MKLINE(Actor, charset, sleByte, VER(8)),
@@ -1792,7 +1813,10 @@
MKLINE(Actor, speedy, sleUint16, VER(8)),
MKLINE(Actor, cost.animCounter, sleUint16, VER(8)),
MKLINE(Actor, cost.soundCounter, sleByte, VER(8)),
-
+ MKLINE(Actor, actorDrawVirScr, sleByte, VER(32)),
+ MKLINE(Actor, flip, sleByte, VER(32)),
+ MKLINE(Actor, skipLimb, sleByte, VER(32)),
+
// Actor palette grew from 64 to 256 bytes
MKARRAY_OLD(Actor, palette[0], sleByte, 64, VER(8), VER(9)),
MKARRAY(Actor, palette[0], sleByte, 256, VER(10)),
Index: actor.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.h,v
retrieving revision 1.51.2.2
retrieving revision 1.51.2.3
diff -u -d -r1.51.2.2 -r1.51.2.3
--- actor.h 17 Jul 2004 08:27:55 -0000 1.51.2.2
+++ actor.h 14 Aug 2004 03:07:32 -0000 1.51.2.3
@@ -83,6 +83,7 @@
public:
Common::Point _pos;
+ int offs_x, offs_y;
int top, bottom;
uint width;
byte number;
@@ -92,6 +93,7 @@
int talkFrequency;
byte talkPan;
byte talkVolume;
+ uint16 boxscale;
byte scalex, scaley;
byte charset;
byte moving;
Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.107.2.7
retrieving revision 1.107.2.8
diff -u -d -r1.107.2.7 -r1.107.2.8
--- akos.cpp 17 Jul 2004 08:43:34 -0000 1.107.2.7
+++ akos.cpp 14 Aug 2004 03:07:32 -0000 1.107.2.8
@@ -891,7 +891,7 @@
}
}
-void AkosRenderer::akos16Decompress(byte *dest, int32 pitch, const byte *src, int32 t_width, int32 t_height, int32 dir, int32 numskip_before, int32 numskip_after, byte transparency, int maskLeft, int maskTop, int zBuf) {
+void AkosRenderer::akos16Decompress(byte *dest, int32 pitch, const byte *src, int32 t_width, int32 t_height, int32 dir, int32 numskip_before, int32 numskip_after, byte transparency, int maskLeft, int maskTop, int zBuf) {
byte *tmp_buf = akos16.buffer;
int maskpitch;
byte *maskptr = 0, *charsetMask = 0;
@@ -1319,8 +1319,8 @@
break;
case 6:
warning("unimplemented akos_queCommand(6,%d,%d,%d)", a->number, param_1, param_2);
-// a->offs_x = param_1;
-// a->offs_y = param_2;
+ a->offs_x = param_1;
+ a->offs_y = param_2;
break;
case 7:
if (param_1 != 0) {
Index: costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/costume.cpp,v
retrieving revision 1.126.2.3
retrieving revision 1.126.2.4
diff -u -d -r1.126.2.3 -r1.126.2.4
--- costume.cpp 13 Aug 2004 01:52:06 -0000 1.126.2.3
+++ costume.cpp 14 Aug 2004 03:07:32 -0000 1.126.2.4
@@ -425,11 +425,10 @@
masked = (y < 0 || y >= _outheight) || (v1.mask_ptr && ((mask[0] | mask[v1.imgbufoffs]) & maskbit));
if (color && !masked) {
- // FIXME: Fully implement _shadow_mode.
- // For now, it's enough for Sam & Max
- // transparency.
+ // FIXME: Fully implement _shadow_mode.in Sam & Max
+ // For now, it's enough for transparency.
if (_shadow_mode & 0x20) {
- pcolor = _vm->_proc_special_palette[*dst];
+ pcolor = _shadow_table[*dst];
} else {
pcolor = _palette[color];
if (pcolor == 13 && _shadow_table)
Index: palette.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/palette.cpp,v
retrieving revision 2.4.2.2
retrieving revision 2.4.2.3
diff -u -d -r2.4.2.2 -r2.4.2.3
--- palette.cpp 13 Aug 2004 01:52:06 -0000 2.4.2.2
+++ palette.cpp 14 Aug 2004 03:07:32 -0000 2.4.2.3
@@ -466,11 +466,11 @@
}
-void ScummEngine::setupShadowPalette(int redScale, int greenScale, int blueScale, int startColor, int endColor) {
+void ScummEngine::setupShadowPalette(int redScale, int greenScale, int blueScale, int startColor, int endColor, int start, int end) {
const byte *basepal = getPalettePtr(_curPalIndex);
- const byte *pal = basepal;
const byte *compareptr;
- byte *table = _shadowPalette;
+ const byte *pal = basepal + start * 3;
+ byte *table = _shadowPalette + start;
int i;
// This is a correction of the patch supplied for BUG #588501.
@@ -491,7 +491,12 @@
// from within Room 23 (the big machine), as it has no shadow effects
// and thus doesn't result in any visual differences.
- for (i = 0; i <= 255; i++) {
+ if (_gameId == GID_SAMNMAX) {
+ for (i = 0; i < 256; i++)
+ _shadowPalette[i] = i;
+ }
+
+ for (i = start; i < end; i++) {
int r = (int) (*pal++ * redScale) >> 8;
int g = (int) (*pal++ * greenScale) >> 8;
int b = (int) (*pal++ * blueScale) >> 8;
@@ -539,58 +544,6 @@
}
}
-/** This function create the specialPalette used for semi-transparency in SamnMax */
-void ScummEngine::createSpecialPalette(int16 from, int16 to, int16 redScale, int16 greenScale, int16 blueScale,
- int16 startColor, int16 endColor) {
- const byte *palPtr, *curPtr;
- const byte *searchPtr;
-
- uint bestResult;
- uint currentResult;
-
- byte currentIndex;
-
- int i, j;
-
- palPtr = getPalettePtr(_curPalIndex);
-
- for (i = 0; i < 256; i++)
- _proc_special_palette[i] = i;
-
- curPtr = palPtr + startColor * 3;
-
- for (i = startColor; i < endColor; i++) {
- int r = (int) (*curPtr++ * redScale) >> 8;
- int g = (int) (*curPtr++ * greenScale) >> 8;
- int b = (int) (*curPtr++ * blueScale) >> 8;
-
- if (r > 255)
- r = 255;
- if (g > 255)
- g = 255;
- if (b > 255)
- b = 255;
-
- searchPtr = palPtr + from * 3;
- bestResult = 32000;
- currentIndex = (byte) from;
-
- for (j = from; j <= to; j++) {
- int ar = (*searchPtr++);
- int ag = (*searchPtr++);
- int ab = (*searchPtr++);
-
- currentResult = colorWeight(ar - r, ag - g, ab - b);
-
- if (currentResult < bestResult) {
- _proc_special_palette[i] = currentIndex;
- bestResult = currentResult;
- }
- currentIndex++;
- }
- }
-}
-
void ScummEngine::darkenPalette(int redScale, int greenScale, int blueScale, int startColor, int endColor) {
if (_roomResource == 0) // FIXME - HACK to get COMI demo working
return;
Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource.cpp,v
retrieving revision 1.188.2.3
retrieving revision 1.188.2.4
diff -u -d -r1.188.2.3 -r1.188.2.4
--- resource.cpp 13 Aug 2004 09:04:20 -0000 1.188.2.3
+++ resource.cpp 14 Aug 2004 03:07:32 -0000 1.188.2.4
@@ -580,8 +580,7 @@
loadResource(type, i);
- if (_version < 7 && !(_features & GF_SMALL_HEADER))
- if (type == rtRoom && i == _roomResource)
+ if (_version == 5 && type == rtRoom && i == _roomResource)
VAR(VAR_ROOM_FLAG) = 1;
}
Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v
retrieving revision 1.140.2.8
retrieving revision 1.140.2.9
diff -u -d -r1.140.2.8 -r1.140.2.9
--- saveload.cpp 19 Jul 2004 00:01:37 -0000 1.140.2.8
+++ saveload.cpp 14 Aug 2004 03:07:32 -0000 1.140.2.9
@@ -185,6 +185,13 @@
if (_screenTop < 0)
_screenTop = 0;
+ if (hdr.ver < VER(33) && _version >= 7) {
+ // For a long time, we didn't set these vars to default values.
+ VAR(VAR_DEFAULT_TALK_DELAY) = 60;
+ if (_version == 7)
+ VAR(VAR_NUM_GLOBAL_OBJS) = _numGlobalObjects - 1;
+ }
+
if (hdr.ver < VER(30)) {
// For a long time, we used incorrect location, causing it to default to zero.
if (_version == 8)
@@ -210,9 +217,14 @@
_scummVars[VAR_CAMERA_ACCEL_Y] = _scummVars[110];
}
- // Sync with current config setting
- if (_version >= 7)
- VAR(VAR_VOICE_MODE) = ConfMan.getBool("subtitles");
+ // With version 22, we replaced the scale items with scale slots. So when
+ // loading such an old save game, try to upgrade the old to new format.
+ if (hdr.ver < VER(22)) {
+ // Convert all rtScaleTable resources to matching scale items
+ for (i = 1; i < res.num[rtScaleTable]; i++) {
+ convertScaleTableToScaleSlot(i);
+ }
+ }
// We could simply dirty colours 0-15 for 16-colour games -- nowadays
// they handle their palette pretty much like the more recent games
@@ -233,6 +245,9 @@
setDirtyColors(0, 255);
+ if (hdr.ver < VER(35) && _gameId == GID_MANIAC && _version == 1)
+ setupV1ActorTalkColor();
+
// Regenerate strip table (for V1/V2 games)
if (_version == 1) {
roomptr = getResourceAddress(rtRoom, _roomResource);
@@ -274,15 +289,6 @@
_charset->_mask.right = _charset->_mask.bottom = 0;
_charset->_hasMask = false;
- // With version 22, we replaced the scale items with scale slots. So when
- // loading such an old save game, try to upgrade the old to new format.
- if (hdr.ver < VER(22)) {
- // Convert all rtScaleTable resources to matching scale items
- for (i = 1; i < res.num[rtScaleTable]; i++) {
- convertScaleTableToScaleSlot(i);
- }
- }
-
_lastCodePtr = NULL;
_drawObjectQueNr = 0;
_verbMouseOver = 0;
@@ -291,6 +297,13 @@
initBGBuffers(_roomHeight);
+ if (VAR_ROOM_FLAG != 0xFF)
+ VAR(VAR_ROOM_FLAG) = 1;
+
+ // Sync with current config setting
+ if (_version >= 7)
+ VAR(VAR_VOICE_MODE) = ConfMan.getBool("subtitles");
+
CHECK_HEAP
debug(1, "State loaded from '%s'", filename);
@@ -361,6 +374,7 @@
};
const SaveLoadEntry *actorEntries = Actor::getSaveLoadEntries();
+ const SaveLoadEntry *soundEntries = _sound->getSaveLoadEntries();
const SaveLoadEntry verbEntries[] = {
MKLINE(VerbSlot, curRect.left, sleInt16, VER(8)),
@@ -508,7 +522,8 @@
MKLINE(ScummEngine, gdi._transparentColor, sleByte, VER(8)),
MKARRAY(ScummEngine, _currentPalette[0], sleByte, 768, VER(8)),
- MKARRAY(ScummEngine, _proc_special_palette[0], sleByte, 256, VER(8)),
+ // Sam & Max specific palette replaced by _shadowPalette now.
+ MK_OBSOLETE_ARRAY(ScummEngine, _proc_special_palette[0], sleByte, 256, VER(8), VER(33)),
MKARRAY(ScummEngine, _charsetBuffer[0], sleByte, 256, VER(8)),
@@ -653,6 +668,7 @@
}
s->saveLoadArrayOf(_actors, _numActors, sizeof(_actors[0]), actorEntries);
+ s->saveLoadEntries(_sound, soundEntries);
if (savegameVersion < VER(9))
s->saveLoadArrayOf(vm.slot, 25, sizeof(vm.slot[0]), scriptSlotEntries);
Index: saveload.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.h,v
retrieving revision 1.32.2.3
retrieving revision 1.32.2.4
diff -u -d -r1.32.2.3 -r1.32.2.4
--- saveload.h 1 Jul 2004 05:42:06 -0000 1.32.2.3
+++ saveload.h 14 Aug 2004 03:07:32 -0000 1.32.2.4
@@ -32,7 +32,7 @@
// Can be useful for other ports too :)
#define VER(x) x
-#define CURRENT_VER 31
+#define CURRENT_VER 35
// To work around a warning in GCC 3.2 (and 3.1 ?) regarding non-POD types,
// we use a small trick: instead of 0 we use 42. Why? Well, it seems newer GCC
Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 2.230.2.6
retrieving revision 2.230.2.7
diff -u -d -r2.230.2.6 -r2.230.2.7
--- script_v2.cpp 13 Aug 2004 09:07:10 -0000 2.230.2.6
+++ script_v2.cpp 14 Aug 2004 03:07:32 -0000 2.230.2.7
@@ -379,8 +379,6 @@
return readVar(fetchScriptByte());
}
-int v1_mm_actor_speech_color[] = {1, 7, 2, 14, 8, 1, 3, 7, 7, 12, 1, 13, 1, 4, 5, 5, 4, 3, 1, 5, 1, 1, 1, 7, 7, 0};
-
void ScummEngine_v2::decodeParseString() {
byte buffer[512];
byte *ptr = buffer;
@@ -423,9 +421,6 @@
// Demos don't set subtitle color before display first subtitle.
if (_demoMode && _actorToPrintStrFor == 0xFF)
_string[textSlot].color = (_version == 2) ? 15 : 1;
- // V1 Mansion Mansion uses dynamic color table for subtitles
- else if (_version == 1 && _actorToPrintStrFor != 0xFF)
- _string[textSlot].color = v1_mm_actor_speech_color[_actorToPrintStrFor];
}
actorTalk(buffer);
@@ -708,9 +703,7 @@
a->setActorCostume(arg);
break;
case 5: // SO_TALK_COLOR
- if ((_gameId == GID_MANIAC) && (_version == 1))
- v1_mm_actor_speech_color[act] = arg;
- else if (_gameId == GID_MANIAC && _demoMode)
+ if (_gameId == GID_MANIAC && _version == 2 && _demoMode && arg == 1)
a->talkColor = 15;
else
a->talkColor = arg;
Index: script_v5.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v5.cpp,v
retrieving revision 1.226.2.5
retrieving revision 1.226.2.6
diff -u -d -r1.226.2.5 -r1.226.2.6
--- script_v5.cpp 13 Aug 2004 09:07:10 -0000 1.226.2.5
+++ script_v5.cpp 14 Aug 2004 03:07:32 -0000 1.226.2.6
@@ -503,6 +503,7 @@
j = getVarOrDirectByte(PARAM_2);
}
+ a->boxscale = i;
a->setScale(i, j);
break;
case 18: // SO_NEVER_ZCLIP
@@ -1926,7 +1927,7 @@
_opcode = fetchScriptByte();
d = getVarOrDirectByte(PARAM_1);
e = getVarOrDirectByte(PARAM_2);
- setupShadowPalette(a, b, c, d, e);
+ setupShadowPalette(a, b, c, d, e, 0, 256);
break;
case 13: // SO_SAVE_STRING
Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.293.2.24
retrieving revision 1.293.2.25
diff -u -d -r1.293.2.24 -r1.293.2.25
--- script_v6.cpp 13 Aug 2004 09:37:35 -0000 1.293.2.24
+++ script_v6.cpp 14 Aug 2004 03:07:32 -0000 1.293.2.25
@@ -1721,7 +1721,7 @@
c = pop();
b = pop();
a = pop();
- setupShadowPalette(a, b, c, d, e);
+ setupShadowPalette(a, b, c, d, e, 0, 256);
break;
case 184: // SO_SAVE_STRING
@@ -2620,7 +2620,7 @@
// Case 108 and 109 share the same function
if (num != 6)
warning("o6_kernelSetFunctions sub op %d: expected 6 params but got %d", args[0], num);
- createSpecialPalette(args[1], args[2], args[3], args[4], args[5], 0, 256);
+ setupShadowPalette(args[3], args[4], args[5], args[1], args[2], 0, 256);
break;
case 110:
_charset->clearCharsetMask();
@@ -2630,7 +2630,7 @@
a->shadow_mode = args[2] + args[3];
break;
case 112: /* palette shift? */
- createSpecialPalette(args[1], args[2], args[3], args[4], args[5], args[6], args[7]);
+ setupShadowPalette(args[3], args[4], args[5], args[1], args[2], args[6], args[7]);
break;
case 114:
// Sam & Max film noir mode
Index: script_v6he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6he.cpp,v
retrieving revision 2.15.2.9
retrieving revision 2.15.2.10
diff -u -d -r2.15.2.9 -r2.15.2.10
--- script_v6he.cpp 13 Aug 2004 09:37:35 -0000 2.15.2.9
+++ script_v6he.cpp 14 Aug 2004 03:07:33 -0000 2.15.2.10
@@ -490,7 +490,7 @@
c = pop();
b = pop();
a = pop();
- setupShadowPalette(a, b, c, d, e);
+ setupShadowPalette(a, b, c, d, e, 0, 256);
break;
case 184: // SO_SAVE_STRING
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.369.2.9
retrieving revision 1.369.2.10
diff -u -d -r1.369.2.9 -r1.369.2.10
--- scumm.h 18 Jul 2004 22:15:52 -0000 1.369.2.9
+++ scumm.h 14 Aug 2004 03:07:33 -0000 1.369.2.10
@@ -753,6 +753,7 @@
void setActorRedrawFlags();
void putActors();
void showActors();
+ void setupV1ActorTalkColor();
void resetActorBgs();
void processActors();
void processUpperActors();
@@ -832,8 +833,6 @@
void initBGBuffers(int height);
void initCycl(const byte *ptr); // Color cycle
- void createSpecialPalette(int16 a, int16 b, int16 c, int16 d, int16 e, int16 colorMin, int16 colorMax);
-
void drawObject(int obj, int arg);
void drawRoomObjects(int arg);
void drawRoomObject(int i, int arg);
@@ -874,7 +873,7 @@
protected:
void moveMemInPalRes(int start, int end, byte direction);
void setupShadowPalette(int slot, int redScale, int greenScale, int blueScale, int startColor, int endColor);
- void setupShadowPalette(int redScale, int greenScale, int blueScale, int startColor, int endColor);
+ void setupShadowPalette(int redScale, int greenScale, int blueScale, int startColor, int endColor, int start, int end);
void darkenPalette(int redScale, int greenScale, int blueScale, int startColor, int endColor);
void desaturatePalette(int hueScale, int satScale, int lightScale, int startColor, int endColor);
@@ -1218,6 +1217,7 @@
byte VAR_BLAST_ABOVE_TEXT;
byte VAR_VOICE_MODE;
+ byte VAR_NUM_GLOBAL_OBJS;
byte VAR_MUSIC_BUNDLE_LOADED;
byte VAR_VOICE_BUNDLE_LOADED;
};
Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/Attic/scummvm.cpp,v
retrieving revision 2.577.2.29
retrieving revision 2.577.2.30
diff -u -d -r2.577.2.29 -r2.577.2.30
--- scummvm.cpp 12 Aug 2004 16:24:53 -0000 2.577.2.29
+++ scummvm.cpp 14 Aug 2004 03:07:33 -0000 2.577.2.30
@@ -620,6 +620,7 @@
VAR_BLAST_ABOVE_TEXT = 0xFF;
VAR_VOICE_MODE = 0xFF;
+ VAR_NUM_GLOBAL_OBJS = 0xFF;
VAR_MUSIC_BUNDLE_LOADED = 0xFF;
VAR_VOICE_BUNDLE_LOADED = 0xFF;
@@ -1037,9 +1038,11 @@
_actors[i].setActorCostume(i);
}
- // HACK Some palette changes needed for demo script
- // in Maniac Mansion (Enchanced)
- if (_gameId == GID_MANIAC && _version == 2 && _demoMode) {
+ if (_gameId == GID_MANIAC && _version == 1) {
+ setupV1ActorTalkColor();
+ } else if (_gameId == GID_MANIAC && _version == 2 && _demoMode) {
+ // HACK Some palette changes needed for demo script
+ // in Maniac Mansion (Enchanced)
_actors[3].setPalette(3, 1);
_actors[9].talkColor = 15;
_actors[10].talkColor = 7;
@@ -1165,6 +1168,7 @@
VAR(VAR_LANGUAGE) = _language;
} else if (_version >= 7) {
VAR(VAR_V6_EMSSPACE) = 10000;
+ VAR(VAR_NUM_GLOBAL_OBJS) = _numGlobalObjects - 1;
} else {
VAR(VAR_CURRENTDRIVE) = 0;
VAR(VAR_FIXEDDISK) = true;
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.320.2.10
retrieving revision 1.320.2.11
diff -u -d -r1.320.2.10 -r1.320.2.11
--- sound.cpp 13 Aug 2004 09:37:35 -0000 1.320.2.10
+++ sound.cpp 14 Aug 2004 03:07:33 -0000 1.320.2.11
@@ -25,6 +25,7 @@
#include "scumm/imuse.h"
#include "scumm/imuse_digi/dimuse.h"
#include "scumm/scumm.h"
+#include "scumm/saveload.h"
#include "scumm/sound.h"
#include "common/config-manager.h"
@@ -1046,4 +1047,14 @@
AudioCD.updateCD();
}
+const SaveLoadEntry *Sound::getSaveLoadEntries() {
+ static const SaveLoadEntry soundEntries[] = {
+ MKLINE(Sound, _currentCDSound, sleInt16, VER(35)),
+ MKLINE(Sound, _currentMusic, sleInt16, VER(35)),
+ MKEND()
+ };
+
+ return soundEntries;
+}
+
} // End of namespace Scumm
Index: sound.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.h,v
retrieving revision 1.62.2.3
retrieving revision 1.62.2.4
diff -u -d -r1.62.2.3 -r1.62.2.4
--- sound.h 13 Aug 2004 09:37:35 -0000 1.62.2.3
+++ sound.h 14 Aug 2004 03:07:34 -0000 1.62.2.4
@@ -31,6 +31,7 @@
class ScummEngine;
struct MP3OffsetTable;
+struct SaveLoadEntry;
enum {
kTalkSoundID = 10000
@@ -56,8 +57,8 @@
int _overrideFreq;
- int _currentCDSound;
- int _currentMusic;
+ int16 _currentCDSound;
+ int16 _currentMusic;
ScummEngine *_vm;
@@ -96,6 +97,9 @@
void updateCD();
int getCurrentCDSound() const { return _currentCDSound; }
+ // Used by the save/load system:
+ const SaveLoadEntry *getSaveLoadEntries();
+
protected:
File *openSfxFile();
void startSfxSound(File *file, int file_size, PlayingSoundHandle *handle, int id = -1);
Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.193.2.9
retrieving revision 1.193.2.10
diff -u -d -r1.193.2.9 -r1.193.2.10
--- string.cpp 13 Aug 2004 09:08:26 -0000 1.193.2.9
+++ string.cpp 14 Aug 2004 03:07:34 -0000 1.193.2.10
@@ -173,7 +173,10 @@
}
// Always set to 60
- _talkDelay = 60;
+ if (_version <= 6)
+ _talkDelay = 60;
+ else
+ _talkDelay = VAR(VAR_DEFAULT_TALK_DELAY);
if (!_keepText) {
if (_version <= 3 && _gameId != GID_LOOM) {
Index: vars.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/vars.cpp,v
retrieving revision 1.71.2.5
retrieving revision 1.71.2.6
diff -u -d -r1.71.2.5 -r1.71.2.6
--- vars.cpp 18 Jul 2004 13:49:32 -0000 1.71.2.5
+++ vars.cpp 14 Aug 2004 03:07:34 -0000 1.71.2.6
@@ -207,6 +207,8 @@
VAR_NEW_ROOM = 35;
VAR_WALKTO_OBJ = 36;
+ VAR_NUM_GLOBAL_OBJS = 37;
+
VAR_CAMERA_DEST_X = 38;
VAR_CAMERA_DEST_Y = 39;
VAR_CAMERA_FOLLOWED_ACTOR = 40;
More information about the Scummvm-git-logs
mailing list