fixed line breaker and translated com_nightmare 1-12

Main
Arneth 3 years ago
parent c7600c1a7b
commit e3b5962ecd

@ -1196,6 +1196,7 @@
<None Include="Assets\StreamingAssets\JP\ks\nostay\nostay_ace\ace_no05.txt" /> <None Include="Assets\StreamingAssets\JP\ks\nostay\nostay_ace\ace_no05.txt" />
<None Include="Assets\StreamingAssets\JP\ks\stay\peter\pet_stay18.txt" /> <None Include="Assets\StreamingAssets\JP\ks\stay\peter\pet_stay18.txt" />
<None Include="Assets\StreamingAssets\EN\ks\com\com\com_no07.txt" /> <None Include="Assets\StreamingAssets\EN\ks\com\com\com_no07.txt" />
<None Include="Assets\AddressableAssetsData\link.xml" />
<None Include="Assets\StreamingAssets\JP\ks\nostay\nostay_gowland\gow_no05.txt" /> <None Include="Assets\StreamingAssets\JP\ks\nostay\nostay_gowland\gow_no05.txt" />
<None Include="Assets\StreamingAssets\EN\ks\stay\elliot\ell_stay18.txt" /> <None Include="Assets\StreamingAssets\EN\ks\stay\elliot\ell_stay18.txt" />
<None Include="Assets\StreamingAssets\EN\ks\op\op03_tow.txt" /> <None Include="Assets\StreamingAssets\EN\ks\op\op03_tow.txt" />

@ -0,0 +1,25 @@
<linker>
<assembly fullname="Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" preserve="all">
<type fullname="UnityEngine.AddressableAssets.Addressables" preserve="all" />
</assembly>
<assembly fullname="Unity.Localization, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<type fullname="UnityEngine.Localization.Locale" preserve="all" />
<type fullname="UnityEngine.Localization.Tables.SharedTableData" preserve="all" />
<type fullname="UnityEngine.Localization.Tables.StringTable" preserve="all" />
<type fullname="UnityEngine.Localization.LocaleIdentifier" preserve="nothing" serialized="true" />
<type fullname="UnityEngine.Localization.Metadata.MetadataCollection" preserve="nothing" serialized="true" />
<type fullname="UnityEngine.Localization.Tables.DistributedUIDGenerator" preserve="nothing" serialized="true" />
<type fullname="UnityEngine.Localization.Tables.SharedTableData/SharedTableEntry" preserve="nothing" serialized="true" />
<type fullname="UnityEngine.Localization.Tables.TableEntryData" preserve="nothing" serialized="true" />
</assembly>
<assembly fullname="Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" preserve="all">
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider" preserve="all" />
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider" preserve="all" />
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider" preserve="all" />
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.LegacyResourcesProvider" preserve="all" />
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.SceneProvider" preserve="all" />
</assembly>
<assembly fullname="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<type fullname="UnityEngine.Object" preserve="all" />
</assembly>
</linker>

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 5818e9f5cc2c07147bf3fae620dae0c7
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -1,6 +1,7 @@
using Qoo.Def; using Qoo.Def;
using Qoo.Game; using Qoo.Game;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection.Emit;
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using UnityEngine; using UnityEngine;
@ -179,28 +180,40 @@ public class CMessageText
int testWidth = 0; int testWidth = 0;
if (!UnityApp.PlatformApp.isJapanese) if (!UnityApp.PlatformApp.isJapanese)
{ {
CMessageText.m_isHyphenation = true;
for (int i = 0; i < szMsg.Length; i++) for (int i = 0; i < szMsg.Length; i++)
{ {
//Force diacritics to closest letter with no accent mark //Force diacritics to closest letter with no accent mark
if (Regex.IsMatch(szMsg[i].ToString(), "[À-ž]")) if (Regex.IsMatch(szMsg[i].ToString(), "[À-ž]"))
{ {
szMsg = szMsg.Remove(i, 1).Insert(i, szMsg[i].ToString().Normalize(NormalizationForm.FormC).Normalize(NormalizationForm.FormD)); szMsg = szMsg.Remove(i, 1).Insert(i, szMsg[i].ToString().Normalize(NormalizationForm.FormC).Normalize(NormalizationForm.FormD));
} }
//Auto line breaker based on character widths
//Improved line breaker
//Work around existing code since there was not line breaker that didn't split in the middle of words
BMGlyph glyph = this.font.Font.GetGlyph((int)szMsg[i], true); BMGlyph glyph = this.font.Font.GetGlyph((int)szMsg[i], true);
if (glyph != null) if (glyph == null)
{
testWidth += glyph.width;
}
else
{ {
break; break;
} }
int nSize = FontDef.GetFontInfo(nFontType).nSize;
float num = (float)glyph.advance / (float)this.font.Font.charSize;
int num2 = (int)((float)nSize * num);
int num3 = (int)((float)nSize * ((float)glyph.height / (float)this.font.Font.charSize));
num2 = (int)((float)num2 * FontDef.GetFontInfo(nFontType).fStretch);
num3 = (int)((float)num3 * FontDef.GetFontInfo(nFontType).fStretch);
//Increase line width with each character added
testWidth += num2;
//If there is a line break reset count
if (szMsg[i] == '\n') if (szMsg[i] == '\n')
{ {
testWidth = 0; testWidth = 0;
} }
if (testWidth > 960)
if (testWidth > this.m_Clip.nCx)
{ {
for (int j = i; j >= 0; j--) for (int j = i; j >= 0; j--)
{ {

@ -89,7 +89,7 @@ PlayerSettings:
bakeCollisionMeshes: 0 bakeCollisionMeshes: 0
forceSingleInstance: 1 forceSingleInstance: 1
useFlipModelSwapchain: 1 useFlipModelSwapchain: 1
resizableWindow: 1 resizableWindow: 0
useMacAppStoreValidation: 0 useMacAppStoreValidation: 0
macAppStoreCategory: public.app-category.games macAppStoreCategory: public.app-category.games
gpuSkinning: 0 gpuSkinning: 0
@ -99,7 +99,7 @@ PlayerSettings:
xboxEnableKinectAutoTracking: 0 xboxEnableKinectAutoTracking: 0
xboxEnableFitness: 0 xboxEnableFitness: 0
visibleInBackground: 0 visibleInBackground: 0
allowFullscreenSwitch: 1 allowFullscreenSwitch: 0
fullscreenMode: 3 fullscreenMode: 3
xboxSpeechDB: 0 xboxSpeechDB: 0
xboxEnableHeadOrientation: 0 xboxEnableHeadOrientation: 0

Loading…
Cancel
Save