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
/
WINDISPL.CMD
< prev
Wrap
OS/2 REXX Batch file
|
1992-08-05
|
2KB
|
56 lines
;windispl -- copies the active image to the specified windows image
;
;syntax: windispl h #
; h - windows image
; # = display modifier:
; 1: load grey value LUT
; 2: load pseudo colour LUT
; 3: load bitplane LUT: bitpl. 1 = red
; 4: load bitplane LUT: bitpl. 1 = red, 2 = green, 3 = blue
; # = 16: 16 col. windows display - use dithering
; # = 16+8: 16 col. windows display - no dithering
; # = 256: 256 col. windows display
;
;Note: The '2' in the lut 3 2 ... function is an undocumented feature that prevents
; the WinImage from being updated when a new Windows LUT is loaded. This makes
; display less nervous.
#include timdefs.h
;#define LUTMASK 7
;#define DISPL_MASK 0xfff8
parms
file imag ;Win-image to fill
int imode
endparms
if (((improp imag) & WIN_BIT) != WIN_BIT) stop
switch (imode & LUTMASK) ;isolate LUT info
case WINLUT1 ;load greyvalue LUT
lut 3 2 1
; case WINLUT2 ;load pseudocolour LUT
; lut 3 2 1
; lut 3 2 5 6
case WINLUT3
lut 3 2 1 ;load bitplane LUT: bitpl. 1 = red
lut 3 2 7 1
case WINLUT4 ;load bitplane LUT: bitpl. 1 = red, 2 = green, 3 = blue
lut 3 2 1
lut 3 2 7 1
lut 3 2 8 2
lut 3 2 9 3
endsw
switch (imode & DISPL_MASK) ;remove LUT info
case 0
stop
case NO_DITHER
stop ;for NO_DITHER attr. with no image copy (0)
case COL16
sdot imag (imode & BITMASK) ;copy image using dithering
default
save imag ;copy image as is (also for COL16+NO_DITHER)
endsw
stop