First commit that disconnects this game from the game framework so it can be its own thing.

This commit is contained in:
Zed A. Shaw 2026-03-29 11:02:02 -04:00
parent 8073997eb3
commit db60f75bd9
29 changed files with 37 additions and 36 deletions

View file

@ -19,7 +19,7 @@ namespace gui {
"[spawn1|spawn2|spawn3]"
"[spawn4|spawn5|spawn6]");
add_spawn_button("RAT_GIANT", "rat_with_sword", "spawn4");
// add_spawn_button("RAT_GIANT", "rat_with_sword", "spawn4");
$gui.init();
}

View file

@ -19,6 +19,9 @@ namespace gui {
auto config = settings::get("config");
$hand = textures::get_sprite(config["player"]["hands"]);
$hand_anim = animation::load("assets/animation.json", config["player"]["hands"]);
int width = $hand_anim.sheet.frame_width;
int height = $hand_anim.sheet.frame_height;
$hand.sprite->setPosition({float(RAY_VIEW_X + (RAY_VIEW_WIDTH - width) / 2), float(RAY_VIEW_HEIGHT - height)});
}
void MainUI::dirty() {
@ -147,7 +150,6 @@ namespace gui {
if($hand_anim.playing) {
$hand_anim.update();
$hand_anim.apply(*$hand.sprite);
$hand.sprite->setPosition({RAY_VIEW_X, RAY_VIEW_Y});
$window.draw(*$hand.sprite);
}
}