Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
8a860_len_3f30.c
Go to the documentation of this file.
1#include "common.h"
2#include "hud_element.h"
3#include "message_ids.h"
4
5#define LINE_HEIGHT 13
6
16
19
20#if VERSION_JP
21#define WINDOW_KEY_WIDTH 242
22#define ALREADY_PARTNER_HEIGHT 32
23#define EMPTY_BAR_X 67
24#define DIARY_PAGE_X 0
25#define PARTNER_LIST_X1 50
26#define PARTNER_LIST_X2 66
27#define BADGE_PRICE_X 108
28#define ITEM_PRICE_X 106
29#define MENU_OFFSET_Y1 9
30#define MENU_OFFSET_Y2 7
31#define POPUP_PARTNER_WIDTH 80
32#else
33#define WINDOW_KEY_WIDTH 280
34#define ALREADY_PARTNER_HEIGHT 40
35#define EMPTY_BAR_X 73
36#define DIARY_PAGE_X 8
37#define PARTNER_LIST_X1 85
38#define PARTNER_LIST_X2 91
39#define BADGE_PRICE_X 115
40#define ITEM_PRICE_X 121
41#define MENU_OFFSET_Y1 8
42#define MENU_OFFSET_Y2 6
43#define POPUP_PARTNER_WIDTH 100
44#endif
45
46#if !VERSION_JP
63
80#endif
81
122
124
140
141void popup_draw_menu_content(s32* userData, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening);
142void popup_draw_title_content(s32* userData, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening);
143void popup_draw_desc_content(s32* userData, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening);
144void popup_draw_prompt_content(s32* userData, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening);
145void popup_draw_dip_query_content(s32* userData, s32 x, s32 y);
146void popup_draw_cost_icon(s32* userData, s32 x, s32 y);
147void popup_draw_already_have_partner(s32* userData, s32 x, s32 y);
148void popup_draw_star_pieces_content(s32* userData, s32 x, s32 y);
149
150void hide_popup_menu(void) {
151 if (PopupNotBattle) {
152 switch (gPopupMenu->popupType) {
166 break;
171 break;
172 }
174 } else {
175 switch (gPopupMenu->popupType) {
189 break;
194 break;
195 }
196 }
197
201 }
204 }
208 }
211}
212
253
254void show_popup_menu(void) {
255 if (PopupNotBattle) {
256 switch (gPopupMenu->popupType) {
269 break;
275 break;
281 break;
282 }
284 } else {
285 switch (gPopupMenu->popupType) {
297 break;
302 break;
307 break;
308 }
309 }
310
314 }
317 }
320 }
326
330 }
334 }
337 }
340 }
344}
345
346#if VERSION_PAL
347s32 popup_menu_update(void);
348INCLUDE_ASM(s32, "8a860_len_3f30", popup_menu_update);
349#else
351 s32 posX;
352 s32 posY;
353 s32 width;
354 HudElemID hid;
355 s32 cond;
356 s32 buttons;
357 s32 msgID;
358 s32 i;
359
360
361 switch (gPopupState) {
362 case POPUP_STATE_INIT:
363#if VERSION_JP
364 PopupWinX = 32;
365 PopupWinY = 72;
366 PopupDescX = 32;
368#else
369 PopupWinX = 20;
370 PopupWinY = 72;
371 PopupDescX = 20;
372#endif
373 PopupDescY = 186;
374 PopupPromptX = 16;
375 PopupPromptY = 88;
376#if !VERSION_JP
378#endif
380 if (PopupNotBattle) {
381#if VERSION_JP
382
383 switch (gPopupMenu->popupType) {
391 PopupWinX += 144;
392 break;
394 PopupWinX += 122;
395 break;
397 PopupWinX += 134;
398 break;
400 PopupWinX += 122;
401 break;
406 PopupWinX += 160;
407 break;
408 }
409#else
411#endif
412 }
414#if VERSION_JP
415 PopupWinY -= 10;
416#else
417 PopupWinY = 62;
418#endif
419 }
420 D_8010D68C = 0;
424 hud_element_set_tint(hid, 255, 255, 255);
427 }
428
431 hud_element_set_scale(hid, 0.45f);
433
437
441
445
450 hud_element_set_tint(hid, 255, 255, 255);
451 }
456 hud_element_set_tint(hid, 255, 255, 255);
457 }
462 hud_element_set_tint(hid, 255, 255, 255);
463 }
466 hid = PopupMenu_TimesHID;
468 hud_element_set_tint(hid, 255, 255, 255);
469 }
474 hud_element_set_tint(hid, 255, 255, 255);
475 }
476
477 D_8010D65A = -200;
479 if (!PopupNotBattle) {
480 PopupDelayTime = 1;
481 }
483
484 posX = PopupWinX;
485 posY = PopupWinY;
486
487#if VERSION_PAL
488 gPopupMenu->unk_338 = 0;
489 gPopupMenu->unk_340 = 0;
490
491 switch (gPopupMenu->popupType) {
493 gPopupMenu->unk_33C = MSG_Menus_0061;
494 switch (gPopupMenu->dipMode) {
495 case 0:
496 gPopupMenu->unk_330 = MSG_Menus_Items;
497 break;
498 case 1:
499 gPopupMenu->unk_330 = MSG_Menus_DoubleDip;
500 break;
501 case 2:
502 gPopupMenu->unk_330 = MSG_Menus_TripleDip;
503 break;
504 }
506 gPopupMenu->unk_330 = MSG_Menus_Items;
507 gPopupMenu->unk_33C = MSG_Menus_0064;
509 gPopupMenu->unk_330 = MSG_Menus_Items;
510 gPopupMenu->unk_33C = MSG_Menus_0066;
512 gPopupMenu->unk_330 = MSG_Menus_Items;
513 gPopupMenu->unk_33C = MSG_Menus_0067;
515 var_s6 = 145;
516 var_s5 = 145;
517 gPopupMenu->unk_33C = MSG_Menus_0062;
518 gPopupMenu->unk_330 = MSG_Menus_Items;
519 break;
521 var_s6 = 139;
522 var_s5 = 139;
523 gPopupMenu->unk_330 = MSG_Menus_PartyMember;
524 gPopupMenu->unk_338 = 1;
525 gPopupMenu->unk_33C = MSG_Menus_0063;
526 break;
528 var_s6 = 162;
529 var_s5 = 140;
530 gPopupMenu->unk_340 = -16;
531 gPopupMenu->unk_330 = MSG_MenuTip_0032;
532 gPopupMenu->unk_33C = MSG_Menus_0070;
533 break;
535 var_s6 = 146;
536 var_s5 = 140;
537 gPopupMenu->unk_340 = -8;
538 gPopupMenu->unk_330 = MSG_Menus_PartyMember;
539 gPopupMenu->unk_338 = 1;
540 gPopupMenu->unk_33C = MSG_Menus_006A;
541 break;
543 var_s6 = 167;
544 var_s5 = 145;
545 gPopupMenu->unk_340 = -24;
546 gPopupMenu->unk_330 = MSG_Menus_Items;
547 gPopupMenu->unk_33C = MSG_Menus_0065;
548 break;
550 var_s6 = 170;
551 var_s5 = 170;
552 gPopupMenu->unk_340 = -32;
553 gPopupMenu->unk_330 = MSG_MenuTip_0033;
554 gPopupMenu->unk_33C = MSG_Menus_006D;
555 break;
557 var_s6 = 145;
558 var_s5 = 145;
559 gPopupMenu->unk_330 = MSG_Menus_00D7;
560 gPopupMenu->unk_33C = MSG_Menus_00D6;
561 break;
563 var_s6 = 140;
564 var_s5 = 140;
565 gPopupMenu->unk_340 = -16;
566 gPopupMenu->unk_330 = MSG_Menus_00CE;
567 gPopupMenu->unk_33C = MSG_Menus_006C;
568 break;
570 var_s6 = 149;
571 var_s5 = 149;
572 gPopupMenu->unk_340 = -16;
573 gPopupMenu->unk_330 = MSG_Menus_00D0;
574 gPopupMenu->unk_33C = MSG_Menus_006D;
575 break;
577 var_s6 = 131;
578 var_s5 = 131;
579 gPopupMenu->unk_330 = MSG_Menus_PartyMember;
580 gPopupMenu->unk_338 = 1;
581 gPopupMenu->unk_33C = MSG_Menus_006F;
582 break;
583 }
584 msgWidth = get_msg_width(gPopupMenu->unk_330, 0);
585 width2 = msgWidth + (((var_s5 - msgWidth) * 2) / 5);
586 posX2 = (var_s5 - width2) / 2;
587 gPopupMenu->unk_334 = (width2 - msgWidth) / 2;
589 width2 = 125;
590 posX2 = (var_s5 - width2) / 2;
591 gPopupMenu->unk_334 = (80 - msgWidth) / 2;
592 }
595 if (gPopupMenu->unk_338 == 0) {
600 } else {
605 }
606#elif VERSION_JP
607 switch (gPopupMenu->popupType) {
618 break;
624 break;
630 break;
636 break;
642 break;
648 break;
654 break;
660 break;
666 break;
667 }
668#else
669 switch (gPopupMenu->popupType) {
676 if (gPopupMenu->dipMode == 0) {
678 } else {
680 }
683 break;
689 break;
695 break;
701 break;
707 break;
713 break;
719 break;
725 break;
731 break;
737 break;
738 }
739#endif
740
741#if VERSION_JP
742 switch (gPopupMenu->popupType) {
745 break;
748 break;
751 break;
752 }
753#else
754 switch (gPopupMenu->popupType) {
757 break;
760 break;
761 }
762#endif
763
768 }
769
770 do {
771 cond = false;
778 }
779 } else {
780 cond = true;
781 }
782 }
783 } while (cond);
784
789 {
790 posX = PopupDescX;
791 posY = PopupDescY;
793 }
794
795 posX = PopupPromptX;
796 posY = PopupPromptY;
797
798#if VERSION_PAL
799 height = 32;
800 if (get_msg_lines(gPopupMenu->unk_33C) == 2) {
801 height = 40;
802 }
803 set_window_properties(WIN_POPUP_PROMPT, posX, posY, gPopupMenu->unk_340 + 144, height, WINDOW_PRIORITY_20, popup_draw_prompt_content, nullptr, -1);
804#else
805 switch (gPopupMenu->popupType) {
806#if VERSION_JP
818 switch (gPopupMenu->dipMode) {
819 case 0:
821 break;
822 case 1:
824 break;
825 case 2:
827 break;
828 }
829 break;
832 break;
835 break;
838 break;
839#else
846 break;
851 break;
856 break;
859 break;
862 break;
865 break;
866#endif
867 }
868#endif
869
870 if (!PopupNotBattle) {
871 switch (gPopupMenu->popupType) {
883 break;
888 break;
893 break;
894 }
895 } else {
896 switch (gPopupMenu->popupType) {
909 break;
915 break;
921 break;
922 }
924 }
925
929 }
932 }
935 }
937 break;
939 if (PopupDelayTime != 0) {
941 } else {
943
944 // change selection on up input
947 {
949 }
950
951 // change selection on down input
954 {
956 }
957
958 // wrap selected index
959 if (PopupMenu_SelectedIndex < 0) {
961 }
964 }
965
968 }
969
970 // ensure one option is displayed above the selected index, if applicable
971 // shift up to 4 entries at a time on list wrap
972 for (i = 0; i < 4; i++) {
977 }
978 }
979 }
980
981 // ensure one option is displayed after the selected index, if applicable
982 // shift up to 4 entries at a time on list wrap
983 for (i = 0; i < 4; i++) {
990 }
991 }
992 }
994 }
995
996 // make selection on A button input
998 switch (gPopupMenu->popupType) {
1001 if (!PopupNotBattle) {
1003 } else {
1005 }
1006 break;
1009 if (!PopupNotBattle) {
1011 } else {
1013 }
1014 break;
1015 default:
1018 if (!PopupNotBattle) {
1020 } else {
1022 }
1023 break;
1024 }
1028 break;
1029 }
1032 }
1033 break;
1034 }
1035 } else {
1036 switch (gPopupMenu->popupType) {
1043 case POPUP_MENU_USEKEY:
1044 if (PopupNotBattle) {
1046 } else {
1047 buttons = BUTTON_B;
1048 }
1049 break;
1052 if (PopupNotBattle) {
1054 } else {
1055 buttons = BUTTON_B;
1056 }
1057 break;
1063 buttons = BUTTON_B;
1064 break;
1065 default:
1066 buttons = 0;
1067 break;
1068 }
1069
1072 if (PopupNotDipping) {
1073 if (!PopupNotBattle) {
1075 } else {
1077 }
1078 } else {
1079 if (PopupDipMode == 0) {
1081 } else {
1083 }
1084 }
1085 break;
1086 }
1087
1088 switch (gPopupMenu->popupType) {
1089 default:
1090 buttons = 0;
1091 break;
1094 break;
1097 break;
1098 }
1099
1103 break;
1104 }
1105 }
1106 }
1107 break;
1118 }
1122 }
1125 }
1128 }
1130
1132 return PopupMenu_SelectedIndex + 1;
1135 return PopupMenu_SelectedIndex + 1;
1137 switch (gPopupMenu->popupType) {
1146 case POPUP_MENU_USEKEY:
1149 break;
1154 break;
1159 break;
1160 }
1165 return 255;
1170 return 255;
1173 return 255;
1177 return 255;
1178 case POPUP_STATE_10:
1180 if (PopupDelayTime == 0) {
1183 return PopupMenu_SelectedIndex + 1;
1184 }
1185 break;
1186 case POPUP_STATE_20:
1191 return PopupMenu_SelectedIndex + 1;
1192 }
1193 break;
1197 return 0;
1201 if (PopupNotBattle) {
1203 }
1204#if VERSION_PAL
1205 width = get_msg_width(MSG_Menus_006B, 0) + 32;
1206 if (get_msg_lines(MSG_Menus_006B) == 1) {
1207 posY = 76;
1208 } else {
1209 posY = 72;
1210 }
1211 set_window_properties(WIN_BTL_POPUP, 160 - (width / 2), posY, width, 40, WINDOW_PRIORITY_20, popup_draw_already_have_partner, nullptr, -1);
1212#else
1213 width = get_msg_width(MSG_Menus_006B, 0) + 23;
1215#endif
1217 PopupDelayTime = 60;
1219 return 0;
1222 PopupDelayTime = 0;
1223 }
1224 if (PopupDelayTime != 0) {
1226 return 0;
1227 }
1231 if (PopupNotBattle) {
1233 }
1236 break;
1244
1248 }
1252 }
1255 }
1258 }
1259
1260 switch (gPopupMenu->popupType) {
1269 case POPUP_MENU_USEKEY:
1272 break;
1277 break;
1282 break;
1283 }
1284
1286 if (PopupDipMode == 1) {
1287 msgID = MSG_Menus_0068;
1288 } else {
1289 msgID = MSG_Menus_0069;
1290 }
1291#if VERSION_PAL
1292 width = get_msg_width(msgID, 0) + 32;
1293 if (get_msg_lines(msgID) == 1) {
1294 height = 32;
1295 posY = 76;
1296 } else {
1297 height = 40;
1298 posY = 72;
1299 }
1300 set_window_properties(WIN_POPUP_PROMPT, 160 - (width / 2), posY, width, height, WINDOW_PRIORITY_19, popup_draw_dip_query_content, nullptr, -1);
1301#else
1302 width = get_msg_width(msgID, 0) + 23;
1303 set_window_properties(WIN_POPUP_PROMPT, 160 - (width / 2), 76, width, 32, WINDOW_PRIORITY_19, popup_draw_dip_query_content, nullptr, -1);
1304#endif
1309 break;
1311 if (D_8010D6A4 == 1) {
1313 switch (D_8010D6A0->curOption) {
1314 case 0:
1316 break;
1317 case 1:
1319 break;
1320 }
1321 }
1322 break;
1325 break;
1335 }
1339 }
1342 }
1345 }
1347
1348 switch (gPopupMenu->popupType) {
1357 case POPUP_MENU_USEKEY:
1360 break;
1365 break;
1370 break;
1371 }
1374 break;
1375 }
1377 return 0;
1378}
1379#endif
1380
1381void popup_draw_menu_content(s32* userData, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) {
1382 s32 x, y;
1383 s32 y1;
1384 s32 offset;
1385 s32 sp28;
1386 s32 dy;
1387 s32 i, j;
1388 s32 id;
1389 s32 msgPal;
1390 s32 a0;
1391 s32 v0;
1392 s32 t;
1393
1394 switch (gPopupState) {
1395 case POPUP_STATE_10:
1404 case POPUP_STATE_20:
1409 case POPUP_STATE_104:
1410 case POPUP_STATE_105:
1411 break;
1412 default:
1413 return;
1414 }
1415
1416 baseX += 2;
1417 baseY += 15;
1419 y1 = D_8010D658;
1420 dy = y - y1;
1421
1422 if (dy < 130) {
1423 dy *= 0.5;
1424 } else {
1425 dy = dy * 100 / 150;
1426 }
1427 if (dy != 0) {
1428 y1 += dy;
1429 } else {
1430 y1 = y;
1431 }
1432 D_8010D658 = y1;
1434
1435 x = baseX;
1436 y = baseY;
1438 switch (gPopupMenu->popupType) {
1440#if VERSION_JP
1442#endif
1451 case POPUP_MENU_USEKEY:
1453 gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x, y, x + 112, y1);
1454 break;
1458 break;
1459#if !VERSION_JP
1461 gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x, y, x + 160, y1);
1462 break;
1463#endif
1464 }
1465
1466 y = baseY + D_8010D658 + 8;
1468 y = baseY + D_8010D658 + 21;
1469 }
1475 }
1476 x = baseX;
1477 y = baseY + 2;
1480 y = baseY;
1481 y1++;
1482 }
1483
1484#if VERSION_JP
1485 switch (gPopupMenu->popupType) {
1494 case POPUP_MENU_USEKEY:
1496 gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x, y, x + 112, y1);
1497 break;
1500 break;
1502 gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x, y, x + 144, y1);
1503 break;
1505 gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x, y, x + 144, y1);
1506 break;
1508 gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x, y, x + 140, y1);
1509 break;
1510 }
1511#else
1513#endif
1514
1515 x = baseX + 32;
1516 y = baseY + D_8010D658 + 2;
1517 offset = 0;
1519 y = baseY + D_8010D658;
1520 offset = 2;
1521 }
1522
1523 t = 0;
1524 for (i = 0; i < gPopupMenu->numEntries; i++, t++) {
1525 if (sp28 - 1 > i || sp28 + PopupMenu_DisplayedEntryCount < i) {
1526 y += LINE_HEIGHT;
1527 if (i == 0) {
1528 y += offset;
1529 }
1530 } else {
1534 }
1535 if (gPopupMenu->enabled[t] == 0) {
1537 }
1538 switch (gPopupMenu->popupType) {
1546 case POPUP_MENU_USEKEY:
1549 break;
1553 break;
1555 if (gPopupMenu->enabled[t] == 2) {
1557 }
1559 break;
1561 if (gPopupMenu->value[t] != 0) {
1563 } else {
1565 }
1568 break;
1570 if (gPopupMenu->value[t] != 0) {
1572 } else {
1574 }
1575 a0 = gPopupMenu->nameMsg[t];
1577 break;
1578 }
1579 switch (gPopupMenu->popupType) {
1582 for (j = 0; j < ARRAY_COUNT(D_80109890); j++) {
1584
1585 if (gPopupMenu->enabled[i]) {
1587 } else {
1589 }
1591 hud_element_set_render_pos(id, x + PARTNER_LIST_X1 + j * 13, y + 10);
1592 } else {
1593 hud_element_set_render_pos(id, x + PARTNER_LIST_X2 + j * 13, y + 10);
1594 }
1595 if (j < gPopupMenu->value[i]) {
1597 }
1598 }
1599 break;
1602 break;
1605 break;
1606 }
1607 y += LINE_HEIGHT;
1608 if (i == 0) {
1609 y += offset;
1610 }
1611 }
1612 }
1613
1614 x = baseX + 24;
1616 offset = 0;
1619 offset = 2;
1620 }
1621
1622 switch (gPopupMenu->popupType) {
1633 case POPUP_MENU_USEKEY:
1635 for (i = 0; i < gPopupMenu->numEntries; i++) {
1636 if (sp28 - 1 > i || sp28 + PopupMenu_DisplayedEntryCount < i) {
1637 y += LINE_HEIGHT;
1638 if (i == 0) {
1639 y += offset;
1640 }
1641 } else {
1646 hud_element_set_scale(id, 0.45f);
1648 y += LINE_HEIGHT;
1649 if (i == 0) {
1650 y += offset;
1651 }
1652 }
1653 }
1654 break;
1656 for (i = 0; i < gPopupMenu->numEntries; i++) {
1657 if (sp28 - 1 > i || sp28 + PopupMenu_DisplayedEntryCount < i) {
1658 y += LINE_HEIGHT;
1659 if (i == 0) {
1660 y += offset;
1661 }
1662 } else {
1667 hud_element_set_scale(id, 0.45f);
1669 y += LINE_HEIGHT;
1670 if (i == 0) {
1671 y += offset;
1672 }
1673 }
1674 }
1675 break;
1677 for (i = 0; i < gPopupMenu->numEntries; i++) {
1678 if (sp28 - 1 > i || sp28 + PopupMenu_DisplayedEntryCount < i) {
1679 y += LINE_HEIGHT;
1680 if (i == 0) {
1681 y += offset;
1682 }
1683 } else {
1688 hud_element_set_scale(id, 0.45f);
1690 y += LINE_HEIGHT;
1691 if (i == 0) {
1692 y += offset;
1693 }
1694 }
1695 }
1696 break;
1697 }
1698
1700 x = baseX + 8;
1701 y = baseY + 9 + v0;
1703
1705 y -= 2;
1706 }
1710
1711 x = baseX;
1712 y = baseY - 6;
1714 switch (gPopupMenu->popupType) {
1725 case POPUP_MENU_USEKEY:
1727 gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x, y, x + 112, y1);
1728 break;
1732 break;
1733 }
1734
1735 switch (gPopupMenu->popupType) {
1736#if VERSION_JP
1738 offset = 31;
1739 break;
1741 offset = 32;
1742 break;
1744 offset = 31;
1745 break;
1746 default:
1747 offset = 31;
1748 break;
1752 offset = 31;
1753 break;
1754 case POPUP_MENU_USEKEY:
1755 offset = 31;
1756 break;
1758 offset = 13;
1759 break;
1761 offset = 21;
1762 break;
1765 offset = 14;
1766 break;
1767#else
1769 offset = 35;
1770 break;
1773 offset = 35;
1774 break;
1776 offset = 31;
1777 break;
1779 offset = 31;
1780 break;
1784 offset = 31;
1785 break;
1786 default:
1787 offset = 37;
1788 break;
1790 offset = 29;
1791 break;
1793 offset = 21;
1794 break;
1797 offset = 30;
1798 break;
1799#endif
1800 }
1801
1804 x = baseX + offset;
1805 y = baseY;
1806 hud_element_set_render_pos(id, x + 35, y - 1);
1809 }
1810
1813 x = baseX + offset;
1814 y = baseY;
1816 hud_element_set_render_pos(id, x + 35, y + 5);
1819 }
1820}
1821
1822#if VERSION_PAL
1823void popup_draw_title_content(s32* userData, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) {
1825
1826 switch (gPopupMenu->popupType) {
1832 switch (gPopupMenu->dipMode) {
1833 case 1:
1839 break;
1840 case 2:
1846 break;
1847 }
1848 break;
1849 }
1850}
1851#else
1852
1853#if VERSION_JP
1854#define POPUP_ITEM_X 35
1855#define POPUP_ITEMDIP_NUMBER_X 82
1856#define POPUP_ITEMDIP_X 102
1857#define POPUP_TRIPLE_DIP_X 4
1858#define POPUP_BADGE_X 38
1859#define POPUP_CHEST_X 31
1860#define POPUP_POSTCARD_X 16
1861#define POPUP_ITEM_KEY_X 35
1862#define POPUP_POSTOFFICE_X 23
1863#else
1864#define POPUP_ITEM_X 26
1865#define POPUP_ITEMDIP_NUMBER_X 94
1866#define POPUP_ITEMDIP_X 114
1867#define POPUP_TRIPLE_DIP_X 6
1868#define POPUP_BADGE_X 27
1869#define POPUP_CHEST_X 4
1870#define POPUP_POSTCARD_X 6
1871#define POPUP_ITEM_KEY_X 27
1872#define POPUP_POSTOFFICE_X 8
1873#endif
1874
1876 s32* userData, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
1877{
1878 switch (gPopupMenu->popupType) {
1884 switch (gPopupMenu->dipMode) {
1885 case 0:
1886#if VERSION_JP
1888#else
1890#endif
1891 break;
1892 case 1:
1897 break;
1898 case 2:
1904 break;
1905 }
1906 break;
1909 break;
1910#if VERSION_JP
1913 break;
1914#endif
1917 break;
1920 break;
1923 break;
1926 break;
1927 case POPUP_MENU_USEKEY:
1928#if VERSION_JP
1930#else
1932#endif
1933 break;
1935#if !VERSION_JP
1937#endif
1940 break;
1941 }
1942}
1943#endif
1944
1945void popup_draw_desc_content(s32* userData, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) {
1947}
1948
1949#if VERSION_PAL
1950void popup_draw_prompt_content(s32* userData, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) {
1951 s32 x = baseX;
1952 s32 y = baseY + 7;
1953
1954 if (PopupNotBattle) {
1955 s32 msgWidth = get_msg_width(gPopupMenu->unk_33C, 0);
1957
1958 x += ((gPopupMenu->unk_340 + 144) / 2) - (msgWidth / 2);
1959
1960 draw_msg(gPopupMenu->unk_33C, x, msgLines != 1 ? y - 4 : y, 255, MSG_PAL_0F, 0);
1961 }
1962}
1963#else
1964void popup_draw_prompt_content(s32* userData, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) {
1965 s32 msgWidth;
1966
1967#if VERSION_JP
1968 baseY += 6;
1969
1970 if (PopupNotBattle) {
1971 switch (gPopupMenu->popupType) {
1973 msgWidth = get_msg_width(MSG_Menus_0061, 0) + 18;
1974 baseX += 76 - (msgWidth / 2);
1975 draw_msg(MSG_Menus_0061, baseX + 6, baseY + 2, 255, MSG_PAL_0F, 0);
1976 break;
1978 msgWidth = get_msg_width(MSG_Menus_0063, 0) + 18;
1979 baseX += 76 - (msgWidth / 2);
1980 draw_msg(MSG_Menus_0063, baseX + 8, baseY + 2, 255, MSG_PAL_0F, 0);
1981 break;
1983 msgWidth = get_msg_width(MSG_Menus_0064, 0) + 18;
1984 baseX += 76 - (msgWidth / 2);
1985 draw_msg(MSG_Menus_0064, baseX + 4, baseY + 2, 255, MSG_PAL_0F, 0);
1986 break;
1988 msgWidth = get_msg_width(MSG_Menus_0070, 0) + 18;
1989 baseX += 76 - (msgWidth / 2);
1990 draw_msg(MSG_Menus_0070, baseX + 4, baseY + 2, 255, MSG_PAL_0F, 0);
1991 break;
1993 msgWidth = get_msg_width(MSG_Menus_006A, 0) + 18;
1994 baseX += 76 - (msgWidth / 2);
1995 draw_msg(MSG_Menus_006A, baseX + 4, baseY + 2, 255, MSG_PAL_0F, 0);
1996 break;
1998 msgWidth = get_msg_width(MSG_Menus_0065, 0) + 18;
1999 baseX += 76 - (msgWidth / 2);
2000 draw_msg(MSG_Menus_0065, baseX - 4, baseY + 2, 255, MSG_PAL_0F, 0);
2001 break;
2003 msgWidth = get_msg_width(MSG_Menus_0066, 0) + 18;
2004 baseX += 76 - (msgWidth / 2);
2005 draw_msg(MSG_Menus_0066, baseX + 6, baseY + 2, 255, MSG_PAL_0F, 0);
2006 break;
2008 msgWidth = get_msg_width(MSG_Menus_0067, 0) + 18;
2009 baseX += 76 - (msgWidth / 2);
2010 draw_msg(MSG_Menus_0067, baseX + 6, baseY + 2, 255, MSG_PAL_0F, 0);
2011 break;
2013 msgWidth = get_msg_width(MSG_Menus_JP_0081, 0) + 18;
2014 baseX += 76 - (msgWidth / 2);
2015 draw_msg(MSG_Menus_JP_0081, baseX + 6, baseY + 2, 255, MSG_PAL_0F, 0);
2016 break;
2018 msgWidth = get_msg_width(MSG_Menus_00D6, 0) + 18;
2019 baseX += 76 - (msgWidth / 2);
2020 draw_msg(MSG_Menus_00D6, baseX + 6, baseY + 2, 255, MSG_PAL_0F, 0);
2021 break;
2023 msgWidth = get_msg_width(MSG_Menus_006C, 0) + 18;
2024 baseX += 76 - (msgWidth / 2);
2025 draw_msg(MSG_Menus_006C, baseX + 6, baseY + 2, 255, MSG_PAL_0F, 0);
2026 break;
2028 msgWidth = get_msg_width(MSG_Menus_006D, 0) + 18;
2029 baseX += 76 - (msgWidth / 2);
2030 draw_msg(MSG_Menus_006D, baseX + 6, baseY + 2, 255, MSG_PAL_0F, 0);
2031 break;
2032 case POPUP_MENU_USEKEY:
2033 msgWidth = get_msg_width(MSG_Menus_0062, 0) + 18;
2034 baseX += 76 - (msgWidth / 2);
2035 draw_msg(MSG_Menus_0062, baseX + 6, baseY + 2, 255, MSG_PAL_0F, 0);
2036 break;
2038 msgWidth = get_msg_width(MSG_Menus_006F, 0) + 18;
2039 baseX += 76 - (msgWidth / 2);
2040 draw_msg(MSG_Menus_006F, baseX + 6, baseY + 2, 255, MSG_PAL_0F, 0);
2041 break;
2042 }
2043 }
2044#else
2045 baseY += 7;
2046
2047 if (PopupNotBattle) {
2048 switch (gPopupMenu->popupType) {
2050 msgWidth = get_msg_width(MSG_Menus_0061, 0);
2051 baseX += 72 - (msgWidth / 2);
2053 break;
2055 msgWidth = get_msg_width(MSG_Menus_0063, 0);
2056 baseX += 72 - (msgWidth / 2);
2058 break;
2060 msgWidth = get_msg_width(MSG_Menus_0064, 0);
2061 baseX += 72 - (msgWidth / 2);
2063 break;
2065 msgWidth = get_msg_width(MSG_Menus_0070, 0);
2066 baseX += 64 - (msgWidth / 2);
2068 break;
2070 msgWidth = get_msg_width(MSG_Menus_006A, 0);
2071 baseX += 68 - (msgWidth / 2);
2073 break;
2075 msgWidth = get_msg_width(MSG_Menus_0065, 0);
2076 baseX += 60 - (msgWidth / 2);
2078 break;
2080 msgWidth = get_msg_width(MSG_Menus_0066, 0);
2081 baseX += 72 - (msgWidth / 2);
2083 break;
2085 msgWidth = get_msg_width(MSG_Menus_0067, 0);
2086 baseX += 72 - (msgWidth / 2);
2088 break;
2090 msgWidth = get_msg_width(MSG_Menus_006F, 0);
2091 baseX += 72 - (msgWidth / 2);
2093 break;
2095 msgWidth = get_msg_width(MSG_Menus_006D, 0);
2096 baseX += 56 - (msgWidth / 2);
2098 break;
2100 msgWidth = get_msg_width(MSG_Menus_00D6, 0);
2101 baseX += 72 - (msgWidth / 2);
2103 break;
2105 msgWidth = get_msg_width(MSG_Menus_006C, 0);
2106 baseX += 64 - (msgWidth / 2);
2108 break;
2110 msgWidth = get_msg_width(MSG_Menus_006D, 0);
2111 baseX += 64 - (msgWidth / 2);
2113 break;
2114 case POPUP_MENU_USEKEY:
2115 msgWidth = get_msg_width(MSG_Menus_0062, 0);
2116 baseX += 72 - (msgWidth / 2);
2118 break;
2119 }
2120 }
2121#endif
2122}
2123#endif
2124
2125#if VERSION_PAL
2126#define X_800F4C1C 16
2127#else
2128#define X_800F4C1C 11
2129#endif
2130
2132 s32 xPos = x + X_800F4C1C;
2133 s32 yPos = y + 8;
2134 s32 msg;
2135
2136 if (PopupDipMode == 1) {
2138 } else {
2140 }
2141
2142#if VERSION_PAL
2143 if (get_msg_lines(msg) != 1) {
2144 yPos -= 4;
2145 }
2146#endif
2147 draw_msg(msg, xPos, yPos, 255, MSG_PAL_0F, 0);
2148}
2149
2150void popup_draw_cost_icon(s32* userData, s32 x, s32 y) {
2151 HudElemID hid;
2152 s32 xPos;
2153 s32 yPos;
2154
2155 switch (gPopupMenu->popupType) {
2157 xPos = x + 16;
2159 yPos = y + 16;
2160 break;
2161#if VERSION_JP
2164 return;
2165#endif
2167 xPos = x + 17;
2169 yPos = y + 17;
2170 break;
2171 default:
2172 return;
2173 }
2174
2178}
2179
2181#if VERSION_JP
2182 draw_msg(MSG_Menus_006B, x + 11, y + 8, 255, MSG_PAL_0F, 0);
2183#else
2184 draw_msg(MSG_Menus_006B, x + 16, y + 2, 255, MSG_PAL_0F, 0);
2185#endif
2186}
2187
2215
2217 s8 entryCount;
2218 s32 initialPos;
2219 s32 numEntries;
2220
2224 gPopupMenu = popup;
2226 popup->dipMode = 0;
2227 popup->titleNumber = 0;
2228 PopupDipMode = 0;
2229 PopupNotDipping = true;
2230 if (popup->popupType >= POPUP_MENU_DOUBLE_DIP) {
2231 popup->popupType -= POPUP_MENU_DOUBLE_DIP;
2232 PopupDipMode = 1;
2233 if (popup->popupType >= POPUP_MENU_DOUBLE_DIP) {
2234 popup->popupType -= POPUP_MENU_DOUBLE_DIP;
2235 PopupDipMode = 2;
2236 }
2237 PopupNotDipping = false;
2238 }
2239
2240 PopupNotBattle = true;
2243
2244 initialPos = gPopupMenu->initialPos;
2245 numEntries = gPopupMenu->numEntries;
2246 PopupMenu_SelectedIndex = initialPos;
2247 if (initialPos >= numEntries) {
2248 PopupMenu_SelectedIndex = numEntries - 1;
2249 }
2252
2253 entryCount = gPopupMenu->numEntries;
2254 PopupMenu_DisplayedEntryCount = entryCount;
2255 if (PopupMenu_MaxDisplayableEntryCount < entryCount) {
2257 }
2258
2262 }
2263
2264 PopupMenu_Alpha = 255;
2265 D_8010D691 = 4;
2266 PopupDelayLength = 6;
2267 gPopupWorker = create_worker_frontUI((void (*) (void)) popup_menu_update, nullptr);
2268}
2269
2271 gPopupMenu = popup;
2272
2274 popup->dipMode = 0;
2275 popup->titleNumber = 0;
2277 PopupDipMode = 0;
2278 PopupNotDipping = true;
2281 PopupDipMode = 1;
2284 PopupDipMode = 2;
2285 }
2286 PopupNotDipping = false;
2287 }
2288
2289 PopupNotBattle = true;
2295 }
2299
2302 }
2303
2307 }
2308
2309 PopupMenu_Alpha = 255;
2310 D_8010D691 = 4;
2311 PopupDelayLength = 6;
2312 gPopupWorker = create_worker_frontUI((void (*) (void)) popup_menu_update, nullptr);
2313}
2314
2316 gPopupMenu = popup;
2317
2319 D_8010D693 = popup->titleNumber;
2321 PopupDipMode = 0;
2322 PopupNotDipping = true;
2325 PopupDipMode = 1;
2328 PopupDipMode = 2;
2329 }
2330 PopupNotDipping = false;
2331 }
2332
2333 PopupNotBattle = false;
2339 }
2343
2346 }
2347
2351 }
2352
2353 PopupMenu_Alpha = 255;
2354 D_8010D691 = 9;
2355 PopupDelayLength = 2;
2356 gPopupWorker = create_worker_frontUI((void (*) (void)) popup_menu_update, nullptr);
2357}
2358
2359// forces an update step for the popup menu
2362}
BSS s8 D_8010D690
#define POPUP_ITEMDIP_X
#define WINDOW_KEY_WIDTH
void create_battle_popup_menu(PopupMenu *popup)
HudScript HES_EmptyBar
s16 PopupContentScissorWidths[]
BSS s16 D_8010D68C
BSS s16 PopupWinY
BSS s32 PopupMenu_PrevSelectedIndex
HudScript HES_HandPointer
#define POPUP_POSTOFFICE_X
#define DIARY_PAGE_X
BSS s8 PopupNotBattle
BSS s32 PopupMenu_Alpha
void popup_draw_desc_content(s32 *userData, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
void popup_draw_dip_query_content(s32 *userData, s32 x, s32 y)
void hide_popup_menu(void)
void popup_draw_title_content(s32 *userData, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
BSS s16 PopupMenu_StarPieceCounterPosY
#define BADGE_PRICE_X
#define POPUP_TRIPLE_DIP_X
BSS MessagePrintState * D_8010D6A0
BSS HudElemID PopupMenu_TitleIconHID
#define MENU_OFFSET_Y1
#define ALREADY_PARTNER_HEIGHT
#define EMPTY_BAR_X
#define PARTNER_LIST_X2
void popup_draw_menu_content(s32 *userData, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
BSS s8 PopupMenu_FirstDisplayIndex
BSS s16 PopupPromptY
BSS s8 PopupMenu_DisplayedEntryCount
BSS HudElemID PopupMenu_CursorHID
#define POPUP_BADGE_X
HudScript HES_GreenArrowDown
s32 popup_menu_update(void)
HudScript HES_PartnerRank1B
BSS s8 PopupDipMode
BSS s8 PopupDelayLength
BSS s16 PopupWinX
HudScript HES_PartnerRank2B
BSS s32 PopupDelayTime
#define POPUP_ITEM_X
#define ITEM_PRICE_X
BSS s8 PopupNotDipping
void destroy_popup_menu(void)
#define X_800F4C1C
HudScript * D_80109890[]
BSS HudElemID PopupMenu_EmptybarHID
PopupTypes
@ POPUP_TYPE_READ_POSTCARD
@ POPUP_TYPE_SWITCH_PARTNER
@ POPUP_TYPE_TAKE_FROM_CHEST
@ POPUP_TYPE_USE_KEY
@ POPUP_TYPE_TRADE_FOR_BADGE
@ POPUP_TYPE_USE_ITEM
@ POPUP_TYPE_CLAIM_ITEM
@ POPUP_TYPE_THROW_AWAY_ITEM
@ POPUP_TYPE_UPGRADE_PARTNER
@ POPUP_TYPE_SELL_ITEM
@ POPUP_TYPE_CHECK_ITEM
@ POPUP_TYPE_READ_LETTER
@ POPUP_TYPE_READ_DIARY_PAGE
void create_standard_popup_menu(PopupMenu *popup)
void popup_draw_cost_icon(s32 *userData, s32 x, s32 y)
#define POPUP_POSTCARD_X
HudScript HES_GreenArrowUp
BSS s16 PopupMenu_StarPieceCounterPosX
HudScript HES_PartnerRank1A
void flush_popup_menu(void)
BSS HudElemID PopupMenu_DownArrowHID
#define LINE_HEIGHT
BSS s16 PopupDescY
BSS s16 D_8010D658
BSS s16 D_8010D65A
HudScript HES_PartnerRank2A
#define POPUP_CHEST_X
BSS s32 gPopupWorker
#define POPUP_ITEM_KEY_X
#define PARTNER_LIST_X1
BSS HudElemID PopupMenu_EntryIconHID
void popup_draw_prompt_content(s32 *userData, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
BSS s8 PopupMenu_LastDisplayIndex
#define POPUP_ITEMDIP_NUMBER_X
void popup_draw_star_pieces_content(s32 *userData, s32 x, s32 y)
s8 status_bar_is_ignoring_changes(void)
Definition inventory.c:1522
BSS s8 D_8010D691
void show_popup_menu(void)
void popup_draw_already_have_partner(s32 *userData, s32 x, s32 y)
BSS HudElemID PopupMenu_PartnerLevelHID
void create_shop_popup_menu(PopupMenu *popup)
BSS s32 D_8010D6A4
BSS HudElemID PopupMenu_TimesHID
BSS s16 PopupPromptX
HudScript * D_80109898[]
BSS s32 gPopupState
HudScript HES_StatusStarPiece
BSS s32 PopupMenu_SelectedIndex
BSS HudElemID PopupMenu_UpArrowHID
BSS s16 PopupDescX
#define MENU_OFFSET_Y2
BSS s8 PopupMenu_WasStatusBarIgnoringChanges
BSS PopupMenu * gPopupMenu
#define POPUP_PARTNER_WIDTH
BSS s8 PopupMenu_MaxDisplayableEntryCount
BSS s8 D_8010D693
s16 PopupWorldStartX[]
u32 pressedButtons[4]
s32 HudElemID
#define get_msg_width
#define draw_msg
@ DRAW_MSG_STYLE_MENU
Definition enums.h:4970
@ DRAW_NUMBER_STYLE_ALIGN_RIGHT
drawn to the left of posX
Definition enums.h:4978
@ DRAW_NUMBER_STYLE_MONOSPACE
Definition enums.h:4979
@ DRAW_NUMBER_STYLE_MONOSPACE_RIGHT
Definition enums.h:4980
@ BUTTON_A
Definition enums.h:2776
@ BUTTON_R
Definition enums.h:2767
@ BUTTON_STICK_UP
Definition enums.h:2777
@ BUTTON_STICK_DOWN
Definition enums.h:2778
@ BUTTON_B
Definition enums.h:2775
@ BUTTON_C_RIGHT
Definition enums.h:2763
@ BUTTON_C_LEFT
Definition enums.h:2764
@ BUTTON_Z
Definition enums.h:2774
@ POPUP_MENU_TRADE_FOR_BADGE
Definition enums.h:3168
@ POPUP_MENU_READ_DIARY_PAGE
Definition enums.h:3175
@ POPUP_MENU_SELL_ITEM
Definition enums.h:3170
@ POPUP_MENU_CHECK_ITEM
Definition enums.h:3171
@ POPUP_MENU_POST_OFFICE
Definition enums.h:3178
@ POPUP_MENU_DOUBLE_DIP
Definition enums.h:3179
@ POPUP_MENU_USE_ITEM
Definition enums.h:3165
@ POPUP_MENU_TAKE_FROM_CHEST
Definition enums.h:3174
@ POPUP_MENU_USEKEY
Definition enums.h:3177
@ POPUP_MENU_CLAIM_ITEM
Definition enums.h:3172
@ POPUP_MENU_READ_LETTER
Definition enums.h:3173
@ POPUP_MENU_UPGRADE_PARTNER
Definition enums.h:3169
@ POPUP_MENU_THROW_AWAY_ITEM
Definition enums.h:3167
@ POPUP_MENU_SWITCH_PARTNER
Definition enums.h:3166
@ POPUP_MENU_READ_POSTCARD
Definition enums.h:3176
@ WINDOW_PRIORITY_21
Definition enums.h:3221
@ WINDOW_PRIORITY_19
Definition enums.h:3219
@ WINDOW_PRIORITY_20
Definition enums.h:3220
@ MSG_PAL_0F
Definition enums.h:5005
@ MSG_PAL_22
Definition enums.h:5024
@ MSG_PAL_34
Definition enums.h:5042
@ MSG_PAL_0D
Definition enums.h:5003
@ MSG_PAL_STANDARD
Definition enums.h:5000
@ MSG_PAL_0B
Definition enums.h:5001
@ MSG_PAL_32
Definition enums.h:5040
@ WINDOW_UPDATE_SHOW
Definition enums.h:4896
@ WINDOW_UPDATE_HIDE
Definition enums.h:4897
@ DRAW_NUMBER_CHARSET_THIN
Definition enums.h:4986
@ POPUP_RESULT_CANCEL
Definition enums.h:3212
@ POPUP_RESULT_CHOOSING
Definition enums.h:3211
@ POPUP_RESULT_INVALID
Definition enums.h:3209
@ POPUP_RESULT_SWAP_MENU
Definition enums.h:3210
@ CONTEXT_WORLD
Definition enums.h:3562
@ SOUND_OPEN_POPUP_1
Definition enums.h:551
@ SOUND_MENU_BACK
Definition enums.h:704
@ SOUND_OPEN_POPUP_2
Definition enums.h:552
@ SOUND_MENU_CHANGE_SELECTION
Definition enums.h:701
@ SOUND_MENU_NEXT
Definition enums.h:703
@ SOUND_MENU_ERROR
Definition enums.h:936
@ POPUP_STATE_CHOSE_SWAP
Definition enums.h:3203
@ POPUP_STATE_MINUS_8
Definition enums.h:3205
@ POPUP_STATE_10
Definition enums.h:3186
@ POPUP_STATE_104
Definition enums.h:3196
@ POPUP_STATE_CHOSE_WORLD
Definition enums.h:3198
@ POPUP_STATE_11
Definition enums.h:3187
@ POPUP_STATE_MINUS_4
Definition enums.h:3201
@ POPUP_STATE_MINUS_3
Definition enums.h:3200
@ POPUP_STATE_ALREADY_HAVE_PARTNER_SHOW
Definition enums.h:3190
@ POPUP_STATE_INIT
Definition enums.h:3184
@ POPUP_STATE_105
Definition enums.h:3197
@ POPUP_STATE_CHOOSING
Definition enums.h:3185
@ POPUP_STATE_ALREADY_HAVE_PARTNER_BEGIN
Definition enums.h:3189
@ POPUP_STATE_ALREADY_HAVE_PARTNER_AWAIT
Definition enums.h:3191
@ POPUP_STATE_CANCEL_DIP
Definition enums.h:3192
@ POPUP_STATE_CANCEL_DIP_DECLINE
Definition enums.h:3195
@ POPUP_STATE_CANCEL_DIP_AWAIT_CHOICE
Definition enums.h:3193
@ POPUP_STATE_CHOSE_BATTLE
Definition enums.h:3199
@ POPUP_STATE_MINUS_7
Definition enums.h:3204
@ POPUP_STATE_MINUS_5
Definition enums.h:3202
@ POPUP_STATE_20
Definition enums.h:3188
@ POPUP_STATE_CANCEL_DIP_ACCEPT
Definition enums.h:3194
@ WIN_CURRENCY_COUNTER
Definition enums.h:4846
@ WIN_POPUP_DESC
Definition enums.h:4845
@ WIN_POPUP_CONTENT
Definition enums.h:4840
@ WIN_BTL_POPUP
Definition enums.h:4835
@ WIN_POPUP_TITLE_A
Definition enums.h:4841
@ WIN_POPUP_TITLE_B
Definition enums.h:4843
@ WIN_POPUP_COST
Definition enums.h:4842
@ WIN_POPUP_PROMPT
Definition enums.h:4847
@ WIN_PARTNER_COST
Definition enums.h:4844
void msg_printer_set_origin_pos(MessagePrintState *msgPrintState, s32 x, s32 y)
Definition msg.c:1491
void basic_hidden_window_update(s32 windowIndex, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
Definition windows.c:184
void status_bar_ignore_changes(void)
Definition inventory.c:1507
void set_window_update(s32 panelID, s32)
Definition windows.c:434
void open_status_bar_quickly(void)
Definition inventory.c:1440
void basic_window_update(s32 windowIndex, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
Definition windows.c:161
void close_status_bar(void)
Definition inventory.c:1450
void free_worker(s32)
Definition worker.c:176
MessagePrintState * msg_get_printer_for_msg(s32 msgID, s32 *a1)
Definition msg.c:1426
void set_message_int_var(s32 value, s32 index)
Definition msg.c:1552
void set_window_properties(s32 panelID, s32 posX, s32 posY, s32 width, s32 height, u8, void *drawContents, void *drawContentsArg, s8 parent)
Definition windows.c:373
s32 create_worker_frontUI(void(*updateFunc)(void), void(*drawFunc)(void))
Definition worker.c:63
void draw_number(s32 value, s32 x, s32 y, s32 variableWidthChars, s32 palette, s32 opacity, u16 style)
Definition msg.c:2225
void status_bar_respond_to_changes(void)
Definition inventory.c:1518
s32 get_msg_lines(s32 messageID)
Definition msg.c:1981
HudScript HES_AnimatedHandPointer
HudScript HES_StatusCoin
HudScript HES_MenuTimes
void hud_element_set_scale(s32 index, f32 scale)
void hud_element_set_alpha(s32 id, s32 opacity)
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_tint(s32 id, s32 r, s32 g, s32 b)
HudElemID hud_element_create(HudScript *anim)
Creates a new HUD element and returns its ID.
void hud_element_set_render_pos(s32 id, s32 x, s32 y)
void hud_element_set_flags(s32 id, s32 flags)
Turns on the given flags.
void hud_element_draw_clipped(s32 id)
void hud_element_free(s32 id)
s32 userIndex[32]
s32 nameMsg[32]
@ HUD_ELEMENT_FLAG_DISABLED
Definition hud_element.h:72
@ HUD_ELEMENT_FLAG_DROP_SHADOW
Definition hud_element.h:97
@ HUD_ELEMENT_FLAG_MANUAL_RENDER
Definition hud_element.h:78
@ HUD_ELEMENT_FLAG_FILTER_TEX
Definition hud_element.h:86
s32 titleNumber
HudScript * ptrIcon[32]
b32 enabled[32]
s32 value[32]
s32 HudScript[]
Definition hud_element.h:9
s32 descMsg[32]
void sfx_play_sound(s32 soundID)
#define BSS
Definition macros.h:6
#define ARRAY_COUNT(arr)
Definition macros.h:39
GameStatus * gGameStatusPtr
Definition main_loop.c:31
Gfx * gMainGfxPos
Definition cam_main.c:14
PlayerData gPlayerData
Definition 77480.c:39