-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmenu.h
executable file
·73 lines (65 loc) · 2.55 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
/**************
* File Name: menu.h
* Author: G. J. Krafsig
* Date: July 3rd, 2007
* Purpose: header files for game menus
**************/
#ifndef GAMEMENU_H
#define GAMEMENU_H
#include <cstdlib>
#include <cmath>
#include <allegro.h>
#include <winalleg.h>
#include "graphics.h"
//images used for the menu
#define LOADINGIMAGE "images/loadingdata.pcx"
#define NEWGAMEIMAGE "images/introduction.pcx"
#define GAMEMODEIMAGE "images/modescreen.pcx"
#define PAUSEIMAGE "images/pause.pcx"
#define STOREIMAGE "images/store.pcx"
#define LOADGAMEIMAGE "images/loadgame.pcx"
#define SAVEGAMEIMAGE "images/loadgame.pcx"
#define SELECTORIMAGE "images/smallbluegem.pcx"
#define BUILDLOGINIMAGE "images/buildlogin.pcx"
//game menu screens
#define NOMENU 0
#define LOADINGSCREEN 1
#define NEWGAMESCREEN 2
#define GAMEMODESCREEN 3
#define PAUSESCREEN 4
#define STORESCREEN 5
#define LOADGAMESCREEN 6
#define SAVEGAMESCREEN 7
#define BUILDLOGINSCREEN 8
#define CHARACTERSCREEN 9
class gamemenu
{
public:
//class constructor
gamemenu();
bool loadGraphics(int width, int height); //load the graphics for the different screens
void destoryGraphics(); //destroy the graphics that were loaded
int currentScreen(); //returns int screen
bool setScreen(int num); //set the screen to something else
BITMAP *getScreen(int num); //returns the bitmap for the appropriate num, or the bitmap for
//the current value of int screen
//selector related options
BITMAP *getSelector(); //return the selector image
SPRITE selector; //select things from the game map
void setSelectorY(int amount); //change the selector y value
void setSelectorX(int amount); //change the selector x value
bool shown; //the screen was shown on the screen
private:
gamegraphics *graphics; //start the game graphics class
BITMAP *loading; //loading data/graphics screen
BITMAP *newload; //load a new game screen
BITMAP *gameplay; //select the gameplay mode screen
BITMAP *pause; //the pasued game screen
BITMAP *store; //the store menu screen
BITMAP *loadgame; //the loadgame menu screen
BITMAP *savegame; //the save a game menu screen
BITMAP *select; //the selector jewel
BITMAP *build; //the build login screen
int screen; //the menu screen that they're on
};
#endif