Advertisement
Sorceress

kots

Jun 14th, 2020
3,397
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QBasic 0.77 KB | None | 0 0
  1. path$ = "C:\rbs\"
  2. 'file$ = "GROUND3D.RB"
  3. file$ = "FOKKER.RB"
  4. 'file$ = "ALBATROS.RB"
  5.  
  6. DIM t AS INTEGER
  7. SCREEN _NEWIMAGE(640, 480, 32)
  8.  
  9. DO
  10.   CLS
  11.   a = a + .01
  12.   OPEN path$ + file$ FOR BINARY AS #1
  13.  
  14.   FOR i = 1 TO 256
  15.     GET #1, , t
  16.   NEXT
  17.  
  18.   FOR i = 1 TO 128
  19.     GET #1, , t: GOSUB en: x = t
  20.     GET #1, , t: GOSUB en: y = t
  21.     GET #1, , t: GOSUB en: z = t
  22.  
  23.     px = x * COS(a) - y * SIN(a)
  24.     py = x * SIN(a) + y * COS(a)
  25.     py = z - py
  26.  
  27.     c = 128 - py / 64
  28.     IF c < 64 THEN c = 64
  29.     IF c > 192 THEN c = 192
  30.  
  31.     px = 320 + px / 320
  32.     py = 240 - py / 480
  33.  
  34.     LINE (px, py)-(px + 3, py + 3), _RGB(c / 2, c, 255), BF
  35.   NEXT
  36.  
  37.   CLOSE #1
  38.   _DISPLAY
  39.   _LIMIT 60
  40.  
  41. LOOP
  42.  
  43. END
  44.  
  45.  
  46. en:
  47. t = t \ 256 + (t MOD 256) * 256 'swap endian
  48. RETURN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement