A retro style homage to 80s dungeon crawlers hand crafted in C++.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
|
|
|
#pragma once
|
|
|
|
#include <SFML/Graphics/Sprite.hpp>
|
|
|
|
|
|
|
|
struct Animator {
|
|
|
|
int width = 0;
|
|
|
|
int height = 0;
|
|
|
|
int max_frames = 0;
|
|
|
|
size_t count = 0;
|
|
|
|
int frame = 0;
|
|
|
|
bool playing = false;
|
|
|
|
|
|
|
|
void step(sf::Sprite& sprite, int rect_x, int rect_y, int rect_w, int rect_h);
|
|
|
|
|
|
|
|
void play();
|
|
|
|
};
|