mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-18 05:31:07 +03:00
Compare commits
4 Commits
ed22610ba2
...
6749d0658e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6749d0658e | ||
|
|
d859670f7b | ||
|
|
05d949523c | ||
|
|
4a102c6ace |
@ -47,6 +47,7 @@ float CGlueMgr::m_aspect;
|
||||
bool CGlueMgr::m_authenticated;
|
||||
const CharacterSelectionDisplay* CGlueMgr::m_characterInfo;
|
||||
int32_t CGlueMgr::m_clientKickReason;
|
||||
int32_t CGlueMgr::m_contestAccepted = 1; // TODO
|
||||
char CGlueMgr::m_currentScreen[64];
|
||||
EffectDeath* CGlueMgr::m_deathEffect;
|
||||
int32_t CGlueMgr::m_disconnectPending;
|
||||
|
||||
@ -41,6 +41,7 @@ class CGlueMgr {
|
||||
static bool m_authenticated;
|
||||
static const CharacterSelectionDisplay* m_characterInfo;
|
||||
static int32_t m_clientKickReason;
|
||||
static int32_t m_contestAccepted;
|
||||
static char m_currentScreen[];
|
||||
static EffectDeath* m_deathEffect;
|
||||
static int32_t m_disconnectPending;
|
||||
|
||||
@ -228,7 +228,14 @@ int32_t Script_ShowContestNotice(lua_State* L) {
|
||||
}
|
||||
|
||||
int32_t Script_ContestAccepted(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED(0);
|
||||
if (CGlueMgr::m_contestAccepted) {
|
||||
lua_pushnumber(L, 1.0);
|
||||
}
|
||||
else {
|
||||
lua_pushnil(L);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int32_t Script_AcceptContest(lua_State* L) {
|
||||
|
||||
@ -1,5 +1,9 @@
|
||||
#include "ui/game/CGWorldFrame.hpp"
|
||||
#include "gx/Shader.hpp"
|
||||
#include "gx/Transform.hpp"
|
||||
#include "ui/game/PlayerName.hpp"
|
||||
#include <storm/Memory.hpp>
|
||||
#include <tempest/Matrix.hpp>
|
||||
|
||||
CSimpleFrame* CGWorldFrame::Create(CSimpleFrame* parent) {
|
||||
// TODO use CDataAllocator
|
||||
@ -7,6 +11,27 @@ CSimpleFrame* CGWorldFrame::Create(CSimpleFrame* parent) {
|
||||
return STORM_NEW(CGWorldFrame)(parent);
|
||||
}
|
||||
|
||||
void CGWorldFrame::RenderWorld(void* param) {
|
||||
auto frame = reinterpret_cast<CGWorldFrame*>(param);
|
||||
|
||||
C44Matrix savedProj;
|
||||
GxXformProjection(savedProj);
|
||||
|
||||
C44Matrix savedView;
|
||||
GxXformView(savedView);
|
||||
|
||||
frame->OnWorldUpdate();
|
||||
PlayerNameUpdateWorldText();
|
||||
|
||||
frame->OnWorldRender();
|
||||
PlayerNameRenderWorldText();
|
||||
|
||||
GxXformSetProjection(savedProj);
|
||||
GxXformSetView(savedView);
|
||||
|
||||
CShaderEffect::UpdateProjMatrix();
|
||||
}
|
||||
|
||||
CGWorldFrame::CGWorldFrame(CSimpleFrame* parent) : CSimpleFrame(parent) {
|
||||
// TODO
|
||||
|
||||
@ -14,9 +39,27 @@ CGWorldFrame::CGWorldFrame(CSimpleFrame* parent) : CSimpleFrame(parent) {
|
||||
|
||||
// TODO
|
||||
|
||||
this->SetFrameStrata(FRAME_STRATA_WORLD);
|
||||
|
||||
this->EnableEvent(SIMPLE_EVENT_KEY, -1);
|
||||
this->EnableEvent(SIMPLE_EVENT_MOUSE, -1);
|
||||
this->EnableEvent(SIMPLE_EVENT_MOUSEWHEEL, -1);
|
||||
|
||||
// TODO
|
||||
}
|
||||
|
||||
void CGWorldFrame::OnFrameRender(CRenderBatch* batch, uint32_t layer) {
|
||||
this->CSimpleFrame::OnFrameRender(batch, layer);
|
||||
|
||||
if (layer == DRAWLAYER_BACKGROUND) {
|
||||
batch->QueueCallback(&CGWorldFrame::RenderWorld, this);
|
||||
}
|
||||
}
|
||||
|
||||
void CGWorldFrame::OnWorldRender() {
|
||||
// TODO
|
||||
}
|
||||
|
||||
void CGWorldFrame::OnWorldUpdate() {
|
||||
// TODO
|
||||
}
|
||||
|
||||
@ -11,9 +11,15 @@ class CGWorldFrame : public CSimpleFrame {
|
||||
|
||||
// Static functions
|
||||
static CSimpleFrame* Create(CSimpleFrame* parent);
|
||||
static void RenderWorld(void* param);
|
||||
|
||||
// Virtual member functions
|
||||
virtual void OnFrameRender(CRenderBatch* batch, uint32_t layer);
|
||||
|
||||
// Member functions
|
||||
CGWorldFrame(CSimpleFrame* parent);
|
||||
void OnWorldRender();
|
||||
void OnWorldUpdate();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
9
src/ui/game/PlayerName.cpp
Normal file
9
src/ui/game/PlayerName.cpp
Normal file
@ -0,0 +1,9 @@
|
||||
#include "ui/game/PlayerName.hpp"
|
||||
|
||||
void PlayerNameRenderWorldText() {
|
||||
// TODO
|
||||
}
|
||||
|
||||
void PlayerNameUpdateWorldText() {
|
||||
// TODO
|
||||
}
|
||||
8
src/ui/game/PlayerName.hpp
Normal file
8
src/ui/game/PlayerName.hpp
Normal file
@ -0,0 +1,8 @@
|
||||
#ifndef UI_GAME_PLAYER_NAME_HPP
|
||||
#define UI_GAME_PLAYER_NAME_HPP
|
||||
|
||||
void PlayerNameRenderWorldText();
|
||||
|
||||
void PlayerNameUpdateWorldText();
|
||||
|
||||
#endif
|
||||
Loading…
Reference in New Issue
Block a user