home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 July / CMCD0704.ISO / Software / Freeware / Utilitare / VisualBoyAdvance-1.7.2 / src / win32 / GBMapView.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-05-13  |  2.9 KB  |  103 lines

  1. // -*- C++ -*-
  2. // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator.
  3. // Copyright (C) 1999-2003 Forgotten
  4. // Copyright (C) 2004 Forgotten and the VBA development team
  5.  
  6. // This program is free software; you can redistribute it and/or modify
  7. // it under the terms of the GNU General Public License as published by
  8. // the Free Software Foundation; either version 2, or(at your option)
  9. // any later version.
  10. //
  11. // This program is distributed in the hope that it will be useful,
  12. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. // GNU General Public License for more details.
  15. //
  16. // You should have received a copy of the GNU General Public License
  17. // along with this program; if not, write to the Free Software Foundation,
  18. // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  19.  
  20. #if !defined(AFX_GBMAPVIEW_H__4CD23D38_F2CD_4B95_AE76_2781591DD077__INCLUDED_)
  21. #define AFX_GBMAPVIEW_H__4CD23D38_F2CD_4B95_AE76_2781591DD077__INCLUDED_
  22.  
  23. #if _MSC_VER > 1000
  24. #pragma once
  25. #endif // _MSC_VER > 1000
  26. // GBMapView.h : header file
  27. //
  28.  
  29. #include "BitmapControl.h"
  30. #include "ColorControl.h"
  31. #include "ZoomControl.h"
  32. #include "ResizeDlg.h"
  33. #include "IUpdate.h"
  34. #include "..\System.h"  // Added by ClassView
  35.  
  36. /////////////////////////////////////////////////////////////////////////////
  37. // GBMapView dialog
  38.  
  39. class GBMapView : public ResizeDlg, IUpdateListener
  40. {
  41.  private:
  42.   BITMAPINFO bmpInfo;
  43.   u8 *data;
  44.   int bank;
  45.   int bg;
  46.   int w;
  47.   int h;
  48.   BitmapControl mapView;
  49.   ZoomControl mapViewZoom;
  50.   ColorControl color;
  51.   bool autoUpdate;
  52.   // Construction
  53.  public:
  54.   afx_msg LRESULT OnColInfo(WPARAM wParam, LPARAM lParam);
  55.   afx_msg LRESULT OnMapInfo(WPARAM wParam, LPARAM lParam);
  56.   u32 GetClickAddress(int x, int y);
  57.   void update();
  58.   void paint();
  59.   void render();
  60.   void savePNG(const char *name);
  61.   void saveBMP(const char *name);
  62.   ~GBMapView();
  63.   GBMapView(CWnd* pParent = NULL);   // standard constructor
  64.  
  65.   // Dialog Data
  66.   //{{AFX_DATA(GBMapView)
  67.   enum { IDD = IDD_GB_MAP_VIEW };
  68.   // NOTE: the ClassWizard will add data members here
  69.   //}}AFX_DATA
  70.  
  71.  
  72.   // Overrides
  73.   // ClassWizard generated virtual function overrides
  74.   //{{AFX_VIRTUAL(GBMapView)
  75.  protected:
  76.   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  77.   virtual void PostNcDestroy();
  78.   //}}AFX_VIRTUAL
  79.  
  80.   // Implementation
  81.  protected:
  82.  
  83.   // Generated message map functions
  84.   //{{AFX_MSG(GBMapView)
  85.   afx_msg void OnSave();
  86.   afx_msg void OnRefresh();
  87.   virtual BOOL OnInitDialog();
  88.   afx_msg void OnBg0();
  89.   afx_msg void OnBg1();
  90.   afx_msg void OnBank0();
  91.   afx_msg void OnBank1();
  92.   afx_msg void OnStretch();
  93.   afx_msg void OnAutoUpdate();
  94.   afx_msg void OnClose();
  95.   //}}AFX_MSG
  96.   DECLARE_MESSAGE_MAP()
  97.     };
  98.  
  99.     //{{AFX_INSERT_LOCATION}}
  100.     // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  101.  
  102. #endif // !defined(AFX_GBMAPVIEW_H__4CD23D38_F2CD_4B95_AE76_2781591DD077__INCLUDED_)
  103.