Routines |
Prev: DCD5 | Up: Map | Next: DD5C |
|
||||||||
Draws the scroll arrow (called from E641), the spell 'charge' icons (called from E6FA) or the energy bar (called from E76E)
|
||||||||
DD24 | LD HL,($EB51) | Get graphics address pointer from 97C3 | ||||||
DD27 | LD A,(HL) | Get the graphics address pointer low byte for the arrow (AFA6), the scroll charge icons (AEE7), or the energy bar (AEF3) | ||||||
DD28 | INC HL | High byte of the graphics address pointer | ||||||
DD29 | LD H,(HL) | |||||||
DD2A | LD L,A | ...HL register pair now contains the graphics address pointer for the relevant graphic | ||||||
DD2B | LD C,(HL) | Number of tiles that make up the graphic | ||||||
DD2C | INC HL | Move graphics address pointer along to start of first tile graphic | ||||||
DD2D | INC HL | |||||||
DD2E | INC HL | |||||||
DD2F | LD B,(HL) | Number of bytes in the graphics tile to draw | ||||||
DD30 | INC HL | Move pointer to start of tile graphics | ||||||
DD31 | LD ($EADE),DE | Store screen display address position | ||||||
Draw graphic tile on screen
|
||||||||
DD35 | LD A,(HL) | Copy graphic byte onto screen: | ||||||
DD36 | LD (DE),A | |||||||
DD37 | INC HL | Move to next graphic byte | ||||||
DD38 | LD A,D | Get pixel row | ||||||
DD39 | AND $07 | |||||||
DD3B | INC A | Move down to next pixel row | ||||||
DD3C | CP $08 | Are we crossing a pixel/character boundary? | ||||||
DD3E | JR C,$DD50 | ...If not, move down 1 pixel row and continue drawing the graphic | ||||||
DD40 | LD A,D | ...If so, recalculate screen display address. Get high byte of screen address | ||||||
DD41 | AND $F8 | Reset the low 3 bits (pixel row number) to zero | ||||||
DD43 | LD D,A | |||||||
DD44 | LD A,E | Get the low byte of the screen address | ||||||
DD45 | ADD A,$20 | Increment column by 32 to move down to next screen row | ||||||
DD47 | LD E,A | |||||||
DD48 | JR NC,$DD51 | Crossing a 1/3 screen boundary? ...If not, skip next 3 instructions | ||||||
DD4A | LD A,D | ...If so, adjust high byte of screen address accordingly | ||||||
DD4B | ADD A,$08 | |||||||
DD4D | LD D,A | Store correct screen address high byte back in D register | ||||||
DD4E | JR $DD51 | |||||||
DD50 | INC D | Move down 1 pixel row | ||||||
DD51 | DJNZ $DD35 | Repeat for all pixel rows of this graphics tile | ||||||
Continue to draw the remaining tiles in the graphic
|
||||||||
DD53 | LD DE,($EADE) | Retrieve screen display address | ||||||
DD57 | INC E | Move right one character square | ||||||
DD58 | DEC C | Decrement tile graphic counter | ||||||
DD59 | JR NZ,$DD2D | If there are tiles left in the graphic, draw the next one. | ||||||
DD5B | RET |
Prev: DCD5 | Up: Map | Next: DD5C |