aboutsummaryrefslogtreecommitdiff
path: root/sky/timer.cpp
diff options
context:
space:
mode:
authorRobert Göffringmann2003-05-14 22:33:39 +0000
committerRobert Göffringmann2003-05-14 22:33:39 +0000
commitd0e5d1f44c35bdcefaff60d3dd74d8256c3e3f5b (patch)
tree71bdd655f2be3a0d12f7eec96b223f1219a3e465 /sky/timer.cpp
parent5f7e8231ca0cadfb8da93dd75f7ac7665092dee7 (diff)
downloadscummvm-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/timer.cpp')
-rw-r--r--sky/timer.cpp83
1 files changed, 0 insertions, 83 deletions
diff --git a/sky/timer.cpp b/sky/timer.cpp
deleted file mode 100644
index 50a91c279d..0000000000
--- a/sky/timer.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-/* ScummVM - Scumm Interpreter
- * Copyright (C) 2003 The ScummVM project
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Header$
- *
- */
-
-#include "stdafx.h"
-#include "sky/sky.h"
-#include "sky/skydefs.h"
-
-
-void SkyState::initTimer(void) {
-
- _tseqFrames = 0;
- _timer = Engine::_timer;
- _timer->installProcedure(&timerHandler, 1000000 / 50); //call 50 times per second
-
-}
-
-void SkyState::timerHandler(void *ptr) {
-
- SkyState *_this = (SkyState *)ptr;
-
- //music_command(0x300);
- _this->doTimerSequence();
-}
-
-void SkyState::startTimerSequence(byte *sequence) {
-
- _tseqFrames = *sequence++;
- _tseqData = sequence;
- _tseqCounter = SEQUENCE_COUNT;
- debug(5, "Starting new sequence of %d frames.", _tseqFrames);
-
-}
-
-void SkyState::doTimerSequence(void) {
-
- byte nrToSkip, nrToDo, tmp;
- byte *scrPtr = _workScreen;
-
- if (_tseqFrames == 0)
- return;
-
- _tseqCounter--;
- if (_tseqCounter != 0)
- return;
-
- _tseqCounter = SEQUENCE_COUNT;
-
- do {
- do {
- nrToSkip = *_tseqData++;
- scrPtr += nrToSkip;
- } while (nrToSkip == 255);
- do {
- nrToDo = *_tseqData++;
- tmp = nrToDo;
- while (tmp--) {
- *scrPtr++ = *_tseqData++;
- }
- } while (nrToDo == 255);
- } while ((scrPtr - _workScreen) < (GAME_SCREEN_WIDTH * GAME_SCREEN_HEIGHT));
-
- showScreen();
- _tseqFrames--;
-
-}