From 915226cba15a78767647ae37868881a47dd47c10 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 20 Mar 2022 08:42:46 -0400 Subject: added credits title card --- res/title1.png | Bin 0 -> 13298 bytes res/title1.psd | Bin 0 -> 406272 bytes src/consts.h | 2 +- src/renderer.cpp | 5 ++++- 4 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 res/title1.png create mode 100644 res/title1.psd diff --git a/res/title1.png b/res/title1.png new file mode 100644 index 0000000..158e412 Binary files /dev/null and b/res/title1.png differ diff --git a/res/title1.psd b/res/title1.psd new file mode 100644 index 0000000..1cc9b8e Binary files /dev/null and b/res/title1.psd differ diff --git a/src/consts.h b/src/consts.h index b3033ea..feadb46 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 = 2; +constexpr int NUM_TITLES = 3; 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 b6a9b4a..724e297 100644 --- a/src/renderer.cpp +++ b/src/renderer.cpp @@ -114,9 +114,12 @@ 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]); + loadTextureFromFile("../res/title1.png", titles_[1]); SDL_QueryTexture(titles_[1].get(), nullptr, nullptr, &titleWidths_[1], &titleHeights_[1]); + loadTextureFromFile("../res/title3.png", titles_[2]); + SDL_QueryTexture(titles_[2].get(), nullptr, nullptr, &titleWidths_[2], &titleHeights_[2]); + font_ = font_ptr(TTF_OpenFont("../res/softsquare.ttf", 45)); if (!font_) { throw ttf_error(); -- cgit 1.4.1