![]() |
Routines |
| Prev: F804 | Up: Map | Next: F8B4 |
|
Used by the routine at Draw_Entity.
Draws a left-facing entity by shifting each tile left.
|
||||
| Advance_Entity_Target | F833 | AND %01111111 | Keep only bits 0-6. | |
| F835 | LD ($5C8F),A | Write the colour to *ATTR_T. | ||
| F838 | LD A,($F917) | Add 08 to the shift count at F917 and write it to F870. | ||
| F83B | ADD A,$08 | |||
| F83D | LD ($F870),A | |||
| F840 | LD DE,($5C36) | DE=*CHARS. | ||
| F844 | LD HL,($F936) | Copy the stored stride from F936 into the add at F88E. | ||
| F847 | LD ($F88E),HL | |||
| F84A | XOR A | Clear the self-modified OR at Advance_Entity_Merge. | ||
| F84B | LD H,A | |||
| F84C | LD ($F881),A | |||
| F84F | LD A,(IX+$06) | Point HL at the last source tile of this frame. | ||
| F852 | ADD A,(IX+$04) | |||
| F855 | DEC A | |||
| F856 | LD L,A | |||
| F857 | ADD HL,HL | |||
| F858 | ADD HL,HL | |||
| F859 | ADD HL,HL | |||
| F85A | ADD HL,DE | |||
| F85B | LD E,(IX+$04) | DE=the sprite width and height. | ||
| F85E | LD D,(IX+$05) | |||
| F861 | PUSH HL | Copy HL to IX (using the stack). | ||
| F862 | POP IX | |||
| F864 | LD HL,$5CBE | HL=5CBE. | ||
| Advance_Entity_Continue | F867 | PUSH IX | Stash the source pointer and remaining size. | |
| F869 | PUSH DE | |||
| Advance_Entity_Continue2 | F86A | PUSH IX | Stash the source pointer on the stack. | |
| F86C | LD B,$08 | B=08. | ||
| Advance_Entity_Target2 | F86E | PUSH BC | Stash the row count. | |
| Advance_Entity_ShiftCount | F86F | LD B,$FF | B=the shift count (self-modified). | |
| F871 | LD C,(IX+$00) | Load the next source byte. | ||
| F874 | XOR A | |||
| F875 | LD E,A | |||
| Advance_Entity_Target3 | F876 | SLA C | Shift one source bit into the overflow bytes. | |
| F878 | RR A | |||
| F87A | RR E | |||
| F87C | DJNZ Advance_Entity_Target3 | |||
| F87E | LD (IY+$00),E | Write the overflow bits to the next column. | ||
| Advance_Entity_Merge | F881 | NOP | Self-modified: NOP or OR (HL). | |
| F882 | LD (HL),A | Write the rotated byte. | ||
| F883 | INC HL | Advance the destination and source pointers. | ||
| F884 | INC IX | |||
| F886 | INC IY | |||
| F888 | POP BC | Restore the row count from the stack. | ||
| F889 | DJNZ Advance_Entity_Target2 | Decrease the count and loop back to Advance_Entity_Target2. | ||
| F88B | POP IX | Restore the source pointer from the stack. | ||
| Advance_Entity_Stride | F88D | LD BC,$0000 | BC=the stored stride (self-modified). | |
| F890 | ADD IX,BC | Advance to the next source column and loop back to Advance_Entity_Continue2. | ||
| F892 | DEC D | |||
| F893 | JR NZ,Advance_Entity_Continue2 | |||
| F895 | LD A,$B6 | Write OR (HL) into *Advance_Entity_Merge. | ||
| F897 | LD ($F881),A | |||
| F89A | XOR A | A=00. | ||
| F89B | LD B,$08 | B=08. | ||
| Advance_Entity_Target4 | F89D | LD (HL),A | Clear one overflow byte and loop back to Advance_Entity_Target4. | |
| F89E | LD (IY+$00),A | |||
| F8A1 | INC HL | |||
| F8A2 | INC IY | |||
| F8A4 | DJNZ Advance_Entity_Target4 | |||
| F8A6 | POP DE | Step back one source character and loop back to Advance_Entity_Continue, then jump to Draw_Entity_Target4. | ||
| F8A7 | POP IX | |||
| F8A9 | LD BC,$FFF8 | |||
| F8AC | ADD IX,BC | |||
| F8AE | DEC E | |||
| F8AF | JR NZ,Advance_Entity_Continue | |||
| F8B1 | JP Draw_Entity_Target4 | |||
| Prev: F804 | Up: Map | Next: F8B4 |