Skip to content

Commit

Permalink
View history
Browse files Browse the repository at this point in the history
  • Loading branch information
FernandoAiresCastello committed Jul 26, 2022
1 parent 462684d commit cd34b3c
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 15 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ obj
Docs/Generated
old
Debug
debug.txt
PTM.dbg
PTM.cfg
Binary file modified Build/PTM.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion Build/test.ptml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Q0FMTCBpbml0X2Nocg==
Q0FMTCBpbml0X3BhbA==

Y3NyLnNldCAxLDE=
cHJpbnQgIkhlbGxvIHtmM31Xb3JsZCF7L2Z9XG57YjR9TmV3IGxpbmV7L2J9Ig==
cHJpbnQgIkhlbGxvIHtmMn17YzI1NX17L2Z9e2YzfVdvcmxkIXsvZn1cbntiNH1OZXcgbGluZXsvYn0i

aGFsdA==

Expand Down
4 changes: 4 additions & 0 deletions PTM/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
7 changes: 2 additions & 5 deletions PTM/t_command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
10 changes: 4 additions & 6 deletions PTM/t_config.cpp
Original file line number Diff line number Diff line change
@@ -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);
Expand All @@ -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;
}
/*
Expand Down
2 changes: 0 additions & 2 deletions PTM/t_program_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit cd34b3c

Please sign in to comment.