You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.5 KiB

# PreDeh
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.
# Usage
> PreDeh.exe 'File.deh'
Output file will be 'File.o'
Exemple :
> PreDeh.exe DIMP.deh
# Include directive
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.
# Define directive
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