![]() |
Routines |
| Prev: 69DF | Up: Map | Next: 6A31 |
|
Moves a streamer 08 pixels at a time in the direction it was fired. The streamer alternates between two sprites as it travels, and is removed if it hits a bug (see CheckWeaponHit) or reaches the edge of the play area.
|
||||||||
| UpdateStreamer | 69E8 | CALL StoreEntity | Remember the position and state using StoreEntity. | |||||
| 69EB | LD A,(IX+$05) | Jump to RemoveStreamer to remove the streamer if it has hit a bug. | ||||||
| 69EE | AND A | |||||||
| 69EF | JR NZ,RemoveStreamer | |||||||
| 69F1 | LD A,$08 | A=08 (the distance to move). | ||||||
| 69F3 | BIT 6,(IX+$00) | Jump to UpdateStreamer_Move if the streamer is moving right (bit 6 is not set). | ||||||
| 69F7 | JR Z,UpdateStreamer_Move | |||||||
| 69F9 | NEG | Negate the distance (move left). | ||||||
| UpdateStreamer_Move | 69FB | ADD A,(IX+$01) | Add the X position of the streamer. | |||||
| 69FE | CP $18 | Jump to RemoveStreamer to remove the streamer if it is past the left edge. | ||||||
| 6A00 | JR C,RemoveStreamer | |||||||
| 6A02 | CP $E0 | Jump to RemoveStreamer to remove the streamer if it is past the right edge. | ||||||
| 6A04 | JR NC,RemoveStreamer | |||||||
| 6A06 | LD (IX+$01),A | Write the new X position. | ||||||
|
Choose the sprite for the new position, using bit 3 of the X position.
|
||||||||
| 6A09 | AND $08 | Jump to UpdateStreamer_SecondSprite if bit 3 of the X position is not set. | ||||||
| 6A0B | JR Z,UpdateStreamer_SecondSprite | |||||||
| 6A0D | LD DE,$7991 | DE=Sprite_Streamer_1 (the first sprite). | ||||||
| UpdateStreamer_Draw | 6A10 | CALL SetUpSprite_Address | Set up the new sprite using SetUpSprite_Address. | |||||
| 6A13 | EXX | Switch to the shadow registers. | ||||||
|
Choose the sprite for the previous position in the same way.
|
||||||||
| 6A14 | LD A,($5E0B) | A=the previous X position from Actor. | ||||||
| 6A17 | AND $08 | Jump to UpdateStreamer_PreviousSecondSprite if bit 3 of the previous X position is not set. | ||||||
| 6A19 | JR Z,UpdateStreamer_PreviousSecondSprite | |||||||
| 6A1B | LD DE,$7991 | DE=Sprite_Streamer_1 (the first sprite). | ||||||
| UpdateStreamer_Previous | 6A1E | CALL SetUpPreviousSprite_Address | Set up the previous sprite using SetUpPreviousSprite_Address. | |||||
| 6A21 | CALL DisplayEntity_Compare | Erase the previous sprite and draw the new one using DisplayEntity_Compare. | ||||||
| 6A24 | JP ColouriseSprite | Jump to ColouriseSprite to colour the sprite. | ||||||
| UpdateStreamer_SecondSprite | 6A27 | LD DE,$79A2 | DE=Sprite_Streamer_2 (the second sprite). | |||||
| 6A2A | JR UpdateStreamer_Draw | Jump to UpdateStreamer_Draw. | ||||||
| UpdateStreamer_PreviousSecondSprite | 6A2C | LD DE,$79A2 | DE=Sprite_Streamer_2 (the second sprite). | |||||
| 6A2F | JR UpdateStreamer_Previous | Jump to UpdateStreamer_Previous. | ||||||
| Prev: 69DF | Up: Map | Next: 6A31 |