#include <string.h>#include <stdlib.h>#include <cstdlib>#include <ctype.h>#include "pgpopupmenu.h"#include "typen.h"#include "basegfx.h"#include "mappolygons.h"#include "misc.h"#include "newfont.h"#include "events.h"#include "loaders.h"#include "dlg_box.h"#include "spfst.h"#include "dialog.h"#include "strtmesg.h"#include "palette.h"#include "mapalgorithms.h"Include dependency graph for edmisc.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Classes | |
| class | tputresources |
| class | tputresourcesdlg |
| class | MapSwitcher |
| The class that manages the switching between the primary map (for editing) and the secondary map (for selecting objects and terrain). More... | |
| class | MapSwitcher::Mappntr |
Functions | |
| bool | mousePressedOnField (const MapCoordinate &pos, const SPoint &mousePos, bool cursorChanged, int button, int prio) |
| bool | mouseDraggedToField (const MapCoordinate &pos, const SPoint &mousePos, bool cursorChanged, int prio) |
| void | setstartvariables (void) |
| void | exchg (int *a1, int *a2) |
| void | k_savemap (char saveas) |
| void | k_loadmap (void) |
| void | lines (int x1, int y, int x2, int y2) |
| void | changeunitvalues (Vehicle *ae) |
| void | changeresource (void) |
| void | changebuildingvalues (Building &b) |
| void | changeminestrength (void) |
| void | newmap (void) |
| void | cargoEditor (ContainerBase *container) |
| void | playerchange (void) |
| void | editpolygon (Poly_gon &poly) |
| MapField * | getactfield () |
| void | selectunitsetfilter (void) |
| void | movebuilding () |
| void | unitsettransformation (void) |
| void | transformMap () |
| replaces the terrain and the objects on a map according to a translation table | |
| void | editArchivalInformation () |
| void | resourceComparison () |
| displays a textmessage comparing the resources of all players | |
| void | unitProductionLimitation () |
| the function to edit the vehicle type that are allowed to be build by units | |
| void | saveClipboard () |
| void | readClipboard () |
| void | setweatherall (int weather) |
| void | editResearch () |
| void | editResearchPoints () |
| void | generateTechTree () |
| void | editTechAdapter () |
| void | placeCurrentItem () |
| bool | removeCurrentItem () |
| void | locateItemByID () |
| void | mirrorMap () |
| void | copyArea () |
| void | pasteArea () |
| void | testDebugFunction () |
| void | selectAndRunLuaScript (const ASCString &filenamewildcard) |
Variables | |
| bool | mapsaved |
| MapSwitcher | mapSwitcher |
| void cargoEditor | ( | ContainerBase * | container | ) |
Definition at line 201 of file cargoeditor.cpp.
References ContainerBase::baseType, and ContainerBaseType::maxLoadableUnits.
Referenced by execaction_pg().
| void changebuildingvalues | ( | Building & | b | ) |
Definition at line 1198 of file edmisc.cpp.
References displaymap(), tdialogbox::done(), BuildingValues::init(), and BuildingValues::run().
Referenced by execaction().
| void changeminestrength | ( | void | ) |
Definition at line 1956 of file edmisc.cpp.
References tdialogbox::done(), getactfield(), tminestrength::init(), and tminestrength::run().
Referenced by execaction().
| void changeresource | ( | void | ) |
Definition at line 1881 of file edmisc.cpp.
References tdialogbox::done(), tres::init(), and tres::run().
Referenced by execaction().
| void changeunitvalues | ( | Vehicle * | ae | ) |
Definition at line 1799 of file edmisc.cpp.
References ae, tdialogbox::done(), UnitPropertyEditor::init(), and UnitPropertyEditor::run().
Referenced by execaction().
| void copyArea | ( | ) |
| void editArchivalInformation | ( | ) |
Definition at line 3370 of file edmisc.cpp.
References actmap, tdialogbox::done(), EditArchivalInformation::init(), and EditArchivalInformation::run().
Referenced by execaction().
| void editpolygon | ( | Poly_gon & | poly | ) |
Definition at line 864 of file edmisc.cpp.
| void editResearch | ( | ) |
Definition at line 3473 of file edmisc.cpp.
References actmap, chooseString(), Research::developedTechnologies, Player::getName(), infoMessage(), ItemFiltrationSystem::isFiltered(), GameMap::player, printTech(), Player::research, strrr(), ItemFiltrationSystem::Technology, and technologyRepository.
Referenced by execaction().
| void editResearchPoints | ( | ) |
Definition at line 3541 of file edmisc.cpp.
References actmap, chooseString(), editInt(), Player::getName(), GameMap::player, Research::progress, Player::research, and strrr().
Referenced by execaction().
| void editTechAdapter | ( | ) |
Definition at line 3664 of file edmisc.cpp.
References actmap, chooseString(), editTechAdapter(), Player::getName(), GameMap::player, and strrr().
| void exchg | ( | int * | a1, | |
| int * | a2 | |||
| ) |
Definition at line 497 of file edmisc.cpp.
| void generateTechTree | ( | ) |
Definition at line 3563 of file edmisc.cpp.
References choice_dlg(), chooseString(), ItemFiltrationSystem::isFiltered(), Technology::name, printTech(), selectFile(), Technology::techDependency, ItemFiltrationSystem::Technology, technologyRepository, TechDependency::writeInvertTreeOutput(), tnstream::writeString(), and tnstream::writing.
Referenced by execaction().
| MapField* getactfield | ( | ) |
Definition at line 3695 of file edmisc.cpp.
References actmap, GameMap::getCursor(), and GameMap::getField().
Referenced by changeminestrength(), execaction(), execaction_pg(), tres::init(), tminestrength::init(), movebuilding(), and CopyMap::paste().
| void k_loadmap | ( | void | ) |
Definition at line 628 of file edmisc.cpp.
References actmap, ASCfilename, cgp_superVisorCanSaveMap, displaymap(), Password::empty(), enterpassword(), GameMap::getgameparameter(), GameMap::getPlayer(), GameMap::getPlayerCount(), tmaploaders::loadmap(), FileTransfer::loadPBEMFile(), mapextension, mapLoadingExceptionChecker(), GameMap::PreferredFilenames::mapname, mapsaved, Player::passwordcrc, GameMap::preferredFileNames, s1, selectFile(), Player::stat, Player::supervisor, GameMap::supervisorpasswordcrc, and tournamentextension.
| void k_savemap | ( | char | saveas | ) |
Definition at line 606 of file edmisc.cpp.
References actmap, displaymap(), mapextension, GameMap::PreferredFilenames::mapname, mapsaved, GameMap::preferredFileNames, savemap(), selectFile(), and tournamentextension.
| void lines | ( | int | x1, | |
| int | y, | |||
| int | x2, | |||
| int | y2 | |||
| ) |
| void locateItemByID | ( | ) |
Definition at line 3793 of file edmisc.cpp.
References ASC_PG_Dialog::RunModal().
Referenced by execaction_pg().
| void mirrorMap | ( | ) |
Definition at line 4170 of file edmisc.cpp.
References actmap, displaymap(), tdialogbox::done(), MirrorMap::init(), mapChanged, and MirrorMap::run().
Referenced by execaction_pg().
| bool mouseDraggedToField | ( | const MapCoordinate & | pos, | |
| const SPoint & | mousePos, | |||
| bool | cursorChanged, | |||
| int | prio | |||
| ) |
Definition at line 102 of file edmisc.cpp.
References act_primaryAction, and execaction_ev().
Referenced by Maped_MainScreenWidget::Maped_MainScreenWidget().
| bool mousePressedOnField | ( | const MapCoordinate & | pos, | |
| const SPoint & | mousePos, | |||
| bool | cursorChanged, | |||
| int | button, | |||
| int | prio | |||
| ) |
Definition at line 90 of file edmisc.cpp.
References act_primaryAction, and execaction_ev().
Referenced by Maped_MainScreenWidget::Maped_MainScreenWidget().
| void movebuilding | ( | ) |
Definition at line 2585 of file edmisc.cpp.
References MapField::building, Building::chainbuildingtofield(), displaymap(), displaymessage(), getactfield(), Building::getEntry(), getfield(), mapsaved, selectfield(), Vehicle::setnewposition(), terrainaccessible(), Building::unchainbuildingfromfield(), MapField::vehicle, warningMessage(), MapCoordinate::x, Vehicle::xpos, MapCoordinate::y, and Vehicle::ypos.
Referenced by execaction().
| void newmap | ( | void | ) |
Definition at line 884 of file edmisc.cpp.
References actmap, createNewMap(), and mapChanged.
Referenced by execaction_pg().
| void pasteArea | ( | ) |
Definition at line 4680 of file edmisc.cpp.
References actmap, copyMap, displaymap(), and mapChanged.
Referenced by execaction_pg().
| void placeCurrentItem | ( | ) |
Definition at line 69 of file edmisc.cpp.
References actmap, SelectionHolder::brushSize, circularFieldIterator(), GameMap::getCursor(), SelectionHolder::getSelection(), mapChanged, Placeable::place(), selection, Placeable::supportMultiFieldPlacement(), MapCoordinate::valid(), and Placeable::vPlace().
Referenced by execaction().
| void playerchange | ( | void | ) |
Definition at line 484 of file edmisc.cpp.
References actmap, tdialogbox::done(), tplayerchange::init(), mapChanged, and tplayerchange::run().
Referenced by execaction().
| void readClipboard | ( | ) |
Definition at line 3421 of file edmisc.cpp.
References clipboardFileExtension, errorMessage(), ASCmsgException::getMessage(), oldClipboardFileExtension, patimat(), tnstream::reading, TextFormatParser::run(), and selectFile().
Referenced by execaction().
| bool removeCurrentItem | ( | ) |
Definition at line 81 of file edmisc.cpp.
References actmap, GameMap::getCursor(), SelectionHolder::getSelection(), Placeable::remove(), selection, and MapCoordinate::valid().
Referenced by execaction().
| void resourceComparison | ( | ) |
displays a textmessage comparing the resources of all players
Definition at line 3378 of file edmisc.cpp.
References GameMap::_resourcemode, actmap, Player::buildingList, displaymessage(), MapField::fuel, Resources::fuel, GameMap::getField(), MapField::material, Resources::material, GameMap::player, Resources::resource(), resourceNames, resourceTypeNum, strrr(), GameMap::xsize, and GameMap::ysize.
Referenced by execaction().
| void saveClipboard | ( | ) |
Definition at line 3444 of file edmisc.cpp.
References clipboardFileExtension, selectFile(), and tnstream::writing.
Referenced by execaction().
| void selectAndRunLuaScript | ( | const ASCString & | filenamewildcard | ) |
Definition at line 4691 of file edmisc.cpp.
References errorMessage(), LuaRunner::getErrors(), LuaRunner::runFile(), selectFile(), and updateFieldInfo.
| void selectunitsetfilter | ( | void | ) |
Definition at line 2702 of file edmisc.cpp.
References displaymessage(), filtersChangedSignal, ItemFiltrationSystem::itemFilters, and ASC_PG_Dialog::RunModal().
Referenced by execaction().
| void setstartvariables | ( | void | ) |
Definition at line 680 of file edmisc.cpp.
References activefontsettings, tfontsettings::color, tfontsettings::font, mapsaved, schriften, and Schriften::smallarial.
Referenced by mapeditorMainThread().
| void setweatherall | ( | int | weather | ) |
Definition at line 3454 of file edmisc.cpp.
References actmap, GameMap::getField(), MapField::setWeather(), GameMap::xsize, and GameMap::ysize.
Referenced by execaction().
| void testDebugFunction | ( | ) |
Definition at line 4714 of file edmisc.cpp.
References MapField::a, actmap, GameMap::cleartemps(), GameMap::getField(), repaintMap, visible_now, GameMap::xsize, and GameMap::ysize.
Referenced by execaction_pg().
| void transformMap | ( | ) |
replaces the terrain and the objects on a map according to a translation table
Definition at line 3018 of file edmisc.cpp.
References actmap, PropertyContainer::addIntegerArray(), PropertyContainer::addStringArray(), Player::buildingList, buildingTypeRepository, calculateallobjects(), cbbuildingentry, Building::chainbuildingtofield(), displaymap(), displaymessage(), PropertyContainer::find(), Building::getEntry(), GameMap::getField(), ASCmsgException::getMessage(), getNeighbouringFieldCoordinate(), GameMap::getPlayer(), GameMap::getPlayerCount(), getTerrainBitType(), objectTypeRepository, Research::predefinedTechAdapter, tnstream::reading, Player::research, TextFormatParser::run(), selectFile(), terrainTypeRepository, transform(), Research::triggeredTechAdapter, Building::typ, Building::unchainbuildingfromfield(), Player::vehicleList, TerrainType::weather, GameMap::xsize, and GameMap::ysize.
Referenced by execaction_pg().
| void unitProductionLimitation | ( | ) |
the function to edit the vehicle type that are allowed to be build by units
| void unitsettransformation | ( | void | ) |
Definition at line 2932 of file edmisc.cpp.
References UnitTypeTransformation::run().
Referenced by execaction().
| bool mapsaved |
Definition at line 65 of file edmisc.cpp.
Referenced by UnitPropertyEditor::buttonpressed(), tres::buttonpressed(), tminestrength::buttonpressed(), EditArchivalInformation::buttonpressed(), execaction(), execaction_pg(), k_loadmap(), k_savemap(), mapeditorMainThread(), movebuilding(), tmapgenerator::setmap(), setSaveNotification(), setstartvariables(), and MapSwitcher::toggle().
Definition at line 3007 of file edmisc.cpp.
Referenced by execaction(), execaction_pg(), main(), and mapeditorMainThread().
1.5.1