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

@ -23,7 +23,7 @@ void EnMs_TalkAfterPurchase(EnMs* this, GlobalContext* globalCtx);
const ActorInit En_Ms_InitVars = {
ACTOR_EN_MS,
ACTORTYPE_NPC,
ACTORCAT_NPC,
FLAGS,
OBJECT_MS,
sizeof(EnMs),
@ -54,8 +54,8 @@ static u16 sOfferTextIDs[] = {
};
static InitChainEntry sInitChain[] = {
ICHAIN_U8(unk_1F, 2, ICHAIN_CONTINUE),
ICHAIN_F32(unk_4C, 500, ICHAIN_STOP),
ICHAIN_U8(targetMode, 2, ICHAIN_CONTINUE),
ICHAIN_F32(targetArrowOffset, 500, ICHAIN_STOP),
};
extern AnimationHeader D_060005EC;
@ -84,7 +84,7 @@ void EnMs_Init(Actor* thisx, GlobalContext* globalCtx) {
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06003DC0, &D_060005EC, this->jointTable, this->morphTable, 9);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinderType1(globalCtx, &this->collider, this, &sCylinderInit);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 35.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 35.0f);
Actor_SetScale(&this->actor, 0.015f);
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
@ -106,14 +106,14 @@ void EnMs_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void EnMs_Wait(EnMs* this, GlobalContext* globalCtx) {
s16 yawDiff;
yawDiff = this->actor.yawTowardsLink - this->actor.shape.rot.y;
yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
EnMs_SetOfferText(&this->actor, globalCtx);
if (func_8002F194(&this->actor, globalCtx) != 0) { // if talk is initiated
this->actionFunc = EnMs_Talk;
return;
}
if ((this->actor.xzDistToLink < 90.0f) && (ABS(yawDiff) < 0x2000)) { // talk range
if ((this->actor.xzDistToPlayer < 90.0f) && (ABS(yawDiff) < 0x2000)) { // talk range
func_8002F2CC(&this->actor, globalCtx, 90.0f);
}
}
@ -169,8 +169,8 @@ void EnMs_Update(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
this->activeTimer += 1;
Actor_SetHeight(&this->actor, 20.0f);
this->actor.unk_4C = 500.0f;
Actor_SetFocus(&this->actor, 20.0f);
this->actor.targetArrowOffset = 500.0f;
Actor_SetScale(&this->actor, 0.015f);
SkelAnime_Update(&this->skelAnime);
this->actionFunc(this, globalCtx);
@ -178,7 +178,7 @@ void EnMs_Update(Actor* thisx, GlobalContext* globalCtx) {
if (gSaveContext.entranceIndex == 0x157 && gSaveContext.sceneSetupIndex == 8) { // ride carpet if in credits
Actor_MoveForward(&this->actor);
osSyncPrintf("OOOHHHHHH %f\n", this->actor.velocity.y);
func_8002E4B4(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, 4);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, 4);
}
Collider_UpdateCylinder(&this->actor, &this->collider);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);