- fix markdown in Readme - changed version
|1 year ago|
|exemple||1 year ago|
|src||1 year ago|
|LICENSE||1 year ago|
|README.md||1 year ago|
PreDeh is a command-line tool used for simple textual substitutions. Since you can't define stuff in dehacked, I made this tool to allow you to do so. This tool can be useful if you need to shift a lot of frames for an actor definition for exemple (Instead of replacing frame numbers manually). You just need to define the first frame of the first actor. You can include files full of defines (check the exemple folder) or you can simply define stuff into the dehacked file itself. The tool will remove automatically the directives lines in the Output file.
Keep in mind that this tool was made for me in the first place : It's working fine (for my tastes) and I don't need more features in it.
Output file will be 'File.o'
To include a file definition, you need to type :
#include "file path"
at the start of your file. You just need a space after the include keyword. The quotation mark are required.
There is multiple ways to define directives :
#define HEIGHT 1 #define WIDTH HEIGHT+1 #define TEST 1
You can only use addition. The value don't take any space. (EX : 'HEIGHT+1') defines are used for defining numbers only. Use non-dehacked keyword otherwise the tool will replace them. You can use previously defined directive to define a new one, but use it only first. This will not work :
#define GROUND 1+HEIGHT #define GROUND HEIGHT+HEIGHT+1