Users browsing this thread: 1 Guest(s)
ASM Requests
08-21-2014, 10:35 PM
(This post was last modified: 08-21-2014, 10:57 PM by GrayShadows.)
Spell learn rate showing up on weapons: GO!
I've been wanting to solve this for a while anyway, so this was the perfect excuse. This code is completely in-line, by virtue of rendering the existing code slightly more efficient. (The efficiency wasn't even my idea -- it's mentioned in the disassembly!)
ETA: WAIT A MOMENT. Had a brain-fart. If SwdTech isn't available, it'll bypass the spell-learn-rate code... One moment, new code forthcoming.
ETA2: Aaand fixed, and it's a byte shorter. Go me.
Code:
hirom
;header
org $C3875D
LDX $2134
LDA $D85013,X
BPL Check2hand
LDY #$8E30 ; position of and word 'Runic'
JSR $02F9
Check2hand:
LDX $2134
LDA $D85013,X
AND #$40
BEQ CheckBushido
LDY #$8E38 ; position of and word '2-hand'
JSR $02F9
CheckBushido:
LDX $2134
LDA $D85013,X
AND #$02
BEQ CheckSpell
LDY #$8E26 ; position of and word 'SwdTech'
JSR $02F9
CheckSpell:
JMP $87C7 ; jump to 'print spell name/rate'
org $C38e26
db $AF, $81 ; adjust 'SwdTech' up one row
org $C38E30
db $2F, $82 ; adjust 'Runic' up one row
org $C38E38
db $AF, $82 ; adjust '2-hand' up one row
I've been wanting to solve this for a while anyway, so this was the perfect excuse. This code is completely in-line, by virtue of rendering the existing code slightly more efficient. (The efficiency wasn't even my idea -- it's mentioned in the disassembly!)
ETA: WAIT A MOMENT. Had a brain-fart. If SwdTech isn't available, it'll bypass the spell-learn-rate code... One moment, new code forthcoming.
ETA2: Aaand fixed, and it's a byte shorter. Go me.
The following 2 users say Thank You to GrayShadows for this post:
• Gi Nattak (08-21-2014), Warrax (09-18-2017)
• Gi Nattak (08-21-2014), Warrax (09-18-2017)
« Next Oldest | Next Newest »
|
||||
Users browsing this thread: 1 Guest(s)