forked from len0rd/rockbox
Better video update, add options to startup menu, change default screensize
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9754 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
8b2a563dfb
commit
65c15eb50b
4 changed files with 47 additions and 24 deletions
|
|
@ -16,7 +16,10 @@
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* $Log$
|
* $Log$
|
||||||
* Revision 1.16 2006/04/20 19:39:56 kkurbjun
|
* Revision 1.17 2006/04/22 03:48:15 kkurbjun
|
||||||
|
* Better video update, add options to startup menu, change default screensize
|
||||||
|
*
|
||||||
|
* Revision 1.16 2006-04-20 19:39:56 kkurbjun
|
||||||
* Optimizations for doom: coldfire asm drawspan routine = not much, fixed point multiply changes = not much, H300 asm lcd update = some, IRAM sound updates and simplifications = more
|
* Optimizations for doom: coldfire asm drawspan routine = not much, fixed point multiply changes = not much, H300 asm lcd update = some, IRAM sound updates and simplifications = more
|
||||||
*
|
*
|
||||||
* Revision 1.15 2006-04-16 23:14:04 kkurbjun
|
* Revision 1.15 2006-04-16 23:14:04 kkurbjun
|
||||||
|
|
@ -148,14 +151,14 @@ void I_ShutdownGraphics(void)
|
||||||
inline void getkey()
|
inline void getkey()
|
||||||
{
|
{
|
||||||
event_t event;
|
event_t event;
|
||||||
// Same button handling as rockboy
|
/* Same button handling as rockboy */
|
||||||
static unsigned int oldbuttonstate IDATA_ATTR = 0, newbuttonstate IDATA_ATTR=0 ;
|
static unsigned int oldbuttonstate IDATA_ATTR = 0;
|
||||||
|
|
||||||
static int released IBSS_ATTR, pressed IBSS_ATTR;
|
unsigned int released, pressed, newbuttonstate;
|
||||||
|
|
||||||
#ifdef HAS_BUTTON_HOLD
|
#ifdef HAS_BUTTON_HOLD
|
||||||
static unsigned int holdbutton IDATA_ATTR=0;
|
static unsigned int holdbutton IDATA_ATTR=0;
|
||||||
static int hswitch IDATA_ATTR=0;
|
static bool hswitch IDATA_ATTR=0;
|
||||||
if (rb->button_hold()&~holdbutton)
|
if (rb->button_hold()&~holdbutton)
|
||||||
{
|
{
|
||||||
if(hswitch==0)
|
if(hswitch==0)
|
||||||
|
|
@ -181,6 +184,8 @@ inline void getkey()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
newbuttonstate = rb->button_status();
|
newbuttonstate = rb->button_status();
|
||||||
|
if(newbuttonstate==oldbuttonstate) /* Don't continue, nothing left to do */
|
||||||
|
return;
|
||||||
released = ~newbuttonstate & oldbuttonstate;
|
released = ~newbuttonstate & oldbuttonstate;
|
||||||
pressed = newbuttonstate & ~oldbuttonstate;
|
pressed = newbuttonstate & ~oldbuttonstate;
|
||||||
oldbuttonstate = newbuttonstate;
|
oldbuttonstate = newbuttonstate;
|
||||||
|
|
@ -355,6 +360,7 @@ static void I_UploadNewPalette(int pal)
|
||||||
memcpy(palette,paldata+256*pal,256*sizeof(fb_data));
|
memcpy(palette,paldata+256*pal,256*sizeof(fb_data));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// I_FinishUpdate
|
// I_FinishUpdate
|
||||||
//
|
//
|
||||||
|
|
@ -369,24 +375,28 @@ void I_FinishUpdate (void)
|
||||||
"move.w #33,(%[LCD]) \n" /* Setup the LCD controller */
|
"move.w #33,(%[LCD]) \n" /* Setup the LCD controller */
|
||||||
"clr.w (%[LCD2]) \n"
|
"clr.w (%[LCD2]) \n"
|
||||||
"move.w #34,(%[LCD]) \n" /* End LCD controller setup */
|
"move.w #34,(%[LCD]) \n" /* End LCD controller setup */
|
||||||
"move.l #220,%%d2 \n"
|
"move.l #220,%%d0 \n"
|
||||||
"move.l #176,%%d3 \n"
|
"move.l #176,%%d1 \n"
|
||||||
"clr.l %%d1 \n"
|
"clr.l %%d3 \n"
|
||||||
|
"clr.l %%d2 \n"
|
||||||
"widthloop: \n"
|
"widthloop: \n"
|
||||||
"move.b (%[screenptr])+, %%d1 \n" /* Unrolled by 5 */
|
"move.l (%[screenptr])+, %%d2 \n"
|
||||||
"move.w (%[palette], %%d1.l:2), (%[LCD2]) \n"
|
"swap.w %%d2 \n"
|
||||||
"move.b (%[screenptr])+, %%d1 \n"
|
"move.w %%d2, %%d3 \n"
|
||||||
"move.w (%[palette], %%d1.l:2), (%[LCD2]) \n"
|
"lsr.l #8,%%d3 \n"
|
||||||
"move.b (%[screenptr])+, %%d1 \n"
|
"move.w (%[palette], %%d3.l:2), (%[LCD2]) \n"
|
||||||
"move.w (%[palette], %%d1.l:2), (%[LCD2]) \n"
|
"move.b %%d2,%%d3 \n"
|
||||||
"move.b (%[screenptr])+, %%d1 \n"
|
"move.w (%[palette], %%d3.l:2), (%[LCD2]) \n"
|
||||||
"move.w (%[palette], %%d1.l:2), (%[LCD2]) \n"
|
"swap.w %%d2 \n"
|
||||||
"move.b (%[screenptr])+, %%d1 \n"
|
"move.w %%d2, %%d3 \n"
|
||||||
"move.w (%[palette], %%d1.l:2), (%[LCD2]) \n"
|
"lsr.l #8,%%d3 \n"
|
||||||
"subq.l #5,%%d2 \n"
|
"move.w (%[palette], %%d3.l:2), (%[LCD2]) \n"
|
||||||
|
"move.b %%d2,%%d3 \n"
|
||||||
|
"move.w (%[palette], %%d3.l:2), (%[LCD2]) \n"
|
||||||
|
"subq.l #4,%%d0 \n"
|
||||||
"bne widthloop \n"
|
"bne widthloop \n"
|
||||||
"move.w #220,%%d2 \n"
|
"move.w #220,%%d0 \n"
|
||||||
"subq.l #1,%%d3 \n"
|
"subq.l #1,%%d1 \n"
|
||||||
"bne widthloop \n"
|
"bne widthloop \n"
|
||||||
: /* outputs */
|
: /* outputs */
|
||||||
: /* inputs */
|
: /* inputs */
|
||||||
|
|
@ -395,7 +405,7 @@ void I_FinishUpdate (void)
|
||||||
[LCD] "a" (0xf0000000),
|
[LCD] "a" (0xf0000000),
|
||||||
[LCD2] "a" (0xf0000002)
|
[LCD2] "a" (0xf0000002)
|
||||||
: /* clobbers */
|
: /* clobbers */
|
||||||
"d1", "d2", "d3"
|
"d0", "d1", "d2", "d3"
|
||||||
);
|
);
|
||||||
#else
|
#else
|
||||||
/* C version of above (drops 500 tics) */
|
/* C version of above (drops 500 tics) */
|
||||||
|
|
|
||||||
|
|
@ -317,7 +317,7 @@ default_t defaults[] =
|
||||||
def_bool,ss_none, 0, 0}, // enables translucency
|
def_bool,ss_none, 0, 0}, // enables translucency
|
||||||
{"tran_filter_pct",{&tran_filter_pct, NULL},{66, NULL},0,100, // killough 2/21/98
|
{"tran_filter_pct",{&tran_filter_pct, NULL},{66, NULL},0,100, // killough 2/21/98
|
||||||
def_int,ss_none, 0, 0}, // set percentage of foreground/background translucency mix
|
def_int,ss_none, 0, 0}, // set percentage of foreground/background translucency mix
|
||||||
{"screenblocks",{&screenblocks, NULL},{9, NULL},3,11,
|
{"screenblocks",{&screenblocks, NULL},{10, NULL},3,11,
|
||||||
def_int,ss_none, 0, 0},
|
def_int,ss_none, 0, 0},
|
||||||
{"usegamma",{&usegamma, NULL},{1, NULL},0,4, //jff 3/6/98 fix erroneous upper limit in range
|
{"usegamma",{&usegamma, NULL},{1, NULL},0,4, //jff 3/6/98 fix erroneous upper limit in range
|
||||||
def_int,ss_none, 0, 0}, // gamma correction level // killough 1/18/98
|
def_int,ss_none, 0, 0}, // gamma correction level // killough 1/18/98
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,8 @@
|
||||||
#include "rockmacros.h"
|
#include "rockmacros.h"
|
||||||
#include "doomstat.h"
|
#include "doomstat.h"
|
||||||
#include "i_system.h"
|
#include "i_system.h"
|
||||||
|
#include "hu_stuff.h"
|
||||||
|
#include "st_stuff.h"
|
||||||
|
|
||||||
PLUGIN_HEADER
|
PLUGIN_HEADER
|
||||||
|
|
||||||
|
|
@ -686,6 +688,8 @@ static bool Doptions()
|
||||||
{ "Translucency", NULL },
|
{ "Translucency", NULL },
|
||||||
{ "Fake Contrast", NULL },
|
{ "Fake Contrast", NULL },
|
||||||
{ "Always Run", NULL },
|
{ "Always Run", NULL },
|
||||||
|
{ "Headsup Display", NULL },
|
||||||
|
{ "Statusbar Always Red", NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
m = rb->menu_init(items, sizeof(items) / sizeof(*items),
|
m = rb->menu_init(items, sizeof(items) / sizeof(*items),
|
||||||
|
|
@ -726,10 +730,18 @@ static bool Doptions()
|
||||||
rb->set_option(items[6].desc, &fake_contrast, INT, onoff, 2, NULL );
|
rb->set_option(items[6].desc, &fake_contrast, INT, onoff, 2, NULL );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 7: /* Fake Contrast */
|
case 7: /* Always Run */
|
||||||
rb->set_option(items[7].desc, &autorun, INT, onoff, 2, NULL );
|
rb->set_option(items[7].desc, &autorun, INT, onoff, 2, NULL );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 8: /* Headsup Display */
|
||||||
|
rb->set_option(items[8].desc, &hud_displayed, INT, onoff, 2, NULL );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 9: /* Statusbar always red */
|
||||||
|
rb->set_option(items[9].desc, &sts_always_red, INT, onoff, 2, NULL );
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
menuquit=1;
|
menuquit=1;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@
|
||||||
|
|
||||||
#ifndef __SOUNDS__
|
#ifndef __SOUNDS__
|
||||||
#define __SOUNDS__
|
#define __SOUNDS__
|
||||||
|
#include "rockmacros.h"
|
||||||
|
|
||||||
//
|
//
|
||||||
// SoundFX struct.
|
// SoundFX struct.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue