Colour — shadow & tint: recolour a whole scene at once. More...
Functions | |
| static void | apply_effect (void) |
| Apply the effect for the current fx_state (call after VBlank). | |
| int | main (void) |
Variables | |
| u8 | fx_state |
| Probe oracle: current effect (0 none, 1 blackout, 2 green rain, 3 red alert). | |
Colour — shadow & tint: recolour a whole scene at once.
Colour math against a fixed colour is how a game changes mood without touching a single tile or palette entry. Subtract a grey and the scene darkens — dusk, a dungeon, nightfall. Add a colour and the scene takes that cast — the blue of being underwater, the orange of a sunset or lava glow, the red flash of taking a hit. One register pair does it to every pixel of a layer, every frame, for free.
The scene here is a street of the city at night — apartment blocks and a noodle sign (res/street.png) — so you can watch the effect land on a picture. Press A to cycle:
none -> blackout (darken) -> green rain (tint) -> red alert (tint) -> none
ROM mode: LoROM (project default).
|
static |
Apply the effect for the current fx_state (call after VBlank).
| int main | ( | void | ) |
| u8 fx_state |
Probe oracle: current effect (0 none, 1 blackout, 2 green rain, 3 red alert).