Showing changes from revision #1 to #2:
Added | Removed | Changed
Entry | |
---|---|
R0 | 35 (Reason code) + Area value |
R1 | Unused/Sprite area (as defined by area value in R0) |
R2 | Sprite name/pointer (as defined by area value in R0) for first sprite |
R3 | Sprite name/pointer (as defined by area value in R0) for second sprite |
R4 | Mode: |
0 → Merge horizontally | |
Otherwise → Merge vertically |
Exit | |
---|---|
All registers preserved |
This call is used to merge two sprites together, either horizontally or vertically. The second sprite will be merged into the first, either on the right hand side of the first sprite (for a horizontal merge), or on the bottom side (for a vertical merge). The second sprite will be deleted.
Both sprites must have identical mode words. If the sprites have palettes, no remapping of colours will be performed.
Usually this call will not attempt to grow the sprite area – the merge will be performed in-place. However if one sprite has a mask and the other doesn’t, the sprite which is missing a mask will have a default mask created, which will by necessity cause the sprite area to grow.
As this call moves and deletes sprites, you must discard any cached sprite pointers following the operation.
This operation will use Scratch Space for temporary storage.