MCPcopy Create free account
hub / github.com/AbyssEngine/AbyssEngineOld / MapEngine

Class MapEngine

src/Abyss/MapEngine/MapEngine.h:12–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10namespace Abyss::MapEngine {
11
12class MapEngine {
13 const int _width{};
14 const int _height{};
15 std::vector<DataTypes::DT1> _dt1s;
16 std::vector<DataTypes::DS1> _ds1s;
17 SDL_Point _cameraPosition{-320, -260};
18
19 struct {
20 std::vector<DataTypes::TileMap> floor{};
21 std::vector<DataTypes::TileMap> wall{};
22 std::vector<DataTypes::TileMap> shadow{};
23 std::vector<DataTypes::TileMap> substitution{};
24 } _layers;
25
26public:
27 MapEngine(int width, int height, std::vector<DataTypes::DT1> dt1s, std::vector<DataTypes::DS1> ds1s);
28 void stampDs1(uint32_t ds1Index, int originX, int originY);
29 void render() const;
30 void setCameraPosition(int x, int y);
31 void getCameraPosition(int &x, int &y) const;
32 void getMapSize(int &width, int &height) const;
33};
34} // namespace Abyss::MapEngine

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected