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 >
Wrap
OS/2 REXX Batch file
|
1992-08-05
|
4KB
|
144 lines
; TIM - DEMO 0
; TIMWIN Demo program 05/30/92 (c) TEA 1992
;
; The following variables are used:
; - imode
; 0 no win-images
; 1 - 4 Info for Win-images LUTs
; 16 use 16 colour win-images
; 256 use 256 colour win images
; 0x400 use pop-up help (otherwise only @ F1)
;
;****************************************************
int choice
file timdemo = "timdemo.hlp"
int imode
int hmode = 1
int config
char message[128]
string dtext = ""
string htext = ""
dest p
show p
switch (config = *testcfg 0) ;test configuration silently
case 0 ;if no frame grabber:
imode = 16 ;use 16-colour Windows image
case 6 ;if frame grabber in testconfig.
imode = 16 ;use 16-colour Windows image
case 15
imode = 0 ;frame grabber available
default
*testcfg 1 ;test again, print report
; help timdemo "error configuration", 1
stop
endsw
;call fmessage
*init
*inilock
pm:
lcset standard
help timdemo "demo program", hmode
repeat ;repeat until ...
cls
*reset
; scrs 17, 1
; print message
; scrs 1, 1
print @8 @i " TIMWIN DEMO " @n @r
print @18 "Choose one of the following: " @n @r
print @8 "Stop (return to interactive mode. . . . . . . . . . . . 0"
print @8 "Check system setup . . . . . . . . . . . . . . . . . . 1"
print @8 "Define settings . . . . . . . . . . . . . . . . . . 2" @r
print @8 "Free running demo's . . . . . . . . . . . . . . . . . . 3"
print @8 "Free running floating point intensive demo's . . . . . 4"
print @8 "Real colour display demo's. . . . . . . . . . . . . . . 5"
print @8 "Run Demo's in Debug mode . . . . . . . . . . . . . . . 6" @r
choice = " Enter your choice . . . . . . . . . . . . . . . "
switch choice
case 1:
*testcfg 1
pause
case 2:
call getconf
case 3:
*dfrd imode timdemo hmode
case 4:
*dfrdf imode timdemo hmode
case 5:
*dfrdcol imode timdemo hmode
case 6:
help timdemo "debug", hmode
debug ;continue in debug mode
endsw
until choice == 0
cls
stop
getconf:
cls
print @8 @i " Specify configuration " @n @r
print @18 "Choose one of the following: " @n @r
print @8 "Ready . . . . . . . . . . . . . . . . . . . . . . . . 0" @r
print @8 "Display on frame grabber . . . . . . . . . . . . . . . 1"
print @8 "Display using Windows images ( 16 colours) . . . . . . 2"
print @8 "Display using Windows images (256 colours) . . . . . . 3" @r
print @8 "Help pages pop up automatically . . . . . . . . . . . 4"
print @8 "Wait at new help page . . . . . . . . . . . . . . . . 5"
print @8 "Help pages on request (F1) only . . . . . . . . . . . 6" @r
choice = " Enter your choice . . . . . . . . . . . . . . "
switch choice
case 1
if config != 15
pause "You specified a frame grabber, but you don't have got one!"
else
imode = 0
endif
case 2
imode = 16
case 3
imode = 256
case 4
hmode = 2 ; 1024??
case 5
hmode = 1
case 6
hmode = 0
default
choice = 1 ;otherwise program stops
return
endsw
;call fmessage
return
fmessage:
switch imode
case 0
; dtext = "FrGrabber only"
case 16
; dtext = "Windows (16 grv)"
case 256
; dtext = "Windows (256 grv)"
endsw
switch hmode
case 1024
; htext = "Auto help"
case 0
; htext = "on request"
endsw
;fprint message "Image display: %s Help: %s\n", dtext, htext
return