#include <players_common.h>
Inheritance diagram for Player:


| Public Member Functions | |
| Player (Sint16 xpos=0, Sint16 ypos=0, const ParameterMap ¶m=ParameterMap()) | |
| Frame | getIcon () const | 
| Returns the icon of this Player. | |
| Uint8 | getItemNum () | 
| Returns the current icon number. | |
| Item * | getItem (Uint8 num) | 
| bool | pickupItem (Item *newitem) | 
| Item * | moveItem () | 
| void | removeItem () | 
| Detaches and removes an Item from the item pool. | |
| void | switchItem (bool right=true) | 
| Object * | dropItem () | 
| Detaches an item and adds it back to the ObjectsPool. | |
| virtual void | updateAnimState () | 
| Updates the current animation. | |
| virtual void | idle (Uint16) | 
| virtual void | fall (Uint16) | 
| virtual Uint16 | hit (Uint16 direction, Weapon &weap) | 
| Weapon hits. | |
| virtual void | clearStates (bool reset=false) | 
| virtual void | setEvent (Event *ev) | 
| virtual void | in_right () | 
| Called when using the move right key (right arrow). | |
| virtual void | in_right (Uint16) | 
| virtual void | in_left () | 
| Called when using the move left key (left arrow). | |
| virtual void | in_left (Uint16) | 
| virtual void | in_up () | 
| Called when using the move up key (up arrow). | |
| virtual void | in_up (Uint16) | 
| virtual void | in_down () | 
| Called when using the move down key (down arrow). | |
| virtual void | in_down (Uint16) | 
| virtual void | in_sp1 () | 
| Called when using the special 1 key (space). | |
| virtual void | in_sp2 () | 
| Called when using the special 2 key (left shift). | |
| virtual void | in_act () | 
| Called when using the activation key (enter). | |
| virtual void | in_use () | 
| Called when using the use key (insert). | |
| Static Public Attributes | |
| ParameterMap | default_parameters | 
| Protected Member Functions | |
| virtual void | crash (Uint16 dir=DIR_DOWN) | 
| Called when crashing into a dense object (default: ground). | |
| virtual void | die () | 
| Called when this player dies. | |
| virtual Hit | move (Uint16 dt, bool check=false) | 
| virtual void | addTouch (std::set< Object * > &) | 
| Adds the specified set to the touch set. | |
| virtual void | addEnter (std::set< Object * > &) | 
| virtual void | removeTouch (std::set< Object * > &) | 
| Removes the specified sets from the touch set. | |
| virtual void | removeEnter (std::set< Object * > &) | 
| Removes the specified sets from the enter set. | |
| void | removeItem (Uint8 num) | 
| Item * | moveItem (Uint8 num) | 
| Object * | dropItem (Uint8 num) | 
| Protected Attributes | |
| Item * | items [MAX_ITEMS] | 
| Uint8 | currentitem | 
| Mix_Chunk * | au_hit | 
| Mix_Chunk * | au_land | 
| Mix_Chunk * | au_act | 
| Mix_Chunk * | au_useerror | 
| Mix_Chunk * | au_newitem | 
| Mix_Chunk * | au_die | 
| Mix_Chunk * | au_elec | 
| Mix_Chunk * | au_drown | 
| Mix_Chunk * | au_fire | 
| Mix_Chunk * | au_heal | 
| EmptyAnimationPtr | anim_left | 
| EmptyAnimationPtr | anim_right | 
| EmptyAnimationPtr | anim_rock_left | 
| EmptyAnimationPtr | anim_rock_right | 
| EmptyAnimationPtr | anim_walk_left | 
| EmptyAnimationPtr | anim_walk_right | 
| EmptyAnimationPtr | anim_push_left | 
| EmptyAnimationPtr | anim_push_right | 
| EmptyAnimationPtr | anim_fall_left | 
| EmptyAnimationPtr | anim_fall_right | 
| EmptyAnimationPtr | anim_fall_fast_left | 
| EmptyAnimationPtr | anim_fall_fast_right | 
| EmptyAnimationPtr | anim_crash_left | 
| EmptyAnimationPtr | anim_crash_right | 
| EmptyAnimationPtr | anim_rope_left | 
| EmptyAnimationPtr | anim_rope_right | 
| EmptyAnimationPtr | anim_teleport_left | 
| EmptyAnimationPtr | anim_teleport_right | 
| EmptyAnimationPtr | anim_die_crash_left | 
| EmptyAnimationPtr | anim_die_crash_right | 
| EmptyAnimationPtr | anim_die_burn_left | 
| EmptyAnimationPtr | anim_die_burn_right | 
| EmptyAnimationPtr | anim_die_bones_left | 
| EmptyAnimationPtr | anim_die_bones_right | 
| EmptyAnimationPtr | anim_die_elec_left | 
| EmptyAnimationPtr | anim_die_elec_right | 
| EmptyAnimationPtr | anim_die_spike_left | 
| EmptyAnimationPtr | anim_die_spike_right | 
| EmptyAnimationPtr | anim_die_water_left | 
| EmptyAnimationPtr | anim_die_water_right | 
| EmptyAnimationPtr | anim_fall_middle | 
| EmptyAnimationPtr | anim_climb | 
| EmptyAnimationPtr | anim_bar | 
| 
 | 
| Returns the icon of this Player. 
 
 | 
| 
 | 
| Returns the current icon number. 
 
 | 
| 
 | 
| Inserts a detached Item (usually from the ObjectsPool) and tries to add it to the item pool of this player. 
 | 
| 
 | 
| Detaches an item from the item pool 
 | 
| 
 | 
| Selects a new current item from the item pool 
 | 
| 
 | 
| Updates the current animation. Checks the state and changes the animation correpspondingly Reimplemented from Character. 
 Reimplemented in Olaf. 
 | 
| 
 | 
| What should the object do all the time? This is run first of all. 
 Reimplemented from Character. 
 Reimplemented in Erik, and Scorch. 
 | 
| 
 | 
| Calculates the speed of the character 
 Reimplemented from Character. 
 Reimplemented in Fang, Olaf, and Scorch. 
 | 
| 
 | ||||||||||||
| Weapon hits. Called when hit by a weapon. Depending on the direction and weapon used, certain effects/events are run. 
 
 Reimplemented from Character. 
 Reimplemented in Erik, and Olaf. 
 | 
| 
 | 
| Removes all interactively initiated events and states 
 Reimplemented in Fang, and Scorch. 
 | 
| 
 | 
| Schedules a new event and cancels any currently running event 
 Reimplemented from Object. 
 | 
| 
 | 
| Called when using the activation key (enter). This should be the same for all players. | 
| 
 | 
| Runs Character::addEnter() and tries to pickup any Items it finds 
 Reimplemented from Character. 
 | 
| 
 | 
| Called when crashing into a dense object (default: ground). 
 
 
 Reimplemented from Character. 
 Reimplemented in Erik. 
 | 
| 
 | ||||||||||||
| Updates the position of the character depending on it's velocity, checks for crashes 
 Reimplemented from Character. 
 | 
 1.3.8
 1.3.8