327 s32 currentBadgeColumn;
338 s32 cannotBeEquipped;
342 s32 badgeEntryOffsetX, badgeEntryOffsetY;
343 s32 posX, posY, cursorOffsetX, cursorOffsetY, selectedPosX, selectedPosY;
352 s32 orbColorR, orbColorG, orbColorB;
353 s32 orbColorR1, orbColorG1, orbColorB1;
354 s32 badgeIconElement;
365 PauseItemPage* currentPage = &gPauseBadgesPages[gPauseBadgesCurrentPage];
370 canBeEquipped = FALSE;
373 currentBadgeColumn = gPauseBadgesSelectedIndex / currentPage->
numCols;
374 currentBadgeRow = gPauseBadgesSelectedIndex % currentPage->
numCols;
376 draw_box(
DRAW_FLAG_NO_CLIP, &
gPauseWS_15, baseX + 84, baseY, 0, width - 84, height, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0,
SCREEN_WIDTH,
SCREEN_HEIGHT, 0);
383 x2 = baseX + width - 1;
384 y2 = baseY + height - 9;
403 gDPSetScissor(
gMainGfxPos++, G_SC_NON_INTERLACE, x1, y1, x2, y2);
406 for (i = 0; i < 3; i++) {
407 for (pageIndex = 0; pageIndex < 20; pageIndex++) {
408 iconIDs = gPauseBadgesIconIDs;
409 badgeListX = baseX + 119;
410 badgeListY = baseY + 17;
412 page = &gPauseBadgesPages[pageIndex];
419 for (itemIndex = 0; itemIndex < page->
count; itemIndex++) {
420 badgeID = gPauseBadgesItemIds[page->
startIndex + itemIndex];
424 cannotBeEquipped = FALSE;
434 if (badgeID == *equippedBadges) {
441 gPauseBadgesLevel == 1 &&
448 if (!isEquipped && bpAvailable >= costBP) {
449 canBeEquipped = TRUE;
455 cannotBeEquipped = TRUE;
458 badgeEntryOffsetX = 0;
459 badgeEntryOffsetY = 0;
461 badgeEntryOffsetX = -1;
462 badgeEntryOffsetY = -1;
474 baseY +
pause_badges_scroll_offset_y(posY) + 17, 0, 200, 13, 255, 0, 0, 0, 0, 0,
476 }
else if (cannotBeEquipped) {
502 badgeIconElement = iconIDs[badgeIndex];
506 badgeIconElement = gPauseBadgesIconIDs[21];
513 if (!isEquipped && cannotBeEquipped) {
524 if (badgeIndex == 0) {
533 if (i == 2 && !isNone) {
547 if (isEquipped == 0) {
548 for (j = 0; j < numOrbs; j++) {
549 gDPSetPrimColor(
gMainGfxPos++, 0, 0, 227, 227, 227, 255);
553 orbY += j / 5 * 6 - 3;
559 gDPSetRenderMode(
gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
560 gDPSetPrimColor(
gMainGfxPos++, 0, 0, orbColorR1, orbColorG1, orbColorB1, 128);
562 for (j = 0; j < numOrbs; j++) {
563 if (j < bpAvailable) {
567 orbY += j / 5 * 6 - 3;
573 gDPSetPrimColor(
gMainGfxPos++, 0, 0, 0, 255, 100, 255);
574 for (j = 0; j < numOrbs; j++) {
578 orbY += j / 5 * 6 - 3;
591 x2 = baseX + width - 1;
592 y2 = baseY + height - 1;
613 gDPSetScissor(
gMainGfxPos++, G_SC_NON_INTERLACE, x1, y1, x2, y2);
616 if (gPauseBadgesCurrentPage > 0) {
621 if (gPauseBadgesPages[gPauseBadgesCurrentPage + 1].enabled) {
633 bpAvailOffsetY = (playerData->
maxBP - 1) / 10 * 8;
640 bpAmountX = baseX + (73 + bpAvailOffsetX);
645 bpAmountX = baseX + 73 + bpAvailOffsetX;
654 maxBP = playerData->
maxBP;
657 for (orbIndex = 0; orbIndex < maxBP; orbIndex++) {
658 gDPSetPrimColor(
gMainGfxPos++, 0, 0, 227, 227, 227, 255);
664 gDPSetPrimColor(
gMainGfxPos++, 0, 0, orbColorR, orbColorG, orbColorB, 255);
665 for (orbIndex = 0; orbIndex < bpAvailable - costBP; orbIndex++) {
671 gDPSetRenderMode(
gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
673 orbBlinkOpacity = orbBlinkValue * 255.0f;
674 gDPSetPrimColor(
gMainGfxPos++, 0, 0, orbColorR, orbColorG, orbColorB, orbBlinkOpacity);
676 for (orbIndex = bpAvailable - costBP; orbIndex < bpAvailable; orbIndex++) {
681 gDPSetPrimColor(
gMainGfxPos++, 0, 0, orbColorR, orbColorG, orbColorB, 255);
682 for (orbIndex = 0; orbIndex < bpAvailable; orbIndex++) {
689 91, 34, 255, gPauseBadgesCurrentTab == 1 ? 128 : 0, 0, 0,
696 if (gPauseBadgesCurrentTab == 0) {
701 if (gPauseBadgesCurrentTab == 1) {
704 draw_msg(msg2, msgX, msgY, msgOpacity, 0, 1);
708 if (gPauseBadgesCurrentTab == 0) {
711 draw_msg(msg2, msgX, baseY + 12, gPauseBadgesCurrentTab == 1 ? 191 : 255, 0, 1);
718 if (gPauseBadgesCurrentTab == 0) {
723 if (gPauseBadgesCurrentTab == 1) {
726 draw_msg(msg, msgX, msgY, msgOpacity, 0, 1);
729 draw_box(4, &
gPauseWS_13, gPauseBadgesCurrentTab == 1 ? baseX + 9 : baseX, baseY + 37, 0, 91, 34, 255,
730 gPauseBadgesCurrentTab != 0 ? 0 : 128, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL,
735 if (gPauseBadgesCurrentTab == 1) {
738 draw_msg(msg2, msgX, baseY + 42, gPauseBadgesCurrentTab == 0 ? 191 : 255, 0, 1);
744 if (gPauseBadgesCurrentTab == 0) {
749 if (gPauseBadgesCurrentTab == 1) {
755 gPauseBadgesCurrentTab == 0 ? 128 : 0, 0, 0, 0, 0, 0, 0, 0, 0,
SCREEN_WIDTH,
SCREEN_HEIGHT, 0);
759 if (gPauseBadgesCurrentTab == 1) {
764 if (gPauseBadgesCurrentTab == 0) {
771 if (gPauseBadgesCurrentTab == 1) {
776 if (gPauseBadgesCurrentTab == 0) {
783 if (gPauseBadgesLevel == 0) {
786 selectedPosX =
pause_badges_get_pos_x(gPauseBadgesCurrentPage, gPauseBadgesSelectedIndex - gPauseBadgesPages[gPauseBadgesCurrentPage].listStart * gPauseBadgesPages[gPauseBadgesCurrentPage].numCols);
787 selectedPosY =
pause_badges_get_pos_y(gPauseBadgesCurrentPage, gPauseBadgesSelectedIndex - gPauseBadgesPages[gPauseBadgesCurrentPage].listStart * gPauseBadgesPages[gPauseBadgesCurrentPage].numCols);
790 if (cursorOffsetY < 0) {
792 }
else if (cursorOffsetY > 112) {
796 if (gPauseBadgesCurrentScrollPos != gPauseBadgesTargetScrollPos) {
804 if (gPauseBadgesShowNotEnoughBP != 0) {
806 if (gPauseBadgesShowNotEnoughBP == 1) {
811 0, 0, 0, 0, 0, 0, 0, 0, 0,
SCREEN_WIDTH,
SCREEN_HEIGHT, 0);
816 0, 0, 0, 0, 0, 0, 0, 0, 0,
SCREEN_WIDTH,
SCREEN_HEIGHT, 0);
822 0, 0, 0, 0, 0, 0, 0, 0, 0,
SCREEN_WIDTH,
SCREEN_HEIGHT, 0);