'=========================================================================== ' Subject: RAYCASTING ROUTINE Date: 02-25-97 (20:00) ' Author: Andrew L. Ayers Code: QB, QBasic, PDS ' Origin: andrewa@indirect.com Packet: GRAPHICS.ABC '=========================================================================== DEFINT A-Z:DIM SHARED K,S,B&,Z&:V1 'Created by PostIt! 7.2 SUB V1:OPEN "O",1,"RAYCAST.ZIP",4^6:Z&=4577:?STRING$(50,177); U"%up()%9%%%I-%>J8aF-2(#0p%%%%W&%%%0%%%%wf&(hfx%ySif1yL_v%/%E-jhx U"Rgl[GN3T)^LQdk+\r3+?83)'b$S+x;o+)JTxqYDf\^&;*A>/E*\s:ei\.\?L>Io U"V^Z^EMFC][O^OG?luH'%up()%9%%%#-%:DmTG4n=vU;*7%%g5%%%0%%%%wf&(hf U"x%ySfxOrN&,+tTo5hLEsu,V24z_R=S+%B8gO,=^ToROx%g1wyy4,Z6F;k]P)(sp U"khhZG'lH\xiJs]I-&WDlhXBuGe%liH:M3_l=,]f$8(I7VqBOOJ.O*KCjmaU'q5s U"J_-m&U5?kcAf4U4h\_zS[REg3/LI4hTq/%bLc'66>v1$[>1Gq=oUW\mL.q2?V&c U"PWHpC*Gn=Wj:dLjPb3>ktY\:]B87_u08Fq'E4U>LLB:s^YRm]Hq;MG%R*I9Qd+Y U"3VG*'r(6H=>EbwG(PU2=A1_2BkwU'KI*bSfFNvC%H-TE7.d9^cU3xrIttrgUlWk U"P#/:,9]se<-#9R-eX1%RS>%D7#jjYIB>DmrKNeH.>*V7Bx9U\,>0^O;Dp[*jFEm U"/p%Wt>02h7Z4>fc\:l-NghfUp:l_r+Q\Ltm(-)TpQe,u$:WOb/\1f5vF$ao U",4cRqJ8RX$235Ck&igEbMil&&#c6IL;SOONoHP:qZha&j(^T>PC/us(]&50+GaK U"g-.(PZ:BuEjm^&h.Cj&.fHO2&P?%/zfw+O&IB81s4Bif^L#jOCXAD(H1bUw=C/t U"<8mJJC,r32qT7oA$m/A%t0>Y4<\rc&32jV(Omp U"uF28E4/-ZTg5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