diff options
author | Max Horn | 2004-03-28 16:30:50 +0000 |
---|---|---|
committer | Max Horn | 2004-03-28 16:30:50 +0000 |
commit | 14378cb56e18237cf1b8b5e088995e0b91f47410 (patch) | |
tree | e646deabd966699f0538880f74883255df2810bb | |
parent | efb5f3777a2aa664c6bc5e7fb5ab3f2b92da6ca8 (diff) | |
download | scummvm-rg350-14378cb56e18237cf1b8b5e088995e0b91f47410.tar.gz scummvm-rg350-14378cb56e18237cf1b8b5e088995e0b91f47410.tar.bz2 scummvm-rg350-14378cb56e18237cf1b8b5e088995e0b91f47410.zip |
Renamed more OSystem methods
svn-id: r13410
43 files changed, 258 insertions, 258 deletions
diff --git a/backends/PalmOS/Src/arm/ArmNative.h b/backends/PalmOS/Src/arm/ArmNative.h index 2a85104b97..5f58ab59ad 100644 --- a/backends/PalmOS/Src/arm/ArmNative.h +++ b/backends/PalmOS/Src/arm/ArmNative.h @@ -28,7 +28,7 @@ typedef struct { DECLARE(OSystem_PALMOS_update_screen__wide_portrait) DECLARE(OSystem_PALMOS_update_screen__wide_landscape) -DECLARE(OSystem_PALMOS_copy_rect) +DECLARE(OSystem_PALMOS_copyRectToScreen) // rsrc #define ARMCODE_1 1000 diff --git a/backends/PalmOS/Src/arm/PNOMain.cpp b/backends/PalmOS/Src/arm/PNOMain.cpp index 6fc59e0000..a38682c5e1 100644 --- a/backends/PalmOS/Src/arm/PNOMain.cpp +++ b/backends/PalmOS/Src/arm/PNOMain.cpp @@ -31,7 +31,7 @@ unsigned long PNO_Main(const void *emulStateP, void *userData68KP, Call68KFuncTy /* const PnoProc call[] = { (PnoProc)__ARMlet_Take_Func_Addr__(OSystem_PALMOS_update_screen__wide_portrait), (PnoProc)__ARMlet_Take_Func_Addr__(OSystem_PALMOS_update_screen__wide_landscape), - //OSystem_PALMOS_copy_rect + //OSystem_PALMOS_copyRectToScreen }; */ #ifndef WIN32 diff --git a/backends/PalmOS/Src/palm.cpp b/backends/PalmOS/Src/palm.cpp index 8bcbea07d8..278cc68211 100644 --- a/backends/PalmOS/Src/palm.cpp +++ b/backends/PalmOS/Src/palm.cpp @@ -324,7 +324,7 @@ void OSystem_PALMOS::initSize(uint w, uint h) { load_gfx_mode(); } -void OSystem_PALMOS::copy_rect(const byte *buf, int pitch, int x, int y, int w, int h) { +void OSystem_PALMOS::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) { /* Clip the coordinates */ if (x < 0) { w += x; @@ -674,7 +674,7 @@ void OSystem_PALMOS::updateScreen() { } -bool OSystem_PALMOS::show_mouse(bool visible) { +bool OSystem_PALMOS::showMouse(bool visible) { if (_mouseVisible == visible) return visible; @@ -689,7 +689,7 @@ bool OSystem_PALMOS::show_mouse(bool visible) { return last; } -void OSystem_PALMOS::warp_mouse(int x, int y) { +void OSystem_PALMOS::warpMouse(int x, int y) { set_mouse_pos(x, y); } @@ -701,7 +701,7 @@ void OSystem_PALMOS::set_mouse_pos(int x, int y) { } } -void OSystem_PALMOS::set_mouse_cursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y) { +void OSystem_PALMOS::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y) { _mouseCurState.w = w; _mouseCurState.h = h; @@ -1649,7 +1649,7 @@ void OSystem_PALMOS::timer_handler(UInt32 current_msecs) { } } -void OSystem_PALMOS::show_overlay() { +void OSystem_PALMOS::showOverlay() { // hide the mouse undraw_mouse(); // save background @@ -1673,18 +1673,18 @@ void OSystem_PALMOS::show_overlay() { } _overlayVisible = true; - clear_overlay(); + clearOverlay(); } -void OSystem_PALMOS::hide_overlay() { +void OSystem_PALMOS::hideOverlay() { // hide the mouse undraw_mouse(); _overlayVisible = false; - copy_rect(_tmpBackupP, _screenWidth, 0, 0, _screenWidth, _screenHeight); + copyRectToScreen(_tmpBackupP, _screenWidth, 0, 0, _screenWidth, _screenHeight); } -void OSystem_PALMOS::clear_overlay() { +void OSystem_PALMOS::clearOverlay() { if (!_overlayVisible) return; @@ -1697,7 +1697,7 @@ void OSystem_PALMOS::clear_overlay() { MemMove(_tmpScreenP, _tmpBackupP, _screenWidth * _screenHeight); } -void OSystem_PALMOS::grab_overlay(byte *buf, int pitch) { +void OSystem_PALMOS::grabOverlay(byte *buf, int pitch) { if (!_overlayVisible) return; @@ -1714,7 +1714,7 @@ void OSystem_PALMOS::grab_overlay(byte *buf, int pitch) { } while (--h); } -void OSystem_PALMOS::copy_rect_overlay(const byte *buf, int pitch, int x, int y, int w, int h) { +void OSystem_PALMOS::copyRectToOverlay(const byte *buf, int pitch, int x, int y, int w, int h) { if (!_overlayVisible) return; diff --git a/backends/PalmOS/Src/palm.h b/backends/PalmOS/Src/palm.h index 910daff9c0..8cf579641e 100644 --- a/backends/PalmOS/Src/palm.h +++ b/backends/PalmOS/Src/palm.h @@ -54,7 +54,7 @@ public: // Draw a bitmap to screen. // The screen will not be updated to reflect the new bitmap - void copy_rect(const byte *buf, int pitch, int x, int y, int w, int h); + void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); // Moves the screen content around by the given amount of pixels // but only the top height pixel rows, the rest stays untouched @@ -64,7 +64,7 @@ public: void updateScreen(); // Either show or hide the mouse cursor - bool show_mouse(bool visible); + bool showMouse(bool visible); // Set the position of the mouse cursor void set_mouse_pos(int x, int y); @@ -72,11 +72,11 @@ public: // Warp the mouse cursor. Where set_mouse_pos() only informs the // backend of the mouse cursor's current position, this function // actually moves the cursor to the specified position. - void warp_mouse(int x, int y); + void warpMouse(int x, int y); // Set the bitmap that's used when drawing the cursor. - void set_mouse_cursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y); + void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y); // Shaking is used in SCUMM. Set current shake position. void set_shake_pos(int shake_pos); @@ -140,11 +140,11 @@ public: UInt8 _quitCount; // Overlay - void show_overlay(); - void hide_overlay(); - void clear_overlay(); - void grab_overlay(byte *buf, int pitch); - void copy_rect_overlay(const byte *buf, int pitch, int x, int y, int w, int h); + void showOverlay(); + void hideOverlay(); + void clearOverlay(); + void grabOverlay(byte *buf, int pitch); + void copyRectToOverlay(const byte *buf, int pitch, int x, int y, int w, int h); int16 getWidth(); int16 getHeight(); diff --git a/backends/dc/dc.h b/backends/dc/dc.h index b040edab92..04b9fc5bb6 100644 --- a/backends/dc/dc.h +++ b/backends/dc/dc.h @@ -72,20 +72,20 @@ class OSystem_Dreamcast : public OSystem { // Draw a bitmap to screen. // The screen will not be updated to reflect the new bitmap - void copy_rect(const byte *buf, int pitch, int x, int y, int w, int h); + void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); void move_screen(int dx, int dy, int height); // Update the dirty areas of the screen void updateScreen(); // Either show or hide the mouse cursor - bool show_mouse(bool visible); + bool showMouse(bool visible); // Move ("warp") the mouse cursor to the specified position. - void warp_mouse(int x, int y); + void warpMouse(int x, int y); // Set the bitmap that's used when drawing the cursor. - void set_mouse_cursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y); + void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y); // Shaking is used in SCUMM. Set current shake position. void set_shake_pos(int shake_pos); @@ -128,11 +128,11 @@ class OSystem_Dreamcast : public OSystem { void quit(); // Overlay - void show_overlay(); - void hide_overlay(); - void clear_overlay(); - void grab_overlay(int16 *buf, int pitch); - void copy_rect_overlay(const int16 *buf, int pitch, int x, int y, int w, int h); + void showOverlay(); + void hideOverlay(); + void clearOverlay(); + void grabOverlay(int16 *buf, int pitch); + void copyRectToOverlay(const int16 *buf, int pitch, int x, int y, int w, int h); // Add a callback timer void setTimerCallback(TimerProc callback, int timer); diff --git a/backends/dc/display.cpp b/backends/dc/display.cpp index 7a5ff6bbf0..50abc5e522 100644 --- a/backends/dc/display.cpp +++ b/backends/dc/display.cpp @@ -192,7 +192,7 @@ void OSystem_Dreamcast::initSize(uint w, uint h) // dc_reset_screen(0, 0); } -void OSystem_Dreamcast::copy_rect(const byte *buf, int pitch, int x, int y, +void OSystem_Dreamcast::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) { unsigned char *dst = screen + y*SCREEN_W + x; @@ -215,12 +215,12 @@ void OSystem_Dreamcast::move_screen(int dx, int dy, int height) { // move down // copy from bottom to top for (int y = height - 1; y >= dy; y--) - copy_rect(screen + SCREEN_W * (y - dy), SCREEN_W, 0, y, _screen_w, 1); + copyRectToScreen(screen + SCREEN_W * (y - dy), SCREEN_W, 0, y, _screen_w, 1); } else { // move up // copy from top to bottom for (int y = 0; y < height + dx; y++) - copy_rect(screen + SCREEN_W * (y - dy), SCREEN_W, 0, y, _screen_w, 1); + copyRectToScreen(screen + SCREEN_W * (y - dy), SCREEN_W, 0, y, _screen_w, 1); } } else if (dy == 0) { // horizontal movement @@ -228,12 +228,12 @@ void OSystem_Dreamcast::move_screen(int dx, int dy, int height) { // move right // copy from right to left for (int x = _screen_w - 1; x >= dx; x--) - copy_rect(screen + x - dx, SCREEN_W, x, 0, 1, height); + copyRectToScreen(screen + x - dx, SCREEN_W, x, 0, 1, height); } else { // move left // copy from left to right for (int x = 0; x < _screen_w; x++) - copy_rect(screen + x - dx, SCREEN_W, x, 0, 1, height); + copyRectToScreen(screen + x - dx, SCREEN_W, x, 0, 1, height); } } else { // free movement @@ -244,7 +244,7 @@ void OSystem_Dreamcast::move_screen(int dx, int dy, int height) { } -bool OSystem_Dreamcast::show_mouse(bool visible) +bool OSystem_Dreamcast::showMouse(bool visible) { bool last = _ms_visible; _ms_visible = visible; @@ -252,13 +252,13 @@ bool OSystem_Dreamcast::show_mouse(bool visible) return last; } -void OSystem_Dreamcast::warp_mouse(int x, int y) +void OSystem_Dreamcast::warpMouse(int x, int y) { _ms_cur_x = x; _ms_cur_y = y; } -void OSystem_Dreamcast::set_mouse_cursor(const byte *buf, uint w, uint h, +void OSystem_Dreamcast::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y) { _ms_cur_w = w; @@ -511,18 +511,18 @@ void OSystem_Dreamcast::drawMouse(int xdraw, int ydraw, int w, int h, } -void OSystem_Dreamcast::show_overlay() +void OSystem_Dreamcast::showOverlay() { _overlay_visible = true; - clear_overlay(); + clearOverlay(); } -void OSystem_Dreamcast::hide_overlay() +void OSystem_Dreamcast::hideOverlay() { _overlay_visible = false; } -void OSystem_Dreamcast::clear_overlay() +void OSystem_Dreamcast::clearOverlay() { if(!_overlay_visible) return; @@ -541,7 +541,7 @@ void OSystem_Dreamcast::clear_overlay() _overlay_dirty = true; } -void OSystem_Dreamcast::grab_overlay(int16 *buf, int pitch) +void OSystem_Dreamcast::grabOverlay(int16 *buf, int pitch) { int h = OVL_H; unsigned short *src = overlay; @@ -552,7 +552,7 @@ void OSystem_Dreamcast::grab_overlay(int16 *buf, int pitch) } while (--h); } -void OSystem_Dreamcast::copy_rect_overlay(const int16 *buf, int pitch, +void OSystem_Dreamcast::copyRectToOverlay(const int16 *buf, int pitch, int x, int y, int w, int h) { unsigned short *dst = overlay + y*OVL_W + x; diff --git a/backends/gp32/gp32.cpp b/backends/gp32/gp32.cpp index 8d5462e48e..6d3f7dbf02 100644 --- a/backends/gp32/gp32.cpp +++ b/backends/gp32/gp32.cpp @@ -185,7 +185,7 @@ void OSystem_GP32::add_dirty_rgn_auto(const byte *buf) { // Draw a bitmap to screen. // The screen will not be updated to reflect the new bitmap -void OSystem_GP32::copy_rect(const byte *buf, int pitch, int x, int y, int w, int h) { +void OSystem_GP32::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) { if (_screen == NULL) return; @@ -361,12 +361,12 @@ void OSystem_GP32::move_screen(int dx, int dy, int height) { // move down // copy from bottom to top for (int y = height - 1; y >= dy; y--) - copy_rect((byte *)_screen->pixels + _screenWidth * (y - dy), _screenWidth, 0, y, _screenWidth, 1); + copyRectToScreen((byte *)_screen->pixels + _screenWidth * (y - dy), _screenWidth, 0, y, _screenWidth, 1); } else { // move up // copy from top to bottom for (int y = 0; y < height + dx; y++) - copy_rect((byte *)_screen->pixels + _screenWidth * (y - dy), _screenWidth, 0, y, _screenWidth, 1); + copyRectToScreen((byte *)_screen->pixels + _screenWidth * (y - dy), _screenWidth, 0, y, _screenWidth, 1); } } else if (dy == 0) { // horizontal movement @@ -374,12 +374,12 @@ void OSystem_GP32::move_screen(int dx, int dy, int height) { // move right // copy from right to left for (int x = _screenWidth - 1; x >= dx; x--) - copy_rect((byte *)_screen->pixels + x - dx, _screenWidth, x, 0, 1, height); + copyRectToScreen((byte *)_screen->pixels + x - dx, _screenWidth, x, 0, 1, height); } else { // move left // copy from left to right for (int x = 0; x < _screenWidth; x++) - copy_rect((byte *)_screen->pixels + x - dx, _screenWidth, x, 0, 1, height); + copyRectToScreen((byte *)_screen->pixels + x - dx, _screenWidth, x, 0, 1, height); } } else { // free movement @@ -798,7 +798,7 @@ void OSystem_GP32::updateScreen() { } // Either show or hide the mouse cursor -bool OSystem_GP32::show_mouse(bool visible) { +bool OSystem_GP32::showMouse(bool visible) { if (_mouseVisible == visible) return visible; @@ -825,12 +825,12 @@ void OSystem_GP32::set_mouse_pos(int x, int y) { } } -void OSystem_GP32::warp_mouse(int x, int y) { +void OSystem_GP32::warpMouse(int x, int y) { set_mouse_pos(x, y); } // Set the bitmap that's used when drawing the cursor. -void OSystem_GP32::set_mouse_cursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y) { +void OSystem_GP32::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y) { _mouse_cur_state.w = w; _mouse_cur_state.h = h; @@ -1014,7 +1014,7 @@ void OSystem_GP32::hotswap_gfx_mode() { SDL_SetColors(_screen, _currentPalette, 0, 256); // blit image - copy_rect(bak_mem, _screenWidth, 0, 0, _screenWidth, _screenHeight); + copyRectToScreen(bak_mem, _screenWidth, 0, 0, _screenWidth, _screenHeight); free(bak_mem); updateScreen(); @@ -1086,7 +1086,7 @@ void OSystem_GP32::quit() { } // Overlay -void OSystem_GP32::show_overlay() { +void OSystem_GP32::showOverlay() { // hide the mouse undraw_mouse(); @@ -1107,10 +1107,10 @@ GpGraphicModeSet(16, NULL); //ph0x //GpRectFill(NULL,&gpDraw[GAME_SURFACE], 0, 0, 320, 240*2, 0); //black border _overlay_visible = true; - clear_overlay(); + clearOverlay(); } -void OSystem_GP32::hide_overlay() { +void OSystem_GP32::hideOverlay() { // hide the mouse undraw_mouse(); @@ -1121,7 +1121,7 @@ GpRectFill(NULL,&gpDraw[GAME_SURFACE], 0, 200, 320, 40, 0); //black border _forceFull = true; } -void OSystem_GP32::clear_overlay() { +void OSystem_GP32::clearOverlay() { if (!_overlay_visible) return; @@ -1140,7 +1140,7 @@ void OSystem_GP32::clear_overlay() { _forceFull = true; } -void OSystem_GP32::grab_overlay(int16 *buf, int pitch) { +void OSystem_GP32::grabOverlay(int16 *buf, int pitch) { if (!_overlay_visible) return; @@ -1164,7 +1164,7 @@ void OSystem_GP32::grab_overlay(int16 *buf, int pitch) { ///SDL_UnlockSurface(sdl_tmpscreen); } -void OSystem_GP32::copy_rect_overlay(const int16 *buf, int pitch, int x, int y, int w, int h) { +void OSystem_GP32::copyRectToOverlay(const int16 *buf, int pitch, int x, int y, int w, int h) { if (!_overlay_visible) return; diff --git a/backends/gp32/gp32.h b/backends/gp32/gp32.h index 11f44c9a61..37c08ce080 100644 --- a/backends/gp32/gp32.h +++ b/backends/gp32/gp32.h @@ -45,7 +45,7 @@ public: // Draw a bitmap to screen. // The screen will not be updated to reflect the new bitmap - void copy_rect(const byte *buf, int pitch, int x, int y, int w, int h); + void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); // Moves the screen content around by the given amount of pixels // but only the top height pixel rows, the rest stays untouched @@ -55,14 +55,14 @@ public: void updateScreen(); // Either show or hide the mouse cursor - bool show_mouse(bool visible); - void warp_mouse(int x, int y); + bool showMouse(bool visible); + void warpMouse(int x, int y); // Set the position of the mouse cursor void set_mouse_pos(int x, int y); // Set the bitmap that's used when drawing the cursor. - void set_mouse_cursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y); + void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y); // Shaking is used in SCUMM. Set current shake position. void set_shake_pos(int shake_pos); @@ -112,11 +112,11 @@ public: void quit(); // Overlay - void show_overlay(); - void hide_overlay(); - void clear_overlay(); - void grab_overlay(int16 *buf, int pitch); - void copy_rect_overlay(const int16 *buf, int pitch, int x, int y, int w, int h); + void showOverlay(); + void hideOverlay(); + void clearOverlay(); + void grabOverlay(int16 *buf, int pitch); + void copyRectToOverlay(const int16 *buf, int pitch, int x, int y, int w, int h); static OSystem *create(int gfx_mode, bool full_screen); diff --git a/backends/morphos/morphos.cpp b/backends/morphos/morphos.cpp index a68b818295..ed62106f32 100644 --- a/backends/morphos/morphos.cpp +++ b/backends/morphos/morphos.cpp @@ -969,7 +969,7 @@ bool OSystem_MorphOS::poll_event(Event *event) return false; } -void OSystem_MorphOS::warp_mouse(int x, int y) +void OSystem_MorphOS::warpMouse(int x, int y) { if (InputIORequest) { @@ -1017,7 +1017,7 @@ void OSystem_MorphOS::set_shake_pos(int shake_pos) (MouseOldY+MouseOldHeight <= y) || (MouseOldY >= y+h))) /* Copy part of bitmap */ -void OSystem_MorphOS::copy_rect(const byte *src, int pitch, int x, int y, int w, int h) +void OSystem_MorphOS::copyRectToScreen(const byte *src, int pitch, int x, int y, int w, int h) { byte *dst; @@ -1119,13 +1119,13 @@ void OSystem_MorphOS::move_screen(int dx, int dy, int height) { // move down // copy from bottom to top for (int y = height - 1; y >= dy; y--) - copy_rect((byte *)ScummBuffer + ScummBufferWidth * (y - dy), ScummBufferWidth, 0, y, ScummBufferWidth, 1); + copyRectToScreen((byte *)ScummBuffer + ScummBufferWidth * (y - dy), ScummBufferWidth, 0, y, ScummBufferWidth, 1); } else if (dy < 0) { // move up // copy from top to bottom dy = -dy; for (int y = dy; y < height; y++) - copy_rect((byte *)ScummBuffer + ScummBufferWidth * y, ScummBufferWidth, 0, y - dy, ScummBufferWidth, 1); + copyRectToScreen((byte *)ScummBuffer + ScummBufferWidth * y, ScummBufferWidth, 0, y - dy, ScummBufferWidth, 1); } // horizontal movement @@ -1133,13 +1133,13 @@ void OSystem_MorphOS::move_screen(int dx, int dy, int height) { // move right // copy from right to left for (int x = ScummBufferWidth - 1; x >= dx; x--) - copy_rect((byte *)ScummBuffer + x - dx, ScummBufferWidth, x, 0, 1, height); + copyRectToScreen((byte *)ScummBuffer + x - dx, ScummBufferWidth, x, 0, 1, height); } else if (dx < 0) { // move left // copy from left to right dx = -dx; for (int x = dx; x < ScummBufferWidth; x++) - copy_rect((byte *)ScummBuffer + x, ScummBufferWidth, x, 0, 1, height); + copyRectToScreen((byte *)ScummBuffer + x, ScummBufferWidth, x, 0, 1, height); } } @@ -1399,7 +1399,7 @@ void OSystem_MorphOS::UndrawMouse() } } -bool OSystem_MorphOS::show_mouse(bool visible) +bool OSystem_MorphOS::showMouse(bool visible) { if (MouseVisible == visible) return visible; @@ -1423,7 +1423,7 @@ void OSystem_MorphOS::set_mouse_pos(int x, int y) } } -void OSystem_MorphOS::set_mouse_cursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y) +void OSystem_MorphOS::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y) { MouseWidth = w; MouseHeight = h; @@ -1577,11 +1577,11 @@ int16 OSystem_MorphOS::getHeight() return ScummScrHeight; } -void OSystem_MorphOS::show_overlay() +void OSystem_MorphOS::showOverlay() { UndrawMouse(); memcpy(OvlSavedBuffer, ScummBuffer, ScummBufferWidth*ScummBufferHeight); - clear_overlay(); + clearOverlay(); for (int c = 0; c < 256; c++) { ULONG r, g, b; @@ -1592,18 +1592,18 @@ void OSystem_MorphOS::show_overlay() } } -void OSystem_MorphOS::hide_overlay() +void OSystem_MorphOS::hideOverlay() { - copy_rect((byte *) OvlSavedBuffer, ScummBufferWidth, 0, 0, ScummBufferWidth, ScummBufferHeight); + copyRectToScreen((byte *) OvlSavedBuffer, ScummBufferWidth, 0, 0, ScummBufferWidth, ScummBufferHeight); } -void OSystem_MorphOS::clear_overlay() +void OSystem_MorphOS::clearOverlay() { AUTO_LOCK UBYTE *src = (UBYTE *) ScummBuffer; UBYTE *dest = (UBYTE *) OvlBitMap; - copy_rect((byte *) OvlSavedBuffer, ScummBufferWidth, 0, 0, ScummBufferWidth, ScummBufferHeight); + copyRectToScreen((byte *) OvlSavedBuffer, ScummBufferWidth, 0, 0, ScummBufferWidth, ScummBufferHeight); for (int y = 0; y < ScummBufferHeight; y++) for (int x = 0; x < ScummBufferWidth; x++) { @@ -1613,7 +1613,7 @@ void OSystem_MorphOS::clear_overlay() } } -void OSystem_MorphOS::grab_overlay(int16 *buf, int pitch) +void OSystem_MorphOS::grabOverlay(int16 *buf, int pitch) { int h = ScummBufferHeight; int x; @@ -1630,7 +1630,7 @@ void OSystem_MorphOS::grab_overlay(int16 *buf, int pitch) } while (--h); } -void OSystem_MorphOS::copy_rect_overlay(const int16 *ovl, int pitch, int x, int y, int w, int h) +void OSystem_MorphOS::copyRectToOverlay(const int16 *ovl, int pitch, int x, int y, int w, int h) { int x1, y1; UBYTE *dest; @@ -1672,7 +1672,7 @@ void OSystem_MorphOS::copy_rect_overlay(const int16 *ovl, int pitch, int x, int dest += (ScummBufferWidth-w)*3; ovl += pitch-w; } - copy_rect(bmap, w, x, y, w, h); + copyRectToScreen(bmap, w, x, y, w, h); FreeVec(bmap); } } diff --git a/backends/morphos/morphos.h b/backends/morphos/morphos.h index fd40369fd1..3d23e28476 100644 --- a/backends/morphos/morphos.h +++ b/backends/morphos/morphos.h @@ -51,30 +51,30 @@ class OSystem_MorphOS : public OSystem // Draw a bitmap to screen. // The screen will not be updated to reflect the new bitmap - virtual void copy_rect(const byte *buf, int pitch, int x, int y, int w, int h); + virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); void move_screen(int dx, int dy, int height); // Update the dirty areas of the screen virtual void updateScreen(); // Either show or hide the mouse cursor - virtual bool show_mouse(bool visible); + virtual bool showMouse(bool visible); // Set the position of the mouse cursor virtual void set_mouse_pos(int x, int y); // Set the bitmap that's used when drawing the cursor. - virtual void set_mouse_cursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y); + virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y); // Shaking is used in SCUMM. Set current shake position. virtual void set_shake_pos(int shake_pos); // Overlay - virtual void show_overlay(); - virtual void hide_overlay(); - virtual void clear_overlay(); - virtual void grab_overlay(int16 *buf, int pitch); - virtual void copy_rect_overlay(const int16 *buf, int pitch, int x, int y, int w, int h); + virtual void showOverlay(); + virtual void hideOverlay(); + virtual void clearOverlay(); + virtual void grabOverlay(int16 *buf, int pitch); + virtual void copyRectToOverlay(const int16 *buf, int pitch, int x, int y, int w, int h); virtual int16 getHeight(); virtual int16 getWidth(); @@ -98,7 +98,7 @@ class OSystem_MorphOS : public OSystem virtual bool poll_event(Event *event); // Moves mouse pointer to specified position - virtual void warp_mouse(int x, int y); + virtual void warpMouse(int x, int y); // Set the function to be invoked whenever samples need to be generated virtual bool setSoundCallback(SoundProc proc, void *param); diff --git a/backends/null/null.cpp b/backends/null/null.cpp index f78754d813..71685882f7 100644 --- a/backends/null/null.cpp +++ b/backends/null/null.cpp @@ -31,12 +31,12 @@ class OSystem_NULL : public OSystem { public: void setPalette(const byte *colors, uint start, uint num) {} void initSize(uint w, uint h); - void copy_rect(const byte *buf, int pitch, int x, int y, int w, int h) {} + void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) {} void move_screen(int dx, int dy) {} void updateScreen() {} - bool show_mouse(bool visible) { return false; } + bool showMouse(bool visible) { return false; } void set_mouse_pos(int x, int y) {} - void set_mouse_cursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y) {} + void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y) {} void set_shake_pos(int shake_pos) {} uint32 get_msecs(); void delay_msecs(uint msecs); diff --git a/backends/sdl/graphics.cpp b/backends/sdl/graphics.cpp index 7ebb5e5d41..6842ab057c 100644 --- a/backends/sdl/graphics.cpp +++ b/backends/sdl/graphics.cpp @@ -532,7 +532,7 @@ void OSystem_SDL::setFullscreenMode(bool enable) { } } -void OSystem_SDL::copy_rect(const byte *src, int pitch, int x, int y, int w, int h) { +void OSystem_SDL::copyRectToScreen(const byte *src, int pitch, int x, int y, int w, int h) { if (_screen == NULL) return; @@ -829,15 +829,15 @@ void OSystem_SDL::set_shake_pos(int shake_pos) { #pragma mark --- Overlays --- #pragma mark - -void OSystem_SDL::show_overlay() { +void OSystem_SDL::showOverlay() { // hide the mouse undraw_mouse(); _overlayVisible = true; - clear_overlay(); + clearOverlay(); } -void OSystem_SDL::hide_overlay() { +void OSystem_SDL::hideOverlay() { // hide the mouse undraw_mouse(); @@ -845,7 +845,7 @@ void OSystem_SDL::hide_overlay() { _forceFull = true; } -void OSystem_SDL::clear_overlay() { +void OSystem_SDL::clearOverlay() { if (!_overlayVisible) return; @@ -866,7 +866,7 @@ void OSystem_SDL::clear_overlay() { _forceFull = true; } -void OSystem_SDL::grab_overlay(OverlayColor *buf, int pitch) { +void OSystem_SDL::grabOverlay(OverlayColor *buf, int pitch) { if (!_overlayVisible) return; @@ -890,7 +890,7 @@ void OSystem_SDL::grab_overlay(OverlayColor *buf, int pitch) { SDL_UnlockSurface(_tmpscreen); } -void OSystem_SDL::copy_rect_overlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) { +void OSystem_SDL::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) { if (!_overlayVisible) return; @@ -953,7 +953,7 @@ void OSystem_SDL::colorToRGB(OverlayColor color, uint8 &r, uint8 &g, uint8 &b) { #pragma mark --- Mouse --- #pragma mark - -bool OSystem_SDL::show_mouse(bool visible) { +bool OSystem_SDL::showMouse(bool visible) { if (_mouseVisible == visible) return visible; @@ -977,7 +977,7 @@ void OSystem_SDL::set_mouse_pos(int x, int y) { } } -void OSystem_SDL::warp_mouse(int x, int y) { +void OSystem_SDL::warpMouse(int x, int y) { if (_mouseCurState.x != x || _mouseCurState.y != y) { SDL_WarpMouse(x * _scaleFactor, y * _scaleFactor); @@ -992,7 +992,7 @@ void OSystem_SDL::warp_mouse(int x, int y) { } } -void OSystem_SDL::set_mouse_cursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y) { +void OSystem_SDL::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y) { undraw_mouse(); diff --git a/backends/sdl/sdl-common.h b/backends/sdl/sdl-common.h index c71e147956..89a5b750fe 100644 --- a/backends/sdl/sdl-common.h +++ b/backends/sdl/sdl-common.h @@ -48,7 +48,7 @@ public: // Draw a bitmap to screen. // The screen will not be updated to reflect the new bitmap - void copy_rect(const byte *src, int pitch, int x, int y, int w, int h); + void copyRectToScreen(const byte *src, int pitch, int x, int y, int w, int h); void move_screen(int dx, int dy, int height); @@ -56,15 +56,15 @@ public: void updateScreen(); // Either show or hide the mouse cursor - bool show_mouse(bool visible); + bool showMouse(bool visible); // Warp the mouse cursor. Where set_mouse_pos() only informs the // backend of the mouse cursor's current position, this function // actually moves the cursor to the specified position. - void warp_mouse(int x, int y); + void warpMouse(int x, int y); // Set the bitmap that's used when drawing the cursor. - void set_mouse_cursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y); + void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y); // Shaking is used in SCUMM. Set current shake position. void set_shake_pos(int shake_pos); @@ -111,11 +111,11 @@ public: void deleteMutex(MutexRef mutex); // Overlay - virtual void show_overlay(); - virtual void hide_overlay(); - virtual void clear_overlay(); - virtual void grab_overlay(OverlayColor *buf, int pitch); - virtual void copy_rect_overlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h); + virtual void showOverlay(); + virtual void hideOverlay(); + virtual void clearOverlay(); + virtual void grabOverlay(OverlayColor *buf, int pitch); + virtual void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h); virtual int16 getHeight(); virtual int16 getWidth(); diff --git a/backends/wince/wince-sdl.cpp b/backends/wince/wince-sdl.cpp index 1789c56c3c..da6918d3b1 100644 --- a/backends/wince/wince-sdl.cpp +++ b/backends/wince/wince-sdl.cpp @@ -944,7 +944,7 @@ void OSystem_WINCE3::fillMouseEvent(Event &event, int x, int y) { event.mouse.y = event.mouse.y * _scaleFactorYd / _scaleFactorYm; } -void OSystem_WINCE3::warp_mouse(int x, int y) { +void OSystem_WINCE3::warpMouse(int x, int y) { if (_mouseCurState.x != x || _mouseCurState.y != y) { SDL_WarpMouse(x * _scaleFactorXm / _scaleFactorXd, y * _scaleFactorYm / _scaleFactorYd); diff --git a/backends/wince/wince-sdl.h b/backends/wince/wince-sdl.h index c11761e582..910cd558d0 100644 --- a/backends/wince/wince-sdl.h +++ b/backends/wince/wince-sdl.h @@ -57,7 +57,7 @@ public: // Overloaded from SDL_Common (new scaler handling) void add_dirty_rect(int x, int y, int w, int h); // Overloaded from SDL_Common (new scaler handling) - void warp_mouse(int x, int y); + void warpMouse(int x, int y); // Overloaded from SDL_Commmon void quit(); // Overloaded from SDL_Commmon (master volume and sample rate subtleties) diff --git a/backends/x11/x11.cpp b/backends/x11/x11.cpp index 5b49cbac08..482c52bbc6 100644 --- a/backends/x11/x11.cpp +++ b/backends/x11/x11.cpp @@ -88,7 +88,7 @@ public: // Draw a bitmap to screen. // The screen will not be updated to reflect the new bitmap - void copy_rect(const byte *buf, int pitch, int x, int y, int w, int h); + void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); void move_screen(int dx, int dy, int height); @@ -96,7 +96,7 @@ public: void updateScreen(); // Either show or hide the mouse cursor - bool show_mouse(bool visible); + bool showMouse(bool visible); // Set the position of the mouse cursor void set_mouse_pos(int x, int y); @@ -104,10 +104,10 @@ public: // Warp the mouse cursor. Where set_mouse_pos() only informs the // backend of the mouse cursor's current position, this function // actually moves the cursor to the specified position. - void warp_mouse(int x, int y); + void warpMouse(int x, int y); // Set the bitmap that's used when drawing the cursor. - void set_mouse_cursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y); + void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y); // Shaking is used in SCUMM. Set current shake position. void set_shake_pos(int shake_pos); @@ -159,11 +159,11 @@ public: void deleteMutex(MutexRef mutex); // Overlay handling for the new menu system - void show_overlay(); - void hide_overlay(); - void clear_overlay(); - void grab_overlay(int16 *, int); - void copy_rect_overlay(const int16 *, int, int, int, int, int); + void showOverlay(); + void hideOverlay(); + void clearOverlay(); + void grabOverlay(int16 *, int); + void copyRectToOverlay(const int16 *, int, int, int, int, int); virtual int16 getHeight(); virtual int16 getWidth(); @@ -550,7 +550,7 @@ void OSystem_X11::setPalette(const byte *colors, uint start, uint num) { num_of_dirty_square++; \ } -void OSystem_X11::copy_rect(const byte *buf, int pitch, int x, int y, int w, int h) { +void OSystem_X11::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) { uint8 *dst; if (y < 0) { @@ -586,12 +586,12 @@ void OSystem_X11::move_screen(int dx, int dy, int height) { // move down // copy from bottom to top for (int y = height - 1; y >= dy; y--) - copy_rect(local_fb + fb_width * (y - dy), fb_width, 0, y, fb_width, 1); + copyRectToScreen(local_fb + fb_width * (y - dy), fb_width, 0, y, fb_width, 1); } else { // move up // copy from top to bottom for (int y = 0; y < height + dx; y++) - copy_rect(local_fb + fb_width * (y - dy), fb_width, 0, y, fb_width, 1); + copyRectToScreen(local_fb + fb_width * (y - dy), fb_width, 0, y, fb_width, 1); } } else if (dy == 0) { // horizontal movement @@ -599,12 +599,12 @@ void OSystem_X11::move_screen(int dx, int dy, int height) { // move right // copy from right to left for (int x = fb_width - 1; x >= dx; x--) - copy_rect(local_fb + x - dx, fb_width, x, 0, 1, height); + copyRectToScreen(local_fb + x - dx, fb_width, x, 0, 1, height); } else { // move left // copy from left to right for (int x = 0; x < fb_width; x++) - copy_rect(local_fb + x - dx, fb_width, x, 0, 1, height); + copyRectToScreen(local_fb + x - dx, fb_width, x, 0, 1, height); } } else { // free movement @@ -697,7 +697,7 @@ void OSystem_X11::updateScreen() { } } -bool OSystem_X11::show_mouse(bool visible) +bool OSystem_X11::showMouse(bool visible) { if (_mouse_visible == visible) return visible; @@ -804,11 +804,11 @@ void OSystem_X11::set_mouse_pos(int x, int y) { } } -void OSystem_X11::warp_mouse(int x, int y) { +void OSystem_X11::warpMouse(int x, int y) { set_mouse_pos(x, y); } -void OSystem_X11::set_mouse_cursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y) { +void OSystem_X11::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y) { cur_state.w = w; cur_state.h = h; cur_state.hot_x = hotspot_x; @@ -1095,16 +1095,16 @@ void OSystem_X11::deleteMutex(MutexRef mutex) { free(mutex); } -void OSystem_X11::show_overlay() { +void OSystem_X11::showOverlay() { _overlay_visible = true; } -void OSystem_X11::hide_overlay() { +void OSystem_X11::hideOverlay() { _overlay_visible = false; _palette_changed = true; // This is to force a full redraw to hide the overlay } -void OSystem_X11::clear_overlay() { +void OSystem_X11::clearOverlay() { if (_overlay_visible == false) return; dirty_square d = { 0, 0, fb_width, fb_height }; @@ -1112,7 +1112,7 @@ void OSystem_X11::clear_overlay() { blit_convert(&d, local_fb_overlay, fb_width); } -void OSystem_X11::grab_overlay(int16 *dest, int pitch) { +void OSystem_X11::grabOverlay(int16 *dest, int pitch) { if (_overlay_visible == false) return; @@ -1120,7 +1120,7 @@ void OSystem_X11::grab_overlay(int16 *dest, int pitch) { blit_convert(&d, (uint16 *) dest, pitch); } -void OSystem_X11::copy_rect_overlay(const int16 *src, int pitch, int x, int y, int w, int h) { +void OSystem_X11::copyRectToOverlay(const int16 *src, int pitch, int x, int y, int w, int h) { if (_overlay_visible == false) return; uint16 *dst = local_fb_overlay + x + (y * fb_width); diff --git a/base/main.cpp b/base/main.cpp index 80a762e722..8b51db65bb 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -188,7 +188,7 @@ static int launcherDialog(GameDetector &detector, OSystem *system) { // FIXME - mouse cursors are currently always set via 8 bit data. // Thus for now we need to setup a dummy palette. On the long run, we might - // want to add a set_mouse_cursor_overlay() method to OSystem, which would serve + // want to add a setMouseCursor_overlay() method to OSystem, which would serve // two purposes: // 1) allow for 16 bit mouse cursors in overlay mode // 2) no need to backup & restore the mouse cursor before/after the overlay is shown diff --git a/common/system.h b/common/system.h index a67b2b39a9..8f9b5a7464 100644 --- a/common/system.h +++ b/common/system.h @@ -260,7 +260,7 @@ public: * flicker. * @see updateScreen */ - virtual void copy_rect(const byte *buf, int pitch, int x, int y, int w, int h) = 0; + virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) = 0; /** Update the dirty areas of the screen. */ virtual void updateScreen() = 0; @@ -284,7 +284,7 @@ public: * (always positive) offset. The area at the bottom of the screen which is moved * into view by this is filled by black. This does not cause any graphic data to * be lost - that is, to restore the original view, the game engine only has to - * call this method again with a 0 offset. No calls to copy_rect are necessary. + * call this method again with a 0 offset. No calls to copyRectToScreen are necessary. * @param shakeOffset the shake offset * * @todo This is a rather special screen effect, only used by the SCUMM @@ -299,13 +299,13 @@ public: /** @name Overlay */ //@{ - virtual void show_overlay() = 0; - virtual void hide_overlay() = 0; - virtual void clear_overlay() = 0; - virtual void grab_overlay(OverlayColor *buf, int pitch) = 0; - virtual void copy_rect_overlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) = 0; - virtual int16 get_overlay_height() { return getHeight(); } - virtual int16 get_overlay_width() { return getWidth(); } + virtual void showOverlay() = 0; + virtual void hideOverlay() = 0; + virtual void clearOverlay() = 0; + virtual void grabOverlay(OverlayColor *buf, int pitch) = 0; + virtual void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) = 0; + virtual int16 getOverlayHeight() { return getHeight(); } + virtual int16 getOverlayWidth() { return getWidth(); } /** * Convert the given RGB triplet into an OverlayColor. A OverlayColor can @@ -339,7 +339,7 @@ public: //@{ /** Show or hide the mouse cursor. */ - virtual bool show_mouse(bool visible) = 0; + virtual bool showMouse(bool visible) = 0; /** * Move ("warp") the mouse cursor to the specified position in virtual @@ -347,7 +347,7 @@ public: * @param x the new x position of the mouse * @param y the new x position of the mouse */ - virtual void warp_mouse(int x, int y) = 0; + virtual void warpMouse(int x, int y) = 0; /** * Set the bitmap used for drawing the cursor. @@ -358,7 +358,7 @@ public: * @param hotspotX horizontal offset from the left side to the hotspot * @param hotspotY vertical offset from the top side to the hotspot */ - virtual void set_mouse_cursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY) = 0; + virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY) = 0; //@} diff --git a/graphics/animation.cpp b/graphics/animation.cpp index 79a0aad0d2..7d8cc1d920 100644 --- a/graphics/animation.cpp +++ b/graphics/animation.cpp @@ -38,7 +38,7 @@ BaseAnimationState::~BaseAnimationState() { delete mpgfile; delete sndfile; #ifndef BACKEND_8BIT - _sys->hide_overlay(); + _sys->hideOverlay(); free(overlay); #endif if (bgSoundStream) @@ -108,7 +108,7 @@ bool BaseAnimationState::init(const char *name) { #else buildLookup(); overlay = (OverlayColor*)calloc(MOVIE_WIDTH * MOVIE_HEIGHT, sizeof(OverlayColor)); - _sys->show_overlay(); + _sys->showOverlay(); #endif // Open MPEG2 stream diff --git a/gui/console.cpp b/gui/console.cpp index a97dec3d86..e420253a00 100644 --- a/gui/console.cpp +++ b/gui/console.cpp @@ -80,10 +80,10 @@ ConsoleDialog::ConsoleDialog(float widthPercent, float heightPercent) void ConsoleDialog::reflowLayout() { // Calculate the real width/height (rounded to char/line multiples) - _w = (uint16)(_widthPercent * g_system->get_overlay_width()); -// _w = (_widthPercent * g_system->get_overlay_width() - kScrollBarWidth - 2) / kCharWidth; + _w = (uint16)(_widthPercent * g_system->getOverlayWidth()); +// _w = (_widthPercent * g_system->getOverlayWidth() - kScrollBarWidth - 2) / kCharWidth; // _w = _w * kCharWidth + kScrollBarWidth + 2; - _h = (uint16)((_heightPercent * g_system->get_overlay_height() - 2) / kLineHeight); + _h = (uint16)((_heightPercent * g_system->getOverlayHeight() - 2) / kLineHeight); _h = _h * kLineHeight + 2; // Calculate depending values diff --git a/gui/newgui.cpp b/gui/newgui.cpp index af59489e56..524f029cc2 100644 --- a/gui/newgui.cpp +++ b/gui/newgui.cpp @@ -91,8 +91,8 @@ void NewGui::runLoop() { if (_needRedraw) { // Restore the overlay to its initial state, then draw all dialogs. // This is necessary to get the blending right. - _system->clear_overlay(); - _system->grab_overlay((OverlayColor *)_screen.pixels, _screenPitch); + _system->clearOverlay(); + _system->grabOverlay((OverlayColor *)_screen.pixels, _screenPitch); for (int i = 0; i < _dialogStack.size(); i++) _dialogStack[i]->drawDialog(); _needRedraw = false; @@ -184,21 +184,21 @@ void NewGui::runLoop() { void NewGui::saveState() { // Backup old cursor - _oldCursorMode = _system->show_mouse(true); + _oldCursorMode = _system->showMouse(true); // Enable the overlay - _system->show_overlay(); + _system->showOverlay(); // Create a screen buffer for the overlay data, and fill it with // whatever is visible on the screen rught now. - _screen.h = _system->get_overlay_height(); - _screen.w = _system->get_overlay_width(); + _screen.h = _system->getOverlayHeight(); + _screen.w = _system->getOverlayWidth(); _screen.bytesPerPixel = sizeof(OverlayColor); _screen.pitch = _screen.w * _screen.bytesPerPixel; _screenPitch = _screen.w; _screen.pixels = (OverlayColor*)calloc(_screen.w * _screen.h, sizeof(OverlayColor)); - _system->grab_overlay((OverlayColor *)_screen.pixels, _screenPitch); + _system->grabOverlay((OverlayColor *)_screen.pixels, _screenPitch); _currentKeyDown.keycode = 0; _lastClick.x = _lastClick.y = 0; @@ -209,9 +209,9 @@ void NewGui::saveState() { } void NewGui::restoreState() { - _system->show_mouse(_oldCursorMode); + _system->showMouse(_oldCursorMode); - _system->hide_overlay(); + _system->hideOverlay(); if (_screen.pixels) { free(_screen.pixels); _screen.pixels = 0; @@ -357,7 +357,7 @@ void NewGui::addDirtyRect(int x, int y, int w, int h) { // blit the affected area directly to the overlay. At least for our current // GUI/widget/dialog code that is just fine. OverlayColor *buf = getBasePtr(x, y); - _system->copy_rect_overlay(buf, _screenPitch, x, y, w, h); + _system->copyRectToOverlay(buf, _screenPitch, x, y, w, h); } void NewGui::drawChar(byte chr, int xx, int yy, OverlayColor color) { @@ -439,7 +439,7 @@ void NewGui::animateCursor() { } } - _system->set_mouse_cursor(_cursor, 16, 16, 7, 7); + _system->setMouseCursor(_cursor, 16, 16, 7, 7); _cursorAnimateTimer = time; _cursorAnimateCounter = (_cursorAnimateCounter + 1) % 4; diff --git a/queen/display.cpp b/queen/display.cpp index 49599acd3a..f8051db821 100644 --- a/queen/display.cpp +++ b/queen/display.cpp @@ -599,7 +599,7 @@ void Display::update(bool dynalum, int16 dynaX, int16 dynaY) { } // _fullRefresh = 1; if (_fullRefresh) { - _system->copy_rect(_screenBuf, SCREEN_W, 0, 0, SCREEN_W, SCREEN_H); + _system->copyRectToScreen(_screenBuf, SCREEN_W, 0, 0, SCREEN_W, SCREEN_H); --_fullRefresh; if (_fullRefresh) { memset(_dirtyBlocks, 0, _dirtyBlocksWidth * _dirtyBlocksHeight); @@ -618,14 +618,14 @@ void Display::update(bool dynalum, int16 dynaX, int16 dynaY) { ++accW; } else if (accW != 0) { x = (i - accW) * D_BLOCK_W; - _system->copy_rect(scrBuf + x, SCREEN_W, x, j * D_BLOCK_H, accW * D_BLOCK_W, D_BLOCK_H); + _system->copyRectToScreen(scrBuf + x, SCREEN_W, x, j * D_BLOCK_H, accW * D_BLOCK_W, D_BLOCK_H); accW = 0; ++count; } } if (accW != 0) { x = (_dirtyBlocksWidth - accW) * D_BLOCK_W; - _system->copy_rect(scrBuf + x, SCREEN_W, x, j * D_BLOCK_H, accW * D_BLOCK_W, D_BLOCK_H); + _system->copyRectToScreen(scrBuf + x, SCREEN_W, x, j * D_BLOCK_H, accW * D_BLOCK_W, D_BLOCK_H); ++count; } dbBuf += _dirtyBlocksWidth; @@ -802,11 +802,11 @@ void Display::setMouseCursor(uint8 *buf, uint16 w, uint16 h) { } ++p; } - _system->set_mouse_cursor(_mousePtr, 14, 14, 1, 1); + _system->setMouseCursor(_mousePtr, 14, 14, 1, 1); } void Display::showMouseCursor(bool show) { - _system->show_mouse(show); + _system->showMouse(show); } void Display::initFont() { @@ -966,7 +966,7 @@ void Display::blankScreenEffect1() { const int inc[] = { -1, 1 }; x += inc[_rnd.getRandomNumber(1)]; y += inc[_rnd.getRandomNumber(1)]; - _system->copy_rect(buf, 32, x, y, 32, 32); + _system->copyRectToScreen(buf, 32, x, y, 32, 32); _system->updateScreen(); _vm->input()->delay(10); } @@ -999,7 +999,7 @@ void Display::blankScreenEffect2() { memset(p, c, 2); p += SCREEN_W; } - _system->copy_rect(buf, SCREEN_W, x, y, 2, 2); + _system->copyRectToScreen(buf, SCREEN_W, x, y, 2, 2); _system->updateScreen(); _vm->input()->delay(10); } @@ -1010,7 +1010,7 @@ void Display::blankScreenEffect3() { while (_vm->input()->idleTime() >= Input::DELAY_SCREEN_BLANKER) { if (i > 4000000) { memset(_screenBuf, 0, SCREEN_W * SCREEN_H); - _system->copy_rect(_screenBuf, SCREEN_W, 0, 0, SCREEN_W, SCREEN_H); + _system->copyRectToScreen(_screenBuf, SCREEN_W, 0, 0, SCREEN_W, SCREEN_H); } else { uint16 x = _rnd.getRandomNumber(SCREEN_W - 2); uint16 y = _rnd.getRandomNumber(SCREEN_H - 2); @@ -1027,7 +1027,7 @@ void Display::blankScreenEffect3() { p += SCREEN_W; } ++i; - _system->copy_rect(buf, SCREEN_W, x, y, 2, 2); + _system->copyRectToScreen(buf, SCREEN_W, x, y, 2, 2); } _system->updateScreen(); _vm->input()->delay(10); diff --git a/scumm/cursor.cpp b/scumm/cursor.cpp index cfac7aaad7..b2c6f29676 100644 --- a/scumm/cursor.cpp +++ b/scumm/cursor.cpp @@ -168,7 +168,7 @@ void ScummEngine::setCursorHotspot(int x, int y) { } void ScummEngine::updateCursor() { - _system->set_mouse_cursor(_grabbedCursor, _cursor.width, _cursor.height, + _system->setMouseCursor(_grabbedCursor, _cursor.width, _cursor.height, _cursor.hotspotX, _cursor.hotspotY); } diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index 8d4295e9e2..75275c485e 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -408,7 +408,7 @@ void Gdi::drawStripToScreen(VirtScreen *vs, int x, int width, int top, int botto // We don't clip height and width here, rather we rely on the backend to // perform any needed clipping. ptr = vs->screenPtr + (x + vs->xstart) + top * vs->width; - _vm->_system->copy_rect(ptr, vs->width, x, vs->topline + top - _vm->_screenTop, width, height); + _vm->_system->copyRectToScreen(ptr, vs->width, x, vs->topline + top - _vm->_screenTop, width, height); } #pragma mark - @@ -2548,7 +2548,7 @@ void ScummEngine::dissolveEffect(int width, int height) { for (i = 0; i < w * h; i++) { x = offsets[i] % vs->width; y = offsets[i] / vs->width; - _system->copy_rect(vs->screenPtr + vs->xstart + y * vs->width + x, vs->width, x, y + vs->topline, width, height); + _system->copyRectToScreen(vs->screenPtr + vs->xstart + y * vs->width + x, vs->width, x, y + vs->topline, width, height); if (++blits >= blits_before_refresh) { blits = 0; @@ -2584,7 +2584,7 @@ void ScummEngine::scrollEffect(int dir) { y = 1 + step; while (y < vs->height) { _system->move_screen(0, -step, vs->height); - _system->copy_rect(vs->screenPtr + vs->xstart + (y - step) * vs->width, + _system->copyRectToScreen(vs->screenPtr + vs->xstart + (y - step) * vs->width, vs->width, 0, vs->height - step, vs->width, step); @@ -2599,7 +2599,7 @@ void ScummEngine::scrollEffect(int dir) { y = 1 + step; while (y < vs->height) { _system->move_screen(0, step, vs->height); - _system->copy_rect(vs->screenPtr + vs->xstart + vs->width * (vs->height-y), + _system->copyRectToScreen(vs->screenPtr + vs->xstart + vs->width * (vs->height-y), vs->width, 0, 0, vs->width, step); @@ -2614,7 +2614,7 @@ void ScummEngine::scrollEffect(int dir) { x = 1 + step; while (x < vs->width) { _system->move_screen(-step, 0, vs->height); - _system->copy_rect(vs->screenPtr + vs->xstart + x - step, + _system->copyRectToScreen(vs->screenPtr + vs->xstart + x - step, vs->width, vs->width - step, 0, step, vs->height); @@ -2629,7 +2629,7 @@ void ScummEngine::scrollEffect(int dir) { x = 1 + step; while (x < vs->width) { _system->move_screen(step, 0, vs->height); - _system->copy_rect(vs->screenPtr + vs->xstart + vs->width - x, + _system->copyRectToScreen(vs->screenPtr + vs->xstart + vs->width - x, vs->width, 0, 0, step, vs->height); diff --git a/scumm/insane/insane.cpp b/scumm/insane/insane.cpp index 82fbd9b14d..7914433f11 100644 --- a/scumm/insane/insane.cpp +++ b/scumm/insane/insane.cpp @@ -619,7 +619,7 @@ void Insane::startVideo(const char *filename, int num, int argC, int frameRate, } void Insane::smush_warpMouse(int x, int y, int buttons) { - _vm->_system->warp_mouse(x, y); + _vm->_system->warpMouse(x, y); } void Insane::putActors(void) { diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp index 4171b63eb1..6ec5243d11 100644 --- a/scumm/saveload.cpp +++ b/scumm/saveload.cpp @@ -644,7 +644,7 @@ void ScummEngine::saveOrLoad(Serializer *s, uint32 savegameVersion) { if (s->isLoading() && savegameVersion >= VER(20)) { updateCursor(); - _system->warp_mouse(_mouse.x, _mouse.y); + _system->warpMouse(_mouse.x, _mouse.y); } s->saveLoadArrayOf(_actors, _numActors, sizeof(_actors[0]), actorEntries); diff --git a/scumm/script_v8.cpp b/scumm/script_v8.cpp index 4b0d0624b5..9c32b6e9ad 100644 --- a/scumm/script_v8.cpp +++ b/scumm/script_v8.cpp @@ -779,7 +779,7 @@ void ScummEngine_v8::o8_cursorCommand() { int y = pop(); int x = pop(); - _system->warp_mouse(x, y); + _system->warpMouse(x, y); } break; default: diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index 26fa409543..bc80c0b198 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -1587,7 +1587,7 @@ load_game: animateCursor(); /* show or hide mouse */ - _system->show_mouse(_cursor.state > 0); + _system->showMouse(_cursor.state > 0); if (VAR_TIMER != 0xFF) VAR(VAR_TIMER) = 0; diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp index fd6d0fea3f..6ebbfbe4ae 100644 --- a/scumm/smush/smush_player.cpp +++ b/scumm/smush/smush_player.cpp @@ -966,7 +966,7 @@ void SmushPlayer::updateScreen() { #endif uint32 end_time, start_time = _vm->_system->get_msecs(); - _vm->_system->copy_rect(_dst, _width, 0, 0, _width, _height); + _vm->_system->copyRectToScreen(_dst, _width, 0, 0, _width, _height); _updateNeeded = true; end_time = _vm->_system->get_msecs(); debug(4, "Smush stats: updateScreen( %03d )", end_time - start_time); @@ -1026,7 +1026,7 @@ void SmushPlayer::play(const char *filename, const char *directory, int32 offset _updateNeeded = false; // Hide mouse - bool oldMouseState = _vm->_system->show_mouse(false); + bool oldMouseState = _vm->_system->showMouse(false); // Load the video setupAnim(filename, directory); @@ -1065,7 +1065,7 @@ void SmushPlayer::play(const char *filename, const char *directory, int32 offset deinit(); // Reset mouse state - _vm->_system->show_mouse(oldMouseState); + _vm->_system->showMouse(oldMouseState); } } // End of namespace Scumm diff --git a/simon/simon.cpp b/simon/simon.cpp index 04bd9b8c10..bfd39a72b9 100644 --- a/simon/simon.cpp +++ b/simon/simon.cpp @@ -1548,11 +1548,11 @@ void SimonEngine::handle_mouse_moved() { uint x; if (_lock_counter) { - _system->show_mouse(false); + _system->showMouse(false); return; } - _system->show_mouse(true); + _system->showMouse(true); pollMouseXY(); if (_mouse_x >= 32768) @@ -3764,9 +3764,9 @@ static const byte _simon2_cursors[10][256] = { void SimonEngine::draw_mouse_pointer() { if (_game & GF_SIMON2) - _system->set_mouse_cursor(_simon2_cursors[_mouse_cursor], 16, 16, 7, 7); + _system->setMouseCursor(_simon2_cursors[_mouse_cursor], 16, 16, 7, 7); else - _system->set_mouse_cursor(_simon1_cursor, 16, 16, 0, 0); + _system->setMouseCursor(_simon1_cursor, 16, 16, 0, 0); } // Thanks to Stuart Caie for providing the original @@ -4434,7 +4434,7 @@ void SimonEngine::dx_copy_rgn_from_3_to_2(uint b, uint r, uint y, uint x) { void SimonEngine::dx_clear_surfaces(uint num_lines) { memset(_sdl_buf_attached, 0, num_lines * 320); - _system->copy_rect(_sdl_buf_attached, 320, 0, 0, 320, 200); + _system->copyRectToScreen(_sdl_buf_attached, 320, 0, 0, 320, 200); if (_dx_use_3_or_4_for_lock) { memset(_sdl_buf, 0, num_lines * 320); @@ -4485,7 +4485,7 @@ void SimonEngine::dx_update_screen_and_palette() { } } - _system->copy_rect(_sdl_buf_attached, 320, 0, 0, 320, 200); + _system->copyRectToScreen(_sdl_buf_attached, 320, 0, 0, 320, 200); _system->updateScreen(); memcpy(_sdl_buf_attached, _sdl_buf, 320 * 200); diff --git a/sky/control.cpp b/sky/control.cpp index afd4c96162..8afbc5ebcf 100644 --- a/sky/control.cpp +++ b/sky/control.cpp @@ -82,7 +82,7 @@ void ConResource::drawToScreen(bool doMask) { spriteData += _spriteData->s_width; } } - _system->copy_rect(updatePos, GAME_SCREEN_WIDTH, _x, _y, _spriteData->s_width, _spriteData->s_height); + _system->copyRectToScreen(updatePos, GAME_SCREEN_WIDTH, _x, _y, _spriteData->s_width, _spriteData->s_height); } TextResource::TextResource(void *pSpData, uint32 pNSprites, uint32 pCurSprite, uint16 pX, uint16 pY, uint32 pText, uint8 pOnClick, OSystem *system, uint8 *screen) : @@ -121,7 +121,7 @@ void TextResource::drawToScreen(bool doMask) { cpHeight = PAN_CHAR_HEIGHT; for (cnty = 0; cnty < cpHeight; cnty++) memcpy(_screen + (cnty + _oldY) * GAME_SCREEN_WIDTH + _oldX, _oldScreen + cnty * PAN_LINE_WIDTH, cpWidth); - _system->copy_rect(_screen + _oldY * GAME_SCREEN_WIDTH + _oldX, GAME_SCREEN_WIDTH, _oldX, _oldY, cpWidth, PAN_CHAR_HEIGHT); + _system->copyRectToScreen(_screen + _oldY * GAME_SCREEN_WIDTH + _oldX, GAME_SCREEN_WIDTH, _oldX, _oldY, cpWidth, PAN_CHAR_HEIGHT); } if (!_spriteData) { _oldX = GAME_SCREEN_WIDTH; @@ -145,7 +145,7 @@ void TextResource::drawToScreen(bool doMask) { copyDest += PAN_LINE_WIDTH; screenPos += GAME_SCREEN_WIDTH; } - _system->copy_rect(_screen + _y * GAME_SCREEN_WIDTH + _x, GAME_SCREEN_WIDTH, _x, _y, cpWidth, cpHeight); + _system->copyRectToScreen(_screen + _y * GAME_SCREEN_WIDTH + _x, GAME_SCREEN_WIDTH, _x, _y, cpWidth, cpHeight); } ControlStatus::ControlStatus(Text *skyText, OSystem *system, uint8 *scrBuf) { @@ -367,7 +367,7 @@ void Control::drawCross(uint16 x, uint16 y) { crossPos += CROSS_SZ_X; } bufPos = _screenBuf + y * GAME_SCREEN_WIDTH + x; - _system->copy_rect(bufPos, GAME_SCREEN_WIDTH, x, y, CROSS_SZ_X, CROSS_SZ_Y); + _system->copyRectToScreen(bufPos, GAME_SCREEN_WIDTH, x, y, CROSS_SZ_X, CROSS_SZ_Y); _text->drawToScreen(WITH_MASK); } @@ -391,7 +391,7 @@ void Control::animClick(ConResource *pButton) { void Control::drawMainPanel(void) { memset(_screenBuf, 0, GAME_SCREEN_WIDTH * FULL_SCREEN_HEIGHT); - _system->copy_rect(_screenBuf, GAME_SCREEN_WIDTH, 0, 0, GAME_SCREEN_WIDTH, FULL_SCREEN_HEIGHT); + _system->copyRectToScreen(_screenBuf, GAME_SCREEN_WIDTH, 0, 0, GAME_SCREEN_WIDTH, FULL_SCREEN_HEIGHT); _controlPanel->drawToScreen(NO_MASK); _exitButton->drawToScreen(NO_MASK); _savePanButton->drawToScreen(NO_MASK); @@ -430,7 +430,7 @@ void Control::doLoadSavePanel(void) { saveRestorePanel(false); memset(_screenBuf, 0, GAME_SCREEN_WIDTH * FULL_SCREEN_HEIGHT); - _system->copy_rect(_screenBuf, GAME_SCREEN_WIDTH, 0, 0, GAME_SCREEN_WIDTH, FULL_SCREEN_HEIGHT); + _system->copyRectToScreen(_screenBuf, GAME_SCREEN_WIDTH, 0, 0, GAME_SCREEN_WIDTH, FULL_SCREEN_HEIGHT); _system->updateScreen(); _skyScreen->forceRefresh(); _skyScreen->setPaletteEndian((uint8 *)SkyEngine::fetchCompact(SkyEngine::_systemVars.currentPalette)); @@ -496,7 +496,7 @@ void Control::doControlPanel(void) { } memset(_screenBuf, 0, GAME_SCREEN_WIDTH * FULL_SCREEN_HEIGHT); - _system->copy_rect(_screenBuf, GAME_SCREEN_WIDTH, 0, 0, GAME_SCREEN_WIDTH, FULL_SCREEN_HEIGHT); + _system->copyRectToScreen(_screenBuf, GAME_SCREEN_WIDTH, 0, 0, GAME_SCREEN_WIDTH, FULL_SCREEN_HEIGHT); _system->updateScreen(); _skyScreen->forceRefresh(); _skyScreen->setPaletteEndian((uint8 *)SkyEngine::fetchCompact(SkyEngine::_systemVars.currentPalette)); @@ -992,7 +992,7 @@ void Control::showSprites(dataFileHeader **nameSprites, bool allowSave) { drawResource->setXY(GAME_NAME_X + _enteredTextWidth + 1, GAME_NAME_Y + cnt * PAN_CHAR_HEIGHT + 4); drawResource->drawToScreen(WITH_MASK); } - _system->copy_rect(_screenBuf + (GAME_NAME_Y + cnt * PAN_CHAR_HEIGHT) * GAME_SCREEN_WIDTH + GAME_NAME_X, GAME_SCREEN_WIDTH, GAME_NAME_X, GAME_NAME_Y + cnt * PAN_CHAR_HEIGHT, PAN_LINE_WIDTH, PAN_CHAR_HEIGHT); + _system->copyRectToScreen(_screenBuf + (GAME_NAME_Y + cnt * PAN_CHAR_HEIGHT) * GAME_SCREEN_WIDTH + GAME_NAME_X, GAME_SCREEN_WIDTH, GAME_NAME_X, GAME_NAME_Y + cnt * PAN_CHAR_HEIGHT, PAN_LINE_WIDTH, PAN_CHAR_HEIGHT); } else drawResource->drawToScreen(NO_MASK); } @@ -1546,7 +1546,7 @@ uint16 Control::quickXRestore(uint16 slot) { _savedCharSet = _skyText->giveCurrentCharSet(); _skyText->fnSetFont(0); - _system->copy_rect(_screenBuf, GAME_SCREEN_WIDTH, 0, 0, FULL_SCREEN_WIDTH, FULL_SCREEN_HEIGHT); + _system->copyRectToScreen(_screenBuf, GAME_SCREEN_WIDTH, 0, 0, FULL_SCREEN_WIDTH, FULL_SCREEN_HEIGHT); _system->updateScreen(); if (SkyEngine::_systemVars.gameVersion < 331) @@ -1570,7 +1570,7 @@ uint16 Control::quickXRestore(uint16 slot) { _skyScreen->setPaletteEndian((uint8 *)SkyEngine::fetchCompact(SkyEngine::_systemVars.currentPalette)); } else { memset(_screenBuf, 0, FULL_SCREEN_WIDTH * FULL_SCREEN_HEIGHT); - _system->copy_rect(_screenBuf, GAME_SCREEN_WIDTH, 0, 0, GAME_SCREEN_WIDTH, FULL_SCREEN_HEIGHT); + _system->copyRectToScreen(_screenBuf, GAME_SCREEN_WIDTH, 0, 0, GAME_SCREEN_WIDTH, FULL_SCREEN_HEIGHT); _system->updateScreen(); _skyScreen->showScreen(_skyScreen->giveCurrent()); _skyScreen->setPalette(60111); diff --git a/sky/intro.cpp b/sky/intro.cpp index a9628905f5..2850663755 100644 --- a/sky/intro.cpp +++ b/sky/intro.cpp @@ -792,7 +792,7 @@ bool Intro::floppyScrollFlirt(void) { vgaPtr += nrToDo; } while (nrToDo == 255); } - _system->copy_rect(scrollPos, GAME_SCREEN_WIDTH, 0, 0, GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT); + _system->copyRectToScreen(scrollPos, GAME_SCREEN_WIDTH, 0, 0, GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT); _system->updateScreen(); #ifndef _WIN32_WCE if (!escDelay(40)) @@ -868,7 +868,7 @@ void Intro::showTextBuf(void) { saveBuf += width; } screenBuf = _skyScreen->giveCurrent() + y * GAME_SCREEN_WIDTH + x; - _system->copy_rect(screenBuf, GAME_SCREEN_WIDTH, x, y, width, height); + _system->copyRectToScreen(screenBuf, GAME_SCREEN_WIDTH, x, y, width, height); } void Intro::restoreScreen(void) { @@ -884,7 +884,7 @@ void Intro::restoreScreen(void) { screenBuf += GAME_SCREEN_WIDTH; saveBuf += width; } - _system->copy_rect(_saveBuf + sizeof(dataFileHeader), width, x, y, width, height); + _system->copyRectToScreen(_saveBuf + sizeof(dataFileHeader), width, x, y, width, height); } bool Intro::escDelay(uint32 msecs) { diff --git a/sky/mouse.cpp b/sky/mouse.cpp index b417b99b85..71271cf61e 100644 --- a/sky/mouse.cpp +++ b/sky/mouse.cpp @@ -120,7 +120,7 @@ bool Mouse::fnAddHuman(void) { if (_mouseY < 2) //stop mouse activating top line _mouseY = 2; - _system->warp_mouse(_mouseX, _mouseY); + _system->warpMouse(_mouseX, _mouseY); //force the pointer engine into running a get-off //even if it's over nothing @@ -207,9 +207,9 @@ void Mouse::spriteMouse(uint16 frameNum, uint8 mouseX, uint8 mouseY) { uint16 mouseWidth = ((struct dataFileHeader *)_miceData)->s_width; uint16 mouseHeight = ((struct dataFileHeader *)_miceData)->s_height; - _system->set_mouse_cursor(newCursor, mouseWidth, mouseHeight, mouseX, mouseY); - if (frameNum == MOUSE_BLANK) _system->show_mouse(false); - else _system->show_mouse(true); + _system->setMouseCursor(newCursor, mouseWidth, mouseHeight, mouseX, mouseY); + if (frameNum == MOUSE_BLANK) _system->showMouse(false); + else _system->showMouse(true); } void Mouse::mouseEngine(uint16 mouseX, uint16 mouseY) { diff --git a/sky/screen.cpp b/sky/screen.cpp index 3a873dac0f..2623f21dbb 100644 --- a/sky/screen.cpp +++ b/sky/screen.cpp @@ -93,7 +93,7 @@ Screen::~Screen(void) { void Screen::clearScreen(void) { memset(_currentScreen, 0, FULL_SCREEN_WIDTH * FULL_SCREEN_HEIGHT); - _system->copy_rect(_currentScreen, GAME_SCREEN_WIDTH, 0, 0, GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT); + _system->copyRectToScreen(_currentScreen, GAME_SCREEN_WIDTH, 0, 0, GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT); _system->updateScreen(); } @@ -151,7 +151,7 @@ void Screen::showScreen(uint16 fileNum) { void Screen::showScreen(uint8 *pScreen) { - _system->copy_rect(pScreen, 320, 0, 0, GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT); + _system->copyRectToScreen(pScreen, 320, 0, 0, GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT); _system->updateScreen(); } @@ -211,12 +211,12 @@ void Screen::flip(bool doUpdate) { if (!copyWidth) copyX = cntx * GRID_W; copyWidth += GRID_W; } else if (copyWidth) { - _system->copy_rect(_currentScreen + cnty * GRID_H * GAME_SCREEN_WIDTH + copyX, GAME_SCREEN_WIDTH, copyX, cnty * GRID_H, copyWidth, GRID_H); + _system->copyRectToScreen(_currentScreen + cnty * GRID_H * GAME_SCREEN_WIDTH + copyX, GAME_SCREEN_WIDTH, copyX, cnty * GRID_H, copyWidth, GRID_H); copyWidth = 0; } } if (copyWidth) { - _system->copy_rect(_currentScreen + cnty * GRID_H * GAME_SCREEN_WIDTH + copyX, GAME_SCREEN_WIDTH, copyX, cnty * GRID_H, copyWidth, GRID_H); + _system->copyRectToScreen(_currentScreen + cnty * GRID_H * GAME_SCREEN_WIDTH + copyX, GAME_SCREEN_WIDTH, copyX, cnty * GRID_H, copyWidth, GRID_H); copyWidth = 0; } } @@ -470,14 +470,14 @@ void Screen::processSequence(void) { } rectWid++; } else if (rectWid) { - _system->copy_rect(rectPtr, GAME_SCREEN_WIDTH, rectX << 4, rectY << 4, rectWid << 4, 16); + _system->copyRectToScreen(rectPtr, GAME_SCREEN_WIDTH, rectX << 4, rectY << 4, rectWid << 4, 16); rectWid = 0; } scrPtr += 16; gridPtr++; } if (rectWid) { - _system->copy_rect(rectPtr, GAME_SCREEN_WIDTH, rectX << 4, rectY << 4, rectWid << 4, 16); + _system->copyRectToScreen(rectPtr, GAME_SCREEN_WIDTH, rectX << 4, rectY << 4, rectWid << 4, 16); rectWid = 0; } scrPtr += 15 * GAME_SCREEN_WIDTH; @@ -781,7 +781,7 @@ void Screen::showGrid(uint8 *gridBuf) { gridData <<= 1; } } - _system->copy_rect(_currentScreen, GAME_SCREEN_WIDTH, 0, 0, GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT); + _system->copyRectToScreen(_currentScreen, GAME_SCREEN_WIDTH, 0, 0, GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT); } diff --git a/sword1/animation.cpp b/sword1/animation.cpp index fa1c91bf45..a0962f0237 100644 --- a/sword1/animation.cpp +++ b/sword1/animation.cpp @@ -48,7 +48,7 @@ void AnimationState::drawYUV(int width, int height, byte *const *dat) { _scr->plotYUV(lut, width, height, dat); #else plotYUV(lookup, width, height, dat); - _sys->copy_rect_overlay(overlay, MOVIE_WIDTH, 0, 40, MOVIE_WIDTH, MOVIE_HEIGHT); + _sys->copyRectToOverlay(overlay, MOVIE_WIDTH, 0, 40, MOVIE_WIDTH, MOVIE_HEIGHT); #endif } diff --git a/sword1/control.cpp b/sword1/control.cpp index 60e886df3f..7f4b6b49f3 100644 --- a/sword1/control.cpp +++ b/sword1/control.cpp @@ -141,7 +141,7 @@ void ControlButton::draw(void) { dst += SCREEN_WIDTH; src += FROM_LE_16(fHead->width); } - _system->copy_rect(_dstBuf, SCREEN_WIDTH, _x, _y, _width, _height); + _system->copyRectToScreen(_dstBuf, SCREEN_WIDTH, _x, _y, _width, _height); } bool ControlButton::wasClicked(uint16 mouseX, uint16 mouseY) { @@ -197,7 +197,7 @@ void Control::askForCd(void) { memset(_screenBuf, 0, 640 * 480); renderText(textA, 320, 220, TEXT_CENTER); renderText(_lStrings[STR_INSERT_CD_B], 320, 240, TEXT_CENTER); - _system->copy_rect(_screenBuf, 640, 0, 0, 640, 480); + _system->copyRectToScreen(_screenBuf, 640, 0, 0, 640, 480); _system->updateScreen(); } delay(300); @@ -206,7 +206,7 @@ void Control::askForCd(void) { if (!test.isOpen()) { memset(_screenBuf, 0, 640 * 480); renderText(_lStrings[STR_INCORRECT_CD], 320, 230, TEXT_CENTER); - _system->copy_rect(_screenBuf, 640, 0, 0, 640, 480); + _system->copyRectToScreen(_screenBuf, 640, 0, 0, 640, 480); _system->updateScreen(); delay(2000); refreshText = true; @@ -284,7 +284,7 @@ uint8 Control::runPanel(void) { } if (fullRefresh) { fullRefresh = false; - _system->copy_rect(_screenBuf, SCREEN_WIDTH, 0, 0, SCREEN_WIDTH, 480); + _system->copyRectToScreen(_screenBuf, SCREEN_WIDTH, 0, 0, SCREEN_WIDTH, 480); } _system->updateScreen(); delay(1000 / 12); @@ -294,7 +294,7 @@ uint8 Control::runPanel(void) { _resMan->resClose(fontId); _resMan->resClose(redFontId); memset(_screenBuf, 0, 640 * 480); - _system->copy_rect(_screenBuf, 640, 0, 0, 640, 480); + _system->copyRectToScreen(_screenBuf, 640, 0, 0, 640, 480); free(_screenBuf); _mouse->controlPanel(false); _music->startMusic(Logic::_scriptVars[CURRENT_MUSIC], 1); @@ -840,7 +840,7 @@ void Control::renderText(const uint8 *str, uint16 x, uint16 y, uint8 mode) { destX += FROM_LE_16(chSpr->width) - 3; str++; } - _system->copy_rect(_screenBuf + y * SCREEN_WIDTH + x, SCREEN_WIDTH, x, y, (destX - x) + 3, 28); + _system->copyRectToScreen(_screenBuf + y * SCREEN_WIDTH + x, SCREEN_WIDTH, x, y, (destX - x) + 3, 28); } void Control::renderVolumeBar(uint8 id, uint8 volL, uint8 volR) { @@ -857,7 +857,7 @@ void Control::renderVolumeBar(uint8 id, uint8 volL, uint8 volR) { srcMem += FROM_LE_16(frHead->width); destMem += SCREEN_WIDTH; } - _system->copy_rect(_screenBuf + destY * SCREEN_WIDTH + destX, SCREEN_WIDTH, destX, destY, FROM_LE_16(frHead->width), FROM_LE_16(frHead->height)); + _system->copyRectToScreen(_screenBuf + destY * SCREEN_WIDTH + destX, SCREEN_WIDTH, destX, destY, FROM_LE_16(frHead->width), FROM_LE_16(frHead->height)); _resMan->resClose(SR_VLIGHT); destX += 32; } diff --git a/sword1/mouse.cpp b/sword1/mouse.cpp index 2bdc969c2c..ae8ecaae21 100644 --- a/sword1/mouse.cpp +++ b/sword1/mouse.cpp @@ -52,7 +52,7 @@ void Mouse::initialize(void) { for (uint8 cnt = 0; cnt < 17; cnt++) // force res manager to keep mouse _resMan->resOpen(MSE_POINTER + cnt); // cursors in memory all the time - _system->show_mouse(false); + _system->showMouse(false); createPointer(0, 0); } @@ -240,11 +240,11 @@ void Mouse::setPointer(uint32 resId, uint32 rate) { createPointer(resId, _currentLuggageId); if ((resId == 0) || (!(Logic::_scriptVars[MOUSE_STATUS] & 1) && (!_mouseOverride))) { - _system->set_mouse_cursor(NULL, 0, 0, 0, 0); - _system->show_mouse(false); + _system->setMouseCursor(NULL, 0, 0, 0, 0); + _system->showMouse(false); } else { animate(); - _system->show_mouse(true); + _system->showMouse(true); } } @@ -259,7 +259,7 @@ void Mouse::animate(void) { _frame = (_frame + 1) % _currentPtr->numFrames; uint8 *ptrData = (uint8*)_currentPtr + sizeof(MousePtr); ptrData += _frame * _currentPtr->sizeX * _currentPtr->sizeY; - _system->set_mouse_cursor(ptrData, _currentPtr->sizeX, _currentPtr->sizeY, _currentPtr->hotSpotX, _currentPtr->hotSpotY); + _system->setMouseCursor(ptrData, _currentPtr->sizeX, _currentPtr->sizeY, _currentPtr->hotSpotX, _currentPtr->hotSpotY); } } diff --git a/sword1/screen.cpp b/sword1/screen.cpp index cc422bcd6c..c64551b88c 100644 --- a/sword1/screen.cpp +++ b/sword1/screen.cpp @@ -137,7 +137,7 @@ bool Screen::showScrollFrame(void) { uint16 avgScrlX = (uint16)(_oldScrollX + Logic::_scriptVars[SCROLL_OFFSET_X]) / 2; uint16 avgScrlY = (uint16)(_oldScrollY + Logic::_scriptVars[SCROLL_OFFSET_Y]) / 2; - _system->copy_rect(_screenBuf + avgScrlY * _scrnSizeX + avgScrlX, _scrnSizeX, 0, 40, SCREEN_WIDTH, SCREEN_DEPTH); + _system->copyRectToScreen(_screenBuf + avgScrlY * _scrnSizeX + avgScrlX, _scrnSizeX, 0, 40, SCREEN_WIDTH, SCREEN_DEPTH); _system->updateScreen(); return true; } @@ -165,7 +165,7 @@ void Screen::updateScreen(void) { copyWidth = _scrnSizeX - scrlX; if (scrlY + copyHeight > _scrnSizeY) copyHeight = _scrnSizeY - scrlY; - _system->copy_rect(_screenBuf + scrlY * _scrnSizeX + scrlX, _scrnSizeX, 0, 40, copyWidth, copyHeight); + _system->copyRectToScreen(_screenBuf + scrlY * _scrnSizeX + scrlX, _scrnSizeX, 0, 40, copyWidth, copyHeight); } else { // partial screen update only. The screen coordinates probably won't fit to the // grid holding the informations on which blocks have to be updated. @@ -188,14 +188,14 @@ void Screen::updateScreen(void) { int16 xPos = (cntx - cpWidth) * SCRNGRID_X - diffX; if (xPos < 0) xPos = 0; - _system->copy_rect(scrnBuf + xPos, _scrnSizeX, xPos, 40, cpWidth * SCRNGRID_X, diffY); + _system->copyRectToScreen(scrnBuf + xPos, _scrnSizeX, xPos, 40, cpWidth * SCRNGRID_X, diffY); cpWidth = 0; } if (cpWidth) { int16 xPos = (gridW - cpWidth) * SCRNGRID_X - diffX; if (xPos < 0) xPos = 0; - _system->copy_rect(scrnBuf + xPos, _scrnSizeX, xPos, 40, SCREEN_WIDTH - xPos, diffY); + _system->copyRectToScreen(scrnBuf + xPos, _scrnSizeX, xPos, 40, SCREEN_WIDTH - xPos, diffY); } scrlY += diffY; } @@ -211,14 +211,14 @@ void Screen::updateScreen(void) { cpHeight++; } else if (cpHeight) { uint16 yPos = (cnty - cpHeight) * SCRNGRID_Y; - _system->copy_rect(scrnBuf + yPos * _scrnSizeX, _scrnSizeX, 0, yPos + diffY + 40, diffX, cpHeight * SCRNGRID_Y); + _system->copyRectToScreen(scrnBuf + yPos * _scrnSizeX, _scrnSizeX, 0, yPos + diffY + 40, diffX, cpHeight * SCRNGRID_Y); cpHeight = 0; } gridPos += _gridSizeX; } if (cpHeight) { uint16 yPos = (gridH - cpHeight) * SCRNGRID_Y; - _system->copy_rect(scrnBuf + yPos * _scrnSizeX, _scrnSizeX, 0, yPos + diffY + 40, diffX, SCREEN_DEPTH - (yPos + diffY)); + _system->copyRectToScreen(scrnBuf + yPos * _scrnSizeX, _scrnSizeX, 0, yPos + diffY + 40, diffX, SCREEN_DEPTH - (yPos + diffY)); } scrlX += diffX; } @@ -235,12 +235,12 @@ void Screen::updateScreen(void) { gridPos[cntx] >>= 1; cpWidth++; } else if (cpWidth) { - _system->copy_rect(scrnBuf + (cntx - cpWidth) * SCRNGRID_X, _scrnSizeX, (cntx - cpWidth) * SCRNGRID_X + diffX, cnty * SCRNGRID_Y + diffY + 40, cpWidth * SCRNGRID_X, cpHeight); + _system->copyRectToScreen(scrnBuf + (cntx - cpWidth) * SCRNGRID_X, _scrnSizeX, (cntx - cpWidth) * SCRNGRID_X + diffX, cnty * SCRNGRID_Y + diffY + 40, cpWidth * SCRNGRID_X, cpHeight); cpWidth = 0; } if (cpWidth) { uint16 xPos = (gridW - cpWidth) * SCRNGRID_X; - _system->copy_rect(scrnBuf + xPos, _scrnSizeX, xPos + diffX, cnty * SCRNGRID_Y + diffY + 40, SCREEN_WIDTH - (xPos + diffX), cpHeight); + _system->copyRectToScreen(scrnBuf + xPos, _scrnSizeX, xPos + diffX, cnty * SCRNGRID_Y + diffY + 40, SCREEN_WIDTH - (xPos + diffX), cpHeight); } gridPos += _gridSizeX; scrnBuf += _scrnSizeX * SCRNGRID_Y; @@ -797,7 +797,7 @@ void Screen::showFrame(uint16 x, uint16 y, uint32 resId, uint32 frameNo, const b } } - _system->copy_rect(frame, 40, x, y, 40, 40); + _system->copyRectToScreen(frame, 40, x, y, 40, 40); } // ------------------- router debugging code -------------------------------- @@ -960,7 +960,7 @@ void Screen::plotYUV(byte *lut, int width, int height, byte *const *dat) { ypos += width; } - _system->copy_rect(buf, width, (640-width)/2, (480-height)/2, width, height); + _system->copyRectToScreen(buf, width, (640-width)/2, (480-height)/2, width, height); _system->updateScreen(); free(buf); diff --git a/sword1/sword1.cpp b/sword1/sword1.cpp index f5aff98db5..6fd61ad66f 100644 --- a/sword1/sword1.cpp +++ b/sword1/sword1.cpp @@ -170,7 +170,7 @@ void SwordEngine::reinitialize(void) { _logic->initialize(); // now reinitialize these objects as they (may) have locked _objectMan->initialize(); // resources which have just been wiped. _mouse->initialize(); - _system->warp_mouse(320, 240); + _system->warpMouse(320, 240); _systemVars.wantFade = true; } diff --git a/sword2/driver/_mouse.cpp b/sword2/driver/_mouse.cpp index 8cdb378aef..af0055dbca 100644 --- a/sword2/driver/_mouse.cpp +++ b/sword2/driver/_mouse.cpp @@ -168,7 +168,7 @@ void Graphics::drawMouse(void) { if (_mouseAnim) decompressMouse(_mouseData, _mouseSprite, _mouseAnim->mousew, _mouseAnim->mouseh, mouse_width); - _vm->_system->set_mouse_cursor(_mouseData, mouse_width, mouse_height, hotspot_x, hotspot_y); + _vm->_system->setMouseCursor(_mouseData, mouse_width, mouse_height, hotspot_x, hotspot_y); } /** @@ -222,12 +222,12 @@ int32 Graphics::setMouseAnim(uint8 *ma, int32 size, int32 mouseFlash) { animateMouse(); drawMouse(); - _vm->_system->show_mouse(true); + _vm->_system->showMouse(true); } else { if (_luggageAnim) drawMouse(); else - _vm->_system->show_mouse(false); + _vm->_system->showMouse(false); } return RD_OK; @@ -257,12 +257,12 @@ int32 Graphics::setLuggageAnim(uint8 *ma, int32 size) { animateMouse(); drawMouse(); - _vm->_system->show_mouse(true); + _vm->_system->showMouse(true); } else { if (_mouseAnim) drawMouse(); else - _vm->_system->show_mouse(false); + _vm->_system->showMouse(false); } return RD_OK; diff --git a/sword2/driver/animation.cpp b/sword2/driver/animation.cpp index 0b73a18b4c..9785ed2110 100644 --- a/sword2/driver/animation.cpp +++ b/sword2/driver/animation.cpp @@ -93,9 +93,9 @@ void AnimationState::updateScreen(void) { #ifdef BACKEND_8BIT byte *buf = _vm->_graphics->getScreen() + ((480 - MOVIE_HEIGHT) / 2) * RENDERWIDE + (640 - MOVIE_WIDTH) / 2; - _vm->_system->copy_rect(buf, MOVIE_WIDTH, (640 - MOVIE_WIDTH) / 2, (480 - MOVIE_HEIGHT) / 2, MOVIE_WIDTH, MOVIE_HEIGHT); + _vm->_system->copyRectToScreen(buf, MOVIE_WIDTH, (640 - MOVIE_WIDTH) / 2, (480 - MOVIE_HEIGHT) / 2, MOVIE_WIDTH, MOVIE_HEIGHT); #else - _sys->copy_rect_overlay(overlay, MOVIE_WIDTH, 0, 0, MOVIE_WIDTH, MOVIE_HEIGHT); + _sys->copyRectToOverlay(overlay, MOVIE_WIDTH, 0, 0, MOVIE_WIDTH, MOVIE_HEIGHT); #endif _vm->_system->updateScreen(); } diff --git a/sword2/driver/rdwin.cpp b/sword2/driver/rdwin.cpp index bc0ec79319..025b99b164 100644 --- a/sword2/driver/rdwin.cpp +++ b/sword2/driver/rdwin.cpp @@ -99,7 +99,7 @@ void Graphics::updateDisplay(bool redrawScene) { // Update the entire screen. This is necessary when // scrolling, fading, etc. - _vm->_system->copy_rect(_buffer + MENUDEEP * _screenWide, _screenWide, 0, MENUDEEP, _screenWide, _screenDeep - 2 * MENUDEEP); + _vm->_system->copyRectToScreen(_buffer + MENUDEEP * _screenWide, _screenWide, 0, MENUDEEP, _screenWide, _screenDeep - 2 * MENUDEEP); _needFullRedraw = false; } else { // Update only the dirty areas of the screen @@ -116,7 +116,7 @@ void Graphics::updateDisplay(bool redrawScene) { } else if (stripWide) { x = CELLWIDE * (j - stripWide); y = CELLDEEP * i; - _vm->_system->copy_rect(_buffer + y * _screenWide + x, _screenWide, x, y, stripWide * CELLWIDE, CELLDEEP); + _vm->_system->copyRectToScreen(_buffer + y * _screenWide + x, _screenWide, x, y, stripWide * CELLWIDE, CELLDEEP); stripWide = 0; } } @@ -124,7 +124,7 @@ void Graphics::updateDisplay(bool redrawScene) { if (stripWide) { x = CELLWIDE * (j - stripWide); y = CELLDEEP * i; - _vm->_system->copy_rect(_buffer + y * _screenWide + x, _screenWide, x, y, stripWide * CELLWIDE, CELLDEEP); + _vm->_system->copyRectToScreen(_buffer + y * _screenWide + x, _screenWide, x, y, stripWide * CELLWIDE, CELLDEEP); stripWide = 0; } } diff --git a/sword2/driver/render.cpp b/sword2/driver/render.cpp index ca53284333..3a235a0dbe 100644 --- a/sword2/driver/render.cpp +++ b/sword2/driver/render.cpp @@ -32,7 +32,7 @@ namespace Sword2 { #define BLOCKHBITS 6 void Graphics::updateRect(Common::Rect *r) { - _vm->_system->copy_rect(_buffer + r->top * _screenWide + r->left, + _vm->_system->copyRectToScreen(_buffer + r->top * _screenWide + r->left, _screenWide, r->left, r->top, r->right - r->left, r->bottom - r->top); } |