home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 July / CMCD0704.ISO / Software / Freeware / Utilitare / VisualBoyAdvance-1.7.2 / src / win32 / MapView.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-05-13  |  3.4 KB  |  123 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_MAPVIEW_H__20F40C77_8E10_44B7_BB49_7865F73C3E75__INCLUDED_)
  21. #define AFX_MAPVIEW_H__20F40C77_8E10_44B7_BB49_7865F73C3E75__INCLUDED_
  22.  
  23. #if _MSC_VER > 1000
  24. #pragma once
  25. #endif // _MSC_VER > 1000
  26. // MapView.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. // MapView dialog
  38.  
  39. class MapView : public ResizeDlg, IUpdateListener
  40. {
  41.  private:
  42.   BITMAPINFO bmpInfo;
  43.   u8 *data;
  44.   int frame;
  45.   u16 control;
  46.   int bg;
  47.   int w;
  48.   int h;
  49.   BitmapControl mapView;
  50.   ZoomControl mapViewZoom;
  51.   ColorControl color;
  52.   bool autoUpdate;
  53.  
  54.   // Construction
  55.  public:
  56.   void savePNG(const char *name);
  57.   void saveBMP(const char *name);
  58.   afx_msg LRESULT OnColInfo(WPARAM wParam, LPARAM lParam);
  59.   afx_msg LRESULT OnMapInfo(WPARAM wParam, LPARAM lParam);
  60.   u32 GetClickAddress(int x, int y);
  61.   u32 GetTextClickAddress(u32 base, int x, int y);
  62.   void update();
  63.   void enableButtons(int mode);
  64.   void paint();
  65.   void renderMode5();
  66.   void renderMode4();
  67.   void renderMode3();
  68.   void renderMode2();
  69.   void renderMode1();
  70.   void renderMode0();
  71.   void renderRotScreen(u16 control);
  72.   void renderTextScreen(u16 control);
  73.   MapView(CWnd* pParent = NULL);   // standard constructor
  74.   ~MapView();
  75.  
  76.   // Dialog Data
  77.   //{{AFX_DATA(MapView)
  78.   enum { IDD = IDD_MAP_VIEW };
  79.   CStatic  m_numcolors;
  80.   CStatic  m_mode;
  81.   CStatic  m_overflow;
  82.   CStatic  m_mosaic;
  83.   CStatic  m_priority;
  84.   CStatic  m_dim;
  85.   CStatic  m_charbase;
  86.   CStatic  m_mapbase;
  87.   //}}AFX_DATA
  88.  
  89.  
  90.   // Overrides
  91.   // ClassWizard generated virtual function overrides
  92.   //{{AFX_VIRTUAL(MapView)
  93.  protected:
  94.   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  95.   virtual void PostNcDestroy();
  96.   //}}AFX_VIRTUAL
  97.  
  98.   // Implementation
  99.  protected:
  100.  
  101.   // Generated message map functions
  102.   //{{AFX_MSG(MapView)
  103.   afx_msg void OnRefresh();
  104.   virtual BOOL OnInitDialog();
  105.   afx_msg void OnFrame0();
  106.   afx_msg void OnFrame1();
  107.   afx_msg void OnBg0();
  108.   afx_msg void OnBg1();
  109.   afx_msg void OnBg2();
  110.   afx_msg void OnBg3();
  111.   afx_msg void OnStretch();
  112.   afx_msg void OnAutoUpdate();
  113.   afx_msg void OnClose();
  114.   afx_msg void OnSave();
  115.   //}}AFX_MSG
  116.   DECLARE_MESSAGE_MAP()
  117.     };
  118.  
  119.     //{{AFX_INSERT_LOCATION}}
  120.     // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  121.  
  122. #endif // !defined(AFX_MAPVIEW_H__20F40C77_8E10_44B7_BB49_7865F73C3E75__INCLUDED_)
  123.