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

@ -24,7 +24,7 @@ void func_80B93E38(ObjHsblock* this);
const ActorInit Obj_Hsblock_InitVars = {
ACTOR_OBJ_HSBLOCK,
ACTORTYPE_BG,
ACTORCAT_BG,
FLAGS,
OBJECT_D_HSBLOCK,
sizeof(ObjHsblock),
@ -69,9 +69,9 @@ void func_80B93B68(ObjHsblock* this, GlobalContext* globalCtx, CollisionHeader*
void func_80B93BF0(ObjHsblock* this, GlobalContext* globalCtx) {
if ((this->dyna.actor.params >> 5) & 1) {
Actor_SpawnAsChild(&globalCtx->actorCtx, this, globalCtx, ACTOR_OBJ_ICE_POLY, this->dyna.actor.posRot.pos.x,
this->dyna.actor.posRot.pos.y, this->dyna.actor.posRot.pos.z, this->dyna.actor.posRot.rot.x,
this->dyna.actor.posRot.rot.y, this->dyna.actor.posRot.rot.z, 1);
Actor_SpawnAsChild(&globalCtx->actorCtx, this, globalCtx, ACTOR_OBJ_ICE_POLY, this->dyna.actor.world.pos.x,
this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z, this->dyna.actor.world.rot.x,
this->dyna.actor.world.rot.y, this->dyna.actor.world.rot.z, 1);
}
}
@ -112,7 +112,7 @@ void func_80B93D90(ObjHsblock* this) {
void func_80B93DB0(ObjHsblock* this) {
this->dyna.actor.flags |= 0x10;
this->dyna.actor.posRot.pos.y = this->dyna.actor.initPosRot.pos.y - 105.0f;
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - 105.0f;
ObjHsblock_SetupAction(this, func_80B93DF4);
}
@ -128,9 +128,9 @@ void func_80B93E38(ObjHsblock* this) {
void func_80B93E5C(ObjHsblock* this, GlobalContext* globalCtx) {
Math_SmoothStepToF(&this->dyna.actor.velocity.y, 16.0f, 0.1f, 0.8f, 0.0f);
if (fabsf(Math_SmoothStepToF(&this->dyna.actor.posRot.pos.y, this->dyna.actor.initPosRot.pos.y, 0.3f,
if (fabsf(Math_SmoothStepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, 0.3f,
this->dyna.actor.velocity.y, 0.3f)) < 0.001f) {
this->dyna.actor.posRot.pos.y = this->dyna.actor.initPosRot.pos.y;
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y;
func_80B93D90(this);
this->dyna.actor.flags &= ~0x10;
}
@ -142,7 +142,7 @@ void ObjHsblock_Update(Actor* thisx, GlobalContext* globalCtx) {
if (this->actionFunc != NULL) {
this->actionFunc(this, globalCtx);
}
Actor_SetHeight(thisx, D_80B940C0[thisx->params & 3]);
Actor_SetFocus(thisx, D_80B940C0[thisx->params & 3]);
}
void ObjHsblock_Draw(Actor* thisx, GlobalContext* globalCtx) {