Prev: 39584 Up: Map Next: 39682
39629: Turn: Report A Character
Used by the routine at Turn_ApplyTheSavedMatch.
Prints a line about another character in this place.
TurnReportACharacter 39629 CP 255 Return if the object id is 255.
39631 RET Z
39632 AND A See whether the object id is zero.
39633 RET Z Return if the result is zero.
39634 LD B,A Return if the turn phase is 2.
39635 LD A,(38924)
39638 CP 2
39640 RET Z
39641 LD A,B Use the result again.
39642 CALL ObjectFirstLocation Call ObjectFirstLocation to get object first location.
39645 LD C,A Return if the byte at HL equals this object's location.
39646 CP (HL)
39647 RET Z
39648 LD A,(46837) Read *46837.
39651 CP C Return unless *46837 matches C.
39652 RET NZ
39653 LD A,(39900) Return if the flag at Object_MoveContents is zero.
39656 AND A
39657 RET Z
39658 LD A,1 Write 1 (day) to *NightDay.
39660 LD (46850),A
39663 PUSH DE Point HL at the address in DE and take B into A.
39664 POP HL
39665 LD A,B
Find the object's record.
39666 CALL LocateObject Call LocateObject to locate object.
39669 PUSH DE Step the pointer on by 8 bytes.
39670 LD DE,8
39673 ADD IX,DE
39675 POP DE Restore DE from the stack, save the name pointer, and call PrintMessage to print the message.
39676 PUSH IX
Print the message at HL.
39678 CALL PrintMessage
39681 RET Return.
Prev: 39584 Up: Map Next: 39682