forked from len0rd/rockbox
Finishing touches
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9460 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
9f4898a3f2
commit
6e3371110e
4 changed files with 28 additions and 10 deletions
|
@ -16,7 +16,10 @@
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// $Log$
|
// $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.
|
// 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
|
// 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.
|
// Shutdown. Here might be other errors.
|
||||||
if (demorecording)
|
if (demorecording)
|
||||||
G_CheckDemoStatus();
|
G_CheckDemoStatus();
|
||||||
/*
|
|
||||||
I_ShutdownGraphics();
|
|
||||||
*/
|
|
||||||
|
|
||||||
I_Quit();
|
I_Quit();
|
||||||
rb->sleep(HZ*2);
|
rb->sleep(HZ*2);
|
||||||
|
|
|
@ -16,7 +16,10 @@
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* $Log$
|
* $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
|
* Fix #if
|
||||||
*
|
*
|
||||||
* Revision 1.5 2006-04-03 08:51:08 bger
|
* 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
|
* Properly ifdef H300 video code, fix commented line handling rockbox volume
|
||||||
*
|
*
|
||||||
* Revision 1.3 2006-04-02 01:52:44 kkurbjun
|
* 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
|
* Revision 1.2 2006-03-28 17:20:49 christian
|
||||||
* added good (tm) button mappings for x5, and added ifdef for HAS_BUTTON_HOLD
|
* added good (tm) button mappings for x5, and added ifdef for HAS_BUTTON_HOLD
|
||||||
|
@ -38,6 +45,7 @@
|
||||||
*
|
*
|
||||||
* DESCRIPTION:
|
* DESCRIPTION:
|
||||||
* DOOM graphics and buttons. H300 Port by Karl Kurbjun
|
* 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
|
* IPOD port by Dave Chapman and Paul Louden
|
||||||
* Additional work by Thom Johansen
|
* Additional work by Thom Johansen
|
||||||
*
|
*
|
||||||
|
@ -56,7 +64,7 @@
|
||||||
|
|
||||||
#ifndef HAVE_LCD_COLOR
|
#ifndef HAVE_LCD_COLOR
|
||||||
#include "../lib/gray.h"
|
#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 char *gbuf;
|
||||||
static unsigned int gbuf_size = 0;
|
static unsigned int gbuf_size = 0;
|
||||||
#endif
|
#endif
|
||||||
|
@ -72,6 +80,9 @@ static fb_data *paldata=NULL;
|
||||||
//
|
//
|
||||||
void I_ShutdownGraphics(void)
|
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]];
|
int b = gtable[pall[2]];
|
||||||
pall+=3;
|
pall+=3;
|
||||||
#ifndef HAVE_LCD_COLOR
|
#ifndef HAVE_LCD_COLOR
|
||||||
paldata[i]=(r+g+b)/3;
|
paldata[i]=(3*r+6*g+b)/10;
|
||||||
#else
|
#else
|
||||||
paldata[i] = LCD_RGBPACK(r,g,b);
|
paldata[i] = LCD_RGBPACK(r,g,b);
|
||||||
#endif
|
#endif
|
||||||
|
@ -422,6 +433,8 @@ void I_InitGraphics(void)
|
||||||
|
|
||||||
printf("Starting Graphics engine\n");
|
printf("Starting Graphics engine\n");
|
||||||
|
|
||||||
|
noprintf=1;
|
||||||
|
|
||||||
/* Note: The other screens are allocated as needed */
|
/* Note: The other screens are allocated as needed */
|
||||||
|
|
||||||
#ifndef HAVE_LCD_COLOR
|
#ifndef HAVE_LCD_COLOR
|
||||||
|
|
|
@ -105,6 +105,8 @@ int my_close(int id)
|
||||||
struct plugin_api* rb;
|
struct plugin_api* rb;
|
||||||
#define MAXARGVS 100
|
#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.
|
// Here is a hacked up printf command to get the output from the game.
|
||||||
int printf(const char *fmt, ...)
|
int printf(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
|
@ -118,13 +120,15 @@ int printf(const char *fmt, ...)
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
||||||
rb->lcd_putsxy(1,p_xtpt, (unsigned char *)p_buf);
|
rb->lcd_putsxy(1,p_xtpt, (unsigned char *)p_buf);
|
||||||
rb->lcd_update();
|
if (!noprintf)
|
||||||
|
rb->lcd_update();
|
||||||
|
|
||||||
p_xtpt+=8;
|
p_xtpt+=8;
|
||||||
if(p_xtpt>LCD_HEIGHT-8)
|
if(p_xtpt>LCD_HEIGHT-8)
|
||||||
{
|
{
|
||||||
p_xtpt=0;
|
p_xtpt=0;
|
||||||
rb->lcd_clear_display();
|
if (!noprintf)
|
||||||
|
rb->lcd_clear_display();
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include "z_zone.h"
|
#include "z_zone.h"
|
||||||
|
|
||||||
extern struct plugin_api* rb;
|
extern struct plugin_api* rb;
|
||||||
|
extern bool noprintf;
|
||||||
|
|
||||||
/* libc functions */
|
/* libc functions */
|
||||||
int printf(const char *fmt, ...);
|
int printf(const char *fmt, ...);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue