1/*
2 * LegacyClonk
3 *
4 * Copyright (c) 1998-2000, Matthes Bender (RedWolf Design)
5 * Copyright (c) 2017-2019, The LegacyClonk Team and contributors
6 *
7 * Distributed under the terms of the ISC license; see accompanying file
8 * "COPYING" for details.
9 *
10 * "Clonk" is a registered trademark of Matthes Bender, used with permission.
11 * See accompanying file "TRADEMARK" for details.
12 *
13 * To redistribute this file separately, substitute the full license texts
14 * for the above references.
15 */
16
17/* Create map from dynamic landscape data in scenario */
18
19#pragma once
20
21#include "C4ForwardDeclarations.h"
22#include <C4Scenario.h>
23
24class C4MapCreator
25{
26public:
27 C4MapCreator();
28
29protected:
30 int32_t MapIFT;
31 CSurface8 *MapBuf;
32 int32_t MapWdt, MapHgt;
33 int32_t Exclusive;
34
35public:
36 void Create(CSurface8 *sfcMap,
37 C4SLandscape &rLScape, C4TextureMap &rTexMap,
38 bool fLayers = false, int32_t iPlayerNum = 1);
39
40protected:
41 void Reset();
42 void SetPix(int32_t x, int32_t y, uint8_t col);
43 void DrawLayer(int32_t x, int32_t y, int32_t size, uint8_t col);
44 uint8_t GetPix(int32_t x, int32_t y);
45};
46