mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-18 21:51:06 +03:00
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
66 lines
1.4 KiB
C++
66 lines
1.4 KiB
C++
#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
|
|
|
|
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
|
|
|
|
CGWorldFrame::s_currentWorldFrame = this;
|
|
|
|
// 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
|
|
}
|