Files
wowdecomp/WoW/Source/UIUtil/PortraitButton.cpp
T
SatyandClaude Opus 5.5 095603ff2b Client bring-up: login, realm list, world auth, character select
- Grunt login ported end to end (SRP6 challenge/proof, version checksum,
  realm list) and tested against a live server: authenticates, connects to
  the world server (auth session with proof-of-work, header crypt), receives
  the character list and shows character select
- Glue: realm list UI, character select (list, models, scripts), character
  create screen + name generator, delete/rename/decline, Enter World up to
  the loading screen; loading screen drawing and progress
- AccountData (times, update, upload/download), BannedAddOns, addon scan and
  addon info, client cache version, tutorial flags
- Shutdown path at login state: world/map/liquid/weather teardown, NetClient,
  ComSat, streaming stop; Logitech LCD no-device path in Ui/UILCD/Windows
- PCRE 5.0 vendored (core stock; chartables and the posix layer from 12340),
  ValidateName
- Fixes: TSGrowableArray::CalcChunkSize clamps to >= 8 (crash on char list),
  CWorldScene liquid renderer allocation, CMapFootprintTexture element ctor,
  pointer render states on x64, CFrustum/CWFrustum layout, M2 draw callback
  arguments, 37 class/struct forward-declaration mismatches
- IDB name sync (1217 names), verify aliases, harness large-element
  instantiation

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-28 02:39:56 +02:00

61 lines
1.5 KiB
C++

#include "PortraitButton.h"
#include "Engine/Source/Gx/CGxDevice/CGxDevice.h"
#include "Engine/Source/Gx/Gx.h"
#include "Engine/Source/Tempest/CImVector.h"
#include "Engine/Source/Tempest/CiRect.h"
#include "WoW/Source/Ui/ScriptEvents.h"
// STATIC: 0x00C5CDFC
static int32_t unk_C5CDFC;
// STATIC: 0x00C5CE08
static TSHashTable<PLAYERPORTRAIT, CHashKeyGUID> unk_C5CE08;
// STATIC: 0x00C5CE30
static TSHashTable<UNITPORTRAIT, HASHKEY_DWORD> unk_C5CE30;
// VERIFY: 9cb5c23b auto
// OFFSET: 0x00616DC0
int32_t RTAlphaSupported() {
if (g_theGxDevicePtr->DeviceApi() == GxApi_OpenGl && !g_theGxDevicePtr->Caps().m_oglRtAlpha) {
return 0;
}
int32_t supported = 0;
GxSceneClear(3, CImVector());
CiRect rect;
rect.minY = 0;
rect.minX = 0;
rect.maxY = 64;
rect.maxX = 64;
TSGrowableArray<CImVector> pixels;
g_theGxDevicePtr->DeviceReadPixels(rect, pixels);
for (uint32_t i = 0; i < pixels.Count(); i++) {
if (pixels[i].a != 0xFF) {
supported = 1;
break;
}
}
return supported;
}
// VERIFY: 406a4532 manual
// OFFSET: 0x00617070
void UpdateAllPortraits() {
unk_C5CDFC = RTAlphaSupported();
for (PLAYERPORTRAIT* portrait = unk_C5CE08.m_fulllist.Head(); portrait; portrait = unk_C5CE08.Next(portrait)) {
portrait->unk_0020 = 1;
}
for (UNITPORTRAIT* portrait = unk_C5CE30.m_fulllist.Head(); portrait; portrait = unk_C5CE30.Next(portrait)) {
portrait->unk_0018 = 1;
}
Script_SendUniqueSignalToAllUnits(145);
}