REminiscence/menu.h

97 lines
1.9 KiB
C
Raw Permalink Normal View History

2016-03-20 17:00:00 +01:00
/*
* REminiscence - Flashback interpreter
2019-10-27 17:00:00 +01:00
* Copyright (C) 2005-2019 Gregory Montoir (cyx@users.sourceforge.net)
2015-08-02 18:00:00 +02:00
*/
#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,
2018-01-14 17:00:00 +01:00
MENU_OPTION_ITEM_DEMO,
2015-08-02 18:00:00 +02:00
MENU_OPTION_ITEM_QUIT
};
2016-03-20 17:00:00 +01:00
enum {
SCREEN_TITLE,
SCREEN_SKILL,
SCREEN_PASSWORD,
SCREEN_LEVEL,
SCREEN_INFO
};
2018-03-28 18:00:00 +02:00
enum {
kMacTitleScreen_MacPlay = 1,
kMacTitleScreen_Presage = 2,
kMacTitleScreen_Flashback = 3,
kMacTitleScreen_LeftEye = 4,
kMacTitleScreen_RightEye = 5,
kMacTitleScreen_Controls = 6
};
2015-08-02 18:00:00 +02:00
enum {
EVENTS_DELAY = 80
};
2016-03-20 17:00:00 +01:00
struct Item {
int str;
int opt;
};
2019-10-27 17:00:00 +01:00
static const char *_levelNames[];
2018-02-10 17:00:00 +01:00
static const char *_passwordsDOS[];
2017-06-07 18:00:00 +02:00
static const char *_passwordsFrAmiga[];
2017-11-03 17:00:00 +01:00
static const char *_passwordsEnAmiga[];
2018-02-10 17:00:00 +01:00
static const char *_passwordsMac[];
2015-08-02 18:00:00 +02:00
2018-03-18 17:00:00 +01:00
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[];
2015-08-02 18:00:00 +02:00
Resource *_res;
SystemStub *_stub;
Video *_vid;
2016-03-20 17:00:00 +01:00
int _currentScreen;
int _nextScreen;
int _selectedOption;
int _skill;
int _level;
2015-08-02 18:00:00 +02:00
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);
2016-03-20 17:00:00 +01:00
2015-08-02 18:00:00 +02:00
void handleInfoScreen();
2016-03-20 17:00:00 +01:00
void handleSkillScreen();
bool handlePasswordScreen();
bool handleLevelScreen();
void handleTitleScreen();
2018-02-10 17:00:00 +01:00
const char *getLevelPassword(int level, int skill) const;
2015-08-02 18:00:00 +02:00
};
#endif // MENU_H__