Prev: 43012 Up: Map Next: 43071
43031: Print UDG
Used by the routines at PrintSpriteTiles and DrawRoom.
Prints one UDG at the current screen position, without writing an attribute. The colour versions are PrintColourCharacter and GoldfishGame_PrintColourUDG.
Input
A Sprite ID
Point HL' at this character's pixels and DE' at the current screen cell.
PrintUDG 43031 EXX Switch to the shadow registers.
43032 LD E,A DE'=the character code*8.
43033 LD D,0
43035 SLA E
43037 RL D
43039 SLA E
43041 RL D
43043 SLA E
43045 RL D
43047 LD HL,(23606) HL'=*CHARS+DE'.
43050 ADD HL,DE
43051 LD DE,(23684) Advance *DF_CC and leave DE' on the cell just claimed.
43055 INC DE
43056 LD (23684),DE
43060 DEC DE
Copy the eight pixel rows into the screen buffer.
43061 LD B,8 B'=8.
PrintUDG_Loop 43063 LD A,(HL) Copy one pixel row and move down one screen line.
43064 LD (DE),A
43065 INC HL
43066 INC D
43067 DJNZ PrintUDG_Loop Decrease the row counter and loop back to PrintUDG_Loop until all 8 rows are written.
43069 EXX Switch back to the normal registers.
43070 RET Return.
Prev: 43012 Up: Map Next: 43071