home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 20
/
AACD20.BIN
/
AACD
/
Graphics
/
PerfectPaint
/
rexx
/
general
/
LoadADPro_Brush.rx
next >
Wrap
Text File
|
1999-12-10
|
2KB
|
98 lines
/* LoadAdpro Brush*/
options results
parse ARG Port b
IF ~SHOW('P','ADPro') THEN
DO
ADDRESS value Port
pp_Warn "Can't*locate*ADPro"
EXIT
END
ADDRESS COMMAND
d=0
if EXISTS('PerfectPaint:Prefs/Rexx_Prefs/LoadADPro_Brush') THEN DO
IF OPEN('lfile','PerfectPaint:Prefs/Rexx_Prefs/LoadADPro_Brush', "R") then DO
d = READLN('lfile')
CALL CLOSE('lfile')
END
END
ADDRESS value Port
pp_GetDepth
if result=24 then DO
a=24
END
else DO
a=2**result
pp_Psave 'ram:t/ppptemp'
END
IF a~=24 then DO
pp_DialogInit 250 90 "*Load*ADPro*Brush*" 1
pp_Cycle 0 100 20 100 16 "Dithering" 1 "No|Floyd" d
pp_Dialog
rc=result
if rc=0 then
do
EXIT
end
pp_GetDialog 0
d=result
CALL SavePrefs('LoadADPro_Brush',d)
ADDRESS 'ADPro'
ADPRO_TO_FRONT
AVAIL_MODES_ONLY OFF
PLOAD 'ram:t/ppptemp'
PSTATUS "LOCKED"
SFORMAT "IFF"
SCREEN_TYPE "NONINTERLACED"
RENDER_TYPE a
DITHER d
EXECUTE
SAVE 'ram:t/pptemp' "IMAGE"
END
ELSE DO
ADDRESS 'ADPro'
ADPRO_TO_FRONT
SAVE 'ram:t/pptemp' "RAW"
END
ADDRESS value Port
pp_ShowScreen
pp_BLoad 'ram:t/pptemp'
ADDRESS COMMAND
'delete >nil: ram:t/pptemp'
if a~=24 then DO
'delete >nil: ram:t/ppptemp'
END
EXIT
SavePrefs: PROCEDURE
Prefname='PerfectPaint:Prefs/Rexx_Prefs/'||ARG(1)
if EXISTS(Prefname) THEN DO
ADDRESS COMMAND
'delete >nil: '||Prefname
END
IF OPEN('pfile',PrefName,'W') THEN DO
do i=2 to ARG()
CALL WRITELN('pfile',ARG(i))
end
CALL CLOSE('pfile')
RETURN