Add auto line break, font size selection. Fix voicecheck in gallery. Adjust text box size

This commit is contained in:
2022-11-26 17:01:26 -05:00
parent d98093fc06
commit e58f2a5d8a
18 changed files with 446 additions and 342 deletions
+4 -2
View File
@@ -130,7 +130,7 @@ LightingSettings:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Settings.lighting
serializedVersion: 4
serializedVersion: 5
m_GIWorkflowMode: 1
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0
@@ -170,7 +170,7 @@ LightingSettings:
m_LightProbeSampleCountMultiplier: 4
m_PVRBounces: 2
m_PVRMinBounces: 2
m_PVREnvironmentMIS: 0
m_PVREnvironmentImportanceSampling: 0
m_PVRFilteringMode: 0
m_PVRDenoiserTypeDirect: 0
m_PVRDenoiserTypeIndirect: 0
@@ -185,6 +185,7 @@ LightingSettings:
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_PVRTiledBaking: 0
m_NumRaysToShootPerTexel: -1
--- !u!1 &501161484
GameObject:
m_ObjectHideFlags: 0
@@ -218,6 +219,7 @@ MonoBehaviour:
InitScene: SceneLogoMovie
InitDebugScene: SceneLogoMovie
isJapanese: 0
preferredFontSize: 28
--- !u!4 &501161486
Transform:
m_ObjectHideFlags: 0
+24 -7
View File
@@ -1,10 +1,8 @@
using System;
using System.Collections.Generic;
using Qoo;
using Qoo.Application;
using Qoo.Application;
using Qoo.Input;
using Qoo.Message;
using Qoo.SoundSystem;
using System.Collections.Generic;
using UnityEngine;
// Token: 0x020000A9 RID: 169
@@ -56,7 +54,16 @@ public class CBackLogWnd : UserBaseClass
unityTextSprite.z = 1301;
unityTextSprite.SetColor(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue));
unityTextSprite.SetTextColor(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue));
unityTextSprite.AddText("♪", 28);
if (!UnityApp.PlatformApp.isJapanese)
{
UnityEngine.Debug.LogWarning(UnityApp.PlatformApp.preferredFontSize);
unityTextSprite.AddText("♪", UnityApp.PlatformApp.preferredFontSize);
}
else
{
unityTextSprite.AddText("♪", 28);
}
unityTextSprite.Show = false;
}
this.InitLog();
@@ -382,8 +389,18 @@ public class CBackLogWnd : UserBaseClass
unityTextSprite.SetTextColor(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue));
unityTextSprite2.SetTextColor(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue));
}
unityTextSprite.AddText(linedata.pszTxt, 28);
unityTextSprite2.AddText("♪", 28);
if (!UnityApp.PlatformApp.isJapanese)
{
UnityEngine.Debug.LogWarning(UnityApp.PlatformApp.preferredFontSize);
unityTextSprite.AddText(linedata.pszTxt, UnityApp.PlatformApp.preferredFontSize);
unityTextSprite2.AddText("♪", UnityApp.PlatformApp.preferredFontSize);
}
else
{
unityTextSprite.AddText(linedata.pszTxt, 28);
unityTextSprite2.AddText("♪", 28);
}
if (linedata.nType == CBackLogWnd.LINETYPE.LINETYPE_MES)
{
unityTextSprite.x = 204;
+53 -10
View File
@@ -1,9 +1,8 @@
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using Qoo;
using Qoo.Def;
using Qoo.Def;
using Qoo.Game;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
using UnityEngine;
// Token: 0x020000B2 RID: 178
@@ -25,7 +24,7 @@ public class CMessageText
this.m_Clip.SetSize(0, 0);
this.m_nChNum = 0;
this.m_nClipWEx = 0;
this.m_isAutoRet = false;
this.m_isAutoRet = true;
this.m_anDefCol = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue);
this.m_anKeyCol = new Color32(byte.MaxValue, 192, 0, byte.MaxValue);
this.m_KeyCursor.BgColor = new Color32(0, 0, 0, 0);
@@ -33,7 +32,8 @@ public class CMessageText
this.SpCode.AddRange(MsgDef.SP_CODES);
this.LineCode.AddRange(MsgDef.LINETOP_CODES);
this.m_isKerning = IsKerning;
}
}
// Token: 0x170000BD RID: 189
// (get) Token: 0x0600052C RID: 1324 RVA: 0x00013D1C File Offset: 0x00011F1C
@@ -175,6 +175,49 @@ public class CMessageText
// Token: 0x06000533 RID: 1331 RVA: 0x00014174 File Offset: 0x00012374
public void AddMessage(string szMsg, Color32 color, MSGFONTSIZE nFontType = MSGFONTSIZE.NORMAL, int nKeywordNo = -1)
{
int testWidth = 0;
if (!UnityApp.PlatformApp.isJapanese)
{
for (int i = 0; i < szMsg.Length; i++)
{
//Force diacritics to closest letter with no accent mark
if (Regex.IsMatch(szMsg[i].ToString(), "[À-ž]"))
{
szMsg = szMsg.Remove(i, 1).Insert(i, szMsg[i].ToString().Normalize(NormalizationForm.FormC).Normalize(NormalizationForm.FormD));
}
//Auto line breaker based on character widths
BMGlyph glyph = this.font.Font.GetGlyph((int)szMsg[i], true);
if (glyph != null)
{
testWidth += glyph.width;
}
else
{
break;
}
if (szMsg[i] == '\n')
{
testWidth = 0;
}
if (testWidth > 960)
{
for (int j = i; j >= 0; j--)
{
if (szMsg[j] == ' ')
{
szMsg = szMsg.Remove(j, 1).Insert(j, "\n");
i = j;
testWidth = 0;
break;
}
}
}
}
}
foreach (char c in szMsg)
{
char c2 = '\0';
@@ -484,7 +527,7 @@ public class CMessageText
{
this.AddChar('-', color, nFontType, true, nKeywordNo);
}
return false;
return false;
}
if (this.m_CurPos.nX >= this.m_ChNum.nCx)
{
@@ -526,7 +569,7 @@ public class CMessageText
if (CMessageText.IsHyphenation)
{
CharObject lastChrInfo = this.GetLastChrInfo(this.m_CurPos.nY);
return Regex.IsMatch(lastChrInfo.code.ToString(), "^[a-zA-Z0-9]+$") && Regex.IsMatch(chCode.ToString(), "^[a-zA-Z0-9]+$");
return Regex.IsMatch(lastChrInfo.code.ToString(), "^[a-zA-Z0-9]+$") && Regex.IsMatch(chCode.ToString(), "^[a-zA-Z0-9]+$");
}
return false;
}
@@ -659,7 +702,7 @@ public class CMessageText
// Token: 0x06000550 RID: 1360 RVA: 0x00014FF8 File Offset: 0x000131F8
private CharObject GetLastChrInfo(int y)
{
for (int i = this.m_ChNum.nCx - 1; i >= 0; i--)
for (int i = this.m_ChNum.nCx - 1; i >= 0; i--)
{
CharObject chrInfo = this.GetChrInfo(i, y);
if (chrInfo != null && chrInfo.code != '\0')
+1 -1
View File
@@ -66,7 +66,7 @@ public class CSVCGList
// Token: 0x06000A2D RID: 2605 RVA: 0x0002D5DC File Offset: 0x0002B7DC
public void Update()
{
this.read = SysData.IsReadCG(this.fpath);
this.read = SysData.IsReadCG(this.fpath);
}
// Token: 0x04000851 RID: 2129
@@ -24,8 +24,9 @@ public class CSVSceneMemory
// Token: 0x06000A61 RID: 2657 RVA: 0x0002E01C File Offset: 0x0002C21C
public void Update()
{
//Set to True for 100% Scene Unlock
bool flag = SysData.IsRead(this.triggerKs, (this.triggerLabel.Length != 0) ? this.triggerLabel.Substring(1) : string.Empty, 0);
this.collectCount = ((!flag) ? 0 : 1);
this.collectCount = ((!flag) ? 0 : 1);
}
// Token: 0x04000864 RID: 2148
@@ -32,12 +32,20 @@ namespace Game
msgwnd_STYLE_DATA.posFrm = new Point3(0, 181, 800);
msgwnd_STYLE_DATA.posName[0] = new Point3(86, 170, 803);
msgwnd_STYLE_DATA.posName[1] = new Point3(126, 170, 802);
msgwnd_STYLE_DATA.posTxt = new Point3(109, 198, 801);
msgwnd_STYLE_DATA.posFace = new Point3(0, 173, 803);
if (!UnityApp.PlatformApp.isJapanese)
{
msgwnd_STYLE_DATA.posTxt = new Point3(104, 198, 801);
msgwnd_STYLE_DATA.sizeTxt = new Size(704, 136);
}
else
{
msgwnd_STYLE_DATA.posTxt = new Point3(109, 198, 801);
msgwnd_STYLE_DATA.sizeTxt = new Size(654, 136);
}
msgwnd_STYLE_DATA.posFace = new Point3(0, 173, 803);
msgwnd_STYLE_DATA.posBrk = new Point3(459, 252, 802);
msgwnd_STYLE_DATA.sizeBrkSplit = new Size(32, 1);
msgwnd_STYLE_DATA.nBrkWait = 4;
msgwnd_STYLE_DATA.sizeTxt = new Size(654, 136);
msgwnd_STYLE_DATA.nTxtWEx = 58;
msgwnd_STYLE_DATA.bTxtAutoRet = true;
msgwnd_STYLE_DATA.colTxt = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue);
@@ -11,8 +11,13 @@ namespace Qoo.Def
return FontDef.FontInfo[(int)eSize];
}
// Token: 0x040004D7 RID: 1239
public const bool KERNING_MODE = true;
public static void SetFontInfo(FONTINFO[] newFontInfo)
{
FontDef.FontInfo = newFontInfo;
}
// Token: 0x040004D7 RID: 1239
public const bool KERNING_MODE = true;
// Token: 0x040004D8 RID: 1240
public const int FONT_SMALL_FONT = 22;
@@ -324,7 +324,7 @@ namespace Qoo.Game
// Token: 0x0600009B RID: 155 RVA: 0x00004340 File Offset: 0x00002540
public static void StartVoiceCheck()
{
GameData.SetParamInt("voicecheck", string.Empty, 1);
GameData.SetParamInt("voicecheck", string.Empty, 0);
}
// Token: 0x0600009C RID: 156 RVA: 0x00004354 File Offset: 0x00002554
@@ -342,7 +342,7 @@ namespace Qoo.Game
// Token: 0x0600009E RID: 158 RVA: 0x00004388 File Offset: 0x00002588
public static bool IsFullVoiceCheck()
{
return GameData.GetParamInt("voicecheck", string.Empty) > 1;
return GameData.GetParamInt("voicecheck", string.Empty) > 0;
}
// Token: 0x0600009F RID: 159 RVA: 0x000043A8 File Offset: 0x000025A8
@@ -66,7 +66,7 @@ namespace Qoo.Game
{
SysData.InitCg();
SysData.InitBgm();
return SysData.m_Param.Init();
return SysData.m_Param.Init();
}
// Token: 0x06000119 RID: 281 RVA: 0x00005EBC File Offset: 0x000040BC
@@ -281,7 +281,7 @@ namespace Qoo.Game
// Token: 0x0600013B RID: 315 RVA: 0x00006170 File Offset: 0x00004370
public static bool IsReadCG(string name)
{
return SysData.m_LookCg.IsLook(FileId.Normalize(name));
return SysData.m_LookCg.IsLook(FileId.Normalize(name));
}
// Token: 0x0600013C RID: 316 RVA: 0x00006184 File Offset: 0x00004384
@@ -297,6 +297,7 @@ namespace Qoo.Game
}
// Token: 0x0600013E RID: 318 RVA: 0x000061A4 File Offset: 0x000043A4
//Will 100% all CGs if called
public static void SetReadCGAll()
{
SysData.m_LookCg.SetAll(true);
@@ -2,6 +2,7 @@
using System.Collections;
using System.Collections.Generic;
using Qoo;
using Qoo.Def;
using UnityEngine;
// Token: 0x02000113 RID: 275
@@ -83,8 +84,13 @@ public class ScreenResWindow : BaseWindow
new BaseWindow.UIButton("2560×1440", 475, 250, this.wndz + 3, "screen/title/buy05", true, true, 1, 2, 0),
new BaseWindow.UIText("2560×1440res", 630, 285, this.wndz + 4, "2560 × 1440", 30, UnityTextSprite.PositionType.Center, UnityTextSprite.PositionType.Center, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue),
new BaseWindow.UIButton("Fullscreen", 300, 400, this.wndz + 3, "screen/title/buy05", true, true, 1, 2, 0),
new BaseWindow.UIText("Fullscreenres", 455, 435, this.wndz + 4, "Fullscreen", 30, UnityTextSprite.PositionType.Center, UnityTextSprite.PositionType.Center, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue),
new BaseWindow.UIButton("Fullscreen", 300, 350, this.wndz + 3, "screen/title/buy05", true, true, 1, 2, 0),
new BaseWindow.UIText("Fullscreenres", 455, 385, this.wndz + 4, "Fullscreen", 30, UnityTextSprite.PositionType.Center, UnityTextSprite.PositionType.Center, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue),
new BaseWindow.UIButton("SmallFont", 125, 450, this.wndz + 3, "screen/title/buy05", true, true, 1, 2, 0),
new BaseWindow.UIText("SmallFontOption", 280, 485, this.wndz + 4, "Small Font", 30, UnityTextSprite.PositionType.Center, UnityTextSprite.PositionType.Center, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue),
new BaseWindow.UIButton("NormalFont", 475, 450, this.wndz + 3, "screen/title/buy05", true, true, 1, 2, 0),
new BaseWindow.UIText("NormalFontOption", 630, 485, this.wndz + 4, "Normal Font", 30, UnityTextSprite.PositionType.Center, UnityTextSprite.PositionType.Center, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue),
//new BaseWindow.UIImage("ArrowL", 33, 80, this.wndz + 3, "screen/cgmemory/cgm_arwl", false, true),
//new BaseWindow.UIImage("ArrowR", 848, 80, this.wndz + 3, "screen/cgmemory/cgm_arwr", false, true)
};
@@ -130,8 +136,16 @@ public class ScreenResWindow : BaseWindow
{
"Fullscreen",
7
}
};
},
{
"SmallFont",
8
},
{
"NormalFont",
9
}
};
}
int num;
if (this.dict.TryGetValue(obj, out num))
@@ -169,7 +183,29 @@ public class ScreenResWindow : BaseWindow
{
Screen.fullScreen = !Screen.fullScreen;
}
}
else if (num == 8)
{
UnityApp.PlatformApp.preferredFontSize = 22;
FontDef.SetFontInfo(new FONTINFO[]
{
new FONTINFO(22, 22, 1f, 0),
new FONTINFO(22, 22, 1f, 0),
new FONTINFO(42, 42, 1f, -1),
new FONTINFO(62, 62, 1f, -2)
});
}
else if (num == 9)
{
UnityApp.PlatformApp.preferredFontSize = 28;
FontDef.SetFontInfo(new FONTINFO[]
{
new FONTINFO(22, 22, 1f, 0),
new FONTINFO(28, 28, 1f, 0),
new FONTINFO(42, 42, 1f, -1),
new FONTINFO(62, 62, 1f, -2)
});
}
}
}
}
+9 -5
View File
@@ -24,8 +24,10 @@ public class UnityApp : Singleton<UnityApp>
{
UnityEngine.Object.DontDestroyOnLoad(this);
Application.targetFrameRate = 60;
//Screen.SetResolution(1024, 576, false, 60);
this.task = base.gameObject.AddComponent<TaskManager>();
this.preferredFontSize = 28;
Application.runInBackground = true;
//Screen.SetResolution(1024, 576, false, 60);
this.task = base.gameObject.AddComponent<TaskManager>();
this.time = base.gameObject.AddComponent<UnityTimer>();
this.file = base.gameObject.AddComponent<UnityFileLoader>();
this.input = base.gameObject.AddComponent<GameInput>();
@@ -43,13 +45,13 @@ public class UnityApp : Singleton<UnityApp>
// Token: 0x06000897 RID: 2199 RVA: 0x00026538 File Offset: 0x00024738
private void OnEnable()
{
AMAppStore.RegistrationEvent();
//AMAppStore.RegistrationEvent();
}
// Token: 0x06000898 RID: 2200 RVA: 0x00026540 File Offset: 0x00024740
private void OnDisable()
{
AMAppStore.DeleteEvent();
//AMAppStore.DeleteEvent();
}
// Token: 0x06000899 RID: 2201 RVA: 0x00026548 File Offset: 0x00024748
@@ -84,7 +86,7 @@ public class UnityApp : Singleton<UnityApp>
{
Qoo.Debug.Print("APP QUIT!!");
UnityApp.AutoSave();
AMAppStore.End();
//AMAppStore.End();
}
// Token: 0x0600089C RID: 2204 RVA: 0x000265B8 File Offset: 0x000247B8
@@ -308,4 +310,6 @@ public class UnityApp : Singleton<UnityApp>
private bool m_isInit;
public bool isJapanese;
public int preferredFontSize = 28;
}