Beispiel #1
0
/* comefrom: Simulate SpecialInit */
PopDenScan(void)		/*  sets: PopDensity, , , ComRate  */
{
  QUAD Xtot, Ytot, Ztot;
  register short x, y, z;

  ClrTemArray();
  Xtot = 0;
  Ytot = 0;
  Ztot = 0;
  for (x = 0; x < WORLD_X; x++)
    for (y = 0; y < WORLD_Y; y++) {
      z = Map[x][y];
      if (z & ZONEBIT) {
	z = z & LOMASK;
	SMapX = x;
	SMapY = y;
	z = GetPDen(z) <<3;
	if (z > 254)
	  z = 254;
	tem[x >>1][y >>1] = z;
	Xtot += x;
	Ytot += y;
	Ztot++;
      }
    }
Beispiel #2
0
/* comefrom: Simulate SpecialInit */
void Micropolis::PopDenScan()
{
  /*  sets: PopDensity, , , ComRate  */
  Quad Xtot, Ytot, Ztot;
  register short x, y, z;

  ClrTemArray();
  Xtot = 0;
  Ytot = 0;
  Ztot = 0;
  for (x = 0; x < WORLD_X; x++) {
    for (y = 0; y < WORLD_Y; y++) {
      z = Map[x][y];
      if (z & ZONEBIT) {
        z = z & LOMASK;
        SMapX = x;
        SMapY = y;
        z = GetPDen(z) <<3;
        if (z > 254) {
          z = 254;
        }
        tem[x >>1][y >>1] = (Byte)z;
        Xtot += x;
        Ytot += y;
        Ztot++;
      }
    }
  }