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

@ -27,7 +27,7 @@ void func_80A59618(EnHoll* this, GlobalContext* globalCtx);
const ActorInit En_Holl_InitVars = {
ACTOR_EN_HOLL,
ACTORTYPE_DOOR,
ACTORCAT_DOOR,
FLAGS,
OBJECT_GAMEPLAY_KEEP,
sizeof(EnHoll),
@ -141,7 +141,7 @@ void func_80A58DD4(EnHoll* this, GlobalContext* globalCtx) {
f32 absZ;
s32 transitionActorIdx;
func_8002DBD0(&this->actor, &vec, &player->actor.posRot.pos);
func_8002DBD0(&this->actor, &vec, &player->actor.world.pos);
this->side = (vec.z < 0.0f) ? 0 : 1;
absZ = fabsf(vec.z);
if (vec.y > PLANE_Y_MIN && vec.y < PLANE_Y_MAX && fabsf(vec.x) < PLANE_HALFWIDTH &&
@ -185,7 +185,7 @@ void func_80A59014(EnHoll* this, GlobalContext* globalCtx) {
f32 absZ;
s32 side;
func_8002DBD0(&this->actor, &vec, (useViewEye) ? &globalCtx->view.eye : &player->actor.posRot.pos);
func_8002DBD0(&this->actor, &vec, (useViewEye) ? &globalCtx->view.eye : &player->actor.world.pos);
planeHalfWidth = (((this->actor.params >> 6) & 7) == 6) ? PLANE_HALFWIDTH : PLANE_HALFWIDTH_2;
if (EnHoll_IsKokiriSetup8() || (vec.y > PLANE_Y_MIN && vec.y < PLANE_Y_MAX && fabsf(vec.x) < planeHalfWidth &&
fabsf(vec.z) < 100.0f && fabsf(vec.z) > 50.0f)) {
@ -206,10 +206,10 @@ void func_80A59014(EnHoll* this, GlobalContext* globalCtx) {
// Vertical Planes
void func_80A591C0(EnHoll* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
f32 absY = fabsf(this->actor.yDistToLink);
f32 absY = fabsf(this->actor.yDistToPlayer);
s32 transitionActorIdx;
if (this->actor.xzDistToLink < 500.0f && absY < 700.0f) {
if (this->actor.xzDistToPlayer < 500.0f && absY < 700.0f) {
transitionActorIdx = (u16)this->actor.params >> 0xA;
if (absY < 95.0f) {
globalCtx->unk_11E18 = 0xFF;
@ -220,8 +220,8 @@ void func_80A591C0(EnHoll* this, GlobalContext* globalCtx) {
}
if (absY < 95.0f) {
this->actor.room = globalCtx->transitionActorList[transitionActorIdx].sides[1].room;
Math_SmoothStepToF(&player->actor.posRot.pos.x, this->actor.posRot.pos.x, 1.0f, 50.0f, 10.0f);
Math_SmoothStepToF(&player->actor.posRot.pos.z, this->actor.posRot.pos.z, 1.0f, 50.0f, 10.0f);
Math_SmoothStepToF(&player->actor.world.pos.x, this->actor.world.pos.x, 1.0f, 50.0f, 10.0f);
Math_SmoothStepToF(&player->actor.world.pos.z, this->actor.world.pos.z, 1.0f, 50.0f, 10.0f);
if (this->actor.room != globalCtx->roomCtx.curRoom.num &&
func_8009728C(globalCtx, &globalCtx->roomCtx, this->actor.room) != 0) {
EnHoll_SetupAction(this, EnHoll_NextAction);
@ -241,7 +241,7 @@ void func_80A593A4(EnHoll* this, GlobalContext* globalCtx) {
s32 side;
s32 transitionActorIdx;
if ((this->actor.xzDistToLink < 120.0f) && (absY = fabsf(this->actor.yDistToLink), absY < 200.0f)) {
if ((this->actor.xzDistToPlayer < 120.0f) && (absY = fabsf(this->actor.yDistToPlayer), absY < 200.0f)) {
if (absY < 50.0f) {
globalCtx->unk_11E18 = 0xFF;
} else {
@ -249,7 +249,7 @@ void func_80A593A4(EnHoll* this, GlobalContext* globalCtx) {
}
if (absY > 50.0f) {
transitionActorIdx = (u16)this->actor.params >> 0xA;
side = (0.0f < this->actor.yDistToLink) ? 0 : 1;
side = (0.0f < this->actor.yDistToPlayer) ? 0 : 1;
this->actor.room = globalCtx->transitionActorList[transitionActorIdx].sides[side].room;
if (this->actor.room != globalCtx->roomCtx.curRoom.num &&
func_8009728C(globalCtx, &globalCtx->roomCtx, this->actor.room) != 0) {
@ -269,11 +269,11 @@ void func_80A59520(EnHoll* this, GlobalContext* globalCtx) {
s8 side;
s32 transitionActorIdx;
if (this->actor.xzDistToLink < 120.0f) {
absY = fabsf(this->actor.yDistToLink);
if (this->actor.xzDistToPlayer < 120.0f) {
absY = fabsf(this->actor.yDistToPlayer);
if (absY < 200.0f && absY > 50.0f) {
transitionActorIdx = (u16)this->actor.params >> 0xA;
side = (0.0f < this->actor.yDistToLink) ? 0 : 1;
side = (0.0f < this->actor.yDistToPlayer) ? 0 : 1;
this->actor.room = globalCtx->transitionActorList[transitionActorIdx].sides[side].room;
if (this->actor.room != globalCtx->roomCtx.curRoom.num &&
func_8009728C(globalCtx, &globalCtx->roomCtx, this->actor.room) != 0) {
@ -297,7 +297,7 @@ void func_80A59618(EnHoll* this, GlobalContext* globalCtx) {
this->unk_14F = 0;
}
} else {
func_8002DBD0(&this->actor, &vec, &player->actor.posRot.pos);
func_8002DBD0(&this->actor, &vec, &player->actor.world.pos);
absZ = fabsf(vec.z);
if (PLANE_Y_MIN < vec.y && vec.y < PLANE_Y_MAX && fabsf(vec.x) < PLANE_HALFWIDTH_2 && absZ < 100.0f) {
this->unk_14F = 1;