famec hack, CPU debug in CD mode
[picodrive.git] / platform / common / menu.h
... / ...
CommitLineData
1// (c) Copyright 2006,2007 notaz, All rights reserved.
2
3
4void menu_init(void);
5void text_out16(int x, int y, const char *texto, ...);
6void smalltext_out16(int x, int y, const char *texto, int color);
7void smalltext_out16_lim(int x, int y, const char *texto, int color, int max);
8void menu_draw_selection(int x, int y, int w);
9
10extern char menuErrorMsg[64];
11
12
13typedef enum
14{
15 MB_NONE = 1, /* no auto processing */
16 MB_ONOFF, /* ON/OFF setting */
17 MB_RANGE, /* [min-max] setting */
18} menu_behavior;
19
20typedef enum
21{
22 MA_NONE = 1,
23 MA_MAIN_RESUME_GAME,
24 MA_MAIN_SAVE_STATE,
25 MA_MAIN_LOAD_STATE,
26 MA_MAIN_RESET_GAME,
27 MA_MAIN_LOAD_ROM,
28 MA_MAIN_OPTIONS,
29 MA_MAIN_CONTROLS,
30 MA_MAIN_CREDITS,
31 MA_MAIN_PATCHES,
32 MA_MAIN_EXIT,
33 MA_OPT_RENDERER,
34 MA_OPT_SCALING,
35 MA_OPT_ACC_TIMING,
36 MA_OPT_ACC_SPRITES,
37 MA_OPT_SHOW_FPS,
38 MA_OPT_FRAMESKIP,
39 MA_OPT_ENABLE_SOUND,
40 MA_OPT_SOUND_QUALITY,
41 MA_OPT_ARM940_SOUND,
42 MA_OPT_6BUTTON_PAD,
43 MA_OPT_REGION,
44 MA_OPT_SRAM_STATES,
45 MA_OPT_CONFIRM_STATES,
46 MA_OPT_SAVE_SLOT,
47 MA_OPT_CPU_CLOCKS,
48 MA_OPT_SCD_OPTS,
49 MA_OPT_ADV_OPTS,
50 MA_OPT_DISP_OPTS, /* psp */
51 MA_OPT_SAVECFG,
52 MA_OPT_SAVECFG_GAME,
53 MA_OPT_LOADCFG,
54 MA_OPT_INTERLACED, /* giz */
55 MA_OPT2_GAMMA,
56 MA_OPT2_A_SN_GAMMA,
57 MA_OPT2_DBLBUFF, /* giz */
58 MA_OPT2_VSYNC,
59 MA_OPT2_ENABLE_Z80,
60 MA_OPT2_ENABLE_YM2612,
61 MA_OPT2_ENABLE_SN76496,
62 MA_OPT2_GZIP_STATES,
63 MA_OPT2_NO_LAST_ROM,
64 MA_OPT2_RAMTIMINGS, /* gp2x */
65 MA_OPT2_SQUIDGEHACK, /* gp2x */
66 MA_OPT2_STATUS_LINE, /* psp */
67 MA_OPT2_DONE,
68 MA_OPT3_SCALE, /* psp (all OPT3) */
69 MA_OPT3_HSCALE32,
70 MA_OPT3_HSCALE40,
71 MA_OPT3_PRES_NOSCALE,
72 MA_OPT3_PRES_FULLSCR,
73 MA_OPT3_FILTERING,
74 MA_OPT3_VSYNC,
75 MA_OPT3_DONE,
76 MA_CDOPT_TESTBIOS_USA,
77 MA_CDOPT_TESTBIOS_EUR,
78 MA_CDOPT_TESTBIOS_JAP,
79 MA_CDOPT_LEDS,
80 MA_CDOPT_CDDA,
81 MA_CDOPT_PCM,
82 MA_CDOPT_READAHEAD,
83 MA_CDOPT_SAVERAM,
84 MA_CDOPT_SCALEROT_CHIP,
85 MA_CDOPT_BETTER_SYNC,
86 MA_CDOPT_DONE,
87} menu_id;
88
89typedef struct
90{
91 char *name;
92 menu_behavior beh;
93 menu_id id;
94 void *var; /* for on-off settings */
95 int mask;
96 signed char min; /* for ranged integer settings, to be sign-extended */
97 signed char max;
98 char enabled;
99} menu_entry;
100
101
102typedef void (me_draw_custom_f)(const menu_entry *entry, int x, int y, void *param);
103
104int me_id2offset(const menu_entry *entries, int count, menu_id id);
105void me_enable(menu_entry *entries, int count, menu_id id, int enable);
106int me_count_enabled(const menu_entry *entries, int count);
107menu_id me_index2id(const menu_entry *entries, int count, int index);
108void me_draw(const menu_entry *entries, int count, int x, int y, me_draw_custom_f *cust_draw, void *param);
109int me_process(menu_entry *entries, int count, menu_id id, int is_next);
110
111