[Scummvm-cvs-logs] CVS: scummvm/scumm charset.cpp,2.55,2.56 help.cpp,1.7,1.8 resource.cpp,1.107,1.108 resource_v3.cpp,1.18,1.19 script.cpp,1.120,1.121 script_v5.cpp,1.133,1.134 scumm.h,1.269,1.270 scummvm.cpp,2.287,2.288 sound.cpp,1.172,1.173
Travis Howell
kirben at users.sourceforge.net
Thu Jul 17 22:50:21 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv7568/scumm
Modified Files:
charset.cpp help.cpp resource.cpp resource_v3.cpp script.cpp
script_v5.cpp scumm.h scummvm.cpp sound.cpp
Log Message:
Add Indy3 FM Towns support, patch #773434
Index: charset.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/charset.cpp,v
retrieving revision 2.55
retrieving revision 2.56
diff -u -d -r2.55 -r2.56
--- charset.cpp 16 Jul 2003 20:50:26 -0000 2.55
+++ charset.cpp 18 Jul 2003 05:49:20 -0000 2.56
@@ -928,8 +928,8 @@
void CharsetRendererV3::setColor(byte color)
{
_color = color;
- _shadowColor = (_vm->_gameId == GID_ZAK256) ? 8 : 0;
- if (_vm->_gameId == GID_ZAK256) {
+ _shadowColor = (_vm->_features & GF_FMTOWNS) ? 8 : 0;
+ if (_vm->_features & GF_FMTOWNS) {
_dropShadow = ((_color & 0x80) != 0);
_color &= 0x7f;
} else if (_vm->_features & GF_16COLOR) {
Index: help.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/help.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- help.cpp 15 Jul 2003 07:29:41 -0000 1.7
+++ help.cpp 18 Jul 2003 05:49:21 -0000 1.8
@@ -31,6 +31,7 @@
break;
case GID_INDY3:
case GID_INDY3_256:
+ case GID_INDY3_TOWNS:
return 6;
break;
case GID_LOOM:
@@ -141,6 +142,7 @@
break;
case GID_INDY3:
case GID_INDY3_256:
+ case GID_INDY3_TOWNS:
ADD_BIND("q", "Push");
ADD_BIND("a", "Pull");
ADD_BIND("z", "Give");
@@ -264,6 +266,7 @@
case GID_INDY3:
case GID_ZAK256:
case GID_INDY3_256:
+ case GID_INDY3_TOWNS:
title = "Other game controls:";
ADD_TEXT("Inventory:");
ADD_BIND("y", "Upper left item");
@@ -289,6 +292,7 @@
switch (gameId) {
case GID_INDY3:
case GID_INDY3_256:
+ case GID_INDY3_TOWNS:
title = "Fighting controls (numpad):";
ADD_BIND("7", "Step back");
ADD_BIND("4", "Step back");
@@ -312,6 +316,7 @@
switch (gameId) {
case GID_INDY3:
case GID_INDY3_256:
+ case GID_INDY3_TOWNS:
title = "Biplane controls (numpad):";
ADD_BIND("7", "Fly to upper left");
ADD_BIND("4", "Fly to left");
Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource.cpp,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -d -r1.107 -r1.108
--- resource.cpp 17 Jul 2003 14:03:15 -0000 1.107
+++ resource.cpp 18 Jul 2003 05:49:21 -0000 1.108
@@ -652,7 +652,7 @@
tag = _fileHandle.readUint16LE();
_fileHandle.seek(-6, SEEK_CUR);
/* FIXME */
- if ((type == rtSound) && !(_features & GF_AMIGA) && (_gameId != GID_ZAK256)) {
+ if ((type == rtSound) && !(_features & GF_AMIGA) && !(_features & GF_FMTOWNS)) {
return readSoundResourceSmallHeader(type, idx);
}
} else {
Index: resource_v3.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource_v3.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- resource_v3.cpp 24 May 2003 22:13:01 -0000 1.18
+++ resource_v3.cpp 18 Jul 2003 05:49:21 -0000 1.19
@@ -152,7 +152,9 @@
break;
default:
- error("Bad ID %c%c found in directory!", blocktype & 0xFF, blocktype >> 8);
+ // FIXME: this is a little hack because Indy3 FM Towns has 32 bytes appended to 00.LFL.
+ if (_gameId != GID_INDY3_TOWNS)
+ error("Bad ID %c%c found in directory!", blocktype & 0xFF, blocktype >> 8);
return;
}
}
Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script.cpp,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -d -r1.120 -r1.121
--- script.cpp 12 Jul 2003 21:28:04 -0000 1.120
+++ script.cpp 18 Jul 2003 05:49:21 -0000 1.121
@@ -507,13 +507,18 @@
return (_scummVars[ var ] & ( 1 << bit ) ) ? 1 : 0;
} else {
var &= 0x7FFF;
+#if defined(BYPASS_COPY_PROT)
+ if (_gameId == GID_INDY3_TOWNS && var == 1508) {
+ return 0;
+ }
+#endif
checkRange(_numBitVariables - 1, 0, var, "Bit variable %d out of range(r)");
return (_bitVars[var >> 3] & (1 << (var & 7))) ? 1 : 0;
}
}
if (var & 0x4000) {
- if (_gameId == GID_INDY3_256) {
+ if (_gameId == GID_INDY3_256 || _gameId == GID_INDY3_TOWNS) {
var &= 0xF;
} else {
var &= 0xFFF;
@@ -580,7 +585,7 @@
}
if (var & 0x4000) {
- if (_gameId == GID_INDY3_256) {
+ if (_gameId == GID_INDY3_256 || _gameId == GID_INDY3_TOWNS) {
var &= 0xF;
} else {
var &= 0xFFF;
@@ -758,7 +763,7 @@
// not actual data not even a 00 (stop code)
// maybe we should be limiting ourselves to strictly reading the size
// described in the header?
- if (_gameId == GID_INDY3_256) {
+ if (_gameId == GID_INDY3_256 || _gameId == GID_INDY3_TOWNS) {
// FIXME: Oddly, Indy3 seems to contain exit scripts with only a size
// and a tag - not even a terminating NULL!
byte *roomptr = getResourceAddress(rtRoom, _roomResource);
Index: script_v5.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v5.cpp,v
retrieving revision 1.133
retrieving revision 1.134
diff -u -d -r1.133 -r1.134
--- script_v5.cpp 13 Jul 2003 16:22:17 -0000 1.133
+++ script_v5.cpp 18 Jul 2003 05:49:21 -0000 1.134
@@ -599,7 +599,7 @@
// the actor ID of the opposing soldier. So, we copy that value
// over to the Local[5] variable of script 33.
// See also bug #743314.
- if (_gameId == GID_INDY3_256 && vm.slot[cur].number == 32 && script == 33) {
+ if ((_gameId == GID_INDY3_256 || _gameId == GID_INDY3_TOWNS) && vm.slot[cur].number == 32 && script == 33) {
vars[5] = vm.localvar[cur][5];
}
@@ -667,7 +667,7 @@
initCharset(getVarOrDirectByte(0x80));
break;
case 14: /* unk */
- if (_features & GF_OLD_BUNDLE || _gameId == GID_INDY3_256) {
+ if (_features & GF_OLD_BUNDLE || _gameId == GID_INDY3_256 || _gameId == GID_INDY3_TOWNS) {
// FIXME: What is this supposed to do? From comparing
// Indy3's script 118 to the Passport Demo's script 58
// my guess is that it's some sort of "init charset",
@@ -690,7 +690,7 @@
break;
}
- if (!(_features & GF_OLD_BUNDLE) && _gameId != GID_INDY3_256) {
+ if (!(_features & GF_OLD_BUNDLE) && _gameId != GID_INDY3_256 && _gameId != GID_INDY3_TOWNS) {
VAR(VAR_CURSORSTATE) = _cursor.state;
VAR(VAR_USERPUT) = _userPut;
}
@@ -975,7 +975,7 @@
return;
// INDY3 uses this opcode as a wait_for_actor();
- if ((_gameId == GID_INDY3_256) || (_gameId == GID_INDY3)) {
+ if ((_gameId == GID_INDY3_TOWNS) || (_gameId == GID_INDY3_256) || (_gameId == GID_INDY3)) {
const byte *oldaddr = _scriptPointer - 1;
a = derefActor(getVarOrDirectByte(0x80), "o5_getActorScale (wait)");
if (a->moving) {
@@ -1009,7 +1009,7 @@
int a;
getResultPos();
- if (_gameId == GID_INDY3_256 || _gameId == GID_INDY3)
+ if (_gameId == GID_INDY3_TOWNS || _gameId == GID_INDY3_256 || _gameId == GID_INDY3)
a = getVarOrDirectByte(0x80);
else
a = getVarOrDirectWord(0x80);
@@ -1021,7 +1021,7 @@
int a;
getResultPos();
- if (_gameId == GID_INDY3_256 || _gameId == GID_INDY3) {
+ if (_gameId == GID_INDY3_TOWNS || _gameId == GID_INDY3_256 || _gameId == GID_INDY3) {
a = getVarOrDirectByte(0x80);
// FIXME - bug 636433 workaround (can't get into Zeppelin)
@@ -1505,7 +1505,7 @@
_opcode = fetchScriptByte();
if (_opcode != 17)
resid = getVarOrDirectByte(0x80);
- if (_gameId != GID_ZAK256) {
+ if (!(_features & GF_FMTOWNS)) {
// FIXME - this probably can be removed eventually, I don't think the following
// check will ever be triggered, but then I could be wrong and it's better
// to play it safe.
@@ -2014,7 +2014,7 @@
}
void Scumm_v5::o5_startMusic() {
- if (_gameId == GID_ZAK256) {
+ if (_features & GF_FMTOWNS) {
// In Zak256, this seems to be some kind of Audio CD status query function.
// See also bug #762589 (thanks to Hibernatus for providing the information).
getResultPos();
@@ -2341,7 +2341,7 @@
void Scumm_v5::o5_wait() {
const byte *oldaddr = _scriptPointer - 1;
- if ((_gameId == GID_INDY3_256) || (_gameId == GID_INDY3)) {
+ if ((_gameId == GID_INDY3_TOWNS) || (_gameId == GID_INDY3_256) || (_gameId == GID_INDY3)) {
_opcode = 2;
} else
_opcode = fetchScriptByte();
@@ -2584,7 +2584,7 @@
// It's also needed for Loom, or the lines Bobbin
// speaks during the intro are put at position 0,0.
// In addition, Loom needs to remember the text colour.
- if (_gameId == GID_INDY3_256 || _gameId == GID_INDY3 || _gameId == GID_LOOM) {
+ if (_gameId == GID_INDY3_TOWNS || _gameId == GID_INDY3_256 || _gameId == GID_INDY3 || _gameId == GID_LOOM) {
_string[textSlot].t_xpos = _string[textSlot].xpos;
_string[textSlot].t_ypos = _string[textSlot].ypos;
_string[textSlot].t_color = _string[textSlot].color;
@@ -2615,7 +2615,7 @@
a = getVarOrDirectWord(0x80);
#if 1
- if (_gameId == GID_ZAK256) {
+ if (_features & GF_FMTOWNS) {
// FIXME / TODO: OK the first thing to note is: at least in Zak256,
// maybe also in other games, this opcode does a bit more. I added
// some stubs here, but somebody with a full IDA or more knowledge
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.269
retrieving revision 1.270
diff -u -d -r1.269 -r1.270
--- scumm.h 15 Jul 2003 21:30:53 -0000 1.269
+++ scumm.h 18 Jul 2003 05:49:21 -0000 1.270
@@ -84,6 +84,7 @@
GF_AMIGA = 1 << 14,
GF_HUMONGOUS = 1 << 15,
GF_AFTER_HEV7 = 1 << 16,
+ GF_FMTOWNS = 1 << 17,
GF_EXTERNAL_CHARSET = GF_SMALL_HEADER
};
@@ -212,7 +213,8 @@
GID_ZAK,
GID_PUTTDEMO,
GID_PUTTPUTT,
- GID_MONKEY_SEGA
+ GID_MONKEY_SEGA,
+ GID_INDY3_TOWNS
};
#define _maxRooms res.num[rtRoom]
Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.287
retrieving revision 2.288
diff -u -d -r2.287 -r2.288
--- scummvm.cpp 17 Jul 2003 11:20:20 -0000 2.287
+++ scummvm.cpp 18 Jul 2003 05:49:21 -0000 2.288
@@ -90,10 +90,12 @@
/* Scumm Version 3 */
{"indy3EGA", "Indiana Jones and the Last Crusade", GID_INDY3, 3, VersionSettings::ADLIB_ALWAYS,
GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALLING | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE, "00.LFL"},
+ {"indy3Towns", "Indiana Jones and the Last Crusade (FM Towns)", GID_INDY3_TOWNS, 3, VersionSettings::ADLIB_ALWAYS,
+ GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALLING | GF_OLD256 | GF_FMTOWNS | GF_AUDIOTRACKS, "00.LFL"},
{"indy3", "Indiana Jones and the Last Crusade (256)", GID_INDY3_256, 3, VersionSettings::ADLIB_ALWAYS,
GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALLING | GF_OLD256 | GF_ADLIB_DEFAULT, "00.LFL"},
{"zak256", "Zak McKracken and the Alien Mindbenders (256)", GID_ZAK256, 3, VersionSettings::ADLIB_ALWAYS,
- GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALLING | GF_OLD256 | GF_AUDIOTRACKS, "00.LFL"},
+ GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALLING | GF_OLD256 | GF_FMTOWNS | GF_AUDIOTRACKS, "00.LFL"},
{"loom", "Loom", GID_LOOM, 3, VersionSettings::ADLIB_ALWAYS,
GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALLING | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE, "00.LFL"},
@@ -567,7 +569,7 @@
_hexdumpScripts = false;
_showStack = false;
- if (_gameId == GID_ZAK256) { // FmTowns is 320x240
+ if (_features & GF_FMTOWNS) { // FmTowns is 320x240
_screenWidth = 320;
_screenHeight = 240;
} else if (_gameId == GID_CMI) {
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.172
retrieving revision 1.173
diff -u -d -r1.172 -r1.173
--- sound.cpp 17 Jul 2003 12:27:13 -0000 1.172
+++ sound.cpp 18 Jul 2003 05:49:21 -0000 1.173
@@ -803,7 +803,7 @@
stopCD();
}
- if (_scumm->_gameId == GID_ZAK256) {
+ if (_scumm->_features & GF_FMTOWNS) {
_scumm->_mixer->stopID(a);
} else if (_scumm->_imuseDigital) {
_scumm->_imuseDigital->stopSound(a);
More information about the Scummvm-git-logs
mailing list