mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-07 14:50:15 +00: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:
parent
20206fba0d
commit
00a5edea71
697 changed files with 8157 additions and 7942 deletions
|
@ -91,7 +91,7 @@ static EnZl2DrawFunc sDrawFuncs[] = {
|
|||
|
||||
const ActorInit En_Zl2_InitVars = {
|
||||
ACTOR_EN_ZL2,
|
||||
ACTORTYPE_NPC,
|
||||
ACTORCAT_NPC,
|
||||
FLAGS,
|
||||
OBJECT_ZL2,
|
||||
sizeof(EnZl2),
|
||||
|
@ -236,7 +236,7 @@ void func_80B4ED18(EnZl2* this, s16 arg1) {
|
|||
}
|
||||
|
||||
void func_80B4ED2C(EnZl2* this, GlobalContext* globalCtx) {
|
||||
func_8002E4B4(globalCtx, &this->actor, 75.0f, 30.0f, 30.0f, 5);
|
||||
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 75.0f, 30.0f, 30.0f, 5);
|
||||
}
|
||||
|
||||
s32 EnZl2_FrameUpdateMatrix(EnZl2* this) {
|
||||
|
@ -254,10 +254,10 @@ void func_80B4EDB8(EnZl2* this, GlobalContext* globalCtx, s32 arg2) {
|
|||
CsCmdActorAction* npcAction = EnZl2_GetNpcAction(globalCtx, arg2);
|
||||
|
||||
if (npcAction != NULL) {
|
||||
this->actor.posRot.pos.x = npcAction->startPos.x;
|
||||
this->actor.posRot.pos.y = npcAction->startPos.y;
|
||||
this->actor.posRot.pos.z = npcAction->startPos.z;
|
||||
this->actor.posRot.rot.y = this->actor.shape.rot.y = npcAction->rot.y;
|
||||
this->actor.world.pos.x = npcAction->startPos.x;
|
||||
this->actor.world.pos.y = npcAction->startPos.y;
|
||||
this->actor.world.pos.z = npcAction->startPos.z;
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y = npcAction->rot.y;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -661,9 +661,9 @@ void EnZl2_GiveLightArrows(EnZl2* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (this->unk_244 == 0) {
|
||||
player = PLAYER;
|
||||
posX = player->actor.posRot.pos.x;
|
||||
posY = player->actor.posRot.pos.y + 80.0f;
|
||||
posZ = player->actor.posRot.pos.z;
|
||||
posX = player->actor.world.pos.x;
|
||||
posY = player->actor.world.pos.y + 80.0f;
|
||||
posZ = player->actor.world.pos.z;
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_DEMO_EFFECT, posX, posY, posZ, 0, 0, 0, 0x17);
|
||||
Item_Give(globalCtx, ITEM_ARROW_LIGHT);
|
||||
this->unk_244 = 1;
|
||||
|
@ -676,9 +676,9 @@ void func_80B4FF84(EnZl2* this, GlobalContext* globalCtx) {
|
|||
f32 posZ;
|
||||
|
||||
if (this->unk_250 == 0) {
|
||||
posX = this->actor.posRot.pos.x;
|
||||
posY = this->actor.posRot.pos.y;
|
||||
posZ = this->actor.posRot.pos.z;
|
||||
posX = this->actor.world.pos.x;
|
||||
posY = this->actor.world.pos.y;
|
||||
posZ = this->actor.world.pos.z;
|
||||
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0, 0, 4);
|
||||
this->unk_250 = 1;
|
||||
|
@ -691,9 +691,9 @@ void func_80B4FFF0(EnZl2* this, GlobalContext* globalCtx) {
|
|||
f32 posZ;
|
||||
|
||||
if (this->unk_248 == 0) {
|
||||
posX = this->actor.posRot.pos.x;
|
||||
posY = this->actor.posRot.pos.y + (kREG(5) + -26.0f);
|
||||
posZ = this->actor.posRot.pos.z;
|
||||
posX = this->actor.world.pos.x;
|
||||
posY = this->actor.world.pos.y + (kREG(5) + -26.0f);
|
||||
posZ = this->actor.world.pos.z;
|
||||
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0x4000,
|
||||
0, 3);
|
||||
|
@ -705,15 +705,15 @@ void func_80B5008C(EnZl2* this) {
|
|||
Actor* child = this->actor.child;
|
||||
|
||||
if (child != NULL) {
|
||||
child->posRot.pos.x = this->actor.posRot.pos.x;
|
||||
child->posRot.pos.y = this->actor.posRot.pos.y + (kREG(5) + -26.0f);
|
||||
child->posRot.pos.z = this->actor.posRot.pos.z;
|
||||
child->world.pos.x = this->actor.world.pos.x;
|
||||
child->world.pos.y = this->actor.world.pos.y + (kREG(5) + -26.0f);
|
||||
child->world.pos.z = this->actor.world.pos.z;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80B500E0(EnZl2* this, GlobalContext* globalCtx) {
|
||||
CsCmdActorAction* npcAction = EnZl2_GetNpcAction(globalCtx, 0);
|
||||
Vec3f* thisPos = &this->actor.posRot.pos;
|
||||
Vec3f* thisPos = &this->actor.world.pos;
|
||||
f32 startX;
|
||||
f32 startY;
|
||||
f32 startZ;
|
||||
|
@ -746,7 +746,7 @@ void func_80B501E8(EnZl2* this, GlobalContext* globalCtx) {
|
|||
CsCmdActorAction* npcAction = EnZl2_GetNpcAction(globalCtx, 0);
|
||||
|
||||
if (npcAction != NULL) {
|
||||
this->actor.shape.unk_14 = this->alpha =
|
||||
this->actor.shape.shadowAlpha = this->alpha =
|
||||
(1.0f - func_8006F93C(npcAction->endFrame, npcAction->startFrame, globalCtx->csCtx.frames)) * 255.0f;
|
||||
func_80B501C4(this, this->alpha);
|
||||
}
|
||||
|
@ -755,24 +755,24 @@ void func_80B501E8(EnZl2* this, GlobalContext* globalCtx) {
|
|||
void func_80B50260(EnZl2* this, GlobalContext* globalCtx) {
|
||||
this->action = 1;
|
||||
this->drawConfig = 0;
|
||||
this->actor.shape.unk_14 = 0;
|
||||
this->actor.shape.shadowAlpha = 0;
|
||||
}
|
||||
|
||||
void func_80B50278(EnZl2* this, GlobalContext* globalCtx) {
|
||||
CsCmdActorAction* npcAction = EnZl2_GetNpcAction(globalCtx, 0);
|
||||
|
||||
this->actor.posRot.pos.x = npcAction->startPos.x;
|
||||
this->actor.posRot.pos.y = npcAction->startPos.y;
|
||||
this->actor.posRot.pos.z = npcAction->startPos.z;
|
||||
this->actor.posRot.rot.y = this->actor.shape.rot.y = npcAction->rot.y;
|
||||
this->actor.shape.unk_14 = 0xFF;
|
||||
this->actor.world.pos.x = npcAction->startPos.x;
|
||||
this->actor.world.pos.y = npcAction->startPos.y;
|
||||
this->actor.world.pos.z = npcAction->startPos.z;
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y = npcAction->rot.y;
|
||||
this->actor.shape.shadowAlpha = 0xFF;
|
||||
this->action = 2;
|
||||
this->drawConfig = 1;
|
||||
}
|
||||
|
||||
void func_80B50304(EnZl2* this, GlobalContext* globalCtx) {
|
||||
s32 pad[2];
|
||||
ActorShape* actorShape = &this->actor.shape;
|
||||
ActorShape* shape = &this->actor.shape;
|
||||
CsCmdActorAction* npcAction = EnZl2_GetNpcAction(globalCtx, 0);
|
||||
f32 actionXDelta;
|
||||
f32 actionZDelta;
|
||||
|
@ -783,8 +783,8 @@ void func_80B50304(EnZl2* this, GlobalContext* globalCtx) {
|
|||
this->action = 3;
|
||||
this->drawConfig = 1;
|
||||
this->unk_23C = 0.0f;
|
||||
actorShape->unk_14 = 0xFF;
|
||||
this->actor.posRot.rot.y = actorShape->rot.y = Math_FAtan2F(actionXDelta, actionZDelta) * 10430.3779296875f;
|
||||
shape->shadowAlpha = 255;
|
||||
this->actor.world.rot.y = shape->rot.y = Math_FAtan2F(actionXDelta, actionZDelta) * 10430.3779296875f;
|
||||
}
|
||||
|
||||
void func_80B503DC(EnZl2* this, GlobalContext* globalCtx) {
|
||||
|
@ -799,7 +799,7 @@ void func_80B5042C(EnZl2* this, GlobalContext* globalCtx) {
|
|||
func_80B4FD00(this, &D_060022D0, 2, -8.0f, 0);
|
||||
this->action = 5;
|
||||
this->drawConfig = 1;
|
||||
this->actor.shape.unk_14 = 0xFF;
|
||||
this->actor.shape.shadowAlpha = 0xFF;
|
||||
this->unk_27C = 0.0f;
|
||||
}
|
||||
|
||||
|
@ -817,7 +817,7 @@ void func_80B504D4(EnZl2* this, GlobalContext* globalCtx) {
|
|||
this->drawConfig = 1;
|
||||
this->unk_27C = 0.0f;
|
||||
func_80B4ED18(this, 1);
|
||||
this->actor.shape.unk_14 = 0xFF;
|
||||
this->actor.shape.shadowAlpha = 0xFF;
|
||||
}
|
||||
|
||||
void func_80B5053C(EnZl2* this, s32 arg1) {
|
||||
|
@ -831,7 +831,7 @@ void func_80B50580(EnZl2* this, GlobalContext* globalCtx) {
|
|||
func_80B4FD00(this, &D_06000A50, 2, -8.0f, 0);
|
||||
this->action = 9;
|
||||
this->drawConfig = 1;
|
||||
this->actor.shape.unk_14 = 0xFF;
|
||||
this->actor.shape.shadowAlpha = 0xFF;
|
||||
}
|
||||
|
||||
void func_80B505D4(EnZl2* this, s32 arg1) {
|
||||
|
@ -855,7 +855,7 @@ void func_80B50670(EnZl2* this, GlobalContext* globalCtx) {
|
|||
func_80B4FD00(this, &D_0600B5FC, 0, -8.0f, 0);
|
||||
this->action = 13;
|
||||
this->drawConfig = 1;
|
||||
this->actor.shape.unk_14 = 0xFF;
|
||||
this->actor.shape.shadowAlpha = 0xFF;
|
||||
}
|
||||
|
||||
void func_80B506C4(EnZl2* this, GlobalContext* globalCtx) {
|
||||
|
@ -864,7 +864,7 @@ void func_80B506C4(EnZl2* this, GlobalContext* globalCtx) {
|
|||
this->drawConfig = 1;
|
||||
func_80B4ECE8(this, 4);
|
||||
func_80B4ED18(this, 2);
|
||||
this->actor.shape.unk_14 = 0xFF;
|
||||
this->actor.shape.shadowAlpha = 0xFF;
|
||||
func_80B4FE90(this);
|
||||
}
|
||||
|
||||
|
@ -879,7 +879,7 @@ void func_80B50780(EnZl2* this, GlobalContext* globalCtx) {
|
|||
func_80B4FD00(this, &D_06001670, 2, -8.0f, 0);
|
||||
this->action = 16;
|
||||
this->drawConfig = 1;
|
||||
this->actor.shape.unk_14 = 0xFF;
|
||||
this->actor.shape.shadowAlpha = 0xFF;
|
||||
func_80B4FFF0(this, globalCtx);
|
||||
func_80B4ECE8(this, 3);
|
||||
}
|
||||
|
@ -895,7 +895,7 @@ void func_80B5082C(EnZl2* this, GlobalContext* globalCtx) {
|
|||
func_80B4FD00(this, &D_06002B14, 2, -8.0f, 0);
|
||||
this->action = 18;
|
||||
this->drawConfig = 1;
|
||||
this->actor.shape.unk_14 = 0xFF;
|
||||
this->actor.shape.shadowAlpha = 0xFF;
|
||||
}
|
||||
|
||||
void func_80B50880(EnZl2* this, s32 arg1) {
|
||||
|
@ -911,7 +911,7 @@ void func_80B508C8(EnZl2* this, GlobalContext* globalCtx) {
|
|||
this->action = 20;
|
||||
this->drawConfig = 1;
|
||||
func_80B4ECE8(this, 6);
|
||||
this->actor.shape.unk_14 = 0xFF;
|
||||
this->actor.shape.shadowAlpha = 0xFF;
|
||||
}
|
||||
|
||||
void func_80B50928(EnZl2* this, s32 arg1) {
|
||||
|
@ -1211,9 +1211,9 @@ void func_80B513A8(EnZl2* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (this->unk_250 == 0) {
|
||||
player = PLAYER;
|
||||
posX = player->actor.posRot.pos.x;
|
||||
posY = player->actor.posRot.pos.y;
|
||||
posZ = player->actor.posRot.pos.z;
|
||||
posX = player->actor.world.pos.x;
|
||||
posY = player->actor.world.pos.y;
|
||||
posZ = player->actor.world.pos.z;
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0, 0, 7);
|
||||
this->unk_250 = 1;
|
||||
}
|
||||
|
@ -1272,7 +1272,7 @@ void func_80B5154C(EnZl2* this, GlobalContext* globalCtx) {
|
|||
void func_80B515C4(EnZl2* this) {
|
||||
this->action = 25;
|
||||
this->drawConfig = 0;
|
||||
this->actor.shape.unk_14 = 0;
|
||||
this->actor.shape.shadowAlpha = 0;
|
||||
}
|
||||
|
||||
void func_80B515D8(EnZl2* this, GlobalContext* globalCtx) {
|
||||
|
@ -1280,7 +1280,7 @@ void func_80B515D8(EnZl2* this, GlobalContext* globalCtx) {
|
|||
func_80B4EDB8(this, globalCtx, 0);
|
||||
this->action = 26;
|
||||
this->drawConfig = 1;
|
||||
this->actor.shape.unk_14 = 0xFF;
|
||||
this->actor.shape.shadowAlpha = 0xFF;
|
||||
this->unk_27C = 0.0f;
|
||||
}
|
||||
|
||||
|
@ -1294,7 +1294,7 @@ void func_80B51678(EnZl2* this) {
|
|||
func_80B4FD00(this, &D_06007D0C, 2, -8.0f, 0);
|
||||
this->action = 27;
|
||||
this->drawConfig = 1;
|
||||
this->actor.shape.unk_14 = 0xFF;
|
||||
this->actor.shape.shadowAlpha = 0xFF;
|
||||
this->unk_27C = 0.0f;
|
||||
}
|
||||
|
||||
|
@ -1308,7 +1308,7 @@ void func_80B51704(EnZl2* this) {
|
|||
func_80B4FD00(this, &D_060090D8, 2, -8.0f, 0);
|
||||
this->action = 28;
|
||||
this->drawConfig = 1;
|
||||
this->actor.shape.unk_14 = 0xFF;
|
||||
this->actor.shape.shadowAlpha = 0xFF;
|
||||
this->unk_27C = 0.0f;
|
||||
}
|
||||
|
||||
|
@ -1322,7 +1322,7 @@ void func_80B51790(EnZl2* this) {
|
|||
func_80B4FD00(this, &D_06005F40, 2, -8.0f, 0);
|
||||
this->action = 29;
|
||||
this->drawConfig = 1;
|
||||
this->actor.shape.unk_14 = 0xFF;
|
||||
this->actor.shape.shadowAlpha = 0xFF;
|
||||
}
|
||||
|
||||
void func_80B517E0(EnZl2* this, s32 arg1) {
|
||||
|
@ -1336,7 +1336,7 @@ void func_80B51824(EnZl2* this) {
|
|||
func_80B4FD00(this, &D_060022D0, 2, -8.0f, 0);
|
||||
this->action = 30;
|
||||
this->drawConfig = 1;
|
||||
this->actor.shape.unk_14 = 0xFF;
|
||||
this->actor.shape.shadowAlpha = 0xFF;
|
||||
this->unk_27C = 0.0f;
|
||||
}
|
||||
|
||||
|
@ -1351,7 +1351,7 @@ void func_80B518C0(EnZl2* this) {
|
|||
func_80B4FD00(this, SEGMENTED_TO_VIRTUAL(&D_06004900), 2, -8.0f, 0);
|
||||
this->action = 32;
|
||||
this->drawConfig = 1;
|
||||
this->actor.shape.unk_14 = 0xFF;
|
||||
this->actor.shape.shadowAlpha = 0xFF;
|
||||
this->unk_27C = 0.0f;
|
||||
}
|
||||
|
||||
|
@ -1459,7 +1459,7 @@ void func_80B51CA8(EnZl2* this, GlobalContext* globalCtx) {
|
|||
void func_80B51D0C(EnZl2* this, GlobalContext* globalCtx) {
|
||||
this->action = 33;
|
||||
this->drawConfig = 0;
|
||||
this->actor.shape.unk_14 = 0;
|
||||
this->actor.shape.shadowAlpha = 0;
|
||||
}
|
||||
|
||||
void func_80B51D24(EnZl2* this, GlobalContext* globalCtx) {
|
||||
|
@ -1470,7 +1470,7 @@ void func_80B51D24(EnZl2* this, GlobalContext* globalCtx) {
|
|||
if ((Animation_OnFrame(skelAnime, 6.0f)) || (Animation_OnFrame(skelAnime, 0.0f))) {
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
sfxId = SFX_FLAG;
|
||||
sfxId += SurfaceType_GetSfx(&globalCtx->colCtx, this->actor.floorPoly, this->actor.floorPolySource);
|
||||
sfxId += SurfaceType_GetSfx(&globalCtx->colCtx, this->actor.floorPoly, this->actor.floorBgId);
|
||||
func_80078914(&this->actor.projectedPos, sfxId);
|
||||
}
|
||||
}
|
||||
|
@ -1478,7 +1478,7 @@ void func_80B51D24(EnZl2* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80B51DA4(EnZl2* this, GlobalContext* globalCtx) {
|
||||
CsCmdActorAction* npcAction = EnZl2_GetNpcAction(globalCtx, 0);
|
||||
Vec3f* thisPos = &this->actor.posRot.pos;
|
||||
Vec3f* thisPos = &this->actor.world.pos;
|
||||
f32 startX;
|
||||
f32 startY;
|
||||
f32 startZ;
|
||||
|
@ -1507,7 +1507,7 @@ void func_80B51DA4(EnZl2* this, GlobalContext* globalCtx) {
|
|||
void func_80B51EA8(EnZl2* this) {
|
||||
this->action = 33;
|
||||
this->drawConfig = 0;
|
||||
this->actor.shape.unk_14 = 0;
|
||||
this->actor.shape.shadowAlpha = 0;
|
||||
}
|
||||
|
||||
void func_80B51EBC(EnZl2* this, GlobalContext* globalCtx) {
|
||||
|
@ -1515,11 +1515,11 @@ void func_80B51EBC(EnZl2* this, GlobalContext* globalCtx) {
|
|||
CsCmdActorAction* npcAction = EnZl2_GetNpcAction(globalCtx, 0);
|
||||
s32 pad[2];
|
||||
|
||||
this->actor.posRot.rot.y = shape->rot.y = npcAction->rot.y;
|
||||
this->actor.world.rot.y = shape->rot.y = npcAction->rot.y;
|
||||
func_80B4FD00(this, &D_0600B224, 0, 0.0f, 0);
|
||||
this->action = 34;
|
||||
this->drawConfig = 1;
|
||||
shape->unk_14 = 0xFF;
|
||||
shape->shadowAlpha = 255;
|
||||
}
|
||||
|
||||
void func_80B51F38(EnZl2* this, GlobalContext* globalCtx) {
|
||||
|
@ -1627,11 +1627,11 @@ void EnZl2_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
void EnZl2_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnZl2* this = THIS;
|
||||
ActorShape* actorShape = &thisx->shape;
|
||||
ActorShape* shape = &thisx->shape;
|
||||
s32 pad;
|
||||
|
||||
ActorShape_Init(actorShape, 0.0f, ActorShadow_DrawFunc_Circle, 30.0f);
|
||||
actorShape->unk_14 = 0;
|
||||
ActorShape_Init(shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
|
||||
shape->shadowAlpha = 0;
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06010D70, NULL, NULL, NULL, 0);
|
||||
|
||||
switch (thisx->params) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue