Prev: C093 Up: Map Next: C115
C0B1: Draws a furniture tile as a double height bitmap.
Input
DE Position (Y,X) of bitmap.
A Tile index.
C Attribute to use.
Output
Tile_BlitDoubleHeight C0B1 PUSH AF
C0B2 PUSH HL
C0B3 PUSH BC
C0B4 PUSH DE
C0B5 EX DE,HL
C0B6 PUSH HL starting with the attributes addres.
C0B7 LD D,$58
C0B9 LD E,L Offset address for X pos.
C0BA LD L,H
C0BB LD H,$00 Add Y pos (*$20 for columns).
C0BD ADD HL,HL
C0BE ADD HL,HL
C0BF ADD HL,HL
C0C0 ADD HL,HL
C0C1 ADD HL,HL
C0C2 ADD HL,DE
C0C3 LD (HL),C Set attribute colour.
C0C4 PUSH DE
C0C5 LD DE,$0020
C0C8 ADD HL,DE Next row down.
C0C9 POP DE Set attribute colour.
C0CA LD (HL),C
C0CB POP HL Get position (Y,X)
C0CC LD L,H Y position.
C0CD LD D,$00
C0CF LD H,D
C0D0 LD C,E X position.
C0D1 LD B,D
C0D2 ADD HL,HL Convert Y * $10 into a row address on the DF table.
C0D3 ADD HL,HL
C0D4 ADD HL,HL
C0D5 ADD HL,HL
C0D6 LD DE,DF_lookup
C0D9 ADD HL,DE
C0DA PUSH HL
C0DB POP IX
C0DD LD L,A Get tile index and convert into address of bitmap.
C0DE LD H,$00
C0E0 ADD HL,HL
C0E1 ADD HL,HL
C0E2 ADD HL,HL
C0E3 LD DE,Bmp_Tiles
C0E6 ADD HL,DE
C0E7 EX DE,HL
C0E8 DEC BC DF table holds addresses from $4002 (Third column in display). Decrease BC by two as an offset the row address in order to use the first two columns in the Display.
C0E9 DEC BC
C0EA LD A,$08 Number of rows in a tile.
Tile_BlitDoubleHeight_0 C0EC LD L,(IX+$00) Get DF address based on row number.
C0EF LD H,(IX+$01)
C0F2 ADD HL,BC
C0F3 INC IX Move to next row in table.
C0F5 INC IX
C0F7 EX DE,HL
C0F8 LDI Blit one row of bitmap to screen.
C0FA EX DE,HL
C0FB INC BC Put offset back to same before last blit.
C0FC LD L,(IX+$00) Get next row down.
C0FF LD H,(IX+$01)
C102 ADD HL,BC
C103 INC IX Move onto next row in table.
C105 INC IX
C107 DEC DE Go back to previous row of bitmap blitted and blit again.
C108 EX DE,HL
C109 LDI
C10B EX DE,HL
C10C INC BC Address column offset again.
C10D DEC A Next bitmap row.
C10E JR NZ,Tile_BlitDoubleHeight_0
C110 POP DE
C111 POP BC
C112 POP HL
C113 POP AF
C114 RET
Prev: C093 Up: Map Next: C115