CodeBase - Extended API

Return to the CodeBase listing

Category: System Enhancements

Version: 1.0

6
0

Information

Uploaded: 5th Sep 2018 03:59

Modified: 5th Sep 2018 13:28

Author:  GarBenjamin

Summary

Implements some fundamental functionality that is not contained within the native API.

Full Description

Implements some fundamental functionality that is not contained within the native API. Ideally, in time, this will be split out into 3 different files: APIGeneral.agc, API2D.agc and API3D.agc Currently, I have put everything into the APIGeneral.agc file even though there are a few sprite functions. Implements the following... CONSTANT DECLARATIONS: TRUE, FALSE, TRANSPARENCY_MODE_OFF, TRANSPARENCY_MODE_ALPHA, TRANSPARENCY_MODE_ADDITIVE, KEY_LEFT, KEY_A, KEY_RIGHT, KEY_D, KEY_UP, KEY_W, KEY_DOWN, KEY_S, KEY_T, KEY_E, KEY_SPACE, KEY_N, KEY_ESC, KEY_Z, KEY_X, KEY_C, KEY_SHIFT, KEY_ENTER, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_F1, KEY_F2, KEY_F3 and KEY_F4. TYPES: TVector2D. GENERAL FUNCTIONS: InitDisplay(title as string, width as integer, height as integer, maxFrameRate as float, allowResize as integer, fullscreen as integer), MinF(value1 as float, value2 as float), Min(value1 as integer, value2 as integer), MaxF(value1 as float, value2 as float), Max(value1 as integer, value2 as integer), SgnF(value as float), Sgn(value as integer) and GetFormatedInteger(value as integer, totalLength as integer). 2D VECTOR FUNCTIONS: Vector2DGetRatios(v2d ref as TVector2D) and Vector2DNormalize(v2d ref as TVector2D). ANGLE FUNCTIONS: AngleGetDistanceToAngle(fromAngle as float, toAngle as float), AngleGetShortestDistanceToAngle(fromAngle as float, toAngle as float), AngleIsWithin(testAngle as float, AngleToCompareTo as float, degrees as float), AngleIsBetween(testAngle as float, Angle1 as float, Angle2 as float) and AngleAddWithLimits(angle as float, valueToAdd as float, angleMin as float, angleMax as float). SPRITE FUNCTIONS: SetSpriteFaceSprite(sprite as integer, SpriteToFace as integer), SetSpriteFacePosition(sprite as integer, targetX as float, targetY as float) and SetSpriteFaceMouse(sprite as integer).

Comments

No comments yet.