File indexing completed on 2024-04-28 07:54:13

0001 /***************************************************************************
0002                           backgnd.cpp  -  description
0003                              -------------------
0004     begin                : Wed Jul 18 2001
0005     copyright            : (C) 2001-2006 by Gael de Chalendar (aka Kleag)
0006     email                : kleag@free.fr
0007  ***************************************************************************/
0008 
0009 /***************************************************************************
0010  *                                                                         *
0011  *   This program is free software; you can redistribute it and/or modify  *
0012  *   it under the terms of the GNU General Public License as published by  *
0013  *   the Free Software Foundation; either either version 2
0014    of the License, or (at your option) any later version.of the License, or     *
0015  *   (at your option) any later version.                                   *
0016  *                                                                         *
0017  *   You should have received a copy of the GNU General Public License
0018  *   along with this program; if not, write to the Free Software
0019  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
0020  *   02110-1301, USA
0021  ***************************************************************************/
0022  
0023 #include "backgnd.h"
0024 #include "GameLogic/onu.h"
0025 
0026 #include <QPixmap>
0027 
0028 #include "ksirk_debug.h"
0029 
0030 namespace Ksirk
0031 {
0032 
0033 using namespace GameLogic;
0034 
0035 BackGnd::BackGnd(QGraphicsScene *scene, const GameLogic::ONU* theWorld, bool arena) :
0036     QGraphicsPixmapItem(nullptr), m_theWorld(theWorld), m_bgIsArena(arena)
0037 {
0038   scene->addItem(this);
0039   qCDebug(KSIRK_LOG) << "BackGnd constructor";
0040 
0041   QPixmap pix;
0042   if (arena == false) {
0043     pix = theWorld->map();
0044     // put the image
0045     setPixmap(pix);
0046   }
0047 
0048   setZValue(1);
0049   show();
0050 }
0051 
0052 BackGnd::~BackGnd()
0053 {
0054 //   m_frame = 0;
0055 }
0056 
0057 
0058 
0059 }