mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-10 00:40:16 +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
|
@ -40,7 +40,7 @@ static DemoGoDrawFunc D_8097D468[] = {
|
|||
|
||||
const ActorInit Demo_Go_InitVars = {
|
||||
ACTOR_DEMO_GO,
|
||||
ACTORTYPE_NPC,
|
||||
ACTORCAT_NPC,
|
||||
FLAGS,
|
||||
OBJECT_OF1D_MAP,
|
||||
sizeof(DemoGo),
|
||||
|
@ -81,7 +81,7 @@ void func_8097C8A8(DemoGo* this, GlobalContext* globalCtx) {
|
|||
Vec3f* sp1C;
|
||||
|
||||
if ((thisx->params == 0) || (thisx->params == 1)) {
|
||||
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->mf_11D60, &thisx->posRot.pos, &sp20, &sp1C);
|
||||
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->mf_11D60, &thisx->world.pos, &sp20, &sp1C);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &sp20, 20, NA_SE_EV_OBJECT_FALL);
|
||||
}
|
||||
}
|
||||
|
@ -118,19 +118,19 @@ void func_8097C9DC(DemoGo* this) {
|
|||
}
|
||||
|
||||
void func_8097CA30(DemoGo* 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);
|
||||
}
|
||||
|
||||
void func_8097CA78(DemoGo* this, GlobalContext* globalCtx) {
|
||||
s16 pad;
|
||||
Vec3f vec = this->actor.posRot.pos;
|
||||
Vec3f vec = this->actor.world.pos;
|
||||
func_80033480(globalCtx, &vec, kREG(11) + 100.0f, kREG(12) + 0xA, kREG(13) + 0x12C, kREG(14), 0);
|
||||
func_8097C9B8(this);
|
||||
}
|
||||
|
||||
void func_8097CB0C(DemoGo* this, GlobalContext* globalCtx) {
|
||||
Actor* thisx = &this->actor;
|
||||
PosRot* posRot = &thisx->posRot;
|
||||
PosRot* world = &thisx->world;
|
||||
CutsceneContext* csCtx = &globalCtx->csCtx;
|
||||
CsCmdActorAction* npcAction;
|
||||
f32 temp_ret;
|
||||
|
@ -148,10 +148,10 @@ void func_8097CB0C(DemoGo* this, GlobalContext* globalCtx) {
|
|||
endPos.x = npcAction->endPos.x;
|
||||
endPos.y = npcAction->endPos.y;
|
||||
endPos.z = npcAction->endPos.z;
|
||||
posRot->pos.x = (((endPos.x - startPos.x) * temp_ret) + startPos.x);
|
||||
posRot->pos.y = (((endPos.y - startPos.y) * temp_ret) + startPos.y);
|
||||
posRot->pos.z = (((endPos.z - startPos.z) * temp_ret) + startPos.z);
|
||||
posRot->rot.y = thisx->shape.rot.y = npcAction->rot.y;
|
||||
world->pos.x = (((endPos.x - startPos.x) * temp_ret) + startPos.x);
|
||||
world->pos.y = (((endPos.y - startPos.y) * temp_ret) + startPos.y);
|
||||
world->pos.z = (((endPos.z - startPos.z) * temp_ret) + startPos.z);
|
||||
world->rot.y = thisx->shape.rot.y = npcAction->rot.y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ void func_8097CCE0(DemoGo* this, GlobalContext* globalCtx) {
|
|||
if (globalCtx->csCtx.state != 0) {
|
||||
npcAction = globalCtx->csCtx.npcActions[func_8097C870(this)];
|
||||
if (npcAction != NULL) {
|
||||
thisRotY = thisx->posRot.rot.y;
|
||||
thisRotY = thisx->world.rot.y;
|
||||
rotYDelta = npcAction->rot.y - thisRotY;
|
||||
if ((rotYDelta > -(kREG(16) + 0x96)) && (rotYDelta < kREG(16) + 0x96)) {
|
||||
newRotY = npcAction->rot.y;
|
||||
|
@ -190,7 +190,7 @@ void func_8097CCE0(DemoGo* this, GlobalContext* globalCtx) {
|
|||
newRotY = (thisRotY - kREG(16)) - 0x96;
|
||||
}
|
||||
thisx->shape.rot.y = newRotY;
|
||||
thisx->posRot.rot.y = newRotY;
|
||||
thisx->world.rot.y = newRotY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -318,7 +318,7 @@ void DemoGo_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
DemoGo* this = THIS;
|
||||
AnimationHeader* animation = &D_06004930;
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 30.0f);
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600FEF0, NULL, NULL, NULL, 0);
|
||||
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_ONCE, 0.0f);
|
||||
this->action = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue