Skip to main content
gamedev.net
🔒 Locked

Missing files?

Started by Shenjoku 2 replies 450+ views
Original Post
Shenjoku
Shenjoku
I am currently trying to program a 2D side scrolling game using DirectX but every time I try to compile it it gives me these messages: game.cpp(97) : error C2065: 'D3DXSPRITE_ALPHABLEND' : undeclared identifier game.cpp(116) : error C2660: 'ID3DXSprite::Draw' : function does not take 5 arguments I have DirectX SDK9 and use Visual Studio version 7.1. For some reason I have no problem running it at my schools computer but when I try it on my home one it won't compile because of these errors. Does anyone know how to fix this? I also have another problem in game that has been annoying me and I have no idea how to fix. While playing what I have so far after the sprites move around the screen for a certain amount of pixels they will suddenly just stop rendering or something. If they stay in one place they will stay there forever but after moving around some the dissapear. Any hints on this one would be nice too :)
Muhammad Haggag
Muhammad Haggag
As for your ID3DXSprite errors, it looks like you're including headers from an old SDK. ID3DXSprite didn't have D3DXSPRITE_ALPHABLEND all the time, and it used to take a different number of parameters (don't remember less or more).

Shenjoku
Shenjoku
ok I got that one out of the way, now I just can't get the D3DXSPRITE_ALPHABLEND one to work. What else is there that I can use that'll have the same effect? It's the only one I know of and it's what they use in the book I'm learning from.

EDIT: nevermind, I finally figured out what my problem was :) Just that whenever the sprite mvoed I changed it's image and I guess I needed to release the old image with each new movement or it gets too clutered and that made it freeze. now I can finally finish this damn thing, yay :) *programs like mad*

[Edited by - Shenjoku on August 28, 2006 12:24:39 PM]
Shenjoku
Shenjoku
Ok now I have a new problem. I got my player to work and my enemy to work as well, but when i try to add more than one enemy it will render perfectly fine and work out all its AI perfectly but the sprite won't animate anymore. Any ideas?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.