From 8f87c3761bc84ad92e32d803eb2d4e4afe1051c9 Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Wed, 28 Dec 2022 16:58:16 -0500 Subject: [PATCH] Finish Script Editor tooltips --- extras/conf/RingRacers_ACS.cfg | 1091 +++++++++++++++++++++++------ extras/gdcc/inc/ACS/rrdefs.acs | 151 +++- extras/gdcc/inc/ACS/rrspecial.acs | 41 +- src/p_polyobj.h | 14 - src/p_setup.c | 10 +- src/p_spec.c | 38 +- 6 files changed, 1058 insertions(+), 287 deletions(-) diff --git a/extras/conf/RingRacers_ACS.cfg b/extras/conf/RingRacers_ACS.cfg index 15d70c5fb..3bd5afa62 100644 --- a/extras/conf/RingRacers_ACS.cfg +++ b/extras/conf/RingRacers_ACS.cfg @@ -30,270 +30,810 @@ scripttype = 1; //0 = unknown script, 1 = acc, 2 = modeldef, 3 = decorate keywords { // Directives - #define = "#define [identifier] [expression]\n" - "Defines a preprocessor macro. Defines can be\n" - "used to create a constant variable which can't\n" - "be changed during run-time."; - #include = "#include [file]" - "Defines a preprocessor macro. Defines can be\n" - "used to create a constant variable which can't\n" - "be changed during run-time."; - #library = "#library [name]\n" - "Defines this file as a library. Other files can\n" - "use #import to include all of this file's scripts,\n" - "functions, and libdefines, without needing to\n" - "compile it into their file."; - #import = "#import [file]\n" - "Adds the scripts, functions, and libdefines from\n" - "an ACS library. Unlike #include, libraries do not\n" - "get compiled directly into your file.\n"; - #libdefine = "#libdefine [identifier] [expression]\n" - "Defines a preprocessor macro for a library. Unlike\n" - "normal defines, other files can access this value\n" - "if they import this file as a library."; - #encryptstrings = "#encryptstrings\n" - "Strings will be scrambled when compiling, so that\n" - "they aren't directly readable in a hex editor."; - #nocompact = "#nocompact\n" - "Disables compiler compression."; - #region = "#region\n" - "Starts a collaspable text region for the Script\n" - "Editor. Ignored by the compiler."; - #endregion = "#endregion\n" - "Ends a collaspable text region. See: #region\n" - "Ignored by the compiler."; + #define = "#define [identifier] [expression]\n + Defines a preprocessor macro. Defines can be\n + used to create a constant variable which can't\n + be changed during run-time, or for automation."; + + #include = "#include [file]\n + Defines a preprocessor macro. Defines can be\n + used to create a constant variable which can't\n + be changed during run-time."; + + #library = "#library [name]\n + Defines this file as a library. Other files can\n + use #import to include all of this file's scripts,\n + functions, and libdefines, without needing to\n + compile it into their file."; + + #import = "#import [file]\n + Adds the scripts, functions, and libdefines from\n + an ACS library. Unlike #include, libraries do not\n + get compiled directly into your file."; + + #libdefine = "#libdefine [identifier] [expression]\n + Defines a preprocessor macro for a library.\n + Unlike normal defines, other files can access this value\n + if they import this file as a library."; + + #encryptstrings = "#encryptstrings\n + Strings will be scrambled when compiling, so that\n + they aren't directly readable in a hex editor."; + + #nocompact = "#nocompact\n + Disables compression when compiling this file."; + + #region = "#region\n + Starts a collaspable text region for the Script Editor.\n + Ignored by the compiler."; + + #endregion = "#endregion\n + Ends a collaspable text region. See also: #region\n + Ignored by the compiler."; // Keywords - if = "if ([expression])"; + if = "if ()"; else = "else"; - for = "for ([initialize], [condition], [iterate])"; + for = "for (; ; )"; do = "do"; - while = "while ([expression])"; - until = "until ([expression])"; + while = "while ()"; + until = "until ()"; break = "break"; continue = "continue"; - switch = "switch ([expression])"; - case = "case [expression]:"; + switch = "switch ()"; + case = "case :"; default = "default:"; const = "const"; - function = "function [return type] [identifier] ([arg], [...])"; - script = "script [identifier] ([arg], [...])"; - return = "return [value]\n" - "Return value for functions.\n" - "Does not work for scripts."; - restart = "restart\n" - "Restarts the current script from the beginning.\n" - "Does not work for functions."; - suspend = "suspend\n" - "Pauses the current script. It can be resumed by\n" - "activating the same script again.\n" - "Does not work for functions."; - terminate = "terminate\n" - "Ends the current script early.\n" - "Does not work for functions."; - special = "special"; - world = "world [type] [index]:[identifier]\n" - "Sets a wrapper for a hub scope variable.\n" - "Unused in Ring Racers."; - global = "global [type] [index]:[identifier]\n" - "Sets a wrapper for a global scope variable.\n" - "Unused in Ring Racers."; + function = "function ([arg], [...])"; + script = "script ([arg], [...])"; + + return = "return \n + Return value for functions.\n + Does not work in scripts."; + + restart = "restart\n + Restarts the current script from the beginning.\n + Does not work in functions."; + + suspend = "suspend\n + Pauses the current script. It can be resumed by\n + activating the same script again.\n + Does not work in functions."; + + terminate = "terminate\n + Ends the current script early.\n + Does not work in functions."; + + special = "special \n + Defines special actions for the ACS compiler.\n + Serves little to no purpose for level scripts."; + + world = "world :\n + Sets a wrapper for a hub scope variable.\n + Unimplemented in Ring Racers."; + + global = "global :\n + Sets a wrapper for a global scope variable.\n + Unimplemented in Ring Racers."; // Types void = "void"; bool = "bool"; int = "int"; str = "str"; + fixed = "fixed"; // Script modifiers - OPEN = "script [identifier] OPEN\n" - "This script will run when the level is initially loaded."; - ENTER = "script [identifier] ENTER\n" - "Makes this script run whenever a player enters the game.\n" - "The activator is set to said player for this script."; - RESPAWN = "script [identifier] RESPAWN\n" - "Makes this script run whenever a player respawns.\n" - "The activator is set to said player for this script."; - DEATH = "script [identifier] DEATH\n" - "Makes this script run whenever any player dies.\n" - "The activator is set to said player for this script."; - LAP = "script [identifier] LAP\n" - "Makes this script run whenever a player crosses the finish line.\n" - "The activator is set to said player for this script."; + OPEN = "script OPEN\n + Makes a script automatically run when the level is initially loaded."; + + ENTER = "script ENTER\n + Makes a script automatically run when a player enters the game.\n + The activator is set to said player for this script."; + + RESPAWN = "script RESPAWN\n + Makes a script automatically run when a player respawns.\n + The activator is set to said player for this script."; + + DEATH = "script DEATH\n + Makes a script automatically run when a player dies.\n + The activator is set to said player for this script."; + + LAP = "script LAP\n + Makes a script automatically run whenever a player crosses the finish line.\n + The activator is set to said player for this script."; // Specials - Sector_CopyHeights = "Sector_CopyHeights"; - Light_Copy = "Light_Copy"; - Sector_CopyHeightsMove = "Sector_CopyHeightsMove"; - Sector_MovePlanes = "Sector_MovePlanes"; - Sector_CopyTextures = "Sector_CopyTextures"; - Sector_ChangeTag = "Sector_ChangeTag"; - Line_ChangeFrontSectorTag = "Line_ChangeFrontSectorTag"; - Sector_StopMovement = "Sector_StopMovement"; - Thing_Teleport = "Thing_Teleport"; - Level_SetMusic = "Level_SetMusic"; - PlaySFX = "PlaySFX"; - Console_Execute = "Console_Execute"; - Light_Flicker = "Light_Flicker"; - Light_Pulse = "Light_Pulse"; - Light_Blink = "Light_Blink"; - Light_Fade = "Light_Fade"; - Light_Stop = "Light_Stop"; - Camera_CutAwayView = "Camera_CutAwayView"; - Level_SetSky = "Level_SetSky"; - Level_SetWeather = "Level_SetWeather"; - Thing_SetState = "Thing_SetState"; - Thing_Stop = "Thing_Stop"; - Player_AddScore = "Player_AddScore"; - FOF_StartMovement = "FOF_StartMovement"; - Sector_Crush = "Sector_Crush"; - Thing_SetFlip = "Thing_SetFlip"; - Sector_ChangeScroll = "Sector_ChangeScroll"; - FOF_Shatter = "FOF_Shatter"; - Player_DisableControl = "Player_DisableControl"; - Thing_SetScale = "Thing_SetScale"; - Line_CopyTextures = "Line_CopyTextures"; - Level_StartMetalSonicRace = "Level_StartMetalSonicRace"; - SetUnlockableTrigger = "SetUnlockableTrigger"; - Sector_NextThingState = "Sector_NextThingState"; - Lua_Execute = "Lua_Execute"; - Earthquake = "Earthquake"; - FOF_SetExists = "FOF_SetExists"; - FOF_Crumble = "FOF_Crumble"; - Sector_SetColormap = "Sector_SetColormap"; - SetSkyboxViewpoints = "SetSkyboxViewpoints"; - SetBossActive = "SetBossActive"; - Line_Execute = "Line_Execute"; - Line_ExecuteRandom = "Line_ExecuteRandom"; - FOF_SetAlpha = "FOF_SetAlpha"; - FOF_Fade = "FOF_Fade"; - FOF_StopFade = "FOF_StopFade"; - Sector_FadeColormap = "Sector_FadeColormap"; - Sector_StopColormapFade = "Sector_StopColormapFade"; - Thing_StartTracking = "Thing_StartTracking"; - Thing_StopTracking = "Thing_StopTracking"; - Prompt_Execute = "Prompt_Execute"; - Player_AddRings = "Player_AddRings"; - Thing_Spawn = "Thing_Spawn"; - Level_StopClock = "Level_StopClock"; - Thing_Dye = "Thing_Dye"; - TriggerEggCapsule = "TriggerEggCapsule"; - Level_SetFailed = "Level_SetFailed"; - Sector_SetLight = "Sector_SetLight"; - Line_SetArg = "Line_SetArg"; - Sector_SetGravity = "Sector_SetGravity"; - Polyobj_DoorSlide = "Polyobj_DoorSlide"; - Polyobj_DoorSwing = "Polyobj_DoorSwing"; - Polyobj_Move = "Polyobj_Move"; - Polyobj_Rotate = "Polyobj_Rotate"; - Polyobj_MoveByWaypoints = "Polyobj_MoveByWaypoints"; - Polyobj_SetVisibilityTangibility = "Polyobj_SetVisibilityTangibility"; - Polyobj_SetAlpha = "Polyobj_SetAlpha"; - Polyobj_FadeAlpha = "Polyobj_FadeAlpha"; - Sector_ToggleWaypoints = "Sector_ToggleWaypoints"; + Sector_CopyHeights = "void Sector_CopyHeights(int tag1, int tag2, int plane, [bool texture])\n + Sets the plane heights of the tagged sectors to match another sector.\n + - tag1: The sector tag to copy from. 0 copies from the activating line's front sector.\n + - tag2: The sector tag to copy to.\n + - plane: Which planes to copy; can be PLANE_FLOOR, PLANE_CEILING, or PLANE_BOTH.\n + - texture: If true, the textures will also be copied."; + + Light_Copy = "void Light_Copy(int tag1, int tag2, [int flags])\n + Sets the light levels of the tagged sectors to match another sector.\n + Any existing light fade effects will be canceled.\n + - tag1: The sector tag to copy from. 0 copies from the activating line's front sector.\n + - tag2: The sector tag to copy to.\n + - flags: Behavior bit flags:\n + - LIGHT_COPY_NOSECTOR: Don't copy base light level.\n + - LIGHT_COPY_NOFLOOR: Don't copy floor lighting effects.\n + - LIGHT_COPY_NOCEILING: Don't copy ceiling lighting effects."; + + Sector_CopyHeightsMove = "void Sector_CopyHeightsMove(int tag1, int tag2, int plane, int speed, [bool texture])\n + Moves the plane heights of the tagged sectors to match another sector.\n + - tag1: The sector tag to copy from. 0 copies from the activating line's front sector.\n + - tag2: The sector tag to copy to.\n + - plane: Which planes to copy; can be PLANE_FLOOR, PLANE_CEILING, or PLANE_BOTH.\n + - speed: How fast to move the planes.\n + - texture: If true, the textures will also be copied when the planes reach the destination."; + + Sector_MovePlanes = "void Sector_MovePlanes(int tag, int plane, int distance, int speed, [bool instant, bool texture])\n + Moves the planes of the tagged sectors.\n + - tag: The sector tag to move.\n + - plane: Which planes to move; can be PLANE_FLOOR, PLANE_CEILING, or PLANE_BOTH.\n + - distance: How far to move the planes.\n + - speed: How fast to move the planes.\n + - instant: If true, the planes will be moved to the new position instantly."; + + Sector_CopyTextures = "void Sector_CopyTextures(int tag1, int tag2, int plane)\n + Sets the textures of the tagged sectors to match another sector.\n + - tag1: The sector tag to copy from. 0 copies from the activating line's front sector.\n + - tag2: The sector tag to copy to.\n + - plane: Which planes to copy; can be PLANE_FLOOR, PLANE_CEILING, or PLANE_BOTH."; + + Sector_ChangeTag = "void Sector_ChangeTag(int oldtag, int newtag, [int option])\n + Changes the tag of the tagged sectors.\n + - oldtag: The sector tag to modify.\n + - newtag: The tag to give the sector.\n + - option: Determines what to do with the tag.\n + - TAG_REPLACEFIRST: The tag replaces the first tag. The default option.\n + - TAG_ADD: Adds the tag to the tag list.\n + - TAG_REMOVE: Removes the tag from the tag list."; + + Line_ChangeFrontSectorTag = "void Line_ChangeFrontSectorTag(int linetag, int newtag, [int option])\n + Changes the tag of the tagged lines' front sectors.\n + - linetag: The line tag to modify. 0 modifies the activating line.\n + - newtag: The tag to give the sector.\n + - option: Determines what to do with the tag.\n + - TAG_REPLACEFIRST: The tag replaces the first tag. The default option.\n + - TAG_ADD: Adds the tag to the tag list.\n + - TAG_REMOVE: Removes the tag from the tag list."; + + Sector_StopMovement = "void Sector_StopMovement(int tag)\n + Stops the the tagged sectors' planes from moving.\n + - tag: The sector tag to stop."; + + Thing_Teleport = "void Thing_Teleport(int tag, [int flags, int x, int y, int z])\n + Teleports the activating object.\n + If there was no activator, then this does nothing.\n + - tag: The tag of the teleport destination object.\n + - flags: Behavior bit flags:\n + - TELEPORT_SILENT: The teleport won't make a sound.\n + - TELEPORT_KEEPANGLE: The object will keep its angle after the teleport.\n + - TELEPORT_KEEPMOMENTUM: The object will keep its momentum after the teleport.\n + - TELEPORT_RELATIVE: Tag and all other flags are ignored, and instead the object will be translated by x, y, and z.\n + - x: X position translation when using TELEPORT_RELATIVE.\n + - y: Y position translation when using TELEPORT_RELATIVE.\n + - z: Z position translation when using TELEPORT_RELATIVE."; + + Level_SetMusic = "void Level_SetMusic(str music, [int flags, int position, int prefadems, int postfadems, int postfadevol, int prefadevol, int track])\n + Changes the music currently playing.\n + - music: The name of the new music.\n + - flags: Behavior bit flags:\n + - MUSIC_ALLPLAYERS: If set, changes the music for all players.\n + Otherwise, the music will only change for the activator.\n + - MUSIC_NOLOOP: The music won't loop.\n + - MUSIC_NOCREDIT: Music credits won't appear.\n + - MUSIC_NORELOAD: The music won't restart when the level is reset.\n + - MUSIC_FORCERESET: The music will start over again, even if it's already playing.\n + - MUSIC_OFFSET: position is used as an offset instead of absolute.\n + - MUSIC_FADE: The music will fade to fadevolume.\n + - position: Position in the music to start at.\n + - prefade: Fade out time from the old music, in ms. 0 changes instantly.\n + - postfade: Fade in time to the new music, in ms. 0 sets instantly.\n + - postfadevol: New volume of the music, from 0 to 100.\n + - prefadevol: Starting volume of the old music, from 1 to 100. 0 uses the previous volume.\n + - track: Which music track to use, for music formats with multiple tracks."; + + PlaySFX = "void PlaySFX(str sound, [int source, int listener, int tag])\n + Plays a sound effect.\n + - sound: The name of the sound effect.\n + - source: Determines where the sound plays from:\n + - SFX_SOURCE_TRIGGERMOBJ: Plays from the activating object. Default value.\n + - SFX_SOURCE_TRIGGERSECTOR: Plays from the activating sector.\n + - SFX_SOURCE_NOWHERE: Plays the sound globally.\n + - SFX_SOURCE_TAGGEDSECTOR: Plays the sound from another tagged sector.\n + - listener: Determines who is able to hear the sound:\n + - SFX_LISTEN_EVERYONE: Can be heard by everyone. Default value.\n + - SFX_LISTEN_TRIGGERER: Can only be heard by the activator.\n + - SFX_LISTEN_TAGGEDSECTOR: Can only be heard by everyone inside of another tagged sector.\n + - tag: The sector tag used by SFX_SOURCE_TAGGEDSECTOR and/or SFX_LISTEN_TAGGEDSECTOR."; + + Console_Execute = "void Console_Execute(str lump)\n + Runs a console command script.\n + - lump: The name of the console command script's lump."; + + Light_Flicker = "void Light_Flicker(int tag, int length, int light1, bool usetarget, int light2)\n + Makes the light level in the tagged sectors flicker randomly, in a range between two different light levels.\n + - tag: The sector tag to flicker the lights of.\n + - length: How long between each light flicker.\n + - light1: The first light level to flicker at.\n + - usetarget: If true, the sector's existing light level will be used for the second light level.\n + - light2: The second light level to flicker at, if usetarget is false."; + + Light_Glow = "void Light_Glow(int tag, int length, int light1, bool usetarget, int light2)\n + Makes the light level in the tagged sectors pulse up and down, in a range between two different light levels.\n + - tag: The sector tag to glow the lights of.\n + - speed: How fast the light level pulses.\n + - light1: The first light level to pulse at.\n + - usetarget: If true, the sector's existing light level will be used for the second light level.\n + - light2: The second light level to pulse at, if usetarget is false."; + + Light_Blink = "void Light_Blink(int tag, int darktime, int brighttime, int light1, int flags, int light2)\n + Makes the light level in the tagged sectors blink, in a range between two different light levels.\n + - tag: The sector tag to glow the lights of.\n + - darktime: How long it stays at the darker of the two light levels.\n + - brighttime: How long it stays at the brighter of the two light levels.\n + - light1: The first light level to blink at.\n + - flags: Behavior bit flags:\n + - LIGHT_BLINK_USETARGET: If set, the sector's existing light level will be used for the second light level.\n + - LIGHT_BLINK_SYNC: If not set, then the blink will start at a random point for each sector.\n + - light2: The second light level to pulse at, if BLINK_USETARGET wasn't set."; + + Light_Fade = "void Light_Fade(int tag, int light, int speed, [int flags])\n + Fades the light levels of the tagged sectors to a new value.\n + - tag: The sector tag to fade the lights of.\n + - light: The new light level.\n + - speed: How fast to fade the light level.\n + - flags: Behavior bit flags:\n + - LIGHT_FADE_TICBASED: Use the speed value as a duration instead.\n + - LIGHT_FADE_OVERRIDE: If another Light_Fade is running for a sector,\n + then it will be stopped and replaced with this one.\n + - LIGHT_FADE_RELATIVE: Use the light value as an offset instead of absolute."; + + Light_Stop = "void Light_Stop(int tag)\n + Stops any currently running light effects in the tagged sectors.\n + - tag: The sector tag to stop the lighting effects in."; + + Camera_CutAwayView = "void Camera_CutAwayView(int tag, int tics)\n + Changes the viewpoint of the activating player.\n + If in a titlemap, then it will always work.\n + - tag: The tag of the cut-away camera thing.\n + - tics: How long to remain on this camera. Ignored for titlemaps."; + + Level_SetSky = "void Level_SetSky(str texture, [bool global])\n + Changes the current sky texture.\n + - texture: The new sky texture.\n + - global: If true, then the sky texture is applied to everyone.\n + Otherwise, it is only applied to the activator."; + + Level_SetWeather = "void Level_SetWeather(int id, [bool global])\n + Changes the current weather effect.\n + - id: The new weather ID.\n + - global: If true, then the weather effect is applied to everyone.\n + Otherwise, it is only applied to the activator."; + + Thing_SetState = "void Thing_SetState(str state)\n + Changes the state of the activator object.\n + Does not work for players.\n + - state: The name of the state."; + + Thing_Stop = "void Thing_Stop([bool center])\n + Completely stops the activator object.\n + - center: If true, the object will be moved to\n + the center of the sector it was in."; + + Player_AddScore = "void Player_AddScore(int points)\n + Gives score to the activating player.\n + - points: Number of points to give."; + + Sector_PlatformMovement = "void Sector_PlatformMovement(int tag, int speed, int startdelay, int switchdelay, bool up)\n + Starts moving the tagged sectors up and down continously, between\n + the sector's two highest and lowest surrounding sectors.\n + - tag: The sector tag to start moving.\n + - speed: How fast to move the sector planes.\n + - startdelay: How long to wait before the sectors start moving.\n + - switchdelay: How long to wait before changing directions.\n + - up: If true, start moving upwards first. Otherwise, it will move down first."; + + Sector_Crush = "void Sector_Crush(int tag, int plane, int speed)\n + Makes the tagged sectors' plane crush towards the other one.\n + - tag: The sector tag to start moving.\n + - plane: Which planes to crush; can be PLANE_FLOOR, PLANE_CEILING, or PLANE_BOTH.\n + - speed: How fast to crush the sector planes."; + + Thing_SetFlip = "void Thing_SetFlip(bool normal)\n + Sets the gravity flip for the activating object.\n + - normal: true to set the object to normal gravity, and false for flipped gravity."; + + Sector_ChangeScroll = "void Sector_ChangeScroll(int tag, int speed, int angle)\n + Changes the speed and direction of the tagged sectors.\n + Only works on sectors with scrolling already applied.\n + - tag: The sector tag to change the scrolling of.\n + - speed: Speed of the new scrolling.\n + - angle: Direction of the new scrolling."; + + FOF_Shatter = "void FOF_Shatter(int sectag, int foftag)\n + Destroys the tagged FOFs within the tagged sectors.\n + - sectag: The sector tag that the FOFs are in.\n + - foftag: The FOF tag to shatter."; + + Player_DisableControl = "void Player_DisableControl(int tics)\n + Temporarily disables the activating player's controls.\n + - tics: How long to disable controls for."; + + Thing_SetScale = "void Thing_SetScale(int scale)\n + Changes the activating object's scale.\n + - scale: The new object scale, where 100 is normal scale."; + + Line_CopyTextures = "void Line_CopyTextures(int tag1, int tag2, int side, [bool onlyexisting])\n + Copies the textures from a tagged line to other tagged lines.\n + - tag1: The line tag to copy the textures from.\n + - tag2: The line tag to copy the textures to.\n + - side: Which side to copy the textures to. Can be SIDE_FRONT, SIDE_BACK, or SIDE_BOTH.\n + - onlyexisting: Only copy textures if they exist on the other line."; + + Level_StartMetalSonicRace = "void Level_StartMetalSonicRace(void)\n + Starts the Metal Sonic race demo."; + + SetUnlockableTrigger = "void SetUnlockableTrigger(int id)\n + Activates a special unlockable trigger.\n + The behavior of each ID depends on the gamedata.\n + - id: Trigger ID, from 0 to 31."; + + Sector_ChangeThingStates = "void Sector_ChangeThingStates(str type, str state, int tag, [bool nextstate])\n + Changes the states of every object in the tagged sectors by their type.\n + - type: The object type to change the states of.\n + - state: The state to set the objects to.\n + - tag: The sector tag to search for objects in.\n + - nextstate: If true, then state is ignored, and every object will be\n + set to their next state instead."; + + Lua_Execute = "void Lua_Execute(str name, [int args, ...])\n + Calls a Lua function via the 'SpecialExecute' hook.\n + - name: The function name, given to SpecialExecute.\n + - args: Up to 10 arguments can be provided to the Lua hook."; + + Earthquake = "void Earthquake(int time, [int intensity, int radius])\n + Starts a screen shake effect.\n + - time: How long the shaking lasts.\n + - intensity: The strength of the shaking.\n + - radius: Currently unused."; + + FOF_SetExists = "void FOF_SetExists(int sectag, int foftag, bool exists)\n + Makes the tagged FOFs within the tagged sectors disappear or reappear.\n + - sectag: The sector tag that the FOFs are in.\n + - foftag: The FOF tag to shatter.\n + - exists: true to make it exist, false to remove it."; + + FOF_Crumble = "void FOF_Crumble(int sectag, int foftag, [int flags])\n + Makes the tagged FOFs within the tagged sectors fall down and collaspe.\n + - sectag: The sector tag that the FOFs are in.\n + - foftag: The FOF tag to shatter.\n + - flags: Behavior bit flags:\n + - CRUMBLE_NORETURN: Prevents the FOF from respawning after some time.\n + - CRUMBLE_CHECKFLAG: Uses the FOF's flags to determine respawning.\n + Inverts against CRUMBLE_NORETURN."; + + Sector_SetColormap = "void Sector_SetColormap(int tag1, int tag2, [int flags])\n + Sets the colormap of the tagged sectors, based on the colormap from another sector.\n + - tag1: The sector tag to replace the colormap of.\n + - tag2: The sector tag to copy the colormap from.\n + - flags: Behavior bit flags:\n + - COLORMAP_RELATIVE: Combines the two colormaps together.\n + - COLORMAP_SUBLIGHT[R/G/B/A]: Subtracts the R/G/B/A component to the copied colormap instead of adding. Requires COLORMAP_RELATIVE.\n + - COLORMAP_SUBFADE[R/G/B/A]: Subtracts the R/G/B/A component to the new colormap instead of adding. Requires COLORMAP_RELATIVE.\n + - COLORMAP_SUBFADE[START/END]: Subtracts the fade start/end points instead of adding. Requires COLORMAP_RELATIVE.\n + - COLORMAP_IGNOREFLAGS: Don't copy over the colormap flags. Requires COLORMAP_RELATIVE."; + + Level_SetSkyboxViewpoints = "void Level_SetSkyboxViewpoints(int view, int center, int which, [bool global])\n + Changes the current skybox.\n + - view: New skybox viewpoint ID.\n + - center: New skybox centerpoint ID.\n + - which: Determines which viewpoints to modify. Options are:\n + - SKYBOX_VIEWPOINT: Use the new view.\n + - SKYBOX_CENTERPOINT: Use the new center.\n + - SKYBOX_BOTH: Use both view and center.\n + - global: If true, then the skybox is applied to everyone.\n + Otherwise, it is only applied to the activator."; + + Level_SetBossDisabled = "void Level_SetBossDisabled(int id, bool disable)\n + Disables / enables a boss's thinker.\n + - id: The object's boss ID.\n + - disable: true to turn the boss off, otherwise true."; + + Line_Execute = "void Line_Execute(int tag)\n + Activates a line executor by its tag.\n + - tag: The tag of the line executor."; + + Line_ExecuteRandom = "void Line_ExecuteRandom(int low, int high)\n + Activates a random line executor within a range.\n + - low: The lowest tag in the range.\n + - high: The highest tag in the range."; + + FOF_SetAlpha = "void FOF_SetAlpha(int sectag, int foftag, int alpha, [int flags])\n + Sets the alpha of the tagged FOFs within the tagged sectors.\n + - sectag: The sector tag that the FOFs are in.\n + - foftag: The FOF tag to set the alpha of.\n + - alpha: The new translucency value of the FOF.\n + - flags: Behavior bit flags:\n + - ALPHA_SET_RELATIVE: Uses alpha as an offset instead of absolute.\n + - ALPHA_SET_DONTDOTRANSLUCENT: Don't modify the FOF's visibility flags."; + + FOF_Fade = "void FOF_Fade(int sectag, int foftag, int alpha, int speed, [int flags])\n + Fades the alpha of the tagged FOFs within the tagged sectors over time.\n + - sectag: The sector tag that the FOFs are in.\n + - foftag: The FOF tag to fade.\n + - alpha: The new translucency value of the FOF.\n + - speed: How fast to fade the FOF.\n + - flags: Behavior bit flags:\n + - ALPHA_FADE_RELATIVE: Uses alpha as an offset instead of absolute.\n + - ALPHA_FADE_OVERRIDE: If another FOF_Fade is running for an FOF,\n + then it will be stopped and replaced with this one.\n + - ALPHA_FADE_TICBASED: Use the speed value as a duration instead.\n + - ALPHA_FADE_IGNORECOLLISION: Don't change the FOF's solidity flags\n + whenever it appears or disappears.\n + - ALPHA_FADE_GHOSTFADE: No collision when it's fading.\n + - ALPHA_FADE_DONTDOTRANSLUCENT: Don't modify the FOF's visibility flags.\n + - ALPHA_FADE_DONTDOEXISTS: Don't modify the FOF's existance flags.\n + - ALPHA_FADE_DONTDOLIGHTING: Don't modify the FOF's lighting.\n + - ALPHA_FADE_DONTDOCOLORMAP: Don't modify the FOF's colormap.\n + - ALPHA_FADE_USEEXACTALPHA: Use precise alpha in OpenGL."; + + FOF_StopFade = "void FOF_StopFade(int sectag, int foftag, [bool dontfinalize])\n + Stops the tagged FOFs within the tagged sectors from fading.\n + - sectag: The sector tag that the FOFs are in.\n + - foftag: The FOF tag to stop fading.\n + - dontfinalize: Keep the FOF's collision flags as they are."; + + Sector_FadeColormap = "void Sector_FadeColormap(int tag1, int tag2, int duration, [int flags])\n + Fades the colormap of the tagged sectors over time, based on the colormap from another sector.\n + - tag1: The sector tag to replace the colormap of.\n + - tag2: The sector tag to copy the colormap from.\n + - duration: How long to fade the colormap for. + - flags: Behavior bit flags:\n + - COLORMAP_FROMBLACK: Fade the colormap from black.\n + - COLORMAP_OVERRIDE: If another Sector_FadeColormap is running for a sector,\n + then it will be stopped and replaced with this one.\n + - COLORMAP_RELATIVE: Combines the two colormaps together.\n + - COLORMAP_SUBLIGHT[R/G/B/A]: Subtracts the R/G/B/A component to the copied colormap instead of adding. Requires COLORMAP_RELATIVE.\n + - COLORMAP_SUBFADE[R/G/B/A]: Subtracts the R/G/B/A component to the new colormap instead of adding. Requires COLORMAP_RELATIVE.\n + - COLORMAP_SUBFADE[START/END]: Subtracts the fade start/end points instead of adding. Requires COLORMAP_RELATIVE.\n + - COLORMAP_IGNOREFLAGS: Don't copy over the colormap flags. Requires COLORMAP_RELATIVE."; + + Sector_StopColormapFade = "void Sector_FadeColormap(int tag)\n + Stops colormap fading in the tagged sectors.\n + - tag: The sector tag to stop colormap fades in."; + + Thing_StartTracking = "void Thing_StartTracking(int tag, int angle, int leniency, int failure, bool persist)\n + Start tracking if the activating object's angle is facing towards an anchor point object.\n + - tag: The tag of the angle manager thing.\n + - angle: Angle difference to consider failing.\n + - leniency: How many tics in a row failing before activating failure.\n + - failure: Line tag to execute upon failure.\n + - persist: If true, then tracking doesn't stop automatically on failure."; + + Thing_StopTracking = "void Thing_StopTracking(void)\n + Stops the tracking effect started by Thing_StartTracking."; + + Prompt_Execute = "void Prompt_Execute(str name, int prompt, int page, int flags, [int exec])\n + Executes a text prompt for the activating player.\n + - name: Prompt tag name, if using PROMPT_CALLBYNAME.\n + - prompt: Prompt ID. Ignored if using PROMPT_CALLBYNAME.\n + - page: Page ID. Ignored if using PROMPT_CALLBYNAME.\n + - flags: Behavior bit flags:\n + - PROMPT_CLOSE: Closes the current prompt. Takes priority over other flags.\n + - PROMPT_RUNPOSTEXEC: Runs a line executor after it closes.\n + - PROMPT_CALLBYNAME: Call the prompt by it's tag name instead of IDs.\n + - PROMPT_KEEPCONTROLS: Allow the player to control while the prompt is open.\n + - PROMPT_KEEPREALTIME: Pause the in-game timer while the prompt is open.\n + - exec: The line executor tag to call, if using PROMPT_RUNPOSTEXEC."; + + Player_AddRings = "void Player_AddRings(int rings, [int frequency, bool overload])\n + Gives rings to the activating player.\n + - rings: How many rings to add to the player.\n + - frequency: How often this can give rings, if continously called.\n + - overload: If true, then give rings to players with full rings."; + + Thing_Spawn = "void Thing_Spawn(str type, int x, int y, int z, int angle, [bool random, int rx, int ry, int rz])\n + Creates a new object at an arbritrary position and angle.\n + - type: The type of the new object.\n + - x: The X spawn coordinate. If using random, this should be the low X.\n + - y: The Y spawn coordinate. If using random, this should be the low Y.\n + - z: The Z spawn coordinate. If using random, this should be the low Z.\n + - angle: The angle to give the object on spawn.\n + - random: Randomize the spawn position, using the following coordinates:\n + - rx: The high X spawn coordinate, if using random.\n + - ry: The high Y spawn coordinate, if using random.\n + - rz: The high Z spawn coordinate, if using random."; + + Level_StopClock = "void Level_StopClock(void)\n + Stops the in-game timer. If playing Time Attack, then\n + the level will also end immediately."; + + Thing_Dye = "void Thing_Dye(str color)\n + Colorizes the activating object.\n + - color: The color to give the object.\n + A blank string will remove the dye effect."; + + Level_TriggerEggCapsule = "void Level_TriggerEggCapsule(int tag, [bool dontexit])\n + Spawns flickies from the Egg Capsule center object, and\n + (optionally) ends the level.\n + - tag: The tag of the Egg Capsule center object.\n + - dontexit: If true, then the level won't end."; + + Level_SetFailed = "void Level_SetFailed(bool success)\n + Set whenever or not the level was failed.\n + - success: If false, the level has been failed."; + + Sector_SetLight = "void Sector_SetLight(int tag, int light, [int area, bool relative])\n + Sets the light level of the tagged sectors.\n + - tag: The sector tag to modify.\n + - light: The new light level to give the sectors.\n + - area: Which light level to edit. Can be either LIGHT_AREA_SECTOR, LIGHT_AREA_FLOOR, or LIGHT_AREA_CEILING.\n + - relative: If true, then light is used as an offset instead of absolute."; + + Line_SetArg = "void Line_SetArg(int tag, int which, int value, [bool relative])\n + Sets an argument of the tagged lines.\n + - tag: The line tag to modify.\n + - which: Which line argument to change, from 0 to 9.\n + - value: The new value to give the argument.\n + - relative: If true, then value is used as an offset instead of absolute."; + + Sector_SetGravity = "void Sector_SetGravity(str gravity, int tag, [bool multiply, int flip])\n + Changes the gravity tagged sectors.\n + - gravity: The new gravity, given as a string.\n + - tag: The sector tag to modify.\n + - multiply: If true, then gravity is used as a multiplier of the level's gravity.\n + - flip: Change gravity flip of this sector. Can be either FLAG_NOCHANGE, FLAG_ADD, or FLAG_REMOVE."; + + Polyobj_DoorSlide = "void Polyobj_DoorSlide(int po, int speed, int angle, int distance, int delay)\n + Slides a PolyObject, waits, and then moves it back.\n + - po: The PolyObject's ID.\n + - speed: How fast to move the PolyObject.\n + - angle: The direction to move the PolyObject.\n + - distance: How far the PolyObject moves.\n + - delay: How long to wait before the PolyObject moves back."; + + Polyobj_DoorSwing = "void Polyobj_DoorSwing(int po, int speed, int distance, int delay)\n + Rotates a PolyObject, waits, and then rotates it back.\n + - po: The PolyObject's ID.\n + - speed: How fast to rotate the PolyObject.\n + - distance: How far the PolyObject rotates.\n + - delay: How long to wait before the PolyObject rotates back."; + + Polyobj_Move = "void Polyobj_Move(int po, int speed, int angle, int distance, [bool override])\n + Moves a PolyObject in an arbritrary direction.\n + - po: The PolyObject's ID.\n + - speed: How fast to move the PolyObject.\n + - angle: The direction to move the PolyObject.\n + - distance: How far the PolyObject moves.\n + - override: If true, stop the PolyObject's current action to ensure this activates."; + + Polyobj_Rotate = "void Polyobj_Rotate(int po, int speed, int angle, [int flags])\n + Moves a PolyObject in an arbritrary direction.\n + - po: The PolyObject's ID.\n + - speed: How fast to rotate the PolyObject.\n + - angle: How far the PolyObject rotates.\n + - flags: Behavior bit flags:\n + - PO_ROTATE_DONTROTATEOTHERS: Doesn't rotate regular objects.\n + - PO_ROTATE_DONTROTATEPLAYERS: Doesn't rotate players.\n + - PO_ROTATE_CONTINUOUS: Never stops rotating.\n + - PO_ROTATE_OVERRIDE: If true, stop the PolyObject's current action to ensure this activates."; + + Polyobj_MoveByWaypoints = "void Polyobj_MoveByWaypoints(int po, int speed, int sequence, [int return, int flags])\n + Makes a PolyObject follow Zoom Tube Waypoint objects.\n + - po: The PolyObject's ID.\n + - speed: How fast to move the PolyObject.\n + - sequence: The Zoom Tube Waypoint sequence the PolyObject should follow.\n + - return: Determines behavior when it reaches the end of the sequence:\n + - PO_WP_RETURN_STOP: Stop entirely.\n + - PO_WP_RETURN_WRAP: Go to the first waypoint and do it again.\n + - PO_WP_RETURN_COMEBACK: Go backwards until reaching the first waypoint again.\n + - flags: Behavior bit flags:\n + - PO_WP_REVERSE: Go through the waypoints in reverse order.\n + - PO_WP_LOOP: Loop the movement instead of stopping when it's done."; + + Polyobj_SetVisibilityTangibility = "void Polyobj_SetVisibilityTangibility(int po, int visibility, int tangibility)\n + Makes a PolyObject follow Zoom Tube Waypoint objects.\n + - po: The PolyObject's ID.\n + - visibility: Sets visibility. Can be either FLAG_NOCHANGE, FLAG_ADD, or FLAG_REMOVE.\n + - tangibility: Sets tangibility. Can be either FLAG_NOCHANGE, FLAG_ADD, or FLAG_REMOVE."; + + Polyobj_SetAlpha = "void Polyobj_SetAlpha(int po, int alpha, [bool relative])\n + Makes a PolyObject follow Zoom Tube Waypoint objects.\n + - po: The PolyObject's ID.\n + - alpha: The new translucency of the PolyObject.\n + - relative: If true, use alpha as an offset instead of absolute."; + + Polyobj_FadeAlpha = "void Polyobj_FadeAlpha(int po, int alpha, int speed, [int flags])\n + Makes a PolyObject follow Zoom Tube Waypoint objects.\n + - po: The PolyObject's ID.\n + - alpha: The new translucency of the PolyObject.\n + - speed: How fast to fade the translucency.\n + - flags: Behavior bit flags:\n + - PO_FADE_RELATIVE: Uses alpha as an offset instead of absolute.\n + - PO_FADE_OVERRIDE: Stop the PolyObject's current action to ensure this activates.\n + - PO_FADE_TICBASED: Use the speed value as a duration instead.\n + - PO_FADE_IGNORECOLLISION: Don't change the PolyObject's solidity flags\n + whenever it appears or disappears.\n + - PO_FADE_GHOSTFADE: No collision when it's fading."; + + Sector_ToggleWaypoints = "void Sector_ToggleWaypoints(int tag, bool enable)\n + Enables / disables the waypoints in the tagged sectors.\n + - tag: The sector tag to search for waypoints in.\n + - enable: If true, enable the waypoints. Otherwise, disable the waypoints."; // Functions - Delay = "void Delay(int tics)\n" - "Pauses the current script for a period of time.\n" - "Does not work for functions."; + Delay = "void Delay(int tics)\n + Pauses the current script.\n + Does not work in functions.\n + - tics: How long to pause the script for, where TICRATE is one second."; - TagWait = "void TagWait(int tag)\n" - "Pauses the current script until the tagged sectors finish moving.\n" - "Does not work for functions."; + TagWait = "void TagWait(int tag)\n + Pauses the current script until the tagged sectors finish moving.\n + Does not work in functions.\n + - tag: The sector tag to wait for."; - PolyWait = "void PolyWait(int polyID)\n" - "Pauses the current script until a PolyObject finishes moving.\n" - "Does not work for functions."; + PolyWait = "void PolyWait(int polyID)\n + Pauses the current script until a PolyObject finishes moving.\n + Does not work in functions.\n + - polyID: The PolyObject ID to wait for."; - ScriptWait = "void ScriptWait(str script)\n" - "Pauses the current script until another script finishes.\n" - "Does not work for functions."; + ScriptWait = "void ScriptWait(str script)\n + Pauses the current script until another script is finished running.\n + Does not work in functions.\n + - script: The name of the script to wait for."; - ACS_Execute = "void ACS_Execute(str script, int arg1, ...)\n" - "Run a script. If the script is already running, it will not run again."; + ACS_Execute = "void ACS_Execute(str script, [int args, ...])\n + Run another script. If that script is running and has not finished, it will not be run again.\n + - script: The name of the script to run.\n + - args: Up to 10 arguments can be provided to the script."; - ACS_ExecuteAlways = "void ACS_ExecuteAlways(str script, int arg1, ...)\n" - "Run a script. Unlike ACS_Execute, multiple copies of a script can be run,\n" - "but ACS_Suspend and ACS_Terminate cannot be used on it."; + ACS_ExecuteAlways = "void ACS_ExecuteAlways(str script, [int args, ...])\n + Run another script. Unlike ACS_Execute, multiple copies of the script can be run,\n + but in return ACS_Suspend and ACS_Terminate cannot be used on it.\n + - script: The name of the script to run.\n + - args: Up to 10 arguments can be provided to the script."; - ACS_ExecuteWait = "void ACS_ExecuteWait(str script, int arg1, ...)\n" - "Run a script, and then pause the current script until it finishes."; + ACS_ExecuteWait = "void ACS_ExecuteWait(str script, [int args, ...])\n + Run another script, and then pause the current script until it has finished running.\n + - script: The name of the script to run.\n + - args: Up to 10 arguments can be provided to the script."; - ACS_ExecuteWithResult = "int ACS_ExecuteWithResult(str script, int arg1, ...)\n" - "Run a script, and then returns the special result value.\n" - "The special result value can be set by using SetResultValue()."; + ACS_ExecuteWithResult = "int ACS_ExecuteWithResult(str script, [int args, ...])\n + Run another script, and then returns its special result value.\n + The special result value can be set by the script if it uses SetResultValue().\n + - script: The name of the script to run.\n + - args: Up to 10 arguments can be provided to the script."; - ACS_Suspend = "void ACS_Suspend(str script)\n" - "Pauses another script by its numerical ID.\n" - "It can be resumed by activating the same script again."; + ACS_Suspend = "void ACS_Suspend(str script)\n + Pauses another script. It can be resumed by executing the same script again.\n + - script: The name of the script to pause."; - ACS_Terminate = "void ACS_Terminate(str script)\n" - "Ends another script early by its numerical ID."; + ACS_Terminate = "void ACS_Terminate(str script)\n + Ends another script early.\n + - script: The name of the script to stop."; - Random = "int Random(int min, int max)\n" - "Generates a random number between min and max."; + Random = "int Random(int min, int max)\n + Generates a random number within a range.\n + - min: The minimum value of the range.\n + - max: The maximum value of the range."; - ThingCount = "int ThingCount(str type, int tag)\n" - "Returns the number of objects of the specified type in the map."; + ThingCount = "int ThingCount(str type, [int tag])\n + Returns the number of objects of the specified type in the map.\n + - type: The name of object type.\n + - tag: The tag of the object. If 0, then it counts all objects in the map."; - ChangeFloor = "void ChangeFloor(int tag, str texture)\n" - "Changes the floor texture of all of the tagged sectors."; + ChangeFloor = "void ChangeFloor(int tag, str texture)\n + Changes the floor texture of the tagged sectors.\n + - tag: The sector tag to modify.\n + - texture: The new floor texture."; - ChangeCeiling = "void ChangeCeiling(int tag, str texture)\n" - "Changes the ceiling texture of all of the tagged sectors."; + ChangeCeiling = "void ChangeCeiling(int tag, str texture)\n + Changes the ceiling texture of the tagged sectors.\n + - tag: The sector tag to modify.\n + - texture: The new ceiling texture."; - LineSide = "int LineSide(void)\n" - "Returns either LINE_FRONT or LINE_BACK depending on the\n" - "side of the line that activated the script.\n" - "Always returns LINE_FRONT if the line doesn't exist."; + LineSide = "int LineSide(void)\n + Returns either SIDE_FRONT or SIDE_BACK depending on the\n + side of the line that activated the script.\n + Always returns SIDE_FRONT if a line didn't activate the script."; - ClearLineSpecial = "void ClearLineSpecial(void)\n" - "Sets the activating line's special to 0, for one-time effects."; + ClearLineSpecial = "void ClearLineSpecial(void)\n + Sets the activating line's special to 0, for one-time effects.\n + Does nothing if a line didn't activate the script."; - Print = "void Print([type]:[expression], [...])\n" - "Print will display a message to the screen.\n" - "It will only display for the activator of the script.\n" - "For printing to all players, use PrintBold."; + PlayerCount = "int PlayerCount(void)\n + Returns the number of players currently playing."; - PlayerCount = "int PlayerCount(void)\n" - "Counts the number of players currently playing."; + GameType = "int GameType(void)\n + Returns the current gametype's ID."; - GameType = "int GameType(void)\n" - "Returns the current gametype ID."; + GameSpeed = "int GameSpeed(void)\n + Returns the current game speed."; - GameSpeed = "int GameSpeed(void)\n" - "Returns the current game speed."; + Timer = "int Timer(void)\n + Returns the number of tics elapsed since the level started."; - Timer = "int Timer(void)\n" - "Returns the number of tics elapsed since the level started."; + SectorSound = "void SectorSound(str sound, int volume)\n + Plays a sound effect in the activating sector.\n + - sound: The name of the sound effect.\n + - volume: The volume to play it at, from 0 to 255."; - SectorSound = "void SectorSound(str sound, int volume)\n" - "Plays a sound effect in the activating sector."; + AmbientSound = "void AmbientSound(str sound, int volume)\n + Plays a sound effect globally.\n + - sound: The name of the sound effect.\n + - volume: The volume to play it at, from 0 to 255."; - AmbientSound = "void AmbientSound(str sound, int volume)\n" - "Plays a sound effect globally."; + SetLineTexture = "void SetLineTexture(int tag, int side, int part, str texture)\n + Changes a texture for the tagged lines.\n + - tag: The line tag to modify.\n + - side: The line side to modify. Can be either SIDE_FRONT or SIDE_BACK.\n + - part: The line texture part to modify. Can be either TEXTURE_TOP, TEXTURE_MIDDLE, or TEXTURE_BOTTOM.\n + - texture: The name of the texture to set."; - SetLineTexture = "void SetLineTexture(int tag, int side, int part, str texture)\n" - "Changes the texture for the tagged lines.\n" - "side is either SIDE_FRONT or SIDE_BACK.\n" - "part is either TEXTURE_TOP, TEXTURE_MIDDLE, or TEXTURE_BOTTOM."; + SetLineSpecial = "void SetLineSpecial(int tag, int special, [int args, ...])\n + Changes the special and arguments for the tagged lines.\n + - tag: The line tag to modify.\n + - special: The special function to use.\n + - args: Up to 10 arguments can be provided. Any args not provided will be set to 0."; - SetLineSpecial = "void SetLineSpecial(int tag, int special, int arg1, ...)\n" - "Changes the special and arguments for the tagged lines.\n" - "special can be set to the actual name of the special.\n" - "Any number of args can be set."; + ThingSound = "void ThingSound(int tag, str sound, int volume)\n + Plays a sound effect on the tagged objects.\n + - tag: The tag of the object to play the sound for.\n + - sound: The name of the sound effect.\n + - volume: The volume to play it at, from 0 to 255."; - ThingSound = "void ThingSound(int tag, str sound, int volume)\n" - "Plays a sound effect on the tagged things."; + Print = "void Print(:, [...])\n + Displays a message to the center of the screen.\n + Expression types are as follows:\n + - i or d: Prints an integer as decimal (i:64)\n + - x: Prints an integer as hexadecimal (x:0x40)\n + - b: Prints an integer as binary (b:1)\n + - f: Prints an integer as fixed point (f:1.0)\n + - s: Prints a string (s:\"This is a string\")\n + - c: Prints a character (c:'A')\n + This will only display for the activator of the script.\n + For printing to all players, use PrintBold."; - PrintBold = "void PrintBold([type]:[expression], [...])\n" - "Print will display a message to the screen.\n" - "It will display for all players in the game.\n" - "For printing to only the activator, use Print."; + PrintBold = "void PrintBold([type]:[expression], [...])\n + Displays a message to the center of the screen.\n + Expression types are as follows:\n + - i or d: Prints an integer as decimal (i:64)\n + - x: Prints an integer as hexadecimal (x:0x40)\n + - b: Prints an integer as binary (b:1)\n + - f: Prints an integer as fixed point (f:1.0)\n + - s: Prints a string (s:\"This is a string\")\n + - c: Prints a character (c:'A')\n + This will display for all players in the game.\n + For printing to only the activator, use Print."; - Log = "void Log([type]:[expression], [...])\n" - "Log will display a message in the console.\n" - "It will display for only the activating player."; + Log = "void Log([type]:[expression], [...])\n + Displays a message in the console.\n + Expression types are as follows:\n + - i or d: Prints an integer as decimal (i:64)\n + - x: Prints an integer as hexadecimal (x:0x40)\n + - b: Prints an integer as binary (b:1)\n + - f: Prints an integer as fixed point (f:1.0)\n + - s: Prints a string (s:\"This is a string\")\n + - c: Prints a character (c:'A')\n + It will only display for the activator of the script.\n + For logging to all players, use LogBold."; + + LogBold = "void LogBold([type]:[expression], [...])\n + Displays a message in the console.\n + Expression types are as follows:\n + - i or d: Prints an integer as decimal (i:64)\n + - x: Prints an integer as hexadecimal (x:0x40)\n + - b: Prints an integer as binary (b:1)\n + - f: Prints an integer as fixed point (f:1.0)\n + - s: Prints a string (s:\"This is a string\")\n + - c: Prints a character (c:'A')\n + It will display for all players in the game.\n + For logging to only the activator, use Log."; } constants @@ -307,20 +847,133 @@ constants YES; NO; - LINE_FRONT; - LINE_BACK; + FLAG_NOCHANGE; + FLAG_ADD; + FLAG_REMOVE; + + PLANE_FLOOR; + PLANE_CEILING; + PLANE_BOTH; SIDE_FRONT; SIDE_BACK; + SIDE_BOTH; TEXTURE_TOP; TEXTURE_MIDDLE; TEXTURE_BOTTOM; + TAG_REPLACEFIRST; + TAG_ADD; + TAG_REMOVE; + + LIGHT_COPY_NOSECTOR; + LIGHT_COPY_NOFLOOR; + LIGHT_COPY_NOCEILING; + + LIGHT_BLINK_USETARGET; + LIGHT_BLINK_SYNC; + + LIGHT_FADE_TICBASED; + LIGHT_FADE_OVERRIDE; + LIGHT_FADE_RELATIVE; + + LIGHT_AREA_SECTOR; + LIGHT_AREA_FLOOR; + LIGHT_AREA_CEILING; + + TELEPORT_SILENT; + TELEPORT_KEEPANGLE; + TELEPORT_KEEPMOMENTUM; + TELEPORT_RELATIVE; + + MUSIC_ALLPLAYERS; + MUSIC_NOLOOP; + MUSIC_NOCREDIT; + MUSIC_NORELOAD; + MUSIC_FORCERESET; + MUSIC_OFFSET; + MUSIC_FADE; + + SFX_SOURCE_TRIGGERMOBJ; + SFX_SOURCE_TRIGGERSECTOR; + SFX_SOURCE_NOWHERE; + SFX_SOURCE_TAGGEDSECTOR; + + SFX_LISTEN_EVERYONE; + SFX_LISTEN_TRIGGERER; + SFX_LISTEN_TAGGEDSECTOR; + + CRUMBLE_NORETURN; + CRUMBLE_CHECKFLAG; + + COLORMAP_RELATIVE; + COLORMAP_SUBLIGHTR; + COLORMAP_SUBLIGHTG; + COLORMAP_SUBLIGHTB; + COLORMAP_SUBLIGHTA; + COLORMAP_SUBFADER; + COLORMAP_SUBFADEG; + COLORMAP_SUBFADEB; + COLORMAP_SUBFADEA; + COLORMAP_SUBFADESTART; + COLORMAP_SUBFADEEND; + COLORMAP_IGNOREFLAGS; + COLORMAP_FROMBLACK; + COLORMAP_OVERRIDE; + + SKYBOX_VIEWPOINT; + SKYBOX_CENTERPOINT; + SKYBOX_BOTH; + + ALPHA_SET_RELATIVE; + ALPHA_SET_DONTDOTRANSLUCENT; + + ALPHA_FADE_RELATIVE; + ALPHA_FADE_OVERRIDE; + ALPHA_FADE_TICBASED; + ALPHA_FADE_IGNORECOLLISION; + ALPHA_FADE_GHOSTFADE; + ALPHA_FADE_DONTDOTRANSLUCENT; + ALPHA_FADE_DONTDOEXISTS; + ALPHA_FADE_DONTDOLIGHTING; + ALPHA_FADE_DONTDOCOLORMAP; + ALPHA_FADE_USEEXACTALPHA; + + PROMPT_CLOSE; + PROMPT_RUNPOSTEXEC; + PROMPT_CALLBYNAME; + PROMPT_KEEPCONTROLS; + PROMPT_KEEPREALTIME; + + PO_ROTATE_DONTROTATEOTHERS; + PO_ROTATE_DONTROTATEPLAYERS; + PO_ROTATE_CONTINUOUS; + PO_ROTATE_OVERRIDE; + + PO_WP_RETURN_STOP; + PO_WP_RETURN_WRAP; + PO_WP_RETURN_COMEBACK; + + PO_WP_REVERSE; + PO_WP_LOOP; + + PO_FADE_RELATIVE; + PO_FADE_OVERRIDE; + PO_FADE_TICBASED; + PO_FADE_IGNORECOLLISION; + PO_FADE_GHOSTFADE; + + TICRATE; + FRACBITS; + FRACUNIT; + GAMETYPE_RACE; GAMETYPE_BATTLE; GAMESPEED_EASY; GAMESPEED_NORMAL; GAMESPEED_HARD; + + TAG_ALL; } diff --git a/extras/gdcc/inc/ACS/rrdefs.acs b/extras/gdcc/inc/ACS/rrdefs.acs index c6a3707d4..40af5301f 100644 --- a/extras/gdcc/inc/ACS/rrdefs.acs +++ b/extras/gdcc/inc/ACS/rrdefs.acs @@ -13,29 +13,144 @@ // Macros | // -#define TRUE 1 -#define FALSE 0 -#define ON 1 -#define OFF 0 -#define YES 1 -#define NO 0 +#define TRUE (1) +#define FALSE (0) -#define LINE_FRONT 0 -#define LINE_BACK 1 +#define ON (1) +#define OFF (0) -#define SIDE_FRONT 0 -#define SIDE_BACK 1 +#define YES (1) +#define NO (0) -#define TEXTURE_TOP 0 -#define TEXTURE_MIDDLE 1 -#define TEXTURE_BOTTOM 2 +#define FLAG_NOCHANGE (0) +#define FLAG_ADD (1) +#define FLAG_REMOVE (2) -#define GAMETYPE_RACE 0 -#define GAMETYPE_BATTLE 1 +#define PLANE_FLOOR (0) +#define PLANE_CEILING (1) +#define PLANE_BOTH (2) -#define GAMESPEED_EASY 0 -#define GAMESPEED_NORMAL 1 -#define GAMESPEED_HARD 2 +#define SIDE_FRONT (0) +#define SIDE_BACK (1) +#define SIDE_BOTH (2) + +#define TEXTURE_TOP (0) +#define TEXTURE_MIDDLE (1) +#define TEXTURE_BOTTOM (2) + +#define TAG_REPLACEFIRST (0) +#define TAG_ADD (1) +#define TAG_REMOVE (2) + +#define LIGHT_COPY_NOSECTOR (1) +#define LIGHT_COPY_NOFLOOR (1<<1) +#define LIGHT_COPY_NOCEILING (1<<2) + +#define LIGHT_BLINK_USETARGET (1) +#define LIGHT_BLINK_SYNC (1<<1) + +#define LIGHT_FADE_RELATIVE (1) +#define LIGHT_FADE_OVERRIDE (1<<1) +#define LIGHT_FADE_TICBASED (1<<2) + +#define LIGHT_AREA_SECTOR (0) +#define LIGHT_AREA_FLOOR (1) +#define LIGHT_AREA_CEILING (2) + +#define TELEPORT_SILENT (1) +#define TELEPORT_KEEPANGLE (1<<1) +#define TELEPORT_KEEPMOMENTUM (1<<2) +#define TELEPORT_RELATIVE (1<<3) + +#define MUSIC_ALLPLAYERS (1) +#define MUSIC_NOLOOP (1<<2) +#define MUSIC_NOCREDIT (1<<3) +#define MUSIC_NORELOAD (1<<4) +#define MUSIC_FORCERESET (1<<5) +#define MUSIC_OFFSET (1<<6) +#define MUSIC_FADE (1<<7) + +#define SFX_SOURCE_TRIGGERMOBJ (0) +#define SFX_SOURCE_TRIGGERSECTOR (1) +#define SFX_SOURCE_NOWHERE (2) +#define SFX_SOURCE_TAGGEDSECTOR (3) + +#define SFX_LISTEN_EVERYONE (0) +#define SFX_LISTEN_TRIGGERER (1) +#define SFX_LISTEN_TAGGEDSECTOR (2) + +#define CRUMBLE_NORETURN (1) +#define CRUMBLE_CHECKFLAG (1<<1) + +#define COLORMAP_RELATIVE (1) +#define COLORMAP_SUBLIGHTR (1<<1) +#define COLORMAP_SUBLIGHTG (1<<2) +#define COLORMAP_SUBLIGHTB (1<<3) +#define COLORMAP_SUBLIGHTA (1<<4) +#define COLORMAP_SUBFADER (1<<5) +#define COLORMAP_SUBFADEG (1<<6) +#define COLORMAP_SUBFADEB (1<<7) +#define COLORMAP_SUBFADEA (1<<8) +#define COLORMAP_SUBFADESTART (1<<9) +#define COLORMAP_SUBFADEEND (1<<10) +#define COLORMAP_IGNOREFLAGS (1<<11) +#define COLORMAP_FROMBLACK (1<<12) +#define COLORMAP_OVERRIDE (1<<13) + +#define SKYBOX_VIEWPOINT (0) +#define SKYBOX_CENTERPOINT (1) +#define SKYBOX_BOTH (2) + +#define ALPHA_SET_RELATIVE (1) +#define ALPHA_SET_DONTDOTRANSLUCENT (1<<1) + +#define ALPHA_FADE_RELATIVE (1) +#define ALPHA_FADE_OVERRIDE (1<<1) +#define ALPHA_FADE_TICBASED (1<<2) +#define ALPHA_FADE_IGNORECOLLISION (1<<3) +#define ALPHA_FADE_GHOSTFADE (1<<4) +#define ALPHA_FADE_DONTDOTRANSLUCENT (1<<5) +#define ALPHA_FADE_DONTDOEXISTS (1<<6) +#define ALPHA_FADE_DONTDOLIGHTING (1<<7) +#define ALPHA_FADE_DONTDOCOLORMAP (1<<8) +#define ALPHA_FADE_USEEXACTALPHA (1<<9) + +#define PROMPT_CLOSE (1) +#define PROMPT_RUNPOSTEXEC (1<<1) +#define PROMPT_CALLBYNAME (1<<2) +#define PROMPT_KEEPCONTROLS (1<<3) +#define PROMPT_KEEPREALTIME (1<<4) + +#define PO_ROTATE_DONTROTATEOTHERS (1) +#define PO_ROTATE_DONTROTATEPLAYERS (1<<1) +#define PO_ROTATE_CONTINUOUS (1<<2) +#define PO_ROTATE_OVERRIDE (1<<3) + +#define PO_WP_RETURN_STOP (0) +#define PO_WP_RETURN_WRAP (1) +#define PO_WP_RETURN_COMEBACK (2) + +#define PO_WP_REVERSE (1) +#define PO_WP_LOOP (1<<1) + +#define PO_FADE_RELATIVE (1) +#define PO_FADE_OVERRIDE (1<<1) +#define PO_FADE_TICBASED (1<<2) +#define PO_FADE_IGNORECOLLISION (1<<3) +#define PO_FADE_GHOSTFADE (1<<4) + +#define TICRATE (35) +#define FRACBITS (16) +#define FRACUNIT (1<> FRACBITS; + lines[i].args[0] = 0; + lines[i].args[1] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS; if (lines[i].flags & ML_NOCLIMB) - lines[i].args[1] = TMT_ADD; + lines[i].args[2] = TMT_ADD; else if (lines[i].flags & ML_BLOCKPLAYERS) - lines[i].args[1] = TMT_REMOVE; + lines[i].args[2] = TMT_REMOVE; else - lines[i].args[1] = TMT_REPLACEFIRST; + lines[i].args[2] = TMT_REPLACEFIRST; break; case 411: //Stop plane movement lines[i].args[0] = tag; @@ -5175,7 +5176,6 @@ static void P_ConvertBinaryLinedefTypes(void) break; case 437: //Disable player control lines[i].args[0] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS; - lines[i].args[1] = !!(lines[i].flags & ML_NOCLIMB); break; case 438: //Change object size lines[i].args[0] = P_AproxDistance(lines[i].dx, lines[i].dy) >> FRACBITS; diff --git a/src/p_spec.c b/src/p_spec.c index 394907c98..85c9fb58f 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -1034,20 +1034,20 @@ static void PolySetVisibilityTangibility(INT32 *args) if (po->isBad) return; - if (args[1] == TMPV_VISIBLE) + if (args[1] == TMF_ADD) { po->flags &= ~POF_NOSPECIALS; po->flags |= (po->spawnflags & POF_RENDERALL); } - else if (args[1] == TMPV_INVISIBLE) + else if (args[1] == TMF_REMOVE) { po->flags |= POF_NOSPECIALS; po->flags &= ~POF_RENDERALL; } - if (args[2] == TMPT_TANGIBLE) + if (args[2] == TMF_ADD) po->flags |= POF_SOLID; - else if (args[2] == TMPT_INTANGIBLE) + else if (args[2] == TMF_REMOVE) po->flags &= ~POF_SOLID; } @@ -2502,14 +2502,30 @@ void P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, char * case 410: // Change front sector's tag { mtag_t newtag; + line_t *editLine = NULL; - if (line == NULL) + if (args[0] == 0) { - break; // This one is reasonable to have based on the activator. + if (line == NULL) + { + CONS_Debug(DBG_GAMELOGIC, "Special type 410 Executor: No linedef to change frontsector tag of!\n"); + return; + } + editLine = line; + } + else + { + INT32 destline = Tag_Iterate_Sectors(args[0], 0); + if (destline == -1) + { + CONS_Debug(DBG_GAMELOGIC, "Special type 408 Executor: No linedef to change frontsector tag of (tag %d)!\n", args[0]); + return; + } + editLine = &lines[destline]; } newtag = args[1]; - secnum = (UINT32)(line->frontsector - sectors); + secnum = (UINT32)(editLine->frontsector - sectors); switch (args[2]) { @@ -2947,8 +2963,6 @@ void P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, char * UINT16 fractime = (UINT16)(args[0]); if (fractime < 1) fractime = 1; //instantly wears off upon leaving - if (args[1]) - fractime |= 1<<15; //more crazy &ing, as if music stuff wasn't enough mo->player->nocontrol = fractime; } break; @@ -2956,9 +2970,9 @@ void P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, char * case 438: // Set player scale if (mo) { - mo->destscale = FixedDiv(args[0]<destscale < FRACUNIT/100) - mo->destscale = FRACUNIT/100; + mo->destscale = FixedMul(FixedDiv(args[0]<destscale < mapobjectscale/100) + mo->destscale = mapobjectscale/100; } break;