During compilation of the OpenJK SP (Single Player) codebase, we encountered numerous errors related to GUID constant redefinitions in codemp/client/snd_dma.cpp. These errors occurred because the file was defining GUID constants that were already defined in the EAX header files.
The issue was caused by duplicate GUID definitions in codemp/client/snd_dma.cpp. The code was defining constants like:
EAXPROPERTYID_EAX40_FXSlot0EAXPROPERTYID_EAX40_FXSlot1EAXPROPERTYID_EAX40_FXSlot2EAXPROPERTYID_EAX40_FXSlot3EAXPROPERTYID_EAX40_ContextEAXPROPERTYID_EAX40_SourceEAX_NULL_GUIDEAX_PrimaryFXSlotIDEAX_REVERB_EFFECT
These constants were already properly defined in codemp/client/eax/eax.h which is included via snd_local.h.
Removed the duplicate GUID constant definitions from codemp/client/snd_dma.cpp since they are already provided by the EAX header files. The GUIDs are accessible through the proper include chain:
snd_dma.cpp → snd_local.h → eax/eax.h
After removing the duplicate definitions, compilation progressed significantly further, indicating the GUID-related errors were resolved. The compilation now fails at later stages due to unrelated issues (missing game-specific headers and definitions).
While the GUID issue has been resolved, there remain numerous other compilation errors that are unrelated to GUIDs. These include:
-
Missing type definitions:
bgEntity_tmaterial_tsaberInfo_tforcePowers_tsiegePers_t
-
Missing constants:
- Game type constants (
GT_TEAM,GT_DUEL,GT_SIEGE, etc.) - Weapon constants (
WP_BRYAR_PISTOL,WP_SABER, etc.) - Force power constants (
FP_LEVITATION,NUM_FORCE_POWERS, etc.)
- Game type constants (
-
Missing header files:
AI.h- Various game-specific headers
-
Missing function declarations:
BG_TempAlloc,BG_TempFree,BG_Alloc- Various force power and saber-related functions
These remaining errors suggest that:
- The codebase has missing or incorrect dependencies
- There may be missing game modules that should be compiled alongside the client
- Some files may be expecting a different version of the game headers
- The build configuration may be incomplete or incorrect
To address these remaining issues, further investigation is needed:
- Verify that all required game modules and headers are present in the repository
- Check the build configuration to ensure all necessary dependencies are included
- Investigate whether the single-player branch requires additional game-specific files that are not currently in the repository
- Compare against the known working OpenJK codebase to identify missing components
The GUID redefinition issue has been successfully fixed, allowing compilation to proceed beyond the initial GUID errors. However, additional work is needed to resolve the remaining compilation issues related to missing game-specific definitions and headers.