![]() |
Routines |
Prev: 31922 | Up: Map | Next: 31984 |
Draws or clears a sprite using a sequence of pixel sets or clears.
Used by the routines at spaceship_handler, move_alien_bullet, clear_alien_bullet_sprite, redraw_player_ship, draw_player_bullet and clear_player_bullet.
|
||||||||||||||||
sprite_draw_or_clear | 31960 | CALL prime_update_pixel_trampoline | Prime jump at 32362, consumes A | |||||||||||||
sprite_draw_or_clear_0 | 31963 | LD A,(HL) | Pick up next byte in sequence. x_offset End if negative number | |||||||||||||
31964 | INC HL | |||||||||||||||
31965 | OR A | |||||||||||||||
31966 | RET M | |||||||||||||||
31967 | ADD A,(IX+0) | IX+0 points to xpos | ||||||||||||||
31970 | LD C,A | C=xpos + x_offset | ||||||||||||||
31971 | LD A,(HL) | Pick up next byte in sequence. y_offset | ||||||||||||||
31972 | INC HL | |||||||||||||||
31973 | ADD A,(IX+1) | IX+1 points to ypos | ||||||||||||||
31976 | LD B,A | B=ypos + y_offset | ||||||||||||||
31977 | PUSH HL | |||||||||||||||
31978 | CALL update_pixel | Update pixel at C,B according to input mode | ||||||||||||||
31981 | POP HL | |||||||||||||||
31982 | JR sprite_draw_or_clear_0 | Go back for next pixel in the sprite data |
Prev: 31922 | Up: Map | Next: 31984 |