diff options
author | Strangerke | 2011-06-14 23:54:59 +0200 |
---|---|---|
committer | Strangerke | 2011-06-14 23:54:59 +0200 |
commit | 1ebe182ba1f707bbc10afb3626a30fed89ceb923 (patch) | |
tree | b6284b031e0e051e26ab015f6701f530b1a6fc39 /engines | |
parent | 44cf1872e22dc673dde422faa255a1fd7e6e78e8 (diff) | |
download | scummvm-rg350-1ebe182ba1f707bbc10afb3626a30fed89ceb923.tar.gz scummvm-rg350-1ebe182ba1f707bbc10afb3626a30fed89ceb923.tar.bz2 scummvm-rg350-1ebe182ba1f707bbc10afb3626a30fed89ceb923.zip |
CGE: Fix the remaining link errors. It now crashes instantly, most likely because of the VGA class
Diffstat (limited to 'engines')
-rw-r--r-- | engines/cge/general.cpp | 46 | ||||
-rw-r--r-- | engines/cge/general.h | 6 | ||||
-rw-r--r-- | engines/cge/snail.cpp | 5 |
3 files changed, 50 insertions, 7 deletions
diff --git a/engines/cge/general.cpp b/engines/cge/general.cpp index 03e5126436..73e5b4d21f 100644 --- a/engines/cge/general.cpp +++ b/engines/cge/general.cpp @@ -363,5 +363,51 @@ long Timer(void) { warning("STUB: Timer"); return 0; } + +int new_random(int range) { + warning("STUB: new_random(a)"); + return 0; +} + +#define TIMER_INT 0x08 +//void interrupt (* ENGINE::OldTimer) (...) = NULL; + +ENGINE::ENGINE (uint16 tdiv) +{ +/* + // steal timer interrupt + OldTimer = getvect(TIMER_INT); + setvect(TIMER_INT, NewTimer); + + // set turbo-timer mode + asm mov al,0x36 + asm out 0x43,al + asm mov ax,TMR_DIV + asm out 0x40,al + asm mov al,ah + asm out 0x40,al +*/ + warning("STUB: ENGINE::ENGINE"); +} + +ENGINE::~ENGINE (void) +{ +/* + // reset timer + asm mov al,0x36 + asm out 0x43,al + asm xor al,al + asm out 0x40,al + asm out 0x40,al + // bring back timer interrupt + setvect(TIMER_INT, OldTimer); +*/ + warning("STUB: ENGINE::~ENGINE"); +} + +DATACK::~DATACK (void) +{ + if (!e && Buf) free(Buf); +} } // End of namespace CGE diff --git a/engines/cge/general.h b/engines/cge/general.h index 1146832623..1fc8bd0b0b 100644 --- a/engines/cge/general.h +++ b/engines/cge/general.h @@ -60,10 +60,6 @@ typedef struct { typedef uint16 CRYPT(void *buf, uint16 siz, uint16 seed); -extern Common::RandomSource randSrc; - -#define new_random(a) (randSrc.getRandomNumber(a)) - class COUPLE { protected: signed char A; @@ -237,7 +233,7 @@ char *dwtom(uint32 val, char * str, int radix, int len); int TakeEnum(const char **tab, const char *txt); Boot *ReadBoot(int drive); long Timer(void); - +int new_random(int range); } // End of namespace CGE #endif diff --git a/engines/cge/snail.cpp b/engines/cge/snail.cpp index 3fedeab04d..b2f4648e10 100644 --- a/engines/cge/snail.cpp +++ b/engines/cge/snail.cpp @@ -905,7 +905,7 @@ static void SNMouse(bool on) { void SNAIL::RunCom(void) { static int count = 1; - extern void SwitchCave(int); +// extern void SwitchCave(int); if (! Busy) { Busy = true; uint8 tmphea = Head; @@ -971,7 +971,8 @@ void SNAIL::RunCom(void) { } break; case SNCAVE : - SwitchCave(snc->Val); + // SwitchCave(snc->Val); + warning("Problematic call of SwitchCave in SNAIL::RunCom"); break; case SNKILL : SNKill(sprel); |