summary refs log tree commit diff stats
path: root/src/renderer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/renderer.h')
-rw-r--r--src/renderer.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/renderer.h b/src/renderer.h index ca4e607..4d5484c 100644 --- a/src/renderer.h +++ b/src/renderer.h
@@ -5,6 +5,9 @@
5#include <SDL_image.h> 5#include <SDL_image.h>
6#include <stdexcept> 6#include <stdexcept>
7#include <memory> 7#include <memory>
8#include <array>
9#include <string_view>
10#include "consts.h"
8 11
9class Game; 12class Game;
10 13
@@ -117,10 +120,14 @@ public:
117 const Game& game, 120 const Game& game,
118 bool drawDark = true); 121 bool drawDark = true);
119 122
123 void renderTitle(int num, double fade);
124
120 static std::tuple<int, int, int, int> calculateZoomRect(const Game& game); 125 static std::tuple<int, int, int, int> calculateZoomRect(const Game& game);
121 126
122private: 127private:
123 128
129 void loadTextureFromFile(std::string_view path, texture_ptr& texture);
130
124 sdl_wrapper sdl_; 131 sdl_wrapper sdl_;
125 img_wrapper img_; 132 img_wrapper img_;
126 window_ptr win_; 133 window_ptr win_;
@@ -132,6 +139,10 @@ private:
132 texture_ptr playerSheet_; 139 texture_ptr playerSheet_;
133 texture_ptr tileset_; 140 texture_ptr tileset_;
134 texture_ptr lamp_; 141 texture_ptr lamp_;
142
143 std::array<texture_ptr, NUM_TITLES> titles_;
144 std::array<int, NUM_TITLES> titleWidths_;
145 std::array<int, NUM_TITLES> titleHeights_;
135}; 146};
136 147
137#endif /* end of include guard: RENDERER_H_6A58EC30 */ 148#endif /* end of include guard: RENDERER_H_6A58EC30 */