My book uses the file dsutil.h but when I compile my project with this in it I get 79 errors and each one is the DXTRACE_ERR identifier not found. Anybody know how to get rid of this error?
My book uses the file dsutil.h but when I compile my project with this in it I get 79 errors and each one is the DXTRACE_ERR identifier not found. Anybody know how to get rid of this error?
Id say your compiler does not support the function. What book is it?
Double Helix STL
The file is dxutil.h and DXTRACE_ERR AFAIK is part of the DXUT. dxutil.h and d3dfont.h have all been changed and altered to fit the new DXUT framework. They may not work as expected in DX9.0c and many many books are now incorrect in the way they use it b/c they were written before DXUT was really a force to be reckoned with.
Many of my books are incorrect.
I do have older versions of dxutil.h and d3dfont.h if you need them.
DXUT is not a bad framework to start with but it can be a bit initmidating in the way it handles certain items. It does rely heavily on callbacks which I detest since it's impossible to make a callback part of a class w/o making the class function static due to the way that C++ function calls are made. A callback seems more of a C convention that, to me, does not really belong in an object oriented environment b/c there are object oriented ways to achieve the same functionality.
Last edited by VirtualAce; 11-25-2006 at 02:39 PM.
I am using 9.0b that came with the book. But at teh moment I am skipping the sound, but puttinh in the input and game files I get loads of errors.
I hate this, I can't get any of the code to compile. I was going to try and use the framework in my book and then adapt the game code to do what I want to do, but I can't get the examples in the book to ocmpile.
Oh and the book is Beginning Game Programming By J. S. Harbour.
In DirectX speak 9.0b was ages ago. 9.0c has been around for a very long time now.
yes I know, but I dont need to use the latest version for my progams just yet, I just want to have to change code. But it seems that it won't work anyway, has anybody got any insight? Perhaps know the book and knows how to get teh code working or is there anywhere else that will have Direct x Framework type thing that I can use.
Here is a link to the code that I have: www.ultimatefluff.co.uk/code.zip
I aybody could say why it won't compile I would be very grateful. I probably haven't set my compiler up right.
Can anyone give any help on the code front or any issues I might be having with the compiler. I am still getting like 100 errors.
www.moon-labs.com
Both books there are great and available from amazon. He sets up a type of small framework which surprisingly is all you need to start rendering.
I would show you my framework but it would only serve to confuse you. Microsoft has create a framework called DXUT but good luck using it. As with most MS code it is quite confusing and has a lot of triple redundancy error checking that only serves to slow things down.
MS codes for everyone, every possibility, every situation...whereas I feel most games probably do not go this far.
In most instances a failure to allocate a resource or a failure to load a resource is a fatal failure in the game and most games at this point will CTD with some cryptic error message if you are lucky, but normally no message is shown.
I can walk you through the setup here on this thread but it's going to be a bit cumbersome explaining it.
HMMM, those books look good, but all I am interested at the moment is 2D graphics as I dont feel my maths is up to a high enough level for all the calculations and stuff, but I would still like to do Direct_X so that I know a bit about it before I head on up to 3D.
I don't know if I said but what I wanted to do was make a program that shows projectile motion, so you fire out of like a cannon and it shows the motion of the ball as it reaches the ground. Does anybody have ideas of how I can implement this (I have a few) and more importantly know where I can get hold of a working Direct_X framework for 2D applications.
I think most of the error that I have might come from trying to compile it as C++ when it is predominantly C code, is there a way to change MSVC++ Express to compile it as C? Or just take either?
Well with a bit of jiggery pokery I have somehow got it all down to three errors:
Code:error C2065: 'D3DXSPRITE_ALPHABLEND' : undeclared identifier error C2660: 'ID3DXSprite::Draw' : function does not take 5 arguments error C2660: 'ID3DXSprite::Draw' : function does not take 5 argumentsThose are the purpotrating lines of code. Does anybody know what is wrong with them, whether I need to add some more libraries or anything. Thanks.Code:sprite_handler->Begin(D3DXSPRITE_ALPHABLEND); sprite_handler->Draw( ball_image, NULL, NULL, &position, D3DCOLOR_XRGB(255,255,255)); sprite_handler->Draw( paddle_image, NULL, NULL, &position, D3DCOLOR_XRGB(255,255,255));