mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-18 07:53:12 +00:00
merged Graphics::copyTo640/Graphics::copyFrom640
svn-id: r35892
This commit is contained in:
parent
8ea8966c02
commit
1511099a7b
@ -157,18 +157,10 @@ void Graphics::decodeRLE_320(uint8 *dst, const uint8 *src, int w, int h) {
|
||||
}
|
||||
}
|
||||
|
||||
void Graphics::copyFrom640(const uint8 *src, uint8 *dst, int w, int h) {
|
||||
void Graphics::copyRect(uint8 *dst, int dstPitch, uint8 *src, int srcPitch, int w, int h) {
|
||||
for (int y = 0; y < h; ++y) {
|
||||
memcpy(dst, src, w);
|
||||
dst += w;
|
||||
src += 640;
|
||||
}
|
||||
}
|
||||
|
||||
void Graphics::copyTo640(uint8 *dst, const uint8 *src, int w, int srcPitch, int h) {
|
||||
for (int y = 0; y < h; ++y) {
|
||||
memcpy(dst, src, w);
|
||||
dst += 640;
|
||||
dst += dstPitch;
|
||||
src += srcPitch;
|
||||
}
|
||||
}
|
||||
|
@ -55,8 +55,7 @@ public:
|
||||
static void decodeRLE_248(uint8 *dst, const uint8 *src, int w, int h, int y1, int y2, bool xflip);
|
||||
static void decodeRLE_320(uint8 *dst, const uint8 *src, int w, int h);
|
||||
|
||||
static void copyFrom640(const uint8 *src, uint8 *dst, int w, int h);
|
||||
static void copyTo640(uint8 *dst, const uint8 *src, int w, int srcPitch, int h);
|
||||
static void copyRect(uint8 *dst, int dstPitch, uint8 *src, int srcPitch, int w, int h);
|
||||
|
||||
static void drawStringChar(uint8 *dst, uint8 chr, int pitch, uint8 chrColor, const uint8 *src);
|
||||
|
||||
|
@ -427,7 +427,7 @@ void TuckerEngine::loadLoc() {
|
||||
_locationHeight = (_locationNum < 73) ? 140 : 200;
|
||||
sprintf(filename, (i == 1) ? "loc%02d.pcx" : "loc%02da.pcx", _locationNum);
|
||||
copyLocBitmap(filename, 0, false);
|
||||
Graphics::copyFrom640(_locationBackgroundGfxBuf, _quadBackgroundGfxBuf, 320, _locationHeight);
|
||||
Graphics::copyRect(_quadBackgroundGfxBuf, 320, _locationBackgroundGfxBuf, 640, 320, _locationHeight);
|
||||
if (_locationHeight == 200) {
|
||||
return;
|
||||
}
|
||||
@ -436,7 +436,7 @@ void TuckerEngine::loadLoc() {
|
||||
if (i > 1) {
|
||||
sprintf(filename, "loc%02db.pcx", _locationNum);
|
||||
copyLocBitmap(filename, 320, false);
|
||||
Graphics::copyFrom640(_locationBackgroundGfxBuf + 320, _quadBackgroundGfxBuf + 44800, 320, 140);
|
||||
Graphics::copyRect(_quadBackgroundGfxBuf + 44800, 320, _locationBackgroundGfxBuf + 320, 640, 320, _locationHeight);
|
||||
if (i == 2) {
|
||||
sprintf(filename, "path%02db.pcx", _locationNum);
|
||||
copyLocBitmap(filename, 320, true);
|
||||
@ -445,7 +445,7 @@ void TuckerEngine::loadLoc() {
|
||||
if (i > 2) {
|
||||
sprintf(filename, "loc%02dc.pcx", _locationNum);
|
||||
copyLocBitmap(filename, 0, false);
|
||||
Graphics::copyFrom640(_locationBackgroundGfxBuf, _quadBackgroundGfxBuf + 89600, 320, 140);
|
||||
Graphics::copyRect(_quadBackgroundGfxBuf + 89600, 320, _locationBackgroundGfxBuf, 640, 320, 140);
|
||||
}
|
||||
if (_locationNum == 1) {
|
||||
_loadLocBufPtr = _quadBackgroundGfxBuf + 89600;
|
||||
@ -454,7 +454,7 @@ void TuckerEngine::loadLoc() {
|
||||
if (i > 3) {
|
||||
sprintf(filename, "loc%02dd.pcx", _locationNum);
|
||||
copyLocBitmap(filename, 0, false);
|
||||
Graphics::copyFrom640(_locationBackgroundGfxBuf + 320, _quadBackgroundGfxBuf + 134400, 320, 140);
|
||||
Graphics::copyRect(_quadBackgroundGfxBuf + 134400, 320, _locationBackgroundGfxBuf + 320, 640, 320, 140);
|
||||
}
|
||||
_fullRedrawCounter = 2;
|
||||
}
|
||||
|
@ -81,9 +81,9 @@ void TuckerEngine::handleCreditsSequence() {
|
||||
imgNum = 0;
|
||||
}
|
||||
if (num < 6) {
|
||||
Graphics::copyTo640(_locationBackgroundGfxBuf, _quadBackgroundGfxBuf, 320, 320, 200);
|
||||
Graphics::copyRect(_locationBackgroundGfxBuf, 640, _quadBackgroundGfxBuf, 320, 320, 200);
|
||||
} else {
|
||||
Graphics::copyTo640(_locationBackgroundGfxBuf, imgBuf + imgNum * 64000, 320, 320, 200);
|
||||
Graphics::copyRect(_locationBackgroundGfxBuf, 640, imgBuf + imgNum * 64000, 320, 320, 200);
|
||||
drawCreditsString(5, 48, counter2 * 6);
|
||||
drawCreditsString(5, 60, counter2 * 6 + 1);
|
||||
drawCreditsString(5, 80, counter2 * 6 + 2);
|
||||
@ -173,7 +173,7 @@ void TuckerEngine::handleCongratulationsSequence() {
|
||||
_fadePaletteCounter = 0;
|
||||
stopSounds();
|
||||
loadImage("congrat.pcx", _loadTempBuf, 1);
|
||||
Graphics::copyTo640(_locationBackgroundGfxBuf, _loadTempBuf, 320, 320, 200);
|
||||
Graphics::copyRect(_locationBackgroundGfxBuf, 640, _loadTempBuf, 320, 320, 200);
|
||||
_fullRedrawCounter = 2;
|
||||
redrawScreen(0);
|
||||
while (!_quitGame && _timerCounter2 < 450) {
|
||||
@ -243,7 +243,7 @@ void TuckerEngine::handleNewPartSequence() {
|
||||
fadeOutPalette();
|
||||
++_fadePaletteCounter;
|
||||
}
|
||||
Graphics::copyTo640(_locationBackgroundGfxBuf, _quadBackgroundGfxBuf, 320, 320, 200);
|
||||
Graphics::copyRect(_locationBackgroundGfxBuf, 640, _quadBackgroundGfxBuf, 320, 320, 200);
|
||||
_fullRedrawCounter = 2;
|
||||
updateSprites();
|
||||
drawSprite(0);
|
||||
@ -260,7 +260,7 @@ void TuckerEngine::handleNewPartSequence() {
|
||||
fadeInPalette();
|
||||
--_fadePaletteCounter;
|
||||
}
|
||||
Graphics::copyTo640(_locationBackgroundGfxBuf, _quadBackgroundGfxBuf, 320, 320, 200);
|
||||
Graphics::copyRect(_locationBackgroundGfxBuf, 640, _quadBackgroundGfxBuf, 320, 320, 200);
|
||||
_fullRedrawCounter = 2;
|
||||
updateSprites();
|
||||
drawSprite(0);
|
||||
@ -295,7 +295,7 @@ void TuckerEngine::handleMeanwhileSequence() {
|
||||
fadeOutPalette();
|
||||
++_fadePaletteCounter;
|
||||
}
|
||||
Graphics::copyTo640(_locationBackgroundGfxBuf, _quadBackgroundGfxBuf + 89600, 320, 320, 200);
|
||||
Graphics::copyRect(_locationBackgroundGfxBuf, 640, _quadBackgroundGfxBuf + 89600, 320, 320, 200);
|
||||
_fullRedrawCounter = 2;
|
||||
redrawScreen(0);
|
||||
waitForTimer(3);
|
||||
@ -306,7 +306,7 @@ void TuckerEngine::handleMeanwhileSequence() {
|
||||
fadeInPalette();
|
||||
--_fadePaletteCounter;
|
||||
}
|
||||
Graphics::copyTo640(_locationBackgroundGfxBuf, _quadBackgroundGfxBuf + 89600, 320, 320, 200);
|
||||
Graphics::copyRect(_locationBackgroundGfxBuf, 640, _quadBackgroundGfxBuf + 89600, 320, 320, 200);
|
||||
_fullRedrawCounter = 2;
|
||||
redrawScreen(0);
|
||||
waitForTimer(3);
|
||||
@ -338,7 +338,7 @@ void TuckerEngine::handleMapSequence() {
|
||||
while (!_quitGame) {
|
||||
waitForTimer(2);
|
||||
updateMouseState();
|
||||
Graphics::copyTo640(_locationBackgroundGfxBuf + _scrollOffset, _quadBackgroundGfxBuf + 89600, 320, 320, 200);
|
||||
Graphics::copyRect(_locationBackgroundGfxBuf + _scrollOffset, 640, _quadBackgroundGfxBuf + 89600, 320, 320, 200);
|
||||
_fullRedrawCounter = 2;
|
||||
if (_flagsTable[7] > 0 && _mousePosX > 30 && _mousePosX < 86 && _mousePosY > 36 && _mousePosY < 86) {
|
||||
textNum = 13;
|
||||
@ -460,7 +460,7 @@ int TuckerEngine::handleSpecialObjectSelectionSequence() {
|
||||
while (!_quitGame) {
|
||||
waitForTimer(2);
|
||||
updateMouseState();
|
||||
Graphics::copyTo640(_locationBackgroundGfxBuf + _scrollOffset, _quadBackgroundGfxBuf, 320, 320, 200);
|
||||
Graphics::copyRect(_locationBackgroundGfxBuf + _scrollOffset, 640, _quadBackgroundGfxBuf, 320, 320, 200);
|
||||
_fullRedrawCounter = 2;
|
||||
if (_fadePaletteCounter < 14) {
|
||||
fadeOutPalette();
|
||||
|
@ -467,10 +467,10 @@ void TuckerEngine::mainLoop() {
|
||||
continue;
|
||||
}
|
||||
if (_scrollOffset < 320) {
|
||||
Graphics::copyTo640(_locationBackgroundGfxBuf + _scrollOffset, _currentGfxBackground + _scrollOffset, 320 - _scrollOffset, 320, _locationHeight);
|
||||
Graphics::copyRect(_locationBackgroundGfxBuf + _scrollOffset, 640, _currentGfxBackground + _scrollOffset, 320, 320 - _scrollOffset, _locationHeight);
|
||||
}
|
||||
if (_scrollOffset > 0) {
|
||||
Graphics::copyTo640(_locationBackgroundGfxBuf + 320, _currentGfxBackground + 44800, _scrollOffset, 320, _locationHeight);
|
||||
Graphics::copyRect(_locationBackgroundGfxBuf + 320, 640, _currentGfxBackground + 44800, 320, _scrollOffset, _locationHeight);
|
||||
}
|
||||
drawData3();
|
||||
execData3PreUpdate();
|
||||
|
Loading…
x
Reference in New Issue
Block a user