From 46fc5053bbaa7a6b8b4ffa40f751a8bd7e6705bc Mon Sep 17 00:00:00 2001 From: Muz-dev <113846204+Muz-dev@users.noreply.github.com> Date: Sun, 19 Jan 2025 12:13:43 +0000 Subject: [PATCH] Scene: Implement `HintPhotoLayoutHolder` (#225) --- data/odyssey_functions.csv | 16 +++++++-------- src/Layout/DecideIconLayout.h | 20 ++++++++++++++++++ src/Scene/HintPhotoLayoutHolder.cpp | 32 +++++++++++++++++++++++++++++ src/Scene/HintPhotoLayoutHolder.h | 23 +++++++++++++++++++++ 4 files changed, 83 insertions(+), 8 deletions(-) create mode 100644 src/Layout/DecideIconLayout.h create mode 100644 src/Scene/HintPhotoLayoutHolder.cpp create mode 100644 src/Scene/HintPhotoLayoutHolder.h diff --git a/data/odyssey_functions.csv b/data/odyssey_functions.csv index 223946da..f5d12c73 100644 --- a/data/odyssey_functions.csv +++ b/data/odyssey_functions.csv @@ -354,7 +354,7 @@ Address,Quality,Size,Name 0x0000007100008b00,U,000088,_ZN16CollectBgmPlayer4stopEi 0x0000007100008b58,U,000112,_ZNK16CollectBgmPlayer9isPlayingEPKcS1_ 0x0000007100008bc8,U,000004,_ZN16CollectBgmPlayerD0Ev -0x0000007100008bcc,U,000004,_ZN2al9ISceneObj26initAfterPlacementSceneObjERKNS_13ActorInitInfoE +0x0000007100008bcc,O,000004,_ZN2al9ISceneObj26initAfterPlacementSceneObjERKNS_13ActorInitInfoE 0x0000007100008bd0,U,000188,_ZN18CollectBgmRegisterC2EPKN2al13AudioDirectorEP14GameDataHolderP16CollectBgmPlayer 0x0000007100008c8c,U,001376,_ZN18CollectBgmRegister6updateEv 0x00000071000091ec,U,000008,_ZNK18CollectBgmRegister14getAudioKeeperEv @@ -29653,13 +29653,13 @@ Address,Quality,Size,Name 0x00000071004aa91c,U,000028,_ZN2rs25resetRouteHeadGuidePosPtrEPKN2al18IUseSceneObjHolderE 0x00000071004aa938,U,000012,_ZNK18GuidePosInfoHolder15getSceneObjNameEv 0x00000071004aa944,U,000004,_ZN18GuidePosInfoHolderD0Ev -0x00000071004aa948,U,000024,_ZN21HintPhotoLayoutHolderC2Ev -0x00000071004aa960,U,000132,_ZN21HintPhotoLayoutHolder4initERKN2al14LayoutInitInfoE -0x00000071004aa9e4,U,000016,_ZNK21HintPhotoLayoutHolder6isInitEv -0x00000071004aa9f4,U,000008,_ZNK21HintPhotoLayoutHolder14getPhotoLayoutEv -0x00000071004aa9fc,U,000008,_ZNK21HintPhotoLayoutHolder13getDecideIconEv -0x00000071004aaa04,U,000012,_ZNK21HintPhotoLayoutHolder15getSceneObjNameEv -0x00000071004aaa10,U,000004,_ZN21HintPhotoLayoutHolderD0Ev +0x00000071004aa948,O,000024,_ZN21HintPhotoLayoutHolderC2Ev +0x00000071004aa960,O,000132,_ZN21HintPhotoLayoutHolder4initERKN2al14LayoutInitInfoE +0x00000071004aa9e4,O,000016,_ZNK21HintPhotoLayoutHolder6isInitEv +0x00000071004aa9f4,O,000008,_ZNK21HintPhotoLayoutHolder14getPhotoLayoutEv +0x00000071004aa9fc,O,000008,_ZNK21HintPhotoLayoutHolder13getDecideIconEv +0x00000071004aaa04,O,000012,_ZNK21HintPhotoLayoutHolder15getSceneObjNameEv +0x00000071004aaa10,O,000004,_ZN21HintPhotoLayoutHolderD0Ev 0x00000071004aaa14,U,000024,_ZN19HtmlViewerRequesterC2Ev 0x00000071004aaa2c,U,000008,_ZNK19HtmlViewerRequester14isExistRequestEv 0x00000071004aaa34,U,000008,_ZN19HtmlViewerRequester12clearRequestEv diff --git a/src/Layout/DecideIconLayout.h b/src/Layout/DecideIconLayout.h new file mode 100644 index 00000000..92ea3052 --- /dev/null +++ b/src/Layout/DecideIconLayout.h @@ -0,0 +1,20 @@ +#pragma once + +#include "Library/Nerve/NerveExecutor.h" + +namespace al { +class LayoutInitInfo; +} + +class DecideIconLayout : public al::NerveExecutor { +public: + DecideIconLayout(const char*, const al::LayoutInitInfo*); + void appear(); + void exeAppear(); + void exeWait(); + void exeDecide(); + bool isDecide() const; + bool isWait() const; + bool isEnd() const; + char filler[0x140]; +}; diff --git a/src/Scene/HintPhotoLayoutHolder.cpp b/src/Scene/HintPhotoLayoutHolder.cpp new file mode 100644 index 00000000..44763e17 --- /dev/null +++ b/src/Scene/HintPhotoLayoutHolder.cpp @@ -0,0 +1,32 @@ +#include "Scene/HintPhotoLayoutHolder.h" + +#include "Library/Layout/LayoutActor.h" +#include "Library/Layout/LayoutInitInfo.h" + +#include "Layout/DecideIconLayout.h" + +HintPhotoLayoutHolder::HintPhotoLayoutHolder() = default; + +bool HintPhotoLayoutHolder::isInit() const { + return mLayoutActor != nullptr; +} + +const al::LayoutActor* HintPhotoLayoutHolder::getPhotoLayout() const { + return mLayoutActor; +} + +DecideIconLayout* HintPhotoLayoutHolder::getDecideIcon() const { + return mDecideIconLayout; +} + +const char* HintPhotoLayoutHolder::getSceneObjName() const { + return "ヒント写真レイアウト保持"; +} + +void HintPhotoLayoutHolder::init(const al::LayoutInitInfo& info) { + if (mLayoutActor == nullptr) { + mLayoutActor = new al::LayoutActor("ヒント写真"); + al::initLayoutActor(mLayoutActor, info, "HintPhoto", nullptr); + mDecideIconLayout = new DecideIconLayout("決定アイコン", &info); + } +} diff --git a/src/Scene/HintPhotoLayoutHolder.h b/src/Scene/HintPhotoLayoutHolder.h new file mode 100644 index 00000000..1023fb24 --- /dev/null +++ b/src/Scene/HintPhotoLayoutHolder.h @@ -0,0 +1,23 @@ +#pragma once + +#include "Library/Scene/ISceneObj.h" + +namespace al { +class LayoutActor; +class LayoutInitInfo; +} // namespace al +class DecideIconLayout; + +class HintPhotoLayoutHolder : public al::ISceneObj { +public: + HintPhotoLayoutHolder(); + void init(const al::LayoutInitInfo& info); + bool isInit() const; + const al::LayoutActor* getPhotoLayout() const; + DecideIconLayout* getDecideIcon() const; + const char* getSceneObjName() const; + +private: + al::LayoutActor* mLayoutActor = nullptr; + DecideIconLayout* mDecideIconLayout = nullptr; +};