Compare commits

..

3 Commits

Author SHA1 Message Date
Tristan 'Natrist' Cormier
6749d0658e
Merge 4a102c6ace into d859670f7b 2026-02-14 18:55:18 +04:00
fallenoak
d859670f7b
feat(ui): set frame strata in CGWorldFrame ctor
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 08:23:58 -06:00
fallenoak
05d949523c
feat(ui): add CGWorldFrame::OnFrameRender
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 05:05:38 -06:00
4 changed files with 66 additions and 0 deletions

View File

@ -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
}

View File

@ -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

View File

@ -0,0 +1,9 @@
#include "ui/game/PlayerName.hpp"
void PlayerNameRenderWorldText() {
// TODO
}
void PlayerNameUpdateWorldText() {
// TODO
}

View File

@ -0,0 +1,8 @@
#ifndef UI_GAME_PLAYER_NAME_HPP
#define UI_GAME_PLAYER_NAME_HPP
void PlayerNameRenderWorldText();
void PlayerNameUpdateWorldText();
#endif