coeur Class Reference

Main class containing all important call to the irrlicht and a lot of utilities, derive from base. More...

#include <coeur.h>

Inheritance diagram for coeur:
base

List of all members.

Public Member Functions

 coeur ()
 Constructor.
 ~coeur ()
 Destructor.
int init (startmenu *)
 Init the coeur.
int update ()
 Updating (must be call on each loop).
int close ()
 Close the coeur.
int setCaption (stringw)
 Set the title of the window.
IAnimatedMeshSceneNode * addMesh (stringc)
 Add a mesh to irrlicht.
ILightSceneNode * addLight (int)
 Add a light to irrlicht.
ITexture * getTexture (stringc)
 Load a texture.
dimension2d< s32 > getDim ()
 Return the dimension of the window.
actionMeshgetSelectedAction ()
 Return wich actionMesh the user is looking at.
item getItem (int)
 Return an Item from his Id.
actionMeshgetActionMesh (int)
 Return an ActionMesh from his id.
actionMeshgetActionMesh (ISceneNode *)
 Return an ActionMesh from his node.
localItemgetObservationMesh (int)
 Return the localItem of an observationMesh from his id.
localItemgetObservationItem (int)
 Return the localItem of an observationItem from his id.
localItemgetCombinaison ()
 Return the localItem corresponding to a failing combinaison.
position2d< s32 > getCurPos ()
 Return the postion of the cursor.
u32 getTime ()
 Return the current time.
stringc getVersion ()
 Return the version of the soft.
int play (stringc)
 Play a sound.
int anim (int, int, int)
 Launch the animation of an actionMesh.
int setSkyBox (stringc, stringc, stringc, stringc, stringc, stringc)
 Set the skybox.
virtual bool OnEvent (const SEvent &)
 Called when an event occured.
loggergetLogger ()
 Return the pointer to the logger.
int startCredit ()
 Launch the Credit.
int loadChap (int)
 Load a new chapter.
int loadLieu (int)
 Load a new lieu.
int loadLocal (int)
 Load a new local.
IParticleSystemSceneNode * addParticleSystem ()

Public Attributes

ISceneManager * smgr
 The Irrlicht SceneManager.
ICameraSceneNode * cam
 The Camera.

Private Member Functions

ISceneNode * getSelectedNode ()
 Get Selected Node.
void pickNode (ISceneNode *, line3df, f32 &, ISceneNode *&)
 Pick a node.

Private Attributes

IrrlichtDevice * device
 The Irrlicht Device.
IVideoDriver * driver
 The Irrlicht Driver.
IGUIEnvironment * env
 The Irrlicht Envirronement.
E_DRIVER_TYPE dr
 The driver chosen.
dimension2d< s32 > dim
 The dimension chosen.
int bits
 The bits o the window.
bool fullscreen
 Does the render take all the screen.
bool stencilbuffer
 Does it draw the stencil shadow.
bool vsync
 Does the certical synchronisation is activated.
int lang
 Language of the game loaded.
interfacein
 Pointer to the interface class.
consoleco
 Pointer to the console class.
creditmycredit
 Pointer to the credit class.
loggermylogger
bool q
 Set to true if the coeur must be quit.
position2d< s32 > curPos
 Position of the cursor.
std::vector< stringc * > * pathChap
 List containing the path of all the chapters.
std::vector< stringc * > * pathLieu
 List containing the path of all the lieu.
std::vector< stringc * > * pathLocal
 List containing the path of all the local.
chapcurrentChap
 Pointer to the chap class.
lieucurrentLieu
 Pointer to the lieu class.
localcurrentLocal
 Pointer to the local class.
pyIntpy
actionMeshselectedAction
 Pointer to the actionMesh selected.
IMetaTriangleSelector * metaSelector
 Pointer to the metaSelector.
stringc pathGame
 Folder containg all the data of the game.
bool activeScene
 True if the coeur must draw the scene.
bool activeIn
 True if the coeur must draw the interface.

Friends

class console
 The console has all right on this class.
class pyInt
 The python interface has all right on this class.

Detailed Description

Main class containing all important call to the irrlicht and a lot of utilities, derive from base.

This class contain all the reference to the irrlicht and irrklang engine It contains most of the stuff needed by other class. It's the only class who have to be create, all th others are handle by this one, and the xml config file. This is class is configured by two xml files : the config.xml for all basic stuff and the main.xml which is the main config filoe of the game
If you want to know more about the xml configuration see config.xml and main.xml

Definition at line 27 of file coeur.h.


Constructor & Destructor Documentation

coeur::coeur (  ) 

Constructor.

Construct the coeur class, call base::base() and create all the class and initialize some value.

Definition at line 105 of file coeur.cpp.

References bits, co, currentChap, currentLieu, currentLocal, dim, dr, fullscreen, in, lang, mycredit, mylogger, pathChap, pathLieu, pathLocal, py, stencilbuffer, and vsync.

coeur::~coeur (  ) 

Destructor.

Destruct the coeur class, delete all what is needed.

Definition at line 133 of file coeur.cpp.

References co, currentChap, currentLieu, currentLocal, in, mycredit, mylogger, pathChap, pathLieu, pathLocal, and py.


Member Function Documentation

ILightSceneNode * coeur::addLight ( int  radius  ) 

Add a light to irrlicht.

Definition at line 473 of file coeur.cpp.

References smgr.

Referenced by lieu::init().

IAnimatedMeshSceneNode * coeur::addMesh ( stringc  pathm  ) 

Add a mesh to irrlicht.

Definition at line 449 of file coeur.cpp.

References base::log(), metaSelector, and smgr.

Referenced by lieu::addAnimateMesh(), lieu::addObservationMesh(), lieu::addPrendreMesh(), and lieu::addStaticMesh().

IParticleSystemSceneNode * coeur::addParticleSystem (  ) 

Definition at line 670 of file coeur.cpp.

References smgr.

Referenced by interface::init().

int coeur::anim ( int  id,
int  begin,
int  end 
)

Launch the animation of an actionMesh.

Definition at line 643 of file coeur.cpp.

References getActionMesh(), staticMesh::getNode(), metaSelector, and smgr.

Referenced by init(), and interface::OnEvent().

int coeur::close (  )  [virtual]
actionMesh * coeur::getActionMesh ( ISceneNode *  node  ) 

Return an ActionMesh from his node.

Definition at line 613 of file coeur.cpp.

References currentLieu, and lieu::getActionMesh().

actionMesh * coeur::getActionMesh ( int  id  ) 

Return an ActionMesh from his id.

/todo Maybe returning a pointer is not a good idea

Definition at line 608 of file coeur.cpp.

References currentLieu, and lieu::getActionMesh().

Referenced by anim(), BOOST_PYTHON_MODULE(), and update().

localItem * coeur::getCombinaison (  ) 

Return the localItem corresponding to a failing combinaison.

Definition at line 628 of file coeur.cpp.

References currentLocal, and local::getCombinaison().

Referenced by BOOST_PYTHON_MODULE(), and interface::OnEvent().

position2d< s32 > coeur::getCurPos (  ) 

Return the postion of the cursor.

Definition at line 496 of file coeur.cpp.

References curPos.

Referenced by interface::update().

dimension2d< s32 > coeur::getDim (  ) 

Return the dimension of the window.

Definition at line 486 of file coeur.cpp.

References dim.

Referenced by interface::addInventaire(), credit::addLogo(), credit::addText(), BOOST_PYTHON_MODULE(), interface::init(), credit::init(), and interface::update().

item coeur::getItem ( int  id  ) 

Return an Item from his Id.

Definition at line 602 of file coeur.cpp.

References currentChap, and chap::getItemFromId().

Referenced by BOOST_PYTHON_MODULE(), and interface::OnEvent().

logger * coeur::getLogger (  ) 

Return the pointer to the logger.

Definition at line 633 of file coeur.cpp.

References mylogger.

Referenced by base::close(), base::init(), and base::log().

localItem * coeur::getObservationItem ( int  id  ) 

Return the localItem of an observationItem from his id.

Definition at line 623 of file coeur.cpp.

References currentLocal, and local::getObservationItem().

Referenced by BOOST_PYTHON_MODULE(), and interface::OnEvent().

localItem * coeur::getObservationMesh ( int  id  ) 

Return the localItem of an observationMesh from his id.

Definition at line 618 of file coeur.cpp.

References currentLocal, and local::getObservationMesh().

Referenced by BOOST_PYTHON_MODULE(), and interface::OnEvent().

actionMesh * coeur::getSelectedAction (  ) 

Return wich actionMesh the user is looking at.

Definition at line 491 of file coeur.cpp.

References selectedAction.

Referenced by BOOST_PYTHON_MODULE(), interface::OnEvent(), and interface::update().

ISceneNode * coeur::getSelectedNode (  )  [private]

Get Selected Node.

Definition at line 329 of file coeur.cpp.

References curPos, pickNode(), and smgr.

Referenced by update().

ITexture * coeur::getTexture ( stringc  path  ) 

Load a texture.

Definition at line 480 of file coeur.cpp.

References driver, and base::log().

Referenced by inventaire::addItem(), credit::addLogo(), lieu::init(), inventaire::init(), interface::init(), interface::setImage(), and setSkyBox().

u32 coeur::getTime (  ) 

Return the current time.

Definition at line 501 of file coeur.cpp.

References device.

Referenced by BOOST_PYTHON_MODULE(), interface::speak(), and logger::write().

stringc coeur::getVersion (  ) 

Return the version of the soft.

Definition at line 638 of file coeur.cpp.

Referenced by BOOST_PYTHON_MODULE(), and console::help().

int coeur::init ( startmenu cb  ) 
int coeur::loadChap ( int  i  ) 

Load a new chapter.

Definition at line 552 of file coeur.cpp.

References chap::close(), currentChap, device, chap::init(), base::isInit(), loadLieu(), base::log(), and pathChap.

Referenced by BOOST_PYTHON_MODULE(), and init().

int coeur::loadLieu ( int  i  ) 

Load a new lieu.

Definition at line 567 of file coeur.cpp.

References lieu::close(), currentLieu, device, lieu::init(), base::isInit(), base::log(), and pathLieu.

Referenced by loadChap().

int coeur::loadLocal ( int  i  ) 

Load a new local.

Definition at line 580 of file coeur.cpp.

References local::close(), currentLocal, device, local::init(), base::isInit(), base::log(), and pathLocal.

Referenced by init().

bool coeur::OnEvent ( const SEvent &  event  )  [virtual]

Called when an event occured.

Definition at line 516 of file coeur.cpp.

References cam, co, in, mycredit, interface::OnEvent(), credit::OnEvent(), console::OnEvent(), q, and startCredit().

void coeur::pickNode ( ISceneNode *  root,
line3df  ray,
f32 &  outbestdistance,
ISceneNode *&  outbestnode 
) [private]

Pick a node.

Definition at line 341 of file coeur.cpp.

References smgr.

Referenced by getSelectedNode().

int coeur::play ( stringc  path  ) 

Play a sound.

Definition at line 507 of file coeur.cpp.

References base::log(), and pathGame.

Referenced by BOOST_PYTHON_MODULE(), interface::OnEvent(), interface::speak(), and credit::start().

int coeur::setCaption ( stringw  caption  ) 

Set the title of the window.

Definition at line 442 of file coeur.cpp.

References device, and base::log().

Referenced by BOOST_PYTHON_MODULE(), and init().

int coeur::setSkyBox ( stringc  top,
stringc  bottom,
stringc  left,
stringc  right,
stringc  front,
stringc  back 
)

Set the skybox.

Definition at line 663 of file coeur.cpp.

References getTexture(), and smgr.

Referenced by lieu::init().

int coeur::startCredit (  ) 

Launch the Credit.

Definition at line 593 of file coeur.cpp.

References activeIn, activeScene, cam, mycredit, and credit::start().

Referenced by BOOST_PYTHON_MODULE(), and OnEvent().

int coeur::update (  )  [virtual]

Updating (must be call on each loop).

Desc

Returns:

Reimplemented from base.

Definition at line 369 of file coeur.cpp.

References activeIn, activeScene, co, curPos, device, driver, env, getActionMesh(), getSelectedNode(), in, base::log(), mycredit, q, selectedAction, smgr, credit::update(), console::update(), and interface::update().

Referenced by startmenu::startCoeur().


Friends And Related Function Documentation

friend class console [friend]

The console has all right on this class.

Definition at line 118 of file coeur.h.

friend class pyInt [friend]

The python interface has all right on this class.

Definition at line 121 of file coeur.h.


Member Data Documentation

bool coeur::activeIn [private]

True if the coeur must draw the interface.

Definition at line 219 of file coeur.h.

Referenced by init(), startCredit(), and update().

bool coeur::activeScene [private]

True if the coeur must draw the scene.

Definition at line 216 of file coeur.h.

Referenced by init(), startCredit(), and update().

int coeur::bits [private]

The bits o the window.

Definition at line 155 of file coeur.h.

Referenced by coeur(), and init().

ICameraSceneNode* coeur::cam

The Camera.

Definition at line 146 of file coeur.h.

Referenced by init(), OnEvent(), console::position(), console::rotation(), startCredit(), console::target(), and interface::update().

console* coeur::co [private]

Pointer to the console class.

Definition at line 173 of file coeur.h.

Referenced by close(), coeur(), init(), OnEvent(), update(), and ~coeur().

position2d<s32> coeur::curPos [private]

Position of the cursor.

Definition at line 184 of file coeur.h.

Referenced by getCurPos(), getSelectedNode(), and update().

Pointer to the chap class.

Definition at line 196 of file coeur.h.

Referenced by close(), coeur(), getItem(), console::init(), loadChap(), and ~coeur().

Pointer to the lieu class.

Definition at line 199 of file coeur.h.

Referenced by close(), coeur(), getActionMesh(), loadLieu(), and ~coeur().

Pointer to the local class.

Definition at line 202 of file coeur.h.

Referenced by close(), coeur(), getCombinaison(), getObservationItem(), getObservationMesh(), console::init(), init(), loadLocal(), and ~coeur().

IrrlichtDevice* coeur::device [private]

The Irrlicht Device.

Definition at line 134 of file coeur.h.

Referenced by close(), getTime(), init(), loadChap(), loadLieu(), loadLocal(), setCaption(), and update().

dimension2d<s32> coeur::dim [private]

The dimension chosen.

Definition at line 152 of file coeur.h.

Referenced by coeur(), getDim(), and init().

E_DRIVER_TYPE coeur::dr [private]

The driver chosen.

Definition at line 149 of file coeur.h.

Referenced by coeur(), and init().

IVideoDriver* coeur::driver [private]

The Irrlicht Driver.

Definition at line 137 of file coeur.h.

Referenced by getTexture(), init(), and update().

IGUIEnvironment* coeur::env [private]

The Irrlicht Envirronement.

Definition at line 143 of file coeur.h.

Referenced by init(), and update().

bool coeur::fullscreen [private]

Does the render take all the screen.

Definition at line 158 of file coeur.h.

Referenced by coeur(), and init().

interface* coeur::in [private]

Pointer to the interface class.

Definition at line 170 of file coeur.h.

Referenced by close(), coeur(), console::init(), init(), OnEvent(), update(), and ~coeur().

int coeur::lang [private]

Language of the game loaded.

Definition at line 167 of file coeur.h.

Referenced by coeur(), and init().

IMetaTriangleSelector* coeur::metaSelector [private]

Pointer to the metaSelector.

Definition at line 210 of file coeur.h.

Referenced by addMesh(), anim(), and init().

credit* coeur::mycredit [private]

Pointer to the credit class.

Definition at line 176 of file coeur.h.

Referenced by close(), coeur(), console::init(), init(), OnEvent(), startCredit(), update(), and ~coeur().

logger* coeur::mylogger [private]

Definition at line 178 of file coeur.h.

Referenced by close(), coeur(), getLogger(), init(), and ~coeur().

std::vector<stringc*>* coeur::pathChap [private]

List containing the path of all the chapters.

Definition at line 187 of file coeur.h.

Referenced by close(), coeur(), init(), loadChap(), and ~coeur().

stringc coeur::pathGame [private]

Folder containg all the data of the game.

Definition at line 213 of file coeur.h.

Referenced by init(), and play().

std::vector<stringc*>* coeur::pathLieu [private]

List containing the path of all the lieu.

Definition at line 190 of file coeur.h.

Referenced by close(), coeur(), init(), loadLieu(), and ~coeur().

std::vector<stringc*>* coeur::pathLocal [private]

List containing the path of all the local.

Definition at line 193 of file coeur.h.

Referenced by close(), coeur(), init(), loadLocal(), and ~coeur().

pyInt* coeur::py [private]

Definition at line 204 of file coeur.h.

Referenced by console::close(), close(), coeur(), console::init(), init(), console::OnEvent(), and ~coeur().

bool coeur::q [private]

Set to true if the coeur must be quit.

Definition at line 181 of file coeur.h.

Referenced by init(), OnEvent(), console::quit(), and update().

Pointer to the actionMesh selected.

Definition at line 207 of file coeur.h.

Referenced by getSelectedAction(), init(), and update().

ISceneManager* coeur::smgr

The Irrlicht SceneManager.

Definition at line 140 of file coeur.h.

Referenced by addLight(), addMesh(), addParticleSystem(), anim(), getSelectedNode(), init(), pickNode(), setSkyBox(), interface::update(), and update().

bool coeur::stencilbuffer [private]

Does it draw the stencil shadow.

Definition at line 161 of file coeur.h.

Referenced by coeur(), and init().

bool coeur::vsync [private]

Does the certical synchronisation is activated.

Definition at line 164 of file coeur.h.

Referenced by coeur(), and init().


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Enumerations Enumerator Friends

Generated on Wed Sep 9 18:20:15 2009 for The Merry Turnip by  doxygen 1.6.1