1 | //Initialize DirectX components |
2 | static BOOL DXInit() |
3 | { |
4 | HRESULT hr; |
5 | DDSURFACEDESC ddsd; // Structures needed for Surfaces |
6 | DDSCAPS ddscaps; |
7 | //-----------Set up Direct Play------------------ |
8 | // Get the service provider you want to use |
9 | DirectPlayEnumerate(DirectPlayEnumerateCallback, hwndApp); |
10 | // Create the DirectPlay object |
11 | CreateDirectPlayInterface(); |
12 | // If you want to join a session, find it |
13 | if(joinSession) |
14 | FindSession(); |
15 | // Join/Create a session |
16 | OpenSession(); |
17 | // Create a player |
18 | MakePlayer(); |
19 | DXInit(): |
20 | Initializes & sets up the DirectX |
21 | part of our application |
22 | Setting up |
23 | DirectPlay |
24 | Continued... |