Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-1-2-2013-Decompilation
Path: blob/main/RSDKv4/ModAPI.hpp
817 views
1
#ifndef MOD_API_H
2
#define MOD_API_H
3
4
#define PLAYER_COUNT (0x10)
5
6
extern char playerNames[PLAYER_COUNT][0x20];
7
extern byte playerCount;
8
9
#if RETRO_USE_MOD_LOADER
10
#include <string>
11
#include <map>
12
#include <unordered_map>
13
#include <tinyxml2.h>
14
15
struct ModInfo {
16
std::string name;
17
std::string desc;
18
std::string author;
19
std::string version;
20
std::map<std::string, std::string> fileMap;
21
std::string folder;
22
bool useScripts;
23
bool skipStartMenu;
24
int disableFocusPause;
25
bool redirectSave;
26
std::string savePath;
27
bool forceSonic1;
28
bool active;
29
};
30
31
extern std::vector<ModInfo> modList;
32
extern int activeMod;
33
34
extern char modsPath[0x100];
35
36
extern bool redirectSave;
37
38
extern char modTypeNames[OBJECT_COUNT][0x40];
39
extern char modScriptPaths[OBJECT_COUNT][0x40];
40
extern byte modScriptFlags[OBJECT_COUNT];
41
extern byte modObjCount;
42
43
inline void SetActiveMod(int id) { activeMod = id; }
44
45
void InitMods();
46
bool LoadMod(ModInfo *info, std::string modsPath, std::string folder, bool active);
47
void ScanModFolder(ModInfo *info);
48
void SaveMods();
49
50
void OpenModMenu();
51
52
void RefreshEngine();
53
void GetModCount();
54
void GetModName(int *textMenu, int *highlight, uint *id, int *unused);
55
void GetModDescription(int *textMenu, int *highlight, uint *id, int *unused);
56
void GetModAuthor(int *textMenu, int *highlight, uint *id, int *unused);
57
void GetModVersion(int *textMenu, int *highlight, uint *id, int *unused);
58
void GetModActive(uint *id, int *unused);
59
void SetModActive(uint *id, int *active);
60
void MoveMod(uint *id, int *up);
61
62
#endif
63
64
#if RETRO_USE_MOD_LOADER || !RETRO_USE_ORIGINAL_CODE
65
extern char savePath[0x100];
66
int GetSceneID(byte listID, const char *sceneName);
67
#endif
68
69
#endif
70