News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

Anyone know where room fx is loaded from??

Started by PHOSPHOTiDYL, August 23, 2019, 12:31:55 AM

Previous topic - Next topic

PHOSPHOTiDYL

I wana do something like if tileset $06, always load fog fx.
Just don't know where it's being called from...

Any help??

PHOSPHOTiDYL

#1
Nvm I got it...


org $82df4a : jsr $ff00

org $82ff00
phx : ldx $07bb : lda $0003,x : and #$00ff : cmp #$0006 : beq + : plx : lda $0006,x : rts
+ lda #$ff00 : plx : rts

org $83ff00 ;00 00 FF FF FF FF 00 00 00 0C 2A 14 00 00 00 44

PHOSPHOTiDYL

This one checks for liquid first, & a bunch of tilez for using fog instead of editing every room...  :nod:

org $82df4a : jsr $ff00

org $82ff00 ;//[LDA 0009X]
phx : lda $0006,x : sta $07cd
ldx $07cd : lda $830009,x : and #$00ff : cmp #$0002 : beq ++ : cmp #$0004 : beq ++
ldx $07bb : lda $0003,x : and #$00ff
cmp #$0006 : beq + : cmp #$0007 : beq + : cmp #$0008 : beq + : cmp #$001a : beq +
cmp #$0015 : beq + : cmp #$0016 : beq + : cmp #$0017 : beq +
cmp #$0018 : beq + : cmp #$0019 : beq +
cmp #$0009 : beq + : cmp #$000a : beq +
++ plx : lda $0006,x : rts
+ lda #$ff00 : plx : rts