r240 - trunk/rott
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri Aug 8 12:28:54 EDT 2008
Author: fabian
Date: 2008-08-08 12:28:54 -0400 (Fri, 08 Aug 2008)
New Revision: 240
Modified:
trunk/rott/rt_vid.c
Log:
Applied rott-1.1-gameover.patch from Hans de Goede to fix corrupted "Game Over" screen in resolutions higher than 320x200.
Modified: trunk/rott/rt_vid.c
===================================================================
--- trunk/rott/rt_vid.c 2008-07-14 17:09:15 UTC (rev 239)
+++ trunk/rott/rt_vid.c 2008-08-08 16:28:54 UTC (rev 240)
@@ -1099,38 +1099,23 @@
void VL_DecompressLBM (lbm_t *lbminfo, boolean flip)
{
- byte *screen = (byte *)bufferofs;
- byte *orig;
- int count;
- byte b,
- rept;
+ int count;
+ byte b, rept;
byte *source = (byte *)&lbminfo->data;
byte *buf;
int ht = lbminfo->height;
-
- int x = 0;
- int y;
- byte *origbuf;
byte pal[768];
-
-
- orig = screen;
-
- if (iGLOBAL_SCREENWIDTH <= 320){
- buf = (byte *) SafeMalloc (64000);
- }else{
- buf = (byte *) SafeMalloc (iGLOBAL_SCREENWIDTH*iGLOBAL_SCREENHEIGHT);
- }
- origbuf = buf;
-
- VL_ClearBuffer (displayofs, 0);
-
+
+ EnableScreenStretch();
+
memcpy(&pal[0],lbminfo->palette,768);
VL_NormalizePalette (&pal[0]);
VW_MarkUpdateBlock (0, 0, 320, 200);
+ buf = (byte *)bufferofs;
+
while (ht--)
{
count = 0;
@@ -1163,36 +1148,7 @@
buf += (iGLOBAL_SCREENWIDTH-320); //eg 800 - 320)
}
}
- //SetTextMode ( ); //12345678
- {
- int cnt;
-
- cnt = 0;
- screen = orig;
- buf = origbuf;
- VGAMAPMASK (writemask);
-
- //bna section start
- if (iGLOBAL_SCREENWIDTH <= 320){
- for (y = 0; y < (lbminfo->height*lbminfo->width); y++)
-
- {
- *screen++ = *(buf+y);
- }
- }else{
- for (y = 0; y < (lbminfo->height); y++){
- for (x = 0; x < iGLOBAL_SCREENWIDTH; x++){
- *screen++ = *(buf++);
- }
- }
- }
- // bna section end
-
- }
-
- SafeFree(origbuf);
- EnableScreenStretch();//bna++ shut on streech mode
if (flip==true)
VW_UpdateScreen ();
More information about the rott-commits
mailing list