From c0c336500955a23e344651e5412c9d9d441ef4ee Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Wed, 28 Jun 2023 22:22:32 +0100 Subject: first pass of T2DLL --- src/T2DLL/T2OutDecoration.h | 52 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 42 insertions(+), 10 deletions(-) (limited to 'src/T2DLL/T2OutDecoration.h') diff --git a/src/T2DLL/T2OutDecoration.h b/src/T2DLL/T2OutDecoration.h index c865bab..9dcc8a3 100644 --- a/src/T2DLL/T2OutDecoration.h +++ b/src/T2DLL/T2OutDecoration.h @@ -1,20 +1,52 @@ #pragma once #include "common.h" +#include "LArray.h" +#include "T2EventItem.h" -class T2OutDecoration { +class AFX_EXT_CLASS T2OutDecoration : public T2EventItem { public: - T2OutDecoration(T2TowerEvent*, CResFile*, int); + T2OutDecoration(T2TowerEvent* inTowerEvent, CResFile* inResFile, int inSubID); virtual ~T2OutDecoration(); - virtual int Exec(T2TowerDoc*); - void DoDecoration(T2TowerDoc*, VIEWMODE, int); - virtual void ViewModeChanged(T2TowerDoc*, VIEWMODE); - void CheckRoofTop(T2Equip*); + 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: - virtual unsigned long GetID() {} - virtual int IsBeginTime(unsigned int) {} - T2OutDecoration(const T2OutDecoration&) {} - T2OutDecoration& operator=(const T2OutDecoration&) {} + 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); }; -- cgit v1.2.3