modified GUI engine (**BROKEN**)

This commit is contained in:
ekeeke31 2009-03-29 18:56:36 +00:00
parent 841a159a90
commit 612c512bf4
15 changed files with 953 additions and 397 deletions

View File

@ -112,7 +112,7 @@ int FileSelector(unsigned char *buffer)
{
if (redraw) ShowFiles (offset, selection);
redraw = 0;
p = ogc_input__getMenuButtons();
p = ogc_input__getMenuButtons(0);
/* scroll displayed filename */
if (p & PAD_BUTTON_LEFT)

View File

@ -87,7 +87,7 @@ int FONT_Init(void)
return 0;
}
static void DrawChar(unsigned char c, u32 xpos, u32 ypos, u32 size)
static void DrawChar(unsigned char c, int xpos, int ypos, int size)
{
s32 width;
@ -152,10 +152,10 @@ void WriteCentre_HL( int y, char *string)
DrawTexture(&texture, 0, y-fheight, 640, fheight);
}
void FONT_WriteLeft(char *string, u16 size, u16 x, u16 y)
void FONT_WriteLeft(char *string, int size, int x, int y)
{
x -= (vmode->fbWidth/2);
y -= (vmode->efbHeight/2);
x -= (vmode->fbWidth / 2);
y -= (vmode->efbHeight / 2);
while (*string)
{
@ -164,7 +164,7 @@ void FONT_WriteLeft(char *string, u16 size, u16 x, u16 y)
}
}
void FONT_WriteRight(char *string, u16 size, u16 x, u16 y)
void FONT_WriteRight(char *string, int size, int x, int y)
{
int i;
u16 width = 0;
@ -182,7 +182,7 @@ void FONT_WriteRight(char *string, u16 size, u16 x, u16 y)
}
}
void FONT_WriteCenter(char *string, u16 size, u16 x1, u16 x2, u16 y)
void FONT_WriteCenter(char *string, int size, int x1, int x2, int y)
{
int i;
u16 width = 0;
@ -417,7 +417,7 @@ void OpenPNGFromMemory(png_texture *texture, const u8 *buffer)
DCFlushRange(texture->data, height * stride);
}
void DrawTexture(png_texture *texture, u32 xOrigin, u32 yOrigin, u32 w, u32 h)
void DrawTexture(png_texture *texture, int x, int y, int w, int h)
{
if (texture->data)
{
@ -429,19 +429,19 @@ void DrawTexture(png_texture *texture, u32 xOrigin, u32 yOrigin, u32 w, u32 h)
GX_InvalidateTexAll();
DCFlushRange(texture->data, texture->width * texture->height * 4);
/* current coordinate system */
xOrigin -= (vmode->fbWidth/2);
yOrigin -= (vmode->efbHeight/2);
/* adjust coordinate system */
x -= (vmode->fbWidth/2);
y -= (vmode->efbHeight/2);
/* Draw textured quad */
GX_Begin(GX_QUADS, GX_VTXFMT0, 4);
GX_Position2s16(xOrigin,yOrigin+h);
GX_Position2s16(x,y+h);
GX_TexCoord2f32(0.0, 1.0);
GX_Position2s16(xOrigin+w,yOrigin+h);
GX_Position2s16(x+w,y+h);
GX_TexCoord2f32(1.0, 1.0);
GX_Position2s16(xOrigin+w,yOrigin);
GX_Position2s16(x+w,y);
GX_TexCoord2f32(1.0, 0.0);
GX_Position2s16(xOrigin,yOrigin);
GX_Position2s16(x,y);
GX_TexCoord2f32(0.0, 0.0);
GX_End ();
GX_DrawDone();
@ -476,9 +476,9 @@ void ClearScreen (GXColor color)
void WaitButtonA ()
{
s16 p = ogc_input__getMenuButtons();
while (p & PAD_BUTTON_A) p = ogc_input__getMenuButtons();
while (!(p & PAD_BUTTON_A)) p = ogc_input__getMenuButtons();
s16 p = ogc_input__getMenuButtons(0);
while (p & PAD_BUTTON_A) p = ogc_input__getMenuButtons(0);
while (!(p & PAD_BUTTON_A)) p = ogc_input__getMenuButtons(0);
}
void WaitPrompt (char *msg)

View File

@ -37,18 +37,18 @@ typedef struct
} png_texture;
extern void OpenPNGFromMemory(png_texture *texture, const u8 *buffer);
extern void DrawTexture(png_texture *texture, u32 xOrigin, u32 yOrigin, u32 w, u32 h);
extern void DrawTexture(png_texture *texture, int x, int y, int w, int h);
extern int FONT_Init(void);
void FONT_WriteLeft(char *string, u16 size, u16 x, u16 y);
void FONT_WriteRight(char *string, u16 size, u16 x, u16 y);
void FONT_WriteCenter(char *string, u16 size, u16 x1, u16 x2, u16 y);
extern int FONT_Init(void);
extern void FONT_WriteLeft(char *string, int size, int x, int y);
extern void FONT_WriteRight(char *string, int size, int x, int y);
extern void FONT_WriteCenter(char *string, int size, int x1, int x2, int y);
extern void WriteCentre_HL( int y, char *string);
extern void WriteCentre (int y, char *string);
extern void write_font (int x, int y, char *string);
extern void WriteText(char *text, u16 size, u16 x, u16 y);
extern void WriteText(char *text, int size, int x, int y);
extern void WaitPrompt (char *msg);
extern void ShowAction (char *msg);
extern void WaitButtonA ();

View File

@ -220,7 +220,7 @@ void GGEditLine ()
redraw = 0;
}
p = ogc_input__getMenuButtons();
p = ogc_input__getMenuButtons(0);
if (p & PAD_BUTTON_UP)
{
@ -293,7 +293,7 @@ void GGSelectLine ()
redraw = 0;
}
j = ogc_input__getMenuButtons();
j = ogc_input__getMenuButtons(0);
if (j & PAD_BUTTON_UP)
{

View File

@ -73,7 +73,7 @@ void legal ()
WriteCentre (ypos, "Press A to skip intro");
SetScreen ();
sleep (2);
if (ogc_input__getMenuButtons() & PAD_BUTTON_A) return;
if (ogc_input__getMenuButtons(0) & PAD_BUTTON_A) return;
ClearScreen((GXColor)BLACK);

File diff suppressed because it is too large Load Diff

View File

@ -74,9 +74,6 @@ static const u16 pad_keys[8] =
#define PAD_LEFT 2
#define PAD_RIGHT 3
#define MAX_HELD_CNT 15
static int held_cnt = 0;
static u32 wpad_dirmap[3][4] =
{
{WPAD_BUTTON_RIGHT, WPAD_BUTTON_LEFT, WPAD_BUTTON_UP, WPAD_BUTTON_DOWN}, /* WIIMOTE only */
@ -249,7 +246,7 @@ static void pad_update(s8 num, u8 i)
#define PI 3.14159265f
static s8 WPAD_StickX(u8 chan,u8 right)
s8 WPAD_StickX(u8 chan,u8 right)
{
float mag = 0.0;
float ang = 0.0;
@ -292,7 +289,7 @@ static s8 WPAD_StickX(u8 chan,u8 right)
}
static s8 WPAD_StickY(u8 chan, u8 right)
s8 WPAD_StickY(u8 chan, u8 right)
{
float mag = 0.0;
float ang = 0.0;
@ -739,124 +736,3 @@ void ogc_input__config(u8 num, u8 type, u8 padtype)
break;
}
}
u16 ogc_input__getMenuButtons(void)
{
#ifdef HW_RVL
extern u8 Shutdown;
if (Shutdown)
{
/* autosave SRAM/State */
memfile_autosave();
/* shutdown Wii */
DI_Close();
SYS_ResetSystem(SYS_POWEROFF, 0, 0);
}
#endif
/* slowdown input updates */
VIDEO_WaitVSync();
/* get gamepad inputs */
PAD_ScanPads();
u16 p = PAD_ButtonsDown(0);
s8 x = PAD_StickX(0);
s8 y = PAD_StickY(0);
if (x > 70) p |= PAD_BUTTON_RIGHT;
else if (x < -70) p |= PAD_BUTTON_LEFT;
if (y > 60) p |= PAD_BUTTON_UP;
else if (y < -60) p |= PAD_BUTTON_DOWN;
#ifdef HW_RVL
/* get wiimote + expansions inputs */
WPAD_ScanPads();
u32 q = WPAD_ButtonsDown(0);
u32 h = WPAD_ButtonsHeld(0);
x = WPAD_StickX(0, 0);
y = WPAD_StickY(0, 0);
/* is Wiimote directed toward screen (horizontal/vertical orientation) ? */
struct ir_t ir;
WPAD_IR(0, &ir);
/* wiimote directions */
if (q & WPAD_BUTTON_UP) p |= ir.valid ? PAD_BUTTON_UP : PAD_BUTTON_LEFT;
else if (q & WPAD_BUTTON_DOWN) p |= ir.valid ? PAD_BUTTON_DOWN : PAD_BUTTON_RIGHT;
else if (q & WPAD_BUTTON_LEFT) p |= ir.valid ? PAD_BUTTON_LEFT : PAD_BUTTON_DOWN;
else if (q & WPAD_BUTTON_RIGHT) p |= ir.valid ? PAD_BUTTON_RIGHT : PAD_BUTTON_UP;
if (h & WPAD_BUTTON_UP)
{
held_cnt ++;
if (held_cnt == MAX_HELD_CNT)
{
held_cnt = MAX_HELD_CNT - 2;
p |= ir.valid ? PAD_BUTTON_UP : PAD_BUTTON_LEFT;
}
}
else if (h & WPAD_BUTTON_DOWN)
{
held_cnt ++;
if (held_cnt == MAX_HELD_CNT)
{
held_cnt = MAX_HELD_CNT - 2;
p |= ir.valid ? PAD_BUTTON_DOWN : PAD_BUTTON_RIGHT;
}
}
else if (h & WPAD_BUTTON_LEFT)
{
held_cnt ++;
if (held_cnt == MAX_HELD_CNT)
{
held_cnt = MAX_HELD_CNT - 2;
p |= ir.valid ? PAD_BUTTON_LEFT : PAD_BUTTON_DOWN;
}
}
else if (h & WPAD_BUTTON_RIGHT)
{
held_cnt ++;
if (held_cnt == MAX_HELD_CNT)
{
held_cnt = MAX_HELD_CNT - 2;
p |= ir.valid ? PAD_BUTTON_RIGHT : PAD_BUTTON_UP;
}
}
else
{
held_cnt = 0;
}
/* analog sticks */
if (y > 70) p |= PAD_BUTTON_UP;
else if (y < -70) p |= PAD_BUTTON_DOWN;
if (x < -60) p |= PAD_BUTTON_LEFT;
else if (x > 60) p |= PAD_BUTTON_RIGHT;
/* classic controller directions */
if (q & WPAD_CLASSIC_BUTTON_UP) p |= PAD_BUTTON_UP;
else if (q & WPAD_CLASSIC_BUTTON_DOWN) p |= PAD_BUTTON_DOWN;
if (q & WPAD_CLASSIC_BUTTON_LEFT) p |= PAD_BUTTON_LEFT;
else if (q & WPAD_CLASSIC_BUTTON_RIGHT) p |= PAD_BUTTON_RIGHT;
/* wiimote keys */
if (q & WPAD_BUTTON_MINUS) p |= PAD_TRIGGER_L;
if (q & WPAD_BUTTON_PLUS) p |= PAD_TRIGGER_R;
if (q & WPAD_BUTTON_A) p |= PAD_BUTTON_A;
if (q & WPAD_BUTTON_B) p |= PAD_BUTTON_B;
if (q & WPAD_BUTTON_2) p |= PAD_BUTTON_A;
if (q & WPAD_BUTTON_1) p |= PAD_BUTTON_B;
if (q & WPAD_BUTTON_HOME) p |= PAD_TRIGGER_Z;
/* classic controller keys */
if (q & WPAD_CLASSIC_BUTTON_FULL_L) p |= PAD_TRIGGER_L;
if (q & WPAD_CLASSIC_BUTTON_FULL_R) p |= PAD_TRIGGER_R;
if (q & WPAD_CLASSIC_BUTTON_A) p |= PAD_BUTTON_A;
if (q & WPAD_CLASSIC_BUTTON_B) p |= PAD_BUTTON_B;
if (q & WPAD_CLASSIC_BUTTON_HOME) p |= PAD_TRIGGER_Z;
#endif
return p;
}

View File

@ -49,6 +49,8 @@ extern void ogc_input__init(void);
extern void ogc_input__set_defaults(void);
extern void ogc_input__update(void);
extern void ogc_input__config(u8 num, u8 type, u8 padtype);
extern u16 ogc_input__getMenuButtons(void);
extern s8 WPAD_StickX(u8 chan,u8 right);
extern s8 WPAD_StickY(u8 chan,u8 right);
#endif

View File

@ -386,6 +386,7 @@ static void gxResetVtx(bool isMenu)
GX_Flush();
}
/* Reset GX 2D rendering */
static void gxResetView(GXRModeObj *tvmode)
{
@ -515,6 +516,28 @@ static void VSyncCallback(u32 cnt)
frameticker++;
}
void gxResetCamera(f32 angle)
{
Mtx view;
if (angle)
{
Mtx m,m1;
Vector axis = (Vector) {0,0,1};
guLookAt(m, &cam.pos, &cam.up, &cam.view);
guMtxRotAxisDeg (m1, &axis, angle);
guMtxConcat(m,m1,view);
}
else
{
guLookAt(view, &cam.pos, &cam.up, &cam.view);
}
GX_LoadPosMtxImm(view, GX_PNMTX0);
GX_Flush();
}
/* Restore Menu Video mode */
void ogc_video__stop(void)
{
@ -591,6 +614,18 @@ void ogc_video__start(void)
}
static GXTexObj texobj;
void ogc_video_caption(void)
{
gxResetVtx(0);
GX_LoadTexObj(&texobj, GX_TEXMAP0);
GX_InvalidateTexAll();
draw_square();
GX_DrawDone();
gxResetVtx(1);
}
/* GX render update */
void ogc_video__update(void)
{
@ -612,7 +647,6 @@ void ogc_video__update(void)
vheight = (vheight >> 2) << 2;
/* initialize texture object */
GXTexObj texobj;
GX_InitTexObj(&texobj, texturemem, vwidth, vheight, GX_TF_RGB565, GX_CLAMP, GX_CLAMP, GX_FALSE);
/* configure texture filtering */

View File

@ -34,5 +34,9 @@ extern void ogc_video__init(void);
extern void ogc_video__start(void);
extern void ogc_video__stop(void);
extern void ogc_video__update(void);
extern void ogc_video_caption(void);
extern void gxResetCamera(f32 angle);
#endif

View File

@ -34,4 +34,8 @@ extern void memfile_autoload();
extern u8 fat_enabled;
extern u32 frameticker;
#ifdef HW_RVL
extern u8 Shutdown;
#endif
#endif /* _OSD_H_ */

View File

@ -0,0 +1,146 @@
/*
This file was autogenerated by raw2c.
Visit http://www.devkitpro.org
*/
const unsigned char generic_point[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x08, 0x06, 0x00, 0x00, 0x00, 0xe2, 0x98, 0x77,
0x38, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72,
0x65, 0x00, 0x41, 0x64, 0x6f, 0x62, 0x65, 0x20, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x61,
0x64, 0x79, 0x71, 0xc9, 0x65, 0x3c, 0x00, 0x00, 0x08, 0x3a, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda,
0xec, 0x5c, 0x6b, 0x6c, 0x14, 0x55, 0x14, 0x3e, 0x33, 0xdb, 0x6e, 0xdb, 0xd0, 0xf2, 0xa8, 0x14,
0x0a, 0x85, 0x2a, 0x52, 0x02, 0x2d, 0xa1, 0x40, 0x53, 0x53, 0x4d, 0xad, 0x40, 0x81, 0xd0, 0x10,
0xfc, 0x51, 0x02, 0x84, 0xa4, 0x51, 0x52, 0xa2, 0x55, 0xc3, 0xc3, 0x84, 0x7f, 0xfa, 0xa7, 0x24,
0x44, 0x7e, 0x90, 0x68, 0x54, 0x14, 0x15, 0x4d, 0x8d, 0x68, 0x0c, 0x8a, 0x69, 0x34, 0x8a, 0x14,
0x7e, 0x50, 0x24, 0x68, 0x21, 0xa0, 0x28, 0x1a, 0xc1, 0x20, 0x44, 0x08, 0xa0, 0x48, 0xe4, 0x91,
0xbe, 0x68, 0x77, 0x67, 0xae, 0xe7, 0xdc, 0xb9, 0xb3, 0x9d, 0xd9, 0x4e, 0xd7, 0x52, 0x77, 0xcb,
0x2e, 0x73, 0x4e, 0xf2, 0xed, 0xde, 0xb9, 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8, 0x1e, 0x54, 0xb2, 0x93, 0xdc, 0xb7, 0x73, 0x58, 0xb1, 0xdd, 0x39, 0x86, 0xfe,
0x90, 0x37, 0x06, 0xa0, 0xb5, 0xe5, 0xa4, 0x3c, 0xaf, 0xf3, 0x3a, 0xc3, 0x36, 0xde, 0xa5, 0xd0,
0xdf, 0xd5, 0x4c, 0x42, 0xfc, 0x88, 0xb8, 0x6f, 0x74, 0x6e, 0x1e, 0x54, 0xd7, 0xac, 0x80, 0x11,
0x23, 0x72, 0xe4, 0x6c, 0xd6, 0xfa, 0x21, 0x4a, 0xb9, 0x9a, 0xf3, 0xc7, 0xd9, 0x75, 0x22, 0x92,
0x41, 0xa5, 0x2f, 0x0d, 0x8f, 0xa1, 0xec, 0x67, 0x40, 0x0b, 0x40, 0x67, 0x67, 0x3b, 0x1c, 0x6c,
0xf9, 0x0c, 0x6e, 0x5e, 0xbf, 0x46, 0xcd, 0xff, 0x20, 0xe6, 0x20, 0x2e, 0xf5, 0x27, 0x91, 0xff,
0xae, 0x86, 0xa4, 0x01, 0x06, 0x5e, 0x4a, 0x1e, 0x0f, 0x34, 0x0c, 0xb7, 0x9e, 0x52, 0xed, 0x0f,
0x9b, 0x48, 0x96, 0xab, 0xd9, 0xf1, 0xf4, 0xa8, 0x39, 0xf0, 0x50, 0xb3, 0xae, 0x74, 0xfc, 0x6f,
0x6a, 0xd6, 0xdb, 0x1c, 0x8b, 0x00, 0xdf, 0xb8, 0x20, 0x3f, 0x09, 0xbf, 0xa8, 0x7d, 0x97, 0xe5,
0x5f, 0x01, 0x06, 0x00, 0xa9, 0x1c, 0xbb, 0x9e, 0xdd, 0x6f, 0x6d, 0x94, 0x00, 0x00, 0x00, 0x00,
0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
const int generic_point_size = sizeof(generic_point);

View File

@ -0,0 +1,14 @@
/*
This file was autogenerated by raw2c.
Visit http://www.devkitpro.org
*/
//---------------------------------------------------------------------------------
#ifndef _generic_point_h_
#define _generic_point_h_
//---------------------------------------------------------------------------------
extern const unsigned char generic_point[];
extern const int generic_point_size;
//---------------------------------------------------------------------------------
#endif //_generic_point_h_
//---------------------------------------------------------------------------------

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -1653,7 +1653,6 @@ static void render_obj(uint32 line, uint8 *buf, uint8 *table)
int height;
int v_line;
int column;
int sol_flag = 0;
int left = 0x80;
int right = 0x80 + bitmap.viewport.w;
@ -1667,9 +1666,8 @@ static void render_obj(uint32 line, uint8 *buf, uint8 *table)
{
xpos = object_info[count].xpos & 0x1ff;
/* sprite masking */
if(xpos != 0) sol_flag = 1;
else if(xpos == 0 && sol_flag) return;
/* sprite masking (low priority sprite only) */
if(!xpos && count) return;
size = object_info[count].size & 0x0f;
width = sizetab[(size >> 2) & 3];
@ -1730,7 +1728,6 @@ static void render_obj_im2(uint32 line, uint32 odd, uint8 *buf, uint8 *table)
int height;
int v_line;
int column;
int sol_flag = 0;
int left = 0x80;
int right = 0x80 + bitmap.viewport.w;
@ -1745,9 +1742,8 @@ static void render_obj_im2(uint32 line, uint32 odd, uint8 *buf, uint8 *table)
{
xpos = object_info[count].xpos & 0x1ff;
/* sprite masking */
if(xpos != 0) sol_flag = 1;
else if(xpos == 0 && sol_flag) return;
/* sprite masking (low priority sprite only) */
if(!xpos && count) return;
size = object_info[count].size & 0x0f;
width = sizetab[(size >> 2) & 3];