diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugins/doom/f_finale.c | 4 | ||||
-rw-r--r-- | apps/plugins/doom/i_video.c | 9 | ||||
-rw-r--r-- | apps/plugins/doom/v_video.c | 13 |
3 files changed, 20 insertions, 6 deletions
diff --git a/apps/plugins/doom/f_finale.c b/apps/plugins/doom/f_finale.c index 4deb3df689..3af27d2785 100644 --- a/apps/plugins/doom/f_finale.c +++ b/apps/plugins/doom/f_finale.c | |||
@@ -304,7 +304,7 @@ void F_TextWrite (void) | |||
304 | } | 304 | } |
305 | 305 | ||
306 | w = SHORT (hu_font[c].width); | 306 | w = SHORT (hu_font[c].width); |
307 | if (cx+w > SCREENWIDTH) | 307 | if (cx+w > 320) |
308 | break; | 308 | break; |
309 | // CPhipps - patch drawing updated | 309 | // CPhipps - patch drawing updated |
310 | V_DrawNumPatch(cx, cy, 0, hu_font[c].lumpnum, CR_DEFAULT, VPT_STRETCH); | 310 | V_DrawNumPatch(cx, cy, 0, hu_font[c].lumpnum, CR_DEFAULT, VPT_STRETCH); |
@@ -638,7 +638,7 @@ static void F_BunnyScroll (void) | |||
638 | laststage = stage; | 638 | laststage = stage; |
639 | } | 639 | } |
640 | 640 | ||
641 | snprintf (name,sizeof(name), "END%i",stage); | 641 | snprintf (name,sizeof(name), "END%d",stage); |
642 | // CPhipps - patch drawing updated | 642 | // CPhipps - patch drawing updated |
643 | V_DrawNamePatch((320-13*8)/2, (200-8*8)/2, 0, name, CR_DEFAULT, VPT_STRETCH); | 643 | V_DrawNamePatch((320-13*8)/2, (200-8*8)/2, 0, name, CR_DEFAULT, VPT_STRETCH); |
644 | } | 644 | } |
diff --git a/apps/plugins/doom/i_video.c b/apps/plugins/doom/i_video.c index 69583f5e36..f7de1aa84c 100644 --- a/apps/plugins/doom/i_video.c +++ b/apps/plugins/doom/i_video.c | |||
@@ -16,7 +16,10 @@ | |||
16 | * GNU General Public License for more details. | 16 | * GNU General Public License for more details. |
17 | * | 17 | * |
18 | * $Log$ | 18 | * $Log$ |
19 | * Revision 1.11 2006/04/04 19:39:31 amiconn | 19 | * Revision 1.12 2006/04/05 06:37:37 kkurbjun |
20 | * 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 | ||
21 | * | ||
22 | * Revision 1.11 2006-04-04 19:39:31 amiconn | ||
20 | * Doom on H1x0: Don't waste memory, the grayscale lib doesn't need that much, but properly tell the lib how much memory it may use. | 23 | * Doom on H1x0: Don't waste memory, the grayscale lib doesn't need that much, but properly tell the lib how much memory it may use. |
21 | * | 24 | * |
22 | * Revision 1.10 2006-04-04 12:00:53 dave | 25 | * Revision 1.10 2006-04-04 12:00:53 dave |
@@ -79,7 +82,7 @@ static unsigned char *gbuf; | |||
79 | #endif | 82 | #endif |
80 | 83 | ||
81 | #if defined(CPU_COLDFIRE) | 84 | #if defined(CPU_COLDFIRE) |
82 | static char fastscreen[LCD_WIDTH*LCD_HEIGHT] IBSS_ATTR; | 85 | static char fastscreen[(LCD_WIDTH+1)*LCD_HEIGHT] IBSS_ATTR; |
83 | #endif | 86 | #endif |
84 | static fb_data palette[256] IBSS_ATTR; | 87 | static fb_data palette[256] IBSS_ATTR; |
85 | static fb_data *paldata=NULL; | 88 | static fb_data *paldata=NULL; |
@@ -465,6 +468,6 @@ void I_InitGraphics(void) | |||
465 | d_screens[0] = fastscreen; | 468 | d_screens[0] = fastscreen; |
466 | #else | 469 | #else |
467 | // Don't know if this will fit in other IRAMs | 470 | // Don't know if this will fit in other IRAMs |
468 | d_screens[0] = malloc (SCREENWIDTH * SCREENHEIGHT * sizeof(unsigned char)); | 471 | d_screens[0] = malloc ((SCREENWIDTH+1) * SCREENHEIGHT * sizeof(unsigned char)); |
469 | #endif | 472 | #endif |
470 | } | 473 | } |
diff --git a/apps/plugins/doom/v_video.c b/apps/plugins/doom/v_video.c index ca90c4b293..bd4d507510 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, | |||
527 | 527 | ||
528 | byte *desttop; | 528 | byte *desttop; |
529 | int col; | 529 | int col; |
530 | int w = (SHORT( patch->width ) << 16) - 1; // CPhipps - -1 for faster flipping | 530 | int w = (SHORT( patch->width ) << 16) -1; // CPhipps - -1 for faster flipping |
531 | int stretchx, stretchy; | 531 | int stretchx, stretchy; |
532 | int DX = (SCREENWIDTH<<16) / 320; | 532 | int DX = (SCREENWIDTH<<16) / 320; |
533 | int DXI = (320<<16) / SCREENWIDTH; | 533 | int DXI = (320<<16) / SCREENWIDTH; |
@@ -559,6 +559,17 @@ void V_DrawMemPatch(int x, int y, int scrn, const patch_t *patch, | |||
559 | register int count = ( column->length * DY ) >> 16; | 559 | register int count = ( column->length * DY ) >> 16; |
560 | register int srccol = 0x8000; | 560 | register int srccol = 0x8000; |
561 | 561 | ||
562 | count = (count>SCREENHEIGHT)?SCREENHEIGHT:count; // Bounds checking allows those messed up | ||
563 | // GP32 mods to work (they're using patch-> | ||
564 | // height values of 240, this code cuts off | ||
565 | // thier bottom few pixels | ||
566 | |||
567 | // NOTE: This scaling code does not work correctly on at least the H300's, this can be seen | ||
568 | // in the intro graphic along the left side, the pixels are not correct. A more blatant | ||
569 | // example is the bunnyscroller at the end of retail doom episode 3. I've added one extra | ||
570 | // width to d_screens[0] and this seemed to stop the freeze at the end of the game. This | ||
571 | // needs to be fixed properly. | ||
572 | |||
562 | if (flags & VPT_TRANS) | 573 | if (flags & VPT_TRANS) |
563 | while (count--) { | 574 | while (count--) { |
564 | *dest = trans[source[srccol>>16]]; | 575 | *dest = trans[source[srccol>>16]]; |