Permalink
Browse files

new configuration option radarRotationArrow can disable arrow pointin…

…g north with rotating radar
  • Loading branch information...
Forgon2100 Forgon2100
Forgon2100 authored and Forgon2100 committed Oct 1, 2017
1 parent 8bac137 commit c5db25a75ea34d263ce3243f04ba4110b936ac52
Showing with 8 additions and 1 deletion.
  1. +2 −0 src/configuration.cpp
  2. +5 −1 src/radar.cpp
  3. +1 −0 src/radar.h
View
@@ -98,6 +98,7 @@ bool loadConfig()
setRightClickOrders(ini.value("RightClickOrders", false).toBool());
setMiddleClickRotate(ini.value("MiddleClickRotate", false).toBool());
rotateRadar = ini.value("rotateRadar", true).toBool();
radarRotationArrow = ini.value("radarRotationArrow", true).toBool();
war_SetPauseOnFocusLoss(ini.value("PauseOnFocusLoss", false).toBool());
NETsetMasterserverName(ini.value("masterserver_name", "lobby.wz2100.net").toString().toUtf8().constData());
iV_font(ini.value("fontname", "DejaVu Sans").toString().toUtf8().constData(),
@@ -220,6 +221,7 @@ bool saveConfig()
ini.setValue("antialiasing", war_getAntialiasing());
ini.setValue("UPnP", (SDWORD)NetPlay.isUPNP);
ini.setValue("rotateRadar", rotateRadar);
ini.setValue("radarRotationArrow", radarRotationArrow);
ini.setValue("PauseOnFocusLoss", war_GetPauseOnFocusLoss());
ini.setValue("masterserver_name", NETgetMasterserverName());
ini.setValue("masterserver_port", NETgetMasterserverPort());
View
@@ -55,6 +55,7 @@
bool bEnemyAllyRadarColor = false; /**< Enemy/ally radar color. */
RADAR_DRAW_MODE radarDrawMode = RADAR_MODE_DEFAULT; /**< Current mini-map mode. */
bool rotateRadar; ///< Rotate the radar?
bool radarRotationArrow; ///< display arrow when radar rotation enabled?
static PIELIGHT colRadarAlly, colRadarMe, colRadarEnemy;
static PIELIGHT tileColours[MAX_TILES];
@@ -286,7 +287,10 @@ void drawRadar()
{
// rotate the map
radarMatrix *= glm::rotate(UNDEG(player.r.y), glm::vec3(0.f, 0.f, 1.f));
DrawNorth(orthoMatrix * radarMatrix);
if (radarRotationArrow)
{
DrawNorth(orthoMatrix * radarMatrix);
}
}
pie_RenderRadar(orthoMatrix * radarMatrix);
View
@@ -58,6 +58,7 @@ enum RADAR_DRAW_MODE
extern bool bEnemyAllyRadarColor; ///< Enemy/ally minimap color
extern RADAR_DRAW_MODE radarDrawMode; ///< Current minimap mode
extern bool rotateRadar;
extern bool radarRotationArrow;
void radarInitVars(); ///< Recalculate minimap variables. For initialization code only.

0 comments on commit c5db25a

Please sign in to comment.