Refactor code for invoke_lua_source and world.init. Also, add compile_commands.json to luprex

This commit is contained in:
2025-06-16 19:58:26 -04:00
parent f150b14d30
commit 80ff7d7d92
14 changed files with 279 additions and 331 deletions

View File

@@ -28,6 +28,7 @@ enum class AccessKind {
INVOKE_TICK,
INVOKE_LUA_SOURCE,
PROBE_LUA_CALL,
CONNECT_TO_SERVER,
};
class DrivenEngine;
@@ -154,15 +155,11 @@ struct EngineWrapper {
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
// Create the driven engine. argc and argv allow you to specify what
// kind of engine you want. You must pass in the initial state of the lua
// source, if you have any. You may optionally also specify a replay log.
// If you don't want to create a replay log, pass a null pointer.
// Create the driven engine. You must specify the type of engine you
// want (typically 'lpxserver' or 'lpxclient'), and a filename for the
// logfile.
//
// Check to see if the error buffer contains a message after calling
// this function.
//
void (*play_initialize)(EngineWrapper *w, uint32_t argc, char **argv, uint32_t srcpklen, const char *srcpk, const char *logfn);
void (*play_initialize)(EngineWrapper *w, const char *engtype, const char *logfn);
// Clear the list of recently-opened channels. You are meant to fetch
// new outgoing channels using get_new_outgoing, then you call