home *** CD-ROM | disk | FTP | other *** search
/ Amiga Computing 66 / ac066b.adf / AMOS.DMS / AMOS.adf / amos_3d_demos / Object_Look.AMOS / Object_Look.amosSourceCode
AMOS Source Code  |  1991-07-30  |  1KB  |  50 lines

  1. '
  2. '         Object invetigator (same as OL from the CLI) 
  3. '
  4. '                     By Nick Harper   
  5. '
  6. '           (c) Europress / VooDoo Software 1991 
  7. '
  8. '
  9. Screen Open 0,640,200,2,Hires
  10. Curs Off : Flash Off 
  11. POON:
  12. Pen 1 : Paper 0 : Palette 0,$FFF
  13. Cls 0
  14. Locate 1,1 : Centre "AMOS 3D Object investigator"
  15. Wait 25
  16. F$=Fsel$("*.3DO","","Load an OBJECT!")
  17. If F$="" Then Locate 1,5 : Centre "Back to AMOS..." : Wait 50 : Edit 
  18. Open In 1,F$
  19. Erase 10 : Reserve As Work 10,Lof(1) : Bload F$,Start(10)
  20. Close 
  21. ZERO=Start(10)
  22. PS=1 : NUM=0
  23. EURGH:
  24. If Peek(ZERO+PS)<>41 Then Inc PS : Goto EURGH
  25. PSS=PS : PS=1
  26. A$=""
  27. Repeat 
  28.    A$=A$+Chr$(Peek(ZERO+PS))
  29.    Inc PS
  30. Until PS=PSS
  31. NUM=ZERO+Val(A$)
  32. SET=0 : LT=0 : LINE=0 : Locate 1,2
  33. Print 
  34. Repeat 
  35.    A$=Chr$(Peek(NUM))
  36.    If A$="(" and SET=0 Then SET=1
  37.    If A$="2" and SET=1 Then Print "Surface  - Filename is ";
  38.    If A$="4" and SET=1 Then Print "Template - Filename is ";
  39.    If A$="e" and Peek(NUM+1)=110 and Peek(NUM+2)=100 and SET=3 Then LT=1 : SET=0
  40.    If A$=")" and SET=3 Then SET=0 : Print : Inc LINE
  41.    If SET=3 Then Print A$;
  42.    If A$="," and SET=2 Then SET=3
  43.    If A$="," and SET=1 Then SET=2
  44.    Inc NUM
  45.    If LINE>14 Then Locate 1,20 : Print "Note these now ! Press any key to continue" : Wait Key : LINE=0 : Ink 0 : Bar 0,16 To 640,200 : Locate 0,3
  46. Until LT=1
  47. Z=Free
  48. Repeat 
  49. Until Inkey$<>"" or Mouse Key<>0
  50. Goto POON