Advanced Strategic Command
|
#include "ai/ai.h"
#include "loaders.h"
#include "dlg_box.h"
#include "strtmesg.h"
#include "sg.h"
#include "viewcalculation.h"
#include "replay.h"
#include "messagedlg.h"
#include "researchexecution.h"
#include "resourcenet.h"
#include "mapimageexport.h"
#include "soundList.h"
#include "turncontrol.h"
#include "stdio-errorhandler.h"
#include "autotraining.h"
#include "actiontest.h"
#include "movementtest.h"
#include "attacktest.h"
#include "ai-move1.h"
#include "viewtest.h"
#include "ai-service1.h"
#include "transfercontroltest.h"
#include "recyclingtest.h"
#include "researchtest.h"
#include "applicationstarter.h"
#include "diplomacytest.h"
#include "objectconstructiontest.h"
#include "eventtest.h"
#include "gameeventsystem.h"
#include "jumptest.h"
#include "testversionidentifier.h"
#include "streamencoding.h"
#include "tasks/taskcontainer.h"
#include "maptest.h"
#include "repairtest.h"
#include "clparser/asc.cpp"
Go to the source code of this file.
Functions | |
void | viewcomp (Player &player) |
void | hookGuiToMap (GameMap *map) |
bool | loadGameFromFile (const ASCString &filename) |
void | runUnitTests () |
void | checkGameEvents (GameMap *map, const Command &command) |
int | runTester () |
static void | __runResearch (Player &player) |
void | deployMapPlayingHooks (GameMap *map) |
void | executeUserAction (tuseractions action) |
void | execUserAction_ev (tuseractions action) |
int | main (int argc, char *argv[]) |
|
static |
Definition at line 152 of file main.cpp.
References runResearch().
Referenced by deployMapPlayingHooks().
Definition at line 99 of file main.cpp.
References checkevents(), and checktimedevents().
void deployMapPlayingHooks | ( | GameMap * | map | ) |
Definition at line 156 of file main.cpp.
References __runResearch(), initReplayLogging(), GameMap::sigPlayerTurnBegins, and transfer_all_outstanding_tribute().
Referenced by main().
void execUserAction_ev | ( | tuseractions | action | ) |
Definition at line 171 of file main.cpp.
Referenced by showMovementRange(), showTerrainInfo(), showUnitInfo(), showUnitWeight(), and showWeaponRange().
void executeUserAction | ( | tuseractions | action | ) |
Definition at line 170 of file main.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().
void hookGuiToMap | ( | GameMap * | map | ) |
Definition at line 53 of file main.cpp.
References checkForNewResearch(), checkforreplay(), checkJournal(), checkUsedASCVersions(), GameMap::getGuiHooked(), GameMap::guiHooked(), positionCursor(), repaintMap, runPendingTasks(), GameMap::sigPlayerTurnHasEnded, GameMap::sigPlayerUserInteractionBegins, GameMap::sigPlayerUserInteractionEnds, updateFieldInfo, viewcomp(), viewOwnReplay(), and viewunreadmessages().
bool loadGameFromFile | ( | const ASCString & | filename | ) |
Definition at line 71 of file main.cpp.
References actmap, GameMap::ReplayInfo::actmemstream, GameMap::actplayer, tnstream::appending, computeview(), displaymessage2(), GameMap::ReplayInfo::guidata, hookGuiToMap(), GameMap::levelfinished, tsavegameloaders::loadGameFromFile(), mapLoadingExceptionChecker(), GameMap::replayinfo, and tnstream::writing.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 174 of file main.cpp.
References ar, deployMapPlayingHooks(), exit_asc(), fatalError(), ActionResult::getCode(), ASCmsgException::getMessage(), ActionResult::getMessage(), getstartupmessage(), initFileIO(), tspfldloaders::mapLoaded, TaskContainer::registerHooks(), and runTester().
int runTester | ( | ) |
Definition at line 106 of file main.cpp.
References automaticTrainig(), displayLogMessage(), errorMessage(), fatalError(), tfileerror::getFileName(), ASCmsgException::getMessage(), tvirtualscreenbuf::init(), loaddata(), loadpalette(), runUnitTests(), GameMap::sigPlayerTurnEndsStatic, suppressMapTriggerExecution, and virtualscreenbuf.
Referenced by main().
void runUnitTests | ( | ) |
Definition at line 77 of file main.cpp.
References testActions(), testAiMovement(), testAiService(), testAttack(), testDiplomacy(), testEvents(), testJumpdrive(), testMovement(), testObjectConstruction(), testRecycling(), testResearch(), testStreamEncoding(), testTransferControl(), testUnitRepair(), testVersionIdentifier(), and testView().
Referenced by runTester().
void viewcomp | ( | Player & | player | ) |
Definition at line 48 of file main.cpp.
References computeview(), and Player::getParentMap().
Referenced by hookGuiToMap().