[Scummvm-git-logs] scummvm master -> df2e4e8e2c02981b339235f4a429db5bb68ea4f4
waltervn
walter at vanniftrik-it.nl
Tue Jul 25 14:11:55 CEST 2017
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
90a453a534 ADL: Add support for .d13 disk images
06b9cd195f ADL: Move broken-room handling into ADL v2
df2e4e8e2c ADL: Add hires3 support
Commit: 90a453a53434dc16dfa07ca97c925e437ea9e785
https://github.com/scummvm/scummvm/commit/90a453a53434dc16dfa07ca97c925e437ea9e785
Author: Walter van Niftrik (walter at scummvm.org)
Date: 2017-07-25T14:08:22+02:00
Commit Message:
ADL: Add support for .d13 disk images
Changed paths:
engines/adl/disk.cpp
diff --git a/engines/adl/disk.cpp b/engines/adl/disk.cpp
index 2c1fe8e..6952fb9 100644
--- a/engines/adl/disk.cpp
+++ b/engines/adl/disk.cpp
@@ -254,6 +254,11 @@ bool DiskImage::open(const Common::String &filename) {
_tracks = 35;
_sectorsPerTrack = 16;
_bytesPerSector = 256;
+ } else if (lcName.hasSuffix(".d13")) {
+ _stream = readImage(filename);
+ _tracks = 35;
+ _sectorsPerTrack = 13;
+ _bytesPerSector = 256;
} else if (lcName.hasSuffix(".nib")) {
_stream = readImage_NIB(filename);
_tracks = 35;
Commit: 06b9cd195f1cec8d7464c0179d90bc9b92db14cb
https://github.com/scummvm/scummvm/commit/06b9cd195f1cec8d7464c0179d90bc9b92db14cb
Author: Walter van Niftrik (walter at scummvm.org)
Date: 2017-07-25T14:08:35+02:00
Commit Message:
ADL: Move broken-room handling into ADL v2
Changed paths:
engines/adl/adl_v2.cpp
engines/adl/adl_v2.h
engines/adl/hires4.cpp
diff --git a/engines/adl/adl_v2.cpp b/engines/adl/adl_v2.cpp
index 6eb26c5..075c2ef 100644
--- a/engines/adl/adl_v2.cpp
+++ b/engines/adl/adl_v2.cpp
@@ -245,6 +245,14 @@ void AdlEngine_v2::drawItem(Item &item, const Common::Point &pos) {
}
void AdlEngine_v2::loadRoom(byte roomNr) {
+ if (Common::find(_brokenRooms.begin(), _brokenRooms.end(), roomNr) != _brokenRooms.end()) {
+ debug("Warning: attempt to load non-existent room %d", roomNr);
+ _roomData.description.clear();
+ _roomData.pictures.clear();
+ _roomData.commands.clear();
+ return;
+ }
+
Room &room = getRoom(roomNr);
StreamPtr stream(room.data->createReadStream());
diff --git a/engines/adl/adl_v2.h b/engines/adl/adl_v2.h
index 889b03c..fc22c31 100644
--- a/engines/adl/adl_v2.h
+++ b/engines/adl/adl_v2.h
@@ -97,6 +97,7 @@ protected:
Common::Array<DataBlockPtr> _itemPics;
bool _itemRemoved;
byte _roomOnScreen, _picOnScreen, _itemsOnScreen;
+ Common::Array<byte> _brokenRooms;
private:
Common::RandomSource *_random;
diff --git a/engines/adl/hires4.cpp b/engines/adl/hires4.cpp
index ce774ed..2aa9763 100644
--- a/engines/adl/hires4.cpp
+++ b/engines/adl/hires4.cpp
@@ -54,7 +54,7 @@ class HiRes4Engine : public AdlEngine_v3 {
public:
HiRes4Engine(OSystem *syst, const AdlGameDescription *gd) :
AdlEngine_v3(syst, gd),
- _boot(nullptr) { }
+ _boot(nullptr) { _brokenRooms.push_back(121); }
~HiRes4Engine();
private:
@@ -62,7 +62,6 @@ private:
void runIntro();
void init();
void initGameState();
- void loadRoom(byte roomNr);
void putSpace(uint x, uint y) const;
void drawChar(byte c, Common::SeekableReadStream &shapeTable, Common::Point &pos) const;
@@ -539,26 +538,12 @@ void HiRes4Engine::initGameState() {
loadItems(*stream);
}
-void HiRes4Engine::loadRoom(byte roomNr) {
- if (roomNr == 121) {
- // Room 121 is missing. This causes problems when we're dumping
- // scripts with the debugger, so we intercept this room load here.
- debug("Warning: attempt to load non-existent room 121");
- _roomData.description.clear();
- _roomData.pictures.clear();
- _roomData.commands.clear();
- return;
- }
-
- AdlEngine_v3::loadRoom(roomNr);
-}
-
class HiRes4Engine_Atari : public AdlEngine_v3 {
public:
HiRes4Engine_Atari(OSystem *syst, const AdlGameDescription *gd) :
AdlEngine_v3(syst, gd),
_boot(nullptr),
- _curDisk(0) { }
+ _curDisk(0) { _brokenRooms.push_back(121); }
~HiRes4Engine_Atari();
private:
@@ -649,15 +634,6 @@ void HiRes4Engine_Atari::loadRoom(byte roomNr) {
rebindDisk();
}
- if (roomNr == 121) {
- // Room 121 is missing, see Apple II version
- debug("Warning: attempt to load non-existent room 121");
- _roomData.description.clear();
- _roomData.pictures.clear();
- _roomData.commands.clear();
- return;
- }
-
AdlEngine_v3::loadRoom(roomNr);
}
Commit: df2e4e8e2c02981b339235f4a429db5bb68ea4f4
https://github.com/scummvm/scummvm/commit/df2e4e8e2c02981b339235f4a429db5bb68ea4f4
Author: Walter van Niftrik (walter at scummvm.org)
Date: 2017-07-25T14:08:40+02:00
Commit Message:
ADL: Add hires3 support
Game starts up, but isn't playable yet
Changed paths:
engines/adl/adl.cpp
engines/adl/detection.cpp
engines/adl/detection.h
engines/adl/hires2.cpp
diff --git a/engines/adl/adl.cpp b/engines/adl/adl.cpp
index 2d2bee5..61890af 100644
--- a/engines/adl/adl.cpp
+++ b/engines/adl/adl.cpp
@@ -251,6 +251,14 @@ void AdlEngine::loadWords(Common::ReadStream &stream, WordMap &map, Common::Stri
if (synonyms == 0xff)
break;
+ // WORKAROUND: Missing verb list terminator in hires3
+ if (_gameDescription->gameType == GAME_TYPE_HIRES3 && index == 72 && synonyms == 0)
+ return;
+
+ // WORKAROUND: Missing noun list terminator in hires3
+ if (_gameDescription->gameType == GAME_TYPE_HIRES3 && index == 113)
+ return;
+
// WORKAROUND: Missing noun list terminator in hires5 region 15
if (_gameDescription->gameType == GAME_TYPE_HIRES5 && _state.region == 15 && index == 81)
return;
diff --git a/engines/adl/detection.cpp b/engines/adl/detection.cpp
index daee30f..b05ebcf 100644
--- a/engines/adl/detection.cpp
+++ b/engines/adl/detection.cpp
@@ -76,6 +76,7 @@ static const PlainGameDescriptor adlGames[] = {
{ "hires0", "Hi-Res Adventure #0: Mission Asteroid" },
{ "hires1", "Hi-Res Adventure #1: Mystery House" },
{ "hires2", "Hi-Res Adventure #2: Wizard and the Princess" },
+ { "hires3", "Hi-Res Adventure #3: Cranston Manor" },
{ "hires4", "Hi-Res Adventure #4: Ulysses and the Golden Fleece" },
{ "hires5", "Hi-Res Adventure #5: Time Zone" },
{ "hires6", "Hi-Res Adventure #6: The Dark Crystal" },
@@ -141,6 +142,20 @@ static const AdlGameDescription gameDescriptions[] = {
},
GAME_TYPE_HIRES0
},
+ { // Hi-Res Adventure #3: Cranston Manor - Apple II
+ {
+ "hires3", 0,
+ {
+ { "CRANSTON.D13", 0, "474d92b845337ec189867fac035304c7", 116480 },
+ AD_LISTEND
+ },
+ Common::EN_ANY,
+ Common::kPlatformApple2,
+ ADGF_UNSTABLE,
+ GUIO2(GAMEOPTION_COLOR_DEFAULT_ON, GAMEOPTION_SCANLINES)
+ },
+ GAME_TYPE_HIRES3
+ },
{ // Hi-Res Adventure #4: Ulysses and the Golden Fleece - Apple II - Load 'N' Go
{
"hires4", 0,
@@ -357,6 +372,7 @@ void AdlMetaEngine::removeSaveState(const char *target, int slot) const {
Engine *HiRes1Engine_create(OSystem *syst, const AdlGameDescription *gd);
Engine *HiRes2Engine_create(OSystem *syst, const AdlGameDescription *gd);
Engine *HiRes0Engine_create(OSystem *syst, const AdlGameDescription *gd);
+Engine *HiRes3Engine_create(OSystem *syst, const AdlGameDescription *gd);
Engine *HiRes4Engine_create(OSystem *syst, const AdlGameDescription *gd);
Engine *HiRes5Engine_create(OSystem *syst, const AdlGameDescription *gd);
Engine *HiRes6Engine_create(OSystem *syst, const AdlGameDescription *gd);
@@ -377,6 +393,9 @@ bool AdlMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameD
case GAME_TYPE_HIRES0:
*engine = HiRes0Engine_create(syst, adlGd);
break;
+ case GAME_TYPE_HIRES3:
+ *engine = HiRes3Engine_create(syst, adlGd);
+ break;
case GAME_TYPE_HIRES4:
*engine = HiRes4Engine_create(syst, adlGd);
break;
diff --git a/engines/adl/detection.h b/engines/adl/detection.h
index e383706..cb147c7 100644
--- a/engines/adl/detection.h
+++ b/engines/adl/detection.h
@@ -35,6 +35,7 @@ enum GameType {
GAME_TYPE_HIRES0,
GAME_TYPE_HIRES1,
GAME_TYPE_HIRES2,
+ GAME_TYPE_HIRES3,
GAME_TYPE_HIRES4,
GAME_TYPE_HIRES5,
GAME_TYPE_HIRES6
diff --git a/engines/adl/hires2.cpp b/engines/adl/hires2.cpp
index 9f76b0f..4575cf6 100644
--- a/engines/adl/hires2.cpp
+++ b/engines/adl/hires2.cpp
@@ -170,6 +170,20 @@ void HiRes2Engine::runIntro() {
_disk->setSectorLimit(13);
}
+class HiRes3Engine : public HiResBaseEngine {
+public:
+ HiRes3Engine(OSystem *syst, const AdlGameDescription *gd);
+};
+
+HiRes3Engine::HiRes3Engine(OSystem *syst, const AdlGameDescription *gd) :
+ HiResBaseEngine(syst, gd, 138, 255, 36) {
+
+ const byte brokenRooms[] = { 18, 24, 54, 98, 102, 108 };
+
+ for (int i = 0; i < ARRAYSIZE(brokenRooms); ++i)
+ _brokenRooms.push_back(brokenRooms[i]);
+}
+
Engine *HiRes2Engine_create(OSystem *syst, const AdlGameDescription *gd) {
return new HiRes2Engine(syst, gd);
}
@@ -178,4 +192,8 @@ Engine *HiRes0Engine_create(OSystem *syst, const AdlGameDescription *gd) {
return new HiResBaseEngine(syst, gd, 43, 142, 2);
}
+Engine *HiRes3Engine_create(OSystem *syst, const AdlGameDescription *gd) {
+ return new HiRes3Engine(syst, gd);
+}
+
} // End of namespace Adl
More information about the Scummvm-git-logs
mailing list