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

Poe Actor Decomps (#463)

* Poe actors progress

* Some more progress, En_Poh almost matching

* Further progress

* Fix merge

* Decompile data

* Actor struct cleanups

* More functions OK

* Progress

* Last function decompiled, some nonmatchings left

* Few more OK, skelanime_init definition changes

* Progress

* Style improvements, OPEN/CLOSE_DISPS, few more OK

* Few more style improvements, function prototype additions/changes, another function OK

* Remove unused asm, begin documentation

* Use generated reloc

* Cleanup, format

* Remove a few no longer needed comments

* PR suggestions

* DISP macros

* Missed some FrameUpdateMatrix != 0 replacements

* EnPoField_InteractWithSoul -> EnPoField_SoulInteract, eyeImageIdx -> eyeTextureIdx

* Fix merge, reformat

* Review Suggestions

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* Further review suggestions

* Ran formatter

* Less DECR usage

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
This commit is contained in:
Tharo 2020-12-05 00:34:27 +00:00 committed by GitHub
parent e983d2b72b
commit f85a2d10ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
212 changed files with 4102 additions and 15655 deletions

View file

@ -196,8 +196,8 @@ void EnTk_DigAnim(EnTk* this, GlobalContext* globalCtx) {
void EnTk_UpdateEyes(EnTk* this) {
if (DECR(this->blinkCountdown) == 0) {
this->eyeImageIdx++;
if (this->eyeImageIdx > 2) {
this->eyeTextureIdx++;
if (this->eyeTextureIdx > 2) {
this->blinkCycles--;
if (this->blinkCycles < 0) {
this->blinkCountdown = Math_Rand_S16Offset(30, 30);
@ -206,7 +206,7 @@ void EnTk_UpdateEyes(EnTk* this) {
this->blinkCycles++;
}
}
this->eyeImageIdx = 0;
this->eyeTextureIdx = 0;
}
}
}
@ -738,7 +738,7 @@ void EnTk_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_80093D18(globalCtx->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyesSegments[this->eyeImageIdx]));
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyesSegments[this->eyeTextureIdx]));
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnim.skeleton, this->skelAnim.limbDrawTbl, this->skelAnim.dListCount,
EnTk_OverrideLimbDraw, EnTk_PostLimbDraw, this);

View file

@ -39,7 +39,7 @@ typedef struct EnTk {
/* 0x021C */ s16 actionCountdown;
/* 0x021E */ s16 h_21E;
/* 0x0220 */ char unk_220[0x2];
/* 0x0222 */ s16 eyeImageIdx;
/* 0x0222 */ s16 eyeTextureIdx;
/* 0x0224 */ s16 blinkCountdown;
/* 0x0226 */ s16 headRot;
/* 0x0228 */ s16 currentWaypoint;