#ifndef LEVEL_H_678CFCCF #define LEVEL_H_678CFCCF #include #include "renderer.h" #include "vector.h" #include "consts.h" #include "tileset.h" class Level { public: Level() { size_ = LEVEL_SIZE; tiles_.resize(size_.w() * size_.h()); } const vec2s& getSize() const { return size_; } size_t at(vec2s pos) const { return at(pos.x(), pos.y()); } size_t at(size_t x, size_t y) const { return tiles_.at(x + size_.w() * y); } const Tileset& getTileset() const { return tileset_; } texture_ptr render(SDL_Renderer* ren, Layer layer) const; private: vec2s size_; std::vector tiles_; Tileset tileset_; }; #endif /* end of include guard: LEVEL_H_678CFCCF */