mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-07-24 17:41:13 +03:00
Compare commits
4 Commits
16841d9ce8
...
41988c45e1
Author | SHA1 | Date | |
---|---|---|---|
![]() |
41988c45e1 | ||
![]() |
30a78b00b5 | ||
![]() |
ccc1fd1d69 | ||
![]() |
f1d1dad08b |
@ -1 +1 @@
|
||||
Subproject commit 438c900ff50b2dff0d8f7d9ff711051a3c83cbac
|
||||
Subproject commit 422bc11d30c6761343877677539dc4704ed8e05d
|
@ -1 +1 @@
|
||||
Subproject commit 98bc6a59bcf1016b9f85239e6918e595ca0331c0
|
||||
Subproject commit 4cd18ccfd0b507fb686e1260b5d4c00a17c9d785
|
@ -6,6 +6,7 @@
|
||||
#include "console/Client.hpp"
|
||||
#include "console/Device.hpp"
|
||||
#include "console/Screen.hpp"
|
||||
#include "console/Command.hpp"
|
||||
#include "db/Db.hpp"
|
||||
#include "glue/CGlueMgr.hpp"
|
||||
#include "gx/Screen.hpp"
|
||||
@ -23,7 +24,15 @@
|
||||
#include <bc/os/Path.hpp>
|
||||
#include <bc/file/File.hpp>
|
||||
|
||||
|
||||
CVar* Client::g_accountNameVar;
|
||||
CVar* Client::g_accountListVar;
|
||||
CVar* Client::g_accountUsesTokenVar;
|
||||
CVar* Client::g_movieVar;
|
||||
CVar* Client::g_expansionMovieVar;
|
||||
CVar* Client::g_movieSubtitleVar;
|
||||
|
||||
|
||||
HEVENTCONTEXT Client::g_clientEventContext;
|
||||
char Client::g_currentLocaleName[5] = {};
|
||||
|
||||
@ -36,6 +45,16 @@ static char* s_localeArray[12] = {
|
||||
};
|
||||
|
||||
|
||||
int32_t CCommand_ReloadUI(const char*, const char*) {
|
||||
// TODO:
|
||||
return 1;
|
||||
}
|
||||
|
||||
int32_t CCommand_Perf(const char*, const char*) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
void AsyncFileInitialize() {
|
||||
// TODO
|
||||
AsyncFileReadInitialize(0, 100);
|
||||
@ -47,18 +66,20 @@ void BaseInitializeGlobal() {
|
||||
|
||||
void ClientMiscInitialize() {
|
||||
// TODO
|
||||
}
|
||||
|
||||
Client::g_accountListVar = CVar::Register(
|
||||
"accountList",
|
||||
"List of wow accounts for saved Blizzard account",
|
||||
0,
|
||||
"",
|
||||
nullptr,
|
||||
4,
|
||||
false,
|
||||
nullptr,
|
||||
false
|
||||
);
|
||||
void ClientRegisterConsoleCommands() {
|
||||
ConsoleCommandRegister("reloadUI", &CCommand_ReloadUI, CATEGORY::GRAPHICS, nullptr);
|
||||
ConsoleCommandRegister("perf", &CCommand_Perf, CATEGORY::DEBUG, nullptr);
|
||||
|
||||
const auto game = CATEGORY::GAME;
|
||||
|
||||
Client::g_accountNameVar = CVar::Register("accountName", "Saved account name", 64, "", nullptr, game);
|
||||
Client::g_accountListVar = CVar::Register("accountList", "List of wow accounts for saved Blizzard account", 0, "", nullptr, game);
|
||||
Client::g_accountUsesTokenVar = CVar::Register("g_accountUsesToken", "Saved whether uses authenticator", 0, "0", nullptr, game);
|
||||
Client::g_movieVar = CVar::Register("movie", "Show movie on startup", 0, "1", nullptr, game);
|
||||
Client::g_expansionMovieVar = CVar::Register("expansionMovie", "Show expansion movie on startup", 0, "1", nullptr, game);
|
||||
Client::g_movieSubtitleVar = CVar::Register("movieSubtitle", "Show movie subtitles", 0, "0", nullptr, game);
|
||||
|
||||
// TODO
|
||||
}
|
||||
@ -559,7 +580,7 @@ void WowClientInit() {
|
||||
|
||||
ClientMiscInitialize();
|
||||
|
||||
// sub_401B60();
|
||||
ClientRegisterConsoleCommands();
|
||||
|
||||
ClientDBInitialize();
|
||||
|
||||
@ -617,27 +638,22 @@ void WowClientInit() {
|
||||
// sub_421630();
|
||||
// }
|
||||
|
||||
// TODO
|
||||
// if (byte_B2F9E1 != 1) {
|
||||
// if ((g_playIntroMovie + 48) == 1) {
|
||||
// CVar::Set(g_playIntroMovie, "0", 1, 0, 0, 1);
|
||||
// CGlueMgr::SetScreen("movie");
|
||||
// } else {
|
||||
// CGlueMgr::SetScreen("login");
|
||||
// }
|
||||
// } else {
|
||||
// if ((dword_B2F980 + 48) == 1) {
|
||||
// CVar::Set(dword_B2F980, "0", 1, 0, 0, 1);
|
||||
// CVar::Set(g_playIntroMovie, "0", 1, 0, 0, 1);
|
||||
// CGlueMgr::SetScreen("movie");
|
||||
// } else {
|
||||
// CGlueMgr::SetScreen("login");
|
||||
// }
|
||||
// }
|
||||
|
||||
// TODO
|
||||
// - temporary until above logic is implemented
|
||||
CGlueMgr::SetScreen("login");
|
||||
if (s_expansionLevel != 1) {
|
||||
if (Client::g_movieVar->GetInt()) {
|
||||
Client::g_movieVar->Set("0", true, false, false, true);
|
||||
CGlueMgr::SetScreen("movie");
|
||||
} else {
|
||||
CGlueMgr::SetScreen("login");
|
||||
}
|
||||
} else {
|
||||
if (Client::g_expansionMovieVar->GetInt()) {
|
||||
Client::g_expansionMovieVar->Set("0", true, false, false, true);
|
||||
Client::g_movieVar->Set("0", true, false, false, true);
|
||||
CGlueMgr::SetScreen("movie");
|
||||
} else {
|
||||
CGlueMgr::SetScreen("login");
|
||||
}
|
||||
}
|
||||
|
||||
// TODO
|
||||
// CGlueMgr::m_pendingTimerAlert = dword_B2F9D8;
|
||||
|
@ -7,7 +7,12 @@
|
||||
class CVar;
|
||||
|
||||
namespace Client {
|
||||
extern CVar* g_accountNameVar;
|
||||
extern CVar* g_accountListVar;
|
||||
extern CVar* g_accountUsesTokenVar;
|
||||
extern CVar* g_movieVar;
|
||||
extern CVar* g_expansionMovieVar;
|
||||
extern CVar* g_movieSubtitleVar;
|
||||
extern HEVENTCONTEXT g_clientEventContext;
|
||||
extern char g_currentLocaleName[5];
|
||||
}
|
||||
|
@ -43,6 +43,8 @@ unsigned char InterfaceKey[256] = {
|
||||
int32_t CGlueMgr::m_acceptedEULA = 1; // TODO
|
||||
int32_t CGlueMgr::m_acceptedTerminationWithoutNotice;
|
||||
int32_t CGlueMgr::m_acceptedTOS = 1; // TODO
|
||||
int32_t CGlueMgr::m_processServerAlert = 1;
|
||||
int32_t CGlueMgr::m_pendingTimerAlert;
|
||||
int32_t CGlueMgr::m_accountMsgAvailable;
|
||||
char CGlueMgr::m_accountName[1280];
|
||||
float CGlueMgr::m_aspect;
|
||||
@ -199,7 +201,30 @@ int32_t CGlueMgr::HandleDisplaySizeChanged(const CSizeEvent& event) {
|
||||
|
||||
// TODO a1: const EVENT_DATA_IDLE*
|
||||
int32_t CGlueMgr::Idle(const void* a1, void* a2) {
|
||||
// TODO
|
||||
// TODO:
|
||||
// if (gxDevice->IsStereoEnabled) {
|
||||
// CGlueMgr::SetUIDepth(gxDevice->StereoGetConvergence);
|
||||
// }
|
||||
|
||||
auto loginConnection = ClientServices::LoginConnection();
|
||||
if (loginConnection) {
|
||||
// Virtual call (loginConnection + 184) leads to nullsub
|
||||
// Checked by tracing in debugger
|
||||
}
|
||||
|
||||
if (CGlueMgr::m_processServerAlert) {
|
||||
// TODO:
|
||||
// v2 = SStrLen("SERVERALERT:");
|
||||
// FrameScript_SignalEvent(0x15u, "%s", &CGlueMgr::m_serverAlert[(_DWORD)&v2[CGlueMgr::m_serverAlert[0] != -17 ? 0 : 3]]);
|
||||
CGlueMgr::m_processServerAlert = 0;
|
||||
}
|
||||
|
||||
if (CGlueMgr::m_pendingTimerAlert) {
|
||||
FrameScript_SignalEvent(0x21u, "%d", CGlueMgr::m_pendingTimerAlert);
|
||||
CGlueMgr::m_pendingTimerAlert = 0;
|
||||
}
|
||||
|
||||
// TODO: CKBPage::UpdateLoadingQueue();
|
||||
|
||||
if (CGlueMgr::m_idleState == IDLE_NONE) {
|
||||
if (CGlueMgr::m_reload) {
|
||||
@ -213,18 +238,17 @@ int32_t CGlueMgr::Idle(const void* a1, void* a2) {
|
||||
CGlueMgr::m_reload = 0;
|
||||
}
|
||||
|
||||
// TODO
|
||||
// if (CGlueMgr::m_accountMsgAvailable) {
|
||||
// FrameScript_SignalEvent(0x22u, 0);
|
||||
// CGlueMgr::m_accountMsgAvailable = 0;
|
||||
// }
|
||||
if (CGlueMgr::m_accountMsgAvailable) {
|
||||
FrameScript_SignalEvent(0x22u, 0);
|
||||
CGlueMgr::m_accountMsgAvailable = 0;
|
||||
}
|
||||
|
||||
// TODO sub_4D84A0();
|
||||
// TODO CGlueMgr::HandleBattlenetDisconnect();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
// TODO
|
||||
// TODO: LOOP { ConsoleWrite(GRUNT DEBUG MESSAGE) }
|
||||
|
||||
WOWCS_OPS op;
|
||||
const char* msg;
|
||||
|
@ -32,6 +32,8 @@ class CGlueMgr {
|
||||
static int32_t m_acceptedEULA;
|
||||
static int32_t m_acceptedTerminationWithoutNotice;
|
||||
static int32_t m_acceptedTOS;
|
||||
static int32_t m_processServerAlert;
|
||||
static int32_t m_pendingTimerAlert;
|
||||
static int32_t m_accountMsgAvailable;
|
||||
static char m_accountName[];
|
||||
static float m_aspect;
|
||||
|
@ -1,3 +1,50 @@
|
||||
#include "gx/CGxFormat.hpp"
|
||||
|
||||
const char* CGxFormat::formatToColorBitsString[Formats_Last] = { "16", "24", "24", "30", "16", "24", "24", "32" };
|
||||
|
||||
CGxFormat::CGxFormat() {
|
||||
this->size.x = 0;
|
||||
this->size.y = 0;
|
||||
this->pos.x = 0;
|
||||
this->pos.y = 0;
|
||||
this->sampleQuality = 0.0;
|
||||
this->maximize = 0;
|
||||
this->stereoEnabled = false;
|
||||
this->sampleCount = 1;
|
||||
this->aspect = 1;
|
||||
this->unk1 = -1;
|
||||
this->unk2 = -1;
|
||||
this->unk3 = -1;
|
||||
this->unk4 = -1;
|
||||
this->unk5 = -1;
|
||||
this->unk6 = -1;
|
||||
}
|
||||
|
||||
CGxFormat::CGxFormat(bool p_window, const C2iVector& p_size, Format p_colorFormat, Format p_depthFormat, uint32_t p_refreshRate, uint32_t p_vsync, bool p_hwTnl, bool p_fixLag, bool p_hwCursor, bool p_aspect, bool p_maximize) {
|
||||
this->size.x = 0;
|
||||
this->size.y = 0;
|
||||
this->pos.x = 0;
|
||||
this->pos.y = 0;
|
||||
this->hwTnL = p_hwTnl;
|
||||
this->hwCursor = p_hwCursor;
|
||||
this->fixLag = p_fixLag;
|
||||
this->window = p_window;
|
||||
this->depthFormat = p_depthFormat;
|
||||
this->size.x = p_size.x;
|
||||
this->size.y = p_size.y;
|
||||
this->sampleQuality = 0.0;
|
||||
this->colorFormat = p_colorFormat;
|
||||
this->refreshRate = p_refreshRate;
|
||||
this->vsync = p_vsync;
|
||||
this->aspect = p_aspect;
|
||||
this->stereoEnabled = 0;
|
||||
this->maximize = p_maximize;
|
||||
this->backbuffers = 1;
|
||||
this->sampleCount = 1;
|
||||
this->unk1 = -1;
|
||||
this->unk2 = -1;
|
||||
this->unk3 = -1;
|
||||
this->unk4 = -1;
|
||||
this->unk5 = -1;
|
||||
this->unk6 = -1;
|
||||
}
|
||||
|
@ -19,20 +19,34 @@ class CGxFormat {
|
||||
Formats_Last = 8
|
||||
};
|
||||
|
||||
CGxFormat();
|
||||
CGxFormat(bool p_window, const C2iVector& p_size, Format p_colorFormat, Format p_depthFormat, uint32_t p_refreshRate, uint32_t p_vsync, bool p_hwTnl, bool p_fixLag, bool p_hwCursor, bool p_aspect, bool p_maximize);
|
||||
|
||||
static const char* formatToColorBitsString[Formats_Last];
|
||||
|
||||
// Member variables
|
||||
uint32_t apiSpecificModeID;
|
||||
bool hwTnL;
|
||||
bool hwCursor;
|
||||
bool fixLag;
|
||||
int8_t window;
|
||||
int8_t aspect;
|
||||
int32_t maximize;
|
||||
Format depthFormat;
|
||||
C2iVector size;
|
||||
uint32_t backbuffers;
|
||||
uint32_t sampleCount;
|
||||
float sampleQuality;
|
||||
Format colorFormat;
|
||||
uint32_t refreshRate;
|
||||
uint32_t vsync;
|
||||
bool stereoEnabled;
|
||||
uint32_t unk1;
|
||||
uint32_t unk2;
|
||||
uint32_t unk3;
|
||||
uint32_t unk4;
|
||||
uint32_t unk5;
|
||||
uint32_t unk6;
|
||||
C2iVector pos;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user