[A83] Re: 3 subroutines in 1
[Prev][Next][Index][Thread]
[A83] Re: 3 subroutines in 1
instead of:
> jp z,enemy_moveX
> jp GetKey
> enemy_moveX:
just do 'jp nz,Getkey'
- - Joe
>
> Is there anyway to compare a value and then not have to jp to another
> subrutine? All three of these is ment to delay the sprite movement, and
> then move the sprite. I would like all three to be in one routine. Do
you
> guys have any ideas?
>
>
> enemy_move:
> ld a,(Temp)
> inc a
> ld (Temp),a
> cp 100
> jp z,enemy_move2
> jp GetKey
> enemy_move2:
> ld a,0
> ld (Temp),a
> ld a,(Temp2)
> inc a
> ld (Temp2),a
> cp 100
> jp z,enemy_move3
> jp GetKey
> enemy_move3:
> ld l,0
> ld a,(EXpos)
> ld b,8
> ld ix,enemy_ship
> call ionPutSprite
> call ionFastCopy
> ld l,0
> ld a,(EXpos)
> ld b,8
> inc a
> ld (EXpos),a
> ld b,8
> ld ix,enemy_ship
> call ionPutSprite
> call ionFastCopy
> ld a,0
> ld (Temp),a
> ld (Temp2),a
> jp GetKey
>
>
>
References: