# Gate-28 slice: the MINIMAP, actor id 335 (0x14f).
#
# The other id the castle-grounds census printed as skipped, and the one the
# bottom screen is mostly made of. Twelve matched methods; what it needed was
# gate 27's eighteen-slot vtable law plus a registry row.
#
# Its SpawnInfo is ov002 0x0210c160, which config names g_profile_MAP,
# and like the HUD the ROM puts the CONSTRUCTOR in the record's +0 word
# (0x020fb8bc) rather than a separate Spawn veneer. The +4 halfword reads 0x14f
# and the +6 halfword 0x14f, which is the id and the two list priorities.
#
# ITS VTABLE IS THE SAME EIGHTEEN SLOTS as dMeter_c's, read out of ov002 the
# same way -- _ZTV7Minimap at 0x0210c1c0, and the ten shared slots are the
# byte-identical run ActorBase supplies for the HUD (0x02043c78, 0x02013ef4,
# 0x02043bac, 0x02043b2c, 0x02043afc, 0x02043af8, 0x02043ac8, 0x02043ac4,
# 0x0204357c, 0x0204349c, 0x02043494). Its own six are
#
#     0  020fb38c  Minimap::InitResources     12  020f9e94  OnPendingDestroy
#     3  020f9e8c  Minimap::CleanupResources  16  020f975c  ~Minimap (D1)
#     6  020fa690  Minimap::Behavior          17  020f978c  ~Minimap (D0)
#     9  020f9e98  Minimap::Render
#
# The vtable STORAGE the constructor installs is named _ZTV6dMap_c, not
# _ZTV7Minimap -- the ROM class is dMap_c and the two names sit on the same
# bytes. hal/sub_actors.cpp owns it, next to dMeter_c's.
#
# WHAT IT DRAWS. Minimap::InitResources writes BG3CNT_SUB (0x0400100e) itself,
# decompresses the level's map characters through G2S::GetBG3CharPtr and its
# tilemaps through G2S::GetBG3ScrPtr, and loads a BG EXTENDED palette through
# GXS::BeginLoadBGExtPltt / LoadBGExtPltt / EndLoadBGExtPltt -- which is why
# this waited on port/ntr/ppu_sub.cpp growing extended-palette support. It ends
# by ORing bit 3 into data_0209d454, the sub engine's layer-enable mask: the
# minimap is the thing that turns BG3 on, and hal/sub_screen.cpp has been
# publishing that mask into DISPCNT_B every frame with nothing setting the bit.

src/d_map.cpp
# RETIRED at SLICE1: body now in src/_ZN7MinimapD1Ev.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/_ZN7MinimapD0Ev.cpp
src/_ZN7MinimapD1Ev.cpp
src/_ZN7Minimap13InitResourcesEv.cpp
src/_ZN7Minimap16CleanupResourcesEv.cpp
src/_ZN7Minimap16OnPendingDestroyEv.cpp
# Behavior and Render index the three per-player tables (mPlayerIconX/Y @0x70/
# 0x80, mPlayerMapIDs @0x21e) by PLAYER NUMBER. The ROM sizes them at four; this
# port hosts sixteen players (port/hal/vs_width.h), so a console on slot 8..15
# walked the self-icon index off the end of the four-entry arrays AND off the
# end of the sixteen-entry OAM::MM_VS_PLAYER_ICONS table -- a c0000005 in
# Minimap::Render at the frame the minimap first drew (measured at seats
# 8/12/15). src/ is byte-frozen, so both are host-copied with sixteen-wide host
# storage and the loop/index bounded: port/unmatched/Minimap_Behavior.cpp and
# port/unmatched/Minimap_Render.cpp (appended to SLICE28_SOURCES in CMakeLists).
# src/_ZN7Minimap8BehaviorEv.cpp
# src/_ZN7Minimap6RenderEv.cpp

# the leaves the three big methods reach
src/_ZN7Minimap19UpdateLevelSpecificEv.cpp
src/_ZN7Minimap21FixTHIPaintingRoomPosER7Vector3.cpp
src/_ZN7Minimap15GetPosOnMinimapER7Vector3S1_5Fix12IiEsS1_.cpp
src/_ZN7Minimap20GetPosFromMinimapPosER7Vector3S1_5Fix12IiEsS1_.cpp

# the minimap's own file-id and scale lookups
src/func_0202a980.c
src/func_0202a96c.c
src/func_0202a958.c
src/GetMinimapID.c
src/GetMinimapScale.c
src/UpdateMinimap.c

# BG3-sub character and screen pointers, and the extended-palette upload
src/_ZN3G2S13GetBG3CharPtrEv.cpp
src/_ZN3G2S12GetBG3ScrPtrEv.cpp
src/_ZN3GXS18BeginLoadBGExtPlttEv.cpp
src/_ZN3GXS13LoadBGExtPlttEPKvjj.cpp
src/_ZN3GXS16EndLoadBGExtPlttEv.cpp

# the VRAM bank swap the extended-palette upload brackets itself with
src/_ZN2GX22SetBankForSubBGExtPlttEt.cpp
src/func_02054118.c
src/func_020541b8.c

# the callees no earlier slice pulled in
src/Vec3_DivScalarInPlace.c
src/actors/Player.cpp
