Prev: 42189 Up: Map Next: 42267
42208: Leave Success For The Script
Compares the following fields and records a match when they agree.
CompareFollowingFields 42208 PUSH DE Keep the schedule entry, then call ReadScriptPosition to compare location data.
42209 PUSH HL
42210 PUSH IY
42212 CALL ReadScriptPosition
42215 JR NZ,CompareFollowingFields_0 Go to CompareFollowingFields_0 if the script position does not match.
42217 LD A,1 Take 1 store it at LocationMatchFlag and call ReadScriptPosition to compare location data.
42219 LD (41006),A
42222 CALL ReadScriptPosition
42225 JR NZ,CompareFollowingFields_Next Go to CompareFollowingFields_Next if the script position does not match.
42227 CALL ReadScriptPosition Go to CompareFollowingFields_0 if this field matches.
42230 LD A,0
42232 JR Z,CompareFollowingFields_0
CompareFollowingFields_Next 42234 POP IY Restore the schedule entry and the pointer from the stack, keeping a copy of each there.
42236 POP HL
42237 PUSH HL
42238 PUSH IY
42240 LD DE,4 Take an offset of 0004.
42243 ADD IY,DE Step to the next schedule entry and step on two places, then call ReadScriptPosition to compare location data.
42245 INC HL
42246 INC HL
42247 CALL ReadScriptPosition
42250 JR NZ,CompareFollowingFields_0 Go to CompareFollowingFields_0 if the script position does not match.
42252 LD DE,65532 Step the schedule entry back by 4 and call ReadScriptPosition to compare the location data.
42255 ADD IY,DE
42257 CALL ReadScriptPosition
42260 LD A,1 Take 1.
This entry point is used by the routine at CompareLocationData.
CompareFollowingFields_0 42262 POP IY Restore the saved schedule entry, the saved pointer and the saved source from the stack.
42264 POP HL
42265 POP DE
42266 RET Return.
View the equivalent code in;
Prev: 42189 Up: Map Next: 42267