diff --git a/Videos/CarCrimeCity/Part1/olcPixelGameEngine.h b/Videos/CarCrimeCity/Part1/olcPixelGameEngine.h index 0c524ac..595aa70 100644 --- a/Videos/CarCrimeCity/Part1/olcPixelGameEngine.h +++ b/Videos/CarCrimeCity/Part1/olcPixelGameEngine.h @@ -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; } }; diff --git a/Videos/CarCrimeCity/Part2/olcPixelGameEngine.h b/Videos/CarCrimeCity/Part2/olcPixelGameEngine.h index 4d13e6d..99a0671 100644 --- a/Videos/CarCrimeCity/Part2/olcPixelGameEngine.h +++ b/Videos/CarCrimeCity/Part2/olcPixelGameEngine.h @@ -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; } }; diff --git a/Videos/SavingSedit/olcPixelGameEngine.h b/Videos/SavingSedit/olcPixelGameEngine.h index a6f36ed..404df17 100644 --- a/Videos/SavingSedit/olcPixelGameEngine.h +++ b/Videos/SavingSedit/olcPixelGameEngine.h @@ -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; } }; diff --git a/olcExampleProgram.cpp b/olcExampleProgram.cpp index c9f3588..e31fd2b 100644 --- a/olcExampleProgram.cpp +++ b/olcExampleProgram.cpp @@ -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; } };