Set AGI's computer type variable (v20 i.e. vComputer) according to the used platform. Now using different values for IBM-PC, Atari ST, Amiga and Apple IIGS platforms.

svn-id: r30153
This commit is contained in:
Kari Salminen 2008-01-02 16:36:47 +00:00
parent 33b2a4083d
commit 6dfaaf3018
2 changed files with 29 additions and 1 deletions

View File

@ -265,6 +265,18 @@ enum AgiMonitorType {
// kAgiMonitorVga = 4 // Not sure about this
};
/**
* Different computer types.
* Used with AGI variable 20 i.e. vComputer.
* FIXME? As an exception Amiga's Space Quest I (Version 1.2, AGI 2.082) uses value 20.
*/
enum AgiComputerType {
kAgiComputerPC = 0,
kAgiComputerAtariST = 4,
kAgiComputerAmiga = 5,
kAgiComputerApple2GS = 7
};
/**
* AGI flags
*/

View File

@ -365,7 +365,23 @@ int AgiEngine::runGame() {
if (ec == errRestartGame)
setflag(fRestartGame, true);
setvar(vComputer, 0); /* IBM PC (4 = Atari ST) */
// Set computer type (v20 i.e. vComputer)
switch (getPlatform()) {
case Common::kPlatformAtariST:
setvar(vComputer, kAgiComputerAtariST);
break;
case Common::kPlatformAmiga:
setvar(vComputer, kAgiComputerAmiga);
break;
case Common::kPlatformApple2GS:
setvar(vComputer, kAgiComputerApple2GS);
break;
case Common::kPlatformPC:
default:
setvar(vComputer, kAgiComputerPC);
break;
}
setvar(vSoundgen, 1); /* IBM PC SOUND */
// Set monitor type (v26 i.e. vMonitor)