#pragma once #include "common.h" #include "LArray.h" #include "T2EventItem.h" class AFX_CLASS_EXPORT T2OutDecoration : public T2EventItem { public: T2OutDecoration(T2TowerEvent* inTowerEvent, CResFile* inResFile, int inSubID); virtual ~T2OutDecoration(); virtual DWORD GetID() { return 'OdEv'; } virtual BOOL IsBeginTime(unsigned int inTime) { return true; } virtual int Exec(T2TowerDoc* inDoc); virtual void ViewModeChanged(T2TowerDoc* inDoc, VIEWMODE inViewMode); void DoDecoration(T2TowerDoc* inDoc, VIEWMODE inViewMode, int inFrame); void CheckRoofTop(T2Equip* inEquip); private: LArray* MakeLoofList(); LArray mArray; int mCurrentViewMode; int mCurrentFrame; }; class T2OutDeco { public: T2OutDeco(T2OutDecoration *inOwner, int inResID, unsigned int inFrameCount); ~T2OutDeco(); void Load(int inID); void Unload(); private: friend class T2OutDecoration; T2OutDecoration *mOwner; int mSpriteID; BOOL mLoaded; int mResID; int mFrameCount; CRect mRect; int mCurrent; BOOL mVisible; T2BitImage *mImage; T2ImageObj *mImageObj; }; struct T2RoofInfo { CRect rect; BOOL flag; T2RoofInfo(int inLeft, int inTop, int inRight, int inBottom, BOOL inFlag); };