Game Development Reference
In-Depth Information
private static int GetSourceMatchLength(PatchOperation operation,
int target,
int source,
int maxLength)
{
Note
The source code for this method is available on the Companion Web site.
}
The following method builds the PatchDifference list based on the results in the
PatchOperation object.
private static List<PatchDifference> BuildDifferencesList(PatchOperation operation)
{
Note
The source code for this method is available on the Companion Web site.
}
The following method accepts the results of the sequence compilation and builds dif-
ferencing objects that will eventually be serialized into the XML transform document.
private static bool RecordDifference(List<PatchDifference> result,
int targetStart,
int targetEnd,
int sourceStart,
int sourceEnd)
{
Note
The source code for this method is available on the Companion Web site.
}
Transforming Data Using a Difference List
Once a listing of all the differences between the two datasets is generated, there are
a couple more steps we must take in order to have all the data required to perform a
transformation.
We must first extract the modified bytes from the new dataset and store them with the
difference list. In order to store the data, we must alter the PatchDifference object
to include an array of bytes specific to the type of change that will be performed.
 
Search Nedrilad ::




Custom Search