Index

Package: Physics

Description

package Physics is

Types

Clip_Type

type Clip_Type is (
        Passive,
        OneWay,
        Wall,

        Slope_45_Up_Floor,   Slope_45_Up_Ceiling,
        Slope_45_Down_Floor, Slope_45_Down_Ceiling,

        Slope_22_Up_Floor_Thin,   Slope_22_Up_Floor_Wide,
        Slope_22_Up_Ceiling_Wide, Slope_22_Up_Ceiling_Thin,

        Slope_22_Down_Floor_Wide,   Slope_22_Down_Floor_Thin,
        Slope_22_Down_Ceiling_Thin, Slope_22_Down_Ceiling_Wide
    );
This enumeration describes the physical bounding types of tiles, from fully empty to full solid and all the different kinds of slopes.

Constants & Global variables

INSTANT_ACCELERATION (Float)

INSTANT_ACCELERATION : constant Float;
The point at which acceleration is considered to be immediate. Any accelerations greater than or equal to this constant will cause an entity to immediately reach their target velocity with one tick of the physics manager.

Subprograms & Entries

or

function "or"
( l, r: Clip_Type ) return Clip_Type;
Combines two Clip_Type values and returns the most solid/occlusive one.

Clip_Downward

procedure Clip_Downward
( clip: Clip_Type;
size: Positive;
x, y: Natural;
adjustY: out Integer );
Clips a point to a tile as though the point is moving in the downward direction. The amount which the point should be adjusted upward is returned in 'adjustY'. 'size' is the size of the tile in pixels and 'x', 'y' is the point's location within the area of the tile. 'x' and 'y' must be in the range of 0..size-1. clip : the clipping type of the tile size : the width/height of the tile x, y : the location of the point to clip within the tile adjustY : the distance the point should be moved in the y axis (negative)

Clip_Upward

procedure Clip_Upward
( clip: Clip_Type;
size: Positive;
x, y: Natural;
adjustY: out Integer );
Clips a point to a tile as though the point is moving in the upward direction. The amount which the point should be adjusted downward is returned in 'adjustY'. 'size' is the size of the tile in pixels and 'x', 'y' is the point's location within the area of the tile. 'x' and 'y' must be in the range of 0..size-1. clip : the clipping type of the tile size : the width/height of the tile x, y : the location of the point to clip within the tile adjustY : the distance the point should be moved in the y axis (positive)

To_Clip_Type

procedure To_Clip_Type
( str: String;
clip: out Clip_Type;
valid: out Boolean );
Returns the matching Clip_Type value for a string. The string should be the exact name of the enumeration value. 'valid' will return False if 'str' is not a valid Clip_Type value.