bsp-compilation: build on Linux/GCC (missing includes, uint16_t, strdup) - #3
Open
SickoHours wants to merge 4 commits into
Open
SickoHours wants to merge 4 commits into
SickoHours wants to merge 4 commits into
Conversation
This file contains hidden or 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
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.
What changed
Four small portability commits so
bsp-compilation(head e4fb8b4) compiles on Linux with GCC 16 in therelease_x86configuration. No logic changes:src/ObjCommon/Shader/D3D11ShaderAnalyser.h:#include <cstdint>(upstream main already has this).src/ObjLoading/Game/T6/BSP/BSPUtil.cpp: remove a stray#pragma oncefrom a.cpp(GCC errors under-Werror=pragma-once-outside-header).BSP/Linker/{BSPLinker,ClipMapLinker,GfxWorldLinker}.cpp:#include <cstring>formemset/memcpy;BSP/Linker/{ComWorldLinker,GfxWorldLinker}.cpp:#include <cmath>forcosf/roundf.BSP/Linker/GfxWorldLinker.cpp:unsigned __int16(MSVC only) touint16_t.src/ObjLoading/Game/T6/TechniqueSet/LoaderTechniqueSetT6.cpp:_strduptostrdup.Evidence
Built with
premake5 gmake && make -C build config=release_x86 Linker Unlinker(g++ 16.2.1, 32-bit multilib, premake 5.0 beta8). The resulting Linker (v0.24.1-296-ge4fb8b47) linked a minimal Zombies map from a Blender 5.2 GLB export (one closed room, sun,worldspawn,mp_global_intermission, fourspawnpoint, onezone, fourspawnernodes) into azm_box.ffcarrying gfxworld, clipmap, comworld, gameworldmp, mapents and skinnedverts; both the branch Unlinker and stock OAT 0.33 list it with 0 errors, and the dumped entity string has the expected structs.Not verified
The map has not been loaded in the game yet, so this PR claims a build fix only. Two observations from the same session that may be useful, not addressed here: two identical links of the same inputs produce fastfiles differing in ~2200 bytes of the compressed body (headers equal), which suggests uninitialized memory somewhere in the BSP linkers; and a
.gltfwith an external.binbuffer is refused ("File buffers are not supported"), so GLB is the working export.🤖 Generated with Claude Code