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