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