tuxracer-checkins Mailing List for Tux Racer (Page 3)
Status: Beta
Brought to you by:
jfpatry
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(46) |
Sep
(274) |
Oct
(36) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Jasmin P. <jf...@us...> - 2000-09-30 16:59:04
|
Update of /cvsroot/tuxracer/tuxracer/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv31243 Modified Files: game_config.c Log Message: - Added comments to config parameters; comments are printed in options file. - Cleaned up some parameters: removed a few obsolete ones and added capture_mouse for Voodoo1/2 owners. Index: game_config.c =================================================================== RCS file: /cvsroot/tuxracer/tuxracer/src/game_config.c,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -r1.31 -r1.32 *** game_config.c 2000/09/29 14:52:05 1.31 --- game_config.c 2000/09/30 16:59:01 1.32 *************** *** 114,117 **** --- 114,118 ---- param_val val; param_val deflt; + char *comment; }; *************** *** 120,142 **** */ ! #define INIT_PARAM( nam, val, typename ) \ Params. ## nam ## .loaded = False; \ Params. ## nam ## .name = #nam; \ ! Params. ## nam ## .deflt. ## typename ## _val = val; ! #define INIT_PARAM_STRING( nam, val ) \ ! INIT_PARAM( nam, val, string ); \ Params. ## nam ## .type = PARAM_STRING; ! #define INIT_PARAM_CHAR( nam, val ) \ ! INIT_PARAM( nam, val, char ); \ Params. ## nam ## .type = PARAM_CHAR; ! #define INIT_PARAM_INT( nam, val ) \ ! INIT_PARAM( nam, val, int ); \ Params. ## nam ## .type = PARAM_INT; ! #define INIT_PARAM_BOOL( nam, val ) \ ! INIT_PARAM( nam, val, bool ); \ Params. ## nam ## .type = PARAM_BOOL; --- 121,144 ---- */ ! #define INIT_PARAM( nam, val, typename, commnt ) \ Params. ## nam ## .loaded = False; \ Params. ## nam ## .name = #nam; \ ! Params. ## nam ## .deflt. ## typename ## _val = val; \ ! Params. ## nam ## .comment = commnt; ! #define INIT_PARAM_STRING( nam, val, commnt ) \ ! INIT_PARAM( nam, val, string, commnt ); \ Params. ## nam ## .type = PARAM_STRING; ! #define INIT_PARAM_CHAR( nam, val, commnt ) \ ! INIT_PARAM( nam, val, char, commnt ); \ Params. ## nam ## .type = PARAM_CHAR; ! #define INIT_PARAM_INT( nam, val, commnt ) \ ! INIT_PARAM( nam, val, int, commnt ); \ Params. ## nam ## .type = PARAM_INT; ! #define INIT_PARAM_BOOL( nam, val, commnt ) \ ! INIT_PARAM( nam, val, bool, commnt ); \ Params. ## nam ## .type = PARAM_BOOL; *************** *** 345,354 **** struct param x_resolution; struct param y_resolution; struct param force_window_position; - struct param warp_pointer; - struct param control_mode; /* 0 = keyboard, - 1 = mouse, - 2 = joystick - */ struct param quit_key; struct param turn_left_key; --- 347,352 ---- struct param x_resolution; struct param y_resolution; + struct param capture_mouse; struct param force_window_position; struct param quit_key; struct param turn_left_key; *************** *** 422,479 **** void init_game_configuration() { ! INIT_PARAM_STRING( data_dir, DATA_DIR ); ! INIT_PARAM_BOOL( draw_tux_shadow, False ); ! INIT_PARAM_BOOL( draw_particles, True ); ! INIT_PARAM_INT( tux_sphere_divisions, 6 ); ! INIT_PARAM_INT( tux_shadow_sphere_divisions, 3 ); ! INIT_PARAM_BOOL( nice_fog, True ); ! INIT_PARAM_BOOL( use_sphere_display_list, True ); ! INIT_PARAM_BOOL( display_fps, False ); ! INIT_PARAM_INT( x_resolution, 640 ); ! INIT_PARAM_INT( y_resolution, 480 ); ! INIT_PARAM_BOOL( do_intro_animation, True ); ! INIT_PARAM_INT( mipmap_type, 3 ); ! INIT_PARAM_BOOL( fullscreen, False ); ! INIT_PARAM_BOOL( force_window_position, False ); ! INIT_PARAM_BOOL( warp_pointer, False ); ! INIT_PARAM_INT( ode_solver, 1 ); ! INIT_PARAM_INT( control_mode, 0 ); ! INIT_PARAM_STRING( quit_key, "q escape" ); ! INIT_PARAM_STRING( turn_left_key, "j left" ); ! INIT_PARAM_STRING( turn_right_key, "l right" ); ! INIT_PARAM_STRING( trick_modifier_key, "d" ); ! INIT_PARAM_STRING( brake_key, "k space down" ); ! INIT_PARAM_STRING( paddle_key, "i up" ); ! INIT_PARAM_STRING( follow_view_key, "1" ); ! INIT_PARAM_STRING( behind_view_key, "2" ); ! INIT_PARAM_STRING( above_view_key, "3" ); ! INIT_PARAM_INT( view_mode, 1 ); ! INIT_PARAM_STRING( screenshot_key, "=" ); ! INIT_PARAM_STRING( pause_key, "p" ); ! INIT_PARAM_STRING( reset_key, "backspace" ); ! INIT_PARAM_STRING( jump_key, "e" ); ! INIT_PARAM_INT( fov, 60 ); ! INIT_PARAM_STRING( debug, "" ); ! INIT_PARAM_INT( warning_level, 100 ); ! INIT_PARAM_INT( forward_clip_distance, 75 ); ! INIT_PARAM_INT( backward_clip_distance, 10 ); ! INIT_PARAM_INT( tree_detail_distance, 20 ); ! INIT_PARAM_BOOL( terrain_blending, True ); ! INIT_PARAM_BOOL( perfect_terrain_blending, False ); ! INIT_PARAM_BOOL( terrain_envmap, True ); ! INIT_PARAM_BOOL( use_cva, True ); ! INIT_PARAM_BOOL( cva_hack, True ); ! INIT_PARAM_INT( course_detail_level, 75 ); ! ! INIT_PARAM_BOOL( no_audio, False ); ! INIT_PARAM_BOOL( sound_enabled, True ); ! INIT_PARAM_BOOL( music_enabled, True ); ! INIT_PARAM_INT( sound_volume, 127 ); ! INIT_PARAM_INT( music_volume, 64 ); ! INIT_PARAM_INT( audio_freq_mode, 1 ); ! INIT_PARAM_INT( audio_format_mode, 1 ); ! INIT_PARAM_BOOL( audio_stereo, True ); ! INIT_PARAM_INT( audio_buffer_size, 2048 ); ! INIT_PARAM_BOOL( track_marks, True ); } --- 420,666 ---- void init_game_configuration() { ! INIT_PARAM_STRING( ! data_dir, DATA_DIR, ! "# The location of the Tux Racer data files" ); ! ! INIT_PARAM_BOOL( ! draw_tux_shadow, False, ! "# Set this to true to display Tux's shadow. Note that this is a \n" ! "# hack and is quite expensive in terms of framerate.\n" ! "# [EXPERT] This looks better if your card has a stencil buffer; \n" ! "# if compiling use the --enable-stencil-buffer configure option \n" ! "# to enable the use of the stencil buffer" ); ! ! INIT_PARAM_BOOL( ! draw_particles, True, ! "# Controls the drawing of snow particles that are kicked up as Tux\n" ! "# turns and brakes. Setting this to false should help improve \n" ! "# performance." ); ! ! INIT_PARAM_INT( ! tux_sphere_divisions, 6, ! "# [EXPERT] Higher values result in a more finely subdivided mesh \n" ! "# for Tux, and vice versa. If you're experiencing low framerates,\n" ! "# try lowering this value." ); ! ! INIT_PARAM_INT( ! tux_shadow_sphere_divisions, 3, ! "# [EXPERT] The level of subdivision of Tux's shadow." ); ! ! INIT_PARAM_BOOL( ! nice_fog, True, ! "# [EXPERT] If true, then the GL_NICEST hint will be used when\n" ! "# rendering fog. On some cards, setting this to false may improve\n" ! "# performance."); ! ! INIT_PARAM_BOOL( ! use_sphere_display_list, True, ! "# [EXPERT] Mesa 3.1 sometimes renders Tux strangely when display \n" ! "# lists are used. Setting this to false should solve the problem \n" ! "# at the cost of a few Hz." ); ! ! INIT_PARAM_BOOL( ! display_fps, False, ! "# Set this to true to display the current framerate in Hz." ); ! ! INIT_PARAM_INT( ! x_resolution, 640, ! "# The horizontal size of the Tux Racer window" ); ! ! INIT_PARAM_INT( ! y_resolution, 480, ! "# The vertical size of the Tux Racer window" ); ! ! INIT_PARAM_BOOL( ! capture_mouse, False, ! "# If true, then the mouse will not be able to leave the \n" ! "# Tux Racer window.\n" ! "# Set this to true if you are rendering in fullscreen mode." ); ! ! INIT_PARAM_BOOL( ! do_intro_animation, True, ! "# If false, then the introductory animation sequence will be skipped" ! ); ! ! INIT_PARAM_INT( ! mipmap_type, 3, ! "# [EXPERT] Allows you to control which type of texture\n" ! "# interpolation/mipmapping is used when rendering textures. The\n" ! "# values correspond to the following OpenGL settings:\n" ! "#\n" ! "# 0: GL_NEAREST\n" ! "# 1: GL_LINEAR\n" ! "# 2: GL_NEAREST_MIPMAP_NEAREST\n" ! "# 3: GL_LINEAR_MIPMAP_NEAREST\n" ! "# 4: GL_NEAREST_MIPMAP_LINEAR\n" ! "# 5: GL_LINEAR_MIPMAP_LINEAR\n" ! "#\n" ! "# On some cards, you may be able to improve performance by\n" ! "# decreasing this number, at the cost of lower image quality." ); ! ! INIT_PARAM_BOOL( ! fullscreen, False, ! "# Set this to true to force the window to be the same \n" ! "# size as your screen.\n" ! "# Linux Voodoo1/Voodoo2 users: This is NOT what you want to use to\n" ! "# activate fullscreen rendering on your card." ); ! ! INIT_PARAM_BOOL( ! force_window_position, False , ! "# If true, then the Tux Racer window will automatically be\n" ! "# placed at (0,0)" ); ! ! INIT_PARAM_INT( ! ode_solver, 1 , ! "# Selects the ODE (ordinary differential equation) solver. \n" ! "# Possible values are:\n" ! "#\n" ! "# 0: Modified Euler (fastest but least accurate)\n" ! "# 1: Runge-Kutta (2,3)\n" ! "# 2: Runge-Kutta (4,5) (slowest but most accurate)\n" ); ! ! INIT_PARAM_STRING( ! quit_key, "q escape" , ! "# Key binding for quitting a race" ); ! INIT_PARAM_STRING( ! turn_left_key, "j left" , ! "# Key binding for turning left" ); ! INIT_PARAM_STRING( ! turn_right_key, "l right" , ! "# Key binding for turning right" ); ! INIT_PARAM_STRING( ! trick_modifier_key, "d" , ! "# Key binding for doing tricks" ); ! INIT_PARAM_STRING( ! brake_key, "k space down" , ! "# Key binding for braking" ); ! INIT_PARAM_STRING( ! paddle_key, "i up" , ! "# Key binding for paddling (on the ground) and flapping (in the air)" ! ); ! INIT_PARAM_STRING( ! follow_view_key, "1" , ! "# Key binding for the \"Follow\" camera mode" ); ! INIT_PARAM_STRING( ! behind_view_key, "2" , ! "# Key binding for the \"Behind\" camera mode" ); ! INIT_PARAM_STRING( ! above_view_key, "3" , ! "# Key binding for the \"Above\" camera mode" ); ! INIT_PARAM_INT( ! view_mode, 1 , ! "# Default view mode. Possible values are\n" ! "#\n" ! "# 0: Behind\n" ! "# 1: Follow\n" ! "# 2: Above" ); ! INIT_PARAM_STRING( ! screenshot_key, "=" , ! "# Key binding for taking a screenshot" ); ! INIT_PARAM_STRING( ! pause_key, "p" , ! "# Key binding for pausing the game" ); ! INIT_PARAM_STRING( ! reset_key, "backspace" , ! "# Key binding for resetting the player position" ); ! INIT_PARAM_STRING( ! jump_key, "e" , ! "# Key binding for jumping" ); ! INIT_PARAM_INT( ! fov, 60 , ! "# [EXPERT] Sets the camera field-of-view" ); ! INIT_PARAM_STRING( ! debug, "" , ! "# [EXPERT] Controls the Tux Racer debugging modes" ); ! INIT_PARAM_INT( ! warning_level, 100 , ! "# [EXPERT] Controls the Tux Racer warning messages" ); ! INIT_PARAM_INT( ! forward_clip_distance, 75 , ! "# Controls how far ahead the course of the camera the course\n" ! "# is rendered. Larger values mean that more of the course is\n" ! "# rendered, resulting in slower performance. Decreasing this \n" ! "# value is an effective way to improve framerates." ); ! INIT_PARAM_INT( ! backward_clip_distance, 10 , ! "# [EXPERT] Some objects aren't yet clipped to the view frustum, \n" ! "# so this value is used to control how far up the course these \n" ! "# objects are drawn." ); ! INIT_PARAM_INT( ! tree_detail_distance, 20 , ! "# [EXPERT] Controls the distance at which trees are drawn with \n" ! "# two rectangles instead of one." ); ! INIT_PARAM_BOOL( ! terrain_blending, True , ! "# Controls the blending of the terrain textures. Setting this\n" ! "# to false will help improve performance." ); ! INIT_PARAM_BOOL( ! perfect_terrain_blending, False , ! "# [EXPERT] If true, then terrain triangles with three different\n" ! "# terrain types at the vertices will be blended correctly\n" ! "# (instead of using a faster but imperfect approximation)" ); ! INIT_PARAM_BOOL( ! terrain_envmap, True , ! "# If true, then the ice will be drawn with an \"environment map\",\n" ! "# which gives the ice a shiny appearance. Setting this to false\n" ! "# will help improve performance" ); ! INIT_PARAM_BOOL( ! use_cva, True , ! "# [EXPERT] If true, then compiled vertex arrays will be used when\n" ! "# drawing the terrain. Whether or not this helps performance\n" ! "# is driver- and card-dependent" ); ! INIT_PARAM_BOOL( ! cva_hack, True , ! "# Some card/driver combinations render the terrrain incorrectly\n" ! "# when using compiled vertex arrays. This activates a hack \n" ! "# to work around that problem." ); ! INIT_PARAM_INT( ! course_detail_level, 75 , ! "# [EXPERT] This controls how accurately the course terrain is \n" ! "# rendered. A high value results in greater accuracy at the cost of \n" ! "# performance, and vice versa. This value can be decreased and \n" ! "# increased in 10% increments at runtime using the F9 and F10 keys.\n" ! "# To better see the effect, activate wireframe mode using the F11 \n" ! "# key (this is a toggle)." ); ! INIT_PARAM_BOOL( ! no_audio, False , ! "# If True, then audio in the game is completely disabled." ); ! INIT_PARAM_BOOL( ! sound_enabled, True , ! "# Use this to turn sound effects on and off" ); ! INIT_PARAM_BOOL( ! music_enabled, True , ! "# Use this to turn music on and off" ); ! INIT_PARAM_INT( ! sound_volume, 127 , ! "# This controls the sound volume (valid range is 0-127)" ); ! INIT_PARAM_INT( ! music_volume, 64 , ! "# This controls the music volume (valid range is 0-127)" ); ! INIT_PARAM_INT( ! audio_freq_mode, 1 , ! "# The controls the frequency of the audio. Valid values are:\n" ! "# \n" ! "# 0: 11025 Hz\n" ! "# 1: 22050 Hz\n" ! "# 2: 44100 Hz" ); ! INIT_PARAM_INT( ! audio_format_mode, 1 , ! "# This controls the number of bits per sample for the audio.\n" ! "# Valid values are:\n" ! "#\n" ! "# 0: 8 bits\n" ! "# 1: 16 bits\n" ); ! INIT_PARAM_BOOL( ! audio_stereo, True , ! "# Audio will be played in stereo of true, and mono if false" ); ! INIT_PARAM_INT( ! audio_buffer_size, 2048 , ! "# [EXPERT] Controls the size of the audio buffer. \n" ! "# Increase the buffer size if you experience choppy audio\n" ! "# (at the cost of greater audio latency" ); ! INIT_PARAM_BOOL( ! track_marks, True , ! "# If true, then the players will leave track marks in the snow" ); } *************** *** 493,501 **** FN_PARAM_INT( x_resolution ) FN_PARAM_INT( y_resolution ) FN_PARAM_BOOL( do_intro_animation ) FN_PARAM_INT( mipmap_type ) FN_PARAM_BOOL( fullscreen ) FN_PARAM_BOOL( force_window_position ) - FN_PARAM_BOOL( warp_pointer ) FN_PARAM_INT( ode_solver ) FN_PARAM_STRING( quit_key ) --- 680,688 ---- FN_PARAM_INT( x_resolution ) FN_PARAM_INT( y_resolution ) + FN_PARAM_BOOL( capture_mouse ) FN_PARAM_BOOL( do_intro_animation ) FN_PARAM_INT( mipmap_type ) FN_PARAM_BOOL( fullscreen ) FN_PARAM_BOOL( force_window_position ) FN_PARAM_INT( ode_solver ) FN_PARAM_STRING( quit_key ) *************** *** 710,716 **** "# Tux Racer " VERSION " configuration file\n" "#\n" ! "# See the README file distributed with the program for\n" ! "# descriptions of these parameters.\n" ! "# Note: this file is parsed using Tcl, so Tcl syntax applies.\n" "#\n" ); --- 897,901 ---- "# Tux Racer " VERSION " configuration file\n" "#\n" ! "# Note: This file is overwritten each time Tux Racer is run.\n" "#\n" ); *************** *** 718,721 **** --- 903,910 ---- for (i=0; i<sizeof(Params)/sizeof(struct param); i++) { parm = (struct param*)&Params + i; + if ( parm->comment != NULL ) { + fprintf( config_stream, "\n# %s\n#\n%s\n#\n", + parm->name, parm->comment ); + } switch ( parm->type ) { case PARAM_STRING: |
From: Jasmin P. <jf...@us...> - 2000-09-30 16:56:44
|
Update of /cvsroot/tuxracer/tuxracer/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv28761 Modified Files: event_select.c Log Message: Can now use arrow buttons to move through cups and events. Left/Right is used to change event; Up/Down is used to change cup. Index: event_select.c =================================================================== RCS file: /cvsroot/tuxracer/tuxracer/src/event_select.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** event_select.c 2000/09/29 04:07:14 1.4 --- event_select.c 2000/09/30 16:56:40 1.5 *************** *** 55,59 **** - /*---------------------------------------------------------------------------*/ /*! --- 55,58 ---- *************** *** 481,493 **** } ! switch (key) { ! case 13: /* Enter */ ! continue_click_cb( continue_btn, NULL ); ! ui_set_dirty(); ! break; ! case 27: /* Esc */ ! back_click_cb( back_btn, NULL ); ! ui_set_dirty(); ! break; } --- 480,509 ---- } ! if ( special ) { ! switch( key ) { ! case GLUT_KEY_LEFT: ! listbox_goto_prev_item( event_listbox ); ! break; ! case GLUT_KEY_RIGHT: ! listbox_goto_next_item( event_listbox ); ! break; ! case GLUT_KEY_DOWN: ! listbox_goto_next_item( cup_listbox ); ! break; ! case GLUT_KEY_UP: ! listbox_goto_prev_item( cup_listbox ); ! break; ! } ! } else { ! switch (key) { ! case 13: /* Enter */ ! continue_click_cb( continue_btn, NULL ); ! ui_set_dirty(); ! break; ! case 27: /* Esc */ ! back_click_cb( back_btn, NULL ); ! ui_set_dirty(); ! break; ! } } |
From: Jasmin P. <jf...@us...> - 2000-09-29 14:52:09
|
Update of /cvsroot/tuxracer/tuxracer/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv1709 Modified Files: game_config.c Log Message: Changes to compile under mingw32 Index: game_config.c =================================================================== RCS file: /cvsroot/tuxracer/tuxracer/src/game_config.c,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -r1.30 -r1.31 *** game_config.c 2000/09/29 04:09:59 1.30 --- game_config.c 2000/09/29 14:52:05 1.31 *************** *** 685,691 **** --- 685,699 ---- if ( opendir( config_dir ) == NULL) { + + #if defined(WIN32) && !defined(__CYGWIN__) + if (mkdir( config_dir ) != 0) { + return; + } + #else if (mkdir( config_dir, 0775) != 0) { return; } + #endif + } |
From: Jasmin P. <jf...@us...> - 2000-09-29 04:15:53
|
Update of /cvsroot/tuxracer/tuxracer/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv9632 Modified Files: save.c Log Message: Minor cleanup (set save_stream to NULL after close file Index: save.c =================================================================== RCS file: /cvsroot/tuxracer/tuxracer/src/save.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** save.c 2000/09/25 15:14:58 1.3 --- save.c 2000/09/29 04:15:50 1.4 *************** *** 662,665 **** --- 662,666 ---- perror( "fclose" ); } + save_stream = NULL; } } *************** *** 710,713 **** --- 711,715 ---- perror( "fclose" ); } + save_stream = NULL; } } |
From: Jasmin P. <jf...@us...> - 2000-09-29 04:15:14
|
Update of /cvsroot/tuxracer/tuxracer/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv9059 Modified Files: race_select.c Log Message: - Fixed bug in which a score entered during a failed cup attempt would still be used if better than score during successful cup attempt - Modified messages displayed above score - Move to next race after race is won - Enter starts race, Esc goes back Index: race_select.c =================================================================== RCS file: /cvsroot/tuxracer/tuxracer/src/race_select.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** race_select.c 2000/09/26 14:58:37 1.6 --- race_select.c 2000/09/29 04:15:11 1.7 *************** *** 270,273 **** --- 270,276 ---- { update_score = True; + } else if ( !g_game.practicing && !cup_complete ) { + /* Scores are always overwritten if cup isn't complete */ + update_score = True; } else if ( plyr->score > score ) { update_score = True; *************** *** 468,472 **** race_data_t *race_data; ! msg = "Race won! Your results:"; race_data = (race_data_t*)get_list_elem_data( cur_elem ); --- 471,479 ---- race_data_t *race_data; ! if ( cup_complete ) { ! msg = "Best result:"; ! } else { ! msg = "Race won! Your result:"; ! } race_data = (race_data_t*)get_list_elem_data( cur_elem ); *************** *** 830,834 **** cup_data = NULL; last_completed_race = NULL; - cup_complete = False; event_data = NULL; } else { --- 837,840 ---- *************** *** 851,854 **** --- 857,861 ---- /* Make sure we don't play previously loaded course */ course_loaded = False; + cup_complete = False; /* Initialize the race data */ *************** *** 871,874 **** --- 878,883 ---- g_game.race.snowing = False; } else { + /* Not practicing */ + race_data_t *data; data = (race_data_t*) get_list_elem_data( cur_elem ); *************** *** 889,895 **** --- 898,914 ---- } else { /* Back from a race */ + if ( !g_game.race_aborted ) { + update_race_results(); + } + if (!g_game.practicing && !cup_complete) { if ( was_current_race_won() ) { update_for_won_race(); + + /* Advance to next race */ + if ( cur_elem != get_list_tail( race_list ) ) { + cur_elem = get_next_list_elem( race_list, cur_elem ); + course_loaded = False; + } } else { /* lost race */ *************** *** 898,904 **** print_debug( DEBUG_GAME_LOGIC, "Current lives: %d", plyr->lives ); } - if ( !g_game.race_aborted ) { - update_race_results(); - } } --- 917,920 ---- *************** *** 1068,1071 **** --- 1084,1088 ---- } + update_race_data(); update_button_enabled_states(); *************** *** 1157,1160 **** --- 1174,1198 ---- END_KEYBOARD_CB + START_KEYBOARD_CB( race_select_key_cb ) + { + if ( release ) { + return; + } + + switch (key) { + case 13: /* Enter */ + start_click_cb( start_btn, NULL ); + ui_set_dirty(); + break; + case 27: /* Esc */ + back_click_cb( back_btn, NULL ); + ui_set_dirty(); + break; + } + + ui_check_dirty(); + } + END_KEYBOARD_CB + /*---------------------------------------------------------------------------*/ *************** *** 1172,1175 **** --- 1210,1219 ---- add_keymap_entry( RACE_SELECT, FIXED_KEY, "w", NULL, win_race_key_cb ); + status |= + add_keymap_entry( RACE_SELECT, + DEFAULT_CALLBACK, NULL, NULL, race_select_key_cb ); + + check_assertion( status == 0, + "out of keymap entries" ); register_loop_funcs( RACE_SELECT, |
From: Jasmin P. <jf...@us...> - 2000-09-29 04:13:19
|
Update of /cvsroot/tuxracer/tuxracer/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv7273 Modified Files: phys_sim.c Log Message: - Increased max. frictional force so that rock slows down Tux more (and max speed is probably also reduced). Index: phys_sim.c =================================================================== RCS file: /cvsroot/tuxracer/tuxracer/src/phys_sim.c,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -r1.30 -r1.31 *** phys_sim.c 2000/09/27 15:28:37 1.30 --- phys_sim.c 2000/09/29 04:13:16 1.31 *************** *** 51,55 **** /* Maximum frictional force */ ! #define MAX_FRICTIONAL_FORCE 400 /* Maximum angle by which frictional force is rotated when turning*/ --- 51,55 ---- /* Maximum frictional force */ ! #define MAX_FRICTIONAL_FORCE 800 /* Maximum angle by which frictional force is rotated when turning*/ |
From: Jasmin P. <jf...@us...> - 2000-09-29 04:10:29
|
Update of /cvsroot/tuxracer/tuxracer/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv4428 Modified Files: game_type_select.c Log Message: - Enter enters cup mode, Esc quits. Index: game_type_select.c =================================================================== RCS file: /cvsroot/tuxracer/tuxracer/src/game_type_select.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** game_type_select.c 2000/09/27 15:25:06 1.3 --- game_type_select.c 2000/09/29 04:10:25 1.4 *************** *** 224,231 **** switch( key ) { case 'q': ! case 27: exit(0); break; case 'e': enter_event_click_cb( enter_event_btn, NULL ); break; --- 224,232 ---- switch( key ) { case 'q': ! case 27: /* Esc */ exit(0); break; case 'e': + case 13: /* Enter */ enter_event_click_cb( enter_event_btn, NULL ); break; |
From: Jasmin P. <jf...@us...> - 2000-09-29 04:10:02
|
Update of /cvsroot/tuxracer/tuxracer/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv4044 Modified Files: game_config.c Log Message: Made backspace default reset key. Index: game_config.c =================================================================== RCS file: /cvsroot/tuxracer/tuxracer/src/game_config.c,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -r1.29 -r1.30 *** game_config.c 2000/09/27 15:24:14 1.29 --- game_config.c 2000/09/29 04:09:59 1.30 *************** *** 357,360 **** --- 357,361 ---- struct param brake_key; struct param paddle_key; + struct param reset_key; struct param follow_view_key; struct param behind_view_key; *************** *** 363,367 **** struct param screenshot_key; struct param pause_key; - struct param reset_key; struct param jump_key; --- 364,367 ---- *************** *** 451,455 **** INIT_PARAM_STRING( screenshot_key, "=" ); INIT_PARAM_STRING( pause_key, "p" ); ! INIT_PARAM_STRING( reset_key, "r" ); INIT_PARAM_STRING( jump_key, "e" ); INIT_PARAM_INT( fov, 60 ); --- 451,455 ---- INIT_PARAM_STRING( screenshot_key, "=" ); INIT_PARAM_STRING( pause_key, "p" ); ! INIT_PARAM_STRING( reset_key, "backspace" ); INIT_PARAM_STRING( jump_key, "e" ); INIT_PARAM_INT( fov, 60 ); |
From: Jasmin P. <jf...@us...> - 2000-09-29 04:07:17
|
Update of /cvsroot/tuxracer/tuxracer/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv1390 Modified Files: event_select.c Log Message: - Added labels to event and cup listboxes - Enter moves forward, Esc moves back Index: event_select.c =================================================================== RCS file: /cvsroot/tuxracer/tuxracer/src/event_select.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** event_select.c 2000/09/26 14:56:27 1.3 --- event_select.c 2000/09/29 04:07:14 1.4 *************** *** 191,200 **** cup_listbox, make_point2d( x_org + 52, ! y_org + 115 ) ); listbox_set_position( event_listbox, make_point2d( x_org + 52, ! y_org + 190 ) ); /* --- 191,200 ---- cup_listbox, make_point2d( x_org + 52, ! y_org + 103 ) ); listbox_set_position( event_listbox, make_point2d( x_org + 52, ! y_org + 193 ) ); /* *************** *** 210,213 **** --- 210,214 ---- glBindTexture( GL_TEXTURE_2D, texobj ); + glBegin( GL_QUADS ); { *************** *** 215,220 **** point2d_t ll, ur; ! ll = make_point2d( x_org, y_org + 190 ); ! ur = make_point2d( x_org + 44, y_org + 190 + 44 ); tll = make_point2d( 0, 0 ); tur = make_point2d( 44.0/64.0, 44.0/64.0 ); --- 216,221 ---- point2d_t ll, ur; ! ll = make_point2d( x_org, y_org + 193 ); ! ur = make_point2d( x_org + 44, y_org + 193 + 44 ); tll = make_point2d( 0, 0 ); tur = make_point2d( 44.0/64.0, 44.0/64.0 ); *************** *** 248,253 **** point2d_t ll, ur; ! ll = make_point2d( x_org, y_org + 115 ); ! ur = make_point2d( x_org + 44, y_org + 115 + 44 ); tll = make_point2d( 0, 0 ); tur = make_point2d( 44.0/64.0, 44.0/64.0 ); --- 249,254 ---- point2d_t ll, ur; ! ll = make_point2d( x_org, y_org + 103 ); ! ur = make_point2d( x_org + 44, y_org + 103 + 44 ); tll = make_point2d( 0, 0 ); tur = make_point2d( 44.0/64.0, 44.0/64.0 ); *************** *** 286,289 **** --- 287,321 ---- } + if ( !get_font_binding( "event_and_cup_label", &font ) ) { + print_warning( IMPORTANT_WARNING, + "Couldn't get font for binding menu_label" ); + } else { + bind_font_texture( font ); + string = "Event:"; + get_font_metrics( font, string, &text_width, &asc, &desc ); + + glPushMatrix(); + { + glTranslatef( x_org, + y_org + 193 + 44 + 5 + desc, + 0 ); + + draw_string( font, string ); + } + glPopMatrix(); + + string = "Cup:"; + + glPushMatrix(); + { + glTranslatef( x_org, + y_org + 103 + 44 + 5 + desc, + 0 ); + + draw_string( font, string ); + } + glPopMatrix(); + } + cur_event = listbox_get_current_item( event_listbox ); event_data = (event_data_t*) get_list_elem_data( cur_event ); *************** *** 443,448 **** --- 475,510 ---- } + START_KEYBOARD_CB( event_select_key_cb ) + { + if ( release ) { + return; + } + + switch (key) { + case 13: /* Enter */ + continue_click_cb( continue_btn, NULL ); + ui_set_dirty(); + break; + case 27: /* Esc */ + back_click_cb( back_btn, NULL ); + ui_set_dirty(); + break; + } + + ui_check_dirty(); + } + END_KEYBOARD_CB + void event_select_register() { + int status = 0; + + status |= + add_keymap_entry( EVENT_SELECT, + DEFAULT_CALLBACK, NULL, NULL, event_select_key_cb ); + + check_assertion( status == 0, + "out of keymap entries" ); + register_loop_funcs( EVENT_SELECT, event_select_init, |
From: Jasmin P. <jf...@us...> - 2000-09-29 04:03:35
|
Update of /cvsroot/tuxracer/tuxracer/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv30108 Modified Files: credits.c Log Message: Added fade-in/fade-out. Index: credits.c =================================================================== RCS file: /cvsroot/tuxracer/tuxracer/src/credits.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** credits.c 2000/09/27 16:47:23 1.2 --- credits.c 2000/09/29 04:03:32 1.3 *************** *** 175,179 **** --- 175,209 ---- glRectf( 0, 0, w, CREDITS_MIN_Y ); + glBegin( GL_QUADS ); + { + glVertex2f( 0, CREDITS_MIN_Y ); + glVertex2f( w, CREDITS_MIN_Y ); + glColor4f( ui_background_colour.r, + ui_background_colour.g, + ui_background_colour.b, + 0 ); + glVertex2f( w, CREDITS_MIN_Y + 30 ); + glVertex2f( 0, CREDITS_MIN_Y + 30 ); + } + glEnd(); + + glColor4dv( (scalar_t*)&ui_background_colour ); + glRectf( 0, h+CREDITS_MAX_Y, w, h ); + + glBegin( GL_QUADS ); + { + glVertex2f( w, h+CREDITS_MAX_Y ); + glVertex2f( 0, h+CREDITS_MAX_Y ); + glColor4f( ui_background_colour.r, + ui_background_colour.g, + ui_background_colour.b, + 0 ); + glVertex2f( 0, h+CREDITS_MAX_Y - 30 ); + glVertex2f( w, h+CREDITS_MAX_Y - 30 ); + } + glEnd(); + + glColor4f( 1, 1, 1, 1 ); glEnable( GL_TEXTURE_2D ); |
From: Jasmin P. <jf...@us...> - 2000-09-27 16:48:51
|
Update of /cvsroot/tuxracer/tuxracer/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv26796/src Modified Files: textures.c Log Message: Check maximum texture size supported by card and scale textures to that size if necessary. Index: textures.c =================================================================== RCS file: /cvsroot/tuxracer/tuxracer/src/textures.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** textures.c 2000/09/22 15:28:03 1.8 --- textures.c 2000/09/27 16:48:46 1.9 *************** *** 78,83 **** { IMAGE *texImage; ! texture_node_t *tex;; print_debug(DEBUG_TEXTURE, "Loading texture %s from file: %s", texname, filename); --- 78,85 ---- { IMAGE *texImage; ! texture_node_t *tex; ! int max_texture_size; + print_debug(DEBUG_TEXTURE, "Loading texture %s from file: %s", texname, filename); *************** *** 124,127 **** --- 126,160 ---- glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, get_min_filter() ); + + /* Check if we need to scale image */ + glGetIntegerv( GL_MAX_TEXTURE_SIZE, &max_texture_size ); + if ( texImage->sizeX > max_texture_size || + texImage->sizeY > max_texture_size ) + { + char *newdata = (char*)malloc( texImage->sizeZ * + max_texture_size * + max_texture_size ); + + check_assertion( newdata != NULL, "out of memory" ); + + print_debug( DEBUG_TEXTURE, "Texture `%s' too large -- scaling to " + "maximum allowed size", + filename ); + + /* In the case of large- or small-aspect ratio textures, this + could end up using *more* space... oh well. */ + gluScaleImage( texImage->sizeZ == 3 ? GL_RGB : GL_RGBA, + texImage->sizeX, texImage->sizeY, + GL_UNSIGNED_BYTE, + texImage->data, + max_texture_size, max_texture_size, + GL_UNSIGNED_BYTE, + newdata ); + + free( texImage->data ); + texImage->data = (unsigned char*) newdata; + texImage->sizeX = max_texture_size; + texImage->sizeY = max_texture_size; + } gluBuild2DMipmaps( GL_TEXTURE_2D, texImage->sizeZ, texImage->sizeX, |
From: Jasmin P. <jf...@us...> - 2000-09-27 16:47:26
|
Update of /cvsroot/tuxracer/tuxracer/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv25625/src Modified Files: credits.c Log Message: Added Alan Levy to credits (donated original background images, no longer used) Index: credits.c =================================================================== RCS file: /cvsroot/tuxracer/tuxracer/src/credits.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** credits.c 2000/09/27 15:34:38 1.1 --- credits.c 2000/09/27 16:47:23 1.2 *************** *** 73,76 **** --- 73,77 ---- { "credits_text", "Ingo Ruhnke" }, { "credits_text", "James Barnard" }, + { "credits_text", "Alan Levy" }, { "credits_text", "University of Waterloo Computer Graphics Lab" }, { "credits_text", "" }, |
From: Jasmin P. <jf...@us...> - 2000-09-27 16:46:46
|
Update of /cvsroot/tuxracer/tuxracer In directory slayer.i.sourceforge.net:/tmp/cvs-serv24959 Modified Files: configure.in Log Message: Changed version number Index: configure.in =================================================================== RCS file: /cvsroot/tuxracer/tuxracer/configure.in,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** configure.in 2000/09/26 01:21:33 1.18 --- configure.in 2000/09/27 16:46:38 1.19 *************** *** 1,5 **** dnl Process this file with autoconf to produce a configure script. AC_INIT(src/tuxracer.h) ! AM_INIT_AUTOMAKE(tuxracer, 0.12.1) AM_CONFIG_HEADER(config.h) --- 1,5 ---- dnl Process this file with autoconf to produce a configure script. AC_INIT(src/tuxracer.h) ! AM_INIT_AUTOMAKE(tuxracer, "0.60") AM_CONFIG_HEADER(config.h) |
From: Jasmin P. <jf...@us...> - 2000-09-27 15:35:22
|
Update of /cvsroot/tuxracer/tuxracer/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv1081 Modified Files: Makefile.am Log Message: Added credits.[ch] Index: Makefile.am =================================================================== RCS file: /cvsroot/tuxracer/tuxracer/src/Makefile.am,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** Makefile.am 2000/09/25 13:59:41 1.17 --- Makefile.am 2000/09/27 15:35:18 1.18 *************** *** 21,24 **** --- 21,26 ---- course_render.c \ course_render.h \ + credits.c \ + credits.h \ debug.c \ debug.h \ |
From: Jasmin P. <jf...@us...> - 2000-09-27 15:34:44
|
Update of /cvsroot/tuxracer/tuxracer/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv753 Added Files: credits.c credits.h Log Message: Initial checkin --- NEW FILE --- /* * Tux Racer * Copyright (C) 1999-2000 Jasmin F. Patry * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "tuxracer.h" #include "audio.h" #include "game_config.h" #include "multiplayer.h" #include "gl_util.h" #include "fps.h" #include "render_util.h" #include "phys_sim.h" #include "view.h" #include "course_render.h" #include "tux.h" #include "tux_shadow.h" #include "keyboard.h" #include "loop.h" #include "fog.h" #include "viewfrustum.h" #include "hud.h" #include "game_logic_util.h" #include "fonts.h" #include "ui_mgr.h" #include "ui_theme.h" #define CREDITS_MAX_Y -140 #define CREDITS_MIN_Y 64 typedef struct { char *binding; char *text; } credit_line_t; static credit_line_t credit_lines[] = { { "credits_h1", "Tux Racer" }, { "credits_text", "A Sunspire Studios Production" }, { "credits_text", "www.sunspirestudios.com" }, { "credits_text", "" }, { "credits_h2", "Core Development Team" }, { "credits_text_small", "(Alphabetical Order)" }, { "credits_text", "Patrick \"Pog\" Gilhuly" }, { "credits_text", "Eric \"Monster\" Hall" }, { "credits_text", "Rick Knowles" }, { "credits_text", "Vincent Ma" }, { "credits_text", "Jasmin Patry" }, { "credits_text", "Mark Riddell" }, { "credits_text", "" }, { "credits_h2", "Music" }, { "credits_text", "Joseph Toscano" }, { "credits_text", "" }, { "credits_h2", "Thanks To:" }, { "credits_text_small", "(In No Particular Order)" }, { "credits_text", "Larry Ewing" }, { "credits_text", "Thatcher Ulrich" }, { "credits_text", "Steve Baker" }, { "credits_text", "Ingo Ruhnke" }, { "credits_text", "James Barnard" }, { "credits_text", "University of Waterloo Computer Graphics Lab" }, { "credits_text", "" }, { "credits_text_small", "Tux Racer is a trademark of Jasmin F. Patry" }, { "credits_text_small", "Tux Racer is copyright 1999,2000 Jasmin F. Patry" }, }; static scalar_t y_offset = 0; /*---------------------------------------------------------------------------*/ /*! Returns to the game type select screen \author jfpatry \date Created: 2000-09-27 \date Modified: 2000-09-27 */ static void go_back() { set_game_mode( GAME_TYPE_SELECT ); glutPostRedisplay(); } /*---------------------------------------------------------------------------*/ /*! GLUT mouse callback \author jfpatry \date Created: 2000-09-27 \date Modified: 2000-09-27 */ void mouse_cb( int button, int state, int x, int y ) { if ( state == GLUT_DOWN ) { go_back(); } } /*---------------------------------------------------------------------------*/ /*! Scrolls the credits text up the screen. \author jfpatry \date Created: 2000-09-27 \date Modified: 2000-09-27 */ static void draw_credits_text( scalar_t time_step ) { int w = getparam_x_resolution(); int h = getparam_y_resolution(); font_t *font; int i; scalar_t y; int string_w, asc, desc; y_offset += time_step * 30; y = CREDITS_MIN_Y+y_offset; glPushMatrix(); { glTranslatef( w/2, y, 0 ); for (i=0; i<sizeof( credit_lines ) / sizeof( credit_lines[0] ); i++) { credit_line_t line = credit_lines[i]; if ( !get_font_binding( line.binding, &font ) ) { print_warning( IMPORTANT_WARNING, "Couldn't get font for binding %s", line.binding ); } else { get_font_metrics( font, line.text, &string_w, &asc, &desc ); glTranslatef( 0, -asc, 0 ); y += -asc; glPushMatrix(); { bind_font_texture( font ); glTranslatef( -string_w/2, 0, 0 ); draw_string( font, line.text ); } glPopMatrix(); glTranslatef( 0, -desc, 0 ); y += -desc; } } } glPopMatrix(); if ( y > h+CREDITS_MAX_Y ) { y_offset = 0; } /* Draw strips at the top and bottom to clip out text */ glDisable( GL_TEXTURE_2D ); glColor4dv( (scalar_t*)&ui_background_colour ); glRectf( 0, 0, w, CREDITS_MIN_Y ); glRectf( 0, h+CREDITS_MAX_Y, w, h ); glEnable( GL_TEXTURE_2D ); } static void credits_init() { glutDisplayFunc( main_loop ); glutIdleFunc( main_loop ); glutReshapeFunc( reshape ); glutMouseFunc( mouse_cb ); glutMotionFunc( NULL ); glutPassiveMotionFunc( NULL ); y_offset = 0; play_music( "credits_screen" ); } static void credits_loop( scalar_t time_step ) { int width, height; width = getparam_x_resolution(); height = getparam_y_resolution(); check_gl_error(); update_audio(); clear_rendering_context(); set_gl_options( GUI ); ui_setup_display(); draw_credits_text( time_step ); ui_draw_menu_decorations(); reshape( width, height ); glutSwapBuffers(); } START_KEYBOARD_CB( credits_key_cb ) { if ( !release ) { go_back(); } } END_KEYBOARD_CB void credits_register() { int status = 0; status |= add_keymap_entry( CREDITS, DEFAULT_CALLBACK, NULL, NULL, credits_key_cb ); check_assertion( status == 0, "out of keymap entries" ); register_loop_funcs( CREDITS, credits_init, credits_loop, NULL ); } --- NEW FILE --- /* * Tux Racer * Copyright (C) 1999-2000 Jasmin F. Patry * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef __cplusplus extern "C" { #endif #ifndef CREDITS_H #define CREDITS_H 1 #include "tuxracer.h" void credits_register(); #endif /* CREDITS_H */ #ifdef __cplusplus } /* extern "C" */ #endif /* Emacs Customizations ;;; Local Variables: *** ;;; c-basic-offset:0 *** ;;; End: *** */ /* EOF */ |
From: Jasmin P. <jf...@us...> - 2000-09-27 15:34:11
|
Update of /cvsroot/tuxracer/tuxracer/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv422 Modified Files: tuxracer.h Log Message: Modifications for credits screen, new jumping/flying code Index: tuxracer.h =================================================================== RCS file: /cvsroot/tuxracer/tuxracer/src/tuxracer.h,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** tuxracer.h 2000/09/26 01:23:22 1.23 --- tuxracer.h 2000/09/27 15:34:08 1.24 *************** *** 145,148 **** --- 145,149 ---- PAUSED, RESET, + CREDITS, NUM_GAME_MODES } game_mode_t; *************** *** 220,230 **** bool_t is_braking; /* is player braking? */ bool_t is_paddling; /* is player paddling? */ ! scalar_t paddle_time; /* time player started paddling */ bool_t jumping; - bool_t flying; bool_t jump_charging; scalar_t jump_amt; scalar_t jump_start_time; - scalar_t jump_charge_start_time; bool_t barrel_roll_left; bool_t barrel_roll_right; --- 221,230 ---- bool_t is_braking; /* is player braking? */ bool_t is_paddling; /* is player paddling? */ ! scalar_t paddle_time; ! bool_t begin_jump; bool_t jumping; bool_t jump_charging; scalar_t jump_amt; scalar_t jump_start_time; bool_t barrel_roll_left; bool_t barrel_roll_right; *************** *** 248,251 **** --- 248,252 ---- vector_t net_force; /* net force on player */ vector_t normal_force; /* terrain force on player */ + bool_t airborne; /* is plyr in the air? */ bool_t collision; /* has plyr collided with obstacle? */ control_t control; /* player control data */ |
From: Jasmin P. <jf...@us...> - 2000-09-27 15:32:57
|
Update of /cvsroot/tuxracer/tuxracer/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv32062 Modified Files: tux.c Log Message: - Changed for new jumping/flying code - Removed conditional based on value of tux_slides_on_belly parameter (which has been removed) Index: tux.c =================================================================== RCS file: /cvsroot/tuxracer/tuxracer/src/tux.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** tux.c 2000/09/19 00:32:34 1.10 --- tux.c 2000/09/27 15:32:54 1.11 *************** *** 47,51 **** void adjust_tux_joints( scalar_t turnFact, bool_t isBraking, scalar_t paddling_factor, scalar_t speed, ! vector_t net_force, scalar_t jump_factor ) { scalar_t turning_angle[2] = {0., 0.}; --- 47,51 ---- void adjust_tux_joints( scalar_t turnFact, bool_t isBraking, scalar_t paddling_factor, scalar_t speed, ! vector_t net_force, scalar_t flap_factor ) { scalar_t turning_angle[2] = {0., 0.}; *************** *** 54,61 **** scalar_t kick_paddling_angle = 0.; /* leg kicking during paddling */ scalar_t braking_angle = 0.; - scalar_t belly_corr_fact = getparam_tux_slides_on_belly() ? -1 : 1; scalar_t force_angle = 0.; /* amount that legs move because of force */ scalar_t turn_leg_angle = 0.; /* amount legs move when turning */ ! scalar_t jump_angle = 0.; /* move arms */ --- 54,60 ---- scalar_t kick_paddling_angle = 0.; /* leg kicking during paddling */ scalar_t braking_angle = 0.; scalar_t force_angle = 0.; /* amount that legs move because of force */ scalar_t turn_leg_angle = 0.; /* amount legs move when turning */ ! scalar_t flap_angle = 0.; /* move arms */ *************** *** 75,143 **** turning_angle[1] = max(turnFact,0.0) * MAX_ARM_ANGLE; ! jump_angle = MAX_ARM_ANGLE * (0.5 + 0.5*sin(M_PI*jump_factor*4-M_PI/2)); /* Adjust arms for turning */ rotate_scene_node( tuxLeftShoulderJoint, 'z', ! belly_corr_fact * ! -min( braking_angle + paddling_angle + turning_angle[0], ! MAX_ARM_ANGLE ) + jump_angle ); rotate_scene_node( tuxRightShoulderJoint, 'z', ! belly_corr_fact * ! -min( braking_angle + paddling_angle + turning_angle[1], ! MAX_ARM_ANGLE ) + jump_angle ); ! if ( getparam_tux_slides_on_belly() ) { ! ! /* Adjust arms for paddling */ ! rotate_scene_node( tuxLeftShoulderJoint, 'y', -ext_paddling_angle ); ! rotate_scene_node( tuxRightShoulderJoint, 'y', ext_paddling_angle ); ! ! force_angle = max( -20.0, min( 20.0, -net_force.z / 300.0 ) ); ! turn_leg_angle = turnFact * 10; /* Adjust hip joints */ ! reset_scene_node( tuxLeftHipJoint ); ! rotate_scene_node( tuxLeftHipJoint, 'z', -20 + turn_leg_angle ! + force_angle ); ! reset_scene_node( tuxRightHipJoint ); ! rotate_scene_node( tuxRightHipJoint, 'z', -20 - turn_leg_angle ! + force_angle ); ! /* Adjust knees */ ! reset_scene_node( tuxLeftKneeJoint ); ! rotate_scene_node( tuxLeftKneeJoint, 'z', -10 + turn_leg_angle ! - min( 35, speed ) + kick_paddling_angle ! + force_angle ); ! reset_scene_node( tuxRightKneeJoint ); ! rotate_scene_node( tuxRightKneeJoint, 'z', -10 - turn_leg_angle ! - min( 35, speed ) - kick_paddling_angle ! + force_angle ); ! ! /* Adjust ankles */ ! reset_scene_node( tuxLeftAnkleJoint ); ! rotate_scene_node( tuxLeftAnkleJoint, 'z', -20 + min(50, speed ) ); ! reset_scene_node( tuxRightAnkleJoint ); ! rotate_scene_node( tuxRightAnkleJoint, 'z', -20 + min(50, speed ) ); /* Turn tail */ ! reset_scene_node( tuxTailJoint ); ! rotate_scene_node( tuxTailJoint, 'z', turnFact * 20 ); /* Adjust head and neck */ ! reset_scene_node( tuxNeck ); ! rotate_scene_node( tuxNeck, 'z', -50 ); ! reset_scene_node( tuxHead ); ! rotate_scene_node( tuxHead, 'z', -30 ); /* Turn head when turning */ ! rotate_scene_node( tuxHead, 'y', -turnFact * 70 ); ! } else { ! reset_scene_node( tuxNeck ); ! rotate_scene_node( tuxNeck, 'z', 20 ); ! reset_scene_node( tuxHead ); ! rotate_scene_node( tuxHead, 'z', 20 ); ! } } --- 74,131 ---- turning_angle[1] = max(turnFact,0.0) * MAX_ARM_ANGLE; ! flap_angle = MAX_ARM_ANGLE * (0.5 + 0.5*sin(M_PI*flap_factor*6-M_PI/2)); /* Adjust arms for turning */ rotate_scene_node( tuxLeftShoulderJoint, 'z', ! min( braking_angle + paddling_angle + turning_angle[0], ! MAX_ARM_ANGLE ) + flap_angle ); rotate_scene_node( tuxRightShoulderJoint, 'z', ! min( braking_angle + paddling_angle + turning_angle[1], ! MAX_ARM_ANGLE ) + flap_angle ); + /* Adjust arms for paddling */ + rotate_scene_node( tuxLeftShoulderJoint, 'y', -ext_paddling_angle ); + rotate_scene_node( tuxRightShoulderJoint, 'y', ext_paddling_angle ); ! force_angle = max( -20.0, min( 20.0, -net_force.z / 300.0 ) ); ! turn_leg_angle = turnFact * 10; /* Adjust hip joints */ ! reset_scene_node( tuxLeftHipJoint ); ! rotate_scene_node( tuxLeftHipJoint, 'z', -20 + turn_leg_angle ! + force_angle ); ! reset_scene_node( tuxRightHipJoint ); ! rotate_scene_node( tuxRightHipJoint, 'z', -20 - turn_leg_angle ! + force_angle ); ! /* Adjust knees */ ! reset_scene_node( tuxLeftKneeJoint ); ! rotate_scene_node( tuxLeftKneeJoint, 'z', -10 + turn_leg_angle ! - min( 35, speed ) + kick_paddling_angle ! + force_angle ); ! reset_scene_node( tuxRightKneeJoint ); ! rotate_scene_node( tuxRightKneeJoint, 'z', -10 - turn_leg_angle ! - min( 35, speed ) - kick_paddling_angle ! + force_angle ); ! ! /* Adjust ankles */ ! reset_scene_node( tuxLeftAnkleJoint ); ! rotate_scene_node( tuxLeftAnkleJoint, 'z', -20 + min(50, speed ) ); ! reset_scene_node( tuxRightAnkleJoint ); ! rotate_scene_node( tuxRightAnkleJoint, 'z', -20 + min(50, speed ) ); /* Turn tail */ ! reset_scene_node( tuxTailJoint ); ! rotate_scene_node( tuxTailJoint, 'z', turnFact * 20 ); /* Adjust head and neck */ ! reset_scene_node( tuxNeck ); ! rotate_scene_node( tuxNeck, 'z', -50 ); ! reset_scene_node( tuxHead ); ! rotate_scene_node( tuxHead, 'z', -30 ); /* Turn head when turning */ ! rotate_scene_node( tuxHead, 'y', -turnFact * 70 ); } |
From: Jasmin P. <jf...@us...> - 2000-09-27 15:31:45
|
Update of /cvsroot/tuxracer/tuxracer/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv31114 Modified Files: tcl_util.h Log Message: - Added CHECK_ARG macro to check for existence of argument Index: tcl_util.h =================================================================== RCS file: /cvsroot/tuxracer/tuxracer/src/tcl_util.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** tcl_util.h 2000/09/22 15:49:40 1.5 --- tcl_util.h 2000/09/27 15:31:39 1.6 *************** *** 39,42 **** --- 39,49 ---- #define NEXT_ARG argc -=1; argv += 1 + /* Checks for existence of argument */ + #define CHECK_ARG( name_str, err_string, bail_label ) \ + if ( *argv == NULL ) { \ + (err_string) = "No argument supplied for " name_str; \ + goto bail_label; \ + } + #endif /* _TCL_UTIL_H_ */ *************** *** 44,45 **** --- 51,58 ---- } /* extern "C" */ #endif + + /* Emacs Customizations + ;;; Local Variables: *** + ;;; c-basic-offset:0 *** + ;;; End: *** + */ |
From: Jasmin P. <jf...@us...> - 2000-09-27 15:30:42
|
Update of /cvsroot/tuxracer/tuxracer/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv30326 Modified Files: racing.c Log Message: - Jumping/flying code re-written; jumping is now it's own key, with flying (flapping) tied to paddling key. Index: racing.c =================================================================== RCS file: /cvsroot/tuxracer/tuxracer/src/racing.c,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -r1.29 -r1.30 *** racing.c 2000/09/25 21:21:18 1.29 --- racing.c 2000/09/27 15:30:39 1.30 *************** *** 60,65 **** static bool_t paddling; static bool_t charging; ! static bool_t jumping; ! static bool_t flying; static int last_terrain; --- 60,64 ---- static bool_t paddling; static bool_t charging; ! static scalar_t charge_start_time; static int last_terrain; *************** *** 90,94 **** left_roll = right_roll = False; trick_modifier = False; ! charging = jumping = flying = False; plyr->control.turn_fact = 0.0; plyr->control.turn_animation = 0.0; --- 89,93 ---- left_roll = right_roll = False; trick_modifier = False; ! charging = False; plyr->control.turn_fact = 0.0; plyr->control.turn_animation = 0.0; *************** *** 96,100 **** plyr->control.is_paddling = False; plyr->control.jumping = False; - plyr->control.flying = False; plyr->control.jump_charging = False; --- 95,98 ---- *************** *** 120,127 **** if ( plyr->control.jump_charging ) { plyr->control.jump_amt = min( ! MAX_JUMP_AMT, g_game.time - plyr->control.jump_charge_start_time ); ! } else if ( !plyr->control.jumping || plyr->control.flying ) { ! plyr->control.jump_amt *= max( 0.0, ! 1.0 - time_step/ROLL_DECAY_TIME_CONSTANT ); } } --- 118,128 ---- if ( plyr->control.jump_charging ) { plyr->control.jump_amt = min( ! MAX_JUMP_AMT, g_game.time - charge_start_time ); ! } else if ( plyr->control.jumping ) { ! plyr->control.jump_amt *= ! ( 1.0 - ( g_game.time - plyr->control.jump_start_time ) / ! JUMP_FORCE_DURATION ); ! } else { ! plyr->control.jump_amt = 0; } } *************** *** 160,188 **** setup_fog(); - calc_jump_amt( time_step ); - if ( airborne ) { new_terrain = (1<<NumTerrains); /* - * Flying - */ - if ( charging ) { - if ( !plyr->control.jump_charging ) { - if ( !plyr->control.flying ) { - plyr->control.jump_start_time = g_game.time; - plyr->control.jumping = True; - plyr->control.flying = True; - flying = True; - } - jumping = False; - plyr->control.jump_charging = False; - } - } - if ( jumping ) { - plyr->control.jump_charging = False; - } - - /* * Tricks */ --- 161,168 ---- *************** *** 205,231 **** } else { - - /* - * Jumping - */ - if ( !flying ) { - if ( charging ) { - if ( !plyr->control.jump_charging ) { - plyr->control.jump_charging = True; - plyr->control.jump_charge_start_time = g_game.time; - } - } - if ( jumping ) { - /* play_sound( "jump_sound", 0 ); */ - plyr->control.jump_start_time = g_game.time; - plyr->control.jump_charging = False; - plyr->control.flying = False; - plyr->control.jumping = True; - } - } else { - plyr->control.jump_charging = False; - plyr->control.flying = !jumping; - } - get_surface_type(plyr->pos.x, plyr->pos.z, terrain_weights); if (terrain_weights[Snow] > 0) { --- 185,188 ---- *************** *** 241,244 **** --- 198,217 ---- } + /* + * Jumping + */ + calc_jump_amt( time_step ); + + if ( charging && !plyr->control.jump_charging && !plyr->control.jumping ) { + plyr->control.jump_charging = True; + charge_start_time = g_game.time; + } + + if ( !charging && plyr->control.jump_charging ) { + plyr->control.jump_charging = False; + plyr->control.begin_jump = True; + } + + /* * Turning *************** *** 260,264 **** */ if ( paddling && plyr->control.is_paddling == False ) { - print_debug( DEBUG_CONTROL, "paddling on" ); plyr->control.is_paddling = True; plyr->control.paddle_time = g_game.time; --- 233,236 ---- *************** *** 323,331 **** * Decay Factors */ - if ( jumping ) { - plyr->control.jump_charging = False; - flying = False; - jumping = False; - } if ( !(turning_left ^ turning_right) ) { if ( time_step < ROLL_DECAY_TIME_CONSTANT ) { --- 295,298 ---- *************** *** 504,508 **** { charging = !release; - jumping = release; } END_KEYBOARD_CB --- 471,474 ---- |
From: Jasmin P. <jf...@us...> - 2000-09-27 15:28:40
|
Update of /cvsroot/tuxracer/tuxracer/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv28556 Modified Files: phys_sim.c phys_sim.h Log Message: - Modified flying behaviour (now attached to paddle key) - Removed dependencies on value of tux_slides_on_belly parameter (which has been eliminated) Index: phys_sim.c =================================================================== RCS file: /cvsroot/tuxracer/tuxracer/src/phys_sim.c,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -r1.29 -r1.30 *** phys_sim.c 2000/09/26 14:57:56 1.29 --- phys_sim.c 2000/09/27 15:28:37 1.30 *************** *** 80,84 **** time constants of the filter when tux is on ground and airborne (s) */ #define TUX_ORIENTATION_TIME_CONSTANT 0.14 ! #define TUX_ORIENTATION_AIRBORNE_TIME_CONSTANT 0.8 /* Max particles generated by turning (particles/s) */ --- 80,84 ---- time constants of the filter when tux is on ground and airborne (s) */ #define TUX_ORIENTATION_TIME_CONSTANT 0.14 ! #define TUX_ORIENTATION_AIRBORNE_TIME_CONSTANT 0.5 /* Max particles generated by turning (particles/s) */ *************** *** 193,197 **** /* The distance to move Tux up by so that he doesn't sit too low on the ground (m) */ - #define TUX_Y_CORRECTION 0.23 #define TUX_Y_CORRECTION_ON_STOMACH 0.33 --- 193,196 ---- *************** *** 209,215 **** #define IDEAL_PADDLING_FRIC_COEFF 0.35 - /* Time over which constant jump force is applied */ - #define JUMP_FORCE_DURATION 0.20 - /* G force applied for jump with charge of 0 */ #define BASE_JUMP_G_FORCE 1.5 --- 208,211 ---- *************** *** 605,613 **** plyr->pos = new_pos; ! if ( getparam_tux_slides_on_belly() ) { ! disp_y = new_pos.y + TUX_Y_CORRECTION_ON_STOMACH; ! } else { ! disp_y = new_pos.y + TUX_Y_CORRECTION; ! } tuxRoot = get_tux_root_node(); --- 601,605 ---- plyr->pos = new_pos; ! disp_y = new_pos.y + TUX_Y_CORRECTION_ON_STOMACH; tuxRoot = get_tux_root_node(); *************** *** 963,998 **** char* tux_root; scalar_t time_constant; ! static vector_t z_vec = { 0., 0., 1. }; ! static vector_t minus_y_vec = { 0., -1., 0. }; if ( dist_from_surface > 0 ) { ! ! if ( getparam_tux_slides_on_belly() ) { ! new_y = scale_vector( 1., vel ); ! normalize_vector( &new_y ); ! new_z = project_into_plane( new_y, make_vector(0., -1., 0.) ); ! normalize_vector( &new_z); ! new_z = adjust_tux_zvec_for_roll( plyr, vel, new_z ); ! } else { ! new_y = scale_vector( -1., vel ); ! normalize_vector( &new_y ); ! new_z = project_into_plane( new_y, make_vector(0., 1., 0.) ); ! normalize_vector( &new_z); ! new_z = adjust_tux_zvec_for_roll( plyr, vel, new_z ); ! } ! } else { ! ! if ( getparam_tux_slides_on_belly() ) { ! new_z = scale_vector( -1., surf_nml ); ! new_z = adjust_tux_zvec_for_roll( plyr, vel, new_z ); ! new_y = project_into_plane( surf_nml, scale_vector( 1., vel ) ); ! normalize_vector(&new_y); ! } else { ! new_z = surf_nml; ! new_z = adjust_tux_zvec_for_roll( plyr, vel, new_z ); ! new_y = project_into_plane( surf_nml, scale_vector( -1., vel ) ); ! normalize_vector(&new_y); ! } } --- 955,972 ---- char* tux_root; scalar_t time_constant; ! static vector_t minus_z_vec = { 0., 0., -1. }; ! static vector_t y_vec = { 0., 1., 0. }; if ( dist_from_surface > 0 ) { ! new_y = scale_vector( 1., vel ); ! normalize_vector( &new_y ); ! new_z = project_into_plane( new_y, make_vector(0., -1., 0.) ); ! normalize_vector( &new_z); ! new_z = adjust_tux_zvec_for_roll( plyr, vel, new_z ); } else { ! new_z = scale_vector( -1., surf_nml ); ! new_z = adjust_tux_zvec_for_roll( plyr, vel, new_z ); ! new_y = project_into_plane( surf_nml, scale_vector( 1., vel ) ); ! normalize_vector(&new_y); } *************** *** 1016,1027 **** min( dtime / time_constant, 1.0 ) ); ! plyr->plane_nml = rotate_vector( plyr->orientation, z_vec ); ! plyr->direction = rotate_vector( plyr->orientation, minus_y_vec ); ! ! if ( getparam_tux_slides_on_belly() ) { ! /* Fix up if tux sliding on belly */ ! plyr->plane_nml = scale_vector( -1., plyr->plane_nml ); ! plyr->direction = scale_vector( -1., plyr->direction ); ! } make_matrix_from_quaternion( cob_mat, plyr->orientation ); --- 990,995 ---- min( dtime / time_constant, 1.0 ) ); ! plyr->plane_nml = rotate_vector( plyr->orientation, minus_z_vec ); ! plyr->direction = rotate_vector( plyr->orientation, y_vec ); make_matrix_from_quaternion( cob_mat, plyr->orientation ); *************** *** 1210,1214 **** (rand()/(scalar_t)RAND_MAX-0.50) * 0.15; wind_scale = min( 1.0, max( 0.0, wind_scale ) ); - printf( "%g\n", wind_scale ); } --- 1178,1181 ---- *************** *** 1335,1338 **** --- 1302,1311 ---- dist_from_surface = distance_to_plane( surf_plane, pos ); + if ( dist_from_surface <= 0 ) { + plyr->airborne = False; + } else { + plyr->airborne = True; + } + /* * Calculate normal force *************** *** 1352,1373 **** } /* Apply jump force in up direction for JUMP_FORCE_DURATION */ if ( ( plyr->control.jumping ) && ! ( g_game.time - plyr->control.jump_start_time < JUMP_FORCE_DURATION ) ) { ! if ( plyr->control.flying ) { ! jump_f = make_vector( 0, 50, 0 ); ! } else { ! jump_f = make_vector( ! 0, ! BASE_JUMP_G_FORCE * TUX_MASS * EARTH_GRAV + ! plyr->control.jump_amt * ! (MAX_JUMP_G_FORCE-BASE_JUMP_G_FORCE) * TUX_MASS * EARTH_GRAV, ! 0 ); ! } } else { jump_f = make_vector( 0, 0, 0 ); plyr->control.jumping = False; - plyr->control.flying = False; } --- 1325,1355 ---- } + /* Check if player is trying to jump */ + if ( plyr->control.begin_jump == True ) { + plyr->control.begin_jump = False; + if ( dist_from_surface <= 0 ) { + plyr->control.jumping = True; + plyr->control.jump_start_time = g_game.time; + } else { + plyr->control.jumping = False; + } + } + /* Apply jump force in up direction for JUMP_FORCE_DURATION */ if ( ( plyr->control.jumping ) && ! ( g_game.time - plyr->control.jump_start_time < ! JUMP_FORCE_DURATION ) ) ! { ! jump_f = make_vector( ! 0, ! BASE_JUMP_G_FORCE * TUX_MASS * EARTH_GRAV + ! plyr->control.jump_amt * ! (MAX_JUMP_G_FORCE-BASE_JUMP_G_FORCE) * TUX_MASS * EARTH_GRAV, ! 0 ); ! } else { jump_f = make_vector( 0, 0, 0 ); plyr->control.jumping = False; } *************** *** 1437,1448 **** */ update_paddling( plyr ); ! if ( plyr->control.is_paddling && dist_from_surface <= 0 ) { ! paddling_f = scale_vector( ! -1 * min( MAX_PADDLING_FORCE, ! MAX_PADDLING_FORCE * ! ( MAX_PADDLING_SPEED - speed ) / MAX_PADDLING_SPEED * ! min(1.0, ! surf_fric_coeff/IDEAL_PADDLING_FRIC_COEFF)) , ! fric_dir ); } else { paddling_f = make_vector( 0., 0., 0. ); --- 1419,1435 ---- */ update_paddling( plyr ); ! if ( plyr->control.is_paddling ) { ! if ( plyr->airborne ) { ! paddling_f = make_vector( 0, 0, -TUX_MASS * EARTH_GRAV / 4.0 ); ! paddling_f = rotate_vector( plyr->orientation, paddling_f ); ! } else { ! paddling_f = scale_vector( ! -1 * min( MAX_PADDLING_FORCE, ! MAX_PADDLING_FORCE * ! ( MAX_PADDLING_SPEED - speed ) / MAX_PADDLING_SPEED * ! min(1.0, ! surf_fric_coeff/IDEAL_PADDLING_FRIC_COEFF)) , ! fric_dir ); ! } } else { paddling_f = make_vector( 0., 0., 0. ); *************** *** 1746,1750 **** scalar_t paddling_factor; vector_t local_force; ! scalar_t jump_factor; plane_t surf_plane; scalar_t dist_from_surface; --- 1733,1737 ---- scalar_t paddling_factor; vector_t local_force; ! scalar_t flap_factor; plane_t surf_plane; scalar_t dist_from_surface; *************** *** 1772,1778 **** dist_from_surface, surf_nml ); if ( plyr->control.is_paddling ) { ! paddling_factor = (g_game.time - plyr->control.paddle_time) / ! PADDLING_DURATION; } else { paddling_factor = 0.0; --- 1759,1774 ---- dist_from_surface, surf_nml ); + flap_factor = 0; + if ( plyr->control.is_paddling ) { ! scalar_t factor; ! factor = (g_game.time - plyr->control.paddle_time) / PADDLING_DURATION; ! if ( plyr->airborne ) { ! paddling_factor = 0; ! flap_factor = factor; ! } else { ! paddling_factor = factor; ! flap_factor = 0; ! } } else { paddling_factor = 0.0; *************** *** 1784,1795 **** if (plyr->control.jumping) { ! jump_factor = (g_game.time - plyr->control.jump_start_time) / JUMP_FORCE_DURATION; ! } else { ! jump_factor = 0.0; ! } adjust_tux_joints( plyr->control.turn_animation, plyr->control.is_braking, ! paddling_factor, speed, local_force, jump_factor ); } --- 1780,1789 ---- if (plyr->control.jumping) { ! flap_factor = (g_game.time - plyr->control.jump_start_time) / JUMP_FORCE_DURATION; ! } adjust_tux_joints( plyr->control.turn_animation, plyr->control.is_braking, ! paddling_factor, speed, local_force, flap_factor ); } *************** *** 1827,1835 **** plyr->direction = init_vel; plyr->normal_force = make_vector(0,0,0); plyr->collision = False; plyr->control.jump_amt = 0; plyr->control.is_paddling = False; plyr->control.jumping = False; - plyr->control.flying = False; plyr->control.jump_charging = False; plyr->control.barrel_roll_left = False; --- 1821,1829 ---- plyr->direction = init_vel; plyr->normal_force = make_vector(0,0,0); + plyr->airborne = False; plyr->collision = False; plyr->control.jump_amt = 0; plyr->control.is_paddling = False; plyr->control.jumping = False; plyr->control.jump_charging = False; plyr->control.barrel_roll_left = False; Index: phys_sim.h =================================================================== RCS file: /cvsroot/tuxracer/tuxracer/src/phys_sim.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** phys_sim.h 2000/09/14 01:09:49 1.6 --- phys_sim.h 2000/09/27 15:28:37 1.7 *************** *** 38,41 **** --- 38,44 ---- #define MAX_PADDLING_SPEED ( 60.0 * KM_PER_H_TO_M_PER_SEC ) + /* Time over which constant jump force is applied */ + #define JUMP_FORCE_DURATION 0.20 + void increment_turn_fact( player_data_t *plyr, scalar_t amt ); |
From: Jasmin P. <jf...@us...> - 2000-09-27 15:26:25
|
Update of /cvsroot/tuxracer/tuxracer/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv26616 Modified Files: main.c Log Message: Added call to register credits screen callback Index: main.c =================================================================== RCS file: /cvsroot/tuxracer/tuxracer/src/main.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** main.c 2000/09/25 15:08:51 1.23 --- main.c 2000/09/27 15:26:11 1.24 *************** *** 51,54 **** --- 51,55 ---- #include "event_select.h" #include "save.h" + #include "credits.h" *************** *** 348,351 **** --- 349,353 ---- event_select_register(); race_select_register(); + credits_register(); g_game.mode = NO_MODE; |
From: Jasmin P. <jf...@us...> - 2000-09-27 15:25:10
|
Update of /cvsroot/tuxracer/tuxracer/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv25752 Modified Files: game_type_select.c Log Message: Added a credits button Index: game_type_select.c =================================================================== RCS file: /cvsroot/tuxracer/tuxracer/src/game_type_select.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** game_type_select.c 2000/09/25 14:27:33 1.2 --- game_type_select.c 2000/09/27 15:25:06 1.3 *************** *** 32,35 **** --- 32,36 ---- static button_t *enter_event_btn = NULL; static button_t *practice_btn = NULL; + static button_t *credits_btn = NULL; static button_t *quit_btn = NULL; *************** *** 63,66 **** --- 64,76 ---- } + void credits_click_cb( button_t *button, void *userdata ) + { + check_assertion( userdata == NULL, "userdata is not null" ); + + set_game_mode( CREDITS ); + + ui_set_dirty(); + } + void quit_click_cb( button_t *button, void *userdata ) { *************** *** 72,77 **** static void set_widget_positions() { ! button_t **button_list[3] = { &enter_event_btn, &practice_btn, &quit_btn }; int w = getparam_x_resolution(); --- 82,88 ---- static void set_widget_positions() { ! button_t **button_list[] = { &enter_event_btn, &practice_btn, + &credits_btn, &quit_btn }; int w = getparam_x_resolution(); *************** *** 87,91 **** int cur_y_pos; ! box_height = 170; box_max_y = h - 128; --- 98,102 ---- int cur_y_pos; ! box_height = 210; box_max_y = h - 128; *************** *** 146,149 **** --- 157,168 ---- button_set_click_event_cb( practice_btn, practice_click_cb, NULL ); + credits_btn = button_create( dummy_pos, + 300, 40, + "button_label", + "Credits" ); + button_set_hilit_font_binding( credits_btn, "button_label_hilit" ); + button_set_visible( credits_btn, True ); + button_set_click_event_cb( credits_btn, credits_click_cb, NULL ); + quit_btn = button_create( dummy_pos, 300, 40, *************** *** 187,190 **** --- 206,212 ---- button_delete( practice_btn ); practice_btn = NULL; + + button_delete( credits_btn ); + credits_btn = NULL; button_delete( quit_btn ); |
From: Jasmin P. <jf...@us...> - 2000-09-27 15:24:43
|
Update of /cvsroot/tuxracer/tuxracer/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv25413 Modified Files: game_logic_util.c Log Message: Doubled point value of herring Index: game_logic_util.c =================================================================== RCS file: /cvsroot/tuxracer/tuxracer/src/game_logic_util.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** game_logic_util.c 2000/09/26 14:56:38 1.2 --- game_logic_util.c 2000/09/27 15:24:40 1.3 *************** *** 192,196 **** par_time = g_game.race.time_req[DIFFICULTY_LEVEL_EASY]; plyr->score = max( 0, (int) ( ! 100*(par_time-g_game.time) + 100*plyr->herring ) ); } --- 192,196 ---- par_time = g_game.race.time_req[DIFFICULTY_LEVEL_EASY]; plyr->score = max( 0, (int) ( ! 100*(par_time-g_game.time) + 200*plyr->herring ) ); } |
From: Jasmin P. <jf...@us...> - 2000-09-27 15:24:17
|
Update of /cvsroot/tuxracer/tuxracer/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv25175 Modified Files: game_config.c game_config.h Log Message: Removed "tux_slides_on_belly" parameter (now always slides on belly), changed default sound and music volumes. Index: game_config.c =================================================================== RCS file: /cvsroot/tuxracer/tuxracer/src/game_config.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -r1.28 -r1.29 *** game_config.c 2000/09/19 00:28:20 1.28 --- game_config.c 2000/09/27 15:24:14 1.29 *************** *** 380,384 **** struct param display_fps; - struct param tux_slides_on_belly; struct param course_detail_level; struct param forward_clip_distance; --- 380,383 ---- *************** *** 466,476 **** INIT_PARAM_BOOL( cva_hack, True ); INIT_PARAM_INT( course_detail_level, 75 ); - INIT_PARAM_BOOL( tux_slides_on_belly, True ); INIT_PARAM_BOOL( no_audio, False ); INIT_PARAM_BOOL( sound_enabled, True ); INIT_PARAM_BOOL( music_enabled, True ); ! INIT_PARAM_INT( sound_volume, 255 ); ! INIT_PARAM_INT( music_volume, 255 ); INIT_PARAM_INT( audio_freq_mode, 1 ); INIT_PARAM_INT( audio_format_mode, 1 ); --- 465,474 ---- INIT_PARAM_BOOL( cva_hack, True ); INIT_PARAM_INT( course_detail_level, 75 ); INIT_PARAM_BOOL( no_audio, False ); INIT_PARAM_BOOL( sound_enabled, True ); INIT_PARAM_BOOL( music_enabled, True ); ! INIT_PARAM_INT( sound_volume, 127 ); ! INIT_PARAM_INT( music_volume, 64 ); INIT_PARAM_INT( audio_freq_mode, 1 ); INIT_PARAM_INT( audio_format_mode, 1 ); *************** *** 527,531 **** FN_PARAM_BOOL( use_cva ) FN_PARAM_BOOL( cva_hack ) - FN_PARAM_BOOL( tux_slides_on_belly ) FN_PARAM_BOOL( track_marks ) --- 525,528 ---- Index: game_config.h =================================================================== RCS file: /cvsroot/tuxracer/tuxracer/src/game_config.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** game_config.h 2000/09/22 13:16:54 1.19 --- game_config.h 2000/09/27 15:24:14 1.20 *************** *** 140,145 **** PROTO_PARAM_BOOL( cva_hack ); - PROTO_PARAM_BOOL( tux_slides_on_belly ); - PROTO_PARAM_BOOL( no_audio ); --- 140,143 ---- |
From: Jasmin P. <jf...@us...> - 2000-09-27 15:23:36
|
Update of /cvsroot/tuxracer/tuxracer/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv24683 Modified Files: course_render.c Log Message: Changed rendering of items to use normal vector, if specified. Index: course_render.c =================================================================== RCS file: /cvsroot/tuxracer/tuxracer/src/course_render.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** course_render.c 2000/09/17 19:45:35 1.23 --- course_render.c 2000/09/27 15:23:32 1.24 *************** *** 550,556 **** --- 550,558 ---- int item_type = -1; char * item_name = 0; + item_type_t *item_types; treeLocs = get_tree_locs(); numTrees = get_num_trees(); + item_types = get_item_types(); fwd_clip_limit = getparam_forward_clip_distance(); *************** *** 654,686 **** glPushMatrix(); ! glTranslatef( itemLocs[i].ray.pt.x, itemLocs[i].ray.pt.y, ! itemLocs[i].ray.pt.z ); ! ! itemRadius = itemLocs[i].diam/2.; ! itemHeight = itemLocs[i].height; ! normal = subtract_points( eye_pt, itemLocs[i].ray.pt ); ! normalize_vector( &normal ); ! if (normal.y == 1.0) { ! continue; ! } ! glNormal3f( normal.x, normal.y, normal.z ); ! normal.y = 0.0; ! normalize_vector( &normal ); ! glBegin( GL_QUADS ); ! glTexCoord2f( 0., 0. ); ! glVertex3f( -itemRadius*normal.z, 0.0, itemRadius*normal.x ); ! glTexCoord2f( 1., 0. ); ! glVertex3f( itemRadius*normal.z, 0.0, -itemRadius*normal.x ); ! glTexCoord2f( 1., 1. ); ! glVertex3f( itemRadius*normal.z, itemHeight, -itemRadius*normal.x ); ! glTexCoord2f( 0., 1. ); ! glVertex3f( -itemRadius*normal.z, itemHeight, itemRadius*normal.x ); ! glEnd(); glPopMatrix(); } --- 656,703 ---- glPushMatrix(); ! { ! glTranslatef( itemLocs[i].ray.pt.x, itemLocs[i].ray.pt.y, ! itemLocs[i].ray.pt.z ); ! itemRadius = itemLocs[i].diam/2.; ! itemHeight = itemLocs[i].height; ! if ( item_types[item_type].use_normal ) { ! normal = item_types[item_type].normal; ! } else { ! normal = subtract_points( eye_pt, itemLocs[i].ray.pt ); ! normalize_vector( &normal ); ! } ! if (normal.y == 1.0) { ! continue; ! } ! glNormal3f( normal.x, normal.y, normal.z ); ! normal.y = 0.0; ! normalize_vector( &normal ); ! glBegin( GL_QUADS ); ! { ! glTexCoord2f( 0., 0. ); ! glVertex3f( -itemRadius*normal.z, ! 0.0, ! itemRadius*normal.x ); ! glTexCoord2f( 1., 0. ); ! glVertex3f( itemRadius*normal.z, ! 0.0, ! -itemRadius*normal.x ); ! glTexCoord2f( 1., 1. ); ! glVertex3f( itemRadius*normal.z, ! itemHeight, ! -itemRadius*normal.x ); ! glTexCoord2f( 0., 1. ); ! glVertex3f( -itemRadius*normal.z, ! itemHeight, ! itemRadius*normal.x ); ! } ! glEnd(); ! } glPopMatrix(); } |