[Scummvm-cvs-logs] CVS: scummvm/simon vga.cpp,1.173,1.174
kirben
kirben at users.sourceforge.net
Tue Jan 10 20:08:00 CET 2006
Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17638/simon
Modified Files:
vga.cpp
Log Message:
A few FF fixes.
Index: vga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/vga.cpp,v
retrieving revision 1.173
retrieving revision 1.174
diff -u -d -r1.173 -r1.174
--- vga.cpp 13 Dec 2005 03:26:49 -0000 1.173
+++ vga.cpp 11 Jan 2006 04:06:51 -0000 1.174
@@ -722,8 +722,17 @@
}
}
- maxWidth = (getGameType() == GType_FF) ? 640 : 20;
- if (getGameType() == GType_SIMON2 && width > maxWidth) {
+ if (getGameType() == GType_FF) {
+ if (width > 640) {
+ debug(0, "Horizontal scrolling not supported");
+ return;
+ }
+ if (height > 480) {
+ debug(0, "Vertical scrolling not supported");
+ return;
+ }
+ }
+ if (getGameType() == GType_SIMON2 && width > 20) {
const byte *src;
byte *dst;
uint w;
@@ -752,11 +761,6 @@
return;
}
- if (getGameType() == GType_FF && height > 480) {
- debug(0, "Vertical scrolling not supported\n");
- return;
- }
-
if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) {
if (state.flags & 0x10) {
state.depack_src = vc10_uncompressFlip(state.depack_src, width, height);
@@ -2184,10 +2188,10 @@
VgaSprite *vsp = findCurSprite();
vsp->image = vcReadNextWord();
- int16 xoffs = vcReadNextWord();
+ int16 x = vcReadNextWord();
int var = vcReadNextWord();
- vsp->x += getScale(vsp->x, xoffs);
+ vsp->x += getScale(vsp->y, x);
_variableArray[var] = vsp->x;
if (_scrollXMax) {
@@ -2201,10 +2205,10 @@
VgaSprite *vsp = findCurSprite();
vsp->image = vcReadNextWord();
- int16 yoffs = vcReadNextWord();
+ int16 x = vcReadNextWord();
int var = vcReadNextWord();
- vsp->y += getScale(vsp->y, yoffs);
+ vsp->y += getScale(vsp->y, x);
_variableArray[var] = vsp->y;
vsp->flags = 0x40;
}
@@ -2234,10 +2238,10 @@
void SimonEngine::vc79_computePosNum() {
uint a = (uint16)_variableArray[12];
- uint pos = 0;
const uint16 *p = _pathFindArray[a - 1];
+ uint pos = 0;
- int16 y = vcReadNextWord();
+ int16 y = _variableArray[16];
while(y > readUint16Wrapper(p + 1)) {
p += 2;
pos++;
More information about the Scummvm-git-logs
mailing list