Hopefully last commit
This commit is contained in:
33
util/gamestate.h
Normal file
33
util/gamestate.h
Normal file
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// Created by bruno on 11.6.2025.
|
||||
//
|
||||
|
||||
#ifndef FACTORYGAME_GAMESTATE_H
|
||||
#define FACTORYGAME_GAMESTATE_H
|
||||
|
||||
|
||||
#include "../tiles/tile.h"
|
||||
#include "../player/player.h"
|
||||
#include "audio.h"
|
||||
#include "../entity/entity.h"
|
||||
|
||||
typedef struct GameState {
|
||||
Player player;
|
||||
Tile tileMap[MAP_HEIGHT][MAP_WIDTH];
|
||||
BackgroundTile backgroundTileMap[MAP_HEIGHT][MAP_WIDTH];
|
||||
AudioData audioData;
|
||||
TileArray neededUpdates;
|
||||
EntityArray entities;
|
||||
Node openList[MAX_OPEN_NODES];
|
||||
int openCount;
|
||||
MiniRect enemySpawn;
|
||||
} GameState;
|
||||
|
||||
int loadGameState(char *filename, Player *plr);
|
||||
|
||||
void saveGameState(char *filename, Player *plr);
|
||||
|
||||
extern GameState gameState;
|
||||
extern char *autosaveName;
|
||||
|
||||
#endif //FACTORYGAME_GAMESTATE_H
|
Reference in New Issue
Block a user