flip_world.c 793 B

12345678910111213141516
  1. #include <flip_world.h>
  2. char *fps_choices_str[] = {"30", "60", "120", "240"};
  3. int fps_index = 0;
  4. char *yes_or_no_choices[] = {"No", "Yes"};
  5. int screen_always_on_index = 1;
  6. int sound_on_index = 0;
  7. int vibration_on_index = 0;
  8. char *player_sprite_choices[] = {"naked", "sword", "axe", "bow"};
  9. int player_sprite_index = 1;
  10. char *vgm_levels[] = {"-2", "-1", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10"};
  11. int vgm_x_index = 2;
  12. int vgm_y_index = 2;
  13. float atof_(const char *nptr) { return (float)strtod(nptr, NULL); }
  14. float atof_furi(const FuriString *nptr) { return atof_(furi_string_get_cstr(nptr)); }
  15. bool is_str(const char *src, const char *dst) { return strcmp(src, dst) == 0; }
  16. bool is_enough_heap(size_t heap_size) { return memmgr_get_free_heap() > (heap_size + 1024); } // 1KB buffer