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_CRYPT_MAIN_H
23 #define HODJNPODJ_CRYPT_MAIN_H
24 
25 #include "bagel/boflib/sound.h"
26 #include "bagel/hodjnpodj/hnplibs/gamedll.h"
27 #include "bagel/hodjnpodj/crypt/crypt.h"
28 
29 namespace Bagel {
30 namespace HodjNPodj {
31 namespace Crypt {
32 
33 #define NEW_GAME_LEFT 15
34 #define NEW_GAME_TOP 2
35 #define NEW_GAME_RIGHT 233
36 #define NEW_GAME_BOTTOM 21
37 
38 #define PAUSE_TIME 15000 // Pause for 15 seconds -- allows user to read quote
39 
40 // Game theme song
41 #define GAME_THEME ".\\sound\\crypt.mid"
42 // Rules files
43 #define RULES_TEXT "CRYPTRUL.TXT"
44 #define RULES_WAV ".\\SOUND\\CRYPT.WAV"
45 
47 // EASTER EGG AND SOUND HOTSPOT DATA:
48 //
49 #define WAV_TIMEOUT ".\\SOUND\\BUZZER.WAV"
50 #define WAV_WON ".\\SOUND\\SOUNDWON.WAV"
51 #define WAV_URN1 ".\\SOUND\\OUTTHERE.WAV"
52 #define WAV_URN2 ".\\SOUND\\SPOOKMUS.WAV"
53 #define WAV_URN3 ".\\SOUND\\BUTFLIES.WAV"
54 #define WAV_JOKE1 ".\\SOUND\\JOKE1.WAV"
55 #define WAV_JOKE2 ".\\SOUND\\JOKE2.WAV"
56 #define WAV_JOKE3 ".\\SOUND\\JOKE3.WAV"
57 #define WAV_JOKE4 ".\\SOUND\\JOKE4.WAV"
58 #define WAV_JOKE5 ".\\SOUND\\JOKE5.WAV"
59 #define WAV_JOKE6 ".\\SOUND\\JOKE6.WAV"
60 #define WAV_TORCH ".\\SOUND\\FIREENG.WAV"
61 #define WAV_GRYPH ".\\SOUND\\GRYPHON.WAV"
62 #define WAV_STEPS ".\\SOUND\\STAIRS.WAV"
63 #define WAV_HOUR ".\\SOUND\\SANDTIME.WAV"
64 
65 #define NUM_SKULL_SOUNDS 6
66 
67 // Skull anim offsets
68 #define SKULL_X 21 //15
69 #define SKULL_Y 257 //245
70 #define SKULL_DX 97
71 #define SKULL_DY 135
72 
73 // URN1 anim offsets
74 #define URN1_X 98 //95
75 #define URN1_Y 28 //22
76 #define URN1_DX 42 //54
77 #define URN1_DY 133 //48
78 
79 // URN2 anim offsets
80 #define URN2_X 204 //186
81 #define URN2_Y 25 //24
82 #define URN2_DX 94 //120
83 #define URN2_DY 104 //106
84 
85 // URN3 anim offsets
86 #define URN3_X 361 //357
87 #define URN3_Y 26 //23
88 #define URN3_DX 72 //84
89 #define URN3_DY 103 //108
90 
91 // Anim cel count
92 #define NUM_SKULL_CELS 20
93 #define NUM_URN1_CELS 25
94 #define NUM_URN2_CELS 22
95 #define NUM_URN3_CELS 20
96 
97 // Anim sleep times in millisecs
98 #define SKULL_SLEEP 100
99 #define JOKE1_SLEEP 130 // funny thing
100 #define JOKE2_SLEEP 130 // pj's part A
101 #define JOKE2B_SLEEP 120 // pj's part B
102 #define JOKE3_SLEEP 120 // audience
103 #define JOKE4_SLEEP 130 // brooklyn
104 #define JOKE5_SLEEP 150 // philly
105 #define JOKE6_SLEEP 40 // sock it to me
106 #define URN1_SLEEP 150
107 #define URN2_SLEEP 200
108 #define URN3_SLEEP 125
109 
110 // TORCH audio hotspot offsets
111 
112 #define TORCH1_X 45
113 #define TORCH1_Y 25
114 #define TORCH2_X 170
115 #define TORCH2_Y 40
116 #define TORCH3_X 307
117 #define TORCH3_Y 35
118 #define TORCH4_X 450
119 #define TORCH4_Y 40
120 #define TORCH_DX 50
121 #define TORCH_DY 80
122 
123 // GRYPH audio hotspot offsets
124 
125 #define GRYPH_X 208
126 #define GRYPH_Y 130
127 #define GRYPH_DX 240
128 #define GRYPH_DY 45
129 
130 // STEPS audio hotspot offsets
131 
132 #define STEPS_X 568
133 #define STEPS_Y 198
134 #define STEPS_DX 42
135 #define STEPS_DY 183
136 
137 // HOUR audio hotspot offsets
138 #define HOUR_X 473
139 #define HOUR_Y 123
140 #define HOUR_DX 40
141 #define HOUR_DY 61
142 
143 #define MAX_HOURS 10
144 
145 
146 class CMainWindow : public CFrameWnd {
147 public:
148  CMainWindow(HWND, LPGAMESTRUCT);
149  ~CMainWindow();
150 
151  void SplashScreen();
152  static void FlushInputEvents();
153  void DisplayStats(CDC*);
154  void RefreshStats();
155  void GameWin();
156  void GameLose();
157 
158 private:
159  HWND m_hCallAppWnd;
160  LPGAMESTRUCT m_lpGameStruct;
161  CRect MainRect; // screen area spanned by the game window
162  CRect m_cNewGame; // area spanned by new game rect
163 // CCryptogram *m_cCryptograms; // cryptogram game object
164  CBmpButton *m_pScrollButton; // scroll button
165  bool m_bIgnoreScrollClick; // scroll button
166  bool m_bIsFirstTimeHack;
167  CSprite *m_pHourGlass;
168 // int m_nTimer;
169 // bool m_bPause;
170 
171 private:
172  void OnSoundNotify(CSound *pSound);
173 
174 protected:
175  virtual bool OnCommand(WPARAM wParam, LPARAM lParam) override;
176 
177  //{{AFX_MSG( CMainWindow )
178  afx_msg void OnPaint();
179  afx_msg void OnLButtonDown(unsigned int, CPoint);
180  afx_msg void OnLButtonUp(unsigned int, CPoint);
181  afx_msg void OnLButtonDblClk(unsigned int, CPoint);
182  afx_msg void OnMButtonDown(unsigned int, CPoint);
183  afx_msg void OnMButtonUp(unsigned int, CPoint);
184  afx_msg void OnMButtonDblClk(unsigned int, CPoint);
185  afx_msg void OnRButtonDown(unsigned int, CPoint);
186  afx_msg void OnRButtonUp(unsigned int, CPoint);
187  afx_msg void OnRButtonDblClk(unsigned int, CPoint);
188  afx_msg void OnMouseMove(unsigned int nFlags, CPoint point);
189  afx_msg void OnChar(unsigned int nChar, unsigned int nRepCnt, unsigned int nFlags);
190  afx_msg void OnSysChar(unsigned int nChar, unsigned int nRepCnt, unsigned int nFlags);
191  afx_msg void OnSysKeyDown(unsigned int nChar, unsigned int nRepCnt, unsigned int nFlags);
192  afx_msg void OnKeyDown(unsigned int nChar, unsigned int nRepCnt, unsigned int nFlags);
193  afx_msg void OnTimer(uintptr nIDEvent);
194  afx_msg void OnClose();
195  afx_msg void OnDestroy();
196  afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
197  afx_msg LRESULT OnMCINotify(WPARAM, LPARAM);
198  afx_msg LRESULT OnMMIONotify(WPARAM, LPARAM);
199  //}}AFX_MSG
200 
201  DECLARE_MESSAGE_MAP()
202 };
203 
205 
206 // CTheApp:
207 // See game.cpp for the code to the InitInstance member function.
208 //
209 class CTheApp : public CWinApp {
210 public:
211  bool InitInstance();
212  int ExitInstance();
213 };
214 
215 } // namespace Crypt
216 } // namespace HodjNPodj
217 } // namespace Bagel
218 
219 #endif
Definition: afxwin.h:1125
Definition: afxwin.h:1514
Definition: atltypes.h:79
Definition: button.h:65
Definition: main.h:209
Definition: afxwin.h:1943
Definition: afxwin.h:27
Definition: sprite.h:41
Definition: atltypes.h:131
Definition: afxwin.h:708
Definition: afxwin.h:1100