Files
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

92 lines
3.8 KiB
C++

#include "Engine/Source/FFX/PassGauss4.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: f0206923 auto
// OFFSET: 0x008C1B40
PassGauss4::PassGauss4(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", "FFXGauss4", sizeof(this->m_shaders) / sizeof(this->m_shaders[0]));
}
// VERIFY: 1148e3de manual
// OFFSET: [0x008C1BB0, 0x008C1BF0]
PassGauss4::~PassGauss4() {
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]);
}
}
}
bool PassGauss4::Valid() {
CGxShader* shader = this->m_shaders[this->m_shaderIndex];
return (shader ? shader->Valid() : 0) != 0;
}
// VERIFY: e4ef82d7 manual
// OFFSET: 0x008C1C20
void PassGauss4::Execute() {
C2Vector horizontal[4];
horizontal[0].x = -2.5f;
horizontal[0].y = 0.0f;
horizontal[1].x = -0.5f;
horizontal[1].y = 0.0f;
horizontal[2].x = 0.5f;
horizontal[2].y = 0.0f;
horizontal[3].x = 2.5f;
horizontal[3].y = 0.0f;
C2Vector vertical[4];
vertical[0].x = 0.0f;
vertical[0].y = -2.5f;
vertical[1].x = 0.0f;
vertical[1].y = -0.5f;
vertical[2].x = 0.0f;
vertical[2].y = 0.5f;
vertical[3].x = 0.0f;
vertical[3].y = 2.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);
g_theGxDevicePtr->PrimVertexMask(0x3D1);
FFX::SetupIB();
g_theGxDevicePtr->RsSet(GxRs_PixelShader, this->m_shaders[this->m_shaderIndex]);
CImVector white;
white.b = 0xFF;
white.g = 0xFF;
white.r = 0xFF;
white.a = 0xFF;
FFX::SetupVB_PCT4(FFX::s_gridPos, white, FFX::s_gridTex, horizontal, this->m_inputs[0]->m_texelSize);
GxRenderTargetSet(GxBuffers_Color, TextureGetGxTex(FFX::s_quart[1].m_texture, 1, nullptr), 0);
GxXformSetViewport(0.0f, static_cast<float>(FFX::s_quart[1].m_size.x) / FFX::s_quart[1].m_texSize.x, 0.0f, static_cast<float>(FFX::s_quart[1].m_size.y) / FFX::s_quart[1].m_texSize.y, 0.0f, 1.0f);
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->Draw(&FFX::s_quadBatch, 1);
FFX::SetupVB_PCT4(FFX::s_gridPos, white, FFX::s_gridTex, vertical, this->m_inputs[0]->m_texelSize);
GxRenderTargetSet(GxBuffers_Color, TextureGetGxTex(this->m_output->m_texture, 1, nullptr), 0);
GxXformSetViewport(0.0f, static_cast<float>(this->m_output->m_size.x) / this->m_output->m_texSize.x, 0.0f, static_cast<float>(this->m_output->m_size.y) / this->m_output->m_texSize.y, 0.0f, 1.0f);
g_theGxDevicePtr->RsSet(GxRs_Texture0, TextureGetGxTex(FFX::s_quart[1].m_texture, 1, nullptr));
g_theGxDevicePtr->RsSet(GxRs_Texture1, TextureGetGxTex(FFX::s_quart[1].m_texture, 1, nullptr));
g_theGxDevicePtr->RsSet(GxRs_Texture2, TextureGetGxTex(FFX::s_quart[1].m_texture, 1, nullptr));
g_theGxDevicePtr->RsSet(GxRs_Texture3, TextureGetGxTex(FFX::s_quart[1].m_texture, 1, nullptr));
g_theGxDevicePtr->Draw(&FFX::s_quadBatch, 1);
FFX::SetupReset();
}