Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!att!tut.cis.ohio-state.edu!ucbvax!pasteur!cory.Berkeley.EDU!morgan From: morgan@cory.Berkeley.EDU (Alan Morgan) Newsgroups: comp.sys.amiga.programmer Subject: Drawing images in intuition. HELP! Message-ID: <10330@pasteur.Berkeley.EDU> Date: 19 Jan 91 18:21:09 GMT Sender: news@pasteur.Berkeley.EDU Reply-To: morgan@cory.Berkeley.EDU (Alan Morgan) Distribution: usa Organization: University of California, Berkeley Lines: 72 I need help. I am trying to learn Amiga programming through Inside the Amiga with C (Waite Group) and ..short aside.. This is a terrible book. Do not buy it. NONE of the programs work as written. Most of the errors are pretty stupid and easily fixed for someone who knows C, some are not. Why am I still using it? My local bookstores don't carry any others and I need a little more handholding than the RKM's offer. ..aside off.. I cannot get this program to work, however, simple though it is. Could some kind soul tell me (email please, I am sure most other people on the net know the answer) why the borderless window pops up but nothing gets drawn. #include #include struct Window *NoBorder; struct RastPort *r; USHORT imagepts[]={ 0xffff,0x4ffe,0x3ffc,0x1ff8, 0x0ff0,0x17e0,0x03c0,0x03c0, 0x03c0,0x03c3,0x07f0,0x1fc0, 0x1ff8,0x3ffc,0x4ffe,0xffff }; struct Image picture = { 0,0,16,16,3,NULL,0x0001,0x0000,NULL}; /* ^ I also tried 1 here */ main() { ULONG flags; SHORT x,y,w,h; VOID OpenAll(); int i; OpenAll(); /* Opens up intuition for me */ x=y=0; w=640; h=200; flags=ACTIVATE|SMART_REFRESH|BORDERLESS; NoBorder = (struct Window *) makeWindow(x,y,w,h,NULL,flags,NULL,-0x01,-0x01,NULL); /* Creates a window with several boring characteristics */ picture.ImageData=imagepts; r=NoBorder->RPort; DrawImage(r,&picture,10,10); for(i=0;i<500000;i++); CloseWindow(NoBorder); } This is basically what is in the book, nothing of substance has been changed. I suppose I should add that the program compiles without error. Thanks in advance for erasing my ignorance (or at least the part of it extending to images). Alan Morgan morgan@cory.berkeley.edu