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();
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:1898
void timeAdvance()
Advances the game timer.
Definition: GeoscapeState.cpp:630
void startDogfight()
Starts a new dogfight.
Definition: GeoscapeState.cpp:2106
void time1Day()
Trigger whenever 1 day passes.
Definition: GeoscapeState.cpp:1524
void time1Hour()
Trigger whenever 1 hour passes.
Definition: GeoscapeState.cpp:1399
void btnTimerClick(Action *action)
Handler for clicking the timer button.
Definition: GeoscapeState.cpp:2593
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:2030
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:1871
void timerReset()
Resets the timer to minimum speed.
Definition: GeoscapeState.cpp:1766
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:1889
void think()
Runs the timer.
Definition: GeoscapeState.cpp:549
void zoomOutEffect()
Globe zoom out effect for dogfights.
Definition: GeoscapeState.cpp:2017
void btnRotateUpPress(Action *action)
Handler for pressing the Rotate Up arrow.
Definition: GeoscapeState.cpp:1934
void btnZoomOutLeftClick(Action *action)
Handler for left-clicking the Zoom Out icon.
Definition: GeoscapeState.cpp:1988
void handleBaseDefense(Base *base, Ufo *ufo)
Handles base defense.
Definition: GeoscapeState.cpp:2160
void btnRotateLeftRelease(Action *action)
Handler for releasing the Rotate Left arrow.
Definition: GeoscapeState.cpp:1907
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:1845
void popup(State *state)
Displays a popup window.
Definition: GeoscapeState.cpp:1780
void time30Minutes()
Trigger whenever 30 minutes pass.
Definition: GeoscapeState.cpp:1215
void btnRotateRightRelease(Action *action)
Handler for releasing the Rotate Right arrow.
Definition: GeoscapeState.cpp:1925
void time5Seconds()
Trigger whenever 5 seconds pass.
Definition: GeoscapeState.cpp:689
int minimizedDogfightsCount()
Gets the number of minimized dogfights.
Definition: GeoscapeState.cpp:2090
void time10Minutes()
Trigger whenever 10 minutes pass.
Definition: GeoscapeState.cpp:1065
void btnRotateDownRelease(Action *action)
Handler for releasing the Rotate Down arrow.
Definition: GeoscapeState.cpp:1961
void btnZoomInRightClick(Action *action)
Handler for right-clicking the Zoom In icon.
Definition: GeoscapeState.cpp:1979
bool processMissionSite(MissionSite *site) const
Process a mission site.
Definition: GeoscapeState.cpp:1155
void btnGraphsClick(Action *action)
Handler for clicking the Graph button.
Definition: GeoscapeState.cpp:1862
Represents a player base on the globe.
Definition: Base.h:45
void btnInterceptClick(Action *action)
Handler for clicking the Intercept button.
Definition: GeoscapeState.cpp:1836
void btnRotateUpRelease(Action *action)
Handler for releasing the Rotate Up arrow.
Definition: GeoscapeState.cpp:1943
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:1997
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:2142
void globeClick(Action *action)
Handler for clicking the globe.
Definition: GeoscapeState.cpp:1802
void time1Month()
Trigger whenever 1 month passes.
Definition: GeoscapeState.cpp:1714
void btnOptionsClick(Action *action)
Handler for clicking the Options button.
Definition: GeoscapeState.cpp:1880
~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:2607
Globe * getGlobe() const
Gets the Geoscape globe.
Definition: GeoscapeState.cpp:1791
void btnRotateRightPress(Action *action)
Handler for pressing the Rotate Right arrow.
Definition: GeoscapeState.cpp:1916
void btnZoomInLeftClick(Action *action)
Handler for left-clicking the Zoom In icon.
Definition: GeoscapeState.cpp:1970
void zoomInEffect()
Globe zoom in effect for dogfights.
Definition: GeoscapeState.cpp:2005
Definition: BaseInfoState.cpp:40
void btnRotateDownPress(Action *action)
Handler for pressing the Rotate Down arrow.
Definition: GeoscapeState.cpp:1952
void handle(Action *action)
Handle keypresses.
Definition: GeoscapeState.cpp:426