-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJson.h
61 lines (51 loc) · 1.31 KB
/
Json.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#ifndef JSON_H
#define JSON_H
#ifdef __APPLE__
#include <dirent.h>
#include <SDL2/SDL.h>
#include <SDL2_image/SDL_image.h>
#else
#include "dirent.h"
#include "SDL.h"
#include "SDL_image.h"
#endif
#include <string>
#include <memory>
#include <curl/curl.h>
#include "lib/rapidjson/document.h"
#include "lib/rapidjson/filestream.h"
#include "Utility.h"
#include "TypeClothing.h"
#include "TypeConsumable.h"
#include "TypeMaterial.h"
#include "TypeWeapon.h"
#include "TypeTile.h"
#include "TypePlayer.h"
#include "TypeInventory.h"
class Json
{
public:
Json(void);
~Json(void);
std::vector<std::shared_ptr<TypeTile> > getTileTypes(void);
std::vector<std::shared_ptr<TypeItem> > getItemTypes(void);
std::vector<std::shared_ptr<TypeInventory> > getInventoryTypes(void);
TypePlayer getPlayerType(void);
SDL_Surface getTileTexture(void);
SDL_Surface getItemTexture(void);
private:
void loadJson(void);
void loadInventories(void);
void loadSettings(void);
void loadTiles(void);
void loadItems(void);
void combineTileTextures(void);
void combineItemTextures(void);
std::vector<std::shared_ptr<TypeTile> > tileTypes;
std::vector<std::shared_ptr<TypeItem> > itemTypes;
std::vector<std::shared_ptr<TypeInventory> > inventoryTypes;
TypePlayer playerType;
SDL_Surface tileTexture;
SDL_Surface itemTexture;
};
#endif