about summary refs log tree commit diff stats
path: root/data/maps/the_extravagant/connections.txtpb
blob: 777b3a87f30352cd610aeb0c80ae3ebb79adba42 (plain) (blame)
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
connections {
  from {
    painting {
      room: "Y Minus First Floor"
      name: "SMILE"
    }
  }
  to {
    painting {
      room: "Y Minus Second Floor"
      name: "SMILE"
    }
  }
  oneway: true
}
connections {
  from_room: "Y Minus Second Floor"
  to_room: "Y Minus First Floor"
  oneway: true
}
connections {
  from {
    painting {
      room: "Y Minus Second Floor"
      name: "UNMORE"
    }
  }
  to {
    painting {
      room: "Y Plus Third Floor"
      name: "UNMORE"
    }
  }
  oneway: true
}
connections {
  from_room: "Y Plus Third Floor"
  to_room: "Y Plus First Floor"
  oneway: true
}
connections {
  from {
    painting {
      room: "Y Plus Third Floor"
      name: "UNDUE"
    }
  }
  to {
    painting {
      room: "Hat Chamber"
      name: "UNDUE"
    }
  }
  oneway: true
}
connections {
  from_room: "Y Minus Third Floor"
  to_room: "Y Minus Second Floor"
  oneway: true
}
connections {
  from_room: "Hat Chamber"
  to_room: "Y Minus Third Floor"
  oneway: true
}
connections {
  from {
    painting {
      room: "Y Plus First Floor"
      name: "UNDUE"
    }
  }
  to {
    painting {
      room: "Engine Room"
      name: "UNDUE"
    }
  }
  oneway: true
}
connections {
  from {
    painting {
      room: "Y Plus First Floor"
      name: "UNLESS"
    }
  }
  to {
    painting {
      room: "X Plus"
      name: "UNLESS"
    }
  }
  oneway: true
}
connections {
  from_room: "X Plus"
  to_room: "X Plus Middle Leg"
  door { name: "M Side Middle Door" }
}
connections {
  from_room: "X Plus"
  to_room: "X Plus Right Leg"
  door { name: "M Side Right Door" }
}
connections {
  from {
    painting {
      room: "X Plus"
      name: "UNDONE"
    }
  }
  to {
    painting {
      room: "X Minus"
      name: "UNDONE"
    }
  }
  oneway: true
}
connections {
  from_room: "X Minus"
  to_room: "X Minus Middle Leg"
  door { name: "W Side Middle Door" }
}
connections {
  from_room: "X Minus"
  to_room: "X Minus Right Leg"
  door { name: "W Side Right Door" }
}
connections {
  from {
    painting {
      room: "X Minus"
      name: "SMILE"
    }
  }
  to {
    painting {
      room: "Y Minus Second Floor"
      name: "SMILE"
    }
  }
  oneway: true
}
connections {
  from_room: "Y Minus First Floor"
  to_room: "E Room"
  door { name: "E Door" }
}
312aa70c9c'>a475b84 ^
5ecd0f4 ^
5931470 ^
5ecd0f4 ^
a475b84 ^




3ecf5bb ^


a475b84 ^
5931470 ^
a475b84 ^


93b3e40 ^

dab96b8 ^

b06b259 ^

9510e4f ^

0c2cd25 ^

315ca2f ^

ca4935c ^

1656242 ^



937875c ^

37bbad7 ^

a475b84 ^

5ecd0f4 ^
a475b84 ^

3ecf5bb ^

5931470 ^
a475b84 ^
9510e4f ^
0c2cd25 ^
315ca2f ^
ca4935c ^
1656242 ^
937875c ^
37bbad7 ^
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112


                      
              
                 

                      
                   
                      
                   
 



                              
                       
                                 
                                                   

  


                   

                                 
                                
                       
                                  
                                
                               
                      
                      
                         
                            
                      


                                           

  






                     




             


           
                                      
 
                                                      




                                                        


                                                                                       
 
                                                                            


                                                           

                                     

                                           

                                                

                                                                             

                                                                                           

                                                                       

                                                                                



                                                        

                                                              

                                                   

        
                    

                  

                                              
                               
                      
                                     
                                           
                                 
                                     
                     
                        
                            


                                                 
#ifndef MAP_H_D95D6D47
#define MAP_H_D95D6D47

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

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

struct Prototype {
  std::string name;
  vec2i pos;
  vec2i collisionOffset {-7, -8};
  vec2i collisionSize {14, 8};
  std::string animationFilename;
  std::string animName;
  Direction dir = Direction::down;
  std::string interactionScript;
  std::string bumpPlayerScript;
  bool shadow = false;
  bool wander = false;
  int movementSpeed = -1;
  std::string enclosureZone;
  bool masked = false;
  MirrorType mirrorType = MirrorType::None;
  int mirrorAxis = 0;
  std::string spriteToMirror;
};

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>>& getUpperLayers() const { return upperLayers_; }

  const std::vector<std::vector<Tile>>& getLowerLayers() const { return lowerLayers_; }

  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;

  CharacterMedium getMedium(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); }

  bool hasMusic() const { return !music_.empty(); }

  const std::string& getMusic() const { return music_; }

  const std::string& getMaskZone() const { return maskZone_; }

  bool hasExitArea() const { return hasExitArea_; }

private:

  std::string name_;
  vec2i mapSize_;
  vec2i tileSize_;
  std::vector<std::vector<Tile>> upperLayers_;
  std::vector<std::vector<Tile>> lowerLayers_;
  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_;
  std::string music_;
  std::string maskZone_;
  bool hasExitArea_ = false;
};

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