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
---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie