MXVK Vulkan Framework 0.35.0
C++20 Vulkan rendering framework for practical 2D and 3D application development with SDL3.
Loading...
Searching...
No Matches
GameData Struct Reference

Public Member Functions

void addline ()
 GameData ()
void newgame ()

Public Attributes

int lineamt
int lines
unsigned long score
int speed

Detailed Description

Definition at line 40 of file acid.drop.cpp.

Constructor & Destructor Documentation

◆ GameData()

GameData::GameData ( )
inline

Definition at line 46 of file acid.drop.cpp.

46{ newgame(); }
void newgame()
Definition acid.drop.cpp:47

Member Function Documentation

◆ addline()

void GameData::addline ( )
inline

Definition at line 53 of file acid.drop.cpp.

53 {
54 lines++;
55 score += 6;
56 lineamt++;
57 if (lineamt >= 10) {
58 lineamt = 0;
59 speed = std::max(5, speed - 4);
60 }
61 }
int lineamt
Definition acid.drop.cpp:44
unsigned long score
Definition acid.drop.cpp:41

◆ newgame()

void GameData::newgame ( )
inline

Definition at line 47 of file acid.drop.cpp.

47 {
48 score = 0;
49 lines = 0;
50 speed = 20;
51 lineamt = 0;
52 }

Member Data Documentation

◆ lineamt

int GameData::lineamt

Definition at line 44 of file acid.drop.cpp.

◆ lines

int GameData::lines

Definition at line 42 of file acid.drop.cpp.

◆ score

unsigned long GameData::score

Definition at line 41 of file acid.drop.cpp.

◆ speed

int GameData::speed

Definition at line 43 of file acid.drop.cpp.


The documentation for this struct was generated from the following file: