12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105 |
- 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 CRCEdit;
- 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.VSyncMode = CMSystem.VSyncType.Off;
- 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;
- string empty = string.Empty;
- this.CREditSystemPath = empty;
- this.CM3D2Path = 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; }
- [Obsolete]
- public bool VSync { get; set; }
- public CMSystem.VSyncType VSyncMode { 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 string CREditSystemPath { 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.VSyncMode == CMSystem.VSyncType.Off)
- {
- QualitySettings.vSyncCount = 0;
- }
- else if (this.VSyncMode == CMSystem.VSyncType.On)
- {
- QualitySettings.vSyncCount = 1;
- }
- else if (this.VSyncMode == CMSystem.VSyncType.Half)
- {
- QualitySettings.vSyncCount = 2;
- }
- 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", 1570),
- 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("VSyncMode", this.VSyncMode),
- 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 = GameMain.Instance.SerializeStorageManager.StoreDirectoryPath;
- if (!GameMain.Instance.VRMode || GameMain.Instance.VRDummyMode)
- {
- text = Path.Combine(text, "config.xml");
- }
- else
- {
- text = Path.Combine(text, "config_ovr.xml");
- }
- xdocument.Save(text);
- return true;
- }
- public bool LoadIni()
- {
- string text = GameMain.Instance.SerializeStorageManager.StoreDirectoryPath;
- if (!GameMain.Instance.VRMode || GameMain.Instance.VRDummyMode)
- {
- text = Path.Combine(text, "config.xml");
- }
- else
- {
- text = Path.Combine(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.VSyncMode = (CMSystem.VSyncType)Enum.Parse(typeof(CMSystem.VSyncType), this.getElemetn(xelm2, "VSyncMode", CMSystem.VSyncType.Off.ToString()).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();
- NInput.InputUseLegacyAxisMode = GameMain.Instance.CMSystem.SConfig.InputUseLegacyAxisMode;
- 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(1570);
- 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.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "system.dat"), memoryStream.ToArray());
- memoryStream.Dispose();
- memoryStream = null;
- }
- public bool LoadSystem()
- {
- string text = Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "system.dat");
- if (File.Exists(text))
- {
- try
- {
- this.m_dicEditColorPresetData.Clear();
- this.m_SystemVers.Clear();
- using (FileStream fileStream = new FileStream(text, 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(text + "の読み込みに失敗しました\n" + ex.Message);
- }
- return true;
- }
- return true;
- }
- private void LoadLauncherCfg()
- {
- string path = UTY.gameProjectPath + "\\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;
- }
- else if (string.Equals(a, "m_strCREditSystemPath", StringComparison.OrdinalIgnoreCase))
- {
- text2 = text2.Replace("/", "\\");
- if (!string.IsNullOrEmpty(text2))
- {
- string path2 = Path.Combine(text2, "CR Launcher.exe");
- if (!File.Exists(path2))
- {
- NUty.WinMessageBox(NUty.GetWindowHandle(), "CR Edit System連携エラー\n" + text2 + " には CR Launcher.exeが存在しません", "警告", 48);
- text2 = string.Empty;
- }
- this.CREditSystemPath = text2;
- }
- }
- }
- if (string.IsNullOrEmpty(this.CREditSystemPath))
- {
- string text3 = Path.Combine(UTY.gameProjectPath, "KISS_Edit").Replace("/", "\\");
- if (File.Exists(Path.Combine(text3, "CR Launcher.exe")))
- {
- this.CREditSystemPath = text3;
- }
- }
- }
- }
- }
- }
- public ConfigBridgeData ToConfigBridgeData()
- {
- return new ConfigBridgeData
- {
- system =
- {
- windowSizeX = this.m_siScreenSize.width,
- windowSizeY = this.m_siScreenSize.height,
- isFullScreenMode = this.FullScreen,
- targetFrameRate = this.TargetFPS,
- screenShotSuperSize = (int)this.m_eScreenShotSuperSize,
- antiAlias = (int)this.Antialias,
- shadowQuality = (int)this.ShadowQuality,
- textureQualit = (int)this.TextureQuality,
- videoPlayerPreferredFilter = this.m_SConfig.DShowFilter,
- inputUseLegacyAxisMode = this.m_SConfig.InputUseLegacyAxisMode
- },
- sound =
- {
- master =
- {
- voluem = (float)GameMain.Instance.SoundMgr.GetVolumeAll() / 100f
- },
- system =
- {
- voluem = (float)GameMain.Instance.SoundMgr.GetVolume(AudioSourceMgr.Type.System) / 100f
- },
- bgm =
- {
- voluem = (float)GameMain.Instance.SoundMgr.GetVolume(AudioSourceMgr.Type.Bgm) / 100f
- },
- dance =
- {
- voluem = (float)GameMain.Instance.SoundMgr.GetVolumeDance() / 100f
- },
- se =
- {
- voluem = (float)GameMain.Instance.SoundMgr.GetVolume(AudioSourceMgr.Type.Se) / 100f
- },
- voice =
- {
- voluem = (float)GameMain.Instance.SoundMgr.GetVolume(AudioSourceMgr.Type.Voice) / 100f,
- isPlay3DPositioning = GameMain.Instance.SoundMgr.GetThreeD(AudioSourceMgr.Type.VoiceHeroine)
- },
- voiceHeroine =
- {
- voluem = (float)GameMain.Instance.SoundMgr.GetVolume(AudioSourceMgr.Type.VoiceHeroine) / 100f
- },
- isEjaculationSeEnabled = this.EjaculationSeEnabled
- }
- };
- }
- 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 enum VSyncType
- {
- Off,
- On,
- Half
- }
- 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 bool PrivateModeEventListVisible
- {
- get
- {
- return this.m_bPrivateModeEventListVisible;
- }
- set
- {
- this.m_bPrivateModeEventListVisible = value;
- }
- }
- public bool PrivateModeSettingEventListVisible
- {
- get
- {
- return this.m_bPrivateModeSettingEventListVisible;
- }
- set
- {
- this.m_bPrivateModeSettingEventListVisible = value;
- }
- }
- public bool PrivateModeSettingDayTalkEnabled
- {
- get
- {
- return this.m_bPrivateModeSettingDayTalkEnabled;
- }
- set
- {
- this.m_bPrivateModeSettingDayTalkEnabled = value;
- }
- }
- public bool PrivateModeSettingNightTalkEnabled
- {
- get
- {
- return this.m_bPrivateModeSettingNightTalkEnabled;
- }
- set
- {
- this.m_bPrivateModeSettingNightTalkEnabled = value;
- }
- }
- public bool PrivateModeSettingHEventEnabled
- {
- get
- {
- return this.m_bPrivateModeSettingHEventEnabled;
- }
- set
- {
- this.m_bPrivateModeSettingHEventEnabled = value;
- }
- }
- public bool InputUseLegacyAxisMode
- {
- get
- {
- return this.inputUseLegacyAxisMode;
- }
- set
- {
- this.inputUseLegacyAxisMode = value;
- }
- }
- public void OnBeforeSerialize()
- {
- this.m_nVersion = 1570;
- }
- public void OnAfterDeserialize()
- {
- }
- [SerializeField]
- private int m_nVersion = 1570;
- [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;
- [SerializeField]
- private bool m_bPrivateModeEventListVisible = true;
- [SerializeField]
- private bool m_bPrivateModeSettingEventListVisible;
- [SerializeField]
- private bool m_bPrivateModeSettingDayTalkEnabled = true;
- [SerializeField]
- private bool m_bPrivateModeSettingNightTalkEnabled = true;
- [SerializeField]
- private bool m_bPrivateModeSettingHEventEnabled = true;
- [SerializeField]
- private bool inputUseLegacyAxisMode;
- public enum OVR_MOVE_TYPE
- {
- WARP_DRAW_STEPROT,
- DIRECTION
- }
- public enum OVR_HAND_TO_SKIRT
- {
- OFF,
- GRAB,
- ON
- }
- }
- }
|