From 7b0f72e273983d54239dc59b8872ff81096c78d2 Mon Sep 17 00:00:00 2001 From: zv0n Date: Fri, 7 May 2021 08:35:01 +0200 Subject: [PATCH] Mario map: initial map has 18 columns --- mario/editor.cpp | 1 + mario/maploader.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/mario/editor.cpp b/mario/editor.cpp index eb33490..158113c 100644 --- a/mario/editor.cpp +++ b/mario/editor.cpp @@ -9,6 +9,7 @@ #include #endif // UNIX +#include #include #include #include "global_vars.hpp" diff --git a/mario/maploader.cpp b/mario/maploader.cpp index 0b85ffd..bf7be27 100644 --- a/mario/maploader.cpp +++ b/mario/maploader.cpp @@ -1,5 +1,6 @@ #include "maploader.hpp" #include "../sdlpp/sdlpp_rectrenderer.hpp" +#include #include #include "sprites.hpp" #include "blocks.hpp" @@ -93,6 +94,9 @@ void loadMap(std::shared_ptr &scene, const std::string &file, std: } } } + if(objects.size() < 18) { + objects.resize(18); + } } // tuple - world object type, object, world character type, character, modifier type, modifier data