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
This commit is contained in:
parent
33a62e8a8e
commit
45f2df0eba
3 changed files with 20 additions and 6 deletions
|
@ -304,7 +304,7 @@ void F_TextWrite (void)
|
|||
}
|
||||
|
||||
w = SHORT (hu_font[c].width);
|
||||
if (cx+w > SCREENWIDTH)
|
||||
if (cx+w > 320)
|
||||
break;
|
||||
// CPhipps - patch drawing updated
|
||||
V_DrawNumPatch(cx, cy, 0, hu_font[c].lumpnum, CR_DEFAULT, VPT_STRETCH);
|
||||
|
@ -638,7 +638,7 @@ static void F_BunnyScroll (void)
|
|||
laststage = stage;
|
||||
}
|
||||
|
||||
snprintf (name,sizeof(name), "END%i",stage);
|
||||
snprintf (name,sizeof(name), "END%d",stage);
|
||||
// CPhipps - patch drawing updated
|
||||
V_DrawNamePatch((320-13*8)/2, (200-8*8)/2, 0, name, CR_DEFAULT, VPT_STRETCH);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,10 @@
|
|||
* GNU General Public License for more details.
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.11 2006/04/04 19:39:31 amiconn
|
||||
* Revision 1.12 2006/04/05 06:37:37 kkurbjun
|
||||
* 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
|
||||
*
|
||||
* Revision 1.11 2006-04-04 19:39:31 amiconn
|
||||
* 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.
|
||||
*
|
||||
* Revision 1.10 2006-04-04 12:00:53 dave
|
||||
|
@ -79,7 +82,7 @@ static unsigned char *gbuf;
|
|||
#endif
|
||||
|
||||
#if defined(CPU_COLDFIRE)
|
||||
static char fastscreen[LCD_WIDTH*LCD_HEIGHT] IBSS_ATTR;
|
||||
static char fastscreen[(LCD_WIDTH+1)*LCD_HEIGHT] IBSS_ATTR;
|
||||
#endif
|
||||
static fb_data palette[256] IBSS_ATTR;
|
||||
static fb_data *paldata=NULL;
|
||||
|
@ -465,6 +468,6 @@ void I_InitGraphics(void)
|
|||
d_screens[0] = fastscreen;
|
||||
#else
|
||||
// Don't know if this will fit in other IRAMs
|
||||
d_screens[0] = malloc (SCREENWIDTH * SCREENHEIGHT * sizeof(unsigned char));
|
||||
d_screens[0] = malloc ((SCREENWIDTH+1) * SCREENHEIGHT * sizeof(unsigned char));
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -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]];
|
||||
|
|
Loading…
Reference in a new issue