diff src/win32/GBTileView.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/GBTileView.h	Sat Mar 03 10:31:27 2012 -0600
     1.3 @@ -0,0 +1,85 @@
     1.4 +#if !defined(AFX_GBTILEVIEW_H__C8C8DEBB_17ED_4C5C_9DBE_D730A49B312C__INCLUDED_)
     1.5 +#define AFX_GBTILEVIEW_H__C8C8DEBB_17ED_4C5C_9DBE_D730A49B312C__INCLUDED_
     1.6 +
     1.7 +#if _MSC_VER > 1000
     1.8 +#pragma once
     1.9 +#endif // _MSC_VER > 1000
    1.10 +// -*- C++ -*-
    1.11 +// GBTileView.h : header file
    1.12 +//
    1.13 +#include "BitmapControl.h"
    1.14 +#include "ColorControl.h"
    1.15 +#include "IUpdate.h"
    1.16 +#include "ResizeDlg.h"
    1.17 +#include "ZoomControl.h"
    1.18 +
    1.19 +/////////////////////////////////////////////////////////////////////////////
    1.20 +// GBTileView dialog
    1.21 +
    1.22 +class GBTileView : public ResizeDlg, IUpdateListener
    1.23 +{
    1.24 +	int charBase;
    1.25 +	int palette;
    1.26 +	int bank;
    1.27 +	BitmapControl tileView;
    1.28 +	BITMAPINFO    bmpInfo;
    1.29 +	u8 *         data;
    1.30 +	ZoomControl  zoom;
    1.31 +	ColorControl color;
    1.32 +	int          w;
    1.33 +	int          h;
    1.34 +	bool         autoUpdate;
    1.35 +	// Construction
    1.36 +public:
    1.37 +	void paint();
    1.38 +	void render();
    1.39 +	void renderTile(int tile, int x, int y, u8 *charBase);
    1.40 +	void savePNG(const char *name);
    1.41 +	void saveBMP(const char *name);
    1.42 +	GBTileView(CWnd*pParent = NULL);  // standard constructor
    1.43 +	virtual ~GBTileView();
    1.44 +
    1.45 +	virtual void update();
    1.46 +
    1.47 +	// Dialog Data
    1.48 +	//{{AFX_DATA(GBTileView)
    1.49 +	enum { IDD = IDD_GB_TILE_VIEWER };
    1.50 +	CSliderCtrl m_slider;
    1.51 +	int         m_charBase;
    1.52 +	int         m_bank;
    1.53 +	BOOL        m_stretch;
    1.54 +	//}}AFX_DATA
    1.55 +
    1.56 +	// Overrides
    1.57 +	// ClassWizard generated virtual function overrides
    1.58 +	//{{AFX_VIRTUAL(GBTileView)
    1.59 +protected:
    1.60 +	virtual void DoDataExchange(CDataExchange*pDX);   // DDX/DDV support
    1.61 +	virtual void PostNcDestroy();
    1.62 +	//}}AFX_VIRTUAL
    1.63 +
    1.64 +	// Implementation
    1.65 +protected:
    1.66 +	virtual afx_msg LRESULT OnMapInfo(WPARAM wParam, LPARAM lParam);
    1.67 +	virtual afx_msg LRESULT OnColInfo(WPARAM wParam, LPARAM lParam);
    1.68 +
    1.69 +	// Generated message map functions
    1.70 +	//{{AFX_MSG(GBTileView)
    1.71 +	afx_msg void OnSave();
    1.72 +	virtual BOOL OnInitDialog();
    1.73 +	afx_msg void OnClose();
    1.74 +	afx_msg void OnAutoUpdate();
    1.75 +	afx_msg void OnCharbase0();
    1.76 +	afx_msg void OnCharbase1();
    1.77 +	afx_msg void OnBank0();
    1.78 +	afx_msg void OnBank1();
    1.79 +	afx_msg void OnStretch();
    1.80 +	afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar*pScrollBar);
    1.81 +	//}}AFX_MSG
    1.82 +	DECLARE_MESSAGE_MAP()
    1.83 +};
    1.84 +
    1.85 +//{{AFX_INSERT_LOCATION}}
    1.86 +// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
    1.87 +
    1.88 +#endif // !defined(AFX_GBTILEVIEW_H__C8C8DEBB_17ED_4C5C_9DBE_D730A49B312C__INCLUDED_)