Implemented the read resource index as the first virtual fonction...

svn-id: r3803
This commit is contained in:
Vincent Hamm 2002-03-23 22:03:35 +00:00
parent ccf69ad76b
commit e63a818d21
4 changed files with 13 additions and 15 deletions

View File

@ -322,7 +322,7 @@ void Scumm::readIndexFile() {
openRoom(-1);
}
void Scumm::readIndexFileSmall() {
void Scumm_v3::readIndexFile() {
uint16 blocktype;
uint32 itemsize;
int numblock = 0;

10
scumm.h
View File

@ -810,8 +810,7 @@ public:
void loadRoomObjectsSmall();
void readArrayFromIndexFile();
void readMAXS();
void readIndexFile();
void readIndexFileSmall();
virtual void readIndexFile();
void loadCharset(int i);
void nukeCharset(int i);
@ -1663,22 +1662,17 @@ public:
byte VAR_CHARSET_MASK;
void launch();
virtual void test1() const { return; };
};
class Scumm_v7 : public Scumm
{
public:
// Scumm_v7();
// const static int test = 1;
void test1v7() const { printf("Test1"); }
void test1() const { test1v7(); }
};
class Scumm_v3 : public Scumm
{
public:
void readIndexFile();
};
struct ScummDebugger {

View File

@ -1051,10 +1051,7 @@ void Scumm::launch()
if (_gameId==GID_MONKEY2 && _bootParam == 0)
_bootParam = 10001;
if (_features & GF_SMALL_HEADER)
readIndexFileSmall();
else
readIndexFile();
readIndexFile();
initRandSeeds();

11
sdl.cpp
View File

@ -919,8 +919,15 @@ int main(int argc, char* argv[]) {
#endif
detecter.detectMain(argc, argv);
scumm = new Scumm;
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;
scumm->_fullScreen = detecter._fullScreen;
scumm->_debugMode = detecter._debugMode;