Skip to content

9 slice supporting easy sprites #394

@ogam

Description

@ogam

Currently 9 slice sprites only supports sprites created from .ase files.
These have not been tested to see how it should properly be done with easy sprites created with cf_make_easy_sprite* variations.
Maybe an add or update the center patch for a sprite's animation frame and default to cf_draw_sprite() if not available?

https://github.com/RandyGaul/cute_framework/blob/cdbd3637d4d1e9664a753dd92eb9f874837a601d/src/cute_draw.cpp#L651C2-L660C3

	if (sprite->animation) {
		frame_index = sprite->frame_index + sprite->animation->frame_offset;
		image_id = sprite->animation->frames[sprite->frame_index].id;
	}
	else if (sprite->easy_sprite_id >= CF_PREMADE_ID_RANGE_LO && sprite->easy_sprite_id <= CF_PREMADE_ID_RANGE_HI) {
		CF_ASSERT(!"Not implemented yet.");
	}
	else {
		CF_ASSERT(!"Not implemented yet.");
	}

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