feat(glue): stub handling IDLE_ENTER_WORLD

This commit is contained in:
fallenoak committed 2025-09-22 14:13:27 -07:00
1 parent 1c29b41243
commit 62e1345df4
6 files changed
+52 -4

No files matched your search

+4
View File
@@ -48,6 +48,10 @@ void ClientMiscInitialize() {
// TODO
}
void ClientInitializeGame(uint32_t mapId, C3Vector position) {
// TODO
}
void ClientPostClose(int32_t a1) {
// TODO s_finalDialog = a1;
EventPostCloseEx(nullptr);
+3 -1
View File
@@ -2,7 +2,7 @@
#define CLIENT_CLIENT_HPP
#include "event/Event.hpp"
#include <cstdint>
#include <tempest/Vector.hpp>
class CVar;
@@ -11,6 +11,8 @@ namespace Client {
extern HEVENTCONTEXT g_clientEventContext;
}
void ClientInitializeGame(uint32_t mapId, C3Vector position);
void ClientPostClose(int32_t a1);
void CommonMain();
+31 -2
View File
@@ -1,7 +1,8 @@
#include "glue/CGlueMgr.hpp"
#include "glue/CRealmList.hpp"
#include "client/Client.hpp"
#include "client/ClientServices.hpp"
#include "glue/CRealmList.hpp"
#include "glue/LoadingScreen.hpp"
#include "gx/Coordinate.hpp"
#include "gx/Device.hpp"
#include "math/Utils.hpp"
@@ -241,6 +242,11 @@ int32_t CGlueMgr::Idle(const void* a1, void* a2) {
break;
}
case IDLE_ENTER_WORLD: {
CGlueMgr::PollEnterWorld();
break;
}
// TODO other idle states
default:
@@ -407,6 +413,29 @@ void CGlueMgr::PollAccountLogin(int32_t errorCode, const char* msg, int32_t comp
}
}
void CGlueMgr::PollEnterWorld() {
if (!LoadingScreenDrawing()) {
return;
}
if (CGlueMgr::m_suspended) {
CGlueMgr::m_idleState = IDLE_NONE;
CGlueMgr::m_showedDisconnect = 0;
// TODO SI Logic
// TODO ClientConnection::CharacterLogin()
return;
}
// TODO Get map ID and position from character info
uint32_t mapId = 0;
C3Vector position = { 0.0f, 0.0f, 0.0f };
CGlueMgr::Suspend();
ClientInitializeGame(mapId, position);
}
void CGlueMgr::PollLoginServerLogin() {
if (CGlueMgr::m_loginState != LOGIN_STATE_PIN_WAIT) {
CGlueMgr::DisplayLoginStatus();
@@ -655,7 +684,7 @@ void CGlueMgr::StatusDialogClick() {
case IDLE_4:
case IDLE_5:
case IDLE_6:
case IDLE_10: {
case IDLE_ENTER_WORLD: {
ClientServices::Connection()->Cancel(2);
CGlueMgr::m_showedDisconnect = 0;
+2 -1
View File
@@ -21,7 +21,7 @@ class CGlueMgr {
IDLE_7 = 7,
IDLE_8 = 8,
IDLE_9 = 9,
IDLE_10 = 10,
IDLE_ENTER_WORLD = 10,
IDLE_11 = 11,
IDLE_12 = 12,
IDLE_13 = 13
@@ -64,6 +64,7 @@ class CGlueMgr {
static void LoginServerLogin(const char* accountName, const char* password);
static void QuitGame();
static void PollAccountLogin(int32_t errorCode, const char* msg, int32_t complete, int32_t result, WOWCS_OPS op);
static void PollEnterWorld();
static void PollLoginServerLogin();
static void Resume();
static void SetCurrentAccount(const char* accountName);
+6
View File
@@ -0,0 +1,6 @@
#include "glue/LoadingScreen.hpp"
bool LoadingScreenDrawing() {
// TODO
return false;
}
+6
View File
@@ -0,0 +1,6 @@
#ifndef GLUE_LOADING_SCREEN_HPP
#define GLUE_LOADING_SCREEN_HPP
bool LoadingScreenDrawing();
#endif