00001
#include "players_common.h"
00002
00003
#define STATE_SHIELD 0x00040000
00004
#define STATE_SMALL 0x00200000
00005
#define V_SHIELD 100
00006
#define V_FART -400
00007
00008
#define V_SMALLCHANGE 400
00009
#define DE_JUMP 200
00010
00011
00017 class Olaf :
public Player {
00018
public:
00019
Olaf(Sint16 xpos=0, Sint16 ypos=0,
const ParameterMap& param=ParameterMap());
00020
virtual ~
Olaf();
00021
static ParameterMap default_parameters;
00023
virtual void updateAnimState();
00024
virtual void in_left(Uint16);
00025
virtual void in_right(Uint16);
00027
virtual void in_down();
00029
virtual void in_up();
00031
virtual void in_sp1();
00033
virtual void in_sp2();
00034
virtual void fall(Uint16);
00035
virtual Uint16
hit(Uint16 direction,
Weapon& weap);
00036
private:
00043
inline bool trySmall(
bool small);
00045 EmptyAnimationPtr anim_olaf_small_left;
00046 EmptyAnimationPtr anim_olaf_small_right;
00047 EmptyAnimationPtr anim_olaf_walk_small_left;
00048 EmptyAnimationPtr anim_olaf_walk_small_right;
00049 EmptyAnimationPtr anim_olaf_shield_left;
00050 EmptyAnimationPtr anim_olaf_shield_right;
00051 EmptyAnimationPtr anim_olaf_walk_shield_left;
00052 EmptyAnimationPtr anim_olaf_walk_shield_right;
00053 EmptyAnimationPtr anim_olaf_fall_shield_left;
00054 EmptyAnimationPtr anim_olaf_fall_shield_right;
00056
00057 Mix_Chunk* au_small;
00058 Mix_Chunk* au_big;
00059 Mix_Chunk* au_fart;
00061 Sint16 fart;
00062 SDL_Rect small_size;
00063 SDL_Rect normal_size;
00064 };