Skip to content

Commit

Permalink
gui: move game settings into a submenu - game menu
Browse files Browse the repository at this point in the history
  • Loading branch information
KrahJohlito committed Oct 18, 2019
1 parent 4ee8fcd commit deb2b0a
Show file tree
Hide file tree
Showing 13 changed files with 1,287 additions and 1,066 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ OPL_VERSION = $(VERSION).$(SUBVERSION).$(PATCHLEVEL).$(REVISION)$(if $(EXTRAVERS

FRONTEND_OBJS = pad.o fntsys.o renderman.o menusys.o OSDHistory.o system.o lang.o config.o hdd.o dialogs.o \
dia.o ioman.o texcache.o themes.o supportbase.o usbsupport.o ethsupport.o hddsupport.o \
appsupport.o gui.o textures.o opl.o atlas.o nbns.o httpclient.o gsm.o cheatman.o sound.o ps2cnf.o
appsupport.o gui.o guigame.o textures.o opl.o atlas.o nbns.o httpclient.o gsm.o cheatman.o sound.o ps2cnf.o

GFX_OBJS = usb_icon.o hdd_icon.o eth_icon.o app_icon.o \
cross_icon.o triangle_icon.o circle_icon.o square_icon.o select_icon.o start_icon.o \
Expand Down
12 changes: 2 additions & 10 deletions include/dialogs.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,8 @@ enum UI_ITEMS {

COMPAT_DMA = 100,
COMPAT_ALTSTARTUP,
COMPAT_GAME,
COMPAT_GAMEID,
COMPAT_SAVE,
COMPAT_STATUS,
COMPAT_DL_DEFAULTS,
COMPAT_TEST,
COMPAT_REMOVE,

COMPAT_LOADFROMDISC_ID,

Expand Down Expand Up @@ -167,8 +162,6 @@ enum UI_ITEMS {
};

#define COMPAT_NOEXIT 0x70000000
#define COMPAT_GSMCONFIG (GSMCFG_GSCONFIG | COMPAT_NOEXIT)
#define COMPAT_CHEATCONFIG (CHTCFG_CHEATCFG | COMPAT_NOEXIT)
#define COMPAT_LOADFROMDISC (COMPAT_LOADFROMDISC_ID | COMPAT_NOEXIT)

#define COMPAT_VMC1_ACTION (COMPAT_VMC1_ACTION_ID | COMPAT_NOEXIT)
Expand All @@ -177,16 +170,15 @@ enum UI_ITEMS {
#define COMPAT_VMC2_DEFINE (COMPAT_VMC2_DEFINE_ID | COMPAT_NOEXIT)

#ifdef PADEMU
#define COMPAT_PADEMUCONFIG (PADCFG_PADEMU_CONFIG | COMPAT_NOEXIT)

extern struct UIItem diaPadEmuConfig[];
extern struct UIItem diaPadEmuInfo[];
#endif

extern struct UIItem diaNetConfig[];
extern struct UIItem diaCompatConfig[];
extern struct UIItem diaUIConfig[];
extern struct UIItem diaAudioConfig[];
extern struct UIItem diaCompatConfig[];
extern struct UIItem diaVMCConfig[];
extern struct UIItem diaGSConfig[];
extern struct UIItem diaCheatConfig[];

Expand Down
7 changes: 2 additions & 5 deletions include/gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ int guiFrameId;
#define GUI_SCREEN_MAIN 0
#define GUI_SCREEN_MENU 1
#define GUI_SCREEN_INFO 2
#define GUI_SCREEN_GAME_MENU 3

void guiSwitchScreen(int target);

Expand Down Expand Up @@ -108,7 +109,6 @@ struct gui_update_t *guiOpCreate(gui_op_type_t type);
/** For completeness, the deffered operations are destroyed automatically */
void guiDestroyOp(struct gui_update_t *op);

int guiShowCompatConfig(int id, item_list_t *support, config_set_t *configSet);
int guiShowKeyboard(char *value, int maxLength);
int guiMsgBox(const char *text, int addAccept, struct UIItem *ui);

Expand All @@ -119,6 +119,7 @@ void guiDrawBGPlasma();
int guiDrawIconAndText(int iconId, int textId, int font, int x, int y, u64 color);

void guiShowNetCompatUpdate(void);
void guiShowNetCompatUpdateSingle(int id, item_list_t *support, config_set_t *configSet);
void guiShowAbout();
void guiShowConfig();
void guiShowUIConfig();
Expand All @@ -142,10 +143,6 @@ void guiHandleDeferedIO(int *ptr, const unsigned char *message, int type, void *
*/
void guiRenderTextScreen(const unsigned char *message);

int guiAltStartupNameHandler(char *text, int maxLen);

int guiVmcNameHandler(char *text, int maxLen);

void guiWarning(const char *text, int count);

int guiConfirmVideoMode(void);
Expand Down
19 changes: 19 additions & 0 deletions include/guigame.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#ifndef __GUIGAME_H
#define __GUIGAME_H

int guiGameAltStartupNameHandler(char *text, int maxLen);

char *gameConfigSource(void);

int guiGameVmcNameHandler(char *text, int maxLen);
void guiGameShowVMCMenu(int id, item_list_t *support);
void guiGameShowCompatConfig(int id, item_list_t *support, config_set_t *configSet);
void guiGameShowGSConfig(void);
void guiGameShowCheatConfig(void);
void guiGameShowPadEmuConfig(void);

void guiGameLoadConfig(item_list_t *support, config_set_t *configSet);
void guiGameSaveConfig(config_set_t *configSet, item_list_t *support);
void guiGameRemoveSettings(config_set_t *configSet);
void guiGameTestSettings(int id, item_list_t *support, config_set_t *configSet);
#endif
3 changes: 3 additions & 0 deletions include/lang.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ enum _STR_IDS {
_STR_CACHE_HDD_GAME_LIST,
_STR_ENABLE_NOTIFICATIONS,
_STR_NOTIFICATIONS,
_STR_GAME_MENU,
_STR_GAME_SETTINGS_SAVED,
_STR_GAME_SETTINGS_REMOVED,

LANG_STR_COUNT
};
Expand Down
3 changes: 3 additions & 0 deletions include/menusys.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ typedef struct menu_list
void menuInit();
void menuEnd();
void menuReinitMainMenu(void);
void menuInitGameMenu(void);

void menuAppendItem(menu_item_t *item);

Expand All @@ -98,9 +99,11 @@ void menuSaveConfig();
void menuRenderMain();
void menuRenderMenu();
void menuRenderInfo();
void menuRenderGameMenu();
void menuHandleInputMain();
void menuHandleInputMenu();
void menuHandleInputInfo();
void menuHandleInputGameMenu();

// Sets the selected item if it is found in the menu list
void menuSetSelectedItem(menu_item_t *item);
Expand Down
9 changes: 6 additions & 3 deletions lng/lang_English.lng
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Remember Last Played Game
Select Button
Error, the game is fragmented.
Error, could not run the item.
Test
Test Changes
Leave empty for GUEST auth.
Accurate Reads
Synchronous Mode
Expand Down Expand Up @@ -224,7 +224,7 @@ Update completed.
Update cancelled.
Download settings from the network?
Customized Settings
Downloaded defaults.
Downloaded Defaults
Auto start in %i s...
Auto Start
Value in second(s), 0 to disable auto start.
Expand Down Expand Up @@ -285,4 +285,7 @@ Boot Sound Volume
Confirm video mode change?
Cache Game List (HDD)
Enable Notifications
%s loaded from %s
%s loaded from %s
Game Menu
Game settings saved.
Game settings removed.

0 comments on commit deb2b0a

Please sign in to comment.