123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923 |
- 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.YotogiSubtitleVisible = true;
- 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 Product.Language SystemLanguage
- {
- get
- {
- return Product.systemLanguage;
- }
- set
- {
- Product.systemLanguage = value;
- }
- }
- public SubtitleDisplayManager.DisplayType SubtitleType
- {
- get
- {
- return this.m_SubtitleType;
- }
- set
- {
- this.m_SubtitleType = ((!Product.supportMultiLanguage) ? SubtitleDisplayManager.DisplayType.Subtitle : value);
- }
- }
- public bool YotogiSubtitleVisible
- {
- get
- {
- return this.m_YotogiSubtitleVisible;
- }
- set
- {
- this.m_YotogiSubtitleVisible = (!Product.supportMultiLanguage || value);
- }
- }
- 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";
- Product.Type type = Product.type;
- if (type != Product.Type.JpPublic)
- {
- if (type != Product.Type.EnAdult)
- {
- if (type == Product.Type.EnPublic)
- {
- text = "https://com3d2-shop-en-inm.s-court.me";
- }
- }
- else
- {
- text = "https://com3d2-shop-en.s-court.me";
- }
- }
- else
- {
- text = "https://com3d2-shop-inm.s-court.me";
- }
- if (Product.type == Product.Type.JpAdult)
- {
- 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", 1310),
- 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("SystemLanguage", this.SystemLanguage.ToString()),
- new XElement("SubtitleType", this.SubtitleType.ToString()),
- new XElement("YotogiSubtitleVisible", this.YotogiSubtitleVisible.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 (!Product.supportMultiLanguage)
- {
- XElement xelement2 = xelement.Element("Message");
- if (xelement2 != null)
- {
- xelement2 = xelement2.Element("SystemLanguage");
- if (xelement2 != null && xelement2 != null)
- {
- xelement2.Remove();
- }
- }
- }
- 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");
- int version = 0;
- try
- {
- version = int.Parse(xelement.Attribute("Version").Value);
- }
- catch (Exception)
- {
- }
- 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.SystemLanguage = (Product.Language)Enum.Parse(typeof(Product.Language), this.getElemetn(xelm3, "SystemLanguage", Product.defaultLanguage.ToString()).Value);
- }
- catch (Exception)
- {
- this.SystemLanguage = Product.defaultLanguage;
- }
- 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.Subtitle;
- }
- this.YotogiSubtitleVisible = bool.Parse(this.getElemetn(xelm3, "YotogiSubtitleVisible", "true").Value);
- 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, version);
- 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(1310);
- 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 bool m_YotogiSubtitleVisible;
- 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 bool EditAutoCam
- {
- get
- {
- return this.m_bEditAutoCam;
- }
- set
- {
- this.m_bEditAutoCam = value;
- }
- }
- public bool EditEyeToCam
- {
- get
- {
- return this.m_bEditEyeToCam;
- }
- set
- {
- this.m_bEditEyeToCam = value;
- }
- }
- public void OnBeforeSerialize()
- {
- this.m_nVersion = 1310;
- }
- public void OnAfterDeserialize()
- {
- }
- [SerializeField]
- private int m_nVersion = 1310;
- [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;
- [SerializeField]
- private bool m_bEditAutoCam = true;
- [SerializeField]
- private bool m_bEditEyeToCam = true;
- public enum OVR_MOVE_TYPE
- {
- WARP_DRAW_STEPROT,
- DIRECTION
- }
- public enum OVR_HAND_TO_SKIRT
- {
- OFF,
- GRAB,
- ON
- }
- }
- }
|