mine_sweeper_storage.h 916 B

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