diff src/win32/GBMapView.h @ 1:f9f4f1b99eed

importing src directory
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Mar 2012 10:31:27 -0600
parents
children
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/win32/GBMapView.h	Sat Mar 03 10:31:27 2012 -0600
     1.3 @@ -0,0 +1,81 @@
     1.4 +#if !defined(AFX_GBMAPVIEW_H__4CD23D38_F2CD_4B95_AE76_2781591DD077__INCLUDED_)
     1.5 +#define AFX_GBMAPVIEW_H__4CD23D38_F2CD_4B95_AE76_2781591DD077__INCLUDED_
     1.6 +
     1.7 +#if _MSC_VER > 1000
     1.8 +#pragma once
     1.9 +#endif // _MSC_VER > 1000
    1.10 +// -*- C++ -*-
    1.11 +// GBMapView.h : header file
    1.12 +//
    1.13 +
    1.14 +#include "BitmapControl.h"
    1.15 +#include "ColorControl.h"
    1.16 +#include "ZoomControl.h"
    1.17 +#include "ResizeDlg.h"
    1.18 +#include "IUpdate.h"
    1.19 +
    1.20 +/////////////////////////////////////////////////////////////////////////////
    1.21 +// GBMapView dialog
    1.22 +
    1.23 +class GBMapView : public ResizeDlg, IUpdateListener
    1.24 +{
    1.25 +private:
    1.26 +	BITMAPINFO    bmpInfo;
    1.27 +	u8 *          data;
    1.28 +	int           bank;
    1.29 +	int           bg;
    1.30 +	int           w;
    1.31 +	int           h;
    1.32 +	BitmapControl mapView;
    1.33 +	ZoomControl   mapViewZoom;
    1.34 +	ColorControl  color;
    1.35 +	bool          autoUpdate;
    1.36 +	// Construction
    1.37 +public:
    1.38 +	afx_msg LRESULT OnColInfo(WPARAM wParam, LPARAM lParam);
    1.39 +	afx_msg LRESULT OnMapInfo(WPARAM wParam, LPARAM lParam);
    1.40 +	u32 GetClickAddress(int x, int y);
    1.41 +	void update();
    1.42 +	void paint();
    1.43 +	void render();
    1.44 +	void savePNG(const char *name);
    1.45 +	void saveBMP(const char *name);
    1.46 +	~GBMapView();
    1.47 +	GBMapView(CWnd*pParent = NULL);  // standard constructor
    1.48 +
    1.49 +	// Dialog Data
    1.50 +	//{{AFX_DATA(GBMapView)
    1.51 +	enum { IDD = IDD_GB_MAP_VIEW };
    1.52 +	// NOTE: the ClassWizard will add data members here
    1.53 +	//}}AFX_DATA
    1.54 +
    1.55 +	// Overrides
    1.56 +	// ClassWizard generated virtual function overrides
    1.57 +	//{{AFX_VIRTUAL(GBMapView)
    1.58 +protected:
    1.59 +	virtual void DoDataExchange(CDataExchange*pDX);   // DDX/DDV support
    1.60 +	virtual void PostNcDestroy();
    1.61 +	//}}AFX_VIRTUAL
    1.62 +
    1.63 +	// Implementation
    1.64 +protected:
    1.65 +	// Generated message map functions
    1.66 +	//{{AFX_MSG(GBMapView)
    1.67 +	afx_msg void OnSave();
    1.68 +	afx_msg void OnRefresh();
    1.69 +	virtual BOOL OnInitDialog();
    1.70 +	afx_msg void OnBg0();
    1.71 +	afx_msg void OnBg1();
    1.72 +	afx_msg void OnBank0();
    1.73 +	afx_msg void OnBank1();
    1.74 +	afx_msg void OnStretch();
    1.75 +	afx_msg void OnAutoUpdate();
    1.76 +	afx_msg void OnClose();
    1.77 +	//}}AFX_MSG
    1.78 +	DECLARE_MESSAGE_MAP()
    1.79 +};
    1.80 +
    1.81 +//{{AFX_INSERT_LOCATION}}
    1.82 +// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
    1.83 +
    1.84 +#endif // !defined(AFX_GBMAPVIEW_H__4CD23D38_F2CD_4B95_AE76_2781591DD077__INCLUDED_)