Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lots of AreaObj.* functions #23

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 48 additions & 48 deletions data/odyssey_functions.csv
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,10 @@ Address,Quality,Size,Name
0x0000007100005320,U,000020,_ZNK21BirdGatheringSpotArea27isGreaterPriorityNotClippedEPKS_
0x0000007100005334,U,000232,_ZNK21BirdGatheringSpotArea21calcRandomGroundTransEPN4sead7Vector3IfEE
0x000000710000541c,U,000048,_ZN21BirdGatheringSpotArea16AreaClippingInfoC2Ev
0x000000710000544c,U,000008,_ZNK2al7AreaObj7getNameEv
0x0000007100005454,U,000008,_ZNK2al7AreaObj20getStageSwitchKeeperEv
0x000000710000545c,U,000008,_ZNK2al7AreaObj17getSceneObjHolderEv
0x0000007100005464,U,000008,_ZThn8_NK2al7AreaObj17getSceneObjHolderEv
0x000000710000544c,O,000008,_ZNK2al7AreaObj7getNameEv
0x0000007100005454,O,000008,_ZNK2al7AreaObj20getStageSwitchKeeperEv
0x000000710000545c,O,000008,_ZNK2al7AreaObj17getSceneObjHolderEv
0x0000007100005464,O,000008,_ZThn8_NK2al7AreaObj17getSceneObjHolderEv
0x000000710000546c,U,000088,_ZN12ExtForceAreaC2EPKc
0x00000071000054c4,U,000100,_ZN12ExtForceAreaC1EPKc
0x0000007100005528,U,000156,_ZN12ExtForceArea4initERKN2al12AreaInitInfoE
Expand Down Expand Up @@ -30555,20 +30555,20 @@ Address,Quality,Size,Name
0x00000071004be2b4,U,000052,_ZN2al19createActorFunctionI23AppearSwitchFixMapPartsEEPNS_9LiveActorEPKc
0x00000071004be2e8,U,000052,_ZN2al19createActorFunctionI24AppearSwitchFallMapPartsEEPNS_9LiveActorEPKc
0x00000071004be31c,U,000096,_ZN18ProjectAreaFactoryC2Ev
0x00000071004be37c,U,000008,_ZNK2al7FactoryIPFPNS_7AreaObjEPKcEE11convertNameES4_
0x00000071004be384,U,000052,_ZN2al21createAreaObjFunctionINS_7AreaObjEEEPS1_PKc
0x00000071004be3b8,U,000052,_ZN2al21createAreaObjFunctionI21BirdGatheringSpotAreaEEPNS_7AreaObjEPKc
0x00000071004be3ec,U,000052,_ZN2al21createAreaObjFunctionINS_20CameraStartParamAreaEEEPNS_7AreaObjEPKc
0x00000071004be420,U,000052,_ZN2al21createAreaObjFunctionI12ExtForceAreaEEPNS_7AreaObjEPKc
0x00000071004be454,U,000052,_ZN2al21createAreaObjFunctionI21ForceRecoveryKidsAreaEEPNS_7AreaObjEPKc
0x00000071004be488,U,000052,_ZN2al21createAreaObjFunctionI24NpcForceMaterialCodeAreaEEPNS_7AreaObjEPKc
0x00000071004be4bc,U,000052,_ZN2al21createAreaObjFunctionINS_10SePlayAreaEEEPNS_7AreaObjEPKc
0x00000071004be4f0,U,000052,_ZN2al21createAreaObjFunctionINS_13SeBarrierAreaEEEPNS_7AreaObjEPKc
0x00000071004be524,U,000052,_ZN2al21createAreaObjFunctionI9StainAreaEEPNS_7AreaObjEPKc
0x00000071004be558,U,000052,_ZN2al21createAreaObjFunctionINS_11TrafficAreaEEEPNS_7AreaObjEPKc
0x00000071004be58c,U,000052,_ZN2al21createAreaObjFunctionINS_12ViewCtrlAreaEEEPNS_7AreaObjEPKc
0x00000071004be5c0,U,000052,_ZN2al21createAreaObjFunctionI14RouteGuideAreaEEPNS_7AreaObjEPKc
0x00000071004be5f4,U,000052,_ZN2al21createAreaObjFunctionI10MoveArea2DEEPNS_7AreaObjEPKc
0x00000071004be37c,O,000008,_ZNK2al7FactoryIPFPNS_7AreaObjEPKcEE11convertNameES4_
0x00000071004be384,O,000052,_ZN2al21createAreaObjFunctionINS_7AreaObjEEEPS1_PKc
0x00000071004be3b8,O,000052,_ZN2al21createAreaObjFunctionI21BirdGatheringSpotAreaEEPNS_7AreaObjEPKc
0x00000071004be3ec,O,000052,_ZN2al21createAreaObjFunctionINS_20CameraStartParamAreaEEEPNS_7AreaObjEPKc
0x00000071004be420,O,000052,_ZN2al21createAreaObjFunctionI12ExtForceAreaEEPNS_7AreaObjEPKc
0x00000071004be454,O,000052,_ZN2al21createAreaObjFunctionI21ForceRecoveryKidsAreaEEPNS_7AreaObjEPKc
0x00000071004be488,O,000052,_ZN2al21createAreaObjFunctionI24NpcForceMaterialCodeAreaEEPNS_7AreaObjEPKc
0x00000071004be4bc,O,000052,_ZN2al21createAreaObjFunctionINS_10SePlayAreaEEEPNS_7AreaObjEPKc
0x00000071004be4f0,O,000052,_ZN2al21createAreaObjFunctionINS_13SeBarrierAreaEEEPNS_7AreaObjEPKc
0x00000071004be524,O,000052,_ZN2al21createAreaObjFunctionI9StainAreaEEPNS_7AreaObjEPKc
0x00000071004be558,O,000052,_ZN2al21createAreaObjFunctionINS_11TrafficAreaEEEPNS_7AreaObjEPKc
0x00000071004be58c,O,000052,_ZN2al21createAreaObjFunctionINS_12ViewCtrlAreaEEEPNS_7AreaObjEPKc
0x00000071004be5c0,O,000052,_ZN2al21createAreaObjFunctionI14RouteGuideAreaEEPNS_7AreaObjEPKc
0x00000071004be5f4,O,000052,_ZN2al21createAreaObjFunctionI10MoveArea2DEEPNS_7AreaObjEPKc
0x00000071004be628,U,000084,_ZN25ProjectCameraPoserFactoryC2Ev
0x00000071004be67c,U,000008,_ZNK2al7FactoryIPFPNS_11CameraPoserEPKcEE11convertNameES4_
0x00000071004be684,U,000052,_ZN2al25createCameraPoserFunctionI22CameraPoserFollowLimitEEPNS_11CameraPoserEPKc
Expand Down Expand Up @@ -50157,39 +50157,39 @@ Address,Quality,Size,Name
0x00000071008039e8,U,000040,_ZN2al12AreaInitInfoC2ERKNS_13PlacementInfoEPNS_19StageSwitchDirectorEPNS_14SceneObjHolderE
0x0000007100803a10,U,000052,_ZN2al12AreaInitInfoC1ERKNS_13PlacementInfoERKS0_
0x0000007100803a44,U,000040,_ZN2al12AreaInitInfo3setERKNS_13PlacementInfoEPNS_19StageSwitchDirectorEPNS_14SceneObjHolderE
0x0000007100803a6c,U,000148,_ZN2al7AreaObjC2EPKc
0x0000007100803b00,U,000096,_ZN2al7AreaObjC1EPKc
0x0000007100803a6c,O,000148,_ZN2al7AreaObjC2EPKc
0x0000007100803b00,O,000096,_ZN2al7AreaObjC1EPKc
0x0000007100803b60,U,000404,_ZN2al7AreaObj4initERKNS_12AreaInitInfoE
0x0000007100803cf4,U,000012,_ZN2al7AreaObj8validateEv
0x0000007100803d00,U,000008,_ZN2al7AreaObj10invalidateEv
0x0000007100803d08,U,000048,_ZN2al7AreaObj21initStageSwitchKeeperEv
0x0000007100803d38,U,000032,_ZNK2al7AreaObj10isInVolumeERKN4sead7Vector3IfEE
0x0000007100803d58,U,000032,_ZNK2al7AreaObj16isInVolumeOffsetERKN4sead7Vector3IfEEf
0x0000007100803cf4,O,000012,_ZN2al7AreaObj8validateEv
0x0000007100803d00,O,000008,_ZN2al7AreaObj10invalidateEv
0x0000007100803d08,O,000048,_ZN2al7AreaObj21initStageSwitchKeeperEv
0x0000007100803d38,O,000032,_ZNK2al7AreaObj10isInVolumeERKN4sead7Vector3IfEE
0x0000007100803d58,O,000032,_ZNK2al7AreaObj16isInVolumeOffsetERKN4sead7Vector3IfEEf
0x0000007100803d78,U,000028,_ZNK2al10FunctorV0MIPNS_7AreaObjEMS1_FvvEEclEv
0x0000007100803d94,U,000076,_ZNK2al10FunctorV0MIPNS_7AreaObjEMS1_FvvEE5cloneEv
0x0000007100803de0,U,000004,_ZN2al10FunctorV0MIPNS_7AreaObjEMS1_FvvEED0Ev
0x0000007100803de4,U,000016,_ZN2al15AreaObjDirectorC2Ev
0x0000007100803df4,U,000236,_ZN2al15AreaObjDirector4initEPKNS_14AreaObjFactoryE
0x0000007100803ee0,U,000004,_ZN2al15AreaObjDirector7endInitEv
0x0000007100803ee4,U,000016,_ZN2al15AreaObjDirector6updateEv
0x0000007100803ef4,U,000052,_ZN2al15AreaObjDirector9placementERKNS_12AreaInitInfoE
0x0000007100803f28,U,000156,_ZN2al15AreaObjDirector9placementEPKNS_12AreaInitInfoEi
0x0000007100803fc4,U,000340,_ZN2al15AreaObjDirector18createAreaObjGroupERKNS_12AreaInitInfoE
0x0000007100804118,U,000448,_ZN2al15AreaObjDirector24createAreaObjGroupBufferEv
0x00000071008042d8,U,000448,_ZN2al15AreaObjDirector16placementAreaObjERKNS_12AreaInitInfoE
0x0000007100804498,U,000128,_ZNK2al15AreaObjDirector15getAreaObjGroupEPKc
0x0000007100804518,U,000132,_ZNK2al15AreaObjDirector16isExistAreaGroupEPKc
0x000000710080459c,U,000176,_ZN2al15AreaObjDirector18getInVolumeAreaObjEPKcRKN4sead7Vector3IfEE
0x000000710080464c,U,000008,_ZNK2al15AreaObjDirector21getMtxConnecterHolderEv
0x0000007100804654,U,000036,_ZN2al14AreaObjFactoryC2EPKc
0x0000007100804678,U,000144,_ZNK2al14AreaObjFactory20tryFindAddBufferSizeEPKc
0x0000007100804708,U,000012,_ZN2al12AreaObjGroupC2EPKci
0x0000007100804714,U,000016,_ZN2al12AreaObjGroup14incrementCountEv
0x0000007100804724,U,000068,_ZN2al12AreaObjGroup12createBufferEv
0x0000007100804768,U,000072,_ZN2al12AreaObjGroup12createBufferEi
0x00000071008047b0,U,000044,_ZN2al12AreaObjGroup15registerAreaObjEPNS_7AreaObjE
0x00000071008047dc,U,000012,_ZNK2al12AreaObjGroup10getAreaObjEi
0x00000071008047e8,U,000152,_ZNK2al12AreaObjGroup18getInVolumeAreaObjERKN4sead7Vector3IfEE
0x0000007100803de4,O,000016,_ZN2al15AreaObjDirectorC2Ev
0x0000007100803df4,O,000236,_ZN2al15AreaObjDirector4initEPKNS_14AreaObjFactoryE
0x0000007100803ee0,O,000004,_ZN2al15AreaObjDirector7endInitEv
0x0000007100803ee4,O,000016,_ZN2al15AreaObjDirector6updateEv
0x0000007100803ef4,O,000052,_ZN2al15AreaObjDirector9placementERKNS_12AreaInitInfoE
0x0000007100803f28,O,000156,_ZN2al15AreaObjDirector9placementEPKNS_12AreaInitInfoEi
0x0000007100803fc4,O,000340,_ZN2al15AreaObjDirector18createAreaObjGroupERKNS_12AreaInitInfoE
0x0000007100804118,O,000448,_ZN2al15AreaObjDirector24createAreaObjGroupBufferEv
0x00000071008042d8,O,000448,_ZN2al15AreaObjDirector16placementAreaObjERKNS_12AreaInitInfoE
0x0000007100804498,O,000128,_ZNK2al15AreaObjDirector15getAreaObjGroupEPKc
0x0000007100804518,O,000132,_ZNK2al15AreaObjDirector16isExistAreaGroupEPKc
0x000000710080459c,O,000176,_ZN2al15AreaObjDirector18getInVolumeAreaObjEPKcRKN4sead7Vector3IfEE
0x000000710080464c,O,000008,_ZNK2al15AreaObjDirector21getMtxConnecterHolderEv
0x0000007100804654,O,000036,_ZN2al14AreaObjFactoryC2EPKc
0x0000007100804678,O,000144,_ZNK2al14AreaObjFactory20tryFindAddBufferSizeEPKc
0x0000007100804708,O,000012,_ZN2al12AreaObjGroupC2EPKci
0x0000007100804714,O,000016,_ZN2al12AreaObjGroup14incrementCountEv
0x0000007100804724,O,000068,_ZN2al12AreaObjGroup12createBufferEv
0x0000007100804768,O,000072,_ZN2al12AreaObjGroup12createBufferEi
0x00000071008047b0,O,000044,_ZN2al12AreaObjGroup15registerAreaObjEPNS_7AreaObjE
0x00000071008047dc,O,000012,_ZNK2al12AreaObjGroup10getAreaObjEi
0x00000071008047e8,O,000152,_ZNK2al12AreaObjGroup18getInVolumeAreaObjERKN4sead7Vector3IfEE
0x0000007100804880,U,000072,_ZN2al19AreaObjMtxConnecterC1EPNS_7AreaObjERKNS_13PlacementInfoE
0x00000071008048c8,U,000112,_ZN2al19AreaObjMtxConnecter15trySetParentMtxEPKN4sead8Matrix34IfEERKNS_13PlacementInfoEPKNS_13ValidatorBaseE
0x0000007100804938,U,000136,_ZN2al19AreaObjMtxConnecter16trySyncParentMtxEPKN4sead8Matrix34IfEERKNS_13PlacementInfoEPKNS_13ValidatorBaseE
Expand Down Expand Up @@ -55904,7 +55904,7 @@ Address,Quality,Size,Name
0x00000071008d61ec,U,000264,_ZN2al20isInAreaObjPlayerAllEPKNS_9LiveActorEPKNS_12AreaObjGroupE
0x00000071008d62f4,U,000184,_ZN2al23isInAreaObjPlayerAnyOneEPKNS_9LiveActorEPKNS_7AreaObjE
0x00000071008d63ac,U,000248,_ZN2al23isInAreaObjPlayerAnyOneEPKNS_9LiveActorEPKNS_12AreaObjGroupE
0x00000071008d64a4,U,000112,_ZN2al13createAreaObjERKNS_13ActorInitInfoEPKc
0x00000071008d64a4,O,000112,_ZN2al13createAreaObjERKNS_13ActorInitInfoEPKc
0x00000071008d6514,U,000020,_ZN2al16initAreaInitInfoEPNS_12AreaInitInfoERKNS_13ActorInitInfoE
0x00000071008d6528,U,000156,_ZN2al14createLinkAreaERKNS_13ActorInitInfoEPKcS4_
0x00000071008d65c4,U,000016,_ZN2al16initAreaInitInfoEPNS_12AreaInitInfoERKNS_13PlacementInfoERKNS_13ActorInitInfoE
Expand Down
7 changes: 3 additions & 4 deletions lib/al/include/Library/Area/AreaInitInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,24 @@
#include "Library/Placement/PlacementInfo.h"

namespace al {
class PlacementInfo;
class StageSwitchDirector;
class SceneObjHolder;

class AreaInitInfo {
class AreaInitInfo : public PlacementInfo {
public:
AreaInitInfo();
AreaInitInfo(){};
AreaInitInfo(const PlacementInfo& placementInfo, StageSwitchDirector* stageSwitchDirector,
SceneObjHolder* sceneObjHolder);
AreaInitInfo(const PlacementInfo& placementInfo, const AreaInitInfo& initInfo);

void set(const PlacementInfo& placementInfo, StageSwitchDirector* stageSwitchDirector,
SceneObjHolder* sceneObjHolder);

const PlacementInfo& getPlacementInfo() const { return mPlacementInfo; }
StageSwitchDirector* getStageSwitchDirector() const { return mStageSwitchDirector; }
SceneObjHolder* getSceneObjHolder() const { return mSceneObjHolder; }

private:
PlacementInfo mPlacementInfo;
StageSwitchDirector* mStageSwitchDirector;
SceneObjHolder* mSceneObjHolder;
};
Expand Down
43 changes: 43 additions & 0 deletions lib/al/include/Library/Area/AreaObj.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#pragma once

#include <math/seadMatrix.h>

#include "Library/HostIO/HioNode.h"
#include "Library/Scene/IUseSceneObjHolder.h"
#include "Library/Stage/IUseStageSwitch.h"

namespace al {
class AreaInitInfo;
class AreaObjGroup;
class AreaShape;
class PlacementInfo;
class SceneObjHolder;
class StageSwitchKeeper;

class AreaObj : public IUseStageSwitch, public IUseSceneObjHolder, public HioNode {
public:
AreaObj(const char* name);
const char* getName() const override;
StageSwitchKeeper* getStageSwitchKeeper() const override;
void initStageSwitchKeeper() override;
virtual void init(const AreaInitInfo& initInfo);
virtual bool isInVolume(const sead::Vector3f& position) const;
virtual bool isInVolumeOffset(const sead::Vector3f&, f32 offset) const;
SceneObjHolder* getSceneObjHolder() const override;
void validate();
void invalidate();

s32 getPriority() { return mPriority; };

private:
const char* mName;
AreaShape* mAreaShape = nullptr;
StageSwitchKeeper* mStageSwitchKeeper = nullptr;
SceneObjHolder* mSceneObjHolder = nullptr;
sead::Matrix34f mMatrixTR = sead::Matrix34f::ident;
PlacementInfo* mPlacementInfo = nullptr;
s32 mPriority = -1;
bool isValid = true;
};

} // namespace al
36 changes: 27 additions & 9 deletions lib/al/include/Library/Area/AreaObjDirector.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include <basis/seadTypes.h>
#include <math/seadVector.h>

#include "Library/Area/AreaObjGroup.h"

namespace al {
class AreaObjFactory;
class AreaObjMtxConnecterHolder;
Expand All @@ -17,19 +19,35 @@ class AreaObjDirector {
void endInit();
void update();
void placement(const AreaInitInfo& initInfo);
void placement(const AreaInitInfo& initInfo, s32);
void placement(const AreaInitInfo* initInfo, s32 initInfoCount);
void createAreaObjGroup(const AreaInitInfo& initInfo);
void createAreaObjGroupBuffer(const AreaInitInfo& initInfo);
void createAreaObjGroupBuffer();
void placementAreaObj(const AreaInitInfo& initInfo);
AreaObjGroup* getAreaObjGroup(const char* name);
bool isExistAreaGroup(const char* name);
AreaObjGroup* getAreaObjGroup(const char* name) const;
bool isExistAreaGroup(const char* name) const;
AreaObj* getInVolumeAreaObj(const char* name, const sead::Vector3f& position);
AreaObjMtxConnecterHolder* getMtxConnecterHolder();
AreaObjMtxConnecterHolder* getMtxConnecterHolder() const;

private:
AreaObjFactory* mFactory;
AreaObjMtxConnecterHolder* mMtxConnecterHolder;
AreaObjGroup** mAreaGroups;
u32 mAreaGroupCount;
const AreaObjFactory* mFactory = nullptr;
AreaObjMtxConnecterHolder* mMtxConnecterHolder = nullptr;
AreaObjGroup** mAreaGroups = nullptr;
u32 mAreaGroupCount = 0;

AreaObjGroup* _getAreaObjGroup(const char* name) const {
s32 lower = 0;
s32 upper = mAreaGroupCount;
while (lower < upper) {
s32 i = (lower + upper) / 2;
s32 equalString = strcmp(name, mAreaGroups[i]->getName());
if (equalString == 0) {
return mAreaGroups[i];
} else if (equalString > 0) {
lower = i + 1;
} else
upper = i;
}
return nullptr;
}
};
} // namespace al
35 changes: 35 additions & 0 deletions lib/al/include/Library/Area/AreaObjFactory.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#pragma once

#include "Library/Factory/Factory.h"

namespace al {

class AreaObj;

using AreaObjCreatorFunction = AreaObj* (*)(const char*);

struct AreaGroupInfo {
const char* name;
s32 size;
};

class AreaObjFactory : public Factory<AreaObjCreatorFunction> {
public:
AreaObjFactory(const char* factoryName);
s32 tryFindAddBufferSize(const char* bufferName) const;

AreaGroupInfo* getAreaGroupInfo() const { return mAreaGroupInfo; };
s32 getAreaGroupCount() const { return mNumBuffers; };

template <s32 N>
void setAreaGroupInfo(AreaGroupInfo (&areaInfo)[N]) {
mNumBuffers = N;
mAreaGroupInfo = areaInfo;
}

private:
AreaGroupInfo* mAreaGroupInfo = nullptr;
s32 mNumBuffers = 0;
};

} // namespace al
26 changes: 26 additions & 0 deletions lib/al/include/Library/Area/AreaObjGroup.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#pragma once

#include <math/seadVector.h>

namespace al {
class AreaObj;

class AreaObjGroup {
public:
AreaObjGroup(const char* groupName, const int capacity);
void createBuffer();
void createBuffer(const s32 capacity);
AreaObj* getAreaObj(const s32 index) const;
AreaObj* getInVolumeAreaObj(const sead::Vector3f& position) const;
void incrementCount();
void registerAreaObj(AreaObj* newAreaObj);

const char* getName() const { return mGroupName; };

private:
const char* mGroupName;
AreaObj** mBuffer = nullptr;
s32 mCount = 0;
s32 mCapacity;
};
} // namespace al
46 changes: 46 additions & 0 deletions lib/al/include/Library/Area/AreaObjMtxConnecter.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#pragma once

#include <math/seadMatrix.h>

#include "Library/Placement/PlacementInfo.h"

namespace al {
class AreaObj;
class MtxConnector;
class PlacementInfo;
class ValidatorBase;

class AreaObjMtxConnecter {
public:
AreaObjMtxConnecter(AreaObj* areaObj, const PlacementInfo& placementInfo);
bool trySetParentMtx(const sead::Matrix34f* parentMtx, const PlacementInfo& placementInfo,
const ValidatorBase* validatorBase);
bool trySyncParentMtx(const sead::Matrix34f* parentMtx, const PlacementInfo& placementInfo,
const ValidatorBase* validatorBase);
void update();

private:
AreaObj* mAreaObj;
sead::Matrix34f mMatrix;
MtxConnector* mMtxConnector = nullptr;
PlacementInfo mPlacementInfo;
ValidatorBase* mValidatorBase = nullptr;
};

class AreaObjMtxConnecterHolder {
public:
AreaObjMtxConnecterHolder(s32 capacity);
void registerParentMtx(const sead::Matrix34f* parentMtx, const PlacementInfo& placementInfo,
const ValidatorBase* validatorBase);
void registerSyncParentMtx(const sead::Matrix34f* parentMtx, const PlacementInfo& placementInfo,
const ValidatorBase* validatorBase);
s32 tryAddArea(AreaObj* areaObj, const PlacementInfo& placementInfo);
void update();

private:
MtxConnector** mMtxConnectors;
s32 mNumConnectors = 0;
s32 mCapacity;
};

} // namespace al
19 changes: 19 additions & 0 deletions lib/al/include/Library/Area/TrafficArea.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#pragma once

#include "Library/Area/AreaObj.h"

namespace al {
class TrafficArea : public AreaObj {
public:
TrafficArea(const char* name);

bool tryPermitEnterCar();
bool tryPermitEnterNpc();

private:
bool mCarFull = false;
bool mNpcFull = false;
bool mNpcUnavailable = false;
char mUnkChar = '\0';
};
} // namespace al
Loading
Loading