Prev: 58392 Up: Map Next: 58735
58658: DRAW_TILES
Used by the routine at L58392.
DRAW_TILES 58658 LD A,(59785) Load A with L59785
58661 AND A
58662 JP Z,DRAW_TILES_0
58665 DEC A
58666 LD (59785),A Store A in L59785
58669 LD DE,36832 Point DE at TILE_MAP_PRECURSOR
58672 LD (IX+0),127
58676 INC IX
58678 RET
DRAW_TILES_0 58679 LD DE,(59783) Load DE with TILE_MAP_ADDR
58683 LD A,(DE) Load A with data referenced by TILE_MAP_ADDR
58684 INC DE Increment DE
58685 LD (59783),DE Store updated address at TILE_MAP_ADDR
58689 BIT 7,A
58691 JR Z,GET_ADDRESS_OF_TILE_GRAPHIC
58693 AND 127 We only want the first 7 bits of A
58695 CP 127
58697 JR NZ,DRAW_TILES_1
58699 INC A
DRAW_TILES_1 58700 INC A
58701 LD (59785),A Store A in L59785
58704 JP DRAW_TILES
GET_ADDRESS_OF_TILE_GRAPHIC 58707 PUSH HL
58708 LD HL,32768 Point HL at TILE_GFX
58711 LD D,A
58712 LD E,0
58714 SRL D
58716 RR E
58718 SRL D
58720 RR E
58722 SRL D
58724 RR E
58726 ADD HL,DE
58727 EX DE,HL
58728 POP HL
58729 LD (IX+0),A
58732 INC IX
58734 RET
Prev: 58392 Up: Map Next: 58735