#include <algorithm>
#include <cstring>
#include <stdlib.h>
#include <stdio.h>
#include "typen.h"
#include "misc.h"
#include "newfont.h"
#include "buildingtype.h"
#include "vehicletype.h"
#include "spfst.h"
#include "loaders.h"
#include "dlg_box.h"
#include "dialog.h"
#include "sgstream.h"
#include "attack.h"
#include "errors.h"
#include "strtmesg.h"
#include "textfileparser.h"
#include "itemrepository.h"
#include "prehistoricevents.h"
#include "gamemap.h"
#include "gameeventsystem.h"
#include "ai/ai.h"
Include dependency graph for loaders.cpp:

Go to the source code of this file.
Defines | |
| #define | csm_typid32 1 |
| #define | csm_direction 2 |
| #define | csm_vehicle 4 |
| #define | csm_building 8 |
| #define | csm_height 32 |
| #define | csm_cnt2 64 |
| #define | csm_b3 128 |
| #define | csm_material 1 |
| #define | csm_fuel 2 |
| #define | csm_visible 4 |
| #define | csm_weather 16 |
| #define | csm_object 64 |
| #define | csm_b4 128 |
| #define | csm_resources 1 |
| #define | csm_connection 2 |
| #define | csm_newobject 4 |
Functions | |
| void | seteventtriggers (GameMap *actmap) |
| void | checkForUniqueUnitIDs (GameMap *gamemap) |
| void | readLegacyNetworkData (tnstream &stream) |
| void | weatherSystemRequired () |
| void | savemap (const char *name, GameMap *gamemap) |
| saves the map located in actmap to the map file name | |
| void | savegame (const ASCString &name) |
| saves the game located in actmap to the savegame file name | |
| void | savereplay (GameMap *gamemap, int num) |
| writes all replay relevant map information of player num to the replay variable of actmap | |
| GameMap * | loadreplay (tmemorystreambuf *streambuf) |
| GameMap * | mapLoadingExceptionChecker (const ASCString &filename, MapLoadingFunction loader) |
| bool | validatemapfile (const ASCString &filename) |
| checks, whether filename is a valid map file | |
| bool | validateemlfile (const ASCString &filename) |
| checks, whether filename is a valid email game | |
| bool | validatesavfile (const ASCString &filename) |
| checks, whether filename is a valid savegame | |
| MapConinuationInfo | findNextCampaignMap (int id) |
Variables | |
| const int | actsavegameversion = 0xff61 |
| const int | minsavegameversion = 0xff31 |
| const int | actmapversion = 0xfe51 |
| const int | minmapversion = 0xfe24 |
| const int | actnetworkversion = 0x0032 |
| const int | minnetworkversion = 0x0004 |
| const int | actreplayversion = 0x0003 |
| const int | minreplayversion = 0x0001 |
| const int | fileterminator = 0xa01a |
| const char * | savegameextension = "*.sav" |
| const char * | mapextension = "*.map" |
| const char * | tournamentextension = ".ascpbm" |
| const int | messageVersion = 0xabcdf1 |
| const int | messageMinVersion = 0xabcdef |
| const int | objectstreamversion = 3 |
IO for basic types like vehicletype, buildingtype etc which are also used by the small editors are found in sgstream
Definition in file loaders.cpp.
|
|
Definition at line 98 of file loaders.cpp. Referenced by tspfldloaders::readfields(), and tspfldloaders::writefields(). |
|
|
Definition at line 107 of file loaders.cpp. Referenced by tspfldloaders::readfields(), and tspfldloaders::writefields(). |
|
|
Definition at line 95 of file loaders.cpp. Referenced by tspfldloaders::readfields(), and tspfldloaders::writefields(). |
|
|
Definition at line 97 of file loaders.cpp. Referenced by tspfldloaders::readfields(), and tspfldloaders::writefields(). |
|
|
Definition at line 110 of file loaders.cpp. Referenced by tspfldloaders::readfields(), and tspfldloaders::writefields(). |
|
|
Definition at line 93 of file loaders.cpp. Referenced by tspfldloaders::readfields(). |
|
|
Definition at line 101 of file loaders.cpp. Referenced by tspfldloaders::readfields(), and tspfldloaders::writefields(). |
|
|
Definition at line 96 of file loaders.cpp. |
|
|
Definition at line 100 of file loaders.cpp. Referenced by tspfldloaders::readfields(), and tspfldloaders::writefields(). |
|
|
Definition at line 111 of file loaders.cpp. Referenced by tspfldloaders::readfields(), and tspfldloaders::writefields(). |
|
|
Definition at line 106 of file loaders.cpp. Referenced by tspfldloaders::readfields(). |
|
|
Definition at line 109 of file loaders.cpp. Referenced by tspfldloaders::readfields(), and tspfldloaders::writefields(). |
|
|
Definition at line 92 of file loaders.cpp. Referenced by tspfldloaders::readfields(), and tspfldloaders::writefields(). |
|
|
Definition at line 94 of file loaders.cpp. Referenced by tspfldloaders::readfields(), and tspfldloaders::writefields(). |
|
|
Definition at line 102 of file loaders.cpp. Referenced by tspfldloaders::readfields(), and tspfldloaders::writefields(). |
|
|
Definition at line 104 of file loaders.cpp. Referenced by tspfldloaders::readfields(), and tspfldloaders::writefields(). |
|
|
Definition at line 348 of file loaders.cpp. References GameMap::getNewNetworkID(), GameMap::getPlayer(), ASCString::toString(), and warning(). Referenced by tsavegameloaders::loadgame(), tnetworkloaders::loadnwgame(), and tspfldloaders::writemap(). |
|
|
|
Definition at line 1367 of file loaders.cpp. References actreplayversion, displaymessage(), ASCmsgException::getMessage(), tsavegameloaders::loadgame(), minreplayversion, tnstream::reading, and tnstream::readInt(). Referenced by trunreplay::run(). |
|
||||||||||||
|
Definition at line 1412 of file loaders.cpp. References displaymessage(), and ASCmsgException::getMessage(). Referenced by StartMultiplayerGame::Apply(), continuenetworkgame(), NextCampaignMap::getMap(), k_loadmap(), loadGame(), loadmap(), mapeditorMainThread(), networksupervisor(), and StartMultiplayerGame::start(). |
|
|
|
saves the game located in actmap to the savegame file name
Definition at line 1326 of file loaders.cpp. References displaymessage(), and tsavegameloaders::savegame(). Referenced by execuseraction(), GuiFunctions::EndTurn::execute(), NextMap::execute(), GameMap::read(), and saveGame(). |
|
||||||||||||
|
saves the map located in actmap to the map file name
Definition at line 1304 of file loaders.cpp. References displaymessage(), and tmaploaders::savemap(). Referenced by editpolygon(), and k_savemap(). |
|
||||||||||||
|
writes all replay relevant map information of player num to the replay variable of actmap
Definition at line 1341 of file loaders.cpp. References actreplayversion, displaymessage(), fatalError(), GameMap::replayinfo, tsavegameloaders::savegame(), tnstream::writeInt(), and tnstream::writing. Referenced by initReplayLogging(). |
|
|
Definition at line 78 of file loaders.cpp. References GameMap::events, GameMap::player, and Player::queuedEvents. Referenced by tsavegameloaders::loadgame(), and tnetworkloaders::loadnwgame(). |
|
|
checks, whether filename is a valid email game
Definition at line 1486 of file loaders.cpp. References actnetworkversion, fileterminator, minnetworkversion, tnstream::reading, tnstream::readInt(), tnstream::readpchar(), and tnstream::readWord(). Referenced by loadStartupMap(). |
|
|
checks, whether filename is a valid map file
Definition at line 1450 of file loaders.cpp. References actmapversion, fileterminator, minmapversion, tnstream::reading, tnstream::readInt(), tnstream::readpchar(), and tnstream::readWord(). Referenced by loadStartupMap(). |
|
|
checks, whether filename is a valid savegame
Definition at line 1519 of file loaders.cpp. References actsavegameversion, fileterminator, minsavegameversion, tnstream::reading, tnstream::readInt(), tnstream::readpchar(), and tnstream::readWord(). Referenced by loadStartupMap(). |
|
|
Definition at line 920 of file loaders.cpp. Referenced by tsavegameloaders::loadgame(), and tnetworkloaders::loadnwgame(). |
|
|
Definition at line 61 of file loaders.cpp. Referenced by findNextCampaignMap(), tmaploaders::savemap(), and validatemapfile(). |
|
|
Definition at line 63 of file loaders.cpp. Referenced by tnetworkloaders::loadnwgame(), tnetworkloaders::savenwgame(), and validateemlfile(). |
|
|
Definition at line 65 of file loaders.cpp. Referenced by loadreplay(), and savereplay(). |
|
|
Definition at line 59 of file loaders.cpp. Referenced by tsavegameloaders::loadgame(), tsavegameloaders::savegame(), and validatesavfile(). |
|
|
Definition at line 69 of file loaders.cpp. Referenced by findNextCampaignMap(), tsavegameloaders::loadgame(), tnetworkloaders::loadnwgame(), tsavegameloaders::savegame(), tmaploaders::savemap(), tnetworkloaders::savenwgame(), validateemlfile(), validatemapfile(), and validatesavfile(). |
|
|
Definition at line 73 of file loaders.cpp. Referenced by findNextCampaignMap(), k_loadmap(), k_savemap(), loadStartupMap(), mapeditorMainThread(), and StartMultiplayerGame::userHandler(). |
|
|
Definition at line 186 of file loaders.cpp. Referenced by tspfldloaders::readmessages(). |
|
|
Definition at line 185 of file loaders.cpp. Referenced by tspfldloaders::readmessages(), and tspfldloaders::writemessages(). |
|
|
Definition at line 62 of file loaders.cpp. Referenced by findNextCampaignMap(), and validatemapfile(). |
|
|
Definition at line 64 of file loaders.cpp. Referenced by tnetworkloaders::loadnwgame(), and validateemlfile(). |
|
|
Definition at line 66 of file loaders.cpp. Referenced by loadreplay(). |
|
|
Definition at line 60 of file loaders.cpp. Referenced by tsavegameloaders::loadgame(), and validatesavfile(). |
|
|
Definition at line 451 of file loaders.cpp. Referenced by tspfldloaders::readfields(), and tspfldloaders::writefields(). |
|
|
Definition at line 72 of file loaders.cpp. Referenced by GuiFunctions::EndTurn::execute(), NextMap::execute(), loadGame(), loadStartupMap(), and saveGame(). |
|
|
Definition at line 74 of file loaders.cpp. Referenced by FileTransfer::constructFileName(), continuenetworkgame(), loadStartupMap(), networksupervisor(), and FileTransfer::send(). |
1.4.2