Cleanup & Additions by Sanae (a8e87b3)

Co-authored-by: Sanae <atmatm6000@outlook.com>
This commit is contained in:
MonsterDruide1 2023-08-11 00:31:24 +02:00
parent e7416c33cc
commit fadf8c9834
43 changed files with 699 additions and 122 deletions

View File

@ -20608,10 +20608,10 @@ Address,Quality,Size,Name
0x000000710034af50,U,000140,_ZNK14WindBlowPuzzle14checkCollisionERKN4sead7Vector3IiEE
0x000000710034afdc,U,000132,
0x000000710034b060,U,000140,
0x000000710034b0ec,U,000120,_ZN13WorldMapEarthC2EPKc
0x000000710034b164,U,000132,_ZN13WorldMapEarthC1EPKc
0x000000710034b1e8,U,000048,_ZN13WorldMapEarth4initERKN2al13ActorInitInfoE
0x000000710034b218,U,000076,_ZN13WorldMapEarth7controlEv
0x000000710034b0ec,O,000120,_ZN13WorldMapEarthC2EPKc
0x000000710034b164,O,000132,_ZN13WorldMapEarthC1EPKc
0x000000710034b1e8,O,000048,_ZN13WorldMapEarth4initERKN2al13ActorInitInfoE
0x000000710034b218,O,000076,_ZN13WorldMapEarth7controlEv
0x000000710034b264,U,000364,_ZN17WorldMapKoopaShip6createEPKcRKN2al13ActorInitInfoEPKN4sead8Matrix34IfEE
0x000000710034b3d0,U,000156,_ZN17WorldMapKoopaShipC1EPKc
0x000000710034b46c,U,000144,_ZN17WorldMapKoopaShipC2EPKc
@ -33917,7 +33917,7 @@ Address,Quality,Size,Name
0x0000007100538b30,U,000008,_ZNK18PlayerHitPointData17isForceNormalModeEv
0x0000007100538b38,U,000072,_ZN18PlayerHitPointData5writeEPN2al11ByamlWriterE
0x0000007100538b80,U,000180,_ZN18PlayerHitPointData4readERKN2al9ByamlIterE
0x0000007100538c34,U,000020,_ZN18alProjectInterface12getSystemKitEv
0x0000007100538c34,O,000020,_ZN18alProjectInterface12getSystemKitEv
0x0000007100538c48,U,000056,_ZN18ProjectNfpDirectorC2Ev
0x0000007100538c80,U,000004,_ZN18ProjectNfpDirectorD2Ev
0x0000007100538c84,U,000036,_ZN18ProjectNfpDirectorD0Ev
@ -33934,8 +33934,8 @@ Address,Quality,Size,Name
0x0000007100538fc4,U,000224,_ZN10RaceRecord4readERKN2al9ByamlIterE
0x00000071005390a4,U,000068,_ZN8RootTaskC2ERKN4sead16TaskConstructArgE
0x00000071005390e8,U,000476,_ZN8RootTask7prepareEv
0x00000071005392c4,U,000004,_ZN8RootTask5enterEv
0x00000071005392c8,U,000160,_ZN8RootTask4calcEv
0x00000071005392c4,O,000004,_ZN8RootTask5enterEv
0x00000071005392c8,O,000160,_ZN8RootTask4calcEv
0x0000007100539368,U,000016,_ZN8RootTask4drawEv
0x0000007100539378,U,000036,_ZN8RootTaskD0Ev
0x000000710053939c,U,000204,_ZNK4sead4Task27checkDerivedRuntimeTypeInfoEPKNS_15RuntimeTypeInfo9InterfaceE
@ -55944,8 +55944,8 @@ Address,Quality,Size,Name
0x00000071008d7694,U,000072,_ZN2al35tryExpandClippingByShadowMaskLengthEPNS_9LiveActorEPN4sead7Vector3IfEE
0x00000071008d76dc,U,000640,_ZN2al36tryExpandClippingByDepthShadowLengthEPNS_9LiveActorEPN4sead7Vector3IfEE
0x00000071008d795c,U,000116,_ZN2al31tryExpandClippingByExpandObjectEPNS_9LiveActorERKNS_13ActorInitInfoE
0x00000071008d79d0,U,000012,_ZN2al9isClippedEPKNS_9LiveActorE
0x00000071008d79dc,U,000012,_ZN2al17isInvalidClippingEPKNS_9LiveActorE
0x00000071008d79d0,O,000012,_ZN2al9isClippedEPKNS_9LiveActorE
0x00000071008d79dc,O,000012,_ZN2al17isInvalidClippingEPKNS_9LiveActorE
0x00000071008d79e8,U,000100,_ZN2al18invalidateClippingEPNS_9LiveActorE
0x00000071008d7a4c,U,000072,_ZN2al16validateClippingEPNS_9LiveActorE
0x00000071008d7a94,U,000168,_ZN2al14onDrawClippingEPNS_9LiveActorE
@ -55959,7 +55959,7 @@ Address,Quality,Size,Name
0x00000071008d7cec,U,000044,_ZN15alActorFunction19validateFarClippingEPN2al9LiveActorE
0x00000071008d7d18,U,000024,_ZN15alActorFunction18getFarClipDistanceEPKN2al9LiveActorE
0x00000071008d7d30,U,000048,_ZN15alActorFunction20isInvalidFarClippingEPKN2al9LiveActorE
0x00000071008d7d60,U,000012,_ZN15alActorFunction14isDrawClippingEPKN2al9LiveActorE
0x00000071008d7d60,O,000012,_ZN15alActorFunction14isDrawClippingEPKN2al9LiveActorE
0x00000071008d7d6c,U,000048,_ZN15alActorFunction23checkActiveViewGroupAnyEPKN2al9LiveActorE
0x00000071008d7d9c,U,000008,_ZN2al16getActorColliderEPKNS_9LiveActorE
0x00000071008d7da4,U,000016,_ZN2al20isExistActorColliderEPKNS_9LiveActorE
@ -56070,16 +56070,16 @@ Address,Quality,Size,Name
0x00000071008d99c8,U,000020,_ZN2al16invalidateShadowEPNS_9LiveActorE
0x00000071008d99dc,U,000024,_ZN2al9onCollideEPNS_9LiveActorE
0x00000071008d99f4,O,000016,_ZN2al10offCollideEPNS_9LiveActorE
0x00000071008d9a04,U,000016,_ZN2al20validateMaterialCodeEPNS_9LiveActorE
0x00000071008d9a14,U,000012,_ZN2al22invalidateMaterialCodeEPNS_9LiveActorE
0x00000071008d9a20,U,000016,_ZN2al22validatePuddleMaterialEPNS_9LiveActorE
0x00000071008d9a30,U,000012,_ZN2al24invalidatePuddleMaterialEPNS_9LiveActorE
0x00000071008d9a3c,U,000012,_ZN2al12isAreaTargetEPKNS_9LiveActorE
0x00000071008d9a48,U,000016,_ZN2al12onAreaTargetEPNS_9LiveActorE
0x00000071008d9a04,O,000016,_ZN2al20validateMaterialCodeEPNS_9LiveActorE
0x00000071008d9a14,O,000012,_ZN2al22invalidateMaterialCodeEPNS_9LiveActorE
0x00000071008d9a20,O,000016,_ZN2al22validatePuddleMaterialEPNS_9LiveActorE
0x00000071008d9a30,O,000012,_ZN2al24invalidatePuddleMaterialEPNS_9LiveActorE
0x00000071008d9a3c,O,000012,_ZN2al12isAreaTargetEPKNS_9LiveActorE
0x00000071008d9a48,O,000016,_ZN2al12onAreaTargetEPNS_9LiveActorE
0x00000071008d9a58,U,000012,_ZN2al13offAreaTargetEPNS_9LiveActorE
0x00000071008d9a64,U,000012,_ZN2al42isUpdateMovementEffectAudioCollisionSensorEPKNS_9LiveActorE
0x00000071008d9a70,U,000016,_ZN2al42onUpdateMovementEffectAudioCollisionSensorEPNS_9LiveActorE
0x00000071008d9a80,U,000012,_ZN2al43offUpdateMovementEffectAudioCollisionSensorEPNS_9LiveActorE
0x00000071008d9a64,O,000012,_ZN2al42isUpdateMovementEffectAudioCollisionSensorEPKNS_9LiveActorE
0x00000071008d9a70,O,000016,_ZN2al42onUpdateMovementEffectAudioCollisionSensorEPNS_9LiveActorE
0x00000071008d9a80,O,000012,_ZN2al43offUpdateMovementEffectAudioCollisionSensorEPNS_9LiveActorE
0x00000071008d9a8c,U,000104,_ZN2al18initActorSceneInfoEPNS_9LiveActorERKNS_13ActorInitInfoE
0x00000071008d9af4,U,000008,_ZN2al18initExecutorUpdateEPNS_9LiveActorERKNS_13ActorInitInfoEPKc
0x00000071008d9afc,U,000008,_ZN2al16initExecutorDrawEPNS_9LiveActorERKNS_13ActorInitInfoEPKc
@ -62365,7 +62365,7 @@ Address,Quality,Size,Name
0x00000071009c2f50,U,000004,_ZN2al16createRailKeeperERKNS_13PlacementInfoEPKc
0x00000071009c2f54,U,000168,_ZN2al19tryCreateRailKeeperERKNS_13PlacementInfoEPKc
0x00000071009c2ffc,U,000164,_ZN2al21createRailKeeperIndexERKNS_13PlacementInfoEiPKc
0x00000071009c30a0,U,000008,_ZNK2al10RailKeeper12getRailRiderEv
0x00000071009c30a0,O,000008,_ZNK2al10RailKeeper12getRailRiderEv
0x00000071009c30a8,O,000012,_ZN2al8RailPartC2Ev
0x00000071009c30b4,O,000336,_ZN2al8RailPart4initERKN4sead7Vector3IfEES5_S5_S5_
0x00000071009c3204,O,000024,_ZNK2al8RailPart7calcPosEPN4sead7Vector3IfEEf

Can't render this file because it is too large.

View File

@ -0,0 +1,35 @@
#pragma once
#include <basis/seadTypes.h>
#include <math/seadVector.h>
namespace al {
class AreaObjFactory;
class AreaObjMtxConnecterHolder;
class AreaObjGroup;
class AreaObj;
class AreaInitInfo;
class AreaObjDirector {
public:
AreaObjDirector();
void init(const AreaObjFactory* factory);
void endInit();
void update();
void placement(const AreaInitInfo& initInfo);
void placement(const AreaInitInfo& initInfo, s32);
void createAreaObjGroup(const AreaInitInfo& initInfo);
void createAreaObjGroupBuffer(const AreaInitInfo& initInfo);
void placementAreaObj(const AreaInitInfo& initInfo);
AreaObjGroup* getAreaObjGroup(const char* name);
bool isExistAreaGroup(const char* name);
AreaObj* getInVolumeAreaObj(const char* name, const sead::Vector3f& position);
AreaObjMtxConnecterHolder* getMtxConnecterHolder();
private:
AreaObjFactory* mFactory;
AreaObjMtxConnecterHolder* mMtxConnecterHolder;
AreaObjGroup** mAreaGroups;
u32 mAreaGroupCount;
};
} // namespace al

View File

@ -1,5 +1,6 @@
#pragma once
#include <math/seadMatrix.h>
#include "al/Library/HostIO/HioNode.h"
#include "al/Library/Execute/IUseExecutor.h"
@ -21,13 +22,53 @@ class CameraParamTransfer;
class CameraResourceHolder;
class CameraFlagCtrl;
class CameraInSwitchOnAreaDirector;
class CameraTicket;
class ICameraInput;
class PlacementId;
class CameraPoser;
class AreaObjDirector;
class IUseAudioKeeper;
class CameraRailHolder;
class NameToCameraParamTransferFunc;
class CameraDirector : public HioNode, IUseExecutor {
public:
virtual ~CameraDirector();
void init(CameraPoserSceneInfo*, const CameraPoserFactory*);
void initAreaCameraSwitcherMultiForPrototype(AreaObjDirector*);
void initAreaCameraSwitcherSingle();
void initResourceHolder(const CameraResourceHolder* resourceHolder);
void initSceneFovyDegree(float fov);
void initSettingCloudSea(float);
void initSnapShotCameraAudioKeeper(IUseAudioKeeper* audioKeeper);
void initAndCreatePauseCameraCtrl(float);
void execute() override;
void update();
void endInit();
CameraPoseUpdater* getPoseUpdater(s32 index);
CameraTicket* createCameraFromFactory(const char*, const PlacementId*, const char*, s32, const sead::Matrix34f&);
CameraTicket* createCameraFromFactory(CameraPoser*, const PlacementId*, const char*, s32, const sead::Matrix34f&, bool);
CameraTicket* createObjectCamera(const PlacementId*, const char*, const char*, s32, const sead::Matrix34f&);
CameraTicket* createObjectEntranceCamera(const PlacementId*, const char*, const sead::Matrix34f&);
CameraTicket* createMirrorObjectCamera(const PlacementId*, const char*, s32, const sead::Matrix34f&);
ICameraInput* getCameraInput();
void setCameraInput(const ICameraInput* input);
void setViewCameraInput(const ICameraInput* input, s32);
void registerCameraRailHolder(CameraRailHolder* railHolder);
void setCameraParamTransferFuncTable(const NameToCameraParamTransferFunc*, s32);
f32 getSceneFovyDegree();
void validateCameraArea2D();
void invalidateCameraArea2D();
void stopByDeathPlayer();
void restartByDeathPlayer();
void startInvalidStopJudgeByDemo();
void endInvalidStopJudgeByDemo();
void startSnapShotMode(bool);
al::CameraPoseUpdater* getPoseUpdater(int index);
float getSceneFovyDegree() const;
void endSnapShotMode();
private:
int mCountCameraPoseUpdaters;

View File

@ -32,19 +32,19 @@ class ByamlIter;
class Nerve;
class SnapShotCameraCtrl;
class CameraPoser : public al::HioNode,
public al::IUseAreaObj,
public al::IUseAudioKeeper,
public al::IUseCollision,
public al::IUseName,
public al::IUseNerve,
public al::IUseRail {
class CameraPoser : public HioNode,
public IUseAreaObj,
public IUseAudioKeeper,
public IUseCollision,
public IUseName,
public IUseNerve,
public IUseRail {
public:
CameraPoser(const char* poserName);
virtual AreaObjDirector* getAreaObjDirector() const override;
virtual void init();
virtual void initByPlacementObj(const al::PlacementInfo&);
virtual void initByPlacementObj(const PlacementInfo&);
virtual void endInit();
virtual void start(const CameraStartInfo&);
virtual void update();
@ -66,21 +66,21 @@ public:
virtual void load(const ByamlIter&);
virtual void movement();
virtual void calcCameraPose(sead::LookAtCamera*) const;
virtual void requestTurnToDirection(const al::CameraTurnInfo*);
virtual void requestTurnToDirection(const CameraTurnInfo*);
bool isInterpoleByCameraDistance() const;
bool isInterpoleEaseOut() const;
bool isEndInterpoleByStep() const;
bool isFirstCalc() const;
void initNerve(const al::Nerve*, int);
void initArrowCollider(al::CameraArrowCollider*);
void initNerve(const Nerve*, int);
void initArrowCollider(CameraArrowCollider*);
void initAudioKeeper(const char*);
void initRail(const al::PlacementInfo&);
void initRail(const PlacementInfo&);
void initLocalInterpole();
void initLookAtInterpole(float);
void initOrthoProjectionParam();
void tryInitAreaLimitter(const al::PlacementInfo&);
void tryInitAreaLimitter(const PlacementInfo&);
void makeLookAtCameraPrev(sead::LookAtCamera*) const;
void makeLookAtCameraPost(sead::LookAtCamera*) const;
@ -93,9 +93,9 @@ public:
void setInterpoleEaseOut();
void getEndInterpoleStep();
void appear(const al::CameraStartInfo&);
void appear(const CameraStartInfo&);
void calcCameraPose(sead::LookAtCamera*);
void receiveRequestFromObjectCore(const al::CameraObjectRequestInfo&);
void receiveRequestFromObjectCore(const CameraObjectRequestInfo&);
void startSnapShotModeCore();
void endSnapShotModeCore();
@ -117,7 +117,7 @@ private:
sead::Matrix34f mViewMtx = sead::Matrix34f::ident;
bool field_98 = false;
CameraViewInfo* mViewInfo;
al::AreaObjDirector* mAreaDirector;
AreaObjDirector* mAreaDirector;
CameraPoserFlag* mPoserFlags;
CameraVerticalAbsorber* mVerticalAbsorber;
CameraAngleCtrlInfo* mAngleCtrlInfo;

View File

@ -0,0 +1,60 @@
#pragma once
#include <container/seadPtrArray.h>
#include <math/seadVector.h>
#include <prim/seadDelegate.h>
#include "al/Library/Execute/IUseExecutor.h"
namespace al {
class ICollisionPartsKeeper;
class CollisionPartsKeeperOctree;
class CollisionPartsKeeperPtrArray;
class CollisionPartsFilterBase;
class TriangleFilterBase;
class Strike;
class HitInfo;
class ArrowHitInfo;
class DiskHitInfo;
class SphereHitInfo;
class CollisionParts;
class ExecuteDirector;
class CollisionDirector : public IUseExecutor {
public:
CollisionDirector(ExecuteDirector* executeDirector);
void setPartsKeeper(ICollisionPartsKeeper* partsKeeper);
void endInit();
void setPartsFilter(const CollisionPartsFilterBase*);
void setTriFilter(const TriangleFilterBase*);
bool checkStrikePoint(const sead::Vector3f&, HitInfo*);
bool checkStrikeSphere(const sead::Vector3f&, f32, bool, const sead::Vector3f&);
bool checkStrikeArrow(const sead::Vector3f&, const sead::Vector3f&);
bool checkStrikeSphereForPlayer(const sead::Vector3f&, f32);
bool checkStrikeDisk(const sead::Vector3f&, f32, f32, const sead::Vector3f&);
sead::PtrArray<ArrowHitInfo>* getStrikeArrowInfo(u32 index);
u32 getStrikeArrowInfoNum();
sead::PtrArray<DiskHitInfo>* getStrikeSphereInfo(u32 index);
u32 getStrikeSphereInfoNum();
sead::PtrArray<SphereHitInfo>* getStrikeDiskInfo(u32 index);
u32 getStrikeDiskInfoNum();
void getSphereHitInfoArrayForCollider(SphereHitInfo** infoArray, u32* count);
void getDiskHitInfoArrayForCollider(DiskHitInfo** infoArray, u32* count);
void execute();
void searchCollisionPartsWithSphere(const sead::Vector3f&, f32, sead::IDelegate1<CollisionParts*>&, const CollisionPartsFilterBase*);
void validateCollisionPartsPtrArray(sead::PtrArray<CollisionParts>*);
void invalidateCollisionPartsPtrArray();
sead::PtrArray<CollisionParts>* getCollisionPartsPtrArray();
private:
ICollisionPartsKeeper* mActivePartsKeeper;
CollisionPartsKeeperOctree* mRootOctree;
CollisionPartsKeeperPtrArray* mCollisionPartsKeeperPtrArray;
CollisionPartsFilterBase* mCollisionPartsFilterBase;
TriangleFilterBase* mTriangleFilterBase;
sead::PtrArray<ArrowHitInfo>* mStrikeArrowHitInfos;
sead::PtrArray<DiskHitInfo>* mStrikeDiskHitInfos;
sead::PtrArray<SphereHitInfo>* mStrikeSphereHitInfos;
SphereHitInfo* mSphereHitArray;
DiskHitInfo* mDiskHitArray;
};
} // namespace al

View File

@ -1,25 +1,34 @@
#pragma once
#include <container/seadBuffer.h>
#include <prim/seadSafeString.h>
namespace al {
class AudioSystem;
class GamePadSystem {
public:
GamePadSystem();
void changeSinglePlayMode();
void changeMultiPlayMode(s32 minControllers, s32 maxControllers);
bool isDisconnectPlayable();
sead::WFixedSafeString<256> getPadName(u8); // might return a parent type instead of this specific format
int getPadPlayStyle(u8); // unknown return type
void update();
bool isDisconnectPlayableImpl();
void setDisconnectFrame(int);
void setInvalidateDisconnectFrame(int);
void setPadName(u8, const sead::SafeString&);
void changeMultiPlayMode(int, int);
void setDisconnectFrame(s32 frame);
void setInvalidateDisconnectFrame(s32 frame);
void setPadName(u8, const sead::WSafeString&);
sead::WSafeString getPadName(u8);
int getPadPlayStyle(u8); // unknown return type
private:
char filler[0x30];
bool isDisconnectPlayableImpl();
int mMinControllerCount;
int mMaxControllerCount;
int mDisconnectTimer;
int mDisconnectFrame;
int mInvalidateDisconnectFrame;
sead::Buffer<sead::WFixedSafeString<256>> mControllerNames;
AudioSystem* mAudioSystem;
};
static_assert(sizeof(GamePadSystem) == 0x30);

View File

@ -0,0 +1,55 @@
#pragma once
#include <gfx/seadColor.h>
#include <math/seadMatrix.h>
#include <math/seadVector.h>
namespace al {
class Effect;
class EffectUserInfo;
class MtxPtrHolder;
class EffectSystemInfo;
class EffectPrefixType;
class EffectKeeper {
public:
EffectKeeper(EffectSystemInfo* systemInfo, const char*, const sead::Vector3f*,
const sead::Vector3f*, const sead::Matrix34f);
void update();
void tryUpdateMaterial(const char*);
void updatePrefix(const EffectPrefixType&, bool);
void emitEffectCurrentPos(const char*);
void findEffect(const char*);
void emitEffect(const char*, const sead::Vector3f*);
void tryEmitEffect(const char*, const sead::Vector3f*);
void deleteEffect(const char*);
void tryDeleteEffect(const char*);
void tryKillEmitterAndParticleAll();
void deleteEffectAll();
void deleteAndClearEffectAll();
void onCalcAndDraw();
void offCalcAndDraw();
void forceSetStopCalcAndDraw(bool);
void setEmitRatio(const char*, float);
void setEmitterAllScale(const char*, const sead::Vector3f&);
void setEmitterVolumeScale(const char*, const sead::Vector3f&);
void setParticleScale(const char*, float);
void setParticleScale(const char*, const sead::Vector3f&);
void setParticleAlpha(const char*, float);
void setParticleColor(const char*, const sead::Color4f&);
void setParticleLifeScale(const char*, float);
void findMtxPtr(const char*);
void tryFindEffect(const char*);
private:
const char* mName;
u32 mEffectCount;
Effect** mEffects;
const char* mMaterialName;
bool mHasEmittedEffect;
bool field_21;
bool field_22;
EffectUserInfo* mEffectUserInfo;
MtxPtrHolder* mMtxPtrHolder;
};
} // namespace al

View File

@ -0,0 +1,26 @@
#pragma once
#include <basis/seadTypes.h>
namespace al {
class LayoutPaneGroup;
class LayoutKeeper;
class IUseAudioKeeper;
class IUseEffectKeeper;
class LayoutActionKeeper {
public:
LayoutActionKeeper(LayoutKeeper*, IUseAudioKeeper*, IUseEffectKeeper*);
void startAction(const char* actionName, const char* groupName);
void findPaneGroupInfo(const char* groupName);
void update();
void setMainGroupName(const char* groupName);
void getLayoutPaneGroup(const char* groupName);
private:
bool mHasStartedAction;
LayoutPaneGroup* mLayoutPaneGroups;
u32 mPaneGroupNum;
const char* mMainGroupName;
};
} // namespace al

View File

@ -33,3 +33,12 @@ bool isInClippingFrustum(const LiveActor* actor, const sead::Vector3f&, f32, f32
bool isInClippingFrustum(const ClippingDirector* director, const sead::Vector3f&, f32, f32, s32);
bool isInClippingFrustumAllView(const LiveActor* actor, const sead::Vector3f& pos, f32, f32);
} // namespace al
namespace alActorFunction {
void invalidateFarClipping(al::LiveActor*);
void validateFarClipping(al::LiveActor*);
f32 getFarClipDistance(const al::LiveActor*);
bool isInvalidFarClipping(const al::LiveActor*);
bool isDrawClipping(const al::LiveActor* actor);
bool checkActiveViewGroupAny(const al::LiveActor* actor);
} // namespace alActorFunction

View File

@ -19,7 +19,7 @@ void invalidatePuddleMaterial(LiveActor* actor);
bool isAreaTarget(const LiveActor* actor);
void onAreaTarget(LiveActor* actor);
void offAreaTarget(LiveActor* actor);
void isUpdateMovementEffectAudioCollisionSensor(const LiveActor* actor);
bool isUpdateMovementEffectAudioCollisionSensor(const LiveActor* actor);
void onUpdateMovementEffectAudioCollisionSensor(LiveActor* actor);
void offUpdateMovementEffectAudioCollisionSensor(LiveActor* actor);
}
} // namespace al

View File

@ -3,6 +3,7 @@
#include <math/seadMatrix.h>
#include <math/seadQuat.h>
#include <math/seadVector.h>
#include "math/seadVectorFwd.h"
namespace al {
@ -283,8 +284,8 @@ void setTrans(LiveActor* actor, f32, f32, f32);
void setTransX(LiveActor* actor, f32);
void setTransY(LiveActor* actor, f32);
void setTransZ(LiveActor* actor, f32);
void getRotate(const LiveActor* actor);
void getRotatePtr(LiveActor* actor);
const sead::Vector3f& getRotate(const LiveActor* actor);
sead::Vector3f* getRotatePtr(LiveActor* actor);
void setRotate(LiveActor* actor, f32, f32, f32);
void setRotateX(LiveActor* actor, f32);
void setRotateY(LiveActor* actor, f32);

View File

@ -12,23 +12,23 @@ sead::Heap* getSceneHeap();
sead::Heap* getCourseSelectResourceHeap();
sead::Heap* getCourseSelectHeap();
sead::Heap* getWorldResourceHeap();
sead::Heap* tryFindNamedHeap(const char*);
sead::Heap* findNamedHeap(const char*);
void addNamedHeap(sead::Heap*, const char*);
void removeNamedHeap(const char*);
sead::Heap* tryFindNamedHeap(const char* heapName);
sead::Heap* findNamedHeap(const char* heapName);
void addNamedHeap(sead::Heap* heap, const char* heapName);
void removeNamedHeap(const char* heapName);
void createSequenceHeap();
void freeAllSequenceHeap();
void printAllSequenceHeap();
void createSceneHeap(const char*, bool);
void createSceneResourceHeap(const char*);
void createSceneHeap(const char* stageName, bool backwards);
void createSceneResourceHeap(const char* stageName);
void isCreatedSceneResourceHeap();
void destroySceneHeap(bool);
void destroySceneHeap(bool removeCategory);
void createCourseSelectHeap();
void destroyCourseSelectHeap();
void createWorldResourceHeap(bool);
void destroyWorldResourceHeap(bool);
void loadPlayerResource(const char*);
void freePlayerResource(const char*);
void setAudioResourceDirectorToMemorySystem(AudioResourceDirector*);
void createWorldResourceHeap(bool useCategory);
void destroyWorldResourceHeap(bool removeCategory);
void loadPlayerResource(const char* categoryName);
void freePlayerResource(const char* categoryName);
void setAudioResourceDirectorToMemorySystem(AudioResourceDirector* audioResourceDirector);
} // namespace al

View File

@ -1,5 +1,35 @@
#pragma once
#include <container/seadPtrArray.h>
#include <container/seadStrTreeMap.h>
namespace sead {
class MessageProject;
}
namespace al {
class MessageSystem {};
} // namespace al
class MessageProjectEx;
class MessageHolder;
class MessageSystem {
using MessageTreeMap = sead::StrTreeMap<256, MessageHolder*>;
public:
MessageSystem();
void initMessageForChangeLanguage();
bool tryInitMessageHolder(MessageTreeMap*, const char*, const char*, const char*);
sead::MessageProject* getMessageProject();
MessageHolder* getMessageHolderCore(const char*, s32);
MessageHolder* getMessageHolderCore(const char*, s32, const char*);
MessageHolder* getSystemMessageHolder(const char*);
MessageHolder* getSystemMessageHolder(const char*, const char*);
MessageHolder* getLayoutMessageHolder(const char*);
MessageHolder* getStageMessageHolder(const char*);
private:
MessageProjectEx* mMessageProject;
sead::PtrArray<MessageTreeMap> mTreeMaps;
sead::Heap* mMessageHeap;
};
} // namespace al

View File

@ -1,13 +1,18 @@
#pragma once
#include "al/Library/HostIO/HioNode.h"
#include "al/Library/Rail/IUseRail.h"
namespace al {
class RailRider;
class PlacementInfo;
class RailKeeper {
class RailKeeper : public IUseHioNode, public IUseRail {
public:
virtual al::RailRider* getRailRider() const;
RailKeeper(const PlacementInfo&);
RailRider* getRailRider() const override;
private:
al::RailRider* mRailRider;
RailRider* mRailRider;
};
} // namespace al

View File

@ -0,0 +1,39 @@
#pragma once
#include <math/seadVector.h>
namespace al {
class Rail;
class RailRider {
public:
RailRider(const Rail* rail);
void moveToRailStart();
void move();
void syncPosDir();
void setCoord(f32 coord);
void moveToRailPoint(s32 point);
void moveToRailEnd();
void moveToBegin();
void moveToGoal();
void moveToNearestRail(const sead::Vector3f& position);
void reverse();
void setMoveGoingStart();
void setMoveGoingEnd();
void setSpeed(f32 speed);
void addSpeed(f32 speed);
void scaleSpeed(f32 speed);
bool isReachedGoal();
bool isReachedRailEnd();
bool isReachedRailStart();
bool isReachedEdge();
private:
const Rail* mRail;
sead::Vector3f mPosition;
sead::Vector3f mDirection;
f32 mCoord;
f32 mRate;
bool mIsMoveForwards;
};
} // namespace al

View File

@ -3,8 +3,9 @@
#include <prim/seadSafeString.h>
#include "al/Library/Audio/IUseAudioKeeper.h"
#include "al/Library/Camera/IUseCamera.h"
#include "al/Library/LiveActor/ActorInitInfo.h"
#include "al/Library/Nerve/NerveExecutor.h"
#include "al/Library/Scene/SceneObjHolder.h"
#include "al/Library/Scene/IUseSceneObjHolder.h"
#include "al/Project/Scene/SceneInitInfo.h"
namespace al {

View File

@ -0,0 +1,17 @@
#pragma once
#include <prim/seadSafeString.h>
namespace al {
class SceneMsg {
public:
SceneMsg();
void clear();
void setMsg(const char*, const char*);
private:
void* field_00;
sead::FixedSafeString<128> field_08;
sead::FixedSafeString<128> field_a0;
};
} // namespace al

View File

@ -0,0 +1,13 @@
#pragma once
#include "al/Library/Scene/SceneMsg.h"
namespace al {
class SceneMsgCtrl {
public:
SceneMsgCtrl();
private:
SceneMsg mMessages[32];
};
} // namespace al

View File

@ -1,10 +1,22 @@
#pragma once
#include <basis/seadTypes.h>
#include "al/Library/HostIO/IUseName.h"
namespace al {
class StageSwitchAccesser;
class StageSwitchDirector;
class PlacementInfo;
class StageSwitchKeeper {
public:
StageSwitchKeeper();
void init(StageSwitchDirector*, const PlacementInfo&);
StageSwitchAccesser* tryGetStageSwitchAccesser(const char* name);
private:
StageSwitchAccesser* mStageSwitchAccessers;
s32 mAccesserNum;
void* field_10;
};
} // namespace al

View File

@ -0,0 +1,7 @@
#pragma once
#include "al/Project/Play/Graphics/IUseGridMesh.h"
namespace al {
class GridMeshXZ : public IUseGridMesh {};
} // namespace al

View File

@ -0,0 +1,29 @@
#pragma once
#include <basis/seadTypes.h>
#include <common/aglDrawContext.h>
#include "al/Library/HostIO/HioNode.h"
namespace agl {
class IndexStream;
}
namespace al {
class QuadNode;
class MeshQuadtree;
class IUseGridMesh : public IUseHioNode {
virtual void finalize() = 0;
virtual s32 getGridMeshType() const = 0;
virtual s32 getGridNum() const = 0;
virtual s32 getLodNum() const = 0;
virtual void calcMeshScaleLod(const QuadNode& node, s32) const = 0;
virtual agl::IndexStream* getIndexStream() const = 0;
virtual const char* getName() const = 0;
virtual void activateVertexAttribute(agl::DrawContext* drawContext, s32) const = 0;
virtual void drawTreeMesh(agl::DrawContext*, const MeshQuadtree&, const QuadNode&, float,
int) = 0;
virtual void drawArrayMesh(agl::DrawContext* drawContext, const QuadNode& node, int, int, int,
int, int) = 0;
};
} // namespace al

View File

@ -0,0 +1,36 @@
#pragma once
#include <heap/seadHeap.h>
namespace alSceneFunction {
class SceneFactory;
}
namespace al {
class GameSystemInfo;
class GameDataHolderBase;
class ScreenCaptureExecutor;
class InitializeThread;
class AudioDirector;
class Scene;
class SceneCreator {
private:
GameSystemInfo* mGameSystemInfo;
GameDataHolderBase* mGameDataHolder;
ScreenCaptureExecutor* mScreenCaptureExecutor;
alSceneFunction::SceneFactory* mSceneFactory;
InitializeThread* mInitializeThread;
AudioDirector* mAudioDirector;
public:
SceneCreator(const GameSystemInfo*, GameDataHolderBase*, ScreenCaptureExecutor*,
alSceneFunction::SceneFactory*, AudioDirector*);
void createScene(const char*, const char*, s32, const char*, bool, s32);
void setSceneAndThreadInit(Scene*, const char*, s32, const char*, s32, sead::Heap*);
void setSceneAndInit(Scene*, const char*, s32, const char*);
bool tryEndInitThread();
bool isExistInitThread();
};
} // namespace al

View File

@ -4,7 +4,7 @@
class CapTargetParts : public al::PartsModel {
public:
CapTargetParts(al::LiveActor*, const al::ActorInitInfo&);
CapTargetParts(al::LiveActor* actor, const al::ActorInitInfo& initInfo);
void startHack();
void startNormal();
void startSwoon();

View File

@ -0,0 +1,10 @@
#pragma once
#include "al/Library/LiveActor/LiveActor.h"
class WorldMapEarth : al::LiveActor {
public:
WorldMapEarth(const char* name);
void init(const al::ActorInitInfo& initInfo) override;
void control() override;
};

View File

@ -6,6 +6,7 @@
class IUsePlayerCollision;
class PlayerInfo;
class PlayerInitInfo;
class PlayerHackKeeper;
class PlayerActorBase : public al::LiveActor, public al::IUsePlayerHack {
public:

View File

@ -1,5 +1,8 @@
#pragma once
#include <gfx/seadColor.h>
#include <math/seadQuat.h>
namespace al {
class LiveActor;
}
@ -8,14 +11,17 @@ struct PlayerHackStartShaderParam {};
class PlayerHackStartShaderCtrl {
public:
PlayerHackStartShaderCtrl(al::LiveActor*, PlayerHackStartShaderParam*);
void setHost(al::LiveActor*);
PlayerHackStartShaderCtrl(al::LiveActor* host, PlayerHackStartShaderParam* param);
void setHost(al::LiveActor* host);
void start();
void update();
void end();
private:
al::LiveActor* mParent;
// TODO: fill this class out
char unknown[0x30];
s32 mTime;
bool mActive;
sead::Color4f mColor;
sead::Quatf mQuat;
PlayerHackStartShaderParam* mParam;
};

View File

@ -20,6 +20,10 @@ public:
void init(s32 argc, char** argv);
void run();
RootTask* getRootTask() const;
al::SystemKit* getSystemKit() const { return mSystemKit; }
al::GameFrameworkNx* getGameFramework() const { return mGameFramework; }
al::AccountHolder* getAccountHolder() const { return mAccountHolder; }
al::GameDrawInfo* getGameDrawInfo() const { return mDrawInfo; }
private:
al::SystemKit* mSystemKit;

View File

@ -1,11 +1,18 @@
#pragma once
#include "al/Library/Nerve/NerveExecutor.h"
#include "al/Library/Nerve/NerveSetupUtil.h"
#include "al/Library/System/GameSystemInfo.h"
namespace al {
class Sequence;
struct GameSystemInfo;
class AudioSystem;
class AudioInfoListWithParts;
class AccountHolder;
class NetworkSystem;
class HtmlViewer;
class GamePadSystem;
class ApplicationMessageReceiver;
}
class GameConfigData;
@ -23,7 +30,18 @@ public:
private:
al::Sequence* mSequence;
al::GameSystemInfo mSystemInfo;
GameConfigData* mConfig;
bool field_70;
al::GameSystemInfo* mSystemInfo;
al::AudioSystem * mAudioSystem;
al::AudioInfoListWithParts* mAudioInfoList;
al::AccountHolder* mAccountHolder;
al::NetworkSystem* mNetworkSystem;
void* field_40;
al::HtmlViewer* mHtmlViewer;
ProjectNfpDirector* mNfpDirector;
al::GamePadSystem* mGamePadSystem;
al::ApplicationMessageReceiver* mApplicationMessageReceiver;
al::WaveVibrationHolder* mWaveVibrationHolder;
bool mIsSinglePlay;
GameConfigData *mGameConfigData;
bool mIsSequenceSetupIncomplete;
};

View File

@ -1,6 +1,7 @@
#pragma once
#include <gfx/seadDrawContext.h>
#include <hostio/seadHostIONode.h>
class GameSystem;
@ -8,15 +9,16 @@ class GameSystem;
class RootTask {
public:
RootTask();
~RootTask();
void enter();
void draw();
void calc();
void prepare();
private:
// TODO: Remove once RootTask implements sead::Task
char taskImplDetails[0x200];
GameSystem* mGameSystem;
void* field_208;
sead::DrawContext* drawContext;
sead::hostio::Node* mHostIoNode;
sead::DrawContext* mDrawContext;
};

View File

@ -0,0 +1,18 @@
#include "al/Library/LiveActor/ActorClippingFunction.h"
#include "al/Library/LiveActor/LiveActor.h"
namespace al {
bool isClipped(const LiveActor* actor) {
return actor->getFlags()->isClipped;
}
bool isInvalidClipping(const LiveActor* actor) {
return actor->getFlags()->isClippingInvalid;
}
} // namespace al
namespace alActorFunction {
bool isDrawClipping(const al::LiveActor* actor) {
return actor->getFlags()->isDrawClipped;
}
} // namespace alActorFunction

View File

@ -11,10 +11,10 @@ bool isDead(const LiveActor* actor) {
bool isNoCollide(const LiveActor* actor) {
return actor->getFlags()->isCollideOff;
}
void onCalcAnim(al::LiveActor* actor) {
void onCalcAnim(LiveActor* actor) {
actor->getFlags()->isCalcAnim = true;
}
void offCalcAnim(al::LiveActor* actor) {
void offCalcAnim(LiveActor* actor) {
actor->getFlags()->isCalcAnim = false;
}
void validateShadow(LiveActor* actor) {}
@ -22,17 +22,37 @@ void invalidateShadow(LiveActor* actor) {}
void onCollide(LiveActor* actor) {
actor->getFlags()->isCollideOff = false;
}
void offCollide(al::LiveActor* actor) {
void offCollide(LiveActor* actor) {
actor->getFlags()->isCollideOff = true;
}
void validateMaterialCode(LiveActor* actor) {}
void invalidateMaterialCode(LiveActor* actor) {}
void validatePuddleMaterial(LiveActor* actor) {}
void invalidatePuddleMaterial(LiveActor* actor) {}
bool isAreaTarget(const LiveActor* actor) {}
void onAreaTarget(LiveActor* actor) {}
void offAreaTarget(LiveActor* actor) {}
void isUpdateMovementEffectAudioCollisionSensor(const LiveActor* actor) {}
void onUpdateMovementEffectAudioCollisionSensor(LiveActor* actor) {}
void offUpdateMovementEffectAudioCollisionSensor(LiveActor* actor) {}
void validateMaterialCode(LiveActor* actor) {
actor->getFlags()->isMaterialCodeValid = true;
}
void invalidateMaterialCode(LiveActor* actor) {
actor->getFlags()->isMaterialCodeValid = false;
}
void validatePuddleMaterial(LiveActor* actor) {
actor->getFlags()->isPuddleMaterialValid = true;
}
void invalidatePuddleMaterial(LiveActor* actor) {
actor->getFlags()->isPuddleMaterialValid = false;
}
bool isAreaTarget(const LiveActor* actor) {
return actor->getFlags()->isAreaTargetOn;
}
void onAreaTarget(LiveActor* actor) {
actor->getFlags()->isAreaTargetOn = true;
}
void offAreaTarget(LiveActor* actor) {
actor->getFlags()->isAreaTargetOn = true;
}
bool isUpdateMovementEffectAudioCollisionSensor(const LiveActor* actor) {
return actor->getFlags()->isUpdateOn;
}
void onUpdateMovementEffectAudioCollisionSensor(LiveActor* actor) {
actor->getFlags()->isUpdateOn = true;
}
void offUpdateMovementEffectAudioCollisionSensor(LiveActor* actor) {
actor->getFlags()->isUpdateOn = false;
}
} // namespace al

View File

@ -12,30 +12,30 @@
namespace al {
float calcDistance(const al::LiveActor* l1, const al::LiveActor* l2) {
float calcDistance(const LiveActor* l1, const LiveActor* l2) {
return calcDistance(l1, getTrans(l2));
}
float calcDistance(const al::LiveActor* l1, const sead::Vector3f& vec) {
sead::Vector3f distance = al::getTrans(l1) - vec;
float calcDistance(const LiveActor* l1, const sead::Vector3f& vec) {
sead::Vector3f distance = getTrans(l1) - vec;
return distance.length();
}
float calcSpeed(const al::LiveActor* actor) {
float calcSpeed(const LiveActor* actor) {
return actor->getPoseKeeper()->getVelocity().length();
}
float calcSpeedH(const al::LiveActor* actor) {
float calcSpeedH(const LiveActor* actor) {
sead::Vector3f verticalized;
al::verticalizeVec(&verticalized, al::getGravity(actor), actor->getPoseKeeper()->getVelocity());
verticalizeVec(&verticalized, getGravity(actor), actor->getPoseKeeper()->getVelocity());
return verticalized.length();
}
float calcSpeedV(const al::LiveActor* actor) {
return -actor->getPoseKeeper()->getVelocity().dot(al::getGravity(actor));
float calcSpeedV(const LiveActor* actor) {
return -actor->getPoseKeeper()->getVelocity().dot(getGravity(actor));
}
void resetPosition(al::LiveActor* actor) {
void resetPosition(LiveActor* actor) {
if (actor->getPoseKeeper())
actor->calcAnim();
if (actor->getHitSensorKeeper()) {
@ -48,7 +48,7 @@ void resetPosition(al::LiveActor* actor) {
if (actor->getCollider())
actor->getCollider()->onInvalidate();
if (actor->getCollisionParts())
al::resetAllCollisionMtx(actor);
resetAllCollisionMtx(actor);
if (!actor->getAudioKeeper())
return;
if (!actor->getAudioKeeper()->getSeKeeper())
@ -56,41 +56,41 @@ void resetPosition(al::LiveActor* actor) {
actor->getAudioKeeper()->getSeKeeper()->resetPosition();
}
void resetPosition(al::LiveActor* actor, const sead::Vector3f& trans) {
al::updatePoseTrans(actor, trans);
al::resetPosition(actor);
void resetPosition(LiveActor* actor, const sead::Vector3f& trans) {
updatePoseTrans(actor, trans);
resetPosition(actor);
}
void resetRotatePosition(al::LiveActor* actor, const sead::Vector3f& rot,
void resetRotatePosition(LiveActor* actor, const sead::Vector3f& rot,
const sead::Vector3f& trans) {
al::updatePoseRotate(actor, rot);
al::updatePoseTrans(actor, trans);
al::resetPosition(actor);
updatePoseRotate(actor, rot);
updatePoseTrans(actor, trans);
resetPosition(actor);
}
void resetQuatPosition(al::LiveActor* actor, const sead::Quatf& quat, const sead::Vector3f& trans) {
al::updatePoseQuat(actor, quat);
al::updatePoseTrans(actor, trans);
al::resetPosition(actor);
void resetQuatPosition(LiveActor* actor, const sead::Quatf& quat, const sead::Vector3f& trans) {
updatePoseQuat(actor, quat);
updatePoseTrans(actor, trans);
resetPosition(actor);
}
void resetMtxPosition(al::LiveActor* actor, const sead::Matrix34f& mtx) {
al::updatePoseMtx(actor, &mtx);
al::resetPosition(actor);
void resetMtxPosition(LiveActor* actor, const sead::Matrix34f& mtx) {
updatePoseMtx(actor, &mtx);
resetPosition(actor);
}
void resetActorPosition(al::LiveActor* actor, const al::LiveActor* target) {
al::updatePoseMtx(actor, target->getBaseMtx());
al::resetPosition(actor);
void resetActorPosition(LiveActor* actor, const LiveActor* target) {
updatePoseMtx(actor, target->getBaseMtx());
resetPosition(actor);
}
// trySetPosOnGround
const sead::Vector3f& getVelocity(const al::LiveActor* actor) {
const sead::Vector3f& getVelocity(const LiveActor* actor) {
return actor->getPoseKeeper()->getVelocity();
}
sead::Vector3f* getVelocityPtr(al::LiveActor* actor) {
sead::Vector3f* getVelocityPtr(LiveActor* actor) {
return actor->getPoseKeeper()->getVelocityPtr();
}

View File

@ -1,4 +1,5 @@
target_sources(odyssey PRIVATE
ActorClippingFunction.cpp
ActorFactory.cpp
ActorFlagFunction.cpp
ActorInitInfo.cpp

View File

@ -1,5 +1,7 @@
target_sources(odyssey PRIVATE
Graph.cpp
Rail.cpp
RailKeeper.cpp
RailPart.cpp
RailRider.cpp
)

View File

@ -0,0 +1,14 @@
#include "al/Library/Rail/Rail.h"
#include "al/Library/Rail/RailKeeper.h"
#include "al/Library/Rail/RailRider.h"
namespace al {
RailKeeper::RailKeeper(const PlacementInfo& info) {
auto* rail = new Rail();
rail->init(info);
mRailRider = new RailRider(rail);
}
RailRider* RailKeeper::getRailRider() const {
return mRailRider;
}
} // namespace al

View File

@ -0,0 +1,9 @@
#include "al/Library/Rail/RailRider.h"
#include "al/Library/Rail/Rail.h"
namespace al {
RailRider::RailRider(const Rail* rail) : mRail(rail), mCoord(rail->normalizeLength(0)) {
rail->calcPosDir(&mPosition, &mDirection, mCoord);
}
} // namespace al

View File

@ -3,5 +3,6 @@ target_sources(odyssey PRIVATE
AnagramAlphabetCharacter.cpp
CapTargetParts.cpp
FireDrum2D.cpp
WorldMapEarth.cpp
WorldMapParts.cpp
)

View File

@ -3,6 +3,11 @@
#include "al/Library/LiveActor/ActorActionFunction.h"
#include "al/Library/LiveActor/ActorModelFunction.h"
CapTargetParts::CapTargetParts(al::LiveActor* actor, const al::ActorInitInfo& initInfo)
: al::PartsModel("帽子の的パーツ") {
initPartsFixFileNoRegister(actor, initInfo, "CapTarget", "Parts", nullptr);
}
void CapTargetParts::startHack() {
al::startAction(this, "Normal");
}

View File

@ -0,0 +1,16 @@
#include "game/MapObj/WorldMapEarth.h"
#include "al/Library/LiveActor/ActorInitInfo.h"
#include "al/Library/LiveActor/ActorPoseKeeper.h"
#include "al/Library/Math/MathUtil.h"
WorldMapEarth::WorldMapEarth(const char* name) : al::LiveActor(name) {}
void WorldMapEarth::init(const al::ActorInitInfo& initInfo) {
al::initMapPartsActor(this, initInfo, nullptr);
makeActorAlive();
}
void WorldMapEarth::control() {
al::setRotateY(this, al::modf(al::getRotate(this).y + 0.05f + 360.0f, 360.0f) + 0.0f);
}

View File

@ -4,4 +4,6 @@ target_sources(odyssey PRIVATE
GameDataHolderAccessor.cpp
GameSystem.cpp
Init.cpp
ProjectInterface.cpp
RootTask.cpp
)

View File

@ -1,5 +1,7 @@
#include "game/System/GameSystem.h"
#include "al/Library/Nerve/NerveSetupUtil.h"
namespace {
NERVE_IMPL(GameSystem, Play);

View File

@ -0,0 +1,6 @@
#include "al/Library/System/SystemKit.h"
#include "game/System/Application.h"
al::SystemKit* alProjectInterface::getSystemKit() {
return Application::instance()->getSystemKit();
}

View File

@ -0,0 +1,15 @@
#include "game/System/RootTask.h"
#include <heap/seadHeapMgr.h>
#include "al/Library/Memory/HeapUtil.h"
#include "game/System/GameSystem.h"
void RootTask::enter() {}
void RootTask::calc() {
if (!mGameSystem) {
sead::ScopedCurrentHeapSetter heapSetter(al::getStationedHeap());
mGameSystem = new GameSystem();
mGameSystem->init();
}
mGameSystem->movement();
}