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