GLuint theTorus;
-void FillTorus(float rc, int numc, float rt, int numt)
+static void FillTorus(float rc, int numc, float rt, int numt)
{
int i, j, k;
double s, t;
}
}
-float Clamp(int iters_left, float t)
+static float Clamp(int iters_left, float t)
{
if (iters_left < 3) {
return 0.0;
return (iters_left-2)*t/iters_left;
}
-void DrawScene(void)
+static void DrawScene(void)
{
int i, j;
GLboolean goIdle;
}
}
-float MyRand(void)
+static float MyRand(void)
{
return 10.0 * ( (float) rand() / (float) RAND_MAX - 0.5 );
}
#define GLUTCALLBACK
#endif
-void GLUTCALLBACK glut_post_redisplay_p(void)
+static void GLUTCALLBACK glut_post_redisplay_p(void)
{
glutPostRedisplay();
}
-void ReInit(void)
+static void ReInit(void)
{
int i;
float deviation;
glutIdleFunc(glut_post_redisplay_p);
}
-void Init(void)
+static void Init(void)
{
float base, height;
float aspect, x, y;
glMatrixMode(GL_MODELVIEW);
}
-void Reshape(int width, int height)
+static void Reshape(int width, int height)
{
glViewport(0, 0, width, height);
}
-void Key(unsigned char key, int x, int y)
+static void Key(unsigned char key, int x, int y)
{
switch (key) {
}
}
-GLenum Args(int argc, char **argv)
+static GLenum Args(int argc, char **argv)
{
GLint i;
float sinTable[MAXANGLES];
-float Sin(float angle)
+static float Sin(float angle)
{
return (sinTable[(GLint)angle]);
}
-float Cos(float angle)
+static float Cos(float angle)
{
return (sinTable[((GLint)angle+(MAXANGLES/4))%MAXANGLES]);
}
-void NewStar(GLint n, GLint d)
+static void NewStar(GLint n, GLint d)
{
if (rand()%4 == 0) {
}
}
-void RotatePoint(float *x, float *y, float rotation)
+static void RotatePoint(float *x, float *y, float rotation)
{
float tmpX, tmpY;
*y = tmpY;
}
-void MoveStars(void)
+static void MoveStars(void)
{
float offset;
GLint n;
}
}
-GLenum StarPoint(GLint n)
+static GLenum StarPoint(GLint n)
{
float x0, y0, x1, y1, width;
GLint i;
}
}
-void ShowStars(void)
+static void ShowStars(void)
{
GLint n;
glDisable(GL_DITHER);
}
-void Reshape(int width, int height)
+static void Reshape(int width, int height)
{
windW = (GLint)width;
}
}
-void Idle(void)
+static void Idle(void)
{
if (overlayInit == GL_FALSE) {
int *rowSize;
} ImageRec;
-void
+static void
rgbtorgb(unsigned char *r,unsigned char *g,unsigned char *b,unsigned char *l,int n) {
while(n--) {
l[0] = r[0];
}
}
-GLubyte *
+static GLubyte *
read_alpha_texture(char *name, int *width, int *height)
{
unsigned char *base, *lptr;
return (unsigned char *) base;
}
-GLubyte *
+static GLubyte *
read_rgb_texture(char *name, int *width, int *height)
{
unsigned char *base, *ptr;
};
-void BuildCylinder(int numEdges)
+static void BuildCylinder(int numEdges)
{
int i, top = 1.0, bottom = -1.0;
float x[100], y[100], angle;
glEndList();
}
-void BuildTorus(float rc, int numc, float rt, int numt)
+static void BuildTorus(float rc, int numc, float rt, int numt)
{
int i, j, k;
double s, t;
glEndList();
}
-void BuildCage(void)
+static void BuildCage(void)
{
int i;
float inc;
glEndList();
}
-void BuildCube(void)
+static void BuildCube(void)
{
int i, j;
glEndList();
}
-void BuildLists(void)
+static void BuildLists(void)
{
cube = glGenLists(1);
genericObject = torus;
}
-void SetDefaultSettings(void)
+static void SetDefaultSettings(void)
{
magFilter = nnearest;
autoRotate = GL_TRUE;
}
-unsigned char *AlphaPadImage(int bufSize, unsigned char *inData, int alpha)
+static unsigned char *AlphaPadImage(int bufSize, unsigned char *inData, int alpha)
{
unsigned char *outData, *out_ptr, *in_ptr;
int i;
return outData;
}
-void Init(void)
+static void Init(void)
{
float ambient[] = {0.0, 0.0, 0.0, 1.0};
float diffuse[] = {1.0, 1.0, 1.0, 1.0};
BuildLists();
}
-void ReInit(void)
+static void ReInit(void)
{
if (genericObject == torus) {
glEnable(GL_DEPTH_TEST);
glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, textureEnvironment);
}
-void Draw(void)
+static void Draw(void)
{
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
glutSwapBuffers();
}
-void Reshape(int width, int height)
+static void Reshape(int width, int height)
{
W = width;
H = height;
glMatrixMode(GL_MODELVIEW);
}
-void Idle(void)
+static void Idle(void)
{
static double t0 = -1.;
double t, dt;
glutPostRedisplay();
}
-void Key2(int key, int x, int y)
+static void Key2(int key, int x, int y)
{
switch (key) {
glutPostRedisplay();
}
-void Key(unsigned char key, int x, int y)
+static void Key(unsigned char key, int x, int y)
{
switch (key) {
glutPostRedisplay();
}
-GLenum Args(int argc, char **argv)
+static GLenum Args(int argc, char **argv)
{
GLint i;
float sinTable[MAXANGLES];
-float Sin(float angle)
+static float Sin(float angle)
{
return (sinTable[(GLint)angle]);
}
-float Cos(float angle)
+static float Cos(float angle)
{
return (sinTable[((GLint)angle+(MAXANGLES/4))%MAXANGLES]);
}
-void NewStar(GLint n, GLint d)
+static void NewStar(GLint n, GLint d)
{
if (rand()%4 == 0) {
}
}
-void RotatePoint(float *x, float *y, float rotation)
+static void RotatePoint(float *x, float *y, float rotation)
{
float tmpX, tmpY;
*y = tmpY;
}
-void MoveStars(void)
+static void MoveStars(void)
{
float offset;
GLint n;
}
}
-GLenum StarPoint(GLint n)
+static GLenum StarPoint(GLint n)
{
float x0, y0, x1, y1, width;
GLint i;
}
}
-void ShowStars(void)
+static void ShowStars(void)
{
GLint n;
glDisable(GL_DITHER);
}
-void Reshape(int width, int height)
+static void Reshape(int width, int height)
{
windW = (GLint)width;
}
}
-void Draw(void)
+static void Draw(void)
{
MoveStars();
#define GLUTCALLBACK
#endif
-void GLUTCALLBACK glut_post_redisplay_p(void)
+static void GLUTCALLBACK glut_post_redisplay_p(void)
{
glutPostRedisplay();
}
GLenum op = OP_NOOP;
-void DrawImage(void)
+static void DrawImage(void)
{
glRasterPos2i(0, 0);
image->data);
}
-void DrawPoint(void)
+static void DrawPoint(void)
{
int i;
}
}
-void InitVList(void)
+static void InitVList(void)
{
vList[0].x = 0.0;
vList[4].tY = cList[0].y / (float)imageSizeY;
}
-void ScaleImage(int sizeX, int sizeY)
+static void ScaleImage(int sizeX, int sizeY)
{
GLubyte *buf;
image->sizeY = sizeY;
}
-void SetPoint(int x, int y)
+static void SetPoint(int x, int y)
{
cList[cCount].x = (float)x;
cCount++;
}
-void Stretch(void)
+static void Stretch(void)
{
glBegin(GL_TRIANGLES);
}
}
-void Key(unsigned char key, int x, int y)
+static void Key(unsigned char key, int x, int y)
{
switch (key) {
glutPostRedisplay();
}
-void Mouse(int button, int state, int mouseX, int mouseY)
+static void Mouse(int button, int state, int mouseX, int mouseY)
{
if (state != GLUT_DOWN)
glutPostRedisplay();
}
-void Animate(void)
+static void Animate(void)
{
static double t0 = -1.;
double t, dt;
#define GLUTCALLBACK
#endif
-void GLUTCALLBACK glut_post_redisplay_p(void)
+static void GLUTCALLBACK glut_post_redisplay_p(void)
{
glutPostRedisplay();
}
#endif
-void GLUTCALLBACK glut_post_redisplay_p(void)
+static void GLUTCALLBACK glut_post_redisplay_p(void)
{
static double t0 = -1.;
double t, dt;