[Scummvm-cvs-logs] SF.net SVN: scummvm: [22054] scummvm/trunk/engines/simon
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Thu Apr 20 01:59:03 CEST 2006
Revision: 22054
Author: kirben
Date: 2006-04-20 01:58:30 -0700 (Thu, 20 Apr 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=22054&view=rev
Log Message:
-----------
Add timer difference in FF
Modified Paths:
--------------
scummvm/trunk/engines/simon/simon.cpp
scummvm/trunk/engines/simon/simon.h
scummvm/trunk/engines/simon/vga.cpp
Modified: scummvm/trunk/engines/simon/simon.cpp
===================================================================
--- scummvm/trunk/engines/simon/simon.cpp 2006-04-20 08:46:46 UTC (rev 22053)
+++ scummvm/trunk/engines/simon/simon.cpp 2006-04-20 08:58:30 UTC (rev 22054)
@@ -523,7 +523,6 @@
// FIXME Use auto dirty rects cleanup code to reduce CPU usage
g_system->setFeatureState(OSystem::kFeatureAutoComputeDirtyRects, true);
- VGA_DELAY_BASE = 1;
if (getGameType() == GType_FF) {
NUM_VIDEO_OP_CODES = 85;
#ifndef PALMOS_68K
@@ -532,6 +531,7 @@
VGA_MEM_SIZE = gVars->memory[kMemSimon2Games];
#endif
TABLES_MEM_SIZE = 200000;
+ VGA_DELAY_BASE = 5;
} else if (getGameType() == GType_SIMON2) {
TABLE_INDEX_BASE = 1580 / 4;
TEXT_INDEX_BASE = 1500 / 4;
@@ -548,6 +548,7 @@
else
MUSIC_INDEX_BASE = 1128 / 4;
SOUND_INDEX_BASE = 1660 / 4;
+ VGA_DELAY_BASE = 1;
} else {
TABLE_INDEX_BASE = 1576 / 4;
TEXT_INDEX_BASE = 1460 / 4;
@@ -560,6 +561,7 @@
TABLES_MEM_SIZE = 50000;
MUSIC_INDEX_BASE = 1316 / 4;
SOUND_INDEX_BASE = 0;
+ VGA_DELAY_BASE = 1;
}
if (getGameType() == GType_FF) {
@@ -2414,11 +2416,13 @@
void SimonEngine::expire_vga_timers() {
VgaTimerEntry *vte = _vgaTimerList;
+ uint timer = (getGameType() == GType_FF) ? 5 : 1;
_vgaTickCounter++;
while (vte->delay) {
- if (!--vte->delay) {
+ vte->delay -= timer;
+ if (vte->delay <= 0) {
uint16 cur_file = vte->cur_vga_file;
uint16 cur_sprite = vte->sprite_id;
const byte *script_ptr = vte->script_pointer;
@@ -2731,16 +2735,23 @@
_lockWord |= 2;
if (!(_lockWord & 0x10)) {
- expire_vga_timers();
- expire_vga_timers();
- _syncFlag2 ^= 1;
- _cepeFlag ^= 1;
- if (!_cepeFlag)
+ if (getGameType() == GType_FF) {
+ _syncFlag2 ^= 1;
+
+ if (!_syncFlag2)
+ expire_vga_timers();
+ } else {
expire_vga_timers();
+ expire_vga_timers();
+ _syncFlag2 ^= 1;
+ _cepeFlag ^= 1;
+ if (!_cepeFlag)
+ expire_vga_timers();
- if (_mouseHideCount != 0 && _syncFlag2) {
- _lockWord &= ~2;
- return;
+ if (_mouseHideCount != 0 && _syncFlag2) {
+ _lockWord &= ~2;
+ return;
+ }
}
}
Modified: scummvm/trunk/engines/simon/simon.h
===================================================================
--- scummvm/trunk/engines/simon/simon.h 2006-04-20 08:46:46 UTC (rev 22053)
+++ scummvm/trunk/engines/simon/simon.h 2006-04-20 08:58:30 UTC (rev 22054)
@@ -103,7 +103,7 @@
};
struct VgaTimerEntry {
- uint16 delay;
+ int16 delay;
const byte *script_pointer;
uint16 sprite_id;
uint16 cur_vga_file;
Modified: scummvm/trunk/engines/simon/vga.cpp
===================================================================
--- scummvm/trunk/engines/simon/vga.cpp 2006-04-20 08:46:46 UTC (rev 22053)
+++ scummvm/trunk/engines/simon/vga.cpp 2006-04-20 08:58:30 UTC (rev 22054)
@@ -1421,10 +1421,12 @@
VgaSprite *vsp = findCurSprite();
uint num;
- if (getGameType() == GType_SIMON1) {
+ if (getGameType() == GType_FF) {
+ num = vcReadNextByte();
+ } else if (getGameType() == GType_SIMON2) {
+ num = vcReadNextByte() * _frameRate;
+ } else {
num = vcReadVarOrWord();
- } else {
- num = vcReadNextByte() * _frameRate;
}
// Work around to allow inventory arrows to be
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