Upgraded all projects to XNA 2.0; project files now use (x86) instead of (PC) to indicate an x86 build (more logical and readily associated with the build platform); moved all text files into their project's documents folder; fixed any build configuration inconsistencies encountered along the way; renamed Nuclex.Graphics.Effects to Nuclex.Graphics.SpecialEffects to avoid confusion with the XNA 'Effect' class
git-svn-id: file:///srv/devel/repo-conversion/nusu@56 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
parent
b1e97f48bf
commit
57d4c734b6
6 changed files with 218 additions and 418 deletions
28
Documents/Nuclex.Support.txt
Normal file
28
Documents/Nuclex.Support.txt
Normal file
|
@ -0,0 +1,28 @@
|
|||
#if DEBUG
|
||||
|
||||
/// <summary>Generates a new random shuffle table</summary>
|
||||
/// <param name="iterationCount">
|
||||
/// Number of iterations in which to randomize the shuffle table
|
||||
/// </param>
|
||||
/// <returns>The new random shuffle table</returns>
|
||||
public static byte[] generateShuffleTable(int iterationCount) {
|
||||
byte[] shuffleTable = new byte[128];
|
||||
for(int index = 0; index < 128; ++index)
|
||||
shuffleTable[index] = index;
|
||||
|
||||
Random rng = new Random();
|
||||
|
||||
for(int iteration = 0; iteration < iterationCount; ++iteration) {
|
||||
int firstIndex = rng.Next() % 128;
|
||||
int secondIndex = rng.Next() % 128;
|
||||
|
||||
byte temp = shuffleTable[firstIndex];
|
||||
shuffleTable[firstIndex] = shuffleTable[secondIndex];
|
||||
shuffleTable[secondIndex] = temp;
|
||||
}
|
||||
|
||||
return shuffleTable;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue