Several more map read/write test cases
This commit is contained in:
@@ -1902,11 +1902,8 @@ void loadTownMapData(map_data&& data, int which, cScenario& scen) {
|
||||
bool is_boat = false;
|
||||
cVehicle* what;
|
||||
switch(feat.first) {
|
||||
// Special values
|
||||
case eMapFeature::NONE:
|
||||
break;
|
||||
// Outdoor-only features
|
||||
case eMapFeature::TOWN: break;
|
||||
case eMapFeature::NONE: break; // Special value
|
||||
case eMapFeature::TOWN: break; // Outdoor-only feature
|
||||
case eMapFeature::SPECIAL_NODE:
|
||||
town.special_locs.push_back({x, y, feat.second});
|
||||
break;
|
||||
|
@@ -19,9 +19,11 @@ map_data load_map(std::istream& fin, bool isTown, std::string name) {
|
||||
map_data data;
|
||||
data.file = name;
|
||||
int row = 0;
|
||||
while(!fin.eof()) {
|
||||
while(fin) {
|
||||
std::string line;
|
||||
getline(fin, line);
|
||||
if(line.empty() && !fin.eof())
|
||||
continue;
|
||||
int n = 0, col = 0;
|
||||
eMapFeature curFeature = eMapFeature::NONE;
|
||||
// vehicle_owned = true means the party owns it
|
||||
|
Reference in New Issue
Block a user