Commit a095e7c6 authored by Gaël de Chalendar's avatar Gaël de Chalendar
Browse files

Converted realpol skin pngs to svg

svn path=/trunk/playground/games/ksirk/; revision=648298
parent d6916f82
......@@ -16,11 +16,14 @@ In the current version, KsirK is a usable multi-player mono-machine game with a
The goal of the game is simply to conquer the World... It is done by attacking your neighbors with your armies.
</description>
<ignoreparts/>
<ignoreparts>
<part>kdevfileview</part>
</ignoreparts>
<projectdirectory>.</projectdirectory>
<absoluteprojectpath>false</absoluteprojectpath>
<secondaryLanguages/>
<versioncontrol>kdevsubversion</versioncontrol>
<projectname>KsirK</projectname>
</general>
<kdevfileview>
<groups>
......@@ -34,7 +37,7 @@ The goal of the game is simply to conquer the World... It is done by attacking y
</groups>
<tree>
<hidenonprojectfiles>false</hidenonprojectfiles>
<hidepatterns></hidepatterns>
<hidepatterns/>
<showvcsfields>false</showvcsfields>
</tree>
</kdevfileview>
......@@ -224,6 +227,21 @@ The goal of the game is simply to conquer the World... It is done by attacking y
<argumentsHintDelay>400</argumentsHintDelay>
<automaticHeaderCompletion>true</automaticHeaderCompletion>
<headerCompletionDelay>250</headerCompletionDelay>
<showOnlyAccessibleItems>false</showOnlyAccessibleItems>
<completionBoxItemOrder>0</completionBoxItemOrder>
<howEvaluationContextMenu>true</howEvaluationContextMenu>
<showCommentWithArgumentHint>true</showCommentWithArgumentHint>
<statusBarTypeEvaluation>false</statusBarTypeEvaluation>
<namespaceAliases>std=_GLIBCXX_STD;__gnu_cxx=std</namespaceAliases>
<processPrimaryTypes>true</processPrimaryTypes>
<processFunctionArguments>false</processFunctionArguments>
<preProcessAllHeaders>false</preProcessAllHeaders>
<parseMissingHeaders>false</parseMissingHeaders>
<resolveIncludePaths>true</resolveIncludePaths>
<alwaysParseInBackground>true</alwaysParseInBackground>
<usePermanentCaching>true</usePermanentCaching>
<alwaysIncludeNamespaces>false</alwaysIncludeNamespaces>
<includePaths>.;</includePaths>
</codecompletion>
<references/>
<designerintegration>
......@@ -243,6 +261,11 @@ The goal of the game is simply to conquer the World... It is done by attacking y
<used>false</used>
<version>3</version>
<root>/usr/lib/qt3/</root>
<includestyle>3</includestyle>
<designerintegration>EmbeddedKDevDesigner</designerintegration>
<qmake>/usr/lib/qt3//bin/qmake</qmake>
<designer>/usr/bin/designer-qt3</designer>
<designerpluginpaths/>
</qt>
</kdevcppsupport>
<kdevcvsservice>
......
# add_subdirectory( Dialogs )
# add_subdirectory( GameLogic )
# add_subdirectory( SaveLoad )
# add_subdirectory( skins )
add_subdirectory( skins )
# add_subdirectory( Sprites )
include_directories(
......@@ -100,131 +100,131 @@ install( FILES ksirksettings.kcfg DESTINATION ${KCFG_INSTALL_DIR} )
install( FILES ksirk.desktop DESTINATION ${XDG_APPS_DIR} )
install( FILES ksirk.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
install(FILES skins/skinsdir DESTINATION ${DATA_INSTALL_DIR}/ksirk/skins )
install(FILES skins/default/Data/onu.xml DESTINATION ${DATA_INSTALL_DIR}/ksirk/skins/default/Data )
set (pics_default_DATA
./skins/default/Images/reddice1.png
./skins/default/Images/reddice2.png
./skins/default/Images/reddice3.png
./skins/default/Images/reddice4.png
./skins/default/Images/reddice5.png
./skins/default/Images/reddice6.png
./skins/default/Images/bluedice1.png
./skins/default/Images/bluedice2.png
./skins/default/Images/bluedice3.png
./skins/default/Images/bluedice4.png
./skins/default/Images/bluedice5.png
./skins/default/Images/bluedice6.png
./skins/default/Images/snapshot.jpg
./skins/default/Images/moveFinish.png
./skins/default/Images/joueurSuivant.png
./skins/default/Images/moveBackFive.png
./skins/default/Images/moveFive.png
./skins/default/Images/newNetGame.png
./skins/default/Images/moveArmies.png
./skins/default/Images/saveGame.png
./skins/default/Images/attackTwo.png
./skins/default/Images/aide.png
./skins/default/Images/map.svg
./skins/default/Images/moveOne.png
./skins/default/Images/preferences.png
./skins/default/Images/countries/vietnam.png
./skins/default/Images/countries/japan.png
./skins/default/Images/countries/westus.png
./skins/default/Images/countries/middleeast.png
./skins/default/Images/countries/ontario.png
./skins/default/Images/countries/brazil.png
./skins/default/Images/countries/mongolia.png
./skins/default/Images/countries/algeria.png
./skins/default/Images/countries/zair.png
./skins/default/Images/countries/eastus.png
./skins/default/Images/countries/france.png
./skins/default/Images/countries/egypt.png
./skins/default/Images/countries/prussia.png
./skins/default/Images/countries/iran.png
./skins/default/Images/countries/alaska.png
./skins/default/Images/countries/kazakstan.png
./skins/default/Images/countries/arabia.png
./skins/default/Images/countries/chile.png
./skins/default/Images/countries/scandinavia.png
./skins/default/Images/countries/china.png
./skins/default/Images/countries/island.png
./skins/default/Images/countries/benelux.png
./skins/default/Images/countries/quebec.png
./skins/default/Images/countries/alberta.png
./skins/default/Images/countries/papouasia.png
./skins/default/Images/countries/gabon.png
./skins/default/Images/countries/pakistan.png
./skins/default/Images/countries/groenland.png
./skins/default/Images/countries/india.png
./skins/default/Images/countries/newzealand.png
./skins/default/Images/countries/westernaustralia.png
./skins/default/Images/countries/mexico.png
./skins/default/Images/countries/uk.png
./skins/default/Images/countries/russia.png
./skins/default/Images/countries/paraguay.png
./skins/default/Images/countries/siberia.png
./skins/default/Images/countries/newsouthwalles.png
./skins/default/Images/countries/niger.png
./skins/default/Images/countries/madagascar.png
./skins/default/Images/countries/columbia.png
./skins/default/Images/countries/indonesia.png
./skins/default/Images/countries/southafrica.png
./skins/default/Images/sprites/exploding.png
./skins/default/Images/sprites/belgium.png
./skins/default/Images/sprites/japan.png
./skins/default/Images/sprites/infantry.png
./skins/default/Images/sprites/france.png
./skins/default/Images/sprites/cavalry.png
./skins/default/Images/sprites/8020.png
./skins/default/Images/sprites/uk.png
./skins/default/Images/sprites/us.png
./skins/default/Images/sprites/cannon.png
./skins/default/Images/sprites/firing.png
./skins/default/Images/sprites/italy.png
./skins/default/Images/attackOne.png
./skins/default/Images/annuler.png
./skins/default/Images/map-mask.png
./skins/default/Images/pool-en.png
./skins/default/Images/quitter.png
./skins/default/Images/moveBackTen.png
./skins/default/Images/ouvrirJeu.png
./skins/default/Images/logoRight.png
./skins/default/Images/distributionArmeesFinie.png
./skins/default/Images/distributionArmees.png
./skins/default/Images/logoLeft.png
./skins/default/Images/defendTwo.png
./skins/default/Images/attackThree.png
./skins/default/Images/SoldatAGenoux1.png
./skins/default/Images/defendOne.png
./skins/default/Images/nouveauJeu.png
./skins/default/Images/moveTen.png
./skins/default/Images/moveBackOne.png
)
install( FILES ${pics_default_DATA} DESTINATION ${DATA_INSTALL_DIR}/ksirk/skins/default/Images/ )
set (sprites_default_DATA
skins/default/Images/sprites/belgium.svg
skins/default/Images/sprites/cannon.svg
skins/default/Images/sprites/cavalry.svg
skins/default/Images/sprites/exploding.svg
skins/default/Images/sprites/firing.svg
skins/default/Images/sprites/france.svg
skins/default/Images/sprites/infantry.svg
skins/default/Images/sprites/italy.svg
skins/default/Images/sprites/japan.svg
skins/default/Images/sprites/uk.svg
skins/default/Images/sprites/us.svg)
install( FILES ${sprites_default_DATA} DESTINATION ${DATA_INSTALL_DIR}/ksirk/skins/default/Images/sprites )
set (sounds_default_DATA
skins/default/Sounds/canon.wav
skins/default/Sounds/crash.wav
skins/default/Sounds/roule.wav)
install(FILES ${sounds_default_DATA} DESTINATION ${DATA_INSTALL_DIR}/ksirk/skins/default/Sounds)
# install(FILES skins/skinsdir DESTINATION ${DATA_INSTALL_DIR}/ksirk/skins )
#
# install(FILES skins/default/Data/onu.xml DESTINATION ${DATA_INSTALL_DIR}/ksirk/skins/default/Data )
#
# set (pics_default_DATA
# ./skins/default/Images/reddice1.png
# ./skins/default/Images/reddice2.png
# ./skins/default/Images/reddice3.png
# ./skins/default/Images/reddice4.png
# ./skins/default/Images/reddice5.png
# ./skins/default/Images/reddice6.png
# ./skins/default/Images/bluedice1.png
# ./skins/default/Images/bluedice2.png
# ./skins/default/Images/bluedice3.png
# ./skins/default/Images/bluedice4.png
# ./skins/default/Images/bluedice5.png
# ./skins/default/Images/bluedice6.png
# ./skins/default/Images/snapshot.jpg
# ./skins/default/Images/moveFinish.png
# ./skins/default/Images/joueurSuivant.png
# ./skins/default/Images/moveBackFive.png
# ./skins/default/Images/moveFive.png
# ./skins/default/Images/newNetGame.png
# ./skins/default/Images/moveArmies.png
# ./skins/default/Images/saveGame.png
# ./skins/default/Images/attackTwo.png
# ./skins/default/Images/aide.png
# ./skins/default/Images/map.svg
# ./skins/default/Images/moveOne.png
# ./skins/default/Images/preferences.png
# ./skins/default/Images/countries/vietnam.png
# ./skins/default/Images/countries/japan.png
# ./skins/default/Images/countries/westus.png
# ./skins/default/Images/countries/middleeast.png
# ./skins/default/Images/countries/ontario.png
# ./skins/default/Images/countries/brazil.png
# ./skins/default/Images/countries/mongolia.png
# ./skins/default/Images/countries/algeria.png
# ./skins/default/Images/countries/zair.png
# ./skins/default/Images/countries/eastus.png
# ./skins/default/Images/countries/france.png
# ./skins/default/Images/countries/egypt.png
# ./skins/default/Images/countries/prussia.png
# ./skins/default/Images/countries/iran.png
# ./skins/default/Images/countries/alaska.png
# ./skins/default/Images/countries/kazakstan.png
# ./skins/default/Images/countries/arabia.png
# ./skins/default/Images/countries/chile.png
# ./skins/default/Images/countries/scandinavia.png
# ./skins/default/Images/countries/china.png
# ./skins/default/Images/countries/island.png
# ./skins/default/Images/countries/benelux.png
# ./skins/default/Images/countries/quebec.png
# ./skins/default/Images/countries/alberta.png
# ./skins/default/Images/countries/papouasia.png
# ./skins/default/Images/countries/gabon.png
# ./skins/default/Images/countries/pakistan.png
# ./skins/default/Images/countries/groenland.png
# ./skins/default/Images/countries/india.png
# ./skins/default/Images/countries/newzealand.png
# ./skins/default/Images/countries/westernaustralia.png
# ./skins/default/Images/countries/mexico.png
# ./skins/default/Images/countries/uk.png
# ./skins/default/Images/countries/russia.png
# ./skins/default/Images/countries/paraguay.png
# ./skins/default/Images/countries/siberia.png
# ./skins/default/Images/countries/newsouthwalles.png
# ./skins/default/Images/countries/niger.png
# ./skins/default/Images/countries/madagascar.png
# ./skins/default/Images/countries/columbia.png
# ./skins/default/Images/countries/indonesia.png
# ./skins/default/Images/countries/southafrica.png
# ./skins/default/Images/sprites/exploding.png
# ./skins/default/Images/sprites/belgium.png
# ./skins/default/Images/sprites/japan.png
# ./skins/default/Images/sprites/infantry.png
# ./skins/default/Images/sprites/france.png
# ./skins/default/Images/sprites/cavalry.png
# ./skins/default/Images/sprites/8020.png
# ./skins/default/Images/sprites/uk.png
# ./skins/default/Images/sprites/us.png
# ./skins/default/Images/sprites/cannon.png
# ./skins/default/Images/sprites/firing.png
# ./skins/default/Images/sprites/italy.png
# ./skins/default/Images/attackOne.png
# ./skins/default/Images/annuler.png
# ./skins/default/Images/map-mask.png
# ./skins/default/Images/pool-en.png
# ./skins/default/Images/quitter.png
# ./skins/default/Images/moveBackTen.png
# ./skins/default/Images/ouvrirJeu.png
# ./skins/default/Images/logoRight.png
# ./skins/default/Images/distributionArmeesFinie.png
# ./skins/default/Images/distributionArmees.png
# ./skins/default/Images/logoLeft.png
# ./skins/default/Images/defendTwo.png
# ./skins/default/Images/attackThree.png
# ./skins/default/Images/SoldatAGenoux1.png
# ./skins/default/Images/defendOne.png
# ./skins/default/Images/nouveauJeu.png
# ./skins/default/Images/moveTen.png
# ./skins/default/Images/moveBackOne.png
# )
# install( FILES ${pics_default_DATA} DESTINATION ${DATA_INSTALL_DIR}/ksirk/skins/default/Images/ )
#
# set (sprites_default_DATA
# skins/default/Images/sprites/belgium.svg
# skins/default/Images/sprites/cannon.svg
# skins/default/Images/sprites/cavalry.svg
# skins/default/Images/sprites/exploding.svg
# skins/default/Images/sprites/firing.svg
# skins/default/Images/sprites/france.svg
# skins/default/Images/sprites/infantry.svg
# skins/default/Images/sprites/italy.svg
# skins/default/Images/sprites/japan.svg
# skins/default/Images/sprites/uk.svg
# skins/default/Images/sprites/us.svg)
#
# install( FILES ${sprites_default_DATA} DESTINATION ${DATA_INSTALL_DIR}/ksirk/skins/default/Images/sprites )
#
# set (sounds_default_DATA
# skins/default/Sounds/canon.wav
# skins/default/Sounds/crash.wav
# skins/default/Sounds/roule.wav)
#
# install(FILES ${sounds_default_DATA} DESTINATION ${DATA_INSTALL_DIR}/ksirk/skins/default/Sounds)
#
#
INCLUDES = -I$(top_srcdir)/. -I$(top_srcdir)/ksirk \
-I$(top_srcdir)/ksirk/Dialogs -I$(top_srcdir)/kgame-patch $(all_includes)
METASOURCES = AUTO
lib_LTLIBRARIES = libksirk_dialogs.la
libksirk_dialogs_la_LDFLAGS = $(all_libraries)
libksirk_dialogs_la_SOURCES = newGameDialog.ui qplayersetupdialog.ui \
qwaitedplayersetupdialog.ui newGameDialogImpl.cpp kplayersetupdialog.cpp \
kwaitedplayersetupdialog.cpp
noinst_HEADERS = kwaitedplayersetupdialog.h qwaitedplayersetupdialog.h
......@@ -53,14 +53,14 @@ KPlayerSetupDialog::KPlayerSetupDialog( GameLogic::ONU* onu,
bool &computerPlayer,
std::map< QString, QString >& nations,
QString& nationName,
QWidget *parent, const char */*name*/) :
QWidget *parent) :
QDialog(parent), Ui::QPlayerSetupDialog(), name(playerName),
computer(computerPlayer), m_nationName(nationName),
m_nations(nations), m_onu(onu), m_nationsNames(), number(playerNumber),
m_password(password)
{
kDebug() << "KPlayerSetupDialog constructor" << endl;
setupUi(this);
// kDebug() << "KPlayerSetupDialog constructor" << endl;
QString labelString = i18n("Player Number %1, please type in your name<BR>and choose your nation:",number);
TextLabel1-> setText(labelString);
fillNationsCombo();
......@@ -68,16 +68,19 @@ KPlayerSetupDialog::KPlayerSetupDialog( GameLogic::ONU* onu,
passwordEdit->setEnabled(true);
QObject::connect((const QObject *)PushButton1, SIGNAL(clicked()), this, SLOT(slotOK()) );
// kDebug() << "KPlayerSetupDialog connecting to playerJoinedGame" << endl;
kDebug() << "KPlayerSetupDialog connecting to playerJoinedGame" << endl;
connect(&GameLogic::GameAutomaton::changeable(),SIGNAL(signalPlayerJoinedGame(KPlayer*)),
this,SLOT(slotPlayerJoinedGame(KPlayer*)));
LineEdit2->setFocus();
connect(nationCombo, SIGNAL(activated(int)), this, SLOT(slotNationChanged()));
kDebug() << "KPlayerSetupDialog constructor done" << endl;
}
KPlayerSetupDialog::~KPlayerSetupDialog(){
hide();
}
void KPlayerSetupDialog::slotOK()
......@@ -117,7 +120,7 @@ void KPlayerSetupDialog::reject() {
void KPlayerSetupDialog::fillNationsCombo()
{
// kDebug() << "Filling nations combo" << endl;
kDebug() << "Filling nations combo" << endl;
KStandardDirs *m_dirs = KGlobal::dirs();
std::map< QString, QString >::const_iterator nationsIt, nationsIt_end;
......@@ -136,16 +139,15 @@ void KPlayerSetupDialog::fillNationsCombo()
exit(2);
}
// load image
QPixmap flag;
QSize size(flag.width()/Sprites::SkinSpritesData::single().intData("flag-frames"),flag.height());
QSvgRenderer renderer;
renderer.load(imgName);
QSize size(renderer.defaultSize().width()/Sprites::SkinSpritesData::single().intData("flag-frames"),renderer.defaultSize().height());
QImage image(size, QImage::Format_ARGB32_Premultiplied);
image.fill(0);
QPainter p(&image);
QSvgRenderer renderer;
renderer.load(imgName);
renderer.render(&p/*, svgid*/);
QPixmap allpm = QPixmap::fromImage(image);
flag = allpm.copy(0, 0, size.width(), size.height());
QPixmap flag = allpm.copy(0, 0, size.width(), size.height());
// get name
......@@ -155,7 +157,7 @@ void KPlayerSetupDialog::fillNationsCombo()
nationCombo->addItem(QIcon(flag),name);
}
kDebug() << "Nations combo filled" << endl;
}
void KPlayerSetupDialog::slotPlayerJoinedGame(KPlayer* player)
......
......@@ -55,7 +55,7 @@ public:
bool &computerPlayer,
std::map< QString, QString >& nations,
QString & nationName,
QWidget *parent=0, const char *name=0);
QWidget *parent=0);
virtual ~KPlayerSetupDialog();
......
#! /usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2006 (ita)
#from Object import createObj
obj = bld.create_obj('kde', 'shlib')
obj.find_sources_in_dirs('.')
obj.uselib = 'QT KDECORE'
obj.target = 'ksirk_dialogs'
obj.includes = '. .. ../../kgame-patch'
INCLUDES = -I$(top_srcdir)/. -I$(top_srcdir)/kgame-patch -I$(top_srcdir)/ksirk \
-I$(top_srcdir)/ksirk/Dialogs -I$(top_srcdir)/ksirk/GameLogic -I.. $(all_includes)
METASOURCES = AUTO
lib_LTLIBRARIES = libksirk_gamelogic.la
libksirk_gamelogic_la_LDFLAGS = $(all_libraries)
libksirk_gamelogic_la_SOURCES = player.cpp onu.cpp dice.cpp gameautomaton.cpp \
aiplayer.cpp continent.cpp country.cpp nationality.cpp aiplayerio.cpp \
eventslistproperty.cpp kstringvector.cpp goal.cpp
noinst_HEADERS = gameautomaton.h aiplayerio.h eventslistproperty.h \
KMessageParts.h goal.h
......@@ -73,7 +73,7 @@ Country::~Country()
void Country::reset()
{
// kDebug() << "Country::reset" << endl;
kDebug() << "Country::reset " << m_name << endl;
clearAllSprites();
m_belongsTo = 0;
nbArmies(1);
......
......@@ -1423,7 +1423,7 @@ void GameAutomaton::changePlayerName(Player* player)
mes = i18n("Player number %d, what's your name ?", 1);
bool network = false;
QString password;
KPlayerSetupDialog(m_game->theWorld(), 1, nomEntre, network, password, computer, nations, nationName, m_game, "KDialogSetupPlayer").exec();
KPlayerSetupDialog(m_game->theWorld(), 1, nomEntre, network, password, computer, nations, nationName, m_game).exec();
// kDebug() << "After KPlayerSetupDialog. name: " << nomEntre << endl;
if (nomEntre.isEmpty())
{
......@@ -1484,7 +1484,7 @@ void GameAutomaton::changePlayerNation(Player* player)
KMessageBox::information(m_game, i18n("Please choose another nation"), i18n("KsirK - Nation already used !"));
bool network = false;
QString password = false;
KPlayerSetupDialog(m_game->theWorld(), 1, nomEntre, network, password, computer, nations, nationName, m_game, "KDialogSetupPlayer").exec();
KPlayerSetupDialog(m_game->theWorld(), 1, nomEntre, network, password, computer, nations, nationName, m_game).exec();
QByteArray buffer;
QDataStream stream(&buffer, QIODevice::WriteOnly);
stream << player->name() << nationName;
......@@ -1522,13 +1522,15 @@ void GameAutomaton::slotPropertyChanged(KGamePropertyBase *prop,KGame *)
kDebug() << "GameAutomaton::slotPropertyChanged " << prop->id() << endl;
if (prop->id() == m_skinId)
{
// kDebug() << "skin changed to: " << m_skin << endl;
kDebug() << "skin changed to: " << m_skin << endl;
m_game->newSkin();
}
kDebug() << "END GameAutomaton::slotPropertyChanged " << prop->id() << endl;
}
void GameAutomaton::slotClientJoinedGame(quint32 clientid, KGame* /*me*/)
{
kDebug() << "GameAutomaton::slotClientJoinedGame " << clientid << endl;
if (isAdmin() && clientid!=gameId())
{
QByteArray buffernbp;
......@@ -1558,6 +1560,8 @@ void GameAutomaton::slotClientJoinedGame(quint32 clientid, KGame* /*me*/)
void GameAutomaton::slotConnectionToServerBroken()
{
kDebug() << "GameAutomaton::slotConnectionToServerBroken" << endl;
// m_game->haltTimer();
if (m_state != GAME_OVER)
{
......@@ -1582,6 +1586,7 @@ void GameAutomaton::slotConnectionToServerBroken()
void GameAutomaton::slotConnectionToClientBroken(KMessageIO *)
{
kDebug() << "GameAutomaton::slotConnectionToClientBroken" << endl;
// m_game->haltTimer();
if (m_state != GAME_OVER)
{
......@@ -1607,6 +1612,7 @@ void GameAutomaton::slotConnectionToClientBroken(KMessageIO *)
void GameAutomaton::slotNetworkData(int msgid, const QByteArray &buffer, quint32 receiver, quint32 sender)
{
kDebug() << "GameAutomaton::slotNetworkData msg " << msgid << " ; rec="<<receiver << " snd=" << sender << endl;
if (m_game == 0)
{
exit(0);
......@@ -1862,7 +1868,7 @@ void GameAutomaton::slotNetworkData(int msgid, const QByteArray &buffer, quint32
// kDebug() << "VoteRecyclingFinished nb after : " << m_choosedToRecycleNumber << endl;
messageParts << playersNames << QString::number(m_choosedToRecycleNumber);
m_game->broadcastChangeItem(messageParts, ID_NO_STATUS_MSG);
if (m_choosedToRecycleNumber == playerList()->count())
if (m_choosedToRecycleNumber == (unsigned int)(playerList()->count()))
{
m_game->actionRecyclingFinished();
m_choosedToRecycle.clear();
......
......@@ -114,6 +114,7 @@ ONU::ONU(const QString& configFileName):
// root.attribute("map");
QString mapString = root.attribute("map");
kDebug() << "Map path: " << mapString << endl;
kDebug() << "Searching resource: " << (m_skin + '/' + mapString) << endl;
m_mapFileName = KGlobal::dirs()-> findResource("appdata", m_skin + '/' + mapString);
kDebug() << "Map file name: " << m_mapFileName << endl;
if (m_mapFileName.isEmpty())
......@@ -604,7 +605,7 @@ Continent* ONU::continentNamed(const QString& name)
void ONU::buildMap()
{
kDebug() << "ONU::buildMap" << endl;
QSize size(m_renderer.defaultSize().width()*m_zoom,m_renderer.defaultSize().height()*m_zoom);
QSize size((int)(m_renderer.defaultSize().width()*m_zoom),(int)(m_renderer.defaultSize().height()*m_zoom));
QImage image(size, QImage::Format_ARGB32_Premultiplied);
image.fill(0);
QPainter p(&image);
......
#! /usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2006 (ita)
#from Object import createObj
obj = bld.create_obj('kde', 'shlib')
obj.source = """
aiColsonPlayer.cpp
aiplayer.cpp
aiplayerio.cpp
continent.cpp
country.cpp
dice.cpp
eventslistproperty.cpp
gameautomaton.cpp
goal.cpp
KsirkChatItem.cpp
KMessageParts.cpp
nationality.cpp
onu.cpp
player.cpp
"""
obj.uselib = 'QT KDECORE'
obj.target = 'ksirk_gamelogic'
obj.includes = '. .. ../../kgame-patch ../Dialogs ../GameLogic ../SaveLoad ../Sprites'
####### kdevelop will overwrite this part!!! (begin)##########
bin_PROGRAMS = ksirk
## INCLUDES were found outside kdevelop specific part
ksirk_SOURCES = kgamewin.cpp gestionSprites.cpp decoratedgameframe.cpp \
backgnd.cpp main.cpp kgamewinslots.cpp
ksirk_LDADD = $(top_builddir)/ksirk/Sprites/libksirksprites.la \
$(top_builddir)/ksirk/SaveLoad/libksirk_saveload.la $(top_builddir)/ksirk/GameLogic/libksirk_gamelogic.la \
$(top_builddir)/ksirk/Dialogs/libksirk_dialogs.la -lcrypt -lkdegames -lkio -lpthread -lkdeui -lqt-mt -lkdecore
SUBDIRS = Dialogs Sprites GameLogic SaveLoad skins
EXTRA_DIST = main.cpp ksirk.desktop lo32-app-ksirk.png lo16-app-ksirk.png aiplayer.cpp aiplayer.h animsprite.cpp animsprite.h animspriteslist.cpp animspriteslist.h backgnd.cpp backgnd.h continent.cpp continent.h country.cpp country.h decoratedgameframe.cpp decoratedgameframe.h gestionSprites.cpp global.h hi16-app-ksirk.png hi32-app-ksirk.png hi48-app-ksirk.png kgamewin.cpp kgamewin.h kplayersetupdialog.cpp kplayersetupdialog.h nationality.cpp nationality.h onu.cpp onu.h player.cpp player.h dice.cpp dice.h
install-data-local:
$(mkinstalldirs) $(kde_appsdir)/Applications/
$(INSTALL_DATA) $(srcdir)/ksirk.desktop $(kde_appsdir)/Applications/ksirk.desktop
$(mkinstalldirs) $(kde_icondir)/locolor/32x32/apps/
$(INSTALL_DATA) $(srcdir)/lo32-app-ksirk.png $(kde_icondir)/locolor/32x32/apps/ksirk.png
$(mkinstalldirs) $(kde_icondir)/locolor/16x16/apps/
$(INSTALL_DATA) $(srcdir)/lo16-app-ksirk.png $(kde_icondir)/locolor/16x16/apps/ksirk.png
$(mkinstalldirs) $(kde_icondir)/
$(INSTALL_DATA) $(srcdir)/hi16-app-ksirk.png $(kde_icondir)/hi16-app-ksirk.png
$(mkinstalldirs) $(kde_icondir)/
$(INSTALL_DATA) $(srcdir)/hi32-app-ksirk.png $(kde_icondir)/hi32-app-ksirk.png
$(mkinstalldirs) $(kde_icondir)/
$(INSTALL_DATA) $(srcdir)/hi48-app-ksirk.png $(kde_icondir)/hi48-app-ksirk.png
uninstall-local:
-rm -f $(kde_appsdir)/Applications/ksirk.desktop
-rm -f $(kde_icondir)/locolor/32x32/apps/ksirk.png
-rm -f $(kde_icondir)/locolor/16x16/apps/ksirk.png
-rm -f $(kde_icondir)/hi16-app-ksirk.png
-rm -f $(kde_icondir)/hi32-app-ksirk.png
-rm -f $(kde_icondir)/hi48-app-ksirk.png
####### kdevelop will overwrite this part!!! (end)############
# These paths are KDE specific. Use them:
# kde_appsdir Where your application's menu entry (.desktop) should go to.
# kde_icondir Where your icon should go to - better use kde_icondir.
# kde_sounddir Where your sounds should go to.
# kde_htmldir Where your docs should go to. (contains lang subdirs)
# kde_datadir Where you install application data. (Use a subdir)
# kde_locale Where translation files should go to. (contains lang subdirs)
# kde_cgidir Where cgi-bin executables should go to.
# kde_confdir Where config files should go to (system-wide ones with default values).
# kde_mimedir Where mimetypes .desktop files should go to.
# kde_servicesdir Where services .desktop files should go to.
# kde_servicetypesdir Where servicetypes .desktop files should go to.
# kde_toolbardir Where general toolbar icons should go to (deprecated, use kde_icondir).
# kde_wallpaperdir Where general wallpapers should go to.
# kde_templatesdir Where templates for the "New" menu (Konqueror/KDesktop) should go to.
# kde_bindir Where executables should go to. Use bin_PROGRAMS or bin_SCRIPTS.
# kde_libdir Where shared libraries should go to. Use lib_LTLIBRARIES.