diff -ur ScummVM-cvs20021023/scummvm/scumm/akos.cpp ScummVM-cvs20021023+hack/scummvm/scumm/akos.cpp
old
|
new
|
|
845 | 845 | |
846 | 846 | void AkosRenderer::codec5() |
847 | 847 | { |
848 | | VirtScreen *vs; |
849 | | |
850 | 848 | int left, right, top, bottom; |
851 | 849 | int clip_left, clip_right, clip_top, clip_bottom; |
852 | 850 | |
… |
… |
|
866 | 864 | // What I do know is that drawBomp() doesn't care about masking and |
867 | 865 | // shadows, and these are both needed for Full Throttle and The Dig. |
868 | 866 | |
869 | | vs = &_vm->virtscr[0]; |
870 | | |
871 | 867 | if (!mirror) { |
872 | 868 | left = (_x - move_x_cur - _width) + 1; |
873 | 869 | } else { |
… |
… |
|
878 | 874 | top = _y + move_y_cur; |
879 | 875 | bottom = top + _height; |
880 | 876 | |
881 | | if (left >= _vm->_realWidth || top >= _vm->_realHeight) |
| 877 | if (left >= (int) outwidth || top >= (int) outheight) |
882 | 878 | return; |
883 | 879 | |
884 | 880 | // The actual drawing code shouldn't survive even if the image is |
… |
… |
|
886 | 882 | // be less tolerant... |
887 | 883 | |
888 | 884 | clip_left = (left >= 0) ? left : 0; |
889 | | clip_right = (right > _vm->_realWidth) ? _vm->_realWidth : right; |
| 885 | clip_right = (right > (int) outwidth) ? (int) outwidth : right; |
890 | 886 | clip_top = (top >= 0) ? top : 0; |
891 | | clip_bottom = (bottom > _vm->_realHeight) ? _vm->_realHeight : bottom; |
| 887 | clip_bottom = (bottom > (int) outheight) ? (int) outheight : bottom; |
892 | 888 | |
893 | 889 | if (clip_top < draw_top) |
894 | 890 | draw_top = clip_top; |
… |
… |
|
922 | 918 | for (src_y = 0, dst_y = top; src_y < _height; src_y++) { |
923 | 919 | byte code, color; |
924 | 920 | uint num, i; |
925 | | byte *d = dest + dst_y * _vm->_realWidth + left; |
| 921 | byte *d = dest + dst_y * outwidth + left; |
926 | 922 | byte *s; |
927 | 923 | uint data_length; |
928 | 924 | |
929 | 925 | data_length = READ_LE_UINT16(src) + 2; |
930 | 926 | |
931 | | if (dst_y < 0 || dst_y >= _vm->_realHeight) { |
| 927 | if (dst_y < 0 || dst_y >= (int) outheight) { |
932 | 928 | src += data_length; |
933 | 929 | dst_y++; |
934 | 930 | continue; |
… |
… |
|
944 | 940 | if (code & 1) { |
945 | 941 | color = *s++; |
946 | 942 | for (i = 0; i < num; i++) { |
947 | | if (dst_x >= 0 && dst_x < _vm->_realWidth) { |
| 943 | if (dst_x >= 0 && dst_x < (int) outwidth) { |
948 | 944 | if (color != 255) { |
949 | 945 | if (v1.mask_ptr) |
950 | 946 | mask = v1.mask_ptr + 40 * dst_y + (dst_x >> 3); |
… |
… |
|
962 | 958 | } else { |
963 | 959 | for (i = 0; i < num; i++) { |
964 | 960 | color = s[i]; |
965 | | if (dst_x >= 0 && dst_x < _vm->_realWidth) { |
| 961 | if (dst_x >= 0 && dst_x < (int) outwidth) { |
966 | 962 | if (color != 255) { |
967 | 963 | if (v1.mask_ptr) |
968 | 964 | mask = v1.mask_ptr + 40 * dst_y + (dst_x >> 3); |