home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 July / CMCD0704.ISO / Software / Freeware / Utilitare / VisualBoyAdvance-1.7.2 / src / win32 / GBOamView.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-05-13  |  2.9 KB  |  104 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_GBOAMVIEW_H__FE8105E6_9693_479A_8C57_DEEA1B2EA3D6__INCLUDED_)
  21. #define AFX_GBOAMVIEW_H__FE8105E6_9693_479A_8C57_DEEA1B2EA3D6__INCLUDED_
  22.  
  23. #if _MSC_VER > 1000
  24. #pragma once
  25. #endif // _MSC_VER > 1000
  26. // GBOamView.h : header file
  27. //
  28.  
  29. #include "BitmapControl.h"
  30. #include "ZoomControl.h"
  31. #include "ColorControl.h"
  32.  
  33. #include "IUpdate.h"
  34. #include "ResizeDlg.h"
  35.  
  36. /////////////////////////////////////////////////////////////////////////////
  37. // GBOamView dialog
  38.  
  39. class GBOamView : public ResizeDlg, IUpdateListener
  40. {
  41.  private:
  42.   BITMAPINFO bmpInfo;
  43.   u8 *data;
  44.   int w;
  45.   int h;
  46.   int number;
  47.   bool autoUpdate;
  48.   BitmapControl oamView;
  49.   ZoomControl oamZoom;
  50.   ColorControl color;
  51.  
  52.  
  53.   // Construction
  54.  public:
  55.   void updateScrollInfo();
  56.   void save();
  57.   void savePNG(const char *name);
  58.   void saveBMP(const char *name);
  59.   void render();
  60.   void setAttributes(int y, int x, int tile, int flags);
  61.   void paint();
  62.   ~GBOamView();
  63.   GBOamView(CWnd* pParent = NULL);   // standard constructor
  64.  
  65.   afx_msg LRESULT OnColInfo(WPARAM wParam, LPARAM lParam);
  66.   afx_msg LRESULT OnMapInfo(WPARAM wParam, LPARAM lParam);
  67.   virtual void update();
  68.  
  69.   // Dialog Data
  70.   //{{AFX_DATA(GBOamView)
  71.   enum { IDD = IDD_GB_OAM_VIEW };
  72.   CEdit  m_sprite;
  73.   BOOL  m_stretch;
  74.   //}}AFX_DATA
  75.  
  76.  
  77.   // Overrides
  78.   // ClassWizard generated virtual function overrides
  79.   //{{AFX_VIRTUAL(GBOamView)
  80.  protected:
  81.   virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  82.   virtual void PostNcDestroy();
  83.   //}}AFX_VIRTUAL
  84.  
  85.   // Implementation
  86.  protected:
  87.  
  88.   // Generated message map functions
  89.   //{{AFX_MSG(GBOamView)
  90.   virtual BOOL OnInitDialog();
  91.   afx_msg void OnStretch();
  92.   afx_msg void OnAutoUpdate();
  93.   afx_msg void OnChangeSprite();
  94.   afx_msg void OnClose();
  95.   afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
  96.   //}}AFX_MSG
  97.   DECLARE_MESSAGE_MAP()
  98.     };
  99.  
  100.     //{{AFX_INSERT_LOCATION}}
  101.     // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  102.  
  103. #endif // !defined(AFX_GBOAMVIEW_H__FE8105E6_9693_479A_8C57_DEEA1B2EA3D6__INCLUDED_)
  104.