2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 06:27:43 +00:00

CFrontEndUI work

This commit is contained in:
Jack Andersen
2016-12-29 20:37:01 -10:00
parent b3cae0d4d5
commit a93ca26ea1
29 changed files with 960 additions and 216 deletions

View File

@@ -4,6 +4,9 @@
#include "Graphics/CGraphics.hpp"
#include "CRasterFont.hpp"
#include "Graphics/CTexture.hpp"
#include "CTextExecuteBuffer.hpp"
#include "CFontRenderState.hpp"
#include "CInstruction.hpp"
namespace urde
{
@@ -230,4 +233,41 @@ void CTextRenderBuffer::AddFontChange(const TToken<CRasterFont>& font)
m_fontCharacters.push_back({font});
}
CTextRenderBufferPages::CTextRenderBufferPages(CTextExecuteBuffer& buf, const zeus::CVector2i& extent)
{
for (auto it = buf.x0_instList.begin() ; it != buf.x0_instList.end() ;)
{
std::shared_ptr<CInstruction>& inst = *it;
CTextRenderBuffer rbuf(CTextRenderBuffer::EMode::AllocTally);
{
CFontRenderState rstate;
for (auto it2 = buf.x0_instList.begin() ; it2 != buf.x0_instList.end() ;)
{
std::shared_ptr<CInstruction>& inst2 = *it2;
inst2->Invoke(rstate, &rbuf);
}
}
rbuf.SetMode(CTextRenderBuffer::EMode::BufferFill);
/* TODO: Finish */
{
CFontRenderState rstate;
for (auto it2 = buf.x0_instList.begin() ; it2 != buf.x0_instList.end() ;)
{
std::shared_ptr<CInstruction>& inst2 = *it2;
if (it2 != it)
{
}
else
{
}
}
}
}
}
}