Crimson Engine 1.0.0
A high-performance C++20 game engine prototype showcasing a custom ECS, Vulkan renderer, and ImGui editor.
Loading...
Searching...
No Matches
TilesetAsset.cpp File Reference
#include "scenes/TilesetAsset.hpp"
#include "renderer/VulkanRenderer.hpp"
#include "renderer/ResourceManager.hpp"
#include "scenes/JSONUtils.hpp"
#include "stb_image.h"
#include <fstream>
#include <sstream>
#include <filesystem>
#include <iostream>
#include <cmath>
#include <cstring>

Namespaces

namespace  Engine

Functions

ENGINE_API std::unordered_map< std::string, TilesetAsset > & Engine::getTilesetCache ()
 Returns a reference to the process-wide TilesetAsset cache. The TilemapSystem uses this to avoid reloading/repacking every frame.
ENGINE_API void Engine::invalidateTilesetCache (const std::string &path="")
 Evicts the specified entry (or all entries if path is empty) from the cache.
ENGINE_API TilesetAsset * Engine::loadOrGetTileset (const std::string &path, VulkanRenderer &renderer)
 Loads a TilesetAsset from disk (or returns a cached copy). If the tileset file changes on disk, call invalidateTilesetCache() first.