2016-03-20 17:00:00 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* REminiscence - Flashback interpreter
|
|
|
|
* Copyright (C) 2005-2015 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,
|
|
|
|
MENU_OPTION_ITEM_QUIT
|
|
|
|
};
|
2016-03-20 17:00:00 +01:00
|
|
|
enum {
|
|
|
|
SCREEN_TITLE,
|
|
|
|
SCREEN_SKILL,
|
|
|
|
SCREEN_PASSWORD,
|
|
|
|
SCREEN_LEVEL,
|
|
|
|
SCREEN_INFO
|
|
|
|
};
|
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;
|
|
|
|
};
|
|
|
|
|
2015-08-02 18:00:00 +02:00
|
|
|
static const char *_passwords[8][3];
|
2017-06-07 18:00:00 +02:00
|
|
|
static const char *_passwordsFrAmiga[];
|
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();
|
2015-08-02 18:00:00 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MENU_H__
|