From: Jose V Beneyto Date: Thu, 21 Jan 2010 20:20:52 +0000 (+0100) Subject: reminiscence: fixed for lowres X-Git-Url: http://gitweb/?a=commitdiff_plain;h=dc11a0cb78e15b2f02b0eaf547307d29d26d6797;p=attic%2Fports%2Fgames-cross.git reminiscence: fixed for lowres --- diff --git a/reminiscence/.md5sum b/reminiscence/.md5sum index d3106b0..0e8c7de 100644 --- a/reminiscence/.md5sum +++ b/reminiscence/.md5sum @@ -1,2 +1,3 @@ 26bc8a0f2ef2ba53f61245ab6b2b2d6b REminiscence-0.1.9.tar.bz2 +cc030c4a357b35b92c8d48774ea7a62b reminiscence-0.1.9.lowres.patch 7a87aa1b2d2640ea9c87d435d4c772ac reminiscence-0.1.9.nosound.patch diff --git a/reminiscence/Pkgfile b/reminiscence/Pkgfile index ec0e4e1..57ee56b 100644 --- a/reminiscence/Pkgfile +++ b/reminiscence/Pkgfile @@ -7,14 +7,17 @@ name=reminiscence version=0.1.9 -release=3 +release=4 source=(http://cyxdown.free.fr/$name/REminiscence-$version.tar.bz2 \ - $name-$version.nosound.patch) + $name-$version.nosound.patch \ + $name-$version.lowres.patch) build() { cd REminiscence-$version patch -p1 -i $SRC/$name-$version.nosound.patch + patch -p1 -i $SRC/$name-$version.lowres.patch + sed -i Makefile -e "s|CXXFLAGS:=|CXXFLAGS:= $CXXFLAGS|" # fix default screen scaler and resolution sed -i systemstub_sdl.cpp -e 's|_scaler = 2;|_scaler = 0;|' diff --git a/reminiscence/reminiscence-0.1.9.lowres.patch b/reminiscence/reminiscence-0.1.9.lowres.patch new file mode 100644 index 0000000..8f076ee --- /dev/null +++ b/reminiscence/reminiscence-0.1.9.lowres.patch @@ -0,0 +1,146 @@ +diff -purN REminiscence-0.1.9.orig/video.cpp REminiscence-0.1.9/video.cpp +--- REminiscence-0.1.9.orig/video.cpp 2010-01-21 20:37:10.000000000 +0100 ++++ REminiscence-0.1.9/video.cpp 2010-01-21 21:16:09.000000000 +0100 +@@ -67,7 +67,7 @@ void Video::updateScreen() { + debug(DBG_VIDEO, "Video::updateScreen()"); + // _fullRefresh = true; + if (_fullRefresh) { +- _stub->copyRect(0, 0, Video::GAMESCREEN_W, Video::GAMESCREEN_H, _frontLayer, 256); ++ _stub->copyRect(0, 0, Video::GAMESCREEN_W, Video::GAMESCREEN_H, _frontLayer, GAMESCREEN_W); + _stub->updateScreen(_shakeOffset); + _fullRefresh = false; + } else { +@@ -82,14 +82,14 @@ void Video::updateScreen() { + ++nh; + } else if (nh != 0) { + int16 x = (i - nh) * SCREENBLOCK_W; +- _stub->copyRect(x, j * SCREENBLOCK_H, nh * SCREENBLOCK_W, SCREENBLOCK_H, _frontLayer, 256); ++ _stub->copyRect(x, j * SCREENBLOCK_H, nh * SCREENBLOCK_W, SCREENBLOCK_H, _frontLayer, GAMESCREEN_W); + nh = 0; + ++count; + } + } + if (nh != 0) { + int16 x = (i - nh) * SCREENBLOCK_W; +- _stub->copyRect(x, j * SCREENBLOCK_H, nh * SCREENBLOCK_W, SCREENBLOCK_H, _frontLayer, 256); ++ _stub->copyRect(x, j * SCREENBLOCK_H, nh * SCREENBLOCK_W, SCREENBLOCK_H, _frontLayer, GAMESCREEN_W); + ++count; + } + p += GAMESCREEN_W / SCREENBLOCK_W; +@@ -113,7 +113,7 @@ void Video::fullRefresh() { + void Video::fadeOut() { + debug(DBG_VIDEO, "Video::fadeOut()"); + for (int step = 16; step >= 0; --step) { +- for (int c = 0; c < 256; ++c) { ++ for (int c = 0; c < GAMESCREEN_W; ++c) { + Color col; + _stub->getPaletteEntry(c, &col); + col.r = col.r * step >> 4; +@@ -200,14 +200,14 @@ void Video::copyLevelMap(uint16 room) { + for (int i = 0; i < 4; ++i) { + uint16 sz = READ_LE_UINT16(p); p += 2; + decodeLevelMap(sz, p, _res->_memBuf); p += sz; +- memcpy(vid, _res->_memBuf, 256 * 56); +- vid += 256 * 56; ++ memcpy(vid, _res->_memBuf, GAMESCREEN_W * 56); ++ vid += GAMESCREEN_W * 56; + } + } else { + for (int i = 0; i < 4; ++i) { +- for (int y = 0; y < 224; ++y) { ++ for (int y = 0; y < GAMESCREEN_H; ++y) { + for (int x = 0; x < 64; ++x) { +- _frontLayer[i + x * 4 + 256 * y] = p[256 * 56 * i + x + 64 * y]; ++ _frontLayer[i + x * 4 + GAMESCREEN_W * y] = p[GAMESCREEN_W * 56 * i + x + 64 * y]; + } + } + } +@@ -268,7 +268,7 @@ void Video::drawSpriteSub1(const uint8 * + } + } + src += pitch; +- dst += 256; ++ dst += GAMESCREEN_W; + } + } + +@@ -281,7 +281,7 @@ void Video::drawSpriteSub2(const uint8 * + } + } + src += pitch; +- dst += 256; ++ dst += GAMESCREEN_W; + } + } + +@@ -294,7 +294,7 @@ void Video::drawSpriteSub3(const uint8 * + } + } + src += pitch; +- dst += 256; ++ dst += GAMESCREEN_W; + } + } + +@@ -307,7 +307,7 @@ void Video::drawSpriteSub4(const uint8 * + } + } + src += pitch; +- dst += 256; ++ dst += GAMESCREEN_W; + } + } + +@@ -320,7 +320,7 @@ void Video::drawSpriteSub5(const uint8 * + } + } + ++src; +- dst += 256; ++ dst += GAMESCREEN_W; + } + } + +@@ -333,7 +333,7 @@ void Video::drawSpriteSub6(const uint8 * + } + } + ++src; +- dst += 256; ++ dst += GAMESCREEN_W; + } + } + +@@ -342,7 +342,7 @@ void Video::drawChar(uint8 c, int16 y, i + y *= 8; + x *= 8; + const uint8 *src = _res->_fnt + (c - 32) * 32; +- uint8 *dst = _frontLayer + x + 256 * y; ++ uint8 *dst = _frontLayer + x + GAMESCREEN_W * y; + for (int h = 0; h < 8; ++h) { + for (int i = 0; i < 4; ++i) { + uint8 c1 = (*src & 0xF0) >> 4; +@@ -371,14 +371,14 @@ void Video::drawChar(uint8 c, int16 y, i + } + ++dst; + } +- dst += 256 - 8; ++ dst += GAMESCREEN_W - 8; + } + } + + const char *Video::drawString(const char *str, int16 x, int16 y, uint8 col) { + debug(DBG_VIDEO, "Video::drawString('%s', %d, %d, 0x%X)", str, x, y, col); + int len = 0; +- int offset = y * 256 + x; ++ int offset = y * GAMESCREEN_W + x; + uint8 *dst = _frontLayer + offset; + while (1) { + uint8 c = *str++; +@@ -401,7 +401,7 @@ const char *Video::drawString(const char + } + ++dst_char; + } +- dst_char += 256 - 8; ++ dst_char += GAMESCREEN_W - 8; + } + dst += 8; // character width + ++len;