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
22typedef enum {
23 MENU_MODE_NONE,
24 MENU_MODE_STARTUP,
25 MENU_MODE_BROWSER,
26 MENU_MODE_FILE_INFO,
27 MENU_MODE_SYSTEM_INFO,
28 MENU_MODE_IMAGE_VIEWER,
29 MENU_MODE_TEXT_VIEWER,
30 MENU_MODE_MUSIC_PLAYER,
31 MENU_MODE_CREDITS,
32 MENU_MODE_SETTINGS_EDITOR,
33 MENU_MODE_RTC,
34 MENU_MODE_FLASHCART,
35 MENU_MODE_LOAD_ROM,
36 MENU_MODE_LOAD_DISK,
37 MENU_MODE_LOAD_EMULATOR,
38 MENU_MODE_ERROR,
39 MENU_MODE_FAULT,
40 MENU_MODE_BOOT,
42
44typedef enum {
45 ENTRY_TYPE_DIR,
46 ENTRY_TYPE_ROM,
47 ENTRY_TYPE_DISK,
48 ENTRY_TYPE_EMULATOR,
49 ENTRY_TYPE_SAVE,
50 ENTRY_TYPE_IMAGE,
51 ENTRY_TYPE_MUSIC,
52 ENTRY_TYPE_TEXT,
53 ENTRY_TYPE_OTHER,
55
57typedef struct {
58 char *name;
59 entry_type_t type;
60 int64_t size;
61} entry_t;
62
64typedef struct {
65 menu_mode_t mode;
66 menu_mode_t next_mode;
67
68 const char *storage_prefix;
69 settings_t settings;
70 boot_params_t *boot_params;
71
72 char *error_message;
73 flashcart_err_t flashcart_err;
74
75 time_t current_time;
76
77 struct {
78 bool go_up;
79 bool go_down;
80 bool go_left;
81 bool go_right;
82 bool go_fast;
83
84 bool enter;
85 bool back;
86 bool options;
87 bool settings;
88 bool lz_context;
89 } actions;
90
91 struct {
92 bool valid;
93 bool reload;
94 path_t *directory;
95 entry_t *list;
96 int entries;
97 entry_t *entry;
98 int selected;
99 } browser;
100
101 struct {
102 path_t *rom_path;
103 rom_info_t rom_info;
104 path_t *disk_path;
105 disk_info_t disk_info;
106 bool combined_disk_rom;
107 } load;
108
109 struct {
110 bool rom_file;
111 bool disk_file;
112 bool emulator_file;
113 } boot_pending;
114} menu_t;
115
116
117#endif
Flashcart Boot Subsystem.
Boot Parameters Structure.
Definition boot.h:36
64DD disk information
Disk Information Structure.
Definition disk_info.h:44
Flashcart Subsystem.
flashcart_err_t
Flashcart error enumeration.
Definition flashcart.h:16
entry_type_t
File entry type enumeration.
Definition menu_state.h:44
menu_mode_t
Menu mode enumeration.
Definition menu_state.h:22
File Entry Structure.
Definition menu_state.h:57
Menu Structure.
Definition menu_state.h:64
Menu Path.
Path Structure.
Definition path.h:16
N64 ROM Database.
ROM Information Structure.
Definition rom_info.h:154
Menu Settings.
Settings Structure.
Definition settings.h:12