2025-01-08 23:52:39 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
2025-01-11 23:51:50 +03:00
|
|
|
#include <stdbool.h>
|
2025-01-08 23:52:39 +03:00
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
|
|
#include "utils.h"
|
|
|
|
|
|
|
|
|
|
struct ModSearchResult {
|
|
|
|
|
size_t symbol_offset;
|
|
|
|
|
uint32_t mod_id;
|
|
|
|
|
Bytefile *mod_file; // = NULL => not found
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
void mod_add_search_path(const char *path);
|
|
|
|
|
|
2025-01-11 23:51:50 +03:00
|
|
|
const char *mod_get_name(uint32_t id);
|
|
|
|
|
|
2025-01-08 23:52:39 +03:00
|
|
|
Bytefile *mod_get(uint32_t id);
|
|
|
|
|
|
|
|
|
|
int32_t find_mod_loaded(const char *name); // < 0 => not found
|
|
|
|
|
|
2025-01-11 23:51:50 +03:00
|
|
|
int32_t mod_load(const char *name, bool do_verification); // < 0 => not found
|
2025-01-08 23:52:39 +03:00
|
|
|
|
2025-01-11 23:51:50 +03:00
|
|
|
uint32_t mod_add(Bytefile *module, bool do_verification);
|
2025-01-08 23:52:39 +03:00
|
|
|
|
|
|
|
|
struct ModSearchResult mod_search_pub_symbol(const char *name);
|