aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authoruruk2013-07-24 19:47:41 +0200
committeruruk2013-07-24 19:47:41 +0200
commit03665fac214574ec58458676789347855c34c29a (patch)
tree6a335490bbcb12b818e8201a1f3a3890fc23abe7 /engines
parent39dfddff1f3d35c889e1a0ea7053a4e648e036fa (diff)
downloadscummvm-rg350-03665fac214574ec58458676789347855c34c29a.tar.gz
scummvm-rg350-03665fac214574ec58458676789347855c34c29a.tar.bz2
scummvm-rg350-03665fac214574ec58458676789347855c34c29a.zip
AVALANCHE: Graphics: double screen height.
Diffstat (limited to 'engines')
-rw-r--r--engines/avalanche/graphics.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/engines/avalanche/graphics.cpp b/engines/avalanche/graphics.cpp
index 8035491bfb..287f85c092 100644
--- a/engines/avalanche/graphics.cpp
+++ b/engines/avalanche/graphics.cpp
@@ -48,7 +48,7 @@ Graphics::Graphics(AvalancheEngine *vm) {
}
void Graphics::init() {
- initGraphics(kScreenWidth, kScreenHeight, true);
+ initGraphics(kScreenWidth, kScreenHeight * 2, true); // Doubling the height.
for (int i = 0; i < 64; ++i) {
_egaPalette[i][0] = (i >> 2 & 1) * 0xaa + (i >> 5 & 1) * 0x55;
@@ -141,8 +141,18 @@ void Graphics::drawPicture(const byte *source, uint16 destX, uint16 destY) {
}
void Graphics::refreshScreen() {
- g_system->copyRectToScreen(_surface.pixels, _surface.pitch , 0, 0, kScreenWidth, kScreenHeight);
+ // These cycles are for doubling the screen height.
+ ::Graphics::Surface source;
+ source.create(kScreenWidth, kScreenHeight * 2, ::Graphics::PixelFormat::createFormatCLUT8());
+ for (uint16 y = 0; y < source.h / 2; y++)
+ for (uint16 x = 0; x < source.w; x++)
+ for (byte j = 0; j < 2; j++)
+ *(byte *)source.getBasePtr(x, y * 2 + j) = *(byte *)_surface.getBasePtr(x, y);
+
+ // Now we copy the stretched picture to the screen.
+ g_system->copyRectToScreen(source.pixels, source.pitch , 0, 0, kScreenWidth, kScreenHeight * 2);
g_system->updateScreen();
}
+
} // End of namespace Avalanche