From 9d19d8d4f97cfadd599f9106621a3cbcd05a7705 Mon Sep 17 00:00:00 2001 From: Priw8 <44707079+Priw8@users.noreply.github.com> Date: Thu, 23 Jan 2020 15:59:20 +0100 Subject: [PATCH] add README and ECLinclude --- ECLinclude/ECLplus.eclm | 7 +++++++ ECLinclude/ECLplus.tecl | 6 ++++++ README.md | 16 ++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 ECLinclude/ECLplus.eclm create mode 100644 ECLinclude/ECLplus.tecl create mode 100644 README.md diff --git a/ECLinclude/ECLplus.eclm b/ECLinclude/ECLplus.eclm new file mode 100644 index 0000000..29f32cb --- /dev/null +++ b/ECLinclude/ECLplus.eclm @@ -0,0 +1,7 @@ +!eclmap +!ins_names +2000 msgf +2001 printf +2002 cls +2003 drawf +2004 drawColor \ No newline at end of file diff --git a/ECLinclude/ECLplus.tecl b/ECLinclude/ECLplus.tecl new file mode 100644 index 0000000..082909f --- /dev/null +++ b/ECLinclude/ECLplus.tecl @@ -0,0 +1,6 @@ +#eclmap "ECLplus.eclm" +#ins "2000 m*D" +#ins "2001 m*D" +#ins "2002" +#ins "2003 mff*D" +#ins "2004 S" \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..8c6ee8a --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# ECLplus +ECLplus is a modification for Touhou 17 - Wily Beast and Weakest Creature. It's main goal is adding more instructions for ECL scripts. + +## Usage +### Installation +Put `ECLPLUS.dll` and `ECLplusLoader.exe` in the folder where `th17.exe` is located, and launch the game by using the loader. If you wish to use thcrap, you can change `th17.exe` in `games.js` to `ECLplusLoader.exe` and it will just work. If everything went correctly, a console with a message from ECLplus will start alongside the main game window (small note: with thcrap console enabled, both ECLplus and thcrap will end up outputting to the same console, and the ECLplus message will get burried under a massive amount of thcrap logs). + +### Using custom instructions +In your ECL source file, `#include` the `ECLplus.tecl` script from the `ECLinclude` directory in order to get instruction names and definitios of ECLplus. Then, you can use the new instructions freely. + +## Instruction list +- `msgf(string format, ...)` - shows a printf-formatted message box. Example: `msgf("Hello from ECL! My id is %d", _SS ID)` (note that since this uses the `D` param type for extra parameters, prefixing with typecast is necessary as of current thecl version). +- `printf(string format, ...)` - prints a printf-formatted string in the console, same concept as the instruction above. +- `cls()` - clears the console. +- `drawf(string format, float x, float y, ...)` - draws a printf-formatted string on the given coordinates in the game window (ECL coordinate system). Top-left corner of the string corresponds to the coordinates given. It will only be drawn for 1 frame, in order to keep it displayed all the time `drawf` needs to be in a loop. +- `drawColor(int c)` - sets color of strings drawn by `drawf`. Example: `drawColor(0xFF00FF00)` sets color to green. The order is reversed (ABGR), so this has alpha value of `FF`, blue value of `00`, green value of `FF` and red value of `00`. \ No newline at end of file