mirror of https://github.com/AxioDL/metaforce.git
Minor cleanup and fixes
This commit is contained in:
parent
134646a32f
commit
5cbcfc9038
|
@ -5,6 +5,7 @@
|
||||||
namespace DataSpec {
|
namespace DataSpec {
|
||||||
|
|
||||||
struct ITweakSlideShow : ITweak {
|
struct ITweakSlideShow : ITweak {
|
||||||
|
virtual std::string_view GetPakName() const = 0;
|
||||||
virtual std::string_view GetFont() const = 0;
|
virtual std::string_view GetFont() const = 0;
|
||||||
virtual const zeus::CColor& GetFontColor() const = 0;
|
virtual const zeus::CColor& GetFontColor() const = 0;
|
||||||
virtual const zeus::CColor& GetOutlineColor() const = 0;
|
virtual const zeus::CColor& GetOutlineColor() const = 0;
|
||||||
|
|
|
@ -28,6 +28,7 @@ struct CTweakSlideShow final : ITweakSlideShow {
|
||||||
CTweakSlideShow() = default;
|
CTweakSlideShow() = default;
|
||||||
CTweakSlideShow(athena::io::IStreamReader& in) { read(in); }
|
CTweakSlideShow(athena::io::IStreamReader& in) { read(in); }
|
||||||
|
|
||||||
|
std::string_view GetPakName() const override { return x4_pakName; }
|
||||||
std::string_view GetFont() const override { return x14_fontAssetName; }
|
std::string_view GetFont() const override { return x14_fontAssetName; }
|
||||||
const zeus::CColor& GetFontColor() const override { return x24_fontColor; }
|
const zeus::CColor& GetFontColor() const override { return x24_fontColor; }
|
||||||
const zeus::CColor& GetOutlineColor() const override { return x28_outlineColor; }
|
const zeus::CColor& GetOutlineColor() const override { return x28_outlineColor; }
|
||||||
|
|
|
@ -13,6 +13,7 @@ bool AreAllDepsLoaded(const std::vector<TLockedToken<CDependencyGroup>>& deps) {
|
||||||
} // Anonymous namespace
|
} // Anonymous namespace
|
||||||
|
|
||||||
CSlideShow::CSlideShow() : CIOWin("SlideShow"), x130_(g_tweakSlideShow->GetX54()) {
|
CSlideShow::CSlideShow() : CIOWin("SlideShow"), x130_(g_tweakSlideShow->GetX54()) {
|
||||||
|
g_ResFactory->GetResLoader()->AddPakFileAsync(g_tweakSlideShow->GetPakName(), false, false);
|
||||||
const SObjectTag* font = g_ResFactory->GetResourceIdByName(g_tweakSlideShow->GetFont());
|
const SObjectTag* font = g_ResFactory->GetResourceIdByName(g_tweakSlideShow->GetFont());
|
||||||
if (font) {
|
if (font) {
|
||||||
CGuiTextProperties propsA(false, true, EJustification::Center, EVerticalJustification::Bottom);
|
CGuiTextProperties propsA(false, true, EJustification::Center, EVerticalJustification::Bottom);
|
||||||
|
@ -55,6 +56,9 @@ CSlideShow::CSlideShow() : CIOWin("SlideShow"), x130_(g_tweakSlideShow->GetX54()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CSlideShow::~CSlideShow() {
|
||||||
|
//TODO: Remove pak from loader
|
||||||
|
}
|
||||||
bool CSlideShow::LoadTXTRDep(std::string_view name) {
|
bool CSlideShow::LoadTXTRDep(std::string_view name) {
|
||||||
const SObjectTag* dgrpTag = g_ResFactory->GetResourceIdByName(name);
|
const SObjectTag* dgrpTag = g_ResFactory->GetResourceIdByName(name);
|
||||||
if (dgrpTag && dgrpTag->type == FOURCC('DGRP')) {
|
if (dgrpTag && dgrpTag->type == FOURCC('DGRP')) {
|
||||||
|
@ -74,11 +78,11 @@ CIOWin::EMessageReturn CSlideShow::OnMessage(const CArchitectureMessage& msg, CA
|
||||||
|
|
||||||
switch (x14_phase) {
|
switch (x14_phase) {
|
||||||
case Phase::Zero: {
|
case Phase::Zero: {
|
||||||
// if (!g_resLoader->AreAllPaksLoaded())
|
if (!g_ResFactory->GetResLoader()->AreAllPaksLoaded())
|
||||||
//{
|
{
|
||||||
// g_resLoader->AsyncIdlePakLoading();
|
g_ResFactory->GetResLoader()->AsyncIdlePakLoading();
|
||||||
// return EMessageReturn::Exit;
|
return EMessageReturn::Exit;
|
||||||
//}
|
}
|
||||||
x14_phase = Phase::One;
|
x14_phase = Phase::One;
|
||||||
[[fallthrough]];
|
[[fallthrough]];
|
||||||
}
|
}
|
||||||
|
@ -138,6 +142,7 @@ void CSlideShow::Draw() {
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 CSlideShow::SlideShowGalleryFlags() {
|
u32 CSlideShow::SlideShowGalleryFlags() {
|
||||||
|
return 1 | 2 | 4 | 8;
|
||||||
u32 ret = 0;
|
u32 ret = 0;
|
||||||
if (!g_GameState)
|
if (!g_GameState)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -101,6 +101,7 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CSlideShow();
|
CSlideShow();
|
||||||
|
~CSlideShow();
|
||||||
EMessageReturn OnMessage(const CArchitectureMessage&, CArchitectureQueue&) override;
|
EMessageReturn OnMessage(const CArchitectureMessage&, CArchitectureQueue&) override;
|
||||||
bool GetIsContinueDraw() const override { return false; }
|
bool GetIsContinueDraw() const override { return false; }
|
||||||
void Draw() override;
|
void Draw() override;
|
||||||
|
|
Loading…
Reference in New Issue