Sprites

Sprites

Description

SwinGame Sprites are game elements that can be moved, and animated. Sprites are located at a position in the game, have a velocity, and an animation. The Sprite can also have arbitary data associated with it for game specific purposes.

Call For All Sprites

Call the supplied function for all sprites.

  • Call For All Sprites (fn) [show]

    Call the supplied function for all sprites.

    Parameters:
    fn : SpriteFunction
    Signatures by Language:
    C/C++: void call_for_all_sprites(sprite_function fn);
    Pascal: procedure CallForAllSprites(fn: SpriteFunction);

Call On Sprite Event

Register a procedure to be called when an events occur on any sprite.

  • Call On Sprite Event (handler) [show]

    Register a procedure to be called when an events occur on any sprite.

    Parameters:
    handler : SpriteEventHandler
    Signatures by Language:
    C/C++: void call_on_sprite_event(sprite_event_handler handler);
    Pascal: procedure CallOnSpriteEvent(handler: SpriteEventHandler);

Center Point

Returns the center point of the passed in Sprite. This is based on the Sprite's Position, Width and Height.

  • Center Point (s) : Point2D [show]

    Returns the center point of the passed in Sprite. This is based on the Sprite's Position, Width and Height.

    Parameters:
    s : Sprite
    Returns:
    Point2D :
    Signatures by Language:
    C/C++: point2d center_point(sprite s);
    Pascal: function CenterPoint(s: Sprite): Point2D;

Create Sprite

Creates a sprite for the passed in bitmap image. The sprite will use the cell information within the sprite if it is animated at a later stage. This version of CreateSprite will initialise the sprite to use pixel level collisions, no animation, the layer have name 'layer1'.

This version of the constructor will assign a default name to the sprite for resource management purposes.

  • Create Sprite (layer) : Sprite [show]

    Creates a sprite for the passed in bitmap image. The sprite will use the cell information within the sprite if it is animated at a later stage. This version of CreateSprite will initialise the sprite to use pixel level collisions, no animation, the layer have name 'layer1'.

    This version of the constructor will assign a default name to the sprite for resource management purposes.

    Parameters:
    layer : Bitmap
    Returns:
    Sprite :
    Signatures by Language:
    C/C++: sprite create_basic_sprite(bitmap layer);
    C++: sprite create_sprite(bitmap layer);
    Pascal: function CreateSprite(layer: Bitmap): Sprite;
  • Create Sprite (const layers) : Sprite [show]

    Creates a sprite for the passed in bitmap images. The sprite will use the cell information within the sprite if it is animated at a later stage. This version of CreateSprite will initialise the sprite to use pixel level collisions, no animation, the layer names 'layer1', 'layer2',... .

    This version of the constructor will assign a default name to the sprite for resource management purposes.

    Parameters:
    layers : BitmapArray
    Returns:
    Sprite :
    Signatures by Language:
    C/C++: sprite create_layered_sprite(const bitmap *layers, int32_t layers_len);
    C++: sprite create_sprite(const bitmap *layers, int32_t layers_len);
    Pascal: function CreateSprite(const layers: BitmapArray): Sprite;
  • Create Sprite (layer, layerName) : Sprite [show]

    Creates a sprite for the passed in bitmap image. The sprite will use the cell information within the sprite if it is animated at a later stage. This version of CreateSprite will initialise the sprite to use pixel level collisions, no animation, and the specified layer have name.

    This version of the constructor will assign a default name to the sprite for resource management purposes.

    Parameters:
    layer : Bitmap
    layerName : String
    Returns:
    Sprite :
    Signatures by Language:
    C/C++: sprite create_sprite_with_layer(bitmap layer, const char *layerName);
    C++: sprite create_sprite(bitmap layer, const char *layerName);
    Pascal: function CreateSprite(layer: Bitmap; layerName: String): Sprite;
  • Create Sprite (layer, pt) : Sprite [show]

    Creates a sprite for the passed in bitmap image. The sprite will use the cell information within the sprite if it is animated at a later stage. This version of CreateSprite will initialise the sprite to use pixel level collisions, no animation, the layer have name 'layer1', and position the sprite at the given location.

    This version of the constructor will assign a default name to the sprite for resource management purposes.

    Parameters:
    layer : Bitmap
    pt : Point2D
    Returns:
    Sprite :
    Signatures by Language:
    C/C++: sprite create_basic_sprite_pt(bitmap layer, point2d pt);
    C++: sprite create_sprite(bitmap layer, point2d pt);
    Pascal: function CreateSprite(layer: Bitmap; pt: Point2D): Sprite;
  • Create Sprite (bitmapName, animationName) : Sprite [show]

    Creates a sprite. The bitmapName is used to indicate the bitmap the sprite will use, and the animationName is used to indicate which AnimationScript to use.

    Parameters:
    bitmapName : String
    animationName : String
    Returns:
    Sprite :
    Signatures by Language:
    C/C++: sprite create_sprite_with_bitmap_and_animation_name(const char *bitmapName, const char *animationName);
    C++: sprite create_sprite(const char *bitmapName, const char *animationName);
    Pascal: function CreateSprite(bitmapName: String; animationName: String): Sprite;
    • source code
    • lib name: CreateSpriteWithBitmapAndAnimationName
  • Create Sprite (name, layer) : Sprite [show]

    Creates a sprite for the passed in bitmap image. The sprite will use the cell information within the sprite if it is animated at a later stage. This version of CreateSprite will initialise the sprite to use pixel level collisions, no animation, the layer have name 'layer1'.

    Parameters:
    name : String
    layer : Bitmap
    Returns:
    Sprite :
    Signatures by Language:
    C/C++: sprite create_basic_sprite_named(const char *name, bitmap layer);
    C++: sprite create_sprite(const char *name, bitmap layer);
    Pascal: function CreateSprite(name: String; layer: Bitmap): Sprite;
  • Create Sprite (const layers, const layerNames) : Sprite [show]

    Creates a sprite for the passed in bitmap images. The sprite will use the cell information within the sprite if it is animated at a later stage. This version of CreateSprite will initialise the sprite to use pixel level collisions, no animation, and the specified layer names.

    This version of the constructor will assign a default name to the sprite for resource management purposes.

    Parameters:
    layers : BitmapArray
    layerNames : StringArray
    Returns:
    Sprite :
    Signatures by Language:
    C/C++: sprite create_layered_sprite_with_layer_names(const bitmap *layers, const string_array layerNames, int32_t layers_len, int32_t layerNames_len);
    C++: sprite create_sprite(const bitmap *layers, const string_array layerNames, int32_t layers_len, int32_t layerNames_len);
    Pascal: function CreateSprite(const layers: BitmapArray; const layerNames: StringArray): Sprite;
    • source code
    • lib name: CreateLayeredSpriteWithLayerNames
  • Create Sprite (layer, ani) : Sprite [show]

    Creates a sprite for the passed in bitmap image. The sprite will use the cell information within the sprite if it is animated at a later stage. This version of CreateSprite will initialise the sprite to use pixel level collisions, the specified animation template, the layer have name 'layer1'.

    This version of the constructor will assign a default name to the sprite for resource management purposes.

    Parameters:
    layer : Bitmap
    ani : AnimationScript
    Returns:
    Sprite :
    Signatures by Language:
    C/C++: sprite create_sprite_with_animation(bitmap layer, animation_script ani);
    C++: sprite create_sprite(bitmap layer, animation_script ani);
    Pascal: function CreateSprite(layer: Bitmap; ani: AnimationScript): Sprite;
  • Create Sprite (name, const layers) : Sprite [show]

    Creates a sprite for the passed in bitmap images. The sprite will use the cell information within the sprite if it is animated at a later stage. This version of CreateSprite will initialise the sprite to use pixel level collisions, no animation, the layer names 'layer1', 'layer2',... .

    Parameters:
    name : String
    layers : BitmapArray
    Returns:
    Sprite :
    Signatures by Language:
    C/C++: sprite create_layered_sprite_named(const char *name, const bitmap *layers, int32_t layers_len);
    C++: sprite create_sprite(const char *name, const bitmap *layers, int32_t layers_len);
    Pascal: function CreateSprite(name: String; const layers: BitmapArray): Sprite;
  • Create Sprite (const layers, ani) : Sprite [show]

    Creates a sprite for the passed in bitmap images. The sprite will use the cell information within the sprite if it is animated at a later stage. This version of CreateSprite will initialise the sprite to use pixel level collisions, the specified animation template, the layer names 'layer1', 'layer2',... .

    This version of the constructor will assign a default name to the sprite for resource management purposes.

    Parameters:
    layers : BitmapArray
    ani : AnimationScript
    Returns:
    Sprite :
    Signatures by Language:
    C/C++: sprite create_layered_sprite_with_animation_script(const bitmap *layers, animation_script ani, int32_t layers_len);
    C++: sprite create_sprite(const bitmap *layers, animation_script ani, int32_t layers_len);
    Pascal: function CreateSprite(const layers: BitmapArray; ani: AnimationScript): Sprite;
    • source code
    • lib name: CreateLayeredSpriteWithAnimationScript
  • Create Sprite (name, layer, ani) : Sprite [show]

    Creates a sprite for the passed in bitmap image. The sprite will use the cell information within the sprite if it is animated at a later stage. This version of CreateSprite will initialise the sprite to use pixel level collisions, the specified animation template, the layer have name 'layer1'.

    Parameters:
    name : String
    layer : Bitmap
    ani : AnimationScript
    Returns:
    Sprite :
    Signatures by Language:
    C/C++: sprite create_sprite_with_animation_named(const char *name, bitmap layer, animation_script ani);
    C++: sprite create_sprite(const char *name, bitmap layer, animation_script ani);
    Pascal: function CreateSprite(name: String; layer: Bitmap; ani: AnimationScript): Sprite;
  • Create Sprite (layer, ani, pt) : Sprite [show]

    Creates a sprite for the passed in bitmap image. The sprite will use the cell information within the sprite if it is animated at a later stage. This version of CreateSprite will initialise the sprite to use pixel level collisions, the specified animation template, the layer have name 'layer1', at the given location.

    This version of the constructor will assign a default name to the sprite for resource management purposes.

    Parameters:
    layer : Bitmap
    ani : AnimationScript
    pt : Point2D
    Returns:
    Sprite :
    Signatures by Language:
    C/C++: sprite create_sprite_with_animation_pt(bitmap layer, animation_script ani, point2d pt);
    C++: sprite create_sprite(bitmap layer, animation_script ani, point2d pt);
    Pascal: function CreateSprite(layer: Bitmap; ani: AnimationScript; pt: Point2D): Sprite;
  • Create Sprite (name, layer, layerName) : Sprite [show]

    Creates a sprite for the passed in bitmap image. The sprite will use the cell information within the sprite if it is animated at a later stage. This version of CreateSprite will initialise the sprite to use pixel level collisions, no animation, and the specified layer have name.

    Parameters:
    name : String
    layer : Bitmap
    layerName : String
    Returns:
    Sprite :
    Signatures by Language:
    C/C++: sprite create_sprite_with_layer_named(const char *name, bitmap layer, const char *layerName);
    C++: sprite create_sprite(const char *name, bitmap layer, const char *layerName);
    Pascal: function CreateSprite(name: String; layer: Bitmap; layerName: String): Sprite;
  • Create Sprite (const layers, const layerNames, ani) : Sprite [show]

    Creates a sprite for the passed in bitmap images. The sprite will use the cell information within the sprite if it is animated at a later stage. This version of CreateSprite will initialise the sprite to use pixel level collisions, no animation, the layer names 'layer1', 'layer2',... .

    This version of the constructor will assign a default name to the sprite for resource management purposes.

    Parameters:
    layers : BitmapArray
    layerNames : StringArray
    ani : AnimationScript
    Returns:
    Sprite :
    Signatures by Language:
    C/C++: sprite create_layered_sprite_with_layer_names_and_animation_script(const bitmap *layers, const string_array layerNames, animation_script ani, int32_t layers_len, int32_t layerNames_len);
    C++: sprite create_sprite(const bitmap *layers, const string_array layerNames, animation_script ani, int32_t layers_len, int32_t layerNames_len);
    Pascal: function CreateSprite(const layers: BitmapArray; const layerNames: StringArray; ani: AnimationScript): Sprite;
    • source code
    • lib name: CreateLayeredSpriteWithLayerNamesAndAnimationScript
  • Create Sprite (layer, layerName, ani) : Sprite [show]

    Creates a sprite for the passed in bitmap image. The sprite will use the cell information within the sprite if it is animated at a later stage. This version of CreateSprite will initialise the sprite to use pixel level collisions, the specified animation template, and layer name.

    This version of the constructor will assign a default name to the sprite for resource management purposes.

    Parameters:
    layer : Bitmap
    layerName : String
    ani : AnimationScript
    Returns:
    Sprite :
    Signatures by Language:
    C/C++: sprite create_sprite_with_layer_and_animation(bitmap layer, const char *layerName, animation_script ani);
    C++: sprite create_sprite(bitmap layer, const char *layerName, animation_script ani);
    Pascal: function CreateSprite(layer: Bitmap; layerName: String; ani: AnimationScript): Sprite;
    • source code
    • lib name: CreateSpriteWithLayerAndAnimation
  • Create Sprite (name, const layers, const layerNames) : Sprite [show]

    Creates a sprite for the passed in bitmap images. The sprite will use the cell information within the sprite if it is animated at a later stage. This version of CreateSprite will initialise the sprite to use pixel level collisions, no animation, and the specified layer names.

    Parameters:
    name : String
    layers : BitmapArray
    layerNames : StringArray
    Returns:
    Sprite :
    Signatures by Language:
    C/C++: sprite create_layered_sprite_with_layer_names_named(const char *name, const bitmap *layers, const string_array layerNames, int32_t layers_len, int32_t layerNames_len);
    C++: sprite create_sprite(const char *name, const bitmap *layers, const string_array layerNames, int32_t layers_len, int32_t layerNames_len);
    Pascal: function CreateSprite(name: String; const layers: BitmapArray; const layerNames: StringArray): Sprite;
    • source code
    • lib name: CreateLayeredSpriteWithLayerNamesNamed
  • Create Sprite (name, const layers, ani) : Sprite [show]

    Creates a sprite for the passed in bitmap images. The sprite will use the cell information within the sprite if it is animated at a later stage. This version of CreateSprite will initialise the sprite to use pixel level collisions, the specified animation template, the layer names 'layer1', 'layer2',... .

    Parameters:
    name : String
    layers : BitmapArray
    ani : AnimationScript
    Returns:
    Sprite :
    Signatures by Language:
    C/C++: sprite create_layered_sprite_with_animation_script_named(const char *name, const bitmap *layers, animation_script ani, int32_t layers_len);
    C++: sprite create_sprite(const char *name, const bitmap *layers, animation_script ani, int32_t layers_len);
    Pascal: function CreateSprite(name: String; const layers: BitmapArray; ani: AnimationScript): Sprite;
    • source code
    • lib name: CreateLayeredSpriteWithAnimationScriptNamed
  • Create Sprite (layer, x, y) : Sprite [show]

    Creates a sprite for the passed in bitmap image. The sprite will use the cell information within the sprite if it is animated at a later stage. This version of CreateSprite will initialise the sprite to use pixel level collisions, no animation, the layer have name 'layer1', and position the sprite at the given x,y location.

    This version of the constructor will assign a default name to the sprite for resource management purposes.

    Parameters:
    layer : Bitmap
    x : Single
    y : Single
    Returns:
    Sprite :
    Signatures by Language:
    C/C++: sprite create_basic_sprite_xy(bitmap layer, float x, float y);
    C++: sprite create_sprite(bitmap layer, float x, float y);
    Pascal: function CreateSprite(layer: Bitmap; x: Single; y: Single): Sprite;
  • Create Sprite (name, layer, layerName, ani) : Sprite [show]

    Creates a sprite for the passed in bitmap image. The sprite will use the cell information within the sprite if it is animated at a later stage. This version of CreateSprite will initialise the sprite to use pixel level collisions, the specified animation template, and layer name.

    Parameters:
    name : String
    layer : Bitmap
    layerName : String
    ani : AnimationScript
    Returns:
    Sprite :
    Signatures by Language:
    C/C++: sprite create_sprite_with_layer_and_animation_named(const char *name, bitmap layer, const char *layerName, animation_script ani);
    C++: sprite create_sprite(const char *name, bitmap layer, const char *layerName, animation_script ani);
    Pascal: function CreateSprite(name: String; layer: Bitmap; layerName: String; ani: AnimationScript): Sprite;
    • source code
    • lib name: CreateSpriteWithLayerAndAnimationNamed
  • Create Sprite (layer, ani, x, y) : Sprite [show]

    Creates a sprite for the passed in bitmap image. The sprite will use the cell information within the sprite if it is animated at a later stage. This version of CreateSprite will initialise the sprite to use pixel level collisions, the specified animation template, the layer have name 'layer1', at the given x, y location.

    This version of the constructor will assign a default name to the sprite for resource management purposes.

    Parameters:
    layer : Bitmap
    ani : AnimationScript
    x : Single
    y : Single
    Returns:
    Sprite :
    Signatures by Language:
    C/C++: sprite create_sprite_with_animation_xy(bitmap layer, animation_script ani, float x, float y);
    C++: sprite create_sprite(bitmap layer, animation_script ani, float x, float y);
    Pascal: function CreateSprite(layer: Bitmap; ani: AnimationScript; x: Single; y: Single): Sprite;
  • Create Sprite (name, const layers, const layerNames, ani) : Sprite [show]

    Creates a sprite for the passed in bitmap images. The sprite will use the cell information within the sprite if it is animated at a later stage. This version of CreateSprite will initialise the sprite to use pixel level collisions, no animation, the layer names 'layer1', 'layer2',... .

    Parameters:
    name : String
    layers : BitmapArray
    layerNames : StringArray
    ani : AnimationScript
    Returns:
    Sprite :
    Signatures by Language:
    C/C++: sprite create_layered_sprite_with_layer_names_and_animation_script_named(const char *name, const bitmap *layers, const string_array layerNames, animation_script ani, int32_t layers_len, int32_t layerNames_len);
    C++: sprite create_sprite(const char *name, const bitmap *layers, const string_array layerNames, animation_script ani, int32_t layers_len, int32_t layerNames_len);
    Pascal: function CreateSprite(name: String; const layers: BitmapArray; const layerNames: StringArray; ani: AnimationScript): Sprite;
    • source code
    • lib name: CreateLayeredSpriteWithLayerNamesAndAnimationScriptNamed

Create Sprite Pack

Create a new SpritePack with a given name. This pack can then be selected and used to control which sprites are drawn/updated in the calls to DrawAllSprites and UpdateAllSprites.

  • Create Sprite Pack (name) [show]

    Create a new SpritePack with a given name. This pack can then be selected and used to control which sprites are drawn/updated in the calls to DrawAllSprites and UpdateAllSprites.

    Parameters:
    name : String
    Signatures by Language:
    C/C++: void create_sprite_pack(const char *name);
    Pascal: procedure CreateSpritePack(name: String);

Current Sprite Pack

Returns the name of the currently selected SpritePack.

  • Current Sprite Pack () : String [show]

    Returns the name of the currently selected SpritePack.

    Returns:
    String :
    Signatures by Language:
    C/C++: void current_sprite_pack(char *result);
    Pascal: function CurrentSpritePack(): String;

Draw All Sprites

Draws all of the sprites in the current Sprite pack. Packs can be switched to select between different sets of sprites.

  • Draw All Sprites () [show]

    Draws all of the sprites in the current Sprite pack. Packs can be switched to select between different sets of sprites.


Draw Sprite

Draws the sprite at its location in the world. This is effected by the position of the camera and the sprites current location.

This is the standard routine for drawing sprites to the screen and should be used in most cases.

  • Draw Sprite (s) [show]

    Draws the sprite at its location in the world. This is effected by the position of the camera and the sprites current location.

    This is the standard routine for drawing sprites to the screen and should be used in most cases.

    Parameters:
    s : Sprite
    Signatures by Language:
    C/C++: void draw_sprite(sprite s);
    Pascal: procedure DrawSprite(s: Sprite);
  • Draw Sprite (s, const position) [show]

    Draws the sprite at its position in the game offset by a given amount. Only use this method when you want to draw the sprite displaced from its location in your game. Otherwise you should change the sprite's location and then use the standard ''DrawSprite'' routine.

    Parameters:
    s : Sprite
    position : Point2D
    Signatures by Language:
    C/C++: void draw_sprite_offset_point(sprite s, const point2d *position);
    C/C++: void draw_sprite_offset_point_byval(sprite s, const point2d position);
    C++: void draw_sprite(sprite s, const point2d &position);
    Pascal: procedure DrawSprite(s: Sprite; const position: Point2D);
  • Draw Sprite (s, xOffset, yOffset) [show]

    Draws the sprite at its position in the game offset by a given amount. Only use this method when you want to draw the sprite displaced from its location in your game. Otherwise you should change the sprite's location and then use the standard ''DrawSprite'' routine.

    Parameters:
    s : Sprite
    xOffset : Longint
    yOffset : Longint
    Signatures by Language:
    C/C++: void draw_sprite_offset_xy(sprite s, int32_t xOffset, int32_t yOffset);
    C++: void draw_sprite(sprite s, int32_t xOffset, int32_t yOffset);
    Pascal: procedure DrawSprite(s: Sprite; xOffset: Longint; yOffset: Longint);

Free Sprite

Free the resources associated with a sprite.

  • Free Sprite (var s) [show]

    Free the resources associated with a sprite.

    Parameters:
    s : Sprite
    Signatures by Language:
    C/C++: void free_sprite(sprite *s);
    C++: void free_sprite(sprite &s);
    Pascal: procedure FreeSprite(var s: Sprite);

Has Sprite

Determines if SwinGame has a sprite for the supplied name. This checks against all sprites, those loaded without a name are assigned a default.

  • Has Sprite (name) : Boolean [show]

    Determines if SwinGame has a sprite for the supplied name. This checks against all sprites, those loaded without a name are assigned a default.

    Parameters:
    name : String
    Returns:
    Boolean :
    Signatures by Language:
    C/C++: bool has_sprite(const char *name);
    Pascal: function HasSprite(name: String): Boolean;

Has Sprite Pack

Indicates if a given SpritePack has already been created.

  • Has Sprite Pack (name) : Boolean [show]

    Indicates if a given SpritePack has already been created.

    Parameters:
    name : String
    Returns:
    Boolean :
    Signatures by Language:
    C/C++: bool has_sprite_pack(const char *name);
    Pascal: function HasSpritePack(name: String): Boolean;

Move Sprite

Moves the sprite as indicated by its velocity. You can call this directly ot alternatively, this action is performed when the sprite is updated using the ''UpdateSprite'' routine.

  • Move Sprite (s) [show]

    Moves the sprite as indicated by its velocity. You can call this directly ot alternatively, this action is performed when the sprite is updated using the ''UpdateSprite'' routine.

    Parameters:
    s : Sprite
    Signatures by Language:
    C/C++: void move_sprite(sprite s);
    Pascal: procedure MoveSprite(s: Sprite);
  • Move Sprite (s, const distance) [show]

    Moves the sprite a given distance based on the value passed in rather than based on the sprite's velocity. Typically this method is used to apply other movement actions to the sprite and the velocity of the sprite is used the intended movement of the sprite.

    Parameters:
    s : Sprite
    distance : Vector
    Signatures by Language:
    C/C++: void move_sprite_vec(sprite s, const vector *distance);
    C/C++: void move_sprite_vec_byval(sprite s, const vector distance);
    C++: void move_sprite(sprite s, const vector &distance);
    Pascal: procedure MoveSprite(s: Sprite; const distance: Vector);
  • Move Sprite (s, pct) [show]

    Moves the sprite as indicated by a percentage of its velocity. You can call this directly ot alternatively, this action is performed when the sprite is updated using the ''UpdateSprite'' routines that require a percentage.

    Parameters:
    s : Sprite
    pct : Single
    Signatures by Language:
    C/C++: void move_sprite_pct(sprite s, float pct);
    C++: void move_sprite(sprite s, float pct);
    Pascal: procedure MoveSprite(s: Sprite; pct: Single);
  • Move Sprite (s, const distance, pct) [show]

    Moves the sprite a percentage of a given distance based on the value passed in rather than based on the sprite's velocity. Typically this method is used to apply other movement actions to the sprite and the velocity of the sprite is used the intended movement of the sprite.

    Parameters:
    s : Sprite
    distance : Vector
    pct : Single
    Signatures by Language:
    C/C++: void move_sprite_vec_pct(sprite s, const vector *distance, float pct);
    C/C++: void move_sprite_vec_pct_byval(sprite s, const vector distance, float pct);
    C++: void move_sprite(sprite s, const vector &distance, float pct);
    Pascal: procedure MoveSprite(s: Sprite; const distance: Vector; pct: Single);

Move Sprite To

This method moves a sprite to a given position in the game.

  • Move Sprite To (s, x, y) [show]

    This method moves a sprite to a given position in the game.

    Parameters:
    s : Sprite
    x : Longint
    y : Longint
    Signatures by Language:
    C/C++: void move_sprite_to(sprite s, int32_t x, int32_t y);
    Pascal: procedure MoveSpriteTo(s: Sprite; x: Longint; y: Longint);

Release All Sprites

Releases all of the sprites that have been loaded.

  • Release All Sprites () [show]

    Releases all of the sprites that have been loaded.


Release Sprite

Releases the SwinGame resources associated with the sprite of the specified name.

  • Release Sprite (name) [show]

    Releases the SwinGame resources associated with the sprite of the specified name.

    Parameters:
    name : String
    Signatures by Language:
    C/C++: void release_sprite(const char *name);
    Pascal: procedure ReleaseSprite(name: String);

Select Sprite Pack

Selects the named SpritePack (if it has been created). The selected SpritePack determines which sprites are drawn and updated with the DrawAllSprites and UpdateAllSprites code.

  • Select Sprite Pack (name) [show]

    Selects the named SpritePack (if it has been created). The selected SpritePack determines which sprites are drawn and updated with the DrawAllSprites and UpdateAllSprites code.

    Parameters:
    name : String
    Signatures by Language:
    C/C++: void select_sprite_pack(const char *name);
    Pascal: procedure SelectSpritePack(name: String);

Sprite Add Layer

Adds a new layer to the sprite.

  • Sprite Add Layer (s, newLayer, layerName) : Longint [show]

    Adds a new layer to the sprite.

    Parameters:
    s : Sprite
    newLayer : Bitmap
    layerName : String
    Returns:
    Longint :
    Signatures by Language:
    C/C++: int32_t sprite_add_layer(sprite s, bitmap newLayer, const char *layerName);
    Pascal: function SpriteAddLayer(s: Sprite; newLayer: Bitmap; layerName: String): Longint;

Sprite Add To Velocity

Alters the current velocity of the Sprite, adding the passed in vector to the current velocity.

When the Sprite is updated (see UpdateSprite) this vector is used to move the Sprite.

  • Sprite Add To Velocity (s, const value) [show]

    Alters the current velocity of the Sprite, adding the passed in vector to the current velocity.

    When the Sprite is updated (see UpdateSprite) this vector is used to move the Sprite.

    Parameters:
    s : Sprite
    value : Vector
    Signatures by Language:
    C/C++: void sprite_add_to_velocity(sprite s, const vector *value);
    C/C++: void sprite_add_to_velocity_byval(sprite s, const vector value);
    C++: void sprite_add_to_velocity(sprite s, const vector &value);
    Pascal: procedure SpriteAddToVelocity(s: Sprite; const value: Vector);

Sprite Add Value

Adds a new kind of value to the Sprite

  • Sprite Add Value (s, name) [show]

    Adds a new kind of value to the Sprite

    Parameters:
    s : Sprite
    name : String
    Signatures by Language:
    C/C++: void sprite_add_value(sprite s, const char *name);
    Pascal: procedure SpriteAddValue(s: Sprite; name: String);
  • Sprite Add Value (s, name, initVal) [show]

    Adds a new kind of value to the Sprite, setting the initial value to the value passed in.

    Parameters:
    s : Sprite
    name : String
    initVal : Single
    Signatures by Language:
    C/C++: void sprite_add_value_with_initial_value(sprite s, const char *name, float initVal);
    C++: void sprite_add_value(sprite s, const char *name, float initVal);
    Pascal: procedure SpriteAddValue(s: Sprite; name: String; initVal: Single);

Sprite Animation Has Ended

Indicates if the sprites animation has ended.

  • Sprite Animation Has Ended (s) : Boolean [show]

    Indicates if the sprites animation has ended.

    Parameters:
    s : Sprite
    Returns:
    Boolean :
    Signatures by Language:
    C/C++: bool sprite_animation_has_ended(sprite s);
    Pascal: function SpriteAnimationHasEnded(s: Sprite): Boolean;

Sprite Animation Name

Returns the name of the Sprite's current animation.

  • Sprite Animation Name (s) : String [show]

    Returns the name of the Sprite's current animation.

    Parameters:
    s : Sprite
    Returns:
    String :
    Signatures by Language:
    C/C++: void sprite_animation_name(sprite s, char *result);
    Pascal: function SpriteAnimationName(s: Sprite): String;

Sprite Bring Layer Forward

Sends the layer specified forward in the visible layer order.

  • Sprite Bring Layer Forward (s, visibleLayer) [show]

    Sends the layer specified forward in the visible layer order.

    Parameters:
    s : Sprite
    visibleLayer : Longint
    Signatures by Language:
    C/C++: void sprite_bring_layer_forward(sprite s, int32_t visibleLayer);
    Pascal: procedure SpriteBringLayerForward(s: Sprite; visibleLayer: Longint);

Sprite Bring Layer To Front

Sends the layer specified to the front in the visible layer order.

  • Sprite Bring Layer To Front (s, visibleLayer) [show]

    Sends the layer specified to the front in the visible layer order.

    Parameters:
    s : Sprite
    visibleLayer : Longint
    Signatures by Language:
    C/C++: void sprite_bring_layer_to_front(sprite s, int32_t visibleLayer);
    Pascal: procedure SpriteBringLayerToFront(s: Sprite; visibleLayer: Longint);

Sprite Call On Event

Register a procedure to call when events occur on the sprite.

  • Sprite Call On Event (s, handler) [show]

    Register a procedure to call when events occur on the sprite.

    Parameters:
    s : Sprite
    handler : SpriteEventHandler
    Signatures by Language:
    C/C++: void sprite_call_on_event(sprite s, sprite_event_handler handler);
    Pascal: procedure SpriteCallOnEvent(s: Sprite; handler: SpriteEventHandler);

Sprite Circle

Gets a circle in the bounds of the base layer of the indicated sprite.

  • Sprite Circle (s) : Circle [show]

    Gets a circle in the bounds of the base layer of the indicated sprite.

    Parameters:
    s : Sprite
    Returns:
    Circle :
    Signatures by Language:
    C/C++: circle sprite_circle(sprite s);
    Pascal: function SpriteCircle(s: Sprite): Circle;

Sprite Collision Bitmap

Returns the bitmap used by the Sprite to determine if it has collided with other objects in the game.

  • Sprite Collision Bitmap (s) : Bitmap [show]

    Returns the bitmap used by the Sprite to determine if it has collided with other objects in the game.

    Parameters:
    s : Sprite
    Returns:
    Bitmap :
    Signatures by Language:
    C/C++: bitmap sprite_collision_bitmap(sprite s);
    Pascal: function SpriteCollisionBitmap(s: Sprite): Bitmap;

Sprite Collision Circle

Gets a circle in the bounds of the indicated sprite's collision rectangle.

  • Sprite Collision Circle (s) : Circle [show]

    Gets a circle in the bounds of the indicated sprite's collision rectangle.

    Parameters:
    s : Sprite
    Returns:
    Circle :
    Signatures by Language:
    C/C++: circle sprite_collision_circle(sprite s);
    Pascal: function SpriteCollisionCircle(s: Sprite): Circle;

Sprite Collision Kind

Returns the kind of collision used with this Sprite. This is used when determining if the Sprite has collided with other objects in the game.

  • Sprite Collision Kind (s) : CollisionTestKind [show]

    Returns the kind of collision used with this Sprite. This is used when determining if the Sprite has collided with other objects in the game.

    Parameters:
    s : Sprite
    Returns:
    CollisionTestKind :
    Signatures by Language:
    C/C++: collision_test_kind sprite_collision_kind(sprite s);
    Pascal: function SpriteCollisionKind(s: Sprite): CollisionTestKind;

Sprite Collision Rectangle

Returns the collision rectangle for the specified sprite.

  • Sprite Collision Rectangle (s) : Rectangle [show]

    Returns the collision rectangle for the specified sprite.

    Parameters:
    s : Sprite
    Returns:
    Rectangle :
    Signatures by Language:
    C/C++: rectangle sprite_collision_rectangle(sprite s);
    Pascal: function SpriteCollisionRectangle(s: Sprite): Rectangle;

Sprite Current Cell

Returns the current animation cell for an Animated Sprite. The cell is updated when the sprite's animation data is updated.

  • Sprite Current Cell (s) : Longint [show]

    Returns the current animation cell for an Animated Sprite. The cell is updated when the sprite's animation data is updated.

    Parameters:
    s : Sprite
    Returns:
    Longint :
    Signatures by Language:
    C/C++: int32_t sprite_current_cell(sprite s);
    Pascal: function SpriteCurrentCell(s: Sprite): Longint;

Sprite Current Cell Rectangle

Returns a rectangle of the current cell within the Sprite's image. This is used to determine what part of the bitmap should be used when the Sprite is drawn.

  • Sprite Current Cell Rectangle (s) : Rectangle [show]

    Returns a rectangle of the current cell within the Sprite's image. This is used to determine what part of the bitmap should be used when the Sprite is drawn.

    Parameters:
    s : Sprite
    Returns:
    Rectangle :
    Signatures by Language:
    C/C++: rectangle sprite_current_cell_rectangle(sprite s);
    Pascal: function SpriteCurrentCellRectangle(s: Sprite): Rectangle;

Sprite DX

Returns the X value of the Sprite's velocity.

  • Sprite DX (s) : Single [show]

    Returns the X value of the Sprite's velocity.

    Parameters:
    s : Sprite
    Returns:
    Single :
    Signatures by Language:
    C/C++: float sprite_dx(sprite s);
    Pascal: function SpriteDX(s: Sprite): Single;

Sprite DY

Returns the Y value of the Sprite's velocity.

  • Sprite DY (s) : Single [show]

    Returns the Y value of the Sprite's velocity.

    Parameters:
    s : Sprite
    Returns:
    Single :
    Signatures by Language:
    C/C++: float sprite_dy(sprite s);
    Pascal: function SpriteDY(s: Sprite): Single;

Sprite Heading

Returns the direction the Sprite is heading in degrees.

  • Sprite Heading (s) : Single [show]

    Returns the direction the Sprite is heading in degrees.

    Parameters:
    s : Sprite
    Returns:
    Single :
    Signatures by Language:
    C/C++: float sprite_heading(sprite s);
    Pascal: function SpriteHeading(s: Sprite): Single;

Sprite Height

The current Height of the sprite (aligned to the Y axis).

  • Sprite Height (s) : Longint [show]

    The current Height of the sprite (aligned to the Y axis).

    Parameters:
    s : Sprite
    Returns:
    Longint :
    Signatures by Language:
    C/C++: int32_t sprite_height(sprite s);
    Pascal: function SpriteHeight(s: Sprite): Longint;

Sprite Hide Layer

Hide the specified layer of the sprite.

  • Sprite Hide Layer (s, name) [show]

    Hide the specified layer of the sprite.

    Parameters:
    s : Sprite
    name : String
    Signatures by Language:
    C/C++: void sprite_hide_layer_named(sprite s, const char *name);
    C++: void sprite_hide_layer(sprite s, const char *name);
    Pascal: procedure SpriteHideLayer(s: Sprite; name: String);
  • Sprite Hide Layer (s, id) [show]

    Hide the specified layer of the sprite.

    Parameters:
    s : Sprite
    id : Longint
    Signatures by Language:
    C/C++: void sprite_hide_layer(sprite s, int32_t id);
    Pascal: procedure SpriteHideLayer(s: Sprite; id: Longint);

Sprite Layer

Returns the bitmap of the indicated layer of the sprite.

  • Sprite Layer (s, idx) : Bitmap [show]

    Returns the bitmap of the indicated layer of the sprite.

    Parameters:
    s : Sprite
    idx : Longint
    Returns:
    Bitmap :
    Signatures by Language:
    C/C++: bitmap sprite_layer_at_idx(sprite s, int32_t idx);
    C++: bitmap sprite_layer(sprite s, int32_t idx);
    Pascal: function SpriteLayer(s: Sprite; idx: Longint): Bitmap;
  • Sprite Layer (s, name) : Bitmap [show]

    Returns the bitmap of the indicated layer of the sprite.

    Parameters:
    s : Sprite
    name : String
    Returns:
    Bitmap :
    Signatures by Language:
    C/C++: bitmap sprite_layer_named(sprite s, const char *name);
    C++: bitmap sprite_layer(sprite s, const char *name);
    Pascal: function SpriteLayer(s: Sprite; name: String): Bitmap;

Sprite Layer Circle

Gets a circle in the bounds of the indicated layer.

  • Sprite Layer Circle (s, idx) : Circle [show]

    Gets a circle in the bounds of the indicated layer.

    Parameters:
    s : Sprite
    idx : Longint
    Returns:
    Circle :
    Signatures by Language:
    C/C++: circle sprite_layer_circle(sprite s, int32_t idx);
    Pascal: function SpriteLayerCircle(s: Sprite; idx: Longint): Circle;
  • Sprite Layer Circle (s, name) : Circle [show]

    Gets a circle in the bounds of the indicated layer.

    Parameters:
    s : Sprite
    name : String
    Returns:
    Circle :
    Signatures by Language:
    C/C++: circle sprite_layer_named_circle(sprite s, const char *name);
    C++: circle sprite_layer_circle(sprite s, const char *name);
    Pascal: function SpriteLayerCircle(s: Sprite; name: String): Circle;

Sprite Layer Count

Returns the number of layers within the Sprite.

  • Sprite Layer Count (s) : Longint [show]

    Returns the number of layers within the Sprite.

    Parameters:
    s : Sprite
    Returns:
    Longint :
    Signatures by Language:
    C/C++: int32_t sprite_layer_count(sprite s);
    Pascal: function SpriteLayerCount(s: Sprite): Longint;

Sprite Layer Height

The height of a given layer of the Sprite (aligned to the Y axis).

  • Sprite Layer Height (s, name) : Longint [show]

    The height of a given layer of the Sprite (aligned to the Y axis).

    Parameters:
    s : Sprite
    name : String
    Returns:
    Longint :
    Signatures by Language:
    C/C++: int32_t sprite_layer_named_height(sprite s, const char *name);
    C++: int32_t sprite_layer_height(sprite s, const char *name);
    Pascal: function SpriteLayerHeight(s: Sprite; name: String): Longint;
  • Sprite Layer Height (s, idx) : Longint [show]

    The height of a given layer of the Sprite (aligned to the Y axis).

    Parameters:
    s : Sprite
    idx : Longint
    Returns:
    Longint :
    Signatures by Language:
    C/C++: int32_t sprite_layer_height(sprite s, int32_t idx);
    Pascal: function SpriteLayerHeight(s: Sprite; idx: Longint): Longint;

Sprite Layer Index

Returns the index of the specified layer.

  • Sprite Layer Index (s, name) : Longint [show]

    Returns the index of the specified layer.

    Parameters:
    s : Sprite
    name : String
    Returns:
    Longint :
    Signatures by Language:
    C/C++: int32_t sprite_layer_index(sprite s, const char *name);
    Pascal: function SpriteLayerIndex(s: Sprite; name: String): Longint;

Sprite Layer Name

Returns the name of the specified layer.

  • Sprite Layer Name (s, idx) : String [show]

    Returns the name of the specified layer.

    Parameters:
    s : Sprite
    idx : Longint
    Returns:
    String :
    Signatures by Language:
    C/C++: void sprite_layer_name(sprite s, int32_t idx, char *result);
    Pascal: function SpriteLayerName(s: Sprite; idx: Longint): String;

Sprite Layer Offset

Gets the offset of the specified layer.

  • Sprite Layer Offset (s, name) : Point2D [show]

    Gets the offset of the specified layer.

    Parameters:
    s : Sprite
    name : String
    Returns:
    Point2D :
    Signatures by Language:
    C/C++: point2d sprite_layer_offset_named(sprite s, const char *name);
    C++: point2d sprite_layer_offset(sprite s, const char *name);
    Pascal: function SpriteLayerOffset(s: Sprite; name: String): Point2D;
  • Sprite Layer Offset (s, idx) : Point2D [show]

    Gets the offset of the specified layer.

    Parameters:
    s : Sprite
    idx : Longint
    Returns:
    Point2D :
    Signatures by Language:
    C/C++: point2d sprite_layer_offset(sprite s, int32_t idx);
    Pascal: function SpriteLayerOffset(s: Sprite; idx: Longint): Point2D;

Sprite Layer Offsets

Returns the offets of the layers in the Sprite.

  • Sprite Layer Offsets (s) : Point2DArray [show]

    Returns the offets of the layers in the Sprite.

    Parameters:
    s : Sprite
    Returns:
    Point2DArray :
    Signatures by Language:
    C/C++: void sprite_layer_offsets(sprite s, point2d *result, int32_t result_len);
    Pascal: function SpriteLayerOffsets(s: Sprite): Point2DArray;

Sprite Layer Rectangle

Gets a rectangle that surrounds the indicated layer.

  • Sprite Layer Rectangle (s, name) : Rectangle [show]

    Gets a rectangle that surrounds the indicated layer.

    Parameters:
    s : Sprite
    name : String
    Returns:
    Rectangle :
    Signatures by Language:
    C/C++: rectangle sprite_layer_named_rectangle(sprite s, const char *name);
    C++: rectangle sprite_layer_rectangle(sprite s, const char *name);
    Pascal: function SpriteLayerRectangle(s: Sprite; name: String): Rectangle;
  • Sprite Layer Rectangle (s, idx) : Rectangle [show]

    Gets a rectangle that surrounds the indicated layer.

    Parameters:
    s : Sprite
    idx : Longint
    Returns:
    Rectangle :
    Signatures by Language:
    C/C++: rectangle sprite_layer_rectangle(sprite s, int32_t idx);
    Pascal: function SpriteLayerRectangle(s: Sprite; idx: Longint): Rectangle;

Sprite Layer Width

The width of a given layer of the Sprite (aligned to the X axis).

  • Sprite Layer Width (s, name) : Longint [show]

    The width of a given layer of the Sprite (aligned to the X axis).

    Parameters:
    s : Sprite
    name : String
    Returns:
    Longint :
    Signatures by Language:
    C/C++: int32_t sprite_layer_named_width(sprite s, const char *name);
    C++: int32_t sprite_layer_width(sprite s, const char *name);
    Pascal: function SpriteLayerWidth(s: Sprite; name: String): Longint;
  • Sprite Layer Width (s, idx) : Longint [show]

    The width of a given layer of the Sprite (aligned to the X axis).

    Parameters:
    s : Sprite
    idx : Longint
    Returns:
    Longint :
    Signatures by Language:
    C/C++: int32_t sprite_layer_width(sprite s, int32_t idx);
    Pascal: function SpriteLayerWidth(s: Sprite; idx: Longint): Longint;

Sprite Layers

Returns the bitmaps of the layers in the Sprite.

  • Sprite Layers (s) : BitmapArray [show]

    Returns the bitmaps of the layers in the Sprite.

    Parameters:
    s : Sprite
    Returns:
    BitmapArray :
    Signatures by Language:
    C/C++: void sprite_layers(sprite s, bitmap *result, int32_t result_len);
    Pascal: function SpriteLayers(s: Sprite): BitmapArray;

Sprite Mass

This indicates the mass of the Sprite for any of the collide methods from Physics. The mass of two colliding sprites will determine the relative velocitys after the collision.

  • Sprite Mass (s) : Single [show]

    This indicates the mass of the Sprite for any of the collide methods from Physics. The mass of two colliding sprites will determine the relative velocitys after the collision.

    Parameters:
    s : Sprite
    Returns:
    Single :
    Signatures by Language:
    C/C++: float sprite_mass(sprite s);
    Pascal: function SpriteMass(s: Sprite): Single;

Sprite Move To

This procedure starts the sprite moving to the indicated destination point, over a specified number of seconds. When the sprite arrives it will raise the SpriteArrived event.

  • Sprite Move To (s, const pt, takingSeconds) [show]

    This procedure starts the sprite moving to the indicated destination point, over a specified number of seconds. When the sprite arrives it will raise the SpriteArrived event.

    Parameters:
    s : Sprite
    pt : Point2D
    takingSeconds : Longint
    Signatures by Language:
    C/C++: void sprite_move_to(sprite s, const point2d *pt, int32_t takingSeconds);
    C/C++: void sprite_move_to_byval(sprite s, const point2d pt, int32_t takingSeconds);
    C++: void sprite_move_to(sprite s, const point2d &pt, int32_t takingSeconds);
    Pascal: procedure SpriteMoveTo(s: Sprite; const pt: Point2D; takingSeconds: Longint);

Sprite Name

Returns the name of the sprite. This name is used for resource management and can be used to interact with the sprite in various routines.

  • Sprite Name (sprt) : String [show]

    Returns the name of the sprite. This name is used for resource management and can be used to interact with the sprite in various routines.

    Parameters:
    sprt : Sprite
    Returns:
    String :
    Signatures by Language:
    C/C++: void sprite_name(sprite sprt, char *result);
    Pascal: function SpriteName(sprt: Sprite): String;

Sprite Named

Returns the Sprite with the specified name, see CreateBasicSprite.

  • Sprite Named (name) : Sprite [show]

    Returns the Sprite with the specified name, see CreateBasicSprite.

    Parameters:
    name : String
    Returns:
    Sprite :
    Signatures by Language:
    C/C++: sprite sprite_named(const char *name);
    Pascal: function SpriteNamed(name: String): Sprite;

Sprite Offscreen

Returns True if the sprite is entirely off the screen.

  • Sprite Offscreen (s) : Boolean [show]

    Returns True if the sprite is entirely off the screen.

    Parameters:
    s : Sprite
    Returns:
    Boolean :
    Signatures by Language:
    C/C++: bool sprite_offscreen(sprite s);
    Pascal: function SpriteOffscreen(s: Sprite): Boolean;

Sprite On Screen At

Returns True if a pixel of the Sprite s is at the screen location specified (pt), which is converted to a world location.

  • Sprite On Screen At (s, const pt) : Boolean [show]

    Returns True if a pixel of the Sprite s is at the screen location specified (pt), which is converted to a world location.

    Parameters:
    s : Sprite
    pt : Point2D
    Returns:
    Boolean :
    Signatures by Language:
    C/C++: bool sprite_on_screen_at_point(sprite s, const point2d *pt);
    C/C++: bool sprite_on_screen_at_point_byval(sprite s, const point2d pt);
    C++: bool sprite_on_screen_at(sprite s, const point2d &pt);
    Pascal: function SpriteOnScreenAt(s: Sprite; const pt: Point2D): Boolean;
  • Sprite On Screen At (s, x, y) : Boolean [show]

    Returns True if a pixel of the Sprite s is at the screen location specified (x and y) which is converted to a world location.

    Parameters:
    s : Sprite
    x : Longint
    y : Longint
    Returns:
    Boolean :
    Signatures by Language:
    C/C++: bool sprite_on_screen_at(sprite s, int32_t x, int32_t y);
    Pascal: function SpriteOnScreenAt(s: Sprite; x: Longint; y: Longint): Boolean;

Sprite Position

Returns the Sprite's position.

  • Sprite Position (s) : Point2D [show]

    Returns the Sprite's position.

    Parameters:
    s : Sprite
    Returns:
    Point2D :
    Signatures by Language:
    C/C++: point2d sprite_position(sprite s);
    Pascal: function SpritePosition(s: Sprite): Point2D;

Sprite Replay Animation

Restart the sprite's current animation, this will play a sound if the first cell of the animation is associated with a sound effect.

  • Sprite Replay Animation (s) [show]

    Restart the sprite's current animation, this will play a sound if the first cell of the animation is associated with a sound effect.

    Parameters:
    s : Sprite
    Signatures by Language:
    C/C++: void sprite_replay_animation(sprite s);
    Pascal: procedure SpriteReplayAnimation(s: Sprite);
  • Sprite Replay Animation (s, withSound) [show]

    Restart the sprite's current animation, this will play a sound if withSound is true and the first cell of the animation is associated with a sound effect.

    Parameters:
    s : Sprite
    withSound : Boolean
    Signatures by Language:
    C/C++: void replay_animation_with_sound(sprite s, bool withSound);
    C++: void sprite_replay_animation(sprite s, bool withSound);
    Pascal: procedure SpriteReplayAnimation(s: Sprite; withSound: Boolean);

Sprite Rotation

This indicates the angle of rotation of the Sprite. This will rotate any images of the sprite before drawing, which can be very slow. Avoid using this method with bitmap based Sprites where possible.

  • Sprite Rotation (s) : Single [show]

    This indicates the angle of rotation of the Sprite. This will rotate any images of the sprite before drawing, which can be very slow. Avoid using this method with bitmap based Sprites where possible.

    Parameters:
    s : Sprite
    Returns:
    Single :
    Signatures by Language:
    C/C++: float sprite_rotation(sprite s);
    Pascal: function SpriteRotation(s: Sprite): Single;

Sprite Scale

This indicates the scale of the Sprite. This will scale any images of the sprite before drawing, which can be very slow. Avoid using this method with bitmap based Sprites where possible.

  • Sprite Scale (s) : Single [show]

    This indicates the scale of the Sprite. This will scale any images of the sprite before drawing, which can be very slow. Avoid using this method with bitmap based Sprites where possible.

    Parameters:
    s : Sprite
    Returns:
    Single :
    Signatures by Language:
    C/C++: float sprite_scale(sprite s);
    Pascal: function SpriteScale(s: Sprite): Single;

Sprite Screen Rectangle

Returns the rectangle representing the location of the Sprite on the screen.

  • Sprite Screen Rectangle (s) : Rectangle [show]

    Returns the rectangle representing the location of the Sprite on the screen.

    Parameters:
    s : Sprite
    Returns:
    Rectangle :
    Signatures by Language:
    C/C++: rectangle sprite_screen_rectangle(sprite s);
    Pascal: function SpriteScreenRectangle(s: Sprite): Rectangle;

Sprite Send Layer Backward

Sends the layer specified backward in the visible layer order.

  • Sprite Send Layer Backward (s, visibleLayer) [show]

    Sends the layer specified backward in the visible layer order.

    Parameters:
    s : Sprite
    visibleLayer : Longint
    Signatures by Language:
    C/C++: void sprite_send_layer_backward(sprite s, int32_t visibleLayer);
    Pascal: procedure SpriteSendLayerBackward(s: Sprite; visibleLayer: Longint);

Sprite Send Layer To Back

Sends the layer specified to the back in the visible layer order.

  • Sprite Send Layer To Back (s, visibleLayer) [show]

    Sends the layer specified to the back in the visible layer order.

    Parameters:
    s : Sprite
    visibleLayer : Longint
    Signatures by Language:
    C/C++: void sprite_send_layer_to_back(sprite s, int32_t visibleLayer);
    Pascal: procedure SpriteSendLayerToBack(s: Sprite; visibleLayer: Longint);

Sprite Set Collision Bitmap

Sets the bitmap used by the Sprite to determine if it has collided with other objects in the game. By default the CollisionBitmap is set to the bitmap from the Sprite's first layer.

  • Sprite Set Collision Bitmap (s, bmp) [show]

    Sets the bitmap used by the Sprite to determine if it has collided with other objects in the game. By default the CollisionBitmap is set to the bitmap from the Sprite's first layer.

    Parameters:
    s : Sprite
    bmp : Bitmap
    Signatures by Language:
    C/C++: void sprite_set_collision_bitmap(sprite s, bitmap bmp);
    Pascal: procedure SpriteSetCollisionBitmap(s: Sprite; bmp: Bitmap);

Sprite Set Collision Kind

Sets the kind of collision used with this Sprite. This is used when determining if the Sprite has collided with other objects in the game.

  • Sprite Set Collision Kind (s, value) [show]

    Sets the kind of collision used with this Sprite. This is used when determining if the Sprite has collided with other objects in the game.

    Parameters:
    s : Sprite
    value : CollisionTestKind
    Signatures by Language:
    C/C++: void sprite_set_collision_kind(sprite s, collision_test_kind value);
    Pascal: procedure SpriteSetCollisionKind(s: Sprite; value: CollisionTestKind);

Sprite Set DX

Sets the X value of the Sprite's velocity.

  • Sprite Set DX (s, value) [show]

    Sets the X value of the Sprite's velocity.

    Parameters:
    s : Sprite
    value : Single
    Signatures by Language:
    C/C++: void sprite_set_dx(sprite s, float value);
    Pascal: procedure SpriteSetDX(s: Sprite; value: Single);

Sprite Set DY

Sets the Y value of the Sprite's velocity.

  • Sprite Set DY (s, value) [show]

    Sets the Y value of the Sprite's velocity.

    Parameters:
    s : Sprite
    value : Single
    Signatures by Language:
    C/C++: void sprite_set_dy(sprite s, float value);
    Pascal: procedure SpriteSetDY(s: Sprite; value: Single);

Sprite Set Heading

Alters the direction the Sprite is heading without changing the speed.

  • Sprite Set Heading (s, value) [show]

    Alters the direction the Sprite is heading without changing the speed.

    Parameters:
    s : Sprite
    value : Single
    Signatures by Language:
    C/C++: void sprite_set_heading(sprite s, float value);
    Pascal: procedure SpriteSetHeading(s: Sprite; value: Single);

Sprite Set Layer Offset

Sets the offset of the specified layer.

  • Sprite Set Layer Offset (s, name, const value) [show]

    Sets the offset of the specified layer.

    Parameters:
    s : Sprite
    name : String
    value : Point2D
    Signatures by Language:
    C/C++: void sprite_set_layer_offset_named(sprite s, const char *name, const point2d *value);
    C/C++: void sprite_set_layer_offset_named_byval(sprite s, const char *name, const point2d value);
    C++: void sprite_set_layer_offset(sprite s, const char *name, const point2d &value);
    Pascal: procedure SpriteSetLayerOffset(s: Sprite; name: String; const value: Point2D);
  • Sprite Set Layer Offset (s, idx, const value) [show]

    Sets the offset of the specified layer.

    Parameters:
    s : Sprite
    idx : Longint
    value : Point2D
    Signatures by Language:
    C/C++: void sprite_set_layer_offset(sprite s, int32_t idx, const point2d *value);
    C/C++: void sprite_set_layer_offset_byval(sprite s, int32_t idx, const point2d value);
    C++: void sprite_set_layer_offset(sprite s, int32_t idx, const point2d &value);
    Pascal: procedure SpriteSetLayerOffset(s: Sprite; idx: Longint; const value: Point2D);

Sprite Set Layer Offsets

Sets the layer offsets for the sprite.

  • Sprite Set Layer Offsets (s, const values) [show]

    Sets the layer offsets for the sprite.

    Parameters:
    s : Sprite
    values : Point2DArray
    Signatures by Language:
    C/C++: void sprite_set_layer_offsets(sprite s, const point2d *values, int32_t values_len);
    Pascal: procedure SpriteSetLayerOffsets(s: Sprite; const values: Point2DArray);

Sprite Set Mass

Allows you to change the mass of a Sprite.

  • Sprite Set Mass (s, value) [show]

    Allows you to change the mass of a Sprite.

    Parameters:
    s : Sprite
    value : Single
    Signatures by Language:
    C/C++: void sprite_set_mass(sprite s, float value);
    Pascal: procedure SpriteSetMass(s: Sprite; value: Single);

Sprite Set Position

Sets the Sprite's position.

  • Sprite Set Position (s, const value) [show]

    Sets the Sprite's position.

    Parameters:
    s : Sprite
    value : Point2D
    Signatures by Language:
    C/C++: void sprite_set_position(sprite s, const point2d *value);
    C/C++: void sprite_set_position_byval(sprite s, const point2d value);
    C++: void sprite_set_position(sprite s, const point2d &value);
    Pascal: procedure SpriteSetPosition(s: Sprite; const value: Point2D);

Sprite Set Rotation

Allows you to change the rotation of a Sprite.

  • Sprite Set Rotation (s, value) [show]

    Allows you to change the rotation of a Sprite.

    Parameters:
    s : Sprite
    value : Single
    Signatures by Language:
    C/C++: void sprite_set_rotation(sprite s, float value);
    Pascal: procedure SpriteSetRotation(s: Sprite; value: Single);

Sprite Set Scale

Allows you to change the scale of a Sprite.

  • Sprite Set Scale (s, value) [show]

    Allows you to change the scale of a Sprite.

    Parameters:
    s : Sprite
    value : Single
    Signatures by Language:
    C/C++: void sprite_set_scale(sprite s, float value);
    Pascal: procedure SpriteSetScale(s: Sprite; value: Single);

Sprite Set Speed

Alters the speed of the Sprite without effecting the direction.

  • Sprite Set Speed (s, value) [show]

    Alters the speed of the Sprite without effecting the direction.

    Parameters:
    s : Sprite
    value : Single
    Signatures by Language:
    C/C++: void sprite_set_speed(sprite s, float value);
    Pascal: procedure SpriteSetSpeed(s: Sprite; value: Single);

Sprite Set Value

Assigns a value to the Sprite.

  • Sprite Set Value (s, name, val) [show]

    Assigns a value to the Sprite.

    Parameters:
    s : Sprite
    name : String
    val : Single
    Signatures by Language:
    C/C++: void sprite_set_value_named(sprite s, const char *name, float val);
    C++: void sprite_set_value(sprite s, const char *name, float val);
    Pascal: procedure SpriteSetValue(s: Sprite; name: String; val: Single);
  • Sprite Set Value (s, idx, val) [show]

    Assigns a value to the Sprite.

    Parameters:
    s : Sprite
    idx : Longint
    val : Single
    Signatures by Language:
    C/C++: void sprite_set_value(sprite s, int32_t idx, float val);
    Pascal: procedure SpriteSetValue(s: Sprite; idx: Longint; val: Single);

Sprite Set Velocity

Sets the current velocity of the Sprite. When the Sprite is updated (see UpdateSprite) this vector is used to move the Sprite.

  • Sprite Set Velocity (s, const value) [show]

    Sets the current velocity of the Sprite. When the Sprite is updated (see UpdateSprite) this vector is used to move the Sprite.

    Parameters:
    s : Sprite
    value : Vector
    Signatures by Language:
    C/C++: void sprite_set_velocity(sprite s, const vector *value);
    C/C++: void sprite_set_velocity_byval(sprite s, const vector value);
    C++: void sprite_set_velocity(sprite s, const vector &value);
    Pascal: procedure SpriteSetVelocity(s: Sprite; const value: Vector);

Sprite Set X

Sets the X position of the Sprite.

  • Sprite Set X (s, value) [show]

    Sets the X position of the Sprite.

    Parameters:
    s : Sprite
    value : Single
    Signatures by Language:
    C/C++: void sprite_set_x(sprite s, float value);
    Pascal: procedure SpriteSetX(s: Sprite; value: Single);

Sprite Set Y

Sets the Y position of the Sprite.

  • Sprite Set Y (s, value) [show]

    Sets the Y position of the Sprite.

    Parameters:
    s : Sprite
    value : Single
    Signatures by Language:
    C/C++: void sprite_set_y(sprite s, float value);
    Pascal: procedure SpriteSetY(s: Sprite; value: Single);

Sprite Show Layer

Show the specified layer of the sprite.

  • Sprite Show Layer (s, id) : Longint [show]

    Show the specified layer of the sprite.

    Parameters:
    s : Sprite
    id : Longint
    Returns:
    Longint :
    Signatures by Language:
    C/C++: int32_t sprite_show_layer(sprite s, int32_t id);
    Pascal: function SpriteShowLayer(s: Sprite; id: Longint): Longint;
  • Sprite Show Layer (s, name) : Longint [show]

    Show the specified layer of the sprite.

    Parameters:
    s : Sprite
    name : String
    Returns:
    Longint :
    Signatures by Language:
    C/C++: int32_t sprite_show_layer_named(sprite s, const char *name);
    C++: int32_t sprite_show_layer(sprite s, const char *name);
    Pascal: function SpriteShowLayer(s: Sprite; name: String): Longint;

Sprite Speed

Returns the current speed (distance travelled per update) of the Sprite.

  • Sprite Speed (s) : Single [show]

    Returns the current speed (distance travelled per update) of the Sprite.

    Parameters:
    s : Sprite
    Returns:
    Single :
    Signatures by Language:
    C/C++: float sprite_speed(sprite s);
    Pascal: function SpriteSpeed(s: Sprite): Single;

Sprite Start Animation

Start playing an animation from the sprite's animation template. This will play a sound effect if the first cell of the animation has a sound.

  • Sprite Start Animation (s, idx) [show]

    Start playing an animation from the sprite's animation template. This will play a sound effect if the first cell of the animation has a sound.

    Parameters:
    s : Sprite
    idx : Longint
    Signatures by Language:
    C/C++: void sprite_start_animation(sprite s, int32_t idx);
    Pascal: procedure SpriteStartAnimation(s: Sprite; idx: Longint);
  • Sprite Start Animation (s, named) [show]

    Start playing an animation from the sprite's animation template. This will play a sound effect if the first cell of the animation has a sound.

    Parameters:
    s : Sprite
    named : String
    Signatures by Language:
    C/C++: void sprite_start_animation_named(sprite s, const char *named);
    C++: void sprite_start_animation(sprite s, const char *named);
    Pascal: procedure SpriteStartAnimation(s: Sprite; named: String);
  • Sprite Start Animation (s, named, withSound) [show]

    Start playing an animation from the sprite's animation template. The withSound parameter determines whether to play a sound effect if the first cell of the animation has a sound.

    Parameters:
    s : Sprite
    named : String
    withSound : Boolean
    Signatures by Language:
    C/C++: void sprite_start_animation_named_with_sound(sprite s, const char *named, bool withSound);
    C++: void sprite_start_animation(sprite s, const char *named, bool withSound);
    Pascal: procedure SpriteStartAnimation(s: Sprite; named: String; withSound: Boolean);
    • source code
    • lib name: SpriteStartAnimationNamedWithSound
  • Sprite Start Animation (s, idx, withSound) [show]

    Start playing an animation from the sprite's animation template. The withSound parameter determines whether to play a sound effect if the first cell of the animation has a sound.

    Parameters:
    s : Sprite
    idx : Longint
    withSound : Boolean
    Signatures by Language:
    C/C++: void sprite_start_animation_with_sound(sprite s, int32_t idx, bool withSound);
    C++: void sprite_start_animation(sprite s, int32_t idx, bool withSound);
    Pascal: procedure SpriteStartAnimation(s: Sprite; idx: Longint; withSound: Boolean);

Sprite Stop Calling On Event

Removes an event handler from the sprite, stopping events from this Sprite calling the indicated method.

  • Sprite Stop Calling On Event (s, handler) [show]

    Removes an event handler from the sprite, stopping events from this Sprite calling the indicated method.

    Parameters:
    s : Sprite
    handler : SpriteEventHandler
    Signatures by Language:
    C/C++: void sprite_stop_calling_on_event(sprite s, sprite_event_handler handler);
    Pascal: procedure SpriteStopCallingOnEvent(s: Sprite; handler: SpriteEventHandler);

Sprite Toggle Layer Visible

Toggle the visibility of the specified layer of the sprite.

  • Sprite Toggle Layer Visible (s, id) [show]

    Toggle the visibility of the specified layer of the sprite.

    Parameters:
    s : Sprite
    id : Longint
    Signatures by Language:
    C/C++: void sprite_toggle_layer_visible(sprite s, int32_t id);
    Pascal: procedure SpriteToggleLayerVisible(s: Sprite; id: Longint);
  • Sprite Toggle Layer Visible (s, name) [show]

    Toggle the visibility of the specified layer of the sprite.

    Parameters:
    s : Sprite
    name : String
    Signatures by Language:
    C/C++: void sprite_toggle_layer_named_visible(sprite s, const char *name);
    C++: void sprite_toggle_layer_visible(sprite s, const char *name);
    Pascal: procedure SpriteToggleLayerVisible(s: Sprite; name: String);

Sprite Value

Returns the sprite's value at the index specified

  • Sprite Value (s, index) : Single [show]

    Returns the sprite's value at the index specified

    Parameters:
    s : Sprite
    index : Longint
    Returns:
    Single :
    Signatures by Language:
    C/C++: float sprite_value(sprite s, int32_t index);
    Pascal: function SpriteValue(s: Sprite; index: Longint): Single;
  • Sprite Value (s, name) : Single [show]

    Returns the indicated value of the sprite

    Parameters:
    s : Sprite
    name : String
    Returns:
    Single :
    Signatures by Language:
    C/C++: float sprite_value_named(sprite s, const char *name);
    C++: float sprite_value(sprite s, const char *name);
    Pascal: function SpriteValue(s: Sprite; name: String): Single;

Sprite Value Count

Returns the count of sprite's values.

  • Sprite Value Count (s) : Longint [show]

    Returns the count of sprite's values.

    Parameters:
    s : Sprite
    Returns:
    Longint :
    Signatures by Language:
    C/C++: int32_t sprite_value_count(sprite s);
    Pascal: function SpriteValueCount(s: Sprite): Longint;

Sprite Value Names

Returns the names of all of the values of the sprite

  • Sprite Value Names (s) : StringArray [show]

    Returns the names of all of the values of the sprite

    Parameters:
    s : Sprite
    Returns:
    StringArray :
    Signatures by Language:
    C/C++: void sprite_value_names(sprite s, string_array result, int32_t result_len);
    Pascal: function SpriteValueNames(s: Sprite): StringArray;

Sprite Velocity

Returns the current velocity of the Sprite. When the Sprite is updated (see UpdateSprite) this vector is used to move the Sprite.

  • Sprite Velocity (s) : Vector [show]

    Returns the current velocity of the Sprite. When the Sprite is updated (see UpdateSprite) this vector is used to move the Sprite.

    Parameters:
    s : Sprite
    Returns:
    Vector :
    Signatures by Language:
    C/C++: vector sprite_velocity(sprite s);
    Pascal: function SpriteVelocity(s: Sprite): Vector;

Sprite Visible Index Of Layer

Returns the index (z-order) of the sprite's layer.

  • Sprite Visible Index Of Layer (s, id) : Longint [show]

    Returns the index (z-order) of the sprite's layer.

    Parameters:
    s : Sprite
    id : Longint
    Returns:
    Longint :
    Signatures by Language:
    C/C++: int32_t sprite_visible_index_of_layer(sprite s, int32_t id);
    Pascal: function SpriteVisibleIndexOfLayer(s: Sprite; id: Longint): Longint;
  • Sprite Visible Index Of Layer (s, name) : Longint [show]

    Returns the index (z-order) of the sprite's layer.

    Parameters:
    s : Sprite
    name : String
    Returns:
    Longint :
    Signatures by Language:
    C/C++: int32_t sprite_visible_index_of_layer_named(sprite s, const char *name);
    C++: int32_t sprite_visible_index_of_layer(sprite s, const char *name);
    Pascal: function SpriteVisibleIndexOfLayer(s: Sprite; name: String): Longint;

Sprite Visible Layer

Returns the index of the n'th (idx parameter) visible layer.

  • Sprite Visible Layer (s, idx) : Longint [show]

    Returns the index of the n'th (idx parameter) visible layer.

    Parameters:
    s : Sprite
    idx : Longint
    Returns:
    Longint :
    Signatures by Language:
    C/C++: int32_t sprite_visible_layer(sprite s, int32_t idx);
    Pascal: function SpriteVisibleLayer(s: Sprite; idx: Longint): Longint;

Sprite Visible Layer Count

Returns the number of layers that are currently visible for the sprite.

  • Sprite Visible Layer Count (s) : Longint [show]

    Returns the number of layers that are currently visible for the sprite.

    Parameters:
    s : Sprite
    Returns:
    Longint :
    Signatures by Language:
    C/C++: int32_t sprite_visible_layer_count(sprite s);
    Pascal: function SpriteVisibleLayerCount(s: Sprite): Longint;

Sprite Visible Layer Ids

Returns the ids of the layers that are currently visible. In order back to front.

  • Sprite Visible Layer Ids (s) : LongintArray [show]

    Returns the ids of the layers that are currently visible. In order back to front.

    Parameters:
    s : Sprite
    Returns:
    LongintArray :
    Signatures by Language:
    C/C++: void sprite_visible_layer_ids(sprite s, int32_t *result, int32_t result_len);
    Pascal: function SpriteVisibleLayerIds(s: Sprite): LongintArray;

Sprite Width

The current Width of the sprite (aligned to the X axis).

  • Sprite Width (s) : Longint [show]

    The current Width of the sprite (aligned to the X axis).

    Parameters:
    s : Sprite
    Returns:
    Longint :
    Signatures by Language:
    C/C++: int32_t sprite_width(sprite s);
    Pascal: function SpriteWidth(s: Sprite): Longint;

Sprite X

Returns the X position of the Sprite.

  • Sprite X (s) : Single [show]

    Returns the X position of the Sprite.

    Parameters:
    s : Sprite
    Returns:
    Single :
    Signatures by Language:
    C/C++: float sprite_x(sprite s);
    Pascal: function SpriteX(s: Sprite): Single;

Sprite Y

Returns the Y position of the Sprite.

  • Sprite Y (s) : Single [show]

    Returns the Y position of the Sprite.

    Parameters:
    s : Sprite
    Returns:
    Single :
    Signatures by Language:
    C/C++: float sprite_y(sprite s);
    Pascal: function SpriteY(s: Sprite): Single;

Stop Calling On Sprite Event

Removes an global event handler, stopping events calling the indicated procedure.

  • Stop Calling On Sprite Event (handler) [show]

    Removes an global event handler, stopping events calling the indicated procedure.

    Parameters:
    handler : SpriteEventHandler
    Signatures by Language:
    C/C++: void stop_calling_on_sprite_event(sprite_event_handler handler);
    Pascal: procedure StopCallingOnSpriteEvent(handler: SpriteEventHandler);

Update All Sprites

Update all of the sprites in the current Sprite pack.

  • Update All Sprites () [show]

    Update all of the sprites in the current Sprite pack.

  • Update All Sprites (pct) [show]

    Update all of the sprites in the current Sprite pack, passing in a percentage value to indicate the percentage to update.

    Parameters:
    pct : Single
    Signatures by Language:
    C/C++: void update_all_sprites_pct(float pct);
    C++: void update_all_sprites(float pct);
    Pascal: procedure UpdateAllSprites(pct: Single);

Update Sprite

Update the position and animation details of the Sprite. This will play a sound effect if the new cell of the animation has a sound.

  • Update Sprite (s) [show]

    Update the position and animation details of the Sprite. This will play a sound effect if the new cell of the animation has a sound.

    Parameters:
    s : Sprite
    Signatures by Language:
    C/C++: void update_sprite(sprite s);
    Pascal: procedure UpdateSprite(s: Sprite);
  • Update Sprite (s, withSound) [show]

    Update the position and animation details of the Sprite. This will play a sound effect if the new cell of the animation has a sound and withSound is true.

    Parameters:
    s : Sprite
    withSound : Boolean
    Signatures by Language:
    C/C++: void update_sprite_with_sound(sprite s, bool withSound);
    C++: void update_sprite(sprite s, bool withSound);
    Pascal: procedure UpdateSprite(s: Sprite; withSound: Boolean);
  • Update Sprite (s, pct) [show]

    Update the position and animation details of the Sprite by a given percentage of a single unit of movement/animation. This will play a sound effect if the new cell of the animation has a sound.

    Parameters:
    s : Sprite
    pct : Single
    Signatures by Language:
    C/C++: void update_sprite_percent(sprite s, float pct);
    C++: void update_sprite(sprite s, float pct);
    Pascal: procedure UpdateSprite(s: Sprite; pct: Single);
  • Update Sprite (s, pct, withSound) [show]

    Update the position and animation details of the Sprite by a given percentage of a single unit of movement/animation. This will play a sound effect if the new cell of the animation has a sound and withSound is true.

    Parameters:
    s : Sprite
    pct : Single
    withSound : Boolean
    Signatures by Language:
    C/C++: void update_sprite_pct_with_sound(sprite s, float pct, bool withSound);
    C++: void update_sprite(sprite s, float pct, bool withSound);
    Pascal: procedure UpdateSprite(s: Sprite; pct: Single; withSound: Boolean);

Update Sprite Animation

Updates the animation details of the sprite. This will play a sound effect if the new cell of the animation has a sound.

  • Update Sprite Animation (s) [show]

    Updates the animation details of the sprite. This will play a sound effect if the new cell of the animation has a sound.

    Parameters:
    s : Sprite
    Signatures by Language:
    C/C++: void update_sprite_animation(sprite s);
    Pascal: procedure UpdateSpriteAnimation(s: Sprite);
  • Update Sprite Animation (s, withSound) [show]

    Update the animation details of the Sprite. This will play a sound effect if the new cell of the animation has a sound and withSound is true.

    Parameters:
    s : Sprite
    withSound : Boolean
    Signatures by Language:
    C/C++: void update_sprite_animation_with_sound(sprite s, bool withSound);
    C++: void update_sprite_animation(sprite s, bool withSound);
    Pascal: procedure UpdateSpriteAnimation(s: Sprite; withSound: Boolean);
  • Update Sprite Animation (s, pct) [show]

    Update the animation details of the Sprite by a given percentage of a single unit of movement/animation. This will play a sound effect if the new cell of the animation has a sound.

    Parameters:
    s : Sprite
    pct : Single
    Signatures by Language:
    C/C++: void update_sprite_animation_percent(sprite s, float pct);
    C++: void update_sprite_animation(sprite s, float pct);
    Pascal: procedure UpdateSpriteAnimation(s: Sprite; pct: Single);
  • Update Sprite Animation (s, pct, withSound) [show]

    Update the position and animation details of the Sprite by a given percentage of a single unit of movement/animation. This will play a sound effect if the new cell of the animation has a sound and withSound is true.

    Parameters:
    s : Sprite
    pct : Single
    withSound : Boolean
    Signatures by Language:
    C/C++: void update_sprite_animation_pct_with_sound(sprite s, float pct, bool withSound);
    C++: void update_sprite_animation(sprite s, float pct, bool withSound);
    Pascal: procedure UpdateSpriteAnimation(s: Sprite; pct: Single; withSound: Boolean);
    • source code
    • lib name: UpdateSpriteAnimationPctWithSound

Vector From Center Sprite To Point

Returns a Vector that is the difference in location from the center of the sprite s to the point pt.

  • Vector From Center Sprite To Point (s, const pt) : Vector [show]

    Returns a Vector that is the difference in location from the center of the sprite s to the point pt.

    Parameters:
    s : Sprite
    pt : Point2D
    Returns:
    Vector :
    Signatures by Language:
    C/C++: vector vector_from_center_sprite_to_point(sprite s, const point2d *pt);
    C/C++: vector vector_from_center_sprite_to_point_byval(sprite s, const point2d pt);
    C++: vector vector_from_center_sprite_to_point(sprite s, const point2d &pt);
    Pascal: function VectorFromCenterSpriteToPoint(s: Sprite; const pt: Point2D): Vector;

Vector From To

Returns a Vector that is the difference in the position of two sprites (s1 and s2).

  • Vector From To (s1, s2) : Vector [show]

    Returns a Vector that is the difference in the position of two sprites (s1 and s2).

    Parameters:
    s1 : Sprite
    s2 : Sprite
    Returns:
    Vector :
    Signatures by Language:
    C/C++: vector vector_from_to(sprite s1, sprite s2);
    Pascal: function VectorFromTo(s1: Sprite; s2: Sprite): Vector;