![]() |
Routines |
| Prev: 35666 | Up: Map | Next: 35749 |
|
Position an alien or pickup sprite and draw it through MaskSprite.
|
||||||||||
Position an alien or pickup sprite and draw it.
|
||||||||||
| DrawObjectSprite | 35699 | CALL ReloadMaskCache | Call ReloadMaskCache. | |||||||
| 35702 | EXX | Switch to the shadow registers. | ||||||||
| 35703 | CALL PositionMaskSprite | Call PositionMaskSprite. | ||||||||
| 35706 | EXX | Switch back to the normal registers. | ||||||||
|
Compare the cached Y position with the actor Y.
|
||||||||||
| 35707 | LD A,(24150) | Subtract the actor Y from SpriteCachedY. | ||||||||
| 35710 | SUB (IX+4) | |||||||||
| 35713 | JP Z,MaskSprite_TestRemaining | Jump to MaskSprite_TestRemaining if they match. | ||||||||
| 35716 | JP M,DrawObjectSprite_ClipHeight | Jump to DrawObjectSprite_ClipHeight if the actor is below the cached position. | ||||||||
| 35719 | LD C,A | Store the Y difference in the row counter. | ||||||||
| 35720 | LD A,(24154) | Jump to MaskSprite_TestRemaining if the Y difference is greater than SpriteCachedRows. | ||||||||
| 35723 | CP C | |||||||||
| 35724 | JP C,MaskSprite_TestRemaining | |||||||||
| 35727 | SUB C | Subtract it from SpriteCachedRows and jump to MaskSprite. | ||||||||
| 35728 | LD (24154),A | |||||||||
| 35731 | JP MaskSprite | |||||||||
| DrawObjectSprite_ClipHeight | 35734 | EXX | Switch register sets and negate the Y difference. | |||||||
| 35735 | NEG | |||||||||
| 35737 | LD C,A | |||||||||
| 35738 | LD A,(24153) | Jump to MaskSprite_FinishSprite if the Y difference is greater than SpriteRowsLeft. | ||||||||
| 35741 | CP C | |||||||||
| 35742 | JP C,MaskSprite_FinishSprite | |||||||||
| 35745 | SUB C | Subtract it from the row count and jump to MaskSprite_StoreRowCount. | ||||||||
| 35746 | JP MaskSprite_StoreRowCount | |||||||||
| Prev: 35666 | Up: Map | Next: 35749 |