coastline 0.0.4
Loading...
Searching...
No Matches
pakmenu.h
Go to the documentation of this file.
1#ifndef COASTLINE_PAKMENU_H
2#define COASTLINE_PAKMENU_H
3
9
10#include <PR/os_cont.h>
11#include <PR/ultratypes.h>
12
13#include "sprite.h"
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
20#define PAK_NOTES 16
21
22/* The codes of the notes of this game. */
23#if TGR_REGION == TGR_REGION_US
24#define GAME_CODE 0x4E475245
25#define COMPANY_CODE 0x3544
26#elif TGR_REGION == TGR_REGION_EU
27#define GAME_CODE 0x4E545250
28#define COMPANY_CODE 0x3746
29#elif TGR_REGION == TGR_REGION_ASIA
30#define GAME_CODE 0x4E475258
31#define COMPANY_CODE 0x3746
32#else
33#define GAME_CODE 0x4E54524A
34#define COMPANY_CODE 0x3238
35#endif /* TGR_REGION == TGR_REGION_US */
36
38enum {
48};
49
59
68extern Sprite g_texLogo;
69
78extern Sprite g_texButtonA;
79
88extern Sprite g_texButtonB;
89
97extern Sprite g_texButtonBSmall;
99
100#if TGR_REGION == TGR_REGION_JP
102#define DECAL_CHAR_COUNT 149
103#else
105#define DECAL_CHAR_COUNT 66
106#endif
107
112
121extern const DecalCharMap g_szDecalCharMap;
122
130extern u8 g_bPakMenuInitialized;
132
142
150extern u8 g_bPakDirLoaded;
151
158extern u8 g_bPakSelectedNote;
159
166extern u8 g_bPakFirstValidNote;
167
174extern u8 g_bPakLastValidNote;
175
182extern s32 g_dwPakNoteCount;
184
194
204
212extern u8 g_bPakMenuState;
213
220extern s32 g_nPakFilesUsed;
222
232
242
252
262extern u8 g_aabSavePakIds[2][32];
263
275
286
298
299#ifdef __cplusplus
300}
301#endif
302
303#endif /* COASTLINE_PAKMENU_H */
The controllers and the Controller Pak file system.
#define MAXCONTROLLERS
The ports of the console.
Definition os_cont.h:17
const DecalCharMap g_szDecalCharMap
The ASCII of the characters of the names of notes, a space for those it lacks.
Sprite g_texButtonB
The B-button prompt sprite shared by menu screens.
s32 g_dwPakFreeBlocks
The free space of the Pak in bytes.
OSPfsState g_aPakDirEntries[PAK_NOTES]
The notes of the Pak the menu shows.
Sprite g_texBackground
The pictures of the menu.
@ PAK_MENU_BROWSE
Definition pakmenu.h:41
@ PAK_MENU_DELETE
Definition pakmenu.h:44
@ PAK_MENU_MOUNT
Definition pakmenu.h:39
@ PAK_MENU_CONFIRM_DELETE
Definition pakmenu.h:42
@ PAK_MENU_READ_DIRECTORY
Definition pakmenu.h:40
@ PAK_MENU_EXIT
Definition pakmenu.h:46
@ PAK_MENU_ERROR
Definition pakmenu.h:43
@ PAK_MENU_NEW_PAK
Definition pakmenu.h:45
@ PAK_MENU_FADING_OUT
Definition pakmenu.h:47
#define DECAL_CHAR_COUNT
The number of characters in the Japanese Controller Pak note name map.
Definition pakmenu.h:102
void ProcessPakMenuScreen(void)
Run one frame of the Controller Pak menu, which draws and runs itself until it fades out to the main ...
OSPfsState g_aPakFileStates[PAK_NOTES]
The notes InitPakAndEnumerateFiles() reads.
u16 g_wPakEmptySlotMask
The notes the menu found empty, a bit for each.
u8 DecalCharToAscii(u8 c)
The ASCII of a character of the name of a note.
Sprite g_texLogo
The logo sprite shared by the Controller Pak and other menu screens.
s32 InitPakAndEnumerateFiles(void)
Mount the Pak of the first controller, read its notes, and check that each belongs to this game.
u8 g_aabSavePakIds[2][32]
The identity of the Pak each of the first two players saves to, to tell when another Pak is inserted.
OSPfs g_aPakPfs[MAXCONTROLLERS]
The file system of the Pak of each controller.
s32 gControllerPakState
The result of the last Controller Pak call.
#define PAK_NOTES
The notes a Controller Pak holds.
Definition pakmenu.h:20
Sprite g_texButtonA
The A-button prompt sprite shared by menu screens.
The sprites of the menus: pictures loaded from the cartridge and drawn in strips, and the rectangles ...
The table of the characters of the names of notes, which is copied whole to read one.
Definition pakmenu.h:109
char chars[DECAL_CHAR_COUNT]
Definition pakmenu.h:110
What osPfsFileState() reports of a file.
Definition os_cont.h:132
An open Controller Pak.
Definition os_cont.h:115
A picture of the menus.
Definition sprite.h:23
Integer and floating-point types of libultra.
unsigned short u16
Definition ultratypes.h:19
int s32
Definition ultratypes.h:25
unsigned char u8
Definition ultratypes.h:18