mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-05 00:33:51 +00:00
refactor: decompose world map into modular component architecture
Break the monolithic 1360-line world_map.cpp into 16 focused modules under src/rendering/world_map/: Architecture: - world_map_facade: public API composing all components (PIMPL) - world_map_types: Vulkan-free domain types (Zone, ViewLevel, etc.) - data_repository: DBC zone loading, ZMP pixel map, POI/overlay storage - coordinate_projection: UV projection, zone/continent lookups - composite_renderer: Vulkan tile pipeline + off-screen compositing - exploration_state: server mask + local exploration tracking - view_state_machine: COSMIC→WORLD→CONTINENT→ZONE navigation - input_handler: keyboard/mouse input → InputAction mapping - overlay_renderer: layer-based ImGui overlay system (OCP) - map_resolver: cross-map navigation (Outland, Northrend, etc.) - zone_metadata: level ranges and faction data Overlay layers (each an IOverlayLayer): - player_marker, party_dot, taxi_node, poi_marker, quest_poi, corpse_marker, zone_highlight, coordinate_display, subzone_tooltip Fixes: - Player marker no longer bleeds across continents (only shown when player is in a zone belonging to the displayed continent) - Zone hover uses DBC-projected AABB rectangles (restored from original working behavior) - Exploration overlay rendering for zone view subzones Tests: - 6 new test files covering coordinate projection, exploration state, map resolver, view state machine, zone metadata, and integration Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
This commit is contained in:
parent
db3f65a87e
commit
fff06fc932
55 changed files with 6335 additions and 1542 deletions
37
include/rendering/world_map/zone_metadata.hpp
Normal file
37
include/rendering/world_map/zone_metadata.hpp
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
// zone_metadata.hpp — Zone level ranges, faction data, and label formatting.
|
||||
// Extracted from WorldMap::initZoneMeta and inline label formatting
|
||||
// (Phase 4 of refactoring plan). DRY — formatLabel used by multiple layers.
|
||||
#pragma once
|
||||
|
||||
#include "rendering/world_map/world_map_types.hpp"
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace wowee {
|
||||
namespace rendering {
|
||||
namespace world_map {
|
||||
|
||||
class ZoneMetadata {
|
||||
public:
|
||||
/// Initialize the zone metadata table (level ranges, factions).
|
||||
void initialize();
|
||||
|
||||
/// Look up metadata for a zone by area name. Returns nullptr if not found.
|
||||
const ZoneMeta* find(const std::string& areaName) const;
|
||||
|
||||
/// Format a zone label with level range and faction tag.
|
||||
/// e.g. "Elwynn (1-10) [Alliance]"
|
||||
static std::string formatLabel(const std::string& areaName,
|
||||
const ZoneMeta* meta);
|
||||
|
||||
/// Format hover label with level range and bracket-tag for faction.
|
||||
static std::string formatHoverLabel(const std::string& areaName,
|
||||
const ZoneMeta* meta);
|
||||
|
||||
private:
|
||||
std::unordered_map<std::string, ZoneMeta> table_;
|
||||
};
|
||||
|
||||
} // namespace world_map
|
||||
} // namespace rendering
|
||||
} // namespace wowee
|
||||
Loading…
Add table
Add a link
Reference in a new issue