Users browsing this thread: 3 Guest(s)
Day/Night cycles in FF6
03-22-2015, 04:14 AM
Hey Lockirby2,
I really like what you did with this, so I looked into making a Day/Night routine for the overworld. Here is a routine for mode 7 day/night, it uses the game timer as clock:
Offsets are with header
The JSR calls at 2E0684 and 2E03FB replace a call to JSR $AAAD (20 AD AA). This call is now made at the entry point of our new day/night subroutine. The routine then gets the minutes of gametime and converts them to brightness. The cycles are 16 minutes and each step happens on the minute each minute.
To change the steps from minutes to seconds (fun for testing) change the following line:
The new routine is placed to overwrite free space located from Gi Nattaks post. But it should be no problem to locate it anywhere in the 2E bank.
For other mode 7 scenes that might need day/night, like airship liftoff and land scenes. You can replace the call to JSR $AAAD (20 AD AA) "Animate Water Tiles" with a call to JSR $AF01 (20 01 AF) "day/night routine" in other mode 7 scene routines.
I really like what you did with this, so I looked into making a Day/Night routine for the overworld. Here is a routine for mode 7 day/night, it uses the game timer as clock:
Offsets are with header
Code:
; overworld day/night
2E0684: 20 01 AF JSR $AF01 ; day/night routine
; vehicle day/night
2E03FB: 20 01 AF JSR $AF01 ; day/night routine
; day/night routine
2EB101: 20 AD AA JSR $AAAD ; Animate Water Tiles
2EB104: E2 20 SEP
2EB106: AD 1C 02 LDA $021C ; Get time in minutes
2EB109: 29 0F AND #$0F
2EB10B: C9 08 CMP #$08
2EB10D: 10 02 BMI
2EB10F: 49 0F EOR #$0F
2EB111: 85 22 STA $22 ; Set brightness destination
2EB113: 60 RTS
The JSR calls at 2E0684 and 2E03FB replace a call to JSR $AAAD (20 AD AA). This call is now made at the entry point of our new day/night subroutine. The routine then gets the minutes of gametime and converts them to brightness. The cycles are 16 minutes and each step happens on the minute each minute.
To change the steps from minutes to seconds (fun for testing) change the following line:
Code:
2EB106: AD 1D 02 LDA $021D ; Get time in seconds
The new routine is placed to overwrite free space located from Gi Nattaks post. But it should be no problem to locate it anywhere in the 2E bank.
For other mode 7 scenes that might need day/night, like airship liftoff and land scenes. You can replace the call to JSR $AAAD (20 AD AA) "Animate Water Tiles" with a call to JSR $AF01 (20 01 AF) "day/night routine" in other mode 7 scene routines.
« Next Oldest | Next Newest »
Users browsing this thread: 3 Guest(s)