Blitz (156/176)

From:Nick Clover
Date:31 Jul 2001 at 13:47:49
Subject:Reading screenmode from an ILBM

Greetings,

I use the following code to read the screenmode of an ILBM but
it only gets the lowerhalf, so only amiga screen modes are available.

How do I access the full 8 bytes so I can pass it to a screentag
(for use with rtg systems) ?

Function.l ILBMMode2 {pic$}
picmode.l=False
If ReadFile(0,pic$) ; read file header
FileInput 0
header$ = Inkey$(2000) ; read 2000 bytes
CloseFile 0
PopInput

If Left$(header$,4)= "FORM" AND Mid$(header$,9,4) = "ILBM"
x.l=Instr(header$,"CAMG") ; Find screenmode hunk
If x<>0
picmode=PeekL(&header$+x+7)
EndIf
EndIf
EndIf
Function Return picmode
End Function

Cheers






Nick Clover



A4000/060, 64Mb, PicassoIV, Paloma, KTX 17" Monitor, Punchinello II

IDE: 10.1 & 13.8 Gb HD, SCSI: Fujitsu 18Gb HD, Sony CDU625-S CD

2x Sony CDD2600 CDR, Aiwa ACD300, Ricoh 8x8x32 CDrw

Brother HL1250 Laser, HP890c Inkjet, Generic V90 Modem, Trust Ergo Keyboard


---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie