aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/vga_s1.cpp
diff options
context:
space:
mode:
authorTravis Howell2009-08-11 14:42:44 +0000
committerTravis Howell2009-08-11 14:42:44 +0000
commit1c15bcf87d158b7cfb9047015344ebb2717f3c37 (patch)
treea21f0dbd042cd48792d822f71f83f4ddeb660d12 /engines/agos/vga_s1.cpp
parent7f667c528916f8d1082bfc582a74c5d2a6b9a4c9 (diff)
downloadscummvm-rg350-1c15bcf87d158b7cfb9047015344ebb2717f3c37.tar.gz
scummvm-rg350-1c15bcf87d158b7cfb9047015344ebb2717f3c37.tar.bz2
scummvm-rg350-1c15bcf87d158b7cfb9047015344ebb2717f3c37.zip
Add option to disable later games (Feeble Files, Puzzle Pack) in AGOS game engine, which require higher resolution.
svn-id: r43270
Diffstat (limited to 'engines/agos/vga_s1.cpp')
-rw-r--r--engines/agos/vga_s1.cpp85
1 files changed, 22 insertions, 63 deletions
diff --git a/engines/agos/vga_s1.cpp b/engines/agos/vga_s1.cpp
index b1ae26437e..bb13d211fe 100644
--- a/engines/agos/vga_s1.cpp
+++ b/engines/agos/vga_s1.cpp
@@ -36,7 +36,7 @@ void AGOSEngine_Simon1::setupVideoOpcodes(VgaOpcodeProc *op) {
op[11] = &AGOSEngine::vc11_clearPathFinder;
op[17] = &AGOSEngine::vc17_setPathfinderItem;
- op[22] = &AGOSEngine::vc22_setPaletteNew;
+ op[22] = &AGOSEngine::vc22_setPalette;
op[32] = &AGOSEngine::vc32_copyVar;
op[37] = &AGOSEngine::vc37_addToSpriteY;
op[48] = &AGOSEngine::vc48_setPathFinder;
@@ -96,7 +96,7 @@ static const uint8 customPalette[96] = {
0xFF, 0xFF, 0x77,
};
-void AGOSEngine::vc22_setPaletteNew() {
+void AGOSEngine_Simon1::vc22_setPalette() {
byte *offs, *palptr = 0, *src;
uint16 a = 0, b, num, palSize = 0;
@@ -186,73 +186,32 @@ void AGOSEngine::vc48_setPathFinder() {
uint16 a = (uint16)_variableArrayPtr[12];
const uint16 *p = _pathFindArray[a - 1];
- if (getGameType() == GType_FF || getGameType() == GType_PP) {
- VgaSprite *vsp = findCurSprite();
- int16 x, y, ydiff;
- int16 x1, y1, x2, y2;
- uint pos = 0;
-
- x = vsp->x;
- while (x >= (int16)readUint16Wrapper(p + 2)) {
- p += 2;
- pos++;
- }
-
- x1 = readUint16Wrapper(p);
- y1 = readUint16Wrapper(p + 1);
- x2 = readUint16Wrapper(p + 2);
- y2 = readUint16Wrapper(p + 3);
-
- if (x2 != 9999) {
- ydiff = y2 - y1;
- if (ydiff < 0) {
- ydiff = -ydiff;
- x = vsp->x & 7;
- ydiff *= x;
- ydiff /= 8;
- ydiff = -ydiff;
- } else {
- x = vsp->x & 7;
- ydiff *= x;
- ydiff /= 8;
- }
- y1 += ydiff;
- }
-
- y = vsp->y;
- vsp->y = y1;
- checkScrollY(y1 - y, y1);
-
- _variableArrayPtr[11] = x1;
- _variableArrayPtr[13] = pos;
- } else {
- uint b = (uint16)_variableArray[13];
- p += b * 2 + 1;
- int c = _variableArray[14];
+ uint b = (uint16)_variableArray[13];
+ p += b * 2 + 1;
+ int c = _variableArray[14];
- int step;
- int y1, y2;
- int16 *vp;
+ int step;
+ int y1, y2;
+ int16 *vp;
- step = 2;
- if (c < 0) {
- c = -c;
- step = -2;
- }
+ step = 2;
+ if (c < 0) {
+ c = -c;
+ step = -2;
+ }
- vp = &_variableArray[20];
+ vp = &_variableArray[20];
- do {
- y2 = readUint16Wrapper(p);
- p += step;
- y1 = readUint16Wrapper(p) - y2;
+ do {
+ y2 = readUint16Wrapper(p);
+ p += step;
+ y1 = readUint16Wrapper(p) - y2;
- vp[0] = y1 / 2;
- vp[1] = y1 - (y1 / 2);
+ vp[0] = y1 / 2;
+ vp[1] = y1 - (y1 / 2);
- vp += 2;
- } while (--c);
- }
+ vp += 2;
+ } while (--c);
}
void AGOSEngine::vc59_ifSpeech() {