glados: lasers go through portals now

This commit is contained in:
Vince Weaver 2017-01-09 13:46:03 -05:00
parent 2a08dfcf90
commit e159e71af7

View File

@ -16,7 +16,7 @@
10 HOME:HGR:SCALE=2:ROT=0:HCOLOR=4:HPLOT 0,0:CALL 62454
11 POKE 232,0:POKE 233,29
12 PRINT CHR$(4)+"BLOAD OBJECTS.SHAPE,A$1D00"
20 CX=21:CY=100:CD=0:VX=0:VY=0:SX=140:SY=80:BO=0:GO=0:T=0:ZY=42:ZX=0
20 CX=21:CY=100:CD=0:VX=0:VY=0:SX=140:SY=80:BO=0:GO=0:T=0:ZY=42:ZX=0:PX=0:PY=0
21 GOSUB 1000
22 SCALE=2:XDRAW 1 AT SX,SY
25 SCALE=1:XDRAW 3 AT CX,CY
@ -39,7 +39,7 @@
56 IF A$=" " THEN VY=5
58 IF A$="H" THEN GOSUB 5000
60 IF A$="," THEN GOSUB 6000
62 IF A$="." THEN GOSUB 7000
62 IF A$="." THEN GOSUB 6100
' PHYSICS ENGINE
100 CY=CY-VY
105 VY=VY-4.5
@ -105,7 +105,7 @@
1039 HPLOT 249,47 TO 250,47:HPLOT 250,48 TO 251,48:HPLOT 250,49 TO 251,49
1040 HCOLOR=5:HPLOT 244,41 TO 245,41:HPLOT 244,43 TO 245,43
' LASER
1042 HPLOT 0,ZY TO 240,ZY
1042 HPLOT ZX,ZY TO 240,ZY
'
' COMPANION CUBE
' 0123456789012
@ -158,15 +158,29 @@
6005 IF BO=1 THEN XDRAW 2 AT BX,BY
6010 BX=SX:BY=SY
6020 BO=1:XDRAW 2 AT BX,BY
6025 IF BO=1 AND GO=1 THEN GOTO 7000
6030 RETURN
' DRAW ORANGE PORTAL
7000 REM DRAW ORANGE
6100 REM DRAW ORANGE
' Erase old
7004 SCALE=2
7005 IF GO=1 THEN XDRAW 2 AT GX,GY
7010 GX=SX+1:GY=SY
7020 GO=1:XDRAW 2 AT GX,GY
7030 RETURN
6104 SCALE=2
6105 IF GO=1 THEN XDRAW 2 AT GX,GY
6110 GX=SX+1:GY=SY
6120 GO=1:XDRAW 2 AT GX,GY
6125 IF BO=1 AND GO=1 THEN GOTO 7000
6130 RETURN
'
' Handle Laser/Portal Interaction
7000 REM
7010 IF ((ZY>BY-7 AND ZY<BY+7) OR (ZY>GY-7 AND ZY<GY+7)) THEN 7030
7020 GOTO 7500
' ERASE OLD
7030 HCOLOR=4:HPLOT ZX,ZY TO 240,ZY:HPLOT PX,PY TO 0,PY
7032 ZX=BX:IF GX>BX THEN ZX=GX
7034 HCOLOR=5:HPLOT ZX,ZY TO 240,ZY
7036 PX=GX:PY=GY:IF GX>BX THEN PX=BX:PY=BY
7040 HPLOT PX,PY TO 0,PY
7500 RETURN
'
' Turret Talking
'