home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
300 Favorite Games
/
300GAMES.iso
/
316
/
corner.atr
< prev
next >
Wrap
Text File
|
1992-02-15
|
4KB
|
234 lines
; Corner.ATR Ed T. Toton III 2/15/92
#spd 8
#def goto_corner
#def move
#def x
#def y
#def move_time
#def shoot
#def fire
#def accuracy
set goto_corner 100
set move 500
set move_time 0
set shoot 1000
set accuracy 0
set fire 2000
gsb goto_corner
;MAIN
:1
;If it's been a while, pick a new corner.
add move_time move_time 1
cmp move_time 10
jgr move 1
;Ok, let's go for it!
gsb shoot
jmp 1
;Move
:500
set move_time 0
gsb goto_corner
RET
;Fire
:2000
ipo 8 accuracy
opo 15 accuracy
opo 14 accuracy
RET
;Shoot
:1000
cmp y 1
jeq 1001
jmp 1002
ret
:1001
cmp x 1
jeq 1011
jmp 1021
ret
:1002
cmp x 1
jeq 1031
jmp 1041
ret
:1011
set ax 0
int 8
ipo 3 ax
cmp ax 0
jne 1011
do 18
:1012
opo 14 5
ipo 7 ax
cmp ax 5000
jls fire 1
loop 1012
ret
:1021
set ax 0
int 8
ipo 3 ax
cmp ax 0
jne 1021
do 18
:1022
opo 14 -5
ipo 7 ax
cmp ax 5000
jls fire 1
loop 1022
ret
:1031
set ax 180
int 8
ipo 3 ax
cmp ax 180
jne 1031
do 18
:1032
opo 14 -5
ipo 7 ax
cmp ax 5000
jls fire 1
loop 1032
ret
:1041
set ax 180
int 8
ipo 3 ax
cmp ax 180
jne 1041
do 18
:1042
opo 14 5
ipo 7 ax
cmp ax 5000
jls fire 1
loop 1042
ret
RET
;Goto_corner
:100
;Choose up or down
cmp 10030 5000
jls 101
set y 1
gsb 111
jmp 103
:101
set y 2
gsb 121
:103
;Choose left or right.
cmp 10030 5000
jls 102
set x 1
jmp 131
jmp 104
:102
set x 2
jmp 141
:104
RET
; Go Down
:111
set ax 180
int 8
ipo 3 ax
cmp ax 180
jne 111
opo 11 100
del 9
:112
ipo 1 ax
cmp ax 0
jgr 112
RET
; Go Up
:121
set ax 0
int 8
ipo 3 ax
cmp ax 0
jne 121
opo 11 100
del 9
:122
ipo 1 ax
cmp ax 0
jgr 122
RET
; Go Left
:131
set ax 270
int 8
ipo 3 ax
cmp ax 270
jne 131
opo 11 100
del 9
:132
ipo 1 ax
cmp ax 0
jgr 132
RET
; Go Right
:141
set ax 90
int 8
ipo 3 ax
cmp ax 90
jne 141
opo 11 100
del 9
:142
ipo 1 ax
cmp ax 0
jgr 142
RET