Sprite Problem

Started by
4 comments, last by Alaric 18 years, 7 months ago
Hi. I have the book Beginning Game Programming by Jonathon Harbour (Thomson Course Technology; Premier Press) and there is some provided code that doesn't compile. I tried to compile one of the programs, and I received the following errors error C2065: "D3DXSPRITE_ALPHABLEND' : identifier undeclared error C2660: "ID3DXSPRITE::Draw' : function does not take 5 arguments the first error comes from the following line sprite_handler->Begin(D3DXSPRITE_ALPHABLEND); the second error comes from the following line sprite_handler->Draw( image, &srcRect, NULL, &position, D3DCOLOR_XRGB(255,255,255)); I'm trying to compile the code using Visual Studio.NET. I've set the following Project Settings Project Properties | Linker | Input | Additional Dependencies - d3d9.lib d3dx9.lib Project Properties | Command Line - "\Dxsdk\Lib\d3d9.lib" "\Dxsdk\Lib\d3dx9.lib" ...Anybody see anything missing? ...Anyone have any idea why these errors might be coming up?
Advertisement
Hi,

Which version of the sdk are you using?

ProgrammingNerd
I'm using DirectX 9.0
Hi,

I should have stated this. Which update are you using, 9.0A, 9.0B, August 2005 version(the latest version)? Because of the changes being made to d3dx, your book could be in 9.0B, yet you could be using the August 2005 version of the sdk, in which ID3DXSprite was rewritten.

Take a look at the documentation. From the looks of things, you are using 9.0B(the only one that used DXSDK as the root).

Sorry I couldn't be more helpful,
ProgrammingNerd
yeah..it's 9.0b.
Anybody have any ideas?

This topic is closed to new replies.

Advertisement