![]() |
The NEW Pong Game V13.2.1
An interesting implemnettaion of the pong game
|
Utility class for managing save game and high score functionality. More...
#include <game_save.hpp>
Static Public Member Functions | |
| static void | delete_highscore () |
| Deletes the high score file. | |
| static void | delete_save () |
| Deletes the save game file. | |
| static bool | highscore_exists () |
| Checks if a high score file exists. | |
| static bool | load_game (SaveState &state) |
| Loads a game state from file. | |
| static bool | load_highscore (HighScore &score) |
| Loads high score data from file. | |
| static bool | save_exists () |
| Checks if a save file exists. | |
| static bool | save_game (const SaveState &state) |
| Saves the current game state to a file. | |
| static bool | save_highscore (const HighScore &score) |
| Saves a high score to a file. | |
Utility class for managing save game and high score functionality.
This class handles saving and loading game states and high scores, including file operations and data encoding/decoding.
|
static |
Deletes the high score file.
|
static |
Deletes the save game file.
|
static |
Checks if a high score file exists.
|
static |
Loads a game state from file.
| state | SaveState structure to populate with the loaded data |
Reads and decodes the saved game state from the save file
| state | SaveState structure to populate with the loaded data |
|
static |
Loads high score data from file.
| score | HighScore structure to populate with the loaded data |
Reads and decodes the latest high score from the high score file
| score | HighScore structure to populate with the loaded data |
|
static |
Checks if a save file exists.
|
static |
Saves the current game state to a file.
| state | SaveState structure containing the game state to save |
Creates or overwrites the save file with the current game state in binary format after encoding
| state | SaveState structure containing the game state to save |
|
static |
Saves a high score to a file.
Saves the current high score to a file.
| score | HighScore structure containing the score data to save |
Appends the high score to the file in binary format after encoding
| score | HighScore structure containing the score data to save |