zscript-doc/api.md

207 lines
4.4 KiB
Markdown
Raw Permalink Normal View History

2018-12-29 16:05:19 -08:00
# API
2018-11-18 08:44:41 -08:00
2019-04-02 08:28:16 -07:00
<!-- vim-markdown-toc GFM -->
2018-12-29 16:05:19 -08:00
* [Actors](#actors)
* [Base](#base)
* [Drawing](#drawing)
2019-04-02 08:28:16 -07:00
* [Event Handling](#event-handling)
2018-12-29 16:05:19 -08:00
* [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
2019-04-02 08:28:16 -07:00
<!-- vim-markdown-toc -->
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-12-29 16:05:19 -08:00
# Actors
2018-11-18 08:44:41 -08:00
2019-04-02 08:28:16 -07:00
<!-- inter-toc actor -->
2018-11-18 08:44:41 -08:00
* [State](api/actor/State.md)
2018-11-18 08:44:41 -08:00
2019-04-02 08:28:16 -07:00
<!-- 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
2019-04-02 08:28:16 -07:00
<!-- inter-toc base -->
2018-11-18 08:44:41 -08:00
* [Array](api/base/Array.md)
* [CVar](api/base/CVar.md)
* [Color](api/base/Color.md)
* [FixedArray](api/base/FixedArray.md)
* [Object](api/base/Object.md)
* [StringTable](api/base/StringTable.md)
* [String](api/base/String.md)
* [Thinker](api/base/Thinker.md)
* [Vector](api/base/Vector.md)
2018-11-18 08:44:41 -08:00
2019-04-02 08:28:16 -07:00
<!-- 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
2019-04-02 08:28:16 -07:00
<!-- inter-toc drawing -->
2018-11-18 08:44:41 -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
2019-04-02 08:28:16 -07:00
<!-- end -->
2019-04-02 05:56:03 -07:00
TODO
# Event Handling
2019-04-02 08:28:16 -07:00
<!-- inter-toc events -->
2019-04-02 05:56:03 -07:00
* [ConsoleEvent](api/events/ConsoleEvent.md)
* [EventHandler](api/events/EventHandler.md)
* [RenderEvent](api/events/RenderEvent.md)
* [ReplaceEvent](api/events/ReplaceEvent.md)
* [StaticEventHandler](api/events/StaticEventHandler.md)
2019-04-02 06:36:03 -07:00
2019-04-02 08:28:16 -07:00
<!-- 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
2019-04-02 08:28:16 -07:00
<!-- inter-toc files -->
2018-11-18 08:44:41 -08:00
* [Wads](api/files/Wads.md)
2018-11-18 08:44:41 -08:00
2019-04-02 08:28:16 -07:00
<!-- 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
2019-04-02 08:28:16 -07:00
<!-- inter-toc inter -->
2018-11-18 08:44:41 -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
2019-04-02 08:28:16 -07:00
<!-- end -->
2018-11-18 08:44:41 -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][1].
[1]: https://doomwiki.org/wiki/Statistics_driver
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
2019-04-02 08:28:16 -07:00
<!-- inter-toc level -->
2018-11-18 08:44:41 -08:00
* [F3DFloor](api/level/F3DFloor.md)
* [FColorMap](api/level/FColorMap.md)
* [LineIdIterator](api/level/LineIdIterator.md)
* [Line](api/level/Line.md)
* [SecPlane](api/level/SecPlane.md)
* [SecSpecial](api/level/SecSpecial.md)
* [SectorEffect](api/level/SectorEffect.md)
* [SectorTagIterator](api/level/SectorTagIterator.md)
* [Sector](api/level/Sector.md)
* [Side](api/level/Side.md)
* [Vertex](api/level/Vertex.md)
2018-11-18 08:44:41 -08:00
2019-04-02 08:28:16 -07:00
<!-- 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
2019-04-02 08:28:16 -07:00
<!-- inter-toc player -->
2018-11-18 08:44:41 -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
2019-04-02 08:28:16 -07:00
<!-- 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
2019-04-02 08:28:16 -07:00
<!-- inter-toc sound -->
2018-11-18 08:44:41 -08:00
* [SeqNode](api/sound/SeqNode.md)
2018-11-18 08:44:41 -08:00
2019-04-02 08:28:16 -07:00
<!-- 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
2019-08-14 02:28:36 -07:00
<!-- inter-toc weapon -->
2019-08-14 02:28:36 -07:00
* [PSprite](api/weapon/PSprite.md)
2018-11-18 08:44:41 -08:00
2019-04-02 08:28:16 -07:00
<!-- 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
<!-- inter-toc global/data -->
2018-11-18 08:44:41 -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
2019-04-02 08:28:16 -07:00
<!-- end -->
2018-11-18 08:44:41 -08:00
These variables are accessible in any context and are not bound by any specific
2019-04-02 03:56:41 -07:00
object. Generally these mirror global information within the engine itself.
2018-11-18 08:44:41 -08:00
<!-- inter-toc global/func -->
2018-11-25 19:32:49 -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
2019-04-02 08:28:16 -07:00
<!-- end -->
2018-11-25 19:32:49 -08:00
These functions are accessible in any context and are not bound by any specific
2019-04-02 03:56:41 -07:00
object. Generally these are utility functions.
<!-- inter-toc global/type -->
2019-04-02 03:56:41 -07:00
* [DehInfo](api/global/type/DehInfo.md)
* [FOptionMenuSettings](api/global/type/FOptionMenuSettings.md)
* [GameInfoStruct](api/global/type/GameInfoStruct.md)
* [LevelLocals](api/global/type/LevelLocals.md)
2019-04-02 03:56:41 -07:00
2019-04-02 08:28:16 -07:00
<!-- end -->
2019-04-02 03:56:41 -07:00
These are the types used by global variables.
2018-11-25 19:32:49 -08:00
2018-11-18 08:44:41 -08:00
<!-- EOF -->