- Stand-in client reaches the glue screens (intro movie, EULA/TOS accept, login screen) at 16:9; stand-ins are report-only on x64 - Ports on the startup/idle path: GlueScriptEvents/CharacterSelection/ CharacterCreation/RealmList/AccountMsg/VideoOptions _Scripts, CGlueMgr (Initialize/Resume/Idle/Accept*/Shutdown), ClientServices, NetClient/ WowConnection, DBCache + instances, WorldParam/World/Map/Liquid/Weather/ shadow, InputControl, Scrn, ConsoleClient, SysMessage, LoadingScreen, SystemRegisterFunctions, CGameTime, Screen::GetAspectRatio - Shutdown chain: BeginCloseGame, DestroyEngineCallback, DBCache save/ destroy, SpellVisuals/Effect/World/Glue teardown - Logitech LCD no-device path in Ui/UILCD/Windows (Windows-only dir); lgLcd is a stub library in ThirdParty/lgLcd - CVar and console commands split into <Module>_CVar.cpp / _Console.cpp - DivxDecoder.dll (Win32, original) and XvidDecoder.dll (x64, port with vendored xvidcore) both copied to the build folder - Warden: Win32 faithful port, Win64 stub - x64 fixes: lua_newstate gcusage/gctime init, pointer render states reset with nullptr, g_rndSeed defined - 37 class/struct forward-declaration mismatches fixed (false stand-ins) Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
82 lines
2.2 KiB
C++
82 lines
2.2 KiB
C++
#include <cstdint>
|
|
#include "Engine/Source/ConsoleBase/IConsole.h"
|
|
#include "Engine/Source/FrameScript/FrameScript.h"
|
|
#include "Engine/Source/FrameScript/FrameScript_Object.h"
|
|
#include "Engine/Source/Os/TimeManager.h"
|
|
#include "Engine/Source/lua-5.1/src/lauxlib.h"
|
|
#include "Engine/Source/lua-5.1/src/lua.h"
|
|
#include "WoW/Source/Game/GameTime.h"
|
|
#include "WoW/Source/Ui/ScriptEvents.h"
|
|
|
|
int32_t Script_GetAccountExpansionLevel(lua_State* L);
|
|
|
|
// VERIFY: 177658fd auto
|
|
// OFFSET: 0x006081F0
|
|
static int32_t Script_GetTime(lua_State* L) {
|
|
lua_pushnumber(L, OsGetAsyncTimeMs() * 0.001);
|
|
|
|
return 1;
|
|
}
|
|
|
|
// VERIFY: 4e5ce7ae auto
|
|
// OFFSET: 0x00608230
|
|
static int32_t Script_GetGameTime(lua_State* L) {
|
|
lua_pushnumber(L, g_clientGameTime.m_hour);
|
|
lua_pushnumber(L, g_clientGameTime.m_minute);
|
|
|
|
return 2;
|
|
}
|
|
|
|
// VERIFY: e5f40d18 auto
|
|
// OFFSET: 0x00608270
|
|
static int32_t Script_ConsoleExec(lua_State* L) {
|
|
if (!lua_isstring(L, 1)) {
|
|
luaL_error(L, "Usage: ConsoleExec(\"console_command\")");
|
|
return 0;
|
|
}
|
|
|
|
ConsoleCommandExecute(lua_tolstring(L, 1, nullptr), 0);
|
|
|
|
return 0;
|
|
}
|
|
|
|
// VERIFY: 20774f42 auto
|
|
// OFFSET: 0x00510BB0
|
|
static int32_t Script_ReadFile(lua_State* L) {
|
|
luaL_error(L, "Access Denied");
|
|
return 0;
|
|
}
|
|
|
|
// VERIFY: 972d4262 auto
|
|
// OFFSET: 0x00510BB0
|
|
static int32_t Script_DeleteFile(lua_State* L) {
|
|
luaL_error(L, "Access Denied");
|
|
return 0;
|
|
}
|
|
|
|
// VERIFY: f25bf2fd auto
|
|
// OFFSET: 0x00510BB0
|
|
static int32_t Script_AppendToFile(lua_State* L) {
|
|
luaL_error(L, "Access Denied");
|
|
return 0;
|
|
}
|
|
|
|
// STATIC: 0x00AD2184
|
|
static FrameScript_Method s_SystemFunctions[] = {
|
|
{ "GetTime", &Script_GetTime },
|
|
{ "GetGameTime", &Script_GetGameTime },
|
|
{ "ConsoleExec", &Script_ConsoleExec },
|
|
{ "ReadFile", &Script_ReadFile },
|
|
{ "DeleteFile", &Script_DeleteFile },
|
|
{ "AppendToFile", &Script_AppendToFile },
|
|
{ "GetAccountExpansionLevel", &Script_GetAccountExpansionLevel }
|
|
};
|
|
|
|
// VERIFY: 5cf87403 auto
|
|
// OFFSET: 0x0060A120
|
|
void SystemRegisterFunctions() {
|
|
for (uint32_t i = 0; i < sizeof(s_SystemFunctions) / sizeof(s_SystemFunctions[0]); i++) {
|
|
FrameScript_RegisterFunction(s_SystemFunctions[i].m_name, s_SystemFunctions[i].m_method);
|
|
}
|
|
}
|