Skip to content

Commit db2d746

Browse files
committed
Rename all "game controller" to just "controller"
1 parent 7f1b853 commit db2d746

33 files changed

+1384
-1384
lines changed

msvc/doomretro.vcxproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@
345345
<ClInclude Include="..\src\hu_lib.h" />
346346
<ClInclude Include="..\src\hu_stuff.h" />
347347
<ClInclude Include="..\src\i_colors.h" />
348-
<ClInclude Include="..\src\i_gamecontroller.h" />
348+
<ClInclude Include="..\src\i_controller.h" />
349349
<ClInclude Include="..\src\i_swap.h" />
350350
<ClInclude Include="..\src\i_system.h" />
351351
<ClInclude Include="..\src\i_timer.h" />
@@ -424,7 +424,7 @@
424424
<ClCompile Include="..\src\hu_lib.c" />
425425
<ClCompile Include="..\src\hu_stuff.c" />
426426
<ClCompile Include="..\src\i_colors.c" />
427-
<ClCompile Include="..\src\i_gamecontroller.c" />
427+
<ClCompile Include="..\src\i_controller.c" />
428428
<ClCompile Include="..\src\i_music.c" />
429429
<ClCompile Include="..\src\i_sound.c" />
430430
<ClCompile Include="..\src\i_system.c" />

res/DEHACKED.lmp

+1-1
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ M_HIGH = high
400400
M_LOW = low
401401
M_SCREENSIZE = Screen Size
402402
M_MOUSESENSITIVITY = Mouse Sensitivity
403-
M_GAMECONTROLLERSENSITIVITY = Controller Sensitivity
403+
M_CONTROLLERSENSITIVITY = Controller Sensitivity
404404
M_SOUNDVOLUME = Sound Volume
405405
M_CONSOLE = Console...
406406
M_SFXVOLUME = SFX Volume

res/doomretro.wad

-4 Bytes
Binary file not shown.

src/am_map.c

+31-31
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
#include "g_game.h"
4545
#include "hu_stuff.h"
4646
#include "i_colors.h"
47-
#include "i_gamecontroller.h"
47+
#include "i_controller.h"
4848
#include "i_system.h"
4949
#include "i_timer.h"
5050
#include "m_bbox.h"
@@ -487,7 +487,7 @@ static void AM_MaxOutWindowScale(void)
487487
static bool AM_GetSpeedToggle(void)
488488
{
489489
return ((gamekeydown[keyboardrun] || mousebuttons[mouserun]
490-
|| (gamecontrollerbuttons & gamecontrollerrun)) ^ alwaysrun);
490+
|| (controllerbuttons & controllerrun)) ^ alwaysrun);
491491
}
492492

493493
void AM_ToggleZoomOut(void)
@@ -658,7 +658,7 @@ bool AM_Responder(const event_t *ev)
658658
{
659659
static bool backbuttondown;
660660

661-
if (!(gamecontrollerbuttons & gamecontrollerautomap))
661+
if (!(controllerbuttons & controllerautomap))
662662
backbuttondown = false;
663663

664664
if (!automapactive && !mapwindow)
@@ -671,7 +671,7 @@ bool AM_Responder(const event_t *ev)
671671
&& mouseautomap >= 0
672672
&& (ev->data1 & mouseautomap))
673673
|| (ev->type == ev_controller
674-
&& (gamecontrollerbuttons & gamecontrollerautomap)
674+
&& (controllerbuttons & controllerautomap)
675675
&& !backbuttondown))
676676
{
677677
keydown = keyboardautomap;
@@ -994,107 +994,107 @@ bool AM_Responder(const event_t *ev)
994994
ftom_zoommul = M_ZOOMIN + 2000;
995995
}
996996
}
997-
else if (ev->type == ev_controller && gamecontrollerwait < I_GetTime())
997+
else if (ev->type == ev_controller && controllerwait < I_GetTime())
998998
{
999999
mtof_zoommul = FRACUNIT;
10001000
ftom_zoommul = FRACUNIT;
10011001

1002-
if ((gamecontrollerbuttons & gamecontrollerautomap) && !backbuttondown)
1002+
if ((controllerbuttons & controllerautomap) && !backbuttondown)
10031003
{
1004-
gamecontrollerwait = I_GetTime() + 8;
1004+
controllerwait = I_GetTime() + 8;
10051005
viewactive = true;
10061006
backbuttondown = true;
10071007
AM_Stop();
10081008
}
10091009

10101010
// zoom out
1011-
else if ((gamecontrollerbuttons & gamecontrollerzoomout)
1012-
&& !(gamecontrollerbuttons & gamecontrollerzoomin))
1011+
else if ((controllerbuttons & controllerzoomout)
1012+
&& !(controllerbuttons & controllerzoomin))
10131013
AM_ToggleZoomOut();
10141014

10151015
// zoom in
1016-
else if ((gamecontrollerbuttons & gamecontrollerzoomin)
1017-
&& !(gamecontrollerbuttons & gamecontrollerzoomout))
1016+
else if ((controllerbuttons & controllerzoomin)
1017+
&& !(controllerbuttons & controllerzoomout))
10181018
AM_ToggleZoomIn();
10191019

10201020
// toggle maximum zoom
1021-
else if ((gamecontrollerbuttons & gamecontrollermaxzoom) && !idclev && !idmus)
1021+
else if ((controllerbuttons & controllermaxzoom) && !idclev && !idmus)
10221022
{
10231023
AM_ToggleMaxZoom();
1024-
gamecontrollerwait = I_GetTime() + 12;
1024+
controllerwait = I_GetTime() + 12;
10251025
}
10261026

10271027
// toggle follow mode
1028-
else if (gamecontrollerbuttons & gamecontrollerfollowmode)
1028+
else if (controllerbuttons & controllerfollowmode)
10291029
{
10301030
AM_ToggleFollowMode(!am_followmode);
1031-
gamecontrollerwait = I_GetTime() + 12;
1031+
controllerwait = I_GetTime() + 12;
10321032
}
10331033

10341034
// toggle grid
1035-
else if (gamecontrollerbuttons & gamecontrollergrid)
1035+
else if (controllerbuttons & controllergrid)
10361036
{
10371037
AM_ToggleGrid();
1038-
gamecontrollerwait = I_GetTime() + 12;
1038+
controllerwait = I_GetTime() + 12;
10391039
}
10401040

10411041
// mark spot
1042-
else if ((gamecontrollerbuttons & gamecontrollermark))
1042+
else if ((controllerbuttons & controllermark))
10431043
{
10441044
AM_AddMark();
1045-
gamecontrollerwait = I_GetTime() + 12;
1045+
controllerwait = I_GetTime() + 12;
10461046
}
10471047

10481048
// clear mark(s)
1049-
else if (gamecontrollerbuttons & gamecontrollerclearmark)
1049+
else if (controllerbuttons & controllerclearmark)
10501050
{
10511051
AM_ClearMarks();
1052-
gamecontrollerwait = I_GetTime() + 12;
1052+
controllerwait = I_GetTime() + 12;
10531053
}
10541054

10551055
// toggle rotate mode
1056-
else if (gamecontrollerbuttons & gamecontrollerrotatemode)
1056+
else if (controllerbuttons & controllerrotatemode)
10571057
{
10581058
AM_ToggleRotateMode(!am_rotatemode);
1059-
gamecontrollerwait = I_GetTime() + 12;
1059+
controllerwait = I_GetTime() + 12;
10601060
}
10611061

10621062
if (!am_followmode)
10631063
{
10641064
// pan right with left thumbstick
1065-
if (gamecontrollerthumbLX > 0)
1065+
if (controllerthumbLX > 0)
10661066
{
10671067
movement = true;
10681068
speedtoggle = AM_GetSpeedToggle();
10691069
m_paninc.x = (fixed_t)(FTOM(F_PANINC)
1070-
* ((float)gamecontrollerthumbLX / SHRT_MAX) * 1.2f);
1070+
* ((float)controllerthumbLX / SHRT_MAX) * 1.2f);
10711071
}
10721072

10731073
// pan left with left thumbstick
1074-
else if (gamecontrollerthumbLX < 0)
1074+
else if (controllerthumbLX < 0)
10751075
{
10761076
movement = true;
10771077
speedtoggle = AM_GetSpeedToggle();
10781078
m_paninc.x = (fixed_t)(FTOM(F_PANINC)
1079-
* ((float)(gamecontrollerthumbLX) / SHRT_MAX) * 1.2f);
1079+
* ((float)(controllerthumbLX) / SHRT_MAX) * 1.2f);
10801080
}
10811081

10821082
// pan up with left thumbstick
1083-
if (gamecontrollerthumbLY < 0)
1083+
if (controllerthumbLY < 0)
10841084
{
10851085
movement = true;
10861086
speedtoggle = AM_GetSpeedToggle();
10871087
m_paninc.y = (fixed_t)(FTOM(F_PANINC)
1088-
* (-(float)(gamecontrollerthumbLY) / SHRT_MAX) * 1.2f);
1088+
* (-(float)(controllerthumbLY) / SHRT_MAX) * 1.2f);
10891089
}
10901090

10911091
// pan down with left thumbstick
1092-
else if (gamecontrollerthumbLY > 0)
1092+
else if (controllerthumbLY > 0)
10931093
{
10941094
movement = true;
10951095
speedtoggle = AM_GetSpeedToggle();
10961096
m_paninc.y = -(fixed_t)(FTOM(F_PANINC)
1097-
* ((float)gamecontrollerthumbLY / SHRT_MAX) * 1.2f);
1097+
* ((float)controllerthumbLY / SHRT_MAX) * 1.2f);
10981098
}
10991099
}
11001100
}

0 commit comments

Comments
 (0)