Previous Book Contents Book Index Next

Inside Macintosh: Apple Game Sprockets Guide /
Chapter 3 - InputSprocket / InputSprocket Reference
Data Structures


Movement Data Structure

The movement data structure provides data from elements of kind kISpElementKind_Movement. This element kind produces data that is given both as x-y axis data and directional pad data, allowing the game to use whichever is suitable. The movement data structure is defined by the ISpMovementData data type.

typedef struct ISpMovementData {
   UInt32         xAxis;
   UInt32         yAxis;
   UInt32         direction; 
};
Field Description
xAxis
Movement data given in terms of the x-axis of an x-y axis pair.
yAxis
Movement data given in terms of the y-axis of an x-y axis pair.
direction
Movement data given as a direction.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996