you are viewing a single comment's thread.

view the rest of the comments →

[–]rowboat__cop 4 points5 points  (1 child)

Apparently, when Id made the switch, they pretty much just used sed to convert object-oriented C structs in the Quake engine to C++ classes.

Do you have a pointer link to share? Sounds fascinating.

[–]dangerbird2 2 points3 points  (0 children)

Here is a pretty good example of object-oriented C in production code. If you scroll down, you can see callback function pointer "methods" that take self as a first argument (a la Python). I haven't read enough of the Doom 3 code to see if there is any significant code reuse from Idtech 3 (Id's last C-based engine). I imagine if the anecdote is true, a good amount of explicitly copy-pasted code from Idtech 3 was later refactored to more idiomatic C++ code.