mirror of
https://github.com/zeldaret/oot
synced 2026-05-27 16:13:31 -04:00
Actor Struct Changes (and a few related things) (#617)
* reformat header * type -> category * done for now i think * some more stuff * first -> head * focus * flag comment * ground -> floor * remove asm, name wrapper funcs * name func, format * review * targetPriority, format * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "0305ec2c2" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "0305ec2c2" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * comment * review * feet flags * horse shadow
This commit is contained in:
+89
-57
@@ -347,12 +347,13 @@ void EffectSsIceSmoke_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocit
|
||||
void FlagSet_Update(GlobalContext* globalCtx);
|
||||
void Overlay_LoadGameState(GameStateOverlay* overlayEntry);
|
||||
void Overlay_FreeGameState(GameStateOverlay* overlayEntry);
|
||||
void ActorShape_Init(ActorShape* shape, f32 arg1, void* shadowDrawFunc, f32 arg3);
|
||||
void ActorShadow_DrawFunc_Circle(Actor* actor, Lights* lights, GlobalContext* globalCtx);
|
||||
void ActorShadow_DrawFunc_WhiteCircle(Actor* actor, Lights* lights, GlobalContext* globalCtx);
|
||||
void ActorShadow_DrawFunc_Squiggly(Actor* actor, Lights* lights, GlobalContext* globalCtx);
|
||||
void ActorShadow_DrawFunc_Teardrop(Actor* actor, Lights* lights, GlobalContext* globalCtx);
|
||||
void func_8002BDB0(Actor* actor, s32 arg1, s32 arg2, Vec3f* arg3, s32 arg4, Vec3f* arg5);
|
||||
void ActorShape_Init(ActorShape* shape, f32 yOffset, ActorShadowFunc* shadowDraw, f32 shadowScale);
|
||||
void ActorShadow_DrawCircle(Actor* actor, Lights* lights, GlobalContext* globalCtx);
|
||||
void ActorShadow_DrawWhiteCircle(Actor* actor, Lights* lights, GlobalContext* globalCtx);
|
||||
void ActorShadow_DrawHorse(Actor* actor, Lights* lights, GlobalContext* globalCtx);
|
||||
void ActorShadow_DrawFeet(Actor* actor, Lights* lights, GlobalContext* globalCtx);
|
||||
void Actor_SetFeetPos(Actor* actor, s32 limbIndex, s32 leftFootIndex, Vec3f* leftFootPos, s32 rightFootIndex,
|
||||
Vec3f* rightFootPos);
|
||||
void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx);
|
||||
s32 Flags_GetSwitch(GlobalContext* globalCtx, s32 flag);
|
||||
void Flags_SetSwitch(GlobalContext* globalCtx, s32 flag);
|
||||
@@ -376,7 +377,7 @@ void TitleCard_InitPlaceName(GlobalContext* globalCtx, TitleCardContext* titleCt
|
||||
s32 arg5, s32 arg6, s32 arg7);
|
||||
s32 func_8002D53C(GlobalContext* globalCtx, TitleCardContext* titleCtx);
|
||||
void Actor_Kill(Actor* actor);
|
||||
void Actor_SetHeight(Actor* actor, f32 offset);
|
||||
void Actor_SetFocus(Actor* actor, f32 offset);
|
||||
void Actor_SetScale(Actor* actor, f32 scale);
|
||||
void Actor_SetObjectDependency(GlobalContext* globalCtx, Actor* actor);
|
||||
void func_8002D7EC(Actor* actor);
|
||||
@@ -385,14 +386,14 @@ void Actor_MoveForward(Actor* actor);
|
||||
void func_8002D908(Actor* actor);
|
||||
void func_8002D97C(Actor* actor);
|
||||
void func_8002D9A4(Actor* actor, f32 arg1);
|
||||
s16 func_8002DA78(Actor* actorA, Actor* actorB);
|
||||
s16 func_8002DAC0(Actor* actor, Vec3f* arg1);
|
||||
f32 func_8002DB48(Actor* actorA, Actor* actorB);
|
||||
f32 func_8002DB6C(Actor* actor, Vec3f* arg1);
|
||||
s16 func_8002DAE0(Actor* actorA, Actor* actorB);
|
||||
s16 func_8002DB28(Actor* actor, Vec3f* arg1);
|
||||
f32 func_8002DB8C(Actor* actorA, Actor* actorB);
|
||||
f32 func_8002DBB0(Actor* actor, Vec3f* arg1);
|
||||
s16 Actor_WorldYawTowardActor(Actor* actorA, Actor* actorB);
|
||||
s16 Actor_WorldYawTowardPoint(Actor* actor, Vec3f* refPoint);
|
||||
f32 Actor_WorldDistXYZToActor(Actor* actorA, Actor* actorB);
|
||||
f32 Actor_WorldDistXYZToPoint(Actor* actor, Vec3f* refPoint);
|
||||
s16 Actor_WorldPitchTowardActor(Actor* actorA, Actor* actorB);
|
||||
s16 Actor_WorldPitchTowardPoint(Actor* actor, Vec3f* refPoint);
|
||||
f32 Actor_WorldDistXZToActor(Actor* actorA, Actor* actorB);
|
||||
f32 Actor_WorldDistXZToPoint(Actor* actor, Vec3f* refPoint);
|
||||
void func_8002DBD0(Actor* actor, Vec3f* result, Vec3f* arg2);
|
||||
f32 Actor_HeightDiff(Actor* actorA, Actor* actorB);
|
||||
f32 Player_GetHeight(Player* player);
|
||||
@@ -414,14 +415,14 @@ s32 func_8002DFC8(Actor* actor, s16 arg1, GlobalContext* globalCtx);
|
||||
s32 func_8002E084(Actor* actor, s16 arg1);
|
||||
s32 func_8002E12C(Actor* actor, f32 arg1, s16 arg2);
|
||||
s32 func_8002E1A8(Actor* actorA, Actor* actorB, f32 arg2, s16 arg3);
|
||||
void func_8002E4B4(GlobalContext* globalCtx, Actor* actor, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
|
||||
void Actor_UpdateBgCheckInfo(GlobalContext* globalCtx, Actor* actor, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
|
||||
Hilite* func_8002EABC(Vec3f* object, Vec3f* eye, Vec3f* lightDir, GraphicsContext* gfxCtx);
|
||||
Hilite* func_8002EB44(Vec3f* object, Vec3f* eye, Vec3f* lightDir, GraphicsContext* gfxCtx);
|
||||
void func_8002EBCC(Actor* actor, GlobalContext* globalCtx, s32 flag);
|
||||
void func_8002ED80(Actor* actor, GlobalContext* globalCtx, s32 flag);
|
||||
PosRot* func_8002EEE4(PosRot* arg0, Actor* actor);
|
||||
PosRot* func_8002EF14(PosRot* arg0, Actor* actor);
|
||||
PosRot* func_8002EF44(PosRot* arg0, Actor* actor);
|
||||
PosRot* Actor_GetFocus(PosRot* arg0, Actor* actor);
|
||||
PosRot* Actor_GetWorld(PosRot* arg0, Actor* actor);
|
||||
PosRot* Actor_GetWorldPosShapeRot(PosRot* arg0, Actor* actor);
|
||||
s32 func_8002F0C8(Actor* actor, Player* player, s32 arg2);
|
||||
u32 func_8002F194(Actor* actor, GlobalContext* globalCtx);
|
||||
s32 func_8002F1C4(Actor* actor, GlobalContext* globalCtx, f32 arg2, f32 arg3, u32 arg4);
|
||||
@@ -469,7 +470,7 @@ void Actor_SpawnTransitionActors(GlobalContext* globalCtx, ActorContext* actorCt
|
||||
Actor* Actor_SpawnEntry(ActorContext* actorCtx, ActorEntry* actorEntry, GlobalContext* globalCtx);
|
||||
Actor* Actor_Delete(ActorContext* actorCtx, Actor* actor, GlobalContext* globalCtx);
|
||||
Actor* func_80032AF0(GlobalContext* globalCtx, ActorContext* actorCtx, Actor** actorPtr, Player* player);
|
||||
Actor* Actor_Find(ActorContext* actorCtx, s32 actorId, s32 actorType);
|
||||
Actor* Actor_Find(ActorContext* actorCtx, s32 actorId, s32 actorCategory);
|
||||
void func_80032C7C(GlobalContext* globalCtx, Actor* actor);
|
||||
void func_80032E24(struct_80032E24* arg0, s32 arg1, GlobalContext* globalCtx);
|
||||
void func_80032F54(struct_80032E24* arg0, s32 arg1, s32 arg2, s32 arg3, u32 arg4, Gfx** dList, s16 arg6);
|
||||
@@ -480,7 +481,7 @@ void func_80033480(GlobalContext* globalCtx, Vec3f* arg1, f32 arg2, s32 arg3, s1
|
||||
Actor* Actor_GetCollidedExplosive(GlobalContext* globalCtx, Collider* collider);
|
||||
Actor* func_80033684(GlobalContext* globalCtx, Actor* explosiveActor);
|
||||
Actor* func_80033780(GlobalContext* globalCtx, Actor* refActor, f32 arg2);
|
||||
void Actor_ChangeType(GlobalContext* globalCtx, ActorContext* actorCtx, Actor* actor, u8 actorType);
|
||||
void Actor_ChangeCategory(GlobalContext* globalCtx, ActorContext* actorCtx, Actor* actor, u8 actorCategory);
|
||||
void Actor_SetTextWithPrefix(GlobalContext* globalCtx, Actor* actor, s16 textIdLower);
|
||||
s16 func_800339B8(Actor* actor, GlobalContext* globalCtx, f32 arg2, s16 arg3);
|
||||
s32 func_80033A84(GlobalContext* globalCtx, Actor* actor);
|
||||
@@ -511,7 +512,7 @@ void func_80034F54(GlobalContext* globalCtx, s16* arg1, s16* arg2, s32 arg3);
|
||||
void Actor_Noop(Actor* actor, GlobalContext* globalCtx);
|
||||
void Gfx_DrawDListOpa(GlobalContext* globalCtx, Gfx* dlist);
|
||||
void Gfx_DrawDListXlu(GlobalContext* globalCtx, Gfx* dlist);
|
||||
Actor* Actor_FindNearby(GlobalContext* globalCtx, Actor* refActor, s16 actorId, u8 actorType, f32 range);
|
||||
Actor* Actor_FindNearby(GlobalContext* globalCtx, Actor* refActor, s16 actorId, u8 actorCategory, f32 range);
|
||||
s32 func_800354B4(GlobalContext* globalCtx, Actor* actor, f32 range, s16 arg3, s16 arg4, s16 arg5);
|
||||
void func_8003555C(GlobalContext* globalCtx, Vec3f* arg1, Vec3f* arg2, Vec3f* arg3);
|
||||
void func_800355B8(GlobalContext* globalCtx, Vec3f* arg1);
|
||||
@@ -560,8 +561,10 @@ void CollisionPoly_GetVerticesByBgId(CollisionPoly* poly, s32 bgId, CollisionCon
|
||||
// ? func_8003992C(?);
|
||||
// ? BgCheck_ComputeWallDisplacement(?);
|
||||
// ? BgCheck_SphVsStaticWall(?);
|
||||
s32 BgCheck_CheckStaticCeiling(StaticLookup* lookup, u16 xpFlags, CollisionContext* colCtx, f32* outY, Vec3f* pos, f32 checkHeight, CollisionPoly** outPoly);
|
||||
s32 func_8003A5B8(SSList* headNodeId, CollisionContext* colCtx, u16 xpFlags1, u16 xpFlags2, Vec3f* posA, Vec3f* posB, Vec3f* outPos, CollisionPoly** outPoly, f32* outDistSq, f32 chkDist, s32 bccFlags);
|
||||
s32 BgCheck_CheckStaticCeiling(StaticLookup* lookup, u16 xpFlags, CollisionContext* colCtx, f32* outY, Vec3f* pos,
|
||||
f32 checkHeight, CollisionPoly** outPoly);
|
||||
s32 func_8003A5B8(SSList* headNodeId, CollisionContext* colCtx, u16 xpFlags1, u16 xpFlags2, Vec3f* posA, Vec3f* posB,
|
||||
Vec3f* outPos, CollisionPoly** outPoly, f32* outDistSq, f32 chkDist, s32 bccFlags);
|
||||
// ? func_8003A7D8(?);
|
||||
// ? BgCheck_SphVsFirstStaticPolyList(?);
|
||||
// ? BgCheck_SphVsFirstStaticPoly(?);
|
||||
@@ -580,37 +583,60 @@ void BgCheck_Allocate(CollisionContext* colCtx, GlobalContext* globalCtx, Collis
|
||||
// ? BgCheck_GetCollisionHeader(?);
|
||||
s32 BgCheck_PosInStaticBoundingBox(CollisionContext* colCtx, Vec3f* pos);
|
||||
f32 BgCheck_EntityRaycastFloor1(CollisionContext* colCtx, CollisionPoly** outPoly, Vec3f* pos);
|
||||
f32 BgCheck_EntityRaycastFloor2(GlobalContext* globalCtx, CollisionContext* colCtx, CollisionPoly** outPoly, Vec3f* pos);
|
||||
f32 BgCheck_EntityRaycastFloor2(GlobalContext* globalCtx, CollisionContext* colCtx, CollisionPoly** outPoly,
|
||||
Vec3f* pos);
|
||||
f32 BgCheck_EntityRaycastFloor3(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos);
|
||||
f32 BgCheck_EntityRaycastFloor4(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* arg4);
|
||||
f32 BgCheck_EntityRaycastFloor5(GlobalContext* globalCtx, CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos);
|
||||
f32 BgCheck_EntityRaycastFloor6(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos, f32 chkDist);
|
||||
f32 BgCheck_EntityRaycastFloor4(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor,
|
||||
Vec3f* arg4);
|
||||
f32 BgCheck_EntityRaycastFloor5(GlobalContext* globalCtx, CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId,
|
||||
Actor* actor, Vec3f* pos);
|
||||
f32 BgCheck_EntityRaycastFloor6(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos,
|
||||
f32 chkDist);
|
||||
f32 BgCheck_EntityRaycastFloor7(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos);
|
||||
f32 BgCheck_AnyRaycastFloor1(CollisionContext* colCtx, CollisionPoly* outPoly, Vec3f* pos);
|
||||
f32 BgCheck_AnyRaycastFloor2(CollisionContext* colCtx, CollisionPoly* outPoly, s32* bgId, Vec3f* pos);
|
||||
f32 BgCheck_CameraRaycastFloor2(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos);
|
||||
f32 BgCheck_EntityRaycastFloor8(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos);
|
||||
f32 BgCheck_EntityRaycastFloor9(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos);
|
||||
s32 BgCheck_SphVsWallImpl(CollisionContext* colCtx, u16 xpFlags, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius, CollisionPoly** outPoly, s32* outBgId, Actor* actor, f32 checkHeight, u8 argA);
|
||||
s32 BgCheck_EntitySphVsWall1(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius, CollisionPoly** outPoly, f32 checkHeight);
|
||||
s32 BgCheck_EntitySphVsWall2(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius, CollisionPoly** outPoly, s32* outBgId, f32 checkHeight);
|
||||
s32 BgCheck_EntitySphVsWall3(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius, CollisionPoly** outPoly, s32* outBgId, Actor* actor, f32 checkHeight);
|
||||
s32 BgCheck_EntitySphVsWall4(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius, CollisionPoly** outPoly, s32* outBgId, Actor* actor, f32 checkHeight);
|
||||
s32 BgCheck_SphVsWallImpl(CollisionContext* colCtx, u16 xpFlags, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev,
|
||||
f32 radius, CollisionPoly** outPoly, s32* outBgId, Actor* actor, f32 checkHeight, u8 argA);
|
||||
s32 BgCheck_EntitySphVsWall1(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius,
|
||||
CollisionPoly** outPoly, f32 checkHeight);
|
||||
s32 BgCheck_EntitySphVsWall2(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius,
|
||||
CollisionPoly** outPoly, s32* outBgId, f32 checkHeight);
|
||||
s32 BgCheck_EntitySphVsWall3(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius,
|
||||
CollisionPoly** outPoly, s32* outBgId, Actor* actor, f32 checkHeight);
|
||||
s32 BgCheck_EntitySphVsWall4(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius,
|
||||
CollisionPoly** outPoly, s32* outBgId, Actor* actor, f32 checkHeight);
|
||||
// ? BgCheck_CheckCeilingImpl(?);
|
||||
s32 BgCheck_AnyCheckCeiling(CollisionContext* colCtx, f32* outY, Vec3f* pos, f32 checkHeight);
|
||||
s32 BgCheck_EntityCheckCeiling(CollisionContext* colCtx, f32* arg1, Vec3f* arg2, f32 arg3, CollisionPoly** outPoly, s32* outBgId, Actor* actor);
|
||||
s32 BgCheck_LineTestImpl(CollisionContext* colCtx, u16 xpFlags1, u16 xpFlags2, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly, s32* bgId, Actor* actor, f32 chkDist, u32 bccFlags);
|
||||
s32 BgCheck_CameraLineTest1(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
|
||||
s32 BgCheck_CameraLineTest2(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
|
||||
s32 BgCheck_EntityLineTest1(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
|
||||
s32 BgCheck_EntityLineTest2(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId, Actor* actor);
|
||||
s32 BgCheck_EntityLineTest3(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId, Actor* actor, f32 chkDist);
|
||||
s32 BgCheck_ProjectileLineTest(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
|
||||
s32 BgCheck_AnyLineTest1(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly, s32 chkOneFace);
|
||||
s32 BgCheck_AnyLineTest2(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace);
|
||||
s32 BgCheck_AnyLineTest3(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
|
||||
s32 BgCheck_EntityCheckCeiling(CollisionContext* colCtx, f32* arg1, Vec3f* arg2, f32 arg3, CollisionPoly** outPoly,
|
||||
s32* outBgId, Actor* actor);
|
||||
s32 BgCheck_LineTestImpl(CollisionContext* colCtx, u16 xpFlags1, u16 xpFlags2, Vec3f* posA, Vec3f* posB,
|
||||
Vec3f* posResult, CollisionPoly** outPoly, s32* bgId, Actor* actor, f32 chkDist, u32 bccFlags);
|
||||
s32 BgCheck_CameraLineTest1(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
|
||||
CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
|
||||
s32 BgCheck_CameraLineTest2(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
|
||||
CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
|
||||
s32 BgCheck_EntityLineTest1(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
|
||||
CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
|
||||
s32 BgCheck_EntityLineTest2(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
|
||||
CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId,
|
||||
Actor* actor);
|
||||
s32 BgCheck_EntityLineTest3(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
|
||||
CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId,
|
||||
Actor* actor, f32 chkDist);
|
||||
s32 BgCheck_ProjectileLineTest(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
|
||||
CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace,
|
||||
s32* bgId);
|
||||
s32 BgCheck_AnyLineTest1(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly,
|
||||
s32 chkOneFace);
|
||||
s32 BgCheck_AnyLineTest2(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly,
|
||||
s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace);
|
||||
s32 BgCheck_AnyLineTest3(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly,
|
||||
s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
|
||||
// ? BgCheck_SphVsFirstPolyImpl(?);
|
||||
s32 BgCheck_SphVsFirstPoly(CollisionContext* colCtx, Vec3f* center, f32 radius);
|
||||
s32 BgCheck_SphVsFirstPoly(CollisionContext* colCtx, Vec3f* center, f32 radius);
|
||||
void SSNodeList_Initialize(SSNodeList*);
|
||||
void SSNodeList_Alloc(GlobalContext* globalCtx, SSNodeList* this, s32 tblMax, s32 numPolys);
|
||||
u16 SSNodeList_GetNextNodeIdx(SSNodeList* this);
|
||||
@@ -644,15 +670,19 @@ void DynaPoly_UpdateBgActorTransforms(GlobalContext* globalCtx, DynaCollisionCon
|
||||
// ? BgCheck_RaycastFloorDynaList(?);
|
||||
f32 BgCheck_RaycastFloorDyna(DynaRaycast* dynaRaycast);
|
||||
// ? BgCheck_SphVsDynaWallInBgActor(?);
|
||||
s32 BgCheck_SphVsDynaWall(CollisionContext* colCtx, u16 xpFlags, f32* outX, f32* outZ, Vec3f* pos, f32 radius, CollisionPoly** outPoly, s32* outBgId, Actor* actor);
|
||||
s32 BgCheck_SphVsDynaWall(CollisionContext* colCtx, u16 xpFlags, f32* outX, f32* outZ, Vec3f* pos, f32 radius,
|
||||
CollisionPoly** outPoly, s32* outBgId, Actor* actor);
|
||||
// ? BgCheck_CheckDynaCeilingList(?);
|
||||
s32 BgCheck_CheckDynaCeiling(CollisionContext* colCtx, u16 xpFlags, f32* outY, Vec3f* pos, f32 chkDist, CollisionPoly** outPoly, s32* outBgId, Actor* actor);
|
||||
s32 BgCheck_CheckDynaCeiling(CollisionContext* colCtx, u16 xpFlags, f32* outY, Vec3f* pos, f32 chkDist,
|
||||
CollisionPoly** outPoly, s32* outBgId, Actor* actor);
|
||||
// ? func_80040FA4(?);
|
||||
// ? func_80041128(?);
|
||||
s32 func_80041240(CollisionContext* colCtx, u16 xpFlags, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly, f32* distSq, s32* outBgId, Actor* actor, f32 chkDist, s32 bccFlags);
|
||||
s32 func_80041240(CollisionContext* colCtx, u16 xpFlags, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
|
||||
CollisionPoly** outPoly, f32* distSq, s32* outBgId, Actor* actor, f32 chkDist, s32 bccFlags);
|
||||
// ? BgCheck_SphVsFirstDynaPolyList(?);
|
||||
// ? BgCheck_SphVsFirstDynaPolyInBgActor(?);
|
||||
s32 BgCheck_SphVsFirstDynaPoly(CollisionContext* colCtx, u16 xpFlags, CollisionPoly** outPoly, s32* outBgId, Vec3f* center, f32 radius, Actor* actor, u16 bciFlags);
|
||||
s32 BgCheck_SphVsFirstDynaPoly(CollisionContext* colCtx, u16 xpFlags, CollisionPoly** outPoly, s32* outBgId,
|
||||
Vec3f* center, f32 radius, Actor* actor, u16 bciFlags);
|
||||
// ? CollisionHeader_SegmentedToVirtual(?);
|
||||
void CollisionHeader_GetVirtual(void* colHeader, CollisionHeader** dest);
|
||||
void BgCheck_ResetPolyCheckTbl(SSNodeList* nodeList, s32 numPolys);
|
||||
@@ -687,9 +717,12 @@ s32 SurfaceType_IsConveyor(CollisionContext* colCtx, CollisionPoly* poly, s32 bg
|
||||
u32 SurfaceType_GetConveyorSpeed(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
u32 SurfaceType_GetConveyorDirection(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
u32 SurfaceType_IsWallDamage(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
s32 WaterBox_GetSurface1(GlobalContext* globalCtx, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface, WaterBox** outWaterBox);
|
||||
s32 WaterBox_GetSurface2(GlobalContext* globalCtx, CollisionContext* colCtx, Vec3f* pos, f32 surfaceChkDist, WaterBox** outWaterBox);
|
||||
s32 WaterBox_GetSurfaceImpl(GlobalContext* globalCtx, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface, WaterBox** outWaterBox);
|
||||
s32 WaterBox_GetSurface1(GlobalContext* globalCtx, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface,
|
||||
WaterBox** outWaterBox);
|
||||
s32 WaterBox_GetSurface2(GlobalContext* globalCtx, CollisionContext* colCtx, Vec3f* pos, f32 surfaceChkDist,
|
||||
WaterBox** outWaterBox);
|
||||
s32 WaterBox_GetSurfaceImpl(GlobalContext* globalCtx, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface,
|
||||
WaterBox** outWaterBox);
|
||||
u32 WaterBox_GetCamDataIndex(CollisionContext* colCtx, WaterBox* waterBox);
|
||||
u16 WaterBox_GetCameraSType(CollisionContext* colCtx, WaterBox* waterBox);
|
||||
u32 WaterBox_GetLightSettingIndex(CollisionContext* colCtx, WaterBox* waterBox);
|
||||
@@ -708,8 +741,8 @@ s32 func_800433A4(CollisionContext* colCtx, s32 bgId, Actor* actor);
|
||||
void DynaPolyActor_Init(DynaPolyActor* dynaActor, DynaPolyMoveFlag flags);
|
||||
void func_800434A0(DynaPolyActor* dynaActor);
|
||||
void func_800434A8(DynaPolyActor* dynaActor);
|
||||
void func_800434C8(CollisionContext* colCtx, s32 floorPolySource);
|
||||
void func_80043508(CollisionContext* colCtx, s32 floorPolySource);
|
||||
void func_800434C8(CollisionContext* colCtx, s32 floorBgId);
|
||||
void func_80043508(CollisionContext* colCtx, s32 floorBgId);
|
||||
void func_80043538(DynaPolyActor* dynaActor);
|
||||
s32 func_80043548(DynaPolyActor* dynaActor);
|
||||
s32 func_8004356C(DynaPolyActor* dynaActor);
|
||||
@@ -819,8 +852,7 @@ void Collider_UpdateCylinder(Actor* actor, ColliderCylinder* collider);
|
||||
void Collider_SetCylinderPosition(ColliderCylinder* collider, Vec3s* pos);
|
||||
void Collider_SetQuadVertices(ColliderQuad* collider, Vec3f* a, Vec3f* b, Vec3f* c, Vec3f* d);
|
||||
void Collider_SetTrisVertices(ColliderTris* collider, s32 index, Vec3f* a, Vec3f* b, Vec3f* c);
|
||||
void Collider_SetTrisDim(GlobalContext* globalCtx, ColliderTris* collider, s32 index,
|
||||
ColliderTrisElementDimInit* init);
|
||||
void Collider_SetTrisDim(GlobalContext* globalCtx, ColliderTris* collider, s32 index, ColliderTrisElementDimInit* init);
|
||||
void Collider_UpdateSpheres(s32 limb, ColliderJntSph* collider);
|
||||
void CollisionCheck_SpawnRedBlood(GlobalContext* globalCtx, Vec3f* v);
|
||||
void CollisionCheck_SpawnWaterDroplets(GlobalContext* globalCtx, Vec3f* v);
|
||||
@@ -1040,7 +1072,7 @@ s16 func_800800F8(GlobalContext* globalCtx, s16 csID, s16 timer, Actor* actor, s
|
||||
void func_800803F0(GlobalContext* globalCtx, s16 camId);
|
||||
s16 func_80080480(GlobalContext* globalCtx, Actor* actor);
|
||||
void func_800806BC(GlobalContext* globalCtx, Actor* actor, u16 sfxId);
|
||||
UNK_TYPE func_80080728(GlobalContext* globalCtx, u8 actorType);
|
||||
UNK_TYPE func_80080728(GlobalContext* globalCtx, u8 actorCategory);
|
||||
void func_80080788(UNK_TYPE, UNK_TYPE);
|
||||
void Map_SavePlayerInitialInfo(GlobalContext* globalCtx);
|
||||
void Map_SetFloorPalettesData(GlobalContext* globalCtx, s16 floor);
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
|
||||
#define RGBA8(r, g, b, a) (((r & 0xFF) << 24) | ((g & 0xFF) << 16) | ((b & 0xFF) << 8) | ((a & 0xFF) << 0))
|
||||
|
||||
#define PLAYER ((Player*)globalCtx->actorCtx.actorList[ACTORTYPE_PLAYER].first)
|
||||
#define PLAYER ((Player*)globalCtx->actorCtx.actorLists[ACTORCAT_PLAYER].head)
|
||||
|
||||
#define ACTIVE_CAM globalCtx->cameraPtrs[globalCtx->activeCamera]
|
||||
|
||||
|
||||
+4
-4
@@ -205,7 +205,7 @@ typedef struct {
|
||||
/* 0x40 */ f32 unk_40;
|
||||
/* 0x44 */ f32 unk_44;
|
||||
/* 0x48 */ s16 unk_48;
|
||||
/* 0x4A */ u8 activeType;
|
||||
/* 0x4A */ u8 activeCategory;
|
||||
/* 0x4B */ u8 unk_4B;
|
||||
/* 0x4C */ s8 unk_4C;
|
||||
/* 0x4D */ char unk_4D[0x03];
|
||||
@@ -228,8 +228,8 @@ typedef struct {
|
||||
} TitleCardContext; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 length; // number of actors loaded of this type
|
||||
/* 0x04 */ Actor* first; // pointer to first actor of this type
|
||||
/* 0x00 */ s32 length; // number of actors loaded of this category
|
||||
/* 0x04 */ Actor* head; // pointer to head of the linked list of this category (most recent actor added)
|
||||
} ActorListEntry; // size = 0x08
|
||||
|
||||
typedef struct {
|
||||
@@ -240,7 +240,7 @@ typedef struct {
|
||||
/* 0x0004 */ char unk_04[0x04];
|
||||
/* 0x0008 */ u8 total; // total number of actors loaded
|
||||
/* 0x0009 */ char unk_09[0x03];
|
||||
/* 0x000C */ ActorListEntry actorList[12];
|
||||
/* 0x000C */ ActorListEntry actorLists[12];
|
||||
/* 0x006C */ TargetContext targetCtx;
|
||||
struct {
|
||||
/* 0x0104 */ u32 swch;
|
||||
|
||||
+133
-108
@@ -13,50 +13,47 @@
|
||||
#define MASS_HEAVY 0xFE // Can only be pushed by OC collisions with IMMOVABLE and HEAVY objects.
|
||||
|
||||
struct Actor;
|
||||
// From z64.h
|
||||
struct GlobalContext;
|
||||
|
||||
// From z64light.h
|
||||
struct Lights;
|
||||
|
||||
typedef void (*ActorFunc)(struct Actor*, struct GlobalContext*);
|
||||
typedef void (*ActorShadowFunc)(struct Actor*, struct Lights*, struct GlobalContext*);
|
||||
typedef u16 (*callback1_800343CC)(struct GlobalContext*, struct Actor*);
|
||||
typedef s16 (*callback2_800343CC)(struct GlobalContext*, struct Actor*);
|
||||
|
||||
typedef struct {
|
||||
Vec3f pos;
|
||||
Vec3s rot;
|
||||
} PosRot; // size = 0x14
|
||||
|
||||
|
||||
typedef void (*ActorFunc)(struct Actor*, struct GlobalContext*);
|
||||
typedef u16 (*callback1_800343CC)(struct GlobalContext*, struct Actor*);
|
||||
typedef s16 (*callback2_800343CC)(struct GlobalContext*, struct Actor*);
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 id;
|
||||
/* 0x02 */ u8 type; // Classifies actor and determines when actor will execute
|
||||
/* 0x02 */ u8 category; // Classifies actor and determines when it will update or draw
|
||||
/* 0x04 */ u32 flags;
|
||||
/* 0x08 */ s16 objectId;
|
||||
/* 0x0C */ u32 instanceSize;
|
||||
/* 0x10 */ ActorFunc init; // Constructor
|
||||
/* 0x14 */ ActorFunc destroy; // Destructor
|
||||
/* 0x18 */ ActorFunc update; // Main Update Function
|
||||
/* 0x18 */ ActorFunc update; // Update Function
|
||||
/* 0x1C */ ActorFunc draw; // Draw function
|
||||
} ActorInit; // size = 0x20
|
||||
|
||||
typedef enum {
|
||||
ALLOCTYPE_NORMAL,
|
||||
ALLOCTYPE_ABSOLUTE,
|
||||
ALLOCTYPE_PERMANENT
|
||||
/* 0 */ ALLOCTYPE_NORMAL,
|
||||
/* 1 */ ALLOCTYPE_ABSOLUTE,
|
||||
/* 2 */ ALLOCTYPE_PERMANENT
|
||||
} AllocType;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 vromStart;
|
||||
/* 0x04 */ u32 vromEnd;
|
||||
/* 0x00 */ u32 vromStart;
|
||||
/* 0x04 */ u32 vromEnd;
|
||||
/* 0x08 */ void* vramStart;
|
||||
/* 0x0C */ void* vramEnd;
|
||||
/* 0x10 */ void* loadedRamAddr; // original name: "allocp"
|
||||
/* 0x14 */ ActorInit* initInfo;
|
||||
/* 0x18 */ char* name;
|
||||
/* 0x1C */ u16 allocType;
|
||||
/* 0x1E */ s8 nbLoaded; // original name: "clients"
|
||||
/* 0x1C */ u16 allocType;
|
||||
/* 0x1E */ s8 nbLoaded; // original name: "clients"
|
||||
} ActorOverlay; // size = 0x20
|
||||
|
||||
typedef struct {
|
||||
@@ -65,103 +62,131 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 health;
|
||||
/* 0x02 */ s16 unk_02;
|
||||
/* 0x04 */ s16 unk_04;
|
||||
/* 0x02 */ s16 cylRadius;
|
||||
/* 0x04 */ s16 cylHeight;
|
||||
/* 0x06 */ u8 mass;
|
||||
} CollisionCheckInfoInit;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 health;
|
||||
/* 0x02 */ s16 unk_02;
|
||||
/* 0x04 */ s16 unk_04;
|
||||
/* 0x06 */ s16 unk_06;
|
||||
/* 0x02 */ s16 cylRadius;
|
||||
/* 0x04 */ s16 cylHeight;
|
||||
/* 0x06 */ s16 cylYShift;
|
||||
/* 0x08 */ u8 mass;
|
||||
} CollisionCheckInfoInit2;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ DamageTable* damageTable; // For actors which contain one (example: Stalfos)...
|
||||
/* 0x00 */ DamageTable* damageTable;
|
||||
/* 0x04 */ Vec3f displacement; // Amount to correct velocity (0x5C) by when colliding into a body
|
||||
/* 0x10 */ s16 unk_10;
|
||||
/* 0x12 */ s16 unk_12;
|
||||
/* 0x14 */ u16 unk_14;
|
||||
/* 0x16 */ u8 mass; // Used to compute displacement, 50 is common value, 0xFF for infinite mass/unmoveable
|
||||
/* 0x17 */ u8 health;
|
||||
/* 0x18 */ u8 damage; // Amount to decrement health by
|
||||
/* 0x19 */ u8 damageEffect; // Stores what effect should occur when hit by a weapon
|
||||
/* 0x1A */ u8 atHitEffect; // Stores what effect should occur when AT connects with an AC
|
||||
/* 0x1B */ u8 acHitEffect; // Stores what effect should occur when AC is touched by an AT
|
||||
/* 0x10 */ s16 cylRadius; // Used for various purposes
|
||||
/* 0x12 */ s16 cylHeight; // Used for various purposes
|
||||
/* 0x14 */ s16 cylYShift; // Unused. Purpose inferred from Cylinder16 and CollisionCheck_CylSideVsLineSeg
|
||||
/* 0x16 */ u8 mass; // Used to compute displacement for OC collisions
|
||||
/* 0x17 */ u8 health; // Note: some actors may use their own health variable instead of this one
|
||||
/* 0x18 */ u8 damage; // Amount to decrement health by
|
||||
/* 0x19 */ u8 damageEffect; // Stores what effect should occur when hit by a weapon
|
||||
/* 0x1A */ u8 atHitEffect; // Stores what effect should occur when AT connects with an AC
|
||||
/* 0x1B */ u8 acHitEffect; // Stores what effect should occur when AC is touched by an AT
|
||||
} CollisionCheckInfo; // size = 0x1C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3s rot; // Current actor shape rotation
|
||||
/* 0x06 */ s16 unk_06;
|
||||
/* 0x08 */ f32 unk_08; // Model y axis offset. Represents model space units. collision mesh related
|
||||
/* 0x0C */ void (*shadowDrawFunc)(struct Actor*, struct Lights*, struct GlobalContext*);
|
||||
/* 0x10 */ f32 unk_10;
|
||||
/* 0x14 */ u8 unk_14;
|
||||
/* 0x15 */ u8 unk_15;
|
||||
/* 0x00 */ Vec3s rot; // Current actor shape rotation
|
||||
/* 0x06 */ s16 face; // Used to index eyebrow/eye/mouth textures. Only used by player
|
||||
/* 0x08 */ f32 yOffset; // Model y axis offset. Represents model space units
|
||||
/* 0x0C */ ActorShadowFunc shadowDraw; // Shadow draw function
|
||||
/* 0x10 */ f32 shadowScale; // Changes the size of the shadow
|
||||
/* 0x14 */ u8 shadowAlpha; // Default is 255
|
||||
/* 0x15 */ u8 feetFloorFlags; // Set if the actor's foot is clipped under the floor. & 1 is right foot, & 2 is left
|
||||
/* 0x18 */ Vec3f feetPos[2]; // Update by using `Actor_SetFeetPos` in PostLimbDraw
|
||||
} ActorShape; // size = 0x18
|
||||
|
||||
typedef struct Actor {
|
||||
/* 0x000 */ s16 id; // Actor Id
|
||||
/* 0x002 */ u8 type; // Actor Type. Refer to the corresponding enum for values
|
||||
/* 0x003 */ s8 room; // Room number the actor is in. -1 denotes that the actor won't despawn on a room change
|
||||
/* 0x004 */ u32 flags; // Flags used for various purposes
|
||||
/* 0x008 */ PosRot initPosRot; // Initial position/rotation when spawned. Is sometimes used for other purposes
|
||||
/* 0x01C */ s16 params; // original name: "args_data"; Configurable variable set by an actor's spawn data
|
||||
/* 0x01E */ s8 objBankIndex; // original name: "bank"; Object bank index of this actor's object dependency
|
||||
/* 0x01F */ s8 unk_1F;
|
||||
/* 0x020 */ u16 sfx; // Plays sound effect relative to actor's location (if within range of camera?)
|
||||
/* 0x024 */ PosRot posRot; // position/rotation in the world
|
||||
/* 0x038 */ PosRot posRot2;
|
||||
/* 0x04C */ f32 unk_4C;
|
||||
/* 0x050 */ Vec3f scale; // Sets x,y,z scaling factor. Typically, a factor of 0.01 is used for each axis
|
||||
/* 0x05C */ Vec3f velocity;
|
||||
/* 0x068 */ f32 speedXZ; // Always positive, stores how fast the actor is traveling along the XZ plane
|
||||
/* 0x06C */ f32 gravity; // Acceleration due to gravity; value is added to Y velocity every frame
|
||||
/* 0x070 */ f32 minVelocityY; // Sets the lower bounds cap on velocity along the Y axis
|
||||
/* 0x074 */ CollisionPoly* wallPoly; // Wall polygon an actor is touching
|
||||
/* 0x078 */ CollisionPoly* floorPoly; // Floor polygon an actor is over/touching
|
||||
/* 0x07C */ u8 wallPolySource; // Complex Poly Surface Source. 0x32 = Scene
|
||||
/* 0x07D */ u8 floorPolySource; // Complex Poly Surface Source. 0x32 = Scene. related to 0x80/88
|
||||
/* 0x07E */ s16 wallPolyRot; // Rotation of the wall poly
|
||||
/* 0x080 */ f32 groundY; // Floor poly height
|
||||
/* 0x084 */ f32 yDistToWater; // Distance from water surface
|
||||
/* 0x088 */ u16 bgCheckFlags;
|
||||
/* 0x08A */ s16 yawTowardsLink;
|
||||
/* 0x08C */ f32 xyzDistToLinkSq;
|
||||
/* 0x090 */ f32 xzDistToLink;
|
||||
/* 0x094 */ f32 yDistToLink;
|
||||
/* 0x098 */ CollisionCheckInfo colChkInfo;
|
||||
/* 0x0B4 */ ActorShape shape;
|
||||
/* 0x0CC */ Vec3f unk_CC[2];
|
||||
/* 0x0E4 */ Vec3f projectedPos; // actor position in projected space
|
||||
/* 0x0F0 */ f32 projectedW; // w component of the projected actor position vector
|
||||
/* 0x0F4 */ f32 uncullZoneForward; // amount to increase the uncull zone forward by (in projected space)
|
||||
/* 0x0F8 */ f32 uncullZoneScale; // amount to increase the uncull zone scale by (in projected space)
|
||||
/* 0x0FC */ f32 uncullZoneDownward; // amount to increase uncull zone downward by (in projected space)
|
||||
/* 0x100 */ Vec3f pos4; // previous position
|
||||
/* 0x10C */ u8 unk_10C; // Z-Target related
|
||||
/* 0x10D */ u8 unk_10D; // Z-Target related
|
||||
/* 0x10E */ u16 textId; // Text id to pass to link/display when interacting with an actor
|
||||
/* 0x110 */ u16 freezeTimer;
|
||||
/* 0x112 */ u16 dmgEffectParams; // Specifies damage effect color (white/red/blue) and if opaque or translucent
|
||||
/* 0x114 */ u8 dmgEffectTimer;
|
||||
/* 0x115 */ u8 isDrawn; // Indicates whether the actor is currently being drawn (but not seen through lens)
|
||||
/* 0x116 */ u8 unk_116;
|
||||
/* 0x117 */ u8 naviEnemyId; // Sets what 0600 dialog to display when talking to navi. Default 0xFF
|
||||
/* 0x118 */ struct Actor* parent;
|
||||
/* 0x11C */ struct Actor* child;
|
||||
/* 0x120 */ struct Actor* prev; // Previous Actor of this type
|
||||
/* 0x124 */ struct Actor* next; // Next Actor of this type
|
||||
/* 0x128 */ ActorFunc init; // Initialization Routine. Called by Actor_Init or Actor_UpdateAll
|
||||
/* 0x12C */ ActorFunc destroy; // Destruction Routine. Called by Actor_Destroy
|
||||
/* 0x130 */ ActorFunc update; // Update Routine. Called by Actor_UpdateAll
|
||||
/* 0x134 */ ActorFunc draw; // Draw Routine. Called by Actor_Draw
|
||||
/* 0x000 */ s16 id; // Actor ID
|
||||
/* 0x002 */ u8 category; // Actor category. Refer to the corresponding enum for values
|
||||
/* 0x003 */ s8 room; // Room number the actor is in. -1 denotes that the actor won't despawn on a room change
|
||||
/* 0x004 */ u32 flags; // Flags used for various purposes
|
||||
/* 0x008 */ PosRot home; // Initial position/rotation when spawned. Can be used for other purposes
|
||||
/* 0x01C */ s16 params; // Configurable variable set by the actor's spawn data; original name: "args_data"
|
||||
/* 0x01E */ s8 objBankIndex; // Object bank index of the actor's object dependency; original name: "bank"
|
||||
/* 0x01F */ s8 targetMode; // Controls how far the actor can be targeted from and how far it can stay locked on
|
||||
/* 0x020 */ u16 sfx; // SFX ID to play. Sound plays when value is set, then is cleared the following update cycle
|
||||
/* 0x024 */ PosRot world; // Position/rotation in the world
|
||||
/* 0x038 */ PosRot focus; // Target reticle focuses on this position. For player this represents head pos and rot
|
||||
/* 0x04C */ f32 targetArrowOffset; // Height offset of the target arrow relative to `focus` position
|
||||
/* 0x050 */ Vec3f scale; // Scale of the actor in each axis
|
||||
/* 0x05C */ Vec3f velocity; // Velocity of the actor in each axis
|
||||
/* 0x068 */ f32 speedXZ; // How fast the actor is traveling along the XZ plane
|
||||
/* 0x06C */ f32 gravity; // Acceleration due to gravity. Value is added to Y velocity every frame
|
||||
/* 0x070 */ f32 minVelocityY; // Sets the lower bounds cap on velocity along the Y axis
|
||||
/* 0x074 */ CollisionPoly* wallPoly; // Wall polygon the actor is touching
|
||||
/* 0x078 */ CollisionPoly* floorPoly; // Floor polygon directly below the actor
|
||||
/* 0x07C */ u8 wallBgId; // Bg ID of the wall polygon the actor is touching
|
||||
/* 0x07D */ u8 floorBgId; // Bg ID of the floor polygon directly below the actor
|
||||
/* 0x07E */ s16 wallYaw; // Y rotation of the wall polygon the actor is touching
|
||||
/* 0x080 */ f32 floorHeight; // Y position of the floor polygon directly below the actor
|
||||
/* 0x084 */ f32 yDistToWater; // Distance to the surface of active waterbox. Negative value means above water
|
||||
/* 0x088 */ u16 bgCheckFlags; // See comments below actor struct for wip docs. TODO: macros for these flags
|
||||
/* 0x08A */ s16 yawTowardsPlayer; // Y rotation difference between the actor and the player
|
||||
/* 0x08C */ f32 xyzDistToPlayerSq; // Squared distance between the actor and the player in the x,y,z axis
|
||||
/* 0x090 */ f32 xzDistToPlayer; // Distance between the actor and the player in the XZ plane
|
||||
/* 0x094 */ f32 yDistToPlayer; // Dist is negative if the actor is above the player
|
||||
/* 0x098 */ CollisionCheckInfo colChkInfo; // Variables related to the Collision Check system
|
||||
/* 0x0B4 */ ActorShape shape; // Variables related to the physical shape of the actor
|
||||
/* 0x0E4 */ Vec3f projectedPos; // Position of the actor in projected space
|
||||
/* 0x0F0 */ f32 projectedW; // w component of the projected actor position
|
||||
/* 0x0F4 */ f32 uncullZoneForward; // Amount to increase the uncull zone forward by (in projected space)
|
||||
/* 0x0F8 */ f32 uncullZoneScale; // Amount to increase the uncull zone scale by (in projected space)
|
||||
/* 0x0FC */ f32 uncullZoneDownward; // Amount to increase uncull zone downward by (in projected space)
|
||||
/* 0x100 */ Vec3f prevPos; // World position from the previous update cycle
|
||||
/* 0x10C */ u8 isTargeted; // Set to true if the actor is currently being targeted by the player
|
||||
/* 0x10D */ u8 targetPriority; // Lower values have higher priority. Resets to 0 when player stops targeting
|
||||
/* 0x10E */ u16 textId; // Text ID to pass to link/display when interacting with the actor
|
||||
/* 0x110 */ u16 freezeTimer; // Actor does not update when set. Timer decrements automatically
|
||||
/* 0x112 */ u16 colorFilterParams; // Set color filter to red, blue, or white. Toggle opa or xlu
|
||||
/* 0x114 */ u8 colorFilterTimer; // A non-zero value enables the color filter. Decrements automatically
|
||||
/* 0x115 */ u8 isDrawn; // Set to true if the actor is currently being drawn. Always stays false for lens actors
|
||||
/* 0x116 */ u8 dropFlag; // Configures what item is dropped by the actor from `Item_DropCollectibleRandom`
|
||||
/* 0x117 */ u8 naviEnemyId; // Sets what 0600 dialog to display when talking to navi. Default 0xFF
|
||||
/* 0x118 */ struct Actor* parent; // Usage is actor specific. Set if actor is spawned via `Actor_SpawnAsChild`
|
||||
/* 0x11C */ struct Actor* child; // Usage is actor specific. Set if actor is spawned via `Actor_SpawnAsChild`
|
||||
/* 0x120 */ struct Actor* prev; // Previous actor of this category
|
||||
/* 0x124 */ struct Actor* next; // Next actor of this category
|
||||
/* 0x128 */ ActorFunc init; // Initialization Routine. Called by `Actor_Init` or `Actor_UpdateAll`
|
||||
/* 0x12C */ ActorFunc destroy; // Destruction Routine. Called by `Actor_Destroy`
|
||||
/* 0x130 */ ActorFunc update; // Update Routine. Called by `Actor_UpdateAll`
|
||||
/* 0x134 */ ActorFunc draw; // Draw Routine. Called by `Actor_Draw`
|
||||
/* 0x138 */ ActorOverlay* overlayEntry; // Pointer to the overlay table entry for this actor
|
||||
/* 0x13C */ char dbgPad[0x10]; // Padding that only exists in the debug rom
|
||||
/* 0x13C */ char dbgPad[0x10]; // Padding that only exists in the debug rom
|
||||
} Actor; // size = 0x14C
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ FOOT_LEFT,
|
||||
/* 1 */ FOOT_RIGHT
|
||||
} ActorFootIndex;
|
||||
|
||||
/*
|
||||
BgCheckFlags WIP documentation:
|
||||
& 0x001 : Standing on the ground
|
||||
& 0x002 : Has touched the ground (only active for 1 frame)
|
||||
& 0x004 : Has left the ground (only active for 1 frame)
|
||||
& 0x008 : Touching a wall
|
||||
& 0x010 : Touching a ceiling
|
||||
& 0x020 : On or below water surface
|
||||
& 0x040 : Has touched water (actor is responsible for unsetting this the frame it touches the water)
|
||||
& 0x080 : Similar to & 0x1 but with no velocity check and is cleared every frame
|
||||
& 0x100 : Crushed between a floor and ceiling (triggers a void for player)
|
||||
& 0x200 : Unknown (only set/used by player so far)
|
||||
*/
|
||||
|
||||
/*
|
||||
colorFilterParams WIP documentation
|
||||
& 0x8000 : white
|
||||
& 0x4000 : red
|
||||
if neither of the above are set : blue
|
||||
|
||||
(& 0x1F00 >> 5) | 7 : color intensity
|
||||
0x2000 : translucent, else opaque
|
||||
*/
|
||||
|
||||
typedef struct DynaPolyActor {
|
||||
/* 0x000 */ struct Actor actor;
|
||||
@@ -264,19 +289,19 @@ typedef struct EnAObj {
|
||||
} EnAObj; // size = 0x1C8
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ ACTORTYPE_SWITCH,
|
||||
/* 0x01 */ ACTORTYPE_BG,
|
||||
/* 0x02 */ ACTORTYPE_PLAYER,
|
||||
/* 0x03 */ ACTORTYPE_EXPLOSIVES,
|
||||
/* 0x04 */ ACTORTYPE_NPC,
|
||||
/* 0x05 */ ACTORTYPE_ENEMY,
|
||||
/* 0x06 */ ACTORTYPE_PROP,
|
||||
/* 0x07 */ ACTORTYPE_ITEMACTION,
|
||||
/* 0x08 */ ACTORTYPE_MISC,
|
||||
/* 0x09 */ ACTORTYPE_BOSS,
|
||||
/* 0x0A */ ACTORTYPE_DOOR,
|
||||
/* 0x0B */ ACTORTYPE_CHEST
|
||||
} ActorType;
|
||||
/* 0x00 */ ACTORCAT_SWITCH,
|
||||
/* 0x01 */ ACTORCAT_BG,
|
||||
/* 0x02 */ ACTORCAT_PLAYER,
|
||||
/* 0x03 */ ACTORCAT_EXPLOSIVE,
|
||||
/* 0x04 */ ACTORCAT_NPC,
|
||||
/* 0x05 */ ACTORCAT_ENEMY,
|
||||
/* 0x06 */ ACTORCAT_PROP,
|
||||
/* 0x07 */ ACTORCAT_ITEMACTION,
|
||||
/* 0x08 */ ACTORCAT_MISC,
|
||||
/* 0x09 */ ACTORCAT_BOSS,
|
||||
/* 0x0A */ ACTORCAT_DOOR,
|
||||
/* 0x0B */ ACTORCAT_CHEST
|
||||
} ActorCategory;
|
||||
|
||||
typedef enum {
|
||||
/* 0x0000 */ ACTOR_PLAYER,
|
||||
|
||||
+2
-2
@@ -677,9 +677,9 @@ typedef struct {
|
||||
* & 0x00FF = atInitFlags
|
||||
* & 0xFF00 = eyeInitFlags
|
||||
* 0x1: Direct Copy of atTargetInit
|
||||
* if initFlags & 0x6060: use posRot2 for focus point
|
||||
* if initFlags & 0x6060: use head for focus point
|
||||
* 0x2: Add atTargetInit to view's lookAt
|
||||
* if initFlags & 0x6060: use posRot for focus point
|
||||
* if initFlags & 0x6060: use world for focus point
|
||||
* 0x3: Add atTargetInit to camera's at
|
||||
* 0x4: Don't update targets?
|
||||
* 0x8: flag to use atTagetInit as f32 pitch, yaw, r
|
||||
|
||||
Reference in New Issue
Block a user