forked from thoth-tech/DXBallGame
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgame_data.h
More file actions
40 lines (34 loc) · 924 Bytes
/
game_data.h
File metadata and controls
40 lines (34 loc) · 924 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#pragma once
#include "game_types.h"
#include <vector>
#include <json.h>
struct game_data_struct {
block_data *blocks;
std::vector<powerup_drop_data> current_powerups;
std::vector<ball_data> current_balls;
int remaining_blocks;
int blocks_in_level;
int score = 0;
bool game_start = false;
bool game_over = false;
bool game_won = false;
int current_level = 1;
bool next_level = true;
double multiplierTimer = 0;
double extraBallTimer = 0;
double exitTimer = TIME_ON_TITLE;
int score_multiplier = 1;
double paddle_x;
bool ball_is_held;
json scores;
json score_rows[10];
bool initials_entered = false;
};
extern game_data_struct game_data;
struct initials_entry_struct {
std::string characters[27];
int character1 = 0;
int character2 = 0;
int *current_character = &character1;
};
extern initials_entry_struct initials_entry;