| 1 |
// ____ _ __ |
| 2 |
// / __ )____ _____ | | / /___ ___________ |
| 3 |
// / __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/ |
| 4 |
// / /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ ) |
| 5 |
// /_____/\____/____/ |__/|__/\__,_/_/ /____/ |
| 6 |
// |
| 7 |
// A futuristic real-time strategy game. |
| 8 |
// This file is part of Bos Wars. |
| 9 |
// |
| 10 |
/**@name title.h - The title screen headerfile. */ |
| 11 |
// |
| 12 |
// (c) Copyright 2007 by Jimmy Salmon |
| 13 |
// |
| 14 |
// This program is free software; you can redistribute it and/or modify |
| 15 |
// it under the terms of the GNU General Public License as published by |
| 16 |
// the Free Software Foundation; only version 2 of the License. |
| 17 |
// |
| 18 |
// This program is distributed in the hope that it will be useful, |
| 19 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 21 |
// GNU General Public License for more details. |
| 22 |
// |
| 23 |
// You should have received a copy of the GNU General Public License |
| 24 |
// along with this program; if not, write to the Free Software |
| 25 |
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 26 |
// 02111-1307, USA. |
| 27 |
|
| 28 |
#ifndef __TITLE_H__ |
| 29 |
#define __TITLE_H__ |
| 30 |
|
| 31 |
//@{ |
| 32 |
|
| 33 |
#include <string> |
| 34 |
|
| 35 |
|
| 36 |
class CFont; |
| 37 |
|
| 38 |
enum { |
| 39 |
TitleFlagCenter = 1 << 0, /// Center Text |
| 40 |
}; |
| 41 |
|
| 42 |
class TitleScreenLabel { |
| 43 |
public: |
| 44 |
TitleScreenLabel() : Font(0), Xofs(0), Yofs(0), Flags(0) {} |
| 45 |
|
| 46 |
std::string Text; |
| 47 |
CFont *Font; |
| 48 |
int Xofs; |
| 49 |
int Yofs; |
| 50 |
int Flags; |
| 51 |
}; |
| 52 |
|
| 53 |
class TitleScreen { |
| 54 |
public: |
| 55 |
TitleScreen() : StretchImage(true), Timeout(0), Labels(NULL) {} |
| 56 |
~TitleScreen() { |
| 57 |
if (this->Labels) { |
| 58 |
for (int i = 0; this->Labels[i]; ++i) { |
| 59 |
delete this->Labels[i]; |
| 60 |
} |
| 61 |
delete[] this->Labels; |
| 62 |
} |
| 63 |
} |
| 64 |
|
| 65 |
std::string File; |
| 66 |
std::string Music; |
| 67 |
bool StretchImage; |
| 68 |
int Timeout; |
| 69 |
TitleScreenLabel **Labels; |
| 70 |
}; |
| 71 |
|
| 72 |
extern TitleScreen **TitleScreens; /// File for title screen |
| 73 |
|
| 74 |
extern void ShowTitleScreens(); |
| 75 |
|
| 76 |
//@} |
| 77 |
|
| 78 |
#endif // !__TITLE_H__ |