Advanced Strategic Command
Enumerations | Functions
sg.h File Reference

Interface for various global functions and variables. More...

#include "actions/context.h"
Include dependency graph for sg.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  tuseractions {
  act_end, act_help, act_seteditmode, act_selbodentyp,
  act_selbodentypAll, act_selunit, act_selcolor, act_selbuilding,
  act_selobject, act_selobjectAll, act_selmine, act_selweather,
  act_setupalliances, act_setupplayers, act_toggleresourcemode, act_changeunitdir,
  act_asc_resource, act_maptopcx, act_loadmap, act_changeplayers,
  act_newmap, act_polymode, act_repaintdisplay, act_unitinfo,
  act_viewmap, act_about, act_createresources, act_changecargo,
  act_changeresources, act_changeterraindir, act_events, act_fillmode,
  act_mapgenerator, act_setactivefieldvals, act_deletething, act_showpalette,
  act_changeminestrength, act_changemapvals, act_changeproduction, act_savemap,
  act_changeunitvals, act_mirrorcursorx, act_mirrorcursory, act_placemine,
  act_placething, act_deleteunit, act_deletebuilding, act_deleteobject,
  act_deletetopmostobject, act_deleteallobjects, act_deletemine, act_aboutbox,
  act_savemapas, act_endpolyfieldmode, act_smoothcoasts, act_import_bi_map,
  act_seperator, act_bi_resource, act_resizemap, act_insert_bi_map,
  act_setzoom, act_movebuilding, act_setactweatherglobal, act_setmapparameters,
  act_terraininfo, act_setunitfilter, act_selectgraphicset, act_unitsettransformation,
  act_unitSetInformation, act_switchmaps, act_transformMap, act_editArchivalInformation,
  act_displayResourceComparison, act_specifyunitproduction, act_pasteFromClipboard, act_copyToClipboard,
  act_cutToClipboard, act_saveClipboard, act_readClipBoard, act_setTurnNumber,
  act_showPipeNet, act_editResearch, act_editResearchPoints, act_generateTechTree,
  act_editTechAdapter, act_resetPlayerData, act_createresources2, act_setactnewweather,
  act_primaryAction, act_playerStrengthSummary, act_increase_zoom, act_decrease_zoom,
  act_editpreferences, act_clearresources, act_dumpBuilding, act_dumpVehicle,
  act_dumpObject, act_pbpstatistics, act_exchangeGraphics, act_openControlPanel,
  act_releaseControlPanel, act_dumpAllVehicleDefinitions, act_clearSelection, act_dumpAllBuildings,
  act_locateItemByID, act_mirrorMap, act_copyArea, act_pasteArea,
  asc_nullPointerCrash, asc_testFunction, act_unitGuideDialog, act_runLuaScript,
  act_runTranslationScript, act_dumpAllTerrain, act_dumpAllObjects, act_showweapnrange,
  ua_repainthard, ua_repaint, ua_help, ua_mainmenu,
  ua_mntnc_morefog, ua_mntnc_lessfog, ua_mntnc_morewind, ua_mntnc_lesswind,
  ua_mntnc_rotatewind, ua_changeresourceview, ua_benchgamewv, ua_benchgamewov,
  ua_viewterraininfo, ua_unitweightinfo, ua_writemaptopcx, ua_writescreentopcx,
  ua_changepassword, ua_gamepreferences, ua_bi3preferences, ua_exitgame,
  ua_loadgame, ua_savegame, ua_setupalliances, ua_settribute,
  ua_giveunitaway, ua_vehicleinfo, ua_researchinfo, ua_newmessage,
  ua_viewqueuedmessages, ua_viewsentmessages, ua_viewreceivedmessages, ua_viewjournal,
  ua_editjournal, ua_viewaboutmessage, ua_continuenetworkgame, ua_toggleunitshading,
  ua_computerturn, ua_setupnetwork, ua_howtostartpbem, ua_howtocontinuepbem,
  ua_selectgraphicset, ua_UnitSetInfo, ua_GameParameterInfo, ua_GameStatus,
  ua_viewunitweaponrange, ua_viewunitmovementrange, ua_aibench, ua_networksupervisor,
  ua_selectPlayList, ua_soundDialog, ua_reloadDlgTheme, ua_showPlayerSpeed,
  ua_statisticdialog, ua_viewPipeNet, ua_cancelResearch, ua_showResearchStatus,
  ua_exportUnitToFile, ua_viewButtonPanel, ua_viewWindPanel, ua_clearImageCache,
  ua_viewUnitInfoPanel, ua_cargosummary, ua_viewUnitInfoDialog, ua_showsearchdirs,
  ua_viewOverviewMapPanel, ua_weathercast, ua_newGame, ua_testMessages,
  ua_viewMapControlPanel, ua_unitsummary, ua_togglesound, ua_increase_zoom,
  ua_decrease_zoom, ua_editPlayerData, ua_SDLinfo, ua_visibilityInfo,
  ua_locatefile, ua_viewfont, ua_resourceAnalysis, ua_unitproductionanalysis,
  ua_continuerecentnetworkgame, ua_gotoPosition, ua_loadrecentgame, ua_showTechAdapter,
  ua_showUnitEndurance, ua_getMemoryFootprint, ua_viewlayerhelp, ua_showCargoLayer,
  ua_showMiningPower, ua_emailOptions, ua_createReminder, ua_undo,
  ua_redo, ua_writeLuaCommands, ua_runLuaCommands, ua_recompteview,
  ua_unitGuideDialog, ua_turnUnitLeft, ua_turnUnitRight, ua_chooseTechnology,
  ua_actionManager, ua_viewReactionfireOverlay, ua_unitAiOptions, ua_showUsedPackages,
  ua_runOpenTasks, ua_taskManager, ua_viewUnitinfoOverlay, ua_viewUnitexperienceOverlay,
  ua_createUnitCostList, ua_eventInfo
}
 

Functions

void executeUserAction (tuseractions action)
 
void hookGuiToMap (GameMap *map)
 
bool loadGame (bool mostrecent)
 
bool loadGameFromFile (const ASCString &filename)
 
void saveGame (bool as)
 
bool continueAndStartMultiplayerGame (bool mostRecent)
 
void changePassword ()
 
Context createContext (GameMap *gamemap)
 

Detailed Description

Interface for various global functions and variables.

Definition in file sg.h.

Enumeration Type Documentation

Enumerator
act_end 
act_help 
act_seteditmode 
act_selbodentyp 
act_selbodentypAll 
act_selunit 
act_selcolor 
act_selbuilding 
act_selobject 
act_selobjectAll 
act_selmine 
act_selweather 
act_setupalliances 
act_setupplayers 
act_toggleresourcemode 
act_changeunitdir 
act_asc_resource 
act_maptopcx 
act_loadmap 
act_changeplayers 
act_newmap 
act_polymode 
act_repaintdisplay 
act_unitinfo 
act_viewmap 
act_about 
act_createresources 
act_changecargo 
act_changeresources 
act_changeterraindir 
act_events 
act_fillmode 
act_mapgenerator 
act_setactivefieldvals 
act_deletething 
act_showpalette 
act_changeminestrength 
act_changemapvals 
act_changeproduction 
act_savemap 
act_changeunitvals 
act_mirrorcursorx 
act_mirrorcursory 
act_placemine 
act_placething 
act_deleteunit 
act_deletebuilding 
act_deleteobject 
act_deletetopmostobject 
act_deleteallobjects 
act_deletemine 
act_aboutbox 
act_savemapas 
act_endpolyfieldmode 
act_smoothcoasts 
act_import_bi_map 
act_seperator 
act_bi_resource 
act_resizemap 
act_insert_bi_map 
act_setzoom 
act_movebuilding 
act_setactweatherglobal 
act_setmapparameters 
act_terraininfo 
act_setunitfilter 
act_selectgraphicset 
act_unitsettransformation 
act_unitSetInformation 
act_switchmaps 
act_transformMap 
act_editArchivalInformation 
act_displayResourceComparison 
act_specifyunitproduction 
act_pasteFromClipboard 
act_copyToClipboard 
act_cutToClipboard 
act_saveClipboard 
act_readClipBoard 
act_setTurnNumber 
act_showPipeNet 
act_editResearch 
act_editResearchPoints 
act_generateTechTree 
act_editTechAdapter 
act_resetPlayerData 
act_createresources2 
act_setactnewweather 
act_primaryAction 
act_playerStrengthSummary 
act_increase_zoom 
act_decrease_zoom 
act_editpreferences 
act_clearresources 
act_dumpBuilding 
act_dumpVehicle 
act_dumpObject 
act_pbpstatistics 
act_exchangeGraphics 
act_openControlPanel 
act_releaseControlPanel 
act_dumpAllVehicleDefinitions 
act_clearSelection 
act_dumpAllBuildings 
act_locateItemByID 
act_mirrorMap 
act_copyArea 
act_pasteArea 
asc_nullPointerCrash 
asc_testFunction 
act_unitGuideDialog 
act_runLuaScript 
act_runTranslationScript 
act_dumpAllTerrain 
act_dumpAllObjects 
act_showweapnrange 
ua_repainthard 
ua_repaint 
ua_help 
ua_mainmenu 
ua_mntnc_morefog 
ua_mntnc_lessfog 
ua_mntnc_morewind 
ua_mntnc_lesswind 
ua_mntnc_rotatewind 
ua_changeresourceview 
ua_benchgamewv 
ua_benchgamewov 
ua_viewterraininfo 
ua_unitweightinfo 
ua_writemaptopcx 
ua_writescreentopcx 
ua_changepassword 
ua_gamepreferences 
ua_bi3preferences 
ua_exitgame 
ua_loadgame 
ua_savegame 
ua_setupalliances 
ua_settribute 
ua_giveunitaway 
ua_vehicleinfo 
ua_researchinfo 
ua_newmessage 
ua_viewqueuedmessages 
ua_viewsentmessages 
ua_viewreceivedmessages 
ua_viewjournal 
ua_editjournal 
ua_viewaboutmessage 
ua_continuenetworkgame 
ua_toggleunitshading 
ua_computerturn 
ua_setupnetwork 
ua_howtostartpbem 
ua_howtocontinuepbem 
ua_selectgraphicset 
ua_UnitSetInfo 
ua_GameParameterInfo 
ua_GameStatus 
ua_viewunitweaponrange 
ua_viewunitmovementrange 
ua_aibench 
ua_networksupervisor 
ua_selectPlayList 
ua_soundDialog 
ua_reloadDlgTheme 
ua_showPlayerSpeed 
ua_statisticdialog 
ua_viewPipeNet 
ua_cancelResearch 
ua_showResearchStatus 
ua_exportUnitToFile 
ua_viewButtonPanel 
ua_viewWindPanel 
ua_clearImageCache 
ua_viewUnitInfoPanel 
ua_cargosummary 
ua_viewUnitInfoDialog 
ua_showsearchdirs 
ua_viewOverviewMapPanel 
ua_weathercast 
ua_newGame 
ua_testMessages 
ua_viewMapControlPanel 
ua_unitsummary 
ua_togglesound 
ua_increase_zoom 
ua_decrease_zoom 
ua_editPlayerData 
ua_SDLinfo 
ua_visibilityInfo 
ua_locatefile 
ua_viewfont 
ua_resourceAnalysis 
ua_unitproductionanalysis 
ua_continuerecentnetworkgame 
ua_gotoPosition 
ua_loadrecentgame 
ua_showTechAdapter 
ua_showUnitEndurance 
ua_getMemoryFootprint 
ua_viewlayerhelp 
ua_showCargoLayer 
ua_showMiningPower 
ua_emailOptions 
ua_createReminder 
ua_undo 
ua_redo 
ua_writeLuaCommands 
ua_runLuaCommands 
ua_recompteview 
ua_unitGuideDialog 
ua_turnUnitLeft 
ua_turnUnitRight 
ua_chooseTechnology 
ua_actionManager 
ua_viewReactionfireOverlay 
ua_unitAiOptions 
ua_showUsedPackages 
ua_runOpenTasks 
ua_taskManager 
ua_viewUnitinfoOverlay 
ua_viewUnitexperienceOverlay 
ua_createUnitCostList 
ua_eventInfo 

Definition at line 32 of file sg.h.

Function Documentation

void changePassword ( )
bool continueAndStartMultiplayerGame ( bool  mostRecent)
Context createContext ( GameMap gamemap)

Definition at line 25 of file contextutils.cpp.

References Context::actingPlayer, Context::actionContainer, GameMap::actions, GameMap::actplayer, Context::display, Context::gamemap, getDefaultMapDisplay(), GameMap::getPlayer(), GameMap::getPlayerView(), Context::parentAction, and Context::viewingPlayer.

Referenced by buildProductionLine(), cancelResearch(), cargoUnitMove(), constructBuilding(), constructUnit(), GuiFunctions::MovementBase::execute(), GuiFunctions::AttackGui::execute(), CargoGuiFunctions::UnitProduction::execute(), CargoGuiFunctions::UnitTraining::execute(), CargoGuiFunctions::RefuelUnitCommand::execute(), CargoGuiFunctions::RepairUnit::execute(), CargoGuiFunctions::MoveUnitUp::execute(), CargoGuiFunctions::MoveUnitIntoInnerContainer::execute(), CargoGuiFunctions::RecycleUnitCommandButton::execute(), CargoGuiFunctions::TransferUnitControl::execute(), GuiFunctions::PowerSwitch::execute(), ChangeDiplomaticStatus::execute(), GuiFunctions::DestructBuilding::execute(), GuiFunctions::EnableReactionfire::execute(), GuiFunctions::DisableReactionfire::execute(), GuiFunctions::JumpDriveIcon::execute(), GuiFunctions::RepairUnit::execute(), GuiFunctions::RefuelUnitCommand::execute(), GuiFunctions::PutMineStage2::execute(), GuiFunctions::RemoveMine::execute(), GuiFunctions::ObjectBuildingGui::execute(), GuiFunctions::BuildVehicleCommand::execute(), GuiFunctions::ConstructBuilding::execute(), GuiFunctions::SelfDestructIcon::execute(), executeUserAction(), ChooseTech::ok(), InternalAmmoTransferHandler::performTransfer(), putMineFunc(), recycleUnit(), redo(), removeMineFunc(), removeProductionLine(), VehicleProduction_SelectionWindow::removeProductionLine(), renameContainer(), BuildingControlWindow::repair(), repairBuilding(), repairUnit(), selfDestruct(), serviceCommand(), setDiplomacy(), setResearchGoal(), setResourceProcessingRate(), trainUnit(), transferControl(), undo(), unitAttack(), unitDestructBuilding(), unitJump(), unitMovement(), unitPowerGenerationEnable(), unitPutObject(), unitReactionFireEnable(), and AddProductionLine_SelectionItemFactory::vehicleTypeSelected().

void executeUserAction ( tuseractions  action)

Definition at line 759 of file sg.cpp.

References actionManager(), Research::activetechnology, actmap, GameMap::actplayer, Player::ai, SoundSystem::areEffectsMuted(), benchgame(), bi3preferences(), ASC_MainScreenWidget::ButtonPanel, ActionRegistry::CancelResearchCommand, ContainerBase::cargoWeight(), cgp_disableUnitTransfer, changePassword(), MapDisplayPG::changeZoom(), choice_dlg(), choiceDialog(), chooseTechnologyIfAvail(), IconRepository::clear(), computeview(), continueAndStartMultiplayerGame(), createContext(), createUnitCostList(), Research::developedTechnologies, Player::diplomacy, displayActionError(), displaymap(), displaymessage(), displaymessage2(), tdialogbox::done(), editAlliances(), editEmailOptions(), editGameOptions(), editjournal(), editPlayerData(), MessagingHubBase::Error, MessagingHubBase::FatalError, fieldVisibility(), fieldvisiblenow(), GameDialog::gameDialog(), GameMap::getCurrentPlayer(), GameMap::getCursor(), getDefaultMapDisplay(), GameMap::getField(), GameMap::getgameparameter(), SoundSystem::getInstance(), MainScreenWidget::getMapDisplay(), getnextfilenumname(), ContainerBase::getOwner(), getPGApplication(), Research::getResearchPerTurn(), getSelectedField(), DiplomaticStateVector::getState(), giveunitaway(), help(), helpAbout(), MessagingHubBase::InfoMessage, infoMessage(), tviewanytext::init(), CGameOptions::Instance(), Research::listTriggeredTechAdapter(), loadGame(), locateFile(), mainScreenWidget, maintainencecheck(), ASC_MainScreenWidget::MapControl, mouseparams, GameTime::move(), Technology::name, networksupervisor(), newmessage(), newreminder(), Player::oldmessage, ASC_MainScreenWidget::OverviewMap, SoundSystem::pauseMusic(), PEACE_SV, GameMap::player, Research::progress, ASC_PG_App::Quit(), redo(), releasetimeslice(), ASC_PG_App::reloadTheme(), repaintDisplay, repaintMap, Player::research, researchinfo(), Technology::researchpoints, resourceAnalysis(), SoundSystem::resumeMusic(), tviewanytext::run(), BaseAI::run(), GotoPosition::RunModal(), ASC_PG_Dialog::RunModal(), runOpenTasks(), saveGame(), savegame(), selectAndRunLuaScript(), selectgraphicset(), selectPlayList(), Player::sentmessage, CGameOptions::setChanged(), SoundSystem::setEffectsMute(), settributepayments(), showCargoSummary(), showGameParameters(), showMemoryFootprint(), ASC_MainScreenWidget::showMovementRange(), showPlayerTime(), showSDLInfo(), showSearchPath(), showUnitAiProperties(), showUnitEndurance(), showUnitSummary(), showUsedPackages(), ASC_MainScreenWidget::showWeaponRange(), soundSettings(), ASC_MainScreenWidget::spawnPanel(), startMultiplayerGame(), statisticDialog(), strrr(), ActionResult::successful(), taskManager(), tmousesettings::taste, technologyRepository, GameMap::time, MainScreenWidget::toggleMapLayer(), MapDisplayPG::toggleMapLayer(), ASCString::toString(), GameTime::turn(), Vehicle::typ, ua_actionManager, ua_aibench, ua_benchgamewov, ua_benchgamewv, ua_bi3preferences, ua_cancelResearch, ua_cargosummary, ua_changepassword, ua_changeresourceview, ua_chooseTechnology, ua_clearImageCache, ua_computerturn, ua_continuenetworkgame, ua_continuerecentnetworkgame, ua_createReminder, ua_createUnitCostList, ua_decrease_zoom, ua_editjournal, ua_editPlayerData, ua_emailOptions, ua_eventInfo, ua_exitgame, ua_exportUnitToFile, ua_GameParameterInfo, ua_gamepreferences, ua_GameStatus, ua_getMemoryFootprint, ua_giveunitaway, ua_gotoPosition, ua_help, ua_howtocontinuepbem, ua_howtostartpbem, ua_increase_zoom, ua_loadgame, ua_loadrecentgame, ua_locatefile, ua_mainmenu, ua_networksupervisor, ua_newGame, ua_newmessage, ua_recompteview, ua_redo, ua_reloadDlgTheme, ua_repaint, ua_repainthard, ua_researchinfo, ua_resourceAnalysis, ua_runLuaCommands, ua_runOpenTasks, ua_savegame, ua_SDLinfo, ua_selectgraphicset, ua_selectPlayList, ua_settribute, ua_setupalliances, ua_setupnetwork, ua_showCargoLayer, ua_showMiningPower, ua_showPlayerSpeed, ua_showResearchStatus, ua_showsearchdirs, ua_showTechAdapter, ua_showUnitEndurance, ua_showUsedPackages, ua_soundDialog, ua_statisticdialog, ua_taskManager, ua_testMessages, ua_togglesound, ua_toggleunitshading, ua_undo, ua_unitAiOptions, ua_unitGuideDialog, ua_unitproductionanalysis, ua_UnitSetInfo, ua_unitsummary, ua_unitweightinfo, ua_vehicleinfo, ua_viewaboutmessage, ua_viewButtonPanel, ua_viewfont, ua_viewjournal, ua_viewlayerhelp, ua_viewMapControlPanel, ua_viewOverviewMapPanel, ua_viewPipeNet, ua_viewqueuedmessages, ua_viewReactionfireOverlay, ua_viewreceivedmessages, ua_viewsentmessages, ua_viewterraininfo, ua_viewUnitexperienceOverlay, ua_viewUnitinfoOverlay, ua_viewUnitInfoPanel, ua_viewunitmovementrange, ua_viewunitweaponrange, ua_viewWindPanel, ua_visibilityInfo, ua_weathercast, ua_writeLuaCommands, ua_writemaptopcx, ua_writescreentopcx, undo(), unitGuideWindow(), ASC_MainScreenWidget::UnitInfo, unitInfoDialog(), unitProductionAnalysis(), CGameOptions::units_gray_after_move, GameMap::unsentmessage, updateFieldInfo, MapField::vehicle, viewChanged, viewEventInfo(), viewFont(), viewjournal(), viewmessages(), viewMiningPower(), viewterraininfo(), viewUnitSetinfo(), visible_all, MessagingHubBase::Warning, warningMessage(), weathercast(), VehicleType::weight, Vehicle::weight(), ASC_MainScreenWidget::WindInfo, writeLuaCommands(), writemaptopcx(), and writepcx().

Referenced by GameDialog::eventKeyDown(), ASC_MainScreenWidget::eventKeyDown(), Menu::execAction(), and GuiFunctions::UnitInfo::execute().

void hookGuiToMap ( GameMap map)
bool loadGame ( bool  mostrecent)
bool loadGameFromFile ( const ASCString filename)
void saveGame ( bool  as)