From 14378cb56e18237cf1b8b5e088995e0b91f47410 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 28 Mar 2004 16:30:50 +0000 Subject: Renamed more OSystem methods svn-id: r13410 --- sword1/animation.cpp | 2 +- sword1/control.cpp | 14 +++++++------- sword1/mouse.cpp | 10 +++++----- sword1/screen.cpp | 20 ++++++++++---------- sword1/sword1.cpp | 2 +- 5 files changed, 24 insertions(+), 24 deletions(-) (limited to 'sword1') 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; } -- cgit v1.2.3