mine_sweeper_storage.h 970 B

123456789101112131415161718192021222324252627
  1. #ifndef MINESWEEPER_STORAGE_H
  2. #define MINESWEEPER_STORAGE_H
  3. #include <stdlib.h>
  4. #include <string.h>
  5. #include <storage/storage.h>
  6. #include <flipper_format/flipper_format.h>
  7. #include "../minesweeper.h"
  8. #define MINESWEEPER_SETTINGS_FILE_VERSION 1
  9. #define CONFIG_FILE_DIRECTORY_PATH EXT_PATH("apps_data/f0_mine_sweeper")
  10. #define MINESWEEPER_SETTINGS_SAVE_PATH CONFIG_FILE_DIRECTORY_PATH "/f0_mine_sweeper.conf"
  11. #define MINESWEEPER_SETTINGS_SAVE_PATH_TMP MINESWEEPER_SETTINGS_SAVE_PATH ".tmp"
  12. #define MINESWEEPER_SETTINGS_HEADER "Mine Sweeper Config File"
  13. #define MINESWEEPER_SETTINGS_KEY_WIDTH "BoardWidth"
  14. #define MINESWEEPER_SETTINGS_KEY_HEIGHT "BoardHeight"
  15. #define MINESWEEPER_SETTINGS_KEY_DIFFICULTY "BoardDifficulty"
  16. #define MINESWEEPER_SETTINGS_KEY_HAPTIC "Haptic"
  17. #define MINESWEEPER_SETTINGS_KEY_LED "Led"
  18. #define MINESWEEPER_SETTINGS_KEY_SPEAKER "Speaker"
  19. void mine_sweeper_save_settings(void* context);
  20. bool mine_sweeper_read_settings(void* context);
  21. #endif