mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
refactor(addons): drop dead embed code and duplicate offsets
- Stop writing DefaultState on the embedded entry: the entry constructor (0x5205b9) already stores 1, and the enable-resolver hook forces it on. - Ask the original exists check for the dev marker instead of reading and freeing the whole file. - Remove FUN_STORM_SMEMALLOC/SMEMFREE, which duplicated FUN_STORM_SMEM_ALLOC/FREE; Event::Custom uses the main names.
This commit is contained in:
@@ -92,13 +92,13 @@ char *SStrDup(const char *s) {
|
||||
void *SMemAlloc(unsigned size) {
|
||||
using SMemAlloc_t = void *(__stdcall *)(unsigned size, const char *file,
|
||||
int line, int flags);
|
||||
auto fn = reinterpret_cast<SMemAlloc_t>(Offsets::FUN_STORM_SMEMALLOC);
|
||||
auto fn = reinterpret_cast<SMemAlloc_t>(Offsets::FUN_STORM_SMEM_ALLOC);
|
||||
return fn(size, __FILE__, __LINE__, 8 /* zero-fill */);
|
||||
}
|
||||
void SMemFree(void *ptr) {
|
||||
using SMemFree_t = int(__stdcall *)(void *ptr, const char *file, int line,
|
||||
int flags);
|
||||
auto fn = reinterpret_cast<SMemFree_t>(Offsets::FUN_STORM_SMEMFREE);
|
||||
auto fn = reinterpret_cast<SMemFree_t>(Offsets::FUN_STORM_SMEM_FREE);
|
||||
fn(ptr, __FILE__, __LINE__, 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user