mirror of
https://github.com/kevinbentley/Descent3.git
synced 2026-04-04 20:00:04 -04:00
Replace "short" with "int16_t" and fix missing headers
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user