mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 16:22:45 +03:00
feat(glue): stub handling IDLE_ENTER_WORLD
This commit is contained in:
parent
1c29b41243
commit
62e1345df4
@ -48,6 +48,10 @@ void ClientMiscInitialize() {
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ClientInitializeGame(uint32_t mapId, C3Vector position) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
void ClientPostClose(int32_t a1) {
|
void ClientPostClose(int32_t a1) {
|
||||||
// TODO s_finalDialog = a1;
|
// TODO s_finalDialog = a1;
|
||||||
EventPostCloseEx(nullptr);
|
EventPostCloseEx(nullptr);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
#define CLIENT_CLIENT_HPP
|
#define CLIENT_CLIENT_HPP
|
||||||
|
|
||||||
#include "event/Event.hpp"
|
#include "event/Event.hpp"
|
||||||
#include <cstdint>
|
#include <tempest/Vector.hpp>
|
||||||
|
|
||||||
class CVar;
|
class CVar;
|
||||||
|
|
||||||
@ -11,6 +11,8 @@ namespace Client {
|
|||||||
extern HEVENTCONTEXT g_clientEventContext;
|
extern HEVENTCONTEXT g_clientEventContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ClientInitializeGame(uint32_t mapId, C3Vector position);
|
||||||
|
|
||||||
void ClientPostClose(int32_t a1);
|
void ClientPostClose(int32_t a1);
|
||||||
|
|
||||||
void CommonMain();
|
void CommonMain();
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
#include "glue/CGlueMgr.hpp"
|
#include "glue/CGlueMgr.hpp"
|
||||||
#include "glue/CRealmList.hpp"
|
|
||||||
#include "client/Client.hpp"
|
#include "client/Client.hpp"
|
||||||
#include "client/ClientServices.hpp"
|
#include "client/ClientServices.hpp"
|
||||||
|
#include "glue/CRealmList.hpp"
|
||||||
|
#include "glue/LoadingScreen.hpp"
|
||||||
#include "gx/Coordinate.hpp"
|
#include "gx/Coordinate.hpp"
|
||||||
#include "gx/Device.hpp"
|
#include "gx/Device.hpp"
|
||||||
#include "math/Utils.hpp"
|
#include "math/Utils.hpp"
|
||||||
@ -241,6 +242,11 @@ int32_t CGlueMgr::Idle(const void* a1, void* a2) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case IDLE_ENTER_WORLD: {
|
||||||
|
CGlueMgr::PollEnterWorld();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
// TODO other idle states
|
// TODO other idle states
|
||||||
|
|
||||||
default:
|
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() {
|
void CGlueMgr::PollLoginServerLogin() {
|
||||||
if (CGlueMgr::m_loginState != LOGIN_STATE_PIN_WAIT) {
|
if (CGlueMgr::m_loginState != LOGIN_STATE_PIN_WAIT) {
|
||||||
CGlueMgr::DisplayLoginStatus();
|
CGlueMgr::DisplayLoginStatus();
|
||||||
@ -655,7 +684,7 @@ void CGlueMgr::StatusDialogClick() {
|
|||||||
case IDLE_4:
|
case IDLE_4:
|
||||||
case IDLE_5:
|
case IDLE_5:
|
||||||
case IDLE_6:
|
case IDLE_6:
|
||||||
case IDLE_10: {
|
case IDLE_ENTER_WORLD: {
|
||||||
ClientServices::Connection()->Cancel(2);
|
ClientServices::Connection()->Cancel(2);
|
||||||
|
|
||||||
CGlueMgr::m_showedDisconnect = 0;
|
CGlueMgr::m_showedDisconnect = 0;
|
||||||
|
|||||||
@ -21,7 +21,7 @@ class CGlueMgr {
|
|||||||
IDLE_7 = 7,
|
IDLE_7 = 7,
|
||||||
IDLE_8 = 8,
|
IDLE_8 = 8,
|
||||||
IDLE_9 = 9,
|
IDLE_9 = 9,
|
||||||
IDLE_10 = 10,
|
IDLE_ENTER_WORLD = 10,
|
||||||
IDLE_11 = 11,
|
IDLE_11 = 11,
|
||||||
IDLE_12 = 12,
|
IDLE_12 = 12,
|
||||||
IDLE_13 = 13
|
IDLE_13 = 13
|
||||||
@ -64,6 +64,7 @@ class CGlueMgr {
|
|||||||
static void LoginServerLogin(const char* accountName, const char* password);
|
static void LoginServerLogin(const char* accountName, const char* password);
|
||||||
static void QuitGame();
|
static void QuitGame();
|
||||||
static void PollAccountLogin(int32_t errorCode, const char* msg, int32_t complete, int32_t result, WOWCS_OPS op);
|
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 PollLoginServerLogin();
|
||||||
static void Resume();
|
static void Resume();
|
||||||
static void SetCurrentAccount(const char* accountName);
|
static void SetCurrentAccount(const char* accountName);
|
||||||
|
|||||||
6
src/glue/LoadingScreen.cpp
Normal file
6
src/glue/LoadingScreen.cpp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#include "glue/LoadingScreen.hpp"
|
||||||
|
|
||||||
|
bool LoadingScreenDrawing() {
|
||||||
|
// TODO
|
||||||
|
return false;
|
||||||
|
}
|
||||||
6
src/glue/LoadingScreen.hpp
Normal file
6
src/glue/LoadingScreen.hpp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#ifndef GLUE_LOADING_SCREEN_HPP
|
||||||
|
#define GLUE_LOADING_SCREEN_HPP
|
||||||
|
|
||||||
|
bool LoadingScreenDrawing();
|
||||||
|
|
||||||
|
#endif
|
||||||
Loading…
Reference in New Issue
Block a user