31 lines
696 B
C++
31 lines
696 B
C++
#ifndef GAME_DATA_HPP
|
|
#define GAME_DATA_HPP
|
|
|
|
#include <fstream>
|
|
#include "gint/display-cg.h"
|
|
#include "nlohmann/json/json.hpp"
|
|
|
|
using nlohmann::json;
|
|
|
|
extern bopti_image_t player_idle_sheet;
|
|
extern bopti_image_t player_run_sheet;
|
|
|
|
typedef struct texture_t {
|
|
const char *name;
|
|
bopti_image_t *image;
|
|
} texture_t;
|
|
|
|
#define NB_TEXTURES 2
|
|
extern struct texture_t builtin_textures[];
|
|
|
|
typedef struct game_data_t {
|
|
texture_t *textures;
|
|
} game_data_t;
|
|
|
|
void load_json_into_game_data(json *json_input, game_data_t *game_data);
|
|
|
|
void write_game_data_as_bin_into_file(game_data_t *game_data, std::ofstream *bin_output_file);
|
|
|
|
void free_game_data(game_data_t *game_data);
|
|
|
|
#endif // GAME_DATA_HPP
|