To illustrate the process of creating a Marmalade extension, we'll take a look at how to add support for gyroscope input. This is a useful addition since it lets us add a whole new input method to our games yet it also demonstrates just how easy it is to extend Marmalade's functionality.
Our extension will consist of the following functions:
Function |
Description |
---|---|
This function is automatically generated for us by the EDK build process. It returns | |
Not all mobile devices actually contain gyroscope hardware, so this function is provided to determine whether or not we can make use of the gyroscope in our game. The function returns a normal C++ | |
These two functions start and stop the hardware generating gyroscope... |