summary refs log tree commit diff stats
path: root/src/renderer.h
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2021-02-21 17:56:17 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2021-02-21 17:56:17 -0500
commit5df0d0616ee3996add0b14e0fb0becd6257d04a2 (patch)
tree19bf067462ea04abf500e0427d3daeb3a39434ee /src/renderer.h
parentecbe17b582803aaeaa9ccee88a3d093ff93a6cd3 (diff)
downloadtanetane-5df0d0616ee3996add0b14e0fb0becd6257d04a2.tar.gz
tanetane-5df0d0616ee3996add0b14e0fb0becd6257d04a2.tar.bz2
tanetane-5df0d0616ee3996add0b14e0fb0becd6257d04a2.zip
Added a debug console
Open it by pressing backtick, close it by hitting escape. Pressing backtick does not open it in release builds.

Current shortcomings: opening it for the first time also types a backtick for some reason, but not on subsequent times. Also, it doesn't create a coroutine, so any script function that yields is going to fail.

This also added a "is gameplay paused" flag to Game, which will be useful for adding a pause menu.
Diffstat (limited to 'src/renderer.h')
-rw-r--r--src/renderer.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/renderer.h b/src/renderer.h index 17dc038..489a7ec 100644 --- a/src/renderer.h +++ b/src/renderer.h
@@ -152,6 +152,7 @@ private:
152 texture_ptr renderedTex; 152 texture_ptr renderedTex;
153 std::vector<int> charIndexToWidth; 153 std::vector<int> charIndexToWidth;
154 std::string line; 154 std::string line;
155 std::string overflow;
155 }; 156 };
156 157
157 void renderMessageLine(MessageCache& line, const std::string& text, Game& game); 158 void renderMessageLine(MessageCache& line, const std::string& text, Game& game);
@@ -161,6 +162,11 @@ private:
161 MessageCache speakerHeaderLine_; 162 MessageCache speakerHeaderLine_;
162 int advMsgArrowTex_ = -1; 163 int advMsgArrowTex_ = -1;
163 int choiceArrowTex_ = -1; 164 int choiceArrowTex_ = -1;
165
166 // Debug console
167 texture_ptr debugConsoleTex_;
168 std::string cachedDebugText_;
169 SDL_Rect debugDestRect_;
164}; 170};
165 171
166#endif /* end of include guard: RENDERER_H_6A58EC30 */ 172#endif /* end of include guard: RENDERER_H_6A58EC30 */