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
10
namespace
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.
15
enum class
Surface
{
kSand
,
kGrass
,
kRock
,
kSnow
};
16
Surface
SurfaceAt
(
float
height,
float
up);
17
18
/// The surface's colour in the look.
19
Color
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.
23
void
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_
atmosphere.h
nanommo
Definition
chat.cc:9
nanommo::Surface
Surface
Definition
ground.h:15
nanommo::AddGround
void AddGround(Triangles &triangles, const Terrain &terrain, const Look &look, int left, int top, int cells)
Definition
ground.cc:69
nanommo::Ground::kSnow
@ kSnow
Definition
foley.h:15
nanommo::Ground::kSand
@ kSand
Definition
foley.h:15
nanommo::Ground::kRock
@ kRock
Definition
foley.h:15
nanommo::Ground::kGrass
@ kGrass
Definition
foley.h:15
nanommo::GroundColor
Color GroundColor(const Look &look, float height, float up)
The surface's colour in the look.
Definition
ground.cc:34
nanommo::SurfaceAt
Surface SurfaceAt(float height, float up)
Definition
ground.cc:21
terrain.h
triangles.h
client
ground.h
Generated by
1.15.0