diff --git a/.gitignore b/.gitignore index d4518d3b..9fbdef54 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,8 @@ section.cpp *.til *.nam -.vscode \ No newline at end of file +.vscode + +section.ld +section/main.cpp +section/main.cxx \ No newline at end of file diff --git a/config.txt b/config.txt deleted file mode 100644 index 5c78fb91..00000000 --- a/config.txt +++ /dev/null @@ -1,5 +0,0 @@ -oldfile ForgedAlliance_base.exe -newfile ForgedAlliance_exxt.exe -newsect .exxt -sectsize 0x80000 -cflags -pipe -m32 -Os -nostartfiles -w -fpermissive -masm=intel -std=c++20 -march=core2 -mfpmath=both \ No newline at end of file diff --git a/hooks/HFAExtLoad.cpp b/hooks/HFAExtLoad.cpp index 00ce313e..65c61a31 100644 --- a/hooks/HFAExtLoad.cpp +++ b/hooks/HFAExtLoad.cpp @@ -1,13 +1,8 @@ #include "../define.h" asm( - ".section h0; .set h0,0xA8EF63;" - "JMP "QU(FAExtLoad)";" - -#ifdef STARTUP ".section h1; .set h1,0x45A926;" "push eax;" - "call "QU(STARTUP)";" + "call "QU(InitCtors)";" "pop eax;" "ret 8;" -#endif ); \ No newline at end of file diff --git a/hooks/LuaFuncRegs.cpp b/hooks/LuaFuncRegs.cpp deleted file mode 100644 index fcd1e949..00000000 --- a/hooks/LuaFuncRegs.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include "../define.h" -asm( - ".section h0; .set h0,0xC0FA60;" - ".int "QU(LuaFuncsReg)";" -); \ No newline at end of file diff --git a/section/include/CObject.h b/include/CObject.h similarity index 96% rename from section/include/CObject.h rename to include/CObject.h index 14fbb0d4..97433ff9 100644 --- a/section/include/CObject.h +++ b/include/CObject.h @@ -45,7 +45,7 @@ Result GetCScriptObject(lua_State *l, int index) { using CScriptType = typename CScriptClass::Type; using TResult = Result; - void **obj = GetCObject(l, index); + void **obj = reinterpret_cast(GetCObject(l, index)); if (obj == nullptr) { return TResult::Fail(s_ExpectedAGameObject); diff --git a/section/include/LuaAPI.h b/include/LuaAPI.h similarity index 96% rename from section/include/LuaAPI.h rename to include/LuaAPI.h index ce166727..7de799e6 100644 --- a/section/include/LuaAPI.h +++ b/include/LuaAPI.h @@ -1,408 +1,409 @@ -#pragma once - -#include "global.h" - -#define LUA_IDSIZE 60 - -struct lua_Debug { - int event; - const char *name; // (n) - const char *namewhat; // (n) 'global', 'local', 'field', 'method' - const char *what; // (S) 'Lua', 'C', 'main', 'tail' - const char *source; // (S) - int currentline; // (l) - int nups; // (u) number of upvalues - int linedefined; // (S) - char short_src[LUA_IDSIZE]; // (S) - /* private part */ - int i_ci; // active function -}; - -class LuaState; -//lua.org/source/5.0/lstate.h.html#lua_State -typedef struct {uint8_t pad[0x44]; LuaState* LuaState;} lua_State; - -typedef struct luaL_Buffer luaL_Buffer; -typedef const char* (*lua_Chunkreader)(lua_State *L, void *data, size_t *size); -typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar); -typedef void (*userGCFunction)(void*); -typedef int (*lua_CFunction)(lua_State *L); -typedef float lua_Number; - -typedef struct luaL_reg { - const char *name; - lua_CFunction func; -} luaL_reg; - -#define LUA_MULTRET (-1) - -#define LUA_REGISTRYINDEX (-10000) -#define LUA_GLOBALSINDEX (-10001) -#define lua_upvalueindex(i) (LUA_GLOBALSINDEX-(i)) - -#define LUA_OK 0 -#define LUA_ERRRUN 1 -#define LUA_ERRFILE 2 -#define LUA_ERRSYNTAX 3 -#define LUA_ERRMEM 4 -#define LUA_ERRERR 5 - -#define LUA_TNONE (-1) -#define LUA_TNIL 0 -#define LUA_TBOOLEAN 1 -#define LUA_TLIGHTUSERDATA 2 -#define LUA_TNUMBER 3 -#define LUA_TSTRING 4 -#define LUA_TTABLE 5 -#define LUA_CFUNCTION 6 -#define LUA_TFUNCTION 7 -#define LUA_TUSERDATA 8 -#define LUA_TTHREAD 9 -#define LUA_TPROTO 10 -#define LUA_TUPVALUE 11 - -#define LUA_HOOKCALL 0 -#define LUA_HOOKRET 1 -#define LUA_HOOKLINE 2 -#define LUA_HOOKCOUNT 3 -#define LUA_HOOKTAILRET 4 - -#define LUA_MASKCALL (1 << LUA_HOOKCALL) -#define LUA_MASKRET (1 << LUA_HOOKRET) -#define LUA_MASKLINE (1 << LUA_HOOKLINE) -#define LUA_MASKCOUNT (1 << LUA_HOOKCOUNT) - -#define LUA_NOREF (-2) -#define LUA_REFNIL (-1) - -#define lua_boxpointer(L,u) \ - (*(void **)(lua_newuserdata(L, sizeof(void *))) = (u)) -#define lua_unboxpointer(L,i) (*(void **)(lua_touserdata(L, i))) - -#define lua_pop(L,n) lua_settop(L, -(n)-1) - -#define lua_register(L,n,f) \ - (lua_pushstring(L, n), \ - lua_pushcfunction(L, f), \ - lua_settable(L, LUA_GLOBALSINDEX)) - -#define lua_pushcfunction(L,f) lua_pushcclosure(L, f, 0) - -#define lua_isnoneornil(L,n) (lua_type(L,n) <= 0) -#define lua_isnone(L,n) (lua_type(L,n) == LUA_TNONE) -#define lua_isnil(L,n) (lua_type(L,n) == LUA_TNIL) -#define lua_isboolean(L,n) (lua_type(L,n) == LUA_TBOOLEAN) -#define lua_islightuserdata(L,n)(lua_type(L,n) == LUA_TLIGHTUSERDATA) -#define lua_istable(L,n) (lua_type(L,n) == LUA_TTABLE) -#define lua_iscfunction(L,n) (lua_type(L,n) == LUA_CFUNCTION) -#define lua_isfunction(L,n) (lua_type(L,n) == LUA_TFUNCTION) -#define lua_isuserdata(L,n) (lua_type(L,n) == LUA_TUSERDATA) -#define lua_isthread(L,n) (lua_type(L,n) == LUA_TTHREAD) -#define lua_isproto(L,n) (lua_type(L,n) == LUA_TPROTO) -#define lua_isupvalue(L,n) (lua_type(L,n) == LUA_TUPVALUE) - -#define lua_pushliteral(L, s) \ - lua_pushlstring(L, "" s, (sizeof(s)/sizeof(char))-1) - -#define lua_getregistry(L) lua_pushvalue(L, LUA_REGISTRYINDEX) -#define lua_setglobal(L,s) \ - (lua_pushstring(L, s), lua_insert(L, -2), lua_settable(L, LUA_GLOBALSINDEX)) -#define lua_getglobal(L,s) \ - (lua_pushstring(L, s), lua_gettable(L, LUA_GLOBALSINDEX)) - -#define lua_ref(L,lock) ((lock) ? luaL_ref(L, LUA_REGISTRYINDEX) : \ - (lua_pushstring(L, "unlocked references are obsolete"), lua_error(L), 0)) -#define lua_unref(L,ref) luaL_unref(L, LUA_REGISTRYINDEX, (ref)) -#define lua_getref(L,ref) lua_rawgeti(L, LUA_REGISTRYINDEX, ref) - -typedef union { - void *p; - float n; - int b; -} Value; - -//lua.org/source/5.0/lobject.h.html#TObject -typedef struct { - int tt; - Value value; -} TObject; -VALIDATE_SIZE(TObject, 8) - -//namespace gpg - class RRef {public: void* d; void* t;}; - class RType {}; - -//namespace LuaPlus - class LuaState; - - class LuaStackObject { - public: - LuaState* m_state; - int m_stackIndex; - }; - VALIDATE_SIZE(LuaStackObject, 8) - - class LuaObject - {// 0x14 bytes - void __LuaObject() asm("0x9072a0"); - void __LuaObject(LuaState* state) asm("0x908970"); - void __LuaObject(LuaState* state, int index) asm("0x9089c0"); - void __LuaObject(const LuaObject* obj) asm("0x908a40"); - void __LuaObject(const LuaStackObject* stack) asm("0x908a70"); - void __LuaObject(LuaState* state, const TObject* obj) asm("0x9089f0"); - void __DLuaObject() asm("0x9075d0"); - void __Index(LuaObject *out, int key) asm("0x9091e0"); - void __Index(LuaObject *out, const char* key) asm("0x908f60"); - - public: - LuaObject() {__LuaObject();} - LuaObject(LuaState* state) {__LuaObject(state);} - LuaObject(LuaState* state, int index) {__LuaObject(state, index);} - LuaObject(const LuaObject* obj) {__LuaObject(obj);} - LuaObject(const LuaStackObject* stack) {__LuaObject(stack);} - LuaObject(LuaState* state, const TObject* obj) {__LuaObject(state, obj);} - ~LuaObject() {__DLuaObject();} - - LuaObject* operator=(const LuaObject* obj) asm("0x908ab0"); - LuaObject* operator=(const LuaStackObject* stack) asm("0x908b00"); - - LuaObject operator[](int key) { - LuaObject out; __Index(&out, key); return out; - } - LuaObject operator[](const char* key) { - LuaObject out; __Index(&out, key); return out; - } - - bool GetBoolean() asm("0x907c90"); - bool IsBoolean() asm("0x9078d0"); - bool IsConvertibleToString() asm("0x9077c0"); - bool IsFunction() asm("0x907810"); - bool IsInteger() asm("0x907350"); - bool IsNil() asm("0x9072f0"); - bool IsNumber() asm("0x907360"); - bool IsString() asm("0x907370"); - bool IsTable() asm("0x907310"); - bool IsUserData() asm("0x907320"); - void Clone(LuaObject* out) asm("0x90a180"); - void CreateTable(LuaObject* out, const char* key, int narray, int lnhash) asm("0x908c10"); - void CreateTable(LuaObject* out, int key, int narray, int lnhash) asm("0x908ca0"); - void GetByIndex(LuaObject* out, int index) asm("0x908df0"); - void GetByName(LuaObject* out, const char* name) asm("0x90a160"); - void GetByObject(LuaObject* out, const LuaObject* obj) asm("0x908e70"); - void GetMetaTable(LuaObject* out) asm("0x908ba0"); - void Lookup(LuaObject* out, const char* key) asm("0x9093b0"); - void PushStack(LuaStackObject* out, LuaState* state) asm("0x907d80"); - void PushStack(lua_State* L) asm("0x907d10"); - LuaState* GetActiveState() asm("0x9072b0"); - const char* GetString() asm("0x907a90"); - const char* ToString() asm("0x9073e0"); - const char* TypeName() asm("0x908b50"); - lua_Number GetNumber() asm("0x907970"); - lua_Number GetDouble() asm("0x907a30"); - lua_Number ToNumber() asm("0x9073b0"); - void AssignNewUserData(RRef* out, LuaState* state, const RRef* rRef) asm("0x909840"); - void AssignNewUserData(RRef* out, LuaState* state, const RType* rType) asm("0x9097d0"); - void GetUserData(RRef* out) asm("0x907bc0"); - int GetCount() asm("0x907f50"); - int GetInteger() asm("0x907910"); - int GetN() asm("0x907e50"); - int GetTableCount() asm("0x90a410"); - int IsPassed() asm("0x907440"); - int Type() asm("0x9076d0"); - lua_State* GetActiveCState() asm("0x9072c0"); - void AssignBoolean(LuaState* state, bool value) asm("0x909600"); - void AssignInteger(LuaState* state, int value) asm("0x909650"); - void AssignNewTable(LuaState* state, int narray, int lnhash) asm("0x909940"); - void AssignNil(LuaState* state) asm("0x9095c0"); - void AssignNumber(LuaState* state, float value) asm("0x9096a0"); - void AssignString(LuaState* state, const char* value) asm("0x909750"); - void AssignTObject(LuaState* state, const TObject* value) asm("0x9099b0"); - void AssignThread(LuaState* state) asm("0x9096f0"); - void Insert(LuaObject* value) asm("0x909af0"); - void Insert(int key, LuaObject* value) asm("0x909ce0"); - void Register(const char* name, lua_CFunction func, int nupvalues) asm("0x907630"); - void Reset() asm("0x9075f0"); - void SetBoolean(const char* key, bool value) asm("0x9080c0"); - void SetInteger(const char* key, int value) asm("0x9081f0"); - void SetInteger(int key, int value) asm("0x908240"); - void SetMetaTable(const LuaObject* value) asm("0x907e00"); - void SetN(int n) asm("0x907ed0"); - void SetNil(const char* key) asm("0x907fa0"); - void SetNil(int key) asm("0x907ff0"); - void SetNumber(const char* key, float value) asm("0x908320"); - void SetNumber(int key, float value) asm("0x908370"); - void SetObject(const LuaObject* key, const LuaObject* value) asm("0x908810"); - void SetObject(const char* key, const LuaObject* value) asm("0x908760"); - void SetObject(int key, const LuaObject* value) asm("0x9087a0"); - void SetString(const char* key, const char* value) asm("0x908450"); - void SetString(int key, const char* value) asm("0x9084e0"); - void TypeError(const char* msg) asm("0x9072d0"); - - //private - void AddToUsedList(LuaState* state) asm("0x908890"); - void AddToUsedList(LuaState* state, const TObject* obj) asm("0x9088e0"); - void SetTableHelper(const char* key, const TObject* value) asm("0x9074b0"); - - LuaObject* m_next; - LuaObject* m_prev; - LuaState* m_state; - TObject m_object; - }; - VALIDATE_SIZE(LuaObject, 0x14) - - enum StandardLibraries {LIB_NONE, LIB_BASE, LIB_OSIO}; - class LuaState - {// 0x34 bytes - void __LuaState(StandardLibraries libs) asm("0x90ac10"); - void __LuaState(LuaState* parentState) asm("0x90a520"); - void __LuaState(int Unused) asm("0x90a5d0"); - void __DLuaState() asm("0x90a600"); - public: - LuaState(StandardLibraries libs) {__LuaState(libs);}; - LuaState(LuaState* parentState) {__LuaState(parentState);}; - LuaState(int Unused) {__LuaState(Unused);}; - ~LuaState() {__DLuaState();}; - void GetGlobal(LuaObject* out, const char* key) asm("0x4579d0"); - void GetGlobals(LuaObject* out) asm("0x90a690"); - LuaState* GetActiveState() asm("0x90bee0"); - const char* CheckString(int narg) asm("0x912d10"); - int ArgError(int narg, const char* msg) asm("0x90bf70"); - __cdecl int Error(const char* fmt, ...) asm("0x90c1d0"); - lua_State* GetActiveCState() asm("0x90bef0"); - void CheckAny(int narg) asm("0x923f20"); - - //private - void Init(enum StandardLibraries libs) asm("0x90aad0"); - - lua_State* m_state; - void* ForMultipleThreads; - bool m_ownState; - LuaObject m_threadObj; - LuaState* m_rootState; - struct MiniLuaObject { - LuaObject* m_next; // only valid when in free list - LuaObject* m_prev; // only valid when in used list - } m_headObject, m_tailObject; - }; - VALIDATE_SIZE(LuaState, 0x34) - -bool LuaPlusH_next(LuaState*, const LuaObject*, LuaObject*, LuaObject*) asm("0x90a6b0"); -bool lua_toboolean(lua_State*, int) asm("0x90ca40"); -TObject* negindex(lua_State*, int) asm("0x90c340"); -char* luaL_prepbuffer(luaL_Buffer*) asm("0x90e260"); -const char* luaL_checklstring(lua_State*, int, unsigned int*) asm("0x90eaa0"); -const char* luaL_optlstring(lua_State*, int, const char*, unsigned int*) asm("0x90eb10"); -const char* lua_getlocal(lua_State*, const lua_Debug*, int) asm("0x912680"); -const char* lua_getupvalue(lua_State*, int, int) asm("0x90d9a0"); -const char* lua_pushfstring(lua_State*, const char*, ...) asm("0x90ce90"); -const char* lua_pushvfstring(lua_State*, const char*, char*) asm("0x90ce50"); -const char* lua_setlocal(lua_State*, const lua_Debug*, int) asm("0x9126f0"); -const char* lua_setupvalue(lua_State*, int, int) asm("0x90da00"); -const char* lua_tostring(lua_State*, int) asm("0x90ca90"); -const char* lua_typename(lua_State*, int) asm("0x90c780"); -float luaL_checknumber(lua_State*, int) asm("0x90eb70"); -float luaL_optnumber(lua_State*, int, float) asm("0x90ebf0"); -float lua_tonumber(lua_State*, int) asm("0x90c9f0"); -void lua_newuserdata(RRef *ret, lua_State*, const RType*) asm("0x90d7e0"); -void lua_touserdata(RRef *ret, lua_State*, int) asm("0x90cbb0"); -int luaL_argerror(lua_State*, int, const char*) asm("0x90e900"); -int luaL_callmeta(lua_State*, int, const char*) asm("0x90dda0"); -int luaL_error(lua_State*, const char*, ...) asm("0x90dbf0"); -int luaL_findstring(const char*, const char* const list[]) asm("0x90dc20"); -int luaL_getmetafield(lua_State*, int, const char*) asm("0x90dd40"); -int luaL_getn(lua_State*, int) asm("0x90e090"); -int luaL_loadbuffer(lua_State*, const char*, unsigned int, const char*) asm("0x90e760"); -int luaL_loadfile(lua_State*, const char*) asm("0x90e5d0"); -int luaL_newmetatable(lua_State*, const char*) asm("0x90dc70"); -int luaL_typerror(lua_State*, int, const char*) asm("0x90e9a0"); -int lua_checkstack(lua_State*, int) asm("0x90c460"); -int lua_dobuffer(lua_State*, const char*, unsigned int, const char*) asm("0x90e870"); -int lua_dostring(lua_State*, const char*) asm("0x90e8d0"); -int lua_error(lua_State*) asm("0x90d6c0"); -int lua_getgccount(lua_State*) asm("0x90d660"); -int lua_getgcthreshold(lua_State*) asm("0x90d650"); -int lua_gethookcount(lua_State*) asm("0x9125d0"); -int lua_gethookmask(lua_State*) asm("0x9125c0"); -int lua_getinfo(lua_State*, const char*, lua_Debug*) asm("0x9132f0"); -int lua_getmetatable(lua_State*, int) asm("0x90d180"); -int lua_getn(lua_State*, int) asm("0x90ad30"); -int lua_getstack(lua_State*, int, lua_Debug*) asm("0x9125e0"); -int lua_gettop(lua_State*) asm("0x90c590"); -int lua_isnumber(lua_State*, int) asm("0x90c7a0"); -int lua_isstring(lua_State*, int) asm("0x90c800"); -int lua_lessthan(lua_State*, int, int) asm("0x90c980"); -int lua_load(lua_State*, lua_Chunkreader, void*, const char*) asm("0x90d5c0"); -int lua_next(lua_State*, int) asm("0x90d6d0"); -int lua_pcall(lua_State*, int, int) asm("0x90d430"); -int lua_rawequal(lua_State*, int, int) asm("0x90c890"); -int lua_resume(lua_State*, int) asm("0x914610"); -int lua_setfenv(lua_State*, int) asm("0x90d3b0"); -int lua_sethook(lua_State*, lua_Hook, int, int) asm("0x912560"); -int lua_setmetatable(lua_State*, int) asm("0x90d340"); -int lua_traceback(lua_State*, const char*, int) asm("0x911ea0"); -int lua_type(lua_State*, int) asm("0x90c740"); -int lua_yield(lua_State*, int) asm("0x913e40"); -int luaopen_base(lua_State*) asm("0x90fd90"); -int luaopen_debug(lua_State*) asm("0x9124c0"); -int luaopen_loadlib(lua_State*) asm("0x91a4b0"); -int luaopen_math(lua_State*) asm("0x91a110"); -int luaopen_serialize(lua_State*) asm("0x923690"); -int luaopen_string(lua_State*) asm("0x926ef0"); -lua_State* lua_newthread(lua_State*) asm("0x90c530"); -lua_State* lua_open() asm("0x9246d0"); -lua_State* lua_tothread(lua_State*, int) asm("0x90cc50"); -unsigned int lua_strlen(lua_State*, int) asm("0x90cb10"); -lua_Hook lua_gethook(lua_State*) asm("0x9125b0"); -void luaL_addlstring(luaL_Buffer*, const char*, unsigned int) asm("0x90e2a0"); -void luaL_addstring(luaL_Buffer*, const char*) asm("0x90e300"); -void luaL_addvalue(luaL_Buffer*) asm("0x90e370"); -void luaL_buffinit(lua_State*, luaL_Buffer*) asm("0x90e400"); -void luaL_checkany(lua_State*, int) asm("0x90ea70"); -void luaL_checkstack(lua_State*, int, const char*) asm("0x90dd10"); -void luaL_checktype(lua_State*, int, int) asm("0x90ea20"); -void luaL_getmetatable(lua_State*, const char*) asm("0x90dcf0"); -void luaL_openlib(lua_State*, const char*, const luaL_reg*, int) asm("0x90de00"); -void luaL_pushresult(luaL_Buffer*) asm("0x90e330"); -void luaL_setn(lua_State*, int, int) asm("0x90dfb0"); -void luaL_where(lua_State*, int) asm("0x90db80"); -void lua_call(lua_State*, int, int) asm("0x90d400"); -void lua_close(lua_State*) asm("0x9243e0"); -void lua_concat(lua_State*, int) asm("0x90d740"); -void lua_getfenv(lua_State*, int) asm("0x90d1f0"); -void lua_gettable(lua_State*, int) asm("0x90d000"); -void lua_insert(lua_State*, int) asm("0x90c640"); -void lua_newtable(lua_State*) asm("0x90d110"); -void lua_pushboolean(lua_State*, int) asm("0x90cf80"); -void lua_pushcclosure(lua_State*, lua_CFunction, int) asm("0x90ced0"); -void lua_pushlightuserdata(lua_State*, void*) asm("0x90cfc0"); -void lua_pushlstring(lua_State*, const char*, unsigned int) asm("0x90cd80"); -void lua_pushnil(lua_State*) asm("0x90cd00"); -void lua_pushnumber(lua_State*, float) asm("0x90cd40"); -void lua_pushstring(lua_State*, const char*) asm("0x90cdf0"); -void lua_pushvalue(lua_State*, int) asm("0x90c6e0"); -void lua_rawget(lua_State*, int) asm("0x90d050"); -void lua_rawgeti(lua_State*, int, int) asm("0x90d0a0"); -void lua_rawset(lua_State*, int) asm("0x90d2a0"); -void lua_rawseti(lua_State*, int, int) asm("0x90d2f0"); -void lua_remove(lua_State*, int) asm("0x90c5f0"); -void lua_replace(lua_State*, int) asm("0x90c690"); -void lua_setdefaultmetatable(lua_State*, int) asm("0x90ad00"); -void lua_setgcthreshold(lua_State*, int) asm("0x90d670"); -void lua_setglobaluserdata(lua_State*, void*) asm("0x924060"); -void lua_setstateuserdata(lua_State*, void*) asm("0x9240b0"); -void lua_settable(lua_State*, int) asm("0x90d260"); -void lua_settop(lua_State*, int) asm("0x90c5a0"); -void lua_setusergcfunction(lua_State*, userGCFunction) asm("0x924080"); -void lua_xmove(lua_State*, lua_State*, int) asm("0x90c4c0"); -void const* lua_topointer(lua_State*, int) asm("0x90cc90"); -void* lua_getglobaluserdata(lua_State*) asm("0x924050"); -void* lua_getstateuserdata(lua_State*) asm("0x9240a0"); -void* lua_tolightuserdata(lua_State*, int) asm("0x90cc10"); - -typedef void GetTableAH_t(void* t, uint32_t *asize, uint8_t *hbits); -GetTableAH_t *GetTableAH; - -typedef void lua_createtable_t(lua_State *L, int narray, int nrec); -lua_createtable_t *lua_createtable; - -void* FAJit = GetModuleHandleA("FAExt.dll"); \ No newline at end of file +#pragma once + +#include "global.h" + +#define LUA_IDSIZE 60 + +struct lua_Debug { + int event; + const char *name; // (n) + const char *namewhat; // (n) 'global', 'local', 'field', 'method' + const char *what; // (S) 'Lua', 'C', 'main', 'tail' + const char *source; // (S) + int currentline; // (l) + int nups; // (u) number of upvalues + int linedefined; // (S) + char short_src[LUA_IDSIZE]; // (S) + /* private part */ + int i_ci; // active function +}; + +class LuaState; +//lua.org/source/5.0/lstate.h.html#lua_State +typedef struct {uint8_t pad[0x44]; LuaState* LuaState;} lua_State; + +typedef struct luaL_Buffer luaL_Buffer; +typedef const char* (*lua_Chunkreader)(lua_State *L, void *data, size_t *size); +typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar); +typedef void (*userGCFunction)(void*); +typedef int (*lua_CFunction)(lua_State *L); +typedef float lua_Number; + +typedef struct luaL_reg { + const char *name; + lua_CFunction func; +} luaL_reg; + +#define LUA_MULTRET (-1) + +#define LUA_REGISTRYINDEX (-10000) +#define LUA_GLOBALSINDEX (-10001) +#define lua_upvalueindex(i) (LUA_GLOBALSINDEX-(i)) + +#define LUA_OK 0 +#define LUA_ERRRUN 1 +#define LUA_ERRFILE 2 +#define LUA_ERRSYNTAX 3 +#define LUA_ERRMEM 4 +#define LUA_ERRERR 5 + +#define LUA_TNONE (-1) +#define LUA_TNIL 0 +#define LUA_TBOOLEAN 1 +#define LUA_TLIGHTUSERDATA 2 +#define LUA_TNUMBER 3 +#define LUA_TSTRING 4 +#define LUA_TTABLE 5 +#define LUA_CFUNCTION 6 +#define LUA_TFUNCTION 7 +#define LUA_TUSERDATA 8 +#define LUA_TTHREAD 9 +#define LUA_TPROTO 10 +#define LUA_TUPVALUE 11 + +#define LUA_HOOKCALL 0 +#define LUA_HOOKRET 1 +#define LUA_HOOKLINE 2 +#define LUA_HOOKCOUNT 3 +#define LUA_HOOKTAILRET 4 + +#define LUA_MASKCALL (1 << LUA_HOOKCALL) +#define LUA_MASKRET (1 << LUA_HOOKRET) +#define LUA_MASKLINE (1 << LUA_HOOKLINE) +#define LUA_MASKCOUNT (1 << LUA_HOOKCOUNT) + +#define LUA_NOREF (-2) +#define LUA_REFNIL (-1) + +#define lua_boxpointer(L,u) \ + (*(void **)(lua_newuserdata(L, sizeof(void *))) = (u)) +#define lua_unboxpointer(L,i) (*(void **)(lua_touserdata(L, i))) + +#define lua_pop(L,n) lua_settop(L, -(n)-1) + +#define lua_register(L,n,f) \ + (lua_pushstring(L, n), \ + lua_pushcfunction(L, f), \ + lua_settable(L, LUA_GLOBALSINDEX)) + +#define lua_pushcfunction(L,f) lua_pushcclosure(L, f, 0) + +#define lua_isnoneornil(L,n) (lua_type(L,n) <= 0) +#define lua_isnone(L,n) (lua_type(L,n) == LUA_TNONE) +#define lua_isnil(L,n) (lua_type(L,n) == LUA_TNIL) +#define lua_isboolean(L,n) (lua_type(L,n) == LUA_TBOOLEAN) +#define lua_islightuserdata(L,n)(lua_type(L,n) == LUA_TLIGHTUSERDATA) +#define lua_istable(L,n) (lua_type(L,n) == LUA_TTABLE) +#define lua_iscfunction(L,n) (lua_type(L,n) == LUA_CFUNCTION) +#define lua_isfunction(L,n) (lua_type(L,n) == LUA_TFUNCTION) +#define lua_isuserdata(L,n) (lua_type(L,n) == LUA_TUSERDATA) +#define lua_isthread(L,n) (lua_type(L,n) == LUA_TTHREAD) +#define lua_isproto(L,n) (lua_type(L,n) == LUA_TPROTO) +#define lua_isupvalue(L,n) (lua_type(L,n) == LUA_TUPVALUE) + +#define lua_pushliteral(L, s) \ + lua_pushlstring(L, "" s, (sizeof(s)/sizeof(char))-1) + +#define lua_getregistry(L) lua_pushvalue(L, LUA_REGISTRYINDEX) +#define lua_setglobal(L,s) \ + (lua_pushstring(L, s), lua_insert(L, -2), lua_settable(L, LUA_GLOBALSINDEX)) +#define lua_getglobal(L,s) \ + (lua_pushstring(L, s), lua_gettable(L, LUA_GLOBALSINDEX)) + +#define lua_ref(L,lock) ((lock) ? luaL_ref(L, LUA_REGISTRYINDEX) : \ + (lua_pushstring(L, "unlocked references are obsolete"), lua_error(L), 0)) +#define lua_unref(L,ref) luaL_unref(L, LUA_REGISTRYINDEX, (ref)) +#define lua_getref(L,ref) lua_rawgeti(L, LUA_REGISTRYINDEX, ref) + +typedef union { + void *p; + float n; + int b; +} Value; + +//lua.org/source/5.0/lobject.h.html#TObject +typedef struct { + int tt; + Value value; +} TObject; +VALIDATE_SIZE(TObject, 8) + +//namespace gpg + class RRef {public: void* d; void* t;}; + class RType {}; + +//namespace LuaPlus + class LuaState; + + class LuaStackObject { + public: + LuaState* m_state; + int m_stackIndex; + }; + VALIDATE_SIZE(LuaStackObject, 8) + + class LuaObject + {// 0x14 bytes + void __LuaObject() asm("0x9072a0"); + void __LuaObject(LuaState* state) asm("0x908970"); + void __LuaObject(LuaState* state, int index) asm("0x9089c0"); + void __LuaObject(const LuaObject* obj) asm("0x908a40"); + void __LuaObject(const LuaStackObject* stack) asm("0x908a70"); + void __LuaObject(LuaState* state, const TObject* obj) asm("0x9089f0"); + void __DLuaObject() asm("0x9075d0"); + void __Index(LuaObject *out, int key) asm("0x9091e0"); + void __Index(LuaObject *out, const char* key) asm("0x908f60"); + + public: + LuaObject() {__LuaObject();} + LuaObject(LuaState* state) {__LuaObject(state);} + LuaObject(LuaState* state, int index) {__LuaObject(state, index);} + LuaObject(const LuaObject* obj) {__LuaObject(obj);} + LuaObject(const LuaStackObject* stack) {__LuaObject(stack);} + LuaObject(LuaState* state, const TObject* obj) {__LuaObject(state, obj);} + ~LuaObject() {__DLuaObject();} + + LuaObject* operator=(const LuaObject* obj) asm("0x908ab0"); + LuaObject* operator=(const LuaStackObject* stack) asm("0x908b00"); + + LuaObject operator[](int key) { + LuaObject out; __Index(&out, key); return out; + } + LuaObject operator[](const char* key) { + LuaObject out; __Index(&out, key); return out; + } + + bool GetBoolean() asm("0x907c90"); + bool IsBoolean() asm("0x9078d0"); + bool IsConvertibleToString() asm("0x9077c0"); + bool IsFunction() asm("0x907810"); + bool IsInteger() asm("0x907350"); + bool IsNil() asm("0x9072f0"); + bool IsNumber() asm("0x907360"); + bool IsString() asm("0x907370"); + bool IsTable() asm("0x907310"); + bool IsUserData() asm("0x907320"); + void Clone(LuaObject* out) asm("0x90a180"); + void CreateTable(LuaObject* out, const char* key, int narray, int lnhash) asm("0x908c10"); + void CreateTable(LuaObject* out, int key, int narray, int lnhash) asm("0x908ca0"); + void GetByIndex(LuaObject* out, int index) asm("0x908df0"); + void GetByName(LuaObject* out, const char* name) asm("0x90a160"); + void GetByObject(LuaObject* out, const LuaObject* obj) asm("0x908e70"); + void GetMetaTable(LuaObject* out) asm("0x908ba0"); + void Lookup(LuaObject* out, const char* key) asm("0x9093b0"); + void PushStack(LuaStackObject* out, LuaState* state) asm("0x907d80"); + void PushStack(lua_State* L) asm("0x907d10"); + LuaState* GetActiveState() asm("0x9072b0"); + const char* GetString() asm("0x907a90"); + const char* ToString() asm("0x9073e0"); + const char* TypeName() asm("0x908b50"); + lua_Number GetNumber() asm("0x907970"); + lua_Number GetDouble() asm("0x907a30"); + lua_Number ToNumber() asm("0x9073b0"); + void AssignNewUserData(RRef* out, LuaState* state, const RRef* rRef) asm("0x909840"); + void AssignNewUserData(RRef* out, LuaState* state, const RType* rType) asm("0x9097d0"); + void GetUserData(RRef* out) asm("0x907bc0"); + int GetCount() asm("0x907f50"); + int GetInteger() asm("0x907910"); + int GetN() asm("0x907e50"); + int GetTableCount() asm("0x90a410"); + int IsPassed() asm("0x907440"); + int Type() asm("0x9076d0"); + lua_State* GetActiveCState() asm("0x9072c0"); + void AssignBoolean(LuaState* state, bool value) asm("0x909600"); + void AssignInteger(LuaState* state, int value) asm("0x909650"); + void AssignNewTable(LuaState* state, int narray, int lnhash) asm("0x909940"); + void AssignNil(LuaState* state) asm("0x9095c0"); + void AssignNumber(LuaState* state, float value) asm("0x9096a0"); + void AssignString(LuaState* state, const char* value) asm("0x909750"); + void AssignTObject(LuaState* state, const TObject* value) asm("0x9099b0"); + void AssignThread(LuaState* state) asm("0x9096f0"); + void Insert(LuaObject* value) asm("0x909af0"); + void Insert(int key, LuaObject* value) asm("0x909ce0"); + void Register(const char* name, lua_CFunction func, int nupvalues) asm("0x907630"); + void Reset() asm("0x9075f0"); + void SetBoolean(const char* key, bool value) asm("0x9080c0"); + void SetInteger(const char* key, int value) asm("0x9081f0"); + void SetInteger(int key, int value) asm("0x908240"); + void SetMetaTable(const LuaObject* value) asm("0x907e00"); + void SetN(int n) asm("0x907ed0"); + void SetNil(const char* key) asm("0x907fa0"); + void SetNil(int key) asm("0x907ff0"); + void SetNumber(const char* key, float value) asm("0x908320"); + void SetNumber(int key, float value) asm("0x908370"); + void SetObject(const LuaObject* key, const LuaObject* value) asm("0x908810"); + void SetObject(const char* key, const LuaObject* value) asm("0x908760"); + void SetObject(int key, const LuaObject* value) asm("0x9087a0"); + void SetString(const char* key, const char* value) asm("0x908450"); + void SetString(int key, const char* value) asm("0x9084e0"); + void TypeError(const char* msg) asm("0x9072d0"); + + //private + void AddToUsedList(LuaState* state) asm("0x908890"); + void AddToUsedList(LuaState* state, const TObject* obj) asm("0x9088e0"); + void SetTableHelper(const char* key, const TObject* value) asm("0x9074b0"); + + LuaObject* m_next; + LuaObject* m_prev; + LuaState* m_state; + TObject m_object; + }; + VALIDATE_SIZE(LuaObject, 0x14) + + enum StandardLibraries {LIB_NONE, LIB_BASE, LIB_OSIO}; + class LuaState + {// 0x34 bytes + void __LuaState(StandardLibraries libs) asm("0x90ac10"); + void __LuaState(LuaState* parentState) asm("0x90a520"); + void __LuaState(int Unused) asm("0x90a5d0"); + void __DLuaState() asm("0x90a600"); + public: + LuaState(StandardLibraries libs) {__LuaState(libs);}; + LuaState(LuaState* parentState) {__LuaState(parentState);}; + LuaState(int Unused) {__LuaState(Unused);}; + ~LuaState() {__DLuaState();}; + void GetGlobal(LuaObject* out, const char* key) asm("0x4579d0"); + void GetGlobals(LuaObject* out) asm("0x90a690"); + LuaState* GetActiveState() asm("0x90bee0"); + const char* CheckString(int narg) asm("0x912d10"); + int ArgError(int narg, const char* msg) asm("0x90bf70"); + __cdecl int Error(const char* fmt, ...) asm("0x90c1d0"); + lua_State* GetActiveCState() asm("0x90bef0"); + void CheckAny(int narg) asm("0x923f20"); + + //private + void Init(enum StandardLibraries libs) asm("0x90aad0"); + + lua_State* m_state; + void* ForMultipleThreads; + bool m_ownState; + LuaObject m_threadObj; + LuaState* m_rootState; + struct MiniLuaObject { + LuaObject* m_next; // only valid when in free list + LuaObject* m_prev; // only valid when in used list + } m_headObject, m_tailObject; + }; + VALIDATE_SIZE(LuaState, 0x34) + +bool LuaPlusH_next(LuaState*, const LuaObject*, LuaObject*, LuaObject*) asm("0x90a6b0"); +bool lua_toboolean(lua_State*, int) asm("0x90ca40"); +TObject* negindex(lua_State*, int) asm("0x90c340"); +char* luaL_prepbuffer(luaL_Buffer*) asm("0x90e260"); +const char* luaL_checklstring(lua_State*, int, unsigned int*) asm("0x90eaa0"); +const char* luaL_optlstring(lua_State*, int, const char*, unsigned int*) asm("0x90eb10"); +const char* lua_getlocal(lua_State*, const lua_Debug*, int) asm("0x912680"); +const char* lua_getupvalue(lua_State*, int, int) asm("0x90d9a0"); +const char* lua_pushfstring(lua_State*, const char*, ...) asm("0x90ce90"); +const char* lua_pushvfstring(lua_State*, const char*, char*) asm("0x90ce50"); +const char* lua_setlocal(lua_State*, const lua_Debug*, int) asm("0x9126f0"); +const char* lua_setupvalue(lua_State*, int, int) asm("0x90da00"); +const char* lua_tostring(lua_State*, int) asm("0x90ca90"); +const char* lua_typename(lua_State*, int) asm("0x90c780"); +float luaL_checknumber(lua_State*, int) asm("0x90eb70"); +float luaL_optnumber(lua_State*, int, float) asm("0x90ebf0"); +float lua_tonumber(lua_State*, int) asm("0x90c9f0"); +void lua_newuserdata(RRef *ret, lua_State*, const RType*) asm("0x90d7e0"); +void lua_touserdata(RRef *ret, lua_State*, int) asm("0x90cbb0"); +int luaL_argerror(lua_State*, int, const char*) asm("0x90e900"); +int luaL_callmeta(lua_State*, int, const char*) asm("0x90dda0"); +int luaL_error(lua_State*, const char*, ...) asm("0x90dbf0"); +int luaL_findstring(const char*, const char* const list[]) asm("0x90dc20"); +int luaL_getmetafield(lua_State*, int, const char*) asm("0x90dd40"); +int luaL_getn(lua_State*, int) asm("0x90e090"); +int luaL_loadbuffer(lua_State*, const char*, unsigned int, const char*) asm("0x90e760"); +int luaL_loadfile(lua_State*, const char*) asm("0x90e5d0"); +int luaL_newmetatable(lua_State*, const char*) asm("0x90dc70"); +int luaL_typerror(lua_State*, int, const char*) asm("0x90e9a0"); +int lua_checkstack(lua_State*, int) asm("0x90c460"); +int lua_dobuffer(lua_State*, const char*, unsigned int, const char*) asm("0x90e870"); +int lua_dostring(lua_State*, const char*) asm("0x90e8d0"); +int lua_error(lua_State*) asm("0x90d6c0"); +int lua_getgccount(lua_State*) asm("0x90d660"); +int lua_getgcthreshold(lua_State*) asm("0x90d650"); +int lua_gethookcount(lua_State*) asm("0x9125d0"); +int lua_gethookmask(lua_State*) asm("0x9125c0"); +int lua_getinfo(lua_State*, const char*, lua_Debug*) asm("0x9132f0"); +int lua_getmetatable(lua_State*, int) asm("0x90d180"); +int lua_getn(lua_State*, int) asm("0x90ad30"); +int lua_getstack(lua_State*, int, lua_Debug*) asm("0x9125e0"); +int lua_gettop(lua_State*) asm("0x90c590"); +int lua_isnumber(lua_State*, int) asm("0x90c7a0"); +int lua_isstring(lua_State*, int) asm("0x90c800"); +int lua_lessthan(lua_State*, int, int) asm("0x90c980"); +int lua_load(lua_State*, lua_Chunkreader, void*, const char*) asm("0x90d5c0"); +int lua_next(lua_State*, int) asm("0x90d6d0"); +int lua_pcall(lua_State*, int, int) asm("0x90d430"); +int lua_rawequal(lua_State*, int, int) asm("0x90c890"); +int lua_resume(lua_State*, int) asm("0x914610"); +int lua_setfenv(lua_State*, int) asm("0x90d3b0"); +int lua_sethook(lua_State*, lua_Hook, int, int) asm("0x912560"); +int lua_setmetatable(lua_State*, int) asm("0x90d340"); +int lua_traceback(lua_State*, const char*, int) asm("0x911ea0"); +int lua_type(lua_State*, int) asm("0x90c740"); +int lua_yield(lua_State*, int) asm("0x913e40"); +int luaopen_base(lua_State*) asm("0x90fd90"); +int luaopen_debug(lua_State*) asm("0x9124c0"); +int luaopen_loadlib(lua_State*) asm("0x91a4b0"); +int luaopen_math(lua_State*) asm("0x91a110"); +int luaopen_serialize(lua_State*) asm("0x923690"); +int luaopen_string(lua_State*) asm("0x926ef0"); +lua_State* lua_newthread(lua_State*) asm("0x90c530"); +lua_State* lua_open() asm("0x9246d0"); +lua_State* lua_tothread(lua_State*, int) asm("0x90cc50"); +unsigned int lua_strlen(lua_State*, int) asm("0x90cb10"); +lua_Hook lua_gethook(lua_State*) asm("0x9125b0"); +void luaL_addlstring(luaL_Buffer*, const char*, unsigned int) asm("0x90e2a0"); +void luaL_addstring(luaL_Buffer*, const char*) asm("0x90e300"); +void luaL_addvalue(luaL_Buffer*) asm("0x90e370"); +void luaL_buffinit(lua_State*, luaL_Buffer*) asm("0x90e400"); +void luaL_checkany(lua_State*, int) asm("0x90ea70"); +void luaL_checkstack(lua_State*, int, const char*) asm("0x90dd10"); +void luaL_checktype(lua_State*, int, int) asm("0x90ea20"); +void luaL_getmetatable(lua_State*, const char*) asm("0x90dcf0"); +void luaL_openlib(lua_State*, const char*, const luaL_reg*, int) asm("0x90de00"); +void luaL_pushresult(luaL_Buffer*) asm("0x90e330"); +void luaL_setn(lua_State*, int, int) asm("0x90dfb0"); +void luaL_where(lua_State*, int) asm("0x90db80"); +void lua_call(lua_State*, int, int) asm("0x90d400"); +void lua_close(lua_State*) asm("0x9243e0"); +void lua_concat(lua_State*, int) asm("0x90d740"); +void lua_getfenv(lua_State*, int) asm("0x90d1f0"); +void lua_gettable(lua_State*, int) asm("0x90d000"); +void lua_insert(lua_State*, int) asm("0x90c640"); +void lua_newtable(lua_State*) asm("0x90d110"); +void lua_pushboolean(lua_State*, int) asm("0x90cf80"); +void lua_pushcclosure(lua_State*, lua_CFunction, int) asm("0x90ced0"); +void lua_pushlightuserdata(lua_State*, void*) asm("0x90cfc0"); +void lua_pushlstring(lua_State*, const char*, unsigned int) asm("0x90cd80"); +void lua_pushnil(lua_State*) asm("0x90cd00"); +void lua_pushnumber(lua_State*, float) asm("0x90cd40"); +void lua_pushstring(lua_State*, const char*) asm("0x90cdf0"); +void lua_pushvalue(lua_State*, int) asm("0x90c6e0"); +void lua_rawget(lua_State*, int) asm("0x90d050"); +void lua_rawgeti(lua_State*, int, int) asm("0x90d0a0"); +void lua_rawset(lua_State*, int) asm("0x90d2a0"); +void lua_rawseti(lua_State*, int, int) asm("0x90d2f0"); +void lua_remove(lua_State*, int) asm("0x90c5f0"); +void lua_replace(lua_State*, int) asm("0x90c690"); +void lua_setdefaultmetatable(lua_State*, int) asm("0x90ad00"); +void lua_setgcthreshold(lua_State*, int) asm("0x90d670"); +void lua_setglobaluserdata(lua_State*, void*) asm("0x924060"); +void lua_setstateuserdata(lua_State*, void*) asm("0x9240b0"); +void lua_settable(lua_State*, int) asm("0x90d260"); +void lua_settop(lua_State*, int) asm("0x90c5a0"); +void lua_setusergcfunction(lua_State*, userGCFunction) asm("0x924080"); +void lua_xmove(lua_State*, lua_State*, int) asm("0x90c4c0"); +void const* lua_topointer(lua_State*, int) asm("0x90cc90"); +void* lua_getglobaluserdata(lua_State*) asm("0x924050"); +void* lua_getstateuserdata(lua_State*) asm("0x9240a0"); +void* lua_tolightuserdata(lua_State*, int) asm("0x90cc10"); + +void GetTableAH(const void *t, uint32_t *asize, uint8_t *hbits) { + *asize = *(int*)(t + 32); + *hbits = *(uint8_t*)(t + 9); +} + +void lua_createtable(lua_State *L, int narray, int nrec); + +// void* FAJit = GetModuleHandleA("FAExt.dll"); \ No newline at end of file diff --git a/section/include/LuaCFuncs.h b/include/LuaCFuncs.h similarity index 97% rename from section/include/LuaCFuncs.h rename to include/LuaCFuncs.h index b0d72737..1ab7f03e 100644 --- a/section/include/LuaCFuncs.h +++ b/include/LuaCFuncs.h @@ -1,1231 +1,1231 @@ -#pragma once - -#include "LuaAPI.h" - -#define LuaC(addr, name) \ - int FA_##name(lua_State *L) asm(#addr); - -LuaC(0x416490, BeginLoggingStats) -LuaC(0x416640, EndLoggingStats) -LuaC(0x41B790, GetCommandLineArg) -LuaC(0x41BA20, HasCommandLineArg) -LuaC(0x41CB60, ConExecute) -LuaC(0x41D180, ConExecuteSave) -LuaC(0x41EB00, AddConsoleOutputReciever) -LuaC(0x41ED00, RemoveConsoleOutputReciever) -LuaC(0x456BE0, DiskFindFiles) -LuaC(0x456E30, DiskGetFileInfo) -LuaC(0x457160, DiskToLocal) -LuaC(0x4572E0, Basename) -LuaC(0x457460, Dirname) -LuaC(0x4575C0, FileCollapsePath) -LuaC(0x4A5700, CreatePrefetchSet) -LuaC(0x4A5810, CPrefetchSetUpdate) -LuaC(0x4A5950, CPrefetchSetReset) -LuaC(0x4B2EE0, EnumColorNames) -LuaC(0x4B41E0, Trace) -LuaC(0x4C7A90, IsDestroyed) -LuaC(0x4C9D00, ForkThread) -LuaC(0x4C9FE0, KillThread) -LuaC(0x4CA890, WaitFor) -LuaC(0x4CAA70, SuspendCurrentThread) -LuaC(0x4CAB90, ResumeThread) -LuaC(0x4CAD60, CurrentThread) -LuaC(0x4CD8F0, print) -LuaC(0x4CD9A0, LOG) -LuaC(0x4CDA50, WARN) -LuaC(0x4CDB00, SPEW) -LuaC(0x4CEAF0, doscript) -LuaC(0x4CF930, __index) -LuaC(0x4CF9C0, __newindex) -LuaC(0x4CFE00, Vector2) -LuaC(0x4D0140, Vector) -LuaC(0x4D0600, PointVector) -LuaC(0x4D0C70, Rect) -LuaC(0x4D0EB0, VDist3) -LuaC(0x4D1070, VDist3Sq) -LuaC(0x4D1230, VDist2) -LuaC(0x4D1440, VDist2Sq) -LuaC(0x4D1650, VDot) -LuaC(0x4D17E0, VDiff) -LuaC(0x4D19C0, VAdd) -LuaC(0x4D1BA0, VMult) -LuaC(0x4D1D70, VPerpDot) -LuaC(0x4D1F10, MATH_IRound) -LuaC(0x4D2030, MATH_Lerp) -LuaC(0x4D3470, STR_xtoi) -LuaC(0x4D3580, STR_itox) -LuaC(0x4D3700, STR_Utf8Len) -LuaC(0x4D3810, STR_Utf8SubString) -LuaC(0x4D3A10, STR_GetTokens) -LuaC(0x4D3D70, exists) -LuaC(0x4D3EA0, GetVersion) -LuaC(0x4D68C0, SHGetFolderPath) -LuaC(0x4DFD90, Sound) -LuaC(0x4DFED0, RPCSound) -LuaC(0x4E0010, GetCueBank) -LuaC(0x50D3B0, OrientFromDir) -LuaC(0x50D510, EulerToQuaternion) -LuaC(0x50D730, MinLerp) -LuaC(0x50D950, MinSlerp) -LuaC(0x5284D0, SpecFootprints) -LuaC(0x528AF0, RegisterUnitBlueprint) -LuaC(0x528BC0, RegisterPropBlueprint) -LuaC(0x528C90, RegisterProjectileBlueprint) -LuaC(0x528D60, RegisterMeshBlueprint) -LuaC(0x528E20, RegisterTrailEmitterBlueprint) -LuaC(0x528ED0, RegisterEmitterBlueprint) -LuaC(0x528F80, RegisterBeamBlueprint) -LuaC(0x529030, BlueprintLoaderUpdateProgress) -LuaC(0x547030, CreateResourceDeposit) -LuaC(0x5556B0, EntityCategory__add) -LuaC(0x555840, EntityCategory__sub) -LuaC(0x5559D0, EntityCategory__mul) -LuaC(0x555B60, EntityCategoryGetUnitList) -LuaC(0x555D70, EntityCategoryEmpty) -LuaC(0x55B610, SecondsPerTick) -LuaC(0x585EF0, CAiBrainIsOpponentAIRunning) -LuaC(0x586070, CAiBrainGetArmyIndex) -LuaC(0x5861C0, CAiBrainGetFactionIndex) -LuaC(0x586310, CAiBrainSetCurrentPlan) -LuaC(0x5864A0, CAiBrainGetPersonality) -LuaC(0x5865F0, CAiBrainSetCurrentEnemy) -LuaC(0x586770, CAiBrainGetCurrentEnemy) -LuaC(0x5868D0, CAiBrainGetUnitBlueprint) -LuaC(0x586AD0, CAiBrainGetArmyStat) -LuaC(0x586DA0, CAiBrainSetArmyStat) -LuaC(0x587020, CAiBrainAddArmyStat) -LuaC(0x5872A0, CAiBrainSetGreaterOf) -LuaC(0x587520, CAiBrainGetBlueprintStat) -LuaC(0x5876E0, CAiBrainGetCurrentUnits) -LuaC(0x587870, CAiBrainGetListOfUnits) -LuaC(0x587B80, CAiBrainSetArmyStatsTrigger) -LuaC(0x587FA0, CAiBrainRemoveArmyStatsTrigger) -LuaC(0x5881F0, CAiBrainGiveResource) -LuaC(0x5883E0, CAiBrainGiveStorage) -LuaC(0x5885E0, CAiBrainTakeResource) -LuaC(0x588850, CAiBrainSetResourceSharing) -LuaC(0x5889A0, CAiBrainFindUnit) -LuaC(0x588C10, CAiBrainFindUpgradeBP) -LuaC(0x588EB0, CAiBrainFindUnitToUpgrade) -LuaC(0x589380, CAiBrainDecideWhatToBuild) -LuaC(0x589720, CAiBrainGetArmyStartPos) -LuaC(0x589890, CAiBrainCreateUnitNearSpot) -LuaC(0x589DB0, CAiBrainCreateResourceBuildingNearest) -LuaC(0x58A440, CAiBrainFindPlaceToBuild) -LuaC(0x58B3A0, CAiBrainCanBuildStructureAt) -LuaC(0x58B610, CAiBrainBuildStructure) -LuaC(0x58BA40, CAiBrainNumCurrentlyBuilding) -LuaC(0x58BCB0, CAiBrainGetAvailableFactories) -LuaC(0x58BF80, CAiBrainCanBuildPlatoon) -LuaC(0x58C490, CAiBrainBuildPlatoon) -LuaC(0x58C840, CAiBrainBuildUnit) -LuaC(0x58CA40, CAiBrainIsAnyEngineerBuilding) -LuaC(0x58CCA0, CAiBrainGetNumPlatoonsWithAI) -LuaC(0x58CE30, CAiBrainGetNumPlatoonsTemplateNamed) -LuaC(0x58CFC0, CAiBrainPlatoonExists) -LuaC(0x58D140, CAiBrainGetPlatoonsList) -LuaC(0x58D360, CAiBrainDisbandPlatoon) -LuaC(0x58D4D0, CAiBrainDisbandPlatoonUniquelyNamed) -LuaC(0x58D650, CAiBrainMakePlatoon) -LuaC(0x58DC60, CAiBrainAssignUnitsToPlatoon) -LuaC(0x58DFA0, CAiBrainGetPlatoonUniquelyNamed) -LuaC(0x58E140, CAiBrainGetNumUnitsAroundPoint) -LuaC(0x58E3D0, CAiBrainGetUnitsAroundPoint) -LuaC(0x58E830, CAiBrainFindClosestArmyWithBase) -LuaC(0x58EB40, CAiBrainSetUpAttackVectorsToArmy) -LuaC(0x58ED60, CAiBrainGetAttackVectors) -LuaC(0x58EF60, CAiBrainPickBestAttackVector) -LuaC(0x58F370, CAiBrainGetEconomyStored) -LuaC(0x58F530, CAiBrainGetEconomyStoredRatio) -LuaC(0x58F730, CAiBrainGetEconomyIncome) -LuaC(0x58F8F0, CAiBrainGetEconomyUsage) -LuaC(0x58FAB0, CAiBrainGetEconomyRequested) -LuaC(0x58FC70, CAiBrainGetEconomyTrend) -LuaC(0x58FE30, CAiBrainGetMapWaterRatio) -LuaC(0x58FF80, CAiBrainAssignThreatAtPosition) -LuaC(0x590260, CAiBrainGetThreatAtPosition) -LuaC(0x5905B0, CAiBrainGetThreatBetweenPositions) -LuaC(0x5908D0, CAiBrainGetHighestThreatPosition) -LuaC(0x590C00, CAiBrainGetThreatsAroundPosition) -LuaC(0x591020, CAiBrainCheckBlockingTerrain) -LuaC(0x5917F0, CAiBrainGetNoRushTicks) -LuaC(0x5A5860, CAiNavigatorImplSetGoal) -LuaC(0x5A5A90, CAiNavigatorImplSetDestUnit) -LuaC(0x5A5BF0, CAiNavigatorImplAbortMove) -LuaC(0x5A5D20, CAiNavigatorImplBroadcastResumeTaskEvent) -LuaC(0x5A5E50, CAiNavigatorImplSetSpeedThroughGoal) -LuaC(0x5A5F90, CAiNavigatorImplGetCurrentTargetPos) -LuaC(0x5A6100, CAiNavigatorImplGetGoalPos) -LuaC(0x5A6270, CAiNavigatorImplGetStatus) -LuaC(0x5A63C0, CAiNavigatorImplHasGoodPath) -LuaC(0x5A6500, CAiNavigatorImplFollowingLeader) -LuaC(0x5A6640, CAiNavigatorImplIgnoreFormation) -LuaC(0x5A6780, CAiNavigatorImplIsIgnorningFormation) -LuaC(0x5A68C0, CAiNavigatorImplAtGoal) -LuaC(0x5A6A00, CAiNavigatorImplCanPathToGoal) -LuaC(0x5BA610, CAiPersonalityGetPersonalityName) -LuaC(0x5BA730, CAiPersonalityGetChatPersonality) -LuaC(0x5BA850, CAiPersonalityGetDifficulty) -LuaC(0x5BA970, CAiPersonalityAdjustDelay) -LuaC(0x5BAB40, CAiPersonalityGetArmySize) -LuaC(0x5BAC80, CAiPersonalityGetPlatoonSize) -LuaC(0x5BADC0, CAiPersonalityGetAttackFrequency) -LuaC(0x5BAF00, CAiPersonalityGetRepeatAttackFrequency) -LuaC(0x5BB040, CAiPersonalityGetCounterForces) -LuaC(0x5BB180, CAiPersonalityGetIntelGathering) -LuaC(0x5BB2C0, CAiPersonalityGetCoordinatedAttacks) -LuaC(0x5BB400, CAiPersonalityGetExpansionDriven) -LuaC(0x5BB540, CAiPersonalityGetTechAdvancement) -LuaC(0x5BB680, CAiPersonalityGetUpgradesDriven) -LuaC(0x5BB7C0, CAiPersonalityGetDefenseDriven) -LuaC(0x5BB900, CAiPersonalityGetEconomyDriven) -LuaC(0x5BBA40, CAiPersonalityGetFactoryTycoon) -LuaC(0x5BBB80, CAiPersonalityGetIntelBuildingTycoon) -LuaC(0x5BBCC0, CAiPersonalityGetSuperWeaponTendency) -LuaC(0x5BBE00, CAiPersonalityGetFavouriteStructures) -LuaC(0x5BBFD0, CAiPersonalityGetAirUnitsEmphasis) -LuaC(0x5BC110, CAiPersonalityGetTankUnitsEmphasis) -LuaC(0x5BC250, CAiPersonalityGetBotUnitsEmphasis) -LuaC(0x5BC390, CAiPersonalityGetSeaUnitsEmphasis) -LuaC(0x5BC4D0, CAiPersonalityGetSpecialtyForcesEmphasis) -LuaC(0x5BC610, CAiPersonalityGetSupportUnitsEmphasis) -LuaC(0x5BC750, CAiPersonalityGetDirectDamageEmphasis) -LuaC(0x5BC890, CAiPersonalityGetInDirectDamageEmphasis) -LuaC(0x5BC9D0, CAiPersonalityGetFavouriteUnits) -LuaC(0x5BCBA0, CAiPersonalityGetSurvivalEmphasis) -LuaC(0x5BCCE0, CAiPersonalityGetTeamSupport) -LuaC(0x5BCE20, CAiPersonalityGetFormationUse) -LuaC(0x5BCF60, CAiPersonalityGetTargetSpread) -LuaC(0x5BD0A0, CAiPersonalityGetQuittingTendency) -LuaC(0x5BD1E0, CAiPersonalityGetChatFrequency) -LuaC(0x5C29D0, ReconBlipGetBlueprint) -LuaC(0x5C2B30, ReconBlipGetSource) -LuaC(0x5C2C90, ReconBlipIsSeenEver) -LuaC(0x5C2E00, ReconBlipIsSeenNow) -LuaC(0x5C2F70, ReconBlipIsMaybeDead) -LuaC(0x5C30E0, ReconBlipIsOnOmni) -LuaC(0x5C3250, ReconBlipIsOnSonar) -LuaC(0x5C33C0, ReconBlipIsOnRadar) -LuaC(0x5C3530, ReconBlipIsKnownFake) -LuaC(0x5D9930, CAiAttackerImplGetUnit) -LuaC(0x5D9A70, CAiAttackerImplAttackerWeaponsBusy) -LuaC(0x5D9BB0, CAiAttackerImplGetWeaponCount) -LuaC(0x5D9D00, CAiAttackerImplSetDesiredTarget) -LuaC(0x5D9EA0, CAiAttackerImplGetDesiredTarget) -LuaC(0x5DA000, CAiAttackerImplStop) -LuaC(0x5DA130, CAiAttackerImplCanAttackTarget) -LuaC(0x5DA2E0, CAiAttackerImplFindBestEnemy) -LuaC(0x5DA490, CAiAttackerImplGetTargetWeapon) -LuaC(0x5DA650, CAiAttackerImplGetPrimaryWeapon) -LuaC(0x5DA7A0, CAiAttackerImplGetMaxWeaponRange) -LuaC(0x5DA8E0, CAiAttackerImplIsWithinAttackRange) -LuaC(0x5DACE0, CAiAttackerImplIsTooClose) -LuaC(0x5DAE90, CAiAttackerImplIsTargetExempt) -LuaC(0x5DB010, CAiAttackerImplHasSlavedTarget) -LuaC(0x5DB1A0, CAiAttackerImplResetReportingState) -LuaC(0x5DB2D0, CAiAttackerImplForceEngage) -LuaC(0x5E3150, AITarget) -LuaC(0x5E8640, UnitTransportDetachAllUnits) -LuaC(0x6233C0, CUnitScriptTaskGetUnit) -LuaC(0x6234F0, CUnitScriptTaskSetAIResult) -LuaC(0x623660, LUnitMove) -LuaC(0x623900, LUnitMoveNear) -LuaC(0x631F20, CreateAimController) -LuaC(0x632140, CAimManipulatorSetFiringArc) -LuaC(0x632340, CAimManipulatorSetResetPoseTime) -LuaC(0x6324B0, CAimManipulatorOnTarget) -LuaC(0x6325F0, CAimManipulatorSetEnabled) -LuaC(0x632730, CAimManipulatorGetHeadingPitch) -LuaC(0x632890, CAimManipulatorSetHeadingPitch) -LuaC(0x632A40, CAimManipulatorSetAimHeadingOffset) -LuaC(0x634C70, CBoneEntityManipulatorSetPivot) -LuaC(0x634E80, EntityAttachBoneToEntityBone) -LuaC(0x636800, CreateBuilderArmController) -LuaC(0x6369D0, CBuilderArmManipulatorSetAimingArc) -LuaC(0x636BD0, CBuilderArmManipulatorGetHeadingPitch) -LuaC(0x636D30, CBuilderArmManipulatorSetHeadingPitch) -LuaC(0x637FA0, CreateCollisionDetector) -LuaC(0x638110, CCollisionManipulatorEnableTerrainCheck) -LuaC(0x638250, CCollisionManipulatorEnable) -LuaC(0x638380, CCollisionManipulatorDisable) -LuaC(0x6384C0, CCollisionManipulatorWatchBone) -LuaC(0x639C80, CreateFootPlantController) -LuaC(0x63BAC0, IAniManipulatorSetPrecedence) -LuaC(0x63BC60, IAniManipulatorEnable) -LuaC(0x63BD90, IAniManipulatorDisable) -LuaC(0x63BEC0, IAniManipulatorDestroy) -LuaC(0x6404B0, CreateAnimator) -LuaC(0x640670, CAnimationManipulatorPlayAnim) -LuaC(0x6408E0, CAnimationManipulatorGetRate) -LuaC(0x640A20, CAnimationManipulatorSetRate) -LuaC(0x640BA0, CAnimationManipulatorGetAnimationFraction) -LuaC(0x640D10, CAnimationManipulatorSetAnimationFraction) -LuaC(0x640EB0, CAnimationManipulatorGetAnimationTime) -LuaC(0x640FF0, CAnimationManipulatorSetAnimationTime) -LuaC(0x641160, CAnimationManipulatorGetAnimationDuration) -LuaC(0x6415F0, CAnimationManipulatorSetBoneEnabled) -LuaC(0x6417B0, CAnimationManipulatorSetOverwriteMode) -LuaC(0x6418F0, CAnimationManipulatorSetDisableOnSignal) -LuaC(0x641A30, CAnimationManipulatorSetDirectionalAnim) -LuaC(0x643D80, CreateRotator) -LuaC(0x644280, CRotateManipulatorSetSpinDown) -LuaC(0x6443F0, CRotateManipulatorSetGoal) -LuaC(0x6445C0, CRotateManipulatorClearGoal) -LuaC(0x644710, CRotateManipulatorSetSpeed) -LuaC(0x6448B0, CRotateManipulatorSetTargetSpeed) -LuaC(0x644A80, CRotateManipulatorSetAccel) -LuaC(0x644C20, CRotateManipulatorClearFollowBone) -LuaC(0x644D90, CRotateManipulatorSetFollowBone) -LuaC(0x644F30, CRotateManipulatorGetCurrentAngle) -LuaC(0x6450A0, CRotateManipulatorSetCurrentAngle) -LuaC(0x6462B0, CreateSlaver) -LuaC(0x646490, CSlaveManipulatorSetMaxRate) -LuaC(0x647660, CreateSlider) -LuaC(0x647A30, CSlideManipulatorSetWorldUnits) -LuaC(0x647B80, CSlideManipulatorSetSpeed) -LuaC(0x647D80, CSlideManipulatorSetAcceleration) -LuaC(0x647F20, CSlideManipulatorSetDeceleration) -LuaC(0x6480C0, CSlideManipulatorSetGoal) -LuaC(0x6482E0, CSlideManipulatorBeenDestroyed) -LuaC(0x649440, CreateStorageManip) -LuaC(0x64AB40, CreateThrustController) -LuaC(0x64AD10, CThrustManipulatorSetThrustingParam) -LuaC(0x656450, CreateBeamEmitter) -LuaC(0x656650, CreateBeamEmitterOnEntity) -LuaC(0x6568E0, CreateBeamEntityToEntity) -LuaC(0x656C30, AttachBeamEntityToEntity) -LuaC(0x656F80, AttachBeamToEntity) -LuaC(0x66D860, IEffectSetBeamParam) -LuaC(0x66D940, IEffectSetEmitterParam) -LuaC(0x66DA20, IEffectScaleEmitter) -LuaC(0x66DBA0, IEffectResizeEmitterCurve) -LuaC(0x66DE70, IEffectSetEmitterCurveParam) -LuaC(0x66E150, IEffectOffsetEmitter) -LuaC(0x66E3A0, IEffectDestroy) -LuaC(0x66E4D0, CDecalHandleDestroy) -LuaC(0x66E610, CreateDecal) -LuaC(0x66EC10, CreateSplat) -LuaC(0x66F1A0, CreateSplatOnBone) -LuaC(0x66F6E0, CreateEmitterAtEntity) -LuaC(0x66F8A0, CreateEmitterOnEntity) -LuaC(0x66FA60, CreateLightParticle) -LuaC(0x66FE20, CreateLightParticleIntel) -LuaC(0x670240, CreateAttachedEmitter) -LuaC(0x670420, CreateTrail) -LuaC(0x670600, CreateAttachedBeam) -LuaC(0x6708C0, CreateBeamToEntityBone) -LuaC(0x670CF0, CreateEmitterAtBone) -LuaC(0x673BC0, CollisionBeamEntity__init) -LuaC(0x673F60, CollisionBeamEntitySetBeamFx) -LuaC(0x674120, CollisionBeamEntityDisable) -LuaC(0x674250, CollisionBeamEntityEnable) -LuaC(0x674380, CollisionBeamEntityIsEnabled) -LuaC(0x6744C0, CollisionBeamEntityGetLauncher) -LuaC(0x68A090, EntityCreateProjectile) -LuaC(0x68A670, EntityCreateProjectileAtBone) -LuaC(0x68AAF0, EntityShakeCamera) -LuaC(0x68AD60, EntityGetAIBrain) -LuaC(0x68AF30, EntityGetBlueprint) -LuaC(0x68B0B0, GetBlueprint) -LuaC(0x68B210, EntityGetArmy) -LuaC(0x68B370, EntityGetBoneDirection) -LuaC(0x68B570, EntityIsValidBone) -LuaC(0x68B7F0, EntityGetBoneCount) -LuaC(0x68B940, EntityGetBoneName) -LuaC(0x68BAE0, EntityRequestRefreshUI) -LuaC(0x68BC10, EntityGetEntityId) -LuaC(0x68BD90, EntityAttachTo) -LuaC(0x68C010, EntityAttachBoneTo) -LuaC(0x68C2B0, EntitySetParentOffset) -LuaC(0x68C4A0, EntityDetachFrom) -LuaC(0x68C650, EntityDetachAll) -LuaC(0x68C8B0, EntityGetParent) -LuaC(0x68CA00, EntityGetCollisionExtents) -LuaC(0x68CC30, EntityPlaySound) -LuaC(0x68CDC0, EntitySetAmbientSound) -LuaC(0x68CF60, EntityGetFractionComplete) -LuaC(0x68D0A0, EntityAdjustHealth) -LuaC(0x68D2B0, EntityGetHealth) -LuaC(0x68D3F0, EntityGetMaxHealth) -LuaC(0x68D530, EntitySetHealth) -LuaC(0x68D710, EntitySetMaxHealth) -LuaC(0x68D880, EntitySetVizToFocusPlayer) -LuaC(0x68DA00, EntitySetVizToEnemies) -LuaC(0x68DB80, EntitySetVizToAllies) -LuaC(0x68DD00, EntitySetVizToNeutrals) -LuaC(0x68DE80, EntityIsIntelEnabled) -LuaC(0x68E050, EntityEnableIntel) -LuaC(0x68E2F0, EntityDisableIntel) -LuaC(0x68E590, EntitySetIntelRadius) -LuaC(0x68E7D0, EntityGetIntelRadius) -LuaC(0x68E9A0, EntityInitIntel) -LuaC(0x68ED50, EntityAddShooter) -LuaC(0x68EEC0, EntityRemoveShooter) -LuaC(0x68F030, EntityReachedMaxShooters) -LuaC(0x68F180, EntitySetCollisionShape) -LuaC(0x68F500, EntityGetOrientation) -LuaC(0x68F660, EntitySetOrientation) -LuaC(0x68F860, EntityGetHeading) -LuaC(0x68FA10, EntitySetPosition) -LuaC(0x68FC10, EntityGetPosition) -LuaC(0x68FEE0, EntityGetPositionXYZ) -LuaC(0x6900E0, EntityAddLocalImpulse) -LuaC(0x6903E0, EntityAddWorldImpulse) -LuaC(0x690790, EntitySetMesh) -LuaC(0x6909F0, EntitySetDrawScale) -LuaC(0x690B90, EntityGetScale) -LuaC(0x690D20, EntitySetScale) -LuaC(0x691030, EntityAddManualScroller) -LuaC(0x691260, EntityAddThreadScroller) -LuaC(0x691480, EntityAddPingPongScroller) -LuaC(0x691840, EntityRemoveScroller) -LuaC(0x691A00, EntityDestroy) -LuaC(0x691B40, EntityBeenDestroyed) -LuaC(0x691C90, EntityKill) -LuaC(0x6922B0, _c_CreateEntity) -LuaC(0x695580, EntityFallDown) -LuaC(0x695720, MotorFallDownWhack) -LuaC(0x6969E0, EntitySinkAway) -LuaC(0x6A13B0, ProjectileGetLauncher) -LuaC(0x6A1510, ProjectileGetTrackingTarget) -LuaC(0x6A1680, ProjectileGetCurrentTargetPosition) -LuaC(0x6A1820, ProjectileSetNewTarget) -LuaC(0x6A19C0, ProjectileSetNewTargetGround) -LuaC(0x6A1B90, ProjectileSetLifetime) -LuaC(0x6A1D30, ProjectileSetDamage) -LuaC(0x6A1F10, ProjectileSetMaxSpeed) -LuaC(0x6A2090, ProjectileSetAcceleration) -LuaC(0x6A2210, ProjectileSetBallisticAcceleration) -LuaC(0x6A2470, ProjectileSetDestroyOnWater) -LuaC(0x6A25B0, ProjectileSetTurnRate) -LuaC(0x6A2730, ProjectileGetCurrentSpeed) -LuaC(0x6A2890, ProjectileGetVelocity) -LuaC(0x6A2A10, ProjectileSetVelocity) -LuaC(0x6A2CF0, ProjectileSetScaleVelocity) -LuaC(0x6A2F60, ProjectileSetLocalAngularVelocity) -LuaC(0x6A3170, ProjectileSetCollision) -LuaC(0x6A32E0, ProjectileSetCollideSurface) -LuaC(0x6A3430, ProjectileSetCollideEntity) -LuaC(0x6A3580, ProjectileStayUnderwater) -LuaC(0x6A36D0, ProjectileTrackTarget) -LuaC(0x6A3820, ProjectileSetStayUpright) -LuaC(0x6A3960, ProjectileSetVelocityAlign) -LuaC(0x6A3AA0, ProjectileCreateChildProjectile) -LuaC(0x6A3CF0, ProjectileSetVelocityRandomUpVector) -LuaC(0x6A3F00, ProjectileChangeMaxZigZag) -LuaC(0x6A4070, ProjectileChangeZigZagFrequency) -LuaC(0x6A41E0, ProjectileChangeDetonateAboveHeight) -LuaC(0x6A4350, ProjectileChangeDetonateBelowHeight) -LuaC(0x6C3AB0, UnitGetUnitId) -LuaC(0x6C3C00, UnitSetCreator) -LuaC(0x6C3D80, UnitGetCargo) -LuaC(0x6C3F80, UnitAlterArmor) -LuaC(0x6C4180, UnitGetArmorMult) -LuaC(0x6C4370, UnitClearFocusEntity) -LuaC(0x6C44E0, UnitSetFocusEntity) -LuaC(0x6C4670, UnitGetFocusUnit) -LuaC(0x6C4800, UnitGetWeapon) -LuaC(0x6C49F0, UnitGetWeaponCount) -LuaC(0x6C4B40, UnitGetTargetEntity) -LuaC(0x6C4CA0, UnitGetHealth) -LuaC(0x6C4E10, UnitGetAttacker) -LuaC(0x6C4F60, UnitEnableManipulators) -LuaC(0x6C5170, UnitKillManipulator) -LuaC(0x6C52E0, UnitKillManipulators) -LuaC(0x6C54B0, UnitScaleGetBuiltEmitter) -LuaC(0x6C5780, UnitSetStrategicUnderlay) -LuaC(0x6C5900, UnitIsUnitState) -LuaC(0x6C5AA0, UnitIsIdleState) -LuaC(0x6C5C10, UnitIsStunned) -LuaC(0x6C5D60, UnitIsBeingBuilt) -LuaC(0x6C5EB0, UnitIsPaused) -LuaC(0x6C6000, UnitSetPaused) -LuaC(0x6C6140, UnitSetConsumptionActive) -LuaC(0x6C6290, UnitSetProductionActive) -LuaC(0x6C63F0, UnitSetBusy) -LuaC(0x6C6570, UnitSetBlockCommandQueue) -LuaC(0x6C66F0, UnitSetImmobile) -LuaC(0x6C6860, UnitSetStunned) -LuaC(0x6C69D0, UnitSetUnSelectable) -LuaC(0x6C6B40, UnitSetDoNotTarget) -LuaC(0x6C6CB0, UnitSetUnitState) -LuaC(0x6C6E80, UnitStopSiloBuild) -LuaC(0x6C6FB0, UnitSetIsValidTarget) -LuaC(0x6C70F0, UnitIsValidTarget) -LuaC(0x6C7230, UnitGetNumBuildOrders) -LuaC(0x6C7470, UnitCalculateWorldPositionFromRelative) -LuaC(0x6C7690, UnitGetScriptBit) -LuaC(0x6C7870, UnitSetScriptBit) -LuaC(0x6C7A30, UnitToggleScriptBit) -LuaC(0x6C7BD0, UnitToggleFireState) -LuaC(0x6C7D10, UnitSetFireState) -LuaC(0x6C7EA0, UnitGetFireState) -LuaC(0x6C7FE0, UnitSetAutoMode) -LuaC(0x6C8120, UnitAddBuildRestriction) -LuaC(0x6C8290, UnitRemoveBuildRestriction) -LuaC(0x6C8400, UnitRestoreBuildRestrictions) -LuaC(0x6C8560, UnitAddCommandCap) -LuaC(0x6C8700, UnitRemoveCommandCap) -LuaC(0x6C88A0, UnitRestoreCommandCaps) -LuaC(0x6C89E0, UnitTestCommandCaps) -LuaC(0x6C8B80, UnitAddToggleCap) -LuaC(0x6C8D20, UnitRemoveToggleCap) -LuaC(0x6C8EC0, UnitRestoreToggleCaps) -LuaC(0x6C9000, UnitTestToggleCaps) -LuaC(0x6C91A0, UnitSetRegenRate) -LuaC(0x6C9330, UnitRevertRegenRate) -LuaC(0x6C9460, UnitSetReclaimable) -LuaC(0x6C95B0, UnitSetCapturable) -LuaC(0x6C9700, UnitIsCapturable) -LuaC(0x6C9840, UnitSetOverchargePaused) -LuaC(0x6C9980, UnitIsOverchargePaused) -LuaC(0x6C9AC0, UnitSetBuildRate) -LuaC(0x6C9C50, UnitGetBuildRate) -LuaC(0x6C9DA0, UnitSetConsumptionPerSecondEnergy) -LuaC(0x6C9F40, UnitSetConsumptionPerSecondMass) -LuaC(0x6CA0E0, UnitSetProductionPerSecondEnergy) -LuaC(0x6CA270, UnitSetProductionPerSecondMass) -LuaC(0x6CA400, UnitGetConsumptionPerSecondEnergy) -LuaC(0x6CA550, UnitGetConsumptionPerSecondMass) -LuaC(0x6CA6A0, UnitGetProductionPerSecondEnergy) -LuaC(0x6CA7F0, UnitGetProductionPerSecondMass) -LuaC(0x6CA940, UnitGetResourceConsumed) -LuaC(0x6CAA80, UnitSetElevation) -LuaC(0x6CABF0, UnitRevertElevation) -LuaC(0x6CAD20, UnitSetSpeedMult) -LuaC(0x6CAE90, UnitSetAccMult) -LuaC(0x6CB000, UnitSetTurnMult) -LuaC(0x6CB170, UnitSetBreakOffTriggerMult) -LuaC(0x6CB2E0, UnitSetBreakOffDistanceMult) -LuaC(0x6CB450, UnitRevertCollisionShape) -LuaC(0x6CB580, UnitRecoilImpulse) -LuaC(0x6CB790, UnitGetCurrentLayer) -LuaC(0x6CB8E0, UnitCanPathTo) -LuaC(0x6CBCF0, UnitCanPathToRect) -LuaC(0x6CC040, UnitIsMobile) -LuaC(0x6CC180, UnitIsMoving) -LuaC(0x6CC2D0, UnitGetNavigator) -LuaC(0x6CC420, UnitGetVelocity) -LuaC(0x6CC5A0, UnitGetStat) -LuaC(0x6CC8E0, UnitSetStat) -LuaC(0x6CCB40, UnitSetWorkProgress) -LuaC(0x6CCCB0, UnitGetWorkProgress) -LuaC(0x6CCDF0, NotifyUpgrade) -LuaC(0x6CD300, UnitGetGuardedUnit) -LuaC(0x6CD460, UnitGetGuards) -LuaC(0x6CD660, UnitGetTransportFerryBeacon) -LuaC(0x6CD7E0, UnitHasValidTeleportDest) -LuaC(0x6CD950, UnitAddUnitToStorage) -LuaC(0x6CDB00, UnitSetCustomName) -LuaC(0x6CDC90, UnitHasMeleeSpaceAroundTarget) -LuaC(0x6CDED0, UnitMeleeWarpAdjacentToTarget) -LuaC(0x6CE200, UnitGetCommandQueue) -LuaC(0x6CE420, UnitPrintCommandQueue) -LuaC(0x6CEA60, UnitGetCurrentMoveLocation) -LuaC(0x6CECC0, UnitGiveNukeSiloAmmo) -LuaC(0x6CEE10, UnitRemoveNukeSiloAmmo) -LuaC(0x6CEF60, UnitGetNukeSiloAmmoCount) -LuaC(0x6CF0D0, UnitGiveTacticalSiloAmmo) -LuaC(0x6CF220, UnitRemoveTacticalSiloAmmo) -LuaC(0x6CF370, UnitGetTacticalSiloAmmoCount) -LuaC(0x6CF4E0, CreateUnit) -LuaC(0x6CFAF0, CreateUnitHPR) -LuaC(0x6D0000, CreateUnit2) -LuaC(0x6D03E0, UnitCanBuild) -LuaC(0x6D05D0, UnitGetRallyPoint) -LuaC(0x6D0770, UnitGetFuelUseTime) -LuaC(0x6D08D0, UnitSetFuelUseTime) -LuaC(0x6D0A50, UnitGetFuelRatio) -LuaC(0x6D0BB0, UnitSetFuelRatio) -LuaC(0x6D0D30, UnitSetShieldRatio) -LuaC(0x6D0EA0, UnitGetShieldRatio) -LuaC(0x6D0FE0, UnitGetBlip) -LuaC(0x6D1170, UnitTransportHasSpaceFor) -LuaC(0x6D1320, UnitTransportHasAvailableStorage) -LuaC(0x6D1470, UnitShowBone) -LuaC(0x6D1610, UnitHideBone) -LuaC(0x6D7BD0, UnitWeaponPlaySound) -LuaC(0x6D7D70, UnitWeaponSetEnabled) -LuaC(0x6D7F00, UnitWeaponSetTargetEntity) -LuaC(0x6D80C0, UnitWeaponSetTargetGround) -LuaC(0x6D8320, UnitWeaponResetTarget) -LuaC(0x6D8490, UnitWeaponCreateProjectile) -LuaC(0x6D8610, UnitWeaponDoInstaHit) -LuaC(0x6D8A60, UnitWeaponGetBlueprint) -LuaC(0x6D8C10, UnitWeaponGetProjectileBlueprint) -LuaC(0x6D8D70, UnitWeaponWeaponHasTarget) -LuaC(0x6D8EB0, UnitWeaponFireWeapon) -LuaC(0x6D8FE0, UnitWeaponSetFireControl) -LuaC(0x6D9150, UnitWeaponIsFireControl) -LuaC(0x6D9310, UnitWeaponGetCurrentTarget) -LuaC(0x6D9490, UnitWeaponGetCurrentTargetPos) -LuaC(0x6D9630, UnitWeaponCanFire) -LuaC(0x6D97C0, UnitWeaponChangeFiringTolerance) -LuaC(0x6D9920, UnitWeaponChangeRateOfFire) -LuaC(0x6D9A80, UnitWeaponChangeMinRadius) -LuaC(0x6D9C00, UnitWeaponChangeMaxRadius) -LuaC(0x6D9D80, UnitWeaponChangeMaxHeightDiff) -LuaC(0x6D9EE0, UnitWeaponChangeDamageType) -LuaC(0x6DA070, UnitWeaponChangeDamageRadius) -LuaC(0x6DA1E0, UnitWeaponChangeDamage) -LuaC(0x6DA350, UnitWeaponSetFireTargetLayerCaps) -LuaC(0x6DA4E0, UnitWeaponSetTargetingPriorities) -LuaC(0x6DA6B0, UnitWeaponGetFiringRandomness) -LuaC(0x6DA7F0, UnitWeaponSetFiringRandomness) -LuaC(0x6DA960, UnitWeaponGetFireClockPct) -LuaC(0x6DAAE0, UnitWeaponChangeProjectileBlueprint) -LuaC(0x6DAC80, UnitWeaponTransferTarget) -LuaC(0x6DADF0, UnitWeaponBeenDestroyed) -LuaC(0x6F17B0, IsCommandDone) -LuaC(0x6F18E0, IssueClearCommands) -LuaC(0x6F1A40, IssueStop) -LuaC(0x6F1BE0, IssuePause) -LuaC(0x6F1D80, IssueOverCharge) -LuaC(0x6F2030, IssueDive) -LuaC(0x6F2250, IssueFactoryRallyPoint) -LuaC(0x6F2510, IssueClearFactoryCommands) -LuaC(0x6F2660, IssueMove) -LuaC(0x6F2960, IssueMoveOffFactory) -LuaC(0x6F2C70, IssueFormMove) -LuaC(0x6F30D0, IssueGuard) -LuaC(0x6F33A0, IssueFactoryAssist) -LuaC(0x6F3650, IssueAttack) -LuaC(0x6F3910, CoordinateAttacks) -LuaC(0x6F3B60, IssueFormAttack) -LuaC(0x6F3F40, IssueSiloBuildTactical) -LuaC(0x6F40A0, IssueSiloBuildNuke) -LuaC(0x6F4200, IssueNuke) -LuaC(0x6F4490, IssueTactical) -LuaC(0x6F4720, IssueTeleport) -LuaC(0x6F49B0, IssuePatrol) -LuaC(0x6F4C80, IssueFormPatrol) -LuaC(0x6F50B0, IssueAggressiveMove) -LuaC(0x6F53C0, IssueFormAggressiveMove) -LuaC(0x6F5820, IssueFerry) -LuaC(0x6F5AF0, IssueBuildMobile) -LuaC(0x6F6060, IssueRepair) -LuaC(0x6F6330, IssueSacrifice) -LuaC(0x6F6600, IssueUpgrade) -LuaC(0x6F67A0, IssueScript) -LuaC(0x6F6960, IssueReclaim) -LuaC(0x6F6C20, IssueCapture) -LuaC(0x6F6EE0, IssueKillSelf) -LuaC(0x6F7060, IssueDestroySelf) -LuaC(0x6F71E0, IssueTransportLoad) -LuaC(0x6F7530, IssueTransportUnload) -LuaC(0x6F77E0, IssueTeleportToBeacon) -LuaC(0x6F7A70, IssueTransportUnloadSpecific) -LuaC(0x6F7EA0, IssueBuildFactory) -LuaC(0x6FBF90, CreatePropHPR) -LuaC(0x6FC3B0, CreateProp) -LuaC(0x6FC590, EntityCreatePropAtBone) -LuaC(0x6FC830, SplitProp) -LuaC(0x6FCA80, EntityPushOver) -LuaC(0x6FCF40, PropAddBoundedProp) -LuaC(0x7080B0, ShouldCreateInitialArmyUnits) -LuaC(0x7081A0, ListArmies) -LuaC(0x708310, GetArmyBrain) -LuaC(0x708460, SetArmyStart) -LuaC(0x7085E0, GenerateArmyStart) -LuaC(0x7086D0, SetArmyPlans) -LuaC(0x708870, InitializeArmyAI) -LuaC(0x708970, ArmyInitializePrebuiltUnits) -LuaC(0x708A70, ArmyGetHandicap) -LuaC(0x708B90, SetArmyEconomy) -LuaC(0x708D60, GetArmyUnitCostTotal) -LuaC(0x708E60, GetArmyUnitCap) -LuaC(0x708F70, SetArmyUnitCap) -LuaC(0x7090A0, SetIgnoreArmyUnitCap) -LuaC(0x7091B0, SetIgnorePlayableRect) -LuaC(0x7092C0, CreateInitialArmyUnit) -LuaC(0x709590, SetAlliance) -LuaC(0x709720, SetAllianceOneWay) -LuaC(0x7098A0, SetAlliedVictory) -LuaC(0x7099C0, IsAlly) -LuaC(0x709AF0, IsEnemy) -LuaC(0x709C20, IsNeutral) -LuaC(0x709D50, ArmyIsCivilian) -LuaC(0x709E50, SetArmyColorIndex) -LuaC(0x709FB0, SetArmyFactionIndex) -LuaC(0x70A100, SetArmyAIPersonality) -LuaC(0x70A2A0, SetArmyColor) -LuaC(0x70A5E0, SetArmyShowScore) -LuaC(0x70A6E0, AddBuildRestriction) -LuaC(0x70A800, RemoveBuildRestriction) -LuaC(0x70A920, OkayToMessWithArmy) -LuaC(0x70AA60, ArmyIsOutOfGame) -LuaC(0x70AB60, SetArmyOutOfGame) -LuaC(0x72B810, CPlatoonIsOpponentAIRunning) -LuaC(0x72B970, CPlatoonGetPersonality) -LuaC(0x72BAD0, CPlatoonGetBrain) -LuaC(0x72BC10, CPlatoonGetFactionIndex) -LuaC(0x72BD60, CPlatoonUniquelyNamePlatoon) -LuaC(0x72BEF0, CPlatoonGetPlatoonUniqueName) -LuaC(0x72C040, CPlatoonGetAIPlan) -LuaC(0x72C190, CPlatoonSwitchAIPlan) -LuaC(0x72C300, CPlatoonGetPlatoonPosition) -LuaC(0x72C5C0, CPlatoonGetSquadPosition) -LuaC(0x72C7D0, CPlatoonGetSquadUnits) -LuaC(0x72C9B0, CPlatoonGetPlatoonUnits) -LuaC(0x72CC00, CPlatoonCanConsiderFormingPlatoon) -LuaC(0x72CE70, CPlatoonCanFormPlatoon) -LuaC(0x72D870, CPlatoonFormPlatoon) -LuaC(0x72E240, CPlatoonIsAttacking) -LuaC(0x72E3E0, CPlatoonIsMoving) -LuaC(0x72E580, CPlatoonIsPatrolling) -LuaC(0x72E720, CPlatoonIsFerrying) -LuaC(0x72E8C0, CPlatoonSetPrioritizedTargetList) -LuaC(0x72EB30, CPlatoonFindPrioritizedUnit) -LuaC(0x72EDE0, CPlatoonFindClosestUnit) -LuaC(0x72F020, CPlatoonFindClosestUnitToBase) -LuaC(0x72F290, CPlatoonFindFurthestUnit) -LuaC(0x72F4D0, CPlatoonFindHighestValueUnit) -LuaC(0x72F710, CPlatoonCanAttackTarget) -LuaC(0x72F940, CPlatoonStop) -LuaC(0x72FAE0, CPlatoonAttackTarget) -LuaC(0x72FDB0, CPlatoonMoveToTarget) -LuaC(0x7300A0, CPlatoonMoveToLocation) -LuaC(0x7303A0, CPlatoonAggressiveMoveToLocation) -LuaC(0x730680, CPlatoonFerryToLocation) -LuaC(0x7308F0, CPlatoonLoadUnits) -LuaC(0x730B10, CPlatoonUnloadUnitsAtLocation) -LuaC(0x730DB0, CPlatoonUnloadAllAtLocation) -LuaC(0x731020, CPlatoonGuardTarget) -LuaC(0x7312F0, CPlatoonPatrol) -LuaC(0x7314F0, CPlatoonDestroy) -LuaC(0x731690, CPlatoonDisbandOnIdle) -LuaC(0x7317C0, CPlatoonGetFerryBeacons) -LuaC(0x7319B0, CPlatoonUseFerryBeacon) -LuaC(0x731C30, CPlatoonUseTeleporter) -LuaC(0x731F00, CPlatoonIsCommandsActive) -LuaC(0x7320C0, CPlatoonSetPlatoonFormationOverride) -LuaC(0x7322D0, CPlatoonGetPlatoonLifetimeStats) -LuaC(0x7324A0, CPlatoonCalculatePlatoonThreat) -LuaC(0x7328E0, CPlatoonCalculatePlatoonThreatAroundPosition) -LuaC(0x732E40, CPlatoonPlatoonCategoryCountAroundPosition) -LuaC(0x7331C0, CPlatoonPlatoonCategoryCount) -LuaC(0x738630, CDamageGetInstigator) -LuaC(0x738790, CDamageSetInstigator) -LuaC(0x738900, CDamageGetTarget) -LuaC(0x738A60, CDamageSetTarget) -LuaC(0x738BD0, Damage) -LuaC(0x738F40, DamageArea) -LuaC(0x7392C0, DamageRing) -LuaC(0x7396E0, MetaImpact) -LuaC(0x74B570, Sim_print) -LuaC(0x74B620, CheatsEnabled) -LuaC(0x74B710, GetCurrentCommandSource) -LuaC(0x74B830, EndGame) -LuaC(0x74B900, IsGameOver) -LuaC(0x74B9F0, GetEntityById) -LuaC(0x74BB40, GetUnitById) -LuaC(0x758F90, Random) -LuaC(0x759190, FlattenMapRect) -LuaC(0x7593D0, SelectedUnit) -LuaC(0x7594C0, SimConExecute) -LuaC(0x759810, ParseEntityCategory) -LuaC(0x759990, EntityCategoryContains) -LuaC(0x759BD0, EntityCategoryFilterDown) -LuaC(0x759EF0, EntityCategoryCount) -LuaC(0x75A1D0, EntityCategoryCountAroundPosition) -LuaC(0x75A580, GenerateRandomOrientation) -LuaC(0x75A770, GetGameTimeSeconds) -LuaC(0x75A860, GetGameTick) -LuaC(0x75A950, GetSystemTimeSecondsOnlyForProfileUse) -LuaC(0x75AA30, GetEntitiesInRect) -LuaC(0x75AE00, GetUnitsInRect) -LuaC(0x75B200, GetReclaimablesInRect) -LuaC(0x75B5D0, ChangeUnitArmy) -LuaC(0x75B940, Warp) -LuaC(0x75BBE0, GetMapSize) -LuaC(0x75BCF0, GetTerrainHeight) -LuaC(0x75BE70, GetSurfaceHeight) -LuaC(0x75C030, GetTerrainTypeOffset) -LuaC(0x75C1B0, GetTerrainType) -LuaC(0x75C3B0, SetTerrainType) -LuaC(0x75C5D0, SetTerrainTypeRect) -LuaC(0x75C7B0, SetPlayableRect) -LuaC(0x75C9D0, FlushIntelInRect) -LuaC(0x75CC20, GetUnitBlueprintByName) -LuaC(0x75CDD0, GetFocusArmy) -LuaC(0x75CEC0, AudioSetLanguage) -LuaC(0x75CF90, HasLocalizedVO) -LuaC(0x75D060, TryCopyPose) -LuaC(0x75D970, SetArmyStatsSyncArmy) -LuaC(0x75DA80, SubmitXMLArmyStats) -LuaC(0x75DB80, DrawLine) -LuaC(0x75DDA0, DrawLinePop) -LuaC(0x75E0B0, DrawCircle) -LuaC(0x75E2A0, DebugGetSelection) -LuaC(0x75E4E0, IsEntity) -LuaC(0x75E620, IsUnit) -LuaC(0x75E780, IsProp) -LuaC(0x75E8E0, IsBlip) -LuaC(0x75EA40, IsProjectile) -LuaC(0x75EBA0, IsCollisionBeam) -LuaC(0x761570, PlayLoop) -LuaC(0x761700, StopLoop) -LuaC(0x775630, CreateEconomyEvent) -LuaC(0x775910, RemoveEconomyEvent) -LuaC(0x775A40, EconomyEventIsDone) -LuaC(0x776A20, _c_CreateShield) -LuaC(0x780A70, GetTextureDimensions) -LuaC(0x780D20, InternalCreateBitmap) -LuaC(0x780ED0, CMauiBitmapSetNewTexture) -LuaC(0x781440, CMauiBitmapInternalSetSolidColor) -LuaC(0x781690, CMauiBitmapSetUV) -LuaC(0x781950, CMauiBitmapUseAlphaHitTest) -LuaC(0x781AA0, CMauiBitmapSetTiled) -LuaC(0x781BF0, CMauiBitmapLoop) -LuaC(0x781D40, CMauiBitmapPlay) -LuaC(0x781EA0, CMauiBitmapStop) -LuaC(0x782000, CMauiBitmapSetFrame) -LuaC(0x782180, CMauiBitmapGetFrame) -LuaC(0x7822C0, CMauiBitmapGetNumFrames) -LuaC(0x782420, CMauiBitmapSetFrameRate) -LuaC(0x7825A0, CMauiBitmapSetForwardPattern) -LuaC(0x7826E0, CMauiBitmapSetBackwardPattern) -LuaC(0x782820, CMauiBitmapSetPingPongPattern) -LuaC(0x782960, CMauiBitmapSetLoopPingPongPattern) -LuaC(0x782AA0, CMauiBitmapSetFramePattern) -LuaC(0x782CE0, CMauiBitmapShareTextures) -LuaC(0x7857B0, InternalCreateBorder) -LuaC(0x785960, CMauiBorderSetNewTextures) -LuaC(0x785FA0, CMauiBorderSetSolidColor) -LuaC(0x787A50, CMauiControlDestroy) -LuaC(0x787BA0, CMauiControlGetParent) -LuaC(0x787CF0, CMauiControlClearChildren) -LuaC(0x787E30, CMauiControlSetParent) -LuaC(0x787FB0, CMauiControlDisableHitTest) -LuaC(0x788130, CMauiControlEnableHitTest) -LuaC(0x7882B0, CMauiControlIsHitTestDisabled) -LuaC(0x7883F0, CMauiControlHide) -LuaC(0x788520, CMauiControlShow) -LuaC(0x788650, CMauiControlSetHidden) -LuaC(0x788790, CMauiControlIsHidden) -LuaC(0x7888D0, CMauiControlGetRenderPass) -LuaC(0x788A10, CMauiControlSetRenderPass) -LuaC(0x788B90, CMauiControlGetName) -LuaC(0x788D00, CMauiControlSetName) -LuaC(0x788E90, CMauiControlDump) -LuaC(0x788FC0, CMauiControlGetCurrentFocusControl) -LuaC(0x7890B0, CMauiControlAcquireKeyboardFocus) -LuaC(0x789210, CMauiControlAbandonKeyboardFocus) -LuaC(0x789350, CMauiControlNeedsFrameUpdate) -LuaC(0x789490, CMauiControlSetNeedsFrameUpdate) -LuaC(0x7895D0, CMauiControlGetRootFrame) -LuaC(0x789710, CMauiControlSetAlpha) -LuaC(0x789A30, CMauiControlGetAlpha) -LuaC(0x789B70, CMauiControlApplyFunction) -LuaC(0x789CD0, CMauiControlHitTest) -LuaC(0x78CFD0, _c_CreateCursor) -LuaC(0x78D130, CMauiCursorSetNewTexture) -LuaC(0x78D390, CMauiCursorSetDefaultTexture) -LuaC(0x78D5A0, CMauiCursorResetToDefault) -LuaC(0x78D6C0, CMauiCursorHide) -LuaC(0x78D7F0, CMauiCursorShow) -LuaC(0x78DF80, CMauiLuaDraggerDestroy) -LuaC(0x78E0B0, InternalCreateDragger) -LuaC(0x78E210, PostDragger) -LuaC(0x791FF0, InternalCreateEdit) -LuaC(0x7921A0, CMauiEditSetNewFont) -LuaC(0x7923C0, CMauiEditSetNewForegroundColor) -LuaC(0x792530, CMauiEditGetForegroundColor) -LuaC(0x792690, CMauiEditSetNewBackgroundColor) -LuaC(0x792810, CMauiEditGetBackgroundColor) -LuaC(0x792970, CMauiEditShowBackground) -LuaC(0x792AC0, CMauiEditIsBackgroundVisible) -LuaC(0x792C00, CMauiEditClearText) -LuaC(0x792D30, CMauiEditSetText) -LuaC(0x792F00, CMauiEditGetText) -LuaC(0x793070, CMauiEditSetMaxChars) -LuaC(0x793200, CMauiEditGetMaxChars) -LuaC(0x793340, CMauiEditSetCaretPosition) -LuaC(0x7934C0, CMauiEditGetCaretPosition) -LuaC(0x793600, CMauiEditShowCaret) -LuaC(0x793750, CMauiEditIsCaretVisible) -LuaC(0x793890, CMauiEditSetNewCaretColor) -LuaC(0x793A00, CMauiEditGetCaretColor) -LuaC(0x793B60, CMauiEditSetCaretCycle) -LuaC(0x793D70, CMauiEditIsEnabled) -LuaC(0x793EB0, CMauiEditEnableInput) -LuaC(0x793FF0, CMauiEditDisableInput) -LuaC(0x794140, CMauiEditSetNewHighlightForegroundColor) -LuaC(0x7942B0, CMauiEditGetHighlightForegroundColor) -LuaC(0x794410, CMauiEditSetNewHighlightBackgroundColor) -LuaC(0x794580, CMauiEditGetHighlightBackgroundColor) -LuaC(0x7946E0, CMauiEditGetFontHeight) -LuaC(0x794840, CMauiEditAcquireFocus) -LuaC(0x794990, CMauiEditAbandonFocus) -LuaC(0x794AD0, CMauiEditSetDropShadow) -LuaC(0x794C20, CMauiEditGetStringAdvance) -LuaC(0x796790, InternalCreateFrame) -LuaC(0x796900, CMauiFrameGetTopmostDepth) -LuaC(0x796A50, CMauiFrameGetTargetHead) -LuaC(0x796B90, CMauiFrameSetTargetHead) -LuaC(0x797310, InternalCreateGroup) -LuaC(0x797920, InternalCreateHistogram) -LuaC(0x797AD0, CMauiHistogramSetXIncrement) -LuaC(0x797C50, CMauiHistogramSetYIncrement) -LuaC(0x797DD0, CMauiHistogramSetData) -LuaC(0x79A960, InternalCreateItemList) -LuaC(0x79AB10, CMauiItemListSetNewFont) -LuaC(0x79AD30, CMauiItemListSetNewColors) -LuaC(0x79B040, CMauiItemListGetItem) -LuaC(0x79B1E0, CMauiItemListAddItem) -LuaC(0x79B370, CMauiItemListModifyItem) -LuaC(0x79B560, CMauiItemListDeleteItem) -LuaC(0x79B6E0, CMauiItemListDeleteAllItems) -LuaC(0x79B840, CMauiItemListGetSelection) -LuaC(0x79B980, CMauiItemListSetSelection) -LuaC(0x79BB40, CMauiItemListGetItemCount) -LuaC(0x79BCB0, CMauiItemListEmpty) -LuaC(0x79BE10, CMauiItemListScrollToTop) -LuaC(0x79BF40, CMauiItemListScrollToBottom) -LuaC(0x79C070, CMauiItemListShowItem) -LuaC(0x79C200, CMauiItemListGetRowHeight) -LuaC(0x79C350, CMauiItemListGetStringAdvance) -LuaC(0x79C4E0, CMauiItemListShowMouseoverItem) -LuaC(0x79C620, CMauiItemListShowSelection) -LuaC(0x79C760, CMauiItemListNeedsScrollBar) -LuaC(0x79D7A0, IsKeyDown) -LuaC(0x79D8D0, KeycodeMauiToMSW) -LuaC(0x79D9F0, KeycodeMSWToMaui) -LuaC(0x79E590, InternalCreateMesh) -LuaC(0x79E740, CMauiMeshSetMesh) -LuaC(0x79E8B0, CMauiMeshSetOrientation) -LuaC(0x79F540, InternalCreateMovie) -LuaC(0x79F6F0, CMauiMovieInternalSet) -LuaC(0x79F870, CMauiMovieLoop) -LuaC(0x79F9C0, CMauiMoviePlay) -LuaC(0x79FB20, CMauiMovieStop) -LuaC(0x79FC70, CMauiMovieIsLoaded) -LuaC(0x79FDD0, CMauiMovieGetNumFrames) -LuaC(0x79FF20, CMauiMovieGetFrameRate) -LuaC(0x7A1590, InternalCreateScrollbar) -LuaC(0x7A17A0, CMauiScrollbarSetScrollable) -LuaC(0x7A1920, CMauiScrollbarSetNewTextures) -LuaC(0x7A2080, CMauiScrollbarDoScrollLines) -LuaC(0x7A2220, CMauiScrollbarDoScrollPages) -LuaC(0x7A3340, InternalCreateText) -LuaC(0x7A34F0, CMauiTextSetNewFont) -LuaC(0x7A3710, CMauiTextSetText) -LuaC(0x7A3880, CMauiTextGetText) -LuaC(0x7A39F0, CMauiTextSetNewColor) -LuaC(0x7A3B60, CMauiTextSetDropShadow) -LuaC(0x7A3CB0, CMauiTextSetCenteredHorizontally) -LuaC(0x7A3E00, CMauiTextSetCenteredVertically) -LuaC(0x7A3F50, CMauiTextGetStringAdvance) -LuaC(0x7A40E0, CMauiTextSetNewClipToWidth) -LuaC(0x7A5190, AnyInputCapture) -LuaC(0x7A5280, GetInputCapture) -LuaC(0x7A53B0, AddInputCapture) -LuaC(0x7A54E0, RemoveInputCapture) -LuaC(0x7AB080, GetCamera) -LuaC(0x7AB1B0, CameraImplMoveToRegion) -LuaC(0x7AB4E0, CameraImplSnapTo) -LuaC(0x7AB6E0, CameraImplMoveTo) -LuaC(0x7AB930, CameraImplReset) -LuaC(0x7ABA60, CameraImplTrackEntities) -LuaC(0x7ABE40, CameraImplTargetEntities) -LuaC(0x7AC1C0, CameraImplNoseCam) -LuaC(0x7AC500, CameraImplHoldRotation) -LuaC(0x7AC630, CameraImplRevertRotation) -LuaC(0x7AC760, CameraImplSetZoom) -LuaC(0x7AC930, CameraImplSetTargetZoom) -LuaC(0x7ACAA0, CameraImplSetAccMode) -LuaC(0x7ACC40, CameraImplGetZoom) -LuaC(0x7ACD80, CameraImplGetFocusPosition) -LuaC(0x7ACEE0, CameraImplSaveSettings) -LuaC(0x7AD0D0, CameraImplRestoreSettings) -LuaC(0x7AD3D0, CameraImplGetTargetZoom) -LuaC(0x7AD510, CameraImplGetMaxZoom) -LuaC(0x7AD650, CameraImplGetMinZoom) -LuaC(0x7AD720, CameraImplSetMaxZoomMult) -LuaC(0x7AD890, CameraImplSpin) -LuaC(0x7ADA90, CameraImplUseGameClock) -LuaC(0x7ADBC0, CameraImplUseSystemClock) -LuaC(0x7ADCF0, CameraImplEnableEaseInOut) -LuaC(0x7ADE20, CameraImplDisableEaseInOut) -LuaC(0x7B5170, CreateUnitAtMouse) -LuaC(0x7B5E60, CPathDebuggerDestroy) -LuaC(0x7B5F90, _c_CreatePathDebugger) -LuaC(0x7B9DE0, GpgNetActive) -LuaC(0x7B9EB0, GpgNetSend) -LuaC(0x7BA2C0, LaunchGPGNet) -LuaC(0x7C0060, InternalCreateDiscoveryService) -LuaC(0x7C01C0, CDiscoveryServiceGetGameCount) -LuaC(0x7C0310, CDiscoveryServiceReset) -LuaC(0x7C0430, CDiscoveryServiceDestroy) -LuaC(0x7C0CC0, InternalCreateLobby) -LuaC(0x7C13E0, CLobbyDestroy) -LuaC(0x7C1530, CLobbyMakeValidGameName) -LuaC(0x7C18D0, CLobbyMakeValidPlayerName) -LuaC(0x7C1C80, CLobbyHostGame) -LuaC(0x7C1FA0, CLobbyJoinGame) -LuaC(0x7C2350, CLobbyBroadcastData) -LuaC(0x7C2650, CLobbySendData) -LuaC(0x7C2B00, CLobbyGetPeers) -LuaC(0x7C2C60, CLobbyGetPeer) -LuaC(0x7C2DF0, CLobbyGetLocalPlayerName) -LuaC(0x7C2F40, CLobbyGetLocalPlayerID) -LuaC(0x7C3090, CLobbyIsHost) -LuaC(0x7C31D0, CLobbyGetLocalPort) -LuaC(0x7C3340, CLobbyEjectPeer) -LuaC(0x7C34D0, CLobbyConnectToPeer) -LuaC(0x7C3760, CLobbyDisconnectFromPeer) -LuaC(0x7C50E0, CLobbyLaunchGame) -LuaC(0x7C5360, CLobbyDebugDump) -LuaC(0x7C82E0, ValidateIPAddress) -LuaC(0x7FDAF0, AddBlinkyBox) -LuaC(0x836360, SetCurrentFactoryForQueueDisplay) -LuaC(0x8365B0, ClearCurrentFactoryForQueueDisplay) -LuaC(0x8366C0, IncreaseBuildCountInQueue) -LuaC(0x836900, DecreaseBuildCountInQueue) -LuaC(0x83A190, IN_AddKeyMapTable) -LuaC(0x83A2B0, IN_RemoveKeyMapTable) -LuaC(0x83A3D0, IN_ClearKeyMap) -LuaC(0x83DA90, ConTextMatches) -LuaC(0x83F000, EngineStartSplashScreens) -LuaC(0x83F0E0, EngineStartFrontEndUI) -LuaC(0x83F1C0, ExitApplication) -LuaC(0x83F2B0, ExitGame) -LuaC(0x83F3A0, RestartSession) -LuaC(0x83F470, GetFrame) -LuaC(0x83F5D0, ClearFrame) -LuaC(0x83F700, GetNumRootFrames) -LuaC(0x83F800, GetEconomyTotals) -LuaC(0x83FED0, GetResourceSharing) -LuaC(0x83FFE0, GetSimTicksPerSecond) -LuaC(0x8400B0, GetUnitCommandData) -LuaC(0x840840, GetUnitCommandFromCommandCap) -LuaC(0x8409F0, IssueDockCommand) -LuaC(0x841530, IssueCommand) -LuaC(0x841840, IssueUnitCommand) -LuaC(0x841B90, IssueBlueprintCommand) -LuaC(0x8420A0, GetCurrentUIState) -LuaC(0x8428A0, GetRolloverInfo) -LuaC(0x842BB0, GetMouseWorldPos) -LuaC(0x842D10, GetMouseScreenPos) -LuaC(0x842E60, UI_SetFocusArmy) -LuaC(0x842FD0, UI_GetFocusArmy) -LuaC(0x8430D0, IsObserver) -LuaC(0x8431D0, GetGameTime) -LuaC(0x843380, UI_GetGameTimeSeconds) -LuaC(0x843480, GetSystemTime) -LuaC(0x8435F0, GetSystemTimeSeconds) -LuaC(0x8436D0, FormatTime) -LuaC(0x8438A0, GetSimRate) -LuaC(0x8439A0, GetArmiesTable) -LuaC(0x843E50, GetArmyScore) -LuaC(0x843F20, DeleteCommand) -LuaC(0x8440A0, GetSpecialFiles) -LuaC(0x844540, GetSpecialFilePath) -LuaC(0x844C30, GetSpecialFolder) -LuaC(0x844F10, RemoveSpecialFile) -LuaC(0x845540, GetSpecialFileInfo) -LuaC(0x845DF0, RemoveProfileDirectories) -LuaC(0x846200, CopyCurrentReplay) -LuaC(0x846760, SetFrontEndData) -LuaC(0x846960, GetFrontEndData) -LuaC(0x846B60, SetOverlayFilter) -LuaC(0x846F70, SetOverlayFilters) -LuaC(0x8471C0, GenerateBuildTemplateFromSelection) -LuaC(0x847270, GetActiveBuildTemplate) -LuaC(0x847560, SetActiveBuildTemplate) -LuaC(0x847A20, ClearBuildTemplates) -LuaC(0x847AD0, RenderOverlayMilitary) -LuaC(0x847BC0, RenderOverlayIntel) -LuaC(0x847CB0, RenderOverlayEconomy) -LuaC(0x847D90, TeamColorMode) -LuaC(0x847E70, UI_GetUnitById) -LuaC(0x847FD0, OpenURL) -LuaC(0x848260, MapBorderAdd) -LuaC(0x8483D0, MapBorderClear) -LuaC(0x84DC80, SetCursor) -LuaC(0x84DDE0, GetCursor) -LuaC(0x84DEF0, SetUIControlsAlpha) -LuaC(0x84E000, GetUIControlsAlpha) -LuaC(0x84E0F0, FlushEvents) -LuaC(0x850D20, InternalCreateMapPreview) -LuaC(0x850ED0, CUIMapPreviewSetTexture) -LuaC(0x851040, CUIMapPreviewSetTextureFromMap) -LuaC(0x8511B0, CUIMapPreviewClearTexture) -LuaC(0x857B60, AddCommandFeedbackBlip) -LuaC(0x866D30, UISelectionByCategory) -LuaC(0x866F40, UISelectAndZoomTo) -LuaC(0x8671C0, UIZoomTo) -LuaC(0x86A8D0, InternalCreateWldUIProvider) -LuaC(0x86AA50, CLuaWldUIProviderDestroy) -LuaC(0x86BB30, InternalCreateWorldMesh) -LuaC(0x86BC90, CUIWorldMeshDestroy) -LuaC(0x86BDC0, CUIWorldMeshSetMesh) -LuaC(0x86BF50, CUIWorldMeshSetStance) -LuaC(0x86C1D0, CUIWorldMeshSetHidden) -LuaC(0x86C310, CUIWorldMeshIsHidden) -LuaC(0x86C450, CUIWorldMeshSetAuxiliaryParameter) -LuaC(0x86C5D0, CUIWorldMeshSetFractionCompleteParameter) -LuaC(0x86C750, CUIWorldMeshSetFractionHealthParameter) -LuaC(0x86C8D0, CUIWorldMeshSetLifetimeParameter) -LuaC(0x86CA50, CUIWorldMeshSetColor) -LuaC(0x86CBB0, CUIWorldMeshSetScale) -LuaC(0x86CD40, CUIWorldMeshGetInterpolatedPosition) -LuaC(0x86CF00, CUIWorldMeshGetInterpolatedSphere) -LuaC(0x86D0F0, CUIWorldMeshGetInterpolatedAlignedBox) -LuaC(0x86D320, CUIWorldMeshGetInterpolatedOrientedBox) -LuaC(0x86D5E0, CUIWorldMeshGetInterpolatedScroll) -LuaC(0x871690, CUIWorldView__init) -LuaC(0x871A20, CUIWorldViewCameraReset) -LuaC(0x871B70, CUIWorldViewGetsGlobalCameraCommands) -LuaC(0x871CC0, CUIWorldViewGetRightMouseButtonOrder) -LuaC(0x871EC0, CUIWorldViewHasHighlightCommand) -LuaC(0x871FA0, CUIWorldViewShowConvertToPatrolCursor) -LuaC(0x8720E0, CUIWorldViewUnlockInput) -LuaC(0x872200, CUIWorldViewLockInput) -LuaC(0x872330, CUIWorldViewIsInputLocked) -LuaC(0x872470, CUIWorldViewSetHighlightEnabled) -LuaC(0x8725B0, CUIWorldViewZoomScale) -LuaC(0x872830, CUIWorldViewGetScreenPos) -LuaC(0x872C60, UnProject) -LuaC(0x872E20, CUIWorldViewProject) -LuaC(0x873170, CUIWorldViewSetCartographic) -LuaC(0x8732C0, CUIWorldViewIsCartographic) -LuaC(0x873410, CUIWorldViewEnableResourceRendering) -LuaC(0x873550, CUIWorldViewIsResourceRenderingEnabled) -LuaC(0x874FA0, SetMovieVolume) -LuaC(0x875100, GetMovieVolume) -LuaC(0x8753A0, GetMovieDuration) -LuaC(0x876DD0, LaunchReplaySession) -LuaC(0x87F1E0, _c_CreateDecal) -LuaC(0x87F360, ScriptedDecalSetTexture) -LuaC(0x87F4C0, ScriptedDecalSetScale) -LuaC(0x87F660, ScriptedDecalSetPositionByScreen) -LuaC(0x87F7E0, ScriptedDecalSetPosition) -LuaC(0x87F950, ScriptedDecalDestroy) -LuaC(0x880C40, LoadSavedGame) -LuaC(0x881AB0, InternalSaveGame) -LuaC(0x886350, PrefetchSession) -LuaC(0x88D340, LaunchSinglePlayerSession) -LuaC(0x88D4C0, GetSessionClients) -LuaC(0x88D8F0, EjectSessionClient) -LuaC(0x88DA80, SessionSendChatMessage) -LuaC(0x88DED0, WorldIsLoading) -LuaC(0x88DFB0, WorldIsPlaying) -LuaC(0x88E1E0, GetGameSpeed) -LuaC(0x88E2E0, SetGameSpeed) -LuaC(0x897780, SessionRequestPause) -LuaC(0x897850, SessionResume) -LuaC(0x897920, SessionIsPaused) -LuaC(0x897A00, SessionIsGameOver) -LuaC(0x897AF0, SessionGetCommandSourceNames) -LuaC(0x897C70, SessionGetLocalCommandSource) -LuaC(0x897D70, UI_SessionIsReplay) -LuaC(0x897E60, SessionIsBeingRecorded) -LuaC(0x897F50, SessionIsMultiplayer) -LuaC(0x898040, SessionIsObservingAllowed) -LuaC(0x898130, SessionCanRestart) -LuaC(0x898220, SessionIsActive) -LuaC(0x8982F0, SessionGetScenarioInfo) -LuaC(0x898430, SessionEndGame) -LuaC(0x8ACDA0, PauseSound) -LuaC(0x8ACF50, PauseVoice) -LuaC(0x8AD100, PlaySound) -LuaC(0x8AD280, SoundIsPrepared) -LuaC(0x8AD400, StartSound) -LuaC(0x8AD550, StopSound) -LuaC(0x8AD6F0, SetVolume) -LuaC(0x8AD850, GetVolume) -LuaC(0x8AD970, StopAllSounds) -LuaC(0x8ADA50, DisableWorldSounds) -LuaC(0x8ADB30, EnableWorldSounds) -LuaC(0x8ADC10, PlayTutorialVO) -LuaC(0x8ADD80, PlayVoice) -LuaC(0x8ADFF0, UI_AudioSetLanguage) -LuaC(0x8AE280, UI_HasLocalizedVO) -LuaC(0x8B9B00, UI_ParseEntityCategory) -LuaC(0x8B9C90, UI_EntityCategoryContains) -LuaC(0x8B9EF0, UI_EntityCategoryFilterDown) -LuaC(0x8BA220, EntityCategoryFilterOut) -LuaC(0x8BA540, ExecLuaInSim) -LuaC(0x8BA6F0, SimCallback) -LuaC(0x8BA9F0, GetIsPaused) -LuaC(0x8BABA0, GetIsAutoMode) -LuaC(0x8BAD60, SetAutoMode) -LuaC(0x8BAF60, GetIsSubmerged) -LuaC(0x8BB120, GetIsAutoSurfaceMode) -LuaC(0x8BB2E0, SetAutoSurfaceMode) -LuaC(0x8BB4E0, GetFireState) -LuaC(0x8BB6E0, ToggleFireState) -LuaC(0x8BB990, SetFireState) -LuaC(0x8BBB90, GetScriptBit) -LuaC(0x8BBDE0, ToggleScriptBit) -LuaC(0x8BC080, SetPaused) -LuaC(0x8BC280, GetAttachedUnitsList) -LuaC(0x8BC570, ValidateUnitsList) -LuaC(0x8BC7A0, GetAssistingUnitsList) -LuaC(0x8BCC30, GetArmyAvatars) -LuaC(0x8BCE70, GetIdleEngineers) -LuaC(0x8BD100, GetIdleFactories) -LuaC(0x8BD390, GetValidAttackingUnits) -LuaC(0x8BD600, GetSelectedUnits) -LuaC(0x8BD870, SelectUnits) -LuaC(0x8BDC30, AddSelectUnits) -LuaC(0x8BDE40, AddToSessionExtraSelectList) -LuaC(0x8BDF70, RemoveFromSessionExtraSelectList) -LuaC(0x8BE0D0, ClearSessionExtraSelectList) -LuaC(0x8BE1C0, CurrentTime) -LuaC(0x8BE2A0, GameTime) -LuaC(0x8BE3A0, GameTick) -LuaC(0x8BE490, UI_IsAlly) -LuaC(0x8BE5D0, UI_IsEnemy) -LuaC(0x8BE710, UI_IsNeutral) -LuaC(0x8BE850, SyncPlayableRect) -LuaC(0x8BE980, UI_Random) -LuaC(0x8C2010, UserUnitCanAttackTarget) -LuaC(0x8C21D0, UserUnitGetFootPrintSize) -LuaC(0x8C2340, UserUnitGetUnitId) -LuaC(0x8C24A0, UserUnitGetEntityId) -LuaC(0x8C2620, UserUnitGetBlueprint) -LuaC(0x8C2790, UserUnitHasUnloadCommandQueuedUp) -LuaC(0x8C29D0, UserUnitProcessInfo) -LuaC(0x8C2B60, UserUnitIsAutoMode) -LuaC(0x8C2CA0, UserUnitIsAutoSurfaceMode) -LuaC(0x8C2DE0, UserUnitIsRepeatQueue) -LuaC(0x8C2F20, UserUnitIsInCategory) -LuaC(0x8C30E0, UserUnitGetStat) -LuaC(0x8C3440, UserUnitIsStunned) -LuaC(0x8C3580, UserUnitSetCustomName) -LuaC(0x8C3700, UserUnitGetCustomName) -LuaC(0x8C3880, UserUnitAddSelectionSet) -LuaC(0x8C39E0, UserUnitRemoveSelectionSet) -LuaC(0x8C3B40, UserUnitHasSelectionSet) -LuaC(0x8C3CD0, UserUnitGetSelectionSets) -LuaC(0x8C3EA0, UserUnitGetHealth) -LuaC(0x8C3FE0, UserUnitGetMaxHealth) -LuaC(0x8C4120, UserUnitGetBuildRate) -LuaC(0x8C4270, UserUnitIsOverchargePaused) -LuaC(0x8C43B0, UserUnitIsDead) -LuaC(0x8C4500, UserUnitIsIdle) -LuaC(0x8C4660, UserUnitGetFocus) -LuaC(0x8C47F0, UserUnitGetGuardedEntity) -LuaC(0x8C4980, UserUnitGetCreator) -LuaC(0x8C4AF0, UserUnitGetPosition) -LuaC(0x8C4C50, UserUnitGetArmy) -LuaC(0x8C4DA0, UserUnitGetFuelRatio) -LuaC(0x8C4EE0, UserUnitGetShieldRatio) -LuaC(0x8C5020, UserUnitGetWorkProgress) -LuaC(0x8C5160, UserUnitGetEconData) -LuaC(0x8C5400, UserUnitGetCommandQueue) -LuaC(0x8C5750, UserUnitGetMissileInfo) -LuaC(0x8C5930, UI_GetBlueprint) -LuaC(0x8C9490, GetOptions) -LuaC(0x8C9660, GetAntiAliasingOptions) -LuaC(0x8C9850, GetPreference) -LuaC(0x8C9A50, SetPreference) -LuaC(0x8C9C30, SavePreferences) -LuaC(0x8CAEA0, DebugFacilitiesEnabled) -LuaC(0x90A8C0, Lua_LOG) -LuaC(0x90A8C0, _ALERT) -LuaC(0x90AF80, import) +#pragma once + +#include "LuaAPI.h" + +#define LuaC(addr, name) \ + int FA_##name(lua_State *L) asm(#addr); + +LuaC(0x416490, BeginLoggingStats) +LuaC(0x416640, EndLoggingStats) +LuaC(0x41B790, GetCommandLineArg) +LuaC(0x41BA20, HasCommandLineArg) +LuaC(0x41CB60, ConExecute) +LuaC(0x41D180, ConExecuteSave) +LuaC(0x41EB00, AddConsoleOutputReciever) +LuaC(0x41ED00, RemoveConsoleOutputReciever) +LuaC(0x456BE0, DiskFindFiles) +LuaC(0x456E30, DiskGetFileInfo) +LuaC(0x457160, DiskToLocal) +LuaC(0x4572E0, Basename) +LuaC(0x457460, Dirname) +LuaC(0x4575C0, FileCollapsePath) +LuaC(0x4A5700, CreatePrefetchSet) +LuaC(0x4A5810, CPrefetchSetUpdate) +LuaC(0x4A5950, CPrefetchSetReset) +LuaC(0x4B2EE0, EnumColorNames) +LuaC(0x4B41E0, Trace) +LuaC(0x4C7A90, IsDestroyed) +LuaC(0x4C9D00, ForkThread) +LuaC(0x4C9FE0, KillThread) +LuaC(0x4CA890, WaitFor) +LuaC(0x4CAA70, SuspendCurrentThread) +LuaC(0x4CAB90, ResumeThread) +LuaC(0x4CAD60, CurrentThread) +LuaC(0x4CD8F0, print) +LuaC(0x4CD9A0, LOG) +LuaC(0x4CDA50, WARN) +LuaC(0x4CDB00, SPEW) +LuaC(0x4CEAF0, doscript) +LuaC(0x4CF930, __index) +LuaC(0x4CF9C0, __newindex) +LuaC(0x4CFE00, Vector2) +LuaC(0x4D0140, Vector) +LuaC(0x4D0600, PointVector) +LuaC(0x4D0C70, Rect) +LuaC(0x4D0EB0, VDist3) +LuaC(0x4D1070, VDist3Sq) +LuaC(0x4D1230, VDist2) +LuaC(0x4D1440, VDist2Sq) +LuaC(0x4D1650, VDot) +LuaC(0x4D17E0, VDiff) +LuaC(0x4D19C0, VAdd) +LuaC(0x4D1BA0, VMult) +LuaC(0x4D1D70, VPerpDot) +LuaC(0x4D1F10, MATH_IRound) +LuaC(0x4D2030, MATH_Lerp) +LuaC(0x4D3470, STR_xtoi) +LuaC(0x4D3580, STR_itox) +LuaC(0x4D3700, STR_Utf8Len) +LuaC(0x4D3810, STR_Utf8SubString) +LuaC(0x4D3A10, STR_GetTokens) +LuaC(0x4D3D70, exists) +LuaC(0x4D3EA0, GetVersion) +LuaC(0x4D68C0, SHGetFolderPath) +LuaC(0x4DFD90, Sound) +LuaC(0x4DFED0, RPCSound) +LuaC(0x4E0010, GetCueBank) +LuaC(0x50D3B0, OrientFromDir) +LuaC(0x50D510, EulerToQuaternion) +LuaC(0x50D730, MinLerp) +LuaC(0x50D950, MinSlerp) +LuaC(0x5284D0, SpecFootprints) +LuaC(0x528AF0, RegisterUnitBlueprint) +LuaC(0x528BC0, RegisterPropBlueprint) +LuaC(0x528C90, RegisterProjectileBlueprint) +LuaC(0x528D60, RegisterMeshBlueprint) +LuaC(0x528E20, RegisterTrailEmitterBlueprint) +LuaC(0x528ED0, RegisterEmitterBlueprint) +LuaC(0x528F80, RegisterBeamBlueprint) +LuaC(0x529030, BlueprintLoaderUpdateProgress) +LuaC(0x547030, CreateResourceDeposit) +LuaC(0x5556B0, EntityCategory__add) +LuaC(0x555840, EntityCategory__sub) +LuaC(0x5559D0, EntityCategory__mul) +LuaC(0x555B60, EntityCategoryGetUnitList) +LuaC(0x555D70, EntityCategoryEmpty) +LuaC(0x55B610, SecondsPerTick) +LuaC(0x585EF0, CAiBrainIsOpponentAIRunning) +LuaC(0x586070, CAiBrainGetArmyIndex) +LuaC(0x5861C0, CAiBrainGetFactionIndex) +LuaC(0x586310, CAiBrainSetCurrentPlan) +LuaC(0x5864A0, CAiBrainGetPersonality) +LuaC(0x5865F0, CAiBrainSetCurrentEnemy) +LuaC(0x586770, CAiBrainGetCurrentEnemy) +LuaC(0x5868D0, CAiBrainGetUnitBlueprint) +LuaC(0x586AD0, CAiBrainGetArmyStat) +LuaC(0x586DA0, CAiBrainSetArmyStat) +LuaC(0x587020, CAiBrainAddArmyStat) +LuaC(0x5872A0, CAiBrainSetGreaterOf) +LuaC(0x587520, CAiBrainGetBlueprintStat) +LuaC(0x5876E0, CAiBrainGetCurrentUnits) +LuaC(0x587870, CAiBrainGetListOfUnits) +LuaC(0x587B80, CAiBrainSetArmyStatsTrigger) +LuaC(0x587FA0, CAiBrainRemoveArmyStatsTrigger) +LuaC(0x5881F0, CAiBrainGiveResource) +LuaC(0x5883E0, CAiBrainGiveStorage) +LuaC(0x5885E0, CAiBrainTakeResource) +LuaC(0x588850, CAiBrainSetResourceSharing) +LuaC(0x5889A0, CAiBrainFindUnit) +LuaC(0x588C10, CAiBrainFindUpgradeBP) +LuaC(0x588EB0, CAiBrainFindUnitToUpgrade) +LuaC(0x589380, CAiBrainDecideWhatToBuild) +LuaC(0x589720, CAiBrainGetArmyStartPos) +LuaC(0x589890, CAiBrainCreateUnitNearSpot) +LuaC(0x589DB0, CAiBrainCreateResourceBuildingNearest) +LuaC(0x58A440, CAiBrainFindPlaceToBuild) +LuaC(0x58B3A0, CAiBrainCanBuildStructureAt) +LuaC(0x58B610, CAiBrainBuildStructure) +LuaC(0x58BA40, CAiBrainNumCurrentlyBuilding) +LuaC(0x58BCB0, CAiBrainGetAvailableFactories) +LuaC(0x58BF80, CAiBrainCanBuildPlatoon) +LuaC(0x58C490, CAiBrainBuildPlatoon) +LuaC(0x58C840, CAiBrainBuildUnit) +LuaC(0x58CA40, CAiBrainIsAnyEngineerBuilding) +LuaC(0x58CCA0, CAiBrainGetNumPlatoonsWithAI) +LuaC(0x58CE30, CAiBrainGetNumPlatoonsTemplateNamed) +LuaC(0x58CFC0, CAiBrainPlatoonExists) +LuaC(0x58D140, CAiBrainGetPlatoonsList) +LuaC(0x58D360, CAiBrainDisbandPlatoon) +LuaC(0x58D4D0, CAiBrainDisbandPlatoonUniquelyNamed) +LuaC(0x58D650, CAiBrainMakePlatoon) +LuaC(0x58DC60, CAiBrainAssignUnitsToPlatoon) +LuaC(0x58DFA0, CAiBrainGetPlatoonUniquelyNamed) +LuaC(0x58E140, CAiBrainGetNumUnitsAroundPoint) +LuaC(0x58E3D0, CAiBrainGetUnitsAroundPoint) +LuaC(0x58E830, CAiBrainFindClosestArmyWithBase) +LuaC(0x58EB40, CAiBrainSetUpAttackVectorsToArmy) +LuaC(0x58ED60, CAiBrainGetAttackVectors) +LuaC(0x58EF60, CAiBrainPickBestAttackVector) +LuaC(0x58F370, CAiBrainGetEconomyStored) +LuaC(0x58F530, CAiBrainGetEconomyStoredRatio) +LuaC(0x58F730, CAiBrainGetEconomyIncome) +LuaC(0x58F8F0, CAiBrainGetEconomyUsage) +LuaC(0x58FAB0, CAiBrainGetEconomyRequested) +LuaC(0x58FC70, CAiBrainGetEconomyTrend) +LuaC(0x58FE30, CAiBrainGetMapWaterRatio) +LuaC(0x58FF80, CAiBrainAssignThreatAtPosition) +LuaC(0x590260, CAiBrainGetThreatAtPosition) +LuaC(0x5905B0, CAiBrainGetThreatBetweenPositions) +LuaC(0x5908D0, CAiBrainGetHighestThreatPosition) +LuaC(0x590C00, CAiBrainGetThreatsAroundPosition) +LuaC(0x591020, CAiBrainCheckBlockingTerrain) +LuaC(0x5917F0, CAiBrainGetNoRushTicks) +LuaC(0x5A5860, CAiNavigatorImplSetGoal) +LuaC(0x5A5A90, CAiNavigatorImplSetDestUnit) +LuaC(0x5A5BF0, CAiNavigatorImplAbortMove) +LuaC(0x5A5D20, CAiNavigatorImplBroadcastResumeTaskEvent) +LuaC(0x5A5E50, CAiNavigatorImplSetSpeedThroughGoal) +LuaC(0x5A5F90, CAiNavigatorImplGetCurrentTargetPos) +LuaC(0x5A6100, CAiNavigatorImplGetGoalPos) +LuaC(0x5A6270, CAiNavigatorImplGetStatus) +LuaC(0x5A63C0, CAiNavigatorImplHasGoodPath) +LuaC(0x5A6500, CAiNavigatorImplFollowingLeader) +LuaC(0x5A6640, CAiNavigatorImplIgnoreFormation) +LuaC(0x5A6780, CAiNavigatorImplIsIgnorningFormation) +LuaC(0x5A68C0, CAiNavigatorImplAtGoal) +LuaC(0x5A6A00, CAiNavigatorImplCanPathToGoal) +LuaC(0x5BA610, CAiPersonalityGetPersonalityName) +LuaC(0x5BA730, CAiPersonalityGetChatPersonality) +LuaC(0x5BA850, CAiPersonalityGetDifficulty) +LuaC(0x5BA970, CAiPersonalityAdjustDelay) +LuaC(0x5BAB40, CAiPersonalityGetArmySize) +LuaC(0x5BAC80, CAiPersonalityGetPlatoonSize) +LuaC(0x5BADC0, CAiPersonalityGetAttackFrequency) +LuaC(0x5BAF00, CAiPersonalityGetRepeatAttackFrequency) +LuaC(0x5BB040, CAiPersonalityGetCounterForces) +LuaC(0x5BB180, CAiPersonalityGetIntelGathering) +LuaC(0x5BB2C0, CAiPersonalityGetCoordinatedAttacks) +LuaC(0x5BB400, CAiPersonalityGetExpansionDriven) +LuaC(0x5BB540, CAiPersonalityGetTechAdvancement) +LuaC(0x5BB680, CAiPersonalityGetUpgradesDriven) +LuaC(0x5BB7C0, CAiPersonalityGetDefenseDriven) +LuaC(0x5BB900, CAiPersonalityGetEconomyDriven) +LuaC(0x5BBA40, CAiPersonalityGetFactoryTycoon) +LuaC(0x5BBB80, CAiPersonalityGetIntelBuildingTycoon) +LuaC(0x5BBCC0, CAiPersonalityGetSuperWeaponTendency) +LuaC(0x5BBE00, CAiPersonalityGetFavouriteStructures) +LuaC(0x5BBFD0, CAiPersonalityGetAirUnitsEmphasis) +LuaC(0x5BC110, CAiPersonalityGetTankUnitsEmphasis) +LuaC(0x5BC250, CAiPersonalityGetBotUnitsEmphasis) +LuaC(0x5BC390, CAiPersonalityGetSeaUnitsEmphasis) +LuaC(0x5BC4D0, CAiPersonalityGetSpecialtyForcesEmphasis) +LuaC(0x5BC610, CAiPersonalityGetSupportUnitsEmphasis) +LuaC(0x5BC750, CAiPersonalityGetDirectDamageEmphasis) +LuaC(0x5BC890, CAiPersonalityGetInDirectDamageEmphasis) +LuaC(0x5BC9D0, CAiPersonalityGetFavouriteUnits) +LuaC(0x5BCBA0, CAiPersonalityGetSurvivalEmphasis) +LuaC(0x5BCCE0, CAiPersonalityGetTeamSupport) +LuaC(0x5BCE20, CAiPersonalityGetFormationUse) +LuaC(0x5BCF60, CAiPersonalityGetTargetSpread) +LuaC(0x5BD0A0, CAiPersonalityGetQuittingTendency) +LuaC(0x5BD1E0, CAiPersonalityGetChatFrequency) +LuaC(0x5C29D0, ReconBlipGetBlueprint) +LuaC(0x5C2B30, ReconBlipGetSource) +LuaC(0x5C2C90, ReconBlipIsSeenEver) +LuaC(0x5C2E00, ReconBlipIsSeenNow) +LuaC(0x5C2F70, ReconBlipIsMaybeDead) +LuaC(0x5C30E0, ReconBlipIsOnOmni) +LuaC(0x5C3250, ReconBlipIsOnSonar) +LuaC(0x5C33C0, ReconBlipIsOnRadar) +LuaC(0x5C3530, ReconBlipIsKnownFake) +LuaC(0x5D9930, CAiAttackerImplGetUnit) +LuaC(0x5D9A70, CAiAttackerImplAttackerWeaponsBusy) +LuaC(0x5D9BB0, CAiAttackerImplGetWeaponCount) +LuaC(0x5D9D00, CAiAttackerImplSetDesiredTarget) +LuaC(0x5D9EA0, CAiAttackerImplGetDesiredTarget) +LuaC(0x5DA000, CAiAttackerImplStop) +LuaC(0x5DA130, CAiAttackerImplCanAttackTarget) +LuaC(0x5DA2E0, CAiAttackerImplFindBestEnemy) +LuaC(0x5DA490, CAiAttackerImplGetTargetWeapon) +LuaC(0x5DA650, CAiAttackerImplGetPrimaryWeapon) +LuaC(0x5DA7A0, CAiAttackerImplGetMaxWeaponRange) +LuaC(0x5DA8E0, CAiAttackerImplIsWithinAttackRange) +LuaC(0x5DACE0, CAiAttackerImplIsTooClose) +LuaC(0x5DAE90, CAiAttackerImplIsTargetExempt) +LuaC(0x5DB010, CAiAttackerImplHasSlavedTarget) +LuaC(0x5DB1A0, CAiAttackerImplResetReportingState) +LuaC(0x5DB2D0, CAiAttackerImplForceEngage) +LuaC(0x5E3150, AITarget) +LuaC(0x5E8640, UnitTransportDetachAllUnits) +LuaC(0x6233C0, CUnitScriptTaskGetUnit) +LuaC(0x6234F0, CUnitScriptTaskSetAIResult) +LuaC(0x623660, LUnitMove) +LuaC(0x623900, LUnitMoveNear) +LuaC(0x631F20, CreateAimController) +LuaC(0x632140, CAimManipulatorSetFiringArc) +LuaC(0x632340, CAimManipulatorSetResetPoseTime) +LuaC(0x6324B0, CAimManipulatorOnTarget) +LuaC(0x6325F0, CAimManipulatorSetEnabled) +LuaC(0x632730, CAimManipulatorGetHeadingPitch) +LuaC(0x632890, CAimManipulatorSetHeadingPitch) +LuaC(0x632A40, CAimManipulatorSetAimHeadingOffset) +LuaC(0x634C70, CBoneEntityManipulatorSetPivot) +LuaC(0x634E80, EntityAttachBoneToEntityBone) +LuaC(0x636800, CreateBuilderArmController) +LuaC(0x6369D0, CBuilderArmManipulatorSetAimingArc) +LuaC(0x636BD0, CBuilderArmManipulatorGetHeadingPitch) +LuaC(0x636D30, CBuilderArmManipulatorSetHeadingPitch) +LuaC(0x637FA0, CreateCollisionDetector) +LuaC(0x638110, CCollisionManipulatorEnableTerrainCheck) +LuaC(0x638250, CCollisionManipulatorEnable) +LuaC(0x638380, CCollisionManipulatorDisable) +LuaC(0x6384C0, CCollisionManipulatorWatchBone) +LuaC(0x639C80, CreateFootPlantController) +LuaC(0x63BAC0, IAniManipulatorSetPrecedence) +LuaC(0x63BC60, IAniManipulatorEnable) +LuaC(0x63BD90, IAniManipulatorDisable) +LuaC(0x63BEC0, IAniManipulatorDestroy) +LuaC(0x6404B0, CreateAnimator) +LuaC(0x640670, CAnimationManipulatorPlayAnim) +LuaC(0x6408E0, CAnimationManipulatorGetRate) +LuaC(0x640A20, CAnimationManipulatorSetRate) +LuaC(0x640BA0, CAnimationManipulatorGetAnimationFraction) +LuaC(0x640D10, CAnimationManipulatorSetAnimationFraction) +LuaC(0x640EB0, CAnimationManipulatorGetAnimationTime) +LuaC(0x640FF0, CAnimationManipulatorSetAnimationTime) +LuaC(0x641160, CAnimationManipulatorGetAnimationDuration) +LuaC(0x6415F0, CAnimationManipulatorSetBoneEnabled) +LuaC(0x6417B0, CAnimationManipulatorSetOverwriteMode) +LuaC(0x6418F0, CAnimationManipulatorSetDisableOnSignal) +LuaC(0x641A30, CAnimationManipulatorSetDirectionalAnim) +LuaC(0x643D80, CreateRotator) +LuaC(0x644280, CRotateManipulatorSetSpinDown) +LuaC(0x6443F0, CRotateManipulatorSetGoal) +LuaC(0x6445C0, CRotateManipulatorClearGoal) +LuaC(0x644710, CRotateManipulatorSetSpeed) +LuaC(0x6448B0, CRotateManipulatorSetTargetSpeed) +LuaC(0x644A80, CRotateManipulatorSetAccel) +LuaC(0x644C20, CRotateManipulatorClearFollowBone) +LuaC(0x644D90, CRotateManipulatorSetFollowBone) +LuaC(0x644F30, CRotateManipulatorGetCurrentAngle) +LuaC(0x6450A0, CRotateManipulatorSetCurrentAngle) +LuaC(0x6462B0, CreateSlaver) +LuaC(0x646490, CSlaveManipulatorSetMaxRate) +LuaC(0x647660, CreateSlider) +LuaC(0x647A30, CSlideManipulatorSetWorldUnits) +LuaC(0x647B80, CSlideManipulatorSetSpeed) +LuaC(0x647D80, CSlideManipulatorSetAcceleration) +LuaC(0x647F20, CSlideManipulatorSetDeceleration) +LuaC(0x6480C0, CSlideManipulatorSetGoal) +LuaC(0x6482E0, CSlideManipulatorBeenDestroyed) +LuaC(0x649440, CreateStorageManip) +LuaC(0x64AB40, CreateThrustController) +LuaC(0x64AD10, CThrustManipulatorSetThrustingParam) +LuaC(0x656450, CreateBeamEmitter) +LuaC(0x656650, CreateBeamEmitterOnEntity) +LuaC(0x6568E0, CreateBeamEntityToEntity) +LuaC(0x656C30, AttachBeamEntityToEntity) +LuaC(0x656F80, AttachBeamToEntity) +LuaC(0x66D860, IEffectSetBeamParam) +LuaC(0x66D940, IEffectSetEmitterParam) +LuaC(0x66DA20, IEffectScaleEmitter) +LuaC(0x66DBA0, IEffectResizeEmitterCurve) +LuaC(0x66DE70, IEffectSetEmitterCurveParam) +LuaC(0x66E150, IEffectOffsetEmitter) +LuaC(0x66E3A0, IEffectDestroy) +LuaC(0x66E4D0, CDecalHandleDestroy) +LuaC(0x66E610, CreateDecal) +LuaC(0x66EC10, CreateSplat) +LuaC(0x66F1A0, CreateSplatOnBone) +LuaC(0x66F6E0, CreateEmitterAtEntity) +LuaC(0x66F8A0, CreateEmitterOnEntity) +LuaC(0x66FA60, CreateLightParticle) +LuaC(0x66FE20, CreateLightParticleIntel) +LuaC(0x670240, CreateAttachedEmitter) +LuaC(0x670420, CreateTrail) +LuaC(0x670600, CreateAttachedBeam) +LuaC(0x6708C0, CreateBeamToEntityBone) +LuaC(0x670CF0, CreateEmitterAtBone) +LuaC(0x673BC0, CollisionBeamEntity__init) +LuaC(0x673F60, CollisionBeamEntitySetBeamFx) +LuaC(0x674120, CollisionBeamEntityDisable) +LuaC(0x674250, CollisionBeamEntityEnable) +LuaC(0x674380, CollisionBeamEntityIsEnabled) +LuaC(0x6744C0, CollisionBeamEntityGetLauncher) +LuaC(0x68A090, EntityCreateProjectile) +LuaC(0x68A670, EntityCreateProjectileAtBone) +LuaC(0x68AAF0, EntityShakeCamera) +LuaC(0x68AD60, EntityGetAIBrain) +LuaC(0x68AF30, EntityGetBlueprint) +LuaC(0x68B0B0, GetBlueprint) +LuaC(0x68B210, EntityGetArmy) +LuaC(0x68B370, EntityGetBoneDirection) +LuaC(0x68B570, EntityIsValidBone) +LuaC(0x68B7F0, EntityGetBoneCount) +LuaC(0x68B940, EntityGetBoneName) +LuaC(0x68BAE0, EntityRequestRefreshUI) +LuaC(0x68BC10, EntityGetEntityId) +LuaC(0x68BD90, EntityAttachTo) +LuaC(0x68C010, EntityAttachBoneTo) +LuaC(0x68C2B0, EntitySetParentOffset) +LuaC(0x68C4A0, EntityDetachFrom) +LuaC(0x68C650, EntityDetachAll) +LuaC(0x68C8B0, EntityGetParent) +LuaC(0x68CA00, EntityGetCollisionExtents) +LuaC(0x68CC30, EntityPlaySound) +LuaC(0x68CDC0, EntitySetAmbientSound) +LuaC(0x68CF60, EntityGetFractionComplete) +LuaC(0x68D0A0, EntityAdjustHealth) +LuaC(0x68D2B0, EntityGetHealth) +LuaC(0x68D3F0, EntityGetMaxHealth) +LuaC(0x68D530, EntitySetHealth) +LuaC(0x68D710, EntitySetMaxHealth) +LuaC(0x68D880, EntitySetVizToFocusPlayer) +LuaC(0x68DA00, EntitySetVizToEnemies) +LuaC(0x68DB80, EntitySetVizToAllies) +LuaC(0x68DD00, EntitySetVizToNeutrals) +LuaC(0x68DE80, EntityIsIntelEnabled) +LuaC(0x68E050, EntityEnableIntel) +LuaC(0x68E2F0, EntityDisableIntel) +LuaC(0x68E590, EntitySetIntelRadius) +LuaC(0x68E7D0, EntityGetIntelRadius) +LuaC(0x68E9A0, EntityInitIntel) +LuaC(0x68ED50, EntityAddShooter) +LuaC(0x68EEC0, EntityRemoveShooter) +LuaC(0x68F030, EntityReachedMaxShooters) +LuaC(0x68F180, EntitySetCollisionShape) +LuaC(0x68F500, EntityGetOrientation) +LuaC(0x68F660, EntitySetOrientation) +LuaC(0x68F860, EntityGetHeading) +LuaC(0x68FA10, EntitySetPosition) +LuaC(0x68FC10, EntityGetPosition) +LuaC(0x68FEE0, EntityGetPositionXYZ) +LuaC(0x6900E0, EntityAddLocalImpulse) +LuaC(0x6903E0, EntityAddWorldImpulse) +LuaC(0x690790, EntitySetMesh) +LuaC(0x6909F0, EntitySetDrawScale) +LuaC(0x690B90, EntityGetScale) +LuaC(0x690D20, EntitySetScale) +LuaC(0x691030, EntityAddManualScroller) +LuaC(0x691260, EntityAddThreadScroller) +LuaC(0x691480, EntityAddPingPongScroller) +LuaC(0x691840, EntityRemoveScroller) +LuaC(0x691A00, EntityDestroy) +LuaC(0x691B40, EntityBeenDestroyed) +LuaC(0x691C90, EntityKill) +LuaC(0x6922B0, _c_CreateEntity) +LuaC(0x695580, EntityFallDown) +LuaC(0x695720, MotorFallDownWhack) +LuaC(0x6969E0, EntitySinkAway) +LuaC(0x6A13B0, ProjectileGetLauncher) +LuaC(0x6A1510, ProjectileGetTrackingTarget) +LuaC(0x6A1680, ProjectileGetCurrentTargetPosition) +LuaC(0x6A1820, ProjectileSetNewTarget) +LuaC(0x6A19C0, ProjectileSetNewTargetGround) +LuaC(0x6A1B90, ProjectileSetLifetime) +LuaC(0x6A1D30, ProjectileSetDamage) +LuaC(0x6A1F10, ProjectileSetMaxSpeed) +LuaC(0x6A2090, ProjectileSetAcceleration) +LuaC(0x6A2210, ProjectileSetBallisticAcceleration) +LuaC(0x6A2470, ProjectileSetDestroyOnWater) +LuaC(0x6A25B0, ProjectileSetTurnRate) +LuaC(0x6A2730, ProjectileGetCurrentSpeed) +LuaC(0x6A2890, ProjectileGetVelocity) +LuaC(0x6A2A10, ProjectileSetVelocity) +LuaC(0x6A2CF0, ProjectileSetScaleVelocity) +LuaC(0x6A2F60, ProjectileSetLocalAngularVelocity) +LuaC(0x6A3170, ProjectileSetCollision) +LuaC(0x6A32E0, ProjectileSetCollideSurface) +LuaC(0x6A3430, ProjectileSetCollideEntity) +LuaC(0x6A3580, ProjectileStayUnderwater) +LuaC(0x6A36D0, ProjectileTrackTarget) +LuaC(0x6A3820, ProjectileSetStayUpright) +LuaC(0x6A3960, ProjectileSetVelocityAlign) +LuaC(0x6A3AA0, ProjectileCreateChildProjectile) +LuaC(0x6A3CF0, ProjectileSetVelocityRandomUpVector) +LuaC(0x6A3F00, ProjectileChangeMaxZigZag) +LuaC(0x6A4070, ProjectileChangeZigZagFrequency) +LuaC(0x6A41E0, ProjectileChangeDetonateAboveHeight) +LuaC(0x6A4350, ProjectileChangeDetonateBelowHeight) +LuaC(0x6C3AB0, UnitGetUnitId) +LuaC(0x6C3C00, UnitSetCreator) +LuaC(0x6C3D80, UnitGetCargo) +LuaC(0x6C3F80, UnitAlterArmor) +LuaC(0x6C4180, UnitGetArmorMult) +LuaC(0x6C4370, UnitClearFocusEntity) +LuaC(0x6C44E0, UnitSetFocusEntity) +LuaC(0x6C4670, UnitGetFocusUnit) +LuaC(0x6C4800, UnitGetWeapon) +LuaC(0x6C49F0, UnitGetWeaponCount) +LuaC(0x6C4B40, UnitGetTargetEntity) +LuaC(0x6C4CA0, UnitGetHealth) +LuaC(0x6C4E10, UnitGetAttacker) +LuaC(0x6C4F60, UnitEnableManipulators) +LuaC(0x6C5170, UnitKillManipulator) +LuaC(0x6C52E0, UnitKillManipulators) +LuaC(0x6C54B0, UnitScaleGetBuiltEmitter) +LuaC(0x6C5780, UnitSetStrategicUnderlay) +LuaC(0x6C5900, UnitIsUnitState) +LuaC(0x6C5AA0, UnitIsIdleState) +LuaC(0x6C5C10, UnitIsStunned) +LuaC(0x6C5D60, UnitIsBeingBuilt) +LuaC(0x6C5EB0, UnitIsPaused) +LuaC(0x6C6000, UnitSetPaused) +LuaC(0x6C6140, UnitSetConsumptionActive) +LuaC(0x6C6290, UnitSetProductionActive) +LuaC(0x6C63F0, UnitSetBusy) +LuaC(0x6C6570, UnitSetBlockCommandQueue) +LuaC(0x6C66F0, UnitSetImmobile) +LuaC(0x6C6860, UnitSetStunned) +LuaC(0x6C69D0, UnitSetUnSelectable) +LuaC(0x6C6B40, UnitSetDoNotTarget) +LuaC(0x6C6CB0, UnitSetUnitState) +LuaC(0x6C6E80, UnitStopSiloBuild) +LuaC(0x6C6FB0, UnitSetIsValidTarget) +LuaC(0x6C70F0, UnitIsValidTarget) +LuaC(0x6C7230, UnitGetNumBuildOrders) +LuaC(0x6C7470, UnitCalculateWorldPositionFromRelative) +LuaC(0x6C7690, UnitGetScriptBit) +LuaC(0x6C7870, UnitSetScriptBit) +LuaC(0x6C7A30, UnitToggleScriptBit) +LuaC(0x6C7BD0, UnitToggleFireState) +LuaC(0x6C7D10, UnitSetFireState) +LuaC(0x6C7EA0, UnitGetFireState) +LuaC(0x6C7FE0, UnitSetAutoMode) +LuaC(0x6C8120, UnitAddBuildRestriction) +LuaC(0x6C8290, UnitRemoveBuildRestriction) +LuaC(0x6C8400, UnitRestoreBuildRestrictions) +LuaC(0x6C8560, UnitAddCommandCap) +LuaC(0x6C8700, UnitRemoveCommandCap) +LuaC(0x6C88A0, UnitRestoreCommandCaps) +LuaC(0x6C89E0, UnitTestCommandCaps) +LuaC(0x6C8B80, UnitAddToggleCap) +LuaC(0x6C8D20, UnitRemoveToggleCap) +LuaC(0x6C8EC0, UnitRestoreToggleCaps) +LuaC(0x6C9000, UnitTestToggleCaps) +LuaC(0x6C91A0, UnitSetRegenRate) +LuaC(0x6C9330, UnitRevertRegenRate) +LuaC(0x6C9460, UnitSetReclaimable) +LuaC(0x6C95B0, UnitSetCapturable) +LuaC(0x6C9700, UnitIsCapturable) +LuaC(0x6C9840, UnitSetOverchargePaused) +LuaC(0x6C9980, UnitIsOverchargePaused) +LuaC(0x6C9AC0, UnitSetBuildRate) +LuaC(0x6C9C50, UnitGetBuildRate) +LuaC(0x6C9DA0, UnitSetConsumptionPerSecondEnergy) +LuaC(0x6C9F40, UnitSetConsumptionPerSecondMass) +LuaC(0x6CA0E0, UnitSetProductionPerSecondEnergy) +LuaC(0x6CA270, UnitSetProductionPerSecondMass) +LuaC(0x6CA400, UnitGetConsumptionPerSecondEnergy) +LuaC(0x6CA550, UnitGetConsumptionPerSecondMass) +LuaC(0x6CA6A0, UnitGetProductionPerSecondEnergy) +LuaC(0x6CA7F0, UnitGetProductionPerSecondMass) +LuaC(0x6CA940, UnitGetResourceConsumed) +LuaC(0x6CAA80, UnitSetElevation) +LuaC(0x6CABF0, UnitRevertElevation) +LuaC(0x6CAD20, UnitSetSpeedMult) +LuaC(0x6CAE90, UnitSetAccMult) +LuaC(0x6CB000, UnitSetTurnMult) +LuaC(0x6CB170, UnitSetBreakOffTriggerMult) +LuaC(0x6CB2E0, UnitSetBreakOffDistanceMult) +LuaC(0x6CB450, UnitRevertCollisionShape) +LuaC(0x6CB580, UnitRecoilImpulse) +LuaC(0x6CB790, UnitGetCurrentLayer) +LuaC(0x6CB8E0, UnitCanPathTo) +LuaC(0x6CBCF0, UnitCanPathToRect) +LuaC(0x6CC040, UnitIsMobile) +LuaC(0x6CC180, UnitIsMoving) +LuaC(0x6CC2D0, UnitGetNavigator) +LuaC(0x6CC420, UnitGetVelocity) +LuaC(0x6CC5A0, UnitGetStat) +LuaC(0x6CC8E0, UnitSetStat) +LuaC(0x6CCB40, UnitSetWorkProgress) +LuaC(0x6CCCB0, UnitGetWorkProgress) +LuaC(0x6CCDF0, NotifyUpgrade) +LuaC(0x6CD300, UnitGetGuardedUnit) +LuaC(0x6CD460, UnitGetGuards) +LuaC(0x6CD660, UnitGetTransportFerryBeacon) +LuaC(0x6CD7E0, UnitHasValidTeleportDest) +LuaC(0x6CD950, UnitAddUnitToStorage) +LuaC(0x6CDB00, UnitSetCustomName) +LuaC(0x6CDC90, UnitHasMeleeSpaceAroundTarget) +LuaC(0x6CDED0, UnitMeleeWarpAdjacentToTarget) +LuaC(0x6CE200, UnitGetCommandQueue) +LuaC(0x6CE420, UnitPrintCommandQueue) +LuaC(0x6CEA60, UnitGetCurrentMoveLocation) +LuaC(0x6CECC0, UnitGiveNukeSiloAmmo) +LuaC(0x6CEE10, UnitRemoveNukeSiloAmmo) +LuaC(0x6CEF60, UnitGetNukeSiloAmmoCount) +LuaC(0x6CF0D0, UnitGiveTacticalSiloAmmo) +LuaC(0x6CF220, UnitRemoveTacticalSiloAmmo) +LuaC(0x6CF370, UnitGetTacticalSiloAmmoCount) +LuaC(0x6CF4E0, CreateUnit) +LuaC(0x6CFAF0, CreateUnitHPR) +LuaC(0x6D0000, CreateUnit2) +LuaC(0x6D03E0, UnitCanBuild) +LuaC(0x6D05D0, UnitGetRallyPoint) +LuaC(0x6D0770, UnitGetFuelUseTime) +LuaC(0x6D08D0, UnitSetFuelUseTime) +LuaC(0x6D0A50, UnitGetFuelRatio) +LuaC(0x6D0BB0, UnitSetFuelRatio) +LuaC(0x6D0D30, UnitSetShieldRatio) +LuaC(0x6D0EA0, UnitGetShieldRatio) +LuaC(0x6D0FE0, UnitGetBlip) +LuaC(0x6D1170, UnitTransportHasSpaceFor) +LuaC(0x6D1320, UnitTransportHasAvailableStorage) +LuaC(0x6D1470, UnitShowBone) +LuaC(0x6D1610, UnitHideBone) +LuaC(0x6D7BD0, UnitWeaponPlaySound) +LuaC(0x6D7D70, UnitWeaponSetEnabled) +LuaC(0x6D7F00, UnitWeaponSetTargetEntity) +LuaC(0x6D80C0, UnitWeaponSetTargetGround) +LuaC(0x6D8320, UnitWeaponResetTarget) +LuaC(0x6D8490, UnitWeaponCreateProjectile) +LuaC(0x6D8610, UnitWeaponDoInstaHit) +LuaC(0x6D8A60, UnitWeaponGetBlueprint) +LuaC(0x6D8C10, UnitWeaponGetProjectileBlueprint) +LuaC(0x6D8D70, UnitWeaponWeaponHasTarget) +LuaC(0x6D8EB0, UnitWeaponFireWeapon) +LuaC(0x6D8FE0, UnitWeaponSetFireControl) +LuaC(0x6D9150, UnitWeaponIsFireControl) +LuaC(0x6D9310, UnitWeaponGetCurrentTarget) +LuaC(0x6D9490, UnitWeaponGetCurrentTargetPos) +LuaC(0x6D9630, UnitWeaponCanFire) +LuaC(0x6D97C0, UnitWeaponChangeFiringTolerance) +LuaC(0x6D9920, UnitWeaponChangeRateOfFire) +LuaC(0x6D9A80, UnitWeaponChangeMinRadius) +LuaC(0x6D9C00, UnitWeaponChangeMaxRadius) +LuaC(0x6D9D80, UnitWeaponChangeMaxHeightDiff) +LuaC(0x6D9EE0, UnitWeaponChangeDamageType) +LuaC(0x6DA070, UnitWeaponChangeDamageRadius) +LuaC(0x6DA1E0, UnitWeaponChangeDamage) +LuaC(0x6DA350, UnitWeaponSetFireTargetLayerCaps) +LuaC(0x6DA4E0, UnitWeaponSetTargetingPriorities) +LuaC(0x6DA6B0, UnitWeaponGetFiringRandomness) +LuaC(0x6DA7F0, UnitWeaponSetFiringRandomness) +LuaC(0x6DA960, UnitWeaponGetFireClockPct) +LuaC(0x6DAAE0, UnitWeaponChangeProjectileBlueprint) +LuaC(0x6DAC80, UnitWeaponTransferTarget) +LuaC(0x6DADF0, UnitWeaponBeenDestroyed) +LuaC(0x6F17B0, IsCommandDone) +LuaC(0x6F18E0, IssueClearCommands) +LuaC(0x6F1A40, IssueStop) +LuaC(0x6F1BE0, IssuePause) +LuaC(0x6F1D80, IssueOverCharge) +LuaC(0x6F2030, IssueDive) +LuaC(0x6F2250, IssueFactoryRallyPoint) +LuaC(0x6F2510, IssueClearFactoryCommands) +LuaC(0x6F2660, IssueMove) +LuaC(0x6F2960, IssueMoveOffFactory) +LuaC(0x6F2C70, IssueFormMove) +LuaC(0x6F30D0, IssueGuard) +LuaC(0x6F33A0, IssueFactoryAssist) +LuaC(0x6F3650, IssueAttack) +LuaC(0x6F3910, CoordinateAttacks) +LuaC(0x6F3B60, IssueFormAttack) +LuaC(0x6F3F40, IssueSiloBuildTactical) +LuaC(0x6F40A0, IssueSiloBuildNuke) +LuaC(0x6F4200, IssueNuke) +LuaC(0x6F4490, IssueTactical) +LuaC(0x6F4720, IssueTeleport) +LuaC(0x6F49B0, IssuePatrol) +LuaC(0x6F4C80, IssueFormPatrol) +LuaC(0x6F50B0, IssueAggressiveMove) +LuaC(0x6F53C0, IssueFormAggressiveMove) +LuaC(0x6F5820, IssueFerry) +LuaC(0x6F5AF0, IssueBuildMobile) +LuaC(0x6F6060, IssueRepair) +LuaC(0x6F6330, IssueSacrifice) +LuaC(0x6F6600, IssueUpgrade) +LuaC(0x6F67A0, IssueScript) +LuaC(0x6F6960, IssueReclaim) +LuaC(0x6F6C20, IssueCapture) +LuaC(0x6F6EE0, IssueKillSelf) +LuaC(0x6F7060, IssueDestroySelf) +LuaC(0x6F71E0, IssueTransportLoad) +LuaC(0x6F7530, IssueTransportUnload) +LuaC(0x6F77E0, IssueTeleportToBeacon) +LuaC(0x6F7A70, IssueTransportUnloadSpecific) +LuaC(0x6F7EA0, IssueBuildFactory) +LuaC(0x6FBF90, CreatePropHPR) +LuaC(0x6FC3B0, CreateProp) +LuaC(0x6FC590, EntityCreatePropAtBone) +LuaC(0x6FC830, SplitProp) +LuaC(0x6FCA80, EntityPushOver) +LuaC(0x6FCF40, PropAddBoundedProp) +LuaC(0x7080B0, ShouldCreateInitialArmyUnits) +LuaC(0x7081A0, ListArmies) +LuaC(0x708310, GetArmyBrain) +LuaC(0x708460, SetArmyStart) +LuaC(0x7085E0, GenerateArmyStart) +LuaC(0x7086D0, SetArmyPlans) +LuaC(0x708870, InitializeArmyAI) +LuaC(0x708970, ArmyInitializePrebuiltUnits) +LuaC(0x708A70, ArmyGetHandicap) +LuaC(0x708B90, SetArmyEconomy) +LuaC(0x708D60, GetArmyUnitCostTotal) +LuaC(0x708E60, GetArmyUnitCap) +LuaC(0x708F70, SetArmyUnitCap) +LuaC(0x7090A0, SetIgnoreArmyUnitCap) +LuaC(0x7091B0, SetIgnorePlayableRect) +LuaC(0x7092C0, CreateInitialArmyUnit) +LuaC(0x709590, SetAlliance) +LuaC(0x709720, SetAllianceOneWay) +LuaC(0x7098A0, SetAlliedVictory) +LuaC(0x7099C0, IsAlly) +LuaC(0x709AF0, IsEnemy) +LuaC(0x709C20, IsNeutral) +LuaC(0x709D50, ArmyIsCivilian) +LuaC(0x709E50, SetArmyColorIndex) +LuaC(0x709FB0, SetArmyFactionIndex) +LuaC(0x70A100, SetArmyAIPersonality) +LuaC(0x70A2A0, SetArmyColor) +LuaC(0x70A5E0, SetArmyShowScore) +LuaC(0x70A6E0, AddBuildRestriction) +LuaC(0x70A800, RemoveBuildRestriction) +LuaC(0x70A920, OkayToMessWithArmy) +LuaC(0x70AA60, ArmyIsOutOfGame) +LuaC(0x70AB60, SetArmyOutOfGame) +LuaC(0x72B810, CPlatoonIsOpponentAIRunning) +LuaC(0x72B970, CPlatoonGetPersonality) +LuaC(0x72BAD0, CPlatoonGetBrain) +LuaC(0x72BC10, CPlatoonGetFactionIndex) +LuaC(0x72BD60, CPlatoonUniquelyNamePlatoon) +LuaC(0x72BEF0, CPlatoonGetPlatoonUniqueName) +LuaC(0x72C040, CPlatoonGetAIPlan) +LuaC(0x72C190, CPlatoonSwitchAIPlan) +LuaC(0x72C300, CPlatoonGetPlatoonPosition) +LuaC(0x72C5C0, CPlatoonGetSquadPosition) +LuaC(0x72C7D0, CPlatoonGetSquadUnits) +LuaC(0x72C9B0, CPlatoonGetPlatoonUnits) +LuaC(0x72CC00, CPlatoonCanConsiderFormingPlatoon) +LuaC(0x72CE70, CPlatoonCanFormPlatoon) +LuaC(0x72D870, CPlatoonFormPlatoon) +LuaC(0x72E240, CPlatoonIsAttacking) +LuaC(0x72E3E0, CPlatoonIsMoving) +LuaC(0x72E580, CPlatoonIsPatrolling) +LuaC(0x72E720, CPlatoonIsFerrying) +LuaC(0x72E8C0, CPlatoonSetPrioritizedTargetList) +LuaC(0x72EB30, CPlatoonFindPrioritizedUnit) +LuaC(0x72EDE0, CPlatoonFindClosestUnit) +LuaC(0x72F020, CPlatoonFindClosestUnitToBase) +LuaC(0x72F290, CPlatoonFindFurthestUnit) +LuaC(0x72F4D0, CPlatoonFindHighestValueUnit) +LuaC(0x72F710, CPlatoonCanAttackTarget) +LuaC(0x72F940, CPlatoonStop) +LuaC(0x72FAE0, CPlatoonAttackTarget) +LuaC(0x72FDB0, CPlatoonMoveToTarget) +LuaC(0x7300A0, CPlatoonMoveToLocation) +LuaC(0x7303A0, CPlatoonAggressiveMoveToLocation) +LuaC(0x730680, CPlatoonFerryToLocation) +LuaC(0x7308F0, CPlatoonLoadUnits) +LuaC(0x730B10, CPlatoonUnloadUnitsAtLocation) +LuaC(0x730DB0, CPlatoonUnloadAllAtLocation) +LuaC(0x731020, CPlatoonGuardTarget) +LuaC(0x7312F0, CPlatoonPatrol) +LuaC(0x7314F0, CPlatoonDestroy) +LuaC(0x731690, CPlatoonDisbandOnIdle) +LuaC(0x7317C0, CPlatoonGetFerryBeacons) +LuaC(0x7319B0, CPlatoonUseFerryBeacon) +LuaC(0x731C30, CPlatoonUseTeleporter) +LuaC(0x731F00, CPlatoonIsCommandsActive) +LuaC(0x7320C0, CPlatoonSetPlatoonFormationOverride) +LuaC(0x7322D0, CPlatoonGetPlatoonLifetimeStats) +LuaC(0x7324A0, CPlatoonCalculatePlatoonThreat) +LuaC(0x7328E0, CPlatoonCalculatePlatoonThreatAroundPosition) +LuaC(0x732E40, CPlatoonPlatoonCategoryCountAroundPosition) +LuaC(0x7331C0, CPlatoonPlatoonCategoryCount) +LuaC(0x738630, CDamageGetInstigator) +LuaC(0x738790, CDamageSetInstigator) +LuaC(0x738900, CDamageGetTarget) +LuaC(0x738A60, CDamageSetTarget) +LuaC(0x738BD0, Damage) +LuaC(0x738F40, DamageArea) +LuaC(0x7392C0, DamageRing) +LuaC(0x7396E0, MetaImpact) +LuaC(0x74B570, Sim_print) +LuaC(0x74B620, CheatsEnabled) +LuaC(0x74B710, GetCurrentCommandSource) +LuaC(0x74B830, EndGame) +LuaC(0x74B900, IsGameOver) +LuaC(0x74B9F0, GetEntityById) +LuaC(0x74BB40, GetUnitById) +LuaC(0x758F90, Random) +LuaC(0x759190, FlattenMapRect) +LuaC(0x7593D0, SelectedUnit) +LuaC(0x7594C0, SimConExecute) +LuaC(0x759810, ParseEntityCategory) +LuaC(0x759990, EntityCategoryContains) +LuaC(0x759BD0, EntityCategoryFilterDown) +LuaC(0x759EF0, EntityCategoryCount) +LuaC(0x75A1D0, EntityCategoryCountAroundPosition) +LuaC(0x75A580, GenerateRandomOrientation) +LuaC(0x75A770, GetGameTimeSeconds) +LuaC(0x75A860, GetGameTick) +LuaC(0x75A950, GetSystemTimeSecondsOnlyForProfileUse) +LuaC(0x75AA30, GetEntitiesInRect) +LuaC(0x75AE00, GetUnitsInRect) +LuaC(0x75B200, GetReclaimablesInRect) +LuaC(0x75B5D0, ChangeUnitArmy) +LuaC(0x75B940, Warp) +LuaC(0x75BBE0, GetMapSize) +LuaC(0x75BCF0, GetTerrainHeight) +LuaC(0x75BE70, GetSurfaceHeight) +LuaC(0x75C030, GetTerrainTypeOffset) +LuaC(0x75C1B0, GetTerrainType) +LuaC(0x75C3B0, SetTerrainType) +LuaC(0x75C5D0, SetTerrainTypeRect) +LuaC(0x75C7B0, SetPlayableRect) +LuaC(0x75C9D0, FlushIntelInRect) +LuaC(0x75CC20, GetUnitBlueprintByName) +LuaC(0x75CDD0, GetFocusArmy) +LuaC(0x75CEC0, AudioSetLanguage) +LuaC(0x75CF90, HasLocalizedVO) +LuaC(0x75D060, TryCopyPose) +LuaC(0x75D970, SetArmyStatsSyncArmy) +LuaC(0x75DA80, SubmitXMLArmyStats) +LuaC(0x75DB80, DrawLine) +LuaC(0x75DDA0, DrawLinePop) +LuaC(0x75E0B0, DrawCircle) +LuaC(0x75E2A0, DebugGetSelection) +LuaC(0x75E4E0, IsEntity) +LuaC(0x75E620, IsUnit) +LuaC(0x75E780, IsProp) +LuaC(0x75E8E0, IsBlip) +LuaC(0x75EA40, IsProjectile) +LuaC(0x75EBA0, IsCollisionBeam) +LuaC(0x761570, PlayLoop) +LuaC(0x761700, StopLoop) +LuaC(0x775630, CreateEconomyEvent) +LuaC(0x775910, RemoveEconomyEvent) +LuaC(0x775A40, EconomyEventIsDone) +LuaC(0x776A20, _c_CreateShield) +LuaC(0x780A70, GetTextureDimensions) +LuaC(0x780D20, InternalCreateBitmap) +LuaC(0x780ED0, CMauiBitmapSetNewTexture) +LuaC(0x781440, CMauiBitmapInternalSetSolidColor) +LuaC(0x781690, CMauiBitmapSetUV) +LuaC(0x781950, CMauiBitmapUseAlphaHitTest) +LuaC(0x781AA0, CMauiBitmapSetTiled) +LuaC(0x781BF0, CMauiBitmapLoop) +LuaC(0x781D40, CMauiBitmapPlay) +LuaC(0x781EA0, CMauiBitmapStop) +LuaC(0x782000, CMauiBitmapSetFrame) +LuaC(0x782180, CMauiBitmapGetFrame) +LuaC(0x7822C0, CMauiBitmapGetNumFrames) +LuaC(0x782420, CMauiBitmapSetFrameRate) +LuaC(0x7825A0, CMauiBitmapSetForwardPattern) +LuaC(0x7826E0, CMauiBitmapSetBackwardPattern) +LuaC(0x782820, CMauiBitmapSetPingPongPattern) +LuaC(0x782960, CMauiBitmapSetLoopPingPongPattern) +LuaC(0x782AA0, CMauiBitmapSetFramePattern) +LuaC(0x782CE0, CMauiBitmapShareTextures) +LuaC(0x7857B0, InternalCreateBorder) +LuaC(0x785960, CMauiBorderSetNewTextures) +LuaC(0x785FA0, CMauiBorderSetSolidColor) +LuaC(0x787A50, CMauiControlDestroy) +LuaC(0x787BA0, CMauiControlGetParent) +LuaC(0x787CF0, CMauiControlClearChildren) +LuaC(0x787E30, CMauiControlSetParent) +LuaC(0x787FB0, CMauiControlDisableHitTest) +LuaC(0x788130, CMauiControlEnableHitTest) +LuaC(0x7882B0, CMauiControlIsHitTestDisabled) +LuaC(0x7883F0, CMauiControlHide) +LuaC(0x788520, CMauiControlShow) +LuaC(0x788650, CMauiControlSetHidden) +LuaC(0x788790, CMauiControlIsHidden) +LuaC(0x7888D0, CMauiControlGetRenderPass) +LuaC(0x788A10, CMauiControlSetRenderPass) +LuaC(0x788B90, CMauiControlGetName) +LuaC(0x788D00, CMauiControlSetName) +LuaC(0x788E90, CMauiControlDump) +LuaC(0x788FC0, CMauiControlGetCurrentFocusControl) +LuaC(0x7890B0, CMauiControlAcquireKeyboardFocus) +LuaC(0x789210, CMauiControlAbandonKeyboardFocus) +LuaC(0x789350, CMauiControlNeedsFrameUpdate) +LuaC(0x789490, CMauiControlSetNeedsFrameUpdate) +LuaC(0x7895D0, CMauiControlGetRootFrame) +LuaC(0x789710, CMauiControlSetAlpha) +LuaC(0x789A30, CMauiControlGetAlpha) +LuaC(0x789B70, CMauiControlApplyFunction) +LuaC(0x789CD0, CMauiControlHitTest) +LuaC(0x78CFD0, _c_CreateCursor) +LuaC(0x78D130, CMauiCursorSetNewTexture) +LuaC(0x78D390, CMauiCursorSetDefaultTexture) +LuaC(0x78D5A0, CMauiCursorResetToDefault) +LuaC(0x78D6C0, CMauiCursorHide) +LuaC(0x78D7F0, CMauiCursorShow) +LuaC(0x78DF80, CMauiLuaDraggerDestroy) +LuaC(0x78E0B0, InternalCreateDragger) +LuaC(0x78E210, PostDragger) +LuaC(0x791FF0, InternalCreateEdit) +LuaC(0x7921A0, CMauiEditSetNewFont) +LuaC(0x7923C0, CMauiEditSetNewForegroundColor) +LuaC(0x792530, CMauiEditGetForegroundColor) +LuaC(0x792690, CMauiEditSetNewBackgroundColor) +LuaC(0x792810, CMauiEditGetBackgroundColor) +LuaC(0x792970, CMauiEditShowBackground) +LuaC(0x792AC0, CMauiEditIsBackgroundVisible) +LuaC(0x792C00, CMauiEditClearText) +LuaC(0x792D30, CMauiEditSetText) +LuaC(0x792F00, CMauiEditGetText) +LuaC(0x793070, CMauiEditSetMaxChars) +LuaC(0x793200, CMauiEditGetMaxChars) +LuaC(0x793340, CMauiEditSetCaretPosition) +LuaC(0x7934C0, CMauiEditGetCaretPosition) +LuaC(0x793600, CMauiEditShowCaret) +LuaC(0x793750, CMauiEditIsCaretVisible) +LuaC(0x793890, CMauiEditSetNewCaretColor) +LuaC(0x793A00, CMauiEditGetCaretColor) +LuaC(0x793B60, CMauiEditSetCaretCycle) +LuaC(0x793D70, CMauiEditIsEnabled) +LuaC(0x793EB0, CMauiEditEnableInput) +LuaC(0x793FF0, CMauiEditDisableInput) +LuaC(0x794140, CMauiEditSetNewHighlightForegroundColor) +LuaC(0x7942B0, CMauiEditGetHighlightForegroundColor) +LuaC(0x794410, CMauiEditSetNewHighlightBackgroundColor) +LuaC(0x794580, CMauiEditGetHighlightBackgroundColor) +LuaC(0x7946E0, CMauiEditGetFontHeight) +LuaC(0x794840, CMauiEditAcquireFocus) +LuaC(0x794990, CMauiEditAbandonFocus) +LuaC(0x794AD0, CMauiEditSetDropShadow) +LuaC(0x794C20, CMauiEditGetStringAdvance) +LuaC(0x796790, InternalCreateFrame) +LuaC(0x796900, CMauiFrameGetTopmostDepth) +LuaC(0x796A50, CMauiFrameGetTargetHead) +LuaC(0x796B90, CMauiFrameSetTargetHead) +LuaC(0x797310, InternalCreateGroup) +LuaC(0x797920, InternalCreateHistogram) +LuaC(0x797AD0, CMauiHistogramSetXIncrement) +LuaC(0x797C50, CMauiHistogramSetYIncrement) +LuaC(0x797DD0, CMauiHistogramSetData) +LuaC(0x79A960, InternalCreateItemList) +LuaC(0x79AB10, CMauiItemListSetNewFont) +LuaC(0x79AD30, CMauiItemListSetNewColors) +LuaC(0x79B040, CMauiItemListGetItem) +LuaC(0x79B1E0, CMauiItemListAddItem) +LuaC(0x79B370, CMauiItemListModifyItem) +LuaC(0x79B560, CMauiItemListDeleteItem) +LuaC(0x79B6E0, CMauiItemListDeleteAllItems) +LuaC(0x79B840, CMauiItemListGetSelection) +LuaC(0x79B980, CMauiItemListSetSelection) +LuaC(0x79BB40, CMauiItemListGetItemCount) +LuaC(0x79BCB0, CMauiItemListEmpty) +LuaC(0x79BE10, CMauiItemListScrollToTop) +LuaC(0x79BF40, CMauiItemListScrollToBottom) +LuaC(0x79C070, CMauiItemListShowItem) +LuaC(0x79C200, CMauiItemListGetRowHeight) +LuaC(0x79C350, CMauiItemListGetStringAdvance) +LuaC(0x79C4E0, CMauiItemListShowMouseoverItem) +LuaC(0x79C620, CMauiItemListShowSelection) +LuaC(0x79C760, CMauiItemListNeedsScrollBar) +LuaC(0x79D7A0, IsKeyDown) +LuaC(0x79D8D0, KeycodeMauiToMSW) +LuaC(0x79D9F0, KeycodeMSWToMaui) +LuaC(0x79E590, InternalCreateMesh) +LuaC(0x79E740, CMauiMeshSetMesh) +LuaC(0x79E8B0, CMauiMeshSetOrientation) +LuaC(0x79F540, InternalCreateMovie) +LuaC(0x79F6F0, CMauiMovieInternalSet) +LuaC(0x79F870, CMauiMovieLoop) +LuaC(0x79F9C0, CMauiMoviePlay) +LuaC(0x79FB20, CMauiMovieStop) +LuaC(0x79FC70, CMauiMovieIsLoaded) +LuaC(0x79FDD0, CMauiMovieGetNumFrames) +LuaC(0x79FF20, CMauiMovieGetFrameRate) +LuaC(0x7A1590, InternalCreateScrollbar) +LuaC(0x7A17A0, CMauiScrollbarSetScrollable) +LuaC(0x7A1920, CMauiScrollbarSetNewTextures) +LuaC(0x7A2080, CMauiScrollbarDoScrollLines) +LuaC(0x7A2220, CMauiScrollbarDoScrollPages) +LuaC(0x7A3340, InternalCreateText) +LuaC(0x7A34F0, CMauiTextSetNewFont) +LuaC(0x7A3710, CMauiTextSetText) +LuaC(0x7A3880, CMauiTextGetText) +LuaC(0x7A39F0, CMauiTextSetNewColor) +LuaC(0x7A3B60, CMauiTextSetDropShadow) +LuaC(0x7A3CB0, CMauiTextSetCenteredHorizontally) +LuaC(0x7A3E00, CMauiTextSetCenteredVertically) +LuaC(0x7A3F50, CMauiTextGetStringAdvance) +LuaC(0x7A40E0, CMauiTextSetNewClipToWidth) +LuaC(0x7A5190, AnyInputCapture) +LuaC(0x7A5280, GetInputCapture) +LuaC(0x7A53B0, AddInputCapture) +LuaC(0x7A54E0, RemoveInputCapture) +LuaC(0x7AB080, GetCamera) +LuaC(0x7AB1B0, CameraImplMoveToRegion) +LuaC(0x7AB4E0, CameraImplSnapTo) +LuaC(0x7AB6E0, CameraImplMoveTo) +LuaC(0x7AB930, CameraImplReset) +LuaC(0x7ABA60, CameraImplTrackEntities) +LuaC(0x7ABE40, CameraImplTargetEntities) +LuaC(0x7AC1C0, CameraImplNoseCam) +LuaC(0x7AC500, CameraImplHoldRotation) +LuaC(0x7AC630, CameraImplRevertRotation) +LuaC(0x7AC760, CameraImplSetZoom) +LuaC(0x7AC930, CameraImplSetTargetZoom) +LuaC(0x7ACAA0, CameraImplSetAccMode) +LuaC(0x7ACC40, CameraImplGetZoom) +LuaC(0x7ACD80, CameraImplGetFocusPosition) +LuaC(0x7ACEE0, CameraImplSaveSettings) +LuaC(0x7AD0D0, CameraImplRestoreSettings) +LuaC(0x7AD3D0, CameraImplGetTargetZoom) +LuaC(0x7AD510, CameraImplGetMaxZoom) +LuaC(0x7AD650, CameraImplGetMinZoom) +LuaC(0x7AD720, CameraImplSetMaxZoomMult) +LuaC(0x7AD890, CameraImplSpin) +LuaC(0x7ADA90, CameraImplUseGameClock) +LuaC(0x7ADBC0, CameraImplUseSystemClock) +LuaC(0x7ADCF0, CameraImplEnableEaseInOut) +LuaC(0x7ADE20, CameraImplDisableEaseInOut) +LuaC(0x7B5170, CreateUnitAtMouse) +LuaC(0x7B5E60, CPathDebuggerDestroy) +LuaC(0x7B5F90, _c_CreatePathDebugger) +LuaC(0x7B9DE0, GpgNetActive) +LuaC(0x7B9EB0, GpgNetSend) +LuaC(0x7BA2C0, LaunchGPGNet) +LuaC(0x7C0060, InternalCreateDiscoveryService) +LuaC(0x7C01C0, CDiscoveryServiceGetGameCount) +LuaC(0x7C0310, CDiscoveryServiceReset) +LuaC(0x7C0430, CDiscoveryServiceDestroy) +LuaC(0x7C0CC0, InternalCreateLobby) +LuaC(0x7C13E0, CLobbyDestroy) +LuaC(0x7C1530, CLobbyMakeValidGameName) +LuaC(0x7C18D0, CLobbyMakeValidPlayerName) +LuaC(0x7C1C80, CLobbyHostGame) +LuaC(0x7C1FA0, CLobbyJoinGame) +LuaC(0x7C2350, CLobbyBroadcastData) +LuaC(0x7C2650, CLobbySendData) +LuaC(0x7C2B00, CLobbyGetPeers) +LuaC(0x7C2C60, CLobbyGetPeer) +LuaC(0x7C2DF0, CLobbyGetLocalPlayerName) +LuaC(0x7C2F40, CLobbyGetLocalPlayerID) +LuaC(0x7C3090, CLobbyIsHost) +LuaC(0x7C31D0, CLobbyGetLocalPort) +LuaC(0x7C3340, CLobbyEjectPeer) +LuaC(0x7C34D0, CLobbyConnectToPeer) +LuaC(0x7C3760, CLobbyDisconnectFromPeer) +LuaC(0x7C50E0, CLobbyLaunchGame) +LuaC(0x7C5360, CLobbyDebugDump) +LuaC(0x7C82E0, ValidateIPAddress) +LuaC(0x7FDAF0, AddBlinkyBox) +LuaC(0x836360, SetCurrentFactoryForQueueDisplay) +LuaC(0x8365B0, ClearCurrentFactoryForQueueDisplay) +LuaC(0x8366C0, IncreaseBuildCountInQueue) +LuaC(0x836900, DecreaseBuildCountInQueue) +LuaC(0x83A190, IN_AddKeyMapTable) +LuaC(0x83A2B0, IN_RemoveKeyMapTable) +LuaC(0x83A3D0, IN_ClearKeyMap) +LuaC(0x83DA90, ConTextMatches) +LuaC(0x83F000, EngineStartSplashScreens) +LuaC(0x83F0E0, EngineStartFrontEndUI) +LuaC(0x83F1C0, ExitApplication) +LuaC(0x83F2B0, ExitGame) +LuaC(0x83F3A0, RestartSession) +LuaC(0x83F470, GetFrame) +LuaC(0x83F5D0, ClearFrame) +LuaC(0x83F700, GetNumRootFrames) +LuaC(0x83F800, GetEconomyTotals) +LuaC(0x83FED0, GetResourceSharing) +LuaC(0x83FFE0, GetSimTicksPerSecond) +LuaC(0x8400B0, GetUnitCommandData) +LuaC(0x840840, GetUnitCommandFromCommandCap) +LuaC(0x8409F0, IssueDockCommand) +LuaC(0x841530, IssueCommand) +LuaC(0x841840, IssueUnitCommand) +LuaC(0x841B90, IssueBlueprintCommand) +LuaC(0x8420A0, GetCurrentUIState) +LuaC(0x8428A0, GetRolloverInfo) +LuaC(0x842BB0, GetMouseWorldPos) +LuaC(0x842D10, GetMouseScreenPos) +LuaC(0x842E60, UI_SetFocusArmy) +LuaC(0x842FD0, UI_GetFocusArmy) +LuaC(0x8430D0, IsObserver) +LuaC(0x8431D0, GetGameTime) +LuaC(0x843380, UI_GetGameTimeSeconds) +LuaC(0x843480, GetSystemTime) +LuaC(0x8435F0, GetSystemTimeSeconds) +LuaC(0x8436D0, FormatTime) +LuaC(0x8438A0, GetSimRate) +LuaC(0x8439A0, GetArmiesTable) +LuaC(0x843E50, GetArmyScore) +LuaC(0x843F20, DeleteCommand) +LuaC(0x8440A0, GetSpecialFiles) +LuaC(0x844540, GetSpecialFilePath) +LuaC(0x844C30, GetSpecialFolder) +LuaC(0x844F10, RemoveSpecialFile) +LuaC(0x845540, GetSpecialFileInfo) +LuaC(0x845DF0, RemoveProfileDirectories) +LuaC(0x846200, CopyCurrentReplay) +LuaC(0x846760, SetFrontEndData) +LuaC(0x846960, GetFrontEndData) +LuaC(0x846B60, SetOverlayFilter) +LuaC(0x846F70, SetOverlayFilters) +LuaC(0x8471C0, GenerateBuildTemplateFromSelection) +LuaC(0x847270, GetActiveBuildTemplate) +LuaC(0x847560, SetActiveBuildTemplate) +LuaC(0x847A20, ClearBuildTemplates) +LuaC(0x847AD0, RenderOverlayMilitary) +LuaC(0x847BC0, RenderOverlayIntel) +LuaC(0x847CB0, RenderOverlayEconomy) +LuaC(0x847D90, TeamColorMode) +LuaC(0x847E70, UI_GetUnitById) +LuaC(0x847FD0, OpenURL) +LuaC(0x848260, MapBorderAdd) +LuaC(0x8483D0, MapBorderClear) +LuaC(0x84DC80, SetCursor) +LuaC(0x84DDE0, GetCursor) +LuaC(0x84DEF0, SetUIControlsAlpha) +LuaC(0x84E000, GetUIControlsAlpha) +LuaC(0x84E0F0, FlushEvents) +LuaC(0x850D20, InternalCreateMapPreview) +LuaC(0x850ED0, CUIMapPreviewSetTexture) +LuaC(0x851040, CUIMapPreviewSetTextureFromMap) +LuaC(0x8511B0, CUIMapPreviewClearTexture) +LuaC(0x857B60, AddCommandFeedbackBlip) +LuaC(0x866D30, UISelectionByCategory) +LuaC(0x866F40, UISelectAndZoomTo) +LuaC(0x8671C0, UIZoomTo) +LuaC(0x86A8D0, InternalCreateWldUIProvider) +LuaC(0x86AA50, CLuaWldUIProviderDestroy) +LuaC(0x86BB30, InternalCreateWorldMesh) +LuaC(0x86BC90, CUIWorldMeshDestroy) +LuaC(0x86BDC0, CUIWorldMeshSetMesh) +LuaC(0x86BF50, CUIWorldMeshSetStance) +LuaC(0x86C1D0, CUIWorldMeshSetHidden) +LuaC(0x86C310, CUIWorldMeshIsHidden) +LuaC(0x86C450, CUIWorldMeshSetAuxiliaryParameter) +LuaC(0x86C5D0, CUIWorldMeshSetFractionCompleteParameter) +LuaC(0x86C750, CUIWorldMeshSetFractionHealthParameter) +LuaC(0x86C8D0, CUIWorldMeshSetLifetimeParameter) +LuaC(0x86CA50, CUIWorldMeshSetColor) +LuaC(0x86CBB0, CUIWorldMeshSetScale) +LuaC(0x86CD40, CUIWorldMeshGetInterpolatedPosition) +LuaC(0x86CF00, CUIWorldMeshGetInterpolatedSphere) +LuaC(0x86D0F0, CUIWorldMeshGetInterpolatedAlignedBox) +LuaC(0x86D320, CUIWorldMeshGetInterpolatedOrientedBox) +LuaC(0x86D5E0, CUIWorldMeshGetInterpolatedScroll) +LuaC(0x871690, CUIWorldView__init) +LuaC(0x871A20, CUIWorldViewCameraReset) +LuaC(0x871B70, CUIWorldViewGetsGlobalCameraCommands) +LuaC(0x871CC0, CUIWorldViewGetRightMouseButtonOrder) +LuaC(0x871EC0, CUIWorldViewHasHighlightCommand) +LuaC(0x871FA0, CUIWorldViewShowConvertToPatrolCursor) +LuaC(0x8720E0, CUIWorldViewUnlockInput) +LuaC(0x872200, CUIWorldViewLockInput) +LuaC(0x872330, CUIWorldViewIsInputLocked) +LuaC(0x872470, CUIWorldViewSetHighlightEnabled) +LuaC(0x8725B0, CUIWorldViewZoomScale) +LuaC(0x872830, CUIWorldViewGetScreenPos) +LuaC(0x872C60, UnProject) +LuaC(0x872E20, CUIWorldViewProject) +LuaC(0x873170, CUIWorldViewSetCartographic) +LuaC(0x8732C0, CUIWorldViewIsCartographic) +LuaC(0x873410, CUIWorldViewEnableResourceRendering) +LuaC(0x873550, CUIWorldViewIsResourceRenderingEnabled) +LuaC(0x874FA0, SetMovieVolume) +LuaC(0x875100, GetMovieVolume) +LuaC(0x8753A0, GetMovieDuration) +LuaC(0x876DD0, LaunchReplaySession) +LuaC(0x87F1E0, _c_CreateDecal) +LuaC(0x87F360, ScriptedDecalSetTexture) +LuaC(0x87F4C0, ScriptedDecalSetScale) +LuaC(0x87F660, ScriptedDecalSetPositionByScreen) +LuaC(0x87F7E0, ScriptedDecalSetPosition) +LuaC(0x87F950, ScriptedDecalDestroy) +LuaC(0x880C40, LoadSavedGame) +LuaC(0x881AB0, InternalSaveGame) +LuaC(0x886350, PrefetchSession) +LuaC(0x88D340, LaunchSinglePlayerSession) +LuaC(0x88D4C0, GetSessionClients) +LuaC(0x88D8F0, EjectSessionClient) +LuaC(0x88DA80, SessionSendChatMessage) +LuaC(0x88DED0, WorldIsLoading) +LuaC(0x88DFB0, WorldIsPlaying) +LuaC(0x88E1E0, GetGameSpeed) +LuaC(0x88E2E0, SetGameSpeed) +LuaC(0x897780, SessionRequestPause) +LuaC(0x897850, SessionResume) +LuaC(0x897920, SessionIsPaused) +LuaC(0x897A00, SessionIsGameOver) +LuaC(0x897AF0, SessionGetCommandSourceNames) +LuaC(0x897C70, SessionGetLocalCommandSource) +LuaC(0x897D70, UI_SessionIsReplay) +LuaC(0x897E60, SessionIsBeingRecorded) +LuaC(0x897F50, SessionIsMultiplayer) +LuaC(0x898040, SessionIsObservingAllowed) +LuaC(0x898130, SessionCanRestart) +LuaC(0x898220, SessionIsActive) +LuaC(0x8982F0, SessionGetScenarioInfo) +LuaC(0x898430, SessionEndGame) +LuaC(0x8ACDA0, PauseSound) +LuaC(0x8ACF50, PauseVoice) +LuaC(0x8AD100, PlaySound) +LuaC(0x8AD280, SoundIsPrepared) +LuaC(0x8AD400, StartSound) +LuaC(0x8AD550, StopSound) +LuaC(0x8AD6F0, SetVolume) +LuaC(0x8AD850, GetVolume) +LuaC(0x8AD970, StopAllSounds) +LuaC(0x8ADA50, DisableWorldSounds) +LuaC(0x8ADB30, EnableWorldSounds) +LuaC(0x8ADC10, PlayTutorialVO) +LuaC(0x8ADD80, PlayVoice) +LuaC(0x8ADFF0, UI_AudioSetLanguage) +LuaC(0x8AE280, UI_HasLocalizedVO) +LuaC(0x8B9B00, UI_ParseEntityCategory) +LuaC(0x8B9C90, UI_EntityCategoryContains) +LuaC(0x8B9EF0, UI_EntityCategoryFilterDown) +LuaC(0x8BA220, EntityCategoryFilterOut) +LuaC(0x8BA540, ExecLuaInSim) +LuaC(0x8BA6F0, SimCallback) +LuaC(0x8BA9F0, GetIsPaused) +LuaC(0x8BABA0, GetIsAutoMode) +LuaC(0x8BAD60, SetAutoMode) +LuaC(0x8BAF60, GetIsSubmerged) +LuaC(0x8BB120, GetIsAutoSurfaceMode) +LuaC(0x8BB2E0, SetAutoSurfaceMode) +LuaC(0x8BB4E0, GetFireState) +LuaC(0x8BB6E0, ToggleFireState) +LuaC(0x8BB990, SetFireState) +LuaC(0x8BBB90, GetScriptBit) +LuaC(0x8BBDE0, ToggleScriptBit) +LuaC(0x8BC080, SetPaused) +LuaC(0x8BC280, GetAttachedUnitsList) +LuaC(0x8BC570, ValidateUnitsList) +LuaC(0x8BC7A0, GetAssistingUnitsList) +LuaC(0x8BCC30, GetArmyAvatars) +LuaC(0x8BCE70, GetIdleEngineers) +LuaC(0x8BD100, GetIdleFactories) +LuaC(0x8BD390, GetValidAttackingUnits) +LuaC(0x8BD600, GetSelectedUnits) +LuaC(0x8BD870, SelectUnits) +LuaC(0x8BDC30, AddSelectUnits) +LuaC(0x8BDE40, AddToSessionExtraSelectList) +LuaC(0x8BDF70, RemoveFromSessionExtraSelectList) +LuaC(0x8BE0D0, ClearSessionExtraSelectList) +LuaC(0x8BE1C0, CurrentTime) +LuaC(0x8BE2A0, GameTime) +LuaC(0x8BE3A0, GameTick) +LuaC(0x8BE490, UI_IsAlly) +LuaC(0x8BE5D0, UI_IsEnemy) +LuaC(0x8BE710, UI_IsNeutral) +LuaC(0x8BE850, SyncPlayableRect) +LuaC(0x8BE980, UI_Random) +LuaC(0x8C2010, UserUnitCanAttackTarget) +LuaC(0x8C21D0, UserUnitGetFootPrintSize) +LuaC(0x8C2340, UserUnitGetUnitId) +LuaC(0x8C24A0, UserUnitGetEntityId) +LuaC(0x8C2620, UserUnitGetBlueprint) +LuaC(0x8C2790, UserUnitHasUnloadCommandQueuedUp) +LuaC(0x8C29D0, UserUnitProcessInfo) +LuaC(0x8C2B60, UserUnitIsAutoMode) +LuaC(0x8C2CA0, UserUnitIsAutoSurfaceMode) +LuaC(0x8C2DE0, UserUnitIsRepeatQueue) +LuaC(0x8C2F20, UserUnitIsInCategory) +LuaC(0x8C30E0, UserUnitGetStat) +LuaC(0x8C3440, UserUnitIsStunned) +LuaC(0x8C3580, UserUnitSetCustomName) +LuaC(0x8C3700, UserUnitGetCustomName) +LuaC(0x8C3880, UserUnitAddSelectionSet) +LuaC(0x8C39E0, UserUnitRemoveSelectionSet) +LuaC(0x8C3B40, UserUnitHasSelectionSet) +LuaC(0x8C3CD0, UserUnitGetSelectionSets) +LuaC(0x8C3EA0, UserUnitGetHealth) +LuaC(0x8C3FE0, UserUnitGetMaxHealth) +LuaC(0x8C4120, UserUnitGetBuildRate) +LuaC(0x8C4270, UserUnitIsOverchargePaused) +LuaC(0x8C43B0, UserUnitIsDead) +LuaC(0x8C4500, UserUnitIsIdle) +LuaC(0x8C4660, UserUnitGetFocus) +LuaC(0x8C47F0, UserUnitGetGuardedEntity) +LuaC(0x8C4980, UserUnitGetCreator) +LuaC(0x8C4AF0, UserUnitGetPosition) +LuaC(0x8C4C50, UserUnitGetArmy) +LuaC(0x8C4DA0, UserUnitGetFuelRatio) +LuaC(0x8C4EE0, UserUnitGetShieldRatio) +LuaC(0x8C5020, UserUnitGetWorkProgress) +LuaC(0x8C5160, UserUnitGetEconData) +LuaC(0x8C5400, UserUnitGetCommandQueue) +LuaC(0x8C5750, UserUnitGetMissileInfo) +LuaC(0x8C5930, UI_GetBlueprint) +LuaC(0x8C9490, GetOptions) +LuaC(0x8C9660, GetAntiAliasingOptions) +LuaC(0x8C9850, GetPreference) +LuaC(0x8C9A50, SetPreference) +LuaC(0x8C9C30, SavePreferences) +LuaC(0x8CAEA0, DebugFacilitiesEnabled) +LuaC(0x90A8C0, Lua_LOG) +LuaC(0x90A8C0, _ALERT) +LuaC(0x90AF80, import) LuaC(0x90AFB0, LuaDumpBinary) \ No newline at end of file diff --git a/section/include/desync_fix_global.h b/include/desync_fix_global.h similarity index 100% rename from section/include/desync_fix_global.h rename to include/desync_fix_global.h diff --git a/section/include/global.h b/include/global.h similarity index 83% rename from section/include/global.h rename to include/global.h index 6e5b4df1..6ec84fe1 100644 --- a/section/include/global.h +++ b/include/global.h @@ -1,167 +1,172 @@ -#pragma once - -#include -#include "../../workflow.cpp" -#include - -#define GPtr(addr, type) \ - (*(type*)addr) - -#define GDecl(name, addr, type) \ - extern type name asm(#addr); - -#define WDecl(addr, type) \ - ((type)*(uintptr_t*)addr) - -#define VALIDATE_SIZE(struc, size) \ - static_assert(sizeof(struc) == size, "Invalid structure size of " #struc); - -#define g_CSimDriver GPtr(0x10C4F50, CSimDriver*) -#define g_SWldSessionInfo GPtr(0x10C4F58, SWldSessionInfo*) -#define g_CWldSession GPtr(0x10A6470, CWldSession*) -#define g_Sim GPtr(0x10A63F0, Sim*) -#define g_EntityCategoryTypeInfo GPtr(0x10C6E70, EntityCategoryTypeInfo*) -#define g_CAiBrainTypeInfo GPtr(0x10C6FA0, CAiBrainTypeInfo*) -#define g_CUIManager GPtr(0x10A6450, CUIManager*) -#define g_EngineStats GPtr(0x10A67B8, EngineStats*) -#define g_WRenViewport GPtr(0x10C7C28, WRenViewport*) -#define g_ConsoleLuaState GPtr(0x10A6478, LuaState*) -#define g_Device GPtr(0x0F8E284, Device*) - -GDecl(ui_ProgressBarColor, 0x0F57BB8, int) -GDecl(ui_SelectTolerance, 0x0F57A90, float) -GDecl(ui_ExtractSnapTolerance, 0x0F57A94, float) -GDecl(ui_DisableCursorFixing, 0x10A6464, bool) -GDecl(ui_RenderIcons, 0x0F57B27, bool) -GDecl(range_RenderSelected, 0x10A640A, bool) -GDecl(range_RenderHighlighted, 0x10A640B, bool) -GDecl(range_RenderBuild, 0x10A6414, bool) -GDecl(d3d_WindowsCursor, 0x10A636E, bool) -GDecl(debugSelect, 0x10A645E, bool) - -GDecl(s_FACTORY, 0xE19824, const char*) -GDecl(s_EXPERIMENTAL, 0xE204B8, const char*) -GDecl(s_ExpectedButGot, 0xE0A220, const char*) // "%s\n expected %d args, but got %d" -GDecl(s_ExpectedBetweenButGot, 0xE0A270, const char*) // "%s\n expected between %d and %d args, but got %d" -GDecl(s_Global, 0xE00D90, const char*) // "" -GDecl(s_CMauiBitmap, 0xE37438, const char*) // "CMauiBitmap" -GDecl(s_UserUnit, 0xE4D090, const char*) // "UserUnit" -GDecl(s_ExpectedAGameObject, 0xE09860, const char*) // "Expected a game object. (Did you call with '.' instead of ':'?)" -GDecl(s_GameObjectHasBeenDestroyed, 0xE098A0, const char*) // "Game object has been destroyed" -GDecl(s_IncorrectTypeOfGameObject, 0xE098C0, const char*) // "Incorrect type of game object. (Did you call with '.' instead of ':'?)" -GDecl(s_UnknownColor, 0x4B2D54, const char*) // "Unknown color: %s" -GDecl(s_c_object, 0xE016DC, const char*) // "_c_object" - -GDecl(g_ExeVersion1, 0x876666, const int) -GDecl(g_ExeVersion2, 0x87612d, const int) -GDecl(g_ExeVersion3, 0x4d3d40, const int) - -void AbortF(wchar_t *fmt, ...) asm("0x9C4940"); -int LogF(const char *fmt, ...) asm("0x937CB0"); -int WarningF(const char *fmt, ...) asm("0x937D30"); -int SpewF(const char *fmt, ...) asm("0x937C30"); -int ConsoleLogF(const char *fmt, ...) asm("0x41C990"); -int FileWrite(int fileIndex, const char *str, int strlen) asm("0xA9B4E6"); //index 3 is log. -bool CopyToClipboard(const wchar_t *str) asm("0x4F2730"); -void* shi_new(size_t size) asm("0xA825B9"); - -extern "C" { -void* realloc(void *ptr, size_t new_size) asm("0x957B00"); -void* malloc(size_t size) asm("0x958B20"); -void free(void *ptr) asm("0x958C40"); -size_t msize(void *memblock) asm("0x957EA0"); -void* calloc(size_t num, size_t size) asm("0x957AB0"); -void* memset(void *dest, int ch, size_t count) asm("0xA89110"); -void* memcpy(void *dest, const void *src, size_t count) asm("0xA89190"); -size_t strlen(const char *str) asm("0xA94450"); -int strcmp(const char *str1, const char *str2) asm("0xAA549E"); -int sprintf_s(char *Buffer, size_t BufferCount, const char *Format, ...) asm("0xA82F32"); -float sqrtf(float) asm("0x452FC0"); -} -#define GetModuleHandleA WDecl(0xC0F378, __stdcall void* (*)(const char *lpLibFileName)) -#define GetProcAddress WDecl(0xC0F48C, __stdcall void* (*)(void* hModule, const char *lpProcName)) -#define GetCurrentProcess WDecl(0xC0F58C, __stdcall void* (*)()) - -#define QueryPerformanceCounter WDecl(0xC0F470, __stdcall bool (*)(int64_t*)) -#define QueryPerformanceFrequency WDecl(0xC0F46C, __stdcall bool (*)(int64_t*)) - -#define DebugLog(_s) LogF("%s", (_s)) - -template -struct basic_string; -using string = basic_string; -using wstring = basic_string; - -wstring *__cdecl wstring_copy_ctor(wstring *ws, const char *s) asm("0x938720"); -string *__thiscall InitString(string *this_, const char *str) asm("0x405550"); -string *__thiscall AssignString(string *this_, const char *str, size_t size) asm("0x4059E0"); - - -#define SSO_bytes 0x10ul -template -struct basic_string { - static constexpr uint32_t sso_size = SSO_bytes/sizeof(T); - uint32_t ptr; // ? - T str[sso_size]; // pointer to data - uint32_t strLen; - uint32_t size; // capacity? - - basic_string() { - ptr = 0; - str[0] = T(0); - strLen = 0; - size = 0; - } - - basic_string(const char*s) { - if constexpr(std::is_same_v) - InitString(this, s); else - if constexpr(std::is_same_v) - wstring_copy_ctor(this, s); else - static_assert(false, "Unknown type T."); - } - - const T* data() { - return size < sso_size ? &str : *(const T**)str; - } - - ~basic_string() - { - if(size >= sso_size) - { - free(data()); - } - ptr = 0; - str[0] = T(0); - strLen = 0; - size = sso_size - 1; - } -}; - -VALIDATE_SIZE(string, 0x1C) -static_assert(string::sso_size == 0x10); -VALIDATE_SIZE(wstring, 0x1C) -static_assert(wstring::sso_size == 0x8); - -template -struct Result { - T *object = nullptr; - const char *reason = nullptr; - - constexpr static Result Fail(const char *reason) { return {nullptr, reason}; } - constexpr static Result Success(void *data) { return {(T *)data, nullptr}; } - - inline bool IsFail() { return reason != nullptr; } -}; - -template -T Offset(void *ptr, size_t offset) -{ - return (T)(((char *)ptr) + offset); -} - -template -T &GetField(void *ptr, size_t offset) -{ - return *Offset(ptr, offset); +#pragma once + +#include +#include "../workflow.cpp" +#include + +#define GPtr(addr, type) \ + (*(type*)addr) + +#define GDecl(name, addr, type) \ + extern type name asm(#addr); + +#define WDecl(addr, type) \ + ((type)*(uintptr_t*)addr) + +#define VALIDATE_SIZE(struc, size) \ + static_assert(sizeof(struc) == size, "Invalid structure size of " #struc); + +#define g_CSimDriver GPtr(0x10C4F50, CSimDriver*) +#define g_SWldSessionInfo GPtr(0x10C4F58, SWldSessionInfo*) +#define g_CWldSession GPtr(0x10A6470, CWldSession*) +#define g_Sim GPtr(0x10A63F0, Sim*) +#define g_EntityCategoryTypeInfo GPtr(0x10C6E70, EntityCategoryTypeInfo*) +#define g_CAiBrainTypeInfo GPtr(0x10C6FA0, CAiBrainTypeInfo*) +#define g_CUIManager GPtr(0x10A6450, CUIManager*) +#define g_EngineStats GPtr(0x10A67B8, EngineStats*) +#define g_WRenViewport GPtr(0x10C7C28, WRenViewport*) +#define g_ConsoleLuaState GPtr(0x10A6478, LuaState*) +#define g_Device GPtr(0x0F8E284, Device*) + +GDecl(ui_ProgressBarColor, 0x0F57BB8, int) +GDecl(ui_SelectTolerance, 0x0F57A90, float) +GDecl(ui_ExtractSnapTolerance, 0x0F57A94, float) +GDecl(ui_DisableCursorFixing, 0x10A6464, bool) +GDecl(ui_RenderIcons, 0x0F57B27, bool) +GDecl(range_RenderSelected, 0x10A640A, bool) +GDecl(range_RenderHighlighted, 0x10A640B, bool) +GDecl(range_RenderBuild, 0x10A6414, bool) +GDecl(d3d_WindowsCursor, 0x10A636E, bool) +GDecl(debugSelect, 0x10A645E, bool) + +GDecl(s_FACTORY, 0xE19824, const char*) +GDecl(s_EXPERIMENTAL, 0xE204B8, const char*) +GDecl(s_ExpectedButGot, 0xE0A220, const char*) // "%s\n expected %d args, but got %d" +GDecl(s_ExpectedBetweenButGot, 0xE0A270, const char*) // "%s\n expected between %d and %d args, but got %d" +GDecl(s_Global, 0xE00D90, const char*) // "" +GDecl(s_CMauiBitmap, 0xE37438, const char*) // "CMauiBitmap" +GDecl(s_UserUnit, 0xE4D090, const char*) // "UserUnit" +GDecl(s_ExpectedAGameObject, 0xE09860, const char*) // "Expected a game object. (Did you call with '.' instead of ':'?)" +GDecl(s_GameObjectHasBeenDestroyed, 0xE098A0, const char*) // "Game object has been destroyed" +GDecl(s_IncorrectTypeOfGameObject, 0xE098C0, const char*) // "Incorrect type of game object. (Did you call with '.' instead of ':'?)" +GDecl(s_UnknownColor, 0x4B2D54, const char*) // "Unknown color: %s" +GDecl(s_c_object, 0xE016DC, const char*) // "_c_object" + +GDecl(g_ExeVersion1, 0x876666, const int) +GDecl(g_ExeVersion2, 0x87612d, const int) +GDecl(g_ExeVersion3, 0x4d3d40, const int) + +void AbortF(wchar_t *fmt, ...) asm("0x9C4940"); +int LogF(const char *fmt, ...) asm("0x937CB0"); +int WarningF(const char *fmt, ...) asm("0x937D30"); +int SpewF(const char *fmt, ...) asm("0x937C30"); +int ConsoleLogF(const char *fmt, ...) asm("0x41C990"); +int FileWrite(int fileIndex, const char *str, int strlen) asm("0xA9B4E6"); //index 3 is log. +bool CopyToClipboard(const wchar_t *str) asm("0x4F2730"); +void* shi_new(size_t size) asm("0xA825B9"); + +extern "C" { +void* realloc(void *ptr, size_t new_size) asm("0x957B00"); +void* malloc(size_t size) asm("0x958B20"); +void free(void *ptr) asm("0x958C40"); +size_t msize(void *memblock) asm("0x957EA0"); +void* calloc(size_t num, size_t size) asm("0x957AB0"); +void* memset(void *dest, int ch, size_t count) asm("0xA89110"); +void* memcpy(void *dest, const void *src, size_t count) asm("0xA89190"); +size_t strlen(const char *str) asm("0xA94450"); +int strcmp(const char *str1, const char *str2) asm("0xAA549E"); +int sprintf_s(char *Buffer, size_t BufferCount, const char *Format, ...) asm("0xA82F32"); +float sqrtf(float) asm("0x452FC0"); +} +#define GetModuleHandleA WDecl(0xC0F378, __stdcall void* (*)(const char *lpLibFileName)) +#define GetProcAddress WDecl(0xC0F48C, __stdcall void* (*)(void* hModule, const char *lpProcName)) +#define GetCurrentProcess WDecl(0xC0F58C, __stdcall void* (*)()) + +#define QueryPerformanceCounter WDecl(0xC0F470, __stdcall bool (*)(int64_t*)) +#define QueryPerformanceFrequency WDecl(0xC0F46C, __stdcall bool (*)(int64_t*)) + +#define DebugLog(_s) LogF("%s", (_s)) + +template +struct basic_string; +using string = basic_string; +using wstring = basic_string; + +wstring *__cdecl wstring_copy_ctor(wstring *ws, const char *s) asm("0x938720"); +string *__thiscall InitString(string *this_, const char *str) asm("0x405550"); +string *__thiscall AssignString(string *this_, const char *str, + size_t size) asm("0x4059E0"); + +int __thiscall wstring_dtor(wstring *ws) asm("0x00431390"); +void __thiscall string_dtor(string *ws) asm("0x00402370"); + +#define SSO_bytes 0x10ul +template struct basic_string { + static constexpr uint32_t sso_size = SSO_bytes / sizeof(T); + uint32_t ptr; // ? + union { + T str[sso_size]; // data + T *_data; // pointer to data + }; + uint32_t strLen; + uint32_t capacity; // capacity? + + basic_string() { + ptr = 0; + str[0] = T(0); + strLen = 0; + capacity = sso_size - 1; + } + + basic_string(const char *s) { + if constexpr (std::is_same_v) + InitString(this, s); + else if constexpr (std::is_same_v) + wstring_copy_ctor(this, s); + else + static_assert(false, "Unknown type T."); + } + + inline const T *data() const { return capacity < sso_size ? static_cast(str) : _data; } + inline T *data() { return capacity < sso_size ? static_cast(str) : _data; } + + inline void clear() { + if (capacity >= sso_size) { + free(data()); + } + ptr = 0; + str[0] = T(0); + strLen = 0; + capacity = sso_size - 1; + } + + ~basic_string() { clear(); } +}; + +VALIDATE_SIZE(string, 0x1C) +static_assert(string::sso_size == 0x10); +VALIDATE_SIZE(wstring, 0x1C) +static_assert(wstring::sso_size == 0x8); + +template +struct Result { + T *object = nullptr; + const char *reason = nullptr; + + constexpr static Result Fail(const char *reason) { return {nullptr, reason}; } + constexpr static Result Success(void *data) { return {(T *)data, nullptr}; } + + inline bool IsFail() { return reason != nullptr; } +}; + +template +T Offset(void *ptr, size_t offset) +{ + return (T)(((char *)ptr) + offset); +} + +template +T &GetField(void *ptr, size_t offset) +{ + return *Offset(ptr, offset); } \ No newline at end of file diff --git a/section/include/magic_classes.h b/include/magic_classes.h similarity index 76% rename from section/include/magic_classes.h rename to include/magic_classes.h index 27c0f793..529d4cc5 100644 --- a/section/include/magic_classes.h +++ b/include/magic_classes.h @@ -3,11 +3,12 @@ #include "moho.h" template -struct RegFunc : luaFuncDescReg +class RegFunc : luaFuncDescReg { + public: RegFunc(const char *name, const char *desc, - lua_CFunction f, const char *className = 0xE00D90) : - luaFuncDescReg{ClassFactory, name, className, desc, *reinterpret_cast(EntryPoint), f, ClassAddr} + lua_CFunction f, const char *className = reinterpret_cast(0xE00D90)) : + luaFuncDescReg{(void**)ClassFactory, name, className, desc, *reinterpret_cast(EntryPoint), f, (void*)ClassAddr} { *reinterpret_cast(EntryPoint) = this; } @@ -15,10 +16,13 @@ struct RegFunc : luaFuncDescReg RegFunc(srf.FuncName, srf.FuncDesc, srf.FuncPtr, srf.ClassName) {} }; -template -using SimRegFunc = RegFunc<0xF5A124, ClassFactory, ClassAddr>; -template -using UIRegFunc = RegFunc<0xF59690, ClassFactory, ClassAddr>; +using SimRegFunc = RegFunc<0xF5A124, 0xE45E90, 0>; +using UIRegFunc = RegFunc<0xF59690, 0xE45E90, 0>; + +template +using SimRegFuncT = RegFunc<0xF5A124, ClassFactory, ClassAddr>; +template +using UIRegFuncT = RegFunc<0xF59690, ClassFactory, ClassAddr>; using TConFunc = void(vector*); diff --git a/section/include/moho.h b/include/moho.h similarity index 94% rename from section/include/moho.h rename to include/moho.h index 943f99f5..8bdd3ee7 100644 --- a/section/include/moho.h +++ b/include/moho.h @@ -1,1470 +1,1470 @@ -#pragma once - -#include "LuaAPI.h" - -typedef int BOOL; -typedef int unk_t; - -struct luaFuncDescReg -{ // 0x1C bytes - void **RegisterFunc; // call for register lua function. 0x00E45E90 is std func - char *FuncName; // lua name function - char *ClassName; // lua class name. 0x00E00D90 - if none - char *FuncDesc; // for log - luaFuncDescReg *Next; // reg func of chain - void *FuncPtr; // code address - void *ClassPtr; // C++ class type address. NULL if class none -}; -VALIDATE_SIZE(luaFuncDescReg, 0x1C) - -// Probably from visual c++ 9 -struct vtable; -struct typeInfo -{ // 0x8+ bytes - void *vtable; - int zero; - char name[]; -}; - -struct classDesc -{ // 0x30+ bytes - // at 0x4 - uint32_t trueDataOffset; // Subtraction - // at 0xC - void *typeInfo; - // at 0x20 - void *beginParents; // +0x4 - void *endParents; // -0x4 - // at 0x28 - classDesc *parents[]; - //void* typeInfo; -}; - -struct vtable -{ // 0x8+ bytes - // at -0x4 - void* classDesc; - void* methods[]; -}; - - -template -struct vector -{ // 0x10 bytes - uint32_t pad; - T *begin, *end, *capacity_end; - - T operator[](int i) { return begin[i]; } - size_t size() { return begin ? end - begin : 0; } -}; -VALIDATE_SIZE(vector, 0x10) - -template -struct list -{ // 0xC bytes - T *begin, *end, *capacity_end; - - T operator[](int i) { return begin[i]; } - size_t size() { return begin ? end - begin : 0; } -}; -VALIDATE_SIZE(list, 0xC) - -template -struct linked_list -{ // 0x8 bytes - T *next; - T *prev; -}; - -struct moho_set -{ // 0x20 bytes - int baseI; - int unk1; - uint32_t *begin, *end, *capacity_end; - void *unk2; - uint32_t value; // Memory for 'Short Set Optimization' - void *unk3; - - void set(uint32_t item, bool set) { - auto *itemPtr = &begin[item >> 5 - baseI]; - if (itemPtr >= end) end = itemPtr + 1; - item = 1 << (item & 0x1F); - if (set) - *itemPtr |= item; else - *itemPtr &= ~item; - } - bool operator[](int item) { - auto *itemPtr = &begin[item >> 5 - baseI]; - if (itemPtr >= end) return false; - return *itemPtr & (1 << (item & 0x1F)); - } -}; -VALIDATE_SIZE(moho_set, 0x20) - -typedef int SOCKET; -// GPGCore - -struct Vector2f -{ // 0x8 bytes - float x,z; -}; - -struct Vector3f -{ // 0xC bytes - float x,y,z; -}; - -struct Vector4f -{ // 0x10 bytes - float x,y,z,w; -}; - -struct RObject -{ // 0x4 bytes - void *vtable; -}; - -template -struct ObjectType { - const static int Type = T; - const static int Info = TInfo; -}; - -struct CScriptObject : RObject -{//0x004C6F8A, 0x34 bytes - linked_list ll; - LuaObject UserData; - LuaObject Table; -}; -VALIDATE_SIZE(CScriptObject, 0x34) - -struct WeakObject -{ // 0x8 bytes? - void *vtable; - void *Unk1; -}; - -struct gpg_mutex -{ - int unk1; - bool unk2; // If value is 0 then NTDLL.RtlEnterCriticalSection is bypassed -}; - -struct Stream -{ // 0x1C bytes - void *vtable; -}; - -struct PipeStream : Stream -{ // 0x48 bytes -}; - -struct FileStream : Stream -{//0x00956DB4, 0x34 bytes -}; - -struct StatItem // : class TDatTreeItem -{ // 0xA0 bytes - void *vtable; - // at 0x24 - int value; // int/float - // at 0x74 - string name; - // at 0x90 - int valueType; - int unk2; - // at 0x98 - void *criticalSection; // Result RtlInitializeCriticalSection - bool unk1; // Set 1 at 00AC1A69, at 00AC1AB0 check(0 -> WaitForSingleObject, 1 -> RtlEnterCriticalSection) -}; - -struct EngineStats // : class Stats -{ // 0x50 bytes - void *vtable; - StatItem *stat; - void *criticalSection; // Result RtlInitializeCriticalSection - BOOL unk1; // Set 1 at 00AC1A69 - string str1; // Written "stats.log" - string str2; - int unk2; - BOOL unk3; -}; - -struct Camera // : RCamCamera -{//0x007A7972, 0x858 bytes -}; - -struct CMauiControl : CScriptObject -{//0x004C6F8A, 0x11C bytes - using Type = ObjectType<0x10C7700, 0xF83314>; -}; - -struct CWldSession; - -struct CUIWorldView : CMauiControl -{//0x004C6F8A, 0x2A8 bytes - using Type = ObjectType<0x10C77E4, 0xF8A71C>; - // at 0x120 - Camera *camera; - // at 0x208 - CWldSession *session; - void *unk1; // If shift pressed - - bool GetCustomRenderingEnabled()const - { - return *(char*)((int)this + 377); - } - - void SetCustomRenderingEnabled(bool state) - { - *(char*)((int)this + 377) = state; - } -}; - -struct RBlueprint; - -struct RRuleGameRules -{//0x00529158, 0xD0 bytes - void *vtable; - // at 0x2C - //list L1; - // at 0x48 - //list L2; - // at 0xB8 - list Blueprints; - //list L3; - // at 0xC4 - //void *Blueprints; - //void *Start, *End; -}; - -struct LaunchInfoNew -{//0x005423CC, 0xA4 bytes - void *vtable; - RRuleGameRules *rules; - void *STIMap; - // at 0xC - string lua_gameMods; - // at 0x28 - string str2; - // at 0x60 - int unk1; - int unk2; - int unk3; // = -1 - // at 0x6C - string interfaceLang; - bool cheatsEnabled; // copied to CWldSession + 0x4D4 - char pad1[3]; - int unk4; -}; - -struct REffectBlueprint : RObject -{ -}; - -struct RBeamBlueprint : REffectBlueprint -{//0x0050EEFD, 0x84 bytes -}; - -struct RBlueprint : RObject -{ // ~0x60 bytes - // at 0x4 - RRuleGameRules *owner; - string name; - string desc; - // at 0x40 - string source; // example: /units/uel0001/uel0001_unit.bp - uint32_t BlueprintOrdinal; -}; - -struct RMeshBlueprint : RBlueprint -{//0x0050DD83, 0x80 bytes - // at 0x70 - float IconFadeInZoom; -}; - -struct REntityBlueprint : RBlueprint -{ // ~0x17C bytes - // at 0x60 - vector Categories; - - // at 0xD8 - struct SFootprint { - char SizeX; - char SizeZ; - char OccupancyCaps; - char Flags; - float MaxSlope; - float MinWaterDepth; - float unk1; - } Footprint, AltFootprint; -}; - -struct RPropBlueprint : REntityBlueprint -{//0x0050DD83, 0x1AC bytes -}; - -struct RProjectileBlueprint : REntityBlueprint -{//0x0050DD83, 0x268 bytes -}; - -struct RUnitBlueprintWeapon -{ // 0x184 bytes -}; - -struct RUnitBlueprint : REntityBlueprint -{//0x0050DD83, 0x568 bytes - // at 0x17C - struct RUnitBlueprintGeneral { - } General; - - // at 0x200 - struct RUnitBlueprintDisplay { - } Display; - - // at 0x278 - struct RUnitBlueprintPhysics { - } Physics; - - // at 0x330 - struct RUnitBlueprintIntel { - } Intel; - - // at 0x368 - struct RUnitBlueprintAir { - } Air; - - // at 0x3F8 - struct RUnitBlueprintTransport { - // at 0x400 - int T2ClassSize; - int T3ClassSize; - int GenericClassSize; - int SClassSize; - } Transport; - - // at 0x420 - struct RUnitBlueprintDefense { - // at 0x43C - string ArmorType; - } Defense; - - // at 0x460 - struct RUnitBlueprintAI { - float GuardScanRadius; - float GuardReturnRadius; - float StagingPlatformScanRadius; - bool ShowAssistRangeOnSelect; - string GuardFormationName; - bool NeedUnpack; - bool InitialAutoMode; - string BeaconName; - vector TargetBones; - float RefuelingMultiplier; - float RefuelingRepairAmount; - float RepairConsumeEnergy; - float RepairConsumeMass; - bool AutoSurfaceToAttack; - float AttackAngle; - } AI; - - // at 0x4D8 - vector Weapon; - - // at 0x4E8 - struct RUnitBlueprintEconomy { - // at 0x564 - float MaxBuildDistance; - } Economy; -}; - -struct CUIManager // : IUIManager -{//0x0084C9CB, 0x78 bytes - // at 0x30 - LuaState *LState; // from [10A6478] -}; - -struct CAiReconDBImpl // : IAiReconDB -{//0x005BFFB8, 0xB0 bytes - void *vtable; - // at 0xA8 - bool FogOfWar; -}; - -struct CIntelGrid -{ // 0x24 bytes -}; - -struct IClientManager -{ - void *vtable; -}; - -struct IClient -{ - void* vtable; -}; - -struct CWldMap -{ - void *zero1; - void *zero2; - void *zero3; -}; - -struct SSTICommandSource -{ // 0x24 bytes - int index; - string name; - int protocol; // -1 SinglePlayer, 3 MultiPlayer -}; - -struct Deposit -{ // 0x14 bytes - int X1,Z1,X2,Z2; // Rect - int Type; // 1 - Mass, 2 - Energy -}; -VALIDATE_SIZE(Deposit, 0x14); - -struct CSimResources // : ISimResources // : IResources -{//0x007444EF, 0x1C bytes - void *vtable; - // at 0x8 in vtable - // ecx:CreateResourceDeposit(type, x, y, z, size) - // at 0x28 in vtable - // ecx:FindResourceDeposit(PtrPosXZ, PtrResultXZ, Radius, Type):Bool - - uint8_t pad[0xC]; - // at 0x10 - list deposits; -}; -VALIDATE_SIZE(CSimResources, 0x1C) - -struct SWldSessionInfo -{ // 0x30 bytes - string map_name; - - // at 0x1C - void *LaunchInfoNew; - - // at 0x20 - int unk1; - bool isBeingRecorded; - bool isReplay; - bool isMultiplayer; - char pad1; - // at 0x2C - int ourCmdSource; - - IClientManager *clientManager; - int unk2; // = 255 possibly cmdSourceIndex -}; - -struct SimArmyEconomyInfo -{ // 0x60 bytes - void *unk1; - int unk2; - float _incomeEnergy; // div 10 - float _incomeMass; // div 10 - - float baseIncomeEnergy; // div 10 - float baseIncomeMass; // div 10 - float storedEnergy; - float storedMass; - - float incomeEnergy; // div 10 - float incomeMass; // div 10 - float reclaimedEnergy; - float reclaimedMass; - - float requestedEnergy; // div 10 - float requestedMass; // div 10 - float expenseEnergy; // div 10 - float expenseMass; // div 10 - - uint32_t maxEnergy; - int unk3; - uint32_t maxMass; - int unk4; - - float unk5; - uint32_t isResourceSharing; - float unk6; - float unk7; -}; - -struct BaseArmy -{ // 0x1DC bytes - // struct 0x80 bytes - int armyIndex; - string name; - string nickname; - bool isCivilian; - uint8_t pad1[3]; - uint8_t unk1[0x40]; - // at 0x80 - // struct 0x15C bytes - float storedEnergy; - float storedMass; - float incomeEnergy; // div 10 - float incomeMass; // div 10 - float reclaimedEnergy; - float reclaimedMass; - float requestedEnergy; // div 10 - float requestedMass; // div 10 - float expenseEnergy; // div 10 - float expenseMass; // div 10 - // at 0xA8 - uint32_t maxEnergy; - int unk2; // =0 - uint32_t maxMass; - int unk3; // =0 - bool isResourceSharing; - uint8_t pad2[7]; - // at 0xC0 - moho_set neutrals; - moho_set allies; - moho_set enemies; - // at 0x120 - bool IsAlly; - uint8_t pad3[7]; - moho_set mValidCommandSources; - uint32_t color; - uint32_t iconColor; - string mArmyType; // 'human' for players - // at 0x16C - int faction; - bool unk4; - uint8_t pad4[7]; - uint32_t unk5[4]; - bool showScore; - uint8_t pad5[7]; - uint32_t unk6; - uint32_t pad6; - uint32_t unk7; - uint32_t pad7; - uint32_t unk8[6]; - // at 0x1B8 - bool outOfGame; - uint8_t pad8[3]; - Vector2f StartPosition; - uint32_t unk9; - float noRushRadius; - float noRushOffsetX; - float noRushOffsetY; - float unk10; - float unk11; -}; -VALIDATE_SIZE(BaseArmy, 0x1DC); - -struct UserArmy : BaseArmy -{ // 0x210 bytes - // at 0x1DC - uint8_t unk12[8]; - // at 0x1E4 - CWldSession *session; - uint8_t unk13[0x28]; -}; -VALIDATE_SIZE(UserArmy, 0x210); - -struct Sim; - -struct SimArmy // : IArmy, BaseArmy -{//0x006FD332, 0x288 bytes - void *vtable; - void *unk1; - // at 0x8, BaseArmy - int armyIndex; - string name; - string nickname; - // at 0x44 - bool isCivilian; - uint8_t pad1[0x40]; - - // at 0x88 Copy from [[self+1F4]+18] - float storedEnergy; - float storedMass; - float incomeEnergy; // div 10 - float incomeMass; // div 10 - float reclaimedEnergy; - float reclaimedMass; - float requestedEnergy; // div 10 - float requestedMass; // div 10 - float expenseEnergy; // div 10 - float expenseMass; // div 10 - - uint32_t maxEnergy; - int unk2; // =0 - uint32_t maxMass; - int unk3; // =0 - bool isResourceSharing; - uint8_t pad2[4]; - // at 0xC8 - moho_set neutrals; - moho_set allies; - moho_set enemies; - // at 0x128 - bool IsAlly; - uint8_t pad3[4]; - // at 0x130 - moho_set mValidCommandSources; - // at 0x150 - uint32_t color; - uint32_t iconColor; - string mArmyType; // 'human' for players - // at 0x174 - int faction; - uint8_t pad4[0x48]; - // at 0x1C0 - bool outOfGame; - // at 0x1C4 - Vector2f StartPosition; - uint8_t pad5[0x4]; - // at 0x1D0 - float noRushRadius; - float noRushOffsetX; - float noRushOffsetY; - uint8_t pad6[0xC]; - // at 0x1E8 - Sim *sim; - void *CAiBrain; - // at 0x1F0 - void *CAiReconDBImpl; - SimArmyEconomyInfo *EconomyInfo; - // at 0x1F8 - string unk4; - uint8_t pad7[0x5C]; - // at 0x270 - float unitCap; - uint8_t pad8[4]; - // at 0x278 - int pathCap_Land; - int pathCap_Sea; - int pathCap_Both; - uint8_t pad9[4]; -}; -VALIDATE_SIZE(SimArmy, 0x288); - -struct CArmyImpl : SimArmy -{//0x006FD332, 0x288 bytes -}; - -struct Entities -{ // 0x50 bytes -}; - -struct EntityChain // [[Entities+4]+4] -{ - void *next; - //void *?; - //void *?; - int ID; - void *entity; -}; - -struct Sim; -struct Unit; -struct Entity : CScriptObject -{ // 0x270 bytes - // at 0x68 - uint32_t EntityID; // For units x|xx|xxxxxx Type,Army,Num. Uses for UserSync - REntityBlueprint *Blueprint; - uint32_t CreationIndex; // ? - // at 0x110 - bool VisibleAndControl; -}; - -struct Projectile : Entity -{//0x004C702B, 0x380 bytes - // at 0x6C - using Type = ObjectType<0x10C7578, 0xF77914>; - RProjectileBlueprint *Blueprint; -}; - -struct Prop : Entity -{//0x004C702B, 0x288 bytes - // at 0x6C - RPropBlueprint *Blueprint; -}; - -struct CUnitCommand; -struct CCommandTask -{ //0x34 bytes - void* vtable; - void* unk0; // self+4; - // at 0x10 - CCommandTask *prevTask; // ? - // at 0x1C - Unit *owner; - Sim *sim; - // at 0x28 - //CCommandTask *prevTask; -0x2C -}; - -struct CUnitMobileBuildTask : CCommandTask -{ //0xE8 bytes - // at 0xC - Unit *owner; - Sim *sim; - Unit *target0; // -4 - CCommandTask *next; // ? - // at 0x2C - string name; - float FractionComplete; - // at 0x50 - CUnitCommand *unitCommand; - RUnitBlueprint *build; - float unk0, unk1, unk2, unk3; - // at 0x84 - Unit *target1; // -4 -}; - -struct CUnitRepairTask : CCommandTask -{ //0x9C bytes - // at 0xC - Unit *owner; - Sim *sim; - // at 0x2C - string name; - // at 0x50 - CUnitCommand *unitCommand; - Unit *target; // -4 -}; - -struct CUnitCommand : CScriptObject -{ // 0x178 bytes - // at 0x34 - CCommandTask *task; // -4 - // at 0x40 - Sim *sim; - // at 0x4C - float unk3; - // at 0x5C - float unk4; - // at 0x60 - RUnitBlueprint* BpBuild; - string unk5; - // at 0x98 - uint32_t CommandType; - // at 0xA0 - uint32_t TargetId; - Vector4f Pos; - // at 0x120 - Entity Target; //-0x4 - // at 0x128 - Vector3f Pos2; - // at 0x160 - LuaObject Nil; - void *unk6; -}; - -struct SCommand -{ // 0x8 bytes - void *CUnitCommand; // +0x4 - void *nil; -}; - -struct CommandQueue -{ // 0x28 bytes - void *unk1; - void *unk2; - Unit *Owner; - vector Commands; - void *unk3; - void *unk4; - bool unk5; -}; - -struct UnitWeapon //: CScriptEvent -{//0x006D3114, 0x188 bytes - void* vtable; - // at 0x10 - void* vtable2; - // at 0x1C - LuaObject UserData; - LuaObject Table; - // at 0x5C - float RateOfFire; - float MinRadius; - float MaxRadius; - float SquaredMinRadius; - float SquaredMaxRadius; - // at 0xA0 - Unit* Owner; -}; - -struct CAiAttackerImpl // : IAiAttacker -{//0x005D6ABF, 0xA4 bytes - void* vtable; - // at 0x58 - vector Weapons; -}; - -struct UserUnitWeapon -{ // 0x98 bytes - // at 0x54 - float MinRadius; - float MaxRadius; -}; - -struct UnitIntel -{ // 0x20 bytes, AND 7FFFFFFF - int VisionRadius; - int WaterVisionRadius; - int RadarRadius; - int SonarRadius; - int OmniRadius; - int RadarStealthFieldRadius; - int SonarStealthFieldRadius; - int CloakFieldRadius; -}; - -struct Unit : WeakObject -{//0x006A5422, 0x6A8 bytes - using Type = ObjectType<0x010C6FC8, 0x00F6A1E4>; - //WeakObject WeakObject; - // at 0x8 - //Entity Entity; to 0x278 - // at 0x50 - void* self1; - // at 0x70 - uint32_t UnitID; - RUnitBlueprint *Blueprint; - uint32_t CreationIndex; // ? - void *unk1; - void *unk2; - void *RScmResource; - void *RMeshBlueprint; - Vector3f Scale; // at 0x8C - float CurHealth; - float MaxHealth; - bool unk3; - bool unk4; - bool unk5; - char pad1; - Vector4f Rot1; // at 0xA4 - Vector3f Pos1; - Vector4f Rot2; - Vector4f Pos2; - float FractionComplete; // at 0xE0 - void *unk6; - char unk7[0x18]; - void *unk10; - void *unk12; - void *unk13; - void *unk14; - void *unk15; - void *unk16; - bool VisibleAndControl; // at 0x118 - char pad2[3]; - void *unk18; - void *unk19; - bool unk20; - char pad3[3]; - void *unk21; - UnitIntel UnitIntel; // at 0x130 - Sim *sim; // at 0x150 - SimArmy *owner; - Vector4f Rot3; - Vector3f Pos3; - // at 0x17C - int TickCount1; // Readonly - void* CColPrimitiveBase; - // at 0x248 - Vector3f Pos4; - Vector3f Pos5; - // at 0x294 - float FuelRatio; - float ShieldRatio; // Readonly - // at 0x2A0 - bool Paused; - // at 0x2AC - float WorkProgress; - // at 0x2CC - string customUnitName; - // at 0x380 - UserUnitWeapon* Weapons; - list unk22; // Weapons? - void *unk23; // Weapons? - // at 0x4B0 - void *MotionEngine; // +0xC FuelUseTime - void *CommandQueue; - int Enum; //0..4 - // at 0x534 - void *workValues; // +0x8 - bool Flag; - // at 0x53C - float WorkRate; - // at 0x544 - void* IAiAttacker; - void* IAiCommandDispatch; - // at 0x558 - void* IAiSiloBuild; - void* IAiTransport; - // at 0x59C - Vector3f Pos6; - // at 0x668 - int tickCount2; // Readonly - // at 0x68E - bool updWeaponRadius; -}; - -struct UserEntity : WeakObject -{ // 0x148 bytes - // at 0x44 - int entityID; - RPropBlueprint *blueprint; - // at 0x58 - RMeshBlueprint *mesh; - // at 0x68 - float curHealth; - float maxHealth; - // at 0x70 - bool isBeingBuilt; - Vector4f rot1; - Vector3f pos1; - // at 0x90 - Vector4f rot2; - Vector4f pos2; - // at 0xB0 - float fractionComplete; - // at 0xD0 - //float x1,y1,x2,y2; - // at 0x100 - UnitIntel unitIntel; - UserArmy *owner; // at 0x120 - Vector4f rot3; - Vector4f pos3; -}; - -struct UserUnit : UserEntity -{//0x008B8601, 0x3E8 bytes - using Type = ObjectType<0x10C77AC, 0xF881E0>; - // at 0x44 - uint32_t UnitID; - RUnitBlueprint *blueprint; - // at 0x1B0 - bool Paused; - // at 0x1BC - float WorkProgress; - // at 0x1DC - string customUnitName; - // at 0x290 - UserUnitWeapon *weapons; -}; - -struct CPlatoon : public CScriptObject -{ - using Type = ObjectType<0x10C6FCC, 0xF6A1FC>; -}; - -struct CMauiBitmap : public CMauiControl -{ - using Type = ObjectType<0x10C7704, 0xF832F4>; -}; - -struct ReconBlip : Entity -{ // 0x4D0 bytes - Entity entity; - // at 0x270 - void *originUnit; // -0x4 - // at 0x28C - void *StatItem; - void *StatItem2; - // at 0x320 - void *CAniPose; - // at 0x328 - void *CAniPose2; - // at 0x330, size 0x30? - list unk1; - void *unk2; - // at 0x360, size 0x30? - list unk3; - void *unk4; - // at 0x390, size 0x30? - list unk5; // Weapons? - void *unk6; // Weapons? - // at 0x450, size 0x30? - list unk7; - void *unk8; - // at 0x4C4 - void *armyesData[]; //size 0x34 -}; - -struct STIMap; -struct Sim // : ICommandSink -{ // 0xAF8 bytes - void *vtable; - uint8_t pad1[0x4C]; - // at 0x50 - char dynamicHash[16]; - char hashTrash[0x50]; - char simHashes[16*128]; // at 0xB0-8B0 - uint8_t pad2[0x10]; - // at 0x8C0 - void *CEffectManager; // 0x18 bytes - void *CSimSoundManager; // 0x720 bytes - RRuleGameRules *rules; // From CSimDriver.LaunchInfoNew - STIMap *STIMap; // From CSimDriver.LaunchInfoNew - CSimResources *res; - uint8_t pad3[4]; - // at 0x8D8 - LuaState *LState; - uint8_t pad4[0xA]; - // at 0x8E6 - bool cheatsEnabled; - uint8_t pad5[0x10]; - // at 0x8F8 - uint32_t beatCounter1; - void *unk1; // self+0x900 or null - uint32_t beatCounter2; - // at 0x904 - void *unk2; // 0x9CC bytes - void *unk3; // 0x68 bytes - vector armies; - uint8_t pad6[4]; - // at 0x920 - list cmdSources; - // at 0x92C - int ourCmdSource; // Possibly just current in simulation. - uint8_t pad7[0x4C]; - // at 0x97C - void **unk4; // 0x30 bytes - void *CAiFormationDB; // 0x40 bytes - // at 0x984 - void *Entities; - void *unk5; // 0xCD0 bytes - uint8_t pad8[0x10]; - // at 0x99C - void *unk6; // 0xCF0 bytes - uint8_t pad9[0x98]; - // at 0xA38 - void *unk7; // 0xC bytes - uint8_t pad10[0x4C]; - // at 0xA88 - int focusArmyIndex; // Focused army, -1 = observer - uint8_t pad11[0x6C]; -}; -VALIDATE_SIZE(Sim, 0xAF8) - -struct CWldSession -{//0x0089318A, 0x508 bytes - CWldSession *self1; - CWldSession *self2; - void *self_weird1; // this + 0x8 - void *self_weird2; // this + 0x8 - // at 0x10 - LuaState *LState; // Set from constructor argument - void *unk1; // 0x14 bytes - RRuleGameRules *rules; - CWldMap *map; - LaunchInfoNew *launchInfo; - void *unk2; //class detail::boost::sp_counted_impl_p - string mapName; - Entities entities; - uint8_t pad1[0x3A8]; - // at 0x3F0 - list armies; - // at 0x3FC - void *unk3; // 0xCC0 bytes - void *unk4; // 0x64 bytes - uint8_t pad2[0x20]; - // at 0x424 - CSimResources *deposits; - uint8_t pad3[0x48]; - // at 0x470 - vector cmdSources; - // at 0x480 - int ourCmdSource; - bool isReplay; - bool isBeingRecorded; - bool isMultiplayer; - bool allowObservers; - - int focusArmyIndex; // focused army, -1 = observer - - BOOL isGameOver; - uint8_t pad4[0x10]; - // at 0x4A0 - struct { - int unk1; - void **SelList; //+0x10 - int SelCount; - int SelCount2; - } selectedUnits; - // at 0x4B0 - struct - { // size 0x24 - void *unk1; - float mouseWorldPosX; - float mouseWorldPosY; - float mouseWorldPosZ; - void *unk2; - void *unk3; - int highlightCommandId; - float mouseScreenPosX; - float mouseScreenPosY; - } mouse; - // at 0x4D4 - bool cheatsEnabled; // Copied from LaunchInfoNew + 0x88 - uint8_t pad5[0x13]; - // at 0x4E8 - bool displayEconomyOverlay; - bool relationsArmyColors; - uint8_t pad6[0x1C]; -}; -VALIDATE_SIZE(CWldSession, 0x508) - -struct CSimDriver // : ISTIDriver -{//0x0073B59E, 0x230 bytes - void *vtable; - Sim *sim; - IClientManager *ClientManager; - uint8_t pad1[4]; - // at 0x10 - void *LaunchInfoNew; // From g_SWldSessionInfo, only when loading game init - uint8_t pad2[8]; - // at 0x1C - uint32_t beatCounter1; - uint32_t beatCounter2; // Copied to address 0x1290710 - uint32_t beatCounter3; - uint8_t pad3[0x86]; - // at 0xB0 - int focusArmyIndex; - uint8_t pad4[0x6C]; - // at 0x120 - int focusArmyIndex2; // Copy from 0xB0 - uint8_t _pad5[0x104]; - // at 0x228 - int maxSimRate; // from CalcMaxSimRate - uint8_t pad6[4]; -}; -VALIDATE_SIZE(CSimDriver, 0x230); - -struct CHeightField // : class detail::boost::sp_counted_base -{//0x00579121, 0x10 bytes - void* vtable; -}; - -struct MapData -{ // 0x1C bytes - uint32_t *TerrainHeights; // Word(TerrainHeights+(Y*SizeX+X)*2) - int SizeX; // +1 - int SizeY; // +1 -}; - -struct STIMap -{ // 0x1548 bytes - MapData *MapData; - CHeightField *HeightField; - uint32_t unk1[4]; - // at 0x18 - void *beginData; - void *endData; - void *endData2; - void *beginData2; - // at 0x28 - LuaObject Data[0x100]; // Type desc tables - uint8_t *TerrainTypes; // TerrainTypes+(Y*SizeX+X) - int SizeX; - int SizeY; - uint8_t unk2[0x100]; - // at 0x1534 - BOOL Water; - float WaterLevel; - float DepthLevel; - float AbyssLevel; - uint32_t unk3; -}; -VALIDATE_SIZE(STIMap, 0x1548); - -struct CPushTask -{ - char data[0x24]; -}; - -typedef CPushTask CPullTask; - -struct INetConnector -{ - void* vtable; -}; -struct CLobby -{//0x004C702B, 0xC8 bytes - // at 0x20 - LuaObject unk1; - - int unk2; - int unk3; - int unk4; - int unk5; - // at 0x44 - CPushTask pushTask; - - // at 0x60 - CPullTask pullTask; - - // at 0x84 - bool hosted_or_joined; // Has CLobby been used to host/join yet? - - // at 0x88 - void* not_host; // 0 if we're host - - // at 0x90 - string our_name; - // at 0xAC - int our_UID; - - // at 0xB0 - struct - { - INetConnector* first_element; - INetConnector* last_element; // It will probably always be our CNetXXXConnector - } peer_list; // Probably singly-linked list -}; - -struct sub_10392B10_ret -{ // 0x20 bytes - - void* zero1; - void* zero2; - void* zero3; - int unk1; - - // at 0x10 - bool one1; - bool zero4; -}; - -struct CLobbyPeer -{ // 0x50 bytes - - CLobbyPeer* next; // Doubly linked list pointers - CLobbyPeer* prev; - - string playerName; - - // at 0x24 - int ownerID; // User UID - int const1; - short const2; - char pad1[2]; - - // at 0x30 - int const3; // enum? - float const4; // = 0 - int const5; - int unk1; - - // at 0x40 - sub_10392B10_ret* unk2; // made in sub_10394180 - int zero1; - int cmdSourceIndex; // == 255 => Unassigned - int playerNo; - - /* - const1, const2, const3, const5 - specially define the CLobbyUser - - const3: - 1 - Host for a lobby we joined? - 3 - Peer who connected to us? - 6 - Game Peer of a Launched Game? - */ -}; - -struct CClientManagerImpl : IClientManager -{ // 0x184D0 bytes - // at 0x40C - gpg_mutex mLock; - - // at 0x420 - list mClients; - INetConnector* mConnector; - - // at 0x434 - bool mWeAreReady; - bool mEveryoneIsReady; - char pad1[2]; - int mDispatchedBeat; - int mAvailableBeat; - int mFullyQueuedBeat; - int mPartiallyQueuedBeat; - int gameSpeedChangeCounter; // mGameSpeedClock - int mGameSpeedRequester; // Always 0 - int gameSpeedRequested; // mGameSpeed - bool speedControlEnabled; - // at 0x458 - uint32_t hEvent; // for KERNEL32.SetEvent - // at 0x18470 - PipeStream mPipe; - // at 0x184BC - bool unk1; // if value is 1 then KERNEL32.SetEvent is bypassed -}; - -typedef struct mRequest {IClient* mRequester; int mAfterBeat;}; - -struct CClientBase : IClient -{//0x0053B5E9, 0xD8 bytes - string mNickname; - // at 0x20 - int mIndex; // client index - int mUID; - IClientManager* clientManager; - - // at 0x30 - moho_set unk1; - // at 0x50 - int mCommandSource; - bool mReady; - char pad1[3]; - PipeStream mPipe; - - // at 0xA0 - int mQueuedBeat; - int mDispatchedBeat; - int mAvailableBeatRemote; - vector mLatestAckReceived; - int mLatestBeatDispatchedRemote; - // at 0xC0 - bool mEjectPending; - bool mEjected; - char pad2[2]; - vector mEjectRequests; - int maxSimRate; // from CalcMaxSimRate -}; - -struct CLocalClient : CClientBase -{//0x0053B5E9, 0xD8 bytes -}; // equal CClientBase - -struct CReplayClient : CClientBase -{ // 0x160 bytes - // before 0xD8 it CClientBase - // at 0xD8 - FileStream* stream; - // at 0xE0 - void* ptr1; // self+0xF0 - void* ptr2; // self+0xF0 - void* ptr3; // self+0x130 - void* ptr4; // self+0xF0 - void* unk1; - // at 0x130 - void* unk2; - // at 0x138 - uint32_t replayBeat; - bool unk3; - void* unk4; - uint32_t hSemaphore1; - uint32_t hSemaphore2; - uint32_t hMutex; - // at 0x15C - bool unk5; - bool unk6; -}; - -struct CNetUDPConnection {}; - -struct CNetUDPConnetor // : INetConnector -{ // 0x18090 bytes - void* vtable; - void* smth; // Listen socket fd? - gpg_mutex mMutex; - // at 0x14 - SOCKET mSocket; - // at 0x24 - linked_list mConnections; -}; -/*Game Types - Multiplayer - CLobby::LaunchGame - Replay - VCR_SetupReplaySession - SinglePlayer - WLD_SetupSessionInfo - Saved Game - CSavedGame::CreateSinglePlayerSession - - Session State - 0 - None? - 1 - Loading? - 2 - Started? - 3 - SIM Initialized - 4 - SIM Started - 5 - Game Started - 7 - Restart Requested - 8 - Session Halted -*/ - -struct MapImager -{ // 0x14 bytes - void* vtable; -}; - -struct MeshThumbnailRenderer -{ // 0x3C bytes - void* vtable; -}; - -struct RangeRenderer -{ // 0x94 bytes - void* vtable; -}; - -struct VisionRenderer -{ // 0x78 bytes - void* vtable; -}; - -struct BoundaryRenderer -{ // 0x68 bytes - void* vtable; -}; - -struct Shadow -{ // 0x318 bytes - void* vtable; -}; - -struct Clutter -{ // 0x192C bytes - void* vtable; -}; - -struct Silhouette -{ // 0x74? bytes - void* vtable; - // at 0xC - CUIWorldView *worldView; -}; - -struct WRenViewport // : WD3DViewport -{//0x0097977D, 0x21A8 bytes - void* vtable; - // at 0x32C - MapImager mapImager; - // at 0x340 - MeshThumbnailRenderer meshThumbnailRenderer; - // at 0x37C - RangeRenderer rangeRenderer; - // at 0x410 - VisionRenderer visionRenderer; - // at 0x488 - BoundaryRenderer boundaryRenderer; - // at 0x4F0 - Shadow shadow; - // at 0x808 - Clutter clutter; - // at 0x2134 - Silhouette silhouette; -}; - -namespace incomplete { - struct Command - { - Command *self; - uint8_t pad1[0x1C]; - RBlueprint *bpBuild; // at 0x20 - uint8_t pad2[0x34]; - int commandType; // at 0x58 // see EUnitCommandType; sub_552170 - uint8_t pad3[0x4]; - int targetId; // at 0x60 // valid if != 0xF0000000 - Vector3f pos; // at 0x64 - }; -} +#pragma once + +#include "LuaAPI.h" + +typedef int BOOL; +typedef int unk_t; + +struct luaFuncDescReg +{ // 0x1C bytes + void **RegisterFunc; // call for register lua function. 0x00E45E90 is std func + const char *FuncName; // lua name function + const char *ClassName; // lua class name. 0x00E00D90 - if none + const char *FuncDesc; // for log + luaFuncDescReg *Next; // reg func of chain + lua_CFunction FuncPtr; // code address + void *ClassPtr; // C++ class type address. NULL if class none +}; +VALIDATE_SIZE(luaFuncDescReg, 0x1C) + +// Probably from visual c++ 9 +struct vtable; +struct typeInfo +{ // 0x8+ bytes + void *vtable; + int zero; + char name[]; +}; + +struct classDesc +{ // 0x30+ bytes + // at 0x4 + uint32_t trueDataOffset; // Subtraction + // at 0xC + void *typeInfo; + // at 0x20 + void *beginParents; // +0x4 + void *endParents; // -0x4 + // at 0x28 + classDesc *parents[]; + //void* typeInfo; +}; + +struct vtable +{ // 0x8+ bytes + // at -0x4 + void* classDesc; + void* methods[]; +}; + + +template +struct vector +{ // 0x10 bytes + uint32_t pad; + T *begin, *end, *capacity_end; + + T operator[](int i) { return begin[i]; } + size_t size() { return begin ? end - begin : 0; } +}; +VALIDATE_SIZE(vector, 0x10) + +template +struct list +{ // 0xC bytes + T *begin, *end, *capacity_end; + + T operator[](int i) { return begin[i]; } + size_t size() { return begin ? end - begin : 0; } +}; +VALIDATE_SIZE(list, 0xC) + +template +struct linked_list +{ // 0x8 bytes + T *next; + T *prev; +}; + +struct moho_set +{ // 0x20 bytes + int baseI; + int unk1; + uint32_t *begin, *end, *capacity_end; + void *unk2; + uint32_t value; // Memory for 'Short Set Optimization' + void *unk3; + + void set(uint32_t item, bool set) { + auto *itemPtr = &begin[item >> 5 - baseI]; + if (itemPtr >= end) end = itemPtr + 1; + item = 1 << (item & 0x1F); + if (set) + *itemPtr |= item; else + *itemPtr &= ~item; + } + bool operator[](int item) { + auto *itemPtr = &begin[item >> 5 - baseI]; + if (itemPtr >= end) return false; + return *itemPtr & (1 << (item & 0x1F)); + } +}; +VALIDATE_SIZE(moho_set, 0x20) + +typedef int SOCKET; +// GPGCore + +struct Vector2f +{ // 0x8 bytes + float x,z; +}; + +struct Vector3f +{ // 0xC bytes + float x,y,z; +}; + +struct Vector4f +{ // 0x10 bytes + float x,y,z,w; +}; + +struct RObject +{ // 0x4 bytes + void *vtable; +}; + +template +struct ObjectType { + const static int Type = T; + const static int Info = TInfo; +}; + +struct CScriptObject : RObject +{//0x004C6F8A, 0x34 bytes + linked_list ll; + LuaObject UserData; + LuaObject Table; +}; +VALIDATE_SIZE(CScriptObject, 0x34) + +struct WeakObject +{ // 0x8 bytes? + void *vtable; + void *Unk1; +}; + +struct gpg_mutex +{ + int unk1; + bool unk2; // If value is 0 then NTDLL.RtlEnterCriticalSection is bypassed +}; + +struct Stream +{ // 0x1C bytes + void *vtable; +}; + +struct PipeStream : Stream +{ // 0x48 bytes +}; + +struct FileStream : Stream +{//0x00956DB4, 0x34 bytes +}; + +struct StatItem // : class TDatTreeItem +{ // 0xA0 bytes + void *vtable; + // at 0x24 + int value; // int/float + // at 0x74 + string name; + // at 0x90 + int valueType; + int unk2; + // at 0x98 + void *criticalSection; // Result RtlInitializeCriticalSection + bool unk1; // Set 1 at 00AC1A69, at 00AC1AB0 check(0 -> WaitForSingleObject, 1 -> RtlEnterCriticalSection) +}; + +struct EngineStats // : class Stats +{ // 0x50 bytes + void *vtable; + StatItem *stat; + void *criticalSection; // Result RtlInitializeCriticalSection + BOOL unk1; // Set 1 at 00AC1A69 + string str1; // Written "stats.log" + string str2; + int unk2; + BOOL unk3; +}; + +struct Camera // : RCamCamera +{//0x007A7972, 0x858 bytes +}; + +struct CMauiControl : CScriptObject +{//0x004C6F8A, 0x11C bytes + using Type = ObjectType<0x10C7700, 0xF83314>; +}; + +struct CWldSession; + +struct CUIWorldView : CMauiControl +{//0x004C6F8A, 0x2A8 bytes + using Type = ObjectType<0x10C77E4, 0xF8A71C>; + // at 0x120 + Camera *camera; + // at 0x208 + CWldSession *session; + void *unk1; // If shift pressed + + bool GetCustomRenderingEnabled()const + { + return *(char*)((int)this + 377); + } + + void SetCustomRenderingEnabled(bool state) + { + *(char*)((int)this + 377) = state; + } +}; + +struct RBlueprint; + +struct RRuleGameRules +{//0x00529158, 0xD0 bytes + void *vtable; + // at 0x2C + //list L1; + // at 0x48 + //list L2; + // at 0xB8 + list Blueprints; + //list L3; + // at 0xC4 + //void *Blueprints; + //void *Start, *End; +}; + +struct LaunchInfoNew +{//0x005423CC, 0xA4 bytes + void *vtable; + RRuleGameRules *rules; + void *STIMap; + // at 0xC + string lua_gameMods; + // at 0x28 + string str2; + // at 0x60 + int unk1; + int unk2; + int unk3; // = -1 + // at 0x6C + string interfaceLang; + bool cheatsEnabled; // copied to CWldSession + 0x4D4 + char pad1[3]; + int unk4; +}; + +struct REffectBlueprint : RObject +{ +}; + +struct RBeamBlueprint : REffectBlueprint +{//0x0050EEFD, 0x84 bytes +}; + +struct RBlueprint : RObject +{ // ~0x60 bytes + // at 0x4 + RRuleGameRules *owner; + string name; + string desc; + // at 0x40 + string source; // example: /units/uel0001/uel0001_unit.bp + uint32_t BlueprintOrdinal; +}; + +struct RMeshBlueprint : RBlueprint +{//0x0050DD83, 0x80 bytes + // at 0x70 + float IconFadeInZoom; +}; + +struct REntityBlueprint : RBlueprint +{ // ~0x17C bytes + // at 0x60 + vector Categories; + + // at 0xD8 + struct SFootprint { + char SizeX; + char SizeZ; + char OccupancyCaps; + char Flags; + float MaxSlope; + float MinWaterDepth; + float unk1; + } Footprint, AltFootprint; +}; + +struct RPropBlueprint : REntityBlueprint +{//0x0050DD83, 0x1AC bytes +}; + +struct RProjectileBlueprint : REntityBlueprint +{//0x0050DD83, 0x268 bytes +}; + +struct RUnitBlueprintWeapon +{ // 0x184 bytes +}; + +struct RUnitBlueprint : REntityBlueprint +{//0x0050DD83, 0x568 bytes + // at 0x17C + struct RUnitBlueprintGeneral { + } General; + + // at 0x200 + struct RUnitBlueprintDisplay { + } Display; + + // at 0x278 + struct RUnitBlueprintPhysics { + } Physics; + + // at 0x330 + struct RUnitBlueprintIntel { + } Intel; + + // at 0x368 + struct RUnitBlueprintAir { + } Air; + + // at 0x3F8 + struct RUnitBlueprintTransport { + // at 0x400 + int T2ClassSize; + int T3ClassSize; + int GenericClassSize; + int SClassSize; + } Transport; + + // at 0x420 + struct RUnitBlueprintDefense { + // at 0x43C + string ArmorType; + } Defense; + + // at 0x460 + struct RUnitBlueprintAI { + float GuardScanRadius; + float GuardReturnRadius; + float StagingPlatformScanRadius; + bool ShowAssistRangeOnSelect; + string GuardFormationName; + bool NeedUnpack; + bool InitialAutoMode; + string BeaconName; + vector TargetBones; + float RefuelingMultiplier; + float RefuelingRepairAmount; + float RepairConsumeEnergy; + float RepairConsumeMass; + bool AutoSurfaceToAttack; + float AttackAngle; + } AI; + + // at 0x4D8 + vector Weapon; + + // at 0x4E8 + struct RUnitBlueprintEconomy { + // at 0x564 + float MaxBuildDistance; + } Economy; +}; + +struct CUIManager // : IUIManager +{//0x0084C9CB, 0x78 bytes + // at 0x30 + LuaState *LState; // from [10A6478] +}; + +struct CAiReconDBImpl // : IAiReconDB +{//0x005BFFB8, 0xB0 bytes + void *vtable; + // at 0xA8 + bool FogOfWar; +}; + +struct CIntelGrid +{ // 0x24 bytes +}; + +struct IClientManager +{ + void *vtable; +}; + +struct IClient +{ + void* vtable; +}; + +struct CWldMap +{ + void *zero1; + void *zero2; + void *zero3; +}; + +struct SSTICommandSource +{ // 0x24 bytes + int index; + string name; + int protocol; // -1 SinglePlayer, 3 MultiPlayer +}; + +struct Deposit +{ // 0x14 bytes + int X1,Z1,X2,Z2; // Rect + int Type; // 1 - Mass, 2 - Energy +}; +VALIDATE_SIZE(Deposit, 0x14); + +struct CSimResources // : ISimResources // : IResources +{//0x007444EF, 0x1C bytes + void *vtable; + // at 0x8 in vtable + // ecx:CreateResourceDeposit(type, x, y, z, size) + // at 0x28 in vtable + // ecx:FindResourceDeposit(PtrPosXZ, PtrResultXZ, Radius, Type):Bool + + uint8_t pad[0xC]; + // at 0x10 + list deposits; +}; +VALIDATE_SIZE(CSimResources, 0x1C) + +struct SWldSessionInfo +{ // 0x30 bytes + string map_name; + + // at 0x1C + void *LaunchInfoNew; + + // at 0x20 + int unk1; + bool isBeingRecorded; + bool isReplay; + bool isMultiplayer; + char pad1; + // at 0x2C + int ourCmdSource; + + IClientManager *clientManager; + int unk2; // = 255 possibly cmdSourceIndex +}; + +struct SimArmyEconomyInfo +{ // 0x60 bytes + void *unk1; + int unk2; + float _incomeEnergy; // div 10 + float _incomeMass; // div 10 + + float baseIncomeEnergy; // div 10 + float baseIncomeMass; // div 10 + float storedEnergy; + float storedMass; + + float incomeEnergy; // div 10 + float incomeMass; // div 10 + float reclaimedEnergy; + float reclaimedMass; + + float requestedEnergy; // div 10 + float requestedMass; // div 10 + float expenseEnergy; // div 10 + float expenseMass; // div 10 + + uint32_t maxEnergy; + int unk3; + uint32_t maxMass; + int unk4; + + float unk5; + uint32_t isResourceSharing; + float unk6; + float unk7; +}; + +struct BaseArmy +{ // 0x1DC bytes + // struct 0x80 bytes + int armyIndex; + string name; + string nickname; + bool isCivilian; + uint8_t pad1[3]; + uint8_t unk1[0x40]; + // at 0x80 + // struct 0x15C bytes + float storedEnergy; + float storedMass; + float incomeEnergy; // div 10 + float incomeMass; // div 10 + float reclaimedEnergy; + float reclaimedMass; + float requestedEnergy; // div 10 + float requestedMass; // div 10 + float expenseEnergy; // div 10 + float expenseMass; // div 10 + // at 0xA8 + uint32_t maxEnergy; + int unk2; // =0 + uint32_t maxMass; + int unk3; // =0 + bool isResourceSharing; + uint8_t pad2[7]; + // at 0xC0 + moho_set neutrals; + moho_set allies; + moho_set enemies; + // at 0x120 + bool IsAlly; + uint8_t pad3[7]; + moho_set mValidCommandSources; + uint32_t color; + uint32_t iconColor; + string mArmyType; // 'human' for players + // at 0x16C + int faction; + bool unk4; + uint8_t pad4[7]; + uint32_t unk5[4]; + bool showScore; + uint8_t pad5[7]; + uint32_t unk6; + uint32_t pad6; + uint32_t unk7; + uint32_t pad7; + uint32_t unk8[6]; + // at 0x1B8 + bool outOfGame; + uint8_t pad8[3]; + Vector2f StartPosition; + uint32_t unk9; + float noRushRadius; + float noRushOffsetX; + float noRushOffsetY; + float unk10; + float unk11; +}; +VALIDATE_SIZE(BaseArmy, 0x1DC); + +struct UserArmy : BaseArmy +{ // 0x210 bytes + // at 0x1DC + uint8_t unk12[8]; + // at 0x1E4 + CWldSession *session; + uint8_t unk13[0x28]; +}; +VALIDATE_SIZE(UserArmy, 0x210); + +struct Sim; + +struct SimArmy // : IArmy, BaseArmy +{//0x006FD332, 0x288 bytes + void *vtable; + void *unk1; + // at 0x8, BaseArmy + int armyIndex; + string name; + string nickname; + // at 0x44 + bool isCivilian; + uint8_t pad1[0x40]; + + // at 0x88 Copy from [[self+1F4]+18] + float storedEnergy; + float storedMass; + float incomeEnergy; // div 10 + float incomeMass; // div 10 + float reclaimedEnergy; + float reclaimedMass; + float requestedEnergy; // div 10 + float requestedMass; // div 10 + float expenseEnergy; // div 10 + float expenseMass; // div 10 + + uint32_t maxEnergy; + int unk2; // =0 + uint32_t maxMass; + int unk3; // =0 + bool isResourceSharing; + uint8_t pad2[4]; + // at 0xC8 + moho_set neutrals; + moho_set allies; + moho_set enemies; + // at 0x128 + bool IsAlly; + uint8_t pad3[4]; + // at 0x130 + moho_set mValidCommandSources; + // at 0x150 + uint32_t color; + uint32_t iconColor; + string mArmyType; // 'human' for players + // at 0x174 + int faction; + uint8_t pad4[0x48]; + // at 0x1C0 + bool outOfGame; + // at 0x1C4 + Vector2f StartPosition; + uint8_t pad5[0x4]; + // at 0x1D0 + float noRushRadius; + float noRushOffsetX; + float noRushOffsetY; + uint8_t pad6[0xC]; + // at 0x1E8 + Sim *sim; + void *CAiBrain; + // at 0x1F0 + void *CAiReconDBImpl; + SimArmyEconomyInfo *EconomyInfo; + // at 0x1F8 + string unk4; + uint8_t pad7[0x5C]; + // at 0x270 + float unitCap; + uint8_t pad8[4]; + // at 0x278 + int pathCap_Land; + int pathCap_Sea; + int pathCap_Both; + uint8_t pad9[4]; +}; +VALIDATE_SIZE(SimArmy, 0x288); + +struct CArmyImpl : SimArmy +{//0x006FD332, 0x288 bytes +}; + +struct Entities +{ // 0x50 bytes +}; + +struct EntityChain // [[Entities+4]+4] +{ + void *next; + //void *?; + //void *?; + int ID; + void *entity; +}; + +struct Sim; +struct Unit; +struct Entity : CScriptObject +{ // 0x270 bytes + // at 0x68 + uint32_t EntityID; // For units x|xx|xxxxxx Type,Army,Num. Uses for UserSync + REntityBlueprint *Blueprint; + uint32_t CreationIndex; // ? + // at 0x110 + bool VisibleAndControl; +}; + +struct Projectile : Entity +{//0x004C702B, 0x380 bytes + // at 0x6C + using Type = ObjectType<0x10C7578, 0xF77914>; + RProjectileBlueprint *Blueprint; +}; + +struct Prop : Entity +{//0x004C702B, 0x288 bytes + // at 0x6C + RPropBlueprint *Blueprint; +}; + +struct CUnitCommand; +struct CCommandTask +{ //0x34 bytes + void* vtable; + void* unk0; // self+4; + // at 0x10 + CCommandTask *prevTask; // ? + // at 0x1C + Unit *owner; + Sim *sim; + // at 0x28 + //CCommandTask *prevTask; -0x2C +}; + +struct CUnitMobileBuildTask : CCommandTask +{ //0xE8 bytes + // at 0xC + Unit *owner; + Sim *sim; + Unit *target0; // -4 + CCommandTask *next; // ? + // at 0x2C + string name; + float FractionComplete; + // at 0x50 + CUnitCommand *unitCommand; + RUnitBlueprint *build; + float unk0, unk1, unk2, unk3; + // at 0x84 + Unit *target1; // -4 +}; + +struct CUnitRepairTask : CCommandTask +{ //0x9C bytes + // at 0xC + Unit *owner; + Sim *sim; + // at 0x2C + string name; + // at 0x50 + CUnitCommand *unitCommand; + Unit *target; // -4 +}; + +struct CUnitCommand : CScriptObject +{ // 0x178 bytes + // at 0x34 + CCommandTask *task; // -4 + // at 0x40 + Sim *sim; + // at 0x4C + float unk3; + // at 0x5C + float unk4; + // at 0x60 + RUnitBlueprint* BpBuild; + string unk5; + // at 0x98 + uint32_t CommandType; + // at 0xA0 + uint32_t TargetId; + Vector4f Pos; + // at 0x120 + Entity Target; //-0x4 + // at 0x128 + Vector3f Pos2; + // at 0x160 + LuaObject Nil; + void *unk6; +}; + +struct SCommand +{ // 0x8 bytes + void *CUnitCommand; // +0x4 + void *nil; +}; + +struct CommandQueue +{ // 0x28 bytes + void *unk1; + void *unk2; + Unit *Owner; + vector Commands; + void *unk3; + void *unk4; + bool unk5; +}; + +struct UnitWeapon //: CScriptEvent +{//0x006D3114, 0x188 bytes + void* vtable; + // at 0x10 + void* vtable2; + // at 0x1C + LuaObject UserData; + LuaObject Table; + // at 0x5C + float RateOfFire; + float MinRadius; + float MaxRadius; + float SquaredMinRadius; + float SquaredMaxRadius; + // at 0xA0 + Unit* Owner; +}; + +struct CAiAttackerImpl // : IAiAttacker +{//0x005D6ABF, 0xA4 bytes + void* vtable; + // at 0x58 + vector Weapons; +}; + +struct UserUnitWeapon +{ // 0x98 bytes + // at 0x54 + float MinRadius; + float MaxRadius; +}; + +struct UnitIntel +{ // 0x20 bytes, AND 7FFFFFFF + int VisionRadius; + int WaterVisionRadius; + int RadarRadius; + int SonarRadius; + int OmniRadius; + int RadarStealthFieldRadius; + int SonarStealthFieldRadius; + int CloakFieldRadius; +}; + +struct Unit : WeakObject +{//0x006A5422, 0x6A8 bytes + using Type = ObjectType<0x010C6FC8, 0x00F6A1E4>; + //WeakObject WeakObject; + // at 0x8 + //Entity Entity; to 0x278 + // at 0x50 + void* self1; + // at 0x70 + uint32_t UnitID; + RUnitBlueprint *Blueprint; + uint32_t CreationIndex; // ? + void *unk1; + void *unk2; + void *RScmResource; + void *RMeshBlueprint; + Vector3f Scale; // at 0x8C + float CurHealth; + float MaxHealth; + bool unk3; + bool unk4; + bool unk5; + char pad1; + Vector4f Rot1; // at 0xA4 + Vector3f Pos1; + Vector4f Rot2; + Vector4f Pos2; + float FractionComplete; // at 0xE0 + void *unk6; + char unk7[0x18]; + void *unk10; + void *unk12; + void *unk13; + void *unk14; + void *unk15; + void *unk16; + bool VisibleAndControl; // at 0x118 + char pad2[3]; + void *unk18; + void *unk19; + bool unk20; + char pad3[3]; + void *unk21; + UnitIntel UnitIntel; // at 0x130 + Sim *sim; // at 0x150 + SimArmy *owner; + Vector4f Rot3; + Vector3f Pos3; + // at 0x17C + int TickCount1; // Readonly + void* CColPrimitiveBase; + // at 0x248 + Vector3f Pos4; + Vector3f Pos5; + // at 0x294 + float FuelRatio; + float ShieldRatio; // Readonly + // at 0x2A0 + bool Paused; + // at 0x2AC + float WorkProgress; + // at 0x2CC + string customUnitName; + // at 0x380 + UserUnitWeapon* Weapons; + list unk22; // Weapons? + void *unk23; // Weapons? + // at 0x4B0 + void *MotionEngine; // +0xC FuelUseTime + void *CommandQueue; + int Enum; //0..4 + // at 0x534 + void *workValues; // +0x8 + bool Flag; + // at 0x53C + float WorkRate; + // at 0x544 + void* IAiAttacker; + void* IAiCommandDispatch; + // at 0x558 + void* IAiSiloBuild; + void* IAiTransport; + // at 0x59C + Vector3f Pos6; + // at 0x668 + int tickCount2; // Readonly + // at 0x68E + bool updWeaponRadius; +}; + +struct UserEntity : WeakObject +{ // 0x148 bytes + // at 0x44 + int entityID; + RPropBlueprint *blueprint; + // at 0x58 + RMeshBlueprint *mesh; + // at 0x68 + float curHealth; + float maxHealth; + // at 0x70 + bool isBeingBuilt; + Vector4f rot1; + Vector3f pos1; + // at 0x90 + Vector4f rot2; + Vector4f pos2; + // at 0xB0 + float fractionComplete; + // at 0xD0 + //float x1,y1,x2,y2; + // at 0x100 + UnitIntel unitIntel; + UserArmy *owner; // at 0x120 + Vector4f rot3; + Vector4f pos3; +}; + +struct UserUnit : UserEntity +{//0x008B8601, 0x3E8 bytes + using Type = ObjectType<0x10C77AC, 0xF881E0>; + // at 0x44 + uint32_t UnitID; + RUnitBlueprint *blueprint; + // at 0x1B0 + bool Paused; + // at 0x1BC + float WorkProgress; + // at 0x1DC + string customUnitName; + // at 0x290 + UserUnitWeapon *weapons; +}; + +struct CPlatoon : public CScriptObject +{ + using Type = ObjectType<0x10C6FCC, 0xF6A1FC>; +}; + +struct CMauiBitmap : public CMauiControl +{ + using Type = ObjectType<0x10C7704, 0xF832F4>; +}; + +struct ReconBlip : Entity +{ // 0x4D0 bytes + Entity entity; + // at 0x270 + void *originUnit; // -0x4 + // at 0x28C + void *StatItem; + void *StatItem2; + // at 0x320 + void *CAniPose; + // at 0x328 + void *CAniPose2; + // at 0x330, size 0x30? + list unk1; + void *unk2; + // at 0x360, size 0x30? + list unk3; + void *unk4; + // at 0x390, size 0x30? + list unk5; // Weapons? + void *unk6; // Weapons? + // at 0x450, size 0x30? + list unk7; + void *unk8; + // at 0x4C4 + void *armyesData[]; //size 0x34 +}; + +struct STIMap; +struct Sim // : ICommandSink +{ // 0xAF8 bytes + void *vtable; + uint8_t pad1[0x4C]; + // at 0x50 + char dynamicHash[16]; + char hashTrash[0x50]; + char simHashes[16*128]; // at 0xB0-8B0 + uint8_t pad2[0x10]; + // at 0x8C0 + void *CEffectManager; // 0x18 bytes + void *CSimSoundManager; // 0x720 bytes + RRuleGameRules *rules; // From CSimDriver.LaunchInfoNew + STIMap *STIMap; // From CSimDriver.LaunchInfoNew + CSimResources *res; + uint8_t pad3[4]; + // at 0x8D8 + LuaState *LState; + uint8_t pad4[0xA]; + // at 0x8E6 + bool cheatsEnabled; + uint8_t pad5[0x10]; + // at 0x8F8 + uint32_t beatCounter1; + void *unk1; // self+0x900 or null + uint32_t beatCounter2; + // at 0x904 + void *unk2; // 0x9CC bytes + void *unk3; // 0x68 bytes + vector armies; + uint8_t pad6[4]; + // at 0x920 + list cmdSources; + // at 0x92C + int ourCmdSource; // Possibly just current in simulation. + uint8_t pad7[0x4C]; + // at 0x97C + void **unk4; // 0x30 bytes + void *CAiFormationDB; // 0x40 bytes + // at 0x984 + void *Entities; + void *unk5; // 0xCD0 bytes + uint8_t pad8[0x10]; + // at 0x99C + void *unk6; // 0xCF0 bytes + uint8_t pad9[0x98]; + // at 0xA38 + void *unk7; // 0xC bytes + uint8_t pad10[0x4C]; + // at 0xA88 + int focusArmyIndex; // Focused army, -1 = observer + uint8_t pad11[0x6C]; +}; +VALIDATE_SIZE(Sim, 0xAF8) + +struct CWldSession +{//0x0089318A, 0x508 bytes + CWldSession *self1; + CWldSession *self2; + void *self_weird1; // this + 0x8 + void *self_weird2; // this + 0x8 + // at 0x10 + LuaState *LState; // Set from constructor argument + void *unk1; // 0x14 bytes + RRuleGameRules *rules; + CWldMap *map; + LaunchInfoNew *launchInfo; + void *unk2; //class detail::boost::sp_counted_impl_p + string mapName; + Entities entities; + uint8_t pad1[0x3A8]; + // at 0x3F0 + list armies; + // at 0x3FC + void *unk3; // 0xCC0 bytes + void *unk4; // 0x64 bytes + uint8_t pad2[0x20]; + // at 0x424 + CSimResources *deposits; + uint8_t pad3[0x48]; + // at 0x470 + vector cmdSources; + // at 0x480 + int ourCmdSource; + bool isReplay; + bool isBeingRecorded; + bool isMultiplayer; + bool allowObservers; + + int focusArmyIndex; // focused army, -1 = observer + + BOOL isGameOver; + uint8_t pad4[0x10]; + // at 0x4A0 + struct { + int unk1; + void **SelList; //+0x10 + int SelCount; + int SelCount2; + } selectedUnits; + // at 0x4B0 + struct + { // size 0x24 + void *unk1; + float mouseWorldPosX; + float mouseWorldPosY; + float mouseWorldPosZ; + void *unk2; + void *unk3; + int highlightCommandId; + float mouseScreenPosX; + float mouseScreenPosY; + } mouse; + // at 0x4D4 + bool cheatsEnabled; // Copied from LaunchInfoNew + 0x88 + uint8_t pad5[0x13]; + // at 0x4E8 + bool displayEconomyOverlay; + bool relationsArmyColors; + uint8_t pad6[0x1C]; +}; +VALIDATE_SIZE(CWldSession, 0x508) + +struct CSimDriver // : ISTIDriver +{//0x0073B59E, 0x230 bytes + void *vtable; + Sim *sim; + IClientManager *ClientManager; + uint8_t pad1[4]; + // at 0x10 + void *LaunchInfoNew; // From g_SWldSessionInfo, only when loading game init + uint8_t pad2[8]; + // at 0x1C + uint32_t beatCounter1; + uint32_t beatCounter2; // Copied to address 0x1290710 + uint32_t beatCounter3; + uint8_t pad3[0x86]; + // at 0xB0 + int focusArmyIndex; + uint8_t pad4[0x6C]; + // at 0x120 + int focusArmyIndex2; // Copy from 0xB0 + uint8_t _pad5[0x104]; + // at 0x228 + int maxSimRate; // from CalcMaxSimRate + uint8_t pad6[4]; +}; +VALIDATE_SIZE(CSimDriver, 0x230); + +struct CHeightField // : class detail::boost::sp_counted_base +{//0x00579121, 0x10 bytes + void* vtable; +}; + +struct MapData +{ // 0x1C bytes + uint32_t *TerrainHeights; // Word(TerrainHeights+(Y*SizeX+X)*2) + int SizeX; // +1 + int SizeY; // +1 +}; + +struct STIMap +{ // 0x1548 bytes + MapData *MapData; + CHeightField *HeightField; + uint32_t unk1[4]; + // at 0x18 + void *beginData; + void *endData; + void *endData2; + void *beginData2; + // at 0x28 + LuaObject Data[0x100]; // Type desc tables + uint8_t *TerrainTypes; // TerrainTypes+(Y*SizeX+X) + int SizeX; + int SizeY; + uint8_t unk2[0x100]; + // at 0x1534 + BOOL Water; + float WaterLevel; + float DepthLevel; + float AbyssLevel; + uint32_t unk3; +}; +VALIDATE_SIZE(STIMap, 0x1548); + +struct CPushTask +{ + char data[0x24]; +}; + +typedef CPushTask CPullTask; + +struct INetConnector +{ + void* vtable; +}; +struct CLobby +{//0x004C702B, 0xC8 bytes + // at 0x20 + LuaObject unk1; + + int unk2; + int unk3; + int unk4; + int unk5; + // at 0x44 + CPushTask pushTask; + + // at 0x60 + CPullTask pullTask; + + // at 0x84 + bool hosted_or_joined; // Has CLobby been used to host/join yet? + + // at 0x88 + void* not_host; // 0 if we're host + + // at 0x90 + string our_name; + // at 0xAC + int our_UID; + + // at 0xB0 + struct + { + INetConnector* first_element; + INetConnector* last_element; // It will probably always be our CNetXXXConnector + } peer_list; // Probably singly-linked list +}; + +struct sub_10392B10_ret +{ // 0x20 bytes + + void* zero1; + void* zero2; + void* zero3; + int unk1; + + // at 0x10 + bool one1; + bool zero4; +}; + +struct CLobbyPeer +{ // 0x50 bytes + + CLobbyPeer* next; // Doubly linked list pointers + CLobbyPeer* prev; + + string playerName; + + // at 0x24 + int ownerID; // User UID + int const1; + short const2; + char pad1[2]; + + // at 0x30 + int const3; // enum? + float const4; // = 0 + int const5; + int unk1; + + // at 0x40 + sub_10392B10_ret* unk2; // made in sub_10394180 + int zero1; + int cmdSourceIndex; // == 255 => Unassigned + int playerNo; + + /* + const1, const2, const3, const5 + specially define the CLobbyUser + + const3: + 1 - Host for a lobby we joined? + 3 - Peer who connected to us? + 6 - Game Peer of a Launched Game? + */ +}; + +struct CClientManagerImpl : IClientManager +{ // 0x184D0 bytes + // at 0x40C + gpg_mutex mLock; + + // at 0x420 + list mClients; + INetConnector* mConnector; + + // at 0x434 + bool mWeAreReady; + bool mEveryoneIsReady; + char pad1[2]; + int mDispatchedBeat; + int mAvailableBeat; + int mFullyQueuedBeat; + int mPartiallyQueuedBeat; + int gameSpeedChangeCounter; // mGameSpeedClock + int mGameSpeedRequester; // Always 0 + int gameSpeedRequested; // mGameSpeed + bool speedControlEnabled; + // at 0x458 + uint32_t hEvent; // for KERNEL32.SetEvent + // at 0x18470 + PipeStream mPipe; + // at 0x184BC + bool unk1; // if value is 1 then KERNEL32.SetEvent is bypassed +}; + +typedef struct mRequest {IClient* mRequester; int mAfterBeat;}; + +struct CClientBase : IClient +{//0x0053B5E9, 0xD8 bytes + string mNickname; + // at 0x20 + int mIndex; // client index + int mUID; + IClientManager* clientManager; + + // at 0x30 + moho_set unk1; + // at 0x50 + int mCommandSource; + bool mReady; + char pad1[3]; + PipeStream mPipe; + + // at 0xA0 + int mQueuedBeat; + int mDispatchedBeat; + int mAvailableBeatRemote; + vector mLatestAckReceived; + int mLatestBeatDispatchedRemote; + // at 0xC0 + bool mEjectPending; + bool mEjected; + char pad2[2]; + vector mEjectRequests; + int maxSimRate; // from CalcMaxSimRate +}; + +struct CLocalClient : CClientBase +{//0x0053B5E9, 0xD8 bytes +}; // equal CClientBase + +struct CReplayClient : CClientBase +{ // 0x160 bytes + // before 0xD8 it CClientBase + // at 0xD8 + FileStream* stream; + // at 0xE0 + void* ptr1; // self+0xF0 + void* ptr2; // self+0xF0 + void* ptr3; // self+0x130 + void* ptr4; // self+0xF0 + void* unk1; + // at 0x130 + void* unk2; + // at 0x138 + uint32_t replayBeat; + bool unk3; + void* unk4; + uint32_t hSemaphore1; + uint32_t hSemaphore2; + uint32_t hMutex; + // at 0x15C + bool unk5; + bool unk6; +}; + +struct CNetUDPConnection {}; + +struct CNetUDPConnetor // : INetConnector +{ // 0x18090 bytes + void* vtable; + void* smth; // Listen socket fd? + gpg_mutex mMutex; + // at 0x14 + SOCKET mSocket; + // at 0x24 + linked_list mConnections; +}; +/*Game Types + Multiplayer - CLobby::LaunchGame + Replay - VCR_SetupReplaySession + SinglePlayer - WLD_SetupSessionInfo + Saved Game - CSavedGame::CreateSinglePlayerSession + + Session State + 0 - None? + 1 - Loading? + 2 - Started? + 3 - SIM Initialized + 4 - SIM Started + 5 - Game Started + 7 - Restart Requested + 8 - Session Halted +*/ + +struct MapImager +{ // 0x14 bytes + void* vtable; +}; + +struct MeshThumbnailRenderer +{ // 0x3C bytes + void* vtable; +}; + +struct RangeRenderer +{ // 0x94 bytes + void* vtable; +}; + +struct VisionRenderer +{ // 0x78 bytes + void* vtable; +}; + +struct BoundaryRenderer +{ // 0x68 bytes + void* vtable; +}; + +struct Shadow +{ // 0x318 bytes + void* vtable; +}; + +struct Clutter +{ // 0x192C bytes + void* vtable; +}; + +struct Silhouette +{ // 0x74? bytes + void* vtable; + // at 0xC + CUIWorldView *worldView; +}; + +struct WRenViewport // : WD3DViewport +{//0x0097977D, 0x21A8 bytes + void* vtable; + // at 0x32C + MapImager mapImager; + // at 0x340 + MeshThumbnailRenderer meshThumbnailRenderer; + // at 0x37C + RangeRenderer rangeRenderer; + // at 0x410 + VisionRenderer visionRenderer; + // at 0x488 + BoundaryRenderer boundaryRenderer; + // at 0x4F0 + Shadow shadow; + // at 0x808 + Clutter clutter; + // at 0x2134 + Silhouette silhouette; +}; + +namespace incomplete { + struct Command + { + Command *self; + uint8_t pad1[0x1C]; + RBlueprint *bpBuild; // at 0x20 + uint8_t pad2[0x34]; + int commandType; // at 0x58 // see EUnitCommandType; sub_552170 + uint8_t pad3[0x4]; + int targetId; // at 0x60 // valid if != 0xF0000000 + Vector3f pos; // at 0x64 + }; +} diff --git a/section/include/utility.h b/include/utility.h similarity index 92% rename from section/include/utility.h rename to include/utility.h index 5c72902f..f76e7b0a 100644 --- a/section/include/utility.h +++ b/include/utility.h @@ -37,7 +37,7 @@ Vector2f ToVector2f(lua_State *l, int index) return res; } -void PushVector(lua_State *l, Vector3f v) +void PushVector3(lua_State *l, Vector3f v) { lua_createtable(l, 3, 0); lua_pushnumber(l, v.x); @@ -48,7 +48,7 @@ void PushVector(lua_State *l, Vector3f v) lua_rawseti(l, -2, 3); } -void PushVector(lua_State *l, Vector2f v) +void PushVector2(lua_State *l, Vector2f v) { lua_createtable(l, 2, 0); lua_pushnumber(l, v.x); diff --git a/section.ld b/section.ld deleted file mode 100644 index fecc798b..00000000 --- a/section.ld +++ /dev/null @@ -1,25 +0,0 @@ -OUTPUT_FORMAT(pei-i386) -OUTPUT(section.pe) - -_atexit = 0xA8211E; -__Znwj = 0xA825B9; -__ZdlPvj = 0x958C40; -"__imp__GetModuleHandleA@4" = 0xC0F378; -"__imp__GetProcAddress@8" = 0xC0F48C; - -SECTIONS { - . = __image_base__ + 0x1000; - .text : { - *(.text*) - *(.data*) - *(.bss*) - *(.rdata) - } - /DISCARD/ : { - *(.rdata$zzz) - *(.eh_frame*) - *(.ctors) - *(.reloc) - *(.idata*) - } -} \ No newline at end of file diff --git a/section/CopyToClipBoard.cpp b/section/CopyToClipBoard.cpp index c3f92b67..601900bb 100644 --- a/section/CopyToClipBoard.cpp +++ b/section/CopyToClipBoard.cpp @@ -1,4 +1,4 @@ -#include "include/magic_classes.h" +#include "magic_classes.h" int LuaCopyToClipboard(lua_State *l) { if (lua_gettop(l) != 1) diff --git a/section/DrawFunc.cpp b/section/DrawFunc.cpp index 16b17c32..b0c58c43 100644 --- a/section/DrawFunc.cpp +++ b/section/DrawFunc.cpp @@ -1,7 +1,7 @@ -#include "include/CObject.h" -#include "include/magic_classes.h" -#include "include/moho.h" -#include "include/utility.h" +#include "CObject.h" +#include "magic_classes.h" +#include "moho.h" +#include "utility.h" #include #define NON_GENERAL_REG(var_) [var_] "g"(var_) @@ -321,7 +321,7 @@ int SetCustomRender(lua_State *l) return 0; } -using WorldViewMethodReg = UIRegFunc<0x00E491E8, 0x00F8D88C>; +using WorldViewMethodReg = UIRegFuncT<0x00E491E8, 0x00F8D88C>; WorldViewMethodReg WorldViewSetCustomRender{ "SetCustomRender", diff --git a/section/EntityGetFootprint.cpp b/section/EntityGetFootprint.cpp index 30005411..c0ae73c6 100644 --- a/section/EntityGetFootprint.cpp +++ b/section/EntityGetFootprint.cpp @@ -1,6 +1,6 @@ -#include "include/CObject.h" -#include "include/magic_classes.h" -#include "include/moho.h" +#include "CObject.h" +#include "magic_classes.h" +#include "moho.h" int ForceAltFootprint(lua_State *L) { @@ -18,7 +18,7 @@ int ForceAltFootprint(lua_State *L) return 0; } -using UnitMethodReg = SimRegFunc<0x00E2D550, 0x00F8D704>; +using UnitMethodReg = SimRegFuncT<0x00E2D550, 0x00F8D704>; UnitMethodReg UseAltFootprintReg{ "ForceAltFootprint", diff --git a/section/FAExtLoad.cpp b/section/FAExtLoad.cpp index 3ba0f833..186e71c7 100644 --- a/section/FAExtLoad.cpp +++ b/section/FAExtLoad.cpp @@ -1,5 +1,5 @@ struct FuncDesc { - char* Name; char* Ptr; + const char* Name;int Ptr; }; FuncDesc Funcs[] = { @@ -211,7 +211,7 @@ FuncDesc Funcs[] = { {"", 0x90c340}, }; -#include "include/global.h" +#include "global.h" typedef __stdcall void* LoadLibrary_t(char *lpLibFileName); typedef __stdcall int VirtualProtect_t(void *lpAddress, int dwSize, int flNewProtect, int *lpflOldProtect); @@ -219,18 +219,18 @@ typedef __stdcall int VirtualProtect_t(void *lpAddress, int dwSize, int flNewPro void FAExtLoad() { void *Kernel = GetModuleHandleA("KERNEL32"); - LoadLibrary_t *LoadLibrary = GetProcAddress(Kernel, "LoadLibraryA"); - VirtualProtect_t *VirtualProtect = GetProcAddress(Kernel, "VirtualProtect"); + LoadLibrary_t *LoadLibrary = ( LoadLibrary_t *)GetProcAddress(Kernel, "LoadLibraryA"); + VirtualProtect_t *VirtualProtect =(VirtualProtect_t *) GetProcAddress(Kernel, "VirtualProtect"); void *ldll = LoadLibrary("FAExt.dll"); if (ldll) for (int i = 0; i < sizeof(Funcs) / sizeof(Funcs[0]); i++) { - char *FPtr = GetProcAddress(ldll, Funcs[i].Name); + char *FPtr = (char*)GetProcAddress(ldll, Funcs[i].Name); //if (FPtr) { int OldProtect; - char* Ptr = Funcs[i].Ptr; + char* Ptr = (char*)Funcs[i].Ptr; VirtualProtect(Ptr, 5, 0x04, &OldProtect); *Ptr = (char)(0xE9); - *(int*)(Ptr+1) = FPtr - (unsigned int)(Ptr) - 5; + *(int*)(Ptr+1) = FPtr - Ptr - 5; VirtualProtect(Ptr, 5, OldProtect, &OldProtect); //} } diff --git a/section/ForkThreadFix.cpp b/section/ForkThreadFix.cpp index 3e62273a..dd99e896 100644 --- a/section/ForkThreadFix.cpp +++ b/section/ForkThreadFix.cpp @@ -1,4 +1,4 @@ -#include "include/moho.h" +#include "moho.h" bool __thiscall IsLuaFunction(LuaObject *obj) { diff --git a/section/GetHighlightCommand.cpp b/section/GetHighlightCommand.cpp index fb7661ea..dd38dec4 100644 --- a/section/GetHighlightCommand.cpp +++ b/section/GetHighlightCommand.cpp @@ -1,5 +1,5 @@ -#include "include/moho.h" -#include "include/magic_classes.h" +#include "moho.h" +#include "magic_classes.h" #define lua_push(L, name, val) \ lua_pushstring(L, name); \ diff --git a/section/GetTableSize.cpp b/section/GetTableSize.cpp index 5ba4332c..baecc4ff 100644 --- a/section/GetTableSize.cpp +++ b/section/GetTableSize.cpp @@ -94,7 +94,7 @@ void IsTableEmpty() ); } -#include "include/LuaAPI.h" +#include "LuaAPI.h" int TableClone(lua_State* L) { LuaObject obj{L->LuaState, 1}; diff --git a/section/GetTimeForProfile.cpp b/section/GetTimeForProfile.cpp index 4dab9b0d..8ac979c5 100644 --- a/section/GetTimeForProfile.cpp +++ b/section/GetTimeForProfile.cpp @@ -1,4 +1,5 @@ -#include "include/moho.h" +#include "moho.h" +#include "magic_classes.h" int GetTimeForProfile(lua_State *L) { int64_t Time, Freq; @@ -12,22 +13,7 @@ int GetTimeForProfile(lua_State *L) { #define s_GTFPName "GetTimeForProfile" #define s_GTFPDesc "(OriginTime)" -//PatcherList_SimFuncRegs_SGTFPRegDesc -luaFuncDescReg SGTFPRegDesc = { - 0x00E45E90, - s_GTFPName, - 0x00E00D90, - s_GTFPDesc, - 0x00000000, - GetTimeForProfile, - 0x00000000}; -//PatcherList_UIFuncRegs_UGTFPRegDesc -luaFuncDescReg UGTFPRegDesc = { - 0x00E45E90, - s_GTFPName, - 0x00E00D90, - s_GTFPDesc, - 0x00000000, - GetTimeForProfile, - 0x00000000}; \ No newline at end of file + +UIRegFunc SGTFPRegDesc{s_GTFPName, "(OriginTime)", GetTimeForProfile}; +SimRegFunc UGTFPRegDesc{s_GTFPName, "(OriginTime)", GetTimeForProfile}; \ No newline at end of file diff --git a/section/HashChecker.cpp b/section/HashChecker.cpp index 43bb5795..29a09474 100644 --- a/section/HashChecker.cpp +++ b/section/HashChecker.cpp @@ -1,4 +1,4 @@ -#include "include/magic_classes.h" +#include "magic_classes.h" typedef __stdcall int VirtualProtect_t(void *lpAddress, int dwSize, int flNewProtect, int *lpflOldProtect); @@ -33,7 +33,7 @@ void HashWarn(uint64_t *data1, uint64_t *data2) { } void HashCheckerStop() { - uint32_t oldProt; + int oldProt; VirtualProtect((void*)(0x7433F4), 4, 0x40, &oldProt); *(uint32_t*)(0x7433F4) = 0xD8; VirtualProtect((void*)(0x7433F4), 4, oldProt, &oldProt); @@ -86,22 +86,22 @@ void SimCreateHook() { FILE_SHARE_READ, 0, CREATE_ALWAYS, FILE_FLAG_SEQUENTIAL_SCAN, 0); else hcFile = CreateFileA("HashChecker.hash", GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN, 0); - if (hcFile == -1) { + if (hcFile == (void*)-1) { WarningF("%s", "CreateFileA error"); asm("add esp,0x34; pop ebx; pop ebp; jmp 0x7434D0;"); return; } hashIndex = 0; - uint32_t oldProt; + int oldProt; VirtualProtect((void*)(0x746271), 5, 0x40, &oldProt); *(uint8_t*)(0x746271) = 0xE9; - *(uint32_t*)(0x746272) = &SimDestroyHook - 0x746271 - 5; + *(uint32_t*)(0x746272) = (uint32_t)&SimDestroyHook - 0x746271 - 5; VirtualProtect((void*)(0x746271), 5, oldProt, &oldProt); VirtualProtect((void*)(0x8E5782), 5, 0x40, &oldProt); *(uint8_t*)(0x8E5782) = 0xE9; - *(uint32_t*)(0x8E5783) = &HashHook - 0x8E5782 - 5; + *(uint32_t*)(0x8E5783) = (uint32_t)&HashHook - 0x8E5782 - 5; VirtualProtect((void*)(0x8E5782), 5, oldProt, &oldProt); WarningF("%s", "HashChecker init"); @@ -115,12 +115,12 @@ int HashChecker(lua_State *L) { } hcMode = luaL_checknumber(L, 1); void *Kernel = GetModuleHandleA("KERNEL32"); - VirtualProtect = GetProcAddress(Kernel, "VirtualProtect"); + VirtualProtect = (VirtualProtect_t*)GetProcAddress(Kernel, "VirtualProtect"); HashCheckerStop(); if (hcMode) { - uint32_t oldProt; + int oldProt; VirtualProtect((void*)(0x7433F4), 4, 0x40, &oldProt); - *(uint32_t*)(0x7433F4) = &SimCreateHook - 0x7433F3 - 5; + *(uint32_t*)(0x7433F4) = (uint32_t)&SimCreateHook - 0x7433F3 - 5; VirtualProtect((void*)(0x7433F4), 4, oldProt, &oldProt); if (hcMode == 2) WarningF("Use breakpoint at 0x%X", HashWarn); diff --git a/section/IconScale.cpp b/section/IconScale.cpp index 5250215e..7aaa7321 100644 --- a/section/IconScale.cpp +++ b/section/IconScale.cpp @@ -1,4 +1,4 @@ -#include "include/magic_classes.h" +#include "magic_classes.h" float iconscale = 1.0; ConDescReg icons_scale_var{"ui_StrategicIconScale", "", &iconscale}; diff --git a/section/Init.cpp b/section/Init.cpp new file mode 100644 index 00000000..6dc94953 --- /dev/null +++ b/section/Init.cpp @@ -0,0 +1,12 @@ +#include "moho.h" + +typedef void (*global_ctor)(); +extern const global_ctor FIRST_CTOR; +extern const global_ctor END_CTOR; + +void InitCtors() +{ + for (auto iter = &FIRST_CTOR; iter != &END_CTOR; ++iter) + if (iter != nullptr) + (*iter)(); +} \ No newline at end of file diff --git a/section/InvertMidMouseButton.cpp b/section/InvertMidMouseButton.cpp index 3be6a57d..0b8c2eda 100644 --- a/section/InvertMidMouseButton.cpp +++ b/section/InvertMidMouseButton.cpp @@ -1,4 +1,5 @@ -#include "include/LuaAPI.h" +#include "LuaAPI.h" +#include "magic_classes.h" int SetInvertMidMouseButton(lua_State *L) { @@ -21,12 +22,4 @@ int SetInvertMidMouseButton(lua_State *L) return 0; } -//PatcherList_UIFuncRegs_USIMMBRegDesc -luaFuncDescReg USIMMBRegDesc = { - 0x00E45E90, - "SetInvertMidMouseButton", - 0x00E00D90, - "(bool)", - 0x00000000, - SetInvertMidMouseButton, - 0x00000000}; \ No newline at end of file +UIRegFunc USIMMBRegDesc{"SetInvertMidMouseButton", "(bool)", SetInvertMidMouseButton}; \ No newline at end of file diff --git a/section/LuaExts.cpp b/section/LuaExts.cpp deleted file mode 100644 index b4eb824f..00000000 --- a/section/LuaExts.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#include "include/LuaAPI.h" - -void e_GetTableAH(char *t, uint32_t *asize, uint8_t *hbits) { - *asize = *(int*)(t + 32); - *hbits = *(uint8_t*)(t + 9); -} - -struct LuaExts { - LuaExts() { - if (FAJit) { - WarningF("%s", "Used FAExt.dll"); - lua_createtable = GetProcAddress(FAJit, "lua_createtable"); - GetTableAH = GetProcAddress(FAJit, "GetTableAH"); - } else { - //PatcherList_LCreateTable - extern void *LCreateTable[]; - if (LCreateTable[0]) - lua_createtable = LCreateTable[0]; - GetTableAH = e_GetTableAH; - } - } -} luaexts; \ No newline at end of file diff --git a/section/LuaFuncRegs.cpp b/section/LuaFuncRegs.cpp deleted file mode 100644 index 28fb2d2b..00000000 --- a/section/LuaFuncRegs.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include "include/moho.h" - -#define g_UINextDesc GPtr(0x0F59690, luaFuncDescReg*) -#define g_SimNextDesc GPtr(0x0F5A124, luaFuncDescReg*) - -extern void *UIFuncRegs[], *SimFuncRegs[]; - -void LuaFuncsReg() { - luaFuncDescReg **descs; - for (descs = UIFuncRegs; *descs; descs++) { - (*descs)->Next = g_UINextDesc; - g_UINextDesc = *descs; - } - for (descs = SimFuncRegs; *descs; descs++) { - (*descs)->Next = g_SimNextDesc; - g_SimNextDesc = *descs; - } -} \ No newline at end of file diff --git a/section/MauiBitmap.cpp b/section/MauiBitmap.cpp index 4556dae7..83408da2 100644 --- a/section/MauiBitmap.cpp +++ b/section/MauiBitmap.cpp @@ -1,7 +1,7 @@ -#include "include/CObject.h" -#include "include/LuaApi.h" -#include "include/global.h" -#include "include/magic_classes.h" +#include "CObject.h" +#include "LuaApi.h" +#include "global.h" +#include "magic_classes.h" bool __cdecl TryConvertToColor(const char *s, uint32_t &color) asm("0x4B2B90"); @@ -34,12 +34,11 @@ int SetColorMask(lua_State *l) return 0; } -// PatcherList_UIFuncRegs_BitmapSetColorMaskDesc -luaFuncDescReg BitmapSetColorMaskDesc = {0x00E37C14, - "SetColorMask", - "CMauiBitmap", - "Bitmap:SetColorMask(color)", - nullptr, - SetColorMask, - 0x00F8D7DC}; +using BitmapMethodReg = UIRegFuncT<0x00E37C14, 0x00F8D7DC>; + +BitmapMethodReg BitmapSetColorMaskDesc{ + "SetColorMask", + "Bitmap:SetColorMask(color)", + SetColorMask, + "CMauiBitmap"}; diff --git a/section/OnCreateInitLuaState.cpp b/section/OnCreateInitLuaState.cpp index 61dbb488..c8a982f0 100644 --- a/section/OnCreateInitLuaState.cpp +++ b/section/OnCreateInitLuaState.cpp @@ -1,4 +1,4 @@ -#include "include/moho.h" +#include "moho.h" void __thiscall OnCreateInitLuaState(LuaState* state, int enumStdLibs) { reinterpret_cast(0x90AC10)(state, enumStdLibs); //original diff --git a/section/OnWindowMessage.cpp b/section/OnWindowMessage.cpp index 60dcc170..7d93d2c3 100644 --- a/section/OnWindowMessage.cpp +++ b/section/OnWindowMessage.cpp @@ -1,4 +1,5 @@ -#include "include/global.h" +#include "global.h" + struct KeyEventInfo { diff --git a/section/ProjectileNewMethods.cpp b/section/ProjectileNewMethods.cpp index ac016933..588b8425 100644 --- a/section/ProjectileNewMethods.cpp +++ b/section/ProjectileNewMethods.cpp @@ -1,7 +1,7 @@ -#include "include/global.h" -#include "include/moho.h" -#include "include/CObject.h" -#include "include/magic_classes.h" +#include "global.h" +#include "moho.h" +#include "CObject.h" +#include "magic_classes.h" int GetMaxZigZag(lua_State *L) { auto res = GetCScriptObject(L, 1); @@ -73,7 +73,7 @@ int SetNewTargetGroundXYZ(lua_State *L) { return 0; } -using ProjectileMethodReg = SimRegFunc<0xE2A0DC, 0xF8D784>; +using ProjectileMethodReg = SimRegFuncT<0xE2A0DC, 0xF8D784>; ProjectileMethodReg ProjectileGetMaxZigZag{ "GetMaxZigZag", diff --git a/section/RangeRings.cpp b/section/RangeRings.cpp index 855daa62..be05c0d9 100644 --- a/section/RangeRings.cpp +++ b/section/RangeRings.cpp @@ -1,4 +1,4 @@ -#include "include/desync_fix_global.h" +#include "desync_fix_global.h" void GlobalRings() { diff --git a/section/SetAlpha.cpp b/section/SetAlpha.cpp index 4259d4b7..c4bebb8e 100644 --- a/section/SetAlpha.cpp +++ b/section/SetAlpha.cpp @@ -1,4 +1,4 @@ -#include "include/moho.h" +#include "moho.h" void SetAlpha(int control, float alpha, uint32_t alphai) { *(float *)(control + 240) = alpha; diff --git a/section/SetStatFix.cpp b/section/SetStatFix.cpp index af77c090..92645f6d 100644 --- a/section/SetStatFix.cpp +++ b/section/SetStatFix.cpp @@ -1,4 +1,4 @@ -#include "include/moho.h" +#include "moho.h" void PushTrue() { diff --git a/section/SiloProgress.cpp b/section/SiloProgress.cpp index bb2ab5e7..0b905b92 100644 --- a/section/SiloProgress.cpp +++ b/section/SiloProgress.cpp @@ -1,4 +1,4 @@ -#include "include/moho.h" +#include "moho.h" struct struct_Resources // sizeof=0x8 { diff --git a/section/SimGetCommandQueue.cpp b/section/SimGetCommandQueue.cpp index 11a8b89f..c072c254 100644 --- a/section/SimGetCommandQueue.cpp +++ b/section/SimGetCommandQueue.cpp @@ -1,4 +1,4 @@ -#include "include/moho.h" +#include "moho.h" void __thiscall SimGetCommandQueueInsert(LuaObject *this_, LuaObject *obj) { diff --git a/section/SimGetDepositsAroundPoint.cpp b/section/SimGetDepositsAroundPoint.cpp index f2bf1c9c..b233705c 100644 --- a/section/SimGetDepositsAroundPoint.cpp +++ b/section/SimGetDepositsAroundPoint.cpp @@ -1,4 +1,5 @@ -#include "include/moho.h" +#include "moho.h" +#include "magic_classes.h" #define lua_push(L, name, val) \ lua_pushstring(L, name); \ @@ -41,22 +42,6 @@ int SimGetDepositsAroundPoint(lua_State *L) { #define s_GDAPName "GetDepositsAroundPoint" #define s_GDAPDesc "(X, Z, Radius, Type)" -//PatcherList_SimFuncRegs_SGDAPRegDesc -luaFuncDescReg SGDAPRegDesc = { - 0x00E45E90, - s_GDAPName, - 0x00E00D90, - s_GDAPDesc, - 0x00000000, - SimGetDepositsAroundPoint, - 0x00000000}; - -//PatcherList_UIFuncRegs_UGDAPRegDesc -luaFuncDescReg UGDAPRegDesc = { - 0x00E45E90, - s_GDAPName, - 0x00E00D90, - s_GDAPDesc, - 0x00000000, - SimGetDepositsAroundPoint, - 0x00000000}; \ No newline at end of file + +UIRegFunc SGDAPRegDesc{s_GDAPName,s_GDAPDesc, SimGetDepositsAroundPoint}; +SimRegFunc UGDAPRegDesc{s_GDAPName, s_GDAPDesc, SimGetDepositsAroundPoint}; \ No newline at end of file diff --git a/section/SimGetMouseWorldPos.cpp b/section/SimGetMouseWorldPos.cpp index de5ee491..dd2c3fcf 100644 --- a/section/SimGetMouseWorldPos.cpp +++ b/section/SimGetMouseWorldPos.cpp @@ -1,11 +1,5 @@ -#include "include/moho.h" +#include "moho.h" +#include "magic_classes.h" -//PatcherList_SimFuncRegs_SGMWPRegDesc -luaFuncDescReg SGMWPRegDesc = { - 0x00E45E90, - 0x00E451A4, // "GetMouseWorldPos" - 0x00E00D90, - 0x00E45188, - 0x00000000, - 0x00842BB0, - 0x00000000}; \ No newline at end of file +SimRegFunc SGMWPRegDesc{(const char *)0x00E451A4, (const char *)0x00E45188, + (lua_CFunction)0x00842BB0}; \ No newline at end of file diff --git a/section/SimIsReplay.cpp b/section/SimIsReplay.cpp index be7947e1..4bed890c 100644 --- a/section/SimIsReplay.cpp +++ b/section/SimIsReplay.cpp @@ -1,16 +1,10 @@ -#include "include/moho.h" +#include "moho.h" +#include "magic_classes.h" int SimSessionIsReplay(lua_State *L) { - lua_pushboolean(L, g_CWldSession->isReplay); - return 1; + lua_pushboolean(L, g_CWldSession->isReplay); + return 1; } -//PatcherList_SimFuncRegs_SSIRRegDesc -luaFuncDescReg SSIRRegDesc = { - 0x00E45E90, - 0x00E4AFBC, // "SessionIsReplay" - 0x00E00D90, - 0x00E4AF84, // "Return true if the active session is a replay session." - 0x00000000, - SimSessionIsReplay, - 0x00000000}; \ No newline at end of file +SimRegFunc SSIRRegDesc{(const char *)0x00E4AFBC, (const char *)0x00E4AF84, + SimSessionIsReplay}; \ No newline at end of file diff --git a/section/SimSetCommandSource.cpp b/section/SimSetCommandSource.cpp index a1f25011..6f1a72b1 100644 --- a/section/SimSetCommandSource.cpp +++ b/section/SimSetCommandSource.cpp @@ -1,21 +1,16 @@ -#include "include/moho.h" +#include "moho.h" +#include "magic_classes.h" int SimSetCommandSource(lua_State *L) { - int armyI = lua_tonumber(L, 1); - int sourceI = lua_tonumber(L, 2); - bool set_or_unset = lua_toboolean(L, 3); + int armyI = lua_tonumber(L, 1); + int sourceI = lua_tonumber(L, 2); + bool set_or_unset = lua_toboolean(L, 3); - auto srcSet = &g_Sim->armies[armyI]->mValidCommandSources; - srcSet->set(sourceI, set_or_unset); - return 0; + auto srcSet = &g_Sim->armies[armyI]->mValidCommandSources; + srcSet->set(sourceI, set_or_unset); + return 0; } -//PatcherList_SimFuncRegs_SSCSRegDesc -luaFuncDescReg SSCSRegDesc = { - 0x00E45E90, - "SetCommandSource", - 0x00E00D90, - "(targetArmyIndex, sourceHumanIndex, Set or Unset)", - 0x00000000, - SimSetCommandSource, - 0x00000000}; \ No newline at end of file +SimRegFunc SSCSRegDesc{"SetCommandSource", + "(targetArmyIndex, sourceHumanIndex, Set or Unset)", + SimSetCommandSource}; \ No newline at end of file diff --git a/section/SimSetFocusArmy.cpp b/section/SimSetFocusArmy.cpp index 451fe8ce..f531566a 100644 --- a/section/SimSetFocusArmy.cpp +++ b/section/SimSetFocusArmy.cpp @@ -1,17 +1,12 @@ -#include "include/moho.h" +#include "magic_classes.h" +#include "moho.h" + int SimSetFocusArmy(lua_State *L) { - int armyIndex = lua_tonumber(L, 1); - g_CSimDriver->focusArmyIndex = armyIndex; - return 0; + int armyIndex = lua_tonumber(L, 1); + g_CSimDriver->focusArmyIndex = armyIndex; + return 0; } -//PatcherList_SimFuncRegs_SSFARegDesc -luaFuncDescReg SSFARegDesc = { - 0x00E45E90, - 0x00E43408, // "SetFocusArmy" - 0x00E00D90, - 0x00E451FC, // "SetFocusArmy(armyIndex or -1)" - 0x00000000, - SimSetFocusArmy, - 0x00000000}; \ No newline at end of file +SimRegFunc SimSetFocusArmyReg{(const char *)0x00E43408, + (const char *)0x00E451FC, SimSetFocusArmy}; \ No newline at end of file diff --git a/section/UserUnit.cpp b/section/UserUnit.cpp index 0b66d758..ff2b3d9a 100644 --- a/section/UserUnit.cpp +++ b/section/UserUnit.cpp @@ -1,7 +1,7 @@ -#include "include/CObject.h" -#include "include/magic_classes.h" -#include "include/moho.h" -#include "include/utility.h" +#include "CObject.h" +#include "magic_classes.h" +#include "moho.h" +#include "utility.h" void *CheckUserUnit(LuaObject *obj, LuaState *ls) { @@ -65,7 +65,7 @@ int GetInterpolatedPosition(lua_State *l) if (mesh == nullptr) return 0; Moho::MeshInstance::UpdateInterpolatedTransform(mesh); - PushVector(l, {mesh[34], mesh[35], mesh[36]}); + PushVector3(l, {mesh[34], mesh[35], mesh[36]}); return 1; } // for testing @@ -101,7 +101,7 @@ int GetFractionComplete(lua_State *l) // UI_Lua LOG(GetSelectedUnits()[1]:GetFractionComplete()) // UI_Lua LOG(GetSelectedUnits()[1].GetFractionComplete{}) -using UserUnitMethodReg = UIRegFunc<0x00E4DA64, 0x00F8D89C>; +using UserUnitMethodReg = UIRegFuncT<0x00E4DA64, 0x00F8D89C>; UserUnitMethodReg UserUnitGetInterpolatedPosition{ "GetInterpolatedPosition", diff --git a/section/VDist3.cpp b/section/VDist3.cpp index c908b6f4..d4dbd3d8 100644 --- a/section/VDist3.cpp +++ b/section/VDist3.cpp @@ -1,6 +1,6 @@ -#include "include/LuaAPI.h" -#include "include/global.h" -#include "include/utility.h" +#include "LuaAPI.h" +#include "global.h" +#include "utility.h" int VDist3(lua_State *l) { diff --git a/section/WorldView.cpp b/section/WorldView.cpp index 1eb76fef..5fbbf4a3 100644 --- a/section/WorldView.cpp +++ b/section/WorldView.cpp @@ -1,7 +1,7 @@ -#include "include/CObject.h" -#include "include/magic_classes.h" -#include "include/moho.h" -#include "include/utility.h" +#include "CObject.h" +#include "magic_classes.h" +#include "moho.h" +#include "utility.h" void Project(float *camera, const Vector3f *v, Vector2f *result) { @@ -24,7 +24,7 @@ Vector2f ProjectVec(const Vector3f &v, float *camera) void ProjectVectors(lua_State *l, int index, float *camera) { - const char *t = (const char *)lua_topointer(l, index); + const void *t = lua_topointer(l, index); uint32_t asize; uint8_t hbits; GetTableAH(t, &asize, &hbits); @@ -36,7 +36,7 @@ void ProjectVectors(lua_State *l, int index, float *camera) Vector3f v = ToVector(l, -1); Vector2f p = ProjectVec(v, camera); lua_pushvalue(l, -2); // key - PushVector(l, p); // value + PushVector2(l, p); // value lua_rawset(l, -6); lua_pop(l, 1); } @@ -79,7 +79,7 @@ int ProjectMultiple(lua_State *l) // UI_Lua reprsl(import("/lua/ui/game/worldview.lua").viewLeft.ProjectMultiple()) // UI_Lua reprsl(import("/lua/ui/game/worldview.lua").viewLeft.ProjectMultiple({},{})) -using WorldViewMethodReg = UIRegFunc<0x00E491E8, 0x00F8D88C>; +using WorldViewMethodReg = UIRegFuncT<0x00E491E8, 0x00F8D88C>; WorldViewMethodReg WorldViewProjectMultiple{ "ProjectMultiple", diff --git a/section/gpg_net.cpp b/section/gpg_net.cpp index 359cdb89..9c826398 100644 --- a/section/gpg_net.cpp +++ b/section/gpg_net.cpp @@ -1,6 +1,6 @@ #pragma GCC optimize("O3") -#include "include/desync_fix_global.h" +#include "desync_fix_global.h" uint32_t tag_sent = 0; uint32_t p_index = 0; diff --git a/section/lua_createtable.cpp b/section/lua_createtable.cpp index 734acd07..02da85ce 100644 --- a/section/lua_createtable.cpp +++ b/section/lua_createtable.cpp @@ -1,9 +1,8 @@ -#include "include/LuaAPI.h" +#include "LuaAPI.h" #define NON_GENERAL_REG(var_) [var_] "g"(var_) -//PatcherList_LCreateTable_e_lua_createtable -void e_lua_createtable(lua_State *l, int narr, int nhash) +void lua_createtable(lua_State *l, int narr, int nhash) { // copied from lua_newtable asm("mov esi, %[l];" // lua_State "mov eax, [esi+0x10];" diff --git a/section/moho_decode.cpp b/section/moho_decode.cpp index 577ec0e5..c6b2f8d7 100644 --- a/section/moho_decode.cpp +++ b/section/moho_decode.cpp @@ -1,6 +1,6 @@ #pragma GCC optimize("O3") -#include "include/desync_fix_global.h" +#include "desync_fix_global.h" const char* safe_quit = "safeQuit"; uint32_t tick_num = 0; diff --git a/section/moho_input.cpp b/section/moho_input.cpp index 21f65ea4..2ca24ee8 100644 --- a/section/moho_input.cpp +++ b/section/moho_input.cpp @@ -1,6 +1,6 @@ #pragma GCC optimize("O3") -#include "include/desync_fix_global.h" +#include "desync_fix_global.h" uint32_t input_tick = 0; uint32_t prev_tick = 0;