diff options
Diffstat (limited to 'apps/plugins/doom/i_video.c')
-rw-r--r-- | apps/plugins/doom/i_video.c | 21 |
1 files changed, 17 insertions, 4 deletions
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 @@ | |||
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.7 2006/04/03 16:30:12 kkurbjun | 19 | * Revision 1.8 2006/04/03 17:11:42 kkurbjun |
20 | * Finishing touches | ||
21 | * | ||
22 | * Revision 1.7 2006-04-03 16:30:12 kkurbjun | ||
20 | * Fix #if | 23 | * Fix #if |
21 | * | 24 | * |
22 | * Revision 1.5 2006-04-03 08:51:08 bger | 25 | * Revision 1.5 2006-04-03 08:51:08 bger |
@@ -27,7 +30,11 @@ | |||
27 | * Properly ifdef H300 video code, fix commented line handling rockbox volume | 30 | * Properly ifdef H300 video code, fix commented line handling rockbox volume |
28 | * | 31 | * |
29 | * Revision 1.3 2006-04-02 01:52:44 kkurbjun | 32 | * Revision 1.3 2006-04-02 01:52:44 kkurbjun |
30 | * 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. | 33 | * Update adds prboom's high resolution support, also makes the scaling for |
34 | * platforms w/ resolution less then 320x200 much nicer. IDoom's lookup table | ||
35 | * code has been removed. Also fixed a pallete bug. Some graphic errors are | ||
36 | * present in menu and status bar. Also updates some headers and output | ||
37 | * formatting. | ||
31 | * | 38 | * |
32 | * Revision 1.2 2006-03-28 17:20:49 christian | 39 | * Revision 1.2 2006-03-28 17:20:49 christian |
33 | * added good (tm) button mappings for x5, and added ifdef for HAS_BUTTON_HOLD | 40 | * added good (tm) button mappings for x5, and added ifdef for HAS_BUTTON_HOLD |
@@ -38,6 +45,7 @@ | |||
38 | * | 45 | * |
39 | * DESCRIPTION: | 46 | * DESCRIPTION: |
40 | * DOOM graphics and buttons. H300 Port by Karl Kurbjun | 47 | * DOOM graphics and buttons. H300 Port by Karl Kurbjun |
48 | * H100 Port by Dave Chapman, Karl Kurbjun and Jens Arnold | ||
41 | * IPOD port by Dave Chapman and Paul Louden | 49 | * IPOD port by Dave Chapman and Paul Louden |
42 | * Additional work by Thom Johansen | 50 | * Additional work by Thom Johansen |
43 | * | 51 | * |
@@ -56,7 +64,7 @@ | |||
56 | 64 | ||
57 | #ifndef HAVE_LCD_COLOR | 65 | #ifndef HAVE_LCD_COLOR |
58 | #include "../lib/gray.h" | 66 | #include "../lib/gray.h" |
59 | static fb_data graybuffer[LCD_HEIGHT*LCD_WIDTH]; /* off screen buffer */ | 67 | static unsigned char graybuffer[LCD_HEIGHT*LCD_WIDTH]; /* off screen buffer */ |
60 | static unsigned char *gbuf; | 68 | static unsigned char *gbuf; |
61 | static unsigned int gbuf_size = 0; | 69 | static unsigned int gbuf_size = 0; |
62 | #endif | 70 | #endif |
@@ -72,6 +80,9 @@ static fb_data *paldata=NULL; | |||
72 | // | 80 | // |
73 | void I_ShutdownGraphics(void) | 81 | void I_ShutdownGraphics(void) |
74 | { | 82 | { |
83 | #ifndef HAVE_LCD_COLOR | ||
84 | gray_release(); | ||
85 | #endif | ||
75 | } | 86 | } |
76 | 87 | ||
77 | // | 88 | // |
@@ -313,7 +324,7 @@ static void I_UploadNewPalette(int pal) | |||
313 | int b = gtable[pall[2]]; | 324 | int b = gtable[pall[2]]; |
314 | pall+=3; | 325 | pall+=3; |
315 | #ifndef HAVE_LCD_COLOR | 326 | #ifndef HAVE_LCD_COLOR |
316 | paldata[i]=(r+g+b)/3; | 327 | paldata[i]=(3*r+6*g+b)/10; |
317 | #else | 328 | #else |
318 | paldata[i] = LCD_RGBPACK(r,g,b); | 329 | paldata[i] = LCD_RGBPACK(r,g,b); |
319 | #endif | 330 | #endif |
@@ -422,6 +433,8 @@ void I_InitGraphics(void) | |||
422 | 433 | ||
423 | printf("Starting Graphics engine\n"); | 434 | printf("Starting Graphics engine\n"); |
424 | 435 | ||
436 | noprintf=1; | ||
437 | |||
425 | /* Note: The other screens are allocated as needed */ | 438 | /* Note: The other screens are allocated as needed */ |
426 | 439 | ||
427 | #ifndef HAVE_LCD_COLOR | 440 | #ifndef HAVE_LCD_COLOR |