Previous Book Contents Book Index Next

Inside Macintosh: Apple Game Sprockets Guide /


Chapter 3 - InputSprocket

InputSprocket is the part of Apple Game Sprockets that your application can use to match up game controls with existing device controls, configure device controls, and track data from device controls.

Before reading about InputSprocket, you should be generally familiar with Apple Game Sprockets, as described in the preface to this book. Both game developers and developers of input devices can benefit from using InputSprocket. This chapter focuses on game applications. Developers of input devices should also consult the driver-specific information found on Apple's Web site.

This chapter begins by describing the basic capabilities of InputSprocket. Then it shows how to use some of those capabilities for such tasks as choosing the best display for your game, creating overlays and underlays, transitioning into the game, double and triple buffered drawing, cleaning up before quitting, and debugging. The section "InputSprocket Reference" (page 3-17), provides a complete reference to the constants, data structures, and functions provided by InputSprocket in the InputSprocket.h file. (The InputSprocketDriver.h file reference is available on Apple's Web site.) For a list of constants, data structures, and functions see the section "Summary of InputSprocket" (page 3-60).

Note
This chapter describes the application programming interfaces supported by versions 1.0 and later of InputSprocket.

Chapter Contents
About InputSprocket
Elements
Device Configuration
Game Configuration
Obtaining Data During Play
Using InputSprocket
Initializing Need Structures and Allocating Virtual Elements
Building an Element List
Processing Input Data During Play
Turning the Keyboard and Mouse On and Off
InputSprocket Reference
Constants
Built-in Device Categories
Built-in Element Kinds
Built-in Element Labels
Button Element Data Information
Directional Pad Element Data Information
Axis Element Data Information
Need Flags
Virtual Element Flag
Element List Flag
Resource Types
Data Structures
Device Definition Structure
Element Information Structure
Button Configuration Information Structure
Directional Pad Configuration Information Structure
Axis Configuration Information Structure
Movement Data Structure
Element Event Data Structure
Need Structure
InputSprocket Functions
Configuring the Application
Obtaining Data From Elements
Managing Element Lists
Resources
The InputSprocket Set Resource
The InputSprocket Set List Resource
Summary of InputSprocket
Constants
Built-in Device Categories
Built-in Element Kinds
Built-in Element Labels
Button Element Data Information
Directional Pad Element Data Information
Axis Element Data Information
Need Flags
Virtual Element Flag
Element List Flag
Resource Types
Data Types
Device Definition Structure
Element Information Structure
Button Configuration Information Structure
Directional Pad Configuration Information Structure
Axis Configuration Information Structure
Movement Data Structure
Element Event Data Structure
Need Structure
InputSprocket Functions
Configuring the Application
Obtaining Data From Elements
Managing Element Lists
Result Codes

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996