The NEW Pong Game V13.2.1
An interesting implemnettaion of the pong game
Loading...
Searching...
No Matches
SaveState Struct Reference

Structure representing the complete game state for saving/loading. More...

#include <game_save.hpp>

Public Attributes

int ball_type
 
float ball_vel_x
 
float ball_vel_y
 
float ball_x
 
float ball_y
 
float paddle1_y
 
float paddle2_y
 
char player1_name [20]
 
char player2_name [20]
 
int score1
 
int score2
 

Detailed Description

Structure representing the complete game state for saving/loading.

Contains all data required to reconstruct the state of a game session when loading a saved game.

Member Data Documentation

◆ ball_type

int SaveState::ball_type

Ball type (0=classic, 1=square, 2=triangle)

◆ ball_vel_x

float SaveState::ball_vel_x

Ball's x velocity

◆ ball_vel_y

float SaveState::ball_vel_y

Ball's y velocity

◆ ball_x

float SaveState::ball_x

Ball's x position

◆ ball_y

float SaveState::ball_y

Ball's y position

◆ paddle1_y

float SaveState::paddle1_y

Position of paddle 1 (only y-coordinate since x is fixed)

◆ paddle2_y

float SaveState::paddle2_y

Position of paddle 2 (only y-coordinate since x is fixed)

◆ player1_name

char SaveState::player1_name[20]

Player 1's name

◆ player2_name

char SaveState::player2_name[20]

Player 2's name

◆ score1

int SaveState::score1

Player 1's score

◆ score2

int SaveState::score2

Player 2's score


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