N64FlashcartMenu
Loading...
Searching...
No Matches
menu_state.h
Go to the documentation of this file.
1
7#ifndef MENU_STRUCT_H__
8#define MENU_STRUCT_H__
9
10
11#include <time.h>
12
13#include "boot/boot.h"
14#include "disk_info.h"
15#include "flashcart/flashcart.h"
16#include "path.h"
17#include "rom_info.h"
18#include "settings.h"
19
20
21#define BROWSER_LIST_SIZE 2048
22
23
25typedef enum {
26 MENU_MODE_NONE,
27 MENU_MODE_STARTUP,
28 MENU_MODE_BROWSER,
29 MENU_MODE_FILE_INFO,
30 MENU_MODE_SYSTEM_INFO,
31 MENU_MODE_IMAGE_VIEWER,
32 MENU_MODE_TEXT_VIEWER,
33 MENU_MODE_MUSIC_PLAYER,
34 MENU_MODE_CREDITS,
35 MENU_MODE_SETTINGS_EDITOR,
36 MENU_MODE_RTC,
37 MENU_MODE_FLASHCART,
38 MENU_MODE_LOAD_ROM,
39 MENU_MODE_LOAD_DISK,
40 MENU_MODE_LOAD_EMULATOR,
41 MENU_MODE_ERROR,
42 MENU_MODE_FAULT,
43 MENU_MODE_BOOT,
45
47typedef enum {
48 ENTRY_TYPE_DIR,
49 ENTRY_TYPE_ROM,
50 ENTRY_TYPE_DISK,
51 ENTRY_TYPE_EMULATOR,
52 ENTRY_TYPE_SAVE,
53 ENTRY_TYPE_IMAGE,
54 ENTRY_TYPE_TEXT,
55 ENTRY_TYPE_MUSIC,
56 ENTRY_TYPE_OTHER,
58
60typedef struct {
61 char *name;
62 entry_type_t type;
63 int size;
64} entry_t;
65
67typedef struct {
68 menu_mode_t mode;
69 menu_mode_t next_mode;
70
71 settings_t settings;
72 boot_params_t *boot_params;
73
74 char *error_message;
75 flashcart_err_t flashcart_err;
76
77 time_t current_time;
78
79 struct {
80 bool go_up;
81 bool go_down;
82 bool go_left;
83 bool go_right;
84 bool go_fast;
85
86 bool enter;
87 bool back;
88 bool options;
89 bool settings;
90 } actions;
91
92 struct {
93 bool valid;
94 bool reload;
95 path_t *directory;
96 entry_t list[BROWSER_LIST_SIZE];
97 int entries;
98 entry_t *entry;
99 int selected;
100 } browser;
101
102 struct {
103 path_t *rom_path;
104 rom_info_t rom_info;
105 path_t *disk_path;
106 disk_info_t disk_info;
107 } load;
108} menu_t;
109
110
111#endif
Flashcart Boot Subsystem.
Boot Parameters Structure.
Definition: boot.h:36
64DD disk information
Disk Information Structure.
Definition: disk_info.h:41
Flashcart Subsystem.
flashcart_err_t
Flashcart error enumeration.
Definition: flashcart.h:16
entry_type_t
File entry type enumeration.
Definition: menu_state.h:47
menu_mode_t
Menu mode enumeration.
Definition: menu_state.h:25
File Entry Structure.
Definition: menu_state.h:60
Menu Structure.
Definition: menu_state.h:67
Menu Path.
Path Structure.
Definition: path.h:16
N64 ROM Database.
ROM Information Structure.
Definition: rom_info.h:153
Menu Settings.
Settings Structure.
Definition: settings.h:12