- 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]>
84 lines
2.2 KiB
C++
84 lines
2.2 KiB
C++
#include <cstdint>
|
|
#include "Engine/Source/Base/Coordinate.h"
|
|
#include "Engine/Source/Base/Handle.h"
|
|
#include "Engine/Source/Gxu/GxuFont.h"
|
|
#include "Engine/Source/Os/Path.h"
|
|
#include "Engine/Source/Scrn/Scrn.h"
|
|
#include "Engine/Source/Scrn/Stock.h"
|
|
#include "Engine/Source/Services/TextBlock.h"
|
|
#include "Engine/Source/Storm/H/storm.h"
|
|
|
|
// STATIC: 0x009EDCC8
|
|
static const float s_stockObjectHeights[SCRNSTOCKOBJECTS] = { 0.01953125f, 0.01953125f };
|
|
|
|
// STATIC: 0x00B49A28
|
|
static HTEXTFONT s_stockObjects[SCRNSTOCKOBJECTS];
|
|
|
|
// VERIFY: eb6fef3c auto
|
|
// OFFSET: 0x004A8D40
|
|
void ScrnSetStockFont(SCRNSTOCK stockID, const char* fontTexturePath) {
|
|
if (s_stockObjects[stockID]) {
|
|
HandleClose(reinterpret_cast<HOBJECT>(s_stockObjects[stockID]));
|
|
}
|
|
|
|
s_stockObjects[stockID] = TextBlockGenerateFont(fontTexturePath, 0, NDCToDDCHeight(s_stockObjectHeights[stockID]));
|
|
}
|
|
|
|
// VERIFY: f91e1722 auto
|
|
// OFFSET: 0x004A8DC0
|
|
HTEXTFONT ScrnGetStockFont(SCRNSTOCK stockID) {
|
|
if (stockID >= SCRNSTOCKOBJECTS) {
|
|
SErrSetLastError(STORM_ERROR_INVALID_PARAMETER);
|
|
|
|
return nullptr;
|
|
}
|
|
|
|
return s_stockObjects[stockID];
|
|
}
|
|
|
|
// VERIFY: 6d724882 auto
|
|
// OFFSET: 0x004A8DE0
|
|
float ScrnGetStockFontHeight(SCRNSTOCK stockID) {
|
|
if (stockID >= SCRNSTOCKOBJECTS) {
|
|
SErrSetLastError(STORM_ERROR_INVALID_PARAMETER);
|
|
|
|
return 0.0f;
|
|
}
|
|
|
|
return s_stockObjectHeights[stockID];
|
|
}
|
|
|
|
// VERIFY: 972b66ba auto
|
|
// OFFSET: 0x004A8E00
|
|
void IStockInitialize() {
|
|
GxuFontInitialize();
|
|
|
|
char fontTexturePath[260];
|
|
OsBuildFontFilePath("FRIZQT__.TTF", fontTexturePath, sizeof(fontTexturePath));
|
|
|
|
if (fontTexturePath[0]) {
|
|
ScrnSetStockFont(STOCK_SYSFONT, fontTexturePath);
|
|
} else {
|
|
SErrSetLastError(STORM_ERROR_INVALID_PARAMETER);
|
|
}
|
|
|
|
if (fontTexturePath[0]) {
|
|
ScrnSetStockFont(STOCK_PERFFONT, fontTexturePath);
|
|
} else {
|
|
SErrSetLastError(STORM_ERROR_INVALID_PARAMETER);
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x004A8D90
|
|
void IStockDestroy() {
|
|
for (uint32_t i = 0; i < SCRNSTOCKOBJECTS; i++) {
|
|
if (s_stockObjects[i]) {
|
|
HandleClose(reinterpret_cast<HOBJECT>(s_stockObjects[i]));
|
|
}
|
|
|
|
s_stockObjects[i] = nullptr;
|
|
}
|
|
|
|
GxuFontShutdown();
|
|
}
|