[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,1.23,1.24 script_v2.cpp,1.14,1.15 scumm.h,1.26,1.27
James Brown
ender at users.sourceforge.net
Mon Sep 23 08:44:04 CEST 2002
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/backends/sdl sdl.cpp,1.5,1.6
- Next message: [Scummvm-cvs-logs] CVS: scummvm/backends/morphos morphos.cpp,1.6,1.7 morphos.h,1.5,1.6 morphos_timer.cpp,1.3,1.4 morphos_timer.h,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory usw-pr-cvs1:/tmp/cvs-serv13928/scumm
Modified Files:
gfx.cpp script_v2.cpp scumm.h
Log Message:
Patch #612847: Sam and Max painting subgame fix
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- gfx.cpp 22 Sep 2002 01:17:53 -0000 1.23
+++ gfx.cpp 23 Sep 2002 15:43:28 -0000 1.24
@@ -2661,7 +2661,25 @@
ap[2] = bp[2];
bp[2] = t;
- setDirtyColors(a, b);
+ setDirtyColors(a, a);
+ setDirtyColors(b, b);
+}
+
+void Scumm::copyPalColor(int dst, int src)
+{
+ byte *dp, *sp;
+
+ if ((uint) dst >= 256 || (uint) src >= 256)
+ error("copyPalColor: invalid values, %d, %d", dst, src);
+
+ dp = &_currentPalette[dst * 3];
+ sp = &_currentPalette[src * 3];
+
+ dp[0] = sp[0];
+ dp[1] = sp[1];
+ dp[2] = sp[2];
+
+ setDirtyColors(dst, dst);
}
void Gdi::resetBackground(int top, int bottom, int strip)
Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- script_v2.cpp 22 Sep 2002 01:17:53 -0000 1.14
+++ script_v2.cpp 23 Sep 2002 15:43:29 -0000 1.15
@@ -2908,7 +2908,7 @@
break;
case 123:
- swapPalColors(args[1], args[2]);
+ copyPalColor(args[2], args[1]);
break;
case 124: /* samnmax */
@@ -2932,9 +2932,16 @@
switch (args[0]) {
case 113:
- // Do something to [1] x [2] (x/y)
- warning("o6_kernelFunction: stub113(%d,%d)", args[1], args[2]);
- push(0);
+ // This is used for the Sam & Max paint-by-numbers mini-game
+ // to find out what color to change. I think that what we have
+ // the virtual mouse coordinates, because that's what used
+ // everywhere else in the script.
+
+ if (args[1] != -1 && args[2] != -1) {
+ VirtScreen *vs = &virtscr[0];
+ push(vs->screenPtr[args[1] + args[2] * vs->width]);
+ } else
+ push(0);
break;
case 115:
push(getSpecialBox(args[1], args[2]));
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- scumm.h 22 Sep 2002 01:17:53 -0000 1.26
+++ scumm.h 23 Sep 2002 15:43:29 -0000 1.27
@@ -800,6 +800,7 @@
void setDirtyColors(int min, int max);
byte *findPalInPals(byte *pal, int index);
void swapPalColors(int a, int b);
+ void copyPalColor(int dst, int src);
void cyclePalette();
void stopCycle(int i);
void palManipulateInit(int start, int end, int string_id, int time);
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/backends/sdl sdl.cpp,1.5,1.6
- Next message: [Scummvm-cvs-logs] CVS: scummvm/backends/morphos morphos.cpp,1.6,1.7 morphos.h,1.5,1.6 morphos_timer.cpp,1.3,1.4 morphos_timer.h,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list