mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-18 05:31:07 +03:00
feat(client): add ClientGameTimeTickHandler
This commit is contained in:
parent
721ee527eb
commit
efd3f8e8f4
@ -20,6 +20,7 @@
|
||||
#include "ui/FrameXML.hpp"
|
||||
#include "ui/Game.hpp"
|
||||
#include "util/Random.hpp"
|
||||
#include "util/Time.hpp"
|
||||
#include "world/World.hpp"
|
||||
#include <bc/Debug.hpp>
|
||||
#include <common/Prop.hpp>
|
||||
@ -30,6 +31,8 @@ CVar* Client::g_accountNameVar;
|
||||
CVar* Client::g_accountListVar;
|
||||
HEVENTCONTEXT Client::g_clientEventContext;
|
||||
|
||||
CGameTime g_clientGameTime;
|
||||
|
||||
static CVar* s_desktopGammaCvar;
|
||||
static CVar* s_gammaCvar;
|
||||
static CVar* s_textureCacheSizeCvar;
|
||||
@ -70,10 +73,18 @@ void BaseInitializeGlobal() {
|
||||
PropInitialize();
|
||||
}
|
||||
|
||||
int32_t ClientGameTimeTickHandler(const void* data, void* param) {
|
||||
STORM_ASSERT(data);
|
||||
|
||||
g_clientGameTime.GameTimeUpdate(static_cast<const EVENT_DATA_IDLE*>(data)->elapsedSec);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int32_t ClientIdle(const void* data, void* param) {
|
||||
// TODO
|
||||
// ClientGameTimeTickHandler(data, param);
|
||||
// Player_C_ZoneUpdateHandler(data, param);
|
||||
ClientGameTimeTickHandler(data, nullptr);
|
||||
|
||||
// TODO Player_C_ZoneUpdateHandler(data, nullptr);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
#include <tempest/Vector.hpp>
|
||||
|
||||
class CVar;
|
||||
class CGameTime;
|
||||
|
||||
namespace Client {
|
||||
extern CVar* g_accountNameVar;
|
||||
@ -12,6 +13,8 @@ namespace Client {
|
||||
extern HEVENTCONTEXT g_clientEventContext;
|
||||
}
|
||||
|
||||
extern CGameTime g_clientGameTime;
|
||||
|
||||
void ClientInitializeGame(uint32_t mapId, C3Vector position);
|
||||
|
||||
void ClientPostClose(int32_t a1);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user