44
44
#include "g_game.h"
45
45
#include "hu_stuff.h"
46
46
#include "i_colors.h"
47
- #include "i_gamecontroller .h"
47
+ #include "i_controller .h"
48
48
#include "i_system.h"
49
49
#include "i_timer.h"
50
50
#include "m_bbox.h"
@@ -487,7 +487,7 @@ static void AM_MaxOutWindowScale(void)
487
487
static bool AM_GetSpeedToggle (void )
488
488
{
489
489
return ((gamekeydown [keyboardrun ] || mousebuttons [mouserun ]
490
- || (gamecontrollerbuttons & gamecontrollerrun )) ^ alwaysrun );
490
+ || (controllerbuttons & controllerrun )) ^ alwaysrun );
491
491
}
492
492
493
493
void AM_ToggleZoomOut (void )
@@ -658,7 +658,7 @@ bool AM_Responder(const event_t *ev)
658
658
{
659
659
static bool backbuttondown ;
660
660
661
- if (!(gamecontrollerbuttons & gamecontrollerautomap ))
661
+ if (!(controllerbuttons & controllerautomap ))
662
662
backbuttondown = false;
663
663
664
664
if (!automapactive && !mapwindow )
@@ -671,7 +671,7 @@ bool AM_Responder(const event_t *ev)
671
671
&& mouseautomap >= 0
672
672
&& (ev -> data1 & mouseautomap ))
673
673
|| (ev -> type == ev_controller
674
- && (gamecontrollerbuttons & gamecontrollerautomap )
674
+ && (controllerbuttons & controllerautomap )
675
675
&& !backbuttondown ))
676
676
{
677
677
keydown = keyboardautomap ;
@@ -994,107 +994,107 @@ bool AM_Responder(const event_t *ev)
994
994
ftom_zoommul = M_ZOOMIN + 2000 ;
995
995
}
996
996
}
997
- else if (ev -> type == ev_controller && gamecontrollerwait < I_GetTime ())
997
+ else if (ev -> type == ev_controller && controllerwait < I_GetTime ())
998
998
{
999
999
mtof_zoommul = FRACUNIT ;
1000
1000
ftom_zoommul = FRACUNIT ;
1001
1001
1002
- if ((gamecontrollerbuttons & gamecontrollerautomap ) && !backbuttondown )
1002
+ if ((controllerbuttons & controllerautomap ) && !backbuttondown )
1003
1003
{
1004
- gamecontrollerwait = I_GetTime () + 8 ;
1004
+ controllerwait = I_GetTime () + 8 ;
1005
1005
viewactive = true;
1006
1006
backbuttondown = true;
1007
1007
AM_Stop ();
1008
1008
}
1009
1009
1010
1010
// zoom out
1011
- else if ((gamecontrollerbuttons & gamecontrollerzoomout )
1012
- && !(gamecontrollerbuttons & gamecontrollerzoomin ))
1011
+ else if ((controllerbuttons & controllerzoomout )
1012
+ && !(controllerbuttons & controllerzoomin ))
1013
1013
AM_ToggleZoomOut ();
1014
1014
1015
1015
// zoom in
1016
- else if ((gamecontrollerbuttons & gamecontrollerzoomin )
1017
- && !(gamecontrollerbuttons & gamecontrollerzoomout ))
1016
+ else if ((controllerbuttons & controllerzoomin )
1017
+ && !(controllerbuttons & controllerzoomout ))
1018
1018
AM_ToggleZoomIn ();
1019
1019
1020
1020
// toggle maximum zoom
1021
- else if ((gamecontrollerbuttons & gamecontrollermaxzoom ) && !idclev && !idmus )
1021
+ else if ((controllerbuttons & controllermaxzoom ) && !idclev && !idmus )
1022
1022
{
1023
1023
AM_ToggleMaxZoom ();
1024
- gamecontrollerwait = I_GetTime () + 12 ;
1024
+ controllerwait = I_GetTime () + 12 ;
1025
1025
}
1026
1026
1027
1027
// toggle follow mode
1028
- else if (gamecontrollerbuttons & gamecontrollerfollowmode )
1028
+ else if (controllerbuttons & controllerfollowmode )
1029
1029
{
1030
1030
AM_ToggleFollowMode (!am_followmode );
1031
- gamecontrollerwait = I_GetTime () + 12 ;
1031
+ controllerwait = I_GetTime () + 12 ;
1032
1032
}
1033
1033
1034
1034
// toggle grid
1035
- else if (gamecontrollerbuttons & gamecontrollergrid )
1035
+ else if (controllerbuttons & controllergrid )
1036
1036
{
1037
1037
AM_ToggleGrid ();
1038
- gamecontrollerwait = I_GetTime () + 12 ;
1038
+ controllerwait = I_GetTime () + 12 ;
1039
1039
}
1040
1040
1041
1041
// mark spot
1042
- else if ((gamecontrollerbuttons & gamecontrollermark ))
1042
+ else if ((controllerbuttons & controllermark ))
1043
1043
{
1044
1044
AM_AddMark ();
1045
- gamecontrollerwait = I_GetTime () + 12 ;
1045
+ controllerwait = I_GetTime () + 12 ;
1046
1046
}
1047
1047
1048
1048
// clear mark(s)
1049
- else if (gamecontrollerbuttons & gamecontrollerclearmark )
1049
+ else if (controllerbuttons & controllerclearmark )
1050
1050
{
1051
1051
AM_ClearMarks ();
1052
- gamecontrollerwait = I_GetTime () + 12 ;
1052
+ controllerwait = I_GetTime () + 12 ;
1053
1053
}
1054
1054
1055
1055
// toggle rotate mode
1056
- else if (gamecontrollerbuttons & gamecontrollerrotatemode )
1056
+ else if (controllerbuttons & controllerrotatemode )
1057
1057
{
1058
1058
AM_ToggleRotateMode (!am_rotatemode );
1059
- gamecontrollerwait = I_GetTime () + 12 ;
1059
+ controllerwait = I_GetTime () + 12 ;
1060
1060
}
1061
1061
1062
1062
if (!am_followmode )
1063
1063
{
1064
1064
// pan right with left thumbstick
1065
- if (gamecontrollerthumbLX > 0 )
1065
+ if (controllerthumbLX > 0 )
1066
1066
{
1067
1067
movement = true;
1068
1068
speedtoggle = AM_GetSpeedToggle ();
1069
1069
m_paninc .x = (fixed_t )(FTOM (F_PANINC )
1070
- * ((float )gamecontrollerthumbLX / SHRT_MAX ) * 1.2f );
1070
+ * ((float )controllerthumbLX / SHRT_MAX ) * 1.2f );
1071
1071
}
1072
1072
1073
1073
// pan left with left thumbstick
1074
- else if (gamecontrollerthumbLX < 0 )
1074
+ else if (controllerthumbLX < 0 )
1075
1075
{
1076
1076
movement = true;
1077
1077
speedtoggle = AM_GetSpeedToggle ();
1078
1078
m_paninc .x = (fixed_t )(FTOM (F_PANINC )
1079
- * ((float )(gamecontrollerthumbLX ) / SHRT_MAX ) * 1.2f );
1079
+ * ((float )(controllerthumbLX ) / SHRT_MAX ) * 1.2f );
1080
1080
}
1081
1081
1082
1082
// pan up with left thumbstick
1083
- if (gamecontrollerthumbLY < 0 )
1083
+ if (controllerthumbLY < 0 )
1084
1084
{
1085
1085
movement = true;
1086
1086
speedtoggle = AM_GetSpeedToggle ();
1087
1087
m_paninc .y = (fixed_t )(FTOM (F_PANINC )
1088
- * (- (float )(gamecontrollerthumbLY ) / SHRT_MAX ) * 1.2f );
1088
+ * (- (float )(controllerthumbLY ) / SHRT_MAX ) * 1.2f );
1089
1089
}
1090
1090
1091
1091
// pan down with left thumbstick
1092
- else if (gamecontrollerthumbLY > 0 )
1092
+ else if (controllerthumbLY > 0 )
1093
1093
{
1094
1094
movement = true;
1095
1095
speedtoggle = AM_GetSpeedToggle ();
1096
1096
m_paninc .y = - (fixed_t )(FTOM (F_PANINC )
1097
- * ((float )gamecontrollerthumbLY / SHRT_MAX ) * 1.2f );
1097
+ * ((float )controllerthumbLY / SHRT_MAX ) * 1.2f );
1098
1098
}
1099
1099
}
1100
1100
}
0 commit comments