Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mac2x

macrumors 65816
Original poster
Sep 19, 2009
1,146
0
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!
 
Last edited:
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!

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?
 
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
http://lists.libsdl.org/pipermail/commits-libsdl.org/2011-August/004236.html said:
void QZ_PumpEvents (_THIS)
{
- CGMouseDelta dx, dy;
+ int32_t dx, dy;

NSDate *distantPast;
NSEvent *event;
@@ -853,7 +919,7 @@
so we have to call the lowlevel window server
function. This is less accurate but works OK.
*/
- CGMouseDelta dx1, dy1;
+ int32_t dx1, dy1;
CGGetLastMouseDelta (&dx1, &dy1);
dx += dx1;
dy += dy1;


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

@@ -1018,8 +1146,6 @@
}
else
QZ_UnsetVideoMode (this, TRUE);
-
- CGPaletteRelease (palette);

if (opengl_library) {
SDL_UnloadObject(opengl_library);
@@ -1096,7 +1222,7 @@

int QZ_SetGammaRamp (_THIS, Uint16 *ramp)
{
- const CGTableCount tableSize = 255;
+ const uint32_t tableSize = 255;


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
 
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.
 
Last edited:
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?
 
I'm not sure. Anyone take a look at the code on github?
 
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.
 
Last edited:
Ok thanks guys, it compiles fine, but I'm getting this error that it can't load default.cfg and it shuts down. Help?
 
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.

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.
 
Which Xcode version do I need to download to get the 10.7 SDK?
 
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?

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.
 
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.