fix(whoa): update thunderbrew to use the refactored squall error/validation and bc allocation macros

This commit is contained in:
phaneron 2025-03-31 23:52:37 -04:00
parent 1aeacd0d2e
commit 46843880ef
66 changed files with 459 additions and 457 deletions

View file

@ -24,8 +24,7 @@
#include <storm/Error.hpp>
#include <storm/Log.hpp>
#include <bc/os/Path.hpp>
#include <bc/file/File.hpp>
#include <bc/File.hpp>
CVar* Client::g_accountNameVar;
CVar* Client::g_accountListVar;

View file

@ -6,9 +6,8 @@
#include "console/Client.hpp"
#include "console/CVar.hpp"
#include "console/Types.hpp"
#include <storm/Memory.hpp>
#include <bc/Memory.hpp>
#include <storm/String.hpp>
#include <new>
ClientConnection* g_clientConnection;
@ -59,19 +58,16 @@ ClientServices* ClientServices::GetInstance() {
return ClientServices::s_instance;
}
auto m = SMemAlloc(sizeof(ClientServices), __FILE__, __LINE__, 0x0);
auto instance = new (m) ClientServices();
ClientServices::s_instance = instance;
ClientServices::s_instance = NEW(ClientServices);
return ClientServices::s_instance;
}
void ClientServices::SetMessageHandler(NETMESSAGE msgId, MESSAGE_HANDLER handler, void* param) {
STORM_ASSERT(ClientServices::s_currentConnection);
STORM_ASSERT(handler);
s_currentConnection->SetMessageHandler(msgId, handler, param);
}
void ClientServices::GetRealmList() {
// TODO
}
@ -116,13 +112,9 @@ const REALM_INFO* ClientServices::GetSelectedRealm() {
void ClientServices::Initialize() {
if (!g_clientConnection) {
auto adapterMem = SMemAlloc(sizeof(ClientRealmResponseAdapter), __FILE__, __LINE__, 0x0);
auto clientRealmResponse = new (adapterMem) ClientRealmResponseAdapter();
ClientServices::s_clientRealmResponse = clientRealmResponse;
ClientServices::s_clientRealmResponse = NEW(ClientRealmResponseAdapter);
auto connectionMem = SMemAlloc(sizeof(ClientConnection), __FILE__, __LINE__, 0x0);
auto clientConnection = new (connectionMem) ClientConnection(ClientServices::s_clientRealmResponse);
g_clientConnection = clientConnection;
g_clientConnection = NEW(ClientConnection, ClientServices::s_clientRealmResponse);
}
ClientServices::s_currentConnection = g_clientConnection;
@ -153,8 +145,7 @@ void ClientServices::Logon(const char* accountName, const char* password) {
if (useBattlenet) {
// TODO
} else {
auto loginMem = SMemAlloc(sizeof(GruntLogin), __FILE__, __LINE__, 0x0);
loginObj = new (loginMem) GruntLogin();
loginObj = NEW(GruntLogin);
}
ClientServices::s_loginObj = loginObj;