From 6e3371110e6606b38b79ea96d73c487c00659e27 Mon Sep 17 00:00:00 2001 From: Karl Kurbjun Date: Mon, 3 Apr 2006 17:11:42 +0000 Subject: Finishing touches git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9460 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/doom/i_video.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'apps/plugins/doom/i_video.c') diff --git a/apps/plugins/doom/i_video.c b/apps/plugins/doom/i_video.c index 61cd3f3fe2..473f349b0c 100644 --- a/apps/plugins/doom/i_video.c +++ b/apps/plugins/doom/i_video.c @@ -16,7 +16,10 @@ * GNU General Public License for more details. * * $Log$ - * Revision 1.7 2006/04/03 16:30:12 kkurbjun + * Revision 1.8 2006/04/03 17:11:42 kkurbjun + * Finishing touches + * + * Revision 1.7 2006-04-03 16:30:12 kkurbjun * Fix #if * * Revision 1.5 2006-04-03 08:51:08 bger @@ -27,7 +30,11 @@ * Properly ifdef H300 video code, fix commented line handling rockbox volume * * Revision 1.3 2006-04-02 01:52:44 kkurbjun - * Update adds prboom's high resolution support, also makes the scaling for platforms w/ resolution less then 320x200 much nicer. IDoom's lookup table code has been removed. Also fixed a pallete bug. Some graphic errors are present in menu and status bar. Also updates some headers and output formatting. + * Update adds prboom's high resolution support, also makes the scaling for + * platforms w/ resolution less then 320x200 much nicer. IDoom's lookup table + * code has been removed. Also fixed a pallete bug. Some graphic errors are + * present in menu and status bar. Also updates some headers and output + * formatting. * * Revision 1.2 2006-03-28 17:20:49 christian * added good (tm) button mappings for x5, and added ifdef for HAS_BUTTON_HOLD @@ -38,6 +45,7 @@ * * DESCRIPTION: * DOOM graphics and buttons. H300 Port by Karl Kurbjun + * H100 Port by Dave Chapman, Karl Kurbjun and Jens Arnold * IPOD port by Dave Chapman and Paul Louden * Additional work by Thom Johansen * @@ -56,7 +64,7 @@ #ifndef HAVE_LCD_COLOR #include "../lib/gray.h" -static fb_data graybuffer[LCD_HEIGHT*LCD_WIDTH]; /* off screen buffer */ +static unsigned char graybuffer[LCD_HEIGHT*LCD_WIDTH]; /* off screen buffer */ static unsigned char *gbuf; static unsigned int gbuf_size = 0; #endif @@ -72,6 +80,9 @@ static fb_data *paldata=NULL; // void I_ShutdownGraphics(void) { +#ifndef HAVE_LCD_COLOR + gray_release(); +#endif } // @@ -313,7 +324,7 @@ static void I_UploadNewPalette(int pal) int b = gtable[pall[2]]; pall+=3; #ifndef HAVE_LCD_COLOR - paldata[i]=(r+g+b)/3; + paldata[i]=(3*r+6*g+b)/10; #else paldata[i] = LCD_RGBPACK(r,g,b); #endif @@ -422,6 +433,8 @@ void I_InitGraphics(void) printf("Starting Graphics engine\n"); + noprintf=1; + /* Note: The other screens are allocated as needed */ #ifndef HAVE_LCD_COLOR -- cgit v1.2.3