From 5c92093bd82b54e79c63937cb0dbefabc5f47624 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 19 Mar 2022 17:22:29 -0400 Subject: added title screen --- src/consts.h | 2 +- src/renderer.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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; constexpr int CHUNK_WIDTH = 80; constexpr int CHUNK_HEIGHT = 80; constexpr int RADIUS = 8; -constexpr int NUM_TITLES = 1; +constexpr int NUM_TITLES = 2; constexpr int MESSAGE_MARGIN = 64; constexpr int MESSAGE_TEXT_WIDTH = GAME_WIDTH - MESSAGE_MARGIN * 2; constexpr 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() loadTextureFromFile("../res/title0.png", titles_[0]); SDL_QueryTexture(titles_[0].get(), nullptr, nullptr, &titleWidths_[0], &titleHeights_[0]); + loadTextureFromFile("../res/title3.png", titles_[1]); + SDL_QueryTexture(titles_[1].get(), nullptr, nullptr, &titleWidths_[1], &titleHeights_[1]); + font_ = font_ptr(TTF_OpenFont("../res/softsquare.ttf", 45)); if (!font_) { throw ttf_error(); -- cgit 1.4.1