toolchain icon indicating copy to clipboard operation
toolchain copied to clipboard

Optimize graphx

Open ZERICO2005 opened this issue 6 months ago • 1 comments

Non-transparent sprite rotation was further optimized by a good amount.

Optimized the clipping function for gfx_Sprite, gfx_TransparentSprite.

Sprite flip/rotate90/rotate180 routines were optimized.

Other routines were also optimized, mainly in ways that reduce size while maintaining or improving performance. Although most performance gains were constant (i.e. 4F faster per function call) instead of linear (i.e. 2F * line_count faster).

I also updated the sprites_rotate_scale demo. It varies the scale of the rotated sprite, and shows the user how to center the sprite

ZERICO2005 avatar Jun 12 '25 23:06 ZERICO2005

Since I keep finding additional ways to save a byte or two, I will leave this as a draft for a bit longer. Otherwise everything should be stable now.

ZERICO2005 avatar Jun 18 '25 00:06 ZERICO2005

I think this is good to merge now. I will start working on preparing the clipped rotation routines

ZERICO2005 avatar Jul 14 '25 19:07 ZERICO2005

forgot to remove some whitespace!

ZERICO2005 avatar Jul 14 '25 20:07 ZERICO2005

got the white-space fixed now

ZERICO2005 avatar Jul 14 '25 20:07 ZERICO2005