2024-11-29 13:45:03 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
|
|
#include "utils.h"
|
|
|
|
|
|
|
|
|
|
struct ModSearchResult {
|
2024-11-29 23:11:46 +03:00
|
|
|
size_t symbol_offset;
|
2024-11-29 13:45:03 +03:00
|
|
|
uint32_t mod_id;
|
2024-11-29 23:11:46 +03:00
|
|
|
bytefile *mod_file; // = NULL => not found
|
2024-11-29 13:45:03 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
void mod_add_search_path(const char *path);
|
|
|
|
|
|
|
|
|
|
bytefile *mod_get(uint32_t id);
|
|
|
|
|
|
|
|
|
|
int32_t mod_load(const char *name); // < 0 => not found
|
|
|
|
|
|
2024-11-29 23:11:46 +03:00
|
|
|
uint32_t mod_add(bytefile *module);
|
|
|
|
|
|
2024-11-29 13:45:03 +03:00
|
|
|
struct ModSearchResult mod_search_pub_symbol(const char *name);
|