home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / t / timwin.zip / TIMWIN2.EXE / pak / DEMO1.CMD < prev    next >
OS/2 REXX Batch file  |  1992-08-05  |  4KB  |  144 lines

  1. ;               TIM - DEMO                0
  2. ; TIMWIN Demo program 05/30/92       (c) TEA 1992
  3. ;
  4. ; The following variables are used:
  5. ; - imode
  6. ;    0     no win-images
  7. ; 1 - 4    Info for Win-images LUTs
  8. ;    16    use  16 colour win-images
  9. ;   256    use 256 colour win images 
  10. ; 0x400    use pop-up help (otherwise only @ F1)
  11. ;
  12. ;****************************************************
  13. int choice
  14. file timdemo = "timdemo.hlp"
  15. int imode
  16. int hmode = 1
  17. int config
  18. char message[128]
  19. string dtext = ""
  20. string htext = ""
  21.  
  22. dest p
  23. show p
  24. switch (config = *testcfg 0)    ;test configuration silently
  25.   case 0               ;if no frame grabber:
  26.     imode = 16         ;use 16-colour Windows image
  27.   case 6               ;if frame grabber in testconfig.
  28.     imode = 16         ;use 16-colour Windows image
  29.   case 15
  30.     imode = 0          ;frame grabber available
  31.   default
  32.     *testcfg 1         ;test again, print report
  33. ;    help timdemo "error configuration", 1
  34.     stop
  35. endsw
  36.  
  37. ;call fmessage   
  38.  
  39. *init
  40. *inilock
  41. pm:
  42. lcset standard
  43. help timdemo "demo program", hmode
  44.  
  45. repeat         ;repeat until ...
  46.  cls
  47.  *reset
  48. ; scrs 17, 1
  49. ; print message
  50. ; scrs 1, 1
  51.  print @8 @i "                TIMWIN DEMO                       " @n @r
  52.  print @18 "Choose one of the following: " @n @r
  53.  print @8 "Stop (return to interactive mode. . . . . . . . . . . . 0" 
  54.  print @8 "Check system setup  . . . . . . . . . . . . . . . . . . 1"
  55.  print @8 "Define settings     . . . . . . . . . . . . . . . . . . 2" @r 
  56.  print @8 "Free running demo's . . . . . . . . . . . . . . . . . . 3"
  57.  print @8 "Free running floating point intensive demo's  . . . . . 4"
  58.  print @8 "Real colour display demo's. . . . . . . . . . . . . . . 5"
  59.  print @8 "Run Demo's in Debug mode  . . . . . . . . . . . . . . . 6" @r
  60.  choice = "              Enter your choice . . . . . . . . . . . . . . .  "
  61.  
  62.  switch choice
  63.     case 1:
  64.       *testcfg 1
  65.       pause
  66.     case 2:
  67.       call getconf
  68.     case 3:
  69.       *dfrd imode timdemo hmode
  70.     case 4:
  71.       *dfrdf imode timdemo hmode
  72.     case 5:
  73.       *dfrdcol imode timdemo hmode
  74.     case 6: 
  75.       help timdemo "debug", hmode
  76.       debug                     ;continue in debug mode
  77.  endsw
  78. until choice == 0
  79.  
  80. cls
  81. stop
  82.  
  83. getconf:
  84.  cls
  85.  
  86.  print @8 @i "               Specify configuration                     " @n @r
  87.  print @18 "Choose one of the following: " @n @r
  88.  print @8 "Ready  . . . . . . . . . . . . . . . . . . . . . . . . 0" @r
  89.  print @8 "Display on frame grabber . . . . . . . . . . . . . . . 1" 
  90.  print @8 "Display using Windows images ( 16 colours) . . . . . . 2" 
  91.  print @8 "Display using Windows images (256 colours) . . . . . . 3" @r
  92.  print @8 "Help pages pop up automatically  . . . . . . . . . . . 4" 
  93.  print @8 "Wait at new help page  . . . . . . . . . . . . . . . . 5"
  94.  print @8 "Help pages on request (F1) only  . . . . . . . . . . . 6" @r
  95.  choice = "                Enter your choice . . . . . . . . . . . . . . "
  96.  
  97. switch choice
  98.   case 1
  99.     if config != 15
  100.       pause "You specified a frame grabber, but you don't have got one!"
  101.     else
  102.       imode = 0
  103.     endif
  104.   case 2
  105.     imode = 16
  106.   case 3
  107.     imode = 256
  108.   case 4
  109.     hmode = 2     ; 1024??
  110.   case 5
  111.     hmode = 1
  112.   case 6
  113.     hmode = 0
  114.   default
  115.     choice = 1    ;otherwise program stops
  116.     return
  117. endsw
  118.  
  119. ;call fmessage
  120. return
  121.  
  122.  
  123. fmessage:
  124. switch imode
  125.   case 0
  126. ;    dtext = "FrGrabber only"
  127.   case 16
  128. ;    dtext = "Windows (16 grv)"
  129.   case 256
  130. ;    dtext = "Windows (256 grv)"
  131. endsw
  132.  
  133. switch hmode
  134.   case 1024
  135. ;    htext = "Auto help"
  136.   case 0
  137. ;    htext = "on request"
  138. endsw
  139.  
  140. ;fprint message "Image display: %s   Help: %s\n", dtext, htext
  141.  
  142. return
  143.  
  144.