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 <miniz.h>
12#include <miniz_zip.h>
13#include <time.h>
14
15#include "boot/boot.h"
16#include "disk_info.h"
17#include "flashcart/flashcart.h"
18#include "path.h"
19#include "rom_info.h"
20#include "settings.h"
21#include "bookkeeping.h"
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_CONTROLLER_PAKFS,
38 MENU_MODE_CONTROLLER_PAK_DUMP_INFO,
39 MENU_MODE_CONTROLLER_PAK_DUMP_NOTE_INFO,
40 MENU_MODE_FLASHCART,
41 MENU_MODE_LOAD_ROM,
42 MENU_MODE_LOAD_DISK,
43 MENU_MODE_LOAD_EMULATOR,
44 MENU_MODE_ERROR,
45 MENU_MODE_FAULT,
46 MENU_MODE_BOOT,
47 MENU_MODE_FAVORITE,
48 MENU_MODE_HISTORY,
49 MENU_MODE_DATEL_CODE_EDITOR,
50 MENU_MODE_EXTRACT_FILE
52
54typedef enum {
55 ENTRY_TYPE_DIR,
56 ENTRY_TYPE_DISK,
57 ENTRY_TYPE_EMULATOR,
58 ENTRY_TYPE_IMAGE,
59 ENTRY_TYPE_MUSIC,
60 ENTRY_TYPE_OTHER,
61 ENTRY_TYPE_ROM,
62 ENTRY_TYPE_ROM_CHEAT,
63 ENTRY_TYPE_ROM_PATCH,
64 ENTRY_TYPE_SAVE,
65 ENTRY_TYPE_TEXT,
66 ENTRY_TYPE_ARCHIVE,
67 ENTRY_TYPE_ARCHIVED
69
71typedef struct {
72 char *name;
73 entry_type_t type;
74 int64_t size;
75 int32_t index;
76} entry_t;
77
78typedef struct {
79 path_t *disk_path;
80 disk_info_t disk_info;
82
83typedef struct {
84 disk_slot_entry_t primary;
85 disk_slot_entry_t slot[4];
87
89typedef struct {
90 menu_mode_t mode;
91 menu_mode_t next_mode;
92
93 const char *storage_prefix;
94 settings_t settings;
95 bookkeeping_t bookkeeping;
96 boot_params_t *boot_params;
97
98 char *error_message;
99 flashcart_err_t flashcart_err;
100
101 time_t current_time;
102
103 struct {
104 bool go_up;
105 bool go_down;
106 bool go_left;
107 bool go_right;
108 bool go_fast;
109
110 bool enter;
111 bool back;
112 bool options;
113 bool settings;
114 bool lz_context;
115 } actions;
116
117 struct {
118 bool valid;
119 bool reload;
120 bool archive;
121 mz_zip_archive zip;
122 path_t *directory;
123 entry_t *list;
124 int32_t entries;
125 entry_t *entry;
126 int32_t selected;
127 path_t* select_file;
128 } browser;
129
130 struct {
131 path_t *rom_path;
132 rom_info_t rom_info;
133 disk_slot_t disk_slots;
134 int32_t load_history_id;
135 int32_t load_favorite_id;
136 bool combined_disk_rom;
137 } load;
138
139 struct {
140 bool rom_file;
141 bool disk_file;
142 bool emulator_file;
143 bool extract_file;
144 } load_pending;
145} menu_t;
146
147
148#endif
Bookkeeping of loaded ROMs.
ROM bookkeeping structure.
Definition bookkeeping.h:30
Flashcart Boot Subsystem.
Boot Parameters Structure.
Definition boot.h:34
64DD disk information
Disk Information Structure.
Definition disk_info.h:50
Flashcart Subsystem.
flashcart_err_t
Flashcart error enumeration.
Definition flashcart.h:14
entry_type_t
File entry type enumeration.
Definition menu_state.h:54
menu_mode_t
Menu mode enumeration.
Definition menu_state.h:25
Definition menu_state.h:78
Definition menu_state.h:83
File Entry Structure.
Definition menu_state.h:71
Menu Structure.
Definition menu_state.h:89
Menu Path.
Path Structure.
Definition path.h:16
N64 ROM Database.
ROM Information Structure.
Definition rom_info.h:126
Menu Settings.
Settings Structure.
Definition settings.h:12