mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-30 15:31:59 +00:00
Created all the child scumm class. The good one is now selected according to the game database. Now we need to move all the specific stuff to the child class
svn-id: r3819
This commit is contained in:
parent
e732682d9b
commit
055953b329
@ -191,6 +191,7 @@ bool GameDetecter::detectGame() {
|
||||
do {
|
||||
if (!scumm_stricmp(_exe_name, gnl->filename)) {
|
||||
_gameId = gnl->id;
|
||||
_scummVersion = gnl->major;
|
||||
// _majorScummVersion = gnl->major;
|
||||
// _middleScummVersion = gnl->middle;
|
||||
// _minorScummVersion = gnl->minor;
|
||||
|
@ -21,4 +21,6 @@ public:
|
||||
uint32 _features;
|
||||
uint16 _soundCardType;
|
||||
|
||||
int _scummVersion;
|
||||
|
||||
};
|
||||
|
21
scumm.h
21
scumm.h
@ -1664,17 +1664,28 @@ public:
|
||||
void launch();
|
||||
};
|
||||
|
||||
class Scumm_v7 : public Scumm
|
||||
{
|
||||
public:
|
||||
};
|
||||
|
||||
class Scumm_v3 : public Scumm
|
||||
{
|
||||
public:
|
||||
void readIndexFile();
|
||||
};
|
||||
|
||||
class Scumm_v4 : public Scumm_v3
|
||||
{
|
||||
};
|
||||
|
||||
class Scumm_v5 : public Scumm
|
||||
{
|
||||
};
|
||||
|
||||
class Scumm_v6 : public Scumm
|
||||
{
|
||||
};
|
||||
|
||||
class Scumm_v7 : public Scumm
|
||||
{
|
||||
};
|
||||
|
||||
struct ScummDebugger {
|
||||
Scumm *_s;
|
||||
byte _command;
|
||||
|
31
sdl.cpp
31
sdl.cpp
@ -925,15 +925,28 @@ int main(int argc, char* argv[]) {
|
||||
if(detecter.detectMain(argc, argv))
|
||||
return(-1);
|
||||
|
||||
if( detecter._features & GF_AFTER_V7 ) // not final implementation. This is just a test
|
||||
scumm = new Scumm_v7;
|
||||
else
|
||||
if( detecter._features & GF_OLD256 )
|
||||
scumm = new Scumm_v3;
|
||||
|
||||
else
|
||||
scumm = new Scumm;
|
||||
|
||||
switch(detecter._scummVersion)
|
||||
{
|
||||
case 3:
|
||||
scumm = new Scumm_v3;
|
||||
break;
|
||||
case 4:
|
||||
scumm = new Scumm_v4;
|
||||
break;
|
||||
case 5:
|
||||
scumm = new Scumm_v5;
|
||||
break;
|
||||
case 6:
|
||||
scumm = new Scumm_v6;
|
||||
break;
|
||||
case 7:
|
||||
scumm = new Scumm_v7;
|
||||
break;
|
||||
default: // do we really need a default ?
|
||||
scumm = new Scumm;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
/* All those stuff should be moved to the constructor.... */
|
||||
for (i=0;i<17;i++)
|
||||
|
Loading…
x
Reference in New Issue
Block a user