Decomp misc funcs (#546)

* decomp misc funcs

* cleanup on MakeShop and initial work on ShowShopOwnerDialog

* match ShowShopOwnerDialog

* decomp misc funcs

* cleanup on MakeShop and initial work on ShowShopOwnerDialog

* match ShowShopOwnerDialog

* resolve issues

* resolve warnings

* Update src/world/script_api/7E0E80.c

Co-authored-by: Alex Bates <hi@imalex.xyz>

Co-authored-by: Alex Bates <hi@imalex.xyz>
This commit is contained in:
Alexander Faßbender 2021-12-15 20:12:43 +01:00 committed by GitHub
parent bbed111c28
commit 967427ba97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 617 additions and 1027 deletions

View File

@ -1494,9 +1494,9 @@ typedef struct ShopOwner {
/* 0x00 */ s32 npcID;
/* 0x04 */ s32 idleAnim;
/* 0x08 */ s32 talkAnim;
/* 0x0C */ char unk_0C[0x4];
/* 0x0C */ Evt* unk_0C;
/* 0x10 */ Bytecode* unkScript;
/* 0x14 */ char unk_14[0x4];
/* 0x14 */ EvtSource* unk_14;
/* 0x18 */ s32* shopMsgIDs;
} ShopOwner;
@ -1506,7 +1506,7 @@ typedef struct ShopItemLocation {
} ShopItemLocation; // size = 0x4
typedef struct StaticInventoryItem {
/* 0x0 */ s32 unk_00;
/* 0x0 */ u32 itemID;
/* 0x4 */ s32 price;
/* 0x8 */ s32 unk_08;
} StaticInventoryItem; // size = 0xC

View File

@ -2239,38 +2239,22 @@ enum GlobalOverrides {
#define MODEL_FLAGS_MASK_FFF0 (MODEL_FLAGS_USES_CUSTOM_GFX | MODEL_FLAGS_FLAG_20 | MODEL_FLAGS_FLAG_40 | MODEL_FLAGS_HAS_LOCAL_VERTEX_COPY | MODEL_FLAGS_USE_CAMERA_UNK_MATRIX | MODEL_FLAGS_FLAG_200 | MODEL_FLAGS_HAS_TRANSFORM_APPLIED | MODEL_FLAGS_HAS_TEX_PANNER | MODEL_FLAGS_USES_TRANSFORM_MATRIX | MODEL_FLAGS_FLAG_2000 | MODEL_FLAGS_FLAG_4000 | MODEL_FLAGS_FLAG_8000)
enum ModelFlags {
MODEL_FLAGS_FLAG_1 = 0x00000001,
MODEL_FLAGS_ENABLED = 0x00000002,
MODEL_FLAGS_FLAG_4 = 0x00000004,
MODEL_FLAGS_TRANSFORM_GROUP_MEMBER = 0x00000008,
MODEL_FLAGS_USES_CUSTOM_GFX = 0x00000010,
MODEL_FLAGS_FLAG_20 = 0x00000020,
MODEL_FLAGS_FLAG_40 = 0x00000040,
MODEL_FLAGS_HAS_LOCAL_VERTEX_COPY = 0x00000080,
MODEL_FLAGS_USE_CAMERA_UNK_MATRIX = 0x00000100,
MODEL_FLAGS_FLAG_200 = 0x00000200,
MODEL_FLAGS_HAS_TRANSFORM_APPLIED = 0x00000400,
MODEL_FLAGS_HAS_TEX_PANNER = 0x00000800,
MODEL_FLAGS_USES_TRANSFORM_MATRIX = 0x00001000,
MODEL_FLAGS_FLAG_2000 = 0x00002000,
MODEL_FLAGS_FLAG_4000 = 0x00004000,
MODEL_FLAGS_FLAG_8000 = 0x00008000,
MODEL_FLAGS_FLAG_10000 = 0x00010000,
MODEL_FLAGS_FLAG_20000 = 0x00020000,
MODEL_FLAGS_FLAG_40000 = 0x00040000,
MODEL_FLAGS_FLAG_80000 = 0x00080000,
MODEL_FLAGS_FLAG_100000 = 0x00100000,
MODEL_FLAGS_FLAG_200000 = 0x00200000,
MODEL_FLAGS_FLAG_400000 = 0x00400000,
MODEL_FLAGS_FLAG_800000 = 0x00800000,
MODEL_FLAGS_FLAG_1000000 = 0x01000000,
MODEL_FLAGS_FLAG_2000000 = 0x02000000,
MODEL_FLAGS_FLAG_4000000 = 0x04000000,
MODEL_FLAGS_FLAG_8000000 = 0x08000000,
MODEL_FLAGS_FLAG_10000000 = 0x10000000,
MODEL_FLAGS_FLAG_20000000 = 0x20000000,
MODEL_FLAGS_FLAG_40000000 = 0x40000000,
MODEL_FLAGS_FLAG_80000000 = 0x80000000,
MODEL_FLAGS_FLAG_1 = 0x0001,
MODEL_FLAGS_ENABLED = 0x0002,
MODEL_FLAGS_FLAG_4 = 0x0004,
MODEL_FLAGS_TRANSFORM_GROUP_MEMBER = 0x0008,
MODEL_FLAGS_USES_CUSTOM_GFX = 0x0010,
MODEL_FLAGS_FLAG_20 = 0x0020,
MODEL_FLAGS_FLAG_40 = 0x0040,
MODEL_FLAGS_HAS_LOCAL_VERTEX_COPY = 0x0080,
MODEL_FLAGS_USE_CAMERA_UNK_MATRIX = 0x0100,
MODEL_FLAGS_FLAG_200 = 0x0200,
MODEL_FLAGS_HAS_TRANSFORM_APPLIED = 0x0400,
MODEL_FLAGS_HAS_TEX_PANNER = 0x0800,
MODEL_FLAGS_USES_TRANSFORM_MATRIX = 0x1000,
MODEL_FLAGS_FLAG_2000 = 0x2000,
MODEL_FLAGS_FLAG_4000 = 0x4000,
MODEL_FLAGS_FLAG_8000 = 0x8000,
};
// DynamicEntity, Entity, ItemEntity
@ -2662,6 +2646,7 @@ enum TriggerDefinitionFlags {
};
enum ShopFlags {
SHOP_FLAGS_0 = 0x00000000,
SHOP_FLAGS_1 = 0x00000001,
SHOP_FLAGS_2 = 0x00000002,
SHOP_FLAGS_4 = 0x00000004,
@ -2954,6 +2939,26 @@ enum ElementImmunityFlags {
ELEMENT_IMMUNITY_FLAGS_80000000 = 0x80000000,
};
enum ItemTypeFlags {
ITEM_TYPE_FLAGS_0 = 0x0000,
ITEM_TYPE_FLAGS_1 = 0x0001,
ITEM_TYPE_FLAGS_2 = 0x0002,
ITEM_TYPE_FLAGS_4 = 0x0004,
ITEM_TYPE_FLAGS_8 = 0x0008,
ITEM_TYPE_FLAGS_10 = 0x0010,
ITEM_TYPE_FLAGS_20 = 0x0020,
ITEM_TYPE_FLAGS_40 = 0x0040,
ITEM_TYPE_FLAGS_80 = 0x0080,
ITEM_TYPE_FLAGS_100 = 0x0100,
ITEM_TYPE_FLAGS_200 = 0x0200,
ITEM_TYPE_FLAGS_400 = 0x0400,
ITEM_TYPE_FLAGS_800 = 0x0800,
ITEM_TYPE_FLAGS_1000 = 0x1000,
ITEM_TYPE_FLAGS_2000 = 0x2000,
ITEM_TYPE_FLAGS_4000 = 0x4000,
ITEM_TYPE_FLAGS_8000 = 0x8000,
};
enum MsgWindowStates {
MSG_WINDOW_STATE_DONE = 0x0,
MSG_WINDOW_STATE_INIT = 0x1,

View File

@ -338,6 +338,7 @@ void set_item_entity_flags(s32 itemEntityIndex, s32 flag);
s32 create_generic_entity_frontUI(void (*updateFunc)(void), void (*drawFunc)(void));
DynamicEntity* get_generic_entity(s32 idx);
Trigger* bind_trigger_1(EvtSource* script, s32 flags, s32 triggerFlagIndex, s32 triggerVar0, s32 triggerVar1, s32 priority);
void set_cam_viewport(s16 id, s16 x, s16 y, s16 width, s16 height);
@ -602,6 +603,25 @@ void clear_player_data(void);
void enforce_hpfp_limits(void);
void func_800E98EC(void);
void func_800E9900(void);
void show_coin_counter(void);
s32 add_item(s32 itemID);
s32 add_badge(s32 itemID);
void func_800E96C8(void);
void hide_popup_menu(void);
void destroy_popup_menu(void);
void func_800E98C4(void);
s32 get_item_count(void);
s32 get_stored_empty_count(void);
s32 get_stored_count(void);
s32 get_item_empty_count(void);
void shop_open_item_select_popup(s32 mode);
void hide_coin_counter(void);
void set_message_msg(s32 msgID, s32 index);
void set_message_value(s32 value, s32 index);
s32 store_item(s32 itemID);
void open_status_menu_short(void);
void func_8024EFE0(f32 x, f32 y, f32 z, s32 a, s32 b, s32 c);
void func_802664DC(f32 x, f32 y, f32 z, s32 attack, s32 a);

View File

@ -37,8 +37,9 @@ extern s16 D_8010CFCE;
extern s32 D_802C0000;
extern s32 D_8010CFB8;
extern s32 D_8010CFBC;
extern s32 D_8010CFCC;
extern struct struct8015A578* D_8010CD38;
extern struct Vec3f* D_8010CD38;
typedef struct struct8010CD38{
/* 0x00 */ s8 unk_00;
@ -299,7 +300,37 @@ void remove_consumable(void) {
sort_items();
}
INCLUDE_ASM(s32, "world/partners", func_800EA4B0);
s32 func_800EA4B0(s32 arg0) {
s32 ret = 1;
if (arg0 >= 0) {
if (arg0 & 0x4000) {
switch (get_entity_type(arg0)) {
case 0x7:
case 0x8:
case 0x9:
case 0xA:
case 0x2E:
case 0x2F:
case 0x32:
case 0x35:
case 0x36:
case 0x37:
case 0x38:
case 0x39:
case 0x3A:
case 0x3B:
case 0x3C:
ret = 0;
break;
default:
ret = 1;
break;
}
}
}
return ret;
}
s32 partner_is_idle(Npc* partner) {
return gPartnerActionStatus.actionState.b[0] == 0;
@ -309,7 +340,35 @@ s32 world_partner_can_player_pause_default(Npc* partner) {
return TRUE;
}
INCLUDE_ASM(s32, "world/partners", func_800EA52C);
s32 func_800EA52C(s32 arg0) {
PlayerStatus* playerStatus = &gPlayerStatus;
u32 playerActionState = playerStatus->actionState;
s32 ret = 0;
if (playerStatus->flags & PLAYER_STATUS_FLAGS_800) {
return 0;
}
if (playerActionState < ACTION_STATE_JUMP) {
ret = 1;
}
if (arg0 == 9) {
if (playerActionState == ACTION_STATE_RIDE) {
ret = 1;
}
} else if (arg0 == 4) {
if ((playerActionState != ACTION_STATE_RIDE) && (playerActionState != ACTION_STATE_IDLE) && (playerActionState != ACTION_STATE_WALK)) {
if (playerActionState == ACTION_STATE_RUN) {
ret = 1;
}
} else {
ret = 1;
}
}
return ret;
}
s32 partner_is_flying(void) {
return !wPartner->isFlying;

View File

@ -1,11 +1,19 @@
#include "common.h"
#include "hud_element.h"
#include "model.h"
extern s32 MessagePlural;
extern s32 MessageSingular;
extern MessagePrintState* D_80286528;
extern MessagePrintState* D_80286538;
extern s32 D_80286520;
extern s32 D_80286524;
extern s32 D_80286530;
extern s32 D_80286534;
extern Evt* D_8028652C;
extern HudElementAnim* D_80080868;
extern s32 D_8014F150[64];
ApiStatus func_802803C8(Evt* script, s32 isInitialCall);
ApiStatus func_80280410(Evt* script, s32 isInitialCall);
@ -185,7 +193,124 @@ ApiStatus func_80280410(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(ApiStatus, "world/script_api/7E0E80", ShowShopPurchaseDialog, Evt* script, s32 isInitialCall);
ApiStatus ShowShopPurchaseDialog(Evt* script, s32 isInitialCall) {
PlayerData* playerData = &gPlayerData;
GameStatus* gameStatus = gGameStatusPtr;
s32 shopItemSlot = script->varTable[0];
Shop* shop = gameStatus->mapShop;
StaticInventoryItem* shopInventory = &shop->staticInventory[shopItemSlot];
StaticItem* shopItem = &gItemTable[shopInventory->itemID];
ShopOwner* shopOwner;
Evt* shopOwnerScript;
EvtSource* shopOwnerScriptSource;
s32 bpCost;
s32 args;
shop->flags &= ~SHOP_FLAGS_1;
func_800E9900();
if (isInitialCall) {
D_80286530 = 0;
D_80286534 = 0;
bpCost = -1;
if (shopItem->typeFlags & ITEM_TYPE_FLAGS_40) {
bpCost = gMoveTable[shopItem->moveID].costBP;
}
script->functionTemp[1] = shop_owner_buy_dialog(0, shopItem->nameMsg, shopInventory->price, bpCost);
script->functionTemp[0] = 0;
increment_status_menu_disabled();
func_800E9900();
show_coin_counter();
}
switch (script->functionTemp[0]) {
case 0:
if (!does_script_exist(script->functionTemp[1])) {
script->functionTemp[0] = 100;
script->functionTemp[2] = 0;
D_80286528 = msg_get_printer_for_msg(0x1E0001, &script->functionTemp[2]);
}
break;
case 100:
args = script->functionTemp[2];
if (script->functionTemp[2] == 1) {
if (D_80286528->currentOption == 0) {
if (playerData->coins < shopInventory->price) {
script->functionTemp[1] = shop_owner_continue_speech(1);
script->functionTemp[0] = args;
} else if ((shopInventory->itemID - 224) >= 117 && add_item(0) == -1) {
script->functionTemp[1] = shop_owner_continue_speech(2);
script->functionTemp[0] = 4;
} else {
playerData->coins = playerData->coins - shopInventory->price;
if ((shopInventory->itemID - 224) < 117) {
add_badge(shopInventory->itemID);
evt_set_variable(NULL, EVT_SAVE_FLAG(368), 1);
} else {
add_item(shopInventory->itemID);
}
script->functionTemp[1] = shop_owner_continue_speech(3);
script->functionTemp[0] = 5;
}
} else {
script->functionTemp[1] = shop_owner_reset_speech(22);
script->functionTemp[0] = 6;
}
}
break;
case 1:
if (!does_script_exist(script->functionTemp[1])) {
D_80286534 = 0;
D_80286530 = shopInventory->itemID;
script->functionTemp[0] = 10;
}
break;
case 4:
if (!does_script_exist(script->functionTemp[1])) {
D_80286534 = 5;
D_80286530 = shopInventory->itemID;
script->functionTemp[0] = 10;
}
break;
case 5:
if (!does_script_exist(script->functionTemp[1])) {
D_80286534 = 1;
D_80286530 = shopInventory->itemID;
script->functionTemp[0] = 10;
}
break;
case 6:
if (!does_script_exist(script->functionTemp[1])) {
D_80286534 = 3;
D_80286530 = shopInventory->itemID;
script->functionTemp[0] = 10;
}
break;
case 10:
shopOwner = shop->owner;
D_8028652C = NULL;
if (shopOwner != NULL) {
shopOwnerScriptSource = shopOwner->unk_0C;
if (shopOwnerScriptSource != NULL) {
shopOwnerScript = start_script(shopOwnerScriptSource, 1, 0);
D_8028652C = shopOwnerScript;
shopOwnerScript->varTable[2] = shopItemSlot;
shopOwnerScript->varTable[0] = D_80286534;
shopOwnerScript->varTable[1] = D_80286530;
}
}
script->functionTemp[0] = 11;
break;
case 11:
shopOwnerScript = D_8028652C;
if (shopOwnerScript == NULL || !does_script_exist(shopOwnerScript->id)) {
decrement_status_menu_disabled();
func_800E96C8();
return ApiStatus_DONE1;
}
break;
}
return ApiStatus_BLOCK;
}
//dumb stuff
#ifdef NON_EQUIVALENT
@ -201,16 +326,18 @@ void shop_open_item_select_popup(s32 mode) {
switch (mode) {
case 0:
numItemSlots = 10;
popupType = 5;
numItemSlots = 10;
break;
case 1:
numItemSlots = 10;
popupType = 7;
popupType = 6;
numItemSlots = 10;
break;
default:
numItemSlots = 32;
popupType = 7;
numItemSlots = 20;
break;
}
numEntries = 0;
@ -294,23 +421,294 @@ s32 shop_get_sell_price(s32 itemID) {
return gItemTable[itemID].sellValue;
}
INCLUDE_ASM(ApiStatus, "world/script_api/7E0E80", ShowShopOwnerDialog, Evt* script, s32 isInitialCall);
ApiStatus ShowShopOwnerDialog(Evt* script, s32 isInitialCall) {
GameStatus* gameStatus = gGameStatusPtr;
PlayerData* playerData = &gPlayerData;
Shop* shop = gameStatus->mapShop;
StaticItem* item;
s32 temp_v1_2;
if (isInitialCall) {
script->functionTemp[1] = shop_owner_begin_speech(4);
script->functionTemp[0] = 4;
}
switch (script->functionTemp[0]) {
case 4:
if (!does_script_exist(script->functionTemp[1])) {
script->functionTemp[0] = 41;
script->functionTemp[2] = 0;
D_80286538 = msg_get_printer_for_msg(0x1E0003, &script->functionTemp[2]);
}
break;
case 41:
if (script->functionTemp[2] == 1) {
switch (D_80286538->currentOption) {
case 0:
script->functionTemp[1] = shop_owner_continue_speech(5);
script->functionTemp[0] = 0;
break;
case 1:
if (get_item_count() == 0) {
script->functionTemp[1] = shop_owner_continue_speech(6);
script->functionTemp[0] = 9;
} else {
script->functionTemp[1] = shop_owner_continue_speech(7);
script->functionTemp[0] = 201;
}
break;
case 2:
if (get_item_count() == 0) {
script->functionTemp[1] = shop_owner_continue_speech(12);
script->functionTemp[0] = 9;
break;
}
if (get_stored_empty_count() == 0) {
script->functionTemp[1] = shop_owner_continue_speech(13);
script->functionTemp[0] = 9;
break;
}
script->functionTemp[1] = shop_owner_continue_speech_with_quantity(14, get_stored_empty_count());
script->functionTemp[0] = 501;
break;
case 3:
if (get_stored_count() == 0) {
script->functionTemp[1] = shop_owner_continue_speech(17);
script->functionTemp[0] = 9;
break;
}
if (get_item_empty_count() == 0) {
script->functionTemp[1] = shop_owner_continue_speech(18);
script->functionTemp[0] = 9;
break;
}
script->functionTemp[1] = shop_owner_continue_speech(19);
script->functionTemp[0] = 701;
break;
default:
script->functionTemp[1] = shop_owner_end_speech();
script->functionTemp[0] = 42;
break;
}
}
break;
case 201:
if (!does_script_exist(script->functionTemp[1])) {
shop_open_item_select_popup(0);
script->functionTemp[0] = 2;
}
break;
case 2:
if (shop_update_item_select_popup(&shop->selectedStoreItemSlot) == 1) {
script->functionTemp[0] = 21;
script->functionTemp[1] = 15;
}
break;
case 21:
if (script->functionTemp[1] <= 0) {
shop_close_item_select_popup();
if (shop->selectedStoreItemSlot >= 0) {
item = &gItemTable[playerData->invItems[shop->selectedStoreItemSlot]];
script->functionTemp[1] = shop_owner_buy_dialog(8, item->nameMsg, shop_get_sell_price(playerData->invItems[shop->selectedStoreItemSlot]), -1);
show_coin_counter();
script->functionTemp[0] = 3;
} else {
script->functionTemp[1] = shop_owner_begin_speech(22);
script->functionTemp[0] = 9;
}
} else {
script->functionTemp[1]--;
}
break;
case 3:
if (!does_script_exist(script->functionTemp[1])) {
script->functionTemp[0] = 31;
script->functionTemp[2] = 0;
D_80286538 = msg_get_printer_for_msg(0x1E0002, &script->functionTemp[2]);
}
break;
case 31:
if (script->functionTemp[2] == 1) {
if (D_80286538->currentOption == 0) {
add_coins(shop_get_sell_price(playerData->invItems[shop->selectedStoreItemSlot]));
playerData->invItems[shop->selectedStoreItemSlot] = 0;
if (get_item_count() == 0) {
script->functionTemp[1] = shop_owner_reset_speech(11);
script->functionTemp[0] = 9;
hide_coin_counter();
} else {
script->functionTemp[1] = shop_owner_reset_speech(10);
script->functionTemp[0] = 32;
}
} else {
script->functionTemp[1] = shop_owner_reset_speech(9);
script->functionTemp[0] = 32;
hide_coin_counter();
}
}
break;
case 32:
if (!does_script_exist(script->functionTemp[1])) {
script->functionTemp[0] = 12;
script->functionTemp[2] = 0;
D_80286538 = msg_get_printer_for_msg(0x1E0004, &script->functionTemp[2]);
}
break;
case 12:
if (script->functionTemp[2] == 1) {
if (D_80286538->currentOption == 0) {
script->functionTemp[1] = shop_owner_end_speech();
script->functionTemp[0] = 201;
func_800E96C8();
} else {
func_800E96C8();
script->functionTemp[1] = shop_owner_reset_speech(22);
script->functionTemp[0] = 9;
}
}
break;
case 501:
if (does_script_exist(script->functionTemp[1]) == 0) {
shop_open_item_select_popup(1);
script->functionTemp[0] = 5;
}
break;
case 5:
if (shop_update_item_select_popup(&shop->selectedStoreItemSlot) == 1) {
script->functionTemp[0] = 51;
script->functionTemp[1] = 15;
}
break;
case 51:
if (script->functionTemp[1] <= 0) {
shop_close_item_select_popup();
if (shop->selectedStoreItemSlot >= 0) {
if (store_item(playerData->invItems[shop->selectedStoreItemSlot]) >= 0) {
playerData->invItems[shop->selectedStoreItemSlot] = 0;
}
if ((get_item_count() == 0) || (get_stored_empty_count() == 0)) {
script->functionTemp[1] = shop_owner_begin_speech(15);
script->functionTemp[0] = 9;
} else {
script->functionTemp[1] = shop_owner_begin_speech(16);
script->functionTemp[0] = 52;
}
} else {
script->functionTemp[1] = shop_owner_begin_speech(22);
script->functionTemp[0] = 9;
}
} else {
script->functionTemp[1]--;
}
break;
case 52:
if (!does_script_exist(script->functionTemp[1])) {
script->functionTemp[0] = 53;
script->functionTemp[2] = 0;
D_80286538 = msg_get_printer_for_msg(0x1E0005, &script->functionTemp[2]);
}
break;
case 53:
if (script->functionTemp[2] == 1) {
if (D_80286538->currentOption == 0) {
script->functionTemp[1] = shop_owner_end_speech();
script->functionTemp[0] = 501;
} else {
script->functionTemp[1] = shop_owner_reset_speech(22);
script->functionTemp[0] = 9;
}
}
break;
case 701:
if (!does_script_exist(script->functionTemp[1])) {
shop_open_item_select_popup(2);
script->functionTemp[0] = 7;
}
break;
case 7:
if (shop_update_item_select_popup(&shop->selectedStoreItemSlot) == 1) {
script->functionTemp[0] = 71;
script->functionTemp[1] = 15;
}
break;
case 71:
if (script->functionTemp[1] > 0) {
script->functionTemp[1]--;
} else {
shop_close_item_select_popup();
if (shop->selectedStoreItemSlot >= 0) {
if (add_item(playerData->storedItems[shop->selectedStoreItemSlot]) >= 0) {
playerData->storedItems[shop->selectedStoreItemSlot] = 0;
}
if (get_item_empty_count() == 0 || get_stored_count() == 0) {
script->functionTemp[1] = shop_owner_begin_speech(20);
script->functionTemp[0] = 9;
} else {
script->functionTemp[1] = shop_owner_begin_speech(21);
script->functionTemp[0] = 72;
}
} else {
script->functionTemp[1] = shop_owner_begin_speech(22);
script->functionTemp[0] = 9;
}
}
break;
case 72:
if (!does_script_exist(script->functionTemp[1])) {
script->functionTemp[0] = 73;
script->functionTemp[2] = 0;
D_80286538 = msg_get_printer_for_msg(0x1E0005, &script->functionTemp[2]);
}
break;
case 73:
if (script->functionTemp[2] == 1) {
if (D_80286538->currentOption == 0) {
script->functionTemp[1] = shop_owner_end_speech();
script->functionTemp[0] = 701;
} else {
script->functionTemp[1] = shop_owner_reset_speech(22);
script->functionTemp[0] = 9;
}
}
break;
case 0:
case 9:
case 42:
if (!does_script_exist(script->functionTemp[1])) {
script->functionTemp[0] = 0;
script->functionTemp[0] = 10;
}
break;
case 10:
if (shop->owner != NULL) {
if (shop->owner->unk_14 != 0) {
start_script(shop->owner->unk_14, 1, 0);
}
}
open_status_menu_short();
return ApiStatus_DONE1;
}
return ApiStatus_BLOCK;
}
void shop_draw_item_name(s32 arg0, s32 posX, s32 posY) {
Shop* shop = gGameStatusPtr->mapShop;
StaticInventoryItem* siItem = &shop->staticInventory[shop->currentItemSlot];
StaticItem* item = &gItemTable[siItem->unk_00];
StaticItem* shopItem = &gItemTable[siItem->itemID];
draw_msg(item->nameMsg, posX + 60 - (get_msg_width(item->nameMsg, 0) >> 1), posY + 6, 255, 0, 0);
draw_msg(shopItem->nameMsg, posX + 60 - (get_msg_width(shopItem->nameMsg, 0) >> 1), posY + 6, 255, 0, 0);
}
void shop_draw_item_desc(s32 arg0, s32 posX, s32 posY) {
Shop* shop = gGameStatusPtr->mapShop;
StaticInventoryItem* item = &shop->staticInventory[shop->currentItemSlot];
StaticInventoryItem* shopItem = &shop->staticInventory[shop->currentItemSlot];
draw_msg(item->unk_08, posX + 8, posY, 255, 0xA, 0);
draw_msg(shopItem->unk_08, posX + 8, posY, 255, 0xA, 0);
}
extern void draw_shop_items();
// Problems with the struct iteration
#ifdef NON_EQUIVALENT
void draw_shop_items(void) {
@ -385,7 +783,94 @@ void draw_shop_items(void) {
INCLUDE_ASM(s32, "world/script_api/7E0E80", draw_shop_items);
#endif
// This should be equivalent to the original code but there is some funny business with
// the evt_get_variable's at the beginning that makes absolutely no sense.
#ifdef NON_MATCHING
s32 MakeShop(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
ShopItemLocation* staticItemPositions = evt_get_variable(script, *args++);
StaticInventoryItem* inventory = evt_get_variable(script, *args++);
StaticPriceItem* prices = evt_get_variable(script, *args++);
s32 inventoryItemFlags = evt_get_variable(script, *args++);
Shop* shop = heap_malloc(sizeof(Shop));
Model* model;
s32 numShopItems;
f32 centerX;
f32 centerY;
f32 centerZ;
f32 sizeX;
f32 sizeY;
f32 sizeZ;
s32 items;
gGameStatusPtr->mapShop = shop;
shop->staticItemPositions = staticItemPositions;
shop->staticInventory = inventory;
shop->staticPriceList = prices;
shop->inventoryItemFlags = inventoryItemFlags;
numShopItems = 0;
items = inventory->itemID;
while (items != 0) {
numShopItems++;
inventory++;
items = inventory->itemID;
}
shop->numItems = numShopItems;
numShopItems = 0;
if (prices != NULL) {
items = prices->itemID;
while (items != 0) {
numShopItems++;
prices++;
items = prices->itemID;
}
}
shop->numSpecialPrices = numShopItems;
if (shop->numItems > 0) {
gGameStatusPtr->shopItemEntities = heap_malloc(sizeof(ShopItemEntity) * shop->numItems);
}
inventory = shop->staticInventory;
staticItemPositions = shop->staticItemPositions;
numShopItems = 0;
while (inventory->itemID != 0) {
get_model_center_and_size(staticItemPositions->posModelID, &centerX, &centerY, &centerZ, &sizeX, &sizeY, &sizeZ);
centerY += 6;
gGameStatusPtr->shopItemEntities[numShopItems].pos.x = centerX;
gGameStatusPtr->shopItemEntities[numShopItems].pos.y = centerY;
gGameStatusPtr->shopItemEntities[numShopItems].pos.z = centerZ;
model = get_model_from_list_index(get_model_list_index_from_tree_index(staticItemPositions->posModelID));
model->flags |= MODEL_FLAGS_FLAG_4;
gGameStatusPtr->shopItemEntities[numShopItems].index = make_item_entity_nodelay(inventory->itemID | shop->inventoryItemFlags, centerX, centerY, centerZ, 1, 0);
set_item_entity_flags(gGameStatusPtr->shopItemEntities[numShopItems].index, 0x4000);
bind_trigger_1(D_80283F58_7E4DD8, 0x80, staticItemPositions->triggerColliderID, numShopItems, 0, 3);
bind_trigger_1(D_80283F58_7E4DD8, 0x800, staticItemPositions->triggerColliderID, numShopItems, 0, 3);
staticItemPositions++;
inventory++;
numShopItems++;
}
shop->costIconID = create_hud_element(&D_80080868);
set_hud_element_flags(shop->costIconID, 0x80);
clear_hud_element_flags(shop->costIconID, 0x8000);
get_generic_entity(create_generic_entity_frontUI(NULL, draw_shop_items));
set_window_properties(0xA, 100, 66, 120, 28, 0, shop_draw_item_name, NULL, -1);
set_window_properties(0xB, 32, 184, 256, 32, 1, shop_draw_item_desc, NULL, -1);
D_8014F150[10] = 9;
D_8014F150[11] = 3;
shop->currentItemSlot = 0;
shop->selectedStoreItemSlot = 0;
shop->flags = SHOP_FLAGS_0;
shop->owner = NULL;
return ApiStatus_DONE2;
}
#else
INCLUDE_ASM(ApiStatus, "world/script_api/7E0E80", MakeShop, Evt* script, s32 isInitialCall);
#endif
ApiStatus MakeShopOwner(Evt* script, s32 isInitialCall) {
Shop* mapShop = gGameStatusPtr->mapShop;

View File

@ -1,38 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
dlabel D_8010C040
.word 0x800EA4F8, 0x800EA4F8, 0x800EA4F8, 0x800EA4F8, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA500, 0x800EA4F8, 0x800EA4F8, 0x800EA500, 0x800EA500, 0x800EA4F8, 0x800EA500, 0x800EA500, 0x800EA4F8, 0x800EA4F8, 0x800EA4F8, 0x800EA4F8, 0x800EA4F8, 0x800EA4F8, 0x800EA4F8, 0x800EA4F8
.section .text
glabel func_800EA4B0
/* 83960 800EA4B0 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 83964 800EA4B4 AFBF0010 */ sw $ra, 0x10($sp)
/* 83968 800EA4B8 04800012 */ bltz $a0, .L800EA504
/* 8396C 800EA4BC 24030001 */ addiu $v1, $zero, 1
/* 83970 800EA4C0 30824000 */ andi $v0, $a0, 0x4000
/* 83974 800EA4C4 1040000F */ beqz $v0, .L800EA504
/* 83978 800EA4C8 00000000 */ nop
/* 8397C 800EA4CC 0C0441A9 */ jal get_entity_type
/* 83980 800EA4D0 00000000 */ nop
/* 83984 800EA4D4 2443FFF9 */ addiu $v1, $v0, -7
/* 83988 800EA4D8 2C620036 */ sltiu $v0, $v1, 0x36
/* 8398C 800EA4DC 10400008 */ beqz $v0, .L800EA500
/* 83990 800EA4E0 00031080 */ sll $v0, $v1, 2
/* 83994 800EA4E4 3C018011 */ lui $at, %hi(D_8010C040)
/* 83998 800EA4E8 00220821 */ addu $at, $at, $v0
/* 8399C 800EA4EC 8C22C040 */ lw $v0, %lo(D_8010C040)($at)
/* 839A0 800EA4F0 00400008 */ jr $v0
/* 839A4 800EA4F4 00000000 */ nop
/* 839A8 800EA4F8 0803A941 */ j .L800EA504
/* 839AC 800EA4FC 0000182D */ daddu $v1, $zero, $zero
.L800EA500:
/* 839B0 800EA500 24030001 */ addiu $v1, $zero, 1
.L800EA504:
/* 839B4 800EA504 8FBF0010 */ lw $ra, 0x10($sp)
/* 839B8 800EA508 0060102D */ daddu $v0, $v1, $zero
/* 839BC 800EA50C 03E00008 */ jr $ra
/* 839C0 800EA510 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,40 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_800EA52C
/* 839DC 800EA52C 3C038011 */ lui $v1, %hi(gPlayerStatus)
/* 839E0 800EA530 2463EFC8 */ addiu $v1, $v1, %lo(gPlayerStatus)
/* 839E4 800EA534 8C620000 */ lw $v0, ($v1)
/* 839E8 800EA538 806300B4 */ lb $v1, 0xb4($v1)
/* 839EC 800EA53C 30420800 */ andi $v0, $v0, 0x800
/* 839F0 800EA540 10400003 */ beqz $v0, .L800EA550
/* 839F4 800EA544 0000282D */ daddu $a1, $zero, $zero
/* 839F8 800EA548 03E00008 */ jr $ra
/* 839FC 800EA54C 00A0102D */ daddu $v0, $a1, $zero
.L800EA550:
/* 83A00 800EA550 2C620003 */ sltiu $v0, $v1, 3
/* 83A04 800EA554 54400001 */ bnel $v0, $zero, .L800EA55C
/* 83A08 800EA558 24050001 */ addiu $a1, $zero, 1
.L800EA55C:
/* 83A0C 800EA55C 24020009 */ addiu $v0, $zero, 9
/* 83A10 800EA560 14820003 */ bne $a0, $v0, .L800EA570
/* 83A14 800EA564 24020004 */ addiu $v0, $zero, 4
/* 83A18 800EA568 0803A964 */ j .L800EA590
/* 83A1C 800EA56C 24020021 */ addiu $v0, $zero, 0x21
.L800EA570:
/* 83A20 800EA570 1482000A */ bne $a0, $v0, .L800EA59C
/* 83A24 800EA574 24020021 */ addiu $v0, $zero, 0x21
/* 83A28 800EA578 50620008 */ beql $v1, $v0, .L800EA59C
/* 83A2C 800EA57C 24050001 */ addiu $a1, $zero, 1
/* 83A30 800EA580 10600005 */ beqz $v1, .L800EA598
/* 83A34 800EA584 24020001 */ addiu $v0, $zero, 1
/* 83A38 800EA588 10620003 */ beq $v1, $v0, .L800EA598
/* 83A3C 800EA58C 24020002 */ addiu $v0, $zero, 2
.L800EA590:
/* 83A40 800EA590 14620002 */ bne $v1, $v0, .L800EA59C
/* 83A44 800EA594 00000000 */ nop
.L800EA598:
/* 83A48 800EA598 24050001 */ addiu $a1, $zero, 1
.L800EA59C:
/* 83A4C 800EA59C 03E00008 */ jr $ra
/* 83A50 800EA5A0 00A0102D */ daddu $v0, $a1, $zero

View File

@ -1,604 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel ShowShopOwnerDialog
/* 7E1A50 80280BD0 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 7E1A54 80280BD4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 7E1A58 80280BD8 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 7E1A5C 80280BDC AFB10014 */ sw $s1, 0x14($sp)
/* 7E1A60 80280BE0 AFB20018 */ sw $s2, 0x18($sp)
/* 7E1A64 80280BE4 3C128011 */ lui $s2, %hi(gPlayerData)
/* 7E1A68 80280BE8 2652F290 */ addiu $s2, $s2, %lo(gPlayerData)
/* 7E1A6C 80280BEC AFBF0020 */ sw $ra, 0x20($sp)
/* 7E1A70 80280BF0 AFB3001C */ sw $s3, 0x1c($sp)
/* 7E1A74 80280BF4 AFB00010 */ sw $s0, 0x10($sp)
/* 7E1A78 80280BF8 8C500144 */ lw $s0, 0x144($v0)
/* 7E1A7C 80280BFC 10A00006 */ beqz $a1, .L80280C18
/* 7E1A80 80280C00 0080882D */ daddu $s1, $a0, $zero
/* 7E1A84 80280C04 0C0A0000 */ jal shop_owner_begin_speech
/* 7E1A88 80280C08 24040004 */ addiu $a0, $zero, 4
/* 7E1A8C 80280C0C AE220074 */ sw $v0, 0x74($s1)
/* 7E1A90 80280C10 24020004 */ addiu $v0, $zero, 4
/* 7E1A94 80280C14 AE220070 */ sw $v0, 0x70($s1)
.L80280C18:
/* 7E1A98 80280C18 8E230070 */ lw $v1, 0x70($s1)
/* 7E1A9C 80280C1C 24130020 */ addiu $s3, $zero, 0x20
/* 7E1AA0 80280C20 10730117 */ beq $v1, $s3, .L80281080
/* 7E1AA4 80280C24 28620021 */ slti $v0, $v1, 0x21
/* 7E1AA8 80280C28 10400027 */ beqz $v0, .L80280CC8
/* 7E1AAC 80280C2C 24020007 */ addiu $v0, $zero, 7
/* 7E1AB0 80280C30 1062018C */ beq $v1, $v0, .L80281264
/* 7E1AB4 80280C34 28620008 */ slti $v0, $v1, 8
/* 7E1AB8 80280C38 10400011 */ beqz $v0, .L80280C80
/* 7E1ABC 80280C3C 24020003 */ addiu $v0, $zero, 3
/* 7E1AC0 80280C40 106200D9 */ beq $v1, $v0, .L80280FA8
/* 7E1AC4 80280C44 28620004 */ slti $v0, $v1, 4
/* 7E1AC8 80280C48 10400007 */ beqz $v0, .L80280C68
/* 7E1ACC 80280C4C 24020004 */ addiu $v0, $zero, 4
/* 7E1AD0 80280C50 106001DC */ beqz $v1, .L802813C4
/* 7E1AD4 80280C54 24020002 */ addiu $v0, $zero, 2
/* 7E1AD8 80280C58 106200AF */ beq $v1, $v0, .L80280F18
/* 7E1ADC 80280C5C 0000102D */ daddu $v0, $zero, $zero
/* 7E1AE0 80280C60 080A0506 */ j .L80281418
/* 7E1AE4 80280C64 00000000 */ nop
.L80280C68:
/* 7E1AE8 80280C68 1062003F */ beq $v1, $v0, .L80280D68
/* 7E1AEC 80280C6C 24020005 */ addiu $v0, $zero, 5
/* 7E1AF0 80280C70 1062012B */ beq $v1, $v0, .L80281120
/* 7E1AF4 80280C74 0000102D */ daddu $v0, $zero, $zero
/* 7E1AF8 80280C78 080A0506 */ j .L80281418
/* 7E1AFC 80280C7C 00000000 */ nop
.L80280C80:
/* 7E1B00 80280C80 2402000C */ addiu $v0, $zero, 0xc
/* 7E1B04 80280C84 10620108 */ beq $v1, $v0, .L802810A8
/* 7E1B08 80280C88 2862000D */ slti $v0, $v1, 0xd
/* 7E1B0C 80280C8C 10400007 */ beqz $v0, .L80280CAC
/* 7E1B10 80280C90 24020009 */ addiu $v0, $zero, 9
/* 7E1B14 80280C94 106201CB */ beq $v1, $v0, .L802813C4
/* 7E1B18 80280C98 2402000A */ addiu $v0, $zero, 0xa
/* 7E1B1C 80280C9C 106201D1 */ beq $v1, $v0, .L802813E4
/* 7E1B20 80280CA0 0000102D */ daddu $v0, $zero, $zero
/* 7E1B24 80280CA4 080A0506 */ j .L80281418
/* 7E1B28 80280CA8 00000000 */ nop
.L80280CAC:
/* 7E1B2C 80280CAC 24020015 */ addiu $v0, $zero, 0x15
/* 7E1B30 80280CB0 106200A0 */ beq $v1, $v0, .L80280F34
/* 7E1B34 80280CB4 2402001F */ addiu $v0, $zero, 0x1f
/* 7E1B38 80280CB8 106200C5 */ beq $v1, $v0, .L80280FD0
/* 7E1B3C 80280CBC 0000102D */ daddu $v0, $zero, $zero
/* 7E1B40 80280CC0 080A0506 */ j .L80281418
/* 7E1B44 80280CC4 00000000 */ nop
.L80280CC8:
/* 7E1B48 80280CC8 24020047 */ addiu $v0, $zero, 0x47
/* 7E1B4C 80280CCC 1062016F */ beq $v1, $v0, .L8028128C
/* 7E1B50 80280CD0 28620048 */ slti $v0, $v1, 0x48
/* 7E1B54 80280CD4 10400012 */ beqz $v0, .L80280D20
/* 7E1B58 80280CD8 24020033 */ addiu $v0, $zero, 0x33
/* 7E1B5C 80280CDC 10620117 */ beq $v1, $v0, .L8028113C
/* 7E1B60 80280CE0 28620034 */ slti $v0, $v1, 0x34
/* 7E1B64 80280CE4 10400007 */ beqz $v0, .L80280D04
/* 7E1B68 80280CE8 24020029 */ addiu $v0, $zero, 0x29
/* 7E1B6C 80280CEC 10620027 */ beq $v1, $v0, .L80280D8C
/* 7E1B70 80280CF0 2402002A */ addiu $v0, $zero, 0x2a
/* 7E1B74 80280CF4 106201B3 */ beq $v1, $v0, .L802813C4
/* 7E1B78 80280CF8 0000102D */ daddu $v0, $zero, $zero
/* 7E1B7C 80280CFC 080A0506 */ j .L80281418
/* 7E1B80 80280D00 00000000 */ nop
.L80280D04:
/* 7E1B84 80280D04 24020034 */ addiu $v0, $zero, 0x34
/* 7E1B88 80280D08 10620133 */ beq $v1, $v0, .L802811D8
/* 7E1B8C 80280D0C 24020035 */ addiu $v0, $zero, 0x35
/* 7E1B90 80280D10 1062013B */ beq $v1, $v0, .L80281200
/* 7E1B94 80280D14 0000102D */ daddu $v0, $zero, $zero
/* 7E1B98 80280D18 080A0506 */ j .L80281418
/* 7E1B9C 80280D1C 00000000 */ nop
.L80280D20:
/* 7E1BA0 80280D20 240200C9 */ addiu $v0, $zero, 0xc9
/* 7E1BA4 80280D24 10620072 */ beq $v1, $v0, .L80280EF0
/* 7E1BA8 80280D28 286200CA */ slti $v0, $v1, 0xca
/* 7E1BAC 80280D2C 10400007 */ beqz $v0, .L80280D4C
/* 7E1BB0 80280D30 24020048 */ addiu $v0, $zero, 0x48
/* 7E1BB4 80280D34 1062017E */ beq $v1, $v0, .L80281330
/* 7E1BB8 80280D38 24020049 */ addiu $v0, $zero, 0x49
/* 7E1BBC 80280D3C 1062018C */ beq $v1, $v0, .L80281370
/* 7E1BC0 80280D40 0000102D */ daddu $v0, $zero, $zero
/* 7E1BC4 80280D44 080A0506 */ j .L80281418
/* 7E1BC8 80280D48 00000000 */ nop
.L80280D4C:
/* 7E1BCC 80280D4C 240201F5 */ addiu $v0, $zero, 0x1f5
/* 7E1BD0 80280D50 106200EA */ beq $v1, $v0, .L802810FC
/* 7E1BD4 80280D54 240202BD */ addiu $v0, $zero, 0x2bd
/* 7E1BD8 80280D58 10620138 */ beq $v1, $v0, .L8028123C
/* 7E1BDC 80280D5C 0000102D */ daddu $v0, $zero, $zero
/* 7E1BE0 80280D60 080A0506 */ j .L80281418
/* 7E1BE4 80280D64 00000000 */ nop
.L80280D68:
/* 7E1BE8 80280D68 0C0B1059 */ jal does_script_exist
/* 7E1BEC 80280D6C 8E240074 */ lw $a0, 0x74($s1)
/* 7E1BF0 80280D70 144001A9 */ bnez $v0, .L80281418
/* 7E1BF4 80280D74 0000102D */ daddu $v0, $zero, $zero
/* 7E1BF8 80280D78 3C04001E */ lui $a0, 0x1e
/* 7E1BFC 80280D7C 34840003 */ ori $a0, $a0, 3
/* 7E1C00 80280D80 26250078 */ addiu $a1, $s1, 0x78
/* 7E1C04 80280D84 080A04D5 */ j .L80281354
/* 7E1C08 80280D88 24020029 */ addiu $v0, $zero, 0x29
.L80280D8C:
/* 7E1C0C 80280D8C 8E240078 */ lw $a0, 0x78($s1)
/* 7E1C10 80280D90 24020001 */ addiu $v0, $zero, 1
/* 7E1C14 80280D94 148201A0 */ bne $a0, $v0, .L80281418
/* 7E1C18 80280D98 0000102D */ daddu $v0, $zero, $zero
/* 7E1C1C 80280D9C 3C028028 */ lui $v0, %hi(D_80286538)
/* 7E1C20 80280DA0 8C426538 */ lw $v0, %lo(D_80286538)($v0)
/* 7E1C24 80280DA4 904304E8 */ lbu $v1, 0x4e8($v0)
/* 7E1C28 80280DA8 10640012 */ beq $v1, $a0, .L80280DF4
/* 7E1C2C 80280DAC 28620002 */ slti $v0, $v1, 2
/* 7E1C30 80280DB0 10400005 */ beqz $v0, .L80280DC8
/* 7E1C34 80280DB4 24020002 */ addiu $v0, $zero, 2
/* 7E1C38 80280DB8 10600009 */ beqz $v1, .L80280DE0
/* 7E1C3C 80280DBC 00000000 */ nop
/* 7E1C40 80280DC0 080A03B6 */ j .L80280ED8
/* 7E1C44 80280DC4 00000000 */ nop
.L80280DC8:
/* 7E1C48 80280DC8 10620018 */ beq $v1, $v0, .L80280E2C
/* 7E1C4C 80280DCC 24020003 */ addiu $v0, $zero, 3
/* 7E1C50 80280DD0 1062002D */ beq $v1, $v0, .L80280E88
/* 7E1C54 80280DD4 00000000 */ nop
/* 7E1C58 80280DD8 080A03B6 */ j .L80280ED8
/* 7E1C5C 80280DDC 00000000 */ nop
.L80280DE0:
/* 7E1C60 80280DE0 0C0A005F */ jal shop_owner_continue_speech
/* 7E1C64 80280DE4 24040005 */ addiu $a0, $zero, 5
/* 7E1C68 80280DE8 AE220074 */ sw $v0, 0x74($s1)
/* 7E1C6C 80280DEC 080A0505 */ j .L80281414
/* 7E1C70 80280DF0 AE200070 */ sw $zero, 0x70($s1)
.L80280DF4:
/* 7E1C74 80280DF4 0C039D7B */ jal get_item_count
/* 7E1C78 80280DF8 00000000 */ nop
/* 7E1C7C 80280DFC 14400005 */ bnez $v0, .L80280E14
/* 7E1C80 80280E00 00000000 */ nop
/* 7E1C84 80280E04 0C0A005F */ jal shop_owner_continue_speech
/* 7E1C88 80280E08 24040006 */ addiu $a0, $zero, 6
/* 7E1C8C 80280E0C 080A04EE */ j .L802813B8
/* 7E1C90 80280E10 AE220074 */ sw $v0, 0x74($s1)
.L80280E14:
/* 7E1C94 80280E14 0C0A005F */ jal shop_owner_continue_speech
/* 7E1C98 80280E18 24040007 */ addiu $a0, $zero, 7
/* 7E1C9C 80280E1C AE220074 */ sw $v0, 0x74($s1)
/* 7E1CA0 80280E20 240200C9 */ addiu $v0, $zero, 0xc9
/* 7E1CA4 80280E24 080A0505 */ j .L80281414
/* 7E1CA8 80280E28 AE220070 */ sw $v0, 0x70($s1)
.L80280E2C:
/* 7E1CAC 80280E2C 0C039D7B */ jal get_item_count
/* 7E1CB0 80280E30 00000000 */ nop
/* 7E1CB4 80280E34 14400005 */ bnez $v0, .L80280E4C
/* 7E1CB8 80280E38 00000000 */ nop
/* 7E1CBC 80280E3C 0C0A005F */ jal shop_owner_continue_speech
/* 7E1CC0 80280E40 2404000C */ addiu $a0, $zero, 0xc
/* 7E1CC4 80280E44 080A04EE */ j .L802813B8
/* 7E1CC8 80280E48 AE220074 */ sw $v0, 0x74($s1)
.L80280E4C:
/* 7E1CCC 80280E4C 0C039E12 */ jal get_stored_empty_count
/* 7E1CD0 80280E50 00000000 */ nop
/* 7E1CD4 80280E54 14400005 */ bnez $v0, .L80280E6C
/* 7E1CD8 80280E58 00000000 */ nop
/* 7E1CDC 80280E5C 0C0A005F */ jal shop_owner_continue_speech
/* 7E1CE0 80280E60 2404000D */ addiu $a0, $zero, 0xd
/* 7E1CE4 80280E64 080A04EE */ j .L802813B8
/* 7E1CE8 80280E68 AE220074 */ sw $v0, 0x74($s1)
.L80280E6C:
/* 7E1CEC 80280E6C 0C039E12 */ jal get_stored_empty_count
/* 7E1CF0 80280E70 00000000 */ nop
/* 7E1CF4 80280E74 2404000E */ addiu $a0, $zero, 0xe
/* 7E1CF8 80280E78 0C0A0082 */ jal shop_owner_continue_speech_with_quantity
/* 7E1CFC 80280E7C 0040282D */ daddu $a1, $v0, $zero
/* 7E1D00 80280E80 080A048C */ j .L80281230
/* 7E1D04 80280E84 AE220074 */ sw $v0, 0x74($s1)
.L80280E88:
/* 7E1D08 80280E88 0C039E05 */ jal get_stored_count
/* 7E1D0C 80280E8C 00000000 */ nop
/* 7E1D10 80280E90 14400005 */ bnez $v0, .L80280EA8
/* 7E1D14 80280E94 00000000 */ nop
/* 7E1D18 80280E98 0C0A005F */ jal shop_owner_continue_speech
/* 7E1D1C 80280E9C 24040011 */ addiu $a0, $zero, 0x11
/* 7E1D20 80280EA0 080A04EE */ j .L802813B8
/* 7E1D24 80280EA4 AE220074 */ sw $v0, 0x74($s1)
.L80280EA8:
/* 7E1D28 80280EA8 0C039D88 */ jal get_item_empty_count
/* 7E1D2C 80280EAC 00000000 */ nop
/* 7E1D30 80280EB0 14400005 */ bnez $v0, .L80280EC8
/* 7E1D34 80280EB4 00000000 */ nop
/* 7E1D38 80280EB8 0C0A005F */ jal shop_owner_continue_speech
/* 7E1D3C 80280EBC 24040012 */ addiu $a0, $zero, 0x12
/* 7E1D40 80280EC0 080A04EE */ j .L802813B8
/* 7E1D44 80280EC4 AE220074 */ sw $v0, 0x74($s1)
.L80280EC8:
/* 7E1D48 80280EC8 0C0A005F */ jal shop_owner_continue_speech
/* 7E1D4C 80280ECC 24040013 */ addiu $a0, $zero, 0x13
/* 7E1D50 80280ED0 080A04E8 */ j .L802813A0
/* 7E1D54 80280ED4 AE220074 */ sw $v0, 0x74($s1)
.L80280ED8:
/* 7E1D58 80280ED8 0C0A00D7 */ jal shop_owner_end_speech
/* 7E1D5C 80280EDC 00000000 */ nop
/* 7E1D60 80280EE0 AE220074 */ sw $v0, 0x74($s1)
/* 7E1D64 80280EE4 2402002A */ addiu $v0, $zero, 0x2a
/* 7E1D68 80280EE8 080A0505 */ j .L80281414
/* 7E1D6C 80280EEC AE220070 */ sw $v0, 0x70($s1)
.L80280EF0:
/* 7E1D70 80280EF0 8E240074 */ lw $a0, 0x74($s1)
/* 7E1D74 80280EF4 0C0B1059 */ jal does_script_exist
/* 7E1D78 80280EF8 00000000 */ nop
/* 7E1D7C 80280EFC 14400146 */ bnez $v0, .L80281418
/* 7E1D80 80280F00 0000102D */ daddu $v0, $zero, $zero
/* 7E1D84 80280F04 0C0A0255 */ jal shop_open_item_select_popup
/* 7E1D88 80280F08 0000202D */ daddu $a0, $zero, $zero
/* 7E1D8C 80280F0C 24020002 */ addiu $v0, $zero, 2
/* 7E1D90 80280F10 080A0505 */ j .L80281414
/* 7E1D94 80280F14 AE220070 */ sw $v0, 0x70($s1)
.L80280F18:
/* 7E1D98 80280F18 0C0A02B1 */ jal shop_update_item_select_popup
/* 7E1D9C 80280F1C 2604000C */ addiu $a0, $s0, 0xc
/* 7E1DA0 80280F20 24030001 */ addiu $v1, $zero, 1
/* 7E1DA4 80280F24 1443013C */ bne $v0, $v1, .L80281418
/* 7E1DA8 80280F28 0000102D */ daddu $v0, $zero, $zero
/* 7E1DAC 80280F2C 080A049F */ j .L8028127C
/* 7E1DB0 80280F30 24020015 */ addiu $v0, $zero, 0x15
.L80280F34:
/* 7E1DB4 80280F34 8E220074 */ lw $v0, 0x74($s1)
/* 7E1DB8 80280F38 1C4000D7 */ bgtz $v0, .L80281298
/* 7E1DBC 80280F3C 2442FFFF */ addiu $v0, $v0, -1
/* 7E1DC0 80280F40 0C0A02D1 */ jal shop_close_item_select_popup
/* 7E1DC4 80280F44 00000000 */ nop
/* 7E1DC8 80280F48 8E02000C */ lw $v0, 0xc($s0)
/* 7E1DCC 80280F4C 04400012 */ bltz $v0, .L80280F98
/* 7E1DD0 80280F50 00021040 */ sll $v0, $v0, 1
/* 7E1DD4 80280F54 00521021 */ addu $v0, $v0, $s2
/* 7E1DD8 80280F58 844401B4 */ lh $a0, 0x1b4($v0)
/* 7E1DDC 80280F5C 3C028008 */ lui $v0, %hi(gItemTable)
/* 7E1DE0 80280F60 244278E0 */ addiu $v0, $v0, %lo(gItemTable)
/* 7E1DE4 80280F64 00048140 */ sll $s0, $a0, 5
/* 7E1DE8 80280F68 0C0A02DE */ jal shop_get_sell_price
/* 7E1DEC 80280F6C 02028021 */ addu $s0, $s0, $v0
/* 7E1DF0 80280F70 24040008 */ addiu $a0, $zero, 8
/* 7E1DF4 80280F74 0040302D */ daddu $a2, $v0, $zero
/* 7E1DF8 80280F78 8E050000 */ lw $a1, ($s0)
/* 7E1DFC 80280F7C 0C0A0022 */ jal shop_owner_buy_dialog
/* 7E1E00 80280F80 2407FFFF */ addiu $a3, $zero, -1
/* 7E1E04 80280F84 0C03A546 */ jal show_coin_counter
/* 7E1E08 80280F88 AE220074 */ sw $v0, 0x74($s1)
/* 7E1E0C 80280F8C 24020003 */ addiu $v0, $zero, 3
/* 7E1E10 80280F90 080A0505 */ j .L80281414
/* 7E1E14 80280F94 AE220070 */ sw $v0, 0x70($s1)
.L80280F98:
/* 7E1E18 80280F98 0C0A0000 */ jal shop_owner_begin_speech
/* 7E1E1C 80280F9C 24040016 */ addiu $a0, $zero, 0x16
/* 7E1E20 80280FA0 080A04EE */ j .L802813B8
/* 7E1E24 80280FA4 AE220074 */ sw $v0, 0x74($s1)
.L80280FA8:
/* 7E1E28 80280FA8 8E240074 */ lw $a0, 0x74($s1)
/* 7E1E2C 80280FAC 0C0B1059 */ jal does_script_exist
/* 7E1E30 80280FB0 00000000 */ nop
/* 7E1E34 80280FB4 14400118 */ bnez $v0, .L80281418
/* 7E1E38 80280FB8 0000102D */ daddu $v0, $zero, $zero
/* 7E1E3C 80280FBC 3C04001E */ lui $a0, 0x1e
/* 7E1E40 80280FC0 34840002 */ ori $a0, $a0, 2
/* 7E1E44 80280FC4 26250078 */ addiu $a1, $s1, 0x78
/* 7E1E48 80280FC8 080A04D5 */ j .L80281354
/* 7E1E4C 80280FCC 2402001F */ addiu $v0, $zero, 0x1f
.L80280FD0:
/* 7E1E50 80280FD0 8E230078 */ lw $v1, 0x78($s1)
/* 7E1E54 80280FD4 24020001 */ addiu $v0, $zero, 1
/* 7E1E58 80280FD8 1462010F */ bne $v1, $v0, .L80281418
/* 7E1E5C 80280FDC 0000102D */ daddu $v0, $zero, $zero
/* 7E1E60 80280FE0 3C028028 */ lui $v0, %hi(D_80286538)
/* 7E1E64 80280FE4 8C426538 */ lw $v0, %lo(D_80286538)($v0)
/* 7E1E68 80280FE8 904204E8 */ lbu $v0, 0x4e8($v0)
/* 7E1E6C 80280FEC 1440001D */ bnez $v0, .L80281064
/* 7E1E70 80280FF0 00000000 */ nop
/* 7E1E74 80280FF4 8E02000C */ lw $v0, 0xc($s0)
/* 7E1E78 80280FF8 00021040 */ sll $v0, $v0, 1
/* 7E1E7C 80280FFC 00521021 */ addu $v0, $v0, $s2
/* 7E1E80 80281000 0C0A02DE */ jal shop_get_sell_price
/* 7E1E84 80281004 844401B4 */ lh $a0, 0x1b4($v0)
/* 7E1E88 80281008 0C03A830 */ jal add_coins
/* 7E1E8C 8028100C 0040202D */ daddu $a0, $v0, $zero
/* 7E1E90 80281010 8E02000C */ lw $v0, 0xc($s0)
/* 7E1E94 80281014 00021040 */ sll $v0, $v0, 1
/* 7E1E98 80281018 00521021 */ addu $v0, $v0, $s2
/* 7E1E9C 8028101C 0C039D7B */ jal get_item_count
/* 7E1EA0 80281020 A44001B4 */ sh $zero, 0x1b4($v0)
/* 7E1EA4 80281024 14400009 */ bnez $v0, .L8028104C
/* 7E1EA8 80281028 00000000 */ nop
/* 7E1EAC 8028102C 0C0A00B4 */ jal shop_owner_reset_speech
/* 7E1EB0 80281030 2404000B */ addiu $a0, $zero, 0xb
/* 7E1EB4 80281034 AE220074 */ sw $v0, 0x74($s1)
/* 7E1EB8 80281038 24020009 */ addiu $v0, $zero, 9
/* 7E1EBC 8028103C 0C03A5A6 */ jal hide_coin_counter
/* 7E1EC0 80281040 AE220070 */ sw $v0, 0x70($s1)
/* 7E1EC4 80281044 080A0506 */ j .L80281418
/* 7E1EC8 80281048 0000102D */ daddu $v0, $zero, $zero
.L8028104C:
/* 7E1ECC 8028104C 0C0A00B4 */ jal shop_owner_reset_speech
/* 7E1ED0 80281050 2404000A */ addiu $a0, $zero, 0xa
/* 7E1ED4 80281054 AE220074 */ sw $v0, 0x74($s1)
/* 7E1ED8 80281058 24020020 */ addiu $v0, $zero, 0x20
/* 7E1EDC 8028105C 080A0505 */ j .L80281414
/* 7E1EE0 80281060 AE220070 */ sw $v0, 0x70($s1)
.L80281064:
/* 7E1EE4 80281064 0C0A00B4 */ jal shop_owner_reset_speech
/* 7E1EE8 80281068 24040009 */ addiu $a0, $zero, 9
/* 7E1EEC 8028106C AE220074 */ sw $v0, 0x74($s1)
/* 7E1EF0 80281070 0C03A5A6 */ jal hide_coin_counter
/* 7E1EF4 80281074 AE330070 */ sw $s3, 0x70($s1)
/* 7E1EF8 80281078 080A0506 */ j .L80281418
/* 7E1EFC 8028107C 0000102D */ daddu $v0, $zero, $zero
.L80281080:
/* 7E1F00 80281080 8E240074 */ lw $a0, 0x74($s1)
/* 7E1F04 80281084 0C0B1059 */ jal does_script_exist
/* 7E1F08 80281088 00000000 */ nop
/* 7E1F0C 8028108C 144000E2 */ bnez $v0, .L80281418
/* 7E1F10 80281090 0000102D */ daddu $v0, $zero, $zero
/* 7E1F14 80281094 3C04001E */ lui $a0, 0x1e
/* 7E1F18 80281098 34840004 */ ori $a0, $a0, 4
/* 7E1F1C 8028109C 26250078 */ addiu $a1, $s1, 0x78
/* 7E1F20 802810A0 080A04D5 */ j .L80281354
/* 7E1F24 802810A4 2402000C */ addiu $v0, $zero, 0xc
.L802810A8:
/* 7E1F28 802810A8 8E230078 */ lw $v1, 0x78($s1)
/* 7E1F2C 802810AC 24020001 */ addiu $v0, $zero, 1
/* 7E1F30 802810B0 146200D9 */ bne $v1, $v0, .L80281418
/* 7E1F34 802810B4 0000102D */ daddu $v0, $zero, $zero
/* 7E1F38 802810B8 3C028028 */ lui $v0, %hi(D_80286538)
/* 7E1F3C 802810BC 8C426538 */ lw $v0, %lo(D_80286538)($v0)
/* 7E1F40 802810C0 904204E8 */ lbu $v0, 0x4e8($v0)
/* 7E1F44 802810C4 14400009 */ bnez $v0, .L802810EC
/* 7E1F48 802810C8 00000000 */ nop
/* 7E1F4C 802810CC 0C0A00D7 */ jal shop_owner_end_speech
/* 7E1F50 802810D0 00000000 */ nop
/* 7E1F54 802810D4 AE220074 */ sw $v0, 0x74($s1)
/* 7E1F58 802810D8 240200C9 */ addiu $v0, $zero, 0xc9
/* 7E1F5C 802810DC 0C03A5B2 */ jal func_800E96C8
/* 7E1F60 802810E0 AE220070 */ sw $v0, 0x70($s1)
/* 7E1F64 802810E4 080A0506 */ j .L80281418
/* 7E1F68 802810E8 0000102D */ daddu $v0, $zero, $zero
.L802810EC:
/* 7E1F6C 802810EC 0C03A5B2 */ jal func_800E96C8
/* 7E1F70 802810F0 00000000 */ nop
/* 7E1F74 802810F4 080A04EB */ j .L802813AC
/* 7E1F78 802810F8 00000000 */ nop
.L802810FC:
/* 7E1F7C 802810FC 0C0B1059 */ jal does_script_exist
/* 7E1F80 80281100 8E240074 */ lw $a0, 0x74($s1)
/* 7E1F84 80281104 144000C4 */ bnez $v0, .L80281418
/* 7E1F88 80281108 0000102D */ daddu $v0, $zero, $zero
/* 7E1F8C 8028110C 0C0A0255 */ jal shop_open_item_select_popup
/* 7E1F90 80281110 24040001 */ addiu $a0, $zero, 1
/* 7E1F94 80281114 24020005 */ addiu $v0, $zero, 5
/* 7E1F98 80281118 080A0505 */ j .L80281414
/* 7E1F9C 8028111C AE220070 */ sw $v0, 0x70($s1)
.L80281120:
/* 7E1FA0 80281120 0C0A02B1 */ jal shop_update_item_select_popup
/* 7E1FA4 80281124 2604000C */ addiu $a0, $s0, 0xc
/* 7E1FA8 80281128 24030001 */ addiu $v1, $zero, 1
/* 7E1FAC 8028112C 144300BA */ bne $v0, $v1, .L80281418
/* 7E1FB0 80281130 0000102D */ daddu $v0, $zero, $zero
/* 7E1FB4 80281134 080A049F */ j .L8028127C
/* 7E1FB8 80281138 24020033 */ addiu $v0, $zero, 0x33
.L8028113C:
/* 7E1FBC 8028113C 8E220074 */ lw $v0, 0x74($s1)
/* 7E1FC0 80281140 1C400055 */ bgtz $v0, .L80281298
/* 7E1FC4 80281144 2442FFFF */ addiu $v0, $v0, -1
/* 7E1FC8 80281148 0C0A02D1 */ jal shop_close_item_select_popup
/* 7E1FCC 8028114C 00000000 */ nop
/* 7E1FD0 80281150 8E02000C */ lw $v0, 0xc($s0)
/* 7E1FD4 80281154 0440001C */ bltz $v0, .L802811C8
/* 7E1FD8 80281158 00021040 */ sll $v0, $v0, 1
/* 7E1FDC 8028115C 00521021 */ addu $v0, $v0, $s2
/* 7E1FE0 80281160 0C039DF1 */ jal store_item
/* 7E1FE4 80281164 844401B4 */ lh $a0, 0x1b4($v0)
/* 7E1FE8 80281168 04400005 */ bltz $v0, .L80281180
/* 7E1FEC 8028116C 00000000 */ nop
/* 7E1FF0 80281170 8E02000C */ lw $v0, 0xc($s0)
/* 7E1FF4 80281174 00021040 */ sll $v0, $v0, 1
/* 7E1FF8 80281178 00521021 */ addu $v0, $v0, $s2
/* 7E1FFC 8028117C A44001B4 */ sh $zero, 0x1b4($v0)
.L80281180:
/* 7E2000 80281180 0C039D7B */ jal get_item_count
/* 7E2004 80281184 00000000 */ nop
/* 7E2008 80281188 10400005 */ beqz $v0, .L802811A0
/* 7E200C 8028118C 00000000 */ nop
/* 7E2010 80281190 0C039E12 */ jal get_stored_empty_count
/* 7E2014 80281194 00000000 */ nop
/* 7E2018 80281198 14400005 */ bnez $v0, .L802811B0
/* 7E201C 8028119C 00000000 */ nop
.L802811A0:
/* 7E2020 802811A0 0C0A0000 */ jal shop_owner_begin_speech
/* 7E2024 802811A4 2404000F */ addiu $a0, $zero, 0xf
/* 7E2028 802811A8 080A04EE */ j .L802813B8
/* 7E202C 802811AC AE220074 */ sw $v0, 0x74($s1)
.L802811B0:
/* 7E2030 802811B0 0C0A0000 */ jal shop_owner_begin_speech
/* 7E2034 802811B4 24040010 */ addiu $a0, $zero, 0x10
/* 7E2038 802811B8 AE220074 */ sw $v0, 0x74($s1)
/* 7E203C 802811BC 24020034 */ addiu $v0, $zero, 0x34
/* 7E2040 802811C0 080A0505 */ j .L80281414
/* 7E2044 802811C4 AE220070 */ sw $v0, 0x70($s1)
.L802811C8:
/* 7E2048 802811C8 0C0A0000 */ jal shop_owner_begin_speech
/* 7E204C 802811CC 24040016 */ addiu $a0, $zero, 0x16
/* 7E2050 802811D0 080A04EE */ j .L802813B8
/* 7E2054 802811D4 AE220074 */ sw $v0, 0x74($s1)
.L802811D8:
/* 7E2058 802811D8 8E240074 */ lw $a0, 0x74($s1)
/* 7E205C 802811DC 0C0B1059 */ jal does_script_exist
/* 7E2060 802811E0 00000000 */ nop
/* 7E2064 802811E4 1440008C */ bnez $v0, .L80281418
/* 7E2068 802811E8 0000102D */ daddu $v0, $zero, $zero
/* 7E206C 802811EC 3C04001E */ lui $a0, 0x1e
/* 7E2070 802811F0 34840005 */ ori $a0, $a0, 5
/* 7E2074 802811F4 26250078 */ addiu $a1, $s1, 0x78
/* 7E2078 802811F8 080A04D5 */ j .L80281354
/* 7E207C 802811FC 24020035 */ addiu $v0, $zero, 0x35
.L80281200:
/* 7E2080 80281200 8E230078 */ lw $v1, 0x78($s1)
/* 7E2084 80281204 24020001 */ addiu $v0, $zero, 1
/* 7E2088 80281208 14620083 */ bne $v1, $v0, .L80281418
/* 7E208C 8028120C 0000102D */ daddu $v0, $zero, $zero
/* 7E2090 80281210 3C028028 */ lui $v0, %hi(D_80286538)
/* 7E2094 80281214 8C426538 */ lw $v0, %lo(D_80286538)($v0)
/* 7E2098 80281218 904204E8 */ lbu $v0, 0x4e8($v0)
/* 7E209C 8028121C 14400063 */ bnez $v0, .L802813AC
/* 7E20A0 80281220 00000000 */ nop
/* 7E20A4 80281224 0C0A00D7 */ jal shop_owner_end_speech
/* 7E20A8 80281228 00000000 */ nop
/* 7E20AC 8028122C AE220074 */ sw $v0, 0x74($s1)
.L80281230:
/* 7E20B0 80281230 240201F5 */ addiu $v0, $zero, 0x1f5
/* 7E20B4 80281234 080A0505 */ j .L80281414
/* 7E20B8 80281238 AE220070 */ sw $v0, 0x70($s1)
.L8028123C:
/* 7E20BC 8028123C 8E240074 */ lw $a0, 0x74($s1)
/* 7E20C0 80281240 0C0B1059 */ jal does_script_exist
/* 7E20C4 80281244 00000000 */ nop
/* 7E20C8 80281248 14400073 */ bnez $v0, .L80281418
/* 7E20CC 8028124C 0000102D */ daddu $v0, $zero, $zero
/* 7E20D0 80281250 0C0A0255 */ jal shop_open_item_select_popup
/* 7E20D4 80281254 24040002 */ addiu $a0, $zero, 2
/* 7E20D8 80281258 24020007 */ addiu $v0, $zero, 7
/* 7E20DC 8028125C 080A0505 */ j .L80281414
/* 7E20E0 80281260 AE220070 */ sw $v0, 0x70($s1)
.L80281264:
/* 7E20E4 80281264 0C0A02B1 */ jal shop_update_item_select_popup
/* 7E20E8 80281268 2604000C */ addiu $a0, $s0, 0xc
/* 7E20EC 8028126C 24030001 */ addiu $v1, $zero, 1
/* 7E20F0 80281270 14430069 */ bne $v0, $v1, .L80281418
/* 7E20F4 80281274 0000102D */ daddu $v0, $zero, $zero
/* 7E20F8 80281278 24020047 */ addiu $v0, $zero, 0x47
.L8028127C:
/* 7E20FC 8028127C AE220070 */ sw $v0, 0x70($s1)
/* 7E2100 80281280 2402000F */ addiu $v0, $zero, 0xf
/* 7E2104 80281284 080A0505 */ j .L80281414
/* 7E2108 80281288 AE220074 */ sw $v0, 0x74($s1)
.L8028128C:
/* 7E210C 8028128C 8E220074 */ lw $v0, 0x74($s1)
/* 7E2110 80281290 18400003 */ blez $v0, .L802812A0
/* 7E2114 80281294 2442FFFF */ addiu $v0, $v0, -1
.L80281298:
/* 7E2118 80281298 080A0505 */ j .L80281414
/* 7E211C 8028129C AE220074 */ sw $v0, 0x74($s1)
.L802812A0:
/* 7E2120 802812A0 0C0A02D1 */ jal shop_close_item_select_popup
/* 7E2124 802812A4 00000000 */ nop
/* 7E2128 802812A8 8E02000C */ lw $v0, 0xc($s0)
/* 7E212C 802812AC 0440001C */ bltz $v0, .L80281320
/* 7E2130 802812B0 00021040 */ sll $v0, $v0, 1
/* 7E2134 802812B4 00521021 */ addu $v0, $v0, $s2
/* 7E2138 802812B8 0C039D5D */ jal add_item
/* 7E213C 802812BC 844401C8 */ lh $a0, 0x1c8($v0)
/* 7E2140 802812C0 04400005 */ bltz $v0, .L802812D8
/* 7E2144 802812C4 00000000 */ nop
/* 7E2148 802812C8 8E02000C */ lw $v0, 0xc($s0)
/* 7E214C 802812CC 00021040 */ sll $v0, $v0, 1
/* 7E2150 802812D0 00521021 */ addu $v0, $v0, $s2
/* 7E2154 802812D4 A44001C8 */ sh $zero, 0x1c8($v0)
.L802812D8:
/* 7E2158 802812D8 0C039D88 */ jal get_item_empty_count
/* 7E215C 802812DC 00000000 */ nop
/* 7E2160 802812E0 10400005 */ beqz $v0, .L802812F8
/* 7E2164 802812E4 00000000 */ nop
/* 7E2168 802812E8 0C039E05 */ jal get_stored_count
/* 7E216C 802812EC 00000000 */ nop
/* 7E2170 802812F0 14400005 */ bnez $v0, .L80281308
/* 7E2174 802812F4 00000000 */ nop
.L802812F8:
/* 7E2178 802812F8 0C0A0000 */ jal shop_owner_begin_speech
/* 7E217C 802812FC 24040014 */ addiu $a0, $zero, 0x14
/* 7E2180 80281300 080A04EE */ j .L802813B8
/* 7E2184 80281304 AE220074 */ sw $v0, 0x74($s1)
.L80281308:
/* 7E2188 80281308 0C0A0000 */ jal shop_owner_begin_speech
/* 7E218C 8028130C 24040015 */ addiu $a0, $zero, 0x15
/* 7E2190 80281310 AE220074 */ sw $v0, 0x74($s1)
/* 7E2194 80281314 24020048 */ addiu $v0, $zero, 0x48
/* 7E2198 80281318 080A0505 */ j .L80281414
/* 7E219C 8028131C AE220070 */ sw $v0, 0x70($s1)
.L80281320:
/* 7E21A0 80281320 0C0A0000 */ jal shop_owner_begin_speech
/* 7E21A4 80281324 24040016 */ addiu $a0, $zero, 0x16
/* 7E21A8 80281328 080A04EE */ j .L802813B8
/* 7E21AC 8028132C AE220074 */ sw $v0, 0x74($s1)
.L80281330:
/* 7E21B0 80281330 8E240074 */ lw $a0, 0x74($s1)
/* 7E21B4 80281334 0C0B1059 */ jal does_script_exist
/* 7E21B8 80281338 00000000 */ nop
/* 7E21BC 8028133C 14400036 */ bnez $v0, .L80281418
/* 7E21C0 80281340 0000102D */ daddu $v0, $zero, $zero
/* 7E21C4 80281344 3C04001E */ lui $a0, 0x1e
/* 7E21C8 80281348 34840005 */ ori $a0, $a0, 5
/* 7E21CC 8028134C 26250078 */ addiu $a1, $s1, 0x78
/* 7E21D0 80281350 24020049 */ addiu $v0, $zero, 0x49
.L80281354:
/* 7E21D4 80281354 AE220070 */ sw $v0, 0x70($s1)
/* 7E21D8 80281358 0C049640 */ jal msg_get_printer_for_msg
/* 7E21DC 8028135C AE200078 */ sw $zero, 0x78($s1)
/* 7E21E0 80281360 3C018028 */ lui $at, %hi(D_80286538)
/* 7E21E4 80281364 AC226538 */ sw $v0, %lo(D_80286538)($at)
/* 7E21E8 80281368 080A0506 */ j .L80281418
/* 7E21EC 8028136C 0000102D */ daddu $v0, $zero, $zero
.L80281370:
/* 7E21F0 80281370 8E230078 */ lw $v1, 0x78($s1)
/* 7E21F4 80281374 24020001 */ addiu $v0, $zero, 1
/* 7E21F8 80281378 14620027 */ bne $v1, $v0, .L80281418
/* 7E21FC 8028137C 0000102D */ daddu $v0, $zero, $zero
/* 7E2200 80281380 3C028028 */ lui $v0, %hi(D_80286538)
/* 7E2204 80281384 8C426538 */ lw $v0, %lo(D_80286538)($v0)
/* 7E2208 80281388 904204E8 */ lbu $v0, 0x4e8($v0)
/* 7E220C 8028138C 14400007 */ bnez $v0, .L802813AC
/* 7E2210 80281390 00000000 */ nop
/* 7E2214 80281394 0C0A00D7 */ jal shop_owner_end_speech
/* 7E2218 80281398 00000000 */ nop
/* 7E221C 8028139C AE220074 */ sw $v0, 0x74($s1)
.L802813A0:
/* 7E2220 802813A0 240202BD */ addiu $v0, $zero, 0x2bd
/* 7E2224 802813A4 080A0505 */ j .L80281414
/* 7E2228 802813A8 AE220070 */ sw $v0, 0x70($s1)
.L802813AC:
/* 7E222C 802813AC 0C0A00B4 */ jal shop_owner_reset_speech
/* 7E2230 802813B0 24040016 */ addiu $a0, $zero, 0x16
/* 7E2234 802813B4 AE220074 */ sw $v0, 0x74($s1)
.L802813B8:
/* 7E2238 802813B8 24020009 */ addiu $v0, $zero, 9
/* 7E223C 802813BC 080A0505 */ j .L80281414
/* 7E2240 802813C0 AE220070 */ sw $v0, 0x70($s1)
.L802813C4:
/* 7E2244 802813C4 8E240074 */ lw $a0, 0x74($s1)
/* 7E2248 802813C8 0C0B1059 */ jal does_script_exist
/* 7E224C 802813CC 00000000 */ nop
/* 7E2250 802813D0 14400011 */ bnez $v0, .L80281418
/* 7E2254 802813D4 0000102D */ daddu $v0, $zero, $zero
/* 7E2258 802813D8 2402000A */ addiu $v0, $zero, 0xa
/* 7E225C 802813DC 080A0505 */ j .L80281414
/* 7E2260 802813E0 AE220070 */ sw $v0, 0x70($s1)
.L802813E4:
/* 7E2264 802813E4 8E020010 */ lw $v0, 0x10($s0)
/* 7E2268 802813E8 10400006 */ beqz $v0, .L80281404
/* 7E226C 802813EC 00000000 */ nop
/* 7E2270 802813F0 8C440014 */ lw $a0, 0x14($v0)
/* 7E2274 802813F4 10800003 */ beqz $a0, .L80281404
/* 7E2278 802813F8 24050001 */ addiu $a1, $zero, 1
/* 7E227C 802813FC 0C0B0CF8 */ jal start_script
/* 7E2280 80281400 0000302D */ daddu $a2, $zero, $zero
.L80281404:
/* 7E2284 80281404 0C03A5E3 */ jal open_status_menu_short
/* 7E2288 80281408 00000000 */ nop
/* 7E228C 8028140C 080A0506 */ j .L80281418
/* 7E2290 80281410 24020001 */ addiu $v0, $zero, 1
.L80281414:
/* 7E2294 80281414 0000102D */ daddu $v0, $zero, $zero
.L80281418:
/* 7E2298 80281418 8FBF0020 */ lw $ra, 0x20($sp)
/* 7E229C 8028141C 8FB3001C */ lw $s3, 0x1c($sp)
/* 7E22A0 80281420 8FB20018 */ lw $s2, 0x18($sp)
/* 7E22A4 80281424 8FB10014 */ lw $s1, 0x14($sp)
/* 7E22A8 80281428 8FB00010 */ lw $s0, 0x10($sp)
/* 7E22AC 8028142C 03E00008 */ jr $ra
/* 7E22B0 80281430 27BD0028 */ addiu $sp, $sp, 0x28

View File

@ -1,297 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel ShowShopPurchaseDialog
/* 7E139C 8028051C 27BDFFD0 */ addiu $sp, $sp, -0x30
/* 7E13A0 80280520 AFB3001C */ sw $s3, 0x1c($sp)
/* 7E13A4 80280524 0080982D */ daddu $s3, $a0, $zero
/* 7E13A8 80280528 AFB00010 */ sw $s0, 0x10($sp)
/* 7E13AC 8028052C 00A0802D */ daddu $s0, $a1, $zero
/* 7E13B0 80280530 AFB60028 */ sw $s6, 0x28($sp)
/* 7E13B4 80280534 3C168011 */ lui $s6, %hi(gPlayerData)
/* 7E13B8 80280538 26D6F290 */ addiu $s6, $s6, %lo(gPlayerData)
/* 7E13BC 8028053C AFBF002C */ sw $ra, 0x2c($sp)
/* 7E13C0 80280540 AFB50024 */ sw $s5, 0x24($sp)
/* 7E13C4 80280544 AFB40020 */ sw $s4, 0x20($sp)
/* 7E13C8 80280548 AFB20018 */ sw $s2, 0x18($sp)
/* 7E13CC 8028054C AFB10014 */ sw $s1, 0x14($sp)
/* 7E13D0 80280550 8E750084 */ lw $s5, 0x84($s3)
/* 7E13D4 80280554 3C038007 */ lui $v1, %hi(gGameStatusPtr)
/* 7E13D8 80280558 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1)
/* 7E13DC 8028055C 00151040 */ sll $v0, $s5, 1
/* 7E13E0 80280560 8C740144 */ lw $s4, 0x144($v1)
/* 7E13E4 80280564 00551021 */ addu $v0, $v0, $s5
/* 7E13E8 80280568 8E830018 */ lw $v1, 0x18($s4)
/* 7E13EC 8028056C 00021080 */ sll $v0, $v0, 2
/* 7E13F0 80280570 00629021 */ addu $s2, $v1, $v0
/* 7E13F4 80280574 96820000 */ lhu $v0, ($s4)
/* 7E13F8 80280578 8E430000 */ lw $v1, ($s2)
/* 7E13FC 8028057C 3042FFFE */ andi $v0, $v0, 0xfffe
/* 7E1400 80280580 A6820000 */ sh $v0, ($s4)
/* 7E1404 80280584 3C028008 */ lui $v0, %hi(gItemTable)
/* 7E1408 80280588 244278E0 */ addiu $v0, $v0, %lo(gItemTable)
/* 7E140C 8028058C 00031940 */ sll $v1, $v1, 5
/* 7E1410 80280590 0C03A640 */ jal func_800E9900
/* 7E1414 80280594 00628821 */ addu $s1, $v1, $v0
/* 7E1418 80280598 1200001B */ beqz $s0, .L80280608
/* 7E141C 8028059C 00000000 */ nop
/* 7E1420 802805A0 96220018 */ lhu $v0, 0x18($s1)
/* 7E1424 802805A4 3C018028 */ lui $at, %hi(D_80286530)
/* 7E1428 802805A8 AC206530 */ sw $zero, %lo(D_80286530)($at)
/* 7E142C 802805AC 3C018028 */ lui $at, %hi(D_80286534)
/* 7E1430 802805B0 AC206534 */ sw $zero, %lo(D_80286534)($at)
/* 7E1434 802805B4 30420040 */ andi $v0, $v0, 0x40
/* 7E1438 802805B8 10400008 */ beqz $v0, .L802805DC
/* 7E143C 802805BC 2407FFFF */ addiu $a3, $zero, -1
/* 7E1440 802805C0 9223001A */ lbu $v1, 0x1a($s1)
/* 7E1444 802805C4 00031080 */ sll $v0, $v1, 2
/* 7E1448 802805C8 00431021 */ addu $v0, $v0, $v1
/* 7E144C 802805CC 00021080 */ sll $v0, $v0, 2
/* 7E1450 802805D0 3C078009 */ lui $a3, %hi(D_8008F072)
/* 7E1454 802805D4 00E23821 */ addu $a3, $a3, $v0
/* 7E1458 802805D8 80E7F072 */ lb $a3, %lo(D_8008F072)($a3)
.L802805DC:
/* 7E145C 802805DC 8E250000 */ lw $a1, ($s1)
/* 7E1460 802805E0 8E460004 */ lw $a2, 4($s2)
/* 7E1464 802805E4 0C0A0022 */ jal shop_owner_buy_dialog
/* 7E1468 802805E8 0000202D */ daddu $a0, $zero, $zero
/* 7E146C 802805EC AE620074 */ sw $v0, 0x74($s3)
/* 7E1470 802805F0 0C03A6D5 */ jal increment_status_menu_disabled
/* 7E1474 802805F4 AE600070 */ sw $zero, 0x70($s3)
/* 7E1478 802805F8 0C03A640 */ jal func_800E9900
/* 7E147C 802805FC 00000000 */ nop
/* 7E1480 80280600 0C03A546 */ jal show_coin_counter
/* 7E1484 80280604 00000000 */ nop
.L80280608:
/* 7E1488 80280608 8E630070 */ lw $v1, 0x70($s3)
/* 7E148C 8028060C 24100005 */ addiu $s0, $zero, 5
/* 7E1490 80280610 10700085 */ beq $v1, $s0, .L80280828
/* 7E1494 80280614 28620006 */ slti $v0, $v1, 6
/* 7E1498 80280618 1040000D */ beqz $v0, .L80280650
/* 7E149C 8028061C 24020001 */ addiu $v0, $zero, 1
/* 7E14A0 80280620 1062006D */ beq $v1, $v0, .L802807D8
/* 7E14A4 80280624 28620002 */ slti $v0, $v1, 2
/* 7E14A8 80280628 10400005 */ beqz $v0, .L80280640
/* 7E14AC 8028062C 24020004 */ addiu $v0, $zero, 4
/* 7E14B0 80280630 10600017 */ beqz $v1, .L80280690
/* 7E14B4 80280634 0000102D */ daddu $v0, $zero, $zero
/* 7E14B8 80280638 080A024B */ j .L8028092C
/* 7E14BC 8028063C 00000000 */ nop
.L80280640:
/* 7E14C0 80280640 1062006F */ beq $v1, $v0, .L80280800
/* 7E14C4 80280644 0000102D */ daddu $v0, $zero, $zero
/* 7E14C8 80280648 080A024B */ j .L8028092C
/* 7E14CC 8028064C 00000000 */ nop
.L80280650:
/* 7E14D0 80280650 2410000A */ addiu $s0, $zero, 0xa
/* 7E14D4 80280654 10700091 */ beq $v1, $s0, .L8028089C
/* 7E14D8 80280658 2862000B */ slti $v0, $v1, 0xb
/* 7E14DC 8028065C 10400005 */ beqz $v0, .L80280674
/* 7E14E0 80280660 24020006 */ addiu $v0, $zero, 6
/* 7E14E4 80280664 1062007F */ beq $v1, $v0, .L80280864
/* 7E14E8 80280668 0000102D */ daddu $v0, $zero, $zero
/* 7E14EC 8028066C 080A024B */ j .L8028092C
/* 7E14F0 80280670 00000000 */ nop
.L80280674:
/* 7E14F4 80280674 2402000B */ addiu $v0, $zero, 0xb
/* 7E14F8 80280678 1062009D */ beq $v1, $v0, .L802808F0
/* 7E14FC 8028067C 24020064 */ addiu $v0, $zero, 0x64
/* 7E1500 80280680 10620012 */ beq $v1, $v0, .L802806CC
/* 7E1504 80280684 0000102D */ daddu $v0, $zero, $zero
/* 7E1508 80280688 080A024B */ j .L8028092C
/* 7E150C 8028068C 00000000 */ nop
.L80280690:
/* 7E1510 80280690 0C0B1059 */ jal does_script_exist
/* 7E1514 80280694 8E640074 */ lw $a0, 0x74($s3)
/* 7E1518 80280698 144000A4 */ bnez $v0, .L8028092C
/* 7E151C 8028069C 0000102D */ daddu $v0, $zero, $zero
/* 7E1520 802806A0 3C04001E */ lui $a0, 0x1e
/* 7E1524 802806A4 34840001 */ ori $a0, $a0, 1
/* 7E1528 802806A8 26650078 */ addiu $a1, $s3, 0x78
/* 7E152C 802806AC 24020064 */ addiu $v0, $zero, 0x64
/* 7E1530 802806B0 AE620070 */ sw $v0, 0x70($s3)
/* 7E1534 802806B4 0C049640 */ jal msg_get_printer_for_msg
/* 7E1538 802806B8 AE600078 */ sw $zero, 0x78($s3)
/* 7E153C 802806BC 3C018028 */ lui $at, %hi(D_80286528)
/* 7E1540 802806C0 AC226528 */ sw $v0, %lo(D_80286528)($at)
/* 7E1544 802806C4 080A024B */ j .L8028092C
/* 7E1548 802806C8 0000102D */ daddu $v0, $zero, $zero
.L802806CC:
/* 7E154C 802806CC 8E700078 */ lw $s0, 0x78($s3)
/* 7E1550 802806D0 24020001 */ addiu $v0, $zero, 1
/* 7E1554 802806D4 16020095 */ bne $s0, $v0, .L8028092C
/* 7E1558 802806D8 0000102D */ daddu $v0, $zero, $zero
/* 7E155C 802806DC 3C028028 */ lui $v0, %hi(D_80286528)
/* 7E1560 802806E0 8C426528 */ lw $v0, %lo(D_80286528)($v0)
/* 7E1564 802806E4 904204E8 */ lbu $v0, 0x4e8($v0)
/* 7E1568 802806E8 14400035 */ bnez $v0, .L802807C0
/* 7E156C 802806EC 00000000 */ nop
/* 7E1570 802806F0 86C2000C */ lh $v0, 0xc($s6)
/* 7E1574 802806F4 8E430004 */ lw $v1, 4($s2)
/* 7E1578 802806F8 0043102A */ slt $v0, $v0, $v1
/* 7E157C 802806FC 10400006 */ beqz $v0, .L80280718
/* 7E1580 80280700 00000000 */ nop
/* 7E1584 80280704 0C0A005F */ jal shop_owner_continue_speech
/* 7E1588 80280708 24040001 */ addiu $a0, $zero, 1
/* 7E158C 8028070C AE620074 */ sw $v0, 0x74($s3)
/* 7E1590 80280710 080A024A */ j .L80280928
/* 7E1594 80280714 AE700070 */ sw $s0, 0x70($s3)
.L80280718:
/* 7E1598 80280718 8E420000 */ lw $v0, ($s2)
/* 7E159C 8028071C 2442FF20 */ addiu $v0, $v0, -0xe0
/* 7E15A0 80280720 2C420075 */ sltiu $v0, $v0, 0x75
/* 7E15A4 80280724 1440000C */ bnez $v0, .L80280758
/* 7E15A8 80280728 00000000 */ nop
/* 7E15AC 8028072C 0C039D5D */ jal add_item
/* 7E15B0 80280730 0000202D */ daddu $a0, $zero, $zero
/* 7E15B4 80280734 2403FFFF */ addiu $v1, $zero, -1
/* 7E15B8 80280738 14430007 */ bne $v0, $v1, .L80280758
/* 7E15BC 8028073C 00000000 */ nop
/* 7E15C0 80280740 0C0A005F */ jal shop_owner_continue_speech
/* 7E15C4 80280744 24040002 */ addiu $a0, $zero, 2
/* 7E15C8 80280748 AE620074 */ sw $v0, 0x74($s3)
/* 7E15CC 8028074C 24020004 */ addiu $v0, $zero, 4
/* 7E15D0 80280750 080A024A */ j .L80280928
/* 7E15D4 80280754 AE620070 */ sw $v0, 0x70($s3)
.L80280758:
/* 7E15D8 80280758 96C2000C */ lhu $v0, 0xc($s6)
/* 7E15DC 8028075C 96430006 */ lhu $v1, 6($s2)
/* 7E15E0 80280760 00431023 */ subu $v0, $v0, $v1
/* 7E15E4 80280764 A6C2000C */ sh $v0, 0xc($s6)
/* 7E15E8 80280768 8E440000 */ lw $a0, ($s2)
/* 7E15EC 8028076C 2482FF20 */ addiu $v0, $a0, -0xe0
/* 7E15F0 80280770 2C420075 */ sltiu $v0, $v0, 0x75
/* 7E15F4 80280774 1040000A */ beqz $v0, .L802807A0
/* 7E15F8 80280778 00000000 */ nop
/* 7E15FC 8028077C 0C039DCF */ jal add_badge
/* 7E1600 80280780 00000000 */ nop
/* 7E1604 80280784 0000202D */ daddu $a0, $zero, $zero
/* 7E1608 80280788 3C05F840 */ lui $a1, 0xf840
/* 7E160C 8028078C 34A55CF0 */ ori $a1, $a1, 0x5cf0
/* 7E1610 80280790 0C0B2026 */ jal evt_set_variable
/* 7E1614 80280794 24060001 */ addiu $a2, $zero, 1
/* 7E1618 80280798 080A01EA */ j .L802807A8
/* 7E161C 8028079C 00000000 */ nop
.L802807A0:
/* 7E1620 802807A0 0C039D5D */ jal add_item
/* 7E1624 802807A4 00000000 */ nop
.L802807A8:
/* 7E1628 802807A8 0C0A005F */ jal shop_owner_continue_speech
/* 7E162C 802807AC 24040003 */ addiu $a0, $zero, 3
/* 7E1630 802807B0 AE620074 */ sw $v0, 0x74($s3)
/* 7E1634 802807B4 24020005 */ addiu $v0, $zero, 5
/* 7E1638 802807B8 080A024A */ j .L80280928
/* 7E163C 802807BC AE620070 */ sw $v0, 0x70($s3)
.L802807C0:
/* 7E1640 802807C0 0C0A00B4 */ jal shop_owner_reset_speech
/* 7E1644 802807C4 24040016 */ addiu $a0, $zero, 0x16
/* 7E1648 802807C8 AE620074 */ sw $v0, 0x74($s3)
/* 7E164C 802807CC 24020006 */ addiu $v0, $zero, 6
/* 7E1650 802807D0 080A024A */ j .L80280928
/* 7E1654 802807D4 AE620070 */ sw $v0, 0x70($s3)
.L802807D8:
/* 7E1658 802807D8 8E640074 */ lw $a0, 0x74($s3)
/* 7E165C 802807DC 0C0B1059 */ jal does_script_exist
/* 7E1660 802807E0 00000000 */ nop
/* 7E1664 802807E4 14400051 */ bnez $v0, .L8028092C
/* 7E1668 802807E8 0000102D */ daddu $v0, $zero, $zero
/* 7E166C 802807EC 8E430000 */ lw $v1, ($s2)
/* 7E1670 802807F0 3C018028 */ lui $at, %hi(D_80286534)
/* 7E1674 802807F4 AC206534 */ sw $zero, %lo(D_80286534)($at)
/* 7E1678 802807F8 080A0214 */ j .L80280850
/* 7E167C 802807FC 2402000A */ addiu $v0, $zero, 0xa
.L80280800:
/* 7E1680 80280800 8E640074 */ lw $a0, 0x74($s3)
/* 7E1684 80280804 0C0B1059 */ jal does_script_exist
/* 7E1688 80280808 00000000 */ nop
/* 7E168C 8028080C 14400047 */ bnez $v0, .L8028092C
/* 7E1690 80280810 0000102D */ daddu $v0, $zero, $zero
/* 7E1694 80280814 8E430000 */ lw $v1, ($s2)
/* 7E1698 80280818 3C018028 */ lui $at, %hi(D_80286534)
/* 7E169C 8028081C AC306534 */ sw $s0, %lo(D_80286534)($at)
/* 7E16A0 80280820 080A0214 */ j .L80280850
/* 7E16A4 80280824 2402000A */ addiu $v0, $zero, 0xa
.L80280828:
/* 7E16A8 80280828 8E640074 */ lw $a0, 0x74($s3)
/* 7E16AC 8028082C 0C0B1059 */ jal does_script_exist
/* 7E16B0 80280830 00000000 */ nop
/* 7E16B4 80280834 1440003D */ bnez $v0, .L8028092C
/* 7E16B8 80280838 0000102D */ daddu $v0, $zero, $zero
/* 7E16BC 8028083C 8E430000 */ lw $v1, ($s2)
/* 7E16C0 80280840 24020001 */ addiu $v0, $zero, 1
/* 7E16C4 80280844 3C018028 */ lui $at, %hi(D_80286534)
/* 7E16C8 80280848 AC226534 */ sw $v0, %lo(D_80286534)($at)
/* 7E16CC 8028084C 2402000A */ addiu $v0, $zero, 0xa
.L80280850:
/* 7E16D0 80280850 AE620070 */ sw $v0, 0x70($s3)
/* 7E16D4 80280854 3C018028 */ lui $at, %hi(D_80286530)
/* 7E16D8 80280858 AC236530 */ sw $v1, %lo(D_80286530)($at)
/* 7E16DC 8028085C 080A024B */ j .L8028092C
/* 7E16E0 80280860 0000102D */ daddu $v0, $zero, $zero
.L80280864:
/* 7E16E4 80280864 8E640074 */ lw $a0, 0x74($s3)
/* 7E16E8 80280868 0C0B1059 */ jal does_script_exist
/* 7E16EC 8028086C 00000000 */ nop
/* 7E16F0 80280870 1440002E */ bnez $v0, .L8028092C
/* 7E16F4 80280874 0000102D */ daddu $v0, $zero, $zero
/* 7E16F8 80280878 8E430000 */ lw $v1, ($s2)
/* 7E16FC 8028087C 24020003 */ addiu $v0, $zero, 3
/* 7E1700 80280880 3C018028 */ lui $at, %hi(D_80286534)
/* 7E1704 80280884 AC226534 */ sw $v0, %lo(D_80286534)($at)
/* 7E1708 80280888 AE700070 */ sw $s0, 0x70($s3)
/* 7E170C 8028088C 3C018028 */ lui $at, %hi(D_80286530)
/* 7E1710 80280890 AC236530 */ sw $v1, %lo(D_80286530)($at)
/* 7E1714 80280894 080A024B */ j .L8028092C
/* 7E1718 80280898 0000102D */ daddu $v0, $zero, $zero
.L8028089C:
/* 7E171C 8028089C 8E820010 */ lw $v0, 0x10($s4)
/* 7E1720 802808A0 3C108028 */ lui $s0, %hi(D_8028652C)
/* 7E1724 802808A4 2610652C */ addiu $s0, $s0, %lo(D_8028652C)
/* 7E1728 802808A8 1040000E */ beqz $v0, .L802808E4
/* 7E172C 802808AC AE000000 */ sw $zero, ($s0)
/* 7E1730 802808B0 8C44000C */ lw $a0, 0xc($v0)
/* 7E1734 802808B4 1080000B */ beqz $a0, .L802808E4
/* 7E1738 802808B8 24050001 */ addiu $a1, $zero, 1
/* 7E173C 802808BC 0C0B0CF8 */ jal start_script
/* 7E1740 802808C0 0000302D */ daddu $a2, $zero, $zero
/* 7E1744 802808C4 3C038028 */ lui $v1, %hi(D_80286534)
/* 7E1748 802808C8 8C636534 */ lw $v1, %lo(D_80286534)($v1)
/* 7E174C 802808CC 3C048028 */ lui $a0, %hi(D_80286530)
/* 7E1750 802808D0 8C846530 */ lw $a0, %lo(D_80286530)($a0)
/* 7E1754 802808D4 AE020000 */ sw $v0, ($s0)
/* 7E1758 802808D8 AC55008C */ sw $s5, 0x8c($v0)
/* 7E175C 802808DC AC430084 */ sw $v1, 0x84($v0)
/* 7E1760 802808E0 AC440088 */ sw $a0, 0x88($v0)
.L802808E4:
/* 7E1764 802808E4 2402000B */ addiu $v0, $zero, 0xb
/* 7E1768 802808E8 080A024A */ j .L80280928
/* 7E176C 802808EC AE620070 */ sw $v0, 0x70($s3)
.L802808F0:
/* 7E1770 802808F0 3C028028 */ lui $v0, %hi(D_8028652C)
/* 7E1774 802808F4 8C42652C */ lw $v0, %lo(D_8028652C)($v0)
/* 7E1778 802808F8 10400005 */ beqz $v0, .L80280910
/* 7E177C 802808FC 00000000 */ nop
/* 7E1780 80280900 0C0B1059 */ jal does_script_exist
/* 7E1784 80280904 8C440144 */ lw $a0, 0x144($v0)
/* 7E1788 80280908 14400008 */ bnez $v0, .L8028092C
/* 7E178C 8028090C 0000102D */ daddu $v0, $zero, $zero
.L80280910:
/* 7E1790 80280910 0C03A6CC */ jal decrement_status_menu_disabled
/* 7E1794 80280914 00000000 */ nop
/* 7E1798 80280918 0C03A5B2 */ jal func_800E96C8
/* 7E179C 8028091C 00000000 */ nop
/* 7E17A0 80280920 080A024B */ j .L8028092C
/* 7E17A4 80280924 24020001 */ addiu $v0, $zero, 1
.L80280928:
/* 7E17A8 80280928 0000102D */ daddu $v0, $zero, $zero
.L8028092C:
/* 7E17AC 8028092C 8FBF002C */ lw $ra, 0x2c($sp)
/* 7E17B0 80280930 8FB60028 */ lw $s6, 0x28($sp)
/* 7E17B4 80280934 8FB50024 */ lw $s5, 0x24($sp)
/* 7E17B8 80280938 8FB40020 */ lw $s4, 0x20($sp)
/* 7E17BC 8028093C 8FB3001C */ lw $s3, 0x1c($sp)
/* 7E17C0 80280940 8FB20018 */ lw $s2, 0x18($sp)
/* 7E17C4 80280944 8FB10014 */ lw $s1, 0x14($sp)
/* 7E17C8 80280948 8FB00010 */ lw $s0, 0x10($sp)
/* 7E17CC 8028094C 03E00008 */ jr $ra
/* 7E17D0 80280950 27BD0030 */ addiu $sp, $sp, 0x30

View File

@ -1955,7 +1955,7 @@ D_8010BEE8 = 0x8010BEE8; // type:data rom:0xA5398
D_8010BEF0 = 0x8010BEF0; // type:data rom:0xA53A0
D_8010BEF8 = 0x8010BEF8; // type:data rom:0xA53A8
D_8010BF60 = 0x8010BF60; // type:data rom:0xA5410
D_8010C040 = 0x8010C040; // type:data rom:0xA54F0
jtbl_8010C040 = 0x8010C040; // type:data rom:0xA54F0
D_8010C310 = 0x8010C310; // type:data rom:0xA57C0
D_8010C318 = 0x8010C318; // type:data rom:0xA57C8
D_8010C320 = 0x8010C320; // type:data rom:0xA57D0