Users browsing this thread: 1 Guest(s)
Random battle theme
10-14-2018, 07:11 PM
I think this will work. WoR Desert is background $2F, I had to do debugging to find it.
Code:
hirom
org $C2BDB7
JSR free_space
NOP
org $C26469 ; change to free space
free_space:
LDA $C2BF3B,X
CMP #$24 ; check if battle song
BNE exit ; branch if not
LDA $11E2 ; load battle background byte
AND #$3F ; isolate battle background
BEQ is_wor_grass
CMP #$01
BEQ is_wob_forest
CMP #$02
BEQ is_wob_desert
CMP #$03
BEQ is_wor_forest
CMP #$05
BEQ is_wob_grass
CMP #$2F
BEQ is_wor_desert
CMP #$16
BEQ is_kefka
CMP #$28
BEQ is_kefka
LDA #$24 ; default battle song ID
BRA exit
is_wob_grass:
LDA #$10 ; song ID
BRA exit
is_wob_forest:
LDA #$11 ; song ID
BRA exit
is_wob_desert:
LDA #$12 ; song ID
BRA exit
is_wor_forest:
LDA #$13 ; song ID
BRA exit
is_wor_grass:
LDA #$14 ; song ID
BRA exit
is_wor_desert:
LDA #$15 ; song ID
BRA exit
is_kefka:
LDA #$16 ; song ID
exit:
RTS
« Next Oldest | Next Newest »
|
||||
Users browsing this thread: 1 Guest(s)