mirror of https://github.com/AxioDL/metaforce.git
Initial CGuiTextSupport fields; integrated optional template
This commit is contained in:
parent
89daac544f
commit
6fcdb3a99c
|
@ -27,10 +27,11 @@ static const hecl::SystemChar* MomErr[] =
|
|||
_S("Unable to find Waldo"),
|
||||
_S("Expected Ridley, found furby"),
|
||||
_S("Adam has not authorized this, please do not bug the developers"),
|
||||
_S("Error: Lady returned objection")
|
||||
_S("Lady returned objection"),
|
||||
_S("Unterminated plot thread 'Deleter' detected")
|
||||
};
|
||||
|
||||
constexpr uint32_t MomErrCount = 11;
|
||||
constexpr uint32_t MomErrCount = std::extent<decltype(MomErr)>::value;
|
||||
SpecBase::SpecBase(hecl::Database::Project& project)
|
||||
: m_project(project),
|
||||
m_masterShader(project.getProjectWorkingPath(), ".hecl/RetroMasterShader.blend") {}
|
||||
|
|
|
@ -66,6 +66,7 @@ add_library(RuntimeCommon
|
|||
CPlayMovieBase.hpp
|
||||
CGameDebug.hpp CGameDebug.cpp
|
||||
rstl.hpp rstl.cpp
|
||||
optional.hpp optional.cpp
|
||||
GameGlobalObjects.hpp
|
||||
RetroTypes.hpp
|
||||
GCNTypes.hpp
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
#include "CGuiSliderGroup.hpp"
|
||||
#include "CGuiTextPane.hpp"
|
||||
#include "CAuiEnergyBarT01.hpp"
|
||||
#include "CTextParser.hpp"
|
||||
#include "CSimplePool.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
|
@ -71,6 +73,7 @@ CGuiWidget* CGuiSys::CreateWidgetInGame(FourCC type, CInputStream& in, CGuiFrame
|
|||
CGuiSys::CGuiSys(IFactory& resFactory, CSimplePool& resStore, EUsageMode mode)
|
||||
: x0_resFactory(resFactory), x4_resStore(resStore), x2c_mode(mode),
|
||||
x38_frameFactoryParams(new TObjOwnerParam<CGuiResFrameData>(CGuiResFrameData(*this))),
|
||||
x34_textParser(new CTextParser(resStore)),
|
||||
x40_constructTime(std::chrono::steady_clock::now())
|
||||
{
|
||||
AddFactories(mode);
|
||||
|
|
|
@ -19,6 +19,7 @@ class IFactory;
|
|||
class CSimplePool;
|
||||
class CGuiWidget;
|
||||
class CGuiFrame;
|
||||
class CTextParser;
|
||||
|
||||
typedef CGuiObject*(*FGuiFactoryFunc)(const SObjectTag&, const CVParamTransfer&);
|
||||
|
||||
|
@ -50,6 +51,7 @@ private:
|
|||
std::unordered_map<EPhysicalControllerID, CGuiAutoRepeatData> x18_repeatMap;
|
||||
EUsageMode x2c_mode;
|
||||
std::stack<CSaveableState, std::vector<CSaveableState>> x30_saveStack;
|
||||
std::unique_ptr<CTextParser> x34_textParser;
|
||||
CVParamTransfer x38_frameFactoryParams;
|
||||
std::chrono::time_point<std::chrono::steady_clock> x40_constructTime;
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include "CGuiTextSupport.hpp"
|
||||
#include "CSimplePool.hpp"
|
||||
#include "CFontImageDef.hpp"
|
||||
#include "Graphics/CGraphicsPalette.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
|
@ -7,8 +9,73 @@ namespace urde
|
|||
CGuiTextSupport::CGuiTextSupport(TResId fontId, const CGuiTextProperties& props,
|
||||
const zeus::CColor& col1, const zeus::CColor& col2,
|
||||
const zeus::CColor& col3, int, int, CSimplePool* store)
|
||||
: x10_props(props), x1c_(col1), x20_(col2), x24_(col3)
|
||||
{
|
||||
x2c0_font = store->GetObj({SBIG('FONT'), fontId});
|
||||
}
|
||||
|
||||
void CGuiTextSupport::GetCurrentAnimationOverAge() const
|
||||
{
|
||||
if (!x2ac_ || !x44_)
|
||||
return;
|
||||
|
||||
|
||||
}
|
||||
|
||||
int CGuiTextSupport::GetNumCharsPrinted() const
|
||||
{
|
||||
}
|
||||
|
||||
int CGuiTextSupport::GetTotalAnimationTime() const
|
||||
{
|
||||
}
|
||||
|
||||
void CGuiTextSupport::SetTypeWriteEffectOptions(bool, float, float)
|
||||
{
|
||||
}
|
||||
|
||||
void CGuiTextSupport::Update(float dt)
|
||||
{
|
||||
}
|
||||
|
||||
void CGuiTextSupport::ClearBuffer()
|
||||
{
|
||||
}
|
||||
|
||||
void CGuiTextSupport::CheckAndRebuildTextRenderBuffer()
|
||||
{
|
||||
}
|
||||
|
||||
void CGuiTextSupport::Render() const
|
||||
{
|
||||
}
|
||||
|
||||
void CGuiTextSupport::SetGeometryColor(const zeus::CColor& col)
|
||||
{
|
||||
}
|
||||
|
||||
void CGuiTextSupport::SetOutlineColor(const zeus::CColor& col)
|
||||
{
|
||||
}
|
||||
|
||||
void CGuiTextSupport::SetFontColor(const zeus::CColor& col)
|
||||
{
|
||||
}
|
||||
|
||||
void CGuiTextSupport::AddText(const std::wstring& str)
|
||||
{
|
||||
}
|
||||
|
||||
void CGuiTextSupport::SetText(const std::wstring& str)
|
||||
{
|
||||
}
|
||||
|
||||
void CGuiTextSupport::SetText(const std::string& str)
|
||||
{
|
||||
}
|
||||
|
||||
bool CGuiTextSupport::GetIsTextSupportFinishedLoading() const
|
||||
{
|
||||
store->GetObj({SBIG('FONT'), fontId});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,12 +4,15 @@
|
|||
#include "zeus/CColor.hpp"
|
||||
#include "RetroTypes.hpp"
|
||||
#include "CToken.hpp"
|
||||
#include "CTextRenderBuffer.hpp"
|
||||
#include "optional.hpp"
|
||||
#include <string>
|
||||
|
||||
namespace urde
|
||||
{
|
||||
class CSimplePool;
|
||||
class CRasterFont;
|
||||
class CTextRenderBuffer;
|
||||
|
||||
enum class EJustification
|
||||
{
|
||||
|
@ -72,12 +75,30 @@ public:
|
|||
|
||||
class CGuiTextSupport
|
||||
{
|
||||
u32 x4_ = 0;
|
||||
u32 x8_ = 0;
|
||||
CGuiTextProperties x10_props;
|
||||
zeus::CColor x1c_;
|
||||
zeus::CColor x20_;
|
||||
zeus::CColor x24_;
|
||||
s32 x28_;
|
||||
s32 x2c_;
|
||||
float x30_ = 0.f;
|
||||
std::vector<u32> x34_;
|
||||
s32 x44_ = 0;
|
||||
float x48_ = 0.1f;
|
||||
float x4c_ = 10.0f;
|
||||
TResId x50_fontId;
|
||||
std::experimental::optional<CTextRenderBuffer> x54_renderBuf;
|
||||
bool x2ac_ = false;
|
||||
s32 x2b4_ = 0;
|
||||
s32 x2b8_ = 0;
|
||||
s32 x2bc_ = 0;
|
||||
TLockedToken<CRasterFont> x2c0_font;
|
||||
public:
|
||||
CGuiTextSupport(TResId fontId, const CGuiTextProperties& props,
|
||||
const zeus::CColor& col1, const zeus::CColor& col2,
|
||||
const zeus::CColor& col3, int, int, CSimplePool*);
|
||||
const zeus::CColor& col3, s32, s32, CSimplePool*);
|
||||
void GetCurrentAnimationOverAge() const;
|
||||
int GetNumCharsPrinted() const;
|
||||
int GetTotalAnimationTime() const;
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "GuiSys/CSplashScreen.hpp"
|
||||
#include "CMainFlow.hpp"
|
||||
#include "GuiSys/CConsoleOutputWindow.hpp"
|
||||
#include "GuiSys/CTextParser.hpp"
|
||||
#include "Audio/CAudioStateWin.hpp"
|
||||
#include "GameGlobalObjects.hpp"
|
||||
#include "CArchitectureQueue.hpp"
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
#include "optional.hpp"
|
||||
logvisor::Module OptionalLogModule("optional.hpp");
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue