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:1960
void timeAdvance()
Advances the game timer.
Definition: GeoscapeState.cpp:631
void startDogfight()
Starts a new dogfight.
Definition: GeoscapeState.cpp:2168
void time1Day()
Trigger whenever 1 day passes.
Definition: GeoscapeState.cpp:1535
void time1Hour()
Trigger whenever 1 hour passes.
Definition: GeoscapeState.cpp:1410
void btnTimerClick(Action *action)
Handler for clicking the timer button.
Definition: GeoscapeState.cpp:2682
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:44
void handleDogfights()
Multi-dogfights logic handling.
Definition: GeoscapeState.cpp:2092
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:1921
void timerReset()
Resets the timer to minimum speed.
Definition: GeoscapeState.cpp:1804
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:1947
void think()
Runs the timer.
Definition: GeoscapeState.cpp:550
void zoomOutEffect()
Globe zoom out effect for dogfights.
Definition: GeoscapeState.cpp:2079
void btnRotateUpPress(Action *action)
Handler for pressing the Rotate Up arrow.
Definition: GeoscapeState.cpp:1996
void btnZoomOutLeftClick(Action *action)
Handler for left-clicking the Zoom Out icon.
Definition: GeoscapeState.cpp:2050
void handleBaseDefense(Base *base, Ufo *ufo)
Handles base defense.
Definition: GeoscapeState.cpp:2222
void btnRotateLeftRelease(Action *action)
Handler for releasing the Rotate Left arrow.
Definition: GeoscapeState.cpp:1969
void blit()
Blit method - renders the state and dogfights.
Definition: GeoscapeState.cpp:414
GeoscapeState()
Creates the Geoscape state.
Definition: GeoscapeState.cpp:116
void btnBasesClick(Action *action)
Handler for clicking the Bases button.
Definition: GeoscapeState.cpp:1887
void popup(State *state)
Displays a popup window.
Definition: GeoscapeState.cpp:1818
void time30Minutes()
Trigger whenever 30 minutes pass.
Definition: GeoscapeState.cpp:1226
void btnRotateRightRelease(Action *action)
Handler for releasing the Rotate Right arrow.
Definition: GeoscapeState.cpp:1987
void time5Seconds()
Trigger whenever 5 seconds pass.
Definition: GeoscapeState.cpp:691
int minimizedDogfightsCount()
Gets the number of minimized dogfights.
Definition: GeoscapeState.cpp:2152
void time10Minutes()
Trigger whenever 10 minutes pass.
Definition: GeoscapeState.cpp:1076
void btnRotateDownRelease(Action *action)
Handler for releasing the Rotate Down arrow.
Definition: GeoscapeState.cpp:2023
void btnZoomInRightClick(Action *action)
Handler for right-clicking the Zoom In icon.
Definition: GeoscapeState.cpp:2041
bool processMissionSite(MissionSite *site) const
Process a mission site.
Definition: GeoscapeState.cpp:1166
void btnGraphsClick(Action *action)
Handler for clicking the Graph button.
Definition: GeoscapeState.cpp:1908
Represents a player base on the globe.
Definition: Base.h:45
void btnInterceptClick(Action *action)
Handler for clicking the Intercept button.
Definition: GeoscapeState.cpp:1874
void btnRotateUpRelease(Action *action)
Handler for releasing the Rotate Up arrow.
Definition: GeoscapeState.cpp:2005
Coloured button with a text label.
Definition: TextButton.h:38
Element that is blit (rendered) onto the screen.
Definition: Surface.h:38
void init()
Updates the palette and timer.
Definition: GeoscapeState.cpp:499
Definition: RuleMissionScript.h:30
void btnZoomOutRightClick(Action *action)
Handler for right-clicking the Zoom Out icon.
Definition: GeoscapeState.cpp:2059
void timeDisplay()
Displays the game time/date. (+Funds)
Definition: GeoscapeState.cpp:589
Represents an alien UFO on the map.
Definition: Ufo.h:40
int getFirstFreeDogfightSlot()
Get first free dogfight slot.
Definition: GeoscapeState.cpp:2204
void globeClick(Action *action)
Handler for clicking the globe.
Definition: GeoscapeState.cpp:1840
void time1Month()
Trigger whenever 1 month passes.
Definition: GeoscapeState.cpp:1752
void btnOptionsClick(Action *action)
Handler for clicking the Options button.
Definition: GeoscapeState.cpp:1934
~GeoscapeState()
Cleans up the Geoscape state.
Definition: GeoscapeState.cpp:390
void resize(int &dX, int &dY)
Update the resolution settings, we just resized the window.
Definition: GeoscapeState.cpp:2696
Globe * getGlobe() const
Gets the Geoscape globe.
Definition: GeoscapeState.cpp:1829
void btnRotateRightPress(Action *action)
Handler for pressing the Rotate Right arrow.
Definition: GeoscapeState.cpp:1978
void btnZoomInLeftClick(Action *action)
Handler for left-clicking the Zoom In icon.
Definition: GeoscapeState.cpp:2032
void zoomInEffect()
Globe zoom in effect for dogfights.
Definition: GeoscapeState.cpp:2067
Definition: BaseInfoState.cpp:40
void btnRotateDownPress(Action *action)
Handler for pressing the Rotate Down arrow.
Definition: GeoscapeState.cpp:2014
void handle(Action *action)
Handle keypresses.
Definition: GeoscapeState.cpp:427