diff --git a/assets/xml/textures/icon_item_24_static.xml b/assets/xml/textures/icon_item_24_static.xml index 0c5f7621e1..395da30bb7 100644 --- a/assets/xml/textures/icon_item_24_static.xml +++ b/assets/xml/textures/icon_item_24_static.xml @@ -1,24 +1,24 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/assets/xml/textures/icon_item_static.xml b/assets/xml/textures/icon_item_static.xml index 7b61cf35c4..411f0f2015 100644 --- a/assets/xml/textures/icon_item_static.xml +++ b/assets/xml/textures/icon_item_static.xml @@ -1,95 +1,95 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/xml/textures/parameter_static.xml b/assets/xml/textures/parameter_static.xml index 4fd642c7cf..4cfe67916e 100644 --- a/assets/xml/textures/parameter_static.xml +++ b/assets/xml/textures/parameter_static.xml @@ -23,11 +23,11 @@ - - - - - + + + + + diff --git a/include/functions.h b/include/functions.h index 6e8506e058..3a9dd6a203 100644 --- a/include/functions.h +++ b/include/functions.h @@ -414,12 +414,12 @@ u32 Actor_TextboxIsClosing(Actor* actor, PlayState* play); s8 func_8002F368(PlayState* play); void Actor_GetScreenPos(PlayState* play, Actor* actor, s16* x, s16* y); u32 Actor_HasParent(Actor* actor, PlayState* play); -s32 func_8002F434(Actor* actor, PlayState* play, s32 getItemId, f32 xzRange, f32 yRange); -void func_8002F554(Actor* actor, PlayState* play, s32 getItemId); -void func_8002F580(Actor* actor, PlayState* play); +s32 Actor_OfferGetItem(Actor* actor, PlayState* play, s32 getItemId, f32 xzRange, f32 yRange); +s32 Actor_OfferGetItemNearby(Actor* actor, PlayState* play, s32 getItemId); +s32 Actor_OfferCarry(Actor* actor, PlayState* play); u32 Actor_HasNoParent(Actor* actor, PlayState* play); void func_8002F5C4(Actor* actorA, Actor* actorB, PlayState* play); -void func_8002F5F0(Actor* actor, PlayState* play); +void Actor_SetClosestSecretDistance(Actor* actor, PlayState* play); s32 Actor_IsMounted(PlayState* play, Actor* horse); u32 Actor_SetRideActor(PlayState* play, Actor* horse, s32 mountSide); s32 Actor_NotMounted(PlayState* play, Actor* horse); @@ -442,7 +442,7 @@ void Actor_InitContext(PlayState* play, ActorContext* actorCtx, ActorEntry* play void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx); s32 func_800314D4(PlayState* play, Actor* actor, Vec3f* arg2, f32 arg3); void func_800315AC(PlayState* play, ActorContext* actorCtx); -void func_80031A28(PlayState* play, ActorContext* actorCtx); +void Actor_KillAllWithMissingObject(PlayState* play, ActorContext* actorCtx); void func_80031B14(PlayState* play, ActorContext* actorCtx); void func_80031C3C(ActorContext* actorCtx, PlayState* play); Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 posX, f32 posY, f32 posZ, @@ -481,7 +481,7 @@ f32 Rand_ZeroFloat(f32 f); f32 Rand_CenteredFloat(f32 f); void Actor_DrawDoorLock(PlayState* play, s32 frame, s32 type); void func_8003424C(PlayState* play, Vec3f* arg1); -void Actor_SetColorFilter(Actor* actor, s16 colorFlag, s16 colorIntensityMax, s16 xluFlag, s16 duration); +void Actor_SetColorFilter(Actor* actor, s16 colorFlag, s16 colorIntensityMax, s16 bufFlag, s16 duration); Hilite* func_800342EC(Vec3f* object, PlayState* play); Hilite* func_8003435C(Vec3f* object, PlayState* play); s32 Npc_UpdateTalking(PlayState* play, Actor* actor, s16* talkState, f32 interactRange, diff --git a/include/regs.h b/include/regs.h index 8b7717862b..573c10e10d 100644 --- a/include/regs.h +++ b/include/regs.h @@ -100,7 +100,7 @@ #define R_TEXTBOX_HEIGHT YREG(23) #define R_TEXTBOX_ICON_XPOS YREG(71) #define R_TEXTBOX_ICON_YPOS YREG(72) -#define R_TEXTBOX_ICON_SIZE YREG(75) +#define R_TEXTBOX_ICON_DIMENSION YREG(75) #define R_MESSAGE_DEBUGGER_SELECT YREG(78) #define R_MESSAGE_DEBUGGER_TEXTID YREG(79) #define R_C_UP_ICON_X YREG(88) diff --git a/include/z64.h b/include/z64.h index be11251e5d..290f6d2ff5 100644 --- a/include/z64.h +++ b/include/z64.h @@ -1236,7 +1236,7 @@ typedef struct PlayState { /* 0x11D44 */ s32 (*isPlayerDroppingFish)(struct PlayState* play); /* 0x11D48 */ s32 (*startPlayerFishing)(struct PlayState* play); /* 0x11D4C */ s32 (*grabPlayer)(struct PlayState* play, Player* player); - /* 0x11D50 */ s32 (*startPlayerCutscene)(struct PlayState* play, Actor* actor, s32 mode); + /* 0x11D50 */ s32 (*startPlayerCutscene)(struct PlayState* play, Actor* actor, s32 csMode); /* 0x11D54 */ void (*func_11D54)(Player* player, struct PlayState* play); /* 0x11D58 */ s32 (*damagePlayer)(struct PlayState* play, s32 damage); /* 0x11D5C */ void (*talkWithPlayer)(struct PlayState* play, Actor* actor); diff --git a/include/z64actor.h b/include/z64actor.h index e6a933ca26..a9c5b910b7 100644 --- a/include/z64actor.h +++ b/include/z64actor.h @@ -169,6 +169,18 @@ typedef struct { #define ACTOR_FLAG_27 (1 << 27) #define ACTOR_FLAG_28 (1 << 28) +#define COLORFILTER_GET_COLORINTENSITY(colorFilterParams) (((colorFilterParams) & 0x1F00) >> 5) +#define COLORFILTER_GET_DURATION(colorFilterParams) ((colorFilterParams) & 0xFF) + +#define COLORFILTER_COLORFLAG_GRAY 0x8000 +#define COLORFILTER_COLORFLAG_RED 0x4000 +#define COLORFILTER_COLORFLAG_BLUE 0x0000 + +#define COLORFILTER_INTENSITY_FLAG 0x8000 + +#define COLORFILTER_BUFFLAG_XLU 0x2000 +#define COLORFILTER_BUFFLAG_OPA 0x0000 + #define BGCHECKFLAG_GROUND (1 << 0) // Standing on the ground #define BGCHECKFLAG_GROUND_TOUCH (1 << 1) // Has touched the ground (only active for 1 frame) #define BGCHECKFLAG_GROUND_LEAVE (1 << 2) // Has left the ground (only active for 1 frame) diff --git a/include/z64camera.h b/include/z64camera.h index 76e20921bc..dad8a19ecc 100644 --- a/include/z64camera.h +++ b/include/z64camera.h @@ -3,10 +3,11 @@ #include "ultra64.h" #include "z64cutscene.h" +#include "z64math.h" #include "z64save.h" // these two angle conversion macros are slightly inaccurate -#define CAM_DEG_TO_BINANG(degrees) (s16)((degrees) * 182.04167f + .5f) +#define CAM_DEG_TO_BINANG(degrees) (s16)TRUNCF_BINANG((degrees) * 182.04167f + .5f) #define CAM_BINANG_TO_DEG(binang) ((f32)(binang) * (360.0001525f / 65535.0f)) #define CAM_STAT_CUT 0 @@ -1221,6 +1222,33 @@ typedef struct { { fov, CAM_DATA_FOV }, \ { interfaceField, CAM_DATA_INTERFACE_FIELD } +typedef enum { + /* 0x1 */ ONEPOINT_CS_ACTION_ID_1 = 1, + /* 0x2 */ ONEPOINT_CS_ACTION_ID_2, + /* 0x3 */ ONEPOINT_CS_ACTION_ID_3, + /* 0x4 */ ONEPOINT_CS_ACTION_ID_4, + /* 0x9 */ ONEPOINT_CS_ACTION_ID_9 = 9, + /* 0xA */ ONEPOINT_CS_ACTION_ID_10, + /* 0xB */ ONEPOINT_CS_ACTION_ID_11, + /* 0xC */ ONEPOINT_CS_ACTION_ID_12, + /* 0xD */ ONEPOINT_CS_ACTION_ID_13, + /* 0xF */ ONEPOINT_CS_ACTION_ID_15 = 15, + /* 0x10 */ ONEPOINT_CS_ACTION_ID_16, + /* 0x11 */ ONEPOINT_CS_ACTION_ID_17, + /* 0x12 */ ONEPOINT_CS_ACTION_ID_18, + /* 0x13 */ ONEPOINT_CS_ACTION_ID_19, + /* 0x15 */ ONEPOINT_CS_ACTION_ID_21 = 21, + /* 0x18 */ ONEPOINT_CS_ACTION_ID_24 = 24 +} OnePointCsAction; + +#define ONEPOINT_CS_ACTION_FLAG_40 0x40 +#define ONEPOINT_CS_ACTION_FLAG_BGCHECK 0x80 + +#define ONEPOINT_CS_ACTION(action, isBit40, checkBg) \ + (((action) & 0x1F) | ((isBit40) ? ONEPOINT_CS_ACTION_FLAG_40 : 0) | ((checkBg) ? ONEPOINT_CS_ACTION_FLAG_BGCHECK : 0)) + +#define ONEPOINT_CS_GET_ACTION(onePointCsFull) ((onePointCsFull)->actionFlags & 0x1F) + /** initFlags * & 0x00FF = atInitFlags * & 0xFF00 = eyeInitFlags diff --git a/include/z64interface.h b/include/z64interface.h index de3913abae..781b1e6fb6 100644 --- a/include/z64interface.h +++ b/include/z64interface.h @@ -1,6 +1,34 @@ #ifndef Z64INTERFACE_H #define Z64INTERFACE_H +extern u8 _icon_item_staticSegmentRomStart[]; +extern u8 _icon_item_24_staticSegmentRomStart[]; + +// An "item icon" (gItemIcon*Tex) is 32x32 rgba32 +#define ITEM_ICON_WIDTH 32 +#define ITEM_ICON_HEIGHT 32 +#define ITEM_ICON_SIZE (ITEM_ICON_WIDTH * ITEM_ICON_HEIGHT * 4) // The size in bytes of an item icon + +/** + * Get the VROM address of the item icon for the specified item. + * + * @param itemId An ItemId value in the range `ITEM_DEKU_STICK`..`ITEM_FISHING_POLE` + */ +#define GET_ITEM_ICON_VROM(itemId) ((uintptr_t)_icon_item_staticSegmentRomStart + ((itemId)*ITEM_ICON_SIZE)) + +// A "quest icon" (gQuestIcon*Tex) is 24x24 rgba32 +#define QUEST_ICON_WIDTH 24 +#define QUEST_ICON_HEIGHT 24 +#define QUEST_ICON_SIZE (QUEST_ICON_WIDTH * QUEST_ICON_HEIGHT * 4) // The size in bytes of a quest icon + +/** + * Get the VROM address of the quest icon for the specified item. + * + * @param itemId An ItemId value in the range `ITEM_MEDALLION_FOREST`..`ITEM_MAGIC_JAR_BIG` + */ +#define GET_QUEST_ICON_VROM(itemId) \ + ((uintptr_t)_icon_item_24_staticSegmentRomStart + (((itemId)-ITEM_MEDALLION_FOREST) * QUEST_ICON_SIZE)) + /** * Button HUD Positions (Upper Left) */ diff --git a/include/z64item.h b/include/z64item.h index fcedd0840d..dbd87481af 100644 --- a/include/z64item.h +++ b/include/z64item.h @@ -1,14 +1,6 @@ #ifndef Z64ITEM_H #define Z64ITEM_H -#define ICON_ITEM_TEX_WIDTH 32 -#define ICON_ITEM_TEX_HEIGHT 32 -#define ICON_ITEM_TEX_SIZE ((ICON_ITEM_TEX_WIDTH * ICON_ITEM_TEX_HEIGHT) * 4) // 32x32 RGBA32 texture - -#define ICON_ITEM_24_TEX_WIDTH 24 -#define ICON_ITEM_24_TEX_HEIGHT 24 -#define ICON_ITEM_24_TEX_SIZE ((ICON_ITEM_24_TEX_WIDTH * ICON_ITEM_24_TEX_HEIGHT) * 4) // 24x24 RGBA32 texture - // Note that z_kaleido_scope_PAL.c assumes that the dimensions and texture format here also matches the dimensions and // texture format for MAP_NAME_TEX1_* #define ITEM_NAME_TEX_WIDTH 128 diff --git a/include/z64math.h b/include/z64math.h index b4a128dfb3..6661a8dc22 100644 --- a/include/z64math.h +++ b/include/z64math.h @@ -100,9 +100,15 @@ typedef VecSphGeo VecGeo; #define IS_ZERO(f) (fabsf(f) < 0.008f) +// Casting a float to an integer, when the float value is larger than what the integer type can hold, +// leads to undefined behavior. For example (f32)0x8000 doesn't fit in a s16, so it cannot be cast to s16. +// This isn't an issue with IDO, but is one with for example GCC. +// A partial workaround is to cast to s32 then s16, hoping all binang values used will fit a s32. +#define TRUNCF_BINANG(f) (s16)(s32)(f) + // Angle conversion macros -#define DEG_TO_BINANG(degrees) (s16)((degrees) * (0x8000 / 180.0f)) -#define RAD_TO_BINANG(radians) (s16)((radians) * (0x8000 / M_PI)) +#define DEG_TO_BINANG(degrees) (s16)TRUNCF_BINANG((degrees) * (0x8000 / 180.0f)) +#define RAD_TO_BINANG(radians) (s16)TRUNCF_BINANG((radians) * (0x8000 / M_PI)) #define RAD_TO_DEG(radians) ((radians) * (180.0f / M_PI)) #define DEG_TO_RAD(degrees) ((degrees) * (M_PI / 180.0f)) #define BINANG_TO_DEG(binang) ((f32)(binang) * (180.0f / 0x8000)) diff --git a/include/z64player.h b/include/z64player.h index 8a75c4d5bd..cd3730baed 100644 --- a/include/z64player.h +++ b/include/z64player.h @@ -352,6 +352,113 @@ typedef enum { #define LIMB_BUF_COUNT(limbCount) ((ALIGN16((limbCount) * sizeof(Vec3s)) + sizeof(Vec3s) - 1) / sizeof(Vec3s)) #define PLAYER_LIMB_BUF_COUNT LIMB_BUF_COUNT(PLAYER_LIMB_MAX) +typedef enum { + /* 0x00 */ PLAYER_CSMODE_NONE, + /* 0x01 */ PLAYER_CSMODE_1, + /* 0x02 */ PLAYER_CSMODE_2, + /* 0x03 */ PLAYER_CSMODE_3, + /* 0x04 */ PLAYER_CSMODE_4, + /* 0x05 */ PLAYER_CSMODE_5, + /* 0x06 */ PLAYER_CSMODE_6, + /* 0x07 */ PLAYER_CSMODE_7, + /* 0x08 */ PLAYER_CSMODE_8, + /* 0x09 */ PLAYER_CSMODE_9, + /* 0x0A */ PLAYER_CSMODE_10, + /* 0x0B */ PLAYER_CSMODE_11, + /* 0x0C */ PLAYER_CSMODE_12, + /* 0x0D */ PLAYER_CSMODE_13, + /* 0x0E */ PLAYER_CSMODE_14, + /* 0x0F */ PLAYER_CSMODE_15, + /* 0x10 */ PLAYER_CSMODE_16, + /* 0x11 */ PLAYER_CSMODE_17, + /* 0x12 */ PLAYER_CSMODE_18, + /* 0x13 */ PLAYER_CSMODE_19, + /* 0x14 */ PLAYER_CSMODE_20, + /* 0x15 */ PLAYER_CSMODE_21, + /* 0x16 */ PLAYER_CSMODE_22, + /* 0x17 */ PLAYER_CSMODE_23, + /* 0x18 */ PLAYER_CSMODE_24, + /* 0x19 */ PLAYER_CSMODE_25, + /* 0x1A */ PLAYER_CSMODE_26, + /* 0x1B */ PLAYER_CSMODE_27, + /* 0x1C */ PLAYER_CSMODE_28, + /* 0x1D */ PLAYER_CSMODE_29, + /* 0x1E */ PLAYER_CSMODE_30, + /* 0x1F */ PLAYER_CSMODE_31, + /* 0x20 */ PLAYER_CSMODE_32, + /* 0x21 */ PLAYER_CSMODE_33, + /* 0x22 */ PLAYER_CSMODE_34, + /* 0x23 */ PLAYER_CSMODE_35, + /* 0x24 */ PLAYER_CSMODE_36, + /* 0x25 */ PLAYER_CSMODE_37, + /* 0x26 */ PLAYER_CSMODE_38, + /* 0x27 */ PLAYER_CSMODE_39, + /* 0x28 */ PLAYER_CSMODE_40, + /* 0x29 */ PLAYER_CSMODE_41, + /* 0x2A */ PLAYER_CSMODE_42, + /* 0x2B */ PLAYER_CSMODE_43, + /* 0x2C */ PLAYER_CSMODE_44, + /* 0x2D */ PLAYER_CSMODE_45, + /* 0x2E */ PLAYER_CSMODE_46, + /* 0x2F */ PLAYER_CSMODE_47, + /* 0x30 */ PLAYER_CSMODE_48, + /* 0x31 */ PLAYER_CSMODE_49, + /* 0x32 */ PLAYER_CSMODE_50, + /* 0x33 */ PLAYER_CSMODE_51, + /* 0x34 */ PLAYER_CSMODE_52, + /* 0x35 */ PLAYER_CSMODE_53, + /* 0x36 */ PLAYER_CSMODE_54, + /* 0x37 */ PLAYER_CSMODE_55, + /* 0x38 */ PLAYER_CSMODE_56, + /* 0x39 */ PLAYER_CSMODE_57, + /* 0x3A */ PLAYER_CSMODE_58, + /* 0x3B */ PLAYER_CSMODE_59, + /* 0x3C */ PLAYER_CSMODE_60, + /* 0x3D */ PLAYER_CSMODE_61, + /* 0x3E */ PLAYER_CSMODE_62, + /* 0x3F */ PLAYER_CSMODE_63, + /* 0x40 */ PLAYER_CSMODE_64, + /* 0x41 */ PLAYER_CSMODE_65, + /* 0x42 */ PLAYER_CSMODE_66, + /* 0x43 */ PLAYER_CSMODE_67, + /* 0x44 */ PLAYER_CSMODE_68, + /* 0x45 */ PLAYER_CSMODE_69, + /* 0x46 */ PLAYER_CSMODE_70, + /* 0x47 */ PLAYER_CSMODE_71, + /* 0x48 */ PLAYER_CSMODE_72, + /* 0x49 */ PLAYER_CSMODE_73, + /* 0x4A */ PLAYER_CSMODE_74, + /* 0x4B */ PLAYER_CSMODE_75, + /* 0x4C */ PLAYER_CSMODE_76, + /* 0x4D */ PLAYER_CSMODE_77, + /* 0x4E */ PLAYER_CSMODE_78, + /* 0x4F */ PLAYER_CSMODE_79, + /* 0x50 */ PLAYER_CSMODE_80, + /* 0x51 */ PLAYER_CSMODE_81, + /* 0x52 */ PLAYER_CSMODE_82, + /* 0x53 */ PLAYER_CSMODE_83, + /* 0x54 */ PLAYER_CSMODE_84, + /* 0x55 */ PLAYER_CSMODE_85, + /* 0x56 */ PLAYER_CSMODE_86, + /* 0x57 */ PLAYER_CSMODE_87, + /* 0x58 */ PLAYER_CSMODE_88, + /* 0x59 */ PLAYER_CSMODE_89, + /* 0x5A */ PLAYER_CSMODE_90, + /* 0x5B */ PLAYER_CSMODE_91, + /* 0x5C */ PLAYER_CSMODE_92, + /* 0x5D */ PLAYER_CSMODE_93, + /* 0x5E */ PLAYER_CSMODE_94, + /* 0x5F */ PLAYER_CSMODE_95, + /* 0x60 */ PLAYER_CSMODE_96, + /* 0x61 */ PLAYER_CSMODE_97, + /* 0x62 */ PLAYER_CSMODE_98, + /* 0x63 */ PLAYER_CSMODE_99, + /* 0x64 */ PLAYER_CSMODE_100, + /* 0x65 */ PLAYER_CSMODE_101, + /* 0x66 */ PLAYER_CSMODE_102, + /* 0x67 */ PLAYER_CSMODE_MAX +} PlayerCutsceneMode; + typedef struct { /* 0x00 */ f32 unk_00; /* 0x04 */ f32 unk_04; @@ -556,7 +663,7 @@ typedef struct Player { /* 0x0698 */ f32 targetActorDistance; /* 0x069C */ char unk_69C[0x004]; /* 0x06A0 */ f32 unk_6A0; - /* 0x06A4 */ f32 unk_6A4; + /* 0x06A4 */ f32 closestSecretDistSq; /* 0x06A8 */ Actor* unk_6A8; /* 0x06AC */ s8 unk_6AC; /* 0x06AD */ u8 unk_6AD; diff --git a/spec b/spec index a8a6dbb534..5ab17d2ee1 100644 --- a/spec +++ b/spec @@ -36,7 +36,7 @@ beginseg include "build/src/libultra/os/initialize.o" include "build/src/libultra/libc/ll.o" include "build/src/libultra/os/exceptasm.o" - include "build/src/libultra/os/dequeuethread.o" + include "build/src/libultra/os/thread.o" include "build/src/libultra/os/destroythread.o" include "build/src/libultra/libc/bzero.o" include "build/src/libultra/os/parameters.o" diff --git a/src/code/code_80097A00.c b/src/code/code_80097A00.c index 8b9e76f1b6..550fb8396a 100644 --- a/src/code/code_80097A00.c +++ b/src/code/code_80097A00.c @@ -78,136 +78,141 @@ u32 gGsFlagsMasks[] = { 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000 }; u32 gGsFlagsShifts[] = { 0, 8, 16, 24 }; void* gItemIcons[] = { - gDekuStickIconTex, - gDekuNutIconTex, - gBombIconTex, - gFairyBowIconTex, - gFireArrowIconTex, - gDinsFireIconTex, - gFairySlingshotIconTex, - gFairyOcarinaIconTex, - gOcarinaofTimeIconTex, - gBombchuIconTex, - gHookshotIconTex, - gLongshotIconTex, - gIceArrowIconTex, - gFaroresWindIconTex, - gBoomerangIconTex, - gLensofTruthIconTex, - gMagicBeansIconTex, - gMegatonHammerIconTex, - gLightArrowIconTex, - gNayrusLoveIconTex, - gEmptyBottleIconTex, - gRedPotionIconTex, - gGreenPotionIconTex, - gBluePotionIconTex, - gBottledFairyIconTex, - gFishIconTex, - gMilkFullIconTex, - gRutosLetterIconTex, - gBlueFireIconTex, - gBugIconTex, - gBigPoeIconTex, - gMilkhalfIconTex, - gPoeIconTex, - gWeirdEggIconTex, - gCuccoIconTex, - gZeldasLetterIconTex, - gKeatonMaskIconTex, - gSkullMaskIconTex, - gSpookyMaskIconTex, - gBunnyHoodIconTex, - gGoronMaskIconTex, - gZoraMaskIconTex, - gGerudoMaskIconTex, - gMaskofTruthIconTex, - gSoldOutIconTex, - gPocketEggIconTex, - gPocketCuccoIconTex, - gCojiroIconTex, - gOddMushroomIconTex, - gOddPotionIconTex, - gPoachersSawIconTex, - gBrokenBiggoronSwordIconTex, - gPrescriptionIconTex, - gEyeBallFrogIconTex, - gEyeDropsIconTex, - gClaimCheckIconTex, - gFairyBowFireIconTex, - gFairyBowIceIconTex, - gFairyBowLightIconTex, - gKokiriSwordIconTex, - gMasterSwordIconTex, - gBiggoronSwordIconTex, - gDekuShieldIconTex, - gHylianShieldIconTex, - gMirrorShieldIconTex, - gKokiriTunicIconTex, - gGoronTunicIconTex, - gZoraTunicIconTex, - gKokiriBootsIconTex, - gIronBootsIconTex, - gHoverBootsIconTex, - gBulletBag30IconTex, - gBulletBag40IconTex, - gBulletBag50IconTex, - gQuiver30IconTex, - gQuiver40IconTex, - gQuiver50IconTex, - gBombBag20IconTex, - gBombBag30IconTex, - gBombBag40IconTex, - gGoronsBraceletIconTex, - gSilverGauntletsIconTex, - gGoldenGauntletsIconTex, - gSilverScaleIconTex, - gGoldenScaleIconTex, - gBrokenGiantsKnifeIconTex, - gAdultsWalletIconTex, - gGiantsWalletIconTex, - gDekuSeedsIconTex, - gFishingPoleIconTex, - gSongNoteTex, - gSongNoteTex, - gSongNoteTex, - gSongNoteTex, - gSongNoteTex, - gSongNoteTex, - gSongNoteTex, - gSongNoteTex, - gSongNoteTex, - gSongNoteTex, - gSongNoteTex, - gSongNoteTex, - gForestMedallionIconTex, - gFireMedallionIconTex, - gWaterMedallionIconTex, - gSpiritMedallionIconTex, - gShadowMedallionIconTex, - gLightMedallionIconTex, - gKokiriEmeraldIconTex, - gGoronRubyIconTex, - gZoraSapphireIconTex, - gStoneOfAgonyIconTex, - gGerudosCardIconTex, - gGoldSkulltulaIconTex, - gHeartContainerIconTex, - gUnusedPieceOfHeartIconTex, - gBossKeyIconTex, - gDungeonMapIconTex, - gCompassIconTex, - gBossKeyIconTex, - gSmallMagicJarIconTex, - gBigMagicJarIconTex, - gHeartPieceIcon1Tex, - gHeartPieceIcon2Tex, - gHeartPieceIcon3Tex, - gOcarinaCUpTex, - gOcarinaCDownTex, - gOcarinaCLeftTex, - gOcarinaCRightTex, - gOcarinaATex, + // icon_item_static 32x32 rgba32 + gItemIconDekuStickTex, // ITEM_DEKU_STICK + gItemIconDekuNutTex, // ITEM_DEKU_NUT + gItemIconBombTex, // ITEM_BOMB + gItemIconBowTex, // ITEM_BOW + gItemIconArrowFireTex, // ITEM_ARROW_FIRE + gItemIconDinsFireTex, // ITEM_DINS_FIRE + gItemIconSlingshotTex, // ITEM_SLINGSHOT + gItemIconOcarinaFairyTex, // ITEM_OCARINA_FAIRY + gItemIconOcarinaOfTimeTex, // ITEM_OCARINA_OF_TIME + gItemIconBombchuTex, // ITEM_BOMBCHU + gItemIconHookshotTex, // ITEM_HOOKSHOT + gItemIconLongshotTex, // ITEM_LONGSHOT + gItemIconArrowIceTex, // ITEM_ARROW_ICE + gItemIconFaroresWindTex, // ITEM_FARORES_WIND + gItemIconBoomerangTex, // ITEM_BOOMERANG + gItemIconLensOfTruthTex, // ITEM_LENS_OF_TRUTH + gItemIconMagicBeanTex, // ITEM_MAGIC_BEAN + gItemIconHammerTex, // ITEM_HAMMER + gItemIconArrowLightTex, // ITEM_ARROW_LIGHT + gItemIconNayrusLoveTex, // ITEM_NAYRUS_LOVE + gItemIconBottleEmptyTex, // ITEM_BOTTLE_EMPTY + gItemIconBottlePotionRedTex, // ITEM_BOTTLE_POTION_RED + gItemIconBottlePotionGreenTex, // ITEM_BOTTLE_POTION_GREEN + gItemIconBottlePotionBlueTex, // ITEM_BOTTLE_POTION_BLUE + gItemIconBottleFairyTex, // ITEM_BOTTLE_FAIRY + gItemIconBottleFishTex, // ITEM_BOTTLE_FISH + gItemIconBottleMilkFullTex, // ITEM_BOTTLE_MILK_FULL + gItemIconBottleRutosLetterTex, // ITEM_BOTTLE_RUTOS_LETTER + gItemIconBottleBlueFireTex, // ITEM_BOTTLE_BLUE_FIRE + gItemIconBottleBugTex, // ITEM_BOTTLE_BUG + gItemIconBottleBigPoeTex, // ITEM_BOTTLE_BIG_POE + gItemIconBottleMilkHalfTex, // ITEM_BOTTLE_MILK_HALF + gItemIconBottlePoeTex, // ITEM_BOTTLE_POE + gItemIconWeirdEggTex, // ITEM_WEIRD_EGG + gItemIconChickenTex, // ITEM_CHICKEN + gItemIconZeldasLetterTex, // ITEM_ZELDAS_LETTER + gItemIconMaskKeatonTex, // ITEM_MASK_KEATON + gItemIconMaskSkullTex, // ITEM_MASK_SKULL + gItemIconMaskSpookyTex, // ITEM_MASK_SPOOKY + gItemIconMaskBunnyHoodTex, // ITEM_MASK_BUNNY_HOOD + gItemIconMaskGoronTex, // ITEM_MASK_GORON + gItemIconMaskZoraTex, // ITEM_MASK_ZORA + gItemIconMaskGerudoTex, // ITEM_MASK_GERUDO + gItemIconMaskTruthTex, // ITEM_MASK_TRUTH + gItemIconSoldOutTex, // ITEM_SOLD_OUT + gItemIconPocketEggTex, // ITEM_POCKET_EGG + gItemIconPocketCuccoTex, // ITEM_POCKET_CUCCO + gItemIconCojiroTex, // ITEM_COJIRO + gItemIconOddMushroomTex, // ITEM_ODD_MUSHROOM + gItemIconOddPotionTex, // ITEM_ODD_POTION + gItemIconPoachersSawTex, // ITEM_POACHERS_SAW + gItemIconBrokenGoronsSwordTex, // ITEM_BROKEN_GORONS_SWORD + gItemIconPrescriptionTex, // ITEM_PRESCRIPTION + gItemIconEyeballFrogTex, // ITEM_EYEBALL_FROG + gItemIconEyeDropsTex, // ITEM_EYE_DROPS + gItemIconClaimCheckTex, // ITEM_CLAIM_CHECK + gItemIconBowFireTex, // ITEM_BOW_FIRE + gItemIconBowIceTex, // ITEM_BOW_ICE + gItemIconBowLightTex, // ITEM_BOW_LIGHT + gItemIconSwordKokiriTex, // ITEM_SWORD_KOKIRI + gItemIconSwordMasterTex, // ITEM_SWORD_MASTER + gItemIconSwordBiggoronTex, // ITEM_SWORD_BIGGORON + gItemIconShieldDekuTex, // ITEM_SHIELD_DEKU + gItemIconShieldHylianTex, // ITEM_SHIELD_HYLIAN + gItemIconShieldMirrorTex, // ITEM_SHIELD_MIRROR + gItemIconTunicKokiriTex, // ITEM_TUNIC_KOKIRI + gItemIconTunicGoronTex, // ITEM_TUNIC_GORON + gItemIconTunicZoraTex, // ITEM_TUNIC_ZORA + gItemIconBootsKokiriTex, // ITEM_BOOTS_KOKIRI + gItemIconBootsIronTex, // ITEM_BOOTS_IRON + gItemIconBootsHoverTex, // ITEM_BOOTS_HOVER + gItemIconBulletBag30Tex, // ITEM_BULLET_BAG_30 + gItemIconBulletBag40Tex, // ITEM_BULLET_BAG_40 + gItemIconBulletBag50Tex, // ITEM_BULLET_BAG_50 + gItemIconQuiver30Tex, // ITEM_QUIVER_30 + gItemIconQuiver40Tex, // ITEM_QUIVER_40 + gItemIconQuiver50Tex, // ITEM_QUIVER_50 + gItemIconBombBag20Tex, // ITEM_BOMB_BAG_20 + gItemIconBombBag30Tex, // ITEM_BOMB_BAG_30 + gItemIconBombBag40Tex, // ITEM_BOMB_BAG_40 + gItemIconGoronsBraceletTex, // ITEM_STRENGTH_GORONS_BRACELET + gItemIconSilverGauntletsTex, // ITEM_STRENGTH_SILVER_GAUNTLETS + gItemIconGoldenGauntletsTex, // ITEM_STRENGTH_GOLD_GAUNTLETS + gItemIconScaleSilverTex, // ITEM_SCALE_SILVER + gItemIconScaleGoldenTex, // ITEM_SCALE_GOLDEN + gItemIconBrokenGiantsKnifeTex, // ITEM_GIANTS_KNIFE + gItemIconAdultsWalletTex, // ITEM_ADULTS_WALLET + gItemIconGiantsWalletTex, // ITEM_GIANTS_WALLET + gItemIconDekuSeedsTex, // ITEM_DEKU_SEEDS + gItemIconFishingPoleTex, // ITEM_FISHING_POLE + // icon_item_static 16x24 ia8 + gSongNoteTex, // ITEM_SONG_MINUET + gSongNoteTex, // ITEM_SONG_BOLERO + gSongNoteTex, // ITEM_SONG_SERENADE + gSongNoteTex, // ITEM_SONG_REQUIEM + gSongNoteTex, // ITEM_SONG_NOCTURNE + gSongNoteTex, // ITEM_SONG_PRELUDE + gSongNoteTex, // ITEM_SONG_LULLABY + gSongNoteTex, // ITEM_SONG_EPONA + gSongNoteTex, // ITEM_SONG_SARIA + gSongNoteTex, // ITEM_SONG_SUN + gSongNoteTex, // ITEM_SONG_TIME + gSongNoteTex, // ITEM_SONG_STORMS + // icon_item_24static 24x24 rgba32 + gQuestIconMedallionForestTex, // ITEM_MEDALLION_FOREST + gQuestIconMedallionFireTex, // ITEM_MEDALLION_FIRE + gQuestIconMedallionWaterTex, // ITEM_MEDALLION_WATER + gQuestIconMedallionSpiritTex, // ITEM_MEDALLION_SPIRIT + gQuestIconMedallionShadowTex, // ITEM_MEDALLION_SHADOW + gQuestIconMedallionLightTex, // ITEM_MEDALLION_LIGHT + gQuestIconKokiriEmeraldTex, // ITEM_KOKIRI_EMERALD + gQuestIconGoronRubyTex, // ITEM_GORON_RUBY + gQuestIconZoraSapphireTex, // ITEM_ZORA_SAPPHIRE + gQuestIconStoneOfAgonyTex, // ITEM_STONE_OF_AGONY + gQuestIconGerudosCardTex, // ITEM_GERUDOS_CARD + gQuestIconGoldSkulltulaTex, // ITEM_SKULL_TOKEN + gQuestIconHeartContainerTex, // ITEM_HEART_CONTAINER + gQuestIconHeartPieceTex, // ITEM_HEART_PIECE + gQuestIconDungeonBossKeyTex, // ITEM_DUNGEON_BOSS_KEY + gQuestIconDungeonMapTex, // ITEM_DUNGEON_COMPASS (swapped with map (inconsequential)) + gQuestIconDungeonCompassTex, // ITEM_DUNGEON_MAP (swapped with compass (inconsequential)) + gQuestIconDungeonBossKeyTex, // ITEM_SMALL_KEY (but texture is boss key (inconsequential)) + gQuestIconMagicJarSmallTex, // ITEM_MAGIC_JAR_SMALL + gQuestIconMagicJarBigTex, // ITEM_MAGIC_JAR_BIG + // icon_item_static 48x48 ia8 + gHeartPieceIcon1Tex, // ITEM_HEART_PIECE_2 + gHeartPieceIcon2Tex, // ITEM_INVALID_1 + gHeartPieceIcon3Tex, // ITEM_INVALID_2 + // parameter_static 16x16 ia8 + gOcarinaBtnIconCUpTex, // ITEM_INVALID_3 + gOcarinaBtnIconCDownTex, // ITEM_INVALID_4 + gOcarinaBtnIconCLeftTex, // ITEM_INVALID_5 + gOcarinaBtnIconCRightTex, // ITEM_INVALID_6 + gOcarinaBtnIconATex, // ITEM_INVALID_7 }; // Used to map item IDs to inventory slots diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 8197e5f18e..efc057dfd5 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -1025,7 +1025,7 @@ void Actor_MountHorse(PlayState* play, Player* player, Actor* horse) { } s32 func_8002DEEC(Player* player) { - return (player->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (player->csMode != 0); + return (player->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (player->csMode != PLAYER_CSMODE_NONE); } void func_8002DF18(PlayState* play, Player* player) { @@ -1570,7 +1570,30 @@ u32 Actor_HasParent(Actor* actor, PlayState* play) { } } -s32 func_8002F434(Actor* actor, PlayState* play, s32 getItemId, f32 xzRange, f32 yRange) { +/** + * This function covers various interactions with the player actor, using Get Item IDs (see `GetItemID` enum). + * It is typically used to give items to the player, but also has other purposes. + * + * This function carries a get item request to the player actor if context allows it (e.g. the player is in range and + * not busy with certain things). The player actor performs the requested action itself. + * + * The following description of what the `getItemId` values can do is provided here for completeness, but these + * behaviors are entirely out of the scope of this function. All behavior is defined by the player actor. + * + * - Positive values (`GI_NONE < getItemId < GI_MAX`): + * Give an item to the player. The player may not get it immediately (for example if diving), but is expected to + * in the near future. + * - Negative values (`-GI_MAX < getItemId < GI_NONE`): + * Used by treasure chests to indicate the chest can be opened (by pressing A). + * The item gotten corresponds to the positive Get Item ID `abs(getItemId)`. + * - `GI_NONE`: + * Allows the player to pick up the actor (by pressing A), to carry it around. + * - `GI_MAX`: + * Allows the player to catch specific actors in a bottle. + * + * @return true If the player actor is capable of accepting the offer. + */ +s32 Actor_OfferGetItem(Actor* actor, PlayState* play, s32 getItemId, f32 xzRange, f32 yRange) { Player* player = GET_PLAYER(play); if (!(player->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_12 | PLAYER_STATE1_13 | PLAYER_STATE1_14 | @@ -1596,12 +1619,12 @@ s32 func_8002F434(Actor* actor, PlayState* play, s32 getItemId, f32 xzRange, f32 return false; } -void func_8002F554(Actor* actor, PlayState* play, s32 getItemId) { - func_8002F434(actor, play, getItemId, 50.0f, 10.0f); +s32 Actor_OfferGetItemNearby(Actor* actor, PlayState* play, s32 getItemId) { + return Actor_OfferGetItem(actor, play, getItemId, 50.0f, 10.0f); } -void func_8002F580(Actor* actor, PlayState* play) { - func_8002F554(actor, play, GI_NONE); +s32 Actor_OfferCarry(Actor* actor, PlayState* play) { + return Actor_OfferGetItemNearby(actor, play, GI_NONE); } u32 Actor_HasNoParent(Actor* actor, PlayState* play) { @@ -1627,11 +1650,11 @@ void func_8002F5C4(Actor* actorA, Actor* actorB, PlayState* play) { actorA->parent = NULL; } -void func_8002F5F0(Actor* actor, PlayState* play) { +void Actor_SetClosestSecretDistance(Actor* actor, PlayState* play) { Player* player = GET_PLAYER(play); - if (actor->xyzDistToPlayerSq < player->unk_6A4) { - player->unk_6A4 = actor->xyzDistToPlayerSq; + if (actor->xyzDistToPlayerSq < player->closestSecretDistSq) { + player->closestSecretDistSq = actor->xyzDistToPlayerSq; } } @@ -2218,25 +2241,25 @@ void Actor_Draw(PlayState* play, Actor* actor) { if (actor->colorFilterTimer != 0) { Color_RGBA8 color = { 0, 0, 0, 255 }; - if (actor->colorFilterParams & 0x8000) { - color.r = color.g = color.b = ((actor->colorFilterParams & 0x1F00) >> 5) | 7; - } else if (actor->colorFilterParams & 0x4000) { - color.r = ((actor->colorFilterParams & 0x1F00) >> 5) | 7; + if (actor->colorFilterParams & COLORFILTER_COLORFLAG_GRAY) { + color.r = color.g = color.b = COLORFILTER_GET_COLORINTENSITY(actor->colorFilterParams) | 7; + } else if (actor->colorFilterParams & COLORFILTER_COLORFLAG_RED) { + color.r = COLORFILTER_GET_COLORINTENSITY(actor->colorFilterParams) | 7; } else { - color.b = ((actor->colorFilterParams & 0x1F00) >> 5) | 7; + color.b = COLORFILTER_GET_COLORINTENSITY(actor->colorFilterParams) | 7; } - if (actor->colorFilterParams & 0x2000) { - func_80026860(play, &color, actor->colorFilterTimer, actor->colorFilterParams & 0xFF); + if (actor->colorFilterParams & COLORFILTER_BUFFLAG_XLU) { + func_80026860(play, &color, actor->colorFilterTimer, COLORFILTER_GET_DURATION(actor->colorFilterParams)); } else { - func_80026400(play, &color, actor->colorFilterTimer, actor->colorFilterParams & 0xFF); + func_80026400(play, &color, actor->colorFilterTimer, COLORFILTER_GET_DURATION(actor->colorFilterParams)); } } actor->draw(actor, play); if (actor->colorFilterTimer != 0) { - if (actor->colorFilterParams & 0x2000) { + if (actor->colorFilterParams & COLORFILTER_BUFFLAG_XLU) { func_80026A6C(play); } else { func_80026608(play); @@ -2500,7 +2523,10 @@ void func_800315AC(PlayState* play, ActorContext* actorCtx) { CLOSE_DISPS(play->state.gfxCtx, "../z_actor.c", 6563); } -void func_80031A28(PlayState* play, ActorContext* actorCtx) { +/** + * Kill every actor which depends on an object that is not loaded. + */ +void Actor_KillAllWithMissingObject(PlayState* play, ActorContext* actorCtx) { Actor* actor; s32 i; @@ -2530,6 +2556,9 @@ void Actor_FreezeAllEnemies(PlayState* play, ActorContext* actorCtx, s32 duratio } } +/** + * Kill actors on room change and update flags accordingly + */ void func_80031B14(PlayState* play, ActorContext* actorCtx) { Actor* actor; s32 i; @@ -3633,12 +3662,12 @@ void func_8003424C(PlayState* play, Vec3f* arg1) { CollisionCheck_SpawnShieldParticlesMetal(play, arg1); } -void Actor_SetColorFilter(Actor* actor, s16 colorFlag, s16 colorIntensityMax, s16 xluFlag, s16 duration) { - if ((colorFlag == 0x8000) && !(colorIntensityMax & 0x8000)) { +void Actor_SetColorFilter(Actor* actor, s16 colorFlag, s16 colorIntensityMax, s16 bufFlag, s16 duration) { + if ((colorFlag == COLORFILTER_COLORFLAG_GRAY) && !(colorIntensityMax & COLORFILTER_INTENSITY_FLAG)) { Audio_PlayActorSfx2(actor, NA_SE_EN_LIGHT_ARROW_HIT); } - actor->colorFilterParams = colorFlag | xluFlag | ((colorIntensityMax & 0xF8) << 5) | duration; + actor->colorFilterParams = colorFlag | bufFlag | ((colorIntensityMax & 0xF8) << 5) | duration; actor->colorFilterTimer = duration; } @@ -4061,7 +4090,7 @@ s32 func_80035124(Actor* actor, PlayState* play) { ret = 1; } else { actor->shape.rot.x = actor->shape.rot.z = 0; - func_8002F580(actor, play); + Actor_OfferCarry(actor, play); } break; case 1: diff --git a/src/code/z_camera.c b/src/code/z_camera.c index 2cabf9b261..dcd9c2c399 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -5260,7 +5260,7 @@ s32 Camera_Unique9(Camera* camera) { CAM_INTERFACE_FIELD(CAM_LETTERBOX_IGNORE, CAM_HUD_VISIBILITY(rwData->curKeyFrame->unk_01), 0)); } else if (camera->player->stateFlags1 & PLAYER_STATE1_27 && player->currentBoots != PLAYER_BOOTS_IRON) { - func_8002DF38(camera->play, camera->target, 8); + func_8002DF38(camera->play, camera->target, PLAYER_CSMODE_8); osSyncPrintf("camera: demo: player demo set WAIT\n"); } else { osSyncPrintf("camera: demo: player demo set %d\n", rwData->curKeyFrame->unk_01); @@ -5464,9 +5464,9 @@ s32 Camera_Unique9(Camera* camera) { rwData->rollTarget = CAM_DEG_TO_BINANG(rwData->curKeyFrame->rollTargetInit); } - action = rwData->curKeyFrame->actionFlags & 0x1F; + action = ONEPOINT_CS_GET_ACTION(rwData->curKeyFrame); switch (action) { - case 15: + case ONEPOINT_CS_ACTION_ID_15: // static copy to at/eye/fov/roll *at = rwData->atTarget; *eyeNext = rwData->eyeTarget; @@ -5474,7 +5474,8 @@ s32 Camera_Unique9(Camera* camera) { camera->roll = rwData->rollTarget; camera->stateFlags |= CAM_STATE_10; break; - case 21: + + case ONEPOINT_CS_ACTION_ID_21: // same as 15, but with unk_38 ? if (rwData->unk_38 == 0) { rwData->unk_38 = 1; @@ -5487,7 +5488,8 @@ s32 Camera_Unique9(Camera* camera) { camera->fov = rwData->fovTarget; camera->roll = rwData->rollTarget; break; - case 16: + + case ONEPOINT_CS_ACTION_ID_16: // same as 21, but don't unset CAM_STATE_3 on stateFlags if (rwData->unk_38 == 0) { rwData->unk_38 = 1; @@ -5500,7 +5502,8 @@ s32 Camera_Unique9(Camera* camera) { camera->fov = rwData->fovTarget; camera->roll = rwData->rollTarget; break; - case 1: + + case ONEPOINT_CS_ACTION_ID_1: // linear interpolation of eye/at using the geographic coordinates OLib_Vec3fDiffToVecGeo(&eyeNextAtOffset, at, eyeNext); OLib_Vec3fDiffToVecGeo(&rwData->atEyeOffsetTarget, &rwData->atTarget, &rwData->eyeTarget); @@ -5512,7 +5515,8 @@ s32 Camera_Unique9(Camera* camera) { eyeNextAtOffset.yaw + ((s16)(rwData->atEyeOffsetTarget.yaw - eyeNextAtOffset.yaw) * invKeyFrameTimer); Camera_AddVecGeoToVec3f(&eyeTarget, at, &scratchGeo); goto setEyeNext; - case 2: + + case ONEPOINT_CS_ACTION_ID_2: // linear interpolation of eye/at using the eyeTarget invKeyFrameTimer = 1.0f / rwData->keyFrameTimer; eyeTarget.x = F32_LERPIMP(camera->eyeNext.x, rwData->eyeTarget.x, invKeyFrameTimer); @@ -5527,8 +5531,8 @@ s32 Camera_Unique9(Camera* camera) { camera->eyeNext.z = Camera_LERPFloorF(eyeTarget.z, camera->eyeNext.z, rwData->curKeyFrame->lerpStepScale, 1.0f); FALLTHROUGH; - case 9: - case 10: + case ONEPOINT_CS_ACTION_ID_9: + case ONEPOINT_CS_ACTION_ID_10: // linear interpolation of at/fov/roll invKeyFrameTimer = 1.0f / rwData->keyFrameTimer; atTarget.x = F32_LERPIMP(camera->at.x, rwData->atTarget.x, invKeyFrameTimer); @@ -5542,7 +5546,8 @@ s32 Camera_Unique9(Camera* camera) { camera->roll = Camera_LERPFloorS(BINANG_LERPIMPINV(camera->roll, rwData->rollTarget, rwData->keyFrameTimer), camera->roll, rwData->curKeyFrame->lerpStepScale, 0xA); break; - case 4: + + case ONEPOINT_CS_ACTION_ID_4: // linear interpolation of eye/at/fov/roll using the step scale, and spherical coordinates OLib_Vec3fDiffToVecGeo(&eyeNextAtOffset, at, eyeNext); OLib_Vec3fDiffToVecGeo(&rwData->atEyeOffsetTarget, &rwData->atTarget, &rwData->eyeTarget); @@ -5554,7 +5559,8 @@ s32 Camera_Unique9(Camera* camera) { rwData->curKeyFrame->lerpStepScale, 1); Camera_AddVecGeoToVec3f(eyeNext, at, &scratchGeo); goto setAtFOVRoll; - case 3: + + case ONEPOINT_CS_ACTION_ID_3: // linear interplation of eye/at/fov/roll using the step scale using eyeTarget camera->eyeNext.x = Camera_LERPCeilF(rwData->eyeTarget.x, camera->eyeNext.x, rwData->curKeyFrame->lerpStepScale, 1.0f); @@ -5563,8 +5569,8 @@ s32 Camera_Unique9(Camera* camera) { camera->eyeNext.z = Camera_LERPCeilF(rwData->eyeTarget.z, camera->eyeNext.z, rwData->curKeyFrame->lerpStepScale, 1.0f); FALLTHROUGH; - case 11: - case 12: + case ONEPOINT_CS_ACTION_ID_11: + case ONEPOINT_CS_ACTION_ID_12: setAtFOVRoll: // linear interpolation of at/fov/roll using the step scale. camera->at.x = Camera_LERPCeilF(rwData->atTarget.x, camera->at.x, rwData->curKeyFrame->lerpStepScale, 1.0f); @@ -5573,7 +5579,8 @@ s32 Camera_Unique9(Camera* camera) { camera->fov = Camera_LERPCeilF(rwData->fovTarget, camera->fov, rwData->curKeyFrame->lerpStepScale, 1.0f); camera->roll = Camera_LERPCeilS(rwData->rollTarget, camera->roll, rwData->curKeyFrame->lerpStepScale, 1); break; - case 13: + + case ONEPOINT_CS_ACTION_ID_13: // linear interpolation of at, with rotation around eyeTargetInit.y camera->at.x = Camera_LERPCeilF(rwData->atTarget.x, camera->at.x, rwData->curKeyFrame->lerpStepScale, 1.0f); camera->at.y += camera->playerPosDelta.y * rwData->curKeyFrame->lerpStepScale; @@ -5603,18 +5610,20 @@ s32 Camera_Unique9(Camera* camera) { camera->fov, rwData->curKeyFrame->lerpStepScale, 1.0f); camera->roll = Camera_LERPCeilS(rwData->rollTarget, camera->roll, rwData->curKeyFrame->lerpStepScale, 1); break; - case 24: + + case ONEPOINT_CS_ACTION_ID_24: // Set current keyframe to the roll target? rwData->curKeyFrameIdx = rwData->rollTarget; break; - case 19: { + + case ONEPOINT_CS_ACTION_ID_19: { // Change the parent camera (or default)'s mode to normal s32 camIdx = camera->parentCamId <= CAM_ID_NONE ? CAM_ID_MAIN : camera->parentCamId; Camera_ChangeModeFlags(camera->play->cameraPtrs[camIdx], CAM_MODE_NORMAL, 1); } FALLTHROUGH; - case 18: { + case ONEPOINT_CS_ACTION_ID_18: { // copy the current camera to the parent (or default)'s camera. s32 camIdx = camera->parentCamId <= CAM_ID_NONE ? CAM_ID_MAIN : camera->parentCamId; Camera* cam = camera->play->cameraPtrs[camIdx]; @@ -5632,11 +5641,11 @@ s32 Camera_Unique9(Camera* camera) { *eye = *eyeNext; - if (rwData->curKeyFrame->actionFlags & 0x80) { + if (rwData->curKeyFrame->actionFlags & ONEPOINT_CS_ACTION_FLAG_BGCHECK) { Camera_BGCheck(camera, at, eye); } - if (rwData->curKeyFrame->actionFlags & 0x40) { + if (rwData->curKeyFrame->actionFlags & ONEPOINT_CS_ACTION_FLAG_40) { // Set the player's position camera->player->actor.world.pos.x = rwData->playerPos.x; camera->player->actor.world.pos.z = rwData->playerPos.z; @@ -6072,7 +6081,7 @@ s32 Camera_Demo5(Camera* camera) { ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D79C); if ((targetScreenPosX < 0x15) || (targetScreenPosX >= 0x12C) || (targetScreenPosY < 0x29) || (targetScreenPosY >= 0xC8)) { - D_8011D79C[0].actionFlags = 0x41; + D_8011D79C[0].actionFlags = ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, true, false); D_8011D79C[0].atTargetInit.y = -30.0f; D_8011D79C[0].atTargetInit.x = 0.0f; D_8011D79C[0].atTargetInit.z = 0.0f; @@ -6156,8 +6165,8 @@ s32 Camera_Demo5(Camera* camera) { targethead.pos.x += 50.0f * Math_SinS(sp4A - 0x7FFF); targethead.pos.z += 50.0f * Math_CosS(sp4A - 0x7FFF); if (Camera_BGCheck(camera, &playerhead.pos, &targethead.pos)) { - D_8011D954[1].actionFlags = 0xC1; - D_8011D954[2].actionFlags = 0x8F; + D_8011D954[1].actionFlags = ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, true, true); + D_8011D954[2].actionFlags = ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true); } else { D_8011D954[2].timerInit = (s16)(eyeTargetDist * 0.004f) + 6; } @@ -6181,7 +6190,7 @@ s32 Camera_Demo5(Camera* camera) { Actor_GetFocus(&targethead, camera->target); if (Camera_BGCheck(camera, &playerhead.pos, &targethead.pos)) { D_8011D9F4[1].timerInit = 4; - D_8011D9F4[1].actionFlags = 0x8F; + D_8011D9F4[1].actionFlags = ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true); } else { t = eyeTargetDist * 0.005f; D_8011D9F4[1].timerInit = t + 8; @@ -6218,14 +6227,14 @@ s32 Camera_Demo5(Camera* camera) { framesDiff = camera->play->state.frames - sDemo5PrevAction12Frame; if (player->stateFlags1 & PLAYER_STATE1_11) { // holding object over head. - func_8002DF54(camera->play, camera->target, 8); + func_8002DF54(camera->play, camera->target, PLAYER_CSMODE_8); } else if (ABS(framesDiff) > 3000) { - func_8002DF54(camera->play, camera->target, 12); + func_8002DF54(camera->play, camera->target, PLAYER_CSMODE_12); } else { - func_8002DF54(camera->play, camera->target, 69); + func_8002DF54(camera->play, camera->target, PLAYER_CSMODE_69); } } else { - func_8002DF54(camera->play, camera->target, 1); + func_8002DF54(camera->play, camera->target, PLAYER_CSMODE_1); } } @@ -6285,7 +6294,7 @@ s32 Camera_Demo6(Camera* camera) { FALLTHROUGH; case 1: if (stateTimers[camera->animState] < rwData->animTimer) { - func_8002DF54(camera->play, &camera->player->actor, 8); + func_8002DF54(camera->play, &camera->player->actor, PLAYER_CSMODE_8); Actor_GetWorld(&focusPosRot, camFocus); rwData->atTarget.x = focusPosRot.pos.x; rwData->atTarget.y = focusPosRot.pos.y - 20.0f; @@ -7813,8 +7822,8 @@ void Camera_Finish(Camera* camera) { player->actor.freezeTimer = 0; player->stateFlags1 &= ~PLAYER_STATE1_29; - if (player->csMode != 0) { - func_8002DF54(camera->play, &player->actor, 7); + if (player->csMode != PLAYER_CSMODE_NONE) { + func_8002DF54(camera->play, &player->actor, PLAYER_CSMODE_7); osSyncPrintf("camera: player demo end!!\n"); } diff --git a/src/code/z_camera_data.inc.c b/src/code/z_camera_data.inc.c index eeb2856828..6a3de36890 100644 --- a/src/code/z_camera_data.inc.c +++ b/src/code/z_camera_data.inc.c @@ -2675,105 +2675,311 @@ s32 sDemo5PrevSfxFrame = -200; // target is player, far from eye OnePointCsFull D_8011D6AC[] = { - { // initflags & 0x00FF (at): 2, atTarget is view lookAt + atInit - // initFlags & 0xFF00 (eye): none - // action: 15, copy at, eye, roll, fov to camera - // result: eye remains in the same locaiton, at is View's lookAt - 0x8F, - 0xFF, - 0x0002, - 0x0001, - 0x0000, - 60.0f, - 1.0f, - { 0.0f, 0.0f, 0.0f }, - { 0.0f, 0.0f, 0.0f } }, - { // initFlags & 0x00FF (at): 3, atTarget is camera's current at + atInit - // initFlags & 0xFF00 (eye): 3, eyeTarget is the camera's current eye + eyeInit - // action: interplate eye and at. - // result: eye and at's y interpolate to become +20 from their current location. - 0x81, - 0xFF, - 0x0303, - 0x0013, - 0x0000, - 45.0f, - 1.0f, - { 0.0f, 20.0f, 0.0f }, - { 0.0f, 20.0f, 0.0f } }, - { // initFlags & 0x00FF (at): 0 none - // initFlags & 0xFF00 (eye): 0 none - // action: 18, copy this camera to default camera. - 0x12, - 0xFF, - 0x0000, - 0x0001, - 0x0000, - 60.0f, - 1.0f, - { -1.0f, -1.0f, -1.0f }, - { -1.0f, -1.0f, -1.0f } }, + { + // initflags & 0x00FF (at): 2, atTarget is view lookAt + atInit + // initFlags & 0xFF00 (eye): none + // action: 15, copy at, eye, roll, fov to camera + // result: eye remains in the same location, at is View's lookAt + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0xFF, + 0x0002, + 1, + 0, + 60.0f, + 1.0f, + { 0.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + }, + { + // initFlags & 0x00FF (at): 3, atTarget is camera's current at + atInit + // initFlags & 0xFF00 (eye): 3, eyeTarget is the camera's current eye + eyeInit + // action: interpolate eye and at. + // result: eye and at's y interpolate to become +20 from their current location. + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, true), + 0xFF, + 0x0303, + 19, + 0, + 45.0f, + 1.0f, + { 0.0f, 20.0f, 0.0f }, + { 0.0f, 20.0f, 0.0f }, + }, + { + // initFlags & 0x00FF (at): 0 none + // initFlags & 0xFF00 (eye): 0 none + // action: 18, copy this camera to default camera. + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; // target is player close to current eye OnePointCsFull D_8011D724[] = { - { 0x8F, 0xFF, 0x2424, 0x0001, 0x0000, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 10.0f, -20.0f } }, - { 0x81, 0xFF, 0x2121, 0x0013, 0x0000, 50.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 60.0f } }, - { 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0xFF, + 0x2424, + 1, + 0, + 60.0f, + 1.0f, + { 0.0f, 0.0f, 0.0f }, + { 0.0f, 10.0f, -20.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, true), + 0xFF, + 0x2121, + 19, + 0, + 50.0f, + 1.0f, + { 0.0f, -10.0f, 0.0f }, + { 0.0f, 0.0f, 60.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; // target is close to player OnePointCsFull D_8011D79C[] = { - { 0xCF, 0xFF, 0x0002, 0x0001, 0x0000, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, - { 0xC1, 0xFF, 0x0303, 0x0013, 0x0000, 45.0f, 1.0f, { 0.0f, -20.0f, 0.0f }, { 0.0f, -10.0f, 5.0f } }, { - 0xC1, + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, true, true), + 0xFF, + 0x0002, + 1, + 0, + 60.0f, + 1.0f, + { 0.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, true, true), 0xFF, 0x0303, - 0x0009, - 0x0000, + 19, + 0, + 45.0f, + 1.0f, + { 0.0f, -20.0f, 0.0f }, + { 0.0f, -10.0f, 5.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, true, true), + 0xFF, + 0x0303, + 9, + 0, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { 0.0f, 10.0f, 0.0f }, }, - { 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; // target is within 300 units of eye, and player is within 30 units of eye OnePointCsFull D_8011D83C[] = { - { 0x83, 0xFF, 0x2141, 0x0014, 0x0000, 45.0f, 0.2f, { 0.0f, 0.0f, 10.0f }, { 0.0f, 0.0f, 10.0f } }, - { 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, true), + 0xFF, + 0x2141, + 20, + 0, + 45.0f, + 0.2f, + { 0.0f, 0.0f, 10.0f }, + { 0.0f, 0.0f, 10.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; // target is within 700 units of eye, angle between player/eye and target/eye is less than // 76.9 degrees. The x/y coordinates of the target on screen is between (21, 41) and (300, 200), // and the player is farther than 30 units of the eye OnePointCsFull D_8011D88C[] = { - { 0x81, 0xFF, 0x0303, 0x0014, 0x0000, 45.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, - { 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, true), + 0xFF, + 0x0303, + 20, + 0, + 45.0f, + 1.0f, + { 0.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; // same as above, but the target is NOT within the screen area. OnePointCsFull D_8011D8DC[] = { - { 0x8F, 0xFF, 0x0404, 0x0014, 0x0001, 50.0f, 1.0f, { 0.0f, 5.0f, 10.0f }, { 0.0f, 10.0f, -80.0f } }, - { 0x82, 0xFF, 0x2121, 0x0005, 0x0000, 60.0f, 1.0f, { 0.0f, 5.0f, 0.0f }, { 5.0f, 5.0f, -200.0f } }, - { 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0xFF, + 0x0404, + 20, + 1, + 50.0f, + 1.0f, + { 0.0f, 5.0f, 10.0f }, + { 0.0f, 10.0f, -80.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, true), + 0xFF, + 0x2121, + 5, + 0, + 60.0f, + 1.0f, + { 0.0f, 5.0f, 0.0f }, + { 5.0f, 5.0f, -200.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; // target is a door. OnePointCsFull D_8011D954[] = { - { 0x0F, 0xFF, 0xC1C1, 0x0014, 0x0000, 60.0f, 1.0f, { 0.0f, 0.0f, 50.0f }, { 0.0f, 0.0f, 250.0f } }, - { 0x83, 0xFF, 0x05B1, 0x0005, 0x0000, 60.0f, 0.1f, { 0.0f, 10.0f, 50.0f }, { 0.0f, 10.0f, 100.0f } }, - { 0x82, 0xFF, 0x2121, 0x0005, 0x0002, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { 0.0f, 20.0f, -150.0f } }, - { 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0xC1C1, + 20, + 0, + 60.0f, + 1.0f, + { 0.0f, 0.0f, 50.0f }, + { 0.0f, 0.0f, 250.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, true), + 0xFF, + 0x05B1, + 5, + 0, + 60.0f, + 0.1f, + { 0.0f, 10.0f, 50.0f }, + { 0.0f, 10.0f, 100.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, true), + 0xFF, + 0x2121, + 5, + 2, + 60.0f, + 1.0f, + { 0.0f, 10.0f, 0.0f }, + { 0.0f, 20.0f, -150.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; // otherwise OnePointCsFull D_8011D9F4[] = { - { 0x8F, 0xFF, 0x0504, 0x0014, 0x0002, 60.0f, 1.0f, { 0.0f, 5.0f, 50.0f }, { 0.0f, 20.0f, 300.0f } }, - { 0x82, 0xFF, 0x2121, 0x0005, 0x0002, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { 0.0f, 20.0f, -150.0f } }, - { 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0xFF, + 0x0504, + 20, + 2, + 60.0f, + 1.0f, + { 0.0f, 5.0f, 50.0f }, + { 0.0f, 20.0f, 300.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, true), + 0xFF, + 0x2121, + 5, + 2, + 60.0f, + 1.0f, + { 0.0f, 10.0f, 0.0f }, + { 0.0f, 20.0f, -150.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; typedef enum { diff --git a/src/code/z_construct.c b/src/code/z_construct.c index 43b16e7cab..cbfac4cbcc 100644 --- a/src/code/z_construct.c +++ b/src/code/z_construct.c @@ -4,6 +4,8 @@ void Interface_Destroy(PlayState* play) { Map_Destroy(play); } +#define ICON_ITEM_SEGMENT_SIZE (4 * ITEM_ICON_SIZE) + void Interface_Init(PlayState* play) { InterfaceContext* interfaceCtx = &play->interfaceCtx; u32 parameterSize; @@ -70,10 +72,10 @@ void Interface_Init(PlayState* play) { (uintptr_t)_do_action_staticSegmentRomStart + doActionOffset, DO_ACTION_TEX_SIZE, "../z_construct.c", 178); - interfaceCtx->iconItemSegment = GameState_Alloc(&play->state, 4 * ICON_ITEM_TEX_SIZE, "../z_construct.c", 190); + interfaceCtx->iconItemSegment = GameState_Alloc(&play->state, ICON_ITEM_SEGMENT_SIZE, "../z_construct.c", 190); // "Icon Item Texture Initialization = %x" - osSyncPrintf("アイコンアイテム テクスチャ初期=%x\n", 4 * ICON_ITEM_TEX_SIZE); + osSyncPrintf("アイコンアイテム テクスチャ初期=%x\n", ICON_ITEM_SEGMENT_SIZE); osSyncPrintf("parameter->icon_itemSegment=%x\n", interfaceCtx->iconItemSegment); ASSERT(interfaceCtx->iconItemSegment != NULL, "parameter->icon_itemSegment != NULL", "../z_construct.c", 193); @@ -83,36 +85,31 @@ void Interface_Init(PlayState* play) { gSaveContext.equips.buttonItems[3]); if (gSaveContext.equips.buttonItems[0] < 0xF0) { - DmaMgr_RequestSyncDebug(interfaceCtx->iconItemSegment, - (uintptr_t)_icon_item_staticSegmentRomStart + - gSaveContext.equips.buttonItems[0] * ICON_ITEM_TEX_SIZE, - ICON_ITEM_TEX_SIZE, "../z_construct.c", 198); + DmaMgr_RequestSyncDebug(interfaceCtx->iconItemSegment + (0 * ITEM_ICON_SIZE), + GET_ITEM_ICON_VROM(gSaveContext.equips.buttonItems[0]), ITEM_ICON_SIZE, + "../z_construct.c", 198); } else if (gSaveContext.equips.buttonItems[0] != 0xFF) { - DmaMgr_RequestSyncDebug(interfaceCtx->iconItemSegment, - (uintptr_t)_icon_item_staticSegmentRomStart + - gSaveContext.equips.buttonItems[0] * ICON_ITEM_TEX_SIZE, - ICON_ITEM_TEX_SIZE, "../z_construct.c", 203); + DmaMgr_RequestSyncDebug(interfaceCtx->iconItemSegment + (0 * ITEM_ICON_SIZE), + GET_ITEM_ICON_VROM(gSaveContext.equips.buttonItems[0]), ITEM_ICON_SIZE, + "../z_construct.c", 203); } if (gSaveContext.equips.buttonItems[1] < 0xF0) { - DmaMgr_RequestSyncDebug(interfaceCtx->iconItemSegment + ICON_ITEM_TEX_SIZE, - (uintptr_t)_icon_item_staticSegmentRomStart + - gSaveContext.equips.buttonItems[1] * ICON_ITEM_TEX_SIZE, - ICON_ITEM_TEX_SIZE, "../z_construct.c", 209); + DmaMgr_RequestSyncDebug(interfaceCtx->iconItemSegment + (1 * ITEM_ICON_SIZE), + GET_ITEM_ICON_VROM(gSaveContext.equips.buttonItems[1]), ITEM_ICON_SIZE, + "../z_construct.c", 209); } if (gSaveContext.equips.buttonItems[2] < 0xF0) { - DmaMgr_RequestSyncDebug(interfaceCtx->iconItemSegment + 2 * ICON_ITEM_TEX_SIZE, - (uintptr_t)_icon_item_staticSegmentRomStart + - gSaveContext.equips.buttonItems[2] * ICON_ITEM_TEX_SIZE, - ICON_ITEM_TEX_SIZE, "../z_construct.c", 214); + DmaMgr_RequestSyncDebug(interfaceCtx->iconItemSegment + (2 * ITEM_ICON_SIZE), + GET_ITEM_ICON_VROM(gSaveContext.equips.buttonItems[2]), ITEM_ICON_SIZE, + "../z_construct.c", 214); } if (gSaveContext.equips.buttonItems[3] < 0xF0) { - DmaMgr_RequestSyncDebug(interfaceCtx->iconItemSegment + 3 * ICON_ITEM_TEX_SIZE, - (uintptr_t)_icon_item_staticSegmentRomStart + - gSaveContext.equips.buttonItems[3] * ICON_ITEM_TEX_SIZE, - ICON_ITEM_TEX_SIZE, "../z_construct.c", 219); + DmaMgr_RequestSyncDebug(interfaceCtx->iconItemSegment + (3 * ITEM_ICON_SIZE), + GET_ITEM_ICON_VROM(gSaveContext.equips.buttonItems[3]), ITEM_ICON_SIZE, + "../z_construct.c", 219); } osSyncPrintf("EVENT=%d\n", ((void)0, gSaveContext.timerState)); @@ -173,6 +170,9 @@ void Interface_Init(PlayState* play) { R_A_BTN_COLOR(2) = 50; } +#define TEXTBOX_SEGMENT_SIZE \ + (MESSAGE_STATIC_TEX_SIZE + MAX(MAX(ITEM_ICON_SIZE, QUEST_ICON_SIZE), 2 * MESSAGE_TEXTURE_STATIC_TEX_SIZE)) + void Message_Init(PlayState* play) { MessageContext* msgCtx = &play->msgCtx; s32 pad; @@ -188,15 +188,11 @@ void Message_Init(PlayState* play) { View_Init(&msgCtx->view, play->state.gfxCtx); - msgCtx->textboxSegment = - GameState_Alloc(&play->state, - MESSAGE_STATIC_TEX_SIZE + - MAX(MAX(ICON_ITEM_TEX_SIZE, ICON_ITEM_24_TEX_SIZE), 2 * MESSAGE_TEXTURE_STATIC_TEX_SIZE), - "../z_construct.c", 349); + msgCtx->textboxSegment = GameState_Alloc(&play->state, TEXTBOX_SEGMENT_SIZE, "../z_construct.c", 349); osSyncPrintf("message->fukidashiSegment=%x\n", msgCtx->textboxSegment); - osSyncPrintf("吹き出しgame_alloc=%x\n", 0x2200); // "Textbox game_alloc=%x" + osSyncPrintf("吹き出しgame_alloc=%x\n", TEXTBOX_SEGMENT_SIZE); // "Textbox game_alloc=%x" ASSERT(msgCtx->textboxSegment != NULL, "message->fukidashiSegment != NULL", "../z_construct.c", 352); Font_LoadOrderedFont(&play->msgCtx.font); @@ -257,7 +253,7 @@ void Regs_InitDataImpl(void) { R_TEXTBOX_ICON_YPOS = 10; YREG(73) = -8; YREG(74) = 8; - R_TEXTBOX_ICON_SIZE = 24; + R_TEXTBOX_ICON_DIMENSION = 24; YREG(76) = 32; YREG(77) = 0; R_MESSAGE_DEBUGGER_SELECT = 0; diff --git a/src/code/z_en_item00.c b/src/code/z_en_item00.c index 9a6ee6e098..f1ad800879 100644 --- a/src/code/z_en_item00.c +++ b/src/code/z_en_item00.c @@ -351,7 +351,7 @@ void EnItem00_Init(Actor* thisx, PlayState* play) { } if ((getItemId != GI_NONE) && !Actor_HasParent(&this->actor, play)) { - func_8002F554(&this->actor, play, getItemId); + Actor_OfferGetItemNearby(&this->actor, play, getItemId); } EnItem00_SetupAction(this, EnItem00_Collected); @@ -498,7 +498,7 @@ void EnItem00_Collected(EnItem00* this, PlayState* play) { if (this->getItemId != GI_NONE) { if (!Actor_HasParent(&this->actor, play)) { - func_8002F434(&this->actor, play, this->getItemId, 50.0f, 80.0f); + Actor_OfferGetItem(&this->actor, play, this->getItemId, 50.0f, 80.0f); this->despawnTimer++; } else { this->getItemId = GI_NONE; @@ -696,7 +696,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) { params = &this->actor.params; if ((getItemId != GI_NONE) && !Actor_HasParent(&this->actor, play)) { - func_8002F554(&this->actor, play, getItemId); + Actor_OfferGetItemNearby(&this->actor, play, getItemId); } switch (*params) { diff --git a/src/code/z_message_PAL.c b/src/code/z_message_PAL.c index 2210579805..8df374e9ab 100644 --- a/src/code/z_message_PAL.c +++ b/src/code/z_message_PAL.c @@ -755,17 +755,17 @@ u16 Message_DrawItemIcon(PlayState* play, u16 itemId, Gfx** p, u16 i) { gDPSetPrimColor(gfx++, 0, 0, 255, 255, 255, msgCtx->textColorAlpha); if (itemId >= ITEM_MEDALLION_FOREST) { - gDPLoadTextureBlock(gfx++, msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE, G_IM_FMT_RGBA, G_IM_SIZ_32b, 24, - 24, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, - G_TX_NOLOD, G_TX_NOLOD); + gDPLoadTextureBlock(gfx++, msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE, G_IM_FMT_RGBA, G_IM_SIZ_32b, + QUEST_ICON_WIDTH, QUEST_ICON_HEIGHT, 0, G_TX_NOMIRROR | G_TX_WRAP, + G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); } else { - gDPLoadTextureBlock(gfx++, msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE, G_IM_FMT_RGBA, G_IM_SIZ_32b, 32, - 32, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, - G_TX_NOLOD, G_TX_NOLOD); + gDPLoadTextureBlock(gfx++, msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE, G_IM_FMT_RGBA, G_IM_SIZ_32b, + ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, + G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); } gSPTextureRectangle(gfx++, (msgCtx->textPosX + R_TEXTBOX_ICON_XPOS) << 2, R_TEXTBOX_ICON_YPOS << 2, - (msgCtx->textPosX + R_TEXTBOX_ICON_XPOS + R_TEXTBOX_ICON_SIZE) << 2, - (R_TEXTBOX_ICON_YPOS + R_TEXTBOX_ICON_SIZE) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); + (msgCtx->textPosX + R_TEXTBOX_ICON_XPOS + R_TEXTBOX_ICON_DIMENSION) << 2, + (R_TEXTBOX_ICON_YPOS + R_TEXTBOX_ICON_DIMENSION) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); gDPPipeSync(gfx++); gDPSetCombineLERP(gfx++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0); @@ -1164,21 +1164,18 @@ void Message_LoadItemIcon(PlayState* play, u16 itemId, s16 y) { } if (itemId < ITEM_MEDALLION_FOREST) { R_TEXTBOX_ICON_XPOS = R_TEXT_INIT_XPOS - sIconItem32XOffsets[gSaveContext.language]; - R_TEXTBOX_ICON_YPOS = y + 6; - R_TEXTBOX_ICON_SIZE = 32; - DmaMgr_RequestSyncDebug(msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE, - (uintptr_t)_icon_item_staticSegmentRomStart + (itemId * ICON_ITEM_TEX_SIZE), - ICON_ITEM_TEX_SIZE, "../z_message_PAL.c", 1473); + R_TEXTBOX_ICON_YPOS = y + ((44 - ITEM_ICON_HEIGHT) / 2); + R_TEXTBOX_ICON_DIMENSION = ITEM_ICON_WIDTH; // assumes the image is square + DmaMgr_RequestSyncDebug(msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE, GET_ITEM_ICON_VROM(itemId), + ITEM_ICON_SIZE, "../z_message_PAL.c", 1473); // "Item 32-0" osSyncPrintf("アイテム32-0\n"); } else { R_TEXTBOX_ICON_XPOS = R_TEXT_INIT_XPOS - sIconItem24XOffsets[gSaveContext.language]; - R_TEXTBOX_ICON_YPOS = y + 10; - R_TEXTBOX_ICON_SIZE = 24; - DmaMgr_RequestSyncDebug(msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE, - (uintptr_t)_icon_item_24_staticSegmentRomStart + - (itemId - ITEM_MEDALLION_FOREST) * ICON_ITEM_24_TEX_SIZE, - ICON_ITEM_24_TEX_SIZE, "../z_message_PAL.c", 1482); + R_TEXTBOX_ICON_YPOS = y + ((44 - QUEST_ICON_HEIGHT) / 2); + R_TEXTBOX_ICON_DIMENSION = QUEST_ICON_WIDTH; // assumes the image is square + DmaMgr_RequestSyncDebug(msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE, GET_QUEST_ICON_VROM(itemId), + QUEST_ICON_SIZE, "../z_message_PAL.c", 1482); // "Item 24" osSyncPrintf("アイテム24=%d (%d) {%d}\n", itemId, itemId - ITEM_KOKIRI_EMERALD, 84); } @@ -1977,7 +1974,11 @@ void Message_DrawMain(PlayState* play, Gfx** p) { }; static s16 sOcarinaEffectActorParams[] = { 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0000, 0x0000 }; static void* sOcarinaNoteTextures[] = { - gOcarinaATex, gOcarinaCDownTex, gOcarinaCRightTex, gOcarinaCLeftTex, gOcarinaCUpTex, + gOcarinaBtnIconATex, // OCARINA_BTN_A + gOcarinaBtnIconCDownTex, // OCARINA_BTN_C_DOWN + gOcarinaBtnIconCRightTex, // OCARINA_BTN_C_RIGHT + gOcarinaBtnIconCLeftTex, // OCARINA_BTN_C_LEFT + gOcarinaBtnIconCUpTex, // OCARINA_BTN_C_UP }; static s16 sOcarinaButtonAPrimColors[][3] = { { 80, 255, 150 }, diff --git a/src/code/z_onepointdemo.c b/src/code/z_onepointdemo.c index 5ad8076c3c..957c2897c4 100644 --- a/src/code/z_onepointdemo.c +++ b/src/code/z_onepointdemo.c @@ -147,7 +147,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrameCnt = 11; for (i = 0; i < csInfo->keyFrameCnt - 3; i++) { - if (D_80120B94[i].actionFlags != 0x8F) { + if (D_80120B94[i].actionFlags != ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true)) { D_80120B94[i].atTargetInit.x = Rand_ZeroOne() * 5.0f; D_80120B94[i].atTargetInit.z = (Rand_ZeroOne() * 30.0f) + 10.0f; D_80120B94[i].eyeTargetInit.x = (Rand_ZeroOne() * 100.0f) + 20.0f; @@ -169,7 +169,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrameCnt = 7; for (i = 0; i < csInfo->keyFrameCnt - 3; i++) { - if (D_80120D4C[i].actionFlags != 0x8F) { + if (D_80120D4C[i].actionFlags != ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true)) { D_80120D4C[i].atTargetInit.x = Rand_ZeroOne() * 20.0f; D_80120D4C[i].atTargetInit.z = (Rand_ZeroOne() * 40.0f) + 10.0f; D_80120D4C[i].eyeTargetInit.x = (Rand_ZeroOne() * 40.0f) + 60.0f; @@ -264,7 +264,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act case 2290: { Actor* rideActor = player->rideActor; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); if (rideActor != NULL) { rideActor->freezeTimer = 180; } @@ -275,7 +275,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act func_800C0808(play, subCamId, player, CAM_SET_CS_C); } break; case 5120: - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); csInfo->keyFrames = D_80121314; csInfo->keyFrameCnt = 1; @@ -285,7 +285,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act case 4510: D_8012133C[0].eyeTargetInit = actor->world.pos; D_8012133C[0].eyeTargetInit.y = player->actor.world.pos.y + 40.0f; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); csInfo->keyFrames = D_8012133C; csInfo->keyFrameCnt = 3; @@ -303,7 +303,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act OnePointCutscene_AddVecGeoToVec3f(&spB4, &spC0, &spD0); Play_CameraChangeSetting(play, subCamId, CAM_SET_FREE2); Play_CameraSetAtEye(play, subCamId, &spC0, &spB4); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); subCam->roll = 0; subCam->fov = 50.0f; if (subCam->childCamId != CAM_ID_MAIN) { @@ -317,7 +317,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act if (Rand_ZeroOne() < 0.0f) { D_801213B4[3].eyeTargetInit.x = -D_801213B4[3].eyeTargetInit.x; } - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); csInfo->keyFrames = D_801213B4; csInfo->keyFrameCnt = 5; @@ -361,10 +361,10 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_CameraSetAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 6; subCam->fov = 75.0f; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); break; case 3040: - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); D_8012151C[0].timerInit = timer - 1; csInfo->keyFrames = D_8012151C; @@ -388,7 +388,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrameCnt = 2; func_800C0808(play, subCamId, player, CAM_SET_CS_C); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); break; case 3010: D_801215BC[0].timerInit = timer; @@ -416,7 +416,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act func_800C0808(play, subCamId, player, CAM_SET_CS_C); break; case 3090: - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); csInfo->keyFrames = D_80121814; csInfo->keyFrameCnt = 4; @@ -432,14 +432,14 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_CameraSetAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0; subCam->fov = 70.0f; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); break; case 3380: case 3065: csInfo->keyFrames = D_801218B4; csInfo->keyFrameCnt = 2; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); func_800C0808(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_1); @@ -451,12 +451,12 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80121904; csInfo->keyFrameCnt = 2; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); func_800C0808(play, subCamId, player, CAM_SET_CS_C); break; case 3050: Play_CameraChangeSetting(play, subCamId, CAM_SET_CS_3); - func_8002DF54(play, &player->actor, 5); + func_8002DF54(play, &player->actor, PLAYER_CSMODE_5); OnePointCutscene_SetCsCamPoints(subCam, D_80120304 | 0x2000, D_80120300, D_8012013C, D_8012021C); func_80078884(NA_SE_SY_CORRECT_CHIME); OnePointCutscene_Vec3sToVec3f(&mainCam->at, &D_8012013C[D_801202FC - 2].pos); @@ -485,14 +485,14 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act subCam->stateFlags |= CAM_STATE_1; csInfo->keyFrameCnt = 2; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); func_800C0808(play, subCamId, player, CAM_SET_CS_C); break; case 3130: csInfo->keyFrames = D_80121A44; csInfo->keyFrameCnt = 12; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); func_800C0808(play, subCamId, player, CAM_SET_CS_C); subCam->stateFlags |= CAM_STATE_1; break; @@ -517,7 +517,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_CameraSetAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0x50; subCam->fov = 55.0f; - func_8002DF38(play, &player->actor, 8); + func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); break; case 3170: Actor_GetWorld(&spA0, actor); @@ -533,7 +533,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_CopyCamera(play, CAM_ID_MAIN, subCamId); subCam->roll = -1; subCam->fov = 55.0f; - func_8002DF38(play, actor, 1); + func_8002DF38(play, actor, PLAYER_CSMODE_1); break; case 3160: Actor_GetWorld(&spA0, actor); @@ -546,7 +546,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_CameraSetAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0; subCam->fov = 55.0f; - func_8002DF38(play, &player->actor, 8); + func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); break; case 3180: Actor_GetWorldPosShapeRot(&spA0, actor); @@ -560,12 +560,12 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_CameraSetAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0; subCam->fov = 60.0f; - func_8002DF38(play, actor, 1); + func_8002DF38(play, actor, PLAYER_CSMODE_1); break; case 3190: Play_CameraChangeSetting(play, subCamId, CAM_SET_FOREST_DEFEAT_POE); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); - func_8002DF38(play, actor, 0xC); + func_8002DF38(play, actor, PLAYER_CSMODE_12); break; case 3230: spC0.x = 120.0f; @@ -578,7 +578,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_CameraSetAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0x1E; subCam->fov = 75.0f; - func_8002DF38(play, &player->actor, 8); + func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); Actor_GetWorldPosShapeRot(&spA0, actor); Actor_GetFocus(&sp8C, &player->actor); spC0.x = sp8C.pos.x; @@ -607,7 +607,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_CameraSetAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0; subCam->fov = 45.0f; - func_8002DF38(play, &player->actor, 8); + func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); break; case 3220: Actor_GetFocus(&spA0, actor); @@ -623,7 +623,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act subCam->roll = 0; subCam->fov = 75.0f; player->actor.shape.rot.y = player->actor.world.rot.y = player->currentYaw = spD0.yaw + 0x7FFF; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); break; case 3240: D_80121D3C[2].timerInit = timer - 5; @@ -631,12 +631,12 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80121D3C; csInfo->keyFrameCnt = 3; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); func_800C0808(play, subCamId, player, CAM_SET_CS_C); break; case 6001: Play_CameraChangeSetting(play, subCamId, CAM_SET_CS_3); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); Actor_GetWorld(&spA0, actor); if (spA0.pos.z > -750.0f) { OnePointCutscene_SetCsCamPoints(subCam, D_801208E8, D_801208E4, D_801206A0, D_80120820); @@ -651,7 +651,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act break; case 3400: Play_CameraChangeSetting(play, subCamId, CAM_SET_CS_3); - func_8002DF38(play, &player->actor, 8); + func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); OnePointCutscene_SetCsCamPoints(subCam, D_8012069C | 0x2000, D_80120698, D_801204D4, D_801205B4); OnePointCutscene_Vec3sToVec3f(&mainCam->eye, &D_801205B4[D_80120694 - 2].pos); OnePointCutscene_Vec3sToVec3f(&mainCam->at, &D_801204D4[D_80120694 - 2].pos); @@ -667,12 +667,12 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80121DB4; csInfo->keyFrameCnt = 9; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); func_800C0808(play, subCamId, player, CAM_SET_CS_C); break; case 3310: Play_CameraChangeSetting(play, subCamId, CAM_SET_FIRE_STAIRCASE); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); Play_CopyCamera(play, subCamId, CAM_ID_MAIN); i = Quake_Request(subCam, QUAKE_TYPE_1); @@ -705,7 +705,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80121FBC; csInfo->keyFrameCnt = 4; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); func_800C0808(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_3); @@ -717,7 +717,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_8012205C; csInfo->keyFrameCnt = 3; - func_8002DF38(play, &player->actor, 8); + func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); func_800C0808(play, subCamId, player, CAM_SET_CS_C); break; case 3350: @@ -732,7 +732,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act D_801220D4[1].eyeTargetInit.y = 80.0f; D_801220D4[1].eyeTargetInit.x = -D_801220D4[1].eyeTargetInit.x; } - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); csInfo->keyFrames = D_801220D4; csInfo->keyFrameCnt = 5; @@ -743,14 +743,14 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_8012219C; csInfo->keyFrameCnt = 7; - func_8002DF38(play, &player->actor, 8); + func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); func_800C0808(play, subCamId, player, CAM_SET_CS_C); break; case 3410: csInfo->keyFrames = D_801222B4; csInfo->keyFrameCnt = 5; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); func_800C0808(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_1); @@ -762,7 +762,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_8012237C; csInfo->keyFrameCnt = 2; - func_8002DF38(play, &player->actor, 8); + func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); func_800C0808(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_1); @@ -774,7 +774,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_801223CC; csInfo->keyFrameCnt = 6; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); func_800C0808(play, subCamId, player, CAM_SET_CS_C); player->stateFlags1 |= PLAYER_STATE1_29; player->actor.freezeTimer = 90; @@ -788,7 +788,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_801224BC; csInfo->keyFrameCnt = 7; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); func_800C0808(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_1); @@ -802,17 +802,17 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act player->actor.shape.rot.y = player->actor.world.rot.y = player->currentYaw = 0x3FFC; func_800C0808(play, subCamId, player, CAM_SET_CS_C); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); break; case 4110: csInfo->keyFrames = D_8012269C; csInfo->keyFrameCnt = 3; - func_8002DF38(play, &player->actor, 8); + func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); func_800C0808(play, subCamId, player, CAM_SET_CS_C); break; case 4120: - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); D_80122714[1].timerInit = 80; csInfo->keyFrames = D_80122714; csInfo->keyFrameCnt = 4; @@ -830,7 +830,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_801228A4; csInfo->keyFrameCnt = 5; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); func_800C0808(play, subCamId, player, CAM_SET_CS_C); break; @@ -838,7 +838,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_8012296C; csInfo->keyFrameCnt = 4; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); func_800C0808(play, subCamId, player, CAM_SET_CS_C); break; @@ -846,7 +846,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80122A0C; csInfo->keyFrameCnt = 2; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); func_800C0808(play, subCamId, player, CAM_SET_CS_C); break; @@ -854,7 +854,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80122A5C; csInfo->keyFrameCnt = 8; - func_8002DF38(play, &player->actor, 8); + func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); func_800C0808(play, subCamId, player, CAM_SET_CS_C); break; @@ -862,7 +862,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80122B9C; csInfo->keyFrameCnt = 3; - func_8002DF38(play, &player->actor, 8); + func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); func_800C0808(play, subCamId, player, CAM_SET_CS_C); break; @@ -884,7 +884,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrameCnt = 1; func_800C0808(play, subCamId, player, CAM_SET_CS_C); - func_8002DF38(play, &player->actor, 1); + func_8002DF38(play, &player->actor, PLAYER_CSMODE_1); i = Quake_Request(subCam, QUAKE_TYPE_3); Quake_SetSpeed(i, 12000); @@ -895,11 +895,11 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80122C8C; csInfo->keyFrameCnt = 1; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); func_800C0808(play, subCamId, player, CAM_SET_CS_C); break; case 3260: - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); D_80122CB4[1].timerInit = timer - 5; csInfo->keyFrames = D_80122CB4; @@ -908,7 +908,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act func_800C0808(play, subCamId, player, CAM_SET_CS_C); break; case 3261: - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); D_80122D04[1].timerInit = timer - 10; csInfo->keyFrames = D_80122D04; diff --git a/src/code/z_onepointdemo_data.inc.c b/src/code/z_onepointdemo_data.inc.c index c3dc204942..047d65b22f 100644 --- a/src/code/z_onepointdemo_data.inc.c +++ b/src/code/z_onepointdemo_data.inc.c @@ -119,552 +119,3712 @@ static s16 D_801208E4 = 90; static s16 D_801208E8 = 8; static OnePointCsFull D_801208EC[3] = { - { 0x0F, 0x08, 0x0101, 1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, - { 0x81, 0xFF, 0x0101, 1, 0, 60.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } }, - { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0x08, + 0x0101, + 1, + 0, + 60.0f, + 1.0f, + { 0.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, true), + 0xFF, + 0x0101, + 1, + 0, + 60.0f, + 1.0f, + { 0.0f, -10.0f, 0.0f }, + { 0.0f, 0.0f, 150.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_80120964[2] = { - { 0x8F, 0xFF, 0x0101, 1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, - { 0x81, 0xFF, 0xA121, 1, 0, 75.0f, 0.6f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0xFF, + 0x0101, + 1, + 0, + 60.0f, + 1.0f, + { 0.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, true), + 0xFF, + 0xA121, + 1, + 0, + 75.0f, + 0.6f, + { 0.0f, -10.0f, 0.0f }, + { 0.0f, 0.0f, 150.0f }, + }, }; static OnePointCsFull D_801209B4[4] = { - { 0x8F, 0x08, 0x0101, 1, 0, 60.0f, 0.9f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, - { 0x84, 0x01, 0x0100, 29, 0, 45.0f, 0.1f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } }, - { 0x83, 0xFF, 0x0000, 10, 0, 60.0f, 0.2f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } }, - { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0x08, + 0x0101, + 1, + 0, + 60.0f, + 0.9f, + { 0.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_4, false, true), + 0x01, + 0x0100, + 29, + 0, + 45.0f, + 0.1f, + { 0.0f, -10.0f, 0.0f }, + { 0.0f, 0.0f, 150.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, true), + 0xFF, + 0x0000, + 10, + 0, + 60.0f, + 0.2f, + { 0.0f, -10.0f, 0.0f }, + { 0.0f, 0.0f, 150.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_80120A54[3] = { - { 0x8F, 0xFF, 0x2525, 1, 0, 75.0f, 0.1f, { 0.0f, 20.0f, -10.0f }, { 0.0f, 10.0f, -40.0f } }, - { 0x8F, 0xFF, 0x0000, 9, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x8B, 0xFF, 0x0022, 5000, 0, 75.0f, 0.005f, { 0.0f, 0.0f, -10.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0xFF, + 0x2525, + 1, + 0, + 75.0f, + 0.1f, + { 0.0f, 20.0f, -10.0f }, + { 0.0f, 10.0f, -40.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0xFF, + 0x0000, + 9, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_11, false, true), + 0xFF, + 0x0022, + 5000, + 0, + 75.0f, + 0.005f, + { 0.0f, 0.0f, -10.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_80120ACC[5] = { - { 0x8F, 0xFF, 0x0442, 10, 0, 40.0f, 1.0f, { -10.0f, 45.0f, 20.0f }, { 20.0f, 30.0f, 160.0f } }, - { 0x95, 0xFF, 0x0000, 1, 0, 40.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x8F, 0x01, 0x0442, 10, 0, 40.0f, 1.0f, { -10.0f, 45.0f, 20.0f }, { 20.0f, 30.0f, 160.0f } }, - { 0x95, 0xFF, 0x0000, 1, 0, 40.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0xFF, + 0x0442, + 10, + 0, + 40.0f, + 1.0f, + { -10.0f, 45.0f, 20.0f }, + { 20.0f, 30.0f, 160.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_21, false, true), + 0xFF, + 0x0000, + 1, + 0, + 40.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0x01, + 0x0442, + 10, + 0, + 40.0f, + 1.0f, + { -10.0f, 45.0f, 20.0f }, + { 20.0f, 30.0f, 160.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_21, false, true), + 0xFF, + 0x0000, + 1, + 0, + 40.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_17, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_80120B94[11] = { - { 0x8F, 0x01, 0x2142, 1, 0, 40.0f, 1.0f, { 20.0f, 40.0f, 20.0f }, { -20.0f, 0.0f, -30.0f } }, - { 0x84, 0xFF, 0x0404, 19, 5, 70.0f, 0.01f, { 0.0f, 30.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } }, - { 0x84, 0xFF, 0x0404, 20, 0, 60.0f, 0.01f, { 0.0f, 20.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } }, - { 0x84, 0xFF, 0x0404, 40, -10, 50.0f, 0.02f, { 0.0f, 30.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } }, - { 0x8F, 0xFF, 0x4141, 1, 0, 40.0f, 1.0f, { 0.0f, -10.0f, 20.0f }, { 0.0f, 20.0f, 50.0f } }, - { 0x84, 0xFF, 0x0404, 19, 0, 70.0f, 0.01f, { 0.0f, 30.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } }, - { 0x84, 0xFF, 0x0404, 40, 10, 50.0f, 0.01f, { 0.0f, 20.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } }, - { 0x84, 0xFF, 0x0404, 70, 0, 60.0f, 0.01f, { 0.0f, 30.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } }, - { 0x8F, 0xFF, 0x4141, 1, 0, 50.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 80.0f, 20.0f, 60.0f } }, - { 0x8D, 0xFF, 0x4141, 150, 0, 50.0f, 1.0f, { 0.0f, 5.0f, 0.0f }, { 0.0f, 4.0f, 120.0f } }, - { 0x98, 0xFF, 0x0000, 1, 0, 50.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0x01, + 0x2142, + 1, + 0, + 40.0f, + 1.0f, + { 20.0f, 40.0f, 20.0f }, + { -20.0f, 0.0f, -30.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_4, false, true), + 0xFF, + 0x0404, + 19, + 5, + 70.0f, + 0.01f, + { 0.0f, 30.0f, 20.0f }, + { 120.0f, 60.0f, 120.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_4, false, true), + 0xFF, + 0x0404, + 20, + 0, + 60.0f, + 0.01f, + { 0.0f, 20.0f, 20.0f }, + { 120.0f, 60.0f, 120.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_4, false, true), + 0xFF, + 0x0404, + 40, + -10, + 50.0f, + 0.02f, + { 0.0f, 30.0f, 20.0f }, + { 120.0f, 60.0f, 120.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0xFF, + 0x4141, + 1, + 0, + 40.0f, + 1.0f, + { 0.0f, -10.0f, 20.0f }, + { 0.0f, 20.0f, 50.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_4, false, true), + 0xFF, + 0x0404, + 19, + 0, + 70.0f, + 0.01f, + { 0.0f, 30.0f, 20.0f }, + { 120.0f, 60.0f, 120.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_4, false, true), + 0xFF, + 0x0404, + 40, + 10, + 50.0f, + 0.01f, + { 0.0f, 20.0f, 20.0f }, + { 120.0f, 60.0f, 120.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_4, false, true), + 0xFF, + 0x0404, + 70, + 0, + 60.0f, + 0.01f, + { 0.0f, 30.0f, 20.0f }, + { 120.0f, 60.0f, 120.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0xFF, + 0x4141, + 1, + 0, + 50.0f, + 1.0f, + { 0.0f, -10.0f, 0.0f }, + { 80.0f, 20.0f, 60.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_13, false, true), + 0xFF, + 0x4141, + 150, + 0, + 50.0f, + 1.0f, + { 0.0f, 5.0f, 0.0f }, + { 0.0f, 4.0f, 120.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_24, false, true), + 0xFF, + 0x0000, + 1, + 0, + 50.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_80120D4C[7] = { - { 0x8F, 0x01, 0x2142, 1, 0, 40.0f, 1.0f, { 20.0f, 40.0f, 20.0f }, { -20.0f, 0.0f, -30.0f } }, - { 0x84, 0xFF, 0x0404, 19, 5, 70.0f, 0.01f, { 0.0f, 30.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } }, - { 0x84, 0xFF, 0x0404, 20, 0, 60.0f, 0.01f, { 0.0f, 20.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } }, - { 0x84, 0xFF, 0x0404, 40, -10, 50.0f, 0.02f, { 0.0f, 30.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } }, - { 0x8F, 0xFF, 0x4141, 1, 0, 50.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 80.0f, 20.0f, 60.0f } }, - { 0x8D, 0xFF, 0x4141, 150, 0, 50.0f, 1.0f, { 0.0f, 5.0f, 0.0f }, { 0.0f, 4.0f, 120.0f } }, - { 0x98, 0xFF, 0x0000, 1, 0, 50.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0x01, + 0x2142, + 1, + 0, + 40.0f, + 1.0f, + { 20.0f, 40.0f, 20.0f }, + { -20.0f, 0.0f, -30.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_4, false, true), + 0xFF, + 0x0404, + 19, + 5, + 70.0f, + 0.01f, + { 0.0f, 30.0f, 20.0f }, + { 120.0f, 60.0f, 120.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_4, false, true), + 0xFF, + 0x0404, + 20, + 0, + 60.0f, + 0.01f, + { 0.0f, 20.0f, 20.0f }, + { 120.0f, 60.0f, 120.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_4, false, true), + 0xFF, + 0x0404, + 40, + -10, + 50.0f, + 0.02f, + { 0.0f, 30.0f, 20.0f }, + { 120.0f, 60.0f, 120.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0xFF, + 0x4141, + 1, + 0, + 50.0f, + 1.0f, + { 0.0f, -10.0f, 0.0f }, + { 80.0f, 20.0f, 60.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_13, false, true), + 0xFF, + 0x4141, + 150, + 0, + 50.0f, + 1.0f, + { 0.0f, 5.0f, 0.0f }, + { 0.0f, 4.0f, 120.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_24, false, true), + 0xFF, + 0x0000, + 1, + 0, + 50.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_80120E64[8] = { - { 0x41, 0x01, 0x2142, 20, 0, 50.0f, 1.0f, { -25.0f, 20.0f, 0.0f }, { 0.0f, 0.0f, 5.0f } }, - { 0x4F, 0xFF, 0x0000, 80, 0, 50.0f, 1.0f, { -25.0f, 20.0f, 0.0f }, { 0.0f, 0.0f, 5.0f } }, - { 0x4B, 0xFF, 0x4242, 8, 0, 60.0f, 0.1f, { -25.0f, 20.0f, 0.0f }, { 0.0f, 0.0f, 5.0f } }, - { 0x4B, 0xFF, 0x4242, 15, 4, 55.0f, 0.05f, { -50.0f, 20.0f, 20.0f }, { 0.0f, 0.0f, 5.0f } }, - { 0x4B, 0xFF, 0x4242, 15, -4, 50.0f, 0.05f, { 0.0f, 20.0f, 0.0f }, { 0.0f, 0.0f, 5.0f } }, - { 0x4B, 0xFF, 0x4242, 15, 0, 50.0f, 0.1f, { -25.0f, 20.0f, 0.0f }, { 0.0f, 0.0f, 5.0f } }, - { 0x4F, 0xFF, 0x0000, 40, 0, 50.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, true, false), + 0x01, + 0x2142, + 20, + 0, + 50.0f, + 1.0f, + { -25.0f, 20.0f, 0.0f }, + { 0.0f, 0.0f, 5.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, true, false), + 0xFF, + 0x0000, + 80, + 0, + 50.0f, + 1.0f, + { -25.0f, 20.0f, 0.0f }, + { 0.0f, 0.0f, 5.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_11, true, false), + 0xFF, + 0x4242, + 8, + 0, + 60.0f, + 0.1f, + { -25.0f, 20.0f, 0.0f }, + { 0.0f, 0.0f, 5.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_11, true, false), + 0xFF, + 0x4242, + 15, + 4, + 55.0f, + 0.05f, + { -50.0f, 20.0f, 20.0f }, + { 0.0f, 0.0f, 5.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_11, true, false), + 0xFF, + 0x4242, + 15, + -4, + 50.0f, + 0.05f, + { 0.0f, 20.0f, 0.0f }, + { 0.0f, 0.0f, 5.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_11, true, false), + 0xFF, + 0x4242, + 15, + 0, + 50.0f, + 0.1f, + { -25.0f, 20.0f, 0.0f }, + { 0.0f, 0.0f, 5.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, true, false), + 0xFF, + 0x0000, + 40, + 0, + 50.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_80120FA4[6] = { - { 0x8F, 0x01, 0x2143, 30, 0, 70.0f, 0.4f, { 0.0f, 40.0f, 50.0f }, { 30.0f, 10.0f, -50.0f } }, - { 0x95, 0xFF, 0x0000, 1, 0, 50.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x8F, 0xFF, 0x2222, 10, 0, 42.0f, 1.0f, { 0.0f, 40.0f, 0.0f }, { 0.0f, 85.0f, 45.0f } }, - { 0x90, 0xFF, 0x0000, 1, 0, 50.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x81, 0xFF, 0x2121, 10, 0, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { 30.0f, 10.0f, -80.0f } }, - { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0x01, + 0x2143, + 30, + 0, + 70.0f, + 0.4f, + { 0.0f, 40.0f, 50.0f }, + { 30.0f, 10.0f, -50.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_21, false, true), + 0xFF, + 0x0000, + 1, + 0, + 50.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0xFF, + 0x2222, + 10, + 0, + 42.0f, + 1.0f, + { 0.0f, 40.0f, 0.0f }, + { 0.0f, 85.0f, 45.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_16, false, true), + 0xFF, + 0x0000, + 1, + 0, + 50.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, true), + 0xFF, + 0x2121, + 10, + 0, + 60.0f, + 1.0f, + { 0.0f, 10.0f, 0.0f }, + { 30.0f, 10.0f, -80.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_80121094[3] = { - { 0x0F, 0x08, 0x2101, 20, 0, 50.0f, 1.0f, { 3840.0f, 10.0f, 950.0f }, { 0.0f, 0.0f, 5.0f } }, - { 0x01, 0x01, 0x2101, 50, 0, 55.0f, 1.0f, { 4000.0f, 50.0f, 1000.0f }, { 0.0f, 0.0f, 5.0f } }, - { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0x08, + 0x2101, + 20, + 0, + 50.0f, + 1.0f, + { 3840.0f, 10.0f, 950.0f }, + { 0.0f, 0.0f, 5.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false), + 0x01, + 0x2101, + 50, + 0, + 55.0f, + 1.0f, + { 4000.0f, 50.0f, 1000.0f }, + { 0.0f, 0.0f, 5.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_8012110C[3] = { - { 0x4F, 0x05, 0x2142, 1, 0, 50.0f, 1.0f, { -25.0f, 20.0f, 0.0f }, { 0.0f, 0.0f, 5.0f } }, - { 0x41, 0xFF, 0x2121, 10, 0, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { 0.0f, 10.0f, -80.0f } }, - { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, true, false), + 0x05, + 0x2142, + 1, + 0, + 50.0f, + 1.0f, + { -25.0f, 20.0f, 0.0f }, + { 0.0f, 0.0f, 5.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, true, false), + 0xFF, + 0x2121, + 10, + 0, + 60.0f, + 1.0f, + { 0.0f, 10.0f, 0.0f }, + { 0.0f, 10.0f, -80.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_80121184[2] = { - { 0x83, 0x01, 0x0101, 40, 0, -1.0f, 0.1f, { 0.0f, 10.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, - { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, true), + 0x01, + 0x0101, + 40, + 0, + -1.0f, + 0.1f, + { 0.0f, 10.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_801211D4[2] = { - { 0x8F, 0x08, 0x0101, 50, 0, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { -10.0f, 85.0f, 0.0f } }, - { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0x08, + 0x0101, + 50, + 0, + 60.0f, + 1.0f, + { 0.0f, 10.0f, 0.0f }, + { -10.0f, 85.0f, 0.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_17, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_80121224[6] = { - { 0x8F, 0x01, 0x4141, 2, 0, 60.0f, 1.0f, { 0.0f, 5.0f, 10.0f }, { 0.0f, 0.0f, 45.0f } }, - { 0x81, 0xFF, 0x4141, 18, 0, 45.0f, 1.0f, { 0.0f, 5.0f, 10.0f }, { 0.0f, -10.0f, 50.0f } }, - { 0x84, 0x34, 0x4104, 80, 0, 70.0f, 0.05f, { 0.0f, 0.0f, 60.0f }, { 0.0f, 250.0f, -50.0f } }, - { 0x8F, 0x01, 0x0000, 20, 0, 70.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x8F, 0xFF, 0x0421, 60, 0, 50.0f, 1.0f, { 0.0f, -30.0f, 20.0f }, { 10.0f, 5.0f, -50.0f } }, - { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0x01, + 0x4141, + 2, + 0, + 60.0f, + 1.0f, + { 0.0f, 5.0f, 10.0f }, + { 0.0f, 0.0f, 45.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, true), + 0xFF, + 0x4141, + 18, + 0, + 45.0f, + 1.0f, + { 0.0f, 5.0f, 10.0f }, + { 0.0f, -10.0f, 50.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_4, false, true), + 0x34, + 0x4104, + 80, + 0, + 70.0f, + 0.05f, + { 0.0f, 0.0f, 60.0f }, + { 0.0f, 250.0f, -50.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0x01, + 0x0000, + 20, + 0, + 70.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0xFF, + 0x0421, + 60, + 0, + 50.0f, + 1.0f, + { 0.0f, -30.0f, 20.0f }, + { 10.0f, 5.0f, -50.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_17, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_80121314[1] = { - { 0x8F, 0x08, 0x4141, 1000, 0, 75.0f, 0.6f, { 0.0f, 0.0f, 10.0f }, { 0.0f, 0.0f, 100.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0x08, + 0x4141, + 1000, + 0, + 75.0f, + 0.6f, + { 0.0f, 0.0f, 10.0f }, + { 0.0f, 0.0f, 100.0f }, + }, }; static OnePointCsFull D_8012133C[3] = { - { 0x8F, 0x01, 0x0141, 40, 0, 75.0f, 1.0f, { 0.0f, 60.0f, 0.0f }, { 0.0f, 0.0f, 100.0f } }, - { 0x83, 0xFF, 0x2121, 20, 0, 60.0f, 0.2f, { 0.0f, -10.0f, -10.0f }, { 0.0f, 10.0f, -100.0f } }, - { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0x01, + 0x0141, + 40, + 0, + 75.0f, + 1.0f, + { 0.0f, 60.0f, 0.0f }, + { 0.0f, 0.0f, 100.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, true), + 0xFF, + 0x2121, + 20, + 0, + 60.0f, + 0.2f, + { 0.0f, -10.0f, -10.0f }, + { 0.0f, 10.0f, -100.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_17, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_801213B4[5] = { - { 0x8F, 0x08, 0xC2C2, 40, 0, 70.0f, 1.0f, { 80.0f, 0.0f, 20.0f }, { 20.0f, 0.0f, 80.0f } }, - { 0x8B, 0x01, 0xC2C2, 120, 0, 70.0f, 0.1f, { 80.0f, 0.0f, 20.0f }, { 20.0f, 0.0f, 80.0f } }, - { 0x8F, 0x53, 0xC2C2, 30, 0, 50.0f, 1.0f, { 60.0f, 0.0f, 20.0f }, { 60.0f, 0.0f, 60.0f } }, - { 0x84, 0x45, 0x4222, 30, 0, 60.0f, 0.1f, { 0.0f, 50.0f, 0.0f }, { 5.0f, 30.0f, 220.0f } }, - { 0x12, 0xFF, 0x0000, 1, 0, 75.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0x08, + 0xC2C2, + 40, + 0, + 70.0f, + 1.0f, + { 80.0f, 0.0f, 20.0f }, + { 20.0f, 0.0f, 80.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_11, false, true), + 0x01, + 0xC2C2, + 120, + 0, + 70.0f, + 0.1f, + { 80.0f, 0.0f, 20.0f }, + { 20.0f, 0.0f, 80.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0x53, + 0xC2C2, + 30, + 0, + 50.0f, + 1.0f, + { 60.0f, 0.0f, 20.0f }, + { 60.0f, 0.0f, 60.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_4, false, true), + 0x45, + 0x4222, + 30, + 0, + 60.0f, + 0.1f, + { 0.0f, 50.0f, 0.0f }, + { 5.0f, 30.0f, 220.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + 0, + 75.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_8012147C[4] = { - { 0x8F, 0x01, 0x0101, 40, 0, 45.0f, 1.0f, { 820.0f, 1600.0f, -400.0f }, { 777.0f, 1577.0f, -577.0f } }, - { 0x8F, 0x01, 0x0142, 1, 0, 50.0f, 1.0f, { -50.0f, 80.0f, 0.0f }, { 900.0f, 1575.0f, 850.0f } }, - { 0x83, 0x08, 0x0142, 89, -4, 80.0f, 0.07f, { -50.0f, 70.0f, 0.0f }, { 975.0f, 1575.0f, 770.0f } }, - { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0x01, + 0x0101, + 40, + 0, + 45.0f, + 1.0f, + { 820.0f, 1600.0f, -400.0f }, + { 777.0f, 1577.0f, -577.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0x01, + 0x0142, + 1, + 0, + 50.0f, + 1.0f, + { -50.0f, 80.0f, 0.0f }, + { 900.0f, 1575.0f, 850.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, true), + 0x08, + 0x0142, + 89, + -4, + 80.0f, + 0.07f, + { -50.0f, 70.0f, 0.0f }, + { 975.0f, 1575.0f, 770.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_17, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_8012151C[2] = { - { 0x0F, 0x01, 0x0101, 29, 0, 60.0f, 1.0f, { -700.0f, 875.0f, -100.0f }, { -550.0f, 920.0f, -150.0f } }, - { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0x01, + 0x0101, + 29, + 0, + 60.0f, + 1.0f, + { -700.0f, 875.0f, -100.0f }, + { -550.0f, 920.0f, -150.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_8012156C[2] = { - { 0x8F, 0x4D, 0x4242, 1, 0, 65.0f, 1.0f, { 60.0f, 30.0f, 0.0f }, { 50.0f, 20.0f, 150.0f } }, - { 0x81, 0xFF, 0x4242, -1, 0, 65.0f, 1.0f, { -50.0f, 60.0f, 0.0f }, { -60.0f, 40.0f, 150.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0x4D, + 0x4242, + 1, + 0, + 65.0f, + 1.0f, + { 60.0f, 30.0f, 0.0f }, + { 50.0f, 20.0f, 150.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, true), + 0xFF, + 0x4242, + -1, + 0, + 65.0f, + 1.0f, + { -50.0f, 60.0f, 0.0f }, + { -60.0f, 40.0f, 150.0f }, + }, }; static OnePointCsFull D_801215BC[1] = { - { 0x0F, 0xFF, 0x0101, 5, 0, 65.0f, 1.0f, { -1185.0f, 655.0f, 1185.0f }, { -1255.0f, 735.0f, 1255.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 5, + 0, + 65.0f, + 1.0f, + { -1185.0f, 655.0f, 1185.0f }, + { -1255.0f, 735.0f, 1255.0f }, + }, }; static OnePointCsFull D_801215E4[10] = { - { 0x0F, 0x08, 0x4141, 20, 0, 30.0f, 1.0f, { 0.0f, 120.0f, 0.0f }, { -10.0f, 140.0f, -90.0f } }, - { 0x0F, 0x01, 0x0101, 1, 4, 75.0f, 1.0f, { -1360.0f, -940.0f, -3343.0f }, { -1060.0f, -980.0f, -3325.0f } }, - { 0x0B, 0xFF, 0x4141, 129, 0, 75.0f, 0.5f, { 0.0f, 50.0f, 0.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x03, 0xFF, 0x0303, 30, 0, 70.0f, 0.05f, { 0.0f, 80.0f, 0.0f }, { -10.0f, 120.0f, 10.0f } }, - { 0x0F, 0x09, 0x0101, 40, -5, 70.0f, 1.0f, { -973.0f, -924.0f, -3263.0f }, { -1190.0f, -1010.0f, -3365.0f } }, - { 0x0F, 0x01, 0x0101, 1, 0, 75.0f, 1.0f, { -1355.0f, -700.0f, -3340.0f }, { -1040.0f, -940.0f, -3345.0f } }, - { 0x02, 0xFF, 0x0101, 60, 0, 45.0f, 0.8f, { -1370.0f, -875.0f, -3345.0f }, { -1230.0f, -885.0f, -3345.0f } }, - { 0x01, 0xFF, 0x0101, 10, 0, 70.0f, 1.0f, { -1370.0f, -875.0f, -3345.0f }, { -1210.0f, -900.0f, -3420.0f } }, - { 0x0F, 0xFF, 0x0000, 20, 0, 70.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0x08, + 0x4141, + 20, + 0, + 30.0f, + 1.0f, + { 0.0f, 120.0f, 0.0f }, + { -10.0f, 140.0f, -90.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0x01, + 0x0101, + 1, + 4, + 75.0f, + 1.0f, + { -1360.0f, -940.0f, -3343.0f }, + { -1060.0f, -980.0f, -3325.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_11, false, false), + 0xFF, + 0x4141, + 129, + 0, + 75.0f, + 0.5f, + { 0.0f, 50.0f, 0.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, false), + 0xFF, + 0x0303, + 30, + 0, + 70.0f, + 0.05f, + { 0.0f, 80.0f, 0.0f }, + { -10.0f, 120.0f, 10.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0x09, + 0x0101, + 40, + -5, + 70.0f, + 1.0f, + { -973.0f, -924.0f, -3263.0f }, + { -1190.0f, -1010.0f, -3365.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0x01, + 0x0101, + 1, + 0, + 75.0f, + 1.0f, + { -1355.0f, -700.0f, -3340.0f }, + { -1040.0f, -940.0f, -3345.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, false), + 0xFF, + 0x0101, + 60, + 0, + 45.0f, + 0.8f, + { -1370.0f, -875.0f, -3345.0f }, + { -1230.0f, -885.0f, -3345.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false), + 0xFF, + 0x0101, + 10, + 0, + 70.0f, + 1.0f, + { -1370.0f, -875.0f, -3345.0f }, + { -1210.0f, -900.0f, -3420.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0000, + 20, + 0, + 70.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_17, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_80121774[4] = { - { 0x0F, 0x08, 0x0101, 1, -2, 75.0f, 1.0f, { -1340.0f, -860.0f, -3345.0f }, { -1415.0f, -940.0f, -3520.0f } }, - { 0x01, 0x01, 0x0142, 39, 2, 70.0f, 1.0f, { 0.0f, -20.0f, 10.0f }, { -1140.0f, -1010.0f, -3560.0f } }, - { 0x01, 0x05, 0x0121, 20, 0, 60.0f, 1.0f, { 0.0f, -20.0f, 20.0f }, { -1220.0f, -1005.0f, -3660.0f } }, - { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0x08, + 0x0101, + 1, + -2, + 75.0f, + 1.0f, + { -1340.0f, -860.0f, -3345.0f }, + { -1415.0f, -940.0f, -3520.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false), + 0x01, + 0x0142, + 39, + 2, + 70.0f, + 1.0f, + { 0.0f, -20.0f, 10.0f }, + { -1140.0f, -1010.0f, -3560.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false), + 0x05, + 0x0121, + 20, + 0, + 60.0f, + 1.0f, + { 0.0f, -20.0f, 20.0f }, + { -1220.0f, -1005.0f, -3660.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_80121814[4] = { - { 0x0F, 0x4C, 0x0101, 5, 0, 40.0f, 1.0f, { -1400.0f, -540.0f, -3327.0f }, { -1254.0f, -20.0f, -3357.0f } }, - { 0x01, 0xFF, 0x0101, 70, 0, 75.0f, 0.75f, { -1327.0f, 100.0f, -3342.0f }, { -1320.0f, 350.0f, -3540.0f } }, - { 0x01, 0xFF, 0x2121, 10, 0, 60.0f, 0.75f, { 0.0f, 10.0f, 0.0f }, { 0.0f, 20.0f, -150.0f } }, - { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0x4C, + 0x0101, + 5, + 0, + 40.0f, + 1.0f, + { -1400.0f, -540.0f, -3327.0f }, + { -1254.0f, -20.0f, -3357.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false), + 0xFF, + 0x0101, + 70, + 0, + 75.0f, + 0.75f, + { -1327.0f, 100.0f, -3342.0f }, + { -1320.0f, 350.0f, -3540.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false), + 0xFF, + 0x2121, + 10, + 0, + 60.0f, + 0.75f, + { 0.0f, 10.0f, 0.0f }, + { 0.0f, 20.0f, -150.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_801218B4[2] = { - { 0x0F, 0xFF, 0x0101, 60, 0, 65.0f, 1.0f, { 0.0f, 350.0f, -1520.0f }, { 0.0f, 715.0f, -885.0f } }, - { 0x03, 0xFF, 0x0101, 100, 0, 70.0f, 0.02f, { 0.0f, 75.0f, -1335.0f }, { 0.0f, 20.0f, -1190.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 60, + 0, + 65.0f, + 1.0f, + { 0.0f, 350.0f, -1520.0f }, + { 0.0f, 715.0f, -885.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, false), + 0xFF, + 0x0101, + 100, + 0, + 70.0f, + 0.02f, + { 0.0f, 75.0f, -1335.0f }, + { 0.0f, 20.0f, -1190.0f }, + }, }; static OnePointCsFull D_80121904[2] = { - { 0x0F, 0xFF, 0x0101, 50, 10, 65.0f, 1.0f, { 165.0f, 85.0f, -920.0f }, { 65.0f, -30.0f, -720.0f } }, - { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 50, + 10, + 65.0f, + 1.0f, + { 165.0f, 85.0f, -920.0f }, + { 65.0f, -30.0f, -720.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_17, false, false), + 0xFF, + 0x0000, + 1, + -1, + -1.0f, + -1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_80121954[3][2] = { { - { 0x0F, 0xFF, 0x0101, 20, 5, 60.0f, 1.0f, { -700.0f, 940.0f, 300.0f }, { -765.0f, 1000.0f, 335.0f } }, - { 0x03, 0xFF, 0x0101, 80, -10, 70.0f, 0.1f, { -540.0f, 875.0f, 245.0f }, { -585.0f, 900.0f, 335.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 20, + 5, + 60.0f, + 1.0f, + { -700.0f, 940.0f, 300.0f }, + { -765.0f, 1000.0f, 335.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, false), + 0xFF, + 0x0101, + 80, + -10, + 70.0f, + 0.1f, + { -540.0f, 875.0f, 245.0f }, + { -585.0f, 900.0f, 335.0f }, + }, }, { - { 0x0F, 0xFF, 0x0101, 40, -30, 70.0f, 1.0f, { -80.0f, 115.0f, -180.0f }, { -5.0f, 240.0f, -190.0f } }, - { 0x0B, 0xFF, 0x0101, 60, 20, 70.0f, 0.1f, { -100.0f, 350.0f, -175.0f }, { -5.0f, 240.0f, -190.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 40, + -30, + 70.0f, + 1.0f, + { -80.0f, 115.0f, -180.0f }, + { -5.0f, 240.0f, -190.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_11, false, false), + 0xFF, + 0x0101, + 60, + 20, + 70.0f, + 0.1f, + { -100.0f, 350.0f, -175.0f }, + { -5.0f, 240.0f, -190.0f }, + }, }, { - { 0x03, 0xFF, 0x0101, 80, 5, 70.0f, 0.2f, { 960.0f, 900.0f, 260.0f }, { 970.0f, 950.0f, 250.0f } }, - { 0x0F, 0xFF, 0x0101, 20, 5, 70.0f, 1.0f, { 960.0f, 900.0f, 260.0f }, { 970.0f, 950.0f, 250.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, false), + 0xFF, + 0x0101, + 80, + 5, + 70.0f, + 0.2f, + { 960.0f, 900.0f, 260.0f }, + { 970.0f, 950.0f, 250.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 20, + 5, + 70.0f, + 1.0f, + { 960.0f, 900.0f, 260.0f }, + { 970.0f, 950.0f, 250.0f }, + }, }, }; static OnePointCsFull D_80121A44[12] = { - { 0x4F, 0x05, 0x2121, 10, 0, 60.0f, 1.0f, { 0.0f, -5.0f, 0.0f }, { 0.0f, 0.0f, -80.0f } }, - { 0x42, 0x01, 0x4242, 30, 0, 50.0f, 1.0f, { 0.0f, 45.0f, 0.0f }, { 0.0f, 45.0f, 50.0f } }, - { 0x55, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x4F, 0x05, 0x2222, 40, 5, 50.0f, 1.0f, { 0.0f, 50.0f, 0.0f }, { 0.0f, 50.0f, 50.0f } }, - { 0x4F, 0x01, 0x4242, 40, 5, 60.0f, 1.0f, { 30.0f, 30.0f, 15.0f }, { 70.0f, 30.0f, -40.0f } }, - { 0x55, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x4F, 0xFF, 0x4242, 30, -5, 50.0f, 1.0f, { 20.0f, 30.0f, -5.0f }, { 0.0f, 70.0f, 70.0f } }, - { 0x50, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x4F, 0x01, 0x2242, 40, 0, 45.0f, 1.0f, { 0.0f, 30.0f, 30.0f }, { 25.0f, 60.0f, -60.0f } }, - { 0x4B, 0x01, 0x22C2, 140, 0, 60.0f, 0.04f, { 0.0f, 0.0f, 30.0f }, { 25.0f, 60.0f, -60.0f } }, - { 0x49, 0xFF, 0x2222, 20, 0, 60.0f, 0.8f, { 0.0f, 50.0f, 0.0f }, { 0.0f, 60.0f, -60.0f } }, - { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, true, false), + 0x05, + 0x2121, + 10, + 0, + 60.0f, + 1.0f, + { 0.0f, -5.0f, 0.0f }, + { 0.0f, 0.0f, -80.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, true, false), + 0x01, + 0x4242, + 30, + 0, + 50.0f, + 1.0f, + { 0.0f, 45.0f, 0.0f }, + { 0.0f, 45.0f, 50.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_21, true, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, true, false), + 0x05, + 0x2222, + 40, + 5, + 50.0f, + 1.0f, + { 0.0f, 50.0f, 0.0f }, + { 0.0f, 50.0f, 50.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, true, false), + 0x01, + 0x4242, + 40, + 5, + 60.0f, + 1.0f, + { 30.0f, 30.0f, 15.0f }, + { 70.0f, 30.0f, -40.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_21, true, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, true, false), + 0xFF, + 0x4242, + 30, + -5, + 50.0f, + 1.0f, + { 20.0f, 30.0f, -5.0f }, + { 0.0f, 70.0f, 70.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_16, true, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, true, false), + 0x01, + 0x2242, + 40, + 0, + 45.0f, + 1.0f, + { 0.0f, 30.0f, 30.0f }, + { 25.0f, 60.0f, -60.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_11, true, false), + 0x01, + 0x22C2, + 140, + 0, + 60.0f, + 0.04f, + { 0.0f, 0.0f, 30.0f }, + { 25.0f, 60.0f, -60.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_9, true, false), + 0xFF, + 0x2222, + 20, + 0, + 60.0f, + 0.8f, + { 0.0f, 50.0f, 0.0f }, + { 0.0f, 60.0f, -60.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_80121C24[7] = { - { 0x0F, 0x05, 0x0101, 1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, - { 0x03, 0xFF, 0x0101, 89, 0, 50.0f, 0.4f, { 125.0f, 320.0f, -1500.0f }, { 125.0f, 500.0f, -1150.0f } }, - { 0x0F, 0x08, 0x0101, 40, 4, 55.0f, 1.0f, { 0.0f, 375.0f, -1440.0f }, { 5.0f, 365.0f, -1315.0f } }, - { 0x0F, 0xFF, 0x0101, 40, -4, 55.0f, 1.0f, { 250.0f, 375.0f, -1440.0f }, { 235.0f, 365.0f, -1315.0f } }, - { 0x0F, 0xFF, 0x0101, 100, 0, 95.0f, 1.0f, { 125.0f, 345.0f, -1500.0f }, { 125.0f, 255.0f, -1350.0f } }, - { 0x02, 0xFF, 0x0101, 100, 0, 60.0f, 1.0f, { 125.0f, 325.0f, -1500.0f }, { 125.0f, 480.0f, -1000.0f } }, - { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0x05, + 0x0101, + 1, + 0, + 60.0f, + 1.0f, + { 0.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, false), + 0xFF, + 0x0101, + 89, + 0, + 50.0f, + 0.4f, + { 125.0f, 320.0f, -1500.0f }, + { 125.0f, 500.0f, -1150.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0x08, + 0x0101, + 40, + 4, + 55.0f, + 1.0f, + { 0.0f, 375.0f, -1440.0f }, + { 5.0f, 365.0f, -1315.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 40, + -4, + 55.0f, + 1.0f, + { 250.0f, 375.0f, -1440.0f }, + { 235.0f, 365.0f, -1315.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 100, + 0, + 95.0f, + 1.0f, + { 125.0f, 345.0f, -1500.0f }, + { 125.0f, 255.0f, -1350.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, false), + 0xFF, + 0x0101, + 100, + 0, + 60.0f, + 1.0f, + { 125.0f, 325.0f, -1500.0f }, + { 125.0f, 480.0f, -1000.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_17, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_80121D3C[3] = { - { 0x0F, 0xFF, 0x0101, 1, 0, 60.0f, 1.0f, { 1023.0f, 738.0f, -2628.0f }, { 993.0f, 770.0f, -2740.0f } }, - { 0x02, 0xFF, 0x0101, 4, 0, 50.0f, 1.0f, { 1255.0f, 350.0f, -1870.0f }, { 1240.0f, 575.0f, -2100.0f } }, - { 0x0F, 0xFF, 0x0000, -1, 0, 75.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 1, + 0, + 60.0f, + 1.0f, + { 1023.0f, 738.0f, -2628.0f }, + { 993.0f, 770.0f, -2740.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, false), + 0xFF, + 0x0101, + 4, + 0, + 50.0f, + 1.0f, + { 1255.0f, 350.0f, -1870.0f }, + { 1240.0f, 575.0f, -2100.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0000, + -1, + 0, + 75.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_80121DB4[9] = { - { 0x0F, 0xFF, 0x0101, 40, 0, 70.0f, 1.0f, { 4290.0f, -1332.0f, -1900.0f }, { 4155.0f, -1360.0f, -1840.0f } }, - { 0x02, 0xFF, 0x0101, 60, 0, 70.0f, 1.0f, { 4215.0f, -975.0f, -2095.0f }, { 4070.0f, -1000.0f, -2025.0f } }, - { 0x0F, 0xFF, 0x0101, 5, 0, 70.0f, 1.0f, { 4215.0f, -975.0f, -2095.0f }, { 4070.0f, -1000.0f, -2025.0f } }, - { 0x0F, 0xFF, 0x0101, 80, 8, 75.0f, 1.0f, { 4010.0f, -1152.0f, -1728.0f }, { 3997.0f, -1194.0f, -1629.0f } }, - { 0x0F, 0x39, 0x2121, 1, 8, 75.0f, 1.0f, { 20.0f, 20.0f, 0.0f }, { 50.0f, 30.0f, 200.0f } }, - { 0x04, 0xFF, 0x2121, 99, 2, 70.0f, 0.02f, { -20.0f, 0.0f, 20.0f }, { 300.0f, 50.0f, -500.0f } }, - { 0x09, 0x38, 0x2121, 149, -20, 70.0f, 0.1f, { 100.0f, 50.0f, -100.0f }, { 5000.0f, 1055.0f, -2250.0f } }, - { 0x0F, 0xFF, 0x2121, 1, 0, 60.0f, 1.0f, { 0.0f, -20.0f, 0.0f }, { 0.0f, 20.0f, -150.0f } }, - { 0x12, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 40, + 0, + 70.0f, + 1.0f, + { 4290.0f, -1332.0f, -1900.0f }, + { 4155.0f, -1360.0f, -1840.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, false), + 0xFF, + 0x0101, + 60, + 0, + 70.0f, + 1.0f, + { 4215.0f, -975.0f, -2095.0f }, + { 4070.0f, -1000.0f, -2025.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 5, + 0, + 70.0f, + 1.0f, + { 4215.0f, -975.0f, -2095.0f }, + { 4070.0f, -1000.0f, -2025.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 80, + 8, + 75.0f, + 1.0f, + { 4010.0f, -1152.0f, -1728.0f }, + { 3997.0f, -1194.0f, -1629.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0x39, + 0x2121, + 1, + 8, + 75.0f, + 1.0f, + { 20.0f, 20.0f, 0.0f }, + { 50.0f, 30.0f, 200.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_4, false, false), + 0xFF, + 0x2121, + 99, + 2, + 70.0f, + 0.02f, + { -20.0f, 0.0f, 20.0f }, + { 300.0f, 50.0f, -500.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_9, false, false), + 0x38, + 0x2121, + 149, + -20, + 70.0f, + 0.1f, + { 100.0f, 50.0f, -100.0f }, + { 5000.0f, 1055.0f, -2250.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x2121, + 1, + 0, + 60.0f, + 1.0f, + { 0.0f, -20.0f, 0.0f }, + { 0.0f, 20.0f, -150.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + -1, + -1.0f, + -1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_80121F1C[4] = { - { 0x0F, 0x08, 0x0101, 10, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, - { 0x01, 0xFF, 0x2121, 10, 0, 50.0f, 0.5f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } }, - { 0x01, 0x02, 0x2121, 23, 0, 50.0f, 0.5f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } }, - { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0x08, + 0x0101, + 10, + 0, + 60.0f, + 1.0f, + { 0.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false), + 0xFF, + 0x2121, + 10, + 0, + 50.0f, + 0.5f, + { 0.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 150.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false), + 0x02, + 0x2121, + 23, + 0, + 50.0f, + 0.5f, + { 0.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 150.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_17, false, false), + 0xFF, + 0x0000, + 1, + -1, + -1.0f, + -1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_80121FBC[4] = { - { 0x0F, 0xFF, 0x0101, 5, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, - { 0x01, 0xFF, 0x0101, 10, 0, 30.0f, 1.0f, { -2130.0f, 2885.0f, -1055.0f }, { -2085.0f, 2875.0f, -1145.0f } }, - { 0x0F, 0xFF, 0x0000, 30, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x12, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 5, + 0, + 60.0f, + 1.0f, + { 0.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false), + 0xFF, + 0x0101, + 10, + 0, + 30.0f, + 1.0f, + { -2130.0f, 2885.0f, -1055.0f }, + { -2085.0f, 2875.0f, -1145.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0000, + 30, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + -1, + -1.0f, + -1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_8012205C[3] = { - { 0x0F, 0xFF, 0x42C2, 1, 0, 50.0f, 1.0f, { 0.0f, 220.0f, 0.0f }, { 0.0f, 220.0f, 240.0f } }, - { 0x0F, 0xFF, 0x0080, 29, 0, 50.0f, 1.0f, { 0.0f, 220.0f, 0.0f }, { 0.0f, 220.0f, 240.0f } }, - { 0x01, 0x01, 0x21A1, 10, 0, 60.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 10.0f, -200.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x42C2, + 1, + 0, + 50.0f, + 1.0f, + { 0.0f, 220.0f, 0.0f }, + { 0.0f, 220.0f, 240.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0080, + 29, + 0, + 50.0f, + 1.0f, + { 0.0f, 220.0f, 0.0f }, + { 0.0f, 220.0f, 240.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false), + 0x01, + 0x21A1, + 10, + 0, + 60.0f, + 1.0f, + { 0.0f, -10.0f, 0.0f }, + { 0.0f, 10.0f, -200.0f }, + }, }; static OnePointCsFull D_801220D4[5] = { - { 0x0F, 0x01, 0x0101, 5, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, - { 0x01, 0xFF, 0x4141, 10, 5, 55.0f, 0.75f, { 400.0f, -50.0f, 800.0f }, { 600.0f, -60.0f, 800.0f } }, - { 0x01, 0xFF, 0x4141, 15, 10, 40.0f, 0.75f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 10.0f, 200.0f } }, - { 0x0F, 0xFF, 0x0000, 25, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0x01, + 0x0101, + 5, + 0, + 60.0f, + 1.0f, + { 0.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false), + 0xFF, + 0x4141, + 10, + 5, + 55.0f, + 0.75f, + { 400.0f, -50.0f, 800.0f }, + { 600.0f, -60.0f, 800.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false), + 0xFF, + 0x4141, + 15, + 10, + 40.0f, + 0.75f, + { 0.0f, 0.0f, 0.0f }, + { 0.0f, 10.0f, 200.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0000, + 25, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_17, false, false), + 0xFF, + 0x0000, + 1, + -1, + -1.0f, + -1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_8012219C[7] = { - { 0x0F, 0xFF, 0x2121, 5, 0, 60.0f, 1.0f, { 0.0f, -5.0f, 0.0f }, { 0.0f, 0.0f, -80.0f } }, - { 0x02, 0xFF, 0x4242, 15, 0, 40.0f, 0.4f, { 0.0f, 60.0f, -20.0f }, { 0.0f, 60.0f, 100.0f } }, - { 0x0F, 0xFF, 0x0000, 20, 0, 40.0f, 1.0f, { 0.0f, 60.0f, -20.0f }, { 0.0f, 60.0f, 100.0f } }, - { 0x01, 0xFF, 0x4242, 20, 0, 60.0f, 1.0f, { 20.0f, 60.0f, 20.0f }, { 40.0f, 60.0f, -80.0f } }, - { 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x0F, 0xFF, 0x0000, 90, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x2121, + 5, + 0, + 60.0f, + 1.0f, + { 0.0f, -5.0f, 0.0f }, + { 0.0f, 0.0f, -80.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, false), + 0xFF, + 0x4242, + 15, + 0, + 40.0f, + 0.4f, + { 0.0f, 60.0f, -20.0f }, + { 0.0f, 60.0f, 100.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0000, + 20, + 0, + 40.0f, + 1.0f, + { 0.0f, 60.0f, -20.0f }, + { 0.0f, 60.0f, 100.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false), + 0xFF, + 0x4242, + 20, + 0, + 60.0f, + 1.0f, + { 20.0f, 60.0f, 20.0f }, + { 40.0f, 60.0f, -80.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_16, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0000, + 90, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_17, false, false), + 0xFF, + 0x0000, + 1, + -1, + -1.0f, + -1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_801222B4[5] = { - { 0x0F, 0xFF, 0x0101, 20, 10, 45.0f, 1.0f, { -1200.0f, 730.0f, -860.0f }, { -1100.0f, 500.0f, -1025.0f } }, - { 0x0B, 0xFF, 0x0101, 20, 10, 45.0f, 0.1f, { -880.0f, 480.0f, -860.0f }, { -1100.0f, 500.0f, -1025.0f } }, - { 0x0B, 0x81, 0x0101, 20, 10, 45.0f, 0.1f, { -880.0f, 500.0f, -860.0f }, { -1100.0f, 500.0f, -1025.0f } }, - { 0x0B, 0x8A, 0x0101, 5, 10, 45.0f, 0.1f, { -880.0f, 500.0f, -860.0f }, { -1100.0f, 500.0f, -1025.0f } }, - { 0x12, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 20, + 10, + 45.0f, + 1.0f, + { -1200.0f, 730.0f, -860.0f }, + { -1100.0f, 500.0f, -1025.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_11, false, false), + 0xFF, + 0x0101, + 20, + 10, + 45.0f, + 0.1f, + { -880.0f, 480.0f, -860.0f }, + { -1100.0f, 500.0f, -1025.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_11, false, false), + 0x81, + 0x0101, + 20, + 10, + 45.0f, + 0.1f, + { -880.0f, 500.0f, -860.0f }, + { -1100.0f, 500.0f, -1025.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_11, false, false), + 0x8A, + 0x0101, + 5, + 10, + 45.0f, + 0.1f, + { -880.0f, 500.0f, -860.0f }, + { -1100.0f, 500.0f, -1025.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + -1, + -1.0f, + -1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_8012237C[2] = { - { 0x0F, 0xFF, 0x0101, 20, -2, 65.0f, 1.0f, { -625.0f, 185.0f, -685.0f }, { -692.0f, 226.0f, -515.0f } }, - { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 20, + -2, + 65.0f, + 1.0f, + { -625.0f, 185.0f, -685.0f }, + { -692.0f, 226.0f, -515.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_17, false, false), + 0xFF, + 0x0000, + 1, + -1, + -1.0f, + -1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_801223CC[6] = { - { 0x0F, 0xFF, 0x0101, 20, 0, 55.0f, 1.0f, { 60.0f, 1130.0f, -1430.0f }, { 60.0f, 1130.0f, -1190.0f } }, - { 0x0F, 0xFF, 0x0101, 18, -13, 68.0f, 1.0f, { 60.0f, 1130.0f, -1445.0f }, { 180.0f, 1170.0f, -1240.0f } }, - { 0x0F, 0xFF, 0x0101, 16, 18, 75.0f, 1.0f, { 42.0f, 1040.0f, -1400.0f }, { -20.0f, 940.0f, -1280.0f } }, - { 0x0F, 0xFF, 0x0101, 4, 0, 60.0f, 1.0f, { 60.0f, 1100.0f, -1465.0f }, { 60.0f, 1100.0f, -1180.0f } }, - { 0x02, 0xFF, 0x0101, 32, 0, 70.0f, 1.0f, { 60.0f, 1100.0f, -1030.0f }, { 60.0f, 1150.0f, -740.0f } }, - { 0x12, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 20, + 0, + 55.0f, + 1.0f, + { 60.0f, 1130.0f, -1430.0f }, + { 60.0f, 1130.0f, -1190.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 18, + -13, + 68.0f, + 1.0f, + { 60.0f, 1130.0f, -1445.0f }, + { 180.0f, 1170.0f, -1240.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 16, + 18, + 75.0f, + 1.0f, + { 42.0f, 1040.0f, -1400.0f }, + { -20.0f, 940.0f, -1280.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 4, + 0, + 60.0f, + 1.0f, + { 60.0f, 1100.0f, -1465.0f }, + { 60.0f, 1100.0f, -1180.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, false), + 0xFF, + 0x0101, + 32, + 0, + 70.0f, + 1.0f, + { 60.0f, 1100.0f, -1030.0f }, + { 60.0f, 1150.0f, -740.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + -1, + -1.0f, + -1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_801224BC[7] = { - { 0x0F, 0xFF, 0x0101, 5, 0, 70.0f, 1.0f, { 60.0f, 1800.0f, -920.0f }, { 60.0f, 1860.0f, -800.0f } }, - { 0x03, 0xFF, 0x0101, 20, 0, 70.0f, 0.1f, { 60.0f, 1720.0f, -920.0f }, { 60.0f, 1780.0f, -800.0f } }, - { 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x0F, 0xFF, 0x0142, 1, 0, 75.0f, 1.0f, { 0.0f, 70.0f, 0.0f }, { 60.0f, 990.0f, -690.0f } }, - { 0x03, 0xFF, 0x0142, 119, 0, 75.0f, 0.05f, { 0.0f, 70.0f, 0.0f }, { 60.0f, 990.0f, -690.0f } }, - { 0x03, 0xFF, 0x4242, 20, 0, 60.0f, 0.1f, { 0.0f, 70.0f, 0.0f }, { 0.0f, 100.0f, 200.0f } }, - { 0x12, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 5, + 0, + 70.0f, + 1.0f, + { 60.0f, 1800.0f, -920.0f }, + { 60.0f, 1860.0f, -800.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, false), + 0xFF, + 0x0101, + 20, + 0, + 70.0f, + 0.1f, + { 60.0f, 1720.0f, -920.0f }, + { 60.0f, 1780.0f, -800.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_16, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0142, + 1, + 0, + 75.0f, + 1.0f, + { 0.0f, 70.0f, 0.0f }, + { 60.0f, 990.0f, -690.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, false), + 0xFF, + 0x0142, + 119, + 0, + 75.0f, + 0.05f, + { 0.0f, 70.0f, 0.0f }, + { 60.0f, 990.0f, -690.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, false), + 0xFF, + 0x4242, + 20, + 0, + 60.0f, + 0.1f, + { 0.0f, 70.0f, 0.0f }, + { 0.0f, 100.0f, 200.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + -1, + -1.0f, + -1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_801225D4[5] = { - { 0x0F, 0x08, 0x0101, 1, 0, 50.0f, 1.0f, { 4100.0f, 1200.0f, -1400.0f }, { 3900.0f, 1100.0f, -1400.0f } }, - { 0x01, 0x3B, 0x0101, 60, 4, 50.0f, 0.94f, { 4100.0f, 965.0f, -1385.0f }, { 3790.0f, 825.0f, -1325.0f } }, - { 0x03, 0xFF, 0x0101, 90, -5, 130.0f, 0.02f, { 4100.0f, 975.0f, -1375.0f }, { 3735.0f, 715.0f, -1325.0f } }, - { 0x0F, 0x08, 0x2323, 2, 0, 60.0f, 1.0f, { 0.0f, 60.0f, 0.0f }, { -10.0f, 15.0f, -200.0f } }, - { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0x08, + 0x0101, + 1, + 0, + 50.0f, + 1.0f, + { 4100.0f, 1200.0f, -1400.0f }, + { 3900.0f, 1100.0f, -1400.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false), + 0x3B, + 0x0101, + 60, + 4, + 50.0f, + 0.94f, + { 4100.0f, 965.0f, -1385.0f }, + { 3790.0f, 825.0f, -1325.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, false), + 0xFF, + 0x0101, + 90, + -5, + 130.0f, + 0.02f, + { 4100.0f, 975.0f, -1375.0f }, + { 3735.0f, 715.0f, -1325.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0x08, + 0x2323, + 2, + 0, + 60.0f, + 1.0f, + { 0.0f, 60.0f, 0.0f }, + { -10.0f, 15.0f, -200.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_8012269C[3] = { - { 0x0F, 0xFF, 0x0101, 20, 2, 45.0f, 1.0f, { 975.0f, 225.0f, -1195.0f }, { 918.0f, 228.0f, -1228.0f } }, - { 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 20, + 2, + 45.0f, + 1.0f, + { 975.0f, 225.0f, -1195.0f }, + { 918.0f, 228.0f, -1228.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_16, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_17, false, false), + 0xFF, + 0x0000, + 1, + -1, + -1.0f, + -1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_80122714[4] = { - { 0x0F, 0xFF, 0x0101, 20, 0, 45.0f, 1.0f, { -915.0f, -2185.0f, 6335.0f }, { -915.0f, -2290.0f, 6165.0f } }, - { 0x02, 0xFF, 0x0101, -1, 0, 80.0f, 0.8f, { -920.0f, -2270.0f, 6140.0f }, { -920.0f, -2280.0f, 6070.0f } }, - { 0x02, 0xFF, 0x0101, 20, 0, 80.0f, 0.9f, { -920.0f, -2300.0f, 6140.0f }, { -920.0f, -2300.0f, 6070.0f } }, - { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 20, + 0, + 45.0f, + 1.0f, + { -915.0f, -2185.0f, 6335.0f }, + { -915.0f, -2290.0f, 6165.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, false), + 0xFF, + 0x0101, + -1, + 0, + 80.0f, + 0.8f, + { -920.0f, -2270.0f, 6140.0f }, + { -920.0f, -2280.0f, 6070.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, false), + 0xFF, + 0x0101, + 20, + 0, + 80.0f, + 0.9f, + { -920.0f, -2300.0f, 6140.0f }, + { -920.0f, -2300.0f, 6070.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_17, false, false), + 0xFF, + 0x0000, + 1, + -1, + -1.0f, + -1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_801227B4[6] = { - { 0x0F, 0xFF, 0x0101, 30, 0, 60.0f, 1.0f, { 1400.0f, 100.0f, -170.0f }, { 1250.0f, 100.0f, -170.0f } }, - { 0x03, 0xFF, 0x4242, 130, 0, 60.0f, 0.2f, { 0.0f, -5.0f, 0.0f }, { -150.0f, -5.0f, 0.0f } }, - { 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x02, 0xFF, 0x0303, 69, 0, 85.0f, 1.0f, { -40.0f, 0.0f, 0.0f }, { -40.0f, 0.0f, 0.0f } }, - { 0x02, 0xFF, 0x0303, 20, 0, 60.0f, 1.0f, { 10.0f, 0.0f, 0.0f }, { 10.0f, 0.0f, 0.0f } }, - { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 30, + 0, + 60.0f, + 1.0f, + { 1400.0f, 100.0f, -170.0f }, + { 1250.0f, 100.0f, -170.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, false), + 0xFF, + 0x4242, + 130, + 0, + 60.0f, + 0.2f, + { 0.0f, -5.0f, 0.0f }, + { -150.0f, -5.0f, 0.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_16, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, false), + 0xFF, + 0x0303, + 69, + 0, + 85.0f, + 1.0f, + { -40.0f, 0.0f, 0.0f }, + { -40.0f, 0.0f, 0.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, false), + 0xFF, + 0x0303, + 20, + 0, + 60.0f, + 1.0f, + { 10.0f, 0.0f, 0.0f }, + { 10.0f, 0.0f, 0.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_17, false, false), + 0xFF, + 0x0000, + 1, + -1, + -1.0f, + -1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_801228A4[5] = { - { 0x0F, 0x01, 0x0101, 20, 5, 30.0f, 1.0f, { 800.0f, -40.0f, 2170.0f }, { 512.0f, 142.0f, 2020.0f } }, - { 0x02, 0xFF, 0x0101, 20, -2, 70.0f, 0.8f, { 800.0f, -40.0f, 2170.0f }, { 512.0f, 142.0f, 2020.0f } }, - { 0x0F, 0x08, 0x0101, 90, 2, 62.0f, 1.0f, { 1140.0f, 125.0f, 1920.0f }, { 1255.0f, 150.0f, 1785.0f } }, - { 0x81, 0xFF, 0x2121, 10, 0, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { 30.0f, 10.0f, -80.0f } }, - { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0x01, + 0x0101, + 20, + 5, + 30.0f, + 1.0f, + { 800.0f, -40.0f, 2170.0f }, + { 512.0f, 142.0f, 2020.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, false), + 0xFF, + 0x0101, + 20, + -2, + 70.0f, + 0.8f, + { 800.0f, -40.0f, 2170.0f }, + { 512.0f, 142.0f, 2020.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0x08, + 0x0101, + 90, + 2, + 62.0f, + 1.0f, + { 1140.0f, 125.0f, 1920.0f }, + { 1255.0f, 150.0f, 1785.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, true), + 0xFF, + 0x2121, + 10, + 0, + 60.0f, + 1.0f, + { 0.0f, 10.0f, 0.0f }, + { 30.0f, 10.0f, -80.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_8012296C[4] = { - { 0x0F, 0xFF, 0x0101, 20, -10, 70.0f, 1.0f, { -930.0f, 765.0f, -3075.0f }, { -700.0f, 700.0f, -3075.0f } }, - { 0x03, 0xFF, 0x0101, 80, -10, 70.0f, 0.05f, { -930.0f, 205.0f, -3075.0f }, { -700.0f, 140.0f, -3075.0f } }, - { 0x0F, 0xFF, 0x0000, 120, 0, 70.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 20, + -10, + 70.0f, + 1.0f, + { -930.0f, 765.0f, -3075.0f }, + { -700.0f, 700.0f, -3075.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, false), + 0xFF, + 0x0101, + 80, + -10, + 70.0f, + 0.05f, + { -930.0f, 205.0f, -3075.0f }, + { -700.0f, 140.0f, -3075.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0000, + 120, + 0, + 70.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_17, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_80122A0C[2] = { - { 0x0F, 0xFF, 0x0101, 60, 4, 50.0f, 1.0f, { 0.0f, 400.0f, -1000.0f }, { -200.0f, 500.0f, -850.0f } }, - { 0x12, 0xFF, 0x0000, 1, 0, 50.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 60, + 4, + 50.0f, + 1.0f, + { 0.0f, 400.0f, -1000.0f }, + { -200.0f, 500.0f, -850.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + 0, + 50.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_80122A5C[8] = { - { 0x0F, 0xFF, 0x0101, 1, -15, 70.0f, 1.0f, { 230.0f, 3675.0f, -4230.0f }, { -45.0f, 3650.0f, -4415.0f } }, - { 0x15, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x0F, 0xFF, 0x0101, 1, 0, 60.0f, 1.0f, { -120.0f, 2187.0f, -3286.0f }, { -110.0f, 2162.0f, -3262.0f } }, - { 0x15, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x0F, 0xFF, 0x0101, 55, 0, 60.0f, 1.0f, { -38.0f, 1467.0f, -1102.0f }, { 64.0f, 1423.0f, -1188.0f } }, - { 0x0F, 0xFF, 0x0101, 1, -15, 70.0f, 1.0f, { 230.0f, 3675.0f, -4230.0f }, { -20.0f, 3650.0f, -4400.0f } }, - { 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 1, + -15, + 70.0f, + 1.0f, + { 230.0f, 3675.0f, -4230.0f }, + { -45.0f, 3650.0f, -4415.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_21, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 1, + 0, + 60.0f, + 1.0f, + { -120.0f, 2187.0f, -3286.0f }, + { -110.0f, 2162.0f, -3262.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_21, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 55, + 0, + 60.0f, + 1.0f, + { -38.0f, 1467.0f, -1102.0f }, + { 64.0f, 1423.0f, -1188.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 1, + -15, + 70.0f, + 1.0f, + { 230.0f, 3675.0f, -4230.0f }, + { -20.0f, 3650.0f, -4400.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_16, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_17, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_80122B9C[3] = { - { 0x0F, 0xFF, 0x0101, 60, 0, 65.0f, 1.0f, { 1095.0f, 2890.0f, -2980.0f }, { 1166.0f, 2695.0f, -2710.0f } }, - { 0x0F, 0xFF, 0x0101, 60, 15, 65.0f, 1.0f, { 566.0f, 4654.0f, -4550.0f }, { 606.0f, 5160.0f, -4740.0f } }, - { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 60, + 0, + 65.0f, + 1.0f, + { 1095.0f, 2890.0f, -2980.0f }, + { 1166.0f, 2695.0f, -2710.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 60, + 15, + 65.0f, + 1.0f, + { 566.0f, 4654.0f, -4550.0f }, + { 606.0f, 5160.0f, -4740.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_17, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_80122C14[1] = { - { 0x0F, 0xFF, 0x0101, 999, 0, 85.0f, 1.0f, { -15.0f, 185.0f, 160.0f }, { -15.0f, 210.0f, 250.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 999, + 0, + 85.0f, + 1.0f, + { -15.0f, 185.0f, 160.0f }, + { -15.0f, 210.0f, 250.0f }, + }, }; static OnePointCsFull D_80122C3C[1] = { - { 0x0F, 0xFF, 0x0101, 999, -2, 70.0f, 1.0f, { -62.0f, 60.0f, -315.0f }, { -115.0f, 30.0f, -445.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 999, + -2, + 70.0f, + 1.0f, + { -62.0f, 60.0f, -315.0f }, + { -115.0f, 30.0f, -445.0f }, + }, }; static OnePointCsFull D_80122C64[1] = { - { 0x0F, 0xFF, 0x0101, 999, 3, 70.0f, 1.0f, { -40.0f, 80.0f, 375.0f }, { -85.0f, 45.0f, 485.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 999, + 3, + 70.0f, + 1.0f, + { -40.0f, 80.0f, 375.0f }, + { -85.0f, 45.0f, 485.0f }, + }, }; static OnePointCsFull D_80122C8C[1] = { - { 0x0F, 0xFF, 0x0101, 999, 5, 60.0f, 1.0f, { -70.0f, 140.0f, 25.0f }, { 10.0f, 180.0f, 195.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 999, + 5, + 60.0f, + 1.0f, + { -70.0f, 140.0f, 25.0f }, + { 10.0f, 180.0f, 195.0f }, + }, }; static OnePointCsFull D_80122CB4[2] = { - { 0x0F, 0xFF, 0x4242, 5, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 1000.0f }, { 0.0f, 0.0f, 1100.0f } }, - { 0x02, 0xFF, 0x4242, -1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, -100.0f }, { 0.0f, 0.0f, 0.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x4242, + 5, + 0, + 60.0f, + 1.0f, + { 0.0f, 0.0f, 1000.0f }, + { 0.0f, 0.0f, 1100.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, false), + 0xFF, + 0x4242, + -1, + 0, + 60.0f, + 1.0f, + { 0.0f, 0.0f, -100.0f }, + { 0.0f, 0.0f, 0.0f }, + }, }; static OnePointCsFull D_80122D04[2] = { - { 0x0F, 0xFF, 0x4242, 10, 0, 60.0f, 1.0f, { 0.0f, 0.0f, -100.0f }, { 0.0f, 0.0f, 0.0f } }, - { 0x02, 0xFF, 0x4242, -1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 1000.0f }, { 0.0f, 0.0f, 1100.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x4242, + 10, + 0, + 60.0f, + 1.0f, + { 0.0f, 0.0f, -100.0f }, + { 0.0f, 0.0f, 0.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, false), + 0xFF, + 0x4242, + -1, + 0, + 60.0f, + 1.0f, + { 0.0f, 0.0f, 1000.0f }, + { 0.0f, 0.0f, 1100.0f }, + }, }; static OnePointCsFull D_80122D54[3] = { - { 0x0F, 0xFF, 0x0101, 1, -4, 50.0f, 1.0f, { 230.0f, 65.0f, 300.0f }, { 50.0f, 50.0f, 225.0f } }, - { 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 1, + -4, + 50.0f, + 1.0f, + { 230.0f, 65.0f, 300.0f }, + { 50.0f, 50.0f, 225.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_16, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_17, false, false), + 0xFF, + 0x0000, + 1, + -1, + -1.0f, + -1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_80122DCC[3] = { - { 0x0F, 0xFF, 0x0101, 1, 0, 50.0f, 1.0f, { 0.0f, 5.0f, -145.0f }, { 0.0f, 55.0f, 55.0f } }, - { 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 1, + 0, + 50.0f, + 1.0f, + { 0.0f, 5.0f, -145.0f }, + { 0.0f, 55.0f, 55.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_16, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_17, false, false), + 0xFF, + 0x0000, + 1, + -1, + -1.0f, + -1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_80122E44[2][7] = { { - { 0x83, 0xFF, 0x2222, 10, 5, 90.0f, 0.2f, { 50.0f, 100.0f, 140.0f }, { -30.0f, 10.0f, -20.0f } }, - { 0x8F, 0xFF, 0x0000, 20, 0, 90.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x03, 0xFF, 0x4343, 30, -5, 50.0f, 0.2f, { -10.0f, 80.0f, 10.0f }, { 20.0f, 20.0f, 120.0f } }, - { 0x10, 0xFF, 0x0000, 1, -5, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x0B, 0x01, 0x4343, 160, 10, 80.0f, 0.005f, { -50.0f, 60.0f, 0.0f }, { -100.0f, 20.0f, 50.0f } }, - { 0x02, 0xFF, 0x0501, 50, 0, 60.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 10.0f, 80.0f } }, - { 0x13, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, true), + 0xFF, + 0x2222, + 10, + 5, + 90.0f, + 0.2f, + { 50.0f, 100.0f, 140.0f }, + { -30.0f, 10.0f, -20.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0xFF, + 0x0000, + 20, + 0, + 90.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, false), + 0xFF, + 0x4343, + 30, + -5, + 50.0f, + 0.2f, + { -10.0f, 80.0f, 10.0f }, + { 20.0f, 20.0f, 120.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_16, false, false), + 0xFF, + 0x0000, + 1, + -5, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_11, false, false), + 0x01, + 0x4343, + 160, + 10, + 80.0f, + 0.005f, + { -50.0f, 60.0f, 0.0f }, + { -100.0f, 20.0f, 50.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, false), + 0xFF, + 0x0501, + 50, + 0, + 60.0f, + 1.0f, + { 0.0f, -10.0f, 0.0f }, + { 0.0f, 10.0f, 80.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_19, false, false), + 0xFF, + 0x0000, + 1, + -1, + -1.0f, + -1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }, { - { 0x83, 0xFF, 0x2222, 10, -5, 90.0f, 0.2f, { -50.0f, 100.0f, 140.0f }, { 30.0f, 10.0f, -20.0f } }, - { 0x8F, 0xFF, 0x0000, 20, 0, 90.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x03, 0xFF, 0x4343, 30, 5, 50.0f, 0.2f, { 10.0f, 80.0f, 10.0f }, { -20.0f, 20.0f, 120.0f } }, - { 0x10, 0xFF, 0x0000, 1, 5, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x0B, 0x01, 0x4343, 160, -10, 80.0f, 0.005f, { 50.0f, 60.0f, 0.0f }, { 100.0f, 20.0f, 50.0f } }, - { 0x02, 0xFF, 0x0501, 50, 0, 60.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 10.0f, 80.0f } }, - { 0x13, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, true), + 0xFF, + 0x2222, + 10, + -5, + 90.0f, + 0.2f, + { -50.0f, 100.0f, 140.0f }, + { 30.0f, 10.0f, -20.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0xFF, + 0x0000, + 20, + 0, + 90.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, false), + 0xFF, + 0x4343, + 30, + 5, + 50.0f, + 0.2f, + { 10.0f, 80.0f, 10.0f }, + { -20.0f, 20.0f, 120.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_16, false, false), + 0xFF, + 0x0000, + 1, + 5, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_11, false, false), + 0x01, + 0x4343, + 160, + -10, + 80.0f, + 0.005f, + { 50.0f, 60.0f, 0.0f }, + { 100.0f, 20.0f, 50.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, false), + 0xFF, + 0x0501, + 50, + 0, + 60.0f, + 1.0f, + { 0.0f, -10.0f, 0.0f }, + { 0.0f, 10.0f, 80.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_19, false, false), + 0xFF, + 0x0000, + 1, + -1, + -1.0f, + -1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }, }; static OnePointCsFull D_80123074[5] = { - { 0x8F, 0xFF, 0xA2A2, 2, 8, 70.0f, 1.0f, { -27.0f, -96.0f, 25.0f }, { 37.0f, -5.0f, 100.0f } }, - { 0x81, 0xFF, 0xA2A2, 38, 4, 60.0f, 1.0f, { 64.0f, -109.0f, 55.0f }, { 37.0f, 150.0f, 155.0f } }, - { 0x8F, 0xFF, 0xA2A2, 2, 8, 70.0f, 1.0f, { 45.0f, 123.0f, 45.0f }, { 70.0f, 5.0f, 125.0f } }, - { 0x81, 0xFF, 0xA2A2, 58, 4, 60.0f, 0.9f, { 82.0f, 95.0f, 55.0f }, { 25.0f, -175.0f, 180.0f } }, - { 0x92, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0xFF, + 0xA2A2, + 2, + 8, + 70.0f, + 1.0f, + { -27.0f, -96.0f, 25.0f }, + { 37.0f, -5.0f, 100.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, true), + 0xFF, + 0xA2A2, + 38, + 4, + 60.0f, + 1.0f, + { 64.0f, -109.0f, 55.0f }, + { 37.0f, 150.0f, 155.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0xFF, + 0xA2A2, + 2, + 8, + 70.0f, + 1.0f, + { 45.0f, 123.0f, 45.0f }, + { 70.0f, 5.0f, 125.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, true), + 0xFF, + 0xA2A2, + 58, + 4, + 60.0f, + 0.9f, + { 82.0f, 95.0f, 55.0f }, + { 25.0f, -175.0f, 180.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, true), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_8012313C[3] = { - { 0x8F, 0xFF, 0xA2A2, 20, 8, 70.0f, 1.0f, { 65.0f, -150.0f, 50.0f }, { 30.0f, 10.0f, 90.0f } }, - { 0x81, 0xFF, 0xA2A2, 100, 0, 60.0f, 1.0f, { 70.0f, -160.0f, 50.0f }, { 25.0f, 180.0f, 180.0f } }, - { 0x92, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0xFF, + 0xA2A2, + 20, + 8, + 70.0f, + 1.0f, + { 65.0f, -150.0f, 50.0f }, + { 30.0f, 10.0f, 90.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, true), + 0xFF, + 0xA2A2, + 100, + 0, + 60.0f, + 1.0f, + { 70.0f, -160.0f, 50.0f }, + { 25.0f, 180.0f, 180.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, true), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_801231B4[4] = { - { 0x8F, 0xC5, 0x4343, 1, 0, 50.0f, 1.0f, { 0.0f, 20.0f, 0.0f }, { 0.0f, 5.0f, -1.0f } }, - { 0x81, 0xC5, 0x4343, 48, 0, 50.0f, 0.75f, { 0.0f, 80.0f, 0.0f }, { 0.0f, 15.0f, -1.0f } }, - { 0x8F, 0xC5, 0x4343, 1, 5, 45.0f, 1.0f, { 0.0f, 0.0f, 30.0f }, { 30.0f, 120.0f, 60.0f } }, - { 0x81, 0xC5, 0x4343, -1, 0, -1.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0xC5, + 0x4343, + 1, + 0, + 50.0f, + 1.0f, + { 0.0f, 20.0f, 0.0f }, + { 0.0f, 5.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, true), + 0xC5, + 0x4343, + 48, + 0, + 50.0f, + 0.75f, + { 0.0f, 80.0f, 0.0f }, + { 0.0f, 15.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0xC5, + 0x4343, + 1, + 5, + 45.0f, + 1.0f, + { 0.0f, 0.0f, 30.0f }, + { 30.0f, 120.0f, 60.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, true), + 0xC5, + 0x4343, + -1, + 0, + -1.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_80123254[2] = { - { 0x0F, 0xFF, 0x0101, 1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, - { 0x03, 0xC5, 0x0101, 49, 0, 50.0f, 0.05f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 1, + 0, + 60.0f, + 1.0f, + { 0.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, false), + 0xC5, + 0x0101, + 49, + 0, + 50.0f, + 0.05f, + { 0.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + }, }; static OnePointCsFull D_801232A4[1] = { - { 0x0F, 0x45, 0x0101, 9999, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0x45, + 0x0101, + 9999, + 0, + 60.0f, + 1.0f, + { 0.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + }, }; static OnePointCsFull D_801232CC[5] = { - { 0x01, 0xFF, 0x0101, 45, -3, 65.0f, 1.0f, { -52.0f, 84.0f, -846.0f }, { -159.0f, 33.0f, -729.0f } }, - { 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x0F, 0xFF, 0x0000, 10, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x01, 0xFF, 0x2121, 15, 0, 60.0f, 1.0f, { 10.0f, -5.0f, 0.0f }, { 0.0f, 0.0f, -150.0f } }, - { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false), + 0xFF, + 0x0101, + 45, + -3, + 65.0f, + 1.0f, + { -52.0f, 84.0f, -846.0f }, + { -159.0f, 33.0f, -729.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_16, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0000, + 10, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false), + 0xFF, + 0x2121, + 15, + 0, + 60.0f, + 1.0f, + { 10.0f, -5.0f, 0.0f }, + { 0.0f, 0.0f, -150.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_80123394[5] = { - { 0x01, 0xFF, 0x0101, 45, 3, 65.0f, 1.0f, { -16.0f, 87.0f, -829.0f }, { 98.0f, 24.0f, -714.0f } }, - { 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x0F, 0xFF, 0x0000, 10, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x01, 0xFF, 0x2121, 15, 0, 60.0f, 1.0f, { 10.0f, -5.0f, 0.0f }, { 0.0f, 0.0f, -150.0f } }, - { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false), + 0xFF, + 0x0101, + 45, + 3, + 65.0f, + 1.0f, + { -16.0f, 87.0f, -829.0f }, + { 98.0f, 24.0f, -714.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_16, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0000, + 10, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false), + 0xFF, + 0x2121, + 15, + 0, + 60.0f, + 1.0f, + { 10.0f, -5.0f, 0.0f }, + { 0.0f, 0.0f, -150.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_8012345C[4] = { - { 0x01, 0x01, 0x4242, 40, 0, 40.0f, 1.0f, { 0.0f, 50.0f, -40.0f }, { 0.0f, 60.0f, -160.0f } }, - { 0x04, 0x4D, 0x4242, 40, 0, 60.0f, 0.3f, { 0.0f, 90.0f, -40.0f }, { 0.0f, 60.0f, -160.0f } }, - { 0x04, 0x01, 0x2121, 10, 0, 60.0f, 0.2f, { 0.0f, -10.0f, 10.0f }, { 0.0f, 10.0f, -80.0f } }, - { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false), + 0x01, + 0x4242, + 40, + 0, + 40.0f, + 1.0f, + { 0.0f, 50.0f, -40.0f }, + { 0.0f, 60.0f, -160.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_4, false, false), + 0x4D, + 0x4242, + 40, + 0, + 60.0f, + 0.3f, + { 0.0f, 90.0f, -40.0f }, + { 0.0f, 60.0f, -160.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_4, false, false), + 0x01, + 0x2121, + 10, + 0, + 60.0f, + 0.2f, + { 0.0f, -10.0f, 10.0f }, + { 0.0f, 10.0f, -80.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_801234FC[5] = { - { 0x01, 0x05, 0x0441, 10, 0, 70.0f, 1.0f, { 0.0f, -10.0f, 20.0f }, { 0.0f, 0.0f, 120.0f } }, - { 0x03, 0xFF, 0x4141, 30, 0, 50.0f, 0.1f, { 0.0f, -10.0f, 20.0f }, { 0.0f, 10.0f, 80.0f } }, - { 0x10, 0x01, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x82, 0xFF, 0x2121, 10, 0, 60.0f, 0.9f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 10.0f, -80.0f } }, - { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, false), + 0x05, + 0x0441, + 10, + 0, + 70.0f, + 1.0f, + { 0.0f, -10.0f, 20.0f }, + { 0.0f, 0.0f, 120.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, false), + 0xFF, + 0x4141, + 30, + 0, + 50.0f, + 0.1f, + { 0.0f, -10.0f, 20.0f }, + { 0.0f, 10.0f, 80.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_16, false, false), + 0x01, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, true), + 0xFF, + 0x2121, + 10, + 0, + 60.0f, + 0.9f, + { 0.0f, -10.0f, 0.0f }, + { 0.0f, 10.0f, -80.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_801235C4[5] = { - { 0x0F, 0x01, 0x4141, 1, 0, 50.0f, 1.0f, { 0.0f, -10.0f, 20.0f }, { 0.0f, 10.0f, 60.0f } }, - { 0x83, 0xFF, 0x0441, 39, 0, 70.0f, 0.1f, { 0.0f, -10.0f, 20.0f }, { 0.0f, 0.0f, 100.0f } }, - { 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x82, 0xFF, 0x2121, 15, 0, 60.0f, 0.9f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 10.0f, -80.0f } }, - { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0x01, + 0x4141, + 1, + 0, + 50.0f, + 1.0f, + { 0.0f, -10.0f, 20.0f }, + { 0.0f, 10.0f, 60.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, true), + 0xFF, + 0x0441, + 39, + 0, + 70.0f, + 0.1f, + { 0.0f, -10.0f, 20.0f }, + { 0.0f, 0.0f, 100.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_16, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, true), + 0xFF, + 0x2121, + 15, + 0, + 60.0f, + 0.9f, + { 0.0f, -10.0f, 0.0f }, + { 0.0f, 10.0f, -80.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_8012368C[4] = { - { 0x0F, 0xFF, 0x0101, 10, 0, 60.0f, 1.0f, { -1110.0f, -180.0f, -840.0f }, { -985.0f, -220.0f, -840.0f } }, - { 0x02, 0xFF, 0x0101, 70, -45, 75.0f, 1.0f, { -1060.0f, -160.0f, -840.0f }, { -1005.0f, -230.0f, -840.0f } }, - { 0x0F, 0xFF, 0x0000, 10, -45, 75.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x0F, 0xFF, 0x0101, 180, 9, 80.0f, 1.0f, { -1205.0f, -175.0f, -840.0f }, { -1305.0f, -230.0f, -828.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 10, + 0, + 60.0f, + 1.0f, + { -1110.0f, -180.0f, -840.0f }, + { -985.0f, -220.0f, -840.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, false), + 0xFF, + 0x0101, + 70, + -45, + 75.0f, + 1.0f, + { -1060.0f, -160.0f, -840.0f }, + { -1005.0f, -230.0f, -840.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0000, + 10, + -45, + 75.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 180, + 9, + 80.0f, + 1.0f, + { -1205.0f, -175.0f, -840.0f }, + { -1305.0f, -230.0f, -828.0f }, + }, }; static OnePointCsFull D_8012372C[4] = { - { 0x0F, 0xFF, 0x0142, 10, 0, 70.0f, 1.0f, { 0.0f, 80.0f, 0.0f }, { -1650.0f, 200.0f, -2920.0f } }, - { 0x02, 0xFF, 0x0142, 110, -2, 50.0f, 0.5f, { 0.0f, 150.0f, 0.0f }, { -1320.0f, 170.0f, -2900.0f } }, - { 0x0B, 0xFF, 0x4242, 100, 2, 70.0f, 0.1f, { 0.0f, 150.0f, 50.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x03, 0xFF, 0x4242, 60, 2, 45.0f, 0.01f, { 0.0f, 150.0f, 50.0f }, { 0.0f, 200.0f, -80.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0142, + 10, + 0, + 70.0f, + 1.0f, + { 0.0f, 80.0f, 0.0f }, + { -1650.0f, 200.0f, -2920.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, false), + 0xFF, + 0x0142, + 110, + -2, + 50.0f, + 0.5f, + { 0.0f, 150.0f, 0.0f }, + { -1320.0f, 170.0f, -2900.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_11, false, false), + 0xFF, + 0x4242, + 100, + 2, + 70.0f, + 0.1f, + { 0.0f, 150.0f, 50.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, false), + 0xFF, + 0x4242, + 60, + 2, + 45.0f, + 0.01f, + { 0.0f, 150.0f, 50.0f }, + { 0.0f, 200.0f, -80.0f }, + }, }; static OnePointCsFull D_801237CC[5] = { - { 0x8F, 0xFF, 0x4242, 20, 0, 50.0f, 1.0f, { 0.0f, 50.0f, -10.0f }, { 0.0f, 0.0f, 100.0f } }, - { 0x0A, 0xFF, 0x0101, 80, 0, 75.0f, 1.0f, { 2900.0f, 1300.0f, 530.0f }, { 2800.0f, 1190.0f, 540.0f } }, - { 0x0F, 0xFF, 0x0000, 10, 0, 75.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, - { 0x02, 0xFF, 0x0101, 55, 0, 75.0f, 1.0f, { 2900.0f, 1300.0f, 530.0f }, { 1500.0f, 1415.0f, 650.0f } }, - { 0x0F, 0xFF, 0x0000, 100, -45, 75.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true), + 0xFF, + 0x4242, + 20, + 0, + 50.0f, + 1.0f, + { 0.0f, 50.0f, -10.0f }, + { 0.0f, 0.0f, 100.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_10, false, false), + 0xFF, + 0x0101, + 80, + 0, + 75.0f, + 1.0f, + { 2900.0f, 1300.0f, 530.0f }, + { 2800.0f, 1190.0f, 540.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0000, + 10, + 0, + 75.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, false), + 0xFF, + 0x0101, + 55, + 0, + 75.0f, + 1.0f, + { 2900.0f, 1300.0f, 530.0f }, + { 1500.0f, 1415.0f, 650.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0000, + 100, + -45, + 75.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; static OnePointCsFull D_80123894[3] = { - { 0x0F, 0xFF, 0x0101, 60, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, - { 0x0F, 0xFF, 0x4242, 30, 0, 50.0f, 1.0f, { 0.0f, 28.0f, 0.0f }, { 0.0f, 20.0f, 40.0f } }, - { 0x0D, 0xFF, 0x0000, 120, 0, 180.0f, 0.4f, { 0.0f, -5.0f, 0.0f }, { 0.0f, 2.0f, 40.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 60, + 0, + 60.0f, + 1.0f, + { 0.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x4242, + 30, + 0, + 50.0f, + 1.0f, + { 0.0f, 28.0f, 0.0f }, + { 0.0f, 20.0f, 40.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_13, false, false), + 0xFF, + 0x0000, + 120, + 0, + 180.0f, + 0.4f, + { 0.0f, -5.0f, 0.0f }, + { 0.0f, 2.0f, 40.0f }, + }, }; static OnePointCsFull D_8012390C[2] = { - { 0x0F, 0xFF, 0x0101, 30, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, - { 0x0F, 0xFF, 0x4242, 180, 0, 60.0f, 1.0f, { 0.0f, 78.0f, 0.0f }, { 0.0f, 78.0f, 200.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 30, + 0, + 60.0f, + 1.0f, + { 0.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x4242, + 180, + 0, + 60.0f, + 1.0f, + { 0.0f, 78.0f, 0.0f }, + { 0.0f, 78.0f, 200.0f }, + }, }; static OnePointCsFull D_8012395C[3] = { - { 0x0F, 0xFF, 0x0101, 60, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, - { 0x0F, 0xFF, 0x4242, 30, 0, 50.0f, 1.0f, { 0.0f, 28.0f, 0.0f }, { 0.0f, 20.0f, -45.0f } }, - { 0x0D, 0xFF, 0x0000, 120, 0, 180.0f, 0.4f, { 0.0f, -5.0f, 0.0f }, { 0.0f, 2.0f, 45.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x0101, + 60, + 0, + 60.0f, + 1.0f, + { 0.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x4242, + 30, + 0, + 50.0f, + 1.0f, + { 0.0f, 28.0f, 0.0f }, + { 0.0f, 20.0f, -45.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_13, false, false), + 0xFF, + 0x0000, + 120, + 0, + 180.0f, + 0.4f, + { 0.0f, -5.0f, 0.0f }, + { 0.0f, 2.0f, 45.0f }, + }, }; static OnePointCsFull D_801239D4[3] = { - { 0x0F, 0xFF, 0x4242, 5, 0, 60.0f, 1.0f, { 0.0f, 20.0f, 0.0f }, { 0.0f, 40.0f, -120.0f } }, - { 0x09, 0xFF, 0x4242, 0, 0, 60.0f, 1.0f, { 0.0f, 20.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, - { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false), + 0xFF, + 0x4242, + 5, + 0, + 60.0f, + 1.0f, + { 0.0f, 20.0f, 0.0f }, + { 0.0f, 40.0f, -120.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_9, false, false), + 0xFF, + 0x4242, + 0, + 0, + 60.0f, + 1.0f, + { 0.0f, 20.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, + }, + { + ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false), + 0xFF, + 0x0000, + 1, + 0, + 60.0f, + 1.0f, + { -1.0f, -1.0f, -1.0f }, + { -1.0f, -1.0f, -1.0f }, + }, }; diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c index 5b4156cd00..7fa41700e3 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -1298,10 +1298,9 @@ void Interface_LoadItemIcon1(PlayState* play, u16 button) { InterfaceContext* interfaceCtx = &play->interfaceCtx; osCreateMesgQueue(&interfaceCtx->loadQueue, &interfaceCtx->loadMsg, 1); - DmaMgr_RequestAsync(&interfaceCtx->dmaRequest_160, interfaceCtx->iconItemSegment + button * ICON_ITEM_TEX_SIZE, - (uintptr_t)_icon_item_staticSegmentRomStart + - (gSaveContext.equips.buttonItems[button] * ICON_ITEM_TEX_SIZE), - ICON_ITEM_TEX_SIZE, 0, &interfaceCtx->loadQueue, NULL, "../z_parameter.c", 1171); + DmaMgr_RequestAsync(&interfaceCtx->dmaRequest_160, interfaceCtx->iconItemSegment + (button * ITEM_ICON_SIZE), + GET_ITEM_ICON_VROM(gSaveContext.equips.buttonItems[button]), ITEM_ICON_SIZE, 0, + &interfaceCtx->loadQueue, NULL, "../z_parameter.c", 1171); osRecvMesg(&interfaceCtx->loadQueue, NULL, OS_MESG_BLOCK); } @@ -1309,10 +1308,9 @@ void Interface_LoadItemIcon2(PlayState* play, u16 button) { InterfaceContext* interfaceCtx = &play->interfaceCtx; osCreateMesgQueue(&interfaceCtx->loadQueue, &interfaceCtx->loadMsg, 1); - DmaMgr_RequestAsync(&interfaceCtx->dmaRequest_180, interfaceCtx->iconItemSegment + button * ICON_ITEM_TEX_SIZE, - (uintptr_t)_icon_item_staticSegmentRomStart + - (gSaveContext.equips.buttonItems[button] * ICON_ITEM_TEX_SIZE), - ICON_ITEM_TEX_SIZE, 0, &interfaceCtx->loadQueue, NULL, "../z_parameter.c", 1193); + DmaMgr_RequestAsync(&interfaceCtx->dmaRequest_180, interfaceCtx->iconItemSegment + (button * ITEM_ICON_SIZE), + GET_ITEM_ICON_VROM(gSaveContext.equips.buttonItems[button]), ITEM_ICON_SIZE, 0, + &interfaceCtx->loadQueue, NULL, "../z_parameter.c", 1193); osRecvMesg(&interfaceCtx->loadQueue, NULL, OS_MESG_BLOCK); } @@ -3377,8 +3375,8 @@ void Interface_Draw(PlayState* play) { gSPVertex(OVERLAY_DISP++, &pauseCtx->cursorVtx[PAUSE_QUAD_CURSOR_4 * 4], 4, 0); gDPLoadTextureBlock(OVERLAY_DISP++, gItemIcons[pauseCtx->equipTargetItem], G_IM_FMT_RGBA, G_IM_SIZ_32b, - 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, - G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); + ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 0, G_TX_NOMIRROR | G_TX_WRAP, + G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); } else { // Magic Arrow Equip Effect svar1 = pauseCtx->equipTargetItem - 0xBF; @@ -3803,7 +3801,7 @@ void Interface_Draw(PlayState* play) { gSaveContext.subTimerState = SUBTIMER_STATE_RESPAWN; gSaveContext.cutsceneIndex = 0; Message_StartTextbox(play, 0x71B0, NULL); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); } else { sSubTimerStateTimer = 40; gSaveContext.subTimerState = SUBTIMER_STATE_STOP; diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c index 3a8470a3da..3a74e47cc4 100644 --- a/src/code/z_player_lib.c +++ b/src/code/z_player_lib.c @@ -488,7 +488,7 @@ void Player_SetBootData(PlayState* play, Player* this) { } s32 Player_InBlockingCsMode(PlayState* play, Player* this) { - return (this->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (this->csMode != 0) || + return (this->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (this->csMode != PLAYER_CSMODE_NONE) || (play->transitionTrigger == TRANS_TRIGGER_START) || (this->stateFlags1 & PLAYER_STATE1_0) || (this->stateFlags3 & PLAYER_STATE3_7) || ((gSaveContext.magicState != MAGIC_STATE_IDLE) && (Player_ActionToMagicSpell(this, this->itemAction) >= 0)); @@ -577,7 +577,7 @@ void func_8008EC70(Player* this) { } void Player_SetEquipmentData(PlayState* play, Player* this) { - if (this->csMode != 0x56) { + if (this->csMode != PLAYER_CSMODE_86) { this->currentShield = SHIELD_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD)); this->currentTunic = TUNIC_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_TUNIC)); this->currentBoots = BOOTS_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_BOOTS)); diff --git a/src/code/z_scene.c b/src/code/z_scene.c index fff3094db8..b487be9f75 100644 --- a/src/code/z_scene.c +++ b/src/code/z_scene.c @@ -269,7 +269,7 @@ void Scene_CommandObjectList(PlayState* play, SceneCmd* cmd) { status2++; } play->objectCtx.num = i; - func_80031A28(play, &play->actorCtx); + Actor_KillAllWithMissingObject(play, &play->actorCtx); continue; } diff --git a/src/libultra/os/createthread.c b/src/libultra/os/createthread.c index c8fd4c6b6b..8d54fb9871 100644 --- a/src/libultra/os/createthread.c +++ b/src/libultra/os/createthread.c @@ -1,12 +1,6 @@ #include "global.h" #include "ultra64/asm.h" -__OSThreadTail __osThreadTail = { NULL, OS_PRIORITY_THREADTAIL }; -OSThread* __osRunQueue = (OSThread*)&__osThreadTail; -OSThread* __osActiveQueue = (OSThread*)&__osThreadTail; -OSThread* __osRunningThread = NULL; -OSThread* __osFaultedThread = NULL; - void osCreateThread(OSThread* thread, OSId id, void (*entry)(void*), void* arg, void* sp, OSPri pri) { register u32 prevInt; OSIntMask mask; diff --git a/src/libultra/os/getmemsize.c b/src/libultra/os/getmemsize.c index 78eac6ebcf..787346de63 100644 --- a/src/libultra/os/getmemsize.c +++ b/src/libultra/os/getmemsize.c @@ -3,13 +3,13 @@ #define STEP 0x100000 u32 osGetMemSize(void) { - u32* ptr; + vu32* ptr; u32 size = 0x400000; u32 data0; u32 data1; while (size < 0x800000) { - ptr = (u32*)(0xA0000000 + size); + ptr = (vu32*)(K1BASE + size); data0 = *ptr; data1 = ptr[STEP / 4 - 1]; diff --git a/src/libultra/os/dequeuethread.c b/src/libultra/os/thread.c similarity index 56% rename from src/libultra/os/dequeuethread.c rename to src/libultra/os/thread.c index 14e9d346d8..c78a34e4ec 100644 --- a/src/libultra/os/dequeuethread.c +++ b/src/libultra/os/thread.c @@ -1,5 +1,11 @@ #include "global.h" +__OSThreadTail __osThreadTail = { NULL, OS_PRIORITY_THREADTAIL }; +OSThread* __osRunQueue = (OSThread*)&__osThreadTail; +OSThread* __osActiveQueue = (OSThread*)&__osThreadTail; +OSThread* __osRunningThread = NULL; +OSThread* __osFaultedThread = NULL; + void __osDequeueThread(OSThread** queue, OSThread* thread) { register OSThread** a2 = queue; register OSThread* a3 = *a2; diff --git a/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c b/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c index 6bec48f641..a22b8f477b 100644 --- a/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c +++ b/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c @@ -254,7 +254,7 @@ void BgBreakwall_Wait(BgBreakwall* this, PlayState* play) { gSaveContext.cutsceneTrigger = 1; Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); - func_8002DF54(play, NULL, 0x31); + func_8002DF54(play, NULL, PLAYER_CSMODE_49); } if (this->dyna.actor.params < 0) { diff --git a/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c b/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c index 6b8021595d..fe08ed53ba 100644 --- a/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c +++ b/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c @@ -191,7 +191,7 @@ void BgDyYoseizo_CheckMagicAcquired(BgDyYoseizo* this, PlayState* play) { return; } } - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); this->actionFunc = BgDyYoseizo_ChooseType; } } @@ -199,7 +199,7 @@ void BgDyYoseizo_CheckMagicAcquired(BgDyYoseizo* this, PlayState* play) { void BgDyYoseizo_ChooseType(BgDyYoseizo* this, PlayState* play) { s32 givingReward; - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); // "Mode" osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ もうど ☆☆☆☆☆ %d\n" VT_RST, play->msgCtx.ocarinaMode); givingReward = false; @@ -315,12 +315,12 @@ void BgDyYoseizo_SetupSpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) { } Audio_PlayActorSfx2(&this->actor, NA_SE_VO_FR_LAUGH_0); - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); this->actionFunc = BgDyYoseizo_SpinGrow_NoReward; } void BgDyYoseizo_SpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) { - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); Math_ApproachF(&this->actor.world.pos.y, this->grownHeight, this->heightFraction, 100.0f); Math_ApproachF(&this->scale, 0.035f, this->scaleFraction, 0.005f); Math_ApproachF(&this->heightFraction, 0.8f, 0.1f, 0.02f); @@ -346,7 +346,7 @@ void BgDyYoseizo_SpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) { void BgDyYoseizo_CompleteSpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) { f32 curFrame = this->skelAnime.curFrame; - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); if ((this->frameCount * 1273.0f) <= this->bobTimer) { this->bobTimer = 0.0f; @@ -360,7 +360,7 @@ void BgDyYoseizo_CompleteSpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) { } void BgDyYoseizo_SetupGreetPlayer_NoReward(BgDyYoseizo* this, PlayState* play) { - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); if (play->sceneId == SCENE_GREAT_FAIRYS_FOUNTAIN_MAGIC) { this->frameCount = Animation_GetLastFrame(&gGreatFairySittingAnim); @@ -380,7 +380,7 @@ void BgDyYoseizo_SetupGreetPlayer_NoReward(BgDyYoseizo* this, PlayState* play) { } void BgDyYoseizo_GreetPlayer_NoReward(BgDyYoseizo* this, PlayState* play) { - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); this->bobTimer = this->skelAnime.curFrame * 1273.0f; if ((this->frameCount * 1273.0f) <= this->bobTimer) { @@ -547,7 +547,7 @@ void BgDyYoseizo_Vanish(BgDyYoseizo* this, PlayState* play) { Actor* findOcarinaSpot; if (this->vanishTimer == 0) { - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); play->envCtx.lightSettingOverride = 0; findOcarinaSpot = play->actorCtx.actorLists[ACTORCAT_PROP].head; @@ -569,7 +569,7 @@ void BgDyYoseizo_SetupSpinGrow_Reward(BgDyYoseizo* this, PlayState* play) { if (play->csCtx.state != CS_STATE_IDLE) { if ((play->csCtx.npcActions[0] != NULL) && (play->csCtx.npcActions[0]->action == 2)) { this->actor.draw = BgDyYoseizo_Draw; - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); this->finishedSpinGrow = false; if (play->sceneId == SCENE_GREAT_FAIRYS_FOUNTAIN_MAGIC) { diff --git a/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c b/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c index 7a71233dcc..6daea830f3 100644 --- a/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c +++ b/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c @@ -239,7 +239,7 @@ void BgGndIceblock_Idle(BgGndIceblock* this, PlayState* play) { if (this->dyna.unk_150 > 0.0f) { BgGndIceblock_SetNextPosition(this); if (Actor_WorldDistXZToPoint(&this->dyna.actor, &this->targetPos) > 1.0f) { - func_8002DF54(play, &this->dyna.actor, 8); + func_8002DF54(play, &this->dyna.actor, PLAYER_CSMODE_8); this->actionFunc = BgGndIceblock_Slide; } } @@ -280,7 +280,7 @@ void BgGndIceblock_Fall(BgGndIceblock* this, PlayState* play) { thisx->world.pos.y = thisx->home.pos.y - 100.0f; thisx->world.pos.z = thisx->home.pos.z; if (Player_InCsMode(play)) { - func_8002DF54(play, thisx, 7); + func_8002DF54(play, thisx, PLAYER_CSMODE_7); } this->actionFunc = BgGndIceblock_Reset; } @@ -293,7 +293,7 @@ void BgGndIceblock_Hole(BgGndIceblock* this, PlayState* play) { if (Math_StepToF(&thisx->world.pos.y, thisx->home.pos.y - 100.0f, thisx->velocity.y)) { thisx->velocity.y = 0.0f; if (Player_InCsMode(play)) { - func_8002DF54(play, thisx, 7); + func_8002DF54(play, thisx, PLAYER_CSMODE_7); } this->actionFunc = BgGndIceblock_Idle; } @@ -317,7 +317,7 @@ void BgGndIceblock_Slide(BgGndIceblock* this, PlayState* play) { switch (BgGndIceblock_NextAction(this)) { case GNDICE_IDLE: this->actionFunc = BgGndIceblock_Idle; - func_8002DF54(play, thisx, 7); + func_8002DF54(play, thisx, PLAYER_CSMODE_7); break; case GNDICE_FALL: this->actionFunc = BgGndIceblock_Fall; diff --git a/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c b/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c index 19e98e15fd..de12b2676b 100644 --- a/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c +++ b/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c @@ -367,7 +367,7 @@ void BgHeavyBlock_LiftedUp(BgHeavyBlock* this, PlayState* play) { this->timer++; - func_8002DF54(play, &player->actor, 8); + func_8002DF54(play, &player->actor, PLAYER_CSMODE_8); // if parent is NULL, link threw it if (Actor_HasNoParent(&this->dyna.actor, play)) { diff --git a/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c b/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c index b6842d4d44..56dc0aaa7f 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c @@ -138,7 +138,7 @@ void BgHidanDalm_Wait(BgHidanDalm* this, PlayState* play) { this->dyna.actor.world.pos.x += 32.5f * Math_SinS(this->dyna.actor.world.rot.y); this->dyna.actor.world.pos.z += 32.5f * Math_CosS(this->dyna.actor.world.rot.y); - func_8002DF54(play, &this->dyna.actor, 8); + func_8002DF54(play, &this->dyna.actor, PLAYER_CSMODE_8); this->dyna.actor.flags |= ACTOR_FLAG_4; this->actionFunc = BgHidanDalm_Shrink; this->dyna.actor.bgCheckFlags &= ~BGCHECKFLAG_GROUND_TOUCH; @@ -159,7 +159,7 @@ void BgHidanDalm_Shrink(BgHidanDalm* this, PlayState* play) { Vec3f pos; if (Math_StepToF(&this->dyna.actor.scale.x, 0.0f, 0.004f)) { - func_8002DF54(play, &this->dyna.actor, 7); + func_8002DF54(play, &this->dyna.actor, PLAYER_CSMODE_7); Actor_Kill(&this->dyna.actor); } diff --git a/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c b/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c index f63b253abf..f2e0c15166 100644 --- a/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c +++ b/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c @@ -125,7 +125,7 @@ void BgIceObjects_CheckPits(BgIceObjects* this, PlayState* play) { thisx->world.pos.y = thisx->home.pos.y - 60.0f; thisx->world.pos.z = thisx->home.pos.z; if (thisx->params != 0) { - func_8002DF54(play, thisx, 7); + func_8002DF54(play, thisx, PLAYER_CSMODE_7); } this->actionFunc = BgIceObjects_Reset; } @@ -142,7 +142,7 @@ void BgIceObjects_Idle(BgIceObjects* this, PlayState* play) { BgIceObjects_SetNextTarget(this, play); if (Actor_WorldDistXZToPoint(thisx, &this->targetPos) > 1.0f) { thisx->flags |= ACTOR_FLAG_4; - func_8002DF54(play, thisx, 8); + func_8002DF54(play, thisx, PLAYER_CSMODE_8); thisx->params = 1; this->actionFunc = BgIceObjects_Slide; } @@ -172,7 +172,7 @@ void BgIceObjects_Slide(BgIceObjects* this, PlayState* play) { thisx->flags &= ~ACTOR_FLAG_4; } thisx->params = 0; - func_8002DF54(play, thisx, 7); + func_8002DF54(play, thisx, PLAYER_CSMODE_7); Audio_PlayActorSfx2(thisx, NA_SE_EV_BLOCK_BOUND); if ((fabsf(thisx->world.pos.x + 1387.0f) < 1.0f) && (fabsf(thisx->world.pos.z + 260.0f) < 1.0f)) { this->actionFunc = BgIceObjects_Stuck; diff --git a/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c b/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c index 54f9a870c3..66cfebf00f 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c +++ b/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c @@ -164,7 +164,7 @@ void BgMoriBigst_Fall(BgMoriBigst* this, PlayState* play) { BgMoriBigst_SetupLanding(this, play); Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_STONE_BOUND); OnePointCutscene_Init(play, 1020, 8, &this->dyna.actor, CAM_ID_MAIN); - func_8002DF38(play, NULL, 0x3C); + func_8002DF38(play, NULL, PLAYER_CSMODE_60); } } diff --git a/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c b/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c index 377d7ebf10..ca504c1b57 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c +++ b/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c @@ -95,7 +95,7 @@ void BgMoriKaitenkabe_Wait(BgMoriKaitenkabe* this, PlayState* play) { this->timer++; if ((this->timer > 28) && !Player_InCsMode(play)) { BgMoriKaitenkabe_SetupRotate(this); - func_8002DF54(play, &this->dyna.actor, 8); + func_8002DF54(play, &this->dyna.actor, PLAYER_CSMODE_8); Math_Vec3f_Copy(&this->lockedPlayerPos, &player->actor.world.pos); push.x = Math_SinS(this->dyna.unk_158); push.y = 0.0f; @@ -129,7 +129,7 @@ void BgMoriKaitenkabe_Rotate(BgMoriKaitenkabe* this, PlayState* play) { Math_StepToF(&this->rotSpeed, 0.6f, 0.02f); if (Math_StepToF(&this->rotYdeg, this->rotDirection * 45.0f, this->rotSpeed)) { BgMoriKaitenkabe_SetupWait(this); - func_8002DF54(play, thisx, 7); + func_8002DF54(play, thisx, PLAYER_CSMODE_7); if (this->rotDirection > 0.0f) { thisx->home.rot.y += 0x2000; } else { diff --git a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c index 5f5b1ee922..c1a5825db4 100644 --- a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c +++ b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c @@ -320,7 +320,7 @@ void BgPoEvent_BlockFall(BgPoEvent* this, PlayState* play) { if (firstFall == 0) { firstFall = 1; } else { - func_8002DF54(play, &GET_PLAYER(play)->actor, 7); + func_8002DF54(play, &GET_PLAYER(play)->actor, PLAYER_CSMODE_7); } } this->direction = 0; @@ -356,7 +356,7 @@ void BgPoEvent_BlockIdle(BgPoEvent* this, PlayState* play) { if (sPuzzleState == 0x10) { sPuzzleState = 0x40; Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BLOCK_RISING); - func_8002DF54(play, &player->actor, 8); + func_8002DF54(play, &player->actor, PLAYER_CSMODE_8); } } else if (this->dyna.unk_150 != 0.0f) { if (this->direction == 0) { @@ -449,7 +449,7 @@ void BgPoEvent_AmyWait(BgPoEvent* this, PlayState* play) { if (this->collider.base.acFlags & AC_HIT) { sPuzzleState |= 0x20; this->timer = 5; - Actor_SetColorFilter(&this->dyna.actor, 0x4000, 0xFF, 0, 5); + Actor_SetColorFilter(&this->dyna.actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 5); Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EN_PO_LAUGH2); this->actionFunc = BgPoEvent_AmyPuzzle; } 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 448bb09362..aa4992f5f1 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 @@ -218,7 +218,7 @@ void BgSpot00Hanebasi_Update(Actor* thisx, PlayState* play) { SET_EVENTCHKINF(EVENTCHKINF_80); Flags_SetEventChkInf(EVENTCHKINF_82); this->actionFunc = BgSpot00Hanebasi_DoNothing; - func_8002DF54(play, &player->actor, 8); + func_8002DF54(play, &player->actor, PLAYER_CSMODE_8); play->nextEntranceIndex = ENTR_HYRULE_FIELD_0; gSaveContext.nextCutsceneIndex = 0xFFF1; play->transitionTrigger = TRANS_TRIGGER_START; diff --git a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c index ebd4255d90..788c7479ee 100644 --- a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c +++ b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c @@ -114,7 +114,7 @@ void func_808BAF40(BgTokiSwd* this, PlayState* play) { BgTokiSwd_SetupAction(this, func_808BB0AC); } else { if (Actor_IsFacingPlayer(&this->actor, 0x2000)) { - func_8002F580(&this->actor, play); + Actor_OfferCarry(&this->actor, play); } } } diff --git a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c index c76a6211d8..26f1a3b698 100644 --- a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c +++ b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c @@ -269,7 +269,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, PlayState* play) { break; case 1: func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); Play_ClearAllSubCameras(play); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); @@ -297,11 +297,11 @@ void BossDodongo_IntroCutscene(BossDodongo* this, PlayState* play) { } if (this->unk_198 == 110) { - func_8002DF54(play, &this->actor, 9); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_9); } if (this->unk_198 == 5) { - func_8002DF54(play, &this->actor, 12); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_12); } if (this->unk_198 < 6) { @@ -417,7 +417,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, PlayState* play) { func_800C08AC(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); BossDodongo_SetupWalk(this); this->unk_1DA = 50; this->unk_1BC = 0; @@ -950,7 +950,7 @@ void BossDodongo_Update(Actor* thisx, PlayState* play2) { magmaScale = ((s16)(Rand_ZeroOne() * 50)) - 50; } - if (player2->csMode >= 10) { + if (player2->csMode >= PLAYER_CSMODE_10) { phi_s0_3 = -1; } @@ -1305,7 +1305,7 @@ void BossDodongo_DeathCutscene(BossDodongo* this, PlayState* play) { case 0: this->csState = 5; func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_UNK3); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -1615,7 +1615,7 @@ void BossDodongo_DeathCutscene(BossDodongo* this, PlayState* play) { this->csState = 100; Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_ACTIVE); func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, -890.0f, -1523.76f, -3304.0f, 0, 0, 0, WARP_DUNGEON_CHILD); this->skelAnime.playSpeed = 0.0f; diff --git a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c index a2f81cfceb..3426570b92 100644 --- a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c +++ b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c @@ -312,7 +312,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) { this->introState = BFD_CS_START; func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -389,7 +389,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) { Math_ApproachF(&this->subCamShake, 2.0f, 1.0f, 0.8 * 0.01f); } if (this->timers[0] == 40) { - func_8002DF54(play, &this->actor, 0x13); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_19); } if (this->timers[0] == 0) { this->introState = BFD_CS_LOOK_GROUND; @@ -418,7 +418,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) { this->timers[0] = 170; this->subCamVelFactor = 0.0f; this->subCamAccel = 0.0f; - func_8002DF54(play, &this->actor, 0x14); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_20); } break; case BFD_CS_COLLAPSE: @@ -468,7 +468,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) { if (this->timers[3] == 190) { this->subCamAtMaxVelFrac.x = this->subCamAtMaxVelFrac.y = this->subCamAtMaxVelFrac.z = 0.05f; this->platformSignal = VBSIMA_KILL; - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); } if (this->actor.world.pos.y > 120.0f) { this->subCamAtNext = this->actor.world.pos; @@ -538,7 +538,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) { // BFD_CS_NONE / BOSSFD_FLY_MAIN / SUB_CAM_ID_DONE this->introState = this->introFlyState = this->subCamId = 0; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); this->actionFunc = BossFd_Wait; this->handoffSignal = FD2_SIGNAL_GROUND; SET_EVENTCHKINF(EVENTCHKINF_73); @@ -847,7 +847,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) { Audio_PlaySfxGeneral(NA_SE_EN_VALVAISA_LAND2, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); - func_8002DF54(play, &this->actor, 5); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_5); for (i1 = 0; i1 < 15; i1++) { Vec3f sp144 = { 0.0f, 0.0f, 0.0f }; Vec3f sp138 = { 0.0f, 0.0f, 0.0f }; diff --git a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c index 793f120449..44b80d9b35 100644 --- a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c +++ b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c @@ -653,7 +653,7 @@ void BossFd2_Death(BossFd2* this, PlayState* play) { case DEATH_START: this->deathState = DEATH_RETREAT; func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -747,7 +747,7 @@ void BossFd2_Death(BossFd2* this, PlayState* play) { this->work[FD2_ACTION_STATE]++; this->subCamVelFactor = 0.0f; this->subCamAccel = 0.02f; - func_8002DF54(play, &bossFd->actor, 1); + func_8002DF54(play, &bossFd->actor, PLAYER_CSMODE_1); } } if ((bossFd->work[BFD_ACTION_STATE] == BOSSFD_BONES_FALL) && (bossFd->timers[0] == 5)) { @@ -781,7 +781,7 @@ void BossFd2_Death(BossFd2* this, PlayState* play) { func_800C08AC(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, 0.0f, 100.0f, 0.0f, 0, 0, 0, WARP_DUNGEON_ADULT); Flags_SetClear(play, play->roomCtx.curRoom.num); diff --git a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c index 1899ab8cda..2b9dae7c28 100644 --- a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c +++ b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c @@ -558,7 +558,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { this->actor.shape.rot.y = 0; func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); this->csCamIndex = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->csCamIndex, CAM_STAT_ACTIVE); @@ -600,7 +600,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { BossGanon_SetIntroCsCamera(this, 1); if (this->csTimer == 10) { - func_8002DF54(play, &this->actor, 5); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_5); } if (this->csTimer == 13) { @@ -633,7 +633,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { break; } - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); this->csState = 4; BossGanon_SetIntroCsCamera(this, 2); this->csTimer = 0; @@ -665,7 +665,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { } if (this->csTimer == 10) { - func_8002DF54(play, &this->actor, 0x4B); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_75); } if (this->csTimer == 70) { @@ -731,7 +731,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { this->csState = 9; this->csTimer = 0; - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); sZelda->unk_3C8 = 0; this->triforceType = GDF_TRIFORCE_ZELDA; this->fwork[GDF_TRIFORCE_SCALE] = 10.0f; @@ -785,7 +785,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { player->actor.world.pos.z = 20.0f; if (this->csTimer == 20) { - func_8002DF54(play, &this->actor, 0x17); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_23); Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_HEARTS); } @@ -1005,7 +1005,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { } if (this->csTimer == 30) { - func_8002DF54(play, &this->actor, 0x4A); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_74); } if (this->csTimer <= 50) { @@ -1128,7 +1128,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { func_800C08AC(play, this->csCamIndex, 0); this->csState = this->csCamIndex = 0; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); BossGanon_SetupWait(this, play); } @@ -1234,7 +1234,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) { switch (this->csState) { case 0: func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); this->csCamIndex = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->csCamIndex, CAM_STAT_ACTIVE); @@ -1469,7 +1469,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) { Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GANON_BODY_SPARK - SFX_FLAG); if (this->csTimer == 2) { - func_8002DF54(play, &this->actor, 0x39); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_57); } if (this->csTimer > 50) { @@ -1505,7 +1505,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) { case 100: func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); this->csCamIndex = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->csCamIndex, CAM_STAT_ACTIVE); @@ -1594,11 +1594,11 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) { this->csCamAt.z = -135.0f; if (this->csTimer == 5) { - func_8002DF54(play, &this->actor, 0x4C); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_76); } if (this->csTimer == 70) { - func_8002DF54(play, &this->actor, 0x4D); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_77); } if (this->csTimer == 90) { @@ -1683,7 +1683,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) { if (this->csTimer == 20) { sZelda->unk_3C8 = 5; - func_8002DF54(play, &this->actor, 0x39); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_57); } if (this->csTimer == 40) { @@ -1750,7 +1750,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) { this->csState = 107; this->csTimer = 0; Message_StartTextbox(play, 0x70D2, NULL); - func_8002DF54(play, &this->actor, 0x39); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_57); } break; @@ -1792,7 +1792,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) { this->csState = 109; this->csCamIndex = 0; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); Flags_SetSwitch(play, 0x37); } break; 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 14c85004ec..04841a4785 100644 --- a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c +++ b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c @@ -196,7 +196,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { objectIdx = Object_GetIndex(&play->objectCtx, OBJECT_GANON_ANIME3); if (Object_IsLoaded(&play->objectCtx, objectIdx)) { func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -267,11 +267,11 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { } if (this->unk_398 == 40) { sZelda->unk_3C8 = 1; - func_8002DF54(play, &this->actor, 0x4E); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_78); } if (this->unk_398 == 85) { sZelda->unk_3C8 = 2; - func_8002DF54(play, &this->actor, 0x4F); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_79); } this->subCamEye.x = 930.0f; this->subCamEye.y = 1129.0f; @@ -300,14 +300,14 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { } if (this->unk_398 == 20) { sZelda->unk_3C8 = 3; - func_8002DF54(play, &this->actor, 0x50); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_80); } if (this->unk_398 == 55) { this->unk_39C = 4; this->unk_398 = 0; this->unk_410.x = 0.0f; sZelda->unk_3C8 = 4; - func_8002DF54(play, &this->actor, 0x50); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_80); } break; case 4: @@ -324,7 +324,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { func_800C08AC(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); this->unk_39C = 5; this->unk_398 = 0; } @@ -371,7 +371,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { } if (this->unk_398 == 30) { sZelda->unk_3C8 = 5; - func_8002DF54(play, &this->actor, 0x51); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_81); } if (this->unk_398 == 50) { this->unk_398 = 0; @@ -402,7 +402,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { func_80078884(NA_SE_EV_STONE_BOUND); } if (this->unk_398 == 30) { - func_8002DF54(play, &this->actor, 0x52); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_82); } if (this->unk_398 == 50) { this->unk_398 = 0; @@ -469,7 +469,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { this->subCamAt.y = player->actor.world.pos.y; this->subCamAt.z = player->actor.world.pos.z - 200.0f; if (this->unk_398 == 20) { - func_8002DF54(play, &this->actor, 0x1E); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_30); } if (this->unk_398 == 60) { this->subCamEye.x = (this->actor.world.pos.x + 200.0f) - 154.0f; @@ -558,7 +558,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { SkelAnime_Free(&this->skelAnime, play); SkelAnime_InitFlex(play, &this->skelAnime, &gGanonSkel, NULL, NULL, NULL, 0); BossGanon2_SetObjectSegment(this, play, OBJECT_GANON_ANIME3, false); - func_8002DF54(play, &this->actor, 0x54); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_84); this->unk_314 = 3; } // fake, tricks the compiler into using stack the way we need it to @@ -614,7 +614,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { this->actor.world.pos.x += 250; this->actor.world.pos.y = 1886.0f; this->unk_394 = 0.0f; - func_8002DF54(play, &this->actor, 0x53); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_83); this->unk_30C = 5.0f; this->unk_228 = 1.0f; } @@ -699,7 +699,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { if (this->unk_398 == 215) { this->unk_39C = 23; this->unk_224 = 0.0f; - func_8002DF54(play, &this->actor, 0x55); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_85); } break; case 23: @@ -719,7 +719,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { this->subCamAt.z = player->actor.world.pos.z; if (this->unk_398 == 228) { func_80078884(NA_SE_IT_SHIELD_REFLECT_SW); - func_8002DF54(play, &this->actor, 0x56); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_86); Rumble_Override(0.0f, 255, 10, 50); } if (this->unk_398 >= 229) { @@ -756,7 +756,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { func_80078884(NA_SE_IT_SWORD_SWING); } if (this->unk_398 == 25) { - func_8002DF54(play, &this->actor, 0x57); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_87); this->unk_39C = 25; this->unk_398 = 0; } @@ -804,7 +804,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { case 27: this->subCamUp.z = 0.0f; if (this->unk_398 == 4) { - func_8002DF54(play, &this->actor, 0x58); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_88); } this->subCamEye.x = player->actor.world.pos.x - 20.0f; this->subCamEye.y = player->actor.world.pos.y + 50.0f; @@ -877,7 +877,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { func_800C08AC(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); this->unk_39C = 0; this->unk_337 = 1; func_808FFDB0(this, play); @@ -1299,7 +1299,7 @@ void func_80900890(BossGanon2* this, PlayState* play) { this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); this->unk_39C = 1; this->subCamEye = mainCam1->eye; this->subCamAt = mainCam1->at; @@ -1348,7 +1348,7 @@ void func_80900890(BossGanon2* this, PlayState* play) { func_800C08AC(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); this->unk_39C = 3; } break; @@ -1359,7 +1359,7 @@ void func_80900890(BossGanon2* this, PlayState* play) { Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); this->unk_39C = 11; this->unk_334 = 1; - func_8002DF54(play, &this->actor, 0x60); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_96); this->unk_398 = 0; FALLTHROUGH; case 11: @@ -1381,7 +1381,7 @@ void func_80900890(BossGanon2* this, PlayState* play) { func_800C08AC(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); } break; } @@ -1485,7 +1485,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) { this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); this->unk_39C = 1; this->unk_398 = 0; sZelda->unk_3C8 = 9; @@ -1522,7 +1522,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) { this->skelAnime.playSpeed = 3.0f; } if (this->unk_398 == 120) { - func_8002DF54(play, &this->actor, 0x63); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_99); } this->actor.world.rot.y = 0x4000; this->actor.world.pos.x = this->actor.world.pos.z = 0.0f; @@ -1590,7 +1590,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) { this->unk_39C = 5; this->unk_398 = 40; this->skelAnime.playSpeed = 1.0f; - func_8002DF54(play, &this->actor, 0x64); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_100); } break; case 5: @@ -1604,10 +1604,10 @@ void func_8090120C(BossGanon2* this, PlayState* play) { Math_ApproachZeroF(&this->unk_38C, 1.0f, 8.0f); } if (this->unk_398 == 70) { - func_8002DF54(play, &this->actor, 0x65); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_101); } if (this->unk_398 == 150) { - func_8002DF54(play, &this->actor, 0x66); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_102); } this->unk_30C = 10.0f; player->actor.world.pos.x = 250.0f; @@ -1626,7 +1626,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) { func_800C08AC(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); this->unk_39C = 6; } break; @@ -1645,7 +1645,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) { this->unk_398 = 0; Animation_MorphToPlayOnce(&this->skelAnime, &gGanonFinalBlowAnim, 0.0f); this->unk_194 = Animation_GetLastFrame(&gGanonFinalBlowAnim); - play->startPlayerCutscene(play, &this->actor, 0x61); + play->startPlayerCutscene(play, &this->actor, PLAYER_CSMODE_97); } else { break; } @@ -1712,7 +1712,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) { if (this->unk_398 == 55) { Animation_MorphToPlayOnce(&this->skelAnime, &gGanonDeadStartAnim, 0.0f); this->unk_194 = Animation_GetLastFrame(&gGanonDeadStartAnim); - func_8002DF54(play, &this->actor, 0x62); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_98); this->unk_39C = 8; this->unk_398 = 1000; } diff --git a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c index 1ab566705e..8d53423ecb 100644 --- a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c +++ b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c @@ -956,7 +956,7 @@ void BossGanondrof_Death(BossGanondrof* this, PlayState* play) { switch (this->deathState) { case DEATH_START: func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); osSyncPrintf("7\n"); @@ -1118,7 +1118,7 @@ void BossGanondrof_Death(BossGanondrof* this, PlayState* play) { func_800C08AC(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, GND_BOSSROOM_CENTER_X, GND_BOSSROOM_CENTER_Y, GND_BOSSROOM_CENTER_Z + 200.0f, 0, 0, 0, 0); this->actor.child = &horse->actor; diff --git a/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c b/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c index 3bb39d3b84..50bcd153ed 100644 --- a/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c +++ b/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c @@ -629,7 +629,7 @@ void BossGoma_SetupEncounterState4(BossGoma* this, PlayState* play) { this->actionState = 4; this->actor.flags |= ACTOR_FLAG_0; func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_UNK3); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -686,7 +686,7 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) { Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_SHUTTER, 164.72f, -480.0f, 397.68002f, 0, -0x705C, 0, 0x180); } else { - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); this->actionState = 1; } } @@ -757,7 +757,7 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) { } if (this->frameCount == 190) { - func_8002DF54(play, &this->actor, 2); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_2); } if (this->frameCount >= 228) { @@ -768,7 +768,7 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) { func_800C08AC(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); this->actionState = 3; } break; @@ -964,7 +964,7 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) { this->disableGameplayLogic = false; this->patienceTimer = 200; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); } break; } @@ -1053,7 +1053,7 @@ void BossGoma_Defeated(BossGoma* this, PlayState* play) { case 0: this->actionState = 1; func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_UNK3); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -1181,7 +1181,7 @@ void BossGoma_Defeated(BossGoma* this, PlayState* play) { func_800C08AC(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); Actor_Kill(&this->actor); } diff --git a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c index 3ed0182655..e677e11c5f 100644 --- a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c +++ b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c @@ -835,7 +835,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) { if (&this->actor == player->actor.parent) { player->unk_850 = 0x65; player->actor.parent = NULL; - player->csMode = 0; + player->csMode = PLAYER_CSMODE_NONE; if (this->timers[0] == 0) { func_8002F6D4(play, &this->actor, 20.0f, this->actor.shape.rot.y + 0x8000, 10.0f, 0); } @@ -865,7 +865,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) { if (&this->actor == player->actor.parent) { player->unk_850 = 0x65; player->actor.parent = NULL; - player->csMode = 0; + player->csMode = PLAYER_CSMODE_NONE; } Math_ApproachF(&this->tentRippleSize, 0.15f, 0.5f, 0.01); if (this->meltIndex < 41) { @@ -1225,7 +1225,7 @@ void BossMo_IntroCs(BossMo* this, PlayState* play) { (fabsf(player->actor.world.pos.x - -180.0f) < 40.0f))) { // checks if Link is on one of the four platforms func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -1333,11 +1333,11 @@ void BossMo_IntroCs(BossMo* this, PlayState* play) { Math_ApproachF(&this->actor.speedXZ, sp80, 1.0f, sp78); Math_ApproachF(&this->subCamYawRate, sp7C, 1.0f, 128.0f); if (this->work[MO_TENT_MOVE_TIMER] == 525) { - func_8002DF54(play, &this->actor, 2); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_2); } if (this->work[MO_TENT_MOVE_TIMER] > 540) { this->csState = MO_INTRO_REVEAL; - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); sMorphaTent1->drawActor = true; player->actor.world.pos.x = 180.0f; player->actor.world.pos.z = -210.0f; @@ -1446,7 +1446,7 @@ void BossMo_IntroCs(BossMo* this, PlayState* play) { // MO_BATTLE / SUB_CAM_ID_DONE this->csState = this->subCamId = 0; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); } break; } @@ -1511,7 +1511,7 @@ void BossMo_DeathCs(BossMo* this, PlayState* play) { switch (this->csState) { case MO_DEATH_START: func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -1681,7 +1681,7 @@ void BossMo_DeathCs(BossMo* this, PlayState* play) { func_800C08AC(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); sMorphaTent1->actor.world.pos.y = -1000.0f; } } else { @@ -1786,7 +1786,7 @@ void BossMo_CoreCollisionCheck(BossMo* this, PlayState* play) { if (player->actor.parent != NULL) { player->unk_850 = 0x65; player->actor.parent = NULL; - player->csMode = 0; + player->csMode = PLAYER_CSMODE_NONE; } } else { this->actor.colChkInfo.health = 1; @@ -1805,7 +1805,7 @@ void BossMo_CoreCollisionCheck(BossMo* this, PlayState* play) { if (player->actor.parent == &sMorphaTent1->actor) { player->unk_850 = 0x65; player->actor.parent = NULL; - player->csMode = 0; + player->csMode = PLAYER_CSMODE_NONE; } } this->work[MO_TENT_ACTION_STATE] = MO_CORE_STUNNED; diff --git a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c index 04e3da94a9..907c5c4b14 100644 --- a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c +++ b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c @@ -371,7 +371,7 @@ void BossSst_HeadSetupIntro(BossSst* this, PlayState* play) { player->stateFlags1 |= PLAYER_STATE1_5; func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); sSubCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, sSubCamId, CAM_STAT_ACTIVE); @@ -404,7 +404,7 @@ void BossSst_HeadIntro(BossSst* this, PlayState* play) { sHands[LEFT]->actor.flags |= ACTOR_FLAG_0; player->stateFlags1 &= ~PLAYER_STATE1_5; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); sSubCamAt.y += 30.0f; sSubCamAt.z += 300.0f; Play_CameraSetAtEye(play, sSubCamId, &sSubCamAt, &sSubCamEye); @@ -814,7 +814,8 @@ void BossSst_HeadUnfreezeHand(BossSst* this, PlayState* play) { void BossSst_HeadSetupStunned(BossSst* this) { Animation_MorphToPlayOnce(&this->skelAnime, &gBongoHeadKnockoutAnim, -5.0f); - Actor_SetColorFilter(&this->actor, 0, 0xFF, 0, Animation_GetLastFrame(&gBongoHeadKnockoutAnim)); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, + Animation_GetLastFrame(&gBongoHeadKnockoutAnim)); this->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT); this->colliderCyl.base.acFlags &= ~AC_ON; this->vVanish = false; @@ -904,9 +905,12 @@ void BossSst_HeadVulnerable(BossSst* this, PlayState* play) { void BossSst_HeadSetupDamage(BossSst* this) { Animation_MorphToPlayOnce(&this->skelAnime, &gBongoHeadDamageAnim, -3.0f); - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, Animation_GetLastFrame(&gBongoHeadDamageAnim)); - Actor_SetColorFilter(&sHands[LEFT]->actor, 0x4000, 0xFF, 0, Animation_GetLastFrame(&gBongoHeadDamageAnim)); - Actor_SetColorFilter(&sHands[RIGHT]->actor, 0x4000, 0xFF, 0, Animation_GetLastFrame(&gBongoHeadDamageAnim)); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, + Animation_GetLastFrame(&gBongoHeadDamageAnim)); + Actor_SetColorFilter(&sHands[LEFT]->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, + Animation_GetLastFrame(&gBongoHeadDamageAnim)); + Actor_SetColorFilter(&sHands[RIGHT]->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, + Animation_GetLastFrame(&gBongoHeadDamageAnim)); this->colliderCyl.base.acFlags &= ~AC_ON; BossSst_HeadSfx(this, NA_SE_EN_SHADEST_DAMAGE); this->actionFunc = BossSst_HeadDamage; @@ -1007,9 +1011,9 @@ void BossSst_HeadSetupDeath(BossSst* this, PlayState* play) { Animation_MorphToLoop(&this->skelAnime, &gBongoHeadEyeOpenIdleAnim, -5.0f); BossSst_HeadSfx(this, NA_SE_EN_SHADEST_DEAD); - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 60); - Actor_SetColorFilter(&sHands[LEFT]->actor, 0x4000, 0xFF, 0, 60); - Actor_SetColorFilter(&sHands[RIGHT]->actor, 0x4000, 0xFF, 0, 60); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 60); + Actor_SetColorFilter(&sHands[LEFT]->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 60); + Actor_SetColorFilter(&sHands[RIGHT]->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 60); this->timer = 60; this->colliderCyl.base.acFlags &= ~AC_ON; this->colliderJntSph.base.ocFlags1 &= ~OC1_ON; @@ -1020,7 +1024,7 @@ void BossSst_HeadSetupDeath(BossSst* this, PlayState* play) { Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, sSubCamId, CAM_STAT_ACTIVE); Play_CopyCamera(play, sSubCamId, CAM_ID_MAIN); - func_8002DF54(play, &player->actor, 8); + func_8002DF54(play, &player->actor, PLAYER_CSMODE_8); func_80064520(play, &play->csCtx); Math_Vec3f_Copy(&sSubCamEye, &GET_ACTIVE_CAM(play)->eye); this->actionFunc = BossSst_HeadDeath; @@ -1183,7 +1187,7 @@ void BossSst_HeadFinish(BossSst* this, PlayState* play) { Play_ChangeCameraStatus(play, sSubCamId, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_ACTIVE); Play_ClearCamera(play, sSubCamId); - func_8002DF54(play, &GET_PLAYER(play)->actor, 7); + func_8002DF54(play, &GET_PLAYER(play)->actor, PLAYER_CSMODE_7); func_80064534(play, &play->csCtx); Actor_Kill(&this->actor); Actor_Kill(&sHands[LEFT]->actor); @@ -1962,7 +1966,7 @@ void BossSst_HandSetupReel(BossSst* this) { Animation_MorphToPlayOnce(&this->skelAnime, sHandFlatPoses[this->actor.params], 4.0f); this->timer = 36; Math_Vec3f_Copy(&this->center, &this->actor.world.pos); - Actor_SetColorFilter(&this->actor, 0, 0xFF, 0, 200); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 200); this->actionFunc = BossSst_HandReel; } @@ -2086,7 +2090,8 @@ void BossSst_HandSetupStunned(BossSst* hand) { hand->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT); hand->colliderJntSph.base.acFlags |= AC_ON; BossSst_HandSetInvulnerable(hand, true); - Actor_SetColorFilter(&hand->actor, 0, 0xFF, 0, Animation_GetLastFrame(&gBongoHeadKnockoutAnim)); + Actor_SetColorFilter(&hand->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, + Animation_GetLastFrame(&gBongoHeadKnockoutAnim)); hand->actionFunc = BossSst_HandStunned; } @@ -2286,7 +2291,7 @@ void BossSst_HandSetupFrozen(BossSst* this) { } BossSst_SpawnIceCrystal(this, 0); - Actor_SetColorFilter(&this->actor, 0, 0xFF, 0, 0xA); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 10); this->handAngSpeed = 0; this->actionFunc = BossSst_HandFrozen; } diff --git a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c index 5ca4737e3a..5a8b9d38d7 100644 --- a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c +++ b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c @@ -1499,7 +1499,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, PlayState* play) { case 0: this->csState2 = 1; func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 0x39); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_57); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -1639,7 +1639,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, PlayState* play) { Animation_MorphToPlayOnce(&this->skelAnime, &gTwinrovaIntroAnim, 0.0f); this->workf[ANIM_SW_TGT] = Animation_GetLastFrame(&gTwinrovaIntroAnim); this->timers[0] = 50; - func_8002DF54(play, &this->actor, 2); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_2); Audio_PlayActorSfx2(&this->actor, NA_SE_EN_TWINROBA_TRANSFORM); SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS); } @@ -1682,7 +1682,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, PlayState* play) { } if (this->timers[3] == 19) { - func_8002DF54(play, &this->actor, 5); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_5); } if (this->timers[3] == 16) { @@ -1715,7 +1715,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, PlayState* play) { this->subCamId = SUB_CAM_ID_DONE; this->csState2 = this->subCamId; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); this->work[TW_PLLR_IDX] = 0; this->targetPos = sTwinrovaPillarPos[0]; BossTw_TwinrovaSetupFly(this, play); @@ -1795,7 +1795,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, PlayState* play) { player->actor.world.pos.x = player->actor.world.pos.z = .0f; this->csState2 = 1; func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 0x39); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_57); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -2278,7 +2278,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, PlayState* play) { this->subCamId = SUB_CAM_ID_DONE; this->csState2 = this->subCamId; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); BossTw_SetupWait(this, play); } break; @@ -2682,7 +2682,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, PlayState* play) { case 0: this->csState2 = 1; func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -2721,7 +2721,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, PlayState* play) { sKoumePtr->actor.world.pos.z = sKotakePtr->actor.world.pos.z; sKoumePtr->work[YAW_TGT] = sKotakePtr->work[YAW_TGT] = sKoumePtr->actor.shape.rot.x = sKotakePtr->actor.shape.rot.x = sKoumePtr->actor.shape.rot.y = sKotakePtr->actor.shape.rot.y = 0; - func_8002DF54(play, &sKoumePtr->actor, 1); + func_8002DF54(play, &sKoumePtr->actor, PLAYER_CSMODE_1); sKoumePtr->actor.flags |= ACTOR_FLAG_0; } break; @@ -2810,7 +2810,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, PlayState* play) { this->csState2 = 4; this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS_CLEAR); Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, 600.0f, 230.0f, 0.0f, 0, 0, 0, WARP_DUNGEON_ADULT); diff --git a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c index c99958ee2e..e68c2cee6e 100644 --- a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c +++ b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c @@ -640,7 +640,7 @@ void BossVa_Init(Actor* thisx, PlayState* play2) { if (GET_EVENTCHKINF(EVENTCHKINF_76)) { sCsState = INTRO_CALL_BARI; sDoorState = 100; - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); play->envCtx.screenFillColor[0] = 0xDC; play->envCtx.screenFillColor[1] = 0xDC; play->envCtx.screenFillColor[2] = 0xBE; @@ -781,7 +781,7 @@ void BossVa_BodyIntro(BossVa* this, PlayState* play) { play->envCtx.screenFillColor[1] = 0xDC; play->envCtx.screenFillColor[2] = 0xBE; play->envCtx.screenFillColor[3] = 0xD2; - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); player->actor.world.rot.y = player->actor.shape.rot.y = 0x7FFF; sCsState++; break; @@ -809,7 +809,7 @@ void BossVa_BodyIntro(BossVa* this, PlayState* play) { case INTRO_CLOSE_DOOR: this->timer--; if (this->timer == 0) { - func_8002DF54(play, &this->actor, 2); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_2); sCsState++; this->timer = 30; } @@ -824,7 +824,7 @@ void BossVa_BodyIntro(BossVa* this, PlayState* play) { } break; case INTRO_CRACKLE: - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); sCsState++; break; case INTRO_SPAWN_BARI: @@ -955,7 +955,7 @@ void BossVa_BodyIntro(BossVa* this, PlayState* play) { sSubCamAtMaxVelFrac = sSubCamEyeMaxVelFrac; if (this->timer >= 45000) { play->envCtx.lightSettingOverride = 1; - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); } else if (this->timer >= 35000) { SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS); } @@ -1012,7 +1012,7 @@ void BossVa_BodyIntro(BossVa* this, PlayState* play) { sSubCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_ACTIVE); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); sCsState++; SET_EVENTCHKINF(EVENTCHKINF_76); player->actor.shape.rot.y = player->actor.world.rot.y = this->actor.yawTowardsPlayer + 0x8000; @@ -1075,7 +1075,7 @@ void BossVa_BodyPhase1(BossVa* this, PlayState* play) { if (sBodyState & 0x7F) { this->skelAnime.curFrame = 0.0f; - Actor_SetColorFilter(&this->actor, 0, 255, 0, 12); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 12); Audio_PlayActorSfx2(&this->actor, NA_SE_EN_BALINADE_DAMAGE); } @@ -1126,7 +1126,7 @@ void BossVa_BodyPhase2(BossVa* this, PlayState* play) { if (this->actor.colorFilterTimer == 0) { sPhase2Timer++; if ((this->invincibilityTimer != 0) && (this->actor.colorFilterParams & 0x4000)) { - Actor_SetColorFilter(&this->actor, 0, 255, 0, 160); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 160); this->actor.colorFilterTimer = this->invincibilityTimer; } else { this->colliderBody.info.bumper.dmgFlags = DMG_BOOMERANG; @@ -1138,7 +1138,7 @@ void BossVa_BodyPhase2(BossVa* this, PlayState* play) { if (this->colliderBody.base.ac->id == ACTOR_EN_BOOM) { sPhase2Timer &= 0xFE00; - Actor_SetColorFilter(&this->actor, 0, 255, 0, 160); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 160); this->colliderBody.info.bumper.dmgFlags = DMG_SWORD | DMG_BOOMERANG | DMG_DEKU_STICK; } else { sKillBari++; @@ -1149,7 +1149,7 @@ void BossVa_BodyPhase2(BossVa* this, PlayState* play) { } } - Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 12); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 12); } Audio_PlayActorSfx2(&this->actor, NA_SE_EN_BALINADE_FAINT); @@ -1243,7 +1243,7 @@ void BossVa_BodyPhase3(BossVa* this, PlayState* play) { if (this->colliderBody.base.acFlags & AC_HIT) { this->skelAnime.curFrame = 0.0f; - Actor_SetColorFilter(&this->actor, 0, 255, 0, 12); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 12); Audio_PlayActorSfx2(&this->actor, NA_SE_EN_BALINADE_FAINT); sBodyState = 1; this->timer = 131; @@ -1374,7 +1374,7 @@ void BossVa_BodyPhase4(BossVa* this, PlayState* play) { if (this->actor.colChkInfo.damageEffect != 1) { this->actor.world.rot.y = this->actor.yawTowardsPlayer; Audio_PlayActorSfx2(&this->actor, NA_SE_EN_BALINADE_DAMAGE); - Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 12); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 12); sPhase4HP -= this->actor.colChkInfo.damage; if (sPhase4HP <= 0) { this->timer = 0; @@ -1392,7 +1392,7 @@ void BossVa_BodyPhase4(BossVa* this, PlayState* play) { this->timer = (s16)Rand_CenteredFloat(40.0f) + 160; this->vaBodySpinRate = 0; this->actor.speedXZ = 0.0f; - Actor_SetColorFilter(&this->actor, 0, 125, 0, 255); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 125, COLORFILTER_BUFFLAG_OPA, 255); Audio_PlayActorSfx2(&this->actor, NA_SE_EN_BALINADE_FAINT); } } @@ -1530,7 +1530,7 @@ void BossVa_BodyDeath(BossVa* this, PlayState* play) { switch (sCsState) { case DEATH_START: - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); func_80064520(play, &play->csCtx); sSubCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); @@ -1592,7 +1592,7 @@ void BossVa_BodyDeath(BossVa* this, PlayState* play) { EffectSsDeadSound_SpawnStationary(play, &this->actor.projectedPos, NA_SE_EN_BALINADE_DEAD, 1, 1, 0x28); this->onCeiling = 2; // Not used by body BossVa_SetDeathEnv(play); - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); } break; case DEATH_CORE_BURST: @@ -1633,7 +1633,7 @@ void BossVa_BodyDeath(BossVa* this, PlayState* play) { mainCam->at = sSubCamAt; - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); sCsState++; Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, this->actor.world.pos.x, this->actor.world.pos.y, @@ -1718,7 +1718,7 @@ void BossVa_SetupSupportAttached(BossVa* this, PlayState* play) { void BossVa_SupportAttached(BossVa* this, PlayState* play) { this->timer++; if (sBodyState & 0x7F) { - Actor_SetColorFilter(&this->actor, 0, 255, 0, 12); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 12); if (Rand_ZeroOne() > 0.5f) { Animation_Change(&this->skelAnime, &gBarinadeSupportDamage1Anim, 1.0f, 0.0f, Animation_GetLastFrame(&gBarinadeSupportDamage1Anim), ANIMMODE_ONCE, 0.0f); @@ -2114,7 +2114,7 @@ void BossVa_SetupZapperDamaged(BossVa* this, PlayState* play) { Animation_GetLastFrame(&gBarinadeZapperDamage2Anim), ANIMMODE_ONCE_INTERP, 4.0f); } - Actor_SetColorFilter(&this->actor, 0, 255, 0, 12); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 12); this->burst = false; BossVa_SetupAction(this, BossVa_ZapperDamaged); } @@ -2417,7 +2417,7 @@ void BossVa_BariIntro(BossVa* this, PlayState* play) { switch (sCsState) { case INTRO_LOOK_BARI: if (this->actor.params == BOSSVA_BARI_UPPER_1) { - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); if (Math_SmoothStepToF(&this->actor.world.pos.y, 60.0f, 0.3f, 1.0f, 0.15f) == 0.0f) { this->timer--; if (this->timer == 0) { @@ -2687,7 +2687,8 @@ void BossVa_BariPhase2Attack(BossVa* this, PlayState* play) { } else { this->unk_1AC = 0; if (this->actor.colorFilterTimer == 0) { - Actor_SetColorFilter(&this->actor, 0, 255, 0x2000, GET_BODY(this)->actor.colorFilterTimer); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_XLU, + GET_BODY(this)->actor.colorFilterTimer); } } @@ -2722,7 +2723,7 @@ void BossVa_BariPhase2Attack(BossVa* this, PlayState* play) { void BossVa_SetupBariPhase3Stunned(BossVa* this, PlayState* play) { this->actor.flags |= ACTOR_FLAG_0; this->timer = GET_BODY(this)->timer; - Actor_SetColorFilter(&this->actor, 0, 255, 0x2000, this->timer); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_XLU, this->timer); BossVa_SetupAction(this, BossVa_BariPhase3Stunned); } 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 1caa9a4cd0..5db7bc0a55 100644 --- a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c +++ b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c @@ -868,7 +868,7 @@ void func_80986B2C(PlayState* play) { play->nextEntranceIndex = ENTR_HYRULE_FIELD_0; play->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_BLACK, TCS_FAST); play->transitionTrigger = TRANS_TRIGGER_START; - func_8002DF54(play, &player->actor, 8); + func_8002DF54(play, &player->actor, PLAYER_CSMODE_8); } } diff --git a/src/overlays/actors/ovl_Door_Ana/z_door_ana.c b/src/overlays/actors/ovl_Door_Ana/z_door_ana.c index d3a61b5263..a9bbc0fae9 100644 --- a/src/overlays/actors/ovl_Door_Ana/z_door_ana.c +++ b/src/overlays/actors/ovl_Door_Ana/z_door_ana.c @@ -118,7 +118,7 @@ void DoorAna_WaitClosed(DoorAna* this, PlayState* play) { Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } - func_8002F5F0(&this->actor, play); + Actor_SetClosestSecretDistance(&this->actor, play); } // update routine for grottos that are open diff --git a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c index a1466e91c1..152f92f38a 100644 --- a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c +++ b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c @@ -750,7 +750,7 @@ void func_80997220(DoorShutter* this, PlayState* play) { this->dyna.actor.velocity.y = 0.0f; if (DoorShutter_SetupDoor(this, play) && !(player->stateFlags1 & PLAYER_STATE1_11)) { DoorShutter_SetupAction(this, func_80997568); - func_8002DF54(play, NULL, 2); + func_8002DF54(play, NULL, PLAYER_CSMODE_2); } } @@ -784,7 +784,7 @@ void DoorShutter_JabuDoorClose(DoorShutter* this, PlayState* play) { void func_80997568(DoorShutter* this, PlayState* play) { if (this->unk_16F++ > 30) { - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); DoorShutter_SetupDoor(this, play); } } diff --git a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c index 45fb1714e3..bccd19edd4 100644 --- a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c +++ b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c @@ -466,7 +466,7 @@ void DoorWarp1_ChildWarpIdle(DoorWarp1* this, PlayState* play) { Audio_PlaySfxGeneral(NA_SE_EV_LINK_WARP, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); OnePointCutscene_Init(play, 0x25E7, 999, &this->actor, CAM_ID_MAIN); - func_8002DF54(play, &this->actor, 10); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_10); player->unk_450.x = this->actor.world.pos.x; player->unk_450.z = this->actor.world.pos.z; @@ -542,7 +542,7 @@ void DoorWarp1_RutoWarpIdle(DoorWarp1* this, PlayState* play) { if (this->rutoWarpState != WARP_BLUE_RUTO_STATE_INITIAL && DoorWarp1_PlayerInRange(this, play)) { this->rutoWarpState = WARP_BLUE_RUTO_STATE_ENTERED; - func_8002DF54(play, &this->actor, 10); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_10); this->unk_1B2 = 1; DoorWarp1_SetupAction(this, func_80999EE0); } @@ -650,7 +650,7 @@ void DoorWarp1_AdultWarpIdle(DoorWarp1* this, PlayState* play) { player = GET_PLAYER(play); OnePointCutscene_Init(play, 0x25E8, 999, &this->actor, CAM_ID_MAIN); - func_8002DF54(play, &this->actor, 10); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_10); player->unk_450.x = this->actor.world.pos.x; player->unk_450.z = this->actor.world.pos.z; this->unk_1B2 = 20; diff --git a/src/overlays/actors/ovl_En_Am/z_en_am.c b/src/overlays/actors/ovl_En_Am/z_en_am.c index 280e667a24..ac558159ba 100644 --- a/src/overlays/actors/ovl_En_Am/z_en_am.c +++ b/src/overlays/actors/ovl_En_Am/z_en_am.c @@ -379,7 +379,7 @@ void EnAm_Sleep(EnAm* this, PlayState* play) { if (this->textureBlend == 0) { Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EN_AMOS_WAVE); Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EN_AMOS_VOICE); - Actor_SetColorFilter(&this->dyna.actor, 0x4000, 255, 0, 8); + Actor_SetColorFilter(&this->dyna.actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8); } if (this->textureBlend >= 240) { @@ -717,7 +717,7 @@ void EnAm_SetupStunned(EnAm* this, PlayState* play) { this->dyna.actor.speedXZ = -6.0f; } - Actor_SetColorFilter(&this->dyna.actor, 0, 120, 0, 100); + Actor_SetColorFilter(&this->dyna.actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 100); if (this->damageEffect == AM_DMGEFF_ICE) { this->iceTimer = 48; @@ -881,7 +881,7 @@ void EnAm_Update(Actor* thisx, PlayState* play) { } if ((this->deathTimer % 4) == 0) { - Actor_SetColorFilter(&this->dyna.actor, 0x4000, 255, 0, 4); + Actor_SetColorFilter(&this->dyna.actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 4); } } diff --git a/src/overlays/actors/ovl_En_Ani/z_en_ani.c b/src/overlays/actors/ovl_En_Ani/z_en_ani.c index f733177672..5feef35ccd 100644 --- a/src/overlays/actors/ovl_En_Ani/z_en_ani.c +++ b/src/overlays/actors/ovl_En_Ani/z_en_ani.c @@ -125,7 +125,7 @@ void func_809B0558(EnAni* this, PlayState* play) { } SET_ITEMGETINF(ITEMGETINF_15); } else { - func_8002F434(&this->actor, play, GI_HEART_PIECE, 10000.0f, 200.0f); + Actor_OfferGetItem(&this->actor, play, GI_HEART_PIECE, 10000.0f, 200.0f); } } @@ -133,7 +133,7 @@ void func_809B05F0(EnAni* this, PlayState* play) { if (Actor_TextboxIsClosing(&this->actor, play)) { EnAni_SetupAction(this, func_809B0558); } - func_8002F434(&this->actor, play, GI_HEART_PIECE, 10000.0f, 200.0f); + Actor_OfferGetItem(&this->actor, play, GI_HEART_PIECE, 10000.0f, 200.0f); } void func_809B064C(EnAni* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c b/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c index 1a6d72eaf6..4af75cffcc 100644 --- a/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c +++ b/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c @@ -344,7 +344,7 @@ void EnAnubice_Die(EnAnubice* this, PlayState* play) { rotatedFireEffectPos.x += this->actor.world.pos.x + Rand_CenteredFloat(40.0f); rotatedFireEffectPos.y += this->actor.world.pos.y + Rand_CenteredFloat(40.0f); rotatedFireEffectPos.z += this->actor.world.pos.z + Rand_CenteredFloat(30.0f); - Actor_SetColorFilter(&this->actor, 0x4000, 128, 0, 8); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 128, COLORFILTER_BUFFLAG_OPA, 8); EffectSsEnFire_SpawnVec3f(play, &this->actor, &rotatedFireEffectPos, 100, 0, 0, -1); if ((this->animLastFrame <= curFrame) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) { diff --git a/src/overlays/actors/ovl_En_Ba/z_en_ba.c b/src/overlays/actors/ovl_En_Ba/z_en_ba.c index 7baaefe9b1..b8dd3df4f7 100644 --- a/src/overlays/actors/ovl_En_Ba/z_en_ba.c +++ b/src/overlays/actors/ovl_En_Ba/z_en_ba.c @@ -325,7 +325,7 @@ void func_809B7174(EnBa* this) { this->actor.colChkInfo.mass = MASS_IMMOVABLE; this->actor.speedXZ = 10.0f; Audio_PlayActorSfx2(&this->actor, NA_SE_EN_BALINADE_HAND_DAMAGE); - Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 12); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 12); EnBa_SetupAction(this, EnBa_RecoilFromDamage); } diff --git a/src/overlays/actors/ovl_En_Bb/z_en_bb.c b/src/overlays/actors/ovl_En_Bb/z_en_bb.c index dd2d8b7a3a..26e8a10da6 100644 --- a/src/overlays/actors/ovl_En_Bb/z_en_bb.c +++ b/src/overlays/actors/ovl_En_Bb/z_en_bb.c @@ -516,7 +516,7 @@ void EnBb_SetupDamage(EnBb* this) { if (this->actor.params == ENBB_RED) { EnBb_KillFlameTrail(this); } - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 0xC); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 12); this->timer = 5; EnBb_SetupAction(this, EnBb_Damage); } @@ -1083,14 +1083,14 @@ void EnBb_SetupStunned(EnBb* this) { } switch (this->dmgEffect) { case 8: - Actor_SetColorFilter(&this->actor, -0x8000, 0xC8, 0, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_GRAY, 200, COLORFILTER_BUFFLAG_OPA, 80); break; case 9: this->fireIceTimer = 0x30; FALLTHROUGH; case 15: Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GOMA_JR_FREEZE); - Actor_SetColorFilter(&this->actor, 0, 0xB4, 0, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 180, COLORFILTER_BUFFLAG_OPA, 80); break; } this->actor.bgCheckFlags &= ~BGCHECKFLAG_GROUND; @@ -1205,7 +1205,7 @@ void EnBb_CollisionCheck(EnBb* this, PlayState* play) { //! the bug in EnBb_Draw below to crash the game. } else if ((this->actor.params == ENBB_WHITE) && ((this->action == BB_WHITE) || (this->action == BB_STUNNED))) { - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 0xC); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 12); this->actor.speedXZ = -8.0f; this->maxSpeed = 0.0f; this->actor.world.rot.y = this->actor.yawTowardsPlayer; diff --git a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c index 27353c5ed9..a4c003fdc0 100644 --- a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c +++ b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c @@ -340,7 +340,7 @@ void func_809BD524(EnBigokuta* this) { this->unk_195 = false; this->unk_196 = 80; } - Actor_SetColorFilter(&this->actor, 0, 255, 0, this->unk_196); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, this->unk_196); this->actionFunc = func_809BE058; } @@ -349,7 +349,7 @@ void func_809BD5E0(EnBigokuta* this) { this->unk_196 = 24; this->unk_19A = 0; this->cylinder[0].base.atFlags &= ~AT_ON; - Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 24); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 24); this->actionFunc = func_809BE180; } void func_809BD658(EnBigokuta* this) { diff --git a/src/overlays/actors/ovl_En_Bili/z_en_bili.c b/src/overlays/actors/ovl_En_Bili/z_en_bili.c index 8055fe8843..0ffa806244 100644 --- a/src/overlays/actors/ovl_En_Bili/z_en_bili.c +++ b/src/overlays/actors/ovl_En_Bili/z_en_bili.c @@ -221,7 +221,7 @@ void EnBili_SetupBurnt(EnBili* this) { this->collider.base.acFlags &= ~AC_ON; this->actor.flags |= ACTOR_FLAG_4; this->actor.speedXZ = 0.0f; - Actor_SetColorFilter(&this->actor, 0x4000, 0xC8, 0x2000, 0x14); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 200, COLORFILTER_BUFFLAG_XLU, 20); this->actionFunc = EnBili_Burnt; } @@ -240,7 +240,7 @@ void EnBili_SetupStunned(EnBili* this) { this->collider.info.bumper.effect = 0; this->actor.gravity = -1.0f; this->actor.speedXZ = 0.0f; - Actor_SetColorFilter(&this->actor, 0, 0x96, 0x2000, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 150, COLORFILTER_BUFFLAG_XLU, 80); Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GOMA_JR_FREEZE); this->collider.base.atFlags &= ~AT_ON; this->actionFunc = EnBili_Stunned; @@ -268,7 +268,7 @@ void EnBili_SetupFrozen(EnBili* this, PlayState* play) { } this->actor.speedXZ = 0.0f; - Actor_SetColorFilter(&this->actor, 0, 0x96, 0x2000, 0xA); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 150, COLORFILTER_BUFFLAG_XLU, 10); this->collider.base.atFlags &= ~AT_ON; this->collider.base.acFlags &= ~AC_ON; this->timer = 300; @@ -566,7 +566,7 @@ void EnBili_UpdateDamage(EnBili* this, PlayState* play) { } } else if (damageEffect == BIRI_DMGEFF_SWORD) { if (this->actionFunc != EnBili_Stunned) { - Actor_SetColorFilter(&this->actor, 0x4000, 0xC8, 0x2000, 0xA); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 200, COLORFILTER_BUFFLAG_XLU, 10); if (this->actor.colChkInfo.health == 0) { this->actor.params = EN_BILI_TYPE_DYING; diff --git a/src/overlays/actors/ovl_En_Bom/z_en_bom.c b/src/overlays/actors/ovl_En_Bom/z_en_bom.c index 37c5bfdd09..1f400d7433 100644 --- a/src/overlays/actors/ovl_En_Bom/z_en_bom.c +++ b/src/overlays/actors/ovl_En_Bom/z_en_bom.c @@ -150,7 +150,7 @@ void EnBom_Move(EnBom* this, PlayState* play) { this->actor.velocity.y *= -0.3f; this->actor.bgCheckFlags &= ~BGCHECKFLAG_GROUND_TOUCH; } else if (this->timer >= 4) { - func_8002F580(&this->actor, play); + Actor_OfferCarry(&this->actor, play); } } diff --git a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c index 9f0ebddbd9..f565058caa 100644 --- a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c +++ b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c @@ -262,7 +262,7 @@ void EnBomBowMan_RunGame(EnBomBowlMan* this, PlayState* play) { Message_StartTextbox(play, this->actor.textId, NULL); if (this->gameResult == 2) { - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); } this->actionFunc = EnBomBowlMan_HandlePlayChoice; } else { @@ -307,7 +307,7 @@ void EnBomBowlMan_HandlePlayChoice(EnBomBowlMan* this, PlayState* play) { Message_ContinueTextbox(play, this->actor.textId); this->dialogState = TEXT_STATE_EVENT; OnePointCutscene_Init(play, 8010, -99, NULL, CAM_ID_MAIN); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->actionFunc = EnBomBowMan_SetupChooseShowPrize; } } else { @@ -343,11 +343,11 @@ void func_809C41FC(EnBomBowlMan* this, PlayState* play) { Message_ContinueTextbox(play, this->actor.textId); this->dialogState = TEXT_STATE_EVENT; OnePointCutscene_Init(play, 8010, -99, NULL, CAM_ID_MAIN); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->actionFunc = EnBomBowMan_SetupChooseShowPrize; } else { if (this->gameResult == 2) { - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); } this->actionFunc = EnBomBowMan_SetupRunGame; } @@ -459,7 +459,7 @@ void EnBomBowlMan_BeginPlayGame(EnBomBowlMan* this, PlayState* play) { // "Wow" osSyncPrintf(VT_FGCOL(YELLOW) "☆ わー ☆ %d\n" VT_RST, play->bombchuBowlingStatus); - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); this->actionFunc = EnBomBowMan_SetupRunGame; } } diff --git a/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c b/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c index 984313ca6c..c664c49094 100644 --- a/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c +++ b/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c @@ -67,7 +67,7 @@ void EnBomBowlPit_DetectHit(EnBomBowlPit* this, PlayState* play) { if (((fabsf(chuPosDiff.x) < 40.0f) || (BREG(2))) && ((fabsf(chuPosDiff.y) < 40.0f) || (BREG(2))) && ((fabsf(chuPosDiff.z) < 40.0f) || (BREG(2)))) { - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); chu->timer = 1; this->subCamId = Play_CreateSubCamera(play); @@ -106,7 +106,7 @@ void EnBomBowlPit_DetectHit(EnBomBowlPit* this, PlayState* play) { Message_StartTextbox(play, this->actor.textId, NULL); this->unk_154 = TEXT_STATE_EVENT; func_80078884(NA_SE_EV_HIT_SOUND); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->status = 1; this->actionFunc = EnBomBowlPit_CameraDollyIn; break; @@ -169,7 +169,7 @@ void EnBomBowlPit_SetupGivePrize(EnBomBowlPit* this, PlayState* play) { Play_ClearCamera(play, this->subCamId); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_ACTIVE); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->actionFunc = EnBomBowlPit_GivePrize; } } @@ -177,7 +177,7 @@ void EnBomBowlPit_SetupGivePrize(EnBomBowlPit* this, PlayState* play) { void EnBomBowlPit_GivePrize(EnBomBowlPit* this, PlayState* play) { Player* player = GET_PLAYER(play); - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); this->getItemId = sGetItemIds[this->prizeIndex]; if ((this->getItemId == GI_BOMB_BAG_30) && (CUR_CAPACITY(UPG_BOMB_BAG) == 30)) { @@ -186,7 +186,7 @@ void EnBomBowlPit_GivePrize(EnBomBowlPit* this, PlayState* play) { player->stateFlags1 &= ~PLAYER_STATE1_29; this->actor.parent = NULL; - func_8002F434(&this->actor, play, this->getItemId, 2000.0f, 1000.0f); + Actor_OfferGetItem(&this->actor, play, this->getItemId, 2000.0f, 1000.0f); player->stateFlags1 |= PLAYER_STATE1_29; this->actionFunc = EnBomBowlPit_WaitTillPrizeGiven; } @@ -195,7 +195,7 @@ void EnBomBowlPit_WaitTillPrizeGiven(EnBomBowlPit* this, PlayState* play) { if (Actor_HasParent(&this->actor, play)) { this->actionFunc = EnBomBowlPit_Reset; } else { - func_8002F434(&this->actor, play, this->getItemId, 2000.0f, 1000.0f); + Actor_OfferGetItem(&this->actor, play, this->getItemId, 2000.0f, 1000.0f); } } diff --git a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c index 0a23ef7ca0..8659d34a24 100644 --- a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c +++ b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c @@ -191,7 +191,7 @@ void EnBombf_GrowBomb(EnBombf* this, PlayState* play) { } } else { if (!Actor_HasParent(&this->actor, play)) { - func_8002F580(&this->actor, play); + Actor_OfferCarry(&this->actor, play); } else { player->actor.child = NULL; player->heldActor = NULL; @@ -241,7 +241,7 @@ void EnBombf_Move(EnBombf* this, PlayState* play) { func_8002F850(play, &this->actor); this->actor.velocity.y *= -0.5f; } else if (this->timer >= 4) { - func_8002F580(&this->actor, play); + Actor_OfferCarry(&this->actor, play); } } } 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 f4afaae883..f1c5efcc32 100644 --- a/src/overlays/actors/ovl_En_Box/z_en_box.c +++ b/src/overlays/actors/ovl_En_Box/z_en_box.c @@ -267,7 +267,7 @@ void EnBox_FallOnSwitchFlag(EnBox* this, PlayState* play) { s32 treasureFlag = this->dyna.actor.params & 0x1F; if (treasureFlag >= ENBOX_TREASURE_FLAG_UNK_MIN && treasureFlag < ENBOX_TREASURE_FLAG_UNK_MAX) { - func_8002F5F0(&this->dyna.actor, play); + Actor_SetClosestSecretDistance(&this->dyna.actor, play); } if (this->unk_1A8 >= 0) { @@ -287,7 +287,7 @@ void func_809C9700(EnBox* this, PlayState* play) { Player* player = GET_PLAYER(play); if (treasureFlag >= ENBOX_TREASURE_FLAG_UNK_MIN && treasureFlag < ENBOX_TREASURE_FLAG_UNK_MAX) { - func_8002F5F0(&this->dyna.actor, play); + Actor_SetClosestSecretDistance(&this->dyna.actor, play); } if (Math3D_Vec3fDistSq(&this->dyna.actor.world.pos, &player->actor.world.pos) > SQ(150.0f)) { @@ -323,7 +323,7 @@ void EnBox_AppearOnSwitchFlag(EnBox* this, PlayState* play) { s32 treasureFlag = this->dyna.actor.params & 0x1F; if (treasureFlag >= ENBOX_TREASURE_FLAG_UNK_MIN && treasureFlag < ENBOX_TREASURE_FLAG_UNK_MAX) { - func_8002F5F0(&this->dyna.actor, play); + Actor_SetClosestSecretDistance(&this->dyna.actor, play); } if (Flags_GetSwitch(play, this->switchFlag)) { @@ -337,7 +337,7 @@ void EnBox_AppearOnRoomClear(EnBox* this, PlayState* play) { s32 treasureFlag = this->dyna.actor.params & 0x1F; if (treasureFlag >= ENBOX_TREASURE_FLAG_UNK_MIN && treasureFlag < ENBOX_TREASURE_FLAG_UNK_MAX) { - func_8002F5F0(&this->dyna.actor, play); + Actor_SetClosestSecretDistance(&this->dyna.actor, play); } if (Flags_GetTempClear(play, this->dyna.actor.room) && !Player_InCsMode(play)) { @@ -424,7 +424,7 @@ void EnBox_WaitOpen(EnBox* this, PlayState* play) { func_8002DBD0(&this->dyna.actor, &sp4C, &player->actor.world.pos); if (sp4C.z > -50.0f && sp4C.z < 0.0f && fabsf(sp4C.y) < 10.0f && fabsf(sp4C.x) < 20.0f && Player_IsFacingActor(&this->dyna.actor, 0x3000, play)) { - func_8002F554(&this->dyna.actor, play, 0 - (this->dyna.actor.params >> 5 & 0x7F)); + Actor_OfferGetItemNearby(&this->dyna.actor, play, 0 - (this->dyna.actor.params >> 5 & 0x7F)); } if (Flags_GetTreasure(play, this->dyna.actor.params & 0x1F)) { EnBox_SetupAction(this, EnBox_Open); diff --git a/src/overlays/actors/ovl_En_Brob/z_en_brob.c b/src/overlays/actors/ovl_En_Brob/z_en_brob.c index f103efec90..7715352300 100644 --- a/src/overlays/actors/ovl_En_Brob/z_en_brob.c +++ b/src/overlays/actors/ovl_En_Brob/z_en_brob.c @@ -127,7 +127,7 @@ void func_809CAEA0(EnBrob* this) { void func_809CAEF4(EnBrob* this) { Animation_MorphToPlayOnce(&this->skelAnime, &object_brob_Anim_000290, -5.0f); this->unk_1AE -= 125.0f; - Actor_SetColorFilter(&this->dyna.actor, 0, 0xFF, 0, 0x50); + Actor_SetColorFilter(&this->dyna.actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 80); Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EN_GOMA_JR_FREEZE); this->actionFunc = func_809CB2B8; } 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 3a9ef8bd52..89a043ac4d 100644 --- a/src/overlays/actors/ovl_En_Bw/z_en_bw.c +++ b/src/overlays/actors/ovl_En_Bw/z_en_bw.c @@ -694,7 +694,7 @@ void func_809D0584(EnBw* this, PlayState* play) { if ((this->damageEffect == 1) || (this->damageEffect == 0xE)) { if (this->unk_23C == 0) { Actor_ApplyDamage(&this->actor); - Actor_SetColorFilter(&this->actor, 0, 0x78, 0, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 80); func_809D03CC(this); this->unk_248 = 0.0f; } @@ -705,7 +705,7 @@ void func_809D0584(EnBw* this, PlayState* play) { } if (((this->unk_221 == 1) || (this->unk_221 == 4)) && (this->actor.colChkInfo.health == 0)) { if (this->unk_220 != 0) { - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8); if (func_800355E4(play, &this->collider2.base)) { this->unk_230 = 0; this->actor.scale.y -= 0.009f; @@ -719,7 +719,7 @@ void func_809D0584(EnBw* this, PlayState* play) { } } else if ((this->unk_220 != 1) && (this->unk_220 != 6)) { Audio_PlayActorSfx2(&this->actor, NA_SE_EN_BUBLEWALK_DAMAGE); - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8); if (this->unk_220 != 5) { func_809D01CC(this); } 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 49d18232ef..ced50c7e65 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 @@ -348,7 +348,7 @@ void EnClearTag_Update(Actor* thisx, PlayState* play2) { this->collider.base.acFlags &= ~AC_HIT; this->crashingTimer = 20; - Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 5); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 5); this->acceleration.x = Rand_CenteredFloat(15.0f); this->acceleration.y = Rand_CenteredFloat(15.0f); this->acceleration.z = Rand_CenteredFloat(15.0f); diff --git a/src/overlays/actors/ovl_En_Cow/z_en_cow.c b/src/overlays/actors/ovl_En_Cow/z_en_cow.c index 397f2137a3..7ba17cf4f6 100644 --- a/src/overlays/actors/ovl_En_Cow/z_en_cow.c +++ b/src/overlays/actors/ovl_En_Cow/z_en_cow.c @@ -213,7 +213,7 @@ void func_809DF778(EnCow* this, PlayState* play) { this->actor.parent = NULL; this->actionFunc = func_809DF730; } else { - func_8002F434(&this->actor, play, GI_MILK, 10000.0f, 100.0f); + Actor_OfferGetItem(&this->actor, play, GI_MILK, 10000.0f, 100.0f); } } @@ -222,7 +222,7 @@ void func_809DF7D8(EnCow* this, PlayState* play) { this->actor.flags &= ~ACTOR_FLAG_16; Message_CloseTextbox(play); this->actionFunc = func_809DF778; - func_8002F434(&this->actor, play, GI_MILK, 10000.0f, 100.0f); + Actor_OfferGetItem(&this->actor, play, GI_MILK, 10000.0f, 100.0f); } } diff --git a/src/overlays/actors/ovl_En_Crow/z_en_crow.c b/src/overlays/actors/ovl_En_Crow/z_en_crow.c index 6a15e9f9aa..9631bf3943 100644 --- a/src/overlays/actors/ovl_En_Crow/z_en_crow.c +++ b/src/overlays/actors/ovl_En_Crow/z_en_crow.c @@ -157,7 +157,7 @@ void EnCrow_SetupDamaged(EnCrow* this, PlayState* play) { Audio_PlayActorSfx2(&this->actor, NA_SE_EN_KAICHO_DEAD); if (this->actor.colChkInfo.damageEffect == 3) { // Ice arrows - Actor_SetColorFilter(&this->actor, 0, 255, 0, 40); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 40); for (i = 0; i < 8; i++) { iceParticlePos.x = ((i & 1 ? 7.0f : -7.0f) * scale) + this->actor.world.pos.x; iceParticlePos.y = ((i & 2 ? 7.0f : -7.0f) * scale) + this->actor.world.pos.y; @@ -166,13 +166,13 @@ void EnCrow_SetupDamaged(EnCrow* this, PlayState* play) { ((Rand_ZeroOne() * 0.15f) + 0.85f) * scale); } } else if (this->actor.colChkInfo.damageEffect == 2) { // Fire arrows and Din's Fire - Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 40); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 40); for (i = 0; i < 4; i++) { EffectSsEnFire_SpawnVec3f(play, &this->actor, &this->actor.world.pos, 50.0f * scale, 0, 0, i); } } else { - Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 40); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 40); } if (this->actor.flags & ACTOR_FLAG_15) { @@ -196,7 +196,7 @@ void EnCrow_SetupTurnAway(EnCrow* this) { this->aimRotX = -0x1000; this->aimRotY = this->actor.yawTowardsPlayer + 0x8000; this->skelAnime.playSpeed = 2.0f; - Actor_SetColorFilter(&this->actor, 0, 255, 0, 5); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 5); Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GOMA_JR_FREEZE); this->actionFunc = EnCrow_TurnAway; } diff --git a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c index b8a59bb512..bcf61281ea 100644 --- a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c +++ b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c @@ -469,7 +469,7 @@ void EnDaiku_InitSubCamera(EnDaiku* this, PlayState* play) { Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); Play_CameraSetFov(play, this->subCamId, play->mainCamera.fov); - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); } void EnDaiku_UpdateSubCamera(EnDaiku* this, PlayState* play) { @@ -505,7 +505,7 @@ void EnDaiku_EscapeSuccess(EnDaiku* this, PlayState* play) { Actor_Kill(&this->actor); } } else { - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); } } diff --git a/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c b/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c index 5df26055bc..84bff0c578 100644 --- a/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c +++ b/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c @@ -386,9 +386,9 @@ void EnDekubaba_SetupHit(EnDekubaba* this, s32 arg1) { Actor_SetScale(&this->actor, this->size * 0.01f); if (arg1 == 2) { - Actor_SetColorFilter(&this->actor, 0, 155, 0, 62); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 155, COLORFILTER_BUFFLAG_OPA, 62); } else { - Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 42); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 42); } this->actionFunc = EnDekubaba_Hit; @@ -442,7 +442,7 @@ void EnDekubaba_SetupSway(EnDekubaba* this) { this->stemSectionAngle[1] = -0x4800; EnDekubaba_DisableHitboxes(this); - Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 35); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 35); this->collider.base.acFlags &= ~AC_ON; this->actionFunc = EnDekubaba_Sway; } @@ -1020,7 +1020,7 @@ void EnDekubaba_DeadStickDrop(EnDekubaba* this, PlayState* play) { return; } - func_8002F554(&this->actor, play, GI_DEKU_STICKS_1); + Actor_OfferGetItemNearby(&this->actor, play, GI_DEKU_STICKS_1); } // Update and associated functions diff --git a/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c b/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c index b1cd689707..e0865a0fd8 100644 --- a/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c +++ b/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c @@ -214,7 +214,8 @@ void EnDekunuts_SetupBeDamaged(EnDekunuts* this) { this->actor.speedXZ = 10.0f; Audio_PlayActorSfx2(&this->actor, NA_SE_EN_NUTS_DAMAGE); Audio_PlayActorSfx2(&this->actor, NA_SE_EN_NUTS_CUTBODY); - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, Animation_GetLastFrame(&gDekuNutsDamageAnim)); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, + Animation_GetLastFrame(&gDekuNutsDamageAnim)); } void EnDekunuts_SetupBeStunned(EnDekunuts* this) { @@ -223,7 +224,7 @@ void EnDekunuts_SetupBeStunned(EnDekunuts* this) { this->actionFunc = EnDekunuts_BeStunned; this->actor.speedXZ = 0.0f; Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GOMA_JR_FREEZE); - Actor_SetColorFilter(&this->actor, 0, 0xFF, 0, + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, Animation_GetLastFrame(&gDekuNutsDamageAnim) * this->animFlagAndTimer); } 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 a0cfc3680f..b2786eeee5 100644 --- a/src/overlays/actors/ovl_En_Dh/z_en_dh.c +++ b/src/overlays/actors/ovl_En_Dh/z_en_dh.c @@ -482,7 +482,7 @@ void EnDh_CollisionCheck(EnDh* this, PlayState* play) { if (player->unk_844 != 0) { this->unk_258 = player->unk_845; } - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8); lastHealth = this->actor.colChkInfo.health; if (Actor_ApplyDamage(&this->actor) == 0) { EnDh_SetupDeath(this); diff --git a/src/overlays/actors/ovl_En_Dha/z_en_dha.c b/src/overlays/actors/ovl_En_Dha/z_en_dha.c index 451f226022..d0156367b0 100644 --- a/src/overlays/actors/ovl_En_Dha/z_en_dha.c +++ b/src/overlays/actors/ovl_En_Dha/z_en_dha.c @@ -383,7 +383,7 @@ void EnDha_UpdateHealth(EnDha* this, PlayState* play) { if (this->actor.colChkInfo.damageEffect == 0 || this->actor.colChkInfo.damageEffect == 6) { return; } else { - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8); if (Actor_ApplyDamage(&this->actor) == 0) { EnDha_SetupDeath(this); this->actor.colChkInfo.health = 8; diff --git a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c index 8b55fabd94..0ad921fc20 100644 --- a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c +++ b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c @@ -134,7 +134,7 @@ s32 EnDivingGame_HasMinigameFinished(EnDivingGame* this, PlayState* play) { Message_StartTextbox(play, this->actor.textId, NULL); this->unk_292 = TEXT_STATE_EVENT; this->allRupeesThrown = this->state = this->phase = this->unk_2A2 = this->grabbedRupeesCounter = 0; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->actionFunc = func_809EE048; return true; } else { @@ -159,7 +159,7 @@ s32 EnDivingGame_HasMinigameFinished(EnDivingGame* this, PlayState* play) { this->unk_292 = TEXT_STATE_EVENT; func_800F5B58(); Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); if (!GET_EVENTCHKINF(EVENTCHKINF_38)) { this->actionFunc = func_809EE96C; } else { @@ -187,7 +187,7 @@ void EnDivingGame_Talk(EnDivingGame* this, PlayState* play) { if (this->unk_292 != TEXT_STATE_DONE) { switch (this->state) { case ENDIVINGGAME_STATE_NOTPLAYING: - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->actionFunc = EnDivingGame_HandlePlayChoice; break; case ENDIVINGGAME_STATE_AWARDPRIZE: @@ -254,7 +254,7 @@ void EnDivingGame_HandlePlayChoice(EnDivingGame* this, PlayState* play) { this->actionFunc = func_809EE048; } else { play->msgCtx.msgMode = MSGMODE_PAUSED; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->actionFunc = func_809EE0FC; } } @@ -266,11 +266,11 @@ void func_809EE048(EnDivingGame* this, PlayState* play) { if (this->unk_292 == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play)) { if (this->phase == ENDIVINGGAME_PHASE_ENDED) { Message_CloseTextbox(play); - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); this->actionFunc = func_809EDCB0; } else { play->msgCtx.msgMode = MSGMODE_PAUSED; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->actionFunc = func_809EE0FC; } } @@ -423,7 +423,7 @@ void func_809EE800(EnDivingGame* this, PlayState* play) { Interface_SetTimer(50 + BREG(2)); } func_800F5ACC(NA_BGM_TIMED_MINI_GAME); - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); this->actor.textId = 0x405B; this->unk_292 = TEXT_STATE_EVENT; this->state = ENDIVINGGAME_STATE_PLAYING; @@ -446,7 +446,7 @@ void func_809EE96C(EnDivingGame* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if ((this->unk_292 == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play))) { Message_CloseTextbox(play); - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); this->actor.textId = 0x4056; this->unk_292 = TEXT_STATE_EVENT; this->state = ENDIVINGGAME_STATE_AWARDPRIZE; @@ -459,7 +459,7 @@ void func_809EEA00(EnDivingGame* this, PlayState* play) { if ((this->unk_292 == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play))) { Message_CloseTextbox(play); this->actor.parent = NULL; - func_8002F434(&this->actor, play, GI_SCALE_SILVER, 90.0f, 10.0f); + Actor_OfferGetItem(&this->actor, play, GI_SCALE_SILVER, 90.0f, 10.0f); this->actionFunc = func_809EEA90; } } @@ -469,7 +469,7 @@ void func_809EEA90(EnDivingGame* this, PlayState* play) { if (Actor_HasParent(&this->actor, play)) { this->actionFunc = func_809EEAF8; } else { - func_8002F434(&this->actor, play, GI_SCALE_SILVER, 90.0f, 10.0f); + Actor_OfferGetItem(&this->actor, play, GI_SCALE_SILVER, 90.0f, 10.0f); } } diff --git a/src/overlays/actors/ovl_En_Dns/z_en_dns.c b/src/overlays/actors/ovl_En_Dns/z_en_dns.c index 660013685b..a4f0511674 100644 --- a/src/overlays/actors/ovl_En_Dns/z_en_dns.c +++ b/src/overlays/actors/ovl_En_Dns/z_en_dns.c @@ -370,18 +370,18 @@ void EnDns_Talk(EnDns* this, PlayState* play) { void func_809EFDD0(EnDns* this, PlayState* play) { if (this->actor.params == 0x9) { if (CUR_UPG_VALUE(UPG_DEKU_STICKS) < 2) { - func_8002F434(&this->actor, play, GI_DEKU_STICK_UPGRADE_20, 130.0f, 100.0f); + Actor_OfferGetItem(&this->actor, play, GI_DEKU_STICK_UPGRADE_20, 130.0f, 100.0f); } else { - func_8002F434(&this->actor, play, GI_DEKU_STICK_UPGRADE_30, 130.0f, 100.0f); + Actor_OfferGetItem(&this->actor, play, GI_DEKU_STICK_UPGRADE_30, 130.0f, 100.0f); } } else if (this->actor.params == 0xA) { if (CUR_UPG_VALUE(UPG_DEKU_NUTS) < 2) { - func_8002F434(&this->actor, play, GI_DEKU_NUT_UPGRADE_30, 130.0f, 100.0f); + Actor_OfferGetItem(&this->actor, play, GI_DEKU_NUT_UPGRADE_30, 130.0f, 100.0f); } else { - func_8002F434(&this->actor, play, GI_DEKU_NUT_UPGRADE_40, 130.0f, 100.0f); + Actor_OfferGetItem(&this->actor, play, GI_DEKU_NUT_UPGRADE_40, 130.0f, 100.0f); } } else { - func_8002F434(&this->actor, play, this->dnsItemEntry->getItemId, 130.0f, 100.0f); + Actor_OfferGetItem(&this->actor, play, this->dnsItemEntry->getItemId, 130.0f, 100.0f); } } diff --git a/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c b/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c index fc53b8c7ba..d5fa20ccc5 100644 --- a/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c +++ b/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c @@ -119,7 +119,7 @@ void EnDntJiji_Wait(EnDntJiji* this, PlayState* play) { !(player->stateFlags1 & PLAYER_STATE1_11)) { OnePointCutscene_Init(play, 2230, -99, &this->actor, CAM_ID_MAIN); this->timer = 0; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->actionFunc = EnDntJiji_SetupUnburrow; } } @@ -253,9 +253,9 @@ void EnDntJiji_Talk(EnDntJiji* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) { func_8005B1A4(GET_ACTIVE_CAM(play)); Message_CloseTextbox(play); - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); this->actor.parent = NULL; - func_8002F434(&this->actor, play, this->getItemId, 400.0f, 200.0f); + Actor_OfferGetItem(&this->actor, play, this->getItemId, 400.0f, 200.0f); this->actionFunc = EnDntJiji_SetupGivePrize; } } @@ -265,7 +265,7 @@ void EnDntJiji_SetupGivePrize(EnDntJiji* this, PlayState* play) { if (Actor_HasParent(&this->actor, play)) { this->actionFunc = EnDntJiji_GivePrize; } else { - func_8002F434(&this->actor, play, this->getItemId, 400.0f, 200.0f); + Actor_OfferGetItem(&this->actor, play, this->getItemId, 400.0f, 200.0f); } } diff --git a/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c b/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c index 6c0dc8f1b3..2cacc5d19b 100644 --- a/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c +++ b/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c @@ -250,7 +250,7 @@ void EnDntNomal_TargetWait(EnDntNomal* this, PlayState* play) { this->hitCounter++; if (this->hitCounter >= 3) { OnePointCutscene_Init(play, 4140, -99, &this->actor, CAM_ID_MAIN); - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); this->timer4 = 50; this->actionFunc = EnDntNomal_SetupTargetUnburrow; } @@ -339,7 +339,7 @@ void EnDntNomal_TargetTalk(EnDntNomal* this, PlayState* play) { Message_CloseTextbox(play); func_8005B1A4(GET_ACTIVE_CAM(play)); GET_ACTIVE_CAM(play)->csId = 0; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->actionFunc = EnDntNomal_SetupTargetGivePrize; } } @@ -361,7 +361,7 @@ void EnDntNomal_TargetGivePrize(EnDntNomal* this, PlayState* play) { if (Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_EX_ITEM, itemX, itemY, itemZ, 0, 0, 0, EXITEM_BULLET_BAG) == NULL) { - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); Actor_Kill(&this->actor); } this->spawnedItem = true; diff --git a/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c b/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c index 2b8c90902c..50fe79a3f0 100644 --- a/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c +++ b/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c @@ -91,7 +91,7 @@ void EnDodojr_Destroy(Actor* thisx, PlayState* play) { void EnDodojr_DoSwallowedBombEffects(EnDodojr* this) { Audio_PlayActorSfx2(&this->actor, NA_SE_IT_BOMB_EXPLOSION); - Actor_SetColorFilter(&this->actor, 0x4000, 200, 0, 8); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 200, COLORFILTER_BUFFLAG_OPA, 8); } void EnDodojr_SpawnLargeDust(EnDodojr* this, PlayState* play, s32 count) { @@ -359,7 +359,7 @@ s32 EnDodojr_CheckDamaged(EnDodojr* this, PlayState* play) { (this->actionFunc != EnDodojr_StunnedBounce)) { Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GOMA_JR_FREEZE); this->stunTimer = 120; - Actor_SetColorFilter(&this->actor, 0, 200, 0, 120); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 200, COLORFILTER_BUFFLAG_OPA, 120); EnDodojr_SetupFlipBounce(this); this->actionFunc = EnDodojr_StunnedBounce; } @@ -577,7 +577,7 @@ void EnDodojr_DeathSequence(EnDodojr* this, PlayState* play) { if (this->counter != 0) { if (this->actor.colorFilterTimer == 0) { - Actor_SetColorFilter(&this->actor, 0x4000, 200, 0, this->counter); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 200, COLORFILTER_BUFFLAG_OPA, this->counter); this->counter--; } } else { diff --git a/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c b/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c index 56195d57b3..8ef077c145 100644 --- a/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c +++ b/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c @@ -497,7 +497,7 @@ void EnDodongo_SwallowBomb(EnDodongo* this, PlayState* play) { &this->bombSmokeEnvColor, 400, 10, 10); } Audio_PlayActorSfx2(&this->actor, NA_SE_IT_BOMB_EXPLOSION); - Actor_SetColorFilter(&this->actor, 0x4000, 0x78, 0, 8); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 120, COLORFILTER_BUFFLAG_OPA, 8); } } } @@ -676,7 +676,7 @@ void EnDodongo_Death(EnDodongo* this, PlayState* play) { EnDodongo_SpawnBombSmoke(this, play); } } else if (this->actor.colorFilterTimer == 0) { - Actor_SetColorFilter(&this->actor, 0x4000, 0x78, 0, 4); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 120, COLORFILTER_BUFFLAG_OPA, 4); } if (SkelAnime_Update(&this->skelAnime)) { if (this->timer == 0) { @@ -721,12 +721,12 @@ void EnDodongo_CollisionCheck(EnDodongo* this, PlayState* play) { this->damageEffect = this->actor.colChkInfo.damageEffect; if ((this->actor.colChkInfo.damageEffect == 1) || (this->actor.colChkInfo.damageEffect == 0xF)) { if (this->actionState != DODONGO_STUNNED) { - Actor_SetColorFilter(&this->actor, 0, 0x78, 0, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 80); Actor_ApplyDamage(&this->actor); EnDodongo_SetupStunned(this); } } else { - Actor_SetColorFilter(&this->actor, 0x4000, 0x78, 0, 8); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 120, COLORFILTER_BUFFLAG_OPA, 8); if (Actor_ApplyDamage(&this->actor) == 0) { EnDodongo_SetupDeath(this, play); } else { diff --git a/src/overlays/actors/ovl_En_Ds/z_en_ds.c b/src/overlays/actors/ovl_En_Ds/z_en_ds.c index 528e915bfa..6817b084ca 100644 --- a/src/overlays/actors/ovl_En_Ds/z_en_ds.c +++ b/src/overlays/actors/ovl_En_Ds/z_en_ds.c @@ -90,7 +90,7 @@ void EnDs_GiveOddPotion(EnDs* this, PlayState* play) { this->actionFunc = EnDs_DisplayOddPotionText; gSaveContext.subTimerState = SUBTIMER_STATE_OFF; } else { - func_8002F434(&this->actor, play, GI_ODD_POTION, 10000.0f, 50.0f); + Actor_OfferGetItem(&this->actor, play, GI_ODD_POTION, 10000.0f, 50.0f); } } @@ -98,7 +98,7 @@ void EnDs_TalkAfterBrewOddPotion(EnDs* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) { Message_CloseTextbox(play); this->actionFunc = EnDs_GiveOddPotion; - func_8002F434(&this->actor, play, GI_ODD_POTION, 10000.0f, 50.0f); + Actor_OfferGetItem(&this->actor, play, GI_ODD_POTION, 10000.0f, 50.0f); } } @@ -170,7 +170,7 @@ void EnDs_GiveBluePotion(EnDs* this, PlayState* play) { this->actor.parent = NULL; this->actionFunc = EnDs_Talk; } else { - func_8002F434(&this->actor, play, GI_BOTTLE_POTION_BLUE, 10000.0f, 50.0f); + Actor_OfferGetItem(&this->actor, play, GI_BOTTLE_POTION_BLUE, 10000.0f, 50.0f); } } @@ -189,7 +189,7 @@ void EnDs_OfferBluePotion(EnDs* this, PlayState* play) { case 2: // have 100 rupees and empty bottle Rupees_ChangeBy(-100); this->actor.flags &= ~ACTOR_FLAG_16; - func_8002F434(&this->actor, play, GI_BOTTLE_POTION_BLUE, 10000.0f, 50.0f); + Actor_OfferGetItem(&this->actor, play, GI_BOTTLE_POTION_BLUE, 10000.0f, 50.0f); this->actionFunc = EnDs_GiveBluePotion; return; } diff --git a/src/overlays/actors/ovl_En_Du/z_en_du.c b/src/overlays/actors/ovl_En_Du/z_en_du.c index ec6be4b346..b0a68f2c80 100644 --- a/src/overlays/actors/ovl_En_Du/z_en_du.c +++ b/src/overlays/actors/ovl_En_Du/z_en_du.c @@ -328,7 +328,7 @@ void func_809FE3C0(EnDu* this, PlayState* play) { return; } if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) { - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); this->interactInfo.talkState = NPC_TALK_STATE_IDLE; } if (this->actor.xzDistToPlayer < 116.0f + this->collider.dim.radius) { @@ -423,7 +423,7 @@ void func_809FE890(EnDu* this, PlayState* play) { CsCmdActorAction* csAction; if (play->csCtx.state == CS_STATE_IDLE) { - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); EnDu_SetupAction(this, func_809FEB08); return; } @@ -490,7 +490,7 @@ void func_809FEB08(EnDu* this, PlayState* play) { this->unk_1EE = 0; if (this->unk_1E8 == 1) { - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENDU_ANIM_1); EnDu_SetupAction(this, func_809FE3C0); return; @@ -509,7 +509,7 @@ void func_809FEB08(EnDu* this, PlayState* play) { void func_809FEC14(EnDu* this, PlayState* play) { if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) { - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); EnDu_SetupAction(this, func_809FEC70); func_809FEC70(this, play); } @@ -522,7 +522,7 @@ void func_809FEC70(EnDu* this, PlayState* play) { } else { f32 xzRange = this->actor.xzDistToPlayer + 1.0f; - func_8002F434(&this->actor, play, GI_GORONS_BRACELET, xzRange, fabsf(this->actor.yDistToPlayer) + 1.0f); + Actor_OfferGetItem(&this->actor, play, GI_GORONS_BRACELET, xzRange, fabsf(this->actor.yDistToPlayer) + 1.0f); } } diff --git a/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c b/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c index dc3fe964e0..0e1eaf4d59 100644 --- a/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c +++ b/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c @@ -281,14 +281,14 @@ void EnEiyer_SetupHurt(EnEiyer* this) { this->actor.gravity = 0.0f; this->actor.velocity.y = 0.0f; this->actor.speedXZ = 5.0f; - Actor_SetColorFilter(&this->actor, 0x4000, 200, 0, 40); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 200, COLORFILTER_BUFFLAG_OPA, 40); this->collider.base.acFlags &= ~AC_ON; this->actionFunc = EnEiyer_Hurt; } void EnEiyer_SetupDie(EnEiyer* this) { this->timer = 20; - Actor_SetColorFilter(&this->actor, 0x4000, 200, 0, 40); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 200, COLORFILTER_BUFFLAG_OPA, 40); if (this->collider.info.bumper.dmgFlags != (DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT)) { this->actor.speedXZ = 6.0f; @@ -317,7 +317,7 @@ void EnEiyer_SetupStunned(EnEiyer* this) { this->actor.velocity.y = 0.0f; this->actor.gravity = -1.0f; this->collider.dim.height = sColCylInit.dim.height + 8; - Actor_SetColorFilter(&this->actor, 0, 200, 0, 80); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 200, COLORFILTER_BUFFLAG_OPA, 80); this->collider.base.atFlags &= ~AT_ON; Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GOMA_JR_FREEZE); this->actionFunc = EnEiyer_Stunned; 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 bb331f79db..21570236f9 100644 --- a/src/overlays/actors/ovl_En_Elf/z_en_elf.c +++ b/src/overlays/actors/ovl_En_Elf/z_en_elf.c @@ -661,7 +661,7 @@ void func_80A0329C(EnElf* this, PlayState* play) { if (!(this->fairyFlags & FAIRY_FLAG_BIG)) { // GI_MAX in this case allows the player to catch the actor in a bottle - func_8002F434(&this->actor, play, GI_MAX, 80.0f, 60.0f); + Actor_OfferGetItem(&this->actor, play, GI_MAX, 80.0f, 60.0f); } } } diff --git a/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c b/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c index 3a39b09044..d376158508 100644 --- a/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c +++ b/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c @@ -386,14 +386,14 @@ void EnExItem_TargetPrizeApproach(EnExItem* this, PlayState* play) { s32 getItemId; this->actor.draw = NULL; - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); this->actor.parent = NULL; if (CUR_UPG_VALUE(UPG_BULLET_BAG) == 1) { getItemId = GI_BULLET_BAG_40; } else { getItemId = GI_BULLET_BAG_50; } - func_8002F434(&this->actor, play, getItemId, 2000.0f, 1000.0f); + Actor_OfferGetItem(&this->actor, play, getItemId, 2000.0f, 1000.0f); this->actionFunc = EnExItem_TargetPrizeGive; } } @@ -406,7 +406,7 @@ void EnExItem_TargetPrizeGive(EnExItem* this, PlayState* play) { } else { getItemId = (CUR_UPG_VALUE(UPG_BULLET_BAG) == 2) ? GI_BULLET_BAG_50 : GI_BULLET_BAG_40; - func_8002F434(&this->actor, play, getItemId, 2000.0f, 1000.0f); + Actor_OfferGetItem(&this->actor, play, getItemId, 2000.0f, 1000.0f); } } diff --git a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c index 3a581c0106..c60cd51a3a 100644 --- a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c +++ b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c @@ -214,7 +214,7 @@ void EnFirefly_SetupFall(EnFirefly* this) { Animation_Change(&this->skelAnime, &gKeeseFlyAnim, 0.5f, 0.0f, 0.0f, ANIMMODE_LOOP_INTERP, -3.0f); Audio_PlayActorSfx2(&this->actor, NA_SE_EN_FFLY_DEAD); this->actor.flags |= ACTOR_FLAG_4; - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 40); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 40); this->actionFunc = EnFirefly_Fall; } @@ -248,7 +248,7 @@ void EnFirefly_SetupFlyAway(EnFirefly* this) { void EnFirefly_SetupStunned(EnFirefly* this) { this->timer = 80; - Actor_SetColorFilter(&this->actor, 0, 0xFF, 0, 80); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 80); this->auraType = KEESE_AURA_NONE; this->actor.velocity.y = 0.0f; this->skelAnime.playSpeed = 3.0f; @@ -263,7 +263,7 @@ void EnFirefly_SetupFrozenFall(EnFirefly* this, PlayState* play) { this->actor.flags |= ACTOR_FLAG_4; this->auraType = KEESE_AURA_NONE; this->actor.speedXZ = 0.0f; - Actor_SetColorFilter(&this->actor, 0, 0xFF, 0, 0xFF); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 255); Audio_PlayActorSfx2(&this->actor, NA_SE_EN_FFLY_DEAD); for (i = 0; i <= 7; i++) { diff --git a/src/overlays/actors/ovl_En_Fish/z_en_fish.c b/src/overlays/actors/ovl_En_Fish/z_en_fish.c index 29e3c7cdc0..1ca061050a 100644 --- a/src/overlays/actors/ovl_En_Fish/z_en_fish.c +++ b/src/overlays/actors/ovl_En_Fish/z_en_fish.c @@ -710,7 +710,7 @@ void EnFish_OrdinaryUpdate(EnFish* this, PlayState* play) { EnFish_BeginRespawn(this); } else if (EnFish_InBottleRange(this, play)) { // GI_MAX in this case allows the player to catch the actor in a bottle - func_8002F434(&this->actor, play, GI_MAX, 80.0f, 20.0f); + Actor_OfferGetItem(&this->actor, play, GI_MAX, 80.0f, 20.0f); } } } diff --git a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c index 6fd4c71473..885508c8d2 100644 --- a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c +++ b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c @@ -395,7 +395,7 @@ void EnFloormas_SetupTakeDamage(EnFloormas* this) { } else { this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->collider.base.ac) + 0x8000; } - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 0x14); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 20); this->actionFunc = EnFloormas_TakeDamage; this->actor.speedXZ = 5.0f; this->actor.velocity.y = 5.5f; @@ -412,9 +412,9 @@ void EnFloormas_SetupFreeze(EnFloormas* this) { Animation_Change(&this->skelAnime, &gWallmasterJumpAnim, 1.5f, 0, 20.0f, ANIMMODE_ONCE, -3.0f); this->actor.speedXZ = 0.0f; if (this->actor.colChkInfo.damageEffect == 4) { - Actor_SetColorFilter(&this->actor, -0x8000, 0xFF, 0, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_GRAY, 255, COLORFILTER_BUFFLAG_OPA, 80); } else { - Actor_SetColorFilter(&this->actor, 0, 0xFF, 0, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 80); if (this->actor.scale.x > 0.004f) { Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GOMA_JR_FREEZE); } else { diff --git a/src/overlays/actors/ovl_En_Fr/z_en_fr.c b/src/overlays/actors/ovl_En_Fr/z_en_fr.c index 2fccca7516..58146734d0 100644 --- a/src/overlays/actors/ovl_En_Fr/z_en_fr.c +++ b/src/overlays/actors/ovl_En_Fr/z_en_fr.c @@ -1013,7 +1013,7 @@ void EnFr_Deactivate(EnFr* this, PlayState* play) { this->actionFunc = EnFr_Idle; } else { this->actionFunc = EnFr_GiveReward; - func_8002F434(&this->actor, play, this->reward, 30.0f, 100.0f); + Actor_OfferGetItem(&this->actor, play, this->reward, 30.0f, 100.0f); } } @@ -1022,7 +1022,7 @@ void EnFr_GiveReward(EnFr* this, PlayState* play) { this->actor.parent = NULL; this->actionFunc = EnFr_SetIdle; } else { - func_8002F434(&this->actor, play, this->reward, 30.0f, 100.0f); + Actor_OfferGetItem(&this->actor, play, this->reward, 30.0f, 100.0f); } } diff --git a/src/overlays/actors/ovl_En_Fw/z_en_fw.c b/src/overlays/actors/ovl_En_Fw/z_en_fw.c index b3910657a9..8259d53417 100644 --- a/src/overlays/actors/ovl_En_Fw/z_en_fw.c +++ b/src/overlays/actors/ovl_En_Fw/z_en_fw.c @@ -247,7 +247,8 @@ void EnFw_Run(EnFw* this, PlayState* play) { Math_SmoothStepToF(&this->actor.scale.x, 0.024999999f, 0.08f, 0.6f, 0.0f); Actor_SetScale(&this->actor, this->actor.scale.x); if (this->actor.colorFilterTimer == 0) { - Actor_SetColorFilter(&this->actor, 0x4000, 0xC8, 0, this->explosionTimer); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 200, COLORFILTER_BUFFLAG_OPA, + this->explosionTimer); this->explosionTimer--; } @@ -265,7 +266,8 @@ void EnFw_Run(EnFw* this, PlayState* play) { } } else { if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || this->actor.velocity.y > 0.0f) { - Actor_SetColorFilter(&this->actor, 0x4000, 0xC8, 0, this->damageTimer); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 200, COLORFILTER_BUFFLAG_OPA, + this->damageTimer); return; } DECR(this->damageTimer); diff --git a/src/overlays/actors/ovl_En_Fz/z_en_fz.c b/src/overlays/actors/ovl_En_Fz/z_en_fz.c index 6eb9fc6908..6ca86bbb3e 100644 --- a/src/overlays/actors/ovl_En_Fz/z_en_fz.c +++ b/src/overlays/actors/ovl_En_Fz/z_en_fz.c @@ -344,7 +344,7 @@ void EnFz_ApplyDamage(EnFz* this, PlayState* play) { switch (this->actor.colChkInfo.damageEffect) { case 0xF: Actor_ApplyDamage(&this->actor); - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0x2000, 8); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_XLU, 8); if (this->actor.colChkInfo.health != 0) { Audio_PlayActorSfx2(&this->actor, NA_SE_EN_FREEZAD_DAMAGE); vec.x = this->actor.world.pos.x; @@ -365,7 +365,7 @@ void EnFz_ApplyDamage(EnFz* this, PlayState* play) { case 2: Actor_ApplyDamage(&this->actor); - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0x2000, 8); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_XLU, 8); if (this->actor.colChkInfo.health == 0) { Audio_PlayActorSfx2(&this->actor, NA_SE_EN_FREEZAD_DEAD); EnFz_SetupMelt(this); diff --git a/src/overlays/actors/ovl_En_Gb/z_en_gb.c b/src/overlays/actors/ovl_En_Gb/z_en_gb.c index 6ac46c8c31..e83cc9459e 100644 --- a/src/overlays/actors/ovl_En_Gb/z_en_gb.c +++ b/src/overlays/actors/ovl_En_Gb/z_en_gb.c @@ -350,7 +350,7 @@ void func_80A2FA50(EnGb* this, PlayState* play) { void func_80A2FB40(EnGb* this, PlayState* play) { if (Message_GetState(&play->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(play)) { - func_8002F434(&this->dyna.actor, play, GI_BOTTLE_EMPTY, 100.0f, 10.0f); + Actor_OfferGetItem(&this->dyna.actor, play, GI_BOTTLE_EMPTY, 100.0f, 10.0f); this->actionFunc = func_80A2FBB0; } } @@ -360,7 +360,7 @@ void func_80A2FBB0(EnGb* this, PlayState* play) { this->dyna.actor.parent = NULL; this->actionFunc = func_80A2FC0C; } else { - func_8002F434(&this->dyna.actor, play, GI_BOTTLE_EMPTY, 100.0f, 10.0f); + Actor_OfferGetItem(&this->dyna.actor, play, GI_BOTTLE_EMPTY, 100.0f, 10.0f); } } diff --git a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c index dbf45e4c9d..487bae48bf 100644 --- a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c +++ b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c @@ -242,7 +242,7 @@ void EnGe1_KickPlayer(EnGe1* this, PlayState* play) { void EnGe1_SpotPlayer(EnGe1* this, PlayState* play) { this->cutsceneTimer = 30; this->actionFunc = EnGe1_KickPlayer; - func_8002DF54(play, &this->actor, 0x5F); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_95); func_80078884(NA_SE_SY_FOUND); Message_StartTextbox(play, 0x6000, &this->actor); } @@ -512,7 +512,7 @@ void EnGe1_WaitTillItemGiven_Archery(EnGe1* this, PlayState* play) { } else { getItemId = GI_HEART_PIECE; } - func_8002F434(&this->actor, play, getItemId, 10000.0f, 50.0f); + Actor_OfferGetItem(&this->actor, play, getItemId, 10000.0f, 50.0f); } } @@ -541,7 +541,7 @@ void EnGe1_BeginGiveItem_Archery(EnGe1* this, PlayState* play) { getItemId = GI_HEART_PIECE; } - func_8002F434(&this->actor, play, getItemId, 10000.0f, 50.0f); + Actor_OfferGetItem(&this->actor, play, getItemId, 10000.0f, 50.0f); } void EnGe1_TalkWinPrize_Archery(EnGe1* this, PlayState* play) { @@ -586,7 +586,7 @@ void EnGe1_BeginGame_Archery(EnGe1* this, PlayState* play) { SET_EVENTCHKINF(EVENTCHKINF_68); if (!(player->stateFlags1 & PLAYER_STATE1_23)) { - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); } else { horse = Actor_FindNearby(play, &player->actor, ACTOR_EN_HORSE, ACTORCAT_BG, 1200.0f); player->actor.freezeTimer = 1200; 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 ef70210b83..00a82a3fc6 100644 --- a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c +++ b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c @@ -451,7 +451,7 @@ void EnGe2_WaitTillCardGiven(EnGe2* this, PlayState* play) { this->actor.parent = NULL; this->actionFunc = EnGe2_SetActionAfterTalk; } else { - func_8002F434(&this->actor, play, GI_GERUDOS_CARD, 10000.0f, 50.0f); + Actor_OfferGetItem(&this->actor, play, GI_GERUDOS_CARD, 10000.0f, 50.0f); } } @@ -460,7 +460,7 @@ void EnGe2_GiveCard(EnGe2* this, PlayState* play) { Message_CloseTextbox(play); this->actor.flags &= ~ACTOR_FLAG_16; this->actionFunc = EnGe2_WaitTillCardGiven; - func_8002F434(&this->actor, play, GI_GERUDOS_CARD, 10000.0f, 50.0f); + Actor_OfferGetItem(&this->actor, play, GI_GERUDOS_CARD, 10000.0f, 50.0f); } } @@ -480,7 +480,7 @@ void EnGe2_SetupCapturePlayer(EnGe2* this, PlayState* play) { this->stateFlags |= GE2_STATE_CAPTURING; this->actor.speedXZ = 0.0f; EnGe2_ChangeAction(this, GE2_ACTION_CAPTURETURN); - func_8002DF54(play, &this->actor, 95); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_95); func_80078884(NA_SE_SY_FOUND); Message_StartTextbox(play, 0x6000, &this->actor); } @@ -556,7 +556,9 @@ void EnGe2_Update(Actor* thisx, PlayState* play) { } else if (this->collider.base.acFlags & AC_HIT) { if ((this->collider.info.acHitInfo != NULL) && (this->collider.info.acHitInfo->toucher.dmgFlags & DMG_HOOKSHOT)) { - Actor_SetColorFilter(&this->actor, 0, 120, 0, 400); + //! @bug duration parameter is larger than 255 which messes with the internal bitpacking of the colorfilter. + //! Because of the duration being tracked as an unsigned byte it ends up being truncated to 144 + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 400); this->actor.update = EnGe2_UpdateStunned; return; } diff --git a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c index 57d203ec8f..7bf34f737e 100644 --- a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c +++ b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c @@ -141,7 +141,7 @@ void EnGe3_WaitTillCardGiven(EnGe3* this, PlayState* play) { this->actor.parent = NULL; this->actionFunc = EnGe3_Wait; } else { - func_8002F434(&this->actor, play, GI_GERUDOS_CARD, 10000.0f, 50.0f); + Actor_OfferGetItem(&this->actor, play, GI_GERUDOS_CARD, 10000.0f, 50.0f); } } @@ -150,7 +150,7 @@ void EnGe3_GiveCard(EnGe3* this, PlayState* play) { Message_CloseTextbox(play); this->actor.flags &= ~ACTOR_FLAG_16; this->actionFunc = EnGe3_WaitTillCardGiven; - func_8002F434(&this->actor, play, GI_GERUDOS_CARD, 10000.0f, 50.0f); + Actor_OfferGetItem(&this->actor, play, GI_GERUDOS_CARD, 10000.0f, 50.0f); } } @@ -159,7 +159,7 @@ void EnGe3_ForceTalk(EnGe3* this, PlayState* play) { this->actionFunc = EnGe3_GiveCard; } else { if (!(this->unk_30C & 4)) { - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); this->unk_30C |= 4; } this->actor.textId = 0x6004; diff --git a/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c b/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c index 16ba688c5a..173661baaa 100644 --- a/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c +++ b/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c @@ -919,7 +919,7 @@ void EnGeldB_SpinAttack(EnGeldB* this, PlayState* play) { if (&player->actor == this->swordCollider.base.at) { func_8002F71C(play, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f); this->spinAttackState = 2; - func_8002DF54(play, &this->actor, 0x18); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_24); Message_StartTextbox(play, 0x6003, &this->actor); this->timer = 30; this->actor.speedXZ = 0.0f; @@ -1373,12 +1373,12 @@ void EnGeldB_CollisionCheck(EnGeldB* this, PlayState* play) { if ((this->actor.colChkInfo.damageEffect == GELDB_DMG_STUN) || (this->actor.colChkInfo.damageEffect == GELDB_DMG_FREEZE)) { if (this->action != GELDB_STUNNED) { - Actor_SetColorFilter(&this->actor, 0, 0x78, 0, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 80); Actor_ApplyDamage(&this->actor); EnGeldB_SetupStunned(this); } } else { - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8); if (Actor_ApplyDamage(&this->actor) == 0) { if (this->keyFlag != 0) { key = Item_DropCollectible(play, &this->actor.world.pos, this->keyFlag | ITEM00_SMALL_KEY); diff --git a/src/overlays/actors/ovl_En_Gm/z_en_gm.c b/src/overlays/actors/ovl_En_Gm/z_en_gm.c index 282c257e9c..d518af7f38 100644 --- a/src/overlays/actors/ovl_En_Gm/z_en_gm.c +++ b/src/overlays/actors/ovl_En_Gm/z_en_gm.c @@ -245,7 +245,7 @@ void EnGm_ProcessChoiceIndex(EnGm* this, PlayState* play) { Message_ContinueTextbox(play, 0xC8); this->actionFunc = func_80A3DD7C; } else { - func_8002F434(&this->actor, play, GI_SWORD_KNIFE, 415.0f, 10.0f); + Actor_OfferGetItem(&this->actor, play, GI_SWORD_KNIFE, 415.0f, 10.0f); this->actionFunc = func_80A3DF00; } break; @@ -262,7 +262,7 @@ void func_80A3DF00(EnGm* this, PlayState* play) { this->actor.parent = NULL; this->actionFunc = func_80A3DF60; } else { - func_8002F434(&this->actor, play, GI_SWORD_KNIFE, 415.0f, 10.0f); + Actor_OfferGetItem(&this->actor, play, GI_SWORD_KNIFE, 415.0f, 10.0f); } } diff --git a/src/overlays/actors/ovl_En_Go/z_en_go.c b/src/overlays/actors/ovl_En_Go/z_en_go.c index 48fbc67bef..94facaac4f 100644 --- a/src/overlays/actors/ovl_En_Go/z_en_go.c +++ b/src/overlays/actors/ovl_En_Go/z_en_go.c @@ -226,7 +226,7 @@ s16 EnGo_UpdateTalkState(PlayState* play, Actor* thisx) { unkState = NPC_TALK_STATE_IDLE; break; case 0x3036: - func_8002F434(thisx, play, GI_TUNIC_GORON, xzRange, yRange); + Actor_OfferGetItem(thisx, play, GI_TUNIC_GORON, xzRange, yRange); SET_INFTABLE(INFTABLE_10D); // EnGo exclusive flag unkState = NPC_TALK_STATE_ACTION; break; @@ -972,7 +972,7 @@ void EnGo_GetItem(EnGo* this, PlayState* play) { yDist = fabsf(this->actor.yDistToPlayer) + 1.0f; xzDist = this->actor.xzDistToPlayer + 1.0f; - func_8002F434(&this->actor, play, getItemId, xzDist, yDist); + Actor_OfferGetItem(&this->actor, play, getItemId, xzDist, yDist); } } diff --git a/src/overlays/actors/ovl_En_Go2/z_en_go2.c b/src/overlays/actors/ovl_En_Go2/z_en_go2.c index ee86e3a0ef..0839c03346 100644 --- a/src/overlays/actors/ovl_En_Go2/z_en_go2.c +++ b/src/overlays/actors/ovl_En_Go2/z_en_go2.c @@ -278,8 +278,8 @@ s32 EnGo2_SpawnDust(EnGo2* this, u8 initialTimer, f32 scale, f32 scaleStep, s32 void EnGo2_GetItem(EnGo2* this, PlayState* play, s32 getItemId) { this->getItemId = getItemId; - func_8002F434(&this->actor, play, getItemId, this->actor.xzDistToPlayer + 1.0f, - fabsf(this->actor.yDistToPlayer) + 1.0f); + Actor_OfferGetItem(&this->actor, play, getItemId, this->actor.xzDistToPlayer + 1.0f, + fabsf(this->actor.yDistToPlayer) + 1.0f); } s32 EnGo2_GetDialogState(EnGo2* this, PlayState* play) { @@ -1791,8 +1791,8 @@ void EnGo2_SetupGetItem(EnGo2* this, PlayState* play) { this->actor.parent = NULL; this->actionFunc = EnGo2_SetGetItem; } else { - func_8002F434(&this->actor, play, this->getItemId, this->actor.xzDistToPlayer + 1.0f, - fabsf(this->actor.yDistToPlayer) + 1.0f); + Actor_OfferGetItem(&this->actor, play, this->getItemId, this->actor.xzDistToPlayer + 1.0f, + fabsf(this->actor.yDistToPlayer) + 1.0f); } } @@ -1924,7 +1924,7 @@ void EnGo2_GoronFireGenericAction(EnGo2* this, PlayState* play) { (f32)((Math_SinS(this->actor.world.rot.y) * -30.0f) + this->actor.world.pos.x); player->actor.world.pos.z = (f32)((Math_CosS(this->actor.world.rot.y) * -30.0f) + this->actor.world.pos.z); - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); Audio_PlayFanfare(NA_BGM_APPEAR); } break; @@ -1961,7 +1961,7 @@ void EnGo2_GoronFireGenericAction(EnGo2* this, PlayState* play) { case 4: // Finalize walking away Message_CloseTextbox(play); EnGo2_GoronFireClearCamera(this, play); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); Actor_Kill(&this->actor); break; case 1: diff --git a/src/overlays/actors/ovl_En_Goma/z_en_goma.c b/src/overlays/actors/ovl_En_Goma/z_en_goma.c index 7ba22f6644..6fd3b53935 100644 --- a/src/overlays/actors/ovl_En_Goma/z_en_goma.c +++ b/src/overlays/actors/ovl_En_Goma/z_en_goma.c @@ -561,7 +561,7 @@ void EnGoma_SetupStunned(EnGoma* this, PlayState* play) { } void EnGoma_Stunned(EnGoma* this, PlayState* play) { - Actor_SetColorFilter(&this->actor, 0, 180, 0, 2); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 180, COLORFILTER_BUFFLAG_OPA, 2); this->visualState = 2; if (this->actionTimer != 0) { @@ -652,7 +652,7 @@ void EnGoma_UpdateHit(EnGoma* this, PlayState* play) { this->actor.colChkInfo.health -= swordDamage; EnGoma_SetupHurt(this, play); - Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 5); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 5); this->hurtTimer = 13; } } else { diff --git a/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c b/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c index 263aacad2b..853788952d 100644 --- a/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c +++ b/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c @@ -372,7 +372,7 @@ void EnHeishi1_WaitNight(EnHeishi1* this, PlayState* play) { Message_StartTextbox(play, 0x702D, &this->actor); func_80078884(NA_SE_SY_FOUND); osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST); // "Discovered!" - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); this->actionFunc = EnHeishi1_SetupKick; } } @@ -456,7 +456,7 @@ void EnHeishi1_Update(Actor* thisx, PlayState* play) { func_80078884(NA_SE_SY_FOUND); // "Discovered!" osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST); - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); sPlayerIsCaught = true; this->actionFunc = EnHeishi1_SetupMoveToLink; } diff --git a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c index 6869234d22..80e505a5a6 100644 --- a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c +++ b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c @@ -111,7 +111,7 @@ void EnHeishi2_Init(Actor* thisx, PlayState* play) { this->actor.world.pos.z += 90.0f; this->actor.shape.rot.y = this->actor.world.rot.y; Collider_DestroyCylinder(play, &this->collider); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_4; this->actionFunc = func_80A544AC; } @@ -262,7 +262,7 @@ void func_80A5344C(EnHeishi2* this, PlayState* play) { void func_80A53538(EnHeishi2* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if (this->unk_300 == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play)) { - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); play->msgCtx.msgMode = MSGMODE_PAUSED; this->actionFunc = func_80A535BC; } @@ -334,7 +334,7 @@ void func_80A53850(EnHeishi2* this, PlayState* play) { Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_ACTIVE); Message_CloseTextbox(play); this->unk_30C = 1; - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); this->actionFunc = func_80A531E4; } } @@ -423,7 +423,7 @@ void func_80A53AD4(EnHeishi2* this, PlayState* play) { void func_80A53C0C(EnHeishi2* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if ((this->unk_300 == Message_GetState(&play->msgCtx)) && Message_ShouldAdvance(play)) { - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); play->msgCtx.msgMode = MSGMODE_PAUSED; this->actionFunc = func_80A53C90; } @@ -507,7 +507,7 @@ void func_80A53F30(EnHeishi2* this, PlayState* play) { this->actionFunc = func_80A54038; } else { Message_CloseTextbox(play); - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); this->actionFunc = func_80A53908; } } else { @@ -525,7 +525,7 @@ void func_80A54038(EnHeishi2* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) { SET_INFTABLE(INFTABLE_76); Message_CloseTextbox(play); - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); this->actionFunc = func_80A53908; } } @@ -650,7 +650,7 @@ void func_80A5455C(EnHeishi2* this, PlayState* play) { EnBom* bomb; if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) { - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); Message_CloseTextbox(play); pos.x = Rand_CenteredFloat(20.0f) + this->unk_274.x; diff --git a/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c b/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c index 12a8468b0c..8d0c213b98 100644 --- a/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c +++ b/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c @@ -133,7 +133,7 @@ void EnHeishi3_StandSentinelInGrounds(EnHeishi3* this, PlayState* play) { Message_StartTextbox(play, 0x702D, &this->actor); func_80078884(NA_SE_SY_FOUND); osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST); // "Discovered!" - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); this->actionFunc = EnHeishi3_CatchStart; } } @@ -161,7 +161,7 @@ void EnHeishi3_StandSentinelInCastle(EnHeishi3* this, PlayState* play) { Message_StartTextbox(play, 0x702D, &this->actor); func_80078884(NA_SE_SY_FOUND); osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST); // "Discovered!" - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); this->actionFunc = EnHeishi3_CatchStart; } } diff --git a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c index e9ca883195..f05de5b6e0 100644 --- a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c +++ b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c @@ -266,7 +266,7 @@ void func_80A56994(EnHeishi4* this, PlayState* play) { if ((this->unk_282 == Message_GetState(&play->msgCtx)) && Message_ShouldAdvance(play)) { Message_CloseTextbox(play); SET_INFTABLE(INFTABLE_6C); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->actionFunc = func_80A56A50; } } @@ -284,7 +284,7 @@ void func_80A56ACC(EnHeishi4* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if (this->unk_288 <= currentFrame) { - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); this->actionFunc = func_80A5673C; } } diff --git a/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c b/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c index 85e3191c2f..5b8f32b397 100644 --- a/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c +++ b/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c @@ -205,7 +205,7 @@ void EnHintnuts_SetupLeave(EnHintnuts* this, PlayState* play) { void EnHintnuts_SetupFreeze(EnHintnuts* this) { Animation_PlayLoop(&this->skelAnime, &gHintNutsFreezeAnim); this->actor.flags &= ~ACTOR_FLAG_0; - Actor_SetColorFilter(&this->actor, 0, 0xFF, 0, 100); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 100); this->actor.colorFilterTimer = 1; this->animFlagAndTimer = 0; Audio_PlayActorSfx2(&this->actor, NA_SE_EN_NUTS_FAINT); diff --git a/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c b/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c index e323d35c2c..832634b2d4 100644 --- a/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c +++ b/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c @@ -246,7 +246,7 @@ void EnHonotrap_EyeIdle(EnHonotrap* this, PlayState* play) { void EnHonotrap_SetupEyeOpen(EnHonotrap* this) { this->actionFunc = EnHonotrap_EyeOpen; - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 0x28); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 40); this->timer = 30; Audio_PlayActorSfx2(&this->actor, NA_SE_EV_RED_EYE); } diff --git a/src/overlays/actors/ovl_En_Hs/z_en_hs.c b/src/overlays/actors/ovl_En_Hs/z_en_hs.c index ff457b1cf9..fb99cf00fd 100644 --- a/src/overlays/actors/ovl_En_Hs/z_en_hs.c +++ b/src/overlays/actors/ovl_En_Hs/z_en_hs.c @@ -155,7 +155,7 @@ void func_80A6E740(EnHs* this, PlayState* play) { this->actor.parent = NULL; func_80A6E3A0(this, func_80A6E630); } else { - func_8002F434(&this->actor, play, GI_ODD_MUSHROOM, 10000.0f, 50.0f); + Actor_OfferGetItem(&this->actor, play, GI_ODD_MUSHROOM, 10000.0f, 50.0f); } this->unk_2A8 |= 1; @@ -166,7 +166,7 @@ void func_80A6E7BC(EnHs* this, PlayState* play) { switch (play->msgCtx.choiceIndex) { case 0: func_80A6E3A0(this, func_80A6E740); - func_8002F434(&this->actor, play, GI_ODD_MUSHROOM, 10000.0f, 50.0f); + Actor_OfferGetItem(&this->actor, play, GI_ODD_MUSHROOM, 10000.0f, 50.0f); break; case 1: Message_ContinueTextbox(play, 0x10B4); diff --git a/src/overlays/actors/ovl_En_Hy/z_en_hy.c b/src/overlays/actors/ovl_En_Hy/z_en_hy.c index 6f02528360..38cd4fdbec 100644 --- a/src/overlays/actors/ovl_En_Hy/z_en_hy.c +++ b/src/overlays/actors/ovl_En_Hy/z_en_hy.c @@ -410,8 +410,8 @@ s32 EnHy_IsOsAnimeObjectLoaded(EnHy* this, PlayState* play) { void func_80A6F7CC(EnHy* this, PlayState* play, s32 getItemId) { this->unkGetItemId = getItemId; - func_8002F434(&this->actor, play, getItemId, this->actor.xzDistToPlayer + 1.0f, - fabsf(this->actor.yDistToPlayer) + 1.0f); + Actor_OfferGetItem(&this->actor, play, getItemId, this->actor.xzDistToPlayer + 1.0f, + fabsf(this->actor.yDistToPlayer) + 1.0f); } u16 func_80A6F810(PlayState* play, Actor* thisx) { @@ -1054,8 +1054,8 @@ void func_80A714C4(EnHy* this, PlayState* play) { if (Actor_HasParent(&this->actor, play)) { this->actionFunc = func_80A71530; } else { - func_8002F434(&this->actor, play, this->unkGetItemId, this->actor.xzDistToPlayer + 1.0f, - fabsf(this->actor.yDistToPlayer) + 1.0f); + Actor_OfferGetItem(&this->actor, play, this->unkGetItemId, this->actor.xzDistToPlayer + 1.0f, + fabsf(this->actor.yDistToPlayer) + 1.0f); } } diff --git a/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c b/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c index c5b4ed946e..b842f984fa 100644 --- a/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c +++ b/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c @@ -215,7 +215,7 @@ void EnIceHono_CapturableFlame(EnIceHono* this, PlayState* play) { this->actor.parent = NULL; } else if (EnIceHono_InBottleRange(this, play)) { // GI_MAX in this case allows the player to catch the actor in a bottle - func_8002F434(&this->actor, play, GI_MAX, 60.0f, 100.0f); + Actor_OfferGetItem(&this->actor, play, GI_MAX, 60.0f, 100.0f); } if (this->actor.xzDistToPlayer < 200.0f) { diff --git a/src/overlays/actors/ovl_En_Ik/z_en_ik.c b/src/overlays/actors/ovl_En_Ik/z_en_ik.c index 2b0de16bd1..6b06c0cfa0 100644 --- a/src/overlays/actors/ovl_En_Ik/z_en_ik.c +++ b/src/overlays/actors/ovl_En_Ik/z_en_ik.c @@ -745,7 +745,7 @@ void EnIk_UpdateDamage(EnIk* this, PlayState* play) { return; } - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 0xC); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 12); prevHealth = this->actor.colChkInfo.health; Actor_ApplyDamage(&this->actor); diff --git a/src/overlays/actors/ovl_En_In/z_en_in.c b/src/overlays/actors/ovl_En_In/z_en_in.c index 3127948e73..15951f54bc 100644 --- a/src/overlays/actors/ovl_En_In/z_en_in.c +++ b/src/overlays/actors/ovl_En_In/z_en_in.c @@ -432,7 +432,7 @@ void func_80A79BAC(EnIn* this, PlayState* play, s32 index, u32 transitionType) { } play->transitionType = transitionType; play->transitionTrigger = TRANS_TRIGGER_START; - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING); if (index == 0) { AREG(6) = 0; @@ -856,7 +856,7 @@ void func_80A7ABD4(EnIn* this, PlayState* play) { void func_80A7AE84(EnIn* this, PlayState* play) { Play_ChangeCameraStatus(play, this->returnToCamId, CAM_STAT_ACTIVE); Play_ClearCamera(play, this->subCamId); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL); this->actionFunc = func_80A7AEF0; } diff --git a/src/overlays/actors/ovl_En_Insect/z_en_insect.c b/src/overlays/actors/ovl_En_Insect/z_en_insect.c index 3fb7b1ca59..7f0877df97 100644 --- a/src/overlays/actors/ovl_En_Insect/z_en_insect.c +++ b/src/overlays/actors/ovl_En_Insect/z_en_insect.c @@ -779,7 +779,7 @@ void EnInsect_Update(Actor* thisx, PlayState* play) { if (!(this->insectFlags & INSECT_FLAG_UNCATCHABLE) && sCaughtCount < 4 && EnInsect_InBottleRange(this, play) && // GI_MAX in this case allows the player to catch the actor in a bottle - func_8002F434(&this->actor, play, GI_MAX, 60.0f, 30.0f)) { + Actor_OfferGetItem(&this->actor, play, GI_MAX, 60.0f, 30.0f)) { sCaughtCount++; } } diff --git a/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c b/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c index 38a42f0af8..b57ab1a29a 100644 --- a/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c +++ b/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c @@ -371,9 +371,9 @@ void EnIshi_Wait(EnIshi* this, PlayState* play) { if (this->actor.xzDistToPlayer < 90.0f) { // GI_NONE in these cases allows the player to lift the actor if (type == ROCK_LARGE) { - func_8002F434(&this->actor, play, GI_NONE, 80.0f, 20.0f); + Actor_OfferGetItem(&this->actor, play, GI_NONE, 80.0f, 20.0f); } else { - func_8002F434(&this->actor, play, GI_NONE, 50.0f, 10.0f); + Actor_OfferGetItem(&this->actor, play, GI_NONE, 50.0f, 10.0f); } } } diff --git a/src/overlays/actors/ovl_En_Js/z_en_js.c b/src/overlays/actors/ovl_En_Js/z_en_js.c index 29e60e1e10..ecbf0d1f50 100644 --- a/src/overlays/actors/ovl_En_Js/z_en_js.c +++ b/src/overlays/actors/ovl_En_Js/z_en_js.c @@ -128,7 +128,7 @@ void func_80A89160(EnJs* this, PlayState* play) { this->actor.parent = NULL; En_Js_SetupAction(this, func_80A8910C); } else { - func_8002F434(&this->actor, play, GI_BOMBCHUS_10, 10000.0f, 50.0f); + Actor_OfferGetItem(&this->actor, play, GI_BOMBCHUS_10, 10000.0f, 50.0f); } } diff --git a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c index 5d7e339b5e..39de45a37b 100644 --- a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c +++ b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c @@ -259,7 +259,7 @@ void func_80A8F8D0(EnKakasi* this, PlayState* play) { void func_80A8F9C8(EnKakasi* this, PlayState* play) { func_80A8F28C(this); SkelAnime_Update(&this->skelanime); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); if (this->unk_196 == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play)) { @@ -268,7 +268,7 @@ void func_80A8F9C8(EnKakasi* this, PlayState* play) { } this->subCamId = OnePointCutscene_Init(play, 2270, -99, &this->actor, CAM_ID_MAIN); play->msgCtx.msgMode = MSGMODE_PAUSED; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); func_8010BD58(play, OCARINA_ACTION_SCARECROW_LONG_PLAYBACK); this->actionFunc = func_80A8FAA4; } @@ -307,7 +307,7 @@ void func_80A8FBB8(EnKakasi* this, PlayState* play) { if (this->unk_196 == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play)) { func_8005B1A4(play->cameraPtrs[this->subCamId]); Message_CloseTextbox(play); - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); this->actionFunc = func_80A8F660; } } diff --git a/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c b/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c index e9dc39b28c..b3cc66a81d 100644 --- a/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c +++ b/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c @@ -295,7 +295,7 @@ void func_80A91620(EnKakasi3* this, PlayState* play) { if (play->msgCtx.ocarinaMode == OCARINA_MODE_03 && play->msgCtx.msgMode == MSGMODE_NONE) { this->dialogState = TEXT_STATE_EVENT; Message_StartTextbox(play, 0x40A5, NULL); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->actionFunc = func_80A91A90; return; } @@ -353,7 +353,7 @@ void func_80A918E4(EnKakasi3* this, PlayState* play) { this->dialogState = TEXT_STATE_EVENT; OnePointCutscene_EndCutscene(play, this->subCamId); this->subCamId = CAM_ID_NONE; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->actionFunc = func_80A91A90; return; } @@ -368,7 +368,7 @@ void func_80A918E4(EnKakasi3* this, PlayState* play) { this->unk_195 = true; Message_StartTextbox(play, 0x40A7, NULL); this->dialogState = TEXT_STATE_EVENT; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->actionFunc = func_80A91A90; return; } @@ -382,7 +382,7 @@ void func_80A918E4(EnKakasi3* this, PlayState* play) { void func_80A91A90(EnKakasi3* this, PlayState* play) { func_80A90E28(this); SkelAnime_Update(&this->skelAnime); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); if (this->dialogState == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play)) { if (this->unk_195) { @@ -398,7 +398,7 @@ void func_80A91A90(EnKakasi3* this, PlayState* play) { } Message_CloseTextbox(play); play->msgCtx.ocarinaMode = OCARINA_MODE_04; - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); this->actionFunc = func_80A911F0; } } diff --git a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c index 5d9414cf78..ea15989bea 100644 --- a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c +++ b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c @@ -362,7 +362,7 @@ void EnKarebaba_DeadItemDrop(EnKarebaba* this, PlayState* play) { if (Actor_HasParent(&this->actor, play) || this->actor.params == 0) { EnKarebaba_SetupDead(this); } else { - func_8002F554(&this->actor, play, GI_DEKU_STICKS_1); + Actor_OfferGetItemNearby(&this->actor, play, GI_DEKU_STICKS_1); } } diff --git a/src/overlays/actors/ovl_En_Ko/z_en_ko.c b/src/overlays/actors/ovl_En_Ko/z_en_ko.c index 77201956cd..676cbfb94c 100644 --- a/src/overlays/actors/ovl_En_Ko/z_en_ko.c +++ b/src/overlays/actors/ovl_En_Ko/z_en_ko.c @@ -1224,7 +1224,7 @@ void func_80A99504(EnKo* this, PlayState* play) { this->actor.parent = NULL; this->actionFunc = func_80A99560; } else { - func_8002F434(&this->actor, play, GI_POACHERS_SAW, 120.0f, 10.0f); + Actor_OfferGetItem(&this->actor, play, GI_POACHERS_SAW, 120.0f, 10.0f); } } diff --git a/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c b/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c index c6e67a816b..ec864edfa7 100644 --- a/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c +++ b/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c @@ -330,7 +330,7 @@ void EnKusa_Main(EnKusa* this, PlayState* play) { if (this->actor.xzDistToPlayer < 400.0f) { CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); if (this->actor.xzDistToPlayer < 100.0f) { - func_8002F580(&this->actor, play); + Actor_OfferCarry(&this->actor, play); } } } diff --git a/src/overlays/actors/ovl_En_Kz/z_en_kz.c b/src/overlays/actors/ovl_En_Kz/z_en_kz.c index 71ef568c50..2b42264f38 100644 --- a/src/overlays/actors/ovl_En_Kz/z_en_kz.c +++ b/src/overlays/actors/ovl_En_Kz/z_en_kz.c @@ -376,7 +376,7 @@ void EnKz_SetupMweep(EnKz* this, PlayState* play) { subCamEye.y += -100.0f; subCamEye.z += 260.0f; Play_CameraSetAtEye(play, this->subCamId, &subCamAt, &subCamEye); - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); this->actor.speedXZ = 0.1f; this->actionFunc = EnKz_Mweep; } @@ -408,7 +408,7 @@ void EnKz_Mweep(EnKz* this, PlayState* play) { void EnKz_StopMweep(EnKz* this, PlayState* play) { Play_ChangeCameraStatus(play, this->returnToCamId, CAM_STAT_ACTIVE); Play_ClearCamera(play, this->subCamId); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); this->actionFunc = EnKz_Wait; } @@ -434,7 +434,7 @@ void EnKz_SetupGetItem(EnKz* this, PlayState* play) { getItemId = this->isTrading == true ? GI_EYEBALL_FROG : GI_TUNIC_ZORA; yRange = fabsf(this->actor.yDistToPlayer) + 1.0f; xzRange = this->actor.xzDistToPlayer + 1.0f; - func_8002F434(&this->actor, play, getItemId, xzRange, yRange); + Actor_OfferGetItem(&this->actor, play, getItemId, xzRange, yRange); } } diff --git a/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c b/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c index 8acd12bb51..22795def00 100644 --- a/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c +++ b/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c @@ -96,7 +96,7 @@ void EnLightbox_Update(Actor* thisx, PlayState* play) { thisx->velocity.y *= IREG(60) / 100.0f; thisx->bgCheckFlags &= ~BGCHECKFLAG_GROUND; } else { - func_8002F580(thisx, play); + Actor_OfferCarry(thisx, play); } } } diff --git a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c index 815b02fcf0..3178dc0b97 100644 --- a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c +++ b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c @@ -326,7 +326,7 @@ void func_80AA0EA0(EnMa1* this, PlayState* play) { this->actor.parent = NULL; this->actionFunc = func_80AA0EFC; } else { - func_8002F434(&this->actor, play, GI_WEIRD_EGG, 120.0f, 10.0f); + Actor_OfferGetItem(&this->actor, play, GI_WEIRD_EGG, 120.0f, 10.0f); } } diff --git a/src/overlays/actors/ovl_En_Mb/z_en_mb.c b/src/overlays/actors/ovl_En_Mb/z_en_mb.c index 6d038625a2..6555044df6 100644 --- a/src/overlays/actors/ovl_En_Mb/z_en_mb.c +++ b/src/overlays/actors/ovl_En_Mb/z_en_mb.c @@ -586,7 +586,7 @@ void EnMb_SetupClubDead(EnMb* this) { void EnMb_SetupStunned(EnMb* this) { this->state = ENMB_STATE_STUNNED; this->actor.speedXZ = 0.0f; - Actor_SetColorFilter(&this->actor, 0, 0x78, 0, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 80); if (this->damageEffect == ENMB_DMGEFF_STUN_ICE) { this->iceEffectTimer = 40; } else { @@ -1395,7 +1395,7 @@ void EnMb_CheckColliding(EnMb* this, PlayState* play) { } } else { Actor_ApplyDamage(&this->actor); - Actor_SetColorFilter(&this->actor, 0x4000, 0xFA, 0, 0xC); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 250, COLORFILTER_BUFFLAG_OPA, 12); if (this->actor.params == ENMB_TYPE_CLUB) { if (this->actor.colChkInfo.health == 0) { EnMb_SetupClubDead(this); diff --git a/src/overlays/actors/ovl_En_Mk/z_en_mk.c b/src/overlays/actors/ovl_En_Mk/z_en_mk.c index 1165e06b30..ae9e4b380b 100644 --- a/src/overlays/actors/ovl_En_Mk/z_en_mk.c +++ b/src/overlays/actors/ovl_En_Mk/z_en_mk.c @@ -95,14 +95,14 @@ void func_80AACA94(EnMk* this, PlayState* play) { Interface_SetSubTimer(240); CLEAR_EVENTINF(EVENTINF_MARATHON_ACTIVE); } else { - func_8002F434(&this->actor, play, GI_EYE_DROPS, 10000.0f, 50.0f); + Actor_OfferGetItem(&this->actor, play, GI_EYE_DROPS, 10000.0f, 50.0f); } } void func_80AACB14(EnMk* this, PlayState* play) { if (Actor_TextboxIsClosing(&this->actor, play)) { this->actionFunc = func_80AACA94; - func_8002F434(&this->actor, play, GI_EYE_DROPS, 10000.0f, 50.0f); + Actor_OfferGetItem(&this->actor, play, GI_EYE_DROPS, 10000.0f, 50.0f); } } @@ -196,14 +196,14 @@ void func_80AACFA0(EnMk* this, PlayState* play) { this->actionFunc = func_80AACA40; SET_ITEMGETINF(ITEMGETINF_10); } else { - func_8002F434(&this->actor, play, GI_HEART_PIECE, 10000.0f, 50.0f); + Actor_OfferGetItem(&this->actor, play, GI_HEART_PIECE, 10000.0f, 50.0f); } } void func_80AAD014(EnMk* this, PlayState* play) { if (Actor_TextboxIsClosing(&this->actor, play)) { this->actionFunc = func_80AACFA0; - func_8002F434(&this->actor, play, GI_HEART_PIECE, 10000.0f, 50.0f); + Actor_OfferGetItem(&this->actor, play, GI_HEART_PIECE, 10000.0f, 50.0f); } this->flags |= 1; diff --git a/src/overlays/actors/ovl_En_Ms/z_en_ms.c b/src/overlays/actors/ovl_En_Ms/z_en_ms.c index 8a0b941bb8..32352a75e6 100644 --- a/src/overlays/actors/ovl_En_Ms/z_en_ms.c +++ b/src/overlays/actors/ovl_En_Ms/z_en_ms.c @@ -128,7 +128,7 @@ void EnMs_Talk(EnMs* this, PlayState* play) { Message_ContinueTextbox(play, 0x4069); // not enough rupees text return; } - func_8002F434(&this->actor, play, GI_MAGIC_BEAN, 90.0f, 10.0f); + Actor_OfferGetItem(&this->actor, play, GI_MAGIC_BEAN, 90.0f, 10.0f); this->actionFunc = EnMs_Sell; return; case 1: // no @@ -145,7 +145,7 @@ void EnMs_Sell(EnMs* this, PlayState* play) { this->actor.parent = NULL; this->actionFunc = EnMs_TalkAfterPurchase; } else { - func_8002F434(&this->actor, play, GI_MAGIC_BEAN, 90.0f, 10.0f); + Actor_OfferGetItem(&this->actor, play, GI_MAGIC_BEAN, 90.0f, 10.0f); } } diff --git a/src/overlays/actors/ovl_En_Niw/z_en_niw.c b/src/overlays/actors/ovl_En_Niw/z_en_niw.c index 80a97ee2fa..42ccd0fea7 100644 --- a/src/overlays/actors/ovl_En_Niw/z_en_niw.c +++ b/src/overlays/actors/ovl_En_Niw/z_en_niw.c @@ -465,7 +465,7 @@ void func_80AB6450(EnNiw* this, PlayState* play) { this->actionFunc = func_80AB6BF8; } else { // GI_NONE in this case allows the player to lift the actor - func_8002F434(&this->actor, play, GI_NONE, 25.0f, 10.0f); + Actor_OfferGetItem(&this->actor, play, GI_NONE, 25.0f, 10.0f); func_80AB5BF8(this, play, 1); } } @@ -487,7 +487,7 @@ void func_80AB6570(EnNiw* this, PlayState* play) { this->actionFunc = func_80AB6BF8; return; } - func_8002F580(&this->actor, play); + Actor_OfferCarry(&this->actor, play); } else { if (this->path != 0) { this->unk_2A6 = 1; @@ -696,7 +696,7 @@ void func_80AB6D08(EnNiw* this, PlayState* play) { this->actionFunc = func_80AB6BF8; } else { if (this->timer5 >= 6) { - func_8002F580(&this->actor, play); + Actor_OfferCarry(&this->actor, play); } func_80AB5BF8(this, play, 2); } diff --git a/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c b/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c index ead8bc9d8e..82dcbe918d 100644 --- a/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c +++ b/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c @@ -309,13 +309,13 @@ void func_80ABA654(EnNiwLady* this, PlayState* play) { if (!GET_ITEMGETINF(ITEMGETINF_0C)) { this->actor.parent = NULL; this->getItemId = GI_BOTTLE_EMPTY; - func_8002F434(&this->actor, play, GI_BOTTLE_EMPTY, 100.0f, 50.0f); + Actor_OfferGetItem(&this->actor, play, GI_BOTTLE_EMPTY, 100.0f, 50.0f); this->actionFunc = func_80ABAC00; return; } if (this->unk_26C == 1) { this->getItemId = GI_RUPEE_PURPLE; - func_8002F434(&this->actor, play, GI_RUPEE_PURPLE, 100.0f, 50.0f); + Actor_OfferGetItem(&this->actor, play, GI_RUPEE_PURPLE, 100.0f, 50.0f); this->actionFunc = func_80ABAC00; } this->actionFunc = func_80ABA244; @@ -390,7 +390,7 @@ void func_80ABA9B8(EnNiwLady* this, PlayState* play) { case 0: Message_CloseTextbox(play); this->actor.parent = NULL; - func_8002F434(&this->actor, play, GI_POCKET_EGG, 200.0f, 100.0f); + Actor_OfferGetItem(&this->actor, play, GI_POCKET_EGG, 200.0f, 100.0f); this->actionFunc = func_80ABAC00; break; case 1: @@ -418,7 +418,7 @@ void func_80ABAB08(EnNiwLady* this, PlayState* play) { case 0: Message_CloseTextbox(play); this->actor.parent = NULL; - func_8002F434(&this->actor, play, GI_COJIRO, 200.0f, 100.0f); + Actor_OfferGetItem(&this->actor, play, GI_COJIRO, 200.0f, 100.0f); this->actionFunc = func_80ABAC00; break; case 1: @@ -444,7 +444,7 @@ void func_80ABAC00(EnNiwLady* this, PlayState* play) { if (LINK_IS_ADULT) { getItemId = !GET_ITEMGETINF(ITEMGETINF_2C) ? GI_POCKET_EGG : GI_COJIRO; } - func_8002F434(&this->actor, play, getItemId, 200.0f, 100.0f); + Actor_OfferGetItem(&this->actor, play, getItemId, 200.0f, 100.0f); } } diff --git a/src/overlays/actors/ovl_En_Ny/z_en_ny.c b/src/overlays/actors/ovl_En_Ny/z_en_ny.c index 6f7369698b..b79a3062a4 100644 --- a/src/overlays/actors/ovl_En_Ny/z_en_ny.c +++ b/src/overlays/actors/ovl_En_Ny/z_en_ny.c @@ -315,16 +315,16 @@ s32 EnNy_CollisionCheck(EnNy* this, PlayState* play) { FALLTHROUGH; case 0xF: Actor_ApplyDamage(&this->actor); - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0x2000, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_XLU, 80); break; case 1: Actor_ApplyDamage(&this->actor); - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0x2000, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_XLU, 80); break; case 2: this->unk_1CA = 4; Actor_ApplyDamage(&this->actor); - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0x2000, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_XLU, 80); break; } } diff --git a/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c b/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c index a858d7be26..f504310bb6 100644 --- a/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c +++ b/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c @@ -240,7 +240,7 @@ void EnOkuta_SetupShoot(EnOkuta* this, PlayState* play) { void EnOkuta_SetupWaitToDie(EnOkuta* this) { Animation_MorphToPlayOnce(&this->skelAnime, &gOctorokHitAnim, -5.0f); - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 0xB); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 11); this->collider.base.acFlags &= ~AC_HIT; Actor_SetScale(&this->actor, 0.01f); Audio_PlayActorSfx2(&this->actor, NA_SE_EN_OCTAROCK_DEAD1); @@ -255,7 +255,7 @@ void EnOkuta_SetupDie(EnOkuta* this) { void EnOkuta_SetupFreeze(EnOkuta* this) { this->timer = 80; - Actor_SetColorFilter(&this->actor, 0, 0xFF, 0, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 80); this->actionFunc = EnOkuta_Freeze; } diff --git a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c index c587270062..274164c669 100644 --- a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c +++ b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c @@ -1133,7 +1133,7 @@ s32 EnOssan_HasPlayerSelectedItem(PlayState* play, EnOssan* this, Input* input) case SI_MILK_BOTTLE: func_80078884(NA_SE_SY_DECIDE); this->drawCursor = 0; - this->stateFlag = OSSAN_STATE_SELECT_ITEM_MILK_BOTTLE; + this->stateFlag = OSSAN_STATE_SELECT_ITEM_BOTTLE_MILK_FULL; return true; case SI_WEIRD_EGG: func_80078884(NA_SE_SY_DECIDE); @@ -1318,7 +1318,7 @@ void EnOssan_GiveItemWithFanfare(PlayState* play, EnOssan* this) { Player* player = GET_PLAYER(play); osSyncPrintf("\n" VT_FGCOL(YELLOW) "初めて手にいれた!!" VT_RST "\n\n"); - func_8002F434(&this->actor, play, this->shelfSlots[this->cursorIndex]->getItemId, 120.0f, 120.0f); + Actor_OfferGetItem(&this->actor, play, this->shelfSlots[this->cursorIndex]->getItemId, 120.0f, 120.0f); play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING; play->msgCtx.stateTimer = 4; player->stateFlags2 &= ~PLAYER_STATE2_29; @@ -1649,7 +1649,7 @@ void EnOssan_State_GiveItemWithFanfare(EnOssan* this, PlayState* play, Player* p this->stateFlag = OSSAN_STATE_ITEM_PURCHASED; return; } - func_8002F434(&this->actor, play, this->shelfSlots[this->cursorIndex]->getItemId, 120.0f, 120.0f); + Actor_OfferGetItem(&this->actor, play, this->shelfSlots[this->cursorIndex]->getItemId, 120.0f, 120.0f); } void EnOssan_State_ItemPurchased(EnOssan* this, PlayState* play, Player* player) { @@ -1840,7 +1840,8 @@ void EnOssan_UpdateItemSelectedProperty(EnOssan* this) { for (i = 0; i < 8; i++) { if (temp_a1[0] != NULL) { - if (this->stateFlag != OSSAN_STATE_SELECT_ITEM && this->stateFlag != OSSAN_STATE_SELECT_ITEM_MILK_BOTTLE && + if (this->stateFlag != OSSAN_STATE_SELECT_ITEM && + this->stateFlag != OSSAN_STATE_SELECT_ITEM_BOTTLE_MILK_FULL && this->stateFlag != OSSAN_STATE_SELECT_ITEM_WEIRD_EGG && this->stateFlag != OSSAN_STATE_SELECT_ITEM_UNIMPLEMENTED && this->stateFlag != OSSAN_STATE_SELECT_ITEM_BOMBS && this->stateFlag != OSSAN_STATE_SELECT_ITEM_MASK && diff --git a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.h b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.h index f59a7943b0..03538fbb6e 100644 --- a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.h +++ b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.h @@ -108,7 +108,7 @@ typedef enum { /* 07 */ OSSAN_STATE_BROWSE_RIGHT_SHELF, /* 08 */ OSSAN_STATE_LOOK_SHOPKEEPER, // From looking at shelf /* 09 */ OSSAN_STATE_SELECT_ITEM, // Select most items - /* 10 */ OSSAN_STATE_SELECT_ITEM_MILK_BOTTLE, + /* 10 */ OSSAN_STATE_SELECT_ITEM_BOTTLE_MILK_FULL, /* 11 */ OSSAN_STATE_SELECT_ITEM_WEIRD_EGG, /* 12 */ OSSAN_STATE_SELECT_ITEM_UNIMPLEMENTED, // Handles two unfinished shop items /* 13 */ OSSAN_STATE_SELECT_ITEM_BOMBS, diff --git a/src/overlays/actors/ovl_En_Owl/z_en_owl.c b/src/overlays/actors/ovl_En_Owl/z_en_owl.c index c63e5c5662..0d3efe9792 100644 --- a/src/overlays/actors/ovl_En_Owl/z_en_owl.c +++ b/src/overlays/actors/ovl_En_Owl/z_en_owl.c @@ -337,7 +337,7 @@ void func_80ACA71C(EnOwl* this) { } void func_80ACA76C(EnOwl* this, PlayState* play) { - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); if (Actor_TextboxIsClosing(&this->actor, play)) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0); @@ -347,7 +347,7 @@ void func_80ACA76C(EnOwl* this, PlayState* play) { } void func_80ACA7E0(EnOwl* this, PlayState* play) { - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); if (Actor_TextboxIsClosing(&this->actor, play)) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0); @@ -547,7 +547,7 @@ void EnOwl_WaitLakeHylia(EnOwl* this, PlayState* play) { } void func_80ACB03C(EnOwl* this, PlayState* play) { - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); if (Actor_TextboxIsClosing(&this->actor, play)) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0); diff --git a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c index 39db464655..2fd1696e9b 100644 --- a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c +++ b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c @@ -772,7 +772,7 @@ void EnPeehat_SetStateBoomerangStunned(EnPeehat* this) { } this->bladeRotVel = 0; this->actor.world.rot.y = this->actor.yawTowardsPlayer; - Actor_SetColorFilter(&this->actor, 0, 200, 0, 80); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 200, COLORFILTER_BUFFLAG_OPA, 80); Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GOMA_JR_FREEZE); EnPeehat_SetupAction(this, EnPeehat_StateBoomerangStunned); } @@ -789,7 +789,7 @@ void EnPeehat_Adult_SetStateDie(EnPeehat* this) { this->bladeRotVel = 0; this->isStateDieFirstUpdate = 1; this->actor.speedXZ = 0.0f; - Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 8); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8); this->state = PEAHAT_STATE_DYING; this->scaleShift = 0.0f; this->actor.world.rot.y = this->actor.yawTowardsPlayer; @@ -894,7 +894,7 @@ void EnPeehat_Adult_CollisionCheck(EnPeehat* this, PlayState* play) { return; } else { Actor_ApplyDamage(&this->actor); - Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 8); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8); Audio_PlayActorSfx2(&this->actor, NA_SE_EN_PIHAT_DAMAGE); } @@ -907,7 +907,7 @@ void EnPeehat_Adult_CollisionCheck(EnPeehat* this, PlayState* play) { pos.z = Rand_CenteredFloat(20.0f) + this->actor.world.pos.z; EffectSsEnFire_SpawnVec3f(play, &this->actor, &pos, 70, 0, 0, -1); } - Actor_SetColorFilter(&this->actor, 0x4000, 200, 0, 100); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 200, COLORFILTER_BUFFLAG_OPA, 100); } if (this->actor.colChkInfo.health == 0) { EnPeehat_Adult_SetStateDie(this); diff --git a/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c b/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c index 46f118b95e..3c879deda6 100644 --- a/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c +++ b/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c @@ -270,7 +270,7 @@ void EnPoField_SetupDamage(EnPoField* this) { } this->collider.base.acFlags &= ~(AC_HIT | AC_ON); this->actor.speedXZ = 5.0f; - Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 16); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 16); this->actionFunc = EnPoField_Damage; } diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index 3e56568ed9..0880704528 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -309,7 +309,7 @@ void func_80AD95D8(EnPoSisters* this) { this->actor.speedXZ = 10.0f; } this->unk_199 &= ~0xB; - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 0x10); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 16); this->actionFunc = func_80ADAAA4; } diff --git a/src/overlays/actors/ovl_En_Poh/z_en_poh.c b/src/overlays/actors/ovl_En_Poh/z_en_poh.c index 135126ca92..1b77a42ff5 100644 --- a/src/overlays/actors/ovl_En_Poh/z_en_poh.c +++ b/src/overlays/actors/ovl_En_Poh/z_en_poh.c @@ -300,7 +300,7 @@ void func_80ADE28C(EnPoh* this) { } this->colliderCyl.base.acFlags &= ~AC_ON; this->actor.speedXZ = 5.0f; - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 0x10); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 16); this->actionFunc = func_80ADEECC; } diff --git a/src/overlays/actors/ovl_En_Rd/z_en_rd.c b/src/overlays/actors/ovl_En_Rd/z_en_rd.c index 0541e94678..8c11e31b73 100644 --- a/src/overlays/actors/ovl_En_Rd/z_en_rd.c +++ b/src/overlays/actors/ovl_En_Rd/z_en_rd.c @@ -729,12 +729,13 @@ void EnRd_SetupStunned(EnRd* this) { this->stunnedBySunsSong = true; this->sunsSongStunTimer = 600; Audio_PlayActorSfx2(&this->actor, NA_SE_EN_LIGHT_ARROW_HIT); - Actor_SetColorFilter(&this->actor, -0x8000, -0x7F38, 0, 0xFF); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_GRAY, COLORFILTER_INTENSITY_FLAG | 200, + COLORFILTER_BUFFLAG_OPA, 255); } else if (this->damageEffect == REDEAD_DMGEFF_HOOKSHOT) { - Actor_SetColorFilter(&this->actor, 0, 0xC8, 0, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 200, COLORFILTER_BUFFLAG_OPA, 80); } else { Audio_PlayActorSfx2(&this->actor, NA_SE_EN_LIGHT_ARROW_HIT); - Actor_SetColorFilter(&this->actor, -0x8000, 0xC8, 0, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_GRAY, 200, COLORFILTER_BUFFLAG_OPA, 80); } EnRd_SetupAction(this, EnRd_Stunned); @@ -744,7 +745,7 @@ void EnRd_Stunned(EnRd* this, PlayState* play) { if (this->stunnedBySunsSong && (this->sunsSongStunTimer != 0)) { this->sunsSongStunTimer--; if (this->sunsSongStunTimer >= 255) { - Actor_SetColorFilter(&this->actor, -0x8000, 0xC8, 0, 0xFF); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_GRAY, 200, COLORFILTER_BUFFLAG_OPA, 255); } if (this->sunsSongStunTimer == 0) { @@ -818,10 +819,10 @@ void EnRd_UpdateDamage(EnRd* this, PlayState* play) { this->sunsSongStunTimer = 0; if (this->damageEffect == REDEAD_DMGEFF_FIRE_MAGIC) { - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 80); this->fireTimer = 40; } else { - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8); } Actor_ApplyDamage(&this->actor); diff --git a/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c b/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c index 1e30b627b2..8c35650ac0 100644 --- a/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c +++ b/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c @@ -355,7 +355,7 @@ void func_80AE57F0(EnReeba* this, PlayState* play) { this->unk_276 = 14; this->actor.speedXZ = -8.0f; this->actor.world.rot.y = this->actor.yawTowardsPlayer; - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8); this->actionfunc = func_80AE5854; } @@ -446,7 +446,7 @@ void func_80AE5A9C(EnReeba* this, PlayState* play) { void func_80AE5BC4(EnReeba* this, PlayState* play) { this->actor.speedXZ = -8.0f; this->actor.world.rot.y = this->actor.yawTowardsPlayer; - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8); this->unk_278 = 14; this->actor.flags &= ~ACTOR_FLAG_0; this->actionfunc = func_80AE5C38; @@ -528,7 +528,8 @@ void func_80AE5EDC(EnReeba* this, PlayState* play) { if ((this->actor.colChkInfo.health > 1) && (this->unk_27E != 4)) { this->unk_27E = 4; Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GOMA_JR_FREEZE); - Actor_SetColorFilter(&this->actor, 0, 0xFF, 0, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, + 80); this->actionfunc = func_80AE58EC; break; } @@ -536,7 +537,8 @@ void func_80AE5EDC(EnReeba* this, PlayState* play) { case 13: // hookshot/longshot if ((this->actor.colChkInfo.health > 2) && (this->unk_27E != 4)) { this->unk_27E = 4; - Actor_SetColorFilter(&this->actor, 0, 0xFF, 0, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, + 80); Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GOMA_JR_FREEZE); this->actionfunc = func_80AE58EC; break; @@ -561,13 +563,14 @@ void func_80AE5EDC(EnReeba* this, PlayState* play) { Actor_ApplyDamage(&this->actor); this->unk_27C = 2; this->unk_27E = 2; - Actor_SetColorFilter(&this->actor, 0, 0xFF, 0, 80); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 80); this->actionfunc = func_80AE58EC; break; case 1: // unknown if (this->unk_27E != 4) { this->unk_27E = 4; - Actor_SetColorFilter(&this->actor, 0, 0xFF, 0, 80); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, + 80); this->actionfunc = func_80AE58EC; } break; diff --git a/src/overlays/actors/ovl_En_Rr/z_en_rr.c b/src/overlays/actors/ovl_En_Rr/z_en_rr.c index 4d762f8474..5018c82a29 100644 --- a/src/overlays/actors/ovl_En_Rr/z_en_rr.c +++ b/src/overlays/actors/ovl_En_Rr/z_en_rr.c @@ -453,7 +453,8 @@ void EnRr_CollisionCheck(EnRr* this, PlayState* play) { this->stopScroll = false; Actor_ApplyDamage(&this->actor); this->invincibilityTimer = 40; - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0x2000, this->invincibilityTimer); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_XLU, + this->invincibilityTimer); if (this->hasPlayer) { EnRr_SetupReleasePlayer(this, play); } else if (this->actor.colChkInfo.health != 0) { @@ -468,7 +469,7 @@ void EnRr_CollisionCheck(EnRr* this, PlayState* play) { if (this->actor.colChkInfo.health == 0) { this->dropType = RR_DROP_RANDOM_RUPEE; } - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0x2000, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_XLU, 80); this->effectTimer = 20; EnRr_SetupStunned(this); return; @@ -479,7 +480,8 @@ void EnRr_CollisionCheck(EnRr* this, PlayState* play) { } if (this->actor.colorFilterTimer == 0) { this->effectTimer = 20; - Actor_SetColorFilter(&this->actor, 0, 0xFF, 0x2000, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_XLU, + 80); } EnRr_SetupStunned(this); return; @@ -488,12 +490,12 @@ void EnRr_CollisionCheck(EnRr* this, PlayState* play) { if (this->actor.colChkInfo.health == 0) { this->dropType = RR_DROP_RUPEE_RED; } - Actor_SetColorFilter(&this->actor, -0x8000, 0xFF, 0x2000, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_GRAY, 255, COLORFILTER_BUFFLAG_XLU, 80); EnRr_SetupStunned(this); return; case RR_DMG_STUN: // Boomerang and Hookshot Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GOMA_JR_FREEZE); - Actor_SetColorFilter(&this->actor, 0, 0xFF, 0x2000, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_XLU, 80); EnRr_SetupStunned(this); return; } 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 e10a3efaf5..af08b7f943 100644 --- a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c +++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c @@ -1574,7 +1574,7 @@ void func_80AEE568(EnRu1* this, PlayState* play) { if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && (this->actor.speedXZ == 0.0f) && (this->actor.minVelocityY == 0.0f)) { func_80AEE02C(this); - func_8002F580(&this->actor, play); + Actor_OfferCarry(&this->actor, play); this->action = 27; func_80AEADD8(this); } else if (this->actor.yDistToWater > 0.0f) { @@ -1675,7 +1675,7 @@ void func_80AEE7C4(EnRu1* this, PlayState* play) { s32 func_80AEEAC8(EnRu1* this, PlayState* play) { if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) { func_80AEE02C(this); - func_8002F580(&this->actor, play); + Actor_OfferCarry(&this->actor, play); this->action = 27; func_80AEADD8(this); return true; @@ -1693,7 +1693,7 @@ void func_80AEEB24(EnRu1* this, PlayState* play) { } void func_80AEEBB4(EnRu1* this, PlayState* play) { - func_8002F580(&this->actor, play); + Actor_OfferCarry(&this->actor, play); } void func_80AEEBD4(EnRu1* this, PlayState* play) { @@ -1845,7 +1845,7 @@ void func_80AEF1F0(EnRu1* this, PlayState* play, UNK_TYPE arg2) { Message_CloseTextbox(play); SET_INFTABLE(INFTABLE_143); func_80AED6DC(this, play); - func_8002F580(&this->actor, play); + Actor_OfferCarry(&this->actor, play); this->action = 27; func_80AEADD8(this); } diff --git a/src/overlays/actors/ovl_En_Sb/z_en_sb.c b/src/overlays/actors/ovl_En_Sb/z_en_sb.c index 12444af28d..61a47d1574 100644 --- a/src/overlays/actors/ovl_En_Sb/z_en_sb.c +++ b/src/overlays/actors/ovl_En_Sb/z_en_sb.c @@ -392,7 +392,7 @@ s32 EnSb_UpdateDamage(EnSb* this, PlayState* play) { yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y; if ((hitY < 30.0f) && (hitY > 10.0f) && (yawDiff >= -0x1FFF) && (yawDiff < 0x2000)) { Actor_ApplyDamage(&this->actor); - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0x2000, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_XLU, 80); tookDamage = true; } } @@ -400,7 +400,7 @@ s32 EnSb_UpdateDamage(EnSb* this, PlayState* play) { case 2: // fire arrow, dins fire this->fire = 4; Actor_ApplyDamage(&this->actor); - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0x2000, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_XLU, 80); tookDamage = true; break; case 1: // hookshot/longshot @@ -410,7 +410,7 @@ s32 EnSb_UpdateDamage(EnSb* this, PlayState* play) { yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y; if ((hitY < 30.0f) && (hitY > 10.0f) && (yawDiff >= -0x1FFF) && (yawDiff < 0x2000)) { Actor_ApplyDamage(&this->actor); - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0x2000, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_XLU, 80); tookDamage = true; EnSb_SetupCooldown(this, 0); } diff --git a/src/overlays/actors/ovl_En_Skb/z_en_skb.c b/src/overlays/actors/ovl_En_Skb/z_en_skb.c index 6c33e545cf..bf5ebbb12e 100644 --- a/src/overlays/actors/ovl_En_Skb/z_en_skb.c +++ b/src/overlays/actors/ovl_En_Skb/z_en_skb.c @@ -463,7 +463,8 @@ void EnSkb_CheckDamage(EnSkb* this, PlayState* play) { this->setColliderAT = false; if (this->actor.colChkInfo.damageEffect == 1) { if (this->actionState != SKB_BEHAVIOR_STUNNED) { - Actor_SetColorFilter(&this->actor, 0, 0x78, 0, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, + 80); Actor_ApplyDamage(&this->actor); EnSkb_SetupStunned(this); } @@ -480,7 +481,8 @@ void EnSkb_CheckDamage(EnSkb* this, PlayState* play) { } colorFilterDuration = 25; } - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, colorFilterDuration); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, + colorFilterDuration); if (!Actor_ApplyDamage(&this->actor)) { EnSkb_SetupDeath(this, play); return; diff --git a/src/overlays/actors/ovl_En_Skj/z_en_skj.c b/src/overlays/actors/ovl_En_Skj/z_en_skj.c index 9f236e43d4..8bcc7261d7 100644 --- a/src/overlays/actors/ovl_En_Skj/z_en_skj.c +++ b/src/overlays/actors/ovl_En_Skj/z_en_skj.c @@ -591,14 +591,14 @@ s32 EnSkj_CollisionCheck(EnSkj* this, PlayState* play) { yawDiff = this->actor.yawTowardsPlayer - this->actor.world.rot.y; if ((this->action == 2) || (this->action == 6)) { if ((yawDiff > 0x6000) || (yawDiff < -0x6000)) { - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8); EnSkj_SetupDie(this); return 1; } } Actor_ApplyDamage(&this->actor); - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8); if (this->actor.colChkInfo.health != 0) { if (this->hitsUntilDodge != 0) { @@ -1036,7 +1036,8 @@ void EnSkj_SariaSongTalk(EnSkj* this, PlayState* play) { EnSkj_SetupWaitInRange(this); } else { func_80AFFE24(this); - func_8002F434(&this->actor, play, GI_HEART_PIECE, EnSkj_GetItemXzRange(this), EnSkj_GetItemYRange(this)); + Actor_OfferGetItem(&this->actor, play, GI_HEART_PIECE, EnSkj_GetItemXzRange(this), + EnSkj_GetItemYRange(this)); } } } @@ -1050,7 +1051,7 @@ void func_80AFFE44(EnSkj* this, PlayState* play) { this->actor.parent = NULL; EnSkj_SetupPostSariasSong(this); } else { - func_8002F434(&this->actor, play, GI_HEART_PIECE, EnSkj_GetItemXzRange(this), EnSkj_GetItemYRange(this)); + Actor_OfferGetItem(&this->actor, play, GI_HEART_PIECE, EnSkj_GetItemXzRange(this), EnSkj_GetItemYRange(this)); } } @@ -1073,7 +1074,7 @@ void EnSkj_SetupMaskTrade(EnSkj* this) { void EnSkj_StartMaskTrade(EnSkj* this, PlayState* play) { u8 sp1F = Message_GetState(&play->msgCtx); - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); if ((sp1F == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) { EnSkj_JumpFromStump(this); } @@ -1171,7 +1172,7 @@ void EnSkj_SetupWaitForMaskTextClear(EnSkj* this) { void EnSkj_WaitForMaskTextClear(EnSkj* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) { - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); this->backflipFlag = 1; EnSkj_Backflip(this); } @@ -1528,7 +1529,7 @@ void EnSkj_WonOcarinaMiniGame(EnSkj* this, PlayState* play) { void EnSkj_WaitToGiveReward(EnSkj* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) { - func_8002F434(&this->actor, play, sOcarinaGameRewards[gSaveContext.ocarinaGameRoundNum], 26.0f, 26.0f); + Actor_OfferGetItem(&this->actor, play, sOcarinaGameRewards[gSaveContext.ocarinaGameRoundNum], 26.0f, 26.0f); this->actionFunc = EnSkj_GiveOcarinaGameReward; } } @@ -1538,7 +1539,7 @@ void EnSkj_GiveOcarinaGameReward(EnSkj* this, PlayState* play) { this->actor.parent = NULL; this->actionFunc = EnSkj_FinishOcarinaGameRound; } else { - func_8002F434(&this->actor, play, sOcarinaGameRewards[gSaveContext.ocarinaGameRoundNum], 26.0f, 26.0f); + Actor_OfferGetItem(&this->actor, play, sOcarinaGameRewards[gSaveContext.ocarinaGameRoundNum], 26.0f, 26.0f); } } diff --git a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c index d7f924e295..328a818701 100644 --- a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c +++ b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c @@ -291,7 +291,7 @@ void EnSsh_SetColliderScale(EnSsh* this, f32 scale, f32 radiusMod) { s32 EnSsh_Damaged(EnSsh* this) { if ((this->stunTimer == 120) && (this->stateFlags & SSH_STATE_STUNNED)) { - Actor_SetColorFilter(&this->actor, 0, 0xC8, 0, this->stunTimer); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 200, COLORFILTER_BUFFLAG_OPA, this->stunTimer); } if (DECR(this->stunTimer) != 0) { Math_SmoothStepToS(&this->maxTurnRate, 0x2710, 0xA, 0x3E8, 1); diff --git a/src/overlays/actors/ovl_En_St/z_en_st.c b/src/overlays/actors/ovl_En_St/z_en_st.c index 779acf551f..a28b7a4af4 100644 --- a/src/overlays/actors/ovl_En_St/z_en_st.c +++ b/src/overlays/actors/ovl_En_St/z_en_st.c @@ -450,7 +450,8 @@ s32 EnSt_CheckHitBackside(EnSt* this, PlayState* play) { if (this->stunTimer == 0) { Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GOMA_JR_FREEZE); this->stunTimer = 120; - Actor_SetColorFilter(&this->actor, 0, 0xC8, 0, this->stunTimer); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 200, COLORFILTER_BUFFLAG_OPA, + this->stunTimer); } return false; } @@ -459,7 +460,8 @@ s32 EnSt_CheckHitBackside(EnSt* this, PlayState* play) { this->gaveDamageSpinTimer = 1; Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENST_ANIM_3); this->takeDamageSpinTimer = this->skelAnime.animLength; - Actor_SetColorFilter(&this->actor, 0x4000, 0xC8, 0, this->takeDamageSpinTimer); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 200, COLORFILTER_BUFFLAG_OPA, + this->takeDamageSpinTimer); if (Actor_ApplyDamage(&this->actor)) { Audio_PlayActorSfx2(&this->actor, NA_SE_EN_STALTU_DAMAGE); return false; diff --git a/src/overlays/actors/ovl_En_Sth/z_en_sth.c b/src/overlays/actors/ovl_En_Sth/z_en_sth.c index d25459f90a..c84643eec4 100644 --- a/src/overlays/actors/ovl_En_Sth/z_en_sth.c +++ b/src/overlays/actors/ovl_En_Sth/z_en_sth.c @@ -250,7 +250,7 @@ void EnSth_GivePlayerItem(EnSth* this, PlayState* play) { break; } - func_8002F434(&this->actor, play, getItemId, 10000.0f, 50.0f); + Actor_OfferGetItem(&this->actor, play, getItemId, 10000.0f, 50.0f); } void EnSth_GiveReward(EnSth* this, PlayState* play) { 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 dbdff8d381..97ad08045d 100644 --- a/src/overlays/actors/ovl_En_Sw/z_en_sw.c +++ b/src/overlays/actors/ovl_En_Sw/z_en_sw.c @@ -329,7 +329,7 @@ s32 func_80B0C9F0(EnSw* this, PlayState* play) { if ((this->collider.base.acFlags & AC_HIT) || phi_v1) { this->collider.base.acFlags &= ~AC_HIT; this->unk_392 = 0x10; - Actor_SetColorFilter(&this->actor, 0x4000, 0xC8, 0, this->unk_392); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 200, COLORFILTER_BUFFLAG_OPA, this->unk_392); if (Actor_ApplyDamage(&this->actor) != 0) { Audio_PlayActorSfx2(&this->actor, NA_SE_EN_STALTU_DAMAGE); return true; diff --git a/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c b/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c index 85a95a216b..288ea4bb76 100644 --- a/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c +++ b/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c @@ -365,7 +365,7 @@ void EnSyatekiMan_EndGame(EnSyatekiMan* this, PlayState* play) { this->getItemId = GI_RUPEE_PURPLE; } } - func_8002F434(&this->actor, play, this->getItemId, 2000.0f, 1000.0f); + Actor_OfferGetItem(&this->actor, play, this->getItemId, 2000.0f, 1000.0f); this->actionFunc = EnSyatekiMan_GivePrize; break; case SYATEKI_RESULT_ALMOST: @@ -394,7 +394,7 @@ void EnSyatekiMan_GivePrize(EnSyatekiMan* this, PlayState* play) { if (Actor_HasParent(&this->actor, play)) { this->actionFunc = EnSyatekiMan_FinishPrize; } else { - func_8002F434(&this->actor, play, this->getItemId, 2000.0f, 1000.0f); + Actor_OfferGetItem(&this->actor, play, this->getItemId, 2000.0f, 1000.0f); } } diff --git a/src/overlays/actors/ovl_En_Ta/z_en_ta.c b/src/overlays/actors/ovl_En_Ta/z_en_ta.c index 9d15dfba08..5fdafd34e4 100644 --- a/src/overlays/actors/ovl_En_Ta/z_en_ta.c +++ b/src/overlays/actors/ovl_En_Ta/z_en_ta.c @@ -757,7 +757,7 @@ void EnTa_RunCuccoGame(EnTa* this, PlayState* play) { case 1: // Last cucco found, end the game gSaveContext.timerState = TIMER_STATE_OFF; - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); Message_StartTextbox(play, 0x2084, &this->actor); this->actionFunc = EnTa_TalkCuccoGameEnd; @@ -805,7 +805,7 @@ void EnTa_RunCuccoGame(EnTa* this, PlayState* play) { this->stateFlags &= ~TALON_STATE_FLAG_RESTORE_BGM_ON_DESTROY; func_80078884(NA_SE_SY_FOUND); gSaveContext.timerState = TIMER_STATE_OFF; - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); // Time's up text Message_StartTextbox(play, 0x2081, &this->actor); @@ -868,7 +868,7 @@ void EnTa_ThrowSuperCuccos(EnTa* this, PlayState* play) { Animation_Change(&this->skelAnime, &gTalonSitWakeUpAnim, 1.0f, Animation_GetLastFrame(&gTalonSitWakeUpAnim) - 1.0f, Animation_GetLastFrame(&gTalonSitWakeUpAnim), ANIMMODE_ONCE, 10.0f); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); } } @@ -885,7 +885,7 @@ void EnTa_StartingCuccoGame3(EnTa* this, PlayState* play) { func_800F5ACC(NA_BGM_TIMED_MINI_GAME); this->stateFlags |= TALON_STATE_FLAG_RESTORE_BGM_ON_DESTROY; Message_CloseTextbox(play); - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); } if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) { @@ -945,9 +945,9 @@ void EnTa_GiveItemInLonLonHouse(EnTa* this, PlayState* play) { } this->stateFlags &= ~TALON_STATE_FLAG_GIVING_MILK_REFILL; } else if (this->stateFlags & TALON_STATE_FLAG_GIVING_MILK_REFILL) { - func_8002F434(&this->actor, play, GI_MILK, 10000.0f, 50.0f); + Actor_OfferGetItem(&this->actor, play, GI_MILK, 10000.0f, 50.0f); } else { - func_8002F434(&this->actor, play, GI_BOTTLE_MILK_FULL, 10000.0f, 50.0f); + Actor_OfferGetItem(&this->actor, play, GI_BOTTLE_MILK_FULL, 10000.0f, 50.0f); } this->stateFlags |= TALON_STATE_FLAG_TRACKING_PLAYER; } @@ -957,7 +957,7 @@ void EnTa_TalkAfterCuccoGameFirstWon(EnTa* this, PlayState* play) { Message_CloseTextbox(play); this->stateFlags &= ~TALON_STATE_FLAG_GIVING_MILK_REFILL; EnTa_SetupAction(this, EnTa_GiveItemInLonLonHouse, EnTa_AnimRunToEnd); - func_8002F434(&this->actor, play, GI_BOTTLE_MILK_FULL, 10000.0f, 50.0f); + Actor_OfferGetItem(&this->actor, play, GI_BOTTLE_MILK_FULL, 10000.0f, 50.0f); } } @@ -980,7 +980,7 @@ void EnTa_WaitBuyMilkOrPlayCuccoGameResponse(EnTa* this, PlayState* play) { this->stateFlags |= TALON_STATE_FLAG_GIVING_MILK_REFILL; EnTa_SetupAction(this, EnTa_GiveItemInLonLonHouse, EnTa_AnimRunToEnd); Rupees_ChangeBy(-30); - func_8002F434(&this->actor, play, GI_MILK, 10000.0f, 50.0f); + Actor_OfferGetItem(&this->actor, play, GI_MILK, 10000.0f, 50.0f); break; } break; @@ -1077,7 +1077,7 @@ void EnTa_TalkAfterCuccoGameWon(EnTa* this, PlayState* play) { Message_CloseTextbox(play); this->stateFlags |= TALON_STATE_FLAG_GIVING_MILK_REFILL; EnTa_SetupAction(this, EnTa_GiveItemInLonLonHouse, EnTa_AnimRunToEnd); - func_8002F434(&this->actor, play, GI_MILK, 10000.0f, 50.0f); + Actor_OfferGetItem(&this->actor, play, GI_MILK, 10000.0f, 50.0f); } else { Message_ContinueTextbox(play, 0x208A); EnTa_SetupAction(this, EnTa_TalkGeneralInLonLonHouse, EnTa_AnimRunToEnd); diff --git a/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c b/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c index 6655382313..b5ed0c59fb 100644 --- a/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c +++ b/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c @@ -135,7 +135,7 @@ void func_80B17934(EnTakaraMan* this, PlayState* play) { Rupees_ChangeBy(-10); this->unk_214 = 1; this->actor.parent = NULL; - func_8002F434(&this->actor, play, GI_DOOR_KEY, 2000.0f, 1000.0f); + Actor_OfferGetItem(&this->actor, play, GI_DOOR_KEY, 2000.0f, 1000.0f); this->actionFunc = func_80B17A6C; } else { Message_CloseTextbox(play); @@ -160,7 +160,7 @@ void func_80B17A6C(EnTakaraMan* this, PlayState* play) { if (Actor_HasParent(&this->actor, play)) { this->actionFunc = func_80B17AC4; } else { - func_8002F434(&this->actor, play, GI_DOOR_KEY, 2000.0f, 1000.0f); + Actor_OfferGetItem(&this->actor, play, GI_DOOR_KEY, 2000.0f, 1000.0f); } } diff --git a/src/overlays/actors/ovl_En_Test/z_en_test.c b/src/overlays/actors/ovl_En_Test/z_en_test.c index 815a5479a7..3a1b45b420 100644 --- a/src/overlays/actors/ovl_En_Test/z_en_test.c +++ b/src/overlays/actors/ovl_En_Test/z_en_test.c @@ -1211,7 +1211,7 @@ void func_80862154(EnTest* this) { Audio_PlayActorSfx2(&this->actor, NA_SE_EN_STAL_DAMAGE); this->unk_7C8 = 8; this->actor.speedXZ = -2.0f; - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8); EnTest_SetupAction(this, func_808621D4); } @@ -1255,7 +1255,7 @@ void func_80862398(EnTest* this) { Audio_PlayActorSfx2(&this->actor, NA_SE_EN_STAL_DAMAGE); this->unk_7C8 = 9; this->actor.speedXZ = -2.0f; - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8); EnTest_SetupAction(this, func_80862418); } @@ -1298,9 +1298,9 @@ void EnTest_SetupStunned(EnTest* this) { this->actor.speedXZ = -4.0f; if (this->lastDamageEffect == STALFOS_DMGEFF_LIGHT) { - Actor_SetColorFilter(&this->actor, -0x8000, 0x78, 0, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_GRAY, 120, COLORFILTER_BUFFLAG_OPA, 80); } else { - Actor_SetColorFilter(&this->actor, 0, 0x78, 0, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 80); if (this->lastDamageEffect == STALFOS_DMGEFF_FREEZE) { this->iceTimer = 36; diff --git a/src/overlays/actors/ovl_En_Tite/z_en_tite.c b/src/overlays/actors/ovl_En_Tite/z_en_tite.c index 625982c6bc..13c80a9759 100644 --- a/src/overlays/actors/ovl_En_Tite/z_en_tite.c +++ b/src/overlays/actors/ovl_En_Tite/z_en_tite.c @@ -856,14 +856,14 @@ void EnTite_CheckDamage(Actor* thisx, PlayState* play) { // Stun if Tektite hit by nut, boomerang, hookshot, ice arrow or ice magic if ((thisx->colChkInfo.damageEffect == 1) || (thisx->colChkInfo.damageEffect == 0xF)) { if (this->action != TEKTITE_STUNNED) { - Actor_SetColorFilter(thisx, 0, 0x78, 0, 0x50); + Actor_SetColorFilter(thisx, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 80); Actor_ApplyDamage(thisx); EnTite_SetupStunned(this); } // Otherwise apply damage and handle death where necessary } else { if ((thisx->colorFilterTimer == 0) || ((thisx->colorFilterParams & 0x4000) == 0)) { - Actor_SetColorFilter(thisx, 0x4000, 0xFF, 0, 8); + Actor_SetColorFilter(thisx, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8); Actor_ApplyDamage(thisx); } if (thisx->colChkInfo.health == 0) { diff --git a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c index e00d4a861e..db79e6f9dd 100644 --- a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c +++ b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c @@ -562,7 +562,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) { // Handles Dark Link being damaged if ((this->actor.colChkInfo.health == 0) && sDeathFlag) { - this->csMode = 0x18; + this->csMode = PLAYER_CSMODE_24; this->unk_448 = &player->actor; this->doorBgCamIndex = 1; sDeathFlag = false; @@ -588,9 +588,9 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) { func_800F5ACC(NA_BGM_MINI_BOSS); if (this->actor.colChkInfo.damageEffect == 1) { if (sAlpha == 255) { - Actor_SetColorFilter(&this->actor, 0, 0xFF, 0, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 80); } else { - Actor_SetColorFilter(&this->actor, 0, 0xFF, 0x2000, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_XLU, 80); } } else { this->actor.flags &= ~ACTOR_FLAG_0; @@ -604,9 +604,9 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) { this->stateFlags3 |= PLAYER_STATE3_0; sActionState = ENTORCH2_DAMAGE; if (sAlpha == 255) { - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 0xC); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 12); } else { - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0x2000, 0xC); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_XLU, 12); } } } diff --git a/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c b/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c index e263094710..2856fb0268 100644 --- a/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c +++ b/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c @@ -311,7 +311,7 @@ void func_80B20768(EnToryo* this, PlayState* play) { this->actor.parent = NULL; this->unk_1E4 = 5; } else { - func_8002F434(&this->actor, play, GI_BROKEN_GORONS_SWORD, 100.0f, 10.0f); + Actor_OfferGetItem(&this->actor, play, GI_BROKEN_GORONS_SWORD, 100.0f, 10.0f); } return; } diff --git a/src/overlays/actors/ovl_En_Tp/z_en_tp.c b/src/overlays/actors/ovl_En_Tp/z_en_tp.c index 8e79324941..d397612653 100644 --- a/src/overlays/actors/ovl_En_Tp/z_en_tp.c +++ b/src/overlays/actors/ovl_En_Tp/z_en_tp.c @@ -607,9 +607,11 @@ void EnTp_UpdateDamage(EnTp* this, PlayState* play) { this->actor.freezeTimer = 80; Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GOMA_JR_FREEZE); if (phi_s2 != 0) { - Actor_SetColorFilter(&this->actor, 0, 0xFF, 0, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, + 80); } else { - Actor_SetColorFilter(&this->actor, 0, 0xFF, 0x2000, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_XLU, + 80); } } @@ -621,9 +623,11 @@ void EnTp_UpdateDamage(EnTp* this, PlayState* play) { Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GOMA_JR_FREEZE); if (phi_s2 != 0) { - Actor_SetColorFilter(&now->actor, 0, 0xFF, 0, 0x50); + Actor_SetColorFilter(&now->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, + 80); } else { - Actor_SetColorFilter(&now->actor, 0, 0xFF, 0x2000, 0x50); + Actor_SetColorFilter(&now->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_XLU, + 80); } } } @@ -634,9 +638,11 @@ void EnTp_UpdateDamage(EnTp* this, PlayState* play) { now->actor.freezeTimer = 80; if (phi_s2 != 0) { - Actor_SetColorFilter(&now->actor, 0, 0xFF, 0, 0x50); + Actor_SetColorFilter(&now->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, + 80); } else { - Actor_SetColorFilter(&now->actor, 0, 0xFF, 0x2000, 0x50); + Actor_SetColorFilter(&now->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_XLU, + 80); } } } diff --git a/src/overlays/actors/ovl_En_Trap/z_en_trap.c b/src/overlays/actors/ovl_En_Trap/z_en_trap.c index e742cdba10..d37849c6b7 100644 --- a/src/overlays/actors/ovl_En_Trap/z_en_trap.c +++ b/src/overlays/actors/ovl_En_Trap/z_en_trap.c @@ -150,7 +150,7 @@ void EnTrap_Update(Actor* thisx, PlayState* play) { if (this->collider.base.acFlags & AC_HIT) { icePos = thisx->world.pos; this->collider.base.acFlags &= ~AC_HIT; - Actor_SetColorFilter(thisx, 0, 250, 0, 250); + Actor_SetColorFilter(thisx, COLORFILTER_COLORFLAG_BLUE, 250, COLORFILTER_BUFFLAG_OPA, 250); icePos.y += 10.0f; icePos.z += 10.0f; EffectSsEnIce_SpawnFlyingVec3f(play, thisx, &icePos, 150, 150, 150, 250, 235, 245, 255, 1.8f); diff --git a/src/overlays/actors/ovl_En_Vali/z_en_vali.c b/src/overlays/actors/ovl_En_Vali/z_en_vali.c index bd05ffcea6..89028c7d59 100644 --- a/src/overlays/actors/ovl_En_Vali/z_en_vali.c +++ b/src/overlays/actors/ovl_En_Vali/z_en_vali.c @@ -216,7 +216,7 @@ void EnVali_SetupAttacked(EnVali* this) { void EnVali_SetupRetaliate(EnVali* this) { Animation_MorphToPlayOnce(&this->skelAnime, &gBariRetaliatingAnim, -5.0f); - Actor_SetColorFilter(&this->actor, 0x4000, 150, 0x2000, 30); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 150, COLORFILTER_BUFFLAG_XLU, 30); this->actor.params = BARI_TYPE_NORMAL; this->bodyCollider.base.acFlags &= ~AC_ON; this->actionFunc = EnVali_Retaliate; @@ -230,7 +230,7 @@ void EnVali_SetupMoveArmsDown(EnVali* this) { void EnVali_SetupBurnt(EnVali* this) { this->timer = 2; this->bodyCollider.base.acFlags &= ~AC_ON; - Actor_SetColorFilter(&this->actor, 0x4000, 150, 0x2000, 30); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 150, COLORFILTER_BUFFLAG_XLU, 30); this->actionFunc = EnVali_Burnt; } @@ -257,7 +257,7 @@ void EnVali_SetupStunned(EnVali* this) { Animation_MorphToPlayOnce(&this->skelAnime, &gBariWaitingAnim, 10.0f); this->timer = 80; this->actor.velocity.y = 0.0f; - Actor_SetColorFilter(&this->actor, 0, 255, 0x2000, 80); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_XLU, 80); this->bodyCollider.info.bumper.effect = 0; Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GOMA_JR_FREEZE); this->actor.velocity.y = 1.0f; @@ -266,7 +266,7 @@ void EnVali_SetupStunned(EnVali* this) { void EnVali_SetupFrozen(EnVali* this) { this->actor.velocity.y = 0.0f; - Actor_SetColorFilter(&this->actor, 0, 255, 0x2000, 36); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_XLU, 36); this->bodyCollider.base.acFlags &= ~AC_ON; this->timer = 36; this->actionFunc = EnVali_Frozen; @@ -514,7 +514,7 @@ void EnVali_UpdateDamage(EnVali* this, PlayState* play) { } } else if (this->actor.colChkInfo.damageEffect == BARI_DMGEFF_SWORD) { if (this->actionFunc != EnVali_Stunned) { - Actor_SetColorFilter(&this->actor, 0x4000, 150, 0x2000, 30); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 150, COLORFILTER_BUFFLAG_XLU, 30); this->actor.params = BARI_TYPE_SWORD_DAMAGE; EnVali_SetupAttacked(this); } else { diff --git a/src/overlays/actors/ovl_En_Vm/z_en_vm.c b/src/overlays/actors/ovl_En_Vm/z_en_vm.c index feab3aeea8..bb3ebf5d63 100644 --- a/src/overlays/actors/ovl_En_Vm/z_en_vm.c +++ b/src/overlays/actors/ovl_En_Vm/z_en_vm.c @@ -401,7 +401,7 @@ void EnVm_CheckHealth(EnVm* this, PlayState* play) { } if (this->actor.colChkInfo.health != 0) { - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8); EnVm_SetupStun(this); } else { bomb = (EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->actor.world.pos.x, diff --git a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c index dfa64dc373..b0957999c7 100644 --- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c +++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c @@ -225,7 +225,7 @@ void EnWallmas_SetupTakeDamage(EnWallmas* this) { this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->collider.base.ac) + 0x8000; } - Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 0x14); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 20); this->actionFunc = EnWallmas_TakeDamage; this->actor.speedXZ = 5.0f; this->actor.velocity.y = 10.0f; @@ -259,7 +259,7 @@ void EnWallmas_SetupTakePlayer(EnWallmas* this, PlayState* play) { this->actor.velocity.y = 0.0f; this->yTarget = this->actor.yDistToPlayer; - func_8002DF38(play, &this->actor, 0x25); + func_8002DF38(play, &this->actor, PLAYER_CSMODE_37); OnePointCutscene_Init(play, 9500, 9999, &this->actor, CAM_ID_MAIN); } @@ -279,9 +279,9 @@ void EnWallmas_SetupStun(EnWallmas* this) { this->actor.speedXZ = 0.0f; if (this->actor.colChkInfo.damageEffect == 4) { - Actor_SetColorFilter(&this->actor, -0x8000, 0xFF, 0, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_GRAY, 255, COLORFILTER_BUFFLAG_OPA, 80); } else { - Actor_SetColorFilter(&this->actor, 0, 0xFF, 0, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 80); Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GOMA_JR_FREEZE); } diff --git a/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c b/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c index 9a1bb00d89..09e12c7a28 100644 --- a/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c +++ b/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c @@ -170,7 +170,7 @@ void func_80B325A0(EnWeiyer* this) { this->actor.gravity = 0.0f; this->actor.velocity.y = 0.0f; this->actor.speedXZ = 3.0f; - Actor_SetColorFilter(&this->actor, 0x4000, 0xC8, 0, 0x28); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 200, COLORFILTER_BUFFLAG_OPA, 40); this->collider.dim.height = sCylinderInit.dim.height; this->actionFunc = func_80B331CC; } @@ -182,7 +182,7 @@ void func_80B32660(EnWeiyer* this) { this->actor.velocity.y = 0.0f; this->actor.gravity = -1.0f; this->collider.dim.height = sCylinderInit.dim.height + 15; - Actor_SetColorFilter(&this->actor, 0, 0xC8, 0, 0x50); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 200, COLORFILTER_BUFFLAG_OPA, 80); this->collider.base.atFlags &= ~AT_ON; Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GOMA_JR_FREEZE); this->actionFunc = func_80B333B8; @@ -191,7 +191,7 @@ void func_80B32660(EnWeiyer* this) { void func_80B32724(EnWeiyer* this) { Animation_MorphToLoop(&this->skelAnime, &gStingerHitAnim, -5.0f); this->unk_194 = 20; - Actor_SetColorFilter(&this->actor, 0x4000, 0xC8, 0, 0x28); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 200, COLORFILTER_BUFFLAG_OPA, 40); this->collider.base.atFlags &= ~AT_ON; this->collider.base.acFlags &= ~AC_ON; this->actor.speedXZ = 3.0f; diff --git a/src/overlays/actors/ovl_En_Wf/z_en_wf.c b/src/overlays/actors/ovl_En_Wf/z_en_wf.c index edc24f4b82..2e399cd07e 100644 --- a/src/overlays/actors/ovl_En_Wf/z_en_wf.c +++ b/src/overlays/actors/ovl_En_Wf/z_en_wf.c @@ -1272,12 +1272,13 @@ void EnWf_UpdateDamage(EnWf* this, PlayState* play) { if ((this->actor.colChkInfo.damageEffect == ENWF_DMGEFF_STUN) || (this->actor.colChkInfo.damageEffect == ENWF_DMGEFF_UNDEF)) { if (this->action != WOLFOS_ACTION_STUNNED) { - Actor_SetColorFilter(&this->actor, 0, 120, 0, 80); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, + 80); Actor_ApplyDamage(&this->actor); EnWf_SetupStunned(this); } } else { // LIGHT_MAGIC, FIRE, NONE - Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 8); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8); if (this->damageEffect == ENWF_DMGEFF_FIRE) { this->fireTimer = 40; diff --git a/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c b/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c index afa35073d8..96eaa97d20 100644 --- a/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c +++ b/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c @@ -194,7 +194,7 @@ void func_80B3A3D4(EnWonderTalk2* this, PlayState* play) { this->unk_15A = true; } this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_4); - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); this->unk_156 = true; this->actionFunc = func_80B3A4F8; break; @@ -253,7 +253,7 @@ void func_80B3A4F8(EnWonderTalk2* this, PlayState* play) { this->unk_158 = 0; if (!this->unk_156) { Message_StartTextbox(play, this->actor.textId, NULL); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_4; this->actionFunc = func_80B3A3D4; } diff --git a/src/overlays/actors/ovl_En_Zf/z_en_zf.c b/src/overlays/actors/ovl_En_Zf/z_en_zf.c index a9508bdd89..08c4c0e579 100644 --- a/src/overlays/actors/ovl_En_Zf/z_en_zf.c +++ b/src/overlays/actors/ovl_En_Zf/z_en_zf.c @@ -2005,13 +2005,13 @@ void EnZf_UpdateDamage(EnZf* this, PlayState* play) { if ((this->actor.colChkInfo.damageEffect == ENZF_DMGEFF_STUN) || (this->actor.colChkInfo.damageEffect == ENZF_DMGEFF_ICE)) { if (this->action != ENZF_ACTION_STUNNED) { - Actor_SetColorFilter(&this->actor, 0, 120, 0, 80); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 80); Actor_ApplyDamage(&this->actor); EnZf_SetupStunned(this); } } else { Audio_PlayActorSfx2(&this->actor, NA_SE_EN_RIZA_CRY); - Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 8); + Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8); if (Actor_ApplyDamage(&this->actor) == 0) { dropParams = 0x40; diff --git a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c index f4d3b90467..3dbfb8de7d 100644 --- a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c +++ b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c @@ -422,7 +422,7 @@ void func_80B4BBC4(EnZl1* this, PlayState* play) { Player* player = GET_PLAYER(play); Animation_Change(&this->skelAnime, &gChildZelda1Anim_00438, 1.0f, 0.0f, frameCount, ANIMMODE_LOOP, 0.0f); - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); func_8002F7DC(&player->actor, NA_SE_VO_LI_SURPRISE_KID); this->actor.textId = 0x7039; Message_StartTextbox(play, this->actor.textId, NULL); @@ -511,7 +511,7 @@ void func_80B4BF2C(EnZl1* this, PlayState* play) { if ((Message_GetState(msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) { this->actor.textId = 0xFFFF; play->talkWithPlayer(play, &this->actor); - func_8002F434(&this->actor, play, GI_ZELDAS_LETTER, 120.0f, 10.0f); + Actor_OfferGetItem(&this->actor, play, GI_ZELDAS_LETTER, 120.0f, 10.0f); play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING; play->msgCtx.stateTimer = 4; this->unk_1E2++; @@ -526,7 +526,7 @@ void func_80B4BF2C(EnZl1* this, PlayState* play) { this->actor.parent = NULL; this->unk_1E2++; } else { - func_8002F434(&this->actor, play, GI_ZELDAS_LETTER, 120.0f, 10.0f); + Actor_OfferGetItem(&this->actor, play, GI_ZELDAS_LETTER, 120.0f, 10.0f); } break; case 3: @@ -555,7 +555,7 @@ void func_80B4BF2C(EnZl1* this, PlayState* play) { break; case 6: if (Actor_TextboxIsClosing(&this->actor, play)) { - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL); this->actor.flags &= ~ACTOR_FLAG_8; this->unk_1E2 = 4; diff --git a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c index 3211b21769..d8a95940ef 100644 --- a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c +++ b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c @@ -320,7 +320,7 @@ s32 EnZl4_SetupFromLegendCs(EnZl4* this, PlayState* play) { Actor* playerx = &GET_PLAYER(play)->actor; s16 rotY; - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); playerx->world.pos = this->actor.world.pos; rotY = this->actor.shape.rot.y; playerx->world.pos.x += 56.0f * Math_SinS(rotY); @@ -912,7 +912,7 @@ s32 EnZl4_CsLookWindow(EnZl4* this, PlayState* play) { play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gZeldasCourtyardGanonCs); gSaveContext.cutsceneTrigger = 1; this->talkState++; - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); } break; case 2: @@ -922,7 +922,7 @@ s32 EnZl4_CsLookWindow(EnZl4* this, PlayState* play) { } } else { Rumble_Request(0.0f, 160, 10, 40); - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ZL4_ANIM_30); EnZl4_SetActiveCamDir(play, 11); Message_StartTextbox(play, 0x7039, NULL); @@ -1114,8 +1114,8 @@ s32 EnZl4_CsMakePlan(EnZl4* this, PlayState* play) { Camera_ChangeSetting(GET_ACTIVE_CAM(play), CAM_SET_NORMAL0); this->talkState = 7; play->talkWithPlayer(play, &this->actor); - func_8002F434(&this->actor, play, GI_ZELDAS_LETTER, fabsf(this->actor.xzDistToPlayer) + 1.0f, - fabsf(this->actor.yDistToPlayer) + 1.0f); + Actor_OfferGetItem(&this->actor, play, GI_ZELDAS_LETTER, fabsf(this->actor.xzDistToPlayer) + 1.0f, + fabsf(this->actor.yDistToPlayer) + 1.0f); play->msgCtx.stateTimer = 4; play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING; } @@ -1125,8 +1125,8 @@ s32 EnZl4_CsMakePlan(EnZl4* this, PlayState* play) { Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ZL4_ANIM_0); this->talkState++; } else { - func_8002F434(&this->actor, play, GI_ZELDAS_LETTER, fabsf(this->actor.xzDistToPlayer) + 1.0f, - fabsf(this->actor.yDistToPlayer) + 1.0f); + Actor_OfferGetItem(&this->actor, play, GI_ZELDAS_LETTER, fabsf(this->actor.xzDistToPlayer) + 1.0f, + fabsf(this->actor.yDistToPlayer) + 1.0f); } // no break here is required for matching } @@ -1193,7 +1193,7 @@ void EnZl4_Cutscene(EnZl4* this, PlayState* play) { break; case ZL4_CS_PLAN: if (EnZl4_CsMakePlan(this, play)) { - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); gSaveContext.prevHudVisibilityMode = HUD_VISIBILITY_ALL; SET_EVENTCHKINF(EVENTCHKINF_40); this->actionFunc = EnZl4_Idle; diff --git a/src/overlays/actors/ovl_En_fHG/z_en_fhg.c b/src/overlays/actors/ovl_En_fHG/z_en_fhg.c index 8d2864c381..f6b42d2156 100644 --- a/src/overlays/actors/ovl_En_fHG/z_en_fhg.c +++ b/src/overlays/actors/ovl_En_fHG/z_en_fhg.c @@ -151,7 +151,7 @@ void EnfHG_Intro(EnfHG* this, PlayState* play) { break; } func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -192,7 +192,7 @@ void EnfHG_Intro(EnfHG* this, PlayState* play) { Audio_PlayActorSfx2(&this->actor, NA_SE_EV_GANON_HORSE_GROAN); } if (this->timers[0] == 20) { - func_8002DF54(play, &this->actor, 9); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_9); } if (this->timers[0] == 1) { SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_OPENING_GANON); @@ -354,7 +354,7 @@ void EnfHG_Intro(EnfHG* this, PlayState* play) { this->bossGndSignal = FHG_FINISH; } if (this->timers[0] == 170) { - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); Audio_PlayActorSfx2(&this->actor, NA_SE_EN_FANTOM_MASIC2); } Math_ApproachF(&this->subCamEye.z, this->subCamPanZ + (GND_BOSSROOM_CENTER_Z + 100.0f), 0.1f, @@ -400,7 +400,7 @@ void EnfHG_Intro(EnfHG* this, PlayState* play) { func_800C08AC(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); this->actionFunc = EnfHG_Retreat; } break; diff --git a/src/overlays/actors/ovl_Fishing/z_fishing.c b/src/overlays/actors/ovl_Fishing/z_fishing.c index e15e3cdd24..3a6e830a73 100644 --- a/src/overlays/actors/ovl_Fishing/z_fishing.c +++ b/src/overlays/actors/ovl_Fishing/z_fishing.c @@ -4992,7 +4992,7 @@ void Fishing_HandleOwnerDialog(Fishing* this, PlayState* play) { } this->actor.parent = NULL; - func_8002F434(&this->actor, play, getItemId, 2000.0f, 1000.0f); + Actor_OfferGetItem(&this->actor, play, getItemId, 2000.0f, 1000.0f); this->unk_15C = 23; } break; @@ -5043,7 +5043,7 @@ void Fishing_HandleOwnerDialog(Fishing* this, PlayState* play) { if (Actor_HasParent(&this->actor, play)) { this->unk_15C = 24; } else { - func_8002F434(&this->actor, play, GI_SCALE_GOLDEN, 2000.0f, 1000.0f); + Actor_OfferGetItem(&this->actor, play, GI_SCALE_GOLDEN, 2000.0f, 1000.0f); } break; @@ -5361,7 +5361,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) { sSubCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, sSubCamId, CAM_STAT_ACTIVE); - func_8002DF54(play, &this->actor, 5); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_5); mainCam = Play_GetCamera(play, CAM_ID_MAIN); sSubCamEye.x = mainCam->eye.x; sSubCamEye.y = mainCam->eye.y; @@ -5387,7 +5387,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) { mainCam->at = sSubCamAt; func_800C08AC(play, sSubCamId, 0); func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); D_80B7A6CC = 0; sSubCamId = SUB_CAM_ID_DONE; D_80B7A6D0 = 30; @@ -5403,7 +5403,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) { sSubCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, sSubCamId, CAM_STAT_ACTIVE); - func_8002DF54(play, &this->actor, 5); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_5); mainCam = Play_GetCamera(play, CAM_ID_MAIN); sSubCamEye.x = mainCam->eye.x; sSubCamEye.y = mainCam->eye.y; @@ -5422,7 +5422,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) { if ((D_80B7A6D0 == 0) && Message_ShouldAdvance(play)) { D_80B7A6CC = 22; D_80B7A6D0 = 40; - func_8002DF54(play, &this->actor, 0x1C); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_28); D_80B7FEE4 = 0.0f; } break; @@ -5491,7 +5491,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) { mainCam->at = sSubCamAt; func_800C08AC(play, sSubCamId, 0); func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); D_80B7A6CC = 0; sSubCamId = SUB_CAM_ID_DONE; player->unk_860 = -5; diff --git a/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c b/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c index 0965d9fb0d..0f214b4ba3 100644 --- a/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c +++ b/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c @@ -58,7 +58,7 @@ void ItemBHeart_Update(Actor* thisx, PlayState* play) { Flags_SetCollectible(play, 0x1F); Actor_Kill(&this->actor); } else { - func_8002F434(&this->actor, play, GI_HEART_CONTAINER_2, 30.0f, 40.0f); + Actor_OfferGetItem(&this->actor, play, GI_HEART_CONTAINER_2, 30.0f, 40.0f); } } diff --git a/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c b/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c index d9db53806c..2850184c78 100644 --- a/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c +++ b/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c @@ -158,7 +158,7 @@ void func_80B85824(ItemEtcetera* this, PlayState* play) { } Actor_Kill(&this->actor); } else { - func_8002F434(&this->actor, play, this->getItemId, 30.0f, 50.0f); + Actor_OfferGetItem(&this->actor, play, this->getItemId, 30.0f, 50.0f); } } @@ -171,7 +171,7 @@ void func_80B858B4(ItemEtcetera* this, PlayState* play) { Actor_Kill(&this->actor); } else { if (0) {} // Necessary to match - func_8002F434(&this->actor, play, this->getItemId, 30.0f, 50.0f); + Actor_OfferGetItem(&this->actor, play, this->getItemId, 30.0f, 50.0f); if ((play->gameplayFrames & 0xD) == 0) { EffectSsBubble_Spawn(play, &this->actor.world.pos, 0.0f, 0.0f, 10.0f, 0.13f); } diff --git a/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c b/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c index 112d4aee90..7c92b3fdaf 100644 --- a/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c +++ b/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c @@ -180,7 +180,7 @@ void ItemOcarina_WaitInWater(ItemOcarina* this, PlayState* play) { this->actionFunc = ItemOcarina_StartSoTCutscene; this->actor.draw = NULL; } else { - func_8002F434(&this->actor, play, GI_OCARINA_OF_TIME, 30.0f, 50.0f); + Actor_OfferGetItem(&this->actor, play, GI_OCARINA_OF_TIME, 30.0f, 50.0f); if ((play->gameplayFrames & 13) == 0) { EffectSsBubble_Spawn(play, &this->actor.world.pos, 0.0f, 0.0f, 10.0f, 0.13f); diff --git a/src/overlays/actors/ovl_Item_Shield/z_item_shield.c b/src/overlays/actors/ovl_Item_Shield/z_item_shield.c index c6accb49a2..434bfcc716 100644 --- a/src/overlays/actors/ovl_Item_Shield/z_item_shield.c +++ b/src/overlays/actors/ovl_Item_Shield/z_item_shield.c @@ -102,7 +102,7 @@ void func_80B86AC8(ItemShield* this, PlayState* play) { Actor_Kill(&this->actor); return; } - func_8002F434(&this->actor, play, GI_SHIELD_DEKU, 30.0f, 50.0f); + Actor_OfferGetItem(&this->actor, play, GI_SHIELD_DEKU, 30.0f, 50.0f); Actor_UpdateBgCheckInfo(play, &this->actor, 10.0f, 10.0f, 0.0f, UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2); if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) { this->timer--; @@ -124,7 +124,7 @@ void func_80B86BC8(ItemShield* this, PlayState* play) { Actor_Kill(&this->actor); return; } - func_8002F434(&this->actor, play, GI_SHIELD_DEKU, 30.0f, 50.0f); + Actor_OfferGetItem(&this->actor, play, GI_SHIELD_DEKU, 30.0f, 50.0f); if (this->collider.base.acFlags & AC_HIT) { ItemShield_SetupAction(this, func_80B86AC8); this->actor.velocity.y = 4.0f; diff --git a/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c b/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c index e16b606c42..5ce78a5dcc 100644 --- a/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c +++ b/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c @@ -211,7 +211,7 @@ void ObjKibako_Idle(ObjKibako* this, PlayState* play) { } } if (this->actor.xzDistToPlayer < 100.0f) { - func_8002F580(&this->actor, play); + Actor_OfferCarry(&this->actor, play); } } } diff --git a/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c b/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c index 18b972df2c..7f343a15e5 100644 --- a/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c +++ b/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c @@ -266,7 +266,7 @@ void ObjTsubo_Idle(ObjTsubo* this, PlayState* play) { phi_v1 = ABS(temp_v0); if (phi_v1 >= 0x5556) { // GI_NONE in this case allows the player to lift the actor - func_8002F434(&this->actor, play, GI_NONE, 30.0f, 30.0f); + Actor_OfferGetItem(&this->actor, play, GI_NONE, 30.0f, 30.0f); } } } diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index c0ca4c7acf..e631135f03 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -2410,7 +2410,7 @@ void func_808340DC(Player* this, PlayState* play) { void func_80834298(Player* this, PlayState* play) { if ((this->actor.category == ACTORCAT_PLAYER) && !(this->stateFlags1 & PLAYER_STATE1_8) && ((this->heldItemAction == this->itemAction) || (this->stateFlags1 & PLAYER_STATE1_22)) && - (gSaveContext.health != 0) && (play->csCtx.state == CS_STATE_IDLE) && (this->csMode == 0) && + (gSaveContext.health != 0) && (play->csCtx.state == CS_STATE_IDLE) && (this->csMode == PLAYER_CSMODE_NONE) && (play->shootingGalleryStatus == 0) && (play->activeCamId == CAM_ID_MAIN) && (play->transitionTrigger != TRANS_TRIGGER_START) && (gSaveContext.timerState != TIMER_STATE_STOP)) { func_80833DF8(this, play); @@ -3391,7 +3391,7 @@ void func_80836BEC(Player* this, PlayState* play) { this->stateFlags1 &= ~PLAYER_STATE1_30; } - if ((play->csCtx.state != CS_STATE_IDLE) || (this->csMode != 0) || + if ((play->csCtx.state != CS_STATE_IDLE) || (this->csMode != PLAYER_CSMODE_NONE) || (this->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (this->stateFlags3 & PLAYER_STATE3_7)) { this->unk_66C = 0; } else if (zTrigPressed || (this->stateFlags2 & PLAYER_STATE2_13) || (this->unk_684 != NULL)) { @@ -4145,7 +4145,7 @@ s32 func_808382DC(Player* this, PlayState* play) { } if ((this->unk_A87 != 0) || (this->invincibilityTimer > 0) || (this->stateFlags1 & PLAYER_STATE1_26) || - (this->csMode != 0) || (this->meleeWeaponQuads[0].base.atFlags & AT_HIT) || + (this->csMode != PLAYER_CSMODE_NONE) || (this->meleeWeaponQuads[0].base.atFlags & AT_HIT) || (this->meleeWeaponQuads[1].base.atFlags & AT_HIT)) { return 0; } @@ -4415,7 +4415,7 @@ s32 func_80839034(PlayState* play, Player* this, CollisionPoly* poly, u32 bgId) exitIndex = 0; if (!(this->stateFlags1 & PLAYER_STATE1_7) && (play->transitionTrigger == TRANS_TRIGGER_OFF) && - (this->csMode == 0) && !(this->stateFlags1 & PLAYER_STATE1_0) && + (this->csMode == PLAYER_CSMODE_NONE) && !(this->stateFlags1 & PLAYER_STATE1_0) && (((poly != NULL) && (exitIndex = SurfaceType_GetExitIndex(&play->colCtx, poly, bgId), exitIndex != 0)) || (func_8083816C(D_808535E4) && (this->unk_A7A == FLOOR_PROPERTY_12)))) { @@ -10226,7 +10226,7 @@ void Player_UpdateCamAndSeqModes(PlayState* play, Player* this) { if (this->actor.category == ACTORCAT_PLAYER) { seqMode = SEQ_MODE_DEFAULT; - if (this->csMode != 0) { + if (this->csMode != PLAYER_CSMODE_NONE) { Camera_ChangeMode(Play_GetCamera(play, CAM_ID_MAIN), CAM_MODE_NORMAL); } else if (!(this->stateFlags1 & PLAYER_STATE1_20)) { if ((this->actor.parent != NULL) && (this->stateFlags3 & PLAYER_STATE3_7)) { @@ -10431,7 +10431,7 @@ void func_80848C74(PlayState* play, Player* this) { void func_80848EF8(Player* this) { if (CHECK_QUEST_ITEM(QUEST_STONE_OF_AGONY)) { - f32 temp = 200000.0f - (this->unk_6A4 * 5.0f); + f32 temp = 200000.0f - (this->closestSecretDistSq * 5.0f); if (temp < 0.0f) { temp = 0.0f; @@ -10446,9 +10446,19 @@ void func_80848EF8(Player* this) { } static s8 D_808547C4[] = { - 0, 3, 3, 5, 4, 8, 9, 13, 14, 15, 16, 17, 18, -22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, -35, - 30, 36, 38, -39, -40, -41, 42, 43, 45, 46, 0, 0, 0, 67, 48, 47, -50, 51, -52, -53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, -65, -66, 68, 11, 69, 70, 71, 8, 8, 72, 73, 78, 79, 80, 89, 90, 91, 92, 77, 19, 94, + PLAYER_CSMODE_NONE, PLAYER_CSMODE_3, PLAYER_CSMODE_3, PLAYER_CSMODE_5, PLAYER_CSMODE_4, PLAYER_CSMODE_8, + PLAYER_CSMODE_9, PLAYER_CSMODE_13, PLAYER_CSMODE_14, PLAYER_CSMODE_15, PLAYER_CSMODE_16, PLAYER_CSMODE_17, + PLAYER_CSMODE_18, -PLAYER_CSMODE_22, PLAYER_CSMODE_23, PLAYER_CSMODE_24, PLAYER_CSMODE_25, PLAYER_CSMODE_26, + PLAYER_CSMODE_27, PLAYER_CSMODE_28, PLAYER_CSMODE_29, PLAYER_CSMODE_31, PLAYER_CSMODE_32, PLAYER_CSMODE_33, + PLAYER_CSMODE_34, -PLAYER_CSMODE_35, PLAYER_CSMODE_30, PLAYER_CSMODE_36, PLAYER_CSMODE_38, -PLAYER_CSMODE_39, + -PLAYER_CSMODE_40, -PLAYER_CSMODE_41, PLAYER_CSMODE_42, PLAYER_CSMODE_43, PLAYER_CSMODE_45, PLAYER_CSMODE_46, + PLAYER_CSMODE_NONE, PLAYER_CSMODE_NONE, PLAYER_CSMODE_NONE, PLAYER_CSMODE_67, PLAYER_CSMODE_48, PLAYER_CSMODE_47, + -PLAYER_CSMODE_50, PLAYER_CSMODE_51, -PLAYER_CSMODE_52, -PLAYER_CSMODE_53, PLAYER_CSMODE_54, PLAYER_CSMODE_55, + PLAYER_CSMODE_56, PLAYER_CSMODE_57, PLAYER_CSMODE_58, PLAYER_CSMODE_59, PLAYER_CSMODE_60, PLAYER_CSMODE_61, + PLAYER_CSMODE_62, PLAYER_CSMODE_63, PLAYER_CSMODE_64, -PLAYER_CSMODE_65, -PLAYER_CSMODE_66, PLAYER_CSMODE_68, + PLAYER_CSMODE_11, PLAYER_CSMODE_69, PLAYER_CSMODE_70, PLAYER_CSMODE_71, PLAYER_CSMODE_8, PLAYER_CSMODE_8, + PLAYER_CSMODE_72, PLAYER_CSMODE_73, PLAYER_CSMODE_78, PLAYER_CSMODE_79, PLAYER_CSMODE_80, PLAYER_CSMODE_89, + PLAYER_CSMODE_90, PLAYER_CSMODE_91, PLAYER_CSMODE_92, PLAYER_CSMODE_77, PLAYER_CSMODE_19, PLAYER_CSMODE_94, }; static Vec3f D_80854814 = { 0.0f, 0.0f, 200.0f }; @@ -10712,29 +10722,30 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { } } - if ((play->csCtx.state != CS_STATE_IDLE) && (this->csMode != 6) && !(this->stateFlags1 & PLAYER_STATE1_23) && - !(this->stateFlags2 & PLAYER_STATE2_7) && (this->actor.category == ACTORCAT_PLAYER)) { + if ((play->csCtx.state != CS_STATE_IDLE) && (this->csMode != PLAYER_CSMODE_6) && + !(this->stateFlags1 & PLAYER_STATE1_23) && !(this->stateFlags2 & PLAYER_STATE2_7) && + (this->actor.category == ACTORCAT_PLAYER)) { CsCmdActorAction* linkActionCsCmd = play->csCtx.linkAction; - if ((linkActionCsCmd != NULL) && (D_808547C4[linkActionCsCmd->action] != 0)) { - func_8002DF54(play, NULL, 6); + if ((linkActionCsCmd != NULL) && (D_808547C4[linkActionCsCmd->action] != PLAYER_CSMODE_NONE)) { + func_8002DF54(play, NULL, PLAYER_CSMODE_6); func_80832210(this); - } else if ((this->csMode == 0) && !(this->stateFlags2 & PLAYER_STATE2_10) && + } else if ((this->csMode == PLAYER_CSMODE_NONE) && !(this->stateFlags2 & PLAYER_STATE2_10) && (play->csCtx.state != CS_STATE_UNSKIPPABLE_INIT)) { - func_8002DF54(play, NULL, 0x31); + func_8002DF54(play, NULL, PLAYER_CSMODE_49); func_80832210(this); } } - if (this->csMode != 0) { - if ((this->csMode != 7) || + if (this->csMode != PLAYER_CSMODE_NONE) { + if ((this->csMode != PLAYER_CSMODE_7) || !(this->stateFlags1 & (PLAYER_STATE1_13 | PLAYER_STATE1_14 | PLAYER_STATE1_21 | PLAYER_STATE1_26))) { this->unk_6AD = 3; } else if (func_80852E14 != this->func_674) { func_80852944(play, this, NULL); } } else { - this->prevCsMode = 0; + this->prevCsMode = PLAYER_CSMODE_NONE; } func_8083D6EC(play, this); @@ -10799,7 +10810,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { } this->stateFlags2 &= ~PLAYER_STATE2_23; - this->unk_6A4 = FLT_MAX; + this->closestSecretDistSq = FLT_MAX; temp_f0 = this->actor.world.pos.y - this->actor.prevPos.y; @@ -11014,7 +11025,8 @@ void Player_Draw(Actor* thisx, PlayState* play2) { s32 lod; s32 pad; - if ((this->csMode != 0) || (func_8008E9C4(this) && 0) || (this->actor.projectedPos.z < 160.0f)) { + if ((this->csMode != PLAYER_CSMODE_NONE) || (func_8008E9C4(this) && 0) || + (this->actor.projectedPos.z < 160.0f)) { lod = 0; } else { lod = 1; @@ -11247,7 +11259,7 @@ void func_8084B1D8(Player* this, PlayState* play) { func_80836670(this, play); } - if ((this->csMode != 0) || (this->unk_6AD == 0) || (this->unk_6AD >= 4) || func_80833B54(this) || + if ((this->csMode != PLAYER_CSMODE_NONE) || (this->unk_6AD == 0) || (this->unk_6AD >= 4) || func_80833B54(this) || (this->unk_664 != NULL) || !func_8083AD4C(play, this) || (((this->unk_6AD == 2) && (CHECK_BTN_ANY(sControlInput->press.button, BTN_A | BTN_B | BTN_R) || func_80833B2C(this) || (!func_8002DD78(this) && !func_808334B4(this)))) || @@ -12026,9 +12038,9 @@ void func_8084CC98(Player* this, PlayState* play) { AnimationContext_SetCopyAll(play, this->skelAnime.limbCount, this->skelAnime.morphTable, this->skelAnime.jointTable); - if ((play->csCtx.state != CS_STATE_IDLE) || (this->csMode != 0)) { - if (this->csMode == 7) { - this->csMode = 0; + if ((play->csCtx.state != CS_STATE_IDLE) || (this->csMode != PLAYER_CSMODE_NONE)) { + if (this->csMode == PLAYER_CSMODE_7) { + this->csMode = PLAYER_CSMODE_NONE; } this->unk_6AD = 0; this->unk_84F = 0; @@ -12045,7 +12057,7 @@ void func_8084CC98(Player* this, PlayState* play) { this->currentYaw = this->actor.shape.rot.y = rideActor->actor.shape.rot.y; - if ((this->csMode != 0) || + if ((this->csMode != PLAYER_CSMODE_NONE) || (!func_8083224C(play) && ((rideActor->actor.speedXZ != 0.0f) || !func_8083B644(this, play)) && !func_8083C1DC(this, play))) { if (D_808535E0 == 0) { @@ -12103,7 +12115,7 @@ void func_8084CC98(Player* this, PlayState* play) { return; } - if ((this->csMode != 0) || (!func_8084C9BC(this, play) && !func_8083B040(this, play))) { + if ((this->csMode != PLAYER_CSMODE_NONE) || (!func_8084C9BC(this, play) && !func_8083B040(this, play))) { if (this->unk_664 != NULL) { if (func_8002DD78(this) != 0) { this->unk_6BE = func_8083DB98(this, 1) - this->actor.shape.rot.y; @@ -12449,7 +12461,7 @@ s32 func_8084DFF4(PlayState* play, Player* this) { gSaveContext.nextCutsceneIndex = 0xFFF1; play->transitionType = TRANS_TYPE_SANDSTORM_END; this->stateFlags1 &= ~PLAYER_STATE1_29; - func_80852FFC(play, NULL, 8); + func_80852FFC(play, NULL, PLAYER_CSMODE_8); } this->getItemId = GI_NONE; } @@ -12546,10 +12558,10 @@ void func_8084E3C4(Player* this, PlayState* play) { gSaveContext.respawn[RESPAWN_MODE_RETURN].playerParams = 0x5FF; gSaveContext.respawn[RESPAWN_MODE_RETURN].data = play->msgCtx.lastPlayedSong; - this->csMode = 0; + this->csMode = PLAYER_CSMODE_NONE; this->stateFlags1 &= ~PLAYER_STATE1_29; - func_80852FFC(play, NULL, 8); + func_80852FFC(play, NULL, PLAYER_CSMODE_8); play->mainCamera.stateFlags &= ~CAM_STATE_3; this->stateFlags1 |= PLAYER_STATE1_28 | PLAYER_STATE1_29; @@ -13644,216 +13656,216 @@ static struct_80832924 D_80854B14[] = { { 0, -0x300A }, }; -static struct_80854B18 D_80854B18[] = { - { 0, NULL }, - { -1, func_808515A4 }, - { 2, &gPlayerAnim_link_demo_goma_furimuki }, - { 0, NULL }, - { 0, NULL }, - { 3, &gPlayerAnim_link_demo_bikkuri }, - { 0, NULL }, - { 0, NULL }, - { -1, func_808515A4 }, - { 2, &gPlayerAnim_link_demo_furimuki }, - { -1, func_80851788 }, - { 3, &gPlayerAnim_link_demo_warp }, - { -1, func_808518DC }, - { 7, &gPlayerAnim_clink_demo_get1 }, - { 5, &gPlayerAnim_clink_demo_get2 }, - { 5, &gPlayerAnim_clink_demo_get3 }, - { 5, &gPlayerAnim_clink_demo_standup }, - { 7, &gPlayerAnim_clink_demo_standup_wait }, - { -1, func_808519EC }, - { 2, &gPlayerAnim_link_demo_baru_op1 }, - { 2, &gPlayerAnim_link_demo_baru_op3 }, - { 0, NULL }, - { -1, func_80851B90 }, - { 3, &gPlayerAnim_link_demo_jibunmiru }, - { 9, &gPlayerAnim_link_normal_back_downA }, - { 2, &gPlayerAnim_link_normal_back_down_wake }, - { -1, func_80851D2C }, - { 2, &gPlayerAnim_link_normal_okarina_end }, - { 3, &gPlayerAnim_link_demo_get_itemA }, - { -1, func_808515A4 }, - { 2, &gPlayerAnim_link_normal_normal2fighter_free }, - { 0, NULL }, - { 0, NULL }, - { 5, &gPlayerAnim_clink_demo_atozusari }, - { -1, func_80851368 }, - { -1, func_80851E64 }, - { 5, &gPlayerAnim_clink_demo_bashi }, - { 16, &gPlayerAnim_link_normal_hang_up_down }, - { -1, func_80851F84 }, - { -1, func_80851E90 }, - { 6, &gPlayerAnim_clink_op3_okiagari }, - { 6, &gPlayerAnim_clink_op3_tatiagari }, - { -1, func_80852080 }, - { 5, &gPlayerAnim_clink_demo_miokuri }, - { -1, func_808521F4 }, - { -1, func_8085225C }, - { -1, func_80852280 }, - { 5, &gPlayerAnim_clink_demo_nozoki }, - { 5, &gPlayerAnim_clink_demo_koutai }, - { -1, func_808515A4 }, - { 5, &gPlayerAnim_clink_demo_koutai_kennuki }, - { 5, &gPlayerAnim_link_demo_kakeyori }, - { 5, &gPlayerAnim_link_demo_kakeyori_mimawasi }, - { 5, &gPlayerAnim_link_demo_kakeyori_miokuri }, - { 3, &gPlayerAnim_link_demo_furimuki2 }, - { 3, &gPlayerAnim_link_demo_kaoage }, - { 4, &gPlayerAnim_link_demo_kaoage_wait }, - { 3, &gPlayerAnim_clink_demo_mimawasi }, - { 3, &gPlayerAnim_link_demo_nozokikomi }, - { 6, &gPlayerAnim_kolink_odoroki_demo }, - { 6, &gPlayerAnim_link_shagamu_demo }, - { 14, &gPlayerAnim_link_okiru_demo }, - { 3, &gPlayerAnim_link_okiru_demo }, - { 5, &gPlayerAnim_link_fighter_power_kiru_start }, - { 16, &gPlayerAnim_demo_link_nwait }, - { 15, &gPlayerAnim_demo_link_tewatashi }, - { 15, &gPlayerAnim_demo_link_orosuu }, - { 3, &gPlayerAnim_d_link_orooro }, - { 3, &gPlayerAnim_d_link_imanodare }, - { 3, &gPlayerAnim_link_hatto_demo }, - { 6, &gPlayerAnim_o_get_mae }, - { 6, &gPlayerAnim_o_get_ato }, - { 6, &gPlayerAnim_om_get_mae }, - { 6, &gPlayerAnim_nw_modoru }, - { 3, &gPlayerAnim_link_demo_gurad }, - { 3, &gPlayerAnim_link_demo_look_hand }, - { 4, &gPlayerAnim_link_demo_sita_wait }, - { 3, &gPlayerAnim_link_demo_ue }, - { 3, &gPlayerAnim_Link_muku }, - { 3, &gPlayerAnim_Link_miageru }, - { 6, &gPlayerAnim_Link_ha }, - { 3, &gPlayerAnim_L_1kyoro }, - { 3, &gPlayerAnim_L_2kyoro }, - { 3, &gPlayerAnim_L_sagaru }, - { 3, &gPlayerAnim_L_bouzen }, - { 3, &gPlayerAnim_L_kamaeru }, - { 3, &gPlayerAnim_L_hajikareru }, - { 3, &gPlayerAnim_L_ken_miru }, - { 3, &gPlayerAnim_L_mukinaoru }, - { -1, func_808524B0 }, - { 3, &gPlayerAnim_link_wait_itemD1_20f }, - { -1, func_80852544 }, - { -1, func_80852564 }, - { 3, &gPlayerAnim_link_normal_wait_typeB_20f }, - { -1, func_80852608 }, - { 3, &gPlayerAnim_link_demo_kousan }, - { 3, &gPlayerAnim_link_demo_return_to_past }, - { 3, &gPlayerAnim_link_last_hit_motion1 }, - { 3, &gPlayerAnim_link_last_hit_motion2 }, - { 3, &gPlayerAnim_link_demo_zeldamiru }, - { 3, &gPlayerAnim_link_demo_kenmiru1 }, - { 3, &gPlayerAnim_link_demo_kenmiru2 }, - { 3, &gPlayerAnim_link_demo_kenmiru2_modori }, +static struct_80854B18 D_80854B18[PLAYER_CSMODE_MAX] = { + { 0, NULL }, // PLAYER_CSMODE_NONE + { -1, func_808515A4 }, // PLAYER_CSMODE_1 + { 2, &gPlayerAnim_link_demo_goma_furimuki }, // PLAYER_CSMODE_2 + { 0, NULL }, // PLAYER_CSMODE_3 + { 0, NULL }, // PLAYER_CSMODE_4 + { 3, &gPlayerAnim_link_demo_bikkuri }, // PLAYER_CSMODE_5 + { 0, NULL }, // PLAYER_CSMODE_6 + { 0, NULL }, // PLAYER_CSMODE_7 + { -1, func_808515A4 }, // PLAYER_CSMODE_8 + { 2, &gPlayerAnim_link_demo_furimuki }, // PLAYER_CSMODE_9 + { -1, func_80851788 }, // PLAYER_CSMODE_10 + { 3, &gPlayerAnim_link_demo_warp }, // PLAYER_CSMODE_11 + { -1, func_808518DC }, // PLAYER_CSMODE_12 + { 7, &gPlayerAnim_clink_demo_get1 }, // PLAYER_CSMODE_13 + { 5, &gPlayerAnim_clink_demo_get2 }, // PLAYER_CSMODE_14 + { 5, &gPlayerAnim_clink_demo_get3 }, // PLAYER_CSMODE_15 + { 5, &gPlayerAnim_clink_demo_standup }, // PLAYER_CSMODE_16 + { 7, &gPlayerAnim_clink_demo_standup_wait }, // PLAYER_CSMODE_17 + { -1, func_808519EC }, // PLAYER_CSMODE_18 + { 2, &gPlayerAnim_link_demo_baru_op1 }, // PLAYER_CSMODE_19 + { 2, &gPlayerAnim_link_demo_baru_op3 }, // PLAYER_CSMODE_20 + { 0, NULL }, // PLAYER_CSMODE_21 + { -1, func_80851B90 }, // PLAYER_CSMODE_22 + { 3, &gPlayerAnim_link_demo_jibunmiru }, // PLAYER_CSMODE_23 + { 9, &gPlayerAnim_link_normal_back_downA }, // PLAYER_CSMODE_24 + { 2, &gPlayerAnim_link_normal_back_down_wake }, // PLAYER_CSMODE_25 + { -1, func_80851D2C }, // PLAYER_CSMODE_26 + { 2, &gPlayerAnim_link_normal_okarina_end }, // PLAYER_CSMODE_27 + { 3, &gPlayerAnim_link_demo_get_itemA }, // PLAYER_CSMODE_28 + { -1, func_808515A4 }, // PLAYER_CSMODE_29 + { 2, &gPlayerAnim_link_normal_normal2fighter_free }, // PLAYER_CSMODE_30 + { 0, NULL }, // PLAYER_CSMODE_31 + { 0, NULL }, // PLAYER_CSMODE_32 + { 5, &gPlayerAnim_clink_demo_atozusari }, // PLAYER_CSMODE_33 + { -1, func_80851368 }, // PLAYER_CSMODE_34 + { -1, func_80851E64 }, // PLAYER_CSMODE_35 + { 5, &gPlayerAnim_clink_demo_bashi }, // PLAYER_CSMODE_36 + { 16, &gPlayerAnim_link_normal_hang_up_down }, // PLAYER_CSMODE_37 + { -1, func_80851F84 }, // PLAYER_CSMODE_38 + { -1, func_80851E90 }, // PLAYER_CSMODE_39 + { 6, &gPlayerAnim_clink_op3_okiagari }, // PLAYER_CSMODE_40 + { 6, &gPlayerAnim_clink_op3_tatiagari }, // PLAYER_CSMODE_41 + { -1, func_80852080 }, // PLAYER_CSMODE_42 + { 5, &gPlayerAnim_clink_demo_miokuri }, // PLAYER_CSMODE_43 + { -1, func_808521F4 }, // PLAYER_CSMODE_44 + { -1, func_8085225C }, // PLAYER_CSMODE_45 + { -1, func_80852280 }, // PLAYER_CSMODE_46 + { 5, &gPlayerAnim_clink_demo_nozoki }, // PLAYER_CSMODE_47 + { 5, &gPlayerAnim_clink_demo_koutai }, // PLAYER_CSMODE_48 + { -1, func_808515A4 }, // PLAYER_CSMODE_49 + { 5, &gPlayerAnim_clink_demo_koutai_kennuki }, // PLAYER_CSMODE_50 + { 5, &gPlayerAnim_link_demo_kakeyori }, // PLAYER_CSMODE_51 + { 5, &gPlayerAnim_link_demo_kakeyori_mimawasi }, // PLAYER_CSMODE_52 + { 5, &gPlayerAnim_link_demo_kakeyori_miokuri }, // PLAYER_CSMODE_53 + { 3, &gPlayerAnim_link_demo_furimuki2 }, // PLAYER_CSMODE_54 + { 3, &gPlayerAnim_link_demo_kaoage }, // PLAYER_CSMODE_55 + { 4, &gPlayerAnim_link_demo_kaoage_wait }, // PLAYER_CSMODE_56 + { 3, &gPlayerAnim_clink_demo_mimawasi }, // PLAYER_CSMODE_57 + { 3, &gPlayerAnim_link_demo_nozokikomi }, // PLAYER_CSMODE_58 + { 6, &gPlayerAnim_kolink_odoroki_demo }, // PLAYER_CSMODE_59 + { 6, &gPlayerAnim_link_shagamu_demo }, // PLAYER_CSMODE_60 + { 14, &gPlayerAnim_link_okiru_demo }, // PLAYER_CSMODE_61 + { 3, &gPlayerAnim_link_okiru_demo }, // PLAYER_CSMODE_62 + { 5, &gPlayerAnim_link_fighter_power_kiru_start }, // PLAYER_CSMODE_63 + { 16, &gPlayerAnim_demo_link_nwait }, // PLAYER_CSMODE_64 + { 15, &gPlayerAnim_demo_link_tewatashi }, // PLAYER_CSMODE_65 + { 15, &gPlayerAnim_demo_link_orosuu }, // PLAYER_CSMODE_66 + { 3, &gPlayerAnim_d_link_orooro }, // PLAYER_CSMODE_67 + { 3, &gPlayerAnim_d_link_imanodare }, // PLAYER_CSMODE_68 + { 3, &gPlayerAnim_link_hatto_demo }, // PLAYER_CSMODE_69 + { 6, &gPlayerAnim_o_get_mae }, // PLAYER_CSMODE_70 + { 6, &gPlayerAnim_o_get_ato }, // PLAYER_CSMODE_71 + { 6, &gPlayerAnim_om_get_mae }, // PLAYER_CSMODE_72 + { 6, &gPlayerAnim_nw_modoru }, // PLAYER_CSMODE_73 + { 3, &gPlayerAnim_link_demo_gurad }, // PLAYER_CSMODE_74 + { 3, &gPlayerAnim_link_demo_look_hand }, // PLAYER_CSMODE_75 + { 4, &gPlayerAnim_link_demo_sita_wait }, // PLAYER_CSMODE_76 + { 3, &gPlayerAnim_link_demo_ue }, // PLAYER_CSMODE_77 + { 3, &gPlayerAnim_Link_muku }, // PLAYER_CSMODE_78 + { 3, &gPlayerAnim_Link_miageru }, // PLAYER_CSMODE_79 + { 6, &gPlayerAnim_Link_ha }, // PLAYER_CSMODE_80 + { 3, &gPlayerAnim_L_1kyoro }, // PLAYER_CSMODE_81 + { 3, &gPlayerAnim_L_2kyoro }, // PLAYER_CSMODE_82 + { 3, &gPlayerAnim_L_sagaru }, // PLAYER_CSMODE_83 + { 3, &gPlayerAnim_L_bouzen }, // PLAYER_CSMODE_84 + { 3, &gPlayerAnim_L_kamaeru }, // PLAYER_CSMODE_85 + { 3, &gPlayerAnim_L_hajikareru }, // PLAYER_CSMODE_86 + { 3, &gPlayerAnim_L_ken_miru }, // PLAYER_CSMODE_87 + { 3, &gPlayerAnim_L_mukinaoru }, // PLAYER_CSMODE_88 + { -1, func_808524B0 }, // PLAYER_CSMODE_89 + { 3, &gPlayerAnim_link_wait_itemD1_20f }, // PLAYER_CSMODE_90 + { -1, func_80852544 }, // PLAYER_CSMODE_91 + { -1, func_80852564 }, // PLAYER_CSMODE_92 + { 3, &gPlayerAnim_link_normal_wait_typeB_20f }, // PLAYER_CSMODE_93 + { -1, func_80852608 }, // PLAYER_CSMODE_94 + { 3, &gPlayerAnim_link_demo_kousan }, // PLAYER_CSMODE_95 + { 3, &gPlayerAnim_link_demo_return_to_past }, // PLAYER_CSMODE_96 + { 3, &gPlayerAnim_link_last_hit_motion1 }, // PLAYER_CSMODE_97 + { 3, &gPlayerAnim_link_last_hit_motion2 }, // PLAYER_CSMODE_98 + { 3, &gPlayerAnim_link_demo_zeldamiru }, // PLAYER_CSMODE_99 + { 3, &gPlayerAnim_link_demo_kenmiru1 }, // PLAYER_CSMODE_100 + { 3, &gPlayerAnim_link_demo_kenmiru2 }, // PLAYER_CSMODE_101 + { 3, &gPlayerAnim_link_demo_kenmiru2_modori }, // PLAYER_CSMODE_102 }; -static struct_80854B18 D_80854E50[] = { - { 0, NULL }, - { -1, func_808514C0 }, - { -1, func_8085157C }, - { -1, func_80851998 }, - { -1, func_808519C0 }, - { 11, NULL }, - { -1, func_80852C50 }, - { -1, func_80852944 }, - { -1, func_80851688 }, - { -1, func_80851750 }, - { -1, func_80851828 }, - { -1, func_808521B8 }, - { -1, func_8085190C }, - { 11, NULL }, - { 11, NULL }, - { 11, NULL }, - { 18, D_80854AF0 }, - { 11, NULL }, - { -1, func_80851A50 }, - { 12, &gPlayerAnim_link_demo_baru_op2 }, - { 11, NULL }, - { 0, NULL }, - { -1, func_80851BE8 }, - { 11, NULL }, - { -1, func_80851CA4 }, - { 11, NULL }, - { 17, &gPlayerAnim_link_normal_okarina_swing }, - { 11, NULL }, - { 11, NULL }, - { 11, NULL }, - { -1, func_80851D80 }, - { -1, func_80851DEC }, - { -1, func_80851E28 }, - { 18, D_80854B00 }, - { -1, func_808513BC }, - { 11, NULL }, - { 11, NULL }, - { 11, NULL }, - { 11, NULL }, - { -1, func_80851ECC }, - { -1, func_80851FB0 }, - { -1, func_80852048 }, - { -1, func_80852174 }, - { 13, &gPlayerAnim_clink_demo_miokuri_wait }, - { -1, func_80852234 }, - { 0, NULL }, - { 0, NULL }, - { 11, NULL }, - { -1, func_80852450 }, - { -1, func_80851688 }, - { -1, func_80852298 }, - { 13, &gPlayerAnim_link_demo_kakeyori_wait }, - { -1, func_80852480 }, - { 13, &gPlayerAnim_link_demo_kakeyori_miokuri_wait }, - { -1, func_80852328 }, - { 11, NULL }, - { 11, NULL }, - { 12, &gPlayerAnim_clink_demo_mimawasi_wait }, - { -1, func_80852358 }, - { 11, NULL }, - { 18, D_80854B14 }, - { 11, NULL }, - { 11, NULL }, - { 11, NULL }, - { 11, NULL }, - { -1, func_80852388 }, - { 17, &gPlayerAnim_demo_link_nwait }, - { 12, &gPlayerAnim_d_link_orowait }, - { 12, &gPlayerAnim_demo_link_nwait }, - { 11, NULL }, - { -1, func_808526EC }, - { 17, &gPlayerAnim_sude_nwait }, - { -1, func_808526EC }, - { 17, &gPlayerAnim_sude_nwait }, - { 12, &gPlayerAnim_link_demo_gurad_wait }, - { 12, &gPlayerAnim_link_demo_look_hand_wait }, - { 11, NULL }, - { 12, &gPlayerAnim_link_demo_ue_wait }, - { 12, &gPlayerAnim_Link_m_wait }, - { 13, &gPlayerAnim_Link_ue_wait }, - { 12, &gPlayerAnim_Link_otituku_w }, - { 12, &gPlayerAnim_L_kw }, - { 11, NULL }, - { 11, NULL }, - { 11, NULL }, - { 11, NULL }, - { -1, func_80852648 }, - { 11, NULL }, - { 12, &gPlayerAnim_L_kennasi_w }, - { -1, func_808524D0 }, - { -1, func_80852514 }, - { -1, func_80852554 }, - { -1, func_808525C0 }, - { 11, NULL }, - { 11, NULL }, - { 11, NULL }, - { -1, func_8085283C }, - { -1, func_808528C8 }, - { -1, func_808528C8 }, - { 12, &gPlayerAnim_link_demo_zeldamiru_wait }, - { 12, &gPlayerAnim_link_demo_kenmiru1_wait }, - { 12, &gPlayerAnim_link_demo_kenmiru2_wait }, - { 12, &gPlayerAnim_demo_link_nwait }, +static struct_80854B18 D_80854E50[PLAYER_CSMODE_MAX] = { + { 0, NULL }, // PLAYER_CSMODE_NONE + { -1, func_808514C0 }, // PLAYER_CSMODE_1 + { -1, func_8085157C }, // PLAYER_CSMODE_2 + { -1, func_80851998 }, // PLAYER_CSMODE_3 + { -1, func_808519C0 }, // PLAYER_CSMODE_4 + { 11, NULL }, // PLAYER_CSMODE_5 + { -1, func_80852C50 }, // PLAYER_CSMODE_6 + { -1, func_80852944 }, // PLAYER_CSMODE_7 + { -1, func_80851688 }, // PLAYER_CSMODE_8 + { -1, func_80851750 }, // PLAYER_CSMODE_9 + { -1, func_80851828 }, // PLAYER_CSMODE_10 + { -1, func_808521B8 }, // PLAYER_CSMODE_11 + { -1, func_8085190C }, // PLAYER_CSMODE_12 + { 11, NULL }, // PLAYER_CSMODE_13 + { 11, NULL }, // PLAYER_CSMODE_14 + { 11, NULL }, // PLAYER_CSMODE_15 + { 18, D_80854AF0 }, // PLAYER_CSMODE_16 + { 11, NULL }, // PLAYER_CSMODE_17 + { -1, func_80851A50 }, // PLAYER_CSMODE_18 + { 12, &gPlayerAnim_link_demo_baru_op2 }, // PLAYER_CSMODE_19 + { 11, NULL }, // PLAYER_CSMODE_20 + { 0, NULL }, // PLAYER_CSMODE_21 + { -1, func_80851BE8 }, // PLAYER_CSMODE_22 + { 11, NULL }, // PLAYER_CSMODE_23 + { -1, func_80851CA4 }, // PLAYER_CSMODE_24 + { 11, NULL }, // PLAYER_CSMODE_25 + { 17, &gPlayerAnim_link_normal_okarina_swing }, // PLAYER_CSMODE_26 + { 11, NULL }, // PLAYER_CSMODE_27 + { 11, NULL }, // PLAYER_CSMODE_28 + { 11, NULL }, // PLAYER_CSMODE_29 + { -1, func_80851D80 }, // PLAYER_CSMODE_30 + { -1, func_80851DEC }, // PLAYER_CSMODE_31 + { -1, func_80851E28 }, // PLAYER_CSMODE_32 + { 18, D_80854B00 }, // PLAYER_CSMODE_33 + { -1, func_808513BC }, // PLAYER_CSMODE_34 + { 11, NULL }, // PLAYER_CSMODE_35 + { 11, NULL }, // PLAYER_CSMODE_36 + { 11, NULL }, // PLAYER_CSMODE_37 + { 11, NULL }, // PLAYER_CSMODE_38 + { -1, func_80851ECC }, // PLAYER_CSMODE_39 + { -1, func_80851FB0 }, // PLAYER_CSMODE_40 + { -1, func_80852048 }, // PLAYER_CSMODE_41 + { -1, func_80852174 }, // PLAYER_CSMODE_42 + { 13, &gPlayerAnim_clink_demo_miokuri_wait }, // PLAYER_CSMODE_43 + { -1, func_80852234 }, // PLAYER_CSMODE_44 + { 0, NULL }, // PLAYER_CSMODE_45 + { 0, NULL }, // PLAYER_CSMODE_46 + { 11, NULL }, // PLAYER_CSMODE_47 + { -1, func_80852450 }, // PLAYER_CSMODE_48 + { -1, func_80851688 }, // PLAYER_CSMODE_49 + { -1, func_80852298 }, // PLAYER_CSMODE_50 + { 13, &gPlayerAnim_link_demo_kakeyori_wait }, // PLAYER_CSMODE_51 + { -1, func_80852480 }, // PLAYER_CSMODE_52 + { 13, &gPlayerAnim_link_demo_kakeyori_miokuri_wait }, // PLAYER_CSMODE_53 + { -1, func_80852328 }, // PLAYER_CSMODE_54 + { 11, NULL }, // PLAYER_CSMODE_55 + { 11, NULL }, // PLAYER_CSMODE_56 + { 12, &gPlayerAnim_clink_demo_mimawasi_wait }, // PLAYER_CSMODE_57 + { -1, func_80852358 }, // PLAYER_CSMODE_58 + { 11, NULL }, // PLAYER_CSMODE_59 + { 18, D_80854B14 }, // PLAYER_CSMODE_60 + { 11, NULL }, // PLAYER_CSMODE_61 + { 11, NULL }, // PLAYER_CSMODE_62 + { 11, NULL }, // PLAYER_CSMODE_63 + { 11, NULL }, // PLAYER_CSMODE_64 + { -1, func_80852388 }, // PLAYER_CSMODE_65 + { 17, &gPlayerAnim_demo_link_nwait }, // PLAYER_CSMODE_66 + { 12, &gPlayerAnim_d_link_orowait }, // PLAYER_CSMODE_67 + { 12, &gPlayerAnim_demo_link_nwait }, // PLAYER_CSMODE_68 + { 11, NULL }, // PLAYER_CSMODE_69 + { -1, func_808526EC }, // PLAYER_CSMODE_70 + { 17, &gPlayerAnim_sude_nwait }, // PLAYER_CSMODE_71 + { -1, func_808526EC }, // PLAYER_CSMODE_72 + { 17, &gPlayerAnim_sude_nwait }, // PLAYER_CSMODE_73 + { 12, &gPlayerAnim_link_demo_gurad_wait }, // PLAYER_CSMODE_74 + { 12, &gPlayerAnim_link_demo_look_hand_wait }, // PLAYER_CSMODE_75 + { 11, NULL }, // PLAYER_CSMODE_76 + { 12, &gPlayerAnim_link_demo_ue_wait }, // PLAYER_CSMODE_77 + { 12, &gPlayerAnim_Link_m_wait }, // PLAYER_CSMODE_78 + { 13, &gPlayerAnim_Link_ue_wait }, // PLAYER_CSMODE_79 + { 12, &gPlayerAnim_Link_otituku_w }, // PLAYER_CSMODE_80 + { 12, &gPlayerAnim_L_kw }, // PLAYER_CSMODE_81 + { 11, NULL }, // PLAYER_CSMODE_82 + { 11, NULL }, // PLAYER_CSMODE_83 + { 11, NULL }, // PLAYER_CSMODE_84 + { 11, NULL }, // PLAYER_CSMODE_85 + { -1, func_80852648 }, // PLAYER_CSMODE_86 + { 11, NULL }, // PLAYER_CSMODE_87 + { 12, &gPlayerAnim_L_kennasi_w }, // PLAYER_CSMODE_88 + { -1, func_808524D0 }, // PLAYER_CSMODE_89 + { -1, func_80852514 }, // PLAYER_CSMODE_90 + { -1, func_80852554 }, // PLAYER_CSMODE_91 + { -1, func_808525C0 }, // PLAYER_CSMODE_92 + { 11, NULL }, // PLAYER_CSMODE_93 + { 11, NULL }, // PLAYER_CSMODE_94 + { 11, NULL }, // PLAYER_CSMODE_95 + { -1, func_8085283C }, // PLAYER_CSMODE_96 + { -1, func_808528C8 }, // PLAYER_CSMODE_97 + { -1, func_808528C8 }, // PLAYER_CSMODE_98 + { 12, &gPlayerAnim_link_demo_zeldamiru_wait }, // PLAYER_CSMODE_99 + { 12, &gPlayerAnim_link_demo_kenmiru1_wait }, // PLAYER_CSMODE_100 + { 12, &gPlayerAnim_link_demo_kenmiru2_wait }, // PLAYER_CSMODE_101 + { 12, &gPlayerAnim_demo_link_nwait }, // PLAYER_CSMODE_102 }; void func_80850ED8(PlayState* play, Player* this, LinkAnimationHeader* anim) { @@ -14052,8 +14064,8 @@ void func_808515A4(PlayState* play, Player* this, CsCmdActorAction* arg2) { void func_80851688(PlayState* play, Player* this, CsCmdActorAction* arg2) { if (func_8084B3CC(play, this) == 0) { - if ((this->csMode == 0x31) && (play->csCtx.state == CS_STATE_IDLE)) { - func_8002DF54(play, NULL, 7); + if ((this->csMode == PLAYER_CSMODE_49) && (play->csCtx.state == CS_STATE_IDLE)) { + func_8002DF54(play, NULL, PLAYER_CSMODE_7); return; } @@ -14112,7 +14124,7 @@ void func_80851828(PlayState* play, Player* this, CsCmdActorAction* arg2) { this->unk_850++; if (this->unk_850 > 20) { - this->csMode = 0xB; + this->csMode = PLAYER_CSMODE_11; } } @@ -14570,7 +14582,7 @@ void func_80852944(PlayState* play, Player* this, CsCmdActorAction* arg2) { } } - this->csMode = 0; + this->csMode = PLAYER_CSMODE_NONE; this->unk_6AD = 0; } @@ -14613,7 +14625,8 @@ void func_80852B4C(PlayState* play, Player* this, CsCmdActorAction* arg2, struct } void func_80852C0C(PlayState* play, Player* this, s32 csMode) { - if ((csMode != 1) && (csMode != 8) && (csMode != 0x31) && (csMode != 7)) { + if ((csMode != PLAYER_CSMODE_1) && (csMode != PLAYER_CSMODE_8) && (csMode != PLAYER_CSMODE_49) && + (csMode != PLAYER_CSMODE_7)) { func_808323B4(play, this); } } @@ -14621,10 +14634,10 @@ void func_80852C0C(PlayState* play, Player* this, s32 csMode) { void func_80852C50(PlayState* play, Player* this, CsCmdActorAction* arg2) { CsCmdActorAction* linkCsAction = play->csCtx.linkAction; s32 pad; - s32 sp24; + s32 csMode; if (play->csCtx.state == CS_STATE_UNSKIPPABLE_INIT) { - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); this->unk_446 = 0; func_80832210(this); return; @@ -14636,9 +14649,9 @@ void func_80852C50(PlayState* play, Player* this, CsCmdActorAction* arg2) { } if (this->unk_446 != linkCsAction->action) { - sp24 = D_808547C4[linkCsAction->action]; - if (sp24 >= 0) { - if ((sp24 == 3) || (sp24 == 4)) { + csMode = D_808547C4[linkCsAction->action]; + if (csMode >= 0) { + if ((csMode == PLAYER_CSMODE_3) || (csMode == PLAYER_CSMODE_4)) { func_80852A54(play, this, linkCsAction); } else { func_808529D0(play, this, linkCsAction); @@ -14648,17 +14661,17 @@ void func_80852C50(PlayState* play, Player* this, CsCmdActorAction* arg2) { D_80858AA0 = this->skelAnime.moveFlags; func_80832DBC(this); - osSyncPrintf("TOOL MODE=%d\n", sp24); - func_80852C0C(play, this, ABS(sp24)); - func_80852B4C(play, this, linkCsAction, &D_80854B18[ABS(sp24)]); + osSyncPrintf("TOOL MODE=%d\n", csMode); + func_80852C0C(play, this, ABS(csMode)); + func_80852B4C(play, this, linkCsAction, &D_80854B18[ABS(csMode)]); this->unk_850 = 0; this->unk_84F = 0; this->unk_446 = linkCsAction->action; } - sp24 = D_808547C4[this->unk_446]; - func_80852B4C(play, this, linkCsAction, &D_80854E50[ABS(sp24)]); + csMode = D_808547C4[this->unk_446]; + func_80852B4C(play, this, linkCsAction, &D_80854E50[ABS(csMode)]); } void func_80852E14(Player* this, PlayState* play) { @@ -14751,7 +14764,7 @@ void func_80853148(PlayState* play, Actor* actor) { this->exchangeItemId = EXCH_ITEM_NONE; if (actor->textId == 0xFFFF) { - func_8002DF54(play, actor, 1); + func_8002DF54(play, actor, PLAYER_CSMODE_1); actor->flags |= ACTOR_FLAG_8; func_80832528(play, this); } else { diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_collect.c b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_collect.c index 7e3e692339..27bfac2782 100644 --- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_collect.c +++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_collect.c @@ -48,11 +48,11 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) { static u8 sPlayedSongBtns[SONG_MAX_LENGTH] = { 0 }; static s32 sUnused1 = 0; static void* sOcarinaBtnTextures[] = { - gOcarinaATex, // OCARINA_BTN_A - gOcarinaCDownTex, // OCARINA_BTN_C_DOWN - gOcarinaCRightTex, // OCARINA_BTN_C_RIGHT - gOcarinaCLeftTex, // OCARINA_BTN_C_LEFT - gOcarinaCUpTex, // OCARINA_BTN_C_UP + gOcarinaBtnIconATex, // OCARINA_BTN_A + gOcarinaBtnIconCDownTex, // OCARINA_BTN_C_DOWN + gOcarinaBtnIconCRightTex, // OCARINA_BTN_C_RIGHT + gOcarinaBtnIconCLeftTex, // OCARINA_BTN_C_LEFT + gOcarinaBtnIconCUpTex, // OCARINA_BTN_C_UP }; static u16 D_8082A144[] = { 0xFFCC, 0xFFCC, 0xFFCC, 0xFFCC, 0xFFCC, @@ -472,7 +472,8 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) { gDPSetEnvColor(POLY_OPA_DISP++, sMedEnvRed[j], sMedEnvGreen[j], sMedEnvBlue[j], 0); gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[bufI], 4, 0); - KaleidoScope_DrawQuadTextureRGBA32(gfxCtx, gItemIcons[ITEM_MEDALLION_FOREST + j], 24, 24, 0); + KaleidoScope_DrawQuadTextureRGBA32(gfxCtx, gItemIcons[ITEM_MEDALLION_FOREST + j], QUEST_ICON_WIDTH, + QUEST_ICON_HEIGHT, 0); } } @@ -528,7 +529,8 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) { for (j = 0; j < QUEST_STONE_OF_AGONY - QUEST_KOKIRI_EMERALD; j++, bufI += 4) { if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD + j)) { gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[bufI], 4, 0); - KaleidoScope_DrawQuadTextureRGBA32(gfxCtx, gItemIcons[ITEM_KOKIRI_EMERALD + j], 24, 24, 0); + KaleidoScope_DrawQuadTextureRGBA32(gfxCtx, gItemIcons[ITEM_KOKIRI_EMERALD + j], QUEST_ICON_WIDTH, + QUEST_ICON_HEIGHT, 0); } } @@ -541,7 +543,8 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) { if (CHECK_QUEST_ITEM(QUEST_STONE_OF_AGONY + j)) { gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[bufI], 4, 0); gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha); - KaleidoScope_DrawQuadTextureRGBA32(gfxCtx, gItemIcons[ITEM_STONE_OF_AGONY + j], 24, 24, 0); + KaleidoScope_DrawQuadTextureRGBA32(gfxCtx, gItemIcons[ITEM_STONE_OF_AGONY + j], QUEST_ICON_WIDTH, + QUEST_ICON_HEIGHT, 0); } } @@ -601,7 +604,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) { POLY_OPA_DISP = KaleidoScope_QuadTextureIA8( POLY_OPA_DISP, - gItemIcons[0x79 + + gItemIcons[ITEM_HEART_PIECE_2 - 1 + (((gSaveContext.inventory.questItems & 0xF0000000) & 0xF0000000) >> QUEST_HEART_PIECE_COUNT)], 48, 48, 0); } diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c index 65564a79a6..be64be6cf2 100644 --- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c +++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c @@ -634,7 +634,8 @@ void KaleidoScope_DrawEquipment(PlayState* play) { if (1) {} if ((point != 0) && (CUR_UPG_VALUE(sChildUpgrades[i]) != 0)) { KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx, - gItemIcons[sChildUpgradeItemBases[i] + point - 1], 32, 32, 0); + gItemIcons[sChildUpgradeItemBases[i] + point - 1], ITEM_ICON_WIDTH, + ITEM_ICON_HEIGHT, 0); } } else { if ((i == 0) && (CUR_UPG_VALUE(sAdultUpgrades[i]) == 0)) { @@ -642,11 +643,11 @@ void KaleidoScope_DrawEquipment(PlayState* play) { //! @bug This assumes adult always has bullet bag KaleidoScope_DrawQuadTextureRGBA32( play->state.gfxCtx, gItemIcons[sChildUpgradeItemBases[i] + CUR_UPG_VALUE(sChildUpgrades[i]) - 1], - 32, 32, 0); + ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 0); } else if (CUR_UPG_VALUE(sAdultUpgrades[i]) != 0) { KaleidoScope_DrawQuadTextureRGBA32( play->state.gfxCtx, gItemIcons[sAdultUpgradeItemBases[i] + CUR_UPG_VALUE(sAdultUpgrades[i]) - 1], - 32, 32, 0); + ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 0); } } @@ -659,13 +660,15 @@ void KaleidoScope_DrawEquipment(PlayState* play) { for (k = 0, bit = rowStart, point = 4; k < 3; k++, point += 4, temp++, bit++) { if (((u32)i == EQUIP_TYPE_SWORD) && (k == EQUIP_INV_SWORD_BGS) && gSaveContext.bgsFlag) { - KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx, gBiggoronSwordIconTex, 32, 32, point); + KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx, gItemIconSwordBiggoronTex, ITEM_ICON_WIDTH, + ITEM_ICON_HEIGHT, point); } else if ((i == EQUIP_TYPE_SWORD) && (k == EQUIP_INV_SWORD_BGS) && (gBitFlags[bit + 1] & gSaveContext.inventory.equipment)) { - KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx, gBrokenGiantsKnifeIconTex, 32, 32, point); + KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx, gItemIconBrokenGiantsKnifeTex, ITEM_ICON_WIDTH, + ITEM_ICON_HEIGHT, point); } else if (gBitFlags[bit] & gSaveContext.inventory.equipment) { - KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx, gItemIcons[ITEM_SWORD_KOKIRI + temp], 32, 32, - point); + KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx, gItemIcons[ITEM_SWORD_KOKIRI + temp], + ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, point); } } } diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c index 67fe673c10..acd07de7ea 100644 --- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c +++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c @@ -529,8 +529,8 @@ void KaleidoScope_DrawItemSelect(PlayState* play) { } gSPVertex(POLY_OPA_DISP++, &pauseCtx->itemVtx[j + 0], 4, 0); - KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx, gItemIcons[gSaveContext.inventory.items[i]], 32, 32, - 0); + KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx, gItemIcons[gSaveContext.inventory.items[i]], + ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 0); } } diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map_PAL.c b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map_PAL.c index 8ae463bd00..b4cafbfda5 100644 --- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map_PAL.c +++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map_PAL.c @@ -9,9 +9,9 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) { static void* dungeonItemTexs[] = { - gBossKeyIconTex, - gCompassIconTex, - gDungeonMapIconTex, + gQuestIconDungeonBossKeyTex, + gQuestIconDungeonCompassTex, + gQuestIconDungeonMapTex, }; static void* dungeonTitleTexs[] = { gPauseDekuTitleENGTex, gPauseDodongoTitleENGTex, gPauseJabuTitleENGTex, gPauseForestTitleENGTex, @@ -314,7 +314,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) { gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha); if (GET_GS_FLAGS(gSaveContext.mapIndex) == gAreaGsFlags[gSaveContext.mapIndex]) { - KaleidoScope_DrawQuadTextureRGBA32(gfxCtx, gGoldSkulltulaIconTex, 24, 24, 8); + KaleidoScope_DrawQuadTextureRGBA32(gfxCtx, gQuestIconGoldSkulltulaTex, QUEST_ICON_WIDTH, QUEST_ICON_HEIGHT, 8); } if ((play->sceneId >= SCENE_DEKU_TREE) && (play->sceneId <= SCENE_TREASURE_BOX_SHOP)) { diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c index 97cc502216..d1b5544478 100644 --- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c +++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c @@ -1780,7 +1780,8 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) { gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha); gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 0); - KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx, gGoldSkulltulaIconTex, 24, 24, 0); + KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx, gQuestIconGoldSkulltulaTex, QUEST_ICON_WIDTH, + QUEST_ICON_HEIGHT, 0); } } } else if ((pauseCtx->mainState < PAUSE_MAIN_STATE_3) /* PAUSE_MAIN_STATE_IDLE, PAUSE_MAIN_STATE_SWITCHING_PAGE, @@ -3538,7 +3539,8 @@ void KaleidoScope_Update(PlayState* play) { for (i = 0; i < ARRAY_COUNTU(gItemAgeReqs); i++) { if (!CHECK_AGE_REQ_ITEM(i)) { - KaleidoScope_GrayOutTextureRGBA32(SEGMENTED_TO_VIRTUAL(gItemIcons[i]), 0x400); + KaleidoScope_GrayOutTextureRGBA32(SEGMENTED_TO_VIRTUAL(gItemIcons[i]), + ITEM_ICON_WIDTH * ITEM_ICON_HEIGHT); } } diff --git a/tools/namefixer.py b/tools/namefixer.py index 859ee14899..150d094c44 100755 --- a/tools/namefixer.py +++ b/tools/namefixer.py @@ -238,6 +238,9 @@ wordReplace = { "func_8002E0D0": "Actor_ActorAIsFacingActorB", "func_8002E12C": "Actor_IsFacingAndNearPlayer", "func_8002E1A8": "Actor_ActorAIsFacingAndNearActorB", + "func_8002F434": "Actor_OfferGetItem", + "func_8002F554": "Actor_OfferGetItemNearby", + "func_8002F580": "Actor_OfferCarry", "func_80033A84": "Actor_IsTargeted", "func_80033AB8": "Actor_OtherIsTargeted", "func_80035650": "Actor_SetDropFlag",