mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 03:02:30 +00:00
52 lines
1.2 KiB
C++
52 lines
1.2 KiB
C++
|
|
#include "gameui/CGWorldFrame.hpp"
|
||
|
|
|
||
|
|
#include "gx/Transform.hpp"
|
||
|
|
|
||
|
|
#include <storm/Memory.hpp>
|
||
|
|
#include <tempest/Matrix.hpp>
|
||
|
|
|
||
|
|
|
||
|
|
CGWorldFrame* CGWorldFrame::s_currentWorldFrame = nullptr;
|
||
|
|
|
||
|
|
|
||
|
|
CGWorldFrame::CGWorldFrame(CSimpleFrame* parent) : CSimpleFrame(parent) {
|
||
|
|
// TODO
|
||
|
|
s_currentWorldFrame = this;
|
||
|
|
}
|
||
|
|
|
||
|
|
void CGWorldFrame::OnFrameRender(CRenderBatch* batch, uint32_t layer) {
|
||
|
|
CSimpleFrame::OnFrameRender(batch, layer);
|
||
|
|
if (!layer) {
|
||
|
|
batch->QueueCallback(&CGWorldFrame::RenderWorld, this);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
CSimpleFrame* CGWorldFrame::Create(CSimpleFrame* parent) {
|
||
|
|
// TODO: Data = CDataAllocator__GetData(0, ".?AVCGWorldFrame@@", -2);
|
||
|
|
|
||
|
|
auto m = SMemAlloc(sizeof(CGWorldFrame), __FILE__, __LINE__, 0);
|
||
|
|
return m ? (new (m) CGWorldFrame(parent)) : nullptr;
|
||
|
|
}
|
||
|
|
|
||
|
|
void CGWorldFrame::RenderWorld(void* param) {
|
||
|
|
C44Matrix saved_proj;
|
||
|
|
GxXformProjection(saved_proj);
|
||
|
|
|
||
|
|
C44Matrix saved_view;
|
||
|
|
GxXformView(saved_view);
|
||
|
|
|
||
|
|
CGWorldFrame::OnWorldUpdate();
|
||
|
|
CGWorldFrame::OnWorldRender();
|
||
|
|
|
||
|
|
//PlayerNameRenderWorldText();
|
||
|
|
|
||
|
|
GxXformSetProjection(saved_proj);
|
||
|
|
GxXformSetView(saved_view);
|
||
|
|
}
|
||
|
|
|
||
|
|
void CGWorldFrame::OnWorldUpdate() {
|
||
|
|
}
|
||
|
|
|
||
|
|
void CGWorldFrame::OnWorldRender() {
|
||
|
|
}
|