Replace "short" with "int16_t" and fix missing headers

This commit is contained in:
GravisZro
2024-05-23 23:27:12 -04:00
parent aebe1bbbb6
commit 5e5e0c99c3
248 changed files with 5431 additions and 5423 deletions

View File

@@ -40,7 +40,7 @@ DLLEXPORT void STDCALL ShutdownDLL(void);
DLLEXPORT int STDCALL GetGOScriptID(const char *name, uint8_t is_door);
DLLEXPORT void STDCALLPTR CreateInstance(int id);
DLLEXPORT void STDCALL DestroyInstance(int id, void *ptr);
DLLEXPORT short STDCALL CallInstanceEvent(int id, void *ptr, int event, tOSIRISEventInfo *data);
DLLEXPORT int16_t STDCALL CallInstanceEvent(int id, void *ptr, int event, tOSIRISEventInfo *data);
DLLEXPORT int STDCALL GetTriggerScriptID(int trigger_room, int trigger_face);
DLLEXPORT int STDCALL GetCOScriptList(int **list, int **id_list);
DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state);
@@ -61,12 +61,12 @@ class BaseScript {
public:
BaseScript();
~BaseScript();
virtual short CallEvent(int event, tOSIRISEventInfo *data);
virtual int16_t CallEvent(int event, tOSIRISEventInfo *data);
};
class LevelScript_0000 : public BaseScript {
public:
short CallEvent(int event, tOSIRISEventInfo *data);
int16_t CallEvent(int event, tOSIRISEventInfo *data);
};
// ======================
@@ -456,7 +456,7 @@ void STDCALL DestroyInstance(int id, void *ptr) {
// ===================
// CallInstanceEvent()
// ===================
short STDCALL CallInstanceEvent(int id, void *ptr, int event, tOSIRISEventInfo *data) {
int16_t STDCALL CallInstanceEvent(int id, void *ptr, int event, tOSIRISEventInfo *data) {
switch (id) {
case ID_LEVEL_0000:
return ((BaseScript *)ptr)->CallEvent(event, data);
@@ -499,12 +499,12 @@ BaseScript::BaseScript() {}
BaseScript::~BaseScript() {}
short BaseScript::CallEvent(int event, tOSIRISEventInfo *data) {
int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) {
mprintf(0, "BaseScript::CallEvent()\n");
return CONTINUE_CHAIN | CONTINUE_DEFAULT;
}
short LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) {
int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) {
switch (event) {
case EVT_SAVESTATE: {
tOSIRISEVTSAVESTATE *event_data = &data->evt_savestate;