mirror of
https://github.com/kevinbentley/Descent3.git
synced 2026-04-04 02:00:04 -04:00
$GIT/scripts/LEVEL15.cpp: In function ‘void aMatCenPuzzleInit()’: $GIT/scripts/LEVEL15.cpp:833:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] 833 | #define MagicMatCenSwitchSequence (*((int *)(&User_vars[17]))) $GIT/scripts/LEVEL15.cpp:834:25: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] 834 | #define MatCenStateA (*((int *)(&User_vars[0]))) ... $GIT/scripts/Level6.cpp: In function ‘void aPriestKeyEnter(int)’: $GIT/scripts/Level6.cpp:910:47: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] 910 | #define Var_ThereIsPlayerInPriestKeyPuzzle (*((int *)(&User_vars[7]))) Turn ``User_var`` into an array of std::variant, the latter of which can hold either float or int. Savegames do not carry the necessary type information which variant (float/int) is in use; instead, this is statically decided by the level DLL logic on a per-index basis. This approach is retained for now. A lot of ``Var_something = 0`` is used despite Var_something being logically used as float, so we need to override op= to keep the variant type as-is.
232 KiB
232 KiB