summaryrefslogtreecommitdiff
path: root/docs/tutorial
diff options
context:
space:
mode:
authorDerek Hensley <hensley.derek58@gmail.com>2022-06-19 17:16:30 -0700
committerGitHub <noreply@github.com>2022-06-20 01:16:30 +0100
commit37d3934e2c6866185b3ba76bad40224336a7a1f9 (patch)
treef27b5ef43872f7076d32870f98f26971347b8f05 /docs/tutorial
parent6d371502e1fcc7777035fd977df518bb0e3aab1c (diff)
Code_800E8EA0 Docs (#832)
* Start * Add notes from OOT * D_801D0D50 -> gDbgCamEnabled * Rotation Functions * Text function * RotateBack -> RotateForward * Flags functions * Document rotation func returns * Remove comment from play * Rename play function, add notes about Flags, add notes about focus * Update notes a little * Update src/code/code_800E8EA0.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Fix apostrophes * Bring over OoT changes * TurnTo -> Track in SubS systesm * format and remove OoT specific comment * Remove old comments * namefixer Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
Diffstat (limited to 'docs/tutorial')
-rw-r--r--docs/tutorial/documenting.md4
-rw-r--r--docs/tutorial/other_functions.md12
2 files changed, 8 insertions, 8 deletions
diff --git a/docs/tutorial/documenting.md b/docs/tutorial/documenting.md
index 7e8435da9..e31a31969 100644
--- a/docs/tutorial/documenting.md
+++ b/docs/tutorial/documenting.md
@@ -216,7 +216,7 @@ void EnRecepgirl_Update(Actor *thisx, GlobalContext *globalCtx) {
Vec3s sp30;
this->actionFunc(this, globalCtx);
- func_800E9250(globalCtx, &this->actor, &this->unk_2AE, &sp30, this->actor.focus.pos);
+ Actor_TrackPlayer(globalCtx, &this->actor, &this->unk_2AE, &sp30, this->actor.focus.pos);
func_80C100DC(this);
}
@@ -287,7 +287,7 @@ That's probably as much as we can do on functions for now. Next let's think abou
- data/bss
- intrafunction/stack variables
-and this is roughly the order of preference for naming them (although not necessarily the logical order to determine what they do). This actor is quite limited in the last category: only `sp30` is unnamed at the moment. Even though `func_800E9250` is decomped, the purpose of the argument in which `sp30` is placed is not clear (and, indeed, is not named), so it's probably best to leave it unnamed for now. (With greater experience, you might analyse `func_800E9250` to work out what this argument is for, but let's not worry about that for now.)
+and this is roughly the order of preference for naming them (although not necessarily the logical order to determine what they do). This actor is quite limited in the last category: only `sp30` is unnamed at the moment. Even though `Actor_TrackPlayer` is decomped, the purpose of the argument in which `sp30` is placed is not clear (and, indeed, is not named), so it's probably best to leave it unnamed for now. (With greater experience, you might analyse `Actor_TrackPlayer` to work out what this argument is for, but let's not worry about that for now.)
As for the struct, there are two unnamed variables at the moment:
```C
diff --git a/docs/tutorial/other_functions.md b/docs/tutorial/other_functions.md
index 796939dd8..f9a189d6b 100644
--- a/docs/tutorial/other_functions.md
+++ b/docs/tutorial/other_functions.md
@@ -422,7 +422,7 @@ void EnRecepgirl_Update(Actor *thisx, GlobalContext *globalCtx) {
? sp30;
this->actionFunc(this, globalCtx);
- func_800E9250(globalCtx, (Actor *) this, this + 0x2AE, (Vec3s *) &sp30, (bitwise Vec3f) this->actor.focus.pos.x, this->actor.focus.pos.y, this->actor.focus.pos.z);
+ Actor_TrackPlayer(globalCtx, (Actor *) this, this + 0x2AE, (Vec3s *) &sp30, (bitwise Vec3f) this->actor.focus.pos.x, this->actor.focus.pos.y, this->actor.focus.pos.z);
func_80C100DC(this);
}
```
@@ -440,13 +440,13 @@ void EnRecepgirl_Update(Actor *thisx, GlobalContext *globalCtx) {
? sp30;
this->actionFunc(this, globalCtx);
- func_800E9250(globalCtx, &this->actor, this + 0x2AE, (Vec3s *) &sp30, (bitwise Vec3f) this->actor.focus.pos.x, this->actor.focus.pos.y, this->actor.focus.pos.z);
+ Actor_TrackPlayer(globalCtx, &this->actor, this + 0x2AE, (Vec3s *) &sp30, (bitwise Vec3f) this->actor.focus.pos.x, this->actor.focus.pos.y, this->actor.focus.pos.z);
func_80C100DC(this);
}
```
-Now, our problem is `func_800E9250`. The arguments all look terrible! Indeed, if we look at the actual function in `src/code/code_800E8EA0.c` (found by searching), we find that it should be
+Now, our problem is `Actor_TrackPlayer`. The arguments all look terrible! Indeed, if we look at the actual function in `src/code/code_800E8EA0.c` (found by searching), we find that it should be
```C
-s32 func_800E9250(GlobalContext* globalCtx, Actor* actor, Vec3s* param_3, Vec3s* param_4, Vec3f param_5)
+s32 Actor_TrackPlayer(GlobalContext* globalCtx, Actor* actor, Vec3s* headRot, Vec3s* torsoRot, Vec3f focusPos)
```
So mips2c has made a bit of a mess here:
- the third argument should be a `Vec3s`. Hence `this + 0x2AE` is a `Vec3s*`, and so `this->unk_2AE` is a `Vec3s`
@@ -460,7 +460,7 @@ void EnRecepgirl_Update(EnRecepgirl *this, GlobalContext *globalCtx) {
Vec3s sp30;
this->actionFunc(this, globalCtx);
- func_800E9250(globalCtx, &this->actor, &this->unk_2AE, &sp30, this->actor.focus.pos);
+ Actor_TrackPlayer(globalCtx, &this->actor, &this->unk_2AE, &sp30, this->actor.focus.pos);
func_80C100DC(this);
}
```
@@ -490,7 +490,7 @@ void EnRecepgirl_Update(Actor *thisx, GlobalContext *globalCtx) {
Vec3s sp30;
this->actionFunc(this, globalCtx);
- func_800E9250(globalCtx, &this->actor, &this->unk_2AE, &sp30, this->actor.focus.pos);
+ Actor_TrackPlayer(globalCtx, &this->actor, &this->unk_2AE, &sp30, this->actor.focus.pos);
func_80C100DC(this);
}
```