-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mapObj: Implement CoinCollectHintObj
- Loading branch information
Showing
4 changed files
with
83 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#pragma once | ||
|
||
#include <basis/seadTypes.h> | ||
#include <math/seadVector.h> | ||
|
||
#include "Library/Scene/ISceneObj.h" | ||
|
||
namespace al { | ||
class IUseSceneObjHolder; | ||
} // namespace al | ||
|
||
class CoinCollect; | ||
class CoinCollect2D; | ||
class CoinCollectHintObj; | ||
|
||
class CoinCollectHolder : public al::ISceneObj { | ||
public: | ||
CoinCollectHolder(); | ||
|
||
const char* getSceneObjName() const override; | ||
|
||
void registerCoinCollect(CoinCollect*); | ||
void registerCoinCollect2D(CoinCollect2D*); | ||
void registerHintObj(CoinCollectHintObj*); | ||
|
||
bool tryFindAliveCoinCollect(const sead::Vector3f&, bool) const; | ||
bool tryFindAliveCoinCollect(const sead::Vector3f&, f32, f32, bool) const; | ||
bool tryFindDeadButHintEnableCoinCollect() const; | ||
bool tryFindAliveCoinCollect2D(const sead::Vector3f&, bool) const; | ||
bool tryFindAliveCoinCollect2D(const sead::Vector3f&, f32, f32, bool) const; | ||
bool tryFindExStageHintObjTrans(sead::Vector3f*, const char*); | ||
}; | ||
|
||
namespace rs { | ||
CoinCollectHolder* createCoinCollectHolder(const al::IUseSceneObjHolder* objHolder); | ||
} // namespace rs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include "MapObj/CoinCollectHintObj.h" | ||
|
||
#include "Library/LiveActor/ActorInitFunction.h" | ||
#include "Library/LiveActor/ActorPoseKeeper.h" | ||
#include "Library/Placement/PlacementFunction.h" | ||
#include "Library/Scene/SceneUtil.h" | ||
|
||
#include "Item/CoinCollectHolder.h" | ||
#include "Scene/SceneObjFactory.h" | ||
|
||
CoinCollectHintObj::CoinCollectHintObj(const char* name) : al::LiveActor(name) {} | ||
|
||
void CoinCollectHintObj::init(const al::ActorInitInfo& initInfo) { | ||
al::initActorSceneInfo(this, initInfo); | ||
al::getStringArg(&mStageName, initInfo, "CoinCollectStageName"); | ||
al::getTrans(&mTrans, initInfo); | ||
|
||
rs::createCoinCollectHolder(this); | ||
CoinCollectHolder* holder = | ||
(CoinCollectHolder*)al::getSceneObj(this, SceneObjID_CoinCollectHolder); | ||
holder->registerHintObj(this); | ||
|
||
makeActorDead(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#pragma once | ||
|
||
#include <math/seadVector.h> | ||
|
||
#include "Library/LiveActor/LiveActor.h" | ||
|
||
namespace al { | ||
class ActorInitInfo; | ||
} // namespace al | ||
|
||
class CoinCollectHintObj : public al::LiveActor { | ||
public: | ||
CoinCollectHintObj(const char* name); | ||
|
||
void init(const al::ActorInitInfo& info) override; | ||
|
||
private: | ||
const char* mStageName = nullptr; | ||
sead::Vector3f mTrans = sead::Vector3f::zero; | ||
}; |