class Bonhomme20 : public MoreMultiAnim, public CounterContainer

The playing character in game

Inheritance:


Public Classes

enum DirectionId
Moving way
DIR_UP
DIR_DOWN
DIR_LEFT
DIR_RIGHT
NO_DIR
enum IdEtat
State of the Bonhomme20
ETAT_NORMAL
Normal
ETAT_CRAME
Burning
ETAT_BRISE
Falling in ghost
ETAT_REVIT
From burned to normal
ETAT_GRIS
Burned
ETAT_FANTOME
Ghost
ETAT_RESURRECT
Resurrecting (live again !)
ETAT_CHICKEN
Chicken
ETAT_CHICKEN_BRISE
Chicken to ghost
ETAT_TELEPORT
Teleporting

Public Methods

Bonhomme20(Ini& ini, int numeroSection, Bonhomme& bonhomme, Sounder& sounder, TextPainter& textPainter, StripContainer& stripContainer, const PixelPalette& pixelPalette) throw(Exception)
virtual ~Bonhomme20() throw()
void paint(WindowPipe& windowPipe) throw()
void init(int j, int i, int jMult, int iMult, Grille& grille) throw(Exception)
void changeArtificialIntelligence() throw()
const String* getArtificialIntelligenceId() throw()
returns 0 if no AI
void move(int j, int i) throw()
void getSize(int& j, int& i) const throw()
void setLimit(int j, int i, int jSize, int iSize) throw()
void moveUp() throw()
void moveDown() throw()
void moveLeft() throw()
void moveRight() throw()
void doNotMove() throw()
void fire0() throw()
void fire1() throw()
void doNotFire0() throw()
void doNotFire1() throw()
DirectionId getDirection() const throw()
void decNbPose() throw()
void incPuissance() throw()
void incNbTeleport() throw()
void setTraverseMur() throw()
void setSurpuissant() throw()
void setFireDynamite() throw()
void setFireMine() throw()
void setFirePoseMur() throw()
void setChicken() throw()
void setFeuCul() throw()
void setSpeed() throw()
void setInvisible() throw()
void setInvincible() throw()
void setSuperBombe() throw()
void setWin95() throw()
bool setUpNiv() throw()
Says true if was down
bool setDownNiv() throw()
Says true if was up
void cramer() throw()
void cramerIfVivant() throw()
bool setEtatGrisIfMove() throw()
Says true if has moved
bool resurrect() throw()
Says true if was dead
void getPosTolerantAction(int& niv, int j[4], int i[4]) const throw()
The Bonhomme has two groups of test pixels : here, the tolerant (usually the hardly reachable) - for flams
void getPosAction(int& niv, int j[4], int i[4]) const throw()
The Bonhomme has two groups of test pixels : here, the non tolerant (usually the easily reachable) - for options
bool isSuperBombe() const throw()
void decCptDynamitePosed() throw()
IdEtat getEtat() const throw()
const Bonhomme* getBonhomme() const throw()
Pixel getNormalColor() const throw()
void printStrip(const String& s) throw()
void printStrip(PreStrip::Id id) throw()
void paintText(WindowPipe& windowPipe, const String& text) throw()

Protected Classes

enum IdCount
Id for the time counters, to be used with Counter
COUNT_INVISIBLE
COUNT_INVINCIBLE
COUNT_TELEPORT
COUNT_TRAVERSE_MUR
COUNT_SURPUISSANT
COUNT_WIN95
COUNT_FEU_CUL
COUNT_SPEED
COUNT_CHICKEN
enum IdFire
Id for different puts
FIRE_NORMAL
Normal bomb
FIRE_DYNAMITE
Dynamite
FIRE_MINE
Mine
FIRE_MUR
Wall
struct Tlimit
Used for moving
Tji pos
Tji size
struct Tpix
Used for moving
Tji pos[7]
Tji cpt[7]
Tji init[7]
Tji realPos
Tji decalPaint

Protected Fields

Ini* const iniRef
Reference
Bonhomme* const bonhommeRef
Reference
Grille* grilleRef
Reference
Sounder* const sounderRef
Reference
ArtificialIntelligenceContainer* artificialIntelligenceContainer
int soundCrameId
Sound reference, to be used with Sounder
int soundBriseId
int soundChickenDeadId
int soundUpDownId
int soundGetOptionId
int soundWonId
IdEtat etat
State
IdFire specialFire
int initNbBombe
A the beginning (catch in Ini)
int initPuissance
A the beginning (catch in Ini)
int nbBombe
Number of bomb put simultaneously
int puissance
Powerful of bomb
int nbTeleport
int depNormal
Normal speed moving
int depChicken
Chicken speed moving
int depTeleport
Teleport speed moving
int ralentissementWin95
Win95 slowing
int dep
Current speed moving
int tempsGris
Time used with Counter and IdCount : burned
int tempsChicken
Time chicken
int tempsFeuCul
Time "flam leaved"
int tempsSpeed
Time quick moving
int tempsInvincible
Time invincible
int tempsInvisible
Time invisible
int tempsSurpuissant
Time very powerful bombs
int tempsWin95
Time win95
int tempsTraverseMur
Time "pass through the walls"
int tempsCoeur
Time "love hart"
int tempsTeleport
Time teleporting
int cptTempsGris
To count how many times the player has to press keys before wake up
bool invincible
Boolean state
bool invisible
bool surpuissant
bool traverseMur
bool superBombe
bool speed
DirectionId movingDir
Moving way
bool firing0
bool firing1
int nbPose
Amount of puts
int animCenter
Id for the anims, to be used with MultiAnim
int animUp
int animDown
int animLeft
int animRight
int animCrame
int animGris
int animRevit
int animBrise
int animResurrect
int animFantomeCenter
int animFantomeUp
int animFantomeDown
int animFantomeLeft
int animFantomeRight
int animChickenCenter
int animChickenUp
int animChickenDown
int animChickenLeft
int animChickenRight
int animChickenBrise
int animTeleport
int animInvincible
int animSurpuissant
int animWin95
int animTraverseMur
int animTraceBoueUp
int animTraceBoueDown
int animTraceBoueLeft
int animTraceBoueRight
Tji mult
Multiplier (square size)
Tlimit limit
Tji sizeAction
Used by Grille to call or not action() of Case
Tpix pix
Used for moving and painting
int niv
Up or down the walls
int cptDynamitePosed
Used for dynamite
bool blowUpDynamite
Used for dynamite
int nbBombeSaveSurpuissant
List < Leaver* > leaverList
Used to leave animations behind the Bonhomme
Boue* boue
Mud
Trou* trou
Hole when you are killed and irritated !
StripContainer* const stripContainerRef
Used for help (passing strips)
const String* stripUpWall
const String* stripDownWall
const String* stripCrame
const String* stripBrise
const String* stripPicoteDuPainDur
TextPainter* const textPainterRef
Used to paint something...

Protected Methods

void pixMoveUp() throw()
Used for moving
void pixMoveDown() throw()
void pixMoveLeft() throw()
void pixMoveRight() throw()
void privateMoveUp() throw()
Used for moving
void privateMoveDown() throw()
void privateMoveLeft() throw()
void privateMoveRight() throw()
void privateFire0() throw()
void privateFire1() throw()
void reinitAllValues() throw()
Initialisation
void beginOfCount(int value) throw()
To add a new time counter, automatically runned (at the end, CounterContainer calls endOfCount(...)
void endOfCount(int value) throw()
Called by CounterContainer
void addLeaver(CaseId::Id c) throw()
To add easyly a Leaver
void supprLeaver(CaseId::Id c) throw()
void ecraserChicken() throw()
For chicken
void testerEcrasementChicken() throw()

Inherited from MoreMultiAnim:

Public Methods

void virtual reinit() throw()
void virtual onMore(int id) throw(Exception)
void virtual supprMore(int id) throw(Exception)

Protected Fields

List < Anim * > animOnMore

Protected Methods

int virtual virtualWalk() throw()

Inherited from MultiAnim:

Public Methods

void virtual setOn() throw()
void virtual setUppest() throw()
void virtual setTo() throw()
void virtual setUnder() throw()
void virtual setPalette(const PixelPalette& pal) throw()
void virtual keyAction(const Key& key) throw()
void virtual getPos(int& j, int& i) const throw()
int virtual add(Anim& anim) throw()
void virtual on(int id) throw(Exception)
Anim* getAnim(int id) throw(Exception)
void virtual setColor(Pixel col) throw()
void virtual restoreColor() throw()
int getCurrent() throw()

Protected Fields

Anim** tab
int length
Tji pos
Anim* activeAnim
Pixel color
bool colored
bool _on
bool to
bool under
const PixelPalette* pal
int currentAnim
bool uppest

Inherited from Pageable:


Inherited from Walkable:

Public Methods

int walk() throw(Exception)
int getSlow() const throw()
virtual void setSlow(int slow) throw()

Protected Fields

int s
int t
int returnWalk

Inherited from Paintable:


Inherited from Reinitable:


Inherited from Keyable:


Inherited from Activable:

Public Methods

void virtual activate() throw()
void virtual unactivate() throw()
bool virtual isActive() const throw()

Protected Fields

bool active

Inherited from Movable:


Inherited from CounterContainer:

Public Methods

void virtual addLoop(int t, int value) throw()
void virtual reset() throw()
void virtual inc() throw()

Protected Fields

List < Counter* > list

Protected Methods

void supprIfPresent(int value) throw()

Inherited from Countable:


Documentation

The playing character in game. Inheritating from MoreMultiAnim, it can contains a lot of different anims, included very easily (example : an animation ON the Bonhomme20 when invincible). A remark : the name comes from the first animation create for a Bonhomme wich measures 20x20 pixels !
enum DirectionId
Moving way

DIR_UP

DIR_DOWN

DIR_LEFT

DIR_RIGHT

NO_DIR

enum IdEtat
State of the Bonhomme20

ETAT_NORMAL
Normal

ETAT_CRAME
Burning

ETAT_BRISE
Falling in ghost

ETAT_REVIT
From burned to normal

ETAT_GRIS
Burned

ETAT_FANTOME
Ghost

ETAT_RESURRECT
Resurrecting (live again !)

ETAT_CHICKEN
Chicken

ETAT_CHICKEN_BRISE
Chicken to ghost

ETAT_TELEPORT
Teleporting

Ini* const iniRef
Reference

Bonhomme* const bonhommeRef
Reference

Grille* grilleRef
Reference

Sounder* const sounderRef
Reference

ArtificialIntelligenceContainer* artificialIntelligenceContainer

int soundCrameId
Sound reference, to be used with Sounder

int soundBriseId

int soundChickenDeadId

int soundUpDownId

int soundGetOptionId

int soundWonId

enum IdCount
Id for the time counters, to be used with Counter

COUNT_INVISIBLE

COUNT_INVINCIBLE

COUNT_TELEPORT

COUNT_TRAVERSE_MUR

COUNT_SURPUISSANT

COUNT_WIN95

COUNT_FEU_CUL

COUNT_SPEED

COUNT_CHICKEN

enum IdFire
Id for different puts

FIRE_NORMAL
Normal bomb

FIRE_DYNAMITE
Dynamite

FIRE_MINE
Mine

FIRE_MUR
Wall

IdEtat etat
State

IdFire specialFire

int initNbBombe
A the beginning (catch in Ini)

int initPuissance
A the beginning (catch in Ini)

int nbBombe
Number of bomb put simultaneously

int puissance
Powerful of bomb

int nbTeleport

int depNormal
Normal speed moving

int depChicken
Chicken speed moving

int depTeleport
Teleport speed moving

int ralentissementWin95
Win95 slowing

int dep
Current speed moving

int tempsGris
Time used with Counter and IdCount : burned

int tempsChicken
Time chicken

int tempsFeuCul
Time "flam leaved"

int tempsSpeed
Time quick moving

int tempsInvincible
Time invincible

int tempsInvisible
Time invisible

int tempsSurpuissant
Time very powerful bombs

int tempsWin95
Time win95

int tempsTraverseMur
Time "pass through the walls"

int tempsCoeur
Time "love hart"

int tempsTeleport
Time teleporting

int cptTempsGris
To count how many times the player has to press keys before wake up

bool invincible
Boolean state

bool invisible

bool surpuissant

bool traverseMur

bool superBombe

bool speed

DirectionId movingDir
Moving way

bool firing0

bool firing1

int nbPose
Amount of puts

int animCenter
Id for the anims, to be used with MultiAnim

int animUp

int animDown

int animLeft

int animRight

int animCrame

int animGris

int animRevit

int animBrise

int animResurrect

int animFantomeCenter

int animFantomeUp

int animFantomeDown

int animFantomeLeft

int animFantomeRight

int animChickenCenter

int animChickenUp

int animChickenDown

int animChickenLeft

int animChickenRight

int animChickenBrise

int animTeleport

int animInvincible

int animSurpuissant

int animWin95

int animTraverseMur

int animTraceBoueUp

int animTraceBoueDown

int animTraceBoueLeft

int animTraceBoueRight

Tji mult
Multiplier (square size)

struct Tlimit
Used for moving

Tji pos

Tji size

Tlimit limit

Tji sizeAction
Used by Grille to call or not action() of Case

struct Tpix
Used for moving

Tji pos[7]

Tji cpt[7]

Tji init[7]

Tji realPos

Tji decalPaint

Tpix pix
Used for moving and painting

int niv
Up or down the walls

int cptDynamitePosed
Used for dynamite

bool blowUpDynamite
Used for dynamite

int nbBombeSaveSurpuissant

List < Leaver* > leaverList
Used to leave animations behind the Bonhomme

Boue* boue
Mud

Trou* trou
Hole when you are killed and irritated !

StripContainer* const stripContainerRef
Used for help (passing strips)

const String* stripUpWall

const String* stripDownWall

const String* stripCrame

const String* stripBrise

const String* stripPicoteDuPainDur

TextPainter* const textPainterRef
Used to paint something...

void pixMoveUp() throw()
Used for moving

void pixMoveDown() throw()

void pixMoveLeft() throw()

void pixMoveRight() throw()

void privateMoveUp() throw()
Used for moving

void privateMoveDown() throw()

void privateMoveLeft() throw()

void privateMoveRight() throw()

void privateFire0() throw()

void privateFire1() throw()

void reinitAllValues() throw()
Initialisation

void beginOfCount(int value) throw()
To add a new time counter, automatically runned (at the end, CounterContainer calls endOfCount(...)

void endOfCount(int value) throw()
Called by CounterContainer

void addLeaver(CaseId::Id c) throw()
To add easyly a Leaver

void supprLeaver(CaseId::Id c) throw()

void ecraserChicken() throw()
For chicken

void testerEcrasementChicken() throw()

Bonhomme20(Ini& ini, int numeroSection, Bonhomme& bonhomme, Sounder& sounder, TextPainter& textPainter, StripContainer& stripContainer, const PixelPalette& pixelPalette) throw(Exception)

virtual ~Bonhomme20() throw()

void paint(WindowPipe& windowPipe) throw()

void init(int j, int i, int jMult, int iMult, Grille& grille) throw(Exception)

void changeArtificialIntelligence() throw()

const String* getArtificialIntelligenceId() throw()
returns 0 if no AI

void move(int j, int i) throw()

void getSize(int& j, int& i) const throw()

void setLimit(int j, int i, int jSize, int iSize) throw()

void moveUp() throw()

void moveDown() throw()

void moveLeft() throw()

void moveRight() throw()

void doNotMove() throw()

void fire0() throw()

void fire1() throw()

void doNotFire0() throw()

void doNotFire1() throw()

DirectionId getDirection() const throw()

void decNbPose() throw()

void incPuissance() throw()

void incNbTeleport() throw()

void setTraverseMur() throw()

void setSurpuissant() throw()

void setFireDynamite() throw()

void setFireMine() throw()

void setFirePoseMur() throw()

void setChicken() throw()

void setFeuCul() throw()

void setSpeed() throw()

void setInvisible() throw()

void setInvincible() throw()

void setSuperBombe() throw()

void setWin95() throw()

bool setUpNiv() throw()
Says true if was down

bool setDownNiv() throw()
Says true if was up

void cramer() throw()

void cramerIfVivant() throw()

bool setEtatGrisIfMove() throw()
Says true if has moved

bool resurrect() throw()
Says true if was dead

void getPosTolerantAction(int& niv, int j[4], int i[4]) const throw()
The Bonhomme has two groups of test pixels : here, the tolerant (usually the hardly reachable) - for flams
See Also:
Grille

void getPosAction(int& niv, int j[4], int i[4]) const throw()
The Bonhomme has two groups of test pixels : here, the non tolerant (usually the easily reachable) - for options
See Also:
Grille

bool isSuperBombe() const throw()

void decCptDynamitePosed() throw()

IdEtat getEtat() const throw()

const Bonhomme* getBonhomme() const throw()

Pixel getNormalColor() const throw()

void printStrip(const String& s) throw()

void printStrip(PreStrip::Id id) throw()

void paintText(WindowPipe& windowPipe, const String& text) throw()


This class has no child classes.
Author:
David FAUTHOUX
See Also:
Bonhomme
PageGame

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de