Skip to content

general graphx optimizations#742

Merged
mateoconlechuga merged 10 commits intomasterfrom
opt_graphx
Apr 18, 2026
Merged

general graphx optimizations#742
mateoconlechuga merged 10 commits intomasterfrom
opt_graphx

Conversation

@ZERICO2005
Copy link
Copy Markdown
Contributor

@ZERICO2005 ZERICO2005 commented Mar 9, 2026

smaller optimizations across graphx:

  • optimized SMC code for gfx_floodfill
  • removed redundant comparison check in one of the while loops for floodfill
  • optimized off screen sprite clipping by returning directly to the caller if the sprite is off-screen. This makes all paths a minimum of 1F + 2 faster.
  • switched _indcallHL to ti._indcall to save a relocation
  • saved 1 byte in gfx_SetCharData
  • optimized gfx_TilePtr via djnz hax
  • ld iy, 0 \ ld iyl, a \ ld iyh, SMC can be changed to inc.s iy \ ld iyl, a \ ld iyh, SMC
  • the condition for .positive_dy was checked twice instead of once, and the comparison only needed to use 8 bits instead of 16/24 bits, so I was able to optimize that for gfx_Line_NoClip

11795 - 11745 = 50 bytes saved

@ZERICO2005 ZERICO2005 marked this pull request as draft March 9, 2026 18:59
@ZERICO2005 ZERICO2005 marked this pull request as ready for review March 9, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants