22#ifndef HODJNPODJ_RIDDLES_H
23#define HODJNPODJ_RIDDLES_H
25#include "bagel/afxwin.h"
26#include "bagel/hodjnpodj/hnplibs/stdinc.h"
27#include "bagel/boflib/error.h"
28#include "bagel/boflib/sound.h"
29#include "bagel/hodjnpodj/hnplibs/sprite.h"
30#include "bagel/hodjnpodj/hnplibs/text.h"
31#include "bagel/hodjnpodj/hnplibs/button.h"
40#define NUM_FISH_CELS 25
44#define NUM_SKIER_CELS 14
48#define NUM_NESSIE_CELS 27
59#define COLUMN_1_DY 195
64#define COLUMN_2_DY 187
69#define COLUMN_3_DY 197
74#define COLUMN_4_DY 227
91#define COLUMN_WAV "sound\\COLUMN.WAV"
93#define MAX_RIDDLE_LENGTH 159
94#define MIN_RIDDLE_LENGTH 20
96#define MAX_ANSWER_LENGTH 23
98#define FISH_ANIM "art\\ridfish.bmp"
99#define FISH_WAV "sound\\lakefish.wav"
100#define NESS_ANIM "art\\nessie.bmp"
101#define NESS_WAV "sound\\serpent.wav"
102#define SKIER_ANIM "art\\skier.bmp"
103#define SKIER_WAV "sound\\jetski.wav"
105#include "common/pack-start.h"
108 char text[MAX_RIDDLE_LENGTH + 1];
109 char answers[MAX_ANSWERS][MAX_ANSWER_LENGTH + 1];
111#include "common/pack-end.h"
115 void OnChar(
unsigned int,
unsigned int,
unsigned int);
116 void OnSysChar(
unsigned int,
unsigned int,
unsigned int);
117 void OnKeyDown(
unsigned int,
unsigned int,
unsigned int);
118 void OnSysKeyDown(
unsigned int,
unsigned int,
unsigned int);
120 DECLARE_MESSAGE_MAP()
131 void LoadIniSettings();
132 void ParseAnswer(
const char *);
137 void OnSoundNotify(CSound *pSound);
140 void FlushInputEvents();
141 bool CheckUserGuess(
const char *);
142 ERROR_CODE RepaintSpriteList();
143 ERROR_CODE LoadRiddle();
144 ERROR_CODE BuildSpriteList();
145 ERROR_CODE DisplayLine(
const char *,
int,
int,
int);
146 int CharToIndex(
char);
147 ERROR_CODE ValidateRiddle(
RIDDLE *);
148 ERROR_CODE LoadMasterSprites();
150 virtual bool OnCommand(WPARAM wParam, LPARAM lParam)
override;
151 void HandleError(ERROR_CODE);
155 void OnMouseMove(
unsigned int,
CPoint);
156 void OnLButtonDown(
unsigned int,
CPoint);
158 void OnSetFocus(
CWnd *);
159 void OnTimer(uintptr);
160 LRESULT OnMCINotify(WPARAM, LPARAM);
161 LRESULT OnMMIONotify(WPARAM, LPARAM);
164 DECLARE_MESSAGE_MAP()
166 CRect m_rNewGameButton;
167 CMyEdit *m_pEditText =
nullptr;
170 RIDDLE *m_pRiddle =
nullptr;
172 CSound *m_pSoundTrack =
nullptr;
173 int m_nTimeLimit = 0;
174 int m_nInitTimeLimit = 0;
176 int m_nDifficultyLevel = 0;
177 unsigned int m_nRiddleNumber = 0;
178 bool m_bGameActive =
false;
179 bool m_bPause =
false;
180 bool m_bIgnoreScrollClick =
false;
Definition: riddles.h:113
Definition: riddles.h:123
Definition: afxwin.h:1739
Definition: afxwin.h:1532
Definition: atltypes.h:79
Definition: atltypes.h:131
Definition: afxwin.h:1141
Definition: riddles.h:106
Definition: minwindef.h:87