about summary refs log tree commit diff stats
path: root/Source/PuzzleSerializer.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/PuzzleSerializer.h')
-rw-r--r--Source/PuzzleSerializer.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/PuzzleSerializer.h b/Source/PuzzleSerializer.h index d9b9edd..3c8f480 100644 --- a/Source/PuzzleSerializer.h +++ b/Source/PuzzleSerializer.h
@@ -31,6 +31,7 @@ private:
31 void ReadExtras(Puzzle& p); 31 void ReadExtras(Puzzle& p);
32 void ReadDecorations(Puzzle& p, int id); 32 void ReadDecorations(Puzzle& p, int id);
33 void ReadSequence(Puzzle& p, int id); 33 void ReadSequence(Puzzle& p, int id);
34 void ReadSymmetry(Puzzle& p, int id);
34 35
35 void WriteIntersections(const Puzzle& p); 36 void WriteIntersections(const Puzzle& p);
36 void WriteDots(const Puzzle& p); 37 void WriteDots(const Puzzle& p);
@@ -38,9 +39,11 @@ private:
38 void WriteEndpoints(const Puzzle& p); 39 void WriteEndpoints(const Puzzle& p);
39 void WriteDecorations(const Puzzle& p, int id); 40 void WriteDecorations(const Puzzle& p, int id);
40 void WriteSequence(const Puzzle& p, int id); 41 void WriteSequence(const Puzzle& p, int id);
42 void WriteSymmetry(const Puzzle& p, int id);
41 43
42 std::tuple<int, int> loc_to_xy(const Puzzle& p, int location) const; 44 std::tuple<int, int> loc_to_xy(const Puzzle& p, int location) const;
43 int xy_to_loc(const Puzzle& p, int x, int y) const; 45 int xy_to_loc(const Puzzle& p, int x, int y) const;
46 int extra_xy_to_loc(Pos pos) const;
44 // Decoration location 47 // Decoration location
45 std::tuple<int, int> dloc_to_xy(const Puzzle& p, int location) const; 48 std::tuple<int, int> dloc_to_xy(const Puzzle& p, int location) const;
46 int xy_to_dloc(const Puzzle& p, int x, int y) const; 49 int xy_to_dloc(const Puzzle& p, int x, int y) const;
@@ -49,14 +52,17 @@ private:
49 Cell::Dot FlagsToDot(int flags) const; 52 Cell::Dot FlagsToDot(int flags) const;
50 // Iterate connection lists for another location which is connected to us; return that other location. 53 // Iterate connection lists for another location which is connected to us; return that other location.
51 int FindConnection(int location) const; 54 int FindConnection(int location) const;
55 void AddIntersection(int x, int y, float xPos, float yPos, int flags);
52 56
53 std::shared_ptr<Memory> _memory; 57 std::shared_ptr<Memory> _memory;
54 58
55 std::vector<float> _intersectionLocations; 59 std::vector<float> _intersectionLocations;
60 int _numIntersections;
56 std::vector<int> _intersectionFlags; 61 std::vector<int> _intersectionFlags;
57 std::vector<int> _connectionsA; 62 std::vector<int> _connectionsA;
58 std::vector<int> _connectionsB; 63 std::vector<int> _connectionsB;
59 std::vector<std::tuple<int, int, int>> _endpointLocations; 64 // Locations of non-grid points, i.e. dots, gaps, and endpoints
65 std::vector<std::tuple<int, int, int>> _extraLocations;
60 66
61 float MIN, MAX, WIDTH_INTERVAL, HEIGHT_INTERVAL, HORIZ_GAP_SIZE, VERTI_GAP_SIZE; 67 float MIN, MAX, WIDTH_INTERVAL, HEIGHT_INTERVAL, HORIZ_GAP_SIZE, VERTI_GAP_SIZE;
62}; 68};