Users browsing this thread: 1 Guest(s)
Spell Graphics Document

#15
Posts: 181
Threads: 3
Thanks Received: 26
Thanks Given: 4
Joined: Apr 2015
Reputation: 18
Status
None
(09-11-2015, 07:22 PM)sleepydude Wrote: The good news is that for the most part though, this code seems pretty easy. I'll crack it, but if someone has any information about subsprite count that's help me out a lot.

I think what you're looking for is hidden in "byte 10" of the spell animation data. That value gets used to jump to an initialization subroutine at the beginning of the animation. Here's the code for the jump table:

Code:
C2/E8D0: 29 7F        AND #$7F
C2/E8D2: 0A           ASL
C2/E8D3: AA           TAX
C2/E8D4: FC D8 E8     JSR ($E8D8,X)
C2/E8D7: 6B           RTL

; battle animation init function jump table
C2/E8D8:              .DW $F836, $F820, $F82B, $F7EF, $F436, $F812, $F305, $F820
C2/E8E8:              .DW $F2BF, $F49C, $F489, $F809, $F46B, $E9D6, $F7C7, $F741
C2/E8F8:              .DW $F809, $F6ED, $F4CA, $F7A1, $F630, $F58D, $F763, $F6D5
C2/E908:              .DW $F6A4, $F77D, $F418, $F839, $F63E, $F8CA, $F392, $F35D
C2/E918:              .DW $F3B5, $F60D, $F5C1, $F5A1, $F2B9, $F6C4, $F83C, $F847
C2/E928:              .DW $F65B, $F351, $F3E9, $F795, $F3D9, $F59E, $F5F8, $F5D2
C2/E938:              .DW $F5A4, $F3FB, $F299, $F289, $F27B, $F25D, $F241, $F231
C2/E948:              .DW $F221, $F211, $F1FA, $F195, $F16B, $F14D, $F129, $F119
C2/E958:              .DW $F109, $F0F9, $F0DD, $F0C1, $F08E, $F070, $F020, $F00F
C2/E968:              .DW $EFFE, $EFE3, $EFD2, $EF7B, $EF67, $EF59, $EF4B, $EF48
C2/E978:              .DW $EF1F, $EF1C, $EF0A, $EEF6, $EEDE, $EEBD, $EEAC, $EEA7
C2/E988:              .DW $EE99, $EE30, $EE8D, $EE76, $EE0C, $EDFD, $EDF5, $EDAC
C2/E998:              .DW $EDA3, $ED8E, $ED6E, $ECF6, $ED62, $EC52, $EC4B, $EC43
C2/E9A8:              .DW $EC36, $EC29, $EC1C, $EBFE, $EBEE, $EBE1, $EBC2, $EBBC
C2/E9B8:              .DW $EB97, $EB91, $EB2C, $EB87, $EB4F, $EB35, $EB1D, $EACB
C2/E9C8:              .DW $EABD, $EAA7, $EA88, $EA71, $EA65, $EA43, $E9D7

Some of these subroutines set the number of subsprites (among other things). Here's an example of the one used by the Fire spell (byte 10 = $25):

Code:
; $25: Fire, Bio, Sonic Boom, Plasma, Blaze, Shimsham, Sonic Boom, Plasma, Blaze, Shimsham

C2/F6C4: 20 3F FA     JSR $FA3F       ; set color add/sub data (add bg1 and bg2, affect sprites)
C2/F6C7: A9 08        LDA #$08        ; 8 frame delay between subsprites
C2/F6C9: 85 26        STA $26
C2/F6CB: A9 02        LDA #$02        ; make 2 copies
C2/F6CD: 20 F8 F4     JSR $F4F8       ; duplicate sprite
C2/F6D0: A9 03        LDA #$03
C2/F6D2: 4C E6 F6     JMP $F6E6       ; set number of subsprites to 3
  Find
Quote  



Messages In This Thread
Spell Graphics Document - by Zeemis - 03-02-2011, 06:11 PM
RE: Spell Graphics Document - by Gi Nattak - 03-02-2011, 06:31 PM
RE: Spell Graphics Document - by Zeemis - 03-02-2011, 06:52 PM
RE: Spell Graphics Document - by Gi Nattak - 03-02-2011, 07:12 PM
RE: Spell Graphics Document - by Zeemis - 03-02-2011, 07:50 PM
RE: Spell Graphics Document - by DjinnAndTonic - 03-02-2011, 09:33 PM
RE: Spell Graphics Document - by Zeemis - 03-02-2011, 11:31 PM
RE: Spell Graphics Document - by DjinnAndTonic - 03-03-2011, 12:41 AM
RE: Spell Graphics Document - by Zeemis - 03-03-2011, 03:33 AM
RE: Spell Graphics Document - by madsiur - 01-20-2013, 01:48 PM
RE: Spell Graphics Document - by madsiur - 02-01-2013, 09:43 PM
RE: Spell Graphics Document - by Zeemis - 02-01-2013, 11:49 PM
RE: Spell Graphics Document - by madsiur - 06-21-2015, 04:48 PM
RE: Spell Graphics Document - by sleepydude - 09-11-2015, 07:22 PM
RE: Spell Graphics Document - by Everything - 09-19-2015, 11:07 AM
RE: Spell Graphics Document - by sleepydude - 09-21-2015, 05:14 PM
RE: Spell Graphics Document - by DrakeyC - 10-27-2022, 01:34 PM
RE: Spell Graphics Document - by Everything - 10-27-2022, 07:25 PM
RE: Spell Graphics Document - by DrakeyC - 10-27-2022, 09:52 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite