Fix the curve index data type for texture pattern infos

This commit is contained in:
KillzXGaming 2019-07-14 11:48:07 -04:00
parent bc3ea50d37
commit 72ed8ac327
6 changed files with 3 additions and 3 deletions

Binary file not shown.

View file

@ -103,7 +103,7 @@ namespace Bfres.Structs
else
{
SamplerInfo.BeginConstant = (ushort)65535;
SamplerInfo.CurveIndex = (uint)mat.Curves.Count;
SamplerInfo.CurveIndex = (ushort)mat.Curves.Count;
}
mat.TexturePatternAnimInfos.Add(SamplerInfo);

View file

@ -70,7 +70,7 @@ namespace FirstPlugin
int Index = (int)mat.Constants[(int)patternInfo.BeginConstant].Value;
infoCfg.ConstantValue.Texture = materialAnim.TextureNames[Index];
}
if (patternInfo.CurveIndex != uint.MaxValue)
if (patternInfo.CurveIndex != ushort.MaxValue)
{
var curve = mat.Curves[(int)patternInfo.CurveIndex];
infoCfg.CurveData = new CurveTPConfig();
@ -121,7 +121,7 @@ namespace FirstPlugin
matAnimData.VisalCurveIndex = -1;
matAnim.MaterialAnimDataList.Add(matAnimData);
uint CurveIndex = 0;
ushort CurveIndex = 0;
ushort BeginConstantIndex = 0;
foreach (var texturePatternCfg in matCfg.TexturePatternInfos)