Skip to content

Commit

Permalink
- Fixed all loading and encoding bugs (hopefully)
Browse files Browse the repository at this point in the history
   At this point, the tool can decode ShadowBLink bnk file and create, from given data, a 1-1 copy.
  • Loading branch information
Yohoki committed Mar 15, 2023
1 parent 9dbc1ef commit d6f7791
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion BNK-Editor/Hierarchy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ public void GenPropsData()
for (int i=0; i < PropsCount; i++)
{
propsT[i] = Convert.ToByte(propsType[i]);
propsV = propsV.Concat(Utils.ToHex(propsValues[i])).ToArray();
if (propsType[i] == 0x3A || propsType[i] == 0x07) // Loops need to be int32, not float
{ propsV = propsV.Concat(Utils.ToHex(Convert.ToInt32(propsValues[i]))).ToArray(); }
else propsV = propsV.Concat(Utils.ToHex(propsValues[i])).ToArray();
}
_raw_PropsData = new byte[1];
_raw_PropsData[0] = Utils.ToHexByte(PropsCount);
Expand Down

0 comments on commit d6f7791

Please sign in to comment.