Compare commits

..

6 Commits

Author SHA1 Message Date
Alex Tiernan-Berry
96503de55b
Merge 0573235a70 into 2711c752ba 2026-02-15 20:29:29 -06:00
fallenoak
2711c752ba
chore(build): update typhoon 2026-02-15 20:28:56 -06:00
fallenoak
0e6f65f32e
feat(ui): implement CSimpleCamera::SetFacing with forward vector 2026-02-15 20:12:01 -06:00
fallenoak
86084516cd
feat(ui): add CSimpleCamera
Some checks are pending
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:cl compiler_name:MSVC cxx:cl os:windows-latest system_name:Windows test_path:WhoaTest]) (push) Waiting to run
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:clang compiler_name:Clang cxx:clang++ os:macos-latest system_name:macOS test_path:WhoaTest]) (push) Waiting to run
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:gcc compiler_name:GCC cxx:g++ os:ubuntu-latest system_name:Linux test_path:WhoaTest]) (push) Waiting to run
2026-02-15 12:42:14 -06:00
Tristan Cormier
71a31e19bd chore(glue): rename IDLE_5 to IDLE_CREATE_CHARACTER
Some checks are pending
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:cl compiler_name:MSVC cxx:cl os:windows-latest system_name:Windows test_path:WhoaTest]) (push) Waiting to run
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:clang compiler_name:Clang cxx:clang++ os:macos-latest system_name:macOS test_path:WhoaTest]) (push) Waiting to run
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:gcc compiler_name:GCC cxx:g++ os:ubuntu-latest system_name:Linux test_path:WhoaTest]) (push) Waiting to run
2026-02-14 22:32:19 -06:00
Tristan Cormier
d77b1dfd67 chore(net): rename character creation NETMESSAGE enum members 2026-02-14 22:25:16 -06:00
7 changed files with 145 additions and 7 deletions

@ -1 +1 @@
Subproject commit 1c9e7831c874068e7c939a7dea8790eef6513d78
Subproject commit dc8f10e407daa8bdf7e90d9438b55d5883780825

View File

@ -1129,7 +1129,7 @@ void CGlueMgr::StatusDialogClick() {
}
case IDLE_REALM_LIST:
case IDLE_5:
case IDLE_CREATE_CHARACTER:
case IDLE_DELETE_CHARACTER:
case IDLE_ENTER_WORLD: {
ClientServices::Connection()->Cancel(2);

View File

@ -20,7 +20,7 @@ class CGlueMgr {
IDLE_ACCOUNT_LOGIN = 2,
IDLE_CHARACTER_LIST = 3,
IDLE_REALM_LIST = 4,
IDLE_5 = 5,
IDLE_CREATE_CHARACTER = 5,
IDLE_DELETE_CHARACTER = 6,
IDLE_7 = 7,
IDLE_8 = 8,

View File

@ -60,11 +60,11 @@ enum NETMESSAGE {
CMSG_AUTH_SRP6_BEGIN = 0x0033,
CMSG_AUTH_SRP6_PROOF = 0x0034,
CMSG_AUTH_SRP6_RECODE = 0x0035,
CMSG_CREATE_CHARACTER = 0x0036,
CMSG_CHAR_CREATE = 0x0036,
CMSG_ENUM_CHARACTERS = 0x0037,
CMSG_CHAR_DELETE = 0x0038,
SMSG_AUTH_SRP6_RESPONSE = 0x0039,
SMSG_CREATE_CHAR = 0x003A,
SMSG_CHAR_CREATE = 0x003A,
SMSG_ENUM_CHARACTERS_RESULT = 0x003B,
SMSG_DELETE_CHAR = 0x003C,
CMSG_PLAYER_LOGIN = 0x003D,

View File

@ -19,7 +19,7 @@ int32_t RealmConnection::MessageHandler(void* param, NETMESSAGE msgId, uint32_t
break;
}
case SMSG_CREATE_CHAR: {
case SMSG_CHAR_CREATE: {
// TODO
break;
}
@ -91,7 +91,7 @@ RealmConnection::RealmConnection(RealmResponse* realmResponse) {
this->SetMessageHandler(SMSG_AUTH_RESPONSE, &RealmConnection::MessageHandler, this);
this->SetMessageHandler(SMSG_ADDON_INFO, &RealmConnection::MessageHandler, this);
this->SetMessageHandler(SMSG_ENUM_CHARACTERS_RESULT, &RealmConnection::MessageHandler, this);
this->SetMessageHandler(SMSG_CREATE_CHAR, &RealmConnection::MessageHandler, this);
this->SetMessageHandler(SMSG_CHAR_CREATE, &RealmConnection::MessageHandler, this);
this->SetMessageHandler(SMSG_CHARACTER_LOGIN_FAILED, &RealmConnection::MessageHandler, this);
this->SetMessageHandler(SMSG_LOGOUT_COMPLETE, &RealmConnection::MessageHandler, this);
this->SetMessageHandler(SMSG_LOGOUT_CANCEL_ACK, &RealmConnection::MessageHandler, this);

View File

@ -0,0 +1,103 @@
#include "ui/simple/CSimpleCamera.hpp"
#include <tempest/Math.hpp>
namespace {
void FaceDirection(const C3Vector& direction, C3Vector& xPrime, C3Vector& yPrime, C3Vector& zPrime) {
STORM_ASSERT(CMath::fnotequal(direction.SquaredMag(), 0.0f));
// Forward
xPrime = direction;
// Right
if (CMath::fequal(xPrime.SquaredMag(), 0.0f)) {
yPrime.x = 1.0f;
yPrime.y = 0.0f;
yPrime.z = 0.0f;
} else {
yPrime.x = -xPrime.y;
yPrime.y = xPrime.x;
yPrime.z = 0.0f;
CMath::normalize(yPrime.x, yPrime.y);
}
// Up (Forward cross Right)
zPrime = C3Vector::Cross(xPrime, yPrime);
}
void BuildBillboardMatrix(const C3Vector& direction, C33Matrix& rotation) {
C3Vector xPrime = {};
C3Vector yPrime = {};
C3Vector zPrime = {};
FaceDirection(direction, xPrime, yPrime, zPrime);
// Forward
rotation.a0 = xPrime.x;
rotation.a1 = xPrime.y;
rotation.a2 = xPrime.z;
// Right
rotation.b0 = yPrime.x;
rotation.b1 = yPrime.y;
rotation.b2 = yPrime.z;
// Up
rotation.c0 = zPrime.x;
rotation.c1 = zPrime.y;
rotation.c2 = zPrime.z;
}
}
CSimpleCamera::CSimpleCamera(float nearZ, float farZ, float fov) {
this->float10 = 0.0f;
this->m_nearZ = nearZ;
this->m_farZ = farZ;
this->m_fov = fov;
this->m_aspect = 1.0f;
this->SetFacing(0.0f, 0.0f, 0.0f);
}
float CSimpleCamera::FOV() {
return this->m_fov;
}
C3Vector CSimpleCamera::Forward() const {
return { this->m_facing.a0, this->m_facing.a1, this->m_facing.a2 };
}
C3Vector CSimpleCamera::Right() const {
return { this->m_facing.b0, this->m_facing.b1, this->m_facing.b2 };
}
void CSimpleCamera::SetFacing(const C3Vector& forward) {
BuildBillboardMatrix(forward, this->m_facing);
}
void CSimpleCamera::SetFacing(const C3Vector& forward, const C3Vector& up) {
// TODO
}
void CSimpleCamera::SetFacing(float yaw, float pitch, float roll) {
this->m_facing.FromEulerAnglesZYX(yaw, pitch, roll);
}
void CSimpleCamera::SetFarZ(float farZ) {
this->m_farZ = farZ;
}
void CSimpleCamera::SetFieldOfView(float fov) {
this->m_fov = fov;
}
void CSimpleCamera::SetNearZ(float nearZ) {
this->m_nearZ = nearZ;
}
C3Vector CSimpleCamera::Up() const {
return { this->m_facing.c0, this->m_facing.c1, this->m_facing.c2 };
}

View File

@ -0,0 +1,35 @@
#ifndef UI_SIMPLE_C_SIMPLE_CAMERA_HPP
#define UI_SIMPLE_C_SIMPLE_CAMERA_HPP
#include <tempest/Matrix.hpp>
#include <tempest/Vector.hpp>
class CSimpleCamera {
public:
// Virtual public member functions
virtual float FOV();
virtual C3Vector Forward() const;
virtual C3Vector Right() const;
virtual C3Vector Up() const;
// Public member functions
CSimpleCamera(float nearZ, float farZ, float fov);
void SetFacing(const C3Vector& forward);
void SetFacing(const C3Vector& forward, const C3Vector& up);
void SetFacing(float yaw, float pitch, float roll);
void SetFarZ(float farZ);
void SetFieldOfView(float fov);
void SetNearZ(float nearZ);
protected:
// Protected member variables
C3Vector m_position;
float float10;
C33Matrix m_facing;
float m_nearZ;
float m_farZ;
float m_fov;
float m_aspect;
};
#endif