nanoMMO 0.97.8
Building an MMO: The Engineering Series
Loading...
Searching...
No Matches
ground.h
Go to the documentation of this file.
1#ifndef NANOMMO_CLIENT_GROUND_H_
2#define NANOMMO_CLIENT_GROUND_H_
3
4#include <raylib.h>
5
6#include "client/atmosphere.h"
7#include "client/triangles.h"
8#include "terrain/terrain.h"
9
10namespace nanommo {
11
12/// What the ground is at the height, where the y of the ground's normal is up:
13/// sand by the sea, snow up high, rock where it's high or steep, and grass
14/// elsewhere.
15enum class Surface { kSand, kGrass, kRock, kSnow };
16Surface SurfaceAt(float height, float up);
17
18/// The surface's colour in the look.
19Color GroundColor(const Look& look, float height, float up);
20
21/// The two triangles in each cell of a square of cells, from the cell at
22/// left and top, in the look's colours, by height and slope.
23void AddGround(Triangles& triangles, const Terrain& terrain, const Look& look,
24 int left, int top, int cells);
25
26} // namespace nanommo
27
28#endif // NANOMMO_CLIENT_GROUND_H_
Definition chat.cc:9
Surface
Definition ground.h:15
void AddGround(Triangles &triangles, const Terrain &terrain, const Look &look, int left, int top, int cells)
Definition ground.cc:69
Color GroundColor(const Look &look, float height, float up)
The surface's colour in the look.
Definition ground.cc:34
Surface SurfaceAt(float height, float up)
Definition ground.cc:21