https://wiki.cloudmodding.com/oot/3D:Actors/history?feed=atom&
3D:Actors - Revision history
2024-03-28T17:32:59Z
Revision history for this page on the wiki
MediaWiki 1.30.0
https://wiki.cloudmodding.com/woot/index.php?title=3D:Actors&diff=6654&oldid=prev
Mzxrules at 16:42, 6 August 2021
2021-08-06T16:42:39Z
<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr style="vertical-align: top;" lang="en">
<td colspan="2" style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: white; color:black; text-align: center;">Revision as of 16:42, 6 August 2021</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l30" >Line 30:</td>
<td colspan="2" class="diff-lineno">Line 30:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div><syntaxhighlight lang="c"></div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div><syntaxhighlight lang="c"></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>typedef void (*ActorFunc)(struct Actor*, struct <del class="diffchange diffchange-inline">GlobalContext</del>*);</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>typedef void (*ActorFunc)(struct Actor*, struct <ins class="diffchange diffchange-inline">GamePlay</ins>*);</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>typedef struct {</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>typedef struct {</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l111" >Line 111:</td>
<td colspan="2" class="diff-lineno">Line 111:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>     /* 0x06 */ u8    unk_06;</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>     /* 0x06 */ u8    unk_06;</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>     /* 0x08 */ f32    unk_08; // Model y axis offset. Represents model space units. collision mesh related</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>     /* 0x08 */ f32    unk_08; // Model y axis offset. Represents model space units. collision mesh related</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>     /* 0x0C */ void (*shadowDrawFunc)(struct Actor*, struct LightMapper*, struct <del class="diffchange diffchange-inline">GlobalContext</del>*);</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>     /* 0x0C */ void (*shadowDrawFunc)(struct Actor*, struct LightMapper*, struct <ins class="diffchange diffchange-inline">GamePlay</ins>*);</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>     /* 0x10 */ f32    unk_10;</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>     /* 0x10 */ f32    unk_10;</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>     /* 0x14 */ u8    unk_14;</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>     /* 0x14 */ u8    unk_14;</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l153" >Line 153:</td>
<td colspan="2" class="diff-lineno">Line 153:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>     /* 0x0BC */ ActorShape shape;</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>     /* 0x0BC */ ActorShape shape;</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>     /* 0x0D4 */ Vec3f  unk_D4[2];</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>     /* 0x0D4 */ Vec3f  unk_D4[2];</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>     /* 0x0EC */ Vec3f  unk_EC; // Stores result of some vector transformation involving actor xyz vector, and a matrix at <del class="diffchange diffchange-inline">Global Context </del>+ 11D60</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>     /* 0x0EC */ Vec3f  unk_EC; // Stores result of some vector transformation involving actor xyz vector, and a matrix at <ins class="diffchange diffchange-inline">Game Play </ins>+ 11D60</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>     /* 0x0F8 */ f32    unk_F8; // Related to above</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>     /* 0x0F8 */ f32    unk_F8; // Related to above</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>     /* 0x0FC */ f32    uncullZoneForward;</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>     /* 0x0FC */ f32    uncullZoneForward;</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l234" >Line 234:</td>
<td colspan="2" class="diff-lineno">Line 234:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>The Actor_Spawn function is located at RAM address 0x3738D0 on the USA version.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>The Actor_Spawn function is located at RAM address 0x3738D0 on the USA version.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>At [[<del class="diffchange diffchange-inline">Global Context</del>]] + 0x2098 (0x087208D8 in the USA version's RAM) is a list of actor categories (see above), each entry being an integer and a pointer. The pointer points to the first allocated entry for an actor. The integer is the number of actors of that category, the first entry being type 0, and the last last being type 11 (chests). Actors after the first actor are pointed to through the next/previous pointers within each allocated actor. This list of actor categories is a member of the Actor Context, which begins at [[<del class="diffchange diffchange-inline">Global Context</del>]] + 0x208C (0x087208CC) in the USA version).</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>At [[<ins class="diffchange diffchange-inline">Game Play</ins>]] + 0x2098 (0x087208D8 in the USA version's RAM) is a list of actor categories (see above), each entry being an integer and a pointer. The pointer points to the first allocated entry for an actor. The integer is the number of actors of that category, the first entry being type 0, and the last last being type 11 (chests). Actors after the first actor are pointed to through the next/previous pointers within each allocated actor. This list of actor categories is a member of the Actor Context, which begins at [[<ins class="diffchange diffchange-inline">Game Play</ins>]] + 0x208C (0x087208CC) in the USA version).</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==Credits==</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==Credits==</div></td></tr>
</table>
Mzxrules
https://wiki.cloudmodding.com/woot/index.php?title=3D:Actors&diff=6522&oldid=prev
Gamestabled: Created page with "{{See also|Category:Actors}} Actors are the various interactive pieces in the Zelda 64 engine, from enemies to static scenery. __TOC__ {{clear}} There are three major compone..."
2020-11-28T07:29:12Z
<p>Created page with "{{See also|Category:Actors}} Actors are the various interactive pieces in the Zelda 64 engine, from enemies to static scenery. __TOC__ {{clear}} There are three major compone..."</p>
<p><b>New page</b></p><div>{{See also|Category:Actors}}<br />
<br />
Actors are the various interactive pieces in the Zelda 64 engine, from enemies to static scenery.<br />
__TOC__<br />
{{clear}}<br />
There are three major components to an actor:<br />
* The actor's [[overlay]], a file that contains the code for an actor. In OoT3D, overlays are statically linked with the main code segment.<br />
* Actor instances, or an in memory representation of our actor.<br />
* [[Object|Object files]], one or more files that contain pre-generated microcode, animations, and graphical assets for an actor. These can be shared by multiple actors.<br />
<br />
== Actor Overlay Table ==<br />
The actor overlay table is a carryover from OoT; it appears that it is now only used to locate an actor's initialization variables and the number of loaded instances of that actor. It is an array of the following. The actor overlay table begins at address 0x50CD84 on the USA version.<br />
<br />
<syntaxhighlight lang="c"><br />
typedef struct {<br />
/* 0x00 */ u32 vromStart; // unused?<br />
/* 0x04 */ u32 vromEnd; // unused?<br />
/* 0x08 */ void* vramStart; // unused?<br />
/* 0x0C */ void* vramEnd; // unused?<br />
/* 0x10 */ void* loadedRamAddr; // unused?<br />
/* 0x14 */ ActorInit* initInfo;<br />
/* 0x18 */ char* name; // unused?<br />
/* 0x1C */ u16 allocType; // unused?<br />
/* 0x1E */ s8 nbLoaded;<br />
} ActorOverlay; // size = 0x20<br />
</syntaxhighlight><br />
<br />
=== Initialization Variables ===<br />
The actor's initialization variables are pointed to via the 6th word in the Actor Overlay Table.<br />
<br />
<syntaxhighlight lang="c"><br />
typedef void (*ActorFunc)(struct Actor*, struct GlobalContext*);<br />
<br />
typedef struct {<br />
/* 0x00 */ s16 id;<br />
/* 0x02 */ u8 type; // Classifies actor and determines when actor will execute<br />
/* 0x03 */ u8 room; // Room instance was spawned in. If value set to FF in rom, instance does not despawn when swapping rooms<br />
/* 0x04 */ u32 flags;<br />
/* 0x08 */ s16 objectId;<br />
/* 0x0C */ u32 instanceSize;<br />
/* 0x10 */ ActorFunc init; // Constructor<br />
/* 0x14 */ ActorFunc destroy; // Destructor<br />
/* 0x18 */ ActorFunc update; // Main Update Function<br />
/* 0x1C */ ActorFunc draw; // Draw function<br />
} ActorInit; // size = 0x20<br />
</syntaxhighlight><br />
<br />
Some notes on the "flags" variable (Note, these are copied straight from OoT, and have not been fully confirmed in OoT3D):<br />
* & 0x0000 0001 - targetable<br />
* & 0x0000 0004 - if actor group is 05, and targetable flag is set, plays danger musics on approach<br />
* & 0x0000 0010 - update function always run regardless if the camera is not focusing at the actor<br />
* & 0x0000 0020 - draw function always run regardless if the camera is not focusing at the actor<br />
* & 0x0000 0040 - programmatically computed (?)<br />
* & 0x0000 0400 - hookshotable (collider + 0x1D has to be set to 05)<br />
* & 0x0040 0000 = Affects actor lighting. 0 passes current coords to 80066298 func, else pass null for coords<br />
* & 0x0080 0000 = For actors that can be picked up, disables the drop command<br />
* & 0x0400 0000 = Actor is able to press floor switches<br />
* & 0x0000 1000 = ?<br />
* If it's set to 0x10, the actor seems to not be targetable when initialized.<br />
* If it's set to 0x9, it is targetable.<br />
<br />
==Actor Instances==<br />
=== Structure ===<br />
For Ocarina of Time 3D, the allocated actor structure is as follows.<br />
<syntaxhighlight lang="c">typedef struct {<br />
f32 x, y, z;<br />
} Vec3f;<br />
<br />
typedef struct {<br />
s16 x, y, z;<br />
} Vec3s;<br />
<br />
typedef struct {<br />
Vec3f pos;<br />
Vec3s rot;<br />
} PosRot; // size = 0x14<br />
<br />
typedef struct {<br />
f32 data[3][4];<br />
} MTX34;<br />
<br />
typedef struct {<br />
struct {<br />
char damage : 4;<br />
char effect : 4;<br />
} attack[32];<br />
} ActorDamageChart;<br />
<br />
typedef struct {<br />
/* 0x00 */ char unk_00[0x8];<br />
/* 0x08 */ Vec3s norm; // Normal vector<br />
/* 0x0E */ s16 dist; // Plane distance from origin<br />
} CollisionPoly; // size = 0x10<br />
<br />
typedef struct {<br />
/* 0x00 */ ActorDamageChart* damageChart; // For actors which contain a damage chart (example: Stalfos)...<br />
/* 0x04 */ Vec3f displacement; // Amount to correct velocity (0x5C) by when colliding into a body<br />
/* 0x10 */ s16 unk_10;<br />
/* 0x12 */ s16 unk_12;<br />
/* 0x14 */ u16 unk_14;<br />
/* 0x16 */ u8 mass; // Used to compute displacement, 50 is common value, 0xFF for infinite mass/unmoveable<br />
/* 0x17 */ u8 health;<br />
/* 0x18 */ u8 damage; // Amount to decrement health by<br />
/* 0x19 */ u8 damageEffect; // Stores what effect should occur when hit by a weapon<br />
/* 0x1A */ u8 atHitEffect;<br />
/* 0x1B */ u8 acHitEffect;<br />
} CollisionCheckInfo; // size = 0x1C<br />
<br />
typedef struct {<br />
/* 0x00 */ Vec3s rot; // Current actor shape rotation<br />
/* 0x06 */ u8 unk_06;<br />
/* 0x08 */ f32 unk_08; // Model y axis offset. Represents model space units. collision mesh related<br />
/* 0x0C */ void (*shadowDrawFunc)(struct Actor*, struct LightMapper*, struct GlobalContext*);<br />
/* 0x10 */ f32 unk_10;<br />
/* 0x14 */ u8 unk_14;<br />
/* 0x15 */ u8 unk_15;<br />
} ActorShape; // size = 0x18<br />
<br />
typedef struct Actor {<br />
/* 0x000 */ s16 id; // Actor Id<br />
/* 0x002 */ u8 type; // Actor Type. Refer to the corresponding enum for values<br />
/* 0x003 */ s8 room; // Room number the actor is part of. FF denotes that the actor won't despawn on a room change<br />
/* 0x004 */ u32 flags; // Flags used for various purposes<br />
/* 0x008 */ PosRot initPosRot; // Contains Initial Rotation when Object is Spawned<br />
/* 0x01C */ s16 params; // original name: "args_data"; Configurable variable set by an actor's spawn data<br />
/* 0x01E */ s8 objBankIndex;<br />
/* 0x01F */ s8 unk_1F;<br />
/* 0x020 */ u8 unk_20;<br />
/* 0x021 */ char unk_21[0x3];<br />
/* 0x024 */ u32 sfx;<br />
/* 0x028 */ PosRot posRot; // Current coordinates<br />
/* 0x03C */ PosRot posRot2; // Related to camera<br />
/* 0x050 */ f32 unk_4C;<br />
/* 0x054 */ Vec3f scale; // Sets x,y,z scaling factor. Typically, a factor of 0.01 is used for each axis<br />
/* 0x060 */ Vec3f velocity;<br />
/* 0x06C */ f32 speedXZ; // Always positive, stores how fast the actor is traveling along the XZ plane<br />
/* 0x070 */ f32 gravity; // Acceleration due to gravity; value is added to Y velocity every frame<br />
/* 0x074 */ f32 minVelocityY; // Sets the lower bounds cap on velocity along the Y axis<br />
/* 0x078 */ CollisionPoly* wallPoly; // Wall polygon an actor is touching<br />
/* 0x07C */ CollisionPoly* floorPoly; // Floor polygon an actor is over/touching<br />
/* 0x080 */ u8 wallPolySource; // Complex Poly Surface Source. 0x32 = Scene<br />
/* 0x081 */ u8 floorPolySource; // Complex Poly Surface Source. 0x32 = Scene. related to 0x80/88<br />
/* 0x082 */ s16 wallPolyRot; //TODO: check<br />
/* 0x084 */ f32 groundY;<br />
/* 0x088 */ f32 waterY; //TODO: check<br />
/* 0x08C */ f32 xyzDistFromLinkSq; //TODO: check<br />
/* 0x090 */ u16 bgCheckFlags;<br />
/* 0x092 */ s16 yawTowardsLink;<br />
/* 0x094 */ f32 xzDistanceFromLink;<br />
/* 0x098 */ f32 yDistanceFromLink;<br />
/* 0x09C */ f32 unk_9C;<br />
/* 0x0A0 */ CollisionCheckInfo colChkInfo;<br />
/* 0x0BC */ ActorShape shape;<br />
/* 0x0D4 */ Vec3f unk_D4[2];<br />
/* 0x0EC */ Vec3f unk_EC; // Stores result of some vector transformation involving actor xyz vector, and a matrix at Global Context + 11D60<br />
/* 0x0F8 */ f32 unk_F8; // Related to above<br />
/* 0x0FC */ f32 uncullZoneForward;<br />
/* 0x100 */ f32 uncullZoneScale;<br />
/* 0x104 */ f32 uncullZoneDownward;<br />
/* 0x108 */ Vec3f pos4; // Final Coordinates last frame<br />
/* 0x114 */ u8 unk_114; // Z-Target related<br />
/* 0x115 */ u8 unk_115; // Z-Target related<br />
/* 0x116 */ u16 textId; // Text id to pass to link/display when interacting with an actor (navi text, probably others)<br />
/* 0x118 */ u16 freezeTimer;<br />
/* 0x120 */ char unk_118[0x7];<br />
/* 0x121 */ u8 activelyDrawn; // Indicates whether the actor is currently being drawn (but not through lens). 01 for yes, 00 for no<br />
/* 0x122 */ u8 unk_122; // Set within a routine that deals with collision<br />
/* 0x123 */ u8 naviEnemyId; // Sets what 0600 dialog to display when talking to navi. Default 0xFF<br />
<br />
/* 0x124 */ struct Actor* attachedA; // Interfacing Actor?<br />
// e.g. Link holding chu, Chu instance stores ptr to Link instance here;<br />
// Anju having Link's ptr when giving an item<br />
// Volvagia Hole stores Volvagia Flying here<br />
<br />
/* 0x128 */ struct Actor* attachedB; // Attached to Actor<br />
// e.g. Link holding chu, Link instance stores ptr to Bombchu instance here<br />
<br />
/* 0x12C */ struct Actor* prev; // Previous Actor of this type<br />
/* 0x130 */ struct Actor* next; // Next Actor of this type<br />
<br />
/* 0x134 */ ActorFunc init; // Initialization Routine. Mandatory<br />
/* 0x138 */ ActorFunc destroy; // Destruction Routine<br />
/* 0x13C */ ActorFunc update; // Main Update Routine, called every frame the actor is to be updated<br />
/* 0x140 */ ActorFunc draw; // Draw Routine<br />
<br />
/* 0x144 */ ActorOverlay* overlayEntry; // Pointer to the overlay table entry for this actor<br />
/* 0x148 */ MTX34 unk_148; // Model-to-world coordinates matrix, updated every frame<br />
/* 0x178 */ void* unk_178; // Unknown pointer type<br />
/* 0x17C */ void* unk_17C[6]; // Unknown pointer type<br />
/* 0x194 */ u32 unk_194;<br />
/* 0x198 */ u8 unk_198;<br />
/* 0x199 */ char unk_199[0x3];<br />
/* 0x19C */ u16 unk_19C;<br />
/* 0x19E */ char unk_19E[0x2];<br />
/* 0x1A0 */ f32 unk_1A0;<br />
/* From here on, the structure and size varies for each actor */<br />
} Actor; // size = 0x1A4<br />
<br />
</syntaxhighlight><br />
<br />
=== Categories ===<br />
Actor instances are added into a doubly-linked list based on a category id. Ids can be set in the overlay file, but can also be pro grammatically modified (ex. Skulltula/Gold Skulltula actor). There are 12 categories total.<br />
{|class="wikitable"<br />
! Id<br />
! Description<br />
! Usage<br />
|-<br />
|0 || Switches || Step-on switches, Anubis enemy, Death Mountain Crater Smoke Cone<br />
|-<br />
|1 || Backgrounds || Typically larger, more complex set pieces with background collision<br />
|-<br />
|2 || Player ||<br />
|-<br />
|3 || Bomb || Bombs, Bombchus<br />
|-<br />
|4 || NPC ||<br />
|-<br />
|5 || Enemy || Used for triggering room clear state. <br />
|-<br />
|6 || Prop ||<br />
|-<br />
|7 || Item/Action ||<br />
|-<br />
|8 || Misc ||<br />
|-<br />
|9 || Boss ||<br />
|-<br />
|10 || Door ||<br />
|-<br />
|11 || Chests ||<br />
|}<br />
<br />
==Loading Actors==<br />
The Actor_Spawn function is located at RAM address 0x3738D0 on the USA version.<br />
<br />
At [[Global Context]] + 0x2098 (0x087208D8 in the USA version's RAM) is a list of actor categories (see above), each entry being an integer and a pointer. The pointer points to the first allocated entry for an actor. The integer is the number of actors of that category, the first entry being type 0, and the last last being type 11 (chests). Actors after the first actor are pointed to through the next/previous pointers within each allocated actor. This list of actor categories is a member of the Actor Context, which begins at [[Global Context]] + 0x208C (0x087208CC) in the USA version).<br />
<br />
==Credits==<br />
Cendamos - Actor table information, misc stuff that got the ball rolling<br><br />
Euler - Actor file structure<br><br />
JayTheHam - His early work with Cendamos on actor information<br><br />
ZZT32 - Explained some actor table stuff to me<br><br />
spinout - Writing this article<br><br />
gamestabled - Modifying [https://wiki.cloudmodding.com/oot/Actors this page] with the OoT3D information<br />
[[Category: Actors| ]]<br />
[[Category: File Formats]]</div>
Gamestabled