diff -ur ScummVM-cvs20020921/scummvm/scumm/gfx.cpp ScummVM-cvs20020921+hack/scummvm/scumm/gfx.cpp
old
|
new
|
|
2661 | 2661 | ap[2] = bp[2]; |
2662 | 2662 | bp[2] = t; |
2663 | 2663 | |
2664 | | setDirtyColors(a, b); |
| 2664 | setDirtyColors(a, a); |
| 2665 | setDirtyColors(b, b); |
| 2666 | } |
| 2667 | |
| 2668 | void Scumm::copyPalColor(int dst, int src) |
| 2669 | { |
| 2670 | byte *dp, *sp; |
| 2671 | |
| 2672 | if ((uint) dst >= 256 || (uint) src >= 256) |
| 2673 | error("copyPalColor: invalid values, %d, %d", dst, src); |
| 2674 | |
| 2675 | dp = &_currentPalette[dst * 3]; |
| 2676 | sp = &_currentPalette[src * 3]; |
| 2677 | |
| 2678 | dp[0] = sp[0]; |
| 2679 | dp[1] = sp[1]; |
| 2680 | dp[2] = sp[2]; |
| 2681 | |
| 2682 | setDirtyColors(dst, dst); |
2665 | 2683 | } |
2666 | 2684 | |
2667 | 2685 | void Gdi::resetBackground(int top, int bottom, int strip) |
diff -ur ScummVM-cvs20020921/scummvm/scumm/script_v2.cpp ScummVM-cvs20020921+hack/scummvm/scumm/script_v2.cpp
old
|
new
|
|
2908 | 2908 | break; |
2909 | 2909 | |
2910 | 2910 | case 123: |
2911 | | swapPalColors(args[1], args[2]); |
| 2911 | copyPalColor(args[2], args[1]); |
2912 | 2912 | break; |
2913 | 2913 | |
2914 | 2914 | case 124: /* samnmax */ |
… |
… |
|
2932 | 2932 | |
2933 | 2933 | switch (args[0]) { |
2934 | 2934 | case 113: |
2935 | | // Do something to [1] x [2] (x/y) |
2936 | | warning("o6_kernelFunction: stub113(%d,%d)", args[1], args[2]); |
2937 | | push(0); |
| 2935 | // This is used for the Sam & Max paint-by-numbers mini-game |
| 2936 | // to find out what color to change. I think that what we have |
| 2937 | // the virtual mouse coordinates, because that's what used |
| 2938 | // everywhere else in the script. |
| 2939 | |
| 2940 | if (args[1] != -1 && args[2] != -1) { |
| 2941 | VirtScreen *vs = &virtscr[0]; |
| 2942 | push(vs->screenPtr[args[1] + args[2] * vs->width]); |
| 2943 | } else |
| 2944 | push(0); |
2938 | 2945 | break; |
2939 | 2946 | case 115: |
2940 | 2947 | push(getSpecialBox(args[1], args[2])); |
diff -ur ScummVM-cvs20020921/scummvm/scumm/scumm.h ScummVM-cvs20020921+hack/scummvm/scumm/scumm.h
old
|
new
|
|
797 | 797 | void setDirtyColors(int min, int max); |
798 | 798 | byte *findPalInPals(byte *pal, int index); |
799 | 799 | void swapPalColors(int a, int b); |
| 800 | void copyPalColor(int dst, int src); |
800 | 801 | void cyclePalette(); |
801 | 802 | void stopCycle(int i); |
802 | 803 | void palManipulateInit(int start, int end, int string_id, int time); |