commit 44ff3a25a3a0e6f3f5f678bcf2f2f747232e0988
Author: Jon Bell <jondbell@protonmail.com>
AuthorDate: Wed Apr 8 12:23:16 2020 -0600
Commit: Jon Bell <jondbell@protonmail.com>
CommitDate: Wed Apr 8 12:23:16 2020 -0600
Add some comments
---
source/graphics.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/source/graphics.c b/source/graphics.c
index 594f192..0ecb350 100644
--- a/source/graphics.c
+++ b/source/graphics.c
@@ -45,11 +45,13 @@ uint16_t _pico8_fb[128*128];
GraphicsState _graphicsState;
+//call initialize to make sure defaults are correct
void initPico8Graphics() {
_graphicsState.bgColor = 0;
_graphicsState.color = 7;
}
+//start helper methods
void swap(short *x, short *y) {
short temp;
temp = *x;
@@ -68,6 +70,7 @@ void sortcoords(short *expectedLower, short *expectedHigher){
bool isOnScreen(short *x, short* y) {
return *x >= 0 && *x < 127 && *y >= 0 && *y < 127;
}
+//end helper methods
void cls() {
memset(_pico8_fb, _graphicsState.bgColor, sizeof(_pico8_fb));