From 99d7d1695fec28208e19b34bc754dff5dd1e5642 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Tue, 22 Oct 2024 17:12:35 +0200 Subject: fix txt parser --- TXTParser.cpp | 3 ++- 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; -- cgit v1.2.3