1 /*
2  * Copyright (C) 2006-2019 Christopho, Solarus - http://www.solarus-games.org
3  *
4  * Solarus 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 3 of the License, or
7  * (at your option) any later version.
8  *
9  * Solarus 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.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 #ifndef SOLARUS_GROUND_H
18 #define SOLARUS_GROUND_H
19 
20 #include "solarus/core/Common.h"
21 
22 namespace Solarus {
23 
24 /**
25  * \brief The possible kinds of grounds on a map.
26  *
27  * The ground of a point of the map is the one of the tile, dynamic tile
28  * or destructible entity placed there.
29  * If several entities are present at that point (like a traversable dynamic
30  * tile over a hole tile),
31  * the highest one whose ground is not GROUND_EMPTY wins.
32  */
33 enum class Ground {
34 
35   EMPTY,                   /**< Keep unchanged the ground of entities below. */
36   TRAVERSABLE,             /**< Normal travsersable ground. */
37   WALL,                    /**< Obstacle entity. */
38   LOW_WALL,                /**< Can only be traversed by projectiles like arrows,
39                             * boomerang, thrown items, etc. */
40   WALL_TOP_RIGHT,          /**< The upper-right half of the entity is an obstacle. */
41   WALL_TOP_LEFT,           /**< The upper-left half of the entity is an obstacle. */
42   WALL_BOTTOM_LEFT,        /**< The lower-left half of the entity is an obstacle. */
43   WALL_BOTTOM_RIGHT,       /**< The lower-right half of the entity is an obstacle. */
44   WALL_TOP_RIGHT_WATER,    /**< The upper-right half of the entity is an obstacle
45                             * and the rest is deep water. */
46   WALL_TOP_LEFT_WATER,     /**< The upper-left half of the entity is an obstacle
47                             * and the rest is deep water. */
48   WALL_BOTTOM_LEFT_WATER,  /**< The lower-left half of the entity is an obstacle
49                             * and the rest is deep water. */
50   WALL_BOTTOM_RIGHT_WATER, /**< The lower-right half of the entity is an obstacle
51                             * and the rest is deep water. */
52   DEEP_WATER,              /**< Deep water where the hero drowns or swims. */
53   SHALLOW_WATER,           /**< Shallow water where the hero can walk but slower. */
54   GRASS,                   /**< Grass where the hero walks slower. */
55   HOLE,                    /**< A hole where the hero can fall. */
56   ICE,                     /**< Ice terrain where the hero slides. */
57   LADDER,                  /**< A ladder that slows down the hero. */
58   PRICKLE,                 /**< Some untraversable prickles that hurt the hero. */
59   LAVA,                    /**< Some lava where the hero drowns and gets hurt. */
60 };
61 
62 }
63 
64 #endif
65 
66