As we need to add a file chooser to the overlay, we need the backend
functions for it to use.
This commit adds:
Local_Storage::get_parent_directory().
Local_Storage::is_directory().
Local_Storage::get_user_pictures_path().
Local_Storage::get_drive_list().
Posix version of DirectoryExists().
... settings directory.
Also adds some additional related debug logging, and a utility function
for converting between std::vector<image_pixel_t> used by Local_Storage::load_image(),
and std::string used by Settings::add_image().
More generic json loading allows to load a json from a specified folder rather than the "inventory" directory.
Also changed achievements location to <appid> root diectory
Added achievements support. Achievements are saved like real steam, see your inventory directory.(like items, uses a .json, tool can be used to dump achievements from steam public api).
You will need a public apikey. (See https://steamcommunity.com/dev)
Reworked item support to split inventory items to defined items.
Added check on directory in Local_Storage::file_exists.
Added check in get_filenames_recursive if last char is the path separator (some use cases were adding a path separator even if there were already one).
In base.h, added check on s and r, that will avoid an out-of-range vector exception on Visual Studio, same for network.cpp.