JACoders / OpenJK

Community effort to maintain and improve Jedi Academy (SP & MP) + Jedi Outcast (SP only) released by Raven Software
GNU General Public License v2.0
2.03k stars 614 forks source link

Make the code base compile with a modern GCC #3

Closed astillich closed 11 years ago

astillich commented 11 years ago

I'm currently in the process of doing so in order to be able to compile it on non-windows platforms. Are you guys interested in a contribution?

PythonicChemist commented 11 years ago

what kind of contribution?

astillich commented 11 years ago

Fixed code, in the sense that it compiles with GCC and probably at least an initial linux port. I just read the other ticket and am moving my changes to the codebase in the jedi outcast archive. I also started a cmake based build system.

PythonicChemist commented 11 years ago

I'm sadly no cpp or c guy, but a linux one. I would help out testing once it compiles.

astillich commented 11 years ago

Great, but we're not there yet. ;)

astillich commented 11 years ago

Got a lot of the code to compile (50% of the files included in the project file, which is about 80% of the code). Issues were: function pointer default args, "or" as identifier, MSVC specific (string) functions, include path issues (case, slashes), alignment specifications, inline assembler, c/c++ mixups and some others. Remaining issue is mostly c code including c++ headers which I'll probably fix on the weekend. This may require a rework of the GL stuff. I haven't had a close look at it, and don't know the state of the GLX support, but I'd move context creation to SDL and use glew to handle OpenGL extensions if it's not workable. There currently custom code for that, maybe a solution from another quake based project could be integrated.

eezstreet commented 11 years ago

Fixed, see my fork. (The function pointer default args are fixed, that is)

flibitijibibo commented 11 years ago

I assume it's still loading OpenGL dynamically, but if you need something to handle extensions like GLEW, just use this instead:

https://gist.github.com/flibitijibibo/5270425

For platform-specific GL, you'll probably get more mileage out of SDL2. SDL2 adds a few GL context management functions that would otherwise require some #ifdef hell to get working on all desktop platforms.

On a similar topic, you might also make maintenance/portability easier by replacing the libpng/libjpeg/zlib with stb_image. Updates and knocks out three dependencies in one go.

xycaleth commented 11 years ago

Can this issue be closed now?

eezstreet commented 11 years ago

Go ahead.

Sent from my Windows Phone


From: Alex Lomailto:notifications@github.com Sent: ‎4/‎15/‎2013 6:27 AM To: Razish/OpenJKmailto:OpenJK@noreply.github.com Cc: eezstreetmailto:eezstreet@live.com Subject: Re: [OpenJK] Make the code base compile with a modern GCC (#3)

Can this issue be closed now?


Reply to this email directly or view it on GitHub: https://github.com/Razish/OpenJK/issues/3#issuecomment-16377499

xycaleth commented 11 years ago

MP code builds under GCC; still working on SP.

xycaleth commented 11 years ago

Code compiles under gcc and clang now :)