diff options
author | Robert Göffringmann | 2003-05-14 22:33:39 +0000 |
---|---|---|
committer | Robert Göffringmann | 2003-05-14 22:33:39 +0000 |
commit | d0e5d1f44c35bdcefaff60d3dd74d8256c3e3f5b (patch) | |
tree | 71bdd655f2be3a0d12f7eec96b223f1219a3e465 /sky/sky.cpp | |
parent | 5f7e8231ca0cadfb8da93dd75f7ac7665092dee7 (diff) | |
download | scummvm-rg350-d0e5d1f44c35bdcefaff60d3dd74d8256c3e3f5b.tar.gz scummvm-rg350-d0e5d1f44c35bdcefaff60d3dd74d8256c3e3f5b.tar.bz2 scummvm-rg350-d0e5d1f44c35bdcefaff60d3dd74d8256c3e3f5b.zip |
restructured some things (mainly the screen routines), moved things out from SkyState. (not yet complete)
svn-id: r7516
Diffstat (limited to 'sky/sky.cpp')
-rw-r--r-- | sky/sky.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/sky/sky.cpp b/sky/sky.cpp index cead2b69a3..761bdcce9e 100644 --- a/sky/sky.cpp +++ b/sky/sky.cpp @@ -105,7 +105,6 @@ void SkyState::go() { void SkyState::initialise(void) { //initialise_memory(); - initTimer(); _skySound = new SkySound(_mixer); _skyDisk = new SkyDisk(_gameDataPath); @@ -123,7 +122,7 @@ void SkyState::initialise(void) { _skyText = new SkyText(_skyDisk, _gameVersion, _language); _skyMouse = new SkyMouse(_skyDisk); - initialiseScreen(); + _skyScreen = new SkyScreen(_system, _skyDisk); initVirgin(); //initMouse(); initItemList(); @@ -132,6 +131,9 @@ void SkyState::initialise(void) { loadFixedItems(); _skyGrid = new SkyGrid(_skyDisk); _skyLogic = new SkyLogic(_skyDisk, _skyGrid, _skyText, _skyMusic, _skyMouse, _gameVersion); + + _timer = Engine::_timer; // initialize timer *after* _skyScreen has been initialized. + _timer->installProcedure(&timerHandler, 1000000 / 50); //call 50 times per second } void SkyState::initItemList() { @@ -188,6 +190,16 @@ void SkyState::loadFixedItems(void) { } +void SkyState::timerHandler(void *ptr) { + + ((SkyState*)ptr)->gotTimerTick(); +} + +void SkyState::gotTimerTick(void) { + + _skyScreen->handleTimer(); +} + Compact *SkyState::fetchCompact(uint32 a) { SkyDebug::fetchCompact(a); uint32 sectionNum = (a & 0xf000) >> 12; @@ -272,6 +284,7 @@ bool SkyState::isDemo(uint32 version) { } bool SkyState::isCDVersion(uint32 version) { + switch (version) { case 267: return false; |