Prev: AE6A Up: Map Next: AEA9
AE7F: Save Text Pointer
Remembers the text pointer so the message can be continued afterwards.
SaveTextPointer AE7F LD HL,($A02B) Copy the word at ActiveTextPointer into the word at SavedTextPointer and keep D.
AE82 LD ($A029),HL
AE85 LD A,D
AE86 LD ($A02D),A Store A at SavedSourceByte.
AE89 LD A,(HL) Take the saved text pointer and start its length at zero.
AE8A LD D,A
AE8B LD BC,$0000
AE8E INC HL Move past this byte and go to SaveTextPointer_Next if it is E0.
AE8F CP $E0
AE91 JR Z,SaveTextPointer_Next
AE93 CP $F0 Go to SaveTextPointer_Next if the token code is F0.
AE95 JR Z,SaveTextPointer_Next
AE97 CP $90 Go to SaveTextPointer_Next if it is 90.
AE99 JR Z,SaveTextPointer_Next
AE9B CP $80 Go to SaveTextPointer_RecordObjectProcessing if the token code is at least 80.
AE9D JR NC,SaveTextPointer_RecordObjectProcessing
SaveTextPointer_Next AE9F LD A,(HL) Read the next text pair and step past it.
AEA0 LD B,A
AEA1 INC HL
AEA2 LD C,(HL)
AEA3 INC HL
SaveTextPointer_RecordObjectProcessing AEA4 LD ($A02B),HL Store HL in the word at ActiveTextPointer.
AEA7 LD A,D Read the high byte of the source.
AEA8 RET Return.
View the equivalent code in;
Prev: AE6A Up: Map Next: AEA9