1 /* 2 * Tux Racer 3 * Copyright (C) 1999-2001 Jasmin F. Patry 4 * 5 * This program is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU General Public License 7 * as published by the Free Software Foundation; either version 2 8 * of the License, or (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 */ 19 20 #ifdef __cplusplus 21 extern "C" 22 { 23 #endif 24 25 #ifndef COURSE_MGR_H 26 #define COURSE_MGR_H 1 27 28 #include "tuxracer.h" 29 #include "list.h" 30 31 typedef struct event_data_ event_data_t; /* Opaque */ 32 typedef struct cup_data_ cup_data_t; /* Opaque */ 33 34 typedef struct { 35 char *course; 36 char *name; 37 char *description; 38 scalar_t par_time; 39 } open_course_data_t; 40 41 void init_course_manager(); 42 list_t get_open_courses_list( ); 43 list_t get_events_list( ); 44 list_elem_t get_event_by_name( char *event_name ); 45 char* get_event_name( event_data_t *event ); 46 char* get_event_icon_texture_binding( event_data_t *event ); 47 list_t get_event_cup_list( event_data_t *event ); 48 list_elem_t get_event_cup_by_name( event_data_t *event, char *cup_name ); 49 char* get_cup_name( cup_data_t *cup ); 50 char* get_cup_icon_texture_binding( cup_data_t *cup ); 51 list_t get_cup_race_list( cup_data_t *cup ); 52 void register_course_manager_callbacks( Tcl_Interp *ip ); 53 list_elem_t get_last_complete_cup_for_event( event_data_t *event_data ); 54 bool_t is_cup_complete( event_data_t *event_data, list_elem_t cup ); 55 bool_t is_cup_first_incomplete_cup( event_data_t *event_data, 56 list_elem_t cup ); 57 int compare_race_positions( cup_data_t *cup_data, 58 list_elem_t race1, list_elem_t race2 ); 59 60 #endif /* COURSE_MGR_H */ 61 62 #ifdef __cplusplus 63 } /* extern "C" */ 64 #endif 65 66 /* Emacs Customizations 67 ;;; Local Variables: *** 68 ;;; c-basic-offset:0 *** 69 ;;; End: *** 70 */ 71 72 /* EOF */ 73