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