TileSetBrowserView.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. FinalSun/FinalAlert 2 Mission Editor
  3. Copyright (C) 1999-2024 Electronic Arts, Inc.
  4. Authored by Matthias Wagner
  5. This program is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation, either version 3 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program. If not, see <https://www.gnu.org/licenses/>.
  15. */
  16. #if !defined(AFX_TILESETBROWSERVIEW_H__3DD92021_7D37_11D4_9C87_97337B61A44A__INCLUDED_)
  17. #define AFX_TILESETBROWSERVIEW_H__3DD92021_7D37_11D4_9C87_97337B61A44A__INCLUDED_
  18. #if _MSC_VER > 1000
  19. #pragma once
  20. #endif // _MSC_VER > 1000
  21. // TileSetBrowserView.h : Header-Datei
  22. //
  23. /////////////////////////////////////////////////////////////////////////////
  24. // Ansicht CTileSetBrowserView
  25. class CTileSetBrowserView : public CScrollView
  26. {
  27. public:
  28. CTileSetBrowserView(); // Dynamische Erstellung verwendet geschützten Konstruktor
  29. DECLARE_DYNCREATE(CTileSetBrowserView)
  30. // Attribute
  31. public:
  32. // Operationen
  33. public:
  34. // Überschreibungen
  35. // Vom Klassen-Assistenten generierte virtuelle Funktionsüberschreibungen
  36. //{{AFX_VIRTUAL(CTileSetBrowserView)
  37. protected:
  38. virtual void OnDraw(CDC* pDC); // Überschrieben zum Zeichnen dieser Ansicht
  39. virtual void OnInitialUpdate(); // Zum ersten Mal nach der Konstruktion
  40. virtual void PostNcDestroy();
  41. //}}AFX_VIRTUAL
  42. // Implementierung
  43. public:
  44. void SetOverlay(DWORD dwID);
  45. int m_currentOverlay;
  46. int GetAddedHeight(DWORD dwID);
  47. int m_bottom_needed;
  48. void DrawIt();
  49. LPDIRECTDRAWSURFACE4* m_lpDDS;
  50. void SetTileSet(DWORD dwTileSet, BOOL bOnlyRedraw=FALSE);
  51. DWORD GetTileID(DWORD dwTileSet, DWORD dwType);
  52. int m_currentTileSet;
  53. virtual ~CTileSetBrowserView();
  54. #ifdef _DEBUG
  55. virtual void AssertValid() const;
  56. virtual void Dump(CDumpContext& dc) const;
  57. #endif
  58. // Generierte Nachrichtenzuordnungsfunktionen
  59. //{{AFX_MSG(CTileSetBrowserView)
  60. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  61. afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
  62. //}}AFX_MSG
  63. DECLARE_MESSAGE_MAP()
  64. protected:
  65. int m_CurrentMode;
  66. LPDIRECTDRAWSURFACE4 RenderTile(DWORD dwID);
  67. int m_tilecount;
  68. int m_tile_height;
  69. int m_tile_width;
  70. };
  71. /////////////////////////////////////////////////////////////////////////////
  72. //{{AFX_INSERT_LOCATION}}
  73. // Microsoft Visual C++ fügt unmittelbar vor der vorhergehenden Zeile zusätzliche Deklarationen ein.
  74. #endif // AFX_TILESETBROWSERVIEW_H__3DD92021_7D37_11D4_9C87_97337B61A44A__INCLUDED_