mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
Obj_Lightswitch (Sunswitch and Stonetower Temple flip switch) (#107)
* ObjLightswitch: fast * ObjLightswitch: data migrated, except collider init is broke * ObjLightswitch: nvm, collider documented * ObjLightswitch: OK with 3 non-equiv, docs starting * ObjLightswitch: more docs * ObjLightswitch: some requested changes * ObjLightswitch: requested changes Co-authored-by: isghj8 <isghj8@gmail.com>
This commit is contained in:
+3
-2
@@ -668,7 +668,8 @@ void EffectSsKakera_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity,
|
||||
// void EffectSsEnFire_SpawnVec3f(UNK_TYPE4 uParm1, Actor* pzParm2, Vec3f* pzParm3, UNK_TYPE2 uParm4, UNK_TYPE2 param_5, UNK_TYPE2 param_6, UNK_TYPE2 param_7);
|
||||
// void EffectSsEnFire_SpawnVec3s(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE2 param_6, UNK_TYPE2 param_7);
|
||||
// void EffectSsExtra_Spawn(UNK_TYPE4 uParm1, Vec3f* pzParm2, Vec3f* pzParm3, Vec3f* pzParm4, UNK_TYPE2 param_5, UNK_TYPE2 param_6);
|
||||
// void EffectSsDeadDb_Spawn(UNK_TYPE4 uParm1, Vec3f* pzParm2, Vec3f* pzParm3, Vec3f* pzParm4, UNK_TYPE1* param_5, UNK_TYPE1* param_6, UNK_TYPE2 param_7, UNK_TYPE2 param_8, UNK_TYPE4 param_9);
|
||||
void EffectSsDeadDb_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* prim, Color_RGBA8* env,
|
||||
s16 scale, s16 scaleStep, s32 unk);
|
||||
// void func_800B3030(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE2 param_6, UNK_TYPE4 param_7);
|
||||
// void EffectSsDeadDd_Spawn(UNK_TYPE4 uParm1, Vec3f* pzParm2, Vec3f* pzParm3, Vec3f* pzParm4, UNK_TYPE1* param_5, UNK_TYPE1* param_6, UNK_TYPE2 param_7, UNK_TYPE2 param_8, UNK_TYPE2 param_9, UNK_TYPE4 param_10);
|
||||
// void EffectSsDeadDs_Spawn(UNK_TYPE4 uParm1, Vec3f* pzParm2, Vec3f* pzParm3, Vec3f* pzParm4, UNK_TYPE2 param_5, UNK_TYPE2 param_6, UNK_TYPE2 param_7, UNK_TYPE4 param_8);
|
||||
@@ -826,7 +827,7 @@ void func_800B8C50(Actor* actor, GlobalContext* globalCtx);
|
||||
// void func_800B8E1C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
|
||||
// void func_800B8E58(void);
|
||||
// void func_800B8FC0(void);
|
||||
void func_800B9010(Actor* actor, UNK_TYPE2 uParm2);
|
||||
void func_800B9010(Actor* actor, s16 sfxId);
|
||||
// void func_800B9038(void);
|
||||
// void func_800B9084(void);
|
||||
void func_800B9098(Actor* actor);
|
||||
|
||||
@@ -2506,7 +2506,7 @@ SECTIONS
|
||||
ovl_Obj_Lightswitch : AT(RomLocation)
|
||||
{
|
||||
build/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.o(.text)
|
||||
build/asm/overlays/ovl_Obj_Lightswitch_data.o(.data)
|
||||
build/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.o(.data)
|
||||
build/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.o(.rodata)
|
||||
build/asm/overlays/ovl_Obj_Lightswitch_rodata.o(.rodata)
|
||||
}
|
||||
|
||||
@@ -130,6 +130,11 @@ D_06007750 = 0x06007750;
|
||||
D_0600A390 = 0x0600A390;
|
||||
D_0600A490 = 0x0600A490;
|
||||
|
||||
/* obj_lightswitch */
|
||||
D_06000C20 = 0x6000C20;
|
||||
D_06000420 = 0x6000420;
|
||||
D_06001420 = 0x6001420;
|
||||
|
||||
/* z_obj_kepn_koya */
|
||||
D_0600805C = 0x0600805C;
|
||||
D_06003478 = 0x06003478;
|
||||
@@ -200,4 +205,4 @@ D_06000710 = 0x06000710;
|
||||
D_06000958 = 0x06000958;
|
||||
|
||||
/* z_en_jc_mato */
|
||||
D_06000390 = 0x06000390;
|
||||
D_06000390 = 0x06000390;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,13 +3,55 @@
|
||||
|
||||
#include <global.h>
|
||||
|
||||
typedef void (*ObjLightswitchActionFunc)(struct ObjLightswitch*, GlobalContext*);
|
||||
typedef void (*ObjLightswitchSetupFunc)(struct ObjLightswitch*);
|
||||
|
||||
struct ObjLightswitch;
|
||||
|
||||
typedef struct ObjLightswitch {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ char unk_144[0x7C];
|
||||
/* 0x144 */ ColliderJntSph collider;
|
||||
/* 0x164 */ ColliderJntSphElement elements;
|
||||
/* 0x1A4 */ ObjLightswitchActionFunc actionFunc;
|
||||
/* 0x1A8 */ s16 colorR; // not RGBA8 as 4x s16 (not 4x s8)
|
||||
/* 0x1AA */ s16 colorG;
|
||||
/* 0x1AC */ s16 colorB;
|
||||
/* 0x1AE */ s16 colorAlpha;
|
||||
/* 0x1B0 */ s16 edgeRot;
|
||||
/* 0x1B2 */ s16 edgeRotSpeed;
|
||||
/* 0x1B4 */ s8 colorShiftTimer;
|
||||
/* 0x1B5 */ s8 hitState;
|
||||
/* 0x1B6 */ s8 faceState;
|
||||
/* 0x1B7 */ u8 previousACFlags;
|
||||
/* 0x1B8 */ ObjLightswitchSetupFunc setupFunc;
|
||||
/* 0x1BC */ s8 switchFlagSetType; // 1 or 0 , for set or unset flags
|
||||
/* 0x1BD */ s8 cutsceneTimer;
|
||||
|
||||
} ObjLightswitch; // size = 0x1C0
|
||||
|
||||
extern const ActorInit Obj_Lightswitch_InitVars;
|
||||
|
||||
extern Gfx D_06000C20[];
|
||||
extern Gfx D_06000420[];
|
||||
extern Gfx D_06001420[];
|
||||
|
||||
// opa func
|
||||
extern s32 D_801AEFA0;
|
||||
|
||||
// xlu func
|
||||
extern s32 D_801AEF88;
|
||||
|
||||
#define LIGHTSWITCH_FACE_ASLEEP 0
|
||||
#define LIGHTSWITCH_FACE_WAKING 1
|
||||
#define LIGHTSWITCH_FACE_FULLAWAKE 2
|
||||
|
||||
#define LIGHTSWITCH_TYPE_REGULAR 0
|
||||
#define LIGHTSWITCH_TYPE_FLIP 1
|
||||
#define LIGHTSWITCH_TYPE_UNK2 2
|
||||
#define LIGHTSWITCH_TYPE_FAKE 3
|
||||
|
||||
#define GET_LIGHTSWITCH_TYPE(this) (((this)->actor.params >> 4) & 0x3)
|
||||
#define GET_LIGHTSWITCH_INVISIBLE(this) (((this)->actor.params >> 3) & 1)
|
||||
#define GET_LIGHTSWITCH_SWITCHFLAG(this) (((this)->actor.params >> 8) & 0x7F)
|
||||
|
||||
#endif // Z_OBJ_LIGHTSWITCH_H
|
||||
|
||||
+17
-17
@@ -7807,26 +7807,26 @@
|
||||
0x8095FB38:("ObjHana_Destroy",),
|
||||
0x8095FB48:("ObjHana_Update",),
|
||||
0x8095FB58:("ObjHana_Draw",),
|
||||
0x8095FBF0:("func_8095FBF0",),
|
||||
0x8095FC94:("func_8095FC94",),
|
||||
0x8095FCEC:("func_8095FCEC",),
|
||||
0x8095FBF0:("ObjLightswitch_InitCollider",),
|
||||
0x8095FC94:("ObjLightswitch_UpdateSwitchFlags",),
|
||||
0x8095FCEC:("ObjLightswitch_SpawnEffects",),
|
||||
0x8095FEEC:("ObjLightswitch_Init",),
|
||||
0x8095FFCC:("ObjLightswitch_Destroy",),
|
||||
0x8095FFF8:("func_8095FFF8",),
|
||||
0x80960014:("func_80960014",),
|
||||
0x80960088:("func_80960088",),
|
||||
0x809600BC:("func_809600BC",),
|
||||
0x8096012C:("func_8096012C",),
|
||||
0x80960148:("func_80960148",),
|
||||
0x80960224:("func_80960224",),
|
||||
0x80960260:("func_80960260",),
|
||||
0x8096034C:("func_8096034C",),
|
||||
0x80960370:("func_80960370",),
|
||||
0x80960424:("func_80960424",),
|
||||
0x80960440:("func_80960440",),
|
||||
0x8095FFF8:("ObjLightswitch_SetAction",),
|
||||
0x80960014:("ObjLightswitch_PlayCinema",),
|
||||
0x80960088:("ObjLightswitch_SetupIdle",),
|
||||
0x809600BC:("ObjLightswitch_Idle",),
|
||||
0x8096012C:("ObjLightSwitch_SetupAsleep",),
|
||||
0x80960148:("ObjLightSwitch_Asleep",),
|
||||
0x80960224:("ObjLightSwitch_SetupEnabled",),
|
||||
0x80960260:("ObjLightSwitch_Enabled",),
|
||||
0x8096034C:("ObjLightSwitch_SetupDisabled",),
|
||||
0x80960370:("ObjLightSwitch_Disabled",),
|
||||
0x80960424:("ObjLightSwitch_SetupFade",),
|
||||
0x80960440:("ObjLightSwitch_Fade",),
|
||||
0x80960494:("ObjLightswitch_Update",),
|
||||
0x809605F4:("func_809605F4",),
|
||||
0x80960880:("func_80960880",),
|
||||
0x809605F4:("ObjLightSwitch_DrawOpa",),
|
||||
0x80960880:("ObjLightSwitch_DrawXlu",),
|
||||
0x80960B0C:("ObjLightswitch_Draw",),
|
||||
0x80960CF0:("func_80960CF0",),
|
||||
0x80960E0C:("func_80960E0C",),
|
||||
|
||||
@@ -9481,9 +9481,9 @@
|
||||
0x80960B70:("Obj_Lightswitch_InitVars","UNK_TYPE1","",0x1),
|
||||
0x80960B90:("D_80960B90","UNK_TYPE1","",0x1),
|
||||
0x80960BB4:("D_80960BB4","UNK_TYPE1","",0x1),
|
||||
0x80960BC4:("D_80960BC4","UNK_TYPE1","",0x1),
|
||||
0x80960BD0:("D_80960BD0","UNK_TYPE1","",0x1),
|
||||
0x80960BD4:("D_80960BD4","UNK_TYPE1","",0x1),
|
||||
0x80960BC4:("lightswitchFaceGfx","UNK_TYPE1","",0x1),
|
||||
0x80960BD0:("lightswitchEffectPrimColor","UNK_TYPE1","",0x1),
|
||||
0x80960BD4:("lightswitchEffectEnvColor","UNK_TYPE1","",0x1),
|
||||
0x80960BD8:("D_80960BD8","UNK_TYPE1","",0x1),
|
||||
0x80960BF0:("D_80960BF0","f32","",0x4),
|
||||
0x80960C00:("objLightswitchOverlayInfo","OverlayRelocationSection","",0x14),
|
||||
|
||||
Reference in New Issue
Block a user