Mod by 256 to full uint8_t range

pull/230/head
Scott Freeman 4 years ago
parent 02dac30d50
commit b69cf39449
  1. 2
      Videos/CarCrimeCity/Part1/olcPixelGameEngine.h
  2. 2
      Videos/CarCrimeCity/Part2/olcPixelGameEngine.h
  3. 2
      Videos/SavingSedit/olcPixelGameEngine.h
  4. 2
      olcExampleProgram.cpp

@ -160,7 +160,7 @@
// called once per frame, draws random coloured pixels
for (int x = 0; x < ScreenWidth(); x++)
for (int y = 0; y < ScreenHeight(); y++)
Draw(x, y, olc::Pixel(rand() % 255, rand() % 255, rand()% 255));
Draw(x, y, olc::Pixel(rand() % 256, rand() % 256, rand() % 256));
return true;
}
};

@ -160,7 +160,7 @@
// called once per frame, draws random coloured pixels
for (int x = 0; x < ScreenWidth(); x++)
for (int y = 0; y < ScreenHeight(); y++)
Draw(x, y, olc::Pixel(rand() % 255, rand() % 255, rand()% 255));
Draw(x, y, olc::Pixel(rand() % 256, rand() % 256, rand() % 256));
return true;
}
};

@ -160,7 +160,7 @@
// called once per frame, draws random coloured pixels
for (int x = 0; x < ScreenWidth(); x++)
for (int y = 0; y < ScreenHeight(); y++)
Draw(x, y, olc::Pixel(rand() % 255, rand() % 255, rand()% 255));
Draw(x, y, olc::Pixel(rand() % 256, rand() % 256, rand() % 256));
return true;
}
};

@ -21,7 +21,7 @@ public:
// called once per frame
for (int x = 0; x < ScreenWidth(); x++)
for (int y = 0; y < ScreenHeight(); y++)
Draw(x, y, olc::Pixel(rand() % 255, rand() % 255, rand()% 255));
Draw(x, y, olc::Pixel(rand() % 256, rand() % 256, rand() % 256));
return true;
}
};

Loading…
Cancel
Save