Skip to content

Commit

Permalink
Scene: Implement HintPhotoLayoutHolder (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
Muz-dev authored Jan 19, 2025
1 parent 4aa3f34 commit 46fc505
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 8 deletions.
16 changes: 8 additions & 8 deletions data/odyssey_functions.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
20 changes: 20 additions & 0 deletions src/Layout/DecideIconLayout.h
Original file line number Diff line number Diff line change
@@ -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];
};
32 changes: 32 additions & 0 deletions src/Scene/HintPhotoLayoutHolder.cpp
Original file line number Diff line number Diff line change
@@ -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);
}
}
23 changes: 23 additions & 0 deletions src/Scene/HintPhotoLayoutHolder.h
Original file line number Diff line number Diff line change
@@ -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;
};

0 comments on commit 46fc505

Please sign in to comment.