1
0
Fork 0
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:
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_80ABBBA8(EnNutsball* this, GlobalContext* globalCtx);
const ActorInit En_Nutsball_InitVars = {
ACTOR_EN_NUTSBALL,
ACTORTYPE_PROP,
ACTORCAT_PROP,
FLAGS,
OBJECT_GAMEPLAY_KEEP,
sizeof(EnNutsball),
@ -59,7 +59,7 @@ void EnNutsball_Init(Actor* thisx, GlobalContext* globalCtx) {
EnNutsball* this = THIS;
s32 pad;
ActorShape_Init(&this->actor.shape, 400.0f, ActorShadow_DrawFunc_Circle, 13.0f);
ActorShape_Init(&this->actor.shape, 400.0f, ActorShadow_DrawCircle, 13.0f);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
this->objBankIndex = Object_GetIndex(&globalCtx->objectCtx, sObjectIDs[this->actor.params]);
@ -99,7 +99,7 @@ void func_80ABBBA8(EnNutsball* this, GlobalContext* globalCtx) {
this->actor.gravity = -1.0f;
}
this->actor.initPosRot.rot.z += 0x2AA8;
this->actor.home.rot.z += 0x2AA8;
if ((this->actor.bgCheckFlags & 8) || (this->actor.bgCheckFlags & 1) || (this->collider.base.atFlags & AT_HIT) ||
(this->collider.base.acFlags & AC_HIT) || (this->collider.base.ocFlags1 & OC1_HIT)) {
@ -114,18 +114,18 @@ void func_80ABBBA8(EnNutsball* this, GlobalContext* globalCtx) {
this->collider.info.toucher.dmgFlags = 2;
func_800D20CC(&player->shieldMf, &sp4C, 0);
this->actor.posRot.rot.y = sp4C.y + 0x8000;
this->actor.world.rot.y = sp4C.y + 0x8000;
this->timer = 30;
return;
}
}
sp40.x = this->actor.posRot.pos.x;
sp40.y = this->actor.posRot.pos.y + 4;
sp40.z = this->actor.posRot.pos.z;
sp40.x = this->actor.world.pos.x;
sp40.y = this->actor.world.pos.y + 4;
sp40.z = this->actor.world.pos.z;
EffectSsHahen_SpawnBurst(globalCtx, &sp40, 6.0f, 0, 7, 3, 15, HAHEN_OBJECT_DEFAULT, 10, NULL);
Audio_PlaySoundAtPosition(globalCtx, &this->actor.posRot.pos, 20, NA_SE_EN_OCTAROCK_ROCK);
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EN_OCTAROCK_ROCK);
Actor_Kill(&this->actor);
} else {
if (this->timer == -300) {
@ -143,7 +143,7 @@ void EnNutsball_Update(Actor* thisx, GlobalContext* globalCtx) {
this->actionFunc(this, globalCtx);
Actor_MoveForward(&this->actor);
func_8002E4B4(globalCtx, &this->actor, 10, sCylinderInit.dim.radius, sCylinderInit.dim.height, 5);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 10, sCylinderInit.dim.radius, sCylinderInit.dim.height, 5);
Collider_UpdateCylinder(&this->actor, &this->collider);
this->actor.flags |= 0x1000000;
@ -161,7 +161,7 @@ void EnNutsball_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_80093D18(globalCtx->state.gfxCtx);
Matrix_Mult(&globalCtx->mf_11DA0, MTXMODE_APPLY);
Matrix_RotateZ(thisx->initPosRot.rot.z * 9.58738e-05f, MTXMODE_APPLY);
Matrix_RotateZ(thisx->home.rot.z * 9.58738e-05f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_nutsball.c", 333),
G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDLists[thisx->params]);