summary refs log tree commit diff stats
path: root/src/sprite.h
blob: d868bdb61020f6318b2ae4f41e8d73b3a0f3ab51 (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
33
34
35
36
37
#ifndef SPRITE_H_70503825
#define SPRITE_H_70503825

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

class Sprite {
public:

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

  int getTextureId() const {
    return textureId_;
  }

  int getX() { return x_; }

  void setX(int x) { x_ = x; }

  void setY(int y) { y_ = y; }

  int getY() { return y_; }

  int getWidth() { return width_; }

  int getHeight() { return height_; }

private:

  int textureId_;
  int x_ = 0;
  int y_ = 0;
  int width_ = 17*4;
  int height_ = 27*4;
};

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