DDraw and Audio

This code sample is named Donuts2. It is a simple game that demonstrates how to combine DirectDraw and Waveform Audio. Although it demonstrates other DirectX components, it is primarily intended to show how to animate multiple sprites.
-
BITMAP structure
-
CreateCompatibleDC function
-
DDSURFACEDESC structure
-
GetObject function
-
IDirectDraw::CreateSurface function
-
IDirectDrawSurface::GetSurfaceDesc function
-
PAINTSTRUCT structure
-
SelectObject function
-
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 SDK\Samples\PocketPC\CPP\win32\directx\DDraw\Donuts2Microsoft Visual Studio 2005 launches and loads the solution.
-
Build the solution (Ctrl+Shift+B).
-
Deploy the solution (F5).
| 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 |