Debian Codegraph @

src/include/terrainmap.h

raw
1 //
2 // Copyright (C) 2015 Andrei Bondor, [email protected]
3 // Copyright (C) 2015 Onsemeliot, [email protected]
4 //
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 //
19
20 #pragma once
21
22 enum class TerrainType
23 {
24 Unknown,
25 RacingTarmac,
26 CountryRoad,
27 SlipperyRoad,
28 Ice,
29 DeepSnow,
30 FirmSand,
31 LooseSand,
32 PressedEarth,
33 LooseEarth,
34 MoistEarth,
35 Mud,
36 FineGravel,
37 RoughGravel,
38 Grass,
39 Shrubbery,
40 DeepWater
41 };
42
43 #define RGB rgbcolor
44 #define DI dirtinfo
45
46 ///
47 /// @brief X-macro describing various terrain types.
48 /// @details
49 ///
50 /// Name RgbColor Friction Resistance DirtInfo
51 ///
52 #define TERRAINMAP_MATERIALS \
53 X(RacingTarmac, RGB( 80, 60, 100), 1.50, 0.00, DI(0.00, 0.10, 6.0)) \
54 X(CountryRoad, RGB(140, 80, 180), 1.20, 0.00, DI(0.00, 0.20, 6.0)) \
55 X(SlipperyRoad, RGB(200, 140, 255), 0.50, 0.00, DI(0.00, 0.30, 6.0)) \
56 X(Ice, RGB(180, 220, 255), 0.20, 0.00, DI(0.00, 0.10, 6.0)) \
57 X(DeepSnow, RGB(255, 255, 255), 0.30, 0.50, DI(0.00, 0.80, 1.0)) \
58 X(FirmSand, RGB(255, 220, 0), 1.00, 0.05, DI(0.50, 2.60, 1.5)) \
59 X(LooseSand, RGB(255, 255, 140), 0.75, 0.55, DI(0.50, 3.00, 1.5)) \
60 X(PressedEarth, RGB(255, 200, 200), 0.90, 0.05, DI(0.00, 0.35, 3.0)) \
61 X(LooseEarth, RGB(255, 140, 140), 0.70, 0.25, DI(0.00, 1.00, 2.0)) \
62 X(MoistEarth, RGB(255, 0, 0), 1.10, 0.15, DI(0.00, 0.75, 7.5)) \
63 X(Mud, RGB(160, 0, 0), 0.60, 0.40, DI(0.00, 0.55, 6.0)) \
64 X(FineGravel, RGB(140, 140, 140), 0.90, 0.10, DI(0.00, 1.25, 3.0)) \
65 X(RoughGravel, RGB( 0, 0, 0), 0.60, 0.20, DI(0.00, 0.40, 5.0)) \
66 X(Grass, RGB( 0, 180, 0), 0.40, 0.10, DI(0.00, 0.30, 6.5)) \
67 X(Shrubbery, RGB( 0, 90, 0), 0.40, 0.70, DI(0.00, 0.50, 6.0)) \
68 X(DeepWater, RGB( 0, 0, 255), 0.20, 0.60, DI(0.00, 0.50, 6.0))