Renamed more OSystem methods

svn-id: r13410
This commit is contained in:
Max Horn 2004-03-28 16:30:50 +00:00
parent efb5f3777a
commit 14378cb56e
43 changed files with 258 additions and 258 deletions

View file

@ -28,7 +28,7 @@ typedef struct {
DECLARE(OSystem_PALMOS_update_screen__wide_portrait) DECLARE(OSystem_PALMOS_update_screen__wide_portrait)
DECLARE(OSystem_PALMOS_update_screen__wide_landscape) DECLARE(OSystem_PALMOS_update_screen__wide_landscape)
DECLARE(OSystem_PALMOS_copy_rect) DECLARE(OSystem_PALMOS_copyRectToScreen)
// rsrc // rsrc
#define ARMCODE_1 1000 #define ARMCODE_1 1000

View file

@ -31,7 +31,7 @@ unsigned long PNO_Main(const void *emulStateP, void *userData68KP, Call68KFuncTy
/* const PnoProc call[] = { /* const PnoProc call[] = {
(PnoProc)__ARMlet_Take_Func_Addr__(OSystem_PALMOS_update_screen__wide_portrait), (PnoProc)__ARMlet_Take_Func_Addr__(OSystem_PALMOS_update_screen__wide_portrait),
(PnoProc)__ARMlet_Take_Func_Addr__(OSystem_PALMOS_update_screen__wide_landscape), (PnoProc)__ARMlet_Take_Func_Addr__(OSystem_PALMOS_update_screen__wide_landscape),
//OSystem_PALMOS_copy_rect //OSystem_PALMOS_copyRectToScreen
}; };
*/ */
#ifndef WIN32 #ifndef WIN32

View file

@ -324,7 +324,7 @@ void OSystem_PALMOS::initSize(uint w, uint h) {
load_gfx_mode(); 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 */ /* Clip the coordinates */
if (x < 0) { if (x < 0) {
w += x; 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) if (_mouseVisible == visible)
return visible; return visible;
@ -689,7 +689,7 @@ bool OSystem_PALMOS::show_mouse(bool visible) {
return last; return last;
} }
void OSystem_PALMOS::warp_mouse(int x, int y) { void OSystem_PALMOS::warpMouse(int x, int y) {
set_mouse_pos(x, 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.w = w;
_mouseCurState.h = h; _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 // hide the mouse
undraw_mouse(); undraw_mouse();
// save background // save background
@ -1673,18 +1673,18 @@ void OSystem_PALMOS::show_overlay() {
} }
_overlayVisible = true; _overlayVisible = true;
clear_overlay(); clearOverlay();
} }
void OSystem_PALMOS::hide_overlay() { void OSystem_PALMOS::hideOverlay() {
// hide the mouse // hide the mouse
undraw_mouse(); undraw_mouse();
_overlayVisible = false; _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) if (!_overlayVisible)
return; return;
@ -1697,7 +1697,7 @@ void OSystem_PALMOS::clear_overlay() {
MemMove(_tmpScreenP, _tmpBackupP, _screenWidth * _screenHeight); MemMove(_tmpScreenP, _tmpBackupP, _screenWidth * _screenHeight);
} }
void OSystem_PALMOS::grab_overlay(byte *buf, int pitch) { void OSystem_PALMOS::grabOverlay(byte *buf, int pitch) {
if (!_overlayVisible) if (!_overlayVisible)
return; return;
@ -1714,7 +1714,7 @@ void OSystem_PALMOS::grab_overlay(byte *buf, int pitch) {
} while (--h); } 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) if (!_overlayVisible)
return; return;

View file

@ -54,7 +54,7 @@ public:
// Draw a bitmap to screen. // Draw a bitmap to screen.
// The screen will not be updated to reflect the new bitmap // 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 // Moves the screen content around by the given amount of pixels
// but only the top height pixel rows, the rest stays untouched // but only the top height pixel rows, the rest stays untouched
@ -64,7 +64,7 @@ public:
void updateScreen(); void updateScreen();
// Either show or hide the mouse cursor // Either show or hide the mouse cursor
bool show_mouse(bool visible); bool showMouse(bool visible);
// Set the position of the mouse cursor // Set the position of the mouse cursor
void set_mouse_pos(int x, int y); void set_mouse_pos(int x, int y);
@ -72,11 +72,11 @@ public:
// Warp the mouse cursor. Where set_mouse_pos() only informs the // Warp the mouse cursor. Where set_mouse_pos() only informs the
// backend of the mouse cursor's current position, this function // backend of the mouse cursor's current position, this function
// actually moves the cursor to the specified position. // 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. // 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. // Shaking is used in SCUMM. Set current shake position.
void set_shake_pos(int shake_pos); void set_shake_pos(int shake_pos);
@ -140,11 +140,11 @@ public:
UInt8 _quitCount; UInt8 _quitCount;
// Overlay // Overlay
void show_overlay(); void showOverlay();
void hide_overlay(); void hideOverlay();
void clear_overlay(); void clearOverlay();
void grab_overlay(byte *buf, int pitch); void grabOverlay(byte *buf, int pitch);
void copy_rect_overlay(const byte *buf, int pitch, int x, int y, int w, int h); void copyRectToOverlay(const byte *buf, int pitch, int x, int y, int w, int h);
int16 getWidth(); int16 getWidth();
int16 getHeight(); int16 getHeight();

View file

@ -72,20 +72,20 @@ class OSystem_Dreamcast : public OSystem {
// Draw a bitmap to screen. // Draw a bitmap to screen.
// The screen will not be updated to reflect the new bitmap // 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); void move_screen(int dx, int dy, int height);
// Update the dirty areas of the screen // Update the dirty areas of the screen
void updateScreen(); void updateScreen();
// Either show or hide the mouse cursor // 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. // 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. // 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. // Shaking is used in SCUMM. Set current shake position.
void set_shake_pos(int shake_pos); void set_shake_pos(int shake_pos);
@ -128,11 +128,11 @@ class OSystem_Dreamcast : public OSystem {
void quit(); void quit();
// Overlay // Overlay
void show_overlay(); void showOverlay();
void hide_overlay(); void hideOverlay();
void clear_overlay(); void clearOverlay();
void grab_overlay(int16 *buf, int pitch); void grabOverlay(int16 *buf, int pitch);
void copy_rect_overlay(const int16 *buf, int pitch, int x, int y, int w, int h); void copyRectToOverlay(const int16 *buf, int pitch, int x, int y, int w, int h);
// Add a callback timer // Add a callback timer
void setTimerCallback(TimerProc callback, int timer); void setTimerCallback(TimerProc callback, int timer);

View file

@ -192,7 +192,7 @@ void OSystem_Dreamcast::initSize(uint w, uint h)
// dc_reset_screen(0, 0); // 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) int w, int h)
{ {
unsigned char *dst = screen + y*SCREEN_W + x; 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 // move down
// copy from bottom to top // copy from bottom to top
for (int y = height - 1; y >= dy; y--) 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 { } else {
// move up // move up
// copy from top to bottom // copy from top to bottom
for (int y = 0; y < height + dx; y++) 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) { } else if (dy == 0) {
// horizontal movement // horizontal movement
@ -228,12 +228,12 @@ void OSystem_Dreamcast::move_screen(int dx, int dy, int height) {
// move right // move right
// copy from right to left // copy from right to left
for (int x = _screen_w - 1; x >= dx; x--) 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 { } else {
// move left // move left
// copy from left to right // copy from left to right
for (int x = 0; x < _screen_w; x++) 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 { } else {
// free movement // 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; bool last = _ms_visible;
_ms_visible = visible; _ms_visible = visible;
@ -252,13 +252,13 @@ bool OSystem_Dreamcast::show_mouse(bool visible)
return last; 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_x = x;
_ms_cur_y = y; _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) int hotspot_x, int hotspot_y)
{ {
_ms_cur_w = w; _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; _overlay_visible = true;
clear_overlay(); clearOverlay();
} }
void OSystem_Dreamcast::hide_overlay() void OSystem_Dreamcast::hideOverlay()
{ {
_overlay_visible = false; _overlay_visible = false;
} }
void OSystem_Dreamcast::clear_overlay() void OSystem_Dreamcast::clearOverlay()
{ {
if(!_overlay_visible) if(!_overlay_visible)
return; return;
@ -541,7 +541,7 @@ void OSystem_Dreamcast::clear_overlay()
_overlay_dirty = true; _overlay_dirty = true;
} }
void OSystem_Dreamcast::grab_overlay(int16 *buf, int pitch) void OSystem_Dreamcast::grabOverlay(int16 *buf, int pitch)
{ {
int h = OVL_H; int h = OVL_H;
unsigned short *src = overlay; unsigned short *src = overlay;
@ -552,7 +552,7 @@ void OSystem_Dreamcast::grab_overlay(int16 *buf, int pitch)
} while (--h); } 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) int x, int y, int w, int h)
{ {
unsigned short *dst = overlay + y*OVL_W + x; unsigned short *dst = overlay + y*OVL_W + x;

View file

@ -185,7 +185,7 @@ void OSystem_GP32::add_dirty_rgn_auto(const byte *buf) {
// Draw a bitmap to screen. // Draw a bitmap to screen.
// The screen will not be updated to reflect the new bitmap // 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) if (_screen == NULL)
return; return;
@ -361,12 +361,12 @@ void OSystem_GP32::move_screen(int dx, int dy, int height) {
// move down // move down
// copy from bottom to top // copy from bottom to top
for (int y = height - 1; y >= dy; y--) 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 { } else {
// move up // move up
// copy from top to bottom // copy from top to bottom
for (int y = 0; y < height + dx; y++) 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) { } else if (dy == 0) {
// horizontal movement // horizontal movement
@ -374,12 +374,12 @@ void OSystem_GP32::move_screen(int dx, int dy, int height) {
// move right // move right
// copy from right to left // copy from right to left
for (int x = _screenWidth - 1; x >= dx; x--) 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 { } else {
// move left // move left
// copy from left to right // copy from left to right
for (int x = 0; x < _screenWidth; x++) 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 { } else {
// free movement // free movement
@ -798,7 +798,7 @@ void OSystem_GP32::updateScreen() {
} }
// Either show or hide the mouse cursor // Either show or hide the mouse cursor
bool OSystem_GP32::show_mouse(bool visible) { bool OSystem_GP32::showMouse(bool visible) {
if (_mouseVisible == visible) if (_mouseVisible == visible)
return 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_mouse_pos(x, y);
} }
// Set the bitmap that's used when drawing the cursor. // 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.w = w;
_mouse_cur_state.h = h; _mouse_cur_state.h = h;
@ -1014,7 +1014,7 @@ void OSystem_GP32::hotswap_gfx_mode() {
SDL_SetColors(_screen, _currentPalette, 0, 256); SDL_SetColors(_screen, _currentPalette, 0, 256);
// blit image // blit image
copy_rect(bak_mem, _screenWidth, 0, 0, _screenWidth, _screenHeight); copyRectToScreen(bak_mem, _screenWidth, 0, 0, _screenWidth, _screenHeight);
free(bak_mem); free(bak_mem);
updateScreen(); updateScreen();
@ -1086,7 +1086,7 @@ void OSystem_GP32::quit() {
} }
// Overlay // Overlay
void OSystem_GP32::show_overlay() { void OSystem_GP32::showOverlay() {
// hide the mouse // hide the mouse
undraw_mouse(); undraw_mouse();
@ -1107,10 +1107,10 @@ GpGraphicModeSet(16, NULL); //ph0x
//GpRectFill(NULL,&gpDraw[GAME_SURFACE], 0, 0, 320, 240*2, 0); //black border //GpRectFill(NULL,&gpDraw[GAME_SURFACE], 0, 0, 320, 240*2, 0); //black border
_overlay_visible = true; _overlay_visible = true;
clear_overlay(); clearOverlay();
} }
void OSystem_GP32::hide_overlay() { void OSystem_GP32::hideOverlay() {
// hide the mouse // hide the mouse
undraw_mouse(); undraw_mouse();
@ -1121,7 +1121,7 @@ GpRectFill(NULL,&gpDraw[GAME_SURFACE], 0, 200, 320, 40, 0); //black border
_forceFull = true; _forceFull = true;
} }
void OSystem_GP32::clear_overlay() { void OSystem_GP32::clearOverlay() {
if (!_overlay_visible) if (!_overlay_visible)
return; return;
@ -1140,7 +1140,7 @@ void OSystem_GP32::clear_overlay() {
_forceFull = true; _forceFull = true;
} }
void OSystem_GP32::grab_overlay(int16 *buf, int pitch) { void OSystem_GP32::grabOverlay(int16 *buf, int pitch) {
if (!_overlay_visible) if (!_overlay_visible)
return; return;
@ -1164,7 +1164,7 @@ void OSystem_GP32::grab_overlay(int16 *buf, int pitch) {
///SDL_UnlockSurface(sdl_tmpscreen); ///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) if (!_overlay_visible)
return; return;

View file

@ -45,7 +45,7 @@ public:
// Draw a bitmap to screen. // Draw a bitmap to screen.
// The screen will not be updated to reflect the new bitmap // 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 // Moves the screen content around by the given amount of pixels
// but only the top height pixel rows, the rest stays untouched // but only the top height pixel rows, the rest stays untouched
@ -55,14 +55,14 @@ public:
void updateScreen(); void updateScreen();
// Either show or hide the mouse cursor // Either show or hide the mouse cursor
bool show_mouse(bool visible); bool showMouse(bool visible);
void warp_mouse(int x, int y); void warpMouse(int x, int y);
// Set the position of the mouse cursor // Set the position of the mouse cursor
void set_mouse_pos(int x, int y); void set_mouse_pos(int x, int y);
// Set the bitmap that's used when drawing the cursor. // 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. // Shaking is used in SCUMM. Set current shake position.
void set_shake_pos(int shake_pos); void set_shake_pos(int shake_pos);
@ -112,11 +112,11 @@ public:
void quit(); void quit();
// Overlay // Overlay
void show_overlay(); void showOverlay();
void hide_overlay(); void hideOverlay();
void clear_overlay(); void clearOverlay();
void grab_overlay(int16 *buf, int pitch); void grabOverlay(int16 *buf, int pitch);
void copy_rect_overlay(const int16 *buf, int pitch, int x, int y, int w, int h); void copyRectToOverlay(const int16 *buf, int pitch, int x, int y, int w, int h);
static OSystem *create(int gfx_mode, bool full_screen); static OSystem *create(int gfx_mode, bool full_screen);

View file

@ -969,7 +969,7 @@ bool OSystem_MorphOS::poll_event(Event *event)
return false; return false;
} }
void OSystem_MorphOS::warp_mouse(int x, int y) void OSystem_MorphOS::warpMouse(int x, int y)
{ {
if (InputIORequest) if (InputIORequest)
{ {
@ -1017,7 +1017,7 @@ void OSystem_MorphOS::set_shake_pos(int shake_pos)
(MouseOldY+MouseOldHeight <= y) || (MouseOldY >= y+h))) (MouseOldY+MouseOldHeight <= y) || (MouseOldY >= y+h)))
/* Copy part of bitmap */ /* 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; byte *dst;
@ -1119,13 +1119,13 @@ void OSystem_MorphOS::move_screen(int dx, int dy, int height) {
// move down // move down
// copy from bottom to top // copy from bottom to top
for (int y = height - 1; y >= dy; y--) 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) { } else if (dy < 0) {
// move up // move up
// copy from top to bottom // copy from top to bottom
dy = -dy; dy = -dy;
for (int y = dy; y < height; y++) 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 // horizontal movement
@ -1133,13 +1133,13 @@ void OSystem_MorphOS::move_screen(int dx, int dy, int height) {
// move right // move right
// copy from right to left // copy from right to left
for (int x = ScummBufferWidth - 1; x >= dx; x--) 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) { } else if (dx < 0) {
// move left // move left
// copy from left to right // copy from left to right
dx = -dx; dx = -dx;
for (int x = dx; x < ScummBufferWidth; x++) 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) if (MouseVisible == visible)
return 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; MouseWidth = w;
MouseHeight = h; MouseHeight = h;
@ -1577,11 +1577,11 @@ int16 OSystem_MorphOS::getHeight()
return ScummScrHeight; return ScummScrHeight;
} }
void OSystem_MorphOS::show_overlay() void OSystem_MorphOS::showOverlay()
{ {
UndrawMouse(); UndrawMouse();
memcpy(OvlSavedBuffer, ScummBuffer, ScummBufferWidth*ScummBufferHeight); memcpy(OvlSavedBuffer, ScummBuffer, ScummBufferWidth*ScummBufferHeight);
clear_overlay(); clearOverlay();
for (int c = 0; c < 256; c++) for (int c = 0; c < 256; c++)
{ {
ULONG r, g, b; 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 AUTO_LOCK
UBYTE *src = (UBYTE *) ScummBuffer; UBYTE *src = (UBYTE *) ScummBuffer;
UBYTE *dest = (UBYTE *) OvlBitMap; 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 y = 0; y < ScummBufferHeight; y++)
for (int x = 0; x < ScummBufferWidth; x++) 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 h = ScummBufferHeight;
int x; int x;
@ -1630,7 +1630,7 @@ void OSystem_MorphOS::grab_overlay(int16 *buf, int pitch)
} while (--h); } 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; int x1, y1;
UBYTE *dest; UBYTE *dest;
@ -1672,7 +1672,7 @@ void OSystem_MorphOS::copy_rect_overlay(const int16 *ovl, int pitch, int x, int
dest += (ScummBufferWidth-w)*3; dest += (ScummBufferWidth-w)*3;
ovl += pitch-w; ovl += pitch-w;
} }
copy_rect(bmap, w, x, y, w, h); copyRectToScreen(bmap, w, x, y, w, h);
FreeVec(bmap); FreeVec(bmap);
} }
} }

View file

@ -51,30 +51,30 @@ class OSystem_MorphOS : public OSystem
// Draw a bitmap to screen. // Draw a bitmap to screen.
// The screen will not be updated to reflect the new bitmap // 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); void move_screen(int dx, int dy, int height);
// Update the dirty areas of the screen // Update the dirty areas of the screen
virtual void updateScreen(); virtual void updateScreen();
// Either show or hide the mouse cursor // 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 // Set the position of the mouse cursor
virtual void set_mouse_pos(int x, int y); virtual void set_mouse_pos(int x, int y);
// Set the bitmap that's used when drawing the cursor. // 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. // Shaking is used in SCUMM. Set current shake position.
virtual void set_shake_pos(int shake_pos); virtual void set_shake_pos(int shake_pos);
// Overlay // Overlay
virtual void show_overlay(); virtual void showOverlay();
virtual void hide_overlay(); virtual void hideOverlay();
virtual void clear_overlay(); virtual void clearOverlay();
virtual void grab_overlay(int16 *buf, int pitch); virtual void grabOverlay(int16 *buf, int pitch);
virtual void copy_rect_overlay(const int16 *buf, int pitch, int x, int y, int w, int h); virtual void copyRectToOverlay(const int16 *buf, int pitch, int x, int y, int w, int h);
virtual int16 getHeight(); virtual int16 getHeight();
virtual int16 getWidth(); virtual int16 getWidth();
@ -98,7 +98,7 @@ class OSystem_MorphOS : public OSystem
virtual bool poll_event(Event *event); virtual bool poll_event(Event *event);
// Moves mouse pointer to specified position // 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 // Set the function to be invoked whenever samples need to be generated
virtual bool setSoundCallback(SoundProc proc, void *param); virtual bool setSoundCallback(SoundProc proc, void *param);

View file

@ -31,12 +31,12 @@ class OSystem_NULL : public OSystem {
public: public:
void setPalette(const byte *colors, uint start, uint num) {} void setPalette(const byte *colors, uint start, uint num) {}
void initSize(uint w, uint h); 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 move_screen(int dx, int dy) {}
void updateScreen() {} 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_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) {} void set_shake_pos(int shake_pos) {}
uint32 get_msecs(); uint32 get_msecs();
void delay_msecs(uint msecs); void delay_msecs(uint msecs);

View file

@ -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) if (_screen == NULL)
return; return;
@ -829,15 +829,15 @@ void OSystem_SDL::set_shake_pos(int shake_pos) {
#pragma mark --- Overlays --- #pragma mark --- Overlays ---
#pragma mark - #pragma mark -
void OSystem_SDL::show_overlay() { void OSystem_SDL::showOverlay() {
// hide the mouse // hide the mouse
undraw_mouse(); undraw_mouse();
_overlayVisible = true; _overlayVisible = true;
clear_overlay(); clearOverlay();
} }
void OSystem_SDL::hide_overlay() { void OSystem_SDL::hideOverlay() {
// hide the mouse // hide the mouse
undraw_mouse(); undraw_mouse();
@ -845,7 +845,7 @@ void OSystem_SDL::hide_overlay() {
_forceFull = true; _forceFull = true;
} }
void OSystem_SDL::clear_overlay() { void OSystem_SDL::clearOverlay() {
if (!_overlayVisible) if (!_overlayVisible)
return; return;
@ -866,7 +866,7 @@ void OSystem_SDL::clear_overlay() {
_forceFull = true; _forceFull = true;
} }
void OSystem_SDL::grab_overlay(OverlayColor *buf, int pitch) { void OSystem_SDL::grabOverlay(OverlayColor *buf, int pitch) {
if (!_overlayVisible) if (!_overlayVisible)
return; return;
@ -890,7 +890,7 @@ void OSystem_SDL::grab_overlay(OverlayColor *buf, int pitch) {
SDL_UnlockSurface(_tmpscreen); 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) if (!_overlayVisible)
return; return;
@ -953,7 +953,7 @@ void OSystem_SDL::colorToRGB(OverlayColor color, uint8 &r, uint8 &g, uint8 &b) {
#pragma mark --- Mouse --- #pragma mark --- Mouse ---
#pragma mark - #pragma mark -
bool OSystem_SDL::show_mouse(bool visible) { bool OSystem_SDL::showMouse(bool visible) {
if (_mouseVisible == visible) if (_mouseVisible == visible)
return 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) { if (_mouseCurState.x != x || _mouseCurState.y != y) {
SDL_WarpMouse(x * _scaleFactor, y * _scaleFactor); 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(); undraw_mouse();

View file

@ -48,7 +48,7 @@ public:
// Draw a bitmap to screen. // Draw a bitmap to screen.
// The screen will not be updated to reflect the new bitmap // 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); void move_screen(int dx, int dy, int height);
@ -56,15 +56,15 @@ public:
void updateScreen(); void updateScreen();
// Either show or hide the mouse cursor // 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 // Warp the mouse cursor. Where set_mouse_pos() only informs the
// backend of the mouse cursor's current position, this function // backend of the mouse cursor's current position, this function
// actually moves the cursor to the specified position. // 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. // 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. // Shaking is used in SCUMM. Set current shake position.
void set_shake_pos(int shake_pos); void set_shake_pos(int shake_pos);
@ -111,11 +111,11 @@ public:
void deleteMutex(MutexRef mutex); void deleteMutex(MutexRef mutex);
// Overlay // Overlay
virtual void show_overlay(); virtual void showOverlay();
virtual void hide_overlay(); virtual void hideOverlay();
virtual void clear_overlay(); virtual void clearOverlay();
virtual void grab_overlay(OverlayColor *buf, int pitch); virtual void grabOverlay(OverlayColor *buf, int pitch);
virtual void copy_rect_overlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h); virtual void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h);
virtual int16 getHeight(); virtual int16 getHeight();
virtual int16 getWidth(); virtual int16 getWidth();

View file

@ -944,7 +944,7 @@ void OSystem_WINCE3::fillMouseEvent(Event &event, int x, int y) {
event.mouse.y = event.mouse.y * _scaleFactorYd / _scaleFactorYm; 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) { if (_mouseCurState.x != x || _mouseCurState.y != y) {
SDL_WarpMouse(x * _scaleFactorXm / _scaleFactorXd, y * _scaleFactorYm / _scaleFactorYd); SDL_WarpMouse(x * _scaleFactorXm / _scaleFactorXd, y * _scaleFactorYm / _scaleFactorYd);

View file

@ -57,7 +57,7 @@ public:
// Overloaded from SDL_Common (new scaler handling) // Overloaded from SDL_Common (new scaler handling)
void add_dirty_rect(int x, int y, int w, int h); void add_dirty_rect(int x, int y, int w, int h);
// Overloaded from SDL_Common (new scaler handling) // Overloaded from SDL_Common (new scaler handling)
void warp_mouse(int x, int y); void warpMouse(int x, int y);
// Overloaded from SDL_Commmon // Overloaded from SDL_Commmon
void quit(); void quit();
// Overloaded from SDL_Commmon (master volume and sample rate subtleties) // Overloaded from SDL_Commmon (master volume and sample rate subtleties)

View file

@ -88,7 +88,7 @@ public:
// Draw a bitmap to screen. // Draw a bitmap to screen.
// The screen will not be updated to reflect the new bitmap // 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); void move_screen(int dx, int dy, int height);
@ -96,7 +96,7 @@ public:
void updateScreen(); void updateScreen();
// Either show or hide the mouse cursor // Either show or hide the mouse cursor
bool show_mouse(bool visible); bool showMouse(bool visible);
// Set the position of the mouse cursor // Set the position of the mouse cursor
void set_mouse_pos(int x, int y); void set_mouse_pos(int x, int y);
@ -104,10 +104,10 @@ public:
// Warp the mouse cursor. Where set_mouse_pos() only informs the // Warp the mouse cursor. Where set_mouse_pos() only informs the
// backend of the mouse cursor's current position, this function // backend of the mouse cursor's current position, this function
// actually moves the cursor to the specified position. // 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. // 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. // Shaking is used in SCUMM. Set current shake position.
void set_shake_pos(int shake_pos); void set_shake_pos(int shake_pos);
@ -159,11 +159,11 @@ public:
void deleteMutex(MutexRef mutex); void deleteMutex(MutexRef mutex);
// Overlay handling for the new menu system // Overlay handling for the new menu system
void show_overlay(); void showOverlay();
void hide_overlay(); void hideOverlay();
void clear_overlay(); void clearOverlay();
void grab_overlay(int16 *, int); void grabOverlay(int16 *, int);
void copy_rect_overlay(const int16 *, int, int, int, int, int); void copyRectToOverlay(const int16 *, int, int, int, int, int);
virtual int16 getHeight(); virtual int16 getHeight();
virtual int16 getWidth(); virtual int16 getWidth();
@ -550,7 +550,7 @@ void OSystem_X11::setPalette(const byte *colors, uint start, uint num) {
num_of_dirty_square++; \ 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; uint8 *dst;
if (y < 0) { if (y < 0) {
@ -586,12 +586,12 @@ void OSystem_X11::move_screen(int dx, int dy, int height) {
// move down // move down
// copy from bottom to top // copy from bottom to top
for (int y = height - 1; y >= dy; y--) 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 { } else {
// move up // move up
// copy from top to bottom // copy from top to bottom
for (int y = 0; y < height + dx; y++) 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) { } else if (dy == 0) {
// horizontal movement // horizontal movement
@ -599,12 +599,12 @@ void OSystem_X11::move_screen(int dx, int dy, int height) {
// move right // move right
// copy from right to left // copy from right to left
for (int x = fb_width - 1; x >= dx; x--) 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 { } else {
// move left // move left
// copy from left to right // copy from left to right
for (int x = 0; x < fb_width; x++) 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 { } else {
// free movement // 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) if (_mouse_visible == visible)
return 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); 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.w = w;
cur_state.h = h; cur_state.h = h;
cur_state.hot_x = hotspot_x; cur_state.hot_x = hotspot_x;
@ -1095,16 +1095,16 @@ void OSystem_X11::deleteMutex(MutexRef mutex) {
free(mutex); free(mutex);
} }
void OSystem_X11::show_overlay() { void OSystem_X11::showOverlay() {
_overlay_visible = true; _overlay_visible = true;
} }
void OSystem_X11::hide_overlay() { void OSystem_X11::hideOverlay() {
_overlay_visible = false; _overlay_visible = false;
_palette_changed = true; // This is to force a full redraw to hide the overlay _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) if (_overlay_visible == false)
return; return;
dirty_square d = { 0, 0, fb_width, fb_height }; 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); 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) if (_overlay_visible == false)
return; return;
@ -1120,7 +1120,7 @@ void OSystem_X11::grab_overlay(int16 *dest, int pitch) {
blit_convert(&d, (uint16 *) dest, 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) if (_overlay_visible == false)
return; return;
uint16 *dst = local_fb_overlay + x + (y * fb_width); uint16 *dst = local_fb_overlay + x + (y * fb_width);

View file

@ -188,7 +188,7 @@ static int launcherDialog(GameDetector &detector, OSystem *system) {
// FIXME - mouse cursors are currently always set via 8 bit data. // 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 // 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: // two purposes:
// 1) allow for 16 bit mouse cursors in overlay mode // 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 // 2) no need to backup & restore the mouse cursor before/after the overlay is shown

View file

@ -260,7 +260,7 @@ public:
* flicker. * flicker.
* @see updateScreen * @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. */ /** Update the dirty areas of the screen. */
virtual void updateScreen() = 0; virtual void updateScreen() = 0;
@ -284,7 +284,7 @@ public:
* (always positive) offset. The area at the bottom of the screen which is moved * (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 * 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 * 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 * @param shakeOffset the shake offset
* *
* @todo This is a rather special screen effect, only used by the SCUMM * @todo This is a rather special screen effect, only used by the SCUMM
@ -299,13 +299,13 @@ public:
/** @name Overlay */ /** @name Overlay */
//@{ //@{
virtual void show_overlay() = 0; virtual void showOverlay() = 0;
virtual void hide_overlay() = 0; virtual void hideOverlay() = 0;
virtual void clear_overlay() = 0; virtual void clearOverlay() = 0;
virtual void grab_overlay(OverlayColor *buf, int pitch) = 0; virtual void grabOverlay(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 void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) = 0;
virtual int16 get_overlay_height() { return getHeight(); } virtual int16 getOverlayHeight() { return getHeight(); }
virtual int16 get_overlay_width() { return getWidth(); } virtual int16 getOverlayWidth() { return getWidth(); }
/** /**
* Convert the given RGB triplet into an OverlayColor. A OverlayColor can * Convert the given RGB triplet into an OverlayColor. A OverlayColor can
@ -339,7 +339,7 @@ public:
//@{ //@{
/** Show or hide the mouse cursor. */ /** 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 * 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 x the new x position of the mouse
* @param y 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. * 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 hotspotX horizontal offset from the left side to the hotspot
* @param hotspotY vertical offset from the top 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;
//@} //@}

View file

@ -38,7 +38,7 @@ BaseAnimationState::~BaseAnimationState() {
delete mpgfile; delete mpgfile;
delete sndfile; delete sndfile;
#ifndef BACKEND_8BIT #ifndef BACKEND_8BIT
_sys->hide_overlay(); _sys->hideOverlay();
free(overlay); free(overlay);
#endif #endif
if (bgSoundStream) if (bgSoundStream)
@ -108,7 +108,7 @@ bool BaseAnimationState::init(const char *name) {
#else #else
buildLookup(); buildLookup();
overlay = (OverlayColor*)calloc(MOVIE_WIDTH * MOVIE_HEIGHT, sizeof(OverlayColor)); overlay = (OverlayColor*)calloc(MOVIE_WIDTH * MOVIE_HEIGHT, sizeof(OverlayColor));
_sys->show_overlay(); _sys->showOverlay();
#endif #endif
// Open MPEG2 stream // Open MPEG2 stream

View file

@ -80,10 +80,10 @@ ConsoleDialog::ConsoleDialog(float widthPercent, float heightPercent)
void ConsoleDialog::reflowLayout() { void ConsoleDialog::reflowLayout() {
// Calculate the real width/height (rounded to char/line multiples) // Calculate the real width/height (rounded to char/line multiples)
_w = (uint16)(_widthPercent * g_system->get_overlay_width()); _w = (uint16)(_widthPercent * g_system->getOverlayWidth());
// _w = (_widthPercent * g_system->get_overlay_width() - kScrollBarWidth - 2) / kCharWidth; // _w = (_widthPercent * g_system->getOverlayWidth() - kScrollBarWidth - 2) / kCharWidth;
// _w = _w * kCharWidth + kScrollBarWidth + 2; // _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; _h = _h * kLineHeight + 2;
// Calculate depending values // Calculate depending values

View file

@ -91,8 +91,8 @@ void NewGui::runLoop() {
if (_needRedraw) { if (_needRedraw) {
// Restore the overlay to its initial state, then draw all dialogs. // Restore the overlay to its initial state, then draw all dialogs.
// This is necessary to get the blending right. // This is necessary to get the blending right.
_system->clear_overlay(); _system->clearOverlay();
_system->grab_overlay((OverlayColor *)_screen.pixels, _screenPitch); _system->grabOverlay((OverlayColor *)_screen.pixels, _screenPitch);
for (int i = 0; i < _dialogStack.size(); i++) for (int i = 0; i < _dialogStack.size(); i++)
_dialogStack[i]->drawDialog(); _dialogStack[i]->drawDialog();
_needRedraw = false; _needRedraw = false;
@ -184,21 +184,21 @@ void NewGui::runLoop() {
void NewGui::saveState() { void NewGui::saveState() {
// Backup old cursor // Backup old cursor
_oldCursorMode = _system->show_mouse(true); _oldCursorMode = _system->showMouse(true);
// Enable the overlay // Enable the overlay
_system->show_overlay(); _system->showOverlay();
// Create a screen buffer for the overlay data, and fill it with // Create a screen buffer for the overlay data, and fill it with
// whatever is visible on the screen rught now. // whatever is visible on the screen rught now.
_screen.h = _system->get_overlay_height(); _screen.h = _system->getOverlayHeight();
_screen.w = _system->get_overlay_width(); _screen.w = _system->getOverlayWidth();
_screen.bytesPerPixel = sizeof(OverlayColor); _screen.bytesPerPixel = sizeof(OverlayColor);
_screen.pitch = _screen.w * _screen.bytesPerPixel; _screen.pitch = _screen.w * _screen.bytesPerPixel;
_screenPitch = _screen.w; _screenPitch = _screen.w;
_screen.pixels = (OverlayColor*)calloc(_screen.w * _screen.h, sizeof(OverlayColor)); _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; _currentKeyDown.keycode = 0;
_lastClick.x = _lastClick.y = 0; _lastClick.x = _lastClick.y = 0;
@ -209,9 +209,9 @@ void NewGui::saveState() {
} }
void NewGui::restoreState() { void NewGui::restoreState() {
_system->show_mouse(_oldCursorMode); _system->showMouse(_oldCursorMode);
_system->hide_overlay(); _system->hideOverlay();
if (_screen.pixels) { if (_screen.pixels) {
free(_screen.pixels); free(_screen.pixels);
_screen.pixels = 0; _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 // blit the affected area directly to the overlay. At least for our current
// GUI/widget/dialog code that is just fine. // GUI/widget/dialog code that is just fine.
OverlayColor *buf = getBasePtr(x, y); 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) { 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; _cursorAnimateTimer = time;
_cursorAnimateCounter = (_cursorAnimateCounter + 1) % 4; _cursorAnimateCounter = (_cursorAnimateCounter + 1) % 4;

View file

@ -599,7 +599,7 @@ void Display::update(bool dynalum, int16 dynaX, int16 dynaY) {
} }
// _fullRefresh = 1; // _fullRefresh = 1;
if (_fullRefresh) { 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; --_fullRefresh;
if (_fullRefresh) { if (_fullRefresh) {
memset(_dirtyBlocks, 0, _dirtyBlocksWidth * _dirtyBlocksHeight); memset(_dirtyBlocks, 0, _dirtyBlocksWidth * _dirtyBlocksHeight);
@ -618,14 +618,14 @@ void Display::update(bool dynalum, int16 dynaX, int16 dynaY) {
++accW; ++accW;
} else if (accW != 0) { } else if (accW != 0) {
x = (i - accW) * D_BLOCK_W; 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; accW = 0;
++count; ++count;
} }
} }
if (accW != 0) { if (accW != 0) {
x = (_dirtyBlocksWidth - accW) * D_BLOCK_W; 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; ++count;
} }
dbBuf += _dirtyBlocksWidth; dbBuf += _dirtyBlocksWidth;
@ -802,11 +802,11 @@ void Display::setMouseCursor(uint8 *buf, uint16 w, uint16 h) {
} }
++p; ++p;
} }
_system->set_mouse_cursor(_mousePtr, 14, 14, 1, 1); _system->setMouseCursor(_mousePtr, 14, 14, 1, 1);
} }
void Display::showMouseCursor(bool show) { void Display::showMouseCursor(bool show) {
_system->show_mouse(show); _system->showMouse(show);
} }
void Display::initFont() { void Display::initFont() {
@ -966,7 +966,7 @@ void Display::blankScreenEffect1() {
const int inc[] = { -1, 1 }; const int inc[] = { -1, 1 };
x += inc[_rnd.getRandomNumber(1)]; x += inc[_rnd.getRandomNumber(1)];
y += 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(); _system->updateScreen();
_vm->input()->delay(10); _vm->input()->delay(10);
} }
@ -999,7 +999,7 @@ void Display::blankScreenEffect2() {
memset(p, c, 2); memset(p, c, 2);
p += SCREEN_W; p += SCREEN_W;
} }
_system->copy_rect(buf, SCREEN_W, x, y, 2, 2); _system->copyRectToScreen(buf, SCREEN_W, x, y, 2, 2);
_system->updateScreen(); _system->updateScreen();
_vm->input()->delay(10); _vm->input()->delay(10);
} }
@ -1010,7 +1010,7 @@ void Display::blankScreenEffect3() {
while (_vm->input()->idleTime() >= Input::DELAY_SCREEN_BLANKER) { while (_vm->input()->idleTime() >= Input::DELAY_SCREEN_BLANKER) {
if (i > 4000000) { if (i > 4000000) {
memset(_screenBuf, 0, SCREEN_W * SCREEN_H); 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 { } else {
uint16 x = _rnd.getRandomNumber(SCREEN_W - 2); uint16 x = _rnd.getRandomNumber(SCREEN_W - 2);
uint16 y = _rnd.getRandomNumber(SCREEN_H - 2); uint16 y = _rnd.getRandomNumber(SCREEN_H - 2);
@ -1027,7 +1027,7 @@ void Display::blankScreenEffect3() {
p += SCREEN_W; p += SCREEN_W;
} }
++i; ++i;
_system->copy_rect(buf, SCREEN_W, x, y, 2, 2); _system->copyRectToScreen(buf, SCREEN_W, x, y, 2, 2);
} }
_system->updateScreen(); _system->updateScreen();
_vm->input()->delay(10); _vm->input()->delay(10);

View file

@ -168,7 +168,7 @@ void ScummEngine::setCursorHotspot(int x, int y) {
} }
void ScummEngine::updateCursor() { void ScummEngine::updateCursor() {
_system->set_mouse_cursor(_grabbedCursor, _cursor.width, _cursor.height, _system->setMouseCursor(_grabbedCursor, _cursor.width, _cursor.height,
_cursor.hotspotX, _cursor.hotspotY); _cursor.hotspotX, _cursor.hotspotY);
} }

View file

@ -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 // We don't clip height and width here, rather we rely on the backend to
// perform any needed clipping. // perform any needed clipping.
ptr = vs->screenPtr + (x + vs->xstart) + top * vs->width; 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 - #pragma mark -
@ -2548,7 +2548,7 @@ void ScummEngine::dissolveEffect(int width, int height) {
for (i = 0; i < w * h; i++) { for (i = 0; i < w * h; i++) {
x = offsets[i] % vs->width; x = offsets[i] % vs->width;
y = 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) { if (++blits >= blits_before_refresh) {
blits = 0; blits = 0;
@ -2584,7 +2584,7 @@ void ScummEngine::scrollEffect(int dir) {
y = 1 + step; y = 1 + step;
while (y < vs->height) { while (y < vs->height) {
_system->move_screen(0, -step, 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, vs->width,
0, vs->height - step, 0, vs->height - step,
vs->width, step); vs->width, step);
@ -2599,7 +2599,7 @@ void ScummEngine::scrollEffect(int dir) {
y = 1 + step; y = 1 + step;
while (y < vs->height) { while (y < vs->height) {
_system->move_screen(0, step, 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, vs->width,
0, 0, 0, 0,
vs->width, step); vs->width, step);
@ -2614,7 +2614,7 @@ void ScummEngine::scrollEffect(int dir) {
x = 1 + step; x = 1 + step;
while (x < vs->width) { while (x < vs->width) {
_system->move_screen(-step, 0, vs->height); _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,
vs->width - step, 0, vs->width - step, 0,
step, vs->height); step, vs->height);
@ -2629,7 +2629,7 @@ void ScummEngine::scrollEffect(int dir) {
x = 1 + step; x = 1 + step;
while (x < vs->width) { while (x < vs->width) {
_system->move_screen(step, 0, vs->height); _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, vs->width,
0, 0, 0, 0,
step, vs->height); step, vs->height);

View file

@ -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) { 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) { void Insane::putActors(void) {

View file

@ -644,7 +644,7 @@ void ScummEngine::saveOrLoad(Serializer *s, uint32 savegameVersion) {
if (s->isLoading() && savegameVersion >= VER(20)) { if (s->isLoading() && savegameVersion >= VER(20)) {
updateCursor(); updateCursor();
_system->warp_mouse(_mouse.x, _mouse.y); _system->warpMouse(_mouse.x, _mouse.y);
} }
s->saveLoadArrayOf(_actors, _numActors, sizeof(_actors[0]), actorEntries); s->saveLoadArrayOf(_actors, _numActors, sizeof(_actors[0]), actorEntries);

View file

@ -779,7 +779,7 @@ void ScummEngine_v8::o8_cursorCommand() {
int y = pop(); int y = pop();
int x = pop(); int x = pop();
_system->warp_mouse(x, y); _system->warpMouse(x, y);
} }
break; break;
default: default:

View file

@ -1587,7 +1587,7 @@ load_game:
animateCursor(); animateCursor();
/* show or hide mouse */ /* show or hide mouse */
_system->show_mouse(_cursor.state > 0); _system->showMouse(_cursor.state > 0);
if (VAR_TIMER != 0xFF) if (VAR_TIMER != 0xFF)
VAR(VAR_TIMER) = 0; VAR(VAR_TIMER) = 0;

View file

@ -966,7 +966,7 @@ void SmushPlayer::updateScreen() {
#endif #endif
uint32 end_time, start_time = _vm->_system->get_msecs(); 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; _updateNeeded = true;
end_time = _vm->_system->get_msecs(); end_time = _vm->_system->get_msecs();
debug(4, "Smush stats: updateScreen( %03d )", end_time - start_time); 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; _updateNeeded = false;
// Hide mouse // Hide mouse
bool oldMouseState = _vm->_system->show_mouse(false); bool oldMouseState = _vm->_system->showMouse(false);
// Load the video // Load the video
setupAnim(filename, directory); setupAnim(filename, directory);
@ -1065,7 +1065,7 @@ void SmushPlayer::play(const char *filename, const char *directory, int32 offset
deinit(); deinit();
// Reset mouse state // Reset mouse state
_vm->_system->show_mouse(oldMouseState); _vm->_system->showMouse(oldMouseState);
} }
} // End of namespace Scumm } // End of namespace Scumm

View file

@ -1548,11 +1548,11 @@ void SimonEngine::handle_mouse_moved() {
uint x; uint x;
if (_lock_counter) { if (_lock_counter) {
_system->show_mouse(false); _system->showMouse(false);
return; return;
} }
_system->show_mouse(true); _system->showMouse(true);
pollMouseXY(); pollMouseXY();
if (_mouse_x >= 32768) if (_mouse_x >= 32768)
@ -3764,9 +3764,9 @@ static const byte _simon2_cursors[10][256] = {
void SimonEngine::draw_mouse_pointer() { void SimonEngine::draw_mouse_pointer() {
if (_game & GF_SIMON2) 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 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 // 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) { void SimonEngine::dx_clear_surfaces(uint num_lines) {
memset(_sdl_buf_attached, 0, num_lines * 320); 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) { if (_dx_use_3_or_4_for_lock) {
memset(_sdl_buf, 0, num_lines * 320); 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(); _system->updateScreen();
memcpy(_sdl_buf_attached, _sdl_buf, 320 * 200); memcpy(_sdl_buf_attached, _sdl_buf, 320 * 200);

View file

@ -82,7 +82,7 @@ void ConResource::drawToScreen(bool doMask) {
spriteData += _spriteData->s_width; 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) : 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; cpHeight = PAN_CHAR_HEIGHT;
for (cnty = 0; cnty < cpHeight; cnty++) for (cnty = 0; cnty < cpHeight; cnty++)
memcpy(_screen + (cnty + _oldY) * GAME_SCREEN_WIDTH + _oldX, _oldScreen + cnty * PAN_LINE_WIDTH, cpWidth); 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) { if (!_spriteData) {
_oldX = GAME_SCREEN_WIDTH; _oldX = GAME_SCREEN_WIDTH;
@ -145,7 +145,7 @@ void TextResource::drawToScreen(bool doMask) {
copyDest += PAN_LINE_WIDTH; copyDest += PAN_LINE_WIDTH;
screenPos += GAME_SCREEN_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) { ControlStatus::ControlStatus(Text *skyText, OSystem *system, uint8 *scrBuf) {
@ -367,7 +367,7 @@ void Control::drawCross(uint16 x, uint16 y) {
crossPos += CROSS_SZ_X; crossPos += CROSS_SZ_X;
} }
bufPos = _screenBuf + y * GAME_SCREEN_WIDTH + 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); _text->drawToScreen(WITH_MASK);
} }
@ -391,7 +391,7 @@ void Control::animClick(ConResource *pButton) {
void Control::drawMainPanel(void) { void Control::drawMainPanel(void) {
memset(_screenBuf, 0, GAME_SCREEN_WIDTH * FULL_SCREEN_HEIGHT); 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); _controlPanel->drawToScreen(NO_MASK);
_exitButton->drawToScreen(NO_MASK); _exitButton->drawToScreen(NO_MASK);
_savePanButton->drawToScreen(NO_MASK); _savePanButton->drawToScreen(NO_MASK);
@ -430,7 +430,7 @@ void Control::doLoadSavePanel(void) {
saveRestorePanel(false); saveRestorePanel(false);
memset(_screenBuf, 0, GAME_SCREEN_WIDTH * FULL_SCREEN_HEIGHT); 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(); _system->updateScreen();
_skyScreen->forceRefresh(); _skyScreen->forceRefresh();
_skyScreen->setPaletteEndian((uint8 *)SkyEngine::fetchCompact(SkyEngine::_systemVars.currentPalette)); _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); 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(); _system->updateScreen();
_skyScreen->forceRefresh(); _skyScreen->forceRefresh();
_skyScreen->setPaletteEndian((uint8 *)SkyEngine::fetchCompact(SkyEngine::_systemVars.currentPalette)); _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->setXY(GAME_NAME_X + _enteredTextWidth + 1, GAME_NAME_Y + cnt * PAN_CHAR_HEIGHT + 4);
drawResource->drawToScreen(WITH_MASK); 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 } else
drawResource->drawToScreen(NO_MASK); drawResource->drawToScreen(NO_MASK);
} }
@ -1546,7 +1546,7 @@ uint16 Control::quickXRestore(uint16 slot) {
_savedCharSet = _skyText->giveCurrentCharSet(); _savedCharSet = _skyText->giveCurrentCharSet();
_skyText->fnSetFont(0); _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(); _system->updateScreen();
if (SkyEngine::_systemVars.gameVersion < 331) if (SkyEngine::_systemVars.gameVersion < 331)
@ -1570,7 +1570,7 @@ uint16 Control::quickXRestore(uint16 slot) {
_skyScreen->setPaletteEndian((uint8 *)SkyEngine::fetchCompact(SkyEngine::_systemVars.currentPalette)); _skyScreen->setPaletteEndian((uint8 *)SkyEngine::fetchCompact(SkyEngine::_systemVars.currentPalette));
} else { } else {
memset(_screenBuf, 0, FULL_SCREEN_WIDTH * FULL_SCREEN_HEIGHT); 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(); _system->updateScreen();
_skyScreen->showScreen(_skyScreen->giveCurrent()); _skyScreen->showScreen(_skyScreen->giveCurrent());
_skyScreen->setPalette(60111); _skyScreen->setPalette(60111);

View file

@ -792,7 +792,7 @@ bool Intro::floppyScrollFlirt(void) {
vgaPtr += nrToDo; vgaPtr += nrToDo;
} while (nrToDo == 255); } 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(); _system->updateScreen();
#ifndef _WIN32_WCE #ifndef _WIN32_WCE
if (!escDelay(40)) if (!escDelay(40))
@ -868,7 +868,7 @@ void Intro::showTextBuf(void) {
saveBuf += width; saveBuf += width;
} }
screenBuf = _skyScreen->giveCurrent() + y * GAME_SCREEN_WIDTH + x; 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) { void Intro::restoreScreen(void) {
@ -884,7 +884,7 @@ void Intro::restoreScreen(void) {
screenBuf += GAME_SCREEN_WIDTH; screenBuf += GAME_SCREEN_WIDTH;
saveBuf += 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) { bool Intro::escDelay(uint32 msecs) {

View file

@ -120,7 +120,7 @@ bool Mouse::fnAddHuman(void) {
if (_mouseY < 2) //stop mouse activating top line if (_mouseY < 2) //stop mouse activating top line
_mouseY = 2; _mouseY = 2;
_system->warp_mouse(_mouseX, _mouseY); _system->warpMouse(_mouseX, _mouseY);
//force the pointer engine into running a get-off //force the pointer engine into running a get-off
//even if it's over nothing //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 mouseWidth = ((struct dataFileHeader *)_miceData)->s_width;
uint16 mouseHeight = ((struct dataFileHeader *)_miceData)->s_height; uint16 mouseHeight = ((struct dataFileHeader *)_miceData)->s_height;
_system->set_mouse_cursor(newCursor, mouseWidth, mouseHeight, mouseX, mouseY); _system->setMouseCursor(newCursor, mouseWidth, mouseHeight, mouseX, mouseY);
if (frameNum == MOUSE_BLANK) _system->show_mouse(false); if (frameNum == MOUSE_BLANK) _system->showMouse(false);
else _system->show_mouse(true); else _system->showMouse(true);
} }
void Mouse::mouseEngine(uint16 mouseX, uint16 mouseY) { void Mouse::mouseEngine(uint16 mouseX, uint16 mouseY) {

View file

@ -93,7 +93,7 @@ Screen::~Screen(void) {
void Screen::clearScreen(void) { void Screen::clearScreen(void) {
memset(_currentScreen, 0, FULL_SCREEN_WIDTH * FULL_SCREEN_HEIGHT); 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(); _system->updateScreen();
} }
@ -151,7 +151,7 @@ void Screen::showScreen(uint16 fileNum) {
void Screen::showScreen(uint8 *pScreen) { 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(); _system->updateScreen();
} }
@ -211,12 +211,12 @@ void Screen::flip(bool doUpdate) {
if (!copyWidth) copyX = cntx * GRID_W; if (!copyWidth) copyX = cntx * GRID_W;
copyWidth += GRID_W; copyWidth += GRID_W;
} else if (copyWidth) { } 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; copyWidth = 0;
} }
} }
if (copyWidth) { 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; copyWidth = 0;
} }
} }
@ -470,14 +470,14 @@ void Screen::processSequence(void) {
} }
rectWid++; rectWid++;
} else if (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; rectWid = 0;
} }
scrPtr += 16; scrPtr += 16;
gridPtr++; gridPtr++;
} }
if (rectWid) { 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; rectWid = 0;
} }
scrPtr += 15 * GAME_SCREEN_WIDTH; scrPtr += 15 * GAME_SCREEN_WIDTH;
@ -781,7 +781,7 @@ void Screen::showGrid(uint8 *gridBuf) {
gridData <<= 1; 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);
} }

View file

@ -48,7 +48,7 @@ void AnimationState::drawYUV(int width, int height, byte *const *dat) {
_scr->plotYUV(lut, width, height, dat); _scr->plotYUV(lut, width, height, dat);
#else #else
plotYUV(lookup, width, height, dat); 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 #endif
} }

View file

@ -141,7 +141,7 @@ void ControlButton::draw(void) {
dst += SCREEN_WIDTH; dst += SCREEN_WIDTH;
src += FROM_LE_16(fHead->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) { bool ControlButton::wasClicked(uint16 mouseX, uint16 mouseY) {
@ -197,7 +197,7 @@ void Control::askForCd(void) {
memset(_screenBuf, 0, 640 * 480); memset(_screenBuf, 0, 640 * 480);
renderText(textA, 320, 220, TEXT_CENTER); renderText(textA, 320, 220, TEXT_CENTER);
renderText(_lStrings[STR_INSERT_CD_B], 320, 240, 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(); _system->updateScreen();
} }
delay(300); delay(300);
@ -206,7 +206,7 @@ void Control::askForCd(void) {
if (!test.isOpen()) { if (!test.isOpen()) {
memset(_screenBuf, 0, 640 * 480); memset(_screenBuf, 0, 640 * 480);
renderText(_lStrings[STR_INCORRECT_CD], 320, 230, TEXT_CENTER); 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(); _system->updateScreen();
delay(2000); delay(2000);
refreshText = true; refreshText = true;
@ -284,7 +284,7 @@ uint8 Control::runPanel(void) {
} }
if (fullRefresh) { if (fullRefresh) {
fullRefresh = false; 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(); _system->updateScreen();
delay(1000 / 12); delay(1000 / 12);
@ -294,7 +294,7 @@ uint8 Control::runPanel(void) {
_resMan->resClose(fontId); _resMan->resClose(fontId);
_resMan->resClose(redFontId); _resMan->resClose(redFontId);
memset(_screenBuf, 0, 640 * 480); memset(_screenBuf, 0, 640 * 480);
_system->copy_rect(_screenBuf, 640, 0, 0, 640, 480); _system->copyRectToScreen(_screenBuf, 640, 0, 0, 640, 480);
free(_screenBuf); free(_screenBuf);
_mouse->controlPanel(false); _mouse->controlPanel(false);
_music->startMusic(Logic::_scriptVars[CURRENT_MUSIC], 1); _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; destX += FROM_LE_16(chSpr->width) - 3;
str++; 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) { 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); srcMem += FROM_LE_16(frHead->width);
destMem += SCREEN_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); _resMan->resClose(SR_VLIGHT);
destX += 32; destX += 32;
} }

View file

@ -52,7 +52,7 @@ void Mouse::initialize(void) {
for (uint8 cnt = 0; cnt < 17; cnt++) // force res manager to keep mouse for (uint8 cnt = 0; cnt < 17; cnt++) // force res manager to keep mouse
_resMan->resOpen(MSE_POINTER + cnt); // cursors in memory all the time _resMan->resOpen(MSE_POINTER + cnt); // cursors in memory all the time
_system->show_mouse(false); _system->showMouse(false);
createPointer(0, 0); createPointer(0, 0);
} }
@ -240,11 +240,11 @@ void Mouse::setPointer(uint32 resId, uint32 rate) {
createPointer(resId, _currentLuggageId); createPointer(resId, _currentLuggageId);
if ((resId == 0) || (!(Logic::_scriptVars[MOUSE_STATUS] & 1) && (!_mouseOverride))) { if ((resId == 0) || (!(Logic::_scriptVars[MOUSE_STATUS] & 1) && (!_mouseOverride))) {
_system->set_mouse_cursor(NULL, 0, 0, 0, 0); _system->setMouseCursor(NULL, 0, 0, 0, 0);
_system->show_mouse(false); _system->showMouse(false);
} else { } else {
animate(); animate();
_system->show_mouse(true); _system->showMouse(true);
} }
} }
@ -259,7 +259,7 @@ void Mouse::animate(void) {
_frame = (_frame + 1) % _currentPtr->numFrames; _frame = (_frame + 1) % _currentPtr->numFrames;
uint8 *ptrData = (uint8*)_currentPtr + sizeof(MousePtr); uint8 *ptrData = (uint8*)_currentPtr + sizeof(MousePtr);
ptrData += _frame * _currentPtr->sizeX * _currentPtr->sizeY; 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);
} }
} }

View file

@ -137,7 +137,7 @@ bool Screen::showScrollFrame(void) {
uint16 avgScrlX = (uint16)(_oldScrollX + Logic::_scriptVars[SCROLL_OFFSET_X]) / 2; uint16 avgScrlX = (uint16)(_oldScrollX + Logic::_scriptVars[SCROLL_OFFSET_X]) / 2;
uint16 avgScrlY = (uint16)(_oldScrollY + Logic::_scriptVars[SCROLL_OFFSET_Y]) / 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(); _system->updateScreen();
return true; return true;
} }
@ -165,7 +165,7 @@ void Screen::updateScreen(void) {
copyWidth = _scrnSizeX - scrlX; copyWidth = _scrnSizeX - scrlX;
if (scrlY + copyHeight > _scrnSizeY) if (scrlY + copyHeight > _scrnSizeY)
copyHeight = _scrnSizeY - scrlY; 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 { } else {
// partial screen update only. The screen coordinates probably won't fit to the // partial screen update only. The screen coordinates probably won't fit to the
// grid holding the informations on which blocks have to be updated. // 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; int16 xPos = (cntx - cpWidth) * SCRNGRID_X - diffX;
if (xPos < 0) if (xPos < 0)
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; cpWidth = 0;
} }
if (cpWidth) { if (cpWidth) {
int16 xPos = (gridW - cpWidth) * SCRNGRID_X - diffX; int16 xPos = (gridW - cpWidth) * SCRNGRID_X - diffX;
if (xPos < 0) if (xPos < 0)
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; scrlY += diffY;
} }
@ -211,14 +211,14 @@ void Screen::updateScreen(void) {
cpHeight++; cpHeight++;
} else if (cpHeight) { } else if (cpHeight) {
uint16 yPos = (cnty - cpHeight) * SCRNGRID_Y; 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; cpHeight = 0;
} }
gridPos += _gridSizeX; gridPos += _gridSizeX;
} }
if (cpHeight) { if (cpHeight) {
uint16 yPos = (gridH - cpHeight) * SCRNGRID_Y; 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; scrlX += diffX;
} }
@ -235,12 +235,12 @@ void Screen::updateScreen(void) {
gridPos[cntx] >>= 1; gridPos[cntx] >>= 1;
cpWidth++; cpWidth++;
} else if (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; cpWidth = 0;
} }
if (cpWidth) { if (cpWidth) {
uint16 xPos = (gridW - cpWidth) * SCRNGRID_X; 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; gridPos += _gridSizeX;
scrnBuf += _scrnSizeX * SCRNGRID_Y; 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 -------------------------------- // ------------------- router debugging code --------------------------------
@ -960,7 +960,7 @@ void Screen::plotYUV(byte *lut, int width, int height, byte *const *dat) {
ypos += width; 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(); _system->updateScreen();
free(buf); free(buf);

View file

@ -170,7 +170,7 @@ void SwordEngine::reinitialize(void) {
_logic->initialize(); // now reinitialize these objects as they (may) have locked _logic->initialize(); // now reinitialize these objects as they (may) have locked
_objectMan->initialize(); // resources which have just been wiped. _objectMan->initialize(); // resources which have just been wiped.
_mouse->initialize(); _mouse->initialize();
_system->warp_mouse(320, 240); _system->warpMouse(320, 240);
_systemVars.wantFade = true; _systemVars.wantFade = true;
} }

View file

@ -168,7 +168,7 @@ void Graphics::drawMouse(void) {
if (_mouseAnim) if (_mouseAnim)
decompressMouse(_mouseData, _mouseSprite, _mouseAnim->mousew, _mouseAnim->mouseh, mouse_width); 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(); animateMouse();
drawMouse(); drawMouse();
_vm->_system->show_mouse(true); _vm->_system->showMouse(true);
} else { } else {
if (_luggageAnim) if (_luggageAnim)
drawMouse(); drawMouse();
else else
_vm->_system->show_mouse(false); _vm->_system->showMouse(false);
} }
return RD_OK; return RD_OK;
@ -257,12 +257,12 @@ int32 Graphics::setLuggageAnim(uint8 *ma, int32 size) {
animateMouse(); animateMouse();
drawMouse(); drawMouse();
_vm->_system->show_mouse(true); _vm->_system->showMouse(true);
} else { } else {
if (_mouseAnim) if (_mouseAnim)
drawMouse(); drawMouse();
else else
_vm->_system->show_mouse(false); _vm->_system->showMouse(false);
} }
return RD_OK; return RD_OK;

View file

@ -93,9 +93,9 @@ void AnimationState::updateScreen(void) {
#ifdef BACKEND_8BIT #ifdef BACKEND_8BIT
byte *buf = _vm->_graphics->getScreen() + ((480 - MOVIE_HEIGHT) / 2) * RENDERWIDE + (640 - MOVIE_WIDTH) / 2; 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 #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 #endif
_vm->_system->updateScreen(); _vm->_system->updateScreen();
} }

View file

@ -99,7 +99,7 @@ void Graphics::updateDisplay(bool redrawScene) {
// Update the entire screen. This is necessary when // Update the entire screen. This is necessary when
// scrolling, fading, etc. // 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; _needFullRedraw = false;
} else { } else {
// Update only the dirty areas of the screen // Update only the dirty areas of the screen
@ -116,7 +116,7 @@ void Graphics::updateDisplay(bool redrawScene) {
} else if (stripWide) { } else if (stripWide) {
x = CELLWIDE * (j - stripWide); x = CELLWIDE * (j - stripWide);
y = CELLDEEP * i; 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; stripWide = 0;
} }
} }
@ -124,7 +124,7 @@ void Graphics::updateDisplay(bool redrawScene) {
if (stripWide) { if (stripWide) {
x = CELLWIDE * (j - stripWide); x = CELLWIDE * (j - stripWide);
y = CELLDEEP * i; 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; stripWide = 0;
} }
} }

View file

@ -32,7 +32,7 @@ namespace Sword2 {
#define BLOCKHBITS 6 #define BLOCKHBITS 6
void Graphics::updateRect(Common::Rect *r) { 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, _screenWide, r->left, r->top, r->right - r->left,
r->bottom - r->top); r->bottom - r->top);
} }