Dxtrace_err

This is a discussion on Dxtrace_err within the Game Programming forums, part of the General Programming Boards category; My book uses the file dsutil.h but when I compile my project with this in it I get 79 errors ...

  1. #1
    Registered User
    Join Date
    Nov 2005
    Posts
    545

    Dxtrace_err

    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?

  2. #2
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,479
    Id say your compiler does not support the function. What book is it?
    I'm just trying to be a better person - My Name Is Earl

  3. #3
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    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 01:39 PM.

  4. #4
    Registered User
    Join Date
    Nov 2005
    Posts
    545
    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.

  5. #5
    Registered User
    Join Date
    Nov 2005
    Posts
    545
    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.

  6. #6
    Registered User
    Join Date
    Nov 2005
    Posts
    545
    Oh and the book is Beginning Game Programming By J. S. Harbour.

  7. #7
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    In DirectX speak 9.0b was ages ago. 9.0c has been around for a very long time now.

  8. #8
    Registered User
    Join Date
    Nov 2005
    Posts
    545
    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.

  9. #9
    Registered User
    Join Date
    Nov 2005
    Posts
    545
    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.

  10. #10
    Registered User
    Join Date
    Nov 2005
    Posts
    545
    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.

  11. #11
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    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.

  12. #12
    Registered User
    Join Date
    Nov 2005
    Posts
    545
    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.

  13. #13
    Registered User
    Join Date
    Nov 2005
    Posts
    545
    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.

  14. #14
    Registered User
    Join Date
    Nov 2005
    Posts
    545
    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?

  15. #15
    Registered User
    Join Date
    Nov 2005
    Posts
    545
    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 arguments
    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));
    Those 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.

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21