zscript-doc/2-api.md

177 lines
4.3 KiB
Markdown
Raw Normal View History

2018-12-29 16:05:19 -08:00
# API
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
* [Actors](#actors)
* [Base](#base)
* [Drawing](#drawing)
* [Files](#files)
* [Intermission Screens](#intermission-screens)
* [Level Data](#level-data)
* [Players](#players)
* [Sounds](#sounds)
* [Weapons](#weapons)
* [Global Objects](#global-objects)
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
The ZScript API (Advanced Programming Interface) is vast and has some holes which are hard to explain. Some parts are implemented in ways that don't make sense to user code, but are fine to the engine. Because of this, the API shall be documented in pseudo-ZScript which gives an idea of how it works for the modder rather than for the engine.
2018-11-18 08:44:41 -08:00
Note to authors: Capitalization is normalized within this documentation to encourage consistent code, and does not follow ZScript's original capitalization exactly. Similarly, argument names in methods are sometimes renamed. Note well that *arguments with defaults MAY NOT be renamed* as they are part of the API.
2018-12-29 16:05:19 -08:00
# Actors
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
<!-- toc actor -->
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
* [State](api-actor-State.md)
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
<!-- toc end -->
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
TODO
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
# Base
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
<!-- toc base -->
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
* [Array](api-base-Array.md)
* [Color](api-base-Color.md)
* [CVar](api-base-CVar.md)
* [FixedArray](api-base-FixedArray.md)
* [Object](api-base-Object.md)
* [String](api-base-String.md)
* [StringTable](api-base-StringTable.md)
* [Thinker](api-base-Thinker.md)
* [Vector](api-base-Vector.md)
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
<!-- toc end -->
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
TODO
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
# Drawing
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
<!-- toc drawing -->
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
* [BrokenLines](api-drawing-BrokenLines.md)
* [Console](api-drawing-Console.md)
* [Font](api-drawing-Font.md)
* [GIFont](api-drawing-GIFont.md)
* [Screen](api-drawing-Screen.md)
* [Shape2D](api-drawing-Shape2D.md)
* [TexMan](api-drawing-TexMan.md)
* [TextureID](api-drawing-TextureID.md)
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
<!-- toc end -->
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
TODO
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
# Files
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
<!-- toc files -->
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
* [Wads](api-files-Wads.md)
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
<!-- toc end -->
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
TODO
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
# Intermission Screens
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
<!-- toc inter -->
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
* [InterBackground](api-inter-InterBackground.md)
* [PatchInfo](api-inter-PatchInfo.md)
* [StatusScreen](api-inter-StatusScreen.md)
* [WBPlayerStruct](api-inter-WBPlayerStruct.md)
* [WBStartStruct](api-inter-WBStartStruct.md)
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
<!-- toc end -->
2018-11-18 08:44:41 -08:00
2018-12-29 18:04:30 -08:00
For legacy reasons, many intermission-related things may be prefixed with `WI` or `WB`. The abbreviation `WI` means *World Intermission* (the intermission screen was originally called "World Map" by Tom Hall) and `WB` meaning *World Buffer*, as this data was originally buffered into a specific memory address for [statistics drivers](https://doomwiki.org/wiki/Statistics_driver). <!-- Author's Note: I am not actually sure if this naming scheme is documented anywhere else, as even source port developers I asked didn't know about it. Feel free to disseminate this information, it was an original research. --!>
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
# Level Data
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
<!-- toc level -->
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
* [F3DFloor](api-level-F3DFloor.md)
* [FColorMap](api-level-FColorMap.md)
* [Line](api-level-Line.md)
* [LineIdIterator](api-level-LineIdIterator.md)
* [SecPlane](api-level-SecPlane.md)
* [SecSpecial](api-level-SecSpecial.md)
* [Sector](api-level-Sector.md)
* [SectorEffect](api-level-SectorEffect.md)
* [Side](api-level-Side.md)
* [Vertex](api-level-Vertex.md)
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
<!-- toc end -->
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
TODO
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
# Players
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
<!-- toc player -->
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
* [PlayerClass](api-player-PlayerClass.md)
* [PlayerSkin](api-player-PlayerSkin.md)
* [Team](api-player-Team.md)
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
<!-- toc end -->
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
TODO
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
# Sounds
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
<!-- toc sound -->
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
* [SeqNode](api-sound-SeqNode.md)
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
<!-- toc end -->
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
TODO
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
# Weapons
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
<!-- toc wep -->
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
* [PSprite](api-wep-PSprite.md)
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
<!-- toc end -->
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
TODO
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
# Global Objects
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
<!-- toc global -->
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
* [DEHInfo](api-global-DEHInfo.md)
* [FOptionMenuSettings](api-global-FOptionMenuSettings.md)
* [GameInfoStruct](api-global-GameInfoStruct.md)
* [LevelLocals](api-global-LevelLocals.md)
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
<!-- toc end -->
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
These types are used by global variables.
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
<!-- toc global-data -->
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
* [Client](api-global-data-Client.md)
* [Constants](api-global-data-Constants.md)
* [Game](api-global-data-Game.md)
* [Information](api-global-data-Information.md)
* [Player](api-global-data-Player.md)
2018-11-18 08:44:41 -08:00
2018-12-29 16:05:19 -08:00
<!-- toc end -->
2018-11-18 08:44:41 -08:00
These variables are accessible in any context and are not bound by any specific object.
2018-12-29 16:05:19 -08:00
<!-- toc global-func -->
2018-11-25 19:32:49 -08:00
2018-12-29 16:05:19 -08:00
* [Classes](api-global-func-Classes.md)
* [Game](api-global-func-Game.md)
* [Math](api-global-func-Math.md)
* [Random](api-global-func-Random.md)
* [Sound](api-global-func-Sound.md)
* [System](api-global-func-System.md)
2018-11-25 19:32:49 -08:00
2018-12-29 16:05:19 -08:00
<!-- toc end -->
2018-11-25 19:32:49 -08:00
2018-12-29 16:05:19 -08:00
These functions are accessible in any context and are not bound by any specific object.
2018-11-25 19:32:49 -08:00
2018-11-18 08:44:41 -08:00
<!-- EOF -->