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_DESTINATION_H
18 #define SOLARUS_DESTINATION_H
19 
20 #include "solarus/core/Common.h"
21 #include "solarus/entities/Entity.h"
22 #include "solarus/entities/StartingLocationMode.h"
23 #include <string>
24 
25 namespace Solarus {
26 
27 /**
28  * \brief A location of the map where the hero can arrive when using a teletransporter.
29  */
30 class Destination: public Entity {
31 
32   public:
33 
34     static constexpr EntityType ThisType = EntityType::DESTINATION;
35 
36     Destination(
37         const std::string& name,
38         int layer,
39         const Point& xy,
40         int hero_direction,
41         const std::string& sprite_name,
42         bool is_default
43     );
44 
45     virtual EntityType get_type() const override;
46     bool is_default() const;
47 
48     StartingLocationMode get_starting_location_mode() const;
49     void set_starting_location_mode(StartingLocationMode mode);
50 
51   private:
52 
53     StartingLocationMode starting_location_mode;  /**< Whether this destination updates
54                                                    * the starting location. */
55     bool is_default_destination;                  /**< Whether this is the default
56                                                    * destination of the map. */
57 
58 };
59 
60 }
61 
62 #endif
63 
64