summaryrefslogtreecommitdiff
path: root/apps/plugins/doom/v_video.c
diff options
context:
space:
mode:
authorKarl Kurbjun <kkurbjun@gmail.com>2006-04-05 06:37:37 +0000
committerKarl Kurbjun <kkurbjun@gmail.com>2006-04-05 06:37:37 +0000
commit45f2df0eba7a3ffa633a709e13d3b871592d2fc6 (patch)
treea34acb94f8766ab7d953d9cf03b30a92a2984d22 /apps/plugins/doom/v_video.c
parent33a62e8a8ebe8039101a2333e71bc2c2de8e5225 (diff)
downloadrockbox-45f2df0eba7a3ffa633a709e13d3b871592d2fc6.zip
rockbox-45f2df0eba7a3ffa633a709e13d3b871592d2fc6.tar.gz
rockbox-45f2df0eba7a3ffa633a709e13d3b871592d2fc6.tar.bz2
rockbox-45f2df0eba7a3ffa633a709e13d3b871592d2fc6.tar.xz
Fix finale text and try and prevent some data corruption due to the scaling code. Also allows the non-standard GP32 mods to work with some bounds checking. More comments are in v_video.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9511 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/doom/v_video.c')
-rw-r--r--apps/plugins/doom/v_video.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/apps/plugins/doom/v_video.c b/apps/plugins/doom/v_video.c
index ca90c4b..bd4d507 100644
--- a/apps/plugins/doom/v_video.c
+++ b/apps/plugins/doom/v_video.c
@@ -527,7 +527,7 @@ void V_DrawMemPatch(int x, int y, int scrn, const patch_t *patch,
byte *desttop;
int col;
- int w = (SHORT( patch->width ) << 16) - 1; // CPhipps - -1 for faster flipping
+ int w = (SHORT( patch->width ) << 16) -1; // CPhipps - -1 for faster flipping
int stretchx, stretchy;
int DX = (SCREENWIDTH<<16) / 320;
int DXI = (320<<16) / SCREENWIDTH;
@@ -559,6 +559,17 @@ void V_DrawMemPatch(int x, int y, int scrn, const patch_t *patch,
register int count = ( column->length * DY ) >> 16;
register int srccol = 0x8000;
+ count = (count>SCREENHEIGHT)?SCREENHEIGHT:count; // Bounds checking allows those messed up
+ // GP32 mods to work (they're using patch->
+ // height values of 240, this code cuts off
+ // thier bottom few pixels
+
+ // NOTE: This scaling code does not work correctly on at least the H300's, this can be seen
+ // in the intro graphic along the left side, the pixels are not correct. A more blatant
+ // example is the bunnyscroller at the end of retail doom episode 3. I've added one extra
+ // width to d_screens[0] and this seemed to stop the freeze at the end of the game. This
+ // needs to be fixed properly.
+
if (flags & VPT_TRANS)
while (count--) {
*dest = trans[source[srccol>>16]];