*sigh*
authornemo
Thu, 29 Nov 2012 14:48:38 -0500
changeset 8142 b10219ef05d3
parent 8134 38e163cc3bfd (current diff)
parent 8140 a098374b847b (diff)
child 8143 3f2ba6debbdd
child 8144 f3ba33d5d2b1
*sigh*
--- a/QTfrontend/hwform.cpp	Thu Nov 29 14:47:36 2012 -0500
+++ b/QTfrontend/hwform.cpp	Thu Nov 29 14:48:38 2012 -0500
@@ -439,23 +439,27 @@
     }
 }
 
-void HWForm::UpdateTeamsLists(const QStringList* editable_teams)
+void HWForm::UpdateTeamsLists()
 {
-    QStringList teamslist;
-    if(editable_teams)
-    {
-        teamslist =* editable_teams;
-    }
-    else
-    {
-        teamslist = config->GetTeamsList();
-    }
+    QStringList teamslist = config->GetTeamsList();
 
     if(teamslist.empty())
     {
-        HWTeam defaultTeam(tr("DefaultTeam"));
+        QString currentNickName = gameSettings->value("net/nick","").toString().toUtf8();
+        QString teamName;
+
+        if (currentNickName.isEmpty())
+        {
+            teamName = tr("DefaultTeam");
+        }
+        else
+        {
+            teamName = tr("%1's Team").arg(currentNickName);
+        }
+
+        HWTeam defaultTeam(teamName);
         defaultTeam.saveToFile();
-        teamslist.push_back(tr("DefaultTeam"));
+        teamslist.push_back(teamName);
     }
 
     ui.pageOptions->CBTeamName->clear();
--- a/QTfrontend/hwform.h	Thu Nov 29 14:47:36 2012 -0500
+++ b/QTfrontend/hwform.h	Thu Nov 29 14:48:38 2012 -0500
@@ -146,7 +146,7 @@
 
     private:
         void _NetConnect(const QString & hostName, quint16 port, QString nick);
-        void UpdateTeamsLists(const QStringList* editable_teams=0);
+        void UpdateTeamsLists();
         void CreateGame(GameCFGWidget * gamecfg, TeamSelWidget* pTeamSelWidget, QString ammo);
         void closeEvent(QCloseEvent *event);
         void CustomizePalettes();
--- a/QTfrontend/ui/widget/teamselect.cpp	Thu Nov 29 14:47:36 2012 -0500
+++ b/QTfrontend/ui/widget/teamselect.cpp	Thu Nov 29 14:48:38 2012 -0500
@@ -269,7 +269,7 @@
 
     // Add notice about number of required teams.
     numTeamNotice = new QLabel("Two teams are required to play!");
-    mainLayout.addWidget((QWidget*)numTeamNotice);
+    mainLayout.addWidget(numTeamNotice);
 
     QPalette p;
     p.setColor(QPalette::Window, QColor(0x00, 0x00, 0x00));
--- a/hedgewars/options.inc	Thu Nov 29 14:47:36 2012 -0500
+++ b/hedgewars/options.inc	Thu Nov 29 14:48:38 2012 -0500
@@ -43,12 +43,12 @@
 
 {$IFDEF MOBILE}
     {$DEFINE HWLIBRARY}
-    {$DEFINE S3D_DISABLED}
     {$DEFINE GLunit:=gles11}
     {$DEFINE USE_LANDSCAPE_AMMOMENU}
     {$DEFINE USE_TOUCH_INTERFACE}
 {$ELSE}
     {$DEFINE USE_AM_NUMCOLUMN}
+    {$DEFINE USE_S3D_RENDERING}
 {$ENDIF}
 
 
--- a/hedgewars/uStore.pas	Thu Nov 29 14:47:36 2012 -0500
+++ b/hedgewars/uStore.pas	Thu Nov 29 14:48:38 2012 -0500
@@ -437,7 +437,7 @@
 IMG_Quit();
 end;
 
-{$IF NOT DEFINED(S3D_DISABLED) OR DEFINED(USE_VIDEO_RECORDING)}
+{$IF DEFINED(USE_S3D_RENDERING) OR DEFINED(USE_VIDEO_RECORDING)}
 procedure CreateFramebuffer(var frame, depth, tex: GLuint);
 begin
     glGenFramebuffersEXT(1, @frame);
@@ -539,7 +539,7 @@
     if defaultFrame <> 0 then
         DeleteFramebuffer(defaultFrame, depthv, texv);
 {$ENDIF}
-{$IFNDEF S3D_DISABLED}
+{$IFDEF USE_S3D_RENDERING}
     if (cStereoMode = smHorizontal) or (cStereoMode = smVertical) or (cStereoMode = smAFR) then
         begin
         DeleteFramebuffer(framel, depthl, texl);
@@ -805,7 +805,7 @@
     end;
 {$ENDIF}
 
-{$IFNDEF S3D_DISABLED}
+{$IFDEF USE_S3D_RENDERING}
     if (cStereoMode = smHorizontal) or (cStereoMode = smVertical) or (cStereoMode = smAFR) then
     begin
         // prepare left and right frame buffers and associated textures
--- a/hedgewars/uWorld.pas	Thu Nov 29 14:47:36 2012 -0500
+++ b/hedgewars/uWorld.pas	Thu Nov 29 14:48:38 2012 -0500
@@ -961,7 +961,7 @@
         glClear(GL_COLOR_BUFFER_BIT);
         DrawWorldStereo(Lag, rmDefault)
         end
-{$IFNDEF S3D_DISABLED}
+{$IFDEF USE_S3D_RENDERING}
     else if (cStereoMode = smAFR) then
         begin
         AFRToggle:= not AFRToggle;
@@ -1074,7 +1074,7 @@
 
 procedure ChangeDepth(rm: TRenderMode; d: GLfloat);
 begin
-{$IFDEF S3D_DISABLED}
+{$IFNDEF USE_S3D_RENDERING}
     rm:= rm; d:= d; // avoid hint
     exit;
 {$ELSE}
@@ -1092,7 +1092,7 @@
  
 procedure ResetDepth(rm: TRenderMode);
 begin
-{$IFDEF S3D_DISABLED}
+{$IFNDEF USE_S3D_RENDERING}
     rm:= rm; // avoid hint
     exit;
 {$ELSE}
--- a/tools/PascalPreprocessor.hs	Thu Nov 29 14:47:36 2012 -0500
+++ b/tools/PascalPreprocessor.hs	Thu Nov 29 14:48:38 2012 -0500
@@ -19,7 +19,6 @@
     ("FPC", "")
     , ("PAS2C", "")
     , ("ENDIAN_LITTLE", "")
-    , ("S3D_DISABLED", "")
     ]
 
 preprocess :: String -> IO String