[Scummvm-devel] Re: [Scummvm-cvs-logs] SF.net SVN: scummvm: [22715] scummvm/trunk/engines/scumm/resource_v2.cpp
Max Horn
max at quendi.de
Sun May 28 05:43:03 CEST 2006
Am 28.05.2006 um 14:24 schrieb Travis Howell:
> From: <fingolfin at users.sourceforge.net>
>> Revision: 22715
>> Author: fingolfin
>> Date: 2006-05-28 05:12:30 -0700 (Sun, 28 May 2006)
>> ViewCVS: http://svn.sourceforge.net/scummvm/?rev=22715&view=rev
>>
>> Log Message:
>> -----------
>> No need to compute the SCUMM version here; rather, verify that the
>> SCUMM version is already set correctly
>>
>> Modified Paths:
>> --------------
>> scummvm/trunk/engines/scumm/resource_v2.cpp
>> Modified: scummvm/trunk/engines/scumm/resource_v2.cpp
>> ===================================================================
>> --- scummvm/trunk/engines/scumm/resource_v2.cpp 2006-05-28
>> 12:10:11 UTC (rev 22714)
>> +++ scummvm/trunk/engines/scumm/resource_v2.cpp 2006-05-28
>> 12:12:30 UTC (rev 22715)
>> @@ -174,23 +174,24 @@
>> switch (magic) {
>> case 0x0A31:
>> printf("Classic V1 game detected\n");
>> - _game.version = 1;
>> + assert(_game.version == 1);
>> readClassicIndexFile();
>> break;
>> case 0x132:
>> printf("C64 V1 game detected\n");
>> - _game.version = 1;
>> + assert(_game.version == 1);
>> readClassicIndexFile();
>> break;
>> default:
>
> Breaks Commodore 64 versions of SCUMM games, when D64 disk images
> are used, since that is how the SCUMM version is detected.
Probably because we are using version = 0 for those:
{"maniac", "C64", GID_MANIAC, 0, 0, MDT_PCSPK, GF_SMALL_HEADER |
GF_NO_SCALING | GF_16COLOR | GF_USE_KEY | GF_OLD_BUNDLE,
Common::kPlatformC64},
Which makes me all the more glad I made the above change, to detect
this abuse :-). Two paths come to mind to fix this:
1) Change the above gameVariantsTable to use version 0, and then
modify the big switch statement in Engine_SCUMM_create to use the
variant to distinguish the C64 version of MM.
2) Keep it at 0, change the above assert to check for _game.version
== 0, and look through all spots that check for "_game.version == 1"
The former is probably a lot easier to implement.
Cheers,
Max
More information about the Scummvm-devel
mailing list