Users browsing this thread: 1 Guest(s)
How do spells decide which intro to play?
01-15-2019, 09:11 PM
The spell index determines which intro animation is used. It's set up so that it can only choose from 3 intros (black, white/effect, summon) but you could modify it to make different intros for white and effect magic. Here is the subroutine that handles this. I also put the animation pointer table at the bottom. Strangely, they seem to have included the lore intro in this table ($0FB2), though I don't think it ever gets used. Lore, Blitz, SwdTech, and Rage intros are handled elsewhere.
Code:
C1/AB9F: A0 02 00 LDY #$0002
C1/ABA2: 7B TDC
C1/ABA3: AA TAX
C1/ABA4: B1 76 LDA ($76),Y ; attack number
C1/ABA6: C9 18 CMP #$18
C1/ABA8: 90 11 BCC $ABBB ; branch if black magic (X = 0)
C1/ABAA: E8 INX
C1/ABAB: E8 INX
C1/ABAC: C9 36 CMP #$36
C1/ABAE: 90 0B BCC $ABBB ; branch if white or effect magic (X = 2)
C1/ABB0: E8 INX
C1/ABB1: E8 INX
C1/ABB2: C9 51 CMP #$51
C1/ABB4: 90 05 BCC $ABBB ; branch if esper (X = 4)
C1/ABB6: 9C C0 62 STZ $62C0 ; don't ignore block graphics
C1/ABB9: 80 2C BRA $ABE7
C1/ABBB: EE C0 62 INC $62C0 ; ignore block graphics
C1/ABBE: C2 20 REP #$20
C1/ABC0: BF 8E 91 C1 LDA $C1918E,X ; +$1E = pointer to pre-attack animation data (+$D07FB2)
C1/ABC4: 85 1E STA $1E
C1/ABC6: 7B TDC
C1/ABC7: E2 20 SEP #$20
C1/ABC9: 20 B3 9C JSR $9CB3 ; init battle animation data
C1/ABCC: 20 5B AC JSR $AC5B ; execute battle animation
C1/ABCF: 20 89 BC JSR $BC89 ; get attacker number
C1/ABD2: A5 10 LDA $10
C1/ABD4: 30 0B BMI $ABE1 ; branch if monster
C1/ABD6: 29 03 AND #$03
C1/ABD8: AA TAX
C1/ABD9: AD A4 62 LDA $62A4 ;
C1/ABDC: D0 03 BNE $ABE1
C1/ABDE: FE AE 61 INC $61AE,X
C1/ABE1: 9C C0 62 STZ $62C0 ; don't ignore block graphics
C1/ABE4: 20 43 AB JSR $AB43 ; init single thread animation
C1/ABE7: 20 8B AB JSR $AB8B ; reset attacker graphical action
C1/ABEA: 60 RTS
; pointers to pre-attack animation data (black magic, white/effect magic, esper, lore, +$D07FB2)
C1/918E: .DW $0F88, $0F96, $0FA4, $0FB2
The following 3 users say Thank You to Everything for this post:
• C-Dude (01-15-2019), madsiur (01-15-2019), Warrax (01-16-2019)
• C-Dude (01-15-2019), madsiur (01-15-2019), Warrax (01-16-2019)
« Next Oldest | Next Newest »
|
||||
Users browsing this thread: 1 Guest(s)