Blitz Preprocessor Released As Open Source

Miscellaneous Forums/Blitz Showcase/Blitz Preprocessor Released As Open Source

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

New to macros:

#defmacro blah

#ifmacroarg 2

TwoArguments ()

#elseifmacroarg

OneArguemtn( )

#endifmacroarg

#enddefmacro

#macro blah, hah
#macro blah, hah, hah


will generate

OneArgument( )
TwoArguments( )


Also, the constants DEBUG, COMPILEONLY and CREATINGEXE are defined automatically depending on what the user is doing. So, you can do something really cool like:

#ifdef DEBUG
Text 1, 1, FPS( )
#endif

#ifdef CREATINGEXE
#ifdef DEBUG
RuntimeError "WHAT THE HELL ARE YOU DOING!?"
#endif
#endif