Skip to content

Feature request: Drawing sprites with a sprite data offset parameter #3

@GeometricParrot

Description

@GeometricParrot

I would like to request a new feature for CelticCE.
There are only 10 string variables that can hold data for drawing sprites. This this limits the number of different sprites you can draw at a time before you have to load new data into a string var. I think it would be helpful if CelticCE supported specifying a data offset when drawing sprites. I believe this would effectively provide an easier way to implement a sprite sheet and would help combat having a limited number of string variables.
For example, lets say you have a character that you want to give a little animation to. You decide to make 4 different sprites to serve as the frames of the animation. Currently, you either use 4 string variables or load the sprite data into a string every animation frame. Using 4 String variables is not practical because you likely have other sprites you want to draw also. Loading the sprite data every animation frame does work but I think it would be nice to have all the data loaded in one string as a sprite sheet then specify where from the string you would like to draw from.
I propose this would be implemented as an optional extra parameter to PutSprite, TransSprite, ScaleSprite, and ScaleTSprite. The parameter could be called offset and defaults to the beginning of the string when no value is supplied. When given a value, offset would specify how many bytes or characters after the beginning of the string the function should read data from.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions