1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-06 22:30: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:
fig02 2021-01-18 16:04:04 -05:00 committed by GitHub
parent 20206fba0d
commit 00a5edea71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
697 changed files with 8157 additions and 7942 deletions

View file

@ -21,7 +21,7 @@ void func_80B43B6C(EnYukabyun* this, GlobalContext* globalCtx);
const ActorInit En_Yukabyun_InitVars = {
ACTOR_EN_YUKABYUN,
ACTORTYPE_ENEMY,
ACTORCAT_ENEMY,
FLAGS,
OBJECT_YUKABYUN,
sizeof(EnYukabyun),
@ -53,7 +53,7 @@ static ColliderCylinderInit sCylinderInit = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F(scale, 1, ICHAIN_CONTINUE),
ICHAIN_F32(unk_4C, 16, ICHAIN_STOP),
ICHAIN_F32(targetArrowOffset, 16, ICHAIN_STOP),
};
static UNK_PTR D_80B43F64[] = { 0x06000AF0, 0x06000000 };
@ -65,7 +65,7 @@ void EnYukabyun_Init(Actor* thisx, GlobalContext* globalCtx) {
EnYukabyun* this = THIS;
Actor_ProcessInitChain(&this->actor, sInitChain);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 0.4f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 0.4f);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
this->actor.params++;
@ -93,17 +93,17 @@ void func_80B43AD4(EnYukabyun* this, GlobalContext* globalCtx) {
this->unk_150 += 0xA0;
this->actor.shape.rot.y += this->unk_150;
if (this->unk_150 >= 0x2000) {
this->actor.posRot.rot.y = this->actor.yawTowardsLink;
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
this->actor.speedXZ = 10.0f;
this->actionfunc = func_80B43B6C;
}
Math_StepToF(&this->actor.posRot.pos.y, this->actor.initPosRot.pos.y + 30.0f, 1.0f);
Math_StepToF(&this->actor.world.pos.y, this->actor.home.pos.y + 30.0f, 1.0f);
func_8002F974(&this->actor, NA_SE_EN_YUKABYUN_FLY - SFX_FLAG);
}
void func_80B43B6C(EnYukabyun* this, GlobalContext* globalCtx) {
this->actor.shape.rot.y += this->unk_150;
if (this->actor.xzDistToLink > 5000.0f) {
if (this->actor.xzDistToPlayer > 5000.0f) {
Actor_Kill(&this->actor);
return;
}
@ -111,7 +111,7 @@ void func_80B43B6C(EnYukabyun* this, GlobalContext* globalCtx) {
}
void EnYukabyun_Break(EnYukabyun* this, GlobalContext* globalCtx) {
EffectSsHahen_SpawnBurst(globalCtx, &this->actor.posRot.pos, 8.0f, 0, 1300, 300, 15, OBJECT_YUKABYUN, 10,
EffectSsHahen_SpawnBurst(globalCtx, &this->actor.world.pos, 8.0f, 0, 1300, 300, 15, OBJECT_YUKABYUN, 10,
D_06000A60);
Actor_Kill(&this->actor);
}
@ -127,7 +127,7 @@ void EnYukabyun_Update(Actor* thisx, GlobalContext* globalCtx) {
this->collider.base.acFlags &= ~AC_HIT;
this->collider.base.ocFlags1 &= ~OC1_HIT;
this->actor.flags &= ~0x5;
Audio_PlaySoundAtPosition(globalCtx, &this->actor.posRot.pos, 30, NA_SE_EN_OCTAROCK_ROCK);
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 30, NA_SE_EN_OCTAROCK_ROCK);
this->actionfunc = EnYukabyun_Break;
}
@ -135,7 +135,7 @@ void EnYukabyun_Update(Actor* thisx, GlobalContext* globalCtx) {
Actor_MoveForward(&this->actor);
if (!(this->actionfunc == func_80B43A94 || this->actionfunc == EnYukabyun_Break)) {
func_8002E4B4(globalCtx, &this->actor, 5.0f, 20.0f, 8.0f, 5);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 5.0f, 20.0f, 8.0f, 5);
Collider_UpdateCylinder(&this->actor, &this->collider);
this->actor.flags |= 0x1000000;
@ -144,7 +144,7 @@ void EnYukabyun_Update(Actor* thisx, GlobalContext* globalCtx) {
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
}
Actor_SetHeight(&this->actor, 4.0f);
Actor_SetFocus(&this->actor, 4.0f);
}
void EnYukabyun_Draw(Actor* thisx, GlobalContext* globalCtx) {