generated from ange-yaghi/visualcpp_template
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Clang linux #34
Open
phire
wants to merge
54
commits into
ange-yaghi:master
Choose a base branch
from
phire:clang_linux
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Clang linux #34
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This allows subclasses to be enabled-disabled at compile-time simply by if the ysRegisterSubclass instantiation is linked in.
This is probably a horrible idea, my original plan was to replace all uses of _s functions with std::string where possible. But they are everywhere in the codebase. and we need to do this port in smaller steps. So this is the more sane solution in the short term. Ideally we will remove these later
Does microsoft have a specialization for when the desitnation is a fixed size buffer? Or is this a bug?
Lets not reinvent the wheel, it will be faster and less error prone to use c++'s built in buffering and padding. And I needed to get rid of some _s functions anyway. Also, despite using the safe functions, this code still had a potential buffer overrun.
From memory, microsoft leave a non-std:: version of these lying around as a landmine for cross-platform compatibility.
I think these are leftover, we will see if this causes any errors down the line
Arguably, it should be Hidden. But the existing behavour of the Win32 Windowing system is Visable, and lets keep that for now
Can show a window
Also use size_t's and add a template for the "no size provided" calls.
This is basically a copy of the Windows impl, but with some of the extensions that aren't required removed.
Also remove Windows.h since the headers include them anyway if they're required on your platform.
I'm not sure what's going on on other platforms, but having this here causes the compiler to always pick this rather than waiting on the linker to pick the externally implemented ones.
This needs some cleanup
Spotted by GCC because that last argument isn't a pointer so it shouldn't have been NULL.
These are Windows GL methods that don't need to exist on other platforms
Forgot to add this on first pass of the SDL context
Not sure how I missed this before...
The size must be a multiple of the alignment and the alignment must be a power of 2, so static assert on the alignment and round up the size if necessary.
delete isn't able to deduce the type of the object it's destroying since it's the caller that runs the destructor. So we need to make sure that types are as expected before calling the delete.
Compilers are smart. They typically know what to do.
This should be available everywhere, so make use of it.
Useful to find out why programs aren't linking even though the shader stages compiled.
GLES doesn't like mixing the two and I'm trying to keep them as similar as possible.
Any use cases of this should use the type required, though wav reading is simple enough to be generic for all platforms.
Could use SDL here, but it only has millisecond precision.
This avoids having to find and build boost which is always a nice thing to skip.
Untested, but should work.
This way you only need to use ysAudioWaveFile and it'll Just Work everywhere.
current_path() is the name of both a setter and a getter depending on whether or not a path is provided. We want to get the current path so call it without any arguments.
It's a bit wonky but it serves as a baseline.
Don't dereference realContext until we're sure it's valid.
Using physical button locations rather than keycodes for now since the code is setup to use a fixed size lookup table.
Also disable Vulkan by default outside of Win32 since it hasn't been tested when using SDL.
I think line 350 of CMakeLists.txt should be "delta-core", not "delta-code". (I'm taking a crack at building for Mac) |
Open
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some of this is still rough WIP
And it only gets to the point of building, not linking. And a few things aren't even built (like opengl), or don't exist (like new input, sound, windowing)