diff --git a/.gitignore b/.gitignore index 8a884c0e..a96875d5 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,5 @@ obj Docs/Generated old Debug -debug.txt \ No newline at end of file +PTM.dbg +PTM.cfg \ No newline at end of file diff --git a/Build/PTM.exe b/Build/PTM.exe index ead6df47..b8b0adcb 100644 Binary files a/Build/PTM.exe and b/Build/PTM.exe differ diff --git a/Build/test.ptml b/Build/test.ptml index d63b329e..f491b619 100644 --- a/Build/test.ptml +++ b/Build/test.ptml @@ -4,7 +4,7 @@ Q0FMTCBpbml0X2Nocg== Q0FMTCBpbml0X3BhbA== Y3NyLnNldCAxLDE= -cHJpbnQgIkhlbGxvIHtmM31Xb3JsZCF7L2Z9XG57YjR9TmV3IGxpbmV7L2J9Ig== +cHJpbnQgIkhlbGxvIHtmMn17YzI1NX17L2Z9e2YzfVdvcmxkIXsvZn1cbntiNH1OZXcgbGluZXsvYn0i aGFsdA== diff --git a/PTM/common.h b/PTM/common.h index edd8fc05..a1cbfad0 100644 --- a/PTM/common.h +++ b/PTM/common.h @@ -14,3 +14,7 @@ using ixp = PaletteIndex; using ixc = CharsetIndex; #define debugger __debugbreak() + +#define PTM_CONFIG_FILE "PTM.cfg" +#define PTM_DEBUG_FILE "PTM.dbg" +#define PTM_AUTOEXEC_FILE "exec" diff --git a/PTM/t_command.cpp b/PTM/t_command.cpp index 80092ced..1b058f81 100644 --- a/PTM/t_command.cpp +++ b/PTM/t_command.cpp @@ -553,11 +553,8 @@ void t_command::goto_if_key_pressed(t_params& arg) { } } void t_command::save_debug_file(t_params& arg) { - ARGC(1); - string path = intp->require_string(arg[0]); - if (!path.empty()) { - File::WriteLines(path, get_debug_info()); - } + ARGC(0); + File::WriteLines(PTM_DEBUG_FILE, get_debug_info()); } void t_command::compare_numbers(t_params& arg) { ARGC(2); diff --git a/PTM/t_config.cpp b/PTM/t_config.cpp index c2871f7c..58fbd674 100644 --- a/PTM/t_config.cpp +++ b/PTM/t_config.cpp @@ -1,10 +1,8 @@ #include "t_config.h" -#define CONFIG_FILE "config.ini" - void t_config::load() { - if (!File::Exists(CONFIG_FILE)) return; - for (auto& rawline : File::ReadLines(CONFIG_FILE, "\r\n")) { + if (!File::Exists(PTM_CONFIG_FILE)) return; + for (auto& rawline : File::ReadLines(PTM_CONFIG_FILE, "\r\n")) { string line = String::Trim(rawline); if (line.empty() || String::StartsWith(line, '#')) continue; auto cfg = String::Split(line, '=', true); @@ -20,8 +18,8 @@ void t_config::load() { } } void t_config::check_for_autorunnable_file() { - if (File::Exists("exec")) { - autorun = "exec"; + if (File::Exists(PTM_AUTOEXEC_FILE)) { + autorun = PTM_AUTOEXEC_FILE; return; } /* diff --git a/PTM/t_program_editor.cpp b/PTM/t_program_editor.cpp index 1ff079db..d7190f7e 100644 --- a/PTM/t_program_editor.cpp +++ b/PTM/t_program_editor.cpp @@ -510,10 +510,8 @@ void t_program_editor::show_help() { hide_cursor(); t_panel pnl(buf, color.fg, color.bdr_bg); pnl.title = "Help"; - pnl.bottom_text = "2022.0 (pre-alpha)"; pnl.maximize(); pnl.center_title(); - pnl.center_bottom_text(); while (true) { pnl.draw_frame();