Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: Apple Game Sprockets Guide /


Figures and Listings

Chapter 1 SoundSprocket 1-1

Figure 1-1 The position of the localization component 1-7

Figure 1-2 The position, orientation, and up vector of a listener 1-9

Figure 1-3 The position, orientation, and up vector of a sound source 1-11

Figure 1-4 The angular attenuation cone 1-12

Figure 1-5 Specifying the location of a sound source 1-13

Figure 1-6 Controlling sound output devices 1-16

Listing 1-1 Creating a localized sound channel 1-17

Listing 1-2 Creating a listener 1-20

Listing 1-3 Creating a sound source 1-20

Listing 1-4 Setting up a two-source audio environment 1-21

Listing 1-5 Panning a sound source from right to left 1-22

Listing 1-6 Panning a sound source from right to left 1-23

Chapter 2 DrawSprocket 2-1

Figure 2-1 A context-selection dialog box 2-37

Listing 2-1 Initializing a context attributes structure 2-13

Listing 2-2 Finding the best context 2-14

Listing 2-3 Reserving and activating a context 2-15

Listing 2-4 Creating an underlay 2-16

Listing 2-5 Creating an overlay 2-17

Listing 2-6 Automatically fading the display 2-18

Listing 2-7 Getting the back buffer 2-19

Listing 2-8 Drawing into the buffer 2-19

Listing 2-9 Swapping buffers 2-20

Listing 2-10 Cleaning up 2-21

Listing 2-11 Enabling debug mode 2-22

Chapter 3 InputSprocket 3-1

Listing 3-1 Initializing need structures and allocating virtual elements 3-10

Listing 3-2 Building an element list 3-13

Listing 3-3 Processing input data 3-14

Listing 3-4 Turning off keyboard and mouse devices 3-17

Chapter 4 NetSprocket 4-1

Figure 4-1 Players in a game may have different roles 4-6

Figure 4-2 Players are often in groups 4-7

Figure 4-3 Players use messages to communicate with each other 4-8

Figure 4-4 Modal dialog box for hosting a game 4-10

Figure 4-5 Dialog box for browsing and joining games on AppleTalk 4-11

Figure 4-6 Dialog box for joining a game on a TCP/IP network or serial connection 4-12

Listing 4-1 Initializing NetSprocket 4-13

Listing 4-2 Establishing the Game's Name and Creating a Protocol Reference 4-14

Listing 4-3 Creating a TCP/IP Protocol Reference 4-14

Listing 4-4 Creating a Protocol List 4-15

Listing 4-5 Adding Supporting Protocols to a Protocol List 4-16

Listing 4-6 Displaying the Host Dialog Box 4-16

Listing 4-7 Hosting your game on the Network 4-16

Listing 4-8 Disposing of your Protocol List 4-17

Listing 4-9 Calling the NSpDoModalJoinDialog function 4-17

Listing 4-10 Joining the game 4-18

Listing 4-11 Releasing the address reference 4-18

Listing 4-12 sample game event loop 4-18

Listing 4-13 Sending a message to all players 4-19

Listing 4-14 Terminating the game 4-20


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996




Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help