From b50cabcff11ae364799f09a547b9644b7cf9fec8 Mon Sep 17 00:00:00 2001 From: vagabond Date: Wed, 21 Aug 2024 14:49:27 +0000 Subject: [PATCH] Update Notes --- Notes.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Notes.md b/Notes.md index f1aa6ea..45f3e99 100644 --- a/Notes.md +++ b/Notes.md @@ -19,4 +19,9 @@ 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. -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. \ No newline at end of file +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. Because I can read values, I can easily read the values from the palette that I need, and then apply them when necessary. Instead of programming everything, I can just read it and save it. + +``` +local light_grey = peek4(mem) +``` +Repeat for everything. \ No newline at end of file