Prev: DAA3 Up: Map Next: DDF9
DAAF: Draw Wide Entity Sprite
Draws a 3-byte-wide, 16-row entity sprite to the screen by toggling each row's pixel data against the existing screen content. Applying this routine twice draws and then erases a sprite, leaving the screen unchanged. Row screen addresses come from the row address lookup table at Sprite_Pixel_Data_Table, offset by the entity's column position. Rows outside the play area (10 top / B0 bottom) are skipped. Called to draw and erase entity sprites during normal gameplay and death animations.
Input
HL Entity record pointer
Read the sprite data pointer and compute the screen address origin.
Draw_Wide_Entity_Sprite_Pixels_Only DAAF LD B,H Stash the entity record pointer in BC.
DAB0 LD C,L
DAB1 LD E,(HL) Read the entity type, double it as an index into Sprite_Pixel_Data_Table, and load the sprite data pointer into DE.
DAB2 SLA E
DAB4 LD D,$00
DAB6 LD HL,$C60C
DAB9 ADD HL,DE
DABA LD E,(HL)
DABB INC HL
DABC LD D,(HL)
DABD LD H,B Restore the entity record pointer and advance to the Y field.
DABE LD L,C
DABF INC HL
DAC0 LD B,$46 Load row stride 46 into B, read the entity Y position, and save it in D'.
DAC2 LD C,(HL)
DAC3 LD A,C
DAC4 EXX
DAC5 LD D,A
DAC6 EXX
DAC7 SLA C Scale the Y position into the row address table range.
DAC9 RL B
DACB PUSH BC Stash the scaled Y and row stride on the stack.
DACC INC HL Read the X position and derive the column address via three-step rotation.
DACD LD A,(HL)
DACE AND A
DACF LD HL,$0000
DAD2 RRA
DAD3 RR L
DAD5 RRA
DAD6 RR L
DAD8 RRA
DAD9 RR L
DADB EXX Save the sub-column pixel offset in C'.
DADC LD C,A
DADD EXX
DADE LD A,L Adjust the column address to align with two-byte row table entries.
DADF RRCA
DAE0 ADD A,L
DAE1 LD L,A
DAE2 LD A,H
DAE3 ADC A,$00
DAE5 LD H,A
DAE6 ADD HL,DE Combine the column address with the sprite data pointer and move the result to BC.
DAE7 LD B,H
DAE8 LD C,L
DAE9 POP HL Restore the scaled Y position from the stack.
DAEA EXX Retrieve the entity Y position from D'.
DAEB LD A,D
DAEC EXX
DAED CP $B0 Return if the entity is below the play area.
DAEF RET NC
Row 0: skip if above the play area, compute screen address, draw.
DAF0 CP $10 Skip row 0 if the entity is above the play area.
DAF2 JR C,Draw_Wide_Entity_Sprite_Pixels_Only_Row1
DAF4 EXX Load the column pixel offset from C'.
DAF5 LD A,C
DAF6 EXX
DAF7 ADD A,(HL) Add the column offset to the row address and load the screen address into DE.
DAF8 LD E,A
DAF9 INC HL
DAFA LD D,(HL)
DAFB INC HL
DAFC EX DE,HL Exchange DE and HL to point at the screen address.
DAFD LD A,(BC) Toggle the sprite row's three pixel bytes onto the screen.
DAFE XOR (HL)
DAFF LD (HL),A
DB00 INC BC
DB01 INC HL
DB02 LD A,(BC)
DB03 XOR (HL)
DB04 LD (HL),A
DB05 INC BC
DB06 INC HL
DB07 LD A,(BC)
DB08 XOR (HL)
DB09 LD (HL),A
DB0A EX DE,HL Restore HL to the row address table pointer.
DB0B DEC BC Step the sprite data pointer back two bytes to the row start.
DB0C DEC BC
Row 1: advance sprite data, step Y, walk address table, draw.
Draw_Wide_Entity_Sprite_Pixels_Only_Row1 DB0D INC BC Advance the sprite data pointer to row 1.
DB0E INC BC
DB0F INC BC
DB10 EXX Advance Y by the row stride and decrement the step count.
DB11 LD A,B
DB12 ADD A,D
DB13 LD D,A
DB14 LD A,B
DB15 EXX
DB16 DEC A
Draw_Wide_Entity_Sprite_Pixels_Only_Row1_Step DB17 INC HL Step HL through the row address table.
DB18 INC HL
DB19 DEC A
DB1A JR NZ,Draw_Wide_Entity_Sprite_Pixels_Only_Row1_Step
DB1C EXX Retrieve Y; return if below the play area.
DB1D LD A,D
DB1E EXX
DB1F CP $B0
DB21 RET NC
DB22 CP $10 Skip row 1 if above the play area.
DB24 JR C,Draw_Wide_Entity_Sprite_Pixels_Only_Row2
DB26 EXX Load the column offset and compute the screen address.
DB27 LD A,C
DB28 EXX
DB29 ADD A,(HL)
DB2A LD E,A
DB2B INC HL
DB2C LD D,(HL)
DB2D INC HL
DB2E EX DE,HL
DB2F LD A,(BC) Toggle the sprite row's three pixel bytes onto the screen.
DB30 XOR (HL)
DB31 LD (HL),A
DB32 INC BC
DB33 INC HL
DB34 LD A,(BC)
DB35 XOR (HL)
DB36 LD (HL),A
DB37 INC BC
DB38 INC HL
DB39 LD A,(BC)
DB3A XOR (HL)
DB3B LD (HL),A
DB3C EX DE,HL Restore the row table pointer and step back the sprite data.
DB3D DEC BC
DB3E DEC BC
Row 2: advance sprite data, step Y, walk address table, draw.
Draw_Wide_Entity_Sprite_Pixels_Only_Row2 DB3F INC BC Advance the sprite data pointer to row 2.
DB40 INC BC
DB41 INC BC
DB42 EXX Advance Y by the row stride and decrement the step count.
DB43 LD A,B
DB44 ADD A,D
DB45 LD D,A
DB46 LD A,B
DB47 EXX
DB48 DEC A
Draw_Wide_Entity_Sprite_Pixels_Only_Row2_Step DB49 INC HL Step HL through the row address table.
DB4A INC HL
DB4B DEC A
DB4C JR NZ,Draw_Wide_Entity_Sprite_Pixels_Only_Row2_Step
DB4E EXX Retrieve Y; return if below the play area.
DB4F LD A,D
DB50 EXX
DB51 CP $B0
DB53 RET NC
DB54 CP $10 Skip row 2 if above the play area.
DB56 JR C,Draw_Wide_Entity_Sprite_Pixels_Only_Row3
DB58 EXX Load the column offset and compute the screen address.
DB59 LD A,C
DB5A EXX
DB5B ADD A,(HL)
DB5C LD E,A
DB5D INC HL
DB5E LD D,(HL)
DB5F INC HL
DB60 EX DE,HL
DB61 LD A,(BC) Toggle the sprite row's three pixel bytes onto the screen.
DB62 XOR (HL)
DB63 LD (HL),A
DB64 INC BC
DB65 INC HL
DB66 LD A,(BC)
DB67 XOR (HL)
DB68 LD (HL),A
DB69 INC BC
DB6A INC HL
DB6B LD A,(BC)
DB6C XOR (HL)
DB6D LD (HL),A
DB6E EX DE,HL Restore the row table pointer and step back the sprite data.
DB6F DEC BC
DB70 DEC BC
Row 3: advance sprite data, step Y, walk address table, draw.
Draw_Wide_Entity_Sprite_Pixels_Only_Row3 DB71 INC BC Advance the sprite data pointer to row 3.
DB72 INC BC
DB73 INC BC
DB74 EXX Advance Y by the row stride and decrement the step count.
DB75 LD A,B
DB76 ADD A,D
DB77 LD D,A
DB78 LD A,B
DB79 EXX
DB7A DEC A
Draw_Wide_Entity_Sprite_Pixels_Only_Row3_Step DB7B INC HL Step HL through the row address table.
DB7C INC HL
DB7D DEC A
DB7E JR NZ,Draw_Wide_Entity_Sprite_Pixels_Only_Row3_Step
DB80 EXX Retrieve Y; return if below the play area.
DB81 LD A,D
DB82 EXX
DB83 CP $B0
DB85 RET NC
DB86 CP $10 Skip row 3 if above the play area.
DB88 JR C,Draw_Wide_Entity_Sprite_Pixels_Only_Row4
DB8A EXX Load the column offset and compute the screen address.
DB8B LD A,C
DB8C EXX
DB8D ADD A,(HL)
DB8E LD E,A
DB8F INC HL
DB90 LD D,(HL)
DB91 INC HL
DB92 EX DE,HL
DB93 LD A,(BC) Toggle the sprite row's three pixel bytes onto the screen.
DB94 XOR (HL)
DB95 LD (HL),A
DB96 INC BC
DB97 INC HL
DB98 LD A,(BC)
DB99 XOR (HL)
DB9A LD (HL),A
DB9B INC BC
DB9C INC HL
DB9D LD A,(BC)
DB9E XOR (HL)
DB9F LD (HL),A
DBA0 EX DE,HL Restore the row table pointer and step back the sprite data.
DBA1 DEC BC
DBA2 DEC BC
Row 4: advance sprite data, step Y, walk address table, draw.
Draw_Wide_Entity_Sprite_Pixels_Only_Row4 DBA3 INC BC Advance the sprite data pointer to row 4.
DBA4 INC BC
DBA5 INC BC
DBA6 EXX Advance Y by the row stride and decrement the step count.
DBA7 LD A,B
DBA8 ADD A,D
DBA9 LD D,A
DBAA LD A,B
DBAB EXX
DBAC DEC A
Draw_Wide_Entity_Sprite_Pixels_Only_Row4_Step DBAD INC HL Step HL through the row address table.
DBAE INC HL
DBAF DEC A
DBB0 JR NZ,Draw_Wide_Entity_Sprite_Pixels_Only_Row4_Step
DBB2 EXX Retrieve Y; return if below the play area.
DBB3 LD A,D
DBB4 EXX
DBB5 CP $B0
DBB7 RET NC
DBB8 CP $10 Skip row 4 if above the play area.
DBBA JR C,Draw_Wide_Entity_Sprite_Pixels_Only_Row5
DBBC EXX Load the column offset and compute the screen address.
DBBD LD A,C
DBBE EXX
DBBF ADD A,(HL)
DBC0 LD E,A
DBC1 INC HL
DBC2 LD D,(HL)
DBC3 INC HL
DBC4 EX DE,HL
DBC5 LD A,(BC) Toggle the sprite row's three pixel bytes onto the screen.
DBC6 XOR (HL)
DBC7 LD (HL),A
DBC8 INC BC
DBC9 INC HL
DBCA LD A,(BC)
DBCB XOR (HL)
DBCC LD (HL),A
DBCD INC BC
DBCE INC HL
DBCF LD A,(BC)
DBD0 XOR (HL)
DBD1 LD (HL),A
DBD2 EX DE,HL Restore the row table pointer and step back the sprite data.
DBD3 DEC BC
DBD4 DEC BC
Row 5: advance sprite data, step Y, walk address table, draw.
Draw_Wide_Entity_Sprite_Pixels_Only_Row5 DBD5 INC BC Advance the sprite data pointer to row 5.
DBD6 INC BC
DBD7 INC BC
DBD8 EXX Advance Y by the row stride and decrement the step count.
DBD9 LD A,B
DBDA ADD A,D
DBDB LD D,A
DBDC LD A,B
DBDD EXX
DBDE DEC A
Draw_Wide_Entity_Sprite_Pixels_Only_Row5_Step DBDF INC HL Step HL through the row address table.
DBE0 INC HL
DBE1 DEC A
DBE2 JR NZ,Draw_Wide_Entity_Sprite_Pixels_Only_Row5_Step
DBE4 EXX Retrieve Y; return if below the play area.
DBE5 LD A,D
DBE6 EXX
DBE7 CP $B0
DBE9 RET NC
DBEA CP $10 Skip row 5 if above the play area.
DBEC JR C,Draw_Wide_Entity_Sprite_Pixels_Only_Row6
DBEE EXX Load the column offset and compute the screen address.
DBEF LD A,C
DBF0 EXX
DBF1 ADD A,(HL)
DBF2 LD E,A
DBF3 INC HL
DBF4 LD D,(HL)
DBF5 INC HL
DBF6 EX DE,HL
DBF7 LD A,(BC) Toggle the sprite row's three pixel bytes onto the screen.
DBF8 XOR (HL)
DBF9 LD (HL),A
DBFA INC BC
DBFB INC HL
DBFC LD A,(BC)
DBFD XOR (HL)
DBFE LD (HL),A
DBFF INC BC
DC00 INC HL
DC01 LD A,(BC)
DC02 XOR (HL)
DC03 LD (HL),A
DC04 EX DE,HL Restore the row table pointer and step back the sprite data.
DC05 DEC BC
DC06 DEC BC
Row 6: advance sprite data, step Y, walk address table, draw.
Draw_Wide_Entity_Sprite_Pixels_Only_Row6 DC07 INC BC Advance the sprite data pointer to row 6.
DC08 INC BC
DC09 INC BC
DC0A EXX Advance Y by the row stride and decrement the step count.
DC0B LD A,B
DC0C ADD A,D
DC0D LD D,A
DC0E LD A,B
DC0F EXX
DC10 DEC A
Draw_Wide_Entity_Sprite_Pixels_Only_Row6_Step DC11 INC HL Step HL through the row address table.
DC12 INC HL
DC13 DEC A
DC14 JR NZ,Draw_Wide_Entity_Sprite_Pixels_Only_Row6_Step
DC16 EXX Retrieve Y; return if below the play area.
DC17 LD A,D
DC18 EXX
DC19 CP $B0
DC1B RET NC
DC1C CP $10 Skip row 6 if above the play area.
DC1E JR C,Draw_Wide_Entity_Sprite_Pixels_Only_Row7
DC20 EXX Load the column offset and compute the screen address.
DC21 LD A,C
DC22 EXX
DC23 ADD A,(HL)
DC24 LD E,A
DC25 INC HL
DC26 LD D,(HL)
DC27 INC HL
DC28 EX DE,HL
DC29 LD A,(BC) Toggle the sprite row's three pixel bytes onto the screen.
DC2A XOR (HL)
DC2B LD (HL),A
DC2C INC BC
DC2D INC HL
DC2E LD A,(BC)
DC2F XOR (HL)
DC30 LD (HL),A
DC31 INC BC
DC32 INC HL
DC33 LD A,(BC)
DC34 XOR (HL)
DC35 LD (HL),A
DC36 EX DE,HL Restore the row table pointer and step back the sprite data.
DC37 DEC BC
DC38 DEC BC
Row 7: advance sprite data, step Y, walk address table, draw.
Draw_Wide_Entity_Sprite_Pixels_Only_Row7 DC39 INC BC Advance the sprite data pointer to row 7.
DC3A INC BC
DC3B INC BC
DC3C EXX Advance Y by the row stride and decrement the step count.
DC3D LD A,B
DC3E ADD A,D
DC3F LD D,A
DC40 LD A,B
DC41 EXX
DC42 DEC A
Draw_Wide_Entity_Sprite_Pixels_Only_Row7_Step DC43 INC HL Step HL through the row address table.
DC44 INC HL
DC45 DEC A
DC46 JR NZ,Draw_Wide_Entity_Sprite_Pixels_Only_Row7_Step
DC48 EXX Retrieve Y; return if below the play area.
DC49 LD A,D
DC4A EXX
DC4B CP $B0
DC4D RET NC
DC4E CP $10 Skip row 7 if above the play area.
DC50 JR C,Draw_Wide_Entity_Sprite_Pixels_Only_Row8
DC52 EXX Load the column offset and compute the screen address.
DC53 LD A,C
DC54 EXX
DC55 ADD A,(HL)
DC56 LD E,A
DC57 INC HL
DC58 LD D,(HL)
DC59 INC HL
DC5A EX DE,HL
DC5B LD A,(BC) Toggle the sprite row's three pixel bytes onto the screen.
DC5C XOR (HL)
DC5D LD (HL),A
DC5E INC BC
DC5F INC HL
DC60 LD A,(BC)
DC61 XOR (HL)
DC62 LD (HL),A
DC63 INC BC
DC64 INC HL
DC65 LD A,(BC)
DC66 XOR (HL)
DC67 LD (HL),A
DC68 EX DE,HL Restore the row table pointer and step back the sprite data.
DC69 DEC BC
DC6A DEC BC
Row 8: advance sprite data, step Y, walk address table, draw.
Draw_Wide_Entity_Sprite_Pixels_Only_Row8 DC6B INC BC Advance the sprite data pointer to row 8.
DC6C INC BC
DC6D INC BC
DC6E EXX Advance Y by the row stride and decrement the step count.
DC6F LD A,B
DC70 ADD A,D
DC71 LD D,A
DC72 LD A,B
DC73 EXX
DC74 DEC A
Draw_Wide_Entity_Sprite_Pixels_Only_Row8_Step DC75 INC HL Step HL through the row address table.
DC76 INC HL
DC77 DEC A
DC78 JR NZ,Draw_Wide_Entity_Sprite_Pixels_Only_Row8_Step
DC7A EXX Retrieve Y; return if below the play area.
DC7B LD A,D
DC7C EXX
DC7D CP $B0
DC7F RET NC
DC80 CP $10 Skip row 8 if above the play area.
DC82 JR C,Draw_Wide_Entity_Sprite_Pixels_Only_Row9
DC84 EXX Load the column offset and compute the screen address.
DC85 LD A,C
DC86 EXX
DC87 ADD A,(HL)
DC88 LD E,A
DC89 INC HL
DC8A LD D,(HL)
DC8B INC HL
DC8C EX DE,HL
DC8D LD A,(BC) Toggle the sprite row's three pixel bytes onto the screen.
DC8E XOR (HL)
DC8F LD (HL),A
DC90 INC BC
DC91 INC HL
DC92 LD A,(BC)
DC93 XOR (HL)
DC94 LD (HL),A
DC95 INC BC
DC96 INC HL
DC97 LD A,(BC)
DC98 XOR (HL)
DC99 LD (HL),A
DC9A EX DE,HL Restore the row table pointer and step back the sprite data.
DC9B DEC BC
DC9C DEC BC
Row 9: advance sprite data, step Y, walk address table, draw.
Draw_Wide_Entity_Sprite_Pixels_Only_Row9 DC9D INC BC Advance the sprite data pointer to row 9.
DC9E INC BC
DC9F INC BC
DCA0 EXX Advance Y by the row stride and decrement the step count.
DCA1 LD A,B
DCA2 ADD A,D
DCA3 LD D,A
DCA4 LD A,B
DCA5 EXX
DCA6 DEC A
Draw_Wide_Entity_Sprite_Pixels_Only_Row9_Step DCA7 INC HL Step HL through the row address table.
DCA8 INC HL
DCA9 DEC A
DCAA JR NZ,Draw_Wide_Entity_Sprite_Pixels_Only_Row9_Step
DCAC EXX Retrieve Y; return if below the play area.
DCAD LD A,D
DCAE EXX
DCAF CP $B0
DCB1 RET NC
DCB2 CP $10 Skip row 9 if above the play area.
DCB4 JR C,Draw_Wide_Entity_Sprite_Pixels_Only_Row10
DCB6 EXX Load the column offset and compute the screen address.
DCB7 LD A,C
DCB8 EXX
DCB9 ADD A,(HL)
DCBA LD E,A
DCBB INC HL
DCBC LD D,(HL)
DCBD INC HL
DCBE EX DE,HL
DCBF LD A,(BC) Toggle the sprite row's three pixel bytes onto the screen.
DCC0 XOR (HL)
DCC1 LD (HL),A
DCC2 INC BC
DCC3 INC HL
DCC4 LD A,(BC)
DCC5 XOR (HL)
DCC6 LD (HL),A
DCC7 INC BC
DCC8 INC HL
DCC9 LD A,(BC)
DCCA XOR (HL)
DCCB LD (HL),A
DCCC EX DE,HL Restore the row table pointer and step back the sprite data.
DCCD DEC BC
DCCE DEC BC
Row 10: advance sprite data, step Y, walk address table, draw.
Draw_Wide_Entity_Sprite_Pixels_Only_Row10 DCCF INC BC Advance the sprite data pointer to row 10.
DCD0 INC BC
DCD1 INC BC
DCD2 EXX Advance Y by the row stride and decrement the step count.
DCD3 LD A,B
DCD4 ADD A,D
DCD5 LD D,A
DCD6 LD A,B
DCD7 EXX
DCD8 DEC A
Draw_Wide_Entity_Sprite_Pixels_Only_Row10_Step DCD9 INC HL Step HL through the row address table.
DCDA INC HL
DCDB DEC A
DCDC JR NZ,Draw_Wide_Entity_Sprite_Pixels_Only_Row10_Step
DCDE EXX Retrieve Y; return if below the play area.
DCDF LD A,D
DCE0 EXX
DCE1 CP $B0
DCE3 RET NC
DCE4 CP $10 Skip row 10 if above the play area.
DCE6 JR C,Draw_Wide_Entity_Sprite_Pixels_Only_Row11
DCE8 EXX Load the column offset and compute the screen address.
DCE9 LD A,C
DCEA EXX
DCEB ADD A,(HL)
DCEC LD E,A
DCED INC HL
DCEE LD D,(HL)
DCEF INC HL
DCF0 EX DE,HL
DCF1 LD A,(BC) Toggle the sprite row's three pixel bytes onto the screen.
DCF2 XOR (HL)
DCF3 LD (HL),A
DCF4 INC BC
DCF5 INC HL
DCF6 LD A,(BC)
DCF7 XOR (HL)
DCF8 LD (HL),A
DCF9 INC BC
DCFA INC HL
DCFB LD A,(BC)
DCFC XOR (HL)
DCFD LD (HL),A
DCFE EX DE,HL Restore the row table pointer and step back the sprite data.
DCFF DEC BC
DD00 DEC BC
Row 11: advance sprite data, step Y, walk address table, draw.
Draw_Wide_Entity_Sprite_Pixels_Only_Row11 DD01 INC BC Advance the sprite data pointer to row 11.
DD02 INC BC
DD03 INC BC
DD04 EXX Advance Y by the row stride and decrement the step count.
DD05 LD A,B
DD06 ADD A,D
DD07 LD D,A
DD08 LD A,B
DD09 EXX
DD0A DEC A
Draw_Wide_Entity_Sprite_Pixels_Only_Row11_Step DD0B INC HL Step HL through the row address table.
DD0C INC HL
DD0D DEC A
DD0E JR NZ,Draw_Wide_Entity_Sprite_Pixels_Only_Row11_Step
DD10 EXX Retrieve Y; return if below the play area.
DD11 LD A,D
DD12 EXX
DD13 CP $B0
DD15 RET NC
DD16 CP $10 Skip row 11 if above the play area.
DD18 JR C,Draw_Wide_Entity_Sprite_Pixels_Only_Row12
DD1A EXX Load the column offset and compute the screen address.
DD1B LD A,C
DD1C EXX
DD1D ADD A,(HL)
DD1E LD E,A
DD1F INC HL
DD20 LD D,(HL)
DD21 INC HL
DD22 EX DE,HL
DD23 LD A,(BC) Toggle the sprite row's three pixel bytes onto the screen.
DD24 XOR (HL)
DD25 LD (HL),A
DD26 INC BC
DD27 INC HL
DD28 LD A,(BC)
DD29 XOR (HL)
DD2A LD (HL),A
DD2B INC BC
DD2C INC HL
DD2D LD A,(BC)
DD2E XOR (HL)
DD2F LD (HL),A
DD30 EX DE,HL Restore the row table pointer and step back the sprite data.
DD31 DEC BC
DD32 DEC BC
Row 12: advance sprite data, step Y, walk address table, draw.
Draw_Wide_Entity_Sprite_Pixels_Only_Row12 DD33 INC BC Advance the sprite data pointer to row 12.
DD34 INC BC
DD35 INC BC
DD36 EXX Advance Y by the row stride and decrement the step count.
DD37 LD A,B
DD38 ADD A,D
DD39 LD D,A
DD3A LD A,B
DD3B EXX
DD3C DEC A
Draw_Wide_Entity_Sprite_Pixels_Only_Row12_Step DD3D INC HL Step HL through the row address table.
DD3E INC HL
DD3F DEC A
DD40 JR NZ,Draw_Wide_Entity_Sprite_Pixels_Only_Row12_Step
DD42 EXX Retrieve Y; return if below the play area.
DD43 LD A,D
DD44 EXX
DD45 CP $B0
DD47 RET NC
DD48 CP $10 Skip row 12 if above the play area.
DD4A JR C,Draw_Wide_Entity_Sprite_Pixels_Only_Row13
DD4C EXX Load the column offset and compute the screen address.
DD4D LD A,C
DD4E EXX
DD4F ADD A,(HL)
DD50 LD E,A
DD51 INC HL
DD52 LD D,(HL)
DD53 INC HL
DD54 EX DE,HL
DD55 LD A,(BC) Toggle the sprite row's three pixel bytes onto the screen.
DD56 XOR (HL)
DD57 LD (HL),A
DD58 INC BC
DD59 INC HL
DD5A LD A,(BC)
DD5B XOR (HL)
DD5C LD (HL),A
DD5D INC BC
DD5E INC HL
DD5F LD A,(BC)
DD60 XOR (HL)
DD61 LD (HL),A
DD62 EX DE,HL Restore the row table pointer and step back the sprite data.
DD63 DEC BC
DD64 DEC BC
Row 13: advance sprite data, step Y, walk address table, draw.
Draw_Wide_Entity_Sprite_Pixels_Only_Row13 DD65 INC BC Advance the sprite data pointer to row 13.
DD66 INC BC
DD67 INC BC
DD68 EXX Advance Y by the row stride and decrement the step count.
DD69 LD A,B
DD6A ADD A,D
DD6B LD D,A
DD6C LD A,B
DD6D EXX
DD6E DEC A
Draw_Wide_Entity_Sprite_Pixels_Only_Row13_Step DD6F INC HL Step HL through the row address table.
DD70 INC HL
DD71 DEC A
DD72 JR NZ,Draw_Wide_Entity_Sprite_Pixels_Only_Row13_Step
DD74 EXX Retrieve Y; return if below the play area.
DD75 LD A,D
DD76 EXX
DD77 CP $B0
DD79 RET NC
DD7A CP $10 Skip row 13 if above the play area.
DD7C JR C,Draw_Wide_Entity_Sprite_Pixels_Only_Row14
DD7E EXX Load the column offset and compute the screen address.
DD7F LD A,C
DD80 EXX
DD81 ADD A,(HL)
DD82 LD E,A
DD83 INC HL
DD84 LD D,(HL)
DD85 INC HL
DD86 EX DE,HL
DD87 LD A,(BC) Toggle the sprite row's three pixel bytes onto the screen.
DD88 XOR (HL)
DD89 LD (HL),A
DD8A INC BC
DD8B INC HL
DD8C LD A,(BC)
DD8D XOR (HL)
DD8E LD (HL),A
DD8F INC BC
DD90 INC HL
DD91 LD A,(BC)
DD92 XOR (HL)
DD93 LD (HL),A
DD94 EX DE,HL Restore the row table pointer and step back the sprite data.
DD95 DEC BC
DD96 DEC BC
Row 14: advance sprite data, step Y, walk address table, draw.
Draw_Wide_Entity_Sprite_Pixels_Only_Row14 DD97 INC BC Advance the sprite data pointer to row 14.
DD98 INC BC
DD99 INC BC
DD9A EXX Advance Y by the row stride and decrement the step count.
DD9B LD A,B
DD9C ADD A,D
DD9D LD D,A
DD9E LD A,B
DD9F EXX
DDA0 DEC A
Draw_Wide_Entity_Sprite_Pixels_Only_Row14_Step DDA1 INC HL Step HL through the row address table.
DDA2 INC HL
DDA3 DEC A
DDA4 JR NZ,Draw_Wide_Entity_Sprite_Pixels_Only_Row14_Step
DDA6 EXX Retrieve Y; return if below the play area.
DDA7 LD A,D
DDA8 EXX
DDA9 CP $B0
DDAB RET NC
DDAC CP $10 Skip row 14 if above the play area.
DDAE JR C,Draw_Wide_Entity_Sprite_Pixels_Only_Row15
DDB0 EXX Load the column offset and compute the screen address.
DDB1 LD A,C
DDB2 EXX
DDB3 ADD A,(HL)
DDB4 LD E,A
DDB5 INC HL
DDB6 LD D,(HL)
DDB7 INC HL
DDB8 EX DE,HL
DDB9 LD A,(BC) Toggle the sprite row's three pixel bytes onto the screen.
DDBA XOR (HL)
DDBB LD (HL),A
DDBC INC BC
DDBD INC HL
DDBE LD A,(BC)
DDBF XOR (HL)
DDC0 LD (HL),A
DDC1 INC BC
DDC2 INC HL
DDC3 LD A,(BC)
DDC4 XOR (HL)
DDC5 LD (HL),A
DDC6 EX DE,HL Restore the row table pointer and step back the sprite data.
DDC7 DEC BC
DDC8 DEC BC
Row 15: advance sprite data, step Y, walk address table, draw.
Draw_Wide_Entity_Sprite_Pixels_Only_Row15 DDC9 INC BC Advance the sprite data pointer to row 15.
DDCA INC BC
DDCB INC BC
DDCC EXX Advance Y by the row stride and decrement the step count.
DDCD LD A,B
DDCE ADD A,D
DDCF LD D,A
DDD0 LD A,B
DDD1 EXX
DDD2 DEC A
Draw_Wide_Entity_Sprite_Pixels_Only_Row15_Step DDD3 INC HL Step HL through the row address table.
DDD4 INC HL
DDD5 DEC A
DDD6 JR NZ,Draw_Wide_Entity_Sprite_Pixels_Only_Row15_Step
DDD8 EXX Retrieve Y; return if below the play area.
DDD9 LD A,D
DDDA EXX
DDDB CP $B0
DDDD RET NC
DDDE CP $10 Return if the entity is above the play area.
DDE0 RET C
DDE1 EXX Load the column offset and compute the screen address.
DDE2 LD A,C
DDE3 EXX
DDE4 ADD A,(HL)
DDE5 LD E,A
DDE6 INC HL
DDE7 LD D,(HL)
DDE8 INC HL
DDE9 EX DE,HL
DDEA LD A,(BC) Toggle the sprite row's three pixel bytes onto the screen.
DDEB XOR (HL)
DDEC LD (HL),A
DDED INC BC
DDEE INC HL
DDEF LD A,(BC)
DDF0 XOR (HL)
DDF1 LD (HL),A
DDF2 INC BC
DDF3 INC HL
DDF4 LD A,(BC)
DDF5 XOR (HL)
DDF6 LD (HL),A
DDF7 EX DE,HL Restore HL to the row address table pointer.
DDF8 RET Return.
Prev: DAA3 Up: Map Next: DDF9