mirror of
https://github.com/doldecomp/sms.git
synced 2026-11-09 17:11:05 -10:00
139 lines
3.5 KiB
C++
139 lines
3.5 KiB
C++
#ifndef MAP_MAP_EVENT_SINK_HPP
|
|
#define MAP_MAP_EVENT_SINK_HPP
|
|
|
|
#include <Map/MapEvent.hpp>
|
|
|
|
class TMapCollisionWarp;
|
|
class TMapCollisionMove;
|
|
class TMapObjBase;
|
|
class TPollutionObj;
|
|
class TGateKeeperBase;
|
|
namespace JDrama {
|
|
class TPlacement;
|
|
}
|
|
|
|
class TMapEventSink : public TMapEvent {
|
|
public:
|
|
TMapEventSink(const char*);
|
|
|
|
virtual void load(JSUMemoryInputStream& stream);
|
|
virtual bool isFinishedAll() const;
|
|
virtual bool watch() { return false; }
|
|
virtual void startControl();
|
|
virtual bool control();
|
|
virtual void finishControl();
|
|
virtual TJointObj* getBuilding(int) const;
|
|
virtual void initBuilding(int, JSUMemoryInputStream&);
|
|
virtual void initWithBuildingNum(JSUMemoryInputStream&);
|
|
virtual void rising();
|
|
virtual f32 getSinkOffsetY() const;
|
|
virtual void makeBuildingRecovered(int);
|
|
|
|
bool isBuried(int) const;
|
|
TPollutionObj* getPollutionObj(int);
|
|
|
|
static u32 mCleanedDegree;
|
|
|
|
int getRaisingBuildingIdx() { return mRaisingBuildingIdx; }
|
|
|
|
public:
|
|
/* 0x20 */ int mBuildingNum;
|
|
/* 0x24 */ int mFirstBuildingIdx;
|
|
/* 0x28 */ int mRaisingBuildingIdx;
|
|
/* 0x2C */ TJointObj* mRaisingBuilding;
|
|
/* 0x30 */ J3DJoint* mRaisingJoint;
|
|
/* 0x34 */ f32 mInitialY;
|
|
/* 0x38 */ f32 mSinkDepthOverride;
|
|
/* 0x3C */ f32 mRiseSpeed;
|
|
/* 0x40 */ int mDemoDuration;
|
|
/* 0x44 */ int mRiseStartDelay;
|
|
/* 0x48 */ int mRiseEndDelay;
|
|
/* 0x4C */ int mDemoTimer;
|
|
/* 0x50 */ JGeometry::TVec3<f32>* mBuildingEventPositions;
|
|
/* 0x54 */ bool* mIsBuildingRecovered;
|
|
/* 0x58 */ TMapCollisionWarp** mRaisedBuildingCollisions;
|
|
/* 0x5C */ TMapCollisionMove** mRisingBuildingCollisions;
|
|
struct PollutionRef {
|
|
u16 mLayerIndex;
|
|
u16 mObjIndex;
|
|
};
|
|
/* 0x60 */ PollutionRef* mBuildingPollutionRefs;
|
|
};
|
|
|
|
class TMapEventSinkInPollution : public TMapEventSink {
|
|
public:
|
|
TMapEventSinkInPollution(const char* name = "建物沈む(落書き)")
|
|
: TMapEventSink(name)
|
|
{
|
|
}
|
|
|
|
virtual void loadAfter();
|
|
virtual bool watch();
|
|
|
|
void initBuriedBuilding();
|
|
};
|
|
|
|
class TMapEventSinkInPollutionReset : public TMapEventSinkInPollution {
|
|
public:
|
|
TMapEventSinkInPollutionReset(const char* name
|
|
= "建物沈む(落書き再セット)")
|
|
: TMapEventSinkInPollution(name)
|
|
{
|
|
}
|
|
|
|
virtual void loadAfter();
|
|
|
|
TPollutionObj* getResetPollutionObj(int);
|
|
void makeBuildingRecovered(int);
|
|
};
|
|
|
|
class TMapEventSinkBianco : public TMapEventSinkInPollutionReset {
|
|
public:
|
|
TMapEventSinkBianco(const char* name = "イベント(建物沈むビアンコ)")
|
|
: TMapEventSinkInPollutionReset(name)
|
|
, mRisingTerrainInMirrorJoint(nullptr)
|
|
, mGateKeeper(nullptr)
|
|
, mShineAppearDemoTime(0)
|
|
{
|
|
}
|
|
|
|
virtual void load(JSUMemoryInputStream& stream);
|
|
virtual void loadAfter();
|
|
virtual bool watch();
|
|
virtual void startControl();
|
|
virtual bool control();
|
|
virtual void finishControl();
|
|
virtual void rising();
|
|
|
|
public:
|
|
/* 0x64 */ J3DJoint* mRisingTerrainInMirrorJoint;
|
|
/* 0x68 */ TGateKeeperBase* mGateKeeper;
|
|
/* 0x6C */ JGeometry::TVec3<f32> mMarioWarpPosition;
|
|
/* 0x78 */ f32 mMarioWarpAngle;
|
|
/* 0x7C */ int mShineAppearDemoTime;
|
|
};
|
|
|
|
class TMapEventSinkShadowMario : public TMapEventSink {
|
|
public:
|
|
TMapEventSinkShadowMario(const char* name = "建物沈む(影マリオ)")
|
|
: TMapEventSink(name)
|
|
, mBuildingPlacements(nullptr)
|
|
, mBuildingPlacementNames(nullptr)
|
|
{
|
|
}
|
|
|
|
virtual void loadAfter();
|
|
|
|
virtual void initBuilding(int, JSUMemoryInputStream&);
|
|
virtual void initWithBuildingNum(JSUMemoryInputStream&);
|
|
virtual void rising();
|
|
|
|
void raiseBuilding(int);
|
|
|
|
public:
|
|
/* 0x64 */ JDrama::TPlacement** mBuildingPlacements;
|
|
/* 0x68 */ const char** mBuildingPlacementNames;
|
|
};
|
|
|
|
#endif
|