aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2009-02-07 04:32:33 +0000
committerTravis Howell2009-02-07 04:32:33 +0000
commit89063a38ce63ff962c7963fc020a3eca5235665c (patch)
treea0a3b660da83a5ee05d9c28e83cd54bb4021df95
parent5de19ecb28d51ce4b7aa973ea643c73448751ef1 (diff)
downloadscummvm-rg350-89063a38ce63ff962c7963fc020a3eca5235665c.tar.gz
scummvm-rg350-89063a38ce63ff962c7963fc020a3eca5235665c.tar.bz2
scummvm-rg350-89063a38ce63ff962c7963fc020a3eca5235665c.zip
Cleanup.
svn-id: r36233
-rw-r--r--engines/agos/agos.cpp16
-rw-r--r--engines/agos/agos.h31
-rw-r--r--engines/agos/event.cpp24
-rw-r--r--engines/agos/vga.cpp5
-rw-r--r--engines/agos/vga_ff.cpp27
-rw-r--r--engines/agos/vga_ww.cpp11
6 files changed, 64 insertions, 50 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp
index 63d6d063d6..ed4973b943 100644
--- a/engines/agos/agos.cpp
+++ b/engines/agos/agos.cpp
@@ -63,6 +63,14 @@ static const GameSpecificSettings puzzlepack_settings = {
AGOSEngine_PuzzlePack::AGOSEngine_PuzzlePack(OSystem *system)
: AGOSEngine_Feeble(system) {
+
+ _iconToggleCount = 0;
+ _voiceCount = 0;
+
+ _lastTickCount = 0;
+ _thisTickCount = 0;
+ _startSecondCount = 0;
+ _tSecondCount = 0;
}
AGOSEngine_Feeble::AGOSEngine_Feeble(OSystem *system)
@@ -336,14 +344,6 @@ AGOSEngine::AGOSEngine(OSystem *syst)
_syncCount = 0;
- _iconToggleCount = 0;
- _voiceCount = 0;
-
- _lastTickCount = 0;
- _thisTickCount = 0;
- _startSecondCount = 0;
- _tSecondCount = 0;
-
_frameCount = 0;
_zoneNumber = 0;
diff --git a/engines/agos/agos.h b/engines/agos/agos.h
index c10112a22b..7f4cf71deb 100644
--- a/engines/agos/agos.h
+++ b/engines/agos/agos.h
@@ -440,10 +440,6 @@ protected:
uint16 _syncCount;
- int16 _iconToggleCount, _voiceCount;
- uint32 _lastTickCount, _thisTickCount;
- uint32 _startSecondCount, _tSecondCount;
-
uint16 _frameCount;
uint16 _zoneNumber;
@@ -869,7 +865,7 @@ public:
// Video Script Opcodes, Common
void vc1_fadeOut();
void vc2_call();
- void vc3_loadSprite();
+ virtual void vc3_loadSprite();
void vc4_fadeIn();
void vc5_ifEqual();
void vc6_ifObjectHere();
@@ -935,7 +931,7 @@ public:
void vc60_stopAnimation();
void vc61();
void vc62_fastFadeOut();
- void vc63_fastFadeIn();
+ virtual void vc63_fastFadeIn();
// Video Script Opcodes, Simon 1
void vc11_clearPathFinder();
@@ -1120,9 +1116,6 @@ protected:
void setPaletteSlot(uint16 srcOffs, uint8 dstOffs);
void checkWaitEndTable();
- void startOverlayAnims();
- void startAnOverlayAnim();
-
bool ifObjectHere(uint16 val);
bool ifObjectAt(uint16 a, uint16 b);
bool ifObjectState(uint16 a, int16 b);
@@ -1168,9 +1161,8 @@ protected:
void openGameFile();
void readGameFile(void *dst, uint32 offs, uint32 size);
- void dimp_idle();
- void timer_callback();
- virtual void timer_proc1();
+ virtual void timerCallback();
+ virtual void timerProc();
virtual void animateSprites();
@@ -1662,7 +1654,7 @@ protected:
void oracleLogo();
void swapCharacterLogo();
- virtual void timer_proc1();
+ virtual void timerProc();
virtual void addArrows(WindowBlock *window, uint8 num);
virtual uint setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *itemPtr);
@@ -1727,6 +1719,9 @@ public:
virtual void executeOpcode(int opcode);
+ virtual void vc3_loadSprite();
+ virtual void vc63_fastFadeIn();
+
void opp_iconifyWindow();
void opp_restoreOopsPosition();
void opp_loadMouseImage();
@@ -1753,6 +1748,10 @@ protected:
const OpcodeEntryPuzzlePack *_opcodesPuzzlePack;
+ int16 _iconToggleCount, _voiceCount;
+ uint32 _lastTickCount, _thisTickCount;
+ uint32 _startSecondCount, _tSecondCount;
+
virtual void initMouse();
virtual void handleMouseMoved();
virtual void drawMousePointer();
@@ -1761,6 +1760,12 @@ protected:
void loadMouseImage();
+ void dimpIdle();
+ virtual void timerCallback();
+
+ void startOverlayAnims();
+ void startAnOverlayAnim();
+
virtual char *genSaveName(int slot);
};
diff --git a/engines/agos/event.cpp b/engines/agos/event.cpp
index a91d1de08e..1ff2f9245c 100644
--- a/engines/agos/event.cpp
+++ b/engines/agos/event.cpp
@@ -451,7 +451,7 @@ void AGOSEngine::delay(uint amount) {
_lastVgaTick = cur;
_inCallBack = true;
- timer_callback();
+ timerCallback();
_inCallBack = false;
}
@@ -547,18 +547,18 @@ void AGOSEngine::delay(uint amount) {
} while (cur < start + amount && !shouldQuit());
}
-void AGOSEngine::timer_callback() {
- if (getGameId() == GID_DIMP) {
- _lastTickCount = _system->getMillis();
+void AGOSEngine_PuzzlePack::timerCallback() {
+ _lastTickCount = _system->getMillis();
- timer_proc1();
- dimp_idle();
- } else {
- timer_proc1();
- }
+ timerProc();
+ dimpIdle();
+}
+
+void AGOSEngine::timerCallback() {
+ timerProc();
}
-void AGOSEngine_Feeble::timer_proc1() {
+void AGOSEngine_Feeble::timerProc() {
if (_lockWord & 0x80E9 || _lockWord & 2)
return;
@@ -611,7 +611,7 @@ void AGOSEngine_Feeble::timer_proc1() {
_lockWord &= ~2;
}
-void AGOSEngine::timer_proc1() {
+void AGOSEngine::timerProc() {
if (_lockWord & 0x80E9 || _lockWord & 2)
return;
@@ -637,7 +637,7 @@ void AGOSEngine::timer_proc1() {
_lockWord &= ~2;
}
-void AGOSEngine::dimp_idle() {
+void AGOSEngine_PuzzlePack::dimpIdle() {
int z, n;
_iconToggleCount++;
diff --git a/engines/agos/vga.cpp b/engines/agos/vga.cpp
index af0c7cba1b..af876e9417 100644
--- a/engines/agos/vga.cpp
+++ b/engines/agos/vga.cpp
@@ -401,11 +401,6 @@ void AGOSEngine::vc3_loadSprite() {
int16 x, y;
byte *old_file_1;
- if (getGameType() == GType_PP && getBitFlag(100)) {
- startAnOverlayAnim();
- return;
- }
-
windowNum = vcReadNextWord();
if (getGameType() == GType_SIMON1 && windowNum == 3) {
_window3Flag = 1;
diff --git a/engines/agos/vga_ff.cpp b/engines/agos/vga_ff.cpp
index e50fada828..9a65c340d9 100644
--- a/engines/agos/vga_ff.cpp
+++ b/engines/agos/vga_ff.cpp
@@ -331,7 +331,30 @@ void AGOSEngine::centreScroll() {
}
}
-void AGOSEngine::startOverlayAnims() {
+// Puzzle Pack specific code
+
+void AGOSEngine_PuzzlePack::vc3_loadSprite() {
+ if (getBitFlag(100)) {
+ startAnOverlayAnim();
+ return;
+ }
+
+ AGOSEngine::vc3_loadSprite();
+}
+
+void AGOSEngine_PuzzlePack::vc63_fastFadeIn() {
+ _fastFadeInFlag = 256;
+ if (getBitFlag(100)) {
+ startOverlayAnims();
+ } else if (getBitFlag(103)) {
+ printf("NameAndTime\n");
+ } else if (getBitFlag(104)) {
+ printf("HiScoreTable\n");
+ }
+ _fastFadeOutFlag = false;
+}
+
+void AGOSEngine_PuzzlePack::startOverlayAnims() {
VgaSprite *vsp = _vgaSprites;
uint16 zoneNum;
int i;
@@ -362,7 +385,7 @@ void AGOSEngine::startOverlayAnims() {
}
}
-void AGOSEngine::startAnOverlayAnim() {
+void AGOSEngine_PuzzlePack::startAnOverlayAnim() {
VgaSprite *vsp = _vgaSprites;
const byte *vcPtrOrg;
uint16 a, sprite, file, tmp, zoneNum;
diff --git a/engines/agos/vga_ww.cpp b/engines/agos/vga_ww.cpp
index 27e4fce2d6..4f6d510fbf 100644
--- a/engines/agos/vga_ww.cpp
+++ b/engines/agos/vga_ww.cpp
@@ -252,16 +252,7 @@ void AGOSEngine::vc62_fastFadeOut() {
}
void AGOSEngine::vc63_fastFadeIn() {
- if (getGameType() == GType_PP) {
- _fastFadeInFlag = 256;
- if (getBitFlag(100)) {
- startOverlayAnims();
- } else if (getBitFlag(103)) {
- printf("NameAndTime\n");
- } else if (getBitFlag(104)) {
- printf("HiScoreTable\n");
- }
- } else if (getGameType() == GType_FF) {
+ if (getGameType() == GType_FF) {
_fastFadeInFlag = 256;
} else if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) {
_fastFadeInFlag = 208;