diff --git a/cockatrice/cockatrice.pro b/cockatrice/cockatrice.pro index e96500e0..c905b6c6 100644 --- a/cockatrice/cockatrice.pro +++ b/cockatrice/cockatrice.pro @@ -64,6 +64,7 @@ HEADERS += src/counter.h \ src/localserver.h \ src/localserverinterface.h \ src/localclient.h \ + ../common/color.h \ ../common/serializable_item.h \ ../common/decklist.h \ ../common/protocol.h \ diff --git a/cockatrice/src/player.cpp b/cockatrice/src/player.cpp index dd7e56aa..a91227a5 100644 --- a/cockatrice/src/player.cpp +++ b/cockatrice/src/player.cpp @@ -956,7 +956,7 @@ void Player::addZone(CardZone *z) Counter *Player::addCounter(ServerInfo_Counter *counter) { - return addCounter(counter->getId(), counter->getName(), counter->getColor(), counter->getRadius(), counter->getCount()); + return addCounter(counter->getId(), counter->getName(), counter->getColor().getQColor(), counter->getRadius(), counter->getCount()); } Counter *Player::addCounter(int counterId, const QString &name, QColor color, int radius, int value) @@ -1010,9 +1010,9 @@ ArrowItem *Player::addArrow(ServerInfo_Arrow *arrow) return 0; if (targetCard) - return addArrow(arrow->getId(), startCard, targetCard, arrow->getColor()); + return addArrow(arrow->getId(), startCard, targetCard, arrow->getColor().getQColor()); else - return addArrow(arrow->getId(), startCard, targetPlayer->getPlayerTarget(), arrow->getColor()); + return addArrow(arrow->getId(), startCard, targetPlayer->getPlayerTarget(), arrow->getColor().getQColor()); } ArrowItem *Player::addArrow(int arrowId, CardItem *startCard, ArrowTarget *targetItem, const QColor &color) diff --git a/cockatrice/translations/cockatrice_de.ts b/cockatrice/translations/cockatrice_de.ts index 505cd983..95836ea9 100644 --- a/cockatrice/translations/cockatrice_de.ts +++ b/cockatrice/translations/cockatrice_de.ts @@ -27,47 +27,47 @@ AppearanceSettingsPage - + Zone background pictures Hintergrundbilder für Kartenzonen - + Path to hand background: Hintergrundbild für die Hand: - + Path to table background: Hintergrundbild für das Spielfeld: - + Path to player info background: Hintergrundbild für den Spielerbereich: - + Path to picture of card back: Pfad zum Bild der Kartenrückseite: - + Hand layout Kartenhand - + Display hand horizontally (wastes space) Hand horizonal anzeigen (verschwendet Platz) - + Table grid layout Spielfeldraster - + Economical layout Platzsparende Anordnung @@ -76,17 +76,17 @@ Platzsparende Anordnung - + Zone view layout Aussehen des Zonenbetrachters - + Sort by name nach Namen sortieren - + Sort by type nach Kartentypen sortieren @@ -95,10 +95,10 @@ standardmäßig alphabetisch sortieren - - - + + + Choose path Pfad auswählen @@ -858,54 +858,66 @@ DlgSettings - - - + + + Error Fehler - Your card database is invalid. Please check if the path is set correctly. - Ihre Kartendatenbank ist ungültig. Bitte überprüfen Sie, ob der Pfad korrekt gesetzt ist. + Ihre Kartendatenbank ist ungültig. Bitte überprüfen Sie, ob der Pfad korrekt gesetzt ist. - The path to your deck directory is invalid. - Der Pfad zum Deckverzeichnis ist ungültig. + Der Pfad zum Deckverzeichnis ist ungültig. - The path to your card pictures directory is invalid. - Der Pfad zum Kartenbilderverzeichnis ist ungültig. + Der Pfad zum Kartenbilderverzeichnis ist ungültig. - + + Your card database is invalid. Would you like to go back and set the correct path? + Ihre Kartendatenbank ist ungültig. Möchten Sie zurückgehen und den korrekten Pfad einstellen? + + + + The path to your deck directory is invalid. Would you like to go back and set the correct path? + Der Pfad zu Ihrem Deckordner ist ungültig. Möchten Sie zurückgehen und den korrekten Pfad einstellen? + + + + The path to your card pictures directory is invalid. Would you like to go back and set the correct path? + Der Pfad zu Ihrem Kartenbilderordner ist ungültig. Möchten Sie zurückgehen und den korrekten Pfad einstellen? + + + Settings Einstellungen - + General Allgemeines - + Appearance Erscheinungsbild - + User interface Bedienung - + Messages Nachrichten - + &Close S&chließen @@ -2190,12 +2202,12 @@ MessagesSettingsPage - + &Add &Hinzufügen - + &Remove &Entfernen @@ -2208,12 +2220,12 @@ Entfernen - + Add message Nachricht hinzufügen - + Message: Nachricht: @@ -2757,27 +2769,27 @@ QObject - + Maindeck Hauptdeck - + Sideboard Sideboard - + Cockatrice decks (*.cod) Cockatrice Decks (*.cod) - + Plain text decks (*.dec *.mwDeck) Text Decks (*.dec *.mwDeck) - + All files (*.*) Alle Dateien (*.*) @@ -3077,22 +3089,22 @@ Bitte geben Sie einen Namen ein: UserInterfaceSettingsPage - + General interface settings Allgemeine Bedienung - + &Double-click cards to play them (instead of single-click) Karten durch &Doppelklick ausspielen (statt Einzelklick) - + Animation settings Animationseinstellungen - + &Tap/untap animation Animiertes &Tappen/Enttappen diff --git a/cockatrice/translations/cockatrice_en.ts b/cockatrice/translations/cockatrice_en.ts index 2f9d1ee6..23c3d244 100644 --- a/cockatrice/translations/cockatrice_en.ts +++ b/cockatrice/translations/cockatrice_en.ts @@ -4,70 +4,70 @@ AppearanceSettingsPage - + Zone background pictures - + Path to hand background: - + Path to table background: - + Path to player info background: - + Path to picture of card back: - + Hand layout - + Display hand horizontally (wastes space) - + Table grid layout - + Economical layout - + Zone view layout - + Sort by name - + Sort by type - - - + + + Choose path @@ -735,54 +735,54 @@ DlgSettings - - - + + + Error - - Your card database is invalid. Please check if the path is set correctly. + + Your card database is invalid. Would you like to go back and set the correct path? - - The path to your deck directory is invalid. + + The path to your deck directory is invalid. Would you like to go back and set the correct path? - - The path to your card pictures directory is invalid. + + The path to your card pictures directory is invalid. Would you like to go back and set the correct path? - + Settings - + General - + Appearance - + User interface - + Messages - + &Close @@ -1489,22 +1489,22 @@ MessagesSettingsPage - + &Add - + &Remove - + Add message - + Message: @@ -1876,27 +1876,27 @@ QObject - + Maindeck - + Sideboard - + Cockatrice decks (*.cod) - + Plain text decks (*.dec *.mwDeck) - + All files (*.*) @@ -2152,22 +2152,22 @@ Please enter a name: UserInterfaceSettingsPage - + General interface settings - + &Double-click cards to play them (instead of single-click) - + Animation settings - + &Tap/untap animation diff --git a/cockatrice/translations/cockatrice_es.ts b/cockatrice/translations/cockatrice_es.ts index fe4b1c2c..f6e1e6bd 100644 --- a/cockatrice/translations/cockatrice_es.ts +++ b/cockatrice/translations/cockatrice_es.ts @@ -4,47 +4,47 @@ AppearanceSettingsPage - + Zone background pictures Imagenes de la zona de fondo - + Path to hand background: Ruta a la imagen de fondo de la mano: - + Path to table background: Ruta a la imagen de fondo de la mesa: - + Path to player info background: Ruta a la imagen de fondo de la información del jugador: - + Path to picture of card back: Ruta al reverso de las cartas: - + Hand layout Disposición de la mano - + Display hand horizontally (wastes space) Mostrar la mano horizontalmente (desperdicia espacio) - + Table grid layout Disposición de la rejilla de la mesa - + Economical layout @@ -53,25 +53,25 @@ Disposición económica - + Zone view layout Distribución de la zona de visionado - + Sort by name Ordenar por nombre - + Sort by type Ordenar por tipo - - - + + + Choose path Elija ruta @@ -739,54 +739,66 @@ DlgSettings - - - + + + Error Error - Your card database is invalid. Please check if the path is set correctly. - Tu base de datos de cartas es invalida. Por favor, comprueba si la ruta está asignada correctamente. + Tu base de datos de cartas es invalida. Por favor, comprueba si la ruta está asignada correctamente. - The path to your deck directory is invalid. - La ruta a tu directorio de mazos es invalida. + La ruta a tu directorio de mazos es invalida. - The path to your card pictures directory is invalid. - La ruta a tu directorio de imagenes de las cartas es invalida. + La ruta a tu directorio de imagenes de las cartas es invalida. - + + Your card database is invalid. Would you like to go back and set the correct path? + + + + + The path to your deck directory is invalid. Would you like to go back and set the correct path? + + + + + The path to your card pictures directory is invalid. Would you like to go back and set the correct path? + + + + Settings Preferencias - + General General - + Appearance Apariencia - + User interface Interfaz de usuario - + Messages Mensajes - + &Close &Cerrar @@ -1493,22 +1505,22 @@ MessagesSettingsPage - + &Add &Añadir - + &Remove &Quitar - + Add message Añadir mensaje - + Message: Mensaje: @@ -1892,27 +1904,27 @@ QObject - + Maindeck Mazo principal - + Sideboard Reserva - + Cockatrice decks (*.cod) Mazos de Cockatrice (*.cod) - + Plain text decks (*.dec *.mwDeck) Archivos de texto plano (*.dec *.mwDeck) - + All files (*.*) Todos los archivos (*.*) @@ -2169,22 +2181,22 @@ Por favor, introduzca un nombre: UserInterfaceSettingsPage - + General interface settings Preferencias generales de la interfaz - + &Double-click cards to play them (instead of single-click) &Doble click en las cartas para jugarlas (en lugar de un solo click) - + Animation settings - + &Tap/untap animation diff --git a/common/color.h b/common/color.h new file mode 100644 index 00000000..af498fdb --- /dev/null +++ b/common/color.h @@ -0,0 +1,27 @@ +#ifndef COLOR_H +#define COLOR_H + +#ifdef QT_GUI_LIB +#include +#endif + +class Color { +private: + int value; +public: + Color(int _value = 0) : value(_value) { } + Color(int r, int g, int b) : value(r * 65536 + g * 256 + b) { } + int getValue() const { return value; } +#ifdef QT_GUI_LIB + Color(const QColor &_color) + { + value = _color.red() * 65536 + _color.green() * 256 + _color.blue(); + } + QColor getQColor() const + { + return QColor(value / 65536, (value % 65536) / 256, value % 256); + } +#endif +}; + +#endif \ No newline at end of file diff --git a/common/decklist.cpp b/common/decklist.cpp index c52ef8dd..ec5efbf5 100644 --- a/common/decklist.cpp +++ b/common/decklist.cpp @@ -1,5 +1,4 @@ #include -#include #include #include #include diff --git a/common/decklist.h b/common/decklist.h index 55545a28..eca8dda0 100644 --- a/common/decklist.h +++ b/common/decklist.h @@ -5,6 +5,7 @@ #include #include #include +#include #include "serializable_item.h" class CardDatabase; diff --git a/common/protocol_datastructures.cpp b/common/protocol_datastructures.cpp index a8f7a71f..dbe927e2 100644 --- a/common/protocol_datastructures.cpp +++ b/common/protocol_datastructures.cpp @@ -113,7 +113,7 @@ QList ServerInfo_Zone::getCardList() const return result; } -ServerInfo_Counter::ServerInfo_Counter(int _id, const QString &_name, const QColor &_color, int _radius, int _count) +ServerInfo_Counter::ServerInfo_Counter(int _id, const QString &_name, const Color &_color, int _radius, int _count) : SerializableItem_Map("counter") { insertItem(new SerializableItem_Int("id", _id)); @@ -123,7 +123,7 @@ ServerInfo_Counter::ServerInfo_Counter(int _id, const QString &_name, const QCol insertItem(new SerializableItem_Int("count", _count)); } -ServerInfo_Arrow::ServerInfo_Arrow(int _id, int _startPlayerId, const QString &_startZone, int _startCardId, int _targetPlayerId, const QString &_targetZone, int _targetCardId, const QColor &_color) +ServerInfo_Arrow::ServerInfo_Arrow(int _id, int _startPlayerId, const QString &_startZone, int _startCardId, int _targetPlayerId, const QString &_targetZone, int _targetCardId, const Color &_color) : SerializableItem_Map("arrow") { insertItem(new SerializableItem_Int("id", _id)); diff --git a/common/protocol_datastructures.h b/common/protocol_datastructures.h index f6ead555..6e498dbe 100644 --- a/common/protocol_datastructures.h +++ b/common/protocol_datastructures.h @@ -2,9 +2,9 @@ #define PROTOCOL_DATASTRUCTURES_H #include -#include #include #include "serializable_item.h" +#include "color.h" class DeckList; @@ -107,18 +107,18 @@ public: class ServerInfo_Counter : public SerializableItem_Map { public: - ServerInfo_Counter(int _id = -1, const QString &_name = QString(), const QColor &_color = QColor(), int _radius = -1, int _count = -1); + ServerInfo_Counter(int _id = -1, const QString &_name = QString(), const Color &_color = Color(), int _radius = -1, int _count = -1); static SerializableItem *newItem() { return new ServerInfo_Counter; } int getId() const { return static_cast(itemMap.value("id"))->getData(); } QString getName() const { return static_cast(itemMap.value("name"))->getData(); } - QColor getColor() const { return static_cast(itemMap.value("color"))->getData(); } + Color getColor() const { return static_cast(itemMap.value("color"))->getData(); } int getRadius() const { return static_cast(itemMap.value("radius"))->getData(); } int getCount() const { return static_cast(itemMap.value("count"))->getData(); } }; class ServerInfo_Arrow : public SerializableItem_Map { public: - ServerInfo_Arrow(int _id = -1, int _startPlayerId = -1, const QString &_startZone = QString(), int _startCardId = -1, int _targetPlayerId = -1, const QString &_targetZone = QString(), int _targetCardId = -1, const QColor &_color = QColor()); + ServerInfo_Arrow(int _id = -1, int _startPlayerId = -1, const QString &_startZone = QString(), int _startCardId = -1, int _targetPlayerId = -1, const QString &_targetZone = QString(), int _targetCardId = -1, const Color &_color = Color()); static SerializableItem *newItem() { return new ServerInfo_Arrow; } int getId() const { return static_cast(itemMap.value("id"))->getData(); } int getStartPlayerId() const { return static_cast(itemMap.value("start_player_id"))->getData(); } @@ -127,7 +127,7 @@ public: int getTargetPlayerId() const { return static_cast(itemMap.value("target_player_id"))->getData(); } QString getTargetZone() const { return static_cast(itemMap.value("target_zone"))->getData(); } int getTargetCardId() const { return static_cast(itemMap.value("target_card_id"))->getData(); } - QColor getColor() const { return static_cast(itemMap.value("color"))->getData(); } + Color getColor() const { return static_cast(itemMap.value("color"))->getData(); } }; class ServerInfo_PlayerProperties : public SerializableItem_Map { diff --git a/common/protocol_items.cpp b/common/protocol_items.cpp index 9c5c8d59..369bd518 100644 --- a/common/protocol_items.cpp +++ b/common/protocol_items.cpp @@ -152,7 +152,7 @@ Command_CreateToken::Command_CreateToken(int _gameId, const QString &_zone, cons insertItem(new SerializableItem_Int("x", _x)); insertItem(new SerializableItem_Int("y", _y)); } -Command_CreateArrow::Command_CreateArrow(int _gameId, int _startPlayerId, const QString &_startZone, int _startCardId, int _targetPlayerId, const QString &_targetZone, int _targetCardId, const QColor &_color) +Command_CreateArrow::Command_CreateArrow(int _gameId, int _startPlayerId, const QString &_startZone, int _startCardId, int _targetPlayerId, const QString &_targetZone, int _targetCardId, const Color &_color) : GameCommand("create_arrow", _gameId) { insertItem(new SerializableItem_Int("start_player_id", _startPlayerId)); @@ -207,7 +207,7 @@ Command_IncCounter::Command_IncCounter(int _gameId, int _counterId, int _delta) insertItem(new SerializableItem_Int("counter_id", _counterId)); insertItem(new SerializableItem_Int("delta", _delta)); } -Command_CreateCounter::Command_CreateCounter(int _gameId, const QString &_counterName, const QColor &_color, int _radius, int _value) +Command_CreateCounter::Command_CreateCounter(int _gameId, const QString &_counterName, const Color &_color, int _radius, int _value) : GameCommand("create_counter", _gameId) { insertItem(new SerializableItem_String("counter_name", _counterName)); diff --git a/common/protocol_items.h b/common/protocol_items.h index 3edfc650..277211e5 100644 --- a/common/protocol_items.h +++ b/common/protocol_items.h @@ -235,14 +235,14 @@ public: class Command_CreateArrow : public GameCommand { Q_OBJECT public: - Command_CreateArrow(int _gameId = -1, int _startPlayerId = -1, const QString &_startZone = QString(), int _startCardId = -1, int _targetPlayerId = -1, const QString &_targetZone = QString(), int _targetCardId = -1, const QColor &_color = QColor()); + Command_CreateArrow(int _gameId = -1, int _startPlayerId = -1, const QString &_startZone = QString(), int _startCardId = -1, int _targetPlayerId = -1, const QString &_targetZone = QString(), int _targetCardId = -1, const Color &_color = Color()); int getStartPlayerId() const { return static_cast(itemMap.value("start_player_id"))->getData(); }; QString getStartZone() const { return static_cast(itemMap.value("start_zone"))->getData(); }; int getStartCardId() const { return static_cast(itemMap.value("start_card_id"))->getData(); }; int getTargetPlayerId() const { return static_cast(itemMap.value("target_player_id"))->getData(); }; QString getTargetZone() const { return static_cast(itemMap.value("target_zone"))->getData(); }; int getTargetCardId() const { return static_cast(itemMap.value("target_card_id"))->getData(); }; - QColor getColor() const { return static_cast(itemMap.value("color"))->getData(); }; + Color getColor() const { return static_cast(itemMap.value("color"))->getData(); }; static SerializableItem *newItem() { return new Command_CreateArrow; } int getItemId() const { return ItemId_Command_CreateArrow; } }; @@ -314,9 +314,9 @@ public: class Command_CreateCounter : public GameCommand { Q_OBJECT public: - Command_CreateCounter(int _gameId = -1, const QString &_counterName = QString(), const QColor &_color = QColor(), int _radius = -1, int _value = -1); + Command_CreateCounter(int _gameId = -1, const QString &_counterName = QString(), const Color &_color = Color(), int _radius = -1, int _value = -1); QString getCounterName() const { return static_cast(itemMap.value("counter_name"))->getData(); }; - QColor getColor() const { return static_cast(itemMap.value("color"))->getData(); }; + Color getColor() const { return static_cast(itemMap.value("color"))->getData(); }; int getRadius() const { return static_cast(itemMap.value("radius"))->getData(); }; int getValue() const { return static_cast(itemMap.value("value"))->getData(); }; static SerializableItem *newItem() { return new Command_CreateCounter; } diff --git a/common/protocol_mc.pl b/common/protocol_mc.pl index 765b23e6..696915d9 100755 --- a/common/protocol_mc.pl +++ b/common/protocol_mc.pl @@ -109,9 +109,9 @@ while () { $constructorCode .= "\tinsertItem(new SerializableItem_Int(\"$value\", _$prettyVarName));\n"; $getFunctionCode .= "\t$dataType get$prettyVarName2() const { return static_cast(itemMap.value(\"$value\"))->getData(); };\n"; } elsif ($key eq 'c') { - $dataType = 'QColor'; - $constructorParamsH .= "const QColor &_$prettyVarName = QColor()"; - $constructorParamsCpp .= "const QColor &_$prettyVarName"; + $dataType = 'Color'; + $constructorParamsH .= "const Color &_$prettyVarName = Color()"; + $constructorParamsCpp .= "const Color &_$prettyVarName"; $constructorCode .= "\tinsertItem(new SerializableItem_Color(\"$value\", _$prettyVarName));\n"; $getFunctionCode .= "\t$dataType get$prettyVarName2() const { return static_cast(itemMap.value(\"$value\"))->getData(); };\n"; } diff --git a/common/serializable_item.cpp b/common/serializable_item.cpp index 7815259b..9a091e45 100644 --- a/common/serializable_item.cpp +++ b/common/serializable_item.cpp @@ -116,29 +116,19 @@ void SerializableItem_Bool::writeElement(QXmlStreamWriter *xml) xml->writeCharacters(data ? "1" : "0"); } -int SerializableItem_Color::colorToInt(const QColor &color) const -{ - return color.red() * 65536 + color.green() * 256 + color.blue(); -} - -QColor SerializableItem_Color::colorFromInt(int colorValue) const -{ - return QColor(colorValue / 65536, (colorValue % 65536) / 256, colorValue % 256); -} - bool SerializableItem_Color::readElement(QXmlStreamReader *xml) { if (xml->isCharacters() && !xml->isWhitespace()) { bool ok; int colorValue = xml->text().toString().toInt(&ok); - data = ok ? colorFromInt(colorValue) : Qt::black; + data = ok ? Color(colorValue) : Color(); } return SerializableItem::readElement(xml); } void SerializableItem_Color::writeElement(QXmlStreamWriter *xml) { - xml->writeCharacters(QString::number(colorToInt(data))); + xml->writeCharacters(QString::number(data.getValue())); } bool SerializableItem_DateTime::readElement(QXmlStreamReader *xml) diff --git a/common/serializable_item.h b/common/serializable_item.h index 54dd44a1..4867d8a1 100644 --- a/common/serializable_item.h +++ b/common/serializable_item.h @@ -6,8 +6,8 @@ #include #include #include -#include #include +#include "color.h" class QXmlStreamReader; class QXmlStreamWriter; @@ -111,17 +111,15 @@ public: class SerializableItem_Color : public SerializableItem { private: - QColor data; - int colorToInt(const QColor &color) const; - QColor colorFromInt(int colorValue) const; + Color data; protected: bool readElement(QXmlStreamReader *xml); void writeElement(QXmlStreamWriter *xml); public: - SerializableItem_Color(const QString &_itemType, const QColor &_data) + SerializableItem_Color(const QString &_itemType, const Color &_data) : SerializableItem(_itemType), data(_data) { } - const QColor &getData() { return data; } - void setData(const QColor &_data) { data = _data; } + const Color &getData() { return data; } + void setData(const Color &_data) { data = _data; } }; class SerializableItem_DateTime : public SerializableItem { diff --git a/common/server_arrow.h b/common/server_arrow.h index d82ac6cd..e608a20b 100644 --- a/common/server_arrow.h +++ b/common/server_arrow.h @@ -1,7 +1,7 @@ #ifndef SERVER_ARROW_H #define SERVER_ARROW_H -#include +#include "color.h" class Server_Card; class Server_ArrowTarget; @@ -11,14 +11,14 @@ private: int id; Server_Card *startCard; Server_ArrowTarget *targetItem; - QColor color; + Color color; public: - Server_Arrow(int _id, Server_Card *_startCard, Server_ArrowTarget *_targetItem, const QColor &_color) + Server_Arrow(int _id, Server_Card *_startCard, Server_ArrowTarget *_targetItem, const Color &_color) : id(_id), startCard(_startCard), targetItem(_targetItem), color(_color) { } int getId() const { return id; } Server_Card *getStartCard() const { return startCard; } Server_ArrowTarget *getTargetItem() const { return targetItem; } - QColor getColor() const { return color; } + const Color &getColor() const { return color; } }; #endif diff --git a/common/server_counter.h b/common/server_counter.h index aa3fe071..20a438a6 100644 --- a/common/server_counter.h +++ b/common/server_counter.h @@ -21,21 +21,21 @@ #define SERVER_COUNTER_H #include -#include +#include "color.h" class Server_Counter { protected: int id; QString name; - QColor color; + Color color; int radius; int count; public: - Server_Counter(int _id, const QString &_name, const QColor &_color, int _radius, int _count = 0) : id(_id), name(_name), color(_color), radius(_radius), count(_count) { } + Server_Counter(int _id, const QString &_name, const Color &_color, int _radius, int _count = 0) : id(_id), name(_name), color(_color), radius(_radius), count(_count) { } ~Server_Counter() { } int getId() const { return id; } QString getName() const { return name; } - QColor getColor() const { return color; } + Color getColor() const { return color; } int getRadius() const { return radius; } int getCount() const { return count; } void setCount(int _count) { count = _count; } diff --git a/common/server_player.cpp b/common/server_player.cpp index daed7b1a..4a6fd692 100644 --- a/common/server_player.cpp +++ b/common/server_player.cpp @@ -67,14 +67,14 @@ void Server_Player::setupZones() addZone(new Server_CardZone(this, "grave", false, PublicZone)); addZone(new Server_CardZone(this, "rfg", false, PublicZone)); - addCounter(new Server_Counter(0, "life", Qt::white, 25, 20)); - addCounter(new Server_Counter(1, "w", QColor(255, 255, 150), 20, 0)); - addCounter(new Server_Counter(2, "u", QColor(150, 150, 255), 20, 0)); - addCounter(new Server_Counter(3, "b", QColor(150, 150, 150), 20, 0)); - addCounter(new Server_Counter(4, "r", QColor(250, 150, 150), 20, 0)); - addCounter(new Server_Counter(5, "g", QColor(150, 255, 150), 20, 0)); - addCounter(new Server_Counter(6, "x", QColor(255, 255, 255), 20, 0)); - addCounter(new Server_Counter(7, "storm", QColor(255, 255, 255), 20, 0)); + addCounter(new Server_Counter(0, "life", Color(255, 255, 255), 25, 20)); + addCounter(new Server_Counter(1, "w", Color(255, 255, 150), 20, 0)); + addCounter(new Server_Counter(2, "u", Color(150, 150, 255), 20, 0)); + addCounter(new Server_Counter(3, "b", Color(150, 150, 150), 20, 0)); + addCounter(new Server_Counter(4, "r", Color(250, 150, 150), 20, 0)); + addCounter(new Server_Counter(5, "g", Color(150, 255, 150), 20, 0)); + addCounter(new Server_Counter(6, "x", Color(255, 255, 255), 20, 0)); + addCounter(new Server_Counter(7, "storm", Color(255, 255, 255), 20, 0)); initialCards = 7; diff --git a/servatrice/servatrice.pro b/servatrice/servatrice.pro index 60f04b7c..d89ecf08 100755 --- a/servatrice/servatrice.pro +++ b/servatrice/servatrice.pro @@ -11,9 +11,11 @@ OBJECTS_DIR = build CONFIG += qt debug QT += network sql +QT -= gui HEADERS += src/servatrice.h \ src/serversocketinterface.h \ + ../common/color.h \ ../common/serializable_item.h \ ../common/decklist.h \ ../common/protocol.h \