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 "boot/boot.h"
12#include "flashcart/flashcart.h"
13#include "path.h"
14#include "settings.h"
15
16
17#define BROWSER_LIST_SIZE 2048
18
19
21typedef enum {
22 MENU_MODE_NONE,
23 MENU_MODE_STARTUP,
24 MENU_MODE_BROWSER,
25 MENU_MODE_FILE_INFO,
26 MENU_MODE_SYSTEM_INFO,
27 MENU_MODE_IMAGE_VIEWER,
28 MENU_MODE_MUSIC_PLAYER,
29 MENU_MODE_CREDITS,
30 MENU_MODE_LOAD,
31 MENU_MODE_EMULATOR_LOAD,
32 MENU_MODE_ERROR,
33 MENU_MODE_FAULT,
34 MENU_MODE_BOOT,
36
38typedef enum {
39 ENTRY_TYPE_DIR,
40 ENTRY_TYPE_ROM,
41 ENTRY_TYPE_EMULATOR,
42 ENTRY_TYPE_SAVE,
43 ENTRY_TYPE_IMAGE,
44 ENTRY_TYPE_MUSIC,
45 ENTRY_TYPE_OTHER,
47
49typedef struct {
50 char *name;
51 entry_type_t type;
52 int size;
53} entry_t;
54
56typedef struct {
57 menu_mode_t mode;
58 menu_mode_t next_mode;
59
60 settings_t settings;
61 boot_params_t *boot_params;
62 flashcart_error_t flashcart_error;
63
64 char *error_message;
65
66 struct {
67 bool go_up;
68 bool go_down;
69 bool go_left;
70 bool go_right;
71 bool fast;
72 int vertical_held_counter;
73 int horizontal_held_counter;
74
75 bool enter;
76 bool back;
77 bool file_info;
78 bool system_info;
79 bool settings;
80 } actions;
81
82 struct {
83 bool valid;
84 path_t *directory;
85 entry_t list[BROWSER_LIST_SIZE];
86 int entries;
87 entry_t *entry;
88 int selected;
89 } browser;
90} menu_t;
91
92
93#endif
Flashcart Boot Subsystem.
Boot Parameters Structure.
Definition: boot.h:36
Flashcart Subsystem.
flashcart_error_t
Flashcart error enumeration.
Definition: flashcart.h:16
entry_type_t
File entry type enumeration.
Definition: menu_state.h:38
menu_mode_t
Menu mode enumeration.
Definition: menu_state.h:21
File Entry Structure.
Definition: menu_state.h:49
Menu Structure.
Definition: menu_state.h:56
Menu Path.
Path Structure.
Definition: path.h:15
Menu Settings.
Settings Structure.
Definition: settings.h:12