#include <GLES/gl.h>
#include "SDL.h"
-Pixel::Pixel(void) {
- this->x = (rand() / (float)RAND_MAX) * 320.0;
- this->y = (rand() / (float)RAND_MAX) * 400.0;
+Pixel::Pixel(SDL_Surface* screen) {
+ this->x = (rand() / (float)RAND_MAX) * screen->w;
+ this->y = (rand() / (float)RAND_MAX) * screen->h;
this->vx = (rand() / (float)RAND_MAX) * 10.0 - 5.0;
this->vy = (rand() / (float)RAND_MAX) * 10.0 - 5.0;
this->lastupdate = SDL_GetTicks();