#pragma once #include "common.h" #include "T2EventItem.h" #include "T2Transport.h" class T2MetroRailway : public T2EventItem, public T2Transport { public: T2MetroRailway(T2TowerEvent* inTowerEvent, CResFile* inResFile, int inSubID); T2MetroRailway(T2TowerEvent* inTowerEvent, int inSubID, int inLevelBit, BOOL inExclusive, int inCycleDay, int inBeginTime, int inEndTime); virtual ~T2MetroRailway(); virtual DWORD GetID() { return 'MREv'; } virtual int Start(T2TowerDoc* inDoc); virtual int Exec(T2TowerDoc *inDoc); virtual void StopEvent(T2TowerDoc* inDoc); virtual BOOL IsBeginTime(unsigned int inTime); virtual void Write(T2Archive& inArchive); virtual void Read(T2Archive& inArchive); virtual void DoSetStatus(int inStatus) { SetStatus(inStatus); } virtual T2TowerDoc *DoGetTowerDoc() const { return GetTowerDoc(); } virtual int DoGetBeginTime() { return GetBeginTime(); } virtual T2WorldDef *DoGetWorldDef() { return GetWorldDef(); } void Init(T2Transport* inParent, CResFile* inResFile); BOOL CreateSpriteObj(T2TowerDoc *inDoc); void Show(); void Hide(); protected: int m74; int mCurrentSprite; int mTrainSpriteIndices[4]; T2BitImage *mImage; T2ImageObj *mImageObj; BOOL mVisible; };