-
Notifications
You must be signed in to change notification settings - Fork 0
/
menu.h
88 lines (70 loc) · 1.67 KB
/
menu.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*
* REminiscence - Flashback interpreter
* Copyright (C) 2005-2019 Gregory Montoir (cyx@users.sourceforge.net)
*/
#ifndef MENU_H__
#define MENU_H__
#include "intern.h"
struct Resource;
struct SystemStub;
struct Video;
struct Menu {
enum {
MENU_OPTION_ITEM_START,
MENU_OPTION_ITEM_SKILL,
MENU_OPTION_ITEM_PASSWORD,
MENU_OPTION_ITEM_LEVEL,
MENU_OPTION_ITEM_INFO,
MENU_OPTION_ITEM_DEMO,
MENU_OPTION_ITEM_QUIT
};
enum {
SCREEN_TITLE,
SCREEN_SKILL,
SCREEN_PASSWORD,
SCREEN_LEVEL,
SCREEN_INFO
};
enum {
EVENTS_DELAY = 80
};
struct Item {
int str;
int opt;
};
static const char *_levelNames[];
static const char *_passwordsDOS[];
static const char *_passwordsFrAmiga[];
static const char *_passwordsEnAmiga[];
static const char *_passwordsMac[];
static const uint8_t _flagEn16x12[];
static const uint8_t _flagFr16x12[];
static const uint8_t _flagDe16x12[];
static const uint8_t _flagIt16x12[];
static const uint8_t _flagJp16x12[];
static const uint8_t _flagSp16x12[];
Resource *_res;
SystemStub *_stub;
Video *_vid;
int _currentScreen;
int _nextScreen;
int _selectedOption;
int _skill;
int _level;
uint8_t _charVar1;
uint8_t _charVar2;
uint8_t _charVar3;
uint8_t _charVar4;
uint8_t _charVar5;
Menu(Resource *res, SystemStub *stub, Video *vid);
void drawString(const char *str, int16_t y, int16_t x, uint8_t color);
void drawString2(const char *str, int16_t y, int16_t x);
void loadPicture(const char *prefix);
void handleInfoScreen();
void handleSkillScreen();
bool handlePasswordScreen();
bool handleLevelScreen();
void handleTitleScreen();
const char *getLevelPassword(int level, int skill) const;
};
#endif // MENU_H__