Update Notes

Bill Niblock 2024-08-21 03:15:54 +00:00
parent 584aeba03c
commit d205068f4c

@ -17,4 +17,6 @@ Considering palette swapping again. If I have the color, then a light grey, a da
}
```
Every time a tile is drawn, check the light level, and set the corresponding palette color accordingly. This doesn't have to happen every tick, though. The map only changes during certain scenarios: when the map is first drawn, to account for initial light sources; when the ball is hit, to account for the ball lighting up the course; when the player uses their flashlight. When these events happen, the map tiles can be updated. Otherwise, everything is set in memory, and no changes need to be made, just draw what's there.
Every time a tile is drawn, check the light level, and set the corresponding palette color accordingly. This doesn't have to happen every tick, though. The map only changes during certain scenarios: when the map is first drawn, to account for initial light sources; when the ball is hit, to account for the ball lighting up the course; when the player uses their flashlight. When these events happen, the map tiles can be updated. Otherwise, everything is set in memory, and no changes need to be made, just draw what's there.
Update: This kind of works! Except, it's palette _swapping_, not palette _replacing_. What I actually want is to replace the palette colors. Notably, I fixed my map call to only draw the map being shown on the display. This, in turn, made the callback function actually performant when changing memory values.