diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-22 17:12:35 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-22 17:12:35 +0200 |
commit | 99d7d1695fec28208e19b34bc754dff5dd1e5642 (patch) | |
tree | d118eaa45d090562893e36f2122789da8c777ce5 | |
parent | 2de024ba832eecca59a512e9f8e3e1f6e8a0d8a3 (diff) |
fix txt parser
-rw-r--r-- | TXTParser.cpp | 3 | ||||
-rw-r--r-- | ViewController.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/TXTParser.cpp b/TXTParser.cpp index 5d0820f..07ae62b 100644 --- a/TXTParser.cpp +++ b/TXTParser.cpp @@ -151,11 +151,12 @@ static void parse_header(MuseumDeserializer & d, istringstream & input) { static void parse_canvas(MuseumDeserializer & d, istringstream & input) { unsigned int x = 0, y = 0; char c; - while (input >> c) { + while (input.get(c)) { if (c == '\r') continue; if (c == '\n') { x = 0; y += 1; + continue; } d.set_tile({ .x = x, .y = y, .type = string(1, c), }); x += 1; diff --git a/ViewController.h b/ViewController.h index 162ae19..4ff73c5 100644 --- a/ViewController.h +++ b/ViewController.h @@ -37,7 +37,7 @@ private: private: bool draw_artists = true; bool draw_pathfinding = false; - bool draw_quadtree = true; + bool draw_quadtree = false; private: unsigned int scale = 16; |