Font 8bithud, classe Text i overlay RenderInfo (F3, persistit a config.yaml) (v0.7.0)

This commit is contained in:
JailDesigner committed 2026-04-19 00:31:02 +02:00
1 parent ce5bec1b34
commit e6f3c888e6
19 files changed
+712 -6

No files matched your search

+4
View File
@@ -25,6 +25,10 @@ void Sprite::render() {
surface_->render(static_cast<int>(pos_.x), static_cast<int>(pos_.y), &clip_);
}
void Sprite::render(Uint8 source_color, Uint8 target_color) {
surface_->renderWithColorReplace(static_cast<int>(pos_.x), static_cast<int>(pos_.y), source_color, target_color, &clip_);
}
void Sprite::setPosition(float x, float y) {
pos_.x = x;
pos_.y = y;
+3
View File
@@ -18,6 +18,9 @@ class Sprite {
virtual void update(float delta_time);
virtual void render();
// Renderitza substituint l'índex source_color per target_color (ús típic:
// la classe Text, que recolora glifs monocroms per paràmetre).
virtual void render(Uint8 source_color, Uint8 target_color);
virtual void clear();
[[nodiscard]] auto getX() const -> float { return pos_.x; }