mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2025-02-18 05:16:19 +01:00
Add titles
This commit is contained in:
parent
ea81cac4c3
commit
e9ef645cb0
@ -253,7 +253,7 @@ void C64::networking_menu(Prefs *np)
|
|||||||
this->server_hostname);
|
this->server_hostname);
|
||||||
snprintf(buf[2], 255, "Port (%d)",
|
snprintf(buf[2], 255, "Port (%d)",
|
||||||
this->server_port);
|
this->server_port);
|
||||||
opt = menu_select(network_client_messages, NULL);
|
opt = menu_select("Networking", network_client_messages, NULL);
|
||||||
|
|
||||||
if (opt >= 0 && opt <= 2)
|
if (opt >= 0 && opt <= 2)
|
||||||
{
|
{
|
||||||
@ -313,7 +313,8 @@ void C64::advanced_options(Prefs *np)
|
|||||||
submenus[1] = 1; break;
|
submenus[1] = 1; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
int opt = menu_select(new_advanced_options_menu_messages,
|
int opt = menu_select("Advanced options",
|
||||||
|
new_advanced_options_menu_messages,
|
||||||
submenus);
|
submenus);
|
||||||
if (opt >= 0)
|
if (opt >= 0)
|
||||||
{
|
{
|
||||||
@ -340,7 +341,7 @@ void C64::other_options(Prefs *np)
|
|||||||
int old_swap = ThePrefs.JoystickSwap == true ? 1 : 0;
|
int old_swap = ThePrefs.JoystickSwap == true ? 1 : 0;
|
||||||
int submenus[3] = { old_swap, !np->Emul1541Proc, 0 };
|
int submenus[3] = { old_swap, !np->Emul1541Proc, 0 };
|
||||||
|
|
||||||
int opt = menu_select(new_options_menu_messages,
|
int opt = menu_select("Options", new_options_menu_messages,
|
||||||
submenus);
|
submenus);
|
||||||
if (opt >= 0)
|
if (opt >= 0)
|
||||||
{
|
{
|
||||||
@ -393,7 +394,7 @@ void C64::select_fake_key_sequence(Prefs *np)
|
|||||||
NULL};
|
NULL};
|
||||||
int opt;
|
int opt;
|
||||||
|
|
||||||
opt = menu_select(fake_key_messages, NULL);
|
opt = menu_select("Keyboard macros", fake_key_messages, NULL);
|
||||||
if (opt < 0)
|
if (opt < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -655,17 +656,17 @@ void C64::VBlank(bool draw_frame)
|
|||||||
this->prefs_changed = false;
|
this->prefs_changed = false;
|
||||||
|
|
||||||
TheSID->PauseSound();
|
TheSID->PauseSound();
|
||||||
opt = menu_select(new_main_menu_messages, submenus);
|
opt = menu_select("Main menu", new_main_menu_messages, submenus);
|
||||||
|
|
||||||
switch(opt)
|
switch(opt)
|
||||||
{
|
{
|
||||||
case 2: /* Insert disc/tape */
|
case 0: /* Insert disc/tape */
|
||||||
this->select_disc(&np, submenus[0] == 1);
|
this->select_disc(&np, submenus[0] == 1);
|
||||||
break;
|
break;
|
||||||
case 4: /* Save / load game */
|
case 2: /* Save / load game */
|
||||||
this->save_load_state(&np, submenus[1]);
|
this->save_load_state(&np, submenus[1]);
|
||||||
break;
|
break;
|
||||||
case 6: /* Bind keys to joystick */
|
case 4: /* Bind keys to joystick */
|
||||||
switch (submenus[2])
|
switch (submenus[2])
|
||||||
{
|
{
|
||||||
case 0: /* type */
|
case 0: /* type */
|
||||||
@ -682,23 +683,23 @@ void C64::VBlank(bool draw_frame)
|
|||||||
this->bind_keys(&np); break;
|
this->bind_keys(&np); break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 9: /* Reset the C64 */
|
case 7: /* Reset the C64 */
|
||||||
Reset();
|
Reset();
|
||||||
break;
|
break;
|
||||||
case 10: /* Networking */
|
case 8: /* Networking */
|
||||||
this->networking_menu(&np);
|
this->networking_menu(&np);
|
||||||
break;
|
break;
|
||||||
case 11: /* Other options */
|
case 9: /* Other options */
|
||||||
this->other_options(&np);
|
this->other_options(&np);
|
||||||
break;
|
break;
|
||||||
case 12: /* Advanced options */
|
case 10: /* Advanced options */
|
||||||
this->advanced_options(&np);
|
this->advanced_options(&np);
|
||||||
break;
|
break;
|
||||||
case 13:
|
case 11:
|
||||||
{
|
{
|
||||||
menu_select(welcome, NULL);
|
menu_select("Frodo help", welcome, NULL);
|
||||||
} break;
|
} break;
|
||||||
case 15: /* Quit */
|
case 12: /* Quit */
|
||||||
quit_thyself = true;
|
quit_thyself = true;
|
||||||
break;
|
break;
|
||||||
case -1:
|
case -1:
|
||||||
|
@ -861,15 +861,15 @@ int menu_select_sized(const char *title, const char **msgs, int *submenus, int s
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int menu_select(const char *title, const char **msgs, int *submenus, int sel)
|
int menu_select(const char *title, const char **msgs, int *submenus)
|
||||||
{
|
{
|
||||||
return menu_select_sized(title, msgs, submenus, sel,
|
return menu_select_sized(title, msgs, submenus, 0,
|
||||||
32, 32, FULL_DISPLAY_X-32, FULL_DISPLAY_Y-64);
|
32, 32, FULL_DISPLAY_X-32, FULL_DISPLAY_Y-64);
|
||||||
}
|
}
|
||||||
|
|
||||||
int menu_select(const char **msgs, int *submenus)
|
int menu_select(const char **msgs, int *submenus)
|
||||||
{
|
{
|
||||||
return menu_select("", msgs, submenus, 0);
|
return menu_select("", msgs, submenus);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" const char **DirD64(const char *FileName);
|
extern "C" const char **DirD64(const char *FileName);
|
||||||
@ -916,7 +916,7 @@ static const char *get_d64_file(const char *name)
|
|||||||
if (!dir)
|
if (!dir)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
int which = menu_select("Select D64 file", dir, NULL, 0);
|
int which = menu_select("Select D64 file", dir, NULL);
|
||||||
|
|
||||||
if (which >= 0)
|
if (which >= 0)
|
||||||
{
|
{
|
||||||
|
11
Src/menu.h
11
Src/menu.h
@ -16,10 +16,6 @@
|
|||||||
#include <SDL_ttf.h>
|
#include <SDL_ttf.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
|
||||||
extern "C" {
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
#define KEY_UP 1
|
#define KEY_UP 1
|
||||||
#define KEY_DOWN 2
|
#define KEY_DOWN 2
|
||||||
#define KEY_LEFT 4
|
#define KEY_LEFT 4
|
||||||
@ -34,8 +30,9 @@ void menu_print_font(SDL_Surface *screen, int r, int g, int b, int x, int y, con
|
|||||||
void menu_print_font64(SDL_Surface *screen, int r, int g, int b, int x, int y, const char *msg);
|
void menu_print_font64(SDL_Surface *screen, int r, int g, int b, int x, int y, const char *msg);
|
||||||
|
|
||||||
/* Various option selects */
|
/* Various option selects */
|
||||||
|
int menu_select(const char *title, const char **pp_msgs, int *p_submenus);
|
||||||
int menu_select(const char **pp_msgs, int *p_submenus);
|
int menu_select(const char **pp_msgs, int *p_submenus);
|
||||||
int menu_select_sized(char *title, const char **msgs, int *submenus, int sel,
|
int menu_select_sized(char *title, const char **msgs, int *submenus,
|
||||||
int x, int y, int w, int h);
|
int x, int y, int w, int h);
|
||||||
const char *menu_select_file(const char *dir_path);
|
const char *menu_select_file(const char *dir_path);
|
||||||
const char *menu_select_file_start(const char *dir_path, const char **d64_name);
|
const char *menu_select_file_start(const char *dir_path, const char **d64_name);
|
||||||
@ -50,8 +47,4 @@ extern bool msgYesNo(char *text, bool def,int x, int y);
|
|||||||
|
|
||||||
void menu_init();
|
void menu_init();
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
|
||||||
};
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
#endif /* !__MENU_H__ */
|
#endif /* !__MENU_H__ */
|
||||||
|
@ -3,28 +3,25 @@
|
|||||||
#include "menutexts.h"
|
#include "menutexts.h"
|
||||||
|
|
||||||
const char *welcome[] = {
|
const char *welcome[] = {
|
||||||
/*01*/ "#1 WELCOME TO FRODO ON WII ",
|
/*03*/ "In the system, hit HOME on the Wiimote to get to ",
|
||||||
/*02*/ " ------------------------------------------------- ",
|
/*04*/ "the config-page. Load or autostart a D64, T64, ",
|
||||||
/*03*/ " In the system, hit HOME on the Wiimote to get to ",
|
/*05*/ "or PRG image. Use the virtual keyboard or assign ",
|
||||||
/*04*/ " the config-page. Load or autostart a D64, T64, or ",
|
/*06*/ "key strokes to buttons on the Wiimote. ",
|
||||||
/*05*/ " PRG image. Use the virtual keyboard or assign the ",
|
/*07*/ "You can save the game state in the main menu. ",
|
||||||
/*06*/ " key strokes to buttons on the Wiimote. ",
|
/*08*/ "The next time you can load that state instead ",
|
||||||
/*07*/ " Save the game state in the main menu of the game. ",
|
/*09*/ "and restore the game and everything configured. ",
|
||||||
/*08*/ " Next time you can load that state instead and have",
|
/*10*/ " ",
|
||||||
/*09*/ " the game and everything configured directly. ",
|
/*11*/ "In the networking menu, you can host a game over ",
|
||||||
/*10*/ " ",
|
/*12*/ "the network or browse for active games. During ",
|
||||||
/*11*/ " In the networking menu, you can host a game over ",
|
/*13*/ "network play, you can send messages to your peer ",
|
||||||
/*12*/ " the network or browse for active games. During ",
|
/*14*/ "by pressing ScrLk on the USB keyboard. ",
|
||||||
/*13*/ " network play, you can send messages to your peer ",
|
/*10*/ " ",
|
||||||
/*14*/ " by pressing ScrLk on the USB keyboard. ",
|
/*10*/ "In each menu, the '2' button selects and entry ",
|
||||||
/*15*/ " ",
|
/*10*/ "and '1' cancels. ",
|
||||||
/*16*/ ".-------------------------------------------------.",
|
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
const char *new_main_menu_messages[] = {
|
const char *new_main_menu_messages[] = {
|
||||||
/*00*/ "#1.MAIN MENU ",
|
|
||||||
/*01*/ "#1-------------------------------------",
|
|
||||||
/*02*/ ".File",
|
/*02*/ ".File",
|
||||||
/*03*/ "^|Insert|Start",
|
/*03*/ "^|Insert|Start",
|
||||||
/*04*/ ".States",
|
/*04*/ ".States",
|
||||||
@ -37,14 +34,10 @@ const char *new_main_menu_messages[] = {
|
|||||||
/*11*/ ".Options",
|
/*11*/ ".Options",
|
||||||
/*12*/ ".Advanced Options",
|
/*12*/ ".Advanced Options",
|
||||||
/*13*/ ".Help",
|
/*13*/ ".Help",
|
||||||
/*14*/ "#1-------------------------------------",
|
|
||||||
/*15*/ ".Quit",
|
/*15*/ ".Quit",
|
||||||
/*17*/ "#1'2'=SELECT, '1'=CANCEL",
|
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
const char *new_options_menu_messages[] = {
|
const char *new_options_menu_messages[] = {
|
||||||
/*00*/ "#1.OPTIONS MENU ",
|
|
||||||
/*01*/ "#1-------------------------------------",
|
|
||||||
/*02*/ ".Map Wiimote 1 to:",
|
/*02*/ ".Map Wiimote 1 to:",
|
||||||
/*03*/ "^|Port 1|Port 2",
|
/*03*/ "^|Port 1|Port 2",
|
||||||
/*04*/ " ",
|
/*04*/ " ",
|
||||||
@ -58,8 +51,6 @@ const char *new_options_menu_messages[] = {
|
|||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
const char *new_advanced_options_menu_messages[] = {
|
const char *new_advanced_options_menu_messages[] = {
|
||||||
/*00*/ "#1.ADVANCED OPTIONS MENU ",
|
|
||||||
/*01*/ "#1-------------------------------------",
|
|
||||||
/*02*/ ".Display resolution",
|
/*02*/ ".Display resolution",
|
||||||
/*03*/ "^|double-center|stretched",
|
/*03*/ "^|double-center|stretched",
|
||||||
/*04*/ " ",
|
/*04*/ " ",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user