Editing ACS directives

From Eternity Wiki
Jump to navigationJump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 5: Line 5:
*'''<nowiki>#include</nowiki>''' ''filename''
*'''<nowiki>#include</nowiki>''' ''filename''
:Includes the content of the given filename. It is generally used to include the common definition file ''zcommon.acs''.
:Includes the content of the given filename. It is generally used to include the common definition file ''zcommon.acs''.
*'''<nowiki>#library</nowiki>''' ''name''
*'''<nowiki>#library</nowiki>'''
:Defines the following code as a [[library]]. If used, it should be the very first directive, above even {{c|#include "zcommon.acs"}}.
:Defines the following code as a [[library]]. If used, it should be the very first directive, above even {{c|#include "zcommon.acs"}}.
*'''<nowiki>#import</nowiki>''' ''library_name''
*'''<nowiki>#import</nowiki>''' ''library name''
:Imports a [[library]]. This allows to use [[ACS|scripts]], [[functions]], and [[constants]] defined in the library. Libraries should not be #included!
:Imports a [[library]]. This allows to use [[ACS|scripts]], [[functions]], and [[constants]] defined in the library. Libraries should not be #included!
*'''<nowiki>#define</nowiki>''' ''constant_name'' ''value''
*'''<nowiki>#define</nowiki>''' ''constant_name'' ''value''
Line 16: Line 16:
:This directive prevents the compiler from "compacting" or "shrinking" the bytecode where possible. In effect, this forces it to use the ACSE format instead of the ACSe format. It has no effect if compiling in ACS0 format.
:This directive prevents the compiler from "compacting" or "shrinking" the bytecode where possible. In effect, this forces it to use the ACSE format instead of the ACSe format. It has no effect if compiling in ACS0 format.
*'''<nowiki>#wadauthor</nowiki>'''
*'''<nowiki>#wadauthor</nowiki>'''
:Forces the compiler to create a "valid" ACS0 stub (in addition to the ACSe or ACSE bytecode) so that some old error checkers will not report ACS errors.
:Forces the compiler to create a "valid" ACS0 stub (in addition to the ACSe or ACSE bytecode) so that [https://doomwiki.org/wiki/WadAuthor WadAuthor]'s error checker will not report ACS errors.
*'''<nowiki>#nowadauthor</nowiki>'''
*'''<nowiki>#nowadauthor</nowiki>'''
:Forces the compiler ''not'' to create a valid ACS0 stub. The bytecode will be slightly smaller as a result, but some old error checkers will mistakenly report that the compiled ACS is broken.
:Forces the compiler ''not'' to create a valid ACS0 stub. The bytecode will be slightly smaller as a result, but WadAuthor's error checker will mistakenly report that the compiled ACS is broken.
*'''<nowiki>#region</nowiki>'''
*'''<nowiki>#region</nowiki>'''
*'''<nowiki>#endregion</nowiki>'''
*'''<nowiki>#endregion</nowiki>'''
:Define the start ({{c|#region}}) and end ({{c|#endregion}}) of a fold-able block of code. This is of use with text editors which support the ability to define ''code folders'' such as [https://doomwiki.org/wiki/Doom_Builder_2#Forks GZDoom Builder]'s script editor.
:Define the start ({{c|#region}}) and end ({{c|#endregion}}) of a fold-able block of code. This is of use with text editors which support the ability to define ''code folders'' such as [https://doomwiki.org/wiki/Doom_Builder_2#Forks GZDoom Builder]'s script editor.
==See also==
*[[ACS scripting]]
[[Category:ACS]]
[[Category:ACS]]
[[Category:Editing reference]]
[[Category:Editing reference]]
Please note that all contributions to Eternity Wiki are considered to be released under the GNU Free Documentation License 1.2 (see Eternity Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)

Templates used on this page: