Skip to content

Commit

Permalink
SCUMM HE: Add remote scripts-related kludges
Browse files Browse the repository at this point in the history
Those are the last ones. Now Net stubs must be handled.
  • Loading branch information
Tkachov authored and sev- committed Aug 30, 2016
1 parent 45947f6 commit dd68bf0
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
9 changes: 5 additions & 4 deletions engines/scumm/he/logic/moonbase_logic.cpp
Expand Up @@ -374,14 +374,15 @@ void LogicHEmoonbase::op_ai_clean_up(int op, int numArgs, int32 *args) {

#ifdef USE_SDL_NET
void LogicHEmoonbase::op_net_remote_start_script(int op, int numArgs, int32 *args) {
warning("STUB: op_net_remote_start_script()");
_vm1->_moonbase->_net->remoteStartScript(args[0], args[1], args[2], numArgs - 3, &args[3]);
}

void LogicHEmoonbase::op_net_remote_send_array(int op, int numArgs, int32 *args) {
warning("STUB: op_net_remote_send_array()");
_vm1->_moonbase->_net->remoteSendArray(args[0], args[1], args[2], args[3]);
}

int LogicHEmoonbase::op_net_remote_start_function(int op, int numArgs, int32 *args) {
warning("STUB: op_net_remote_start_function()");
return 1;
return _vm1->_moonbase->_net->remoteStartScriptFunction(args[0], args[1], args[2], args[3], numArgs - 4, &args[4]);
}

int LogicHEmoonbase::op_net_do_init_all(int op, int numArgs, int32 *args) {
Expand Down
13 changes: 13 additions & 0 deletions engines/scumm/he/moonbase/net_main.cpp
Expand Up @@ -158,6 +158,19 @@ bool Net::initUser() {
return false;
}

void Net::remoteStartScript(int typeOfSend, int sendTypeParam, int priority, int argsCount, int32 *args) {
warning("STUB: Net::remoteStartScript(%d, %d, %d, %d, ...)", typeOfSend, sendTypeParam, priority, argsCount); // PN_RemoteStartScriptCommand
}

void Net::remoteSendArray(int typeOfSend, int sendTypeParam, int priority, int arrayIndex) {
warning("STUB: Net::remoteSendArray(%d, %d, %d, %d)", typeOfSend, sendTypeParam, priority, arrayIndex); // PN_RemoteSendArrayCommand
}

int Net::remoteStartScriptFunction(int typeOfSend, int sendTypeParam, int priority, int defaultReturnValue, int argsCount, int32 *args) {
warning("STUB: Net::remoteStartScriptFunction(%d, %d, %d, %d, %d, ...)", typeOfSend, sendTypeParam, priority, defaultReturnValue, argsCount); // PN_RemoteStartScriptFunction
return 0;
}

bool Net::getHostName(char *hostname, int length) {
warning("STUB: Net::getHostName(\"%s\", %d)", hostname, length); // PN_GetHostName
return false;
Expand Down
3 changes: 3 additions & 0 deletions engines/scumm/he/moonbase/net_main.h
Expand Up @@ -59,6 +59,9 @@ class Net {
bool initProvider();
bool initSession();
bool initUser();
void remoteStartScript(int typeOfSend, int sendTypeParam, int priority, int argsCount, int32 *args);
void remoteSendArray(int typeOfSend, int sendTypeParam, int priority, int arrayIndex);
int remoteStartScriptFunction(int typeOfSend, int sendTypeParam, int priority, int defaultReturnValue, int argsCount, int32 *args);

private:

Expand Down

0 comments on commit dd68bf0

Please sign in to comment.