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
79typedef struct {
80 menu_mode_t mode;
81 menu_mode_t next_mode;
82
83 const char *storage_prefix;
84 settings_t settings;
85 bookkeeping_t bookkeeping;
86 boot_params_t *boot_params;
87
88 char *error_message;
89 flashcart_err_t flashcart_err;
90
91 time_t current_time;
92
93 struct {
94 bool go_up;
95 bool go_down;
96 bool go_left;
97 bool go_right;
98 bool go_fast;
99
100 bool enter;
101 bool back;
102 bool options;
103 bool settings;
104 bool lz_context;
105 } actions;
106
107 struct {
108 bool valid;
109 bool reload;
110 bool archive;
111 mz_zip_archive zip;
112 path_t *directory;
113 entry_t *list;
114 int32_t entries;
115 entry_t *entry;
116 int32_t selected;
117 path_t* select_file;
118 } browser;
119
120 struct {
121 path_t *rom_path;
122 rom_info_t rom_info;
123 path_t *disk_path;
124 disk_info_t disk_info;
125 int32_t load_history_id;
126 int32_t load_favorite_id;
127 bool combined_disk_rom;
128 } load;
129
130 struct {
131 bool rom_file;
132 bool disk_file;
133 bool emulator_file;
134 bool extract_file;
135 } load_pending;
136} menu_t;
137
138
139#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
File Entry Structure.
Definition menu_state.h:71
Menu Structure.
Definition menu_state.h:79
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