Sys Class Reference

Manage window and events. More...

#include <Sys.h>

List of all members.

Public Member Functions

void createWindow (int window_size_x_, int window_size_y_, bool is_fullscreen_, int display_bits_, irr::video::E_DRIVER_TYPE driver_type_, irr::core::stringw title, bool shadows=false, bool createMipMap=true)
 Init Irrlicht device and create window.
 ~Sys ()
void drawScene (void)
 Draw the scene.
void drawScene (void(*f)(void))
 Draw the scene. You can use a "f" function to draw additional elements with draw2DImage,...
void setWindowCaption (irr::core::stringw title)
 Set window caption.
int getFPS (void) const
 Get the approximate value of number of frame per seconds (Nb : it is not the same than irrlicht FPS).
bool waitForReturnKey (void)
 Stop and wait for return key (return true) or escape key (return false). NOT VERY NICE method.
int getWindowSizeX (void) const
 Get window size x in pixels.
int getWindowSizeY (void) const
 Get window size y in pixels.
bool isKeyPressed (void)
 Test if one or several keys are pressed.
bool testIfDriverAlive (void)
 Update events and test if the irrlicht driver is alive.
void printWarning (const char *text)
int getTimerTime (void) const
 Get current 1/1000s time given by an irr::ITimer object.
int addSprite (irr::video::ITexture *tex, irr::core::position2d< irr::s32 > destPosition)
int addSprite (irr::video::ITexture *tex, irr::core::position2d< irr::s32 > destPosition, irr::core::rect< irr::s32 > sourceRect)
 Same than previously, but with a limited part of the source texture.
void setSpritePosition (int id, irr::core::position2d< irr::s32 > newPosition)
 Change sprite position, using its id.
void deleteSprite (int id)
 Delete sprite, using its id (don't delete the texture).

Friends

void initIrrsimple (void)
 init all - first function to call before calling the others


Detailed Description

Manage window and events.


Constructor & Destructor Documentation

Sys::~Sys  ) 
 

Destructor. Drop Irrlicht device


Member Function Documentation

int Sys::addSprite irr::video::ITexture *  tex,
irr::core::position2d< irr::s32 >  destPosition,
irr::core::rect< irr::s32 >  sourceRect
 

Same than previously, but with a limited part of the source texture.

int Sys::addSprite irr::video::ITexture *  tex,
irr::core::position2d< irr::s32 >  destPosition
 

Add 2D sprite to display.

  • Return id number which identify the sprite for future use.
  • You can create several sprites with the same ITexture.

void Sys::createWindow int  window_size_x_,
int  window_size_y_,
bool  is_fullscreen_,
int  display_bits_,
irr::video::E_DRIVER_TYPE  driver_type_,
irr::core::stringw  title,
bool  shadows = false,
bool  createMipMap = true
 

Init Irrlicht device and create window.

Parameters:
window_size_x_  window pixel size x
window_size_y_  window pixel size y
is_fullscreen_  is the window fullscreen mode
display_bits_  display depth (bits)
driver_type_  irrlicht driver type
title  window title
shadows  is the program using shadows
createMipMap  is the program using mipmapped textures

void Sys::deleteSprite int  id  ) 
 

Delete sprite, using its id (don't delete the texture).

void Sys::drawScene void(*)(void)  f  ) 
 

Draw the scene. You can use a "f" function to draw additional elements with draw2DImage,...

void Sys::drawScene void   ) 
 

Draw the scene.

int Sys::getFPS void   )  const
 

Get the approximate value of number of frame per seconds (Nb : it is not the same than irrlicht FPS).

int Sys::getTimerTime void   )  const
 

Get current 1/1000s time given by an irr::ITimer object.

int Sys::getWindowSizeX void   )  const
 

Get window size x in pixels.

int Sys::getWindowSizeY void   )  const
 

Get window size y in pixels.

bool Sys::isKeyPressed void   ) 
 

Test if one or several keys are pressed.

void Sys::printWarning const char *  text  ) 
 

Print an error on the window (doesn't quit) (BETA VERSION, SHOULD NOT BE USED).

void Sys::setSpritePosition int  id,
irr::core::position2d< irr::s32 >  newPosition
 

Change sprite position, using its id.

void Sys::setWindowCaption irr::core::stringw  title  ) 
 

Set window caption.

bool Sys::testIfDriverAlive void   ) 
 

Update events and test if the irrlicht driver is alive.

bool Sys::waitForReturnKey void   ) 
 

Stop and wait for return key (return true) or escape key (return false). NOT VERY NICE method.


Friends And Related Function Documentation

void initIrrsimple void   )  [friend]
 

init all - first function to call before calling the others


The documentation for this class was generated from the following files:
Generated on Sun Aug 6 10:28:53 2006 for irrsimple by  doxygen 1.4.6-NO