7#if LANGUAGE == LANGUAGE_GERMAN
8#define TRANSFER_MODE_DRAW_HELP UiText_DrawCharacterAtOffset
9#define TRANSFER_PASSWORD_HELP_X 32
10#define TRANSFER_PASSWORD_HELP_FIRST_Y 8
11#define TRANSFER_PASSWORD_HELP_LAST_Y 24
12#define TRANSFER_CABLE_HELP_FIRST_Y 0
13#define TRANSFER_CABLE_HELP_LAST_Y 32
15#define TRANSFER_MODE_DRAW_HELP UiText_DrawResource
16#define TRANSFER_PASSWORD_HELP_X PASSWORD_HELP_X
17#define TRANSFER_PASSWORD_HELP_FIRST_Y 4
18#define TRANSFER_PASSWORD_HELP_LAST_Y 16
19#define TRANSFER_CABLE_HELP_FIRST_Y 4
20#define TRANSFER_CABLE_HELP_LAST_Y 28
62 pulseScale = (pulseScale - 256) / 4 + 304;
63 transform.
scaleX = pulseScale;
64 transform.
scaleY = pulseScale;
68 for (index = 0; index < menu->
count; index++, entry++) {
70 u32 *nativeAttributes;
79 s32 left = x + pulseScale * 7 / 512 - 20;
82 spriteY = entry->
y + pulseScale * 3 / 256 - 20;
84 spriteY = (pulseScale * 15 / 256 - 30) & 255;
87 entry->
attr01 = (affineIndex << 25) | spriteY | (left << 16) | 0x80002300;
90 nativeAttributes = &entry->
link;
91 *nativeAttributes++ = 0;
93 (affineIndex << 25) | spriteY | (left << 16) | 0x80002300;
102 nativeAttributes = &entry->
link;
106 spriteY = ((
s16 *)nativeAttributes)[7];
107 *nativeAttributes++ = 0;
112 packedAttributes = spriteY | (x << 16) | 0x80002000;
115 entry->
attr01 = packedAttributes;
116 entry->
attr2 = vramOffset >> 5;
118 *nativeAttributes++ = packedAttributes;
119 *nativeAttributes = vramOffset >> 5;
126 if (menu->
row == 0) {
132 if (transition == 0 || menu->
count == 0)
136 halfWidth = (pulseScale * 12 - 2817) / 256;
138 ((packedSpan - halfWidth) << 8) + (packedSpan + halfWidth) + 23;
140 lastLine += (pulseScale * 32 - 7937) / 512 + 1;
145 if (index < lastLine) {
150 *spanCursor = (*spanCursor & 0xff) | packedSpan;
156 }
while (index < lastLine);
160 packedSpan -= (pulseScale * 12 - 2817) / 256;
165 for (index = 0; index <= 23; index++) {
169 *spanCursor = (*spanCursor & 0xff) | packedSpan;
182 if (transition == 0 || menu->
count == 0)
186 halfWidth = (pulseScale * 12 - 2817) / 256;
188 ((packedSpan - halfWidth) << 8) + (packedSpan + halfWidth) + 23;
190 firstLine -= (pulseScale * 32 - 7937) / 512 + 1;
192 spanCursor = &page->
lines[firstLine].
span;
200 *spanCursor = (*spanCursor & 0xff) | packedSpan;
206 }
while (index <= 135);
210 packedSpan -= (pulseScale * 12 - 2817) / 256;
215 for (index = 136; index <= 159; index++) {
219 *spanCursor = (*spanCursor & 0xff) | packedSpan;
247 labelWindow = work->
window;
248 if (labelWindow != 0) {
251 for (i = 0; i < work->
count; i++) {
320 const u8 *stepDelays;
347 if (position == goal)
389 entry->
x = index * 24 + 32;
409 x = 15 - (
count * 3 + menu->
width * 2 / 3) / 2;
410 for (i = 0; i < menu->
count; i++) {
428 work->
width = width + 2;
431 for (i = 0; i < work->
count; i++) {
453 s8 *commandPositions;
459 groupTriple = group * 3;
461 offset = groupTriple << 1;
488#define ANIMATE_ENTRIES_ROW 7
490#define ANIMATE_ENTRIES_ROW 5
523 if (fileState == 0) {
526 if (fileState == 3) {
528 }
else if (fileState == 0x67) {
530 }
else if (fileState > 0x64) {
536 if ((group == 0) || (group == 3)) {
542 if ((group == 0) || (group == 3)) {
562#define MODE_LABEL_X 18
563#define MODE_LABEL_RIGHT 144
565#define MODE_LABEL_X 8
566#define MODE_LABEL_RIGHT 80
580 s32 text = MsgPasswordLevel;
594 s32 text = MsgPasswordLevel;
605 s32 text = MsgPasswordLevel;
617#define PASSWORD_HELP_X 16
619#define PASSWORD_HELP_X 0
622#if (LANGUAGE == LANGUAGE_FRENCH)
650 if (*shown != *current) {
691#if (LANGUAGE == LANGUAGE_SPANISH)
695#if (LANGUAGE == LANGUAGE_ENGLISH) || (LANGUAGE == LANGUAGE_GERMAN) || \
696 (LANGUAGE == LANGUAGE_ITALIAN)
698#elif (LANGUAGE == LANGUAGE_SPANISH)
699#elif (LANGUAGE == LANGUAGE_FRENCH)
709 message = MsgPasswordSelection;
803 if (labelWidth == 0) {
816 if (selection == -1) {
824 s32 message = MsgCommandYes;
832 if (selection == -1) {
841#elif (LANGUAGE == LANGUAGE_FRENCH || LANGUAGE == LANGUAGE_ITALIAN)
What every part of the menu object shares: its includes, edition values, macros and the link round st...
#define ENTRY11_COMMAND_LABEL_WIDTH
#define RESOURCE_MODE0_WINDOW_X
#define RESOURCE_MODE1_WINDOW_X
#define TRANSFER_METHOD_LABEL_X
#define RESOURCE_MODE1_WINDOW_WIDTH
#define TRANSFER_HELP_WINDOW_WIDTH
#define TRANSFER_HELP_WINDOW_X
#define ENTRY19_COMMAND_LABEL_WIDTH
#define TRANSFER_METHOD_WINDOW_X
#define TRANSFER_METHOD_WINDOW_WIDTH
#define RESOURCE_MODE0_WINDOW_WIDTH
#define Dma_Fill32(value, destination, size)
Fills size bytes at destination with the word value by DMA3.
s32 Party_SumDjinnCountsFar(s32 index)
void AudioCommand_PlayFar(s32 id)
void WaitFrames(s32 frames)
The game's frame loop: runs frames frames and returns.
volatile u32 gFrameCount
Frames WaitFrames has finished.
struct DisplayTransitionState * gDisplayTransition
Slot 31.
void * MemAlloc(s32 size)
Allocates size bytes (rounded up to words) with no slot, from IWRAM when they fit and EWRAM otherwise...
void * Runtime_AllocateBlock(s32 kind, s32 size)
As Runtime_AllocateHeapBlock, but tries EWRAM first, for blocks that need room more than speed: the b...
volatile u32 gKeysPressed
Keys that went down this frame.
volatile u32 gKeysRepeat
Pressed keys, repeating while held: after 19 frames, then every 6.
void Runtime_ReleaseHeapBlock(s32 slot)
void MemFree(void *buffer)
s32 AffineMatrix_BuildForEffect(struct AffineTransform *source)
Hands out the next OAM affine matrix for a sprite drawn with source's scale and rotation and fills it...
void Runtime_PushSlotEntry(void *slotEntry, s32 slot)
Links a sprite entry into depth slot slot (clamped to 0..255) for this frame.
char ResourceId_CommandIcons
s32 Resource_DecodeByteLz(const void *source, void *destination)
Decodes a byte-oriented LZ resource and returns its unpacked byte count.
s16 gTitleSendOptionEnabled
const u16 gUi_BounceScales[32]
A sprite's pulse, as a scale where 256 is its normal size: it swells to 1.5 times and back over 32 st...
s32 Scheduler_AddOrUpdateCallback(SchedulerCallback callback, s32 order)
Schedules callback with order, or gives a task already running it the new order, and re-sorts the tab...
s32 Scheduler_RemoveCallback(SchedulerCallback callback)
Unschedules the task running callback: clears its routine and gives it order 0x7fff,...
void UiWork_CloseAndRelease(void)
Closes the window kept in heap block 16 and frees the block.
void UiWindow_OpenMode1AndWaitFrame(void)
Opens the field menu's window and waits a frame.
#define SE_MENU_CURSOR_MOVE
The display transition state (heap block 31): two pages of window edges for every line,...
u8 page
the pages entry shown; the next is built in the other
u16 pages[2][322]
Window edges, two pages: WININ and WINOUT, then a WIN0H and WIN1H pair, each (left << 8 | right),...
A window: a framed rectangle of the tilemap with its sprite outputs, its opening or closing animation...
u16 offset
bytes from the start of OBJ VRAM
A page of the display transition's window edges: WININ and WINOUT, then each of the 160 lines' edges.
struct WindowLine lines[160]
One line's horizontal window edges: window 0's and window 1's, each (left << 8 | right).
void * Resource_GetTableEntry(s32 index)
Returns the ROM address of resource index from the resource directory.
#define SELECT_MENU_WIDTH
void UiText_DrawResource(s32 message, struct UiWindow *window, s32 x, s32 y)
Decodes a message and draws it into a text canvas window at pixel (x, y).
void UiText_DrawCharacterAtOffset(s32 message, const struct UiWindow *window, u32 offsetX, u32 offsetY)
Decodes a message and draws it as tiles in a window at pixel (offsetX, offsetY) of its interior.
s32 Resource_ResetEntry(u32 no)
Frees cache entry no: its blocks go back and the entry is marked free (offset 0xffff).
s32 Resource_FindFreeEntry(void)
Returns the number of the first free cache entry, or VRAM_CACHE_ENTRY_COUNT when all are taken.
s32 VramCache_Load(u32 no, u32 size, const void *src)
Gives cache entry no size bytes of sprite VRAM and copies src there.
struct VramBlockCacheEntry gVramBlockCache[]
s32 SaveState_ScanRecordFlags(void)
Loads the save file summaries for the title menu and returns how many files there are: plus 100 when ...
void RenderOutput_PrepareForRedraw(struct UiWindow *window)
Clears a window's contents: redraws its empty frame and releases the render outputs it carries.
void UiWork_Finalize(struct UiWindow *window, s32 instant)
Closes a window: clears its contents and remembers its last rectangle.
void RenderOutput_ClearList(void *outputs)
Releases every render output in a list and empties it.
void UiWindow_ClearInteriorTiles(const struct UiWindow *window, u32 left, u32 top, u32 right, u32 bottom)
Clears an area of a window's interior to the window fill.
struct UiWindow * UiWindow_Create(s32 x, s32 y, s32 width, s32 height, s32 attrs)
Opens a window at tile (x, y) of width by height tiles in the first free window slot,...