When configuring with SDL1 and enabling MAP_EDITORTD and/or MAP_EDITORRA, compilation fails for tiberiandawn/mapedit.cpp rsp. redalert/mapedit.cpp:
../Vanilla-Conquer/tiberiandawn/mapedit.cpp: In member function 'virtual void MapEditClass::AI(KeyNumType&, int, int)':
../Vanilla-Conquer/tiberiandawn/mapedit.cpp:864:5: error: duplicate case value
case ((int)KN_HOME | (int)KN_SHIFT_BIT):
^~~~
../Vanilla-Conquer/tiberiandawn/mapedit.cpp:839:5: note: previously used here
case KN_HOME:
^~~~
This is because KN_HOME is defined to SDLK_HOME, which is 278 (0x116), and KN_SHIFT_BIT is 0x100, so KN_HOME and KN_HOME| KN_SHIFT_BIT are the same value.
Root cause of the problem seems to be the definition of KN_SHIFTBIT, which implies that all VK* values are less than 256, which is not the case for SDL1.
When configuring with SDL1 and enabling
MAP_EDITORTD
and/orMAP_EDITORRA
, compilation fails fortiberiandawn/mapedit.cpp
rsp.redalert/mapedit.cpp
:This is because KN_HOME is defined to SDLK_HOME, which is 278 (0x116), and KN_SHIFT_BIT is 0x100, so
KN_HOME
andKN_HOME| KN_SHIFT_BIT
are the same value.Root cause of the problem seems to be the definition of KN_SHIFTBIT, which implies that all VK* values are less than 256, which is not the case for SDL1.