Symphony Of Empires
map.hpp
Go to the documentation of this file.
1 // Eng3D - General purpouse game engine
2 // Copyright (C) 2021, Eng3D contributors
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <https://www.gnu.org/licenses/>.
16 //
17 // ----------------------------------------------------------------------------
18 // Name:
19 // map.hpp
20 //
21 // Abstract:
22 // Does some important stuff.
23 // ----------------------------------------------------------------------------
24 
25 #pragma once
26 
27 #include <memory>
28 #include <vector>
29 #include <glm/vec2.hpp>
30 
31 #include "eng3d/borders.hpp"
32 #include "eng3d/rivers.hpp"
33 #include "eng3d/primitive.hpp"
34 
35 class MapRender;
36 namespace Eng3D {
37  constexpr static auto GLOBE_RADIUS = 100.f;
38 
39  class Texture;
40  class TextureArray;
41  struct Square;
42  class State;
43 
44  class BaseMap {
45  Eng3D::State& s;
46 
47  std::shared_ptr<Eng3D::Texture> water_tex;
48  std::shared_ptr<Eng3D::Texture> wave1;
49  std::shared_ptr<Eng3D::Texture> wave2;
50  std::shared_ptr<Eng3D::Texture> bathymethry;
51  std::unique_ptr<Eng3D::TextureArray> terrain_sheet;
52  std::unique_ptr<Eng3D::Texture> normal_topo;
53  std::unique_ptr<Eng3D::Texture> terrain_map;
54  std::shared_ptr<Eng3D::Texture> noise_tex;
55  std::shared_ptr<Eng3D::Texture> paper_tex;
56  std::shared_ptr<Eng3D::Texture> stripes_tex;
57  Eng3D::Sphere map_sphere;
58  Eng3D::Quad2D map_2d_quad; // Simple 2D quad that fills viewport, used for making the border_sdf
59  std::vector<std::unique_ptr<Eng3D::Square>> map_quads;
60  Eng3D::Rivers rivers;
61  Eng3D::Borders borders;
62  public:
63  BaseMap(Eng3D::State& s, glm::ivec2 size);
64  ~BaseMap();
65  friend MapRender;
66  };
67 }
BaseMap(Eng3D::State &s, glm::ivec2 size)
Definition: map.cpp:35
friend MapRender
Definition: map.hpp:65