Add script to script call support. Add exception to catch out of bound index data when added to TriangleMeshBuilder.
diff --git a/rsContext.h b/rsContext.h
index b56e7d7..3570e10 100644
--- a/rsContext.h
+++ b/rsContext.h
@@ -99,6 +99,7 @@
uint32_t getMessageToClient(void *data, size_t *receiveLen, size_t bufferLen, bool wait);
bool sendMessageToClient(void *data, uint32_t cmdID, size_t len, bool waitForSpace);
+ bool runScript(Script *s, uint32_t launchID);
void initToClient();
void deinitToClient();
@@ -212,7 +213,6 @@
void initEGL();
- bool runScript(Script *s, uint32_t launchID);
bool runRootScript();
static void * threadProc(void *);
diff --git a/rsScriptC_Lib.cpp b/rsScriptC_Lib.cpp
index 9a96290..436f48b 100644
--- a/rsScriptC_Lib.cpp
+++ b/rsScriptC_Lib.cpp
@@ -1008,6 +1008,13 @@
return rsc->sendMessageToClient(data, cmdID, len, waitForSpace != 0);
}
+static void SC_scriptCall(int scriptID)
+{
+ GET_TLS();
+ rsc->runScript((Script *)scriptID, 0);
+}
+
+
//////////////////////////////////////////////////////////////////////////////
// Class implementation
//////////////////////////////////////////////////////////////////////////////
@@ -1289,6 +1296,9 @@
{ "debugHexI32", (void *)&SC_debugHexI32,
"void", "(void *, int)" },
+ { "scriptCall", (void *)&SC_scriptCall,
+ "void", "(int)" },
+
{ NULL, NULL, NULL, NULL }
};