Commit Graph

14 Commits

Author SHA1 Message Date
Dan O'Shea f2e6f4f9cb Repackaged 2018-07-03 11:02:44 +09:30
Delio Brignoli da2c7e3d35 Add SpritesB class as alternative to Sprites
The SpritesB class has functions identical to those in Sprites.
When used in place of Sprites it will usually reduce code size (at the
expense of slower execution speed). Code size reduction is accomplished
by factoring all draw modes into the same loop.

Modifications made to the Sprites class to create this class made by
@dxxb (Delio Brignoli).

Creation of the SpritesB class and documentation by
@MLXXXp (Scott Allen).

Also, bootLogoSpritesBSelfMasked() and bootLogoSpritesBOverwrite()
alternative boot logo functions added by @MLXXXp.
2018-03-22 08:11:24 -04:00
Scott Allen 383bdfc144 fix and clarify Sprite assembly comments 2017-08-28 21:31:10 -04:00
Josh Goebel 4478b1fe0a fix random display glitches with sprite rendering
Sometimes the compiler would assign r28/29 to one of our input
variables despite our needing to use that register ourselves. This
fix attempts to prevent that from happening and also cleans up a
few other small details.

- remove unnecessary y_count (-1 register)
- set buffer_ofs_2 inside assembly (-1 register)
- require inputs/outputs to use lower or simple upper registers
2017-08-26 14:55:02 -04:00
Scott Allen a01ceffb20 Fix improper masking in Sprites drawPlusMask()
As per Josh Goebel @yyyc514
2017-04-25 15:36:42 -04:00
Scott Allen babf6893c8 Eliminate "may be uninitialized" variable warning
Code in Sprites.cpp refactored to eliminate
"warning: 'mask_ofs' may be used uninitialized in this function"
2017-04-25 15:36:42 -04:00
Josh Goebel b4d8fd8d6f fix register pressure
- declare a high register clobber

This seems to have the side effect of freeing up a high register and
preventing the error:

"can't find a register in class 'LD_REGS' while reloading 'asm'""
2017-04-25 15:36:42 -04:00
Josh Goebel 606c80268b tmp variables can be flagged as output only
- this saves a few bytes
2017-04-25 15:36:42 -04:00
Josh Goebel 5d428a3a33 Fix buffer underflow in drawPlusMask
When sRow == -1 drawPlusMask can cause buffer underflow if it's
interrupted by an interrupt that changes memory that it's in the middle
of writing.  Of course it shouldn't be writing to this memory at all.

This fixes the issue.
2017-04-25 15:36:42 -04:00
Josh Goebel 3aa015b997 minor code fixes for sprites
- saves several bytes for sketches using drawPlusMask()
2017-04-25 15:36:42 -04:00
Josh Goebel b560ff9f60 fix internal drawBitmap call to use correct types 2017-03-22 17:43:56 -04:00
Scott Allen d89a2bd590 Improve embedded Doxygen documentation 2016-11-24 14:51:22 -05:00
Scott Allen 40a028e5a1 Remove Sprites class constructor parameter
The Sprites class has been given direct access to the screen buffer so it
doesn't need a pointer to been given to it.

Also updated README.md and keywords.txt, and made minor indent changes in
the .h files.
2016-10-20 13:28:29 -04:00
Scott Allen f763263d2b Add Team A.R.G. Arglib functionality
- Version changed to 2.1.0
- Added sprite, button and collision functions from ArduboyExtra
- Added drawCompressed() function from Arglib
- Updated LICENSE.txt
- Removed CONTRIBUTORS.md (now covered by LICENSE.txt)
2016-10-19 20:23:34 -04:00