forked from albertz/commandergenius
-
Notifications
You must be signed in to change notification settings - Fork 250
/
infoscreen.h
96 lines (83 loc) · 2.5 KB
/
infoscreen.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
89
90
91
92
93
94
95
96
/***************************************************************************
alienBlaster
Copyright (C) 2004
Paul Grathwohl, Arne Hormann, Daniel Kuehn, Soenke Schwardt
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
***************************************************************************/
#ifndef INFOSCREEN_H
#define INFOSCREEN_H
#include "SDL.h"
#include <string>
#include "item.h"
class Font;
class Items;
enum INFOSCREEN_CHOICES {
INFO_LIGHT_FIGHTER,
INFO_HEAVY_FIGHTER,
INFO_PRIMARY_WEAPON,
INFO_MACHINE_GUN,
INFO_DUMBFIRE_DOUBLE,
INFO_KICK_ASS_ROCKET,
INFO_HELLFIRE,
INFO_HEATSEEKER,
INFO_NUKE,
INFO_DEFLECTOR,
INFO_ENERGY_BEAM,
INFO_LASER,
INFO_SHIELD_UP,
INFO_CREDITS,
INFO_BACK_TO_MAIN_MENU
};
const std::string SET_INFOSCREEN_CHOICES[] = {
"Light Fighter",
"Heavy Fighter",
"Primary Weapon",
"Machine Gun",
"Double Dumbfire",
"Kick-Ass Rocket",
"Hellfire Rocket",
"Heatseaker Rocket",
"The Great Nuke",
"Deflector",
"Energy Beam",
"Heavy Laser",
"Health Powerup",
"Credits",
"Back To Main Menu"
};
const int NR_INFOSCREEN_CHOICES = 15;
class Infoscreen {
private:
SdlCompat_AcceleratedSurface *screen;
SdlCompat_AcceleratedSurface *activeChoiceSprite;
SdlCompat_AcceleratedSurface *lightFighterIcon1;
SdlCompat_AcceleratedSurface *lightFighterIcon2;
SdlCompat_AcceleratedSurface *heavyFighterIcon1;
SdlCompat_AcceleratedSurface *heavyFighterIcon2;
Font *font;
Font *fontHighlighted;
Item *newItem;
int activeChoice;
bool quitInfoscreen;
// sounds
int choose, confirm;
public:
Infoscreen( SdlCompat_AcceleratedSurface *scr );
~Infoscreen();
void run();
private:
void handleEvents();
void draw();
void putBitmapAtPosition( int x, int y, SdlCompat_AcceleratedSurface* bitmap );
};
#endif