Add SDL2.0.1-3742e768b536.

Note: using the same folder for future updates.
This commit is contained in:
rude
2014-02-14 18:56:29 +01:00
parent 320d1f0027
commit 001744190b
1777 changed files with 462972 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
/*
* common.c
* written by Holmes Futrell
* use however you want
*/
#include "common.h"
#include "SDL.h"
#include <stdlib.h>
/*
Produces a random int x, min <= x <= max
following a uniform distribution
*/
int
randomInt(int min, int max)
{
return min + rand() % (max - min + 1);
}
/*
Produces a random float x, min <= x <= max
following a uniform distribution
*/
float
randomFloat(float min, float max)
{
return rand() / (float) RAND_MAX *(max - min) + min;
}
void
fatalError(const char *string)
{
printf("%s: %s\n", string, SDL_GetError());
exit(1);
}