The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.3.33 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




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

#1
Posts: 89
Threads: 11
Thanks Received: 3
Thanks Given: 1
Joined: Dec 2015
Reputation: 3
Status
Debrave
I was looking at the C3 dissassembly and when looking at the code to draw spells for the magic menu, I noticed this.

Code:
C3/4FE4:    20A250      JSR $50A2      (get spells learned amount)
C3/4FE7:    C9FF        CMP #$FF
C3/4FE9:    D02F        BNE $501A      (branch if spell is already learned?)

I'm relying on the comments because I don't understand everything...but is the commentary wrong in this case? The part where it's branching (501A) to is the "blanking out" part. However, there's already a check for not knowing a spell at all prior to this, and this check is for if something is NOT equal to something (what BNE is, essentially). Is 4FE9 just redudnant code or am I terribly misunderstanding what that is checking for?
  Find
Quote  



Messages In This Thread
Newbie Still Doesn't Understand Code - by Turbotastic - 09-21-2016, 11:04 AM
RE: Newbie Still Doesn't Understand Code - by dn - 09-21-2016, 12:06 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite