mirror of https://github.com/AxioDL/metaforce.git
CFrontEndUI work
This commit is contained in:
parent
f665812d6e
commit
a2b07ba357
|
@ -394,7 +394,8 @@ bool FRME::Extract(const SpecBase &dataSpec,
|
||||||
if (info->projectionType == CAMRInfo::ProjectionType::Orthographic)
|
if (info->projectionType == CAMRInfo::ProjectionType::Orthographic)
|
||||||
{
|
{
|
||||||
CAMRInfo::OrthographicProjection* proj = static_cast<CAMRInfo::OrthographicProjection*>(info->projection.get());
|
CAMRInfo::OrthographicProjection* proj = static_cast<CAMRInfo::OrthographicProjection*>(info->projection.get());
|
||||||
os.format("cam.type = 'ORTHO'\n");
|
os.format("cam.type = 'ORTHO'\n"
|
||||||
|
"cam.ortho_scale = %f\n", std::fabs(proj->right - proj->left));
|
||||||
}
|
}
|
||||||
else if (info->projectionType == CAMRInfo::ProjectionType::Perspective)
|
else if (info->projectionType == CAMRInfo::ProjectionType::Perspective)
|
||||||
{
|
{
|
||||||
|
|
|
@ -71,7 +71,7 @@ public:
|
||||||
void Decode(s16* bufOut, u32 numSamples);
|
void Decode(s16* bufOut, u32 numSamples);
|
||||||
void SetVolume(float vol)
|
void SetVolume(float vol)
|
||||||
{
|
{
|
||||||
xc0_volume = zeus::clamp(0.f, vol, 1.f) / 32768.f;
|
xc0_volume = zeus::clamp(0.f, vol, 1.f) * 32768.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StartMixing()
|
void StartMixing()
|
||||||
|
|
|
@ -19,13 +19,13 @@ CPersistentOptions::CPersistentOptions(CBitStreamReader& stream)
|
||||||
xc0_ = stream.ReadEncoded(2);
|
xc0_ = stream.ReadEncoded(2);
|
||||||
xc4_ = stream.ReadEncoded(2);
|
xc4_ = stream.ReadEncoded(2);
|
||||||
xc8_ = stream.ReadEncoded(1);
|
xc8_ = stream.ReadEncoded(1);
|
||||||
xcc_ = stream.ReadEncoded(7);
|
xcc_logScanCount = stream.ReadEncoded(7);
|
||||||
xd0_24_ = stream.ReadEncoded(1);
|
xd0_24_ = stream.ReadEncoded(1);
|
||||||
xd0_25_ = stream.ReadEncoded(1);
|
xd0_25_hasHardMode = stream.ReadEncoded(1);
|
||||||
xd0_26_ = stream.ReadEncoded(1);
|
xd0_26_hardModeBeat = stream.ReadEncoded(1);
|
||||||
xd0_27_ = stream.ReadEncoded(1);
|
xd0_27_ = stream.ReadEncoded(1);
|
||||||
xd0_28_hasFusion = stream.ReadEncoded(1);
|
xd0_28_hasFusion = stream.ReadEncoded(1);
|
||||||
xd0_29_ = stream.ReadEncoded(1);
|
xd0_29_allItemsCollected = stream.ReadEncoded(1);
|
||||||
xbc_ = stream.ReadEncoded(2);
|
xbc_ = stream.ReadEncoded(2);
|
||||||
|
|
||||||
auto& memWorlds = g_MemoryCardSys->GetMemoryWorlds();
|
auto& memWorlds = g_MemoryCardSys->GetMemoryWorlds();
|
||||||
|
|
|
@ -19,18 +19,18 @@ class CPersistentOptions
|
||||||
u32 xc0_ = 0;
|
u32 xc0_ = 0;
|
||||||
u32 xc4_ = 0;
|
u32 xc4_ = 0;
|
||||||
u32 xc8_ = 0;
|
u32 xc8_ = 0;
|
||||||
u32 xcc_ = 0;
|
u32 xcc_logScanCount = 0;
|
||||||
|
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
bool xd0_24_;
|
bool xd0_24_ : 1;
|
||||||
bool xd0_25_;
|
bool xd0_25_hasHardMode : 1;
|
||||||
bool xd0_26_;
|
bool xd0_26_hardModeBeat : 1;
|
||||||
bool xd0_27_;
|
bool xd0_27_ : 1;
|
||||||
bool xd0_28_hasFusion;
|
bool xd0_28_hasFusion : 1;
|
||||||
bool xd0_29_;
|
bool xd0_29_allItemsCollected : 1;
|
||||||
};
|
};
|
||||||
u16 _dummy = 0;
|
u16 _dummy = 0;
|
||||||
};
|
};
|
||||||
|
@ -40,7 +40,11 @@ public:
|
||||||
CPersistentOptions(CBitStreamReader& stream);
|
CPersistentOptions(CBitStreamReader& stream);
|
||||||
|
|
||||||
void SetCinematicState(ResId mlvlId, TEditorId cineId, bool state);
|
void SetCinematicState(ResId mlvlId, TEditorId cineId, bool state);
|
||||||
|
bool PlayerHasHardMode() const { return xd0_25_hasHardMode; }
|
||||||
|
bool PlayerBeatHardMode() const { return xd0_26_hardModeBeat; }
|
||||||
bool PlayerHasFusion() const { return xd0_28_hasFusion; }
|
bool PlayerHasFusion() const { return xd0_28_hasFusion; }
|
||||||
|
bool AllItemsCollected() const { return xd0_29_allItemsCollected; }
|
||||||
|
u32 GetLogScanCount() const { return xcc_logScanCount; }
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Options tracked per game session */
|
/** Options tracked per game session */
|
||||||
|
@ -70,11 +74,11 @@ private:
|
||||||
{
|
{
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
bool x68_24_;
|
bool x68_24_ : 1;
|
||||||
bool x68_25_;
|
bool x68_25_ : 1;
|
||||||
bool x68_26_;
|
bool x68_26_ : 1;
|
||||||
bool x68_27_;
|
bool x68_27_ : 1;
|
||||||
bool x68_28_;
|
bool x68_28_ : 1;
|
||||||
};
|
};
|
||||||
u16 _dummy = 0;
|
u16 _dummy = 0;
|
||||||
};
|
};
|
||||||
|
|
|
@ -103,7 +103,7 @@ CGameState::CGameState(CBitStreamReader& stream)
|
||||||
x0_[i] = stream.ReadEncoded(8);
|
x0_[i] = stream.ReadEncoded(8);
|
||||||
u32 tsSeconds = stream.ReadEncoded(32);
|
u32 tsSeconds = stream.ReadEncoded(32);
|
||||||
|
|
||||||
x228_24_ = stream.ReadEncoded(1);
|
x228_24_hardMode = stream.ReadEncoded(1);
|
||||||
x228_25_deferPowerupInit = stream.ReadEncoded(1);
|
x228_25_deferPowerupInit = stream.ReadEncoded(1);
|
||||||
x84_mlvlId = stream.ReadEncoded(32);
|
x84_mlvlId = stream.ReadEncoded(32);
|
||||||
EnsureWorldPakReady(x84_mlvlId);
|
EnsureWorldPakReady(x84_mlvlId);
|
||||||
|
@ -144,7 +144,7 @@ void CGameState::PutTo(CBitStreamWriter& writer) const
|
||||||
writer.WriteEncoded(x0_[i], 8);
|
writer.WriteEncoded(x0_[i], 8);
|
||||||
|
|
||||||
writer.WriteEncoded(CBasics::ToWiiTime(std::chrono::system_clock::now()) / CBasics::TICKS_PER_SECOND, 32);
|
writer.WriteEncoded(CBasics::ToWiiTime(std::chrono::system_clock::now()) / CBasics::TICKS_PER_SECOND, 32);
|
||||||
writer.WriteEncoded(x228_24_, 1);
|
writer.WriteEncoded(x228_24_hardMode, 1);
|
||||||
writer.WriteEncoded(x228_25_deferPowerupInit, 1);
|
writer.WriteEncoded(x228_25_deferPowerupInit, 1);
|
||||||
writer.WriteEncoded(x84_mlvlId, 32);
|
writer.WriteEncoded(x84_mlvlId, 32);
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ class CGameState
|
||||||
{
|
{
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
bool x228_24_;
|
bool x228_24_hardMode;
|
||||||
bool x228_25_deferPowerupInit;
|
bool x228_25_deferPowerupInit;
|
||||||
};
|
};
|
||||||
u8 _dummy = 0;
|
u8 _dummy = 0;
|
||||||
|
@ -107,6 +107,7 @@ public:
|
||||||
CWorldState& StateForWorld(ResId mlvlId);
|
CWorldState& StateForWorld(ResId mlvlId);
|
||||||
CWorldState& CurrentWorldState() { return StateForWorld(x84_mlvlId); }
|
CWorldState& CurrentWorldState() { return StateForWorld(x84_mlvlId); }
|
||||||
ResId CurrentWorldAssetId() const { return x84_mlvlId; }
|
ResId CurrentWorldAssetId() const { return x84_mlvlId; }
|
||||||
|
void SetHardMode(bool v) { x228_24_hardMode = v; }
|
||||||
void PutTo(CBitStreamWriter& writer) const;
|
void PutTo(CBitStreamWriter& writer) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,9 @@ namespace urde
|
||||||
|
|
||||||
CFontRenderState::CFontRenderState()
|
CFontRenderState::CFontRenderState()
|
||||||
{
|
{
|
||||||
x20_[0] = zeus::CColor::skWhite;
|
x54_[0] = zeus::CColor::skWhite;
|
||||||
x20_[1] = zeus::CColor::skGrey;
|
x54_[1] = zeus::CColor::skGrey;
|
||||||
x20_[2] = zeus::CColor::skWhite;
|
x54_[2] = zeus::CColor::skWhite;
|
||||||
RefreshPalette();
|
RefreshPalette();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,13 +36,13 @@ void CFontRenderState::SetColor(EColorType tp, const CTextColor& col)
|
||||||
case EColorType::Main:
|
case EColorType::Main:
|
||||||
case EColorType::Outline:
|
case EColorType::Outline:
|
||||||
case EColorType::Geometry:
|
case EColorType::Geometry:
|
||||||
x20_[int(tp)] = col;
|
x54_[int(tp)] = col;
|
||||||
break;
|
break;
|
||||||
case EColorType::Foreground:
|
case EColorType::Foreground:
|
||||||
x20_[0] = col;
|
x54_[0] = col;
|
||||||
break;
|
break;
|
||||||
case EColorType::Background:
|
case EColorType::Background:
|
||||||
x20_[1] = col;
|
x54_[1] = col;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
RefreshColor(tp);
|
RefreshColor(tp);
|
||||||
|
@ -59,32 +59,32 @@ void CFontRenderState::RefreshColor(EColorType tp)
|
||||||
switch (tp)
|
switch (tp)
|
||||||
{
|
{
|
||||||
case EColorType::Main:
|
case EColorType::Main:
|
||||||
if (!x14_font)
|
if (!x48_font)
|
||||||
return;
|
return;
|
||||||
switch (x14_font.GetObj()->GetMode())
|
switch (x48_font.GetObj()->GetMode())
|
||||||
{
|
{
|
||||||
case EColorType::Main:
|
case EColorType::Main:
|
||||||
if (!x30_colorOverrides[0])
|
if (!x64_colorOverrides[0])
|
||||||
x0_drawStrOpts.x4_colors[0] = ConvertToTextureSpace(x20_[0]);
|
x0_drawStrOpts.x4_colors[0] = ConvertToTextureSpace(x54_[0]);
|
||||||
break;
|
break;
|
||||||
case EColorType::Outline:
|
case EColorType::Outline:
|
||||||
if (!x30_colorOverrides[0])
|
if (!x64_colorOverrides[0])
|
||||||
x0_drawStrOpts.x4_colors[0] = ConvertToTextureSpace(x20_[0]);
|
x0_drawStrOpts.x4_colors[0] = ConvertToTextureSpace(x54_[0]);
|
||||||
break;
|
break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EColorType::Outline:
|
case EColorType::Outline:
|
||||||
if (!x14_font)
|
if (!x48_font)
|
||||||
return;
|
return;
|
||||||
if (x30_colorOverrides[1])
|
if (x64_colorOverrides[1])
|
||||||
return;
|
return;
|
||||||
if (x14_font.GetObj()->GetMode() == EColorType::Outline)
|
if (x48_font.GetObj()->GetMode() == EColorType::Outline)
|
||||||
x0_drawStrOpts.x4_colors[1] = ConvertToTextureSpace(x20_[1]);
|
x0_drawStrOpts.x4_colors[1] = ConvertToTextureSpace(x54_[1]);
|
||||||
break;
|
break;
|
||||||
case EColorType::Geometry:
|
case EColorType::Geometry:
|
||||||
if (!x30_colorOverrides[2])
|
if (!x64_colorOverrides[2])
|
||||||
x0_drawStrOpts.x4_colors[2] = ConvertToTextureSpace(x20_[2]);
|
x0_drawStrOpts.x4_colors[2] = ConvertToTextureSpace(x54_[2]);
|
||||||
break;
|
break;
|
||||||
case EColorType::Foreground:
|
case EColorType::Foreground:
|
||||||
RefreshColor(EColorType::Main);
|
RefreshColor(EColorType::Main);
|
||||||
|
|
|
@ -29,25 +29,25 @@ private:
|
||||||
int xcc_defaultUserSelection;
|
int xcc_defaultUserSelection;
|
||||||
bool xd0_selectWraparound;
|
bool xd0_selectWraparound;
|
||||||
bool xd1_ = true;
|
bool xd1_ = true;
|
||||||
std::function<void(const CGuiTableGroup*)> xd4_doMenuAdvance;
|
std::function<void(CGuiTableGroup*)> xd4_doMenuAdvance;
|
||||||
std::function<void(const CGuiTableGroup*)> xec_doMenuCancel;
|
std::function<void(CGuiTableGroup*)> xec_doMenuCancel;
|
||||||
std::function<void(const CGuiTableGroup*)> x104_doMenuSelChange;
|
std::function<void(CGuiTableGroup*)> x104_doMenuSelChange;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CGuiTableGroup(const CGuiWidgetParms& parms, int, int, bool);
|
CGuiTableGroup(const CGuiWidgetParms& parms, int, int, bool);
|
||||||
FourCC GetWidgetTypeID() const {return FOURCC('TBGP');}
|
FourCC GetWidgetTypeID() const {return FOURCC('TBGP');}
|
||||||
|
|
||||||
void SetMenuAdvanceCallback(std::function<void(const CGuiTableGroup*)>&& cb)
|
void SetMenuAdvanceCallback(std::function<void(CGuiTableGroup*)>&& cb)
|
||||||
{
|
{
|
||||||
xd4_doMenuAdvance = std::move(cb);
|
xd4_doMenuAdvance = std::move(cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetMenuCancelCallback(std::function<void(const CGuiTableGroup*)>&& cb)
|
void SetMenuCancelCallback(std::function<void(CGuiTableGroup*)>&& cb)
|
||||||
{
|
{
|
||||||
xec_doMenuCancel = std::move(cb);
|
xec_doMenuCancel = std::move(cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetMenuSelectionChangeCallback(std::function<void(const CGuiTableGroup*)>&& cb)
|
void SetMenuSelectionChangeCallback(std::function<void(CGuiTableGroup*)>&& cb)
|
||||||
{
|
{
|
||||||
x104_doMenuSelChange = std::move(cb);
|
x104_doMenuSelChange = std::move(cb);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,40 +20,62 @@ CGuiTextSupport::CGuiTextSupport(ResId fontId, const CGuiTextProperties& props,
|
||||||
x2cc_font = store->GetObj({SBIG('FONT'), fontId});
|
x2cc_font = store->GetObj({SBIG('FONT'), fontId});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CTextRenderBuffer* CGuiTextSupport::GetCurrentLineRenderBuffer() const
|
||||||
|
{
|
||||||
|
if (x60_renderBuf && !x308_multilineFlag)
|
||||||
|
return const_cast<CTextRenderBuffer*>(&*x60_renderBuf);
|
||||||
|
if (!x308_multilineFlag || x300_ <= x304_lineCounter)
|
||||||
|
return nullptr;
|
||||||
|
int idx = 0;
|
||||||
|
for (const CTextRenderBuffer& buf : x2f0_lineRenderBufs)
|
||||||
|
if (idx++ == x304_lineCounter)
|
||||||
|
return const_cast<CTextRenderBuffer*>(&buf);
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
float CGuiTextSupport::GetCurrentAnimationOverAge() const
|
float CGuiTextSupport::GetCurrentAnimationOverAge() const
|
||||||
{
|
{
|
||||||
if (!x2ac_active || !x50_typeEnable)
|
float ret = 0.f;
|
||||||
return 0.f;
|
if (CTextRenderBuffer* buf = GetCurrentLineRenderBuffer())
|
||||||
|
|
||||||
if (x44_primStartTimes.size())
|
|
||||||
{
|
{
|
||||||
float val = (x60_renderBuf->GetPrimitiveCount() - x44_primStartTimes.back().second) /
|
if (x50_typeEnable)
|
||||||
x58_chRate + x44_primStartTimes.back().first;
|
{
|
||||||
return std::max(0.f, val);
|
if (x40_primStartTimes.size())
|
||||||
|
{
|
||||||
|
auto& lastTime = x40_primStartTimes.back();
|
||||||
|
ret = std::max(ret, (buf->GetPrimitiveCount() - lastTime.second) / x58_chRate + lastTime.first);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
float val = x60_renderBuf->GetPrimitiveCount() / x58_chRate;
|
ret = std::max(ret, buf->GetPrimitiveCount() / x58_chRate);
|
||||||
return std::max(0.f, val);
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
float CGuiTextSupport::GetNumCharsPrinted() const
|
float CGuiTextSupport::GetNumCharsPrinted() const
|
||||||
{
|
{
|
||||||
if (x2ac_active)
|
if (CTextRenderBuffer* buf = GetCurrentLineRenderBuffer())
|
||||||
return std::min(x3c_curTime * x58_chRate, float(x60_renderBuf->GetPrimitiveCount()));
|
{
|
||||||
|
if (x50_typeEnable)
|
||||||
|
{
|
||||||
|
float charsPrinted = x3c_curTime * x58_chRate;
|
||||||
|
return std::min(charsPrinted, float(buf->GetPrimitiveCount()));
|
||||||
|
}
|
||||||
|
}
|
||||||
return 0.f;
|
return 0.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
float CGuiTextSupport::GetTotalAnimationTime() const
|
float CGuiTextSupport::GetTotalAnimationTime() const
|
||||||
{
|
{
|
||||||
if (!x2ac_active || !x50_typeEnable)
|
if (CTextRenderBuffer* buf = GetCurrentLineRenderBuffer())
|
||||||
|
if (x50_typeEnable)
|
||||||
|
return buf->GetPrimitiveCount() / x58_chRate;
|
||||||
return 0.f;
|
return 0.f;
|
||||||
|
|
||||||
return x60_renderBuf->GetPrimitiveCount() / x58_chRate;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CGuiTextSupport::AnimationDone() const
|
bool CGuiTextSupport::IsAnimationDone() const
|
||||||
{
|
{
|
||||||
return x3c_curTime >= GetTotalAnimationTime();
|
return x3c_curTime >= GetTotalAnimationTime();
|
||||||
}
|
}
|
||||||
|
@ -67,15 +89,14 @@ void CGuiTextSupport::SetTypeWriteEffectOptions(bool enable, float chFadeTime, f
|
||||||
|
|
||||||
void CGuiTextSupport::Update(float dt)
|
void CGuiTextSupport::Update(float dt)
|
||||||
{
|
{
|
||||||
if (!x2ac_active)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (x50_typeEnable)
|
if (x50_typeEnable)
|
||||||
{
|
{
|
||||||
for (int i=0 ; i<x60_renderBuf->GetPrimitiveCount() ; ++i)
|
if (CTextRenderBuffer* buf = GetCurrentLineRenderBuffer())
|
||||||
|
{
|
||||||
|
for (int i=0 ; i<buf->GetPrimitiveCount() ; ++i)
|
||||||
{
|
{
|
||||||
float chStartTime = 0.f;
|
float chStartTime = 0.f;
|
||||||
for (const std::pair<float, int>& p : x44_primStartTimes)
|
for (const std::pair<float, int>& p : x40_primStartTimes)
|
||||||
{
|
{
|
||||||
if (p.second < i)
|
if (p.second < i)
|
||||||
continue;
|
continue;
|
||||||
|
@ -90,27 +111,26 @@ void CGuiTextSupport::Update(float dt)
|
||||||
prim.x0_color1.a = std::min(std::max(0.f, (x30_curTime - chStartTime) / x48_chFadeTime), 1.f);
|
prim.x0_color1.a = std::min(std::max(0.f, (x30_curTime - chStartTime) / x48_chFadeTime), 1.f);
|
||||||
x54_renderBuf->SetPrimitive(prim, i);
|
x54_renderBuf->SetPrimitive(prim, i);
|
||||||
#else
|
#else
|
||||||
x60_renderBuf->SetPrimitiveOpacity(i,
|
buf->SetPrimitiveOpacity(i,
|
||||||
std::min(std::max(0.f, (x3c_curTime - chStartTime) / x54_chFadeTime), 1.f));
|
std::min(std::max(0.f, (x3c_curTime - chStartTime) / x54_chFadeTime), 1.f));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
x3c_curTime += dt;
|
x3c_curTime += dt;
|
||||||
|
}
|
||||||
|
|
||||||
|
x10_curTimeMod900 = std::fmod(x10_curTimeMod900 + dt, 900.f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGuiTextSupport::ClearBuffer()
|
void CGuiTextSupport::ClearRenderBuffer()
|
||||||
{
|
{
|
||||||
x60_renderBuf = std::experimental::nullopt;
|
x60_renderBuf = std::experimental::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGuiTextSupport::CheckAndRebuildTextRenderBuffer()
|
void CGuiTextSupport::CheckAndRebuildTextRenderBuffer()
|
||||||
{
|
{
|
||||||
if (x2ac_active)
|
|
||||||
return;
|
|
||||||
|
|
||||||
g_TextExecuteBuf->Clear();
|
g_TextExecuteBuf->Clear();
|
||||||
g_TextExecuteBuf->x18_textState.x48_enableWordWrap = x14_props.x0_wordWrap;
|
g_TextExecuteBuf->x18_textState.x7c_enableWordWrap = x14_props.x0_wordWrap;
|
||||||
g_TextExecuteBuf->BeginBlock(0, 0, x34_extentX, x38_extentY, x14_props.xc_direction,
|
g_TextExecuteBuf->BeginBlock(0, 0, x34_extentX, x38_extentY, x14_props.xc_direction,
|
||||||
x14_props.x4_justification, x14_props.x8_vertJustification);
|
x14_props.x4_justification, x14_props.x8_vertJustification);
|
||||||
g_TextExecuteBuf->AddColor(EColorType::Main, x24_fontColor);
|
g_TextExecuteBuf->AddColor(EColorType::Main, x24_fontColor);
|
||||||
|
@ -124,24 +144,15 @@ void CGuiTextSupport::CheckAndRebuildTextRenderBuffer()
|
||||||
g_TextParser->ParseText(*g_TextExecuteBuf, initStr.c_str(), initStr.size());
|
g_TextParser->ParseText(*g_TextExecuteBuf, initStr.c_str(), initStr.size());
|
||||||
|
|
||||||
g_TextExecuteBuf->EndBlock();
|
g_TextExecuteBuf->EndBlock();
|
||||||
x2b0_assets = g_TextExecuteBuf->GetAssets();
|
|
||||||
|
|
||||||
if (GetIsTextSupportFinishedLoading())
|
|
||||||
{
|
|
||||||
x60_renderBuf = g_TextExecuteBuf->CreateTextRenderBuffer();
|
|
||||||
g_TextExecuteBuf->Clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
Update(0.f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGuiTextSupport::Render() const
|
void CGuiTextSupport::Render() const
|
||||||
{
|
{
|
||||||
if (x2ac_active)
|
if (CTextRenderBuffer* buf = GetCurrentLineRenderBuffer())
|
||||||
{
|
{
|
||||||
zeus::CTransform oldModel = CGraphics::g_GXModelMatrix;
|
zeus::CTransform oldModel = CGraphics::g_GXModelMatrix;
|
||||||
CGraphics::SetModelMatrix(oldModel * zeus::CTransform::Scale(1.f, 1.f, -1.f));
|
CGraphics::SetModelMatrix(oldModel * zeus::CTransform::Scale(1.f, 1.f, -1.f));
|
||||||
x60_renderBuf->Render(x2c_geometryColor, x3c_curTime);
|
buf->Render(x2c_geometryColor, x10_curTimeMod900);
|
||||||
CGraphics::SetModelMatrix(oldModel);
|
CGraphics::SetModelMatrix(oldModel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -155,7 +166,7 @@ void CGuiTextSupport::SetOutlineColor(const zeus::CColor& col)
|
||||||
{
|
{
|
||||||
if (col != x28_outlineColor)
|
if (col != x28_outlineColor)
|
||||||
{
|
{
|
||||||
ClearBuffer();
|
ClearRenderBuffer();
|
||||||
x28_outlineColor = col;
|
x28_outlineColor = col;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -164,44 +175,44 @@ void CGuiTextSupport::SetFontColor(const zeus::CColor& col)
|
||||||
{
|
{
|
||||||
if (col != x24_fontColor)
|
if (col != x24_fontColor)
|
||||||
{
|
{
|
||||||
ClearBuffer();
|
ClearRenderBuffer();
|
||||||
x24_fontColor = col;
|
x24_fontColor = col;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGuiTextSupport::AddText(const std::wstring& str)
|
void CGuiTextSupport::AddText(const std::wstring& str)
|
||||||
{
|
{
|
||||||
if (x2ac_active)
|
if (x60_renderBuf)
|
||||||
{
|
{
|
||||||
float t = GetCurrentAnimationOverAge();
|
float t = GetCurrentAnimationOverAge();
|
||||||
x44_primStartTimes.push_back(std::make_pair(std::max(t, x3c_curTime),
|
x40_primStartTimes.push_back(std::make_pair(std::max(t, x3c_curTime),
|
||||||
x60_renderBuf->GetPrimitiveCount()));
|
x60_renderBuf->GetPrimitiveCount()));
|
||||||
}
|
}
|
||||||
x0_string += str;
|
x0_string += str;
|
||||||
ClearBuffer();
|
ClearRenderBuffer();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGuiTextSupport::SetText(const std::wstring& str, bool scanFlag)
|
void CGuiTextSupport::SetText(const std::wstring& str, bool multiline)
|
||||||
{
|
{
|
||||||
if (x0_string.compare(str))
|
if (x0_string.compare(str))
|
||||||
{
|
{
|
||||||
x44_primStartTimes.clear();
|
x40_primStartTimes.clear();
|
||||||
x3c_curTime = 0.f;
|
x3c_curTime = 0.f;
|
||||||
x0_string = str;
|
x0_string = str;
|
||||||
ClearBuffer();
|
ClearRenderBuffer();
|
||||||
x308_scanFlag = scanFlag;
|
x308_multilineFlag = multiline;
|
||||||
x304_scanCounter = 0;
|
x304_lineCounter = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGuiTextSupport::SetText(const std::string& str, bool scanFlag)
|
void CGuiTextSupport::SetText(const std::string& str, bool multiline)
|
||||||
{
|
{
|
||||||
SetText(hecl::UTF8ToWide(str), scanFlag);
|
SetText(hecl::UTF8ToWide(str), multiline);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CGuiTextSupport::GetIsTextSupportFinishedLoading() const
|
bool CGuiTextSupport::GetIsTextSupportFinishedLoading() const
|
||||||
{
|
{
|
||||||
for (const CToken& tok : x2b0_assets)
|
for (const CToken& tok : x2bc_assets)
|
||||||
{
|
{
|
||||||
((CToken&)tok).Lock();
|
((CToken&)tok).Lock();
|
||||||
if (!tok.IsLoaded())
|
if (!tok.IsLoaded())
|
||||||
|
|
|
@ -77,7 +77,7 @@ class CGuiTextSupport
|
||||||
{
|
{
|
||||||
friend class CGuiTextPane;
|
friend class CGuiTextPane;
|
||||||
std::wstring x0_string;
|
std::wstring x0_string;
|
||||||
float x10_ = 0.f;
|
float x10_curTimeMod900 = 0.f;
|
||||||
CGuiTextProperties x14_props;
|
CGuiTextProperties x14_props;
|
||||||
zeus::CColor x24_fontColor;
|
zeus::CColor x24_fontColor;
|
||||||
zeus::CColor x28_outlineColor;
|
zeus::CColor x28_outlineColor;
|
||||||
|
@ -85,23 +85,24 @@ class CGuiTextSupport
|
||||||
s32 x34_extentX;
|
s32 x34_extentX;
|
||||||
s32 x38_extentY;
|
s32 x38_extentY;
|
||||||
float x3c_curTime = 0.f;
|
float x3c_curTime = 0.f;
|
||||||
std::vector<std::pair<float, int>> x44_primStartTimes;
|
std::vector<std::pair<float, int>> x40_primStartTimes;
|
||||||
bool x50_typeEnable = false;
|
bool x50_typeEnable = false;
|
||||||
float x54_chFadeTime = 0.1f;
|
float x54_chFadeTime = 0.1f;
|
||||||
float x58_chRate = 10.0f;
|
float x58_chRate = 10.0f;
|
||||||
ResId x5c_fontId;
|
ResId x5c_fontId;
|
||||||
std::experimental::optional<CTextRenderBuffer> x60_renderBuf;
|
std::experimental::optional<CTextRenderBuffer> x60_renderBuf;
|
||||||
bool x2ac_active = false;
|
std::vector<CToken> x2bc_assets;
|
||||||
std::vector<CToken> x2b0_assets;
|
|
||||||
TLockedToken<CRasterFont> x2cc_font;
|
TLockedToken<CRasterFont> x2cc_font;
|
||||||
|
|
||||||
zeus::CVector2f x2dc_;
|
zeus::CVector2f x2dc_;
|
||||||
zeus::CVector2f x2e4_;
|
zeus::CVector2f x2e4_;
|
||||||
|
|
||||||
std::list<u8> x2f0_;
|
std::list<CTextRenderBuffer> x2f0_lineRenderBufs;
|
||||||
u32 x300_ = 0;
|
u32 x300_ = 0;
|
||||||
u32 x304_scanCounter = 0;
|
u32 x304_lineCounter = 0;
|
||||||
bool x308_scanFlag = false;
|
bool x308_multilineFlag = false;
|
||||||
|
|
||||||
|
CTextRenderBuffer* GetCurrentLineRenderBuffer() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CGuiTextSupport(ResId fontId, const CGuiTextProperties& props,
|
CGuiTextSupport(ResId fontId, const CGuiTextProperties& props,
|
||||||
|
@ -110,18 +111,18 @@ public:
|
||||||
float GetCurrentAnimationOverAge() const;
|
float GetCurrentAnimationOverAge() const;
|
||||||
float GetNumCharsPrinted() const;
|
float GetNumCharsPrinted() const;
|
||||||
float GetTotalAnimationTime() const;
|
float GetTotalAnimationTime() const;
|
||||||
bool AnimationDone() const;
|
bool IsAnimationDone() const;
|
||||||
void SetTypeWriteEffectOptions(bool enable, float chFadeTime, float chRate);
|
void SetTypeWriteEffectOptions(bool enable, float chFadeTime, float chRate);
|
||||||
void Update(float dt);
|
void Update(float dt);
|
||||||
void ClearBuffer();
|
void ClearRenderBuffer();
|
||||||
void CheckAndRebuildTextRenderBuffer();
|
void CheckAndRebuildTextRenderBuffer();
|
||||||
void Render() const;
|
void Render() const;
|
||||||
void SetGeometryColor(const zeus::CColor& col);
|
void SetGeometryColor(const zeus::CColor& col);
|
||||||
void SetOutlineColor(const zeus::CColor& col);
|
void SetOutlineColor(const zeus::CColor& col);
|
||||||
void SetFontColor(const zeus::CColor& col);
|
void SetFontColor(const zeus::CColor& col);
|
||||||
void AddText(const std::wstring& str);
|
void AddText(const std::wstring& str);
|
||||||
void SetText(const std::wstring& str, bool scanFlag=false); // Flag set for scan write effect
|
void SetText(const std::wstring& str, bool multiline=false);
|
||||||
void SetText(const std::string& str, bool scanFlag=false);
|
void SetText(const std::string& str, bool multiline=false);
|
||||||
bool GetIsTextSupportFinishedLoading() const;
|
bool GetIsTextSupportFinishedLoading() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ void CColorInstruction::Invoke(CFontRenderState& state, CTextRenderBuffer* buf)
|
||||||
|
|
||||||
void CColorOverrideInstruction::Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const
|
void CColorOverrideInstruction::Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const
|
||||||
{
|
{
|
||||||
state.x30_colorOverrides[x4_overrideIdx] = true;
|
state.x64_colorOverrides[x4_overrideIdx] = true;
|
||||||
zeus::CColor convCol = state.ConvertToTextureSpace(x8_color);
|
zeus::CColor convCol = state.ConvertToTextureSpace(x8_color);
|
||||||
state.x0_drawStrOpts.x4_colors[x4_overrideIdx] = convCol;
|
state.x0_drawStrOpts.x4_colors[x4_overrideIdx] = convCol;
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ void CColorOverrideInstruction::Invoke(CFontRenderState& state, CTextRenderBuffe
|
||||||
void CFontInstruction::Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const
|
void CFontInstruction::Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const
|
||||||
{
|
{
|
||||||
buf->AddFontChange(x4_font);
|
buf->AddFontChange(x4_font);
|
||||||
state.x14_font = x4_font;
|
state.x48_font = x4_font;
|
||||||
state.RefreshPalette();
|
state.RefreshPalette();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ size_t CFontInstruction::GetAssetCount() const
|
||||||
|
|
||||||
void CLineExtraSpaceInstruction::Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const
|
void CLineExtraSpaceInstruction::Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const
|
||||||
{
|
{
|
||||||
state.x44_extraLineSpace = x4_extraSpace;
|
state.x78_extraLineSpace = x4_extraSpace;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CLineInstruction::TestLargestFont(s32 monoW, s32 monoH, s32 baseline)
|
void CLineInstruction::TestLargestFont(s32 monoW, s32 monoH, s32 baseline)
|
||||||
|
@ -141,7 +141,7 @@ void CLineInstruction::InvokeLTR(CFontRenderState& state) const
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.x54_curBlock->x1c_vertJustification != EVerticalJustification::Full)
|
if (state.x54_curBlock->x1c_vertJustification != EVerticalJustification::Full)
|
||||||
val = val * state.x40_lineSpacing + state.x44_extraLineSpace;
|
val = val * state.x74_lineSpacing + state.x78_extraLineSpace;
|
||||||
|
|
||||||
state.x70_curY += val;
|
state.x70_curY += val;
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,7 @@ void CLineInstruction::Invoke(CFontRenderState& state, CTextRenderBuffer* buf) c
|
||||||
|
|
||||||
void CLineSpacingInstruction::Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const
|
void CLineSpacingInstruction::Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const
|
||||||
{
|
{
|
||||||
state.x40_lineSpacing = x4_lineSpacing;
|
state.x74_lineSpacing = x4_lineSpacing;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPopStateInstruction::Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const
|
void CPopStateInstruction::Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const
|
||||||
|
@ -171,7 +171,7 @@ void CPushStateInstruction::Invoke(CFontRenderState& state, CTextRenderBuffer* b
|
||||||
|
|
||||||
void CRemoveColorOverrideInstruction::Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const
|
void CRemoveColorOverrideInstruction::Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const
|
||||||
{
|
{
|
||||||
state.x30_colorOverrides[x4_idx] = false;
|
state.x64_colorOverrides[x4_idx] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CImageInstruction::Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const
|
void CImageInstruction::Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const
|
||||||
|
@ -196,7 +196,7 @@ void CImageInstruction::Invoke(CFontRenderState& state, CTextRenderBuffer* buf)
|
||||||
void CTextInstruction::Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const
|
void CTextInstruction::Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const
|
||||||
{
|
{
|
||||||
int xOut, yOut;
|
int xOut, yOut;
|
||||||
state.x14_font.GetObj()->DrawString(state.x0_drawStrOpts, state.x6c_curX,
|
state.x48_font.GetObj()->DrawString(state.x0_drawStrOpts, state.x6c_curX,
|
||||||
state.x74_currentLineInst->x18_largestBaseline + state.x70_curY,
|
state.x74_currentLineInst->x18_largestBaseline + state.x70_curY,
|
||||||
xOut, yOut, buf, x4_str.c_str(), x4_str.size());
|
xOut, yOut, buf, x4_str.c_str(), x4_str.size());
|
||||||
state.x6c_curX = xOut;
|
state.x6c_curX = xOut;
|
||||||
|
@ -254,7 +254,7 @@ void CBlockInstruction::Invoke(CFontRenderState& state, CTextRenderBuffer* buf)
|
||||||
|
|
||||||
void CWordInstruction::InvokeLTR(CFontRenderState& state) const
|
void CWordInstruction::InvokeLTR(CFontRenderState& state) const
|
||||||
{
|
{
|
||||||
CRasterFont* font = state.x14_font.GetObj();
|
CRasterFont* font = state.x48_font.GetObj();
|
||||||
wchar_t space = L' ';
|
wchar_t space = L' ';
|
||||||
int w, h;
|
int w, h;
|
||||||
font->GetSize(state.x0_drawStrOpts, w, h, &space, 1);
|
font->GetSize(state.x0_drawStrOpts, w, h, &space, 1);
|
||||||
|
|
|
@ -21,6 +21,21 @@ void CSaveUI::ProcessUserInput(const CFinalInput& input)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CSaveUI::StartGame(int idx)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSaveUI::EraseGame(int idx)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void* CSaveUI::GetGameData(int idx) const
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
CSaveUI::CSaveUI(u32 instIdx, u32 a, u32 b)
|
CSaveUI::CSaveUI(u32 instIdx, u32 a, u32 b)
|
||||||
: x0_instIdx(instIdx), x8_a(a), xc_b(b)
|
: x0_instIdx(instIdx), x8_a(a), xc_b(b)
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,6 +39,9 @@ struct CSaveUI
|
||||||
CIOWin::EMessageReturn Update(float dt);
|
CIOWin::EMessageReturn Update(float dt);
|
||||||
bool PumpLoad();
|
bool PumpLoad();
|
||||||
void ProcessUserInput(const CFinalInput& input);
|
void ProcessUserInput(const CFinalInput& input);
|
||||||
|
void StartGame(int idx);
|
||||||
|
void EraseGame(int idx);
|
||||||
|
void* GetGameData(int idx) const;
|
||||||
CSaveUI(u32 inst, u32 a, u32 b);
|
CSaveUI(u32 inst, u32 a, u32 b);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -23,20 +23,20 @@ class CSaveableState
|
||||||
friend class CGuiTextSupport;
|
friend class CGuiTextSupport;
|
||||||
protected:
|
protected:
|
||||||
CDrawStringOptions x0_drawStrOpts;
|
CDrawStringOptions x0_drawStrOpts;
|
||||||
TToken<CRasterFont> x14_font;
|
TLockedToken<CRasterFont> x48_font;
|
||||||
std::vector<CTextColor> x20_;
|
std::vector<CTextColor> x54_;
|
||||||
std::vector<bool> x30_colorOverrides;
|
std::vector<bool> x64_colorOverrides;
|
||||||
float x40_lineSpacing = 1.f;
|
float x74_lineSpacing = 1.f;
|
||||||
s32 x44_extraLineSpace = 0;
|
s32 x78_extraLineSpace = 0;
|
||||||
bool x48_enableWordWrap = false;
|
bool x7c_enableWordWrap = false;
|
||||||
EJustification x4c_just = EJustification::Left;
|
EJustification x80_just = EJustification::Left;
|
||||||
EVerticalJustification x50_vjust = EVerticalJustification::Top;
|
EVerticalJustification x84_vjust = EVerticalJustification::Top;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CSaveableState()
|
CSaveableState()
|
||||||
{
|
{
|
||||||
x20_.resize(3, zeus::CColor::skBlack);
|
x54_.resize(3, zeus::CColor::skBlack);
|
||||||
x30_colorOverrides.resize(16);
|
x64_colorOverrides.resize(16);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ std::vector<CToken> CTextExecuteBuffer::GetAssets() const
|
||||||
|
|
||||||
void CTextExecuteBuffer::AddString(const wchar_t* str, int count)
|
void CTextExecuteBuffer::AddString(const wchar_t* str, int count)
|
||||||
{
|
{
|
||||||
if (!x70_curLine)
|
if (!xa4_curLine)
|
||||||
StartNewLine();
|
StartNewLine();
|
||||||
|
|
||||||
const wchar_t* charCur = str;
|
const wchar_t* charCur = str;
|
||||||
|
@ -70,17 +70,17 @@ void CTextExecuteBuffer::AddString(const wchar_t* str, int count)
|
||||||
StartNewWord();
|
StartNewWord();
|
||||||
int w, h;
|
int w, h;
|
||||||
wchar_t space = L' ';
|
wchar_t space = L' ';
|
||||||
x18_textState.x14_font.GetObj()->GetSize(x18_textState.x0_drawStrOpts,
|
x18_textState.x48_font.GetObj()->GetSize(x18_textState.x0_drawStrOpts,
|
||||||
w, h, &space, 1);
|
w, h, &space, 1);
|
||||||
if (x6c_curBlock->x14_direction == ETextDirection::Horizontal)
|
if (xa0_curBlock->x14_direction == ETextDirection::Horizontal)
|
||||||
{
|
{
|
||||||
x70_curLine->x8_curX += w;
|
xa4_curLine->x8_curX += w;
|
||||||
x88_spaceDistance = w;
|
xbc_spaceDistance = w;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
x70_curLine->xc_curY += h;
|
xa4_curLine->xc_curY += h;
|
||||||
x88_spaceDistance = h;
|
xbc_spaceDistance = h;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -92,31 +92,31 @@ void CTextExecuteBuffer::AddString(const wchar_t* str, int count)
|
||||||
|
|
||||||
void CTextExecuteBuffer::AddStringFragment(const wchar_t* str, int len)
|
void CTextExecuteBuffer::AddStringFragment(const wchar_t* str, int len)
|
||||||
{
|
{
|
||||||
if (x6c_curBlock->x14_direction == ETextDirection::Horizontal)
|
if (xa0_curBlock->x14_direction == ETextDirection::Horizontal)
|
||||||
for (int i=0 ; i<len ;)
|
for (int i=0 ; i<len ;)
|
||||||
i += WrapOneLTR(str + i, len - i);
|
i += WrapOneLTR(str + i, len - i);
|
||||||
}
|
}
|
||||||
|
|
||||||
int CTextExecuteBuffer::WrapOneLTR(const wchar_t* str, int len)
|
int CTextExecuteBuffer::WrapOneLTR(const wchar_t* str, int len)
|
||||||
{
|
{
|
||||||
if (!x18_textState.x14_font)
|
if (!x18_textState.x48_font)
|
||||||
return len;
|
return len;
|
||||||
|
|
||||||
CRasterFont* font = x18_textState.x14_font.GetObj();
|
CRasterFont* font = x18_textState.x48_font.GetObj();
|
||||||
int rem = len;
|
int rem = len;
|
||||||
int w, h;
|
int w, h;
|
||||||
x18_textState.x14_font.GetObj()->GetSize(x18_textState.x0_drawStrOpts,
|
x18_textState.x48_font.GetObj()->GetSize(x18_textState.x0_drawStrOpts,
|
||||||
w, h, str, len);
|
w, h, str, len);
|
||||||
|
|
||||||
if (x18_textState.x48_enableWordWrap)
|
if (x18_textState.x7c_enableWordWrap)
|
||||||
{
|
{
|
||||||
if (w + x70_curLine->x8_curX > x6c_curBlock->xc_blockExtentX &&
|
if (w + xa4_curLine->x8_curX > xa0_curBlock->xc_blockExtentX &&
|
||||||
x70_curLine->x4_wordCount > 1 &&
|
xa4_curLine->x4_wordCount > 1 &&
|
||||||
x7c_curX + w < x6c_curBlock->xc_blockExtentX)
|
xb0_curX + w < xa0_curBlock->xc_blockExtentX)
|
||||||
{
|
{
|
||||||
MoveWordLTR();
|
MoveWordLTR();
|
||||||
}
|
}
|
||||||
if (w + x70_curLine->x8_curX > x6c_curBlock->xc_blockExtentX && len > 1)
|
if (w + xa4_curLine->x8_curX > xa0_curBlock->xc_blockExtentX && len > 1)
|
||||||
{
|
{
|
||||||
const wchar_t* strEnd = str + len;
|
const wchar_t* strEnd = str + len;
|
||||||
int aRank = 5;
|
int aRank = 5;
|
||||||
|
@ -137,23 +137,23 @@ int CTextExecuteBuffer::WrapOneLTR(const wchar_t* str, int len)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
x18_textState.x14_font.GetObj()->GetSize(x18_textState.x0_drawStrOpts,
|
x18_textState.x48_font.GetObj()->GetSize(x18_textState.x0_drawStrOpts,
|
||||||
w, h, str, rem);
|
w, h, str, rem);
|
||||||
}
|
}
|
||||||
|
|
||||||
} while (w + x70_curLine->x8_curX > x6c_curBlock->xc_blockExtentX && rem > 1);
|
} while (w + xa4_curLine->x8_curX > xa0_curBlock->xc_blockExtentX && rem > 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
x78_curY = std::max(x78_curY, font->GetMonoHeight());
|
xac_curY = std::max(xac_curY, font->GetMonoHeight());
|
||||||
|
|
||||||
x70_curLine->TestLargestFont(font->GetMonoWidth(),
|
xa4_curLine->TestLargestFont(font->GetMonoWidth(),
|
||||||
font->GetMonoHeight(),
|
font->GetMonoHeight(),
|
||||||
font->GetBaseline());
|
font->GetBaseline());
|
||||||
|
|
||||||
x70_curLine->x8_curX += w;
|
xa4_curLine->x8_curX += w;
|
||||||
x6c_curBlock->x2c_lineX = std::max(x6c_curBlock->x2c_lineX, x70_curLine->x8_curX);
|
xa0_curBlock->x2c_lineX = std::max(xa0_curBlock->x2c_lineX, xa4_curLine->x8_curX);
|
||||||
x7c_curX += w;
|
xb0_curX += w;
|
||||||
|
|
||||||
x0_instList.emplace(x0_instList.cend(), new CTextInstruction(str, rem));
|
x0_instList.emplace(x0_instList.cend(), new CTextInstruction(str, rem));
|
||||||
|
|
||||||
|
@ -165,63 +165,63 @@ int CTextExecuteBuffer::WrapOneLTR(const wchar_t* str, int len)
|
||||||
|
|
||||||
void CTextExecuteBuffer::MoveWordLTR()
|
void CTextExecuteBuffer::MoveWordLTR()
|
||||||
{
|
{
|
||||||
x70_curLine->xc_curY = std::min(x70_curLine->xc_curY, x84_);
|
xa4_curLine->xc_curY = std::min(xa4_curLine->xc_curY, xb8_);
|
||||||
x88_spaceDistance = 0;
|
xbc_spaceDistance = 0;
|
||||||
--x70_curLine->x4_wordCount;
|
--xa4_curLine->x4_wordCount;
|
||||||
TerminateLineLTR();
|
TerminateLineLTR();
|
||||||
|
|
||||||
x70_curLine = static_cast<CLineInstruction*>(x0_instList.emplace(x74_curWordIt,
|
xa4_curLine = static_cast<CLineInstruction*>(x0_instList.emplace(xa8_curWordIt,
|
||||||
new CLineInstruction(x18_textState.x4c_just, x18_textState.x50_vjust))->get());
|
new CLineInstruction(x18_textState.x80_just, x18_textState.x84_vjust))->get());
|
||||||
|
|
||||||
x0_instList.emplace(x74_curWordIt, new CWordInstruction());
|
x0_instList.emplace(xa8_curWordIt, new CWordInstruction());
|
||||||
|
|
||||||
++x6c_curBlock->x34_lineCount;
|
++xa0_curBlock->x34_lineCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTextExecuteBuffer::StartNewLine()
|
void CTextExecuteBuffer::StartNewLine()
|
||||||
{
|
{
|
||||||
if (x70_curLine)
|
if (xa4_curLine)
|
||||||
TerminateLine();
|
TerminateLine();
|
||||||
|
|
||||||
x74_curWordIt = x0_instList.emplace(x0_instList.cend(),
|
xa8_curWordIt = x0_instList.emplace(x0_instList.cend(),
|
||||||
new CLineInstruction(x18_textState.x4c_just, x18_textState.x50_vjust));
|
new CLineInstruction(x18_textState.x80_just, x18_textState.x84_vjust));
|
||||||
x88_spaceDistance = 0;
|
xbc_spaceDistance = 0;
|
||||||
|
|
||||||
StartNewWord();
|
StartNewWord();
|
||||||
++x6c_curBlock->x34_lineCount;
|
++xa0_curBlock->x34_lineCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTextExecuteBuffer::StartNewWord()
|
void CTextExecuteBuffer::StartNewWord()
|
||||||
{
|
{
|
||||||
x74_curWordIt = x0_instList.emplace(x0_instList.cend(), new CWordInstruction());
|
xa8_curWordIt = x0_instList.emplace(x0_instList.cend(), new CWordInstruction());
|
||||||
x7c_curX = 0;
|
xb0_curX = 0;
|
||||||
x78_curY = 0;
|
xac_curY = 0;
|
||||||
x80_ = x70_curLine->x8_curX;
|
xb4_ = xa4_curLine->x8_curX;
|
||||||
x84_ = x70_curLine->xc_curY;
|
xb8_ = xa4_curLine->xc_curY;
|
||||||
++x70_curLine->x4_wordCount;
|
++xa4_curLine->x4_wordCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTextExecuteBuffer::TerminateLine()
|
void CTextExecuteBuffer::TerminateLine()
|
||||||
{
|
{
|
||||||
if (x6c_curBlock->x14_direction == ETextDirection::Horizontal)
|
if (xa0_curBlock->x14_direction == ETextDirection::Horizontal)
|
||||||
TerminateLineLTR();
|
TerminateLineLTR();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTextExecuteBuffer::TerminateLineLTR()
|
void CTextExecuteBuffer::TerminateLineLTR()
|
||||||
{
|
{
|
||||||
if (!x70_curLine->xc_curY && x18_textState.x14_font)
|
if (!xa4_curLine->xc_curY && x18_textState.x48_font)
|
||||||
{
|
{
|
||||||
x70_curLine->xc_curY = x70_curLine->x10_largestMonoHeight;
|
xa4_curLine->xc_curY = xa4_curLine->x10_largestMonoHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x6c_curBlock->x1c_vertJustification == EVerticalJustification::Full)
|
if (xa0_curBlock->x1c_vertJustification == EVerticalJustification::Full)
|
||||||
{
|
{
|
||||||
x6c_curBlock->x30_lineY += x70_curLine->xc_curY;
|
xa0_curBlock->x30_lineY += xa4_curLine->xc_curY;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
x6c_curBlock->x30_lineY += x18_textState.x44_extraLineSpace +
|
xa0_curBlock->x30_lineY += x18_textState.x78_extraLineSpace +
|
||||||
x70_curLine->xc_curY * x18_textState.x40_lineSpacing;
|
xa4_curLine->xc_curY * x18_textState.x74_lineSpacing;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,52 +229,52 @@ void CTextExecuteBuffer::AddPopState()
|
||||||
{
|
{
|
||||||
x0_instList.emplace(x0_instList.cend(), new CPopStateInstruction());
|
x0_instList.emplace(x0_instList.cend(), new CPopStateInstruction());
|
||||||
|
|
||||||
x18_textState = x8c_stateStack.back();
|
x18_textState = xc4_stateStack.back();
|
||||||
x8c_stateStack.pop_back();
|
xc4_stateStack.pop_back();
|
||||||
|
|
||||||
if (!x70_curLine->x8_curX)
|
if (!xa4_curLine->x8_curX)
|
||||||
{
|
{
|
||||||
x70_curLine->x1c_just = x18_textState.x4c_just;
|
xa4_curLine->x1c_just = x18_textState.x80_just;
|
||||||
x70_curLine->x20_vjust = x18_textState.x50_vjust;
|
xa4_curLine->x20_vjust = x18_textState.x84_vjust;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTextExecuteBuffer::AddPushState()
|
void CTextExecuteBuffer::AddPushState()
|
||||||
{
|
{
|
||||||
x0_instList.emplace(x0_instList.cend(), new CPushStateInstruction());
|
x0_instList.emplace(x0_instList.cend(), new CPushStateInstruction());
|
||||||
x8c_stateStack.push_back(x18_textState);
|
xc4_stateStack.push_back(x18_textState);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTextExecuteBuffer::AddVerticalJustification(EVerticalJustification vjust)
|
void CTextExecuteBuffer::AddVerticalJustification(EVerticalJustification vjust)
|
||||||
{
|
{
|
||||||
x18_textState.x50_vjust = vjust;
|
x18_textState.x84_vjust = vjust;
|
||||||
if (!x70_curLine)
|
if (!xa4_curLine)
|
||||||
return;
|
return;
|
||||||
if (x70_curLine->x8_curX)
|
if (xa4_curLine->x8_curX)
|
||||||
return;
|
return;
|
||||||
x70_curLine->x20_vjust = vjust;
|
xa4_curLine->x20_vjust = vjust;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTextExecuteBuffer::AddJustification(EJustification just)
|
void CTextExecuteBuffer::AddJustification(EJustification just)
|
||||||
{
|
{
|
||||||
x18_textState.x4c_just = just;
|
x18_textState.x80_just = just;
|
||||||
if (!x70_curLine)
|
if (!xa4_curLine)
|
||||||
return;
|
return;
|
||||||
if (x70_curLine->x8_curX)
|
if (xa4_curLine->x8_curX)
|
||||||
return;
|
return;
|
||||||
x70_curLine->x1c_just = just;
|
xa4_curLine->x1c_just = just;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTextExecuteBuffer::AddLineExtraSpace(s32 space)
|
void CTextExecuteBuffer::AddLineExtraSpace(s32 space)
|
||||||
{
|
{
|
||||||
x0_instList.emplace(x0_instList.cend(), new CLineExtraSpaceInstruction(space));
|
x0_instList.emplace(x0_instList.cend(), new CLineExtraSpaceInstruction(space));
|
||||||
x18_textState.x44_extraLineSpace = space;
|
x18_textState.x78_extraLineSpace = space;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTextExecuteBuffer::AddLineSpacing(float spacing)
|
void CTextExecuteBuffer::AddLineSpacing(float spacing)
|
||||||
{
|
{
|
||||||
x0_instList.emplace(x0_instList.cend(), new CLineSpacingInstruction(spacing));
|
x0_instList.emplace(x0_instList.cend(), new CLineSpacingInstruction(spacing));
|
||||||
x18_textState.x40_lineSpacing = spacing;
|
x18_textState.x74_lineSpacing = spacing;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTextExecuteBuffer::AddRemoveColorOverride(int idx)
|
void CTextExecuteBuffer::AddRemoveColorOverride(int idx)
|
||||||
|
@ -294,19 +294,19 @@ void CTextExecuteBuffer::AddColor(EColorType tp, const CTextColor& color)
|
||||||
|
|
||||||
void CTextExecuteBuffer::AddImage(const CFontImageDef& image)
|
void CTextExecuteBuffer::AddImage(const CFontImageDef& image)
|
||||||
{
|
{
|
||||||
if (!x70_curLine)
|
if (!xa4_curLine)
|
||||||
StartNewLine();
|
StartNewLine();
|
||||||
|
|
||||||
if (x6c_curBlock)
|
if (xa0_curBlock)
|
||||||
{
|
{
|
||||||
const CTexture* tex = image.x4_texs[0].GetObj();
|
const CTexture* tex = image.x4_texs[0].GetObj();
|
||||||
int width = tex->GetWidth() * image.x14_pointsPerTexel.x;
|
int width = tex->GetWidth() * image.x14_pointsPerTexel.x;
|
||||||
int height = tex->GetHeight() * image.x14_pointsPerTexel.y;
|
int height = tex->GetHeight() * image.x14_pointsPerTexel.y;
|
||||||
x70_curLine->TestLargestFont(width, height, height);
|
xa4_curLine->TestLargestFont(width, height, height);
|
||||||
|
|
||||||
if (x6c_curBlock->x14_direction == ETextDirection::Horizontal)
|
if (xa0_curBlock->x14_direction == ETextDirection::Horizontal)
|
||||||
if (x70_curLine->x8_curX > width)
|
if (xa4_curLine->x8_curX > width)
|
||||||
x6c_curBlock->x2c_lineX = x70_curLine->x8_curX;
|
xa0_curBlock->x2c_lineX = xa4_curLine->x8_curX;
|
||||||
}
|
}
|
||||||
|
|
||||||
x0_instList.emplace(x0_instList.cend(), new CImageInstruction(image));
|
x0_instList.emplace(x0_instList.cend(), new CImageInstruction(image));
|
||||||
|
@ -315,25 +315,25 @@ void CTextExecuteBuffer::AddImage(const CFontImageDef& image)
|
||||||
void CTextExecuteBuffer::AddFont(const TToken<CRasterFont>& font)
|
void CTextExecuteBuffer::AddFont(const TToken<CRasterFont>& font)
|
||||||
{
|
{
|
||||||
x0_instList.emplace(x0_instList.cend(), new CFontInstruction(font));
|
x0_instList.emplace(x0_instList.cend(), new CFontInstruction(font));
|
||||||
x18_textState.x14_font = font;
|
x18_textState.x48_font = font;
|
||||||
|
|
||||||
if (x6c_curBlock)
|
if (xa0_curBlock)
|
||||||
x6c_curBlock->TestLargestFont(font->GetMonoWidth(),
|
xa0_curBlock->TestLargestFont(font->GetMonoWidth(),
|
||||||
font->GetMonoHeight(),
|
font->GetMonoHeight(),
|
||||||
font->GetBaseline());
|
font->GetBaseline());
|
||||||
|
|
||||||
if (x70_curLine)
|
if (xa4_curLine)
|
||||||
x70_curLine->TestLargestFont(font->GetMonoWidth(),
|
xa4_curLine->TestLargestFont(font->GetMonoWidth(),
|
||||||
font->GetMonoHeight(),
|
font->GetMonoHeight(),
|
||||||
font->GetBaseline());
|
font->GetBaseline());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTextExecuteBuffer::EndBlock()
|
void CTextExecuteBuffer::EndBlock()
|
||||||
{
|
{
|
||||||
if (x70_curLine)
|
if (xa4_curLine)
|
||||||
TerminateLine();
|
TerminateLine();
|
||||||
x70_curLine = nullptr;
|
xa4_curLine = nullptr;
|
||||||
x6c_curBlock = nullptr;
|
xa0_curBlock = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTextExecuteBuffer::BeginBlock(s32 offX, s32 offY, s32 padX, s32 padY,
|
void CTextExecuteBuffer::BeginBlock(s32 offX, s32 offY, s32 padX, s32 padY,
|
||||||
|
@ -343,9 +343,9 @@ void CTextExecuteBuffer::BeginBlock(s32 offX, s32 offY, s32 padX, s32 padY,
|
||||||
x0_instList.emplace(x0_instList.cend(),
|
x0_instList.emplace(x0_instList.cend(),
|
||||||
new CBlockInstruction(offX, offY, padX, padY, dir, just, vjust));
|
new CBlockInstruction(offX, offY, padX, padY, dir, just, vjust));
|
||||||
|
|
||||||
if (x18_textState.x14_font)
|
if (x18_textState.x48_font)
|
||||||
{
|
{
|
||||||
CRasterFont* font = x18_textState.x14_font.GetObj();
|
CRasterFont* font = x18_textState.x48_font.GetObj();
|
||||||
s32 baseline = font->GetBaseline();
|
s32 baseline = font->GetBaseline();
|
||||||
s32 monoH = font->GetMonoHeight();
|
s32 monoH = font->GetMonoHeight();
|
||||||
s32 monoW = font->GetMonoWidth();
|
s32 monoW = font->GetMonoWidth();
|
||||||
|
@ -354,20 +354,20 @@ void CTextExecuteBuffer::BeginBlock(s32 offX, s32 offY, s32 padX, s32 padY,
|
||||||
}
|
}
|
||||||
|
|
||||||
x18_textState.x0_drawStrOpts.x0_direction = dir;
|
x18_textState.x0_drawStrOpts.x0_direction = dir;
|
||||||
x18_textState.x4c_just = just;
|
x18_textState.x80_just = just;
|
||||||
x18_textState.x50_vjust = vjust;
|
x18_textState.x84_vjust = vjust;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTextExecuteBuffer::Clear()
|
void CTextExecuteBuffer::Clear()
|
||||||
{
|
{
|
||||||
x0_instList.clear();
|
x0_instList.clear();
|
||||||
x18_textState = CSaveableState();
|
x18_textState = CSaveableState();
|
||||||
x6c_curBlock = nullptr;
|
xa0_curBlock = nullptr;
|
||||||
x70_curLine = nullptr;
|
xa4_curLine = nullptr;
|
||||||
x74_curWordIt = x0_instList.begin();
|
xa8_curWordIt = x0_instList.begin();
|
||||||
x80_ = 0;
|
xb4_ = 0;
|
||||||
x84_ = 0;
|
xb8_ = 0;
|
||||||
x88_spaceDistance = 0;
|
xbc_spaceDistance = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,20 +20,22 @@ class CTextExecuteBuffer
|
||||||
std::list<std::shared_ptr<CInstruction>> x0_instList;
|
std::list<std::shared_ptr<CInstruction>> x0_instList;
|
||||||
u32 x14_ = 0;
|
u32 x14_ = 0;
|
||||||
CSaveableState x18_textState;
|
CSaveableState x18_textState;
|
||||||
CBlockInstruction* x6c_curBlock = nullptr;
|
CBlockInstruction* xa0_curBlock = nullptr;
|
||||||
CLineInstruction* x70_curLine = nullptr;
|
CLineInstruction* xa4_curLine = nullptr;
|
||||||
std::list<std::shared_ptr<CInstruction>>::iterator x74_curWordIt;
|
std::list<std::shared_ptr<CInstruction>>::iterator xa8_curWordIt;
|
||||||
s32 x78_curY;
|
s32 xac_curY;
|
||||||
s32 x7c_curX;
|
s32 xb0_curX;
|
||||||
s32 x80_ = 0;
|
s32 xb4_ = 0;
|
||||||
s32 x84_ = 0;
|
s32 xb8_ = 0;
|
||||||
s32 x88_spaceDistance = 0;
|
s32 xbc_spaceDistance = 0;
|
||||||
std::vector<CSaveableState> x8c_stateStack;
|
bool xc0_ = false;
|
||||||
|
std::list<CSaveableState> xc4_stateStack;
|
||||||
|
u32 xd8_ = 0;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CTextExecuteBuffer()
|
CTextExecuteBuffer()
|
||||||
{
|
{
|
||||||
x74_curWordIt = x0_instList.begin();
|
xa8_curWordIt = x0_instList.begin();
|
||||||
}
|
}
|
||||||
|
|
||||||
CTextRenderBuffer CreateTextRenderBuffer() const;
|
CTextRenderBuffer CreateTextRenderBuffer() const;
|
||||||
|
|
|
@ -64,29 +64,28 @@ static const FEMovie FEMovies[] =
|
||||||
|
|
||||||
SObjectTag g_DefaultWorldTag = {FOURCC('MLVL'), 0x158efe17};
|
SObjectTag g_DefaultWorldTag = {FOURCC('MLVL'), 0x158efe17};
|
||||||
|
|
||||||
|
void CFrontEndUI::PlayAdvanceSfx()
|
||||||
|
{
|
||||||
|
CSfxManager::SfxStart(1096, 1.f, 0.f, false, 0x7f, false, kInvalidAreaId);
|
||||||
|
CSfxManager::SfxStart(1091, 1.f, 0.f, false, 0x7f, false, kInvalidAreaId);
|
||||||
|
}
|
||||||
|
|
||||||
CFrontEndUI::SNewFileSelectFrame::SNewFileSelectFrame(CSaveUI* sui, u32 rnd)
|
CFrontEndUI::SNewFileSelectFrame::SNewFileSelectFrame(CSaveUI* sui, u32 rnd)
|
||||||
: x0_rnd(rnd), x4_saveUI(sui)
|
: x0_rnd(rnd), x4_saveUI(sui)
|
||||||
{
|
{
|
||||||
x10_frme = g_SimplePool->GetObj("FRME_NewFileSelect");
|
x10_frme = g_SimplePool->GetObj("FRME_NewFileSelect");
|
||||||
}
|
}
|
||||||
|
|
||||||
CFrontEndUI::SFileSelectOption CFrontEndUI::FindFileSelectOption(CGuiFrame* frame, int idx)
|
|
||||||
{
|
|
||||||
SFileSelectOption ret;
|
|
||||||
ret.x0_base = frame->FindWidget(hecl::Format("basewidget_file%d", idx).c_str());
|
|
||||||
ret.x4_textpanes[0] = FindTextPanePair(frame, hecl::Format("textpane_filename%d", idx).c_str());
|
|
||||||
ret.x4_textpanes[1] = FindTextPanePair(frame, hecl::Format("textpane_world%d", idx).c_str());
|
|
||||||
ret.x4_textpanes[2] = FindTextPanePair(frame, hecl::Format("textpane_playtime%d", idx).c_str());
|
|
||||||
ret.x4_textpanes[3] = FindTextPanePair(frame, hecl::Format("textpane_date%d", idx).c_str());
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CFrontEndUI::SNewFileSelectFrame::FinishedLoading()
|
void CFrontEndUI::SNewFileSelectFrame::FinishedLoading()
|
||||||
{
|
{
|
||||||
x20_tablegroup_fileselect = static_cast<CGuiTableGroup*>(x1c_loadedFrame->FindWidget("tablegroup_fileselect"));
|
x20_tablegroup_fileselect = static_cast<CGuiTableGroup*>(x1c_loadedFrame->FindWidget("tablegroup_fileselect"));
|
||||||
x24_model_erase = static_cast<CGuiModel*>(x1c_loadedFrame->FindWidget("model_erase"));
|
x24_model_erase = static_cast<CGuiModel*>(x1c_loadedFrame->FindWidget("model_erase"));
|
||||||
xf8_model_erase_position = x24_model_erase->GetLocalPosition();
|
xf8_model_erase_position = x24_model_erase->GetLocalPosition();
|
||||||
x28_textpane_erase = FindTextPanePair(x1c_loadedFrame, "textpane_erase");
|
x28_textpane_erase = FindTextPanePair(x1c_loadedFrame, "textpane_erase");
|
||||||
|
x38_textpane_gba = FindTextPanePair(x1c_loadedFrame, "textpane_gba");
|
||||||
|
x30_textpane_cheats = FindTextPanePair(x1c_loadedFrame, "textpane_cheats");
|
||||||
|
x48_textpane_popupadvance = FindTextPanePair(x1c_loadedFrame, "textpane_popupadvance");
|
||||||
|
x50_textpane_popupcancel = FindTextPanePair(x1c_loadedFrame, "textpane_popupcancel");
|
||||||
x58_textpane_popupextra = FindTextPanePair(x1c_loadedFrame, "textpane_popupextra");
|
x58_textpane_popupextra = FindTextPanePair(x1c_loadedFrame, "textpane_popupextra");
|
||||||
x40_tablegroup_popup = static_cast<CGuiTableGroup*>(x1c_loadedFrame->FindWidget("tablegroup_popup"));
|
x40_tablegroup_popup = static_cast<CGuiTableGroup*>(x1c_loadedFrame->FindWidget("tablegroup_popup"));
|
||||||
x44_model_dash7 = static_cast<CGuiModel*>(x1c_loadedFrame->FindWidget("model_dash7"));
|
x44_model_dash7 = static_cast<CGuiModel*>(x1c_loadedFrame->FindWidget("model_dash7"));
|
||||||
|
@ -146,9 +145,9 @@ bool CFrontEndUI::SNewFileSelectFrame::IsTextDoneAnimating() const
|
||||||
return false;
|
return false;
|
||||||
if (x64_fileSelections[2].x28_ != 4)
|
if (x64_fileSelections[2].x28_ != 4)
|
||||||
return false;
|
return false;
|
||||||
if (!x28_textpane_erase.x0_panes[0]->GetTextSupport()->AnimationDone())
|
if (!x28_textpane_erase.x0_panes[0]->GetTextSupport()->IsAnimationDone())
|
||||||
return false;
|
return false;
|
||||||
return x38_.x0_panes[0]->GetTextSupport()->AnimationDone();
|
return x38_textpane_gba.x0_panes[0]->GetTextSupport()->IsAnimationDone();
|
||||||
}
|
}
|
||||||
|
|
||||||
CFrontEndUI::SNewFileSelectFrame::EPhase
|
CFrontEndUI::SNewFileSelectFrame::EPhase
|
||||||
|
@ -162,12 +161,21 @@ CFrontEndUI::SNewFileSelectFrame::ProcessUserInput(const CFinalInput& input)
|
||||||
return xc_phase;
|
return xc_phase;
|
||||||
if (x10c_inputEnable)
|
if (x10c_inputEnable)
|
||||||
x1c_loadedFrame->ProcessUserInput(input);
|
x1c_loadedFrame->ProcessUserInput(input);
|
||||||
if (x10d_needsToggle)
|
if (x10d_needsExistingToggle)
|
||||||
{
|
{
|
||||||
if (x40_tablegroup_popup->GetIsActive())
|
if (x40_tablegroup_popup->GetIsActive())
|
||||||
DeactivatePopup();
|
DeactivateExistingGamePopup();
|
||||||
else
|
else
|
||||||
ActivatePopup();
|
ActivateExistingGamePopup();
|
||||||
|
x10d_needsExistingToggle = false;
|
||||||
|
}
|
||||||
|
if (x10e_needsNewToggle)
|
||||||
|
{
|
||||||
|
if (x40_tablegroup_popup->GetIsActive())
|
||||||
|
DeactivateNewGamePopup();
|
||||||
|
else
|
||||||
|
ActivateNewGamePopup();
|
||||||
|
x10e_needsNewToggle = false;
|
||||||
}
|
}
|
||||||
return xc_phase;
|
return xc_phase;
|
||||||
}
|
}
|
||||||
|
@ -189,7 +197,7 @@ void CFrontEndUI::SNewFileSelectFrame::HandleActiveChange(CGuiTableGroup* active
|
||||||
x24_model_erase->SetIsVisible(true);
|
x24_model_erase->SetIsVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrontEndUI::SNewFileSelectFrame::DeactivatePopup()
|
void CFrontEndUI::SNewFileSelectFrame::DeactivateExistingGamePopup()
|
||||||
{
|
{
|
||||||
x40_tablegroup_popup->SetIsActive(false);
|
x40_tablegroup_popup->SetIsActive(false);
|
||||||
x40_tablegroup_popup->SetIsVisible(false);
|
x40_tablegroup_popup->SetIsVisible(false);
|
||||||
|
@ -199,7 +207,7 @@ void CFrontEndUI::SNewFileSelectFrame::DeactivatePopup()
|
||||||
x0_base->SetColor(zeus::CColor::skWhite);
|
x0_base->SetColor(zeus::CColor::skWhite);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrontEndUI::SNewFileSelectFrame::ActivatePopup()
|
void CFrontEndUI::SNewFileSelectFrame::ActivateExistingGamePopup()
|
||||||
{
|
{
|
||||||
x40_tablegroup_popup->SetIsActive(true);
|
x40_tablegroup_popup->SetIsActive(true);
|
||||||
x40_tablegroup_popup->SetIsVisible(true);
|
x40_tablegroup_popup->SetIsVisible(true);
|
||||||
|
@ -209,36 +217,234 @@ void CFrontEndUI::SNewFileSelectFrame::ActivatePopup()
|
||||||
x20_tablegroup_fileselect->SetIsActive(false);
|
x20_tablegroup_fileselect->SetIsActive(false);
|
||||||
x8_ = 2;
|
x8_ = 2;
|
||||||
HandleActiveChange(x40_tablegroup_popup);
|
HandleActiveChange(x40_tablegroup_popup);
|
||||||
x48_.SetPairText(g_MainStringTable->GetString(95));
|
x48_textpane_popupadvance.SetPairText(g_MainStringTable->GetString(95));
|
||||||
x50_.SetPairText(g_MainStringTable->GetString(38));
|
x50_textpane_popupcancel.SetPairText(g_MainStringTable->GetString(38));
|
||||||
x64_fileSelections[x20_tablegroup_fileselect->GetUserSelection()].
|
x64_fileSelections[x20_tablegroup_fileselect->GetUserSelection()].
|
||||||
x0_base->SetColor(zeus::CColor{1.f, 1.f, 1.f, 0.f});
|
x0_base->SetColor(zeus::CColor{1.f, 1.f, 1.f, 0.f});
|
||||||
x44_model_dash7->SetVisibility(false, ETraversalMode::Children);
|
x44_model_dash7->SetVisibility(false, ETraversalMode::Children);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrontEndUI::SNewFileSelectFrame::DoPopupCancel(const CGuiTableGroup* caller)
|
void CFrontEndUI::SNewFileSelectFrame::DeactivateNewGamePopup()
|
||||||
|
{
|
||||||
|
x40_tablegroup_popup->SetIsActive(false);
|
||||||
|
x40_tablegroup_popup->SetIsVisible(false);
|
||||||
|
x20_tablegroup_fileselect->SetIsActive(true);
|
||||||
|
CGuiWidget* worker = x40_tablegroup_popup->GetWorkerWidget(2);
|
||||||
|
worker->SetB627(false);
|
||||||
|
worker->SetVisibility(false, ETraversalMode::Children);
|
||||||
|
x44_model_dash7->SetVisibility(false, ETraversalMode::Children);
|
||||||
|
HandleActiveChange(x20_tablegroup_fileselect);
|
||||||
|
x64_fileSelections[x20_tablegroup_fileselect->GetUserSelection()].
|
||||||
|
x0_base->SetColor(zeus::CColor::skWhite);
|
||||||
|
x60_textpane_cancel->TextSupport()->SetText("");
|
||||||
|
}
|
||||||
|
|
||||||
|
void CFrontEndUI::SNewFileSelectFrame::ActivateNewGamePopup()
|
||||||
|
{
|
||||||
|
x40_tablegroup_popup->SetIsActive(true);
|
||||||
|
x40_tablegroup_popup->SetIsVisible(true);
|
||||||
|
x40_tablegroup_popup->SetUserSelection(0);
|
||||||
|
x40_tablegroup_popup->SetLocalTransform(
|
||||||
|
zeus::CTransform::Translate(0.f, 0.f, x20_tablegroup_fileselect->GetUserSelection() * x104_rowPitch) *
|
||||||
|
x40_tablegroup_popup->GetTransform());
|
||||||
|
x20_tablegroup_fileselect->SetIsActive(false);
|
||||||
|
x8_ = 3;
|
||||||
|
HandleActiveChange(x40_tablegroup_popup);
|
||||||
|
x64_fileSelections[x20_tablegroup_fileselect->GetUserSelection()].
|
||||||
|
x0_base->SetColor(zeus::CColor{1.f, 1.f, 1.f, 0.f});
|
||||||
|
PlayAdvanceSfx();
|
||||||
|
if (g_GameState->SystemOptions().PlayerHasHardMode())
|
||||||
|
{
|
||||||
|
x48_textpane_popupadvance.SetPairText(g_MainStringTable->GetString(102));
|
||||||
|
x50_textpane_popupcancel.SetPairText(g_MainStringTable->GetString(94));
|
||||||
|
x58_textpane_popupextra.SetPairText(g_MainStringTable->GetString(101));
|
||||||
|
CGuiWidget* worker = x40_tablegroup_popup->GetWorkerWidget(2);
|
||||||
|
worker->SetB627(true);
|
||||||
|
worker->SetVisibility(true, ETraversalMode::Children);
|
||||||
|
x44_model_dash7->SetVisibility(true, ETraversalMode::Children);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
x48_textpane_popupadvance.SetPairText(g_MainStringTable->GetString(67));
|
||||||
|
x50_textpane_popupcancel.SetPairText(g_MainStringTable->GetString(94));
|
||||||
|
x44_model_dash7->SetVisibility(false, ETraversalMode::Children);
|
||||||
|
}
|
||||||
|
x60_textpane_cancel->TextSupport()->SetText(g_MainStringTable->GetString(82));
|
||||||
|
}
|
||||||
|
|
||||||
|
void CFrontEndUI::SNewFileSelectFrame::ResetFrame()
|
||||||
|
{
|
||||||
|
x8_ = 0;
|
||||||
|
x38_textpane_gba.x0_panes[0]->SetB627(true);
|
||||||
|
x38_textpane_gba.x0_panes[0]->TextSupport()->SetFontColor(zeus::CColor::skWhite);
|
||||||
|
x30_textpane_cheats.x0_panes[0]->SetB627(true);
|
||||||
|
x30_textpane_cheats.x0_panes[0]->TextSupport()->SetFontColor(zeus::CColor::skWhite);
|
||||||
|
ClearFrameContents();
|
||||||
|
for (int i=2 ; i>=0 ; --i)
|
||||||
|
x20_tablegroup_fileselect->GetWorkerWidget(i)->SetB627(true);
|
||||||
|
x60_textpane_cancel->TextSupport()->SetText("");
|
||||||
|
}
|
||||||
|
|
||||||
|
void CFrontEndUI::SNewFileSelectFrame::ClearFrameContents()
|
||||||
|
{
|
||||||
|
x108_curTime = 0.f;
|
||||||
|
bool hasSave = false;
|
||||||
|
for (int i=0 ; i<3 ; ++i)
|
||||||
|
{
|
||||||
|
if (x4_saveUI->GetGameData(i))
|
||||||
|
hasSave = true;
|
||||||
|
SFileSelectOption& option = x64_fileSelections[i];
|
||||||
|
option.x2c_ = SFileSelectOption::ComputeRandom();
|
||||||
|
option.x28_ = -1;
|
||||||
|
for (int j=0 ; j<4 ; ++j)
|
||||||
|
option.x4_textpanes[j].SetPairText(L"");
|
||||||
|
}
|
||||||
|
|
||||||
|
StartTextAnimating(x28_textpane_erase.x0_panes[0], g_MainStringTable->GetString(38), 60.f);
|
||||||
|
StartTextAnimating(x38_textpane_gba.x0_panes[0], g_MainStringTable->GetString(37), 60.f);
|
||||||
|
StartTextAnimating(x30_textpane_cheats.x0_panes[0], g_MainStringTable->GetString(96), 60.f);
|
||||||
|
|
||||||
|
StartTextAnimating(x28_textpane_erase.x0_panes[1], g_MainStringTable->GetString(38), 60.f);
|
||||||
|
StartTextAnimating(x38_textpane_gba.x0_panes[1], g_MainStringTable->GetString(37), 60.f);
|
||||||
|
StartTextAnimating(x30_textpane_cheats.x0_panes[1], g_MainStringTable->GetString(96), 60.f);
|
||||||
|
|
||||||
|
if (hasSave)
|
||||||
|
{
|
||||||
|
x28_textpane_erase.x0_panes[0]->SetB627(true);
|
||||||
|
x28_textpane_erase.x0_panes[0]->TextSupport()->SetFontColor(zeus::CColor::skWhite);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
x28_textpane_erase.x0_panes[0]->SetB627(false);
|
||||||
|
zeus::CColor color = zeus::CColor::skGrey;
|
||||||
|
color.a = 0.5f;
|
||||||
|
x28_textpane_erase.x0_panes[0]->TextSupport()->SetFontColor(color);
|
||||||
|
}
|
||||||
|
|
||||||
|
x20_tablegroup_fileselect->SetUserSelection(0);
|
||||||
|
CGuiTextPane* cheats = static_cast<CGuiTextPane*>(x20_tablegroup_fileselect->GetWorkerWidget(5));
|
||||||
|
if (CSlideShow::SlideShowGalleryFlags())
|
||||||
|
{
|
||||||
|
cheats->SetB627(true);
|
||||||
|
x30_textpane_cheats.x0_panes[0]->TextSupport()->SetFontColor(zeus::CColor::skWhite);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cheats->SetB627(false);
|
||||||
|
zeus::CColor color = zeus::CColor::skGrey;
|
||||||
|
color.a = 0.5f;
|
||||||
|
x30_textpane_cheats.x0_panes[0]->TextSupport()->SetFontColor(color);
|
||||||
|
}
|
||||||
|
|
||||||
|
HandleActiveChange(x20_tablegroup_fileselect);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CFrontEndUI::SNewFileSelectFrame::SetupFrameContents()
|
||||||
|
{
|
||||||
|
for (int i=0 ; i<3 ; ++i)
|
||||||
|
{
|
||||||
|
SFileSelectOption& option = x64_fileSelections[i];
|
||||||
|
if (option.x28_ == 4)
|
||||||
|
continue;
|
||||||
|
SGuiTextPair* pair = (option.x28_ == -1) ? nullptr : &option.x4_textpanes[option.x28_];
|
||||||
|
if (pair)
|
||||||
|
{
|
||||||
|
//pair->x0_panes[0]->GetTextSupport()->GetNumCharsPrinted()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CFrontEndUI::SNewFileSelectFrame::DoPopupCancel(CGuiTableGroup* caller)
|
||||||
|
{
|
||||||
|
if (x8_ == 2)
|
||||||
|
{
|
||||||
|
CSfxManager::SfxStart(1094, 1.f, 0.f, false, 0x7f, false, kInvalidAreaId);
|
||||||
|
x8_ = 1;
|
||||||
|
x10d_needsExistingToggle = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CSfxManager::SfxStart(1094, 1.f, 0.f, false, 0x7f, false, kInvalidAreaId);
|
||||||
|
x8_ = 0;
|
||||||
|
x10e_needsNewToggle = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CFrontEndUI::SNewFileSelectFrame::DoPopupAdvance(CGuiTableGroup* caller)
|
||||||
|
{
|
||||||
|
if (x8_ == 2)
|
||||||
|
{
|
||||||
|
if (x40_tablegroup_popup->GetUserSelection() == 1)
|
||||||
|
{
|
||||||
|
x4_saveUI->EraseGame(x20_tablegroup_fileselect->GetUserSelection());
|
||||||
|
ResetFrame();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
x8_ = 1;
|
||||||
|
x10d_needsExistingToggle = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (g_GameState->SystemOptions().PlayerHasHardMode())
|
||||||
|
{
|
||||||
|
if (x40_tablegroup_popup->GetUserSelection() == 1)
|
||||||
|
{
|
||||||
|
PlayAdvanceSfx();
|
||||||
|
xc_phase = EPhase::One;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
g_GameState->SetHardMode(x20_tablegroup_fileselect->GetUserSelection());
|
||||||
|
x4_saveUI->StartGame(x40_tablegroup_popup->GetUserSelection());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (x40_tablegroup_popup->GetUserSelection() == 1)
|
||||||
|
{
|
||||||
|
PlayAdvanceSfx();
|
||||||
|
xc_phase = EPhase::One;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
x4_saveUI->StartGame(x40_tablegroup_popup->GetUserSelection());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CFrontEndUI::SNewFileSelectFrame::DoFileselectCancel(CGuiTableGroup* caller)
|
||||||
|
{
|
||||||
|
if (x8_ == 1)
|
||||||
|
{
|
||||||
|
CSfxManager::SfxStart(1094, 1.f, 0.f, false, 0x7f, false, kInvalidAreaId);
|
||||||
|
ResetFrame();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CFrontEndUI::SNewFileSelectFrame::DoSelectionChange(CGuiTableGroup* caller)
|
||||||
|
{
|
||||||
|
HandleActiveChange(caller);
|
||||||
|
CSfxManager::SfxStart(1093, 1.f, 0.f, false, 0x7f, false, kInvalidAreaId);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CFrontEndUI::SNewFileSelectFrame::DoFileselectAdvance(CGuiTableGroup* caller)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrontEndUI::SNewFileSelectFrame::DoPopupAdvance(const CGuiTableGroup* caller)
|
CFrontEndUI::SFileSelectOption CFrontEndUI::SNewFileSelectFrame::FindFileSelectOption(CGuiFrame* frame, int idx)
|
||||||
{
|
{
|
||||||
|
SFileSelectOption ret;
|
||||||
|
ret.x0_base = frame->FindWidget(hecl::Format("basewidget_file%d", idx).c_str());
|
||||||
|
ret.x4_textpanes[0] = FindTextPanePair(frame, hecl::Format("textpane_filename%d", idx).c_str());
|
||||||
|
ret.x4_textpanes[1] = FindTextPanePair(frame, hecl::Format("textpane_world%d", idx).c_str());
|
||||||
|
ret.x4_textpanes[2] = FindTextPanePair(frame, hecl::Format("textpane_playtime%d", idx).c_str());
|
||||||
|
ret.x4_textpanes[3] = FindTextPanePair(frame, hecl::Format("textpane_date%d", idx).c_str());
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrontEndUI::SNewFileSelectFrame::DoFileselectCancel(const CGuiTableGroup* caller)
|
void CFrontEndUI::SNewFileSelectFrame::StartTextAnimating(CGuiTextPane* text, const std::wstring& str, float chRate)
|
||||||
{
|
{
|
||||||
|
text->TextSupport()->SetText(str);
|
||||||
}
|
text->TextSupport()->SetTypeWriteEffectOptions(true, 0.1f, chRate);
|
||||||
|
|
||||||
void CFrontEndUI::SNewFileSelectFrame::DoSelectionChange(const CGuiTableGroup* caller)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void CFrontEndUI::SNewFileSelectFrame::DoFileselectAdvance(const CGuiTableGroup* caller)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CFrontEndUI::SGBASupportFrame::SGBASupportFrame()
|
CFrontEndUI::SGBASupportFrame::SGBASupportFrame()
|
||||||
|
@ -308,17 +514,17 @@ void CFrontEndUI::SGBASupportFrame::ProcessUserInput(const CFinalInput& input, C
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrontEndUI::SGBASupportFrame::DoOptionsCancel(const CGuiTableGroup* caller)
|
void CFrontEndUI::SGBASupportFrame::DoOptionsCancel(CGuiTableGroup* caller)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrontEndUI::SGBASupportFrame::DoSelectionChange(const CGuiTableGroup* caller)
|
void CFrontEndUI::SGBASupportFrame::DoSelectionChange(CGuiTableGroup* caller)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrontEndUI::SGBASupportFrame::DoOptionsAdvance(const CGuiTableGroup* caller)
|
void CFrontEndUI::SGBASupportFrame::DoOptionsAdvance(CGuiTableGroup* caller)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -391,17 +597,17 @@ void CFrontEndUI::SFrontEndFrame::ProcessUserInput(const CFinalInput& input)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrontEndUI::SFrontEndFrame::DoCancel(const CGuiTableGroup* caller)
|
void CFrontEndUI::SFrontEndFrame::DoCancel(CGuiTableGroup* caller)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrontEndUI::SFrontEndFrame::DoSelectionChange(const CGuiTableGroup* caller)
|
void CFrontEndUI::SFrontEndFrame::DoSelectionChange(CGuiTableGroup* caller)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrontEndUI::SFrontEndFrame::DoAdvance(const CGuiTableGroup* caller)
|
void CFrontEndUI::SFrontEndFrame::DoAdvance(CGuiTableGroup* caller)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,6 +70,8 @@ public:
|
||||||
GBAFileSelectB
|
GBAFileSelectB
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static void PlayAdvanceSfx();
|
||||||
|
|
||||||
struct SGuiTextPair
|
struct SGuiTextPair
|
||||||
{
|
{
|
||||||
CGuiTextPane* x0_panes[2] = {};
|
CGuiTextPane* x0_panes[2] = {};
|
||||||
|
@ -93,7 +95,6 @@ public:
|
||||||
return rand() / float(RAND_MAX) * 30.f + 30.f;
|
return rand() / float(RAND_MAX) * 30.f + 30.f;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
static SFileSelectOption FindFileSelectOption(CGuiFrame* frame, int idx);
|
|
||||||
|
|
||||||
struct SNewFileSelectFrame
|
struct SNewFileSelectFrame
|
||||||
{
|
{
|
||||||
|
@ -113,12 +114,12 @@ public:
|
||||||
CGuiTableGroup* x20_tablegroup_fileselect = nullptr;
|
CGuiTableGroup* x20_tablegroup_fileselect = nullptr;
|
||||||
CGuiModel* x24_model_erase = nullptr;
|
CGuiModel* x24_model_erase = nullptr;
|
||||||
SGuiTextPair x28_textpane_erase;
|
SGuiTextPair x28_textpane_erase;
|
||||||
SGuiTextPair x30_;
|
SGuiTextPair x30_textpane_cheats;
|
||||||
SGuiTextPair x38_;
|
SGuiTextPair x38_textpane_gba;
|
||||||
CGuiTableGroup* x40_tablegroup_popup = nullptr;
|
CGuiTableGroup* x40_tablegroup_popup = nullptr;
|
||||||
CGuiModel* x44_model_dash7 = nullptr;
|
CGuiModel* x44_model_dash7 = nullptr;
|
||||||
SGuiTextPair x48_;
|
SGuiTextPair x48_textpane_popupadvance;
|
||||||
SGuiTextPair x50_;
|
SGuiTextPair x50_textpane_popupcancel;
|
||||||
SGuiTextPair x58_textpane_popupextra;
|
SGuiTextPair x58_textpane_popupextra;
|
||||||
CGuiTextPane* x60_textpane_cancel = nullptr;
|
CGuiTextPane* x60_textpane_cancel = nullptr;
|
||||||
SFileSelectOption x64_fileSelections[3];
|
SFileSelectOption x64_fileSelections[3];
|
||||||
|
@ -126,8 +127,8 @@ public:
|
||||||
float x104_rowPitch = 0.f;
|
float x104_rowPitch = 0.f;
|
||||||
float x108_curTime = 0.f;
|
float x108_curTime = 0.f;
|
||||||
bool x10c_inputEnable = false;
|
bool x10c_inputEnable = false;
|
||||||
bool x10d_needsToggle = false;
|
bool x10d_needsExistingToggle = false;
|
||||||
bool x10e_ = false;
|
bool x10e_needsNewToggle = false;
|
||||||
|
|
||||||
SNewFileSelectFrame(CSaveUI* sui, u32 rnd);
|
SNewFileSelectFrame(CSaveUI* sui, u32 rnd);
|
||||||
void FinishedLoading();
|
void FinishedLoading();
|
||||||
|
@ -136,14 +137,23 @@ public:
|
||||||
EPhase ProcessUserInput(const CFinalInput& input);
|
EPhase ProcessUserInput(const CFinalInput& input);
|
||||||
|
|
||||||
void HandleActiveChange(CGuiTableGroup* active);
|
void HandleActiveChange(CGuiTableGroup* active);
|
||||||
void DeactivatePopup();
|
void DeactivateExistingGamePopup();
|
||||||
void ActivatePopup();
|
void ActivateExistingGamePopup();
|
||||||
|
void DeactivateNewGamePopup();
|
||||||
|
void ActivateNewGamePopup();
|
||||||
|
|
||||||
void DoPopupCancel(const CGuiTableGroup* caller);
|
void ResetFrame();
|
||||||
void DoPopupAdvance(const CGuiTableGroup* caller);
|
void ClearFrameContents();
|
||||||
void DoFileselectCancel(const CGuiTableGroup* caller);
|
void SetupFrameContents();
|
||||||
void DoSelectionChange(const CGuiTableGroup* caller);
|
|
||||||
void DoFileselectAdvance(const CGuiTableGroup* caller);
|
void DoPopupCancel(CGuiTableGroup* caller);
|
||||||
|
void DoPopupAdvance(CGuiTableGroup* caller);
|
||||||
|
void DoFileselectCancel(CGuiTableGroup* caller);
|
||||||
|
void DoSelectionChange(CGuiTableGroup* caller);
|
||||||
|
void DoFileselectAdvance(CGuiTableGroup* caller);
|
||||||
|
|
||||||
|
static SFileSelectOption FindFileSelectOption(CGuiFrame* frame, int idx);
|
||||||
|
static void StartTextAnimating(CGuiTextPane* text, const std::wstring& str, float chRate);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SGBASupportFrame
|
struct SGBASupportFrame
|
||||||
|
@ -166,9 +176,9 @@ public:
|
||||||
void SetTableColors(CGuiTableGroup* tbgp) const;
|
void SetTableColors(CGuiTableGroup* tbgp) const;
|
||||||
void ProcessUserInput(const CFinalInput& input, CSaveUI* sui);
|
void ProcessUserInput(const CFinalInput& input, CSaveUI* sui);
|
||||||
|
|
||||||
void DoOptionsCancel(const CGuiTableGroup* caller);
|
void DoOptionsCancel(CGuiTableGroup* caller);
|
||||||
void DoSelectionChange(const CGuiTableGroup* caller);
|
void DoSelectionChange(CGuiTableGroup* caller);
|
||||||
void DoOptionsAdvance(const CGuiTableGroup* caller);
|
void DoOptionsAdvance(CGuiTableGroup* caller);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SFrontEndFrame
|
struct SFrontEndFrame
|
||||||
|
@ -184,9 +194,9 @@ public:
|
||||||
bool PumpLoad();
|
bool PumpLoad();
|
||||||
void ProcessUserInput(const CFinalInput& input);
|
void ProcessUserInput(const CFinalInput& input);
|
||||||
|
|
||||||
void DoCancel(const CGuiTableGroup* caller);
|
void DoCancel(CGuiTableGroup* caller);
|
||||||
void DoSelectionChange(const CGuiTableGroup* caller);
|
void DoSelectionChange(CGuiTableGroup* caller);
|
||||||
void DoAdvance(const CGuiTableGroup* caller);
|
void DoAdvance(CGuiTableGroup* caller);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SFusionBonusFrame
|
struct SFusionBonusFrame
|
||||||
|
|
|
@ -165,4 +165,20 @@ void CSlideShow::Draw() const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u32 CSlideShow::SlideShowGalleryFlags()
|
||||||
|
{
|
||||||
|
u32 ret = 0;
|
||||||
|
if (!g_GameState)
|
||||||
|
return ret;
|
||||||
|
if (g_GameState->SystemOptions().GetLogScanCount() >= 50)
|
||||||
|
ret |= 1;
|
||||||
|
if (g_GameState->SystemOptions().GetLogScanCount() == 100)
|
||||||
|
ret |= 2;
|
||||||
|
if (g_GameState->SystemOptions().PlayerBeatHardMode())
|
||||||
|
ret |= 4;
|
||||||
|
if (g_GameState->SystemOptions().AllItemsCollected())
|
||||||
|
ret |= 8;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,6 +119,8 @@ public:
|
||||||
EMessageReturn OnMessage(const CArchitectureMessage&, CArchitectureQueue&);
|
EMessageReturn OnMessage(const CArchitectureMessage&, CArchitectureQueue&);
|
||||||
bool GetIsContinueDraw() const {return false;}
|
bool GetIsContinueDraw() const {return false;}
|
||||||
void Draw() const;
|
void Draw() const;
|
||||||
|
|
||||||
|
static u32 SlideShowGalleryFlags();
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
2
hecl
2
hecl
|
@ -1 +1 @@
|
||||||
Subproject commit 2af7e12aa04e8028e7334a6371c3354c67f1c7fc
|
Subproject commit 0ebd4366a5ffbb97aca413dd55b3753b49f2e81c
|
Loading…
Reference in New Issue