cute_framework
cute_framework copied to clipboard
9 slice supporting easy sprites
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.");
}
One minor fix related to this so far: https://github.com/RandyGaul/cute_framework/commit/a6a627b7618f6034f015947d1c8e8421757592fb