-
Notifications
You must be signed in to change notification settings - Fork 35
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
Windows project files / fixes #5
Open
TTimo
wants to merge
36
commits into
bnoordhuis:master
Choose a base branch
from
TTimo:master
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
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
The settings in cfgq3.c had diverged from the actual fields and defaults in these ways: - extra field phys_maxacceleration - missing fields phys_walkaccelerate, phys_swimaccelerate, rs_maxfallheight - different defaults for phys_airaccelerate, phys_maxstep, phys_maxwaterjump Also the code in aas_cfg.[ch] for reading the settings was missing rs_maxfallheight. It's brittle to require multiple different files to agree on these fields, but rather than fix that issue this is just a band-aid to bring things back into alignment so that custom configs based on the example file can be used again.
AAS_LoadAASLump will return 0/NULL in an error case. However it will also return the input buffer pointer if length is 0, and the input buffer pointer may be 0/NULL in the case where AAS_LoadAASLump is meant to allocate memory. This means that it can return 0/NULL in a perfectly legal case where the lump length is 0. Since AAS_LoadAASFile inteprets this as a fatal error, that's bad. I'm not sure how to best disambiguate this, but a low-touch fix is for the caller of AAS_LoadAASLump to be OK with a returned NULL pointer if the lump length is 0. Also: added a missing break statement to avoid a spurious "don't know what to do" message when using the aasinfo switch.
With bspc built on OS X or Centos, a generated aas file for a given bsp is exactly the same as when generated on Windows, except for the checksum. The reason is that on those platforms, the UINT4 data type defined in md4.c is 8 bytes in size rather than 4 bytes. Changing that type definition from "unsigned long int" to "unsigned int" makes the data type 4 bytes in size on all three platforms, resulting in correct & identical aas files for all three. It's not a bulletproof way of specifying a 4-byte int, but as far as I know it should be 4 bytes on any current platform that could build & run bspc.
fix checksum calculation on non-Windows platforms
update fields in the example custom config file
make AAS_LoadAASFile work with zero-sized lumps
Add FBSP support to bspc and squash a few bugs along the way
A bunch of x64/WIN64 fixes
[l_bsp_hl.c] Reactivate (and fix) FastChecksum function
[l_bsp_{q1,q2,sin}.c] Fix undefined behaviour in array access
[bspc.c] Delete dead code and commented code
[l_bsp_{hl,q1}.c] Fix erroneous use of comma operator
quite large for automatic storage.
[bspc.c] Change directory variables to have static storage
…than size-1 arrays. The arrays were always meant to be variably sized, and objects are only ever allocated dynamically. Object size computations are simplified with this change. Flexible arrays were introduced in C99, so this change means that we will require a C99-conforming compiler henceforth.
Use flexible array members
Some of the variables in l_bsc_{hl,sin,q1,q2}.c had not been made unique with the game-specific prefix, which led to ODR violations. Previously, some permissive compilers allowed this and considered the tentative definitions to declare the _same_ entity, but newer compilers rightfully reject this. The solution is to ensure that distinct variables really are distinct.
Fix duplicate definitions by renaming variables.
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.
A few fixes and new/rebuilt MSVC project files. Binaries are included in GtkRadiant 1.6.3 builds. See TTimo/GtkRadiant#63 for details.