19 #ifndef OPENXCOM_GEOSCAPESTATE_H
20 #define OPENXCOM_GEOSCAPESTATE_H
22 #include "../Engine/State.h"
31 class InteractiveSurface;
46 Surface *_bg, *_sideLine, *_sidebar;
48 TextButton *_btnIntercept, *_btnBases, *_btnGraphs, *_btnUfopaedia, *_btnOptions, *_btnFunding;
50 TextButton *_btn5Secs, *_btn1Min, *_btn5Mins, *_btn30Mins, *_btn1Hour, *_btn1Day;
52 InteractiveSurface *_btnRotateLeft, *_btnRotateRight, *_btnRotateUp, *_btnRotateDown, *_btnZoomIn, *_btnZoomOut;
53 Text *_txtFunds, *_txtHour, *_txtHourSep, *_txtMin, *_txtMinSep, *_txtSec, *_txtWeekday, *_txtDay, *_txtMonth, *_txtYear;
54 Timer *_gameTimer, *_zoomInEffectTimer, *_zoomOutEffectTimer, *_dogfightStartTimer;
55 bool _pause, _zoomInEffectDone, _zoomOutEffectDone;
57 std::list<State*> _popups;
58 std::list<DogfightState*> _dogfights, _dogfightsToBeStarted;
59 size_t _minimizedDogfights;
152 void resize(
int &dX,
int &dY);
155 void determineAlienMissions(
bool atGameStart =
false);
157 void setupTerrorMission();
Container for all the information associated with a given user action, like mouse clicks...
Definition: Action.h:34
void btnRotateLeftPress(Action *action)
Handler for pressing the Rotate Left arrow.
Definition: GeoscapeState.cpp:1879
void timeAdvance()
Advances the game timer.
Definition: GeoscapeState.cpp:621
void startDogfight()
Starts a new dogfight.
Definition: GeoscapeState.cpp:2073
void time1Day()
Trigger whenever 1 day passes.
Definition: GeoscapeState.cpp:1465
void time1Hour()
Trigger whenever 1 hour passes.
Definition: GeoscapeState.cpp:1356
Globe * getGlobe() const
Gets the Geoscape globe.
Definition: GeoscapeState.cpp:1776
void btnTimerClick(Action *action)
Handler for clicking the timer button.
Definition: GeoscapeState.cpp:2228
Geoscape screen which shows an overview of the world and lets the player manage the game...
Definition: GeoscapeState.h:43
A game state that receives user input and reacts accordingly.
Definition: State.h:44
void handleDogfights()
Multi-dogfights logic handling.
Definition: GeoscapeState.cpp:2011
Timer used to run code in fixed intervals.
Definition: Timer.h:37
Surface that the user can interact with.
Definition: InteractiveSurface.h:39
void btnUfopaediaClick(Action *action)
Handler for clicking the Ufopaedia button.
Definition: GeoscapeState.cpp:1852
void timerReset()
Resets the timer to minimum speed.
Definition: GeoscapeState.cpp:1751
Interactive globe view of the world.
Definition: Globe.h:44
Text string displayed on screen.
Definition: Text.h:41
void btnFundingClick(Action *action)
Handler for clicking the Funding button.
Definition: GeoscapeState.cpp:1870
void think()
Runs the timer.
Definition: GeoscapeState.cpp:539
void zoomOutEffect()
Globe zoom out effect for dogfights.
Definition: GeoscapeState.cpp:1998
void btnRotateUpPress(Action *action)
Handler for pressing the Rotate Up arrow.
Definition: GeoscapeState.cpp:1915
void btnZoomOutLeftClick(Action *action)
Handler for left-clicking the Zoom Out icon.
Definition: GeoscapeState.cpp:1969
void handleBaseDefense(Base *base, Ufo *ufo)
Handles base defense.
Definition: GeoscapeState.cpp:2126
void btnRotateLeftRelease(Action *action)
Handler for releasing the Rotate Left arrow.
Definition: GeoscapeState.cpp:1888
Represents an alien terror site on the world.
Definition: TerrorSite.h:32
GeoscapeState(Game *game)
Creates the Geoscape state.
Definition: GeoscapeState.cpp:119
void blit()
Blit method - renders the state and dogfights.
Definition: GeoscapeState.cpp:443
void btnBasesClick(Action *action)
Handler for clicking the Bases button.
Definition: GeoscapeState.cpp:1826
void popup(State *state)
Displays a popup window.
Definition: GeoscapeState.cpp:1765
void time30Minutes()
Trigger whenever 30 minutes pass.
Definition: GeoscapeState.cpp:1172
void btnRotateRightRelease(Action *action)
Handler for releasing the Rotate Right arrow.
Definition: GeoscapeState.cpp:1906
void time5Seconds()
Trigger whenever 5 seconds pass.
Definition: GeoscapeState.cpp:680
int minimizedDogfightsCount()
Gets the number of minimized dogfights.
Definition: GeoscapeState.cpp:2057
void time10Minutes()
Trigger whenever 10 minutes pass.
Definition: GeoscapeState.cpp:1025
void btnRotateDownRelease(Action *action)
Handler for releasing the Rotate Down arrow.
Definition: GeoscapeState.cpp:1942
void btnZoomInRightClick(Action *action)
Handler for right-clicking the Zoom In icon.
Definition: GeoscapeState.cpp:1960
void btnGraphsClick(Action *action)
Handler for clicking the Graph button.
Definition: GeoscapeState.cpp:1843
Represents a player base on the globe.
Definition: Base.h:47
void btnInterceptClick(Action *action)
Handler for clicking the Intercept button.
Definition: GeoscapeState.cpp:1817
void btnRotateUpRelease(Action *action)
Handler for releasing the Rotate Up arrow.
Definition: GeoscapeState.cpp:1924
Coloured button with a text label.
Definition: TextButton.h:40
Element that is blit (rendered) onto the screen.
Definition: Surface.h:39
void init()
Updates the palette and timer.
Definition: GeoscapeState.cpp:504
void btnZoomOutRightClick(Action *action)
Handler for right-clicking the Zoom Out icon.
Definition: GeoscapeState.cpp:1978
bool processTerrorSite(TerrorSite *ts) const
Process a terror site.
Definition: GeoscapeState.cpp:1117
void timeDisplay()
Displays the game time/date. (+Funds)
Definition: GeoscapeState.cpp:579
Represents an alien UFO on the map.
Definition: Ufo.h:41
int getFirstFreeDogfightSlot()
Get first free dogfight slot.
Definition: GeoscapeState.cpp:2108
The core of the game engine, manages the game's entire contents and structure.
Definition: Game.h:44
void globeClick(Action *action)
Handler for clicking the globe.
Definition: GeoscapeState.cpp:1787
void time1Month()
Trigger whenever 1 month passes.
Definition: GeoscapeState.cpp:1654
void btnOptionsClick(Action *action)
Handler for clicking the Options button.
Definition: GeoscapeState.cpp:1861
~GeoscapeState()
Cleans up the Geoscape state.
Definition: GeoscapeState.cpp:420
void resize(int &dX, int &dY)
Update the resolution settings, we just resized the window.
Definition: GeoscapeState.cpp:2242
void btnRotateRightPress(Action *action)
Handler for pressing the Rotate Right arrow.
Definition: GeoscapeState.cpp:1897
void btnZoomInLeftClick(Action *action)
Handler for left-clicking the Zoom In icon.
Definition: GeoscapeState.cpp:1951
void zoomInEffect()
Globe zoom in effect for dogfights.
Definition: GeoscapeState.cpp:1986
void btnRotateDownPress(Action *action)
Handler for pressing the Rotate Down arrow.
Definition: GeoscapeState.cpp:1933
void handle(Action *action)
Handle keypresses.
Definition: GeoscapeState.cpp:455