Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
4/8/2010

This code sample is named Donuts2. It is a simple game that demonstrates how to combine DirectDrawand Waveform Audio. Although it demonstrates other DirectX components, it is primarily intended to show how to animate multiple sprites.

Feature Area

Relevant APIs

Usage

To run the code sample
  1. Navigate to the solution file (*.sln), and double-click it. By default, the solution file is copied to the following folder:

    C:\Program Files\Windows Mobile 6.5.3 DTK\Samples\PocketPC\CPP\win32\directx\DDraw\Donuts2

    Microsoft Visual Studio launches and loads the solution.

  2. Build the solution ( Ctrl+Shift+B).

  3. Deploy the solution ( F5).

Using the application

  • Input is from the keyboard. No other input device is supported.

  • The commands are listed on the opening screen. All numbers must be entered from the numeric keypad.

Button Commands

Button Action

Left

Turn left

Right

Turn right

Up

Accelerate forward

Down

Accelerate backward

Application Button 1

Stop

Application Button 2

Shield

Action Fire

Start game

Talk button

Turn audio on/off

End button

Quit

Volume Up

Toggle trailing after-image effect on/off

Volume Down

Toggle frame-rate display on/off

Command-line switches

Switch Description

e

Use software emulation, not hardware acceleration.

t

Test mode, needs no input.

x

Stress mode, never stop if you can help it.

s

Turn sound off/on.

Remarks

It is assumed that your mobile device supports DirectDraw.

This code sample uses less than 1 MB of video RAM.

Development Environments

Pocket PC SDK:Windows Mobile Professional SDK

Development Environment:Visual Studio 2005 or 2008.

ActiveSync:Version 4.5.

See Also