From f94c542a9df21329a66da13f0310ee9bd07d681a Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Thu, 29 Oct 2020 22:15:51 -0400 Subject: [PATCH] Set80151310_0 --- .../dro_01/95B7E0/func_8024159C_95C79C.s | 8 ---- .../dro_02/9694C0/func_8024042C_9695EC.s | 8 ---- .../hos_03/A1BDB0/func_802425D0_A1D6D0.s | 8 ---- .../jan_02/B2C8A0/func_80241740_B2DBB0.s | 8 ---- .../jan_03/B34BD0/func_80241CC8_B36898.s | 8 ---- .../kmr_02/8B0070/func_802404BC_8B052C.s | 8 ---- .../mac_00/7EB340/func_8024075C_7EB46C.s | 8 ---- .../mac_01/800880/func_80240000_800880.s | 21 ----------- .../mac_01/800880/func_80240044_8008C4.s | 37 ------------------- .../mac_01/8017D0/func_8024203C_8028BC.s | 8 ---- .../mac_01/8017D0/func_80243AA0_804320.s | 6 --- .../mac_02/823BF0/func_802418EC_824BAC.s | 8 ---- .../mac_03/831B20/func_802405DC_831DDC.s | 8 ---- .../mac_04/843030/func_8024058C_84315C.s | 8 ---- .../mac_05/852170/func_8024144C_8535BC.s | 8 ---- .../nok_01/9C53E0/func_80240E94_9C6274.s | 8 ---- .../nok_02/9D7AA0/func_80241A3C_9D8A5C.s | 8 ---- .../sam_01/CF7E80/func_8024082C_CF839C.s | 8 ---- .../sam_02/D05F60/func_80240C58_D06388.s | 8 ---- .../sam_11/D3A930/func_80240554_D3AB24.s | 8 ---- .../sam_11/D3ADA0/func_802408FC_D3AECC.s | 8 ---- include/common_structs.h | 2 +- include/functions.h | 2 +- src/code_7E2AA0.c | 1 + src/code_b72b0_len_15ed0.c | 2 +- src/world/area_dro/dro_01/95B7E0.c | 2 +- src/world/area_dro/dro_02/9694C0.c | 2 +- src/world/area_hos/hos_03/A1BDB0.c | 2 +- src/world/area_jan/jan_02/B2C8A0.c | 2 +- src/world/area_jan/jan_03/B34BD0.c | 2 +- src/world/area_kmr/kmr_02/8B0070.c | 2 +- src/world/area_mac/mac_00/7EB340.c | 2 +- src/world/area_mac/mac_01/800880.c | 16 +++++++- src/world/area_mac/mac_01/8017D0.c | 6 ++- src/world/area_mac/mac_02/823BF0.c | 2 +- src/world/area_mac/mac_03/831B20.c | 2 +- src/world/area_mac/mac_04/843030.c | 2 +- src/world/area_mac/mac_05/852170.c | 2 +- src/world/area_nok/nok_01/9C53E0.c | 2 +- src/world/area_nok/nok_02/9D7AA0.c | 2 +- src/world/area_sam/sam_01/CF7E80.c | 2 +- src/world/area_sam/sam_02/D05F60.c | 2 +- src/world/area_sam/sam_11/D3A930.c | 2 +- src/world/area_sam/sam_11/D3ADA0.c | 2 +- src/world/common/Set80151310_0.inc.c | 6 +++ 45 files changed, 45 insertions(+), 232 deletions(-) delete mode 100644 asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_8024159C_95C79C.s delete mode 100644 asm/nonmatchings/world/area_dro/dro_02/9694C0/func_8024042C_9695EC.s delete mode 100644 asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802425D0_A1D6D0.s delete mode 100644 asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80241740_B2DBB0.s delete mode 100644 asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241CC8_B36898.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_802404BC_8B052C.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_00/7EB340/func_8024075C_7EB46C.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_01/800880/func_80240000_800880.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_01/800880/func_80240044_8008C4.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_01/8017D0/func_8024203C_8028BC.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80243AA0_804320.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_02/823BF0/func_802418EC_824BAC.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_03/831B20/func_802405DC_831DDC.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_04/843030/func_8024058C_84315C.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_05/852170/func_8024144C_8535BC.s delete mode 100644 asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240E94_9C6274.s delete mode 100644 asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_80241A3C_9D8A5C.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_8024082C_CF839C.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240C58_D06388.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_11/D3A930/func_80240554_D3AB24.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_802408FC_D3AECC.s create mode 100644 src/world/common/Set80151310_0.inc.c diff --git a/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_8024159C_95C79C.s b/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_8024159C_95C79C.s deleted file mode 100644 index a09e694f23..0000000000 --- a/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_8024159C_95C79C.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024159C_95C79C -/* 95C79C 8024159C 3C018015 */ lui $at, %hi(D_80151310) -/* 95C7A0 802415A0 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* 95C7A4 802415A4 03E00008 */ jr $ra -/* 95C7A8 802415A8 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_8024042C_9695EC.s b/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_8024042C_9695EC.s deleted file mode 100644 index 67a3458f14..0000000000 --- a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_8024042C_9695EC.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024042C_9695EC -/* 9695EC 8024042C 3C018015 */ lui $at, %hi(D_80151310) -/* 9695F0 80240430 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* 9695F4 80240434 03E00008 */ jr $ra -/* 9695F8 80240438 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802425D0_A1D6D0.s b/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802425D0_A1D6D0.s deleted file mode 100644 index 67421acd62..0000000000 --- a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802425D0_A1D6D0.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802425D0_A1D6D0 -/* A1D6D0 802425D0 3C018015 */ lui $at, %hi(D_80151310) -/* A1D6D4 802425D4 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* A1D6D8 802425D8 03E00008 */ jr $ra -/* A1D6DC 802425DC 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80241740_B2DBB0.s b/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80241740_B2DBB0.s deleted file mode 100644 index 25e083dfc7..0000000000 --- a/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80241740_B2DBB0.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241740_B2DBB0 -/* B2DBB0 80241740 3C018015 */ lui $at, %hi(D_80151310) -/* B2DBB4 80241744 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* B2DBB8 80241748 03E00008 */ jr $ra -/* B2DBBC 8024174C 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241CC8_B36898.s b/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241CC8_B36898.s deleted file mode 100644 index 4d608bced3..0000000000 --- a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241CC8_B36898.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241CC8_B36898 -/* B36898 80241CC8 3C018015 */ lui $at, %hi(D_80151310) -/* B3689C 80241CCC AC201310 */ sw $zero, %lo(D_80151310)($at) -/* B368A0 80241CD0 03E00008 */ jr $ra -/* B368A4 80241CD4 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_802404BC_8B052C.s b/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_802404BC_8B052C.s deleted file mode 100644 index 1d8f1385f5..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_802404BC_8B052C.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802404BC_8B052C -/* 8B052C 802404BC 3C018015 */ lui $at, %hi(D_80151310) -/* 8B0530 802404C0 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* 8B0534 802404C4 03E00008 */ jr $ra -/* 8B0538 802404C8 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_8024075C_7EB46C.s b/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_8024075C_7EB46C.s deleted file mode 100644 index ab1858da37..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_8024075C_7EB46C.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024075C_7EB46C -/* 7EB46C 8024075C 3C018015 */ lui $at, %hi(D_80151310) -/* 7EB470 80240760 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* 7EB474 80240764 03E00008 */ jr $ra -/* 7EB478 80240768 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_mac/mac_01/800880/func_80240000_800880.s b/asm/nonmatchings/world/area_mac/mac_01/800880/func_80240000_800880.s deleted file mode 100644 index 00ed9945be..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_01/800880/func_80240000_800880.s +++ /dev/null @@ -1,21 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240000_800880 -/* 800880 80240000 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 800884 80240004 AFBF0010 */ sw $ra, 0x10($sp) -/* 800888 80240008 8C82000C */ lw $v0, 0xc($a0) -/* 80088C 8024000C 0C0B1EAF */ jal get_variable -/* 800890 80240010 8C450000 */ lw $a1, ($v0) -/* 800894 80240014 3C038007 */ lui $v1, %hi(gGameStatusPtr) -/* 800898 80240018 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) -/* 80089C 8024001C 8C630140 */ lw $v1, 0x140($v1) -/* 8008A0 80240020 00021100 */ sll $v0, $v0, 4 -/* 8008A4 80240024 00431021 */ addu $v0, $v0, $v1 -/* 8008A8 80240028 8C440000 */ lw $a0, ($v0) -/* 8008AC 8024002C 0C04D052 */ jal set_item_entity_flags -/* 8008B0 80240030 24050040 */ addiu $a1, $zero, 0x40 -/* 8008B4 80240034 8FBF0010 */ lw $ra, 0x10($sp) -/* 8008B8 80240038 24020002 */ addiu $v0, $zero, 2 -/* 8008BC 8024003C 03E00008 */ jr $ra -/* 8008C0 80240040 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_mac/mac_01/800880/func_80240044_8008C4.s b/asm/nonmatchings/world/area_mac/mac_01/800880/func_80240044_8008C4.s deleted file mode 100644 index feadb69b5c..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_01/800880/func_80240044_8008C4.s +++ /dev/null @@ -1,37 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240044_8008C4 -/* 8008C4 80240044 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 8008C8 80240048 AFBF0018 */ sw $ra, 0x18($sp) -/* 8008CC 8024004C AFB10014 */ sw $s1, 0x14($sp) -/* 8008D0 80240050 AFB00010 */ sw $s0, 0x10($sp) -/* 8008D4 80240054 8C82000C */ lw $v0, 0xc($a0) -/* 8008D8 80240058 0C0B1EAF */ jal get_variable -/* 8008DC 8024005C 8C450000 */ lw $a1, ($v0) -/* 8008E0 80240060 0000202D */ daddu $a0, $zero, $zero -/* 8008E4 80240064 3C05FD05 */ lui $a1, 0xfd05 -/* 8008E8 80240068 34A50F82 */ ori $a1, $a1, 0xf82 -/* 8008EC 8024006C 0C0B1EAF */ jal get_variable -/* 8008F0 80240070 0040802D */ daddu $s0, $v0, $zero -/* 8008F4 80240074 3C038007 */ lui $v1, %hi(gGameStatusPtr) -/* 8008F8 80240078 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) -/* 8008FC 8024007C 24050040 */ addiu $a1, $zero, 0x40 -/* 800900 80240080 8C640140 */ lw $a0, 0x140($v1) -/* 800904 80240084 00101900 */ sll $v1, $s0, 4 -/* 800908 80240088 00641821 */ addu $v1, $v1, $a0 -/* 80090C 8024008C 8C640000 */ lw $a0, ($v1) -/* 800910 80240090 0C04D052 */ jal set_item_entity_flags -/* 800914 80240094 0040882D */ daddu $s1, $v0, $zero -/* 800918 80240098 0000202D */ daddu $a0, $zero, $zero -/* 80091C 8024009C 00108080 */ sll $s0, $s0, 2 -/* 800920 802400A0 02118021 */ addu $s0, $s0, $s1 -/* 800924 802400A4 8E050000 */ lw $a1, ($s0) -/* 800928 802400A8 0C0B2026 */ jal set_variable -/* 80092C 802400AC 24060001 */ addiu $a2, $zero, 1 -/* 800930 802400B0 8FBF0018 */ lw $ra, 0x18($sp) -/* 800934 802400B4 8FB10014 */ lw $s1, 0x14($sp) -/* 800938 802400B8 8FB00010 */ lw $s0, 0x10($sp) -/* 80093C 802400BC 24020002 */ addiu $v0, $zero, 2 -/* 800940 802400C0 03E00008 */ jr $ra -/* 800944 802400C4 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_8024203C_8028BC.s b/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_8024203C_8028BC.s deleted file mode 100644 index d88bf7c134..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_8024203C_8028BC.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024203C_8028BC -/* 8028BC 8024203C 3C018015 */ lui $at, %hi(D_80151310) -/* 8028C0 80242040 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* 8028C4 80242044 03E00008 */ jr $ra -/* 8028C8 80242048 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80243AA0_804320.s b/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80243AA0_804320.s deleted file mode 100644 index 6db024c51e..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80243AA0_804320.s +++ /dev/null @@ -1,6 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80243AA0_804320 -/* 804320 80243AA0 03E00008 */ jr $ra -/* 804324 80243AA4 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_802418EC_824BAC.s b/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_802418EC_824BAC.s deleted file mode 100644 index f5aeb9f695..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_802418EC_824BAC.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802418EC_824BAC -/* 824BAC 802418EC 3C018015 */ lui $at, %hi(D_80151310) -/* 824BB0 802418F0 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* 824BB4 802418F4 03E00008 */ jr $ra -/* 824BB8 802418F8 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_mac/mac_03/831B20/func_802405DC_831DDC.s b/asm/nonmatchings/world/area_mac/mac_03/831B20/func_802405DC_831DDC.s deleted file mode 100644 index e57f03e92f..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_03/831B20/func_802405DC_831DDC.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802405DC_831DDC -/* 831DDC 802405DC 3C018015 */ lui $at, %hi(D_80151310) -/* 831DE0 802405E0 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* 831DE4 802405E4 03E00008 */ jr $ra -/* 831DE8 802405E8 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_mac/mac_04/843030/func_8024058C_84315C.s b/asm/nonmatchings/world/area_mac/mac_04/843030/func_8024058C_84315C.s deleted file mode 100644 index 4a79b1c634..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_04/843030/func_8024058C_84315C.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024058C_84315C -/* 84315C 8024058C 3C018015 */ lui $at, %hi(D_80151310) -/* 843160 80240590 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* 843164 80240594 03E00008 */ jr $ra -/* 843168 80240598 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_mac/mac_05/852170/func_8024144C_8535BC.s b/asm/nonmatchings/world/area_mac/mac_05/852170/func_8024144C_8535BC.s deleted file mode 100644 index fb3ec316b1..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_05/852170/func_8024144C_8535BC.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024144C_8535BC -/* 8535BC 8024144C 3C018015 */ lui $at, %hi(D_80151310) -/* 8535C0 80241450 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* 8535C4 80241454 03E00008 */ jr $ra -/* 8535C8 80241458 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240E94_9C6274.s b/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240E94_9C6274.s deleted file mode 100644 index 1c38b3a255..0000000000 --- a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240E94_9C6274.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240E94_9C6274 -/* 9C6274 80240E94 3C018015 */ lui $at, %hi(D_80151310) -/* 9C6278 80240E98 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* 9C627C 80240E9C 03E00008 */ jr $ra -/* 9C6280 80240EA0 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_80241A3C_9D8A5C.s b/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_80241A3C_9D8A5C.s deleted file mode 100644 index 37af635b84..0000000000 --- a/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_80241A3C_9D8A5C.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241A3C_9D8A5C -/* 9D8A5C 80241A3C 3C018015 */ lui $at, %hi(D_80151310) -/* 9D8A60 80241A40 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* 9D8A64 80241A44 03E00008 */ jr $ra -/* 9D8A68 80241A48 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_8024082C_CF839C.s b/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_8024082C_CF839C.s deleted file mode 100644 index 3aa0d280ba..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_8024082C_CF839C.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024082C_CF839C -/* CF839C 8024082C 3C018015 */ lui $at, %hi(D_80151310) -/* CF83A0 80240830 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* CF83A4 80240834 03E00008 */ jr $ra -/* CF83A8 80240838 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240C58_D06388.s b/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240C58_D06388.s deleted file mode 100644 index 478c4497ba..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240C58_D06388.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240C58_D06388 -/* D06388 80240C58 3C018015 */ lui $at, %hi(D_80151310) -/* D0638C 80240C5C AC201310 */ sw $zero, %lo(D_80151310)($at) -/* D06390 80240C60 03E00008 */ jr $ra -/* D06394 80240C64 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_sam/sam_11/D3A930/func_80240554_D3AB24.s b/asm/nonmatchings/world/area_sam/sam_11/D3A930/func_80240554_D3AB24.s deleted file mode 100644 index 8fb3711d85..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_11/D3A930/func_80240554_D3AB24.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240554_D3AB24 -/* D3AB24 80240554 3C018015 */ lui $at, %hi(D_80151310) -/* D3AB28 80240558 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* D3AB2C 8024055C 03E00008 */ jr $ra -/* D3AB30 80240560 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_802408FC_D3AECC.s b/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_802408FC_D3AECC.s deleted file mode 100644 index 602720afe0..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_802408FC_D3AECC.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802408FC_D3AECC -/* D3AECC 802408FC 3C018015 */ lui $at, %hi(D_80151310) -/* D3AED0 80240900 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* D3AED4 80240904 03E00008 */ jr $ra -/* D3AED8 80240908 24020002 */ addiu $v0, $zero, 2 diff --git a/include/common_structs.h b/include/common_structs.h index c2c2be9b11..a10f482c20 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -916,7 +916,7 @@ typedef struct GameStatus { /* 0x136 */ char unk_136[2]; /* 0x138 */ s32 nextRNG; /* 0x13C */ char unk_13C[4]; - /* 0x140 */ UNK_PTR shopItemData; + /* 0x140 */ s32* shopItemData; /* 0x144 */ struct Shop* mapShop; /* 0x148 */ s16 enableBackground; /* (bit 2 is also used for something) */ /* 0x14A */ s16 backgroundMinW; diff --git a/include/functions.h b/include/functions.h index c4333481bb..0b63c6b884 100644 --- a/include/functions.h +++ b/include/functions.h @@ -97,7 +97,7 @@ void make_item_entity_delayed(s32 itemID, f32 x, f32 y, f32 z, s32 unk1, s32 unk void set_item_entity_position(s32 itemEntityIndex, f32 x, f32 y, f32 z); ItemEntity* get_item_entity(s32 itemEntityIndex); s32 make_item_entity_nodelay(s32 itemID, f32 x, f32 y, f32 z, ItemSpawnMode itemSpawnMode, s32 pickupVar); - +void set_item_entity_flags(s32 itemEntityIndex, s32 flag); void set_cam_viewport(s16 id, s16 x, s16 y, s16 width, s16 height); diff --git a/src/code_7E2AA0.c b/src/code_7E2AA0.c index 7b711c0be3..339305f3b6 100644 --- a/src/code_7E2AA0.c +++ b/src/code_7E2AA0.c @@ -96,6 +96,7 @@ ApiStatus func_80282610(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } +// common probably ApiStatus func_80282624(ScriptInstance* script, s32 isInitialCall) { D_80151310 = 0; return ApiStatus_DONE2; diff --git a/src/code_b72b0_len_15ed0.c b/src/code_b72b0_len_15ed0.c index 035599feaf..32148743d3 100644 --- a/src/code_b72b0_len_15ed0.c +++ b/src/code_b72b0_len_15ed0.c @@ -232,7 +232,7 @@ INCLUDE_ASM(s32, "code_b72b0_len_15ed0", test_item_player_collision); INCLUDE_ASM(s32, "code_b72b0_len_15ed0", func_80133FC8); -INCLUDE_ASM(s32, "code_b72b0_len_15ed0", set_item_entity_flags); +INCLUDE_ASM(void, "code_b72b0_len_15ed0", set_item_entity_flags, s32 itemEntityIndex, s32 flag); INCLUDE_ASM(s32, "code_b72b0_len_15ed0", clear_item_entity_flags); diff --git a/src/world/area_dro/dro_01/95B7E0.c b/src/world/area_dro/dro_01/95B7E0.c index 5a3ae9fb82..07cc068199 100644 --- a/src/world/area_dro/dro_01/95B7E0.c +++ b/src/world/area_dro/dro_01/95B7E0.c @@ -30,7 +30,7 @@ INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_80241470_95C670); INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_80241588_95C788); -INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_8024159C_95C79C); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_802415AC_95C7AC); diff --git a/src/world/area_dro/dro_02/9694C0.c b/src/world/area_dro/dro_02/9694C0.c index 29d999086e..f1b83904dc 100644 --- a/src/world/area_dro/dro_02/9694C0.c +++ b/src/world/area_dro/dro_02/9694C0.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80240300_9694C0); INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80240418_9695D8); -INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_8024042C_9695EC); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_8024043C_9695FC); diff --git a/src/world/area_hos/hos_03/A1BDB0.c b/src/world/area_hos/hos_03/A1BDB0.c index 3b7df30ad8..7cb60e96ea 100644 --- a/src/world/area_hos/hos_03/A1BDB0.c +++ b/src/world/area_hos/hos_03/A1BDB0.c @@ -52,7 +52,7 @@ INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802424A4_A1D5A4); INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802425BC_A1D6BC); -INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802425D0_A1D6D0); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802425E0_A1D6E0); diff --git a/src/world/area_jan/jan_02/B2C8A0.c b/src/world/area_jan/jan_02/B2C8A0.c index 6463b1417d..5e4e1bdb84 100644 --- a/src/world/area_jan/jan_02/B2C8A0.c +++ b/src/world/area_jan/jan_02/B2C8A0.c @@ -40,7 +40,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80241614_B2DA84); INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_8024172C_B2DB9C); -INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80241740_B2DBB0); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80241750_B2DBC0); diff --git a/src/world/area_jan/jan_03/B34BD0.c b/src/world/area_jan/jan_03/B34BD0.c index 57041180db..24c7350a8c 100644 --- a/src/world/area_jan/jan_03/B34BD0.c +++ b/src/world/area_jan/jan_03/B34BD0.c @@ -84,7 +84,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241B9C_B3676C); INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241CB4_B36884); -INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241CC8_B36898); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241CD8_B368A8); diff --git a/src/world/area_kmr/kmr_02/8B0070.c b/src/world/area_kmr/kmr_02/8B0070.c index 9d942f4147..5a9849bd69 100644 --- a/src/world/area_kmr/kmr_02/8B0070.c +++ b/src/world/area_kmr/kmr_02/8B0070.c @@ -22,7 +22,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80240390_8B0400); INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_802404A8_8B0518); -INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_802404BC_8B052C); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_802404CC_8B053C); diff --git a/src/world/area_mac/mac_00/7EB340.c b/src/world/area_mac/mac_00/7EB340.c index 8417e2cb9a..658037b61e 100644 --- a/src/world/area_mac/mac_00/7EB340.c +++ b/src/world/area_mac/mac_00/7EB340.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80240630_7EB340); INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80240748_7EB458); -INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_8024075C_7EB46C); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_8024076C_7EB47C); diff --git a/src/world/area_mac/mac_01/800880.c b/src/world/area_mac/mac_01/800880.c index 775a7760db..308033f505 100644 --- a/src/world/area_mac/mac_01/800880.c +++ b/src/world/area_mac/mac_01/800880.c @@ -1,7 +1,19 @@ #include "mac_01.h" -INCLUDE_ASM(s32, "world/area_mac/mac_01/800880", func_80240000_800880); +ApiStatus func_80240000_800880(ScriptInstance* script, s32 isInitialCall) { + s32 itemIndex = get_variable(script, *script->ptrReadPos); -INCLUDE_ASM(s32, "world/area_mac/mac_01/800880", func_80240044_8008C4); + set_item_entity_flags(GAME_STATUS->shopItemData[itemIndex * 4], 0x40); + return ApiStatus_DONE2; +} + +ApiStatus func_80240044_8008C4(ScriptInstance* script, s32 isInitialCall) { + s32 itemIndex = get_variable(script, *script->ptrReadPos); + s32* var1 = get_variable(NULL, SI_MAP_VAR(2)); + + set_item_entity_flags(GAME_STATUS->shopItemData[itemIndex * 4], 0x40); + set_variable(NULL, var1[itemIndex], 1); + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "world/area_mac/mac_01/800880", func_802400C8_800948); diff --git a/src/world/area_mac/mac_01/8017D0.c b/src/world/area_mac/mac_01/8017D0.c index 5505145b5f..0e381f6894 100644 --- a/src/world/area_mac/mac_01/8017D0.c +++ b/src/world/area_mac/mac_01/8017D0.c @@ -32,7 +32,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80241F10_802790); INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242028_8028A8); -INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_8024203C_8028BC); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_8024204C_8028CC); @@ -116,7 +116,9 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80243A3C_8042BC); INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80243A70_8042F0); -INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80243AA0_804320); +ApiStatus func_80243AA0_804320(ScriptInstance* script, s32 isInitialCall) { + return ApiStatus_DONE2; +} #include "world/common/GetNpcCollisionHeight.inc.c" diff --git a/src/world/area_mac/mac_02/823BF0.c b/src/world/area_mac/mac_02/823BF0.c index 21d7a537f0..ff42fb2076 100644 --- a/src/world/area_mac/mac_02/823BF0.c +++ b/src/world/area_mac/mac_02/823BF0.c @@ -30,7 +30,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802417C0_824A80); INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802418D8_824B98); -INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802418EC_824BAC); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802418FC_824BBC); diff --git a/src/world/area_mac/mac_03/831B20.c b/src/world/area_mac/mac_03/831B20.c index 9091489de7..7f58c90beb 100644 --- a/src/world/area_mac/mac_03/831B20.c +++ b/src/world/area_mac/mac_03/831B20.c @@ -8,7 +8,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_802404B0_831CB0); INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_802405C8_831DC8); -INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_802405DC_831DDC); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_802405EC_831DEC); diff --git a/src/world/area_mac/mac_04/843030.c b/src/world/area_mac/mac_04/843030.c index a2a0da5d38..bedafef124 100644 --- a/src/world/area_mac/mac_04/843030.c +++ b/src/world/area_mac/mac_04/843030.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80240460_843030); INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80240578_843148); -INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_8024058C_84315C); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_8024059C_84316C); diff --git a/src/world/area_mac/mac_05/852170.c b/src/world/area_mac/mac_05/852170.c index f6ae4a2a04..e9436ae700 100644 --- a/src/world/area_mac/mac_05/852170.c +++ b/src/world/area_mac/mac_05/852170.c @@ -38,7 +38,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80241320_853490); INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80241438_8535A8); -INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_8024144C_8535BC); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_8024145C_8535CC); diff --git a/src/world/area_nok/nok_01/9C53E0.c b/src/world/area_nok/nok_01/9C53E0.c index 3b6c77494e..da63e5ea1b 100644 --- a/src/world/area_nok/nok_01/9C53E0.c +++ b/src/world/area_nok/nok_01/9C53E0.c @@ -50,7 +50,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", delete_player_actor_9C6148); INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240E80_9C6260); -INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240E94_9C6274); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240EA4_9C6284); diff --git a/src/world/area_nok/nok_02/9D7AA0.c b/src/world/area_nok/nok_02/9D7AA0.c index ca0701e2b8..dd4613d90e 100644 --- a/src/world/area_nok/nok_02/9D7AA0.c +++ b/src/world/area_nok/nok_02/9D7AA0.c @@ -30,7 +30,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80241910_9D8930); INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80241A28_9D8A48); -INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80241A3C_9D8A5C); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80241A4C_9D8A6C); diff --git a/src/world/area_sam/sam_01/CF7E80.c b/src/world/area_sam/sam_01/CF7E80.c index 7f842bc9bd..78f0cd4ac7 100644 --- a/src/world/area_sam/sam_01/CF7E80.c +++ b/src/world/area_sam/sam_01/CF7E80.c @@ -18,7 +18,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80240700_CF8270); INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80240818_CF8388); -INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_8024082C_CF839C); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_8024083C_CF83AC); diff --git a/src/world/area_sam/sam_02/D05F60.c b/src/world/area_sam/sam_02/D05F60.c index 929ed9196e..8ddd53f427 100644 --- a/src/world/area_sam/sam_02/D05F60.c +++ b/src/world/area_sam/sam_02/D05F60.c @@ -30,7 +30,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240B2C_D0625C); INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240C44_D06374); -INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240C58_D06388); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240C68_D06398); diff --git a/src/world/area_sam/sam_11/D3A930.c b/src/world/area_sam/sam_11/D3A930.c index 2f47758e38..9496af1550 100644 --- a/src/world/area_sam/sam_11/D3A930.c +++ b/src/world/area_sam/sam_11/D3A930.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_11/D3A930", func_8024052C_D3AAFC); INCLUDE_ASM(s32, "world/area_sam/sam_11/D3A930", func_80240540_D3AB10); -INCLUDE_ASM(s32, "world/area_sam/sam_11/D3A930", func_80240554_D3AB24); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_11/D3A930", func_80240564_D3AB34); diff --git a/src/world/area_sam/sam_11/D3ADA0.c b/src/world/area_sam/sam_11/D3ADA0.c index 93d62f51de..2367a47ff8 100644 --- a/src/world/area_sam/sam_11/D3ADA0.c +++ b/src/world/area_sam/sam_11/D3ADA0.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_802407D0_D3ADA0); INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_802408E8_D3AEB8); -INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_802408FC_D3AECC); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_8024090C_D3AEDC); diff --git a/src/world/common/Set80151310_0.inc.c b/src/world/common/Set80151310_0.inc.c new file mode 100644 index 0000000000..953e1f4232 --- /dev/null +++ b/src/world/common/Set80151310_0.inc.c @@ -0,0 +1,6 @@ +#include "common.h" + +static ApiStatus Set80151310_0(ScriptInstance* script, s32 isInitialCall) { + D_80151310 = 0; + return ApiStatus_DONE2; +}