| Gyruss | Routines |
| Prev: 865A | Up: Map | Next: 86DE |
|
Used by the routine at handle_sprite_type_02.
|
||||||||||
| handle_sprite_types_04_0C | 867D | CP $04 | Is sprite type < $04 | |||||||
| 867F | JR C,handle_sprite_type_14 | Then jump | ||||||||
| 8681 | CP $0D | Is it >= $0D | ||||||||
| 8683 | JR NC,handle_sprite_type_14 | Then jump | ||||||||
|
Sprite types $04 - $0C (enemy remains, numbers)
|
||||||||||
| 8685 | DEC (IX+$03) | Decrement counter | ||||||||
| 8688 | RET NZ | Return if not zero | ||||||||
| 8689 | INC (IX+$00) | Increment sprite type | ||||||||
| 868C | LD (IX+$03),$0F | Reset counter | ||||||||
| 8690 | CP $04 | Is sprite type destroyed enemy? | ||||||||
| 8692 | RET Z | Then return | ||||||||
| 8693 | LD A,(IX+$06) | Else get replacement type (probably number) | ||||||||
| 8696 | OR A | If zero | ||||||||
| 8697 | JP Z,deallocate_sprite | Then deallocate sprite | ||||||||
| 869A | LD (IX+$00),A | Set new type | ||||||||
| 869D | LD (IX+$03),$3C | Counter | ||||||||
| 86A1 | LD (IX+$06),$00 | No replacement type | ||||||||
| 86A5 | LD (IX+$0B),$0F | Set color | ||||||||
| 86A9 | LD (IX+$04),$FF | Set loaded patten index to none | ||||||||
| 86AD | RST $30 | Load sprite pattern | ||||||||
| 86AE | PUSH IX | Save sprite data address | ||||||||
| 86B0 | RST $28 | Allocate new sprite for last digits of points | ||||||||
| 86B1 | POP IY | IY = old sprite | ||||||||
| 86B3 | LD (IX+$00),$0C | Set type if new sprite (number 00) | ||||||||
| 86B7 | LD (IX+$03),$3C | Counter | ||||||||
| 86BB | LD (IX+$0B),$0F | Set color | ||||||||
| 86BF | LD (IX+$01),$00 | Set polar y | ||||||||
| 86C3 | LD (IX+$02),$00 | Set polar x | ||||||||
| 86C7 | LD (IX+$06),$00 | No replacement type | ||||||||
| 86CB | RST $30 | Load sprite pattern | ||||||||
| 86CC | LD A,(IY+$08) | Get screen y of old sprite | ||||||||
| 86CF | LD (IX+$08),A | Set screen y of new sprite | ||||||||
| 86D2 | LD A,(IY+$09) | Get screen x of old sprite | ||||||||
| 86D5 | ADD A,$08 | Add 8 | ||||||||
| 86D7 | LD (IX+$09),A | Set screen x of new sprite | ||||||||
| 86DA | POP BC | Pop return address | ||||||||
| 86DB | JP return_from_sprite_handler_0 | Jump back into sprite handler loop | ||||||||
| Prev: 865A | Up: Map | Next: 86DE |