Files
SatyandClaude Opus 5.5 89c3a2ac98 ICursorDraw, D3D buffers: first D3D9 window
CGxDevice/CGxDeviceD3d::ICursorDraw, GxUpdateAlphaRef, CGxShader::Valid,
D3D BufLock/BufUnlock/BufData with IBufLock/IBufUnlock and CreatePoolAPI,
EmergencyMem::Lock/Unlock. GxTest defaults to its exe folder for data and
now runs the clear/present loop on both architectures.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-25 03:40:35 +02:00

40 lines
1.2 KiB
C++

#include <cstdint>
#include "Engine/Source/Gx/CGxDevice/CGxDevice.h"
#include "Engine/Source/Gx/CGxDevice/CGxShader.h"
// INLINED
CGxShader::CGxShader() : m_refCount(0), m_apiSpecific(nullptr), m_target(0), unk_0028(0), m_valid(0), m_loaded(0), unk_0034(0), m_patched(0) {
}
// VERIFY: 089de908 manual
// OFFSET: 0x00689A50
int32_t CGxShader::Valid() {
if (!this->m_loaded) {
g_theGxDevicePtr->IShaderCreate(this);
}
return this->m_valid;
}
// VERIFY: 0031218a manual
// OFFSET: 0x00689A70
void CGxShader::Load(SFileImpl* file) {
SFileReadFile(file, &this->unk_003C, 4, nullptr, nullptr, 0);
SFileReadFile(file, &this->unk_0040, 4, nullptr, nullptr, 0);
SFileReadFile(file, &this->unk_0044, 2, nullptr, nullptr, 0);
SFileReadFile(file, &this->unk_0046, 2, nullptr, nullptr, 0);
uint32_t codeSize;
SFileReadFile(file, &codeSize, 4, nullptr, nullptr, 0);
this->m_code.SetCount(codeSize);
SFileReadFile(file, this->m_code.m_data, codeSize, nullptr, nullptr, 0);
uint8_t padding[4];
SFileReadFile(file, padding, ((codeSize + 3) & ~3u) - codeSize, nullptr, nullptr, 0);
}
// VERIFY: 73c2698b auto
// OFFSET: 0x00689B60
CGxShader::~CGxShader() {
}