rap@dana.UUCP (12/04/87)
This note contains the second part of the Errata for the
Programmers' Guide To The Amiga, Robert A. Peck, SYBEX 1987.
These errata were received from 4/12/87 thru 10/1/87. (The first errata
was dated 4/12/87 and contained material other than that posted here).
Many thanks to Steve Walton and Jerry Tunnel who spent a whole
lot of time with the Programmers' Guide and found these for me.
--------------------------------------------------------------------------
Page 41 - replace ""This is a note""" with \"This is a note\""
Page 94 - replace semicolons (;) with commas (,) following
the words REFRESHWINDOW and GIMMEZEROZERO
Page 95 - change WINDOWDRAGGING to WINDOWDRAG
Page 97 - change &(w->RPort) to w->RPort
Page 105 - change BNDRY_OFF to BNDRYOFF
delete "the pattern is ignored and" from the end
of the third paragraph from the bottom.
Page 111 - Under the line
LONG result;
add
w=0; GfxBase=0; IntuitionBase=0;
Change all of the following:
exit(10);
exit(15);
CloseLibrary(GfxBase); exit(20);
to:
goto cleanup;
Replace: With:
cleanup:
CloseWindow(w); if(w)CloseWindow(w);
CloseLibrary(GfxBase); if(GfxBase)
CloseLibrary(GfxBase);
CloseLibrary(IntuitionBase); if(IntuitionBase)
CloseLibrary(IntuitionBase);
Page 115 - Listing 4.10
change last parameter in call to InitBitMap from 200 to 400.
Call to FreeRaster in if(m==0) is missing its raster size;
after Planes[0], add:
,640,400
Before attaching the superbitmap to the window structure
and opening it, you should clear the bitmap to avoid
viewing garbage when the window opens. Add these lines
just above myWindow.BitMap = &myBitMap
BltClear(myBitMap.Planes[0],(400*640/8),0);
/* clear superbitmap - else see garbage */
Add this as the bottom line in listing 4.10:
FreeRaster(myBitMap.Planes[0],640,400); /* at program exit */
Page 116 - scrolling the raster backwards means the parameters should
be changed to negative, and the move should be in decreasing
order (diagonal backward move).
/* move it back again */ becomes:
for(i=39; i>0; i--) /* instead of i++ */
{
ScrollWindow(w,-i,-i); /* instead of i,i */
Delay(5);
}
Page 130 - Listing 4.15
add this note to SetOPen call
/* when redraw happens, adds border to the states */
Page 200 - delete the line:
#include ram:imageedit.h
(When I submitted the examples, the .h file was merged
with main.c)
Also, this program was derived from a somewhat larger
program example and on moving it into this listing,
I neglected to remove several of the #define's that
are simply not used in this final program. They
do nothing more than take up space. So if you notice
a few defines that seem to to nothing, don't worry
about it. (The very first version of this program
was the design that became the Amiga Icon editor).
Page 209 - 2nd paragraph from the bottom
change FOLLOWMOUSE flag
to
REPORTMOUSE and MOUSEMOVE in the flags
and IDCMP flags
Page 225 - listing 6.7, near bottom of this page, change
#include "ram:console.c"
to
#include "ram:consolestuff.c"
Page 289 - listing 8.5
delete the line:
lockiob->ioa_Request.io_Unit ... etc.
This chapter is actually an earlier edition of the
audiotools that I described in my July/August 1987
article in AmigaWorld issue. Those folks interested
in audio would be better to use that newer information.
When the book is reprinted, this chapter should be
updated and expanded.
The current version of the Audiotools disk, which
includes the ability to synchronize graphics and sound
(audio device can tell the caller that a particular
note has begun to play) and support for playing sampled
sounds is available from
DATAPATH P.O.Box 1828,
Los Gatos, CA. 95031.
Suggestions for added features still welcomed.
(recent suggestion was to add support
for simulating more than 4 hardware audio channels,
while not changing the audiotool's own calling parameters
[ask for channels 0-3, get hardware channels directly;
ask for channels 4-7 and maybe even 8-11 and get sharing/
mixing of audio into real hardware channels on interrupt
"double-duffered" basis]. Will see what kind of system
loading this would create when I next get the time.]
PS. "double-duffered" is a typo that appeared in the
first edition of the ROM Kernel manual in the audio
device chapter. We thought that there were very few
typos in the book. This, one of the very few known typos,
appears in large bold type as the title to one of the
examples. (Prolly nobody noticed :-) :-) !!)
Page 317 - Second line under the statement:
if(parms)
change: mymess to MyMess
Page 318 - Near bottom of example, the line:
if(mainmp) { DeletePort(mainmp); }
is missing the rightmost curly bracket.
Rob Peck ...ihnp4!hplabs!dana!rap