28 #include "engines/wintermute/base/base_scriptable.h" 29 #include "engines/wintermute/base/scriptables/script.h" 30 #include "engines/wintermute/base/scriptables/script_value.h" 31 #include "engines/wintermute/base/scriptables/script_stack.h" 33 #ifndef WINTERMUTE_EXTERNALS_H 34 #define WINTERMUTE_EXTERNALS_H 39 bool EmulateGetURLExternalCalls(BaseGame *, ScStack *, ScStack *, ScScript::TExternalFunction *);
40 bool EmulateToolsExternalCalls(BaseGame *, ScStack *, ScStack *, ScScript::TExternalFunction *);
41 bool EmulateImgExternalCalls(BaseGame *, ScStack *, ScStack *, ScScript::TExternalFunction *);
42 bool EmulateShell32ExternalCalls(BaseGame *, ScStack *, ScStack *, ScScript::TExternalFunction *);
43 bool EmulateInstallUtilExternalCalls(BaseGame *, ScStack *, ScStack *, ScScript::TExternalFunction *);
44 bool EmulateDLLTestExternalCalls(BaseGame *, ScStack *, ScStack *, ScScript::TExternalFunction *);
45 bool EmulateKernel32ExternalCalls(BaseGame *, ScStack *, ScStack *, ScScript::TExternalFunction *);
46 bool EmulateHTTPConnectExternalCalls(BaseGame *, ScStack *, ScStack *, ScScript::TExternalFunction *);
47 bool EmulateRoutineExternalCalls(BaseGame *, ScStack *, ScStack *, ScScript::TExternalFunction *);
48 bool EmulateProtectExternalCalls(BaseGame *, ScStack *, ScStack *, ScScript::TExternalFunction *);
50 bool EmulateExternalCall(BaseGame *inGame, ScStack *stack, ScStack *thisStack, ScScript::TExternalFunction *
function) {
52 if (strcmp(function->dll_name,
"geturl.dll") == 0) {
53 return EmulateGetURLExternalCalls(inGame, stack, thisStack,
function);
56 if (strcmp(function->dll_name,
"tools.dll") == 0) {
57 return EmulateToolsExternalCalls(inGame, stack, thisStack,
function);
60 if (strcmp(function->dll_name,
"img.dll") == 0) {
61 return EmulateImgExternalCalls(inGame, stack, thisStack,
function);
64 if (strcmp(function->dll_name,
"shell32.dll") == 0) {
65 return EmulateShell32ExternalCalls(inGame, stack, thisStack,
function);
68 if (strcmp(function->dll_name,
"installutil.dll") == 0) {
69 return EmulateInstallUtilExternalCalls(inGame, stack, thisStack,
function);
72 if (strcmp(function->dll_name,
"dlltest.dll") == 0) {
73 return EmulateDLLTestExternalCalls(inGame, stack, thisStack,
function);
76 if (strcmp(function->dll_name,
"kernel32.dll") == 0) {
77 return EmulateKernel32ExternalCalls(inGame, stack, thisStack,
function);
80 if (strcmp(function->dll_name,
"httpconnect.dll") == 0) {
81 return EmulateHTTPConnectExternalCalls(inGame, stack, thisStack,
function);
84 if (strcmp(function->dll_name,
"routine.dll") == 0) {
85 return EmulateRoutineExternalCalls(inGame, stack, thisStack,
function);
88 if (strcmp(function->dll_name,
"protect.dll") == 0) {
89 return EmulateProtectExternalCalls(inGame, stack, thisStack,
function);
92 warning(
"External function %s from %s library is not known by ScummVM", function->name, function->dll_name);
void warning(MSVC_PRINTF const char *s,...) GCC_PRINTF(1
Definition: achievements_tables.h:27