Alchemy
Loading...
Searching...
No Matches

resource_menu.h

Go to the documentation of this file.
1#ifndef ALCHEMY_RESOURCE_MENU_H
2#define ALCHEMY_RESOURCE_MENU_H
3
4/// @file
5/// The resource menu's entries and work.
6
7#include "types.h"
8#include "static_assert.h"
9#include "window.h"
10
11/// A command icon of the resource menu: its OAM attributes, its place and its
12/// VRAM cache slot.
17 s16 x; ///< screen pixels
18 s16 y; ///< screen pixels
21};
22
23/// The resource menu: up to six command icons in a row, the windows of their
24/// labels, the icons' resource ids, the selection and the layout.
33 s16 width; ///< tiles
35 s16 row; ///< tiles
37};
38
39STATIC_ASSERT(sizeof(struct ResourceMenuEntry) == 0x14);
41STATIC_ASSERT(sizeof(struct ResourceMenuWork) == 0x98);
42STATIC_ASSERT(offsetof(struct ResourceMenuWork, window) == 0x78);
43STATIC_ASSERT(offsetof(struct ResourceMenuWork, selection) == 0x8c);
44STATIC_ASSERT(offsetof(struct ResourceMenuWork, resourceBase) == 0x92);
45STATIC_ASSERT(offsetof(struct ResourceMenuWork, previousMode) == 0x96);
46
48
49#endif
struct ResourceMenuWork * gMenuSelectWork
STATIC_ASSERT, a compile-time check that emits nothing.
#define STATIC_ASSERT(condition)
C89 permits repeated extern declarations of the same array.
#define offsetof(type, member)
Definition stddef.h:19
A command icon of the resource menu: its OAM attributes, its place and its VRAM cache slot.
s16 y
screen pixels
s16 x
screen pixels
The resource menu: up to six command icons in a row, the windows of their labels, the icons' resource...
struct ResourceMenuEntry entries[6]
struct UiWindow * lowerWindow
struct UiWindow * upperWindow
struct UiWindow * window
A window: a framed rectangle of the tilemap with its sprite outputs, its opening or closing animation...
Definition uiwindow.h:11
The integer types, TRUE, UNUSED and the fixed-address macros.
unsigned int u32
Definition types.h:15
signed short s16
Definition types.h:12
unsigned short u16
Definition types.h:13
unsigned char u8
Definition types.h:11
The window renderer's work.