I bought the same book, the book actually comes with 9c of direct x. to fix the problem just leave out the D3DXSPRITE_ALPHABLEND so it would look like sprite_handler->Begin(); , and the draw function takes 7 parameters now, which are ;
LPDIRECT3DTEXTURE9, RECT, D3DVECTOR2, D3DVECTOR2, FLOAT, D3DVECTOR2, D3DCOLOR
so the code in the book would be changed to
Code:
sprite_handler->Draw(caveman_image, &srcRect, NULL, NULL, 0.0f, &position, D3DCOLOR_XRGB(255,255,255));
also you will need to change the line where you create the position from
Code:
D3DVECTOR3 position((float)caveman.x, (float)caveman.y, 0);
to
Code:
D3DVECTOR2 position((float)caveman.x,(float)caveman.y);
Notice there is no 3rd parameter
This should allow you to compile.