Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!sdd.hp.com!wuarchive!uunet!mcsun!hp4nl!fwi.uva.nl!gene!bosman From: bosman@fwi.uva.nl (Dr.D) Newsgroups: comp.sys.amiga.programmer Subject: Why does this GURU??? Message-ID: <1991Jun13.113948.3806@fwi.uva.nl> Date: 13 Jun 91 11:39:48 GMT Sender: news@fwi.uva.nl Organization: FWI, University of Amsterdam Lines: 142 Nntp-Posting-Host: quincy.fwi.uva.nl I have here a little program (small part of a larger one) that gurus. But I can't figure out why.. Maybe some of you guys see what I do wrong.. it gurus at the WritePixel..... ------------------------------------------------------ #include "exec/types.h" #include "intuition/intuition.h" struct Window *NoBorder; struct RastPort *r; struct GfxBase *GfxBase; struct Screen *Scrn; main() { char c; ULONG flags; SHORT x,y,w,h,d,c0,c1; USHORT mode; VOID delay_func(); OpenAll(); /* open a hires custom screen */ y=0; w=640; h=400; d=4; c0=0x00; c1=0x01; mode=HIRES; Scrn = (struct Screen *)make_screen(y,w,h,d,c0,c1,mode,"TESTSCREEN"); /* Open a borderless window */ x=y=40; w=500; h=200; flags=ACTIVATE|SMART_REFRESH; NoBorder = (struct Window *)make_window(x,y,w,h,"window",flags,NULL,-1,-1,Scrn); if (NoBorder == NULL) {printf("errortje"); exit(1); } c=getchar(); WritePixel(NoBorder->RPort,(long)20,(long)20); c=getchar(); /* delay for a bit */ delay_func(100); /* Close down everything */ CloseWindow(NoBorder); CloseScreen(Scrn); } VOID delay_func(factor) int factor; { int loop; for(loop=0;loop make_screen(y,w,h,d,color0,color1,mode,name) SHORT y,w,h,d; UBYTE color0,color1,*name; USHORT mode; { struct NewScreen NS; NS.LeftEdge=0; NS.TopEdge=y; NS.Width=w; NS.Height=h; NS.Depth=d; NS.DetailPen=color0; NS.BlockPen=color1; NS.ViewModes=mode; NS.Type=CUSTOMSCREEN; NS.Font=NULL; NS.DefaultTitle=name; NS.Gadgets=NULL; NS.CustomBitMap=NULL; return(OpenScreen(&NS)); } make_window(x,y,w,h,name,flags,iflags,color0,color1,screen) SHORT x,y,w,h; UBYTE *name,color0,color1; ULONG flags; USHORT iflags; struct Screen *screen; { struct NewWindow NW; NW.LeftEdge=x; NW.TopEdge=y; NW.Width=w; NW.Height=h; NW.DetailPen=color0; NW.BlockPen=color1; NW.Title=name; NW.Flags=flags; NW.IDCMPFlags=iflags; NW.Type=CUSTOMSCREEN; NW.Screen = screen; NW.FirstGadget=NULL; NW.CheckMark=NULL; NW.Screen=screen; NW.BitMap=NULL; NW.MinWidth=0; NW.MinHeight=0; NW.MaxWidth=0; NW.MaxHeight=0; return(OpenWindow(&NW)); } struct IntuitionBase *IntuitionBase; #define INTUITION_REV 33L OpenAll() { IntuitionBase=(struct IntuitionBase *) OpenLibrary("intuition.library",INTUITION_REV); if(IntuitionBase == NULL) exit(FALSE); } -- |bosman@fwi.uva.nl_ // | Honest Officer , had I known my health | |-----------------\\ //AMIGA| stood in jeopardy I would never had lit one. | | [ PE ] \// | -MAXIM (of the Hells Angels)- | |__________ Quickly Scotty,beam me up.There is no ox..y..ge...______________|