示例#1
0
 void genGalaxy()
 {
     for (int x = -sectorsX / 2; x < sectorsX / 2; x++)
     {
         for (int y = -sectorsY / 2; y < sectorsY / 2; y++)
         {
             lehmer.setSeed((((uint)(x + screenPos.x) & 0xFFFF) << 16) | ((uint)(y + screenPos.y) & 0xFFFF));
             if (lehmer.rand() % 256 < 32)
             {
                 genStarSystem(x, y, lehmer.getSeed());
             }
         }
     }
 }
示例#2
0
 public void resetSeed()
 {
     lehmer.setSeed(systemSeed);
 }