[haiku-development] Re: [Haiku-commits] r21411 - in haiku/trunk/src/tests/kits/game: . ParticlesII
- From: "Stefano Ceccherini" <stefano.ceccherini@xxxxxxxxx>
- To: haiku-development@xxxxxxxxxxxxx
- Date: Thu, 14 Jun 2007 17:29:31 +0200
2007/6/14, Marcus Overhagen <marcusoverhagen@xxxxxxxx>:
jackburton at BerliOS wrote:
> + particle_list[i].timeval = random() & 64;
This gives you just a single bit. Is this wanted?
> + if((xCoord > 0) && (yCoord > 0) && (xCoord < width) && (yCoord <
height))
> + set_pixel(xCoord,yCoord,color);
Checks like this one can possibly be speed up by casting the variables to
unsigned:
if (unsigned(xCoord) < width && unsigned(yCoord) < height)
Finally, please look into the
http://haiku-os.org/documents/dev/haiku_coding_guidelines
have fun
Marcus
Thank you Marcus, but I know the haiku coding guidelines well enough.
I simply didn't write this code and currently I didn't feel like
cleaning it up all to follow our guidelines.
- References:
Other related posts:
- » [haiku-development] Re: [Haiku-commits] r21411 - in haiku/trunk/src/tests/kits/game: . ParticlesII
- » [haiku-development] Re: [Haiku-commits] r21411 - in haiku/trunk/src/tests/kits/game: . ParticlesII
- » [haiku-development] Re: [Haiku-commits] r21411 - in haiku/trunk/src/tests/kits/game: . ParticlesII
- » [haiku-development] Re: [Haiku-commits] r21411 - in haiku/trunk/src/tests/kits/game: . ParticlesII
- » [haiku-development] Re: [Haiku-commits] r21411 - in haiku/trunk/src/tests/kits/game: . ParticlesII
- » [haiku-development] Re: [Haiku-commits] r21411 - in haiku/trunk/src/tests/kits/game: . ParticlesII
- » [haiku-development] Re: [Haiku-commits] r21411 - in haiku/trunk/src/tests/kits/game: . ParticlesII
- » [haiku-development] Re: [Haiku-commits] r21411 - in haiku/trunk/src/tests/kits/game: . ParticlesII
jackburton at BerliOS wrote:
> + particle_list[i].timeval = random() & 64;
This gives you just a single bit. Is this wanted?
> + if((xCoord > 0) && (yCoord > 0) && (xCoord < width) && (yCoord <
height))
> + set_pixel(xCoord,yCoord,color);
Checks like this one can possibly be speed up by casting the variables to
unsigned:
if (unsigned(xCoord) < width && unsigned(yCoord) < height)
Finally, please look into the
http://haiku-os.org/documents/dev/haiku_coding_guidelines
have fun
Marcus