Fixes ordering for z & x loops (proper array increment order)

The ordering before would skip about in the ids and metadata arrays.  This runs linearly and should improve performance.
Done live on github
This commit is contained in:
Zach Laster 2012-11-21 14:56:17 +02:00
parent e8aaf81627
commit 17151718aa
1 changed files with 2 additions and 2 deletions

View File

@ -86,9 +86,9 @@
+
+ for (int y = 0; y < max; ++y)
+ {
+ for (int x = 0; x < 16; ++x)
+ for (int z = 0; z < 16; ++z)
+ {
+ for (int z = 0; z < 16; ++z)
+ for (int x = 0; x < 16; ++x)
+ {
+ int idx = y << 8 | z << 4 | x;
+ int id = ids[idx] & 0xFFFFFF;