`z_demo` with 4 NON_MATCHINGs (#514)

* starting

* a bunch

* and another bunch

* a bunch

* Match func_800EB1DC

* func_800EB4B4

* func_800EB6F8

* 2 more

* fix prototype of a random kankyo function

* func_800EBD60 non matching

* func_800EC678 matched?

* func_800EC6D4

* break

* func_800ECD7C

* A bunch of functions

* func_800EE200

* func_800EDF78 and func_800EE0CC

* func_800EDBE0 NON_MATCHING

* Cutscene_Init NON_MATCHING

* func_800EA324 NON_EQUIVALENT

* Fix warnings

* func_800EC924 NON_EQUIVALENT

* Cutscene_ProcessCommands NON_EQUIVALENT

* Format

* Split z_demo data and import it

* Import bss

* Match func_800EB364

* Rename Cutscene_Command_SetTime

* Improve Cutscene_ProcessCommands a bit (still not equivalent, probably)

* Improve Cutscene_ProcessCommands thanks to engineer and anon

* Cutscene_ProcessCommands NON_MATCHING

* Name some commands

* Fix

* Renames based on Engineer knowledge of Audio stuff

* More command names

* Cutscene_Command_GiveTatlToPlayer

* Some cutscene commands macros

* more command macros

* Macros for unknown commands

* Improve Cutscene_Command_Textbox a bit

* Rename stuff

* Name Terminator and Camera

* MOTIONBLUR

* Macros for textbox commands

* CS_PLAYER_ACTION_LIST

* A few macro renames

* Small cleaning

* A bit more of cleanup

* Rumble

* Entrance comments in func_800EB6F8

* Some var renames

* CS_CMD_FADESCREEN

* More clean up

* Clean functions protos

* Move CutsceneStateHandler out of z64.h

* Cutscene_DoNothing

* Cutscene_IsPlayingCs & Cutscene_GetSceneSetupIndex

* And more renames

* name some stuff in the cutscenecontext struct

* npcActionIndex->actorActionIndex

* Undo names of CS_STATE_ enum

* Name Cutscene_ActorTranslate family of functions

* small docs pass

* sfxconvert and format

* Hopefully last cleanup

* Add some missing functions to actorfixer

* Fix merge issues and remove trailing commas

* Cutscene commands fix

* Cutscene_Command_Misc improved by engineer

* Update src/code/z_demo.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Address review

* bss

* Match Cutscene_Command_Textbox by anon58

* Fix merge issues

* Match Cutscene_Command_Misc by @hensldm

* review

* float time macros

* fix merge issues

* format

* Fix building assets

* fix merge issues

* format

* Fix

* format

* fix merge issues

* fix

* fix

* format

* fix issues and run format

* bss

* Fix conflicts, bss and formatter

* Update include/functions.h

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update include/functions.h

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update include/z64.h

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update include/z64cutscene.h

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update include/z64cutscene.h

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update include/z64cutscene.h

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/code/z_demo.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/code/z_demo.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/code/z_demo.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/code/z_demo.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/code/z_demo.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* address review and fix some stuff

* fix merge problems

* more fixes and format

* Fixes

* Update include/functions.h

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update include/functions.h

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/code/z_demo.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/code/z_demo.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/code/z_demo.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/code/z_demo.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Engineer suggestions

* format

* Elliptic review

* Use dec for ShrinkWindow_SetLetterboxTarget

* add a few comments

* Cutscene_Command_ChooseCreditsScenes

* Update src/code/z_demo.c

Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>

* format

* some cleanups and some comments

* change actorActionCmd from hex to dec in the codebase

* minor comment on textboxcmd

* ahhhh

* Update src/code/z_demo.c

Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>

* brackets

* minor comments

* rewording

* im dumb

* brackets

* another bracket

* Dawn of the New Day

* Update src/code/z_demo.c

Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>

* fixes

* Cutscene_Command_TransitionFX by Anon

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>
This commit is contained in:
Anghelo Carvajal 2022-03-04 21:14:52 -03:00 committed by GitHub
parent 8b7cbb1273
commit 77cfd399d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
137 changed files with 3837 additions and 1599 deletions

View File

@ -133,6 +133,8 @@ ASM_DIRS := $(shell find asm -type d -not -path "asm/non_matchings*") $(shell fi
## Assets binaries (PNGs, JPGs, etc)
ASSET_BIN_DIRS := $(shell find assets/* -type d -not -path "assets/xml*")
# Prevents building C files that will be #include'd
ASSET_BIN_DIRS_C_FILES := $(shell find assets/* -type d -not -path "assets/xml*" -not -path "assets/code*" -not -path "assets/overlays*")
ASSET_FILES_XML := $(foreach dir,$(ASSET_BIN_DIRS),$(wildcard $(dir)/*.xml))
ASSET_FILES_BIN := $(foreach dir,$(ASSET_BIN_DIRS),$(wildcard $(dir)/*.bin))
@ -144,7 +146,7 @@ TEXTURE_FILES_JPG := $(foreach dir,$(ASSET_BIN_DIRS),$(wildcard $(dir)/*.jpg))
TEXTURE_FILES_OUT := $(foreach f,$(TEXTURE_FILES_PNG:.png=.inc.c),build/$f) \
$(foreach f,$(TEXTURE_FILES_JPG:.jpg=.jpg.inc.c),build/$f) \
C_FILES := $(foreach dir,$(SRC_DIRS) $(ASSET_BIN_DIRS),$(wildcard $(dir)/*.c))
C_FILES := $(foreach dir,$(SRC_DIRS) $(ASSET_BIN_DIRS_C_FILES),$(wildcard $(dir)/*.c))
S_FILES := $(shell grep -F "build/asm" spec | sed 's/.*build\/// ; s/\.o\".*/.s/') \
$(shell grep -F "build/data" spec | sed 's/.*build\/// ; s/\.o\".*/.s/')
BASEROM_FILES := $(shell grep -F "build/baserom" spec | sed 's/.*build\/// ; s/\.o\".*//')
@ -174,7 +176,7 @@ build/src/libultra/flash/%.o: MIPS_VERSION := -mips1
build/src/code/audio/%.o: OPTFLAGS := -O2
build/assets/%.o: OPTFLAGS :=
build/assets/%.o: OPTFLAGS := -O1
# file flags
build/src/boot_O2_g3/fault.o: CFLAGS += -trapuv
@ -205,6 +207,8 @@ build/src/overlays/fbdemos/%.o: CC := python3 tools/asm-processor/build.py $(CC)
build/src/overlays/gamestates/%.o: CC := python3 tools/asm-processor/build.py $(CC) -- $(AS) $(ASFLAGS) --
build/src/overlays/kaleido_scope/%.o: CC := python3 tools/asm-processor/build.py $(CC) -- $(AS) $(ASFLAGS) --
build/assets/%.o: CC := python3 tools/asm-processor/build.py $(CC) -- $(AS) $(ASFLAGS) --
#### Main Targets ###
uncompressed: $(ROM)

View File

@ -1,5 +1,5 @@
<Root>
<File Name="Z2_LOST_WOODS" Segment="3" Game="MM">
<File Name="Z2_LOST_WOODS" Segment="2" Game="MM">
<Texture Name="Z2_LOST_WOODSTex_00B9D0" Format="ia16" Width="64" Height="64" Offset="0xB9D0"/>
<Scene Name="Z2_LOST_WOODS" Offset="0x0"/>

View File

@ -17,9 +17,9 @@
#define CMD_W(a) (a)
#ifdef __GNUC__
#define CMD_F(a) {.f = (a)}
#define CMD_F(a) .f = (a)
#else
#define CMD_F(a) {(a)}
#define CMD_F(a) (a)
#endif
#define CMD_PTR(a) (uintptr_t)(a)

View File

@ -1396,55 +1396,24 @@ DebugDispObject* DebugDisplay_AddObject(f32 posX, f32 posY, f32 posZ, s16 rotX,
// void func_800E9DBC(void);
// void func_800E9E94(void);
void func_800E9F78(GraphicsContext* gfxCtx);
void Cutscene_Init(GlobalContext* globalCtx, CutsceneContext* csCtx);
void func_800EA0D4(GlobalContext* globalCtx, CutsceneContext* csCtx);
void func_800EA0EC(GlobalContext* globalCtx, CutsceneContext* csCtx);
void Cutscene_StepCutscene1(GlobalContext* globalCtx, CutsceneContext* csCtx);
void Cutscene_StepCutscene2(GlobalContext* globalCtx, CutsceneContext* csCtx);
void Cutscene_Nop800EA210(GlobalContext* globalCtx, CutsceneContext* csCtx);
s32 func_800EA220(GlobalContext* globalCtx, CutsceneContext* csCtx, f32 target);
void func_800EA258(GlobalContext* globalCtx, CutsceneContext* csCtx);
void func_800EA2B8(GlobalContext* globalCtx, CutsceneContext* csCtx);
void func_800EA324(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase* cmd);
void func_800EABAC(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdEnvLighting* cmd);
void func_800EAC08(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdMusicChange* cmd);
void func_800EAC44(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdMusicChange* cmd);
void func_800EAC94(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdMusicFade* cmd);
void func_800EAD14(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase* cmd);
void func_800EAD48(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase* cmd);
void func_800EAD7C(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase* cmd);
void func_800EADB0(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase* cmd);
void func_800EAECC(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase* cmd);
void func_800EAF20(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdUnk190* cmd);
void func_800EAFE0(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdUnk9B* cmd);
void func_800EB1DC(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdDayTime* cmd);
void func_800EB364(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase* cmd);
void func_800EB4B4(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase* cmd);
void func_800EB6F8(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase* cmd);
void func_800EBB68(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase* cmd);
void func_800EBCD0(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase* cmd);
void func_800EBD60(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase* cmd);
s32 func_800EC678(GlobalContext* globalCtx, CsCmdUnk5A* cmd);
// u32 func_800EC6D4(void);
void func_800EC924(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdTextbox* cmd);
void func_800ECD7C(CutsceneContext* csCtx, u8** cutscenePtr, s16 index);
void Cutscene_ProcessCommands(GlobalContext* globalCtx, CutsceneContext* csCtx, u8* cutscenePtr, u16* commandReadHead);
void func_800ED980(GlobalContext* globalCtx, CutsceneContext* csCtx);
void func_800ED9C4(GlobalContext* globalCtx, CutsceneContext* csCtx);
void func_800EDA04(GlobalContext* globalCtx, CutsceneContext* csCtx);
void func_800EDA84(GlobalContext* globalCtx, CutsceneContext* csCtx);
void Cutscene_Start(GlobalContext* globalCtx, CutsceneContext* csCtx);
void Cutscene_End(GlobalContext* globalCtx, CutsceneContext* csCtx);
void Cutscene_Update1(GlobalContext* globalCtx, CutsceneContext* csCtx);
void Cutscene_Update2(GlobalContext* globalCtx, CutsceneContext* csCtx);
void func_800EDBE0(GlobalContext* globalCtx);
void nop_800EDDB0(GlobalContext* globalCtx);
// void func_800EDDBC(void);
void func_800EDDCC(GlobalContext* globalCtx, u32 uParm2);
void func_800EDE34(Actor* actor, GlobalContext* globalCtx, s32 param_3);
void func_800EDF24(Actor* actor, GlobalContext* globalCtx, u32 arg2);
void func_800EDF78(Actor* actor, GlobalContext* globalCtx, s32 iParm3);
void func_800EE0CC(Actor* actor, GlobalContext* globalCtx, s32 iParm3);
s32 func_800EE1D8(GlobalContext* globalCtx);
u32 func_800EE200(GlobalContext* globalCtx, u16 uParm2);
u32 func_800EE29C(GlobalContext* globalCtx, u16 uParm2);
u32 func_800EE2F4(GlobalContext* globalCtx);
void func_800EDDB0(GlobalContext* globalCtx);
void Cutscene_LoadCutsceneData(GlobalContext* globalCtx, u8 csIndex);
void Cutscene_ActorTranslate(Actor* actor, GlobalContext* globalCtx, s32 actorActionIndex);
void Cutscene_ActorTranslateAndYaw(Actor* actor, GlobalContext* globalCtx, s32 actorActionIndex);
void Cutscene_ActorTranslateAndYawSmooth(Actor* actor, GlobalContext* globalCtx, s32 actorActionIndex);
void Cutscene_ActorTranslateXZAndYawSmooth(Actor* actor, GlobalContext* globalCtx, s32 actorActionIndex);
s32 Cutscene_GetSceneSetupIndex(GlobalContext* globalCtx);
s32 Cutscene_GetActorActionIndex(GlobalContext* globalCtx, u16 actorActionCmd);
s32 Cutscene_CheckActorAction(GlobalContext* globalCtx, u16 actorActionCmd);
u8 Cutscene_IsPlaying(GlobalContext* globalCtx);
void GetItem_Draw(GlobalContext* globalCtx, s16 index);
void func_800EE364(GlobalContext* globalCtx, s16 index);
void func_800EE400(GlobalContext* globalCtx, s16 index);
@ -1506,7 +1475,7 @@ s16 ActorCutscene_GetLength(s16 index);
s32 func_800F2138(s8 arg0);
s32 func_800F2178(s16 arg0);
s16 ActorCutscene_GetCurrentCamera(s16 index);
// void func_800F21CC(void);
s16 func_800F21CC(void);
s32 func_800F22C4(s16 param_1, Actor* actor);
void ActorCutscene_SetReturnCamera(s16 index);
// void func_800F23E0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
@ -1546,7 +1515,7 @@ void Font_LoadOrderedFont(Font* font);
// void func_800F50D4(void);
void Kankyo_Init(GlobalContext* globalCtx, EnvironmentContext* envCtx);
u32 func_800F5954(u8* param_1, u32 param_2, u32 param_3, u8 param_4, u8 param_5);
f32 func_800F5A8C(u16 arg0, u16 arg1, u16 arg2, GlobalContext* globalContext);
f32 Environment_LerpWeight(u16 max, u16 min, u16 val);
// void func_800F5B10(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5);
// void func_800F5CD0(void);
void func_800F6834(GlobalContext* globalCtx, s32 waterLightsIndex);
@ -1574,7 +1543,7 @@ void func_800FAAB4(GlobalContext* globalCtx, u8 arg1);
// void func_800FAC20(void);
// void func_800FAF74(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE1 param_5);
// void func_800FB010(void);
void func_800FB320(GlobalContext* globalCtx, u8 param_2);
void Environment_AddLightningBolts(GlobalContext* globalCtx, u8 num);
// void func_800FB388(void);
void func_800FB758(GlobalContext* globalCtx);
// void func_800FB9B4(void);
@ -2630,7 +2599,7 @@ u32 Sram_CalcChecksum(u8* data, u32 length);
// void Sram_GenerateRandomSaveFields(void);
void func_80144890(void);
void Sram_InitDebugSave(void);
// void func_80144A94(void);
void func_80144A94(SramContext* sramCtx);
// void func_80144E78(void);
// void func_8014546C(void);
// void func_80145698(void);
@ -2642,8 +2611,8 @@ void func_80146580(s32 param_1, SramContext* param_2, s32 param_3);
void func_80146E40(GameState* gameState, SramContext* sramCtx);
void Sram_Alloc(GameState* gameState, SramContext* sramCtx);
// void func_80146EBC(SramContext* param_1, UNK_TYPE4 param_2, UNK_TYPE4 param_3);
// void func_80146EE8(void);
// void func_80146F5C(void);
void func_80146EE8(GlobalContext* globalCtx);
void func_80146F5C(GlobalContext* globalCtx);
// void func_80147008(void);
void func_80147020(SramContext* param_1);
void func_80147068(SramContext* param_1);
@ -2655,8 +2624,8 @@ void func_80147198(SramContext* param_1);
// void Sram_nop8014750C(UNK_TYPE4 param_1);
// void func_80147520(void);
void func_80147564(GlobalContext* globalCtx);
u32 func_80147624(GlobalContext* globalCtx);
u32 func_80147734(GlobalContext* globalCtx);
s32 func_80147624(GlobalContext* globalCtx);
s32 func_80147734(GlobalContext* globalCtx);
void func_801477B4(GlobalContext* globalCtx);
// void func_80147818(GlobalContext* globalCtx, UNK_PTR puParm2, UNK_TYPE4 uParm3, UNK_TYPE4 uParm4);
// void func_80147F18(GlobalContext* globalCtx, UNK_PTR puParm2, UNK_TYPE4 uParm3, UNK_TYPE4 uParm4);
@ -2685,7 +2654,7 @@ void func_8014ADBC(GlobalContext* globalCtx, UNK_PTR puParm2);
// void func_80150A84(void);
void func_80150D08(GlobalContext* globalCtx, u32 uParm2);
// void func_801514B0(void);
void func_801518B0(GlobalContext* globalCtx, u16 textId, Actor* Actor);
void Message_StartTextbox(GlobalContext* globalCtx, u16 textId, Actor* Actor);
void func_80151938(GlobalContext* globalCtx, u16 textId);
void func_80151A68(GlobalContext* globalCtx, u16 textId);
void func_80151BB4(GlobalContext* globalCtx, u32 uParm2);
@ -2739,13 +2708,13 @@ void ShrinkWindow_Destroy(void);
void ShrinkWindow_Update(s32 framerateDivisor);
void ShrinkWindow_Draw(GraphicsContext* gfxCtx);
// void func_80161180(void);
// void func_8016119C(void);
void func_8016119C(Camera* camera, struct_801F4D48* arg1);
// void func_8016122C(void);
// void func_801612B8(void);
// void func_80161998(void);
s32 func_80161998(UNK_PTR arg0, struct_801F4D48* arg1);
// s32 func_80161BAC(void);
// void func_80161BE0(void);
// void func_80161C0C(void);
void func_80161BE0(s16 arg0);
void func_80161C0C(void);
// void func_80161C20(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// void func_80161E4C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// void func_801620CC(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
@ -2808,7 +2777,7 @@ void func_80165438(UNK_PTR param_1);
// void func_80165608(void);
// void func_80165630(void);
void func_80165658(u32 arg0);
void func_8016566C(u32 arg0);
void func_8016566C(s32 arg0);
void func_80165690(void);
// void func_801656A4(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8);
// void func_80165DCC(void);
@ -3616,7 +3585,7 @@ void func_8019C300(s32 arg0);
// void func_8019D488(void);
// void func_8019D4F8(void);
// void func_8019D600(void);
// void func_8019D758(void);
void func_8019D758(void);
// void func_8019D864(void);
// void func_8019D8B4(void);
// void func_8019D8E4(void);
@ -3700,7 +3669,7 @@ void func_801A1FB4(u8 playerIdx, Vec3f* pos, u16 seqId, f32 maxDist);
void func_801A246C(u8 param_1, u8 param_2);
// void func_801A2544(void);
// void func_801A257C(void);
// void func_801A25E4(void);
void func_801A25E4(u16 seqId, u8 dayMinusOne);
// void func_801A2670(void);
// void func_801A2778(void);
// void func_801A27E8(void);
@ -3709,8 +3678,8 @@ void func_801A29D4(UNK_TYPE arg0, f32 arg1, UNK_TYPE arg2);
void func_801A2BB8(s32 seqId);
void func_801A2C20(void);
// void func_801A2C44(void);
// void func_801A2C88(void);
// void func_801A2D54(void);
void func_801A2C88(u16 seqId);
void func_801A2D54(u16 seqId);
s32 Audio_IsSequencePlaying(u8 seqId);
void func_801A2E54(s32 param_1);
void func_801A2ED8(void);
@ -3723,7 +3692,7 @@ void func_801A31EC(u16 seqId, s8 arg1, u8 arg2);
// void func_801A3238(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE1 param_5);
// void func_801A32CC(void);
// void func_801A3590(void);
// void func_801A3950(void);
u8 func_801A3950(s32 playerIndex, s32 isChannelIOSet);
u8 func_801A39F8(void);
// void func_801A3A7C(void);
// void func_801A3AC0(void);
@ -3735,7 +3704,7 @@ void func_801A3CD8(s8 param_1);
// void func_801A3D98(void);
// void func_801A3E38(void);
// void func_801A3EC0(void);
void func_801A3F54(u8 flag);
void Audio_SetCutsceneFlag(u8 flag);
// void func_801A3F6C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// void func_801A3FB4(void);
// void func_801A3FFC(UNK_TYPE1 param_1);
@ -3748,16 +3717,16 @@ void audio_setBGM(u32 bgmID);
// void func_801A4324(void);
// void func_801A4348(void);
// void func_801A4380(void);
// void func_801A4428(void);
void func_801A4428(u8 reverbIndex);
void Audio_PreNMI(void);
// void func_801A44C4(void);
// void func_801A44D4(void);
s32 func_801A46F8(void);
void func_801A4748(Vec3f* pos, u16 sfxId);
void func_801A479C(Vec3f* arg0, u16 sfxId, s32 arg2);
// void func_801A47DC(void);
void func_801A47DC(u8 channelIndexRange, u8 port, u8 val);
// void func_801A48E0(void);
void func_801A4A28(s32 arg0);
void func_801A4A28(u8 natureSeqId);
// void func_801A4B80(void);
void func_801A4C30(void);
// void func_801A4C54(void);

View File

@ -1,5 +1,5 @@
#ifndef _MACROS_H_
#define _MACROS_H_
#ifndef MACROS_H
#define MACROS_H
#include "libc/stdint.h"
#include "ultra64/convert.h"
@ -49,9 +49,16 @@
#define CURRENT_DAY (((void)0, gSaveContext.day) % 5)
#define CLOCK_TIME(hr, min) ((s32)(((hr) * 60 + (min)) * 0x10000 / (24 * 60)))
#define TIME_TO_MINUTES(time) (s32)((time) * ((24 * 60) / 0x10000))
#define CLOCK_TIME(hr, min) (s32)(((hr) * 60 + (min)) * 0x10000 / (24 * 60))
#define CLOCK_TIME_MINUTE (CLOCK_TIME(0, 1))
#define TIME_TO_MINUTES_F(time) ((time) * ((24.0f * 60.0f) / 0x10000))
#define CLOCK_TIME_F(hr, min) (((hr) * 60.0f + (min)) * (0x10000 / (24.0f * 60.0f)))
#define TIME_TO_MINUTES_ALT_F(time) ((time) / (24.0f * 60.0f / 0x10000))
#define CLOCK_TIME_ALT_F(hr, min) (((hr) * 60.0f + (min)) / (24.0f * 60.0f / 0x10000))
#define SLOT(item) gItemSlots[item]
#define AMMO(item) gSaveContext.inventory.ammo[SLOT(item)]
#define INV_CONTENT(item) gSaveContext.inventory.items[SLOT(item)]

View File

@ -1,8 +1,8 @@
/* Header taken as placeholder from OoT sister project */
/* Confirm as needed */
#ifndef _REGS_H_
#define _REGS_H_
#ifndef REGS_H
#define REGS_H
#define REG_GROUPS 29 // number of REG groups, i.e. REG, SREG, OREG, etc.
#define REG_PAGES 6

View File

@ -1,5 +1,5 @@
#ifndef _UNK_H_
#define _UNK_H_
#ifndef UNK_H
#define UNK_H
#include "PR/ultratypes.h"

View File

@ -869,14 +869,9 @@ extern EffectShieldParticleInit shieldParticleInitWood;
// extern UNK_TYPE1 D_801BB0DC;
// extern UNK_TYPE2 D_801BB0FC;
// extern UNK_TYPE1 D_801BB100;
// extern UNK_TYPE2 D_801BB124;
// extern UNK_TYPE2 D_801BB128;
extern u8 D_801BB12C;
// extern UNK_TYPE1 D_801BB130;
extern cutscene_update_func sCsStateHandlers1[5];
extern cutscene_update_func sCsStateHandlers2[5];
// extern UNK_TYPE2 D_801BB15C;
// extern UNK_TYPE4 D_801BB160;
extern s801BB170 D_801BB170[118];
// extern UNK_TYPE1 D_801BC210;
extern Gfx D_801BC240[9];
@ -3193,15 +3188,11 @@ extern GameInfo* gGameInfo;
// extern UNK_TYPE1 D_801F3F80;
// extern UNK_TYPE1 D_801F3F83;
// extern UNK_TYPE1 D_801F48C8;
// extern UNK_TYPE1 D_801F4D40;
// extern UNK_TYPE2 D_801F4D42;
// extern UNK_TYPE1 D_801F4D48;
// extern UNK_TYPE1 D_801F4DC8;
// extern UNK_TYPE1 D_801F4DCA;
// extern UNK_TYPE2 D_801F4DCC[8];
// extern UNK_TYPE1 D_801F4DDC;
// extern UNK_TYPE1 D_801F4DE0;
extern UNK_TYPE D_801F4DDC;
extern u8 D_801F4DE0;
extern s16 D_801F4DE2;
extern ActorCutscene* actorCutscenes;
extern s16 actorCutsceneCount;
extern u8 actorCutsceneWaiting[16];
@ -3220,7 +3211,7 @@ extern Vec3f D_801F4E50;
extern f32 D_801F4E5C;
extern f32 D_801F4E60;
extern s16 D_801F4E64;
// extern UNK_TYPE1 D_801F4E68;
extern u8 D_801F4E68;
extern f32 D_801F4E70;
// extern UNK_TYPE1 D_801F4E74;
extern u16 D_801F4E78;

View File

@ -1,5 +1,5 @@
#ifndef _Z64_H_
#define _Z64_H_
#ifndef Z64_H
#define Z64_H
#include "libc/math.h"
#include "libc/stdarg.h"
@ -108,24 +108,6 @@ typedef struct {
/* 0x8 */ CameraModeParams* modes;
} CameraStateParams; // size = 0xC
typedef struct {
/* 0x00 */ u8 sceneCsCount;
/* 0x04 */ void* segment;
/* 0x08 */ u8 state;
/* 0x0C */ f32 unk_0C;
/* 0x10 */ u16 frames;
/* 0x12 */ u16 unk_12;
/* 0x14 */ s32 unk_14;
/* 0x18 */ u16 unk_18;
/* 0x1A */ u8 unk_1A;
/* 0x1B */ u8 unk_1B;
/* 0x1C */ CutsceneCameraPoint* atPoints;
/* 0x20 */ CutsceneCameraPoint* eyePoints;
/* 0x24 */ CsCmdActorAction* linkAction;
/* 0x28 */ CsCmdActorAction* npcActions[10]; // "npcdemopnt"
/* 0x50 */ CutsceneEntry* sceneCsList;
} CutsceneContext; // size = 0x54
typedef struct {
/* 0x0 */ s16 x;
/* 0x2 */ s16 y;
@ -740,7 +722,7 @@ typedef struct {
/* 0x80 */ OSMesg unk_80;
/* 0x84 */ f32 unk_84;
/* 0x88 */ f32 unk_88;
/* 0x8C */ LightSettings2 unk_8C;
/* 0x8C */ EnvLightSettings lightSettings;
/* 0xA8 */ f32 unk_A8;
/* 0xAC */ Vec3s windDir;
/* 0xB4 */ f32 windSpeed;
@ -749,18 +731,18 @@ typedef struct {
/* 0xC0 */ u8 unk_C0;
/* 0xC1 */ u8 unk_C1;
/* 0xC2 */ u8 unk_C2;
/* 0xC3 */ u8 unk_C3;
/* 0xC3 */ u8 lightSettingOverride;
/* 0xC4 */ LightSettings unk_C4;
/* 0xDA */ u16 unk_DA;
/* 0xDC */ f32 unk_DC;
/* 0xDC */ f32 lightBlend;
/* 0xE0 */ u8 unk_E0;
/* 0xE1 */ u8 unk_E1;
/* 0xE2 */ s8 unk_E2;
/* 0xE3 */ u8 unk_E3; // modified by unused func in EnWeatherTag
/* 0xE4 */ u8 unk_E4;
/* 0xE5 */ u8 unk_E5;
/* 0xE6 */ u8 unk_E6[4];
/* 0xEA */ u8 unk_EA;
/* 0xE5 */ u8 fillScreen;
/* 0xE6 */ u8 screenFillColor[4];
/* 0xEA */ u8 sandstormState;
/* 0xEB */ u8 unk_EB;
/* 0xEC */ u8 unk_EC;
/* 0xED */ u8 unk_ED;
@ -995,8 +977,6 @@ typedef void (*ColChkApplyFunc)(GlobalContext*, CollisionCheckContext*, Collider
typedef void (*ColChkVsFunc)(GlobalContext*, CollisionCheckContext*, Collider*, Collider*);
typedef s32 (*ColChkLineFunc)(GlobalContext*, CollisionCheckContext*, Collider*, Vec3f*, Vec3f*);
typedef void(*cutscene_update_func)(GlobalContext* globalCtx, CutsceneContext* cCtxt);
typedef void(*draw_func)(GlobalContext* globalCtx, s16 index);
typedef void(*room_draw_func)(GlobalContext* globalCtx, Room* room, u32 flags);
@ -1512,4 +1492,27 @@ enum fram_mode {
FRAM_MODE_STATUS
};
typedef struct {
/* 0x00 */ s16 unk_00;
/* 0x02 */ s16 unk_02;
/* 0x04 */ s16 unk_04;
/* 0x06 */ s16 unk_06;
/* 0x08 */ s16 unk_08;
/* 0x0A */ s16 unk_0A;
/* 0x0C */ s16 unk_0C;
/* 0x0E */ UNK_TYPE1 unk_0E[0x02];
/* 0x10 */ UNK_TYPE1 unk_10[0x2C];
/* 0x3C */ UNK_TYPE1 unk_3C[0x01];
/* 0x3D */ u8 unk_3D;
/* 0x3E */ UNK_TYPE1 unk_3E[0x02];
/* 0x40 */ UNK_TYPE1 unk_40[0x2C];
/* 0x6C */ UNK_TYPE1 unk_6C[0x01];
/* 0x6D */ u8 unk_6D;
/* 0x6E */ UNK_TYPE1 unk_6E[0x02];
/* 0x70 */ UNK_PTR unk_70;
/* 0x74 */ UNK_PTR unk_74;
/* 0x78 */ UNK_PTR unk_78;
/* 0x7C */ Camera* camera;
} struct_801F4D48; // size = 0x80
#endif

View File

@ -1160,7 +1160,7 @@ typedef enum {
/* 0x03 */ CLEAR_TAG_SMALL_LIGHT_RAYS,
/* 0x04 */ CLEAR_TAG_LARGE_LIGHT_RAYS,
/* 0x23 */ CLEAR_TAG_SPLASH = 35,
/* 0xC8 */ CLEAR_TAG_SMOKE = 200,
/* 0xC8 */ CLEAR_TAG_SMOKE = 200
} ClearTagType;
#endif

View File

@ -1,5 +1,5 @@
#ifndef _Z64CUTSCENE_H_
#define _Z64CUTSCENE_H_
#ifndef Z64CUTSCENE_H
#define Z64CUTSCENE_H
#include "ultra64.h"
#include "unk.h"
@ -26,21 +26,24 @@ typedef struct {
} CutsceneCameraMove; // size = 0xC
typedef struct {
/* 0x00 */ u16 unk0; // action; // "dousa"
/* 0x00 */ u16 action; // "dousa"
/* 0x02 */ u16 startFrame;
/* 0x04 */ u16 endFrame;
/* 0x06 */ u16 unk6;
/* 0x08 */ u16 unk8;
/* 0x0C */ Vec3i unk0C;
/* 0x18 */ Vec3i unk18;
/* 0x24 */ UNK_TYPE1 unk24[0xC];
union {
/* 0x06 */ Vec3s rot;
/* 0x06 */ Vec3us urot;
};
/* 0x0C */ Vec3i startPos;
/* 0x18 */ Vec3i endPos;
/* 0x24 */ Vec3f normal;
} CsCmdActorAction; // size = 0x30
typedef struct {
/* 0x0 */ u16 base;
/* 0x2 */ u16 startFrame;
/* 0x4 */ u16 endFrame;
} CsCmdBase; // size = 0x6
/* 0x6 */ u16 unk_06;
} CsCmdBase; // size = 0x8
typedef struct {
/* 0x0 */ u16 unk0;
@ -48,25 +51,30 @@ typedef struct {
/* 0x4 */ u16 endFrame;
/* 0x6 */ u8 hour;
/* 0x7 */ u8 minute;
} CsCmdDayTime; // size = 0x8
/* 0x8 */ UNK_TYPE1 unk_08[0x04];
} CsCmdDayTime; // size = 0xC
typedef struct {
/* 0x0 */ u16 setting;
/* 0x2 */ u16 startFrame;
/* 0x4 */ u16 endFrame;
} CsCmdEnvLighting; // size = 0x6
/* 0x6 */ u16 unk_06;
} CsCmdEnvLighting; // size = 0x8
typedef struct {
/* 0x0 */ u16 sequence;
/* 0x2 */ u16 startFrame;
/* 0x4 */ u16 endFrame;
} CsCmdMusicChange; // size = 0x6
/* 0x6 */ u16 unk_06;
} CsCmdSequenceChange; // size = 0x8
typedef struct {
/* 0x0 */ u16 type;
/* 0x2 */ u16 startFrame;
/* 0x4 */ u16 endFrame;
} CsCmdMusicFade; // size = 0x6
/* 0x6 */ u16 unk_06;
/* 0x8 */ u32 unk_08;
} CsCmdSequenceFade; // size = 0xC
typedef struct {
/* 0x0 */ u16 base;
@ -77,30 +85,77 @@ typedef struct {
/* 0xA */ u16 textId2;
} CsCmdTextbox; // size = 0xC
typedef enum {
/* 0 */ CS_TEXTBOX_TYPE_DEFAULT,
/* 1 */ CS_TEXTBOX_TYPE_1,
/* 2 */ CS_TEXTBOX_TYPE_LEARN_SONG,
/* 3 */ CS_TEXTBOX_TYPE_3,
/* 4 */ CS_TEXTBOX_TYPE_BOSSES_REMAINS,
/* 5 */ CS_TEXTBOX_TYPE_ALL_NORMAL_MASKS,
/* 0xFFFF */ CS_TEXTBOX_TYPE_NONE = 0xFFFF
} CutsceneTextboxType;
typedef struct {
/* 0x0 */ u16 unk0;
/* 0x0 */ u16 type;
/* 0x2 */ u16 startFrame;
/* 0x4 */ u16 endFrame;
/* 0x6 */ u8 unk6;
/* 0x7 */ u8 unk7;
/* 0x8 */ u8 unk8;
/* 0x9 */ UNK_TYPE1 pad9[0x3];
} CsCmdUnk190; // size = 0xC
typedef struct {
/* 0x0 */ UNK_TYPE4 unk0;
/* 0x4 */ UNK_TYPE4 unk4;
} CsCmdUnk5A; // size = 0x8
} CsCmdRumble; // size = 0xC
typedef struct {
/* 0x0 */ u16 unk0;
/* 0x2 */ u16 startFrame;
/* 0x4 */ u16 endFrame;
/* 0x6 */ u8 unk6;
/* 0x7 */ u8 unk7;
/* 0x8 */ u8 unk8;
/* 0x6 */ Color_RGB8 color;
/* 0x9 */ UNK_TYPE1 pad9[0x3];
} CsCmdUnk9B; // size = 0xC
} CsCmdFadeScreen; // size = 0xC
typedef enum {
/* 0 */ CS_STATE_0,
/* 1 */ CS_STATE_1,
/* 2 */ CS_STATE_2,
/* 3 */ CS_STATE_3,
/* 4 */ CS_STATE_4
} CutsceneState;
typedef enum {
/* 0x00A */ CS_CMD_TEXTBOX = 0xA,
/* 0x05A */ CS_CMD_CAMERA = 0x5A,
/* 0x096 */ CS_CMD_MISC = 0x96,
/* 0x097 */ CS_CMD_SET_LIGHTING,
/* 0x098 */ CS_CMD_SCENE_TRANS_FX,
/* 0x099 */ CS_CMD_MOTIONBLUR,
/* 0x09A */ CS_CMD_GIVETATL,
/* 0x09B */ CS_CMD_FADESCREEN,
/* 0x09C */ CS_CMD_FADESEQ,
/* 0x09D */ CS_CMD_SETTIME,
/* 0x0C8 */ CS_CMD_SET_PLAYER_ACTION = 0xC8,
/* 0x0FA */ CS_CMD_UNK_FA = 0xFA,
/* 0x0FE */ CS_CMD_UNK_FE = 0xFE,
/* 0x0FF */ CS_CMD_UNK_FF,
/* 0x100 */ CS_CMD_UNK_100,
/* 0x101 */ CS_CMD_UNK_101,
/* 0x102 */ CS_CMD_UNK_102,
/* 0x103 */ CS_CMD_UNK_103,
/* 0x104 */ CS_CMD_UNK_104,
/* 0x105 */ CS_CMD_UNK_105,
/* 0x108 */ CS_CMD_UNK_108 = 0x108,
/* 0x109 */ CS_CMD_UNK_109,
/* 0x12C */ CS_CMD_PLAYSEQ = 0x12C,
/* 0x12D */ CS_CMD_UNK_12D,
/* 0x130 */ CS_CMD_130 = 0x130,
/* 0x131 */ CS_CMD_131,
/* 0x132 */ CS_CMD_132,
/* 0x133 */ CS_CMD_STOPSEQ,
/* 0x134 */ CS_CMD_PLAYAMBIENCE,
/* 0x135 */ CS_CMD_FADEAMBIENCE,
/* 0x15E */ CS_CMD_TERMINATOR = 0x15E,
/* 0x15F */ CS_CMD_CHOOSE_CREDITS_SCENES,
/* 0x190 */ CS_CMD_RUMBLE = 0x190
} CutsceneCmd;
typedef union CutsceneData {
s32 i;
@ -109,4 +164,29 @@ typedef union CutsceneData {
s8 b[4];
} CutsceneData;
typedef struct {
/* 0x0 */ CutsceneData* segmentedData;
/* 0x4 */ s16 nextEntranceIndex;
/* 0x6 */ u8 unk6;
/* 0x7 */ u8 unk7; // a weekEventReg bitpack?
} CutsceneEntry; // size = 0x8
typedef struct {
/* 0x00 */ u8 sceneCsCount;
/* 0x04 */ CutsceneData* csData;
/* 0x08 */ u8 state;
/* 0x0C */ f32 unk_0C;
/* 0x10 */ u16 frames;
/* 0x12 */ u16 currentCsIndex;
/* 0x14 */ s32 csCamId;
/* 0x18 */ u16 unk_18;
/* 0x1A */ u8 unk_1A;
/* 0x1B */ u8 unk_1B;
/* 0x1C */ CutsceneCameraPoint* atPoints;
/* 0x20 */ CutsceneCameraPoint* eyePoints;
/* 0x24 */ CsCmdActorAction* playerAction;
/* 0x28 */ CsCmdActorAction* actorActions[10]; // "npcdemopnt"
/* 0x50 */ CutsceneEntry* sceneCsList;
} CutsceneContext; // size = 0x54
#endif

View File

@ -1,5 +1,5 @@
#ifndef _Z64CUTSCENE_COMMANDS_H_
#define _Z64CUTSCENE_COMMANDS_H_
#ifndef Z64CUTSCENE_COMMANDS_H
#define Z64CUTSCENE_COMMANDS_H
#include "command_macros_base.h"
#include "z64cutscene.h"
@ -11,11 +11,571 @@
* eeeeeeee nnnnnnnn
* size = 0x8
*/
#define CS_BEGIN_CUTSCENE(totalEntries, endFrame) CMD_W(totalEntries), CMD_W(endFrame)
#define CS_BEGIN_CUTSCENE(totalEntries, endFrame) { CMD_W(totalEntries) }, { CMD_W(endFrame) }
/**
* ARGS
* s32 entries (e)
* FORMAT
* 0000000A eeeeeeee
* size = 0x8
*/
#define CS_TEXT_LIST(entries) { CS_CMD_TEXTBOX }, { CMD_W(entries) }
/**
* ARGS
* s16 messageId (i), s16 startFrame (s), s16 endFrame (e), s16 type (o),
* s16 topOptionBranch (y), s16 bottomOptionBranch (n)
* FORMAT
* iiiissss eeeeoooo yyyynnnn
* size = 0xC
*/
#define CS_TEXT_DISPLAY_TEXTBOX(messageId, startFrame, endFrame, type, topOptionBranch, bottomOptionBranch) \
{ CMD_HH(messageId, startFrame) }, { CMD_HH(endFrame, type) }, { CMD_HH(topOptionBranch, bottomOptionBranch) }
/**
* ARGS
* s16 messageId (i), s16 startFrame (s), s16 endFrame (e),
* s16 topOptionBranch (y), s16 bottomOptionBranch (n)
* FORMAT
* iiiissss eeee0000 yyyynnnn
* size = 0xC
*/
#define CS_TEXT_DEFAULT(messageId, startFrame, endFrame, topOptionBranch, bottomOptionBranch) \
CS_TEXT_DISPLAY_TEXTBOX(messageId, startFrame, endFrame, CS_TEXTBOX_TYPE_DEFAULT, topOptionBranch, bottomOptionBranch)
/**
* ARGS
* s16 messageId (i), s16 startFrame (s), s16 endFrame (e),
* s16 topOptionBranch (y), s16 bottomOptionBranch (n)
* FORMAT
* iiiissss eeee0001 yyyynnnn
* size = 0xC
*/
#define CS_TEXT_TYPE_1(messageId, startFrame, endFrame, topOptionBranch, bottomOptionBranch) \
CS_TEXT_DISPLAY_TEXTBOX(messageId, startFrame, endFrame, CS_TEXTBOX_TYPE_1, topOptionBranch, bottomOptionBranch)
/**
* ARGS
* s16 ocarinaSongAction (o), s16 startFrame (s), s16 endFrame (e), s16 messageId (i)
* FORMAT
* oooossss eeee0002 iiiiFFFF
* size = 0xC
*/
#define CS_TEXT_LEARN_SONG(ocarinaSongAction, startFrame, endFrame, messageId) \
CS_TEXT_DISPLAY_TEXTBOX(ocarinaSongAction, startFrame, endFrame, CS_TEXTBOX_TYPE_LEARN_SONG, messageId, 0xFFFF)
/**
* ARGS
* s16 messageId (i), s16 startFrame (s), s16 endFrame (e),
* s16 topOptionBranch (y), s16 bottomOptionBranch (n)
* FORMAT
* iiiissss eeee0003 yyyynnnn
* size = 0xC
*/
#define CS_TEXT_TYPE_3(messageId, startFrame, endFrame, topOptionBranch, bottomOptionBranch) \
CS_TEXT_DISPLAY_TEXTBOX(messageId, startFrame, endFrame, CS_TEXTBOX_TYPE_3, topOptionBranch, bottomOptionBranch)
/**
* If Player has all 4 bosses' remains then alternativeMessageId is used, otherwise defaultMessageId is used
* ARGS
* s16 defaultMessageId (d), s16 startFrame (s), s16 endFrame (e), s16 alternativeMessageId (a)
* FORMAT
* ddddssss eeee0004 aaaaFFFF
* size = 0xC
*/
#define CS_TEXT_BOSSES_REMAINS(defaultMessageId, startFrame, endFrame, alternativeMessageId) \
CS_TEXT_DISPLAY_TEXTBOX(defaultMessageId, startFrame, endFrame, CS_TEXTBOX_TYPE_BOSSES_REMAINS, alternativeMessageId, 0xFFFF)
/**
* If Player has every non-transformation mask then alternativeMessageId is used, otherwise defaultMessageId is used
* ARGS
* s16 defaultMessageId (d), s16 startFrame (s), s16 endFrame (e), s16 alternativeMessageId (a)
* FORMAT
* ddddssss eeee0005 aaaaFFFF
* size = 0xC
*/
#define CS_TEXT_ALL_NORMAL_MASKS(defaultMessageId, startFrame, endFrame, alternativeMessageId) \
CS_TEXT_DISPLAY_TEXTBOX(defaultMessageId, startFrame, endFrame, CS_TEXTBOX_TYPE_ALL_NORMAL_MASKS, alternativeMessageId, 0xFFFF)
/**
* ARGS
* s16 startFrame (s), s16 endFrame (e)
* FORMAT
* FFFFssss eeeeFFFF FFFFFFFF
* size = 0xC
*/
#define CS_TEXT_NONE(startFrame, endFrame) \
CS_TEXT_DISPLAY_TEXTBOX(0xFFFF, startFrame, endFrame, CS_TEXTBOX_TYPE_NONE, 0xFFFF, 0xFFFF)
/**
* ARGS
* s32 entries (e)
* FORMAT
* 0000005A eeeeeeee
* size = 0x8
*/
#define CS_CAMERA_LIST(entries) { CS_CMD_CAMERA }, { CMD_W(entries) }
// TODO: Camera command macros. Requieres func_80161998 being decomped
/**
* ARGS
* s32 entries (e)
* FORMAT
* 00000096 eeeeeeee
* size = 0x8
*/
#define CS_MISC_LIST(entries) { CS_CMD_MISC }, { CMD_W(entries) }
/**
* ARGS
* s16 unk (u), s16 startFrame (s), s16 endFrame (e)
* FORMAT
* Capital U is Unused
* uuuussss eeeeUUUU
* size = 0x08
*/
#define CS_MISC(unk, startFrame, endFrame, unk_06) \
{ CMD_HH(unk, startFrame) }, { CMD_HH(endFrame, unk_06) }
/**
* ARGS
* s32 entries (e)
* FORMAT
* 00000097 eeeeeeee
* size = 0x8
*/
#define CS_LIGHTING_LIST(entries) { CS_CMD_SET_LIGHTING }, { CMD_W(entries) }
/**
* ARGS
* s16 setting (m), s16 startFrame (s), s16 endFrame (e)
* FORMAT
* Capital U is Unused
* mmmmssss eeeeUUUU
* size = 0x08
*/
#define CS_LIGHTING(setting, startFrame, endFrame) \
{ CMD_HH(setting, startFrame) }, { CMD_HH(endFrame, endFrame) }
/**
* ARGS
* s32 entries (e)
* FORMAT
* 00000098 eeeeeeee
* size = 0x8
*/
#define CS_SCENE_TRANS_FX_LIST(entries) { CS_CMD_SCENE_TRANS_FX }, { CMD_W(entries) }
/**
* ARGS
* s16 transitionType (m), s16 startFrame (s), s16 endFrame (e)
* FORMAT
* Capital U is Unused
* mmmmssss eeeeUUUU
* size = 0x08
*/
#define CS_SCENE_TRANS_FX(transitionType, startFrame, endFrame) \
{ CMD_HH(transitionType, startFrame) }, { CMD_HH(endFrame, endFrame) }
/**
* ARGS
* s32 entries (e)
* FORMAT
* 00000099 eeeeeeee
* size = 0x08
*/
#define CS_MOTIONBLUR_LIST(entries) { CS_CMD_MOTIONBLUR }, { CMD_W(entries) }
/**
* ARGS
* s16 base (m), s16 startFrame (s), s16 endFrame (e)
* FORMAT
* Capital U is Unused
* mmmmssss eeeeUUUU
* size = 0x08
*/
#define CS_MOTIONBLUR(base, startFrame, endFrame) \
{ CMD_HH(base, startFrame) }, { CMD_HH(endFrame, endFrame) }
/**
* ARGS
* s32 entries (e)
* FORMAT
* 0000009A eeeeeeee
* size = 0x8
*/
#define CS_GIVETATL_LIST(entries) { CS_CMD_GIVETATL }, { CMD_W(entries) }
/**
* ARGS
* s16 base (m), s16 startFrame (s), s16 endFrame (e)
* FORMAT
* Capital U is Unused
* mmmmssss eeeeUUUU
* size = 0x08
*/
#define CS_GIVETATL(base, startFrame, endFrame) \
{ CMD_HH(base, startFrame) }, { CMD_HH(endFrame, endFrame) }
/**
* ARGS
* s32 entries (e)
* FORMAT
* 0000009B eeeeeeee
* size = 0x8
*/
#define CS_FADESCREEN_LIST(entries) { CS_CMD_FADESCREEN }, { CMD_W(entries) }
/**
* ARGS
* s16 base (m), s16 startFrame (s), s16 endFrame (e),
* u8 red (r), u8 green (g), blue (b)
* FORMAT
* Capital U is Unused
* mmmmssss eeeerrgg bbUUUUUU
* size = 0x0C
*/
#define CS_FADESCREEN(base, startFrame, endFrame, red, green, blue) \
{ CMD_HH(base, startFrame) }, { CMD_HBB(endFrame, red, green) }, { CMD_BBBB(blue, 0, 0, 0) }
/**
* ARGS
* s32 entries (e)
* FORMAT
* 0000009C eeeeeeee
* size = 0x8
*/
#define CS_FADESEQ_LIST(entries) { CS_CMD_FADESEQ }, { CMD_W(entries) }
/**
* ARGS
* s16 base (m), s16 startFrame (s), s16 endFrame (e)
* FORMAT
* Capital U is Unused
* mmmmssss eeeeUUUU UUUUUUUU
* size = 0x0C
*/
#define CS_FADESEQ(base, startFrame, endFrame) \
{ CMD_HH(base, startFrame) }, { CMD_HH(endFrame, 0) }, { CMD_W(0) }
/**
* ARGS
* s32 entries (e)
* FORMAT
* 0000009D eeeeeeee
* size = 0x8
*/
#define CS_TIME_LIST(entries) { CS_CMD_SETTIME }, { CMD_W(entries) }
/**
* ARGS
* s16 unk (u), s16 startFrame (s), s16 endFrame (e), s8 hour (h), s8 min (m)
* FORMAT
* Capital U is Unused
* uuuussss eeeehhmm UUUUUUUU
* size = 0xC
*/
#define CS_TIME(unk, startFrame, endFrame, hour, min, unused) \
{ CMD_HH(unk, startFrame) }, { CMD_HBB(endFrame, hour, min) }, { CMD_W(unused) }
/**
* ARGS
* s32 cmdType (c), s32 entries (e)
* FORMAT
* cccccccc eeeeeeee
* size = 0x8
*/
#define CS_ACTOR_ACTION_LIST(cmdType, entries) { CMD_W(cmdType) }, { CMD_W(entries) }
/**
* ARGS
* s16 npcAction (a), s16 startFrame (s), s16 endFrame (e),
* s16 rotX (u), s16 rotY (v), s16 rotZ (w),
* s32 startX (i), s32 startY (j), s32 startZ (k),
* s32 endX (l), s32 endY (m), s32 endZ (n),
* f32 normX (x), f32 normY (y), f32 normZ (z),
* FORMAT
* aaaassss eeeeuuuu vvvvwwww iiiiiiii jjjjjjjj kkkkkkkk llllllll mmmmmmmm nnnnnnnn xxxxxxxx yyyyyyyy zzzzzzzz
* size = 0x30
*/
#define CS_ACTOR_ACTION(npcAction, startFrame, endFrame, rotX, rotY, rotZ, startX, startY, startZ, endX, endY, endZ, normX, normY, normZ) \
{ CMD_HH(npcAction, startFrame) }, { CMD_HH(endFrame, rotX) }, { CMD_HH(rotY, rotZ) }, \
{ CMD_W(startX) }, { CMD_W(startY) }, { CMD_W(startZ) }, \
{ CMD_W(endX) }, { CMD_W(endY) }, { CMD_W(endZ) }, \
{ CMD_F(normX) }, { CMD_F(normY) }, { CMD_F(normZ) }
/**
* ARGS
* s32 cmdType (c), s32 entries (e)
* FORMAT
* 000000C8 eeeeeeee
* size = 0x8
*/
#define CS_PLAYER_ACTION_LIST(entries) { CS_CMD_SET_PLAYER_ACTION }, { CMD_W(entries) }
/**
* ARGS
* s16 playerAction (a), s16 startFrame (s), s16 endFrame (e),
* s16 rotX (u), s16 rotY (v), s16 rotZ (w),
* s32 startX (i), s32 startY (j), s32 startZ (k),
* s32 endX (l), s32 endY (m), s32 endZ (n),
* f32 normX (x), f32 normY (y), f32 normZ (z),
* FORMAT
* aaaassss eeeeuuuu vvvvwwww iiiiiiii jjjjjjjj kkkkkkkk llllllll mmmmmmmm nnnnnnnn xxxxxxxx yyyyyyyy zzzzzzzz
* size = 0x30
*/
#define CS_PLAYER_ACTION(playerAction, startFrame, endFrame, rotX, rotY, rotZ, startX, startY, startZ, endX, endY, endZ, normX, normY, normZ) \
CS_ACTOR_ACTION(playerAction, startFrame, endFrame, rotX, rotY, rotZ, startX, startY, startZ, endX, endY, endZ, normX, normY, normZ)
/**
* ARGS
* s32 entries (e)
* FORMAT
* 0000012C eeeeeeee
* size = 0x8
*/
#define CS_PLAYSEQ_LIST(entries) { CS_CMD_PLAYSEQ }, { CMD_W(entries) }
/**
* ARGS
* s16 base (m), s16 startFrame (s), s16 endFrame (e)
* FORMAT
* Capital U is Unused
* mmmmssss eeeeUUUU
* size = 0x08
*/
#define CS_PLAYSEQ(sequence, startFrame, endFrame) \
{ CMD_HH(sequence, startFrame) }, { CMD_HH(endFrame, endFrame) }
/**
* ARGS
* s32 entries (e)
* FORMAT
* 00000130 eeeeeeee
* size = 0x8
*/
#define CS_SCENE_UNK_130_LIST(entries) { CS_CMD_130 }, { CMD_W(entries) }
/**
* ARGS
* s16 base (m), s16 startFrame (s), s16 endFrame (e)
* FORMAT
* Capital U is Unused
* mmmmssss eeeeUUUU
* size = 0x30
*/
#define CS_SCENE_UNK_130(base, startFrame, endFrame, unk_06) \
{ CMD_HH(base, startFrame) }, { CMD_HH(endFrame, unk_06) }
/**
* ARGS
* s32 entries (e)
* FORMAT
* 00000131 eeeeeeee
* size = 0x8
*/
#define CS_SCENE_UNK_131_LIST(entries) { CS_CMD_131 }, { CMD_W(entries) }
/**
* ARGS
* s16 base (m), s16 startFrame (s), s16 endFrame (e)
* FORMAT
* Capital U is Unused
* mmmmssss eeeeUUUU
* size = 0x08
*/
#define CS_SCENE_UNK_131(base, startFrame, endFrame, unk_06) \
{ CMD_HH(base, startFrame) }, { CMD_HH(endFrame, unk_06) }
/**
* ARGS
* s32 entries (e)
* FORMAT
* 00000132 eeeeeeee
* size = 0x8
*/
#define CS_SCENE_UNK_132_LIST(entries) { CS_CMD_132 }, { CMD_W(entries) }
/**
* ARGS
* s16 base (m), s16 startFrame (s), s16 endFrame (e)
* FORMAT
* Capital U is Unused
* mmmmssss eeeeUUUU
* size = 0x08
*/
#define CS_SCENE_UNK_132(base, startFrame, endFrame) \
{ CMD_HH(base, startFrame) }, { CMD_HH(endFrame, endFrame) }
/**
* ARGS
* s32 entries (e)
* FORMAT
* 00000133 eeeeeeee
* size = 0x8
*/
#define CS_STOPSEQ_LIST(entries) { CS_CMD_STOPSEQ }, { CMD_W(entries) }
/**
* ARGS
* s16 base (m), s16 startFrame (s), s16 endFrame (e)
* FORMAT
* Capital U is Unused
* mmmmssss eeeeUUUU
* size = 0x08
*/
#define CS_STOPSEQ(base, startFrame, endFrame, unk_06) \
{ CMD_HH(base, startFrame) }, { CMD_HH(endFrame, unk_06) }
/**
* ARGS
* s32 entries (e)
* FORMAT
* 00000134 eeeeeeee
* size = 0x8
*/
#define CS_PLAYAMBIENCE_LIST(entries) { CS_CMD_PLAYAMBIENCE }, { CMD_W(entries) }
/**
* ARGS
* s16 base (m), s16 startFrame (s), s16 endFrame (e)
* FORMAT
* Capital U is Unused
* mmmmssss eeeeUUUU
* size = 0x08
*/
#define CS_PLAYAMBIENCE(base, startFrame, endFrame, unk_06) \
{ CMD_HH(base, startFrame) }, { CMD_HH(endFrame, unk_06) }
/**
* ARGS
* s32 entries (e)
* FORMAT
* 00000135 eeeeeeee
* size = 0x8
*/
#define CS_FADEAMBIENCE_LIST(entries) { CS_CMD_FADEAMBIENCE }, { CMD_W(entries) }
/**
* ARGS
* s16 base (m), s16 startFrame (s), s16 endFrame (e)
* FORMAT
* Capital U is Unused
* mmmmssss eeeeUUUU
* size = 0x08
*/
#define CS_FADEAMBIENCE(base, startFrame, endFrame, unk_06) \
{ CMD_HH(base, startFrame) }, { CMD_HH(endFrame, unk_06) }
/**
* ARGS
* s32 entries (e)
* FORMAT
* 0000015E eeeeeeee
* size = 0x8
*/
#define CS_TERMINATOR_LIST(entries) { CS_CMD_TERMINATOR }, { CMD_W(entries) }
/**
* ARGS
* s16 base (m), s16 startFrame (s), s16 endFrame (e)
* FORMAT
* Capital U is Unused
* mmmmssss eeeeUUUU
* size = 0x08
*/
#define CS_TERMINATOR(base, startFrame, endFrame) \
{ CMD_HH(base, startFrame) }, { CMD_HH(endFrame, endFrame) }
/**
* ARGS
* s32 entries (e)
* FORMAT
* 0000015F eeeeeeee
* size = 0x8
*/
#define CS_CHOOSE_CREDITS_SCENES_LIST(entries) { CS_CMD_CHOOSE_CREDITS_SCENES }, { CMD_W(entries) }
/**
* ARGS
* s16 base (m), s16 startFrame (s), s16 endFrame (e)
* FORMAT
* Capital U is Unused
* mmmmssss eeeeUUUU
* size = 0x08
*/
#define CS_CHOOSE_CREDITS_SCENES(base, startFrame, endFrame) \
{ CMD_HH(base, startFrame) }, { CMD_HH(endFrame, endFrame) }
/**
* ARGS
* s32 entries (e)
* FORMAT
* 00000004 eeeeeeee
* size = 0x8
*/
#define CS_RUMBLE_LIST(entries) { CS_CMD_RUMBLE }, { CMD_W(entries) }
/**
* ARGS
* s16 base (m), s16 startFrame (s), s16 endFrame (e)
* FORMAT
* Capital U is Unused
* mmmmssss eeeeUUUU
* size = 0x08
*/
#define CS_RUMBLE(base, startFrame, endFrame, unk6, unk7, unk8) \
{ CMD_HH(base, startFrame) }, { CMD_HBB(endFrame, unk6, unk7) }, { CMD_BBBB(unk8, 0, 0, 0) }
/**
* ARGS
* s32 cmd (c), s32 entries (e)
* FORMAT
* cccccccc eeeeeeee
* size = 0x8
*/
#define CS_UNK_DATA_LIST(cmd, entries) { CMD_W(cmd) }, { CMD_W(entries) }
/**
* ARGS
* s16 base (m), s16 startFrame (s), s16 endFrame (e)
* FORMAT
* Capital U is Unused
* mmmmssss eeeeUUUU
* size = 0x08
*/
#define CS_UNK_DATA(base, startFrame, endFrame, unk_06) \
{ CMD_HH(base, startFrame) }, { CMD_HH(endFrame, unk_06) }
/**
* Marks the end of a cutscene
*/
#define CS_END() 0xFFFFFFFF
#define CS_END() { CMD_W(0xFFFFFFFF) }
#endif

View File

@ -43,7 +43,7 @@ typedef enum {
/* 0x11 */ QUEST_SONG_SUN,
/* 0x12 */ QUEST_BOMBERS_NOTEBOOK,
/* 0x18 */ QUEST_SONG_LULLABY_INTRO = 0x18,
/* 0x19 */ QUEST_UNK_19, // Related to PictoBox
/* 0x19 */ QUEST_UNK_19 // Related to PictoBox
} QuestItem;
typedef enum {

View File

@ -23,7 +23,7 @@ typedef struct {
/* 0x12 */ s16 fogColor[3];
/* 0x18 */ s16 fogNear;
/* 0x1A */ s16 fogFar;
} LightSettings2; // size = 0x1C
} EnvLightSettings; // size = 0x1C
typedef struct {
/* 0x0 */ s16 x;

View File

@ -1,15 +1,16 @@
#ifndef _Z64SCENE_H_
#define _Z64SCENE_H_
#ifndef Z64SCENE_H
#define Z64SCENE_H
#include "ultra64.h"
#include "z64dma.h"
#include "z64cutscene.h"
#include "unk.h"
#define SPAWN_ROT_FLAGS(rotation, flags) (((rotation) << 7) | (flags))
typedef struct {
/* 0x00 */ u32 vromStart;
/* 0x04 */ u32 vromEnd;
/* 0x00 */ uintptr_t vromStart;
/* 0x04 */ uintptr_t vromEnd;
} RomFile; // size = 0x8
typedef struct {
@ -310,13 +311,6 @@ typedef struct {
/* 0xE */ s16 params;
} ActorEntry; // size = 0x10
typedef struct {
/* 0x0 */ u32 data;
/* 0x4 */ s16 unk4;
/* 0x6 */ u8 unk6;
/* 0x7 */ u8 unk7;
} CutsceneEntry; // size = 0x8
typedef struct {
/* 0x0 */ u8 spawn;
/* 0x1 */ u8 room;

1
spec
View File

@ -460,7 +460,6 @@ beginseg
include "build/data/code/z_debug_mode.data.o"
include "build/data/code/z_debug_mode.bss.o"
include "build/src/code/z_demo.o"
include "build/data/code/z_demo.bss.o"
include "build/src/code/z_draw.o"
include "build/data/code/z_draw.data.o"
include "build/src/code/z_eff_footmark.o"

View File

@ -1,4 +1,3 @@
#include "prevent_bss_reordering.h"
#include "global.h"
UNK_TYPE4 D_8009BE30;

View File

@ -1,4 +1,3 @@
#include "prevent_bss_reordering.h"
#include "global.h"
StackEntry sBootThreadInfo;

View File

@ -1,4 +1,3 @@
#include "prevent_bss_reordering.h"
#include "global.h"
u8 D_80096B20 = 1;

View File

@ -2233,7 +2233,7 @@ const char sAudioOcarinaUnusedText7[] = "check is over!!! %d %d %d\n";
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A3EC0.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A3F54.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/Audio_SetCutsceneFlag.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A3F6C.s")

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800F5954.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800F5A8C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/Environment_LerpWeight.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800F5B10.s")
@ -64,7 +64,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800FB010.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800FB320.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/Environment_AddLightningBolts.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800FB388.s")

View File

@ -64,7 +64,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_801514B0.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_801518B0.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/Message_StartTextbox.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80151938.s")

View File

@ -114,7 +114,7 @@ s32 Room_HandleLoadCallbacks(GlobalContext* globalCtx, RoomContext* roomCtx) {
if (((globalCtx->sceneNum != SCENE_IKANA) || (roomCtx->currRoom.num != 1)) &&
(globalCtx->sceneNum != SCENE_IKNINSIDE)) {
globalCtx->envCtx.unk_C3 = 0xff;
globalCtx->envCtx.lightSettingOverride = 0xff;
globalCtx->envCtx.unk_E0 = 0;
}
func_800FEAB0();

View File

@ -1,4 +1,3 @@
#include "prevent_bss_reordering.h"
#include "global.h"
s32 sMatAnimStep;

View File

@ -1,14 +1,13 @@
#include "prevent_bss_reordering.h"
#include "ultra64.h"
#include "global.h"
static s32 framDeviceInfo[4];
static OSIoMesg framDeviceInfoQuery;
static OSMesgQueue __osFlashMessageQ;
static OSPiHandle __osFlashHandler;
static OSMesg __osFlashMsgBuf;
static s32 __osFlashVersion;
static UNK_TYPE1 D_801FD0FC[0x14];
s32 framDeviceInfo[4];
OSIoMesg framDeviceInfoQuery;
OSMesgQueue __osFlashMessageQ;
OSPiHandle __osFlashHandler;
OSMesg __osFlashMsgBuf;
s32 __osFlashVersion;
UNK_TYPE1 D_801FD0FC[0x14];
typedef enum {
FLASH_OLD,

View File

@ -163,8 +163,8 @@ void BgCtowerGear_Update(Actor* thisx, GlobalContext* globalCtx) {
void BgCtowerGear_UpdateOrgan(Actor* thisx, GlobalContext* globalCtx) {
BgCtowerGear* this = THIS;
if (func_800EE29C(globalCtx, 0x68)) {
switch (globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x68)]->unk0) {
if (Cutscene_CheckActorAction(globalCtx, 104)) {
switch (globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 104)]->action) {
case 1:
this->dyna.actor.draw = NULL;
func_800C62BC(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);

View File

@ -125,9 +125,9 @@ void BgHakaCurtain_Update(Actor* thisx, GlobalContext* globalCtx) {
BgHakaCurtain* this = THIS;
CsCmdActorAction* actorAction;
if (func_800EE29C(globalCtx, 0x1D5)) {
actorAction = globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x1D5)];
if (actorAction->startFrame == globalCtx->csCtx.frames && actorAction->unk0 == 2) {
if (Cutscene_CheckActorAction(globalCtx, 469)) {
actorAction = globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 469)];
if (actorAction->startFrame == globalCtx->csCtx.frames && actorAction->action == 2) {
func_80B6DD80(this);
}
}

View File

@ -131,8 +131,8 @@ void BgIknvObj_UpdateWaterwheel(BgIknvObj* this, GlobalContext* globalCtx) {
func_800B9010(&this->dyna.actor, NA_SE_EV_WOOD_WATER_WHEEL - SFX_FLAG);
}
if ((globalCtx->csCtx.state != 0) && (gSaveContext.sceneSetupIndex == 1) && (globalCtx->csCtx.unk_12 == 4) &&
(globalCtx->csCtx.frames == 1495)) {
if ((globalCtx->csCtx.state != 0) && (gSaveContext.sceneSetupIndex == 1) &&
(globalCtx->csCtx.currentCsIndex == 4) && (globalCtx->csCtx.frames == 1495)) {
func_8019F128(NA_SE_EV_DOOR_UNLOCK);
}
}

View File

@ -1281,22 +1281,22 @@ void func_809DC78C(Actor* thisx, GlobalContext* globalCtx) {
Boss02* this = THIS;
this->unk_01AC = D_809DF5B0;
globalCtx->envCtx.unk_EA = 0xD;
globalCtx->envCtx.sandstormState = 0xD;
if (D_809E0434 != NULL) {
this->unk_1D74 = KREG(23) + -15.0f;
D_801F4E30 = 0;
globalCtx->envCtx.unk_C3 = 1;
globalCtx->envCtx.lightSettingOverride = 1;
globalCtx->skyboxId = 1;
} else if (D_809E0422 == 0) {
this->unk_1D74 = 0.0f;
D_801F4E30 = this->unk_1D7C;
globalCtx->envCtx.unk_C3 = 0;
globalCtx->envCtx.lightSettingOverride = 0;
globalCtx->skyboxId = 2;
} else {
this->unk_1D74 = KREG(23) + -15.0f;
D_801F4E30 = ((KREG(24) * 0.1f) + 1.0f) * this->unk_1D7C;
globalCtx->envCtx.unk_C3 = 1;
globalCtx->envCtx.lightSettingOverride = 1;
globalCtx->skyboxId = 1;
}
@ -1650,7 +1650,7 @@ void func_809DD934(Boss02* this, GlobalContext* globalCtx) {
switch (this->unk_1D18) {
case 0:
if (player->stateFlags1 & 0x100) {
func_800EA0D4(globalCtx, &globalCtx->csCtx);
Cutscene_Start(globalCtx, &globalCtx->csCtx);
this->unk_1D22 = Play_CreateSubCamera(globalCtx);
Play_CameraChangeStatus(globalCtx, CAM_ID_MAIN, 1);
Play_CameraChangeStatus(globalCtx, this->unk_1D22, 7);
@ -1770,7 +1770,7 @@ void func_809DD934(Boss02* this, GlobalContext* globalCtx) {
this->unk_1D18 = 0;
func_80169AFC(globalCtx, this->unk_1D22, 0);
this->unk_1D22 = 0;
func_800EA0EC(globalCtx, &globalCtx->csCtx);
Cutscene_End(globalCtx, &globalCtx->csCtx);
this->actor.flags |= ACTOR_FLAG_1;
player->stateFlags1 &= ~0x100;
this->unk_1D70 = 0.01f;
@ -1784,7 +1784,7 @@ void func_809DD934(Boss02* this, GlobalContext* globalCtx) {
Actor_SetScale(&player->actor, this->unk_1D70);
}
globalCtx->envCtx.unk_8C.fogNear = this->unk_1D74;
globalCtx->envCtx.lightSettings.fogNear = this->unk_1D74;
if (sp57) {
D_809E0422 = 1 - D_809E0422;
@ -2049,7 +2049,7 @@ void func_809DD934(Boss02* this, GlobalContext* globalCtx) {
Matrix_InsertZRotation_f(this->unk_1D54, MTXMODE_APPLY);
Matrix_GetStateTranslationAndScaledY(1.0f, &this->unk_1D3C);
Play_CameraSetAtEyeUp(globalCtx, this->unk_1D22, &this->unk_1D30, &this->unk_1D24, &this->unk_1D3C);
ShrinkWindow_SetLetterboxTarget(0x1B);
ShrinkWindow_SetLetterboxTarget(27);
}
}
#else
@ -2077,7 +2077,7 @@ void func_809DEAC4(Boss02* this, GlobalContext* globalCtx) {
if ((gSaveContext.weekEventReg[52] & 0x20) || ((u32)(KREG(13) + 15) >= this->unk_1D1C)) {
break;
}
func_800EA0D4(globalCtx, &globalCtx->csCtx);
Cutscene_Start(globalCtx, &globalCtx->csCtx);
this->unk_1D22 = Play_CreateSubCamera(globalCtx);
Play_CameraChangeStatus(globalCtx, CAM_ID_MAIN, 1);
Play_CameraChangeStatus(globalCtx, this->unk_1D22, 7);
@ -2163,7 +2163,7 @@ void func_809DEAC4(Boss02* this, GlobalContext* globalCtx) {
if (this->unk_1D1C == (u32)(BREG(27) + 335)) {
func_80169AFC(globalCtx, this->unk_1D22, 0);
this->unk_1D22 = 0;
func_800EA0EC(globalCtx, &globalCtx->csCtx);
Cutscene_End(globalCtx, &globalCtx->csCtx);
func_800B7298(globalCtx, &this->actor, 6);
this->actor.flags |= ACTOR_FLAG_1;
this->unk_1D20 = 0;
@ -2175,7 +2175,7 @@ void func_809DEAC4(Boss02* this, GlobalContext* globalCtx) {
case 100:
if (ActorCutscene_GetCurrentIndex() == -1) {
func_800EA0D4(globalCtx, &globalCtx->csCtx);
Cutscene_Start(globalCtx, &globalCtx->csCtx);
this->unk_1D22 = Play_CreateSubCamera(globalCtx);
Play_CameraChangeStatus(globalCtx, CAM_ID_MAIN, 1);
Play_CameraChangeStatus(globalCtx, this->unk_1D22, 7);
@ -2224,7 +2224,7 @@ void func_809DEAC4(Boss02* this, GlobalContext* globalCtx) {
if (this->unk_1D1C == 30) {
func_80169AFC(globalCtx, this->unk_1D22, 0);
this->unk_1D22 = 0;
func_800EA0EC(globalCtx, &globalCtx->csCtx);
Cutscene_End(globalCtx, &globalCtx->csCtx);
func_800B7298(globalCtx, &this->actor, 6);
this->unk_1D20 = 0;
this->actor.flags |= ACTOR_FLAG_1;
@ -2263,6 +2263,6 @@ void func_809DEAC4(Boss02* this, GlobalContext* globalCtx) {
Play_CameraSetAtEyeUp(globalCtx, this->unk_1D22, &this->unk_1D30, &sp5C, &this->unk_1D3C);
this->unk_1D3C.z = this->unk_1D3C.x = 0.0f;
this->unk_1D3C.y = 1.0f;
ShrinkWindow_SetLetterboxTarget(0x1B);
ShrinkWindow_SetLetterboxTarget(27);
}
}

View File

@ -259,7 +259,7 @@ void func_809EC568(Boss04* this, GlobalContext* globalCtx) {
this->unk_708 = 10;
this->unk_704 = 0;
func_800EA0D4(globalCtx, &globalCtx->csCtx);
Cutscene_Start(globalCtx, &globalCtx->csCtx);
this->unk_70A = Play_CreateSubCamera(globalCtx);
Play_CameraChangeStatus(globalCtx, CAM_ID_MAIN, 1);
Play_CameraChangeStatus(globalCtx, this->unk_70A, 7);
@ -389,7 +389,7 @@ void func_809EC568(Boss04* this, GlobalContext* globalCtx) {
sp5C->at = this->unk_718;
func_80169AFC(globalCtx, this->unk_70A, 0);
this->unk_70A = 0;
func_800EA0EC(globalCtx, &globalCtx->csCtx);
Cutscene_End(globalCtx, &globalCtx->csCtx);
func_800B7298(globalCtx, &this->actor, 6);
func_80165690();
gSaveContext.eventInf[6] |= 1;
@ -400,7 +400,7 @@ void func_809EC568(Boss04* this, GlobalContext* globalCtx) {
if (this->unk_70A != 0) {
Vec3f sp50;
ShrinkWindow_SetLetterboxTarget(0x1B);
ShrinkWindow_SetLetterboxTarget(27);
if (this->unk_748 != 0) {
this->unk_748--;
}

View File

@ -197,7 +197,7 @@ void func_809F24C8(Boss06* this, GlobalContext* globalCtx) {
break;
}
func_800EA0D4(globalCtx, &globalCtx->csCtx);
Cutscene_Start(globalCtx, &globalCtx->csCtx);
func_800B7298(globalCtx, &this->actor, 7);
this->unk_A00 = Play_CreateSubCamera(globalCtx);
Play_CameraChangeStatus(globalCtx, CAM_ID_MAIN, 1);
@ -219,11 +219,11 @@ void func_809F24C8(Boss06* this, GlobalContext* globalCtx) {
case 1:
if (this->unk_1CA >= 10) {
Math_ApproachF(&this->unk_1E4, 30.0f, 0.2f, 1.0f);
globalCtx->envCtx.unk_E5 = 1;
globalCtx->envCtx.unk_E6[2] = 0;
globalCtx->envCtx.unk_E6[1] = 0;
globalCtx->envCtx.unk_E6[0] = 0;
globalCtx->envCtx.unk_E6[3] = this->unk_A2C;
globalCtx->envCtx.fillScreen = 1;
globalCtx->envCtx.screenFillColor[2] = 0;
globalCtx->envCtx.screenFillColor[1] = 0;
globalCtx->envCtx.screenFillColor[0] = 0;
globalCtx->envCtx.screenFillColor[3] = this->unk_A2C;
Math_ApproachF(&this->unk_A2C, 75.0f, 1.0f, 3.0f);
}
@ -232,7 +232,7 @@ void func_809F24C8(Boss06* this, GlobalContext* globalCtx) {
}
if (this->unk_1CA >= 60) {
globalCtx->envCtx.unk_E5 = 0;
globalCtx->envCtx.fillScreen = 0;
this->unk_1C8 = 0;
this->unk_1DC = 0.0f;
this->unk_1D8 = 0.0f;
@ -331,7 +331,7 @@ void func_809F24C8(Boss06* this, GlobalContext* globalCtx) {
func_809F2ED0(this, globalCtx);
func_80169AFC(globalCtx, this->unk_A00, 0);
this->unk_A00 = 0;
func_800EA0EC(globalCtx, &globalCtx->csCtx);
Cutscene_End(globalCtx, &globalCtx->csCtx);
func_800B7298(globalCtx, &this->actor, 6);
D_809F4970->unk_151 = 0;
}
@ -339,7 +339,7 @@ void func_809F24C8(Boss06* this, GlobalContext* globalCtx) {
}
if (this->unk_A00 != 0) {
ShrinkWindow_SetLetterboxTarget(0x1B);
ShrinkWindow_SetLetterboxTarget(27);
Play_CameraSetAtEye(globalCtx, this->unk_A00, &this->unk_A10, &this->unk_A04);
}
}

View File

@ -458,11 +458,11 @@ void func_80AA5EBC(DmChar00* this, GlobalContext* globalCtx) {
case SCENE_OPENINGDAN:
if (gSaveContext.sceneSetupIndex == 0) {
if (globalCtx->csCtx.unk_12 == 0) {
if (globalCtx->csCtx.currentCsIndex == 0) {
func_80AA5720(this, globalCtx);
} else if (globalCtx->csCtx.unk_12 == 1) {
} else if (globalCtx->csCtx.currentCsIndex == 1) {
func_80AA575C(this, globalCtx);
} else if (globalCtx->csCtx.unk_12 == 2) {
} else if (globalCtx->csCtx.currentCsIndex == 2) {
func_80AA5890(this, globalCtx);
}
}
@ -470,17 +470,17 @@ void func_80AA5EBC(DmChar00* this, GlobalContext* globalCtx) {
case SCENE_OKUJOU:
if (gSaveContext.sceneSetupIndex == 0) {
if (globalCtx->csCtx.unk_12 == 0) {
if (globalCtx->csCtx.currentCsIndex == 0) {
func_80AA58CC(this, globalCtx);
} else if (globalCtx->csCtx.unk_12 == 1) {
} else if (globalCtx->csCtx.currentCsIndex == 1) {
func_80AA5950(this, globalCtx);
} else if (globalCtx->csCtx.unk_12 == 2) {
} else if (globalCtx->csCtx.currentCsIndex == 2) {
func_80AA5960(this, globalCtx);
}
} else if (gSaveContext.sceneSetupIndex == 2) {
if (globalCtx->csCtx.unk_12 == 0) {
if (globalCtx->csCtx.currentCsIndex == 0) {
func_80AA59E4(this, globalCtx);
} else if (globalCtx->csCtx.unk_12 == 1) {
} else if (globalCtx->csCtx.currentCsIndex == 1) {
func_80AA5A6C(this, globalCtx);
}
}
@ -488,34 +488,34 @@ void func_80AA5EBC(DmChar00* this, GlobalContext* globalCtx) {
case SCENE_00KEIKOKU:
if (gSaveContext.sceneSetupIndex == 3) {
if (globalCtx->csCtx.unk_12 == 0) {
if (globalCtx->csCtx.currentCsIndex == 0) {
func_80AA5AF4(this, globalCtx);
} else if (globalCtx->csCtx.unk_12 == 2) {
} else if (globalCtx->csCtx.currentCsIndex == 2) {
func_80AA5E2C(this, globalCtx);
}
} else if (gSaveContext.sceneSetupIndex == 7) {
if (globalCtx->csCtx.unk_12 == 0) {
if (globalCtx->csCtx.currentCsIndex == 0) {
func_80AA5BF8(this, globalCtx);
} else if (globalCtx->csCtx.unk_12 == 1) {
} else if (globalCtx->csCtx.currentCsIndex == 1) {
func_80AA5CD4(this, globalCtx);
}
}
break;
case SCENE_MITURIN:
if ((gSaveContext.sceneSetupIndex == 0) && (globalCtx->csCtx.unk_12 == 1)) {
if ((gSaveContext.sceneSetupIndex == 0) && (globalCtx->csCtx.currentCsIndex == 1)) {
func_80AA5DC8(this, globalCtx);
}
break;
case SCENE_INSIDETOWER:
if ((gSaveContext.sceneSetupIndex == 0) && (globalCtx->csCtx.unk_12 == 0)) {
if ((gSaveContext.sceneSetupIndex == 0) && (globalCtx->csCtx.currentCsIndex == 0)) {
func_80AA5D10(this, globalCtx);
}
break;
case SCENE_PIRATE:
if ((gSaveContext.sceneSetupIndex == 0) && (globalCtx->csCtx.unk_12 == 0)) {
if ((gSaveContext.sceneSetupIndex == 0) && (globalCtx->csCtx.currentCsIndex == 0)) {
func_80AA5D6C(this, globalCtx);
}
break;
@ -527,7 +527,7 @@ void DmChar00_Init(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
DmChar00* this = THIS;
if ((globalCtx->sceneNum == SCENE_LOST_WOODS) && !func_800EE2F4(globalCtx)) {
if ((globalCtx->sceneNum == SCENE_LOST_WOODS) && !Cutscene_IsPlaying(globalCtx)) {
Actor_MarkForDeath(thisx);
}
@ -551,18 +551,18 @@ void DmChar00_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
void func_80AA62FC(DmChar00* this, GlobalContext* globalCtx) {
u16 sp26 = DMCHAR00_GET(&this->actor) + 0x71;
u32 temp_v0;
u16 sp26 = DMCHAR00_GET(&this->actor) + 113;
s32 temp_v0;
s32 pad;
if (func_800EE29C(globalCtx, sp26)) {
temp_v0 = func_800EE200(globalCtx, sp26);
if (Cutscene_CheckActorAction(globalCtx, sp26)) {
temp_v0 = Cutscene_GetActorActionIndex(globalCtx, sp26);
if (globalCtx->csCtx.frames == globalCtx->csCtx.npcActions[temp_v0]->startFrame) {
if (this->unk_260 != globalCtx->csCtx.npcActions[temp_v0]->unk0) {
this->unk_260 = globalCtx->csCtx.npcActions[temp_v0]->unk0;
if (globalCtx->csCtx.frames == globalCtx->csCtx.actorActions[temp_v0]->startFrame) {
if (this->unk_260 != globalCtx->csCtx.actorActions[temp_v0]->action) {
this->unk_260 = globalCtx->csCtx.actorActions[temp_v0]->action;
switch (globalCtx->csCtx.npcActions[temp_v0]->unk0) {
switch (globalCtx->csCtx.actorActions[temp_v0]->action) {
case 0x1:
this->unk_261 = 0;
break;
@ -786,7 +786,7 @@ void func_80AA62FC(DmChar00* this, GlobalContext* globalCtx) {
func_80AA5580(&this->skelAnime, &sAnimations[this->unk_261], 0);
}
}
func_800EDF24(&this->actor, globalCtx, temp_v0);
Cutscene_ActorTranslateAndYaw(&this->actor, globalCtx, temp_v0);
} else {
this->unk_260 = 99;
}
@ -853,7 +853,8 @@ void func_80AA62FC(DmChar00* this, GlobalContext* globalCtx) {
void func_80AA67F8(DmChar00* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
if ((globalCtx->csCtx.state == 0) && (gSaveContext.sceneSetupIndex == 0) && (globalCtx->csCtx.unk_12 == 1)) {
if ((globalCtx->csCtx.state == 0) && (gSaveContext.sceneSetupIndex == 0) &&
(globalCtx->csCtx.currentCsIndex == 1)) {
if (this->unk_261 != 42) {
this->unk_261 = 42;
func_80AA5580(&this->skelAnime, &sAnimations[this->unk_261], 0);
@ -916,7 +917,7 @@ void DmChar00_Draw(Actor* thisx, GlobalContext* globalCtx2) {
if ((globalCtx->csCtx.state == 0) &&
((globalCtx->sceneNum != SCENE_OPENINGDAN) || (gSaveContext.sceneSetupIndex != 0) ||
(globalCtx->roomCtx.currRoom.num != 0) || (globalCtx->csCtx.unk_12 != 1) ||
(globalCtx->roomCtx.currRoom.num != 0) || (globalCtx->csCtx.currentCsIndex != 1) ||
(DMCHAR00_GET(&this->actor) != DMCHAR00_0))) {
return;
}

View File

@ -196,8 +196,9 @@ void func_80AA884C(DmChar01* this, GlobalContext* globalCtx) {
}
void func_80AA88A8(DmChar01* this, GlobalContext* globalCtx) {
if (func_800EE29C(globalCtx, 0x87)) {
if (globalCtx->csCtx.frames == globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x87)]->startFrame) {
if (Cutscene_CheckActorAction(globalCtx, 135)) {
if (globalCtx->csCtx.frames ==
globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 135)]->startFrame) {
D_80AAAE24 = 1;
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_FORT_RISING);
}
@ -339,10 +340,10 @@ void func_80AA8F2C(DmChar01* this, GlobalContext* globalCtx) {
}
void func_80AA9020(DmChar01* this, GlobalContext* globalCtx) {
if (func_800EE29C(globalCtx, 0x87)) {
CsCmdActorAction* temp_v1 = globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x87)];
if (Cutscene_CheckActorAction(globalCtx, 135)) {
CsCmdActorAction* temp_v1 = globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 135)];
if ((temp_v1->startFrame == globalCtx->csCtx.frames) && (temp_v1->unk0 == 2)) {
if ((temp_v1->startFrame == globalCtx->csCtx.frames) && (temp_v1->action == 2)) {
gSaveContext.weekEventReg[20] |= 2;
this->actionFunc = func_80AA90AC;
}

View File

@ -177,15 +177,14 @@ void func_80AAC990(DmChar05* this, GlobalContext* globalCtx) {
}
void func_80AAC9DC(DmChar05* this, GlobalContext* globalCtx) {
u32 temp_v0;
if (Cutscene_CheckActorAction(globalCtx, 109) != 0) {
s32 actionIndex = Cutscene_GetActorActionIndex(globalCtx, 109);
if (func_800EE29C(globalCtx, 0x6D) != 0) {
temp_v0 = func_800EE200(globalCtx, 0x6D);
if (globalCtx->csCtx.npcActions[temp_v0]->unk0 == 4) {
if (globalCtx->csCtx.actorActions[actionIndex]->action == 4) {
this->unk_18E = 1;
this->unk_190.x = globalCtx->csCtx.npcActions[temp_v0]->unk0C.x;
this->unk_190.y = globalCtx->csCtx.npcActions[temp_v0]->unk0C.y;
this->unk_190.z = globalCtx->csCtx.npcActions[temp_v0]->unk0C.z;
this->unk_190.x = globalCtx->csCtx.actorActions[actionIndex]->startPos.x;
this->unk_190.y = globalCtx->csCtx.actorActions[actionIndex]->startPos.y;
this->unk_190.z = globalCtx->csCtx.actorActions[actionIndex]->startPos.z;
}
}
}
@ -200,18 +199,17 @@ void func_80AACA98(DmChar05* this, GlobalContext* globalCtx) {
}
void func_80AACAE4(DmChar05* this, GlobalContext* globalCtx) {
u32 sp24;
if (Cutscene_CheckActorAction(globalCtx, 564)) {
s32 actionIndex = Cutscene_GetActorActionIndex(globalCtx, 564);
if (func_800EE29C(globalCtx, 0x234)) {
sp24 = func_800EE200(globalCtx, 0x234);
if (globalCtx->csCtx.npcActions[sp24]->unk0 == 2) {
if (globalCtx->csCtx.frames == globalCtx->csCtx.npcActions[sp24]->startFrame) {
if (globalCtx->csCtx.actorActions[actionIndex]->action == 2) {
if (globalCtx->csCtx.frames == globalCtx->csCtx.actorActions[actionIndex]->startFrame) {
Item_Give(globalCtx, ITEM_MASK_COUPLE);
}
this->unk_18E = 1;
this->unk_190.x = globalCtx->csCtx.npcActions[sp24]->unk0C.x;
this->unk_190.y = globalCtx->csCtx.npcActions[sp24]->unk0C.y;
this->unk_190.z = globalCtx->csCtx.npcActions[sp24]->unk0C.z;
this->unk_190.x = globalCtx->csCtx.actorActions[actionIndex]->startPos.x;
this->unk_190.y = globalCtx->csCtx.actorActions[actionIndex]->startPos.y;
this->unk_190.z = globalCtx->csCtx.actorActions[actionIndex]->startPos.z;
} else {
this->unk_18E = 0;
}
@ -279,14 +277,13 @@ void func_80AACD1C(DmChar05* this, GlobalContext* globalCtx) {
}
void func_80AACD68(DmChar05* this, GlobalContext* globalCtx) {
u32 temp_v0;
if (Cutscene_CheckActorAction(globalCtx, 473)) {
s32 actionIndex = Cutscene_GetActorActionIndex(globalCtx, 473);
if (func_800EE29C(globalCtx, 0x1D9)) {
temp_v0 = func_800EE200(globalCtx, 0x1D9);
this->unk_18E = 1;
this->unk_190.x = globalCtx->csCtx.npcActions[temp_v0]->unk0C.x;
this->unk_190.y = globalCtx->csCtx.npcActions[temp_v0]->unk0C.y;
this->unk_190.z = globalCtx->csCtx.npcActions[temp_v0]->unk0C.z;
this->unk_190.x = globalCtx->csCtx.actorActions[actionIndex]->startPos.x;
this->unk_190.y = globalCtx->csCtx.actorActions[actionIndex]->startPos.y;
this->unk_190.z = globalCtx->csCtx.actorActions[actionIndex]->startPos.z;
}
}
@ -300,28 +297,27 @@ void func_80AACE10(DmChar05* this, GlobalContext* globalCtx) {
}
void func_80AACE5C(DmChar05* this, GlobalContext* globalCtx) {
u32 temp_v0;
if (Cutscene_CheckActorAction(globalCtx, 518)) {
s32 actionIndex = Cutscene_GetActorActionIndex(globalCtx, 518);
if (func_800EE29C(globalCtx, 0x206)) {
temp_v0 = func_800EE200(globalCtx, 0x206);
this->unk_18E = 1;
this->unk_190.x = globalCtx->csCtx.npcActions[temp_v0]->unk0C.x;
this->unk_190.y = globalCtx->csCtx.npcActions[temp_v0]->unk0C.y;
this->unk_190.z = globalCtx->csCtx.npcActions[temp_v0]->unk0C.z;
this->unk_190.x = globalCtx->csCtx.actorActions[actionIndex]->startPos.x;
this->unk_190.y = globalCtx->csCtx.actorActions[actionIndex]->startPos.y;
this->unk_190.z = globalCtx->csCtx.actorActions[actionIndex]->startPos.z;
}
}
void func_80AACF04(DmChar05* this, GlobalContext* globalCtx) {
u8 sp2F = true;
u32 temp_v0;
s32 actionIndex;
switch (DMCHAR05_GET(&this->actor)) {
case DMCHAR05_0:
if (func_800EE29C(globalCtx, 0x6D)) {
temp_v0 = func_800EE200(globalCtx, 0x6D);
if (Cutscene_CheckActorAction(globalCtx, 109)) {
actionIndex = Cutscene_GetActorActionIndex(globalCtx, 109);
if (globalCtx->csCtx.frames == globalCtx->csCtx.npcActions[temp_v0]->startFrame) {
switch (globalCtx->csCtx.npcActions[temp_v0]->unk0) {
if (globalCtx->csCtx.frames == globalCtx->csCtx.actorActions[actionIndex]->startFrame) {
switch (globalCtx->csCtx.actorActions[actionIndex]->action) {
case 1:
sp2F = false;
break;
@ -355,16 +351,16 @@ void func_80AACF04(DmChar05* this, GlobalContext* globalCtx) {
}
}
func_800EDF24(&this->actor, globalCtx, temp_v0);
Cutscene_ActorTranslateAndYaw(&this->actor, globalCtx, actionIndex);
}
break;
case DMCHAR05_1:
if (func_800EE29C(globalCtx, 0x1D9)) {
temp_v0 = func_800EE200(globalCtx, 0x1D9);
if (Cutscene_CheckActorAction(globalCtx, 473)) {
actionIndex = Cutscene_GetActorActionIndex(globalCtx, 473);
if (globalCtx->csCtx.frames == globalCtx->csCtx.npcActions[temp_v0]->startFrame) {
switch (globalCtx->csCtx.npcActions[temp_v0]->unk0) {
if (globalCtx->csCtx.frames == globalCtx->csCtx.actorActions[actionIndex]->startFrame) {
switch (globalCtx->csCtx.actorActions[actionIndex]->action) {
case 1:
sp2F = false;
break;
@ -399,16 +395,16 @@ void func_80AACF04(DmChar05* this, GlobalContext* globalCtx) {
}
}
func_800EDF24(&this->actor, globalCtx, temp_v0);
Cutscene_ActorTranslateAndYaw(&this->actor, globalCtx, actionIndex);
}
break;
case DMCHAR05_2:
if (func_800EE29C(globalCtx, 0x206)) {
temp_v0 = func_800EE200(globalCtx, 0x206);
if (Cutscene_CheckActorAction(globalCtx, 518)) {
actionIndex = Cutscene_GetActorActionIndex(globalCtx, 518);
if (globalCtx->csCtx.frames == globalCtx->csCtx.npcActions[temp_v0]->startFrame) {
switch (globalCtx->csCtx.npcActions[temp_v0]->unk0) {
if (globalCtx->csCtx.frames == globalCtx->csCtx.actorActions[actionIndex]->startFrame) {
switch (globalCtx->csCtx.actorActions[actionIndex]->action) {
case 1:
sp2F = false;
break;
@ -442,16 +438,16 @@ void func_80AACF04(DmChar05* this, GlobalContext* globalCtx) {
}
}
func_800EDF24(&this->actor, globalCtx, temp_v0);
Cutscene_ActorTranslateAndYaw(&this->actor, globalCtx, actionIndex);
}
break;
case DMCHAR05_3:
if (func_800EE29C(globalCtx, 0x22F)) {
temp_v0 = func_800EE200(globalCtx, 0x22F);
if (Cutscene_CheckActorAction(globalCtx, 559)) {
actionIndex = Cutscene_GetActorActionIndex(globalCtx, 559);
if (globalCtx->csCtx.frames == globalCtx->csCtx.npcActions[temp_v0]->startFrame) {
switch (globalCtx->csCtx.npcActions[temp_v0]->unk0) {
if (globalCtx->csCtx.frames == globalCtx->csCtx.actorActions[actionIndex]->startFrame) {
switch (globalCtx->csCtx.actorActions[actionIndex]->action) {
default:
sp2F = false;
break;
@ -478,10 +474,10 @@ void func_80AACF04(DmChar05* this, GlobalContext* globalCtx) {
}
}
if (globalCtx->csCtx.npcActions[temp_v0]->unk0 != 4) {
func_800EDF24(&this->actor, globalCtx, temp_v0);
if (globalCtx->csCtx.actorActions[actionIndex]->action != 4) {
Cutscene_ActorTranslateAndYaw(&this->actor, globalCtx, actionIndex);
} else {
func_800EDE34(&this->actor, globalCtx, temp_v0);
Cutscene_ActorTranslate(&this->actor, globalCtx, actionIndex);
}
}
@ -517,8 +513,8 @@ void func_80AAD450(DmChar05* this, GlobalContext* globalCtx) {
void func_80AAD4A8(DmChar05* this, GlobalContext* globalCtx) {
if (DMCHAR05_GET(&this->actor) == DMCHAR05_0) {
if (func_800EE29C(globalCtx, 0x6D) &&
(globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x6D)]->unk0 == 3)) {
if (Cutscene_CheckActorAction(globalCtx, 109) &&
(globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 109)]->action == 3)) {
if (Animation_OnFrame(&this->skelAnime, 14.0f) || Animation_OnFrame(&this->skelAnime, 15.0f)) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_IT_MASK_BOUND_0);
} else if (Animation_OnFrame(&this->skelAnime, 19.0f)) {
@ -526,15 +522,15 @@ void func_80AAD4A8(DmChar05* this, GlobalContext* globalCtx) {
}
}
} else if (DMCHAR05_GET(&this->actor) == DMCHAR05_1) {
if (func_800EE29C(globalCtx, 0x1D9)) {
if ((globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x1D9)]->unk0 == 3) &&
if (Cutscene_CheckActorAction(globalCtx, 473)) {
if ((globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 473)]->action == 3) &&
Animation_OnFrame(&this->skelAnime, 5.0f)) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_IT_MASK_BOUND_SAND);
}
}
} else if (DMCHAR05_GET(&this->actor) == DMCHAR05_2) {
if (func_800EE29C(globalCtx, 0x206) &&
(globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x206)]->unk0 == 2)) {
if (Cutscene_CheckActorAction(globalCtx, 518) &&
(globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 518)]->action == 2)) {
if (Animation_OnFrame(&this->skelAnime, 7.0f)) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_IT_MASK_BOUND_0);
}
@ -550,15 +546,15 @@ void func_80AAD4A8(DmChar05* this, GlobalContext* globalCtx) {
} else if (DMCHAR05_GET(&this->actor) == DMCHAR05_3) {
if (globalCtx->sceneNum == SCENE_OKUJOU) {
if (gSaveContext.sceneSetupIndex == 2) {
if (globalCtx->csCtx.unk_12 == 0) {
if (globalCtx->csCtx.currentCsIndex == 0) {
func_80AAD3F8(this, globalCtx);
} else if (globalCtx->csCtx.unk_12 == 1) {
} else if (globalCtx->csCtx.currentCsIndex == 1) {
func_80AAD450(this, globalCtx);
}
}
} else if (globalCtx->sceneNum == SCENE_SPOT00) {
if (gSaveContext.sceneSetupIndex == 9) {
if ((globalCtx->csCtx.unk_12 == 0) && (globalCtx->csCtx.frames == 255)) {
if ((globalCtx->csCtx.currentCsIndex == 0) && (globalCtx->csCtx.frames == 255)) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_EVIL_POWER);
}
} else if ((gSaveContext.sceneSetupIndex == 0xB) && (globalCtx->csCtx.frames == 115)) {
@ -572,25 +568,25 @@ void DmChar05_Update(Actor* thisx, GlobalContext* globalCtx) {
DmChar05* this = THIS;
func_80AACF04(this, globalCtx);
if (func_800EE29C(globalCtx, 0x6D)) {
if (globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x6D)]->unk0 == 3) {
if (Cutscene_CheckActorAction(globalCtx, 109)) {
if (globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 109)]->action == 3) {
SkelAnime_Update(&this->skelAnime);
}
} else if (func_800EE29C(globalCtx, 0x1D9)) {
if (globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x1D9)]->unk0 == 3) {
} else if (Cutscene_CheckActorAction(globalCtx, 473)) {
if (globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 473)]->action == 3) {
SkelAnime_Update(&this->skelAnime);
}
} else if (func_800EE29C(globalCtx, 0x206)) {
if (globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x206)]->unk0 == 2) {
} else if (Cutscene_CheckActorAction(globalCtx, 518)) {
if (globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 518)]->action == 2) {
SkelAnime_Update(&this->skelAnime);
}
} else if (func_800EE29C(globalCtx, 0x22F)) {
if ((globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x22F)]->unk0 == 2) ||
(globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x22F)]->unk0 == 3)) {
} else if (Cutscene_CheckActorAction(globalCtx, 559)) {
if ((globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 559)]->action == 2) ||
(globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 559)]->action == 3)) {
SkelAnime_Update(&this->skelAnime);
}
if (globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x22F)]->unk0 == 4) {
if (globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 559)]->action == 4) {
this->actor.world.rot.y += 0x258;
this->actor.shape.rot.y += 0x258;
}
@ -612,8 +608,8 @@ void func_80AAD998(Actor* thisx, GlobalContext* globalCtx) {
s32 pad[2];
if (this->unk_18E == 0) {
if (func_800EE29C(globalCtx, 0x6D) &&
(globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x6D)]->unk0 != 1)) {
if (Cutscene_CheckActorAction(globalCtx, 109) &&
(globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 109)]->action != 1)) {
OPEN_DISPS(globalCtx->state.gfxCtx);
func_8012C28C(globalCtx->state.gfxCtx);
@ -633,8 +629,8 @@ void func_80AADA90(Actor* thisx, GlobalContext* globalCtx) {
DmChar05* this = THIS;
if (this->unk_18E == 0) {
if (func_800EE29C(globalCtx, 0x1D9) &&
(globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x1D9)]->unk0 != 1)) {
if (Cutscene_CheckActorAction(globalCtx, 473) &&
(globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 473)]->action != 1)) {
func_8012C28C(globalCtx->state.gfxCtx);
SkelAnime_DrawOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
DmChar05_OverrideLimbDraw, DmChar05_PostLimbDraw, &this->actor);
@ -648,8 +644,8 @@ void func_80AADB4C(Actor* thisx, GlobalContext* globalCtx) {
DmChar05* this = THIS;
if (this->unk_18E == 0) {
if (func_800EE29C(globalCtx, 0x206) &&
(globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x206)]->unk0 != 1)) {
if (Cutscene_CheckActorAction(globalCtx, 518) &&
(globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 518)]->action != 1)) {
func_8012C28C(globalCtx->state.gfxCtx);
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
this->skelAnime.dListCount, NULL, NULL, &this->actor);
@ -662,18 +658,19 @@ void func_80AADB4C(Actor* thisx, GlobalContext* globalCtx) {
void func_80AADC00(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
DmChar05* this = THIS;
u32 temp_v0;
s32 actionIndex;
if (func_800EE29C(globalCtx, 0x22F)) {
temp_v0 = func_800EE200(globalCtx, 0x22F);
if (Cutscene_CheckActorAction(globalCtx, 559)) {
actionIndex = Cutscene_GetActorActionIndex(globalCtx, 559);
if ((globalCtx->csCtx.npcActions[temp_v0]->unk0 != 1) && (globalCtx->csCtx.npcActions[temp_v0]->unk0 != 4)) {
if ((globalCtx->csCtx.actorActions[actionIndex]->action != 1) &&
(globalCtx->csCtx.actorActions[actionIndex]->action != 4)) {
func_8012C28C(globalCtx->state.gfxCtx);
SkelAnime_DrawOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
DmChar05_OverrideLimbDraw, DmChar05_PostLimbDraw, &this->actor);
}
if (globalCtx->csCtx.npcActions[temp_v0]->unk0 == 4) {
if (globalCtx->csCtx.actorActions[actionIndex]->action == 4) {
Matrix_InsertTranslation(-600.0f, 0.0f, 0.0f, MTXMODE_APPLY);
Gfx_DrawDListOpa(globalCtx, object_dmask_DL_001E70);
}

View File

@ -43,7 +43,7 @@ s32 func_80C1DED0(DmNb* this, s32 arg1) {
void func_80C1DF18(DmNb* this, GlobalContext* globalCtx) {
s32 sp2C[] = { 0, 0, 0, 0, 0 };
u16 actionUnk0;
u32 actionIndex;
s32 actionIndex;
if (globalCtx->csCtx.state != 0) {
if (this->unk1F8 == 0) {
@ -51,14 +51,14 @@ void func_80C1DF18(DmNb* this, GlobalContext* globalCtx) {
this->unk1F8 = 1;
this->unk1F4 = this->unk1F0;
}
if (func_800EE29C(globalCtx, 0x232)) {
actionIndex = func_800EE200(globalCtx, 0x232);
actionUnk0 = globalCtx->csCtx.npcActions[actionIndex]->unk0;
if (Cutscene_CheckActorAction(globalCtx, 562)) {
actionIndex = Cutscene_GetActorActionIndex(globalCtx, 562);
actionUnk0 = globalCtx->csCtx.actorActions[actionIndex]->action;
if (this->unk1EC != (actionUnk0 & 0xFF)) {
this->unk1EC = actionUnk0;
func_80C1DED0(this, sp2C[actionUnk0]);
}
func_800EDF24(&this->actor, globalCtx, actionIndex);
Cutscene_ActorTranslateAndYaw(&this->actor, globalCtx, actionIndex);
}
} else if (this->unk1F8 != 0) {
this->unk1F8 = 0;

View File

@ -721,7 +721,7 @@ void func_80AA0E90(DmStk* this, GlobalContext* globalCtx) {
func_80A9FED8(this, globalCtx);
} else if (gSaveContext.sceneSetupIndex == 0) {
func_80AA0100(this, globalCtx);
} else if ((gSaveContext.sceneSetupIndex == 2) && (globalCtx->csCtx.unk_12 == 0)) {
} else if ((gSaveContext.sceneSetupIndex == 2) && (globalCtx->csCtx.currentCsIndex == 0)) {
func_80AA0158(this, globalCtx);
}
break;
@ -734,9 +734,9 @@ void func_80AA0E90(DmStk* this, GlobalContext* globalCtx) {
case SCENE_OPENINGDAN:
if (gSaveContext.sceneSetupIndex == 0) {
if (globalCtx->csCtx.unk_12 == 0) {
if (globalCtx->csCtx.currentCsIndex == 0) {
func_80AA01C0(this, globalCtx);
} else if (globalCtx->csCtx.unk_12 == 1) {
} else if (globalCtx->csCtx.currentCsIndex == 1) {
func_80AA0264(this, globalCtx);
}
}
@ -744,19 +744,19 @@ void func_80AA0E90(DmStk* this, GlobalContext* globalCtx) {
case SCENE_OKUJOU:
if (gSaveContext.sceneSetupIndex == 0) {
if (globalCtx->csCtx.unk_12 == 0) {
if (globalCtx->csCtx.currentCsIndex == 0) {
func_80AA0420(this, globalCtx);
} else if (globalCtx->csCtx.unk_12 == 1) {
} else if (globalCtx->csCtx.currentCsIndex == 1) {
func_80AA05F0(this, globalCtx);
} else if (globalCtx->csCtx.unk_12 == 2) {
} else if (globalCtx->csCtx.currentCsIndex == 2) {
func_80AA09DC(this, globalCtx);
} else if (globalCtx->csCtx.unk_12 == 3) {
} else if (globalCtx->csCtx.currentCsIndex == 3) {
func_80AA0B08(this, globalCtx);
}
} else if (gSaveContext.sceneSetupIndex == 2) {
if (globalCtx->csCtx.unk_12 == 0) {
if (globalCtx->csCtx.currentCsIndex == 0) {
func_80AA0DA8(this, globalCtx);
} else if (globalCtx->csCtx.unk_12 == 1) {
} else if (globalCtx->csCtx.currentCsIndex == 1) {
func_80AA0E1C(this, globalCtx);
}
}
@ -764,15 +764,15 @@ void func_80AA0E90(DmStk* this, GlobalContext* globalCtx) {
case SCENE_00KEIKOKU:
if (gSaveContext.sceneSetupIndex == 3) {
if (globalCtx->csCtx.unk_12 == 0) {
if (globalCtx->csCtx.currentCsIndex == 0) {
func_80AA0634(this, globalCtx);
} else if (globalCtx->csCtx.unk_12 == 2) {
} else if (globalCtx->csCtx.currentCsIndex == 2) {
func_80AA066C(this, globalCtx);
}
} else if (gSaveContext.sceneSetupIndex == 7) {
if (globalCtx->csCtx.unk_12 == 0) {
if (globalCtx->csCtx.currentCsIndex == 0) {
func_80AA071C(this, globalCtx);
} else if (globalCtx->csCtx.unk_12 == 1) {
} else if (globalCtx->csCtx.currentCsIndex == 1) {
func_80AA076C(this, globalCtx);
}
}
@ -894,7 +894,7 @@ void DmStk_Init(Actor* thisx, GlobalContext* globalCtx) {
this->unk_2E0 = 5;
this->actionFunc = func_80AA1714;
} else {
if ((globalCtx->sceneNum == SCENE_LOST_WOODS) && !func_800EE2F4(globalCtx)) {
if ((globalCtx->sceneNum == SCENE_LOST_WOODS) && !Cutscene_IsPlaying(globalCtx)) {
Actor_MarkForDeath(&this->actor);
}
this->unk_32C = 2;
@ -920,7 +920,7 @@ void DmStk_Init(Actor* thisx, GlobalContext* globalCtx) {
Actor_SetScale(&this->actor, 0.01f);
if ((globalCtx->sceneNum == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 3) &&
(globalCtx->csCtx.unk_12 > 0)) {
(globalCtx->csCtx.currentCsIndex > 0)) {
globalCtx->envCtx.unk_17 = 15;
globalCtx->envCtx.unk_18 = 15;
}
@ -1051,7 +1051,7 @@ void func_80AA1B9C(DmStk* this, GlobalContext* globalCtx) {
if (this->unk_339 >= 3) {
this->unk_339 = 0;
if (!(player->stateFlags2 & 0x8000000)) {
func_801518B0(globalCtx, 0x2013, &this->actor);
Message_StartTextbox(globalCtx, 0x2013, &this->actor);
}
}
@ -1076,21 +1076,21 @@ void func_80AA1C64(DmStk* this, GlobalContext* globalCtx) {
void func_80AA1D1C(DmStk* this, GlobalContext* globalCtx) {
s32 pad;
u32 temp_v0;
s32 temp_v0;
if (func_800EE29C(globalCtx, 0x6B)) {
temp_v0 = func_800EE200(globalCtx, 0x6B);
if (Cutscene_CheckActorAction(globalCtx, 107)) {
temp_v0 = Cutscene_GetActorActionIndex(globalCtx, 107);
if (globalCtx->csCtx.frames == globalCtx->csCtx.npcActions[temp_v0]->startFrame) {
if (this->unk_334 != globalCtx->csCtx.npcActions[temp_v0]->unk0) {
this->unk_334 = globalCtx->csCtx.npcActions[temp_v0]->unk0;
if (globalCtx->csCtx.frames == globalCtx->csCtx.actorActions[temp_v0]->startFrame) {
if (this->unk_334 != globalCtx->csCtx.actorActions[temp_v0]->action) {
this->unk_334 = globalCtx->csCtx.actorActions[temp_v0]->action;
if (globalCtx->sceneNum == SCENE_CLOCKTOWER) {
this->unk_32D = 6;
} else {
this->unk_32D = 9;
}
switch (globalCtx->csCtx.npcActions[temp_v0]->unk0) {
switch (globalCtx->csCtx.actorActions[temp_v0]->action) {
case 0:
case 1:
this->unk_2E0 = 3;
@ -1350,7 +1350,7 @@ void func_80AA1D1C(DmStk* this, GlobalContext* globalCtx) {
}
}
func_800EDF24(&this->actor, globalCtx, temp_v0);
Cutscene_ActorTranslateAndYaw(&this->actor, globalCtx, temp_v0);
} else {
this->unk_334 = 99;
}
@ -1482,7 +1482,7 @@ void func_80AA2720(DmStk* this, GlobalContext* globalCtx) {
if (this->unk_328 > 800) {
this->unk_328 = 0;
if (!(player->stateFlags2 & 0x8000000)) {
func_801518B0(globalCtx, 0x2014, &this->actor);
Message_StartTextbox(globalCtx, 0x2014, &this->actor);
}
}
if ((this->collider.base.acFlags & AC_HIT) && (this->actor.colChkInfo.damageEffect == 0xF)) {
@ -1579,7 +1579,7 @@ void DmStk_Update(Actor* thisx, GlobalContext* globalCtx) {
}
if ((globalCtx->sceneNum == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 3) &&
(globalCtx->csCtx.unk_12 > 0)) {
(globalCtx->csCtx.currentCsIndex > 0)) {
globalCtx->envCtx.unk_17 = 15;
globalCtx->envCtx.unk_18 = 15;
}
@ -1658,8 +1658,9 @@ void DmStk_PostLimbDraw2(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, V
gSPDisplayList(POLY_OPA_DISP++, object_stk_DL_006BB0);
gSPDisplayList(POLY_OPA_DISP++, object_stk_DL_005870);
if (func_800EE29C(globalCtx, 0x201) &&
(globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x201)]->unk0 == 2) && (this->unk_337 >= 0)) {
if (Cutscene_CheckActorAction(globalCtx, 513) &&
(globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 513)]->action == 2) &&
(this->unk_337 >= 0)) {
Matrix_StatePush();
Matrix_Scale(2.0f, 2.0f, 2.0f, MTXMODE_APPLY);
gSegments[6] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[this->unk_337].segment);

View File

@ -177,10 +177,10 @@ void DoorWarp1_Destroy(Actor* thisx, GlobalContext* globalCtx) {
LightContext_RemoveLight(globalCtx, &globalCtx->lightCtx, this->unk_1DC);
LightContext_RemoveLight(globalCtx, &globalCtx->lightCtx, this->unk_1F0);
for (i = 0; i < ARRAY_COUNT(globalCtx->envCtx.unk_8C.diffuseColor1); i++) {
globalCtx->envCtx.unk_8C.diffuseColor1[i] = 0;
globalCtx->envCtx.unk_8C.fogColor[i] = globalCtx->envCtx.unk_8C.diffuseColor1[i];
globalCtx->envCtx.unk_8C.ambientColor[i] = globalCtx->envCtx.unk_8C.diffuseColor1[i];
for (i = 0; i < ARRAY_COUNT(globalCtx->envCtx.lightSettings.diffuseColor1); i++) {
globalCtx->envCtx.lightSettings.diffuseColor1[i] = 0;
globalCtx->envCtx.lightSettings.fogColor[i] = globalCtx->envCtx.lightSettings.diffuseColor1[i];
globalCtx->envCtx.lightSettings.ambientColor[i] = globalCtx->envCtx.lightSettings.diffuseColor1[i];
}
if (this->unk_1D3 != 0) {
@ -279,14 +279,15 @@ void func_808B8E78(DoorWarp1* this, GlobalContext* globalCtx) {
}
s32 func_808B900C(DoorWarp1* this, GlobalContext* globalCtx) {
u32 index;
s32 index;
u8 ret = false;
if (func_800EE29C(globalCtx, 0x239)) {
index = func_800EE200(globalCtx, 0x239);
if (this->unk_208 != globalCtx->csCtx.npcActions[index]->unk0) {
this->unk_208 = globalCtx->csCtx.npcActions[index]->unk0;
if (globalCtx->csCtx.npcActions[index]->unk0 == 2) {
if (Cutscene_CheckActorAction(globalCtx, 569)) {
index = Cutscene_GetActorActionIndex(globalCtx, 569);
if (this->unk_208 != globalCtx->csCtx.actorActions[index]->action) {
this->unk_208 = globalCtx->csCtx.actorActions[index]->action;
if (globalCtx->csCtx.actorActions[index]->action == 2) {
ret = true;
}
}
@ -344,7 +345,7 @@ void func_808B921C(DoorWarp1* this, GlobalContext* globalCtx) {
if (func_808B866C(this, globalCtx) && !func_801690CC(globalCtx)) {
func_800B7298(globalCtx, &this->dyna.actor, 7);
func_801518B0(globalCtx, 0xF2, &this->dyna.actor);
Message_StartTextbox(globalCtx, 0xF2, &this->dyna.actor);
DoorWarp1_SetupAction(this, func_808B93A0);
}
@ -831,15 +832,15 @@ void func_808BA550(DoorWarp1* this, GlobalContext* globalCtx) {
}
if (this->unk_1D0 > 140) {
globalCtx->envCtx.unk_E5 = 1;
globalCtx->envCtx.fillScreen = 1;
temp_f0 = (this->unk_1D0 - 140) / 20.0f;
if (temp_f0 > 1.0f) {
temp_f0 = 1.0f;
}
globalCtx->envCtx.unk_E6[0] = 160;
globalCtx->envCtx.unk_E6[1] = 160;
globalCtx->envCtx.unk_E6[2] = 160;
globalCtx->envCtx.unk_E6[3] = 255.0f * temp_f0;
globalCtx->envCtx.screenFillColor[0] = 160;
globalCtx->envCtx.screenFillColor[1] = 160;
globalCtx->envCtx.screenFillColor[2] = 160;
globalCtx->envCtx.screenFillColor[3] = 255.0f * temp_f0;
}
Lights_PointNoGlowSetInfo(&this->unk_1E0, player->actor.world.pos.x + 10.0f, player->actor.world.pos.y + 10.0f,
@ -862,13 +863,13 @@ void func_808BA550(DoorWarp1* this, GlobalContext* globalCtx) {
temp_f16 = -255.0f * temp_f0;
for (i = 0; i < 3; i++) {
globalCtx->envCtx.unk_8C.diffuseColor1[i] = temp_f16;
globalCtx->envCtx.unk_8C.fogColor[i] = temp_f16;
globalCtx->envCtx.unk_8C.ambientColor[i] = temp_f16;
globalCtx->envCtx.lightSettings.diffuseColor1[i] = temp_f16;
globalCtx->envCtx.lightSettings.fogColor[i] = temp_f16;
globalCtx->envCtx.lightSettings.ambientColor[i] = temp_f16;
}
globalCtx->envCtx.unk_8C.fogNear = -500.0f * temp_f0;
if (globalCtx->envCtx.unk_8C.fogNear < -300) {
globalCtx->envCtx.lightSettings.fogNear = -500.0f * temp_f0;
if (globalCtx->envCtx.lightSettings.fogNear < -300) {
globalCtx->roomCtx.currRoom.segment = NULL;
}
}

View File

@ -455,7 +455,7 @@ void func_80BED3BC(EnAkindonuts* this, GlobalContext* globalCtx) {
break;
}
func_801518B0(globalCtx, this->unk_33C, &this->actor);
Message_StartTextbox(globalCtx, this->unk_33C, &this->actor);
}
void func_80BED680(EnAkindonuts* this, GlobalContext* globalCtx) {
@ -526,7 +526,7 @@ void func_80BED680(EnAkindonuts* this, GlobalContext* globalCtx) {
break;
}
func_801518B0(globalCtx, this->unk_33C, &this->actor);
Message_StartTextbox(globalCtx, this->unk_33C, &this->actor);
}
void func_80BED8A4(EnAkindonuts* this, GlobalContext* globalCtx) {
@ -632,7 +632,7 @@ void func_80BED8A4(EnAkindonuts* this, GlobalContext* globalCtx) {
break;
}
func_801518B0(globalCtx, this->unk_33C, &this->actor);
Message_StartTextbox(globalCtx, this->unk_33C, &this->actor);
}
void func_80BEDB88(EnAkindonuts* this, GlobalContext* globalCtx) {
@ -704,7 +704,7 @@ void func_80BEDB88(EnAkindonuts* this, GlobalContext* globalCtx) {
break;
}
func_801518B0(globalCtx, this->unk_33C, &this->actor);
Message_StartTextbox(globalCtx, this->unk_33C, &this->actor);
}
void func_80BEDDAC(EnAkindonuts* this, GlobalContext* globalCtx) {
@ -805,7 +805,7 @@ void func_80BEDDAC(EnAkindonuts* this, GlobalContext* globalCtx) {
break;
}
func_801518B0(globalCtx, this->unk_33C, &this->actor);
Message_StartTextbox(globalCtx, this->unk_33C, &this->actor);
}
void func_80BEE070(EnAkindonuts* this, GlobalContext* globalCtx) {
@ -872,7 +872,7 @@ void func_80BEE070(EnAkindonuts* this, GlobalContext* globalCtx) {
break;
}
func_801518B0(globalCtx, this->unk_33C, &this->actor);
Message_StartTextbox(globalCtx, this->unk_33C, &this->actor);
}
void func_80BEE274(EnAkindonuts* this, GlobalContext* globalCtx) {
@ -966,7 +966,7 @@ void func_80BEE274(EnAkindonuts* this, GlobalContext* globalCtx) {
break;
}
func_801518B0(globalCtx, this->unk_33C, &this->actor);
Message_StartTextbox(globalCtx, this->unk_33C, &this->actor);
}
void func_80BEE530(EnAkindonuts* this, GlobalContext* globalCtx) {
@ -1033,7 +1033,7 @@ void func_80BEE530(EnAkindonuts* this, GlobalContext* globalCtx) {
break;
}
func_801518B0(globalCtx, this->unk_33C, &this->actor);
Message_StartTextbox(globalCtx, this->unk_33C, &this->actor);
}
void func_80BEE73C(EnAkindonuts* this, GlobalContext* globalCtx) {

View File

@ -411,7 +411,7 @@ void func_809C16DC(EnAob01* this, GlobalContext* globalCtx) {
break;
}
func_801518B0(globalCtx, this->unk_210, &this->actor);
Message_StartTextbox(globalCtx, this->unk_210, &this->actor);
}
void func_809C1C9C(EnAob01* this, GlobalContext* globalCtx) {
@ -439,13 +439,13 @@ void func_809C1D64(EnAob01* this, GlobalContext* globalCtx) {
if (gSaveContext.rupees < 10) {
play_sound(NA_SE_SY_ERROR);
this->unk_210 = 0x3524;
func_801518B0(globalCtx, this->unk_210, &this->actor);
Message_StartTextbox(globalCtx, this->unk_210, &this->actor);
} else {
func_8019F208();
this->unk_2D2 |= 4;
this->unk_2D2 |= 0x10;
this->unk_210 = 0x3522;
func_801518B0(globalCtx, this->unk_210, &this->actor);
Message_StartTextbox(globalCtx, this->unk_210, &this->actor);
this->actionFunc = func_809C21E0;
}
break;
@ -453,7 +453,7 @@ void func_809C1D64(EnAob01* this, GlobalContext* globalCtx) {
case 1:
func_8019F230();
this->unk_210 = 0x3535;
func_801518B0(globalCtx, this->unk_210, &this->actor);
Message_StartTextbox(globalCtx, this->unk_210, &this->actor);
break;
}
}
@ -556,7 +556,7 @@ void func_809C21E0(EnAob01* this, GlobalContext* globalCtx) {
this->unk_2D2 |= 0x40;
this->unk_43C = 1;
Actor_ChangeAnimationByInfo(&this->skelAnime, D_809C3790, 1);
func_801518B0(globalCtx, 0x354B, &this->actor);
Message_StartTextbox(globalCtx, 0x354B, &this->actor);
}
this->unk_2D2 &= ~8;
}
@ -738,7 +738,7 @@ void func_809C28B8(EnAob01* this, GlobalContext* globalCtx) {
break;
}
func_801518B0(globalCtx, this->unk_210, &this->actor);
Message_StartTextbox(globalCtx, this->unk_210, &this->actor);
this->actionFunc = func_809C2D0C;
} else if (this->actor.xzDistToPlayer < 100.0f) {
func_800B8614(&this->actor, globalCtx, 100.0f);
@ -824,7 +824,7 @@ void func_809C2D0C(EnAob01* this, GlobalContext* globalCtx) {
this->unk_2D2 &= ~0x80;
if (this->unk_434 >= 150) {
this->unk_210 = 0x352E;
func_801518B0(globalCtx, this->unk_210, &this->actor);
Message_StartTextbox(globalCtx, this->unk_210, &this->actor);
this->actionFunc = func_809C2A64;
} else {
this->unk_2D4 = this->unk_2E6;
@ -842,7 +842,7 @@ void func_809C2D0C(EnAob01* this, GlobalContext* globalCtx) {
}
this->unk_210 = 0x354C;
func_801518B0(globalCtx, this->unk_210, &this->actor);
Message_StartTextbox(globalCtx, this->unk_210, &this->actor);
this->actionFunc = func_809C1D64;
gSaveContext.eventInf[0] &= (u8)~7;
}

View File

@ -233,7 +233,7 @@ void func_80BA886C(EnBaba* this, GlobalContext* globalCtx) {
break;
}
func_801518B0(globalCtx, this->unk_1E0, &this->actor);
Message_StartTextbox(globalCtx, this->unk_1E0, &this->actor);
if (this->unk_40A & 1) {
if (this->unk_40A & 0x40) {
this->unk_40A &= ~0x40;
@ -603,7 +603,7 @@ void func_80BA9B80(EnBaba* this, GlobalContext* globalCtx) {
if (this->unk_40A & 2) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
func_801518B0(globalCtx, 0x2A39, &this->actor); // "I'm sorry"
Message_StartTextbox(globalCtx, 0x2A39, &this->actor); // "I'm sorry"
this->actionFunc = func_80BA9848;
} else if ((this->actor.xzDistToPlayer < 100.0f) || this->actor.isTargeted) {
func_800B863C(&this->actor, globalCtx);

View File

@ -187,7 +187,7 @@ void EnBba01_Talk(EnHy* this, GlobalContext* globalCtx) {
case 0:
yaw = ABS_ALT(this->actor.shape.rot.y - this->actor.yawTowardsPlayer);
if (yaw < 0x64) {
func_801518B0(globalCtx, this->textId, NULL);
Message_StartTextbox(globalCtx, this->textId, NULL);
}
break;
case 2:

View File

@ -863,7 +863,7 @@ void EnBigslime_Scale(EnBigslime* this, s16 pitch, f32 xzScale, f32 yScale) {
* Set the params used by the floor shockwave when bigslime shatters into minislime
*/
void EnBigslime_InitShockwave(EnBigslime* this, GlobalContext* globalCtx) {
globalCtx->envCtx.unk_C3 = 3;
globalCtx->envCtx.lightSettingOverride = 3;
Math_Vec3f_Copy(&this->frozenPos, &this->actor.world.pos);
this->frozenPos.y = GBT_ROOM_5_MIN_Y;
this->shockwaveAlpha = 235;
@ -931,7 +931,7 @@ void EnBigslime_SetupCutsceneStartBattle(EnBigslime* this, GlobalContext* global
Player* player = GET_PLAYER(globalCtx);
Camera* subCam = Play_GetCamera(globalCtx, this->subCamId);
globalCtx->envCtx.unk_C3 = 4;
globalCtx->envCtx.lightSettingOverride = 4;
Animation_PlayLoop(&this->skelAnime, &gGekkoLookAroundAnim);
this->bigslimeCollider[0].base.atFlags &= ~AT_ON;
@ -1008,7 +1008,7 @@ void EnBigslime_CallMinislime(EnBigslime* this, GlobalContext* globalCtx) {
EnBigslime_UpdateCameraIntroCs(this, globalCtx, 25);
func_801A2E54(0x38);
EnBigslime_InitFallMinislime(this);
globalCtx->envCtx.unk_C3 = 0xFF;
globalCtx->envCtx.lightSettingOverride = 0xFF;
this->callTimer = 35;
func_800B7298(globalCtx, &this->actor, 4);
}
@ -1988,7 +1988,7 @@ void EnBigslime_Melt(EnBigslime* this, GlobalContext* globalCtx) {
if (this->meltCounter == 100) {
EnBigslime_SetTargetVtxFromPreFrozen(this);
} else if (this->meltCounter == 50) {
globalCtx->envCtx.unk_C3 = 0xFF;
globalCtx->envCtx.lightSettingOverride = 0xFF;
}
}
@ -2582,7 +2582,7 @@ void EnBigslime_ApplyDamageEffectBigslime(EnBigslime* this, GlobalContext* globa
if (this->actor.colChkInfo.damageEffect == BIGSLIME_DMGEFF_ICE) {
EnMinislime* minislime;
globalCtx->envCtx.unk_C3 = 2;
globalCtx->envCtx.lightSettingOverride = 2;
EnBigslime_SetPlayerParams(this, globalCtx);
this->rotation = 0;
EnBigslime_SetupFreeze(this);
@ -2772,8 +2772,8 @@ void EnBigslime_UpdateBigslime(Actor* thisx, GlobalContext* globalCtx) {
Vec3f vtxMax;
Vec3f vtxMin;
if (globalCtx->envCtx.unk_C3 == 3) {
globalCtx->envCtx.unk_C3 = 0xFF;
if (globalCtx->envCtx.lightSettingOverride == 3) {
globalCtx->envCtx.lightSettingOverride = 0xFF;
}
func_8019F540(1);
@ -2817,8 +2817,8 @@ void EnBigslime_UpdateGekko(Actor* thisx, GlobalContext* globalCtx) {
Player* player;
s32 pad;
if (globalCtx->envCtx.unk_C3 == 3) {
globalCtx->envCtx.unk_C3 = 0xFF;
if (globalCtx->envCtx.lightSettingOverride == 3) {
globalCtx->envCtx.lightSettingOverride = 0xFF;
}
func_8019F540(0);

View File

@ -183,7 +183,7 @@ void func_809CD028(EnBji01* this, GlobalContext* globalCtx) {
tempDay = gSaveContext.day;
tempTimeBeforeMoonCrash =
((-(tempDay % 5 << 0x10) - ((u16)(gSaveContext.time - 0x4000))) + 0x40000);
if (tempTimeBeforeMoonCrash < 2730.6667f) { /* 1 hr */
if (tempTimeBeforeMoonCrash < CLOCK_TIME_F(1, 0)) { /* 1 hr */
this->textId = 0x5E8;
} else {
this->textId = 0x5EB;
@ -203,7 +203,7 @@ void EnBji01_DialogueHandler(EnBji01* this, GlobalContext* globalCtx) {
Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 0x444);
func_809CCDE0(this, globalCtx);
if (this->actor.shape.rot.y == this->actor.yawTowardsPlayer) {
func_801518B0(globalCtx, this->textId, &this->actor);
Message_StartTextbox(globalCtx, this->textId, &this->actor);
}
break;
case 4:

View File

@ -350,28 +350,28 @@ void func_808715B8(EnBom* this, GlobalContext* globalCtx) {
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider2.base);
}
if (globalCtx->envCtx.unk_8C.diffuseColor1[0] != 0) {
globalCtx->envCtx.unk_8C.diffuseColor1[0] -= 25;
if (globalCtx->envCtx.lightSettings.diffuseColor1[0] != 0) {
globalCtx->envCtx.lightSettings.diffuseColor1[0] -= 25;
}
if (globalCtx->envCtx.unk_8C.diffuseColor1[1] != 0) {
globalCtx->envCtx.unk_8C.diffuseColor1[1] -= 25;
if (globalCtx->envCtx.lightSettings.diffuseColor1[1] != 0) {
globalCtx->envCtx.lightSettings.diffuseColor1[1] -= 25;
}
if (globalCtx->envCtx.unk_8C.diffuseColor1[2] != 0) {
globalCtx->envCtx.unk_8C.diffuseColor1[2] -= 25;
if (globalCtx->envCtx.lightSettings.diffuseColor1[2] != 0) {
globalCtx->envCtx.lightSettings.diffuseColor1[2] -= 25;
}
if (globalCtx->envCtx.unk_8C.ambientColor[0] != 0) {
globalCtx->envCtx.unk_8C.ambientColor[0] -= 25;
if (globalCtx->envCtx.lightSettings.ambientColor[0] != 0) {
globalCtx->envCtx.lightSettings.ambientColor[0] -= 25;
}
if (globalCtx->envCtx.unk_8C.ambientColor[1] != 0) {
globalCtx->envCtx.unk_8C.ambientColor[1] -= 25;
if (globalCtx->envCtx.lightSettings.ambientColor[1] != 0) {
globalCtx->envCtx.lightSettings.ambientColor[1] -= 25;
}
if (globalCtx->envCtx.unk_8C.ambientColor[2] != 0) {
globalCtx->envCtx.unk_8C.ambientColor[2] -= 25;
if (globalCtx->envCtx.lightSettings.ambientColor[2] != 0) {
globalCtx->envCtx.lightSettings.ambientColor[2] -= 25;
}
if (this->timer == 0) {
@ -533,10 +533,10 @@ void EnBom_Update(Actor* thisx, GlobalContext* globalCtx) {
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_CLEAR_TAG, sp80.x, sp80.y - 10.0f, sp80.z, 0, 0,
0, this->isPowderKeg);
func_800BC848(thisx, globalCtx, D_80872E98[this->isPowderKeg], D_80872E9C[this->isPowderKeg]);
globalCtx->envCtx.unk_8C.diffuseColor1[0] = globalCtx->envCtx.unk_8C.diffuseColor1[1] =
globalCtx->envCtx.unk_8C.diffuseColor1[2] = 250;
globalCtx->envCtx.unk_8C.ambientColor[0] = globalCtx->envCtx.unk_8C.ambientColor[1] =
globalCtx->envCtx.unk_8C.ambientColor[2] = 250;
globalCtx->envCtx.lightSettings.diffuseColor1[0] = globalCtx->envCtx.lightSettings.diffuseColor1[1] =
globalCtx->envCtx.lightSettings.diffuseColor1[2] = 250;
globalCtx->envCtx.lightSettings.ambientColor[0] = globalCtx->envCtx.lightSettings.ambientColor[1] =
globalCtx->envCtx.lightSettings.ambientColor[2] = 250;
func_800DFD04(&globalCtx->mainCamera, 2, 11, 8);
thisx->params = ENBOM_1;
this->timer = 10;

View File

@ -232,9 +232,9 @@ void func_809C4DA4(EnBomBowlMan* this, GlobalContext* globalCtx) {
this->unk_2D4 = this->actor.yawTowardsPlayer;
this->unk_290 = this->actor.yawTowardsPlayer;
if (player->transformation == PLAYER_FORM_HUMAN) {
func_801518B0(globalCtx, D_809C618C[0], &this->actor);
Message_StartTextbox(globalCtx, D_809C618C[0], &this->actor);
} else {
func_801518B0(globalCtx, D_809C6198[0], &this->actor);
Message_StartTextbox(globalCtx, D_809C6198[0], &this->actor);
}
}
@ -406,7 +406,7 @@ void func_809C5524(EnBomBowlMan* this, GlobalContext* globalCtx) {
this->actor.textId = 0x72F;
}
func_809C493C(this, 3, 1.0f);
func_801518B0(globalCtx, this->actor.textId, &this->actor);
Message_StartTextbox(globalCtx, this->actor.textId, &this->actor);
this->actionFunc = func_809C5598;
}
@ -585,10 +585,10 @@ void func_809C5BF4(EnBomBowlMan* this, GlobalContext* globalCtx) {
D_809C6100 = 0;
if (player->transformation == PLAYER_FORM_HUMAN) {
this->unk_2C0 = 5;
func_801518B0(globalCtx, D_809C618C[this->unk_2C0], &this->actor);
Message_StartTextbox(globalCtx, D_809C618C[this->unk_2C0], &this->actor);
} else {
this->unk_2C0 = 3;
func_801518B0(globalCtx, D_809C6198[this->unk_2C0], &this->actor);
Message_StartTextbox(globalCtx, D_809C6198[this->unk_2C0], &this->actor);
}
this->unk_29C = 0;
this->actionFunc = func_809C4DA4;

View File

@ -661,7 +661,7 @@ void func_80C02740(EnBomjimb* this, GlobalContext* globalCtx) {
func_80C0113C(this, 21, 1.0f);
if ((player->transformation != PLAYER_FORM_DEKU) && (player->transformation != PLAYER_FORM_HUMAN)) {
func_80C0113C(this, 17, 1.0f);
func_801518B0(globalCtx, 0x72E, &this->actor);
Message_StartTextbox(globalCtx, 0x72E, &this->actor);
player->stateFlags1 |= 0x10000000;
player->actor.freezeTimer = 3;
func_80C012E0(this);
@ -673,7 +673,7 @@ void func_80C02740(EnBomjimb* this, GlobalContext* globalCtx) {
if (((player->transformation == PLAYER_FORM_DEKU) && !(gSaveContext.weekEventReg[73] & 0x10)) ||
((player->transformation == PLAYER_FORM_HUMAN) && !(gSaveContext.weekEventReg[85] & 2))) {
func_80C0113C(this, 17, 1.0f);
func_801518B0(globalCtx, 0x72E, &this->actor);
Message_StartTextbox(globalCtx, 0x72E, &this->actor);
player->stateFlags1 |= 0x10000000;
player->actor.freezeTimer = 3;
func_80C012E0(this);
@ -683,7 +683,7 @@ void func_80C02740(EnBomjimb* this, GlobalContext* globalCtx) {
}
idx = gSaveContext.unk_FE6;
func_801518B0(globalCtx, D_80C03230[idx], &this->actor);
Message_StartTextbox(globalCtx, D_80C03230[idx], &this->actor);
idx = gSaveContext.unk_FE6;
gSaveContext.unk_FE7[idx] = this->unk_2C8 + 1;
gSaveContext.unk_FE6++;

View File

@ -544,7 +544,7 @@ void EnClearTag_UpdateCamera(EnClearTag* this, GlobalContext* globalCtx) {
}
break;
case 1:
func_800EA0D4(globalCtx, &globalCtx->csCtx);
Cutscene_Start(globalCtx, &globalCtx->csCtx);
this->subCamId = Play_CreateSubCamera(globalCtx);
Play_CameraChangeStatus(globalCtx, CAM_ID_MAIN, 1);
Play_CameraChangeStatus(globalCtx, this->subCamId, 7);
@ -556,7 +556,7 @@ void EnClearTag_UpdateCamera(EnClearTag* this, GlobalContext* globalCtx) {
this->subCamAt.x = mainCam->at.x;
this->subCamAt.y = mainCam->at.y;
this->subCamAt.z = mainCam->at.z;
func_801518B0(globalCtx, 0xF, NULL);
Message_StartTextbox(globalCtx, 0xF, NULL);
this->cameraState = 2;
func_8019FDC8(&D_801DB4A4, NA_SE_VO_NA_LISTEN, 0x20);
case 2:
@ -573,7 +573,7 @@ void EnClearTag_UpdateCamera(EnClearTag* this, GlobalContext* globalCtx) {
mainCam->eyeNext = this->subCamEye;
mainCam->at = this->subCamAt;
func_80169AFC(globalCtx, this->subCamId, 0);
func_800EA0EC(globalCtx, &globalCtx->csCtx);
Cutscene_End(globalCtx, &globalCtx->csCtx);
func_800B7298(globalCtx, &this->actor, 6);
this->cameraState = 0;
this->subCamId = CAM_ID_MAIN;

View File

@ -177,7 +177,7 @@ void EnCne01_Talk(EnHy* this, GlobalContext* globalCtx) {
case 0:
yaw = ABS_ALT(this->actor.shape.rot.y - this->actor.yawTowardsPlayer);
if (yaw < 0x64) {
func_801518B0(globalCtx, this->textId, NULL);
Message_StartTextbox(globalCtx, this->textId, NULL);
}
break;
case 2:

View File

@ -179,7 +179,7 @@ s32 func_80B3E69C(EnDai* this, GlobalContext* globalCtx) {
s32 ret = false;
if ((globalCtx->csCtx.state != 0) && (globalCtx->sceneNum == SCENE_12HAKUGINMAE) &&
(globalCtx->csCtx.unk_12 == 0) && !(gSaveContext.weekEventReg[30] & 1)) {
(globalCtx->csCtx.currentCsIndex == 0) && !(gSaveContext.weekEventReg[30] & 1)) {
if (!(this->unk_1CE & 0x10)) {
Flags_SetSwitch(globalCtx, 20);
this->unk_1CE |= (0x80 | 0x10);
@ -444,13 +444,12 @@ void func_80B3F044(EnDai* this, GlobalContext* globalCtx) {
static s32 D_80B3FE38[] = {
0, 0, 6, 7, 8,
};
s32 sp2C = 0;
s32 sp28;
if (func_800EE29C(globalCtx, 0x1D8)) {
sp2C = func_800EE200(globalCtx, 0x1D8);
sp28 = globalCtx->csCtx.npcActions[sp2C]->unk0;
if (Cutscene_CheckActorAction(globalCtx, 472)) {
sp2C = Cutscene_GetActorActionIndex(globalCtx, 472);
sp28 = globalCtx->csCtx.actorActions[sp2C]->action;
if (this->unk_1CC != (u8)sp28) {
func_80B3E5DC(this, D_80B3FE38[sp28]);
switch (sp28) {
@ -508,7 +507,7 @@ void func_80B3F044(EnDai* this, GlobalContext* globalCtx) {
break;
}
func_800EDF24(&this->actor, globalCtx, sp2C);
Cutscene_ActorTranslateAndYaw(&this->actor, globalCtx, sp2C);
}
void EnDai_Init(Actor* thisx, GlobalContext* globalCtx) {

View File

@ -378,16 +378,16 @@ void func_80989BF8(EnDg* this) {
void func_80989D38(EnDg* this, GlobalContext* globalCtx) {
if (this->unk_286 == 21) {
if (CURRENT_DAY == 1) {
func_801518B0(globalCtx, 0x91C, NULL);
Message_StartTextbox(globalCtx, 0x91C, NULL);
} else {
func_801518B0(globalCtx, 0x91E, NULL);
Message_StartTextbox(globalCtx, 0x91E, NULL);
}
} else if ((this->unk_286 >= 0) && (this->unk_286 < 14)) {
func_801518B0(globalCtx, D_8098C2A8[this->unk_286].unk_04, NULL);
Message_StartTextbox(globalCtx, D_8098C2A8[this->unk_286].unk_04, NULL);
} else if (this->unk_286 == 20) {
func_801518B0(globalCtx, 0x353D, NULL);
Message_StartTextbox(globalCtx, 0x353D, NULL);
} else {
func_801518B0(globalCtx, 0x627, NULL);
Message_StartTextbox(globalCtx, 0x627, NULL);
}
}

View File

@ -553,7 +553,7 @@ void func_8089B580(EnDinofos* this, GlobalContext* globalCtx) {
if (this->skelAnime.curFrame > 35.0f) {
if ((globalCtx->sceneNum == SCENE_MITURIN) && Animation_OnFrame(&this->skelAnime, 38.0f)) {
globalCtx->envCtx.unk_C3 = 11;
globalCtx->envCtx.lightSettingOverride = 11;
}
Math_Vec3f_StepTo(&subCam->eye, &this->unk_2BC, 10.0f);
@ -564,7 +564,7 @@ void func_8089B580(EnDinofos* this, GlobalContext* globalCtx) {
}
if ((globalCtx->sceneNum == SCENE_MITURIN) && Animation_OnFrame(&this->skelAnime, 55.0f)) {
globalCtx->envCtx.unk_C3 = 0xFF;
globalCtx->envCtx.lightSettingOverride = 0xFF;
}
if (SkelAnime_Update(&this->skelAnime)) {
@ -1054,7 +1054,7 @@ void func_8089CB10(EnDinofos* this, GlobalContext* globalCtx) {
}
if (globalCtx->sceneNum == SCENE_MITURIN) {
globalCtx->envCtx.unk_C3 = 11;
globalCtx->envCtx.lightSettingOverride = 11;
}
this->actionFunc = func_8089CBEC;
@ -1115,7 +1115,7 @@ void func_8089CF00(EnDinofos* this, GlobalContext* globalCtx) {
Animation_PlayOnce(&this->skelAnime, &object_dinofos_Anim_0017B8);
this->colliderJntSph.base.atFlags &= ~AT_ON;
if (globalCtx->sceneNum == SCENE_MITURIN) {
globalCtx->envCtx.unk_C3 = 255;
globalCtx->envCtx.lightSettingOverride = 255;
}
this->actionFunc = func_8089CF70;
}
@ -1285,7 +1285,7 @@ s32 func_8089D60C(EnDinofos* this, GlobalContext* globalCtx) {
func_8089ACEC(this, globalCtx);
func_8089AD70(this);
if (globalCtx->sceneNum == SCENE_MITURIN) {
globalCtx->envCtx.unk_C3 = 255;
globalCtx->envCtx.lightSettingOverride = 255;
}
this->colliderQuad.base.atFlags &= ~(AT_ON | AT_BOUNCED);

View File

@ -213,8 +213,8 @@ void func_80A51648(EnDnk* this, GlobalContext* globalCtx) {
}
void func_80A51890(EnDnk* this, GlobalContext* globalCtx) {
if (func_800EE29C(globalCtx, 0x7E)) {
func_800EDF24(&this->actor, globalCtx, func_800EE200(globalCtx, 0x7E));
if (Cutscene_CheckActorAction(globalCtx, 126)) {
Cutscene_ActorTranslateAndYaw(&this->actor, globalCtx, Cutscene_GetActorActionIndex(globalCtx, 126));
}
}

View File

@ -334,19 +334,19 @@ void func_80A71C3C(EnDno* this, GlobalContext* globalCtx) {
void func_80A71E54(EnDno* this, GlobalContext* globalCtx) {
if (CHECK_QUEST_ITEM(QUEST_SONG_SONATA)) {
if (gSaveContext.weekEventReg[27] & 1) {
this->unk_464 = 0x811;
this->textId = 0x811;
} else {
this->unk_464 = 0x80F;
this->textId = 0x80F;
gSaveContext.weekEventReg[27] |= 1;
}
} else if (gSaveContext.weekEventReg[26] & 0x80) {
this->unk_464 = 0x80B;
this->textId = 0x80B;
} else {
this->unk_464 = 0x80C;
this->textId = 0x80C;
gSaveContext.weekEventReg[26] |= 0x80;
}
if (this->unk_464 != 0x811) {
if (this->textId != 0x811) {
this->unk_3B0 |= 0x10;
} else {
this->unk_3B0 &= ~0x10;
@ -361,12 +361,12 @@ void func_80A71F18(EnDno* this, GlobalContext* globalCtx) {
case 0:
if (!(this->unk_3B0 & 0x10) ||
Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 0xE38)) {
switch (this->unk_464) {
switch (this->textId) {
case 0x80B:
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 16, &this->unk_32C);
case 0x811:
func_801518B0(globalCtx, this->unk_464, &this->actor);
Message_StartTextbox(globalCtx, this->textId, &this->actor);
break;
case 0x80C:
@ -375,7 +375,7 @@ void func_80A71F18(EnDno* this, GlobalContext* globalCtx) {
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 4, &this->unk_32C);
} else if ((this->unk_32C == 4) && (this->skelAnime.curFrame == this->skelAnime.endFrame)) {
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 11, &this->unk_32C);
func_801518B0(globalCtx, this->unk_464, &this->actor);
Message_StartTextbox(globalCtx, this->textId, &this->actor);
}
break;
}
@ -548,11 +548,11 @@ void func_80A725F8(EnDno* this, GlobalContext* globalCtx) {
}
} else if ((this->unk_32C == 5) && Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
if (Flags_GetSwitch(globalCtx, ENDNO_GET_3F80(&this->actor))) {
func_801518B0(globalCtx, 0x801, &this->actor);
Message_StartTextbox(globalCtx, 0x801, &this->actor);
} else if (Player_GetMask(globalCtx) == PLAYER_MASK_SCENTS) {
func_801518B0(globalCtx, 0x806, &this->actor);
Message_StartTextbox(globalCtx, 0x806, &this->actor);
} else {
func_801518B0(globalCtx, 0x800, &this->actor);
Message_StartTextbox(globalCtx, 0x800, &this->actor);
}
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 14, &this->unk_32C);
}
@ -561,12 +561,12 @@ void func_80A725F8(EnDno* this, GlobalContext* globalCtx) {
case 2:
if (Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 0x2D8)) {
gSaveContext.weekEventReg[93] |= 2;
func_801518B0(globalCtx, 0x802, &this->actor);
Message_StartTextbox(globalCtx, 0x802, &this->actor);
}
break;
case 3:
func_801518B0(globalCtx, 0x804, &this->actor);
Message_StartTextbox(globalCtx, 0x804, &this->actor);
break;
}
break;
@ -590,7 +590,7 @@ void func_80A725F8(EnDno* this, GlobalContext* globalCtx) {
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 12, &this->unk_32C);
func_801518B0(globalCtx, 0x803, &this->actor);
Message_StartTextbox(globalCtx, 0x803, &this->actor);
}
}
break;
@ -854,12 +854,12 @@ void func_80A732C8(EnDno* this, GlobalContext* globalCtx) {
void func_80A73408(EnDno* this, GlobalContext* globalCtx) {
s32 phi_a2;
u8 sp33 = true;
u32 temp_v0;
s32 temp_v0;
if (func_800EE29C(globalCtx, 0x1DB)) {
temp_v0 = func_800EE200(globalCtx, 0x1DB);
if (this->unk_468 != globalCtx->csCtx.npcActions[temp_v0]->unk0) {
switch (globalCtx->csCtx.npcActions[temp_v0]->unk0) {
if (Cutscene_CheckActorAction(globalCtx, 475)) {
temp_v0 = Cutscene_GetActorActionIndex(globalCtx, 475);
if (this->unk_468 != globalCtx->csCtx.actorActions[temp_v0]->action) {
switch (globalCtx->csCtx.actorActions[temp_v0]->action) {
case 1:
phi_a2 = 13;
break;
@ -878,7 +878,7 @@ void func_80A73408(EnDno* this, GlobalContext* globalCtx) {
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, phi_a2, &this->unk_32C);
}
}
func_800EDF24(&this->actor, globalCtx, temp_v0);
Cutscene_ActorTranslateAndYaw(&this->actor, globalCtx, temp_v0);
}
if ((Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) && (this->unk_32C == 17)) {

View File

@ -51,7 +51,7 @@ typedef struct EnDno {
/* 0x458 */ s32 unk_458;
/* 0x45C */ s16 unk_45C;
/* 0x460 */ Actor* unk_460;
/* 0x464 */ u16 unk_464;
/* 0x464 */ u16 textId;
/* 0x466 */ s16 unk_466;
/* 0x468 */ u8 unk_468;
} EnDno; // size = 0x46C

View File

@ -244,18 +244,18 @@ void func_80B3D11C(EnDnp* this, GlobalContext* globalCtx) {
static s32 D_80B3DE74[] = {
0, 16, 14, 10, 18, 12, 5, 7, 2, 19, 21, 22, 24, 8,
};
u32 temp_v0;
s32 temp_v0;
s32 val;
if (!(gSaveContext.weekEventReg[29] & 0x40) && (globalCtx->sceneNum == SCENE_MITURIN) &&
(globalCtx->csCtx.unk_12 == 0)) {
(globalCtx->csCtx.currentCsIndex == 0)) {
this->unk_322 |= 0x20;
gSaveContext.weekEventReg[29] |= 0x40;
}
if (func_800EE29C(globalCtx, 0x65)) {
temp_v0 = func_800EE200(globalCtx, 0x65);
val = globalCtx->csCtx.npcActions[temp_v0]->unk0;
if (Cutscene_CheckActorAction(globalCtx, 101)) {
temp_v0 = Cutscene_GetActorActionIndex(globalCtx, 101);
val = globalCtx->csCtx.actorActions[temp_v0]->action;
if (this->unk_324 != (u8)val) {
func_80B3CC38(this, D_80B3DE74[val]);
if (this->unk_340 == 16) {
@ -281,7 +281,7 @@ void func_80B3D11C(EnDnp* this, GlobalContext* globalCtx) {
Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
func_80B3CC38(this, this->unk_340 + 1);
}
func_800EDF24(&this->actor, globalCtx, temp_v0);
Cutscene_ActorTranslateAndYaw(&this->actor, globalCtx, temp_v0);
}
}

View File

@ -345,7 +345,7 @@ void func_80A52DC8(EnDnq* this, GlobalContext* globalCtx) {
if (Interface_HasItemInBottle(ITEM_DEKU_PRINCESS) && !func_801690CC(globalCtx) &&
(Message_GetState(&globalCtx->msgCtx) == 0) && (ActorCutscene_GetCurrentIndex() == -1)) {
if ((DECR(this->unk_384) == 0) && (gSaveContext.weekEventReg[29] & 0x40)) {
func_801518B0(globalCtx, 0x969, NULL);
Message_StartTextbox(globalCtx, 0x969, NULL);
this->unk_384 = 200;
}
}
@ -388,12 +388,12 @@ void func_80A53038(EnDnq* this, GlobalContext* globalCtx) {
static s32 D_80A535FC[] = {
0, 1, 2, 3, 5, 6,
};
u32 temp_v0;
s32 temp_v0;
u32 temp_v1;
if (func_800EE29C(globalCtx, 0x69)) {
temp_v0 = func_800EE200(globalCtx, 0x69);
temp_v1 = globalCtx->csCtx.npcActions[temp_v0]->unk0;
if (Cutscene_CheckActorAction(globalCtx, 105)) {
temp_v0 = Cutscene_GetActorActionIndex(globalCtx, 105);
temp_v1 = globalCtx->csCtx.actorActions[temp_v0]->action;
if (this->unk_1DC != (u8)temp_v1) {
func_80A5257C(this, D_80A535FC[temp_v1]);
this->unk_1DC = temp_v1;
@ -408,7 +408,7 @@ void func_80A53038(EnDnq* this, GlobalContext* globalCtx) {
func_80A5257C(this, this->unk_398 + 1);
}
func_800EDF24(&this->actor, globalCtx, temp_v0);
Cutscene_ActorTranslateAndYaw(&this->actor, globalCtx, temp_v0);
}
}

View File

@ -210,16 +210,16 @@ s32* func_8092C9BC(EnDns* this, GlobalContext* globalCtx) {
s32 func_8092CA74(EnDns* this) {
switch (ENDNS_GET_7(&this->actor)) {
case ENDNS_GET_7_0:
return 0x1D1;
return 465;
case ENDNS_GET_7_1:
return 0x1D2;
return 466;
case ENDNS_GET_7_2:
return 0x1D3;
return 467;
case ENDNS_GET_7_3:
return 0x1D4;
return 468;
}
return 0;
@ -480,12 +480,12 @@ void func_8092D5E8(EnDns* this, GlobalContext* globalCtx) {
EN_DNS_ANIMATION_SURPRISE_START,
EN_DNS_ANIMATION_RUN_START,
};
u32 temp_v0;
s32 temp_v0;
u32 temp_v1;
if (func_800EE29C(globalCtx, this->unk_2C8)) {
temp_v0 = func_800EE200(globalCtx, this->unk_2C8);
temp_v1 = globalCtx->csCtx.npcActions[temp_v0]->unk0;
if (Cutscene_CheckActorAction(globalCtx, this->unk_2C8)) {
temp_v0 = Cutscene_GetActorActionIndex(globalCtx, this->unk_2C8);
temp_v1 = globalCtx->csCtx.actorActions[temp_v0]->action;
if (this->unk_1D8 != (u8)temp_v1) {
func_8092C63C(this, D_8092DE0C[temp_v1]);
this->unk_1D8 = temp_v1;
@ -497,7 +497,7 @@ void func_8092D5E8(EnDns* this, GlobalContext* globalCtx) {
func_8092C63C(this, this->animationIndex + 1);
}
func_800EDF24(&this->actor, globalCtx, temp_v0);
Cutscene_ActorTranslateAndYaw(&this->actor, globalCtx, temp_v0);
}
}

View File

@ -854,8 +854,8 @@ void func_8088E60C(EnElf* this, GlobalContext* globalCtx) {
glowLightRadius = 0;
}
if (func_800EE29C(globalCtx, 0xC9)) {
if (globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0xC9)]->unk0 == 6) {
if (Cutscene_CheckActorAction(globalCtx, 201)) {
if (globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 201)]->action == 6) {
glowLightRadius = 0;
}
}
@ -888,12 +888,12 @@ void func_8088E850(EnElf* this, GlobalContext* globalCtx) {
func_8088E5A8(this, globalCtx);
xScale = 0.0f;
if (func_800EE29C(globalCtx, 0xC9)) {
sp38 = func_800EE200(globalCtx, 0xC9);
if (Cutscene_CheckActorAction(globalCtx, 201)) {
sp38 = Cutscene_GetActorActionIndex(globalCtx, 201);
func_808908D0(&nextPos, globalCtx, sp38);
this->actor.shape.rot.y = globalCtx->csCtx.npcActions[sp38]->unk8;
this->actor.shape.rot.x = globalCtx->csCtx.npcActions[sp38]->unk6;
if (globalCtx->csCtx.npcActions[sp38]->unk0 == 5) {
this->actor.shape.rot.y = globalCtx->csCtx.actorActions[sp38]->urot.y;
this->actor.shape.rot.x = globalCtx->csCtx.actorActions[sp38]->urot.x;
if (globalCtx->csCtx.actorActions[sp38]->action == 5) {
func_8088F5F4(this, globalCtx, 16);
}
@ -904,14 +904,14 @@ void func_8088E850(EnElf* this, GlobalContext* globalCtx) {
}
if ((globalCtx->sceneNum == SCENE_CLOCKTOWER) && (gSaveContext.sceneSetupIndex == 0) &&
(globalCtx->csCtx.unk_12 == 0) &&
(globalCtx->csCtx.currentCsIndex == 0) &&
((globalCtx->csCtx.frames == 149) || (globalCtx->csCtx.frames == 381) ||
(globalCtx->csCtx.frames == 591))) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_WHITE_FAIRY_DASH);
}
if ((globalCtx->sceneNum == SCENE_SECOM) && (gSaveContext.sceneSetupIndex == 0) &&
(globalCtx->csCtx.unk_12 == 4) && (globalCtx->csCtx.frames == 95)) {
(globalCtx->csCtx.currentCsIndex == 4) && (globalCtx->csCtx.frames == 95)) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_WHITE_FAIRY_DASH);
}
} else {
@ -1016,7 +1016,7 @@ void func_8088E850(EnElf* this, GlobalContext* globalCtx) {
func_8088E60C(this, globalCtx);
if (!func_800EE29C(globalCtx, 0xC9)) {
if (!Cutscene_CheckActorAction(globalCtx, 0xC9)) {
this->actor.shape.rot.y = this->unk_258;
}
}
@ -1107,8 +1107,8 @@ void func_8088F214(EnElf* this, GlobalContext* globalCtx) {
s32 pad;
if (globalCtx->csCtx.state != 0) {
if (func_800EE29C(globalCtx, 0xC9)) {
switch (globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0xC9)]->unk0) {
if (Cutscene_CheckActorAction(globalCtx, 201)) {
switch (globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 201)]->action) {
case 4:
sp34 = 7;
break;
@ -1577,8 +1577,8 @@ void EnElf_Draw(Actor* thisx, GlobalContext* globalCtx) {
if (player->currentMask != PLAYER_MASK_GIANT) {
if (!(this->fairyFlags & 8) &&
(!func_800EE29C(globalCtx, 0xC9) ||
(globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0xC9)]->unk0 != 6)) &&
(!Cutscene_CheckActorAction(globalCtx, 201) ||
(globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 201)]->action != 6)) &&
(!(player->stateFlags1 & 0x100000) || (kREG(90) < this->actor.projectedPos.z))) {
Gfx* dListHead = GRAPH_ALLOC(globalCtx->state.gfxCtx, sizeof(Gfx) * 4);
f32 alphaScale;
@ -1621,17 +1621,17 @@ void EnElf_Draw(Actor* thisx, GlobalContext* globalCtx) {
void func_808908D0(Vec3f* vec, GlobalContext* globalCtx, u32 action) {
Vec3f startPos;
Vec3f endPos;
CsCmdActorAction* npcAction = globalCtx->csCtx.npcActions[action];
CsCmdActorAction* npcAction = globalCtx->csCtx.actorActions[action];
f32 lerp;
startPos.x = npcAction->unk0C.x;
startPos.y = npcAction->unk0C.y;
startPos.z = npcAction->unk0C.z;
startPos.x = npcAction->startPos.x;
startPos.y = npcAction->startPos.y;
startPos.z = npcAction->startPos.z;
endPos.x = npcAction->unk18.x;
endPos.y = npcAction->unk18.y;
endPos.z = npcAction->unk18.z;
endPos.x = npcAction->endPos.x;
endPos.y = npcAction->endPos.y;
endPos.z = npcAction->endPos.z;
lerp = func_800F5A8C(npcAction->endFrame, npcAction->startFrame, globalCtx->csCtx.frames, globalCtx);
lerp = Environment_LerpWeight(npcAction->endFrame, npcAction->startFrame, globalCtx->csCtx.frames);
VEC3F_LERPIMPDST(vec, &startPos, &endPos, lerp);
}

View File

@ -456,7 +456,7 @@ void EnElforg_FreeFloating(EnElforg* this, GlobalContext* globalCtx) {
if (STRAY_FAIRY_TYPE(&this->actor) == STRAY_FAIRY_TYPE_CLOCK_TOWN) {
player->actor.freezeTimer = 100;
player->stateFlags1 |= 0x20000000;
func_801518B0(globalCtx, 0x579, NULL);
Message_StartTextbox(globalCtx, 0x579, NULL);
this->actionFunc = EnElforg_ClockTownFairyCollected;
ActorCutscene_SetIntentToPlay(0x7C);
return;
@ -464,7 +464,7 @@ void EnElforg_FreeFloating(EnElforg* this, GlobalContext* globalCtx) {
if (func_8010A074(globalCtx)) {
gSaveContext.inventory.strayFairies[gSaveContext.unk_48C8]++;
func_801518B0(globalCtx, 0x11, NULL);
Message_StartTextbox(globalCtx, 0x11, NULL);
if (gSaveContext.inventory.strayFairies[(void)0, gSaveContext.unk_48C8] >= 15) {
func_801A3098(NA_BGM_GET_ITEM | 0x900);
}

View File

@ -313,7 +313,8 @@ void EnFall_Setup(EnFall* this, GlobalContext* globalCtx) {
void EnFall_CrashingMoon_HandleGiantsCutscene(EnFall* this, GlobalContext* globalCtx) {
static s32 sGiantsCutsceneState = 0;
if (globalCtx->sceneNum == SCENE_00KEIKOKU && gSaveContext.sceneSetupIndex == 1 && globalCtx->csCtx.unk_12 == 0) {
if (globalCtx->sceneNum == SCENE_00KEIKOKU && gSaveContext.sceneSetupIndex == 1 &&
globalCtx->csCtx.currentCsIndex == 0) {
switch (sGiantsCutsceneState) {
case 0:
if (globalCtx->csCtx.state != 0) {
@ -357,14 +358,15 @@ void EnFall_CrashingMoon_HandleGiantsCutscene(EnFall* this, GlobalContext* globa
void EnFall_CrashingMoon_PerformCutsceneActions(EnFall* this, GlobalContext* globalCtx) {
EnFall_CrashingMoon_HandleGiantsCutscene(this, globalCtx);
if (func_800EE29C(globalCtx, 0x85)) {
if (func_800EE29C(globalCtx, 0x85) && globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x85)]->unk0 == 1) {
if (Cutscene_CheckActorAction(globalCtx, 0x85)) {
if (Cutscene_CheckActorAction(globalCtx, 133) &&
globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 133)]->action == 1) {
this->actor.draw = NULL;
} else {
this->actor.draw = EnFall_Moon_Draw;
if (func_800EE29C(globalCtx, 0x85) &&
globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x85)]->unk0 == 2) {
func_800EDF24(&this->actor, globalCtx, func_800EE200(globalCtx, 0x85));
if (Cutscene_CheckActorAction(globalCtx, 133) &&
globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 133)]->action == 2) {
Cutscene_ActorTranslateAndYaw(&this->actor, globalCtx, Cutscene_GetActorActionIndex(globalCtx, 133));
}
}
} else {
@ -373,8 +375,8 @@ void EnFall_CrashingMoon_PerformCutsceneActions(EnFall* this, GlobalContext* glo
}
void EnFall_StoppedOpenMouthMoon_PerformCutsceneActions(EnFall* this, GlobalContext* globalCtx) {
if (func_800EE29C(globalCtx, 0x85)) {
switch (globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x85)]->unk0) {
if (Cutscene_CheckActorAction(globalCtx, 133)) {
switch (globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 133)]->action) {
case 3:
if (this->eyeGlowIntensity == 0.0f) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_MOON_EYE_FLASH);
@ -393,10 +395,10 @@ void EnFall_StoppedOpenMouthMoon_PerformCutsceneActions(EnFall* this, GlobalCont
}
void EnFall_StoppedClosedMouthMoon_PerformCutsceneActions(EnFall* this, GlobalContext* globalCtx) {
if (func_800EE29C(globalCtx, 0x85)) {
switch (globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x85)]->unk0) {
if (Cutscene_CheckActorAction(globalCtx, 133)) {
switch (globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 133)]->action) {
case 2:
func_800EDF24(&this->actor, globalCtx, func_800EE200(globalCtx, 0x85));
Cutscene_ActorTranslateAndYaw(&this->actor, globalCtx, Cutscene_GetActorActionIndex(globalCtx, 133));
break;
case 4:
@ -406,7 +408,7 @@ void EnFall_StoppedClosedMouthMoon_PerformCutsceneActions(EnFall* this, GlobalCo
}
if (globalCtx->sceneNum == SCENE_OKUJOU && gSaveContext.sceneSetupIndex == 2) {
switch (globalCtx->csCtx.unk_12) {
switch (globalCtx->csCtx.currentCsIndex) {
case 0:
switch (globalCtx->csCtx.frames) {
case 1060:
@ -460,15 +462,16 @@ void EnFall_ClockTowerOrTitleScreenMoon_PerformCutsceneActions(EnFall* this, Glo
void EnFall_Moon_PerformDefaultActions(EnFall* this, GlobalContext* globalCtx) {
u16 currentDay;
if (func_800EE29C(globalCtx, 0x85)) {
if (func_800EE29C(globalCtx, 0x85) && globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x85)]->unk0 == 1) {
if (Cutscene_CheckActorAction(globalCtx, 133)) {
if (Cutscene_CheckActorAction(globalCtx, 133) &&
globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 133)]->action == 1) {
this->actor.draw = NULL;
} else {
Actor_SetScale(&this->actor, this->scale * 3.6f);
this->actor.draw = EnFall_Moon_Draw;
if (func_800EE29C(globalCtx, 0x85) &&
globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x85)]->unk0 == 2) {
func_800EDF24(&this->actor, globalCtx, func_800EE200(globalCtx, 0x85));
if (Cutscene_CheckActorAction(globalCtx, 133) &&
globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 133)]->action == 2) {
Cutscene_ActorTranslateAndYaw(&this->actor, globalCtx, Cutscene_GetActorActionIndex(globalCtx, 133));
}
}
} else {
@ -506,7 +509,8 @@ void EnFall_MoonsTear_DoNothing(EnFall* this, GlobalContext* globalCtx) {
void EnFall_MoonsTear_Fall(EnFall* this, GlobalContext* globalCtx) {
s32 pad;
if (func_800EE29C(globalCtx, 0x205) && globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x205)]->unk0 == 2 &&
if (Cutscene_CheckActorAction(globalCtx, 517) &&
globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 517)]->action == 2 &&
this->actor.draw == NULL) {
EnFall_MoonsTear_Initialize(this);
}
@ -569,11 +573,12 @@ void EnFall_Fireball_SetPerVertexAlpha(f32 fireballAlpha) {
void EnFall_Fireball_Update(Actor* thisx, GlobalContext* globalCtx) {
EnFall* this = THIS;
if (globalCtx->sceneNum == SCENE_00KEIKOKU && gSaveContext.sceneSetupIndex == 0 && globalCtx->csCtx.unk_12 == 2) {
if (globalCtx->sceneNum == SCENE_00KEIKOKU && gSaveContext.sceneSetupIndex == 0 &&
globalCtx->csCtx.currentCsIndex == 2) {
globalCtx->skyboxCtx.rotY -= 0.05f;
}
if (func_800EE29C(globalCtx, 0x1C2)) {
if (Cutscene_CheckActorAction(globalCtx, 450)) {
this->actor.draw = EnFall_Fireball_Draw;
if (this->flags & FLAG_FIRE_BALL_INTENSIFIES) {
this->fireballIntensity += 0.01f;
@ -581,9 +586,9 @@ void EnFall_Fireball_Update(Actor* thisx, GlobalContext* globalCtx) {
this->fireballIntensity = 1.0f;
}
}
func_800EDF24(&this->actor, globalCtx, func_800EE200(globalCtx, 0x1C2));
Cutscene_ActorTranslateAndYaw(&this->actor, globalCtx, Cutscene_GetActorActionIndex(globalCtx, 450));
switch (globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x1C2)]->unk0) {
switch (globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 450)]->action) {
default:
this->actor.draw = NULL;
this->fireballAlpha = 0;
@ -620,7 +625,7 @@ void EnFall_Fireball_Update(Actor* thisx, GlobalContext* globalCtx) {
this->actor.draw = NULL;
}
if (func_800EE29C(globalCtx, 0x1C2) && this->fireballAlpha > 0) {
if (Cutscene_CheckActorAction(globalCtx, 0x1C2) && this->fireballAlpha > 0) {
func_8019F128(NA_SE_EV_MOON_FALL_LAST - SFX_FLAG);
}
Actor_SetScale(&this->actor, this->scale * 1.74f);
@ -677,9 +682,9 @@ s32 EnFall_RisingDebris_InitializeParticles(EnFall* this) {
void EnFall_RisingDebris_Update(Actor* thisx, GlobalContext* globalCtx) {
EnFall* this = THIS;
if (func_800EE29C(globalCtx, 0x1C3)) {
if (func_800EE29C(globalCtx, 0x1C3) &&
globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x1C3)]->unk0 == 2) {
if (Cutscene_CheckActorAction(globalCtx, 451)) {
if (Cutscene_CheckActorAction(globalCtx, 451) &&
globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 451)]->action == 2) {
EnFall_RisingDebris_UpdateParticles(this);
EnFall_RisingDebris_InitializeParticles(this);
} else if (this->activeDebrisParticleCount != 0) {
@ -694,7 +699,8 @@ void EnFall_RisingDebris_Update(Actor* thisx, GlobalContext* globalCtx) {
void EnFall_FireRing_Update(Actor* thisx, GlobalContext* globalCtx) {
EnFall* this = THIS;
if (func_800EE29C(globalCtx, 0x1C2) && globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x1C2)]->unk0 == 5) {
if (Cutscene_CheckActorAction(globalCtx, 450) &&
globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 450)]->action == 5) {
if (!(this->flags & FLAG_FIRE_RING_APPEARS)) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_IT_DM_RING_EXPLOSION);
}

View File

@ -1123,11 +1123,11 @@ void EnFishing_UpdateEffects(FishingEffect* effect, GlobalContext* globalCtx) {
}
if (effect->unk_2C == 30) {
func_801518B0(globalCtx, 0x40B3, NULL);
Message_StartTextbox(globalCtx, 0x40B3, NULL);
}
if ((effect->unk_2C >= 100) && (Message_GetState(&globalCtx->msgCtx) == 5)) {
if (func_80147624(globalCtx) || !Message_GetState(&globalCtx->msgCtx)) {
if (func_80147624(globalCtx) || Message_GetState(&globalCtx->msgCtx) == 0) {
func_801477B4(globalCtx);
func_801159EC(-50);
effect->unk_2C = -1;
@ -3079,7 +3079,7 @@ void EnFishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
this->unk_172[1] = 50;
}
if (!Message_GetState(&globalCtx->msgCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 0) {
if ((gSaveContext.time >= 0xC000) && (gSaveContext.time <= 0xC01B)) {
this->unk_150 = 7;
this->unk_172[3] = Rand_ZeroFloat(150.0f) + 200.0f;
@ -3793,7 +3793,7 @@ void EnFishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
player->unk_B28 = 3;
func_8013EC44(0.0f, 1, 3, 1);
D_809171D8++;
func_800EA0D4(globalCtx, &globalCtx->csCtx);
Cutscene_Start(globalCtx, &globalCtx->csCtx);
D_8090CD4C = 100;
D_80911F48 = 45.0f;
D_8090CD14 = 5;
@ -3875,7 +3875,7 @@ void EnFishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
if (this->unk_172[0] <= 50) {
switch (this->unk_1CD) {
case 0:
if ((Message_GetState(&globalCtx->msgCtx) == 4) || !Message_GetState(&globalCtx->msgCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 4) || Message_GetState(&globalCtx->msgCtx) == 0) {
if (func_80147624(globalCtx)) {
func_801477B4(globalCtx);
if (globalCtx->msgCtx.choiceIndex == 0) {
@ -3888,7 +3888,7 @@ void EnFishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
((s16)this->unk_1A4 < (s16)D_8090CCF0)) {
this->unk_1CD = 1;
this->unk_172[0] = 0x3C;
func_801518B0(globalCtx, 0x4098, NULL);
Message_StartTextbox(globalCtx, 0x4098, NULL);
} else {
f32 temp1 = D_8090CCF0;
s16 temp2 = D_809171D0;
@ -3906,7 +3906,7 @@ void EnFishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
}
break;
case 1:
if ((Message_GetState(&globalCtx->msgCtx) == 4) || !Message_GetState(&globalCtx->msgCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 4) || Message_GetState(&globalCtx->msgCtx) == 0) {
if (func_80147624(globalCtx)) {
func_801477B4(globalCtx);
if (globalCtx->msgCtx.choiceIndex != 0) {
@ -4904,7 +4904,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, GlobalContext* globalCtx) {
break;
case 11:
if (((Message_GetState(&globalCtx->msgCtx) == 5) || !Message_GetState(&globalCtx->msgCtx)) &&
if (((Message_GetState(&globalCtx->msgCtx) == 5) || Message_GetState(&globalCtx->msgCtx) == 0) &&
func_80147624(globalCtx)) {
s32 getItemId;
@ -5008,7 +5008,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, GlobalContext* globalCtx) {
break;
case 22:
if (!Message_GetState(&globalCtx->msgCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 0) {
this->unk_154 = 0;
if (D_8090CD0C != 0) {
D_8090CD08 = 1;
@ -5034,7 +5034,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, GlobalContext* globalCtx) {
if (D_809171D0 == 0) {
this->unk_154 = 0;
} else {
func_801518B0(globalCtx, 0x409C, NULL);
Message_StartTextbox(globalCtx, 0x409C, NULL);
this->unk_154 = 20;
}
}
@ -5125,7 +5125,7 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
if ((sqrtf(SQ(dx) + SQ(dy) + SQ(dz)) < 25.0f)) {
D_8090CD08 = 0;
D_8090CD0C = 1;
func_801518B0(globalCtx, 0x4087, NULL);
Message_StartTextbox(globalCtx, 0x4087, NULL);
}
}
@ -5138,7 +5138,7 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
if (D_8090CCFC != 0) {
D_8090CCFC--;
if (D_8090CCFC == 0) {
func_801518B0(globalCtx, D_809171DA, NULL);
Message_StartTextbox(globalCtx, D_809171DA, NULL);
}
}
@ -5201,7 +5201,7 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
// fallthrough
case 2:
ShrinkWindow_SetLetterboxTarget(0x1B);
ShrinkWindow_SetLetterboxTarget(27);
spFC.x = sLurePos.x - player->actor.world.pos.x;
spFC.z = sLurePos.z - player->actor.world.pos.z;
@ -5302,17 +5302,17 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
camera->at = sCameraAt;
}
func_80169AFC(globalCtx, sCameraId, 0);
func_800EA0EC(globalCtx, &globalCtx->csCtx);
Cutscene_End(globalCtx, &globalCtx->csCtx);
D_8090CD4C = 0;
sCameraId = CAM_ID_MAIN;
func_800F6834(globalCtx, 0);
globalCtx->envCtx.unk_8C.fogNear = 0;
globalCtx->envCtx.lightSettings.fogNear = 0;
player->unk_B28 = -5;
D_80917200 = 5;
break;
case 10:
func_800EA0D4(globalCtx, &globalCtx->csCtx);
Cutscene_Start(globalCtx, &globalCtx->csCtx);
sCameraId = Play_CreateSubCamera(globalCtx);
Play_CameraChangeStatus(globalCtx, CAM_ID_MAIN, 1);
Play_CameraChangeStatus(globalCtx, sCameraId, 7);
@ -5324,7 +5324,7 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
sCameraAt.x = camera->at.x;
sCameraAt.y = camera->at.y;
sCameraAt.z = camera->at.z;
func_801518B0(globalCtx, 0x409E, NULL);
Message_StartTextbox(globalCtx, 0x409E, NULL);
D_8090CD4C = 11;
func_8013EC44(0.0f, 150, 10, 10);
// fallthrough
@ -5333,25 +5333,25 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
player->actor.world.pos.z = 1360.0f;
player->actor.speedXZ = 0.0f;
if (!Message_GetState(&globalCtx->msgCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 0) {
camera = Play_GetCamera(globalCtx, CAM_ID_MAIN);
camera->eye = sCameraEye;
camera->eyeNext = sCameraEye;
camera->at = sCameraAt;
func_80169AFC(globalCtx, sCameraId, 0);
func_800EA0EC(globalCtx, &globalCtx->csCtx);
Cutscene_End(globalCtx, &globalCtx->csCtx);
func_800B7298(globalCtx, &this->actor, 6);
D_8090CD4C = 0;
sCameraId = CAM_ID_MAIN;
D_8090CD50 = 30;
func_800F6834(globalCtx, 0);
globalCtx->envCtx.unk_8C.fogNear = 0;
globalCtx->envCtx.lightSettings.fogNear = 0;
}
break;
case 20:
func_800EA0D4(globalCtx, &globalCtx->csCtx);
Cutscene_Start(globalCtx, &globalCtx->csCtx);
sCameraId = Play_CreateSubCamera(globalCtx);
Play_CameraChangeStatus(globalCtx, CAM_ID_MAIN, 1);
Play_CameraChangeStatus(globalCtx, sCameraId, 7);
@ -5363,7 +5363,7 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
sCameraAt.x = camera->at.x;
sCameraAt.y = camera->at.y;
sCameraAt.z = camera->at.z;
func_801518B0(globalCtx, 0x409A, NULL);
Message_StartTextbox(globalCtx, 0x409A, NULL);
D_8090CD4C = 21;
D_80911F48 = 45.0f;
D_8090CD50 = 10;
@ -5426,7 +5426,7 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
}
if (D_8090CD50 == 0) {
if ((Message_GetState(&globalCtx->msgCtx) == 4) || !Message_GetState(&globalCtx->msgCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 4) || Message_GetState(&globalCtx->msgCtx) == 0) {
if (func_80147624(globalCtx)) {
Camera* camera = Play_GetCamera(globalCtx, CAM_ID_MAIN);
@ -5440,7 +5440,7 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
camera->eyeNext = sCameraEye;
camera->at = sCameraAt;
func_80169AFC(globalCtx, sCameraId, 0);
func_800EA0EC(globalCtx, &globalCtx->csCtx);
Cutscene_End(globalCtx, &globalCtx->csCtx);
func_800B7298(globalCtx, &this->actor, 6); // arg2 changed from 7 to 6 in MM
D_8090CD4C = 0;
sCameraId = CAM_ID_MAIN;
@ -5449,7 +5449,7 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
D_8090CD54 = 0;
D_809171F6 = 20;
func_800F6834(globalCtx, 0);
globalCtx->envCtx.unk_8C.fogNear = 0;
globalCtx->envCtx.lightSettings.fogNear = 0;
}
}
}
@ -5466,13 +5466,13 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
if (sCameraEye.y <= (WATER_SURFACE_Y(globalCtx) + 1.0f)) {
func_800F6834(globalCtx, 1);
if (D_809171CA != 0) {
globalCtx->envCtx.unk_8C.fogNear = -0xB2;
globalCtx->envCtx.lightSettings.fogNear = -0xB2;
} else {
globalCtx->envCtx.unk_8C.fogNear = -0x2E;
globalCtx->envCtx.lightSettings.fogNear = -0x2E;
}
} else {
func_800F6834(globalCtx, 0);
globalCtx->envCtx.unk_8C.fogNear = 0;
globalCtx->envCtx.lightSettings.fogNear = 0;
}
}
@ -5518,7 +5518,7 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
D_809171CB--;
}
if ((D_809171CB == 1) && !Message_GetState(&globalCtx->msgCtx) && ((D_8090CD00 & 0xFFF) == 0xFFF)) {
if ((D_809171CB == 1) && Message_GetState(&globalCtx->msgCtx) == 0 && ((D_8090CD00 & 0xFFF) == 0xFFF)) {
D_809171CB = 200;
if (Rand_ZeroOne() < 0.5f) {
@ -5556,8 +5556,8 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
Math_ApproachZeroF(&D_8090CCD8, 1.0f, 2.0f);
}
globalCtx->envCtx.unk_8C.diffuseColor1[0] = globalCtx->envCtx.unk_8C.diffuseColor1[1] =
globalCtx->envCtx.unk_8C.diffuseColor1[2] = D_8090CCD8;
globalCtx->envCtx.lightSettings.diffuseColor1[0] = globalCtx->envCtx.lightSettings.diffuseColor1[1] =
globalCtx->envCtx.lightSettings.diffuseColor1[2] = D_8090CCD8;
if ((u8)D_8090CCD0 > 0) {
s32 pad;

View File

@ -172,7 +172,7 @@ void EnFsn_HandleConversationBackroom(EnFsn* this, GlobalContext* globalCtx) {
this->flags |= ENFSN_END_CONVERSATION;
break;
}
func_801518B0(globalCtx, this->textId, &this->actor);
Message_StartTextbox(globalCtx, this->textId, &this->actor);
if (this->flags & ENFSN_END_CONVERSATION) {
if (this->flags & ENFSN_GAVE_LETTER_TO_MAMA) {
this->flags &= ~ENFSN_GAVE_LETTER_TO_MAMA;
@ -382,7 +382,7 @@ void EnFsn_EndInteraction(EnFsn* this, GlobalContext* globalCtx) {
s32 EnFsn_TestEndInteraction(EnFsn* this, GlobalContext* globalCtx, Input* input) {
if (CHECK_BTN_ALL(input->press.button, BTN_B)) {
this->actor.textId = (CURRENT_DAY == 3) ? 0x29DF : 0x29D1;
func_801518B0(globalCtx, this->actor.textId, &this->actor);
Message_StartTextbox(globalCtx, this->actor.textId, &this->actor);
func_80151BB4(globalCtx, 3);
this->actionFunc = EnFsn_SetupEndInteraction;
return true;
@ -424,12 +424,12 @@ s32 EnFsn_FacingShopkeeperDialogResult(EnFsn* this, GlobalContext* globalCtx) {
} else {
this->actor.textId = 0x29D8;
}
func_801518B0(globalCtx, this->actor.textId, &this->actor);
Message_StartTextbox(globalCtx, this->actor.textId, &this->actor);
return true;
case 1:
func_8019F230();
this->actor.textId = (CURRENT_DAY == 3) ? 0x29DF : 0x29D1;
func_801518B0(globalCtx, this->actor.textId, &this->actor);
Message_StartTextbox(globalCtx, this->actor.textId, &this->actor);
func_80151BB4(globalCtx, 3);
this->actionFunc = EnFsn_SetupEndInteraction;
return true;
@ -725,7 +725,7 @@ void EnFsn_Idle(EnFsn* this, GlobalContext* globalCtx) {
this->cutsceneState = 1;
}
this->actor.textId = EnFsn_GetWelcome(globalCtx);
func_801518B0(globalCtx, this->actor.textId, &this->actor);
Message_StartTextbox(globalCtx, this->actor.textId, &this->actor);
player->actor.world.pos.x = 1.0f;
player->actor.world.pos.z = -34.0f;
this->actionFunc = EnFsn_BeginInteraction;
@ -806,16 +806,16 @@ void EnFsn_StartBuying(EnFsn* this, GlobalContext* globalCtx) {
switch (this->actor.textId) {
case 0x29CC:
this->actor.textId = 0x29CD;
func_801518B0(globalCtx, this->actor.textId, &this->actor);
Message_StartTextbox(globalCtx, this->actor.textId, &this->actor);
break;
case 0x29CD:
this->actor.textId = 0x29CE;
EnFsn_HandleLookToShopkeeperBuyingCutscene(this);
func_801518B0(globalCtx, this->actor.textId, &this->actor);
Message_StartTextbox(globalCtx, this->actor.textId, &this->actor);
break;
case 0x29CE:
this->actor.textId = 0xFF;
func_801518B0(globalCtx, this->actor.textId, &this->actor);
Message_StartTextbox(globalCtx, this->actor.textId, &this->actor);
this->actionFunc = EnFsn_DeterminePrice;
break;
case 0x29CF:
@ -838,7 +838,7 @@ void EnFsn_AskBuyOrSell(EnFsn* this, GlobalContext* globalCtx) {
} else {
this->actor.textId = 0x29D2;
}
func_801518B0(globalCtx, this->actor.textId, &this->actor);
Message_StartTextbox(globalCtx, this->actor.textId, &this->actor);
break;
case 0x29D2:
if (gSaveContext.weekEventReg[33] & 4) {
@ -848,14 +848,14 @@ void EnFsn_AskBuyOrSell(EnFsn* this, GlobalContext* globalCtx) {
} else {
this->actor.textId = 0x29D4;
}
func_801518B0(globalCtx, this->actor.textId, &this->actor);
Message_StartTextbox(globalCtx, this->actor.textId, &this->actor);
break;
case 0x29D3:
case 0x29D4:
case 0x29FA:
case 0x2A01:
this->actor.textId = 0x29D5;
func_801518B0(globalCtx, this->actor.textId, &this->actor);
Message_StartTextbox(globalCtx, this->actor.textId, &this->actor);
break;
}
}
@ -870,7 +870,7 @@ void EnFsn_AskBuyOrSell(EnFsn* this, GlobalContext* globalCtx) {
this->stickLeftPrompt.isEnabled = false;
this->stickRightPrompt.isEnabled = trueTmp;
this->actor.textId = 0x29D6;
func_801518B0(globalCtx, this->actor.textId, &this->actor);
Message_StartTextbox(globalCtx, this->actor.textId, &this->actor);
this->actionFunc = EnFsn_FaceShopkeeperSelling;
break;
case 1:
@ -878,7 +878,7 @@ void EnFsn_AskBuyOrSell(EnFsn* this, GlobalContext* globalCtx) {
this->isSelling = false;
this->actor.textId = 0x29CE;
EnFsn_HandleLookToShopkeeperBuyingCutscene(this);
func_801518B0(globalCtx, this->actor.textId, &this->actor);
Message_StartTextbox(globalCtx, this->actor.textId, &this->actor);
this->actionFunc = EnFsn_StartBuying;
break;
}
@ -889,7 +889,7 @@ void EnFsn_AskBuyOrSell(EnFsn* this, GlobalContext* globalCtx) {
void EnFsn_SetupDeterminePrice(EnFsn* this, GlobalContext* globalCtx) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->actor.textId = 0xFF;
func_801518B0(globalCtx, this->actor.textId, &this->actor);
Message_StartTextbox(globalCtx, this->actor.textId, &this->actor);
this->actionFunc = EnFsn_DeterminePrice;
}
}
@ -924,7 +924,7 @@ void EnFsn_DeterminePrice(EnFsn* this, GlobalContext* globalCtx) {
} else {
this->actor.textId = 0x29D1;
}
func_801518B0(globalCtx, this->actor.textId, &this->actor);
Message_StartTextbox(globalCtx, this->actor.textId, &this->actor);
func_80151BB4(globalCtx, 3);
this->actionFunc = EnFsn_SetupEndInteraction;
}
@ -1011,7 +1011,7 @@ void EnFsn_ResumeInteraction(EnFsn* this, GlobalContext* globalCtx) {
this->cutscene = this->lookToShopkeeperCutscene;
this->actor.textId = (this->numSellingItems <= 0) ? 0x29DE : 0x29D6;
}
func_801518B0(globalCtx, this->actor.textId, &this->actor);
Message_StartTextbox(globalCtx, this->actor.textId, &this->actor);
if (ActorCutscene_GetCurrentIndex() == 0x7C) {
ActorCutscene_Stop(0x7C);
}
@ -1232,13 +1232,13 @@ void EnFsn_AskCanBuyMore(EnFsn* this, GlobalContext* globalCtx) {
case 0:
func_8019F208();
this->actor.textId = 0xFF;
func_801518B0(globalCtx, this->actor.textId, &this->actor);
Message_StartTextbox(globalCtx, this->actor.textId, &this->actor);
this->actionFunc = EnFsn_DeterminePrice;
break;
case 1:
func_8019F230();
this->actor.textId = (CURRENT_DAY == 3) ? 0x29DF : 0x29D1;
func_801518B0(globalCtx, this->actor.textId, &this->actor);
Message_StartTextbox(globalCtx, this->actor.textId, &this->actor);
func_80151BB4(globalCtx, 3);
break;
}
@ -1279,13 +1279,13 @@ void EnFsn_AskCanBuyAterRunningOutOfItems(EnFsn* this, GlobalContext* globalCtx)
func_8019F208();
this->isSelling = false;
this->actor.textId = 0x29CE;
func_801518B0(globalCtx, this->actor.textId, &this->actor);
Message_StartTextbox(globalCtx, this->actor.textId, &this->actor);
this->actionFunc = EnFsn_StartBuying;
break;
case 1:
func_8019F230();
this->actor.textId = (CURRENT_DAY == 3) ? 0x29DF : 0x29D1;
func_801518B0(globalCtx, this->actor.textId, &this->actor);
Message_StartTextbox(globalCtx, this->actor.textId, &this->actor);
func_80151BB4(globalCtx, 3);
break;
}
@ -1324,7 +1324,7 @@ void EnFsn_FaceShopkeeperSelling(EnFsn* this, GlobalContext* globalCtx) {
}
} else if (talkState == 5 && func_80147624(globalCtx)) {
this->actor.textId = 0x29D6;
func_801518B0(globalCtx, this->actor.textId, &this->actor);
Message_StartTextbox(globalCtx, this->actor.textId, &this->actor);
if (globalCtx) {}
}
}

View File

@ -387,33 +387,33 @@ void func_80962340(EnFu* this, GlobalContext* globalCtx) {
if (this->unk_54A == 2) {
if (this->unk_552 == 0x287D) {
if (gSaveContext.playerForm == PLAYER_FORM_DEKU) {
func_801518B0(globalCtx, 0x287E, &this->actor);
Message_StartTextbox(globalCtx, 0x287E, &this->actor);
this->unk_552 = 0x287E;
} else if ((CURRENT_DAY == 3) && (gSaveContext.weekEventReg[22] & 0x10) &&
(gSaveContext.weekEventReg[22] & 0x20)) {
if ((gSaveContext.weekEventReg[22] & 0x40)) {
func_801518B0(globalCtx, 0x2883, &this->actor);
Message_StartTextbox(globalCtx, 0x2883, &this->actor);
this->unk_552 = 0x2883;
} else {
func_801518B0(globalCtx, 0x2880, &this->actor);
Message_StartTextbox(globalCtx, 0x2880, &this->actor);
this->unk_552 = 0x2880;
}
} else {
func_801518B0(globalCtx, 0x287E, &this->actor);
Message_StartTextbox(globalCtx, 0x287E, &this->actor);
this->unk_552 = 0x287E;
}
} else if ((gSaveContext.unk_3DE0[4] == 0) && (this->unk_552 != 0x2888)) {
func_801518B0(globalCtx, 0x2886, &this->actor);
Message_StartTextbox(globalCtx, 0x2886, &this->actor);
this->unk_552 = 0x2886;
} else {
func_801518B0(globalCtx, 0x2889, &this->actor);
Message_StartTextbox(globalCtx, 0x2889, &this->actor);
this->unk_552 = 0x2889;
}
this->actor.flags &= ~ACTOR_FLAG_10000;
player->stateFlags1 &= ~0x20;
this->unk_54A = 1;
} else {
func_801518B0(globalCtx, 0x283C, &this->actor);
Message_StartTextbox(globalCtx, 0x283C, &this->actor);
this->unk_552 = 0x283C;
}
func_809628BC(this);
@ -435,12 +435,12 @@ void func_80962588(EnFu* this, GlobalContext* globalCtx) {
func_80963DE4(this, globalCtx);
} else {
play_sound(NA_SE_SY_ERROR);
func_801518B0(globalCtx, 0x2873, &this->actor);
Message_StartTextbox(globalCtx, 0x2873, &this->actor);
this->unk_552 = 0x2873;
}
} else {
func_8019F230();
func_801518B0(globalCtx, 0x2872, &this->actor);
Message_StartTextbox(globalCtx, 0x2872, &this->actor);
this->unk_552 = 0x2872;
}
}
@ -468,7 +468,7 @@ void func_80962660(EnFu* this, GlobalContext* globalCtx) {
break;
case 0x2846:
func_801518B0(globalCtx, 0x2849, &this->actor);
Message_StartTextbox(globalCtx, 0x2849, &this->actor);
this->unk_552 = 0x2849;
break;
@ -519,7 +519,7 @@ void func_80962660(EnFu* this, GlobalContext* globalCtx) {
case 0x286A:
case 0x286C:
case 0x286E:
func_801518B0(globalCtx, 0x2871, &this->actor);
Message_StartTextbox(globalCtx, 0x2871, &this->actor);
this->unk_552 = 0x2871;
break;
@ -527,7 +527,7 @@ void func_80962660(EnFu* this, GlobalContext* globalCtx) {
case 0x2878:
case 0x287A:
case 0x287C:
func_801518B0(globalCtx, 0x287D, &this->actor);
Message_StartTextbox(globalCtx, 0x287D, &this->actor);
this->unk_552 = 0x287D;
break;
@ -774,7 +774,7 @@ void func_80962F4C(EnFu* this, GlobalContext* globalCtx) {
}
if (func_80961D10(this)) {
func_801518B0(globalCtx, 0x288B, &this->actor);
Message_StartTextbox(globalCtx, 0x288B, &this->actor);
}
if ((!DynaPolyActor_IsInRidingRotatingState((DynaPolyActor*)this->actor.child) &&
@ -785,10 +785,10 @@ void func_80962F4C(EnFu* this, GlobalContext* globalCtx) {
player->stateFlags1 |= 0x20;
if (this->unk_548 < this->unk_54C) {
if (gSaveContext.unk_3DE0[4] == 0) {
func_801518B0(globalCtx, 0x2885, &this->actor);
Message_StartTextbox(globalCtx, 0x2885, &this->actor);
this->unk_552 = 0x2885;
} else {
func_801518B0(globalCtx, 0x2888, &this->actor);
Message_StartTextbox(globalCtx, 0x2888, &this->actor);
this->unk_552 = 0x2888;
}
func_801A2C20();
@ -899,18 +899,18 @@ void func_80963630(EnFu* this, GlobalContext* globalCtx) {
if ((gSaveContext.weekEventReg[22] & 0x10) && (gSaveContext.weekEventReg[22] & 0x20) && (CURRENT_DAY == 3) &&
(gSaveContext.playerForm == PLAYER_FORM_HUMAN)) {
if (gSaveContext.weekEventReg[22] & 0x40) {
func_801518B0(globalCtx, 0x2884, &this->actor);
Message_StartTextbox(globalCtx, 0x2884, &this->actor);
this->unk_552 = 0x2884;
} else if (!(gSaveContext.weekEventReg[22] & 0x80)) {
gSaveContext.weekEventReg[22] |= 0x80;
func_801518B0(globalCtx, 0x2882, &this->actor);
Message_StartTextbox(globalCtx, 0x2882, &this->actor);
this->unk_552 = 0x2882;
} else {
func_801518B0(globalCtx, 0x2881, &this->actor);
Message_StartTextbox(globalCtx, 0x2881, &this->actor);
this->unk_552 = 0x2881;
}
} else {
func_801518B0(globalCtx, 0x287F, &this->actor);
Message_StartTextbox(globalCtx, 0x287F, &this->actor);
this->unk_552 = 0x287F;
}
@ -969,46 +969,46 @@ s32 func_80963810(GlobalContext* globalCtx, Vec3f pos) {
s32 func_809638F8(GlobalContext* globalCtx) {
s32 ret = true;
if (globalCtx->envCtx.unk_8C.diffuseColor1[0] > 25) {
globalCtx->envCtx.unk_8C.diffuseColor1[0] -= 25;
if (globalCtx->envCtx.lightSettings.diffuseColor1[0] > 25) {
globalCtx->envCtx.lightSettings.diffuseColor1[0] -= 25;
ret = false;
} else {
globalCtx->envCtx.unk_8C.diffuseColor1[0] = 0;
globalCtx->envCtx.lightSettings.diffuseColor1[0] = 0;
}
if (globalCtx->envCtx.unk_8C.diffuseColor1[1] > 25) {
globalCtx->envCtx.unk_8C.diffuseColor1[1] -= 25;
if (globalCtx->envCtx.lightSettings.diffuseColor1[1] > 25) {
globalCtx->envCtx.lightSettings.diffuseColor1[1] -= 25;
ret = false;
} else {
globalCtx->envCtx.unk_8C.diffuseColor1[1] = 0;
globalCtx->envCtx.lightSettings.diffuseColor1[1] = 0;
}
if (globalCtx->envCtx.unk_8C.diffuseColor1[2] > 25) {
globalCtx->envCtx.unk_8C.diffuseColor1[2] -= 25;
if (globalCtx->envCtx.lightSettings.diffuseColor1[2] > 25) {
globalCtx->envCtx.lightSettings.diffuseColor1[2] -= 25;
ret = false;
} else {
globalCtx->envCtx.unk_8C.diffuseColor1[2] = 0;
globalCtx->envCtx.lightSettings.diffuseColor1[2] = 0;
}
if (globalCtx->envCtx.unk_8C.ambientColor[0] > 25) {
globalCtx->envCtx.unk_8C.ambientColor[0] -= 25;
if (globalCtx->envCtx.lightSettings.ambientColor[0] > 25) {
globalCtx->envCtx.lightSettings.ambientColor[0] -= 25;
ret = false;
} else {
globalCtx->envCtx.unk_8C.ambientColor[0] = 0;
globalCtx->envCtx.lightSettings.ambientColor[0] = 0;
}
if (globalCtx->envCtx.unk_8C.ambientColor[1] > 25) {
globalCtx->envCtx.unk_8C.ambientColor[1] -= 25;
if (globalCtx->envCtx.lightSettings.ambientColor[1] > 25) {
globalCtx->envCtx.lightSettings.ambientColor[1] -= 25;
ret = false;
} else {
globalCtx->envCtx.unk_8C.ambientColor[1] = 0;
globalCtx->envCtx.lightSettings.ambientColor[1] = 0;
}
if (globalCtx->envCtx.unk_8C.ambientColor[2] > 25) {
globalCtx->envCtx.unk_8C.ambientColor[2] -= 25;
if (globalCtx->envCtx.lightSettings.ambientColor[2] > 25) {
globalCtx->envCtx.lightSettings.ambientColor[2] -= 25;
ret = false;
} else {
globalCtx->envCtx.unk_8C.ambientColor[2] = 0;
globalCtx->envCtx.lightSettings.ambientColor[2] = 0;
}
return ret;
}
@ -1018,50 +1018,50 @@ void func_809639D0(EnFu* this, GlobalContext* globalCtx) {
case 1:
if (gSaveContext.playerForm == PLAYER_FORM_HUMAN) {
if (CUR_UPG_VALUE(UPG_BOMB_BAG) == 0) {
func_801518B0(globalCtx, 0x2853, &this->actor);
Message_StartTextbox(globalCtx, 0x2853, &this->actor);
this->unk_552 = 0x2853;
} else if (gSaveContext.weekEventReg[22] & 0x10) {
func_801518B0(globalCtx, 0x284D, &this->actor);
Message_StartTextbox(globalCtx, 0x284D, &this->actor);
this->unk_552 = 0x284D;
} else if (this->unk_53E == 1) {
func_801518B0(globalCtx, 0x284F, &this->actor);
Message_StartTextbox(globalCtx, 0x284F, &this->actor);
this->unk_552 = 0x284F;
} else {
this->unk_53E = 1;
func_801518B0(globalCtx, 0x2851, &this->actor);
Message_StartTextbox(globalCtx, 0x2851, &this->actor);
this->unk_552 = 0x2851;
}
} else {
func_801518B0(globalCtx, 0x286F, &this->actor);
Message_StartTextbox(globalCtx, 0x286F, &this->actor);
this->unk_552 = 0x286F;
}
break;
case 2:
if (gSaveContext.playerForm != PLAYER_FORM_HUMAN) {
func_801518B0(globalCtx, 0x286F, &this->actor);
Message_StartTextbox(globalCtx, 0x286F, &this->actor);
this->unk_552 = 0x286F;
} else if (CUR_UPG_VALUE(UPG_BOMB_BAG) == 0) {
func_801518B0(globalCtx, 0x2853, &this->actor);
Message_StartTextbox(globalCtx, 0x2853, &this->actor);
this->unk_552 = 0x2853;
} else if (!(gSaveContext.weekEventReg[22] & 0x10)) {
if (this->unk_53E == 1) {
func_801518B0(globalCtx, 0x285B, &this->actor);
Message_StartTextbox(globalCtx, 0x285B, &this->actor);
this->unk_552 = 0x285B;
} else {
this->unk_53E = 1;
func_801518B0(globalCtx, 0x285D, &this->actor);
Message_StartTextbox(globalCtx, 0x285D, &this->actor);
this->unk_552 = 0x285D;
}
} else if (gSaveContext.weekEventReg[22] & 0x20) {
func_801518B0(globalCtx, 0x2855, &this->actor);
Message_StartTextbox(globalCtx, 0x2855, &this->actor);
this->unk_552 = 0x2855;
} else if (this->unk_53E == 1) {
func_801518B0(globalCtx, 0x2857, &this->actor);
Message_StartTextbox(globalCtx, 0x2857, &this->actor);
this->unk_552 = 0x2857;
} else {
this->unk_53E = 1;
func_801518B0(globalCtx, 0x2859, &this->actor);
Message_StartTextbox(globalCtx, 0x2859, &this->actor);
this->unk_552 = 0x2859;
}
break;
@ -1071,44 +1071,44 @@ void func_809639D0(EnFu* this, GlobalContext* globalCtx) {
if (gSaveContext.playerForm == PLAYER_FORM_DEKU) {
func_80963EAC(this, globalCtx);
} else {
func_801518B0(globalCtx, 0x2841, &this->actor);
Message_StartTextbox(globalCtx, 0x2841, &this->actor);
this->unk_552 = 0x2841;
}
} else if (CUR_UPG_VALUE(UPG_QUIVER) == 0) {
func_801518B0(globalCtx, 0x284B, &this->actor);
Message_StartTextbox(globalCtx, 0x284B, &this->actor);
this->unk_552 = 0x284B;
} else if (gSaveContext.weekEventReg[22] & 0x40) {
if ((gSaveContext.weekEventReg[22] & 0x10) && (gSaveContext.weekEventReg[22] & 0x20)) {
func_801518B0(globalCtx, 0x285F, &this->actor);
Message_StartTextbox(globalCtx, 0x285F, &this->actor);
this->unk_552 = 0x285F;
} else {
func_801518B0(globalCtx, 0x2861, &this->actor);
Message_StartTextbox(globalCtx, 0x2861, &this->actor);
this->unk_552 = 0x2861;
}
} else if ((gSaveContext.weekEventReg[22] & 0x10) && (gSaveContext.weekEventReg[22] & 0x20)) {
if (this->unk_53E == 1) {
func_801518B0(globalCtx, 0x2863, &this->actor);
Message_StartTextbox(globalCtx, 0x2863, &this->actor);
this->unk_552 = 0x2863;
} else {
this->unk_53E = 1;
func_801518B0(globalCtx, 0x2865, &this->actor);
Message_StartTextbox(globalCtx, 0x2865, &this->actor);
this->unk_552 = 0x2865;
}
} else if ((gSaveContext.weekEventReg[22] & 0x10) || (gSaveContext.weekEventReg[22] & 0x20)) {
if (this->unk_53E == 1) {
func_801518B0(globalCtx, 0x2867, &this->actor);
Message_StartTextbox(globalCtx, 0x2867, &this->actor);
this->unk_552 = 0x2867;
} else {
this->unk_53E = 1;
func_801518B0(globalCtx, 0x2869, &this->actor);
Message_StartTextbox(globalCtx, 0x2869, &this->actor);
this->unk_552 = 0x2869;
}
} else if (this->unk_53E == 1) {
func_801518B0(globalCtx, 0x286B, &this->actor);
Message_StartTextbox(globalCtx, 0x286B, &this->actor);
this->unk_552 = 0x286B;
} else {
this->unk_53E = 1;
func_801518B0(globalCtx, 0x286D, &this->actor);
Message_StartTextbox(globalCtx, 0x286D, &this->actor);
this->unk_552 = 0x286D;
}
break;
@ -1119,21 +1119,21 @@ void func_80963DE4(EnFu* this, GlobalContext* globalCtx) {
switch (this->unk_542) {
case 0:
if (gSaveContext.playerForm != PLAYER_FORM_HUMAN) {
func_801518B0(globalCtx, 0x2875, &this->actor);
Message_StartTextbox(globalCtx, 0x2875, &this->actor);
this->unk_552 = 0x2875;
} else {
func_801518B0(globalCtx, 0x2877, &this->actor);
Message_StartTextbox(globalCtx, 0x2877, &this->actor);
this->unk_552 = 0x2877;
}
break;
case 1:
func_801518B0(globalCtx, 0x2879, &this->actor);
Message_StartTextbox(globalCtx, 0x2879, &this->actor);
this->unk_552 = 0x2879;
break;
case 2:
func_801518B0(globalCtx, 0x287B, &this->actor);
Message_StartTextbox(globalCtx, 0x287B, &this->actor);
this->unk_552 = 0x287B;
break;
}
@ -1142,15 +1142,15 @@ void func_80963DE4(EnFu* this, GlobalContext* globalCtx) {
void func_80963EAC(EnFu* this, GlobalContext* globalCtx) {
if (gSaveContext.magicAcquired) {
if (this->unk_540 == 1) {
func_801518B0(globalCtx, 0x2847, &this->actor);
Message_StartTextbox(globalCtx, 0x2847, &this->actor);
this->unk_552 = 0x2847;
} else {
this->unk_540 = 1;
func_801518B0(globalCtx, 0x2845, &this->actor);
Message_StartTextbox(globalCtx, 0x2845, &this->actor);
this->unk_552 = 0x2845;
}
} else {
func_801518B0(globalCtx, 0x2843, &this->actor);
Message_StartTextbox(globalCtx, 0x2843, &this->actor);
this->unk_552 = 0x2843;
}
}
@ -1158,7 +1158,7 @@ void func_80963EAC(EnFu* this, GlobalContext* globalCtx) {
void func_80963F44(EnFu* this, GlobalContext* globalCtx) {
u16 sp1E = this->unk_552 + 1;
func_801518B0(globalCtx, sp1E, &this->actor);
Message_StartTextbox(globalCtx, sp1E, &this->actor);
this->unk_552 = sp1E;
}

View File

@ -378,7 +378,7 @@ void func_80B0FEBC(EnGb2* this, GlobalContext* globalCtx) {
}
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
func_801518B0(globalCtx, this->unk_26E, &this->actor);
Message_StartTextbox(globalCtx, this->unk_26E, &this->actor);
this->actionFunc = func_80B0FFA8;
} else if ((this->actor.xzDistToPlayer < 300.0f) || this->actor.isTargeted) {
func_800B863C(&this->actor, globalCtx);
@ -400,7 +400,7 @@ void func_80B0FFA8(EnGb2* this, GlobalContext* globalCtx) {
this->actionFunc = func_80B0FEBC;
} else {
this->unk_26E = func_80B0F7FC(this);
func_801518B0(globalCtx, this->unk_26E, &this->actor);
Message_StartTextbox(globalCtx, this->unk_26E, &this->actor);
}
}
} else if ((temp_v0 == 4) && func_80147624(globalCtx)) {
@ -411,11 +411,11 @@ void func_80B0FFA8(EnGb2* this, GlobalContext* globalCtx) {
play_sound(NA_SE_SY_ERROR);
this->unk_26E = 0x14D7;
this->unk_26C |= 2;
func_801518B0(globalCtx, this->unk_26E, &this->actor);
Message_StartTextbox(globalCtx, this->unk_26E, &this->actor);
} else {
func_8019F208();
this->unk_26E = 0x14D8;
func_801518B0(globalCtx, this->unk_26E, &this->actor);
Message_StartTextbox(globalCtx, this->unk_26E, &this->actor);
}
break;
@ -423,7 +423,7 @@ void func_80B0FFA8(EnGb2* this, GlobalContext* globalCtx) {
func_8019F230();
this->unk_26E = 0x14D6;
this->unk_26C |= 2;
func_801518B0(globalCtx, this->unk_26E, &this->actor);
Message_StartTextbox(globalCtx, this->unk_26E, &this->actor);
break;
}
} else if (this->unk_26E == 0x14DA) {
@ -441,7 +441,7 @@ void func_80B0FFA8(EnGb2* this, GlobalContext* globalCtx) {
func_8019F230();
this->unk_26E = 0x14DB;
this->unk_26C |= 2;
func_801518B0(globalCtx, this->unk_26E, &this->actor);
Message_StartTextbox(globalCtx, this->unk_26E, &this->actor);
break;
}
}
@ -538,7 +538,7 @@ void func_80B10344(EnGb2* this, GlobalContext* globalCtx) {
void func_80B10584(EnGb2* this, GlobalContext* globalCtx) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
func_801518B0(globalCtx, this->unk_26E, &this->actor);
Message_StartTextbox(globalCtx, this->unk_26E, &this->actor);
this->actor.flags &= ~ACTOR_FLAG_10000;
this->actionFunc = func_80B10634;
} else if (this->actor.xzDistToPlayer < 300.0f) {
@ -569,7 +569,7 @@ void func_80B10634(EnGb2* this, GlobalContext* globalCtx) {
}
} else {
this->unk_26E = func_80B0F8F8(this);
func_801518B0(globalCtx, this->unk_26E, &this->actor);
Message_StartTextbox(globalCtx, this->unk_26E, &this->actor);
}
}
} else if ((temp_v0 == 4) && func_80147624(globalCtx)) {
@ -579,7 +579,7 @@ void func_80B10634(EnGb2* this, GlobalContext* globalCtx) {
play_sound(NA_SE_SY_ERROR);
this->unk_26E = 0x14D7;
this->unk_26C |= 2;
func_801518B0(globalCtx, this->unk_26E, &this->actor);
Message_StartTextbox(globalCtx, this->unk_26E, &this->actor);
} else {
func_8019F208();
func_801159EC(-this->unk_288);
@ -594,7 +594,7 @@ void func_80B10634(EnGb2* this, GlobalContext* globalCtx) {
func_8019F230();
this->unk_26E = 0x14E3;
this->unk_26C |= 2;
func_801518B0(globalCtx, this->unk_26E, &this->actor);
Message_StartTextbox(globalCtx, this->unk_26E, &this->actor);
break;
}
}
@ -638,7 +638,7 @@ void func_80B10924(EnGb2* this, GlobalContext* globalCtx) {
void func_80B109DC(EnGb2* this, GlobalContext* globalCtx) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
func_801518B0(globalCtx, this->unk_26E, &this->actor);
Message_StartTextbox(globalCtx, this->unk_26E, &this->actor);
this->actionFunc = func_80B10634;
} else {
func_800B85E0(&this->actor, globalCtx, 300.0f, -1);
@ -692,7 +692,7 @@ void func_80B10B5C(EnGb2* this, GlobalContext* globalCtx) {
if ((this->unk_26E == 0x14EE) || (this->unk_26E == 0x14F4)) {
this->unk_26C |= 2;
}
func_801518B0(globalCtx, this->unk_26E, &this->actor);
Message_StartTextbox(globalCtx, this->unk_26E, &this->actor);
this->unk_290 = 1;
this->unk_26C &= ~0x40;
this->actionFunc = func_80B10DAC;
@ -704,7 +704,7 @@ void func_80B10B5C(EnGb2* this, GlobalContext* globalCtx) {
this->unk_26C &= ~0x40;
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state) && (this->unk_26C & 0x20)) {
this->actor.flags &= ~ACTOR_FLAG_10000;
func_801518B0(globalCtx, this->unk_26E, &this->actor);
Message_StartTextbox(globalCtx, this->unk_26E, &this->actor);
if (this->unk_26E == 0x14EB) {
gSaveContext.weekEventReg[80] |= 0x40;
} else if (this->unk_26E == 0x14EF) {
@ -766,7 +766,7 @@ void func_80B10E98(EnGb2* this, GlobalContext* globalCtx) {
s32 temp;
this->unk_26E = func_80B0FB24(this);
func_801518B0(globalCtx, this->unk_26E, &this->actor);
Message_StartTextbox(globalCtx, this->unk_26E, &this->actor);
temp = this->unk_26E;
if ((temp == 0x14E7) || (temp == 0x14E9) || (temp == 0x14EC) || (temp == 0x14F0)) {
ActorCutscene_Stop(this->unk_282[this->unk_290]);
@ -781,7 +781,7 @@ void func_80B10E98(EnGb2* this, GlobalContext* globalCtx) {
void func_80B11048(EnGb2* this, GlobalContext* globalCtx) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->actor.flags &= ~ACTOR_FLAG_10000;
func_801518B0(globalCtx, this->unk_26E, &this->actor);
Message_StartTextbox(globalCtx, this->unk_26E, &this->actor);
this->actionFunc = func_80B10DAC;
} else if (this->actor.xzDistToPlayer < 300.0f) {
this->actor.flags |= ACTOR_FLAG_10000;
@ -798,7 +798,7 @@ void func_80B110F8(EnGb2* this, GlobalContext* globalCtx) {
this->actionFunc = func_80B10A48;
} else {
this->unk_26E = func_80B0F97C(this);
func_801518B0(globalCtx, this->unk_26E, &this->actor);
Message_StartTextbox(globalCtx, this->unk_26E, &this->actor);
}
}
}

View File

@ -442,7 +442,7 @@ void func_80BB221C(EnGeg* this, GlobalContext* globalCtx) {
this->unk_49A = this->unk_49C[2];
this->unk_230 &= ~4;
}
func_801518B0(globalCtx, this->unk_496, &this->actor);
Message_StartTextbox(globalCtx, this->unk_496, &this->actor);
this->actionFunc = func_80BB2520;
this->actor.flags &= ~ACTOR_FLAG_10000;
} else if (this->actor.xzDistToPlayer < 300.0f) {
@ -455,7 +455,7 @@ void func_80BB221C(EnGeg* this, GlobalContext* globalCtx) {
if (gSaveContext.weekEventReg[35] & 0x40) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state) && (this->unk_230 & 8)) {
this->unk_496 = 0xD62;
func_801518B0(globalCtx, this->unk_496, &this->actor);
Message_StartTextbox(globalCtx, this->unk_496, &this->actor);
this->unk_230 &= ~8;
this->actionFunc = func_80BB27D4;
} else if ((this->actor.xzDistToPlayer < 300.0f) && this->actor.isTargeted) {
@ -466,7 +466,7 @@ void func_80BB221C(EnGeg* this, GlobalContext* globalCtx) {
gSaveContext.weekEventReg[35] |= 0x40;
this->unk_496 = 0xD5E;
this->unk_49A = this->unk_49C[0];
func_801518B0(globalCtx, this->unk_496, &this->actor);
Message_StartTextbox(globalCtx, this->unk_496, &this->actor);
this->actionFunc = func_80BB2520;
this->unk_230 &= ~8;
this->actor.flags &= ~ACTOR_FLAG_10000;
@ -559,7 +559,7 @@ void func_80BB26EC(EnGeg* this, GlobalContext* globalCtx) {
}
this->unk_496 = func_80BB16D0(this);
func_801518B0(globalCtx, this->unk_496, &this->actor);
Message_StartTextbox(globalCtx, this->unk_496, &this->actor);
}
}
@ -599,7 +599,7 @@ void func_80BB27D4(EnGeg* this, GlobalContext* globalCtx) {
default:
this->unk_496 = func_80BB16D0(this);
func_801518B0(globalCtx, this->unk_496, &this->actor);
Message_StartTextbox(globalCtx, this->unk_496, &this->actor);
break;
}
}
@ -639,7 +639,7 @@ void func_80BB2A54(EnGeg* this, GlobalContext* globalCtx) {
this->actionFunc = func_80BB347C;
} else {
this->unk_496 = func_80BB16D0(this);
func_801518B0(globalCtx, this->unk_496, &this->actor);
Message_StartTextbox(globalCtx, this->unk_496, &this->actor);
}
}
}
@ -771,7 +771,7 @@ void func_80BB30B4(EnGeg* this, GlobalContext* globalCtx) {
} else {
this->unk_496 = 0xD6E;
}
func_801518B0(globalCtx, this->unk_496, &this->actor);
Message_StartTextbox(globalCtx, this->unk_496, &this->actor);
this->actionFunc = func_80BB27D4;
this->actor.flags &= ~ACTOR_FLAG_10000;
} else if (this->actor.xzDistToPlayer < 150.0f) {
@ -809,7 +809,7 @@ void func_80BB31B8(EnGeg* this, GlobalContext* globalCtx) {
void func_80BB32AC(EnGeg* this, GlobalContext* globalCtx) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
func_801518B0(globalCtx, this->unk_496, &this->actor);
Message_StartTextbox(globalCtx, this->unk_496, &this->actor);
this->actionFunc = func_80BB27D4;
} else {
func_800B85E0(&this->actor, globalCtx, 400.0f, -1);

View File

@ -256,7 +256,7 @@ void func_80B3556C(EnGg* this, GlobalContext* globalCtx) {
func_80B35250(this);
} else {
this->actor.textId = func_80B357F0(this);
func_801518B0(globalCtx, this->actor.textId, &this->actor);
Message_StartTextbox(globalCtx, this->actor.textId, &this->actor);
this->actionFunc = func_80B352A4;
}
}
@ -264,15 +264,15 @@ void func_80B3556C(EnGg* this, GlobalContext* globalCtx) {
void func_80B35634(EnGg* this, GlobalContext* globalCtx) {
s32 pad;
u32 temp_v0;
s32 actionIndex;
if (func_800EE29C(globalCtx, 0x77)) {
temp_v0 = func_800EE200(globalCtx, 0x77);
if (Cutscene_CheckActorAction(globalCtx, 119)) {
actionIndex = Cutscene_GetActorActionIndex(globalCtx, 119);
if (this->unk_2DB != globalCtx->csCtx.npcActions[temp_v0]->unk0) {
this->unk_2DB = globalCtx->csCtx.npcActions[temp_v0]->unk0;
if (this->unk_2DB != globalCtx->csCtx.actorActions[actionIndex]->action) {
this->unk_2DB = globalCtx->csCtx.actorActions[actionIndex]->action;
switch (globalCtx->csCtx.npcActions[temp_v0]->unk0) {
switch (globalCtx->csCtx.actorActions[actionIndex]->action) {
case 1:
this->unk_2DA = 0;
this->unk_2E6 = 0;
@ -333,7 +333,7 @@ void func_80B35634(EnGg* this, GlobalContext* globalCtx) {
func_80B358D8(this, globalCtx);
}
func_800EDF24(&this->actor, globalCtx, temp_v0);
Cutscene_ActorTranslateAndYaw(&this->actor, globalCtx, actionIndex);
this->actor.shape.yOffset = 0.0f;
} else {
this->unk_2DB = 99;

View File

@ -165,20 +165,20 @@ void EnGiant_Init(Actor* thisx, GlobalContext* globalCtx) {
case GIANT_TYPE_CANYON_TERMINA_FIELD:
case GIANT_TYPE_CANYON_CLOCK_TOWER_SUCCESS:
case GIANT_TYPE_CANYON_GIANTS_CHAMBER_AND_ENDING:
this->actorActionCommand = 0x1C6;
this->actorActionCommand = 454;
break;
case GIANT_TYPE_SWAMP_TERMINA_FIELD:
case GIANT_TYPE_SWAMP_CLOCK_TOWER_SUCCESS:
case GIANT_TYPE_SWAMP_GIANTS_CHAMBER_AND_ENDING:
this->actorActionCommand = 0x1C7;
this->actorActionCommand = 455;
break;
case GIANT_TYPE_OCEAN_TERMINA_FIELD:
case GIANT_TYPE_OCEAN_CLOCK_TOWER_SUCCESS:
case GIANT_TYPE_OCEAN_GIANTS_CHAMBER_AND_ENDING:
this->actorActionCommand = 0x1C8;
this->actorActionCommand = 456;
break;
default:
this->actorActionCommand = 0x1C5;
this->actorActionCommand = 453;
break;
}
@ -388,20 +388,23 @@ void EnGiant_PlaySound(EnGiant* this) {
}
void EnGiant_UpdatePosition(EnGiant* this, GlobalContext* globalCtx, u32 actionIndex) {
CsCmdActorAction* actorAction = globalCtx->csCtx.npcActions[actionIndex];
f32 startPosY = actorAction->unk0C.y;
CsCmdActorAction* actorAction = globalCtx->csCtx.actorActions[actionIndex];
f32 startPosY = actorAction->startPos.y;
s32 pad[2];
f32 endPosY = actorAction->unk18.y;
f32 scale = func_800F5A8C(actorAction->endFrame, actorAction->startFrame, globalCtx->csCtx.frames, globalCtx);
f32 endPosY = actorAction->endPos.y;
f32 scale = Environment_LerpWeight(actorAction->endFrame, actorAction->startFrame, globalCtx->csCtx.frames);
this->actor.world.pos.y = ((endPosY - startPosY) * scale) + startPosY;
}
void EnGiant_PerformClockTowerSuccessActions(EnGiant* this, GlobalContext* globalCtx) {
if (func_800EE29C(globalCtx, this->actorActionCommand)) {
EnGiant_UpdatePosition(this, globalCtx, func_800EE200(globalCtx, this->actorActionCommand));
if (this->csAction != globalCtx->csCtx.npcActions[func_800EE200(globalCtx, this->actorActionCommand)]->unk0) {
this->csAction = globalCtx->csCtx.npcActions[func_800EE200(globalCtx, this->actorActionCommand)]->unk0;
if (Cutscene_CheckActorAction(globalCtx, this->actorActionCommand)) {
EnGiant_UpdatePosition(this, globalCtx, Cutscene_GetActorActionIndex(globalCtx, this->actorActionCommand));
if (this->csAction !=
globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, this->actorActionCommand)]->action) {
this->csAction =
globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, this->actorActionCommand)]
->action;
EnGiant_ChangeAnimationBasedOnCsAction(this);
}
EnGiant_UpdateAlpha(this);
@ -421,10 +424,14 @@ void EnGiant_PlayClockTowerFailureAnimation(EnGiant* this, GlobalContext* global
void EnGiant_PerformCutsceneActions(EnGiant* this, GlobalContext* globalCtx) {
this->actor.draw = EnGiant_Draw;
if (func_800EE29C(globalCtx, this->actorActionCommand)) {
func_800EDF24(&this->actor, globalCtx, func_800EE200(globalCtx, this->actorActionCommand));
if (this->csAction != globalCtx->csCtx.npcActions[func_800EE200(globalCtx, this->actorActionCommand)]->unk0) {
this->csAction = globalCtx->csCtx.npcActions[func_800EE200(globalCtx, this->actorActionCommand)]->unk0;
if (Cutscene_CheckActorAction(globalCtx, this->actorActionCommand)) {
Cutscene_ActorTranslateAndYaw(&this->actor, globalCtx,
Cutscene_GetActorActionIndex(globalCtx, this->actorActionCommand));
if (this->csAction !=
globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, this->actorActionCommand)]->action) {
this->csAction =
globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, this->actorActionCommand)]
->action;
EnGiant_ChangeAnimationBasedOnCsAction(this);
}
EnGiant_UpdateAlpha(this);

View File

@ -83,15 +83,15 @@ void EnGinkoMan_Idle(EnGinkoMan* this, GlobalContext* globalCtx) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
if ((gSaveContext.bankRupees & 0xFFFF) == 0) {
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_FLOORSMACKING);
func_801518B0(globalCtx, 0x44C, &this->actor);
Message_StartTextbox(globalCtx, 0x44C, &this->actor);
this->curTextId = 0x44C; // would you like to make an account
} else {
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_SITTING);
if ((CURRENT_DAY == 3) && (gSaveContext.isNight == 1)) {
func_801518B0(globalCtx, 0x467, &this->actor);
Message_StartTextbox(globalCtx, 0x467, &this->actor);
this->curTextId = 0x467; // "What's this? You need somethin' on a day like this?
} else {
func_801518B0(globalCtx, 0x466, &this->actor);
Message_StartTextbox(globalCtx, 0x466, &this->actor);
this->curTextId = 0x466; // What's this? You need somethin'?
}
}
@ -111,21 +111,21 @@ void EnGinkoMan_DepositDialogue(EnGinkoMan* this, GlobalContext* globalCtx) {
case 0x44C: // "Hey there, little guy! Won't you deposit some Rupees? (first dialogue)
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_SITTING);
if (gSaveContext.weekEventReg[10] & 8) {
func_801518B0(globalCtx, 0x44E, &this->actor);
Message_StartTextbox(globalCtx, 0x44E, &this->actor);
this->curTextId = 0x44E; //" ...So, what'll it be? Deposit Rupees Don't deposit Rupees"
} else {
func_801518B0(globalCtx, 0x44D, &this->actor);
Message_StartTextbox(globalCtx, 0x44D, &this->actor);
this->curTextId =
0x44D; // "For example, if you deposit 200 Rupees, you'll get an item that holds a lot of Rupees."
}
break;
case 0x44D: // "For example, if you deposit 200 Rupees, you'll get an item that holds a lot of Rupees."
func_801518B0(globalCtx, 0x44E, &this->actor);
Message_StartTextbox(globalCtx, 0x44E, &this->actor);
this->curTextId = 0x44E; //" ...So, what'll it be? Deposit Rupees Don't deposit Rupees"
break;
case 0x44F: // "...So, what'll it be? Deposit Rupees Don't deposit Rupees"
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_FLOORSMACKING);
func_801518B0(globalCtx, 0x450, &this->actor);
Message_StartTextbox(globalCtx, 0x450, &this->actor);
this->curTextId = 0x450; // "How much? How much? [rupee prompt]
break;
@ -138,7 +138,7 @@ void EnGinkoMan_DepositDialogue(EnGinkoMan* this, GlobalContext* globalCtx) {
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_SITTING);
}
func_801518B0(globalCtx, 0x461, &this->actor);
Message_StartTextbox(globalCtx, 0x461, &this->actor);
this->curTextId = 0x461; // So, little guy, what's your name?
} else {
if (this->curTextId == 0x453) { // "That's it? That ain't nothing at all, big spender!
@ -146,44 +146,44 @@ void EnGinkoMan_DepositDialogue(EnGinkoMan* this, GlobalContext* globalCtx) {
}
globalCtx->msgCtx.bankRupees = gSaveContext.bankRupees & 0xFFFF;
func_801518B0(globalCtx, 0x45A, &this->actor);
Message_StartTextbox(globalCtx, 0x45A, &this->actor);
this->curTextId = 0x45A; // "All right, little guy, now I've got a total of [rupees] from you!"
}
break;
case 0x456: // "Is that so? Think about it, little guy!"
case 0x459: // "Heyyy! You don't have that much!
func_801518B0(globalCtx, 0x44E, &this->actor);
Message_StartTextbox(globalCtx, 0x44E, &this->actor);
this->curTextId = 0x44E; //" ...So, what'll it be? Deposit Rupees Don't deposit Rupees"
break;
case 0x45A: // "All right, little guy, now I've got a total of [rupees] from you!"
if (((gSaveContext.bankRupees & 0xFFFF) >= 200) && (this->previousBankValue < 200) &&
!(gSaveContext.weekEventReg[59] & 0x40)) {
gSaveContext.weekEventReg[59] |= 0x40;
func_801518B0(globalCtx, 0x45B, &this->actor);
Message_StartTextbox(globalCtx, 0x45B, &this->actor);
this->curTextId = 0x45B; // "What's this? You've already saved up 200 Rupees!?!
} else if (((gSaveContext.bankRupees & 0xFFFF) >= 1000) && ((this->previousBankValue) < 1000) &&
!(gSaveContext.weekEventReg[59] & 0x80)) {
gSaveContext.weekEventReg[59] |= 0x80;
func_801518B0(globalCtx, 0x45C, &this->actor);
Message_StartTextbox(globalCtx, 0x45C, &this->actor);
this->curTextId = 0x45C; // "What's this? You've already saved up 1000 Rupees!?!
} else if ((gSaveContext.bankRupees & 0xFFFF) >= 5000) {
if ((this->previousBankValue < 5000) && !(gSaveContext.weekEventReg[60] & 1)) {
gSaveContext.weekEventReg[60] |= 1;
func_801518B0(globalCtx, 0x45D, &this->actor);
Message_StartTextbox(globalCtx, 0x45D, &this->actor);
this->curTextId = 0x45D; // "What's this? You've already saved up 5000 Rupees?!
} else if (this->previousBankValue < (s16)(gSaveContext.bankRupees & 0xFFFF)) {
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_SITTING);
func_801518B0(globalCtx, 0x45E, &this->actor);
Message_StartTextbox(globalCtx, 0x45E, &this->actor);
this->curTextId =
0x45E; // "...Hang on there, little guy. I can't take any more deposits. Sorry..."
} else {
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_FLOORSMACKING);
func_801518B0(globalCtx, 0x460, &this->actor);
Message_StartTextbox(globalCtx, 0x460, &this->actor);
this->curTextId = 0x460; // "Come back and deposit some after you save up a bunch!"
}
} else {
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_FLOORSMACKING);
func_801518B0(globalCtx, 0x460, &this->actor);
Message_StartTextbox(globalCtx, 0x460, &this->actor);
this->curTextId = 0x460; // "Come back and deposit some after you save up a bunch!"
}
break;
@ -196,15 +196,15 @@ void EnGinkoMan_DepositDialogue(EnGinkoMan* this, GlobalContext* globalCtx) {
EnGinkoMan_BankAward(this, globalCtx);
break;
case 0x461: // So, little guy, what's your name?
func_801518B0(globalCtx, 0x462, &this->actor);
Message_StartTextbox(globalCtx, 0x462, &this->actor);
this->curTextId = 0x462; // Hmm... Link is it?
break;
case 0x462: // Hmm.. Link is it?
func_801518B0(globalCtx, 0x463, &this->actor);
Message_StartTextbox(globalCtx, 0x463, &this->actor);
this->curTextId = 0x463; // Got it... I won't forget your deposits. Let me stamp you
break;
case 0x463: // Got it... I won't forget your deposits. Let me stamp you
func_801518B0(globalCtx, 0x464, &this->actor);
Message_StartTextbox(globalCtx, 0x464, &this->actor);
this->curTextId = 0x464; // Hey, relax! It doesn't leave any marks
break;
case 0x464: // Hey, relax! It doesn't leave any marks
@ -214,12 +214,12 @@ void EnGinkoMan_DepositDialogue(EnGinkoMan* this, GlobalContext* globalCtx) {
case 0x465: // "There! Now I'll know you when I see you!"
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_FLOORSMACKING);
globalCtx->msgCtx.bankRupees = gSaveContext.bankRupees & 0xFFFF;
func_801518B0(globalCtx, 0x45A, &this->actor);
Message_StartTextbox(globalCtx, 0x45A, &this->actor);
this->curTextId = 0x45A; // "All right, little guy, now I've got a total of [rupees] from you!"
break;
case 0x466: // What's this? You need somethin'?
case 0x467: // "What's this? You need somethin' on a day like this? You haven't evacuated yet?
func_801518B0(globalCtx, 0x468, &this->actor);
Message_StartTextbox(globalCtx, 0x468, &this->actor);
this->curTextId = 0x468; // " Deposit Rupees Withdraw Rupees Nothing really"
break;
case 0x469: // "Excuse me, but let me take a look at you..."
@ -230,34 +230,34 @@ void EnGinkoMan_DepositDialogue(EnGinkoMan* this, GlobalContext* globalCtx) {
case 0x47E: // "Your deposits total [rupees]."
if (this->choiceDepositWithdrawl == GINKOMAN_CHOICE_DEPOSIT) {
if ((u32)(gSaveContext.bankRupees & 0xFFFF) >= 5000) {
func_801518B0(globalCtx, 0x45F, &this->actor);
Message_StartTextbox(globalCtx, 0x45F, &this->actor);
this->curTextId = 0x45F; // "Excuuuse me! But I can't take anymore deposits!
} else if (gSaveContext.rupees == 0) {
func_801518B0(globalCtx, 0x458, &this->actor);
Message_StartTextbox(globalCtx, 0x458, &this->actor);
this->curTextId =
0x458; // "Hmm...You play mean jokes, little guy! You haven't even got a single Rupee!
} else {
func_801518B0(globalCtx, 0x479, &this->actor);
Message_StartTextbox(globalCtx, 0x479, &this->actor);
this->curTextId = 0x479; // "Well, are you gonna make a deposit?"
}
} else if ((CURRENT_DAY == 3) && (gSaveContext.isNight == 1)) {
func_801518B0(globalCtx, 0x46D, &this->actor);
Message_StartTextbox(globalCtx, 0x46D, &this->actor);
// "Look, little guy, if it's 'cause of the bad rumors going around, forget it! They're just rumors!"
this->curTextId = 0x46D;
} else { // GINKOMAN_CHOICE_WITHDRAWL
func_801518B0(globalCtx, 0x46B, &this->actor);
Message_StartTextbox(globalCtx, 0x46B, &this->actor);
this->curTextId = 0x46B; // "So..."
}
this->choiceDepositWithdrawl = GINKOMAN_CHOICE_RESET;
break;
case 0x46B: // So...
func_801518B0(globalCtx, 0x46E, &this->actor);
Message_StartTextbox(globalCtx, 0x46E, &this->actor);
this->curTextId = 0x46E; // "How much do you want? [rupee prompt]
break;
case 0x46D: // "Look, little guy, if it's 'cause of the bad rumors going around, forget it! They're just
// rumors!"
func_801518B0(globalCtx, 0x46B, &this->actor);
Message_StartTextbox(globalCtx, 0x46B, &this->actor);
this->curTextId = 0x46B; // So...
break;
case 0x470: // "Is that so? Come back and deposit some after saving up a bunch!"
@ -273,7 +273,7 @@ void EnGinkoMan_DepositDialogue(EnGinkoMan* this, GlobalContext* globalCtx) {
case 0x475: // "What's this? Look, little guy, you can't hold this many rupees! You got that?"
case 0x47C: // "Is that so? Think it over, little guy! So what are you gonna do?"
case 0x47D: // duplicate of 48
func_801518B0(globalCtx, 0x468, &this->actor);
Message_StartTextbox(globalCtx, 0x468, &this->actor);
this->curTextId = 0x468; // " Deposit Rupees Withdraw Rupees Nothing really"
break;
case 0x472: // "What's this? It's a waste to take out such a tiny bit! ...But if you say so!"
@ -281,22 +281,22 @@ void EnGinkoMan_DepositDialogue(EnGinkoMan* this, GlobalContext* globalCtx) {
case 0x474: // "Aw, you're taking out all that? If you spend it like that, it'll all be gone before you know
// it!"
if ((gSaveContext.bankRupees & 0xFFFF) == 0) {
func_801518B0(globalCtx, 0x478, &this->actor);
Message_StartTextbox(globalCtx, 0x478, &this->actor);
// "Look, little guy, all the Rupees you deposited are gone, so you can't use that stamp anymore."
this->curTextId = 0x478;
} else {
globalCtx->msgCtx.bankRupees = gSaveContext.bankRupees & 0xFFFF;
func_801518B0(globalCtx, 0x45A, &this->actor);
Message_StartTextbox(globalCtx, 0x45A, &this->actor);
this->curTextId = 0x45A; // "All right, little guy, now I've got a total of [rupees] from you!"
}
break;
case 0x477: // "...You know, at this time of day there's a 4 Rupee service charge on withdrawals!"
func_801518B0(globalCtx, 0x471, &this->actor);
Message_StartTextbox(globalCtx, 0x471, &this->actor);
this->curTextId = 0x471; // "Are you really withdrawing [rupees selected]? Y/n"
this->serviceFee = globalCtx->msgCtx.unk1206C;
break;
case 0x479: // Well, are you gonna make a deposit?
func_801518B0(globalCtx, 0x44F, &this->actor);
Message_StartTextbox(globalCtx, 0x44F, &this->actor);
this->curTextId = 0x44F; // "All right! So..."
break;
}
@ -313,22 +313,22 @@ void EnGinkoMan_WaitForDialogueInput(EnGinkoMan* this, GlobalContext* globalCtx)
if (globalCtx->msgCtx.choiceIndex == GINKOMAN_CHOICE_YES) {
if ((gSaveContext.bankRupees & 0xFFFF) >= 5000) {
play_sound(NA_SE_SY_ERROR);
func_801518B0(globalCtx, 0x45F, &this->actor);
Message_StartTextbox(globalCtx, 0x45F, &this->actor);
this->curTextId = 0x45F; // bank full, cannot accept more
} else {
if (gSaveContext.rupees > 0) {
func_8019F208();
func_801518B0(globalCtx, 0x44F, &this->actor);
Message_StartTextbox(globalCtx, 0x44F, &this->actor);
this->curTextId = 0x44F; // "All right! so..."
} else {
play_sound(NA_SE_SY_ERROR);
func_801518B0(globalCtx, 0x458, &this->actor);
Message_StartTextbox(globalCtx, 0x458, &this->actor);
this->curTextId = 0x458; // you haven't even gotten a single rup
}
}
} else { // GINKOMAN_CHOICE_NO
func_8019F230();
func_801518B0(globalCtx, 0x451, &this->actor);
Message_StartTextbox(globalCtx, 0x451, &this->actor);
this->curTextId = 0x451; // dont say that, come on, trust me!
}
break;
@ -337,19 +337,19 @@ void EnGinkoMan_WaitForDialogueInput(EnGinkoMan* this, GlobalContext* globalCtx)
if (gSaveContext.rupees < globalCtx->msgCtx.bankRupeesSelected) {
play_sound(NA_SE_SY_ERROR);
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_SITTING);
func_801518B0(globalCtx, 0x459, &this->actor);
Message_StartTextbox(globalCtx, 0x459, &this->actor);
this->curTextId = 0x459; // HEY you dont have that much
} else {
func_8019F208();
if (globalCtx->msgCtx.bankRupeesSelected >= 100) {
func_801518B0(globalCtx, 0x455, &this->actor);
Message_StartTextbox(globalCtx, 0x455, &this->actor);
this->curTextId = 0x455; // You're really going to be give me that much? Rich little guy!
} else if (globalCtx->msgCtx.bankRupeesSelected >= 10) {
func_801518B0(globalCtx, 0x454, &this->actor);
Message_StartTextbox(globalCtx, 0x454, &this->actor);
this->curTextId = 0x454; // Seriously? that's a lot. A lot!
} else {
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_SITTING);
func_801518B0(globalCtx, 0x453, &this->actor);
Message_StartTextbox(globalCtx, 0x453, &this->actor);
this->curTextId = 0x453; // That's it? That aint nothing at all
}
@ -367,10 +367,10 @@ void EnGinkoMan_WaitForDialogueInput(EnGinkoMan* this, GlobalContext* globalCtx)
func_8019F230();
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_SITTING);
if ((gSaveContext.bankRupees & 0xFFFF) == 0) {
func_801518B0(globalCtx, 0x456, &this->actor);
Message_StartTextbox(globalCtx, 0x456, &this->actor);
this->curTextId = 0x456; // Is that so? think about it
} else {
func_801518B0(globalCtx, 0x47D, &this->actor);
Message_StartTextbox(globalCtx, 0x47D, &this->actor);
this->curTextId = 0x47D; // is that so? think it over
}
}
@ -378,17 +378,17 @@ void EnGinkoMan_WaitForDialogueInput(EnGinkoMan* this, GlobalContext* globalCtx)
case 0x468: // Deposit OR withdrawl OR cancel screen
if (globalCtx->msgCtx.choiceIndex == GINKOMAN_CHOICE_CANCEL) {
func_8019F230();
func_801518B0(globalCtx, 0x470, &this->actor);
Message_StartTextbox(globalCtx, 0x470, &this->actor);
this->curTextId = 0x470; // "Is that so? Come back and deposit some after saving up a bunch!"
} else {
func_8019F208();
this->choiceDepositWithdrawl = globalCtx->msgCtx.choiceIndex;
if (!this->isStampChecked) {
this->isStampChecked = true;
func_801518B0(globalCtx, 0x469, &this->actor);
Message_StartTextbox(globalCtx, 0x469, &this->actor);
this->curTextId = 0x469; // "Excuse me, but let me take a look at you..."
} else {
func_801518B0(globalCtx, 0x47E, &this->actor);
Message_StartTextbox(globalCtx, 0x47E, &this->actor);
this->curTextId = 0x47E; // "Your deposits total [rupees]."
}
}
@ -399,23 +399,23 @@ void EnGinkoMan_WaitForDialogueInput(EnGinkoMan* this, GlobalContext* globalCtx)
((s32)(globalCtx->msgCtx.bankRupeesSelected + this->serviceFee))) {
play_sound(NA_SE_SY_ERROR);
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_FLOORSMACKING);
func_801518B0(globalCtx, 0x476, &this->actor);
Message_StartTextbox(globalCtx, 0x476, &this->actor);
this->curTextId = 0x476; // you dont have enough deposited to withdrawl
} else if (CUR_CAPACITY(UPG_WALLET) < (globalCtx->msgCtx.bankRupeesSelected + gSaveContext.rupees)) {
// check if wallet is big enough
play_sound(NA_SE_SY_ERROR);
func_801518B0(globalCtx, 0x475, &this->actor);
Message_StartTextbox(globalCtx, 0x475, &this->actor);
this->curTextId = 0x475; // You can't hold that many in your wallet
} else {
func_8019F208();
if (globalCtx->msgCtx.bankRupeesSelected >= 100) {
func_801518B0(globalCtx, 0x474, &this->actor);
Message_StartTextbox(globalCtx, 0x474, &this->actor);
this->curTextId = 0x474; // Aw, you're taking out all that?
} else if (globalCtx->msgCtx.bankRupeesSelected >= 10) {
func_801518B0(globalCtx, 0x473, &this->actor);
Message_StartTextbox(globalCtx, 0x473, &this->actor);
this->curTextId = 0x473; // use it wisely
} else {
func_801518B0(globalCtx, 0x472, &this->actor);
Message_StartTextbox(globalCtx, 0x472, &this->actor);
this->curTextId = 0x472; // It's a waste to take out such a tiny bit
}
@ -428,7 +428,7 @@ void EnGinkoMan_WaitForDialogueInput(EnGinkoMan* this, GlobalContext* globalCtx)
}
} else {
func_8019F230();
func_801518B0(globalCtx, 0x47C, &this->actor);
Message_StartTextbox(globalCtx, 0x47C, &this->actor);
this->curTextId = 0x47C; // "Is that so? Think it over, little guy! So what are you gonna do?"
}
break;
@ -441,22 +441,22 @@ void EnGinkoMan_WaitForRupeeCount(EnGinkoMan* this, GlobalContext* globalCtx) {
case 0x450: // "How much? How much?" [rupee prompt] Set the amount with [Control Stick] and
if (globalCtx->msgCtx.bankRupeesSelected == 0) {
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_SITTING);
func_801518B0(globalCtx, 0x457, &this->actor);
Message_StartTextbox(globalCtx, 0x457, &this->actor);
this->curTextId = 0x457; // Zero Rupees? Cruel joke!
} else {
func_801518B0(globalCtx, 0x452, &this->actor);
Message_StartTextbox(globalCtx, 0x452, &this->actor);
this->curTextId = 0x452; // Really? are you really depositing [x]? Y/n
}
break;
case 0x46E: // "How much do you want?" [rupee prompt] Set the amount with [Control Stick]
if (globalCtx->msgCtx.bankRupeesSelected == 0) {
func_801518B0(globalCtx, 0x46F, &this->actor);
Message_StartTextbox(globalCtx, 0x46F, &this->actor);
this->curTextId = 0x46F; // "Zero Rupees?!? That's a cruel joke!"
} else if (gSaveContext.isNight == 1) {
func_801518B0(globalCtx, 0x477, &this->actor);
Message_StartTextbox(globalCtx, 0x477, &this->actor);
this->curTextId = 0x477; // "...You know, at this time of day there's a 4 Rupee service charge...
} else {
func_801518B0(globalCtx, 0x471, &this->actor);
Message_StartTextbox(globalCtx, 0x471, &this->actor);
this->curTextId = 0x471; // "Are you really withdrawing [rupees selected]? Y/n
this->serviceFee = 0;
}
@ -536,11 +536,11 @@ void EnGinkoMan_BankAward2(EnGinkoMan* this, GlobalContext* globalCtx) {
// "What's this? You've already saved up 200 Rupees!?! Well, little guy, here's your special gift. Take
// it!"
gSaveContext.weekEventReg[10] |= 8;
func_801518B0(globalCtx, 0x47A, &this->actor);
Message_StartTextbox(globalCtx, 0x47A, &this->actor);
this->curTextId = 0x47A; // Message after receiving reward for depositing 200 rupees.
} else {
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_SITTING);
func_801518B0(globalCtx, 0x47B, &this->actor);
Message_StartTextbox(globalCtx, 0x47B, &this->actor);
this->curTextId = 0x47B; // Message after receiving reward for depositing 1000 rupees.
}
@ -572,17 +572,17 @@ void EnGinkoMan_Stamp(EnGinkoMan* this, GlobalContext* globalCtx) {
switch (this->curTextId) {
case 0x464: // "Hey, relax! It doesn't leave any marks, and it's not gonna hurt."
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_SITTING);
func_801518B0(globalCtx, 0x465, &this->actor);
Message_StartTextbox(globalCtx, 0x465, &this->actor);
this->curTextId = 0x465; // "There! Now I'll know you when I see you!"
break;
case 0x469: // "Excuse me, but let me take a look at you..."
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_SITTING);
globalCtx->msgCtx.bankRupees = (gSaveContext.bankRupees & 0xFFFF);
if ((CURRENT_DAY == 3) && (gSaveContext.isNight == 1)) {
func_801518B0(globalCtx, 0x46C, &this->actor);
Message_StartTextbox(globalCtx, 0x46C, &this->actor);
this->curTextId = 0x46C; // "Ah, yes...[Link], right?
} else {
func_801518B0(globalCtx, 0x46A, &this->actor);
Message_StartTextbox(globalCtx, 0x46A, &this->actor);
this->curTextId = 0x46A; // "Ah, yes...[Link].
}
break;

View File

@ -103,7 +103,7 @@ typedef enum {
/* 39 */ SI_SWORD_RAZOR,
/* 40 */ SI_SWORD_GILDED,
/* 41 */ SI_SHIELD_HERO_4,
/* 42 */ SI_SHIELD_MIRROR,
/* 42 */ SI_SHIELD_MIRROR
} EnGirlAShopItemId;
extern const ActorInit En_GirlA_InitVars;

View File

@ -534,16 +534,16 @@ void func_80B51410(EnGk* this, GlobalContext* globalCtx) {
void func_80B51510(EnGk* this, GlobalContext* globalCtx) {
s32 pad;
u32 temp_v0;
s32 actionIndex;
if (this) {}
if (func_800EE29C(globalCtx, 0x1DF)) {
temp_v0 = func_800EE200(globalCtx, 0x1DF);
if (Cutscene_CheckActorAction(globalCtx, 479)) {
actionIndex = Cutscene_GetActorActionIndex(globalCtx, 479);
if (globalCtx->csCtx.npcActions[temp_v0]->unk0 != this->unk_31B) {
this->unk_31B = globalCtx->csCtx.npcActions[temp_v0]->unk0;
switch (globalCtx->csCtx.npcActions[temp_v0]->unk0) {
if (globalCtx->csCtx.actorActions[actionIndex]->action != this->unk_31B) {
this->unk_31B = globalCtx->csCtx.actorActions[actionIndex]->action;
switch (globalCtx->csCtx.actorActions[actionIndex]->action) {
case 1:
this->unk_31A = 0;
this->unk_2E4 = 0;
@ -587,7 +587,7 @@ void func_80B51510(EnGk* this, GlobalContext* globalCtx) {
func_80B51308(this, globalCtx);
}
func_800EDF24(&this->actor, globalCtx, temp_v0);
Cutscene_ActorTranslateAndYaw(&this->actor, globalCtx, actionIndex);
this->actor.shape.yOffset = 0.0f;
} else {
this->unk_31B = 0x63;
@ -641,7 +641,7 @@ void func_80B51760(EnGk* this, GlobalContext* globalCtx) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->unk_1E4 |= 4;
this->unk_31C = func_80B50410(this, globalCtx);
func_801518B0(globalCtx, this->unk_31C, &this->actor);
Message_StartTextbox(globalCtx, this->unk_31C, &this->actor);
this->actionFunc = func_80B51970;
if (this->unk_31C == 0xE81) {
this->unk_2E4 = 0;
@ -682,7 +682,7 @@ void func_80B51970(EnGk* this, GlobalContext* globalCtx) {
}
this->unk_31C = func_80B50410(this, globalCtx);
func_801518B0(globalCtx, this->unk_31C, &this->actor);
Message_StartTextbox(globalCtx, this->unk_31C, &this->actor);
if (this->unk_31C == 0xE80) {
this->unk_1E4 |= 2;
} else if (this->unk_31C == 0xE89) {
@ -736,7 +736,7 @@ void func_80B51B40(EnGk* this, GlobalContext* globalCtx) {
}
this->unk_31C = func_80B50710(this);
func_801518B0(globalCtx, this->unk_31C, &this->actor);
Message_StartTextbox(globalCtx, this->unk_31C, &this->actor);
if (this->unk_31C == 0xE8C) {
this->unk_1E4 |= 2;
}
@ -746,13 +746,13 @@ void func_80B51B40(EnGk* this, GlobalContext* globalCtx) {
case 0:
func_8019F208();
this->unk_31C = 0xE8E;
func_801518B0(globalCtx, this->unk_31C, &this->actor);
Message_StartTextbox(globalCtx, this->unk_31C, &this->actor);
break;
case 1:
func_8019F230();
this->unk_31C = 0xE8A;
func_801518B0(globalCtx, this->unk_31C, &this->actor);
Message_StartTextbox(globalCtx, this->unk_31C, &this->actor);
break;
}
}
@ -790,7 +790,7 @@ void func_80B51D9C(EnGk* this, GlobalContext* globalCtx) {
} else {
this->unk_31C = 0xE99;
}
func_801518B0(globalCtx, this->unk_31C, &this->actor);
Message_StartTextbox(globalCtx, this->unk_31C, &this->actor);
this->actionFunc = func_80B51970;
}
} else {
@ -918,7 +918,7 @@ void func_80B52340(EnGk* this, GlobalContext* globalCtx) {
this->unk_31C = 0xE93;
this->actionFunc = func_80B52430;
}
func_801518B0(globalCtx, this->unk_31C, &this->actor);
Message_StartTextbox(globalCtx, this->unk_31C, &this->actor);
this->actor.flags &= ~ACTOR_FLAG_10000;
} else {
this->actor.flags |= ACTOR_FLAG_10000;
@ -933,13 +933,13 @@ void func_80B52430(EnGk* this, GlobalContext* globalCtx) {
switch (this->unk_31C) {
case 0xE93:
this->unk_31C = 0xE89;
func_801518B0(globalCtx, this->unk_31C, &this->actor);
Message_StartTextbox(globalCtx, this->unk_31C, &this->actor);
this->actionFunc = func_80B51B40;
return;
case 0xE90:
this->unk_31C = 0xE91;
func_801518B0(globalCtx, this->unk_31C, &this->actor);
Message_StartTextbox(globalCtx, this->unk_31C, &this->actor);
return;
case 0xE91:
@ -980,7 +980,7 @@ void func_80B5253C(EnGk* this, GlobalContext* globalCtx) {
void func_80B525E0(EnGk* this, GlobalContext* globalCtx) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->unk_31C = 0xE92;
func_801518B0(globalCtx, this->unk_31C, &this->actor);
Message_StartTextbox(globalCtx, this->unk_31C, &this->actor);
this->actionFunc = func_80B52430;
} else {
func_800B85E0(&this->actor, globalCtx, 400.0f, -1);

View File

@ -1551,8 +1551,8 @@ void func_80950F2C(EnGm* this, GlobalContext* globalCtx) {
s32 sp2C;
s16 yaw;
if (func_800EE29C(globalCtx, 0x20E)) {
sp2C = globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x20E)]->unk0;
if (Cutscene_CheckActorAction(globalCtx, 526)) {
sp2C = globalCtx->csCtx.actorActions[Cutscene_GetActorActionIndex(globalCtx, 526)]->action;
if (this->unk_259 != (sp2C & 0xFF)) {
if (sp2C == 3) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_CHAIR_ROLL);

View File

@ -537,7 +537,7 @@ s32 func_80A1222C(EnGo* this, GlobalContext* globalCtx) {
if (((player->transformation == PLAYER_FORM_GORON) && (globalCtx->msgCtx.ocarinaMode == 3) &&
(globalCtx->msgCtx.unk1202E == 1) && (this->unk_3EC == 0) && (this->actor.xzDistToPlayer < 400.0f)) ||
(!(gSaveContext.weekEventReg[22] & 4) && (globalCtx->sceneNum == SCENE_16GORON_HOUSE) &&
(gSaveContext.sceneSetupIndex == 0) && (this->unk_3EC == 0) && (globalCtx->csCtx.unk_12 == 1))) {
(gSaveContext.sceneSetupIndex == 0) && (this->unk_3EC == 0) && (globalCtx->csCtx.currentCsIndex == 1))) {
ret = true;
}
return ret;
@ -710,7 +710,7 @@ s32 func_80A12868(EnGo* this, GlobalContext* globalCtx) {
s32 func_80A12954(EnGo* this, GlobalContext* globalCtx) {
if ((ENGO_GET_F(&this->actor) == ENGO_F_4) && (globalCtx->csCtx.state != 0) && (this->actor.draw != NULL) &&
(globalCtx->sceneNum == SCENE_10YUKIYAMANOMURA2) && (gSaveContext.sceneSetupIndex == 1) &&
(globalCtx->csCtx.unk_12 == 0)) {
(globalCtx->csCtx.currentCsIndex == 0)) {
if (this->unk_3F0 == 0) {
this->actor.flags &= ~ACTOR_FLAG_1;
this->unk_394 = 255;
@ -1410,7 +1410,7 @@ void func_80A144F4(EnGo* this, GlobalContext* globalCtx) {
void func_80A145AC(EnGo* this, GlobalContext* globalCtx) {
if ((ENGO_GET_70(&this->actor) == ENGO_70_1) &&
(((globalCtx->sceneNum == SCENE_10YUKIYAMANOMURA2) && (gSaveContext.sceneSetupIndex == 1) &&
(globalCtx->csCtx.unk_12 == 0)) ||
(globalCtx->csCtx.currentCsIndex == 0)) ||
!(gSaveContext.weekEventReg[21] & 8))) {
this->actor.child = func_80A13400(this, globalCtx);
this->actor.child->child = &this->actor;
@ -1633,24 +1633,24 @@ void func_80A14FC8(EnGo* this, GlobalContext* globalCtx) {
s32 sp38[] = {
0, 2, 6, 20, 18, 5, 5, 15,
};
u16 sp36 = 0;
u16 actorActionCmd = 0;
s32 sp30;
u32 sp2C;
s32 actionIndex;
switch (ENGO_GET_70(&this->actor)) {
case ENGO_70_0:
sp36 = 0x80;
actorActionCmd = 128;
break;
case ENGO_70_1:
sp36 = 0x81;
actorActionCmd = 129;
break;
}
if ((sp36 == 0x80) || (sp36 == 0x81)) {
if (func_800EE29C(globalCtx, sp36)) {
sp2C = func_800EE200(globalCtx, sp36);
sp30 = globalCtx->csCtx.npcActions[sp2C]->unk0;
if ((actorActionCmd == 128) || (actorActionCmd == 129)) {
if (Cutscene_CheckActorAction(globalCtx, actorActionCmd)) {
actionIndex = Cutscene_GetActorActionIndex(globalCtx, actorActionCmd);
sp30 = globalCtx->csCtx.actorActions[actionIndex]->action;
if (this->unk_394 != (u8)sp30) {
this->unk_394 = sp30;
@ -1699,7 +1699,7 @@ void func_80A14FC8(EnGo* this, GlobalContext* globalCtx) {
break;
}
if (sp36 == 0x80) {
if (actorActionCmd == 128) {
switch (globalCtx->csCtx.frames) {
case 55:
case 100:
@ -1723,7 +1723,7 @@ void func_80A14FC8(EnGo* this, GlobalContext* globalCtx) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_GOLON_VOICE_EATFULL);
break;
}
} else if (sp36 == 0x81) {
} else if (actorActionCmd == 129) {
switch (globalCtx->csCtx.frames) {
case 360:
case 390:
@ -1745,7 +1745,7 @@ void func_80A14FC8(EnGo* this, GlobalContext* globalCtx) {
}
SubS_FillLimbRotTables(globalCtx, this->unk_3CE, this->unk_3C8, ARRAY_COUNT(this->unk_3CE));
func_800EDF24(&this->actor, globalCtx, sp2C);
Cutscene_ActorTranslateAndYaw(&this->actor, globalCtx, actionIndex);
}
}
}

View File

@ -206,7 +206,7 @@ void func_80997DEC(EnGs* this, GlobalContext* globalCtx) {
void func_80997E4C(EnGs* this, GlobalContext* globalCtx) {
switch (Message_GetState(&globalCtx->msgCtx)) {
case 0:
func_801518B0(globalCtx, this->unk_210, &this->actor);
Message_StartTextbox(globalCtx, this->unk_210, &this->actor);
break;
case 1:
@ -533,10 +533,11 @@ s32 func_80998A48(EnGs* this, GlobalContext* globalCtx) {
} else if (this->unk_19D == 1) {
if (func_80998334(this, globalCtx, &this->unk_1DC, &this->unk_1E0, &this->unk_1D4, 0.8f, 0.007f, 0.001f, 7,
0) == 0.0f) {
if ((this->actor.params != ENGS_0) && !func_801690CC(globalCtx) && !Message_GetState(&globalCtx->msgCtx)) {
if ((this->actor.params != ENGS_0) && !func_801690CC(globalCtx) &&
Message_GetState(&globalCtx->msgCtx) == 0) {
this->unk_216 = 0;
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_FAIVE_LUPY_COUNT);
func_801518B0(globalCtx, 0x20D2, NULL);
Message_StartTextbox(globalCtx, 0x20D2, NULL);
}
this->unk_19A &= ~1;
sp3C = 0;

View File

@ -156,10 +156,10 @@ void func_80BCF354(EnHg* this) {
void func_80BCF398(EnHg* this, GlobalContext* globalCtx) {
if (this->actor.colChkInfo.health == 1) {
if ((this->actor.xzDistToPlayer < 200.0f && this->actor.playerHeightRel < 40.0f) &&
!func_800EE29C(globalCtx, 0x1E3)) {
!Cutscene_CheckActorAction(globalCtx, 0x1E3)) {
func_80BCF468(this);
}
if ((gSaveContext.sceneSetupIndex == 0 && globalCtx->csCtx.unk_12 == 0) &&
if ((gSaveContext.sceneSetupIndex == 0 && globalCtx->csCtx.currentCsIndex == 0) &&
(globalCtx->csCtx.frames == 20 || globalCtx->csCtx.frames == 60)) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_HALF_REDEAD_SURPRISE);
}
@ -176,7 +176,7 @@ void func_80BCF4AC(EnHg* this, GlobalContext* globalCtx) {
s32 pad;
this->actor.speedXZ = 1.6f;
if (!(player->stateFlags2 & 0x08000000) && !Message_GetState(&globalCtx->msgCtx)) {
if (!(player->stateFlags2 & 0x08000000) && Message_GetState(&globalCtx->msgCtx) == 0) {
if (((this->skelAnime.curFrame > 9.0f) && (this->skelAnime.curFrame < 16.0f)) ||
((this->skelAnime.curFrame > 44.0f) && (this->skelAnime.curFrame < 51.0f))) {
Actor_MoveWithGravity(&this->actor);
@ -217,7 +217,7 @@ void func_80BCF6D0(EnHg* this, GlobalContext* globalCtx) {
void func_80BCF710(EnHg* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == 0) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
func_801518B0(globalCtx, 0x24F, &this->actor);
Message_StartTextbox(globalCtx, 0x24F, &this->actor);
} else {
func_800B8614(&this->actor, globalCtx, 80.0f);
}
@ -271,11 +271,12 @@ void func_80BCF93C(EnHg* this) {
}
void func_80BCF95C(EnHg* this, GlobalContext* globalCtx) {
if (func_800EE29C(globalCtx, 0x1E4)) {
u32 actionIndex = func_800EE200(globalCtx, 0x1E4);
if (this->cutscenes[3] != globalCtx->csCtx.npcActions[actionIndex]->unk0) {
this->cutscenes[3] = globalCtx->csCtx.npcActions[actionIndex]->unk0;
switch (globalCtx->csCtx.npcActions[actionIndex]->unk0) {
if (Cutscene_CheckActorAction(globalCtx, 484)) {
s32 actionIndex = Cutscene_GetActorActionIndex(globalCtx, 484);
if (this->cutscenes[3] != globalCtx->csCtx.actorActions[actionIndex]->action) {
this->cutscenes[3] = globalCtx->csCtx.actorActions[actionIndex]->action;
switch (globalCtx->csCtx.actorActions[actionIndex]->action) {
case 1:
this->currentAnimation = 0;
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0);
@ -336,7 +337,7 @@ void func_80BCF95C(EnHg* this, GlobalContext* globalCtx) {
}
break;
}
func_800EDF24(&this->actor, globalCtx, actionIndex);
Cutscene_ActorTranslateAndYaw(&this->actor, globalCtx, actionIndex);
return;
} else if (globalCtx->csCtx.state == 0) {
func_80BCF354(this);

View File

@ -137,29 +137,29 @@ void func_80BD04E0(EnHgo* this, GlobalContext* globalCtx) {
if (Player_GetMask(globalCtx) == PLAYER_MASK_GIBDO) {
if (!(this->unk_310 & 4)) {
this->unk_310 |= 4;
func_801518B0(globalCtx, 0x15A5, &this->actor);
Message_StartTextbox(globalCtx, 0x15A5, &this->actor);
this->unk_314 = 0x15A5; // That mask is a gibdo
} else {
func_801518B0(globalCtx, 0x15A7, &this->actor);
Message_StartTextbox(globalCtx, 0x15A7, &this->actor);
this->unk_314 = 0x15A7; // can I research that mask
}
} else if (gSaveContext.playerForm == PLAYER_FORM_HUMAN) {
if (!(this->unk_310 & 1)) {
this->unk_310 |= 1;
func_801518B0(globalCtx, 0x158F, &this->actor);
Message_StartTextbox(globalCtx, 0x158F, &this->actor);
this->unk_314 = 0x158F; // Isn't this a fairy
} else {
func_801518B0(globalCtx, 0x1593, &this->actor);
Message_StartTextbox(globalCtx, 0x1593, &this->actor);
this->unk_314 = 0x1593; // Never seen a fairy this lively
}
} else {
if (!(this->unk_310 & 2)) {
this->unk_310 |= 2;
func_801518B0(globalCtx, 0x1595, &this->actor);
Message_StartTextbox(globalCtx, 0x1595, &this->actor);
this->unk_314 = 0x1595; // ghost radar is reacting
} else {
func_801518B0(globalCtx, 0x1598, &this->actor);
Message_StartTextbox(globalCtx, 0x1598, &this->actor);
this->unk_314 = 0x1598; // you seem to be similar to a ghost
}
}
@ -197,44 +197,44 @@ void func_80BD06FC(EnHgo* this, GlobalContext* globalCtx) {
if (func_80147624(globalCtx)) {
switch (this->unk_314) {
case 0x158F:
func_801518B0(globalCtx, 0x1590, &this->actor);
Message_StartTextbox(globalCtx, 0x1590, &this->actor);
this->unk_314 = 0x1590;
break;
case 0x1590:
if (gSaveContext.weekEventReg[14] & 4) {
func_801518B0(globalCtx, 0x1591, &this->actor);
Message_StartTextbox(globalCtx, 0x1591, &this->actor);
this->unk_314 = 0x1591;
break;
}
func_801518B0(globalCtx, 0x1592, &this->actor);
Message_StartTextbox(globalCtx, 0x1592, &this->actor);
this->unk_314 = 0x1592;
break;
case 0x1591:
func_801518B0(globalCtx, 0x1592, &this->actor);
Message_StartTextbox(globalCtx, 0x1592, &this->actor);
this->unk_314 = 0x1592;
break;
case 0x1593:
func_801518B0(globalCtx, 0x1594, &this->actor);
Message_StartTextbox(globalCtx, 0x1594, &this->actor);
this->unk_314 = 0x1594;
break;
case 0x1595:
func_801518B0(globalCtx, 0x1596, &this->actor);
Message_StartTextbox(globalCtx, 0x1596, &this->actor);
this->unk_314 = 0x1596;
break;
case 0x1596:
func_801518B0(globalCtx, 0x1597, &this->actor);
Message_StartTextbox(globalCtx, 0x1597, &this->actor);
this->unk_314 = 0x1597;
break;
case 0x1598:
func_801518B0(globalCtx, 0x1599, &this->actor);
Message_StartTextbox(globalCtx, 0x1599, &this->actor);
this->unk_314 = 0x1599;
break;
case 0x15A5:
func_801518B0(globalCtx, 0x15A6, &this->actor);
Message_StartTextbox(globalCtx, 0x15A6, &this->actor);
this->unk_314 = 0x15A6;
break;
case 0x15A6:
func_801518B0(globalCtx, 0x15A7, &this->actor);
Message_StartTextbox(globalCtx, 0x15A7, &this->actor);
this->unk_314 = 0x15A7;
break;
case 0x15A7:
@ -246,13 +246,13 @@ void func_80BD06FC(EnHgo* this, GlobalContext* globalCtx) {
}
s32 func_80BD0898(EnHgo* this, GlobalContext* globalCtx) {
u32 actionIndex;
s32 actionIndex;
if (func_800EE29C(globalCtx, 0x1E6)) {
actionIndex = func_800EE200(globalCtx, 0x1E6);
if (this->unk_316 != globalCtx->csCtx.npcActions[actionIndex]->unk0) {
this->unk_316 = globalCtx->csCtx.npcActions[actionIndex]->unk0;
switch (globalCtx->csCtx.npcActions[actionIndex]->unk0) {
if (Cutscene_CheckActorAction(globalCtx, 486)) {
actionIndex = Cutscene_GetActorActionIndex(globalCtx, 486);
if (this->unk_316 != globalCtx->csCtx.actorActions[actionIndex]->action) {
this->unk_316 = globalCtx->csCtx.actorActions[actionIndex]->action;
switch (globalCtx->csCtx.actorActions[actionIndex]->action) {
case 1:
this->unk_218 = 0;
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0);
@ -285,7 +285,7 @@ s32 func_80BD0898(EnHgo* this, GlobalContext* globalCtx) {
if ((Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) && (this->unk_312 == 0)) {
this->unk_312 = 1;
if ((gSaveContext.sceneSetupIndex == 0) &&
((globalCtx->csCtx.unk_12 == 2) || (globalCtx->csCtx.unk_12 == 4))) {
((globalCtx->csCtx.currentCsIndex == 2) || (globalCtx->csCtx.currentCsIndex == 4))) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_VO_GBVO02);
}
}
@ -300,7 +300,7 @@ s32 func_80BD0898(EnHgo* this, GlobalContext* globalCtx) {
}
}
func_800EDF24(&this->actor, globalCtx, actionIndex);
Cutscene_ActorTranslateAndYaw(&this->actor, globalCtx, actionIndex);
return true;
}
if ((globalCtx->csCtx.state == 0) && (((gSaveContext.weekEventReg[75]) & 0x20)) &&

View File

@ -395,7 +395,7 @@ void func_80C2077C(EnHintSkb* this, GlobalContext* globalCtx) {
this->unk_3E0 = 1;
if (this->unk_3DC == 0) {
this->unk_3DC = 1;
func_801518B0(globalCtx, 0x1147, &this->actor);
Message_StartTextbox(globalCtx, 0x1147, &this->actor);
this->unk_3E6 = 0x1147;
if (this->skelAnime.animation == &object_skb_Anim_00697C) {
globalCtx->msgCtx.msgMode = 0x44;
@ -406,7 +406,7 @@ void func_80C2077C(EnHintSkb* this, GlobalContext* globalCtx) {
}
} else {
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 11);
func_801518B0(globalCtx, 0x1148, &this->actor);
Message_StartTextbox(globalCtx, 0x1148, &this->actor);
this->unk_3E6 = 0x1148;
}
func_80C208BC(this);
@ -462,7 +462,7 @@ void func_80C208D0(EnHintSkb* this, GlobalContext* globalCtx) {
if ((this->skelAnime.animation == &object_skb_Anim_003584) &&
Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
func_801518B0(globalCtx, 0x1147, &this->actor);
Message_StartTextbox(globalCtx, 0x1147, &this->actor);
this->unk_3E6 = 0x1147;
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0);
}
@ -479,37 +479,37 @@ void func_80C20A74(EnHintSkb* this, GlobalContext* globalCtx) {
switch (params) {
case 1:
func_801518B0(globalCtx, 0x1149, &this->actor);
Message_StartTextbox(globalCtx, 0x1149, &this->actor);
this->unk_3E6 = 0x1149;
break;
case 2:
func_801518B0(globalCtx, 0x114A, &this->actor);
Message_StartTextbox(globalCtx, 0x114A, &this->actor);
this->unk_3E6 = 0x114A;
break;
case 3:
func_801518B0(globalCtx, 0x114B, &this->actor);
Message_StartTextbox(globalCtx, 0x114B, &this->actor);
this->unk_3E6 = 0x114B;
break;
case 4:
func_801518B0(globalCtx, 0x114C, &this->actor);
Message_StartTextbox(globalCtx, 0x114C, &this->actor);
this->unk_3E6 = 0x114C;
break;
case 5:
func_801518B0(globalCtx, 0x114D, &this->actor);
Message_StartTextbox(globalCtx, 0x114D, &this->actor);
this->unk_3E6 = 0x114D;
break;
case 6:
func_801518B0(globalCtx, 0x114E, &this->actor);
Message_StartTextbox(globalCtx, 0x114E, &this->actor);
this->unk_3E6 = 0x114E;
break;
default:
func_801518B0(globalCtx, 0x1149, &this->actor);
Message_StartTextbox(globalCtx, 0x1149, &this->actor);
this->unk_3E6 = 0x1149;
break;
}
@ -520,11 +520,11 @@ void func_80C20B88(EnHintSkb* this, GlobalContext* globalCtx) {
if (globalCtx->msgCtx.choiceIndex == 0) {
func_8019F208();
this->unk_3E8 |= 0x10;
func_801518B0(globalCtx, 0x1150, &this->actor);
Message_StartTextbox(globalCtx, 0x1150, &this->actor);
this->unk_3E6 = 0x1150;
} else {
func_8019F230();
func_801518B0(globalCtx, 0x1152, &this->actor);
Message_StartTextbox(globalCtx, 0x1152, &this->actor);
this->unk_3E6 = 0x1152;
}
}
@ -537,7 +537,7 @@ void func_80C20C24(EnHintSkb* this, GlobalContext* globalCtx) {
switch (this->unk_3E6) {
case 0x1147:
func_801518B0(globalCtx, 0x1148, &this->actor);
Message_StartTextbox(globalCtx, 0x1148, &this->actor);
this->unk_3E6 = 0x1148;
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 11);
break;
@ -552,17 +552,17 @@ void func_80C20C24(EnHintSkb* this, GlobalContext* globalCtx) {
case 0x114C:
case 0x114D:
case 0x114E:
func_801518B0(globalCtx, 0x114F, &this->actor);
Message_StartTextbox(globalCtx, 0x114F, &this->actor);
this->unk_3E6 = 0x114F;
break;
case 0x1152:
func_801518B0(globalCtx, 0x1151, &this->actor);
Message_StartTextbox(globalCtx, 0x1151, &this->actor);
this->unk_3E6 = 0x1151;
break;
case 0x1150:
func_801518B0(globalCtx, 0x1151, &this->actor);
Message_StartTextbox(globalCtx, 0x1151, &this->actor);
this->unk_3E6 = 0x1151;
break;

View File

@ -1215,7 +1215,7 @@ s32 func_808F5728(GlobalContext* globalCtx, EnIn* this, s32 arg2, s32* arg3) {
return 0;
}
if (*arg3 == 2) {
func_801518B0(globalCtx, this->actor.textId, &this->actor);
Message_StartTextbox(globalCtx, this->actor.textId, &this->actor);
*arg3 = 1;
return 0;
}

View File

@ -1350,7 +1350,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, &this->actor);
Message_StartTextbox(globalCtx, arg2, &this->actor);
}
void func_80B45648(EnInvadepoh* this) {

View File

@ -349,7 +349,7 @@ void EnJg_Idle(EnJg* this, GlobalContext* globalCtx) {
void EnJg_GoronShrineIdle(EnJg* this, GlobalContext* globalCtx) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->flags |= FLAG_LOOKING_AT_PLAYER;
func_801518B0(globalCtx, this->textId, &this->actor);
Message_StartTextbox(globalCtx, this->textId, &this->actor);
this->actionFunc = EnJg_GoronShrineTalk;
} else if ((this->actor.xzDistToPlayer < 100.0f) || (this->actor.isTargeted)) {
func_800B863C(&this->actor, globalCtx);
@ -367,7 +367,7 @@ void EnJg_GoronShrineTalk(EnJg* this, GlobalContext* globalCtx) {
this->actionFunc = EnJg_GoronShrineIdle;
} else {
this->textId = EnJg_GetNextTextId(this);
func_801518B0(globalCtx, this->textId, &this->actor);
Message_StartTextbox(globalCtx, this->textId, &this->actor);
}
}
}
@ -504,7 +504,7 @@ void EnJg_Talk(EnJg* this, GlobalContext* globalCtx) {
(CHECK_QUEST_ITEM(QUEST_SONG_LULLABY) || CHECK_QUEST_ITEM(QUEST_SONG_LULLABY_INTRO))) {
// The player already has the Lullaby or Lullaby Intro, so say "I'm counting on you"
this->textId = EnJg_GetNextTextId(this);
func_801518B0(globalCtx, this->textId, &this->actor);
Message_StartTextbox(globalCtx, this->textId, &this->actor);
this->actionFunc = EnJg_SetupTalk;
} else {
// To get to this point, the player *has* talked to the Goron Child, but doesn't
@ -522,7 +522,7 @@ void EnJg_Talk(EnJg* this, GlobalContext* globalCtx) {
}
} else {
this->textId = EnJg_GetNextTextId(this);
func_801518B0(globalCtx, this->textId, &this->actor);
Message_StartTextbox(globalCtx, this->textId, &this->actor);
this->actionFunc = EnJg_SetupTalk;
}
}
@ -591,7 +591,7 @@ void EnJg_FrozenIdle(EnJg* this, GlobalContext* globalCtx) {
}
} else {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
func_801518B0(globalCtx, 0x236, &this->actor); // The old Goron is frozen solid!
Message_StartTextbox(globalCtx, 0x236, &this->actor); // The old Goron is frozen solid!
this->actionFunc = EnJg_EndFrozenInteraction;
} else if (this->actor.isTargeted) {
func_800B863C(&this->actor, globalCtx);
@ -622,13 +622,13 @@ void EnJg_TeachLullabyIntro(EnJg* this, GlobalContext* globalCtx) {
void EnJg_LullabyIntroCutsceneAction(EnJg* this, GlobalContext* globalCtx) {
s32 pad;
if (func_800EE29C(globalCtx, 0x1D6)) {
u32 actionIndex = func_800EE200(globalCtx, 0x1D6);
if (Cutscene_CheckActorAction(globalCtx, 470)) {
s32 actionIndex = Cutscene_GetActorActionIndex(globalCtx, 470);
if (this->csAction != globalCtx->csCtx.npcActions[actionIndex]->unk0) {
this->csAction = globalCtx->csCtx.npcActions[actionIndex]->unk0;
if (this->csAction != globalCtx->csCtx.actorActions[actionIndex]->action) {
this->csAction = globalCtx->csCtx.actorActions[actionIndex]->action;
switch (globalCtx->csCtx.npcActions[actionIndex]->unk0) {
switch (globalCtx->csCtx.actorActions[actionIndex]->action) {
case 1:
this->cutsceneAnimationIndex = EN_JG_ANIMATION_CUTSCENE_IDLE;
if (this->drum != NULL) {
@ -913,7 +913,7 @@ void EnJg_CheckIfTalkingToPlayerAndHandleFreezeTimer(EnJg* this, GlobalContext*
gSaveContext.weekEventReg[24] |= 0x10;
}
func_801518B0(globalCtx, this->textId, &this->actor);
Message_StartTextbox(globalCtx, this->textId, &this->actor);
this->actionFunc = EnJg_SetupTalk;
} else {
if ((this->actor.xzDistToPlayer < 100.0f) || (this->actor.isTargeted)) {
@ -949,7 +949,7 @@ void EnJg_Init(Actor* thisx, GlobalContext* globalCtx) {
if (!EN_JG_IS_IN_GORON_SHRINE(thisx)) {
if ((globalCtx->sceneNum == SCENE_SPOT00) && (gSaveContext.sceneSetupIndex == 7) &&
(globalCtx->csCtx.unk_12 == 0)) {
(globalCtx->csCtx.currentCsIndex == 0)) {
// This is the elder that appears in the cutscene for learning the full Goron Lullaby.
this->animationIndex = EN_JG_ANIMATION_IDLE;
this->action = EN_JG_ACTION_LULLABY_INTRO_CS;

View File

@ -549,7 +549,7 @@ void EnKakasi_RegularDialogue(EnKakasi* this, GlobalContext* globalCtx) {
void EnKakasi_SetupSongTeach(EnKakasi* this, GlobalContext* globalCtx) {
this->actor.textId = 0x1646;
func_801518B0(globalCtx, this->actor.textId, &this->actor);
Message_StartTextbox(globalCtx, this->actor.textId, &this->actor);
this->cutsceneCamId = CAM_ID_MAIN;
this->unk20C = 0.0f;
this->unk210 = 60.0f;
@ -682,7 +682,7 @@ void EnKakasi_PostSongLearnDialogue(EnKakasi* this, GlobalContext* globalCtx) {
func_801477B4(globalCtx);
func_800B7298(globalCtx, &this->actor, 0x56);
this->actor.textId = 0x1648;
func_801518B0(globalCtx, (this->actor.textId), &this->actor);
Message_StartTextbox(globalCtx, (this->actor.textId), &this->actor);
this->unkState1A8 = 0;
this->unk190 = 1;
}

View File

@ -164,7 +164,7 @@ void func_80B2654C(EnKendoJs* this, GlobalContext* globalCtx) {
}
if (ENKENDOJS_GET_FF(&this->actor) == ENKENDOJS_FF_1) {
func_801518B0(globalCtx, 0x273C, &this->actor);
Message_StartTextbox(globalCtx, 0x273C, &this->actor);
this->unk_288 = 0x273C;
} else if (gSaveContext.playerForm != PLAYER_FORM_HUMAN) {
switch (gSaveContext.playerForm) {
@ -185,14 +185,14 @@ void func_80B2654C(EnKendoJs* this, GlobalContext* globalCtx) {
break;
}
func_801518B0(globalCtx, D_80B27CE0[phi_v0][sp30], &this->actor);
Message_StartTextbox(globalCtx, D_80B27CE0[phi_v0][sp30], &this->actor);
this->unk_288 = D_80B27CE0[phi_v0][sp30];
} else if ((Player_GetMask(globalCtx) != PLAYER_MASK_NONE) && (Player_GetMask(globalCtx) < PLAYER_MASK_GIANT)) {
u16 sp2E = Player_GetMask(globalCtx) + 0x273C;
if (0) {}
func_801518B0(globalCtx, sp2E, &this->actor);
Message_StartTextbox(globalCtx, sp2E, &this->actor);
this->unk_288 = sp2E;
} else {
if (this->unk_28A == 0) {
@ -201,7 +201,7 @@ void func_80B2654C(EnKendoJs* this, GlobalContext* globalCtx) {
} else {
phi_v0 = 1;
}
func_801518B0(globalCtx, D_80B27CF4[phi_v0][sp30], &this->actor);
Message_StartTextbox(globalCtx, D_80B27CF4[phi_v0][sp30], &this->actor);
this->unk_288 = D_80B27CF4[phi_v0][sp30];
}
@ -217,17 +217,17 @@ void func_80B26758(EnKendoJs* this, GlobalContext* globalCtx) {
case 0:
if (CUR_EQUIP_VALUE_VOID(EQUIP_SWORD) == EQUIP_SWORD) {
play_sound(NA_SE_SY_ERROR);
func_801518B0(globalCtx, 0x272C, &this->actor);
Message_StartTextbox(globalCtx, 0x272C, &this->actor);
this->unk_288 = 0x272C;
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 2);
} else if (gSaveContext.rupees < globalCtx->msgCtx.unk1206C) {
play_sound(NA_SE_SY_ERROR);
func_801518B0(globalCtx, 0x2718, &this->actor);
Message_StartTextbox(globalCtx, 0x2718, &this->actor);
this->unk_288 = 0x2718;
} else {
func_8019F208();
func_801159EC(-globalCtx->msgCtx.unk1206C);
func_801518B0(globalCtx, 0x2719, &this->actor);
Message_StartTextbox(globalCtx, 0x2719, &this->actor);
this->unk_288 = 0x2719;
}
break;
@ -235,24 +235,24 @@ void func_80B26758(EnKendoJs* this, GlobalContext* globalCtx) {
case 1:
if (CUR_EQUIP_VALUE_VOID(EQUIP_SWORD) == EQUIP_SWORD) {
play_sound(NA_SE_SY_ERROR);
func_801518B0(globalCtx, 0x272C, &this->actor);
Message_StartTextbox(globalCtx, 0x272C, &this->actor);
this->unk_288 = 0x272C;
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 2);
} else if (gSaveContext.rupees < globalCtx->msgCtx.unk12070) {
play_sound(NA_SE_SY_ERROR);
func_801518B0(globalCtx, 0x2718, &this->actor);
Message_StartTextbox(globalCtx, 0x2718, &this->actor);
this->unk_288 = 0x2718;
} else {
func_8019F208();
func_801159EC(-globalCtx->msgCtx.unk12070);
func_801518B0(globalCtx, 0x273A, &this->actor);
Message_StartTextbox(globalCtx, 0x273A, &this->actor);
this->unk_288 = 0x273A;
}
break;
case 2:
func_8019F230();
func_801518B0(globalCtx, 0x2717, &this->actor);
Message_StartTextbox(globalCtx, 0x2717, &this->actor);
this->unk_288 = 0x2717;
}
}
@ -272,7 +272,7 @@ void func_80B269A4(EnKendoJs* this, GlobalContext* globalCtx) {
case 0x2713:
case 0x2714:
case 0x2715:
func_801518B0(globalCtx, 0x2716, &this->actor);
Message_StartTextbox(globalCtx, 0x2716, &this->actor);
this->unk_288 = 0x2716;
break;
@ -288,7 +288,7 @@ void func_80B269A4(EnKendoJs* this, GlobalContext* globalCtx) {
break;
case 0x273A:
func_801518B0(globalCtx, 0x273B, &this->actor);
Message_StartTextbox(globalCtx, 0x273B, &this->actor);
this->unk_288 = 0x273B;
break;
@ -433,13 +433,13 @@ s32 func_80B26BF8(EnKendoJs* this, GlobalContext* globalCtx) {
}
void func_80B26EB4(EnKendoJs* this, GlobalContext* globalCtx) {
func_801518B0(globalCtx, D_80B27D00[this->unk_284], &this->actor);
Message_StartTextbox(globalCtx, D_80B27D00[this->unk_284], &this->actor);
this->unk_288 = D_80B27D00[this->unk_284];
this->unk_284++;
}
void func_80B26F14(EnKendoJs* this, GlobalContext* globalCtx) {
func_801518B0(globalCtx, D_80B27D10[this->unk_284], &this->actor);
Message_StartTextbox(globalCtx, D_80B27D10[this->unk_284], &this->actor);
this->unk_288 = D_80B27D10[this->unk_284];
}
@ -449,7 +449,7 @@ s32 func_80B26F6C(EnKendoJs* this, GlobalContext* globalCtx) {
switch (this->unk_288) {
case 0x271D:
if (func_80124190(player)) {
func_801518B0(globalCtx, 0x272A, &this->actor);
Message_StartTextbox(globalCtx, 0x272A, &this->actor);
this->unk_288 = 0x272A;
return true;
}
@ -457,7 +457,7 @@ s32 func_80B26F6C(EnKendoJs* this, GlobalContext* globalCtx) {
case 0x2721:
if (this->unk_292 != 0) {
func_801518B0(globalCtx, 0x272B, &this->actor);
Message_StartTextbox(globalCtx, 0x272B, &this->actor);
this->unk_288 = 0x272B;
return true;
}
@ -482,7 +482,7 @@ void func_80B27030(EnKendoJs* this, GlobalContext* globalCtx) {
this->actor.flags &= ~ACTOR_FLAG_10000;
player->stateFlags1 &= ~0x20;
func_80B279F0(this, globalCtx, 0);
func_801518B0(globalCtx, 0x271A, &this->actor);
Message_StartTextbox(globalCtx, 0x271A, &this->actor);
this->unk_288 = 0x271A;
func_80B26AE8(this);
} else {
@ -531,7 +531,7 @@ void func_80B27188(EnKendoJs* this, GlobalContext* globalCtx) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_SY_ERROR);
this->unk_286 = 0;
player->stateFlags1 |= 0x20;
func_801518B0(globalCtx, 0x2729, &this->actor);
Message_StartTextbox(globalCtx, 0x2729, &this->actor);
this->unk_288 = 0x2729;
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 2);
break;
@ -586,10 +586,10 @@ void func_80B274BC(EnKendoJs* this, GlobalContext* globalCtx) {
if (this->unk_290 >= 140) {
if (this->unk_284 == 5) {
if (gSaveContext.minigameScore == 30) {
func_801518B0(globalCtx, 0x272D, &this->actor);
Message_StartTextbox(globalCtx, 0x272D, &this->actor);
this->unk_288 = 0x272D;
} else {
func_801518B0(globalCtx, 0x272E, &this->actor);
Message_StartTextbox(globalCtx, 0x272E, &this->actor);
this->unk_288 = 0x272E;
}
player->stateFlags1 |= 0x20;
@ -652,10 +652,10 @@ void func_80B27774(EnKendoJs* this, GlobalContext* globalCtx) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
if (!(gSaveContext.weekEventReg[63] & 0x20)) {
gSaveContext.weekEventReg[63] |= 0x20;
func_801518B0(globalCtx, 0x272F, &this->actor);
Message_StartTextbox(globalCtx, 0x272F, &this->actor);
this->unk_288 = 0x272F;
} else {
func_801518B0(globalCtx, 0x2730, &this->actor);
Message_StartTextbox(globalCtx, 0x2730, &this->actor);
this->unk_288 = 0x2730;
}
func_80B26AE8(this);

View File

@ -62,7 +62,7 @@ void EnKgy_Init(Actor* thisx, GlobalContext* globalCtx) {
Flags_UnsetSwitch(globalCtx, ENKGY_GET_FE00(&this->actor) + 1);
if (Flags_GetSwitch(globalCtx, ENKGY_GET_FE00(&this->actor)) || (gSaveContext.weekEventReg[33] & 0x80)) {
Flags_SetSwitch(globalCtx, ENKGY_GET_FE00(&this->actor) + 1);
globalCtx->envCtx.unk_C3 = 1;
globalCtx->envCtx.lightSettingOverride = 1;
gSaveContext.weekEventReg[21] |= 1;
if (!func_80B40D64(globalCtx)) {
EnKgy_ChangeAnim(this, 4, 0, 0);

View File

@ -209,7 +209,7 @@ void EnMa4_Init(Actor* thisx, GlobalContext* globalCtx) {
this->hasBow = false;
}
if (func_800EE1D8(globalCtx) != 0) { // if (sceneSetupIndex != 0)
if (Cutscene_GetSceneSetupIndex(globalCtx) != 0) { // if (sceneSetupIndex != 0)
EnMa4_ChangeAnim(this, 0);
this->state = MA4_STATE_HORSEBACKGAME;
EnMa4_InitHorsebackGame(this, globalCtx);
@ -362,11 +362,11 @@ void EnMa4_HandlePlayerChoice(EnMa4* this, GlobalContext* globalCtx) {
case 0x3339:
if (globalCtx->msgCtx.choiceIndex == 0) {
func_8019F208();
func_801518B0(globalCtx, 0x333A, &this->actor);
Message_StartTextbox(globalCtx, 0x333A, &this->actor);
this->textId = 0x333A;
} else {
func_8019F208();
func_801518B0(globalCtx, 0x333B, &this->actor);
Message_StartTextbox(globalCtx, 0x333B, &this->actor);
this->textId = 0x333B;
}
break;
@ -375,12 +375,12 @@ void EnMa4_HandlePlayerChoice(EnMa4* this, GlobalContext* globalCtx) {
if (globalCtx->msgCtx.choiceIndex == 0) {
func_8019F208();
gSaveContext.weekEventReg[21] |= 0x20;
func_801518B0(globalCtx, 0x3343, &this->actor);
Message_StartTextbox(globalCtx, 0x3343, &this->actor);
this->textId = 0x3343;
} else {
func_8019F230();
EnMa4_SetFaceExpression(this, 0, 1);
func_801518B0(globalCtx, 0x3342, &this->actor);
Message_StartTextbox(globalCtx, 0x3342, &this->actor);
this->textId = 0x3342;
this->state = MA4_STATE_DEFAULT;
func_80151BB4(globalCtx, 5);
@ -391,12 +391,12 @@ void EnMa4_HandlePlayerChoice(EnMa4* this, GlobalContext* globalCtx) {
if (globalCtx->msgCtx.choiceIndex == 0) {
func_8019F208();
gSaveContext.weekEventReg[21] |= 0x20;
func_801518B0(globalCtx, 0x3343, &this->actor);
Message_StartTextbox(globalCtx, 0x3343, &this->actor);
this->textId = 0x3343;
} else {
func_8019F230();
EnMa4_SetFaceExpression(this, 0, 1);
func_801518B0(globalCtx, 0x3342, &this->actor);
Message_StartTextbox(globalCtx, 0x3342, &this->actor);
this->textId = 0x3342;
}
break;
@ -404,11 +404,11 @@ void EnMa4_HandlePlayerChoice(EnMa4* this, GlobalContext* globalCtx) {
case 0x3347:
if (globalCtx->msgCtx.choiceIndex == 0) {
func_8019F208();
func_801518B0(globalCtx, 0x3349, &this->actor);
Message_StartTextbox(globalCtx, 0x3349, &this->actor);
this->textId = 0x3349;
} else {
func_8019F230();
func_801518B0(globalCtx, 0x3348, &this->actor);
Message_StartTextbox(globalCtx, 0x3348, &this->actor);
this->textId = 0x3348;
func_80151BB4(globalCtx, 5);
}
@ -419,7 +419,7 @@ void EnMa4_HandlePlayerChoice(EnMa4* this, GlobalContext* globalCtx) {
s32 aux;
func_8019F208();
func_801518B0(globalCtx, 0x334E, &this->actor);
Message_StartTextbox(globalCtx, 0x334E, &this->actor);
this->textId = 0x334E;
if (CHECK_QUEST_ITEM(QUEST_SONG_EPONA)) {
func_80151BB4(globalCtx, 0x1C);
@ -428,7 +428,7 @@ void EnMa4_HandlePlayerChoice(EnMa4* this, GlobalContext* globalCtx) {
} else { // No.
func_8019F230();
EnMa4_SetFaceExpression(this, 0, 0);
func_801518B0(globalCtx, 0x334C, &this->actor);
Message_StartTextbox(globalCtx, 0x334C, &this->actor);
this->textId = 0x334C;
}
break;
@ -436,12 +436,12 @@ void EnMa4_HandlePlayerChoice(EnMa4* this, GlobalContext* globalCtx) {
case 0x3354:
if (globalCtx->msgCtx.choiceIndex == 0) {
func_8019F208();
func_801518B0(globalCtx, 0x3349, &this->actor);
Message_StartTextbox(globalCtx, 0x3349, &this->actor);
this->textId = 0x3349;
} else {
func_8019F230();
EnMa4_SetFaceExpression(this, 1, 0);
func_801518B0(globalCtx, 0x3355, &this->actor);
Message_StartTextbox(globalCtx, 0x3355, &this->actor);
this->textId = 0x3355;
func_80151BB4(globalCtx, 5);
}
@ -457,13 +457,13 @@ void EnMa4_HandlePlayerChoice(EnMa4* this, GlobalContext* globalCtx) {
if (this->type == MA4_TYPE_ALIENS_DEFEATED) {
func_8019F230();
EnMa4_SetFaceExpression(this, 3, 3);
func_801518B0(globalCtx, 0x3357, &this->actor);
Message_StartTextbox(globalCtx, 0x3357, &this->actor);
this->textId = 0x3357;
func_80151BB4(globalCtx, 5);
} else {
func_8019F230();
EnMa4_SetFaceExpression(this, 4, 2);
func_801518B0(globalCtx, 0x335B, &this->actor);
Message_StartTextbox(globalCtx, 0x335B, &this->actor);
this->textId = 0x335B;
func_80151BB4(globalCtx, 5);
}
@ -473,12 +473,12 @@ void EnMa4_HandlePlayerChoice(EnMa4* this, GlobalContext* globalCtx) {
case 0x3359:
if (globalCtx->msgCtx.choiceIndex == 0) {
func_8019F208();
func_801518B0(globalCtx, 0x3349, &this->actor);
Message_StartTextbox(globalCtx, 0x3349, &this->actor);
this->textId = 0x3349;
} else {
func_8019F230();
EnMa4_SetFaceExpression(this, 4, 2);
func_801518B0(globalCtx, 0x335A, &this->actor);
Message_StartTextbox(globalCtx, 0x335A, &this->actor);
this->textId = 0x335A;
func_80151BB4(globalCtx, 5);
}
@ -500,31 +500,31 @@ void EnMa4_ChooseNextDialogue(EnMa4* this, GlobalContext* globalCtx) {
case 0x3335:
EnMa4_SetFaceExpression(this, 0, 3);
func_801518B0(globalCtx, 0x3336, &this->actor);
Message_StartTextbox(globalCtx, 0x3336, &this->actor);
this->textId = 0x3336;
func_80151BB4(globalCtx, 5);
break;
case 0x3338:
func_801518B0(globalCtx, 0x3339, &this->actor);
Message_StartTextbox(globalCtx, 0x3339, &this->actor);
this->textId = 0x3339;
break;
case 0x333A:
case 0x333B:
EnMa4_SetFaceExpression(this, 0, 3);
func_801518B0(globalCtx, 0x333C, &this->actor);
Message_StartTextbox(globalCtx, 0x333C, &this->actor);
this->textId = 0x333C;
break;
case 0x333C:
EnMa4_SetFaceExpression(this, 0, 2);
func_801518B0(globalCtx, 0x333D, &this->actor);
Message_StartTextbox(globalCtx, 0x333D, &this->actor);
this->textId = 0x333D;
break;
case 0x333D:
func_801518B0(globalCtx, 0x333E, &this->actor);
Message_StartTextbox(globalCtx, 0x333E, &this->actor);
this->textId = 0x333E;
break;
@ -534,34 +534,34 @@ void EnMa4_ChooseNextDialogue(EnMa4* this, GlobalContext* globalCtx) {
break;
case 0x333F:
func_801518B0(globalCtx, 0x3340, &this->actor);
Message_StartTextbox(globalCtx, 0x3340, &this->actor);
this->textId = 0x3340;
break;
case 0x3340:
EnMa4_SetFaceExpression(this, 0, 3);
func_801518B0(globalCtx, 0x3341, &this->actor);
Message_StartTextbox(globalCtx, 0x3341, &this->actor);
this->textId = 0x3341;
break;
case 0x3343:
EnMa4_SetFaceExpression(this, 0, 0);
func_801518B0(globalCtx, 0x3344, &this->actor);
Message_StartTextbox(globalCtx, 0x3344, &this->actor);
this->textId = 0x3344;
break;
case 0x3344:
func_801518B0(globalCtx, 0x3345, &this->actor);
Message_StartTextbox(globalCtx, 0x3345, &this->actor);
this->textId = 0x3345;
break;
case 0x3345:
func_801518B0(globalCtx, 0x3349, &this->actor);
Message_StartTextbox(globalCtx, 0x3349, &this->actor);
this->textId = 0x3349;
break;
case 0x3349:
func_801518B0(globalCtx, 0x334A, &this->actor);
Message_StartTextbox(globalCtx, 0x334A, &this->actor);
this->textId = 0x334A;
break;
@ -571,7 +571,7 @@ void EnMa4_ChooseNextDialogue(EnMa4* this, GlobalContext* globalCtx) {
break;
case 0x334C:
func_801518B0(globalCtx, 0x334D, &this->actor);
Message_StartTextbox(globalCtx, 0x334D, &this->actor);
this->textId = 0x334D;
break;
@ -580,10 +580,10 @@ void EnMa4_ChooseNextDialogue(EnMa4* this, GlobalContext* globalCtx) {
case 0x335D:
case 0x335E:
if (this->type == MA4_TYPE_DAY1) {
func_801518B0(globalCtx, 0x3352, &this->actor);
Message_StartTextbox(globalCtx, 0x3352, &this->actor);
this->textId = 0x3352;
} else {
func_801518B0(globalCtx, 0x3356, &this->actor);
Message_StartTextbox(globalCtx, 0x3356, &this->actor);
this->textId = 0x3356;
}
break;
@ -594,7 +594,7 @@ void EnMa4_ChooseNextDialogue(EnMa4* this, GlobalContext* globalCtx) {
// Check if player has Epona's song
if (CHECK_QUEST_ITEM(QUEST_SONG_EPONA)) {
func_801518B0(globalCtx, 0x334C, &this->actor);
Message_StartTextbox(globalCtx, 0x334C, &this->actor);
this->textId = 0x334C;
} else {
func_801477B4(globalCtx);
@ -606,11 +606,11 @@ void EnMa4_ChooseNextDialogue(EnMa4* this, GlobalContext* globalCtx) {
case 0x3358:
if ((gSaveContext.playerForm != PLAYER_FORM_HUMAN) || !(CHECK_QUEST_ITEM(QUEST_SONG_EPONA))) {
func_801518B0(globalCtx, 0x335C, &this->actor);
Message_StartTextbox(globalCtx, 0x335C, &this->actor);
this->textId = 0x335C;
func_80151BB4(globalCtx, 5);
} else {
func_801518B0(globalCtx, 0x3359, &this->actor);
Message_StartTextbox(globalCtx, 0x3359, &this->actor);
this->textId = 0x3359;
}
break;
@ -676,7 +676,7 @@ void EnMa4_BeginHorsebackGame(EnMa4* this, GlobalContext* globalCtx) {
void EnMa4_HorsebackGameCheckPlayerInteractions(EnMa4* this, GlobalContext* globalCtx) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
// "You're feeling confident"
func_801518B0(globalCtx, 0x336E, &this->actor);
Message_StartTextbox(globalCtx, 0x336E, &this->actor);
this->actionFunc = EnMa4_HorsebackGameTalking;
} else if ((gSaveContext.unk_3DE0[4] < 115 * 100)) { // timer < 115 seconds
func_800B8614(&this->actor, globalCtx, 100.0f);
@ -749,10 +749,10 @@ void EnMa4_HorsebackGameEnd(EnMa4* this, GlobalContext* globalCtx) {
if (sFrameCounter == 25) {
if (this->poppedBalloonCounter == 10) {
func_801518B0(globalCtx, 0x334F, &this->actor);
Message_StartTextbox(globalCtx, 0x334F, &this->actor);
this->textId = 0x334F;
} else {
func_801518B0(globalCtx, 0x334B, &this->actor);
Message_StartTextbox(globalCtx, 0x334B, &this->actor);
this->textId = 0x334B;
}
} else if (sFrameCounter == 50) {
@ -802,15 +802,15 @@ void EnMa4_SetupEponasSongCs(EnMa4* this) {
static u16 D_80AC0260 = 99;
void EnMa4_EponasSongCs(EnMa4* this, GlobalContext* globalCtx) {
if (func_800EE29C(globalCtx, 0x78) != 0) {
u32 actionIndex = func_800EE200(globalCtx, 0x78);
if (Cutscene_CheckActorAction(globalCtx, 120)) {
s32 actionIndex = Cutscene_GetActorActionIndex(globalCtx, 120);
if (globalCtx->csCtx.frames == globalCtx->csCtx.npcActions[actionIndex]->startFrame) {
if (globalCtx->csCtx.npcActions[actionIndex]->unk0 != D_80AC0260) {
D_80AC0260 = globalCtx->csCtx.npcActions[actionIndex]->unk0;
if (globalCtx->csCtx.frames == globalCtx->csCtx.actorActions[actionIndex]->startFrame) {
if (globalCtx->csCtx.actorActions[actionIndex]->action != D_80AC0260) {
D_80AC0260 = globalCtx->csCtx.actorActions[actionIndex]->action;
this->animTimer = 0;
switch (globalCtx->csCtx.npcActions[actionIndex]->unk0) {
switch (globalCtx->csCtx.actorActions[actionIndex]->action) {
case 1:
this->hasBow = true;
EnMa4_ChangeAnim(this, 1);
@ -824,7 +824,7 @@ void EnMa4_EponasSongCs(EnMa4* this, GlobalContext* globalCtx) {
}
}
func_800EDF24(&this->actor, globalCtx, actionIndex);
Cutscene_ActorTranslateAndYaw(&this->actor, globalCtx, actionIndex);
if (D_80AC0260 == 2 && this->animTimer == 0 && Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
EnMa4_ChangeAnim(this, 7);
}
@ -849,7 +849,7 @@ void EnMa4_EndEponasSongCs(EnMa4* this, GlobalContext* globalCtx) {
this->actor.flags |= ACTOR_FLAG_10000;
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state) != 0) {
player->stateFlags1 &= ~0x20;
func_801518B0(globalCtx, 0x334C, &this->actor);
Message_StartTextbox(globalCtx, 0x334C, &this->actor);
this->textId = 0x334C;
this->actor.flags &= ~ACTOR_FLAG_10000;
EnMa4_SetupDialogueHandler(this);
@ -879,25 +879,25 @@ void EnMa4_StartDialogue(EnMa4* this, GlobalContext* globalCtx) {
if (gSaveContext.playerForm != PLAYER_FORM_HUMAN) {
if ((gSaveContext.weekEventReg[21] & 0x80)) {
EnMa4_SetFaceExpression(this, 3, 3);
func_801518B0(globalCtx, 0x3337, &this->actor);
Message_StartTextbox(globalCtx, 0x3337, &this->actor);
this->textId = 0x3337;
func_80151BB4(globalCtx, 5);
} else {
func_801518B0(globalCtx, 0x3335, &this->actor);
Message_StartTextbox(globalCtx, 0x3335, &this->actor);
this->textId = 0x3335;
gSaveContext.weekEventReg[21] |= 0x80;
}
} else if (this->state == MA4_STATE_DEFAULT) {
if ((gSaveContext.weekEventReg[21] & 0x40)) {
if (!(gSaveContext.weekEventReg[21] & 0x20)) {
func_801518B0(globalCtx, 0x3346, &this->actor);
Message_StartTextbox(globalCtx, 0x3346, &this->actor);
this->textId = 0x3346;
} else {
func_801518B0(globalCtx, 0x3347, &this->actor);
Message_StartTextbox(globalCtx, 0x3347, &this->actor);
this->textId = 0x3347;
}
} else {
func_801518B0(globalCtx, 0x3338, &this->actor);
Message_StartTextbox(globalCtx, 0x3338, &this->actor);
this->textId = 0x3338;
gSaveContext.weekEventReg[21] |= 0x40;
}
@ -905,7 +905,7 @@ void EnMa4_StartDialogue(EnMa4* this, GlobalContext* globalCtx) {
if (gSaveContext.unk_3DE0[4] >= 2 * 60 * 100) {
// "Too bad Grasshopper"
EnMa4_SetFaceExpression(this, 0, 0);
func_801518B0(globalCtx, 0x336D, &this->actor);
Message_StartTextbox(globalCtx, 0x336D, &this->actor);
this->textId = 0x336D;
} else {
time = gSaveContext.unk_3DE0[4];
@ -913,11 +913,11 @@ void EnMa4_StartDialogue(EnMa4* this, GlobalContext* globalCtx) {
// [Score] New record!
gSaveContext.horseBackBalloonHighScore = time;
EnMa4_SetFaceExpression(this, 0, 3);
func_801518B0(globalCtx, 0x3350, &this->actor);
Message_StartTextbox(globalCtx, 0x3350, &this->actor);
this->textId = 0x3350;
} else {
// [Score] Great.
func_801518B0(globalCtx, 0x3351, &this->actor);
Message_StartTextbox(globalCtx, 0x3351, &this->actor);
this->textId = 0x3351;
}
}
@ -925,7 +925,7 @@ void EnMa4_StartDialogue(EnMa4* this, GlobalContext* globalCtx) {
this->actor.flags &= ~ACTOR_FLAG_10000;
} else if (this->state == MA4_STATE_AFTERDESCRIBETHEMCS) {
// "Cremia doesn't believe me..."
func_801518B0(globalCtx, 0x3340, &this->actor);
Message_StartTextbox(globalCtx, 0x3340, &this->actor);
this->textId = 0x3340;
this->actor.flags &= ~ACTOR_FLAG_10000;
}
@ -935,31 +935,31 @@ void EnMa4_StartDialogue(EnMa4* this, GlobalContext* globalCtx) {
if (gSaveContext.playerForm != PLAYER_FORM_HUMAN) {
if ((gSaveContext.weekEventReg[21] & 0x80)) {
EnMa4_SetFaceExpression(this, 3, 3);
func_801518B0(globalCtx, 0x3337, &this->actor);
Message_StartTextbox(globalCtx, 0x3337, &this->actor);
this->textId = 0x3337;
func_80151BB4(globalCtx, 5);
} else {
func_801518B0(globalCtx, 0x3335, &this->actor);
Message_StartTextbox(globalCtx, 0x3335, &this->actor);
this->textId = 0x3335;
gSaveContext.weekEventReg[21] |= 0x80;
}
} else if (this->state == MA4_STATE_DEFAULT) {
func_801518B0(globalCtx, 0x3354, &this->actor);
Message_StartTextbox(globalCtx, 0x3354, &this->actor);
this->textId = 0x3354;
} else if (this->state == MA4_STATE_AFTERHORSEBACKGAME) {
if (gSaveContext.unk_3DE0[4] >= 2 * 60 * 100) {
// "Try again?"
func_801518B0(globalCtx, 0x3356, &this->actor);
Message_StartTextbox(globalCtx, 0x3356, &this->actor);
this->textId = 0x3356;
} else {
time = gSaveContext.unk_3DE0[4];
if ((s32)time < (s32)gSaveContext.horseBackBalloonHighScore) {
gSaveContext.horseBackBalloonHighScore = time;
EnMa4_SetFaceExpression(this, 0, 3);
func_801518B0(globalCtx, 0x3350, &this->actor);
Message_StartTextbox(globalCtx, 0x3350, &this->actor);
this->textId = 0x3350;
} else {
func_801518B0(globalCtx, 0x3351, &this->actor);
Message_StartTextbox(globalCtx, 0x3351, &this->actor);
this->textId = 0x3351;
}
}
@ -971,23 +971,23 @@ void EnMa4_StartDialogue(EnMa4* this, GlobalContext* globalCtx) {
case MA4_TYPE_ALIENS_WON:
if (this->state == MA4_STATE_DEFAULT) {
// "Huh... You?"
func_801518B0(globalCtx, 0x3358, &this->actor);
Message_StartTextbox(globalCtx, 0x3358, &this->actor);
this->textId = 0x3358;
} else if (this->state == MA4_STATE_AFTERHORSEBACKGAME) {
if (gSaveContext.unk_3DE0[4] >= 2 * 60 * 100) {
// "Try again?"
func_801518B0(globalCtx, 0x3356, &this->actor);
Message_StartTextbox(globalCtx, 0x3356, &this->actor);
this->textId = 0x3356;
} else {
time = gSaveContext.unk_3DE0[4];
if ((s32)time < (s32)gSaveContext.horseBackBalloonHighScore) {
// New record
gSaveContext.horseBackBalloonHighScore = time;
func_801518B0(globalCtx, 0x335D, &this->actor);
Message_StartTextbox(globalCtx, 0x335D, &this->actor);
this->textId = 0x335D;
} else {
// "Old record was: [record]"
func_801518B0(globalCtx, 0x335E, &this->actor);
Message_StartTextbox(globalCtx, 0x335E, &this->actor);
this->textId = 0x335E;
}
}
@ -998,7 +998,7 @@ void EnMa4_StartDialogue(EnMa4* this, GlobalContext* globalCtx) {
default:
// Dead code
func_801518B0(globalCtx, 0x3335, &this->actor);
Message_StartTextbox(globalCtx, 0x3335, &this->actor);
this->textId = 0x3335;
break;
}

View File

@ -448,12 +448,12 @@ void EnMaYto_DefaultHandlePlayerChoice(EnMaYto* this, GlobalContext* globalCtx)
func_8019F208();
EnMaYto_SetFaceExpression(this, 0, 3);
// "Milk Road is fixed!"
func_801518B0(globalCtx, 0x3392, &this->actor);
Message_StartTextbox(globalCtx, 0x3392, &this->actor);
this->textId = 0x3392;
} else { // No
func_8019F230();
// "Don't lie!"
func_801518B0(globalCtx, 0x3391, &this->actor);
Message_StartTextbox(globalCtx, 0x3391, &this->actor);
this->textId = 0x3391;
}
}
@ -464,26 +464,26 @@ void EnMaYto_DefaultChooseNextDialogue(EnMaYto* this, GlobalContext* globalCtx)
switch (this->textId) {
case 0x3391:
EnMaYto_SetFaceExpression(this, 0, 3);
func_801518B0(globalCtx, 0x3392, &this->actor);
Message_StartTextbox(globalCtx, 0x3392, &this->actor);
this->textId = 0x3392;
break;
case 0x3392:
EnMaYto_SetFaceExpression(this, 3, 1);
func_801518B0(globalCtx, 0x3393, &this->actor);
Message_StartTextbox(globalCtx, 0x3393, &this->actor);
this->textId = 0x3393;
func_80151BB4(globalCtx, 6);
break;
case 0x3394:
EnMaYto_ChangeAnim(this, 2);
func_801518B0(globalCtx, 0x3395, &this->actor);
Message_StartTextbox(globalCtx, 0x3395, &this->actor);
this->textId = 0x3395;
break;
case 0x3395:
EnMaYto_ChangeAnim(this, 1);
func_801518B0(globalCtx, 0x3396, &this->actor);
Message_StartTextbox(globalCtx, 0x3396, &this->actor);
this->textId = 0x3396;
func_80151BB4(globalCtx, 6);
break;
@ -573,12 +573,12 @@ void EnMaYto_DinnerHandlePlayerChoice(EnMaYto* this, GlobalContext* globalCtx) {
func_8019F208();
EnMaYto_SetFaceExpression(this, 0, 3);
// "Milk Road is fixed!"
func_801518B0(globalCtx, 0x3399, &this->actor);
Message_StartTextbox(globalCtx, 0x3399, &this->actor);
this->textId = 0x3399;
} else { // No
func_8019F230();
// "Don't lie!"
func_801518B0(globalCtx, 0x3398, &this->actor);
Message_StartTextbox(globalCtx, 0x3398, &this->actor);
this->textId = 0x3398;
}
}
@ -589,20 +589,20 @@ void EnMaYto_DinnerChooseNextDialogue(EnMaYto* this, GlobalContext* globalCtx) {
switch (this->textId) {
case 0x3398:
EnMaYto_SetFaceExpression(this, 0, 3);
func_801518B0(globalCtx, 0x3399, &this->actor);
Message_StartTextbox(globalCtx, 0x3399, &this->actor);
this->textId = 0x3399;
break;
case 0x3399:
EnMaYto_SetFaceExpression(this, 3, 1);
func_801518B0(globalCtx, 0x339A, &this->actor);
Message_StartTextbox(globalCtx, 0x339A, &this->actor);
this->textId = 0x339A;
break;
case 0x339A:
this->unk31E = 1;
EnMaYto_SetFaceExpression(this, 0, 1);
func_801518B0(globalCtx, 0x339B, &this->actor);
Message_StartTextbox(globalCtx, 0x339B, &this->actor);
this->textId = 0x339B;
break;
@ -610,7 +610,7 @@ void EnMaYto_DinnerChooseNextDialogue(EnMaYto* this, GlobalContext* globalCtx) {
Actor_ChangeFocus(&this->actor, globalCtx, this->actor.child);
func_80B90E50(this, 0);
EnMaYto_SetRomaniFaceExpression(this, 3, 3);
func_801518B0(globalCtx, 0x339C, &this->actor);
Message_StartTextbox(globalCtx, 0x339C, &this->actor);
this->textId = 0x339C;
break;
@ -618,7 +618,7 @@ void EnMaYto_DinnerChooseNextDialogue(EnMaYto* this, GlobalContext* globalCtx) {
this->unk31E = 1;
Actor_ChangeFocus(&this->actor, globalCtx, &this->actor);
EnMaYto_SetFaceExpression(this, 0, 2);
func_801518B0(globalCtx, 0x339D, &this->actor);
Message_StartTextbox(globalCtx, 0x339D, &this->actor);
this->textId = 0x339D;
break;
@ -626,7 +626,7 @@ void EnMaYto_DinnerChooseNextDialogue(EnMaYto* this, GlobalContext* globalCtx) {
func_80B90E50(this, 1);
Actor_ChangeFocus(&this->actor, globalCtx, this->actor.child);
EnMaYto_SetRomaniFaceExpression(this, 0, 1);
func_801518B0(globalCtx, 0x339E, &this->actor);
Message_StartTextbox(globalCtx, 0x339E, &this->actor);
this->textId = 0x339E;
func_80151BB4(globalCtx, 6);
func_80151BB4(globalCtx, 5);
@ -634,12 +634,12 @@ void EnMaYto_DinnerChooseNextDialogue(EnMaYto* this, GlobalContext* globalCtx) {
case 0x339F:
this->unk31E = 0;
func_801518B0(globalCtx, 0x33A0, &this->actor);
Message_StartTextbox(globalCtx, 0x33A0, &this->actor);
this->textId = 0x33A0;
break;
case 0x33A0:
func_801518B0(globalCtx, 0x33A1, &this->actor);
Message_StartTextbox(globalCtx, 0x33A1, &this->actor);
this->textId = 0x33A1;
break;
@ -647,7 +647,7 @@ void EnMaYto_DinnerChooseNextDialogue(EnMaYto* this, GlobalContext* globalCtx) {
func_80B90E50(this, 1);
Actor_ChangeFocus(&this->actor, globalCtx, this->actor.child);
EnMaYto_SetRomaniFaceExpression(this, 0, 2);
func_801518B0(globalCtx, 0x33A2, &this->actor);
Message_StartTextbox(globalCtx, 0x33A2, &this->actor);
this->textId = 0x33A2;
break;
@ -655,27 +655,27 @@ void EnMaYto_DinnerChooseNextDialogue(EnMaYto* this, GlobalContext* globalCtx) {
this->unk31E = 1;
Actor_ChangeFocus(&this->actor, globalCtx, &this->actor);
EnMaYto_SetFaceExpression(this, 4, 3);
func_801518B0(globalCtx, 0x33A3, &this->actor);
Message_StartTextbox(globalCtx, 0x33A3, &this->actor);
this->textId = 0x33A3;
break;
case 0x33A3:
this->unk31E = 0;
EnMaYto_SetFaceExpression(this, 3, 3);
func_801518B0(globalCtx, 0x33A4, &this->actor);
Message_StartTextbox(globalCtx, 0x33A4, &this->actor);
this->textId = 0x33A4;
func_80151BB4(globalCtx, 6);
func_80151BB4(globalCtx, 5);
break;
case 0x33A5:
func_801518B0(globalCtx, 0x33A6, &this->actor);
Message_StartTextbox(globalCtx, 0x33A6, &this->actor);
this->textId = 0x33A6;
func_80151BB4(globalCtx, 6);
break;
case 0x33A7:
func_801518B0(globalCtx, 0x33A8, &this->actor);
Message_StartTextbox(globalCtx, 0x33A8, &this->actor);
this->textId = 0x33A8;
func_80151BB4(globalCtx, 6);
break;
@ -762,14 +762,14 @@ void EnMaYto_BarnChooseNextDialogue(EnMaYto* this, GlobalContext* globalCtx) {
func_80B90E50(this, 0);
Actor_ChangeFocus(&this->actor, globalCtx, this->actor.child);
EnMaYto_SetRomaniFaceExpression(this, 0, 3);
func_801518B0(globalCtx, 0x33AA, &this->actor);
Message_StartTextbox(globalCtx, 0x33AA, &this->actor);
this->textId = 0x33AA;
break;
case 0x33AA:
Actor_ChangeFocus(&this->actor, globalCtx, &this->actor);
this->unk31E = 1;
func_801518B0(globalCtx, 0x33AB, &this->actor);
Message_StartTextbox(globalCtx, 0x33AB, &this->actor);
this->textId = 0x33AB;
break;
@ -777,14 +777,14 @@ void EnMaYto_BarnChooseNextDialogue(EnMaYto* this, GlobalContext* globalCtx) {
func_80B90E50(this, 1);
Actor_ChangeFocus(&this->actor, globalCtx, this->actor.child);
EnMaYto_SetRomaniFaceExpression(this, 0, 1);
func_801518B0(globalCtx, 0x33AC, &this->actor);
Message_StartTextbox(globalCtx, 0x33AC, &this->actor);
this->textId = 0x33AC;
break;
case 0x33AC:
this->unk31E = 0;
Actor_ChangeFocus(&this->actor, globalCtx, &this->actor);
func_801518B0(globalCtx, 0x33AD, &this->actor);
Message_StartTextbox(globalCtx, 0x33AD, &this->actor);
this->textId = 0x33AD;
func_80151BB4(globalCtx, 6);
func_80151BB4(globalCtx, 5);
@ -794,7 +794,7 @@ void EnMaYto_BarnChooseNextDialogue(EnMaYto* this, GlobalContext* globalCtx) {
func_80B90E50(this, 1);
Actor_ChangeFocus(&this->actor, globalCtx, this->actor.child);
EnMaYto_SetRomaniFaceExpression(this, 4, 2);
func_801518B0(globalCtx, 0x33AF, &this->actor);
Message_StartTextbox(globalCtx, 0x33AF, &this->actor);
this->textId = 0x33AF;
break;
@ -802,7 +802,7 @@ void EnMaYto_BarnChooseNextDialogue(EnMaYto* this, GlobalContext* globalCtx) {
this->unk31E = 1;
Actor_ChangeFocus(&this->actor, globalCtx, &this->actor);
EnMaYto_SetFaceExpression(this, 4, 2);
func_801518B0(globalCtx, 0x33B0, &this->actor);
Message_StartTextbox(globalCtx, 0x33B0, &this->actor);
this->textId = 0x33B0;
func_80151BB4(globalCtx, 6);
func_80151BB4(globalCtx, 5);
@ -812,7 +812,7 @@ void EnMaYto_BarnChooseNextDialogue(EnMaYto* this, GlobalContext* globalCtx) {
this->unk31E = 2;
EnMaYto_SetFaceExpression(this, 5, 3);
// "I should had believed what Romani said"
func_801518B0(globalCtx, 0x33B2, &this->actor);
Message_StartTextbox(globalCtx, 0x33B2, &this->actor);
this->textId = 0x33B2;
func_80151BB4(globalCtx, 6);
break;
@ -821,7 +821,7 @@ void EnMaYto_BarnChooseNextDialogue(EnMaYto* this, GlobalContext* globalCtx) {
Actor_ChangeFocus(&this->actor, globalCtx, this->actor.child);
this->unk31E = 0;
EnMaYto_SetFaceExpression(this, 0, 1);
func_801518B0(globalCtx, 0x33C7, &this->actor);
Message_StartTextbox(globalCtx, 0x33C7, &this->actor);
this->textId = 0x33C7;
break;
@ -829,7 +829,7 @@ void EnMaYto_BarnChooseNextDialogue(EnMaYto* this, GlobalContext* globalCtx) {
Actor_ChangeFocus(&this->actor, globalCtx, &this->actor);
this->unk31E = 1;
EnMaYto_SetFaceExpression(this, 0, 1);
func_801518B0(globalCtx, 0x33C8, &this->actor);
Message_StartTextbox(globalCtx, 0x33C8, &this->actor);
this->textId = 0x33C8;
break;
@ -837,7 +837,7 @@ void EnMaYto_BarnChooseNextDialogue(EnMaYto* this, GlobalContext* globalCtx) {
Actor_ChangeFocus(&this->actor, globalCtx, this->actor.child);
func_80B90E50(this, 1);
EnMaYto_SetRomaniFaceExpression(this, 0, 2);
func_801518B0(globalCtx, 0x33C9, &this->actor);
Message_StartTextbox(globalCtx, 0x33C9, &this->actor);
this->textId = 0x33C9;
break;
@ -845,13 +845,13 @@ void EnMaYto_BarnChooseNextDialogue(EnMaYto* this, GlobalContext* globalCtx) {
Actor_ChangeFocus(&this->actor, globalCtx, &this->actor);
this->unk31E = 1;
EnMaYto_SetFaceExpression(this, 3, 1);
func_801518B0(globalCtx, 0x33CA, &this->actor);
Message_StartTextbox(globalCtx, 0x33CA, &this->actor);
this->textId = 0x33CA;
break;
case 0x33CA:
this->unk31E = 1;
func_801518B0(globalCtx, 0x33CB, &this->actor);
Message_StartTextbox(globalCtx, 0x33CB, &this->actor);
this->textId = 0x33CB;
break;
@ -859,7 +859,7 @@ void EnMaYto_BarnChooseNextDialogue(EnMaYto* this, GlobalContext* globalCtx) {
Actor_ChangeFocus(&this->actor, globalCtx, this->actor.child);
func_80B90E50(this, 1);
EnMaYto_SetRomaniFaceExpression(this, 3, 3);
func_801518B0(globalCtx, 0x33CC, &this->actor);
Message_StartTextbox(globalCtx, 0x33CC, &this->actor);
this->textId = 0x33CC;
func_80151BB4(globalCtx, 6);
func_80151BB4(globalCtx, 5);
@ -888,12 +888,12 @@ void EnMaYto_AfterMilkRunInit(EnMaYto* this, GlobalContext* globalCtx) {
this->actor.flags &= ~ACTOR_FLAG_10000;
if (gSaveContext.weekEventReg[52] & 1) { // if (ProtectedCremia)
func_801518B0(globalCtx, 0x33C1, &this->actor);
Message_StartTextbox(globalCtx, 0x33C1, &this->actor);
this->textId = 0x33C1;
} else {
// Fails milk minigame
EnMaYto_SetFaceExpression(this, 5, 2);
func_801518B0(globalCtx, 0x33C0, &this->actor);
Message_StartTextbox(globalCtx, 0x33C0, &this->actor);
this->textId = 0x33C0;
// Attempted Cremia Cart Ride
gSaveContext.weekEventReg[14] |= 1;
@ -937,7 +937,7 @@ void EnMaYto_AfterMilkRunChooseNextDialogue(EnMaYto* this, GlobalContext* global
case 0x33C1:
EnMaYto_SetFaceExpression(this, 3, 1);
// "Thank you. You were cool back there."
func_801518B0(globalCtx, 0x33C2, &this->actor);
Message_StartTextbox(globalCtx, 0x33C2, &this->actor);
this->textId = 0x33C2;
break;
@ -975,7 +975,7 @@ void EnMaYto_PostMilkRunExplainReward(EnMaYto* this, GlobalContext* globalCtx) {
if (this->unk310 == 1) {
// Romani's mask explanation
EnMaYto_SetFaceExpression(this, 0, 1);
func_801518B0(globalCtx, 0x33C3, &this->actor);
Message_StartTextbox(globalCtx, 0x33C3, &this->actor);
this->textId = 0x33C3;
// Attempted Cremia Cart Ride
gSaveContext.weekEventReg[14] |= 1;
@ -987,7 +987,7 @@ void EnMaYto_PostMilkRunExplainReward(EnMaYto* this, GlobalContext* globalCtx) {
} else {
// You already have the mask
EnMaYto_SetFaceExpression(this, 0, 1);
func_801518B0(globalCtx, 0x33D0, &this->actor);
Message_StartTextbox(globalCtx, 0x33D0, &this->actor);
this->textId = 0x33D0;
// Attempted Cremia Cart Ride
gSaveContext.weekEventReg[14] |= 1;
@ -1024,11 +1024,11 @@ void EnMaYto_SetupWarmFuzzyFeelingCs(EnMaYto* this) {
static u16 D_80B915F0 = 99;
void EnMaYto_WarmFuzzyFeelingCs(EnMaYto* this, GlobalContext* globalCtx) {
if (func_800EE29C(globalCtx, 0x22C) != 0) {
u32 csActionIndex = func_800EE200(globalCtx, 0x22C);
if (Cutscene_CheckActorAction(globalCtx, 556)) {
s32 csActionIndex = Cutscene_GetActorActionIndex(globalCtx, 556);
if (globalCtx->csCtx.frames == globalCtx->csCtx.npcActions[csActionIndex]->startFrame) {
u16 action = globalCtx->csCtx.npcActions[csActionIndex]->unk0;
if (globalCtx->csCtx.frames == globalCtx->csCtx.actorActions[csActionIndex]->startFrame) {
u16 action = globalCtx->csCtx.actorActions[csActionIndex]->action;
if (1) {}
@ -1052,7 +1052,7 @@ void EnMaYto_WarmFuzzyFeelingCs(EnMaYto* this, GlobalContext* globalCtx) {
}
}
func_800EDF24(&this->actor, globalCtx, csActionIndex);
Cutscene_ActorTranslateAndYaw(&this->actor, globalCtx, csActionIndex);
if (D_80B915F0 == 2 && this->skelAnime.animation == &object_ma2_Anim_001FD0 &&
Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
EnMaYto_ChangeAnim(this, 20);
@ -1102,53 +1102,53 @@ void EnMaYto_DefaultStartDialogue(EnMaYto* this, GlobalContext* globalCtx) {
if (Player_GetMask(globalCtx) != PLAYER_MASK_NONE && gSaveContext.playerForm == PLAYER_FORM_HUMAN) {
switch (Player_GetMask(globalCtx)) {
case PLAYER_MASK_ROMANI:
func_801518B0(globalCtx, 0x235D, &this->actor);
Message_StartTextbox(globalCtx, 0x235D, &this->actor);
this->textId = 0x235D;
break;
case PLAYER_MASK_CIRCUS_LEADER:
EnMaYto_SetFaceExpression(this, 1, 3);
func_801518B0(globalCtx, 0x235E, &this->actor);
Message_StartTextbox(globalCtx, 0x235E, &this->actor);
this->textId = 0x235E;
break;
case PLAYER_MASK_KAFEIS_MASK:
EnMaYto_SetFaceExpression(this, 1, 2);
func_801518B0(globalCtx, 0x235F, &this->actor);
Message_StartTextbox(globalCtx, 0x235F, &this->actor);
this->textId = 0x235F;
break;
case PLAYER_MASK_COUPLE:
func_801518B0(globalCtx, 0x2360, &this->actor);
Message_StartTextbox(globalCtx, 0x2360, &this->actor);
this->textId = 0x2360;
break;
default:
func_801518B0(globalCtx, 0x2361, &this->actor);
Message_StartTextbox(globalCtx, 0x2361, &this->actor);
this->textId = 0x2361;
break;
}
} else {
if (EnMaYto_HasSpokeToPlayer()) {
func_801518B0(globalCtx, 0x3394, &this->actor);
Message_StartTextbox(globalCtx, 0x3394, &this->actor);
this->textId = 0x3394;
} else {
EnMaYto_SetTalkedFlag();
// Asks the player if he came from town.
func_801518B0(globalCtx, 0x3390, &this->actor);
Message_StartTextbox(globalCtx, 0x3390, &this->actor);
this->textId = 0x3390;
}
}
} else if (CURRENT_DAY == 3) {
if (EnMaYto_HasSpokeToPlayerToday()) {
EnMaYto_SetFaceExpression(this, 0, 3);
func_801518B0(globalCtx, 0x33C5, &this->actor);
Message_StartTextbox(globalCtx, 0x33C5, &this->actor);
this->textId = 0x33C5;
func_80151BB4(globalCtx, 6);
} else {
EnMaYto_SetTalkedFlag();
EnMaYto_SetFaceExpression(this, 0, 3);
func_801518B0(globalCtx, 0x33C4, &this->actor);
Message_StartTextbox(globalCtx, 0x33C4, &this->actor);
this->textId = 0x33C4;
func_80151BB4(globalCtx, 6);
}
@ -1161,37 +1161,37 @@ void EnMaYto_DinnerStartDialogue(EnMaYto* this, GlobalContext* globalCtx) {
if (Player_GetMask(globalCtx) != PLAYER_MASK_NONE && gSaveContext.playerForm == PLAYER_FORM_HUMAN) {
switch (Player_GetMask(globalCtx)) {
case PLAYER_MASK_ROMANI:
func_801518B0(globalCtx, 0x235D, &this->actor);
Message_StartTextbox(globalCtx, 0x235D, &this->actor);
this->textId = 0x235D;
break;
case PLAYER_MASK_CIRCUS_LEADER:
func_801518B0(globalCtx, 0x235E, &this->actor);
Message_StartTextbox(globalCtx, 0x235E, &this->actor);
this->textId = 0x235E;
break;
case PLAYER_MASK_KAFEIS_MASK:
func_801518B0(globalCtx, 0x235F, &this->actor);
Message_StartTextbox(globalCtx, 0x235F, &this->actor);
this->textId = 0x235F;
break;
case PLAYER_MASK_COUPLE:
func_801518B0(globalCtx, 0x2360, &this->actor);
Message_StartTextbox(globalCtx, 0x2360, &this->actor);
this->textId = 0x2360;
break;
default:
func_801518B0(globalCtx, 0x2361, &this->actor);
Message_StartTextbox(globalCtx, 0x2361, &this->actor);
this->textId = 0x2361;
break;
}
} else {
if (EnMaYto_HasSpokeToPlayer()) {
func_801518B0(globalCtx, 0x339F, &this->actor);
Message_StartTextbox(globalCtx, 0x339F, &this->actor);
this->textId = 0x339F;
} else {
EnMaYto_SetTalkedFlag();
func_801518B0(globalCtx, 0x3397, &this->actor);
Message_StartTextbox(globalCtx, 0x3397, &this->actor);
this->textId = 0x3397;
}
}
@ -1199,24 +1199,24 @@ void EnMaYto_DinnerStartDialogue(EnMaYto* this, GlobalContext* globalCtx) {
case 2:
if (EnMaYto_HasSpokeToPlayer()) {
func_801518B0(globalCtx, 0x33A6, &this->actor);
Message_StartTextbox(globalCtx, 0x33A6, &this->actor);
this->textId = 0x33A6;
func_80151BB4(globalCtx, 6);
} else {
EnMaYto_SetTalkedFlag();
func_801518B0(globalCtx, 0x33A5, &this->actor);
Message_StartTextbox(globalCtx, 0x33A5, &this->actor);
this->textId = 0x33A5;
}
break;
case 3:
if (EnMaYto_HasSpokeToPlayer()) {
func_801518B0(globalCtx, 0x33A8, &this->actor);
Message_StartTextbox(globalCtx, 0x33A8, &this->actor);
this->textId = 0x33A8;
func_80151BB4(globalCtx, 6);
} else {
EnMaYto_SetTalkedFlag();
func_801518B0(globalCtx, 0x33A7, &this->actor);
Message_StartTextbox(globalCtx, 0x33A7, &this->actor);
this->textId = 0x33A7;
}
break;
@ -1228,23 +1228,23 @@ void EnMaYto_BarnStartDialogue(EnMaYto* this, GlobalContext* globalCtx) {
if (gSaveContext.weekEventReg[22] & 1) {
if (CURRENT_DAY == 2) {
if (this->unk310 == 1) {
func_801518B0(globalCtx, 0x33AE, &this->actor);
Message_StartTextbox(globalCtx, 0x33AE, &this->actor);
this->textId = 0x33AE;
} else {
this->unk310 = 1;
EnMaYto_SetTalkedFlag();
func_801518B0(globalCtx, 0x33A9, &this->actor);
Message_StartTextbox(globalCtx, 0x33A9, &this->actor);
this->textId = 0x33A9;
}
} else if (CURRENT_DAY == 3) {
if (this->unk310 == 1) {
func_801518B0(globalCtx, 0x33CB, &this->actor);
Message_StartTextbox(globalCtx, 0x33CB, &this->actor);
this->textId = 0x33CB;
} else {
this->unk310 = 1;
EnMaYto_SetTalkedFlag();
EnMaYto_SetFaceExpression(this, 0, 1);
func_801518B0(globalCtx, 0x33C6, &this->actor);
Message_StartTextbox(globalCtx, 0x33C6, &this->actor);
this->textId = 0x33C6;
}
}
@ -1252,13 +1252,13 @@ void EnMaYto_BarnStartDialogue(EnMaYto* this, GlobalContext* globalCtx) {
if (EnMaYto_HasSpokeToPlayer()) {
this->unk31E = 2;
EnMaYto_SetFaceExpression(this, 5, 3);
func_801518B0(globalCtx, 0x33B3, &this->actor);
Message_StartTextbox(globalCtx, 0x33B3, &this->actor);
this->textId = 0x33B3;
func_80151BB4(globalCtx, 6);
} else {
EnMaYto_SetTalkedFlag();
EnMaYto_SetFaceExpression(this, 5, 3);
func_801518B0(globalCtx, 0x33B1, &this->actor);
Message_StartTextbox(globalCtx, 0x33B1, &this->actor);
this->textId = 0x33B1;
}
}

View File

@ -302,12 +302,12 @@ void EnMaYts_StartDialogue(EnMaYts* this, GlobalContext* globalCtx) {
// Saying to non-human Link: "Cremia went to town."
gSaveContext.weekEventReg[65] |= 0x80;
EnMaYts_SetFaceExpression(this, 0, 0);
func_801518B0(globalCtx, 0x335F, &this->actor);
Message_StartTextbox(globalCtx, 0x335F, &this->actor);
this->textId = 0x335F;
} else {
// Saying to non-human Link: "Pretend you did not hear that."
EnMaYts_SetFaceExpression(this, 4, 3);
func_801518B0(globalCtx, 0x3362, &this->actor);
Message_StartTextbox(globalCtx, 0x3362, &this->actor);
this->textId = 0x3362;
func_80151BB4(globalCtx, 5);
}
@ -315,29 +315,29 @@ void EnMaYts_StartDialogue(EnMaYts* this, GlobalContext* globalCtx) {
if (!(gSaveContext.weekEventReg[65] & 0x40)) {
gSaveContext.weekEventReg[65] |= 0x40;
EnMaYts_SetFaceExpression(this, 0, 0);
func_801518B0(globalCtx, 0x3363, &this->actor);
Message_StartTextbox(globalCtx, 0x3363, &this->actor);
this->textId = 0x3363;
} else {
EnMaYts_SetFaceExpression(this, 4, 2);
func_801518B0(globalCtx, 0x3366, &this->actor);
Message_StartTextbox(globalCtx, 0x3366, &this->actor);
this->textId = 0x3366;
func_80151BB4(globalCtx, 5);
}
} else if (!(gSaveContext.weekEventReg[21] & 0x20)) {
EnMaYts_SetFaceExpression(this, 0, 0);
func_801518B0(globalCtx, 0x3367, &this->actor);
Message_StartTextbox(globalCtx, 0x3367, &this->actor);
this->textId = 0x3367;
} else {
if (!(gSaveContext.weekEventReg[65] & 0x20)) {
// Saying to Grasshopper: "Cremia went to town."
gSaveContext.weekEventReg[65] |= 0x20;
EnMaYts_SetFaceExpression(this, 4, 2);
func_801518B0(globalCtx, 0x3369, &this->actor);
Message_StartTextbox(globalCtx, 0x3369, &this->actor);
this->textId = 0x3369;
} else {
// Saying to Grasshopper: "You're our bodyguard."
EnMaYts_SetFaceExpression(this, 0, 0);
func_801518B0(globalCtx, 0x336C, &this->actor);
Message_StartTextbox(globalCtx, 0x336C, &this->actor);
this->textId = 0x336C;
func_80151BB4(globalCtx, 5);
}
@ -381,14 +381,14 @@ void EnMaYts_SetupEndCreditsHandler(EnMaYts* this) {
static u16 D_80B8E32C = 99;
void EnMaYts_EndCreditsHandler(EnMaYts* this, GlobalContext* globalCtx) {
if (func_800EE29C(globalCtx, 0x78) != 0) {
u32 actionIndex = func_800EE200(globalCtx, 0x78);
if (Cutscene_CheckActorAction(globalCtx, 120)) {
s32 actionIndex = Cutscene_GetActorActionIndex(globalCtx, 120);
if (globalCtx->csCtx.frames == globalCtx->csCtx.npcActions[actionIndex]->startFrame) {
if (globalCtx->csCtx.npcActions[actionIndex]->unk0 != D_80B8E32C) {
D_80B8E32C = globalCtx->csCtx.npcActions[actionIndex]->unk0;
if (globalCtx->csCtx.frames == globalCtx->csCtx.actorActions[actionIndex]->startFrame) {
if (globalCtx->csCtx.actorActions[actionIndex]->action != D_80B8E32C) {
D_80B8E32C = globalCtx->csCtx.actorActions[actionIndex]->action;
this->endCreditsFlag = 0;
switch (globalCtx->csCtx.npcActions[actionIndex]->unk0) {
switch (globalCtx->csCtx.actorActions[actionIndex]->action) {
case 1:
this->hasBow = true;
EnMaYts_ChangeAnim(this, 0);
@ -412,9 +412,9 @@ void EnMaYts_EndCreditsHandler(EnMaYts* this, GlobalContext* globalCtx) {
}
}
func_800EDF24(&this->actor, globalCtx, actionIndex);
Cutscene_ActorTranslateAndYaw(&this->actor, globalCtx, actionIndex);
if ((D_80B8E32C == 2) && (this->endCreditsFlag == 0) &&
(Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame) != 0)) {
Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
this->endCreditsFlag++;
EnMaYts_ChangeAnim(this, 5);
}
@ -430,46 +430,46 @@ void EnMaYts_ChooseNextDialogue(EnMaYts* this, GlobalContext* globalCtx) {
switch (this->textId) {
case 0x335F:
EnMaYts_SetFaceExpression(this, 0, 2);
func_801518B0(globalCtx, 0x3360, &this->actor);
Message_StartTextbox(globalCtx, 0x3360, &this->actor);
this->textId = 0x3360;
break;
case 0x3360:
EnMaYts_SetFaceExpression(this, 4, 3);
func_801518B0(globalCtx, 0x3361, &this->actor);
Message_StartTextbox(globalCtx, 0x3361, &this->actor);
this->textId = 0x3361;
func_80151BB4(globalCtx, 5);
break;
case 0x3363:
EnMaYts_SetFaceExpression(this, 1, 1);
func_801518B0(globalCtx, 0x3364, &this->actor);
Message_StartTextbox(globalCtx, 0x3364, &this->actor);
this->textId = 0x3364;
break;
case 0x3364:
EnMaYts_SetFaceExpression(this, 4, 2);
func_801518B0(globalCtx, 0x3365, &this->actor);
Message_StartTextbox(globalCtx, 0x3365, &this->actor);
this->textId = 0x3365;
func_80151BB4(globalCtx, 5);
break;
case 0x3367:
EnMaYts_SetFaceExpression(this, 4, 3);
func_801518B0(globalCtx, 0x3368, &this->actor);
Message_StartTextbox(globalCtx, 0x3368, &this->actor);
this->textId = 0x3368;
func_80151BB4(globalCtx, 5);
break;
case 0x3369:
EnMaYts_SetFaceExpression(this, 0, 0);
func_801518B0(globalCtx, 0x336A, &this->actor);
Message_StartTextbox(globalCtx, 0x336A, &this->actor);
this->textId = 0x336A;
break;
case 0x336A:
EnMaYts_SetFaceExpression(this, 3, 3);
func_801518B0(globalCtx, 0x336B, &this->actor);
Message_StartTextbox(globalCtx, 0x336B, &this->actor);
this->textId = 0x336B;
func_80151BB4(globalCtx, 5);
break;

View File

@ -382,7 +382,7 @@ void EnMag_Update(Actor* thisx, GlobalContext* globalCtx) {
CHECK_BTN_ALL(CONTROLLER1(globalCtx)->press.button, BTN_A) ||
CHECK_BTN_ALL(CONTROLLER1(globalCtx)->press.button, BTN_B)) {
if (globalCtx->sceneLoadFlag != 0x14) {
func_801A3F54(false);
Audio_SetCutsceneFlag(false);
D_801BB12C++;
if (D_801BB12C >= 2) {
D_801BB12C = 0;

View File

@ -471,7 +471,7 @@ void EnMinifrog_EndChoir(EnMinifrog* this, GlobalContext* globalCtx) {
EnMinifrog_TurnToPlayer(this);
EnMinifrog_Jump(this);
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
func_801518B0(globalCtx, 0xD7E, &this->actor); // "Let us do it again sometime."
Message_StartTextbox(globalCtx, 0xD7E, &this->actor); // "Let us do it again sometime."
this->actionFunc = EnMinifrog_YellowFrogDialog;
} else {
func_800B8500(&this->actor, globalCtx, 1000.0f, 1000.0f, EXCH_ITEM_MINUS1);
@ -565,11 +565,11 @@ void EnMinifrog_SetupYellowFrogDialog(EnMinifrog* this, GlobalContext* globalCtx
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->actionFunc = EnMinifrog_YellowFrogDialog;
if (!(gSaveContext.weekEventReg[34] & 1)) { // Not spoken with MINIFROG_YELLOW
func_801518B0(globalCtx, 0xD76,
&this->actor); // "I have been waiting for you, Don Gero. Forgive me if I'm mistaken, but it
// looks like you've lost a little weight..."
Message_StartTextbox(globalCtx, 0xD76,
&this->actor); // "I have been waiting for you, Don Gero. Forgive me if I'm mistaken,
// but it looks like you've lost a little weight..."
} else {
func_801518B0(globalCtx, 0xD7F, &this->actor); // "Well, if it isn't the great Don Gero."
Message_StartTextbox(globalCtx, 0xD7F, &this->actor); // "Well, if it isn't the great Don Gero."
}
} else if ((this->actor.xzDistToPlayer < 150.0f) &&
(Player_IsFacingActor(&this->actor, 0x3000, globalCtx) ||

View File

@ -64,7 +64,7 @@ void EnMm2_Reading(EnMm2* this, GlobalContext* globalCtx) {
*/
void EnMm2_WaitForRead(EnMm2* this, GlobalContext* globalCtx) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
func_801518B0(globalCtx, 0x277B, &this->actor);
Message_StartTextbox(globalCtx, 0x277B, &this->actor);
this->actionFunc = EnMm2_Reading;
} else if ((this->actor.xzDistToPlayer < 60.0f) && (Player_IsFacingActor(&this->actor, 0x3000, globalCtx))) {
func_800B8614(&this->actor, globalCtx, 110.0f);

View File

@ -77,7 +77,7 @@ void func_80C08828(EnNnh* this) {
void func_80C0883C(EnNnh* this, GlobalContext* globalCtx) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
func_801518B0(globalCtx, 0x228U, &this->actor);
Message_StartTextbox(globalCtx, 0x228U, &this->actor);
func_80C088A4(this);
return;
}

View File

@ -574,7 +574,7 @@ void func_80AD10FC(EnOsn* this, GlobalContext* globalCtx) {
this->unk_1EA |= 0x20;
}
func_801518B0(globalCtx, this->unk_1F4, &this->actor);
Message_StartTextbox(globalCtx, this->unk_1F4, &this->actor);
}
void func_80AD1398(EnOsn* this) {
@ -615,7 +615,7 @@ void func_80AD14C8(EnOsn* this, GlobalContext* globalCtx) {
} else {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->unk_1F4 = func_80AD0E10(this, globalCtx);
func_801518B0(globalCtx, this->unk_1F4, &this->actor);
Message_StartTextbox(globalCtx, this->unk_1F4, &this->actor);
this->actionFunc = func_80AD19A0;
} else if ((((this->actor.xzDistToPlayer < 100.0f) || this->actor.isTargeted) && (temp_v1 < 0x4000)) &&
(temp_v1 > -0x4000)) {
@ -638,14 +638,14 @@ void func_80AD1634(EnOsn* this, GlobalContext* globalCtx) {
void func_80AD16A8(EnOsn* this, GlobalContext* globalCtx) {
u8 pad;
u32 temp_v0;
s32 actionIndex;
if (func_800EE29C(globalCtx, 0x82)) {
temp_v0 = func_800EE200(globalCtx, 0x82);
if (Cutscene_CheckActorAction(globalCtx, 130)) {
actionIndex = Cutscene_GetActorActionIndex(globalCtx, 130);
this->unk_1F0 = 0;
if (this->unk_1ED != globalCtx->csCtx.npcActions[temp_v0]->unk0) {
this->unk_1ED = globalCtx->csCtx.npcActions[temp_v0]->unk0;
switch (globalCtx->csCtx.npcActions[temp_v0]->unk0) {
if (this->unk_1ED != globalCtx->csCtx.actorActions[actionIndex]->action) {
this->unk_1ED = globalCtx->csCtx.actorActions[actionIndex]->action;
switch (globalCtx->csCtx.actorActions[actionIndex]->action) {
case 1:
this->unk_1EC = 2;
break;
@ -735,7 +735,7 @@ void func_80AD16A8(EnOsn* this, GlobalContext* globalCtx) {
(Animation_OnFrame(&this->skelAnime, 57.0f)) || (Animation_OnFrame(&this->skelAnime, 67.0f)))) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_OMENYA_WALK);
}
func_800EDF24(&this->actor, globalCtx, temp_v0);
Cutscene_ActorTranslateAndYaw(&this->actor, globalCtx, actionIndex);
} else {
this->unk_1F0 = 1;
this->unk_1ED = 0x63;

View File

@ -383,7 +383,7 @@ void EnOssan_BeginInteraction(EnOssan* this, GlobalContext* globalCtx) {
case 10:
this->animationIdx++;
SubS_ChangeAnimationByInfoS(&this->skelAnime, animations, this->animationIdx);
func_801518B0(globalCtx, this->textId, &this->actor);
Message_StartTextbox(globalCtx, this->textId, &this->actor);
EnOssan_SetupStartShopping(globalCtx, this, false);
break;
case 5:
@ -408,7 +408,7 @@ void EnOssan_BeginInteraction(EnOssan* this, GlobalContext* globalCtx) {
} else {
EnOssan_SetHaveMet(this);
this->textId = EnOssan_GetWelcomePartTimeWorker(this, globalCtx);
func_801518B0(globalCtx, this->textId, &this->actor);
Message_StartTextbox(globalCtx, this->textId, &this->actor);
EnOssan_SetupStartShopping(globalCtx, this, false);
}
}
@ -1091,7 +1091,7 @@ void EnOssan_ContinueShopping(EnOssan* this, GlobalContext* globalCtx) {
func_8019F208();
player->actor.shape.rot.y = BINANG_ROT180(player->actor.shape.rot.y);
player->stateFlags2 |= 0x20000000;
func_801518B0(globalCtx, this->textId, &this->actor);
Message_StartTextbox(globalCtx, this->textId, &this->actor);
EnOssan_SetupStartShopping(globalCtx, this, true);
func_800B85E0(&this->actor, globalCtx, 100.0f, EXCH_ITEM_MINUS1);
break;
@ -1109,7 +1109,7 @@ void EnOssan_ContinueShopping(EnOssan* this, GlobalContext* globalCtx) {
item->restockFunc(globalCtx, item);
player->actor.shape.rot.y = BINANG_ROT180(player->actor.shape.rot.y);
player->stateFlags2 |= 0x20000000;
func_801518B0(globalCtx, this->textId, &this->actor);
Message_StartTextbox(globalCtx, this->textId, &this->actor);
EnOssan_SetupStartShopping(globalCtx, this, true);
func_800B85E0(&this->actor, globalCtx, 100.0f, EXCH_ITEM_MINUS1);
}

View File

@ -651,7 +651,7 @@ void func_80B5CD40(EnOt* this, GlobalContext* globalCtx) {
if (1) {}
if (!temp) {
gSaveContext.weekEventReg[23] |= 0x10;
func_801518B0(globalCtx, 0x1069, NULL);
Message_StartTextbox(globalCtx, 0x1069, NULL);
}
break;
@ -765,12 +765,12 @@ void func_80B5D160(EnOt* this, GlobalContext* globalCtx) {
} else {
phi_a1 = 0x10A5;
}
func_801518B0(globalCtx, phi_a1, &this->actor);
Message_StartTextbox(globalCtx, phi_a1, &this->actor);
func_80B5D114(this, globalCtx);
break;
case 1:
func_801518B0(globalCtx, 0x106D, &this->actor);
Message_StartTextbox(globalCtx, 0x106D, &this->actor);
func_80B5D114(this, globalCtx);
break;
}

View File

@ -599,21 +599,21 @@ void func_80BD994C(EnPamera* this, GlobalContext* globalCtx) {
if (Player_GetMask(globalCtx) == PLAYER_MASK_GIBDO) {
if (1) {}
func_80BD93CC(this, 0, 1);
func_801518B0(globalCtx, 0x15A8, &this->actor);
Message_StartTextbox(globalCtx, 0x15A8, &this->actor);
this->unk_324 = 0x15A8;
} else if ((gSaveContext.playerForm != PLAYER_FORM_HUMAN) ||
((gSaveContext.weekEventReg[52] & 0x20) && (!(gSaveContext.weekEventReg[75] & 0x20)))) {
func_80BD93CC(this, 1, 0);
func_801518B0(globalCtx, 0x158E, &this->actor);
Message_StartTextbox(globalCtx, 0x158E, &this->actor);
this->unk_324 = 0x158E;
} else {
if (!(this->unk_322 & 1)) {
this->unk_322 |= 1;
func_801518B0(globalCtx, 0x1587, &this->actor);
Message_StartTextbox(globalCtx, 0x1587, &this->actor);
this->unk_324 = 0x1587;
} else {
func_801518B0(globalCtx, 0x158C, &this->actor);
Message_StartTextbox(globalCtx, 0x158C, &this->actor);
this->unk_324 = 0x158C;
}
}
@ -654,23 +654,23 @@ void func_80BD9B4C(EnPamera* this, GlobalContext* globalCtx) {
if (func_80147624(globalCtx)) {
switch (this->unk_324) {
case 0x1587:
func_801518B0(globalCtx, 0x1588, &this->actor);
Message_StartTextbox(globalCtx, 0x1588, &this->actor);
this->unk_324 = 0x1588;
break;
case 0x1588:
func_801518B0(globalCtx, 0x1589, &this->actor);
Message_StartTextbox(globalCtx, 0x1589, &this->actor);
this->unk_324 = 0x1589;
break;
case 0x1589:
func_801518B0(globalCtx, 0x158A, &this->actor);
Message_StartTextbox(globalCtx, 0x158A, &this->actor);
this->unk_324 = 0x158A;
break;
case 0x158A:
func_801518B0(globalCtx, 0x158B, &this->actor);
Message_StartTextbox(globalCtx, 0x158B, &this->actor);
this->unk_324 = 0x158B;
break;
case 0x158C:
func_801518B0(globalCtx, 0x158D, &this->actor);
Message_StartTextbox(globalCtx, 0x158D, &this->actor);
this->unk_324 = 0x158D;
break;
case 0x158E:
@ -690,14 +690,14 @@ void func_80BD9C70(EnPamera* this, GlobalContext* globalCtx) {
}
s32 func_80BD9CB8(EnPamera* this, GlobalContext* globalCtx) {
u32 actionIndex;
s32 actionIndex;
if (func_800EE29C(globalCtx, 0x1E5)) {
actionIndex = func_800EE200(globalCtx, 0x1E5);
if (this->unk_326 != globalCtx->csCtx.npcActions[actionIndex]->unk0) {
this->unk_326 = globalCtx->csCtx.npcActions[actionIndex]->unk0;
if (Cutscene_CheckActorAction(globalCtx, 0x1E5)) {
actionIndex = Cutscene_GetActorActionIndex(globalCtx, 0x1E5);
if (this->unk_326 != globalCtx->csCtx.actorActions[actionIndex]->action) {
this->unk_326 = globalCtx->csCtx.actorActions[actionIndex]->action;
switch (globalCtx->csCtx.npcActions[actionIndex]->unk0) {
switch (globalCtx->csCtx.actorActions[actionIndex]->action) {
case 1:
func_80BD9E88(this);
break;
@ -722,7 +722,7 @@ s32 func_80BD9CB8(EnPamera* this, GlobalContext* globalCtx) {
break;
}
}
func_800EDF24(&this->actor, globalCtx, actionIndex);
Cutscene_ActorTranslateAndYaw(&this->actor, globalCtx, actionIndex);
this->setupFunc(this, globalCtx);
return 1;
}

View File

@ -296,7 +296,8 @@ void EnRailSkb_Init(Actor* thisx, GlobalContext* globalCtx) {
this->unk_3F8 = 0;
}
if ((globalCtx->sceneNum == SCENE_BOTI) && (gSaveContext.sceneSetupIndex == 1) && (globalCtx->csCtx.unk_12 == 0)) {
if ((globalCtx->sceneNum == SCENE_BOTI) && (gSaveContext.sceneSetupIndex == 1) &&
(globalCtx->csCtx.currentCsIndex == 0)) {
this->actor.flags |= ACTOR_FLAG_100000;
}
@ -489,11 +490,11 @@ void func_80B716A8(EnRailSkb* this, GlobalContext* globalCtx) {
this->unk_3FE = 1;
func_80B71D8C(this, globalCtx, func_80B723F8);
if (!func_80B7285C(this)) {
func_801518B0(globalCtx, 0x13EC, &this->actor);
Message_StartTextbox(globalCtx, 0x13EC, &this->actor);
this->unk_400 = 0x13EC;
func_80B72830(this, 1);
} else {
func_801518B0(globalCtx, 0x13F5, &this->actor);
Message_StartTextbox(globalCtx, 0x13F5, &this->actor);
this->unk_400 = 0x13F5;
}
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 12);
@ -702,34 +703,34 @@ void func_80B71F3C(EnRailSkb* this, GlobalContext* globalCtx) {
if (func_80147624(globalCtx)) {
switch (this->unk_400) {
case 0x13EC:
func_801518B0(globalCtx, 0x13ED, &this->actor);
Message_StartTextbox(globalCtx, 0x13ED, &this->actor);
this->unk_400 = 0x13ED;
break;
case 0x13ED:
func_801518B0(globalCtx, 0x13EE, &this->actor);
Message_StartTextbox(globalCtx, 0x13EE, &this->actor);
this->unk_400 = 0x13EE;
break;
case 0x13EE:
func_801518B0(globalCtx, 0x13EF, &this->actor);
Message_StartTextbox(globalCtx, 0x13EF, &this->actor);
this->unk_400 = 0x13EF;
break;
case 0x13EF:
case 0x13F5:
func_801518B0(globalCtx, 0x13F0, &this->actor);
Message_StartTextbox(globalCtx, 0x13F0, &this->actor);
this->unk_400 = 0x13F0;
break;
case 0x13F1:
func_801518B0(globalCtx, 0x13F2, &this->actor);
Message_StartTextbox(globalCtx, 0x13F2, &this->actor);
this->unk_400 = 0x13F2;
break;
case 0x13F2:
if (this->unk_3FC == 1) {
func_801518B0(globalCtx, 0x13F4, &this->actor);
Message_StartTextbox(globalCtx, 0x13F4, &this->actor);
this->unk_400 = 0x13F4;
} else {
func_801477B4(globalCtx);
@ -738,7 +739,7 @@ void func_80B71F3C(EnRailSkb* this, GlobalContext* globalCtx) {
break;
case 0x13F3:
func_801518B0(globalCtx, 0x13F2, &this->actor);
Message_StartTextbox(globalCtx, 0x13F2, &this->actor);
this->unk_400 = 0x13F2;
this->unk_3FC = 1;
break;
@ -755,11 +756,11 @@ void func_80B72100(EnRailSkb* this, GlobalContext* globalCtx) {
if (func_80147624(globalCtx)) {
if (globalCtx->msgCtx.choiceIndex == 0) {
func_8019F208();
func_801518B0(globalCtx, 0x13F1, &this->actor);
Message_StartTextbox(globalCtx, 0x13F1, &this->actor);
this->unk_400 = 0x13F1;
} else {
func_8019F208();
func_801518B0(globalCtx, 0x13F3, &this->actor);
Message_StartTextbox(globalCtx, 0x13F3, &this->actor);
this->unk_400 = 0x13F3;
}
}

View File

@ -956,7 +956,7 @@ void EnRailgibud_CheckIfTalkingToPlayer(EnRailgibud* this, GlobalContext* global
if ((this->textId == 0) && (this->type == EN_RAILGIBUD_TYPE_GIBDO)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->isInvincible = true;
func_801518B0(globalCtx, 0x13B2, &this->actor);
Message_StartTextbox(globalCtx, 0x13B2, &this->actor);
this->textId = 0x13B2;
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_REDEAD_AIM);
this->actor.speedXZ = 0.0f;
@ -968,7 +968,7 @@ void EnRailgibud_CheckIfTalkingToPlayer(EnRailgibud* this, GlobalContext* global
switch (Message_GetState(&globalCtx->msgCtx)) {
case 5:
if (func_80147624(globalCtx)) {
func_801518B0(globalCtx, 0x13B3, &this->actor);
Message_StartTextbox(globalCtx, 0x13B3, &this->actor);
this->textId = 0x13B3;
}
break;
@ -1123,27 +1123,27 @@ void EnRailgibud_InitCutsceneGibdo(EnRailgibud* this, GlobalContext* globalCtx)
void EnRailgibud_InitActorActionCommand(EnRailgibud* this) {
switch (ENRAILGIBUD_GET_CUTSCENE_TYPE(&this->actor)) {
case 1:
this->actorActionCommand = 0x207;
this->actorActionCommand = 519;
break;
case 2:
this->actorActionCommand = 0x208;
this->actorActionCommand = 520;
break;
case 3:
this->actorActionCommand = 0x209;
this->actorActionCommand = 521;
break;
case 4:
this->actorActionCommand = 0x20A;
this->actorActionCommand = 522;
break;
case 5:
this->actorActionCommand = 0x20B;
this->actorActionCommand = 523;
break;
default:
this->actorActionCommand = 0x207;
this->actorActionCommand = 519;
break;
}
}
@ -1171,13 +1171,13 @@ void EnRailgibud_SinkIntoGround(EnRailgibud* this, GlobalContext* globalCtx) {
}
s32 EnRailgibud_PerformCutsceneActions(EnRailgibud* this, GlobalContext* globalCtx) {
u32 actionIndex;
s32 actionIndex;
if (func_800EE29C(globalCtx, this->actorActionCommand)) {
actionIndex = func_800EE200(globalCtx, this->actorActionCommand);
if (this->csAction != globalCtx->csCtx.npcActions[actionIndex]->unk0) {
this->csAction = globalCtx->csCtx.npcActions[actionIndex]->unk0;
switch (globalCtx->csCtx.npcActions[actionIndex]->unk0) {
if (Cutscene_CheckActorAction(globalCtx, this->actorActionCommand)) {
actionIndex = Cutscene_GetActorActionIndex(globalCtx, this->actorActionCommand);
if (this->csAction != globalCtx->csCtx.actorActions[actionIndex]->action) {
this->csAction = globalCtx->csCtx.actorActions[actionIndex]->action;
switch (globalCtx->csCtx.actorActions[actionIndex]->action) {
case 1:
this->cutsceneAnimationIndex = EN_RAILGIBUD_ANIMATION_IDLE;
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_RAILGIBUD_ANIMATION_IDLE);
@ -1236,7 +1236,7 @@ s32 EnRailgibud_PerformCutsceneActions(EnRailgibud* this, GlobalContext* globalC
break;
}
func_800EDF24(&this->actor, globalCtx, actionIndex);
Cutscene_ActorTranslateAndYaw(&this->actor, globalCtx, actionIndex);
return true;
}

View File

@ -313,7 +313,7 @@ void func_808FA4F4(EnRr* this, GlobalContext* globalCtx) {
}
if (sp34 && (Message_GetState(&globalCtx->msgCtx) == 0)) {
func_801518B0(globalCtx, 0xF6, NULL);
Message_StartTextbox(globalCtx, 0xF6, NULL);
}
if (this->actor.params == ENRR_0) {

View File

@ -297,7 +297,7 @@ void func_80BCB52C(EnScopenuts* this, GlobalContext* globalCtx) {
this->actor.world.rot.y = this->actor.shape.rot.y;
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->unk_33C = func_80BCAF0C(this);
func_801518B0(globalCtx, this->unk_33C, &this->actor);
Message_StartTextbox(globalCtx, this->unk_33C, &this->actor);
this->actionFunc = func_80BCB6D0;
} else if (((this->actor.xzDistToPlayer < 100.0f) &&
(((this->actor.playerHeightRel < 50.0f) && (this->actor.playerHeightRel > -50.0f)) ? true : false)) ||
@ -327,7 +327,7 @@ void func_80BCB6D0(EnScopenuts* this, GlobalContext* globalCtx) {
this->actionFunc = func_80BCBA00;
} else {
this->unk_33C = func_80BCAF0C(this);
func_801518B0(globalCtx, this->unk_33C, &this->actor);
Message_StartTextbox(globalCtx, this->unk_33C, &this->actor);
}
}
} else if (temp_v0 == 4) {
@ -338,7 +338,7 @@ void func_80BCB6D0(EnScopenuts* this, GlobalContext* globalCtx) {
play_sound(NA_SE_SY_ERROR);
this->unk_33C = 0x1636;
this->unk_328 |= 1;
func_801518B0(globalCtx, this->unk_33C, &this->actor);
Message_StartTextbox(globalCtx, this->unk_33C, &this->actor);
} else {
func_8019F208();
globalCtx->msgCtx.msgMode = 0x43;
@ -355,7 +355,7 @@ void func_80BCB6D0(EnScopenuts* this, GlobalContext* globalCtx) {
this->unk_33C = 0x1635;
this->unk_328 |= 1;
}
func_801518B0(globalCtx, this->unk_33C, &this->actor);
Message_StartTextbox(globalCtx, this->unk_33C, &this->actor);
break;
}
}
@ -379,7 +379,7 @@ void func_80BCB980(EnScopenuts* this, GlobalContext* globalCtx) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->unk_33C = 0x1637;
this->unk_328 |= 1;
func_801518B0(globalCtx, this->unk_33C, &this->actor);
Message_StartTextbox(globalCtx, this->unk_33C, &this->actor);
this->actionFunc = func_80BCB6D0;
} else {
func_800B85E0(&this->actor, globalCtx, 400.0f, -1);

View File

@ -350,27 +350,27 @@ void func_80ADB544(EnSellnuts* this, GlobalContext* globalCtx) {
case 0x60E:
gSaveContext.weekEventReg[17] |= 0x20;
gSaveContext.weekEventReg[86] |= 4;
func_801518B0(globalCtx, this->unk_340, &this->actor);
Message_StartTextbox(globalCtx, this->unk_340, &this->actor);
this->actionFunc = func_80ADB0D8;
break;
case 0x628:
gSaveContext.weekEventReg[77] |= 0x40;
gSaveContext.weekEventReg[86] |= 4;
func_801518B0(globalCtx, this->unk_340, &this->actor);
Message_StartTextbox(globalCtx, this->unk_340, &this->actor);
this->actionFunc = func_80ADB0D8;
break;
case 0x614:
gSaveContext.weekEventReg[17] |= 0x40;
func_801518B0(globalCtx, this->unk_340, &this->actor);
Message_StartTextbox(globalCtx, this->unk_340, &this->actor);
this->actionFunc = func_80ADB0D8;
break;
case 0x610:
case 0x616:
case 0x629:
func_801518B0(globalCtx, this->unk_340, &this->actor);
Message_StartTextbox(globalCtx, this->unk_340, &this->actor);
this->actionFunc = func_80ADB0D8;
break;
@ -488,7 +488,7 @@ void func_80ADBBEC(EnSellnuts* this, GlobalContext* globalCtx) {
void func_80ADBC60(EnSellnuts* this, GlobalContext* globalCtx) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
func_801518B0(globalCtx, this->unk_340, &this->actor);
Message_StartTextbox(globalCtx, this->unk_340, &this->actor);
this->actionFunc = func_80ADB0D8;
} else {
func_800B85E0(&this->actor, globalCtx, 400.0f, EXCH_ITEM_MINUS1);
@ -699,7 +699,7 @@ void func_80ADC5A4(EnSellnuts* this, GlobalContext* globalCtx) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
player->linearVelocity = 0.0f;
this->actor.flags &= ~ACTOR_FLAG_10000;
func_801518B0(globalCtx, this->unk_340, &this->actor);
Message_StartTextbox(globalCtx, this->unk_340, &this->actor);
if (this->unk_340 == 0x625) {
this->unk_338 |= 1;
this->actor.draw = EnSellnuts_Draw;

View File

@ -230,7 +230,8 @@ void EnSkb_Init(Actor* thisx, GlobalContext* globalCtx) {
this->unk_3D6 = ENSKB_GET_F0(&this->actor);
this->actor.floorHeight = this->actor.world.pos.y;
if ((globalCtx->sceneNum == SCENE_BOTI) && (gSaveContext.sceneSetupIndex == 1) && (globalCtx->csCtx.unk_12 == 0)) {
if ((globalCtx->sceneNum == SCENE_BOTI) && (gSaveContext.sceneSetupIndex == 1) &&
(globalCtx->csCtx.currentCsIndex == 0)) {
this->actor.flags |= ACTOR_FLAG_100000;
}
@ -319,9 +320,9 @@ void func_80994F7C(EnSkb* this, GlobalContext* globalCtx) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->unk_3E2 = 1;
if (this->unk_3E0 == 1) {
func_801518B0(globalCtx, 0x13F8, &this->actor);
Message_StartTextbox(globalCtx, 0x13F8, &this->actor);
} else {
func_801518B0(globalCtx, 0x13F6, &this->actor);
Message_StartTextbox(globalCtx, 0x13F6, &this->actor);
this->unk_3E0 = 1;
}
this->actionFunc = func_80995190;
@ -340,12 +341,12 @@ void func_80995068(EnSkb* this, GlobalContext* globalCtx) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->unk_3E2 = 1;
if (this->unk_3E0 == 1) {
func_801518B0(globalCtx, 0x13F8, &this->actor);
Message_StartTextbox(globalCtx, 0x13F8, &this->actor);
if (this->unk_3DE == 2) {
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 11);
}
} else {
func_801518B0(globalCtx, 0x13F6, &this->actor);
Message_StartTextbox(globalCtx, 0x13F6, &this->actor);
this->unk_3E0 = 1;
}
this->actionFunc = func_80995190;
@ -372,7 +373,7 @@ void func_80995190(EnSkb* this, GlobalContext* globalCtx) {
case 5:
if (func_80147624(globalCtx)) {
func_801518B0(globalCtx, 0x13F7, &this->actor);
Message_StartTextbox(globalCtx, 0x13F7, &this->actor);
if (this->unk_3DE == 2) {
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 11);
}

Some files were not shown because too many files have changed in this diff Show More