diff --git a/Makefile b/Makefile index ea4b897fc5..8a2f552e69 100644 --- a/Makefile +++ b/Makefile @@ -823,7 +823,6 @@ $(BUILD_DIR)/src/%.o: PREPROCESS := ./tools/preprocess.sh -v $(VERSION) -i $(ICO endif else -# Note that if adding additional assets directories for modding reasons these flags must also be used there $(BUILD_DIR)/assets/%.o: CFLAGS += -fno-zero-initialized-in-bss -fno-toplevel-reorder $(BUILD_DIR)/src/%.o: CFLAGS += -fexec-charset=euc-jp $(BUILD_DIR)/src/libultra/libc/ll.o: OPTFLAGS := -Ofast diff --git a/assets/xml/objects/object_cs.xml b/assets/xml/objects/object_cs.xml index 9be0327a92..6aea283064 100644 --- a/assets/xml/objects/object_cs.xml +++ b/assets/xml/objects/object_cs.xml @@ -91,16 +91,16 @@ - - - - - - - - - - - + + + + + + + + + + + diff --git a/assets/xml/objects/object_geldb.xml b/assets/xml/objects/object_geldb.xml index 1488db00b0..a0d05bea49 100644 --- a/assets/xml/objects/object_geldb.xml +++ b/assets/xml/objects/object_geldb.xml @@ -21,9 +21,8 @@ - - - + + diff --git a/assets/xml/objects/object_god_lgt.xml b/assets/xml/objects/object_god_lgt.xml index e6f38dfdc2..66acbf59e9 100644 --- a/assets/xml/objects/object_god_lgt.xml +++ b/assets/xml/objects/object_god_lgt.xml @@ -5,7 +5,7 @@ - + diff --git a/assets/xml/objects/object_oA11.xml b/assets/xml/objects/object_oA11.xml index b1b4b9a4fe..1417604d2c 100644 --- a/assets/xml/objects/object_oA11.xml +++ b/assets/xml/objects/object_oA11.xml @@ -1,6 +1,6 @@ - + diff --git a/assets/xml/objects/object_oB2.xml b/assets/xml/objects/object_oB2.xml index 1e018af222..6dd8436cd1 100644 --- a/assets/xml/objects/object_oB2.xml +++ b/assets/xml/objects/object_oB2.xml @@ -1,6 +1,6 @@ - + diff --git a/assets/xml/textures/nintendo_rogo_static.xml b/assets/xml/textures/nintendo_rogo_static.xml index 229ccf2eb5..02a3513734 100644 --- a/assets/xml/textures/nintendo_rogo_static.xml +++ b/assets/xml/textures/nintendo_rogo_static.xml @@ -1,10 +1,10 @@ - + - + diff --git a/assets/xml/textures/nintendo_rogo_static_v2.xml b/assets/xml/textures/nintendo_rogo_static_v2.xml index f4df8cff3c..fbe50f2841 100644 --- a/assets/xml/textures/nintendo_rogo_static_v2.xml +++ b/assets/xml/textures/nintendo_rogo_static_v2.xml @@ -1,10 +1,10 @@ - + - + diff --git a/docs/BUILDING_MACOS.md b/docs/BUILDING_MACOS.md index f6bb2391bf..23e5d136a3 100644 --- a/docs/BUILDING_MACOS.md +++ b/docs/BUILDING_MACOS.md @@ -1,8 +1,5 @@ # Building on macOS -**N.B.** C++17 is required to build the asset processing program that we use (ZAPD), so check your OS version can support this before proceeding. - - ## 1. Dependencies For macOS, use Homebrew to install the following dependencies: diff --git a/include/actor_profile.h b/include/actor_profile.h index d02ce03cf2..8d402d9710 100644 --- a/include/actor_profile.h +++ b/include/actor_profile.h @@ -12,7 +12,7 @@ struct PlayState; typedef enum ActorID { #include "tables/actor_table.h" - /* 0x0192 */ ACTOR_ID_MAX // originally "ACTOR_DLF_MAX" + /* 0x01D7 */ ACTOR_ID_MAX // originally "ACTOR_DLF_MAX" } ActorID; #undef DEFINE_ACTOR diff --git a/include/environment.h b/include/environment.h index 43ba0c6d45..97d8a3b489 100644 --- a/include/environment.h +++ b/include/environment.h @@ -1,5 +1,5 @@ -#ifndef ENVIRONMENT_H_ -#define ENVIRONMENT_H_ +#ifndef ENVIRONMENT_H +#define ENVIRONMENT_H #include "z_math.h" #include "light.h" diff --git a/include/n64dd.h b/include/n64dd.h index e5b1b7aa31..f0028750ce 100644 --- a/include/n64dd.h +++ b/include/n64dd.h @@ -72,8 +72,8 @@ typedef struct struct_801E0D18 { /* 0x00 */ LEOCmd unk_00; /* 0x1C */ OSMesgQueue unk_1C; /* 0x38 */ LEODiskID diskId; - /* 0x58 */ UNK_TYPE unk_58; - /* 0x5C */ UNK_TYPE unk_5C; + /* 0x58 */ s32 unk_58; + /* 0x5C */ s32 unk_5C; /* 0x60 */ u32 unk_60; /* 0x64 */ u8 unk_64; /* 0x65 */ u8 unk_65; diff --git a/include/padmgr.h b/include/padmgr.h index 9859b501a6..526d1cce70 100644 --- a/include/padmgr.h +++ b/include/padmgr.h @@ -71,12 +71,12 @@ void PadMgr_RumbleSet(PadMgr* padMgr, u8* enable); * @param callback callback to run before rumble state is updated for the current VI * @param arg the argument to pass to the callback * - * @see PADMGR_UNSET_RETRACE_CALLACK + * @see PADMGR_UNSET_RETRACE_CALLBACK */ -#define PADMGR_SET_RETRACE_CALLACK(padmgr, callback, arg) \ - do { \ - (padmgr)->retraceCallback = (callback); \ - (padmgr)->retraceCallbackArg = (arg); \ +#define PADMGR_SET_RETRACE_CALLBACK(padmgr, callback, arg) \ + do { \ + (padmgr)->retraceCallback = (callback); \ + (padmgr)->retraceCallbackArg = (arg); \ } while (0) /** @@ -85,9 +85,9 @@ void PadMgr_RumbleSet(PadMgr* padMgr, u8* enable); * @param callback the callback to unset, if it is set * @param arg the argument to unset, if it is set * - * @see PADMGR_SET_RETRACE_CALLACK + * @see PADMGR_SET_RETRACE_CALLBACK */ -#define PADMGR_UNSET_RETRACE_CALLACK(padmgr, callback, arg) \ +#define PADMGR_UNSET_RETRACE_CALLBACK(padmgr, callback, arg) \ if ((padmgr)->retraceCallback == (callback) && (padmgr)->retraceCallbackArg == (arg)) { \ (padmgr)->retraceCallback = NULL; \ (padmgr)->retraceCallbackArg = NULL; \ diff --git a/include/sched.h b/include/sched.h index bf204bc6d9..d588943d07 100644 --- a/include/sched.h +++ b/include/sched.h @@ -68,7 +68,7 @@ typedef struct Scheduler { } Scheduler; // size = 0x258 void Sched_Notify(Scheduler* sc); -void Sched_Init(Scheduler* sc, void* stack, OSPri priority, u8 viModeType, UNK_TYPE arg4, IrqMgr* irqMgr); +void Sched_Init(Scheduler* sc, void* stack, OSPri priority, u8 viModeType, s32 arg4, IrqMgr* irqMgr); void Sched_FlushTaskQueue(void); extern Scheduler gScheduler; diff --git a/src/audio/game/general.c b/src/audio/game/general.c index d0ff41fff6..a874564f88 100644 --- a/src/audio/game/general.c +++ b/src/audio/game/general.c @@ -2368,10 +2368,10 @@ void Audio_Update(void) { } } -void func_800F3138(UNUSED UNK_TYPE arg0) { +void func_800F3138(UNUSED s32 arg0) { } -void func_800F3140(UNUSED UNK_TYPE arg0, UNUSED UNK_TYPE arg1) { +void func_800F3140(UNUSED s32 arg0, UNUSED s32 arg1) { } void func_800F314C(s8 seqId) { diff --git a/src/code/sched.c b/src/code/sched.c index 87f09710b8..9b9977742c 100644 --- a/src/code/sched.c +++ b/src/code/sched.c @@ -689,8 +689,7 @@ void Sched_ThreadEntry(void* arg) { } } -void Sched_Init(Scheduler* sc, void* stack, OSPri priority, UNUSED u8 viModeType, UNUSED UNK_TYPE arg4, - IrqMgr* irqMgr) { +void Sched_Init(Scheduler* sc, void* stack, OSPri priority, UNUSED u8 viModeType, UNUSED s32 arg4, IrqMgr* irqMgr) { bzero(sc, sizeof(Scheduler)); sc->isFirstSwap = true; diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 0bbebea98c..243dc7fbb7 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -1268,7 +1268,7 @@ void func_8002DFA4(DynaPolyActor* dynaActor, f32 arg1, s16 arg2) { } /** - * Chcek if the player is facing the specified actor. + * Check if the player is facing the specified actor. * The maximum angle difference that qualifies as "facing" is specified by `maxAngle`. */ s32 Player_IsFacingActor(Actor* actor, s16 maxAngle, PlayState* play) { @@ -1283,7 +1283,7 @@ s32 Player_IsFacingActor(Actor* actor, s16 maxAngle, PlayState* play) { } /** - * Chcek if `actorB` is facing `actorA`. + * Check if `actorB` is facing `actorA`. * The maximum angle difference that qualifies as "facing" is specified by `maxAngle`. * * This function is unused in the original game. @@ -1299,7 +1299,7 @@ s32 Actor_ActorBIsFacingActorA(Actor* actorA, Actor* actorB, s16 maxAngle) { } /** - * Chcek if the specified actor is facing the player. + * Check if the specified actor is facing the player. * The maximum angle difference that qualifies as "facing" is specified by `maxAngle`. */ s32 Actor_IsFacingPlayer(Actor* actor, s16 maxAngle) { @@ -1313,7 +1313,7 @@ s32 Actor_IsFacingPlayer(Actor* actor, s16 maxAngle) { } /** - * Chcek if `actorA` is facing `actorB`. + * Check if `actorA` is facing `actorB`. * The maximum angle difference that qualifies as "facing" is specified by `maxAngle`. * * This function is unused in the original game. @@ -1329,7 +1329,7 @@ s32 Actor_ActorAIsFacingActorB(Actor* actorA, Actor* actorB, s16 maxAngle) { } /** - * Chcek if the specified actor is facing the player and is nearby. + * Check if the specified actor is facing the player and is nearby. * The maximum angle difference that qualifies as "facing" is specified by `maxAngle`. * The minimum distance that qualifies as "nearby" is specified by `range`. */ @@ -1348,7 +1348,7 @@ s32 Actor_IsFacingAndNearPlayer(Actor* actor, f32 range, s16 maxAngle) { } /** - * Chcek if `actorA` is facing `actorB` and is nearby. + * Check if `actorA` is facing `actorB` and is nearby. * The maximum angle difference that qualifies as "facing" is specified by `maxAngle`. * The minimum distance that qualifies as "nearby" is specified by `range`. */ @@ -3852,7 +3852,7 @@ void Actor_ChangeCategory(PlayState* play, ActorContext* actorCtx, Actor* actor, /** * Checks if a hookshot or arrow actor is going to collide with the cylinder denoted by the * actor's `cylRadius` and `cylHeight`. - * The check is only peformed if the projectile actor is within the provided sphere radius. + * The check is only performed if the projectile actor is within the provided sphere radius. * * Returns the actor if there will be collision, NULL otherwise. */ diff --git a/src/code/z_camera.c b/src/code/z_camera.c index 8782ca31a4..72d0c80ff0 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -971,7 +971,7 @@ void Camera_UpdateInterface(s16 interfaceField) { Vec3f Camera_BGCheckCorner(Vec3f* linePointA, Vec3f* linePointB, CamColChk* pointAColChk, CamColChk* pointBColChk) { Vec3f closestPoint; - UNUSED_NDEBUG bool result; + UNUSED_NDEBUG s32 result; result = func_800427B4(pointAColChk->poly, pointBColChk->poly, linePointA, linePointB, &closestPoint); #if DEBUG_FEATURES diff --git a/src/code/z_message.c b/src/code/z_message.c index 7552c9970b..bb7c7dbf45 100644 --- a/src/code/z_message.c +++ b/src/code/z_message.c @@ -141,7 +141,7 @@ u16 sNextTextId = 0; s16 sTextIsCredits = false; #if PLATFORM_GC && OOT_PAL -UNK_TYPE D_8014B30C = 0; +UNUSED static s32 D_8014B30C = 0; #endif s16 sLastPlayedSong = 0xFF; diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c index 0151f3a0a1..116e2ce6ba 100644 --- a/src/code/z_player_lib.c +++ b/src/code/z_player_lib.c @@ -1604,7 +1604,7 @@ void Player_DrawHookshotReticle(PlayState* play, Player* this, f32 arg2) { if (1) {} - if (BgCheck_AnyLineTest3(&play->colCtx, &sp8C, &sp80, &sp74, &sp9C, 1, 1, 1, 1, &bgId)) { + if (BgCheck_AnyLineTest3(&play->colCtx, &sp8C, &sp80, &sp74, &sp9C, true, true, true, true, &bgId)) { OPEN_DISPS(play->state.gfxCtx, "../z_player_lib.c", 2572); OVERLAY_DISP = Gfx_SetupDL(OVERLAY_DISP, SETUPDL_7); diff --git a/src/code/z_rumble.c b/src/code/z_rumble.c index b6b57f7a77..e928ac1910 100644 --- a/src/code/z_rumble.c +++ b/src/code/z_rumble.c @@ -116,13 +116,13 @@ void Rumble_Request(f32 distSq, u8 sourceStrength, u8 duration, u8 decreaseRate) void Rumble_Init(void) { RumbleMgr_Init(&sRumbleMgr); - PADMGR_SET_RETRACE_CALLACK(&gPadMgr, Rumble_Update, NULL); + PADMGR_SET_RETRACE_CALLBACK(&gPadMgr, Rumble_Update, NULL); } void Rumble_Destroy(void) { PadMgr* padmgr = &gPadMgr; - PADMGR_UNSET_RETRACE_CALLACK(padmgr, Rumble_Update, NULL); + PADMGR_UNSET_RETRACE_CALLBACK(padmgr, Rumble_Update, NULL); RumbleMgr_Destroy(&sRumbleMgr); } diff --git a/src/code/z_vr_box_draw.c b/src/code/z_vr_box_draw.c index e16edad6aa..8f41ca6002 100644 --- a/src/code/z_vr_box_draw.c +++ b/src/code/z_vr_box_draw.c @@ -93,7 +93,7 @@ void Skybox_Draw(SkyboxContext* skyboxCtx, GraphicsContext* gfxCtx, s16 skyboxId gSPDisplayList(POLY_OPA_DISP++, skyboxCtx->dListBuf[6]); // +x face gSPDisplayList(POLY_OPA_DISP++, skyboxCtx->dListBuf[8]); // +y face if (skyboxId == SKYBOX_CUTSCENE_MAP) { - // Skip the bottom face in the cutscene map + // Only draw the bottom face in the cutscene map gSPDisplayList(POLY_OPA_DISP++, skyboxCtx->dListBuf[10]); // -y face } } diff --git a/src/n64dd/n64dd_801C8000.c b/src/n64dd/n64dd_801C8000.c index fa69c33aa8..f2f4201c0c 100644 --- a/src/n64dd/n64dd_801C8000.c +++ b/src/n64dd/n64dd_801C8000.c @@ -93,7 +93,7 @@ s32 func_801C8000(struct_801D9D50* arg0) { return 0; } -void func_801C819C(UNK_TYPE arg0) { +void func_801C819C(s32 arg0) { if (arg0 != 0) { D_801D2E60 = 1; } else { diff --git a/src/n64dd/z_n64dd.c b/src/n64dd/z_n64dd.c index bfd0a93bbb..e0dd69cd6f 100644 --- a/src/n64dd/z_n64dd.c +++ b/src/n64dd/z_n64dd.c @@ -59,7 +59,7 @@ STACK(B_801D9F88, 0x1000); StackEntry B_801DAF88; STACK(B_801DAFA8, 0x1000); StackEntry B_801DBFA8; -UNK_TYPE B_801DBFC4; // unused? +UNUSED static s32 B_801DBFC4; u32 func_801C6E80(void) { #if OOT_NTSC diff --git a/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c b/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c index d2d3d8749c..3697c905f2 100644 --- a/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c +++ b/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c @@ -45,7 +45,7 @@ ActorProfile Bg_Mjin_Profile = { /**/ NULL, }; -extern UNK_TYPE D_06000000; +extern u64 D_06000000[]; static InitChainEntry sInitChain[] = { ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_CONTINUE), @@ -121,7 +121,7 @@ void BgMjin_Draw(Actor* thisx, PlayState* play) { gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment); } - gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(&D_06000000)); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_06000000)); dlist = gWarpPadBaseDL; } else { dlist = gOcarinaWarpPadDL; diff --git a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c index 6ca5cad2a6..a98a3b9ca4 100644 --- a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c +++ b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c @@ -227,7 +227,7 @@ void BgSpot00Hanebasi_Update(Actor* thisx, PlayState* play) { if ((player->actor.world.pos.x > -450.0f) && (player->actor.world.pos.x < 450.0f) && (player->actor.world.pos.z > 1080.0f) && (player->actor.world.pos.z < 1700.0f) && - (!(Play_InCsMode(play)))) { + !Play_InCsMode(play)) { SET_EVENTCHKINF(EVENTCHKINF_ZELDA_FLED_CASTLE); Flags_SetEventChkInf(EVENTCHKINF_82); this->actionFunc = BgSpot00Hanebasi_DoNothing; diff --git a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c index 98b0526375..52dd4add3f 100644 --- a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c +++ b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c @@ -344,8 +344,7 @@ static EnZl3* sZelda; static Actor* D_8090EB30; -// unused -static UNK_TYPE D_8090EB34; +UNUSED static s32 D_8090EB34; static BossGanon2Effect sEffects[BOSS_GANON2_EFFECT_COUNT]; @@ -353,8 +352,7 @@ static s32 sSeed1; static s32 sSeed2; static s32 sSeed3; -// unused -static UNK_TYPE D_809105DC; +UNUSED static s32 D_809105DC; static Vec3f D_809105D8[4]; diff --git a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c index 21fd9a610b..e257735b14 100644 --- a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c +++ b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c @@ -516,7 +516,7 @@ void func_80985B34(DemoIm* this, PlayState* play) { DemoIm_SpawnLightBall(this, play); this->unk_270 = 1; } - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; } } @@ -911,7 +911,7 @@ void func_80986BA0(DemoIm* this, PlayState* play) { this->action = 21; this->drawConfig = 1; this->unk_280 = 1; - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; } } @@ -926,7 +926,7 @@ void func_80986BF8(DemoIm* this, PlayState* play) { this->action = 24; this->drawConfig = 1; this->unk_280 = 1; - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; } } @@ -947,7 +947,7 @@ void func_80986CC8(DemoIm* this) { this->action = 26; this->drawConfig = 1; this->unk_280 = 1; - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; } } diff --git a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c index 03f0d7cf40..6f6c06b24e 100644 --- a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c +++ b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c @@ -471,7 +471,7 @@ void DemoSa_SageMagic_CheckFadeOut(DemoSa* this, PlayState* play) { DemoSa_SageMagic_SpawnLightBall(this, play); this->isLightBall = true; } - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; } } @@ -701,7 +701,7 @@ void DemoSa_CsBridge_LookAtLink(DemoSa* this, PlayState* play) { this->action = DEMOSA_ACTION_BRIDGE_LOOKING_SAD; this->drawConfig = DEMOSA_DRAW_OPA; this->isHoldingOcarina = false; - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; } DemoSa_SetEyes(this, SARIA_EYE_SAD); } @@ -711,7 +711,7 @@ void DemoSa_CsBridge_CheckFadeFinished(DemoSa* this) { this->action = DEMOSA_ACTION_BRIDGE_LOOKING_SAD; this->drawConfig = DEMOSA_DRAW_OPA; this->isHoldingOcarina = false; - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; } } @@ -720,7 +720,7 @@ void DemoSa_CsBridge_ClutchOcarina(DemoSa* this) { this->action = DEMOSA_ACTION_BRIDGE_CLUTCH_OCARINA; this->drawConfig = DEMOSA_DRAW_OPA; this->isHoldingOcarina = true; - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; DemoSa_SetEyes(this, SARIA_EYE_CLOSED); } @@ -729,7 +729,7 @@ void DemoSa_CsBridge_GiveOcarina(DemoSa* this) { this->action = DEMOSA_ACTION_BRIDGE_GIVE_OCARINA; this->drawConfig = DEMOSA_DRAW_OPA; this->isHoldingOcarina = true; - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; } void DemoSa_CsBridge_HoldOutOcarina(DemoSa* this, s32 animFinished) { diff --git a/src/overlays/actors/ovl_En_Box/z_en_box.c b/src/overlays/actors/ovl_En_Box/z_en_box.c index b6a78bf6cc..c0042e520e 100644 --- a/src/overlays/actors/ovl_En_Box/z_en_box.c +++ b/src/overlays/actors/ovl_En_Box/z_en_box.c @@ -91,7 +91,7 @@ static InitChainEntry sInitChain[] = { ICHAIN_U8(attentionRangeType, ATTENTION_RANGE_0, ICHAIN_STOP), }; -UNUSED static UNK_TYPE sUnused; +UNUSED static s32 sUnused; void EnBox_SetupAction(EnBox* this, EnBoxActionFunc actionFunc) { this->actionFunc = actionFunc; diff --git a/src/overlays/actors/ovl_En_Bw/z_en_bw.c b/src/overlays/actors/ovl_En_Bw/z_en_bw.c index 90704ab46d..7ee624c378 100644 --- a/src/overlays/actors/ovl_En_Bw/z_en_bw.c +++ b/src/overlays/actors/ovl_En_Bw/z_en_bw.c @@ -243,8 +243,8 @@ void func_809CEA24(EnBw* this, PlayState* play) { this->color1.g = sp60; } if ((((play->gameplayFrames % 4) == (u32)this->actor.params) && (this->actor.speed != 0.0f) && - (sp64 = - BgCheck_AnyLineTest2(&play->colCtx, &this->actor.world.pos, &this->unk_264, &sp68, &sp74, 1, 0, 0, 1))) || + (sp64 = BgCheck_AnyLineTest2(&play->colCtx, &this->actor.world.pos, &this->unk_264, &sp68, &sp74, true, false, + false, true))) || (this->unk_222 == 0)) { if (sp74 != NULL) { sp74 = SEGMENTED_TO_VIRTUAL(sp74); @@ -253,10 +253,12 @@ void func_809CEA24(EnBw* this, PlayState* play) { sp62 = this->actor.world.rot.y + 0x8000; } if ((this->unk_236 != sp62) || (sp64 == 0)) { - if (BgCheck_AnyLineTest2(&play->colCtx, &this->unk_270, &this->unk_288, &sp68, &sp74, 1, 0, 0, 1)) { + if (BgCheck_AnyLineTest2(&play->colCtx, &this->unk_270, &this->unk_288, &sp68, &sp74, true, false, false, + true)) { sp64 |= 2; } - if (BgCheck_AnyLineTest2(&play->colCtx, &this->unk_270, &this->unk_27C, &sp68, &sp74, 1, 0, 0, 1)) { + if (BgCheck_AnyLineTest2(&play->colCtx, &this->unk_270, &this->unk_27C, &sp68, &sp74, true, false, false, + true)) { sp64 |= 4; } switch (sp64) { @@ -326,7 +328,7 @@ void func_809CEA24(EnBw* this, PlayState* play) { } } else if (this->unk_221 == 0) { sp64 = BgCheck_AnyLineTest2(&play->colCtx, &this->actor.world.pos, &player->actor.world.pos, &sp68, &sp74, - 1, 0, 0, 1); + true, false, false, true); if (sp64 != 0) { sp74 = SEGMENTED_TO_VIRTUAL(sp74); sp60 = RAD_TO_BINANG(Math_FAtan2F(sp74->normal.x, sp74->normal.z)); diff --git a/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c b/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c index 7b6bff3b39..79c65884cb 100644 --- a/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c +++ b/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c @@ -90,8 +90,8 @@ static ColliderCylinderInit sLaserCylinderInit = { { 15, 30, 10, { 0, 0, 0 } }, }; -UNUSED static UNK_TYPE4 D_809D5C98 = 0; -UNUSED static UNK_TYPE4 D_809D5C9C = 0; +UNUSED static s32 D_809D5C98 = 0; +UNUSED static s32 D_809D5C9C = 0; static EnClearTagEffect sEffects[CLEAR_TAG_EFFECT_COUNT]; diff --git a/src/overlays/actors/ovl_En_Dh/z_en_dh.c b/src/overlays/actors/ovl_En_Dh/z_en_dh.c index 3bf72468e4..3c5be0ad05 100644 --- a/src/overlays/actors/ovl_En_Dh/z_en_dh.c +++ b/src/overlays/actors/ovl_En_Dh/z_en_dh.c @@ -171,7 +171,7 @@ void EnDh_Init(Actor* thisx, PlayState* play) { Actor_ProcessInitChain(&this->actor, sInitChain); this->actor.colChkInfo.damageTable = &D_809EC620; SkelAnime_InitFlex(play, &this->skelAnime, &object_dh_Skel_007E88, &object_dh_Anim_005880, this->jointTable, - this->limbRotTable, 16); + this->morphTable, 16); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 64.0f); this->actor.params = ENDH_WAIT_UNDERGROUND; this->actor.colChkInfo.mass = MASS_HEAVY; diff --git a/src/overlays/actors/ovl_En_Dh/z_en_dh.h b/src/overlays/actors/ovl_En_Dh/z_en_dh.h index d923144a73..1aacc47f9d 100644 --- a/src/overlays/actors/ovl_En_Dh/z_en_dh.h +++ b/src/overlays/actors/ovl_En_Dh/z_en_dh.h @@ -12,7 +12,7 @@ typedef struct EnDh { /* 0x0000 */ Actor actor; /* 0x014C */ SkelAnime skelAnime; /* 0x0170 */ Vec3s jointTable[16]; - /* 0x01F0 */ Vec3s limbRotTable[16]; + /* 0x01F0 */ Vec3s morphTable[16]; /* 0x0250 */ u8 actionState; /* 0x0251 */ u8 retreat; /* 0x0252 */ u8 drawDirtWave; diff --git a/src/overlays/actors/ovl_En_Elf/z_en_elf.c b/src/overlays/actors/ovl_En_Elf/z_en_elf.c index 6470afba15..940e7f1a98 100644 --- a/src/overlays/actors/ovl_En_Elf/z_en_elf.c +++ b/src/overlays/actors/ovl_En_Elf/z_en_elf.c @@ -345,7 +345,7 @@ void EnElf_Init(Actor* thisx, PlayState* play) { Actor_ProcessInitChain(thisx, sInitChain); SkelAnime_Init(play, &this->skelAnime, &gFairySkel, &gFairyAnim, this->jointTable, this->morphTable, 15); ActorShape_Init(&thisx->shape, 0.0f, NULL, 15.0f); - thisx->shape.shadowAlpha = 0xFF; + thisx->shape.shadowAlpha = 255; Lights_PointGlowSetInfo(&this->lightInfoGlow, thisx->world.pos.x, thisx->world.pos.y, thisx->world.pos.z, 255, 255, 255, 0); diff --git a/src/overlays/actors/ovl_En_Fd/z_en_fd.c b/src/overlays/actors/ovl_En_Fd/z_en_fd.c index 964da2a08f..6947fa9b03 100644 --- a/src/overlays/actors/ovl_En_Fd/z_en_fd.c +++ b/src/overlays/actors/ovl_En_Fd/z_en_fd.c @@ -498,7 +498,7 @@ void EnFd_Destroy(Actor* thisx, PlayState* play) { void EnFd_Reappear(EnFd* this, PlayState* play) { this->actor.world.pos = this->actor.home.pos; this->actor.params = 0; - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; this->coreActive = false; this->actor.scale.y = 0.0f; this->fadeAlpha = 255.0f; diff --git a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c index 83fd7339bb..45102b8613 100644 --- a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c +++ b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c @@ -234,7 +234,7 @@ s32 Ge2_DetectPlayerInUpdate(PlayState* play, EnGe2* this, Vec3f* pos, s16 yRot, } if (BgCheck_AnyLineTest1(&play->colCtx, pos, &player->bodyPartsPos[PLAYER_BODYPART_HEAD], &posResult, &outPoly, - 0)) { + false)) { return 0; } return 1; diff --git a/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c b/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c index 88fdaf47fb..6297c24367 100644 --- a/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c +++ b/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c @@ -461,7 +461,7 @@ void EnJsjutan_Draw(Actor* thisx, PlayState* play2) { if (this->unk_164) { this->unk_164 = false; for (i = 0; i < ARRAY_COUNT(sShadowTex); i++) { - if (((u16*)sCarpetTex)[i] != 0) { // Hack to bypass ZAPD exporting textures as u64. + if (((u16*)sCarpetTex)[i] != 0) { // Hack to bypass textures being typed as u64[]. sShadowTex[i] = 0xFF; } else { sShadowTex[i] = 0; diff --git a/src/overlays/actors/ovl_En_Nb/z_en_nb.c b/src/overlays/actors/ovl_En_Nb/z_en_nb.c index b2440007ac..3e867b92d5 100644 --- a/src/overlays/actors/ovl_En_Nb/z_en_nb.c +++ b/src/overlays/actors/ovl_En_Nb/z_en_nb.c @@ -517,7 +517,7 @@ void EnNb_CheckToFade(EnNb* this, PlayState* play) { this->drawMode = NB_DRAW_DEFAULT; *alphaTimer = kREG(5) + 10.0f; this->alpha = 255; - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; return; } } else { @@ -549,7 +549,7 @@ void EnNb_SetupLightOrb(EnNb* this, PlayState* play) { this->flag = 1; } - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; } } @@ -797,7 +797,7 @@ void func_80AB26DC(EnNb* this, PlayState* play) { Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, lastFrame, ANIMMODE_ONCE, 0.0f); this->action = NB_ACTION_14; this->drawMode = NB_DRAW_KNEEL; - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; } void EnNb_SetupKneel(EnNb* this) { @@ -807,7 +807,7 @@ void EnNb_SetupKneel(EnNb* this) { Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, lastFrame, ANIMMODE_ONCE, 0.0f); this->action = NB_KNEEL; this->drawMode = NB_DRAW_KNEEL; - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; } void EnNb_CheckIfKneeling(EnNb* this, s32 animFinished) { @@ -827,7 +827,7 @@ void EnNb_SetupLookRight(EnNb* this) { Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, lastFrame, ANIMMODE_ONCE, -8.0f); this->action = NB_LOOK_RIGHT; this->drawMode = NB_DRAW_DEFAULT; - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; } void EnNb_CheckIfLookingRight(EnNb* this, s32 animFinished) { @@ -847,7 +847,7 @@ void EnNb_SetupLookLeft(EnNb* this) { Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, lastFrame, ANIMMODE_ONCE, -8.0f); this->action = NB_LOOK_LEFT; this->drawMode = NB_DRAW_LOOK_DIRECTION; - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; } void EnNb_CheckIfLookLeft(EnNb* this, s32 animFinished) { @@ -873,7 +873,7 @@ void EnNb_SetupRun(EnNb* this) { Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, lastFrame, ANIMMODE_ONCE, -8.0f); this->action = NB_RUN; this->drawMode = NB_DRAW_LOOK_DIRECTION; - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; } void EnNb_SetupConfrontationDestroy(EnNb* this) { diff --git a/src/overlays/actors/ovl_En_Rl/z_en_rl.c b/src/overlays/actors/ovl_En_Rl/z_en_rl.c index fe3add9140..9e0a48231d 100644 --- a/src/overlays/actors/ovl_En_Rl/z_en_rl.c +++ b/src/overlays/actors/ovl_En_Rl/z_en_rl.c @@ -271,7 +271,7 @@ void func_80AE7AF8(EnRl* this, PlayState* play) { func_80AE78D4(this, play); this->lightBallSpawned = 1; } - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; } } diff --git a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c index e43bea25bf..fe609a132b 100644 --- a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c +++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c @@ -398,7 +398,7 @@ s32 EnRu1_GetPlatformCamSetting(EnRu1* this) { if (this->bigOctoPlatform != NULL) { return this->bigOctoPlatform->cameraSetting; } else { - return 0; + return CAM_SET_NONE; } } @@ -432,7 +432,7 @@ void func_80AEB1D8(EnRu1* this) { this->actor.speed = 0.0f; this->actor.gravity = 0.0f; this->actor.minVelocityY = 0.0f; - EnRu1_SetPlatformCamSetting(this, 0); + EnRu1_SetPlatformCamSetting(this, CAM_SET_NONE); } void func_80AEB220(EnRu1* this, PlayState* play) { @@ -780,7 +780,7 @@ void EnRu1_EndSwimBack(EnRu1* this, PlayState* play) { } } -void EnRu1_EndGivingSapphire(EnRu1* this, PlayState* play, UNK_TYPE arg2) { +void EnRu1_EndGivingSapphire(EnRu1* this, PlayState* play, s32 arg2) { if ((EnRu1_CheckFountainCueMatchingId(play, 8)) && (arg2 != 0)) { Actor_Kill(&this->actor); } @@ -2052,7 +2052,7 @@ void EnRu1_PlayStartledSfx(EnRu1* this) { } void EnRu1_RespondToSapphirePlatformMoving(EnRu1* this) { - if (EnRu1_GetPlatformCamSetting(this) == 2) { + if (EnRu1_GetPlatformCamSetting(this) == CAM_SET_NORMAL1) { EnRu1_SetEyes(this, ENRU1_EYES_UP); EnRu1_SetMouth(this, ENRU1_MOUTH_OPEN); if (this->skelAnime.mode != ANIMMODE_ONCE) { @@ -2104,7 +2104,7 @@ void EnRu1_SetupRetrievingSapphireAnimation(EnRu1* this, PlayState* play) { EnRu1_StartWalkingTowardSapphire(this, play); this->action = ENRU1_ACTION_RETRIEVING_SAPPHIRE; this->drawConfig = ENRU1_DRAW_OPA; - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; } } @@ -2141,14 +2141,14 @@ void EnRu1_EndRetrievalCutscene(EnRu1* this, PlayState* play) { curRoomNum = play->roomCtx.curRoom.num; SET_INFTABLE(INFTABLE_RUTO_HAS_SAPPHIRE); Flags_SetSwitch(play, EnRu1_GetSwitchFlag(this)); - EnRu1_SetPlatformCamSetting(this, 1); + EnRu1_SetPlatformCamSetting(this, CAM_SET_NORMAL0); this->action = ENRU1_ACTION_READY_TO_GO_HOME; this->actor.room = curRoomNum; } } void EnRu1_RespondToAbduction(EnRu1* this, PlayState* play) { - if (EnRu1_GetPlatformCamSetting(this) == 3) { + if (EnRu1_GetPlatformCamSetting(this) == CAM_SET_DUNGEON0) { this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY; this->actor.textId = 0x4048; #if !OOT_PAL_N64 @@ -2164,7 +2164,7 @@ void EnRu1_RespondToAbduction(EnRu1* this, PlayState* play) { void EnRu1_RemoveInAbduction(EnRu1* this, PlayState* play) { if (EnRu1_IsTextboxClosing(play)) { - EnRu1_SetPlatformCamSetting(this, 4); + EnRu1_SetPlatformCamSetting(this, CAM_SET_DUNGEON1); Actor_Kill(&this->actor); } } @@ -2250,7 +2250,7 @@ void EnRu1_InitInSapphireRoom(EnRu1* this, PlayState* play) { EnRu1_AnimationChange(this, &gRutoChildWait2Anim, ANIMMODE_LOOP, 0, false); this->action = ENRU1_ACTION_WAITING_IN_SAPPHIRE_ROOM; this->bigOctoPlatform = EnRu1_FindBigOctoPlatform(play); - EnRu1_SetPlatformCamSetting(this, 1); + EnRu1_SetPlatformCamSetting(this, CAM_SET_NORMAL0); this->actor.flags &= ~(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY); } else { Actor_Kill(&this->actor); @@ -2262,7 +2262,7 @@ void EnRu1_SapphireRoom_Waiting(EnRu1* this, PlayState* play) { if (this->bigOctoPlatform != NULL) { this->action = ENRU1_ACTION_READY_TO_GO_HOME; this->drawConfig = ENRU1_DRAW_OPA; - EnRu1_SetPlatformCamSetting(this, 1); + EnRu1_SetPlatformCamSetting(this, CAM_SET_NORMAL0); } } @@ -2334,7 +2334,7 @@ void EnRu1_InitBesideDoorSwitch(EnRu1* this, PlayState* play) { s8 actorRoom; if (GET_INFTABLE(INFTABLE_RUTO_MET_FIRST_TIME) && GET_INFTABLE(INFTABLE_RUTO_PLACED_ON_SWITCH) && - !GET_INFTABLE(INFTABLE_RUTO_HAS_SAPPHIRE) && !(EnRu1_IsAssistingLink(this, play))) { + !GET_INFTABLE(INFTABLE_RUTO_HAS_SAPPHIRE) && !EnRu1_IsAssistingLink(this, play)) { EnRu1_AnimationChange(this, &gRutoChildWait2Anim, ANIMMODE_LOOP, 0, false); actorRoom = this->actor.room; this->action = ENRU1_ACTION_SPEAK_JABU_PRE_SPAWN; diff --git a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c index 7e362c9908..55aea57acb 100644 --- a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c +++ b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c @@ -116,7 +116,7 @@ static void* sEyeTextures[] = { }; #if DEBUG_FEATURES -static UNK_TYPE D_80AF4118 = 0; +static s32 D_80AF4118 = 0; #endif #include "z_en_ru2_cutscene_data.inc.c" @@ -542,7 +542,7 @@ void EnRu2_Fade(EnRu2* this, PlayState* play) { this->drawConfig = ENRU2_DRAW_OPA; *fadeTimer = kREG(5) + 10.0f; this->alpha = 255; - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; return; } } else { @@ -574,7 +574,7 @@ void EnRu2_CheckFadeOut(EnRu2* this, PlayState* play) { EnRu2_SpawnLightBall(this, play); this->isLightBall = true; } - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; } } @@ -649,7 +649,7 @@ void EnRu2_FadeInCredits(EnRu2* this) { fadeDuration = kREG(17) + 10.0f; if (fadeDuration <= *fadeTimer) { this->alpha = 255; - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; } else { alpha = (*fadeTimer / fadeDuration) * 255.0f; this->alpha = alpha; diff --git a/src/overlays/actors/ovl_En_Sw/z_en_sw.c b/src/overlays/actors/ovl_En_Sw/z_en_sw.c index b5ac20247a..7a5ccc666c 100644 --- a/src/overlays/actors/ovl_En_Sw/z_en_sw.c +++ b/src/overlays/actors/ovl_En_Sw/z_en_sw.c @@ -380,7 +380,7 @@ s32 func_80B0C9F0(EnSw* this, PlayState* play) { this->actionFunc = func_80B0D878; } else { this->actor.shape.shadowDraw = ActorShadow_DrawCircle; - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; this->unk_38A = 2; this->actor.shape.shadowScale = 16.0f; this->actor.gravity = -1.0f; diff --git a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c index 0f5348357a..caa41683b7 100644 --- a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c +++ b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c @@ -804,7 +804,7 @@ void func_80B5042C(EnZl2* this, PlayState* play) { func_80B4FD00(this, &gZelda2Anime1Anim_0022D0, 2, -8.0f, 0); this->action = 5; this->drawConfig = 1; - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; this->unk_27C = 0.0f; } @@ -822,7 +822,7 @@ void func_80B504D4(EnZl2* this, PlayState* play) { this->drawConfig = 1; this->unk_27C = 0.0f; EnZl2_setMouthIndex(this, 1); - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; } void func_80B5053C(EnZl2* this, s32 arg1) { @@ -836,7 +836,7 @@ void func_80B50580(EnZl2* this, PlayState* play) { func_80B4FD00(this, &gZelda2Anime1Anim_000A50, 2, -8.0f, 0); this->action = 9; this->drawConfig = 1; - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; } void func_80B505D4(EnZl2* this, s32 arg1) { @@ -860,7 +860,7 @@ void func_80B50670(EnZl2* this, PlayState* play) { func_80B4FD00(this, &gZelda2Anime1Anim_00B5FC, 0, -8.0f, 0); this->action = 13; this->drawConfig = 1; - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; } void func_80B506C4(EnZl2* this, PlayState* play) { @@ -869,7 +869,7 @@ void func_80B506C4(EnZl2* this, PlayState* play) { this->drawConfig = 1; EnZl2_setEyesIndex(this, 4); EnZl2_setMouthIndex(this, 2); - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; func_80B4FE90(this); } @@ -884,7 +884,7 @@ void func_80B50780(EnZl2* this, PlayState* play) { func_80B4FD00(this, &gZelda2Anime1Anim_001670, 2, -8.0f, 0); this->action = 16; this->drawConfig = 1; - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; func_80B4FFF0(this, play); EnZl2_setEyesIndex(this, 3); } @@ -900,7 +900,7 @@ void func_80B5082C(EnZl2* this, PlayState* play) { func_80B4FD00(this, &gZelda2Anime1Anim_002B14, 2, -8.0f, 0); this->action = 18; this->drawConfig = 1; - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; } void func_80B50880(EnZl2* this, s32 arg1) { @@ -916,7 +916,7 @@ void func_80B508C8(EnZl2* this, PlayState* play) { this->action = 20; this->drawConfig = 1; EnZl2_setEyesIndex(this, 6); - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; } void func_80B50928(EnZl2* this, s32 arg1) { @@ -1287,7 +1287,7 @@ void func_80B515D8(EnZl2* this, PlayState* play) { func_80B4EDB8(this, play, 0); this->action = 26; this->drawConfig = 1; - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; this->unk_27C = 0.0f; } @@ -1301,7 +1301,7 @@ void func_80B51678(EnZl2* this) { func_80B4FD00(this, &gZelda2Anime1Anim_007D0C, 2, -8.0f, 0); this->action = 27; this->drawConfig = 1; - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; this->unk_27C = 0.0f; } @@ -1315,7 +1315,7 @@ void func_80B51704(EnZl2* this) { func_80B4FD00(this, &gZelda2Anime1Anim_0090D8, 2, -8.0f, 0); this->action = 28; this->drawConfig = 1; - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; this->unk_27C = 0.0f; } @@ -1329,7 +1329,7 @@ void func_80B51790(EnZl2* this) { func_80B4FD00(this, &gZelda2Anime1Anim_005F40, 2, -8.0f, 0); this->action = 29; this->drawConfig = 1; - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; } void func_80B517E0(EnZl2* this, s32 arg1) { @@ -1343,7 +1343,7 @@ void func_80B51824(EnZl2* this) { func_80B4FD00(this, &gZelda2Anime1Anim_0022D0, 2, -8.0f, 0); this->action = 30; this->drawConfig = 1; - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; this->unk_27C = 0.0f; } @@ -1358,7 +1358,7 @@ void func_80B518C0(EnZl2* this) { func_80B4FD00(this, SEGMENTED_TO_VIRTUAL(&gZelda2Anime1Anim_004900), 2, -8.0f, 0); this->action = 32; this->drawConfig = 1; - this->actor.shape.shadowAlpha = 0xFF; + this->actor.shape.shadowAlpha = 255; this->unk_27C = 0.0f; } diff --git a/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c b/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c index d78aad39c1..7c5db5a5e1 100644 --- a/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c +++ b/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c @@ -348,7 +348,7 @@ void MirRay_SetupReflectionPolys(MirRay* this, PlayState* play, MirRayShieldRefl posB.x = sp60[0] + posA.x; posB.y = sp60[1] + posA.y; posB.z = sp60[2] + posA.z; - if (BgCheck_AnyLineTest1(&play->colCtx, &posA, &posB, &posResult, &outPoly, 1)) { + if (BgCheck_AnyLineTest1(&play->colCtx, &posA, &posB, &posResult, &outPoly, true)) { reflection[i].reflectionPoly = outPoly; } else { reflection[i].reflectionPoly = NULL; diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index d8f3eb7f60..b7de419c5b 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -4337,7 +4337,7 @@ typedef enum PlayerActionInterruptResult { * * Note that while this function can set up a new action with `sActionHandlerListIdle`, this function * will not set up an appropriate action for moving. - * It is the callers responsibility to react accordingly to `PLAYER_INTERRUPT_MOVE`. + * It is the caller's responsibility to react accordingly to `PLAYER_INTERRUPT_MOVE`. * * @param frameRange The number of frames, from the end of the current animation, where an interrupt can occur. * @return The interrupt result. See `PlayerActionInterruptResult`. @@ -6624,7 +6624,7 @@ s32 func_8083C6B8(PlayState* play, Player* this) { Player_PlaySfx(this, NA_SE_IT_SWORD_SWING); Player_PlayVoiceSfx(this, NA_SE_VO_LI_AUTO_JUMP); - return 1; + return true; } if (this->heldItemAction == PLAYER_IA_FISHING_POLE) { @@ -6640,7 +6640,7 @@ s32 func_8083C6B8(PlayState* play, Player* this) { #endif { Sfx_PlaySfxCentered(NA_SE_SY_ERROR); - return 0; + return false; } #if OOT_VERSION < NTSC_1_1 @@ -6653,13 +6653,13 @@ s32 func_8083C6B8(PlayState* play, Player* this) { #endif Player_AnimPlayOnce(play, this, &gPlayerAnim_link_fishing_throw); - return 1; + return true; } else { - return 0; + return false; } } - return 0; + return false; } void func_8083C858(Player* this, PlayState* play) { @@ -14633,7 +14633,7 @@ void Player_UpdateBunnyEars(Player* this) { } s32 Player_ActionHandler_7(Player* this, PlayState* play) { - if (func_8083C6B8(play, this) == 0) { + if (!func_8083C6B8(play, this)) { if (func_8083BB20(this) != 0) { s32 sp24 = func_80837818(this); diff --git a/tools/assets/extract/extase_oot64/dlist_resources.py b/tools/assets/extract/extase_oot64/dlist_resources.py index fc3af6f20d..2355e12010 100644 --- a/tools/assets/extract/extase_oot64/dlist_resources.py +++ b/tools/assets/extract/extase_oot64/dlist_resources.py @@ -1453,7 +1453,7 @@ class DListResource(Resource, can_size_be_unknown=True): "gSunDL", # DList loads bigger chunks than the individual texture pieces (overlaps) } HACK_no_warn_bad_dims_Texs = { - "gPoeComposerFlatHeadDL_000060E0_Tex", # used as both rgba16 16x16 and rgba16 8x8 + "object_po_composer_000060E0_Tex", # used as both rgba16 16x16 and rgba16 8x8 "gDekuStickTex", # used as both i8 8x8 and i8 16x16 "gHilite1Tex", # used as both rgba16 16x16 and rgba16 32x32 "gHilite2Tex", # used as both rgba16 16x16 and rgba16 32x32 diff --git a/tools/assets/extract/extase_oot64/room_shape_resources.py b/tools/assets/extract/extase_oot64/room_shape_resources.py index 29153f3fcc..8b606d860a 100644 --- a/tools/assets/extract/extase_oot64/room_shape_resources.py +++ b/tools/assets/extract/extase_oot64/room_shape_resources.py @@ -282,7 +282,7 @@ class JFIFResource(Resource): def get_c_reference(self, resource_offset: int): if resource_offset == 0: - return f"&{self.symbol_name}" + return f"{self.symbol_name}" else: raise ValueError