ScummVM API documentation
main.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef HODJNPODJ_BARBERSHOP_MAIN_H
23 #define HODJNPODJ_BARBERSHOP_MAIN_H
24 
25 #include "bagel/afxwin.h"
26 #include "bagel/hodjnpodj/hnplibs/stdinc.h"
27 #include "bagel/hodjnpodj/hnplibs/sprite.h"
28 #include "bagel/hodjnpodj/hnplibs/text.h"
29 #include "bagel/boflib/error.h"
30 #include "bagel/boflib/sound.h"
31 #include "bagel/hodjnpodj/barbershop/barb.h"
32 #include "bagel/hodjnpodj/barbershop/animate.h"
33 
34 namespace Bagel {
35 namespace HodjNPodj {
36 namespace Barbershop {
37 
38 class CMainWindow : public CFrameWnd {
39 private:
40  CBarber *m_pBarb;
41  CSound *m_pMIDISound;
42  CSound *m_pWavSound;
43  CAnimate *m_pAnim;
44  bool m_bMIDIPlaying;
45 
46 public:
47  CMainWindow();
48  void PlayGame();
49  void PaintScreen();
50  void LoadIniSettings();
51  void SaveIniSettings();
52  void FlushInputEvents();
53  LRESULT OnMCINotify(WPARAM, LPARAM);
54  LRESULT OnMMIONotify(WPARAM, LPARAM);
55 
56 protected:
57  void GameReset();
58  void GamePause();
59  void GameResume();
60  virtual bool OnCommand(WPARAM wParam, LPARAM lParam) override;
61  void HandleError(ERROR_CODE);
62  void DeleteSprite(CSprite *);
63 
64  void OnPaint();
65  void OnTimer(uintptr);
66  void OnMouseMove(unsigned int, CPoint);
67  void OnLButtonDown(unsigned int, CPoint);
68  void OnLButtonDblClk(unsigned int, CPoint);
69  void OnRButtonDown(unsigned int, CPoint);
70  void OnSysChar(unsigned int, unsigned int, unsigned int);
71  void OnSysKeyDown(unsigned int, unsigned int, unsigned int);
72  void OnKeyDown(unsigned int, unsigned int, unsigned int);
73  void OnActivate(unsigned int, CWnd *, bool) override;
74  void OnClose();
75  void OnLButtonUp(unsigned int, CPoint);
76 
77  DECLARE_MESSAGE_MAP()
78 
79  CRect m_rNewGameButton;
80  CPalette *m_pGamePalette;
81  CSprite *m_pScrollSprite;
82  bool m_bGameActive;
83  bool m_bPause;
84  bool m_bInMenu;
85 };
86 
87 } // namespace Barbershop
88 } // namespace HodjNPodj
89 } // namespace Bagel
90 
91 #endif
Definition: afxwin.h:1125
Definition: afxwin.h:1514
Definition: atltypes.h:79
Definition: afxwin.h:655
Definition: afxwin.h:27
Definition: sprite.h:41
Definition: atltypes.h:131