#pragma once #include "kage_graphics.h" #include #include #include #include // An image preload.xml lists, and the image once its group is loaded. struct PreloadEntry { std::string path; KAGE::Graphics::ImagePtr image; }; // The images of one preload.xml group, loaded together the first time the group is asked for. struct PreloadGroup { std::vector entries; bool isLoaded = false; }; // Construction, destruction and the group map's insertion (009c6e10) are the defaults. // The preloads (Game's PreloadManager): preload.xml's image groups by id, each loaded once into the texture cache and // held there for the rest of the game. class PreloadManager { public: std::unordered_map groups; bool xml_load(std::string_view path); void group_load(std::string_view name); };