#include <game_controller.h>
Public Member Functions | |
void | setActive () override |
void | keybinder (KeybindingAction action) override |
bool | mousePressed (const Common::Point &mousePos) override |
void | timerFired () override |
void | init () |
void | initScreen () |
void | initScreenWithoutReloadingState () |
void | setMap (Map *map, bool saveLocation, const Portal *portal, TurnCompleter *turnCompleter=nullptr) |
int | exitToParentMap () |
void | finishTurnAfterCombatEnds () override |
void | finishTurn () override |
void | update (Party *party, PartyEvent &event) override |
void | update (Location *location, MoveEvent &event) override |
void | initMoons () |
void | updateMoons (bool showmoongates) |
void | attack (Direction dir=DIR_NONE) |
Public Member Functions inherited from Ultima::Ultima4::Controller | |
Controller (int timerInterval=1) | |
virtual bool | isCombatController () const |
bool | notifyKeyPressed (int key) |
bool | notifyMousePress (const Common::Point &mousePos) |
int | getTimerInterval () |
virtual bool | keyPressed (int key) |
bool | shouldQuit () const |
Static Public Member Functions | |
static void | flashTile (const Coords &coords, MapTile tile, int timeFactor) |
static void | flashTile (const Coords &coords, const Common::String &tilename, int timeFactor) |
static void | doScreenAnimationsWhilePausing (int timeFactor) |
Static Public Member Functions inherited from Ultima::Ultima4::Controller | |
static void | timerCallback (void *data) |
Public Attributes | |
TileView | _mapArea |
bool | _paused |
int | _pausedTimer |
bool | _combatFinished |
The main game controller that handles basic game flow and keypresses.
|
static |
Show an attack flash at x, y on the current map. This is used for 'being hit' or 'being missed' by weapons, cannon fire, spells, etc.
|
overridevirtual |
Called when a controller is made active
Reimplemented from Ultima::Ultima4::Controller.
|
overridevirtual |
Keybinder actions
Reimplemented from Ultima::Ultima4::Controller.
|
overridevirtual |
Mouse button was pressed
Reimplemented from Ultima::Ultima4::Controller.
|
overridevirtual |
This function is called every quarter second.
Reimplemented from Ultima::Ultima4::Controller.
int Ultima::Ultima4::GameController::exitToParentMap | ( | ) |
Exits the current map and location and returns to its parent location This restores all relevant information from the previous location, such as the map, map position, etc. (such as exiting a city)
|
inlineoverridevirtual |
Finishes the game turn after combat ends. It suppresses monster movement to prevent issues, such as infinite combat at the Shrine of Humility
Reimplemented from Ultima::Ultima4::TurnCompleter.
|
overridevirtual |
Terminates a game turn. This performs the post-turn housekeeping tasks like adjusting the party's food, incrementing the number of moves, etc.
Implements Ultima::Ultima4::TurnCompleter.
|
overridevirtual |
Provide feedback to user after a party event happens.
Implements Ultima::Ultima4::Observer< Party *, PartyEvent &>.
|
overridevirtual |
Provide feedback to user after a movement event happens.
Implements Ultima::Ultima4::Observer< Location *, MoveEvent &>.
void Ultima::Ultima4::GameController::initMoons | ( | ) |
Initializes the moon state according to the savegame file. This method of initializing the moons (rather than just setting them directly) is necessary to make sure trammel and felucca stay in sync
void Ultima::Ultima4::GameController::updateMoons | ( | bool | showmoongates | ) |
Updates the phases of the moons and shows the visual moongates on the map, if desired