Cite as
zeldaret/oot
Original
https://github.com/zeldaret/oot
Pinned
zeldaret/oot @ 14759abf9abb4295de142cdc1452998630ea70fb
Accessed
2026-10-21
Licence
none stated (no license file at the pinned commit); the game is Nintendo's
Credit
The Zelda Reverse Engineering Team's (zeldaret) C decompilation of Ocarina of Time, which builds the N64 NTSC 1.0, 1.1, and 1.2 and PAL 1.0 and 1.1 ROMs and the GameCube and iQue releases. Names and comments quoted in oot claims are theirs.
Notes
The README lists each version with the MD5 of its input ROM and says the repo holds no assets; the default build is gc-eu-mq-dbg (GameCube Europe Master Quest debug). One version builds per OOT_VERSION (include/versions.h); FRAMERATE_CONST(60 Hz value, 50 Hz value) picks the second only in the PAL N64 builds. oot claims read the code NTSC 1.0 compiles: each cited range sits outside every version #if in its file unless the claim says otherwise. Link's code is src/overlays/actors/ovl_player_actor/z_player.c; the atlas fetches only the paths above.

Cited on

Claims (10)

In the N64 NTSC 1.0 code, pressing Z locks Link onto the actor Navi hovers over, unless that actor has lock-on disabled; with nothing to lock onto, Z starts "parallel" mode instead. Under the Hold setting the lock lasts while Z is held; under Switch, a flag keeps it after Z is let go.src/overlays/actors/ovl_player_actor/z_player.c L3932–3950src/overlays/actors/ovl_player_actor/z_player.c L3962–3966src/overlays/actors/ovl_player_actor/z_player.c L3976–3979src/overlays/actors/ovl_player_actor/z_player.c L3898–3899include/save.h L9–12Code
In the N64 NTSC 1.0 code, unless an earlier branch applies (hookshot flight, pushing or pulling, and a few others), while Link has a focus actor his update makes that actor the main camera's view target and picks a mode for it: talk mode if Link's actor has the talk flag set, else, with the friendly-focus flag set, boomerang-follow mode if a boomerang is out or the friendly Z-target mode, and otherwise the unfriendly Z-target mode. In parallel mode it picks Z-aim mode when either of two checks the decomp leaves unnamed (func_8002DD78, func_808334B4) passes, else Z-wall-climb mode with an unnamed state flag (stateFlags1 bit 21) set, else the Z-parallel mode.src/overlays/actors/ovl_player_actor/z_player.c L11379–11391src/overlays/actors/ovl_player_actor/z_player.c L11403–11409src/overlays/actors/ovl_player_actor/z_player.c L11431Code
In the N64 NTSC 1.0 code, while Link has a lock-on target and the reticle counter (reticleSpinCounter, which the decompilers' comment says counts up while a reticle is active) isn't 0, Link's model turns each update toward the locked-on actor's focus point, and in parallel mode toward the parallel angle; the direction he moves in is a separate yaw, which the stick sets relative to the camera. Two state flags the decomp leaves unnamed skip the turn, and the Z-target run and the roll set one of them.src/overlays/actors/ovl_player_actor/z_player.c L3765–3785include/actor.h L430src/overlays/actors/ovl_player_actor/z_player.c L4146–4148src/overlays/actors/ovl_player_actor/z_player.c L8832src/overlays/actors/ovl_player_actor/z_player.c L9695Code
In the N64 NTSC 1.0 code, each update sorts the control stick into one of four quarters relative to the way Link's model faces: forward, left, backward, or right, each 90° wide and centered on its direction, after turning the stick angle by the camera's. Below a magnitude of 55 the stick counts as no direction.src/overlays/actors/ovl_player_actor/z_player.c L2211–2223include/player.h L639–643Code
In the N64 NTSC 1.0 code, the action handler the decomp calls Player_ActionHandler_10 acts on a press of A, except in a room of the indoors type, on floor type 7, or on a floor with floor effect 1 (both unnamed): with the stick backward, left, or right it starts a hop that way; with the stick forward or neutral, only while Z-targeting, it starts a jump slash if Link holds a melee weapon and can use items, and a roll otherwise.src/overlays/actors/ovl_player_actor/z_player.c L6385–6417Code
In the N64 NTSC 1.0 code, the action that holds Link standing while he Z-targets (Player_Action_808407CC in the decomp) offers the hop handler to A, and hands control to the idle action once Z-targeting ends; the idle action's own handler list leaves the hop handler out.src/overlays/actors/ovl_player_actor/z_player.c L4174–4178src/overlays/actors/ovl_player_actor/z_player.c L4201–4205src/overlays/actors/ovl_player_actor/z_player.c L8158–8167src/overlays/actors/ovl_player_actor/z_player.c L4259Code
In the N64 NTSC 1.0 code, the backward hop (a backflip, by its animation) launches Link at a vertical velocity of 5.8 and a horizontal speed of 6.0 aimed straight behind his facing, and a sideways hop at 3.5 up and 8.5 aimed 90° to the left or right. The vertical value is multiplied by a water factor, sWaterSpeedFactor, which this pass didn't read.src/overlays/actors/ovl_player_actor/z_player.c L6368–6378src/overlays/actors/ovl_player_actor/z_player.c L4982–4989src/overlays/actors/ovl_player_actor/z_player.c L1120–1128Code
In the N64 NTSC 1.0 code, the jump slash started from the Z-targeting A press (stick forward or neutral, holding a melee weapon) sends Link forward along his facing at a speed of 5.0 with a vertical velocity of 5.0.src/overlays/actors/ovl_player_actor/z_player.c L6403src/overlays/actors/ovl_player_actor/z_player.c L6313–6321Code
In the N64 NTSC 1.0 code, Link rolls when A is pressed with the stick forward, provided there is no hostile lock-on, his upper body isn't busy, an unnamed state flag (stateFlags1 bit 23) is clear, and the floor isn't floor type 7; with the stick elsewhere the same press puts away a held item or toggles Navi. The roll animation plays at 1.25 times speed (1.5 in the PAL N64 builds).src/overlays/actors/ovl_player_actor/z_player.c L6489–6498src/overlays/actors/ovl_player_actor/z_player.c L6350–6360include/versions.h L44–50Code
In the N64 NTSC 1.0 code, a roll makes Link invulnerable for 10 updates from frame 8 of its animation (8 updates in the PAL N64 builds): damage is ignored but, per the decompilers' comment, not the responses to it such as knockback.src/overlays/actors/ovl_player_actor/z_player.c L9700–9702src/overlays/actors/ovl_player_actor/z_player.c L4584–4590src/overlays/actors/ovl_player_actor/z_player.c L11709–11710include/player.h L979Code