|
TopicsSupport Update Mailing ListTo keep up to date on changes to this page, sign up to be notified of updates using the form below. Incorrect File Pointers in Hour 9 ProjectThe project and desktop files included for the Hour 9 sample on the CD incorrectly point to the source files for the Hour 7 sample. The file included below corrects this. Special thanks to Antonio Sanchez for bringing this to our attention. Error Linking to D3DIM.LIB with DX8 SDK InstalledAfter installing the DirectX 8 SDK, you may recieve the following error when compiling some samples: LINK : fatal error LNK1104: cannot open file "d3dim.lib" This is because the library for Direct3D Immediate Mode (now called DirectGraphics) has been renamed as D3D8.LIB. To correct this, open "Settings..." in the Project menu, and click on the Link tab. Set the Category to "General", and locate the entry in the "Object/library modules" field for D3DIM.LIB, as shown below: Replace this entry with D3D8.LIB, and re-compile. Error Executing Release Build in Hour 5When attempting to run a release build of the Hour 5 sample, you may encounter the following error: This is caused by the working directory in the project settings being an absolute directory. To fix this, go to "Projects..." > "Settings..." and click on the debug tab. Delete the text from the "Working Directory" field and rebuild the application. Media Files for SamplesSome of our readers have the book in electronic format, such as those who purchased the Game Programming Starter Kit. For these readers, I have set up a section containing the media files used by the sample applications. Click Here to go to the media files section Sample Source CodeThe files listed below provide complete source for each chapter. Note that these differ from the other ZIP files linked on this page, which contain only those files needed to patch the sample code. Legacy Source Code UpdatesThe first item to come to my attention is that, while the source code in the book is written around DirectX 7, the source code for Hours 2 through 5 on the accompanying CD-ROM is not. Unfortunately, early versions of my samples that were written prior to availability of a DX 7 beta have made there way onto the disk, and were written under DX 6.1. Below are the updated files required to change these samples over to DX 7. hour2.zip hour3.zip hour4.zip hour5.zip Missing STDAFX files in Hour 3The files STDAFX.H and STDAFX.CPP are missing from the CD-ROM source code for Hour 3. They can be found in the file provided below (identical to file of same name in prior topic). Compiler and Linker Errors in Hour 12 SampleThe sample code in Hour 12 contains the following problems:
The archive below provides the necessary files to correct the sample source code. "CreateSurface FAILED" Error in SamplesSome of the samples (Hours 3-5) using flipping surfaces in DirectDraw may result in the error CreateSurface FAILED. There are actually two places that this message can be generated: 1. If creation of the primary surface through CreateSurface() fails 2. If the call to GetAttachedSurface(), used to retrieve a pointer to the back buffer, fails. To clarify program errors, the updated source code samples on this page separate these into separate error messages. However, if you are receiving this error in the existing samples, chances are this is occurring after the call to GetAttachedSurface(). This is a result of a change in DirectX which requires the contents of the DDSCAPS2 structure to be cleared before use, thus removing undefined data in unused members of the structure. Simply adding a ZeroMemory() call after the structure is first defined will correct this problem: DDSCAPS2 ddscaps; Undeclared Identified DirectInputCreate with DX8 SDK InstalledTo compile source code using previous version of DirectInput under the DirectX 8 SDK, you need to set the constant DIRECTINPUT_VERSION prior to inclusion of the DirectInput header file: #define DIRECTINPUT_VERSION 0x0700 The value of DIRECTINPUT_VERSION can be set to 0x0300, 0x0400, or 0x0700, to indicate the SDK version the code will be compiled for. Where can I find DirectMusic Producer?DirectMusic producer is not installed automatically with the SDK, though it is bundled with the development kit. You can find it on the CD which accompanies the book, in the following directory: \DirectX\DXF\essentls\dmusprod |
Visitors Since 1/1/2000:
|