Users browsing this thread: 1 Guest(s)
Newbie Still Doesn't Understand Code

#21
Posts: 200
Threads: 1
Thanks Received: 10
Thanks Given: 0
Joined: Oct 2015
Reputation: 18
Status
None
the first pass is reading from a list of spells known by a character.  it starts at 7E/1A6E for Character 0, and also exists outside of battle.

the second pass is reading from a character's in-battle menu.  the addresses of the 4 party members' menus are read from C2/2616, and saved in $302C,index.

so the answer is that FFh means different things in the two structures.  as a general rule, FFh will mean null in a menu.  in the first structure (which has the learn %), it means the spell is already fully learned.  the special value is used in place of 100 because it's quicker/smaller to check the Zero Flag than do "cmp #$64" everywhere.  also, there's another special value of 80h, which is used by end battle code to represent "just learned".

after the first quoted code, the game does some more processing using a couple intermediate/temporary RAM structures, and eventually saves the spell ID and other information to the menu at C2/5651.

i will give C2/55A1 a comment matching C2/6055.
Quote  
[-] The following 1 user says Thank You to assassin for this post:
  • Turbotastic (10-19-2016)



Messages In This Thread
RE: Newbie Still Doesn't Understand Code - by dn - 09-21-2016, 12:06 PM
RE: Newbie Still Doesn't Understand Code - by assassin - 10-18-2016, 10:29 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite