REminiscence/menu.h

78 lines
1.3 KiB
C
Raw Permalink Normal View History

2016-03-20 17:00:00 +01:00
/*
* REminiscence - Flashback interpreter
2018-01-20 17:00:00 +01:00
* Copyright (C) 2005-2018 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
};
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[];
2017-11-03 17:00:00 +01:00
static const char *_passwordsEnAmiga[];
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__