Matched func_802419F0_ECB6F0 in ECAA80.c (#770)

This commit is contained in:
cfillak 2022-09-12 12:27:56 -05:00 committed by GitHub
parent 70d3b7b3a8
commit 3e91a3fd53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 22 additions and 42 deletions

View File

@ -9,6 +9,8 @@
extern s32 N(ItemChoiceList)[];
extern s32 N(FlowerGuard_ItemChoiceList)[91];
extern s32 ECAA80_ItemChoice_HasSelectedItem;
extern s32 ECAA80_ItemChoice_SelectedItemID;
void ECAA80_UnkFloAI_Chase(Evt* script, MobileAISettings* aiSettings, EnemyDetectVolume* territory);
@ -25,7 +27,14 @@ void ECAA80_UnkFloAI_Chase(Evt* script, MobileAISettings* aiSettings, EnemyDetec
INCLUDE_ASM(s32, "ECAA80", func_8024199C_ECB69C);
// ECAA80_ItemChoice_SaveSelected (needs data?)
INCLUDE_ASM(s32, "ECAA80", func_802419F0_ECB6F0);
ApiStatus ECAA80_ItemChoice_SaveSelected(Evt *script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
ECAA80_ItemChoice_SelectedItemID = dead_evt_get_variable(script, *args++);
ECAA80_ItemChoice_HasSelectedItem = 1;
return ApiStatus_DONE2;
}
#include "world/common/atomic/MakeConsumableChoice.inc.c"

View File

@ -7,6 +7,8 @@
#define NAMESPACE EE70C0
extern const s32 D_802453E0_EEB990[];
extern s32 D_8024462C_EEABDC;
extern s32 D_80244630_EEABE0;
#include "world/common/enemy/FlyingAI.inc.c"
@ -16,7 +18,12 @@ extern const s32 D_802453E0_EEB990[];
INCLUDE_ASM(s32, "EE70C0", func_80242260_EE8810);
INCLUDE_ASM(s32, "EE70C0", func_802422B4_EE8864);
ApiStatus EE70C0_ItemChoice_SaveSelected(Evt *script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
D_80244630_EEABE0 = dead_evt_get_variable(script, *args++);
D_8024462C_EEABDC = 1;
return ApiStatus_DONE2;
}
ApiStatus func_802422EC_EE889C(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;

View File

@ -78,7 +78,7 @@ dlabel ECAA80_ItemChoice_SelectedItemID
.word 0x00000000
dlabel D_802430C0_ECCDC0
.word 0x00000024, 0x00000002, 0xFE363C89, 0xFE363C81, 0x00000043, 0x00000001, 0x802E3C8C, 0x00000024, 0x00000002, 0xFE363C8A, 0xFE363C80, 0x00000014, 0x00000001, 0xFE363C80, 0x00000016, 0x00000001, 0x00000000, 0x00000016, 0x00000001, 0xFFFFFFFF, 0x0000001C, 0x00000000, 0x00000043, 0x00000002, 0x802E3EDC, 0xFE363C81, 0x00000043, 0x00000004, 0x802DF41C, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000043, 0x00000004, ECAA80_AddPlayerHandsOffset, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000043, 0x00000007, 0x802E4310, 0xFE363C80, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000001, 0x00000000, 0x00000043, 0x00000002, 0x802DE6A4, 0x00060005, 0x00000008, 0x00000001, 0x0000001E, 0x00000043, 0x00000002, 0x802DE6A4, 0x00010002, 0x00000043, 0x00000002, 0x802E461C, 0xFE363C80, 0x00000023, 0x00000000, 0x00000043, 0x00000002, func_802419F0_ECB6F0, 0xFE363C8A, 0x00000043, 0x00000001, 0x802E3FA4, 0x00000048, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000
.word 0x00000024, 0x00000002, 0xFE363C89, 0xFE363C81, 0x00000043, 0x00000001, 0x802E3C8C, 0x00000024, 0x00000002, 0xFE363C8A, 0xFE363C80, 0x00000014, 0x00000001, 0xFE363C80, 0x00000016, 0x00000001, 0x00000000, 0x00000016, 0x00000001, 0xFFFFFFFF, 0x0000001C, 0x00000000, 0x00000043, 0x00000002, 0x802E3EDC, 0xFE363C81, 0x00000043, 0x00000004, 0x802DF41C, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000043, 0x00000004, ECAA80_AddPlayerHandsOffset, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000043, 0x00000007, 0x802E4310, 0xFE363C80, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000001, 0x00000000, 0x00000043, 0x00000002, 0x802DE6A4, 0x00060005, 0x00000008, 0x00000001, 0x0000001E, 0x00000043, 0x00000002, 0x802DE6A4, 0x00010002, 0x00000043, 0x00000002, 0x802E461C, 0xFE363C80, 0x00000023, 0x00000000, 0x00000043, 0x00000002, ECAA80_ItemChoice_SaveSelected, 0xFE363C8A, 0x00000043, 0x00000001, 0x802E3FA4, 0x00000048, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000
dlabel D_802431F4_ECCEF4
.word 0x00000043, 0x00000002, ECAA80_BuildItemChoiceList, 0xFE363C80, 0x0000004E, 0x00000006, D_802430C0_ECCDC0, 0x00000010, 0x00000000, ECAA80_ItemChoiceList, 0x00000000, 0x00000001, 0x00000043, 0x00000002, func_8024199C_ECB69C, 0xFE363C80, 0x00000002, 0x00000000, 0x00000001, 0x00000000

View File

@ -87,7 +87,7 @@ dlabel D_80244630_EEABE0
.word 0x00000000
dlabel D_80244634_EEABE4
.word 0x00000024, 0x00000002, 0xFE363C89, 0xFE363C81, 0x00000043, 0x00000001, 0x802E3C8C, 0x00000024, 0x00000002, 0xFE363C8A, 0xFE363C80, 0x00000014, 0x00000001, 0xFE363C80, 0x00000016, 0x00000001, 0x00000000, 0x00000016, 0x00000001, 0xFFFFFFFF, 0x0000001C, 0x00000000, 0x00000043, 0x00000002, 0x802E3EDC, 0xFE363C81, 0x00000043, 0x00000004, 0x802DF41C, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000043, 0x00000004, EE70C0_AddPlayerHandsOffset, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000043, 0x00000007, 0x802E4310, 0xFE363C80, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000001, 0x00000000, 0x00000043, 0x00000002, 0x802DE6A4, 0x00060005, 0x00000008, 0x00000001, 0x0000001E, 0x00000043, 0x00000002, 0x802DE6A4, 0x00010002, 0x00000043, 0x00000002, 0x802E461C, 0xFE363C80, 0x00000023, 0x00000000, 0x00000043, 0x00000002, func_802422B4_EE8864, 0xFE363C8A, 0x00000043, 0x00000001, 0x802E3FA4, 0x00000048, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000
.word 0x00000024, 0x00000002, 0xFE363C89, 0xFE363C81, 0x00000043, 0x00000001, 0x802E3C8C, 0x00000024, 0x00000002, 0xFE363C8A, 0xFE363C80, 0x00000014, 0x00000001, 0xFE363C80, 0x00000016, 0x00000001, 0x00000000, 0x00000016, 0x00000001, 0xFFFFFFFF, 0x0000001C, 0x00000000, 0x00000043, 0x00000002, 0x802E3EDC, 0xFE363C81, 0x00000043, 0x00000004, 0x802DF41C, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000043, 0x00000004, EE70C0_AddPlayerHandsOffset, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000043, 0x00000007, 0x802E4310, 0xFE363C80, 0xFE363C83, 0xFE363C84, 0xFE363C85, 0x00000001, 0x00000000, 0x00000043, 0x00000002, 0x802DE6A4, 0x00060005, 0x00000008, 0x00000001, 0x0000001E, 0x00000043, 0x00000002, 0x802DE6A4, 0x00010002, 0x00000043, 0x00000002, 0x802E461C, 0xFE363C80, 0x00000023, 0x00000000, 0x00000043, 0x00000002, EE70C0_ItemChoice_SaveSelected, 0xFE363C8A, 0x00000043, 0x00000001, 0x802E3FA4, 0x00000048, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000
dlabel D_80244768_EEAD18
.word 0x00000043, 0x00000002, func_802422EC_EE889C, 0xFE363C80, 0x0000004E, 0x00000006, D_80244634_EEABE4, 0x00000010, 0x00000000, D_802453E0_EEB990, 0x00000000, 0x00000001, 0x00000043, 0x00000002, func_80242260_EE8810, 0xFE363C80, 0x00000002, 0x00000000, 0x00000001, 0x00000000

View File

@ -1,18 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_802419F0_ECB6F0
/* ECB6F0 802419F0 27BDFFE8 */ addiu $sp, $sp, -0x18
/* ECB6F4 802419F4 AFBF0010 */ sw $ra, 0x10($sp)
/* ECB6F8 802419F8 8C82000C */ lw $v0, 0xc($a0)
/* ECB6FC 802419FC 0C0B53A3 */ jal dead_evt_get_variable
/* ECB700 80241A00 8C450000 */ lw $a1, ($v0)
/* ECB704 80241A04 3C018024 */ lui $at, %hi(ECAA80_ItemChoice_SelectedItemID)
/* ECB708 80241A08 AC2230BC */ sw $v0, %lo(ECAA80_ItemChoice_SelectedItemID)($at)
/* ECB70C 80241A0C 24020002 */ addiu $v0, $zero, 2
/* ECB710 80241A10 8FBF0010 */ lw $ra, 0x10($sp)
/* ECB714 80241A14 24030001 */ addiu $v1, $zero, 1
/* ECB718 80241A18 3C018024 */ lui $at, %hi(ECAA80_ItemChoice_HasSelectedItem)
/* ECB71C 80241A1C AC2330B8 */ sw $v1, %lo(ECAA80_ItemChoice_HasSelectedItem)($at)
/* ECB720 80241A20 03E00008 */ jr $ra
/* ECB724 80241A24 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,18 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_802422B4_EE8864
/* EE8864 802422B4 27BDFFE8 */ addiu $sp, $sp, -0x18
/* EE8868 802422B8 AFBF0010 */ sw $ra, 0x10($sp)
/* EE886C 802422BC 8C82000C */ lw $v0, 0xc($a0)
/* EE8870 802422C0 0C0B53A3 */ jal dead_evt_get_variable
/* EE8874 802422C4 8C450000 */ lw $a1, ($v0)
/* EE8878 802422C8 3C018024 */ lui $at, %hi(D_80244630_EEABE0)
/* EE887C 802422CC AC224630 */ sw $v0, %lo(D_80244630_EEABE0)($at)
/* EE8880 802422D0 24020002 */ addiu $v0, $zero, 2
/* EE8884 802422D4 8FBF0010 */ lw $ra, 0x10($sp)
/* EE8888 802422D8 24030001 */ addiu $v1, $zero, 1
/* EE888C 802422DC 3C018024 */ lui $at, %hi(D_8024462C_EEABDC)
/* EE8890 802422E0 AC23462C */ sw $v1, %lo(D_8024462C_EEABDC)($at)
/* EE8894 802422E4 03E00008 */ jr $ra
/* EE8898 802422E8 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -25460,7 +25460,7 @@ ECAA80_UnkFloAI_Main = 0x8024150C; // type:func rom:0xECB20C
ECAA80_GetNpcCollisionHeight = 0x80241770; // type:func rom:0xECB470
ECAA80_AddPlayerHandsOffset = 0x802417CC; // type:func rom:0xECB4CC
func_8024199C_ECB69C = 0x8024199C; // type:func rom:0xECB69C
func_802419F0_ECB6F0 = 0x802419F0; // type:func rom:0xECB6F0
ECAA80_ItemChoice_SaveSelected = 0x802419F0; // type:func rom:0xECB6F0
ECAA80_BuildItemChoiceList = 0x80241A28; // type:func rom:0xECB728
ECAA80_FlowerGuard_SetItemEntityPosition = 0x80241AC4; // type:func rom:0xECB7C4
ECAA80_FlowerGuard_JudgeItemTastiness = 0x80241B88; // type:func rom:0xECB888
@ -25587,7 +25587,7 @@ EE70C0_FlyingAI_Main = 0x80241E1C; // type:func rom:0xEE83CC
EE70C0_GetNpcCollisionHeight = 0x80242034; // type:func rom:0xEE85E4
EE70C0_AddPlayerHandsOffset = 0x80242090; // type:func rom:0xEE8640
func_80242260_EE8810 = 0x80242260; // type:func rom:0xEE8810
func_802422B4_EE8864 = 0x802422B4; // type:func rom:0xEE8864
EE70C0_ItemChoice_SaveSelected = 0x802422B4; // type:func rom:0xEE8864
func_802422EC_EE889C = 0x802422EC; // type:func rom:0xEE889C
func_80242390_EE8940 = 0x80242390; // type:func rom:0xEE8940
D_802431FC_EE97AC = 0x802431FC; // type:data rom:0xEE97AC