page%swap@Sun.COM (Bob Page) (11/13/89)
Submitted-by: guineau@wjg.enet.dec.com (W. John Guineau) Posting-number: Volume 89, Issue 213 Archive-name: applications/cm.2 # This is a shell archive. # Remove anything above and including the cut line. # Then run the rest of the file through 'sh'. # Unpacked files will be owned by you and have default permissions. #----cut here-----cut here-----cut here-----cut here----# #!/bin/sh # shar: SHell ARchive # Run the following text through 'sh' to create: # cm.h # cm.info.uu # fixed1.DAT # fixed2.DAT # smvem.DAT # svem.DAT # This is archive 2 of a 2-part kit. # This archive created: Sun Nov 12 20:10:27 1989 echo "extracting cm.h" sed 's/^X//' << \SHAR_EOF > cm.h X X/* X * Celestial Mechanics Simulation Tool X * X * W. John Guineau X * 3 Royal Crest Drive #9 X * Marlboro, Mass. 01752 X * (508) 485-6233 X * X * Files: X * cm.c X * cm.h X * cm.doc X * X * To Compile with Lattice 5.02: X * X * lc -b0 -Lm cm X * X * NOTICE X * ------ X * X * I have placed this software in the Public Domain with the X * condition that all the files remain together and that I remain X * listed as the original author. This software may not be used for X * commercial purposes or to make money in any way without expressed X * written permission from the author (me). I'm including the source X * code so if you make any significant modifications please concider X * sending me a copy at the above address. I'd also be interested in X * any interesting saved setup files you create. X * X * X * This is my first Amiga program so I welcome any comments at all. X * I wrote this program as both a way to learn the Amiga environment X * and in response to a conversation I had with a friend on Celestial X * Mechanics. X * X * X */ X X X X X X X#define BLKPEN 0 X#define WHTPEN 1 X#define REDPEN 2 X#define ORGPEN 3 X#define YLWPEN 4 X#define GRNPEN 5 X#define BLUPEN 6 X#define PURPEN 7 X X#define REQBCK ORGPEN X X#define SX 640 X#define SY 400 X#define STE 12 X#define SD 3 X#define COLORS 8 X X#define PX 220 X#define PY STE X#define PW 200 X#define PH 12 X X X X#define MAX_X 630 X#define MAX_Y 340 X X X XUSHORT colortable[COLORS] = { X 0x000, /* BLKPEN */ X 0xfff, /* WHTPEN */ X 0xf00, /* REDPEN */ X 0xf90, /* ORGPEN */ X 0xff0, /* YLWPEN */ X 0x0f0, /* GRNPEN */ X 0x00f, /* BLUPEN */ X 0xf0f /* PURPEN */ X}; XUWORD *cp; /* color palette */ X X X X/* X * Screen and Windows X */ X Xstruct NewScreen ns = { X 0,0, /* Left, top */ X SX,SY,SD, /* width,height,depth */ X ORGPEN,WHTPEN, /* detail and block pens */ X HIRES|LACE, /* mode (max pixels!) */ X CUSTOMSCREEN, /* type */ X NULL, /* fonts? */ X "Celestial Mechanics V1.0", X NULL, /* gadgets? */ X NULL /* bitmap? */ X X}; X X X#define IDCMPFL (CLOSEWINDOW|MOUSEBUTTONS|MENUPICK|GADGETUP|REQCLEAR) X#define IDCMPFL_MM (CLOSEWINDOW|MOUSEBUTTONS|MENUPICK|GADGETUP|REQCLEAR|MOUSEMOVE) X X X Xstruct NewWindow nw = { X 0,STE, /* Start position */ X SX,SY-STE, /* width, height, */ X BLKPEN,WHTPEN, /* detail, block pens */ X /* IDCMP flags */ X IDCMPFL, X X GIMMEZEROZERO X | ACTIVATE X | REPORTMOUSE X | WINDOWCLOSE X | SMART_REFRESH, X X NULL, /* First gadget in list */ X NULL, /* User checkmark */ X "Gravitational Behaviour",/* Window Title */ X NULL, /* Pointer to screen (Set later) */ X NULL, /* Pointer to superbitmap */ X 0,0,0,0, /* Ignored because not sizeable */ X CUSTOMSCREEN /* on our own screen */ X}; X Xstruct NewWindow npw = { X PX,PY, /* Start position */ X PW,PH, /* width, height, */ X ORGPEN,REDPEN, /* detail, block pens */ X X NULL, /* IDCMP flags */ X X BORDERLESS X | NOCAREREFRESH, X X NULL, /* First gadget in list */ X NULL, /* User checkmark */ X NULL, /* Window Title */ X NULL, /* Pointer to screen (Set later) */ X NULL, /* Pointer to superbitmap */ X 0,0,0,0, /* Ignored because not sizeable */ X CUSTOMSCREEN /* on our own screen */ X}; X X X X X X X/* X * Text Attributes X */ Xchar def_font[] ="topaz.font"; X Xstruct TextAttr TxtAt_Plain = { X (UBYTE *)def_font, X 8, X FS_NORMAL, X FPF_ROMFONT X}; X Xstruct TextAttr TxtAt_BIU = { X (UBYTE *)def_font, X 8, X FSF_BOLD | FSF_ITALIC | FSF_UNDERLINED, X FPF_ROMFONT X}; X Xstruct TextAttr TxtAt_BU = { X (UBYTE *)def_font, X 8, X FSF_BOLD | FSF_UNDERLINED, X FPF_ROMFONT X}; X Xstruct TextAttr TxtAt_BI = { X (UBYTE *)def_font, X 8, X FSF_BOLD | FSF_ITALIC, X FPF_ROMFONT X}; X Xstruct TextAttr TxtAt_B ={ X (UBYTE *)def_font, X 8, X FSF_BOLD, X FPF_ROMFONT X}; X Xstruct TextAttr TxtAt_IU ={ X (UBYTE *)def_font, X 8, X FSF_ITALIC | FSF_UNDERLINED, X FPF_ROMFONT X}; X Xstruct TextAttr TxtAt_I ={ X (UBYTE *)def_font, X 8, X FSF_ITALIC, X FPF_ROMFONT X}; X Xstruct TextAttr TxtAt_U ={ X (UBYTE *)def_font, X 8, X FSF_UNDERLINED, X FPF_ROMFONT X}; X X X X X X X/************************************** X * Gadgets X **************************************/ X X/* X * Gadget ID numbers X */ X#define NAMEGAD 1 X#define RADIUSGAD 2 X#define MASSGAD 3 X#define VELOCITYGAD 4 X#define DIRECTIONGAD 5 X#define OKGAD 6 X#define CANCELGAD 7 X#define RESETGAD 8 X#define GGAD 9 X#define DTGAD 10 X#define TGAD 11 X#define DSGAD 12 X#define TLGAD 13 X#define COLOR1GAD 14 X#define COLOR2GAD 15 X#define COLOR3GAD 16 X#define COLOR4GAD 17 X#define COLOR5GAD 18 X#define COLOR6GAD 19 X#define COLOR7GAD 20 X#define FNGAD 21 X#define FNOKGAD 22 X#define FNCANGAD 23 X#define STGAD 24 X#define FXGAD 25 X#define AOKGAD 26 X X X X/* X * Some common gadget stuff X */ Xstruct IntuiText yes_text = { X WHTPEN,REDPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 3,3, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "Yes", /* IText */ X NULL /* NextText */ X}; X Xstruct IntuiText no_text = { X WHTPEN,REDPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 7,3, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "No", /* IText */ X NULL /* NextText */ X}; X X X/* X * cancel gadget X */ X XSHORT cancel_Pairs[] = { X 0, 0, X 68,0, X 68,22, X 0, 22, X 0, 0 X}; X Xstruct Border cancel_bord = { X -1, -1, /* LeftEdge, TopEdge */ X REDPEN,REDPEN,JAM2, /* FrontPen, BackPen, DrawMode */ X 5, /* Count of XY pairs */ X (SHORT *)&cancel_Pairs, /* XY pairs */ X NULL /* Next Border */ X}; X Xchar *cantxt="CANCEL"; /* This gad is either CAN or DEL */ Xchar *deltxt="DELETE"; X Xstruct IntuiText cancel_text = { X WHTPEN,REDPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 9,8, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X NULL, /* IText */ X NULL /* NextText */ X}; X Xstruct Gadget cancel = { X NULL, /* NextGadget pointer */ X 130, 115, /* LeftEdge, TopEdge */ X 68, 22, /* Width, Height */ X /* Gadget Flags */ X GADGHCOMP, X /* Activation Flags */ X RELVERIFY X | ENDGADGET, X /* GadgetType */ X BOOLGADGET X | REQGADGET, X (APTR)&cancel_bord, /* GadgetRender */ X NULL, /* SelectRender */ X &cancel_text, /* GadgetText */ X 0x0, /* MutualExclude */ X NULL, /* SpecialInfo */ X CANCELGAD, /* GadgetID */ X NULL /* UserData Pointer */ X}; X X X/* X * ok gadget X */ X XSHORT ok_Pairs[] = { X 0, 0, X 30,0, X 30,22, X 0, 22, X 0, 0 X}; X Xstruct Border ok_bord = { X -1, -1, /* LeftEdge, TopEdge */ X GRNPEN,REDPEN,JAM2, /* FrontPen, BackPen, DrawMode*/ X 5, /* Count of XY p airs */ X (SHORT *)&ok_Pairs, /* XY pairs */ X NULL /* Next Border */ X}; X Xstruct IntuiText ok_text = { X WHTPEN,REDPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 5,7, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "OK", /* IText */ X NULL /* NextText */ X}; X X Xstruct Gadget ok = { X &cancel, /* NextGadget pointer */ X 15, 115, /* LeftEdge, TopEdge */ X 30, 22, /* Width, Height */ X /* Gadget Flags */ X GADGHCOMP, X /* Activation Flags */ X RELVERIFY X | ENDGADGET, X /* GadgetType */ X BOOLGADGET X | REQGADGET, X (APTR)&ok_bord, /* GadgetRender */ X NULL, /* SelectRender */ X &ok_text, /* GadgetText */ X 0x0, /* MutualExclude */ X NULL, /* SpecialInfo */ X OKGAD, /* GadgetID */ X NULL /* UserData Pointer */ X}; X X X X X/* X * reset gadget X */ X XSHORT reset_Pairs[] = { X 0, 0, X 51,0, X 51,22, X 0, 22, X 0, 0 X}; X Xstruct Border reset_bord = { X -1, -1, /* LeftEdge, TopEdge */ X YLWPEN,REDPEN,JAM2, /* FrontPen, BackPen, DrawMode*/ X 5, /* Count of XY pairs */ X (SHORT *)&reset_Pairs, /* XY pairs */ X NULL /* Next Border */ X}; X Xstruct IntuiText reset_text = { X WHTPEN,REDPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 5,7, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "RESET", /* IText */ X NULL /* NextText */ X}; X X Xstruct Gadget reset = { X &ok, /* NextGadget pointer */ X 60, 115, /* LeftEdge, TopEdge */ X 51, 22, /* Width, Height */ X /* Gadget Flags */ X GADGHCOMP, X /* Activation Flags */ X RELVERIFY, X /* GadgetType */ X BOOLGADGET X | REQGADGET, X (APTR)&reset_bord, /* GadgetRender */ X NULL, /* SelectRender */ X &reset_text, /* GadgetText */ X 0x0, /* MutualExclude */ X NULL, /* SpecialInfo */ X RESETGAD, /* GadgetID */ X NULL /* UserData Pointer */ X}; X X X X/**************************************************** X * Gadgets in Body Requestor X ****************************************************/ X X X X X/* X * Text for x,y printout in Body req X */ Xchar xy_buf[80]; Xstruct IntuiText xy_text = { X BLUPEN,WHTPEN, /* FrontPen, BackPen */ X JAM2, /* DrawMode */ X 15,96, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X xy_buf, /* IText */ X NULL /* NextText */ X}; X X X X/* X * Fixed gadget X */ X Xstruct Image fx_image = { X 0,0, /* relative to select box */ X 30,11, /* same size as select box */ X SD, /* planes deep as screen */ X NULL, /* image data, but we don't need it */ X 0x00, /* planepick- none */ X BLUPEN, /* planeonoff */ X NULL /* next image, none */ X}; X Xstruct IntuiText fx_text = { X WHTPEN,REDPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 10,82, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "Fixed", /* IText */ X &xy_text /* NextText */ X}; X X Xstruct Gadget fixed = { X &reset, /* NextGadget pointer */ X 140, 80, /* LeftEdge, TopEdge */ X 30, 11, /* Width, Height */ X /* Gadget Flags */ X GADGHNONE X | GADGIMAGE, X /* Activation Flags */ X TOGGLESELECT X | RELVERIFY, X X BOOLGADGET /* GadgetType */ X | REQGADGET, X (APTR)&fx_image, /* GadgetRender */ X NULL, /* SelectRender */ X &no_text, /* GadgetText */ X 0x0, /* MutualExclude */ X NULL, /* SpecialInfo */ X FXGAD, /* GadgetID */ X NULL /* UserData Pointer */ X}; X X X/* X * Color gadgets X */ X Xstruct IntuiText color_text = { X WHTPEN,REDPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 10,65, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "COLOR", /* IText */ X &fx_text /* NextText */ X}; X X Xstruct Image color1_image = { X 0,0, /* relative to select box */ X 10,11, /* same size as select box */ X SD, /* planes deep as screen */ X NULL, /* image data, but we don't need it */ X 0x00, /* planepick- none */ X 0x1, /* planeonoff */ X NULL /* next image, none */ X }; X X Xstruct Gadget color1 = { X &fixed, /* NextGadget pointer */ X 119, 63, /* LeftEdge, TopEdge */ X 10, 11, /* Width, Height */ X /* Gadget Flags */ X GADGHCOMP X | GADGIMAGE, X /* Activation Flags */ X RELVERIFY, X /* GadgetType */ X BOOLGADGET X | REQGADGET, X (APTR)&color1_image, /* GadgetRender */ X NULL, /* SelectRender */ X NULL, /* GadgetText */ X 0x0, /* MutualExclude */ X NULL, /* SpecialInfo */ X COLOR1GAD, /* GadgetID */ X (APTR)WHTPEN /* UserData Pointer */ X}; X X Xstruct Image color2_image = { X 0,0, /* relative to select box */ X 10,11, /* same size as select box */ X SD, /* planes deep as screen */ X NULL, /* image data, but we don't need it */ X 0x00, /* planepick- none */ X 0x2, /* planeonoff */ X NULL /* next image, none */ X }; X X Xstruct Gadget color2 = { X &color1, /* NextGadget pointer */ X 129, 63, /* LeftEdge, TopEdge */ X 10, 11, /* Width, Height */ X /* Gadget Flags */ X GADGHCOMP X | GADGIMAGE, X /* Activation Flags */ X RELVERIFY, X /* GadgetType */ X BOOLGADGET X | REQGADGET, X (APTR)&color2_image, /* GadgetRender */ X NULL, /* SelectRender */ X NULL, /* GadgetText */ X 0x0, /* MutualExclude */ X NULL, /* SpecialInfo */ X COLOR2GAD, /* GadgetID */ X (APTR)REDPEN /* UserData Pointer */ X}; X X Xstruct Image color3_image = { X 0,0, /* relative to select box */ X 10,11, /* same size as select box */ X SD, /* planes deep as screen */ X NULL, /* image data, but we don't need it */ X 0x00, /* planepick- none */ X 0x3, /* planeonoff */ X NULL /* next image, none */ X }; X X Xstruct Gadget color3 = { X &color2, /* NextGadget pointer */ X 139, 63, /* LeftEdge, TopEdge */ X 10, 11, /* Width, Height */ X /* Gadget Flags */ X GADGHCOMP X | GADGIMAGE, X /* Activation Flags */ X RELVERIFY, X /* GadgetType */ X BOOLGADGET X | REQGADGET, X (APTR)&color3_image, /* GadgetRender */ X NULL, /* SelectRender */ X NULL, /* GadgetText */ X 0x0, /* MutualExclude */ X NULL, /* SpecialInfo */ X COLOR3GAD, /* GadgetID */ X (APTR)ORGPEN /* UserData Pointer */ X}; X X Xstruct Image color4_image = { X 0,0, /* relative to select box */ X 10,11, /* same size as select box */ X SD, /* planes deep as screen */ X NULL, /* image data, but we don't need it */ X 0x00, /* planepick- none */ X 0x4, /* planeonoff */ X NULL /* next image, none */ X }; X X Xstruct Gadget color4 = { X &color3, /* NextGadget pointer */ X 149, 63, /* LeftEdge, TopEdge */ X 10, 11, /* Width, Height */ X /* Gadget Flags */ X GADGHCOMP X | GADGIMAGE, X /* Activation Flags */ X RELVERIFY, X /* GadgetType */ X BOOLGADGET X | REQGADGET, X (APTR)&color4_image, /* GadgetRender */ X NULL, /* SelectRender */ X NULL, /* GadgetText */ X 0x0, /* MutualExclude */ X NULL, /* SpecialInfo */ X COLOR4GAD, /* GadgetID */ X (APTR)YLWPEN /* UserData Pointer */ X}; X X Xstruct Image color5_image = { X 0,0, /* relative to select box */ X 10,11, /* same size as select box */ X SD, /* planes deep as screen */ X NULL, /* image data, but we don't need it */ X 0x00, /* planepick- none */ X 0x5, /* planeonoff */ X NULL /* next image, none */ X }; X X Xstruct Gadget color5 = { X &color4, /* NextGadget pointer */ X 159, 63, /* LeftEdge, TopEdge */ X 10, 11, /* Width, Height */ X /* Gadget Flags */ X GADGHCOMP X | GADGIMAGE, X /* Activation Flags */ X RELVERIFY, X /* GadgetType */ X BOOLGADGET X | REQGADGET, X (APTR)&color5_image, /* GadgetRender */ X NULL, /* SelectRender */ X NULL, /* GadgetText */ X 0x0, /* MutualExclude */ X NULL, /* SpecialInfo */ X COLOR5GAD, /* GadgetID */ X (APTR)GRNPEN /* UserData Pointer */ X}; X X Xstruct Image color6_image = { X 0,0, /* relative to select box */ X 10,11, /* same size as select box */ X SD, /* planes deep as screen */ X NULL, /* image data, but we don't need it */ X 0x00, /* planepick- none */ X 0x6, /* planeonoff */ X NULL /* next image, none */ X }; X X Xstruct Gadget color6 = { X &color5, /* NextGadget pointer */ X 169, 63, /* LeftEdge, TopEdge */ X 10, 11, /* Width, Height */ X /* Gadget Flags */ X GADGHCOMP X | GADGIMAGE, X /* Activation Flags */ X RELVERIFY, X /* GadgetType */ X BOOLGADGET X | REQGADGET, X (APTR)&color6_image, /* GadgetRender */ X NULL, /* SelectRender */ X NULL, /* GadgetText */ X 0x0, /* MutualExclude */ X NULL, /* SpecialInfo */ X COLOR6GAD, /* GadgetID */ X (APTR)BLUPEN /* UserData Pointer */ X}; X X Xstruct Image color7_image = { X 0,0, /* relative to select box */ X 10,11, /* same size as select box */ X SD, /* planes deep as screen */ X NULL, /* image data, but we don't need it */ X 0x00, /* planepick- none */ X 0x7, /* planeonoff */ X NULL /* next image, none */ X }; X X Xstruct Gadget color7 = { X &color6, /* NextGadget pointer */ X 179, 63, /* LeftEdge, TopEdge */ X 10, 11, /* Width, Height */ X /* Gadget Flags */ X GADGHCOMP X | GADGIMAGE, X /* Activation Flags */ X RELVERIFY, X /* GadgetType */ X BOOLGADGET X | REQGADGET, X (APTR)&color7_image, /* GadgetRender */ X NULL, /* SelectRender */ X NULL, /* GadgetText */ X 0x0, /* MutualExclude */ X NULL, /* SpecialInfo */ X COLOR7GAD, /* GadgetID */ X (APTR)PURPEN /* UserData Pointer */ X}; X X X X/* X * direction gadget X */ X XSHORT direction_Pairs[] = { X 0, 0, X 90,0, X 90,13, X 0, 13, X 0, 0 X}; X Xstruct Border direction_bord = { X -1, -3, /* LeftEdge, TopEdge */ X WHTPEN,REDPEN,JAM2, /* FrontPen, BackPen, DrawMode*/ X 5, /* Count of XY pairs */ X (SHORT *)&direction_Pairs, /* XY pairs */ X NULL /* Next Border */ X}; X Xstruct IntuiText dir_text = { X WHTPEN,REDPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 10,47, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "DIRECTION", /* IText */ X &color_text /* NextText */ X}; X X XUBYTE direction_sbuf[12] = "0"; XUBYTE direction_ubuf[12]; X Xstruct StringInfo direction_txstr = { X direction_sbuf, direction_ubuf, /* Buffer, UndoBuffer */ X 0, 12, 0, /* BufferPos, MaxChars, DispPos */ X 0, 1, /* UndoPos, NumChars */ X 0, 0, 0, /* DispCount, CLeft, CTop */ X 0x0, 0, /* LayerPtr, LongInt */ X NULL /* AltKeyMap */ X}; X Xstruct Gadget direction = { X &color7, /* NextGadget pointer */ X 110, 45, /* LeftEdge, TopEdge */ X 88, 11, /* Width, Height */ X /* Gadget Flags */ X GADGHCOMP, X /* Activation Flags */ X RELVERIFY X | LONGINT X | STRINGCENTER, X /* GadgetType */ X STRGADGET X | REQGADGET, X (APTR)&direction_bord, /* GadgetRender */ X NULL, /* SelectRender */ X NULL, /* GadgetText */ X 0x0, /* MutualExclude */ X (APTR)&direction_txstr, /* SpecialInfo */ X DIRECTIONGAD, /* GadgetID */ X NULL /* UserData Pointer */ X}; X X X/* X * velocity gadget X */ X XSHORT velocity_Pairs[] = { X 0, 0, X 90,0, X 90,13, X 0, 13, X 0, 0 X}; X Xstruct Border velocity_bord = { X -1, -3, /* LeftEdge, TopEdge */ X WHTPEN,REDPEN,JAM2, /* FrontPen, BackPen, DrawMode*/ X 5, /* Count of XY pairs */ X (SHORT *)&velocity_Pairs, /* XY pairs */ X NULL /* Next Border */ X}; X Xstruct IntuiText vel_text = { X WHTPEN,REDPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 10,34, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "VELOCITY", /* IText */ X &dir_text /* NextText */ X}; X X XUBYTE velocity_sbuf[20] = "0.0e0"; XUBYTE velocity_ubuf[20]; X Xstruct StringInfo velocity_txstr = { X velocity_sbuf, velocity_ubuf, /* Buffer, UndoBuffer */ X 0, 20, 0, /* BufferPos, MaxChars, DispPos */ X 0, 5, /* UndoPos, NumChars */ X 0, 0, 0, /* DispCount, CLeft, CTop */ X 0x0, 0, /* LayerPtr, LongInt */ X NULL /* AltKeyMap */ X}; X X Xstruct Gadget velocity = { X &direction, /* NextGadget pointer */ X 110, 32, /* LeftEdge, TopEdge */ X 88, 11, /* Width, Height */ X /* Gadget Flags */ X GADGHCOMP, X /* Activation Flags */ X RELVERIFY X | STRINGCENTER, X /* GadgetType */ X STRGADGET X | REQGADGET, X (APTR)&velocity_bord, /* GadgetRender */ X NULL, /* SelectRender */ X NULL, /* GadgetText */ X 0x0, /* MutualExclude */ X (APTR)&velocity_txstr, /* SpecialInfo */ X VELOCITYGAD, /* GadgetID */ X NULL /* UserData Pointer */ X}; X X X/* X * name gadget X */ X XSHORT name_Pairs[] = { X 0, 0, X 90,0, X 90,13, X 0, 13, X 0, 0 X}; X Xstruct Border name_bord = { X -1, -3, /* LeftEdge, TopEdge */ X WHTPEN,REDPEN,JAM2, /* FrontPen, BackPen, DrawMode*/ X 5, /* Count of XY pairs */ X (SHORT *)&name_Pairs, /* XY pairs */ X NULL /* Next Border */ X}; X Xstruct IntuiText name_text = { X WHTPEN,REDPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 10,8, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "NAME", /* IText */ X &vel_text /* NextText */ X}; X XUBYTE name_sbuf[12] = "SUN"; XUBYTE name_ubuf[12]; X Xstruct StringInfo name_txstr = { X name_sbuf, name_ubuf, /* Buffer, UndoBuffer */ X 0, 12, 0, /* BufferPos, MaxChars, DispPos */ X 0, 3, /* UndoPos, NumChars */ X 0, 0, 0, /* DispCount, CLeft, CTop */ X 0x0, 0, /* LayerPtr, LongInt */ X NULL /* AltKeyMap */ X}; X Xstruct Gadget name= { X &velocity, /* NextGadget pointer */ X 110, 6, /* LeftEdge, TopEdge */ X 88, 11, /* Width, Height */ X /* Gadget Flags */ X GADGHCOMP, X /* Activation Flags */ X RELVERIFY X | STRINGCENTER, X /* GadgetType */ X STRGADGET X | REQGADGET, X (APTR)&name_bord, /* GadgetRender */ X NULL, /* SelectRender */ X NULL, /* GadgetText */ X 0x0, /* MutualExclude */ X (APTR)&name_txstr, /* SpecialInfo */ X NAMEGAD, /* GadgetID */ X NULL /* UserData Pointer */ X}; X X X X X/* X * mass gadget X */ X XSHORT mass_Pairs[] = { X 0, 0, X 90,0, X 90,13, X 0, 13, X 0, 0 X}; X Xstruct Border mass_bord = { X -1, -3, /* LeftEdge, TopEdge */ X WHTPEN,REDPEN,JAM2, /* FrontPen, BackPen, DrawMode*/ X 5, /* Count of XY pairs */ X (SHORT *)&mass_Pairs, /* XY pairs */ X NULL /* Next Border */ X}; X Xstruct IntuiText mass_text = { X WHTPEN,REDPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 10,21, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "MASS", /* IText */ X &name_text /* NextText */ X}; X XUBYTE mass_sbuf[20] = "1.0e0"; XUBYTE mass_ubuf[20]; X Xstruct StringInfo mass_txstr = { X mass_sbuf, mass_ubuf, /* Buffer, UndoBuffer */ X 0, 20, 0, /* BufferPos, MaxChars, DispPos */ X 0, 5, /* UndoPos, NumChars */ X 0, 0, 0, /* DispCount, CLeft, CTop */ X 0x0, 1, /* LayerPtr, LongInt */ X NULL /* AltKeyMap */ X}; X Xstruct Gadget mass = { X &name, /* NextGadget pointer */ X 110, 19, /* LeftEdge, TopEdge */ X 88, 11, /* Width, Height */ X /* Gadget Flags */ X GADGHCOMP, X /* Activation Flags */ X RELVERIFY X | STRINGCENTER, X /* GadgetType */ X STRGADGET X | REQGADGET, X (APTR)&mass_bord, /* GadgetRender */ X NULL, /* SelectRender */ X NULL, /* GadgetText */ X 0x0, /* MutualExclude */ X (APTR)&mass_txstr, /* SpecialInfo */ X MASSGAD, /* GadgetID */ X NULL /* UserData Pointer */ X}; X X X X/**************************************************** X * Gadgets in Setup Requestor X ****************************************************/ X X X/* X * ShowTime gadget X */ X Xstruct Image st_image = { X 0,0, /* relative to select box */ X 30,11, /* same size as select box */ X SD, /* planes deep as screen */ X NULL, /* image data, but we don't need it */ X 0x00, /* planepick- none */ X BLUPEN, /* planeonoff */ X NULL /* next image, none */ X}; X Xstruct IntuiText st_text = { X WHTPEN,REDPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 10,98, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "ShowTime", /* IText */ X NULL /* NextText */ X}; X X Xstruct Gadget st = { X &reset, /* NextGadget pointer */ X 145, 96, /* LeftEdge, TopEdge */ X 30, 11, /* Width, Height */ X /* Gadget Flags */ X GADGHNONE X | GADGIMAGE, X /* Activation Flags */ X TOGGLESELECT X | RELVERIFY, X X BOOLGADGET /* GadgetType */ X | REQGADGET, X (APTR)&st_image, /* GadgetRender */ X NULL, /* SelectRender */ X &no_text, /* GadgetText */ X 0x0, /* MutualExclude */ X NULL, /* SpecialInfo */ X STGAD, /* GadgetID */ X NULL /* UserData Pointer */ X}; X X X/* X * TrailLength gadget X */ X XSHORT tl_Pairs[] = { X 0, 0, X 90,0, X 90,13, X 0, 13, X 0, 0 X}; X Xstruct Border tl_bord = { X -1, -3, /* LeftEdge, TopEdge */ X WHTPEN,REDPEN,JAM2, /* FrontPen, BackPen, DrawMode*/ X 5, /* Count of XY pairs */ X (SHORT *)&tl_Pairs, /* XY pairs */ X NULL /* Next Border */ X}; X X XUBYTE tl_sbuf[20] = "0"; XUBYTE tl_ubuf[20]; X Xstruct StringInfo tl_txstr = { X tl_sbuf, tl_ubuf, /* Buffer, UndoBuffer */ X 0, 20, 0, /* BufferPos, MaxChars, DispPos */ X 0, 1, /* UndoPos, NumChars */ X 0, 0, 0, /* DispCount, CLeft, CTop */ X 0x0, 1, /* LayerPtr, LongInt */ X NULL /* AltKeyMap */ X}; X Xstruct IntuiText tl_text = { X WHTPEN,REDPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 10,60, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "TrailLength", /* IText */ X &st_text /* NextText */ X}; X X Xstruct Gadget tl = { X &st, /* NextGadget pointer */ X 110, 58, /* LeftEdge, TopEdge */ X 88, 11, /* Width, Height */ X /* Gadget Flags */ X GADGHCOMP, X /* Activation Flags */ X RELVERIFY X | LONGINT X | STRINGCENTER, X /* GadgetType */ X STRGADGET X | REQGADGET, X (APTR)&tl_bord, /* GadgetRender */ X NULL, /* SelectRender */ X NULL, /* GadgetText */ X 0x0, /* MutualExclude */ X (APTR)&tl_txstr, /* SpecialInfo */ X TLGAD, /* GadgetID */ X NULL /* UserData Pointer */ X}; X X X/* X * ds (Delta S) gadget X */ X XSHORT ds_Pairs[] = { X 0, 0, X 90,0, X 90,13, X 0, 13, X 0, 0 X}; X Xstruct Border ds_bord = { X -1, -3, /* LeftEdge, TopEdge */ X WHTPEN,REDPEN,JAM2, /* FrontPen, BackPen, DrawMode*/ X 5, /* Count of XY pairs */ X (SHORT *)&ds_Pairs, /* XY pairs */ X NULL /* Next Border */ X}; X Xstruct IntuiText ds_text = { X WHTPEN,REDPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 10,47, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "Units/Pixel", /* IText */ X &tl_text /* NextText */ X}; X X XUBYTE ds_sbuf[20] = "1.0e0"; XUBYTE ds_ubuf[20]; X Xstruct StringInfo ds_txstr = { X ds_sbuf, ds_ubuf, /* Buffer, UndoBuffer */ X 0, 20, 0, /* BufferPos, MaxChars, DispPos */ X 0, 5, /* UndoPos, NumChars */ X 0, 0, 0, /* DispCount, CLeft, CTop */ X 0x0, 1, /* LayerPtr, LongInt */ X NULL /* AltKeyMap */ X}; X Xstruct Gadget ds = { X &tl, /* NextGadget pointer */ X 110, 45, /* LeftEdge, TopEdge */ X 88, 11, /* Width, Height */ X /* Gadget Flags */ X GADGHCOMP, X /* Activation Flags */ X RELVERIFY X | STRINGCENTER, X /* GadgetType */ X STRGADGET X | REQGADGET, X (APTR)&ds_bord, /* GadgetRender */ X NULL, /* SelectRender */ X NULL, /* GadgetText */ X 0x0, /* MutualExclude */ X (APTR)&ds_txstr, /* SpecialInfo */ X DSGAD, /* GadgetID */ X NULL /* UserData Pointer */ X}; X X X/* X * t_gadget X */ X XSHORT t_Pairs[] = { X 0, 0, X 90,0, X 90,13, X 0, 13, X 0, 0 X}; X Xstruct Border t_bord = { X -1, -3, /* LeftEdge, TopEdge */ X WHTPEN,REDPEN,JAM2, /* FrontPen, BackPen, DrawMode*/ X 5, /* Count of XY pairs */ X (SHORT *)&t_Pairs, /* XY pairs */ X NULL /* Next Border */ X}; X Xstruct IntuiText t_text = { X WHTPEN,REDPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 10,34, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "Real Time", /* IText */ X &ds_text /* NextText */ X}; X X XUBYTE t_sbuf[12] = "0"; XUBYTE t_ubuf[12]; X Xstruct StringInfo t_txstr = { X t_sbuf, t_ubuf, /* Buffer, UndoBuffer */ X 0, 12, 0, /* BufferPos, MaxChars, DispPos */ X 0, 1, /* UndoPos, NumChars */ X 0, 0, 0, /* DispCount, CLeft, CTop */ X 0x0, 0, /* LayerPtr, LongInt */ X NULL /* AltKeyMap */ X}; X X Xstruct Gadget t = { X &ds, /* NextGadget pointer */ X 110, 32, /* LeftEdge, TopEdge */ X 88, 11, /* Width, Height */ X /* Gadget Flags */ X GADGHCOMP, X /* Activation Flags */ X RELVERIFY X | LONGINT X | STRINGCENTER, X /* GadgetType */ X STRGADGET X | REQGADGET, X (APTR)&t_bord, /* GadgetRender */ X NULL, /* SelectRender */ X NULL, /* GadgetText */ X 0x0, /* MutualExclude */ X (APTR)&t_txstr, /* SpecialInfo */ X TGAD, /* GadgetID */ X NULL /* UserData Pointer */ X}; X X X/* X * G gadget X */ X XSHORT G_Pairs[] = { X 0, 0, X 90,0, X 90,13, X 0, 13, X 0, 0 X}; X Xstruct Border G_bord = { X -1, -3, /* LeftEdge, TopEdge */ X WHTPEN,REDPEN,JAM2, /* FrontPen, BackPen, DrawMode*/ X 5, /* Count of XY pairs */ X (SHORT *)&G_Pairs, /* XY pairs */ X NULL /* Next Border */ X}; X Xstruct IntuiText G_text = { X WHTPEN,REDPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 10,8, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "Gravity (G)", /* IText */ X &t_text /* NextText */ X}; X XUBYTE G_sbuf[20] = "6.67e0"; XUBYTE G_ubuf[20]; X Xstruct StringInfo G_txstr = { X G_sbuf, G_ubuf, /* Buffer, UndoBuffer */ X 0, 20, 0, /* BufferPos, MaxChars, DispPos */ X 0, 6, /* UndoPos, NumChars */ X 0, 0, 0, /* DispCount, CLeft, CTop */ X 0x0, 0, /* LayerPtr, LongInt */ X NULL /* AltKeyMap */ X}; X Xstruct Gadget G = { X &t, /* NextGadget pointer */ X 110, 6, /* LeftEdge, TopEdge */ X 88, 11, /* Width, Height */ X /* Gadget Flags */ X GADGHCOMP, X /* Activation Flags */ X RELVERIFY X | STRINGCENTER, X /* GadgetType */ X STRGADGET X | REQGADGET, X (APTR)&G_bord, /* GadgetRender */ X NULL, /* SelectRender */ X NULL, /* GadgetText */ X 0x0, /* MutualExclude */ X (APTR)&G_txstr, /* SpecialInfo */ X GGAD, /* GadgetID */ X NULL /* UserData Pointer */ X}; X X X X X/* X * dt gadget X */ X XSHORT dt_Pairs[] = { X 0, 0, X 90,0, X 90,13, X 0, 13, X 0, 0 X}; X Xstruct Border dt_bord = { X -1, -3, /* LeftEdge, TopEdge */ X WHTPEN,REDPEN,JAM2, /* FrontPen, BackPen, DrawMode*/ X 5, /* Count of XY pairs */ X (SHORT *)&dt_Pairs, /* XY pairs */ X NULL /* Next Border */ X}; X Xstruct IntuiText dt_text = { X WHTPEN,REDPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 10,21, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "Sim Time", /* IText */ X &G_text /* NextText */ X}; X XUBYTE dt_sbuf[20] = "1.0e0"; XUBYTE dt_ubuf[20]; X Xstruct StringInfo dt_txstr = { X dt_sbuf, dt_ubuf, /* Buffer, UndoBuffer */ X 0, 20, 0, /* BufferPos, MaxChars, DispPos */ X 0, 5, /* UndoPos, NumChars */ X 0, 0, 0, /* DispCount, CLeft, CTop */ X 0x0, 1, /* LayerPtr, LongInt */ X NULL /* AltKeyMap */ X}; X Xstruct Gadget dt = { X &G, /* NextGadget pointer */ X 110, 19, /* LeftEdge, TopEdge */ X 88, 11, /* Width, Height */ X /* Gadget Flags */ X GADGHCOMP, X /* Activation Flags */ X RELVERIFY X | STRINGCENTER, X /* GadgetType */ X STRGADGET X | REQGADGET, X (APTR)&dt_bord, /* GadgetRender */ X NULL, /* SelectRender */ X NULL, /* GadgetText */ X 0x0, /* MutualExclude */ X (APTR)&dt_txstr, /* SpecialInfo */ X DTGAD, /* GadgetID */ X NULL /* UserData Pointer */ X}; X X X X X X/* X * FileName cancel gadget X */ X XSHORT fncancel_Pairs[] = { X 0, 0, X 68,0, X 68,22, X 0, 22, X 0, 0 X}; X Xstruct Border fncancel_bord = { X -1, -1, /* LeftEdge, TopEdge */ X REDPEN,REDPEN,JAM2, /* FrontPen, BackPen, DrawMode */ X 5, /* Count of XY pairs */ X (SHORT *)&fncancel_Pairs, /* XY pairs */ X NULL /* Next Border */ X}; X Xstruct IntuiText fncancel_text = { X WHTPEN,REDPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 9,8, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "CANCEL", /* IText */ X NULL /* NextText */ X}; X Xstruct Gadget fncancel = { X NULL, /* NextGadget pointer */ X 230, 35, /* LeftEdge, TopEdge */ X 68, 22, /* Width, Height */ X /* Gadget Flags */ X GADGHCOMP, X /* Activation Flags */ X RELVERIFY X | ENDGADGET, X /* GadgetType */ X BOOLGADGET X | REQGADGET, X (APTR)&fncancel_bord, /* GadgetRender */ X NULL, /* SelectRender */ X &fncancel_text, /* GadgetText */ X 0x0, /* MutualExclude */ X NULL, /* SpecialInfo */ X FNCANGAD, /* GadgetID */ X NULL /* UserData Pointer */ X}; X X X/* X * fnok gadget X */ X XSHORT fnok_Pairs[] = { X 0, 0, X 30,0, X 30,22, X 0, 22, X 0, 0 X}; X Xstruct Border fnok_bord = { X -1, -1, /* LeftEdge, TopEdge */ X GRNPEN,REDPEN,JAM2, /* FrontPen, BackPen, DrawMode*/ X 5, /* Count of XY pairs */ X (SHORT *)&fnok_Pairs, /* XY pairs */ X NULL /* Next Border */ X}; X Xstruct IntuiText fnok_text = { X WHTPEN,REDPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 5,7, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "OK", /* IText */ X NULL /* NextText */ X}; X X Xstruct Gadget fnok = { X &fncancel, /* NextGadget pointer */ X 100, 35, /* LeftEdge, TopEdge */ X 30, 22, /* Width, Height */ X /* Gadget Flags */ X GADGHCOMP, X /* Activation Flags */ X RELVERIFY X | ENDGADGET, X /* GadgetType */ X BOOLGADGET X | REQGADGET, X (APTR)&fnok_bord, /* GadgetRender */ X NULL, /* SelectRender */ X &fnok_text, /* GadgetText */ X 0x0, /* MutualExclude */ X NULL, /* SpecialInfo */ X FNOKGAD, /* GadgetID */ X NULL /* UserData Pointer */ X}; X X X X X X/* X * FileName gadget X */ X XSHORT fn_Pairs[] = { X 0, 0, X 300,0, X 300,10, X 0, 10, X 0, 0 X}; X Xstruct Border fn_bord = { X -1, -1, /* LeftEdge, TopEdge */ X YLWPEN,REDPEN,JAM2, /* FrontPen, BackPen, DrawMode*/ X 5, /* Count of XY pairs */ X (SHORT *)&fn_Pairs, /* XY pairs */ X NULL /* Next Border */ X}; X Xstruct IntuiText fn_text = { X WHTPEN,REDPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 140,5, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "Data File Name?", /* IText */ X NULL /* NextText */ X}; X X XUBYTE fn_sbuf[100] = "CM.DAT"; XUBYTE fn_ubuf[100]; X Xstruct StringInfo fn_txstr = { X fn_sbuf, fn_ubuf, /* Buffer, UndoBuffer */ X 0, 100, 0, /* BufferPos, MaxChars, DispPos */ X 0, 6, /* UndoPos, NumChars */ X 0, 0, 0, /* DispCount, CLeft, CTop */ X 0x0, 0, /* LayerPtr, LongInt */ X NULL /* AltKeyMap */ X}; X Xstruct Gadget fn = { X &fnok, /* NextGadget pointer */ X 50, 20, /* LeftEdge, TopEdge */ X 300, 10, /* Width, Height */ X /* Gadget Flags */ X GADGHCOMP, X /* Activation Flags */ X RELVERIFY X | ENDGADGET X | STRINGCENTER, X /* GadgetType */ X STRGADGET X | REQGADGET, X (APTR)&fn_bord, /* GadgetRender */ X NULL, /* SelectRender */ X NULL, /* GadgetText */ X 0x0, /* MutualExclude */ X (APTR)&fn_txstr, /* SpecialInfo */ X FNGAD, /* GadgetID */ X NULL /* UserData Pointer */ X}; X X X X X X/* X * aok gadget X */ X X XSHORT aok_Pairs[] = { X 0, 0, X 25,0, X 25,12, X 0, 12, X 0, 0 X}; X Xstruct Border aok_bord = { X -1, -1, /* LeftEdge, TopEdge */ X GRNPEN,REDPEN,JAM2, /* FrontPen, BackPen, DrawMode*/ X 5, /* Count of XY p airs */ X (SHORT *)&aok_Pairs, /* XY pairs */ X NULL /* Next Border */ X}; X Xstruct IntuiText aok_text = { X WHTPEN,REDPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 5,2, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "OK", /* IText */ X NULL /* NextText */ X}; X X Xstruct IntuiText A_text6 = { X ORGPEN,REDPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 25,11, /* LeftEdge, TopEdge */ X &TxtAt_BI, /* TextAttr */ X "Celestial Mechanics", /* IText */ X NULL /* NextText */ X}; X Xstruct IntuiText A_text5 = { X ORGPEN,REDPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 25,21, /* LeftEdge, TopEdge */ X &TxtAt_BI, /* TextAttr */ X " Simulator ", /* IText */ X &A_text6 /* NextText */ X}; X Xstruct IntuiText A_text4 = { X WHTPEN,REDPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 25,38, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X " W. John Guineau ", /* IText */ X &A_text5 /* NextText */ X}; X Xstruct IntuiText A_text3 = { X WHTPEN,REDPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 25,46, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "3 Royal Crest Dr #0", /* IText */ X &A_text4 /* NextText */ X}; X Xstruct IntuiText A_text2 = { X WHTPEN,REDPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 25,54, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X " Marlboro, Ma 01752", /* IText */ X &A_text3 /* NextText */ X}; X Xstruct IntuiText A_text = { X WHTPEN,REDPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 25,62, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X " (508) 485-6233 ", /* IText */ X &A_text2 /* NextText */ X}; X X Xstruct Gadget aok = { X NULL, /* NextGadget pointer */ X 85, 82, /* LeftEdge, TopEdge */ X 23, 10, /* Width, Height */ X /* Gadget Flags */ X GADGHCOMP, X /* Activation Flags */ X RELVERIFY X | ENDGADGET, X /* GadgetType */ X BOOLGADGET X | REQGADGET, X (APTR)&aok_bord, /* GadgetRender */ X NULL, /* SelectRender */ X &aok_text, /* GadgetText */ X 0x0, /* MutualExclude */ X NULL, /* SpecialInfo */ X AOKGAD, /* GadgetID */ X NULL /* UserData Pointer */ X}; X X X X X X X X/*********************************************************** X * X * MENUS X * X ***********************************************************/ X X X/* X * MenuNumber component definitions X */ X#define M_Control 0 X#define I_Stop 0 X#define I_Start 1 X X#define M_Edit 1 X#define I_ClearB 0 X#define I_ClearS 1 X#define I_Modify 2 X#define I_Create 3 X#define I_Setup 4 X X#define M_File 2 X#define I_Exit 0 X#define I_SavScr 1 X#define I_SavDat 2 X#define I_LoadDat 3 X#define I_About 4 X X/* X * MenuNumber Shortcuts X */ X#define MN_CStop (SHIFTMENU(M_Control)|SHIFTITEM(I_Stop)|SHIFTSUB(NOSUB)) X#define MN_CStart (SHIFTMENU(M_Control)|SHIFTITEM(I_Start)|SHIFTSUB(NOSUB)) X X#define MN_ESetup (SHIFTMENU(M_Edit)|SHIFTITEM(I_Setup)|SHIFTSUB(NOSUB)) X#define MN_ECreate (SHIFTMENU(M_Edit)|SHIFTITEM(I_Create)|SHIFTSUB(NOSUB)) X#define MN_EMod (SHIFTMENU(M_Edit)|SHIFTITEM(I_Modify)|SHIFTSUB(NOSUB)) X#define MN_EClearS (SHIFTMENU(M_Edit)|SHIFTITEM(I_ClearS)|SHIFTSUB(NOSUB)) X#define MN_EClearB (SHIFTMENU(M_Edit)|SHIFTITEM(I_ClearB)|SHIFTSUB(NOSUB)) X X#define MN_FAbout (SHIFTMENU(M_File)|SHIFTITEM(I_About)|SHIFTSUB(NOSUB)) X#define MN_FLDat (SHIFTMENU(M_File)|SHIFTITEM(I_LoadDat)|SHIFTSUB(NOSUB)) X#define MN_FSDat (SHIFTMENU(M_File)|SHIFTITEM(I_SavDat)|SHIFTSUB(NOSUB)) X#define MN_FSScr (SHIFTMENU(M_File)|SHIFTITEM(I_SavScr)|SHIFTSUB(NOSUB)) X#define MN_FExit (SHIFTMENU(M_File)|SHIFTITEM(I_Exit)|SHIFTSUB(NOSUB)) X X X X/* X * "File" menu subitems X */ Xstruct IntuiText AboutTxt = { X BLKPEN,WHTPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 0,0, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "About", /* IText */ X NULL /* NextText */ X}; X Xstruct MenuItem About = { X NULL, /* next item */ X 0,0,100,10, /* Left,Top Edge, Width, Height */ X ITEMENABLED /* flags */ X | ITEMTEXT X | HIGHCOMP, X 0L, /* MutualExclude */ X (APTR)&AboutTxt, /* Name */ X 0, /* Command */ X NULL, /* SubItem */ X 0 /* NextSelect */ X}; X Xstruct IntuiText LoadTxt = { X BLKPEN,WHTPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 0,0, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "Load Data", /* IText */ X NULL /* NextText */ X}; X Xstruct MenuItem LoadData = { X &About, /* next item */ X 0,10,100,10, /* Left,Top Edge, Width, Height */ X ITEMENABLED /* flags */ X | ITEMTEXT X | HIGHCOMP, X 0L, /* MutualExclude */ X (APTR)&LoadTxt, /* Name */ X 0, /* Command */ X NULL, /* SubItem */ X 0 /* NextSelect */ X}; X Xstruct IntuiText SaveDTxt = { X BLKPEN,WHTPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 0,0, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "Save Data", /* IText */ X NULL /* NextText */ X}; X Xstruct MenuItem SaveData = { X &LoadData, /* next item */ X 0,20,100,10, /* Left,Top Edge, Width, Height */ X ITEMENABLED /* flags */ X | ITEMTEXT X | HIGHCOMP, X 0L, /* MutualExclude */ X (APTR)&SaveDTxt, /* Name */ X 0, /* Command */ X NULL, /* SubItem */ X 0 /* NextSelect */ X}; X Xstruct IntuiText SaveSTxt = { X BLKPEN,WHTPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 0,0, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "Save Screen", /* IText */ X NULL /* NextText */ X}; X Xstruct MenuItem SaveScreen = { X &SaveData, /* next item */ X 0,30,100,10, /* Left,Top Edge, Width, Height */ X ITEMENABLED /* flags */ X | ITEMTEXT X | HIGHCOMP, X 0L, /* MutualExclude */ X (APTR)&SaveSTxt, /* Name */ X 0, /* Command */ X NULL, /* SubItem */ X 0 /* NextSelect */ X}; X Xstruct IntuiText ExitTxt = { X BLKPEN,WHTPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 0,0, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "Exit", /* IText */ X NULL /* NextText */ X}; X Xstruct MenuItem Exit = { X &SaveScreen, /* next item */ X 0,40,100,10, /* Left,Top Edge, Width, Height */ X ITEMENABLED /* flags */ X | ITEMTEXT X | HIGHCOMP, X 0L, /* MutualExclude */ X (APTR)&ExitTxt, /* Name */ X 0, /* Command */ X NULL, /* SubItem */ X 0 /* NextSelect */ X}; X X X X/* X * "Edit" menu subitems X */ Xstruct IntuiText SetupTxt = { X BLKPEN,WHTPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 0,0, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "Setup...", /* IText */ X NULL /* NextText */ X}; X Xstruct MenuItem Setup = { X NULL, /* next item */ X 0,0,100,10, /* Left,Top Edge, Width, Height */ X ITEMENABLED /* flags */ X | ITEMTEXT X | HIGHCOMP, X 0L, /* MutualExclude */ X (APTR)&SetupTxt, /* Name */ X 0, /* Command */ X NULL, /* SubItem */ X 0 /* NextSelect */ X}; X Xstruct IntuiText CreateTxt = { X BLKPEN,WHTPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 0,0, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "Create...", /* IText */ X NULL /* NextText */ X}; X Xstruct MenuItem Create = { X &Setup, /* next item */ X 0,10,100,10, /* Left,Top Edge, Width, Height */ X ITEMENABLED /* flags */ X | ITEMTEXT X | HIGHCOMP, X 0L, /* MutualExclude */ X (APTR)&CreateTxt, /* Name */ X 0, /* Command */ X NULL, /* SubItem */ X 0 /* NextSelect */ X}; X Xstruct IntuiText ModifyTxt = { X BLKPEN,WHTPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 0,0, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "Modify...", /* IText */ X NULL /* NextText */ X}; X Xstruct MenuItem Modify = { X &Create, /* next item */ X 0,20,100,10, /* Left,Top Edge, Width, Height */ X ITEMENABLED /* flags */ X | ITEMTEXT X | HIGHCOMP, X 0L, /* MutualExclude */ X (APTR)&ModifyTxt, /* Name */ X 0, /* Command */ X NULL, /* SubItem */ X 0 /* NextSelect */ X}; X Xstruct IntuiText ClearSTxt = { X BLKPEN,WHTPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 0,0, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "Clear Screen", /* IText */ X NULL /* NextText */ X}; X Xstruct MenuItem ClearS = { X &Modify, /* next item */ X 0,30,100,10, /* Left,Top Edge, Width, Height */ X ITEMENABLED /* flags */ X | ITEMTEXT X | HIGHCOMP, X 0L, /* MutualExclude */ X (APTR)&ClearSTxt, /* Name */ X 0, /* Command */ X NULL, /* SubItem */ X 0 /* NextSelect */ X}; X Xstruct IntuiText ClearBTxt = { X BLKPEN,WHTPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 0,0, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "Clear Bodys", /* IText */ X NULL /* NextText */ X}; X Xstruct MenuItem ClearB = { X &ClearS, /* next item */ X 0,40,100,10, /* Left,Top Edge, Width, Height */ X ITEMENABLED /* flags */ X | ITEMTEXT X | HIGHCOMP, X 0L, /* MutualExclude */ X (APTR)&ClearBTxt, /* Name */ X 0, /* Command */ X NULL, /* SubItem */ X 0 /* NextSelect */ X}; X X X X/* X * "Control" menu subitems X */ X Xstruct IntuiText StartTxt = { X BLKPEN,WHTPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 0,0, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "Start", /* IText */ X NULL /* NextText */ X}; X Xstruct MenuItem Start = { X NULL, /* next item */ X 0,0,100,10, /* Left,Top Edge, Width, Height */ X ITEMENABLED /* flags */ X | ITEMTEXT X | HIGHCOMP, X 0L, /* MutualExclude */ X (APTR)&StartTxt, /* Name */ X 0, /* Command */ X NULL, /* SubItem */ X 0 /* NextSelect */ X}; X Xstruct IntuiText StopTxt = { X BLKPEN,WHTPEN, /* FrontPen, BackPen */ X JAM1, /* DrawMode */ X 0,0, /* LeftEdge, TopEdge */ X &TxtAt_Plain, /* TextAttr */ X "Stop", /* IText */ X NULL /* NextText */ X}; X Xstruct MenuItem Stop = { X &Start, /* next item */ X 0,10,100,10, /* Left,Top Edge, Width, Height */ X ITEMENABLED /* flags */ X | ITEMTEXT X | HIGHCOMP, X 0L, /* MutualExclude */ X (APTR)&StopTxt, /* Name */ X 0, /* Command */ X NULL, /* SubItem */ X 0 /* NextSelect */ X}; X X X X/* X * Actual Menus X */ Xstruct Menu File = { X NULL, /* NextMenu */ X 0,0,50,0, /* Left,Top Edge, Width, Height */ X MENUENABLED, /* flags */ X "File", /* Name */ X &Exit /* First Item */ X X}; X Xstruct Menu Edit = { X &File, /* NextMenu */ X 50,0,50,0, /* Left,Top Edge, Width, Height */ X MENUENABLED, /* flags */ X "Edit", /* Name */ X &ClearB /* First Item */ X X}; X Xstruct Menu Control = { X &Edit, /* NextMenu */ X 100,0,90,0, /* Left,Top Edge, Width, Height */ X MENUENABLED, /* flags */ X "Control", /* Name */ X &Stop /* First Item */ X X}; X X X X X/******************************************************** X * Requesters X ********************************************************/ X X X X XSHORT req_Pairs[] = { X 0, 0, X 209, 0, X 209, 149, X 0, 149, X 0, 0 X}; X Xstruct Border req_bord = { X 0, 0, /* LeftEdge, TopEdge */ X PURPEN,ORGPEN,JAM2, /* FrontPen, BackPen, DrawMode*/ X 5, /* Count of XY pairs */ X (SHORT *)&req_Pairs, /* XY pairs */ X NULL /* Next Border */ X}; X X X XSHORT fnr_Pairs[] = { X 0, 0, X 399, 0, X 399, 59, X 0, 59, X 0, 0 X}; X Xstruct Border fnr_bord = { X 0, 0, /* LeftEdge, TopEdge */ X PURPEN,ORGPEN,JAM2, /* FrontPen, BackPen, DrawMode*/ X 5, /* Count of XY pairs */ X (SHORT *)&fnr_Pairs, /* XY pairs */ X NULL /* Next Border */ X}; X X X XSHORT A_Pairs2[] = { X 4, 4, X 195, 4, X 195, 95, X 4, 95, X 4, 4 X}; X Xstruct Border A_bord2 = { X 0, 0, /* LeftEdge, TopEdge */ X GRNPEN,BLUPEN,JAM2, /* FrontPen, BackPen, DrawMode*/ X 5, /* Count of XY pairs */ X (SHORT *)&A_Pairs2, /* XY pairs */ X NULL /* Next Border */ X}; X XSHORT A_Pairs[] = { X 0, 0, X 199, 0, X 199, 99, X 0, 99, X 0, 0 X}; X Xstruct Border A_bord = { X 0, 0, /* LeftEdge, TopEdge */ X REDPEN,GRNPEN,JAM2, /* FrontPen, BackPen, DrawMode*/ X 5, /* Count of XY pairs */ X (SHORT *)&A_Pairs, /* XY pairs */ X &A_bord2 /* Next Border */ X}; X X X X X Xstruct Requester BodyInfo = { X NULL, /* OlderRequester */ X 200,100, /* LeftEdge,TopEdge */ X 210,150, /* Width Height */ X 0,0, /* RelLeft,RelTop */ X &mass, /* gadgets */ X &req_bord, /* ReqBorder */ X &mass_text, /* text */ X NULL, /* Flags */ X REQBCK, /* BackFill (pen) */ X NULL, /* ReqLayer */ X {NULL}, /* pad */ X {NULL}, /* ImageBMap */ X NULL, /* RWindow */ X {NULL} /* pad */ X}; X X Xstruct Requester SetupInfo = { X NULL, /* OlderRequester */ X 200,100, /* LeftEdge,TopEdge */ X 210,150, /* Width Height */ X 0,0, /* RelLeft,RelTop */ X &dt, /* gadgets */ X &req_bord, /* ReqBorder */ X &dt_text, /* text */ X NULL, /* Flags */ X REQBCK, /* BackFill (pen) */ X NULL, /* ReqLayer */ X {NULL}, /* pad */ X {NULL}, /* ImageBMap */ X NULL, /* RWindow */ X {NULL} /* pad */ X}; X X Xstruct Requester FileName = { X NULL, /* OlderRequester */ X 100,100, /* LeftEdge,TopEdge */ X 400,60, /* Width Height */ X 0,0, /* RelLeft,RelTop */ X &fn, /* gadgets */ X &fnr_bord, /* ReqBorder */ X &fn_text, /* text */ X NULL, /* Flags */ X REQBCK, /* BackFill (pen) */ X NULL, /* ReqLayer */ X {NULL}, /* pad */ X {NULL}, /* ImageBMap */ X NULL, /* RWindow */ X {NULL} /* pad */ X}; X X Xstruct Requester RAbout = { X NULL, /* OlderRequester */ X 200,100, /* LeftEdge,TopEdge */ X 200,100, /* Width Height */ X 0,0, /* RelLeft,RelTop */ X &aok, /* gadgets */ X &A_bord, /* ReqBorder */ X &A_text, /* text */ X NULL, /* Flags */ X BLUPEN, /* BackFill (pen) */ X NULL, /* ReqLayer */ X {NULL}, /* pad */ X {NULL}, /* ImageBMap */ X NULL, /* RWindow */ X {NULL} /* pad */ X}; X X X SHAR_EOF echo "extracting cm.info.uu" sed 's/^X//' << \SHAR_EOF > cm.info.uu X Xbegin 644 cm.info XMXQ```0``````)P`B`%``*P`&``,``0"&9!@`AF0P````````````````````> XM`````X8`@"[0`(`O(````",```!"``````````````````````!0`"H``@`!X XM^2@#`````````````````````@``````````````````````````$``````$Z XM`````(`````````````)``````````0```````````````````X`````````; XM```?````````````'P``````$````!\````````````.````````````````[ XM``````````````````'X````$``````'_@``````/```#_\``````'X``!__T XM@`````#_```?_\``````_P``/__``````/\``#__P`````!^```__\``````3 XM/```/__``(```````#__P``````````?_X``````````#_\```````````?^I XM```````````!^`````````````````/`````0``````'X````$``````#_``B XM`````````!_X```````````?^```````````'_@```````````_P````````$ XM```'X````````"```\@`````````````````````````````````````````2 XM`$````````````````````````````#______________?______________H XM____________[______[_____W_____________V__________O_________R XM__________'____________@____________X/______[____^#_________8 XM___Q________________________________________[_______________U XMP____________X'___________\`____________`/___________P#_____< XM______^!____________P________W______________________________9 XM__________________________________________________P_____O___0 XM___X'____[______\`___________^`'___________@!___________X`?_H XM__________`/___________X'________]___#?_____________________" XM_____________________[____________________________\``````%``J XM*@`"``(Y\`,````````````````````"```````````````````````````0L XM``````0`````@`````````````D`````````!````````````````````X``4 XM``````````?````````````'P``````0````!\````````````.`````````H XM`````````````````````````?@````0``````?^```````````/_P``````< XM````'_^``````#P``!__P`````!^```__\``````_P``/__``````/\``#__N XMP`````#_```__\``@```?@``/__``````#P``!__@``````````/_P``````A XM````!_X```````````'X````````````````'@````!``````#\`````0```; XM``!_@```````````_\```````````/_```````````#_P```````````?X``[ XM`````````#\`````````(``>"```````````````````````````````````% XM````````0````````````````````````````/_____________]________M XM___________________O______O_____?_____________;_________^___R XM_________________'____________@____________X/______O____^#__K XM__________Q________________________________________O________` XM_________________________________\/___________^!____________9 XM`/___________P#___________\`________?___@?___________\/_____< XM________________________________________________________X?__U XM__^______\#_____O_____^`?___________`#___________P`_________7 XM__\`/___________@'___________\#_________W__A]_______________0 XM____________________________O____________________________P``5 X'``$`````!/__# X`` Xend Xsize 1807 SHAR_EOF echo "extracting fixed1.DAT" sed 's/^X//' << \SHAR_EOF > fixed1.DAT X--- CM Setup Data --- XG=6.670e+00 Xds=1.000e+00 Xdt=5.000e-01 Xt=0 XTrailLength=-1 XShowTime=1 X--- CM Body Data --- X#=name ;pen;fixed;Radius;Mass;x,y;Vx,Vy;Dir X0=FX1 ;2;1;0;7.000e+01;1.830e+02,2.020e+02;0.000e+00,0.000e+00;0.000e+00 X1=FX2 ;3;1;0;5.500e+02;2.950e+02,2.020e+02;0.000e+00,0.000e+00;0.000e+00 X2=FX3 ;4;1;0;9.000e+02;4.080e+02,2.050e+02;0.000e+00,0.000e+00;0.000e+00 X3=Moving ;5;0;0;4.000e+00;1.299e+02,2.214e+02;4.924e+00,8.682e-01;1.000e+01 SHAR_EOF echo "extracting fixed2.DAT" sed 's/^X//' << \SHAR_EOF > fixed2.DAT X--- CM Setup Data --- XG=8.000e+04 Xds=1.000e+01 Xdt=1.000e+00 Xt=0 XTrailLength=-1 XShowTime=1 X--- CM Body Data --- X#=name ;pen;fixed;Radius;Mass;x,y;Vx,Vy;Dir X0=SUN ;1;1;0;1.000e+03;1.740e+03,-1.374e+03;0.000e+00,0.000e+00;0.000e+00 X1=SUN ;1;1;0;1.000e+03;4.070e+03,-1.354e+03;0.000e+00,0.000e+00;0.000e+00 X2=SUN ;5;0;0;3.000e+01;5.320e+03,-1.334e+03;-2.121e+01,2.121e+01;1.350e+02 SHAR_EOF echo "extracting smvem.DAT" sed 's/^X//' << \SHAR_EOF > smvem.DAT X--- CM Setup Data --- XG=6.670e-08 Xds=1.000e+06 Xdt=8.640e+04 Xt=0 XTrailLength=1 XShowTime=1 X--- CM Body Data --- X#=name ;pen;fixed;Radius;Mass;x,y;Vx,Vy;Dir X0=SUN ;4;0;0;1.990e+30;3.000e+08,-1.760e+08;0.000e+00,0.000e+00;0.000e+00 X1=VENUS ;5;0;0;4.900e+24;4.080e+08,-1.760e+08;-1.816e+00,3.465e+01;9.300e+01 X2=EARTH ;6;0;0;6.000e+24;4.500e+08,-1.760e+08;-3.641e+00,2.966e+01;9.700e+01 X3=MARS ;2;0;0;6.400e+23;5.280e+08,-1.760e+08;-4.185e+00,2.373e+01;1.000e+02 X4=MERCURY ;3;0;0;3.300e+23;3.580e+08,-1.760e+08;-8.359e+00,4.741e+01;1.000e+02 SHAR_EOF echo "extracting svem.DAT" sed 's/^X//' << \SHAR_EOF > svem.DAT X--- CM Setup Data --- XG=6.670e-08 Xds=1.000e+06 Xdt=8.640e+04 Xt=0 XTrailLength=-1 XShowTime=1 X--- CM Body Data --- X#=name ;pen;fixed;Radius;Mass;x,y;Vx,Vy;Dir X0=SUN ;4;0;0;1.990e+30;3.000e+08,-1.760e+08;0.000e+00,0.000e+00;0.000e+00 X1=VENUS ;5;0;0;4.900e+24;4.080e+08,-1.760e+08;-1.816e+00,3.465e+01;9.300e+01 X2=EARTH ;6;0;0;6.000e+24;4.500e+08,-1.760e+08;-3.641e+00,2.966e+01;9.700e+01 X3=MARS ;2;0;0;6.400e+23;5.280e+08,-1.760e+08;-4.185e+00,2.373e+01;1.000e+02 SHAR_EOF echo "End of archive 2 (of 2)" # if you want to concatenate archives, remove anything after this line exit