mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-18 05:31:07 +03:00
Compare commits
4 Commits
4a301138c8
...
4d43e0a41b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d43e0a41b | ||
|
|
817cec99fe | ||
|
|
6675586a29 | ||
|
|
e985629f09 |
@ -160,6 +160,11 @@ ClientConnection* ClientServices::Connection() {
|
|||||||
return ClientServices::s_currentConnection;
|
return ClientServices::s_currentConnection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t ClientServices::CharacterValidateName(const char* name) {
|
||||||
|
// TODO
|
||||||
|
return 87;
|
||||||
|
}
|
||||||
|
|
||||||
void ClientServices::Disconnect() {
|
void ClientServices::Disconnect() {
|
||||||
ClientServices::Connection()->Disconnect();
|
ClientServices::Connection()->Disconnect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,6 +33,7 @@ class ClientServices : public LoginResponse {
|
|||||||
// Static functions
|
// Static functions
|
||||||
static void ConnectToSelectedServer();
|
static void ConnectToSelectedServer();
|
||||||
static ClientConnection* Connection();
|
static ClientConnection* Connection();
|
||||||
|
static uint32_t CharacterValidateName(const char* name);
|
||||||
static void Disconnect();
|
static void Disconnect();
|
||||||
static const char* GetCurrentLoginPortal();
|
static const char* GetCurrentLoginPortal();
|
||||||
static const char* GetCurrentLoginServer();
|
static const char* GetCurrentLoginServer();
|
||||||
|
|||||||
@ -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