Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document EnGo and EnGo2 functions, fields, and animations #2295

Open
wants to merge 71 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 69 commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
d3eedf6
Document `func_8002F368` as `Player_GetExchangeItemId`
Feacur Nov 11, 2024
f249068
Document Goron's limbs
Feacur Nov 10, 2024
a71747b
Document Goron's limbs' display lists
Feacur Nov 10, 2024
b3b6b28
Document non-limb display lists
Feacur Nov 10, 2024
ba0bb10
just align attributes
Feacur Nov 10, 2024
40203d0
Document animations
Feacur Nov 10, 2024
60b8664
remove unused EnGo callbacks
Feacur Nov 10, 2024
3411f1e
redocument EnGo subtypes as an enum
Feacur Nov 10, 2024
687e70e
Document EnGo path param
Feacur Nov 10, 2024
78d0d41
Document EnGo opening Goron's cage
Feacur Nov 10, 2024
8784c81
Document `func_80A3F0E4` as `EnGo_UpdateBlinking`
Feacur Nov 10, 2024
46a13d5
streamline EnGo `*_Draw` function into 3 sections
Feacur Nov 10, 2024
bbf4225
Document bouncing in `EnGo_IsRollingOnGround`
Feacur Nov 10, 2024
3be6be5
Document EnGo `.unk_218` as `.waypoint`
Feacur Nov 10, 2024
87097be
Document EnGo `.unk_20E` as `.knockbackCooldown`
Feacur Nov 10, 2024
9de2038
Document EnGo `.unk_212` as `.attentionCooldown`
Feacur Nov 10, 2024
91d1382
Document EnGo `.unk_21E` as `.eyedropsTimer`
Feacur Nov 10, 2024
705ff1b
Document EnGo `.unk_210` as `.curledTimer`
Feacur Nov 11, 2024
8fb7fc2
Document EnGo `.unk_20C` as `.gaveSword`
Feacur Nov 11, 2024
4a793fa
`EnGo_IsCameraModified` -> `EnGo_IsAttentionDrawn`
Feacur Nov 11, 2024
c794de2
Document EnGo play speed factor
Feacur Nov 11, 2024
d9bd40d
Document EnGo funtions based on the context
Feacur Nov 10, 2024
686f367
prepare EnGo2's `*_Draw` function
Feacur Nov 11, 2024
2cc0e12
Document bouncing in `EnGo2_IsRollingOnGround`
Feacur Nov 11, 2024
4ecd12d
Document EnGo2 `.unk_211` as `.isUncurled`
Feacur Nov 11, 2024
50d3b84
Document EnGo2 `.unk_216` as `.reverseWaypoint`
Feacur Nov 11, 2024
7f30ab6
redocument EnGo2 message states
Feacur Nov 11, 2024
960c8b5
move EnGo2 `.goronState` comments to the TU
Feacur Nov 11, 2024
3b0e2ce
redocument EnGo2 `.alpha` as `.shadowAlpha`
Feacur Nov 11, 2024
787b260
`EnGo2_IsCameraModified`->`EnGo2_IsAttentionDrawn`
Feacur Nov 11, 2024
7510ed0
redocument EnGo2 subtypes as an enum
Feacur Nov 11, 2024
98afe53
Document EnGo2 path param
Feacur Nov 11, 2024
9be708d
Document EnGo2 opening Goron's cage
Feacur Nov 11, 2024
fc1009a
Document EnGo2 known data
Feacur Nov 11, 2024
b908614
Document EnGo2 funtions based on the context
Feacur Nov 11, 2024
41b9cd0
rematch `EnGo2_StopRolling`
Feacur Nov 12, 2024
dbe0a46
unify EnGo2 waking up naming
Feacur Nov 11, 2024
37569e2
Document `func_80A44790` as `EnGo2_UpdateTalking`
Feacur Nov 12, 2024
da79fb4
document `focusOffset` variables
Feacur Nov 12, 2024
1c416be
rematch `EnGo2_UpdateTalking` a bit
Feacur Nov 13, 2024
35d0d71
`EnGo2_IsCameraModified` -> `EnGo2_ShouldStay`
Feacur Nov 13, 2024
7c1d6f5
rename `func_80A408D8` -> `EnGo_AttentionLost`
Feacur Nov 13, 2024
17d5b2a
give better names to the attention switching funcs
Feacur Nov 13, 2024
7f3642d
give better enum names
Feacur Nov 13, 2024
77fde2c
rematch `EnGo2_RollingSlow`
Feacur Nov 13, 2024
011cf6a
fix a misleading comment
Feacur Nov 13, 2024
46648b4
name Hot Rodder consistently
Feacur Nov 13, 2024
9fae0fa
make the `unused` comment a header
Feacur Nov 13, 2024
57c4c76
document the nature of type values
Feacur Nov 13, 2024
a8dff36
remove unnecessary block braces
Feacur Nov 13, 2024
e2cda14
`CAGED_FLAG` -> `CAGED_SWITCH_FLAG`
Feacur Nov 13, 2024
fff6cf4
remove a [mis]leading zero
Feacur Nov 13, 2024
2ab3f6b
remove unnecessary comment
Feacur Nov 13, 2024
e87bc05
use uniform naming between variables
Feacur Nov 13, 2024
1fa1922
tweak `EnGo2_UpdateTalking` code and comments
Feacur Nov 14, 2024
9115505
link two `if` parts with and `else`
Feacur Nov 14, 2024
57951ed
Document `actor.params` bits allocation
Feacur Nov 14, 2024
4063499
Document `actor.params` bits allocation
Feacur Nov 14, 2024
d891107
yeah, be less judgemental
Feacur Nov 14, 2024
768297f
clarify "in range" of what it is
Feacur Nov 14, 2024
423748a
use `BINANG` macros instead of hex values
Feacur Nov 14, 2024
fe53732
give a function a better name
Feacur Nov 18, 2024
5ba85a3
name animation reversing func as such
Feacur Nov 18, 2024
5d1bf77
follow the bugs documentation style guide
Feacur Nov 18, 2024
771570a
give better names to rolling checks
Feacur Nov 20, 2024
bdf44ff
Merge branch 'main' into doc/actor_goron
Feacur Nov 28, 2024
220007e
tweak animations' names
Feacur Dec 8, 2024
6b3eebb
move defines into the headers
Feacur Dec 8, 2024
96c9712
Merge branch 'main' into doc/actor_goron
Feacur Dec 10, 2024
e5c5c32
restore `func_8002F368` name
Feacur Dec 13, 2024
2efe6fe
Merge branch 'main' into doc/actor_goron
Feacur Dec 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 62 additions & 21 deletions assets/xml/objects/object_oF1d_map.xml
Original file line number Diff line number Diff line change
@@ -1,37 +1,78 @@
<Root>
<!-- Goron -->
<File Name="object_oF1d_map" Segment="6">
<!-- animations -->
<Animation Name="gGoronAnim_000750" Offset="0x750"/>
<Animation Name="gGoronAnim_000D5C" Offset="0xD5C"/>
<Animation Name="gGoronAnim_00161C" Offset="0x161C"/>
<Animation Name="gGoronAnim_001A00" Offset="0x1A00"/>
<Animation Name="gGoronAnim_0021D0" Offset="0x21D0"/>
<Animation Name="gGoronAnim_0029A8" Offset="0x29A8"/>
<Animation Name="gGoronAnim_002D80" Offset="0x2D80"/>
<Animation Name="gGoronAnim_003768" Offset="0x3768"/>
<Animation Name="gGoronAnim_0038E4" Offset="0x38E4"/>
<Animation Name="gGoronAnim_004930" Offset="0x4930"/>
<Animation Name="gGoronAnim_010590" Offset="0x10590"/>

<DList Name="gGoronDL_00BD80" Offset="0xBD80"/>
<DList Name="gGoronDL_00C140" Offset="0xC140"/>

<DList Name="gGoronDL_00FD40" Offset="0xFD40"/>
<DList Name="gGoronDL_00FD50" Offset="0xFD50"/>
<Animation Name="gGoronSobbingAnim" Offset="0x750"/>
<Animation Name="gGoronShakingAnim" Offset="0xD5C"/>
<Animation Name="gGoronUncurlToProneAnim" Offset="0x161C"/>
<Animation Name="gGoronProneAnim" Offset="0x1A00"/>
<Animation Name="gGoronScratchingAnim" Offset="0x21D0"/>
<Animation Name="gGoronWalkingAnim" Offset="0x29A8"/>
<Animation Name="gGoronEyedropsTakenAnim" Offset="0x2D80"/>
<Animation Name="gGoronCryingAnim" Offset="0x3768"/>
<Animation Name="gGoronEyeropsAnim" Offset="0x38E4"/>
<Animation Name="gGoronUncurlSitStandAnim" Offset="0x4930"/>
<Animation Name="gGoronSidestepAnim" Offset="0x10590"/>

<!-- skeleton, limb none -->
<Skeleton Name="gGoronSkel" Type="Flex" LimbType="Standard" Offset="0xFEF0"/>

<!-- limbs -->
<Limb Name="gGoronRootLimb" LimbType="Standard" Offset="0xFDE0"/>
<Limb Name="gGoronWaistLimb" LimbType="Standard" Offset="0xFDEC"/>
<Limb Name="gGoronLegsLimb" LimbType="Standard" Offset="0xFDF8"/>
<Limb Name="gGoronLeftThighLimb" LimbType="Standard" Offset="0xFE04"/>
<Limb Name="gGoronLeftShinLimb" LimbType="Standard" Offset="0xFE10"/>
<Limb Name="gGoronLeftFootLimb" LimbType="Standard" Offset="0xFE1C"/>
<Limb Name="gGoronRightThighLimb" LimbType="Standard" Offset="0xFE28"/>
<Limb Name="gGoronRightShinLimb" LimbType="Standard" Offset="0xFE34"/>
<Limb Name="gGoronRightFootLimb" LimbType="Standard" Offset="0xFE40"/>
<Limb Name="gGoronTorsoLimb" LimbType="Standard" Offset="0xFE4C"/>
<Limb Name="gGoronLeftArmLimb" LimbType="Standard" Offset="0xFE58"/>
<Limb Name="gGoronLeftForearmLimb" LimbType="Standard" Offset="0xFE64"/>
<Limb Name="gGoronLeftHandLimb" LimbType="Standard" Offset="0xFE70"/>
<Limb Name="gGoronRightArmLimb" LimbType="Standard" Offset="0xFE7C"/>
<Limb Name="gGoronRightForearmLimb" LimbType="Standard" Offset="0xFE88"/>
<Limb Name="gGoronRightHandLimb" LimbType="Standard" Offset="0xFE94"/>
<Limb Name="gGoronHeadLimb" LimbType="Standard" Offset="0xFEA0"/>

<!-- limb display lists -->
<DList Name="gGoronWaistDL" Offset="0x8708"/>
<DList Name="gGoronLeftThighDL" Offset="0x8C80"/>
<DList Name="gGoronLeftShinDL" Offset="0x8D70"/>
<DList Name="gGoronLeftFootDL" Offset="0x8EC0"/>
<DList Name="gGoronRightThighDL" Offset="0x87D0"/>
<DList Name="gGoronRightShinDL" Offset="0x88C0"/>
<DList Name="gGoronRightFootDL" Offset="0x8A10"/>
<DList Name="gGoronTorsoDL" Offset="0x6F90"/>
<DList Name="gGoronLeftArmDL" Offset="0x8218"/>
<DList Name="gGoronLeftForearmDL" Offset="0x83A0"/>
<DList Name="gGoronLeftHandDL" Offset="0x84E0"/>
<DList Name="gGoronRightArmDL" Offset="0x7D28"/>
<DList Name="gGoronRightForearmDL" Offset="0x7EB0"/>
<DList Name="gGoronRightHandDL" Offset="0x7FF0"/>
<DList Name="gGoronHeadDL" Offset="0x7458"/>

<!-- states display lists -->
<DList Name="gGoronCurledUpDL" Offset="0xBD80"/>
<DList Name="gGoronRollingDL" Offset="0xC140"/>

<!-- effects display lists -->
<DList Name="gGoronParticleMaterialDL" Offset="0xFD40"/>
<DList Name="gGoronParticleDL" Offset="0xFD50"/>

<!-- palettes -->
<Texture Name="object_oF1d_map_TLUT_00C640" OutName="tlut_0000C640" Format="rgba16" Width="16" Height="16" Offset="0xC640"/>

<!-- Eye textures -->
<Texture Name="gGoronCsEyeOpenTex" OutName="eye_open" Format="ci8" Width="32" Height="32" Offset="0xCE80" TlutOffset="0xC640"/>
<Texture Name="gGoronCsEyeHalfTex" OutName="eye_half" Format="ci8" Width="32" Height="32" Offset="0xD280" TlutOffset="0xC640"/>
<Texture Name="gGoronCsEyeClosedTex" OutName="eye_closed" Format="ci8" Width="32" Height="32" Offset="0xD680" TlutOffset="0xC640"/>
<Texture Name="gGoronCsEyeOpenTex" OutName="eye_open" Format="ci8" Width="32" Height="32" Offset="0xCE80" TlutOffset="0xC640"/>
<Texture Name="gGoronCsEyeHalfTex" OutName="eye_half" Format="ci8" Width="32" Height="32" Offset="0xD280" TlutOffset="0xC640"/>
<Texture Name="gGoronCsEyeClosedTex" OutName="eye_closed" Format="ci8" Width="32" Height="32" Offset="0xD680" TlutOffset="0xC640"/>
<Texture Name="gGoronCsEyeClosed2Tex" OutName="eye_closed2" Format="ci8" Width="32" Height="32" Offset="0xDA80" TlutOffset="0xC640"/>

<!-- Mouth textures -->
<Texture Name="gGoronCsMouthNeutralTex" OutName="mouth_neutral" Format="ci8" Width="64" Height="32" Offset="0xDE80" TlutOffset="0xC640"/>
<Texture Name="gGoronCsMouthSmileTex" OutName="mouth_smile" Format="ci8" Width="64" Height="32" Offset="0xE680" TlutOffset="0xC640"/>
<Texture Name="gGoronCsMouthSmileTex" OutName="mouth_smile" Format="ci8" Width="64" Height="32" Offset="0xE680" TlutOffset="0xC640"/>

</File>
</Root>
2 changes: 1 addition & 1 deletion include/z64actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ s32 Actor_OfferTalkExchangeEquiCylinder(Actor* actor, struct PlayState* play, f3
s32 Actor_OfferTalk(Actor* actor, struct PlayState* play, f32 radius);
s32 Actor_OfferTalkNearColChkInfoCylinder(Actor* actor, struct PlayState* play);
u32 Actor_TextboxIsClosing(Actor* actor, struct PlayState* play);
s8 func_8002F368(struct PlayState* play);
s8 Player_GetExchangeItemId(struct PlayState* play);
void Actor_GetScreenPos(struct PlayState* play, Actor* actor, s16* x, s16* y);
u32 Actor_HasParent(Actor* actor, struct PlayState* play);
s32 Actor_OfferGetItem(Actor* actor, struct PlayState* play, s32 getItemId, f32 xzRange, f32 yRange);
Expand Down
2 changes: 1 addition & 1 deletion src/code/z_actor.c
Original file line number Diff line number Diff line change
Expand Up @@ -1768,7 +1768,7 @@ u32 Actor_TextboxIsClosing(Actor* actor, PlayState* play) {
}
}

s8 func_8002F368(PlayState* play) {
s8 Player_GetExchangeItemId(PlayState* play) {
Player* player = GET_PLAYER(play);

return player->exchangeItemId;
Feacur marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
4 changes: 2 additions & 2 deletions src/overlays/actors/ovl_Demo_Go/z_demo_go.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ void func_8097CEEC(DemoGo* this, PlayState* play) {
}

void func_8097CF20(DemoGo* this, PlayState* play, s32 arg2) {
AnimationHeader* animation = &gGoronAnim_0029A8;
AnimationHeader* animation = &gGoronWalkingAnim;
if (arg2 != 0) {
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_LOOP,
-8.0f);
Expand Down Expand Up @@ -328,7 +328,7 @@ void DemoGo_Update(Actor* thisx, PlayState* play) {

void DemoGo_Init(Actor* thisx, PlayState* play) {
DemoGo* this = (DemoGo*)thisx;
AnimationHeader* animation = &gGoronAnim_004930;
AnimationHeader* animation = &gGoronUncurlSitStandAnim;

ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gGoronSkel, NULL, NULL, NULL, 0);
Expand Down
2 changes: 1 addition & 1 deletion src/overlays/actors/ovl_En_Ds/z_en_ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ void EnDs_Wait(EnDs* this, PlayState* play) {
s16 yawDiff;

if (Actor_TalkOfferAccepted(&this->actor, play)) {
if (func_8002F368(play) == EXCH_ITEM_ODD_MUSHROOM) {
if (Player_GetExchangeItemId(play) == EXCH_ITEM_ODD_MUSHROOM) {
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
player->actor.textId = 0x504A;
Expand Down
2 changes: 1 addition & 1 deletion src/overlays/actors/ovl_En_Gb/z_en_gb.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ void func_80A2F83C(EnGb* this, PlayState* play) {
if (Actor_TalkOfferAccepted(&this->dyna.actor, play)) {
s32 pad;

switch (func_8002F368(play)) {
switch (Player_GetExchangeItemId(play)) {
case EXCH_ITEM_NONE:
func_80A2F180(this);
this->actionFunc = func_80A2F94C;
Expand Down
Loading