|
|
|
@ -1701,20 +1701,6 @@ void AiL::InitializeLevel(std::string mapFile,MapName map){ |
|
|
|
|
std::cout<<" Clearing Layer Data..."<<std::endl; |
|
|
|
|
MAP_DATA[map].LayerData.clear(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for(ConnectionPoint&cp:State_OverworldMap::connections){ |
|
|
|
|
if(cp.levelDataExists)continue; |
|
|
|
|
if(VisualNovel::storyLevelData.count(cp.map)){ //Visual novel story data for story levels.
|
|
|
|
|
cp.levelDataExists=true; |
|
|
|
|
} |
|
|
|
|
if(MAP_DATA.find(cp.map)!=MAP_DATA.end()){ |
|
|
|
|
MAP_DATA[map].name=cp.name; |
|
|
|
|
for(std::string spawn:MAP_DATA[map].spawns){ |
|
|
|
|
cp.spawns.push_back(spawn); |
|
|
|
|
} |
|
|
|
|
cp.levelDataExists=true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void AiL::LoadLevel(MapName map){ |
|
|
|
@ -2314,6 +2300,20 @@ void AiL::InitializeLevels(){ |
|
|
|
|
InitializeLevel("map_path"_S+operator""_S(("Levels."+key).c_str(),("Levels."+key).size()),key); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for(ConnectionPoint&cp:State_OverworldMap::connections){ |
|
|
|
|
if(cp.levelDataExists)continue; |
|
|
|
|
if(VisualNovel::storyLevelData.count(cp.map)){ //Visual novel story data for story levels.
|
|
|
|
|
cp.levelDataExists=true; |
|
|
|
|
} |
|
|
|
|
if(MAP_DATA.find(cp.map)!=MAP_DATA.end()){ |
|
|
|
|
MAP_DATA[cp.map].name=cp.name; |
|
|
|
|
for(std::string spawn:MAP_DATA[cp.map].spawns){ |
|
|
|
|
cp.spawns.push_back(spawn); |
|
|
|
|
} |
|
|
|
|
cp.levelDataExists=true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for(auto&[key,size]:DATA["Backdrops"]){ |
|
|
|
|
Renderable&backdrop=BACKDROP_DATA[key]; |
|
|
|
|
backdrop.Load("backdrop_directory"_S+DATA["Backdrops"][key].GetString(),nullptr,false,false); |
|
|
|
|