Sam_Yee@resbbs.UUCP (Sam Yee) (04/06/91)
I need help in making a custom screen having WB2.0 looks.
I am not a developer(not yet atleast) so I can't get any programming
docs on the new OS.
Here is an excerpt from my program:
---------------------------------------------------------------------
DRIF_NEWLOOK equ $00000001
NS_EXTENDED equ $1000
AUTOSCROLL equ $4000
V_HIRES equ $8000
DRI_VERSION equ $0001
newscrVars:
dc.w 0,0 ;left-edge/top-edge
dc.w 640,200 ;width / height
dc.w 3 ;bitplanes
dc.b 0,1 ;detailpen,blockpen
dc.w V_HIRES ;viewmode
dc.w CUSTOM!AUTOSCROLL!NS_EXTENDED ;type
dc.l 0 ;font
dc.l scrTitle ;title
dc.l 0 ;gadgets
dc.l 0 ;custombitmap
dc.l screenTag ;tagitem
screenTag:
dc.l SA_Pens ;ti_Tag
dc.l drawInfo ;ti_Data
drawInfo:
dc.w DRI_VERSION ;dri_Version
dc.w 10 ;dri_NumPens
dc.l penArray ;dri_Pens
dc.l 0 ;dri_Font
dc.w 3 ;dri_Depth
dc.w 640,200 ;dri_ResoltionX, dri_ResolutionY
dc.l DRIF_NEWLOOK ;dri_Flags
ds.b 28 ;dri_longreserved
penArray:
dc.b 3 ;detailpen
dc.b 1 ;blockpen
dc.b 3 ;textpen
dc.b 2 ;shinepen
dc.b 1 ;shadowpen
dc.b 3 ;fillpen
dc.b 1 ;filltextpen
dc.b 2 ;backgroundpen
dc.b 3 ;highlighttextpen
dc.b 8 ;numdripens(don't know what this does!)
cnop 0,2
;--------------------------------------------------------------------
I didn't use OpenScreenTagList(), but that shouldn't make a difference
since I set the NS_EXTENDED bit in the "type" field of the newscreen
structure.
My screen palette is the same as the new workbench's.
When screen opened the windows looked uglier than before.
What am I doing wrong?
Thanks in advance...
sam_yee@resbbs.wimsey.bc.ca
sam_yee@cc.sfu.cajesup@cbmvax.commodore.com (Randell Jesup) (04/07/91)
In article <Sam_Yee.3288@resbbs.UUCP> Sam_Yee@resbbs.UUCP (Sam Yee) writes: >Here is an excerpt from my program: >penArray: > dc.b 3 ;detailpen ... > dc.b 8 ;numdripens(don't know what this does!) Note: I'm pretty sure the pen list must end with ~0 (255). -- Randell Jesup, Keeper of AmigaDos, Commodore Engineering. {uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.commodore.com BIX: rjesup Disclaimer: Nothing I say is anything other than my personal opinion. Thus spake the Master Ninjei: "To program a million-line operating system is easy, to change a man's temperament is more difficult." (From "The Zen of Programming") ;-)
peter@cbmvax.commodore.com (Peter Cherna) (04/08/91)
In article <Sam_Yee.3288@resbbs.UUCP> Sam_Yee@resbbs.UUCP (Sam Yee) writes: >I need help in making a custom screen having WB2.0 looks. >I am not a developer(not yet atleast) so I can't get any programming >docs on the new OS. >newscrVars: Your NewScreen seems fine. >screenTag: > dc.l SA_Pens ;ti_Tag > dc.l drawInfo ;ti_Data No. SA_Pens takes a pointer to a UWORD array of Pens. It doesn't take a pointer to a DrawInfo. use dc.l penArray ; ti_Data for SA_Pens instead. Also, every tag list is terminated by TAG_END (which doesn't need a data item). So also add dc.l TAG_END ; end of tag-list >drawInfo: Omit this. DrawInfo structures are never allocated by the program; they're always make by Intuition. >penArray: > dc.b 3 ;detailpen Use dc.w for each pen, since the array is an array of UWORDs. > dc.b 8 ;numdripens(don't know what this does!) No, you don't put the number of pens at the end. Terminate the array with ~0. >I didn't use OpenScreenTagList(), but that shouldn't make a difference >since I set the NS_EXTENDED bit in the "type" field of the newscreen >structure. True... >sam_yee@resbbs.wimsey.bc.ca Peter -- Peter Cherna, Operating Systems Development Group, Commodore-Amiga, Inc. {uunet|rutgers}!cbmvax!peter peter@cbmvax.commodore.com My opinions do not necessarily represent the opinions of my employer. "If all you have is a hammer, everything looks like a nail."
dillon@overload.Berkeley.CA.US (Matthew Dillon) (04/09/91)
In article <20439@cbmvax.commodore.com> jesup@cbmvax.commodore.com (Randell Jesup) writes: >In article <Sam_Yee.3288@resbbs.UUCP> Sam_Yee@resbbs.UUCP (Sam Yee) writes: >>Here is an excerpt from my program: > >>penArray: >> dc.b 3 ;detailpen >... >> dc.b 8 ;numdripens(don't know what this does!) > > Note: I'm pretty sure the pen list must end with ~0 (255). Don't forget that you can simply have UWORD pens[] = { ~0 }; (i.e. no pens in the array) to request intuition give you the new-look defaults! -Matt >-- >Randell Jesup, Keeper of AmigaDos, Commodore Engineering. >{uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.commodore.com BIX: rjesup >Disclaimer: Nothing I say is anything other than my personal opinion. >Thus spake the Master Ninjei: "To program a million-line operating system >is easy, to change a man's temperament is more difficult." >(From "The Zen of Programming") ;-) -- Matthew Dillon dillon@Overload.Berkeley.CA.US 891 Regal Rd. uunet.uu.net!overload!dillon Berkeley, Ca. 94708 USA
stefanb@cip-s02.informatik.rwth-aachen.de (Stefan Becker) (04/09/91)
Hi!
The tag SA_Pens defines an array of pens. So it should read:
UWORD pens[]={0,.....,~0};
Open..... SA_Pens,pens....);
Stefan
Mail : Stefan Becker, Holsteinstrasse 9, D-5100 Aachen /// Only
Phone : +49-241-505705 FIDO: 2:242/7.6 Germany /// Amiga makes
Domain: stefanb@informatik.rwth-aachen.de \\\/// it possible..
Bang : ..mcvax!unido!rwthinf!stefanb \XX/ -->A3000/25<--