GameTools gameScreen
Most applications can get by with calling initScreen() with the title of the game as a parameter, then updateScreen() once per frame to swap the double-buffers. getMouse() returns a pointer to a gameMouse structure that contains the current mouse data and getScreen() returns the current screen settings (which you can modify) as a gameScreen pointer:
void initScreen ( const char *title ) ; void updateScreen () ; gameScreen *getScreen () ; gameMouse *getMouse () ;
gameMouse
The gameMouse structure is returned from getMouse() and contains the current position of the cursor, the amount by which it moved this frame and the state of the buttons (use buttons & (1<<PW_LEFT_BUTTON) to query the left mouse button, PW_MIDDLE_BUTTON and PW_RIGHT_BUTTON being the other two):
struct gameMouse { int x ; // Current mouse position int y ; int dx ; // Amount moved this frame int dy ; unsigned int buttons ; // Which buttons are currently pressed down unsigned int lastButtons ; // Which buttons were previously pressed down unsigned int justDownButtons ; // Which buttons were just pressed unsigned int justUpButtons ; // Which buttons were just released } ;
gameScreen
The gameScreen class is created for you inside initScreen(). You can use it to read the most recent keystroke (getKeyStroke()) or to test whether a particular key is being held down right now (isKeyDown()) - and also to set and get the screen dimensions:
class gameScreen { bool isKeyDown ( int k ) ; int getKeyStroke () ; void setScreenSize ( int w, int h ) ; int getScreenWidth () ; int getScreenHeight () ; } ;
Wikiid Pages relating to gameTools (edit) |
gameTools - Main page |
gameTools - Support Tools : |
gameTools - File Formats : |
gameTools - Source Code :
|
Wikiid Pages relating to Lemur of Lima (edit) |
Lemur of Lima - Main page |
Lemur of Lima - Controls |
Lemur of Lima - Levels : |
Lemur of Lima - Java Plugins : |
Lemur of Lima - Source Code Documentation : |