mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-18 05:31:07 +03:00
Compare commits
4 Commits
fa1e82f24c
...
65b2f6d1a3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
65b2f6d1a3 | ||
|
|
817cec99fe | ||
|
|
6675586a29 | ||
|
|
4a102c6ace |
@ -47,6 +47,7 @@ float CGlueMgr::m_aspect;
|
|||||||
bool CGlueMgr::m_authenticated;
|
bool CGlueMgr::m_authenticated;
|
||||||
const CharacterSelectionDisplay* CGlueMgr::m_characterInfo;
|
const CharacterSelectionDisplay* CGlueMgr::m_characterInfo;
|
||||||
int32_t CGlueMgr::m_clientKickReason;
|
int32_t CGlueMgr::m_clientKickReason;
|
||||||
|
int32_t CGlueMgr::m_contestAccepted = 1; // TODO
|
||||||
char CGlueMgr::m_currentScreen[64];
|
char CGlueMgr::m_currentScreen[64];
|
||||||
EffectDeath* CGlueMgr::m_deathEffect;
|
EffectDeath* CGlueMgr::m_deathEffect;
|
||||||
int32_t CGlueMgr::m_disconnectPending;
|
int32_t CGlueMgr::m_disconnectPending;
|
||||||
|
|||||||
@ -41,6 +41,7 @@ class CGlueMgr {
|
|||||||
static bool m_authenticated;
|
static bool m_authenticated;
|
||||||
static const CharacterSelectionDisplay* m_characterInfo;
|
static const CharacterSelectionDisplay* m_characterInfo;
|
||||||
static int32_t m_clientKickReason;
|
static int32_t m_clientKickReason;
|
||||||
|
static int32_t m_contestAccepted;
|
||||||
static char m_currentScreen[];
|
static char m_currentScreen[];
|
||||||
static EffectDeath* m_deathEffect;
|
static EffectDeath* m_deathEffect;
|
||||||
static int32_t m_disconnectPending;
|
static int32_t m_disconnectPending;
|
||||||
|
|||||||
@ -228,7 +228,14 @@ int32_t Script_ShowContestNotice(lua_State* L) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t Script_ContestAccepted(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) {
|
int32_t Script_AcceptContest(lua_State* L) {
|
||||||
|
|||||||
@ -80,6 +80,10 @@ void CGCamera::SetupWorldProjection(const CRect& projRect) {
|
|||||||
this->SetGxProjectionAndView(projRect);
|
this->SetGxProjectionAndView(projRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
C3Vector CGCamera::Target() const {
|
||||||
|
return this->m_position + this->Forward();
|
||||||
|
}
|
||||||
|
|
||||||
C3Vector CGCamera::Up() const {
|
C3Vector CGCamera::Up() const {
|
||||||
if (this->m_relativeTo) {
|
if (this->m_relativeTo) {
|
||||||
return this->CSimpleCamera::Up() * this->ParentToWorld();
|
return this->CSimpleCamera::Up() * this->ParentToWorld();
|
||||||
|
|||||||
@ -27,6 +27,7 @@ class CGCamera : public CSimpleCamera {
|
|||||||
CGCamera();
|
CGCamera();
|
||||||
C33Matrix ParentToWorld() const;
|
C33Matrix ParentToWorld() const;
|
||||||
void SetupWorldProjection(const CRect& projRect);
|
void SetupWorldProjection(const CRect& projRect);
|
||||||
|
C3Vector Target() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Private member variables
|
// Private member variables
|
||||||
|
|||||||
@ -84,6 +84,10 @@ C3Vector CSimpleCamera::Right() const {
|
|||||||
return { this->m_facing.b0, this->m_facing.b1, this->m_facing.b2 };
|
return { this->m_facing.b0, this->m_facing.b1, this->m_facing.b2 };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const C3Vector& CSimpleCamera::Position() const {
|
||||||
|
return this->m_position;
|
||||||
|
}
|
||||||
|
|
||||||
void CSimpleCamera::SetFacing(const C3Vector& forward) {
|
void CSimpleCamera::SetFacing(const C3Vector& forward) {
|
||||||
BuildBillboardMatrix(forward, this->m_facing);
|
BuildBillboardMatrix(forward, this->m_facing);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,6 +18,7 @@ class CSimpleCamera {
|
|||||||
// Public member functions
|
// Public member functions
|
||||||
CSimpleCamera(float nearZ, float farZ, float fov);
|
CSimpleCamera(float nearZ, float farZ, float fov);
|
||||||
CM2Scene* GetScene();
|
CM2Scene* GetScene();
|
||||||
|
const C3Vector& Position() const;
|
||||||
void SetFacing(const C3Vector& forward);
|
void SetFacing(const C3Vector& forward);
|
||||||
void SetFacing(const C3Vector& forward, const C3Vector& up);
|
void SetFacing(const C3Vector& forward, const C3Vector& up);
|
||||||
void SetFacing(float yaw, float pitch, float roll);
|
void SetFacing(float yaw, float pitch, float roll);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user