[Tuxracer-checkins] CVS: tuxracer/src splash_screen.c,1.6,1.7
Status: Beta
Brought to you by:
jfpatry
From: Jasmin P. <jf...@us...> - 2000-10-01 19:58:06
|
Update of /cvsroot/tuxracer/tuxracer/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv8876 Modified Files: splash_screen.c Log Message: Added snow to splash screen. Index: splash_screen.c =================================================================== RCS file: /cvsroot/tuxracer/tuxracer/src/splash_screen.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** splash_screen.c 2000/10/01 15:18:45 1.6 --- splash_screen.c 2000/10/01 19:58:03 1.7 *************** *** 28,31 **** --- 28,32 ---- #include "multiplayer.h" #include "ui_mgr.h" + #include "ui_snow.h" #define COORD_OFFSET_AMT -0.5 *************** *** 58,63 **** void splash_screen_init() { glutDisplayFunc( main_loop ); ! glutIdleFunc( NULL ); glutReshapeFunc( reshape ); glutMouseFunc( splash_screen_mouse_func ); --- 59,66 ---- void splash_screen_init() { + init_ui_snow(); + glutDisplayFunc( main_loop ); ! glutIdleFunc( main_loop ); glutReshapeFunc( reshape ); glutMouseFunc( splash_screen_mouse_func ); *************** *** 70,109 **** } - static void setup_perspective() - { - scalar_t offset = COORD_OFFSET_AMT; - set_gl_options( SPLASH_SCREEN ); - - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glOrtho( offset, getparam_x_resolution() + offset, - offset, getparam_y_resolution() + offset, -1.0, 1.0 ); - glMatrixMode( GL_MODELVIEW ); - glLoadIdentity(); - } - - static void draw_background() - { - point2d_t ll, ur; - scalar_t z = -1.0; - - ll.x = COORD_OFFSET_AMT; - ll.y = COORD_OFFSET_AMT; - ur.x = getparam_x_resolution() + COORD_OFFSET_AMT; - ur.y = getparam_y_resolution() + COORD_OFFSET_AMT; - - glColor3f( background_colour.r, - background_colour.g, - background_colour.b ); - - glBegin( GL_QUADS ); - { - glVertex3f( ll.x, ll.y, z ); - glVertex3f( ur.x, ll.y, z ); - glVertex3f( ur.x, ur.y, z ); - glVertex3f( ll.x, ur.y, z ); - } - glEnd(); - } static void draw_logo() --- 73,76 ---- *************** *** 113,117 **** int yoffsets[4] = { 0, -1, 0, -1 }; point2d_t ll, ur; - scalar_t z = -1.0; GLint w, h; int i; --- 80,83 ---- *************** *** 125,128 **** --- 91,96 ---- } + glColor4f( 1.0, 1.0, 1.0, 1.0 ); + for (i=0; i<4; i++) { glBindTexture( GL_TEXTURE_2D, texid[i] ); *************** *** 136,151 **** ur.y = ll.y + h; - glColor3f( 1.0, 1.0, 1.0 ); glBegin( GL_QUADS ); { glTexCoord2f( 0.0, 0.0 ); ! glVertex3f( ll.x, ll.y, z ); glTexCoord2f( 1.0, 0.0 ); ! glVertex3f( ur.x, ll.y, z ); glTexCoord2f( 1.0, 1.0 ); ! glVertex3f( ur.x, ur.y, z ); glTexCoord2f( 0.0, 1.0 ); ! glVertex3f( ll.x, ur.y, z ); } glEnd(); --- 104,118 ---- ur.y = ll.y + h; glBegin( GL_QUADS ); { glTexCoord2f( 0.0, 0.0 ); ! glVertex2f( ll.x, ll.y ); glTexCoord2f( 1.0, 0.0 ); ! glVertex2f( ur.x, ll.y ); glTexCoord2f( 1.0, 1.0 ); ! glVertex2f( ur.x, ur.y ); glTexCoord2f( 0.0, 1.0 ); ! glVertex2f( ll.x, ur.y ); } glEnd(); *************** *** 162,171 **** clear_rendering_context(); ! /* Set up a orthogonal perspective matrix */ ! setup_perspective(); ! set_gl_options( SPLASH_SCREEN ); ! draw_background(); draw_logo(); --- 129,140 ---- clear_rendering_context(); ! set_gl_options( GUI ); ! ui_setup_display(); ! if (getparam_ui_snow()) { ! update_ui_snow( time_step, False ); ! draw_ui_snow(); ! } draw_logo(); |