Ovl_En_Fsn Ok and Documented (#204)

* First decomp pass: Matched everything w/ data

* Minor cleanup of func_80AE2F78

* Documented

* Format

* Some cleanup and PR suggestions

* Format

* Add the word player to a few functions to specify it is the player trying to buy

* Add controller macros

* Move common shopkeeper defines

* name unk274 and add note to unk27A

* Remove macros and just use flag defines

* Convert Controller Macros to take globalCtx

* Fix merge conflicts
This commit is contained in:
Derek Hensley
2021-07-19 19:26:47 -04:00
committed by GitHub
parent b5c931e432
commit 594a3ceaff
20 changed files with 1846 additions and 191 deletions
+10 -8
View File
@@ -37,19 +37,19 @@ s32 func_800E8FA4(Actor* actor, Vec3f* param_2, Vec3s* param_3, Vec3s* param_4)
targetYaw = Math_Vec3f_Yaw(&actor->focus.pos, param_2) - actor->world.rot.y;
Math_SmoothStepToS(&param_3->x, targetPitch, 6, 2000, 1);
param_3->x = (param_3->x < -6000) ? -6000 : ((6000 < param_3->x) ? 6000 : param_3->x);
param_3->x = CLAMP(param_3->x, -6000, 6000);
yawDiffFromTarget = Math_SmoothStepToS(&param_3->y, targetYaw, 6, 2000, 1);
param_3->y = (param_3->y < -8000) ? -8000 : ((8000 < param_3->y) ? 8000 : param_3->y);
param_3->y = CLAMP(param_3->y, -8000, 8000);
if (yawDiffFromTarget != 0) {
if ((param_3->y < 0 ? -param_3->y : param_3->y) < 8000) {
if (ABS_ALT(param_3->y) < 8000) {
return 0;
}
}
Math_SmoothStepToS(&param_4->y, targetYaw - param_3->y, 4, 2000, 1);
param_4->y = (param_4->y < -12000) ? -12000 : ((12000 < param_4->y) ? 12000 : param_4->y);
param_4->y = CLAMP(param_4->y, -12000, 12000);
return 1;
}
@@ -58,14 +58,15 @@ s32 func_800E9138(GlobalContext* globalCtx, Actor* actor, Vec3s* param_3, Vec3s*
Player* player = PLAYER;
s16 sVar3;
Vec3f local_14;
s16 sVar3A;
actor->focus.pos = actor->world.pos;
actor->focus.pos.y += param_5;
if (((globalCtx->csCtx).state == 0) && (D_801D0D50 == 0)) {
sVar3 = actor->yawTowardsPlayer - actor->shape.rot.y;
// TODO is this shifting because of a missing cast?
if (0x42ff < (sVar3 < 0 ? ((-sVar3 << 0x10) >> 0x10) : ((sVar3 << 0x10) >> 0x10))) {
sVar3A = ABS_ALT(sVar3);
if (sVar3A >= 0x4300) {
func_800E8F08(param_3, param_4);
return 0;
}
@@ -86,13 +87,14 @@ s32 func_800E9250(GlobalContext* globalCtx, Actor* actor, Vec3s* param_3, Vec3s*
Player* player = PLAYER;
s16 sVar3;
Vec3f local_14;
s16 sVar3A;
actor->focus.pos = param_5;
if (((globalCtx->csCtx).state == 0) && (D_801D0D50 == 0)) {
sVar3 = actor->yawTowardsPlayer - actor->shape.rot.y;
// TODO is this shifting because of a missing cast?
if (0x42ff < (sVar3 < 0 ? ((-sVar3 << 0x10) >> 0x10) : ((sVar3 << 0x10) >> 0x10))) {
sVar3A = ABS_ALT(sVar3);
if (sVar3A >= 0x4300) {
func_800E8F08(param_3, param_4);
return 0;
}
+1 -1
View File
@@ -61,7 +61,7 @@ u8 gItemSlots[] = {
0x1C, 0x2B, 0x21, 0x2A, 0x2D, 0x1B, 0x1F, 0x1A, 0x22, 0x2E, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00,
};
u16 gItemPrices[] = {
s16 gItemPrices[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 20, 20, 20, 0, 20,
5, 20, 20, 50, 50, 200, 20, 20, 20, 200, 5, 0, 200, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
@@ -262,7 +262,7 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
func_8019F1C0(&this->actor.projectedPos, NA_SE_IT_HOOKSHOT_REFLECT);
}
} else {
if (CHECK_BTN_ANY(globalCtx->state.input[0].press.button,
if (CHECK_BTN_ANY(CONTROLLER1(globalCtx)->press.button,
BTN_A | BTN_B | BTN_R | BTN_CUP | BTN_CLEFT | BTN_CRIGHT | BTN_CDOWN)) {
s32 pad;
this->timer = 1;
+3 -3
View File
@@ -27,19 +27,19 @@ const ActorInit Dm_Nb_InitVars = {
(ActorFunc)DmNb_Draw,
};
extern UNK_TYPE D_06000990;
extern AnimationHeader D_06000990;
extern FlexSkeletonHeader D_06008C40;
// Probably the same struct as ActorAnimationEntryS, need more info from func_8013BC6C
static UNK_TYPE D_80C1E200[] = { &D_06000990, 0x3F800000, 0x0000FFFF, 0x00000000 };
static ActorAnimationEntryS D_80C1E200[] = { &D_06000990, 1.0f, 0, -1, 0, 0};
s32 func_80C1DED0(DmNb* this, s32 arg1) {
s32 ret = 0;
if (arg1 != this->unk1F0) {
this->unk1F0 = arg1;
ret = func_8013BC6C(&this->skelAnime, &D_80C1E200, arg1);
ret = func_8013BC6C(&this->skelAnime, D_80C1E200, arg1);
}
return ret;
}
File diff suppressed because it is too large Load Diff
+63 -1
View File
@@ -2,12 +2,74 @@
#define Z_EN_FSN_H
#include <global.h>
#include "overlays/actors/ovl_En_GirlA/z_en_girla.h"
#define ENFSN_IS_BACKROOM(thisx) ((thisx)->params & 1)
#define ENFSN_IS_SHOP(thisx) (!((thisx)->params & 1))
#define ENFSN_OFFER_FINAL_PRICE (1 << 6)
#define ENFSN_HAGGLE (1 << 7)
#define ENFSN_ANGRY (1 << 8)
#define ENFSN_CALM_DOWN (1 << 9)
struct EnFsn;
typedef void (*EnFsnActionFunc)(struct EnFsn*, GlobalContext*);
typedef struct EnFsn {
/* 0x000 */ Actor actor;
/* 0x144 */ char unk_144[0x30C];
/* 0x144 */ UNK_TYPE1 pad144[0x4C];
/* 0x190 */ SkelAnime skelAnime;
/* 0x1D4 */ EnFsnActionFunc actionFunc;
/* 0x1D8 */ EnFsnActionFunc tmpActionFunc; // Used to return to correct browsing function
/* 0x1DC */ ColliderCylinder collider;
/* 0x228 */ s16 limbRotYTable[19];
/* 0x24E */ s16 limbRotZTable[19];
/* 0x274 */ Vec3s headRot;
/* 0x27A */ Vec3s unk27A; // Set but never used
/* 0x280 */ Vec3s limbDrawTable[19];
/* 0x2F2 */ Vec3s transitionDrawTable[19];
/* 0x364 */ s16 eyeTextureIdx;
/* 0x366 */ s16 blinkTimer;
/* 0x368 */ s16 cutsceneState;
/* 0x36A */ s16 cutscene;
/* 0x36C */ s16 lookToShopkeeperCutscene;
/* 0x36E */ s16 lookToShelfCutscene;
/* 0x370 */ s16 lookToShopkeeperFromShelfCutscene;
/* 0x372 */ s16 lookToShopkeeperBuyingCutscene;
/* 0x374 */ s16 price;
/* 0x376 */ u16 textId;
/* 0x378 */ u8 isSelling;
/* 0x379 */ u8 cursorIdx;
/* 0x37C */ s32 getItemId;
/* 0x380 */ s16 stolenItem1;
/* 0x382 */ s16 stolenItem2;
/* 0x384 */ s16 itemIds[3];
/* 0x38A */ s16 totalSellingItems;
/* 0x38C */ s16 numSellingItems;
/* 0x390 */ EnGirlA* items[3];
/* 0x39C */ s16 delayTimer;
/* 0x3A0 */ s32 stickAccumX;
/* 0x3A4 */ s32 stickAccumY;
/* 0x3A8 */ f32 cursorX;
/* 0x3AC */ f32 cursorY;
/* 0x3B0 */ f32 cursorZ;
/* 0x3B4 */ s32 cursorColorR;
/* 0x3B8 */ s32 cursorColorG;
/* 0x3BC */ s32 cursorColorB;
/* 0x3C0 */ s32 cursorColorA;
/* 0x3C4 */ f32 cursorAnimTween;
/* 0x3C8 */ u8 cursorAnimState;
/* 0x3C9 */ u8 drawCursor;
/* 0x3CC */ StickDirectionPrompt stickLeftPrompt;
/* 0x404 */ StickDirectionPrompt stickRightPrompt;
/* 0x43C */ f32 arrowAnimTween;
/* 0x440 */ f32 stickAnimTween;
/* 0x444 */ u8 arrowAnimState;
/* 0x445 */ u8 stickAnimState;
/* 0x448 */ f32 shopItemSelectedTween;
/* 0x44C */ s16 animationIdx;
/* 0x44E */ u16 flags;
} EnFsn; // size = 0x450
extern const ActorInit En_Fsn_InitVars;
+27 -27
View File
@@ -191,7 +191,7 @@ s32 EnGirlA_CanBuyPotionRed(GlobalContext* globalCtx, EnGirlA* this) {
if (gSaveContext.rupees < globalCtx->msgCtx.unk1206C) {
return CANBUY_RESULT_NEED_RUPEES;
}
return CANBUY_RESULT_SUCCESS;
return CANBUY_RESULT_SUCCESS_2;
}
s32 EnGirlA_CanBuyPotionGreen(GlobalContext* globalCtx, EnGirlA* this) {
@@ -201,36 +201,36 @@ s32 EnGirlA_CanBuyPotionGreen(GlobalContext* globalCtx, EnGirlA* this) {
if (gSaveContext.rupees < globalCtx->msgCtx.unk1206C) {
return CANBUY_RESULT_NEED_RUPEES;
}
return CANBUY_RESULT_SUCCESS;
return CANBUY_RESULT_SUCCESS_2;
}
s32 EnGirlA_CanBuyPotionBlue(GlobalContext* globalCtx, EnGirlA* this) {
if (!(gSaveContext.weekEventReg[53] & 8)) {
return CANBUY_RESULT_CANT_GET_NOW;
return CANBUY_RESULT_CANNOT_GET_NOW;
}
if (!func_80114E90()) {
return CANBUY_RESULT_NEED_EMPTY_BOTTLE;
}
if (!(gSaveContext.weekEventReg[53] & 0x10)) {
return CANBUY_RESULT_SUCCESS;
return CANBUY_RESULT_SUCCESS_2;
}
if (gSaveContext.rupees < globalCtx->msgCtx.unk1206C) {
return CANBUY_RESULT_NEED_RUPEES;
}
return CANBUY_RESULT_SUCCESS;
return CANBUY_RESULT_SUCCESS_2;
}
s32 EnGirlA_CanBuyArrows(GlobalContext* globalCtx, EnGirlA* this) {
if (CUR_UPG_VALUE_VOID(UPG_QUIVER) == 0) {
return CANBUY_RESULT_NO_ROOM_2;
return CANBUY_RESULT_CANNOT_GET_NOW_2;
}
if (AMMO(ITEM_BOW) >= CUR_CAPACITY(UPG_QUIVER)) {
return CANBUY_RESULT_NO_ROOM_3;
return CANBUY_RESULT_NO_ROOM_2;
}
if (gSaveContext.rupees < globalCtx->msgCtx.unk1206C) {
return CANBUY_RESULT_NEED_RUPEES;
}
return CANBUY_RESULT_SUCCESS;
return CANBUY_RESULT_SUCCESS_2;
}
s32 EnGirlA_CanBuyNuts(GlobalContext* globalCtx, EnGirlA* this) {
@@ -241,9 +241,9 @@ s32 EnGirlA_CanBuyNuts(GlobalContext* globalCtx, EnGirlA* this) {
return CANBUY_RESULT_NEED_RUPEES;
}
if (func_80114978(ITEM_NUT) == ITEM_NONE) {
return CANBUY_RESULT_SUCCESS_FANFARE;
return CANBUY_RESULT_SUCCESS_1;
}
return CANBUY_RESULT_SUCCESS;
return CANBUY_RESULT_SUCCESS_2;
}
s32 EnGirlA_CanBuyShieldHero(GlobalContext* globalCtx, EnGirlA* this) {
@@ -253,7 +253,7 @@ s32 EnGirlA_CanBuyShieldHero(GlobalContext* globalCtx, EnGirlA* this) {
if (gSaveContext.rupees < globalCtx->msgCtx.unk1206C) {
return CANBUY_RESULT_NEED_RUPEES;
}
return CANBUY_RESULT_SUCCESS_FANFARE;
return CANBUY_RESULT_SUCCESS_1;
}
s32 EnGirlA_CanBuyStick(GlobalContext* globalCtx, EnGirlA* this) {
@@ -264,26 +264,26 @@ s32 EnGirlA_CanBuyStick(GlobalContext* globalCtx, EnGirlA* this) {
return CANBUY_RESULT_NEED_RUPEES;
}
if (func_80114978(ITEM_STICK) == ITEM_NONE) {
return CANBUY_RESULT_SUCCESS_FANFARE;
return CANBUY_RESULT_SUCCESS_1;
}
return CANBUY_RESULT_SUCCESS;
return CANBUY_RESULT_SUCCESS_2;
}
s32 EnGirlA_CanBuyMaskAllNight(GlobalContext* globalCtx, EnGirlA* this) {
if (gSaveContext.rupees < globalCtx->msgCtx.unk1206C) {
return CANBUY_RESULT_NEED_RUPEES;
}
return CANBUY_RESULT_SUCCESS;
return CANBUY_RESULT_SUCCESS_2;
}
s32 EnGirlA_CanBuyBombBagCuriosityShop(GlobalContext* globalCtx, EnGirlA* this) {
if (CUR_UPG_VALUE_VOID(UPG_BOMB_BAG) >= 2) {
return CANBUY_RESULT_CANT_GET_NOW;
return CANBUY_RESULT_CANNOT_GET_NOW;
}
if (gSaveContext.rupees < globalCtx->msgCtx.unk1206C) {
return CANBUY_RESULT_NEED_RUPEES;
}
return CANBUY_RESULT_SUCCESS;
return CANBUY_RESULT_SUCCESS_2;
}
s32 EnGirlA_CanBuyBombBag20BombShop(GlobalContext* globalCtx, EnGirlA* this) {
@@ -296,7 +296,7 @@ s32 EnGirlA_CanBuyBombBag20BombShop(GlobalContext* globalCtx, EnGirlA* this) {
if (gSaveContext.rupees < globalCtx->msgCtx.unk1206C) {
return CANBUY_RESULT_NEED_RUPEES;
}
return CANBUY_RESULT_SUCCESS_FANFARE;
return CANBUY_RESULT_SUCCESS_1;
}
s32 EnGirlA_CanBuyBombBag30BombShop(GlobalContext* globalCtx, EnGirlA* this) {
@@ -309,12 +309,12 @@ s32 EnGirlA_CanBuyBombBag30BombShop(GlobalContext* globalCtx, EnGirlA* this) {
if (gSaveContext.rupees < globalCtx->msgCtx.unk1206C) {
return CANBUY_RESULT_NEED_RUPEES;
}
return CANBUY_RESULT_SUCCESS_FANFARE;
return CANBUY_RESULT_SUCCESS_1;
}
s32 EnGirlA_CanBuyBombchus(GlobalContext* globalCtx, EnGirlA* this) {
if (CUR_UPG_VALUE_VOID(UPG_BOMB_BAG) == 0) {
return CANBUY_RESULT_CANT_GET_NOW;
return CANBUY_RESULT_CANNOT_GET_NOW;
}
if (AMMO(ITEM_BOMBCHU) >= CUR_CAPACITY(UPG_BOMB_BAG)) {
return CANBUY_RESULT_NO_ROOM;
@@ -323,14 +323,14 @@ s32 EnGirlA_CanBuyBombchus(GlobalContext* globalCtx, EnGirlA* this) {
return CANBUY_RESULT_NEED_RUPEES;
}
if (func_80114978(ITEM_BOMBCHU) == ITEM_NONE) {
return CANBUY_RESULT_SUCCESS_FANFARE;
return CANBUY_RESULT_SUCCESS_1;
}
return CANBUY_RESULT_SUCCESS;
return CANBUY_RESULT_SUCCESS_2;
}
s32 EnGirlA_CanBuyBombs(GlobalContext* globalCtx, EnGirlA* this) {
if (CUR_UPG_VALUE_VOID(UPG_BOMB_BAG) == 0) {
return CANBUY_RESULT_CANT_GET_NOW;
return CANBUY_RESULT_CANNOT_GET_NOW;
}
if (AMMO(ITEM_BOMB) >= CUR_CAPACITY(UPG_BOMB_BAG)) {
return CANBUY_RESULT_NO_ROOM;
@@ -338,21 +338,21 @@ s32 EnGirlA_CanBuyBombs(GlobalContext* globalCtx, EnGirlA* this) {
if (gSaveContext.rupees < globalCtx->msgCtx.unk1206C) {
return CANBUY_RESULT_NEED_RUPEES;
}
return CANBUY_RESULT_SUCCESS;
return CANBUY_RESULT_SUCCESS_2;
}
s32 EnGirlA_CanBuyBottle(GlobalContext* globalCtx, EnGirlA* this) {
if (gSaveContext.rupees < globalCtx->msgCtx.unk1206C) {
return CANBUY_RESULT_NEED_RUPEES;
}
return CANBUY_RESULT_SUCCESS_FANFARE;
return CANBUY_RESULT_SUCCESS_1;
}
s32 EnGirlA_CanBuySword(GlobalContext* globalCtx, EnGirlA* this) {
if (gSaveContext.rupees < globalCtx->msgCtx.unk1206C) {
return CANBUY_RESULT_NEED_RUPEES;
}
return CANBUY_RESULT_SUCCESS_FANFARE;
return CANBUY_RESULT_SUCCESS_1;
}
s32 EnGirlA_CanBuyShieldMirror(GlobalContext* globalCtx, EnGirlA* this) {
@@ -362,7 +362,7 @@ s32 EnGirlA_CanBuyShieldMirror(GlobalContext* globalCtx, EnGirlA* this) {
if (gSaveContext.rupees < globalCtx->msgCtx.unk1206C) {
return CANBUY_RESULT_NEED_RUPEES;
}
return CANBUY_RESULT_SUCCESS_FANFARE;
return CANBUY_RESULT_SUCCESS_1;
}
s32 EnGirlA_CanBuyFairy(GlobalContext* globalCtx, EnGirlA* this) {
@@ -372,7 +372,7 @@ s32 EnGirlA_CanBuyFairy(GlobalContext* globalCtx, EnGirlA* this) {
if (gSaveContext.rupees < globalCtx->msgCtx.unk1206C) {
return CANBUY_RESULT_NEED_RUPEES;
}
return CANBUY_RESULT_SUCCESS;
return CANBUY_RESULT_SUCCESS_2;
}
void EnGirlA_BuyBottleItem(GlobalContext* globalCtx, EnGirlA* this) {
+74 -5
View File
@@ -48,18 +48,87 @@ typedef struct EnGirlA {
} EnGirlA; // size = 0x1CC
typedef enum {
/* 0 */ CANBUY_RESULT_SUCCESS_FANFARE,
/* 1 */ CANBUY_RESULT_SUCCESS,
/* 0 */ CANBUY_RESULT_SUCCESS_1,
/* 1 */ CANBUY_RESULT_SUCCESS_2,
/* 2 */ CANBUY_RESULT_NO_ROOM,
/* 3 */ CANBUY_RESULT_NEED_EMPTY_BOTTLE,
/* 4 */ CANBUY_RESULT_NEED_RUPEES,
/* 5 */ CANBUY_RESULT_CANT_GET_NOW,
/* 6 */ CANBUY_RESULT_NO_ROOM_2,
/* 7 */ CANBUY_RESULT_NO_ROOM_3,
/* 5 */ CANBUY_RESULT_CANNOT_GET_NOW,
/* 6 */ CANBUY_RESULT_CANNOT_GET_NOW_2,
/* 7 */ CANBUY_RESULT_NO_ROOM_2,
/* 8 */ CANBUY_RESULT_ALREADY_HAVE,
/* 9 */ CANBUY_RESULT_HAVE_BETTER
} EnGirlACanBuyResult;
typedef enum {
/* 00 */ SI_POTION_RED_1,
/* 01 */ SI_POTION_GREEN_1,
/* 02 */ SI_POTION_BLUE,
/* 03 */ SI_FAIRY_1,
/* 04 */ SI_ARROWS_LARGE_1,
/* 05 */ SI_POTION_GREEN_2,
/* 06 */ SI_SHIELD_HERO_1,
/* 07 */ SI_STICK_1,
/* 08 */ SI_ARROWS_MEDIUM_1,
/* 09 */ SI_NUTS_1,
/* 10 */ SI_POTION_RED_2,
/* 11 */ SI_FAIRY_2,
/* 12 */ SI_ARROWS_MEDIUM_2,
/* 13 */ SI_ARROWS_LARGE_2,
/* 14 */ SI_POTION_GREEN_3,
/* 15 */ SI_NUTS_2,
/* 16 */ SI_STICK_2,
/* 17 */ SI_SHIELD_HERO_2,
/* 18 */ SI_POTION_RED_3,
/* 19 */ SI_MASK_ALL_NIGHT,
/* 20 */ SI_BOMB_BAG_20_1,
/* 21 */ SI_BOMB_BAG_30_1,
/* 22 */ SI_BOMB_BAG_40,
/* 23 */ SI_BOMB_BAG_20_2,
/* 24 */ SI_BOMB_BAG_30_2,
/* 25 */ SI_BOMBCHU,
/* 26 */ SI_BOMB_1,
/* 27 */ SI_SHIELD_HERO_3,
/* 28 */ SI_ARROWS_SMALL_1,
/* 29 */ SI_POTION_RED_4,
/* 30 */ SI_BOMB_2,
/* 31 */ SI_ARROWS_SMALL_2,
/* 32 */ SI_POTION_RED_5,
/* 33 */ SI_BOMB_3,
/* 34 */ SI_ARROWS_SMALL_3,
/* 35 */ SI_POTION_RED_6,
/* 36 */ SI_BOTTLE,
/* 37 */ SI_SWORD_GREAT_FAIRY,
/* 38 */ SI_SWORD_KOKIRI,
/* 39 */ SI_SWORD_RAZOR,
/* 40 */ SI_SWORD_GILDED,
/* 41 */ SI_SHIELD_HERO_4,
/* 42 */ SI_SHIELD_MIRROR,
} EnGirlAShopItemId;
extern const ActorInit En_GirlA_InitVars;
/*
* Shopkeeper Common Defines
*/
#define CURSOR_INVALID 0xFF
#define COL_CHAN_MIX(c1, c2, m) (c1 - (s32)(c2 * m)) & 0xFF
typedef struct {
/* 0x00 */ u32 stickColorR;
/* 0x04 */ u32 stickColorG;
/* 0x08 */ u32 stickColorB;
/* 0x0C */ u32 stickColorA;
/* 0x10 */ f32 stickTexX;
/* 0x14 */ f32 stickTexY;
/* 0x18 */ u32 arrowColorR;
/* 0x1C */ u32 arrowColorG;
/* 0x20 */ u32 arrowColorB;
/* 0x24 */ u32 arrowColorA;
/* 0x28 */ f32 arrowTexX;
/* 0x2C */ f32 arrowTexY;
/* 0x30 */ f32 texZ; // Used for both stickTexZ and arrowTexZ
/* 0x34 */ s32 isEnabled;
} StickDirectionPrompt; // size = 0x38
#endif // Z_EN_GIRLA_H
@@ -1400,7 +1400,7 @@ s32 func_80B45550(EnInvadepoh* this, GlobalContext* globalCtx, f32 range, s32 ar
void EnInvadepoh_SetTextID(EnInvadepoh* this, GlobalContext* globalCtx, u16 arg2) {
this->textId = arg2;
func_801518B0(globalCtx, arg2 & 0xFFFF, &this->actor);
func_801518B0(globalCtx, arg2, &this->actor);
}
void func_80B45648(EnInvadepoh* this) {
+1 -1
View File
@@ -465,7 +465,7 @@ s32 func_80BA4204(EnToto* this, GlobalContext* globalCtx) {
if (DECR(this->unk2B1) == 0) {
if (!ENTOTO_WEEK_EVENT_FLAGS) {
temp_v1_2 = &D_80BA50DC[gSaveContext.playerForm - 1];
func_801518B0(globalCtx, (this->text->unk0 == 6 ? temp_v1_2->unk0 : temp_v1_2->unk4) & 0xFFFF, NULL);
func_801518B0(globalCtx, (this->text->unk0 == 6 ? temp_v1_2->unk0 : temp_v1_2->unk4), NULL);
}
return 1;
}
@@ -97,16 +97,15 @@ void func_80B3C39C(ObjGhaka* this, GlobalContext* globalCtx) {
}
void func_80B3C4E0(ObjGhaka* this, GlobalContext* globalCtx) {
s32 temp_v0 = func_80152498(&globalCtx->msgCtx);
s32 talkState = func_80152498(&globalCtx->msgCtx);
if (temp_v0 == 5) {
if (talkState == 5) {
if (func_80147624(globalCtx)) {
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.unk12023 = 4;
func_80B3C260(this);
}
// Could be fake, but helps match
} else if ((temp_v0 & 0xFFFFFFFF) == 4) {
} else if (talkState == 4) {
if (func_80147624(globalCtx)) {
switch (globalCtx->msgCtx.choiceIndex) {
case 0: