This is an old revision of the document!
PackShorts
format to fix SHORT_MIN
getting turned into 0trunc
and itrunc
returning X - 1 for integer Xs.RotateVectorSC
AnglesToVector
AngleDiff
randint
length2d
and length3d
aliasesacsutils_noerrors
is 1.HudSetTextOrigin
with HudSetAlignment
and HUD_TEXTORIGIN_*
with HUD_ALIGN_*
.PackShorts
output in database or cvars, copy broken UnpackShorts
implementation from previous version of ACSUtils and implement backwards compatibility.This is a hotfix release to fix broken 3D HudMessages in HUD Library.
No changes needed.
FIXED_MIN
and FIXED_MAX
constants for BCSUtils.No changes needed.
This release breaks backwards compatibility. Be sure to update your code accordingly.
acsutils_noerrors
cvar. ACSUtilsErrorHandler
is ignored.StrRepeat
having wrong argument type.HasColorCodes
and SkipColorCodeAt
interpreting literal "\\c"
as a colorcode beginning.rad2deg
and deg2rad
should now be more accurate and faster.IsAlive
now checks that the activator is in game.KeyBound
KeyToggled
KeyToggledAny
PlayerKeyToggled
PlayerKeyToggledAny
getbit
setbit
clrbit
tglbit
notflag
fract
bitlog2
condTrue
condFalse
randbool
randsign
RandomPick
StrIEquals
StrContains
LeftPad
RightPad
StrIsInt
StrIsFixed
SetActivatorToPlayer2
ConsolePlayerInGame
ConsolePlayerName
ConsolePlayerTeam
SetActivatorToConsolePlayer
PlayerIsDeadSpectator
PickRandomDeadSpectator
DeadSpectatorCount
GetPlayerTeam
PickRandomTeamPlayer
TeamPlayerCount
GetUserCVarFixed
ToggleActorInventory
IsServerOnly
IsClientOnly
GetGravityG
SetGravityG
jumpz2height
height2jumpz
TAU]] (see http://tauday.com/tau-manifesto)
*
USHORT_MAX
*
SBYTE_MAX
*
SBYTE_MIN
*
UBYTE_MAX
*
MAX_PLAYERS_ZDOOM
*
TEAM_NONE
*
HUDTIC
*
COLORCODE
==== Porting guide ====
1. Remove
ACSUTILS_HUDLIB_SAVEDSTATES and
ACSUtilsErrorHandler from your project.
2. Replace any uses of removed functions according to the table:
^ Name ^ Original ^ Replacement ^
^ AngleDistCCW |
AngleDistCCW(a, b) |
abs(a - b) |
^ AngleDistCW |
AngleDistCW(a, b) |
(1.0 - abs(a - b)) |
^ itof |
itof(x) |
(x << 16) |
^ lang |
lang(s) |
StrParam(l:s) |
^ byte2ang |
byte2ang(x) |
(x * 256) |
^ ang2byte |
ang2byte(x) |
(x / 256) |
^ GetCVarPercentage |
GetCVarPercentage(name) |
((GetCVar(name)<<16) / 100) |
3. Rename the following functions:
^ Original name ^ New name ^
| GetActorCurrentSpeed |
GetActorVelocity |
| GetActorCurrentSpeed2D |
GetActorXYVelocity |
| StrTimes |
StrRepeat |
| StrMidRange |
StrSlice |
| HasRoom |
HasRoomFor |
| StatusBarShown |
StatusBarVisible |
| TakeAllInventory |
TakeMaxInventory |
| TakeAllActorInventory |
TakeMaxActorInventory |
4. Replace all uses of SwapActivator and RestoreActivator with ACS_NamedExecuteWithResult.
5. Recompile all script objects linked to ACSUtils to suppress warnings about renamed internal arrays.
===== 1.5.1 =====
This is a bugfix release. It now uses the MIT license.
* Fixed
GetCVarFixed crashing ZDoom when trying to access a nonexistent CVar. Now it returns 0.
* Fixed an off-by-one error in
mod.
* Fixed some constants not using
#libdefine.
* Fixed additive blending not working in HUD Library when alpha is set to 1.0.
*
ChangeFlag now support short flag names (e.g.
"NOAUTOFIRE" instead of
"WEAPON.NOAUTOFIRE"). Update
decorate/changeflag.txt to use this. (Thanks to The Zombie Killer.)
*
GetAspectRatio updated to a newer version.
==== Porting guide ====
- Update
decorate/changeflag.txt.
- If you are using additive HudMessages in HUD Library, make sure that none of the non-additive messages in your mod became additive.
===== 1.5 =====
SendString!
* Added ACS_SendString() and ACS_NamedSendString() to send strings from server to client.
* Added
IsZandronum212()
*
GetAspectRatio() now triggers a ProgramError when used serverside.
* Fixed
ChangeFlag not working with
INVENTORY.NOTELEPORTFREEZE.
* All internal functions now use
ACSUtils_ prefix.
* Removed
ScreenWidth(),
ScreenHeight(), and
AspectRatio().
==== Porting guide ====
- Replace all uses of
ScreenWidth() and
ScreenHeight() with ZDoom functions
GetScreenWidth and
GetScreenHeight.
- Replace all uses of
AspectRatio() with
IntDiv(GetScreenWidth(), GetScreenHeight()).
===== 1.4 =====
Widescreen support!
* Mouse cursor now supports widescreen!
* Added
GetAspectRatio().
* Added widescreen hud size functions (in widescreen module and HUD Library).
==== Porting guide ====
* Make sure that your cursor code supports widescreen cursor coordinates.
===== 1.3.2 =====
ACSUtils is now distributed not as a collection of files, bu as a single file (generated using acsinclude).
* Fixed warnings about mismatched array sizes on map scripts.
* Added
swap().
*
atoi() and
atof() now return
INT_MAX multiplied by sign instead of 0 on overflow.
* Removed
ftoi().
==== Porting guide ====
- Remove all ACSUtils files from your project, except acsutils.acs. acsutils.acs now contains the whole ACSUtils.
- Replace all uses of
ftoi() with
floor().
- Review all uses of
atoi() and
atof().
===== 1.3.1 =====
Fixed duplicate actor warnings in changeflag.txt
==== Porting guide ====
No changes needed.
===== 1.3 =====
ChangeFlag, IsGZDoom, and improved cursor API! Thanks to The Zombie Killer for allowing ACS-X technologies to be included into ACSUtils!
* Added ChangeFlag
! (implementation from ACS-X)
* Fixed vertical cursor movement being too slow
* Added
CursorMotionX() and
CursorMotionY() and changed
CursorDeltaX() and
CursorDeltaY() to return the actual delta.
* Added
EnableCursorWrapX() and
EnableCursorWrapY().
* Added GZDoom identification (implementation from ACS-X).
* Zandronum identification does not require a database anymore (implementation from ACS-X).
*
IsOpenGL() now does not return true in ZDoom with vid_renderer 1.
* Added
ClearHudMessageBold().
* Added constants for log2(e) and log2(10).
==== Porting guide ====
* If you were using
CusrorDeltaX/Y and need them to return non-zero values at the edges of the screen, replace their uses with
CursorMotionX/Y.
===== 1.2.2.1 =====
Fixed a very dumb bug in fixed-point logarithms that I made when adding them to ACSUtils.
===== 1.2.2 =====
New logarithm functions and proper
IntDiv by TechnoDoomed1. Thank you!
* Added logarithm functions.
*
IntDiv now handles any numbers whose ratio is less than 32768.
* Added
SyncSpeed().
* Added
ACSUtilsVersion().
==== Porting guide ====
No changes needed.
===== 1.2.1 =====
This is a bugfix release.
* Renamed
GetCVarFixed to
a_GetCVarFixed for GDCC compatibility.
*
HudSetCameraAngles no longer inverts the pitch.
* Fixed
StrIsAscii storing an integer in a
str variable.
==== Porting guide ====
- Replace all uses of
GetCVarFixed with
a_GetCVarFixed.
- Invert the second argument to
HudSetCameraAngles.
===== 1.2 =====
New features!
* Added full software renderer support to 3D HudMessages.
* Added mouse cursor API (acscursor).
*
IsOpenGL() now emits a ProgramError when used serverside.
*
IsOpenGL() is now very slightly more accurate.
* Hudlib saved state stack size can now be configured in ACSUtils settings.
* Fixed
IsServer() killing the calling script in ZDoom.
* Added actor property shorthands with bandwidth optimization.
* Added ACSUtils version information constants.
* Added
npo2().
* Added
mod().
* Added
cond().
* Renamed
sign() to
sgn() to reduce name clashes.
==== Porting guide ====
- Add
#define ACSUTILS_HUDLIB_SAVEDSTATES 16 ACSUtils settings before
#include “acsutils.acs”. You can change the amount of saved states if needed.
- Replace all uses of
sign() with
sgn().
- Review all uses of
IsOpenGL().
- If you require hudlib to use true 3d projection in software, use
HudSetProjectionMode(HUD_PROJECTION_YSHEARING).
- If you are using 3D hudmessages serverside, use
HudSetProjectionMode(HUD_PROJECTION_3D) to fix the ProgramError about using
IsOpenGL() serverside.
===== 1.1.3 =====
This is a maintenance release that enables ACSUtils to be used in AOW-scale projects.
* All global (map) variables of ACSUtils have been put into an array due to ZDoom's 128 map variable limit. Now ACSUtils uses just 11 map variables and can be used in big projects.
* Fixed
IsServer() returning false in singleplayer.
==== Porting guide ====
- Review all uses of
IsServer().
===== 1.1.2 =====
This is a bugfix release.
* Added
IsServer() function.
* Added
StrAddInt(),
StrAddFixed(), and
StrAddChar() functions.
*
IsOpenGL() now takes
gl_nogl into account.
* Renamed
ActorName() to
GetActorName() to reduce name clashes.
* Fixed
ParseFixed() returning an error on integers.
* Fixed
PARSENUMBER_BADFORMAT and
PARSENUMBER_OVERFLOW having the same value.
* Fixed empty strings parsing as 0.
==== Porting guide ====
- Replace all uses of
ActorName() with
GetActorName().
- Review all code that relies on number parsing to see whether it's affected by the bug fixes.
===== 1.1.1 =====
This is a release that overcomes the 256 functions per compiled file limitation.
* Added
#nocompact to fix ZDoom crashes when there are more than 256 functions in a compiled file.
* Fixed BCC compatibility.
==== Porting guide ====
No changes needed.
===== 1.1 =====
* Error handler is now a function, not a script.
* Made public constants use
#libdefine instead of
#define, making them usable in map scripts.
* Added
GiveMaxInventory,
GiveMaxActorInventory,
TakeAllInventory,
TakeAllActorInventory.
* Added
IntDiv
* Added
lang
* Fixed
ceil and
iceil incorrectly adding 1 to already round numbers (
ceil(1.0) == 2.0)
* Optimized
SetInventory and
SetActorInventory for multiplayer.
==== Porting guide ====
- Replace your error handling script with a function and remove
ACSUTILS_ERROR_HANDLER.
- Review any uses of
ceil''.