1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813 |
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Windows.Forms;
- using System.Xml.Linq;
- using System.Xml.Serialization;
- using UnityEngine;
- public class CMSystem
- {
- public CMSystem()
- {
- this.SysButtonShowAlways = true;
- this.FullScreen = false;
- this.SetScreenSize(new Size<int>
- {
- width = 1280,
- height = 720
- });
- this.Antialias = CMSystem.AntiAliasType.X2;
- this.ShadowQuality = CMSystem.ShadowQualityType.Medium;
- this.TextureQuality = CMSystem.TextureQualityType.High;
- this.TargetFPS = 60;
- this.VSync = false;
- this.ViewFps = false;
- this.Bloom = true;
- this.BloomValue = 50;
- this.MsgAlreadySkip = true;
- this.MsgVoiceNoStop = true;
- this.SubtitleType = SubtitleDisplayManager.DisplayType.OriginalAndSubtitle;
- this.EjaculationSeEnabled = true;
- this.NetUse = false;
- this.CM3D2Path = string.Empty;
- this.LoadSystem();
- this.LoadLauncherCfg();
- }
- public bool SysButtonShowAlways { get; set; }
- public bool FullScreen { get; set; }
- public void SetSystemVers(string f_strKey, string f_strVal)
- {
- if (this.m_SystemVers.ContainsKey(f_strKey))
- {
- this.m_SystemVers[f_strKey] = f_strVal;
- }
- else
- {
- this.m_SystemVers.Add(f_strKey, f_strVal);
- }
- }
- public string GetSystemVers(string f_strKey)
- {
- string result = null;
- this.m_SystemVers.TryGetValue(f_strKey, out result);
- return result;
- }
- public List<Size<int>> GetScreenSizeList()
- {
- List<Size<int>> list = new List<Size<int>>();
- list.AddRange(this.m_listScreenDefSize);
- Size<int> siDesktop = default(Size<int>);
- siDesktop.width = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width;
- siDesktop.height = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height;
- list.RemoveAll((Size<int> s) => s.height > siDesktop.width || s.height > siDesktop.height);
- list.Add(siDesktop);
- list.Add(new Size<int>(UnityEngine.Screen.width, UnityEngine.Screen.height));
- return list;
- }
- public void SetScreenSize(Size<int> f_siSize)
- {
- this.m_siScreenSize = f_siSize;
- }
- public Size<int> GetScreenSizeNow()
- {
- return new Size<int>
- {
- width = UnityEngine.Screen.width,
- height = UnityEngine.Screen.height
- };
- }
- public CMSystem.AntiAliasType Antialias { get; set; }
- public CMSystem.ShadowQualityType ShadowQuality { get; set; }
- public CMSystem.TextureQualityType TextureQuality { get; set; }
- public bool VSync { get; set; }
- public int TargetFPS { get; set; }
- public bool ViewFps { get; set; }
- public bool Bloom { get; set; }
- public int BloomValue
- {
- get
- {
- return this.m_nBloomValue;
- }
- set
- {
- this.m_nBloomValue = Math.Max(0, Math.Min(100, value));
- }
- }
- public CMSystem.SSSuperSizeType ScreenShotSuperSize
- {
- get
- {
- return this.m_eScreenShotSuperSize;
- }
- set
- {
- this.m_eScreenShotSuperSize = value;
- }
- }
- public int ManAlpha
- {
- get
- {
- return this.m_nManAlpha;
- }
- set
- {
- this.m_nManAlpha = Math.Max(Math.Min(value, 100), 0);
- }
- }
- public int MsgWndAlpha
- {
- get
- {
- return this.m_nMsgWndAlpha;
- }
- set
- {
- this.m_nMsgWndAlpha = Math.Max(Math.Min(value, 100), 0);
- }
- }
- public int MsgTextSpeed
- {
- get
- {
- return this.m_nMsgTextSpeed;
- }
- set
- {
- this.m_nMsgTextSpeed = Math.Max(Math.Min(value, 100), 0);
- }
- }
- public int MsgAutoSpeed
- {
- get
- {
- return this.m_nMsgAutoSpeed;
- }
- set
- {
- this.m_nMsgAutoSpeed = Math.Max(Math.Min(value, 100), 0);
- }
- }
- public bool MsgAlreadySkip { get; set; }
- public bool MsgVoiceNoStop { get; set; }
- public SubtitleDisplayManager.DisplayType SubtitleType
- {
- get
- {
- return this.m_SubtitleType;
- }
- set
- {
- this.m_SubtitleType = SubtitleDisplayManager.DisplayType.None;
- }
- }
- public bool EjaculationSeEnabled { get; set; }
- public int FadeSpeed
- {
- get
- {
- return this.m_nFadeSpeed;
- }
- set
- {
- this.m_nFadeSpeed = Math.Max(Math.Min(value, 100), 0);
- }
- }
- public float FadeSpeedRate
- {
- get
- {
- return ((float)this.m_nFadeSpeed / 100f > 0.05f) ? ((float)this.m_nFadeSpeed / 100f) : 0.05f;
- }
- }
- public bool NetUse { get; set; }
- public string CM3D2Path { get; private set; }
- public int DesktopCaptureMonitorNo
- {
- get
- {
- return this.m_nDesktopCaptureMonitorNo;
- }
- set
- {
- this.m_nDesktopCaptureMonitorNo = value;
- }
- }
- public bool EditItemGroup
- {
- get
- {
- return this.m_bEditItemGroup;
- }
- set
- {
- this.m_bEditItemGroup = value;
- }
- }
- public bool EditTouchJump
- {
- get
- {
- return this.m_bEditTouchJump;
- }
- set
- {
- this.m_bEditTouchJump = value;
- }
- }
- public float VRCameraHeightStand
- {
- get
- {
- return this.m_fVRCameraHeightStand;
- }
- set
- {
- this.m_fVRCameraHeightStand = Mathf.Clamp(value, 1.5f, 1.8f);
- }
- }
- public float VRCameraHeightStandOffs
- {
- get
- {
- return this.m_fVRCameraHeightStand - 0.1f;
- }
- }
- public float VRCameraHeightSit
- {
- get
- {
- return this.m_fVRCameraHeightSit;
- }
- set
- {
- this.m_fVRCameraHeightSit = Mathf.Clamp(value, 0.7f, 1f);
- }
- }
- public float VRCameraHeightSitOffs
- {
- get
- {
- return this.m_fVRCameraHeightSit - 0.1f;
- }
- }
- public float VRCameraMoveSpeedKey
- {
- get
- {
- return this.m_fVRCameraMoveSpeedKey;
- }
- set
- {
- this.m_fVRCameraMoveSpeedKey = Mathf.Clamp(value, 0f, 1f);
- }
- }
- public float VRCameraRotSpeedKey
- {
- get
- {
- return this.m_fVRCameraRotSpeedKey;
- }
- set
- {
- this.m_fVRCameraRotSpeedKey = Mathf.Clamp(value, 0f, 1f);
- }
- }
- public bool VRCameraPlaneMove
- {
- get
- {
- return this.m_bVRCameraPlaneMove;
- }
- set
- {
- this.m_bVRCameraPlaneMove = value;
- }
- }
- public float VRCameraRotSpeedMouse
- {
- get
- {
- return this.m_fVRCameraRotSpeedMouse;
- }
- set
- {
- this.m_fVRCameraRotSpeedMouse = Mathf.Clamp(value, 0f, 1f);
- }
- }
- public bool VRManShow
- {
- get
- {
- return this.m_bVRManShow;
- }
- set
- {
- this.m_bVRManShow = value;
- }
- }
- public float VRCameraFov
- {
- get
- {
- return this.m_fVRCameraFov;
- }
- set
- {
- this.m_fVRCameraFov = Mathf.Clamp(value, 30f, 60f);
- }
- }
- public bool VRCamRotDownUp
- {
- get
- {
- return this.m_bVRCamRotDownUp;
- }
- set
- {
- this.m_bVRCamRotDownUp = value;
- }
- }
- public float OvrHeadScale
- {
- get
- {
- return this.m_fOvrHeadScale;
- }
- set
- {
- this.m_fOvrHeadScale = Math.Max(Math.Min(value, 3f), 0.1f);
- }
- }
- public float OvrCursorStabilization
- {
- get
- {
- return this.m_fOvrCursorStabilization;
- }
- set
- {
- this.m_fOvrCursorStabilization = value;
- }
- }
- public float OvrCursorBoostSpeed
- {
- get
- {
- return this.m_fOvrCursorBoostSpeed;
- }
- set
- {
- this.m_fOvrCursorBoostSpeed = value;
- }
- }
- public int OvrPointerMode
- {
- get
- {
- return this.m_nOvrPointerMode;
- }
- set
- {
- this.m_nOvrPointerMode = value;
- }
- }
- public int OvrMoveMode
- {
- get
- {
- return this.m_nOvrMoveMode;
- }
- set
- {
- this.m_nOvrMoveMode = value;
- }
- }
- public float OvrCursorPadSpeed
- {
- get
- {
- return this.m_fOvrCursorPadSpeed;
- }
- set
- {
- this.m_fOvrCursorPadSpeed = value;
- }
- }
- public float OvrViveCursorLaserHitScale
- {
- get
- {
- return this.m_fOvrViveCursorLaserHitScale;
- }
- set
- {
- this.m_fOvrViveCursorLaserHitScale = value;
- }
- }
- public float OvrViveCursorLaserEasing
- {
- get
- {
- return this.m_fOvrViveCursorLaserEasing;
- }
- set
- {
- this.m_fOvrViveCursorLaserEasing = value;
- }
- }
- public int OvrHandCameraWidth
- {
- get
- {
- return this.m_nOvrHandCameraWidth;
- }
- set
- {
- this.m_nOvrHandCameraWidth = value;
- }
- }
- public int OvrHandCameraHeight
- {
- get
- {
- return this.m_nOvrHandCameraHeight;
- }
- set
- {
- this.m_nOvrHandCameraHeight = value;
- }
- }
- public Dictionary<string, CMSystem.TransDD> OvrDDBG
- {
- get
- {
- return this.m_dicVRDDBG;
- }
- set
- {
- this.m_dicVRDDBG = value;
- }
- }
- public bool OvrScreenMirror
- {
- get
- {
- return this.m_bOvrScreenMirror;
- }
- set
- {
- this.m_bOvrScreenMirror = value;
- }
- }
- public CMSystem.OVR_CAM_HEIGHT_TYPE OvrCameraHeightType
- {
- get
- {
- return this.m_eOvrCameraHeightType;
- }
- set
- {
- this.m_eOvrCameraHeightType = value;
- }
- }
- public bool OvrMouseRot
- {
- get
- {
- return this.m_bOvrMouseRot;
- }
- set
- {
- this.m_bOvrMouseRot = value;
- }
- }
- public float OvrUITabletSize
- {
- get
- {
- return this.m_fOvrUITabletSize;
- }
- set
- {
- this.m_fOvrUITabletSize = value;
- }
- }
- public bool OvrUseTouch
- {
- get
- {
- return this.m_bOvrUseTouch;
- }
- set
- {
- this.m_bOvrUseTouch = value;
- }
- }
- public bool OvrUseNewControllerType
- {
- get
- {
- return this.m_bUseNewControllerType;
- }
- set
- {
- this.m_bUseNewControllerType = value;
- }
- }
- public bool OvrUseSnapRotate
- {
- get
- {
- return this.m_bOvrUseSnapRotate;
- }
- set
- {
- this.m_bOvrUseSnapRotate = value;
- }
- }
- public int OvrUseSnapRotateRate
- {
- get
- {
- return this.m_nOvrUseSnapRotateRate;
- }
- set
- {
- this.m_nOvrUseSnapRotateRate = Mathf.Clamp(value, 10, 80);
- }
- }
- public bool QuitWhenAssert
- {
- get
- {
- return NDebug.m_bQuitWhenAssert;
- }
- set
- {
- NDebug.m_bQuitWhenAssert = value;
- }
- }
- public string ShopURL
- {
- get
- {
- string text = "https://com3d2-shop.s-court.me/?ctv=1";
- if (!string.IsNullOrEmpty(this.CM3D2Path))
- {
- text += "&cmd=1";
- }
- else
- {
- text += "&cmd=0";
- }
- return text;
- }
- }
- public CMSystem.SerializeConfig SConfig
- {
- get
- {
- return this.m_SConfig;
- }
- }
- public void SetTmpGenericFlag(string flag_name, int val)
- {
- if (this.m_GenericTmpFlag.ContainsKey(flag_name))
- {
- this.m_GenericTmpFlag[flag_name] = val;
- }
- else
- {
- this.m_GenericTmpFlag.Add(flag_name, val);
- }
- }
- public int GetTmpGenericFlag(string flag_name)
- {
- return (!this.m_GenericTmpFlag.ContainsKey(flag_name)) ? 0 : this.m_GenericTmpFlag[flag_name];
- }
- public bool ExistEditColorPresetData(int slotNo)
- {
- return this.m_dicEditColorPresetData.ContainsKey(slotNo);
- }
- public Dictionary<string, int> GetEditColorPresetData(int slotNo)
- {
- return this.ExistEditColorPresetData(slotNo) ? this.m_dicEditColorPresetData[slotNo] : null;
- }
- public void SetEditColorPresetData(int slotNo, Dictionary<string, int> setData)
- {
- if (this.ExistEditColorPresetData(slotNo))
- {
- this.m_dicEditColorPresetData.Remove(slotNo);
- }
- if (setData != null)
- {
- this.m_dicEditColorPresetData.Add(slotNo, setData);
- }
- }
- public void RemoveEditColorPresetData(int slotNo)
- {
- this.SetEditColorPresetData(slotNo, null);
- }
- public void ConfigSystemApply()
- {
- }
- public void ConfigScreenApply()
- {
- bool flag = false;
- if (this.ShadowQuality == CMSystem.ShadowQualityType.None)
- {
- if (QualitySettings.GetQualityLevel() != 2)
- {
- QualitySettings.SetQualityLevel(2);
- flag = true;
- }
- }
- else if (this.ShadowQuality == CMSystem.ShadowQualityType.Low)
- {
- if (QualitySettings.GetQualityLevel() != 3)
- {
- QualitySettings.SetQualityLevel(3);
- flag = true;
- }
- }
- else if (this.ShadowQuality == CMSystem.ShadowQualityType.Medium)
- {
- if (QualitySettings.GetQualityLevel() != 4)
- {
- QualitySettings.SetQualityLevel(4);
- flag = true;
- }
- }
- else if (this.ShadowQuality == CMSystem.ShadowQualityType.High && QualitySettings.GetQualityLevel() != 5)
- {
- QualitySettings.SetQualityLevel(5);
- flag = true;
- }
- if (!GameMain.Instance.VRMode || GameMain.Instance.VRDummyMode)
- {
- if (UnityEngine.Screen.width != this.m_siScreenSize.width || UnityEngine.Screen.height != this.m_siScreenSize.height || UnityEngine.Screen.fullScreen != this.FullScreen)
- {
- UnityEngine.Screen.SetResolution(this.m_siScreenSize.width, this.m_siScreenSize.height, this.FullScreen);
- flag = true;
- }
- if (QualitySettings.antiAliasing != this.m_nAntiAlias[(int)this.Antialias])
- {
- QualitySettings.antiAliasing = this.m_nAntiAlias[(int)this.Antialias];
- flag = true;
- }
- }
- else if (QualitySettings.antiAliasing != this.m_nAntiAlias[(int)this.Antialias])
- {
- QualitySettings.antiAliasing = this.m_nAntiAlias[(int)this.Antialias];
- flag = true;
- }
- if (this.TextureQuality == CMSystem.TextureQualityType.Low)
- {
- if (QualitySettings.anisotropicFiltering != AnisotropicFiltering.Disable)
- {
- QualitySettings.anisotropicFiltering = AnisotropicFiltering.Disable;
- flag = true;
- }
- }
- else if (this.TextureQuality == CMSystem.TextureQualityType.Medium)
- {
- if (QualitySettings.anisotropicFiltering != AnisotropicFiltering.Enable)
- {
- QualitySettings.anisotropicFiltering = AnisotropicFiltering.Enable;
- flag = true;
- }
- }
- else if (this.TextureQuality == CMSystem.TextureQualityType.High && QualitySettings.anisotropicFiltering != AnisotropicFiltering.ForceEnable)
- {
- QualitySettings.anisotropicFiltering = AnisotropicFiltering.ForceEnable;
- flag = true;
- }
- if (!GameMain.Instance.VRMode || GameMain.Instance.VRDummyMode)
- {
- if (this.VSync)
- {
- if (QualitySettings.vSyncCount != 60)
- {
- QualitySettings.vSyncCount = 60;
- }
- }
- else if (QualitySettings.vSyncCount != 0)
- {
- QualitySettings.vSyncCount = 0;
- }
- if (UnityEngine.Application.targetFrameRate != this.TargetFPS)
- {
- UnityEngine.Application.targetFrameRate = this.TargetFPS;
- }
- flag = true;
- }
- else
- {
- if (QualitySettings.vSyncCount != 0)
- {
- QualitySettings.vSyncCount = 0;
- flag = true;
- }
- if (UnityEngine.Application.targetFrameRate != -1)
- {
- UnityEngine.Application.targetFrameRate = -1;
- flag = true;
- }
- }
- if (GameMain.Instance != null && GameMain.Instance.FpsCounter != null)
- {
- GameMain.Instance.FpsCounter.gameObject.SetActive(this.ViewFps);
- }
- if (GameMain.Instance != null && GameMain.Instance.CharacterMgr != null)
- {
- GameMain.Instance.CharacterMgr.ManAlphaUpdate();
- }
- if (flag && GameMain.Instance != null)
- {
- GameMain.Instance.BroadcastMessage("OnChangeScreenSizeOrAA", SendMessageOptions.DontRequireReceiver);
- }
- }
- public bool SaveIni()
- {
- XElement xelement = new XElement("Config", new object[]
- {
- new XAttribute("Version", 1230),
- new XElement("System", new XElement("SysButtonShowAlways", this.SysButtonShowAlways)),
- new XElement("Screen", new object[]
- {
- new XElement("FullScreen", this.FullScreen),
- new XElement("ScreenSizeNow.width", this.GetScreenSizeNow().width),
- new XElement("ScreenSizeNow.height", this.GetScreenSizeNow().height),
- new XElement("Antialias", this.Antialias),
- new XElement("ShadowQuality", this.ShadowQuality),
- new XElement("TextureQuality", this.TextureQuality),
- new XElement("VSync", this.VSync),
- new XElement("TargetFPS", this.TargetFPS),
- new XElement("ViewFps", this.ViewFps),
- new XElement("Bloom", this.Bloom),
- new XElement("BloomValue", this.BloomValue),
- new XElement("ScreenShotSuperSize", this.ScreenShotSuperSize),
- new XElement("ManAlpha", this.ManAlpha)
- }),
- new XElement("Message", new object[]
- {
- new XElement("MsgWndAlpha", this.MsgWndAlpha),
- new XElement("MsgTextSpeed", this.MsgTextSpeed),
- new XElement("MsgAutoSpeed", this.MsgAutoSpeed),
- new XElement("MsgAlreadySkip", this.MsgAlreadySkip),
- new XElement("MsgVoiceNoStop", this.MsgVoiceNoStop),
- new XElement("SubtitleType", this.SubtitleType.ToString()),
- new XElement("EjaculationSeEnabled", this.EjaculationSeEnabled)
- }),
- new XElement("Other", new object[]
- {
- new XElement("FadeSpeed", this.FadeSpeed),
- new XElement("DesktopCaptureMonitorNo", this.DesktopCaptureMonitorNo),
- new XElement("EditItemGroup", this.EditItemGroup),
- new XElement("EditTouchJump", this.EditTouchJump),
- new XElement("VRCameraHeightStand", (int)(this.VRCameraHeightStand * 1000f)),
- new XElement("VRCameraHeightSit", (int)(this.VRCameraHeightSit * 1000f)),
- new XElement("VRCameraMoveSpeedKey", (int)(this.VRCameraMoveSpeedKey * 1000f)),
- new XElement("VRCameraRotSpeedKey", (int)(this.VRCameraRotSpeedKey * 1000f)),
- new XElement("VRCameraPlaneMove", this.VRCameraPlaneMove),
- new XElement("VRCameraRotSpeedMouse", (int)(this.VRCameraRotSpeedMouse * 1000f)),
- new XElement("VRManShow", this.VRManShow),
- new XElement("VRCameraFov", (int)(this.VRCameraFov * 1000f)),
- new XElement("VRCamRotDownUp", this.VRCamRotDownUp),
- new XElement("QuitWhenAssert", this.QuitWhenAssert)
- })
- });
- if (GameMain.Instance.VRMode && !GameMain.Instance.VRDummyMode)
- {
- XContainer xcontainer = xelement;
- XName name = "Ovr";
- object[] array = new object[21];
- array[0] = new XElement("OvrConfVer", this.m_nOvrConfVer);
- array[1] = new XElement("HeadScale", (int)(this.OvrHeadScale * 1000f));
- array[2] = new XElement("CursorBoostSpeed", (int)(this.OvrCursorBoostSpeed * 1000f));
- array[3] = new XElement("CursorStabilization", (int)(this.OvrCursorStabilization * 1000f));
- array[4] = new XElement("PointerMode", this.OvrPointerMode);
- array[5] = new XElement("OvrMoveMode", this.OvrMoveMode);
- array[6] = new XElement("CursorPadSpeed", (int)(this.OvrCursorPadSpeed * 1000f));
- array[7] = new XElement("OvrViveCursorLaserHitScale", (int)(this.OvrViveCursorLaserHitScale * 1000f));
- array[8] = new XElement("OvrViveCursorLaserEasing", (int)(this.OvrViveCursorLaserEasing * 1000f));
- array[9] = new XElement("OvrHandCameraWidth", this.OvrHandCameraWidth);
- array[10] = new XElement("OvrHandCameraHeight", this.OvrHandCameraHeight);
- array[11] = new XElement("OvrDDBG", from keyValue in this.OvrDDBG
- select new XElement(keyValue.Key, keyValue.Value.ToSaveString()));
- array[12] = new XElement("OvrHandCameraWidth", this.OvrHandCameraWidth);
- array[13] = new XElement("OvrScreenMirror", this.OvrScreenMirror);
- array[14] = new XElement("OvrCameraHeightType1", this.OvrCameraHeightType);
- array[15] = new XElement("OvrMouseRot", this.OvrMouseRot);
- array[16] = new XElement("OvrUITabletSize", (int)(this.OvrUITabletSize * 1000f));
- array[17] = new XElement("OvrUseTouch", this.OvrUseTouch);
- array[18] = new XElement("OvrUseNewControllerType2", this.OvrUseNewControllerType);
- array[19] = new XElement("OvrUseSnapRotate2", this.OvrUseSnapRotate);
- array[20] = new XElement("OvrUseSnapRotateRate", this.OvrUseSnapRotateRate);
- xcontainer.Add(new XElement(name, array));
- }
- string value = JsonUtility.ToJson(this.m_SConfig, true);
- xelement.Add(new XElement("SJConfig", value));
- GameMain.Instance.SoundMgr.SaveIni(xelement);
- XDocument xdocument = new XDocument(new XDeclaration("1.0", "utf-8", "true"), new object[]
- {
- new XComment("CM3D2 Config"),
- xelement
- });
- string text = Path.GetFullPath(".\\");
- if (!GameMain.Instance.VRMode || GameMain.Instance.VRDummyMode)
- {
- text += "config.xml";
- }
- else
- {
- text += "config_ovr.xml";
- }
- xdocument.Save(text);
- return true;
- }
- public bool LoadIni()
- {
- string text = Path.GetFullPath(".\\");
- if (!GameMain.Instance.VRMode || GameMain.Instance.VRDummyMode)
- {
- text += "config.xml";
- }
- else
- {
- text += "config_ovr.xml";
- }
- if (File.Exists(text))
- {
- try
- {
- XDocument xdocument = XDocument.Load(text);
- XElement xelement = xdocument.Element("Config");
- XElement xelm = xelement.Element("System");
- this.SysButtonShowAlways = bool.Parse(this.getElemetn(xelm, "SysButtonShowAlways", "true").Value);
- XElement xelm2 = xelement.Element("Screen");
- this.FullScreen = bool.Parse(this.getElemetn(xelm2, "FullScreen", "false").Value);
- this.m_siScreenSize.width = int.Parse(this.getElemetn(xelm2, "ScreenSizeNow.width", "1280").Value);
- this.m_siScreenSize.height = int.Parse(this.getElemetn(xelm2, "ScreenSizeNow.height", "720").Value);
- this.Antialias = (CMSystem.AntiAliasType)Enum.Parse(typeof(CMSystem.AntiAliasType), this.getElemetn(xelm2, "Antialias", CMSystem.AntiAliasType.X2.ToString()).Value);
- this.ShadowQuality = (CMSystem.ShadowQualityType)Enum.Parse(typeof(CMSystem.ShadowQualityType), this.getElemetn(xelm2, "ShadowQuality", CMSystem.ShadowQualityType.Medium.ToString()).Value);
- this.TextureQuality = (CMSystem.TextureQualityType)Enum.Parse(typeof(CMSystem.TextureQualityType), this.getElemetn(xelm2, "TextureQuality", CMSystem.TextureQualityType.High.ToString()).Value);
- this.VSync = bool.Parse(this.getElemetn(xelm2, "VSync", "false").Value);
- this.TargetFPS = int.Parse(this.getElemetn(xelm2, "TargetFPS", "60").Value);
- this.ViewFps = bool.Parse(this.getElemetn(xelm2, "ViewFps", "false").Value);
- this.Bloom = bool.Parse(this.getElemetn(xelm2, "Bloom", "true").Value);
- this.BloomValue = int.Parse(this.getElemetn(xelm2, "BloomValue", "100").Value);
- this.ScreenShotSuperSize = (CMSystem.SSSuperSizeType)Enum.Parse(typeof(CMSystem.SSSuperSizeType), this.getElemetn(xelm2, "ScreenShotSuperSize", CMSystem.SSSuperSizeType.X1.ToString()).Value);
- this.ManAlpha = int.Parse(this.getElemetn(xelm2, "ManAlpha", "50").Value);
- XElement xelm3 = xelement.Element("Message");
- this.MsgWndAlpha = int.Parse(this.getElemetn(xelm3, "MsgWndAlpha", "0").Value);
- this.MsgTextSpeed = int.Parse(this.getElemetn(xelm3, "MsgTextSpeed", "80").Value);
- this.MsgAutoSpeed = int.Parse(this.getElemetn(xelm3, "MsgAutoSpeed", "50").Value);
- this.MsgAlreadySkip = bool.Parse(this.getElemetn(xelm3, "MsgAlreadySkip", "true").Value);
- this.MsgVoiceNoStop = bool.Parse(this.getElemetn(xelm3, "MsgVoiceNoStop", "true").Value);
- try
- {
- this.SubtitleType = (SubtitleDisplayManager.DisplayType)Enum.Parse(typeof(SubtitleDisplayManager.DisplayType), this.getElemetn(xelm3, "SubtitleType", SubtitleDisplayManager.DisplayType.OriginalAndSubtitle.ToString()).Value);
- }
- catch (Exception)
- {
- this.SubtitleType = SubtitleDisplayManager.DisplayType.None;
- }
- this.EjaculationSeEnabled = bool.Parse(this.getElemetn(xelm3, "EjaculationSeEnabled", "true").Value);
- XElement xelement2 = xelement.Element("Other");
- if (xelement2 != null)
- {
- this.FadeSpeed = int.Parse(this.getElemetn(xelement2, "FadeSpeed", "100").Value);
- this.DesktopCaptureMonitorNo = int.Parse(this.getElemetn(xelement2, "DesktopCaptureMonitorNo", "1").Value);
- this.EditItemGroup = bool.Parse(this.getElemetn(xelement2, "EditItemGroup", "True").Value);
- this.EditTouchJump = bool.Parse(this.getElemetn(xelement2, "EditTouchJump", "False").Value);
- this.VRCameraHeightStand = (float)int.Parse(this.getElemetn(xelement2, "VRCameraHeightStand", (this.VRCameraHeightStand * 1000f).ToString()).Value) / 1000f;
- this.VRCameraHeightSit = (float)int.Parse(this.getElemetn(xelement2, "VRCameraHeightSit", (this.VRCameraHeightSit * 1000f).ToString()).Value) / 1000f;
- this.VRCameraMoveSpeedKey = (float)int.Parse(this.getElemetn(xelement2, "VRCameraMoveSpeedKey", (this.VRCameraMoveSpeedKey * 1000f).ToString()).Value) / 1000f;
- this.VRCameraRotSpeedKey = (float)int.Parse(this.getElemetn(xelement2, "VRCameraRotSpeedKey", (this.VRCameraRotSpeedKey * 1000f).ToString()).Value) / 1000f;
- this.VRCameraPlaneMove = bool.Parse(this.getElemetn(xelement2, "VRCameraPlaneMove", this.VRCameraPlaneMove.ToString()).Value);
- this.VRCameraRotSpeedMouse = (float)int.Parse(this.getElemetn(xelement2, "VRCameraRotSpeedMouse", (this.VRCameraRotSpeedMouse * 1000f).ToString()).Value) / 1000f;
- this.VRManShow = bool.Parse(this.getElemetn(xelement2, "VRManShow", this.VRManShow.ToString()).Value);
- this.VRCameraFov = (float)int.Parse(this.getElemetn(xelement2, "VRCameraFov", (this.VRCameraFov * 1000f).ToString()).Value) / 1000f;
- this.VRCamRotDownUp = bool.Parse(this.getElemetn(xelement2, "VRCamRotDownUp", this.VRCamRotDownUp.ToString()).Value);
- this.QuitWhenAssert = bool.Parse(this.getElemetn(xelement2, "QuitWhenAssert", this.QuitWhenAssert.ToString()).Value);
- }
- if (GameMain.Instance.VRMode && !GameMain.Instance.VRDummyMode)
- {
- XElement xelement3 = xelement.Element("Ovr");
- if (xelement3 != null)
- {
- int num = 0;
- XElement xelement4 = xelement3.Element("OvrConfVer");
- if (xelement4 != null)
- {
- num = int.Parse(xelement4.Value);
- }
- xelement4 = xelement3.Element("HeadScale");
- if (xelement4 != null)
- {
- this.OvrHeadScale = (float)int.Parse(xelement4.Value) / 1000f;
- }
- xelement4 = xelement3.Element("CursorBoostSpeed");
- if (xelement4 != null)
- {
- this.OvrCursorBoostSpeed = (float)int.Parse(xelement4.Value) / 1000f;
- }
- xelement4 = xelement3.Element("CursorStabilization");
- if (xelement4 != null)
- {
- this.OvrCursorStabilization = (float)int.Parse(xelement4.Value) / 1000f;
- }
- xelement4 = xelement3.Element("PointerMode");
- if (xelement4 != null)
- {
- this.OvrPointerMode = int.Parse(xelement4.Value);
- }
- xelement4 = xelement3.Element("OvrMoveMode");
- if (xelement4 != null)
- {
- this.OvrMoveMode = int.Parse(xelement4.Value);
- }
- xelement4 = xelement3.Element("CursorPadSpeed");
- if (xelement4 != null)
- {
- this.OvrCursorPadSpeed = (float)int.Parse(xelement4.Value) / 1000f;
- }
- xelement4 = xelement3.Element("OvrViveCursorLaserHitScale");
- if (xelement4 != null)
- {
- this.OvrViveCursorLaserHitScale = (float)int.Parse(xelement4.Value) / 1000f;
- }
- xelement4 = xelement3.Element("OvrViveCursorLaserEasing");
- if (xelement4 != null)
- {
- this.OvrViveCursorLaserEasing = (float)int.Parse(xelement4.Value) / 1000f;
- }
- xelement4 = xelement3.Element("OvrHandCameraWidth");
- if (xelement4 != null)
- {
- this.OvrHandCameraWidth = int.Parse(xelement4.Value);
- }
- xelement4 = xelement3.Element("OvrHandCameraHeight");
- if (xelement4 != null)
- {
- this.OvrHandCameraHeight = int.Parse(xelement4.Value);
- }
- xelement4 = xelement3.Element("OvrDDBG");
- if (xelement4 != null)
- {
- this.OvrDDBG.Clear();
- foreach (XElement xelement5 in xelement4.Elements())
- {
- this.OvrDDBG.Add(xelement5.Name.LocalName, new CMSystem.TransDD(xelement5.Value, num));
- }
- }
- xelement4 = xelement3.Element("OvrScreenMirror");
- if (xelement4 != null)
- {
- this.OvrScreenMirror = bool.Parse(xelement4.Value);
- }
- xelement4 = xelement3.Element("OvrCameraHeightType1");
- if (xelement4 != null)
- {
- this.OvrCameraHeightType = (CMSystem.OVR_CAM_HEIGHT_TYPE)Enum.Parse(typeof(CMSystem.OVR_CAM_HEIGHT_TYPE), xelement4.Value);
- }
- xelement4 = xelement3.Element("OvrMouseRot");
- if (xelement4 != null)
- {
- this.OvrMouseRot = bool.Parse(xelement4.Value);
- }
- xelement4 = xelement3.Element("OvrUITabletSize");
- if (xelement4 != null)
- {
- this.OvrUITabletSize = (float)int.Parse(xelement4.Value) / 1000f;
- }
- xelement4 = xelement3.Element("OvrUseTouch");
- if (xelement4 != null)
- {
- this.OvrUseTouch = bool.Parse(xelement4.Value);
- }
- xelement4 = xelement3.Element("OvrUseNewControllerType2");
- if (xelement4 != null)
- {
- this.OvrUseNewControllerType = bool.Parse(xelement4.Value);
- }
- xelement4 = xelement3.Element("OvrUseSnapRotate2");
- if (xelement4 != null)
- {
- this.OvrUseSnapRotate = bool.Parse(xelement4.Value);
- }
- xelement4 = xelement3.Element("OvrUseSnapRotateRate");
- if (xelement4 != null)
- {
- this.OvrUseSnapRotateRate = int.Parse(xelement4.Value);
- }
- if (num < 1430)
- {
- this.OvrPointerMode = 0;
- this.OvrCursorPadSpeed *= 1000f;
- }
- }
- }
- XElement xelement6 = xelement.Element("SJConfig");
- if (xelement6 != null)
- {
- this.m_SConfig = JsonUtility.FromJson<CMSystem.SerializeConfig>(xelement6.Value);
- }
- GameMain.Instance.SoundMgr.LoadIni(xelement);
- Debug.Log("コンフィグ内容 " + xdocument.ToString(SaveOptions.DisableFormatting));
- }
- catch (Exception ex)
- {
- Debug.LogError("コンフィグが読み込めませんでした。" + ex.Message);
- }
- }
- else
- {
- Debug.Log("コンフィグファイル " + text + " はありません。(初回起動)");
- }
- this.ConfigSystemApply();
- this.ConfigScreenApply();
- GameMain.Instance.SoundMgr.Apply();
- return true;
- }
- private XElement getElemetn(XElement xelm, string name, string def)
- {
- xelm = xelm.Element(name);
- if (xelm == null)
- {
- xelm = new XElement(name, def);
- }
- return xelm;
- }
- public void SaveSystem()
- {
- MemoryStream memoryStream = new MemoryStream();
- BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
- binaryWriter.Write("CM3D2_SYSTEM2");
- binaryWriter.Write(1230);
- binaryWriter.Write(this.m_dicEditColorPresetData.Count);
- foreach (KeyValuePair<int, Dictionary<string, int>> keyValuePair in this.m_dicEditColorPresetData)
- {
- binaryWriter.Write(keyValuePair.Key);
- binaryWriter.Write(keyValuePair.Value.Count);
- foreach (KeyValuePair<string, int> keyValuePair2 in keyValuePair.Value)
- {
- binaryWriter.Write(keyValuePair2.Key);
- binaryWriter.Write(keyValuePair2.Value);
- }
- }
- binaryWriter.Write(this.m_SystemVers.Count);
- foreach (KeyValuePair<string, string> keyValuePair3 in this.m_SystemVers)
- {
- binaryWriter.Write(keyValuePair3.Key);
- binaryWriter.Write(keyValuePair3.Value);
- }
- File.WriteAllBytes(Path.GetFullPath(".\\") + "system.dat", memoryStream.ToArray());
- memoryStream.Dispose();
- memoryStream = null;
- }
- public bool LoadSystem()
- {
- string path = Path.GetFullPath(".\\") + "system.dat";
- if (File.Exists(path))
- {
- try
- {
- this.m_dicEditColorPresetData.Clear();
- this.m_SystemVers.Clear();
- using (FileStream fileStream = new FileStream(Path.GetFullPath(".\\") + "system.dat", FileMode.Open))
- {
- BinaryReader binaryReader = new BinaryReader(fileStream);
- string a = binaryReader.ReadString();
- if (a == "CM3D2_SYSTEM")
- {
- return true;
- }
- NDebug.Assert(a == "CM3D2_SYSTEM2", "システムファイルのヘッダーが不正です。");
- int num = binaryReader.ReadInt32();
- int num2 = binaryReader.ReadInt32();
- for (int i = 0; i < num2; i++)
- {
- int key = binaryReader.ReadInt32();
- int num3 = binaryReader.ReadInt32();
- Dictionary<string, int> dictionary = new Dictionary<string, int>();
- for (int j = 0; j < num3; j++)
- {
- string key2 = binaryReader.ReadString();
- int value = binaryReader.ReadInt32();
- dictionary.Add(key2, value);
- }
- this.m_dicEditColorPresetData.Add(key, dictionary);
- }
- int num4 = binaryReader.ReadInt32();
- for (int k = 0; k < num4; k++)
- {
- this.SetSystemVers(binaryReader.ReadString(), binaryReader.ReadString());
- }
- }
- }
- catch (Exception ex)
- {
- Debug.LogError("system.datの読み込みに失敗しました\n" + ex.Message);
- }
- return true;
- }
- return true;
- }
- private void LoadLauncherCfg()
- {
- string path = Path.GetFullPath(".\\") + "update.cfg";
- if (File.Exists(path))
- {
- using (StreamReader streamReader = new StreamReader(path))
- {
- while (!streamReader.EndOfStream)
- {
- string text = streamReader.ReadLine();
- Console.WriteLine("{0}", text);
- string[] array = text.Split(new char[]
- {
- '='
- });
- if (array != null && array.Length == 2)
- {
- string a = array[0];
- string text2 = array[1];
- if (a == "m_bUseNet")
- {
- if (text2 == "1")
- {
- this.NetUse = true;
- }
- else
- {
- this.NetUse = false;
- }
- }
- else if (a == "m_strCM3D2Path")
- {
- text2 = text2.Replace("/", "\\");
- if (!string.IsNullOrEmpty(text2))
- {
- if (!File.Exists(text2 + "\\CM3D2.exe"))
- {
- NDebug.Assert("2.0互換パス " + text2 + " には CM3D2.exe が無く、互換モードは無効です。", true);
- text2 = string.Empty;
- }
- else if (!File.Exists(text2 + "\\GameData\\csv.arc"))
- {
- NDebug.Assert("2.0互換パス " + text2 + " には csv.arc が無く、互換モードは無効です。", true);
- text2 = string.Empty;
- }
- else if (!File.Exists(text2 + "\\GameData\\script.arc"))
- {
- NDebug.Assert("2.0互換パス " + text2 + " には script.arc が無く、互換モードは無効です。", true);
- text2 = string.Empty;
- }
- }
- this.CM3D2Path = text2;
- }
- }
- }
- }
- }
- }
- private Dictionary<int, Dictionary<string, int>> m_dicEditColorPresetData = new Dictionary<int, Dictionary<string, int>>();
- [XmlIgnore]
- public Dictionary<string, int> m_GenericTmpFlag = new Dictionary<string, int>();
- public Dictionary<string, string> m_SystemVers = new Dictionary<string, string>();
- private int[] m_nAntiAlias = new int[]
- {
- 0,
- 2,
- 4,
- 8
- };
- private Size<int> m_siScreenSize = new Size<int>
- {
- width = 1280,
- height = 720
- };
- private CMSystem.SSSuperSizeType m_eScreenShotSuperSize;
- private int m_nManAlpha = 50;
- private int m_nBloomValue = 100;
- private int m_nMsgWndAlpha;
- private int m_nMsgTextSpeed = 80;
- private int m_nMsgAutoSpeed = 50;
- private int m_nFadeSpeed = 100;
- private SubtitleDisplayManager.DisplayType m_SubtitleType;
- private int m_nDesktopCaptureMonitorNo = 1;
- private bool m_bEditItemGroup = true;
- private bool m_bEditTouchJump;
- private float m_fVRCameraHeightStand = 1.6f;
- private float m_fVRCameraHeightSit = 0.8f;
- private float m_fVRCameraMoveSpeedKey = 0.5f;
- private float m_fVRCameraRotSpeedKey = 0.5f;
- private bool m_bVRCameraPlaneMove;
- private float m_fVRCameraRotSpeedMouse = 0.5f;
- private bool m_bVRManShow = true;
- private float m_fVRCameraFov = 60f;
- private bool m_bVRCamRotDownUp;
- private int m_nOvrConfVer = 1470;
- private float m_fOvrHeadScale = 1f;
- private float m_fOvrCursorStabilization = 0.05f;
- private float m_fOvrCursorBoostSpeed = 0.2f;
- private int m_nOvrPointerMode;
- private int m_nOvrMoveMode;
- private float m_fOvrCursorPadSpeed = 130f;
- private float m_fOvrViveCursorLaserHitScale = 9f;
- private float m_fOvrViveCursorLaserEasing = 0.3f;
- private int m_nOvrHandCameraWidth = 720;
- private int m_nOvrHandCameraHeight = 1280;
- private Dictionary<string, CMSystem.TransDD> m_dicVRDDBG = new Dictionary<string, CMSystem.TransDD>();
- private bool m_bOvrScreenMirror = true;
- private CMSystem.OVR_CAM_HEIGHT_TYPE m_eOvrCameraHeightType = CMSystem.OVR_CAM_HEIGHT_TYPE.VR;
- private bool m_bOvrMouseRot = true;
- private float m_fOvrUITabletSize = 1f;
- private bool m_bOvrUseTouch = true;
- private bool m_bUseNewControllerType = true;
- private bool m_bOvrUseSnapRotate = true;
- private int m_nOvrUseSnapRotateRate = 30;
- private readonly List<Size<int>> m_listScreenDefSize = new List<Size<int>>
- {
- new Size<int>
- {
- width = 1024,
- height = 576
- },
- new Size<int>
- {
- width = 1280,
- height = 720
- },
- new Size<int>
- {
- width = 1366,
- height = 768
- },
- new Size<int>
- {
- width = 1920,
- height = 1080
- }
- };
- private CMSystem.SerializeConfig m_SConfig = new CMSystem.SerializeConfig();
- public enum SSSuperSizeType
- {
- X1,
- X2,
- X4,
- MAX
- }
- public enum AntiAliasType
- {
- None,
- X2,
- X4,
- X8,
- MAX
- }
- public enum ShadowQualityType
- {
- None,
- Low,
- Medium,
- High
- }
- public enum TextureQualityType
- {
- Low,
- Medium,
- High
- }
- public class TransDD
- {
- public TransDD()
- {
- }
- public TransDD(string strSaveString, int f_nOvrConfVer)
- {
- this.FromSaveString(strSaveString, f_nOvrConfVer);
- }
- public string ToSaveString()
- {
- string text = string.Concat(new string[]
- {
- this.m_vPos.x.ToString(),
- ":",
- this.m_vPos.y.ToString(),
- ":",
- this.m_vPos.z.ToString()
- });
- string text2 = text;
- text = string.Concat(new string[]
- {
- text2,
- ":",
- this.m_qRot.x.ToString(),
- ":",
- this.m_qRot.y.ToString(),
- ":",
- this.m_qRot.z.ToString(),
- ":",
- this.m_qRot.w.ToString()
- });
- text2 = text;
- return string.Concat(new string[]
- {
- text2,
- ":",
- this.m_vScale.x.ToString(),
- ":",
- this.m_vScale.y.ToString(),
- ":",
- this.m_vScale.z.ToString(),
- ":",
- this.m_bShow.ToString()
- });
- }
- public void FromSaveString(string f_strString, int f_nOvrConfVer)
- {
- string[] array = f_strString.Split(new char[]
- {
- ':'
- });
- try
- {
- this.m_vPos.x = float.Parse(array[0]);
- this.m_vPos.y = float.Parse(array[1]);
- this.m_vPos.z = float.Parse(array[2]);
- this.m_qRot.x = float.Parse(array[3]);
- this.m_qRot.y = float.Parse(array[4]);
- this.m_qRot.z = float.Parse(array[5]);
- this.m_qRot.w = float.Parse(array[6]);
- this.m_vScale.x = float.Parse(array[7]);
- this.m_vScale.y = float.Parse(array[8]);
- this.m_vScale.z = float.Parse(array[9]);
- if (f_nOvrConfVer >= 1470)
- {
- this.m_bShow = bool.Parse(array[10]);
- }
- }
- catch (Exception ex)
- {
- Debug.LogError(ex.Message);
- }
- }
- public Vector3 m_vPos;
- public Quaternion m_qRot;
- public Vector3 m_vScale;
- public bool m_bShow;
- }
- public enum OVR_CAM_HEIGHT_TYPE
- {
- REAL,
- VR
- }
- [Serializable]
- public class SerializeConfig : ISerializationCallbackReceiver
- {
- public int Version
- {
- get
- {
- return this.m_nVersion;
- }
- set
- {
- this.m_nVersion = value;
- }
- }
- public string DShowFilter
- {
- get
- {
- return this.m_strDShowFilter;
- }
- }
- public CMSystem.SerializeConfig.OVR_MOVE_TYPE OvrMoveType
- {
- get
- {
- return this.m_eOvrMoveType;
- }
- set
- {
- this.m_eOvrMoveType = value;
- }
- }
- public float OvrMoveDirSpeed
- {
- get
- {
- return this.m_fOvrMoveDirSpeed;
- }
- }
- public bool OvrViveSmoothRotatePadAreaUse
- {
- get
- {
- return this.m_bOvrViveSmoothRotateAreaUse;
- }
- set
- {
- this.m_bOvrViveSmoothRotateAreaUse = value;
- }
- }
- public float OvrViveSmoothRotatePadAriaRate
- {
- get
- {
- return this.m_fOvrViveSmoothUpDownPadAriaRate = this.m_fOvrViveSmoothRotatePadAriaRate;
- }
- set
- {
- this.m_fOvrViveSmoothUpDownPadAriaRate = (this.m_fOvrViveSmoothRotatePadAriaRate = Mathf.Clamp(value, 10f, 80f));
- }
- }
- public bool OvrViveSmoothupDownPadAreaUse
- {
- get
- {
- return this.m_bOvrViveSmoothupDownPadAreaUse;
- }
- set
- {
- this.m_bOvrViveSmoothupDownPadAreaUse = value;
- }
- }
- public float OvrViveSmoothUpDownPadAriaRate
- {
- get
- {
- return this.OvrViveSmoothRotatePadAriaRate;
- }
- set
- {
- this.OvrViveSmoothRotatePadAriaRate = Mathf.Clamp(value, 10f, 80f);
- }
- }
- public bool OvrIkAllSceneEnable
- {
- get
- {
- return this.m_bOvrIkAllSceneEnable;
- }
- set
- {
- this.m_bOvrIkAllSceneEnable = value;
- }
- }
- public bool OvrRiftGripStickRotate
- {
- get
- {
- return this.m_bOvrRiftGripStickRotate;
- }
- set
- {
- this.m_bOvrRiftGripStickRotate = value;
- }
- }
- public bool OvrRiftTriggerStickUpDown
- {
- get
- {
- return this.m_bOvrRiftTriggerStickUpDown;
- }
- set
- {
- this.m_bOvrRiftTriggerStickUpDown = value;
- }
- }
- public float OvrIkSelfCamFovMin
- {
- get
- {
- return this.m_bOvrIkSelfCamFovMin;
- }
- set
- {
- this.m_bOvrIkSelfCamFovMin = value;
- }
- }
- public float OvrIkSelfCamFovMax
- {
- get
- {
- return this.m_bOvrIkSelfCamFovMax;
- }
- set
- {
- this.m_bOvrIkSelfCamFovMax = value;
- }
- }
- public bool OvrDDTouchToClick
- {
- get
- {
- return this.m_bOvrDesktopScreenTouchToClick;
- }
- set
- {
- this.m_bOvrDesktopScreenTouchToClick = value;
- }
- }
- public bool OvrDDtoBG
- {
- get
- {
- return this.m_bOvrDesktopScreenPosSaveToBG;
- }
- set
- {
- this.m_bOvrDesktopScreenPosSaveToBG = value;
- }
- }
- public bool OvrTabletFrameHideWhenMsgWndVisible
- {
- get
- {
- return this.m_bOvrTabletFrameHideWhenMsgWndVisible;
- }
- set
- {
- this.m_bOvrTabletFrameHideWhenMsgWndVisible = value;
- }
- }
- public bool OvrHandHitToHair
- {
- get
- {
- return this.m_bOvrHandHitToHair;
- }
- set
- {
- this.m_bOvrHandHitToHair = value;
- }
- }
- public CMSystem.SerializeConfig.OVR_HAND_TO_SKIRT OvrHandHitToSkirt
- {
- get
- {
- return this.m_eOvrHandHitToSkirt;
- }
- set
- {
- this.m_eOvrHandHitToSkirt = value;
- }
- }
- public CMSystem.SerializeConfig.OVR_HAND_TO_SKIRT OvrHandHitToSkirtVAS
- {
- get
- {
- return this.m_eOvrHandHitToSkirtVAS;
- }
- set
- {
- this.m_eOvrHandHitToSkirtVAS = value;
- }
- }
- public void OnBeforeSerialize()
- {
- this.m_nVersion = 1230;
- }
- public void OnAfterDeserialize()
- {
- }
- [SerializeField]
- private int m_nVersion = 1230;
- [SerializeField]
- private string m_strDShowFilter = "Microsoft DTV-DVD Video Decoder";
- [SerializeField]
- private CMSystem.SerializeConfig.OVR_MOVE_TYPE m_eOvrMoveType;
- [SerializeField]
- private float m_fOvrMoveDirSpeed = 5f;
- [SerializeField]
- private bool m_bOvrViveSmoothRotateAreaUse = true;
- [SerializeField]
- private float m_fOvrViveSmoothRotatePadAriaRate = 30f;
- [SerializeField]
- private bool m_bOvrViveSmoothupDownPadAreaUse = true;
- [SerializeField]
- private float m_fOvrViveSmoothUpDownPadAriaRate = 30f;
- [SerializeField]
- private bool m_bOvrIkAllSceneEnable;
- [SerializeField]
- private bool m_bOvrRiftGripStickRotate = true;
- [SerializeField]
- private bool m_bOvrRiftTriggerStickUpDown = true;
- [SerializeField]
- private float m_bOvrIkSelfCamFovMin = 20f;
- [SerializeField]
- private float m_bOvrIkSelfCamFovMax = 80f;
- [SerializeField]
- private bool m_bOvrDesktopScreenTouchToClick = true;
- [SerializeField]
- private bool m_bOvrDesktopScreenPosSaveToBG;
- [SerializeField]
- private bool m_bOvrTabletFrameHideWhenMsgWndVisible = true;
- [SerializeField]
- private bool m_bOvrHandHitToHair = true;
- [SerializeField]
- private CMSystem.SerializeConfig.OVR_HAND_TO_SKIRT m_eOvrHandHitToSkirt = CMSystem.SerializeConfig.OVR_HAND_TO_SKIRT.ON;
- [SerializeField]
- private CMSystem.SerializeConfig.OVR_HAND_TO_SKIRT m_eOvrHandHitToSkirtVAS = CMSystem.SerializeConfig.OVR_HAND_TO_SKIRT.GRAB;
- public enum OVR_MOVE_TYPE
- {
- WARP_DRAW_STEPROT,
- DIRECTION
- }
- public enum OVR_HAND_TO_SKIRT
- {
- OFF,
- GRAB,
- ON
- }
- }
- }
|