# HG changeset patch # User unc0rr # Date 1131561071 0 # Node ID ccd2c45f043d4a97728748c173db1649310e0ca6 # Parent 09de46a3328cf09ba23d7ff49bb65a7befbc136f frontend rewrite for QT4 diff -r 09de46a3328c -r ccd2c45f043d QTfrontend/QTfrontend.pro --- a/QTfrontend/QTfrontend.pro Wed Oct 26 21:15:35 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -TEMPLATE = app -LANGUAGE = C++ - -INCLUDEPATH += . - -HEADERS += hw.ui.h \ - ipc.h \ - hwconsts.h \ - team.h - -SOURCES += main.cpp - -FORMS = hw.ui - -TRANSLATIONS = hw_ru.ts - -###################################################################### -# Automatically generated by qmake (1.07a) ?? 11. ??? 20:42:14 2005 -###################################################################### - - -# Input diff -r 09de46a3328c -r ccd2c45f043d QTfrontend/binds.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/binds.h Wed Nov 09 18:31:11 2005 +0000 @@ -0,0 +1,61 @@ +/* + * Hedgewars, a worms-like game + * Copyright (c) 2005 Andrey Korotaev + * + * Distributed under the terms of the BSD-modified licence: + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * with the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef BINDS_H +#define BINDS_H + +#include + +#define BINDS_NUMBER 9 + +struct BindAction +{ + QString action; + QString strbind; + QString name; +}; + +const BindAction cbinds[BINDS_NUMBER] = +{ + {"+up", "up", QT_TR_NOOP("up")}, + {"+left", "left", QT_TR_NOOP("left")}, + {"+right", "right", QT_TR_NOOP("right")}, + {"+down", "down", QT_TR_NOOP("down")}, + {"ljump", "return", QT_TR_NOOP("jump")}, + {"hjump", "backspace", QT_TR_NOOP("jump")}, + {"+attack", "space", QT_TR_NOOP("attack")}, + {"switch", "tab", QT_TR_NOOP("switch")}, + {"quit", "F10", QT_TR_NOOP("quit")} +}; + +#endif // BINDS_H diff -r 09de46a3328c -r ccd2c45f043d QTfrontend/game.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/game.cpp Wed Nov 09 18:31:11 2005 +0000 @@ -0,0 +1,195 @@ +/* + * Hedgewars, a worms-like game + * Copyright (c) 2005 Andrey Korotaev + * + * Distributed under the terms of the BSD-modified licence: + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * with the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include +#include "game.h" +#include "hwconsts.h" + +HWGame::HWGame() +{ + IPCServer = new QTcpServer(this); + IPCServer->setMaxPendingConnections(1); + if (!IPCServer->listen(QHostAddress("127.0.0.1"), IPC_PORT)) + { + QMessageBox::critical(this, tr("Error"), + tr("Unable to start the server: %1.") + .arg(IPCServer->errorString())); + } + connect(IPCServer, SIGNAL(newConnection()), this, SLOT(NewConnection())); + IPCSocket = 0; + TeamCount = 0; +} + +void HWGame::NewConnection() +{ + QTcpSocket * client = IPCServer->nextPendingConnection(); + if(!IPCSocket) + { + IPCSocket = client; + connect(client, SIGNAL(disconnected()), this, SLOT(ClientDisconnect())); + connect(client, SIGNAL(readyRead()), this, SLOT(ClientRead())); + msgsize = 0; + } else + { + client->disconnectFromHost(); + delete client; + } +} + +void HWGame::ClientDisconnect() +{ + IPCSocket = 0; + delete this; +} + +void HWGame::SendTeamConfig(int index) +{ + QFile teamcfg(teams[index]); + if (!teamcfg.open(QIODevice::ReadOnly)) + { + return ; + } + QTextStream stream(&teamcfg); + stream.setCodec("UTF-8"); + QString str; + + while (!stream.atEnd()) + { + str = stream.readLine(); + if (str.startsWith(";")) continue; + str.prepend("e"); + SendIPC(str.toLocal8Bit()); + } + teamcfg.close(); +} + +void HWGame::SendConfig() +{ + SENDIPC("TL"); + SENDIPC("e$gmflags 0"); + SENDIPC("eaddteam"); + SendTeamConfig(0); + SENDIPC("ecolor 65535"); + SENDIPC("eadd hh0 0"); + SENDIPC("eadd hh1 0"); + SENDIPC("eadd hh2 0"); + SENDIPC("eadd hh3 0"); + SENDIPC("eaddteam"); + SendTeamConfig(1); + SENDIPC("ecolor 16776960"); + SENDIPC("eadd hh0 1"); + SENDIPC("eadd hh1 1"); + SENDIPC("eadd hh2 1"); + SENDIPC("eadd hh3 1"); +} + +void HWGame::ParseMessage() +{ + switch(msgsize) { + case 1: switch(msgbuf[0]) { + case '?': { + SENDIPC("!"); + break; + } + } + case 5: switch(msgbuf[0]) { + case 'C': { + SendConfig(); + break; + } + } + } +} + +void HWGame::SendIPC(const char* msg, unsigned char len) +{ + IPCSocket->write((char *)&len, 1); + IPCSocket->write(msg, len); +} + +void HWGame::SendIPC(const QByteArray buf) +{ + if (buf.size() > 255) return; + unsigned char len = buf.size(); + IPCSocket->write((char *)&len, 1); + IPCSocket->write(buf); +} + +void HWGame::ClientRead() +{ + qint64 readbytes = 1; + while (readbytes > 0) + { + if (msgsize == 0) + { + msgbufsize = 0; + readbytes = IPCSocket->read((char *)&msgsize, 1); + } else + { + msgbufsize += readbytes = IPCSocket->read((char *)&msgbuf[msgbufsize], msgsize - msgbufsize); + if (msgbufsize = msgsize) + { + ParseMessage(); + msgsize = 0; + } + } + } +} + +void HWGame::Start(int Resolution) +{ + if (TeamCount < 2) return; + QProcess * process; + QStringList arguments; + process = new QProcess; + arguments << resolutions[0][Resolution]; + arguments << resolutions[1][Resolution]; + arguments << "avematan"; + arguments << "46631"; + arguments << "=seed="; + arguments << "1"; + process->start("hw", arguments); +} + +void HWGame::AddTeam(const QString teamname) +{ + if (TeamCount == 5) return; + teams[TeamCount] = teamname; + TeamCount++; +} diff -r 09de46a3328c -r ccd2c45f043d QTfrontend/game.h --- a/QTfrontend/game.h Wed Oct 26 21:15:35 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* - * Hedgewars, a worms-like game - * Copyright (c) 2005 Andrey Korotaev - * - * Distributed under the terms of the BSD-modified licence: - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * with the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include -#include "team.h" - -class QString; - -class HWGame -{ - public: - HWTeam Teams[5]; - private: -}; diff -r 09de46a3328c -r ccd2c45f043d QTfrontend/hw.ui --- a/QTfrontend/hw.ui Wed Oct 26 21:15:35 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2927 +0,0 @@ - -HWForm - - - HWForm - - - - 0 - 0 - 640 - 450 - - - - - 5 - 5 - 0 - 0 - - - - - 21 - 22 - - - - - 640 - 450 - - - - - 640 - 450 - - - - - 162 - 222 - 162 - - - - Hedgewars - - - image0 - - - - buttonGroup1 - - - - 300 - 329 - 100 - 50 - - - - buttonGroup1 - - - - - Pages - - - - 0 - 0 - 640 - 450 - - - - - 640 - 450 - - - - - 162 - 222 - 162 - - - - - PageMain - - - 0 - - - - ButtonOptions - - - - 220 - 200 - 200 - 32 - - - - - 162 - 222 - 162 - - - - - Tahoma - 18 - 1 - - - - Options - - - false - - - - - ButtonExit - - - - 220 - 280 - 200 - 32 - - - - - 162 - 222 - 162 - - - - - Tahoma - 18 - 1 - - - - Exit - - - false - - - - - ButtonLGame - - - - 220 - 120 - 200 - 32 - - - - - 162 - 222 - 162 - - - - - Tahoma - 18 - 1 - - - - Local game - - - false - - - - - ButtonNGame - - - - 220 - 160 - 200 - 32 - - - - - 162 - 222 - 162 - - - - - Tahoma - 18 - 1 - - - - Net game - - - false - - - - - ButtonDemos - - - - 220 - 240 - 200 - 32 - - - - - 162 - 222 - 162 - - - - - Tahoma - 18 - 1 - - - - Demos - - - false - - - - - - PageOptions - - - 1 - - - - CBFullscreen - - - - 70 - 270 - 70 - 20 - - - - Fullscreen - - - - - - 640x480 - - - - - 800x600 - - - - - 1024x768 - - - - - 1280x1024 - - - - CBResolutions - - - - 70 - 240 - 100 - 24 - - - - 2 - - - - - CBEnableSound - - - - 70 - 310 - 90 - 20 - - - - TabFocus - - - Enable Sound - - - - - CBRecordDemo - - - - 70 - 290 - 90 - 20 - - - - Record Demo - - - - - ButtonOptionsBack - - - - 20 - 370 - 160 - 40 - - - - - 162 - 222 - 162 - - - - - Tahoma - 12 - - - - Back - - - - - groupBox1 - - - - 20 - 10 - 180 - 120 - - - - GroupBoxPanel - - - 1 - - - Teams - - - - BGoTeamSettings - - - - 10 - 70 - 160 - 40 - - - - - 162 - 222 - 162 - - - - - Tahoma - 12 - - - - Edit team - - - - - BNewTeamSettings - - - - 10 - 20 - 160 - 40 - - - - - 162 - 222 - 162 - - - - - Tahoma - 12 - - - - New team - - - - - - - qt_dead_widget_WStackPage - - - 2 - - - - - PageDemos - - - 3 - - - - BPlayDemo - - - - 270 - 30 - 160 - 40 - - - - - 162 - 222 - 162 - - - - - Tahoma - 12 - - - - Play demo - - - - - BPlayAll - - - - 270 - 80 - 160 - 40 - - - - - 162 - 222 - 162 - - - - - Tahoma - 12 - - - - Play all demos - - - - - BDemoBack - - - - 270 - 130 - 160 - 40 - - - - - 162 - 222 - 162 - - - - - Tahoma - 12 - - - - Back - - - - - LBDemos - - - - 30 - 30 - 220 - 390 - - - - - - - PageNetGame - - - 4 - - - - EditName - - - - 120 - 89 - 170 - 22 - - - - LineEditPanel - - - Sunken - - - - - textLabel1 - - - - 100 - 60 - 20 - 20 - - - - IP: - - - - - EditIP - - - - 120 - 60 - 170 - 22 - - - - - - textLabel2 - - - - 80 - 90 - 34 - 20 - - - - Name: - - - - - BNetGameJoin - - - - 170 - 190 - 100 - 40 - - - - - 162 - 222 - 162 - - - - - - - 0 - 0 - 0 - - - 162 - 222 - 162 - - - 255 - 255 - 255 - - - 208 - 238 - 208 - - - 81 - 111 - 81 - - - 108 - 148 - 108 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 162 - 222 - 162 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 0 - 0 - 0 - - - - - 128 - 128 - 128 - - - 162 - 222 - 162 - - - 255 - 255 - 255 - - - 186 - 255 - 186 - - - 81 - 111 - 81 - - - 108 - 148 - 108 - - - 128 - 128 - 128 - - - 255 - 255 - 255 - - - 128 - 128 - 128 - - - 255 - 255 - 255 - - - 162 - 222 - 162 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - 0 - 0 - 255 - - - 255 - 0 - 255 - - - - - 0 - 0 - 0 - - - 162 - 222 - 162 - - - 255 - 255 - 255 - - - 186 - 255 - 186 - - - 81 - 111 - 81 - - - 108 - 148 - 108 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 162 - 222 - 162 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - 0 - 0 - 255 - - - 255 - 0 - 255 - - - - - - - Tahoma - 12 - - - - Join game - - - - - BNetGameStart - - - - 60 - 190 - 100 - 40 - - - - - 162 - 222 - 162 - - - - - - - 0 - 0 - 0 - - - 162 - 222 - 162 - - - 255 - 255 - 255 - - - 208 - 238 - 208 - - - 81 - 111 - 81 - - - 108 - 148 - 108 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 162 - 222 - 162 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 0 - 0 - 0 - - - - - 128 - 128 - 128 - - - 162 - 222 - 162 - - - 255 - 255 - 255 - - - 186 - 255 - 186 - - - 81 - 111 - 81 - - - 108 - 148 - 108 - - - 128 - 128 - 128 - - - 255 - 255 - 255 - - - 128 - 128 - 128 - - - 255 - 255 - 255 - - - 162 - 222 - 162 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - 0 - 0 - 255 - - - 255 - 0 - 255 - - - - - 0 - 0 - 0 - - - 162 - 222 - 162 - - - 255 - 255 - 255 - - - 186 - 255 - 186 - - - 81 - 111 - 81 - - - 108 - 148 - 108 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 162 - 222 - 162 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - 0 - 0 - 255 - - - 255 - 0 - 255 - - - - - - - Tahoma - 12 - - - - Start game - - - - - BNetGameBack - - - - 60 - 260 - 100 - 40 - - - - - 162 - 222 - 162 - - - - - - - 0 - 0 - 0 - - - 162 - 222 - 162 - - - 255 - 255 - 255 - - - 208 - 238 - 208 - - - 81 - 111 - 81 - - - 108 - 148 - 108 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 162 - 222 - 162 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 0 - 0 - 0 - - - - - 128 - 128 - 128 - - - 162 - 222 - 162 - - - 255 - 255 - 255 - - - 186 - 255 - 186 - - - 81 - 111 - 81 - - - 108 - 148 - 108 - - - 128 - 128 - 128 - - - 255 - 255 - 255 - - - 128 - 128 - 128 - - - 255 - 255 - 255 - - - 162 - 222 - 162 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - 0 - 0 - 255 - - - 255 - 0 - 255 - - - - - 0 - 0 - 0 - - - 162 - 222 - 162 - - - 255 - 255 - 255 - - - 186 - 255 - 186 - - - 81 - 111 - 81 - - - 108 - 148 - 108 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 162 - 222 - 162 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - 0 - 0 - 255 - - - 255 - 0 - 255 - - - - - - - Tahoma - 12 - - - - Back - - - - - - PageTeamSettings - - - 5 - - - - textLabel1_2_2 - - - - 10 - 70 - 92 - 21 - - - - - 12 - - - - Hedgehogs: - - - - - textLabe8 - - - - 30 - 310 - 18 - 21 - - - - - 12 - - - - 8: - - - - - textLabel7 - - - - 30 - 280 - 18 - 21 - - - - - 12 - - - - 7: - - - - - textLabel1456 - - - - 30 - 250 - 18 - 21 - - - - - 12 - - - - 6: - - - - - textLabel1745 - - - - 30 - 220 - 18 - 21 - - - - - 12 - - - - 5: - - - - - textLabel1574 - - - - 30 - 190 - 18 - 21 - - - - - 12 - - - - 4: - - - - - textLabel1_732 - - - - 30 - 160 - 18 - 21 - - - - - 12 - - - - 3: - - - - - textLabel745 - - - - 30 - 130 - 18 - 21 - - - - - 12 - - - - 2: - - - - - textLabel3634 - - - - 30 - 100 - 18 - 21 - - - - - 12 - - - - 1: - - - - - HHName3 - - - - 50 - 190 - 130 - 22 - - - - 15 - - - - - HHName4 - - - - 50 - 220 - 130 - 22 - - - - 15 - - - - - HHName5 - - - - 50 - 250 - 130 - 22 - - - - 15 - - - - - HHName6 - - - - 50 - 280 - 130 - 22 - - - - 15 - - - - - HHName7 - - - - 50 - 310 - 130 - 22 - - - - 15 - - - - - textLabel1_2 - - - - 10 - 10 - 49 - 21 - - - - - 12 - - - - Team: - - - - - EditTeamName - - - - 50 - 40 - 130 - 22 - - - - 15 - - - - - HHName0 - - - - 50 - 100 - 130 - 22 - - - - 15 - - - - - HHName1 - - - - 50 - 130 - 130 - 22 - - - - 15 - - - - - HHName2 - - - - 50 - 160 - 130 - 22 - - - - 15 - - - - - BTeamStnSave - - - - 130 - 360 - 90 - 40 - - - - - - - 0 - 0 - 0 - - - 162 - 222 - 162 - - - 255 - 255 - 255 - - - 208 - 238 - 208 - - - 81 - 111 - 81 - - - 108 - 148 - 108 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 162 - 222 - 162 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 0 - 0 - 0 - - - - - 128 - 128 - 128 - - - 162 - 222 - 162 - - - 255 - 255 - 255 - - - 186 - 255 - 186 - - - 81 - 111 - 81 - - - 108 - 148 - 108 - - - 128 - 128 - 128 - - - 255 - 255 - 255 - - - 128 - 128 - 128 - - - 255 - 255 - 255 - - - 162 - 222 - 162 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - 0 - 0 - 255 - - - 255 - 0 - 255 - - - - - 0 - 0 - 0 - - - 162 - 222 - 162 - - - 255 - 255 - 255 - - - 186 - 255 - 186 - - - 81 - 111 - 81 - - - 108 - 148 - 108 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 162 - 222 - 162 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - 0 - 0 - 255 - - - 255 - 0 - 255 - - - - - - - Tahoma - 12 - - - - Save - - - - - BTeamStnBack - - - - 30 - 360 - 90 - 40 - - - - - - - 0 - 0 - 0 - - - 162 - 222 - 162 - - - 255 - 255 - 255 - - - 208 - 238 - 208 - - - 81 - 111 - 81 - - - 108 - 148 - 108 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 162 - 222 - 162 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 0 - 0 - 0 - - - - - 128 - 128 - 128 - - - 162 - 222 - 162 - - - 255 - 255 - 255 - - - 186 - 255 - 186 - - - 81 - 111 - 81 - - - 108 - 148 - 108 - - - 128 - 128 - 128 - - - 255 - 255 - 255 - - - 128 - 128 - 128 - - - 255 - 255 - 255 - - - 162 - 222 - 162 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - 0 - 0 - 255 - - - 255 - 0 - 255 - - - - - 0 - 0 - 0 - - - 162 - 222 - 162 - - - 255 - 255 - 255 - - - 186 - 255 - 186 - - - 81 - 111 - 81 - - - 108 - 148 - 108 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 162 - 222 - 162 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - 0 - 0 - 255 - - - 255 - 0 - 255 - - - - - - - Tahoma - 12 - - - - Discard - - - - - groupBox2 - - - - 440 - 230 - 170 - 190 - - - - Fort - - - - FortPreview - - - - 10 - 30 - 150 - 150 - - - - image1 - - - true - - - - - CBForts - - - - 40 - 0 - 120 - 22 - - - - - - - CBGraves - - - - 280 - 270 - 130 - 40 - - - - - - textLabel5 - - - - 240 - 280 - 35 - 20 - - - - Grave: - - - - - groupBox4 - - - - 260 - 10 - 320 - 200 - - - - Binds - - - - CBindUp - - - - 100 - 20 - 85 - 24 - - - - - - CBindDown - - - - 100 - 80 - 85 - 24 - - - - - - CBindLJump - - - - 70 - 120 - 85 - 24 - - - - - - CBindHJump - - - - 70 - 150 - 85 - 24 - - - - - - Labelsw - - - - 180 - 150 - 35 - 20 - - - - Switch - - - - - Labelasdas - - - - 180 - 120 - 35 - 20 - - - - Attack - - - AlignVCenter|AlignRight - - - - - textLabel1_3_2_2 - - - - 10 - 150 - 55 - 20 - - - - High Jump - - - AlignVCenter|AlignRight - - - - - textLabel1_3_2 - - - - 10 - 120 - 55 - 20 - - - - Long Jump - - - AlignVCenter|AlignRight - - - - - CBindLeft - - - - 40 - 50 - 85 - 24 - - - - - - textLabel1_3 - - - - 10 - 50 - 21 - 20 - - - - Left - - - AlignVCenter|AlignRight - - - - - textLabel4 - - - - 80 - 20 - 17 - 20 - - - - Up - - - AlignVCenter|AlignRight - - - - - textLabel2_2 - - - - 140 - 50 - 28 - 20 - - - - Right - - - AlignVCenter|AlignRight - - - - - textLabel3 - - - - 60 - 80 - 30 - 20 - - - - Down - - - AlignVCenter|AlignRight - - - - - CBindRight - - - - 170 - 50 - 85 - 24 - - - - - - CBindAttack - - - - 220 - 120 - 85 - 24 - - - - - - CBindSwitch - - - - 220 - 150 - 85 - 24 - - - - - - - - - - - - 89504e470d0a1a0a0000000d49484452000000300000003008060000005702f9870000077b49444154789cbd995f6c5b6719c67f8eed633b3e99ed3469ec041aa74ad9d0e4d559e5ae411a6b87342d703db50576d182906864ba204d5ca0096dd2e8b8e9364d31e282b5579b10dcb42aab04525384529684e58f60a0264eea16bab86b1a3bc949e2da890f17c7c73eb68fed6327e191ac737cbef7fbcef3bcdffb7eff0eec10836f8fca836f8fcad56c86c2a3f250b8ba4da368da8d469624b1a6cdfa526d9b46b02b02a28900475ecd56f5f0bdf900af1cad6c73313c2a5f6ca097762e20658275e5f6e46b331509b4000ee0f553e53617c3a372ea763796065ebf2b3d401a4840341ae0e40fcb098a98f2f78985003f3f5d6c931aebc796ec6ce8d5bb232007f32adc990df0a24ea8380021f7cbcc0778436363dbc13b7747402e84844cee07fc48e3650b05f2da54be707a467ee7d48c6c05ac8065b69bdf846fd595073b16b0b4e8c4bcaa781f40dc56ae89f900e15cbc4b0f9d4a59ae8e8d5c8fcc07b02e0400b003ae4427aeb16375bddf54dba418475ecdcaa4737f729e37af2a9e776c83192561015cb9abea7935541c9a7b6b8e3cc013b9eba9f126c3bc0c25be3a512d3d14892e16c8ab5e57c96f036e0d492d7934cf6d39e2e4c83b35e52dd4879a02de7c7744be7abb5ff17689e7b5e4cd1af2aae75df634fb5d120ed3360e53966694f832ab64ad4d98b7b2f9b69c6613569309c67741c091d7b3328fe1ea9d62c27a9e376b8ab59edfef92f8d6e128a22d8d60ddc29695c8a40b84d757d2385d8222c623141af98371013563edcd7747e4ab932f28deaf10f300fb73d736e726073b9669b165e8f2acf174c7234cb674519b5673163d64b69bb09ab3ccc92b1c7bedb4a13c306434f8c62df976f400abf795c9a694bc3acbb63937e9dab7c293be25bcae0d445b9af627a4a2b6e2310929591024ba05bc7eb1cc2626acf19d5ffda0263fc3d93ef8d35bf2c4df8f55242f584c040ffc177f7b02af6b83567103972355d6cef54b51a2d3cbf9ffbdc15606cef496d9000c9ce965dff96f57e558d7307ae1ad11f9c6b5178ac803f89c9b7cad63b9887cb390d60d95d21e90926916ef48f49df002303512c7d723e2f52bbf5ae154f7faa9d4f36ee726ddfb566a7a5e85365c2c3e378f16522cdef967914dcf737eda9f51c6b427e3763e7def63b99208c33d30141e95ff3dd69f270fca70f94ccf7d0eee4fe071a6f0b9a5aae44b210e040190ae4f973d170ef9726553a4e7e200bae164682931141e95efcf76e7c93b280c972e7b068f33a50c95e62d43c42d3e37e240108bd783c5eb51ee7d6e5d5b7bb0077b9fbf725bb55e76e1ad11f92fd70a9e57897bec693a5d125d9e35f6395308d62d2c1586c7523489f6bc870184161f5949e9b9adc56491ede47f66b9f7f9bf487d1ee3f7bfbe24bff2e33345bd5055c0507854fef3b57e8412f202d0999ba4bcae551c8231cf5783bdaf8726d18eb4581c4e9148842b57ae00f001e7d99c5c901dcf1ecc8bd015f093f3a3b2390bf767bb75c90b80c3b48d684b1bf6ba1e86878799989800e0dcb973043d5fcd978d8f8f138944f2e5955026e07bdf9f9127c70308db0a5174c803d82c32a2dd78c2ea61626222efddaeae2e324f3fc7d7b1b2154fb29d288452676727a15088aeaef25d5b51121ffd6656be3b5f4c5e5d2268372422606bcae210b62a2e0bea4524126138120120351523606de7f2e5cb84422142a150febe145587d1f0a91979652150b69bb2014f1d88f3f2f3d3952b5741538b1d8bd7cd3f320f7990ddc8936edf6ca2ef2b878a6cd4100a85426cc593d8837eb439507b3197dbe2addf3e00c9cefc6eaa7b070254d8fbfc58bccaf0999a8e958d407a687efe296a26b116bff8e01b26508e3e12638518142ad6308ed4546cc76d185a4a5c0c8fcaabb3ddf964ae768a108f494c8d2833a7af472478dc5b37a9e99b4a7d23750dcdc489b17e8484e27d753bd8ac63178f49cc4d2d139d5e464aa6594ba4894e2fb39648eb5897a35e7b302840eb79ed26bc145323f1bcf7fa4e78f1f5885cbf14e5c15da9428d623cb82b71fd52b4ae9eab29e09ddcd14829796decc563ca8be33109af5f64e04c2f1dddf51fe6767457affb59cb5a510297f2d0259f5d08149d2280728ab0bd612771cf8bb32d899454c2c6eb1739d4d74a6fb015800777eb13d0e21168f1b4562c7fe9ec49e3abd15f1ecd1691b7537c04b2bae466feaf41d6970aabc8be13de86927627d0ed810ba7676479be3c6c9c1436341e9d7a532371a4649ae0712fd337e3cc4d2deb5815f0e14d179331fd31ed59ff63ce1e5f01a8ba2bd315606b93b0b4fd4db9c7847a582969c4c45104ceb57f49d6f298de606b7e1412dd027353ca48d41b6c4574373e6bd4da52d67db458098fdeff4436b261af17bbbaa9af853ffeecb772db978590d03b32310aa36743bb2a00e0d3f73e960f995cb50dab60d70fb6eac5a3f73fd9d117c95a61a3c59e0850f1a70f7f271f593376defc59cb9aee385f0b8d7c576b080fb31b7c21286b9ce68c0935ccd4e72f9dfd6e43cedc330137863f920f6bbcff8590e6c5c1024935cc4a9fd78b3d117063f823b9332d3067329e8c8d6257bf52aa38bce5a6bd496fc15d8ee6cccef4ed890015874cae9a2392119b6ad85301ff0fec490e64b66bfbc5888d11ec89808d74edc59b111b23f81f5e1dc9930a4a2de50000000049454e44ae426082 - - - 89504e470d0a1a0a0000000d494844520000006400000064080600000070e295540000200049444154789cedbdd79364d77de7f939eede9b9965db7b0b343c21c2110421528224889496e45094345c69a599586936621ef66563ff003d6deccbc63eef8642b11a4a2243432392a22787a20329822009430004d040a3bbd1ae7ca5bbe6987d38f76666655503941a33c0c39c888caacabaf6fccecf7f7fbf23fed3f717036fe508fa0d0e10d7f95e02beb9c8c47172ea385fff1f1036fe2d42fdbd84207638e7ad1b6f341bfff587b0d7f9473d49e17a9335410ce1278ef353c735c498fefeed39de628278108ed16add329abfa757fe04a1846744805f6ac21bee98bcdedb6bbcf51cf246a399c0d04c784380c9096d08ba136127871c31ccdb75bcc504913be890e995de10607a26dd84fc6f3eb08d20e13a9cd67098a876b8e75b37de0604916c55dcf5846d11413e4efe8828135c12d8faddf4e43697dea263a6c4dddb68bc8d44d62f214b423dbbdbc41553c4da61a2c5041785eb59646ffd78eb953a92d727c6a438aa4768ce9dfcee7aba65fa7e13c78437d239ffedc75bce21423a84100821f01ebcf7841050c2a0940204d65a9c0bf17bd97c0f014708012102428c6413defb781d1c49925096252138b4d60821b0d62384204d53aaaa78cbde7da7f1961304c05a8bf771f54aa99152e283c516d1471142a29444eb1429e38af6dee31cf1583f26981002a53449a2504a91e739c16b944a313abe6ef015de7baad2d5dcf2f6d1256f3941b2ac4d5996f52a0e281527328480a5c45a8b1480505857e02b8f730ee72277b4db33517f0820084210782f2048bc0b4891e0f1d8cae39d270487f71e21a39894ea2d7dfd6de32d27c870d81f891da524910162b8434a8931e3190ba19e442947e2a7280aa4d42869d04613bcc2b940e93cce5ad234450a85490d5242a0c2b9126b1dce3ba47a7b51e42d57ea6555608cc298f8285595539516efa9e57c2bea87a09042d466ac8cc409a0652490941a1134201004081670f1582c4531c48702212b4c02695b20a58a622bbc7d88f2967348ab65a2f80801ef03024d6232b46aa175463e74846010a42895a2644a0850958eaa728420b01e421048a9d15a93a6297333069348fa835594b120722ad7c5873e4295f83024cf73946cbdd553b065bcb504118180a32a2bbc1328d9264be7316a8ee0dad8d2908a0e6bab25975f5be3caa5659697ba2c5febb1b494b3b901b68ad6ab10600cb45a303b9731336bc8da8133b71e66cffe8c7d0732e677b5c83a2541f4e9f597e9f556999f7ffb700780b8f1f0bbc70b9081fae794df300a02c663a71d39113c55e5f1b64566f69099fde483844b177a5cbddce7fbdf799ae56b70f912f4d71947da9b4b05c66e8c98f829817aae5b7370f8281c3b09676edbc5adb71fe1d09145b20eac6f5e0651c4108aa862f459b809e7516f8f386f799f9dfc98c9d8dabf6cdc20413c5e3a82f0882009484450313e55cb658502e1d10a8aa24f510e989b6fa3b56465b94baa66996d1fc18803ac5c953cf5c4551effc1ab3cf7cc3aab4b71e56ff31b477f4b8257a367194fd4c40962ea2361710fdcf58e8cdbee3ecabbdf7b86f66241906b7407afe1c23a9d198d949a41bf243173d84a22451487951d52947d8cd1ccce76c8fbf90eb3eaa71662fd7cbfc4b82182f83a38174493ec6908a111f5446929e9f7bbb43243ab95d2edf6190c06cccfed62d7dc616692e33cf7f435bef7ed67f9f10fd7b9f032e43dc01b242d9c9b4a2e4d51271a5e53398fd0b087241090484c2210d25256393e4092c1cc027476c3c3bfb1975ffbcd3bd97b1006e54506f935a404a51446b7015d3ba70e63a243991703363737999f9965ccb65353f99610844090e389881cd2882d8f080e29e3e3e6438fa4c3e2fc51a4ebb074d9f3b52ffc9c975f58e7f9672dbd4dc08114a0440bef05c18b71205038c06e8945861db94741304415a908f544692910b2a2b283b1583390cdc2f153f0c07bf6f3e0c3a7387a6286c22eb3b67e09a92bb2cc2095a72c73843024a685b38ac16040d692b5889be608f86f2eb2bc88370d131324b644550346098c49a9f2403134b4936348bf87271f3fc737bef20c8f7f0f7c19cf5012b48a1359950e1f3cb2893b8d88b2f525b71104a2fc0f911889e95055ae9e1a8f12a094402a0f125462e8f75641416b11ee794071ffbb4f72e7dd87397cbcc595a5e7417651a6420887f7126725462d906519c37cf575b29efff2f12610a466d83039710e8905e1b1a5c35b432b3948273dceb50bf05fbefa73bef9b5ab2c5d02e50c4acc2265c087327ae37efc8272a4336b25399562f75e4dfccf6dfd6750b5725648991242a89dcb492b200129504985739b2061e100fcd607f6f3c8a377b0f790a30a97b16199408e100a290cf84e8c8bf93ef0cb10e4970b62deb095e59104216ba3c98fac14490508fa9b157b166f82ea20bf786693ef7ced45bef74f5d065da2dfe6e68014a88002ad025259020eef431dc49db4dc2652b641e27d56ffcf8ed3c1935ce405426ab436d8ca8f384a0809411130f517016409a10706160fc08123f0efffc37d1c3ea199db55d01b5c61986f90a4062952f23cc798c93ccdc408532be79724c80dfa2171a2c4c4cd2501b0f11943c26cfb00540779ea9fd7f9f4277fc6b33f63a4278c36042128ed307e89c5ba0a85208480f72045c248e04f7261a0fe3b6164e386c89dd1318922b3d58e9e7e5555845001a0b44629f0bec2da32cabd9121904255b0f61aac5d854f9a1ff3ab8f9ce481f71cc5b41cb882aa18a24d8e9416443a35d9cd3336a9e7d743cdc0b49e79131cc371d87b24e71b6bcbcd93e9e37cf79be7f8d4c7cff1da2b8085c468caca52d80aad0a8c6eb28626ca68e7181361ea11a7810dc1edf0fff1b3e5791143fbae8e1c4b8931066b4bac2d220d1a23c459469a1e0fd6f1d31f403e7c853499e5ae7b76313b2b287d14613105ecc7e7bf09437de4cf5a7ff1af3f5da0a54122b0b68fd6016f1df92090ea8324e2045fffc28bfce3a72e70f16c94282218bc13a4091002496a28ca02ef03788d961d5cd04086c08ca4bd940e212d8122e6417004e1908925280bb2fe0807d221b5461983d629b6ac1889bd20b0d6e143c06429c1553587345c2510528137b5f3e9595b86679fb94a3bf3dc79e7cdc0905e6f99d9f914ef34d60694d4b50122288b927e7f4096b5b6ccd5d631a9cbc6e38639240441afd7a53da348124377e0d8bd7082501ee0bbffe555bef2b9d7387f96c819c95c9dc728eb64145455859206e7c123289d478b04a5448cccfa124f8e133175a14c54f4a29660330ba074148104287218f4a01c147857c47756201418ddc259892b2d04435506b44c912a26ac9c0b042f10421184c139052141f892ee6ac577bf759ed68ce7ddef3bc4c17d377379f92c33336d940c80c45a8794924e6796346d91240945f12f4b80dd3041248276d642890a5705b26437ae58e499c757f9ccdf9ee5e24b80934812bc75583f043cb6364cac05ad34894ee2cac5624311c589b0a02069c1dc02ecdd0f478ec18993873976fc108b7b3a249d80d40229126c15e8754b5657baac2cf7e86d3a7ef8d859ae5d818d2528ab61d4f9c90cc125e0638e457981100e6b73c0a1b4448898c90c41804fa9f28a5f3c03a5bdc8cc6cca43ef3b463bb1481c465b8400670bbc03b446884051349cf97a0ee2565177c30419e63de6e716e8f6d6c1272ccc1ce3a927d6f8f4279fe5e2cb20bc22310b7857627d3ef54012a333acf5388651d1ba7c245db24e74d8cedcd6e6fe07cf70ebed47985f4cb0aecf60b841615709aa442850caa0a461f180e1c8e914efda0497f1c0c307585db29c7d61859f3d719e9f3f59e2063d0892b9f9436cae1710143ed4ac04786f1122d416992604899209ce95bcf2227ce9736749d394877fed57b8b2f673bce8218440ca68b15595c7394f081ead752dad7e3927f10609e229cb019b5d8112b364c941ae5d107ce76b2f446bca02c1e0bdab8951d14ee32dcbd223544a691d460b94b1e4a585044c06f7bd0beebee710ef7ef80e92568e494bac7b99cb2b1b389f631241da3608adb0bea2ac2a6c59c66ca01008a2697af8f4018e9d9ee7b677dccc3d0f1ce3e74f2ef1b31fbfcaf3cf6eb2b97491c8e31d12634048aa2ac7ba928047a008940862324ceb38ad4ffe0866b2973879fc56ccfc02d60f298a029368b22c89cfa014265194e570fbb4bd8e0576834addd36e1bbadd9cbdbbce10aabd7cf1333fe31b5fe96387901a837310b00d75305ac6b8900f71457908c252398b4ae1f86978f477dbbcff83b773ef8387a8c245825ac6b146105da42ed1a6426a471025a51de24249a0444a8f36cdc7a1b4232f36e80d56b0aecfde7db3dc7ee7094e9cda4b102bacace60c7a01ef4bac1da2944020713e9acc699ae05c85d292aaaa7036906582aa84f55587753dee7ce741b20e5495c5598731c9081fa0b5c6b9e88f452ea92dc2c9a8f4d65f6e9020c293651225dba4e1304f3c7699cf7cf21c1bcbb5ab663d69e211c2462b0a084ee2ea8060089eb9b90506451793c1bbde93f1877f7c27bffee8cdecda9fd32bce62b23ed21448e9504aa294468a84e025ce810d9e20245265289d22440b84c17b8df3805468a308b26058ac93db65da73969befd8cdafbeef1656972f33e8398639386b47e817102382846047e9634182928261df73756993e3377bf61d6a91a519455e8210781ff0be31c76b6b6a84b86742844d86a1b711a489a44e82c8768a7dd7c7d6fe40afd763effc69ae5cc8f8d4dffd88179e0125c028398ad4ba91f8942895d6e9d6804a3cbdbc4f32038fbc7f2f1ffbd3f772cb5d73ac769f6779fd2c59c79157dd9a03043e049c0b385fcb7b55071e25d1440e32821c5cc03b8f0f3e5a714aa214385fe0fc006586245949aba5b8fdf63b180cd679f5fc1067639ccbbb26152c48524d595518a362cab70af15e5e331c5a72bfc14d37ed65f7ae058ab20b140865315aa28dc0fb6ac2779a987c31c926db08e2c7c88df8f508e219082489214d0d45911382274915d60d312a41d836fb177e85bffbab1ff18d2fe6180caeca9032e6b2fd043db3b4435939a434ccccced1cb7be805f8a33f3bc087fff05e6676f5e897e7d15941da320829902a45ca24daad4280a8fd04a14004bc2a912a90984e3d6139da084c12b0aea495b5c8871546b710181081101c653960662e41c821f73df80ed22ce7e967367085276bcf615d7450adab10d2e3432010839d21885aaf545c7c155a59c5fd0fdc4a515e23b08e4a2af0155209422810938bbd8e427b11ea6fb65a59afe35e46ca45fbdc51140521044cd280cd2acad231931de1b9a7aff1ca8b1b3124428780a62c2d021181081a8450e44574ea2ad7636df32aad39f8a37fb79f7b1fdacbec9e2e565ca3f0cbe4d5264595931715014d408ddca8203c41d89883111ead254531a4d7dfc4da122104fd5ec1a007993980e630572e0aec700f0bb327b06582520933b36d9656ce53c9cbf4dd0b3cf0f0317eff7f3c41b60079be8ad2936512d799269f4005e75f2c38fbfc3299990320b882562bc55543b63a8013c0f0ebd4bdc8ebdfb0969942e0bd1fe1a662785ce29dc0db94441de2bbdf7a8ee79f8df125a93c315018ad9de8b069b44ae3354505caa332f8b5dfdacf238fbe83c3c767706c50da35842c310924892449345b52be624216d7915d8521336de6665a245ae24a474b2f329f9ec1f74ef2a5bf7f95bffd7fba7cf5b32fb17e658699e418454fd35b1fd24e1302431c6b9cbc7996dff9f03d3cfcebfb2003e7fa0853eb81a0273e5360f0002fbd30e09f1f7b1e1976a1e502f8164912cdf9c8154d447a44c909026d23c8eb8fa89be2610d6ad0598f561d5ae93e962e7b9ef8e73506bd98cff0a11a1104408a0c6b637e224922fd8581fb1f32fcce87ef266df719e457d9ec5d26880126891ca58d8a36fcd6a79920c638a6d5e0b49c0b105aec593c832f0ef3dd6f5ce2b39fd8e4859fc0573f9ff3adaf9e4587c31cd87b2bf80eedd602423ad2966565e3055a731b7cf8f7efe55d0f67a0c1a4b6ce75c410fe2849cf84820eb0b6028fff7085956b815672002567280b1fe72b4c73c5ebfb2363826cb189c72779ef472fac948ae69f13a4c91ca9decb534f2c71e195788a319aaa1aa275cc5bc4886dcc3958e70954a0e0e4cdf0810fdfced15302cb1245b54260803651be174541919794e54e2002cf56c25806831ecb4b6b78db62d7dc69d6ae657cfd1f5fe4ef3ffe0b7a57814ab27e193efd8957f8d2e77e8a2b16989f39cad52beb11ff254bd636cfb23178969bef4879f47fb88dc3a7a02cebfb0539e690c9602a000609bcfc023cfff40a8a3d18394fb7dbc31833410cc5d8480a5c4f6cbd21878440ed14698484aa72083446cd91f7137ef4d8cbe4bd68f010343e80901ea5629ccb07852289bac30692163cf8f00cbf72ff3e36872f227517a14ab409281db0d6622d08113defad91d4895c472dbaac8bc845a31698ef9ca0ecefe54b9f7b8a4ffecd336c5c05fc02d805b45ca4b70c9ff8f839bef0991f91f7e6d8bd7033c176280a47674623f4069bc317b9f35776f3c8a3879bb4fcf6c49798780e24894e2887f093c7cfd15d17183d473eb468bd53587eebb9d324d8fad7a828667c9252aa4e04f9fa035ac5b0c4a50b3d9e7d7a03bc41cb4e2d3363d03084481090f54aa940c23bef8377bde72654bacab07c0da10a9a8c5bf03176a4554a9676d03a656cf14d4d48f3c8ced34a66996f9f60f572c6d73eff0bbefcd90b0c5640a93669da0640cb8456ab4db9095ffedc05bef7cdb3188e92e963f86a8656ab43920636fbe769cdf5b8e78163dc794f4390929d6b4e9af795e0e1d9a73779edc22692165aebda17d929cfde7cb7dd5397d7a354fdba2865ea086d0dfd47a1550b57655cbd3c607d05242d42909120019c8bba270459871fa22c6ecfc2bd0f1ce1c4e905367ae7e9cc4623204241e518322a35de433e2c27164723a226ece810d3bf553e4b7f7d861fffe0129ffee473ac5f0563325ce128ca1e50920f7a0cbb3978b87c0efeeeaf5fe6737fff0473e94d18b99f62a8b0d6a24d85f5ab2cec86df7affdd63776c54fa3655c585a72c2d78b87a19ae5ede849092a629d6955bf3375b88b273e24a8e57df045126bc4a296358d9ba6aa44b86038b648eef7efba918e574015b79a450717285448a04598baab2ea8184a327e05d0fdd46b77f09934471131d37430831fc6d4c5a9bd516a543ed0314681348d2b152d4ca20421bcd6112778a7ffaca0bfccd5f3ecdc6559021c5e6a2ae34e8a193028851662c480fbd25f8f85f5ee0539ff801d21d64d7fc298a3c628687c53a9e75eeb9ff14676e8b82436a4b08710ea26e8c487a514f789ab6480c7cef3b4fe2dd58c47aeff0de12822384317162bc6d3b6ab22e98d809c21287adc3090dfa430849089ab59592e56b13078ac9d5236b0748019e4089c9e0cc6d1dd25689537974b2e44eb1cd46913b10317712a828ca8210c0bbe8940529516111ed4ff08ffff853bef80f17595f028941d226488fd20e1f2cce57481db986a029f23c5a4f257ced4b17e9975779e4d113ec3d7884bcba827305ed19811d6e72f3adf3bcfce206a102448cc11164eda38e4324de092a0b6babb0b6da23994bc6efb323da6fe73161654de678c7c4713644b8ff08b62f11245c7e6d8dcbaf35c4b0a3091c5b1451234a0448985b84fbdf750b3acd11d2421011bdb1e59eb558125594dba2224905888a343564690bef0c227448f53e843bc097ffe12c5ffccc45965e03ad40ab16d65538178b806ce51002b456d1c1cd0b4021451ba9e0ea4578eed98acdf50aa3e62018021e9d5884ea71dfbbceb0b0bb36426bcb31e64962094523791a34fed235b87c6915ad5ab50e85517a7b7ad1efc004d77341474409418cfc81e661b4ceb8726983fe0635e1dd0eb2b2e628e9103226976ebde318d6756b792c632863478fd58fc4a6acad354242f0198a4516674f63f3dd3cf6ad97f9bbbf7e96a5d7e223a4c90c6559d0f809b68aa006a313bca7fe3b60921856f70e16f7c1bdf7cdb3b0b0c0e666372e222919e66b2007dc72db4176ef258680a6a2b37e222e2445020136d6e1d2c535b4eae0dda443383d373ba770276663e79e1f4aa9ba6cccd7ab20266b9697ba13c682275a4adb1598f716a5e1e8b194f98584bce8e2430413441f25424fb71b16f13a6561f14ed1dbb4e4fd844e7a82e1e62ebef38d737cfcaf5e66b809f8e841f7bb03c0a39547c966e9c6ba115b46e7b4d349716e401016d3868ffdc949def71b77b0b83ba3b2395a25518fe49b485d30bfa83970285a8dd37a780cf1d228150982832b97369074f0d66c3f896949b475bede3041d5882ae7aa28f30504af58bed69bb8d74458798ae8018fd270f2d421acefe37c8ec6e2bdc23b597bffb5d5b123be4921d068d96671ee34c3cd79bef80f3fe1f39fbe42f71a28158f71750ea29565d179f515524884843c2f892846c530efe3051c3c0abffdc1e33cf4be9398994d5cd5a7d5d668e329870e213d4296b8d0e3f8c93d48bd8cb744ab3134f0fb38c1025d2b680dc1b274ad4b7019c12788e06b89303526422f6f4090ed72ad317bb5d6042fa82ac7d2523ec175134681a89d9089eb4909c78e1f6238ec629238f123a84fa36f84dbcec141a2b5213845aa77d3df48f8ce379f1d11a3d36ed1ef0e8102046469861012ebc680391793222891616d3922c647ffed9dfcdafb4fe2b2730caa2b041b481285f7118b6c1281f30565d5e7d4e92324e932791eadce985c8b52239af5312c2f85c107cbea0ad82a0224a0642b97bc7ef8446f458c13ada366a58a68da39676bfd11b9a52a2d9b1bd7b9ee96498dba2548d8b57786bcba4ad256b80055e14069c236ae98bca8c255092a2ce206fb78ecdb67f9e4ff778eee524d8c5e8994d42b5790e74d195b5cc9debb58f4193c525754ae24e9c0fb3f789a5f7fff49bac50b58bf8469792a17e80d87b4b358766001672b4ad967ff810592047288f0161fe27d4344c03867eb147554ecfd6e0df19a0c47356197118a7f5bdab02148557be87abc5a43a8bd538bf3394a0b3a9d59cac211a30192aa88d78da80c31ba6ec0d4370f408534d09e07ddb2045d228da02c1d5e09a4743859a0b54485da4c142ee6b49d47893952bd0b9f1fe11b5f7a854f7efc25baab31f8580c874801c12a4488312331455081c107c9dc6cca667f8585bdf0277f7e130fbe6f3fbdea094cbb40ea84bca84892843413583b8020502663302c11c906e9cc3caa7e3c57436683f4e0c1f9aaf677ea581d5095114da3128590920894c8eaa72a4138429d6f12db0882674bcf90903042738b8054110f1b5ce41021549de2ace77c5b7397e66734613d356e4a0784f2585fc45c86822004420486c321a98ee26030e8a294a195cc52e533e8b08baf7ee1a77cf13317e8ae1015381a2f72bc23963f34f8dc5114769cc798692db0d95d6261b7e40ffeedfd3cf4ab07493a1718da3eca584a1b70ce8f4468515aa494b4b384f64c0b5f3994a9751534c1bd98059d9c4b518d6eef5d14f35a4ac24ea176616b71b67dc806cd370e0b4c8a0c5fd78cc73cb388b348f0628c4adf665fbb9aa061441729a87d1953636c6348468a8444cf8f420d5996453fc3cf93ca9ba038c5d7bff8225ffefc05ae5daa1f581239c833b6a470c4907fc9a834adc60a379d1acac2e3ac666ee62099d9c3a02728f2809016654aa4aae2c24150e615c36159bf737c6e3969000a155fb3160c316ec7282b1b42f4df46bedbc82598540f3b5bb57a673070e307307282bc0725e3aa1342601a8b6e5a058cb0ae135644005bc5b618b6b428139042136ad3374d5a042fc94b47a77580b9f671d6aeb478fcb1d7f8f4275e6563058c1618dd66d08bb09ac4b4b00ddaae2907106e1c9915b11ab4b003d22465d02ff8eca7bf8f4a9779ef6f9e60263bc6b0bc883415819c20044a1bdaed3690d7864c2011095519262448a8f588448a716d4ca8bdf7c6aa8c8ba731e719cfc74e96e4c498c8184e65c226e778949097b5a398d06a4de705e4f8ef91e28aa3c8a1d72d6b71e747d70b5e501439ce39ba9b43f281a2931e61b8b9c077be719ebff9ab9fb37e0d8c6821c31c839e45a0e9b4679122428cc60fe988cb96898f4350e19c430acdda327ce2e3bfe0dbdf781ec3711667cf8c3cf332ef539543940eb4db19ed3423d5299284eefab0ce8dd46f1a9a856922f4148914311e878895c0dac811526534afa3c29eeba771dfd00f695e26085187c73d59963033db0231d8aa4746d8a33026ac80411f5657ba1c399d8e1acd8410f0c1621241bf57d2d28becdd750b6bd732bef4b927f9f267cfb3b9044a64e0db145501688c8978e0b26a6cfb9a1b839ce08ef1f3072cd60912d322881ebd8dc0e73efd2a21483ef06fde41d6da24d18a7c30603828f069c4f646099e60305cbdb24ebfd75c50469d8ba823da75084828bc8fe6f7dcbc264974d44ba3399f5c3dd74f43bd4e4e3d0e6b6ddd7f24a648bdf764ad8499d9642a94a0d8da1121ae0e2953ca01ac2cf7f04e21848979fa60f1be429b803109edf410bdb579fee9abe7f9fca7ceb3760592a4458479361d8362aea5ac4ac0c5ce0e48628d4863213225463d824059594468932a58ba04fff0f7aff08f9f798acda514e5f7d04af72248b06581ab0654659faacc11245cb9bc463584c418044d715220f8683c48a946e96d24cccdb7c8b2a4ae3d69603f76cc2141b025b5fb4b91aa791d4f7d435deb128b3681349b840d45d32e7eb6981e518e06e86d3a82cb9022ad23c6b1a4a0280adaad05aa7c966f7ded393efdc9a7e82d813133948540c810db619868c35b57a2a42249f42804335290418e095213a5d58ae00a89c6569222d728a0bf017ffd97aff0fcd33dd6ae6508bf9b442f92980ec618d24c91a629f8948db5123c75d787b14e08756d4ac4f54a102035b43aa04d182118b7587f5bda126e1f13dfee108d048c31b1c5510824498236825e7f955bef383a9a8b50afcec4b4c02bf09256ab5587ede3aa7dec7b67595b299969ef079fd6c4f6189d2199e1cb5ff867fed35f3dcbda259072175a2c8013d82a0731a4b49b8450a0a444e9581115b15f8e76ab1d635048948c064270a095a028aa5a67d5f91d52824b29878085fffbff78911f7dfb0a8bad33a4722f790f129d51e4154aa660531e7f6c0511c0554d3daf47e0eb22555da79d4ba839f8f63b4e32186e90a41312638498797d892447c4980e74d5940c218c923231fe5f82cc995f94a4339120317619a82a072884d40811adb172186b34ae5d81d5e512c52255912030a4694a913b9e7bf62c3f78accb601d501a5fc270300004593b8db9130526d16823294b5b9be29eb9b994fe7089caf5c852538b8ee89b54a59af09027df4f463fa08ef6ffe7bfbdcc273efe4fd8e1228b7327a9f23692195c6578e9cba1ed76000016fb49444154852b6cae43f08c134fa28984538b5f8f36b5429f855d7b1374e270bea88920a6eedd70f58e04d929fed15801a2f619629330a962f62e3060ffc10e878fc6eb9a2426a23c1e290d5aa5545585afcd20a9a1bb022f3eb742359c458479bc1775283fe5c4f153dcff408b857d40b0a8d493b50d10c80705c1d7f25b08cac2020a2d3b2449c2666f9d85dd9ece9c252f7b1119af53204190c55050a3f847ed33ea161a014219b3879ffadbcb7ce34b4f81dd8f118770c359327980277ef812ebcb0d3d03028724441337341668404a0f120e1e868387671032af41e6536354cbb8f31873c875ece3318778a40af89013c480ddfb0ca7cfc45521a445cbb80a42882df4aa72fc30c664e0e1a73f7e95cb174b665b47f136b6deabaa8add7b66f9e0bff9353efcd193640be0fc3ad2f4400c89e8c40cef25652d7eb2d4e0434169736677c11ffcf1bbf9a37ff75ef61c0487c3d3c3e85a5c3643b809c56ac7e2d925b45b19fd55f8dca796f8cae79fa1e8eee5f0befbe8adb778ea277d7c6dd009d9342e082327309af121e2d1049cbc0976ef4b29aa75b49974041b07bc51e8f5bc4f3184dc4a8ce9248adc92f70da18aad8de893b62bcedc76080494d5207abc75466d547a5c87d66ded383ff3b392679f5c468b7d28d9ae4178814b57ce22cc2a1ffcbd77f2b13f3d89e8c020ef23338fd2313f5fe61e82a6d53694b6871725ed39f8933fbb85473e70848ffed13bf8fd3fba9d99c568600a35c0857cab97dc4415268c11ad12069b915b3696e0e3ffef797ef4ed6ba8ea267efcfd4b5c3a1f4f8dcd061c12870815d247a7cf3a4792682a1b39e496dbf6a0939c61b18e313be88a30e92c6e1fea237f9efec5386c226194c56bac2831325385f4c470b24790a159e0f1c72e33ec42f016adcd08e9ae9424490dd65a820bc824c397153ab31c3bb18799850aa10784e04852453e1cb0b038cb995b4ed26a75b9726593ee3a28116a4f5992a4096519f319878fc347fef0161efe8d7db4e6d6d0c9807d07e6989d0d9c7f758dee6640c9c6aaa1e68ec9898106621402282390c26373b876659dab975778fc87cf73f982ab2d2ce2fb37893a14a10e689a445039c78123f0a13fb899998521837c89565b639ba097f0f5fd621975a8c34b622ad4a13ef267e62fb67285195f4004a450a3ee07de17982486e3cb1c76cf9fe4fcd96b5cbe58e21c75b9710c426a2deb4aa41a14a0da0457d01bf6712c73cb9d8b24ad9ca21c3033dba62cfa6c6cac600c9c3c79824e4bf0f39faf520e00efd0ba05c2e182e5c849f8bd3fbc8bdffcdd53143c8713afb1baf12a594b72cb2db761b4e7d55756290b6ad3348c175823c383062108de625a29be025f2a9498676d65c8b3cf5c666dc54115eb175d8c6436d177c02030282970e4280df7bf7b81dff89d9be917e731691491de4f1a02b531818804116ea77ce20ea9d309f3779cd01735ac54138260986f32b7a0b9e3ae23cc2ed4346cccba1039cab99c2cd3b54e157466f6b2710dbeffad358acd3944b99b7d7b8eb3bcbc8c5415bbf719d6ba2fa1b26b3cf281dbf9e8c78e2063331ebcee51851cd381dffadd13fcfa074e31f42f91b40b5452615a3983ea35746799dff9bdbbf9e0efdf4c55e7bf828c31a78084106368cdbb4a25a886835a391b9c1764e92e249268c926a39201e7a238f4cdb952a24c8275a05b70fca605167665f48b2ead568ba26a4465b34d86634b586987d089fac8ff9cfdc538f228eb18d01864101823cea554782f9032254d5b0c0705c78fdeccf7bffb02ebab909984b2d4280cde47856cad254925ae8af5db523a06bdc0d5cbe7b8ebaebb092247252542392adf439a82bcece171dc7df79d18d3e7b5ab9b0cfab0e728fce9ff7213eff98da388f679bc5ac52b45e535c22884110ced2618cbbe03f3dc7ceb3c3ff8feb509bf2cd69984e00935f02d10ea886df42d0416e7626789da4cc18fc2418cf704005cf0d810405aee798fe4d10fde4a3adb45e89c7ebf409b8c303226eaaae29a27042aea67b135b4a03ef267edbf1847e318b3f738bc39f17b034a883a46a098692f30ec6ff0e2f343fadd0a2d5b84a00814234e3346e22b85141aa30dce160c07d0ebae70ef037751b99c40d425260df850e07c81f515a76f3a8d0d571169c9bb1e9ee5c15f3dcdae038ec25f22af36b0565355a18e5915b89093a4d0eaa474663a1c3c9871f695558a01cc2eb46a4c56209bc9b055dd02a4095b8b66158fd01b18a39152d4c03631921a4df0d2b4245e3bdefbe81cf73eb49761f51a65d5a5d399ab5129f5e216937a5a8c7f6ec1b3dd608da14091a89403fb8ef2ecd3e758ba06894e09de44ceaa97a65269f49e83402b837505f930f0eaf91cad07ecdd7388a3878f331cf4595db94a9a0a3a6d83b57df6ef5f607ede70f3cd73dc76fb5176ed5194e52a79be810f81346d2125682d504ae06c19bd74ad69b55adc7dd79d94d512bf78a1c7b0578e3ce65193e6eb3868cd70ce4d34791e435e85102813b0ce71d7fdf0db1fba89fd471cdde1ab20731293d6257d0d4e4d306e1728c6c4dfaed46f80204190e77df6ec3ac0e6c690b32f7619f68b88c210b21606f1a583175140f898b8f1bec23b78faa94d3a1d387ce818ad561b1f0a6218bdc4f982b5b5251676b5d87f701e95140cf265ac1fa0940719ea7266873692243148197bf996554ea0c2bb9253a78fd2690f78f5428f7c08da80af4108624a64bceefbd6d5644d9ba7bad2828ffef171ee797037fde21c42f7318920cf1d5298110e61ab9f372985b62e881be4108fb5038480bdbb8fb37ced0ae75eb6045fd1f42991d4b58138c248664b9224c3688d2d2b5e39b7c1c6c61a478f1ce7e4a913042cbdfe2642baba26dde1438fd26e2075c9ec9c214925d655f8505054435c55a2b5aa91f61ebc452bc770b0c1ec5cca2db7dc4292e4fcfcc90daa01183543f0096390dfce436b3d728ee3429a3856c143bf058f7ce0080b7b7336fbe74952504a53151225d3da81ac7344a24e334e8aaca9716304119e2c833ccf3974e004450e2ffc6299413f104289a46e9c2f620974a895632056d35aeb6875e6187673cebdda6775f5358c31ecd9b38ff9f9855824a425d6592a5b2065ccc6391f934e5a099001e71d6511394e2b13efe5634a364d25f97048088243074fb06fd71c972f5d637da5c4982cc6e65e8720e3a667d1ac6fe03f699a32bfdbf11fffb7f731bfb78f0b6b485de18327784d62666a20036cdb38464c18516faac8c2a355c0594f92a4cccdcde35d9fcb97870c072065dd305fe868738b50a3c5ebec1ec44e3a46e30bcbc5731567cf5ea22a2c999947d246840c11128c4e5152525525c3c110ef2cda688412189dd6c933305211bcc7d912ad14ce5aa4d4d8dc73e4e069eebced7e56967a3cf3f4258c0a38bf03886d8a20a3c9aa519c4208daed36f3bb1dbffda13b51d926ce17e3c06650689de1acaf19a2e1c2464c35c4d89e03bf4182403ecc494c42bf3fe4c89123cccfcff3cc331758ba0652c47a71211a38aa4529d046a074dde9c0ba98e891823483b56bf0d44f37b874e902b39d3decdf7b9cd4cca25586b3b165462b9b47a91665ee288a1293b45032438a04a3da312deb128c9e23d18be0e7e8a44758bd06dffcea4ff9e7c79e636dd952956e223dbdf34892a446a444a51e4bfa5c4cdc259663a7663878780f520806839c56ab859432562d134b34c6809c8934f7758c891b6af1270218695052d2eb0e907498eb1ce7ecf3033ef9d74ff1e31f10c120756d76ac7acf47cf922482ca3696c8247bc7b8100adef14e387d669177de7f929b6f39c8ecbcc4f99ca21852d1c7b28a90162913a44851a4489145872e64b822e185e7aef0a3efbfc0333feb72e522147d08550b8f2450604cccaf40d30ec38df23f6320c5f611948716fce99f9fe0031fbc176196d918bc84498768139b1668d5661cdd9d8c38db3aa1d644a3df148248a44f494c6c2450958e2c59c415bb78fcfbcb7cfd8be778fa09900124ad9a53426d4155b196505173b266dcdad547474a5a8280b403bbf6c29e7db06f3f1c3bb18fe3c78fb277df1cba55a2128f52065b41777dc8d52beb5cb9bcc6c69ae5c91fafb3b10a6b4bc4fefc3e2e104507f0380668cd68e29bc84433a4dcee4d8f0822232a73f120fcce874ef3810fbd83995deb2caf3f87503d1617e7e975cbad2900594c3889c450ca44eafb867b2e4a9152150e9548942ea9fc3a0b8b0bdcffee1364c922975ffb29dd5528f32146760801ca327285b89e320d75ef432fd1a6c4e5310f7ef535780650ea1a697a8d24019d52373da6be36f47b9077d992398da51c1a4904fbb9d01f1d1082d8122282adbae3ba234468d4da25cf173e7316ad258f7ef026762f9ca43b7c85cdcdcdd885025bc7cea69354300dc3ba413f4491e8766ca61f4aa48c1eb37316a33376efde4d92783637d7595e8ed69131026ba30c353aadf3e2f5433626e1c8348cb85def3cde8e57b8afa0ca6307ec4117fa6bd05d85de1a0c37c1e6a0a521d11db0294ab651a28596690d1889790d21dd88088db2562a9ace8d027f5dc2080122452530ec7a5e7e7595d9b99c2347f7a09392d2f690b281d93601ce0619d328f6adc9aa1b54ea92e0244647c0810fb12ea32872aa2aa7d349b9f3ae330859726d698d8d4d20385a2d8324a1aa227a5c043542b9c67892ab3f61b4710ba1c63f058344236b508514b34046449e68f03180e8ddb8b7a20f75695bc82194b15650c44e744dba404a39f2ca1b8fbcaaaad757fa0282abd0a9260847d187572e6e22f505f61fea30339bd469dc068d3fe99937257f5b2dad1bb6b2ca3c67a6d34608a8ca2a02a715f83040a81ca92b0e1fd9c3befd191b1b2b5cbe14f7fe10c4bd42088de3c8442cc936326694658bbbe8243562057c883b18040f232c67802d803d3c52c4fa772de3ef52f8d1a1aec9554d60c5801198cfb937b0c2042002ae72e834627a874398df13b8f3ee4590c3894de3a6ccdc51ae7f6ba4e0863bca99048ab247f0baeeb8e311b240272596ab5c5dbbc2c17da778e0e143680d9df6599ef989a3bf61512ac5fa5a9e36758ad4b314c64e54f002e79b2668d19f495281d211b8673d04db54c6c65201253d427aaa328cc2e642d4b55a42e2474083edf1a4244968b55af47abdad9ef90eefdfb815d510641bcedc090fbde7080b8b33f4866b24aae900a11873c904466b6adc3087ccceb658595bc13ac7ccec2cce57e4450f640912167665acacaee003dc7adb1ddc7ce60cd675b972ad4baf5f2146052d93a9e4c6792276b7c6c736acb251c2218a22efa82a8b7796e0eb848f0470b1af9603a3d9523f143b4de8bafc41e2092003cac47d505030bfdb31bfdba112cb6018c6ab7814e585512a58c0dc1e2843ec86f7efffc383dcf7e009ba838b08d5388b8d67dee89026b23c1945af7fbbd156e3e27a553b23b34e22c810a18d2d33140b4866f8f9332ff1b52f9de7f16f51fb2af5670a6c27c41890b6f5be71c78298c98bf86751e72be2a28e0435c68cf735ac1b1f082190488288590f9339aaaa04030f3d027ff0b1f7313f3fcf2f9e7d8dffebff7c02db1864c180ab468b1d096626d683dcf64ef8f3fff830a7ceb4e80ecf11e426594b4cb5891de799c653b5b553d00df65c6c263f4cac9a6645c5108294195226b1340d8f17399d39c1a1a3f3dc7adb415a69c5cc8ca43f28c98bf8d069122d9de06b5db145a4680409011381e86a4cac10a2a1a1648ad6095a2794552dc684acdbbf7a84703185aa2c4158bc8e21f48ffef1711ef9c011e6f7f6516997838777d36e39ce9ddfa0e841d2d2a4ed94aa886d42da0b1148feee47e0637ff200c74e650cab0b946e85714944b3b8a625008cf5ca7801be3904692e3a3257c5c8be2e8a0ae77c6d420a06fd01c3e10029059d76c63df79ee1d889596617723c03fa7d18e61e6b2b8277a4690c8948a1d1aa436266e2262b21a9ab60633bd6b882a385150b8be2cb4a191364b17ca28a11671143f0a60df7bc47f2de47e7f8ed0fddc43d0fee66616f8e0b6bb8502085e0f6dbde81f7392fbfb246de73b85091b424ae8af552b7fd4a24c63bef3bceb0bc4a6997c95a5104c7c6ca0dc7cbd7f9391e6fc21e5493635a7c455bdb3b502a0608ad85228fc843112433ad0c233bb87296a52b8ee79f5ee1c99f5ce085e77a2c5d8da268547a3e21d622fcbf0ec56cbbe71879af0d58377e7fa1e0d8713873cb2e0e1def70ef4347d87714b2ce80cdfe45f27285344d11618661cfb067fe0e86dd39bef28527f9cc7f7e99c15a7c06dd8223c7e17ffddfdfcb91938a20bb6cf65e236b3bb296a02c63c1cf96def55bf6aeda79bc09049902484c8d346d612b4f554560b456094218bc8b28c0e160192925ad742f33adc368b197b565c7b99797b87471831ffdf039d656e1da5562a1e90488645bb61926942e239fab330f478fc7a6cc274fefe2f4cd073979ea207bf7cfb2b279915e7e99d25d4327154a85babb4f0ba3e6e96d0af62cde447f23e37bfff42c9ffdf405ae5d845bef828ffd4ff771f77dbbe9e5e7b0be87d2314ee57c1937b33469c4a44da688af334fa3c7bf31824c840060c71b96a5ad4bd5a028ca5a9c4453561b68a5b1eccc9606428b442d90260b247a162932ca22b0b6dae3f2a5752e5d5ce1caa50d96ae75595d8e2192b2182b725d6f9b3737af999b6fd1ea44e0f3ee7d29878eccb26b6f823243f2728d5e7f8561d5a7d36991573d903dd22c7aeab69204afd1aa455506aa52b36bfe04793fe1eb5ffd01e75eb13cf8ee23bcebdd77d01dbe426957c95a8a248dfb6df9e0461dbbb54aa6e6671aadf8a68aac29826c230cf47a3d161616ea17f5751f294f595668ada8f24ddaed36ad56270607bb3d06fd3c36256b421822891b4daa0e920ec127d8d2e06cac76f5de4714a4883591691abba8363e926788755dacefe219822862a721a5c88781f64c0744c160d8257868b53a48a9c9f39c56cb3018e41052123d4baf1bb3a18bbb6619e69b20873857a29a9cfec89994948525499aeae209f8cf643a376cd5236f1241b6275ac608f130da25c03947bbdda6d9c3566b8d12e0aa2276aa1302630c5a472cb1f3d5c8e48dfd7815de9a987a0d09d47d589af46a53c312372f8e798bd89121fe94cad6d1661baf0fc4b08b9c689f3459e1153781999f9f677373931004339d058aa2a428a2ee9a9deb8c30ca5ac71af73c8f15c29d4e2786f5a739e3bf3e415e67ec28372780789310a31ddaf96dedcad614a48cf1b1e3d61cb085fdb7ee5436f550e3678a8735c890c96bedb4c09a4f039e9e7cf7e9104b983a6fa7fb4f3d336f42e8640ce77a03c26c396772854c9e3f491019954380adfda6426de33737ae5f615beba3e6e2131335bd13ce088ad34c6e9d661513131f1aac738d0d16f5964aa3869893849b44b533450c3975dcce8afd4dd8f2686c6202db09f33acdd1a05ec8414c9c3fc9c28a180b093bafb4d07448a8893782c14e4036b7f45c776c9d184bd32a6a0c3c688844cd35757269d49da239aeee05b95363996d63929bc4f8bb1ddee9cd2348b3a204d721cae4b113c737a262cb39d723e03417ee1489dde9dce96450932e8671403344a28a091129a6093d759f51aedcf3c65b804f3deb8ea2ec4d1159cd0a6c1e9e9d89b2d398d8007274bd2ddce0d91efd9e1069c212bb3704c61d55a7af3f49f0adfa2786f9055b37239e7a6e518d396672f13575f15b44d284fe99147bd36314f10ddb94fa9bc421d32baa79c09d467d8c9866e1d70b734f9c3b7ddf11a27c825035027fabf29ddc12b6e1184d4c6cd9f135eb8d28c71d919ab61d92ade9d6ebe9871dc6165fad26866c828ec91635f4e610a4d95710d85e3fb783493cfa57c08b6a8a9b26274d4c2588025bc5878860b4d0ec75d89c3f791d6afdb093d801d9ec063ad2050db11a455e734850c48e49937d22ffa523302286c81973ec9b067280b872ea9fd3164c5389b5e3b34d660927587b74adfaffd3cdefb78d29426c697b3bba59fd73e21a5bf61f9c5ee1d3d798b6d4aef73cd75b787e6cdc6cc9816ce7ac1bdfe933c056ae98f423268fddd9f696dbde61fa451b8b67e2ffa3dfb7f79b7afd953b9987689e71d24a923b1c17ab81b72ca06dc74f7f3f798d492bb41189c938e838650cbc391c72ddf1af61eb1b39ef5f738d373a4e4e2dfceb1dff46d799d037db16f196bbfdf7f1761aff9d206fb3f1ff03e25cae02e6e1d0fa0000000049454e44ae426082 - - - - - BTeamStnSave - clicked() - HWForm - SaveTeamFromPage() - - - BTeamStnSave - clicked() - HWForm - GoPageOptions() - - - BTeamStnBack - clicked() - HWForm - GoPageOptions() - - - BNetGameBack - clicked() - HWForm - GoPageMain() - - - BDemoBack - clicked() - HWForm - GoPageMain() - - - BNewTeamSettings - clicked() - HWForm - GoPageTeamSettings() - - - BNewTeamSettings - clicked() - HWForm - NewTeam() - - - BGoTeamSettings - clicked() - HWForm - GoPageTeamSettings() - - - BGoTeamSettings - clicked() - HWForm - EditTeam() - - - ButtonOptionsBack - clicked() - HWForm - GoPageMain() - - - ButtonOptionsBack - clicked() - HWForm - SaveSettings() - - - ButtonDemos - clicked() - HWForm - ButtonDemos_clicked() - - - ButtonNGame - clicked() - HWForm - ButtonNetGame_clicked() - - - ButtonLGame - clicked() - HWForm - ButtonLGame_clicked() - - - ButtonExit - clicked() - HWForm - close() - - - ButtonOptions - clicked() - HWForm - GoPageOptions() - - - CBForts - activated(const QString&) - HWForm - CBForts_activated(const QString&) - - - - EditTeamName - HHName0 - HHName1 - HHName2 - HHName3 - HHName4 - HHName5 - HHName6 - HHName7 - BTeamStnBack - ButtonLGame - ButtonNGame - ButtonOptions - ButtonDemos - BNewTeamSettings - BGoTeamSettings - CBResolutions - CBFullscreen - CBRecordDemo - CBEnableSound - ButtonOptionsBack - LBDemos - BPlayDemo - BPlayAll - BDemoBack - EditIP - EditName - BNetGameStart - BNetGameJoin - BNetGameBack - ButtonExit - - - ipc.h - qprocess.h - qdir.h - hw.ui.h - - - IPCServer* ipcserv; - QProcess* engineprocess; - QDir cfgdir; - - - ButtonLGame_clicked() - GoPageOptions() - GoPageMain() - SaveSettings() - ButtonNetGame_clicked() - GoPageTeamSettings() - ButtonDemos_clicked() - NewTeam() - EditTeam() - SaveTeamFromPage() - CBForts_activated( const QString & fortname ) - - - init() - destroy() - - - diff -r 09de46a3328c -r ccd2c45f043d QTfrontend/hw.ui.h --- a/QTfrontend/hw.ui.h Wed Oct 26 21:15:35 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,228 +0,0 @@ -/* - * Hedgewars, a worms-like game - * Copyright (c) 2005 Andrey Korotaev - * - * Distributed under the terms of the BSD-modified licence: - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * with the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include -#include -#include -#include -#include "game.h" -#include "hwconsts.h" -#include "sdlkeys.h" - -class QHostAddress; -class QDir; -class QMessageBox; -class QFile; -class QTextStream; -class QStream; -class QPixmap; - - -void HWForm::ButtonLGame_clicked() -{ - engineprocess->clearArguments(); - engineprocess->addArgument("hw"); - engineprocess->addArgument(resolutions[0][ CBResolutions->currentItem() ]); - engineprocess->addArgument(resolutions[1][ CBResolutions->currentItem() ]); - engineprocess->addArgument("avematan"); - engineprocess->addArgument("46631"); - engineprocess->addArgument("=seed="); - engineprocess->addArgument("1"); - if (!engineprocess->start()) - { - QMessageBox::critical( this, - tr("Fatal error"), - tr("Could not start engine."), - tr("Quit")); - } -} - - -void HWForm::init() -{ - QHostAddress addr((Q_UINT32)0x7f000001); - ipcserv = new IPCServer(addr, 46631, this); - - engineprocess = new QProcess; - - cfgdir.setPath(cfgdir.homeDirPath()); - if (!cfgdir.exists(".hedgewars")) - { - if (!cfgdir.mkdir(".hedgewars")) - { - QMessageBox::critical(this, - tr("Error"), - tr("Cannot create directory %s").arg("/.hedgewars"), - tr("Quit")); - } - return ; - } - cfgdir.cd(".hedgewars"); - - QFile settings(cfgdir.absPath() + "/options"); - if (!settings.open(IO_ReadOnly)) - { - return ; - } - QTextStream stream(&settings); - stream.setEncoding(QTextStream::Unicode); - QString str; - - while (!stream.atEnd()) - { - str = stream.readLine(); - if (str.startsWith(";")) continue; - if (str.startsWith("resolution ")) - { - str.remove(0, 11); - CBResolutions->setCurrentItem(str.toLong()); - } else - if (str.startsWith("fullscreen ")) - { - str.remove(0, 11); - CBFullscreen->setChecked(str.toLong()); - } - } - settings.close(); - - QDir tmpdir; - tmpdir.cd("../hedgewars/Data/Forts"); - tmpdir.setFilter(QDir::Files); - CBForts->insertStringList(tmpdir.entryList("*L.png").gres(QRegExp("^(.*)L.png"), "\\1")); - CBForts->setCurrentItem(0); - - tmpdir.cd("../Graphics/Graves"); - QStringList list = tmpdir.entryList("*.png"); - for (QStringList::Iterator it = list.begin(); it != list.end(); ++it ) - { - QPixmap pix("Data/Graphics/Graves/" + *it); - pix.resize(32, 32); - CBGraves->insertItem(pix, (*it).replace(QRegExp("^(.*).png"), "\\1")); - } - - QStringList binds; - for(int i = 0; strlen(keys[i][1]) > 0; i++) - { - binds << keys[i][1]; - } - CBindUp ->insertStringList( binds ); - CBindLeft ->insertStringList( binds ); - CBindRight ->insertStringList( binds ); - CBindDown ->insertStringList( binds ); - CBindLJump ->insertStringList( binds ); - CBindHJump ->insertStringList( binds ); - CBindAttack->insertStringList( binds ); - CBindSwitch->insertStringList( binds ); - -} - -void HWForm::destroy() -{ -} - - -void HWForm::GoPageOptions() -{ - Pages->raiseWidget(PageOptions); -} - - -void HWForm::GoPageMain() -{ - Pages->raiseWidget(PageMain); -} - - -void HWForm::SaveSettings() -{ - QFile settings(cfgdir.absPath() + "/options"); - if (!settings.open(IO_WriteOnly)) - { - QMessageBox::critical(this, - tr("Error"), - tr("Cannot save options to file %s").arg(settings.name()), - tr("Quit")); - return ; - } - QTextStream stream(&settings); - stream.setEncoding(QTextStream::Unicode); - stream << "; Generated by Hedgewars, do not modify" << endl; - stream << "resolution " << CBResolutions->currentItem() << endl; - stream << "fullscreen " << CBFullscreen->isOn() << endl; - settings.close(); -} - -void HWForm::ButtonNetGame_clicked() -{ - Pages->raiseWidget(PageNetGame); -} - - -void HWForm::GoPageTeamSettings() -{ - Pages->raiseWidget(PageTeamSettings); -} - -void HWForm::ButtonDemos_clicked() -{ - Pages->raiseWidget(PageDemos); -} - -void HWForm::NewTeam() -{ - HWTeam tmpTeam(this); - tmpTeam.ToPage(); -} - - -void HWForm::EditTeam() -{ - HWTeam tmpTeam(this); - tmpTeam.LoadFromFile(cfgdir.absPath() + "/team.cfg"); - tmpTeam.ToPage(); -} - - -void HWForm::SaveTeamFromPage() -{ - HWTeam tmpTeam(this); - tmpTeam.FromPage(); - tmpTeam.SaveToFile(cfgdir.absPath() + "/team.cfg"); -} - - -void HWForm::CBForts_activated( const QString & fortname) -{ - QPixmap pix("Data/Forts/" + fortname + "L.png"); - FortPreview->setPixmap(pix); -} diff -r 09de46a3328c -r ccd2c45f043d QTfrontend/hw_ru.ts --- a/QTfrontend/hw_ru.ts Wed Oct 26 21:15:35 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ - - - HWForm - - Hedgewars - - - - Options - Настройки - - - Local game - Локальная игра - - - Exit - Выход - - - Back - Назад - - - 640x480 - - - - 800x600 - - - - 1024x768 - - - - 1280x1024 - - - - Fatal error - Ошибкаа - - - Could not start engine. - Не могу запустить движок. - - - Quit - Выход - - - diff -r 09de46a3328c -r ccd2c45f043d QTfrontend/hwconsts.h --- a/QTfrontend/hwconsts.h Wed Oct 26 21:15:35 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* - * Hedgewars, a worms-like game - * Copyright (c) 2005 Andrey Korotaev - * - * Distributed under the terms of the BSD-modified licence: - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * with the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -const char resolutions[2][4][5] = -{ - {"640", "800", "1024", "1280"}, - {"480", "600", "768", "1024"} -}; diff -r 09de46a3328c -r ccd2c45f043d QTfrontend/hwform.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/hwform.cpp Wed Nov 09 18:31:11 2005 +0000 @@ -0,0 +1,227 @@ +/* + * Hedgewars, a worms-like game + * Copyright (c) 2005 Andrey Korotaev + * + * Distributed under the terms of the BSD-modified licence: + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * with the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "hwform.h" +#include "sdlkeys.h" +#include "hwconsts.h" + +HWForm::HWForm(QWidget *parent) + : QMainWindow(parent) +{ + ui.setupUi(this); + TeamNameEdit = new QLineEdit(ui.GBoxTeam); + TeamNameEdit->setGeometry(QRect(10, 20, 141, 20)); + TeamNameEdit->setMaxLength(15); + for(int i = 0; i < 8; i++) + { + HHNameEdit[i] = new QLineEdit(ui.GBoxHedgehogs); + HHNameEdit[i]->setGeometry(QRect(10, 20 + i * 30, 141, 20)); + HHNameEdit[i]->setMaxLength(15); + } + + QStringList binds; + for(int i = 0; strlen(sdlkeys[i][1]) > 0; i++) + { + binds << sdlkeys[i][1]; + } + + for(int i = 0; i < BINDS_NUMBER; i++) + { + LBind[i] = new QLabel(ui.GBoxBinds); + LBind[i]->setGeometry(QRect(10, 23 + i * 30, 60, 20)); + LBind[i]->setText(cbinds[i].name); + LBind[i]->setAlignment(Qt::AlignRight); + CBBind[i] = new QComboBox(ui.GBoxBinds); + CBBind[i]->setGeometry(QRect(80, 20 + i * 30, 80, 20)); + CBBind[i]->addItems(binds); + } + + QDir tmpdir; + tmpdir.cd(DATA_PATH); + tmpdir.cd("Forts"); + tmpdir.setFilter(QDir::Files); + + ui.CBFort->addItems(tmpdir.entryList(QStringList("*L.png")).replaceInStrings(QRegExp("^(.*)L.png"), "\\1")); + + tmpdir.cd("../Graphics/Graves"); + QStringList list = tmpdir.entryList(QStringList("*.png")); + for (QStringList::Iterator it = list.begin(); it != list.end(); ++it ) + { + ui.CBGrave->addItem((*it).replace(QRegExp("^(.*).png"), "\\1")); + } + + cfgdir.setPath(cfgdir.homePath()); + if (!cfgdir.exists(".hedgewars")) + { + if (!cfgdir.mkdir(".hedgewars")) + { + QMessageBox::critical(this, + tr("Error"), + tr("Cannot create directory %s").arg("/.hedgewars"), + tr("Quit")); + } + return ; + } + cfgdir.cd(".hedgewars"); + + QFile settings(cfgdir.absolutePath() + "/options"); + if (!settings.open(QIODevice::ReadOnly)) + { + return ; + } + QTextStream stream(&settings); + stream.setCodec("UTF-8"); + QString str; + + while (!stream.atEnd()) + { + str = stream.readLine(); + if (str.startsWith(";")) continue; + if (str.startsWith("resolution ")) + { + str.remove(0, 11); + ui.CBResolution->setCurrentIndex(str.toLong()); + } else + if (str.startsWith("fullscreen ")) + { + str.remove(0, 11); + ui.CBFullscreen->setChecked(str.toLong()); + } + } + settings.close(); + connect(ui.BtnSPBack, SIGNAL(clicked()), this, SLOT(GoToMain())); + connect(ui.BtnSetupBack, SIGNAL(clicked()), this, SLOT(GoToMain())); + connect(ui.BtnSinglePlayer, SIGNAL(clicked()), this, SLOT(GoToSinglePlayer())); + connect(ui.BtnSetup, SIGNAL(clicked()), this, SLOT(GoToSetup())); + connect(ui.BtnNewTeam, SIGNAL(clicked()), this, SLOT(NewTeam())); + connect(ui.BtnEditTeam, SIGNAL(clicked()), this, SLOT(EditTeam())); + connect(ui.BtnTeamSave, SIGNAL(clicked()), this, SLOT(TeamSave())); + connect(ui.BtnTeamDiscard, SIGNAL(clicked()), this, SLOT(TeamDiscard())); + connect(ui.BtnSimpleGame, SIGNAL(clicked()), this, SLOT(SimpleGame())); + connect(ui.BtnSaveOptions, SIGNAL(clicked()), this, SLOT(SaveOptions())); + connect(ui.CBGrave, SIGNAL(activated(const QString &)), this, SLOT(CBGrave_activated(const QString &))); + connect(ui.CBFort, SIGNAL(activated(const QString &)), this, SLOT(CBFort_activated(const QString &))); + ui.Pages->setCurrentIndex(ID_PAGE_MAIN); +} + +void HWForm::GoToMain() +{ + ui.Pages->setCurrentIndex(ID_PAGE_MAIN); +} + +void HWForm::GoToSinglePlayer() +{ + ui.Pages->setCurrentIndex(ID_PAGE_SINGLEPLAYER); +} + +void HWForm::GoToSetup() +{ + ui.Pages->setCurrentIndex(ID_PAGE_SETUP); +} + +void HWForm::NewTeam() +{ + HWTeam tmpTeam(this); + tmpTeam.ToPage(); + ui.Pages->setCurrentIndex(ID_PAGE_SETUP_TEAM); +} + +void HWForm::EditTeam() +{ + HWTeam tmpTeam(this); + tmpTeam.LoadFromFile(cfgdir.absolutePath() + "/team.cfg"); + tmpTeam.ToPage(); + ui.Pages->setCurrentIndex(ID_PAGE_SETUP_TEAM); +} + +void HWForm::TeamSave() +{ + HWTeam tmpTeam(this); + tmpTeam.FromPage(); + tmpTeam.SaveToFile(cfgdir.absolutePath() + "/team.cfg"); + ui.Pages->setCurrentIndex(ID_PAGE_SETUP); +} + +void HWForm::TeamDiscard() +{ + ui.Pages->setCurrentIndex(ID_PAGE_SETUP); +} + +void HWForm::SimpleGame() +{ + game = new HWGame(); + game->AddTeam(cfgdir.absolutePath() + "/team.cfg"); + game->AddTeam(cfgdir.absolutePath() + "/team.cfg"); + game->Start(ui.CBResolution->currentIndex()); +} + +void HWForm::CBGrave_activated(const QString & gravename) +{ + QPixmap pix(QString(DATA_PATH) + "/Graphics/Graves/" + gravename + ".png"); + ui.GravePreview->setPixmap(pix.copy(0, 0, 32, 32)); +} + +void HWForm::CBFort_activated(const QString & fortname) +{ + QPixmap pix(QString(DATA_PATH) + "/Forts/" + fortname + "L.png"); + ui.FortPreview->setPixmap(pix); +} + +void HWForm::SaveOptions() +{ + QFile settings(cfgdir.absolutePath() + "/options"); + if (!settings.open(QIODevice::WriteOnly)) + { + QMessageBox::critical(this, + tr("Error"), + tr("Cannot save options to file %s").arg(settings.fileName()), + tr("Quit")); + return ; + } + QTextStream stream(&settings); + stream.setCodec("UTF-8"); + stream << "; Generated by Hedgewars, do not modify" << endl; + stream << "resolution " << ui.CBResolution->currentIndex() << endl; + stream << "fullscreen " << ui.CBFullscreen->isChecked() << endl; + settings.close(); +} diff -r 09de46a3328c -r ccd2c45f043d QTfrontend/hwform.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/hwform.h Wed Nov 09 18:31:11 2005 +0000 @@ -0,0 +1,81 @@ +/* + * Hedgewars, a worms-like game + * Copyright (c) 2005 Andrey Korotaev + * + * Distributed under the terms of the BSD-modified licence: + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * with the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef HWFORM_H +#define HWFORM_H + +#include +#include +#include +#include "ui_hwform.h" +#include "binds.h" +#include "game.h" + +class HWForm : public QMainWindow +{ + Q_OBJECT + +public: + HWForm(QWidget *parent = 0); + Ui::HWForm ui; + QLineEdit * TeamNameEdit; + QLineEdit * HHNameEdit[8]; + QComboBox * CBBind[BINDS_NUMBER]; + +private slots: + void GoToMain(); + void GoToSinglePlayer(); + void GoToSetup(); + void NewTeam(); + void EditTeam(); + void TeamSave(); + void TeamDiscard(); + void SimpleGame(); + void SaveOptions(); + +public slots: + void CBGrave_activated(const QString & gravename); + void CBFort_activated(const QString & gravename); + +private: + QLabel * LBind[BINDS_NUMBER]; + HWGame * game; + QDir cfgdir; +}; + +#define ID_PAGE_MAIN 4 +#define ID_PAGE_SINGLEPLAYER 0 +#define ID_PAGE_SETUP 2 +#define ID_PAGE_SETUP_TEAM 1 + +#endif diff -r 09de46a3328c -r ccd2c45f043d QTfrontend/hwform.ui --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/hwform.ui Wed Nov 09 18:31:11 2005 +0000 @@ -0,0 +1,707 @@ + + + + + HWForm + + + + 0 + 0 + 640 + 450 + + + + + 640 + 450 + + + + + 640 + 450 + + + + -= by unC0Rr =- + + + + + + 0 + 0 + 640 + 450 + + + + + 640 + 450 + + + + + 640 + 450 + + + + 2 + + + + + + 230 + 170 + 161 + 41 + + + + + MS Shell Dlg + 14 + 50 + false + false + false + false + + + + Back + + + false + + + false + + + + + + 230 + 120 + 161 + 41 + + + + + MS Shell Dlg + 14 + 50 + false + false + false + false + + + + Simple Game + + + false + + + false + + + + + + + + 20 + 10 + 161 + 51 + + + + Team + + + + + + 460 + 340 + 161 + 41 + + + + + MS Shell Dlg + 14 + 50 + false + false + false + false + + + + Save + + + false + + + false + + + + + + 460 + 400 + 161 + 41 + + + + + MS Shell Dlg + 14 + 50 + false + false + false + false + + + + Discard + + + false + + + false + + + + + + 20 + 70 + 161 + 261 + + + + Team Members + + + + + + 190 + 10 + 181 + 321 + + + + Key binds + + + + + + 390 + 110 + 181 + 221 + + + + Fort + + + + + 10 + 20 + 161 + 21 + + + + -1 + + + 65535 + + + + + + 10 + 50 + 161 + 161 + + + + + + + + + + true + + + + + + + 390 + 10 + 181 + 91 + + + + Grave + + + + + 10 + 20 + 161 + 21 + + + + -1 + + + 65535 + + + + + + 80 + 50 + 32 + 32 + + + + + + + true + + + + + + + + + 20 + 10 + 591 + 71 + + + + Teams + + + + + 200 + 30 + 171 + 22 + + + + + + + 10 + 20 + 160 + 40 + + + + + MS Shell Dlg + 14 + 50 + false + false + false + false + + + + New team + + + + + + 400 + 20 + 160 + 40 + + + + + MS Shell Dlg + 14 + 50 + false + false + false + false + + + + Edit team + + + + + + + 20 + 120 + 151 + 22 + + + + + 640x480 + + + + + 800x600 + + + + + 1024x768 + + + + + 1280x1024 + + + + + + + 20 + 180 + 101 + 18 + + + + Enable sound + + + + + + 20 + 160 + 101 + 18 + + + + Fullscreen + + + + + + 420 + 380 + 161 + 41 + + + + + MS Shell Dlg + 14 + 50 + false + false + false + false + + + + Back + + + false + + + false + + + + + + 30 + 380 + 161 + 41 + + + + + MS Shell Dlg + 14 + 50 + false + false + false + false + + + + Save + + + false + + + false + + + + + + + + 240 + 180 + 161 + 41 + + + + + MS Shell Dlg + 14 + 50 + false + false + false + false + + + + Back + + + false + + + false + + + + + + + + 230 + 160 + 161 + 41 + + + + + MS Shell Dlg + 14 + 50 + false + false + false + false + + + + Multiplayer + + + false + + + false + + + + + + 230 + 260 + 161 + 41 + + + + + MS Shell Dlg + 14 + 50 + false + false + false + false + + + + Demos + + + false + + + false + + + + + + 230 + 210 + 161 + 41 + + + + + MS Shell Dlg + 14 + 50 + false + false + false + false + + + + Setup + + + false + + + false + + + + + + 230 + 310 + 161 + 41 + + + + + MS Shell Dlg + 14 + 50 + false + false + false + false + + + + Exit + + + false + + + false + + + + + + 230 + 110 + 161 + 41 + + + + + MS Shell Dlg + 14 + 50 + false + false + false + false + + + + Single Player + + + false + + + false + + + + + + + + + + + BtnExit + clicked() + HWForm + close() + + + 310 + 330 + + + 319 + 224 + + + + + diff -r 09de46a3328c -r ccd2c45f043d QTfrontend/ipc.h --- a/QTfrontend/ipc.h Wed Oct 26 21:15:35 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,183 +0,0 @@ -/* - * Hedgewars, a worms-like game - * Copyright (c) 2005 Andrey Korotaev - * - * Distributed under the terms of the BSD-modified licence: - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * with the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include -#include - -#define MAXMSGCHARS 255 -#define SENDIPC(a) SendIPC(a, sizeof(a) - 1) - -class QSocket; -class QServerSocket; - -class IPCServer : public QServerSocket -{ - Q_OBJECT -public: - IPCServer( const QHostAddress & address, Q_UINT16 port, QObject *parent ) : - QServerSocket(address, port, 1, parent, 0) - { - if ( !ok() ) - { - qWarning("Failed to bind"); - exit( 1 ); - } - msgsize = 0; - } - -private: - char msgbuf[MAXMSGCHARS]; - unsigned char msgbufsize; - unsigned char msgsize; - QSocket* ipcsock; - - void SendConfig() - { - SENDIPC("TL"); - SENDIPC("e$gmflags 0"); - SENDIPC("eaddteam"); - SENDIPC("ename team \"C0CuCKAzZz\""); - SENDIPC("ename hh0 \"\""); - SENDIPC("ename hh1 \"\""); - SENDIPC("ename hh2 \"\""); - SENDIPC("ename hh3 \"\""); - SENDIPC("ename hh4 \" \""); - SENDIPC("ename hh5 \"Just hedgehog\""); - SENDIPC("ename hh6 \" \""); - SENDIPC("ename hh7 \" \""); - SENDIPC("ebind left \"+left\""); - SENDIPC("ebind right \"+right\""); - SENDIPC("ebind up \"+up\""); - SENDIPC("ebind down \"+down\""); - SENDIPC("ebind F1 \"slot 1\""); - SENDIPC("ebind F2 \"slot 2\""); - SENDIPC("ebind F3 \"slot 3\""); - SENDIPC("ebind F4 \"slot 4\""); - SENDIPC("ebind F5 \"slot 5\""); - SENDIPC("ebind F6 \"slot 6\""); - SENDIPC("ebind F7 \"slot 7\""); - SENDIPC("ebind F8 \"slot 8\""); - SENDIPC("ebind F10 \"quit\""); - SENDIPC("ebind F11 \"capture\""); - SENDIPC("ebind space \"+attack\""); - SENDIPC("ebind return \"ljump\""); - SENDIPC("ebind backspace \"hjump\""); - SENDIPC("ebind tab \"switch\""); - SENDIPC("ebind 1 \"timer 1\""); - SENDIPC("ebind 2 \"timer 2\""); - SENDIPC("ebind 3 \"timer 3\""); - SENDIPC("ebind 4 \"timer 4\""); - SENDIPC("ebind 5 \"timer 5\""); - SENDIPC("ebind mousel \"put\""); - SENDIPC("egrave \"coffin\""); - SENDIPC("efort \"Barrelhouse\""); - SENDIPC("ecolor 65535"); - SENDIPC("eadd hh0 0"); - SENDIPC("eadd hh1 0"); - SENDIPC("eadd hh2 0"); - SENDIPC("eadd hh3 0"); - SENDIPC("eaddteam"); - SENDIPC("ename team \"-= =-\""); - SENDIPC("ename hh0 \"\""); - SENDIPC("ename hh1 \"\""); - SENDIPC("ename hh2 \"\""); - SENDIPC("ename hh3 \"\""); - SENDIPC("ename hh4 \"\""); - SENDIPC("ename hh5 \"\""); - SENDIPC("ename hh6 \"\""); - SENDIPC("ename hh7 \"X\""); - SENDIPC("egrave Bone"); - SENDIPC("ecolor 16776960"); - SENDIPC("eadd hh0 1"); - SENDIPC("eadd hh1 1"); - SENDIPC("eadd hh2 1"); - SENDIPC("eadd hh3 1"); - SENDIPC("efort Barrelhouse"); - } - - void ParseMessage() - { - switch(msgsize) { - case 1: switch(msgbuf[0]) { - case '?': { - SENDIPC("!"); - break; - } - } - case 5: switch(msgbuf[0]) { - case 'C': { - SendConfig(); - break; - } - } - } - } - - void SendIPC(const char* msg, unsigned char len) - { - ipcsock->writeBlock((char *)&len, 1); - ipcsock->writeBlock(msg, len); - } - -private slots: - void newConnection( int socket ) - { - ipcsock = new QSocket( this ); - connect( ipcsock, SIGNAL(readyRead()), this, SLOT(readClient()) ); - connect( ipcsock, SIGNAL(delayedCloseFinished()), this, SLOT(discardClient()) ); - ipcsock->setSocket( socket ); - } - - void readClient() - { - Q_ULONG readbytes = 1; - while (readbytes > 0) { - if (msgsize == 0) { - msgbufsize = 0; - readbytes = ipcsock->readBlock((char *)&msgsize, 1); - } - else { - msgbufsize += readbytes = ipcsock->readBlock((char *)&msgbuf[msgbufsize], msgsize - msgbufsize); - if (msgbufsize = msgsize) { - ParseMessage(); - msgsize = 0; - } - } - } - } - - void discardClient() - { - delete ipcsock; - } -}; diff -r 09de46a3328c -r ccd2c45f043d QTfrontend/main.cpp --- a/QTfrontend/main.cpp Wed Oct 26 21:15:35 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* - * Hedgewars, a worms-like game - * Copyright (c) 2005 Andrey Korotaev - * - * Distributed under the terms of the BSD-modified licence: - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * with the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include -#include "hw.h" - -int main(int argc, char *argv[]) -{ - QApplication app(argc, argv); - HWForm *Form = new HWForm; - app.setMainWidget(Form); - app.connect( &app, SIGNAL( lastWindowClosed() ), &app, SLOT( quit() ) ); - Form->show(); - return app.exec(); -} diff -r 09de46a3328c -r ccd2c45f043d QTfrontend/sdlkeys.h --- a/QTfrontend/sdlkeys.h Wed Oct 26 21:15:35 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,163 +0,0 @@ -/* - * Hedgewars, a worms-like game - * Copyright (c) 2005 Andrey Korotaev - * - * Distributed under the terms of the BSD-modified licence: - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * with the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -char keys[][2][16] = -{ - {"mousel", "mousel"}, - {"mousem", "mousem"}, - {"mouser", "mouser"}, - {"backspace", "backspace"}, - {"tab", "tab"}, - {"clear", "clear"}, - {"return", "return"}, - {"pause", "pause"}, - {"escape", "escape"}, - {"space", "space"}, - {"!", "!"}, - {"\"", "\""}, - {"#", "#"}, - {"$", "$"}, - {"&", "&"}, - {"'", "'"}, - {"(", "("}, - {")", ")"}, - {"*", "*"}, - {"+", "+"}, - {",", ","}, - {"-", "-"}, - {".", "."}, - {"/", "/"}, - {"0", "0"}, - {"1", "1"}, - {"2", "2"}, - {"3", "3"}, - {"4", "4"}, - {"5", "5"}, - {"6", "6"}, - {"7", "7"}, - {"8", "8"}, - {"9", "9"}, - {":", ":"}, - {";", ";"}, - {"<", "<"}, - {"=", "="}, - {">", ">"}, - {"?", "?"}, - {"@", "@"}, - {"[", "["}, - {"\\", "\\"}, - {"]", "]"}, - {"^", "^"}, - {"_", "_"}, - {"`", "`"}, - {"a", "a"}, - {"b", "b"}, - {"c", "c"}, - {"d", "d"}, - {"e", "e"}, - {"f", "f"}, - {"g", "g"}, - {"h", "h"}, - {"i", "i"}, - {"j", "j"}, - {"k", "k"}, - {"l", "l"}, - {"m", "m"}, - {"n", "n"}, - {"o", "o"}, - {"p", "p"}, - {"q", "q"}, - {"r", "r"}, - {"s", "s"}, - {"t", "t"}, - {"u", "u"}, - {"v", "v"}, - {"w", "w"}, - {"x", "x"}, - {"y", "y"}, - {"z", "z"}, - {"delete", "delete"}, - {"[0]", "[0]"}, - {"[1]", "[1]"}, - {"[2]", "[2]"}, - {"[3]", "[3]"}, - {"[4]", "[4]"}, - {"[5]", "[5]"}, - {"[6]", "[6]"}, - {"[7]", "[7]"}, - {"[8]", "[8]"}, - {"[9]", "[9]"}, - {"[.]", "[.]"}, - {"[/]", "[/]"}, - {"[*]", "[*]"}, - {"[-]", "[-]"}, - {"[+]", "[+]"}, - {"enter", "enter"}, - {"equals", "equals"}, - {"up", "up"}, - {"down", "down"}, - {"right", "right"}, - {"left", "left"}, - {"insert", "insert"}, - {"home", "home"}, - {"end", "end"}, - {"page up", "page up"}, - {"page down", "page down"}, - {"f1", "f1"}, - {"f2", "f2"}, - {"f3", "f3"}, - {"f4", "f4"}, - {"f5", "f5"}, - {"f6", "f6"}, - {"f7", "f7"}, - {"f8", "f8"}, - {"f9", "f9"}, - {"f10", "f10"}, - {"f11", "f11"}, - {"f12", "f12"}, - {"f13", "f13"}, - {"f14", "f14"}, - {"f15", "f15"}, - {"numlock", "numlock"}, - {"caps_lock", "caps_lock"}, - {"scroll_lock", "scroll_lock"}, - {"right_shift", "right_shift"}, - {"left_shift", "left_shift"}, - {"right_ctrl", "right_ctrl"}, - {"left_ctrl", "left_ctrl"}, - {"right_alt", "right_alt"}, - {"left_alt", "left_alt"}, - {"right_meta", "right_meta"}, - {"left_meta", "left_meta"}, - {"", ""} -}; diff -r 09de46a3328c -r ccd2c45f043d QTfrontend/team.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/team.cpp Wed Nov 09 18:31:11 2005 +0000 @@ -0,0 +1,161 @@ +/* + * Hedgewars, a worms-like game + * Copyright (c) 2005 Andrey Korotaev + * + * Distributed under the terms of the BSD-modified licence: + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * with the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include "team.h" +#include "hwform.h" + +HWTeam::HWTeam(HWForm * hwform) +{ + TeamName = "unnamed"; + for (int i = 0; i < 8; i++) HHName[i].sprintf("hedgehog %d", i); + Grave = "Simple"; + Fort = "Barrelhouse"; + form = hwform; + for(int i = 0; i < BINDS_NUMBER; i++) + { + binds[i].action = cbinds[i].action; + binds[i].strbind = cbinds[i].strbind; + } + +} + +bool HWTeam::LoadFromFile(const QString & filename) +{ + QFile cfgfile(filename); + if (!cfgfile.open(QIODevice::ReadOnly)) return false; + QTextStream stream(&cfgfile); + stream.setCodec("UTF-8"); + QString str; + QString action; + + while (!stream.atEnd()) + { + str = stream.readLine(); + if (str.startsWith(";")) continue; + if (str.startsWith("name team ")) + { + str.remove(0, 10); + TeamName = str; + } else + if (str.startsWith("name hh")) + { + str.remove(0, 7); + long i = str.left(1).toLong(); + if ((i < 0) || (i > 7)) continue; + str.remove(0, 2); + HHName[i] = str; + } else + if (str.startsWith("grave ")) + { + str.remove(0, 6); + Grave = str; + } else + if (str.startsWith("fort ")) + { + str.remove(0, 5); + Fort = str; + } else + if (str.startsWith("bind ")) + { + str.remove(0, 5); + action = str.section(' ', 1); + str = str.section(' ', 0, 0); + str.truncate(15); + for (int i = 0; i < BINDS_NUMBER; i++) + if (action == binds[i].action) + { + binds[i].strbind = str; + break; + } + } + } + cfgfile.close(); + return true; +} + +bool HWTeam::SaveToFile(const QString & filename) +{ + QFile cfgfile(filename); + if (!cfgfile.open(QIODevice::WriteOnly)) return false; + QTextStream stream(&cfgfile); + stream.setCodec("UTF-8"); + stream << "; Generated by Hedgewars, do not modify" << endl; + stream << "name team " << TeamName << endl; + for (int i = 0; i < BINDS_NUMBER; i++) + stream << "name hh" << i << " " << HHName[i] << endl; + stream << "grave " << Grave << endl; + stream << "fort " << Fort << endl; + for(int i = 0; i < BINDS_NUMBER; i++) + { + stream << "bind " << binds[i].strbind << " " << binds[i].action << endl; + } + cfgfile.close(); + return true; +} + +void HWTeam::ToPage() +{ + form->TeamNameEdit->setText(TeamName); + for(int i = 0; i < 8; i++) + { + form->HHNameEdit[i]->setText(HHName[i]); + } + form->ui.CBGrave->setCurrentIndex(form->ui.CBGrave->findText(Grave)); + form->CBGrave_activated(Grave); + + form->ui.CBFort->setCurrentIndex(form->ui.CBFort->findText(Fort)); + form->CBFort_activated(Fort); + + for(int i = 0; i < BINDS_NUMBER; i++) + { + form->CBBind[i]->setCurrentIndex(form->CBBind[i]->findText(binds[i].strbind)); + } +} + +void HWTeam::FromPage() +{ + TeamName = form->TeamNameEdit->text(); + for(int i = 0; i < 8; i++) + { + HHName[i] = form->HHNameEdit[i]->text(); + } + + Grave = form->ui.CBGrave->currentText(); + Fort = form->ui.CBFort->currentText(); + for(int i = 0; i < 8; i++) + { + binds[i].strbind = form->CBBind[i]->currentText(); + } +} diff -r 09de46a3328c -r ccd2c45f043d QTfrontend/team.h --- a/QTfrontend/team.h Wed Oct 26 21:15:35 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,211 +0,0 @@ -/* - * Hedgewars, a worms-like game - * Copyright (c) 2005 Andrey Korotaev - * - * Distributed under the terms of the BSD-modified licence: - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * with the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include -#include -#include -#include -#include "hw.h" - -class QString; -class QTextStream; -class QFile; -class QComboBox; - -struct BindAction -{ - QComboBox * cbind; - char action[15]; - char strbind[15]; -}; - -const BindAction cbinds[8] = -{ - {0, "+up", "up"}, - {0, "+left", "left"}, - {0, "+right", "right"}, - {0, "+down", "down"}, - {0, "ljump", "return"}, - {0, "hjump", "backspace"}, - {0, "+attack", "space"}, - {0, "switch", "tab"} -}; - - -class HWTeam -{ - public: - HWTeam(HWForm * hwform) - { - TeamName = "unnamed"; - for (int i = 0; i < 8; i++) HHName[i].sprintf("hedgehog %d", i); - Grave = "Simple"; - form = hwform; - memcpy(binds, cbinds, sizeof(cbinds)); - binds[0].cbind = form->CBindUp; - binds[1].cbind = form->CBindLeft; - binds[2].cbind = form->CBindRight; - binds[3].cbind = form->CBindDown; - binds[4].cbind = form->CBindLJump; - binds[5].cbind = form->CBindHJump; - binds[6].cbind = form->CBindAttack; - binds[7].cbind = form->CBindSwitch; - } - - HWForm * form; - BindAction binds[8]; - QString TeamName; - QString HHName[8]; - QString Grave; - QString Fort; - - bool LoadFromFile(const QString & filename) - { - QFile cfgfile(filename); - if (!cfgfile.open(IO_ReadOnly)) return false; - QTextStream stream(&cfgfile); - stream.setEncoding(QTextStream::Unicode); - QString str; - QString action; - - while (!stream.atEnd()) - { - str = stream.readLine(); - if (str.startsWith(";")) continue; - if (str.startsWith("name team ")) - { - str.remove(0, 10); - TeamName = str; - } else - if (str.startsWith("name hh")) - { - str.remove(0, 7); - long i = str.left(1).toLong(); - if ((i < 0) || (i > 7)) continue; - str.remove(0, 2); - HHName[i] = str; - } else - if (str.startsWith("grave ")) - { - str.remove(0, 6); - Grave = str; - } else - if (str.startsWith("fort ")) - { - str.remove(0, 5); - Fort = str; - } else - if (str.startsWith("bind ")) - { - str.remove(0, 5); - action = str.section(' ', 1); - str = str.section(' ', 0, 0); - str.truncate(15); - for (int i = 0; i < 8; i++) - if (action == binds[i].action) - { - strcpy((char *)&binds[i].strbind, str.latin1()); - break; - } - } - } - cfgfile.close(); - return true; - } - - bool SaveToFile(const QString & filename) - { - QFile cfgfile(filename); - if (!cfgfile.open(IO_WriteOnly)) return false; - QTextStream stream(&cfgfile); - stream.setEncoding(QTextStream::Unicode); - stream << "; Generated by Hedgewars, do not modify" << endl; - stream << "name team " << TeamName << endl; - for (int i = 0; i < 8; i++) - stream << "name hh" << i << " " << HHName[i] << endl; - stream << "grave " << Grave << endl; - stream << "fort " << Fort << endl; - for(int i = 0; i < 8; i++) - { - stream << "bind " << binds[i].strbind << " " << binds[i].action << endl; - } - cfgfile.close(); - return true; - } - - void ToPage() - { - form->EditTeamName->setText(TeamName); - form->HHName0->setText(HHName[0]); - form->HHName1->setText(HHName[1]); - form->HHName2->setText(HHName[2]); - form->HHName3->setText(HHName[3]); - form->HHName4->setText(HHName[4]); - form->HHName5->setText(HHName[5]); - form->HHName6->setText(HHName[6]); - form->HHName7->setText(HHName[7]); - - const QListBox * lb = form->CBGraves->listBox(); - form->CBGraves->setCurrentItem(lb->index(lb->findItem(Grave))); - - lb = form->CBForts->listBox(); - form->CBForts->setCurrentItem(lb->index(lb->findItem(Fort))); - - lb = form->CBindUp->listBox(); - for(int i = 0; i < 8; i++) - { - binds[i].cbind->setCurrentItem(lb->index(lb->findItem(binds[i].strbind))); - } - } - - void FromPage() - { - TeamName = form->EditTeamName->text(); - HHName[0] = form->HHName0->text(); - HHName[1] = form->HHName1->text(); - HHName[2] = form->HHName2->text(); - HHName[3] = form->HHName3->text(); - HHName[4] = form->HHName4->text(); - HHName[5] = form->HHName5->text(); - HHName[6] = form->HHName6->text(); - HHName[7] = form->HHName7->text(); - - Grave = form->CBGraves->currentText(); - Fort = form->CBForts->currentText(); - for(int i = 0; i < 8; i++) - { - strcpy((char *)&binds[i].strbind, binds[i].cbind->currentText().latin1()); - } - } - private: -};