#pragma once #include "common.h" #include "LAttachable.h" enum { kTool0_Null = 0, kTool1_Tenant, kTool2_Mover, kTool3_OutObj, kTool4_Finger, kTool5_Hand }; enum { kAnotherToolVar0 = 0, kAnotherToolVar1, kAnotherToolVar2, kAnotherToolVar3 }; enum { kScroll1 = 1, kScroll2, kScroll3, kScrollOptionMask = 0xFF, kScrollOpt2 = 0x100, kScrollOpt2Mask = 0xFF00, kScrollOpt3 = 0x10000, kScrollOpt3Mask = 0xFF0000, }; class T2TowerMainView : public CView, public LAttachable { DECLARE_MESSAGE_MAP() DECLARE_DYNCREATE(T2TowerMainView) public: T2TowerMainView(); virtual ~T2TowerMainView(); virtual void AssertValid() const; virtual void Dump(CDumpContext &dc) const; virtual BOOL PreTranslateMessage(MSG *pMsg); virtual void OnInitialUpdate() {} virtual void tmv_vf110(); virtual void DrawDebugGrid(); virtual void CopySimulationImage(const RECT &inRect); void x42B484(CDC *pDC, const RECT &inRect); virtual void tmv_vf11C(); virtual void tmv_vf120(); // DrawSimulation? virtual void Invalidate(BOOL inFlag); virtual void InvalUnitRect(const RECT &inRect, BOOL inFlag = false); virtual T2TowerDoc *GetTowerDoc(); virtual void SetScrollV(int inV); virtual void SetScrollH(int inH); virtual void tmv_vf138(const POINT &inPt, unsigned int inCode); virtual void tmv_vf13C(int inX, int inY, unsigned int inCode); virtual void GetVisibleUnitRect(RECT &outRect) const; void HandToolClick(CPoint inPt); void HandToolDrag(CPoint inPt); void HandToolRelease(CPoint inPt); virtual void tmv_vf144(); virtual void DoZoomIn(POINT inPt); virtual void DoZoomOut(); virtual void UnhideToolSprite(); virtual void HideToolSprite(); virtual void CenterOnRectAndZoom(const RECT &inRect); virtual void CenterOnRect(const RECT *inRect); virtual BOOL tmv_vf160(POINT &outPt); T2TowerDoc *mDocument; // Represents the full world area in unit coordinates RECT mWorldBounds; // A buffer storing the entire tower T2BitImage *mImage; // Where the view is currently scrolled to POINT mScrollOffset; RECT m6C; POINT m7C; // An extra offset that will centre the image within the viewport, if the // viewport is larger than the world area POINT mImageOrigin; // The unit coordinates that are currently visible RECT mVisibleArea; RECT mUpdateRect1; RECT mUpdateRect2; RECT mSpriteUpdateRect; // The last point handled when clicking or dragging with the Hand tool CPoint mHandToolLastPos; // Which mouse buttons we consider to be held down UINT mPressedButtons; // Tracks how many times the tool-specific sprite has been hidden int mHideToolSpriteCount; BOOL mDC; POINT _E0; int mAnotherToolVar; int _EC; int mDebugMode; int mActiveTool; BOOL mIsDebugGrid; T2ToolDef *mActiveToolDef; int mToolSpriteIndex; CString mToolSpriteName; POINT _108; BOOL mSkipOffscreenDraw; unsigned int mDbgEquipID; T2Equip *mDbgEquip; POINT mNextScrollOffset; // Where the player initially clicked, in window coordinates CPoint mInitialClickPos; protected: virtual BOOL PreCreateWindow(CREATESTRUCT &cs); virtual void OnDraw(CDC *pDC); virtual void OnUpdate(CView *pSender, LPARAM lHint, CObject *pHint); virtual void OnActivateView(BOOL bActivate, CView *pActivateView, CView *pDeactiveView); BOOL CreateToolSprite(BOOL inSkipShowing = false); BOOL DeleteToolSprite(); afx_msg int OnCreate(LPCREATESTRUCT lpcs); afx_msg void OnDestroy(); void AdjustWorldBounds(); void ClearUpdateRect(); void x42AC1B(); afx_msg void OnSize(UINT nType, int cx, int cy); afx_msg void OnDebugNormalDisplay(); afx_msg void OnUpdateDebugNormalDisplay(CCmdUI *pCmdUI); afx_msg void OnDebugBkgndInfo(); afx_msg void OnUpdateDebugBkgndInfo(CCmdUI *pCmdUI); afx_msg void OnDebugFloorInfoTenant(); afx_msg void OnUpdateDebugFloorInfoTenant(CCmdUI *pCmdUI); afx_msg void OnDebugFloorInfoMover(); afx_msg void OnUpdateDebugFloorInfoMover(CCmdUI *pCmdUI); afx_msg void OnDebugFloorInfoRequest(); afx_msg void OnUpdateDebugFloorInfoRequest(CCmdUI *pCmdUI); void DrawDebugBkgndInfo(CDC *pDC); void DrawDebugFloorInfoTenant(CDC *pDC, const RECT &inRect); void DrawDebugFloorInfoMover(CDC *pDC, const RECT &inRect); void DrawDebugFloorInfoRequest(CDC *pDC, const RECT &inRect); void DrawDebugEquip(CDC *pDC, const RECT &inRect); void x42CA08(const POINT &inPt); afx_msg void OnCommand10000to10010(UINT nCmd); afx_msg void OnLButtonDown(UINT nFlags, CPoint point); void HandleLButtonDown(CPoint inPt); afx_msg void OnMouseMove(UINT nFlags, CPoint point); afx_msg void OnLButtonUp(UINT nFlags, CPoint point); void HandleLButtonUp(CPoint inPt); afx_msg void OnUpdateDebugGrid(CCmdUI *pCmdUI); afx_msg void OnDebugGrid(); void x42E366(int inType); afx_msg void OnRButtonDown(UINT nFlags, CPoint point); void HandleRButtonDown(CPoint inPt); afx_msg void OnRButtonUp(UINT nFlags, CPoint point); void HandleRButtonUp(CPoint inPt); afx_msg void OnUpdateDebugDisplaySpeedMeasuring(CCmdUI *pCmdUI); afx_msg void OnDebugDisplaySpeedMeasuring(); afx_msg void OnUpdateDebugOffscreenSpeedMeasuring(CCmdUI *pCmdUI); afx_msg void OnDebugOffscreenSpeedMeasuring(); afx_msg void OnTimer(UINT nIDEvent); };