feat(editor): tile availability checker, NPC marker diagnostics

- Load dialog shows green "Tile found" / red "Tile not found" indicator
  by checking the manifest before you attempt to load
- NPC marker build/render diagnostic logging to trace rendering issues
- Map browser and tile checker work together for easy existing zone loading
This commit is contained in:
Kelsi 2026-05-05 06:05:33 -07:00
parent a6b8cd75f6
commit 124ff5a54a
2 changed files with 17 additions and 2 deletions

View file

@ -279,6 +279,7 @@ void EditorViewport::rebuildObjects(const std::vector<PlacedObject>& objects,
v.pos[0]=x; v.pos[1]=y; v.pos[2]=z+h; verts.push_back(v);
}
npcMarkerVertCount_ = static_cast<uint32_t>(verts.size());
LOG_INFO("NPC markers: ", npcs.size(), " npcs -> ", npcMarkerVertCount_, " verts");
VkBufferCreateInfo bi{VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO};
bi.size = verts.size() * sizeof(MV);
bi.usage = VK_BUFFER_USAGE_VERTEX_BUFFER_BIT;
@ -429,6 +430,8 @@ void EditorViewport::render(VkCommandBuffer cmd) {
if (npcMarkerVB_ && npcMarkerVertCount_ > 0) {
auto* wp = waterRenderer_.getPipeline();
auto* wl = waterRenderer_.getPipelineLayout();
static bool loggedOnce = false;
if (!loggedOnce) { loggedOnce = true; LOG_INFO("NPC render: vb=", (wp?"ok":"null"), " layout=", (wl?"ok":"null"), " verts=", npcMarkerVertCount_); }
if (wp && wl) {
vkCmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, wp);
vkCmdBindDescriptorSets(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, wl,