--- a/QTfrontend/game.cpp Tue Nov 27 00:29:41 2012 +0400
+++ b/QTfrontend/game.cpp Tue Nov 27 10:05:24 2012 +0400
@@ -59,7 +59,7 @@
switch (gameType)
{
case gtDemo:
- // for video recording we need demo anyway
+ // for video recording we need demo anyway
emit HaveRecord(rtNeither, demo);
break;
case gtNet:
@@ -343,7 +343,7 @@
gameSetup.style = NULL;
gameSetup.gamescheme = flib_scheme_create("Default");
gameSetup.map = flib_map_create_regular(
- QUuid::createUuid().toByteArray().constData()
+ QUuid::createUuid().toString().toAscii().constData()
, themeModel->rowCount() > 0 ? themeModel->index(rand() % themeModel->rowCount()).data().toString().toUtf8().constData() : "Sheep"
, 2);
gameSetup.teamlist = flib_teamlist_create();
--- a/QTfrontend/hwconsts.h Tue Nov 27 00:29:41 2012 +0400
+++ b/QTfrontend/hwconsts.h Tue Nov 27 10:05:24 2012 +0400
@@ -44,7 +44,7 @@
extern int cAmmoNumber;
extern QList< QPair<QString, QString> > cDefaultAmmos;
-extern unsigned int colors[];
+extern quint32 colors[];
extern QString * netHost;
extern quint16 netPort;
@@ -105,40 +105,3 @@
#define SEASON_EASTER 8
#define NETGAME_DEFAULT_PORT 46631
-
-
-// see http://en.wikipedia.org/wiki/List_of_colors
-/*define HW_TEAMCOLOR_ARRAY {0xff007fff, /. azure ./ \
- 0xffdd0000, /. classic red ./ \
- 0xff3e9321, /. classic green ./ \
- 0xffa23dbb, /. classic purple ./ \
- 0xffffb347, /. pastel orange ./ \
- 0xffcfcfc4, /. pastel gray ./ \
- 0xffbff000, /. lime ./ \
- 0xffffef00, /. yellow ./ \
- // add new colors here
- 0 }*/
-/*
-#define HW_TEAMCOLOR_ARRAY { 0xffd12b42, /. red ./ \
- 0xff4980c1, /. blue ./ \
- 0xff6ab530, /. green ./ \
- 0xffbc64c4, /. purple ./ \
- 0xffe76d14, /. orange ./ \
- 0xff3fb6e6, /. cyan ./ \
- 0xffe3e90c, /. yellow ./ \
- 0xff61d4ac, /. mint ./ \
- 0xfff1c3e1, /. pink ./ \
- // add new colors here
- 0 }*/
-/* another set. this one is a merge of mikade/bugq colours w/ a bit of channel feedback */
-#define HW_TEAMCOLOR_ARRAY { 0xffff0204, /* red */ \
- 0xff4980c1, /* blue */ \
- 0xff1de6ba, /* teal */ \
- 0xffb541ef, /* purple */ \
- 0xffe55bb0, /* pink */ \
- 0xff20bf00, /* green */ \
- 0xfffe8b0e, /* orange */ \
- 0xff5f3605, /* brown */ \
- 0xffffff01, /* yellow */ \
- /* add new colors here */ \
- 0 }
--- a/QTfrontend/team.cpp Tue Nov 27 00:29:41 2012 +0400
+++ b/QTfrontend/team.cpp Tue Nov 27 10:05:24 2012 +0400
@@ -35,19 +35,19 @@
QList<QByteArray> baList;
flib_team team;
- bzero(&team, sizeof(team));
+ memset(&team, 0, sizeof(team));
baList << teamname.toUtf8();
team.name = baList.last().data();
- team.grave = "Statue";
- team.fort = "Plane";
- team.voicepack = "Default";
- team.flag = "hedgewars";
+ team.grave = const_cast<char *>("Statue");
+ team.fort = const_cast<char *>("Plane");
+ team.voicepack = const_cast<char *>("Default");
+ team.flag = const_cast<char *>("hedgewars");
for (int i = 0; i < HEDGEHOGS_PER_TEAM; i++)
{
baList << QLineEdit::tr("hedgehog %1").arg(i+1).toUtf8();
team.hogs[i].name = baList.last().data();
- team.hogs[i].hat = "NoHat";
+ team.hogs[i].hat = const_cast<char *>("NoHat");
}
m_oldTeamName = teamname;
@@ -74,7 +74,7 @@
// net teams are configured from QStringList
if(strLst.size() != 23) throw HWTeamConstructException();
flib_team team;
- bzero(&team, sizeof(team));
+ memset(&team, 0, sizeof(team));
for(int i = 0; i < 6; ++i)
baList << strLst[i].toUtf8();
@@ -94,7 +94,7 @@
QString hat = strLst[i * 2 + 8];
if (hat.isEmpty())
- team.hogs[i].hat = "NoHat";
+ team.hogs[i].hat = const_cast<char *>("NoHat");
else
{
baList << hat.toUtf8();