add some notes about design problems in quickwings
This commit is contained in:
parent
aea5ca958a
commit
42a0d56173
1 changed files with 10 additions and 0 deletions
|
@ -19,6 +19,9 @@
|
|||
#include <chrono>
|
||||
#include <thread>
|
||||
|
||||
// TODO remove all hard coded 'magic' values!
|
||||
|
||||
// TODO - remove global variables
|
||||
const int frame_rate = 60;
|
||||
bool game_over = false;
|
||||
float risky_pos_x;
|
||||
|
@ -38,6 +41,7 @@ struct Background {
|
|||
|
||||
paradiso::Renderer renderer{};
|
||||
|
||||
// TODO no constructors in rule of zero
|
||||
Background() {
|
||||
auto backgroundImage =
|
||||
paradiso::BitmapIO::get().load("background-day.png");
|
||||
|
@ -91,6 +95,8 @@ struct Pipe {
|
|||
|
||||
bool pos_reset = false;
|
||||
|
||||
// TODO no constructors in rule of zero
|
||||
|
||||
Pipe() {
|
||||
auto pipe_image = paradiso::BitmapIO::get().load("pipe-green.png");
|
||||
|
||||
|
@ -115,6 +121,8 @@ struct Pipe {
|
|||
|
||||
void update() {
|
||||
|
||||
// TODO improve state handling
|
||||
|
||||
if (game_over == true) {
|
||||
paused = true;
|
||||
}
|
||||
|
@ -174,6 +182,7 @@ struct Grass {
|
|||
paradiso::Renderer renderer1{};
|
||||
paradiso::Renderer renderer2{};
|
||||
|
||||
// TODO no constructors in rule of zero
|
||||
Grass() {
|
||||
auto grassImage = paradiso::BitmapIO::get().load("base.png");
|
||||
grassLeft = paradiso::Sprite{
|
||||
|
@ -244,6 +253,7 @@ struct QuickWings {
|
|||
|
||||
int collision_counter = 0;
|
||||
|
||||
// TODO no constructors in rule of zero
|
||||
QuickWings() {
|
||||
float scaleh = 0.08f;
|
||||
float scalew = 0.158f;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue