1 /* Copyright (C) 2021 Wildfire Games.
2 * This file is part of 0 A.D.
4 * 0 A.D. is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
9 * 0 A.D. is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
18 #ifndef INCLUDED_MAPWRITER
19 #define INCLUDED_MAPWRITER
23 #include "ps/FileIo.h"
32 class CPostprocManager
;
38 class CMapWriter
: public CMapIO
43 // SaveMap: try to save the current map to the given file
44 void SaveMap(const VfsPath
& pathname
, CTerrain
* pTerr
,
45 WaterManager
* pWaterMan
, SkyManager
* pSkyMan
,
46 CLightEnv
* pLightEnv
, CCamera
* pCamera
,
47 CCinemaManager
* pCinema
, CPostprocManager
* pPostproc
,
48 CSimulation2
* pSimulation2
);
51 // PackMap: pack the current world into a raw data stream
52 void PackMap(CFilePacker
& packer
, CTerrain
* pTerrain
);
53 // PackTerrain: pack the terrain onto the end of the data stream
54 void PackTerrain(CFilePacker
& packer
, CTerrain
* pTerrain
);
56 // EnumTerrainTextures: build lists of textures used by map, and indices into this list
57 // for each tile on the terrain
58 void EnumTerrainTextures(CTerrain
* pTerrain
, std::vector
<CStr
>& textures
,
59 std::vector
<STileDesc
>& tileIndices
);
61 // WriteXML: output some other data (entities, etc) in XML format
62 void WriteXML(const VfsPath
& pathname
, WaterManager
* pWaterMan
,
63 SkyManager
* pSkyMan
, CLightEnv
* pLightEnv
, CCamera
* pCamera
,
64 CPostprocManager
* pPostproc
,
65 CSimulation2
* pSimulation2
);