OpenXcom
1.0
Open-source clone of the original X-Com
src
Menu
StartState.h
1
/*
2
* Copyright 2010-2014 OpenXcom Developers.
3
*
4
* This file is part of OpenXcom.
5
*
6
* OpenXcom is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
10
*
11
* OpenXcom is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with OpenXcom. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
#ifndef OPENXCOM_STARTSTATE_H
20
#define OPENXCOM_STARTSTATE_H
21
22
#include "../Engine/State.h"
23
#include <sstream>
24
25
namespace
OpenXcom
26
{
27
28
class
Text;
29
class
Font;
30
class
Timer;
31
class
Language;
32
33
enum
LoadingPhase { LOADING_STARTED, LOADING_FAILED, LOADING_SUCCESSFUL, LOADING_DONE };
34
38
class
StartState
:
public
State
39
{
40
private
:
41
Text
*_text, *_cursor;
42
Font
*_font;
43
Timer
*_timer;
44
Language
*_lang;
45
int
_anim;
46
47
SDL_Thread *_thread;
48
std::wostringstream _output;
49
public
:
50
static
LoadingPhase loading;
51
static
std::string error;
52
54
StartState
(
Game
*game);
56
~StartState
();
58
void
init
();
60
void
think
();
62
void
handle
(
Action
*action);
64
void
animate
();
66
void
addLine
(
const
std::wstring &str);
68
static
int
load
(
void
*game_ptr);
69
};
70
71
}
72
73
#endif
OpenXcom
COPYING:
Definition:
BaseInfoState.cpp:41
OpenXcom::StartState::init
void init()
Reset everything.
Definition:
StartState.cpp:128
OpenXcom::StartState::~StartState
~StartState()
Cleans up the Start state.
Definition:
StartState.cpp:114
OpenXcom::StartState::think
void think()
Displays messages.
Definition:
StartState.cpp:154
OpenXcom::Action
Container for all the information associated with a given user action, like mouse clicks,...
Definition:
Action.h:35
OpenXcom::Language
Contains strings used throughout the game for localization.
Definition:
Language.h:44
OpenXcom::StartState::animate
void animate()
Animates the terminal.
Definition:
StartState.cpp:231
OpenXcom::StartState::handle
void handle(Action *action)
Handles key clicks.
Definition:
StartState.cpp:216
OpenXcom::Text
Text string displayed on screen.
Definition:
Text.h:42
OpenXcom::StartState::StartState
StartState(Game *game)
Creates the Start state.
Definition:
StartState.cpp:56
OpenXcom::State
A game state that receives user input and reacts accordingly.
Definition:
State.h:45
OpenXcom::Timer
Timer used to run code in fixed intervals.
Definition:
Timer.h:38
OpenXcom::Game
The core of the game engine, manages the game's entire contents and structure.
Definition:
Game.h:45
OpenXcom::Font
Takes care of loading and storing each character in a sprite font.
Definition:
Font.h:41
OpenXcom::StartState::addLine
void addLine(const std::wstring &str)
Adds a line of text.
Definition:
StartState.cpp:287
OpenXcom::StartState
Initializes the game and loads all required content.
Definition:
StartState.h:39
OpenXcom::StartState::load
static int load(void *game_ptr)
Loads the game resources.
Definition:
StartState.cpp:302
Generated by
1.8.20