Ticket #8031: patch_screeneffects3.diff
File patch_screeneffects3.diff, 14.7 KB (added by , 22 years ago) |
---|
-
backends/dc/display.cpp
diff -ur vm_orig/backends/dc/display.cpp vm/backends/dc/display.cpp
old new 132 132 } while (--h); 133 133 } 134 134 135 void OSystem_Dreamcast::move_screen(int dx, int dy) { 136 137 if ((dx == 0) && (dy == 0)) 138 return; 139 140 if (dx == 0) { 141 // vertical movement 142 if (dy > 0) { 143 // move down 144 // copy from bottom to top 145 for (int y = 200; y >= dy; y--) 146 copy_rect(screen + SCREEN_W * (y - dy), SCREEN_W, 0, y, SCREEN_W, 1); 147 } else { 148 // move up 149 // copy from top to bottom 150 for (int y = 0; y < 200 + dx; y++) 151 copy_rect(screen + SCREEN_W * (y - dy), SCREEN_W, 0, y, SCREEN_W, 1); 152 } 153 } else if (dy == 0) { 154 // horizontal movement 155 if (dx > 0) { 156 // move right 157 // copy from right to left 158 for (int x = 320; x >= dx; x--) 159 copy_rect(screen + x - dx, SCREEN_W, x, 0, 1, SCREEN_H); 160 } else { 161 // move left 162 // copy from left to right 163 for (int x = 0; x < 320; x++) 164 copy_rect(screen + x - dx, SCREEN_W, x, 0, 1, SCREEN_H); 165 } 166 } else { 167 // free movement 168 // not neccessary for now 169 } 170 171 172 } 173 174 135 175 bool OSystem_Dreamcast::show_mouse(bool visible) 136 176 { 137 177 bool last = _ms_visible; -
backends/mac/mac.cpp
diff -ur vm_orig/backends/mac/mac.cpp vm/backends/mac/mac.cpp
old new 772 772 } while(--h); 773 773 } 774 774 775 void OSystem_MAC::move_screen(int dx, int dy) { 776 777 778 } 779 780 775 781 void OSystem_MAC::add_dirty_rect(int x, int y, int w, int h) { 776 782 if (force_full) 777 783 return; -
backends/morphos/morphos.cpp
diff -ur vm_orig/backends/morphos/morphos.cpp vm/backends/morphos/morphos.cpp
old new 926 926 } 927 927 } 928 928 929 void OSystem_MorphOS::move_screen(int dx, int dy) { 930 931 if ((dx == 0) && (dy == 0)) 932 return; 933 934 if (dx == 0) { 935 // vertical movement 936 if (dy > 0) { 937 // move down 938 // copy from bottom to top 939 for (int y = 200; y >= dy; y--) 940 copy_rect((byte *)ScummBuffer + ScummBufferWidth * (y - dy), ScummBufferWidth, 0, y, ScummBufferWidth, 1); 941 } else { 942 // move up 943 // copy from top to bottom 944 for (int y = 0; y < 200 + dx; y++) 945 copy_rect((byte *)ScummBuffer + ScummBufferWidth * (y - dy), ScummBufferWidth, 0, y, ScummBufferWidth, 1); 946 } 947 } else if (dy == 0) { 948 // horizontal movement 949 if (dx > 0) { 950 // move right 951 // copy from right to left 952 for (int x = 320; x >= dx; x--) 953 copy_rect((byte *)ScummBuffer + x - dx, ScummBufferWidth, x, 0, 1, ScummBufferHeight); 954 } else { 955 // move left 956 // copy from left to right 957 for (int x = 0; x < 320; x++) 958 copy_rect((byte *)ScummBuffer + x - dx, ScummBufferWidth, x, 0, 1, ScummBufferHeight); 959 } 960 } else { 961 // free movement 962 // not neccessary for now 963 } 964 965 966 } 967 968 929 969 bool OSystem_MorphOS::AddUpdateRect(WORD x, WORD y, WORD w, WORD h) 930 970 { 931 971 if (x < 0) { w+=x; x = 0; } -
backends/null/null.cpp
diff -ur vm_orig/backends/null/null.cpp vm/backends/null/null.cpp
old new 30 30 void set_palette(const byte *colors, uint start, uint num) {} 31 31 void init_size(uint w, uint h); 32 32 void copy_rect(const byte *buf, int pitch, int x, int y, int w, int h) {} 33 void move_screen(int dx, int dy) {} 33 34 void update_screen() {} 34 35 bool show_mouse(bool visible) { return false; } 35 36 void set_mouse_pos(int x, int y) {} -
backends/sdl/sdl-common.cpp
diff -ur vm_orig/backends/sdl/sdl-common.cpp vm/backends/sdl/sdl-common.cpp
old new 135 135 } 136 136 137 137 138 void OSystem_SDL_Common::move_screen(int dx, int dy, int height) { 139 140 if ((dx == 0) && (dy == 0)) 141 return; 142 143 if (dx == 0) { 144 // vertical movement 145 if (dy > 0) { 146 // move down 147 // copy from bottom to top 148 for (int y = height; y >= dy; y--) 149 copy_rect((byte *)sdl_screen->pixels + SCREEN_WIDTH * (y - dy), SCREEN_WIDTH, 0, y, SCREEN_WIDTH, 1); 150 } else { 151 // move up 152 // copy from top to bottom 153 for (int y = 0; y < height + dx; y++) 154 copy_rect((byte *)sdl_screen->pixels + SCREEN_WIDTH * (y - dy), SCREEN_WIDTH, 0, y, SCREEN_WIDTH, 1); 155 } 156 } else if (dy == 0) { 157 // horizontal movement 158 if (dx > 0) { 159 // move right 160 // copy from right to left 161 for (int x = 320; x >= dx; x--) 162 copy_rect((byte *)sdl_screen->pixels + x - dx, SCREEN_WIDTH, x, 0, 1, height); 163 } else { 164 // move left 165 // copy from left to right 166 for (int x = 0; x < 320; x++) 167 copy_rect((byte *)sdl_screen->pixels + x - dx, SCREEN_WIDTH, x, 0, 1, height); 168 } 169 } else { 170 // free movement 171 // not neccessary for now 172 } 173 } 174 138 175 void OSystem_SDL_Common::add_dirty_rect(int x, int y, int w, int h) { 139 176 if (force_full) 140 177 return; -
backends/sdl/sdl-common.h
diff -ur vm_orig/backends/sdl/sdl-common.h vm/backends/sdl/sdl-common.h
old new 42 42 // The screen will not be updated to reflect the new bitmap 43 43 void copy_rect(const byte *buf, int pitch, int x, int y, int w, int h); 44 44 45 void move_screen(int dx, int dy, int height); 46 45 47 // Update the dirty areas of the screen 46 48 void update_screen() = 0; 47 49 -
backends/wince/pocketpc.cpp
Binary files vm_orig/backends/sdl/sdl-common.o and vm/backends/sdl/sdl-common.o differ Binary files vm_orig/backends/sdl/sdl.o and vm/backends/sdl/sdl.o differ diff -ur vm_orig/backends/wince/pocketpc.cpp vm/backends/wince/pocketpc.cpp
old new 1215 1215 } while (--h); 1216 1216 } 1217 1217 1218 void OSystem_WINCE3::move_screen(int dx, int dy) { 1219 1220 if ((dx == 0) && (dy == 0)) 1221 return; 1222 1223 if (dx == 0) { 1224 // vertical movement 1225 if (dy > 0) { 1226 // move down 1227 // copy from bottom to top 1228 for (int y = 200; y >= dy; y--) 1229 copy_rect(_gfx_buf + SCREEN_WIDTH * (y - dy), SCREEN_WIDTH, 0, y, SCREEN_WIDTH, 1); 1230 } else { 1231 // move up 1232 // copy from top to bottom 1233 for (int y = 0; y < 200 + dx; y++) 1234 copy_rect(_gfx_buf + SCREEN_WIDTH * (y - dy), SCREEN_WIDTH, 0, y, SCREEN_WIDTH, 1); 1235 } 1236 } else if (dy == 0) { 1237 // horizontal movement 1238 if (dx > 0) { 1239 // move right 1240 // copy from right to left 1241 for (int x = 320; x >= dx; x--) 1242 copy_rect(_gfx_buf + x - dx, SCREEN_WIDTH, x, 0, 1, SCREEN_HEIGHT); 1243 } else { 1244 // move left 1245 // copy from left to right 1246 for (int x = 0; x < 320; x++) 1247 copy_rect(_gfx_buf + x - dx, SCREEN_WIDTH, x, 0, 1, SCREEN_HEIGHT); 1248 } 1249 } else { 1250 // free movement 1251 // not neccessary for now 1252 } 1253 1254 1255 } 1256 1257 1218 1258 void OSystem_WINCE3::update_screen() { 1219 1259 1220 1260 if (!hide_cursor) -
backends/x11/x11.cpp
diff -ur vm_orig/backends/x11/x11.cpp vm/backends/x11/x11.cpp
old new 62 62 // The screen will not be updated to reflect the new bitmap 63 63 void copy_rect(const byte *buf, int pitch, int x, int y, int w, int h); 64 64 65 void move_screen(int dx, int dy); 66 65 67 // Update the dirty areas of the screen 66 68 void update_screen(); 67 69 … … 508 510 buf += pitch; 509 511 } 510 512 } 513 514 void OSystem_X11::move_screen(int dx, int dy) { 515 516 if ((dx == 0) && (dy == 0)) 517 return; 518 519 if (dx == 0) { 520 // vertical movement 521 if (dy > 0) { 522 // move down 523 // copy from bottom to top 524 for (int y = 200; y >= dy; y--) 525 copy_rect(local_fb + fb_width * (y - dy), fb_width, 0, y, fb_width, 1); 526 } else { 527 // move up 528 // copy from top to bottom 529 for (int y = 0; y < 200 + dx; y++) 530 copy_rect(local_fb + fb_width * (y - dy), fb_width, 0, y, fb_width, 1); 531 } 532 } else if (dy == 0) { 533 // horizontal movement 534 if (dx > 0) { 535 // move right 536 // copy from right to left 537 for (int x = 320; x >= dx; x--) 538 copy_rect(local_fb + x - dx, fb_width, x, 0, 1, fb_height); 539 } else { 540 // move left 541 // copy from left to right 542 for (int x = 0; x < 320; x++) 543 copy_rect(local_fb + x - dx, fb_width, x, 0, 1, fb_height); 544 } 545 } else { 546 // free movement 547 // not neccessary for now 548 } 549 550 551 } 552 511 553 512 554 void OSystem_X11::update_screen_helper(const dirty_square * d, dirty_square * dout) 513 555 { -
common/system.h
Binary files vm_orig/common/config-file.o and vm/common/config-file.o differ Binary files vm_orig/common/engine.o and vm/common/engine.o differ Binary files vm_orig/common/gameDetector.o and vm/common/gameDetector.o differ Binary files vm_orig/common/main.o and vm/common/main.o differ diff -ur vm_orig/common/system.h vm/common/system.h
old new 90 90 // The screen will not be updated to reflect the new bitmap 91 91 virtual void copy_rect(const byte *buf, int pitch, int x, int y, int w, int h) = 0; 92 92 93 // Moves the screen content around by the given amount of pixels 94 // but only the top height pixel rows, the rest stays untouched 95 virtual void move_screen(int dx, int dy, int height) = 0; 96 93 97 // Update the dirty areas of the screen 94 98 virtual void update_screen() = 0; 95 99 -
scumm/gfx.cpp
Binary files vm_orig/common/timer.o and vm/common/timer.o differ Binary files vm_orig/gui/ListWidget.o and vm/gui/ListWidget.o differ Binary files vm_orig/gui/ScrollBarWidget.o and vm/gui/ScrollBarWidget.o differ Binary files vm_orig/gui/dialog.o and vm/gui/dialog.o differ Binary files vm_orig/gui/gui.o and vm/gui/gui.o differ Binary files vm_orig/gui/newgui.o and vm/gui/newgui.o differ Binary files vm_orig/gui/widget.o and vm/gui/widget.o differ Binary files vm_orig/scumm/actor.o and vm/scumm/actor.o differ Binary files vm_orig/scumm/akos.o and vm/scumm/akos.o differ Binary files vm_orig/scumm/boxes.o and vm/scumm/boxes.o differ Binary files vm_orig/scumm/bundle.o and vm/scumm/bundle.o differ Binary files vm_orig/scumm/costume.o and vm/scumm/costume.o differ Binary files vm_orig/scumm/debug.o and vm/scumm/debug.o differ diff -ur vm_orig/scumm/gfx.cpp vm/scumm/gfx.cpp
old new 677 677 dissolveEffect(8, 8); 678 678 break; 679 679 case 130: 680 unkScreenEffect1();680 scrollEffect(3); // right unkScreenEffect1(); 681 681 break; 682 682 case 131: 683 unkScreenEffect2();683 scrollEffect(2); // left unkScreenEffect2(); 684 684 break; 685 685 case 132: 686 unkScreenEffect3();686 scrollEffect(1); // down unkScreenEffect3(); 687 687 break; 688 688 case 133: 689 unkScreenEffect4();689 scrollEffect(0); // up unkScreenEffect4(); 690 690 break; 691 691 case 134: 692 692 dissolveEffect(1, 1); … … 2087 2087 waitForTimer(30); 2088 2088 } 2089 2089 } 2090 2091 void Scumm::scrollEffect(int dir) { 2092 2093 VirtScreen *vs = &virtscr[0]; 2094 2095 int x, y; 2096 int step; 2097 2098 if ((dir == 0) || (dir == 1)) 2099 step = vs->height; 2100 else 2101 step = vs->width; 2102 2103 #define scrolltime 500 // ms the scroll is supposed to take 2104 #define picturedelay 20 2105 2106 step /= (scrolltime/picturedelay); 2107 2108 switch (dir) { 2109 case 0: 2110 //up 2111 y = 1 + step; 2112 while (y < vs->height) { 2113 _system->move_screen(0, -step, vs->height); 2114 _system->copy_rect(vs->screenPtr + vs->xstart + (y - step) * vs->width, 2115 vs->width, 2116 0, vs->height - step, 2117 vs->width, step); 2118 _system->update_screen(); 2119 waitForTimer(picturedelay); 2120 2121 y += step; 2122 } 2123 break; 2124 case 1: 2125 // down 2126 y = 1 + step; 2127 while (y < vs->height) { 2128 _system->move_screen(0, step, vs->height); 2129 _system->copy_rect(vs->screenPtr + vs->xstart + vs->width * (vs->height-y), 2130 vs->width, 2131 0, 0, 2132 vs->width, step); 2133 _system->update_screen(); 2134 waitForTimer(picturedelay); 2135 2136 y += step; 2137 } 2138 break; 2139 case 2: 2140 // left 2141 x = 1 + step; 2142 while (x < vs->width) { 2143 _system->move_screen(-step, 0, vs->height); 2144 _system->copy_rect(vs->screenPtr + vs->xstart + x - step, 2145 vs->width, 2146 vs->width - step, 0, 2147 step, vs->height); 2148 _system->update_screen(); 2149 waitForTimer(picturedelay); 2150 2151 x += step; 2152 } 2153 break; 2154 case 3: 2155 // right 2156 x = 1 + step; 2157 while (x < vs->width) { 2158 _system->move_screen(step, 0, vs->height); 2159 _system->copy_rect(vs->screenPtr + vs->xstart + vs->width - x, 2160 vs->width, 2161 0, 0, 2162 step, vs->height); 2163 _system->update_screen(); 2164 waitForTimer(picturedelay); 2165 2166 x += step; 2167 } 2168 break; 2169 } 2170 } 2171 2090 2172 2091 2173 void Scumm::unkScreenEffect5(int a) { 2092 2174 // unkScreenEffect5(0), which is used by FOA during the opening -
scumm/scumm.h
Only in vm/scumm: gfx.cpp~ Binary files vm_orig/scumm/gfx.o and vm/scumm/gfx.o differ Binary files vm_orig/scumm/imuse.o and vm/scumm/imuse.o differ Binary files vm_orig/scumm/libscumm.a and vm/scumm/libscumm.a differ Binary files vm_orig/scumm/object.o and vm/scumm/object.o differ Binary files vm_orig/scumm/resource.o and vm/scumm/resource.o differ Binary files vm_orig/scumm/resource_v2.o and vm/scumm/resource_v2.o differ Binary files vm_orig/scumm/resource_v3.o and vm/scumm/resource_v3.o differ Binary files vm_orig/scumm/resource_v4.o and vm/scumm/resource_v4.o differ Binary files vm_orig/scumm/saveload.o and vm/scumm/saveload.o differ Binary files vm_orig/scumm/script.o and vm/scumm/script.o differ Binary files vm_orig/scumm/script_v1.o and vm/scumm/script_v1.o differ Binary files vm_orig/scumm/script_v2.o and vm/scumm/script_v2.o differ diff -ur vm_orig/scumm/scumm.h vm/scumm/scumm.h
old new 837 837 void unkScreenEffect5(int a); 838 838 void transitionEffect(int a); // former unkScreenEffect7 839 839 void dissolveEffect(int width, int height); // former unkScreenEffect5(0) and unkScreenEffect6 840 void scrollEffect(int dir); // former unkScreenEffects 1-4 840 841 841 842 void decompressBomp(byte *dst, byte *src, int w, int h); 842 843 uint _shakeFrame;