Skip to content

Commit

Permalink
Feedback when saving
Browse files Browse the repository at this point in the history
  • Loading branch information
kieranmillar committed Nov 26, 2017
1 parent 293133b commit a05e144
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/level.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,18 @@ bool Level::save(unsigned int n)
enemies = 0;
extra_lemmings = 0;

return save_objects(PERM, path, perm, n) &&
if (save_objects(PERM, path, perm, n) &&
save_objects(TEMP, path, temp, n) &&
save_level(path, level, n);
save_level(path, level, n) == true)
{
SDL_ShowSimpleMessageBox(0, "Save Complete", "Level saved!", NULL);
return true;
}
else
{
SDL_ShowSimpleMessageBox(0, "Oh no!", "Failed to save :(", NULL);
return false;
}
}

bool Level::save_level(const std::string &path, const std::string &name, unsigned int n)
Expand Down

0 comments on commit a05e144

Please sign in to comment.