comparison src/win32/TileView.h @ 1:f9f4f1b99eed

importing src directory
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Mar 2012 10:31:27 -0600
parents
children
comparison
equal deleted inserted replaced
0:8ced16adf2e1 1:f9f4f1b99eed
1 #if !defined(AFX_TILEVIEW_H__055751EC_2DF3_495B_B643_29025465CD2E__INCLUDED_)
2 #define AFX_TILEVIEW_H__055751EC_2DF3_495B_B643_29025465CD2E__INCLUDED_
3
4 #if _MSC_VER > 1000
5 #pragma once
6 #endif // _MSC_VER > 1000
7 // TileView.h : header file
8 //
9
10 #include "BitmapControl.h"
11 #include "ColorControl.h"
12 #include "IUpdate.h"
13 #include "ResizeDlg.h"
14 #include "ZoomControl.h"
15
16 /////////////////////////////////////////////////////////////////////////////
17 // TileView dialog
18
19 class TileView : public ResizeDlg, IUpdateListener
20 {
21 int charBase;
22 int is256Colors;
23 int palette;
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 renderTile16(int tile, int x, int y, u8 *charBase, u16 *palette);
37 void renderTile256(int tile, int x, int y, u8 *charBase, u16 *palette);
38 void savePNG(const char *name);
39 void saveBMP(const char *name);
40 TileView(CWnd* pParent = NULL); // standard constructor
41 virtual ~TileView();
42
43 virtual void update();
44
45 // Dialog Data
46 //{{AFX_DATA(TileView)
47 enum { IDD = IDD_TILE_VIEWER };
48 CSliderCtrl m_slider;
49 int m_colors;
50 int m_charBase;
51 BOOL m_stretch;
52 //}}AFX_DATA
53
54
55 // Overrides
56 // ClassWizard generated virtual function overrides
57 //{{AFX_VIRTUAL(TileView)
58 protected:
59 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
60 virtual void PostNcDestroy();
61 //}}AFX_VIRTUAL
62
63 // Implementation
64 protected:
65 virtual afx_msg LRESULT OnMapInfo(WPARAM wParam, LPARAM lParam);
66 virtual afx_msg LRESULT OnColInfo(WPARAM wParam, LPARAM lParam);
67
68 // Generated message map functions
69 //{{AFX_MSG(TileView)
70 afx_msg void OnSave();
71 virtual BOOL OnInitDialog();
72 afx_msg void OnClose();
73 afx_msg void OnAutoUpdate();
74 afx_msg void On16Colors();
75 afx_msg void On256Colors();
76 afx_msg void OnCharbase0();
77 afx_msg void OnCharbase1();
78 afx_msg void OnCharbase2();
79 afx_msg void OnCharbase3();
80 afx_msg void OnCharbase4();
81 afx_msg void OnStretch();
82 afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
83 //}}AFX_MSG
84 DECLARE_MESSAGE_MAP()
85 };
86
87 //{{AFX_INSERT_LOCATION}}
88 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
89
90 #endif // !defined(AFX_TILEVIEW_H__055751EC_2DF3_495B_B643_29025465CD2E__INCLUDED_)