/************************************************************************ Manual Requester 8th August 87 ************************************************************************/ #include #include "shm_defines" extern struct TextAttr Fnt; /************************************************************************ Manual Definitions ************************************************************************/ struct IntuiText manual_continue_txt = {1, 0, JAM1, 8, 2, &Fnt, (UBYTE *)"Continue", NL}; struct IntuiText itxt[] = { {1, 0, JAM1, 20, 5, &Fnt, " This program approximately simulates the motion of two interacting", &itxt[1]}, {1, 0, JAM1, 20, 15, &Fnt, "pendulums. It was written as an exercise in learning Lattice C and", &itxt[2]}, {1, 0, JAM1, 20, 25, &Fnt, "Intuition on the Amiga.", &itxt[3]}, {1, 0, JAM1, 20, 35, &Fnt, " If you change the parameter settings it is neater if you 'Halt' 'Reset'", &itxt[4]}, {1, 0, JAM1, 20, 45, &Fnt, "and 'Erase' before 'Drawing' with the new values. The horizontal and", &itxt[5]}, {1, 0, JAM1, 20, 55, &Fnt, "vertical 'Centre' and 'Size' parameters do what you expect. The phase", &itxt[6]}, {1, 0, JAM1, 20, 65, &Fnt, "parameters influence the initial directions of motion. Frequencies close to", &itxt[7]}, {1, 0, JAM1, 20, 75, &Fnt, "integers or simple fractions give the most interesting results. 'Coupling'", &itxt[8]}, {1, 0, JAM1, 20, 85, &Fnt, "relates to the relative weights of the two pendulums.", &itxt[9]}, {1, 0, JAM1, 20, 95, &Fnt, " References which helped with the learning process include :-", &itxt[10]}, {1, 0, JAM1, 20, 105, &Fnt, " 'The C Programming language' B.W.Kernighan and D.M.Ritchie. Prentice-Hall", &itxt[11]}, {1, 0, JAM1, 20, 115, &Fnt, " 'Intuition Reference Manual' R.J.Mical and S.Deyl. Addison-Wesley", &itxt[12]}, {1, 0, JAM1, 20, 125, &Fnt, " 'Inside Amiga Graphics' S.Leemon. Compute! Publications", &itxt[13]}, {1, 0, JAM1, 20, 135, &Fnt, " 'Fundamentals of C' M.L.Van Name and W.B.Catchings. Amiga World 86/87", &itxt[14]}, {1, 0, JAM1, 20, 145, &Fnt, " 'Intuition Gadgets' H.M.Tolly. Amazing Computing Vol2 #3, 5 and 7", &itxt[15]}, {1, 0, JAM1, 20, 155, &Fnt, " Lattice C Compiler Manual V3.1 and L.Trimble's C sig, Amicue, Edmonton", &itxt[16]}, {1, 0, JAM1, 20, 167, &Fnt, " Chris Ediss, 792 Birch Avenue, Sherwood Park, Alberta T8A 1X1, Canada", &itxt[17]}, {1, 0, JAM1, 20, 177, &Fnt, " Tel 403-467-2392, CEDISS@UALTAVM (PROFS), CEO9 MTS UofA.", NL} }; struct Image manual_continue_img = {0,0, 80,11, 1, NL, 0, 2, NL}; struct Gadget manual_continue_gad = { NL, 554, 176, 80, 11, GADGHBOX | GADGIMAGE, RELVERIFY | ENDGADGET, BOOLGADGET | REQGADGET, (APTR)&manual_continue_img, NL, &manual_continue_txt, NL, NL, 1, NL }; struct Requester manual_req; SHORT manual_border_coords[] = {0,0, 639,0, 639,189, 0,189, 0,0}; struct Border manual_border = { 0, 0, 1, 0, JAM1, /* White Border */ 5, &manual_border_coords[0], NL }; /************************************************************************ Manual Function ************************************************************************/ manual(cW) struct Window *cW; { struct IntuiMessage *message; BOOL loop; int class; InitRequester(&manual_req); manual_req.LeftEdge = 0; manual_req.TopEdge = 10; manual_req.Width = 640; manual_req.Height = 190; manual_req.ReqGadget = &manual_continue_gad; manual_req.ReqText = &itxt[0]; manual_req.BackFill = 3; manual_req.Flags = 0; manual_req.ReqBorder = &manual_border; Request(&manual_req,cW); loop = TRUE; while (loop) { Wait(1 << cW->UserPort->mp_SigBit); message = (struct IntuiMessage *) GetMsg(cW->UserPort); class = message->Class; ReplyMsg(message); if (class == REQCLEAR) loop = FALSE; } return(TRUE); }