From b74c99b2b5d8f88462b4065444a7e4ae0a9b1f6b Mon Sep 17 00:00:00 2001 From: "simon.kagstrom" Date: Sat, 18 Apr 2009 06:14:52 +0000 Subject: [PATCH] Move menu texts to their own file --- Makefile | 2 +- Src/C64_SDL.h | 2 + Src/Makefile | 2 +- Src/menu.cpp | 102 ------------------------------------------------ Src/menutexts.h | 14 ++++++- 5 files changed, 17 insertions(+), 105 deletions(-) diff --git a/Makefile b/Makefile index ad79de2..d8d5338 100644 --- a/Makefile +++ b/Makefile @@ -64,7 +64,7 @@ CFILES := gcaudio.c CPPFILES := Display.cpp main.cpp Prefs.cpp SID.cpp REU.cpp IEC.cpp 1541fs.cpp \ 1541d64.cpp 1541t64.cpp 1541job.cpp SAM.cpp C64_SC.cpp CPUC64_SC.cpp VIC_SC.cpp \ CIA_SC.cpp CPU1541_SC.cpp menu.cpp CPU_common.cpp VirtualKeyboard.cpp \ - Network.cpp + Network.cpp menutexts.c sFILES := SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S))) BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) diff --git a/Src/C64_SDL.h b/Src/C64_SDL.h index 4752431..9f99a51 100644 --- a/Src/C64_SDL.h +++ b/Src/C64_SDL.h @@ -22,6 +22,8 @@ #define TMP_PATH "tmp" #endif +#include "menutexts.h" + /* TODO: */ extern char *fixme_tmp_network_client; extern char *fixme_tmp_network_server; diff --git a/Src/Makefile b/Src/Makefile index 1d8d3cc..9bb74fa 100644 --- a/Src/Makefile +++ b/Src/Makefile @@ -29,7 +29,7 @@ INSTALL_DATA = ${INSTALL} -m 644 GUIOBJS = OBJS = $(GUIOBJS) main.o Prefs.o SID.o REU.o IEC.o 1541fs.o \ 1541d64.o 1541t64.o 1541job.o SAM.o CmdPipe.o menu.o Network.o \ - VirtualKeyboard.o + VirtualKeyboard.o menutexts.o SLOBJS = $(OBJS) C64.o CPUC64.o VIC.o CIA.o CPU1541.o Display.o SLFLAGS = -DPRECISE_CPU_CYCLES=1 -DPRECISE_CIA_CYCLES=1 -DPC_IS_POINTER=0 SCOBJS = $(OBJS) C64_SC.o CPUC64_SC.o VIC_SC.o CIA_SC.o CPU1541_SC.o CPU_common.o Display_SC.o diff --git a/Src/menu.cpp b/Src/menu.cpp index 9dbc0cd..3c6f87b 100644 --- a/Src/menu.cpp +++ b/Src/menu.cpp @@ -65,108 +65,6 @@ static TTF_Font *menu_font64; int fh, fw; -const char *welcome[] = { - /*01*/ "#1 WELCOME TO FRODO ON WII ", - /*02*/ " ------------------------------------------------- ", - /*03*/ " In the system, hit HOME on the Wiimote to get to ", - /*04*/ " the config-page. Load or autostart a D64, T64, or ", - /*05*/ " PRG image. Use the virtual keyboard or assign the ", - /*06*/ " key strokes to buttons on the Wiimote. ", - /*07*/ " Save the game state in the main menu of the game. ", - /*08*/ " Next time you can load that state instead of the ", - /*09*/ " game to have all configured stuff along with that ", - /*10*/ " game. ", - /*11*/ " ", - /*12*/ " This version features USB-keyboard support and ", - /*13*/ " D64 content listing. Use first Wiimote as port 1 ", - /*14*/ " joystick and the second as port 2 joystick. ", - /*15*/ " ", - /*16*/ ".-------------------------------------------------.", - /*17*/ "^| Enter Frodo | Don't show again ", - NULL -}; - -const char *new_main_menu_messages[] = { - /*00*/ "#1.MAIN MENU ", - /*01*/ "#1-------------------------------------", - /*02*/ ".Image", - /*03*/ "^|Load|Start|Remove", - /*04*/ ".States", - /*05*/ "^|Load|Save|Delete|Rename ", - /*06*/ ".Keyboard", - /*07*/ "^|Type|Macro|Bind", - /*08*/ "#1-------------------------------------", - /*09*/ ".Reset the C=64", - /*10*/ ".Options", - /*11*/ ".Advanced Options", - /*12*/ ".Controls", - /*13*/ "#1-------------------------------------", - /*14*/ ".Quit", - /*15*/ "#1-------------------------------------", - /*16*/ "#1'2'=SELECT, '1'=CANCEL", - NULL -}; -const char *new_options_menu_messages[] = { - /*00*/ "#1.OPTIONS MENU ", - /*01*/ "#1-------------------------------------", - /*02*/ ".Map Wiimote 1 to:", - /*03*/ "^|Port 1|Port 2", - /*04*/ " ", - /*05*/ ".True 1541 emulation", - /*06*/ "^|NO|YES", - /*07*/ " ", - /*08*/ ".1541 Floppy Drive LED", /* 0 */ - /*09*/ "^|OFF|ON", - /*10*/ "#1-------------------------------------", - /*11*/ "#1'2'=SELECT, '1'=CANCEL", - NULL -}; -const char *new_advanced_options_menu_messages[] = { - /*00*/ "#1.ADVANCED OPTIONS MENU ", - /*01*/ "#1-------------------------------------", - /*02*/ ".Display resolution", /* 0 */ - /*03*/ "^|double-center|stretched", - /*04*/ " ", - /*05*/ ".Speed (approx.)", /* 2 */ - /*06*/ "^|95|100|110", - /*07*/ " ", - /*08*/ ".Sprite collisions", /* 0 */ - /*09*/ "^|OFF|ON", - /*10*/ " ", - /*11*/ ".Autostart", /* 0 */ - /*12*/ "^|Save|Clear", /* 0 */ - /*13*/ "#1-------------------------------------", - /*14*/ "#1'2'=SELECT, '1'=CANCEL", - NULL -}; -const char *new_help_menu_messages[] = { - /*00*/ "#1.CONTROLS MENU ", - /*01*/ "#1-------------------------------------", - /*02*/ ".Wiimote key mappings", /* 0 */ - /*03*/ "^|Wiimote Info|Set Default", /* 0 */ - /*04*/ " ", - /*05*/ ".Show USB-keyboard layout", /* 0 */ - /*06*/ "#1-------------------------------------", - /*07*/ "#1'2'=SELECT, '1'=CANCEL", - NULL -}; -const char *layout_messages[] = { - "#1.USB-Keyboard Layout ", - "#1-------------------------------------", - "#2ESC = Run/Stop", - "#2F9 = QuickSave", - "#2F10 = QuickLoad", - "#2F11 = Restore", - "#2TAB = CTRL", - "#2INS = Clr/Home", - "#2PGU = ยค", - "#2AGR = C=", - "#2HOM = Menu", - "#1-------------------------------------", - "Back", - NULL, -}; - int msgInfo(char *text, int duration, SDL_Rect *irc) { int len = strlen(text); diff --git a/Src/menutexts.h b/Src/menutexts.h index 029930e..20cbfe0 100644 --- a/Src/menutexts.h +++ b/Src/menutexts.h @@ -1,8 +1,20 @@ +#ifndef __menutexts_h +#define __menutexts_h + +#if defined(__cplusplus) +extern "C" { +#endif + extern const char *welcome[]; extern const char *new_main_menu_messages[]; extern const char *new_options_menu_messages[]; extern const char *new_advanced_options_menu_messages[]; extern const char *new_help_menu_messages[]; -extern const char *main_menu_messages[]; extern const char *layout_messages[]; extern const char *other_options_messages[]; + +#if defined(__cplusplus) +} +#endif + +#endif /* __menutexts_h */