This is an old revision of the document!
By default Vircon32 uses the keyboard as the gamepad
To use player inputs you need to include input.h
gamepad_direction provides a simple way to read and store player D-Pad inputs
//Initialize variables used to store player input int xDirection; int yDirection; //The addressof operator is used because the gamepad_direction methods changes the value of its inputs gamepad_direction(&xDirection, &yDirection);
The Vircon32 c compiler uses different syntax to gcc, and has more limitations placed on structures. For more information see the quick guide
//declare structure struct exampleStructure { int myVariable; int myValue; }; //declare a variable of type exampleStructure exampleStrucutre somethingUseful; //assign values to each property of variable somethingUseful.myVariable = -30; somethingUseful.myValue = 99;
Bounds checking is the process of checking to make sure a variable remains bounded by some defined limit. In our case, and as is the case for many games, we want to check to see if the character is going to coordinates off-screen so that we can regain the player's perspective and ensure they can still see the playable character.