about summary refs log tree commit diff stats
path: root/data/maps/the_relentless/rooms/Left Room.txtpb
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2025-08-31 10:55:42 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2025-08-31 10:55:42 -0400
commit09edc0f568705081720a30f976de0f16339f2a96 (patch)
tree54b74cbaa886b29a7f61a92552684031465f4952 /data/maps/the_relentless/rooms/Left Room.txtpb
parentdba2528e0833050f81175358976fc7cac31c867d (diff)
downloadlingo2-archipelago-09edc0f568705081720a30f976de0f16339f2a96.tar.gz
lingo2-archipelago-09edc0f568705081720a30f976de0f16339f2a96.tar.bz2
lingo2-archipelago-09edc0f568705081720a30f976de0f16339f2a96.zip
[Data] Small tweaks
Diffstat (limited to 'data/maps/the_relentless/rooms/Left Room.txtpb')
0 files changed, 0 insertions, 0 deletions
6adeca9007641cb'>6b99c7a ^
7f0e8c7 ^


2ec1636 ^






103587c ^






2ec1636 ^


4b4125e ^
2ec1636 ^

103587c ^




2ec1636 ^
103587c ^
2ec1636 ^
44324ba ^
2ec1636 ^
44324ba ^
eb61ec5 ^
103587c ^
2ec1636 ^
44324ba ^
8199216 ^

7f0e8c7 ^
2ec1636 ^

103587c ^
2ec1636 ^

44324ba ^
eb61ec5 ^
2ec1636 ^
44324ba ^
103587c ^
de5a458

6b99c7a ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70

             
 

                 
              


             

           

                      
                        
                   
           


                                              






                         






                        


                                   
                                       

      




                                     
                                                      
                                                    
                                                
    
                      
                                  
                                 
                                                   
    
                                                                            

                                            
    

                                     
                                                          

                                     
                 
                      
           
                                   
                                          

  
      
#ifndef MAP_H
#define MAP_H

#include <string>
#include <list>
#include <map>

class Entity;

class Map {
  public:
    Map(int id);
    Map() : Map(-1) {}
    Map(const Map& map);
    Map(Map&& map);
    ~Map();
    Map& operator= (Map other);
    friend void swap(Map& first, Map& second);
    
    enum class MoveType {
      Wall,
      Wrap,
      Warp,
      ReverseWarp
    };
    
    enum class MoveDir {
      Left,
      Right,
      Up,
      Down
    };
    
    struct EntityData {
      std::string name;
      std::pair<int, int> position;
      std::map<std::string, int> items;
    };
    
    struct Adjacent {
      MoveType type = MoveType::Wall;
      int map = -1;
    };
    
    static MoveType moveTypeForShort(std::string str);
    static MoveDir moveDirForShort(std::string str);
    static bool moveTypeTakesMap(MoveType type);
    
    int getID() const;
    const int* getMapdata() const;
    std::string getTitle() const;
    const Adjacent& getAdjacent(MoveDir dir) const;
    
    void createEntities(std::list<std::shared_ptr<Entity>>& entities) const;
    bool operator==(const Map& other) const;
    bool operator!=(const Map& other) const;
    
    void setMapdata(int* mapdata);
    void setTitle(std::string title);
    void setAdjacent(MoveDir dir, MoveType type, int map);
    void addEntity(EntityData& data);
  private:
    int* mapdata;
    std::string title;
    int id;
    std::list<EntityData> entities;
    std::map<MoveDir, Adjacent> adjacents;
};

#endif