/* $VER: DoomGATE 0.8r3 (14.3.98) */ /*** don't edit this file. i can't stop you from looking, but don't touch. if you wanna suggest a change, mail it me. although most of this is changing as we speak... pcomm@inorbit.com ***/ options results lib.0 = 1 lib.1 = "rexxtricks.library" do x=1 to lib.0 if exists('libs:'lib.x) then do if ~show('L',lib.x) then call addlib(lib.x,0,-30,0) end else do Address DOOMGATE Req('Library Error','Unable to open 'lib.x) address DOOMGATE ;quit exit end end call Tags() call LoadPortsData() if ~exists('env:doomgate') then address command 'makedir env:DoomGate' if ~exists('envarc:doomgate') then address command 'makedir envarc:DoomGate' if arg(1)="DOOMRCLOAD" then do call DOOMRC(READ) exit end if arg(1)="DOOMRCSAVE" then do call DOOMRC(SAVE) exit end if arg(1)="SETTINGSFETCH" then do options results;address DOOMGATE; string ID FSS; ip = result; window ID DOOF close; address command 'type tcp:'ip'/5152 >t:dg_temp'; if open(set,'t:dg_temp',r) then do; set = readln(set); call close(set); window ID DOOS Title '"Settings From Remote"' COMMAND '"window ID DOOS close"' PORT DOOMGATE; button label "\033c Settings Used at" IP "\n" set; endwindow; end; exit end if arg(1)="OFFERDETAILS" then do address DOOMGATE;string id COTH; ct = result button id FOSO ATTRS MUIA_Disabled 1 object id FOSB ATTRS MUIA_Busy_Speed 2 call getchecks() address DOOMGATE check id CWAR if result = 1 then do ct = ct || " -warp " slider ID WARE ct = ct || result || " " slider ID WARM ct = ct || result end check id CSKI if result = 1 then do ct = ct || " -skill " slider ID SKIL ct = ct || result end /* check id CEPI if result = 1 then do ct = ct || " -episode " slider ID EPSI ct = ct || result end */ check id CFIL if result = 1 then do ct = ct || " -file " popasl ID PFIL ct = ct || result end check id CDEH if result = 1 then do ct = ct || " -DEH " popasl ID PDEH ct = ct || result end check ID CTUB if result = 1 then do ct = ct || " -turbo " slider ID TURB ct = ct || result end radio ID NAMT nodes = result if nodes ~= 1 then do radio ID NAMP playernumber = result ct = ct || " -net "||playernumber||" " end address command 'echo >tcp:5152 'ct button id FOSO ATTRS MUIA_Disabled 0 object id FOSB ATTRS MUIA_Busy_Speed 0 EXIT end if arg(1)="SETTINGSFETCH" then do options results;address DOOMGATE; string ID FSS; ip = result; window ID DOOF close; address command 'type tcp:'ip'/5152 >t:dg_temp'; if open(set,'t:dg_temp',r) then do; set = readln(set); call close(set); window ID DOOS Title '"Settings From Remote"' COMMAND '"window ID DOOS close"' PORT DOOMGATE; label "\033c Settings Used at" IP; label "\033l" set; endwindow; end; exit end if arg(1)="SETTINGSFETCHWIN" then do options results;address DOOMGATE; window ID DOOF TITLE '"Fetch Settings"' COMMAND '"window ID DOOF close"' PORT DOOMGATE ATTRS MUIA_Window_ScreenTitle '"DoomGATE v0.8r3ß ©1998 Piper Communications Freely Distributable Emailware"'; group horiz; label "Enter IP or Hostname"; button ID FSB COMMAND '"DoomGATE.rexx SETTINGSFETCH"' ATTRS MUIA_CycleChain 1 label "Fetch from this IP" endgroup; string ID FSS ATTRS MUIA_CycleChain 1 endwindow exit end if arg(1)="SETTINGSUNBODGE" then do options results;address DOOMGATE; button id FOSO ATTRS MUIA_Disabled 0 object id FOSB ATTRS MUIA_Busy_Speed 0 address command 'run <>NIL: type tcp:localhost/5152' exit end if arg(1)="STARTDOOM" then do address DOOMGATE;string id COTH; ct = result say "--Getting info from GUI--" call getchecks() address DOOMGATE check id UCWS if result = 1 then do say "--Collecting Custom WAD info--" if open(set,'env:DoomGATE/CustomWADS',r) then do do until eof(set) list ID WLST NODUP INSERT STRING readln(set) end call close(set) end list ID WLST 0x80421654 entries = result do i=1 to entries list ID WLST POS i - 1 wad.i = result parse var wad.i wadname.i "," wadfile.i "," wadepi.i "," wadlev.i if i = 100 then break end wadname.0 = i - 1 window.multiselect = 'TRUE' window.sort = 'TRUE' window.gadgettext = '_Use This' window.title = 'Select WADS' if viewlist('wadname','window','selected') then do do i=1 to selected.0 do n=1 for wadname.0 if wadname.n = selected.i then do say "--Adding "wadname.n" ("wadfile.n")--" ct = ct || " -file "wadfile.n end end end end end check id CWAR if result = 1 then do say "--Collecting WARP info from GUI--" ct = ct || " -warp " slider ID WARE ct = ct || result || " " slider ID WARM ct = ct || result end check id CSKI if result = 1 then do say "--Collecting Skill info from GUI--" ct = ct || " -skill " slider ID SKIL ct = ct || result end /* check id CEPI if result = 1 then do say "--Collecting Episode info from GUI--" ct = ct || " -episode " slider ID EPSI ct = ct || result end */ check id CFIL if result = 1 then do say "--Collecting Custom WAD info from GUI--" ct = ct || " -file " popasl ID PFIL ct = ct || result end check id CDEH if result = 1 then do say "--Collecting Custom DEH info from GUI--" ct = ct || " -DEH " popasl ID PDEH ct = ct || result end check ID CTUB if result = 1 then do say "--Collecting Turbo info from GUI--" ct = ct || " -turbo " slider ID TURB ct = ct || result end say "--Now checking for number of Players--" radio ID NAMT nodes = result say "--There are "nodes" Nodes Set--" if nodes ~= 1 then do say "--So networking is needed--" radio ID NAMP playernumber = result ct = ct || " -net "||playernumber||" " if playernumber > nodes then do say "--ERROR. Player Number ["playernumber"] does NOT EXIST--" say "PLEASE RESELECT PLAYER NUMBER AND TRY AGAIN........." exit end if nodes > 1 then do if playernumber = 1 then break string ID NOD1 nodeip = result say "--Adding "nodeip"--" ct = ct || nodeip || " " end if nodes > 1 then do if playernumber = 2 then break string ID NOD2 nodeip = result say "--Adding "nodeip"--" ct = ct || nodeip || " " end if nodes > 2 then do if playernumber = 3 then break string ID NOD3 nodeip = result say "--Adding "nodeip"--" ct = ct || nodeip || " " end if nodes > 3 then do if playernumber = 4 then break string ID NOD4 nodeip = result say "--Adding "nodeip"--" ct = ct || nodeip || " " end if nodes > 4 then do if playernumber = 5 then break string ID NOD5 nodeip = result say "--Adding "nodeip"--" ct = ct || nodeip || " " end end check ID NPRC if result = 1 then do string ID NPRS newport = result say "--New port ("newport")--" ct = ct || " -port " || newport || " " end say "--Got info ("ct")--" say "--Checking Which Port to Use--" button id PLSB useme = result if ports.0 ~= -1 then do do i=1 for ports.0 if ports.i = useme then break end end say ports.i say exe.i say dir.i say "--Changing Directory--" say "--New dir is ["dir.i"]--" call pragma(d,dir.i) say "--Setting new Stack--" Address DOOMGATE knob id STAC ATTRS MUIA_Slider_Level newstack = result say "--New Stack is ["newstack"]--" call pragma(S,newstack) parse var dir.i drive ":" rest drive = drive || ":" say "--Caculating Buffer Change--" say drive address command 'addbuffers 'drive' >t:buffers' if ~open(buffers,'t:buffers',r) then do say "Buggered. Addbuffers didnt work. Buggered." exit end buffs = readln(buffers) buffs = word(buffs,3) call close(buffers) address command 'delete t:buffers <>NIL: quiet' say buffs " currently on drive." Address DOOMGATE knob id BUFS ATTRS MUIA_Slider_Level newbuff = result buffchange = newbuff - buffs say "Need to add "buffchange" buffers." say "--Changing Buffers--" address command 'addbuffers 'drive buffchange say "--Final Commandline is ("exe.i ct")--" say "--Kicking up DOOM--" exe.i ct; exit; end Max_Episode = GetEnv("DoomGate/Episodes") If Max_Episode = " " then Max_Episode = 3 address DOOMGATE MUIA_Window_ScreenTitle = 0x804234b0 /* V5 isg STRPTR */ window ID DOOM TITLE '"DoomGATE v0.8r3ß"' COMMAND '"quit"' PORT DOOMGATE ATTRS MUIA_Window_ScreenTitle '"DoomGATE v0.8r3ß ©1998 Piper Communications Freely Distributable Emailware"' menu LABEL "Project" item COMMAND '"method 'MUIM_Application_AboutMUI' 0"' PORT DOOMGATE LABEL "About MUI" menu LABEL "Settings" item COMMAND '"copy env:doomgat#? envarc: all quiet"' PORT Command ATTRS MUIA_Menuitem_Shortcut 'S' LABEL "Save DoomGATE..." item ATTRS MUIA_Menuitem_Title '-1' item COMMAND '"method 'MUIM_Application_OpenConfigWindow'"' PORT DOOMGATE LABEL "Edit MUI..." endmenu item ATTRS MUIA_Menuitem_Title '-1' item COMMAND '"quit"' PORT DOOMGATE ATTRS MUIA_Menuitem_Shortcut 'Q' LABEL "Quit" endmenu text help '"This is DoomGATE 0.8r3 BETA by\nPiper Communications (http://pcomm.home.ml.org/)\nIf you use this program, you are required to\nEmail the author (pcomm@inorbit.com). Otherwise,\nhow is he supposed to know to keep supporting\nDoomGATE ?!?\n\033rNicholas Piper"', label "\033c\033bDoomGATE 0.8r3ß\033n\n\033cPiper Communications\n\033cFreely Distributable Emailware" group REGISTER ID MAIR ATTRS MUIA_CycleChain 1 LABELS "Game,Information,Settings,Network,WADS" group /* game */ group frame label "Command Line Options" group group horiz ATTRS MUIA_Group_Columns 8 call GetChecksIntoGUI() label single "Use Cust. Wads" check ID UCWS single help '"Check this is you want to use a custom WAD when you play."' endgroup /* horiz */ group ATTRS MUIA_Group_Columns 4 label single "-warp" group ATTRS MUIA_Group_Columns 2 check ID CWAR HELP '"Warp to Stage"' PORT INLINE, COMMAND """if %s = 0 then do; address doomgate slider ID WARE ATTRS '0x80423661' 1; address doomgate slider ID WARM ATTRS '0x80423661' 1; end; else do; address doomgate slider ID WARE ATTRS '0x80423661' 0; address doomgate slider ID WARM ATTRS '0x80423661' 0; end""" group horiz group slider ID WARE HELP '"Episode to Warp To (E\033b#\033nL#)"' ATTRS MUIA_Slider_Min 1 MUIA_Slider_Max Max_Episode endgroup group slider ID WARM HELP '"Level to Warp To (E#L\033b#\033n)"' ATTRS MUIA_Slider_Min 1 MUIA_Slider_Max 9 endgroup endgroup endgroup label single "-skill" group ATTRS MUIA_Group_Columns 2 check ID CSKI HELP '"Skill Level"' PORT INLINE, COMMAND """if %s = 0 then address doomgate slider ID SKIL ATTRS '0x80423661' 1; else address doomgate slider ID SKIL ATTRS '0x80423661' 0""" slider ID SKIL HELP '"Skill Level to Set"' ATTRS MUIA_Slider_Min 1 MUIA_Slider_Max 5 endgroup /* label single "-episode" group ATTRS MUIA_Group_Columns 2 check ID CEPI HELP '"Episode to Play"' PORT INLINE, COMMAND """if %s = 0 then address doomgate slider ID EPSI ATTRS '0x80423661' 1; else address doomgate slider ID EPSI ATTRS '0x80423661' 0""" slider ID EPSI HELP 'Episode to Play""' ATTRS MUIA_Slider_Min 1 MUIA_Slider_Max Max_Episode endgroup */ label single "-file" group ATTRS MUIA_Group_Columns 2 check ID CFIL HELP '"Use custom WAD ?"' PORT INLINE, COMMAND """if %s = 0 then address doomgate popasl ID PFIL ATTRS '0x80423661' 1; else address doomgate popasl ID PFIL ATTRS '0x80423661' 0""" popasl ID PFIL help '"Full Path to custom WAD"' Command '"setenv DoomGate/Custom_WAD %s"' port command endgroup label single "-turbo" group ATTRS MUIA_Group_Columns 2 check ID CTUB HELP '"Makes your Marine Faster"' PORT INLINE, COMMAND """if %s = 0 then address doomgate slider ID TURB ATTRS '0x80423661' 1; else address doomgate slider ID TURB ATTRS '0x80423661' 0""" slider ID TURB single HELP '"Turbo Amount"' ATTRS MUIA_Slider_Max 255 MUIA_Slider_Min 1 endgroup label single "-DEH" group ATTRS MUIA_Group_Columns 2 check ID CDEH HELP '"Use DeHacked patch ?"' PORT INLINE, COMMAND """if %s = 0 then address doomgate popasl ID PDEH ATTRS '0x80423661' 1; else address doomgate popasl ID PDEH ATTRS '0x80423661' 0""" popasl ID PDEH help '"Full Path to DEH"' Command '"setenv DoomGate/Custom_DEH %s"' port command endgroup group label '"Other"' endgroup group string ID COTH help '"Specify your own Commandline..."' ATTRS MUIA_CycleChain 1, Command """address command; 'setenv DoomGate/OtherLineOptions 'd2c(34)' %s 'd2c(34) """ port inline endgroup endgroup endgroup endgroup /* command lines */ group frame ATTRS MUIA_Group_Columns 2 label "Quick Setups" button ID TPLA single help '"Set up for DeathMatch"' port INLINE, command """address DOOMGATE; radio ID NAMT ATTRS 0x80429b41 0; check ID CDEA ATTRS 0x8042654b 0; check ID CNOM ATTRS 0x8042654b 0; check ID CEXT ATTRS 0x8042654b 0;""" label "One Player" button ID TPLA single help '"Set up for DeathMatch"' port INLINE, command """address DOOMGATE; check ID CDEV ATTRS 0x8042654b TRUE; check ID CDEA ATTRS 0x8042654b TRUE; check ID CNOM ATTRS 0x8042654b TRUE; check ID CEXT ATTRS 0x8042654b TRUE; group ID MAIR ATTRS 0x80424199 '3' ; radio ID NAMT ATTRS 0x80429b41 '1' """ label "Two Player" endgroup group frame label "Executable/Buffers/Stack" group horiz group group horiz group List ID PLST TITLE """\033bPort""" Button ID PLSB label "No Port Selected" endgroup endgroup endgroup group ATTRS MUIA_Group_Columns 2 group frame label "Buffers" knob ID BUFS help '"Drive Buffers to Ensure are on This Drive"' ATTRS MUIA_Slider_Max 2000 MUIA_Slider_Min 100 Command '"setenv DoomGate/Buffers %s"' port command endgroup group frame label "Stack" knob ID STAC help '"System Stack to Set before Starting DOOM"' ATTRS MUIA_Slider_Max 51200 MUIA_Slider_Min 4096 Command '"setenv DoomGate/Stack %s"' port command endgroup endgroup endgroup endgroup endgroup /* game */ group /* Information */ group register labels 'Doom FAQ,Cheats,DGate Author,Credits' group /* doom faq*/ group register labels 'Misc FAQ,WADS ?!?' group view file "data/faq.txt" endgroup group view file "data/wads.txt" endgroup endgroup endgroup /* doom faq*/ group /* cheats */ view file "data/cheat.txt" endgroup /* cheats */ group /* author */ view file "data/author.txt" endgroup /* author */ group /* credits */ view file "data/credits.txt" endgroup /* credits */ endgroup /* register */ endgroup group /* settings */ group register labels 'Ports,.doomrc' group /* ports */ view file "data/conf_ports.txt" object CLASS '"Balance.mui"' group scroll frame label "Ports Currently Configured" if ports.0 = "-1" then do button label "Error Loading Ports Data" end else do i=1 for ports.0 group label ports.i button label exe.i "\n" dir.i endgroup end endgroup button port command command """ed data/DoomPorts.data""" label "Edit Configuration" endgroup /* ports */ group /* .doomrc */ group ATTRS MUIA_Group_Columns 2 label ".doomrc" group ATTRS MUIA_Group_Columns 2 button ID RCLO command """DoomGATE.rexx DOOMRCLOAD""" label "Load .doomrc" button ID RCSA command """DoomGATE.rexx DOOMRCSAVE""" label "Save .doomrc" endgroup endgroup group register labels "Chat,Misc,Keys" group scroll ATTRS MUIA_Group_Columns 2 label "Chat 0" string ID CHT0 ATTRS MUIA_CycleChain 1 label "Chat 1" string ID CHT1 ATTRS MUIA_CycleChain 1 label "Chat 2" string ID CHT2 ATTRS MUIA_CycleChain 1 label "Chat 3" string ID CHT3 ATTRS MUIA_CycleChain 1 label "Chat 4" string ID CHT4 ATTRS MUIA_CycleChain 1 label "Chat 5" string ID CHT5 ATTRS MUIA_CycleChain 1 label "Chat 6" string ID CHT6 ATTRS MUIA_CycleChain 1 label "Chat 7" string ID CHT7 ATTRS MUIA_CycleChain 1 label "Chat 8" string ID CHT8 ATTRS MUIA_CycleChain 1 label "Chat 9" string ID CHT9 ATTRS MUIA_CycleChain 1 endgroup group scroll ATTRS MUIA_Group_Columns 2 /* label "Note..." button label "Some of these sliders go from\n0 to 100. Obviously most of this range\nis wrong -- however the correct range\nis not known yet :-)" */ label "Sfx Volume" slider ID SSFX ATTRS MUIA_CycleChain 1 MUIA_Slider_Min 0 MUIA_Slider_Max 15 label "Music Volume" slider ID SMUS ATTRS MUIA_CycleChain 1 MUIA_Slider_Min 0 MUIA_Slider_Max 11 label "Sound Channels" slider ID SSOU ATTRS MUIA_CycleChain 1 MUIA_Slider_Min 0 MUIA_Slider_Max 8 label "Detail Level" cycle ID SDET ATTRS MUIA_CycleChain 1 labels "High,Low" label "Gamma Correct" slider ID SGAM ATTRS MUIA_CycleChain 1 MUIA_Slider_Min 0 MUIA_Slider_Max 4 label "Screen Blocks" slider ID SSCR ATTRS MUIA_CycleChain 1 MUIA_Slider_Min 0 MUIA_Slider_Max 11 label "Show Messages" cycle ID SSHO ATTRS MUIA_CycleChain 1 labels "No,Yes" label "Mouse Sensitivity" slider ID SMOS ATTRS MUIA_CycleChain 1 MUIA_Slider_Min 0 MUIA_Slider_Max 9 endgroup group /* keys */ group scroll ATTRS MUIA_Group_Columns 2 label "Note..." button label "Actual playing keys will be\non this page soon. For now\njust edit the .doomrc manually :-)" label "Use Mouse" cycle ID SUMO ATTRS MUIA_CycleChain 1 labels "No,Yes" label "Use Joystick" cycle ID SUJO ATTRS MUIA_CycleChain 1 labels "No,Yes" endgroup endgroup /* keys */ endgroup /* register */ endgroup /* .doomrc */ endgroup /* .doomrc and ports register */ endgroup /* settings */ group /* net */ group horiz view file "data/network.txt" group group horiz label "New Port:" check ID NPRC HELP '"Use a different TCP/IP Port to normal"' PORT INLINE, COMMAND """if %s = 0 then address doomgate string ID NPRS ATTRS '0x80423661' 1; else address doomgate string ID NPRS ATTRS '0x80423661' 0""" endgroup string ID NPRS help '"Port to use"' ATTRS MUIA_Disabled TRUE endgroup endgroup group horiz group frame label "N" radio ID NAMT PORT INLINE, COMMAND """address DOOMGATE;options results; num = %s; 'setvar nodes ' num; 'group ID NETG ATTRS 0x80429ba8 0'; call ca(5); call oa(num); 'group ID NETG ATTRS 0x80429ba8 1'; exit; ca:; do i=1 for arg(1); 'group ID GND'i' ATTRS 0x80429ba8 0'; end; return 0; oa:; do i=1 for arg(1); 'group ID GND'i' ATTRS 0x80429ba8 1'; end; return 0; """ ATTRS MUIA_CycleChain 1 HELP '"Number of Players/Nodes"' LABELS '1,2,3,4,5' endgroup group frame label "P" radio ID NAMP PORT INLINE, COMMAND """options results;address DOOMGATE; num = %s; 'setvar player 'num; 'getvar nodes'; nodes = result; if num > nodes then do; nnum = num - 1; 'radio ID NAMT ATTRS 0x80429b41 'nnum; end; do i=1 for 5; call o(i,0); end; call o(num,1); exit; o:; 'group ID GND'arg(1)' ATTRS 0x80423661 'arg(2); return;""" ATTRS MUIA_CycleChain 1 HELP '"Player/Node Number of This Machine"' LABELS '1,2,3,4,5' endgroup space group ID GND frame label "Hostname/IP Information" group ID NETG group ID GND1 ATTRS MUIA_Group_Columns 2 ATTRS MUIA_Disabled 1 label "Node 1 IP/Hostname" string ID NOD1 ATTRS MUIA_CycleChain 1 endgroup group ID GND2 ATTRS MUIA_Group_Columns 2 MUIA_ShowMe FALSE label "Node 2 IP/Hostname" string ID NOD2 ATTRS MUIA_CycleChain 1 endgroup group ID GND3 ATTRS MUIA_Group_Columns 2 MUIA_ShowMe FALSE label "Node 3 IP/Hostname" string ID NOD3 ATTRS MUIA_CycleChain 1 endgroup group ID GND4 ATTRS MUIA_Group_Columns 2 MUIA_ShowMe FALSE label "Node 4 IP/Hostname" string ID NOD4 ATTRS MUIA_CycleChain 1 endgroup group ID GND5 ATTRS MUIA_Group_Columns 2 MUIA_ShowMe FALSE label "Node 5 IP/Hostname" string ID NOD5 ATTRS MUIA_CycleChain 1 endgroup endgroup space horiz endgroup endgroup group horiz frame label "Fetch/Offer Settings" button ID FOSO help '"Allow someone else to view your settings"' label 'Offer' button ID FOSF help '"View the Settings used on a remote machine"' label 'Fetch' button ID FOSU help '"Attempt to fix this if its knackered"' label 'UnBodge' object ID FOSB CLASS '"Busy.mcc"' ATTRS MUIA_Busy_Speed 0 endgroup endgroup /* net */ group /* wads */ group horiz frame label "Main WAD" view string "If your WAD is the Ultimate DOOM then select 4. Otherwise select 3. Then save your prefs and quit\nand restart DoomGATE to reflect this change." radio ID WEPI ATTRS MUIA_CycleChain 1 HELP '"Number of Episodes in this WAD"' PORT Command COMMAND '"setenv DoomGate/Episodes %s"' LABELS '3,4' endgroup group frame label "Custom WADS" list ID WLST NODUP TITLE """\033bWAD Name,\033bWad File,\033bEpisode,\033bLevel""" ATTRS MUIA_List_Format """MIW=25 BAR,MIW=25 BAR,MIW=10 BAR,MIW=10""" MUIA_List_DragSortable 1 group group ATTRS MUIA_Group_Columns 5 MUIA_Weight 500 frame label "Add" string ID CWNA ATTRS MUIA_CycleChain 1 popasl ID CWFI ATTRS MUIA_CycleChain 1 popslider ID CWEP ATTRS MUIA_Slider_Min 1 MUIA_Slider_Max Max_Episode MUIA_CycleChain 1 popslider ID CWLE ATTRS MUIA_Slider_Min 1 MUIA_Slider_Max 9 MUIA_CycleChain 1 button ID CWAD ATTRS MUIA_Weight 10 MUIA_CycleChain 1 Label "Add" endgroup /* MUIA_Group_Columns ADD */ group horiz group frame label "Del" button ID CWDE command '"list ID WLST REMOVE POS -1"' port DOOMGATE label "Remove" endgroup group frame ATTRS MUIA_Group_Columns 2 label "Lists" button ID CWLO label "Load" button ID CWSA label "Save" endgroup endgroup /* horiz */ endgroup endgroup /* custom wads*/ endgroup /* wads */ endgroup group ATTRS MUIA_Group_Columns 2 button ID STAR ATTRS MUIA_CycleChain 1 label 'Enter DOOM' button ID QUIT COMMAND '"quit"' PORT DOOMGATE label 'Exit DoomGATE' endgroup endwindow callhook ID PLST COMMAND """; options results; address DOOMGATE; list ID PLST; 'button ID PLSB label' result """ PORT INLINE ATTRS MUIA_List_Active MUIV_EveryTime callhook ID WLST COMMAND """; options results; address DOOMGATE; list ID WLST; parse var result name ',' file ',' episode ',' level; string ID CWNA CONTENT name; popasl ID CWFI CONTENT file; popslider ID CWEP "0x8042ae3a" episode; popslider ID CWLE "0x8042ae3a" level; """ PORT INLINE ATTRS MUIA_List_Active MUIV_EveryTime callhook ID CWAD PRESS PORT INLINE COMMAND """options results;address DOOMGATE; string ID CWNA; name = result; popasl ID CWFI; file = result; popslider ID CWEP; episode = result; popslider ID CWLE; level = result; listline = name || ',' || file || ',' || episode || ',' || level ; list ID WLST NODUP INSERT STRING listline """ /* callhook ID CWUS PRESS PORT INLINE COMMAND """options results;address DOOMGATE; string ID CWNA; name = result; popasl ID CWFI; file = result; popslider ID CWEP; episode = result; popslider ID CWLE; level = result; group ID MAIR ATTRS 0x80424199 '0' ; check ID CFIL ATTRS 0x8042654b TRUE; popasl ID PFIL CONTENT file; check ID CWAR ATTRS 0x8042654b TRUE; slider ID WARE ATTRS 0x8042ae3a episode; slider ID WARM ATTRS 0x8042ae3a level;""" */ callhook ID CWSA PRESS PORT INLINE COMMAND """options results;address DOOMGATE; list ID WLST 0x80421654; entries = result; call open(set,'env:DoomGATE/CustomWADS',w); i = 0; do until i = entries; list ID WLST POS i; call writeln(set,result); i = i + 1; if i = 100 then break; end; call close(set);""" callhook ID CWLO PRESS PORT INLINE COMMAND """options results;address DOOMGATE; if open(set,'env:DoomGATE/CustomWADS',r) then do; do until eof(set); list ID WLST NODUP INSERT STRING readln(set); end; call close(set); end;""" callhook ID STAR PRESS PORT INLINE, COMMAND """DOOMGATE.rexx STARTDOOM""" callhook ID FOSO PRESS PORT INLINE, COMMAND """DOOMGATE.rexx OFFERDETAILS""" callhook ID FOSF PRESS COMMAND '"DoomGATE.rexx SETTINGSFETCHWIN"' callhook ID FOSU PRESS COMMAND '"DoomGATE.rexx SETTINGSUNBODGE"' Address DOOMGATE EpisodesC = 0 If Max_Episode = 4 then EpisodesC = 1 call SetGUIOptions() EXIT Tags: /* Method TAG ID definitions */ MUIM_Notify = 0x8042c9cb MUIM_Set = 0x8042549a MUIM_NoNotifySet = 0x8042216f MUIM_Application_AboutMUI = 0x8042d21d MUIM_Application_OpenConfigWindow = 0x804299ba MUIA_Application_Sleep = 0x80425711 /* V4 .s. BOOL */ /* Attribute TAG ID definitions */ MUIA_Slider_Level = 0x8042ae3a /* V4 isg LONG */ MUIA_AppMessage = 0x80421955 /* V5 ..g struct AppMessage * */ MUIA_Dropable = 0x8042fbce /* V11 isg BOOL */ MUIA_Draggable = 0x80420b6e MUIA_Listview_DragType = 0x80425cd3 MUIA_List_Format = 0x80423c0a /* V4 isg STRPTR */ MUIA_FillArea = 0x804294a3 /* V4 is. BOOL */ MUIA_Frame = 0x8042ac64 /* V4 i.. LONG */ MUIA_Weight = 0x80421d1f /* V4 i.. WORD */ MUIA_Gauge_Current = 0x8042f0dd /* V4 isg LONG */ MUIA_Gauge_Divide = 0x8042d8df /* V4 isg BOOL */ MUIA_Gauge_Horiz = 0x804232dd /* V4 i.. BOOL */ MUIA_Gauge_Max = 0x8042bcdb /* V4 isg LONG */ MUIA_Numeric_Value = 0x8042ae3a MUIA_Menuitem_Title = 0x804218be MUIA_Menuitem_Shortcut = 0x80422030 /* V8 isg STRPTR */ MUIA_Boopsi_MinHeight = 0x80422c93 /* V4 isg ULONG */ MUIA_Boopsi_MinWidth = 0x80428fb2 /* V4 isg ULONG */ MUIA_Boopsi_Remember = 0x8042f4bd /* V4 i.. ULONG */ MUIA_Boopsi_TagScreen = 0x8042bc71 /* V4 isg ULONG */ WHEEL_Hue = 0x84000001 WHEEL_Saturation = 0x84000002 WHEEL_Screen = 0x84000009 MUIA_Slider_Max = 0x8042d78a /* V4 isg LONG */ MUIA_Slider_Min = 0x8042e404 /* V4 isg LONG */ MUIA_Selected = 0x8042654b /* V4 isg BOOL */ MUIA_CycleChain = 0x80421ce7 /* V11 isg LONG */ MUIA_String_Reject = 0x8042179c /* V4 isg STRPTR */ MUIA_Gauge_Max = 0x8042bcdb /* V4 isg LONG */ MUIA_Group_ActivePage = 0x80424199 /* V5 isg LONG */ MUIA_Group_Child = 0x804226e6 /* V4 i.. Object * */ MUIA_Group_ChildList = 0x80424748 /* V4 ..g struct List * */ MUIA_Group_Columns = 0x8042f416 /* V4 is. LONG */ MUIA_Group_Horiz = 0x8042536b /* V4 i.. BOOL */ MUIA_Group_HorizSpacing = 0x8042c651 /* V4 isg LONG */ MUIA_Group_LayoutHook = 0x8042c3b2 /* V11 i.. struct Hook * */ MUIA_Group_PageMode = 0x80421a5f /* V5 i.. BOOL */ MUIA_Group_Rows = 0x8042b68f /* V4 is. LONG */ MUIA_Group_SameHeight = 0x8042037e /* V4 i.. BOOL */ MUIA_Group_SameSize = 0x80420860 /* V4 i.. BOOL */ MUIA_Group_SameWidth = 0x8042b3ec /* V4 i.. BOOL */ MUIA_Group_Spacing = 0x8042866d /* V4 is. LONG */ MUIA_Group_VertSpacing = 0x8042e1bf /* V4 isg LONG */ MUIA_Disabled = 0x80423661 /* V4 isg BOOL */ MUIA_ShowMe = 0x80429ba8 ASLFR_DrawersOnly = 0x8008002F ASLFR_RejectIcons = 0x8008003C ASLFR_TitleText = 0x80080001 MUIA_Cycle_Active = 0x80421788 /* V4 isg LONG */ MUIA_List_Active = 0x8042391c /* V4 isg LONG */ MUIA_List_AdjustHeight = 0x8042850d /* V4 i.. BOOL */ MUIA_List_AdjustWidth = 0x8042354a /* V4 i.. BOOL */ MUIA_List_AutoVisible = 0x8042a445 /* V11 isg BOOL */ MUIA_List_CompareHook = 0x80425c14 /* V4 is. struct Hook * */ MUIA_List_ConstructHook = 0x8042894f /* V4 is. struct Hook * */ MUIA_List_DestructHook = 0x804297ce /* V4 is. struct Hook * */ MUIA_List_DisplayHook = 0x8042b4d5 /* V4 is. struct Hook * */ MUIA_List_DragSortable = 0x80426099 /* V11 isg BOOL */ MUIA_List_DropMark = 0x8042aba6 /* V11 ..g LONG */ MUIA_List_Entries = 0x80421654 /* V4 ..g LONG */ MUIA_List_First = 0x804238d4 /* V4 ..g LONG */ MUIA_List_Format = 0x80423c0a /* V4 isg STRPTR */ MUIA_List_InsertPosition = 0x8042d0cd /* V9 ..g LONG */ MUIA_List_MinLineHeight = 0x8042d1c3 /* V4 i.. LONG */ MUIA_List_MultiTestHook = 0x8042c2c6 /* V4 is. struct Hook * */ MUIA_List_Pool = 0x80423431 /* V13 i.. APTR */ MUIA_List_PoolPuddleSize = 0x8042a4eb /* V13 i.. ULONG */ MUIA_List_PoolThreshSize = 0x8042c48c /* V13 i.. ULONG */ MUIA_List_Quiet = 0x8042d8c7 /* V4 .s. BOOL */ MUIA_List_ShowDropMarks = 0x8042c6f3 /* V11 isg BOOL */ MUIA_List_SourceArray = 0x8042c0a0 /* V4 i.. APTR */ MUIA_List_Title = 0x80423e66 /* V6 isg char * */ MUIA_List_Visible = 0x8042191f /* V4 ..g LONG */ MUIA_Busy_Speed = 0x80020049 MUIV_EveryTime = 0x49893131 MUIV_List_Insert_Bottom = -3 /* TAG variable definitions */ TRUE = 1 FALSE = 0 MUIV_Listview_DragType_None = 0 MUIV_Listview_DragType_Immediate = 1 MUIV_Frame_None = 0 MUIV_Frame_Text = 3 MUIV_TriggerValue = 0x49893131 MUIV_EveryTime = 0x49893131 Return 0 DOOMRC: /*******************************************************/ address command 'echo >'ID '$HOME' if open(cnf,ID,'R') then do home=trim(readln(cnf)) call close(cnf) address command 'delete >nil: 'ID end if (home='$HOME' | home='HOME') then home='' else if right(home,1)~='/' then home=home||'/' if ~exists(home".doomrc") then do call LoadPortsData() if ports.0 ~= -1 then do address doomgate button id PLSB useme = result do i=1 for ports.0 if ports.i = useme then home = dir.i end end end if ~exists(home".doomrc") then do say "Unable to locate .doomrc file. Looked in $home and "dir.i end rcloc = home address doomgate button ID RCLO ATTRS MUIA_Disabled 1 button ID RCSA ATTRS MUIA_Disabled 1 call open(file,rcloc".doomrc",r) i = 1 do until eof(file) line.i = readln(file) i = i + 1 end line.0 = i - 1 if arg(1)=READ then lors = L if arg(1)=SAVE then lors = S call ch("chatmacro0",CHT0,lors) call ch("chatmacro1",CHT1,lors) call ch("chatmacro2",CHT2,lors) call ch("chatmacro3",CHT3,lors) call ch("chatmacro4",CHT4,lors) call ch("chatmacro5",CHT5,lors) call ch("chatmacro6",CHT6,lors) call ch("chatmacro7",CHT7,lors) call ch("chatmacro8",CHT8,lors) call ch("chatmacro9",CHT9,lors) call ch("sfx_volume",SSFX,lors,s) call ch("music_volume",SMUS,lors,s) call ch("snd_channels",SSOU,lors,s) call ch("detaillevel",SDET,lors,c) call ch("usegamma",SGAM,lors,s) call ch("screenblocks",SSCR,lors,s) call ch("show_messages",SSHO,lors,c) call ch("mouse_sensitivity",SMOS,lors,s) call ch("use_mouse",SUMO,lors,c) call ch("use_joystick",SUJO,lors,c) call close(file) call open(file,rcloc".doomrc",W) i = 1 do until i = line.0 call writeln(file,line.i) i = i + 1 end call close(file) address doomgate button ID RCLO ATTRS MUIA_Disabled 0 button ID RCSA ATTRS MUIA_Disabled 0 return 0 ch: /*******************************************************/ searchingfor = arg(1) stringid = arg(2) saveorload = arg(3) ischat = pos("chatmacro",searchingfor) type = arg(4) i = 1 do until i = line.0 if upper(left(line.i,length(searchingfor))) = upper(searchingfor) then do if ischat then parse var line.i RUBBISH '"' Setting '"' if ~ischat then parse var line.i RUBBISH " " Setting if ~ischat then Setting = Compress(Setting," , ") WASATLINE = i if saveorload = L then do select when type = S then Address DOOMGATE slider ID stringid ATTRS MUIA_Slider_Level setting when type = C then Address DOOMGATE cycle ID stringid ATTRS MUIA_Cycle_Active setting otherwise Address DOOMGATE string ID stringid content setting end end if saveorload = S then do select when type = S then address DOOMGATE slider ID stringid when type = C then address DOOMGATE cycle ID stringid otherwise address DOOMGATE string ID stringid end changeto=result if upper(changeto) = upper("High") then changeto = 1 if upper(changeto) = upper("Low") then changeto = 0 if upper(changeto) = upper("No") then changeto = 0 if upper(changeto) = upper("Yes") then changeto = 1 if ~ischat then line.i = searchingfor" "changeto if ischat then line.i = searchingfor" "'"'changeto'"' end end i = i + 1 end return getchecks: /*******************************************************/ if ~open(lines,'data/CommandLines.data',R) then do say "Unable to Open data/CommandLines.data... Please reinstall." return 1 end do until eof(lines) line = readln(lines) parse var line flag idname labelname "*" helpname "*" if length(idname) = 4 then do labelname = compress(labelname,' ') call c(idname,' 'labelname) end end call close(lines) return 1 GetChecksIntoGUI: /*******************************************************/ if ~open(lines,'data/CommandLines.data',R) then do button label "Unable to Open\ndata/CommandLines.data\nPlease reinstall." return 1 end do until eof(lines) line = readln(lines) parse var line flag idname labelname "*" helpname "*" if length(idname) = 4 then do labelname = compress(labelname) label single labelname check ID idname single help '"' helpname '"' end end call close(lines) return 1 SetGUIOptions: /*******************************************************/ if ports.0 ~= -1 then do do i=1 for ports.0 list id PLST NODUB insert string ports.i end button id PLSB label ports.1 end else do list id PLST NODUB insert string "Error Loading Data" button id PLSB label "data/DoomPorts.data is missing" button id STAR ATTRS MUIA_Disabled 1 end radio ID WEPI ATTRS '0x80429b41' EpisodesC popasl ID DD CONTENT GetEnv("DoomGate/Doom_Directory") popasl ID PFIL CONTENT GetEnv("DoomGate/Custom_WAD") popasl ID PDEH CONTENT GetEnv("DoomGate/Custom_DEH") knob ID BUFS ATTRS MUIA_Slider_Level GetEnv("DoomGate/Buffers") knob ID STAC ATTRS MUIA_Slider_Level GetEnv("DoomGate/Stack") slider ID WARM ATTRS MUIA_Disabled 1 slider ID WARE ATTRS MUIA_Disabled 1 slider ID TURB ATTRS MUIA_Disabled 1 slider ID SKIL ATTRS MUIA_Disabled 1 /* slider ID EPSI ATTRS MUIA_Disabled 1 */ popasl ID PFIL ATTRS MUIA_Disabled 1 popasl ID PDEH ATTRS MUIA_Disabled 1 if ~open(lines,'data/CommandLines.data',R) then do button label "Unable to Open\ndata/CommandLines.data\nPlease reinstall." return 1 end do until eof(lines) line = readln(lines) parse var line flag idname labelname "*" helpname "*" if length(idname) = 4 then do if flag = 1 then do check ID idname ATTRS MUIA_Selected 1 end end end call close(lines) return 1 /*******************************************************/ c:;address DOOMGATE;check id arg(1); if result = 1 then ct = ct || arg(2); return 0; exit /*******************************************************/ LoadPortsData: if ~open(data,'data/DoomPorts.data',r) then do ports.0 = -1 return 0 end do until eof(data) line = readln(data) if left(line,2) = "##" then break end do until eof(data) line = readln(data) if left(line,2) = "##" then break end ports.0 = 0 i = 0 do until eof(data) do until eof(data) line = readln(data) if left(line,1) = "#" then break end i = i + 1 ports.0 = i ports.i = readln(data) exe.i = readln(data) dir.i = readln(data) end ports.0 = ports.0 - 1 call close(data) return 0 /* --------------------------------------------------------- */ /* Requester Req(title,string) */ /* --------------------------------------------------------- */ Req: request ID REQU TITLE '"' arg(1) '"' GADGETS '"_OK"' STRING arg(2) Return 0