![]() |
Routines |
| Prev: 7339 | Up: Map | Next: 7382 |
|
Used by the routine at DrawFromOrigin.
Opcode F1 stores the source and destination from the picture record, patches the copy widths and loop stops, then copies pixels and attributes. The destination row counts down, so the rectangle is drawn upside down. ResetOrigin enters at SetOrigin_Copy.
|
||||||||
| SetOrigin | 733B | LD A,(IX+$01) | Write the source column to *SourceOrigin and *DestinationOrigin. | |||||
| 733E | LD ($7337),A | |||||||
| 7341 | LD ($7339),A | |||||||
| 7344 | LD A,(IX+$02) | Write the source row to *SourceOrigin_Row. | ||||||
| 7347 | LD ($7338),A | |||||||
| 734A | LD A,(IX+$03) | Write the destination row to *DestinationOrigin_Height. | ||||||
| 734D | LD ($733A),A | |||||||
| 7350 | LD A,(IX+$04) | Self-modify the copy widths at 7319 and 72E6. | ||||||
| 7353 | LD ($7319),A | |||||||
| 7356 | LD ($72E6),A | |||||||
| 7359 | LD A,(IX+$03) | Subtract the source row from the destination row. | ||||||
| 735C | SUB (IX+$02) | |||||||
| 735F | AND A | Halve that span. | ||||||
| 7360 | RRA | |||||||
|
This entry point is used by the routine at ResetOrigin.
Patch the loop stops and copy from the origin.
|
||||||||
| SetOrigin_Copy | 7361 | LD ($7333),A | Self-modify the loop stops at 7333 and 72FA. | |||||
| 7364 | LD ($72FA),A | |||||||
| 7367 | LD BC,($7337) | Fetch *SourceOrigin. | ||||||
| 736B | LD DE,($7339) | Fetch *DestinationOrigin. | ||||||
| 736F | PUSH BC | Stash BC and DE on the stack. | ||||||
| 7370 | PUSH DE | |||||||
|
Copy the pixels, then put the origins back.
|
||||||||
| 7371 | CALL CopyOrigin_Pixels | Call CopyOrigin_Pixels. | ||||||
| 7374 | POP DE | Restore DE and BC from the stack. | ||||||
| 7375 | POP BC | |||||||
| 7376 | LD ($7337),BC | Write BC to *SourceOrigin. | ||||||
| 737A | LD ($7339),DE | Write DE to *DestinationOrigin. | ||||||
|
Copy the attributes.
|
||||||||
| 737E | CALL CopyOrigin_Attributes | Call CopyOrigin_Attributes. | ||||||
| 7381 | RET | Return. | ||||||
| Prev: 7339 | Up: Map | Next: 7382 |