mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-18 05:31:07 +03:00
Compare commits
8 Commits
5ee712b462
...
613e7698b9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
613e7698b9 | ||
|
|
fa98bbc1f0 | ||
|
|
af4b798942 | ||
|
|
9b18f2f3bd | ||
|
|
6cb5310430 | ||
|
|
cb8291af1a | ||
|
|
58c8975769 | ||
|
|
b902b5484e |
@ -39,6 +39,7 @@
|
||||
#include <cstdio>
|
||||
|
||||
int32_t CGlueMgr::m_acceptedEULA = 1; // TODO
|
||||
int32_t CGlueMgr::m_acceptedScanning = 1; // TODO
|
||||
int32_t CGlueMgr::m_acceptedTerminationWithoutNotice;
|
||||
int32_t CGlueMgr::m_acceptedTOS = 1; // TODO
|
||||
int32_t CGlueMgr::m_accountMsgAvailable;
|
||||
|
||||
@ -33,6 +33,7 @@ class CGlueMgr {
|
||||
|
||||
// Static variables
|
||||
static int32_t m_acceptedEULA;
|
||||
static int32_t m_acceptedScanning;
|
||||
static int32_t m_acceptedTerminationWithoutNotice;
|
||||
static int32_t m_acceptedTOS;
|
||||
static int32_t m_accountMsgAvailable;
|
||||
|
||||
@ -216,7 +216,14 @@ int32_t Script_ShowScanningNotice(lua_State* L) {
|
||||
}
|
||||
|
||||
int32_t Script_ScanningAccepted(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED(0);
|
||||
if (CGlueMgr::m_acceptedScanning) {
|
||||
lua_pushnumber(L, 1.0);
|
||||
}
|
||||
else {
|
||||
lua_pushnil(L);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int32_t Script_AcceptScanning(lua_State* L) {
|
||||
|
||||
@ -95,6 +95,10 @@ void CGObject_C::Disable() {
|
||||
this->m_disableTimeMs = CWorld::GetCurTimeMs();
|
||||
}
|
||||
|
||||
float CGObject_C::GetFacing() const {
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
int32_t CGObject_C::GetModelFileName(const char*& name) const {
|
||||
return false;
|
||||
}
|
||||
@ -103,6 +107,10 @@ CM2Model* CGObject_C::GetObjectModel() {
|
||||
return this->m_model;
|
||||
}
|
||||
|
||||
C3Vector CGObject_C::GetPosition() const {
|
||||
return { 0.0f, 0.0f, 0.0f };
|
||||
}
|
||||
|
||||
int32_t CGObject_C::IsInReenable() {
|
||||
return this->m_inReenable;
|
||||
}
|
||||
|
||||
@ -36,6 +36,10 @@ class CGObject_C : public CGObject, public TSHashObject<CGObject_C, CHashKeyGUID
|
||||
virtual void HandleOutOfRange(OUT_OF_RANGE_TYPE type) {};
|
||||
virtual void UpdateWorldObject(int32_t a2);
|
||||
// TODO
|
||||
virtual C3Vector GetPosition() const;
|
||||
// TODO
|
||||
virtual float GetFacing() const;
|
||||
// TODO
|
||||
virtual int32_t GetModelFileName(const char*& name) const;
|
||||
// TODO
|
||||
virtual int32_t CanHighlight();
|
||||
|
||||
@ -38,6 +38,9 @@ bool ValidateCameraView(CVar* var, const char* oldValue, const char* value, void
|
||||
}
|
||||
|
||||
CGCamera::CGCamera() : CSimpleCamera(CWorld::GetNearClip(), CWorld::GetFarClip(), 90.0f * CMath::DEG2RAD) {
|
||||
this->m_model = nullptr;
|
||||
|
||||
this->m_target = 0;
|
||||
this->m_relativeTo = 0;
|
||||
|
||||
this->m_view = s_cameraView->GetInt();
|
||||
@ -63,6 +66,14 @@ C3Vector CGCamera::Forward() const {
|
||||
return this->CSimpleCamera::Forward();
|
||||
}
|
||||
|
||||
const WOWGUID& CGCamera::GetTarget() const {
|
||||
return this->m_target;
|
||||
}
|
||||
|
||||
int32_t CGCamera::HasModel() const {
|
||||
return this->m_model != nullptr;
|
||||
}
|
||||
|
||||
C33Matrix CGCamera::ParentToWorld() const {
|
||||
// TODO
|
||||
return {};
|
||||
|
||||
@ -4,6 +4,8 @@
|
||||
#include "ui/simple/CSimpleCamera.hpp"
|
||||
#include "util/GUID.hpp"
|
||||
|
||||
class CM2Model;
|
||||
|
||||
class CGCamera : public CSimpleCamera {
|
||||
public:
|
||||
// Public structs
|
||||
@ -25,12 +27,17 @@ class CGCamera : public CSimpleCamera {
|
||||
|
||||
// Public member functions
|
||||
CGCamera();
|
||||
const WOWGUID& GetTarget() const;
|
||||
int32_t HasModel() const;
|
||||
C33Matrix ParentToWorld() const;
|
||||
void SetupWorldProjection(const CRect& projRect);
|
||||
C3Vector Target() const;
|
||||
|
||||
private:
|
||||
// Private member variables
|
||||
CM2Model* m_model;
|
||||
// TODO
|
||||
WOWGUID m_target;
|
||||
// TODO
|
||||
WOWGUID m_relativeTo;
|
||||
// TODO
|
||||
|
||||
@ -2,8 +2,10 @@
|
||||
#include "gx/Coordinate.hpp"
|
||||
#include "gx/Shader.hpp"
|
||||
#include "gx/Transform.hpp"
|
||||
#include "object/Client.hpp"
|
||||
#include "ui/game/CGCamera.hpp"
|
||||
#include "ui/game/PlayerName.hpp"
|
||||
#include "world/World.hpp"
|
||||
#include <storm/Memory.hpp>
|
||||
#include <tempest/Matrix.hpp>
|
||||
|
||||
@ -92,7 +94,19 @@ void CGWorldFrame::OnWorldRender() {
|
||||
void CGWorldFrame::OnWorldUpdate() {
|
||||
// TODO
|
||||
|
||||
auto target = ClntObjMgrObjectPtr(this->m_camera->GetTarget(), TYPE_OBJECT, __FILE__, __LINE__);
|
||||
|
||||
// TODO
|
||||
|
||||
this->m_camera->SetupWorldProjection(this->m_screenRect);
|
||||
|
||||
// TODO
|
||||
|
||||
auto targetPos = target && !this->m_camera->HasModel()
|
||||
? target->GetPosition()
|
||||
: this->m_camera->Position();
|
||||
|
||||
CWorld::Update(this->m_camera->Position(), this->m_camera->Target(), targetPos);
|
||||
|
||||
// TODO
|
||||
}
|
||||
|
||||
@ -213,3 +213,7 @@ void CWorld::SetUpdateTime(float tickTimeSec, uint32_t curTimeMs) {
|
||||
CWorld::s_tickTimeMs = static_cast<uint32_t>(tickTimeSec * 1000.0f);
|
||||
CWorld::s_tickTimeSec = tickTimeSec;
|
||||
}
|
||||
|
||||
void CWorld::Update(const C3Vector& cameraPos, const C3Vector& cameraTarget, const C3Vector& targetPos) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
@ -70,6 +70,7 @@ class CWorld {
|
||||
static int32_t OnTick(const EVENT_DATA_TICK* data, void* param);
|
||||
static void SetFarClip(float farClip);
|
||||
static void SetUpdateTime(float tickTimeSec, uint32_t curTimeMs);
|
||||
static void Update(const C3Vector& cameraPos, const C3Vector& cameraTarget, const C3Vector& targetPos);
|
||||
|
||||
private:
|
||||
// Private static variables
|
||||
|
||||
Loading…
Reference in New Issue
Block a user