MXVK Vulkan Framework 0.24.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 61 of file acid.drop.cpp.

Constructor & Destructor Documentation

◆ GameData()

GameData::GameData ( )
inline

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

67{ newgame(); }
void newgame()
Definition acid.drop.cpp:68

Member Function Documentation

◆ addline()

void GameData::addline ( )
inline

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

74 {
75 lines++;
76 score += 6;
77 lineamt++;
78 if (lineamt >= 10) {
79 lineamt = 0;
80 speed = std::max(5, speed - 4);
81 }
82 }
int lineamt
Definition acid.drop.cpp:65
unsigned long score
Definition acid.drop.cpp:62

◆ newgame()

void GameData::newgame ( )
inline

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

68 {
69 score = 0;
70 lines = 0;
71 speed = 20;
72 lineamt = 0;
73 }

Member Data Documentation

◆ lineamt

int GameData::lineamt

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

◆ lines

int GameData::lines

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

◆ score

unsigned long GameData::score

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

◆ speed

int GameData::speed

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


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