-
Notifications
You must be signed in to change notification settings - Fork 218
Expand file tree
/
Copy pathModAPI.hpp
More file actions
70 lines (55 loc) · 1.72 KB
/
ModAPI.hpp
File metadata and controls
70 lines (55 loc) · 1.72 KB
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
62
63
64
65
66
67
68
69
70
#ifndef MOD_API_H
#define MOD_API_H
#define PLAYER_COUNT (0x10)
extern char playerNames[PLAYER_COUNT][0x20];
extern byte playerCount;
#if RETRO_USE_MOD_LOADER
#include <string>
#include <map>
#include <unordered_map>
#include <tinyxml2.h>
struct ModInfo {
std::string name;
std::string desc;
std::string author;
std::string version;
std::map<std::string, std::string> fileMap;
std::string folder;
bool useScripts;
bool skipStartMenu;
int disableFocusPause;
bool redirectSave;
std::string savePath;
bool forceSonic1;
bool active;
};
extern std::vector<ModInfo> modList;
extern int activeMod;
extern char modsPath[0x100];
extern bool redirectSave;
extern char modTypeNames[OBJECT_COUNT][0x40];
extern char modScriptPaths[OBJECT_COUNT][0x40];
extern byte modScriptFlags[OBJECT_COUNT];
extern byte modObjCount;
inline void SetActiveMod(int id) { activeMod = id; }
void InitMods();
bool LoadMod(ModInfo *info, std::string modsPath, std::string folder, bool active);
void ScanModFolder(ModInfo *info);
void SaveMods();
void OpenModMenu();
void RefreshEngine();
void GetModCount();
void GetModName(int *textMenu, int *highlight, uint *id, int *unused);
void GetModDescription(int *textMenu, int *highlight, uint *id, int *unused);
void GetModAuthor(int *textMenu, int *highlight, uint *id, int *unused);
void GetModVersion(int *textMenu, int *highlight, uint *id, int *unused);
void GetModID(int *unused, const char *modFolder);
void GetModActive(uint *id, int *unused);
void SetModActive(uint *id, int *active);
void MoveMod(uint *id, int *up);
#endif
#if RETRO_USE_MOD_LOADER || !RETRO_USE_ORIGINAL_CODE
extern char savePath[0x100];
int GetSceneID(byte listID, const char *sceneName);
#endif
#endif