1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-23 07:21:19 +00:00

z_actor documentation pass (#1445)

* Actor_Offer* and Actor_SetClosestSecretDistance

* color filter stuff

* KillAll

* format

* comment

* Update src/code/z_actor.c

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

* review

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

* format

* COLORFILTER_INTENSITY_FLAG

* Remove -

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

* yeet COLORFILTER_GET_XLUFLAG

* bug

* frug

* Undo Actor_KillAllFromUnloadedRooms

* update Actor_OfferGetItem comment

* Update Actor_OfferGetItem description

* diving

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
This commit is contained in:
Anghelo Carvajal 2022-12-12 23:23:14 -03:00 committed by GitHub
parent 83163f4d4b
commit c420885513
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
120 changed files with 385 additions and 312 deletions

View file

@ -591,14 +591,14 @@ s32 EnSkj_CollisionCheck(EnSkj* this, PlayState* play) {
yawDiff = this->actor.yawTowardsPlayer - this->actor.world.rot.y;
if ((this->action == 2) || (this->action == 6)) {
if ((yawDiff > 0x6000) || (yawDiff < -0x6000)) {
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8);
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8);
EnSkj_SetupDie(this);
return 1;
}
}
Actor_ApplyDamage(&this->actor);
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8);
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8);
if (this->actor.colChkInfo.health != 0) {
if (this->hitsUntilDodge != 0) {
@ -1036,7 +1036,8 @@ void EnSkj_SariaSongTalk(EnSkj* this, PlayState* play) {
EnSkj_SetupWaitInRange(this);
} else {
func_80AFFE24(this);
func_8002F434(&this->actor, play, GI_HEART_PIECE, EnSkj_GetItemXzRange(this), EnSkj_GetItemYRange(this));
Actor_OfferGetItem(&this->actor, play, GI_HEART_PIECE, EnSkj_GetItemXzRange(this),
EnSkj_GetItemYRange(this));
}
}
}
@ -1050,7 +1051,7 @@ void func_80AFFE44(EnSkj* this, PlayState* play) {
this->actor.parent = NULL;
EnSkj_SetupPostSariasSong(this);
} else {
func_8002F434(&this->actor, play, GI_HEART_PIECE, EnSkj_GetItemXzRange(this), EnSkj_GetItemYRange(this));
Actor_OfferGetItem(&this->actor, play, GI_HEART_PIECE, EnSkj_GetItemXzRange(this), EnSkj_GetItemYRange(this));
}
}
@ -1528,7 +1529,7 @@ void EnSkj_WonOcarinaMiniGame(EnSkj* this, PlayState* play) {
void EnSkj_WaitToGiveReward(EnSkj* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
func_8002F434(&this->actor, play, sOcarinaGameRewards[gSaveContext.ocarinaGameRoundNum], 26.0f, 26.0f);
Actor_OfferGetItem(&this->actor, play, sOcarinaGameRewards[gSaveContext.ocarinaGameRoundNum], 26.0f, 26.0f);
this->actionFunc = EnSkj_GiveOcarinaGameReward;
}
}
@ -1538,7 +1539,7 @@ void EnSkj_GiveOcarinaGameReward(EnSkj* this, PlayState* play) {
this->actor.parent = NULL;
this->actionFunc = EnSkj_FinishOcarinaGameRound;
} else {
func_8002F434(&this->actor, play, sOcarinaGameRewards[gSaveContext.ocarinaGameRoundNum], 26.0f, 26.0f);
Actor_OfferGetItem(&this->actor, play, sOcarinaGameRewards[gSaveContext.ocarinaGameRoundNum], 26.0f, 26.0f);
}
}