# Gate 205 (run link60, lane A1): ov085's LAST TWO SCREENED CLASSES.
#
#   WALL_SIGN (183) 13daObjKanban_c  x9    L2 x6, L4 x1, L5 x1, L50 x1
#   TOAD      (185) 11daKinopio_c    x10   L2 x4, L4 x2, L5 x3, L50 x1
#
# Nineteen placed instances on four levels the port already boots. Both counts
# are the port's OWN runtime census on this lane's baseline, taken before any
# of this landed: with neither class registered the pre-spawn gate declined
# exactly those numbers, "- 183 x6 / - 185 x4" on level 2 and the three
# smaller sets elsewhere. Not a spawn-table read, not a grep.
#
# ov085 has been mounted per symbol since gate 18 (port/ov085_syms.txt) for the
# RABBIT, the RABBIT_KEY and the LAKITU_BRO, and all six of its sinits are
# already called from hal/actor_overlays.cpp -- including the two these two
# classes load through. So there is no mount and no bring-up in this slice,
# only code. The fills are hal/actor_classes_ov085.cpp; that file's header
# carries the width derivations, the two-names-one-table aliases, Toad's
# hosted slot 16 and the WallSign-Render adjudication.
#
# ---- WHAT IS NOT HERE, and why -------------------------------------------
#
# THREE HOST BODIES, in two files.
#
#   slot 6 on BOTH classes is NOT DECOMPILED. src/ has no
#   _ZN8WallSign8BehaviorEv and no _ZN4Toad8BehaviorEv, and neither address
#   starts a TU in config/arm9/overlays/ov085/delinks.txt. HOST
#   REIMPLEMENTATIONS written from the ROM live in
#   port/unmatched/Ov085_Behaviors.cpp (ov085 0x0212eea4, 0x30c bytes, and
#   0x02129878, 0x204 bytes). Both are queued as decomp crack targets; when
#   the matched bodies land they come out of that file and two lines are added
#   here, and nothing else in the seat changes.
#
#   _ZN4Toad8SetStateEi and _ZN4Toad8RunStateEv, TOAD's seat-and-enter and its
#   per-frame Main dispatch, are the gate-16 case: both matched TUs form an
#   MSVC pointer-to-member over an INCOMPLETE class, which is the four-word
#   general representation, and 02129570 does not even compile because it sizes
#   its record as `char tail[0x14 - 8 - sizeof(PMF)]`, which at sixteen bytes
#   is -4 in a size_t expression and wraps. `cl /c src/_ZN4Toad8RunStateEv.cpp`
#   says so: "error C2148: total size of array must not exceed 0x7fffffff
#   bytes". Host copies with the dispatch hand-rolled:
#   port/unmatched/Ov085_Toad_StateSeat.cpp, and the four {function, 0} pairs
#   are repointed at the host bodies by port_toad_states_seat
#   (hal/actor_overlays.cpp) before __sinit_ov085_0212f2a8 copies them.
#
# ONE MATCHED TU HELD OUT, spelled in the fill instead.
#
#   src/_ZN4ToadD1Ev.cpp is the shadow-class MSVC destructor shape, the
#   SlideDecorationSilverStar case: MSVC emits ??1Toad@@UAE@XZ calling four
#   decorated member destructors that exist nowhere in this link, and no
#   _ZN4ToadD1Ev at all. Slot 16 is spelled inline in
#   hal/actor_classes_ov085.cpp from the ROM D1's own five relocs.
#
# ---- WHAT IS HERE THAT LOOKS LIKE IT SHOULD NOT BE ------------------------
#
#   src/_ZN8WallSign6RenderEv.cpp IS in this slice. It is the local
#   six-virtual-shadow slot-5 shape lane w19 swept, and the screening note
#   flagged it -- but w19's bug is the ModelAnim table, and WallSign's member
#   at +0xd4 is a plain Model (Platform's constructor builds it, both
#   destructors run _ZN5ModelD1Ev on it, InitResources feeds it
#   Model::LoadFile). hal/cxxname_bridge.cpp dual-fills _ZTV5Model[4] AND [5]
#   with mv_render for exactly this numbering skew, so the ROM's slot 5 lands
#   on Model::Render. Same reading as SlideDecorationSilverStar::Render, linked
#   since wave 10. Measured with SM64DS_ACTOR_PROBE, not asserted.

# ---- WALL_SIGN (actor 183, ov085), x9 -------------------------------------
# The readable sign. InitResources loads one model and one cylinder; Behavior
# (host) walks a Player onto the reading spot 0x5a000 in front and opens the
# message; CleanupResources releases the one SharedFilePtr. Both destructors
# are plain .c with the ROM's C names -- each stores its own table by the RTTI
# name and then _ZTV10dBgActor_c, which hal/actor_classes.cpp has hosted since
# gate 31, so both link as they stand.
#
# _ZN8WallSignD0Ev's bare G0 is CORRECT and is deliberately left alone. The
# ROM (0x0212ee30) loads the literal at 0x0212ee54 = 0x020a0eac and then
# `ldr r1, [r1]`, i.e. Memory::Deallocate(this, *(Heap **)data_020a0eac) -- the
# value AT that address, which is what `extern void *G0; ... Deallocate(t, G0)`
# compiles to. hal/cxx_aliases.cpp's cdecl _G0 = _data_020a0eac binding is the
# right one for this TU.
src/d_a_obj_kanban.c
src/_ZN8WallSign13InitResourcesEv.cpp
src/_ZN8WallSign16CleanupResourcesEv.cpp
src/_ZN8WallSign6RenderEv.cpp
src/_ZN8WallSignD1Ev.cpp
# RETIRED at SLICE1: body now in src/_ZN8WallSignD1Ev.cpp. MSVC folds the ROM destructor variants into one symbol, so only one of a class two per-function destructor TUs can be compiled.
#src/_ZN8WallSignD0Ev.cpp
# _ZN8WallSign8BehaviorEv is NOT decompiled: HOST REIMPLEMENTATION at
# port/unmatched/Ov085_Behaviors.cpp.

# ---- TOAD (actor 185, ov085), x10 -----------------------------------------
# InitResources loads the model and two animations, seats state 0, and on the
# cap-carrying variant spawns actor 0x10d (269, CAP). 269 IS registered --
# hal/actor_classes.inc gate 51, g_profile_OBJ_MARIO_CAP at ov002 0x021095cc, the
# always-resident engine overlay -- so this is not the MontyMoleRock shape.
# Render is a plain non-virtual Model::Render at +0x108 (the ROM's own `bl` at
# 0x02129864), safe as it stands.
src/d_a_kinopio.c
src/_ZN4Toad13InitResourcesEv.cpp
src/_ZN4Toad16CleanupResourcesEv.cpp
src/_ZN4Toad6RenderEv.cpp
src/_ZN4ToadD0Ev.cpp
# _ZN4ToadD1Ev is NOT here: shadow-class MSVC destructor, spelled inline in
# hal/actor_classes_ov085.cpp. See this file's header.
# Toad::Behavior (ov085 0x02129878, 0x204 bytes) IS matched now, which this
# file's header predates: run linkfull lane SEATS3 retired the host
# reimplementation in port/unmatched/Ov085_Behaviors.cpp for the ROM's own
# body. Slot 6 (hal/actor_classes_ov085.cpp) calls the member, and
# port/faces_sync.txt's row for the flat name is REVERSE, so nothing else
# defines ?Behavior@Toad@@UAEHXZ.
src/_ZN4Toad8BehaviorEv.cpp

# ---- TOAD: the two states and the ring they close over --------------------
# __sinit_ov085_0212f2a8 (already in slice_gate18.txt) copies four eight-byte
# {function, 0} statics into the two records of data_ov085_0212fe88 --
# entry 0 "WAIT", entry 1 "TALK". All four bodies are matched:
#     0x0212fe40 -> _ZN4Toad12St_Idle_InitEv   WAIT enter (SetAnim, the idle)
#     0x0212fe48 -> _ZN4Toad12St_Idle_MainEv   WAIT main  (watch for a talker)
#     0x0212fe30 -> _ZN4Toad12St_Talk_InitEv   TALK enter (SetAnim, the talk)
#     0x0212fe38 -> _ZN4Toad12St_Talk_MainEv   TALK main  (the message, the star
#                                          spawn, the cap hand-back, EndTalk)
# read out of extracted/overlays/overlay_0085.bin at base 0x02129020 with
# config/arm9/overlays/ov085/relocs.txt agreeing on every one.
src/_ZN4Toad12St_Idle_InitEv.cpp
src/_ZN4Toad12St_Idle_MainEv.cpp
src/_ZN4Toad12St_Talk_InitEv.cpp
src/_ZN4Toad12St_Talk_MainEv.cpp
# _ZN4Toad12GetMessageIDEv is the message-id picker the TALK main opens with: on the
# rec room (level 0x32) it reads the minigame state, elsewhere it maps the
# actor's own parameter through ObjectMessageIDToActualMessageID.
src/_ZN4Toad12GetMessageIDEv.cpp
# and the per-frame matrix/shadow pass Behavior calls after the head tracking:
# builds the body matrix, applies the head angles to the model's own, carries
# the held cap along on its matrix, and drops the shadow.
src/_ZN4Toad15UpdateModelPoseEv.cpp
# _ZN4Toad8SetStateEi and _ZN4Toad8RunStateEv are NOT here: MSVC PMF over an
# incomplete class, the gate-16 case. Host copies at
# port/unmatched/Ov085_Toad_StateSeat.cpp.

# ---- the engine ring the two classes close over ---------------------------
# Two TUs, and both were in no slice at all before this one. Everything else
# either class reaches -- Vec3_HorzDist/HorzAngle/VertAngle/ApproachHorz,
# AngleDiff, ApproachLinear, Player::GetTalkState/StartTalk/ShowMessage/
# ShowMessage2, Actor::Spawn/FindWithID/ClosestPlayer/SpawnSoundObj/
# DropShadowRadHeight, Message::PrepareTalk/EndTalk, ModelAnim::SetAnim/
# UpdateVerts, ModelBase::ApplyOpacity, Animation::Advance, CylinderClsn::
# Clear/Update, RaycastGround's four, the six Matrix4x3 helpers, NumStars,
# IsStarCollectedInCurLevel, Sound::PlaySub, ActorBase::MarkForDestruction --
# is already in walk_window.map on the baseline.
#
# func_02013a44 is the save's can-the-player-have-a-cap test, which gates both
# the InitResources cap spawn and the TALK state's hand-back.
src/func_02013a44.c
# ApproachLinear2's INT overload. src/_Z15ApproachLinear2Rsss.cpp (the short
# one) has a C-name face in hal/method_faces.cpp; the int one has none and had
# no reader, so it was in no slice. Toad::Behavior's fade approach is its only
# caller here, and it reaches it by the C++ name rather than through a new
# face -- the matched TU defines `int ApproachLinear2(int &, int, int)` with no
# extern "C", so declaring that signature is what links the body.
src/_Z15ApproachLinear2Riii.cpp
