07-06-2012, 07:40 AM
(07-05-2012, 10:33 PM)Synchysi Wrote: I'm seeing Gogo's code jump to a different place, then come back to that code block. What you replaced seems to be shared, while the code exclusive to Gogo is lower in the bank.
Code:C3/50AC: F017 BEQ $50C5 (Branch if it's Gogo)
jumps to...
Code:C3/50C5: 64E1 STZ $E1 ($E1 = #$00)
C3/50C7: 7B TDC (A = #$0000)
C3/50C8: A5E1 LDA $E1 (A = $E1)
C3/50CA: C528 CMP $28
C3/50CC: F014 BEQ $50E2
C3/50CE: 0A ASL A
C3/50CF: AA TAX
C3/50D0: B46D LDY $6D,X
C3/50D2: F00E BEQ $50E2
C3/50D4: B90000 LDA $0000,Y (load character ID)
C3/50D7: C90C CMP #$0C
C3/50D9: B007 BCS $50E2 (Branch if it's Gogo or higher)
C3/50DB: 20AE50 JSR $50AE
C3/50DE: C9FF CMP #$FF
C3/50E0: F009 BEQ $50EB
C3/50E2: E6E1 INC $E1
C3/50E4: A5E1 LDA $E1
C3/50E6: C904 CMP #$04
C3/50E8: D0DD BNE $50C7
C3/50EA: 7B TDC
C3/50EB: 60 RTS
That then returns to the JSR it came from, wherever that may be. What you could do is change the BEQ above to JSR, then start your custom code at $C350C5.
I took everything from C0C5 and up and moved it down a little to make the room, but, like you said, if something jumps into the middle of the block instead of the beginning, then that could be causing some display inconsistencies.
(07-05-2012, 10:33 PM)Synchysi Wrote: How is you're trying to go about doing that? If I knew what you had in mind I might be able to help a bit better.Instead of using the actor # to determine the spell list offset, I want to use the remainder of the actor number divided by 12, which should only produce numbers 0-11. So actors 0 through 11(0B) use their own magic as always, actor 12(0C) would used the same magic list as actor 0 (0C/0C has a remainder of 0), actor 13(0D) would use the same magic list as actor 1 (0D/0C has a remainder of 1), etc... this should make every actor reuse the same twelve lists over and over again allowing me to put magic on Leo, for instance, and have it work, even if it is shared.