_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

title.h
Go to the documentation of this file.
1 // _________ __ __
2 // / _____// |_____________ _/ |______ ____ __ __ ______
3 // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
4 // / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ |
5 // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
6 // \/ \/ \//_____/ \/
7 // ______________________ ______________________
8 // T H E W A R B E G I N S
9 // Stratagus - A free fantasy real time strategy game engine
10 //
12 //
13 // (c) Copyright 2007 by Jimmy Salmon
14 //
15 // This program is free software; you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation; only version 2 of the License.
18 //
19 // This program is distributed in the hope that it will be useful,
20 // but WITHOUT ANY WARRANTY; without even the implied warranty of
21 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 // GNU General Public License for more details.
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program; if not, write to the Free Software
26 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 // 02111-1307, USA.
28 
29 #ifndef __TITLE_H__
30 #define __TITLE_H__
31 
33 
34 #include <string>
35 
36 
37 class CFont;
38 
39 enum {
40  TitleFlagCenter = 1 << 0
41 };
42 
44 {
45 public:
46  TitleScreenLabel() : Font(0), Xofs(0), Yofs(0), Flags(0) {}
47 
48  std::string Text;
50  int Xofs;
51  int Yofs;
52  int Flags;
53 };
54 
56 {
57 public:
58  TitleScreen() : StretchImage(true), Timeout(0), Iterations(0), Editor(0), Labels(NULL) {}
60  {
61  if (this->Labels) {
62  for (int i = 0; this->Labels[i]; ++i) {
63  delete this->Labels[i];
64  }
65  delete[] this->Labels;
66  }
67  }
68 
69  void ShowTitleImage();
70 
71 private:
72  void ShowLabels();
73 public:
74  std::string File;
75  std::string Music;
77  int Timeout;
79  int Editor;
81 };
82 
83 extern TitleScreen **TitleScreens;
84 
85 extern void ShowTitleScreens();
86 
88 
89 #endif // !__TITLE_H__
TitleScreenLabel::Flags
int Flags
Definition: title.h:52
TitleScreen::Editor
int Editor
Definition: title.h:79
TitleScreen
Definition: title.h:55
TitleScreenLabel::Yofs
int Yofs
Definition: title.h:51
TitleScreen::~TitleScreen
~TitleScreen()
Definition: title.h:59
TitleScreenLabel::Xofs
int Xofs
Definition: title.h:50
TitleScreenLabel
Definition: title.h:43
TitleScreen::ShowTitleImage
void ShowTitleImage()
Definition: title.cpp:127
TitleScreens
TitleScreen ** TitleScreens
Definition: title.cpp:41
TitleScreenLabel::Font
CFont * Font
Definition: title.h:49
TitleScreen::Labels
TitleScreenLabel ** Labels
Definition: title.h:80
TitleScreen::Music
std::string Music
Definition: title.h:75
TitleFlagCenter
@ TitleFlagCenter
Definition: title.h:40
TitleScreen::TitleScreen
TitleScreen()
Definition: title.h:58
TitleScreen::Timeout
int Timeout
Definition: title.h:77
TitleScreen::File
std::string File
Definition: title.h:74
TitleScreen::Iterations
int Iterations
Definition: title.h:78
TitleScreen::StretchImage
bool StretchImage
Definition: title.h:76
ShowTitleScreens
void ShowTitleScreens()
File for title screen.
Definition: title.cpp:170
TitleScreenLabel::Text
std::string Text
Definition: title.h:48
TitleScreenLabel::TitleScreenLabel
TitleScreenLabel()
Definition: title.h:46
CFont
Font definition.
Definition: font.h:73
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.