summary refs log tree commit diff stats
path: root/src/sprite.h
blob: c45e208c4022d95409150b347ea34c866c4d752c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef SPRITE_H_70503825
#define SPRITE_H_70503825

#include <string_view>
#include "renderer.h"
#include "vector.h"

class Sprite {
public:

  Sprite(std::string_view filename, Renderer& renderer);

  int getTextureId() const {
    return textureId_;
  }

  const vec2i& loc() const { return loc_; }

  vec2i& loc() { return loc_; }

  const vec2i& size() const { return size_; }

  vec2i& size() { return size_; }

private:

  int textureId_;
  vec2i loc_ { 0, 0 };
  vec2i size_ { 17*4, 27 * 4 };
};

#endif /* end of include guard: SPRITE_H_70503825 */