Started working on this 'arena tester' tool that would let me load an enemy and test them, but then realized I could just make it so I can spawn enemies in the game. I'm keeping the arena around as it will be useful later as a scriptable testing tool, but for now just spawn and test.

This commit is contained in:
Zed A. Shaw 2025-04-04 12:45:55 -04:00
parent b6c1eba1b3
commit 4f090159ab
14 changed files with 524 additions and 58 deletions

View file

@ -52,9 +52,18 @@ namespace textures {
}
SpriteTexture get(std::string name) {
dbc::check(initialized, "you forgot to call textures::init()");
dbc::check(TMGR.sprite_textures.contains(name),
fmt::format("!!!!! texture pack does not contain {} sprite", name));
return TMGR.sprite_textures.at(name);
auto result = TMGR.sprite_textures.at(name);
dbc::check(result.sprite != nullptr,
fmt::format("bad sprite from textures::get named {}", name));
dbc::check(result.texture != nullptr,
fmt::format("bad texture from textures::get named {}", name));
return result;
}
sf::Image load_image(std::string filename) {