CMSystem.cs 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Windows.Forms;
  6. using System.Xml.Linq;
  7. using System.Xml.Serialization;
  8. using CRCEdit;
  9. using UnityEngine;
  10. public class CMSystem
  11. {
  12. public CMSystem()
  13. {
  14. this.SysButtonShowAlways = true;
  15. this.FullScreen = false;
  16. this.SetScreenSize(new Size<int>
  17. {
  18. width = 1280,
  19. height = 720
  20. });
  21. this.Antialias = CMSystem.AntiAliasType.X2;
  22. this.ShadowQuality = CMSystem.ShadowQualityType.Medium;
  23. this.TextureQuality = CMSystem.TextureQualityType.High;
  24. this.TargetFPS = 60;
  25. this.VSyncMode = CMSystem.VSyncType.Off;
  26. this.ViewFps = false;
  27. this.Bloom = true;
  28. this.BloomValue = 50;
  29. this.MsgAlreadySkip = true;
  30. this.MsgVoiceNoStop = true;
  31. this.SubtitleType = SubtitleDisplayManager.DisplayType.OriginalAndSubtitle;
  32. this.YotogiSubtitleVisible = true;
  33. this.EjaculationSeEnabled = true;
  34. this.NetUse = false;
  35. string empty = string.Empty;
  36. this.CREditSystemPath = empty;
  37. this.CM3D2Path = empty;
  38. this.LoadSystem();
  39. this.LoadLauncherCfg();
  40. }
  41. public bool SysButtonShowAlways { get; set; }
  42. public bool FullScreen { get; set; }
  43. public void SetSystemVers(string f_strKey, string f_strVal)
  44. {
  45. if (this.m_SystemVers.ContainsKey(f_strKey))
  46. {
  47. this.m_SystemVers[f_strKey] = f_strVal;
  48. }
  49. else
  50. {
  51. this.m_SystemVers.Add(f_strKey, f_strVal);
  52. }
  53. }
  54. public string GetSystemVers(string f_strKey)
  55. {
  56. string result = null;
  57. this.m_SystemVers.TryGetValue(f_strKey, out result);
  58. return result;
  59. }
  60. public List<Size<int>> GetScreenSizeList()
  61. {
  62. List<Size<int>> list = new List<Size<int>>();
  63. list.AddRange(this.m_listScreenDefSize);
  64. Size<int> siDesktop = default(Size<int>);
  65. siDesktop.width = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width;
  66. siDesktop.height = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height;
  67. list.RemoveAll((Size<int> s) => s.height > siDesktop.width || s.height > siDesktop.height);
  68. list.Add(siDesktop);
  69. list.Add(new Size<int>(UnityEngine.Screen.width, UnityEngine.Screen.height));
  70. return list;
  71. }
  72. public void SetScreenSize(Size<int> f_siSize)
  73. {
  74. this.m_siScreenSize = f_siSize;
  75. }
  76. public Size<int> GetScreenSizeNow()
  77. {
  78. return new Size<int>
  79. {
  80. width = UnityEngine.Screen.width,
  81. height = UnityEngine.Screen.height
  82. };
  83. }
  84. public CMSystem.AntiAliasType Antialias { get; set; }
  85. public CMSystem.ShadowQualityType ShadowQuality { get; set; }
  86. public CMSystem.TextureQualityType TextureQuality { get; set; }
  87. [Obsolete]
  88. public bool VSync { get; set; }
  89. public CMSystem.VSyncType VSyncMode { get; set; }
  90. public int TargetFPS { get; set; }
  91. public bool ViewFps { get; set; }
  92. public bool Bloom { get; set; }
  93. public int BloomValue
  94. {
  95. get
  96. {
  97. return this.m_nBloomValue;
  98. }
  99. set
  100. {
  101. this.m_nBloomValue = Math.Max(0, Math.Min(100, value));
  102. }
  103. }
  104. public CMSystem.SSSuperSizeType ScreenShotSuperSize
  105. {
  106. get
  107. {
  108. return this.m_eScreenShotSuperSize;
  109. }
  110. set
  111. {
  112. this.m_eScreenShotSuperSize = value;
  113. }
  114. }
  115. public int ManAlpha
  116. {
  117. get
  118. {
  119. return this.m_nManAlpha;
  120. }
  121. set
  122. {
  123. this.m_nManAlpha = Math.Max(Math.Min(value, 100), 0);
  124. }
  125. }
  126. public int MsgWndAlpha
  127. {
  128. get
  129. {
  130. return this.m_nMsgWndAlpha;
  131. }
  132. set
  133. {
  134. this.m_nMsgWndAlpha = Math.Max(Math.Min(value, 100), 0);
  135. }
  136. }
  137. public int MsgTextSpeed
  138. {
  139. get
  140. {
  141. return this.m_nMsgTextSpeed;
  142. }
  143. set
  144. {
  145. this.m_nMsgTextSpeed = Math.Max(Math.Min(value, 100), 0);
  146. }
  147. }
  148. public int MsgAutoSpeed
  149. {
  150. get
  151. {
  152. return this.m_nMsgAutoSpeed;
  153. }
  154. set
  155. {
  156. this.m_nMsgAutoSpeed = Math.Max(Math.Min(value, 100), 0);
  157. }
  158. }
  159. public bool MsgAlreadySkip { get; set; }
  160. public bool MsgVoiceNoStop { get; set; }
  161. public Product.Language SystemLanguage
  162. {
  163. get
  164. {
  165. return Product.systemLanguage;
  166. }
  167. set
  168. {
  169. Product.systemLanguage = value;
  170. }
  171. }
  172. public SubtitleDisplayManager.DisplayType SubtitleType
  173. {
  174. get
  175. {
  176. return this.m_SubtitleType;
  177. }
  178. set
  179. {
  180. this.m_SubtitleType = ((!Product.supportMultiLanguage) ? SubtitleDisplayManager.DisplayType.Subtitle : value);
  181. }
  182. }
  183. public bool YotogiSubtitleVisible
  184. {
  185. get
  186. {
  187. return this.m_YotogiSubtitleVisible;
  188. }
  189. set
  190. {
  191. this.m_YotogiSubtitleVisible = (!Product.supportMultiLanguage || value);
  192. }
  193. }
  194. public bool EjaculationSeEnabled { get; set; }
  195. public int FadeSpeed
  196. {
  197. get
  198. {
  199. return this.m_nFadeSpeed;
  200. }
  201. set
  202. {
  203. this.m_nFadeSpeed = Math.Max(Math.Min(value, 100), 0);
  204. }
  205. }
  206. public float FadeSpeedRate
  207. {
  208. get
  209. {
  210. return ((float)this.m_nFadeSpeed / 100f > 0.05f) ? ((float)this.m_nFadeSpeed / 100f) : 0.05f;
  211. }
  212. }
  213. public bool NetUse { get; set; }
  214. public string CM3D2Path { get; private set; }
  215. public string CREditSystemPath { get; private set; }
  216. public int DesktopCaptureMonitorNo
  217. {
  218. get
  219. {
  220. return this.m_nDesktopCaptureMonitorNo;
  221. }
  222. set
  223. {
  224. this.m_nDesktopCaptureMonitorNo = value;
  225. }
  226. }
  227. public bool EditItemGroup
  228. {
  229. get
  230. {
  231. return this.m_bEditItemGroup;
  232. }
  233. set
  234. {
  235. this.m_bEditItemGroup = value;
  236. }
  237. }
  238. public bool EditTouchJump
  239. {
  240. get
  241. {
  242. return this.m_bEditTouchJump;
  243. }
  244. set
  245. {
  246. this.m_bEditTouchJump = value;
  247. }
  248. }
  249. public float VRCameraHeightStand
  250. {
  251. get
  252. {
  253. return this.m_fVRCameraHeightStand;
  254. }
  255. set
  256. {
  257. this.m_fVRCameraHeightStand = Mathf.Clamp(value, 1.5f, 1.8f);
  258. }
  259. }
  260. public float VRCameraHeightStandOffs
  261. {
  262. get
  263. {
  264. return this.m_fVRCameraHeightStand - 0.1f;
  265. }
  266. }
  267. public float VRCameraHeightSit
  268. {
  269. get
  270. {
  271. return this.m_fVRCameraHeightSit;
  272. }
  273. set
  274. {
  275. this.m_fVRCameraHeightSit = Mathf.Clamp(value, 0.7f, 1f);
  276. }
  277. }
  278. public float VRCameraHeightSitOffs
  279. {
  280. get
  281. {
  282. return this.m_fVRCameraHeightSit - 0.1f;
  283. }
  284. }
  285. public float VRCameraMoveSpeedKey
  286. {
  287. get
  288. {
  289. return this.m_fVRCameraMoveSpeedKey;
  290. }
  291. set
  292. {
  293. this.m_fVRCameraMoveSpeedKey = Mathf.Clamp(value, 0f, 1f);
  294. }
  295. }
  296. public float VRCameraRotSpeedKey
  297. {
  298. get
  299. {
  300. return this.m_fVRCameraRotSpeedKey;
  301. }
  302. set
  303. {
  304. this.m_fVRCameraRotSpeedKey = Mathf.Clamp(value, 0f, 1f);
  305. }
  306. }
  307. public bool VRCameraPlaneMove
  308. {
  309. get
  310. {
  311. return this.m_bVRCameraPlaneMove;
  312. }
  313. set
  314. {
  315. this.m_bVRCameraPlaneMove = value;
  316. }
  317. }
  318. public float VRCameraRotSpeedMouse
  319. {
  320. get
  321. {
  322. return this.m_fVRCameraRotSpeedMouse;
  323. }
  324. set
  325. {
  326. this.m_fVRCameraRotSpeedMouse = Mathf.Clamp(value, 0f, 1f);
  327. }
  328. }
  329. public bool VRManShow
  330. {
  331. get
  332. {
  333. return this.m_bVRManShow;
  334. }
  335. set
  336. {
  337. this.m_bVRManShow = value;
  338. }
  339. }
  340. public float VRCameraFov
  341. {
  342. get
  343. {
  344. return this.m_fVRCameraFov;
  345. }
  346. set
  347. {
  348. this.m_fVRCameraFov = Mathf.Clamp(value, 30f, 60f);
  349. }
  350. }
  351. public bool VRCamRotDownUp
  352. {
  353. get
  354. {
  355. return this.m_bVRCamRotDownUp;
  356. }
  357. set
  358. {
  359. this.m_bVRCamRotDownUp = value;
  360. }
  361. }
  362. public float OvrHeadScale
  363. {
  364. get
  365. {
  366. return this.m_fOvrHeadScale;
  367. }
  368. set
  369. {
  370. this.m_fOvrHeadScale = Math.Max(Math.Min(value, 3f), 0.1f);
  371. }
  372. }
  373. public float OvrCursorStabilization
  374. {
  375. get
  376. {
  377. return this.m_fOvrCursorStabilization;
  378. }
  379. set
  380. {
  381. this.m_fOvrCursorStabilization = value;
  382. }
  383. }
  384. public float OvrCursorBoostSpeed
  385. {
  386. get
  387. {
  388. return this.m_fOvrCursorBoostSpeed;
  389. }
  390. set
  391. {
  392. this.m_fOvrCursorBoostSpeed = value;
  393. }
  394. }
  395. public int OvrPointerMode
  396. {
  397. get
  398. {
  399. return this.m_nOvrPointerMode;
  400. }
  401. set
  402. {
  403. this.m_nOvrPointerMode = value;
  404. }
  405. }
  406. public int OvrMoveMode
  407. {
  408. get
  409. {
  410. return this.m_nOvrMoveMode;
  411. }
  412. set
  413. {
  414. this.m_nOvrMoveMode = value;
  415. }
  416. }
  417. public float OvrCursorPadSpeed
  418. {
  419. get
  420. {
  421. return this.m_fOvrCursorPadSpeed;
  422. }
  423. set
  424. {
  425. this.m_fOvrCursorPadSpeed = value;
  426. }
  427. }
  428. public float OvrViveCursorLaserHitScale
  429. {
  430. get
  431. {
  432. return this.m_fOvrViveCursorLaserHitScale;
  433. }
  434. set
  435. {
  436. this.m_fOvrViveCursorLaserHitScale = value;
  437. }
  438. }
  439. public float OvrViveCursorLaserEasing
  440. {
  441. get
  442. {
  443. return this.m_fOvrViveCursorLaserEasing;
  444. }
  445. set
  446. {
  447. this.m_fOvrViveCursorLaserEasing = value;
  448. }
  449. }
  450. public int OvrHandCameraWidth
  451. {
  452. get
  453. {
  454. return this.m_nOvrHandCameraWidth;
  455. }
  456. set
  457. {
  458. this.m_nOvrHandCameraWidth = value;
  459. }
  460. }
  461. public int OvrHandCameraHeight
  462. {
  463. get
  464. {
  465. return this.m_nOvrHandCameraHeight;
  466. }
  467. set
  468. {
  469. this.m_nOvrHandCameraHeight = value;
  470. }
  471. }
  472. public Dictionary<string, CMSystem.TransDD> OvrDDBG
  473. {
  474. get
  475. {
  476. return this.m_dicVRDDBG;
  477. }
  478. set
  479. {
  480. this.m_dicVRDDBG = value;
  481. }
  482. }
  483. public bool OvrScreenMirror
  484. {
  485. get
  486. {
  487. return this.m_bOvrScreenMirror;
  488. }
  489. set
  490. {
  491. this.m_bOvrScreenMirror = value;
  492. }
  493. }
  494. public CMSystem.OVR_CAM_HEIGHT_TYPE OvrCameraHeightType
  495. {
  496. get
  497. {
  498. return this.m_eOvrCameraHeightType;
  499. }
  500. set
  501. {
  502. this.m_eOvrCameraHeightType = value;
  503. }
  504. }
  505. public bool OvrMouseRot
  506. {
  507. get
  508. {
  509. return this.m_bOvrMouseRot;
  510. }
  511. set
  512. {
  513. this.m_bOvrMouseRot = value;
  514. }
  515. }
  516. public float OvrUITabletSize
  517. {
  518. get
  519. {
  520. return this.m_fOvrUITabletSize;
  521. }
  522. set
  523. {
  524. this.m_fOvrUITabletSize = value;
  525. }
  526. }
  527. public bool OvrUseTouch
  528. {
  529. get
  530. {
  531. return this.m_bOvrUseTouch;
  532. }
  533. set
  534. {
  535. this.m_bOvrUseTouch = value;
  536. }
  537. }
  538. public bool OvrUseNewControllerType
  539. {
  540. get
  541. {
  542. return this.m_bUseNewControllerType;
  543. }
  544. set
  545. {
  546. this.m_bUseNewControllerType = value;
  547. }
  548. }
  549. public bool OvrUseSnapRotate
  550. {
  551. get
  552. {
  553. return this.m_bOvrUseSnapRotate;
  554. }
  555. set
  556. {
  557. this.m_bOvrUseSnapRotate = value;
  558. }
  559. }
  560. public int OvrUseSnapRotateRate
  561. {
  562. get
  563. {
  564. return this.m_nOvrUseSnapRotateRate;
  565. }
  566. set
  567. {
  568. this.m_nOvrUseSnapRotateRate = Mathf.Clamp(value, 10, 80);
  569. }
  570. }
  571. public bool QuitWhenAssert
  572. {
  573. get
  574. {
  575. return NDebug.m_bQuitWhenAssert;
  576. }
  577. set
  578. {
  579. NDebug.m_bQuitWhenAssert = value;
  580. }
  581. }
  582. public string ShopURL
  583. {
  584. get
  585. {
  586. string text = "https://com3d2-shop.s-court.me/?ctv=1";
  587. Product.Type type = Product.type;
  588. if (type != Product.Type.JpPublic)
  589. {
  590. if (type != Product.Type.EnAdult)
  591. {
  592. if (type == Product.Type.EnPublic)
  593. {
  594. text = "https://com3d2-shop-en-inm.s-court.me";
  595. }
  596. }
  597. else
  598. {
  599. text = "https://com3d2-shop-en.s-court.me";
  600. }
  601. }
  602. else
  603. {
  604. text = "https://com3d2-shop-inm.s-court.me";
  605. }
  606. if (Product.type == Product.Type.JpAdult)
  607. {
  608. if (!string.IsNullOrEmpty(this.CM3D2Path))
  609. {
  610. text += "&cmd=1";
  611. }
  612. else
  613. {
  614. text += "&cmd=0";
  615. }
  616. }
  617. return text;
  618. }
  619. }
  620. public CMSystem.SerializeConfig SConfig
  621. {
  622. get
  623. {
  624. return this.m_SConfig;
  625. }
  626. }
  627. public void SetTmpGenericFlag(string flag_name, int val)
  628. {
  629. if (this.m_GenericTmpFlag.ContainsKey(flag_name))
  630. {
  631. this.m_GenericTmpFlag[flag_name] = val;
  632. }
  633. else
  634. {
  635. this.m_GenericTmpFlag.Add(flag_name, val);
  636. }
  637. }
  638. public int GetTmpGenericFlag(string flag_name)
  639. {
  640. return (!this.m_GenericTmpFlag.ContainsKey(flag_name)) ? 0 : this.m_GenericTmpFlag[flag_name];
  641. }
  642. public bool ExistEditColorPresetData(int slotNo)
  643. {
  644. return this.m_dicEditColorPresetData.ContainsKey(slotNo);
  645. }
  646. public Dictionary<string, int> GetEditColorPresetData(int slotNo)
  647. {
  648. return this.ExistEditColorPresetData(slotNo) ? this.m_dicEditColorPresetData[slotNo] : null;
  649. }
  650. public void SetEditColorPresetData(int slotNo, Dictionary<string, int> setData)
  651. {
  652. if (this.ExistEditColorPresetData(slotNo))
  653. {
  654. this.m_dicEditColorPresetData.Remove(slotNo);
  655. }
  656. if (setData != null)
  657. {
  658. this.m_dicEditColorPresetData.Add(slotNo, setData);
  659. }
  660. }
  661. public void RemoveEditColorPresetData(int slotNo)
  662. {
  663. this.SetEditColorPresetData(slotNo, null);
  664. }
  665. public void ConfigSystemApply()
  666. {
  667. }
  668. public void ConfigScreenApply()
  669. {
  670. bool flag = false;
  671. if (this.ShadowQuality == CMSystem.ShadowQualityType.None)
  672. {
  673. if (QualitySettings.GetQualityLevel() != 2)
  674. {
  675. QualitySettings.SetQualityLevel(2);
  676. flag = true;
  677. }
  678. }
  679. else if (this.ShadowQuality == CMSystem.ShadowQualityType.Low)
  680. {
  681. if (QualitySettings.GetQualityLevel() != 3)
  682. {
  683. QualitySettings.SetQualityLevel(3);
  684. flag = true;
  685. }
  686. }
  687. else if (this.ShadowQuality == CMSystem.ShadowQualityType.Medium)
  688. {
  689. if (QualitySettings.GetQualityLevel() != 4)
  690. {
  691. QualitySettings.SetQualityLevel(4);
  692. flag = true;
  693. }
  694. }
  695. else if (this.ShadowQuality == CMSystem.ShadowQualityType.High && QualitySettings.GetQualityLevel() != 5)
  696. {
  697. QualitySettings.SetQualityLevel(5);
  698. flag = true;
  699. }
  700. if (!GameMain.Instance.VRMode || GameMain.Instance.VRDummyMode)
  701. {
  702. if (UnityEngine.Screen.width != this.m_siScreenSize.width || UnityEngine.Screen.height != this.m_siScreenSize.height || UnityEngine.Screen.fullScreen != this.FullScreen)
  703. {
  704. UnityEngine.Screen.SetResolution(this.m_siScreenSize.width, this.m_siScreenSize.height, this.FullScreen);
  705. flag = true;
  706. }
  707. if (QualitySettings.antiAliasing != this.m_nAntiAlias[(int)this.Antialias])
  708. {
  709. QualitySettings.antiAliasing = this.m_nAntiAlias[(int)this.Antialias];
  710. flag = true;
  711. }
  712. }
  713. else if (QualitySettings.antiAliasing != this.m_nAntiAlias[(int)this.Antialias])
  714. {
  715. QualitySettings.antiAliasing = this.m_nAntiAlias[(int)this.Antialias];
  716. flag = true;
  717. }
  718. if (this.TextureQuality == CMSystem.TextureQualityType.Low)
  719. {
  720. if (QualitySettings.anisotropicFiltering != AnisotropicFiltering.Disable)
  721. {
  722. QualitySettings.anisotropicFiltering = AnisotropicFiltering.Disable;
  723. flag = true;
  724. }
  725. }
  726. else if (this.TextureQuality == CMSystem.TextureQualityType.Medium)
  727. {
  728. if (QualitySettings.anisotropicFiltering != AnisotropicFiltering.Enable)
  729. {
  730. QualitySettings.anisotropicFiltering = AnisotropicFiltering.Enable;
  731. flag = true;
  732. }
  733. }
  734. else if (this.TextureQuality == CMSystem.TextureQualityType.High && QualitySettings.anisotropicFiltering != AnisotropicFiltering.ForceEnable)
  735. {
  736. QualitySettings.anisotropicFiltering = AnisotropicFiltering.ForceEnable;
  737. flag = true;
  738. }
  739. if (!GameMain.Instance.VRMode || GameMain.Instance.VRDummyMode)
  740. {
  741. if (this.VSyncMode == CMSystem.VSyncType.Off)
  742. {
  743. QualitySettings.vSyncCount = 0;
  744. }
  745. else if (this.VSyncMode == CMSystem.VSyncType.On)
  746. {
  747. QualitySettings.vSyncCount = 1;
  748. }
  749. else if (this.VSyncMode == CMSystem.VSyncType.Half)
  750. {
  751. QualitySettings.vSyncCount = 2;
  752. }
  753. if (UnityEngine.Application.targetFrameRate != this.TargetFPS)
  754. {
  755. UnityEngine.Application.targetFrameRate = this.TargetFPS;
  756. }
  757. flag = true;
  758. }
  759. else
  760. {
  761. if (QualitySettings.vSyncCount != 0)
  762. {
  763. QualitySettings.vSyncCount = 0;
  764. flag = true;
  765. }
  766. if (UnityEngine.Application.targetFrameRate != -1)
  767. {
  768. UnityEngine.Application.targetFrameRate = -1;
  769. flag = true;
  770. }
  771. }
  772. if (GameMain.Instance != null && GameMain.Instance.FpsCounter != null)
  773. {
  774. GameMain.Instance.FpsCounter.gameObject.SetActive(this.ViewFps);
  775. }
  776. if (GameMain.Instance != null && GameMain.Instance.CharacterMgr != null)
  777. {
  778. GameMain.Instance.CharacterMgr.ManAlphaUpdate();
  779. }
  780. if (flag && GameMain.Instance != null)
  781. {
  782. GameMain.Instance.BroadcastMessage("OnChangeScreenSizeOrAA", SendMessageOptions.DontRequireReceiver);
  783. }
  784. }
  785. public bool SaveIni()
  786. {
  787. XElement xelement = new XElement("Config", new object[]
  788. {
  789. new XAttribute("Version", 1570),
  790. new XElement("System", new XElement("SysButtonShowAlways", this.SysButtonShowAlways)),
  791. new XElement("Screen", new object[]
  792. {
  793. new XElement("FullScreen", this.FullScreen),
  794. new XElement("ScreenSizeNow.width", this.GetScreenSizeNow().width),
  795. new XElement("ScreenSizeNow.height", this.GetScreenSizeNow().height),
  796. new XElement("Antialias", this.Antialias),
  797. new XElement("ShadowQuality", this.ShadowQuality),
  798. new XElement("TextureQuality", this.TextureQuality),
  799. new XElement("VSyncMode", this.VSyncMode),
  800. new XElement("TargetFPS", this.TargetFPS),
  801. new XElement("ViewFps", this.ViewFps),
  802. new XElement("Bloom", this.Bloom),
  803. new XElement("BloomValue", this.BloomValue),
  804. new XElement("ScreenShotSuperSize", this.ScreenShotSuperSize),
  805. new XElement("ManAlpha", this.ManAlpha)
  806. }),
  807. new XElement("Message", new object[]
  808. {
  809. new XElement("MsgWndAlpha", this.MsgWndAlpha),
  810. new XElement("MsgTextSpeed", this.MsgTextSpeed),
  811. new XElement("MsgAutoSpeed", this.MsgAutoSpeed),
  812. new XElement("MsgAlreadySkip", this.MsgAlreadySkip),
  813. new XElement("MsgVoiceNoStop", this.MsgVoiceNoStop),
  814. new XElement("SystemLanguage", this.SystemLanguage.ToString()),
  815. new XElement("SubtitleType", this.SubtitleType.ToString()),
  816. new XElement("YotogiSubtitleVisible", this.YotogiSubtitleVisible.ToString()),
  817. new XElement("EjaculationSeEnabled", this.EjaculationSeEnabled)
  818. }),
  819. new XElement("Other", new object[]
  820. {
  821. new XElement("FadeSpeed", this.FadeSpeed),
  822. new XElement("DesktopCaptureMonitorNo", this.DesktopCaptureMonitorNo),
  823. new XElement("EditItemGroup", this.EditItemGroup),
  824. new XElement("EditTouchJump", this.EditTouchJump),
  825. new XElement("VRCameraHeightStand", (int)(this.VRCameraHeightStand * 1000f)),
  826. new XElement("VRCameraHeightSit", (int)(this.VRCameraHeightSit * 1000f)),
  827. new XElement("VRCameraMoveSpeedKey", (int)(this.VRCameraMoveSpeedKey * 1000f)),
  828. new XElement("VRCameraRotSpeedKey", (int)(this.VRCameraRotSpeedKey * 1000f)),
  829. new XElement("VRCameraPlaneMove", this.VRCameraPlaneMove),
  830. new XElement("VRCameraRotSpeedMouse", (int)(this.VRCameraRotSpeedMouse * 1000f)),
  831. new XElement("VRManShow", this.VRManShow),
  832. new XElement("VRCameraFov", (int)(this.VRCameraFov * 1000f)),
  833. new XElement("VRCamRotDownUp", this.VRCamRotDownUp),
  834. new XElement("QuitWhenAssert", this.QuitWhenAssert)
  835. })
  836. });
  837. if (!Product.supportMultiLanguage)
  838. {
  839. XElement xelement2 = xelement.Element("Message");
  840. if (xelement2 != null)
  841. {
  842. xelement2 = xelement2.Element("SystemLanguage");
  843. if (xelement2 != null && xelement2 != null)
  844. {
  845. xelement2.Remove();
  846. }
  847. }
  848. }
  849. if (GameMain.Instance.VRMode && !GameMain.Instance.VRDummyMode)
  850. {
  851. XContainer xcontainer = xelement;
  852. XName name = "Ovr";
  853. object[] array = new object[21];
  854. array[0] = new XElement("OvrConfVer", this.m_nOvrConfVer);
  855. array[1] = new XElement("HeadScale", (int)(this.OvrHeadScale * 1000f));
  856. array[2] = new XElement("CursorBoostSpeed", (int)(this.OvrCursorBoostSpeed * 1000f));
  857. array[3] = new XElement("CursorStabilization", (int)(this.OvrCursorStabilization * 1000f));
  858. array[4] = new XElement("PointerMode", this.OvrPointerMode);
  859. array[5] = new XElement("OvrMoveMode", this.OvrMoveMode);
  860. array[6] = new XElement("CursorPadSpeed", (int)(this.OvrCursorPadSpeed * 1000f));
  861. array[7] = new XElement("OvrViveCursorLaserHitScale", (int)(this.OvrViveCursorLaserHitScale * 1000f));
  862. array[8] = new XElement("OvrViveCursorLaserEasing", (int)(this.OvrViveCursorLaserEasing * 1000f));
  863. array[9] = new XElement("OvrHandCameraWidth", this.OvrHandCameraWidth);
  864. array[10] = new XElement("OvrHandCameraHeight", this.OvrHandCameraHeight);
  865. array[11] = new XElement("OvrDDBG", from keyValue in this.OvrDDBG
  866. select new XElement(keyValue.Key, keyValue.Value.ToSaveString()));
  867. array[12] = new XElement("OvrHandCameraWidth", this.OvrHandCameraWidth);
  868. array[13] = new XElement("OvrScreenMirror", this.OvrScreenMirror);
  869. array[14] = new XElement("OvrCameraHeightType1", this.OvrCameraHeightType);
  870. array[15] = new XElement("OvrMouseRot", this.OvrMouseRot);
  871. array[16] = new XElement("OvrUITabletSize", (int)(this.OvrUITabletSize * 1000f));
  872. array[17] = new XElement("OvrUseTouch", this.OvrUseTouch);
  873. array[18] = new XElement("OvrUseNewControllerType2", this.OvrUseNewControllerType);
  874. array[19] = new XElement("OvrUseSnapRotate2", this.OvrUseSnapRotate);
  875. array[20] = new XElement("OvrUseSnapRotateRate", this.OvrUseSnapRotateRate);
  876. xcontainer.Add(new XElement(name, array));
  877. }
  878. string value = JsonUtility.ToJson(this.m_SConfig, true);
  879. xelement.Add(new XElement("SJConfig", value));
  880. GameMain.Instance.SoundMgr.SaveIni(xelement);
  881. XDocument xdocument = new XDocument(new XDeclaration("1.0", "utf-8", "true"), new object[]
  882. {
  883. new XComment("CM3D2 Config"),
  884. xelement
  885. });
  886. string text = GameMain.Instance.SerializeStorageManager.StoreDirectoryPath;
  887. if (!GameMain.Instance.VRMode || GameMain.Instance.VRDummyMode)
  888. {
  889. text = Path.Combine(text, "config.xml");
  890. }
  891. else
  892. {
  893. text = Path.Combine(text, "config_ovr.xml");
  894. }
  895. xdocument.Save(text);
  896. return true;
  897. }
  898. public bool LoadIni()
  899. {
  900. string text = GameMain.Instance.SerializeStorageManager.StoreDirectoryPath;
  901. if (!GameMain.Instance.VRMode || GameMain.Instance.VRDummyMode)
  902. {
  903. text = Path.Combine(text, "config.xml");
  904. }
  905. else
  906. {
  907. text = Path.Combine(text, "config_ovr.xml");
  908. }
  909. if (File.Exists(text))
  910. {
  911. try
  912. {
  913. XDocument xdocument = XDocument.Load(text);
  914. XElement xelement = xdocument.Element("Config");
  915. int version = 0;
  916. try
  917. {
  918. version = int.Parse(xelement.Attribute("Version").Value);
  919. }
  920. catch (Exception)
  921. {
  922. }
  923. XElement xelm = xelement.Element("System");
  924. this.SysButtonShowAlways = bool.Parse(this.getElemetn(xelm, "SysButtonShowAlways", "true").Value);
  925. XElement xelm2 = xelement.Element("Screen");
  926. this.FullScreen = bool.Parse(this.getElemetn(xelm2, "FullScreen", "false").Value);
  927. this.m_siScreenSize.width = int.Parse(this.getElemetn(xelm2, "ScreenSizeNow.width", "1280").Value);
  928. this.m_siScreenSize.height = int.Parse(this.getElemetn(xelm2, "ScreenSizeNow.height", "720").Value);
  929. this.Antialias = (CMSystem.AntiAliasType)Enum.Parse(typeof(CMSystem.AntiAliasType), this.getElemetn(xelm2, "Antialias", CMSystem.AntiAliasType.X2.ToString()).Value);
  930. this.ShadowQuality = (CMSystem.ShadowQualityType)Enum.Parse(typeof(CMSystem.ShadowQualityType), this.getElemetn(xelm2, "ShadowQuality", CMSystem.ShadowQualityType.Medium.ToString()).Value);
  931. this.TextureQuality = (CMSystem.TextureQualityType)Enum.Parse(typeof(CMSystem.TextureQualityType), this.getElemetn(xelm2, "TextureQuality", CMSystem.TextureQualityType.High.ToString()).Value);
  932. this.VSyncMode = (CMSystem.VSyncType)Enum.Parse(typeof(CMSystem.VSyncType), this.getElemetn(xelm2, "VSyncMode", CMSystem.VSyncType.Off.ToString()).Value);
  933. this.TargetFPS = int.Parse(this.getElemetn(xelm2, "TargetFPS", "60").Value);
  934. this.ViewFps = bool.Parse(this.getElemetn(xelm2, "ViewFps", "false").Value);
  935. this.Bloom = bool.Parse(this.getElemetn(xelm2, "Bloom", "true").Value);
  936. this.BloomValue = int.Parse(this.getElemetn(xelm2, "BloomValue", "100").Value);
  937. this.ScreenShotSuperSize = (CMSystem.SSSuperSizeType)Enum.Parse(typeof(CMSystem.SSSuperSizeType), this.getElemetn(xelm2, "ScreenShotSuperSize", CMSystem.SSSuperSizeType.X1.ToString()).Value);
  938. this.ManAlpha = int.Parse(this.getElemetn(xelm2, "ManAlpha", "50").Value);
  939. XElement xelm3 = xelement.Element("Message");
  940. this.MsgWndAlpha = int.Parse(this.getElemetn(xelm3, "MsgWndAlpha", "0").Value);
  941. this.MsgTextSpeed = int.Parse(this.getElemetn(xelm3, "MsgTextSpeed", "80").Value);
  942. this.MsgAutoSpeed = int.Parse(this.getElemetn(xelm3, "MsgAutoSpeed", "50").Value);
  943. this.MsgAlreadySkip = bool.Parse(this.getElemetn(xelm3, "MsgAlreadySkip", "true").Value);
  944. this.MsgVoiceNoStop = bool.Parse(this.getElemetn(xelm3, "MsgVoiceNoStop", "true").Value);
  945. try
  946. {
  947. this.SystemLanguage = (Product.Language)Enum.Parse(typeof(Product.Language), this.getElemetn(xelm3, "SystemLanguage", Product.defaultLanguage.ToString()).Value);
  948. }
  949. catch (Exception)
  950. {
  951. this.SystemLanguage = Product.defaultLanguage;
  952. }
  953. try
  954. {
  955. this.SubtitleType = (SubtitleDisplayManager.DisplayType)Enum.Parse(typeof(SubtitleDisplayManager.DisplayType), this.getElemetn(xelm3, "SubtitleType", SubtitleDisplayManager.DisplayType.OriginalAndSubtitle.ToString()).Value);
  956. }
  957. catch (Exception)
  958. {
  959. this.SubtitleType = SubtitleDisplayManager.DisplayType.Subtitle;
  960. }
  961. this.YotogiSubtitleVisible = bool.Parse(this.getElemetn(xelm3, "YotogiSubtitleVisible", "true").Value);
  962. this.EjaculationSeEnabled = bool.Parse(this.getElemetn(xelm3, "EjaculationSeEnabled", "true").Value);
  963. XElement xelement2 = xelement.Element("Other");
  964. if (xelement2 != null)
  965. {
  966. this.FadeSpeed = int.Parse(this.getElemetn(xelement2, "FadeSpeed", "100").Value);
  967. this.DesktopCaptureMonitorNo = int.Parse(this.getElemetn(xelement2, "DesktopCaptureMonitorNo", "1").Value);
  968. this.EditItemGroup = bool.Parse(this.getElemetn(xelement2, "EditItemGroup", "True").Value);
  969. this.EditTouchJump = bool.Parse(this.getElemetn(xelement2, "EditTouchJump", "False").Value);
  970. this.VRCameraHeightStand = (float)int.Parse(this.getElemetn(xelement2, "VRCameraHeightStand", (this.VRCameraHeightStand * 1000f).ToString()).Value) / 1000f;
  971. this.VRCameraHeightSit = (float)int.Parse(this.getElemetn(xelement2, "VRCameraHeightSit", (this.VRCameraHeightSit * 1000f).ToString()).Value) / 1000f;
  972. this.VRCameraMoveSpeedKey = (float)int.Parse(this.getElemetn(xelement2, "VRCameraMoveSpeedKey", (this.VRCameraMoveSpeedKey * 1000f).ToString()).Value) / 1000f;
  973. this.VRCameraRotSpeedKey = (float)int.Parse(this.getElemetn(xelement2, "VRCameraRotSpeedKey", (this.VRCameraRotSpeedKey * 1000f).ToString()).Value) / 1000f;
  974. this.VRCameraPlaneMove = bool.Parse(this.getElemetn(xelement2, "VRCameraPlaneMove", this.VRCameraPlaneMove.ToString()).Value);
  975. this.VRCameraRotSpeedMouse = (float)int.Parse(this.getElemetn(xelement2, "VRCameraRotSpeedMouse", (this.VRCameraRotSpeedMouse * 1000f).ToString()).Value) / 1000f;
  976. this.VRManShow = bool.Parse(this.getElemetn(xelement2, "VRManShow", this.VRManShow.ToString()).Value);
  977. this.VRCameraFov = (float)int.Parse(this.getElemetn(xelement2, "VRCameraFov", (this.VRCameraFov * 1000f).ToString()).Value) / 1000f;
  978. this.VRCamRotDownUp = bool.Parse(this.getElemetn(xelement2, "VRCamRotDownUp", this.VRCamRotDownUp.ToString()).Value);
  979. this.QuitWhenAssert = bool.Parse(this.getElemetn(xelement2, "QuitWhenAssert", this.QuitWhenAssert.ToString()).Value);
  980. }
  981. if (GameMain.Instance.VRMode && !GameMain.Instance.VRDummyMode)
  982. {
  983. XElement xelement3 = xelement.Element("Ovr");
  984. if (xelement3 != null)
  985. {
  986. int num = 0;
  987. XElement xelement4 = xelement3.Element("OvrConfVer");
  988. if (xelement4 != null)
  989. {
  990. num = int.Parse(xelement4.Value);
  991. }
  992. xelement4 = xelement3.Element("HeadScale");
  993. if (xelement4 != null)
  994. {
  995. this.OvrHeadScale = (float)int.Parse(xelement4.Value) / 1000f;
  996. }
  997. xelement4 = xelement3.Element("CursorBoostSpeed");
  998. if (xelement4 != null)
  999. {
  1000. this.OvrCursorBoostSpeed = (float)int.Parse(xelement4.Value) / 1000f;
  1001. }
  1002. xelement4 = xelement3.Element("CursorStabilization");
  1003. if (xelement4 != null)
  1004. {
  1005. this.OvrCursorStabilization = (float)int.Parse(xelement4.Value) / 1000f;
  1006. }
  1007. xelement4 = xelement3.Element("PointerMode");
  1008. if (xelement4 != null)
  1009. {
  1010. this.OvrPointerMode = int.Parse(xelement4.Value);
  1011. }
  1012. xelement4 = xelement3.Element("OvrMoveMode");
  1013. if (xelement4 != null)
  1014. {
  1015. this.OvrMoveMode = int.Parse(xelement4.Value);
  1016. }
  1017. xelement4 = xelement3.Element("CursorPadSpeed");
  1018. if (xelement4 != null)
  1019. {
  1020. this.OvrCursorPadSpeed = (float)int.Parse(xelement4.Value) / 1000f;
  1021. }
  1022. xelement4 = xelement3.Element("OvrViveCursorLaserHitScale");
  1023. if (xelement4 != null)
  1024. {
  1025. this.OvrViveCursorLaserHitScale = (float)int.Parse(xelement4.Value) / 1000f;
  1026. }
  1027. xelement4 = xelement3.Element("OvrViveCursorLaserEasing");
  1028. if (xelement4 != null)
  1029. {
  1030. this.OvrViveCursorLaserEasing = (float)int.Parse(xelement4.Value) / 1000f;
  1031. }
  1032. xelement4 = xelement3.Element("OvrHandCameraWidth");
  1033. if (xelement4 != null)
  1034. {
  1035. this.OvrHandCameraWidth = int.Parse(xelement4.Value);
  1036. }
  1037. xelement4 = xelement3.Element("OvrHandCameraHeight");
  1038. if (xelement4 != null)
  1039. {
  1040. this.OvrHandCameraHeight = int.Parse(xelement4.Value);
  1041. }
  1042. xelement4 = xelement3.Element("OvrDDBG");
  1043. if (xelement4 != null)
  1044. {
  1045. this.OvrDDBG.Clear();
  1046. foreach (XElement xelement5 in xelement4.Elements())
  1047. {
  1048. this.OvrDDBG.Add(xelement5.Name.LocalName, new CMSystem.TransDD(xelement5.Value, num));
  1049. }
  1050. }
  1051. xelement4 = xelement3.Element("OvrScreenMirror");
  1052. if (xelement4 != null)
  1053. {
  1054. this.OvrScreenMirror = bool.Parse(xelement4.Value);
  1055. }
  1056. xelement4 = xelement3.Element("OvrCameraHeightType1");
  1057. if (xelement4 != null)
  1058. {
  1059. this.OvrCameraHeightType = (CMSystem.OVR_CAM_HEIGHT_TYPE)Enum.Parse(typeof(CMSystem.OVR_CAM_HEIGHT_TYPE), xelement4.Value);
  1060. }
  1061. xelement4 = xelement3.Element("OvrMouseRot");
  1062. if (xelement4 != null)
  1063. {
  1064. this.OvrMouseRot = bool.Parse(xelement4.Value);
  1065. }
  1066. xelement4 = xelement3.Element("OvrUITabletSize");
  1067. if (xelement4 != null)
  1068. {
  1069. this.OvrUITabletSize = (float)int.Parse(xelement4.Value) / 1000f;
  1070. }
  1071. xelement4 = xelement3.Element("OvrUseTouch");
  1072. if (xelement4 != null)
  1073. {
  1074. this.OvrUseTouch = bool.Parse(xelement4.Value);
  1075. }
  1076. xelement4 = xelement3.Element("OvrUseNewControllerType2");
  1077. if (xelement4 != null)
  1078. {
  1079. this.OvrUseNewControllerType = bool.Parse(xelement4.Value);
  1080. }
  1081. xelement4 = xelement3.Element("OvrUseSnapRotate2");
  1082. if (xelement4 != null)
  1083. {
  1084. this.OvrUseSnapRotate = bool.Parse(xelement4.Value);
  1085. }
  1086. xelement4 = xelement3.Element("OvrUseSnapRotateRate");
  1087. if (xelement4 != null)
  1088. {
  1089. this.OvrUseSnapRotateRate = int.Parse(xelement4.Value);
  1090. }
  1091. if (num < 1430)
  1092. {
  1093. this.OvrPointerMode = 0;
  1094. this.OvrCursorPadSpeed *= 1000f;
  1095. }
  1096. }
  1097. }
  1098. XElement xelement6 = xelement.Element("SJConfig");
  1099. if (xelement6 != null)
  1100. {
  1101. this.m_SConfig = JsonUtility.FromJson<CMSystem.SerializeConfig>(xelement6.Value);
  1102. }
  1103. GameMain.Instance.SoundMgr.LoadIni(xelement, version);
  1104. Debug.Log("コンフィグ内容 " + xdocument.ToString(SaveOptions.DisableFormatting));
  1105. }
  1106. catch (Exception ex)
  1107. {
  1108. Debug.LogError("コンフィグが読み込めませんでした。" + ex.Message);
  1109. }
  1110. }
  1111. else
  1112. {
  1113. Debug.Log("コンフィグファイル " + text + " はありません。(初回起動)");
  1114. }
  1115. this.ConfigSystemApply();
  1116. this.ConfigScreenApply();
  1117. GameMain.Instance.SoundMgr.Apply();
  1118. NInput.InputUseLegacyAxisMode = GameMain.Instance.CMSystem.SConfig.InputUseLegacyAxisMode;
  1119. return true;
  1120. }
  1121. private XElement getElemetn(XElement xelm, string name, string def)
  1122. {
  1123. xelm = xelm.Element(name);
  1124. if (xelm == null)
  1125. {
  1126. xelm = new XElement(name, def);
  1127. }
  1128. return xelm;
  1129. }
  1130. public void SaveSystem()
  1131. {
  1132. MemoryStream memoryStream = new MemoryStream();
  1133. BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
  1134. binaryWriter.Write("CM3D2_SYSTEM2");
  1135. binaryWriter.Write(1570);
  1136. binaryWriter.Write(this.m_dicEditColorPresetData.Count);
  1137. foreach (KeyValuePair<int, Dictionary<string, int>> keyValuePair in this.m_dicEditColorPresetData)
  1138. {
  1139. binaryWriter.Write(keyValuePair.Key);
  1140. binaryWriter.Write(keyValuePair.Value.Count);
  1141. foreach (KeyValuePair<string, int> keyValuePair2 in keyValuePair.Value)
  1142. {
  1143. binaryWriter.Write(keyValuePair2.Key);
  1144. binaryWriter.Write(keyValuePair2.Value);
  1145. }
  1146. }
  1147. binaryWriter.Write(this.m_SystemVers.Count);
  1148. foreach (KeyValuePair<string, string> keyValuePair3 in this.m_SystemVers)
  1149. {
  1150. binaryWriter.Write(keyValuePair3.Key);
  1151. binaryWriter.Write(keyValuePair3.Value);
  1152. }
  1153. File.WriteAllBytes(Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "system.dat"), memoryStream.ToArray());
  1154. memoryStream.Dispose();
  1155. memoryStream = null;
  1156. }
  1157. public bool LoadSystem()
  1158. {
  1159. string text = Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "system.dat");
  1160. if (File.Exists(text))
  1161. {
  1162. try
  1163. {
  1164. this.m_dicEditColorPresetData.Clear();
  1165. this.m_SystemVers.Clear();
  1166. using (FileStream fileStream = new FileStream(text, FileMode.Open))
  1167. {
  1168. BinaryReader binaryReader = new BinaryReader(fileStream);
  1169. string a = binaryReader.ReadString();
  1170. if (a == "CM3D2_SYSTEM")
  1171. {
  1172. return true;
  1173. }
  1174. NDebug.Assert(a == "CM3D2_SYSTEM2", "システムファイルのヘッダーが不正です。");
  1175. int num = binaryReader.ReadInt32();
  1176. int num2 = binaryReader.ReadInt32();
  1177. for (int i = 0; i < num2; i++)
  1178. {
  1179. int key = binaryReader.ReadInt32();
  1180. int num3 = binaryReader.ReadInt32();
  1181. Dictionary<string, int> dictionary = new Dictionary<string, int>();
  1182. for (int j = 0; j < num3; j++)
  1183. {
  1184. string key2 = binaryReader.ReadString();
  1185. int value = binaryReader.ReadInt32();
  1186. dictionary.Add(key2, value);
  1187. }
  1188. this.m_dicEditColorPresetData.Add(key, dictionary);
  1189. }
  1190. int num4 = binaryReader.ReadInt32();
  1191. for (int k = 0; k < num4; k++)
  1192. {
  1193. this.SetSystemVers(binaryReader.ReadString(), binaryReader.ReadString());
  1194. }
  1195. }
  1196. }
  1197. catch (Exception ex)
  1198. {
  1199. Debug.LogError(text + "の読み込みに失敗しました\n" + ex.Message);
  1200. }
  1201. return true;
  1202. }
  1203. return true;
  1204. }
  1205. private void LoadLauncherCfg()
  1206. {
  1207. string path = UTY.gameProjectPath + "\\update.cfg";
  1208. if (File.Exists(path))
  1209. {
  1210. using (StreamReader streamReader = new StreamReader(path))
  1211. {
  1212. while (!streamReader.EndOfStream)
  1213. {
  1214. string text = streamReader.ReadLine();
  1215. Console.WriteLine("{0}", text);
  1216. string[] array = text.Split(new char[]
  1217. {
  1218. '='
  1219. });
  1220. if (array != null && array.Length == 2)
  1221. {
  1222. string a = array[0];
  1223. string text2 = array[1];
  1224. if (a == "m_bUseNet")
  1225. {
  1226. if (text2 == "1")
  1227. {
  1228. this.NetUse = true;
  1229. }
  1230. else
  1231. {
  1232. this.NetUse = false;
  1233. }
  1234. }
  1235. else if (a == "m_strCM3D2Path")
  1236. {
  1237. text2 = text2.Replace("/", "\\");
  1238. if (!string.IsNullOrEmpty(text2))
  1239. {
  1240. if (!File.Exists(text2 + "\\CM3D2.exe"))
  1241. {
  1242. NDebug.Assert("2.0互換パス " + text2 + " には CM3D2.exe が無く、互換モードは無効です。", true);
  1243. text2 = string.Empty;
  1244. }
  1245. else if (!File.Exists(text2 + "\\GameData\\csv.arc"))
  1246. {
  1247. NDebug.Assert("2.0互換パス " + text2 + " には csv.arc が無く、互換モードは無効です。", true);
  1248. text2 = string.Empty;
  1249. }
  1250. else if (!File.Exists(text2 + "\\GameData\\script.arc"))
  1251. {
  1252. NDebug.Assert("2.0互換パス " + text2 + " には script.arc が無く、互換モードは無効です。", true);
  1253. text2 = string.Empty;
  1254. }
  1255. }
  1256. this.CM3D2Path = text2;
  1257. }
  1258. else if (string.Equals(a, "m_strCREditSystemPath", StringComparison.OrdinalIgnoreCase))
  1259. {
  1260. text2 = text2.Replace("/", "\\");
  1261. if (!string.IsNullOrEmpty(text2))
  1262. {
  1263. string path2 = Path.Combine(text2, "CR Launcher.exe");
  1264. if (!File.Exists(path2))
  1265. {
  1266. NUty.WinMessageBox(NUty.GetWindowHandle(), "CR Edit System連携エラー\n" + text2 + " には CR Launcher.exeが存在しません", "警告", 48);
  1267. text2 = string.Empty;
  1268. }
  1269. this.CREditSystemPath = text2;
  1270. }
  1271. }
  1272. }
  1273. if (string.IsNullOrEmpty(this.CREditSystemPath))
  1274. {
  1275. string text3 = Path.Combine(UTY.gameProjectPath, "KISS_Edit").Replace("/", "\\");
  1276. if (File.Exists(Path.Combine(text3, "CR Launcher.exe")))
  1277. {
  1278. this.CREditSystemPath = text3;
  1279. }
  1280. }
  1281. }
  1282. }
  1283. }
  1284. }
  1285. public ConfigBridgeData ToConfigBridgeData()
  1286. {
  1287. return new ConfigBridgeData
  1288. {
  1289. system =
  1290. {
  1291. windowSizeX = this.m_siScreenSize.width,
  1292. windowSizeY = this.m_siScreenSize.height,
  1293. isFullScreenMode = this.FullScreen,
  1294. targetFrameRate = this.TargetFPS,
  1295. screenShotSuperSize = (int)this.m_eScreenShotSuperSize,
  1296. antiAlias = (int)this.Antialias,
  1297. shadowQuality = (int)this.ShadowQuality,
  1298. textureQualit = (int)this.TextureQuality,
  1299. videoPlayerPreferredFilter = this.m_SConfig.DShowFilter,
  1300. inputUseLegacyAxisMode = this.m_SConfig.InputUseLegacyAxisMode
  1301. },
  1302. sound =
  1303. {
  1304. master =
  1305. {
  1306. voluem = (float)GameMain.Instance.SoundMgr.GetVolumeAll() / 100f
  1307. },
  1308. system =
  1309. {
  1310. voluem = (float)GameMain.Instance.SoundMgr.GetVolume(AudioSourceMgr.Type.System) / 100f
  1311. },
  1312. bgm =
  1313. {
  1314. voluem = (float)GameMain.Instance.SoundMgr.GetVolume(AudioSourceMgr.Type.Bgm) / 100f
  1315. },
  1316. dance =
  1317. {
  1318. voluem = (float)GameMain.Instance.SoundMgr.GetVolumeDance() / 100f
  1319. },
  1320. se =
  1321. {
  1322. voluem = (float)GameMain.Instance.SoundMgr.GetVolume(AudioSourceMgr.Type.Se) / 100f
  1323. },
  1324. voice =
  1325. {
  1326. voluem = (float)GameMain.Instance.SoundMgr.GetVolume(AudioSourceMgr.Type.Voice) / 100f,
  1327. isPlay3DPositioning = GameMain.Instance.SoundMgr.GetThreeD(AudioSourceMgr.Type.VoiceHeroine)
  1328. },
  1329. voiceHeroine =
  1330. {
  1331. voluem = (float)GameMain.Instance.SoundMgr.GetVolume(AudioSourceMgr.Type.VoiceHeroine) / 100f
  1332. },
  1333. isEjaculationSeEnabled = this.EjaculationSeEnabled
  1334. }
  1335. };
  1336. }
  1337. private Dictionary<int, Dictionary<string, int>> m_dicEditColorPresetData = new Dictionary<int, Dictionary<string, int>>();
  1338. [XmlIgnore]
  1339. public Dictionary<string, int> m_GenericTmpFlag = new Dictionary<string, int>();
  1340. public Dictionary<string, string> m_SystemVers = new Dictionary<string, string>();
  1341. private int[] m_nAntiAlias = new int[]
  1342. {
  1343. 0,
  1344. 2,
  1345. 4,
  1346. 8
  1347. };
  1348. private Size<int> m_siScreenSize = new Size<int>
  1349. {
  1350. width = 1280,
  1351. height = 720
  1352. };
  1353. private CMSystem.SSSuperSizeType m_eScreenShotSuperSize;
  1354. private int m_nManAlpha = 50;
  1355. private int m_nBloomValue = 100;
  1356. private int m_nMsgWndAlpha;
  1357. private int m_nMsgTextSpeed = 80;
  1358. private int m_nMsgAutoSpeed = 50;
  1359. private int m_nFadeSpeed = 100;
  1360. private SubtitleDisplayManager.DisplayType m_SubtitleType;
  1361. private bool m_YotogiSubtitleVisible;
  1362. private int m_nDesktopCaptureMonitorNo = 1;
  1363. private bool m_bEditItemGroup = true;
  1364. private bool m_bEditTouchJump;
  1365. private float m_fVRCameraHeightStand = 1.6f;
  1366. private float m_fVRCameraHeightSit = 0.8f;
  1367. private float m_fVRCameraMoveSpeedKey = 0.5f;
  1368. private float m_fVRCameraRotSpeedKey = 0.5f;
  1369. private bool m_bVRCameraPlaneMove;
  1370. private float m_fVRCameraRotSpeedMouse = 0.5f;
  1371. private bool m_bVRManShow = true;
  1372. private float m_fVRCameraFov = 60f;
  1373. private bool m_bVRCamRotDownUp;
  1374. private int m_nOvrConfVer = 1470;
  1375. private float m_fOvrHeadScale = 1f;
  1376. private float m_fOvrCursorStabilization = 0.05f;
  1377. private float m_fOvrCursorBoostSpeed = 0.2f;
  1378. private int m_nOvrPointerMode;
  1379. private int m_nOvrMoveMode;
  1380. private float m_fOvrCursorPadSpeed = 130f;
  1381. private float m_fOvrViveCursorLaserHitScale = 9f;
  1382. private float m_fOvrViveCursorLaserEasing = 0.3f;
  1383. private int m_nOvrHandCameraWidth = 720;
  1384. private int m_nOvrHandCameraHeight = 1280;
  1385. private Dictionary<string, CMSystem.TransDD> m_dicVRDDBG = new Dictionary<string, CMSystem.TransDD>();
  1386. private bool m_bOvrScreenMirror = true;
  1387. private CMSystem.OVR_CAM_HEIGHT_TYPE m_eOvrCameraHeightType = CMSystem.OVR_CAM_HEIGHT_TYPE.VR;
  1388. private bool m_bOvrMouseRot = true;
  1389. private float m_fOvrUITabletSize = 1f;
  1390. private bool m_bOvrUseTouch = true;
  1391. private bool m_bUseNewControllerType = true;
  1392. private bool m_bOvrUseSnapRotate = true;
  1393. private int m_nOvrUseSnapRotateRate = 30;
  1394. private readonly List<Size<int>> m_listScreenDefSize = new List<Size<int>>
  1395. {
  1396. new Size<int>
  1397. {
  1398. width = 1024,
  1399. height = 576
  1400. },
  1401. new Size<int>
  1402. {
  1403. width = 1280,
  1404. height = 720
  1405. },
  1406. new Size<int>
  1407. {
  1408. width = 1366,
  1409. height = 768
  1410. },
  1411. new Size<int>
  1412. {
  1413. width = 1920,
  1414. height = 1080
  1415. }
  1416. };
  1417. private CMSystem.SerializeConfig m_SConfig = new CMSystem.SerializeConfig();
  1418. public enum SSSuperSizeType
  1419. {
  1420. X1,
  1421. X2,
  1422. X4,
  1423. MAX
  1424. }
  1425. public enum AntiAliasType
  1426. {
  1427. None,
  1428. X2,
  1429. X4,
  1430. X8,
  1431. MAX
  1432. }
  1433. public enum ShadowQualityType
  1434. {
  1435. None,
  1436. Low,
  1437. Medium,
  1438. High
  1439. }
  1440. public enum TextureQualityType
  1441. {
  1442. Low,
  1443. Medium,
  1444. High
  1445. }
  1446. public enum VSyncType
  1447. {
  1448. Off,
  1449. On,
  1450. Half
  1451. }
  1452. public class TransDD
  1453. {
  1454. public TransDD()
  1455. {
  1456. }
  1457. public TransDD(string strSaveString, int f_nOvrConfVer)
  1458. {
  1459. this.FromSaveString(strSaveString, f_nOvrConfVer);
  1460. }
  1461. public string ToSaveString()
  1462. {
  1463. string text = string.Concat(new string[]
  1464. {
  1465. this.m_vPos.x.ToString(),
  1466. ":",
  1467. this.m_vPos.y.ToString(),
  1468. ":",
  1469. this.m_vPos.z.ToString()
  1470. });
  1471. string text2 = text;
  1472. text = string.Concat(new string[]
  1473. {
  1474. text2,
  1475. ":",
  1476. this.m_qRot.x.ToString(),
  1477. ":",
  1478. this.m_qRot.y.ToString(),
  1479. ":",
  1480. this.m_qRot.z.ToString(),
  1481. ":",
  1482. this.m_qRot.w.ToString()
  1483. });
  1484. text2 = text;
  1485. return string.Concat(new string[]
  1486. {
  1487. text2,
  1488. ":",
  1489. this.m_vScale.x.ToString(),
  1490. ":",
  1491. this.m_vScale.y.ToString(),
  1492. ":",
  1493. this.m_vScale.z.ToString(),
  1494. ":",
  1495. this.m_bShow.ToString()
  1496. });
  1497. }
  1498. public void FromSaveString(string f_strString, int f_nOvrConfVer)
  1499. {
  1500. string[] array = f_strString.Split(new char[]
  1501. {
  1502. ':'
  1503. });
  1504. try
  1505. {
  1506. this.m_vPos.x = float.Parse(array[0]);
  1507. this.m_vPos.y = float.Parse(array[1]);
  1508. this.m_vPos.z = float.Parse(array[2]);
  1509. this.m_qRot.x = float.Parse(array[3]);
  1510. this.m_qRot.y = float.Parse(array[4]);
  1511. this.m_qRot.z = float.Parse(array[5]);
  1512. this.m_qRot.w = float.Parse(array[6]);
  1513. this.m_vScale.x = float.Parse(array[7]);
  1514. this.m_vScale.y = float.Parse(array[8]);
  1515. this.m_vScale.z = float.Parse(array[9]);
  1516. if (f_nOvrConfVer >= 1470)
  1517. {
  1518. this.m_bShow = bool.Parse(array[10]);
  1519. }
  1520. }
  1521. catch (Exception ex)
  1522. {
  1523. Debug.LogError(ex.Message);
  1524. }
  1525. }
  1526. public Vector3 m_vPos;
  1527. public Quaternion m_qRot;
  1528. public Vector3 m_vScale;
  1529. public bool m_bShow;
  1530. }
  1531. public enum OVR_CAM_HEIGHT_TYPE
  1532. {
  1533. REAL,
  1534. VR
  1535. }
  1536. [Serializable]
  1537. public class SerializeConfig : ISerializationCallbackReceiver
  1538. {
  1539. public int Version
  1540. {
  1541. get
  1542. {
  1543. return this.m_nVersion;
  1544. }
  1545. set
  1546. {
  1547. this.m_nVersion = value;
  1548. }
  1549. }
  1550. public string DShowFilter
  1551. {
  1552. get
  1553. {
  1554. return this.m_strDShowFilter;
  1555. }
  1556. }
  1557. public CMSystem.SerializeConfig.OVR_MOVE_TYPE OvrMoveType
  1558. {
  1559. get
  1560. {
  1561. return this.m_eOvrMoveType;
  1562. }
  1563. set
  1564. {
  1565. this.m_eOvrMoveType = value;
  1566. }
  1567. }
  1568. public float OvrMoveDirSpeed
  1569. {
  1570. get
  1571. {
  1572. return this.m_fOvrMoveDirSpeed;
  1573. }
  1574. }
  1575. public bool OvrViveSmoothRotatePadAreaUse
  1576. {
  1577. get
  1578. {
  1579. return this.m_bOvrViveSmoothRotateAreaUse;
  1580. }
  1581. set
  1582. {
  1583. this.m_bOvrViveSmoothRotateAreaUse = value;
  1584. }
  1585. }
  1586. public float OvrViveSmoothRotatePadAriaRate
  1587. {
  1588. get
  1589. {
  1590. return this.m_fOvrViveSmoothUpDownPadAriaRate = this.m_fOvrViveSmoothRotatePadAriaRate;
  1591. }
  1592. set
  1593. {
  1594. this.m_fOvrViveSmoothUpDownPadAriaRate = (this.m_fOvrViveSmoothRotatePadAriaRate = Mathf.Clamp(value, 10f, 80f));
  1595. }
  1596. }
  1597. public bool OvrViveSmoothupDownPadAreaUse
  1598. {
  1599. get
  1600. {
  1601. return this.m_bOvrViveSmoothupDownPadAreaUse;
  1602. }
  1603. set
  1604. {
  1605. this.m_bOvrViveSmoothupDownPadAreaUse = value;
  1606. }
  1607. }
  1608. public float OvrViveSmoothUpDownPadAriaRate
  1609. {
  1610. get
  1611. {
  1612. return this.OvrViveSmoothRotatePadAriaRate;
  1613. }
  1614. set
  1615. {
  1616. this.OvrViveSmoothRotatePadAriaRate = Mathf.Clamp(value, 10f, 80f);
  1617. }
  1618. }
  1619. public bool OvrIkAllSceneEnable
  1620. {
  1621. get
  1622. {
  1623. return this.m_bOvrIkAllSceneEnable;
  1624. }
  1625. set
  1626. {
  1627. this.m_bOvrIkAllSceneEnable = value;
  1628. }
  1629. }
  1630. public bool OvrRiftGripStickRotate
  1631. {
  1632. get
  1633. {
  1634. return this.m_bOvrRiftGripStickRotate;
  1635. }
  1636. set
  1637. {
  1638. this.m_bOvrRiftGripStickRotate = value;
  1639. }
  1640. }
  1641. public bool OvrRiftTriggerStickUpDown
  1642. {
  1643. get
  1644. {
  1645. return this.m_bOvrRiftTriggerStickUpDown;
  1646. }
  1647. set
  1648. {
  1649. this.m_bOvrRiftTriggerStickUpDown = value;
  1650. }
  1651. }
  1652. public float OvrIkSelfCamFovMin
  1653. {
  1654. get
  1655. {
  1656. return this.m_bOvrIkSelfCamFovMin;
  1657. }
  1658. set
  1659. {
  1660. this.m_bOvrIkSelfCamFovMin = value;
  1661. }
  1662. }
  1663. public float OvrIkSelfCamFovMax
  1664. {
  1665. get
  1666. {
  1667. return this.m_bOvrIkSelfCamFovMax;
  1668. }
  1669. set
  1670. {
  1671. this.m_bOvrIkSelfCamFovMax = value;
  1672. }
  1673. }
  1674. public bool OvrDDTouchToClick
  1675. {
  1676. get
  1677. {
  1678. return this.m_bOvrDesktopScreenTouchToClick;
  1679. }
  1680. set
  1681. {
  1682. this.m_bOvrDesktopScreenTouchToClick = value;
  1683. }
  1684. }
  1685. public bool OvrDDtoBG
  1686. {
  1687. get
  1688. {
  1689. return this.m_bOvrDesktopScreenPosSaveToBG;
  1690. }
  1691. set
  1692. {
  1693. this.m_bOvrDesktopScreenPosSaveToBG = value;
  1694. }
  1695. }
  1696. public bool OvrTabletFrameHideWhenMsgWndVisible
  1697. {
  1698. get
  1699. {
  1700. return this.m_bOvrTabletFrameHideWhenMsgWndVisible;
  1701. }
  1702. set
  1703. {
  1704. this.m_bOvrTabletFrameHideWhenMsgWndVisible = value;
  1705. }
  1706. }
  1707. public bool OvrHandHitToHair
  1708. {
  1709. get
  1710. {
  1711. return this.m_bOvrHandHitToHair;
  1712. }
  1713. set
  1714. {
  1715. this.m_bOvrHandHitToHair = value;
  1716. }
  1717. }
  1718. public CMSystem.SerializeConfig.OVR_HAND_TO_SKIRT OvrHandHitToSkirt
  1719. {
  1720. get
  1721. {
  1722. return this.m_eOvrHandHitToSkirt;
  1723. }
  1724. set
  1725. {
  1726. this.m_eOvrHandHitToSkirt = value;
  1727. }
  1728. }
  1729. public CMSystem.SerializeConfig.OVR_HAND_TO_SKIRT OvrHandHitToSkirtVAS
  1730. {
  1731. get
  1732. {
  1733. return this.m_eOvrHandHitToSkirtVAS;
  1734. }
  1735. set
  1736. {
  1737. this.m_eOvrHandHitToSkirtVAS = value;
  1738. }
  1739. }
  1740. public bool EditAutoCam
  1741. {
  1742. get
  1743. {
  1744. return this.m_bEditAutoCam;
  1745. }
  1746. set
  1747. {
  1748. this.m_bEditAutoCam = value;
  1749. }
  1750. }
  1751. public bool EditEyeToCam
  1752. {
  1753. get
  1754. {
  1755. return this.m_bEditEyeToCam;
  1756. }
  1757. set
  1758. {
  1759. this.m_bEditEyeToCam = value;
  1760. }
  1761. }
  1762. public bool PrivateModeEventListVisible
  1763. {
  1764. get
  1765. {
  1766. return this.m_bPrivateModeEventListVisible;
  1767. }
  1768. set
  1769. {
  1770. this.m_bPrivateModeEventListVisible = value;
  1771. }
  1772. }
  1773. public bool PrivateModeSettingEventListVisible
  1774. {
  1775. get
  1776. {
  1777. return this.m_bPrivateModeSettingEventListVisible;
  1778. }
  1779. set
  1780. {
  1781. this.m_bPrivateModeSettingEventListVisible = value;
  1782. }
  1783. }
  1784. public bool PrivateModeSettingDayTalkEnabled
  1785. {
  1786. get
  1787. {
  1788. return this.m_bPrivateModeSettingDayTalkEnabled;
  1789. }
  1790. set
  1791. {
  1792. this.m_bPrivateModeSettingDayTalkEnabled = value;
  1793. }
  1794. }
  1795. public bool PrivateModeSettingNightTalkEnabled
  1796. {
  1797. get
  1798. {
  1799. return this.m_bPrivateModeSettingNightTalkEnabled;
  1800. }
  1801. set
  1802. {
  1803. this.m_bPrivateModeSettingNightTalkEnabled = value;
  1804. }
  1805. }
  1806. public bool PrivateModeSettingHEventEnabled
  1807. {
  1808. get
  1809. {
  1810. return this.m_bPrivateModeSettingHEventEnabled;
  1811. }
  1812. set
  1813. {
  1814. this.m_bPrivateModeSettingHEventEnabled = value;
  1815. }
  1816. }
  1817. public bool InputUseLegacyAxisMode
  1818. {
  1819. get
  1820. {
  1821. return this.inputUseLegacyAxisMode;
  1822. }
  1823. set
  1824. {
  1825. this.inputUseLegacyAxisMode = value;
  1826. }
  1827. }
  1828. public void OnBeforeSerialize()
  1829. {
  1830. this.m_nVersion = 1570;
  1831. }
  1832. public void OnAfterDeserialize()
  1833. {
  1834. }
  1835. [SerializeField]
  1836. private int m_nVersion = 1570;
  1837. [SerializeField]
  1838. private string m_strDShowFilter = "Microsoft DTV-DVD Video Decoder";
  1839. [SerializeField]
  1840. private CMSystem.SerializeConfig.OVR_MOVE_TYPE m_eOvrMoveType;
  1841. [SerializeField]
  1842. private float m_fOvrMoveDirSpeed = 5f;
  1843. [SerializeField]
  1844. private bool m_bOvrViveSmoothRotateAreaUse = true;
  1845. [SerializeField]
  1846. private float m_fOvrViveSmoothRotatePadAriaRate = 30f;
  1847. [SerializeField]
  1848. private bool m_bOvrViveSmoothupDownPadAreaUse = true;
  1849. [SerializeField]
  1850. private float m_fOvrViveSmoothUpDownPadAriaRate = 30f;
  1851. [SerializeField]
  1852. private bool m_bOvrIkAllSceneEnable;
  1853. [SerializeField]
  1854. private bool m_bOvrRiftGripStickRotate = true;
  1855. [SerializeField]
  1856. private bool m_bOvrRiftTriggerStickUpDown = true;
  1857. [SerializeField]
  1858. private float m_bOvrIkSelfCamFovMin = 20f;
  1859. [SerializeField]
  1860. private float m_bOvrIkSelfCamFovMax = 80f;
  1861. [SerializeField]
  1862. private bool m_bOvrDesktopScreenTouchToClick = true;
  1863. [SerializeField]
  1864. private bool m_bOvrDesktopScreenPosSaveToBG;
  1865. [SerializeField]
  1866. private bool m_bOvrTabletFrameHideWhenMsgWndVisible = true;
  1867. [SerializeField]
  1868. private bool m_bOvrHandHitToHair = true;
  1869. [SerializeField]
  1870. private CMSystem.SerializeConfig.OVR_HAND_TO_SKIRT m_eOvrHandHitToSkirt = CMSystem.SerializeConfig.OVR_HAND_TO_SKIRT.ON;
  1871. [SerializeField]
  1872. private CMSystem.SerializeConfig.OVR_HAND_TO_SKIRT m_eOvrHandHitToSkirtVAS = CMSystem.SerializeConfig.OVR_HAND_TO_SKIRT.GRAB;
  1873. [SerializeField]
  1874. private bool m_bEditAutoCam = true;
  1875. [SerializeField]
  1876. private bool m_bEditEyeToCam = true;
  1877. [SerializeField]
  1878. private bool m_bPrivateModeEventListVisible = true;
  1879. [SerializeField]
  1880. private bool m_bPrivateModeSettingEventListVisible;
  1881. [SerializeField]
  1882. private bool m_bPrivateModeSettingDayTalkEnabled = true;
  1883. [SerializeField]
  1884. private bool m_bPrivateModeSettingNightTalkEnabled = true;
  1885. [SerializeField]
  1886. private bool m_bPrivateModeSettingHEventEnabled = true;
  1887. [SerializeField]
  1888. private bool inputUseLegacyAxisMode;
  1889. public enum OVR_MOVE_TYPE
  1890. {
  1891. WARP_DRAW_STEPROT,
  1892. DIRECTION
  1893. }
  1894. public enum OVR_HAND_TO_SKIRT
  1895. {
  1896. OFF,
  1897. GRAB,
  1898. ON
  1899. }
  1900. }
  1901. }