Akalabeth Main Game File

31 thoughts
last posted April 5, 2014, 6 a.m.

30 earlier thoughts

0

If there's a wall on the left, we draw the part where it hits the ceiling and the floor:

216  IF LEFT = 1 OR LEFT = 3 OR LEFT = 4 THEN  HPLOT L1,T1 TO L2,T2: HPLOT L1,B1 TO L2,B2

And likewise the right:

218  IF RIGH = 1 OR RIGH = 3 OR RIGH = 4 THEN  HPLOT R1,T1 TO R2,T2: HPLOT R1,B1 TO R2,B2

If there's a 4 on the left (we still don't know what 4 is) we draw most based on LD%:

220  IF LEFT = 4 AND DIS > 0 THEN  HPLOT LD%(DIS,0),LD%(DIS,4) TO LD%(DIS,0),LD%(DIS,2) TO LD%(DIS,1),LD%(DIS,3) TO LD%(DIS,1),LD%(DIS,5)
222  IF LEFT = 4 AND DIS = 0 THEN  HPLOT 0,LD%(DIS,2) - 3 TO LD%(DIS,1),LD%(DIS,3) TO LD%(DIS,1),LD%(DIS,5)

And similarly on right, but mirror image:

224  IF RIGH = 4 AND DIS > 0 THEN  HPLOT 279 - LD%(DIS,0),LD%(DIS,4) TO 279 - LD%(DIS,0),LD%(DIS,2) TO 279 - LD%(DIS,1),LD%(DIS,3) TO 279 - LD%(DIS,1),LD%(DIS,5)
226  IF RIGH = 4 AND DIS = 0 THEN  HPLOT 279,LD%(DIS,2) - 3 TO 279 - LD%(DIS,1),LD%(DIS,3) TO 279 - LD%(DIS,1),LD%(DIS,5)

We need to draw some extra lines if we're not a WALL (or 3 or 4):

228 IF LEFT = 3 OR LEFT = 1 OR LEFT = 4 THEN 234

If the distance we're drawing is not zero, we draw a vertical line on the left:

230  IF DIS <  > 0 THEN  HPLOT L1,T1 TO L1,B1

and regardless of distance we draw another trapezoid:

232 HPLOT L1,T2 TO L2,T2 TO L2,B2 TO L1,B2

and we do the same for the right:

234  IF RIGH = 3 OR RIGH = 1 OR RIGH = 4 THEN 240
236  IF DIS <  > 0 THEN  HPLOT R1,T1 TO R1,B1
238  HPLOT R1,T2 TO R2,T2 TO R2,B2 TO R1,B2