view src/win32/GBTileView.h @ 2:3549bbe597ed

adding makefile.am
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Mar 2012 10:31:47 -0600
parents f9f4f1b99eed
children
line wrap: on
line source
1 #if !defined(AFX_GBTILEVIEW_H__C8C8DEBB_17ED_4C5C_9DBE_D730A49B312C__INCLUDED_)
2 #define AFX_GBTILEVIEW_H__C8C8DEBB_17ED_4C5C_9DBE_D730A49B312C__INCLUDED_
4 #if _MSC_VER > 1000
5 #pragma once
6 #endif // _MSC_VER > 1000
7 // -*- C++ -*-
8 // GBTileView.h : header file
9 //
10 #include "BitmapControl.h"
11 #include "ColorControl.h"
12 #include "IUpdate.h"
13 #include "ResizeDlg.h"
14 #include "ZoomControl.h"
16 /////////////////////////////////////////////////////////////////////////////
17 // GBTileView dialog
19 class GBTileView : public ResizeDlg, IUpdateListener
20 {
21 int charBase;
22 int palette;
23 int bank;
24 BitmapControl tileView;
25 BITMAPINFO bmpInfo;
26 u8 * data;
27 ZoomControl zoom;
28 ColorControl color;
29 int w;
30 int h;
31 bool autoUpdate;
32 // Construction
33 public:
34 void paint();
35 void render();
36 void renderTile(int tile, int x, int y, u8 *charBase);
37 void savePNG(const char *name);
38 void saveBMP(const char *name);
39 GBTileView(CWnd*pParent = NULL); // standard constructor
40 virtual ~GBTileView();
42 virtual void update();
44 // Dialog Data
45 //{{AFX_DATA(GBTileView)
46 enum { IDD = IDD_GB_TILE_VIEWER };
47 CSliderCtrl m_slider;
48 int m_charBase;
49 int m_bank;
50 BOOL m_stretch;
51 //}}AFX_DATA
53 // Overrides
54 // ClassWizard generated virtual function overrides
55 //{{AFX_VIRTUAL(GBTileView)
56 protected:
57 virtual void DoDataExchange(CDataExchange*pDX); // DDX/DDV support
58 virtual void PostNcDestroy();
59 //}}AFX_VIRTUAL
61 // Implementation
62 protected:
63 virtual afx_msg LRESULT OnMapInfo(WPARAM wParam, LPARAM lParam);
64 virtual afx_msg LRESULT OnColInfo(WPARAM wParam, LPARAM lParam);
66 // Generated message map functions
67 //{{AFX_MSG(GBTileView)
68 afx_msg void OnSave();
69 virtual BOOL OnInitDialog();
70 afx_msg void OnClose();
71 afx_msg void OnAutoUpdate();
72 afx_msg void OnCharbase0();
73 afx_msg void OnCharbase1();
74 afx_msg void OnBank0();
75 afx_msg void OnBank1();
76 afx_msg void OnStretch();
77 afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar*pScrollBar);
78 //}}AFX_MSG
79 DECLARE_MESSAGE_MAP()
80 };
82 //{{AFX_INSERT_LOCATION}}
83 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
85 #endif // !defined(AFX_GBTILEVIEW_H__C8C8DEBB_17ED_4C5C_9DBE_D730A49B312C__INCLUDED_)