![]() |
Routines |
| Prev: 55971 | Up: Map | Next: 56825 |
|
Used by the routines at Step_Wide_Entity_Approach, Kill_Wall_Bouncing_Enemy and Animate_Wall_Bouncing_Enemy_Death.
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 (16 top / 176 bottom) are skipped. Called to draw and erase entity sprites during normal gameplay and death animations.
|
||||||||
|
Read the sprite data pointer and compute the screen address origin.
|
||||||||
| Draw_Wide_Entity_Sprite_Pixels_Only | 55983 | LD B,H | Stash the entity record pointer in BC. | |||||
| 55984 | LD C,L | |||||||
| 55985 | 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. | ||||||
| 55986 | SLA E | |||||||
| 55988 | LD D,0 | |||||||
| 55990 | LD HL,50700 | |||||||
| 55993 | ADD HL,DE | |||||||
| 55994 | LD E,(HL) | |||||||
| 55995 | INC HL | |||||||
| 55996 | LD D,(HL) | |||||||
| 55997 | LD H,B | Restore the entity record pointer and advance to the Y field. | ||||||
| 55998 | LD L,C | |||||||
| 55999 | INC HL | |||||||
| 56000 | LD B,70 | Load row stride 70 into B, read the entity Y position, and save it in D'. | ||||||
| 56002 | LD C,(HL) | |||||||
| 56003 | LD A,C | |||||||
| 56004 | EXX | |||||||
| 56005 | LD D,A | |||||||
| 56006 | EXX | |||||||
| 56007 | SLA C | Scale the Y position into the row address table range. | ||||||
| 56009 | RL B | |||||||
| 56011 | PUSH BC | Stash the scaled Y and row stride on the stack. | ||||||
| 56012 | INC HL | Read the X position and derive the column address via three-step rotation. | ||||||
| 56013 | LD A,(HL) | |||||||
| 56014 | AND A | |||||||
| 56015 | LD HL,0 | |||||||
| 56018 | RRA | |||||||
| 56019 | RR L | |||||||
| 56021 | RRA | |||||||
| 56022 | RR L | |||||||
| 56024 | RRA | |||||||
| 56025 | RR L | |||||||
| 56027 | EXX | Save the sub-column pixel offset in C'. | ||||||
| 56028 | LD C,A | |||||||
| 56029 | EXX | |||||||
| 56030 | LD A,L | Adjust the column address to align with two-byte row table entries. | ||||||
| 56031 | RRCA | |||||||
| 56032 | ADD A,L | |||||||
| 56033 | LD L,A | |||||||
| 56034 | LD A,H | |||||||
| 56035 | ADC A,0 | |||||||
| 56037 | LD H,A | |||||||
| 56038 | ADD HL,DE | Combine the column address with the sprite data pointer and move the result to BC. | ||||||
| 56039 | LD B,H | |||||||
| 56040 | LD C,L | |||||||
| 56041 | POP HL | Restore the scaled Y position from the stack. | ||||||
| 56042 | EXX | Retrieve the entity Y position from D'. | ||||||
| 56043 | LD A,D | |||||||
| 56044 | EXX | |||||||
| 56045 | CP 176 | Return if the entity is below the play area. | ||||||
| 56047 | RET NC | |||||||
|
Row 0: skip if above the play area, compute screen address, draw.
|
||||||||
| 56048 | CP 16 | Skip row 0 if the entity is above the play area. | ||||||
| 56050 | JR C,Draw_Wide_Entity_Sprite_Pixels_Only_Row1 | |||||||
| 56052 | EXX | Load the column pixel offset from C'. | ||||||
| 56053 | LD A,C | |||||||
| 56054 | EXX | |||||||
| 56055 | ADD A,(HL) | Add the column offset to the row address and load the screen address into DE. | ||||||
| 56056 | LD E,A | |||||||
| 56057 | INC HL | |||||||
| 56058 | LD D,(HL) | |||||||
| 56059 | INC HL | |||||||
| 56060 | EX DE,HL | Exchange DE and HL to point at the screen address. | ||||||
| 56061 | LD A,(BC) | Toggle the sprite row's three pixel bytes onto the screen. | ||||||
| 56062 | XOR (HL) | |||||||
| 56063 | LD (HL),A | |||||||
| 56064 | INC BC | |||||||
| 56065 | INC HL | |||||||
| 56066 | LD A,(BC) | |||||||
| 56067 | XOR (HL) | |||||||
| 56068 | LD (HL),A | |||||||
| 56069 | INC BC | |||||||
| 56070 | INC HL | |||||||
| 56071 | LD A,(BC) | |||||||
| 56072 | XOR (HL) | |||||||
| 56073 | LD (HL),A | |||||||
| 56074 | EX DE,HL | Restore HL to the row address table pointer. | ||||||
| 56075 | DEC BC | Step the sprite data pointer back two bytes to the row start. | ||||||
| 56076 | DEC BC | |||||||
|
Row 1: advance sprite data, step Y, walk address table, draw.
|
||||||||
| Draw_Wide_Entity_Sprite_Pixels_Only_Row1 | 56077 | INC BC | Advance the sprite data pointer to row 1. | |||||
| 56078 | INC BC | |||||||
| 56079 | INC BC | |||||||
| 56080 | EXX | Advance Y by the row stride and decrement the step count. | ||||||
| 56081 | LD A,B | |||||||
| 56082 | ADD A,D | |||||||
| 56083 | LD D,A | |||||||
| 56084 | LD A,B | |||||||
| 56085 | EXX | |||||||
| 56086 | DEC A | |||||||
| Draw_Wide_Entity_Sprite_Pixels_Only_Row1_Step | 56087 | INC HL | Step HL through the row address table. | |||||
| 56088 | INC HL | |||||||
| 56089 | DEC A | |||||||
| 56090 | JR NZ,Draw_Wide_Entity_Sprite_Pixels_Only_Row1_Step | |||||||
| 56092 | EXX | Retrieve Y; return if below the play area. | ||||||
| 56093 | LD A,D | |||||||
| 56094 | EXX | |||||||
| 56095 | CP 176 | |||||||
| 56097 | RET NC | |||||||
| 56098 | CP 16 | Skip row 1 if above the play area. | ||||||
| 56100 | JR C,Draw_Wide_Entity_Sprite_Pixels_Only_Row2 | |||||||
| 56102 | EXX | Load the column offset and compute the screen address. | ||||||
| 56103 | LD A,C | |||||||
| 56104 | EXX | |||||||
| 56105 | ADD A,(HL) | |||||||
| 56106 | LD E,A | |||||||
| 56107 | INC HL | |||||||
| 56108 | LD D,(HL) | |||||||
| 56109 | INC HL | |||||||
| 56110 | EX DE,HL | |||||||
| 56111 | LD A,(BC) | Toggle the sprite row's three pixel bytes onto the screen. | ||||||
| 56112 | XOR (HL) | |||||||
| 56113 | LD (HL),A | |||||||
| 56114 | INC BC | |||||||
| 56115 | INC HL | |||||||
| 56116 | LD A,(BC) | |||||||
| 56117 | XOR (HL) | |||||||
| 56118 | LD (HL),A | |||||||
| 56119 | INC BC | |||||||
| 56120 | INC HL | |||||||
| 56121 | LD A,(BC) | |||||||
| 56122 | XOR (HL) | |||||||
| 56123 | LD (HL),A | |||||||
| 56124 | EX DE,HL | Restore the row table pointer and step back the sprite data. | ||||||
| 56125 | DEC BC | |||||||
| 56126 | DEC BC | |||||||
|
Row 2: advance sprite data, step Y, walk address table, draw.
|
||||||||
| Draw_Wide_Entity_Sprite_Pixels_Only_Row2 | 56127 | INC BC | Advance the sprite data pointer to row 2. | |||||
| 56128 | INC BC | |||||||
| 56129 | INC BC | |||||||
| 56130 | EXX | Advance Y by the row stride and decrement the step count. | ||||||
| 56131 | LD A,B | |||||||
| 56132 | ADD A,D | |||||||
| 56133 | LD D,A | |||||||
| 56134 | LD A,B | |||||||
| 56135 | EXX | |||||||
| 56136 | DEC A | |||||||
| Draw_Wide_Entity_Sprite_Pixels_Only_Row2_Step | 56137 | INC HL | Step HL through the row address table. | |||||
| 56138 | INC HL | |||||||
| 56139 | DEC A | |||||||
| 56140 | JR NZ,Draw_Wide_Entity_Sprite_Pixels_Only_Row2_Step | |||||||
| 56142 | EXX | Retrieve Y; return if below the play area. | ||||||
| 56143 | LD A,D | |||||||
| 56144 | EXX | |||||||
| 56145 | CP 176 | |||||||
| 56147 | RET NC | |||||||
| 56148 | CP 16 | Skip row 2 if above the play area. | ||||||
| 56150 | JR C,Draw_Wide_Entity_Sprite_Pixels_Only_Row3 | |||||||
| 56152 | EXX | Load the column offset and compute the screen address. | ||||||
| 56153 | LD A,C | |||||||
| 56154 | EXX | |||||||
| 56155 | ADD A,(HL) | |||||||
| 56156 | LD E,A | |||||||
| 56157 | INC HL | |||||||
| 56158 | LD D,(HL) | |||||||
| 56159 | INC HL | |||||||
| 56160 | EX DE,HL | |||||||
| 56161 | LD A,(BC) | Toggle the sprite row's three pixel bytes onto the screen. | ||||||
| 56162 | XOR (HL) | |||||||
| 56163 | LD (HL),A | |||||||
| 56164 | INC BC | |||||||
| 56165 | INC HL | |||||||
| 56166 | LD A,(BC) | |||||||
| 56167 | XOR (HL) | |||||||
| 56168 | LD (HL),A | |||||||
| 56169 | INC BC | |||||||
| 56170 | INC HL | |||||||
| 56171 | LD A,(BC) | |||||||
| 56172 | XOR (HL) | |||||||
| 56173 | LD (HL),A | |||||||
| 56174 | EX DE,HL | Restore the row table pointer and step back the sprite data. | ||||||
| 56175 | DEC BC | |||||||
| 56176 | DEC BC | |||||||
|
Row 3: advance sprite data, step Y, walk address table, draw.
|
||||||||
| Draw_Wide_Entity_Sprite_Pixels_Only_Row3 | 56177 | INC BC | Advance the sprite data pointer to row 3. | |||||
| 56178 | INC BC | |||||||
| 56179 | INC BC | |||||||
| 56180 | EXX | Advance Y by the row stride and decrement the step count. | ||||||
| 56181 | LD A,B | |||||||
| 56182 | ADD A,D | |||||||
| 56183 | LD D,A | |||||||
| 56184 | LD A,B | |||||||
| 56185 | EXX | |||||||
| 56186 | DEC A | |||||||
| Draw_Wide_Entity_Sprite_Pixels_Only_Row3_Step | 56187 | INC HL | Step HL through the row address table. | |||||
| 56188 | INC HL | |||||||
| 56189 | DEC A | |||||||
| 56190 | JR NZ,Draw_Wide_Entity_Sprite_Pixels_Only_Row3_Step | |||||||
| 56192 | EXX | Retrieve Y; return if below the play area. | ||||||
| 56193 | LD A,D | |||||||
| 56194 | EXX | |||||||
| 56195 | CP 176 | |||||||
| 56197 | RET NC | |||||||
| 56198 | CP 16 | Skip row 3 if above the play area. | ||||||
| 56200 | JR C,Draw_Wide_Entity_Sprite_Pixels_Only_Row4 | |||||||
| 56202 | EXX | Load the column offset and compute the screen address. | ||||||
| 56203 | LD A,C | |||||||
| 56204 | EXX | |||||||
| 56205 | ADD A,(HL) | |||||||
| 56206 | LD E,A | |||||||
| 56207 | INC HL | |||||||
| 56208 | LD D,(HL) | |||||||
| 56209 | INC HL | |||||||
| 56210 | EX DE,HL | |||||||
| 56211 | LD A,(BC) | Toggle the sprite row's three pixel bytes onto the screen. | ||||||
| 56212 | XOR (HL) | |||||||
| 56213 | LD (HL),A | |||||||
| 56214 | INC BC | |||||||
| 56215 | INC HL | |||||||
| 56216 | LD A,(BC) | |||||||
| 56217 | XOR (HL) | |||||||
| 56218 | LD (HL),A | |||||||
| 56219 | INC BC | |||||||
| 56220 | INC HL | |||||||
| 56221 | LD A,(BC) | |||||||
| 56222 | XOR (HL) | |||||||
| 56223 | LD (HL),A | |||||||
| 56224 | EX DE,HL | Restore the row table pointer and step back the sprite data. | ||||||
| 56225 | DEC BC | |||||||
| 56226 | DEC BC | |||||||
|
Row 4: advance sprite data, step Y, walk address table, draw.
|
||||||||
| Draw_Wide_Entity_Sprite_Pixels_Only_Row4 | 56227 | INC BC | Advance the sprite data pointer to row 4. | |||||
| 56228 | INC BC | |||||||
| 56229 | INC BC | |||||||
| 56230 | EXX | Advance Y by the row stride and decrement the step count. | ||||||
| 56231 | LD A,B | |||||||
| 56232 | ADD A,D | |||||||
| 56233 | LD D,A | |||||||
| 56234 | LD A,B | |||||||
| 56235 | EXX | |||||||
| 56236 | DEC A | |||||||
| Draw_Wide_Entity_Sprite_Pixels_Only_Row4_Step | 56237 | INC HL | Step HL through the row address table. | |||||
| 56238 | INC HL | |||||||
| 56239 | DEC A | |||||||
| 56240 | JR NZ,Draw_Wide_Entity_Sprite_Pixels_Only_Row4_Step | |||||||
| 56242 | EXX | Retrieve Y; return if below the play area. | ||||||
| 56243 | LD A,D | |||||||
| 56244 | EXX | |||||||
| 56245 | CP 176 | |||||||
| 56247 | RET NC | |||||||
| 56248 | CP 16 | Skip row 4 if above the play area. | ||||||
| 56250 | JR C,Draw_Wide_Entity_Sprite_Pixels_Only_Row5 | |||||||
| 56252 | EXX | Load the column offset and compute the screen address. | ||||||
| 56253 | LD A,C | |||||||
| 56254 | EXX | |||||||
| 56255 | ADD A,(HL) | |||||||
| 56256 | LD E,A | |||||||
| 56257 | INC HL | |||||||
| 56258 | LD D,(HL) | |||||||
| 56259 | INC HL | |||||||
| 56260 | EX DE,HL | |||||||
| 56261 | LD A,(BC) | Toggle the sprite row's three pixel bytes onto the screen. | ||||||
| 56262 | XOR (HL) | |||||||
| 56263 | LD (HL),A | |||||||
| 56264 | INC BC | |||||||
| 56265 | INC HL | |||||||
| 56266 | LD A,(BC) | |||||||
| 56267 | XOR (HL) | |||||||
| 56268 | LD (HL),A | |||||||
| 56269 | INC BC | |||||||
| 56270 | INC HL | |||||||
| 56271 | LD A,(BC) | |||||||
| 56272 | XOR (HL) | |||||||
| 56273 | LD (HL),A | |||||||
| 56274 | EX DE,HL | Restore the row table pointer and step back the sprite data. | ||||||
| 56275 | DEC BC | |||||||
| 56276 | DEC BC | |||||||
|
Row 5: advance sprite data, step Y, walk address table, draw.
|
||||||||
| Draw_Wide_Entity_Sprite_Pixels_Only_Row5 | 56277 | INC BC | Advance the sprite data pointer to row 5. | |||||
| 56278 | INC BC | |||||||
| 56279 | INC BC | |||||||
| 56280 | EXX | Advance Y by the row stride and decrement the step count. | ||||||
| 56281 | LD A,B | |||||||
| 56282 | ADD A,D | |||||||
| 56283 | LD D,A | |||||||
| 56284 | LD A,B | |||||||
| 56285 | EXX | |||||||
| 56286 | DEC A | |||||||
| Draw_Wide_Entity_Sprite_Pixels_Only_Row5_Step | 56287 | INC HL | Step HL through the row address table. | |||||
| 56288 | INC HL | |||||||
| 56289 | DEC A | |||||||
| 56290 | JR NZ,Draw_Wide_Entity_Sprite_Pixels_Only_Row5_Step | |||||||
| 56292 | EXX | Retrieve Y; return if below the play area. | ||||||
| 56293 | LD A,D | |||||||
| 56294 | EXX | |||||||
| 56295 | CP 176 | |||||||
| 56297 | RET NC | |||||||
| 56298 | CP 16 | Skip row 5 if above the play area. | ||||||
| 56300 | JR C,Draw_Wide_Entity_Sprite_Pixels_Only_Row6 | |||||||
| 56302 | EXX | Load the column offset and compute the screen address. | ||||||
| 56303 | LD A,C | |||||||
| 56304 | EXX | |||||||
| 56305 | ADD A,(HL) | |||||||
| 56306 | LD E,A | |||||||
| 56307 | INC HL | |||||||
| 56308 | LD D,(HL) | |||||||
| 56309 | INC HL | |||||||
| 56310 | EX DE,HL | |||||||
| 56311 | LD A,(BC) | Toggle the sprite row's three pixel bytes onto the screen. | ||||||
| 56312 | XOR (HL) | |||||||
| 56313 | LD (HL),A | |||||||
| 56314 | INC BC | |||||||
| 56315 | INC HL | |||||||
| 56316 | LD A,(BC) | |||||||
| 56317 | XOR (HL) | |||||||
| 56318 | LD (HL),A | |||||||
| 56319 | INC BC | |||||||
| 56320 | INC HL | |||||||
| 56321 | LD A,(BC) | |||||||
| 56322 | XOR (HL) | |||||||
| 56323 | LD (HL),A | |||||||
| 56324 | EX DE,HL | Restore the row table pointer and step back the sprite data. | ||||||
| 56325 | DEC BC | |||||||
| 56326 | DEC BC | |||||||
|
Row 6: advance sprite data, step Y, walk address table, draw.
|
||||||||
| Draw_Wide_Entity_Sprite_Pixels_Only_Row6 | 56327 | INC BC | Advance the sprite data pointer to row 6. | |||||
| 56328 | INC BC | |||||||
| 56329 | INC BC | |||||||
| 56330 | EXX | Advance Y by the row stride and decrement the step count. | ||||||
| 56331 | LD A,B | |||||||
| 56332 | ADD A,D | |||||||
| 56333 | LD D,A | |||||||
| 56334 | LD A,B | |||||||
| 56335 | EXX | |||||||
| 56336 | DEC A | |||||||
| Draw_Wide_Entity_Sprite_Pixels_Only_Row6_Step | 56337 | INC HL | Step HL through the row address table. | |||||
| 56338 | INC HL | |||||||
| 56339 | DEC A | |||||||
| 56340 | JR NZ,Draw_Wide_Entity_Sprite_Pixels_Only_Row6_Step | |||||||
| 56342 | EXX | Retrieve Y; return if below the play area. | ||||||
| 56343 | LD A,D | |||||||
| 56344 | EXX | |||||||
| 56345 | CP 176 | |||||||
| 56347 | RET NC | |||||||
| 56348 | CP 16 | Skip row 6 if above the play area. | ||||||
| 56350 | JR C,Draw_Wide_Entity_Sprite_Pixels_Only_Row7 | |||||||
| 56352 | EXX | Load the column offset and compute the screen address. | ||||||
| 56353 | LD A,C | |||||||
| 56354 | EXX | |||||||
| 56355 | ADD A,(HL) | |||||||
| 56356 | LD E,A | |||||||
| 56357 | INC HL | |||||||
| 56358 | LD D,(HL) | |||||||
| 56359 | INC HL | |||||||
| 56360 | EX DE,HL | |||||||
| 56361 | LD A,(BC) | Toggle the sprite row's three pixel bytes onto the screen. | ||||||
| 56362 | XOR (HL) | |||||||
| 56363 | LD (HL),A | |||||||
| 56364 | INC BC | |||||||
| 56365 | INC HL | |||||||
| 56366 | LD A,(BC) | |||||||
| 56367 | XOR (HL) | |||||||
| 56368 | LD (HL),A | |||||||
| 56369 | INC BC | |||||||
| 56370 | INC HL | |||||||
| 56371 | LD A,(BC) | |||||||
| 56372 | XOR (HL) | |||||||
| 56373 | LD (HL),A | |||||||
| 56374 | EX DE,HL | Restore the row table pointer and step back the sprite data. | ||||||
| 56375 | DEC BC | |||||||
| 56376 | DEC BC | |||||||
|
Row 7: advance sprite data, step Y, walk address table, draw.
|
||||||||
| Draw_Wide_Entity_Sprite_Pixels_Only_Row7 | 56377 | INC BC | Advance the sprite data pointer to row 7. | |||||
| 56378 | INC BC | |||||||
| 56379 | INC BC | |||||||
| 56380 | EXX | Advance Y by the row stride and decrement the step count. | ||||||
| 56381 | LD A,B | |||||||
| 56382 | ADD A,D | |||||||
| 56383 | LD D,A | |||||||
| 56384 | LD A,B | |||||||
| 56385 | EXX | |||||||
| 56386 | DEC A | |||||||
| Draw_Wide_Entity_Sprite_Pixels_Only_Row7_Step | 56387 | INC HL | Step HL through the row address table. | |||||
| 56388 | INC HL | |||||||
| 56389 | DEC A | |||||||
| 56390 | JR NZ,Draw_Wide_Entity_Sprite_Pixels_Only_Row7_Step | |||||||
| 56392 | EXX | Retrieve Y; return if below the play area. | ||||||
| 56393 | LD A,D | |||||||
| 56394 | EXX | |||||||
| 56395 | CP 176 | |||||||
| 56397 | RET NC | |||||||
| 56398 | CP 16 | Skip row 7 if above the play area. | ||||||
| 56400 | JR C,Draw_Wide_Entity_Sprite_Pixels_Only_Row8 | |||||||
| 56402 | EXX | Load the column offset and compute the screen address. | ||||||
| 56403 | LD A,C | |||||||
| 56404 | EXX | |||||||
| 56405 | ADD A,(HL) | |||||||
| 56406 | LD E,A | |||||||
| 56407 | INC HL | |||||||
| 56408 | LD D,(HL) | |||||||
| 56409 | INC HL | |||||||
| 56410 | EX DE,HL | |||||||
| 56411 | LD A,(BC) | Toggle the sprite row's three pixel bytes onto the screen. | ||||||
| 56412 | XOR (HL) | |||||||
| 56413 | LD (HL),A | |||||||
| 56414 | INC BC | |||||||
| 56415 | INC HL | |||||||
| 56416 | LD A,(BC) | |||||||
| 56417 | XOR (HL) | |||||||
| 56418 | LD (HL),A | |||||||
| 56419 | INC BC | |||||||
| 56420 | INC HL | |||||||
| 56421 | LD A,(BC) | |||||||
| 56422 | XOR (HL) | |||||||
| 56423 | LD (HL),A | |||||||
| 56424 | EX DE,HL | Restore the row table pointer and step back the sprite data. | ||||||
| 56425 | DEC BC | |||||||
| 56426 | DEC BC | |||||||
|
Row 8: advance sprite data, step Y, walk address table, draw.
|
||||||||
| Draw_Wide_Entity_Sprite_Pixels_Only_Row8 | 56427 | INC BC | Advance the sprite data pointer to row 8. | |||||
| 56428 | INC BC | |||||||
| 56429 | INC BC | |||||||
| 56430 | EXX | Advance Y by the row stride and decrement the step count. | ||||||
| 56431 | LD A,B | |||||||
| 56432 | ADD A,D | |||||||
| 56433 | LD D,A | |||||||
| 56434 | LD A,B | |||||||
| 56435 | EXX | |||||||
| 56436 | DEC A | |||||||
| Draw_Wide_Entity_Sprite_Pixels_Only_Row8_Step | 56437 | INC HL | Step HL through the row address table. | |||||
| 56438 | INC HL | |||||||
| 56439 | DEC A | |||||||
| 56440 | JR NZ,Draw_Wide_Entity_Sprite_Pixels_Only_Row8_Step | |||||||
| 56442 | EXX | Retrieve Y; return if below the play area. | ||||||
| 56443 | LD A,D | |||||||
| 56444 | EXX | |||||||
| 56445 | CP 176 | |||||||
| 56447 | RET NC | |||||||
| 56448 | CP 16 | Skip row 8 if above the play area. | ||||||
| 56450 | JR C,Draw_Wide_Entity_Sprite_Pixels_Only_Row9 | |||||||
| 56452 | EXX | Load the column offset and compute the screen address. | ||||||
| 56453 | LD A,C | |||||||
| 56454 | EXX | |||||||
| 56455 | ADD A,(HL) | |||||||
| 56456 | LD E,A | |||||||
| 56457 | INC HL | |||||||
| 56458 | LD D,(HL) | |||||||
| 56459 | INC HL | |||||||
| 56460 | EX DE,HL | |||||||
| 56461 | LD A,(BC) | Toggle the sprite row's three pixel bytes onto the screen. | ||||||
| 56462 | XOR (HL) | |||||||
| 56463 | LD (HL),A | |||||||
| 56464 | INC BC | |||||||
| 56465 | INC HL | |||||||
| 56466 | LD A,(BC) | |||||||
| 56467 | XOR (HL) | |||||||
| 56468 | LD (HL),A | |||||||
| 56469 | INC BC | |||||||
| 56470 | INC HL | |||||||
| 56471 | LD A,(BC) | |||||||
| 56472 | XOR (HL) | |||||||
| 56473 | LD (HL),A | |||||||
| 56474 | EX DE,HL | Restore the row table pointer and step back the sprite data. | ||||||
| 56475 | DEC BC | |||||||
| 56476 | DEC BC | |||||||
|
Row 9: advance sprite data, step Y, walk address table, draw.
|
||||||||
| Draw_Wide_Entity_Sprite_Pixels_Only_Row9 | 56477 | INC BC | Advance the sprite data pointer to row 9. | |||||
| 56478 | INC BC | |||||||
| 56479 | INC BC | |||||||
| 56480 | EXX | Advance Y by the row stride and decrement the step count. | ||||||
| 56481 | LD A,B | |||||||
| 56482 | ADD A,D | |||||||
| 56483 | LD D,A | |||||||
| 56484 | LD A,B | |||||||
| 56485 | EXX | |||||||
| 56486 | DEC A | |||||||
| Draw_Wide_Entity_Sprite_Pixels_Only_Row9_Step | 56487 | INC HL | Step HL through the row address table. | |||||
| 56488 | INC HL | |||||||
| 56489 | DEC A | |||||||
| 56490 | JR NZ,Draw_Wide_Entity_Sprite_Pixels_Only_Row9_Step | |||||||
| 56492 | EXX | Retrieve Y; return if below the play area. | ||||||
| 56493 | LD A,D | |||||||
| 56494 | EXX | |||||||
| 56495 | CP 176 | |||||||
| 56497 | RET NC | |||||||
| 56498 | CP 16 | Skip row 9 if above the play area. | ||||||
| 56500 | JR C,Draw_Wide_Entity_Sprite_Pixels_Only_Row10 | |||||||
| 56502 | EXX | Load the column offset and compute the screen address. | ||||||
| 56503 | LD A,C | |||||||
| 56504 | EXX | |||||||
| 56505 | ADD A,(HL) | |||||||
| 56506 | LD E,A | |||||||
| 56507 | INC HL | |||||||
| 56508 | LD D,(HL) | |||||||
| 56509 | INC HL | |||||||
| 56510 | EX DE,HL | |||||||
| 56511 | LD A,(BC) | Toggle the sprite row's three pixel bytes onto the screen. | ||||||
| 56512 | XOR (HL) | |||||||
| 56513 | LD (HL),A | |||||||
| 56514 | INC BC | |||||||
| 56515 | INC HL | |||||||
| 56516 | LD A,(BC) | |||||||
| 56517 | XOR (HL) | |||||||
| 56518 | LD (HL),A | |||||||
| 56519 | INC BC | |||||||
| 56520 | INC HL | |||||||
| 56521 | LD A,(BC) | |||||||
| 56522 | XOR (HL) | |||||||
| 56523 | LD (HL),A | |||||||
| 56524 | EX DE,HL | Restore the row table pointer and step back the sprite data. | ||||||
| 56525 | DEC BC | |||||||
| 56526 | DEC BC | |||||||
|
Row 10: advance sprite data, step Y, walk address table, draw.
|
||||||||
| Draw_Wide_Entity_Sprite_Pixels_Only_Row10 | 56527 | INC BC | Advance the sprite data pointer to row 10. | |||||
| 56528 | INC BC | |||||||
| 56529 | INC BC | |||||||
| 56530 | EXX | Advance Y by the row stride and decrement the step count. | ||||||
| 56531 | LD A,B | |||||||
| 56532 | ADD A,D | |||||||
| 56533 | LD D,A | |||||||
| 56534 | LD A,B | |||||||
| 56535 | EXX | |||||||
| 56536 | DEC A | |||||||
| Draw_Wide_Entity_Sprite_Pixels_Only_Row10_Step | 56537 | INC HL | Step HL through the row address table. | |||||
| 56538 | INC HL | |||||||
| 56539 | DEC A | |||||||
| 56540 | JR NZ,Draw_Wide_Entity_Sprite_Pixels_Only_Row10_Step | |||||||
| 56542 | EXX | Retrieve Y; return if below the play area. | ||||||
| 56543 | LD A,D | |||||||
| 56544 | EXX | |||||||
| 56545 | CP 176 | |||||||
| 56547 | RET NC | |||||||
| 56548 | CP 16 | Skip row 10 if above the play area. | ||||||
| 56550 | JR C,Draw_Wide_Entity_Sprite_Pixels_Only_Row11 | |||||||
| 56552 | EXX | Load the column offset and compute the screen address. | ||||||
| 56553 | LD A,C | |||||||
| 56554 | EXX | |||||||
| 56555 | ADD A,(HL) | |||||||
| 56556 | LD E,A | |||||||
| 56557 | INC HL | |||||||
| 56558 | LD D,(HL) | |||||||
| 56559 | INC HL | |||||||
| 56560 | EX DE,HL | |||||||
| 56561 | LD A,(BC) | Toggle the sprite row's three pixel bytes onto the screen. | ||||||
| 56562 | XOR (HL) | |||||||
| 56563 | LD (HL),A | |||||||
| 56564 | INC BC | |||||||
| 56565 | INC HL | |||||||
| 56566 | LD A,(BC) | |||||||
| 56567 | XOR (HL) | |||||||
| 56568 | LD (HL),A | |||||||
| 56569 | INC BC | |||||||
| 56570 | INC HL | |||||||
| 56571 | LD A,(BC) | |||||||
| 56572 | XOR (HL) | |||||||
| 56573 | LD (HL),A | |||||||
| 56574 | EX DE,HL | Restore the row table pointer and step back the sprite data. | ||||||
| 56575 | DEC BC | |||||||
| 56576 | DEC BC | |||||||
|
Row 11: advance sprite data, step Y, walk address table, draw.
|
||||||||
| Draw_Wide_Entity_Sprite_Pixels_Only_Row11 | 56577 | INC BC | Advance the sprite data pointer to row 11. | |||||
| 56578 | INC BC | |||||||
| 56579 | INC BC | |||||||
| 56580 | EXX | Advance Y by the row stride and decrement the step count. | ||||||
| 56581 | LD A,B | |||||||
| 56582 | ADD A,D | |||||||
| 56583 | LD D,A | |||||||
| 56584 | LD A,B | |||||||
| 56585 | EXX | |||||||
| 56586 | DEC A | |||||||
| Draw_Wide_Entity_Sprite_Pixels_Only_Row11_Step | 56587 | INC HL | Step HL through the row address table. | |||||
| 56588 | INC HL | |||||||
| 56589 | DEC A | |||||||
| 56590 | JR NZ,Draw_Wide_Entity_Sprite_Pixels_Only_Row11_Step | |||||||
| 56592 | EXX | Retrieve Y; return if below the play area. | ||||||
| 56593 | LD A,D | |||||||
| 56594 | EXX | |||||||
| 56595 | CP 176 | |||||||
| 56597 | RET NC | |||||||
| 56598 | CP 16 | Skip row 11 if above the play area. | ||||||
| 56600 | JR C,Draw_Wide_Entity_Sprite_Pixels_Only_Row12 | |||||||
| 56602 | EXX | Load the column offset and compute the screen address. | ||||||
| 56603 | LD A,C | |||||||
| 56604 | EXX | |||||||
| 56605 | ADD A,(HL) | |||||||
| 56606 | LD E,A | |||||||
| 56607 | INC HL | |||||||
| 56608 | LD D,(HL) | |||||||
| 56609 | INC HL | |||||||
| 56610 | EX DE,HL | |||||||
| 56611 | LD A,(BC) | Toggle the sprite row's three pixel bytes onto the screen. | ||||||
| 56612 | XOR (HL) | |||||||
| 56613 | LD (HL),A | |||||||
| 56614 | INC BC | |||||||
| 56615 | INC HL | |||||||
| 56616 | LD A,(BC) | |||||||
| 56617 | XOR (HL) | |||||||
| 56618 | LD (HL),A | |||||||
| 56619 | INC BC | |||||||
| 56620 | INC HL | |||||||
| 56621 | LD A,(BC) | |||||||
| 56622 | XOR (HL) | |||||||
| 56623 | LD (HL),A | |||||||
| 56624 | EX DE,HL | Restore the row table pointer and step back the sprite data. | ||||||
| 56625 | DEC BC | |||||||
| 56626 | DEC BC | |||||||
|
Row 12: advance sprite data, step Y, walk address table, draw.
|
||||||||
| Draw_Wide_Entity_Sprite_Pixels_Only_Row12 | 56627 | INC BC | Advance the sprite data pointer to row 12. | |||||
| 56628 | INC BC | |||||||
| 56629 | INC BC | |||||||
| 56630 | EXX | Advance Y by the row stride and decrement the step count. | ||||||
| 56631 | LD A,B | |||||||
| 56632 | ADD A,D | |||||||
| 56633 | LD D,A | |||||||
| 56634 | LD A,B | |||||||
| 56635 | EXX | |||||||
| 56636 | DEC A | |||||||
| Draw_Wide_Entity_Sprite_Pixels_Only_Row12_Step | 56637 | INC HL | Step HL through the row address table. | |||||
| 56638 | INC HL | |||||||
| 56639 | DEC A | |||||||
| 56640 | JR NZ,Draw_Wide_Entity_Sprite_Pixels_Only_Row12_Step | |||||||
| 56642 | EXX | Retrieve Y; return if below the play area. | ||||||
| 56643 | LD A,D | |||||||
| 56644 | EXX | |||||||
| 56645 | CP 176 | |||||||
| 56647 | RET NC | |||||||
| 56648 | CP 16 | Skip row 12 if above the play area. | ||||||
| 56650 | JR C,Draw_Wide_Entity_Sprite_Pixels_Only_Row13 | |||||||
| 56652 | EXX | Load the column offset and compute the screen address. | ||||||
| 56653 | LD A,C | |||||||
| 56654 | EXX | |||||||
| 56655 | ADD A,(HL) | |||||||
| 56656 | LD E,A | |||||||
| 56657 | INC HL | |||||||
| 56658 | LD D,(HL) | |||||||
| 56659 | INC HL | |||||||
| 56660 | EX DE,HL | |||||||
| 56661 | LD A,(BC) | Toggle the sprite row's three pixel bytes onto the screen. | ||||||
| 56662 | XOR (HL) | |||||||
| 56663 | LD (HL),A | |||||||
| 56664 | INC BC | |||||||
| 56665 | INC HL | |||||||
| 56666 | LD A,(BC) | |||||||
| 56667 | XOR (HL) | |||||||
| 56668 | LD (HL),A | |||||||
| 56669 | INC BC | |||||||
| 56670 | INC HL | |||||||
| 56671 | LD A,(BC) | |||||||
| 56672 | XOR (HL) | |||||||
| 56673 | LD (HL),A | |||||||
| 56674 | EX DE,HL | Restore the row table pointer and step back the sprite data. | ||||||
| 56675 | DEC BC | |||||||
| 56676 | DEC BC | |||||||
|
Row 13: advance sprite data, step Y, walk address table, draw.
|
||||||||
| Draw_Wide_Entity_Sprite_Pixels_Only_Row13 | 56677 | INC BC | Advance the sprite data pointer to row 13. | |||||
| 56678 | INC BC | |||||||
| 56679 | INC BC | |||||||
| 56680 | EXX | Advance Y by the row stride and decrement the step count. | ||||||
| 56681 | LD A,B | |||||||
| 56682 | ADD A,D | |||||||
| 56683 | LD D,A | |||||||
| 56684 | LD A,B | |||||||
| 56685 | EXX | |||||||
| 56686 | DEC A | |||||||
| Draw_Wide_Entity_Sprite_Pixels_Only_Row13_Step | 56687 | INC HL | Step HL through the row address table. | |||||
| 56688 | INC HL | |||||||
| 56689 | DEC A | |||||||
| 56690 | JR NZ,Draw_Wide_Entity_Sprite_Pixels_Only_Row13_Step | |||||||
| 56692 | EXX | Retrieve Y; return if below the play area. | ||||||
| 56693 | LD A,D | |||||||
| 56694 | EXX | |||||||
| 56695 | CP 176 | |||||||
| 56697 | RET NC | |||||||
| 56698 | CP 16 | Skip row 13 if above the play area. | ||||||
| 56700 | JR C,Draw_Wide_Entity_Sprite_Pixels_Only_Row14 | |||||||
| 56702 | EXX | Load the column offset and compute the screen address. | ||||||
| 56703 | LD A,C | |||||||
| 56704 | EXX | |||||||
| 56705 | ADD A,(HL) | |||||||
| 56706 | LD E,A | |||||||
| 56707 | INC HL | |||||||
| 56708 | LD D,(HL) | |||||||
| 56709 | INC HL | |||||||
| 56710 | EX DE,HL | |||||||
| 56711 | LD A,(BC) | Toggle the sprite row's three pixel bytes onto the screen. | ||||||
| 56712 | XOR (HL) | |||||||
| 56713 | LD (HL),A | |||||||
| 56714 | INC BC | |||||||
| 56715 | INC HL | |||||||
| 56716 | LD A,(BC) | |||||||
| 56717 | XOR (HL) | |||||||
| 56718 | LD (HL),A | |||||||
| 56719 | INC BC | |||||||
| 56720 | INC HL | |||||||
| 56721 | LD A,(BC) | |||||||
| 56722 | XOR (HL) | |||||||
| 56723 | LD (HL),A | |||||||
| 56724 | EX DE,HL | Restore the row table pointer and step back the sprite data. | ||||||
| 56725 | DEC BC | |||||||
| 56726 | DEC BC | |||||||
|
Row 14: advance sprite data, step Y, walk address table, draw.
|
||||||||
| Draw_Wide_Entity_Sprite_Pixels_Only_Row14 | 56727 | INC BC | Advance the sprite data pointer to row 14. | |||||
| 56728 | INC BC | |||||||
| 56729 | INC BC | |||||||
| 56730 | EXX | Advance Y by the row stride and decrement the step count. | ||||||
| 56731 | LD A,B | |||||||
| 56732 | ADD A,D | |||||||
| 56733 | LD D,A | |||||||
| 56734 | LD A,B | |||||||
| 56735 | EXX | |||||||
| 56736 | DEC A | |||||||
| Draw_Wide_Entity_Sprite_Pixels_Only_Row14_Step | 56737 | INC HL | Step HL through the row address table. | |||||
| 56738 | INC HL | |||||||
| 56739 | DEC A | |||||||
| 56740 | JR NZ,Draw_Wide_Entity_Sprite_Pixels_Only_Row14_Step | |||||||
| 56742 | EXX | Retrieve Y; return if below the play area. | ||||||
| 56743 | LD A,D | |||||||
| 56744 | EXX | |||||||
| 56745 | CP 176 | |||||||
| 56747 | RET NC | |||||||
| 56748 | CP 16 | Skip row 14 if above the play area. | ||||||
| 56750 | JR C,Draw_Wide_Entity_Sprite_Pixels_Only_Row15 | |||||||
| 56752 | EXX | Load the column offset and compute the screen address. | ||||||
| 56753 | LD A,C | |||||||
| 56754 | EXX | |||||||
| 56755 | ADD A,(HL) | |||||||
| 56756 | LD E,A | |||||||
| 56757 | INC HL | |||||||
| 56758 | LD D,(HL) | |||||||
| 56759 | INC HL | |||||||
| 56760 | EX DE,HL | |||||||
| 56761 | LD A,(BC) | Toggle the sprite row's three pixel bytes onto the screen. | ||||||
| 56762 | XOR (HL) | |||||||
| 56763 | LD (HL),A | |||||||
| 56764 | INC BC | |||||||
| 56765 | INC HL | |||||||
| 56766 | LD A,(BC) | |||||||
| 56767 | XOR (HL) | |||||||
| 56768 | LD (HL),A | |||||||
| 56769 | INC BC | |||||||
| 56770 | INC HL | |||||||
| 56771 | LD A,(BC) | |||||||
| 56772 | XOR (HL) | |||||||
| 56773 | LD (HL),A | |||||||
| 56774 | EX DE,HL | Restore the row table pointer and step back the sprite data. | ||||||
| 56775 | DEC BC | |||||||
| 56776 | DEC BC | |||||||
|
Row 15: advance sprite data, step Y, walk address table, draw.
|
||||||||
| Draw_Wide_Entity_Sprite_Pixels_Only_Row15 | 56777 | INC BC | Advance the sprite data pointer to row 15. | |||||
| 56778 | INC BC | |||||||
| 56779 | INC BC | |||||||
| 56780 | EXX | Advance Y by the row stride and decrement the step count. | ||||||
| 56781 | LD A,B | |||||||
| 56782 | ADD A,D | |||||||
| 56783 | LD D,A | |||||||
| 56784 | LD A,B | |||||||
| 56785 | EXX | |||||||
| 56786 | DEC A | |||||||
| Draw_Wide_Entity_Sprite_Pixels_Only_Row15_Step | 56787 | INC HL | Step HL through the row address table. | |||||
| 56788 | INC HL | |||||||
| 56789 | DEC A | |||||||
| 56790 | JR NZ,Draw_Wide_Entity_Sprite_Pixels_Only_Row15_Step | |||||||
| 56792 | EXX | Retrieve Y; return if below the play area. | ||||||
| 56793 | LD A,D | |||||||
| 56794 | EXX | |||||||
| 56795 | CP 176 | |||||||
| 56797 | RET NC | |||||||
| 56798 | CP 16 | Return if the entity is above the play area. | ||||||
| 56800 | RET C | |||||||
| 56801 | EXX | Load the column offset and compute the screen address. | ||||||
| 56802 | LD A,C | |||||||
| 56803 | EXX | |||||||
| 56804 | ADD A,(HL) | |||||||
| 56805 | LD E,A | |||||||
| 56806 | INC HL | |||||||
| 56807 | LD D,(HL) | |||||||
| 56808 | INC HL | |||||||
| 56809 | EX DE,HL | |||||||
| 56810 | LD A,(BC) | Toggle the sprite row's three pixel bytes onto the screen. | ||||||
| 56811 | XOR (HL) | |||||||
| 56812 | LD (HL),A | |||||||
| 56813 | INC BC | |||||||
| 56814 | INC HL | |||||||
| 56815 | LD A,(BC) | |||||||
| 56816 | XOR (HL) | |||||||
| 56817 | LD (HL),A | |||||||
| 56818 | INC BC | |||||||
| 56819 | INC HL | |||||||
| 56820 | LD A,(BC) | |||||||
| 56821 | XOR (HL) | |||||||
| 56822 | LD (HL),A | |||||||
| 56823 | EX DE,HL | Restore HL to the row address table pointer. | ||||||
| 56824 | RET | Return. | ||||||
| Prev: 55971 | Up: Map | Next: 56825 |