diff --git a/src/main.cpp b/src/main.cpp index 8ffc6bb..ad92683 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -7,7 +7,13 @@ #include #include -// Constants for unit conversion +// Configuration defaults - edit to change default run mode +#define DEFAULT_CONFIG_FILE "configs/solar_system.txt" +#define DEFAULT_HEADLESS 0 // 0 = GUI mode, 1 = headless mode +#define DEFAULT_READABLE 0 // 0 = scientific notation, 1 = human-readable (AU, km/s) +#define DEFAULT_SIM_DAYS 365 // Default simulation duration for headless mode + +// Unit conversion constants const double AU = 1.496e11; // 1 AU in meters const double KM = 1000.0; // 1 km in meters @@ -41,11 +47,11 @@ void print_body_readable(CelestialBody* body) { } int main(int argc, char** argv) { - // Parse command line arguments - const char* config_file = "configs/solar_system.txt"; - bool headless = false; - bool readable = false; // Human-readable output (AU, km, etc.) - int sim_duration_days = 365; // Default: 1 year for headless mode + // Parse command line arguments (start with macro defaults) + const char* config_file = DEFAULT_CONFIG_FILE; + bool headless = DEFAULT_HEADLESS; + bool readable = DEFAULT_READABLE; + int sim_duration_days = DEFAULT_SIM_DAYS; for (int i = 1; i < argc; i++) { if (strcmp(argv[i], "--headless") == 0 || strcmp(argv[i], "-h") == 0) {