#ifndef ui_text_h
#define ui_text_h

#define MAX_PORT_LEN  63
#define MAX_DEFSTR_LEN 48

/* Important: this must match the default_text list in ui_text.c! */
enum
{
	UI_first_entry = -1,

	UI_mame,

	/* copyright stuff */
	UI_copyright1,
	UI_copyright2,
	UI_copyright3,

	/* misc menu stuff */
	UI_returntomain,
	UI_returntoprior,
	UI_anykey,
	UI_selectkey,
	UI_on,
	UI_off,
	UI_NA,
	UI_OK,
	UI_INVALID,
	UI_none,
	UI_cpu,
	UI_address,
	UI_value,
	UI_sound,
	UI_sound_lc, /* lower-case version */
	UI_stereo,
	UI_vectorgame,
	UI_screenres,
	UI_text,
	UI_volume,
	UI_relative,
	UI_allchannels,
	UI_brightness,
	UI_gamma,
	UI_vectorflicker,
	UI_vectorintensity,
	UI_overclock,
	UI_allcpus,
	UI_dipswitchmissing,
	UI_historymissing,
	UI_commandmissing,
	UI_playbackend,
	UI_menu,
	UI_copyright,

	/* special characters */
	UI_leftarrow,
	UI_rightarrow,
	UI_uparrow,
	UI_downarrow,
	UI_lefthilight,
	UI_righthilight,

	/* warnings */
	UI_knownproblems,
	UI_imperfectcolors,
	UI_wrongcolors,
	UI_imperfectgraphics,
	UI_imperfectsound,
	UI_nosound,
	UI_nococktail,
	UI_brokengame,
	UI_brokenprotection,
	UI_workingclones,
	UI_typeok,

	/* main menu */
	UI_inputgeneral,
	UI_dipswitches,
	UI_analogcontrols,
	UI_bookkeeping,
	UI_inputspecific,
	UI_gameinfo,
	UI_history,
	UI_command,
	UI_custombuttons,
	UI_autofire,
	UI_resetgame,
	UI_returntogame,
	UI_cheat,
	UI_memorycard,

	/* input stuff */
	UI_keyjoyspeed,
	UI_reverse,
	UI_sensitivity,

	/* stats */
	UI_tickets,
	UI_coin,
	UI_locked,

	/* memory card */
	UI_loadcard,
	UI_ejectcard,
	UI_createcard,
	UI_resetcard,
	UI_loadfailed,
	UI_loadok,
	UI_cardejected,
	UI_cardcreated,
	UI_cardcreatedfailed,
	UI_cardcreatedfailed2,
	UI_carderror,

	/* cheat stuff */
	UI_enablecheat,
	UI_addeditcheat,
	UI_startcheat,
	UI_continuesearch,
	UI_viewresults,
	UI_restoreresults,
	UI_memorywatch,
	UI_generalhelp,
	UI_options,
	UI_reloaddatabase,
	UI_watchpoint,
	UI_disabled,
	UI_cheats,
	UI_watchpoints,
	UI_code,
	UI_max,
	UI_set,
	UI_nocheatdata,
	UI_nocheatfile,
	UI_unzipfile,
	UI_displayhelp,
	UI_autosavecheat,
	UI_reloaddatabasemes,
	UI_restorevalue,
	UI_nooldvalue,
	UI_cheatsearch,

	/* watchpoint stuff */
	UI_watchlength,
	UI_watchdisplaytype,
	UI_watchlabeltype,
	UI_watchlabel,
	UI_watchx,
	UI_watchy,
	UI_watch,

	UI_hex,
	UI_decimal,
	UI_binary,

	/* search stuff */
	UI_search_lives,
	UI_search_timers,
	UI_search_energy,
	UI_search_status,
	UI_search_slow,
	UI_search_speed,
	UI_search_speed_fast,
	UI_search_speed_medium,
	UI_search_speed_slow,
	UI_search_speed_veryslow,
	UI_search_speed_allmemory,
	UI_search_select_memory_areas,
	UI_search_matches_found,
	UI_search_noinit,
	UI_search_nosave,
	UI_search_done,
	UI_search_OK,
	UI_search_select_value,
	UI_search_results_found,
	UI_search_all_values_saved,
	UI_search_one_match_found_added,
	UI_search_select,
	UI_search_dialogstyle,
	UI_search_classic,
	UI_search_advanced,
	UI_search_showlavels,

	/* Load & Save */
	UI_saveselect,
	UI_loadselect,
	UI_saveposition,
	UI_loadposition,
	UI_savecancel,
	UI_loadcancel,

	/* custom button */
	UI_custombutton,
	UI_custombutton_notuse,

	/* autofire stuff */
	UI_autofireoff,
	UI_autofireon,
	UI_autofiretoggle,
	UI_autofiredelay,
	UI_autofiretoggle_message,

	/* WAVE recording */
	UI_waverecording,

	/* Juke Box */
	UI_jukebox,
	UI_soundlist,
	UI_randomplay,
	UI_remixplay,
	UI_bank,
	UI_code1,
	UI_code2,
	UI_jukecommand,
	UI_jukeplay,
	UI_jukestop,
	UI_jukerecord,
	UI_jukestop_exp,
	UI_jukerecord_exp,
	UI_jukecode_exp,
	UI_jukenotes_exp,
	UI_jukefastforward_exp,
	UI_jukerandomstop_exp,
	UI_jukenext_exp,
	UI_remixback_exp,
	UI_remixnext_exp,
	UI_remixstop_exp,
	UI_remixtimer_exp,
	UI_fastforwarding,
	UI_gotorandomplay,
	UI_gotoplaylist,
	UI_gotomanualcode,
	UI_bgm,
	UI_se1,
	UI_se2,
	UI_se3,
	UI_se4,
	UI_se5,
	UI_se6,
	UI_se7,

	/* object operation */
	UI_object_operation,
	UI_object_number,
	UI_object_exp,
	UI_background_number,
	UI_background_exp,
	UI_frontlayer,
	UI_altbackcolor,
	UI_object_clear,
	UI_object_def,
	UI_object_off,
	UI_object_on,

	/* input.c */
	UI_codenone,
	UI_codenot,
	UI_codeor,
	UI_codena,

	/* window.c */
	UI_fullscreen,

	/* neogeo.c */
	UI_rastereffects,
	UI_enabled,

	UI_last_entry
};

enum
{
	PORT_first_entry = -1,

	PORT_ConfigMenu,
	PORT_OnScreenDisplay,
	PORT_Pause,
	PORT_SingleStep,
	PORT_ResetGame,
	PORT_ShowGfx,
	PORT_FrameskipDec,
	PORT_FrameskipInc,
	PORT_Throttole,
	PORT_ShowFPS,
	PORT_ShowProfiler,
	PORT_SaveSnapshot,
	PORT_ToggleCheat,
	PORT_SaveState,
	PORT_LoadState,
	PORT_AddCheat,
	PORT_DeleteCheat,
	PORT_SaveCheat,
	PORT_WatchValue,
	PORT_EditCheat,
	PORT_ChangeScreenMode,
	PORT_ToggleAutofire,
	PORT_ToggleWaveRecording,
	PORT_ShowInputLog,
	PORT_OperationObj,
	PORT_ShowCommandList,
	PORT_ShowCheatList,
	PORT_ShowTime,
	PORT_UIUp,
	PORT_UIDown,
	PORT_UILeft,
	PORT_UIRight,
	PORT_UISelect,
	PORT_UICancel,
	PORT_UIClose,
	PORT_Coin1,
	PORT_Coin2,
	PORT_Coin3,
	PORT_Coin4,
	PORT_Service,
	PORT_P1Start,
	PORT_P1Select,
	PORT_P1Up,
	PORT_P1Down,
	PORT_P1Left,
	PORT_P1Right,
	PORT_P1ButtonA,
	PORT_P1ButtonB,
	PORT_P1ButtonC,
	PORT_P1ButtonD,
	PORT_P1Button1,
	PORT_P1Button2,
	PORT_P1Button3,
	PORT_P1Button4,
	PORT_P1Button5,
	PORT_P1Button6,
	PORT_P1Custom1,
	PORT_P1Custom2,
	PORT_P1Custom3,
	PORT_P1Custom4,
	PORT_P1TrackYUp,
	PORT_P1TrackYDown,
	PORT_P1TrackXLeft,
	PORT_P1TrackXRight,
	PORT_P1DialDec,
	PORT_P1DialInc,
	PORT_P2Start,
	PORT_P2Select,
	PORT_P2Up,
	PORT_P2Down,
	PORT_P2Left,
	PORT_P2Right,
	PORT_P2ButtonA,
	PORT_P2ButtonB,
	PORT_P2ButtonC,
	PORT_P2ButtonD,
	PORT_P2Button1,
	PORT_P2Button2,
	PORT_P2Button3,
	PORT_P2Button4,
	PORT_P2Button5,
	PORT_P2Button6,
	PORT_P2Custom1,
	PORT_P2Custom2,
	PORT_P2Custom3,
	PORT_P2Custom4,
	PORT_P2TrackYUp,
	PORT_P2TrackYDown,
	PORT_P2TrackXLeft,
	PORT_P2TrackXRight,
	PORT_P2DialDec,
	PORT_P2DialInc,
	PORT_P3Start,
	PORT_P3Up,
	PORT_P3Down,
	PORT_P3Left,
	PORT_P3Right,
	PORT_P3Button1,
	PORT_P3Button2,
	PORT_P3Button3,
	PORT_P3Button4,
	PORT_P4Start,
	PORT_P4Up,
	PORT_P4Down,
	PORT_P4Left,
	PORT_P4Right,
	PORT_P4Button1,
	PORT_P4Button2,
	PORT_P4Button3,
	PORT_P4Button4,
	PORT_Unknown,

	PORT_last_entry
};

/* this must match the ipdn_defaultstrings list in inptport.c */
enum
{
	STR_Off,
	STR_On,
	STR_No,
	STR_Yes,
	STR_Lives,
	STR_ActLives,
	STR_ShtLives,
	STR_PzlLives,
	STR_Bonus_Life,
	STR_Difficulty,
	STR_Difficulty1,
	STR_Difficulty2,
	STR_Difficulty_Enemy,
	STR_Difficulty_Player,
	STR_Difficulty_Act,
	STR_Difficulty_Sht,
	STR_Difficulty_Pzl,
	STR_Demo_Sounds,
	STR_Coinage,
	STR_Coin_A,
	STR_Coin_B,
	STR_9C_1C,
	STR_8C_1C,
	STR_7C_1C,
	STR_6C_1C,
	STR_5C_1C,
	STR_4C_1C,
	STR_3C_1C,
	STR_8C_3C,
	STR_4C_2C,
	STR_2C_1C,
	STR_5C_3C,
	STR_3C_2C,
	STR_4C_3C,
	STR_4C_4C,
	STR_3C_3C,
	STR_2C_2C,
	STR_1C_1C,
	STR_4C_5C,
	STR_3C_4C,
	STR_2C_3C,
	STR_4C_7C,
	STR_2C_4C,
	STR_1C_2C,
	STR_2C_5C,
	STR_2C_6C,
	STR_1C_3C,
	STR_2C_7C,
	STR_2C_8C,
	STR_1C_4C,
	STR_1C_5C,
	STR_1C_6C,
	STR_1C_7C,
	STR_1C_8C,
	STR_1C_9C,
	STR_2C_1C_1C,
	STR_2CS_1CC,
	STR_1030e30,
	STR_2050e70,
	STR_3060e70,
	STR_4070e80,
	STR_100e200,
	STR_80e400,
	STR_100e450,
	STR_160e450,
	STR_600e1400,
	STR_60020004500,
	STR_12003500,
	STR_2000only,
	STR_ContinueCoin,
	STR_1Coin,
	STR_2Coins,
	STR_Free_Play,
	STR_Extend,
	STR_Cabinet,
	STR_Upright,
	STR_Upright1P,
	STR_Upright2P,
	STR_Cocktail,
	STR_Flip_Screen,
	STR_Service_Mode,
	STR_TestSwitch,
	STR_CoinChutes,
	STR_Autofire,
	STR_CommSetting,
	STR_Freeze,
	STR_Territory,
	STR_MachineMode,
	STR_Japan,
	STR_USA,
	STR_Europe,
	STR_Home,
	STR_Arcade,
	STR_Vitality,
	STR_AllowContinue,
	STR_TurboMode,
	STR_MaxPlayers,
	STR_Voice,
	STR_CoinSlots,
	STR_StageSelect,
	STR_MagicContinue,
	STR_LifeBar,
	STR_InitialVitality,
	STR_BulletSpeed,
	STR_2player,
	STR_1Cre_NoCont,
	STR_2Cre_WinCont,
	STR_VsMode,
	STR_TestMode,
	STR_None,
	STR_Unused,
	STR_Unknown,
	STR_TOTAL
};

#define DEF_STR(str_num) (ipdn_defaultstrings[STR_##str_num])

extern char portname[PORT_last_entry + 1][MAX_PORT_LEN + 1];
extern char ipdn_defaultstrings[][MAX_DEFSTR_LEN];

const char * ui_getstring (int string_num);
void portname_init(void);

#define portname(n) portname[PORT_##n]

#endif

