<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://acsutils.strangled.net/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel xmlns:g="http://base.google.com/ns/1.0">
        <title>ACSUtils Wiki - new</title>
        <description>An ACS library for ZDoom-based ports</description>
        <link>https://acsutils.strangled.net/</link>
        <lastBuildDate>Fri, 01 May 2026 22:22:36 +0000</lastBuildDate>
        <generator>FeedCreator 1.8</generator>
        <image>
            <url>https://acsutils.strangled.net/_media/wiki:dokuwiki.svg</url>
            <title>ACSUtils Wiki</title>
            <link>https://acsutils.strangled.net/</link>
        </image>
        <item>
            <title>ACC</title>
            <link>https://acsutils.strangled.net/new:acc?rev=1519143549&amp;do=diff</link>
            <description>ACC

	*  GitHub
	*  Download

ACC is the official ACS compiler.  

Caveats

Local variable names can conflict with global names


#define SOMENAME1 1
int somename2 = 2;
function void somename3(void) {}

function f(int somename1) // ERROR
{
    int somename2; // ERROR
    int somename3; // ERROR
}</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 20 Feb 2018 16:19:09 +0000</pubDate>
        </item>
        <item>
            <title>Actor property wrappers</title>
            <link>https://acsutils.strangled.net/new:actor_properties?rev=1519037081&amp;do=diff</link>
            <description>Actor property wrappers

ACSUtils provides wrapper functions for all actor properties. These functions serve several purposes:

	*  Save typing and increase readability.
	*  Reduce bandwidth use caused by SetActorProperty.
	*  Provide strict type checking for actor properties.

For every actor property ACSUtils provides two functions:</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 19 Feb 2018 10:44:41 +0000</pubDate>
        </item>
        <item>
            <title>Array sorting and shuffling</title>
            <link>https://acsutils.strangled.net/new:array?rev=1519214243&amp;do=diff</link>
            <description>Array sorting and shuffling

Array sorting and shuffling functions use script names as callbacks.

SortArray

void SortArray(int begin, int end, str lt, str swap)

Sorts an array with indices in range [begin, end). lt and swap are names of scripts that the function will call.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 21 Feb 2018 11:57:23 +0000</pubDate>
        </item>
        <item>
            <title>BCC</title>
            <link>https://acsutils.strangled.net/new:bcc?rev=1518830980&amp;do=diff</link>
            <description>BCC

	*  GitHub 
	*  Documentation
	*  ZDoom forum thread 

BCC is an alternative ACS compiler. If you are taking full advantage of BCS, it is recommended to use BCSUtils -- a version of ACSUtils with full support for BCS strict typing.

If you are using BCC to compile regular ACS, ACSUtils is still fully supported in BCC, but will cause type errors if you enable</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 17 Feb 2018 01:29:40 +0000</pubDate>
        </item>
        <item>
            <title>BCSUtils</title>
            <link>https://acsutils.strangled.net/new:bcsutils?rev=1519135160&amp;do=diff</link>
            <description>BCSUtils

BCSUtils is an enhanced version of ACSUtils designed for use with the BCC compiler. BCSUtils is not a separate project. ACSUtils and BCSUtils are produced from the same source code and always stay in sync. BCSUtils has exactly the same functions and constants as ACSUtils, so all ACSUtils documentation also works for BCSUtils.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 20 Feb 2018 13:59:20 +0000</pubDate>
        </item>
        <item>
            <title>Bit functions</title>
            <link>https://acsutils.strangled.net/new:bits?rev=1519036145&amp;do=diff</link>
            <description>Bit functions

These functions are for bit math.

Powers of two

	*  int npo2(int x) -- returns the next lowest power of 2 greater or equal to X.
	*  int bitlog2(int x) -- returns the index of the highest used bit, aka integer binary logarithm. Useful to convert flags like</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 19 Feb 2018 10:29:05 +0000</pubDate>
        </item>
        <item>
            <title>ChangeFlag</title>
            <link>https://acsutils.strangled.net/new:changeflag?rev=1518969868&amp;do=diff</link>
            <description>ChangeFlag

	*  void ChangeFlag(str flag, bool value)
	*  void ChangeActorFlag(int tid, str flag, bool value)

ACSUtils provides an implementation of A_ChangeFlag for ACS. Before using it, you need to add decorate/changeflag.txt from ACSUtils to your mod.

It works by defining two inventory items for every flag. When given, one of them calls</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 18 Feb 2018 16:04:28 +0000</pubDate>
        </item>
        <item>
            <title>Changelog</title>
            <link>https://acsutils.strangled.net/new:changelog?rev=1519761919&amp;do=diff</link>
            <description>Changelog

1.8.2

	*  Removed all uses of local arrays as they are not supported in Zandronum 3.0.
	*  Added getNumDigits.
	*  Removed broken bitlog2 that returned 0 for numbers greater than 15.
	*  Added flag2index as a replacement for bitlog2.
	*  Added</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 27 Feb 2018 20:05:19 +0000</pubDate>
        </item>
        <item>
            <title>Character functions</title>
            <link>https://acsutils.strangled.net/new:ctype?rev=1519148501&amp;do=diff</link>
            <description>Character functions

ACSUtils implements functions from the C programming language&#039;s ctype.h. Only ASCII characters are supported.

Character classification

	*  bool isalnum(int c) -- returns true if the character is a letter or a digit.
	*  bool isalpha(int c)</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 20 Feb 2018 17:41:41 +0000</pubDate>
        </item>
        <item>
            <title>ACSUtils error handling</title>
            <link>https://acsutils.strangled.net/new:error?rev=1519036318&amp;do=diff</link>
            <description>ACSUtils error handling

If you call some ACSUtils function incorrectly, it will trigger an ACSUtils error.

ACSUtils errors instantly display an error message. All error messages begin with current game time in tics (Timer) and “ACSUtils error:”. The error message is displayed differently based on whether the error occured in singleplayer, clientside or serverside:</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 19 Feb 2018 10:31:58 +0000</pubDate>
        </item>
        <item>
            <title>floor</title>
            <link>https://acsutils.strangled.net/new:floor?rev=1566772174&amp;do=diff</link>
            <description>floor


fixed floor(fixed x)


Returns X rounded down.

See Rounding for more information.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 25 Aug 2019 22:29:34 +0000</pubDate>
        </item>
        <item>
            <title>HUD Library</title>
            <link>https://acsutils.strangled.net/new:hud_library?rev=1519143386&amp;do=diff</link>
            <description>HUD Library

Pipeline

	*  Call SetFont:
		*  If text message: call SetFont with current font
		*  If image message: call SetFont with the chosen image

	*  If 3D HudMessage:
		*  Project target point onto the screen
		*  Compute scale factor from distance if</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 20 Feb 2018 16:16:26 +0000</pubDate>
        </item>
        <item>
            <title>HUD functions</title>
            <link>https://acsutils.strangled.net/new:hud?rev=1518970961&amp;do=diff</link>
            <description>HUD functions

For advanced HUD programming, try HUD Library.

ClearHudMessage

void ClearHudMessage(int id)
void ClearHudMessageBold(int id)

Remove HudMessage with the given id.

This is a very useful shorthand for HudMessage(s:“”; HUDMSG_PLAIN, id, 0, 0.0, 0.0, 0.0, 0.0);</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 18 Feb 2018 16:22:41 +0000</pubDate>
        </item>
        <item>
            <title>Input library</title>
            <link>https://acsutils.strangled.net/new:input?rev=1518869415&amp;do=diff</link>
            <description>Input library

ACSUtils provides a set of wrappers for GetPlayerInput to make writing correct input code easier.

Basic concepts

	*  Every key is either up or down at any time.
	*  If the key was up the previous tic, but is now down, it is said to have been pressed</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 17 Feb 2018 12:10:15 +0000</pubDate>
        </item>
        <item>
            <title>Inventory functions</title>
            <link>https://acsutils.strangled.net/new:inventory?rev=1732365551&amp;do=diff</link>
            <description>Inventory functions

SetInventory

	*  void SetInventory(str itemname, int count)
	*  void SetActorInventory(int tid, str itemname, int count)

Sets the number of items in actor&#039;s inventor to count. This is useful when treating inventory items like variables stored in actors.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 23 Nov 2024 12:39:11 +0000</pubDate>
        </item>
        <item>
            <title>Numeric limits</title>
            <link>https://acsutils.strangled.net/new:limits?rev=1518898173&amp;do=diff</link>
            <description>Numeric limits

ACSUtils defines constants that represent minimum and maximum values that can be stored in memory blocks (variables) of various sizes.

32-bit

ACS int is a signed 32-bit integer. Unsigned ints don&#039;t exist in ACS, so UINT_MAX can&#039;t be expressed.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 17 Feb 2018 20:09:33 +0000</pubDate>
        </item>
        <item>
            <title>Vector math</title>
            <link>https://acsutils.strangled.net/new:math?rev=1555799149&amp;do=diff</link>
            <description>*  fixed AngleDiff(fixed a, fixed b) -- returns the shortest signed rotation angle needed to go from angle A to angle B. Result is always in [-0.5, 0.5]. Both A and B may be outside [0.0, 1.0].
	*  num gcf(num a, num b) -- returns the greatest common factor of two numbers.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 20 Apr 2019 22:25:49 +0000</pubDate>
        </item>
        <item>
            <title>Miscellaneous ZDoom utilities</title>
            <link>https://acsutils.strangled.net/new:misc?rev=1519137076&amp;do=diff</link>
            <description>Miscellaneous ZDoom utilities

KeyBound

bool KeyBound(str command)

Returns true if the command is bound to any key.

This function works by calling StrParam(k:command) and reading the returned string. If the returned string is “??? (command)”, no key is bound to the command.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 20 Feb 2018 14:31:16 +0000</pubDate>
        </item>
        <item>
            <title>Mouse cursor library</title>
            <link>https://acsutils.strangled.net/new:mouse?rev=1519038259&amp;do=diff</link>
            <description>Mouse cursor library

ACSUtils provides a mouse cursor library, which lets you easily add mouse support to any interface in your mod. It is very easy to use:


while (true)
{
    UpdateCursor();
    DRAW_CURSOR_AT(CursorX(), CursorY());
    Delay(1);
}</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 19 Feb 2018 11:04:19 +0000</pubDate>
        </item>
        <item>
            <title>Number parsing functions</title>
            <link>https://acsutils.strangled.net/new:number_parsing?rev=1518969691&amp;do=diff</link>
            <description>Number parsing functions

Number parsing functions parse strings like “123”, “3.14” or “0xff” and return an integer or fixed-point number of the same value.

Simple number parsing

Simple number parsing functions return 0 if the input string cannot be parsed as a number, and return the minimum or maximum possible value (</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 18 Feb 2018 16:01:31 +0000</pubDate>
        </item>
        <item>
            <title>Value packing</title>
            <link>https://acsutils.strangled.net/new:packing?rev=1518895542&amp;do=diff</link>
            <description>Value packing

All ACS integers are 32-bit. Value packing functions let you store four 8-bit integers or two 16-bit integers in one 32-bit int variable. This can be useful, for example, to store RGBA colors in a single variable. Or to store big arrays using less memory.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 17 Feb 2018 19:25:42 +0000</pubDate>
        </item>
        <item>
            <title>Player utilities</title>
            <link>https://acsutils.strangled.net/new:player?rev=1519216190&amp;do=diff</link>
            <description>Player utilities

Stuff related to dealing with players and teams.

Constants

	*  MAX_PLAYERS = 64 -- maximum player count in Zandronum multiplayer.
	*  MAX_PLAYERS_ZDOOM = 8 -- maximum player count in ZDoom multiplayer.
	*  TEAM_NONE = 255 -- team number meaning</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 21 Feb 2018 12:29:50 +0000</pubDate>
        </item>
        <item>
            <title>Random number functions</title>
            <link>https://acsutils.strangled.net/new:random?rev=1519135248&amp;do=diff</link>
            <description>Random number functions

These functions are wrappers around Random.

	*  int randint() -- returns a random integer.
	*  bool randbool() -- returns either true or false.
	*  int randsign() -- returns either 1 or -1. Intended use: randsign() * 100.

RandomPick</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 20 Feb 2018 14:00:48 +0000</pubDate>
        </item>
        <item>
            <title>String functions</title>
            <link>https://acsutils.strangled.net/new:string?rev=1519149527&amp;do=diff</link>
            <description>String functions

Most case-insensitive string functions use toupper and tolower, which don&#039;t support non-ASCII characters.

	*  bool StrIsEmpty(str s) -- returns true if S is an empty string (“”). Do not use with invalid string ids.
	*  bool StrEquals(str a, str b) -- returns true if strings are equal. Wrapper for</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 20 Feb 2018 17:58:47 +0000</pubDate>
        </item>
        <item>
            <title>Ternary operator in ACS</title>
            <link>https://acsutils.strangled.net/new:ternary?rev=1518971481&amp;do=diff</link>
            <description>Ternary operator in ACS

ACC doesn&#039;t support the ternary operator &#039;?:&#039;, but BCC and GDCC do. To emulate it in ACC, ACSUtils implements the following trivial function:

any cond(bool condition, any a, any b)

If condition is true, it returns a, otherwise it returns b.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 18 Feb 2018 16:31:21 +0000</pubDate>
        </item>
        <item>
            <title>Unit conversion</title>
            <link>https://acsutils.strangled.net/new:units?rev=1518869174&amp;do=diff</link>
            <description>Unit conversion

ACSUtils provides a range of functions to convert various commonly used units. All unit conversion functions operate only on fixed-point numbers, even if ZDoom only uses integers for some of these units. The only exception is byte angle conversion functions, because byte angles are always integers.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 17 Feb 2018 12:06:14 +0000</pubDate>
        </item>
        <item>
            <title>Using ACSUtils</title>
            <link>https://acsutils.strangled.net/new:using_acsutils?rev=1519214313&amp;do=diff</link>
            <description>Using ACSUtils

Adding ACSUtils to your project

	*  Download the latest acsutils-x.x.x.zip.
	*  Copy acsutils.acs into your project.
	*  Include acsutils.acs after zcommon.acs:


#include &quot;zcommon.acs&quot;
#include &quot;acsutils.acs&quot;


floor(), ceil() and round() conflicts</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 21 Feb 2018 11:58:33 +0000</pubDate>
        </item>
        <item>
            <title>Widescreen support</title>
            <link>https://acsutils.strangled.net/new:widescreen?rev=1519215298&amp;do=diff</link>
            <description>Widescreen support

These function enable true widescreen support in HUD scripts.

Calculating screen boundaries

Actual screen boundaries in widescreen are outside the HUD coordinate system&#039;s rectangle. These functions can calculate true screen boundaries in HUD coordinate system.

	*  void HudSetVirtualSize(fixed width, fixed height)</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 21 Feb 2018 12:14:58 +0000</pubDate>
        </item>
    </channel>
</rss>
