2 // Interface: player/tux
7 // Author: Tobias Glaesser <tobi.web@gmx.de>, (C) 2003
9 // Copyright: See COPYING file that comes with this distribution
13 #ifndef SUPERTUX_PLAYER_H
14 #define SUPERTUX_PLAYER_H
21 #include "collision.h"
26 #define TUX_SAFE_TIME 750
27 #define TUX_INVINCIBLE_TIME 10000
28 #define TIME_WARNING 20000 /* When to alert player they're low on time! */
30 typedef struct player_keymap_type
40 typedef struct player_input_type
51 typedef struct player_type
53 player_input_type input;
54 player_keymap_type keymap;
65 timer_type invincible_timer;
66 timer_type jump_timer;
67 timer_type skidding_timer;
68 timer_type safe_timer;
72 texture_type tux_life,
73 tux_right[3], tux_left[3],
74 bigtux_right[3], bigtux_left[3],
75 bigtux_right_jump, bigtux_left_jump,
76 ducktux_right, ducktux_left,
77 skidtux_right, skidtux_left,
78 firetux_right[3], firetux_left[3],
79 bigfiretux_right[3], bigfiretux_left[3],
80 bigfiretux_right_jump, bigfiretux_left_jump,
81 duckfiretux_right, duckfiretux_left,
82 skidfiretux_right, skidfiretux_left,
83 cape_right[2], cape_left[2],
84 bigcape_right[2], bigcape_left[2];
86 void player_init(player_type* pplayer);
87 int player_keydown_event(player_type* pplayer, SDLKey key);
88 int player_keyup_event(player_type* pplayer, SDLKey key);
89 void player_level_begin(player_type* pplayer);
90 void player_action(player_type* pplayer);
91 void player_input(player_type* pplayer);
92 void player_grabdistros(player_type *pplayer);
93 void player_draw(player_type* pplayer);
94 void player_collision(player_type* pplayer,void* p_c_object, int c_object);
95 void player_kill(player_type *pplayer, int mode);
96 void player_dying(player_type *pplayer);
97 void player_remove_powerups(player_type *pplayer);
98 void player_keep_in_bounds(player_type *pplayer);
100 #endif /*SUPERTUX_PLAYER_H*/