Conversation
src/precomp/common.hpp
Outdated
| #include "framework.h" | ||
| #include "winnt.h" | ||
| #include "wtypes.h" | ||
| #include <windef.h> |
There was a problem hiding this comment.
Any advantage over using the whole "Windows.h" header in the precomp (and here) and abandoning the "framework.h"?
There was a problem hiding this comment.
What about the other way around and moving these three lines inside "framework.h"?
#include "winnt.h"
#include "wtypes.h"
#include <windef.h>Windows is kind of the framework the game operates in anyways, so it makes sense to put those there. Then "common" is only for common types outside of the windows ones?
There was a problem hiding this comment.
Also a good idea, although the reason I push for the Windows.h header is due to the fact that at least the Mss32.h includes the whole header anyway, so I was wondering if we could just add it to the precomp and be done with it.
I have another idea, although a bit more complicated:
- Check if we have other cases that import the Windows.h directly.
- See if you could change all positions to not use it.
- If the current setup becomes build able, I think it would work. The test would require to include the headers that currently use the full windows.h in the build. I would assume the compiler would complain if definitions are missing.
- Since it is a dependency, at least Mss32 should work without include files created by us.
It could also be that the mmsystem requires the whole windows.h, I do not know at the moment. Important is that the header Mss32.h works.
Sorry for the sudden other tangent. I think your idea is fine, but for me the whole thing is a follow up of the question whether we need Windows.h completely or if reduced is enough.
There was a problem hiding this comment.
Okay, I have put windows.h in pch.h!
See #14 (comment)