feat(world-map): remove kVOffset hack, ZMP hover, textured player arrow

- Remove the -0.15 vertical offset (kVOffset) from coordinate_projection,
  coordinate_display, and zone_highlight_layer; continent UV math is now
  identical to zone UV math
- Switch world_map_facade aspect ratio to MAP_W/MAP_H (1002×668) and crop
  the FBO image with MAP_U_MAX/MAP_V_MAX instead of stretching the full
  1024×768 FBO
- Account for ImGui title bar height (GetFrameHeight) in window sizing and
  zone highlight screen-space rect coordinates
- Add ZMP 128×128 grid pixel-accurate hover detection in zone_highlight_layer;
  falls back to AABB when ZMP data is unavailable
- Upgrade PlayerMarkerLayer with full Vulkan lifecycle (initialize,
  clearTexture, destructor); loads MinimapArrow.blp and renders a rotated
  32×32 textured quad via AddImageQuad; red triangle retained as fallback
- Expose arrowRotation_ / arrowDS_ accessors on Minimap; clean up arrow DS
  and texture in Minimap::shutdown()
- Wire PlayerMarkerLayer::initialize() into WorldMapFacade::initialize()
- Update coordinate-projection test: continent and zone UV are now equal

Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
This commit is contained in:
Pavel Okhlopkov 2026-04-12 20:02:50 +03:00
parent ada019e0d4
commit 97c95941f4
9 changed files with 218 additions and 54 deletions

View file

@ -56,6 +56,9 @@ public:
void setOpacity(float opacity) { opacity_ = opacity; }
float getArrowRotation() const { return arrowRotation_; }
VkDescriptorSet getArrowDS() const { return arrowDS_; }
// Public accessors for WorldMap
VkTexture* getOrLoadTileTexture(int tileX, int tileY);
void ensureTRSParsed() { if (!trsParsed) parseTRS(); }
@ -121,6 +124,12 @@ private:
// Tile tracking
int lastCenterTileX = -1;
int lastCenterTileY = -1;
// Player arrow texture (MinimapArrow.blp)
std::unique_ptr<VkTexture> arrowTexture_;
VkDescriptorSet arrowDS_ = VK_NULL_HANDLE;
bool arrowLoadAttempted_ = false;
float arrowRotation_ = 0.0f;
};
} // namespace rendering