Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract common files #313

Open
archseer opened this issue Jul 11, 2013 · 7 comments
Open

Extract common files #313

archseer opened this issue Jul 11, 2013 · 7 comments
Assignees

Comments

@archseer
Copy link
Contributor

Lots of files appear both in code, codemp and codeJK2. If the files are the same, we should extract them into a common place, so that there is no need to apply the same changes to 3 files... This should be a top priority and done as soon as possible, so we reduce the effort needed to maintain these, and so that we get the files in sync as quickly as possible.

For instance, codemp/client/cl_cin.cpp and code/client/cl_cin.cpp are out of sync, which makes the singleplayer break on x64, whilst the same file has been fixed for multiplayer for 2 months.

@ensiform
Copy link
Member

cl_cin.cpp has a lot of stuff thats different in SP than MP so its also harder to try to just merge and be done with it. MP's version is 64-bit and lots of other fixes too. Your cast fix was wrong in there too.

@xycaleth
Copy link
Member

For files which are meant to provide identical functionality between SP and MP, this is fine. The difficulty comes when there are files which provide similar functionality, but not identical ones. What do we do in this case? We could factor out the common code in the similar files, and then put them into a third file but this is messy.

I agree something needs to be done about duplicate code, but I don't think it will be as simple as taking one of the files, and saying this is the one that SP and MP should use.

@ensiform
Copy link
Member

For like eez wanting to have the shared renderer between the two. There is just so much differences that he doesn't seem to get either. Try running diff on sp and mp's renderer folders.... :D

@xycaleth
Copy link
Member

I think the renderers can be merged. They both probably provide some functionality which the other doesn't, and merging them would give the best of both worlds :p It would just be a huge task.

@ensiform
Copy link
Member

Right but SP also does things like saving out ghoul2 data etc :|

@archseer
Copy link
Contributor Author

Ah yes, I didn't go into the cl_cin.cpp code, so that was a bad example.

@ensiform you say my cast was wrong there, yet you don't say what was wrong. I simply made it compilable, and I don't get around the quake source so well, so if you see something I did wrong, go and fix it, it's an open source project after all. You say the MP version is 64bit and fixed, and that's exactly what I want to point out, we want both MP and SP be 64bit and fixed.

For merging, getting an uniform interface for the renderer etc. and just using what's needed in sp and mp would probably be best, however the size of the task may be too large to handle.

@ensiform
Copy link
Member

@mrwonko mrwonko self-assigned this Nov 7, 2015
@mrwonko mrwonko mentioned this issue Mar 25, 2016
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants