https://github.com/axmandm/sgdk-bitmap-lissajous
https://github.com/axmandm/sgdk-bitmap-lissajous
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/axmandm/sgdk-bitmap-lissajous
- Owner: axmandm
- Created: 2020-06-23T21:47:28.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-23T21:50:55.000Z (almost 5 years ago)
- Last Synced: 2024-07-31T20:26:53.888Z (9 months ago)
- Language: Assembly
- Size: 65.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Draws a lissajous curve on screen, building on https://github.com/axmandm/sgdk-bitmap-sine-wave
Bitmap drawing in this way is _slow_. As per the notes in https://github.com/axmandm/sgdk-bitmap-line, the positioning of BMP_flip(); is key to this.
In the version here, the BMP_flip(); is called in the main loop:
```
for (i = 0; i < 1024; i++)
{
x = 120 + sinFix16(a*i + delta);
y = 80 + sinFix16(b*i);
BMP_setPixel(x, y, pal_green);
BMP_flip(FALSE);
}
```If this is changed so BMP_flip(FALSE); is outside of this loop (i.e. after the closing curly brace) then the drawing speed is significantly faster - because the bitmap is totally computed, and THEN drawn to screen.