-
Notifications
You must be signed in to change notification settings - Fork 920
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
Convert sorm.h to c-style #465
Conversation
The struct definitions should be changed to look like this:
Then you don't need to add "struct" all through the source files. |
CelDecDatLightEntry isn't actually meant to be a separate function, it's an inline ASM block inside CelDecDatLightOnly that explicitly uses call and ret instructions. The easy fix in this situation is to remove its declaration from engine.h and make it static. |
player.cpp uses functions from the following:
So more then a third of the files would still be included :/ We pretty much concluded that we need to convert the whole project to c-style before it makes sens to switch the compiler so making CelDecDatLightEntry static won't really solve the problem. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@squidcc I don't have much experience with nmake, but would be happy to integrate it into the build process if you could submit a PR adding it? We can then later figure out how to update the docker, etc, to also include nmake, so it will be available to other OSes than Windows. |
In an effort to make this PR more digestible I have separated out the enum.h/struct.h file changes: #479 |
The PR has been split and this now only contains variable initialization and storm changes, bring it down to +484/-324 (split over 6 commits). |
@AJenbo does the project still compile with these changes? I.e. do we know how to handle linking of C/C++ code. |
Things are still compiled as C++ but these changes are a prerequisite to switching over to compile the project as C. |
Sounds like a sound approach. |
I'm going to split this one up one more time so that the storm.h file is separate from the others. This should also limit the changes to mostly be pulling variable declarations to the top of functions. |
Only storm.h is now affected in this PR, I'm closing it and opening a new one to have a clean review history for it. |
Hey mate, I think there is some miscommunication here. And I want to offer you a way to use your talents. It seems to many that you are unsportsmanlike or a rough to work with. This has led for a push to have you banned from the project. Please keep in mind that the team would love to have you commit and work on things because you have the ability; Your attitude though is not enjoyable . I just want to ensure that before any of that happens, that we have given a fair chance to explain our desires to not do this , but to have you on board. Anyway about my project, you are welcome to add and make PRs. It's mainly a port to Linux but I would welcome any good clean up simplification to code if you want to do that. If you know SDL that would be awesome! Anyway, I hate drama like I hate chick-flicks. Feel free to contribute here and you can of course help with my project if you so decide. Cheers https://github.com/diasurgical/devilutionX |
No description provided.