212 void Rect(vector rectPos, vector rectSize, vector rectRGB ,
float rectAlpha);
220 void RectOutline(vector rectPos, vector rectSize,
float outlineThickness, vector rectColor,
float rectAlpha);
235 void RoundedBox(vector boxPos, vector boxSize, vector boxColor,
float boxAlpha);
244 void Line(
float lineThickness, vector startPos, vector endPos, vector lineColor,
float lineAlpha);
252 void Pic(vector imagePos,
string imageName, vector imageSize, vector imageColor,
float imageAlpha,
float imageFlags);
262 void SubPic(vector imagePos, vector displaySize,
string imageName, vector sourcePos, vector sourceSize, vector imageColor,
float imageAlpha,
float imageFlags);
311 void TextField(vector vecOrigin, vector vecSize,
string strText,
font_s fnt, alignflags_t iAlignFlags);
320 void TextFieldAtHeight(vector vecOrigin, vector vecSize,
int iTextHeight,
string strText,
font_s fnt, alignflags_t iAlignFlags);
538 void Draw_RGBA(
int atlasPic, vector drawAtPos, vector picColor,
float picAlpha,
bool forceAdditive);
539 void DrawTop_RGBA(
int atlasPic, vector drawAtPos,
float percentageDrawn, vector picColor,
float picAlpha,
bool forceAdditive);
540 void DrawBottom_RGBA(
int atlasPic, vector drawAtPos,
float percentageDrawn, vector picColor,
float picAlpha,
bool forceAdditive);
541 void DrawLeft_RGBA(
int atlasPic, vector drawAtPos,
float percentageDrawn, vector picColor,
float picAlpha,
bool forceAdditive);
542 void DrawRight_RGBA(
int atlasPic, vector drawAtPos,
float percentageDrawn, vector picColor,
float picAlpha,
bool forceAdditive);
545 void DrawTop_RGB(
int atlasPic, vector drawAtPos,
float percentageDrawn, vector picColor,
bool forceAdditive);
574linkToClientProgs(
string funcName)
576 static void empty(
void)
578 print(
"Called unimplemented client-side API call.\n");
582 void *func = externvalue(0, funcName);
585 return ((__variant)func);
595 font.
GetID = linkToClientProgs(
"Font_GetID");
596 font.
Load = linkToClientProgs(
"Font_Load");
600 screen.
Width = linkToClientProgs(
"CLPF_surface_ScreenWidth");
601 screen.
Height = linkToClientProgs(
"CLPF_surface_ScreenHeight");
602 screen.
Size = linkToClientProgs(
"CLPF_surface_ScreenSize");
603 screen.
Mins = linkToClientProgs(
"CLPF_surface_ScreenMins");
655 draw.
Rect = linkToClientProgs(
"CLPF_draw_Rect");
659 draw.
Line = linkToClientProgs(
"CLPF_draw_Line");
660 draw.
Pic = linkToClientProgs(
"CLPF_draw_Pic");
661 draw.
SubPic = linkToClientProgs(
"CLPF_draw_SubPic");
665 draw.
RText = linkToClientProgs(
"Font_DrawRText");
666 draw.
RText_A = linkToClientProgs(
"Font_DrawRText_A");
669 draw.
Text = linkToClientProgs(
"Font_DrawText");
670 draw.
Text_A= linkToClientProgs(
"Font_DrawText_A");
680 atlasPic.
Load = linkToClientProgs(
"CLPF_atlasPic_Load");
681 atlasPic.
Draw = linkToClientProgs(
"CLPF_atlasPic_Draw");
var surfaceAPI_t screen
Access surfaceAPI_t functions using this variable.
Definition: api_func.h:201
var spectatingAPI_t spectating
Access spectatingAPI_t functions using this variable.
Definition: api_func.h:530
var fontAPI_t font
Access fontAPI_t functions using this variable.
Definition: api_func.h:188
var materialAPI_t material
Access atlasPicAPI_t functions using this variable.
Definition: api_func.h:566
var weaponAPI_t weapon
Access weaponAPI_t functions using this variable.
Definition: api_func.h:519
var drawAPI_t draw
Access drawAPI_t functions using this variable.
Definition: api_func.h:325
var atlasPicAPI_t atlasPic
Access atlasPicAPI_t functions using this variable.
Definition: api_func.h:556
var playerAPI_t player
Access playerAPI_t functions using this variable.
Definition: api_func.h:421
drawflag_t
Flags for 2D drawing operations.
Definition: font.h:27
typedef enumflags
Defines the valid alignment flags for text fields.
Definition: font.h:37
@ DRAWFLAG_ADDITIVE
Render with an additive blend mode.
Definition: api_func.h:21
@ DRAWFLAG_MODULATE
Not implemented in FTEQW.
Definition: api_func.h:22
@ DRAWFLAG_2XMODULATE
Not implemented in FTEQW.
Definition: api_func.h:23
@ DRAWFLAG_NORMAL
The default.
Definition: api_func.h:20
atlasPic library
Definition: api_func.h:534
void DrawLeft_RGBA(int atlasPic, vector drawAtPos, float percentageDrawn, vector picColor, float picAlpha, bool forceAdditive)
void DrawTop_RGBA(int atlasPic, vector drawAtPos, float percentageDrawn, vector picColor, float picAlpha, bool forceAdditive)
void Draw_RGB(int atlasPic, vector drawAtPos, vector picColor, bool forceAdditive)
void DrawRight_RGB(int atlasPic, vector drawAtPos, float percentageDrawn, vector picColor, bool forceAdditive)
void DrawLeft_RGB(int atlasPic, vector drawAtPos, float percentageDrawn, vector picColor, bool forceAdditive)
float GetWidth(int atlasPic)
void Draw_RGBA(int atlasPic, vector drawAtPos, vector picColor, float picAlpha, bool forceAdditive)
int Load(string atlasPicName)
float GetHeight(int atlasPic)
void DrawBottom_RGBA(int atlasPic, vector drawAtPos, float percentageDrawn, vector picColor, float picAlpha, bool forceAdditive)
void Draw_A(int atlasPic, vector drawAtPos, float picAlpha, bool forceAdditive)
void DrawTop_RGB(int atlasPic, vector drawAtPos, float percentageDrawn, vector picColor, bool forceAdditive)
void DrawRight_RGBA(int atlasPic, vector drawAtPos, float percentageDrawn, vector picColor, float picAlpha, bool forceAdditive)
void Draw(int atlasPic, vector drawAtPos, bool forceAdditive)
void DrawCrosshair(int atlasPic)
vector GetSize(int atlasPic)
void DrawBottom_RGB(int atlasPic, vector drawAtPos, float percentageDrawn, vector picColor, bool forceAdditive)
Draw library.
Definition: api_func.h:205
void RText_RGB(vector vecOrigin, string strText, vector col, font_s fnt)
Right-aligned variant of Text_RGB().
void Text(vector vecOrigin, string strText, font_s fnt)
Draw text on the screen at the desired position with a desired font.
void Line(float lineThickness, vector startPos, vector endPos, vector lineColor, float lineAlpha)
Displays a line with a specified thickness and color.
void TextFieldAtHeight(vector vecOrigin, vector vecSize, int iTextHeight, string strText, font_s fnt, alignflags_t iAlignFlags)
Draws a textfield with line wrapping at a custom text height.
void Text_RGBA(vector vecOrigin, string strText, vector col, float a, font_s fnt)
Draw tinted and alpha blended text on the screen at the desired position with a desired font.
void TextField(vector vecOrigin, vector vecSize, string strText, font_s fnt, alignflags_t iAlignFlags)
Draws a textfield with line wrapping.
void Text_RGB(vector vecOrigin, string strText, vector col, font_s fnt)
Draw tinted text on the screen at the desired position with a desired font.
void RoundedRectOutline(vector rectPos, vector rectSize, vector rectColor, float rectAlpha)
Displays a colored, rounded rectangle outline at the specified position with a specified size.
void RadarRect(vector vecOrigin, vector vecSize)
Draws an opaque, rectangular radar that is centered around the current player, or the player that is ...
void Rect(vector rectPos, vector rectSize, vector rectRGB, float rectAlpha)
Displays a solid colored rectangle at the specified position with a specified size.
void SubPic(vector imagePos, vector displaySize, string imageName, vector sourcePos, vector sourceSize, vector imageColor, float imageAlpha, float imageFlags)
Draws part of an image from either the virtual file-system, or the materials.
void RText_RGBA(vector vecOrigin, string strText, vector col, float a, font_s fnt)
Right-aligned variant of Text_RGBA().
void RoundedBox(vector boxPos, vector boxSize, vector boxColor, float boxAlpha)
Displays a colored rounded box at the specified position with a specified size.
void Pic(vector imagePos, string imageName, vector imageSize, vector imageColor, float imageAlpha, float imageFlags)
Draws an image from either the virtual file-system, or the materials.
void RText_A(vector vecOrigin, string strText, float a, font_s fnt)
Right-aligned variant of Text_A().
void RectOutline(vector rectPos, vector rectSize, float outlineThickness, vector rectColor, float rectAlpha)
Displays a colored rectangle outline at the specified position with a specified size.
void RText(vector vecOrigin, string strText, font_s fnt)
Right-aligned variant of Text().
void Text_A(vector vecOrigin, string strText, float a, font_s fnt)
Draw alpha-blended text on the screen at the desired position with a desired font.
Font library.
Definition: api_func.h:142
float GetID(font_s fnt)
Get the internal font id.
string RGBtoHex(vector normalizedColor)
Converts a normalized RGB color vector to a hex color string.
void Load(string fontDef, font_s &fntNew)
Load a desired .font definition into memory.
int GetHeight(font_s fnt)
Returns the height of a specified font in pixels.
float StringWidth(string inputText, bool hasColor, font_s fnt)
Returns the width of a series of characters in pixels.
Representation of a font.
Definition: api_func.h:39
int iFlags
Rendering flags that the font posesses.
Definition: api_func.h:45
int iScaleX
Suggested maximum width of a character in the font.
Definition: api_func.h:41
int iScaleY
Maximum height of a chracter in the font.
Definition: api_func.h:42
vector vecColor
Suggested default color of the font.
Definition: api_func.h:43
float flAlpha
Suggested default alpha of the font.
Definition: api_func.h:44
int iID
Internal ID, will be passed to 'drawfont' before rendering text.
Definition: api_func.h:40
string hexColor
Definition: api_func.h:46
material library
Definition: api_func.h:560
float GetWidth(string materialName)
float GetHeight(string materialName)
vector GetSize(string materialName)
Player library.
Definition: api_func.h:329
float GetFloat(string userKey)
Returns the floating-point value of a current/active player's info-key.
int GetTeam(void)
Get the current player's team ID.
bool GetBool(string userKey)
Returns the boolean value of a current/active player's info-key.
float GetHealth(void)
Get the current player's health value.
float GetArmor(void)
Get the current player's armor value.
bool IsLeaning(void)
Check if the current player is leaning in any direction.
bool IsProne(void)
Check if the current player is actively prone/laying flat on the ground.
bool IsCrouched(void)
Check if the current player is actively crouched/ducked.
vector GetCameraAngles(void)
Get the current 3D viewport's camera angle.
bool IsMoving(void)
Check if the current player is actively moving.
bool HasItem(string itemClassName)
Check if the current player has a particular item.
int GetInteger(string userKey)
Returns the integer value of a current/active player's info-key.
bool IsStanding(void)
Check if the current player is standing upright.
float GetStamina(void)
Get the current player's stamina value.
vector GetVector(string userKey)
Returns the vector value of a current/active player's info-key.
float GetGameFlags(void)
Returns the game flags of the player entity.
string GetString(string userKey)
Returns the string value of the current/active player's info-key.
bool IsFalling(void)
Check if the current player is not on ground.
bool IsSprinting(void)
Check if the current player is actively sprinting.
vector GetCameraPosition(void)
Get the current 3D viewport's camera position.
Spectating library.
Definition: api_func.h:524
ncSpectatorMode_t Mode(void)
string LocalizedMode(void)
Surface library.
Definition: api_func.h:193
vector HUDSize(void)
Returns the size of the HUD.
float Height(void)
The height of the surface or display.
float Width(void)
The width of the surface or display.
vector HUDMins(void)
Returns the top-left starting position of the HUD on the surface.
vector Size(void)
The size of the surface or display.
vector Mins(void)
Returns the top-left starting position of the surface.
Weapon library.
Definition: api_func.h:425
bool UsesSecondaryAmmo(entity weaponRef=__NULL__)
Returns if the specified weapon item in the player's inventory makes use of a secondary ammo type.
entity GetNextWeaponRelativeTo(entity)
Returns the weapon that comes after (in the player's inventory) the input weapon.
string GetTitle(entity weaponRef=__NULL__)
Returns the title of the weapon specified.
entity GetActiveWeapon(void)
Returns the current/active weapon item in the player's inventory.
entity GetLastWeaponInInventory(void)
Returns the last weapon item in the player's inventory.
int GetSlotPos(entity weaponRef=__NULL__)
Returns if the slot position of the weapon specified.
int GetAmmo1(entity weaponRef=__NULL__)
Returns if the current/active weapons present reserve ammo.
bool IsEmpty(entity weaponRef=__NULL__)
Returns if the specified weapon item in the player's inventory is empty.
string GetIcon(entity weaponRef=__NULL__)
Returns the inventory icons of the weapon specified.
bool AmmoRequired(entity weaponRef=__NULL__)
Returns if the specified weapon item in the player's inventory requires ammo.
entity GetPreviousWeaponRelativeTo(entity playerWeapon)
Returns the weapon that comes before (in the player's inventory) the input weapon.
int GetClipSize(entity weaponRef=__NULL__)
Returns if the current/active weapons maximum clip/magazine size.
int MaxAmmo(entity weaponRef=__NULL__)
Returns if the maximum reserve ammo.
entity GetFirstWeaponInInventory(void)
Returns the first weapon item in the player's inventory.
int GetClip(entity weaponRef=__NULL__)
Returns if the current/active weapons present clip/magazine size.
string GetSelectedIcon(entity weaponRef=__NULL__)
Returns the selected variant inventory icons of the weapon specified.
bool IsValid(entity weaponRef=__NULL__)
Returns whether this entity reference to a weapon is still valid.
int GetAmmo2(entity weaponRef=__NULL__)
Returns if the current/active weapons present reserve ammo, but for the second ammo type.
void SelectWeapon(entity)
Attempts to make the player switch to the specified weapon reference.
int GetSlot(entity weaponRef=__NULL__)
Returns the slot number of the weapon specified.