mirror of
https://github.com/dborth/vbagx.git
synced 2024-11-22 10:39:18 +01:00
cleanup while loop vars
This commit is contained in:
parent
d64c223a62
commit
3adc7865be
@ -246,6 +246,8 @@ EmulatorUpdate (void *arg)
|
|||||||
static void *
|
static void *
|
||||||
UpdateGUI (void *arg)
|
UpdateGUI (void *arg)
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
while(1)
|
while(1)
|
||||||
{
|
{
|
||||||
if(guiHalt)
|
if(guiHalt)
|
||||||
@ -257,7 +259,7 @@ UpdateGUI (void *arg)
|
|||||||
mainWindow->Draw();
|
mainWindow->Draw();
|
||||||
|
|
||||||
#ifdef HW_RVL
|
#ifdef HW_RVL
|
||||||
for(int i=3; i >= 0; i--) // so that player 1's cursor appears on top!
|
for(i=3; i >= 0; i--) // so that player 1's cursor appears on top!
|
||||||
{
|
{
|
||||||
if(userInput[i].wpad.ir.valid)
|
if(userInput[i].wpad.ir.valid)
|
||||||
Menu_DrawImg(userInput[i].wpad.ir.x-48, userInput[i].wpad.ir.y-48,
|
Menu_DrawImg(userInput[i].wpad.ir.x-48, userInput[i].wpad.ir.y-48,
|
||||||
@ -268,7 +270,7 @@ UpdateGUI (void *arg)
|
|||||||
|
|
||||||
Menu_Render();
|
Menu_Render();
|
||||||
|
|
||||||
for(int i=3; i >= 0; i--)
|
for(i=3; i >= 0; i--)
|
||||||
mainWindow->Update(&userInput[i]);
|
mainWindow->Update(&userInput[i]);
|
||||||
|
|
||||||
#ifdef HW_RVL
|
#ifdef HW_RVL
|
||||||
@ -281,10 +283,10 @@ UpdateGUI (void *arg)
|
|||||||
|
|
||||||
if(ExitRequested || ShutdownRequested)
|
if(ExitRequested || ShutdownRequested)
|
||||||
{
|
{
|
||||||
for(int a = 0; a < 255; a += 15)
|
for(i = 0; i < 255; i += 15)
|
||||||
{
|
{
|
||||||
mainWindow->Draw();
|
mainWindow->Draw();
|
||||||
Menu_DrawRectangle(0,0,screenwidth,screenheight,(GXColor){0, 0, 0, a},1);
|
Menu_DrawRectangle(0,0,screenwidth,screenheight,(GXColor){0, 0, 0, i},1);
|
||||||
Menu_Render();
|
Menu_Render();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -829,6 +831,8 @@ static void WindowCredits(void * ptr)
|
|||||||
static int MenuGameSelection()
|
static int MenuGameSelection()
|
||||||
{
|
{
|
||||||
int menu = MENU_NONE;
|
int menu = MENU_NONE;
|
||||||
|
bool res;
|
||||||
|
int i;
|
||||||
|
|
||||||
GuiText titleTxt("Choose Game", 28, (GXColor){255, 255, 255, 255});
|
GuiText titleTxt("Choose Game", 28, (GXColor){255, 255, 255, 255});
|
||||||
titleTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
|
titleTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
|
||||||
@ -931,7 +935,7 @@ static int MenuGameSelection()
|
|||||||
|
|
||||||
// update gameWindow based on arrow buttons
|
// update gameWindow based on arrow buttons
|
||||||
// set MENU_EXIT if A button pressed on a game
|
// set MENU_EXIT if A button pressed on a game
|
||||||
for(int i=0; i<PAGESIZE; i++)
|
for(i=0; i<PAGESIZE; i++)
|
||||||
{
|
{
|
||||||
if(gameBrowser.gameList[i]->GetState() == STATE_CLICKED)
|
if(gameBrowser.gameList[i]->GetState() == STATE_CLICKED)
|
||||||
{
|
{
|
||||||
@ -939,8 +943,6 @@ static int MenuGameSelection()
|
|||||||
// check corresponding browser entry
|
// check corresponding browser entry
|
||||||
if(browserList[browser.selIndex].isdir || IsSz())
|
if(browserList[browser.selIndex].isdir || IsSz())
|
||||||
{
|
{
|
||||||
bool res;
|
|
||||||
|
|
||||||
if(IsSz())
|
if(IsSz())
|
||||||
res = BrowserLoadSz(GCSettings.LoadMethod);
|
res = BrowserLoadSz(GCSettings.LoadMethod);
|
||||||
else
|
else
|
||||||
@ -1163,7 +1165,7 @@ static int MenuGame()
|
|||||||
closeBtn.SetEffectGrow();
|
closeBtn.SetEffectGrow();
|
||||||
|
|
||||||
#ifdef HW_RVL
|
#ifdef HW_RVL
|
||||||
int i = 0;
|
int i, level;
|
||||||
char txt[3];
|
char txt[3];
|
||||||
GuiText * batteryTxt[4];
|
GuiText * batteryTxt[4];
|
||||||
GuiImage * batteryImg[4];
|
GuiImage * batteryImg[4];
|
||||||
@ -1270,7 +1272,6 @@ static int MenuGame()
|
|||||||
usleep(THREAD_SLEEP);
|
usleep(THREAD_SLEEP);
|
||||||
|
|
||||||
#ifdef HW_RVL
|
#ifdef HW_RVL
|
||||||
int level;
|
|
||||||
for(i=0; i < 4; i++)
|
for(i=0; i < 4; i++)
|
||||||
{
|
{
|
||||||
if(WPAD_Probe(i, NULL) == WPAD_ERR_NONE) // controller connected
|
if(WPAD_Probe(i, NULL) == WPAD_ERR_NONE) // controller connected
|
||||||
@ -1400,7 +1401,7 @@ static int MenuGame()
|
|||||||
static int MenuGameSaves(int action)
|
static int MenuGameSaves(int action)
|
||||||
{
|
{
|
||||||
int menu = MENU_NONE;
|
int menu = MENU_NONE;
|
||||||
int ret;
|
int ret, result;
|
||||||
int i, n, len, len2;
|
int i, n, len, len2;
|
||||||
int j = 0;
|
int j = 0;
|
||||||
SaveList saves;
|
SaveList saves;
|
||||||
@ -1580,7 +1581,7 @@ static int MenuGameSaves(int action)
|
|||||||
// load or save game
|
// load or save game
|
||||||
if(ret > -3)
|
if(ret > -3)
|
||||||
{
|
{
|
||||||
int result = 0;
|
result = 0;
|
||||||
|
|
||||||
if(action == 0) // load
|
if(action == 0) // load
|
||||||
{
|
{
|
||||||
@ -2324,6 +2325,7 @@ static int MenuSettingsMappingsMap()
|
|||||||
{
|
{
|
||||||
int menu = MENU_NONE;
|
int menu = MENU_NONE;
|
||||||
int ret,i,j;
|
int ret,i,j;
|
||||||
|
u32 pressed;
|
||||||
OptionList options;
|
OptionList options;
|
||||||
|
|
||||||
char menuTitle[100];
|
char menuTitle[100];
|
||||||
@ -2414,7 +2416,7 @@ static int MenuSettingsMappingsMap()
|
|||||||
|
|
||||||
if(ret >= 0)
|
if(ret >= 0)
|
||||||
{
|
{
|
||||||
u32 pressed = ButtonMappingWindow(); // get a button selection from user
|
pressed = ButtonMappingWindow(); // get a button selection from user
|
||||||
|
|
||||||
if (pressed > 0)
|
if (pressed > 0)
|
||||||
btnmap[mapMenuCtrl][ret] = pressed; // update mapping
|
btnmap[mapMenuCtrl][ret] = pressed; // update mapping
|
||||||
@ -2741,7 +2743,7 @@ static int MenuSettingsVideo()
|
|||||||
else
|
else
|
||||||
sprintf (options.value[5], "Off");
|
sprintf (options.value[5], "Off");
|
||||||
|
|
||||||
if(strcmp(CurrentPalette.gameName,"default"))
|
if(strcmp(CurrentPalette.gameName,"default"))
|
||||||
sprintf(options.value[6], "Custom");
|
sprintf(options.value[6], "Custom");
|
||||||
else
|
else
|
||||||
sprintf(options.value[6], "Default");
|
sprintf(options.value[6], "Default");
|
||||||
|
Loading…
Reference in New Issue
Block a user