rlm@1: #if !defined(AFX_MAPVIEW_H__20F40C77_8E10_44B7_BB49_7865F73C3E75__INCLUDED_) rlm@1: #define AFX_MAPVIEW_H__20F40C77_8E10_44B7_BB49_7865F73C3E75__INCLUDED_ rlm@1: rlm@1: #if _MSC_VER > 1000 rlm@1: #pragma once rlm@1: #endif // _MSC_VER > 1000 rlm@1: // -*- C++ -*- rlm@1: // MapView.h : header file rlm@1: // rlm@1: rlm@1: #include "BitmapControl.h" rlm@1: #include "ColorControl.h" rlm@1: #include "ZoomControl.h" rlm@1: #include "ResizeDlg.h" rlm@1: #include "IUpdate.h" rlm@1: rlm@1: ///////////////////////////////////////////////////////////////////////////// rlm@1: // MapView dialog rlm@1: rlm@1: class MapView : public ResizeDlg, IUpdateListener rlm@1: { rlm@1: private: rlm@1: BITMAPINFO bmpInfo; rlm@1: u8 * data; rlm@1: int frame; rlm@1: u16 control; rlm@1: int bg; rlm@1: int w; rlm@1: int h; rlm@1: BitmapControl mapView; rlm@1: ZoomControl mapViewZoom; rlm@1: ColorControl color; rlm@1: bool autoUpdate; rlm@1: rlm@1: // Construction rlm@1: public: rlm@1: void savePNG(const char *name); rlm@1: void saveBMP(const char *name); rlm@1: afx_msg LRESULT OnColInfo(WPARAM wParam, LPARAM lParam); rlm@1: afx_msg LRESULT OnMapInfo(WPARAM wParam, LPARAM lParam); rlm@1: u32 GetClickAddress(int x, int y); rlm@1: u32 GetTextClickAddress(u32 base, int x, int y); rlm@1: void update(); rlm@1: void enableButtons(int mode); rlm@1: void paint(); rlm@1: void renderMode5(); rlm@1: void renderMode4(); rlm@1: void renderMode3(); rlm@1: void renderMode2(); rlm@1: void renderMode1(); rlm@1: void renderMode0(); rlm@1: void renderRotScreen(u16 control); rlm@1: void renderTextScreen(u16 control); rlm@1: MapView(CWnd*pParent = NULL); // standard constructor rlm@1: ~MapView(); rlm@1: rlm@1: // Dialog Data rlm@1: //{{AFX_DATA(MapView) rlm@1: enum { IDD = IDD_MAP_VIEW }; rlm@1: CStatic m_numcolors; rlm@1: CStatic m_mode; rlm@1: CStatic m_overflow; rlm@1: CStatic m_mosaic; rlm@1: CStatic m_priority; rlm@1: CStatic m_dim; rlm@1: CStatic m_charbase; rlm@1: CStatic m_mapbase; rlm@1: //}}AFX_DATA rlm@1: rlm@1: // Overrides rlm@1: // ClassWizard generated virtual function overrides rlm@1: //{{AFX_VIRTUAL(MapView) rlm@1: protected: rlm@1: virtual void DoDataExchange(CDataExchange*pDX); // DDX/DDV support rlm@1: virtual void PostNcDestroy(); rlm@1: //}}AFX_VIRTUAL rlm@1: rlm@1: // Implementation rlm@1: protected: rlm@1: // Generated message map functions rlm@1: //{{AFX_MSG(MapView) rlm@1: afx_msg void OnRefresh(); rlm@1: virtual BOOL OnInitDialog(); rlm@1: afx_msg void OnFrame0(); rlm@1: afx_msg void OnFrame1(); rlm@1: afx_msg void OnBg0(); rlm@1: afx_msg void OnBg1(); rlm@1: afx_msg void OnBg2(); rlm@1: afx_msg void OnBg3(); rlm@1: afx_msg void OnStretch(); rlm@1: afx_msg void OnAutoUpdate(); rlm@1: afx_msg void OnClose(); rlm@1: afx_msg void OnSave(); rlm@1: //}}AFX_MSG rlm@1: DECLARE_MESSAGE_MAP() rlm@1: }; rlm@1: rlm@1: //{{AFX_INSERT_LOCATION}} rlm@1: // Microsoft Visual C++ will insert additional declarations immediately before the previous line. rlm@1: rlm@1: #endif // !defined(AFX_MAPVIEW_H__20F40C77_8E10_44B7_BB49_7865F73C3E75__INCLUDED_)