[Scummvm-cvs-logs] CVS: scummvm/simon simon.h,1.161,1.162 vga.cpp,1.153,1.154
kirben
kirben at users.sourceforge.net
Mon Nov 14 02:33:03 CET 2005
Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21994/simon
Modified Files:
simon.h vga.cpp
Log Message:
Correct FF display and palette.
Index: simon.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.h,v
retrieving revision 1.161
retrieving revision 1.162
diff -u -d -r1.161 -r1.162
--- simon.h 13 Nov 2005 07:04:56 -0000 1.161
+++ simon.h 14 Nov 2005 10:31:19 -0000 1.162
@@ -374,7 +374,7 @@
VgaSprite _vgaSprites[180];
VgaSleepStruct _vgaSleepStructs[30];
- const uint16 *_pathFindArray[20];
+ const uint16 *_pathFindArray[100];
uint8 _paletteBackup[1024];
uint8 _palette[1024];
@@ -746,7 +746,7 @@
void vc75_setScale();
void vc76_setScaleXOffs();
void vc77_setScaleYOffs();
- void vc78_pathUnk1();
+ void vc78_computeXY();
void vc79_pathUnk2();
void vc80_setOverlayImage();
void vc81_setRandom();
Index: vga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/vga.cpp,v
retrieving revision 1.153
retrieving revision 1.154
diff -u -d -r1.153 -r1.154
--- vga.cpp 13 Nov 2005 11:53:57 -0000 1.153
+++ vga.cpp 14 Nov 2005 10:31:19 -0000 1.154
@@ -110,7 +110,7 @@
&SimonEngine::vc75_setScale,
&SimonEngine::vc76_setScaleXOffs,
&SimonEngine::vc77_setScaleYOffs,
- &SimonEngine::vc78_pathUnk1,
+ &SimonEngine::vc78_computeXY,
&SimonEngine::vc79_pathUnk2,
&SimonEngine::vc80_setOverlayImage,
&SimonEngine::vc81_setRandom,
@@ -1022,12 +1022,16 @@
h = 0;
do {
- dst[0] = (*src / 16) | state.palette;
- dst[1] = (*src & 15) | state.palette;
+ if (getGameType() == GType_FF) {
+ *dst = *src;
+ } else {
+ dst[0] = (*src / 16) | state.palette;
+ dst[1] = (*src & 15) | state.palette;
+ }
dst += _screenWidth;
src++;
} while (++h != state.draw_height);
- dst_org += 2;
+ dst_org += (getGameType() == GType_FF) ? 1 : 2;
} while (++w != state.draw_width);
} else {
dst_org = state.surf_addr;
@@ -1043,16 +1047,22 @@
h = 0;
do {
- color = (*src / 16);
- if (color)
- dst[0] = color | state.palette;
- color = (*src & 15);
- if (color)
- dst[1] = color | state.palette;
+ if (getGameType() == GType_FF) {
+ color = *src;
+ if (color)
+ *dst = color;
+ } else {
+ color = (*src / 16);
+ if (color)
+ dst[0] = color | state.palette;
+ color = (*src & 15);
+ if (color)
+ dst[1] = color | state.palette;
+ }
dst += _screenWidth;
src++;
} while (++h != state.draw_height);
- dst_org += 2;
+ dst_org += (getGameType() == GType_FF) ? 1 : 2;
} while (++w != state.draw_width);
}
/* vc10_helper_6 */
@@ -2003,9 +2013,27 @@
debug(0, "STUB: vc77_setScaleYOffs: image %d yoffs %d flag %d", image, yoffs, var);
}
-void SimonEngine::vc78_pathUnk1() {
- // Pathfinder related
- debug(0, "STUB: vc78_pathUnk1");
+void SimonEngine::vc78_computeXY() {
+ VgaSprite *vsp = find_cur_sprite();
+
+ uint a = (uint16)_variableArray[12];
+ uint b = (uint16)_variableArray[13];
+ const uint16 *p = _pathFindArray[a - 1];
+ p += b * 2;
+
+ uint16 posx = READ_LE_UINT16(p);
+ _variableArray[15] = posx;
+ vsp->x = posx;
+
+ uint16 posy = READ_LE_UINT16(p + 2);
+ _variableArray[16] = posy;
+ vsp->y = posy;
+
+
+ vc_set_bit_to(85, false);
+ if (vc_get_bit(74) == true) {
+ //centreScroll();
+ }
}
void SimonEngine::vc79_pathUnk2() {
More information about the Scummvm-git-logs
mailing list