Files
onionHEN/source/util/include/cheats/cheat_engine_internal.h
T
Hexwell 793719abf4 refactor(cheats): C++ service/parsers and remove RELOAD index cache
Move util cheats orchestration to C++ (CheatService, Repository, Applier,
IMemoryBackend, ICheatParser factory for json/shn/mc4 with ShnExt C adapter).
Drop the obsolete RELOAD_CHEATS UI/IPC path; reloads use file-signature hot
reload only. Document util cheats architecture under docs/util_arch.
2026-07-10 14:06:42 +08:00

37 lines
1.4 KiB
C

#pragma once
#include <stddef.h>
#include <stdint.h>
#include "cheats/cheat_engine.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Shared C helpers for C++ parsers + ShnExt. Keep small; no orchestration. */
const char *orion_cheat_skip_ws(const char *p, const char *end);
const char *orion_cheat_find_key(const char *start, const char *end,
const char *key);
const char *orion_cheat_find_matching(const char *start, const char *end,
char open_ch, char close_ch);
int orion_cheat_extract_string(const char *start, const char *end,
const char *key, char *out, size_t out_size);
int orion_cheat_extract_scalar(const char *start, const char *end,
const char *key, char *out, size_t out_size);
int orion_cheat_hex_decode(const char *hex, uint8_t *out, size_t max_len,
size_t *out_len);
char *orion_cheat_load_file_buffer(const char *path, long *size_out);
void orion_cheat_replace_all(char *text, size_t cap, const char *from,
const char *to);
void orion_cheat_secure_zero(void *ptr, size_t len);
/** ShnExt (deflate + AES + cJSON + optional keystone). Adapter: ShnExtCheatParser. */
int orion_cheat_parse_shnext_buffer(const char *data, size_t size,
orion_cheat_file_t *out);
#ifdef __cplusplus
}
#endif