1#ifndef NANOMMO_CLIENT_LOADING_H_
2#define NANOMMO_CLIENT_LOADING_H_
17 static constexpr float kFade = 0.4f;
18 static constexpr float kLift = 1.5f;
25 bool covered()
const {
return stage_ == Stage::kCovered; }
29 return stage_ == Stage::kCovering || stage_ == Stage::kCovered;
36 void Update(
float seconds);
46 enum class Stage { kNone, kCovering, kCovered, kLifting };
48 Stage stage_ = Stage::kNone;
55 const std::string& title,
const std::string& line);
static constexpr float kLift
void Lift()
The land is built, so the cover fades and the fog lifts.
float cover() const
How much of the screen the cover hides, from 0 to 1.
void Cover()
Covers the world from the next frame on.
static constexpr float kFade
In seconds.
bool covering() const
Whether the cover's up, or going up.
void Update(float seconds)
Moves on by the frame's time, once the frame is drawn.
void DrawLoadingScreen(float cover, const std::array< float, 3 > &sky, const std::string &title, const std::string &line)