[Scummvm-cvs-logs] SF.net SVN: scummvm:[36233] scummvm/trunk/engines/agos
Kirben at users.sourceforge.net
Kirben at users.sourceforge.net
Sat Feb 7 05:32:34 CET 2009
Revision: 36233
http://scummvm.svn.sourceforge.net/scummvm/?rev=36233&view=rev
Author: Kirben
Date: 2009-02-07 04:32:33 +0000 (Sat, 07 Feb 2009)
Log Message:
-----------
Cleanup.
Modified Paths:
--------------
scummvm/trunk/engines/agos/agos.cpp
scummvm/trunk/engines/agos/agos.h
scummvm/trunk/engines/agos/event.cpp
scummvm/trunk/engines/agos/vga.cpp
scummvm/trunk/engines/agos/vga_ff.cpp
scummvm/trunk/engines/agos/vga_ww.cpp
Modified: scummvm/trunk/engines/agos/agos.cpp
===================================================================
--- scummvm/trunk/engines/agos/agos.cpp 2009-02-07 03:36:36 UTC (rev 36232)
+++ scummvm/trunk/engines/agos/agos.cpp 2009-02-07 04:32:33 UTC (rev 36233)
@@ -63,6 +63,14 @@
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 @@
_syncCount = 0;
- _iconToggleCount = 0;
- _voiceCount = 0;
-
- _lastTickCount = 0;
- _thisTickCount = 0;
- _startSecondCount = 0;
- _tSecondCount = 0;
-
_frameCount = 0;
_zoneNumber = 0;
Modified: scummvm/trunk/engines/agos/agos.h
===================================================================
--- scummvm/trunk/engines/agos/agos.h 2009-02-07 03:36:36 UTC (rev 36232)
+++ scummvm/trunk/engines/agos/agos.h 2009-02-07 04:32:33 UTC (rev 36233)
@@ -440,10 +440,6 @@
uint16 _syncCount;
- int16 _iconToggleCount, _voiceCount;
- uint32 _lastTickCount, _thisTickCount;
- uint32 _startSecondCount, _tSecondCount;
-
uint16 _frameCount;
uint16 _zoneNumber;
@@ -869,7 +865,7 @@
// 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
void loadMouseImage();
+ void dimpIdle();
+ virtual void timerCallback();
+
+ void startOverlayAnims();
+ void startAnOverlayAnim();
+
virtual char *genSaveName(int slot);
};
Modified: scummvm/trunk/engines/agos/event.cpp
===================================================================
--- scummvm/trunk/engines/agos/event.cpp 2009-02-07 03:36:36 UTC (rev 36232)
+++ scummvm/trunk/engines/agos/event.cpp 2009-02-07 04:32:33 UTC (rev 36233)
@@ -451,7 +451,7 @@
_lastVgaTick = cur;
_inCallBack = true;
- timer_callback();
+ timerCallback();
_inCallBack = false;
}
@@ -547,18 +547,18 @@
} 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_Feeble::timer_proc1() {
+void AGOSEngine::timerCallback() {
+ timerProc();
+}
+
+void AGOSEngine_Feeble::timerProc() {
if (_lockWord & 0x80E9 || _lockWord & 2)
return;
@@ -611,7 +611,7 @@
_lockWord &= ~2;
}
-void AGOSEngine::timer_proc1() {
+void AGOSEngine::timerProc() {
if (_lockWord & 0x80E9 || _lockWord & 2)
return;
@@ -637,7 +637,7 @@
_lockWord &= ~2;
}
-void AGOSEngine::dimp_idle() {
+void AGOSEngine_PuzzlePack::dimpIdle() {
int z, n;
_iconToggleCount++;
Modified: scummvm/trunk/engines/agos/vga.cpp
===================================================================
--- scummvm/trunk/engines/agos/vga.cpp 2009-02-07 03:36:36 UTC (rev 36232)
+++ scummvm/trunk/engines/agos/vga.cpp 2009-02-07 04:32:33 UTC (rev 36233)
@@ -401,11 +401,6 @@
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;
Modified: scummvm/trunk/engines/agos/vga_ff.cpp
===================================================================
--- scummvm/trunk/engines/agos/vga_ff.cpp 2009-02-07 03:36:36 UTC (rev 36232)
+++ scummvm/trunk/engines/agos/vga_ff.cpp 2009-02-07 04:32:33 UTC (rev 36233)
@@ -331,7 +331,30 @@
}
}
-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::startAnOverlayAnim() {
+void AGOSEngine_PuzzlePack::startAnOverlayAnim() {
VgaSprite *vsp = _vgaSprites;
const byte *vcPtrOrg;
uint16 a, sprite, file, tmp, zoneNum;
Modified: scummvm/trunk/engines/agos/vga_ww.cpp
===================================================================
--- scummvm/trunk/engines/agos/vga_ww.cpp 2009-02-07 03:36:36 UTC (rev 36232)
+++ scummvm/trunk/engines/agos/vga_ww.cpp 2009-02-07 04:32:33 UTC (rev 36233)
@@ -252,17 +252,8 @@
}
void AGOSEngine::vc63_fastFadeIn() {
- if (getGameType() == GType_PP) {
+ if (getGameType() == GType_FF) {
_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) {
- _fastFadeInFlag = 256;
} else if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) {
_fastFadeInFlag = 208;
if (_windowNum != 4) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list