mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-02 15:53:51 +00:00
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:
parent
ada019e0d4
commit
97c95941f4
9 changed files with 218 additions and 54 deletions
|
|
@ -1,14 +1,33 @@
|
|||
// player_marker_layer.hpp — Directional player arrow on the world map.
|
||||
#pragma once
|
||||
#include "rendering/world_map/overlay_renderer.hpp"
|
||||
#include "rendering/vk_texture.hpp"
|
||||
#include <vulkan/vulkan.h>
|
||||
#include <memory>
|
||||
|
||||
namespace wowee {
|
||||
namespace rendering {
|
||||
class VkContext;
|
||||
}
|
||||
namespace pipeline { class AssetManager; }
|
||||
namespace rendering {
|
||||
namespace world_map {
|
||||
|
||||
class PlayerMarkerLayer : public IOverlayLayer {
|
||||
public:
|
||||
~PlayerMarkerLayer() override;
|
||||
void initialize(VkContext* ctx, pipeline::AssetManager* am);
|
||||
void clearTexture();
|
||||
void render(const LayerContext& ctx) override;
|
||||
|
||||
private:
|
||||
void ensureTexture();
|
||||
|
||||
VkContext* vkCtx_ = nullptr;
|
||||
pipeline::AssetManager* assetManager_ = nullptr;
|
||||
std::unique_ptr<VkTexture> texture_;
|
||||
VkDescriptorSet imguiDS_ = VK_NULL_HANDLE;
|
||||
bool loadAttempted_ = false;
|
||||
};
|
||||
|
||||
} // namespace world_map
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue