diff options
| author | Karl Kurbjun <kkurbjun@gmail.com> | 2006-04-03 17:11:42 +0000 |
|---|---|---|
| committer | Karl Kurbjun <kkurbjun@gmail.com> | 2006-04-03 17:11:42 +0000 |
| commit | 6e3371110e6606b38b79ea96d73c487c00659e27 (patch) | |
| tree | 2a66448e3f19cef468988518f37981244e704a77 /apps/plugins/doom | |
| parent | 9f4898a3f2f67c8b3323c8a1829f74087ac22eb9 (diff) | |
| download | rockbox-6e3371110e6606b38b79ea96d73c487c00659e27.zip rockbox-6e3371110e6606b38b79ea96d73c487c00659e27.tar.gz rockbox-6e3371110e6606b38b79ea96d73c487c00659e27.tar.bz2 rockbox-6e3371110e6606b38b79ea96d73c487c00659e27.tar.xz | |
Finishing touches
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9460 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/doom')
| -rw-r--r-- | apps/plugins/doom/i_system.c | 8 | ||||
| -rw-r--r-- | apps/plugins/doom/i_video.c | 21 | ||||
| -rw-r--r-- | apps/plugins/doom/rockdoom.c | 8 | ||||
| -rw-r--r-- | apps/plugins/doom/rockmacros.h | 1 |
4 files changed, 28 insertions, 10 deletions
diff --git a/apps/plugins/doom/i_system.c b/apps/plugins/doom/i_system.c index d217773..ffed416 100644 --- a/apps/plugins/doom/i_system.c +++ b/apps/plugins/doom/i_system.c @@ -16,7 +16,10 @@ // GNU General Public License for more details. // // $Log$ -// Revision 1.4 2006/04/03 17:00:56 dave +// Revision 1.5 2006/04/03 17:11:42 kkurbjun +// Finishing touches +// +// Revision 1.4 2006-04-03 17:00:56 dave // Doom can't use the user timer at the same time as using the grayscale lib. // // Revision 1.3 2006-04-02 12:45:29 amiconn @@ -134,9 +137,6 @@ void I_Error (char *error, ...) // Shutdown. Here might be other errors. if (demorecording) G_CheckDemoStatus(); -/* - I_ShutdownGraphics(); -*/ I_Quit(); rb->sleep(HZ*2); diff --git a/apps/plugins/doom/i_video.c b/apps/plugins/doom/i_video.c index 61cd3f3..473f349 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 diff --git a/apps/plugins/doom/rockdoom.c b/apps/plugins/doom/rockdoom.c index 1810acd..bc433e7 100644 --- a/apps/plugins/doom/rockdoom.c +++ b/apps/plugins/doom/rockdoom.c @@ -105,6 +105,8 @@ int my_close(int id) struct plugin_api* rb; #define MAXARGVS 100 +bool noprintf=0; // Variable disables printf lcd updates to protect grayscale lib/direct lcd updates + // Here is a hacked up printf command to get the output from the game. int printf(const char *fmt, ...) { @@ -118,13 +120,15 @@ int printf(const char *fmt, ...) va_end(ap); rb->lcd_putsxy(1,p_xtpt, (unsigned char *)p_buf); - rb->lcd_update(); + if (!noprintf) + rb->lcd_update(); p_xtpt+=8; if(p_xtpt>LCD_HEIGHT-8) { p_xtpt=0; - rb->lcd_clear_display(); + if (!noprintf) + rb->lcd_clear_display(); } return 1; } diff --git a/apps/plugins/doom/rockmacros.h b/apps/plugins/doom/rockmacros.h index e428331..8f028d4 100644 --- a/apps/plugins/doom/rockmacros.h +++ b/apps/plugins/doom/rockmacros.h @@ -25,6 +25,7 @@ #include "z_zone.h" extern struct plugin_api* rb; +extern bool noprintf; /* libc functions */ int printf(const char *fmt, ...); |