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,
35 __MENU_MODE_COUNT,
37
39typedef enum {
40 ENTRY_TYPE_DIR,
41 ENTRY_TYPE_ROM,
42 ENTRY_TYPE_EMULATOR,
43 ENTRY_TYPE_SAVE,
44 ENTRY_TYPE_IMAGE,
45 ENTRY_TYPE_MUSIC,
46 ENTRY_TYPE_OTHER,
48
50typedef struct {
51 char *name;
52 entry_type_t type;
53 int size;
54} entry_t;
55
57typedef struct {
58 menu_mode_t mode;
59 menu_mode_t next_mode;
60
61 settings_t settings;
62 boot_params_t *boot_params;
63 flashcart_error_t flashcart_error;
64
65 char *error_message;
66
67 struct {
68 bool go_up;
69 bool go_down;
70 bool go_left;
71 bool go_right;
72 bool fast;
73 int vertical_held_counter;
74 int horizontal_held_counter;
75
76 bool enter;
77 bool back;
78 bool file_info;
79 bool system_info;
80 bool settings;
81 } actions;
82
83 struct {
84 bool valid;
85 path_t *directory;
86 entry_t list[BROWSER_LIST_SIZE];
87 int entries;
88 entry_t *entry;
89 int selected;
90 } browser;
91} menu_t;
92
93
94#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:39
menu_mode_t
Menu mode enumeration.
Definition: menu_state.h:21
File Entry Structure.
Definition: menu_state.h:50
Menu Structure.
Definition: menu_state.h:57
Menu Path.
Path Structure.
Definition: path.h:15
Menu Settings.
Settings Structure.
Definition: settings.h:12