home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 28
/
amigaformatcd28.iso
/
-seriously_amiga-
/
programming
/
amos
/
pic2txt
/
pic2txt10.amos
/
pic2txt10.amosSourceCode
Wrap
AMOS Source Code
|
1998-05-09
|
1KB
|
53 lines
On Error Proc ERR
Resume Label 1
Dim A$(15),Z$(31)
A$(0)="#" : A$(1)="@" : A$(2)="0" : A$(3)="8" : A$(4)="%" : A$(5)="X"
A$(6)="2" : A$(7)="�" : A$(8)=Chr$(177) : A$(9)=Chr$(215) : A$(10)="+"
A$(11)="=" : A$(12)=":" : A$(13)="-" : A$(14)=Chr$(183) : A$(15)=" "
1 Screen Open 0,640,256,2,Hires : Palette $AAA,$0 : Curs Off
Locate 0,0 : Centre "PIC-2-TXT V1.0"
Cdown : Centre "Written by Robert Ciesnik"
Cdown : Centre "Copyright �1998 R-SOFT Entertainment Inc."
For Y=0 To 31 : Z$(Y)="" : Next Y
F$=Fsel$("","","PIC-2-TXT V1.0","Select an IFF-Picture")
If F$="" Then End
Load Iff F$,1
Screen 1
X=Screen Width : Y=Screen Height
Z=Screen Colour
Screen Open 2,320,256,Z,Lowres : Curs Off : Flash Off
Screen 2
Get Palette 1
Zoom 1,0,0,X,Y To 2,0,0,80,32
Screen Close 1
Screen 2
For Y=0 To 31
For X=0 To 79
R= Extension_12_0470(X,Y)
D=Val("$"+Right$(Hex$( Extension_20_0020(Colour(R))),1))
D$=Hex$(D)-"$"
Z$(Y)=Z$(Y)+A$(D)
Next X
Extension_12_0394 80,Y,1
Extension_12_0394 81,Y,0
Next Y
Screen Close 2
Screen 0
Locate 0,0
For Y=0 To 31 : Print Z$(Y); : Next Y
Repeat : Until Mouse Key=0
Repeat : Until Mouse Key
F$=Fsel$("","","PIC-2-TXT V1.0","Save Ascii-Picture")
If F$="" Then Goto 1
Open Out 1,F$
For Y=0 To 31
Print #1,Z$(Y);
Print #1,Chr$(10);
Next Y
Print #1,"PIC-2-TXT V1.0 <-> Copyright �1998 R-SOFT Entertainment Inc.";Chr$(10);
Close 1
Goto 1
Procedure ERR
A= Extension_18_09E8("ERROR:",Err$(Errn)," "," FORGET IT "," FORGET IT ")
Resume Label
End Proc