Modules
Some checks failed
Build Dusk / build-linux (push) Successful in 1m13s
Build Dusk / build-psp (push) Failing after 1m27s

This commit is contained in:
2025-12-25 08:02:11 +10:00
parent f39b2060a8
commit b16dbaceec
23 changed files with 370 additions and 158 deletions

24
src/script/scriptmodule.h Normal file
View File

@@ -0,0 +1,24 @@
/**
* Copyright (c) 2025 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "scriptcontext.h"
typedef struct scriptmodule_s {
const char_t *name;
void (*callback)(scriptcontext_t *ctx);
} scriptmodule_t;
extern const scriptmodule_t SCRIPT_MODULE_LIST[];
/**
* Retrieves a script module by its name.
*
* @param name The name of the script module.
* @return Pointer to the script module, or NULL if not found.
*/
const scriptmodule_t * scriptModuleGetByName(const char_t *name);