chore(build): update libs

This commit is contained in:
fallenoak 2025-09-23 16:54:14 -07:00
parent e35c66785c
commit 4bd4868531
14 changed files with 47 additions and 55 deletions

2
lib/bc

@ -1 +1 @@
Subproject commit 46e7af7c589a75b2c47b79ecef2146a22ebb3202 Subproject commit 5a8d14766308be0746368d169b3b1ee834d91e4a

@ -1 +1 @@
Subproject commit 846f1548923f7ce4264fde94c62153abb38819bc Subproject commit 92a540a549c6882b6ebd87593ed97174865100c9

@ -1 +1 @@
Subproject commit adc8cb6200425e30f4a3cf18c3cb96e8883f7ec0 Subproject commit a96d1270d4a1f5d6fa6756c30696a13f87b08a0a

@ -1 +1 @@
Subproject commit 981dd251f801036bb7dd76f220de4a52229849d9 Subproject commit f191151f1694ae471396c0cad6b89811fb6fa6ca

View File

@ -29,7 +29,7 @@ FT_Face FontFaceGetFace(HFACE handle) {
const char* FontFaceGetFontName(HFACE handle) { const char* FontFaceGetFontName(HFACE handle) {
STORM_ASSERT(handle); STORM_ASSERT(handle);
return reinterpret_cast<FACEDATA*>(handle)->m_key.m_str; return reinterpret_cast<FACEDATA*>(handle)->m_key.GetString();
} }
HFACE FontFaceGetHandle(const char* fileName, FT_Library library) { HFACE FontFaceGetHandle(const char* fileName, FT_Library library) {

View File

@ -792,7 +792,7 @@ void CGxDeviceGLL::IShaderCreatePixel(CGxShader* ps) {
GLShader::ShaderType::ePixelShader, GLShader::ShaderType::ePixelShader,
codeStr, codeStr,
codeLen, codeLen,
ps->m_key.m_str ps->m_key.GetString()
); );
glShader->Compile(nullptr); glShader->Compile(nullptr);
@ -818,7 +818,7 @@ void CGxDeviceGLL::IShaderCreateVertex(CGxShader* vs) {
GLShader::ShaderType::eVertexShader, GLShader::ShaderType::eVertexShader,
code, code,
codeLen, codeLen,
vs->m_key.m_str vs->m_key.GetString()
); );
glShader->Compile(nullptr); glShader->Compile(nullptr);

View File

@ -210,11 +210,7 @@ int32_t NetClient::HandleConnect() {
int32_t NetClient::HandleData(uint32_t timeReceived, void* data, int32_t size) { int32_t NetClient::HandleData(uint32_t timeReceived, void* data, int32_t size) {
// TODO push obj mgr // TODO push obj mgr
CDataStore msg; CDataStore msg = CDataStore(static_cast<uint8_t*>(data), size);
msg.m_data = static_cast<uint8_t*>(data);
msg.m_size = size;
msg.m_alloc = -1;
msg.m_read = 0;
this->ProcessMessage(timeReceived, &msg, 0); this->ProcessMessage(timeReceived, &msg, 0);
@ -295,7 +291,7 @@ void NetClient::Send(CDataStore* msg) {
return; return;
} }
auto v4 = msg->m_size - msg->m_read; auto v4 = msg->Size() - msg->Tell();
if (!v4) { if (!v4) {
return; return;
@ -358,12 +354,12 @@ void NetClient::WCDisconnected(WowConnection* conn, uint32_t timeStamp, NETCONNA
void NetClient::WCMessageReady(WowConnection* conn, uint32_t timeStamp, CDataStore* msg) { void NetClient::WCMessageReady(WowConnection* conn, uint32_t timeStamp, CDataStore* msg) {
uint8_t* data; uint8_t* data;
msg->GetDataInSitu(reinterpret_cast<void*&>(data), msg->m_size); msg->GetDataInSitu(reinterpret_cast<void*&>(data), msg->Size());
// TODO increment byte counter // TODO increment byte counter
// SInterlockedExchangeAdd(this->m_bytesReceived, msg->m_size); // SInterlockedExchangeAdd(this->m_bytesReceived, msg->m_size);
msg->m_read = 0; msg->Seek(0);
uint16_t msgId; uint16_t msgId;
msg->Get(msgId); msg->Get(msgId);
@ -381,8 +377,8 @@ void NetClient::WCMessageReady(WowConnection* conn, uint32_t timeStamp, CDataSto
} }
if (conn == this->m_serverConnection && !this->m_suspended) { if (conn == this->m_serverConnection && !this->m_suspended) {
msg->m_read = msg->m_size; msg->Seek(msg->Size());
this->m_netEventQueue->AddEvent(EVENT_ID_NET_DATA, conn, this, data, msg->m_size); this->m_netEventQueue->AddEvent(EVENT_ID_NET_DATA, conn, this, data, msg->Size());
} else { } else {
conn->Disconnect(); conn->Disconnect();
} }

View File

@ -171,7 +171,7 @@ int32_t RealmConnection::HandleAuthResponse(uint32_t msgId, uint32_t time, CData
this->m_authenticated = 1; this->m_authenticated = 1;
} }
if (msg->Size() - msg->m_read >= 10 + (authResult == 27 ? 5 : 0)) { if (msg->Size() - msg->Tell() >= 10 + (authResult == 27 ? 5 : 0)) {
msg->Get(this->m_billingTimeRemaining); msg->Get(this->m_billingTimeRemaining);
msg->Get(this->m_billingFlags); msg->Get(this->m_billingFlags);
msg->Get(this->m_billingTimeRested); msg->Get(this->m_billingTimeRested);

View File

@ -478,11 +478,7 @@ void WowConnection::DoMessageReads() {
this->m_readBytes += bytesRead; this->m_readBytes += bytesRead;
if (size >= 0 && this->m_readBytes >= size) { if (size >= 0 && this->m_readBytes >= size) {
CDataStore msg; CDataStore msg = CDataStore(&this->m_readBuffer[headerSize], size - headerSize);
msg.m_data = &this->m_readBuffer[headerSize];
msg.m_alloc = -1;
msg.m_size = size - headerSize;
msg.m_read = 0;
this->AcquireResponseRef(); this->AcquireResponseRef();

View File

@ -47,7 +47,7 @@ void Grunt::ClientLink::Call() {
} }
int32_t Grunt::ClientLink::CmdAuthLogonChallenge(CDataStore& msg) { int32_t Grunt::ClientLink::CmdAuthLogonChallenge(CDataStore& msg) {
if (msg.m_read > msg.m_size || msg.m_size - msg.m_read < 2) { if (msg.Tell() > msg.Size() || msg.Size() - msg.Tell() < 2) {
return 0; return 0;
} }
@ -63,7 +63,7 @@ int32_t Grunt::ClientLink::CmdAuthLogonChallenge(CDataStore& msg) {
// Auth failure (success == 0) // Auth failure (success == 0)
if (result != 0) { if (result != 0) {
if (msg.m_read > msg.m_size) { if (msg.Tell() > msg.Size()) {
return 1; return 1;
} }
@ -78,11 +78,11 @@ int32_t Grunt::ClientLink::CmdAuthLogonChallenge(CDataStore& msg) {
return 2; return 2;
} }
if (msg.m_read > msg.m_size) { if (msg.Tell() > msg.Size()) {
return 0; return 0;
} }
if (msg.m_size - msg.m_read < 33) { if (msg.Size() - msg.Tell() < 33) {
return 0; return 0;
} }
@ -177,7 +177,7 @@ int32_t Grunt::ClientLink::CmdAuthLogonChallenge(CDataStore& msg) {
msg.Get(tokenRequired); msg.Get(tokenRequired);
} }
if (msg.m_read > msg.m_size) { if (msg.Tell() > msg.Size()) {
return 1; return 1;
} }
@ -204,7 +204,7 @@ int32_t Grunt::ClientLink::CmdAuthLogonChallenge(CDataStore& msg) {
} }
int32_t Grunt::ClientLink::CmdAuthLogonProof(CDataStore& msg) { int32_t Grunt::ClientLink::CmdAuthLogonProof(CDataStore& msg) {
if (msg.m_read >= msg.m_size) { if (msg.Tell() >= msg.Size()) {
return 0; return 0;
} }
@ -217,7 +217,7 @@ int32_t Grunt::ClientLink::CmdAuthLogonProof(CDataStore& msg) {
// TODO // TODO
} }
if (msg.m_read > msg.m_size) { if (msg.Tell() > msg.Size()) {
return 1; return 1;
} }
@ -233,7 +233,7 @@ int32_t Grunt::ClientLink::CmdAuthLogonProof(CDataStore& msg) {
} }
// Authentication success // Authentication success
if (msg.m_read <= msg.m_size && msg.m_size - msg.m_read >= 24) { if (msg.Tell() <= msg.Size() && msg.Size() - msg.Tell() >= 24) {
void* serverProof; void* serverProof;
msg.GetDataInSitu(serverProof, 20); msg.GetDataInSitu(serverProof, 20);
@ -243,11 +243,11 @@ int32_t Grunt::ClientLink::CmdAuthLogonProof(CDataStore& msg) {
uint32_t surveyID; uint32_t surveyID;
msg.Get(surveyID); msg.Get(surveyID);
if (msg.m_read <= msg.m_size && msg.m_size - msg.m_read >= 2) { if (msg.Tell() <= msg.Size() && msg.Size() - msg.Tell() >= 2) {
uint16_t logonFlags = 0x0; uint16_t logonFlags = 0x0;
msg.Get(logonFlags); msg.Get(logonFlags);
if (msg.m_read <= msg.m_size) { if (msg.Tell() <= msg.Size()) {
if (this->m_srpClient.VerifyServerProof(static_cast<uint8_t*>(serverProof), 20)) { if (this->m_srpClient.VerifyServerProof(static_cast<uint8_t*>(serverProof), 20)) {
this->SetState(2); this->SetState(2);
this->m_clientResponse->LogonResult(Grunt::GRUNT_RESULT_11, nullptr, 0, 0); this->m_clientResponse->LogonResult(Grunt::GRUNT_RESULT_11, nullptr, 0, 0);
@ -282,28 +282,28 @@ int32_t Grunt::ClientLink::CmdAuthReconnectProof(CDataStore& msg) {
} }
int32_t Grunt::ClientLink::CmdRealmList(CDataStore& msg) { int32_t Grunt::ClientLink::CmdRealmList(CDataStore& msg) {
if (msg.m_read > msg.m_size || msg.m_size - msg.m_read < 2) { if (msg.Tell() > msg.Size() || msg.Size() - msg.Tell() < 2) {
return 0; return 0;
} }
uint16_t size; uint16_t size;
msg.Get(size); msg.Get(size);
if (msg.m_read > msg.m_size || msg.m_size - msg.m_read < size) { if (msg.Tell() > msg.Size() || msg.Size() - msg.Tell() < size) {
return 0; return 0;
} }
uint32_t startData = msg.m_read; uint32_t startData = msg.Tell();
uint32_t padding; uint32_t padding;
msg.Get(padding); msg.Get(padding);
uint32_t startList = msg.m_read; uint32_t startList = msg.Tell();
uint16_t count; uint16_t count;
msg.Get(count); msg.Get(count);
for (uint32_t i = 0; i < count && msg.m_read < msg.m_size; i++) { for (uint32_t i = 0; i < count && msg.Tell() < msg.Size(); i++) {
uint8_t realmType; uint8_t realmType;
msg.Get(realmType); msg.Get(realmType);
@ -350,13 +350,13 @@ int32_t Grunt::ClientLink::CmdRealmList(CDataStore& msg) {
uint16_t padding2; uint16_t padding2;
msg.Get(padding2); msg.Get(padding2);
if (msg.m_read <= msg.m_size && msg.m_read - startData == size) { if (msg.Tell() <= msg.Size() && msg.Tell() - startData == size) {
uint32_t endData = msg.m_read; uint32_t endData = msg.Tell();
msg.m_read = startList; msg.Seek(startList);
this->m_clientResponse->RealmListResult(&msg); this->m_clientResponse->RealmListResult(&msg);
msg.m_read = endData; msg.Seek(endData);
return 2; return 2;
} }
@ -457,7 +457,7 @@ void Grunt::ClientLink::LogonNewSession(const Grunt::ClientLink::Logon& logon) {
} }
void Grunt::ClientLink::PackLogon(CDataStore& msg, const Logon& logon) { void Grunt::ClientLink::PackLogon(CDataStore& msg, const Logon& logon) {
uint32_t startPos = msg.m_size; uint32_t startPos = msg.Size();
uint16_t tmpSize = 0; uint16_t tmpSize = 0;
msg.Put(tmpSize); msg.Put(tmpSize);
@ -477,7 +477,7 @@ void Grunt::ClientLink::PackLogon(CDataStore& msg, const Logon& logon) {
msg.Put(accountNameLen); msg.Put(accountNameLen);
msg.PutData(this->m_accountName, accountNameLen); msg.PutData(this->m_accountName, accountNameLen);
msg.Set(startPos, msg.m_size - startPos - 2); msg.Set(startPos, msg.Size() - startPos - 2);
} }
void Grunt::ClientLink::ProveVersion(const uint8_t* versionChecksum) { void Grunt::ClientLink::ProveVersion(const uint8_t* versionChecksum) {
@ -522,9 +522,9 @@ void Grunt::ClientLink::Send(CDataStore& msg) {
if (this->m_connection) { if (this->m_connection) {
void* data; void* data;
msg.GetDataInSitu(data, msg.m_size); msg.GetDataInSitu(data, msg.Size());
this->m_connection->SendRaw(static_cast<uint8_t*>(data), msg.m_size, false); this->m_connection->SendRaw(static_cast<uint8_t*>(data), msg.Size(), false);
} }
this->m_critSect.Leave(); this->m_critSect.Leave();
@ -565,15 +565,15 @@ void Grunt::ClientLink::WCDataReady(WowConnection* conn, uint32_t timeStamp, uin
uint32_t pos = 0; uint32_t pos = 0;
if (Grunt::Command<Grunt::ClientLink>::Process(this->m_datastore1B0, Grunt::s_clientCommands, 7u, *this, pos)) { if (Grunt::Command<Grunt::ClientLink>::Process(this->m_datastore1B0, Grunt::s_clientCommands, 7u, *this, pos)) {
auto remainingBytes = this->m_datastore1B0.m_size - pos; auto remainingBytes = this->m_datastore1B0.Size() - pos;
this->m_datastore1B0.m_read = pos; this->m_datastore1B0.Seek(pos);
void* remainingData; void* remainingData;
this->m_datastore1B0.GetDataInSitu(remainingData, remainingBytes); this->m_datastore1B0.GetDataInSitu(remainingData, remainingBytes);
this->m_datastore1B0.m_read = -1; this->m_datastore1B0.Seek(-1);
this->m_datastore1B0.Reset(); this->m_datastore1B0.Reset();
this->m_datastore1B0.PutData(remainingData, remainingBytes); this->m_datastore1B0.PutData(remainingData, remainingBytes);
} else { } else {
this->m_datastore1B0.m_read = -1; this->m_datastore1B0.Seek(-1);
this->m_datastore1B0.Reset(); this->m_datastore1B0.Reset();
this->Disconnect(); this->Disconnect();
} }

View File

@ -50,7 +50,7 @@ int32_t Grunt::Command<T>::Process(CDataStore& msg, Command<T>* commands, uint32
} }
if (result == 2) { if (result == 2) {
pos = msg.m_read; pos = msg.Tell();
} }
} }

View File

@ -57,7 +57,7 @@ void LoginResponse::HandleRealmData(uint32_t a2, CDataStore* msg) {
realm.revision = 0; realm.revision = 0;
} }
if (msg->m_read > msg->m_size) { if (msg->Tell() > msg->Size()) {
break; break;
} }
@ -78,7 +78,7 @@ void LoginResponse::HandleRealmData(uint32_t a2, CDataStore* msg) {
msg->Get(reinterpret_cast<uint16_t&>(this->uint10)); msg->Get(reinterpret_cast<uint16_t&>(this->uint10));
// Overrun or underrun // Overrun or underrun
if (msg->m_read > msg->m_size || !msg->IsRead()) { if (msg->Tell() > msg->Size() || !msg->IsRead()) {
this->m_realmList.Clear(); this->m_realmList.Clear();
this->RealmEnumCallback(4); this->RealmEnumCallback(4);
} }

View File

@ -44,7 +44,7 @@ CSimpleFont* CSimpleFont::GetFont(const char* name, int32_t a2) {
font->UnregisterScriptObject(font->m_name); font->UnregisterScriptObject(font->m_name);
} }
font->m_name = hashed->m_key.m_str; font->m_name = hashed->m_key.GetString();
if (font->m_name) { if (font->m_name) {
font->RegisterScriptObject(font->m_name); font->RegisterScriptObject(font->m_name);

View File

@ -94,7 +94,7 @@ str.join = strjoin
str.replace = strreplace)"; str.replace = strreplace)";
const char* FrameScript_EventObject::GetName() { const char* FrameScript_EventObject::GetName() {
return this->m_key.m_str; return this->m_key.GetString();
} }
int64_t OsGetAsyncClocksPerSecond() { int64_t OsGetAsyncClocksPerSecond() {