Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
pause_items.c
Go to the documentation of this file.
1#include "pause_common.h"
2#include "message_ids.h"
3
4void pause_items_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening);
5void pause_items_init(MenuPanel* panel);
9
10static s16 gPauseItemsItemIDs[100];
11static s32 gPauseItemsCurrentPage;
12static s32 D_802704CC;
13static PauseItemPage gPauseItemsPages[20];
14static s32 gPauseItemsSelectedIndex;
15static u32 D_802705C4;
16static s32 gPauseItemsSelectedItem;
17static s16 gPauseItemsNumItems;
18static s32 D_802705D0;
19static s32 gPauseItemsCurrentScrollPos;
20static s32 gPauseItemsTargetScrollPos;
21static s32 gPauseItemsTargetScrollIndex;
22static s32 gPauseItemsLevel;
23static s32 gPauseItemsCurrentTab;
24static s32 gPauseItemsIconIDs[20];
25
26#define ITEM_NONE_STANDIN 0x7FFE
27#define ITEM_INVALID 0x7FFF
28
37 {
39 .unk_01 = 0,
40 .pos = { .x = 3, .y = 16 },
41 .width = 289,
42 .height = 154,
43 .priority = WINDOW_PRIORITY_1,
44 .fpDrawContents = &pause_items_draw_contents,
45 .tab = NULL,
46 .parentID = WIN_PAUSE_MAIN,
47 .fpUpdate = { WINDOW_UPDATE_HIDE },
48 .extraFlags = 0,
49 .style = { .customStyle = &gPauseWS_19 }
50 }
51};
53 .initialized = FALSE,
54 .col = 0,
55 .row = 0,
56 .selected = 0,
57 .state = 0,
58 .numCols = 0,
59 .numRows = 0,
60 .numPages = 0,
61 .gridData = NULL,
62 .fpInit = &pause_items_init,
63 .fpHandleInput = &pause_items_handle_input,
64 .fpUpdate = &pause_items_update,
65 .fpCleanup = &pause_items_cleanup
66};
67
68s32 pause_items_comparator(s16* a, s16* b) {
69 if (*a > *b) {
70 return 1;
71 } else {
72 return -1;
73 }
74}
75
76s32 pause_items_get_pos_x(s32 page, s32 itemIndex) {
77 return (itemIndex % ITEM_MENU_PAGE(page)->numCols) * 98;
78}
79
80s32 pause_items_get_pos_y(s32 page, s32 itemIndex) {
81 return ((page + 1) * 11) + (ITEM_MENU_PAGE(page)->listStart * 16) + ((itemIndex / ITEM_MENU_PAGE(page)->numCols) * 16);
82}
83
84s32 pause_items_get_column(s32 page, s32 itemIdx) {
85 return itemIdx % ITEM_MENU_PAGE(page)->numCols;
86}
87
88s32 pause_items_get_row(s32 page, s32 itemIdx) {
89 return ITEM_MENU_PAGE(page)->listStart + (itemIdx / ITEM_MENU_PAGE(page)->numCols);
90}
91
93 if (y < gPauseItemsCurrentScrollPos - 32) {
94 return FALSE;
95 }
96 return y < gPauseItemsCurrentScrollPos + 128;
97}
98
100 return beforeY - gPauseItemsCurrentScrollPos;
101}
102
104 return beforeX;
105}
106
107#if VERSION_PAL
108INCLUDE_ASM(void, "pause/pause_items", pause_items_draw_contents);
109#else
110void pause_items_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) {
111 s32 i, pageIndex, itemIndex;
112 s32 totalItemIndex;
113 s32 currentItemRow;
114 s32 currentItemColumn;
115 s32 style;
116 s32 palette;
117 s32 posX, posY;
118 s32 sp6C;
119 s32 sp70;
120 s32 isNone;
121 s32* sp78;
122 PauseItemPage* page;
123 s32 x1, y1, x2, y2;
124 s16 itemID;
125 s32 isSelected, itemOffsetX, itemOffsetY;
126 s32* iconIDs;
127 s32 itemIcon;
128 s32 msg, msgX, msgY, opacity1;
129 s32 selectedPosX, selectedPosY;
130 s32 cursorOffsetX, cursorOffsetY;
131
132 style = DRAW_MSG_STYLE_MENU;
133 palette = MSG_PAL_STANDARD;
134 currentItemColumn = gPauseItemsSelectedIndex / gPauseItemsPages[gPauseItemsCurrentPage].numCols;
135 currentItemRow = gPauseItemsSelectedIndex % gPauseItemsPages[gPauseItemsCurrentPage].numCols;
136 draw_box(DRAW_FLAG_NO_CLIP, &gPauseWS_18, baseX + 68, baseY, 0, width - 68, height, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0);
137
138 x1 = baseX + 1;
139 y1 = baseY + 7;
140 x2 = baseX + width - 1;
141 y2 = baseY + height - 7;
142
143 if (x1 <= 0) {
144 x1 = 1;
145 }
146 if (y1 <= 0) {
147 y1 = 1;
148 }
149
150 if (x2 <= 0 || y2 <= 0 || x1 >= SCREEN_WIDTH - 1 || y1 >= SCREEN_HEIGHT - 1) {
151 return;
152 }
153
154 if (x2 >= SCREEN_WIDTH - 1) {
155 x2 = SCREEN_WIDTH - 1;
156 }
157 if (y2 >= SCREEN_HEIGHT - 1) {
158 y2 = SCREEN_HEIGHT - 1;
159 }
160
161 totalItemIndex = 0;
162 sp6C = baseX + 119;
163 sp70 = baseY + 17;
164
165 gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x1, y1, x2, y2);
166
167 for (i = 0; i < 3; i++) {
168 for (pageIndex = 0; pageIndex < 20; pageIndex++) {
169 iconIDs = gPauseItemsIconIDs;
170
171 page = &gPauseItemsPages[pageIndex];
172 if (!page->enabled) {
173 break;
174 }
175
176 pause_items_get_pos_y(pageIndex, 0);
177
178 for (itemIndex = 0; itemIndex < page->count; itemIndex++) {
179 itemID = gPauseItemsItemIDs[page->startIndex + itemIndex];
180 isSelected = FALSE;
181 if (itemID == ITEM_INVALID) {
182 continue;
183 }
184
185 posX = pause_items_get_pos_x(pageIndex, itemIndex);
186 posY = pause_items_get_pos_y(pageIndex, itemIndex);
187
188 isNone = itemID == ITEM_NONE_STANDIN;
189
190 if (gPauseMenuCurrentTab == 3 &&
191 gPauseItemsLevel == 1 &&
192 pause_items_get_column(pageIndex, itemIndex) == currentItemRow &&
193 pause_items_get_row(pageIndex, itemIndex) == currentItemColumn) {
194 isSelected = TRUE;
195 }
196
197 itemOffsetX = 0;
198 itemOffsetY = 0;
199 if (isSelected) {
200 itemOffsetX = -1;
201 itemOffsetY = -1;
202 }
203
204 if (i == 0) {
205 style = DRAW_MSG_STYLE_MENU;
206 palette = MSG_PAL_STANDARD;
207
208 if (isSelected) {
210 }
211 }
212
213 if (!pause_items_is_visible(posY)) {
214 continue;
215 }
216
217 if (i == 0) {
218 if (isNone) {
220 sp70 + pause_items_scroll_offset_y(posY) + itemOffsetY, 255, palette, style);
221 } else {
222 if (gItemTable[itemID].nameMsg) {
223 if (gItemTable[itemID].nameMsg > 0) {
224 draw_msg(gItemTable[itemID].nameMsg, sp6C + pause_items_scroll_offset_x(posX) + itemOffsetX,
225 sp70 + pause_items_scroll_offset_y(posY) + itemOffsetY, 255, palette, style);
226 }
227 }
228 }
229 }
230
231 if (i == 1) {
232 itemIcon = iconIDs[totalItemIndex];
235 if (isNone) {
236 itemIcon = gPauseItemsIconIDs[19];
237 } else {
238 if (isSelected) {
241 }
242
243 hud_element_set_script(itemIcon, gItemHudScripts[gItemTable[itemID].hudElemID].enabled);
244 hud_element_set_scale(itemIcon, 0.670816f);
245 }
246
247 hud_element_set_render_pos(itemIcon, baseX + 105 + pause_items_scroll_offset_x(posX) + itemOffsetX,
248 baseY + 23 + pause_items_scroll_offset_y(posY) + itemOffsetY);
249 if (totalItemIndex == 0) {
251 } else {
252 hud_element_draw_next(itemIcon);
253 }
254
255 totalItemIndex++;
256 }
257 }
258 }
259 }
260
261 x1 = baseX + 1;
262 y1 = baseY + 1;
263 x2 = baseX + width - 1;
264 y2 = baseY + height - 1;
265 gDPPipeSync(gMainGfxPos++);
266
267 if (x1 <= 0) {
268 x1 = 1;
269 }
270 if (y1 <= 0) {
271 y1 = 1;
272 }
273
274 if (x2 <= 0 || y2 <= 0 || x1 >= SCREEN_WIDTH - 1 || y1 >= SCREEN_HEIGHT - 1) {
275 return;
276 }
277
278 if (x2 >= SCREEN_WIDTH - 1) {
279 x2 = SCREEN_WIDTH - 1;
280 }
281 if (y2 >= SCREEN_HEIGHT - 1) {
282 y2 = SCREEN_HEIGHT - 1;
283 }
284
285 gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x1, y1, x2, y2);
286
287 if (gPauseMenuCurrentTab == 3 && gPauseItemsLevel == 1) {
288 if (gPauseItemsCurrentPage > 0) {
289 hud_element_set_render_pos(gPauseItemsIconIDs[16], baseX + 278, baseY + 14);
290 hud_element_draw_without_clipping(gPauseItemsIconIDs[16]);
291 }
292
293 if (gPauseItemsPages [gPauseItemsCurrentPage + 1].enabled) {
294 hud_element_set_render_pos(gPauseItemsIconIDs[17], baseX + 278, baseY + 146);
295 hud_element_draw_without_clipping(gPauseItemsIconIDs[17]);
296 }
297 }
298
299 draw_box(DRAW_FLAG_NO_CLIP, &gPauseWS_17, gPauseItemsCurrentTab == 0 ? baseX + 9 : baseX, baseY + 7, 0,
300 91, 34, 255, gPauseItemsCurrentTab == 1 ? 128 : 0, 0, 0,
301 0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0);
302
304 msgX = baseX + 12;
305 if (gPauseItemsCurrentTab == 0) {
306 msgX = baseX + 21;
307 }
308 opacity1 = 255;
309 msgY = baseY + 17;
310 if (gPauseItemsCurrentTab == 1) {
311 opacity1 = 191;
312 }
313 draw_msg(msg, msgX, msgY, opacity1, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU);
314
315 draw_box(DRAW_FLAG_NO_CLIP, &gPauseWS_17, gPauseItemsCurrentTab == 1 ? baseX + 9 : baseX, baseY + 39, 0,
316 91, 34, 255, gPauseItemsCurrentTab == 0 ? 128 : 0, 0, 0,
317 0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0);
318
320 msgX = baseX + 25;
321 if (gPauseItemsCurrentTab == 1) {
322 msgX = baseX + 34;
323 }
324 opacity1 = 255;
325 msgY = baseY + 49;
326 if (gPauseItemsCurrentTab == 0) {
327 opacity1 = 191;
328 }
329 draw_msg(msg, msgX, msgY, opacity1, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU);
330
331 if (gPauseMenuCurrentTab == 3) {
332 if (gPauseItemsLevel == 0) {
333 pause_set_cursor_pos(WIN_PAUSE_ITEMS, baseX + 12, baseY + 26 + gPauseItemsCurrentTab * 32);
334 } else {
335 selectedPosX = pause_items_get_pos_x(gPauseItemsCurrentPage, gPauseItemsSelectedIndex - gPauseItemsPages[gPauseItemsCurrentPage].listStart * gPauseItemsPages[gPauseItemsCurrentPage].numCols);
336 selectedPosY = pause_items_get_pos_y(gPauseItemsCurrentPage, gPauseItemsSelectedIndex - gPauseItemsPages[gPauseItemsCurrentPage].listStart * gPauseItemsPages[gPauseItemsCurrentPage].numCols);
337 cursorOffsetX = pause_items_scroll_offset_x(selectedPosX);
338 cursorOffsetY = pause_items_scroll_offset_y(selectedPosY);
339 if (cursorOffsetY < 0) {
340 cursorOffsetY = 0;
341 } else if (cursorOffsetY > 112) {
342 cursorOffsetY = 112;
343 }
344
345 if (gPauseItemsCurrentScrollPos != gPauseItemsTargetScrollPos) {
346 pause_set_cursor_pos_immediate(WIN_PAUSE_ITEMS, baseX + 85 + cursorOffsetX, baseY + 23 + cursorOffsetY);
347 } else {
348 pause_set_cursor_pos(WIN_PAUSE_ITEMS, baseX + 85 + cursorOffsetX, baseY + 23 + cursorOffsetY);
349 }
350 }
351 }
352}
353#endif
354
355void pause_items_load_items(s32 invItems) {
356 PlayerData* playerData = &gPlayerData;
357 s32 i;
358 s16* itemIDs;
359 s32 pageNum;
360 s16* itemMenuNumItems;
361 s32 totalItems = 0;
362 PauseItemPage* page;
363 s32 items;
364 s16* itemMenuItemIDs;
365
366 D_802705D0 = 0;
367 if (invItems == TRUE) {
368 for (i = 0; i < ARRAY_COUNT(playerData->invItems); i++) {
369 if (playerData->invItems[i] != ITEM_NONE) {
370 gPauseItemsItemIDs[totalItems] = playerData->invItems[i];
371 totalItems++;
372 }
373 }
374 } else {
375 for (i = 0; i < ARRAY_COUNT(playerData->keyItems); i++) {
376 if (playerData->keyItems[i] != ITEM_NONE) {
377 gPauseItemsItemIDs[totalItems] = playerData->keyItems[i];
378 totalItems++;
379 }
380 }
381 }
382
383 if (totalItems == 0) {
384 gPauseItemsItemIDs[0] = ITEM_NONE_STANDIN;
385 totalItems = 1;
386 } else {
387 pause_sort_item_list(gPauseItemsItemIDs, totalItems, pause_items_comparator);
388 }
389
390 gPauseItemsNumItems = totalItems;
391
392 for (i = totalItems; i < ARRAY_COUNT(gPauseItemsItemIDs); i++) {
393 gPauseItemsItemIDs[i] = ITEM_INVALID;
394 }
395
396 page = gPauseItemsPages;
397 gPauseItemsSelectedIndex = 0;
398 gPauseItemsSelectedItem = 0;
399 D_802705C4 = 0;
400 gPauseItemsTargetScrollIndex = 0;
401 gPauseItemsCurrentPage = 0;
402
403 for (i = 0; i < gPauseItemsNumItems / 8; i++, page++) {
404 page->listStart = i * 8;
405 page->numCols = 1;
406 page->numRows = 8;
407 page->enabled = TRUE;
408 page->startIndex = i * 8;
409 page->count = 8;
410 }
411
412 if ((gPauseItemsNumItems % 8) != 0) {
413 page->listStart = i * 8;
414 page->numCols = 1;
415 page->enabled = TRUE;
416 page->startIndex = i * 8;
417 page->count = gPauseItemsNumItems % 8;
418 page->numRows = page->count;
419 i++;
420 page++;
421 }
422
423 for (; i < ARRAY_COUNT(gPauseItemsPages); i++, page++) {
424 page->enabled = FALSE;
425 }
426
427 gPauseItemsTargetScrollPos = gPauseItemsCurrentScrollPos = pause_items_get_pos_y(0, 0);
428}
429
431 s32 i;
432
433 gPauseItemsLevel = 0;
434 gPauseItemsCurrentTab = 0;
436
437 for (i = 0; i < ARRAY_COUNT(gPauseItemsIconIDs); i++) {
438 gPauseItemsIconIDs[i] = hud_element_create(gPauseItemsElements[i]);
439 hud_element_set_flags(gPauseItemsIconIDs[i], HUD_ELEMENT_FLAG_80);
440 }
441
442 for (i = 0; i < ARRAY_COUNT(gPauseItemsWindowBPs); i++) {
443 gPauseItemsWindowBPs[i].tab = panel;
444 }
445
447 panel->initialized = TRUE;
448}
449
451 s32 oldTab;
452 s32 oldSelectedIndex = gPauseItemsSelectedIndex;
453 s32 row = gPauseItemsSelectedIndex / gPauseItemsPages[gPauseItemsCurrentPage].numCols;
454 s32 column = gPauseItemsSelectedIndex % gPauseItemsPages[gPauseItemsCurrentPage].numCols;
455
456 if ((gPausePressedButtons & BUTTON_A) && gPauseItemsLevel == 0) {
457 if (gPauseItemsItemIDs[gPauseItemsSelectedIndex] == ITEM_NONE_STANDIN) {
459 } else {
460 gPauseItemsLevel = 1;
462 }
463 return;
464 }
465
466 if (gPauseItemsNumItems != 0) {
467 if (gPauseItemsLevel == 0) {
468 oldTab = gPauseItemsCurrentTab;
470 gPauseItemsCurrentTab ^= 1;
471 }
472
473 if (oldTab != gPauseItemsCurrentTab) {
475 pause_items_load_items(gPauseItemsCurrentTab);
476 }
477 } else {
479 row--;
481 if (row < 0) {
482 row = 0;
483 }
484
485 if (row < gPauseItemsPages[gPauseItemsCurrentPage].listStart) {
486 gPauseItemsCurrentPage--;
487 }
488 } else {
489 gPauseItemsCurrentPage--;
490 if (gPauseItemsCurrentPage < 0) {
491 gPauseItemsCurrentPage = 0;
492 }
493 row = gPauseItemsPages[gPauseItemsCurrentPage].listStart;
494 }
495 }
496
499 row++;
500 if (row >= gPauseItemsPages[gPauseItemsCurrentPage].listStart + gPauseItemsPages[gPauseItemsCurrentPage].numRows) {
501 gPauseItemsCurrentPage++;
502
503 if (!gPauseItemsPages[gPauseItemsCurrentPage].enabled) {
504 gPauseItemsCurrentPage--;
505 row--;
506 }
507 }
508 } else {
509 gPauseItemsCurrentPage++;
510
511 if (!gPauseItemsPages[gPauseItemsCurrentPage].enabled) {
512 gPauseItemsCurrentPage--;
513 } else {
514 row = gPauseItemsPages[gPauseItemsCurrentPage].listStart;
515 }
516 }
517 }
518
519 if (gPauseItemsItemIDs[row * gPauseItemsPages[gPauseItemsCurrentPage].numCols] != ITEM_NONE_STANDIN) {
521 column--;
522
523 if (column < 0) {
524 column = gPauseItemsPages[gPauseItemsCurrentPage].numCols - 1;
525 }
527 column++;
528 if (column >= gPauseItemsPages[gPauseItemsCurrentPage].numCols) {
529 column = 0;
530 }
531 }
532 } else {
533 column = 0;
534 }
535
536 gPauseItemsSelectedIndex = column + row * gPauseItemsPages[gPauseItemsCurrentPage].numCols;
537 if (gPauseItemsSelectedIndex != oldSelectedIndex) {
539 }
540
541 gPauseItemsSelectedItem = gPauseItemsItemIDs[gPauseItemsSelectedIndex];
542 }
543 }
544
545 if (gPauseItemsLevel == 1) {
546 if (gPauseItemsSelectedItem != ITEM_NONE_STANDIN && gPauseItemsSelectedItem != ITEM_INVALID && gPauseItemsSelectedItem != 0) {
547 gPauseCurrentDescMsg = gItemTable[gPauseItemsSelectedItem].fullDescMsg;
548 } else {
549 gPauseCurrentDescMsg = MSG_NONE;
551 }
552 } else {
553 if (gPauseItemsCurrentTab == 1) {
555 } else {
557 }
558
560 }
561
563 if (gPauseItemsLevel == 0) {
566 } else {
568 gPauseItemsLevel = 0;
569 }
570 }
571}
572
574 PauseItemPage* page = &gPauseItemsPages[gPauseItemsCurrentPage];
575 s32 selectedIndex = (gPauseItemsSelectedIndex / page->numCols) - page->listStart;
576
577 if (selectedIndex < 2 || page->numRows < 9) {
578 gPauseItemsTargetScrollIndex = 0;
579 } else if (selectedIndex >= page->numRows - 2) {
580 gPauseItemsTargetScrollIndex = page->numRows - 8;
581 } else if (selectedIndex - gPauseItemsTargetScrollIndex > 6) {
582 gPauseItemsTargetScrollIndex = selectedIndex - 6;
583 } else if (selectedIndex - gPauseItemsTargetScrollIndex < 1) {
584 gPauseItemsTargetScrollIndex = selectedIndex - 1;
585 }
586
587 gPauseItemsTargetScrollPos = pause_items_get_pos_y(gPauseItemsCurrentPage, gPauseItemsTargetScrollIndex * page->numCols);
588 gPauseItemsCurrentScrollPos += pause_interp_vertical_scroll(gPauseItemsTargetScrollPos - gPauseItemsCurrentScrollPos);
589}
590
592 s32 i;
593
594 for (i = 0; i < ARRAY_COUNT(gPauseItemsIconIDs); i++) {
595 hud_element_free(gPauseItemsIconIDs[i]);
596 }
597}
IconHudScriptPair gItemHudScripts[]
s16 keyItems[32]
s16 invItems[10]
#define draw_msg
#define draw_box
@ DRAW_MSG_STYLE_DROP_SHADOW
Definition enums.h:5388
@ DRAW_MSG_STYLE_MENU
Definition enums.h:5385
@ BUTTON_A
Definition enums.h:2790
@ BUTTON_R
Definition enums.h:2781
@ BUTTON_STICK_UP
Definition enums.h:2791
@ BUTTON_STICK_DOWN
Definition enums.h:2792
@ BUTTON_STICK_LEFT
Definition enums.h:2793
@ BUTTON_STICK_RIGHT
Definition enums.h:2794
@ BUTTON_B
Definition enums.h:2789
@ BUTTON_Z
Definition enums.h:2788
@ WINDOW_PRIORITY_1
Definition enums.h:3183
@ DRAW_FLAG_NO_CLIP
Definition enums.h:5005
@ MSG_PAL_WHITE
Definition enums.h:5405
@ MSG_PAL_STANDARD
Definition enums.h:5415
@ WINDOW_UPDATE_HIDE
Definition enums.h:5312
@ SOUND_MENU_BACK
Definition enums.h:701
@ SOUND_MENU_CHANGE_TAB
Definition enums.h:699
@ SOUND_MENU_CHANGE_SELECTION
Definition enums.h:698
@ SOUND_MENU_NEXT
Definition enums.h:700
@ SOUND_MENU_ERROR
Definition enums.h:933
@ WIN_PAUSE_ITEMS
Definition enums.h:5276
@ WIN_PAUSE_MAIN
Definition enums.h:5263
void setup_pause_menu_tab(MenuWindowBP *bpArray, s32 arraySize)
Definition windows.c:461
HudScript HES_StatusStar1
void hud_element_set_scale(s32 index, f32 scale)
void hud_element_draw_without_clipping(s32 id)
void hud_element_set_script(s32 id, HudScript *anim)
void hud_element_draw_next(s32 id)
void hud_element_set_render_pos(s32 id, s32 x, s32 y)
s32 hud_element_create(HudScript *anim)
Creates a new HUD element and returns its ID.
void hud_element_set_flags(s32 id, s32 flags)
Turns on the given flags.
void hud_element_clear_flags(s32 id, s32 flags)
Turns off the given flags.
void hud_element_free(s32 id)
@ HUD_ELEMENT_FLAG_80
Definition hud_element.h:80
@ HUD_ELEMENT_FLAG_DROP_SHADOW
@ HUD_ELEMENT_FLAG_FILTER_TEX
Definition hud_element.h:88
s32 HudScript[]
Definition hud_element.h:9
HudScript * enabled
#define INCLUDE_ASM(TYPE, FOLDER, NAME, ARGS...)
Definition include_asm.h:21
HudScript HES_Dash
HudScript HES_ListPrevPage
HudScript HES_ListNextPage
HudScript HES_StatBp
s32 gPausePressedButtons
Definition pause_main.c:24
HudScript * gPauseCurrentDescIconScript
Definition pause_main.c:26
s32 pause_interp_vertical_scroll(s32 deltaBefore)
Definition pause_main.c:451
WindowStyleCustom gPauseWS_19
WindowStyleCustom gPauseWS_18
void pause_set_cursor_pos_immediate(s32 windowID, s32 posX, s32 posY)
Definition pause_main.c:196
s32 pause_get_menu_msg(s32 index)
Definition pause_gfx.c:583
@ PAUSE_MSG_KEY_ITEMS
@ PAUSE_MSG_DESC_KEY_ITEMS
@ PAUSE_MSG_CONSUMABLES
@ PAUSE_MSG_DESC_CONSUMABLES
@ PAUSE_MSG_BAGDE_DESC_NONE
s32 gPauseHeldButtons
Definition pause_main.c:23
WindowStyleCustom gPauseWS_17
s8 gPauseMenuCurrentTab
Definition pause_main.c:28
void pause_set_cursor_pos(s32 windowID, s32 posX, s32 posY)
Definition pause_main.c:228
void pause_sort_item_list(s16 *arr, s32 len, s32(*compare)(s16 *, s16 *))
Definition pause_main.c:851
s32 gPauseCurrentDescMsg
Definition pause_main.c:25
void pause_items_draw_contents(MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
s32 pause_items_get_column(s32 page, s32 itemIdx)
Definition pause_items.c:84
s32 pause_items_comparator(s16 *a, s16 *b)
Definition pause_items.c:68
s32 pause_items_scroll_offset_x(s32 beforeX)
void pause_items_handle_input(MenuPanel *panel)
s32 pause_items_get_pos_x(s32 page, s32 itemIndex)
Definition pause_items.c:76
s32 pause_items_scroll_offset_y(s32 beforeY)
Definition pause_items.c:99
HudScript * gPauseItemsElements[]
Definition pause_items.c:29
void pause_items_load_items(s32 invItems)
void pause_items_init(MenuPanel *panel)
#define ITEM_NONE_STANDIN
Definition pause_items.c:26
s32 pause_items_get_row(s32 page, s32 itemIdx)
Definition pause_items.c:88
MenuPanel gPausePanelItems
Definition pause_items.c:52
MenuWindowBP gPauseItemsWindowBPs[]
Definition pause_items.c:36
s32 pause_items_get_pos_y(s32 page, s32 itemIndex)
Definition pause_items.c:80
#define ITEM_INVALID
Definition pause_items.c:27
s32 pause_items_is_visible(s32 y)
Definition pause_items.c:92
void pause_items_cleanup(MenuPanel *panel)
void pause_items_update(MenuPanel *panel)
void sfx_play_sound(s32 soundID)
Definition sfx.c:517
#define SCREEN_WIDTH
Definition macros.h:105
#define ARRAY_COUNT(arr)
Definition macros.h:40
#define SCREEN_HEIGHT
Definition macros.h:106
#define ITEM_MENU_PAGE(index)
Definition macros.h:74
MenuPanel * tab
ItemData gItemTable[]
Gfx * gMainGfxPos
Definition cam_main.c:15
PlayerData gPlayerData
Definition 77480.c:40