Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!ucsd!ucbvax!decwrl!video.dec.com!leibow From: leibow@video.dec.com (MICHAEL LEIBOW) Newsgroups: comp.sys.amiga.tech Subject: superbitmap windows & other stuff Message-ID: <8808132305.AA13416@decwrl.dec.com> Date: 13 Aug 88 23:05:48 GMT Organization: Digital Equipment Corporation Lines: 51 Hi, I asked how to scroll a superbitmap window last week, and got some good answers. Most of the people told me to look at different demos that are on Fred Fish disks. Others told me to look at books on the subject. Since it was easier for me to look at a book then find a FF disk, I decided to waste 20 bucks and buy Rob Peck's book, "Programmers guide to the Amiga." My comments: I was looking for a way to change which part of the bitmap in a superbitmap window is visible. I was expecting a "window" routine to do this, but found that I have to use a lower level layer routine. I don't think it is a good idea to have to mess with fields of the window structure. Having to use the layers library to manipulate windows is like going into the intuition base and changing the FirstWindow list in order to reorganize the way the windows are stacked. I wish the people at Commodore would add some more useful high level routines to the intuition library instead of making us go "behind the window's back" and use the layers library. Another example of this is making a clipping region. Comments on Peck's book: I read most of the book last night and believe that the book is a good introduction to Amiga programming. It is probably in execellent way to go before trying to understand the RKM's. BUT, disreguarding the book's good layout, There are just as many mistakes in the examples as there is in the RKM's. I don't have my book next to me at the moment so I can't make too many specific examples, but I do remember: One of the programs had a NewWindow structure with fields missing. Another section on IDCMP events said that MOUSEBUTTONS events would have higher precedence than GADGETUP or GADGETDOWN events and that gadgets in windows won't work if you have the IDCMP sending MOUSEBUTTONS events. Then, on the following page, there is an example with both GADGETUP and MOUSEBUTTONS set in the IDCMPFlags field of the NewWIndow structure. This would probably confuse any programmer who hasn't written any Amiga programs. In the first chapter, there was an example that used a fprintf() with the first paramater being an AmigaDos filehandle and not a lattice or manx file pointer. So, if you want to learn how to program the amiga, I do suggest this book because it is easy to read, but I suggest you be very careful when typing in any of the examples. Go over the examples with a fine toothed comb before compiling them. If you have a lint preprocessor, you should use it on the examples to make sure they won't bomb out. A last thing to be careful about is the disreguard to pointer and integer types. Peck mixes pointers and integers in almose every example. This kind of programming will not work if you use 16 bit integers (the default for Aztec C). --Mike Leibow