mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2024-11-26 17:02:53 +08:00
Tidying up some unused properties of Sequence, and commenting out original parsing experiment
This commit is contained in:
parent
b61899dedf
commit
d0eabc095a
@ -809,16 +809,17 @@ namespace CodeWalker.GameFiles
|
|||||||
public byte[] Data { get; set; }
|
public byte[] Data { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public SequencePart1[] FrameData { get; set; }
|
|
||||||
public ushort[] Part2 { get; set; }
|
|
||||||
public int Part2Count { get; set; }
|
|
||||||
public int Part2Offset { get; set; }
|
|
||||||
|
|
||||||
// parsed data
|
// parsed data
|
||||||
public AnimSequence[] Sequences { get; set; }
|
public AnimSequence[] Sequences { get; set; }
|
||||||
|
|
||||||
//public static Dictionary<ushort, int> SeqDict = new Dictionary<ushort, int>();
|
|
||||||
|
|
||||||
|
// //Original testing parsed data
|
||||||
|
//public SequencePart1[] FrameData { get; set; }
|
||||||
|
//public ushort[] Part2 { get; set; }
|
||||||
|
//public int Part2Count { get; set; }
|
||||||
|
//public int Part2Offset { get; set; }
|
||||||
|
//public static Dictionary<ushort, int> SeqDict = new Dictionary<ushort, int>();
|
||||||
|
|
||||||
|
|
||||||
class AnimChannelListItem
|
class AnimChannelListItem
|
||||||
@ -854,20 +855,16 @@ namespace CodeWalker.GameFiles
|
|||||||
|
|
||||||
this.Data = reader.ReadBytes((int)DataLength);
|
this.Data = reader.ReadBytes((int)DataLength);
|
||||||
|
|
||||||
|
#region //old dexyfex testing code
|
||||||
|
/*
|
||||||
if (Unused_08h != 0)
|
if (Unused_08h != 0)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
if (Unused_14h != 0)
|
if (Unused_14h != 0)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
if (UnkLength != (DataLength + 32)) //sometimes this is true
|
if (UnkLength != (DataLength + 32)) //sometimes this is true
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
|
||||||
if ((FrameLength % 4) > 0)
|
if ((FrameLength % 4) > 0)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
int offset = (int)FrameOffset;
|
int offset = (int)FrameOffset;
|
||||||
if (FrameLength > 0)
|
if (FrameLength > 0)
|
||||||
{
|
{
|
||||||
@ -882,7 +879,6 @@ namespace CodeWalker.GameFiles
|
|||||||
}
|
}
|
||||||
else if (NumFrames != 0)
|
else if (NumFrames != 0)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
int brem = (int)DataLength - offset;
|
int brem = (int)DataLength - offset;
|
||||||
int p2cnt = brem / 2;
|
int p2cnt = brem / 2;
|
||||||
if (p2cnt > 0)
|
if (p2cnt > 0)
|
||||||
@ -898,22 +894,14 @@ namespace CodeWalker.GameFiles
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
if (offset != DataLength)
|
if (offset != DataLength)
|
||||||
{ } //no hits here!
|
{ } //no hits here!
|
||||||
|
|
||||||
|
|
||||||
//if (SeqDict.ContainsKey(Unknown_1Ah)) SeqDict[Unknown_1Ah]++;
|
//if (SeqDict.ContainsKey(Unknown_1Ah)) SeqDict[Unknown_1Ah]++;
|
||||||
//else SeqDict[Unknown_1Ah] = 1;
|
//else SeqDict[Unknown_1Ah] = 1;
|
||||||
|
|
||||||
if ((Unknown_1Ah != 0) && (Unknown_1Ah > FrameOffset))
|
if ((Unknown_1Ah != 0) && (Unknown_1Ah > FrameOffset))
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
if ((Unknown_1Ch != 0) && (Unknown_1Ch > FrameOffset))
|
if ((Unknown_1Ch != 0) && (Unknown_1Ch > FrameOffset))
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
switch (ChunkSize)
|
switch (ChunkSize)
|
||||||
{
|
{
|
||||||
case 64: //0x40
|
case 64: //0x40
|
||||||
@ -922,7 +910,6 @@ namespace CodeWalker.GameFiles
|
|||||||
default://no hits
|
default://no hits
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (Unknown_1Fh_Type)
|
switch (Unknown_1Fh_Type)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
@ -936,6 +923,21 @@ namespace CodeWalker.GameFiles
|
|||||||
default: //no hits
|
default: //no hits
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
int Part2Offset = 0;//replacement calculation from old dexyfex parsing code
|
||||||
|
int offset = (int)FrameOffset + (FrameLength * NumFrames);
|
||||||
|
int p2cnt = ((int)DataLength - offset) / 2;
|
||||||
|
if (p2cnt > 0)
|
||||||
|
{
|
||||||
|
Part2Offset = offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int channelBitOffset = 0;
|
int channelBitOffset = 0;
|
||||||
int channelFrameOffset = unchecked((int)(FrameOffset * 8));
|
int channelFrameOffset = unchecked((int)(FrameOffset * 8));
|
||||||
@ -993,6 +995,8 @@ namespace CodeWalker.GameFiles
|
|||||||
// kind of the same as above but different at runtime?
|
// kind of the same as above but different at runtime?
|
||||||
channel = new AnimChannelType7();
|
channel = new AnimChannelType7();
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Debug.Assert(channel != null, "Unsupported channel");
|
//Debug.Assert(channel != null, "Unsupported channel");
|
||||||
|
Loading…
Reference in New Issue
Block a user