mirror of
https://github.com/pmret/papermario.git
synced 2024-11-18 00:42:34 +01:00
Work (#227)
This commit is contained in:
parent
c83d233482
commit
0616d1694e
@ -201,9 +201,10 @@ extern s16 gItemMenuNumItems;
|
||||
extern s32 D_802705D0;
|
||||
extern s32 gItemMenuCurrentScrollPos;
|
||||
extern s32 gItemMenuTargetScrollPos;
|
||||
extern s32 D_802705DC;
|
||||
extern u32 D_802705DC;
|
||||
extern s32 gItemMenuLevel;
|
||||
extern s32 gItemMenuCurrentTab;
|
||||
extern MenuIcon* gItemIcons[20];
|
||||
extern s32 gItemMenuScrollUpIcon;
|
||||
|
||||
// Stats
|
||||
|
@ -1,52 +0,0 @@
|
||||
#include "common.h"
|
||||
|
||||
s32 pause_items_comparator(s16* a, s16* b) {
|
||||
if (*a > *b) {
|
||||
return 1;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
s32 pause_items_get_pos_x(s32 page, s32 itemIndex) {
|
||||
return (itemIndex % ITEM_MENU_PAGE(page)->numCols) * 98;
|
||||
}
|
||||
|
||||
s32 pause_items_get_pos_y(s32 page, s32 itemIndex) {
|
||||
return ((page + 1) * 11) + (ITEM_MENU_PAGE(page)->listStart * 16) + ((itemIndex / ITEM_MENU_PAGE(page)->numCols) * 16);
|
||||
}
|
||||
|
||||
s32 pause_items_get_column(s32 page, s32 itemIdx) {
|
||||
return itemIdx % ITEM_MENU_PAGE(page)->numCols;
|
||||
}
|
||||
|
||||
s32 pause_items_get_row(s32 page, s32 itemIdx) {
|
||||
return ITEM_MENU_PAGE(page)->listStart + (itemIdx / ITEM_MENU_PAGE(page)->numCols);
|
||||
}
|
||||
|
||||
s32 pause_items_is_visible(s32 y) {
|
||||
if (y < gItemMenuCurrentScrollPos - 32) {
|
||||
return FALSE;
|
||||
}
|
||||
return y < gItemMenuCurrentScrollPos + 128;
|
||||
}
|
||||
|
||||
s32 pause_items_scroll_offset_y(s32 beforeY) {
|
||||
return beforeY - gItemMenuCurrentScrollPos;
|
||||
}
|
||||
|
||||
s32 pause_items_scroll_offset_x(s32 beforeX) {
|
||||
return beforeX;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_13CAF0", pause_items_draw_contents);
|
||||
|
||||
INCLUDE_ASM(s32, "code_13CAF0", pause_items_load_items);
|
||||
|
||||
INCLUDE_ASM(s32, "code_13CAF0", pause_items_init);
|
||||
|
||||
INCLUDE_ASM(s32, "code_13CAF0", pause_items_handle_input);
|
||||
|
||||
INCLUDE_ASM(s32, "code_13CAF0", pause_items_update);
|
||||
|
||||
INCLUDE_ASM(s32, "code_13CAF0", pause_items_cleanup);
|
198
src/pause_items.c
Normal file
198
src/pause_items.c
Normal file
@ -0,0 +1,198 @@
|
||||
#include "common.h"
|
||||
|
||||
struct struct8024F5C0 {
|
||||
char unk00[0x10];
|
||||
s32* unk10;
|
||||
char unk14[0x10];
|
||||
};
|
||||
|
||||
extern struct struct8024F5C0* D_8024F5C0[1];
|
||||
extern s32 D_8024F570[];
|
||||
|
||||
s32 pause_items_comparator(s16* a, s16* b) {
|
||||
if (*a > *b) {
|
||||
return 1;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
s32 pause_items_get_pos_x(s32 page, s32 itemIndex) {
|
||||
return (itemIndex % ITEM_MENU_PAGE(page)->numCols) * 98;
|
||||
}
|
||||
|
||||
s32 pause_items_get_pos_y(s32 page, s32 itemIndex) {
|
||||
return ((page + 1) * 11) + (ITEM_MENU_PAGE(page)->listStart * 16) + ((itemIndex / ITEM_MENU_PAGE(page)->numCols) * 16);
|
||||
}
|
||||
|
||||
s32 pause_items_get_column(s32 page, s32 itemIdx) {
|
||||
return itemIdx % ITEM_MENU_PAGE(page)->numCols;
|
||||
}
|
||||
|
||||
s32 pause_items_get_row(s32 page, s32 itemIdx) {
|
||||
return ITEM_MENU_PAGE(page)->listStart + (itemIdx / ITEM_MENU_PAGE(page)->numCols);
|
||||
}
|
||||
|
||||
s32 pause_items_is_visible(s32 y) {
|
||||
if (y < gItemMenuCurrentScrollPos - 32) {
|
||||
return FALSE;
|
||||
}
|
||||
return y < gItemMenuCurrentScrollPos + 128;
|
||||
}
|
||||
|
||||
s32 pause_items_scroll_offset_y(s32 beforeY) {
|
||||
return beforeY - gItemMenuCurrentScrollPos;
|
||||
}
|
||||
|
||||
s32 pause_items_scroll_offset_x(s32 beforeX) {
|
||||
return beforeX;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "pause_items", pause_items_draw_contents);
|
||||
|
||||
extern u32 D_802705C4;
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
void pause_items_load_items(s32 invItems) {
|
||||
PlayerData* playerData = &gPlayerData;
|
||||
s32 i;
|
||||
s16* itemIDs;
|
||||
s32 pageNum;
|
||||
s16* itemMenuNumItems;
|
||||
s32 totalItems = 0;
|
||||
PauseItemPage* page;
|
||||
s32 items;
|
||||
s16* itemMenuItemIDs;
|
||||
|
||||
D_802705D0 = 0;
|
||||
if (invItems == TRUE) {
|
||||
for (i = 0, itemIDs = &gItemMenuItemIDs; i < ARRAY_COUNT(playerData->invItems); i++) {
|
||||
if (playerData->invItems[i] != 0) {
|
||||
itemIDs[totalItems] = playerData->invItems[i];
|
||||
totalItems++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (i = 0, itemIDs = &gItemMenuItemIDs; i < ARRAY_COUNT(playerData->keyItems); i++) {
|
||||
if (playerData->keyItems[i] != 0) {
|
||||
itemIDs[totalItems] = playerData->keyItems[i];
|
||||
totalItems++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (totalItems == 0) {
|
||||
gItemMenuItemIDs[0] = 0x7FFE;
|
||||
totalItems = 1;
|
||||
} else {
|
||||
pause_sort_item_list(&gItemMenuItemIDs, totalItems, pause_items_comparator);
|
||||
}
|
||||
|
||||
gItemMenuNumItems = totalItems;
|
||||
|
||||
for (items = totalItems; items < 100; items++) {
|
||||
itemMenuItemIDs = &gItemMenuItemIDs;
|
||||
itemMenuItemIDs[items] = 0x7FFF;
|
||||
}
|
||||
|
||||
page = &gItemMenuPages;
|
||||
pageNum = 0;
|
||||
itemMenuNumItems = &gItemMenuNumItems;
|
||||
gItemMenuSelectedIndex = 0;
|
||||
gItemMenuSelectedItemID = 0;
|
||||
D_802705C4 = 0;
|
||||
D_802705DC = 0;
|
||||
gItemMenuCurrentPage = 0;
|
||||
|
||||
while (pageNum < *itemMenuNumItems / 8) {
|
||||
page->listStart = pageNum * 8;
|
||||
page->numCols = 1;
|
||||
page->numRows = 8;
|
||||
page->enabled = 1;
|
||||
page->startIndex = pageNum * 8;
|
||||
page->count = 8;
|
||||
pageNum++;
|
||||
page++;
|
||||
}
|
||||
|
||||
if ((*itemMenuNumItems % 8) != 0) {
|
||||
page->listStart = pageNum * 8;
|
||||
page->numCols = 1;
|
||||
page->enabled = 1;
|
||||
page->startIndex = pageNum * 8;
|
||||
page->count = *itemMenuNumItems % 8;
|
||||
page->numRows = (u8) page->count;
|
||||
pageNum++;
|
||||
page++;
|
||||
}
|
||||
|
||||
while (pageNum < ARRAY_COUNT(gItemMenuPages)) {
|
||||
page->enabled = NULL;
|
||||
pageNum++;
|
||||
page++;
|
||||
}
|
||||
|
||||
gItemMenuTargetScrollPos = gItemMenuCurrentScrollPos = pause_items_get_pos_y(0, 0);
|
||||
}
|
||||
#else
|
||||
INCLUDE_ASM(s32, "pause_items", pause_items_load_items);
|
||||
#endif
|
||||
|
||||
void pause_items_init(s8* arg0) {
|
||||
s32 i;
|
||||
s32* temp_a0 = D_8024F570;
|
||||
MenuIcon** itemIcons = gItemIcons;
|
||||
struct struct8024F5C0* temp = D_8024F5C0;
|
||||
|
||||
gItemMenuLevel = 0;
|
||||
gItemMenuCurrentTab = 0;
|
||||
pause_items_load_items(FALSE);
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(gItemIcons); i++) {
|
||||
itemIcons[i] = create_icon(temp_a0[i]);
|
||||
set_icon_flags(itemIcons[i], 0x80);
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(D_8024F5C0); i++) {
|
||||
temp[i].unk10 = arg0;
|
||||
}
|
||||
|
||||
setup_pause_menu_tab(&D_8024F5C0, 1);
|
||||
*arg0 = 1;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "pause_items", pause_items_handle_input);
|
||||
|
||||
void pause_items_update(void) {
|
||||
s32* currPos = &gItemMenuCurrentScrollPos;
|
||||
PauseItemPage* menuPages = gItemMenuPages;
|
||||
PauseItemPage* menuPage = &menuPages[gItemMenuCurrentPage];
|
||||
s32* temp802705DC;
|
||||
s32 selectedIndex = (gItemMenuSelectedIndex / menuPage->numCols) - menuPage->listStart;
|
||||
|
||||
if ((selectedIndex < 2) || (menuPage->numRows < 9)) {
|
||||
D_802705DC = 0;
|
||||
} else if (selectedIndex >= (menuPage->numRows - 2)) {
|
||||
D_802705DC = menuPage->numRows - 8;
|
||||
} else {
|
||||
temp802705DC = &D_802705DC;
|
||||
if ((selectedIndex - *temp802705DC) > 6) {
|
||||
*temp802705DC = selectedIndex - 6;
|
||||
} else if ((selectedIndex - *temp802705DC) < 1) {
|
||||
*temp802705DC = selectedIndex - 1;
|
||||
}
|
||||
}
|
||||
|
||||
currPos = &gItemMenuCurrentScrollPos;
|
||||
gItemMenuTargetScrollPos = pause_items_get_pos_y(gItemMenuCurrentPage, D_802705DC * menuPage->numCols);
|
||||
*currPos += pause_interp_vertical_scroll(gItemMenuTargetScrollPos - *currPos);
|
||||
}
|
||||
|
||||
void pause_items_cleanup(void) {
|
||||
MenuIcon** itemIcons = gItemIcons;
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(gItemIcons); i++) {
|
||||
free_icon(itemIcons[i]);
|
||||
}
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel pause_items_cleanup
|
||||
/* 13E0D0 8024AD90 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* 13E0D4 8024AD94 AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* 13E0D8 8024AD98 0000882D */ daddu $s1, $zero, $zero
|
||||
/* 13E0DC 8024AD9C AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 13E0E0 8024ADA0 3C108027 */ lui $s0, %hi(D_802705E8)
|
||||
/* 13E0E4 8024ADA4 261005E8 */ addiu $s0, $s0, %lo(D_802705E8)
|
||||
/* 13E0E8 8024ADA8 AFBF0018 */ sw $ra, 0x18($sp)
|
||||
.L8024ADAC:
|
||||
/* 13E0EC 8024ADAC 8E040000 */ lw $a0, ($s0)
|
||||
/* 13E0F0 8024ADB0 26100004 */ addiu $s0, $s0, 4
|
||||
/* 13E0F4 8024ADB4 0C05123D */ jal free_icon
|
||||
/* 13E0F8 8024ADB8 26310001 */ addiu $s1, $s1, 1
|
||||
/* 13E0FC 8024ADBC 2A220014 */ slti $v0, $s1, 0x14
|
||||
/* 13E100 8024ADC0 1440FFFA */ bnez $v0, .L8024ADAC
|
||||
/* 13E104 8024ADC4 00000000 */ nop
|
||||
/* 13E108 8024ADC8 8FBF0018 */ lw $ra, 0x18($sp)
|
||||
/* 13E10C 8024ADCC 8FB10014 */ lw $s1, 0x14($sp)
|
||||
/* 13E110 8024ADD0 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 13E114 8024ADD4 03E00008 */ jr $ra
|
||||
/* 13E118 8024ADD8 27BD0020 */ addiu $sp, $sp, 0x20
|
||||
/* 13E11C 8024ADDC 00000000 */ nop
|
@ -1,55 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel pause_items_init
|
||||
/* 13DA54 8024A714 27BDFFD8 */ addiu $sp, $sp, -0x28
|
||||
/* 13DA58 8024A718 AFB3001C */ sw $s3, 0x1c($sp)
|
||||
/* 13DA5C 8024A71C 0080982D */ daddu $s3, $a0, $zero
|
||||
/* 13DA60 8024A720 AFBF0020 */ sw $ra, 0x20($sp)
|
||||
/* 13DA64 8024A724 AFB20018 */ sw $s2, 0x18($sp)
|
||||
/* 13DA68 8024A728 AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* 13DA6C 8024A72C AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 13DA70 8024A730 3C018027 */ lui $at, %hi(gItemMenuLevel)
|
||||
/* 13DA74 8024A734 AC2005E0 */ sw $zero, %lo(gItemMenuLevel)($at)
|
||||
/* 13DA78 8024A738 3C018027 */ lui $at, %hi(gItemMenuCurrentTab)
|
||||
/* 13DA7C 8024A73C AC2005E4 */ sw $zero, %lo(gItemMenuCurrentTab)($at)
|
||||
/* 13DA80 8024A740 0C092937 */ jal pause_items_load_items
|
||||
/* 13DA84 8024A744 0000202D */ daddu $a0, $zero, $zero
|
||||
/* 13DA88 8024A748 0000802D */ daddu $s0, $zero, $zero
|
||||
/* 13DA8C 8024A74C 3C128027 */ lui $s2, %hi(D_802705E8)
|
||||
/* 13DA90 8024A750 265205E8 */ addiu $s2, $s2, %lo(D_802705E8)
|
||||
/* 13DA94 8024A754 3C118025 */ lui $s1, %hi(D_8024F570)
|
||||
/* 13DA98 8024A758 2631F570 */ addiu $s1, $s1, %lo(D_8024F570)
|
||||
.L8024A75C:
|
||||
/* 13DA9C 8024A75C 8E240000 */ lw $a0, ($s1)
|
||||
/* 13DAA0 8024A760 26310004 */ addiu $s1, $s1, 4
|
||||
/* 13DAA4 8024A764 0C050529 */ jal create_icon
|
||||
/* 13DAA8 8024A768 26100001 */ addiu $s0, $s0, 1
|
||||
/* 13DAAC 8024A76C 0040202D */ daddu $a0, $v0, $zero
|
||||
/* 13DAB0 8024A770 24050080 */ addiu $a1, $zero, 0x80
|
||||
/* 13DAB4 8024A774 0C051280 */ jal set_icon_flags
|
||||
/* 13DAB8 8024A778 AE440000 */ sw $a0, ($s2)
|
||||
/* 13DABC 8024A77C 2A020014 */ slti $v0, $s0, 0x14
|
||||
/* 13DAC0 8024A780 1440FFF6 */ bnez $v0, .L8024A75C
|
||||
/* 13DAC4 8024A784 26520004 */ addiu $s2, $s2, 4
|
||||
/* 13DAC8 8024A788 0000802D */ daddu $s0, $zero, $zero
|
||||
/* 13DACC 8024A78C 3C028025 */ lui $v0, %hi(D_8024F5C0)
|
||||
/* 13DAD0 8024A790 2442F5C0 */ addiu $v0, $v0, %lo(D_8024F5C0)
|
||||
.L8024A794:
|
||||
/* 13DAD4 8024A794 AC530010 */ sw $s3, 0x10($v0)
|
||||
/* 13DAD8 8024A798 26100001 */ addiu $s0, $s0, 1
|
||||
/* 13DADC 8024A79C 1A00FFFD */ blez $s0, .L8024A794
|
||||
/* 13DAE0 8024A7A0 24420024 */ addiu $v0, $v0, 0x24
|
||||
/* 13DAE4 8024A7A4 3C048025 */ lui $a0, %hi(D_8024F5C0)
|
||||
/* 13DAE8 8024A7A8 2484F5C0 */ addiu $a0, $a0, %lo(D_8024F5C0)
|
||||
/* 13DAEC 8024A7AC 0C051FCC */ jal setup_pause_menu_tab
|
||||
/* 13DAF0 8024A7B0 24050001 */ addiu $a1, $zero, 1
|
||||
/* 13DAF4 8024A7B4 24020001 */ addiu $v0, $zero, 1
|
||||
/* 13DAF8 8024A7B8 A2620000 */ sb $v0, ($s3)
|
||||
/* 13DAFC 8024A7BC 8FBF0020 */ lw $ra, 0x20($sp)
|
||||
/* 13DB00 8024A7C0 8FB3001C */ lw $s3, 0x1c($sp)
|
||||
/* 13DB04 8024A7C4 8FB20018 */ lw $s2, 0x18($sp)
|
||||
/* 13DB08 8024A7C8 8FB10014 */ lw $s1, 0x14($sp)
|
||||
/* 13DB0C 8024A7CC 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 13DB10 8024A7D0 03E00008 */ jr $ra
|
||||
/* 13DB14 8024A7D4 27BD0028 */ addiu $sp, $sp, 0x28
|
@ -1,90 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel pause_items_update
|
||||
/* 13DF94 8024AC54 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 13DF98 8024AC58 3C038027 */ lui $v1, %hi(gItemMenuCurrentPage)
|
||||
/* 13DF9C 8024AC5C 8C6304C8 */ lw $v1, %lo(gItemMenuCurrentPage)($v1)
|
||||
/* 13DFA0 8024AC60 3C048027 */ lui $a0, %hi(gItemMenuPages)
|
||||
/* 13DFA4 8024AC64 248404D0 */ addiu $a0, $a0, %lo(gItemMenuPages)
|
||||
/* 13DFA8 8024AC68 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 13DFAC 8024AC6C AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 13DFB0 8024AC70 00031040 */ sll $v0, $v1, 1
|
||||
/* 13DFB4 8024AC74 00431021 */ addu $v0, $v0, $v1
|
||||
/* 13DFB8 8024AC78 00021080 */ sll $v0, $v0, 2
|
||||
/* 13DFBC 8024AC7C 00443021 */ addu $a2, $v0, $a0
|
||||
/* 13DFC0 8024AC80 90C30002 */ lbu $v1, 2($a2)
|
||||
/* 13DFC4 8024AC84 3C028027 */ lui $v0, %hi(gItemMenuSelectedIndex)
|
||||
/* 13DFC8 8024AC88 8C4205C0 */ lw $v0, %lo(gItemMenuSelectedIndex)($v0)
|
||||
/* 13DFCC 8024AC8C 14600002 */ bnez $v1, .L8024AC98
|
||||
/* 13DFD0 8024AC90 0043001A */ div $zero, $v0, $v1
|
||||
/* 13DFD4 8024AC94 0007000D */ break 7
|
||||
.L8024AC98:
|
||||
/* 13DFD8 8024AC98 2401FFFF */ addiu $at, $zero, -1
|
||||
/* 13DFDC 8024AC9C 14610004 */ bne $v1, $at, .L8024ACB0
|
||||
/* 13DFE0 8024ACA0 3C018000 */ lui $at, 0x8000
|
||||
/* 13DFE4 8024ACA4 14410002 */ bne $v0, $at, .L8024ACB0
|
||||
/* 13DFE8 8024ACA8 00000000 */ nop
|
||||
/* 13DFEC 8024ACAC 0006000D */ break 6
|
||||
.L8024ACB0:
|
||||
/* 13DFF0 8024ACB0 00001012 */ mflo $v0
|
||||
/* 13DFF4 8024ACB4 90C30001 */ lbu $v1, 1($a2)
|
||||
/* 13DFF8 8024ACB8 00432023 */ subu $a0, $v0, $v1
|
||||
/* 13DFFC 8024ACBC 28820002 */ slti $v0, $a0, 2
|
||||
/* 13E000 8024ACC0 14400005 */ bnez $v0, .L8024ACD8
|
||||
/* 13E004 8024ACC4 00000000 */ nop
|
||||
/* 13E008 8024ACC8 90C20003 */ lbu $v0, 3($a2)
|
||||
/* 13E00C 8024ACCC 2C420009 */ sltiu $v0, $v0, 9
|
||||
/* 13E010 8024ACD0 10400005 */ beqz $v0, .L8024ACE8
|
||||
/* 13E014 8024ACD4 00000000 */ nop
|
||||
.L8024ACD8:
|
||||
/* 13E018 8024ACD8 3C018027 */ lui $at, %hi(D_802705DC)
|
||||
/* 13E01C 8024ACDC AC2005DC */ sw $zero, %lo(D_802705DC)($at)
|
||||
/* 13E020 8024ACE0 08092B4D */ j .L8024AD34
|
||||
/* 13E024 8024ACE4 00000000 */ nop
|
||||
.L8024ACE8:
|
||||
/* 13E028 8024ACE8 90C30003 */ lbu $v1, 3($a2)
|
||||
/* 13E02C 8024ACEC 2462FFFE */ addiu $v0, $v1, -2
|
||||
/* 13E030 8024ACF0 0082102A */ slt $v0, $a0, $v0
|
||||
/* 13E034 8024ACF4 14400005 */ bnez $v0, .L8024AD0C
|
||||
/* 13E038 8024ACF8 2462FFF8 */ addiu $v0, $v1, -8
|
||||
/* 13E03C 8024ACFC 3C018027 */ lui $at, %hi(D_802705DC)
|
||||
/* 13E040 8024AD00 AC2205DC */ sw $v0, %lo(D_802705DC)($at)
|
||||
/* 13E044 8024AD04 08092B4D */ j .L8024AD34
|
||||
/* 13E048 8024AD08 00000000 */ nop
|
||||
.L8024AD0C:
|
||||
/* 13E04C 8024AD0C 3C058027 */ lui $a1, %hi(D_802705DC)
|
||||
/* 13E050 8024AD10 24A505DC */ addiu $a1, $a1, %lo(D_802705DC)
|
||||
/* 13E054 8024AD14 8CA20000 */ lw $v0, ($a1)
|
||||
/* 13E058 8024AD18 00821823 */ subu $v1, $a0, $v0
|
||||
/* 13E05C 8024AD1C 28620007 */ slti $v0, $v1, 7
|
||||
/* 13E060 8024AD20 10400003 */ beqz $v0, .L8024AD30
|
||||
/* 13E064 8024AD24 2482FFFA */ addiu $v0, $a0, -6
|
||||
/* 13E068 8024AD28 1C600002 */ bgtz $v1, .L8024AD34
|
||||
/* 13E06C 8024AD2C 2482FFFF */ addiu $v0, $a0, -1
|
||||
.L8024AD30:
|
||||
/* 13E070 8024AD30 ACA20000 */ sw $v0, ($a1)
|
||||
.L8024AD34:
|
||||
/* 13E074 8024AD34 90C20002 */ lbu $v0, 2($a2)
|
||||
/* 13E078 8024AD38 3C058027 */ lui $a1, %hi(D_802705DC)
|
||||
/* 13E07C 8024AD3C 8CA505DC */ lw $a1, %lo(D_802705DC)($a1)
|
||||
/* 13E080 8024AD40 00A20018 */ mult $a1, $v0
|
||||
/* 13E084 8024AD44 3C048027 */ lui $a0, %hi(gItemMenuCurrentPage)
|
||||
/* 13E088 8024AD48 8C8404C8 */ lw $a0, %lo(gItemMenuCurrentPage)($a0)
|
||||
/* 13E08C 8024AD4C 00002812 */ mflo $a1
|
||||
/* 13E090 8024AD50 0C09260A */ jal pause_items_get_pos_y
|
||||
/* 13E094 8024AD54 00000000 */ nop
|
||||
/* 13E098 8024AD58 3C108027 */ lui $s0, %hi(gItemMenuCurrentScrollPos)
|
||||
/* 13E09C 8024AD5C 261005D4 */ addiu $s0, $s0, %lo(gItemMenuCurrentScrollPos)
|
||||
/* 13E0A0 8024AD60 8E040000 */ lw $a0, ($s0)
|
||||
/* 13E0A4 8024AD64 3C018027 */ lui $at, %hi(gItemMenuTargetScrollPos)
|
||||
/* 13E0A8 8024AD68 AC2205D8 */ sw $v0, %lo(gItemMenuTargetScrollPos)($at)
|
||||
/* 13E0AC 8024AD6C 0C090D1B */ jal pause_interp_vertical_scroll
|
||||
/* 13E0B0 8024AD70 00442023 */ subu $a0, $v0, $a0
|
||||
/* 13E0B4 8024AD74 8E030000 */ lw $v1, ($s0)
|
||||
/* 13E0B8 8024AD78 00621821 */ addu $v1, $v1, $v0
|
||||
/* 13E0BC 8024AD7C AE030000 */ sw $v1, ($s0)
|
||||
/* 13E0C0 8024AD80 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 13E0C4 8024AD84 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 13E0C8 8024AD88 03E00008 */ jr $ra
|
||||
/* 13E0CC 8024AD8C 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -185,8 +185,8 @@ glabel pause_items_draw_contents
|
||||
/* 13CF60 80249C20 184000D5 */ blez $v0, .L80249F78
|
||||
/* 13CF64 80249C24 0000902D */ daddu $s2, $zero, $zero
|
||||
/* 13CF68 80249C28 8FAA0054 */ lw $t2, 0x54($sp)
|
||||
/* 13CF6C 80249C2C 3C0B8027 */ lui $t3, %hi(D_802705E8)
|
||||
/* 13CF70 80249C30 256B05E8 */ addiu $t3, $t3, %lo(D_802705E8)
|
||||
/* 13CF6C 80249C2C 3C0B8027 */ lui $t3, %hi(gItemIcons)
|
||||
/* 13CF70 80249C30 256B05E8 */ addiu $t3, $t3, %lo(gItemIcons)
|
||||
/* 13CF74 80249C34 000A1080 */ sll $v0, $t2, 2
|
||||
/* 13CF78 80249C38 004B5821 */ addu $t3, $v0, $t3
|
||||
/* 13CF7C 80249C3C AFAB0078 */ sw $t3, 0x78($sp)
|
||||
@ -524,8 +524,8 @@ glabel pause_items_draw_contents
|
||||
/* 13D460 8024A120 8E220000 */ lw $v0, ($s1)
|
||||
/* 13D464 8024A124 1840000E */ blez $v0, .L8024A160
|
||||
/* 13D468 8024A128 24420001 */ addiu $v0, $v0, 1
|
||||
/* 13D46C 8024A12C 3C108027 */ lui $s0, %hi(D_802705E8)
|
||||
/* 13D470 8024A130 261005E8 */ addiu $s0, $s0, %lo(D_802705E8)
|
||||
/* 13D46C 8024A12C 3C108027 */ lui $s0, %hi(gItemIcons)
|
||||
/* 13D470 8024A130 261005E8 */ addiu $s0, $s0, %lo(gItemIcons)
|
||||
/* 13D474 8024A134 8FAB00AC */ lw $t3, 0xac($sp)
|
||||
/* 13D478 8024A138 8E040040 */ lw $a0, 0x40($s0)
|
||||
/* 13D47C 8024A13C 8FAA00B0 */ lw $t2, 0xb0($sp)
|
||||
@ -546,8 +546,8 @@ glabel pause_items_draw_contents
|
||||
/* 13D4B4 8024A174 904204D0 */ lbu $v0, %lo(gItemMenuPages)($v0)
|
||||
/* 13D4B8 8024A178 1040000C */ beqz $v0, .L8024A1AC
|
||||
/* 13D4BC 8024A17C 00000000 */ nop
|
||||
/* 13D4C0 8024A180 3C108027 */ lui $s0, %hi(D_802705E8)
|
||||
/* 13D4C4 8024A184 261005E8 */ addiu $s0, $s0, %lo(D_802705E8)
|
||||
/* 13D4C0 8024A180 3C108027 */ lui $s0, %hi(gItemIcons)
|
||||
/* 13D4C4 8024A184 261005E8 */ addiu $s0, $s0, %lo(gItemIcons)
|
||||
/* 13D4C8 8024A188 8FAB00AC */ lw $t3, 0xac($sp)
|
||||
/* 13D4CC 8024A18C 8E040044 */ lw $a0, 0x44($s0)
|
||||
/* 13D4D0 8024A190 8FAA00B0 */ lw $t2, 0xb0($sp)
|
@ -464,7 +464,7 @@ segments:
|
||||
- [0x135EE0, c]
|
||||
- [0x137ED0, c]
|
||||
- [0x138CC0, c]
|
||||
- [0x13CAF0, c]
|
||||
- [0x13CAF0, c, pause_items]
|
||||
- [0x13E120, c]
|
||||
- [0x13FD40, c]
|
||||
- [0x140C70, c]
|
||||
@ -474,7 +474,13 @@ segments:
|
||||
- [0x15D3F0, palette, pause/world_map]
|
||||
- [0x15D5F0, ci4, pause/spirits_bg, 128, 110]
|
||||
- [0x15F170, palette, pause/spirits_bg]
|
||||
- [0x15F270, bin]
|
||||
- [0x15F370, rgba16, pause/filled_pip, 8, 8]
|
||||
- [0x15F3F0, rgba16, pause/empty_pip, 8, 8]
|
||||
- [0x15F470, rgba16, pause/red_pip, 8, 8]
|
||||
- [0x15F4F0, bin]
|
||||
- [0x15F570, ia8, pause/image_15F570, 16, 16]
|
||||
- [0x15F670, ia8, pause/image_15F670, 16, 16]
|
||||
- [0x15F770, ia8, pause/arrows, 16, 32]
|
||||
- [0x15F970, ci4, pause/banner_hp, 64, 16]
|
||||
- [0x15FB70, palette, pause/banner_hp]
|
||||
- [0x15FD70, ci4, pause/banner_fp, 64, 16]
|
||||
@ -491,7 +497,9 @@ segments:
|
||||
- [0x1611F0, palette, pause/available]
|
||||
- [0x1613F0, ci4, pause/prompt_check_abilities, 128, 16]
|
||||
- [0x1617F0, palette, pause/prompt_check_abilities]
|
||||
- [0x1619F0, bin]
|
||||
- [0x1619F0, ci4, pause/stats_bar, 160, 8]
|
||||
- [0x161C70, palette, pause/stats_bar]
|
||||
- [0x161E70, bin]
|
||||
- type: code
|
||||
start: 0x163400
|
||||
vram: 0x80242BA0
|
||||
|
@ -17046,7 +17046,7 @@ gItemMenuTargetScrollPos = 0x802705D8; // type:data
|
||||
D_802705DC = 0x802705DC; // type:data
|
||||
gItemMenuLevel = 0x802705E0; // type:data
|
||||
gItemMenuCurrentTab = 0x802705E4; // type:data
|
||||
D_802705E8 = 0x802705E8; // type:data
|
||||
gItemIcons = 0x802705E8; // type:data
|
||||
D_80270634 = 0x80270634; // type:data
|
||||
D_80270640 = 0x80270640; // type:data
|
||||
D_80270660 = 0x80270660; // type:data
|
||||
|
@ -1712,7 +1712,7 @@ gItemMenuTargetScrollPos = 0x802705D8;
|
||||
D_802705DC = 0x802705DC;
|
||||
gItemMenuLevel = 0x802705E0;
|
||||
gItemMenuCurrentTab = 0x802705E4;
|
||||
D_802705E8 = 0x802705E8;
|
||||
gItemIcons = 0x802705E8;
|
||||
D_80270634 = 0x80270634;
|
||||
D_80270640 = 0x80270640;
|
||||
D_80270660 = 0x80270660;
|
||||
|
Loading…
Reference in New Issue
Block a user