diff -ur ScummVM-cvs20020729/scummvm/costume.cpp ScummVM-cvs20020729+hack/scummvm/costume.cpp
old
|
new
|
|
390 | 390 | if (color && y < scrheight) { |
391 | 391 | pcolor = _palette[color]; |
392 | 392 | if (pcolor == 13) { |
393 | | pcolor = _transEffect[*dst]; |
| 393 | pcolor = _vm->_transEffect[*dst]; |
394 | 394 | } |
395 | 395 | *dst = pcolor; |
396 | 396 | } |
… |
… |
|
440 | 440 | if (color && y < scrheight && !(*mask & maskbit)) { |
441 | 441 | pcolor = _palette[color]; |
442 | 442 | if (pcolor == 13) |
443 | | pcolor = _transEffect[*dst]; |
| 443 | pcolor = _vm->_transEffect[*dst]; |
444 | 444 | *dst = pcolor; |
445 | 445 | } |
446 | 446 | dst += 320; |
… |
… |
|
503 | 503 | if (color && y < scrheight && !((*mask | mask[_imgbufoffs]) & maskbit)) { |
504 | 504 | pcolor = _palette[color]; |
505 | 505 | if (pcolor == 13) |
506 | | pcolor = _transEffect[*dst]; |
| 506 | pcolor = _vm->_transEffect[*dst]; |
507 | 507 | *dst = pcolor; |
508 | 508 | } |
509 | 509 | dst += 320; |
… |
… |
|
566 | 566 | if (color && y < _outheight && !((*mask | mask[_imgbufoffs]) & maskbit)) { |
567 | 567 | pcolor = _palette[color]; |
568 | 568 | if (pcolor == 13) |
569 | | pcolor = _transEffect[*dst]; |
| 569 | pcolor = _vm->_transEffect[*dst]; |
570 | 570 | *dst = pcolor; |
571 | 571 | } |
572 | 572 | dst += 320; |
… |
… |
|
627 | 627 | if (color && y < _outheight && !(*mask & maskbit)) { |
628 | 628 | pcolor = _palette[color]; |
629 | 629 | if (pcolor == 13) |
630 | | pcolor = _transEffect[*dst]; |
| 630 | pcolor = _vm->_transEffect[*dst]; |
631 | 631 | *dst = pcolor; |
632 | 632 | } |
633 | 633 | dst += 320; |
… |
… |
|
691 | 691 | if (color && y < _outheight) { |
692 | 692 | pcolor = _palette[color]; |
693 | 693 | if (pcolor == 13) |
694 | | pcolor = _transEffect[*dst]; |
| 694 | pcolor = _vm->_transEffect[*dst]; |
695 | 695 | *dst = pcolor; |
696 | 696 | } |
697 | 697 | dst += 320; |
… |
… |
|
748 | 748 | if (color && x >= 0 && x < 320) { |
749 | 749 | pcolor = _palette[color]; |
750 | 750 | /* if (pcolor == 13) { |
751 | | pcolor = _transEffect[*dst]; |
| 751 | pcolor = _vm->_transEffect[*dst]; |
752 | 752 | }*/ |
753 | 753 | *dst = pcolor; |
754 | 754 | } |
… |
… |
|
798 | 798 | if (color && x >=0 && x < 320 && !(*mask & maskbit)) { |
799 | 799 | pcolor = _palette[color]; |
800 | 800 | /* if (pcolor == 13) |
801 | | pcolor = _transEffect[*dst];*/ |
| 801 | pcolor = _vm->_transEffect[*dst];*/ |
802 | 802 | *dst = pcolor; |
803 | 803 | } |
804 | 804 | dst += step; |
… |
… |
|
864 | 864 | if (color && x >= 0 && x < 320 && !((*mask | mask[_imgbufoffs]) & maskbit)) { |
865 | 865 | pcolor = _palette[color]; |
866 | 866 | /* if (pcolor == 13) |
867 | | pcolor = _transEffect[*dst];*/ |
| 867 | pcolor = _vm->_transEffect[*dst];*/ |
868 | 868 | *dst = pcolor; |
869 | 869 | } |
870 | 870 | dst += step; |
… |
… |
|
928 | 928 | if (color && _xpos >= 0 && _xpos < 320 && !((*mask | mask[_imgbufoffs]) & maskbit)) { |
929 | 929 | pcolor = _palette[color]; |
930 | 930 | /* if (pcolor == 13) |
931 | | pcolor = _transEffect[*dst];*/ |
| 931 | pcolor = _vm->_transEffect[*dst];*/ |
932 | 932 | *dst = pcolor; |
933 | 933 | } |
934 | 934 | |
… |
… |
|
993 | 993 | if (color && _xpos >= 0 && _xpos < 320 && !(*mask & maskbit)) { |
994 | 994 | pcolor = _palette[color]; |
995 | 995 | /* if (pcolor == 13) |
996 | | pcolor = _transEffect[*dst];*/ |
| 996 | pcolor = _vm->_transEffect[*dst];*/ |
997 | 997 | *dst = pcolor; |
998 | 998 | } |
999 | 999 | t = _scaleIndexX; |
… |
… |
|
1062 | 1062 | if (color && _xpos >= 0 && _xpos < 320) { |
1063 | 1063 | pcolor = _palette[color]; |
1064 | 1064 | /* if (pcolor == 13) |
1065 | | pcolor = _transEffect[*dst];*/ |
| 1065 | pcolor = _vm->_transEffect[*dst];*/ |
1066 | 1066 | *dst = pcolor; |
1067 | 1067 | } |
1068 | 1068 | |
diff -ur ScummVM-cvs20020729/scummvm/costume.h ScummVM-cvs20020729+hack/scummvm/costume.h
old
|
new
|
|
81 | 81 | byte _repcolor; |
82 | 82 | byte _replen; |
83 | 83 | byte _palette[32]; |
84 | | byte _transEffect[0x100]; |
85 | 84 | |
86 | 85 | void proc6(); |
87 | 86 | void proc5(); |
diff -ur ScummVM-cvs20020729/scummvm/script_v1.cpp ScummVM-cvs20020729+hack/scummvm/script_v1.cpp
old
|
new
|
|
1989 | 1989 | _opcode = fetchScriptByte(); |
1990 | 1990 | d = getVarOrDirectByte(0x80); |
1991 | 1991 | e = getVarOrDirectByte(0x40); |
1992 | | unkRoomFunc3(d, e, a, b, c); |
| 1992 | setupTransEffect(d, e, a, b, c); |
1993 | 1993 | break; |
1994 | 1994 | |
1995 | 1995 | case 13:{ /* save-string */ |
diff -ur ScummVM-cvs20020729/scummvm/script_v2.cpp ScummVM-cvs20020729+hack/scummvm/script_v2.cpp
old
|
new
|
|
1862 | 1862 | c = pop(); |
1863 | 1863 | b = pop(); |
1864 | 1864 | a = pop(); |
1865 | | unkRoomFunc3(d, e, a, b, c); |
| 1865 | setupTransEffect(d, e, a, b, c); |
1866 | 1866 | break; |
1867 | 1867 | |
1868 | 1868 | case 184: |
diff -ur ScummVM-cvs20020729/scummvm/scumm.h ScummVM-cvs20020729+hack/scummvm/scumm.h
old
|
new
|
|
464 | 464 | byte _numObjectsInRoom; |
465 | 465 | int8 _userPut; |
466 | 466 | int _resourceHeaderSize; |
467 | | void unkRoomFunc3(int a, int b, int c, int d, int e); |
| 467 | void setupTransEffect(int a, int b, int c, int d, int e); |
468 | 468 | void palManipulate(int a, int b, int c, int d, int e); |
469 | 469 | void setScaleItem(int slot, int a, int b, int c, int d); |
470 | 470 | void clearClickedStatus(); |
… |
… |
|
940 | 940 | byte _drawObjectQue[200]; |
941 | 941 | int16 _palManipStart, _palManipEnd, _palManipCounter; |
942 | 942 | uint32 gfxUsageBits[200]; |
| 943 | byte _transEffect[0x100]; |
943 | 944 | byte *_shadowPalette; |
944 | 945 | int _shadowPaletteSize; |
945 | 946 | byte _currentPalette[0x300]; |
diff -ur ScummVM-cvs20020729/scummvm/scummvm.cpp ScummVM-cvs20020729+hack/scummvm/scummvm.cpp
old
|
new
|
|
800 | 800 | return a; |
801 | 801 | } |
802 | 802 | |
803 | | void Scumm::unkRoomFunc3(int a, int b, int c, int d, int e) |
| 803 | void Scumm::setupTransEffect(int minColor, int maxColor, int rscale, int gscale, int bscale) |
804 | 804 | { |
805 | | warning("stub unkRoomFunc3(%d,%d,%d,%d,%d)", a, b, c, d, e); |
806 | | } |
| 805 | int i; |
| 806 | |
| 807 | warning("former unkRoomFunc3(%d,%d,%d,%d,%d)", minColor, maxColor, rscale, gscale, bscale); |
807 | 808 | |
| 809 | for (i = minColor; i <= maxColor; i++) { |
| 810 | byte *pal = _currentPalette + (i * 3); |
| 811 | int r = (int) (*pal++ * rscale) / 255; |
| 812 | int g = (int) (*pal++ * gscale) / 255; |
| 813 | int b = (int) (*pal++ * bscale) / 255; |
| 814 | |
| 815 | if (r > 255) |
| 816 | r = 255; |
| 817 | if (g > 255) |
| 818 | g = 255; |
| 819 | if (b > 255) |
| 820 | b = 255; |
| 821 | |
| 822 | _transEffect[i] = RGBMatch(_currentPalette, r, g, b); |
| 823 | } |
| 824 | } |
808 | 825 | |
809 | 826 | void Scumm::palManipulate(int palettes, int brightness, int color, int time, int e) |
810 | 827 | { |