diff --git a/.clangd b/.clangd index 3e65e77..4578007 100755 --- a/.clangd +++ b/.clangd @@ -1,3 +1,3 @@ #.clangd #CompileFlags: - Add: [ -D_DARWIN_C_SOURCE, -DNCURSES_WIDECHAR, -include, "/opt/homebrew/Cellar/ncurses/6.5/include/ncursesw", -include, "/opt/homebrew/Cellar/ncurses/6.5/include", -D__GMENG_OBJECTINIT__=1, -include, "./lib/bin/gmeng.hpp" ] + Add: [ -D_DARWIN_C_SOURCE, -DNCURSES_WIDECHAR, -include, "/opt/homebrew/Cellar/ncurses/6.5/include/ncursesw", -include, "/opt/homebrew/Cellar/ncurses/6.5/include", -D__GMENG_OBJECTINIT__=1, -include, "./lib/bin/gmeng.h" ] diff --git a/build_cf b/build_cf new file mode 100755 index 0000000..d8e6aa8 --- /dev/null +++ b/build_cf @@ -0,0 +1,2 @@ +g++ -lcurl -g --std=c++20 -pthread $1 -o $1.o `pkg-config --libs --cflags ncursesw` -Wno-deprecated-declarations -Wno-writable-strings -Wno-switch-bool -Wno-format-security -framework ApplicationServices + diff --git a/envs/models/ui_map_txtr.gt b/envs/models/ui_map_txtr.gt new file mode 100755 index 0000000..24ecabd --- /dev/null +++ b/envs/models/ui_map_txtr.gt @@ -0,0 +1,1802 @@ +name=ui_map_txtr,width=60,height=30,collision=true +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +4 false 0 X +4 false 0 X +4 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +4 false 0 X +4 false 0 X +4 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +4 false 0 X +4 false 0 X +4 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +4 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +0 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +4 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +4 false 0 X +4 false 0 X +4 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +4 false 0 X +1 false 0 X +0 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +4 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +4 false 0 X +4 false 0 X +4 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +4 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +4 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +4 false 0 X +4 false 0 X +4 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +4 false 0 X +4 false 0 X +4 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +4 false 0 X +4 false 0 X +4 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +4 false 0 X +4 false 0 X +4 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +4 false 0 X +4 false 0 X +4 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +0 false 0 X +0 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +4 false 0 X +4 false 0 X +4 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +4 false 0 X +4 false 0 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +4 false 0 X +4 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +0 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +4 false 0 X +4 false 0 X +0 false 1 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +0 false 1 X +4 false 0 X +4 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +4 false 0 X +4 false 0 X +0 false 1 X +4 false 0 X +4 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +0 false 0 X +1 false 0 X +1 false 0 X +4 false 0 X +4 false 0 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 0 X +4 false 0 X +4 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +0 false 0 X +1 false 0 X +1 false 0 X +4 false 0 X +4 false 0 X +0 false 1 X +4 false 0 X +4 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +4 false 0 X +4 false 0 X +0 false 1 X +4 false 0 X +4 false 0 X +1 false 0 X +0 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +4 false 0 X +4 false 0 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 0 X +4 false 0 X +4 false 0 X +1 false 0 X +0 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +4 false 0 X +4 false 0 X +0 false 1 X +4 false 0 X +4 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +6 false 0 X +4 false 0 X +4 false 0 X +0 false 1 X +4 false 0 X +4 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +4 false 0 X +4 false 0 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 0 X +4 false 0 X +4 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +4 false 0 X +4 false 0 X +0 false 1 X +4 false 0 X +4 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +4 false 0 X +4 false 0 X +0 false 1 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +0 false 1 X +4 false 0 X +4 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +4 false 0 X +4 false 0 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +4 false 0 X +4 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +4 false 0 X +4 false 0 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +4 false 0 X +4 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +4 false 0 X +4 false 0 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +4 false 0 X +4 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +4 false 0 X +4 false 0 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +4 false 0 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +4 false 0 X +4 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +6 false 0 X +4 false 0 X +4 false 0 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +4 false 0 X +4 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +4 false 0 X +4 false 0 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +4 false 0 X +4 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +4 false 0 X +4 false 0 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +4 false 0 X +4 false 0 X +6 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +6 false 0 X +6 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +6 false 0 X +4 false 0 X +4 false 0 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +4 false 0 X +4 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +4 false 0 X +4 false 0 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +4 false 0 X +4 false 0 X +6 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +6 false 0 X +6 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +1 false 0 X +6 false 0 X +4 false 0 X +4 false 0 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +4 false 0 X +4 false 0 X +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +4 false 0 X +4 false 0 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +4 false 0 X +4 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +4 false 0 X +4 false 0 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +4 false 0 X +4 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +4 false 0 X +4 false 0 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +4 false 0 X +4 false 0 X +6 false 0 X +4 false 0 X +4 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +4 false 0 X +4 false 0 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +4 false 0 X +4 false 0 X +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +4 false 0 X +4 false 0 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +4 false 0 X +4 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +4 false 0 X +4 false 0 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +4 false 0 X +4 false 0 X +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +4 false 0 X +4 false 0 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +4 false 0 X +4 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +4 false 0 X +4 false 0 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +4 false 0 X +4 false 0 X +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +4 false 0 X +4 false 0 X +0 false 0 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +4 false 0 X +4 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +6 false 0 X +4 false 0 X +4 false 0 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +0 false 1 X +4 false 0 X +4 false 0 X +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +6 false 0 X +__gtransparent_unit__ +__gtransparent_unit__ +; %tsgmeng::builder.texture4_0() -> auto_generated Sat Jun 29 2024 \ No newline at end of file diff --git a/lib/bin/gmeng.hpp b/lib/bin/gmeng.h similarity index 99% rename from lib/bin/gmeng.hpp rename to lib/bin/gmeng.h index a1fc013..e03da35 100755 --- a/lib/bin/gmeng.hpp +++ b/lib/bin/gmeng.h @@ -18,7 +18,7 @@ #include #include #include -#include "objects.cpp" +#include "src/objects.cpp" #include #if _WIN32 == false #include //ioctl() and TIOCGWINSZ @@ -379,7 +379,7 @@ static void __gmeng_write_log__(const std::string& name, const std::string& cont }; -#include "utils/termui.cpp" +#include "types/termui.h" namespace Gmeng { static t_display logc = { @@ -673,14 +673,14 @@ static void _gargv_patch_global(int argc, char* argv[]) { #define __GMENG_INIT__ true /// initialized first because the source files check this value before initialization -#include "utils/textures.cpp" -#include "def/gmeng.cpp" -#include "def/renderer.cpp" -#include "utils/envs/map.hpp" +#include "src/textures.cpp" +#include "src/gmeng.cpp" +#include "src/renderer.cpp" +#include "types/map.h" #if _WIN32 == false #include "utils/network.cpp" -#include "utils/UIElements.hpp" -#include "utils/UIElements.cpp" +#include "types/interface.h" +#include "utils/interface.cpp" #endif namespace g = Gmeng; namespace gm = Gmeng; diff --git a/lib/bin/def/display.cpp b/lib/bin/src/display.cpp similarity index 100% rename from lib/bin/def/display.cpp rename to lib/bin/src/display.cpp diff --git a/lib/bin/def/gmeng.cpp b/lib/bin/src/gmeng.cpp similarity index 99% rename from lib/bin/def/gmeng.cpp rename to lib/bin/src/gmeng.cpp index e286a0f..0e2b691 100755 --- a/lib/bin/def/gmeng.cpp +++ b/lib/bin/src/gmeng.cpp @@ -5,7 +5,7 @@ #include #include #include -#include "../gmeng.hpp" +#include "../gmeng.h" std::vector g_trace_trajectory(int x1, int y1, int x2, int y2) { diff --git a/lib/bin/index.cpp b/lib/bin/src/index.cpp similarity index 99% rename from lib/bin/index.cpp rename to lib/bin/src/index.cpp index 92fcca1..37e5f1b 100755 --- a/lib/bin/index.cpp +++ b/lib/bin/src/index.cpp @@ -19,9 +19,9 @@ /* files */ #include "objects.cpp" -#include "gmeng.hpp" -#include "utils/textures.cpp" -#include "utils/envs/map.hpp" +#include "gmeng.h" +#include "src/textures.cpp" +#include "types/map.h" /* index */ // this file is for the game code. Current code allows for tsgmeng & gmeng child_process connection diff --git a/lib/bin/objects.cpp b/lib/bin/src/objects.cpp similarity index 100% rename from lib/bin/objects.cpp rename to lib/bin/src/objects.cpp diff --git a/lib/bin/def/renderer.cpp b/lib/bin/src/renderer.cpp similarity index 99% rename from lib/bin/def/renderer.cpp rename to lib/bin/src/renderer.cpp index f036f3e..7948cef 100755 --- a/lib/bin/def/renderer.cpp +++ b/lib/bin/src/renderer.cpp @@ -10,8 +10,8 @@ #include #include #include -#include "../gmeng.hpp" -#include "../utils/textures.cpp" +#include "../gmeng.h" +#include "../src/textures.cpp" namespace fs = std::filesystem; diff --git a/lib/bin/utils/textures.cpp b/lib/bin/src/textures.cpp similarity index 100% rename from lib/bin/utils/textures.cpp rename to lib/bin/src/textures.cpp diff --git a/lib/bin/utils/conio.hpp b/lib/bin/types/conio.h similarity index 100% rename from lib/bin/utils/conio.hpp rename to lib/bin/types/conio.h diff --git a/lib/bin/utils/UIElements.hpp b/lib/bin/types/interface.h similarity index 99% rename from lib/bin/utils/UIElements.hpp rename to lib/bin/types/interface.h index a8a682c..5074f3c 100755 --- a/lib/bin/utils/UIElements.hpp +++ b/lib/bin/types/interface.h @@ -1,5 +1,5 @@ #pragma once -#include "../gmeng.hpp" +#include "../gmeng.h" #include #include #include diff --git a/lib/bin/utils/envs/map.hpp b/lib/bin/types/map.h similarity index 99% rename from lib/bin/utils/envs/map.hpp rename to lib/bin/types/map.h index a28d7d7..27c63e1 100755 --- a/lib/bin/utils/envs/map.hpp +++ b/lib/bin/types/map.h @@ -14,6 +14,8 @@ using namespace std; /// GMENG 1.1 +/// DEPRECATED + namespace Gmeng { struct PlayerData { int startDX = 0; int startDY = 0; diff --git a/lib/bin/utils/termui.cpp b/lib/bin/types/termui.h similarity index 100% rename from lib/bin/utils/termui.cpp rename to lib/bin/types/termui.h diff --git a/lib/bin/utils/UIElements.cpp b/lib/bin/utils/interface.cpp similarity index 99% rename from lib/bin/utils/UIElements.cpp rename to lib/bin/utils/interface.cpp index 4d67fbb..4ee9c12 100755 --- a/lib/bin/utils/UIElements.cpp +++ b/lib/bin/utils/interface.cpp @@ -1,7 +1,7 @@ #pragma once -#include "../gmeng.hpp" +#include "../gmeng.h" #include "network.cpp" -#include "./UIElements.hpp" +#include "../types/interface.h" #include #include #include diff --git a/lib/bin/utils/network.cpp b/lib/bin/utils/network.cpp index 78fe25e..3659b81 100755 --- a/lib/bin/utils/network.cpp +++ b/lib/bin/utils/network.cpp @@ -16,7 +16,7 @@ #include #include #include -#include "../gmeng.hpp" +#include "../gmeng.h" #include #include @@ -435,18 +435,18 @@ std::map _vget_sv_data(const std::string& input) { } #ifndef __GMENG_MODELRENDERER__INIT__ - #include "../def/renderer.cpp" + #include "../src/renderer.cpp" #endif namespace Gmeng::Networking { namespace conversion { Renderer::drawpoint c_drawpoint(std::string val) { - __functree_call__(__FILE__, __LINE__, Gmeng::Networking::conversion::c_drawpoint); + //__functree_call__(__FILE__, __LINE__, Gmeng::Networking::conversion::c_drawpoint); auto v = g_splitStr(val, ","); return { std::stoi(v[0]), std::stoi(v[1]) }; }; Renderer::viewpoint c_viewpoint(std::string val) { - __functree_call__(__FILE__, __LINE__, Gmeng::Networking::conversion::c_viewpoint); + //__functree_call__(__FILE__, __LINE__, Gmeng::Networking::conversion::c_viewpoint); auto v = g_splitStr(val, "|"); return { c_drawpoint(v[0]), c_drawpoint(v[1]) }; }; diff --git a/lib/build b/lib/build index 82a9ab6..5a3c216 100755 --- a/lib/build +++ b/lib/build @@ -1,2 +1,2 @@ -g++ --std=c++20 -pthread ./bin/index.cpp -o ./out/gmeng.out `pkg-config --libs --cflags ncursesw` -Wno-switch-bool -Wno-format-security -framework ApplicationServices +g++ --std=c++20 -pthread ./bin/src/index.cpp -o ./out/gmeng.out `pkg-config --libs --cflags ncursesw` -Wno-switch-bool -Wno-format-security -framework ApplicationServices diff --git a/test.cpp b/test.cpp index 91a827f..91685a3 100755 --- a/test.cpp +++ b/test.cpp @@ -4,11 +4,11 @@ #include #include -#include "./lib/bin/gmeng.hpp" -#include "./lib/bin/utils/UIElements.cpp" -#include "./lib/bin/utils/network.cpp" -#include "lib/bin/def/renderer.cpp" -#include "lib/bin/utils/UIElements.hpp" +#include "lib/bin/gmeng.h" +#include "lib/bin/utils/interface.cpp" +#include "lib/bin/utils/network.cpp" +#include "lib/bin/src/renderer.cpp" +#include "lib/bin/utils/interface.hpp" #include #include #include diff --git a/tests/display.cpp b/tests/display.cpp index 9ea7693..4f389fb 100755 --- a/tests/display.cpp +++ b/tests/display.cpp @@ -1,5 +1,5 @@ #include -#include "../lib/bin/gmeng.hpp" +#include "../lib/bin/gmeng.h" using std::endl; diff --git a/tests/ncurses_acs.cpp b/tests/ncurses_acs.cpp new file mode 100644 index 0000000..b47c30b --- /dev/null +++ b/tests/ncurses_acs.cpp @@ -0,0 +1,69 @@ +#include +#include +#include +#include "lib/bin/gmeng.h" +// Function to draw all ncurses ACS characters +void draw_acs_chars() { + std::array, 42> acs_chars = {{ + {"ACS_ULCORNER", ACS_ULCORNER}, {"ACS_LLCORNER", ACS_LLCORNER}, + {"ACS_URCORNER", ACS_URCORNER}, {"ACS_LRCORNER", ACS_LRCORNER}, + {"ACS_LTEE", ACS_LTEE}, {"ACS_RTEE", ACS_RTEE}, + {"ACS_BTEE", ACS_BTEE}, {"ACS_TTEE", ACS_TTEE}, + {"ACS_HLINE", ACS_HLINE}, {"ACS_VLINE", ACS_VLINE}, + {"ACS_PLUS", ACS_PLUS}, {"ACS_S1", ACS_S1}, + {"ACS_S9", ACS_S9}, {"ACS_DIAMOND", ACS_DIAMOND}, + {"ACS_CKBOARD", ACS_CKBOARD}, {"ACS_DEGREE", ACS_DEGREE}, + {"ACS_PLMINUS", ACS_PLMINUS}, {"ACS_BULLET", ACS_BULLET}, + {"ACS_LARROW", ACS_LARROW}, {"ACS_RARROW", ACS_RARROW}, + {"ACS_DARROW", ACS_DARROW}, {"ACS_UARROW", ACS_UARROW}, + {"ACS_BOARD", ACS_BOARD}, {"ACS_LANTERN", ACS_LANTERN}, + {"ACS_BLOCK", ACS_BLOCK}, {"ACS_S3", ACS_S3}, + {"ACS_S7", ACS_S7}, {"ACS_LEQUAL", ACS_LEQUAL}, + {"ACS_GEQUAL", ACS_GEQUAL}, {"ACS_PI", ACS_PI}, + {"ACS_NEQUAL", ACS_NEQUAL}, {"ACS_STERLING", ACS_STERLING}, + {"ACS_BSSB", ACS_BSSB}, {"ACS_SSBB", ACS_SSBB}, + {"ACS_BBSS", ACS_BBSS}, {"ACS_SBBS", ACS_SBBS}, + {"ACS_SBSS", ACS_SBSS}, {"ACS_SSSB", ACS_SSSB}, + {"ACS_SSBS", ACS_SSBS}, {"ACS_BSBS", ACS_BSBS}, + {"ACS_BSSS", ACS_BSSS}, {"ACS_SSSS", ACS_SSSS} + }}; + + int row = 0; + for (const auto& acs_char : acs_chars) { + mvprintw(row, 0, "%s", acs_char.first); + mvaddch(row, 20, acs_char.second); + ++row; + } + const wchar_t *wstr = L""; + mvaddnwstr(row+1, 0, L"▼", 1); /// IIII LLOOOOOVVEEE YOUU!!!! BABY +} + +int main() { + // Initialize ncurses + initscr(); + setlocale(LC_ALL, ""); + cbreak(); + noecho(); + keypad(stdscr, TRUE); + + // Ensure terminal supports ACS characters + if (!has_colors()) { + endwin(); + printf("Your terminal does not support ACS characters\n"); + return 1; + } + + // Draw all ACS characters + draw_acs_chars(); + + // Refresh the screen to show the characters + refresh(); + + // Wait for user input + getch(); + + // End ncurses mode + endwin(); + + return 0; +} diff --git a/tests/out/gmeng.1.1.exe b/tests/out/gmeng.1.1.exe new file mode 100755 index 0000000..642ec11 Binary files /dev/null and b/tests/out/gmeng.1.1.exe differ diff --git a/tests/out/test.o b/tests/out/test.o index 943b15f..2201ab4 100755 Binary files a/tests/out/test.o and b/tests/out/test.o differ diff --git a/tests/out/test_1.exe b/tests/out/test_1.exe new file mode 100755 index 0000000..9e524a0 Binary files /dev/null and b/tests/out/test_1.exe differ diff --git a/tests/run_test.cpp b/tests/run_test.cpp new file mode 100755 index 0000000..73cec1c --- /dev/null +++ b/tests/run_test.cpp @@ -0,0 +1,125 @@ +#include +#include +#include +#include +#include +#include +#include "../lib/bin/gmeng.h" +#include +#include +#include +#include +#include "./test_runner.cpp" + +using namespace Gmeng; + +static std::string lib_name; +static std::string self = "./testrunner.so"; + +template +bool from_library(const std::string& func_name) { + if (lib_name.empty()) std::cout << colorformat("cannot call function " + func_name + " from library, lib_name is NULL.") << std::endl; + void* handle = dlopen(lib_name.c_str(), RTLD_NOW | RTLD_GLOBAL); + if (!handle) { + return false; + }; + auto loaded_func = reinterpret_cast(dlsym(handle, func_name.c_str())); + if (!loaded_func) { + dlclose(handle); + return false; + } + (*loaded_func)(); + dlclose(handle); + return true; +} + +template +bool from_self(const std::string& func_name) { + void* handle = dlopen(self.c_str(), RTLD_NOW | RTLD_GLOBAL); + if (!handle) { + return false; + }; + auto loaded_func = reinterpret_cast(dlsym(handle, func_name.c_str())); + if (!loaded_func) { + dlclose(handle); + return false; + } + (*loaded_func)(); + dlclose(handle); + return true; +} + +std::mutex mtx; +std::condition_variable cv; +std::atomic stop_flag {false}; + + +std::function do_async_task(std::function asyncFunction) { + std::promise exitSignal; + std::future exitFuture = exitSignal.get_future(); + + // Start the async task + std::thread thread = std::thread([&]() { + asyncFunction(); + }); + std::thread thread2 = std::thread([&]() { + while (!stop_flag.load()); + pthread_t t_native = static_cast(thread.native_handle()); + pthread_cancel(t_native); + }); + thread.detach(); + thread2.detach(); + // Return a function to stop the execution + return [&exitSignal]() { + std::unique_lock lock(mtx); + stop_flag.store(true); + std::cout << "just stop.\n"; + exitSignal.set_value(); // Signal the task to exit + }; +}; + +volatile sig_atomic_t running_test_file = 0; +volatile sig_atomic_t next_dont_stop = 0; + +void sigint_handle(int) { + if (next_dont_stop == 0) { next_dont_stop = 1; stop_flag.store(true); SAY("aborting " + v_str(next_dont_stop)); } else exit(0); + auto _________________should_just_be_null_but_whatever = std::async(std::launch::async, [&]() { + std::this_thread::sleep_for(ms(3000)); + next_dont_stop = 0; + stop_flag.store(false); + }); +}; + +int main(int argc, char** argv) { + INF("~Br~\x1F~h~~y~GMENG Test Running Utility~n~\n"); + INF("~h~~p~'help'~w~~n~ for help\n"); + if (argc > 1 && (!file_exists(argv[1]) || !endsWith(std::string(argv[1]), ".so"))) INF("~Br~ERROR~n~ ~h~~r~(e_unknwn_lib)~o~ Could not find SO Library ~y~'" + std::string(argv[1]) + "'~n~\n"), 0; + if (argc > 1 && ( file_exists(argv[1]) || endsWith(std::string(argv[1]), ".so"))) SAY("~Bb~INFO~n~ Library set to ~y~'" + std::string(argv[1]) +"'~n~\n"), lib_name = std::string(argv[1]); + while (lib_name.empty()) { + std::string input = prompt("~h~~c~library name (must end with *.so)>>"); + if (input == "help") { from_self("help"); continue; }; + if (!file_exists(input) || !endsWith(input, ".so")) { INF("~Br~ERROR~n~ invalid SO file name ~y~'" + input + "'~n~\n"); continue; }; + lib_name = input; + }; + std::signal(SIGINT, sigint_handle); + while (true) { + std::unique_lock lock(mtx); + if (stop_flag.load()) break; + /// todo: switch to kill-child version + /// + if (!running_test_file) { + running_test_file = true; + do_async_task([&]() { + std::unique_lock lock(mtx); + do_async_task([&]() { + while(!stop_flag.load()); + dlclose(""); + }); + bool lib = from_library("run"); + if (!lib) std::cout << colorformat("~Br~ERROR~n~ ~y~could not find entry-point void-return-type run() function in library."); + if (next_dont_stop == 0) SAY("press any key to re-run test, ctrl+c to exit"), std::cin.get(); + }); + }; + }; +}; + diff --git a/tests/run_test.cpp.o b/tests/run_test.cpp.o new file mode 100755 index 0000000..c4cf172 Binary files /dev/null and b/tests/run_test.cpp.o differ diff --git a/tests/test.cpp b/tests/test.cpp index b09e42a..8f724e7 100755 --- a/tests/test.cpp +++ b/tests/test.cpp @@ -4,8 +4,8 @@ #define __GMENG_LOG_TO_COUT__ true #include #include -#include "../lib/bin/gmeng.hpp" -#include "../lib/bin/def/renderer.cpp" +#include "../lib/bin/gmeng.h" +#include "../lib/bin/src/renderer.cpp" #define g_sleep std::this_thread::sleep_for #define ms std::chrono::milliseconds diff --git a/test.ts b/tests/test.ts similarity index 90% rename from test.ts rename to tests/test.ts index 3344045..e5a6dc5 100755 --- a/test.ts +++ b/tests/test.ts @@ -1,6 +1,6 @@ import chalk from "chalk"; -import builder from "./sdk/app/tsgmeng.js"; -import tui from "./sdk/ts-termui/utils/tui.js"; +import builder from "../sdk/app/tsgmeng.js"; +import tui from "../sdk/ts-termui/utils/tui.js"; async function main(value: number) { let choice = value ?? 0; diff --git a/tests/test_colors.cpp b/tests/test_colors.cpp new file mode 100755 index 0000000..ab12598 --- /dev/null +++ b/tests/test_colors.cpp @@ -0,0 +1,25 @@ + +#include +#include + +static std::string colors[] = { + "\x1B[39m", "\x1B[34m", "\x1B[32m", "\x1B[36m", + "\x1B[31m", "\x1B[35m", "\x1B[33m", "\x1B[30m", "\x1B[37m" +}; + +void printHello(int index) { + if (index < 0 || index >= sizeof(colors) / sizeof(colors[0])) { + std::cout << "Invalid color index." << std::endl; + return; + } + + std::cout << colors[index] << "Hello there" << colors[0] << " - Index: " << index << std::endl; +} + +int main() { + for (int i = 0; i < sizeof(colors) / sizeof(colors[0]); ++i) { + printHello(i); + } + + return 0; +} diff --git a/tests/test_runner.cpp b/tests/test_runner.cpp new file mode 100755 index 0000000..04db349 --- /dev/null +++ b/tests/test_runner.cpp @@ -0,0 +1,33 @@ +#include +#include +#include +#include "../lib/bin/gmeng.h" + +std::string prompt(std::string __p = "") { + std::cout << colorformat(__p.empty() ? ">>" : __p); + std::string input; + std::getline(std::cin, input); // Read a line of input + return input; +} + +using namespace Gmeng; + +extern "C" { + void help() { + INF("~Br~\x1F~h~~y~GMENG Test Running Utility~n~\n"); + SAY("~w~This utility uses ~y~SO (Shared Object)~n~ library files to run tests.\n"); + SAY("~w~This allows for users to recompile their program while it is running and reload the code from the library.\n"); + SAY("\nto create an ~y~SO~n~ file, use the flags '-fPIC -shared'\nwith your C++ code compiler, and set the output as '-o yourfile.so'"); + SAY("\nWhen writing test SO files, create a void run() method that calls its members.\n"); + SAY("The run method ~r~must NOT~n~ be any other return type. it has to be ~h~~y~void~n~.\n"); + SAY("the run() method will be called from the library in the same way the main() method is called.\n"); + SAY("the run() method ~r~can NOT have parameters~n~. it must be ~y~void ~g~main~w~() { ~h~\x1F~B1~/*...*/~n~~w~ };\n"); + SAY("TOM_TOM_FOOLERY\n"); + }; + void run() { + while (true) { + std::cout << "hellow, orld!" << std::endl; + std::this_thread::sleep_for(std::chrono::milliseconds(500)); + }; + }; +};