1 // Copyright 2015-2018 the openage authors. See copying.md for legal info. 2 3 #pragma once 4 5 #include <SDL2/SDL.h> 6 #include <unordered_map> 7 #include <unordered_set> 8 #include <vector> 9 10 #include "coord/tile.h" 11 #include "handlers.h" 12 #include "options.h" 13 14 namespace openage { 15 16 class Engine; 17 class GameMain; 18 19 /** 20 * Options for the renderer. 21 * These will be included in the user interface 22 * via reflection, so adding new members will 23 * always be visible 24 * 25 * TODO include fog drawing etc 26 */ 27 class RenderOptions : public options::OptionNode { 28 public: 29 RenderOptions(); 30 31 options::Var<bool> draw_debug; 32 options::Var<bool> terrain_blending; 33 }; 34 35 /** 36 * renders the editor and action views 37 * 38 */ 39 class GameRenderer : DrawHandler { 40 public: 41 GameRenderer(Engine *e); 42 ~GameRenderer(); 43 44 bool on_draw() override; 45 46 /** 47 * the game this renderer is using 48 */ 49 GameMain *game() const; 50 51 /** 52 * GameSpec used by this renderer 53 */ 54 GameSpec *game_spec() const; 55 56 Texture *gaben; 57 58 RenderOptions settings; 59 60 private: 61 Engine *engine; 62 63 }; 64 65 } // openage 66