Added generic button
This commit is contained in:
+6
-4
@@ -6,6 +6,7 @@
|
||||
#include "blocks.hpp"
|
||||
#include "objectids.hpp"
|
||||
#include "global_vars.hpp"
|
||||
#include "filesystem.hpp"
|
||||
|
||||
#define TERRAIN_TYPE_HAS_ADDITIONAL 0x8
|
||||
#define WIDE_TERRAIN_HAS_ADDITIONAL 0x8000
|
||||
@@ -101,13 +102,14 @@ void loadMap(std::shared_ptr<SDLPP::Scene> &scene,
|
||||
std::shared_ptr<SDLPP::RenderObject> &mario,
|
||||
const std::string &file, std::vector<mapColumnType> &objects,
|
||||
bool editor, size_t editor_width) {
|
||||
auto renderer = scene->getRendererShared();
|
||||
std::ifstream map_file;
|
||||
map_file.open(file, std::ios::in | std::ios::binary);
|
||||
if(!map_file.is_open()) {
|
||||
if(!FSLib::exists(file)) {
|
||||
// create empty array large enough for initial editor window
|
||||
objects.resize(editor_width);
|
||||
return;
|
||||
}
|
||||
auto renderer = scene->getRendererShared();
|
||||
std::ifstream map_file;
|
||||
map_file.open(file, std::ios::in | std::ios::binary);
|
||||
uint16_t version;
|
||||
map_file.read((char *)&version, sizeof(uint16_t) / sizeof(char));
|
||||
switch(version) {
|
||||
|
||||
Reference in New Issue
Block a user