#include <sigc++/sigc++.h>
#include "loki/Functor.h"
#include "ascstring.h"
#include "sgstream.h"
#include "messages.h"
#include "graphics/blitter.h"
Include dependency graph for loaders.h:

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

Go to the source code of this file.
Classes | |
| class | tspfldloaders |
| class | tmaploaders |
| class | tgameloaders |
| class | tnetworkloaders |
| class | GameFileInformation |
| class | tsavegameloaders |
| struct | MapConinuationInfo |
Typedefs | |
| typedef Loki::Functor< GameMap *, LOKI_TYPELIST_1(const ASCString &) > | MapLoadingFunction |
Functions | |
| void | savemap (const ASCString &name, GameMap *gamemap) |
| saves the map located in actmap to the map file name | |
| void | savegame (const ASCString &name, GameMap *gamemap) |
| saves the game located in actmap to the savegame file name | |
| GameMap * | mapLoadingExceptionChecker (const ASCString &filename, MapLoadingFunction loader) |
| GameMap * | loadreplay (MemoryStreamStorage *streambuf) |
| void | savereplay (GameMap *gamemap, int num) |
| writes all replay relevant map information of player num to the replay variable of actmap | |
| bool | validatemapfile (const ASCString &filename) |
| checks, whether filename is a valid map file | |
| bool | validatesavfile (const ASCString &filename) |
| checks, whether filename is a valid savegame | |
| bool | validateemlfile (const ASCString &filename) |
| checks, whether filename is a valid email game | |
| MapConinuationInfo | findNextCampaignMap (int id=-1) |
Variables | |
| const int | fileterminator |
| const char * | savegameextension |
| const char * | mapextension |
| const char * | tournamentextension |
| bool | suppressMapTriggerExecution |
| GameMap * | eventLocalizationMap |
| used by setLocalizedEventMessage to get the map being loaded It's not nice having a global variable for that, but we need to persist the data for the Lua callbacks | |
IO for basic types like vehicletype, buildingtype etc which are also used by the small editors are found in sgstream
Definition in file loaders.h.
| typedef Loki::Functor<GameMap*, LOKI_TYPELIST_1(const ASCString&) > MapLoadingFunction |
| MapConinuationInfo findNextCampaignMap | ( | int | id = -1 |
) |
Definition at line 1681 of file loaders.cpp.
References actmapversion, GameMap::Campaign::avail, CharBuf::buf, GameMap::campaign, GameMap::codeWord, MapConinuationInfo::codeword, MapConinuationInfo::filename, fileterminator, tfindfile::getnextname(), GameMap::Campaign::id, mapextension, GameMap::maptitle, minmapversion, tnstream::reading, tnstream::readInt(), tspfldloaders::readmap(), tnstream::readpchar(), tnstream::readWord(), tspfldloaders::spfld, tspfldloaders::stream, and MapConinuationInfo::title.
Referenced by NextCampaignMap::search().
| GameMap* loadreplay | ( | MemoryStreamStorage * | streambuf | ) |
Definition at line 1494 of file loaders.cpp.
References actreplayversion, displaymessage(), tfileerror::getFileName(), tinvalidversion::getMessage(), ASCmsgException::getMessage(), tsavegameloaders::loadgame(), minreplayversion, tnstream::reading, and tnstream::readInt().
Referenced by trunreplay::run().
| GameMap* mapLoadingExceptionChecker | ( | const ASCString & | filename, | |
| MapLoadingFunction | loader | |||
| ) |
Definition at line 1538 of file loaders.cpp.
References displaymessage(), tfileerror::getFileName(), tinvalidversion::getMessage(), and ASCmsgException::getMessage().
Referenced by StartMultiplayerGame::Apply(), continueNetworkGame(), NextCampaignMap::getMap(), k_loadmap(), loadGameFromFile(), loadmap(), mapeditorMainThread(), networksupervisor(), StartMultiplayerGame::start(), and startMap().
saves the game located in actmap to the savegame file name
Definition at line 1455 of file loaders.cpp.
References displaymessage(), tfileerror::getFileName(), and tsavegameloaders::savegame().
Referenced by NextMap::execute(), GuiFunctions::EndTurn::execute(), executeUserAction(), GameMap::read(), and saveGame().
saves the map located in actmap to the map file name
Definition at line 1427 of file loaders.cpp.
References displaymessage(), tfileerror::getFileName(), CGameOptions::Instance(), GameMap::nativeMessageLanguage, tmaploaders::savemap(), writeMessageFile(), and tnstream::writing.
Referenced by editpolygon(), and k_savemap().
| void savereplay | ( | GameMap * | gamemap, | |
| int | num | |||
| ) |
writes all replay relevant map information of player num to the replay variable of actmap
Definition at line 1469 of file loaders.cpp.
References actreplayversion, displaymessage(), fatalError(), GameMap::replayinfo, tsavegameloaders::savegame(), tnstream::writeInt(), and tnstream::writing.
Referenced by initReplayLogging().
| bool validateemlfile | ( | const ASCString & | filename | ) |
checks, whether filename is a valid email game
Definition at line 1614 of file loaders.cpp.
References actnetworkversion, fileterminator, minnetworkversion, tnstream::reading, tnstream::readInt(), tnstream::readpchar(), and tnstream::readWord().
Referenced by loadStartupMap().
| bool validatemapfile | ( | const ASCString & | filename | ) |
checks, whether filename is a valid map file
Definition at line 1578 of file loaders.cpp.
References actmapversion, fileterminator, minmapversion, tnstream::reading, tnstream::readInt(), tnstream::readpchar(), and tnstream::readWord().
Referenced by loadStartupMap().
| bool validatesavfile | ( | const ASCString & | filename | ) |
checks, whether filename is a valid savegame
Definition at line 1647 of file loaders.cpp.
References actsavegameversion, fileterminator, minsavegameversion, tnstream::reading, tnstream::readInt(), tnstream::readpchar(), and tnstream::readWord().
Referenced by loadStartupMap().
used by setLocalizedEventMessage to get the map being loaded It's not nice having a global variable for that, but we need to persist the data for the Lua callbacks
Definition at line 1012 of file loaders.cpp.
Referenced by getLoadingMap(), loadLocalizedMessageFile(), and setLocalizedEventMessage().
| const int fileterminator |
Definition at line 75 of file loaders.cpp.
Referenced by findNextCampaignMap(), tsavegameloaders::loadgame(), tsavegameloaders::loadMapimageFromFile(), tnetworkloaders::loadnwgame(), tsavegameloaders::savegame(), tmaploaders::savemap(), tnetworkloaders::savenwgame(), validateemlfile(), validatemapfile(), and validatesavfile().
| const char* mapextension |
Definition at line 79 of file loaders.cpp.
Referenced by findNextCampaignMap(), k_loadmap(), k_savemap(), loadStartupMap(), mapeditorMainThread(), and StartMultiplayerGame::userHandler().
| const char* savegameextension |
Definition at line 78 of file loaders.cpp.
Referenced by NextMap::execute(), GuiFunctions::EndTurn::execute(), loadGame(), loadStartupMap(), and saveGame().
Definition at line 82 of file loaders.cpp.
Referenced by gamethread(), runTester(), and seteventtriggers().
| const char* tournamentextension |
Definition at line 80 of file loaders.cpp.
Referenced by FileTransfer::constructFileName(), continueNetworkGame(), k_loadmap(), k_savemap(), loadStartupMap(), networksupervisor(), and FileTransfer::send().
1.5.1