Mario map: initial map has 18 columns

This commit is contained in:
zv0n 2021-05-07 08:35:01 +02:00
parent ad7f737e16
commit 7b0f72e273
2 changed files with 5 additions and 0 deletions

View File

@ -9,6 +9,7 @@
#include <SDL2/SDL2_framerate.h> #include <SDL2/SDL2_framerate.h>
#endif // UNIX #endif // UNIX
#include <array>
#include <thread> #include <thread>
#include <mutex> #include <mutex>
#include "global_vars.hpp" #include "global_vars.hpp"

View File

@ -1,5 +1,6 @@
#include "maploader.hpp" #include "maploader.hpp"
#include "../sdlpp/sdlpp_rectrenderer.hpp" #include "../sdlpp/sdlpp_rectrenderer.hpp"
#include <array>
#include <fstream> #include <fstream>
#include "sprites.hpp" #include "sprites.hpp"
#include "blocks.hpp" #include "blocks.hpp"
@ -93,6 +94,9 @@ void loadMap(std::shared_ptr<SDLPP::Scene> &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 // tuple - world object type, object, world character type, character, modifier type, modifier data