summaryrefslogtreecommitdiffstats
path: root/pacman-c++/block.cpp
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2011-04-12 14:45:24 +0200
committermanuel <manuel@mausz.at>2011-04-12 14:45:24 +0200
commitdbeba838ea813b620ec571265c8ea417403fc81c (patch)
treecf085b766ba8dad8146190dc7f438160b839feb4 /pacman-c++/block.cpp
parentb695f67ef718724144a3a5c4be42be373b0f691f (diff)
downloadfoop-dbeba838ea813b620ec571265c8ea417403fc81c.tar.gz
foop-dbeba838ea813b620ec571265c8ea417403fc81c.tar.bz2
foop-dbeba838ea813b620ec571265c8ea417403fc81c.zip
make the server a non gui application
this required a lot of reorganization: - don't create ANY pixmaps. that requires QtGui - don't create and QtWidgets - thus SceneHolder is now a QGraphisScene itself - and MainWidgets is a QWidget having SceneHolder as member variable
Diffstat (limited to 'pacman-c++/block.cpp')
-rw-r--r--pacman-c++/block.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/pacman-c++/block.cpp b/pacman-c++/block.cpp
index c168c00..b1ce0e0 100644
--- a/pacman-c++/block.cpp
+++ b/pacman-c++/block.cpp
@@ -7,6 +7,10 @@ QMap<Color::Color, QPixmap> Block::m_pixmaps;
7Block::Block(Color::Color color, unsigned int neighbours, QGraphicsItem *parent) 7Block::Block(Color::Color color, unsigned int neighbours, QGraphicsItem *parent)
8 : PixmapItem(parent) 8 : PixmapItem(parent)
9{ 9{
10 /* empty object for servers */
11 if (Constants::server)
12 return;
13
10 if (m_pixmaps.find(color) == m_pixmaps.end()) 14 if (m_pixmaps.find(color) == m_pixmaps.end())
11 { 15 {
12 unsigned int colid = (color == Color::none) ? 0 : (color >> 1) + 1; 16 unsigned int colid = (color == Color::none) ? 0 : (color >> 1) + 1;