Resolved Doom 3 and 10.9

Discussion in 'Mac Programming' started by mac2x, Dec 8, 2013.

  1. mac2x, Dec 8, 2013
    Last edited: Dec 16, 2013

    mac2x macrumors 65816

    Joined:
    Sep 19, 2009
    #1
    Hi all,

    So (for fun) I forked the OS X port of Doom 3's source code on github. It is claimed to build properly on 10.7. However, it seems to be victim of some deprecations in CoreGraphics in the 10.9 APIs.

    Specifically, the build complains about CGTableCount, CGMouseDelta being an unknown typenames.

    My question is, how can this be fixed? Is it possible to grab the deprecated libraries somewhere and use them?

    Running 10.9 and Xcode 5.0.2.

    Thanks!
     
  2. Catfish_Man macrumors 68030

    Catfish_Man

    Joined:
    Sep 13, 2001
    Location:
    Portland, OR
    #2
    It's a little unclear to me what you're actually running into. At one point you mentioned deprecation, at another point unknown types, which are pretty different things. Could you post the exact errors?
     
  3. Game64 macrumors member

    Joined:
    Jan 21, 2011
    Location:
    Las Vegas, NV
    #3
    I'd have to look at it to be sure (i'm not).

    With the switch to 10.9 there were many changes within OpenGL and GL Code in general. A quick search reveals that this might have been changed even before 10.9 and removed finally in 10.9

    You'll need to replace that portion of code.


    This block in SDL implies you can replace CGMouseDelta with an int32_t; Assuming int32_t is in Doom3

    This block of code in the SDL same Commit show you may be able to replace CGTableCount w/ uint32_t


    IIRC, Doom 3 Uses SDL. So if the errors you're getting are in the SDL Lib Files. Try updating SDL to a version after August 2011
     
  4. mac2x, Dec 9, 2013
    Last edited: Dec 9, 2013

    mac2x thread starter macrumors 65816

    Joined:
    Sep 19, 2009
    #4
    OK, sorry it took so long to get back. Here's the original repo:

    https://github.com/badsector/Doom3-for-MacOSX-

    Basically the error is as follows (Doom 3 > macosx_event.mm, line 184)

    Parse Issue: Unknown type name 'CGMouseDelta'

    and (macosx_sys.h line 29)

    Parse issue: Unknown type name 'CGTableCount'


    I haven't been able to find much, but I did find this:

    https://developer.apple.com/library/mac/releasenotes/General/APIDiffsMacOSX10_9/CoreGraphics.html

    ...which indicates something got deprecated. But I'm definitely no expert.

    --

    Is it possible that all I need to do is target the 10.7 SDK? If so, it doesn't show up in the list.

    Thanks for the SDL angle...I'll look into that.
     
  5. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #5
    Wait, if Doom 3 doesn't run on Mavericks, does that mean that Quake 4 doesn't either? They share the same engine, don't they?
     
  6. mac2x thread starter macrumors 65816

    Joined:
    Sep 19, 2009
    #6
    I'm not sure. Anyone take a look at the code on github?
     
  7. alexbussman, Dec 11, 2013
    Last edited: Dec 11, 2013

    alexbussman macrumors newbie

    Joined:
    Aug 2, 2013
    Location:
    Sweden
    #7
    It compiles fine if you replace:
    CGMouseDelta dx, dy;
    with:
    int32_t dx, dy;

    And the CGTableCount to a uint32, I just typedefed it to
    typedef u_int32_t CGTableCount;

    EDIT:
    Well fine and fine, tons of warnings that should be fixed... but it does compile and link properly otherwise.
     
  8. Why?????? macrumors member

    Joined:
    Dec 6, 2013
    #8
    Ok thanks guys, it compiles fine, but I'm getting this error that it can't load default.cfg and it shuts down. Help?
     
  9. alexbussman macrumors newbie

    Joined:
    Aug 2, 2013
    Location:
    Sweden
    #9
    Pretty sure you need to the config files also when copying the assets from the actual game that you've purchased.
     
  10. gnasher729 macrumors P6

    gnasher729

    Joined:
    Nov 25, 2005
    #10
    It should still build if you switch Xcode to use the 10.7 or possibly the 10.8 SDKs. Xcode uses the latest SDKs by default, and you might have to download the 10.7 SDKs manually, but there's no reason why you couldn't change the default.
     
  11. mac2x thread starter macrumors 65816

    Joined:
    Sep 19, 2009
    #11
    Which Xcode version do I need to download to get the 10.7 SDK?
     
  12. Madd the Sane macrumors 6502

    Madd the Sane

    Joined:
    Nov 8, 2010
    Location:
    Utah
    #12
    Xcode 4.2 or later. You can get it if you have Lion installed.
     
  13. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #13
  14. mac2x thread starter macrumors 65816

    Joined:
    Sep 19, 2009
  15. irnchriz macrumors 65816

    irnchriz

    Joined:
    May 2, 2005
    Location:
    Scotland
    #15
    I bought them both on the App Store ages ago. Downloaded them on my MacBook Pro running 10.9 and they both run fine at max settings.
     
  16. Madd the Sane macrumors 6502

    Madd the Sane

    Joined:
    Nov 8, 2010
    Location:
    Utah
    #16
    The poster was having issues building Doom 3 on Mavericks.
     
  17. mac2x thread starter macrumors 65816

    Joined:
    Sep 19, 2009
    #17
    OK, I grabbed the 10.7 SDK from an old Xcode...thanks chown33. After getting all the 10.7 frameworks linked in, it builds. It has a ton of warnings, but it builds. Fixing that will be part of the fun. :D

    Thanks, all.
     

Share This Page