08-01-2026, 06:30 AM
@Napomex,
https://drive.google.com/file/d/1pFuWAEL...sp=sharing
A version with some std optimizations:
.move some computation:
- only where they can be used to avoid them if tests avoid this code to be reached
- outside a (inner)loop to make it only once if possible
. use some #define for "inlining" calls (to avoid stack push/pop), for example:
#define UnsetSprite(SpriteNo) SpriteControl(SpriteNo, SPR_OFF, 0)
to remove from the lib...
. try to avoid mul/div in loops too (but note that use of multi-dim arrays add "mul" instructions)
I didn't apply this principals in all the code, maybe you can take a look at it and take what you want and apply some idea where you want.
Not tested on HW yet, only emus (vdmgr & ngpcraft)
I'll continue to investigate later this week-end.
https://drive.google.com/file/d/1pFuWAEL...sp=sharing
A version with some std optimizations:
.move some computation:
- only where they can be used to avoid them if tests avoid this code to be reached
- outside a (inner)loop to make it only once if possible
. use some #define for "inlining" calls (to avoid stack push/pop), for example:
#define UnsetSprite(SpriteNo) SpriteControl(SpriteNo, SPR_OFF, 0)
to remove from the lib...
. try to avoid mul/div in loops too (but note that use of multi-dim arrays add "mul" instructions)
I didn't apply this principals in all the code, maybe you can take a look at it and take what you want and apply some idea where you want.
Not tested on HW yet, only emus (vdmgr & ngpcraft)
I'll continue to investigate later this week-end.

