Files
wowdecomp/Engine/Source/FFX/PassBox4.cpp
T
SatyandClaude Opus 5.5 2e418f9e08 Client bring-up: glue screen, EULA/TOS, shutdown chain, LCD, x64 fixes
- 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]>
2026-09-27 21:47:34 +02:00

69 lines
2.4 KiB
C++

#include "Engine/Source/FFX/PassBox4.h"
#include "Engine/Source/Gx/CGxDevice/CGxDevice.h"
#include "Engine/Source/Gx/CGxDevice/CGxShader.h"
#include "Engine/Source/Gx/Gx.h"
#include "Engine/Source/Services/Texture.h"
// VERIFY: 41d87533 auto
// OFFSET: 0x008C1F70
PassBox4::PassBox4(FFX::Tex** inputs, uint32_t count, FFX::Tex* output, EGxBlend blend, bool unk) : FFX::Pass(inputs, count, output, blend, unk) {
this->m_shaderIndex = 0;
if (FFX::s_useRECT) {
this->m_shaderIndex = 1;
}
g_theGxDevicePtr->ShaderCreate(this->m_shaders, GxSh_Pixel, "Shaders\\Pixel", "FFXBox4", sizeof(this->m_shaders) / sizeof(this->m_shaders[0]));
}
// VERIFY: 787961fc manual
// OFFSET: [0x008C1FE0, 0x008C21B0]
PassBox4::~PassBox4() {
for (uint32_t i = 0; i < sizeof(this->m_shaders) / sizeof(this->m_shaders[0]); i++) {
if (this->m_shaders[i]) {
g_theGxDevicePtr->ShaderDestroy(this->m_shaders[i]);
}
}
}
// VERIFY: bf921836 manual
// OFFSET: 0x008C2020
bool PassBox4::Valid() {
CGxShader* shader = this->m_shaders[this->m_shaderIndex];
return (shader ? shader->Valid() : 0) != 0;
}
// VERIFY: 3361e6e6 manual
// OFFSET: 0x008C2040
void PassBox4::Execute() {
static C2Vector s_offsets[4] = {
C2Vector(-1.5f, -1.5f),
C2Vector(0.5f, -1.5f),
C2Vector(0.5f, 0.5f),
C2Vector(-1.5f, 0.5f)
};
FFX::SetupGx(this->m_output);
FFX::SetupGeo_Quad(this->m_output->m_size, this->m_inputs[0]->m_size, this->m_inputs[0]->m_texSize, FFX::s_gridPos, FFX::s_gridTex, this->unk_002C);
CImVector white;
white.b = 0xFF;
white.g = 0xFF;
white.r = 0xFF;
white.a = 0xFF;
FFX::SetupVB_PCT4(FFX::s_gridPos, white, FFX::s_gridTex, s_offsets, this->m_inputs[0]->m_texelSize);
g_theGxDevicePtr->PrimVertexMask(0x3D1);
FFX::SetupIB();
g_theGxDevicePtr->RsSet(GxRs_Texture0, TextureGetGxTex(this->m_inputs[0]->m_texture, 1, nullptr));
g_theGxDevicePtr->RsSet(GxRs_Texture1, TextureGetGxTex(this->m_inputs[0]->m_texture, 1, nullptr));
g_theGxDevicePtr->RsSet(GxRs_Texture2, TextureGetGxTex(this->m_inputs[0]->m_texture, 1, nullptr));
g_theGxDevicePtr->RsSet(GxRs_Texture3, TextureGetGxTex(this->m_inputs[0]->m_texture, 1, nullptr));
g_theGxDevicePtr->RsSet(GxRs_PixelShader, this->m_shaders[this->m_shaderIndex]);
g_theGxDevicePtr->Draw(&FFX::s_quadBatch, 1);
FFX::SetupReset();
}