1 #include "editor/editor.h" 2 3 #include "core/file.h" 4 5 #define MAX_EDITOR_FILES 9 6 7 static const char EDITOR_FILES[MAX_EDITOR_FILES][32] = { 8 "c3_map.eng", 9 "c3_map_mm.eng", 10 "c3map.sg2", 11 "c3map.555", 12 "c3map_north.sg2", 13 "c3map_north.555", 14 "c3map_south.sg2", 15 "c3map_south.555", 16 "map_panels.555" 17 }; 18 19 static int is_active; 20 editor_is_present(void)21int editor_is_present(void) 22 { 23 for (int i = 0; i < MAX_EDITOR_FILES; i++) { 24 if (!file_exists(EDITOR_FILES[i], MAY_BE_LOCALIZED)) { 25 return 0; 26 } 27 } 28 return 1; 29 } 30 editor_set_active(int active)31void editor_set_active(int active) 32 { 33 is_active = active; 34 } 35 editor_is_active(void)36int editor_is_active(void) 37 { 38 return is_active; 39 } 40