home *** CD-ROM | disk | FTP | other *** search
- ;Randman. Ed T. Toton III 2/11/92
-
- ; define vars
- #def armor
- #def hitcheck
- #def hit
- #def accuracy
- #def x
- #def y
-
-
- ; Settings...
- set hitcheck 50
- opo 18 9
- opo 20 1000
- opo 13 0
- opo 22 0
- gsb 4000
- opo 11 100
-
-
- ; Main loop...
- :1
- ;Shift 19
- opo 12 19
-
- ;if enemy gosub 1000
- ipo 7 az
- cmp az 5000
- jls 1000 1
-
- ;if hit gosub 2000
- set hit 0
- gsb hitcheck
- cmp hit 0
- jne 4000 1
-
- ;if heat>350 gosub 8999
- ipo 2 az
- cmp az 350
- jgr 8999 1
-
- ;Get location
- int 5
-
- ;if enemy gosub 1000
- ipo 7 az
- cmp az 5000
- jls 1000 1
-
- ;Scenario 1
- cmp bx 950
- jgr 4001 1
-
- ;Scenario 2
- cmp bx 50
- jls 4002 1
-
- ;Scenario 3
- cmp by 950
- jgr 4003 1
-
- ;Scenario 4
- cmp by 50
- jls 4004 1
-
-
- jmp 1
-
-
-
- ; Shooting sub-routine...
- :1000
-
- ;fire
- ipo 8 accuracy
- opo 15 accuracy
-
- ;if hit gosub 2000
- set hit 0
- gsb hitcheck
- cmp hit 0
- jne 2000 1
-
- ;if enemy goto 1000
- ipo 7 az
- cmp az 5000
- jls 1000
-
- ret
-
-
-
-
- ;Veer off...
- :2000
-
- ;radnspin
- gsb 4000
-
- ;Delay 9 & move 100
- del 9
- opo 11 100
-
- ret
-
-
-
-
- ; Cool-down subroutine...
- :8999
-
- ;if heat>100 goto 8999
- ipo 2 az
- cmp az 100
- jgr 8999
-
- ret
-
-
-
-
- ;Hitcheck
- :50
- ;read and compare armor
- ipo 6 az
- cmp az armor
-
- ;if no damage then simply exit.
- jeq 51
-
- ;if hit, then say so!
- set armor az
- set hit 1
- :51
- ret
-
-
-
-
- ;Randspin
- :4000
- ;Randspin
- set az 10030
- mod az az 360
-
- ;Get location
- int 5
-
- ;Scenario 1
- cmp bx 950
- jgr 4001
-
- ;Scenario 2
- cmp bx 50
- jls 4002
-
- ;Scenario 3
- cmp by 950
- jgr 4003
-
- ;Scenario 4
- cmp by 50
- jls 4004
-
- ;Last resort (not near a wall)
- opo 14 az
-
- ret
- ;Scenario 1
- :4001
- mod az 10030 180
- sub ax 0 az
- int 7
- ret
- ;Scenario 2
- :4002
- mod ax 10030 180
- int 7
- ret
- ;Scenario 3
- :4003
- mod az 10030 180
- sub ax az 90
- int 7
- ret
- ;Scenario 4
- :4004
- mod az 10030 180
- add ax az 90
- int 7
- ret
-
-
- ; End of program!!
-