28 #ifndef GOB_PREGOB_ONCEUPON_ONCEUPON_H 29 #define GOB_PREGOB_ONCEUPON_ONCEUPON_H 31 #include "common/system.h" 32 #include "common/str.h" 34 #include "gob/pregob/pregob.h" 36 #include "gob/pregob/onceupon/stork.h" 98 bool doCopyProtection(
const uint8 colors[7],
const uint8 shapes[7 * 20],
const uint8 obfuscate[4]);
111 const MenuButton *animalButtons,
const char *
const *animalNames);
134 kDifficultyBeginner = 0,
135 kDifficultyIntermediate = 1,
136 kDifficultyAdvanced = 2,
156 struct ScreenBackup {
169 static const int kSectionCount = 15;
171 static const MenuButton kMainMenuDifficultyButton[];
179 static const MenuButton kSectionStorkHouses[];
181 static const MenuButton kCharGenHeadButtons[];
183 static const MenuButton kCharGenHairButtons[];
184 static const MenuButton kCharGenJacketButtons[];
185 static const MenuButton kCharGenTrousersButtons[];
189 static const char *kSound[kSoundCount];
199 typedef bool (
OnceUpon::*SectionFunc)();
201 static const SectionFunc kSectionFuncs[kSectionCount];
205 bool _openedArchives;
218 Difficulty _difficulty;
228 uint8 _colorTrousers;
233 void setGamePalette(uint palette);
234 void setGameCursor();
238 int16 x, int16 y)
const;
241 void backupScreen(ScreenBackup &backup,
bool setDefaultCursor =
false);
243 void restoreScreen(ScreenBackup &backup);
246 void fixTXTStrings(
TXTFile &txt)
const override;
252 int8 cpSetup(
const uint8 colors[7],
const uint8 shapes[7 * 20],
253 const uint8 obfuscate[4],
const Surface sprites[2]);
255 int8 cpFindShape(int16 x, int16 y)
const;
262 void showWait(uint palette = 0xFFFF);
265 void showChapter(
int chapter);
269 void handleAnimalNames(uint count,
const MenuButton *buttons,
const char *
const *names);
274 MenuAction handleStartMenu(
const MenuButton *animalsButton);
275 MenuAction handleMainMenu();
276 MenuAction handleIngameMenu();
278 void drawStartMenu(
const MenuButton *animalsButton);
280 void drawIngameMenu();
283 void drawMenuDifficulty();
286 void clearIngameMenu(
const Surface &background);
289 MenuAction doIngameMenu();
291 MenuAction doIngameMenu(int16 &key, MouseButtons &mouseButtons);
297 int checkButton(
const MenuButton *buttons, uint count, int16 x, int16 y,
int failValue = -1)
const;
305 void drawButtonBorder(
const MenuButton &button, uint8 color);
311 void anSetupChooser();
315 void anPlayAnimalName(
const Common::String &animal, uint language);
323 bool sectionChapter1();
324 bool sectionParents();
325 bool sectionChapter2();
326 bool sectionForest0();
327 bool sectionChapter3();
328 bool sectionEvilCastle();
329 bool sectionChapter4();
330 bool sectionForest1();
331 bool sectionChapter5();
332 bool sectionBossFight();
333 bool sectionChapter6();
334 bool sectionForest2();
335 bool sectionChapter7();
338 CharGenAction characterGenerator();
339 void charGenSetup(uint stage);
340 void charGenDrawName();
342 static bool enterString(
Common::String &name, int16 key, uint maxLength,
const Font &font);
349 #endif // GOB_PREGOB_ONCEUPON_ONCEUPON_H
virtual const StorkParam & getStorkParameters() const =0
Definition: onceupon.h:47
const Stork::BundleDrop * drops
The bundle drop parameters.
Definition: onceupon.h:85
static const uint kLanguageCount
Definition: onceupon.h:50
const char * backdrop
Backdrop image file.
Definition: onceupon.h:80
const MenuButton * houses
House button definitions.
Definition: onceupon.h:83
Definition: onceupon.h:79
void doStartMenu(const MenuButton *animalsButton, uint animalCount, const MenuButton *animalButtons, const char *const *animalNames)
Definition: surface.h:100
bool doCopyProtection(const uint8 colors[7], const uint8 shapes[7 *20], const uint8 obfuscate[4])
uint houseCount
Number of houses.
Definition: onceupon.h:82