about summary refs log tree commit diff stats
path: root/data/maps/the_talented/rooms
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2025-09-11 10:44:04 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2025-09-11 10:44:04 -0400
commit5753db0d12da94f6ff2f1e3040a8be172be027b7 (patch)
tree32a61004b6d61c67b0cb5a36db16a5980989b55e /data/maps/the_talented/rooms
parent301b73bc6b569b8790af9325b846e2d7d4d149ba (diff)
downloadlingo2-archipelago-5753db0d12da94f6ff2f1e3040a8be172be027b7.tar.gz
lingo2-archipelago-5753db0d12da94f6ff2f1e3040a8be172be027b7.tar.bz2
lingo2-archipelago-5753db0d12da94f6ff2f1e3040a8be172be027b7.zip
Worked on the documentation
Diffstat (limited to 'data/maps/the_talented/rooms')
0 files changed, 0 insertions, 0 deletions
>
a475b84 ^

9510e4f ^






59dfd3d ^
996076c ^
f0eab98 ^
ca4935c ^
9510e4f ^

315ca2f ^






ca4935c ^




a475b84 ^


5ecd0f4 ^
5931470 ^
5ecd0f4 ^
a475b84 ^






5931470 ^
a475b84 ^


93b3e40 ^

dab96b8 ^

9510e4f ^

0c2cd25 ^

315ca2f ^

ca4935c ^

a475b84 ^

5ecd0f4 ^
a475b84 ^


5931470 ^
a475b84 ^
9510e4f ^
0c2cd25 ^
315ca2f ^
ca4935c ^
a475b84 ^


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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87


                      
              
                 

                      
                   
                      
 



                              
                       
                                 

  






                                
                      
                      
                         
                            

  






                     




             


           
                                      
 
                                                      






                                                                             
                                                                            


                                                           

                                     

                                           

                                                                             

                                                                                           

                                                                       

                                                                                

        
                    


                                         
                               
                      
                                     
                                           
                                 
                                     


                                                 
#ifndef MAP_H_D95D6D47
#define MAP_H_D95D6D47

#include <map>
#include <string>
#include <string_view>
#include <vector>
#include "vector.h"
#include "step_type.h"

struct Tile {
  unsigned int id = 0;
  bool flipHorizontal = false;
  bool flipVertical = false;
  bool blocked = false;
  StepType step = StepType::none;
};

struct Prototype {
  std::string name;
  vec2i pos;
  vec2i collisionOffset;
  vec2i collisionSize;
  std::string animationFilename;
  std::string interactionScript;
  bool shadow = false;
  bool wander = false;
  int movementSpeed = -1;
  std::string enclosureZone;
};

struct Trigger {
  std::string name;
  vec2i pos;
  vec2i size;
  std::string script;
};

struct Zone {
  vec2i ul;
  vec2i dr;
};

class Map {
public:

  explicit Map(std::string_view name);

  const std::string& getName() const { return name_; }

  const vec2i& getMapSize() const { return mapSize_; }

  const vec2i& getTileSize() const { return tileSize_; }

  const std::vector<std::vector<Tile>>& getLayers() const { return layers_; }

  const std::string& getTilesetFilename() const { return tilesetFilename_; }

  int getTilesetColumns() const { return tilesetColumns_; }

  bool isBlocked(int x, int y) const;

  StepType getStepType(int x, int y) const;

  const std::vector<Prototype>& getPrototypes() const { return prototypes_; }

  const vec2i& getWarpPoint(const std::string& name) const { return warpPoints_.at(name); }

  const std::vector<Trigger>& getTriggers() const { return triggers_; }

  const Zone& getZone(const std::string& name) const { return zones_.at(name); }

private:

  std::string name_;
  vec2i mapSize_;
  vec2i tileSize_;
  std::vector<std::vector<Tile>> layers_;
  std::string tilesetFilename_;
  int tilesetColumns_;
  std::vector<Prototype> prototypes_;
  std::map<std::string, vec2i> warpPoints_;
  std::vector<Trigger> triggers_;
  std::map<std::string, Zone> zones_;
};

#endif /* end of include guard: MAP_H_D95D6D47 */