1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-08 07:20: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:
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

@ -48,7 +48,7 @@ extern AnimationHeader D_06000214;
const ActorInit En_Kakasi_InitVars = {
ACTOR_EN_KAKASI,
ACTORTYPE_NPC,
ACTORCAT_NPC,
FLAGS,
OBJECT_KA,
sizeof(EnKakasi),
@ -69,14 +69,14 @@ void EnKakasi_Init(Actor* thisx, GlobalContext* globalCtx) {
EnKakasi* this = THIS;
osSyncPrintf("\n\n");
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ ☆☆☆☆☆ %f\n" VT_RST, this->actor.posRot.pos.y);
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ ☆☆☆☆☆ %f\n" VT_RST, this->actor.world.pos.y);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
this->actor.unk_1F = 6;
this->actor.targetMode = 6;
SkelAnime_InitFlex(globalCtx, &this->skelanime, &D_060065B0, &D_06000214, NULL, NULL, 0);
this->rot = this->actor.posRot.rot;
this->rot = this->actor.world.rot;
this->actor.flags |= 0x400;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
@ -199,8 +199,8 @@ void func_80A8F660(EnKakasi* this, GlobalContext* globalCtx) {
void func_80A8F75C(EnKakasi* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
s16 yawTowardsLink;
s16 absyawTowardsLink;
s16 yawTowardsPlayer;
s16 absyawTowardsPlayer;
func_80A8F28C(this);
SkelAnime_Update(&this->skelanime);
@ -214,11 +214,11 @@ void func_80A8F75C(EnKakasi* this, GlobalContext* globalCtx) {
return;
}
yawTowardsLink = this->actor.yawTowardsLink - this->actor.shape.rot.y;
if (!(this->actor.xzDistToLink > 120.0f)) {
absyawTowardsLink = ABS(yawTowardsLink);
yawTowardsPlayer = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
if (!(this->actor.xzDistToPlayer > 120.0f)) {
absyawTowardsPlayer = ABS(yawTowardsPlayer);
if (absyawTowardsLink < 0x4300) {
if (absyawTowardsPlayer < 0x4300) {
if (!this->unk_194) {
if (player->stateFlags2 & 0x1000000) {
this->camId = func_800800F8(globalCtx, 0x8D4, -0x63, &this->actor, 0);
@ -230,7 +230,7 @@ void func_80A8F75C(EnKakasi* this, GlobalContext* globalCtx) {
this->actionFunc = func_80A8F8D0;
return;
}
if (this->actor.xzDistToLink < 80.0f) {
if (this->actor.xzDistToPlayer < 80.0f) {
player->stateFlags2 |= 0x800000;
}
}
@ -327,7 +327,7 @@ void EnKakasi_Update(Actor* thisx, GlobalContext* globalCtx) {
s32 i;
this->unk_198++;
this->actor.posRot.rot = this->actor.shape.rot;
this->actor.world.rot = this->actor.shape.rot;
for (i = 0; i < ARRAY_COUNT(this->unk_19C); i++) {
if (this->unk_19C[i] != 0) {
this->unk_19C[i]--;
@ -335,10 +335,10 @@ void EnKakasi_Update(Actor* thisx, GlobalContext* globalCtx) {
}
this->height = 60.0f;
Actor_SetHeight(&this->actor, this->height);
Actor_SetFocus(&this->actor, this->height);
this->actionFunc(this, globalCtx);
Actor_MoveForward(&this->actor);
func_8002E4B4(globalCtx, &this->actor, 50.0f, 50.0f, 100.0f, 28);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 50.0f, 50.0f, 100.0f, 28);
Collider_UpdateCylinder(&this->actor, &this->collider);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
}