Add types.h, standardize integer types on stdint
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#ifndef _AKGL_GAME_H_
|
||||
#define _AKGL_GAME_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include "types.h"
|
||||
#include <SDL3_mixer/SDL_mixer.h>
|
||||
#include "tilemap.h"
|
||||
|
||||
@@ -13,32 +15,31 @@
|
||||
/* ==================== GAME STATE VARIABLES =================== */
|
||||
|
||||
typedef struct {
|
||||
float w;
|
||||
float h;
|
||||
SDL_Texture *texture;
|
||||
float32_t w;
|
||||
float32_t h;
|
||||
SDL_Texture *texture;
|
||||
} akgl_Frame;
|
||||
|
||||
typedef struct {
|
||||
int flags;
|
||||
int32_t flags;
|
||||
} akgl_GameState;
|
||||
|
||||
typedef struct {
|
||||
char name[256];
|
||||
char version[32];
|
||||
char uri[256];
|
||||
int screenwidth;
|
||||
int screenheight;
|
||||
int16_t screenwidth;
|
||||
int16_t screenheight;
|
||||
akgl_GameState state;
|
||||
int fps;
|
||||
int16_t fps;
|
||||
SDL_Time gameStartTime;
|
||||
SDL_Time lastIterTime;
|
||||
SDL_Time lastFPSTime;
|
||||
int framesSinceUpdate;
|
||||
int16_t framesSinceUpdate;
|
||||
MIX_Mixer *mixer;
|
||||
MIX_Track *tracks[AKGL_GAME_AUDIO_MAX_TRACKS];
|
||||
} akgl_Game;
|
||||
|
||||
|
||||
extern SDL_Window *window;
|
||||
extern SDL_Renderer *renderer;
|
||||
extern akgl_Tilemap gamemap;
|
||||
@@ -53,5 +54,7 @@ extern akgl_Game game;
|
||||
|
||||
akerr_ErrorContext AKERR_NOIGNORE *akgl_game_init();
|
||||
void akgl_game_updateFPS();
|
||||
akerr_ErrorContext AKERR_NOIGNORE *akgl_game_save(char *fpath);
|
||||
akerr_ErrorContext AKERR_NOIGNORE *akgl_game_load(char *fpath);
|
||||
|
||||
#endif //_AKGL_GAME_H_
|
||||
|
||||
Reference in New Issue
Block a user