Add comments to states.

This commit is contained in:
J-D-K
2025-10-30 13:34:03 -04:00
parent 17410fd8a9
commit ec2417d068
32 changed files with 226 additions and 34 deletions

View File

@@ -6,6 +6,8 @@
#include "input.hpp"
#include "strings/strings.hpp"
// ---- Construction ----
MessageState::MessageState(std::string_view message)
: m_message(message)
, m_transition(0, 0, 32, 32, 0, 0, 720, 256, ui::Transition::DEFAULT_THRESHOLD)
@@ -14,6 +16,8 @@ MessageState::MessageState(std::string_view message)
sm_dialogPop->play();
}
// ---- Public functions ----
void MessageState::update()
{
m_transition.update();
@@ -43,6 +47,8 @@ void MessageState::render()
sdl::text::render(sdl::Texture::Null, sm_okX, y + 214, 22, sdl::text::NO_WRAP, colors::WHITE, sm_okText);
}
// ---- Private functions ----
void MessageState::initialize_static_members()
{
static constexpr int HALF_WIDTH = 640;