![]() |
Routines |
Prev: 26964 | Up: Map | Next: 27005 |
Draw player ship and scroll it into position. Called with _PLAYER_XPOS and _PLAYER_YPOS holding screen location of new ship.
Used by the routine which draws lives remaining at the top, and when the a new life appears at the bottom after dying
|
||||
new_player_ship | 26965 | PUSH IX | ||
26967 | PUSH HL | |||
26968 | LD A,255 | Set up adjustment of -1, which means 1 pixel left | ||
26970 | LD (_YPOS_ADJUST),A | |||
26973 | LD A,(_PLAYER_XPOS) | Player ship pos, X | ||
26976 | LD (_NEW_SHIP_TARGET_XPOS),A | Store the final xpos (where the scroll finishes) | ||
26979 | ADD A,40 | Start 40 pixels right of final position | ||
26981 | LD (_PLAYER_XPOS),A | Set player ship xpos and draw the ship there. Returns with xpos pointed to by IX. | ||
new_player_ship_0 | 26984 | CALL redraw_player_ship | ||
26987 | CALL sound_burbler | Sound burbler with move player ship sound | ||
26990 | DEFB 1,15,0 | |||
Sound burbler return point
|
||||
26993 | LD A,(_NEW_SHIP_TARGET_XPOS) | Pick up xpos where we're moving the ship to | ||
26996 | CP (IX+0) | Are we there? Adjustment is still -1 so we keep going round until the ship is in place | ||
26999 | JR NZ,new_player_ship_0 | |||
27001 | POP HL | |||
27002 | POP IX | |||
27004 | RET |
Prev: 26964 | Up: Map | Next: 27005 |