# Gate 33: the MECHANISMS, TERRAIN OBJECTS and PICKUPS of Bob-omb Battlefield.
#
# ---- which level, and how that was settled ---------------------------------
#
# Bob-omb Battlefield is LEVEL 6 and its overlay is ov014. Three independent
# reads agree:
#
#   1. src/_Z17LoadLevelOverlaysi.cpp loads data_020758c8[level]. That table
#      (arm9 0x020758c8, 52 words up to data_02075998) is the identity plus
#      eight: level 0 -> ov008, level 1 -> ov009 ... level 6 -> ov014. Castle
#      grounds is level 1 and ov009, which is what gate 14 already mounts.
#   2. The arm9 LVL_Overlay pointer table at 0x02092208 has entry 6 at
#      0x02092220, and config/arm9/relocs.txt says that word targets
#      0x02113434 in one of overlays(9,14,16,18,19,21,22,24,25,26,27,29,32,36,
#      56). ov014 is in the set.
#   3. ov014's own symbols name ChainChomp, ChainChompFence and ShutterBob --
#      the chain chomp, its post, and the level-prefixed shutter. No other
#      level has a chain chomp.
#
# The LVL_Overlay at ov014 0x02113434 gives bmd 1765, kcl 1763, one sub-table
# with sixteen kinds, and 89 Standard + 88 Simple objects in group 0.
#
# ---- the roster, resolved by ADDRESS ---------------------------------------
#
# Every actor id below was read out of ov014's own object tables and then
# resolved through the EU ACTOR_SPAWN_TABLE at arm9 0x02090864: entry [id] is
# a SpawnInfo*, and the overlay that address lands in plus that overlay's
# symbols.txt names the class. The vtable each factory installs was then
# checked against the ROM's own Itanium RTTI (the typeinfo pointer four bytes
# before the table, whose +4 is the name string), because the config's class
# names are shifted by one through a run of ov002 -- the gate-20 finding.
#
#     id  SpawnInfo             installs                RTTI
#     288 g_profile_COIN        _ZTV4Coin               8daCoin_c
#     289 g_profile_RED_COIN     _ZTV4Coin               (same table)
#     290 g_profile_BLUE_COIN    _ZTV4Coin               (same table)
#
# One class, three ids, one vtable: the three factories are byte-identical
# apart from nothing at all, and Coin::InitResources / Behavior / Render read
# mActorID back to tell which of the three they are.
#
# 290 is NOT in Bob-omb Battlefield's tables -- blue coins come from a
# BlueCoinSwitch, which is its own class -- and is registered anyway because
# it is the same table and the same factory shape. Registering it costs one
# row and closes the third of the three ids the task names.

# ---- the coin ---------------------------------------------------------------
src/d_a_coin_coin.c
src/d_a_coin_red_coin.c
src/d_a_coin_blue_coin.c
src/_ZN4Coin13InitResourcesEv.cpp
src/_ZN4Coin16CleanupResourcesEv.cpp
src/_ZN4Coin6RenderEv.cpp
# _ZN4Coin8BehaviorEv is NOT here: its last act is
#
#     (this->*data_ov002_0210dc70[mBehaviorType])();
#
# an mwcc pointer-to-member out of a nine-entry table, which MSVC has no
# representation for -- the gate-16 case, for the sixth time. Host copy plus
# the state seat in port/unmatched/Coin_Behavior.cpp.
#
# _ZN4CoinD1Ev is NOT here either, and for the OTHER standing reason: it is a
# real C++ destructor over its own shadow hierarchy, so MSVC would emit it
# under ??1Coin@@UAE@XZ and synthesise five member destructor calls of its
# own. Slot 16 is the ROM's D0 body minus the final Deallocate, written by
# hand in hal/actor_classes_bob_world.cpp -- the Bird's treatment, and this
# class NEEDS it: a collected coin is destroyed every time one is touched.
# RETIRED at SLICE1: body now in src/_ZN4CoinD1Ev.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/_ZN4CoinD0Ev.cpp

# ---- the nine behaviour states -------------------------------------------
# __sinit_ov002_02100c50 (already on the gate-10 list) copies nine
# {function, delta} statics from ov002 0x02108730..0x02108770 into
# data_ov002_0210dc70. Seven distinct functions; two of the nine slots are
# duplicates (2 and 6 are both 0x020b1cc0, 7 and 1 are both 0x020b20b4).
src/func_ov002_020b2150.cpp
src/func_ov002_020b1a60.c
src/func_ov002_020b2070.cpp
src/func_ov002_020b1cc0.c
src/func_ov002_020b1ad4.c
src/func_ov002_020b1bfc.cpp
src/func_ov002_020b20b4.cpp

# ---- the five helpers Behavior closes over ---------------------------------
# func_ov002_020b10a0 and func_ov002_020b19dc are back (run linkfull, lane
# RS4PORT). Their host copies (unmatched/StarMarker_SpawnDispatch.cpp,
# unmatched/Coin_CollectDispatch.cpp) passed the StarMarker the ROM leaves in r0
# and the player it leaves in r1; main #3106 spells both arguments, so these are
# main's blobs, byte-identical under mwccarm 2004/b56.
src/func_ov002_020b10a0.c
src/func_ov002_020b12ec.c
src/func_ov002_020b14d8.c
src/func_ov002_020b10e4.c
src/func_ov002_020b19dc.c

# ---- slots 18 and 19 -------------------------------------------------------
# OnYoshiTryEat is eight bytes ("no") and OnTurnIntoEgg is the collect path.
src/_ZN4Coin13OnYoshiTryEatEv.cpp
src/_ZN4Coin13OnTurnIntoEggER6Player.cpp

# --- linkloop round 0 -------------------------------------------------------
# CommonModel: the coin carries two of them, and the class had never been
# compiled for the host before -- the other hosted classes use Model or
# ModelAnim. Six files, all matched.
src/_ZN11CommonModelC1Ev.cpp
src/_ZN11CommonModelD1Ev.cpp
# QUARANTINED at the main->port sync (lane SYNC5, the wave-7 fold merge): MSVC
# refuses main's shape for this TU (C2600, the model family's destructor TUs:
# main defines X::~X() where the host header spells the destructor as two
# plain virtuals; port/unmatched/ModelFamily_Dtors_HostCopy.c carries the
# merge base's own bodies instead). It is a decomp-side item, not a port one:
# see runs/link100/out/SYNC5/decomp_side.md. The row returns when main lands
# the fix.
#src/_ZN11CommonModelD0Ev.cpp
src/_ZN11CommonModel6RenderEPK7Vector3.cpp
src/_ZN11CommonModel9DoSetFileEPcii.cpp
src/_ZN11CommonModel12SetPolygonIDEj.cpp
src/_ZN11CommonModel13Func_020160ACEj.cpp
# the red coin's own star: what the eighth one collected calls
src/_ZN10StarMarker27SpawnRedCoinStarIfNecessaryEv.cpp
# _ZN8dActor_c18HorzAngleToFPlayerEv: HOST COPY at unmatched/Actor_ClosestPlayerWrappers.cpp
# (wired in CMakeLists). The matched C calls Actor::ClosestPlayer() with no argument
# and relies on `this` being live in ARM r0; cdecl drops it, so ClosestPlayer measures
# from garbage+0x5c. That is the RABBIT fault in crash 9e164e92 (read at 0x0000005c).
# the seven helpers the states and the collect path close over
src/func_ov002_020b1328.c
src/func_ov002_020b1674.cpp
src/func_ov002_020b16c4.c
src/func_ov002_020b1884.c
src/func_ov002_020b1384.cpp
src/func_ov002_020b13e0.cpp
src/func_ov002_020b1008.c

# ---- SLOTS 13 AND 14 ARE NOT HOSTED, and this is the size of the job ------
# ActorBase::Virtual34 and Virtual38 (arm9 0x0204357c / 0x0204349c) are the
# actor's own solid-heap creation, and the vtable law wants them wired rather
# than trapped: a heap-pressure path calls Virtual34 on every actor on the
# behaviour list, so a class that traps there dies on a frame that has nothing
# to do with it. Gate 16 trapped them and said the Heap:: face was the reason.
#
# It was measured this time rather than assumed, by putting both files in and
# following the link to the bottom. Both are matched, and so is everything
# under them, but "everything under them" is the SOLID HEAP ALLOCATOR, which
# the port has never hosted:
#
#   Heap::InitializeSolidHeapAsDefault -> SetupSolidHeapAsDefault
#     -> Heap::CreateSolidHeap -> SolidHeap::SolidHeap + Heap::
#        CreateSolidHeapAllocator -> SolidHeapAllocator::SolidHeapAllocator
#   plus Heap::RestoreFromTemporary -> Heap::SetDefault
#   plus Heap::_Destroy -> Heap::Destroy
#   plus Heap::ResizeToFit -> Heap::Rescue
#
# and SolidHeap's constructor installs _ZTV9SolidHeap, a SIXTEEN-slot table
# (arm9 0x02099d48, the same shape as _ZTV13ExpandingHeap in
# hal/heap_vtable.cpp) whose every slot is a named SolidHeap V-method. So the
# real bill is 17 SolidHeap files + 12 SolidHeapAllocator files + a synthetic
# 16-slot vtable, which is a subsystem rather than two slots, and it belongs
# in a gate of its own next to gate 3a's ExpandingHeap.
#
# The two slots therefore keep the gate-16 trap here, and the trap says which
# slot fired on which actor in which phase.

# --- linkloop round 1 -------------------------------------------------------
# the red-coin counter pair the eighth coin's collect path reads and writes
src/GiveRedCoins.c
src/NumRedCoins.c
# CommonModel::DoSetFile's own pool call
src/func_02016e70.c

# ============================================================================
# The rest of the roster whose overlay is already mounted: ov002 (gate 14),
# ov098 (gate 19), ov100 (gate 21), ov102 (gate 23). Registry rows and vtable
# fills only -- no new mount and no new sinit. Every vtable was checked
# against the ROM's Itanium RTTI; the table is in the head of
# hal/actor_classes_bob_world.cpp.
#
# BRICK_BLOCK (15) x14 -- installs _ZTV13BigBrickBlock, which gate 16 already
# fills for BLACK_BRICK_BLOCK (17). One class body, six actor ids, so 15 is a
# registry row and a factory and nothing else.
src/d_a_obj_block_l_block_l.c

# MEGA_MUSHROOM_BLOCK_TAG (322) x4, AND NOT ON THIS LEVEL -- _ZTV10BrickBlock,
# RTTI daObjBlockItemTag_c. The x8 this line carried was read off ov014's own
# object tables rather than off a boot, and no level-6 census has ever produced
# one. Counted over all fifty mounted levels (run rel0215, lane tagfix): 322 is
# level 0 x1, level 13 x2, level 44 x1. The class stays in this gate because
# gate 33 is what first linked its dispatcher; port/slice_tagfix.txt seats the
# four handlers that dispatcher indexes and carries the full placement table
# for all four ids.
src/d_a_obj_block_item_tag_blk_skinoko_tag.c
src/_ZN10BrickBlock13InitResourcesEv.cpp
# RETIRED at SLICE1: body now in src/_ZN10BrickBlockD1Ev.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/_ZN10BrickBlockD0Ev.cpp
src/_ZN10BrickBlock16CleanupResourcesEv.cpp
src/_ZN10BrickBlock8BehaviorEv.cpp
# _ZN10BrickBlockD1Ev.cpp is NOT here (real C++ destructor) and
# _ZN10BrickBlockD0Ev.c is NOT here either: its body spells the vtable and the
# heap as the bare placeholders VT and HEAP, which are per-TU names a global
# alias would mis-resolve for any other TU that uses them. Slot 16 is written
# out in the HAL, which for this class is two lines.

# CANNON_HATCH (14) x6 -- _ZTV20daObjCannonShutter_c, RTTI daObjCannonShutter_c
src/game/actors/d_a_obj_cannon_shutter.cpp

# CAP (269) -- _ZTV13WaterfallMist, RTTI daObjMarioCap_c. NOT gate 20's class:
# WATERFALL_MIST (197) installs _ZTV16daObjWaterfall_c, RTTI daObjWaterfall_c.
src/d_a_obj_mario_cap.c
src/_ZN15daObjMarioCap_c13InitResourcesEv.cpp
src/actors/daObjMarioCap_c.cpp

# HEALING_HEART (297) -- _ZTV7Seaweed, RTTI daObjHeart_c
src/d_a_obj_heart.c
src/_ZN12HealingHeart13InitResourcesEv.cpp
src/_ZN12HealingHeart16CleanupResourcesEv.cpp
src/_ZN12HealingHeart8BehaviorEv.cpp
# _ZN12HealingHeart6RenderEv IS NOT HERE: like PowerStar/Whomp/UpDownLiftBbh it
# dispatches ModelAnim slot 5 through a local six-virtual ROM-order shadow
# (b->m(0) off the ModelAnim at +0xd4), which lands on the host _ZTV9ModelAnim's
# Virtual18 (MSVC folds the two dtor slots into one) instead of Render -- a two-arg
# method called with one arg, measured as a c0000005 in Model::Virtual10 reached
# via Seaweed::Render -> ModelAnim::Virtual18 -> Virtual10 -> Model::Virtual10 the
# first frame the HEALING_HEART draws (it shares _ZTV7Seaweed, RTTI daObjHeart_c,
# so it renders through Seaweed::Render) on the natural king-defeat path. The
# matched src is byte-identical to eleven other bare +0xd4 draws and ICF-folds
# with them, so leaving it in makes both HealingHeart's and Seaweed's own vtable
# calls fault. Host copy in port/unmatched/ModelAnim_Renders.cpp, dispatched by
# C name from the HealingHeart vtable fill in hal/actor_classes_bob_world.cpp.
# (src/_ZN12HealingHeart6RenderEv.cpp intentionally omitted)

# EXCLAMATION_SWITCH (11) -- _ZTV10StarSwitch, RTTI daObjSwitch_c
src/d_a_obj_switch_hanswitch.c
src/_ZN10StarSwitch13InitResourcesEv.cpp
src/_ZN10StarSwitch16CleanupResourcesEv.cpp
src/_ZN10StarSwitch8BehaviorEv.cpp
src/_ZN10StarSwitch6RenderEv.cpp
src/_ZN10StarSwitchD1Ev.cpp
# RETIRED at SLICE1: body now in src/_ZN10StarSwitchD1Ev.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/_ZN10StarSwitchD0Ev.cpp

# INVISIBLE_SECRET (329) x5 -- the vtable at ov002 0x0210b030, RTTI daSCoin_c.
# NOT _ZTV15InvisibleSecret and NOT the six _ZN15InvisibleSecret* files: the
# config's name is shifted onto Number's table here, and this class's own five
# slots are the unnamed func_ov002_020f0* family the factory's one literal
# points at. The full chain is in hal/actor_classes_bob_world.cpp.
src/actors/daSCoin_c.cpp

# ARROW_SIGN_LEFT (299) x2 and ARROW_SIGN_RIGHT (300) x3 -- one class, one
# table, two ids. The four methods are already on the gate-9 list, which is on
# both binaries, so only the left factory and the destructor are new here.
src/d_a_obj_yajirusi_yajirusi_l.c
src/_ZN14ArrowSignRightD1Ev.cpp
# RETIRED at SLICE1: body now in src/_ZN14ArrowSignRightD1Ev.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/_ZN14ArrowSignRightD0Ev.cpp
# The sign's own interaction bodies, matched src, were in no slice so slots 27
# and 31 declined by name. Now enrolled and seated through as_mega / as_kill in
# hal/actor_classes_bob_world.cpp. Slot 27 OnHitByMegaChar (0x02137d80) is
# thiscall (ret 4, two linked dispatchers at walk_window 0x45345e and 0x485fd3);
# slot 31 Kill (0x02137ccc) is thiscall with no arg (ret 0). Neither body
# dispatches a further vtable slot, so both closures are closed and their
# callees (Player::IncMegaKillCount, Platform::KillByMegaChar, func_02012694 for
# 27; Particle::System::NewSimple, Actor::DisappearPoofDustAt, Sound::PlayBank3,
# ActorBase::MarkForDestruction for 31) were already linked. Slot 22 OnAttacked1
# (0x02137d40) is now seated through as_atk1 (thiscall, ret 4). Its raw src
# tail-dispatches slot 31 through a cdecl function-pointer idiom that mismatches
# slot 31's thiscall veneer, a false-fix one call deep, so it is NOT sliced;
# src/_ZN14ArrowSignRight11OnAttacked1ER8dActor_c.cpp -- HOST COPY: unmatched/ArrowSign_OnAttacked1.cpp
# (the inner slot-31 dispatch remodelled as a C++ virtual so the site is
# thiscall and lands on as_kill). The Player_HeadBonk pattern.
src/_ZN14ArrowSignRight15OnHitByMegaCharER6Player.cpp
src/_ZN14ArrowSignRight4KillEv.cpp
port/unmatched/ArrowSign_OnAttacked1.cpp

# WATER_BOMB (208) x2 -- _ZTV9WaterBomb, RTTI daWbm_c
src/d_a_wbm.c
src/_ZN9WaterBomb13InitResourcesEv.cpp
src/_ZN9WaterBomb16CleanupResourcesEv.cpp
src/_ZN9WaterBomb8BehaviorEv.cpp
src/_ZN9WaterBomb6RenderEv.cpp
src/_ZN9WaterBombD1Ev.cpp
# RETIRED at SLICE1: body now in src/_ZN9WaterBombD1Ev.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/_ZN9WaterBombD0Ev.cpp

# ROLLING_IRON_BALL (220) x4 -- _ZTV15RollingIronBall, RTTI daIbl_c
src/d_a_ibl.c
src/_ZN15RollingIronBall13InitResourcesEv.cpp
src/_ZN15RollingIronBall16CleanupResourcesEv.cpp
src/_ZN15RollingIronBall8BehaviorEv.cpp
# slot 29, RollingIronBall::OnAimedAtWithEgg (ov100 0x02141fa8, 8 bytes,
# `return 0x82000` == 130.0): the ROM word in _ZTV15RollingIronBall slot 29,
# needed for the same reason UnchainedChomp's is -- the class's slot 30 is now
# the Actor base body, which dispatches slot 29. Byte-matches on all three
# 1.2 configs with strict relocs.
src/_ZN15RollingIronBall16OnAimedAtWithEggEv.cpp
src/_ZN15RollingIronBall6RenderEv.cpp
src/_ZN15RollingIronBallD1Ev.cpp
# RETIRED at SLICE1: body now in src/_ZN15RollingIronBallD1Ev.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/_ZN15RollingIronBallD0Ev.cpp

# WARP_PIPE (298) -- _ZTV13FortressTower, RTTI daObjSimpleBg_c. Bob-omb
# Battlefield does not name it; it is here because the task asks for warp
# pipes and ov102 is already mounted.
src/d_a_obj_simple_bg_dokan.c
src/_ZN13FortressTower13InitResourcesEv.cpp
src/_ZN13FortressTower16CleanupResourcesEv.cpp
src/_ZN13FortressTower8BehaviorEv.cpp
src/_ZN13FortressTower6RenderEv.cpp
src/_ZN13FortressTowerD1Ev.cpp
# RETIRED at SLICE1: body now in src/_ZN13FortressTowerD1Ev.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/_ZN13FortressTowerD0Ev.cpp

# gate 48: BigBrickBlock (16) and FortressTowerWall (46) of Whomp's Fortress
# (level 7). Both factories install _ZTV13BigBrickBlock, the class body gate 16
# fills for BLACK_BRICK_BLOCK (17); one body serves six actor ids and switches
# on mActorId. So the only new code is the two Spawn factories -- InitResources,
# Behavior, Render and the destructors are already linked with black brick
# block. Behavior has no PMF dispatch (Event bits and collision range only).
src/d_a_obj_block_l_dp_block_l.c
src/d_a_obj_block_l_bk_futa.c

# gate 49: OneUpMushroomBlockTag (321), Whomp's Fortress. Installs
# _ZTV10BrickBlock, the tag class body gate 33 fills for MEGA_MUSHROOM_BLOCK_TAG
# (322). One body serves both ids; the only new code is this Spawn factory.
src/d_a_obj_block_item_tag_blk_okinoko_tag.c

# gate 46: InvisiblePole (287), Whomp's Fortress -- RTTI daBar_c, a moving-bar
# actor. Its real vtable is _ZTV7daBar_c (the gate-20 name shift; the
# factory's bodies are the func_ov002_020b0* family, not the config's
# _ZN13InvisiblePole* methods). No PMF dispatch: Behavior/Render/Cleanup are
# short and the bar's collision is a plain MovingCylinderClsn. The vtable is
# filled by hand in hal/actor_classes_bob_world.cpp.
src/game/actors/d_a_bar.cpp

# lane SEAT-CAMERATAG: CameraTag (333), RTTI daCamTag_c. Resolved by address:
# ACTOR_SPAWN_TABLE[333] -> g_profile_CAMERA_TAG (0x02108518), factory
# daCamTag_c_classInit (0x020b07c8) installs 0x0210853c, the table the config names
# _ZTV10daCamTag_c, whose slot bodies are the config's _ZN13InvisiblePole*
# (the gate-20 shift, one class past the pole). All matched at their ROM
# addresses (tools/match.py 2004/b56, 8 of 8). The D1 is class-form C++ and
# rides slice_dtorfaces.txt; the vtable is host storage filled by hand in
# hal/actor_classes_bob_world.cpp. No shipped level places 333.
src/game/actors/d_a_cam_tag.cpp

# --- linkloop round 3: the closure of the twelve above ----------------------
src/IsCannonOpenInCurLevel.c
src/UnloadSilverStarAndNumber.c
src/_ZN8dActor_c13SmallPoofDustEv.cpp
src/_ZN5Event8ClearBitEj.cpp
src/_ZN5Model6RenderEPK7Vector3.cpp
src/func_020393c4.c
src/_ZN10dCapIcon_c6UnlinkEv.cpp
src/func_ov001_020ab228.c
src/_ZN10dCapIcon_cD1Ev.cpp
src/_ZN10dCapIcon_cC1Ev.cpp
src/func_ov002_020b9f00.c
src/func_ov002_020b9f80.cpp
# EXCLAMATION_SWITCH's own OnGroundPounded (StarSwitch_OnGroundPounded, ov002
# 0x020b9fec). Matched src, size 0x30, closes over func_ov002_020ba4d8 alone
# (the state INIT dispatcher, host-copied in ExclamationSwitch_StateDispatch.cpp
# and already linked). Its one linked dispatch site is thiscall (walk_window.exe
# 0x45de24: mov ecx,this / push pounder / call [edx+0x54] / no caller cleanup),
# so hal seats it through a 3-param __fastcall veneer that emits ret 4, the same
# shape ssb_pounded and bbb_pounded already ship. Was in no slice, so slot 21
# declined on ac_trap21; a ground pound is how this switch is pressed.
src/_ZN10StarSwitch15OnGroundPoundedER8dActor_c.cpp
src/func_ov002_020ba01c.cpp
# func_ov002_020ba4d8 and func_ov002_020ba520 (the EXCLAMATION_SWITCH's two
# state dispatchers) are EXCLUDED here: they form a pointer-to-member over an
# incomplete class, which MSVC widens to the four-word representation and
# strides data_ov002_0210e00c at 0x20 instead of 0x10. gate 51 host-copies both
# (port/unmatched/ExclamationSwitch_StateDispatch.cpp), the OneUpMushroom case.
src/func_ov002_020baa98.c
src/func_ov002_020bc664.c
src/func_ov002_020e6d88.c
src/func_ov098_0213b584.c
src/func_ov098_0213b63c.cpp
src/func_ov098_0213b6e0.cpp
src/func_ov100_0214233c.cpp
src/Vec3_Equal.c
src/_ZN8dActor_c13ClosestPlayerEv.cpp
src/actors/dBgActor_c.cpp

# --- linkloop round 4 -------------------------------------------------------
src/IsCannonOpenInLevel.c
src/func_ov001_020aa6b0.c
src/func_ov001_020aa6cc.c
src/func_ov002_020baa2c.c
src/IsCannonOpen.c

# WARP (347) x4 -- the vtable at ov002 0x0210acbc, RTTI daWarpkun_c. What
# Bob-omb Battlefield actually uses where the task asked for warp pipes: the
# level names no pipe and four warp POINTS. Its factory spells the table by
# the RTTI name and dsd never named it (the InvisibleSecret case again); all
# seven slots are plain C-named funcs, so this class needs no header and no
# face at all.
src/game/actors/d_a_warpkun.cpp
# _ZN11daWarpkun_c8BehaviorEv is C++ inside a .c and goes through hostgen instead,
# see GATE16_SYMS in CMakeLists.txt.
src/WarpPlayer.c
src/actors/Player.cpp

# ---- CylinderClsn::Process, and it is the whole of "a coin can be picked up"
# arm9 0x02014aa8, 0x49c bytes, matched, and never called in the port until
# now. It is the PAIRWISE cylinder pass: it walks the list every actor's
# CylinderClsn::Update links itself into, and for each overlapping pair it
# writes hitFlags and otherOwner at CylinderClsn+0x20/+0x24 and unlinks the
# node again.
#
# That is exactly the pair func_ov002_020b19dc reads. The coin's
# MovingCylinderClsn sits at +0x178, so the flags it tests at +0x198 and the
# owner it reads at +0x19c ARE this pass's two writes. With the pass never
# running the words stay zero, the coin never learns it was touched, and a
# hosted coin is a coin that cannot be collected -- which is what the first
# Bob-omb Battlefield run measured: 60 coins alive and the counter at 0 with
# Mario standing inside one.
#
# The ROM calls it from Stage::Render (arm9 0x0202ba14, inside 0x0202b8a4),
# and the Stage's twenty slots are all traps in the port -- gate 26 landed it
# as a scene root, not as a running actor. So the call goes where Stage::Render
# would have made it: the head of the render phase, in port_actor_render.
src/_ZN5dCc_c7ProcessEv.cpp
src/func_02014f44.c
src/func_02014f5c.c
# func_02014f5c calls its ov002 target by an UNPREFIXED name -- func_020caf98
# rather than func_ov002_020caf98 -- because its TU had no way to know the
# address was in an overlay. Same function, one alias in
# hal/actor_faces_bob.cpp.

# gate 55: the WATER_BOMB's three-state closure. WaterBomb::Behavior dispatches
# a {function, delta} pair out of data_ov098_0213c930[unk_3c4]; the three bodies
# and the helper one of them calls were never in the link, so the seeded table
# held DS code addresses and the first frame a bomb reached its Behavior faulted
# jumping to 0x0213b9d8. All matched src; the table is reseated to these host
# bodies by port/unmatched/WaterBomb_StateDispatch.cpp.
#
# State 0 (func_ov098_0213b9d8) is back (run linkfull, lane RS4PORT). It was
# host-copied in port/unmatched/WaterBomb_State0.cpp because the per-function
# file was declared int-returning with mwccarm's bare `return;` on every early
# exit (MSVC C2561). main #3089 promoted the state into src/actors/daWbm_c.cpp
# as a void body; this per-function file carries that return type (the SYNC8C
# route (a) back-port), byte-identical under mwccarm 2004/b56, and the host
# copy is retired.
src/func_ov098_0213b9d8.cpp
src/func_ov098_0213b7e8.c
src/func_ov098_0213bb1c.cpp
src/func_ov098_0213b520.c
