mirror of
https://github.com/kevinbentley/Descent3.git
synced 2026-05-20 12:00:07 -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);
|
||||
@@ -70,47 +70,47 @@ 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);
|
||||
};
|
||||
|
||||
class CustomObjectScript_0804 : public BaseScript {
|
||||
public:
|
||||
short CallEvent(int event, tOSIRISEventInfo *data);
|
||||
int16_t CallEvent(int event, tOSIRISEventInfo *data);
|
||||
};
|
||||
|
||||
class TriggerScript_0002 : public BaseScript {
|
||||
public:
|
||||
short CallEvent(int event, tOSIRISEventInfo *data);
|
||||
int16_t CallEvent(int event, tOSIRISEventInfo *data);
|
||||
};
|
||||
|
||||
class TriggerScript_0004 : public BaseScript {
|
||||
public:
|
||||
short CallEvent(int event, tOSIRISEventInfo *data);
|
||||
int16_t CallEvent(int event, tOSIRISEventInfo *data);
|
||||
};
|
||||
|
||||
class TriggerScript_0003 : public BaseScript {
|
||||
public:
|
||||
short CallEvent(int event, tOSIRISEventInfo *data);
|
||||
int16_t CallEvent(int event, tOSIRISEventInfo *data);
|
||||
};
|
||||
|
||||
class TriggerScript_0007 : public BaseScript {
|
||||
public:
|
||||
short CallEvent(int event, tOSIRISEventInfo *data);
|
||||
int16_t CallEvent(int event, tOSIRISEventInfo *data);
|
||||
};
|
||||
|
||||
class TriggerScript_0006 : public BaseScript {
|
||||
public:
|
||||
short CallEvent(int event, tOSIRISEventInfo *data);
|
||||
int16_t CallEvent(int event, tOSIRISEventInfo *data);
|
||||
};
|
||||
|
||||
class TriggerScript_0005 : public BaseScript {
|
||||
public:
|
||||
short CallEvent(int event, tOSIRISEventInfo *data);
|
||||
int16_t CallEvent(int event, tOSIRISEventInfo *data);
|
||||
};
|
||||
|
||||
// ======================
|
||||
@@ -630,7 +630,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:
|
||||
case ID_CUSTOM_OBJECT_0804:
|
||||
@@ -703,12 +703,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;
|
||||
@@ -903,7 +903,7 @@ short LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) {
|
||||
return CONTINUE_CHAIN | CONTINUE_DEFAULT;
|
||||
}
|
||||
|
||||
short CustomObjectScript_0804::CallEvent(int event, tOSIRISEventInfo *data) {
|
||||
int16_t CustomObjectScript_0804::CallEvent(int event, tOSIRISEventInfo *data) {
|
||||
switch (event) {
|
||||
case EVT_COLLIDE: {
|
||||
tOSIRISEVTCOLLIDE *event_data = &data->evt_collide;
|
||||
@@ -922,7 +922,7 @@ short CustomObjectScript_0804::CallEvent(int event, tOSIRISEventInfo *data) {
|
||||
return CONTINUE_CHAIN | CONTINUE_DEFAULT;
|
||||
}
|
||||
|
||||
short TriggerScript_0002::CallEvent(int event, tOSIRISEventInfo *data) {
|
||||
int16_t TriggerScript_0002::CallEvent(int event, tOSIRISEventInfo *data) {
|
||||
switch (event) {
|
||||
case EVT_COLLIDE: {
|
||||
tOSIRISEVTCOLLIDE *event_data = &data->evt_collide;
|
||||
@@ -942,7 +942,7 @@ short TriggerScript_0002::CallEvent(int event, tOSIRISEventInfo *data) {
|
||||
return CONTINUE_CHAIN | CONTINUE_DEFAULT;
|
||||
}
|
||||
|
||||
short TriggerScript_0004::CallEvent(int event, tOSIRISEventInfo *data) {
|
||||
int16_t TriggerScript_0004::CallEvent(int event, tOSIRISEventInfo *data) {
|
||||
switch (event) {
|
||||
case EVT_COLLIDE: {
|
||||
tOSIRISEVTCOLLIDE *event_data = &data->evt_collide;
|
||||
@@ -967,7 +967,7 @@ short TriggerScript_0004::CallEvent(int event, tOSIRISEventInfo *data) {
|
||||
return CONTINUE_CHAIN | CONTINUE_DEFAULT;
|
||||
}
|
||||
|
||||
short TriggerScript_0003::CallEvent(int event, tOSIRISEventInfo *data) {
|
||||
int16_t TriggerScript_0003::CallEvent(int event, tOSIRISEventInfo *data) {
|
||||
switch (event) {
|
||||
case EVT_COLLIDE: {
|
||||
tOSIRISEVTCOLLIDE *event_data = &data->evt_collide;
|
||||
@@ -992,7 +992,7 @@ short TriggerScript_0003::CallEvent(int event, tOSIRISEventInfo *data) {
|
||||
return CONTINUE_CHAIN | CONTINUE_DEFAULT;
|
||||
}
|
||||
|
||||
short TriggerScript_0007::CallEvent(int event, tOSIRISEventInfo *data) {
|
||||
int16_t TriggerScript_0007::CallEvent(int event, tOSIRISEventInfo *data) {
|
||||
switch (event) {
|
||||
case EVT_COLLIDE: {
|
||||
tOSIRISEVTCOLLIDE *event_data = &data->evt_collide;
|
||||
@@ -1010,7 +1010,7 @@ short TriggerScript_0007::CallEvent(int event, tOSIRISEventInfo *data) {
|
||||
return CONTINUE_CHAIN | CONTINUE_DEFAULT;
|
||||
}
|
||||
|
||||
short TriggerScript_0006::CallEvent(int event, tOSIRISEventInfo *data) {
|
||||
int16_t TriggerScript_0006::CallEvent(int event, tOSIRISEventInfo *data) {
|
||||
switch (event) {
|
||||
case EVT_COLLIDE: {
|
||||
tOSIRISEVTCOLLIDE *event_data = &data->evt_collide;
|
||||
@@ -1028,7 +1028,7 @@ short TriggerScript_0006::CallEvent(int event, tOSIRISEventInfo *data) {
|
||||
return CONTINUE_CHAIN | CONTINUE_DEFAULT;
|
||||
}
|
||||
|
||||
short TriggerScript_0005::CallEvent(int event, tOSIRISEventInfo *data) {
|
||||
int16_t TriggerScript_0005::CallEvent(int event, tOSIRISEventInfo *data) {
|
||||
switch (event) {
|
||||
case EVT_COLLIDE: {
|
||||
tOSIRISEVTCOLLIDE *event_data = &data->evt_collide;
|
||||
|
||||
Reference in New Issue
Block a user