#include "siteswaprs.h" #include "siteswap.h" //APPLICATION ID 1 "jSWP" ICON "graphics/siteswap.bmp" SMALLICON "graphics/siteswap_small.bmp" /* Splash Screen (not used) */ /* FORM ID formTStart AT (0 0 160 160) HELPID Help_about USABLE MODAL BEGIN TITLE "Site Swap Animator" FORMBITMAP AT ( 2 12 ) BITMAP 7000 BUTTON "Run w/ Sound" ID bID_Start_w AT ( 5 140 AUTO 15 ) USABLE BUTTON "Run w/o Sound" ID bID_Start_wo AT ( 83 140 AUTO 15 ) USABLE END */ /* Main Form */ FORM ID formTBasesm AT (0 0 160 160) USABLE NOFRAME /*MODAL*/ MENUID menuBasesm BEGIN PUSHBUTTON " " ID bID_Sound AT ( 142 3 14 14 ) USABLE FORMBITMAP AT ( 145 PREVTOP+1 ) BITMAP 7020 PUSHBUTTON " " ID bID_Draw AT ( 142 PREVBOTTOM+2 14 14 ) USABLE FORMBITMAP AT ( 143 PREVTOP+1 ) BITMAP 7022 PUSHBUTTON " " ID bID_Pause AT ( 142 PREVBOTTOM+2 14 14 ) USABLE FORMBITMAP AT ( 145 PREVTOP+1 ) BITMAP 7024 PUSHBUTTON " " ID bID_Hold AT ( 142 PREVBOTTOM+2 14 14 ) USABLE FORMBITMAP AT ( 145 PREVTOP+1 ) BITMAP 7026 BUTTON " " ID bID_Objects AT ( 142 PREVBOTTOM+8 14 14 ) USABLE NOFRAME FORMBITMAP AT ( 144 PREVTOP+1 ) BITMAP 7021 BUTTON "?" ID bID_Random AT ( 142 PREVBOTTOM+2 14 14 ) USABLE NOFRAME BUTTON "I" ID bID_SSinput AT ( 142 PREVBOTTOM+1 14 14 ) USABLE NOFRAME BUTTON "S" ID bID_SSselect AT ( 142 PREVBOTTOM+1 14 14 ) USABLE NOFRAME BUTTON "G" ID bID_SSgenerate AT ( 142 PREVBOTTOM+1 14 14 ) USABLE NOFRAME LABEL "Balls:" AUTOID AT (2 148) FONT 0 FIELD FldDispBalls PREVRIGHT+2 148 10 AUTO USABLE NONEDITABLE FONT 0 MAXCHARS 2 LABEL "Siteswap:" AUTOID AT (PREVRIGHT+5 148) FONT 0 FIELD FldPttrn PREVRIGHT+2 148 50 AUTO USABLE NONEDITABLE FONT 0 MAXCHARS 20 END /*** Input forms ***/ /* Select a siteswap from a list */ FORM ID formTSelectSS AT (10 10 140 145) HELPID Help_ssSelect USABLE MODAL BEGIN TITLE "Select a Site Swap" LIST "2" "3" "4" "5" "6" "7" "42" "53" "64" "75" "441" "522" "531" "552" "633" "642" "663" "744" "753" "774" "5124" "5241" "5551" "6222" "6231" "6235" "6312" "6352" "6415" "6451" "6622" "6662" "7333" "7342" "7346" "7423" "7441" "7463" "7522" "7526" "7531" "7562" "7733" "7742" "7773" "52512" "55244" "55550" "61224" "61314" "62241" "63141" "66251" "66661" "72222" "72231" "72312" "72335" "72466" "73122" "73131" "73352" "73451" "73622" "73631" "74252" "74612" "74662" "75251" "75274" "75661" "75724" "75751" "77222" "77231" "77312" "77362" "77772" "661263" "661515" "662613" "712224" "712314" "712356" "713124" "713355" "714255" "722241" "723141" "724515" "726225" "726315" "731241" "736251" "737223" "737241" "737313" "742551" "746151" "752613" "772251" "773151" "777771" "6316131" "6461641" "6615163" "6616135" "7162255" "7163155" "7246135" "7262515" "7272235" "7272415" "7273135" "7516135" "7712515" "66261641" "72316131" "74617133" "75151742" "75261641" "77122742" "77131742" "77227133" "77317133" "716315661" "717261255" "727261515" "731661561" "736261641" "751516722" "751516731" "751716315" "771226722" "771226731" "771251733" "771271335" "771316461" "771316722" "771316731" "7741773671" "7771277372" "7772716751" "77471772751" "773171731641" "777271772751" "7713173726161" "77131746171731" "77317172277131" "77317173177131" ID ListSiteList AT ( 25 20 90 1) USABLE VISIBLEITEMS 9 POPUPLIST ID PopSiteList ListSiteList BUTTON "OK" ID bID_SelClose AT (30 125 AUTO AUTO) USABLE FRAME BUTTON "Cancel" ID bID_SelCancel AT (75 125 AUTO AUTO) USABLE FRAME END /* CHECKBOX "Use back-buffer" ID cID_o_BackBuff AT (PrevLeft PrevBottom-2 AUTO AUTO) USABLE */ /* Options form */ FORM ID formTOptions AT (10 10 140 145) HELPID Help_options USABLE MODAL BEGIN TITLE "Options" LABEL "Miscellaneous Options..." AUTOID AT (5 20) USABLE FONT 1 CHECKBOX "Sound on" ID cID_o_Sound AT (20 PrevBottom+3 AUTO AUTO) USABLE CHECKBOX "Hold balls of height 2" ID cID_o_Hold AT (PrevLeft PrevBottom-2 AUTO AUTO) USABLE CHECKBOX "Draw trails" ID cID_o_Draw AT (PrevLeft PrevBottom-2 AUTO AUTO) USABLE LABEL "Props used" AUTOID AT (10 PrevBottom+5) POPUPTRIGGER "" ID pID_objects AT (PrevRight+4 PrevTop 62 AUTO) LEFTANCHOR LIST "balls" "numbers" "misc objects" ID lID_objects AT (PrevLeft PrevTop 52 AUTO) NONUSABLE VISIBLEITEMS 3 POPUPLIST ID pID_objects lID_objects SELECTORTRIGGER "Step Size..." ID sID_StepSize AT (10 100 AUTO AUTO) USABLE BUTTON "OK" ID bID_OptClose AT (30 125 AUTO AUTO) USABLE FRAME BUTTON "Cancel" ID bID_OptCancel AT (75 125 AUTO AUTO) USABLE FRAME END /* Generate SiteSwap form */ FORM ID formTGSS AT (2 2 156 156) HELPID Help_GSS USABLE MODAL BEGIN TITLE "Generate Siteswaps" LABEL "Balls:" AUTOID AT (13 15) USABLE FONT 0 LABEL "Height:" AUTOID AT (4 PrevBottom) USABLE FONT 0 LABEL "Length:" AUTOID AT (2 PrevBottom) USABLE FONT 0 FIELD FldBalls 34 14 10 AUTO USABLE FONT 2 EDITABLE UNDERLINED MAXCHARS 2 Font 0 FIELD FldMaxThrow PrevLeft PrevBottom 10 AUTO USABLE FONT 2 EDITABLE UNDERLINED MAXCHARS 2 Font 0 FIELD FldLength PrevLeft PrevBottom 10 AUTO USABLE FONT 2 EDITABLE UNDERLINED MAXCHARS 2 Font 0 LABEL "Include Composites:" AUTOID AT (5 85) POPUPTRIGGER "" ID pID_type AT (86 PrevTop 50 AUTO) LEFTANCHOR LIST "All" "Non-obvious" "Prime only" ID lID_type AT (PrevLeft PrevTop+3 55 AUTO) NONUSABLE VISIBLEITEMS 3 LABEL "Include States:" AUTOID AT (5 PrevTop+11) POPUPTRIGGER "" ID pID_state AT (65 PrevTop 49 AUTO) LEFTANCHOR LIST "Gnd and Excited" "Gnd Only" "Excited Only" ID lID_state AT (PrevLeft PrevTop+3 70 AUTO) NONUSABLE VISIBLEITEMS 3 LABEL "Mode:" AUTOID AT (40 PrevTop+11) POPUPTRIGGER "" ID pID_mode AT (65 PrevTop 50 AUTO) LEFTANCHOR LIST "Asynchronous" "Synchronous" "Passing" ID lID_mode AT (PrevLeft PrevTop+3 61 AUTO) NONUSABLE VISIBLEITEMS 3 POPUPLIST ID pID_mode lID_mode POPUPLIST ID pID_type lID_type POPUPLIST ID pID_state lID_state CHECKBOX "Start/End Seq." ID cID_g_Seq AT (70 14 AUTO AUTO) USABLE CHECKBOX "Mulplex Filter" ID cID_g_Fil AT (PrevLeft PrevBottom AUTO AUTO) USABLE CHECKBOX "Allow 11 seq" ID cID_g_11 AT (PrevLeft PrevBottom AUTO AUTO) USABLE CHECKBOX "Multiplexing" ID cID_g_Mul AT (PrevLeft-15 PrevBottom+4 AUTO AUTO) USABLE LABEL "# of Allowed Throws:" AUTOID AT (PrevLeft PrevBottom) USABLE FONT 0 FIELD FldMulThr PrevRight+1 PrevTop 10 AUTO USABLE FONT 2 EDITABLE UNDERLINED MAXCHARS 2 Font 0 SELECTORTRIGGER "Other..." ID sID_other AT (7 59 AUTO AUTO) USABLE BUTTON "Done" ID bID_GssDone AT (33 137 AUTO AUTO) USABLE FRAME BUTTON "Generate" ID bID_GssGen AT (PrevRight+20 PrevTop AUTO AUTO) USABLE FRAME END /* Extension of Generate Siteswap form */ FORM ID formTGSSother AT (2 2 156 156) HELPID Help_gssOther USABLE MODAL BEGIN TITLE "Misc options" LABEL "Exclude these (self) throws:" AUTOID AT (5 15) USABLE FONT 0 FIELD FldXself PrevLeft PrevBottom 100 AUTO USABLE FONT 0 EDITABLE UNDERLINED MAXCHARS 20 LABEL "Include these (self) throws:" AUTOID AT (PrevLeft PrevBottom+2) USABLE FONT 0 FIELD FldIself PrevLeft PrevBottom 100 AUTO USABLE FONT 0 EDITABLE UNDERLINED MAXCHARS 20 LABEL "Exclude these passes:" AUTOID AT (PrevLeft PrevBottom+2) USABLE FONT 0 FIELD FldXpass PrevLeft PrevBottom 100 AUTO USABLE FONT 0 EDITABLE UNDERLINED MAXCHARS 20 LABEL "Passing Communication Delay" AUTOID AT (PrevLeft PrevBottom+7) USABLE FONT 0 FIELD FldDelay PrevRight+3 PrevTop 10 AUTO USABLE FONT 0 EDITABLE UNDERLINED MAXCHARS 2 LABEL "Passing Leader Slot Number" AUTOID AT (5 PrevBottom) USABLE FONT 0 FIELD FldSlot PrevRight+3 PrevTop 10 AUTO USABLE FONT 0 EDITABLE UNDERLINED MAXCHARS 2 BUTTON "OK" ID bID_otherClose AT ( 10 137 AUTO AUTO ) USABLE FRAME BUTTON "Cancel" ID bID_otherCancel AT ( PrevRight+15 PrevTop AUTO AUTO ) USABLE FRAME END /* form to display results from generate_siteswaps() */ FORM ID formTGenResults AT (2 2 156 156) HELPID Help_GSSresults USABLE MODAL BEGIN TITLE "Generate Results" FIELD ID resultsField AT ( 5 15 135 120) USABLE LEFTALIGN NONEDITABLE MULTIPLELINES HASSCROLLBAR SCROLLBAR ID resultsScrollBar AT (143 15 7 120) USABLE VALUE 4 MIN 0 MAX 20 PAGESIZE 0 BUTTON "Copy" ID bID_resultsCopy AT ( 7 137 27 12) BUTTON "Done" ID bID_resultsClose AT ( PrevRight+5 PrevTop 27 12) END /* Input your own siteswap pattern */ FORM ID formTInputSS AT (10 60 140 70) HELPID Help_ssInput USABLE MODAL BEGIN TITLE "Input a Site Swap" FIELD FldInpSS 10 25 100 AUTO USABLE FONT 0 EDITABLE UNDERLINED MAXCHARS 20 BUTTON "OK" ID bID_InpClose AT ( 7 48 20 12 ) USABLE FRAME BUTTON "Cancel" ID bID_InpCancel AT ( PrevRight+5 PrevTop 33 12 ) USABLE FRAME BUTTON "Copy" ID bID_InpCopy AT ( PrevRight+5 PrevTop 27 12 ) USABLE FRAME BUTTON "Paste" ID bID_InpPaste AT ( PrevRight+5 PrevTop 32 12 ) USABLE FRAME END /* Input the step size */ FORM ID formTInputStep AT (10 60 140 70) USABLE MODAL BEGIN TITLE "Enter the step size" LABEL "Enter value between" AUTOID AT (5 15) font 1 LABEL "1 and 999:" AUTOID AT (5 30) font 1 FIELD FldStepSize 60 28 20 AUTO USABLE FONT 2 EDITABLE UNDERLINED MAXCHARS 3 BUTTON "OK" ID bID_stepClose AT ( 30 48 30 15 ) USABLE FRAME BUTTON "Cancel" ID bID_stepCancel AT ( 80 48 30 15 ) USABLE FRAME END MENU ID menuBasesm BEGIN PULLDOWN "Menu" BEGIN MENUITEM "Input ..." ID menuInput "i" MENUITEM "Select ..." ID menuSelect "s" MENUITEM "Generate ..." ID menuGenerate "g" MENUITEM "Options ..." ID menuOptions "o" MENUITEM "-" ID menuDash MENUITEM "Help" ID menuHelp "h" MENUITEM "About" ID menuAbout "a" END END /*** Help forms ***/ FORM ID aboutBasesm AT (2 2 156 156) USABLE MODAL BEGIN TITLE "About" FIELD ID AboutField AT ( 5 15 135 120) USABLE LEFTALIGN NONEDITABLE MULTIPLELINES HASSCROLLBAR SCROLLBAR ID AboutScrollBar AT (143 15 7 120) USABLE VALUE 4 MIN 0 MAX 20 PAGESIZE 0 BUTTON "OK" ID bID_aboutClose AT ( CENTER 135 AUTO AUTO) END FORM ID helpBasesm AT (2 2 156 156) USABLE MODAL BEGIN TITLE "Help" FIELD ID HelpField AT ( 5 15 135 120) USABLE LEFTALIGN NONEDITABLE MULTIPLELINES HASSCROLLBAR SCROLLBAR ID HelpScrollBar AT (143 15 7 120) USABLE VALUE 4 MIN 0 MAX 20 PAGESIZE 0 BUTTON "OK" ID bID_helpClose AT ( CENTER 135 AUTO AUTO) END /* ALERT ID aboutBasesm INFORMATION BEGIN TITLE "Site Swap" MESSAGE "-Site Swap animator\nPorted by Stuart Macmillan\n-Code updated and maintained "\ "by Nathan Peterson\n"\ "-Please report bugs to me at nathan@juggler.net\n" BUTTONS "OK" END */ /*** Error Dialogs ***/ ALERT ID errorBasesm WARNING BEGIN TITLE "Site Swap" MESSAGE "OOPS that's not a valid siteswap." BUTTONS "OK" END ALERT ID errorStep WARNING BEGIN TITLE "Step Size" MESSAGE "OOPS that's not a valid step size. Value must be between 1 and 1000." BUTTONS "OK" END ALERT ID errorOtherThrows WARNING BEGIN TITLE "Throws" MESSAGE "All self throws and passes must be alpha-numeric and cannot be separated by spaces!" BUTTONS "OK" END ALERT ID errorDelaySlot WARNING BEGIN TITLE "Delay and Slot" MESSAGE "communication Delay and Slot Number must exist and must be integers!" BUTTONS "OK" END ALERT ID errorGSSfields WARNING BEGIN TITLE "Error in Text Fields" MESSAGE "All text fields on this form must be filled in and can only contain integers! "\ "Spaces or other characters are not allowed!" BUTTONS "OK" END /*** Strings ***/ STRING Help_options "All of these options are available as "\ "side buttons in the main window and are "\ "fairly self explanatory except for the "\ "step size option.\n"\ "\n"\ "Using Step Size\n"\ "The step size defines the resolution of the "\ "path of the juggling balls. A larger number "\ "will cause a faster animation, but it won't be "\ "as smooth as with a smaller step size.\n\n"\ "For explanation of the other options, refer to "\ "the help screen on the main menu." STRING Help_ssSelect "Select a pattern from those listed." STRING Help_ssInput "Enter a valid siteswap pattern. For Example: 75751\n\n"\ "Use the copy/paste buttons to copy and paste text to and from "\ "the clipboard." STRING Help_gssOther "Enter the self throws that you would like to include or exclude "\ "during pattern generation. In passing mode, you can enter the passes "\ "that you want to exclude, and the communication delay and slot number. "\ "The slot number should be either 1 or 2. For more information about "\ "communication delay and/or slot number, please refer to the doc.txt "\ "file that comes with this program." STRING Help_GSS "Enter the number of balls, maximum height, and pattern length.\n\n"\ "Start/End Seq - This option only works if there are excited state siteswaps "\ "in the output. If checked, it will list a beginning and ending sequences for "\ "the excited state siteswaps to transfer the siteswap to and from ground state.\n\n"\ "Multiplex Filter - This option only works with multiplexing. If checked, it "\ "will filter out multiplex siteswap where 2 balls land at the same time in "\ "the same hand from different places.\n\n"\ "Allow 11 seq - if unchecked, it will filter out 11 sequences in asynchronous mode.\n\n"\ "Multiplexing - if checked, generator will include multiplexing patterns "\ "with any given throw containing a maximum number of balls that is specified in "\ "the \"# of Allowed Throws\" field.\n\n"\ "Include Composites - specifies whether to include all composites, primes only "\ "(no composites), or non-obvious composites only.\n\n"\ "Include States - specifies whether to include all states, only ground states, "\ "or only composite states.\n\n"\ "Mode - specifies the type of siteswaps to be generated." STRING Help_GSSresults "You can scroll through the generated siteswaps with the scrollbar or arrow "\ "keys. If you select a siteswap by dragging your stylus across it and then "\ "hitting the copy button, the selected text will be copied into the clipboard which "\ "you can then use to paste into the siteswap input dialog on the animator, or "\ "you can paste it into another application." /*** Bitmaps ***/ // for splash screen (not used) //BITMAP ID 7000 "graphics/main.bmp" COMPRESS // Bitmaps for juggling props BITMAP ID 7001 "graphics/cat_5.bmp" COMPRESS BITMAP ID 7002 "graphics/banana.bmp" COMPRESS BITMAP ID 7003 "graphics/orange.bmp" COMPRESS BITMAP ID 7004 "graphics/apple.bmp" COMPRESS BITMAP ID 7005 "graphics/pilot.bmp" COMPRESS BITMAP ID 7006 "graphics/knife.bmp" COMPRESS BITMAP ID 7007 "graphics/chick.bmp" COMPRESS BITMAP ID 7008 "graphics/awake.bmp" COMPRESS BITMAP ID 7010 "graphics/ball.bmp" COMPRESS // Bitmaps for on screen buttons BITMAP ID 7020 "graphics/sound.bmp" COMPRESS BITMAP ID 7021 "graphics/txtbm.bmp" COMPRESS BITMAP ID 7022 "graphics/draw.bmp" COMPRESS BITMAP ID 7024 "graphics/pause.bmp" COMPRESS BITMAP ID 7026 "graphics/hold.bmp" COMPRESS