Is there something like this but for the battle background?Day/Night Switching of Textbox Palettes (FireRed)
So this is one of my few successful ASM hacks. What it does is swap the palettes used by the textbox depending on whether it is day or night (based on Prime Dialga's D/N system). Some of you older users may remember such a feature being implemented by Shiny Quagsire for Pokémon Grey (iirc).
So the first thing you need to do is go to 0x471DEC and copy 0xA0 bytes there, and then paste them into freespace somewhere. Be sure to note the offset. These are the five palettes used by the textboxes. You can use this copy as the base for your new night palettes.
Next, assemble and insert the following routine into freespace, once again noting the offset. Be sure to replace the ZZZZZZ with the offset of your new night palettes.
Code:.text .align 2 .thumb .thumb_func main: @ get the time ldr r1, =(0x300553C) @ if your RTC uses a different location for the time, change this ldrb r1, [r1, #0x6] @ check the time @ if <= 6 AM or >= 6 PM @ load night palette @ else @ load day palette cmp r1, #0x6 @ 6 AM ble set_night cmp r1, #0x12 @ 6 PM bge set_night set_day: ldr r1, day_palette b return set_night: ldr r1, night_palette return: @ this uses the end of the original function @ so there should be no problems add r0, r0, r1 pop {r1} bx r1 .align 2 day_palette: .word 0x08471DEC night_palette: .word 0x08ZZZZZZ @ change this to your night palette
Now finally, navigate to 0x150448 and place this (the hook):
Where XX XX XX 08 is the pointer to the location you inserted the ASM + 1.Code:00 49 08 47 XX XX XX 08 00 00 00 00
I know it's a bit of a silly hack, but I hope someone makes use of it! :)
Meaning instead of the text box the battle backgrounds looks like a night palette.