Add WM_DIABTWARPUP to trigger message checks so the tracker's
entrances/exits and stairs categories detect town warps from
Catacombs L1, Caves L1, Hell L1, Hive, and Crypt back to town.
Previously only regular stairs up (WM_DIABPREVLVL) were detected.
TriggerLabelForSpeech already handles WM_DIABTWARPUP and returns
"Warp up", so labeling works automatically.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Port upstream tracker overhaul into the modular tracker module. Adds
Npcs, Players, DungeonEntrances, Stairs, QuestLocations, and Portals
categories with collector functions, navigation, and auto-walk support.
Replaces CycleTrackerTargetKeyPressed with TrackerPageUp/PageDown/Home
key handlers that support Ctrl for category cycling and Shift for
auto-walk. Includes review fixes: nullopt guard in auto-walk, removal
of default switch clauses in favor of app_fatal, internal linkage for
non-public functions, multi-tile object approach, and distance-sorted
town dungeon entrances.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Guard against MyPlayer being nullptr in IsPlayerDead(),
CycleSpellHotkeys(), RefreshTownNpcOrder(), SpeakSelectedTownNpc(), and
ListTownNpcsKeyPressed() to prevent crashes during early init or after
disconnect. Also reset AutoWalkTrackerTargetId when MyPlayer is null in
the auto-walk tracker to prevent the walk loop from retrying endlessly.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The variable is only used within tracker.cpp, so remove the unnecessary
extern declaration from the header and place it in the anonymous
namespace alongside the other file-local tracker state.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move ~4,100 lines of accessibility code from diablo.cpp into 6 new
modules, reducing diablo.cpp from ~7,700 to ~3,660 lines.
New modules:
- controls/accessibility_keys: UI key handlers and guard functions
(IsPlayerDead, IsGameRunning, CanPlayerTakeAction, etc.)
- utils/walk_path_speech: BFS pathfinding, PosOk variants, walk
direction helpers, and path-to-speech formatting
- utils/accessibility_announcements: periodic announcements for low
HP warning sound, durability, boss health, monsters, doors
- controls/town_npc_nav: town NPC selection cycling and auto-walk
- utils/navigation_speech: exit/stairs/portal/unexplored speech and
keyboard walk key handlers
- controls/tracker: target category cycling, candidate finding,
pathfinding navigation, and auto-walk tracker
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>