20 #include "../Engine/State.h" 29 class InteractiveSurface;
36 class RuleMissionScript;
45 Surface *_bg, *_sideLine, *_sidebar;
47 TextButton *_btnIntercept, *_btnBases, *_btnGraphs, *_btnUfopaedia, *_btnOptions, *_btnFunding;
49 TextButton *_btn5Secs, *_btn1Min, *_btn5Mins, *_btn30Mins, *_btn1Hour, *_btn1Day;
51 InteractiveSurface *_btnRotateLeft, *_btnRotateRight, *_btnRotateUp, *_btnRotateDown, *_btnZoomIn, *_btnZoomOut;
52 Text *_txtFunds, *_txtHour, *_txtHourSep, *_txtMin, *_txtMinSep, *_txtSec, *_txtWeekday, *_txtDay, *_txtMonth, *_txtYear;
53 Timer *_gameTimer, *_zoomInEffectTimer, *_zoomOutEffectTimer, *_dogfightStartTimer, *_dogfightTimer;
54 bool _pause, _zoomInEffectDone, _zoomOutEffectDone;
56 std::list<State*> _popups;
57 std::list<DogfightState*> _dogfights, _dogfightsToBeStarted;
58 size_t _minimizedDogfights;
151 void resize(
int &dX,
int &dY);
154 void determineAlienMissions();
157 bool buttonsDisabled();
Container for all the information associated with a given user action, like mouse clicks...
Definition: Action.h:32
void btnRotateLeftPress(Action *action)
Handler for pressing the Rotate Left arrow.
Definition: GeoscapeState.cpp:1958
void timeAdvance()
Advances the game timer.
Definition: GeoscapeState.cpp:630
void startDogfight()
Starts a new dogfight.
Definition: GeoscapeState.cpp:2166
void time1Day()
Trigger whenever 1 day passes.
Definition: GeoscapeState.cpp:1534
void time1Hour()
Trigger whenever 1 hour passes.
Definition: GeoscapeState.cpp:1409
void btnTimerClick(Action *action)
Handler for clicking the timer button.
Definition: GeoscapeState.cpp:2653
Geoscape screen which shows an overview of the world and lets the player manage the game...
Definition: GeoscapeState.h:42
A game state that receives user input and reacts accordingly.
Definition: State.h:43
void handleDogfights()
Multi-dogfights logic handling.
Definition: GeoscapeState.cpp:2090
Timer used to run code in fixed intervals.
Definition: Timer.h:35
Surface that the user can interact with.
Definition: InteractiveSurface.h:37
Represents an alien mission site on the world.
Definition: MissionSite.h:33
void btnUfopaediaClick(Action *action)
Handler for clicking the Ufopaedia button.
Definition: GeoscapeState.cpp:1919
void timerReset()
Resets the timer to minimum speed.
Definition: GeoscapeState.cpp:1802
Interactive globe view of the world.
Definition: Globe.h:43
Text string displayed on screen.
Definition: Text.h:40
void btnFundingClick(Action *action)
Handler for clicking the Funding button.
Definition: GeoscapeState.cpp:1945
void think()
Runs the timer.
Definition: GeoscapeState.cpp:549
void zoomOutEffect()
Globe zoom out effect for dogfights.
Definition: GeoscapeState.cpp:2077
void btnRotateUpPress(Action *action)
Handler for pressing the Rotate Up arrow.
Definition: GeoscapeState.cpp:1994
void btnZoomOutLeftClick(Action *action)
Handler for left-clicking the Zoom Out icon.
Definition: GeoscapeState.cpp:2048
void handleBaseDefense(Base *base, Ufo *ufo)
Handles base defense.
Definition: GeoscapeState.cpp:2220
void btnRotateLeftRelease(Action *action)
Handler for releasing the Rotate Left arrow.
Definition: GeoscapeState.cpp:1967
void blit()
Blit method - renders the state and dogfights.
Definition: GeoscapeState.cpp:413
GeoscapeState()
Creates the Geoscape state.
Definition: GeoscapeState.cpp:115
void btnBasesClick(Action *action)
Handler for clicking the Bases button.
Definition: GeoscapeState.cpp:1885
void popup(State *state)
Displays a popup window.
Definition: GeoscapeState.cpp:1816
void time30Minutes()
Trigger whenever 30 minutes pass.
Definition: GeoscapeState.cpp:1225
void btnRotateRightRelease(Action *action)
Handler for releasing the Rotate Right arrow.
Definition: GeoscapeState.cpp:1985
void time5Seconds()
Trigger whenever 5 seconds pass.
Definition: GeoscapeState.cpp:690
int minimizedDogfightsCount()
Gets the number of minimized dogfights.
Definition: GeoscapeState.cpp:2150
void time10Minutes()
Trigger whenever 10 minutes pass.
Definition: GeoscapeState.cpp:1075
void btnRotateDownRelease(Action *action)
Handler for releasing the Rotate Down arrow.
Definition: GeoscapeState.cpp:2021
void btnZoomInRightClick(Action *action)
Handler for right-clicking the Zoom In icon.
Definition: GeoscapeState.cpp:2039
bool processMissionSite(MissionSite *site) const
Process a mission site.
Definition: GeoscapeState.cpp:1165
void btnGraphsClick(Action *action)
Handler for clicking the Graph button.
Definition: GeoscapeState.cpp:1906
Represents a player base on the globe.
Definition: Base.h:45
void btnInterceptClick(Action *action)
Handler for clicking the Intercept button.
Definition: GeoscapeState.cpp:1872
void btnRotateUpRelease(Action *action)
Handler for releasing the Rotate Up arrow.
Definition: GeoscapeState.cpp:2003
Coloured button with a text label.
Definition: TextButton.h:38
Element that is blit (rendered) onto the screen.
Definition: Surface.h:36
void init()
Updates the palette and timer.
Definition: GeoscapeState.cpp:498
Definition: RuleMissionScript.h:30
void btnZoomOutRightClick(Action *action)
Handler for right-clicking the Zoom Out icon.
Definition: GeoscapeState.cpp:2057
void timeDisplay()
Displays the game time/date. (+Funds)
Definition: GeoscapeState.cpp:588
Represents an alien UFO on the map.
Definition: Ufo.h:40
int getFirstFreeDogfightSlot()
Get first free dogfight slot.
Definition: GeoscapeState.cpp:2202
void globeClick(Action *action)
Handler for clicking the globe.
Definition: GeoscapeState.cpp:1838
void time1Month()
Trigger whenever 1 month passes.
Definition: GeoscapeState.cpp:1750
void btnOptionsClick(Action *action)
Handler for clicking the Options button.
Definition: GeoscapeState.cpp:1932
~GeoscapeState()
Cleans up the Geoscape state.
Definition: GeoscapeState.cpp:389
void resize(int &dX, int &dY)
Update the resolution settings, we just resized the window.
Definition: GeoscapeState.cpp:2667
Globe * getGlobe() const
Gets the Geoscape globe.
Definition: GeoscapeState.cpp:1827
void btnRotateRightPress(Action *action)
Handler for pressing the Rotate Right arrow.
Definition: GeoscapeState.cpp:1976
void btnZoomInLeftClick(Action *action)
Handler for left-clicking the Zoom In icon.
Definition: GeoscapeState.cpp:2030
void zoomInEffect()
Globe zoom in effect for dogfights.
Definition: GeoscapeState.cpp:2065
Definition: BaseInfoState.cpp:40
void btnRotateDownPress(Action *action)
Handler for pressing the Rotate Down arrow.
Definition: GeoscapeState.cpp:2012
void handle(Action *action)
Handle keypresses.
Definition: GeoscapeState.cpp:426