Use same team colors everywhere
authorunc0rr
Sun, 30 Sep 2007 14:43:15 +0000 (2007-09-30)
changeset 616 00928b3cf505
parent 615 b646b3c43369
child 617 127510b442ca
Use same team colors everywhere
QTfrontend/frameTeam.cpp
QTfrontend/game.cpp
QTfrontend/hwconsts.cpp.in
QTfrontend/hwconsts.h
--- a/QTfrontend/frameTeam.cpp	Sun Sep 30 13:36:32 2007 +0000
+++ b/QTfrontend/frameTeam.cpp	Sun Sep 30 14:43:15 2007 +0000
@@ -18,6 +18,7 @@
 
 #include "frameTeam.h"
 #include "teamselhelper.h"
+#include "hwconsts.h"
 
 #include <QResizeEvent>
 #include <QCoreApplication>
@@ -27,12 +28,12 @@
 {
   mainLayout.setSpacing(1);
 
-  availableColors.push_back(QColor(  0, 255, 255));
-  availableColors.push_back(QColor(255, 127, 127));
-  availableColors.push_back(QColor(103, 167, 231));
-  availableColors.push_back(QColor( 37, 181,  61));
-  availableColors.push_back(QColor(247, 237, 112));
-  availableColors.push_back(QColor(192,  85, 160));
+  availableColors.push_back(*color1);
+  availableColors.push_back(*color2);
+  availableColors.push_back(*color3);
+  availableColors.push_back(*color4);
+  availableColors.push_back(*color5);
+  availableColors.push_back(*color6);
 
   resetColors();
 }
--- a/QTfrontend/game.cpp	Sun Sep 30 13:36:32 2007 +0000
+++ b/QTfrontend/game.cpp	Sun Sep 30 14:43:15 2007 +0000
@@ -103,14 +103,14 @@
 	QByteArray teamscfg;
 	HWTeam team1(0);
 	team1.difficulty = 0;
-	team1.teamColor = QColor(65535);
+	team1.teamColor = *color1;
 	team1.numHedgehogs = 4;
 	HWProto::addStringListToBuffer(teamscfg,
 			team1.TeamGameConfig(gamecfg->getInitHealth()));
 
 	HWTeam team2(2);
 	team2.difficulty = 4;
-	team2.teamColor = QColor(16776960);
+	team2.teamColor = *color2;
 	team2.numHedgehogs = 4;
 	HWProto::addStringListToBuffer(teamscfg,
 			team2.TeamGameConfig(gamecfg->getInitHealth()));
@@ -127,7 +127,7 @@
 
 	HWTeam team1(0);
 	team1.difficulty = 0;
-	team1.teamColor = QColor(65535);
+	team1.teamColor = *color1;
 	team1.numHedgehogs = 1;
 	HWProto::addStringListToBuffer(teamscfg,
 			team1.TeamGameConfig(100));
--- a/QTfrontend/hwconsts.cpp.in	Sun Sep 30 13:36:32 2007 +0000
+++ b/QTfrontend/hwconsts.cpp.in	Sun Sep 30 14:43:15 2007 +0000
@@ -28,3 +28,10 @@
 QStringList * Themes;
 
 QString * cDefaultAmmoStore = new QString("eammstore 93919294221912103323");
+
+QColor * color1 = new QColor(  0, 255, 255);
+QColor * color2 = new QColor(255, 127, 127);
+QColor * color3 = new QColor(103, 167, 231);
+QColor * color4 = new QColor( 37, 181,  61);
+QColor * color5 = new QColor(247, 237, 112);
+QColor * color6 = new QColor(192,  85, 160);
--- a/QTfrontend/hwconsts.h	Sun Sep 30 13:36:32 2007 +0000
+++ b/QTfrontend/hwconsts.h	Sun Sep 30 14:43:15 2007 +0000
@@ -19,6 +19,7 @@
 #include <QString>
 #include <QDir>
 #include <QStringList>
+#include <QColor>
 
 extern QString * cProtoVer;
 extern QString * cDataDir;
@@ -30,3 +31,10 @@
 extern QStringList * Themes;
 
 extern QString * cDefaultAmmoStore;
+
+extern QColor * color1;
+extern QColor * color2;
+extern QColor * color3;
+extern QColor * color4;
+extern QColor * color5;
+extern QColor * color6;