Fix PS3 time of day transition aspect ratio and outro animation (#197)

This commit is contained in:
Hyper 2025-01-26 13:37:55 +00:00 committed by GitHub
parent 0d4b66fe98
commit 57e888658a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 21 additions and 5 deletions

View file

@ -21,14 +21,20 @@ namespace SWA
{ {
public: public:
SWA_INSERT_PADDING(0xD8); SWA_INSERT_PADDING(0xD8);
be<uint32_t> m_pUnk; be<uint32_t> m_FieldD8;
SWA_INSERT_PADDING(0x3C); SWA_INSERT_PADDING(0x3C);
Chao::CSD::RCPtr<Chao::CSD::CScene> m_rcNightToDay; Chao::CSD::RCPtr<Chao::CSD::CScene> m_rcNightToDay;
SWA_INSERT_PADDING(0x0C); SWA_INSERT_PADDING(0x0C);
be<uint32_t> m_IsVisible; be<uint32_t> m_IsVisible;
SWA_INSERT_PADDING(0x0C); SWA_INSERT_PADDING(0x0C);
be<ELoadingDisplayType> m_LoadingDisplayType; be<ELoadingDisplayType> m_LoadingDisplayType;
SWA_INSERT_PADDING(0x65); SWA_INSERT_PADDING(0x61);
bool m_IsNightToDay; bool m_IsNightToDay;
}; };
SWA_ASSERT_OFFSETOF(CLoading, m_FieldD8, 0xD8);
SWA_ASSERT_OFFSETOF(CLoading, m_rcNightToDay, 0x118);
SWA_ASSERT_OFFSETOF(CLoading, m_IsVisible, 0x12C);
SWA_ASSERT_OFFSETOF(CLoading, m_LoadingDisplayType, 0x13C);
SWA_ASSERT_OFFSETOF(CLoading, m_IsNightToDay, 0x1A1);
} }

View file

@ -389,6 +389,12 @@ static const ankerl::unordered_dense::map<XXH64_hash_t, CsdModifier> g_modifiers
// ui_loading // ui_loading
{ HashStr("ui_loading/bg_1"), { STRETCH } }, { HashStr("ui_loading/bg_1"), { STRETCH } },
{ HashStr("ui_loading/bg_2"), { STRETCH } }, { HashStr("ui_loading/bg_2"), { STRETCH } },
{ HashStr("ui_loading/n_2_d/bg/sky"), { STRETCH } },
{ HashStr("ui_loading/n_2_d/bg/under"), { STRETCH } },
{ HashStr("ui_loading/n_2_d/letterbox/letterbox_under"), { STRETCH } },
{ HashStr("ui_loading/n_2_d/letterbox/letterbox_top"), { STRETCH } },
{ HashStr("ui_loading/n_2_d/letterbox/black_l"), { EXTEND_LEFT | STRETCH_VERTICAL } },
{ HashStr("ui_loading/n_2_d/letterbox/black_r"), { EXTEND_RIGHT | STRETCH_VERTICAL } },
// ui_mediaroom // ui_mediaroom
{ HashStr("ui_mediaroom/header/bg/img_1"), { EXTEND_LEFT } }, { HashStr("ui_mediaroom/header/bg/img_1"), { EXTEND_LEFT } },

View file

@ -11,13 +11,17 @@ bool m_isSavedAchievementData = false;
PPC_FUNC_IMPL(__imp__sub_824DCF38); PPC_FUNC_IMPL(__imp__sub_824DCF38);
PPC_FUNC(sub_824DCF38) PPC_FUNC(sub_824DCF38)
{ {
auto pLoading = (SWA::CLoading*)g_memory.Translate(ctx.r3.u32);
App::s_isLoading = true; App::s_isLoading = true;
// TODO: use the actual PS3 loading screen ("n_2_d").
if (Config::TimeOfDayTransition == ETimeOfDayTransition::PlayStation) if (Config::TimeOfDayTransition == ETimeOfDayTransition::PlayStation)
{ {
if (ctx.r4.u32 == SWA::eLoadingDisplayType_WerehogMovie) if (ctx.r4.u32 == SWA::eLoadingDisplayType_WerehogMovie)
{
ctx.r4.u32 = SWA::eLoadingDisplayType_ChangeTimeOfDay; ctx.r4.u32 = SWA::eLoadingDisplayType_ChangeTimeOfDay;
pLoading->m_IsNightToDay = App::s_isWerehog;
}
} }
if (auto pGameDocument = SWA::CGameDocument::GetInstance()) if (auto pGameDocument = SWA::CGameDocument::GetInstance())