![]() |
Unused |
| Prev: 48940 | Up: Map | Next: 49031 |
|
Unused alternative routine to draw a 3-wide sprite and apply its attributes in a single pass.
|
||||
| Unused_Draw_3Wide | 48949 | PUSH DE | Copy DE to IX. | |
| 48950 | POP IX | |||
| 48952 | LD L,(IX+0) | Load the screen address low byte from *IX+0. | ||
| 48955 | INC IX | Advance IX. | ||
| 48957 | LD H,(IX+0) | Load the screen address high byte from *IX+0. | ||
| 48960 | PUSH HL | Stash the screen address on the stack. | ||
| 48961 | INC IX | Advance IX. | ||
| 48963 | LD A,(IX+0) | Load the width flag from *IX+0. | ||
| 48966 | INC IX | Advance IX. | ||
| 48968 | PUSH IX | Copy IX to DE. | ||
| 48970 | POP DE | Advance DE past the data header. | ||
| 48971 | INC DE | |||
| 48972 | LD C,7 | Set the row boundary mask to 7 in C. | ||
| 48974 | OR A | Jump to Unused_Draw_3Wide_1Col if the width flag is zero (one column wide). | ||
| 48975 | JR Z,49007 | |||
|
Draw two columns per row.
|
||||
| 48977 | LD B,8 | Set the row counter to 8 in B. | ||
| Unused_Draw_3Wide_Row_Loop | 48979 | LD A,(DE) | OR the sprite data byte from *DE onto the first screen column at *HL. | |
| 48980 | OR (HL) | |||
| 48981 | LD (HL),A | |||
| 48982 | INC L | Advance to the next column and OR the next byte onto the second column. | ||
| 48983 | INC DE | |||
| 48984 | LD A,(DE) | |||
| 48985 | OR (HL) | |||
| 48986 | LD (HL),A | |||
| 48987 | DEC L | Move back to the first column and advance the sprite data pointer. | ||
| 48988 | INC DE | |||
| 48989 | INC H | Move down one pixel row in the screen buffer. | ||
| 48990 | LD A,H | Check if the pixel row has crossed a character boundary. | ||
| 48991 | AND C | |||
| 48992 | CALL Z,48517 | Call 48487 to adjust the screen address if needed. | ||
| 48995 | DJNZ 48979 | Decrease the row counter and loop back to Unused_Draw_3Wide_Row_Loop until all 8 rows are drawn. | ||
|
Apply attributes for the 3-wide sprite (two columns).
|
||||
| 48997 | LD D,1 | Set D to 1 (flag: two columns wide). | ||
| 48999 | POP HL | Restore the screen address from the stack. | ||
| 49000 | LD E,(IX+0) | Load the sprite X position from *IX+0 into E. | ||
| 49003 | CALL 49031 | Call Unused_Apply_3Wide_Attributes to apply the sprite attributes. | ||
| 49006 | RET | Return. | ||
|
Draw one column per row.
|
||||
| Unused_Draw_3Wide_1Col | 49007 | LD B,8 | Set the row counter to 8 in B. | |
| Unused_Draw_3Wide_1Col_Loop | 49009 | LD A,(DE) | OR the sprite data byte from *DE onto the screen at *HL. | |
| 49010 | OR (HL) | |||
| 49011 | LD (HL),A | |||
| 49012 | INC H | Move down one pixel row in the screen buffer. | ||
| 49013 | LD A,H | Check if the pixel row has crossed a character boundary. | ||
| 49014 | AND C | |||
| 49015 | CALL Z,48517 | Call 48487 to adjust the screen address if needed. | ||
| 49018 | INC DE | Advance the sprite data pointer. | ||
| 49019 | DJNZ 49009 | Decrease the row counter and loop back to Unused_Draw_3Wide_1Col_Loop until all 8 rows are drawn. | ||
|
Apply attributes for the 3-wide sprite (one column).
|
||||
| 49021 | POP HL | Restore the screen address from the stack. | ||
| 49022 | LD E,(IX+0) | Load the sprite X position from *IX+0 into E. | ||
| 49025 | LD D,0 | Set D to 0 (flag: one column wide). | ||
| 49027 | CALL 49031 | Call Unused_Apply_3Wide_Attributes to apply the sprite attributes. | ||
| 49030 | RET | Return. | ||
| Prev: 48940 | Up: Map | Next: 49031 |