Fix Molten VK printing too many log messages
[0ad.git] / source / graphics / MapWriter.h
blobef3ad229a0e45dff046ec35da59f783dac4a7a3d
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
21 #include "MapIO.h"
22 #include "ps/CStr.h"
23 #include "ps/FileIo.h"
25 #include <vector>
28 class CLightEnv;
29 class CTerrain;
30 class CCamera;
31 class CCinemaManager;
32 class CPostprocManager;
33 class WaterManager;
34 class SkyManager;
35 class CSimulation2;
36 struct MapTrigger;
38 class CMapWriter : public CMapIO
40 public:
41 // constructor
42 CMapWriter();
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);
50 private:
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);
68 #endif