summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2022-03-19 17:22:29 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2022-03-19 17:22:29 -0400
commit5c92093bd82b54e79c63937cb0dbefabc5f47624 (patch)
treebc922c60d48fc4b04e7bb524221d495403ac90c6 /src
parent669879f081a95335622f362b300e2e869e1046b3 (diff)
downloadether-5c92093bd82b54e79c63937cb0dbefabc5f47624.tar.gz
ether-5c92093bd82b54e79c63937cb0dbefabc5f47624.tar.bz2
ether-5c92093bd82b54e79c63937cb0dbefabc5f47624.zip
added title screen
Diffstat (limited to 'src')
-rw-r--r--src/consts.h2
-rw-r--r--src/renderer.cpp3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/consts.h b/src/consts.h index 4c69a58..b3033ea 100644 --- a/src/consts.h +++ b/src/consts.h
@@ -11,7 +11,7 @@ constexpr int ZOOM_Y_FACTOR = 9;
11constexpr int CHUNK_WIDTH = 80; 11constexpr int CHUNK_WIDTH = 80;
12constexpr int CHUNK_HEIGHT = 80; 12constexpr int CHUNK_HEIGHT = 80;
13constexpr int RADIUS = 8; 13constexpr int RADIUS = 8;
14constexpr int NUM_TITLES = 1; 14constexpr int NUM_TITLES = 2;
15constexpr int MESSAGE_MARGIN = 64; 15constexpr int MESSAGE_MARGIN = 64;
16constexpr int MESSAGE_TEXT_WIDTH = GAME_WIDTH - MESSAGE_MARGIN * 2; 16constexpr int MESSAGE_TEXT_WIDTH = GAME_WIDTH - MESSAGE_MARGIN * 2;
17constexpr int CHARS_PER_BEEP = 8; 17constexpr int CHARS_PER_BEEP = 8;
diff --git a/src/renderer.cpp b/src/renderer.cpp index 1aa5cbf..b24ddbf 100644 --- a/src/renderer.cpp +++ b/src/renderer.cpp
@@ -114,6 +114,9 @@ Renderer::Renderer()
114 loadTextureFromFile("../res/title0.png", titles_[0]); 114 loadTextureFromFile("../res/title0.png", titles_[0]);
115 SDL_QueryTexture(titles_[0].get(), nullptr, nullptr, &titleWidths_[0], &titleHeights_[0]); 115 SDL_QueryTexture(titles_[0].get(), nullptr, nullptr, &titleWidths_[0], &titleHeights_[0]);
116 116
117 loadTextureFromFile("../res/title3.png", titles_[1]);
118 SDL_QueryTexture(titles_[1].get(), nullptr, nullptr, &titleWidths_[1], &titleHeights_[1]);
119
117 font_ = font_ptr(TTF_OpenFont("../res/softsquare.ttf", 45)); 120 font_ = font_ptr(TTF_OpenFont("../res/softsquare.ttf", 45));
118 if (!font_) { 121 if (!font_) {
119 throw ttf_error(); 122 throw ttf_error();