diff --git a/programs/cmm/examples/Tupfile.lua b/programs/cmm/examples/Tupfile.lua index dd9ff3d2d1..65b13ccf1c 100644 --- a/programs/cmm/examples/Tupfile.lua +++ b/programs/cmm/examples/Tupfile.lua @@ -7,3 +7,4 @@ tup.rule("window.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_ tup.rule("collections.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "collections.com") tup.rule("menu.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "menu.com") tup.rule("rgb.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "rgb.com") +tup.rule("console.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "console.com") diff --git a/programs/cmm/examples/compile_en.bat b/programs/cmm/examples/compile_en.bat index cba7f6bc96..3c16a59b9d 100644 --- a/programs/cmm/examples/compile_en.bat +++ b/programs/cmm/examples/compile_en.bat @@ -1,9 +1,10 @@ @del *.kex -@c-- window.c @c-- collections.c +@c-- console.c @c-- menu.c @c-- rgb.c +@c-- window.c @rename *.com *.kex @mkdir bin diff --git a/programs/cmm/examples/console.c b/programs/cmm/examples/console.c new file mode 100644 index 0000000000..17aed7a25f --- /dev/null +++ b/programs/cmm/examples/console.c @@ -0,0 +1,18 @@ +/* + * Console example in C-- +*/ + +#define MEMSIZE 4096*10 + +#include "../lib/obj/console.h" + +void main() +{ + load_dll(libConsole, #con_init, 0); + con_init stdcall (-1, -1, -1, -1, "Hello"); + con_set_flags stdcall (0x1F); + con_write_string stdcall ("Console test", 12); + con_exit stdcall (0); + ExitProcess(); +} + diff --git a/programs/cmm/lib/obj/console.h b/programs/cmm/lib/obj/console.h index 51e8f64d5e..12c768537c 100644 --- a/programs/cmm/lib/obj/console.h +++ b/programs/cmm/lib/obj/console.h @@ -50,7 +50,7 @@ char a_con_gets[] = "con_gets"; char a_con_gets2[] = "con_gets2"; char a_con_get_font_height[] = "con_get_font_height"; char a_con_get_cursor_height[] = "con_get_cursor_height"; -char a_con_set_cursor_height[] = "con_ges_focursoreight"; +char a_con_set_cursor_height[] = "con_set_cursor_height"; char a_con_cls[] = "con_cls"; char a_con_get_cursor_pos[] = "con_get_cursor_pos"; char a_con_set_cursor_pos[] = "con_set_cursor_pos";