CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
reminiscence: fixed for lowres
authorJose V Beneyto <sepen@crux.nu>
Thu, 21 Jan 2010 20:20:52 +0000 (21:20 +0100)
committerJose V Beneyto <sepen@crux.nu>
Thu, 21 Jan 2010 20:20:52 +0000 (21:20 +0100)
reminiscence/.md5sum
reminiscence/Pkgfile
reminiscence/reminiscence-0.1.9.lowres.patch [new file with mode: 0644]

index d3106b01f2bd4bab96b24e66429c64bfe6ac7763..0e8c7de3089fb23559f7ce2888f631713cf637bd 100644 (file)
@@ -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
index ec0e4e12fc6337e6deffabe36a5255f0471cb722..57ee56b898e3509e9f9fc7a45641e6d6edc4e315 100644 (file)
@@ -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 (file)
index 0000000..8f076ee
--- /dev/null
@@ -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() {\r
+       debug(DBG_VIDEO, "Video::updateScreen()");\r
+ //    _fullRefresh = true;\r
+       if (_fullRefresh) {\r
+-              _stub->copyRect(0, 0, Video::GAMESCREEN_W, Video::GAMESCREEN_H, _frontLayer, 256);\r
++              _stub->copyRect(0, 0, Video::GAMESCREEN_W, Video::GAMESCREEN_H, _frontLayer, GAMESCREEN_W);\r
+               _stub->updateScreen(_shakeOffset);\r
+               _fullRefresh = false;\r
+       } else {\r
+@@ -82,14 +82,14 @@ void Video::updateScreen() {\r
+                                       ++nh;\r
+                               } else if (nh != 0) {\r
+                                       int16 x = (i - nh) * SCREENBLOCK_W;\r
+-                                      _stub->copyRect(x, j * SCREENBLOCK_H, nh * SCREENBLOCK_W, SCREENBLOCK_H, _frontLayer, 256);\r
++                                      _stub->copyRect(x, j * SCREENBLOCK_H, nh * SCREENBLOCK_W, SCREENBLOCK_H, _frontLayer, GAMESCREEN_W);\r
+                                       nh = 0;\r
+                                       ++count;\r
+                               }\r
+                       }\r
+                       if (nh != 0) {\r
+                               int16 x = (i - nh) * SCREENBLOCK_W;\r
+-                              _stub->copyRect(x, j * SCREENBLOCK_H, nh * SCREENBLOCK_W, SCREENBLOCK_H, _frontLayer, 256);\r
++                              _stub->copyRect(x, j * SCREENBLOCK_H, nh * SCREENBLOCK_W, SCREENBLOCK_H, _frontLayer, GAMESCREEN_W);\r
+                               ++count;\r
+                       }\r
+                       p += GAMESCREEN_W / SCREENBLOCK_W;\r
+@@ -113,7 +113,7 @@ void Video::fullRefresh() {\r
+ void Video::fadeOut() {\r
+       debug(DBG_VIDEO, "Video::fadeOut()");\r
+       for (int step = 16; step >= 0; --step) {\r
+-              for (int c = 0; c < 256; ++c) {\r
++              for (int c = 0; c < GAMESCREEN_W; ++c) {\r
+                       Color col;\r
+                       _stub->getPaletteEntry(c, &col);\r
+                       col.r = col.r * step >> 4;\r
+@@ -200,14 +200,14 @@ void Video::copyLevelMap(uint16 room) {\r
+               for (int i = 0; i < 4; ++i) {\r
+                       uint16 sz = READ_LE_UINT16(p); p += 2;\r
+                       decodeLevelMap(sz, p, _res->_memBuf); p += sz;\r
+-                      memcpy(vid, _res->_memBuf, 256 * 56);\r
+-                      vid += 256 * 56;\r
++                      memcpy(vid, _res->_memBuf, GAMESCREEN_W * 56);\r
++                      vid += GAMESCREEN_W * 56;\r
+               }\r
+       } else {\r
+               for (int i = 0; i < 4; ++i) {\r
+-                      for (int y = 0; y < 224; ++y) {\r
++                      for (int y = 0; y < GAMESCREEN_H; ++y) {\r
+                               for (int x = 0; x < 64; ++x) {\r
+-                                      _frontLayer[i + x * 4 + 256 * y] = p[256 * 56 * i + x + 64 * y];\r
++                                      _frontLayer[i + x * 4 + GAMESCREEN_W * y] = p[GAMESCREEN_W * 56 * i + x + 64 * y];\r
+                               }\r
+                       }\r
+               }\r
+@@ -268,7 +268,7 @@ void Video::drawSpriteSub1(const uint8 *
+                       }\r
+               }\r
+               src += pitch;\r
+-              dst += 256;\r
++              dst += GAMESCREEN_W;\r
+       }\r
+ }\r
\r
+@@ -281,7 +281,7 @@ void Video::drawSpriteSub2(const uint8 *
+                       }\r
+               }\r
+               src += pitch;\r
+-              dst += 256;\r
++              dst += GAMESCREEN_W;\r
+       }\r
+ }\r
\r
+@@ -294,7 +294,7 @@ void Video::drawSpriteSub3(const uint8 *
+                       }\r
+               }\r
+               src += pitch;\r
+-              dst += 256;\r
++              dst += GAMESCREEN_W;\r
+       }\r
+ }\r
\r
+@@ -307,7 +307,7 @@ void Video::drawSpriteSub4(const uint8 *
+                       }\r
+               }\r
+               src += pitch;\r
+-              dst += 256;\r
++              dst += GAMESCREEN_W;\r
+       }\r
+ }\r
\r
+@@ -320,7 +320,7 @@ void Video::drawSpriteSub5(const uint8 *
+                       }\r
+               }\r
+               ++src;\r
+-              dst += 256;\r
++              dst += GAMESCREEN_W;\r
+       }\r
+ }\r
\r
+@@ -333,7 +333,7 @@ void Video::drawSpriteSub6(const uint8 *
+                       }\r
+               }\r
+               ++src;\r
+-              dst += 256;\r
++              dst += GAMESCREEN_W;\r
+       }\r
+ }\r
\r
+@@ -342,7 +342,7 @@ void Video::drawChar(uint8 c, int16 y, i
+       y *= 8;\r
+       x *= 8;\r
+       const uint8 *src = _res->_fnt + (c - 32) * 32;\r
+-      uint8 *dst = _frontLayer + x + 256 * y;\r
++      uint8 *dst = _frontLayer + x + GAMESCREEN_W * y;\r
+       for (int h = 0; h < 8; ++h) {\r
+               for (int i = 0; i < 4; ++i) {\r
+                       uint8 c1 = (*src & 0xF0) >> 4;\r
+@@ -371,14 +371,14 @@ void Video::drawChar(uint8 c, int16 y, i
+                       }\r
+                       ++dst;\r
+               }\r
+-              dst += 256 - 8;\r
++              dst += GAMESCREEN_W - 8;\r
+       }\r
+ }\r
\r
+ const char *Video::drawString(const char *str, int16 x, int16 y, uint8 col) {\r
+       debug(DBG_VIDEO, "Video::drawString('%s', %d, %d, 0x%X)", str, x, y, col);\r
+       int len = 0;\r
+-      int offset = y * 256 + x;\r
++      int offset = y * GAMESCREEN_W + x;\r
+       uint8 *dst = _frontLayer + offset;\r
+       while (1) {\r
+               uint8 c = *str++;\r
+@@ -401,7 +401,7 @@ const char *Video::drawString(const char
+                               }\r
+                               ++dst_char;\r
+                       }\r
+-                      dst_char += 256 - 8;\r
++                      dst_char += GAMESCREEN_W - 8;\r
+               }\r
+               dst += 8; // character width\r
+               ++len;\r