Skip to content

Commit

Permalink
Fix compilation of the editors when using SDL1
Browse files Browse the repository at this point in the history
SHIFT-HOME and HOME have the same values for SDL1; use CTRL-HOME instead
  • Loading branch information
th-otto committed Mar 19, 2024
1 parent 83c8956 commit 121b260
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions redalert/mapedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -772,10 +772,14 @@ void MapEditClass::AI(KeyNumType& input, int x, int y)
input = KN_NONE;
break;

#if (KN_HOME | KN_SHIFT_BIT) != KN_HOME
/*
** SHIFT-HOME: set new Home Cell position
*/
case ((int)KN_HOME | (int)KN_SHIFT_BIT):
#else
case ((int)KN_HOME | (int)KN_CTRL_BIT):
#endif
if (CurrentCell != 0) {

/*
Expand Down
4 changes: 4 additions & 0 deletions tiberiandawn/mapedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -858,10 +858,14 @@ void MapEditClass::AI(KeyNumType& input, int x, int y)
input = KN_NONE;
break;

#if (KN_HOME | KN_SHIFT_BIT) != KN_HOME
/*---------------------------------------------------------------------
SHIFT-HOME: set new Home Cell position
---------------------------------------------------------------------*/
case ((int)KN_HOME | (int)KN_SHIFT_BIT):
#else
case ((int)KN_HOME | (int)KN_CTRL_BIT):
#endif
/*
** Unflag the old Home Cell, if there are no other waypoints
** pointing to it
Expand Down

0 comments on commit 121b260

Please sign in to comment.