Crate cleo_redux_sdk

Source

Enums§

Directory
HandlerResult
HostId

Constants§

SDK_STRING_MAX_LEN

Functions§

alloc_mem
Allocates a memory chunk with size in bytes. Memory is guaranteed to be zero initialized
free_mem
Frees up the memory chunk allocated with AllocMem
get_cleo_folder
Returns the absolute path to the CLEO directory
get_cleo_version
Returns CLEO Redux version as a string
get_cwd
Returns the absolute path to the current working directory (normally the game directory)
get_directory_path
Returns the absolute path to the CLEO root directory or one of its sub-directories
get_float_param
Reads a floating-point argument
get_host_id
Returns the current host (game) id
get_host_name
Returns a host name The default value matches https://re.cleo.li/docs/en/api.html#host Can be changed with SetHostName
get_int_param
Reads an integer argument (32 or 64 bit depending on target platform)
get_number_of_active_cs_scripts
Get number of active CS scripts
get_number_of_active_js_scripts
Get number of active JS scripts
get_sdk_version
Returns the current SDK version as an integer number.
get_string_param
Reads a string argument
get_symbol_address
Returns a memory address for the given symbol, or 0 if not found
is_end_of_arguments
Is end of arguments reached
log
Prints a new entry to the cleo_redux.log
on_after_scripts
Registers a new callback invoked on each main loop iteration (after scripts are executed)
on_before_scripts
Registers a new callback invoked on each main loop iteration (before scripts are executed)
on_runtime_init
Registers a new callback invoked on each runtime init event (new game, saved game load, or SDK’s RuntimeInit)
on_show_text_box
Registers a new callback invoked on a ShowTextBox function call. Providing a callback shadows built-in ShowTextBox implementation.
register_command
Registers a new callback handler for the command with the given name. Permission token is required for unsafe operations interacting with the user environment (e.g. mem, fs, net)
register_loader
Registers a new loader for files matching a glob pattern
resolve_path
Resolves a path to the absolute path - absolute path gets resolved as is
runtime_init
Initializes or reloads CLEO runtime
runtime_next_tick
Iterates the main loop
set_float_param
Writes the floating-point value
set_host_name
Sets the new host name (accessible in scripts via the HOST constant)
set_int_param
Writes the integer value (32 or 64 bit depending on target platform)
set_string_param
Writes the string value
to_rust_string
trigger_event
Triggers an event with the given name and data
update_compare_flag
Sets the status of the current condition

Type Aliases§

Context
CustomCommand
CustomLoader
OnRuntimeInitCallback
OnShowTextBoxCallback
OnTickCallback
c_char
c_void