/* ----------------------------------------------------------------------------- This source file is part of OpenSpace3D For the latest info, see http://www.openspace3d.com Copyright (c) 2012 I-maginer This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, or go to http://www.gnu.org/copyleft/lesser.txt ----------------------------------------------------------------------------- */ fun getWalkSounds(l)= let sizelist l -> size in let nil -> ndata in let 0 -> i in ( while i < size do ( let nth_list l i -> elem in let strToListSep elem "," -> pwalksnd in ( set ndata = [(strcat "mat_" (itoa i)) (hd pwalksnd)]::ndata; set ndata = [(strcat "snd_" (itoa i)) (strcatnSep tl pwalksnd " ")]::ndata; ); set i = i + 1; ); ndata; );; fun cbCloseEdit(p)= let p -> [ctrlfov ctrlnclip ctrlfclip ctrlmaxlookup ctrlmaxlookdown ctrlcamh ctrlmass ctrlwspeed ctrlrspeed ctrljump ctrlshift ctrlposx ctrlposy ctrlposz ctrlax ctrlay ctrlaz ctrlwalksounds ctrlsndjump ctrlsndhit ctrlsndslide ctrlhidemouse ctrlenable ctrlinitcam ctrlflymode ctrlfeetpos ctrlfreehead ctrlkeyboard ctrldisabledefcontrol] in let getEdCtrlFloatValue ctrlfov -> fovy in let getEdCtrlFloatValue ctrlnclip -> nclip in let getEdCtrlFloatValue ctrlfclip -> fclip in let getEdCtrlFloatValue ctrlmaxlookup -> lookup in let getEdCtrlFloatValue ctrlmaxlookdown -> lookdown in let getEdCtrlFloatValue ctrlcamh -> camheight in let getEdCtrlFloatValue ctrlmass -> mass in let getEdCtrlFloatValue ctrlwspeed -> wspeed in let getEdCtrlFloatValue ctrlrspeed -> rspeed in let getEdCtrlFloatValue ctrljump -> fjump in let getEdCtrlCheckState ctrlshift -> shiftmode in let getEdCtrlFloatValue ctrlposx -> posx in let getEdCtrlFloatValue ctrlposy -> posy in let getEdCtrlFloatValue ctrlposz -> posz in let getEdCtrlFloatValue ctrlax -> ax in let getEdCtrlFloatValue ctrlay -> ay in let getEdCtrlFloatValue ctrlaz -> az in let getEdCtrlListElems ctrlwalksounds -> lwalksnds in let getEdCtrlTextLineValue ctrlsndjump -> sndjump in let getEdCtrlTextLineValue ctrlsndhit -> sndhit in let getEdCtrlTextLineValue ctrlsndslide -> sndslide in let getEdCtrlCheckState ctrlhidemouse -> hidemouse in let getEdCtrlCheckState ctrlenable -> enable in let getEdCtrlCheckState ctrlkeyboard -> keyboard in let getEdCtrlCheckState ctrlinitcam -> initcam in let getEdCtrlCheckState ctrlflymode -> flymode in let getEdCtrlCheckState ctrlfeetpos -> feetpos in let getEdCtrlCheckState ctrlfreehead -> freehead in let getEdCtrlCheckState ctrldisabledefcontrol -> disabledefcontrol in ["fovy" ftoa fovy]:: ["nclip" ftoa nclip]:: ["fclip" ftoa fclip]:: ["maxlookup" ftoa lookup]:: ["maxlookdown" ftoa lookdown]:: ["cameraheight" ftoa camheight]:: ["mass" ftoa mass]:: ["wspeed" ftoa wspeed]:: ["rspeed" ftoa rspeed]:: ["jumpforce" ftoa fjump]:: ["shiftmode" itoa shiftmode]:: ["posx" ftoa posx]:: ["posy" ftoa posy]:: ["posz" ftoa posz]:: ["angx" ftoa ax]:: ["angy" ftoa ay]:: ["angz" ftoa az]:: ["hidemouse" itoa hidemouse]:: ["enable" itoa enable]:: ["keyboard" itoa keyboard]:: ["flymode" itoa flymode]:: ["feetpos" itoa feetpos]:: ["freehead" itoa freehead]:: ["initcam" itoa initcam]:: ["disabledefcontrol" itoa disabledefcontrol]:: ["sndjump" sndjump]:: ["sndhit" sndhit]:: ["sndslide" sndslide]:: getWalkSounds lwalksnds;; fun cbSelectObjPRS(val, type, p)= let p -> [inst winstr viewstr ctrlposx ctrlposy ctrlposz ctrlax ctrlay ctrlaz] in let V3DgetDefaultSession viewstr -> sessionstr in let if (!strcmpi "Current camera" val) then V3DgetDefaultCamera sessionstr else if (!strcmpi "Current camera shell" val) then (SO3ObjectGetParent (V3DgetDefaultCamera sessionstr)) else SO3SceneGetObject (V3DgetSession sessionstr) val -> obj in if (obj != nil) then ( let SO3ObjectGetGlobalPosition obj -> [x y z] in let SO3MathsQuatToEulerPYR SO3ObjectGetGlobalOrientation obj -> [ax ay az] in // invert X / Y for camera orientation let [(SO3MathsRadianToDegree ax) (SO3MathsRadianToDegree ay) (SO3MathsRadianToDegree az)] -> [ax ay az] in ( setEdCtrlFloatValue ctrlposx x; setEdCtrlFloatValue ctrlposy y; setEdCtrlFloatValue ctrlposz z; setEdCtrlFloatValue ctrlax ax; setEdCtrlFloatValue ctrlay ay; setEdCtrlFloatValue ctrlaz az; ); ) else nil; 0;; fun cbCloseResPRS(ctrlbtn)= setEdCtrlButtonEnable ctrlbtn 1; 0;; fun cbBtnPickObjPRS(ctrlbtn, p)= let p -> [inst winstr viewstr ctrlposx ctrlposy ctrlposz ctrlax ctrlay ctrlaz] in ( setEdCtrlButtonEnable ctrlbtn 0; dlgSelectPluginInstanceResource inst winstr iTypeGroup|iTypeEntity|iTypeNode|iTypeLight|iTypeCamera|iTypeParticle|iTypeBone|iTypeCubeMap|iTypeReflectionMap nil mkfun3 @cbSelectObjPRS p mkfun1 @cbCloseResPRS ctrlbtn 0; ); 0;; fun cbDlgGetSound(pfile, p)= let p -> [inst ctrlbtn winstr ctrlsndname psnd] in ( if pfile == nil then nil else let _PtoScol pfile -> file in if file == nil then ( _DLGMessageBox _channel winstr.EDW_win (loc "OS3DFPS_NAVIGATION_0015") (loc "OS3DFPS_NAVIGATION_0057") 0; 0; ) else ( setEdCtrlTextLineValue ctrlsndname file; 0; ); setEdCtrlButtonEnable ctrlbtn 1; ); 0;; fun cbBtnPickSound(ctrlbtn, p)= let p -> [inst winstr ctrlsndname psnd] in let getEdCtrlTextLineValue ctrlsndname -> sndpath in let getPathFile sndpath "" -> [fpath fname] in ( setEdCtrlButtonEnable ctrlbtn 0; let _GETdesktopSize -> [sw sh] in let getEdWindowPos mainInterf.MINT_winMain -> [nx ny] in let getEdWindowSize mainInterf.MINT_winMain -> [nmw nmh] in let [750 450] -> [iw ih] in let crEdOpenFileDialog _channel winstr nx + ((nmw / 2) - (iw / 2)) ny + ((nmh / 2) - (ih / 2)) iw ih "" ["Sounds" "mp3"::"wav"::"ogg"::nil]::["MP3" "mp3"::nil]::["Ogg" "ogg"::nil]::["Wave" "wav"::nil]::["All" "*.*"::nil]::nil EDFILE_DIALOG_LIST_FOLDERS|EDFILE_DIALOG_SHOW_TOOLBAR nil sndpath -> dlgfstr in ( setEdWindowIcon dlgfstr.EDFD_dialog sWinDlgIcon; setEdOpenFileDialogCb dlgfstr mkfun2 @cbDlgGetSound [inst ctrlbtn winstr ctrlsndname psnd]; 0; ); ); 0;; fun cbRefreshBtn(pickbtn, p)= let p -> [ctrlobjname] in setEdCtrlTextLineValue ctrlobjname ""; 0;; fun loadWalkSounds(inst)= let nil -> ndata in let 0 -> i in ( let getPluginInstanceParam inst (strcat "mat_" (itoa i)) -> mat in let getPluginInstanceParam inst (strcat "snd_" (itoa i)) -> sound in while (mat != nil) do ( let strcatnSep mat::sound::nil "," -> elem in set ndata = if i == 0 then elem::nil else lcat ndata elem::nil; set i = i + 1; set mat = getPluginInstanceParam inst (strcat "mat_" (itoa i)); set sound = getPluginInstanceParam inst (strcat "snd_" (itoa i)); ); ndata; );; fun cbSetList(ctrlstr, p)= let p -> [ctrllist ctrlselectmat ctrlsndwalk] in let getSelectedEdCtrlSelect ctrlselectmat -> value in if (value == nil) || (!strcmp "" strtrim value) then nil else let getSelectedEdCtrlList ctrllist -> [name _ _] in ( let getEdCtrlTextLineValue ctrlsndwalk -> snd in let strcatnSep value::snd::nil "," -> nvalue in ( renameEdCtrlListElement ctrllist name nvalue; ); ); 0;; fun cbAddList(ctrlstr, p)= let p -> [ctrllist ctrlselectmat ctrlsndwalk] in let getSelectedEdCtrlSelect ctrlselectmat -> value in if (value == nil) || (!strcmp "" strtrim value) then nil else let getEdCtrlListElems ctrllist -> lelem in ( if (isStringInListiPos lelem value 0 (strlen value)) then nil else let getEdCtrlTextLineValue ctrlsndwalk -> sound in let strcatnSep value::sound::nil "," -> nvalue in ( addEdCtrlList ctrllist nvalue nil nil; selectEdCtrlSelectByPos ctrllist 0; setEdCtrlTextLineValue ctrlsndwalk ""; ); ); 0;; fun fillWalkSoundsCtrls(value, p)= let p -> [ctrlselectmat ctrlsndwalk] in let strToListSep value "," -> pwalksnd in ( selectEdCtrlSelect ctrlselectmat (hd pwalksnd); setEdCtrlTextLineValue ctrlsndwalk (strcatnSep (tl pwalksnd) " "); ); 0;; fun cbSelectWalkSound(ctrlstr, pos, elem, lval, type, p)= fillWalkSoundsCtrls elem p; 0;; fun cbDelList(ctrlstr, p)= let p -> [ctrllist ctrlselectmat ctrlsndwalk] in let getSelectedEdCtrlList ctrllist -> [name _ _] in ( delEdCtrlList ctrllist name; let getSelectedEdCtrlList ctrllist -> [sname _ _] in fillWalkSoundsCtrls sname [ctrlselectmat ctrlsndwalk]; ); 0;; fun dynamicedit(ewinstr, inst, viewstr, applybtn)= let [420 510] -> [iw ih] in let 10 -> ypos in ( setEdWindowSize ewinstr iw ih; let atof (getPluginInstanceParam inst "wspeed") -> wspeed in let atof (getPluginInstanceParam inst "rspeed") -> rspeed in let atof (getPluginInstanceParam inst "cameraheight") -> camheight in let atof (getPluginInstanceParam inst "jumpforce") -> jumpforce in let atof (getPluginInstanceParam inst "mass") -> mass in let atoi (getPluginInstanceParam inst "shiftmode") -> shiftmode in let atof (getPluginInstanceParam inst "posx") -> posx in let atof (getPluginInstanceParam inst "posy") -> posy in let atof (getPluginInstanceParam inst "posz") -> posz in let atof (getPluginInstanceParam inst "angx") -> ax in let atof (getPluginInstanceParam inst "angy") -> ay in let atof (getPluginInstanceParam inst "angz") -> az in let atof (getPluginInstanceParam inst "fovy") -> fovy in let atof (getPluginInstanceParam inst "nclip") -> nclip in let atof (getPluginInstanceParam inst "fclip") -> fclip in let atof (getPluginInstanceParam inst "maxlookup") -> maxlookup in let atof (getPluginInstanceParam inst "maxlookdown") -> maxlookdown in let atoi (getPluginInstanceParam inst "hidemouse") -> hidemouse in let atoi (getPluginInstanceParam inst "enable") -> enable in let atoi (getPluginInstanceParam inst "keyboard") -> keyboard in let atoi (getPluginInstanceParam inst "flymode") -> flymode in let atoi (getPluginInstanceParam inst "feetpos") -> feetpos in let atoi (getPluginInstanceParam inst "freehead") -> freehead in let atoi (getPluginInstanceParam inst "initcam") -> initcam in let atoi (getPluginInstanceParam inst "disabledefcontrol") -> disabledefcontrol in let strcatn (getPluginDirectory (getInstancePlugin inst))::"/"::"medias/jump.ogg"::nil -> defjumppath in let strcatn (getPluginDirectory (getInstancePlugin inst))::"/"::"medias/hit.ogg"::nil -> defhitpath in let strcatn (getPluginDirectory (getInstancePlugin inst))::"/"::"medias/slide.ogg"::nil -> defslidepath in let strcatn (getPluginDirectory (getInstancePlugin inst))::"/"::"medias/step_default.ogg"::nil -> defsteppath in let getPluginInstanceParam inst "sndjump" -> sndjump in let if mass == nil && sndjump == nil then defjumppath else sndjump -> sndjump in let getPluginInstanceParam inst "sndhit" -> sndhit in let if mass == nil && sndhit == nil then defhitpath else sndhit -> sndhit in let getPluginInstanceParam inst "sndslide" -> sndslide in let if mass == nil && sndslide == nil then defslidepath else sndslide -> sndslide in let if wspeed == nil then 1.0 else wspeed -> wspeed in let if rspeed == nil then 2.0 else rspeed -> rspeed in let if camheight == nil then 1.60 else camheight -> camheight in let if jumpforce == nil then 5.0 else jumpforce -> jumpforce in let if mass == nil then 60.0 else mass -> mass in let if shiftmode == nil then 0 else shiftmode -> shiftmode in let if posx == nil then 0.0 else posx -> posx in let if posy == nil then 0.0 else posy -> posy in let if posz == nil then 0.0 else posz -> posz in let if ax == nil then 0.0 else ax -> ax in let if ay == nil then 0.0 else ay -> ay in let if az == nil then 0.0 else az -> az in let if fovy == nil then 45.0 else fovy -> fovy in let if nclip == nil then 0.1 else nclip -> nclip in let if fclip == nil then 10000.0 else fclip -> fclip in let if maxlookup == nil then 80.0 else maxlookup -> maxlookup in let if maxlookdown == nil then -.85.0 else maxlookdown -> maxlookdown in let if hidemouse == nil then 1 else hidemouse -> hidemouse in let if enable == nil then 1 else enable -> enable in let if keyboard == nil then 1 else keyboard -> keyboard in let if flymode == nil then 0 else flymode -> flymode in let if feetpos == nil then 0 else feetpos -> feetpos in let if freehead == nil then 1 else freehead -> freehead in let if initcam == nil then 1 else initcam -> initcam in let if disabledefcontrol == nil then 0 else disabledefcontrol -> disabledefcontrol in let crEdFrameWindowEx _channel ewinstr 0 0 iw 180 EDWIN_RESIZE_MW nil (loc "OS3DFPS_NAVIGATION_0007") (loc "OS3DFPS_NAVIGATION_0032") 1 -> winfrm in let crEdWindow _channel winfrm 0 18 iw 200 WN_CHILDINSIDE|WN_NOBORDER EDWIN_RESIZE_MW nil nil -> winstr in let crEdCtrlLabel winstr 10 ((set ypos = 10) + 2) 200 20 (loc "OS3DFPS_NAVIGATION_0003") nil -> labelfov in let crEdCtrlFloat winstr 220 ypos 100 20 fovy 0.0 180.0 1.0 2 nil EDWIN_RESIZE_MW -> ctrlfov in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 200 20 (loc "OS3DFPS_NAVIGATION_0006") nil -> labelnclip in let crEdCtrlFloat winstr 220 ypos 100 20 nclip 0.0 100000.0 0.001 5 nil EDWIN_RESIZE_MW -> ctrlnclip in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 200 20 (loc "OS3DFPS_NAVIGATION_0004") nil -> labelfclip in let crEdCtrlFloat winstr 220 ypos 100 20 fclip 0.0 100000.0 0.001 5 nil EDWIN_RESIZE_MW -> ctrlfclip in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 200 20 (loc "OS3DFPS_NAVIGATION_0031") nil -> labelmlup in let crEdCtrlFloat winstr 220 ypos 100 20 maxlookup 0.0 180.0 1.0 2 nil EDWIN_RESIZE_MW -> ctrlmaxlookup in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 200 20 (loc "OS3DFPS_NAVIGATION_0030") nil -> labelmldown in let crEdCtrlFloat winstr 220 ypos 100 20 maxlookdown (-.180.0) 0.0 1.0 2 nil EDWIN_RESIZE_MW -> ctrlmaxlookdown in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 200 20 (loc "OS3DFPS_NAVIGATION_0005") nil -> labelcamh in let crEdCtrlFloat winstr 220 ypos 100 20 camheight (-.10000.0) 10000.0 0.1 4 nil EDWIN_RESIZE_MW -> ctrlcamh in let crEdFrameWindowEx _channel ewinstr 0 0 iw 155 EDWIN_RESIZE_MW nil (loc "OS3DFPS_NAVIGATION_0039") (loc "OS3DFPS_NAVIGATION_0032") 1 -> winfrm in let crEdWindow _channel winfrm 0 18 iw 135 WN_CHILDINSIDE|WN_NOBORDER EDWIN_RESIZE_MW nil nil -> winstr in let crEdCtrlLabel winstr 10 ((set ypos = 10) + 2) 200 20 (loc "OS3DFPS_NAVIGATION_0038") nil -> labelmass in let crEdCtrlFloat winstr 220 ypos 100 20 mass 0.0 100000.0 0.1 4 nil EDWIN_RESIZE_MW -> ctrlmass in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 200 20 (loc "OS3DFPS_NAVIGATION_0055") nil -> labelwspeed in let crEdCtrlFloat winstr 220 ypos 100 20 wspeed 0.0 1000.0 0.1 4 nil EDWIN_RESIZE_MW -> ctrlwspeed in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 200 20 (loc "OS3DFPS_NAVIGATION_0044") nil -> labelrspeed in let crEdCtrlFloat winstr 220 ypos 100 20 rspeed 0.0 1000.0 0.1 4 nil EDWIN_RESIZE_MW -> ctrlrspeed in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 200 20 (loc "OS3DFPS_NAVIGATION_0027") nil -> labeljump in let crEdCtrlFloat winstr 220 ypos 100 20 jumpforce 0.0 10000.0 0.1 4 nil EDWIN_RESIZE_MW -> ctrljump in let crEdCtrlCheck winstr 10 (set ypos = ypos + 25) 280 20 (loc "OS3DFPS_NAVIGATION_0047") EDWIN_RESIZE_MW -> ctrlshift in let crEdFrameWindow _channel ewinstr 0 0 iw 205 EDWIN_RESIZE_MW nil (loc "OS3DFPS_NAVIGATION_0040") (loc "OS3DFPS_NAVIGATION_0032") -> winfrm in let crEdWindow _channel winfrm 0 18 iw 185 WN_CHILDINSIDE|WN_NOBORDER EDWIN_RESIZE_MW nil nil -> winstr in let crEdCtrlButton winstr ((iw / 2) - 100) (set ypos = 10) 200 20 (loc "OS3DFPS_NAVIGATION_0037") nil -> pickPRSbtn in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 200 20 (loc "OS3DFPS_NAVIGATION_0024") nil -> labelposx in let crEdCtrlFloat winstr 220 ypos 100 20 posx (-.100000.0) 100000.0 0.1 4 nil EDWIN_RESIZE_MW -> ctrlposx in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 200 20 (loc "OS3DFPS_NAVIGATION_0025") nil -> labelposy in let crEdCtrlFloat winstr 220 ypos 100 20 posy (-.100000.0) 100000.0 0.1 4 nil EDWIN_RESIZE_MW -> ctrlposy in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 200 20 (loc "OS3DFPS_NAVIGATION_0026") nil -> labelposz in let crEdCtrlFloat winstr 220 ypos 100 20 posz (-.100000.0) 100000.0 0.1 4 nil EDWIN_RESIZE_MW -> ctrlposz in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 200 20 (loc "OS3DFPS_NAVIGATION_0021") nil -> labelax in let crEdCtrlFloat winstr 220 ypos 100 20 ax (-.720.0) 720.0 1.0 2 nil EDWIN_RESIZE_MW -> ctrlax in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 200 20 (loc "OS3DFPS_NAVIGATION_0022") nil -> labelay in let crEdCtrlFloat winstr 220 ypos 100 20 ay (-.720.0) 720.0 1.0 2 nil EDWIN_RESIZE_MW -> ctrlay in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 200 20 (loc "OS3DFPS_NAVIGATION_0023") nil -> labelaz in let crEdCtrlFloat winstr 220 ypos 100 20 az (-.720.0) 720.0 1.0 2 nil EDWIN_RESIZE_MW -> ctrlaz in let crEdFrameWindowEx _channel ewinstr 0 0 iw 210 EDWIN_RESIZE_MW nil (loc "OS3DFPS_NAVIGATION_0054") (loc "OS3DFPS_NAVIGATION_0032") 1 -> winfrm in let crEdWindow _channel winfrm 0 18 iw 190 WN_CHILDINSIDE|WN_NOBORDER EDWIN_RESIZE_MW nil nil -> winstr in let crEdCtrlList winstr 10 (set ypos = 10) (iw - 15) 90 LB_BORDER|LB_VSCROLL|ET_TABFOCUS EDWIN_RESIZE_MW|EDWIN_RESIZE_MH -> ctrlwalksounds in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 95) + 2) 120 20 (loc "OS3DFPS_NAVIGATION_0036") nil -> labelwalk in let crEdCtrlSelect winstr 140 ypos 180 120 CB_AHSCROLL-> ctrlselectmat in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 120 20 (loc "OS3DFPS_NAVIGATION_0051") nil -> labelsndj in let crEdCtrlTextLine winstr 140 ypos 180 20 "" nil EDWIN_RESIZE_MW -> ctrlsndwalk in let crEdCtrlButton winstr 325 ypos 55 20 "..." nil -> picksndwalk in let crEdCtrlButton winstr (iw - 210) (set ypos = ypos + 35) 65 20 (loc "OS3DFPS_NAVIGATION_0002") EDWIN_RESIZE_MW -> ctrlbtnadd in let crEdCtrlButton winstr (iw - 140) ypos 65 20 (loc "OS3DFPS_NAVIGATION_0046") EDWIN_RESIZE_MW -> ctrlbtnset in let crEdCtrlButton winstr (iw - 70) ypos 65 20 (loc "OS3DFPS_NAVIGATION_0043") EDWIN_RESIZE_MW -> ctrlbtndel in let crEdFrameWindowEx _channel ewinstr 0 0 iw 110 EDWIN_RESIZE_MW nil (loc "OS3DFPS_NAVIGATION_0050") (loc "OS3DFPS_NAVIGATION_0032") 1 -> winfrm in let crEdWindow _channel winfrm 0 18 iw 90 WN_CHILDINSIDE|WN_NOBORDER EDWIN_RESIZE_MW nil nil -> winstr in let crEdCtrlLabel winstr 10 ((set ypos = 10) + 2) 120 20 (loc "OS3DFPS_NAVIGATION_0028") nil -> labelsndj in let crEdCtrlTextLine winstr 140 ypos 180 20 sndjump nil EDWIN_RESIZE_MW -> ctrlsndjump in let crEdCtrlButton winstr 325 ypos 55 20 "..." nil -> picksndjump in let crEdCtrlButton winstr 385 ypos 35 20 "X" nil -> refreshsndjump in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 120 20 (loc "OS3DFPS_NAVIGATION_0019") nil -> labelsndh in let crEdCtrlTextLine winstr 140 ypos 180 20 sndhit nil EDWIN_RESIZE_MW -> ctrlsndhit in let crEdCtrlButton winstr 325 ypos 55 20 "..." nil -> picksndhit in let crEdCtrlButton winstr 385 ypos 35 20 "X" nil -> refreshsndhit in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 120 20 (loc "OS3DFPS_NAVIGATION_0048") nil -> labelsnds in let crEdCtrlTextLine winstr 140 ypos 180 20 sndslide nil EDWIN_RESIZE_MW -> ctrlsndslide in let crEdCtrlButton winstr 325 ypos 55 20 "..." nil -> picksndslide in let crEdCtrlButton winstr 385 ypos 35 20 "X" nil -> refreshsndslide in let crEdFrameWindow _channel ewinstr 0 0 iw 225 EDWIN_RESIZE_MW nil (loc "OS3DFPS_NAVIGATION_0033") (loc "OS3DFPS_NAVIGATION_0032") -> winfrm in let crEdWindow _channel winfrm 0 18 iw 205 WN_CHILDINSIDE|WN_NOBORDER EDWIN_RESIZE_MW nil nil -> winstr in let crEdCtrlCheck winstr 10 (set ypos = 10) 280 20 (loc "OS3DFPS_NAVIGATION_0018") EDWIN_RESIZE_MW -> ctrlhidemouse in let crEdCtrlCheck winstr 10 (set ypos = ypos + 25) (iw - 20) 20 (loc "OS3DFPS_NAVIGATION_0012") EDWIN_RESIZE_MW -> ctrldisabledefcontrol in let crEdCtrlCheck winstr 10 (set ypos = ypos + 25) (iw - 20) 20 (loc "OS3DFPS_NAVIGATION_0053") EDWIN_RESIZE_MW -> ctrlkeyboard in let crEdCtrlCheck winstr 10 (set ypos = ypos + 25) (iw - 20) 20 (loc "OS3DFPS_NAVIGATION_0014") EDWIN_RESIZE_MW -> ctrlflymode in let crEdCtrlCheck winstr 10 (set ypos = ypos + 25) (iw - 20) 20 (loc "OS3DFPS_NAVIGATION_0058") EDWIN_RESIZE_MW -> ctrlfeetpos in let crEdCtrlCheck winstr 10 (set ypos = ypos + 25) (iw - 20) 20 (loc "OS3DFPS_NAVIGATION_0059") EDWIN_RESIZE_MW -> ctrlfreehead in let crEdCtrlCheck winstr 10 (set ypos = ypos + 25) (iw - 20) 20 (loc "OS3DFPS_NAVIGATION_0013") EDWIN_RESIZE_MW -> ctrlenable in let crEdCtrlCheck winstr 10 (set ypos = ypos + 25) (iw - 20) 20 (loc "OS3DFPS_NAVIGATION_0001") EDWIN_RESIZE_MW -> ctrlinitcam in ( setEdCtrlCheckState ctrlshift shiftmode; setEdCtrlCheckState ctrlhidemouse hidemouse; setEdCtrlCheckState ctrlenable enable; setEdCtrlCheckState ctrlflymode flymode; setEdCtrlCheckState ctrlfeetpos feetpos; setEdCtrlCheckState ctrlfreehead freehead; setEdCtrlCheckState ctrlinitcam initcam; setEdCtrlCheckState ctrlkeyboard keyboard; setEdCtrlCheckState ctrldisabledefcontrol disabledefcontrol; setEdCtrlButtonCb picksndjump mkfun2 @cbBtnPickSound [inst winstr ctrlsndjump sndjump]; setEdCtrlButtonCb refreshsndjump mkfun2 @cbRefreshBtn [ctrlsndjump]; setEdCtrlTextLineEnable ctrlsndjump 0; setEdCtrlButtonCb picksndhit mkfun2 @cbBtnPickSound [inst winstr ctrlsndhit sndhit]; setEdCtrlButtonCb refreshsndhit mkfun2 @cbRefreshBtn [ctrlsndhit]; setEdCtrlTextLineEnable ctrlsndhit 0; setEdCtrlButtonCb picksndslide mkfun2 @cbBtnPickSound [inst winstr ctrlsndslide sndslide]; setEdCtrlButtonCb refreshsndslide mkfun2 @cbRefreshBtn [ctrlsndslide]; setEdCtrlTextLineEnable ctrlsndslide 0; setEdCtrlButtonCb pickPRSbtn mkfun2 @cbBtnPickObjPRS [inst winstr viewstr ctrlposx ctrlposy ctrlposz ctrlax ctrlay ctrlaz]; fillEdCtrlList ctrlwalksounds (loadWalkSounds inst); fillEdCtrlSelect ctrlselectmat lPhysicMaterial; setEdCtrlListCbClick ctrlwalksounds mkfun6 @cbSelectWalkSound [ctrlselectmat ctrlsndwalk]; setEdCtrlButtonCb ctrlbtnadd mkfun2 @cbAddList [ctrlwalksounds ctrlselectmat ctrlsndwalk]; setEdCtrlButtonCb ctrlbtnset mkfun2 @cbSetList [ctrlwalksounds ctrlselectmat ctrlsndwalk]; setEdCtrlButtonCb ctrlbtndel mkfun2 @cbDelList [ctrlwalksounds ctrlselectmat ctrlsndwalk]; setEdCtrlButtonCb picksndwalk mkfun2 @cbBtnPickSound [inst winstr ctrlsndwalk nil]; setEdCtrlTextLineEnable ctrlsndwalk 0; [mkfun1 @cbCloseEdit [ctrlfov ctrlnclip ctrlfclip ctrlmaxlookup ctrlmaxlookdown ctrlcamh ctrlmass ctrlwspeed ctrlrspeed ctrljump ctrlshift ctrlposx ctrlposy ctrlposz ctrlax ctrlay ctrlaz ctrlwalksounds ctrlsndjump ctrlsndhit ctrlsndslide ctrlhidemouse ctrlenable ctrlinitcam ctrlflymode ctrlfeetpos ctrlfreehead ctrlkeyboard ctrldisabledefcontrol] nil]; ); );;