# HG changeset patch # User Xeli # Date 1316967841 -7200 # Node ID a28be05b20bc35504c2f27190faa46ce2d21785a # Parent 5b2b86a37089b5c7d646a92a4b27ac87a1ce258b# Parent 8ed6e810051a4987bdc2094b57e39c6543aaae0e merge diff -r 5b2b86a37089 -r a28be05b20bc .hgtags --- a/.hgtags Sun Sep 25 18:22:12 2011 +0200 +++ b/.hgtags Sun Sep 25 18:24:01 2011 +0200 @@ -44,3 +44,4 @@ 0000000000000000000000000000000000000000 0.9.9.1 718f98a9df122d73f3ba9add4d1654865199de31 Hedgewars-iOS-1.3 cba92708277b6d0aeabfff2b878845b7d848bdcd Hedgewars-iOS-1.3.1 +74bc72746bec68806344f4ba7be0d1bc6e05d380 0.9.16-release diff -r 5b2b86a37089 -r a28be05b20bc CMakeLists.txt --- a/CMakeLists.txt Sun Sep 25 18:22:12 2011 +0200 +++ b/CMakeLists.txt Sun Sep 25 18:24:01 2011 +0200 @@ -41,8 +41,8 @@ #versioning set(CPACK_PACKAGE_VERSION_MAJOR 0) set(CPACK_PACKAGE_VERSION_MINOR 9) -set(CPACK_PACKAGE_VERSION_PATCH 16${version_suffix}) -set(HEDGEWARS_PROTO_VER 38) +set(CPACK_PACKAGE_VERSION_PATCH 17${version_suffix}) +set(HEDGEWARS_PROTO_VER 40) set(HEDGEWARS_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") @@ -265,10 +265,10 @@ "config\\\\.inc$" "hwengine\\\\.desktop$" "CMakeCache\\\\.txt$" - "^${CMAKE_CURRENT_SOURCE_DIR}/misc/libopenalbridge" - "^${CMAKE_CURRENT_SOURCE_DIR}/misc/libfreetype" - "^${CMAKE_CURRENT_SOURCE_DIR}/misc/liblua" - "^${CMAKE_CURRENT_SOURCE_DIR}/misc/libtremor" +# "^${CMAKE_CURRENT_SOURCE_DIR}/misc/libopenalbridge" +# "^${CMAKE_CURRENT_SOURCE_DIR}/misc/libfreetype" +# "^${CMAKE_CURRENT_SOURCE_DIR}/misc/liblua" +# "^${CMAKE_CURRENT_SOURCE_DIR}/misc/libtremor" "^${CMAKE_CURRENT_SOURCE_DIR}/project_files/HedgewarsMobile/" "^${CMAKE_CURRENT_SOURCE_DIR}/bin/[a-z]" "^${CMAKE_CURRENT_SOURCE_DIR}/tools/templates" diff -r 5b2b86a37089 -r a28be05b20bc CREDITS --- a/CREDITS Sun Sep 25 18:22:12 2011 +0200 +++ b/CREDITS Sun Sep 25 18:24:01 2011 +0200 @@ -48,4 +48,16 @@ ========== - Stephen Alexander +========== += SOUNDS +========== +- Mine impact sound from http://www.freesound.org/people/adcbicycle/sounds/13947/ +- Hammer sound from http://www.freesound.org/people/Syna-Max/sounds/43586/ +- Sinegun firing sound remixed from + http://beta.freesound.org/people/aust_paul/sounds/30935/ + http://www.freesound.org/people/Edgar/sounds/162/ + http://www.freesound.org/people/Ionizing/sounds/22033/ + http://www.freesound.org/people/Jovica/sounds/38317/ + + ALL OTHER CONTENT IS PROPERTY OF Andrey Korotaev UNLESS OTHERWISE SPECIFIED \ No newline at end of file diff -r 5b2b86a37089 -r a28be05b20bc ChangeLog.txt --- a/ChangeLog.txt Sun Sep 25 18:22:12 2011 +0200 +++ b/ChangeLog.txt Sun Sep 25 18:24:01 2011 +0200 @@ -1,12 +1,16 @@ + features * bugfixes -0.9.15 -> ???: +0.9.15 -> 0.9.16: + + In-game chat now supports backspace-repeat and Escape to close the text input area + + Team status bars shrunk/made translucent if they take up a significant portion of the screen + + Background music change on sudden death mode + Stereoscopic rendering + Installing content (anything under Data/ - maps, sounds, and any such stuff) to user profile allows custom adding/overriding of any Data/ content + Screen for downloadable content + Allow up to 8 teams in a game - + New gameplay modes/styles: Racer, The Specialists, Tumbler, Space Invasion + + New gameplay modes/styles: Racer, The Specialists, Tumbler, Space Invasion, Balanced Random Weapon + + New single player missions: Bamboo Thicket, That Sinking Feeling, Newton and the Tree + New Weapon/Utility: Land Spray Gun + New Utility: Time Box + New Game mode: Tag team @@ -23,6 +27,8 @@ + Drill Strike bombs don't explode when leaving ground, but after a (customizable!) timer + Hammer impacts mines/barrels + Seduction is an Area-of-Effect attack now + + Significantly altered flame behavior and damage. + + 'Throwing' weapons into hogs (e.g. grenade) no longer does max damage. + Ukranian localization of Default voice. support for localized voices + Theme cleanup, including the new theme config file change + Improvements in scoring and tracking damage @@ -49,7 +55,8 @@ * Various bug/leak fixes Frontend/Menu and Netgame: - + Drawing straight lines in drawn map mode + + Drawing straight lines in drawn map mode (hold down the control key when clicking, then move mouse to end point and release). + + Undo clear in drawn map mode + Autokick ignored players joining your room + Improved nick sorting in lobby and rooms. (not case-sensitive, letters first, friend @ top, ignored @ bottom) + Display player count in lobby diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/AbstractPage.h --- a/QTfrontend/AbstractPage.h Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/AbstractPage.h Sun Sep 25 18:24:01 2011 +0200 @@ -50,7 +50,8 @@ { Q_OBJECT - public: + signals: + void goBack(); protected: AbstractPage(QWidget* parent = 0) { diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/CMakeLists.txt diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/about.cpp --- a/QTfrontend/about.cpp Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/about.cpp Sun Sep 25 18:24:01 2011 +0200 @@ -73,9 +73,9 @@ "Frontend improvements: Martin Minarik <ttsmj@pokec.sk>
" "Frontend improvements: Kristian Lehmann <email@thexception.net>
" "Mac OS X/iPhone port, OpenGL-ES conversion: Vittorio Giovara <vittorio.giovara@gmail.com>
" + "Many engine and frontend improvements (and bugs): Richard Karolyi <sheepluva@" "ercatec.net>
" "Gamepad and Lua integration: Mario Liebisch <mario.liebisch@gmail.com>
" "Many engine improvements and graphics: Carlos Vives <mail@carlosvives.es>
" - "Few engine and frontend improvements: Richard Karolyi <sheepluva@ercatec.net>
" "Maze maps: Henning Kühn <prg@cooco.de>
" "Engine and frontend improvements: Henrik Rostedt <henrik.rostedt@gmail.com>
" "Lua game modes and missions: John Lambert <redgrinner@gmail.com>
" @@ -120,9 +120,9 @@ "English: Andrey Korotaev <unC0Rr@gmail.com>
" "Finnish: Nina Kuisma <ninnnu@gmail.com>
" "French: Antoine Turmel <geekshadow@gmail.com>
" - "German: Peter Hüwe <PeterHuewe@gmx.de>, Mario Liebisch <mario.liebisch@gmail.com>
" - "Greek: <talos_kriti@yahoo.gr>" - "Italian: Luca Bonora <bonora.luca@gmail.com>
" + "German: Peter Hüwe <PeterHuewe@gmx.de>, Mario Liebisch <mario.liebisch@gmail.com>, Richard Karolyi <sheepluva@" "ercatec.net>
" + "Greek: <talos_kriti@yahoo.gr>
" + "Italian: Luca Bonora <bonora.luca@gmail.com>, Marco Bresciani
" "Japanese: ADAM Etienne <etienne.adam@gmail.com>
" "Korean: Anthony Bellew <webmaster@anthonybellew.com>
" "Lithuanian: Lukas Urbonas <lukasu08@gmail.com>
" diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/chatwidget.cpp --- a/QTfrontend/chatwidget.cpp Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/chatwidget.cpp Sun Sep 25 18:24:01 2011 +0200 @@ -30,6 +30,7 @@ #include #include #include +#include #include "hwconsts.h" #include "SDLs.h" @@ -110,6 +111,9 @@ .UserAction .nick { color: #ffa0ff; }\ .FriendAction { color: #ff00ff; }\ .FriendAction .nick { color: #ff30ff; }\ +.Error { color: #ff0000 }\ +.Warning { color: #ff8000 }\ +.Notice { color: #fefefe }\ "; HWChatWidget::HWChatWidget(QWidget* parent, QSettings * gameSettings, SDLInteraction * sdli, bool notify) : @@ -203,7 +207,7 @@ QList items = chatNicks->findItems(nick, Qt::MatchExactly); if (items.size() < 1) return; - QMenu * popup = new QMenu(); + QMenu * popup = new QMenu(this); // selecting an item will automatically scroll there, so let's save old position QScrollBar * scrollBar = chatNicks->verticalScrollBar(); int oldScrollPos = scrollBar->sliderPosition(); @@ -313,8 +317,10 @@ void HWChatWidget::returnPressed() { - emit chatLine(chatEditLine->text()); + QStringList lines = chatEditLine->text().split('\n'); chatEditLine->clear(); + foreach (const QString &line, lines) + emit chatLine(line); } @@ -337,9 +343,6 @@ isFriend = friendsList.contains(nick, Qt::CaseInsensitive); } - if (chatStrings.size() > 250) - chatStrings.removeFirst(); - QString formattedStr = Qt::escape(str.mid(1)); // make hedgewars.org urls actual links formattedStr = formattedStr.replace(URLREGEXP, "\\3"); @@ -364,9 +367,17 @@ cssClass = "FriendChat"; } - formattedStr = QString("%1").arg(formattedStr).arg(cssClass); + addLine(cssClass,formattedStr); +} - chatStrings.append(formattedStr); +void HWChatWidget::addLine(const QString& cssClass, QString line) +{ + if (chatStrings.size() > 250) + chatStrings.removeFirst(); + + line = QString("%1").arg(line).arg(cssClass); + + chatStrings.append(line); chatText->setHtml(chatStrings.join("
")); diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/chatwidget.h --- a/QTfrontend/chatwidget.h Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/chatwidget.h Sun Sep 25 18:24:01 2011 +0200 @@ -61,6 +61,7 @@ void saveLists(const QString & nick); void setShowReady(bool s); void setShowFollow(bool enabled); + void addLine(const QString & cssClass, QString line); static const char* STYLE; QStringList ignoreList, friendsList; diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/frameTeam.cpp --- a/QTfrontend/frameTeam.cpp Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/frameTeam.cpp Sun Sep 25 18:24:01 2011 +0200 @@ -99,14 +99,14 @@ { TeamShowWidget* pTeamShowWidget = dynamic_cast(getTeamWidget(team)); if(!pTeamShowWidget) return; - pTeamShowWidget->setHHNum(team.numHedgehogs); + pTeamShowWidget->setHHNum(team.numHedgehogs()); } void FrameTeams::setTeamColor(const HWTeam& team) { TeamShowWidget* pTeamShowWidget = dynamic_cast(getTeamWidget(team)); if(!pTeamShowWidget) return; - pTeamShowWidget->changeTeamColor(team.teamColor); + pTeamShowWidget->changeTeamColor(team.color()); } QWidget* FrameTeams::getTeamWidget(HWTeam team) diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/game.cpp --- a/QTfrontend/game.cpp Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/game.cpp Sun Sep 25 18:24:01 2011 +0200 @@ -99,7 +99,7 @@ HWProto::addStringToBuffer(buf, QString("eammreinf %1").arg(ammostr.mid(3 * cAmmoNumber, cAmmoNumber))); if(!gamecfg->schemeData(21).toBool()) HWProto::addStringToBuffer(buf, QString("eammstore")); HWProto::addStringListToBuffer(buf, - team.TeamGameConfig(gamecfg->getInitHealth())); + team.teamGameConfig(gamecfg->getInitHealth())); ; } } @@ -122,25 +122,23 @@ HWNamegen namegen; - HWTeam * team1; - team1 = new HWTeam; - team1->difficulty = 0; - team1->teamColor = QColor(colors[0]); - team1->numHedgehogs = 4; - namegen.TeamRandomNames(team1,TRUE); + HWTeam team1; + team1.setDifficulty(0); + team1.setColor(QColor(colors[0])); + team1.setNumHedgehogs(4); + namegen.teamRandomNames(team1,TRUE); HWProto::addStringListToBuffer(teamscfg, - team1->TeamGameConfig(100)); + team1.teamGameConfig(100)); - HWTeam * team2; - team2 = new HWTeam; - team2->difficulty = 4; - team2->teamColor = QColor(colors[1]); - team2->numHedgehogs = 4; - do - namegen.TeamRandomNames(team2,TRUE); - while(!team2->TeamName.compare(team1->TeamName) || !team2->Hedgehogs[0].Hat.compare(team1->Hedgehogs[0].Hat)); + HWTeam team2; + team2.setDifficulty(4); + team2.setColor(QColor(colors[1])); + team2.setNumHedgehogs(4); + do + namegen.teamRandomNames(team2,TRUE); + while(!team2.name().compare(team1.name()) || !team2.hedgehog(0).Hat.compare(team1.hedgehog(0).Hat)); HWProto::addStringListToBuffer(teamscfg, - team2->TeamGameConfig(100)); + team2.teamGameConfig(100)); HWProto::addStringToBuffer(teamscfg, QString("eammloadt %1").arg(cDefaultAmmoStore->mid(0, cAmmoNumber))); HWProto::addStringToBuffer(teamscfg, QString("eammprob %1").arg(cDefaultAmmoStore->mid(cAmmoNumber, cAmmoNumber))); @@ -400,7 +398,7 @@ { QByteArray buf; foreach(HWTeam team, m_pTeamSelWidget->getPlayingTeams()) - HWProto::addStringToBuffer(buf, QString("eteamgone %1").arg(team.TeamName)); + HWProto::addStringToBuffer(buf, QString("eteamgone %1").arg(team.name())); RawSendIPC(buf); } } diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/hwconsts.h --- a/QTfrontend/hwconsts.h Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/hwconsts.h Sun Sep 25 18:24:01 2011 +0200 @@ -58,6 +58,8 @@ extern bool isDevBuild; #endif +#define HEDGEHOGS_PER_TEAM 8 + #define AMMOLINE_DEFAULT_QT "939192942219912103223511100120100000021111010101111101" #define AMMOLINE_DEFAULT_PROB "040504054160065554655446477657666666615551010111541101" #define AMMOLINE_DEFAULT_DELAY "000000000000020550000004000700400000000022000000060000" diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/hwform.cpp --- a/QTfrontend/hwform.cpp Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/hwform.cpp Sun Sep 25 18:24:01 2011 +0200 @@ -16,6 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ +#include #include #include #include @@ -139,6 +140,12 @@ UpdateCampaignPage(0); UpdateWeapons(); + // connect all goBack signals + int nPages = ui.Pages->count(); + + for (int i = 0; i < nPages; i++) + connect(ui.Pages->widget(i), SIGNAL(goBack()), this, SLOT(GoBack())); + pageSwitchMapper = new QSignalMapper(this); connect(pageSwitchMapper, SIGNAL(mapped(int)), this, SLOT(GoToPage(int))); @@ -163,16 +170,12 @@ connect(ui.pageMain->BtnExit, SIGNAL(pressed()), this, SLOT(btnExitPressed())); connect(ui.pageMain->BtnExit, SIGNAL(clicked()), this, SLOT(btnExitClicked())); - connect(ui.pageInfo->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack())); - connect(ui.pageDataDownload->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack())); - connect(ui.pageEditTeam->BtnTeamSave, SIGNAL(clicked()), this, SLOT(TeamSave())); connect(ui.pageEditTeam->BtnTeamDiscard, SIGNAL(clicked()), this, SLOT(TeamDiscard())); connect(ui.pageEditTeam->signalMapper2, SIGNAL(mapped(const int &)), this, SLOT(RandomName(const int &))); connect(ui.pageEditTeam->randTeamButton, SIGNAL(clicked()), this, SLOT(RandomNames())); - connect(ui.pageMultiplayer->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack())); connect(ui.pageMultiplayer->BtnStartMPGame, SIGNAL(clicked()), this, SLOT(StartMPGame())); connect(ui.pageMultiplayer->teamsSelect, SIGNAL(setEnabledGameStart(bool)), ui.pageMultiplayer->BtnStartMPGame, SLOT(setEnabled(bool))); @@ -181,13 +184,11 @@ connect(ui.pageMultiplayer->gameCFG, SIGNAL(goToWeapons(int)), this, SLOT(GoToSelectWeaponSet(int))); connect(ui.pageMultiplayer->gameCFG, SIGNAL(goToDrawMap()), pageSwitchMapper, SLOT(map())); pageSwitchMapper->setMapping(ui.pageMultiplayer->gameCFG, ID_PAGE_DRAWMAP); - - connect(ui.pagePlayDemo->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack())); + connect(ui.pagePlayDemo->BtnPlayDemo, SIGNAL(clicked()), this, SLOT(PlayDemo())); connect(ui.pagePlayDemo->DemosList, SIGNAL(doubleClicked (const QModelIndex &)), this, SLOT(PlayDemo())); - connect(ui.pageOptions->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack())); connect(ui.pageOptions->BtnNewTeam, SIGNAL(clicked()), this, SLOT(NewTeam())); connect(ui.pageOptions->BtnEditTeam, SIGNAL(clicked()), this, SLOT(EditTeam())); connect(ui.pageOptions->BtnDeleteTeam, SIGNAL(clicked()), this, SLOT(DeleteTeam())); @@ -203,17 +204,14 @@ connect(ui.pageOptions->SchemeDelete, SIGNAL(clicked()), this, SLOT(DeleteScheme())); connect(ui.pageSelectWeapon->pWeapons, SIGNAL(weaponsChanged()), this, SLOT(UpdateWeapons())); - connect(ui.pageNet->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack())); connect(ui.pageNet->BtnSpecifyServer, SIGNAL(clicked()), this, SLOT(NetConnect())); connect(ui.pageNet->BtnNetSvrStart, SIGNAL(clicked()), pageSwitchMapper, SLOT(map())); pageSwitchMapper->setMapping(ui.pageNet->BtnNetSvrStart, ID_PAGE_NETSERVER); connect(ui.pageNet, SIGNAL(connectClicked(const QString &, quint16)), this, SLOT(NetConnectServer(const QString &, quint16))); - connect(ui.pageNetServer->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack())); connect(ui.pageNetServer->BtnStart, SIGNAL(clicked()), this, SLOT(NetStartServer())); - connect(ui.pageNetGame->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack())); connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(setEnabledGameStart(bool)), ui.pageNetGame->BtnStart, SLOT(setEnabled(bool))); connect(ui.pageNetGame, SIGNAL(SetupClicked()), this, SLOT(IntermediateSetup())); @@ -222,14 +220,11 @@ connect(ui.pageNetGame->pGameCFG, SIGNAL(goToDrawMap()), pageSwitchMapper, SLOT(map())); pageSwitchMapper->setMapping(ui.pageNetGame->pGameCFG, ID_PAGE_DRAWMAP); - connect(ui.pageRoomsList->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack())); connect(ui.pageRoomsList->BtnAdmin, SIGNAL(clicked()), pageSwitchMapper, SLOT(map())); pageSwitchMapper->setMapping(ui.pageRoomsList->BtnAdmin, ID_PAGE_ADMIN); connect(ui.pageInfo->BtnSnapshots, SIGNAL(clicked()), this, SLOT(OpenSnapshotFolder())); - connect(ui.pageInfo->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack())); - connect(ui.pageGameStats->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack())); connect(ui.pageGameStats, SIGNAL(saveDemoRequested()), this, SLOT(saveDemoWithCustomName())); connect(ui.pageSinglePlayer->BtnSimpleGamePage, SIGNAL(clicked()), this, SLOT(SimpleGame())); @@ -244,16 +239,12 @@ connect(ui.pageSinglePlayer->BtnLoad, SIGNAL(clicked()), this, SLOT(GoToSaves())); connect(ui.pageSinglePlayer->BtnDemos, SIGNAL(clicked()), this, SLOT(GoToDemos())); - connect(ui.pageSinglePlayer->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack())); connect(ui.pageTraining->BtnStartTrain, SIGNAL(clicked()), this, SLOT(StartTraining())); - connect(ui.pageTraining->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack())); connect(ui.pageCampaign->BtnStartCampaign, SIGNAL(clicked()), this, SLOT(StartCampaign())); - connect(ui.pageCampaign->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack())); connect(ui.pageCampaign->CBTeam, SIGNAL(currentIndexChanged(int)), this, SLOT(UpdateCampaignPage(int))); - connect(ui.pageSelectWeapon->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack())); connect(ui.pageSelectWeapon->BtnDelete, SIGNAL(clicked()), ui.pageSelectWeapon->pWeapons, SLOT(deleteWeaponsName())); // executed first @@ -262,16 +253,10 @@ //connect(ui.pageSelectWeapon->pWeapons, SIGNAL(weaponsDeleted()), // this, SLOT(GoBack())); // executed third - connect(ui.pageScheme->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack())); - connect(ui.pageAdmin->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack())); - - connect(ui.pageNetType->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack())); connect(ui.pageNetType->BtnLAN, SIGNAL(clicked()), this, SLOT(GoToNet())); connect(ui.pageNetType->BtnOfficialServer, SIGNAL(clicked()), this, SLOT(NetConnectOfficialServer())); - connect(ui.pageDrawMap->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack())); - connect(ui.pageConnecting, SIGNAL(cancelConnection()), this, SLOT(GoBack())); @@ -399,7 +384,7 @@ if(teamslist.empty()) { HWTeam defaultTeam(tr("DefaultTeam")); - defaultTeam.SaveToFile(); + defaultTeam.saveToFile(); teamslist.push_back(tr("DefaultTeam")); } @@ -506,7 +491,7 @@ QList teamsList; for (QStringList::iterator it = tmNames.begin(); it != tmNames.end(); it++) { HWTeam team(*it); - team.LoadFromFile(); + team.loadFromFile(); teamsList.push_back(team); } @@ -629,7 +614,7 @@ QStringList tmnames; foreach(HWTeam team, curTeamSelWidget->getNotPlayingTeams()) - tmnames += team.TeamName; + tmnames += team.name(); //UpdateTeamsLists(&tmnames); // FIXME: still need more work if teamname is updated while configuring UpdateTeamsLists(); @@ -647,7 +632,7 @@ void HWForm::EditTeam() { editedTeam = new HWTeam(ui.pageOptions->CBTeamName->currentText()); - editedTeam->LoadFromFile(); + editedTeam->loadFromFile(); editedTeam->SetToPage(this); GoToPage(ID_PAGE_SETUP_TEAM); } @@ -658,7 +643,7 @@ if (reallyDelete.exec() == QMessageBox::Ok) { editedTeam = new HWTeam(ui.pageOptions->CBTeamName->currentText()); - editedTeam->DeleteFile(); + editedTeam->deleteFile(); // Remove from lists ui.pageOptions->CBTeamName->removeItem(ui.pageOptions->CBTeamName->currentIndex()); @@ -668,21 +653,21 @@ void HWForm::RandomNames() { editedTeam->GetFromPage(this); - namegen->TeamRandomNames(editedTeam, true); + namegen->teamRandomNames(*editedTeam, true); editedTeam->SetToPage(this); } void HWForm::RandomName(const int &i) { editedTeam->GetFromPage(this); - namegen->TeamRandomName(editedTeam,i); + namegen->teamRandomName(*editedTeam,i); editedTeam->SetToPage(this); } void HWForm::TeamSave() { editedTeam->GetFromPage(this); - editedTeam->SaveToFile(); + editedTeam->saveToFile(); delete editedTeam; editedTeam=0; UpdateTeamsLists(); @@ -753,7 +738,82 @@ NetConnectServer("netserver.hedgewars.org", 46631); } -void HWForm::_NetConnect(const QString & hostName, quint16 port, const QString & nick) +void HWForm::NetPassword(const QString & nick) +{ + bool ok = false; + int passLength = config->value("net/passwordlength", 0).toInt(); + QString hash = config->value("net/passwordhash", "").toString(); + + // If the password is blank, ask the user to enter one in + if (passLength == 0) + { + QString password = QInputDialog::getText(this, tr("Password"), tr("Your nickname %1 is\nregistered on Hedgewars.org\nPlease provide your password below\nor pick another nickname in game config:").arg(nick), QLineEdit::Password, passLength==0?NULL:QString(passLength,'\0'), &ok); + + if (!ok) { + ForcedDisconnect(tr("No password supplied.")); + return; + } + + hash = QCryptographicHash::hash(password.toLatin1(), QCryptographicHash::Md5).toHex(); + config->setValue("net/passwordhash", hash); + config->setValue("net/passwordlength", password.size()); + config->setNetPasswordLength(password.size()); + } + + hwnet->SendPasswordHash(hash); +} + +void HWForm::NetNickTaken(const QString & nick) +{ + bool ok = false; + QString newNick = QInputDialog::getText(this, tr("Nickname"), tr("Some one already uses\n your nickname %1\non the server.\nPlease pick another nickname:").arg(nick), QLineEdit::Normal, nick, &ok); + + if (!ok || newNick.isEmpty()) { + ForcedDisconnect(tr("No nickname supplied.")); + return; + } + + hwnet->NewNick(newNick); + config->setValue("net/nick", newNick); + config->updNetNick(); +} + +void HWForm::NetAuthFailed() +{ + // Set the password blank if case the user tries to join and enter his password again + config->setValue("net/passwordlength", 0); + config->setNetPasswordLength(0); +} + +void HWForm::NetTeamAccepted(const QString & team) +{ + ui.pageNetGame->pNetTeamsWidget->changeTeamStatus(team); +} + +void HWForm::NetError(const QString & errmsg) +{ + switch (ui.Pages->currentIndex()) + { + case ID_PAGE_INGAME: + ShowErrorMessage(errmsg); + // no break + case ID_PAGE_NETGAME: + ui.pageNetGame->pChatWidget->addLine("Error",errmsg); + break; + default: + ui.pageRoomsList->chatWidget->addLine("Error",errmsg); + } +} + +void HWForm::NetWarning(const QString & wrnmsg) +{ + if (ui.Pages->currentIndex() == ID_PAGE_NETGAME || ui.Pages->currentIndex() == ID_PAGE_INGAME) + ui.pageNetGame->pChatWidget->addLine("Warning",wrnmsg); + else + ui.pageRoomsList->chatWidget->addLine("Warning",wrnmsg); +} + +void HWForm::_NetConnect(const QString & hostName, quint16 port, QString nick) { if(hwnet) { hwnet->Disconnect(); @@ -763,17 +823,22 @@ ui.pageRoomsList->chatWidget->clear(); - hwnet = new HWNewNet(config, ui.pageNetGame->pGameCFG, ui.pageNetGame->pNetTeamsWidget); + hwnet = new HWNewNet(); GoToPage(ID_PAGE_CONNECTING); - connect(hwnet, SIGNAL(showMessage(const QString &)), this, SLOT(ShowErrorMessage(const QString &)), Qt::QueuedConnection); - connect(hwnet, SIGNAL(AskForRunGame()), this, SLOT(CreateNetGame())); connect(hwnet, SIGNAL(Connected()), this, SLOT(NetConnected())); + connect(hwnet, SIGNAL(Error(const QString&)), this, SLOT(NetError(const QString&))); + connect(hwnet, SIGNAL(Warning(const QString&)), this, SLOT(NetWarning(const QString&))); connect(hwnet, SIGNAL(EnteredGame()), this, SLOT(NetGameEnter())); - connect(hwnet, SIGNAL(LeftRoom()), this, SLOT(NetLeftRoom())); + connect(hwnet, SIGNAL(LeftRoom(const QString&)), this, SLOT(NetLeftRoom(const QString&))); connect(hwnet, SIGNAL(AddNetTeam(const HWTeam&)), this, SLOT(AddNetTeam(const HWTeam&))); + connect(hwnet, SIGNAL(RemoveNetTeam(const HWTeam&)), this, SLOT(RemoveNetTeam(const HWTeam&))); + connect(hwnet, SIGNAL(TeamAccepted(const QString&)), this, SLOT(NetTeamAccepted(const QString&))); + connect(hwnet, SIGNAL(AskForPassword(const QString&)), this, SLOT(NetPassword(const QString&))); + connect(hwnet, SIGNAL(NickTaken(const QString&)), this, SLOT(NetNickTaken(const QString&))); + connect(hwnet, SIGNAL(AuthFailed()), this, SLOT(NetAuthFailed())); //connect(ui.pageNetGame->BtnBack, SIGNAL(clicked()), hwnet, SLOT(partRoom())); // rooms list page stuff @@ -876,11 +941,25 @@ connect(ui.pageAdmin, SIGNAL(setServerMessageOld(const QString&)), hwnet, SLOT(setServerMessageOld(const QString &))); connect(ui.pageAdmin, SIGNAL(setProtocol(int)), hwnet, SLOT(setLatestProtocolVar(int))); connect(ui.pageAdmin, SIGNAL(askServerVars()), hwnet, SLOT(askServerVars())); - connect(ui.pageAdmin->pbClearAccountsCache, SIGNAL(clicked()), hwnet, SLOT(clearAccountsCache())); + connect(ui.pageAdmin, SIGNAL(clearAccountsCache()), hwnet, SLOT(clearAccountsCache())); // disconnect - connect(hwnet, SIGNAL(Disconnected()), this, SLOT(ForcedDisconnect()), Qt::QueuedConnection); + connect(hwnet, SIGNAL(Disconnected(const QString&)), this, SLOT(ForcedDisconnect(const QString&)), Qt::QueuedConnection); + +// config stuff + connect(hwnet, SIGNAL(paramChanged(const QString &, const QStringList &)), ui.pageNetGame->pGameCFG, SLOT(setParam(const QString &, const QStringList &))); + connect(ui.pageNetGame->pGameCFG, SIGNAL(paramChanged(const QString &, const QStringList &)), hwnet, SLOT(onParamChanged(const QString &, const QStringList &))); + connect(hwnet, SIGNAL(configAsked()), ui.pageNetGame->pGameCFG, SLOT(fullNetConfig())); + while (nick.isEmpty()) { + nick = QInputDialog::getText(this, + QObject::tr("Nickname"), + QObject::tr("Please enter your nickname"), + QLineEdit::Normal, + QDir::home().dirName()); + config->setValue("net/nick",nick); + config->updNetNick(); + } hwnet->Connect(hostName, port, nick); } @@ -928,11 +1007,6 @@ void HWForm::NetDisconnect() { - if(hwnet) { - hwnet->Disconnect(); - delete hwnet; - hwnet = 0; - } if(pnetserver) { if (pRegisterServer) { @@ -946,15 +1020,12 @@ } } -void HWForm::ForcedDisconnect() +void HWForm::ForcedDisconnect(const QString & reason) { if(pnetserver) return; // we have server - let it care of all things if (hwnet) { - HWNewNet * tmp = hwnet; - hwnet = 0; - tmp->deleteLater(); QMessageBox::warning(this, QMessageBox::tr("Network"), - QMessageBox::tr("Connection to server is lost")); + QMessageBox::tr("Connection to server is lost") + (reason.isEmpty()?"":("\n\n" + HWNewNet::tr("Quit reason: ") + '"' + reason +'"'))); } if (ui.Pages->currentIndex() != ID_PAGE_NET) GoBack(); @@ -976,6 +1047,11 @@ ui.pageNetGame->pNetTeamsWidget->addTeam(team); } +void HWForm::RemoveNetTeam(const HWTeam& team) +{ + ui.pageNetGame->pNetTeamsWidget->removeNetTeam(team); +} + void HWForm::StartMPGame() { QString ammo; @@ -1141,6 +1217,9 @@ void HWForm::NetGameChangeStatus(bool isMaster) { + ui.pageNetGame->pGameCFG->setEnabled(isMaster); + ui.pageNetGame->pNetTeamsWidget->setInteractivity(isMaster); + if (isMaster) NetGameMaster(); else @@ -1201,10 +1280,14 @@ ui.pageNetGame->pGameCFG->GameSchemes->setCurrentIndex(0); } -void HWForm::NetLeftRoom() +void HWForm::NetLeftRoom(const QString & reason) { if (ui.Pages->currentIndex() == ID_PAGE_NETGAME || ui.Pages->currentIndex() == ID_PAGE_INGAME) + { GoBack(); + if (!reason.isEmpty()) + ui.pageRoomsList->chatWidget->addLine("Notice",reason); + } else qWarning("Left room while not in room"); } @@ -1232,7 +1315,8 @@ tmpdir.setFilter(QDir::Files); QStringList userentries = tmpdir.entryList(QStringList("*#*.lua")); //entries.sort(); - for(int i = 0; (i < userentries.count()) && (i <= team.CampaignProgress); i++) + unsigned int n = userentries.count(); + for(unsigned int i = 0; (i < n) && (i <= team.campaignProgress()); i++) ui.pageCampaign->CBSelect->addItem(QString(userentries[i]).replace(QRegExp("^(\\d+)#(.+)\\.lua"), QComboBox::tr("Mission") + " \\1: \\2").replace("_", " "), QString(userentries[i]).replace(QRegExp("^(.*)\\.lua"), "\\1")); tmpdir.cd(datadir->absolutePath()); @@ -1240,7 +1324,8 @@ tmpdir.setFilter(QDir::Files); QStringList entries = tmpdir.entryList(QStringList("*#*.lua")); //entries.sort(); - for(int i = 0; (i < entries.count()) && (i <= team.CampaignProgress); i++) { + n = entries.count(); + for(unsigned int i = 0; (i < n) && (i <= team.campaignProgress()); i++) { if (userentries.contains(entries[i])) continue; ui.pageCampaign->CBSelect->addItem(QString(entries[i]).replace(QRegExp("^(\\d+)#(.+)\\.lua"), QComboBox::tr("Mission") + " \\1: \\2").replace("_", " "), QString(entries[i]).replace(QRegExp("^(.*)\\.lua"), "\\1")); } diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/hwform.h --- a/QTfrontend/hwform.h Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/hwform.h Sun Sep 25 18:24:01 2011 +0200 @@ -97,11 +97,18 @@ void NetStartServer(); void NetDisconnect(); void NetConnected(); + void NetError(const QString & errmsg); + void NetWarning(const QString & wrnmsg); void NetGameEnter(); + void NetPassword(const QString & nick); + void NetNickTaken(const QString & nick); + void NetAuthFailed(); + void NetTeamAccepted(const QString& team); void AddNetTeam(const HWTeam& team); + void RemoveNetTeam(const HWTeam& team); void StartMPGame(); void GameStateChanged(GameState gameState); - void ForcedDisconnect(); + void ForcedDisconnect(const QString & reason); void ShowErrorMessage(const QString &); void GetRecord(bool isDemo, const QByteArray & record); void CreateNetGame(); @@ -115,13 +122,13 @@ void NetGameSlave(); void AsyncNetServerStart(); - void NetLeftRoom(); + void NetLeftRoom(const QString & reason); void selectFirstNetScheme(); void saveDemoWithCustomName(); private: - void _NetConnect(const QString & hostName, quint16 port, const QString & nick); + void _NetConnect(const QString & hostName, quint16 port, QString nick); void UpdateTeamsLists(const QStringList* editable_teams=0); void CreateGame(GameCFGWidget * gamecfg, TeamSelWidget* pTeamSelWidget, QString ammo); void closeEvent(QCloseEvent *event); diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/mapContainer.cpp --- a/QTfrontend/mapContainer.cpp Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/mapContainer.cpp Sun Sep 25 18:24:01 2011 +0200 @@ -509,14 +509,14 @@ { int i = MAPGEN_MAP + 3 + numMissions + rand() % (chooseMap->count() - MAPGEN_MAP - 3 - numMissions); chooseMap->setCurrentIndex(i); - updatePreview(); + mapChanged(i); } void HWMapContainer::setRandomMission() { int i = MAPGEN_MAP + 2 + rand() % numMissions; chooseMap->setCurrentIndex(i); - updatePreview(); + mapChanged(i); } void HWMapContainer::setRandomSeed() diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/namegen.cpp --- a/QTfrontend/namegen.cpp Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/namegen.cpp Sun Sep 25 18:24:01 2011 +0200 @@ -27,10 +27,10 @@ HWNamegen::HWNamegen() : - TypesAvliable(false) + typesAvailable(false) { - TypesLoad(); + loadTypes(); } HWNamegen::~HWNamegen() @@ -39,34 +39,36 @@ -void HWNamegen::TeamRandomName(HWTeam*& team, const int HedgehogNumber) +void HWNamegen::teamRandomName(HWTeam & team, const int HedgehogNumber) { - RandomNameByHat(team, HedgehogNumber); + randomNameByHat(team, HedgehogNumber); } -void HWNamegen::TeamRandomNames(HWTeam*& team, const bool changeteamname) +void HWNamegen::teamRandomNames(HWTeam & team, const bool changeteamname) { - if ((TypesHatnames.size() > 0) && TypesAvliable){ + if ((TypesHatnames.size() > 0) && typesAvailable){ int kind = (rand()%(TypesHatnames.size())); if (changeteamname){ if (TypesTeamnames[kind].size() > 0){ - team->TeamName = TypesTeamnames[kind][rand()%(TypesTeamnames[kind].size())]; + team.setName(TypesTeamnames[kind][rand()%(TypesTeamnames[kind].size())]); } - team->Grave = GetRandomGrave(); - team->Fort = GetRandomFort(); - team->Voicepack = "Default"; + team.setGrave(getRandomGrave()); + team.setFort(getRandomFort()); + team.setVoicepack("Default"); } //give each hedgehog a random name: //TODO: load the dictionary only once! (right now it's loaded once for each hedgehog) - for(int i = 0; i < 8; i++) + for(int i = 0; i < HEDGEHOGS_PER_TEAM; i++) { if ((TypesHatnames[kind].size()) > 0){ - team->Hedgehogs[i].Hat = TypesHatnames[kind][rand()%(TypesHatnames[kind].size())]; + HWHog hh = team.hedgehog(i); + hh.Hat = TypesHatnames[kind][rand()%(TypesHatnames[kind].size())]; + team.setHedgehog(i,hh); } - RandomNameByHat(team,i); + randomNameByHat(team,i); } } @@ -74,18 +76,20 @@ } -void HWNamegen::RandomNameByHat(HWTeam*& team, const int HedgehogNumber) +void HWNamegen::randomNameByHat(HWTeam & team, const int HedgehogNumber) { QStringList Dictionaries; - HatCfgLoad(team->Hedgehogs[HedgehogNumber].Hat,Dictionaries); + hatCfgLoad(team.hedgehog(HedgehogNumber).Hat,Dictionaries); QStringList Dictionary; - DictLoad(Dictionaries[rand()%(Dictionaries.size())],Dictionary); + dictLoad(Dictionaries[rand()%(Dictionaries.size())],Dictionary); - team->Hedgehogs[HedgehogNumber].Name = Dictionary[rand()%(Dictionary.size())]; + HWHog hh = team.hedgehog(HedgehogNumber); + hh.Name = Dictionary[rand()%(Dictionary.size())]; + team.setHedgehog(HedgehogNumber, hh); } -void HWNamegen::DictLoad(const QString filename, QStringList &list) +void HWNamegen::dictLoad(const QString filename, QStringList &list) { list.clear(); @@ -109,7 +113,7 @@ } -void HWNamegen::HatCfgLoad(const QString hatname, QStringList &list) +void HWNamegen::hatCfgLoad(const QString hatname, QStringList &list) { list.clear(); @@ -133,13 +137,13 @@ } -void HWNamegen::TypesLoad() +void HWNamegen::loadTypes() { QFile file; file.setFileName(QString("%1/Data/Names/types.ini").arg(cfgdir->absolutePath())); if (!file.exists()) file.setFileName(QString("%1/Names/types.ini").arg(datadir->absolutePath())); if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) - {TypesAvliable = FALSE; return;} + {typesAvailable = false; return;} int counter = 0; //counter starts with 0 (teamnames mode) TypesTeamnames.append(QStringList()); @@ -155,7 +159,7 @@ TypesHatnames.append(QStringList()); } } else if ((line == QString("*****")) || (line == QString("*END*"))){ - TypesAvliable = TRUE; return; // bye bye + typesAvailable = true; return; // bye bye } else { if ((counter%2) == 0){ // even => teamnames mode TypesTeamnames[(counter/2)].append(line); @@ -165,13 +169,13 @@ } // Types.append(line); } - TypesAvliable = TRUE; + typesAvailable = true; return; } -QString HWNamegen::GetRandomGrave() +QString HWNamegen::getRandomGrave() { QStringList Graves; @@ -199,7 +203,7 @@ return Graves[rand()%(Graves.size())]; } -QString HWNamegen::GetRandomFort() +QString HWNamegen::getRandomFort() { QStringList Forts; diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/namegen.h --- a/QTfrontend/namegen.h Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/namegen.h Sun Sep 25 18:24:01 2011 +0200 @@ -31,21 +31,21 @@ HWNamegen(); ~HWNamegen(); - void TeamRandomName(HWTeam*& team, const int HedgehogNumber); - void TeamRandomNames(HWTeam*& team, const bool changeteamname); - void RandomNameByHat(HWTeam*& team, const int HedgehogNumber); + void teamRandomName(HWTeam & team, const int HedgehogNumber); + void teamRandomNames(HWTeam & team, const bool changeteamname); + void randomNameByHat(HWTeam & team, const int HedgehogNumber); private: QList TypesTeamnames; QList TypesHatnames; - bool TypesAvliable; - void TypesLoad(); - void DictLoad(const QString filename, QStringList &list); - void HatCfgLoad(const QString hatname, QStringList &list); + bool typesAvailable; + void loadTypes(); + void dictLoad(const QString filename, QStringList &list); + void hatCfgLoad(const QString hatname, QStringList &list); - QString GetRandomGrave(); - QString GetRandomFort(); + QString getRandomGrave(); + QString getRandomFort(); }; diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/newnetclient.cpp --- a/QTfrontend/newnetclient.cpp Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/newnetclient.cpp Sun Sep 25 18:24:01 2011 +0200 @@ -24,10 +24,7 @@ #include "hwconsts.h" #include "newnetclient.h" #include "proto.h" -#include "gameuiconfig.h" #include "game.h" -#include "gamecfgwidget.h" -#include "teamselect.h" #include "misc.h" /* only to get the ignoreList from the chat widget */ #include "hwform.h" @@ -36,10 +33,7 @@ char delimeter='\n'; -HWNewNet::HWNewNet(GameUIConfig * config, GameCFGWidget* pGameCFGWidget, TeamSelWidget* pTeamSelWidget) : - config(config), - m_pGameCFGWidget(pGameCFGWidget), - m_pTeamSelWidget(pTeamSelWidget), +HWNewNet::HWNewNet() : isChief(false), m_game_connected(false), loginStep(0), @@ -51,11 +45,6 @@ connect(&NetSocket, SIGNAL(disconnected()), this, SLOT(OnDisconnect())); connect(&NetSocket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(displayError(QAbstractSocket::SocketError))); - -// config stuff - connect(this, SIGNAL(paramChanged(const QString &, const QStringList &)), pGameCFGWidget, SLOT(setParam(const QString &, const QStringList &))); - connect(pGameCFGWidget, SIGNAL(paramChanged(const QString &, const QStringList &)), this, SLOT(onParamChanged(const QString &, const QStringList &))); - connect(this, SIGNAL(configAsked()), pGameCFGWidget, SLOT(fullNetConfig())); } HWNewNet::~HWNewNet() @@ -63,7 +52,7 @@ if (m_game_connected) { RawSendNet(QString("QUIT%1%2").arg(delimeter).arg("User quit")); - emit Disconnected(); + emit Disconnected(tr("User quit")); } NetSocket.flush(); } @@ -71,15 +60,6 @@ void HWNewNet::Connect(const QString & hostName, quint16 port, const QString & nick) { mynick = nick; - while (mynick.isEmpty()) { - mynick = QInputDialog::getText(m_pGameCFGWidget, - QObject::tr("Nickname"), - QObject::tr("Please enter your nickname"), - QLineEdit::Normal, - QDir::home().dirName()); - config->setValue("net/nick",mynick); - config->updNetNick(); - } myhost = hostName + QString(":%1").arg(port); NetSocket.connectToHost(hostName, port); } @@ -124,27 +104,32 @@ void HWNewNet::AddTeam(const HWTeam & team) { QString cmd = QString("ADD_TEAM") + delimeter + - team.TeamName + delimeter + - team.teamColor.name() + delimeter + - team.Grave + delimeter + - team.Fort + delimeter + - team.Voicepack + delimeter + - team.Flag + delimeter + - QString::number(team.difficulty); + team.name() + delimeter + + team.color().name() + delimeter + + team.grave() + delimeter + + team.fort() + delimeter + + team.voicepack() + delimeter + + team.flag() + delimeter + + QString::number(team.difficulty()); - for(int i = 0; i < 8; ++i) + for(unsigned int i = 0; i < HEDGEHOGS_PER_TEAM; ++i) { cmd.append(delimeter); - cmd.append(team.Hedgehogs[i].Name); + cmd.append(team.hedgehog(i).Name); cmd.append(delimeter); - cmd.append(team.Hedgehogs[i].Hat); + cmd.append(team.hedgehog(i).Hat); } RawSendNet(cmd); } void HWNewNet::RemoveTeam(const HWTeam & team) { - RawSendNet(QString("REMOVE_TEAM") + delimeter + team.TeamName); + RawSendNet(QString("REMOVE_TEAM") + delimeter + team.name()); +} + +void HWNewNet::NewNick(const QString & nick) +{ + RawSendNet(QString("NICK%1%2").arg(delimeter).arg(nick)); } void HWNewNet::ToggleReady() @@ -166,7 +151,7 @@ void HWNewNet::RawSendNet(const QByteArray & buf) { - qDebug() << "Client: " << QString(buf).split("\n"); + qDebug() << "Client: " << QString(buf).split("\n"); NetSocket.write(buf); NetSocket.write("\n\n", 2); } @@ -191,29 +176,33 @@ void HWNewNet::OnDisconnect() { - if(m_game_connected) emit Disconnected(); + if(m_game_connected) emit Disconnected(""); m_game_connected = false; } void HWNewNet::displayError(QAbstractSocket::SocketError socketError) { - emit Disconnected(); m_game_connected = false; switch (socketError) { case QAbstractSocket::RemoteHostClosedError: break; case QAbstractSocket::HostNotFoundError: - emit showMessage(tr("The host was not found. Please check the host name and port settings.")); + emit Disconnected(tr("The host was not found. Please check the host name and port settings.")); break; case QAbstractSocket::ConnectionRefusedError: - emit showMessage(tr("Connection refused")); + emit Disconnected(tr("Connection refused")); break; default: - emit showMessage(NetSocket.errorString()); + emit Disconnected(NetSocket.errorString()); } } +void HWNewNet::SendPasswordHash(const QString & hash) +{ + RawSendNet(QString("PASSWORD%1%2").arg(delimeter).arg(hash)); +} + void HWNewNet::ParseCmd(const QStringList & lst) { qDebug() << "Server: " << lst; @@ -235,17 +224,17 @@ if (lst[0] == "ERROR") { if (lst.size() == 2) - emit showMessage("Error: " + lst[1]); + emit Error(lst[1]); else - emit showMessage("Unknown error"); + emit Error("Unknown error"); return; } if (lst[0] == "WARNING") { if (lst.size() == 2) - emit showMessage("Warning: " + lst[1]); + emit Warning(lst[1]); else - emit showMessage("Unknown warning"); + emit Warning("Unknown warning"); return; } @@ -383,21 +372,19 @@ qWarning("Net: Bad REMOVETEAM message"); return; } - m_pTeamSelWidget->removeNetTeam(HWTeam(lst[1])); + emit RemoveNetTeam(HWTeam(lst[1])); return; } if(lst[0] == "ROOMABANDONED") { netClientState = 2; - emit showMessage(HWNewNet::tr("Room destroyed")); - emit LeftRoom(); + emit LeftRoom(tr("Room destroyed")); return; } if(lst[0] == "KICKED") { netClientState = 2; - emit showMessage(HWNewNet::tr("You got kicked")); - emit LeftRoom(); + emit LeftRoom(tr("You got kicked")); return; } @@ -418,11 +405,14 @@ if (isChief) emit configAsked(); } + // TODO reactivate +/* if (lst[i] != mynick && isChief && config->Form->ui.pageRoomsList->chatWidget->ignoreList.contains(lst[i], Qt::CaseInsensitive) && !config->Form->ui.pageRoomsList->chatWidget->friendsList.contains(lst[i], Qt::CaseInsensitive)) { kickPlayer(lst[i]); } else +*/ { emit nickAdded(lst[i], isChief && (lst[i] != mynick)); emit chatStringFromNet(tr("%1 *** %2 has joined the room").arg('\x03').arg(lst[i])); @@ -498,28 +488,7 @@ } if (lst[0] == "ASKPASSWORD") { - bool ok = false; - int passLength = config->value("net/passwordlength", 0).toInt(); - QString hash = config->value("net/passwordhash", "").toString(); - - // If the password is blank, ask the user to enter one in - if (passLength == 0) - { - QString password = QInputDialog::getText(m_pGameCFGWidget, tr("Password"), tr("Your nickname %1 is\nregistered on Hedgewars.org\nPlease provide your password below\nor pick another nickname in game config:").arg(mynick), QLineEdit::Password, passLength==0?NULL:QString(passLength,'\0'), &ok); - - if (!ok) { - Disconnect(); - emit Disconnected(); - return; - } - - hash = QCryptographicHash::hash(password.toLatin1(), QCryptographicHash::Md5).toHex(); - config->setValue("net/passwordhash", hash); - config->setValue("net/passwordlength", password.size()); - config->setNetPasswordLength(password.size()); - } - - RawSendNet(QString("PASSWORD%1%2").arg(delimeter).arg(hash)); + emit AskForPassword(mynick); return; } @@ -549,7 +518,7 @@ qWarning("Net: Bad TEAM_ACCEPTED message"); return; } - m_pTeamSelWidget->changeTeamStatus(lst[1]); + emit TeamAccepted(lst[1]); return; } @@ -577,7 +546,7 @@ return; } HWTeam tmptm(lst[1]); - tmptm.numHedgehogs = lst[2].toUInt(); + tmptm.setNumHedgehogs(lst[2].toUInt()); emit hhnumChanged(tmptm); return; } @@ -589,7 +558,7 @@ return; } HWTeam tmptm(lst[1]); - tmptm.teamColor = QColor(lst[2]); + tmptm.setColor(QColor(lst[2])); emit teamColorChanged(tmptm); return; } @@ -616,11 +585,11 @@ } if (lst[1] == "Authentication failed") { - // Set the password blank if case the user tries to join and enter his password again - config->setValue("net/passwordlength", 0); - config->setNetPasswordLength(0); + emit AuthFailed(); } - emit showMessage(HWNewNet::tr("Quit reason: ") + lst[1]); + m_game_connected = false; + Disconnect(); + emit Disconnected(lst[1]); return; } @@ -633,15 +602,11 @@ if (lst[0] == "ROOM_CONTROL_ACCESS") { if (lst.size() < 2) { - qWarning("Net: Bad BYE message"); + qWarning("Net: Bad ROOM_CONTROL_ACCESS message"); return; } - bool b = lst[1] != "0"; - m_pGameCFGWidget->setEnabled(b); - m_pTeamSelWidget->setInteractivity(b); - isChief = b; + isChief = (lst[1] != "0"); emit roomMaster(isChief); - return; } @@ -653,8 +618,8 @@ if (isChief) RawSendNet(QString("HH_NUM%1%2%1%3") .arg(delimeter) - .arg(team.TeamName) - .arg(team.numHedgehogs)); + .arg(team.name()) + .arg(team.numHedgehogs())); } void HWNewNet::onTeamColorChanged(const HWTeam& team) @@ -662,8 +627,8 @@ if (isChief) RawSendNet(QString("TEAM_COLOR%1%2%1%3") .arg(delimeter) - .arg(team.TeamName) - .arg(team.teamColor.name())); + .arg(team.name()) + .arg(team.color().name())); } void HWNewNet::onParamChanged(const QString & param, const QStringList & value) @@ -825,21 +790,7 @@ { case 0: { - bool ok = false; - QString newNick = QInputDialog::getText(0, tr("Nickname"), tr("Some one already uses\n your nickname %1\non the server.\nPlease pick another nickname:").arg(mynick), QLineEdit::Normal, mynick, &ok); - - if (!ok || newNick.isEmpty()) { - Disconnect(); - emit Disconnected(); - return; - } - - config->setValue("net/nick", newNick); - config->updNetNick(); - mynick = newNick; - - RawSendNet(QString("NICK%1%2").arg(delimeter).arg(newNick)); - + emit NickTaken(mynick); break; } } diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/newnetclient.h --- a/QTfrontend/newnetclient.h Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/newnetclient.h Sun Sep 25 18:24:01 2011 +0200 @@ -39,10 +39,12 @@ Q_OBJECT public: - HWNewNet(GameUIConfig * config, GameCFGWidget* pGameCFGWidget, TeamSelWidget* pTeamSelWidget); + HWNewNet(); ~HWNewNet(); void Connect(const QString & hostName, quint16 port, const QString & nick); void Disconnect(); + void SendPasswordHash(const QString & hash); + void NewNick(const QString & nick); bool isRoomChief(); bool isInRoom(); int getClientState(); @@ -51,10 +53,6 @@ QString getHost(); private: - GameUIConfig* config; - GameCFGWidget* m_pGameCFGWidget; - TeamSelWidget* m_pTeamSelWidget; - bool isChief; QString mynick; QString myroom; @@ -95,9 +93,14 @@ signals: void AskForRunGame(); void Connected(); - void Disconnected(); + void Disconnected(const QString & reason); + void Error(const QString & errmsg); + void Warning(const QString & wrnmsg); + void AskForPassword(const QString & nick); + void NickTaken(const QString & nick); + void AuthFailed(); void EnteredGame(); - void LeftRoom(); + void LeftRoom(const QString & reason); void nickAdded(const QString& nick, bool notifyNick); void nickRemoved(const QString& nick); void nickAddedLobby(const QString& nick, bool notifyNick); @@ -110,7 +113,9 @@ void paramChanged(const QString & param, const QStringList & value); void configAsked(); + void TeamAccepted(const QString&); void AddNetTeam(const HWTeam&); + void RemoveNetTeam(const HWTeam&); void hhnumChanged(const HWTeam&); void teamColorChanged(const HWTeam&); void chatStringLobby(const QString&); @@ -127,7 +132,6 @@ void setReadyStatus(const QString & nick, bool isReady); void setMyReadyStatus(bool isReady); - void showMessage(const QString &); public slots: void ToggleReady(); diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pageadmin.cpp --- a/QTfrontend/pageadmin.cpp Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pageadmin.cpp Sun Sep 25 18:24:01 2011 +0200 @@ -73,14 +73,16 @@ // 5 pbClearAccountsCache = addButton(tr("Clear Accounts Cache"), pageLayout, 5, 0); + connect(pbClearAccountsCache, SIGNAL(clicked()), this, SIGNAL(clearAccountsCache())); // 6 pbSetSM = addButton(tr("Set data"), pageLayout, 6, 0, 1, 3); + connect(pbSetSM, SIGNAL(clicked()), this, SLOT(smChanged())); + // 7 BtnBack = addButton(":/res/Exit.png", pageLayout, 7, 0, true); - - connect(pbSetSM, SIGNAL(clicked()), this, SLOT(smChanged())); + connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack())); } void PageAdmin::smChanged() diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pageadmin.h --- a/QTfrontend/pageadmin.h Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pageadmin.h Sun Sep 25 18:24:01 2011 +0200 @@ -28,9 +28,6 @@ public: PageAdmin(QWidget* parent = 0); - QPushButton * BtnBack; - QPushButton * pbClearAccountsCache; - private: QLineEdit * leServerMessageNew; QLineEdit * leServerMessageOld; @@ -38,6 +35,8 @@ QPushButton * pbAsk; QSpinBox * sbProtocol; QTextBrowser * tb; + QPushButton * BtnBack; + QPushButton * pbClearAccountsCache; private slots: void smChanged(); @@ -52,6 +51,7 @@ void setServerMessageOld(const QString & str); void setProtocol(int proto); void askServerVars(); + void clearAccountsCache(); }; #endif diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pagecampaign.cpp --- a/QTfrontend/pagecampaign.cpp Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pagecampaign.cpp Sun Sep 25 18:24:01 2011 +0200 @@ -42,5 +42,7 @@ BtnStartCampaign->setText(QPushButton::tr("Go!")); pageLayout->addWidget(BtnStartCampaign, 2, 2); + BtnBack = addButton(":/res/Exit.png", pageLayout, 4, 0, true); + connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack())); } diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pagecampaign.h --- a/QTfrontend/pagecampaign.h Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pagecampaign.h Sun Sep 25 18:24:01 2011 +0200 @@ -29,9 +29,11 @@ PageCampaign(QWidget* parent = 0); QPushButton *BtnStartCampaign; - QPushButton *BtnBack; QComboBox *CBSelect; QComboBox *CBTeam; + +private: + QPushButton *BtnBack; }; #endif diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pagedata.cpp --- a/QTfrontend/pagedata.cpp Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pagedata.cpp Sun Sep 25 18:24:01 2011 +0200 @@ -41,7 +41,6 @@ pageLayout->setColumnStretch(1, 1); pageLayout->setColumnStretch(2, 1); - BtnBack = addButton(":/res/Exit.png", pageLayout, 2, 0, true); web = new DataBrowser(this); connect(web, SIGNAL(anchorClicked(QUrl)), this, SLOT(request(const QUrl&))); @@ -52,6 +51,10 @@ pageLayout->addLayout(progressBarsLayout, 1, 0, 1, 3); fetchList(); + + + BtnBack = addButton(":/res/Exit.png", pageLayout, 2, 0, true); + connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack())); } void PageDataDownload::request(const QUrl &url) diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pagedata.h --- a/QTfrontend/pagedata.h Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pagedata.h Sun Sep 25 18:24:01 2011 +0200 @@ -34,12 +34,11 @@ public: PageDataDownload(QWidget* parent = 0); - QPushButton *BtnBack; - public slots: void fetchList(); private: + QPushButton *BtnBack; DataBrowser *web; QHash progressBars; QVBoxLayout *progressBarsLayout; diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pagedrawmap.cpp --- a/QTfrontend/pagedrawmap.cpp Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pagedrawmap.cpp Sun Sep 25 18:24:01 2011 +0200 @@ -32,7 +32,10 @@ QPushButton * pbLoad = addButton(tr("Load"), pageLayout, 2, 0); QPushButton * pbSave = addButton(tr("Save"), pageLayout, 3, 0); + BtnBack = addButton(":/res/Exit.png", pageLayout, 5, 0, true); + connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack())); + drawMapWidget = new DrawMapWidget(this); pageLayout->addWidget(drawMapWidget, 0, 1, 5, 1); diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pagedrawmap.h --- a/QTfrontend/pagedrawmap.h Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pagedrawmap.h Sun Sep 25 18:24:01 2011 +0200 @@ -30,9 +30,10 @@ public: PageDrawMap(QWidget* parent = 0); - QPushButton * BtnBack; + DrawMapWidget * drawMapWidget; - DrawMapWidget * drawMapWidget; +private: + QPushButton * BtnBack; private slots: void load(); diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pagegamestats.cpp --- a/QTfrontend/pagegamestats.cpp Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pagegamestats.cpp Sun Sep 25 18:24:01 2011 +0200 @@ -49,10 +49,13 @@ BtnSave->setStyleSheet("QPushButton{margin: 12px 0px 12px 0px;}"); connect(BtnSave, SIGNAL(clicked()), this, SIGNAL(saveDemoRequested())); + BtnBack = addButton(":/res/Exit.png", pageLayout, 3, 0, true); BtnBack->setFixedHeight(BtnSave->height()); BtnBack->setFixedWidth(BtnBack->width()+2); BtnBack->setStyleSheet("QPushButton{margin: 22px 0 9px 2px;}"); + connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack())); + QGroupBox * gb = new QGroupBox(this); QVBoxLayout * gbl = new QVBoxLayout; @@ -180,12 +183,12 @@ //AddStatText("

local team: " + info + "

"); QStringList infol = info.split(":"); HWTeam team(infol[0]); - if(team.FileExists()) // do some better test to avoid influence from scripted/predefined teams? + if(team.fileExists()) // do some better test to avoid influence from scripted/predefined teams? { - team.LoadFromFile(); - team.Rounds++; + team.loadFromFile(); + team.incRounds(); if(infol[1].toInt() > 0) // might require some better test for winning condition (or changed flag) ... WIP! - team.Wins++; // should draws count as wins? + team.incWins(); // should draws count as wins? //team.SaveToFile(); // don't save yet } break; diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pagegamestats.h --- a/QTfrontend/pagegamestats.h Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pagegamestats.h Sun Sep 25 18:24:01 2011 +0200 @@ -43,7 +43,6 @@ public: PageGameStats(QWidget* parent = 0); - QPushButton *BtnBack; QPushButton *BtnSave; QLabel *labelGameStats; QLabel *labelGameWin; @@ -64,6 +63,8 @@ QMap > healthPoints; unsigned int playerPosition; quint32 lastColor; + + QPushButton *BtnBack; }; #endif // STATSPAGE_H diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pageinfo.cpp --- a/QTfrontend/pageinfo.cpp Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pageinfo.cpp Sun Sep 25 18:24:01 2011 +0200 @@ -30,8 +30,11 @@ pageLayout->setColumnStretch(2, 1); BtnSnapshots = addButton(":/res/Star.png", pageLayout, 1, 2, true); - BtnBack = addButton(":/res/Exit.png", pageLayout, 1, 0, true); about = new About(this); pageLayout->addWidget(about, 0, 0, 1, 3); + + + BtnBack = addButton(":/res/Exit.png", pageLayout, 1, 0, true); + connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack())); } diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pageinfo.h --- a/QTfrontend/pageinfo.h Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pageinfo.h Sun Sep 25 18:24:01 2011 +0200 @@ -31,8 +31,10 @@ PageInfo(QWidget* parent = 0); QPushButton *BtnSnapshots; + About *about; + +private: QPushButton *BtnBack; - About *about; }; #endif diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pagemultiplayer.cpp --- a/QTfrontend/pagemultiplayer.cpp Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pagemultiplayer.cpp Sun Sep 25 18:24:01 2011 +0200 @@ -28,8 +28,6 @@ { QGridLayout * pageLayout = new QGridLayout(this); - BtnBack = addButton(":/res/Exit.png", pageLayout, 3, 0, true); - gameCFG = new GameCFGWidget(this); pageLayout->addWidget(gameCFG, 0, 0, 1, 2); @@ -44,4 +42,8 @@ pageLayout->addWidget(teamsSelect, 0, 2, 3, 2); BtnStartMPGame = addButton(tr("Start"), pageLayout, 3, 3); + + + BtnBack = addButton(":/res/Exit.png", pageLayout, 3, 0, true); + connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack())); } diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pagemultiplayer.h --- a/QTfrontend/pagemultiplayer.h Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pagemultiplayer.h Sun Sep 25 18:24:01 2011 +0200 @@ -31,11 +31,13 @@ public: PageMultiplayer(QWidget* parent = 0); - QPushButton *BtnBack; GameCFGWidget *gameCFG; TeamSelWidget *teamsSelect; QPushButton *BtnStartMPGame; +private: + QPushButton *BtnBack; + signals: void SetupClicked(); }; diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pagenet.cpp --- a/QTfrontend/pagenet.cpp Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pagenet.cpp Sun Sep 25 18:24:01 2011 +0200 @@ -41,7 +41,10 @@ BtnNetSvrStart->setVisible(haveServer); pageLayout->addWidget(BtnNetSvrStart, 4, 2); + BtnBack = addButton(":/res/Exit.png", pageLayout, 4, 0, true); + connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack())); + ConnGroupBox = new QGroupBox(this); ConnGroupBox->setTitle(QGroupBox::tr("Net game")); diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pagenet.h --- a/QTfrontend/pagenet.h Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pagenet.h Sun Sep 25 18:24:01 2011 +0200 @@ -30,7 +30,6 @@ QPushButton* BtnUpdateSList; QTableView * tvServersList; - QPushButton * BtnBack; QPushButton * BtnNetConnect; QPushButton * BtnNetSvrStart; QPushButton * BtnSpecifyServer; @@ -38,6 +37,7 @@ private: QGroupBox * ConnGroupBox; QGridLayout * GBClayout; + QPushButton * BtnBack; private slots: void slotConnect(); diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pagenetgame.cpp --- a/QTfrontend/pagenetgame.cpp Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pagenetgame.cpp Sun Sep 25 18:24:01 2011 +0200 @@ -41,6 +41,7 @@ pChatWidget->setShowFollow(false); // don't show follow in nicks' context menus pageLayout->addWidget(pChatWidget, 2, 0, 1, 2); pageLayout->setRowStretch(1, 100); + pageLayout->setRowStretch(2, 100); pGameCFG = new GameCFGWidget(this); pageLayout->addWidget(pGameCFG, 0, 0); @@ -58,7 +59,10 @@ QHBoxLayout * bottomLayout = new QHBoxLayout; pageLayout->addLayout(bottomLayout, 4, 0, 1, 2); + BtnBack = addButton(":/res/Exit.png", bottomLayout, 0, true); + connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack())); + leRoomName = new QLineEdit(this); leRoomName->setMaxLength(60); diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pagenetgame.h --- a/QTfrontend/pagenetgame.h Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pagenetgame.h Sun Sep 25 18:24:01 2011 +0200 @@ -33,7 +33,6 @@ public: PageNetGame(QWidget* parent, QSettings * config, SDLInteraction * sdli); - QPushButton *BtnBack; QPushButton *BtnGo; QPushButton *BtnMaster; QPushButton *BtnStart; @@ -49,6 +48,9 @@ TeamSelWidget* pNetTeamsWidget; GameCFGWidget* pGameCFG; +private: + QPushButton *BtnBack; + public slots: void setReadyStatus(bool isReady); void onUpdateClick(); diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pagenetserver.cpp --- a/QTfrontend/pagenetserver.cpp Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pagenetserver.cpp Sun Sep 25 18:24:01 2011 +0200 @@ -36,7 +36,10 @@ pageLayout->setRowStretch(0, 1); pageLayout->setRowStretch(1, 0); + BtnBack =addButton(":/res/Exit.png", pageLayout, 1, 0, true); + connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack())); + BtnStart = new QPushButton(this); BtnStart->setFont(*font14); diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pagenetserver.h --- a/QTfrontend/pagenetserver.h Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pagenetserver.h Sun Sep 25 18:24:01 2011 +0200 @@ -28,7 +28,6 @@ public: PageNetServer(QWidget* parent = 0); - QPushButton *BtnBack; QPushButton *BtnStart; QPushButton *BtnDefault; QLabel *labelSD; @@ -36,6 +35,9 @@ QLabel *labelPort; QSpinBox *sbPort; +private: + QPushButton *BtnBack; + private slots: void setDefaultPort(); }; diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pagenettype.cpp --- a/QTfrontend/pagenettype.cpp Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pagenettype.cpp Sun Sep 25 18:24:01 2011 +0200 @@ -37,5 +37,7 @@ // hack: temporary deactivated - requires server modifications that aren't backward compatible (yet) //BtnOfficialServer->setEnabled(false); + BtnBack = addButton(":/res/Exit.png", pageLayout, 4, 0, true); + connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack())); } diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pagenettype.h --- a/QTfrontend/pagenettype.h Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pagenettype.h Sun Sep 25 18:24:01 2011 +0200 @@ -28,9 +28,11 @@ public: PageNetType(QWidget* parent = 0); - QPushButton * BtnBack; QPushButton * BtnLAN; QPushButton * BtnOfficialServer; + +private: + QPushButton * BtnBack; }; #endif diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pageoptions.cpp --- a/QTfrontend/pageoptions.cpp Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pageoptions.cpp Sun Sep 25 18:24:01 2011 +0200 @@ -401,10 +401,12 @@ BtnSaveOptions = addButton(":/res/Save.png", pageLayout, 2, 2, true); BtnSaveOptions->setStyleSheet("QPushButton{margin: 12px 0px 12px 0px;}"); + BtnBack = addButton(":/res/Exit.png", pageLayout, 2, 0, true); BtnBack->setFixedHeight(BtnSaveOptions->height()); BtnBack->setFixedWidth(BtnBack->width()+2); BtnBack->setStyleSheet("QPushButton{margin: 22px 0 9px 2px;}"); + connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack())); previousQuality = this->SLQuality->value(); previousResolutionIndex = this->CBResolution->currentIndex(); diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pageoptions.h --- a/QTfrontend/pageoptions.h Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pageoptions.h Sun Sep 25 18:24:01 2011 +0200 @@ -43,7 +43,6 @@ QComboBox *CBLanguage; - QPushButton *BtnBack; IconedGroupBox *teamsBox; QPushButton *BtnNewTeam; QPushButton *BtnEditTeam; @@ -81,6 +80,7 @@ bool previousFullscreenValue; int previousResolutionIndex; int previousQuality; + QPushButton *BtnBack; private slots: void forceFullscreen(int index); diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pageplayrecord.cpp --- a/QTfrontend/pageplayrecord.cpp Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pageplayrecord.cpp Sun Sep 25 18:24:01 2011 +0200 @@ -37,8 +37,6 @@ pageLayout->setColumnStretch(2, 1); pageLayout->setRowStretch(2, 100); - BtnBack = addButton(":/res/Exit.png", pageLayout, 3, 0, true); - BtnPlayDemo = new QPushButton(this); BtnPlayDemo->setFont(*font14); BtnPlayDemo->setText(QPushButton::tr("Play demo")); @@ -58,6 +56,10 @@ connect(BtnRenameRecord, SIGNAL(clicked()), this, SLOT(renameRecord())); connect(BtnRemoveRecord, SIGNAL(clicked()), this, SLOT(removeRecord())); + + + BtnBack = addButton(":/res/Exit.png", pageLayout, 3, 0, true); + connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack())); } void PagePlayDemo::FillFromDir(RecordType rectype) diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pageplayrecord.h --- a/QTfrontend/pageplayrecord.h Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pageplayrecord.h Sun Sep 25 18:24:01 2011 +0200 @@ -41,7 +41,6 @@ void FillFromDir(RecordType rectype); bool isSave(); - QPushButton *BtnBack; QPushButton *BtnPlayDemo; QPushButton *BtnRenameRecord; QPushButton *BtnRemoveRecord; @@ -49,6 +48,7 @@ private: RecordType recType; + QPushButton *BtnBack; private slots: void renameRecord(); diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pageroomslist.cpp --- a/QTfrontend/pageroomslist.cpp Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pageroomslist.cpp Sun Sep 25 18:24:01 2011 +0200 @@ -53,9 +53,9 @@ roomsList->setSelectionMode(QAbstractItemView::SingleSelection); pageLayout->addWidget(roomsList, 1, 0, 3, 2); pageLayout->setRowStretch(2, 100); - + QHBoxLayout * filterLayout = new QHBoxLayout(); - + QLabel * stateLabel = new QLabel(this); stateLabel->setText(tr("State:")); CBState = new QComboBox(this); @@ -65,7 +65,7 @@ filterLayout->addWidget(stateLabel); filterLayout->addWidget(CBState); filterLayout->addSpacing(30); - + QLabel * ruleLabel = new QLabel(this); ruleLabel->setText(tr("Rules:")); CBRules = new QComboBox(this); @@ -77,7 +77,7 @@ filterLayout->addWidget(ruleLabel); filterLayout->addWidget(CBRules); filterLayout->addSpacing(30); - + QLabel * weaponLabel = new QLabel(this); weaponLabel->setText(tr("Weapons:")); CBWeapons = new QComboBox(this); @@ -108,7 +108,10 @@ BtnRefresh = addButton(tr("Refresh"), pageLayout, 3, 2); BtnClear = addButton(tr("Clear"), pageLayout, 4, 2); + BtnBack = addButton(":/res/Exit.png", pageLayout, 6, 0, true); + connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack())); + lblCount = new QLabel(this); pageLayout->addWidget(lblCount, 6, 1, Qt::AlignHCenter); @@ -129,7 +132,7 @@ connect(CBWeapons, SIGNAL(currentIndexChanged (int)), this, SLOT(onRefreshClick())); connect(searchText, SIGNAL(textChanged (const QString &)), this, SLOT(onRefreshClick())); connect(this, SIGNAL(askJoinConfirmation (const QString &)), this, SLOT(onJoinConfirmation(const QString &)), Qt::QueuedConnection); - + gameInLobby = false; } diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pageroomslist.h --- a/QTfrontend/pageroomslist.h Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pageroomslist.h Sun Sep 25 18:24:01 2011 +0200 @@ -35,7 +35,6 @@ QLineEdit * roomName; QLineEdit * searchText; QTableWidget * roomsList; - QPushButton * BtnBack; QPushButton * BtnCreate; QPushButton * BtnJoin; QPushButton * BtnRefresh; @@ -52,6 +51,7 @@ QString gameInLobbyName; QStringList listFromServer; AmmoSchemeModel * ammoSchemeModel; + QPushButton * BtnBack; public slots: void setRoomsList(const QStringList & list); diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pagescheme.cpp --- a/QTfrontend/pagescheme.cpp Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pagescheme.cpp Sun Sep 25 18:24:01 2011 +0200 @@ -390,7 +390,11 @@ mapper = new QDataWidgetMapper(this); + BtnBack = addButton(":/res/Exit.png", pageLayout, 16, 0, true); + connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack())); + + BtnCopy = addButton(tr("Copy"), pageLayout, 16, 2); BtnNew = addButton(tr("New"), pageLayout, 16, 3); BtnDelete = addButton(tr("Delete"), pageLayout, 16, 4); diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pagescheme.h --- a/QTfrontend/pagescheme.h Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pagescheme.h Sun Sep 25 18:24:01 2011 +0200 @@ -31,7 +31,6 @@ public: PageScheme(QWidget* parent = 0); - QPushButton * BtnBack; QPushButton * BtnCopy; QPushButton * BtnNew; QPushButton * BtnDelete; @@ -46,6 +45,8 @@ void deleteRow(); private: + QPushButton * BtnBack; + QDataWidgetMapper * mapper; ToggleButtonWidget * TBW_mode_Forts; ToggleButtonWidget * TBW_teamsDivide; diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pageselectweapon.cpp --- a/QTfrontend/pageselectweapon.cpp Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pageselectweapon.cpp Sun Sep 25 18:24:01 2011 +0200 @@ -32,7 +32,11 @@ pWeapons = new SelWeaponWidget(cAmmoNumber, this); pageLayout->addWidget(pWeapons, 0, 0, 1, 5); + BtnBack = addButton(":/res/Exit.png", pageLayout, 1, 0, 2, 1, true); + connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack())); + + BtnDefault = addButton(tr("Default"), pageLayout, 1, 3); BtnNew = addButton(tr("New"), pageLayout, 1, 2); BtnCopy = addButton(tr("Copy"), pageLayout, 2, 2); diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pageselectweapon.h --- a/QTfrontend/pageselectweapon.h Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pageselectweapon.h Sun Sep 25 18:24:01 2011 +0200 @@ -35,9 +35,11 @@ QPushButton *BtnDelete; QPushButton *BtnNew; QPushButton *BtnCopy; - QPushButton *BtnBack; SelWeaponWidget* pWeapons; QComboBox* selectWeaponSet; + +private: + QPushButton *BtnBack; }; #endif diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pagesingleplayer.cpp --- a/QTfrontend/pagesingleplayer.cpp Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pagesingleplayer.cpp Sun Sep 25 18:24:01 2011 +0200 @@ -51,7 +51,11 @@ BtnTrainPage = addButton(":/res/Trainings.png", middleLine, 1, true); BtnTrainPage->setToolTip(tr("Training Mode (Practice your skills in a range of training missions). IN DEVELOPMENT")); + BtnBack = addButton(":/res/Exit.png", bottomLine, 0, true); + connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack())); + + bottomLine->addStretch(); BtnDemos = addButton(":/res/Record.png", bottomLine, 1, true); diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pagesingleplayer.h --- a/QTfrontend/pagesingleplayer.h Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pagesingleplayer.h Sun Sep 25 18:24:01 2011 +0200 @@ -36,8 +36,10 @@ QPushButton *BtnMultiplayer; QPushButton *BtnLoad; QPushButton *BtnDemos; + GameCFGWidget *gameCFG; + +private: QPushButton *BtnBack; - GameCFGWidget *gameCFG; }; #endif diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pagetraining.cpp --- a/QTfrontend/pagetraining.cpp Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pagetraining.cpp Sun Sep 25 18:24:01 2011 +0200 @@ -63,5 +63,7 @@ BtnStartTrain->setText(QPushButton::tr("Go!")); pageLayout->addWidget(BtnStartTrain, 1, 2); + BtnBack = addButton(":/res/Exit.png", pageLayout, 3, 0, true); + connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack())); } diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/pagetraining.h --- a/QTfrontend/pagetraining.h Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/pagetraining.h Sun Sep 25 18:24:01 2011 +0200 @@ -29,8 +29,10 @@ PageTraining(QWidget* parent = 0); QPushButton *BtnStartTrain; + QComboBox *CBSelect; + +private: QPushButton *BtnBack; - QComboBox *CBSelect; }; #endif diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/res/StatsMedal1@2x.png Binary file QTfrontend/res/StatsMedal1@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/res/StatsMedal2@2x.png Binary file QTfrontend/res/StatsMedal2@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/res/StatsMedal3@2x.png Binary file QTfrontend/res/StatsMedal3@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/res/StatsMedal4@2x.png Binary file QTfrontend/res/StatsMedal4@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/res/ammopic@2x.png Binary file QTfrontend/res/ammopic@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/res/iconBox@2x.png Binary file QTfrontend/res/iconBox@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/res/iconDamage.png Binary file QTfrontend/res/iconDamage.png has changed diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/res/iconDamage@2x.png Binary file QTfrontend/res/iconDamage@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/res/iconDud@2x.png Binary file QTfrontend/res/iconDud@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/res/iconHealth.png Binary file QTfrontend/res/iconHealth.png has changed diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/res/iconHealth@2x.png Binary file QTfrontend/res/iconHealth@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/res/iconMine@2x.png Binary file QTfrontend/res/iconMine@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/res/iconRope@2x.png Binary file QTfrontend/res/iconRope@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/res/iconSuddenDeath.png Binary file QTfrontend/res/iconSuddenDeath.png has changed diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/res/iconSuddenDeath@2x.png Binary file QTfrontend/res/iconSuddenDeath@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/res/iconTime@2x.png Binary file QTfrontend/res/iconTime@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/team.cpp --- a/QTfrontend/team.cpp Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/team.cpp Sun Sep 25 18:24:01 2011 +0200 @@ -26,111 +26,110 @@ #include "team.h" #include "hwform.h" #include "pageeditteam.h" -#include "hwconsts.h" #include "hats.h" HWTeam::HWTeam(const QString & teamname) : - difficulty(0), - numHedgehogs(4), + m_difficulty(0), + m_numHedgehogs(4), m_isNetTeam(false) { - TeamName = teamname; - OldTeamName = TeamName; - for (int i = 0; i < 8; i++) + m_name = teamname; + OldTeamName = m_name; + for (int i = 0; i < HEDGEHOGS_PER_TEAM; i++) { - Hedgehogs[i].Name = (QLineEdit::tr("hedgehog %1").arg(i+1)); - Hedgehogs[i].Hat = "NoHat"; + m_hedgehogs[i].Name = (QLineEdit::tr("hedgehog %1").arg(i+1)); + m_hedgehogs[i].Hat = "NoHat"; } - Grave = "Statue"; - Fort = "Plane"; - Voicepack = "Default"; - Flag = "hedgewars"; + m_grave = "Statue"; + m_fort = "Plane"; + m_voicepack = "Default"; + m_flag = "hedgewars"; for(int i = 0; i < BINDS_NUMBER; i++) { binds[i].action = cbinds[i].action; binds[i].strbind = cbinds[i].strbind; } - Rounds = 0; - Wins = 0; - CampaignProgress = 0; + m_rounds = 0; + m_wins = 0; + m_campaignProgress = 0; } HWTeam::HWTeam(const QStringList& strLst) : - numHedgehogs(4), + m_numHedgehogs(4), m_isNetTeam(true) { // net teams are configured from QStringList if(strLst.size() != 23) throw HWTeamConstructException(); - TeamName = strLst[0]; - Grave = strLst[1]; - Fort = strLst[2]; - Voicepack = strLst[3]; - Flag = strLst[4]; - Owner = strLst[5]; - difficulty = strLst[6].toUInt(); - for(int i = 0; i < 8; i++) + m_name = strLst[0]; + m_grave = strLst[1]; + m_fort = strLst[2]; + m_voicepack = strLst[3]; + m_flag = strLst[4]; + m_owner = strLst[5]; + m_difficulty = strLst[6].toUInt(); + for(int i = 0; i < HEDGEHOGS_PER_TEAM; i++) { - Hedgehogs[i].Name=strLst[i * 2 + 7]; - Hedgehogs[i].Hat=strLst[i * 2 + 8]; + m_hedgehogs[i].Name=strLst[i * 2 + 7]; + m_hedgehogs[i].Hat=strLst[i * 2 + 8]; // Somehow claymore managed an empty hat. Until we figure out how, this should avoid a repeat // Checking net teams is probably pointless, but can't hurt. - if (Hedgehogs[i].Hat.isEmpty()) Hedgehogs[i].Hat = "NoHat"; + if (m_hedgehogs[i].Hat.isEmpty()) m_hedgehogs[i].Hat = "NoHat"; } - Rounds = 0; - Wins = 0; - CampaignProgress = 0; + m_rounds = 0; + m_wins = 0; + m_campaignProgress = 0; } HWTeam::HWTeam() : - difficulty(0), - numHedgehogs(4), + m_difficulty(0), + m_numHedgehogs(4), m_isNetTeam(false) { - TeamName = QString("Team"); - for (int i = 0; i < 8; i++) + m_name = QString("Team"); + for (int i = 0; i < HEDGEHOGS_PER_TEAM; i++) { - Hedgehogs[i].Name.sprintf("hedgehog %d", i); - Hedgehogs[i].Hat = "NoHat"; + m_hedgehogs[i].Name.sprintf("hedgehog %d", i); + m_hedgehogs[i].Hat = "NoHat"; } - Grave = QString("Simple"); // default - Fort = QString("Island"); // default - Voicepack = "Default"; - Flag = "hedgewars"; + m_grave = QString("Simple"); // default + m_fort = QString("Island"); // default + m_voicepack = "Default"; + m_flag = "hedgewars"; for(int i = 0; i < BINDS_NUMBER; i++) { binds[i].action = cbinds[i].action; binds[i].strbind = cbinds[i].strbind; } - Rounds = 0; - Wins = 0; - CampaignProgress = 0; + m_rounds = 0; + m_wins = 0; + m_campaignProgress = 0; } -bool HWTeam::LoadFromFile() +bool HWTeam::loadFromFile() { - QSettings teamfile(cfgdir->absolutePath() + "/Teams/" + TeamName + ".hwt", QSettings::IniFormat, 0); + QSettings teamfile(cfgdir->absolutePath() + "/Teams/" + m_name + ".hwt", QSettings::IniFormat, 0); teamfile.setIniCodec("UTF-8"); - TeamName = teamfile.value("Team/Name", TeamName).toString(); - Grave = teamfile.value("Team/Grave", "Statue").toString(); - Fort = teamfile.value("Team/Fort", "Plane").toString(); - Voicepack = teamfile.value("Team/Voicepack", "Default").toString(); - Flag = teamfile.value("Team/Flag", "hedgewars").toString(); - difficulty = teamfile.value("Team/Difficulty", 0).toInt(); - Rounds = teamfile.value("Team/Rounds", 0).toInt(); - Wins = teamfile.value("Team/Wins", 0).toInt(); - CampaignProgress = teamfile.value("Team/CampaignProgress", 0).toInt(); - for(int i = 0; i < 8; i++) + m_name = teamfile.value("Team/Name", m_name).toString(); + m_grave = teamfile.value("Team/Grave", "Statue").toString(); + m_fort = teamfile.value("Team/Fort", "Plane").toString(); + m_voicepack = teamfile.value("Team/Voicepack", "Default").toString(); + m_flag = teamfile.value("Team/Flag", "hedgewars").toString(); + m_difficulty = teamfile.value("Team/Difficulty", 0).toInt(); + m_rounds = teamfile.value("Team/Rounds", 0).toInt(); + m_wins = teamfile.value("Team/Wins", 0).toInt(); + m_campaignProgress = teamfile.value("Team/CampaignProgress", 0).toInt(); + for(int i = 0; i < HEDGEHOGS_PER_TEAM; i++) { QString hh = QString("Hedgehog%1/").arg(i); - Hedgehogs[i].Name = teamfile.value(hh + "Name", QString("hedgehog %1").arg(i+1)).toString(); - Hedgehogs[i].Hat = teamfile.value(hh + "Hat", "NoHat").toString(); - Hedgehogs[i].Rounds = teamfile.value(hh + "Rounds", 0).toInt(); - Hedgehogs[i].Kills = teamfile.value(hh + "Kills", 0).toInt(); - Hedgehogs[i].Deaths = teamfile.value(hh + "Deaths", 0).toInt(); - Hedgehogs[i].Suicides = teamfile.value(hh + "Suicides", 0).toInt(); + m_hedgehogs[i].Name = teamfile.value(hh + "Name", QString("hedgehog %1").arg(i+1)).toString(); + m_hedgehogs[i].Hat = teamfile.value(hh + "Hat", "NoHat").toString(); + m_hedgehogs[i].Rounds = teamfile.value(hh + "Rounds", 0).toInt(); + m_hedgehogs[i].Kills = teamfile.value(hh + "Kills", 0).toInt(); + m_hedgehogs[i].Deaths = teamfile.value(hh + "Deaths", 0).toInt(); + m_hedgehogs[i].Suicides = teamfile.value(hh + "Suicides", 0).toInt(); } for(int i = 0; i < BINDS_NUMBER; i++) binds[i].strbind = teamfile.value(QString("Binds/%1").arg(binds[i].action), cbinds[i].strbind).toString(); @@ -142,49 +141,49 @@ return true; } -bool HWTeam::FileExists() +bool HWTeam::fileExists() { - QFile f(cfgdir->absolutePath() + "/Teams/" + TeamName + ".hwt"); + QFile f(cfgdir->absolutePath() + "/Teams/" + m_name + ".hwt"); return f.exists(); } -bool HWTeam::DeleteFile() +bool HWTeam::deleteFile() { if(m_isNetTeam) return false; - QFile cfgfile(cfgdir->absolutePath() + "/Teams/" + TeamName + ".hwt"); + QFile cfgfile(cfgdir->absolutePath() + "/Teams/" + m_name + ".hwt"); cfgfile.remove(); return true; } -bool HWTeam::SaveToFile() +bool HWTeam::saveToFile() { - if (OldTeamName != TeamName) + if (OldTeamName != m_name) { QFile cfgfile(cfgdir->absolutePath() + "/Teams/" + OldTeamName + ".hwt"); cfgfile.remove(); - OldTeamName = TeamName; + OldTeamName = m_name; } - QSettings teamfile(cfgdir->absolutePath() + "/Teams/" + TeamName + ".hwt", QSettings::IniFormat, 0); + QSettings teamfile(cfgdir->absolutePath() + "/Teams/" + m_name + ".hwt", QSettings::IniFormat, 0); teamfile.setIniCodec("UTF-8"); - teamfile.setValue("Team/Name", TeamName); - teamfile.setValue("Team/Grave", Grave); - teamfile.setValue("Team/Fort", Fort); - teamfile.setValue("Team/Voicepack", Voicepack); - teamfile.setValue("Team/Flag", Flag); - teamfile.setValue("Team/Difficulty", difficulty); - teamfile.setValue("Team/Rounds", Rounds); - teamfile.setValue("Team/Wins", Wins); - teamfile.setValue("Team/CampaignProgress", CampaignProgress); - for(int i = 0; i < 8; i++) + teamfile.setValue("Team/Name", m_name); + teamfile.setValue("Team/Grave", m_grave); + teamfile.setValue("Team/Fort", m_fort); + teamfile.setValue("Team/Voicepack", m_voicepack); + teamfile.setValue("Team/Flag", m_flag); + teamfile.setValue("Team/Difficulty", m_difficulty); + teamfile.setValue("Team/Rounds", m_rounds); + teamfile.setValue("Team/Wins", m_wins); + teamfile.setValue("Team/CampaignProgress", m_campaignProgress); + for(int i = 0; i < HEDGEHOGS_PER_TEAM; i++) { QString hh = QString("Hedgehog%1/").arg(i); - teamfile.setValue(hh + "Name", Hedgehogs[i].Name); - teamfile.setValue(hh + "Hat", Hedgehogs[i].Hat); - teamfile.setValue(hh + "Rounds", Hedgehogs[i].Rounds); - teamfile.setValue(hh + "Kills", Hedgehogs[i].Kills); - teamfile.setValue(hh + "Deaths", Hedgehogs[i].Deaths); - teamfile.setValue(hh + "Suicides", Hedgehogs[i].Suicides); + teamfile.setValue(hh + "Name", m_hedgehogs[i].Name); + teamfile.setValue(hh + "Hat", m_hedgehogs[i].Hat); + teamfile.setValue(hh + "Rounds", m_hedgehogs[i].Rounds); + teamfile.setValue(hh + "Kills", m_hedgehogs[i].Kills); + teamfile.setValue(hh + "Deaths", m_hedgehogs[i].Deaths); + teamfile.setValue(hh + "Suicides", m_hedgehogs[i].Suicides); } for(int i = 0; i < BINDS_NUMBER; i++) teamfile.setValue(QString("Binds/%1").arg(binds[i].action), binds[i].strbind); @@ -198,21 +197,21 @@ void HWTeam::SetToPage(HWForm * hwform) { - hwform->ui.pageEditTeam->TeamNameEdit->setText(TeamName); - hwform->ui.pageEditTeam->CBTeamLvl->setCurrentIndex(difficulty); - for(int i = 0; i < 8; i++) + hwform->ui.pageEditTeam->TeamNameEdit->setText(m_name); + hwform->ui.pageEditTeam->CBTeamLvl->setCurrentIndex(m_difficulty); + for(int i = 0; i < HEDGEHOGS_PER_TEAM; i++) { - hwform->ui.pageEditTeam->HHNameEdit[i]->setText(Hedgehogs[i].Name); - if (Hedgehogs[i].Hat.startsWith("Reserved")) - hwform->ui.pageEditTeam->HHHats[i]->setCurrentIndex(hwform->ui.pageEditTeam->HHHats[i]->findData("Reserved "+Hedgehogs[i].Hat.remove(0,40), Qt::DisplayRole)); + hwform->ui.pageEditTeam->HHNameEdit[i]->setText(m_hedgehogs[i].Name); + if (m_hedgehogs[i].Hat.startsWith("Reserved")) + hwform->ui.pageEditTeam->HHHats[i]->setCurrentIndex(hwform->ui.pageEditTeam->HHHats[i]->findData("Reserved "+m_hedgehogs[i].Hat.remove(0,40), Qt::DisplayRole)); else - hwform->ui.pageEditTeam->HHHats[i]->setCurrentIndex(hwform->ui.pageEditTeam->HHHats[i]->findData(Hedgehogs[i].Hat, Qt::DisplayRole)); + hwform->ui.pageEditTeam->HHHats[i]->setCurrentIndex(hwform->ui.pageEditTeam->HHHats[i]->findData(m_hedgehogs[i].Hat, Qt::DisplayRole)); } - hwform->ui.pageEditTeam->CBGrave->setCurrentIndex(hwform->ui.pageEditTeam->CBGrave->findText(Grave)); - hwform->ui.pageEditTeam->CBFlag->setCurrentIndex(hwform->ui.pageEditTeam->CBFlag->findData(Flag)); + hwform->ui.pageEditTeam->CBGrave->setCurrentIndex(hwform->ui.pageEditTeam->CBGrave->findText(m_grave)); + hwform->ui.pageEditTeam->CBFlag->setCurrentIndex(hwform->ui.pageEditTeam->CBFlag->findData(m_flag)); - hwform->ui.pageEditTeam->CBFort->setCurrentIndex(hwform->ui.pageEditTeam->CBFort->findText(Fort)); - hwform->ui.pageEditTeam->CBVoicepack->setCurrentIndex(hwform->ui.pageEditTeam->CBVoicepack->findText(Voicepack)); + hwform->ui.pageEditTeam->CBFort->setCurrentIndex(hwform->ui.pageEditTeam->CBFort->findText(m_fort)); + hwform->ui.pageEditTeam->CBVoicepack->setCurrentIndex(hwform->ui.pageEditTeam->CBVoicepack->findText(m_voicepack)); //hwform->ui.pageEditTeam->CBFort_activated(Fort); for(int i = 0; i < BINDS_NUMBER; i++) @@ -223,55 +222,55 @@ void HWTeam::GetFromPage(HWForm * hwform) { - TeamName = hwform->ui.pageEditTeam->TeamNameEdit->text(); - difficulty = hwform->ui.pageEditTeam->CBTeamLvl->currentIndex(); - for(int i = 0; i < 8; i++) + m_name = hwform->ui.pageEditTeam->TeamNameEdit->text(); + m_difficulty = hwform->ui.pageEditTeam->CBTeamLvl->currentIndex(); + for(int i = 0; i < HEDGEHOGS_PER_TEAM; i++) { - Hedgehogs[i].Name = hwform->ui.pageEditTeam->HHNameEdit[i]->text(); + m_hedgehogs[i].Name = hwform->ui.pageEditTeam->HHNameEdit[i]->text(); if (hwform->ui.pageEditTeam->HHHats[i]->currentText().startsWith("Reserved")) - Hedgehogs[i].Hat = "Reserved"+playerHash+hwform->ui.pageEditTeam->HHHats[i]->currentText().remove(0,9); + m_hedgehogs[i].Hat = "Reserved"+playerHash+hwform->ui.pageEditTeam->HHHats[i]->currentText().remove(0,9); else - Hedgehogs[i].Hat = hwform->ui.pageEditTeam->HHHats[i]->currentText(); + m_hedgehogs[i].Hat = hwform->ui.pageEditTeam->HHHats[i]->currentText(); } - Grave = hwform->ui.pageEditTeam->CBGrave->currentText(); - Fort = hwform->ui.pageEditTeam->CBFort->currentText(); - Voicepack = hwform->ui.pageEditTeam->CBVoicepack->currentText(); - Flag = hwform->ui.pageEditTeam->CBFlag->itemData(hwform->ui.pageEditTeam->CBFlag->currentIndex()).toString(); + m_grave = hwform->ui.pageEditTeam->CBGrave->currentText(); + m_fort = hwform->ui.pageEditTeam->CBFort->currentText(); + m_voicepack = hwform->ui.pageEditTeam->CBVoicepack->currentText(); + m_flag = hwform->ui.pageEditTeam->CBFlag->itemData(hwform->ui.pageEditTeam->CBFlag->currentIndex()).toString(); for(int i = 0; i < BINDS_NUMBER; i++) { binds[i].strbind = hwform->ui.pageEditTeam->CBBind[i]->itemData(hwform->ui.pageEditTeam->CBBind[i]->currentIndex()).toString(); } } -QStringList HWTeam::TeamGameConfig(quint32 InitHealth) const +QStringList HWTeam::teamGameConfig(quint32 InitHealth) const { QStringList sl; if (m_isNetTeam) { - sl.push_back(QString("eaddteam %3 %1 %2").arg(teamColor.rgb() & 0xffffff).arg(TeamName).arg(QString(QCryptographicHash::hash(Owner.toLatin1(), QCryptographicHash::Md5).toHex()))); + sl.push_back(QString("eaddteam %3 %1 %2").arg(m_color.rgb() & 0xffffff).arg(m_name).arg(QString(QCryptographicHash::hash(m_owner.toLatin1(), QCryptographicHash::Md5).toHex()))); sl.push_back("erdriven"); } - else sl.push_back(QString("eaddteam %3 %1 %2").arg(teamColor.rgb() & 0xffffff).arg(TeamName).arg(playerHash)); + else sl.push_back(QString("eaddteam %3 %1 %2").arg(m_color.rgb() & 0xffffff).arg(m_name).arg(playerHash)); - sl.push_back(QString("egrave " + Grave)); - sl.push_back(QString("efort " + Fort)); - sl.push_back(QString("evoicepack " + Voicepack)); - sl.push_back(QString("eflag " + Flag)); + sl.push_back(QString("egrave " + m_grave)); + sl.push_back(QString("efort " + m_fort)); + sl.push_back(QString("evoicepack " + m_voicepack)); + sl.push_back(QString("eflag " + m_flag)); if (!m_isNetTeam) for(int i = 0; i < BINDS_NUMBER; i++) if(!binds[i].strbind.isEmpty()) sl.push_back(QString("ebind " + binds[i].strbind + " " + binds[i].action)); - for (int t = 0; t < numHedgehogs; t++) + for (int t = 0; t < m_numHedgehogs; t++) { sl.push_back(QString("eaddhh %1 %2 %3") - .arg(QString::number(difficulty), + .arg(QString::number(m_difficulty), QString::number(InitHealth), - Hedgehogs[t].Name)); + m_hedgehogs[t].Name)); sl.push_back(QString("ehat %1") - .arg(Hedgehogs[t].Hat)); + .arg(m_hedgehogs[t].Hat)); } return sl; } @@ -283,11 +282,67 @@ bool HWTeam::operator==(const HWTeam& t1) const { - return TeamName==t1.TeamName; + return m_name==t1.m_name; } bool HWTeam::operator<(const HWTeam& t1) const { - return TeamName #include "binds.h" #include "achievements.h" +#include "hwconsts.h" class HWForm; class GameUIConfig; @@ -32,6 +33,7 @@ { }; +// structure for customization and statistics of a single hedgehog struct HWHog { QString Name; @@ -39,45 +41,90 @@ int Rounds, Kills, Deaths, Suicides; }; +// class representing a team class HWTeam { public: + + // constructors HWTeam(const QString & teamname); HWTeam(const QStringList& strLst); HWTeam(); - bool isNetTeam() const; + // file operations + bool loadFromFile(); + bool deleteFile(); + bool saveToFile(); + bool fileExists(); + + // attribute getters + unsigned int campaignProgress() const; + QColor color() const; + unsigned int difficulty() const; + QString flag() const; + QString fort() const; + QString grave() const; + const HWHog & hedgehog(unsigned int idx) const; + bool isNetTeam() const; + QString name() const; + unsigned char numHedgehogs() const; + QString owner() const; + QString voicepack() const; - QString TeamName; - QString Grave; - QString Fort; - QString Flag; - QString Voicepack; - QString Owner; - int Rounds; - int Wins; - int CampaignProgress; - HWHog Hedgehogs[8]; - unsigned int AchievementProgress[MAX_ACHIEVEMENTS]; - unsigned int difficulty; + // attribute setters + void setColor(const QColor & color); + void setDifficulty(unsigned int level); + void setFlag(const QString & flag); + void setFort(const QString & fort); + void setGrave(const QString & grave); + void setHedgehog(unsigned int idx, const HWHog & hh); + void setName(const QString & name); + void setNumHedgehogs(unsigned char num); + void setVoicepack(const QString & voicepack); + + // increments for statistical info + void incRounds(); + void incWins(); + + // pages... wait... wth is THIS doing in this class? FIXME!!!! + void SetToPage(HWForm * hwform); + void GetFromPage(HWForm * hwform); + + // convert team info into strings for further computation + QStringList teamGameConfig(quint32 InitHealth) const; + + // comparison operators + bool operator==(const HWTeam& t1) const; + bool operator<(const HWTeam& t1) const; + + + + private: + + QString OldTeamName; + + // class members that contain the general team info and settings + QString m_name; + QString m_grave; + QString m_fort; + QString m_flag; + QString m_voicepack; + HWHog m_hedgehogs[HEDGEHOGS_PER_TEAM]; + unsigned int m_difficulty; BindAction binds[BINDS_NUMBER]; - unsigned char numHedgehogs; - QColor teamColor; + // class members that contain info for the current game setup + unsigned char m_numHedgehogs; + QColor m_color; + bool m_isNetTeam; + QString m_owner; - bool LoadFromFile(); - bool DeleteFile(); - bool SaveToFile(); - bool FileExists(); - void SetToPage(HWForm * hwform); - void GetFromPage(HWForm * hwform); - QStringList TeamGameConfig(quint32 InitHealth) const; + // class members that contain statistics, etc. + unsigned int m_campaignProgress; + unsigned int m_rounds; + unsigned int m_wins; + unsigned int AchievementProgress[MAX_ACHIEVEMENTS]; - bool operator==(const HWTeam& t1) const; - bool operator<(const HWTeam& t1) const; - private: - bool m_isNetTeam; - QString OldTeamName; }; diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/teamselect.cpp --- a/QTfrontend/teamselect.cpp Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/teamselect.cpp Sun Sep 25 18:24:01 2011 +0200 @@ -66,10 +66,10 @@ QList::iterator itPlay=std::find(curPlayingTeams.begin(), curPlayingTeams.end(), team); if(itPlay==curPlayingTeams.end()) { - qWarning() << QString("hhNumChanged: team '%1' not found").arg(team.TeamName); + qWarning() << QString("hhNumChanged: team '%1' not found").arg(team.name()); return; } - itPlay->numHedgehogs=team.numHedgehogs; + itPlay->setNumHedgehogs(team.numHedgehogs()); emit hhogsNumChanged(team); } @@ -78,10 +78,10 @@ QList::iterator itPlay=std::find(curPlayingTeams.begin(), curPlayingTeams.end(), team); if(itPlay==curPlayingTeams.end()) { - qWarning() << QString("proxyTeamColorChanged: team '%1' not found").arg(team.TeamName); + qWarning() << QString("proxyTeamColorChanged: team '%1' not found").arg(team.name()); return; } - itPlay->teamColor=team.teamColor; + itPlay->setColor(team.color()); emit teamColorChanged(team); } @@ -90,10 +90,10 @@ QList::iterator itPlay=std::find(curPlayingTeams.begin(), curPlayingTeams.end(), team); if(itPlay==curPlayingTeams.end()) { - qWarning() << QString("changeHHNum: team '%1' not found").arg(team.TeamName); + qWarning() << QString("changeHHNum: team '%1' not found").arg(team.name()); return; } - itPlay->numHedgehogs=team.numHedgehogs; + itPlay->setNumHedgehogs(team.numHedgehogs()); framePlaying->setHHNum(team); } @@ -103,10 +103,10 @@ QList::iterator itPlay=std::find(curPlayingTeams.begin(), curPlayingTeams.end(), team); if(itPlay==curPlayingTeams.end()) { - qWarning() << QString("changeTeamColor: team '%1' not found").arg(team.TeamName); + qWarning() << QString("changeTeamColor: team '%1' not found").arg(team.name()); return; } - itPlay->teamColor=team.teamColor; + itPlay->setColor(team.color()); framePlaying->setTeamColor(team); } @@ -118,7 +118,7 @@ QList::iterator itPlay=std::find(curPlayingTeams.begin(), curPlayingTeams.end(), team); if(itPlay==curPlayingTeams.end()) { - qWarning() << QString("removeNetTeam: team '%1' not found").arg(team.TeamName); + qWarning() << QString("removeNetTeam: team '%1' not found").arg(team.name()); break; } if(itPlay->isNetTeam()) { @@ -159,7 +159,7 @@ if(framePlaying->isFullTeams()) return; // dont playing team => playing team=*itDontPlay; // for net team info saving in framePlaying (we have only name with netID from network) - itDontPlay->teamColor=framePlaying->getNextColor(); + itDontPlay->setColor(framePlaying->getNextColor()); curPlayingTeams.push_back(*itDontPlay); if(!m_acceptOuter) emit teamWillPlay(*itDontPlay); m_curNotPlayingTeams.erase(itDontPlay); @@ -276,6 +276,6 @@ void TeamSelWidget::pre_changeTeamStatus(HWTeam team) { - team.teamColor=framePlaying->getNextColor(); + team.setColor(framePlaying->getNextColor()); emit acceptRequested(team); } diff -r 5b2b86a37089 -r a28be05b20bc QTfrontend/teamselhelper.cpp --- a/QTfrontend/teamselhelper.cpp Sun Sep 25 18:22:12 2011 +0200 +++ b/QTfrontend/teamselhelper.cpp Sun Sep 25 18:24:01 2011 +0200 @@ -46,12 +46,12 @@ this->setMaximumHeight(38); this->setMinimumHeight(38); QIcon difficultyIcon=team.isNetTeam() ? - QIcon(QString(":/res/botlevels/net%1.png").arg(m_team.difficulty)) - : QIcon(QString(":/res/botlevels/%1.png").arg(m_team.difficulty)); + QIcon(QString(":/res/botlevels/net%1.png").arg(m_team.difficulty())) + : QIcon(QString(":/res/botlevels/%1.png").arg(m_team.difficulty())); - butt = new QPushButton(difficultyIcon, team.TeamName.replace("&","&&"), this); + butt = new QPushButton(difficultyIcon, team.name().replace("&","&&"), this); butt->setFlat(true); - butt->setToolTip(team.Owner); + butt->setToolTip(team.owner()); mainLayout.addWidget(butt); butt->setStyleSheet("QPushButton{" "icon-size: 48px;" @@ -76,7 +76,7 @@ phhoger = new CHedgehogerWidget(QImage(":/res/hh25x25.png"), QImage(":/res/hh25x25grey.png"), this); connect(phhoger, SIGNAL(hedgehogsNumChanged()), this, SLOT(hhNumChanged())); - phhoger->setHHNum(team.numHedgehogs); + phhoger->setHHNum(team.numHedgehogs()); mainLayout.addWidget(phhoger); } else { } @@ -102,7 +102,7 @@ void TeamShowWidget::hhNumChanged() { - m_team.numHedgehogs=phhoger->getHedgehogsNum(); + m_team.setNumHedgehogs(phhoger->getHedgehogsNum()); emit hhNmChanged(m_team); } @@ -144,7 +144,7 @@ "border-radius: 2px;" "}").arg(pOurFrameTeams->currentColor->name())); - m_team.teamColor=color; + m_team.setColor(color); emit teamColorChanged(m_team); } diff -r 5b2b86a37089 -r a28be05b20bc README --- a/README Sun Sep 25 18:22:12 2011 +0200 +++ b/README Sun Sep 25 18:24:01 2011 +0200 @@ -3,5 +3,5 @@ Images and sounds are distributed under the terms of the GNU FDL licence. Source: -Copyright 2004-2010 Andrey Korotaev +Copyright 2004-2011 Andrey Korotaev Portions copyright 2006-2008 Igor Ulyanov aka Displacer diff -r 5b2b86a37089 -r a28be05b20bc gameServer/Actions.hs --- a/gameServer/Actions.hs Sun Sep 25 18:22:12 2011 +0200 +++ b/gameServer/Actions.hs Sun Sep 25 18:24:01 2011 +0200 @@ -1,4 +1,4 @@ -{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE CPP, OverloadedStrings #-} module Actions where import Control.Concurrent @@ -17,10 +17,10 @@ import Data.Unique import Control.Arrow import Control.Exception -import OfficialServer.GameReplayStore import System.Process import Network.Socket ----------------------------- +import OfficialServer.GameReplayStore import CoreTypes import Utils import ClientIO @@ -206,7 +206,7 @@ (Just ci) <- gets clientIndex ri <- clientRoomA rnc <- gets roomsClients - (gameProgress, playersNum) <- io $ room'sM rnc (gameinprogress &&& playersIn) ri + (gameProgress, playersNum) <- io $ room'sM rnc ((isJust . gameInfo) &&& playersIn) ri ready <- client's isReady master <- client's isMaster -- client <- client's id @@ -298,7 +298,7 @@ processAction (RemoveTeam teamName) = do rnc <- gets roomsClients ri <- clientRoomA - inGame <- io $ room'sM rnc gameinprogress ri + inGame <- io $ room'sM rnc (isJust . gameInfo) ri chans <- othersChans if not $ inGame then mapM_ processAction [ @@ -310,8 +310,10 @@ AnswerClients chans ["EM", rmTeamMsg], ModifyRoom (\r -> r{ teams = Prelude.filter (\t -> teamName /= teamname t) $ teams r, - leftTeams = teamName : leftTeams r, - roundMsgs = roundMsgs r Seq.|> rmTeamMsg + gameInfo = liftM (\g -> g{ + leftTeams = teamName : leftTeams g, + roundMsgs = roundMsgs g Seq.|> rmTeamMsg + }) $ gameInfo r }) ] where @@ -505,9 +507,13 @@ return () processAction $ ModifyServerInfo (\s -> s{shutdownPending = True}) +#if defined(OFFICIAL_SERVER) processAction SaveReplay = do ri <- clientRoomA rnc <- gets roomsClients io $ do r <- room'sM rnc id ri saveReplay r +#else +processAction SaveReplay = return () +#endif diff -r 5b2b86a37089 -r a28be05b20bc gameServer/ClientIO.hs --- a/gameServer/ClientIO.hs Sun Sep 25 18:22:12 2011 +0200 +++ b/gameServer/ClientIO.hs Sun Sep 25 18:24:01 2011 +0200 @@ -58,6 +58,10 @@ clientSendLoop :: Socket -> ThreadId -> Chan [B.ByteString] -> ClientIndex -> IO () clientSendLoop s tId chan ci = do answer <- readChan chan + + when (isQuit answer) $ + killReciever . B.unpack $ quitMessage answer + Exception.handle (\(e :: Exception.IOException) -> unless (isQuit answer) . killReciever $ show e) $ sendAll s $ B.unlines answer `B.snoc` '\n' @@ -65,7 +69,6 @@ if isQuit answer then do Exception.handle (\(_ :: Exception.IOException) -> putStrLn "error on sClose") $ sClose s - killReciever . B.unpack $ quitMessage answer else clientSendLoop s tId chan ci diff -r 5b2b86a37089 -r a28be05b20bc gameServer/CoreTypes.hs --- a/gameServer/CoreTypes.hs Sun Sep 25 18:22:12 2011 +0200 +++ b/gameServer/CoreTypes.hs Sun Sep 25 18:24:01 2011 +0200 @@ -62,6 +62,22 @@ hedgehogs :: [HedgehogInfo] } deriving (Show, Read) + +data GameInfo = + GameInfo + { + roundMsgs :: Seq B.ByteString, + leftTeams :: [B.ByteString], + teamsAtStart :: [TeamInfo], + allPlayersHaveRegisteredAccounts :: Bool + } + +newGameInfo :: Bool -> GameInfo +newGameInfo = + GameInfo + Data.Sequence.empty + [] + [] data RoomInfo = RoomInfo @@ -71,14 +87,11 @@ password :: B.ByteString, roomProto :: Word16, teams :: [TeamInfo], - gameinprogress :: Bool, + gameInfo :: Maybe GameInfo, playersIn :: !Int, readyPlayers :: !Int, isRestrictedJoins :: Bool, isRestrictedTeams :: Bool, - roundMsgs :: Seq B.ByteString, - leftTeams :: [B.ByteString], - teamsAtStart :: [TeamInfo], mapParams :: Map.Map B.ByteString B.ByteString, params :: Map.Map B.ByteString [B.ByteString] } @@ -91,14 +104,11 @@ "" 0 [] - False + Nothing 0 0 False False - Data.Sequence.empty - [] - [] ( Map.fromList $ Prelude.zipWith (,) ["MAP", "MAPGEN", "MAZE_SIZE", "SEED", "TEMPLATE"] diff -r 5b2b86a37089 -r a28be05b20bc gameServer/HWProtoCore.hs --- a/gameServer/HWProtoCore.hs Sun Sep 25 18:22:12 2011 +0200 +++ b/gameServer/HWProtoCore.hs Sun Sep 25 18:24:01 2011 +0200 @@ -52,7 +52,7 @@ let roomMasterSign = if isMaster cl then "@" else "" let adminSign = if isAdministrator cl then "@" else "" let roomInfo = if roomId /= lobbyId then B.concat [roomMasterSign, "room ", name clRoom] else adminSign `B.append` "lobby" - let roomStatus = if gameinprogress clRoom then + let roomStatus = if isJust $ gameInfo clRoom then if teamsInGame cl > 0 then "(playing)" else "(spectating)" else "" diff -r 5b2b86a37089 -r a28be05b20bc gameServer/HWProtoInRoomState.hs --- a/gameServer/HWProtoInRoomState.hs Sun Sep 25 18:22:12 2011 +0200 +++ b/gameServer/HWProtoInRoomState.hs Sun Sep 25 18:24:01 2011 +0200 @@ -52,13 +52,13 @@ clChan <- thisClientChans othChans <- roomOthersChans return $ - if not . null . drop 5 $ teams rm then + if not . null . drop (maxTeams rm - 1) $ teams rm then [Warning "too many teams"] else if canAddNumber rm <= 0 then [Warning "too many hedgehogs"] else if isJust $ findTeam rm then [Warning "There's already a team with same name in the list"] - else if gameinprogress rm then + else if isJust $ gameInfo rm then [Warning "round in progress"] else if isRestrictedTeams rm then [Warning "restricted"] @@ -78,6 +78,10 @@ hhsList [_] = error "Hedgehogs list with odd elements number" hhsList (n:h:hhs) = HedgehogInfo n h : hhsList hhs newTeamHHNum r = min 4 (canAddNumber r) + maxTeams r + | roomProto r < 38 = 6 + | otherwise = 8 + handleCmd_inRoom ["REMOVE_TEAM", tName] = do (ci, _) <- ask @@ -162,19 +166,20 @@ ] handleCmd_inRoom ["START_GAME"] = do + (ci, rnc) <- ask cl <- thisClient rm <- thisRoom chans <- roomClientsChans + + let allPlayersRegistered = all ((<) 0 . B.length . webPassword . client rnc . teamownerId) $ teams rm - if isMaster cl && playersIn rm == readyPlayers rm && not (gameinprogress rm) then + if isMaster cl && playersIn rm == readyPlayers rm && not (isJust $ gameInfo rm) then if enoughClans rm then return [ ModifyRoom (\r -> r{ - gameinprogress = True, - roundMsgs = empty, - leftTeams = [], - teamsAtStart = teams r} + gameInfo = Just $ newGameInfo allPlayersRegistered + } ), AnswerClients chans ["RUN_GAME"] ] @@ -191,35 +196,35 @@ rm <- thisRoom chans <- roomOthersChans - if teamsInGame cl > 0 && gameinprogress rm && isLegal then - return $ AnswerClients chans ["EM", msg] : [ModifyRoom (\r -> r{roundMsgs = roundMsgs r |> msg}) | not isKeepAlive] + if teamsInGame cl > 0 && (isJust $ gameInfo rm) && isLegal then + return $ AnswerClients chans ["EM", msg] : [ModifyRoom (\r -> r{gameInfo = liftM (\g -> g{roundMsgs = roundMsgs g |> msg}) $ gameInfo r}) | not isKeepAlive] else return [] where (isLegal, isKeepAlive) = checkNetCmd msg -handleCmd_inRoom ["ROUNDFINISHED", _] = do +handleCmd_inRoom ["ROUNDFINISHED", correctly] = do cl <- thisClient rm <- thisRoom chans <- roomClientsChans - if isMaster cl && gameinprogress rm then - return $ - ModifyRoom + if isMaster cl && (isJust $ gameInfo rm) then + return $ + SaveReplay + : ModifyRoom (\r -> r{ - gameinprogress = False, - readyPlayers = 0, - roundMsgs = empty, - leftTeams = [], - teamsAtStart = []} + gameInfo = Nothing, + readyPlayers = 0 + } ) : UnreadyRoomClients : answerRemovedTeams chans rm else return [] where - answerRemovedTeams chans = map (\t -> AnswerClients chans ["REMOVE_TEAM", t]) . leftTeams + answerRemovedTeams chans = map (\t -> AnswerClients chans ["REMOVE_TEAM", t]) . leftTeams . fromJust . gameInfo + isCorrect = correctly == "1" -- compatibility with clients with protocol < 38 handleCmd_inRoom ["ROUNDFINISHED"] = diff -r 5b2b86a37089 -r a28be05b20bc gameServer/HWProtoLobbyState.hs --- a/gameServer/HWProtoLobbyState.hs Sun Sep 25 18:22:12 2011 +0200 +++ b/gameServer/HWProtoLobbyState.hs Sun Sep 25 18:24:01 2011 +0200 @@ -34,7 +34,7 @@ return [AnswerClients [sendChan cl] ("ROOMS" : roomsInfoList rooms)] where roomInfo irnc r = [ - showB $ gameinprogress r, + showB $ isJust $ gameInfo r, name r, showB $ playersIn r, showB $ length $ teams r, @@ -75,11 +75,12 @@ let maybeRI = find (\ri -> roomName == name (irnc `room` ri)) ris let jRI = fromJust maybeRI let jRoom = irnc `room` jRI + let sameProto = clientProto cl == roomProto jRoom let jRoomClients = map (client irnc) $ roomClients irnc jRI let nicks = map nick jRoomClients let chans = map sendChan (cl : jRoomClients) return $ - if isNothing maybeRI then + if isNothing maybeRI || not sameProto then [Warning "No such rooms"] else if isRestrictedJoins jRoom then [Warning "Joining restricted"] @@ -116,13 +117,13 @@ : ("SCHEME", pr Map.! "SCHEME") : (filter (\(p, _) -> p /= "SCHEME") $ Map.toList pr) - answerTeams cl jRoom = let f = if gameinprogress jRoom then teamsAtStart else teams in answerAllTeams cl $ f jRoom + answerTeams cl jRoom = let f = if isJust $ gameInfo jRoom then teamsAtStart . fromJust . gameInfo else teams in answerAllTeams cl $ f jRoom - watchRound cl jRoom = if not $ gameinprogress jRoom then + watchRound cl jRoom = if isNothing $ gameInfo jRoom then [] else [AnswerClients [sendChan cl] ["RUN_GAME"], - AnswerClients [sendChan cl] $ "EM" : toEngineMsg "e$spectate 1" : Foldable.toList (roundMsgs jRoom)] + AnswerClients [sendChan cl] $ "EM" : toEngineMsg "e$spectate 1" : Foldable.toList (roundMsgs . fromJust . gameInfo $ jRoom)] handleCmd_lobby ["JOIN_ROOM", roomName] = @@ -135,7 +136,7 @@ cl <- thisClient let ri = clientRoom rnc $ fromJust ci let clRoom = room rnc ri - if isNothing ci || ri == lobbyId || clientProto cl /= roomProto clRoom then + if isNothing ci || ri == lobbyId then return [] else handleCmd_lobby ["JOIN_ROOM", name clRoom] diff -r 5b2b86a37089 -r a28be05b20bc gameServer/OfficialServer/GameReplayStore.hs --- a/gameServer/OfficialServer/GameReplayStore.hs Sun Sep 25 18:22:12 2011 +0200 +++ b/gameServer/OfficialServer/GameReplayStore.hs Sun Sep 25 18:24:01 2011 +0200 @@ -7,12 +7,14 @@ import qualified Data.Map as Map import Data.Sequence() import System.Log.Logger +import Data.Maybe saveReplay :: RoomInfo -> IO () saveReplay r = do time <- getCurrentTime let fileName = "replays/" ++ show time - let replayInfo = (teamsAtStart r, Map.toList $ mapParams r, Map.toList $ params r, roundMsgs r) + let gi = fromJust $ gameInfo r + let replayInfo = (teamsAtStart gi, Map.toList $ mapParams r, Map.toList $ params r, roundMsgs gi) E.catch (writeFile fileName (show replayInfo)) (\(e :: IOException) -> warningM "REPLAYS" $ "Couldn't write to " ++ fileName ++ ": " ++ show e) diff -r 5b2b86a37089 -r a28be05b20bc hedgewars/CMakeLists.txt diff -r 5b2b86a37089 -r a28be05b20bc hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Sun Sep 25 18:22:12 2011 +0200 +++ b/hedgewars/GSHandlers.inc Sun Sep 25 18:24:01 2011 +0200 @@ -118,7 +118,7 @@ Message := Message and not gmAttack; end; HH^.GearHidden:= HH^.Gear; -HH^.Gear:= nil; +HH^.Gear:= nil end; procedure RestoreHog(HH: PHedgehog); @@ -509,6 +509,7 @@ //////////////////////////////////////////////////////////////////////////////// procedure doStepMolotov(Gear: PGear); var + s: Longword; i, gX, gY: LongInt; dX, dY: hwFloat; Fire: PGear; @@ -520,8 +521,8 @@ CalcRotationDirAngle(Gear); // let's add some smoke depending on speed - i:= max(32,152 - hwRound(Distance(Gear^.dX,Gear^.dY)*120))+random(10); - if (GameTicks mod i) = 0 then + s:= max(32,152 - hwRound(Distance(Gear^.dX,Gear^.dY)*120))+random(10); + if (GameTicks mod s) = 0 then begin // adjust angle to match the texture if Gear^.dX.isNegative then i:= 130 else i:= 50; @@ -1503,9 +1504,11 @@ exit end; - if (Gear^.Message and gmLeft <> 0) then HHGear^.dX := HHGear^.dX - _0_0002 - else - if (Gear^.Message and gmRight <> 0) then HHGear^.dX := HHGear^.dX + _0_0002; + if (Gear^.Message and gmLeft <> 0) and not TestCollisionXwithGear(HHGear, -1) then + HHGear^.dX := HHGear^.dX - _0_0002; + + if (Gear^.Message and gmRight <> 0) and not TestCollisionXwithGear(HHGear, 1) then + HHGear^.dX := HHGear^.dX + _0_0002; // vector between hedgehog and rope attaching point ropeDx := HHGear^.X - Gear^.X; @@ -4177,7 +4180,11 @@ // Until loops are reliably broken if iscake then iterator^.PortalCounter:= 33 - else inc(iterator^.PortalCounter); + else + begin + inc(iterator^.PortalCounter); + iterator^.State:= iterator^.State and not gstHHHJump + end; if not isbullet and (iterator^.Kind <> gtFlake) then FollowGear := iterator; @@ -4803,7 +4810,7 @@ i := hwRound(Gear^.X) - HitGear^.Radius + 2; ei := hwRound(Gear^.X) + HitGear^.Radius - 2; for j := 1 to 4 do DrawExplosion(i - GetRandom(5), hwRound(Gear^.Y) + 6*j, 3); - for j := 1 to 4 do DrawExplosion(ei + GetRandom(5), hwRound(Gear^.Y) + 6*j, 3); + for j := 1 to 4 do DrawExplosion(ei + LongInt(GetRandom(5)), hwRound(Gear^.Y) + 6*j, 3); while i <= ei do begin for j := 1 to 11 do DrawExplosion(i, hwRound(Gear^.Y) + 3*j, 3); @@ -5093,7 +5100,6 @@ var HH: PHedgehog; i,j,cnt: LongWord; begin - HH:= Gear^.Hedgehog; if Gear^.Pos = 2 then begin @@ -5102,9 +5108,11 @@ begin if (HH^.Gear <> nil) and (HH^.Gear^.State and gstInvisible = 0) then begin - AfterAttack; + AfterAttack; if Gear = CurAmmoGear then CurAmmoGear := nil; - HideHog(HH) + if (HH^.Gear^.Damage = 0) and (HH^.Gear^.Health > 0) and + ((Gear^.State and (gstMoving or gstHHDeath or gstHHGone)) = 0) then + HideHog(HH) end //else if (HH^.Gear <> nil) and (HH^.Gear^.State and gstInvisible <> 0) then else if (HH^.GearHidden <> nil) then// and (HH^.Gear^.State and gstInvisible <> 0) then @@ -5119,7 +5127,20 @@ end end; -if (Gear^.Pos = 1) and (GameTicks and $1F = 0) and (Gear^.Power < 255) then inc(Gear^.Power); +if (Gear^.Pos = 1) and (GameTicks and $1F = 0) and (Gear^.Power < 255) then + begin + inc(Gear^.Power); + if (Gear^.Power = 172) and (HH^.Gear <> nil) and + (HH^.Gear^.Damage = 0) and (HH^.Gear^.Health > 0) and + ((HH^.Gear^.State and (gstMoving or gstHHDeath or gstHHGone)) = 0) then + with HH^.Gear^ do + begin + State:= State or gstAnimation; + Tag:= 2; + Timer:= 0; + Pos:= 0 + end + end; if (Gear^.Pos = 3) and (GameTicks and $1F = 0) and (Gear^.Power > 0) then dec(Gear^.Power); if (Gear^.Pos = 1) and (Gear^.Power = 255) and ((GameTicks mod 2000) = 1000) then Gear^.Pos:= 2; if (Gear^.Pos = 3) and (Gear^.Power = 0) then @@ -5176,13 +5197,14 @@ 3. Hog is a king *) HH:= Gear^.Hedgehog; + if HH^.Gear <> nil then if (HH^.Gear = nil) or (HH^.King) or (SuddenDeathDmg) then begin - if HH^.Gear <> nil then - begin - HH^.Gear^.Message := HH^.Gear^.Message and not gmAttack; - HH^.Gear^.State:= HH^.Gear^.State and not gstAttacking; - end; + if HH^.Gear <> nil then + begin + HH^.Gear^.Message := HH^.Gear^.Message and not gmAttack; + HH^.Gear^.State:= HH^.Gear^.State and not gstAttacking; + end; PlaySound(sndDenied); DeleteGear(gear); exit @@ -5196,14 +5218,14 @@ HH^.Team^.Clan^.Teams[j]^.Hedgehogs[i].Gear^.Damage) then inc(cnt); if cnt < 2 then begin - if HH^.Gear <> nil then - begin - HH^.Gear^.Message := HH^.Gear^.Message and not gmAttack; - HH^.Gear^.State:= HH^.Gear^.State and not gstAttacking; - end; - PlaySound(sndDenied); - DeleteGear(gear); - exit + if HH^.Gear <> nil then + begin + HH^.Gear^.Message := HH^.Gear^.Message and not gmAttack; + HH^.Gear^.State:= HH^.Gear^.State and not gstAttacking; + end; + PlaySound(sndDenied); + DeleteGear(gear); + exit end; Gear^.SoundChannel := LoopSound(sndTardis); Gear^.doStep:= @doStepTardisWarp diff -r 5b2b86a37089 -r a28be05b20bc hedgewars/HHHandlers.inc --- a/hedgewars/HHHandlers.inc Sun Sep 25 18:22:12 2011 +0200 +++ b/hedgewars/HHHandlers.inc Sun Sep 25 18:24:01 2011 +0200 @@ -482,15 +482,16 @@ AllInactive:= false; dec(Gear^.Timer); if (Gear^.Timer mod frametime) = 0 then inc(Gear^.Pos) - end else -if Gear^.Timer = 1 then + end +else if Gear^.Timer = 1 then begin Gear^.State:= Gear^.State or gstNoDamage; doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 30, CurrentHedgehog, EXPLAutoSound); AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtGrave, 0, _0, _0, 0)^.Hedgehog:= Gear^.Hedgehog; DeleteGear(Gear); SetAllToActive - end else // Gear^.Timer = 0 + end +else // Gear^.Timer = 0 begin AllInactive:= false; Gear^.Z:= cCurrHHZ; @@ -872,7 +873,7 @@ if (hwAbs(Gear^.dY) > _0) and (Gear^.FlightTime > 0) and ((GameFlags and gfLowGravity) = 0) then begin - inc(Gear^.FlightTime, 1); + inc(Gear^.FlightTime); if Gear^.FlightTime = 3000 then begin AddCaption(GetEventString(eidHomerun), cWhiteColor, capgrpMessage); @@ -881,6 +882,7 @@ end else begin + uStats.hedgehogFlight(Gear, Gear^.FlightTime); Gear^.FlightTime:= 0; end; @@ -1043,15 +1045,17 @@ Gear^.Hedgehog^.Effects[hePoisoned] := false; if Gear^.Hedgehog^.Effects[heResurrectable] then begin ResurrectHedgehog(Gear); - end else begin - Gear^.State:= Gear^.State or gstHHDeath; + end else + begin + Gear^.State:= (Gear^.State or gstHHDeath) and not gstAnimation; Gear^.doStep:= @doStepHedgehogDead; // Death message AddCaption(Format(GetEventString(eidDied), Gear^.Hedgehog^.Name), cWhiteColor, capgrpMessage); - end; + end; end else begin + Gear^.State:= Gear^.State and not gstAnimation; Gear^.doStep:= @doStepHedgehogGone; // Gone message @@ -1064,13 +1068,13 @@ if ((Gear^.State and gstWait) = 0) and (prevState <> Gear^.State) then begin - Gear^.State:= gstWait; + Gear^.State:= Gear^.State or gstWait; Gear^.Timer:= 150 end else begin if Gear^.Timer = 0 then begin - Gear^.State:= 0; + Gear^.State:= Gear^.State and not (gstWait or gstLoser or gstWinner); Gear^.Active:= false; AddGearCI(Gear); exit @@ -1094,7 +1098,7 @@ else begin with Gear^.Hedgehog^ do - if Team^.hasGone then + if Team^.hasGone then TeamGoneEffect(Team^) else doStepHedgehogDriven(Gear) diff -r 5b2b86a37089 -r a28be05b20bc hedgewars/PascalExports.pas diff -r 5b2b86a37089 -r a28be05b20bc hedgewars/SDLh.pas --- a/hedgewars/SDLh.pas Sun Sep 25 18:22:12 2011 +0200 +++ b/hedgewars/SDLh.pas Sun Sep 25 18:24:01 2011 +0200 @@ -807,6 +807,7 @@ function SDL_CreateRenderer(window: PSDL_Window; index, flags: LongInt): PSDL_Renderer; cdecl; external SDLLibName; function SDL_DestroyWindow(window: PSDL_Window): LongInt; cdecl; external SDLLibName; function SDL_DestroyRenderer(renderer: PSDL_Renderer): LongInt; cdecl; external SDLLibName; +procedure SDL_SetWindowSize(window: PSDL_Window; w, h: LongInt); cdecl; external SDLLibName; function SDL_GL_CreateContext(window: PSDL_Window): PSDL_GLContext; cdecl; external SDLLibName; procedure SDL_GL_DeleteContext(context: PSDL_GLContext); cdecl; external SDLLibName; @@ -836,7 +837,7 @@ function SDL_PeepEvents(event: PSDL_Event; numevents: LongInt; action: SDL_eventaction; minType, maxType: LongInt): LongInt; cdecl; external SDLLibName; {$ELSE} -function SDL_PeepEvents(event: PSDL_Event; numevents: LongInt; action: SDL_eventaction; mask: LongInt): LongInt; cdecl; external SDLLibName; +function SDL_PeepEvents(event: PSDL_Event; numevents: LongInt; action: SDL_eventaction; mask: Longword): LongInt; cdecl; external SDLLibName; {$ENDIF} function SDL_GetMouseState(x, y: PLongInt): Byte; cdecl; external SDLLibName; diff -r 5b2b86a37089 -r a28be05b20bc hedgewars/hwengine.pas --- a/hedgewars/hwengine.pas Sun Sep 25 18:22:12 2011 +0200 +++ b/hedgewars/hwengine.pas Sun Sep 25 18:24:01 2011 +0200 @@ -101,6 +101,7 @@ gsExit: begin isTerminated:= true; end; + gsSuspend: exit; end; {$IFDEF SDL13} @@ -112,18 +113,18 @@ if flagMakeCapture then begin flagMakeCapture:= false; - {$IFNDEF IPHONEOS} s:= 'hw_' + FormatDateTime('YYYY-MM-DD_HH-mm-ss', Now()) + inttostr(GameTicks); playSound(sndShutter); +{$IFNDEF IPHONEOS} if not MakeScreenshot(s) then begin WriteLnToConsole('Screenshot failed.'); AddChatString(#5 + 'screen capture failed (lack of memory or write permissions)'); end else +{$ENDIF} WriteLnToConsole('Screenshot saved: ' + s); - {$ENDIF} end; end; @@ -153,17 +154,21 @@ const event: TSDL_Event = (); {$WARNINGS ON} var PrevTime, CurrTime: Longword; +{$IFDEF SDL13} + previousGameState: TGameState; +{$ELSE} prevFocusState: boolean; +{$ENDIF} begin PrevTime:= SDL_GetTicks; while isTerminated = false do begin SDL_PumpEvents(); - {$IFDEF SDL13} +{$IFDEF SDL13} while SDL_PeepEvents(@event, 1, SDL_GETEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT) > 0 do - {$ELSE} +{$ELSE} while SDL_PeepEvents(@event, 1, SDL_GETEVENT, SDL_ALLEVENTS) > 0 do - {$ENDIF} +{$ENDIF} begin case event.type_ of SDL_KEYDOWN: if GameState = gsChat then @@ -175,6 +180,21 @@ begin cHasFocus:= true; onFocusStateChanged() + end + else if event.window.event = SDL_WINDOWEVENT_MINIMIZED then + begin + previousGameState:= GameState; + GameState:= gsSuspend; + end + else if event.window.event = SDL_WINDOWEVENT_RESTORED then + begin + GameState:= previousGameState; + end + else if event.window.event = SDL_WINDOWEVENT_RESIZED then + begin + cNewScreenWidth:= max(2 * (event.window.data1 div 2), cMinScreenWidth); + cNewScreenHeight:= max(2 * (event.window.data2 div 2), cMinScreenHeight); + cScreenResizeDelay:= RealTicks+500; end; SDL_FINGERMOTION: onTouchMotion(event.tfinger.x, event.tfinger.y,event.tfinger.dx, event.tfinger.dy, event.tfinger.fingerId); SDL_FINGERDOWN: onTouchDown(event.tfinger.x, event.tfinger.y, event.tfinger.fingerId); diff -r 5b2b86a37089 -r a28be05b20bc hedgewars/uAIAmmoTests.pas --- a/hedgewars/uAIAmmoTests.pas Sun Sep 25 18:22:12 2011 +0200 +++ b/hedgewars/uAIAmmoTests.pas Sun Sep 25 18:24:01 2011 +0200 @@ -105,7 +105,7 @@ (proc: @TestHammer; flags: 0), // amHammer (proc: nil; flags: 0), // amResurrector (proc: nil; flags: 0), // amDrillStrike - (proc: @TestSnowball; flags: 0), // amSnowball + (proc: nil; flags: 0), // amSnowball (proc: nil; flags: 0), // amTardis (proc: nil; flags: 0), // amStructure (proc: nil; flags: 0) // amLandGun diff -r 5b2b86a37089 -r a28be05b20bc hedgewars/uAIMisc.pas --- a/hedgewars/uAIMisc.pas Sun Sep 25 18:22:12 2011 +0200 +++ b/hedgewars/uAIMisc.pas Sun Sep 25 18:24:01 2011 +0200 @@ -80,7 +80,7 @@ procedure FillTargets; var i, t: Longword; - f, e: Longword; + f, e: LongInt; begin Targets.Count:= 0; f:= 0; @@ -233,7 +233,7 @@ with Targets.ar[i] do begin dmg:= hwRound(_0_01 * cDamageModifier - * min((r + cHHRadius div 2 - DistanceI(Point.x - x, Point.y - y).Round) div 2, r) * cDamagePercent); + * min((r + cHHRadius div 2 - LongInt(DistanceI(Point.x - x, Point.y - y).Round)) div 2, r) * cDamagePercent); if dmg > 0 then begin diff -r 5b2b86a37089 -r a28be05b20bc hedgewars/uAmmos.pas --- a/hedgewars/uAmmos.pas Sun Sep 25 18:22:12 2011 +0200 +++ b/hedgewars/uAmmos.pas Sun Sep 25 18:24:01 2011 +0200 @@ -339,7 +339,8 @@ CurWeapon:= GetAmmoEntry(Hedgehog); if (CurWeapon^.Count = 0) then - SwitchToFirstLegalAmmo(Hedgehog); + SwitchToFirstLegalAmmo(Hedgehog) + else if CurWeapon^.AmmoType = amNothing then Hedgehog.CurAmmoType:= amNothing; CurWeapon:= GetAmmoEntry(Hedgehog); diff -r 5b2b86a37089 -r a28be05b20bc hedgewars/uGears.pas --- a/hedgewars/uGears.pas Sun Sep 25 18:22:12 2011 +0200 +++ b/hedgewars/uGears.pas Sun Sep 25 18:24:01 2011 +0200 @@ -224,6 +224,7 @@ gear^.SoundChannel:= -1; gear^.ImpactSound:= sndNone; gear^.nImpactSounds:= 0; +gear^.Density:= _1; // Define ammo association, if any. gear^.AmmoType:= GearKindAmmoTypeMap[Kind]; if Ammoz[Gear^.AmmoType].Ammo.Propz and ammoprop_NeedTarget <> 0 then gear^.Z:= cHHZ+1 @@ -601,14 +602,16 @@ Gear^.IntersectGear^.IntersectGear:= nil; end else if Gear^.Kind = gtHedgehog then - if (CurAmmoGear <> nil) and (CurrentHedgehog^.Gear = Gear) then + (* + This behaviour dates back to revision 4, and I accidentally encountered it with TARDIS. I don't think it must apply to any modern weapon, since if it was actually hit, the best the gear could do would be to destroy itself immediately, and you'd still end up with two graves. I believe it should be removed + if (CurAmmoGear <> nil) and (CurrentHedgehog^.Gear = Gear) then begin AttackBar:= 0; Gear^.Message:= gmDestroy; CurAmmoGear^.Message:= gmDestroy; exit end - else + else*) begin if (hwRound(Gear^.Y) >= cWaterLine) then begin diff -r 5b2b86a37089 -r a28be05b20bc hedgewars/uGearsRender.pas --- a/hedgewars/uGearsRender.pas Sun Sep 25 18:22:12 2011 +0200 +++ b/hedgewars/uGearsRender.pas Sun Sep 25 18:24:01 2011 +0200 @@ -330,7 +330,7 @@ hx:= ox + 8 * sign; hy:= oy - 2; aangle:= Gear^.Angle * 180 / cMaxAngle - 90; - if CurAmmoGear <> nil then + if (CurAmmoGear <> nil) and (CurAmmoGear^.Kind <> gtTardis) then begin case CurAmmoGear^.Kind of gtShotgunShot: begin diff -r 5b2b86a37089 -r a28be05b20bc hedgewars/uLand.pas --- a/hedgewars/uLand.pas Sun Sep 25 18:22:12 2011 +0200 +++ b/hedgewars/uLand.pas Sun Sep 25 18:24:01 2011 +0200 @@ -1234,16 +1234,16 @@ for w:= 0 to 23 do for x:= leftX to rightX do begin - Land[cWaterLine-1 - w, x]:= lfIndestructible; + Land[Longword(cWaterLine) - 1 - w, x]:= lfIndestructible; if (x + w) mod 32 < 16 then c:= AMask else c:= AMask or RMask or GMask; // FF00FFFF if (cReducedQuality and rqBlurryLand) = 0 then - LandPixels[cWaterLine-1 - w, x]:= c + LandPixels[Longword(cWaterLine) - 1 - w, x]:= c else - LandPixels[(cWaterLine-1 - w) div 2, x div 2]:= c + LandPixels[(Longword(cWaterLine) - 1 - w) div 2, x div 2]:= c end end; diff -r 5b2b86a37089 -r a28be05b20bc hedgewars/uLandGraphics.pas --- a/hedgewars/uLandGraphics.pas Sun Sep 25 18:22:12 2011 +0200 +++ b/hedgewars/uLandGraphics.pas Sun Sep 25 18:24:01 2011 +0200 @@ -47,10 +47,10 @@ function addBgColor(OldColor, NewColor: LongWord): LongWord; // Factor ranges from 0 to 100% NewColor var - oRed, oBlue, oGreen, oAlpha, nRed, nBlue, nGreen, nAlpha: LongWord; + oRed, oBlue, oGreen, oAlpha, nRed, nBlue, nGreen, nAlpha: byte; begin - oAlpha := (OldColor shr AShift) and $FF; - nAlpha := (NewColor shr AShift) and $FF; + oAlpha := (OldColor shr AShift); + nAlpha := (NewColor shr AShift); // shortcircuit if (oAlpha = 0) or (nAlpha = $FF) then begin @@ -58,18 +58,18 @@ exit end; // Get colors - oRed := (OldColor shr RShift) and $FF; - oGreen := (OldColor shr GShift) and $FF; - oBlue := (OldColor shr BShift) and $FF; + oRed := (OldColor shr RShift); + oGreen := (OldColor shr GShift); + oBlue := (OldColor shr BShift); - nRed := (NewColor shr RShift) and $FF; - nGreen := (NewColor shr GShift) and $FF; - nBlue := (NewColor shr BShift) and $FF; + nRed := (NewColor shr RShift); + nGreen := (NewColor shr GShift); + nBlue := (NewColor shr BShift); // Mix colors - nRed := min(255,((nRed*nAlpha) div 255) + ((oRed*oAlpha*(255-nAlpha)) div 65025)); - nGreen := min(255,((nGreen*nAlpha) div 255) + ((oGreen*oAlpha*(255-nAlpha)) div 65025)); - nBlue := min(255,((nBlue*nAlpha) div 255) + ((oBlue*oAlpha*(255-nAlpha)) div 65025)); + nRed := min(255,((nRed*nAlpha) div 255) + ((oRed*oAlpha*byte(255-nAlpha)) div 65025)); + nGreen := min(255,((nGreen*nAlpha) div 255) + ((oGreen*oAlpha*byte(255-nAlpha)) div 65025)); + nBlue := min(255,((nBlue*nAlpha) div 255) + ((oBlue*oAlpha*byte(255-nAlpha)) div 65025)); nAlpha := min(255, oAlpha + nAlpha); addBgColor := (nAlpha shl AShift) or (nRed shl RShift) or (nGreen shl GShift) or (nBlue shl BShift); @@ -780,8 +780,8 @@ procedure Smooth(X, Y: LongInt); begin // a bit of AA for explosions -if (Land[Y, X] = 0) and (Y > topY+1) and - (Y < LAND_HEIGHT-2) and (X>leftX+1) and (X LongInt(topY) + 1) and + (Y < LAND_HEIGHT-2) and (X > LongInt(leftX) + 1) and (X < LongInt(rightX) - 1) then begin if ((((Land[y, x-1] and lfDamaged) <> 0) and (((Land[y+1,x] and lfDamaged) <> 0)) or ((Land[y-1,x] and lfDamaged) <> 0)) or (((Land[y, x+1] and lfDamaged) <> 0) and (((Land[y-1,x] and lfDamaged) <> 0) or ((Land[y+1,x] and lfDamaged) <> 0)))) then diff -r 5b2b86a37089 -r a28be05b20bc hedgewars/uMobile.pas --- a/hedgewars/uMobile.pas Sun Sep 25 18:22:12 2011 +0200 +++ b/hedgewars/uMobile.pas Sun Sep 25 18:24:01 2011 +0200 @@ -38,7 +38,7 @@ procedure GameLoading; inline; procedure GameLoaded; inline; -procedure AmmoUpdate; // don't inline +procedure AmmoUpdate; // do not inline procedure NewTurnBeginning; inline; procedure SaveBegan; inline; procedure SaveFinished; inline; @@ -46,6 +46,7 @@ implementation uses uVariables; +// this function is just to determine whether we are running on a limited screen device function isPhone: Boolean; inline; begin {$IFDEF IPHONEOS} @@ -54,12 +55,17 @@ exit(false); end; +// this function should make the device vibrate in some way procedure performRumble; inline; const kSystemSoundID_Vibrate = $00000FFF; begin + // do not vibrate while synchronising a demo/save + if not fastUntilLag then + begin {$IFDEF IPHONEOS} - AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); + AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); {$ENDIF} + end; end; procedure GameLoading; inline; @@ -76,7 +82,7 @@ {$ENDIF} end; -procedure AmmoUpdate; // don't inline +procedure AmmoUpdate; // do not inline begin {$IFDEF IPHONEOS} if (CurrentTeam = nil) or diff -r 5b2b86a37089 -r a28be05b20bc hedgewars/uScript.pas --- a/hedgewars/uScript.pas Sun Sep 25 18:22:12 2011 +0200 +++ b/hedgewars/uScript.pas Sun Sep 25 18:24:01 2011 +0200 @@ -1210,6 +1210,11 @@ lua_pushinteger(L, hwRound(gear^.X)); lua_pushinteger(L, hwRound(gear^.Y)) end + else + begin + lua_pushnil(L); + lua_pushnil(L) + end; end; lc_getgearposition:= 2; end; @@ -1805,7 +1810,8 @@ procedure ScriptSetAmmo(ammo : TAmmoType; count, propability, delay, reinforcement: Byte); begin -if (ord(ammo) < 1) or (count > 9) or (count < 0) or (propability < 0) or (propability > 8) or (delay < 0) or (delay > 9) or (reinforcement < 0) or (reinforcement > 8) then +//if (ord(ammo) < 1) or (count > 9) or (count < 0) or (propability < 0) or (propability > 8) or (delay < 0) or (delay > 9) or (reinforcement < 0) or (reinforcement > 8) then +if (ord(ammo) < 1) or (count > 9) or (propability > 8) or (delay > 9) or (reinforcement > 8) then exit; ScriptAmmoLoadout[ord(ammo)]:= inttostr(count)[1]; ScriptAmmoProbability[ord(ammo)]:= inttostr(propability)[1]; diff -r 5b2b86a37089 -r a28be05b20bc hedgewars/uStats.pas --- a/hedgewars/uStats.pas Sun Sep 25 18:22:12 2011 +0200 +++ b/hedgewars/uStats.pas Sun Sep 25 18:24:01 2011 +0200 @@ -33,6 +33,7 @@ procedure Skipped; procedure TurnReaction; procedure SendStats; +procedure hedgehogFlight(Gear: PGear; time: Longword); implementation uses uSound, uLocale, uVariables, uUtils, uIO, uCaptions, uDebug, uMisc; @@ -175,6 +176,17 @@ AmmoDamagingUsed:= AmmoDamagingUsed or Ammoz[am].isDamaging end; +procedure hedgehogFlight(Gear: PGear; time: Longword); +begin +if time > 4000 then + begin + writeln('FLIGHT'); + writeln(Gear^.Hedgehog^.Team^.TeamName); + writeln(time); + writeln; + end +end; + procedure SendStats; var i, t: LongInt; msd, msk: Longword; msdhh, mskhh: PHedgehog; @@ -270,9 +282,10 @@ writeln('WINNERS'); for t:= 0 to winnersClan^.TeamsNumber - 1 do writeln(winnersClan^.Teams[t]^.TeamName); - writeln; end else writeln('DRAW'); + +writeln; end; procedure initModule; diff -r 5b2b86a37089 -r a28be05b20bc hedgewars/uStore.pas --- a/hedgewars/uStore.pas Sun Sep 25 18:22:12 2011 +0200 +++ b/hedgewars/uStore.pas Sun Sep 25 18:24:01 2011 +0200 @@ -587,7 +587,11 @@ procedure SetupOpenGL; //var vendor: shortstring = ''; +var buf: array[byte] of char; begin + buf[0]:= char(0); // avoid compiler hint + AddFileLog('Setting up OpenGL (using driver: ' + shortstring(SDL_VideoDriverName(buf, sizeof(buf))) + ')'); + {$IFDEF SDL13} // this function creates an opengles1.1 context by default on mobile devices // use SDL_GL_SetAttribute to change this behaviour @@ -945,18 +949,16 @@ procedure chFullScr(var s: shortstring); var flags: Longword = 0; - ico: PSDL_Surface; - buf: array[byte] of char; + {$IFNDEF IPHONEOS}ico: PSDL_Surface;{$ENDIF} reinit: boolean; {$IFDEF SDL13}x, y: LongInt;{$ENDIF} begin if Length(s) = 0 then cFullScreen:= not cFullScreen else cFullScreen:= s = '1'; - buf[0]:= char(0); // avoid compiler hint AddFileLog('Preparing to change video parameters...'); - reinit:= false; +{$IFNDEF IPHONEOS} if SDLPrimSurface = nil then begin // set window title @@ -990,6 +992,7 @@ SDL_FreeSurface(SDLPrimSurface); SDLPrimSurface:= nil; end; +{$ENDIF} // these attributes must be set up before creating the sdl window {$IFNDEF WIN32} @@ -1014,8 +1017,9 @@ flags:= flags or SDL_WINDOW_BORDERLESS or SDL_WINDOW_RESIZABLE; {$ENDIF} - if cFullScreen then SDLwindow:= SDL_CreateWindow('Hedgewars', x, y, cOrigScreenWidth, cOrigScreenHeight, flags or SDL_WINDOW_FULLSCREEN) - else SDLwindow:= SDL_CreateWindow('Hedgewars', x, y, cScreenWidth, cScreenHeight, flags); + if SDLwindow = nil then + if cFullScreen then SDLwindow:= SDL_CreateWindow('Hedgewars', x, y, cOrigScreenWidth, cOrigScreenHeight, flags or SDL_WINDOW_FULLSCREEN) + else SDLwindow:= SDL_CreateWindow('Hedgewars', x, y, cScreenWidth, cScreenHeight, flags); SDLTry(SDLwindow <> nil, true); {$ELSE} flags:= SDL_OPENGL or SDL_RESIZABLE; @@ -1034,7 +1038,6 @@ end; {$ENDIF} - AddFileLog('Setting up OpenGL (using driver: ' + shortstring(SDL_VideoDriverName(buf, sizeof(buf))) + ')'); SetupOpenGL(); if reinit then begin diff -r 5b2b86a37089 -r a28be05b20bc hedgewars/uTeams.pas --- a/hedgewars/uTeams.pas Sun Sep 25 18:22:12 2011 +0200 +++ b/hedgewars/uTeams.pas Sun Sep 25 18:24:01 2011 +0200 @@ -435,7 +435,7 @@ begin Gear^.Invulnerable:= false; Gear^.Damage:= Gear^.Health; - Gear^.State:= Gear^.State or gstHHGone + Gear^.State:= (Gear^.State or gstHHGone) and not gstHHDriven end end end; diff -r 5b2b86a37089 -r a28be05b20bc hedgewars/uTypes.pas --- a/hedgewars/uTypes.pas Sun Sep 25 18:22:12 2011 +0200 +++ b/hedgewars/uTypes.pas Sun Sep 25 18:24:01 2011 +0200 @@ -36,7 +36,7 @@ end; // Possible states of the game - TGameState = (gsLandGen, gsStart, gsGame, gsChat, gsConfirm, gsExit); + TGameState = (gsLandGen, gsStart, gsGame, gsChat, gsConfirm, gsExit, gsSuspend); // Game types that help determining what the engine is actually supposed to do TGameType = (gmtLocal, gmtDemo, gmtNet, gmtSave, gmtLandPreview, gmtSyntax); diff -r 5b2b86a37089 -r a28be05b20bc hedgewars/uWorld.pas --- a/hedgewars/uWorld.pas Sun Sep 25 18:22:12 2011 +0200 +++ b/hedgewars/uWorld.pas Sun Sep 25 18:24:01 2011 +0200 @@ -31,7 +31,7 @@ procedure DrawWorldStereo(Lag: LongInt; RM: TRenderMode); procedure ShowMission(caption, subcaption, text: ansistring; icon, time : LongInt); procedure HideMission; -procedure ShakeCamera(amount: LongWord); +procedure ShakeCamera(amount: LongInt); procedure InitCameraBorders; procedure MoveCamera; procedure onFocusStateChanged; @@ -54,7 +54,8 @@ uRender, uCaptions, uCursor, - uCommands + uCommands, + uMobile ; var cWaveWidth, cWaveHeight: LongInt; @@ -918,11 +919,11 @@ DrawTexture(Round(-cScreenWidth*0.5 + cScreenHeight*0.02),Round((cScreenHeight*0.98)-(spritesData[sprFireButton].Height*0.4) ),spritesData[sprFireButton].Texture, 0.4); {$ENDIF} // Teams Healths -if TeamsCount * 20 > cScreenHeight div 7 then // take up less screen on small displays +if TeamsCount * 20 > Longword(cScreenHeight) div 7 then // take up less screen on small displays begin SetScale(1.5); smallScreenOffset:= cScreenHeight div 6; - if TeamsCount * 20 > cScreenHeight div 5 then Tint($FF,$FF,$FF,$80); + if TeamsCount * 20 > Longword(cScreenHeight) div 5 then Tint($FF,$FF,$FF,$80); end else smallScreenOffset:= 0; for t:= 0 to Pred(TeamsCount) do @@ -961,7 +962,7 @@ // this approach should be faster than drawing all borders one by one tinted or not if highlight then begin - if TeamsCount * 20 > cScreenHeight div 5 then Tint($FF,$FF,$FF,$80) + if TeamsCount * 20 > Longword(cScreenHeight) div 5 then Tint($FF,$FF,$FF,$80) else Tint($FF, $FF, $FF, $FF); // draw name @@ -983,7 +984,7 @@ if smallScreenOffset <> 0 then begin SetScale(cDefaultZoomLevel); - if TeamsCount * 20 > cScreenHeight div 5 then Tint($FF,$FF,$FF,$FF); + if TeamsCount * 20 > Longword(cScreenHeight) div 5 then Tint($FF,$FF,$FF,$FF); end; // Lag alert @@ -1200,7 +1201,10 @@ else begin CursorPoint.X:= (prevPoint.X * 7 + hwRound(FollowGear^.X) + hwSign(FollowGear^.dX) * z + WorldDx) div 8; - CursorPoint.Y:= (prevPoint.Y * 7 + cScreenHeight - (hwRound(FollowGear^.Y)+ hwSign(FollowGear^.dY) * z + WorldDy)) div 8; + if isPhone() then + CursorPoint.Y:= (prevPoint.Y * 7 + cScreenHeight - (hwRound(FollowGear^.Y) + WorldDy)) div 8 + else + CursorPoint.Y:= (prevPoint.Y * 7 + cScreenHeight - (hwRound(FollowGear^.Y) + hwSign(FollowGear^.dY) * z + WorldDy)) div 8; end; wdy:= trunc(cScreenHeight / cScaleFactor) + cScreenHeight div 2 - cWaterLine - cVisibleWater; @@ -1316,7 +1320,7 @@ if missionTex <> nil then FreeTexture(missionTex); end; -procedure ShakeCamera(amount: LongWord); +procedure ShakeCamera(amount: LongInt); begin if isCursorVisible then exit; amount:= Max(1, round(amount*zoom/2)); diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/AboutViewController.m --- a/project_files/HedgewarsMobile/Classes/AboutViewController.m Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/AboutViewController.m Sun Sep 25 18:24:01 2011 +0200 @@ -50,12 +50,12 @@ } -(IBAction) buttonPressed:(id) sender { - playSound(@"backSound"); + [AudioManagerController playBackSound]; [[self parentViewController] dismissModalViewControllerAnimated:YES]; } -(IBAction) segmentedControlChanged:(id) sender { - playSound(@"clickSound"); + [AudioManagerController playClickSound]; [self.tableView setContentOffset:CGPointMake(0, 0) animated:NO]; [self.tableView reloadData]; } @@ -79,6 +79,8 @@ // first all the names, then the title (which is offset 5) cell.textLabel.text = [[self.people objectAtIndex:self.segmentedControl.selectedSegmentIndex] objectAtIndex:[indexPath row]]; + cell.textLabel.adjustsFontSizeToFitWidth = YES; + cell.textLabel.minimumFontSize = 8; cell.detailTextLabel.text = [[self.people objectAtIndex:(self.segmentedControl.selectedSegmentIndex + 5)] objectAtIndex:[indexPath row]]; return cell; diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/AmmoMenuViewController.m --- a/project_files/HedgewarsMobile/Classes/AmmoMenuViewController.m Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/AmmoMenuViewController.m Sun Sep 25 18:24:01 2011 +0200 @@ -169,9 +169,10 @@ [self.view addSubview:button]; [array addObject:button]; - int x_src = ((i*32)/(int)ammoStoreImage.size.height)*32; - int y_src = (i*32)%(int)ammoStoreImage.size.height; - UIImage *img = [ammoStoreImage cutAt:CGRectMake(x_src, y_src, 32, 32)]; + int size = 32*getScreenScale(); + int x_src = ((i*size)/(int)(ammoStoreImage.size.height*getScreenScale()))*size; + int y_src = (i*size)%(int)(ammoStoreImage.size.height*getScreenScale()); + UIImage *img = [ammoStoreImage cutAt:CGRectMake(x_src, y_src, size, size)]; [imgs addObject:img]; } [self performSelectorOnMainThread:@selector(setButtonsArray:) withObject:array waitUntilDone:NO]; @@ -296,7 +297,7 @@ if (theButton.currentTitle == nil) { HW_setWeapon(theButton.tag); - playSound(@"clickSound"); + [AudioManagerController playClickSound]; if (IS_DUALHEAD() == NO) [self disappear]; } diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/AudioManagerController.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Classes/AudioManagerController.h Sun Sep 25 18:24:01 2011 +0200 @@ -0,0 +1,39 @@ +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2011 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 23/09/2011. + */ + + +#import + + +@interface AudioManagerController : NSObject { + +} + ++(void) playBackgroundMusic; ++(void) pauseBackgroundMusic; ++(void) stopBackgroundMusic; + ++(void) playClickSound; ++(void) playBackSound; ++(void) playSelectSound; + ++(void) cleanupMemory; + +@end diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/AudioManagerController.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Classes/AudioManagerController.m Sun Sep 25 18:24:01 2011 +0200 @@ -0,0 +1,120 @@ +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2011 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 23/09/2011. + */ + + +#import "AudioManagerController.h" +#import "AVFoundation/AVAudioPlayer.h" +#import + + +static AVAudioPlayer *backgroundMusic = nil; +static SystemSoundID clickSound = -1; +static SystemSoundID backSound = -1; +static SystemSoundID selSound = -1; + +@implementation AudioManagerController + +#pragma mark - +#pragma mark background music control ++(void) loadBackgroundMusic { + NSString *musicString = [[NSBundle mainBundle] pathForResource:@"hwclassic" ofType:@"mp3"]; + backgroundMusic = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:musicString] error:nil]; + + backgroundMusic.delegate = nil; + backgroundMusic.volume = 0.4f; + backgroundMusic.numberOfLoops = -1; + [backgroundMusic prepareToPlay]; +} + ++(void) playBackgroundMusic { + if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"music"] boolValue] == NO) + return; + + if (backgroundMusic == nil) + [AudioManagerController loadBackgroundMusic]; + + [backgroundMusic play]; +} + ++(void) pauseBackgroundMusic { + [backgroundMusic pause]; +} + ++(void) stopBackgroundMusic { + [backgroundMusic stop]; +} + +#pragma mark - +#pragma mark sound effects control ++(SystemSoundID) loadSound:(NSString *)snd { + // get the filename of the sound file: + NSString *path = [NSString stringWithFormat:@"%@/%@",[[NSBundle mainBundle] resourcePath],snd]; + + // declare a system sound id and get a URL for the sound file + SystemSoundID soundID; + NSURL *filePath = [NSURL fileURLWithPath:path isDirectory:NO]; + + // use audio sevices to create and play the sound + AudioServicesCreateSystemSoundID((CFURLRef)filePath, &soundID); + return soundID; +} + ++(void) playClickSound { + if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"sound"] boolValue] == NO) + return; + + if (clickSound == -1) + clickSound = [AudioManagerController loadSound:@"clickSound.wav"]; + + AudioServicesPlaySystemSound(clickSound); +} + ++(void) playBackSound { + if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"sound"] boolValue] == NO) + return; + + if (backSound == -1) + backSound = [AudioManagerController loadSound:@"backSound.wav"]; + + AudioServicesPlaySystemSound(backSound); +} + ++(void) playSelectSound { + if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"sound"] boolValue] == NO) + return; + + if (selSound == -1) + selSound = [AudioManagerController loadSound:@"selSound.wav"]; + + AudioServicesPlaySystemSound(selSound); +} + +#pragma mark - +#pragma mark memory management ++(void) cleanupMemory { + [backgroundMusic stop]; + [backgroundMusic release], backgroundMusic = nil; + AudioServicesDisposeSystemSoundID(clickSound), clickSound = -1; + AudioServicesDisposeSystemSoundID(backSound), backSound = -1; + AudioServicesDisposeSystemSoundID(selSound), selSound = -1; + MSG_MEMCLEAN(); +} + +@end diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/CommodityFunctions.h --- a/project_files/HedgewarsMobile/Classes/CommodityFunctions.h Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/CommodityFunctions.h Sun Sep 25 18:24:01 2011 +0200 @@ -24,7 +24,6 @@ #define DOCUMENTS_FOLDER() [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] #define DEBUG_FILE() [DOCUMENTS_FOLDER() stringByAppendingString:@"/hw-game.log"] -#define HEDGEHOG_FILE() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Settings/Images/hedgehog.png"] #define BASICFLAGS_FILE() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Settings/basicFlags.plist"] #define GAMEMODS_FILE() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Settings/gameMods.plist"] #define CREDITS_FILE() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Settings/credits.plist"] @@ -35,10 +34,9 @@ #define SAVES_DIRECTORY() [DOCUMENTS_FOLDER() stringByAppendingString:@"/Saves/"] #define GRAPHICS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/"] +#define ICONS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Icons/"] #define HATS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Hats/"] #define GRAVES_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Graves/"] -#define BOTLEVELS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Hedgehog/botlevels/"] -#define BTN_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Btn/"] #define FLAGS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Flags/"] #define FORTS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Forts/"] #define VOICES_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Sounds/voices/"] @@ -66,8 +64,6 @@ #define UIVIEW_HW_SDLVIEW [[[[UIApplication sharedApplication] keyWindow] subviews] objectAtIndex:0] void print_free_memory (void); -void playSound (NSString *snd); -BOOL isApplePhone (void); NSInteger randomPort (void); NSString *getModelType (void); diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/CommodityFunctions.m --- a/project_files/HedgewarsMobile/Classes/CommodityFunctions.m Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/CommodityFunctions.m Sun Sep 25 18:24:01 2011 +0200 @@ -25,7 +25,6 @@ #import #import #import -#import #import #import #import @@ -63,10 +62,6 @@ #endif } -BOOL inline isApplePhone () { - return (IS_IPAD() == NO); -} - NSString *getModelType () { size_t size; // set 'oldp' parameter to NULL to get the size of the data returned so we can allocate appropriate amount of space @@ -80,21 +75,6 @@ return modelId; } -void playSound (NSString *snd) { - if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"sound"] boolValue] == YES) { - // get the filename of the sound file: - NSString *path = [NSString stringWithFormat:@"%@/%@.wav",[[NSBundle mainBundle] resourcePath],snd]; - - // declare a system sound id and get a URL for the sound file - SystemSoundID soundID; - NSURL *filePath = [NSURL fileURLWithPath:path isDirectory:NO]; - - // use audio sevices to create and play the sound - AudioServicesCreateSystemSoundID((CFURLRef)filePath, &soundID); - AudioServicesPlaySystemSound(soundID); - } -} - NSArray *getAvailableColors (void) { // by default colors are ARGB but we do computation over RGB, hence we have to "& 0x00FFFFFF" before processing unsigned int colors[] = HW_TEAMCOLOR_ARRAY; diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/CreationChamber.h --- a/project_files/HedgewarsMobile/Classes/CreationChamber.h Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/CreationChamber.h Sun Sep 25 18:24:01 2011 +0200 @@ -24,4 +24,4 @@ void createSettings (void); void createTeamNamed (NSString *nameWithoutExt); void createWeaponNamed (NSString *nameWithoutExt, int type); -void createSchemeNamed (NSString *nameWithoutExt); +void createSchemeNamed (NSString *nameWithoutExt, int type); diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/CreationChamber.m --- a/project_files/HedgewarsMobile/Classes/CreationChamber.m Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/CreationChamber.m Sun Sep 25 18:24:01 2011 +0200 @@ -150,7 +150,7 @@ [theWeapon release]; } -void createSchemeNamed (NSString *nameWithoutExt) { +void createSchemeNamed (NSString *nameWithoutExt, int type) { NSString *schemesDirectory = SCHEMES_DIRECTORY(); if (![[NSFileManager defaultManager] fileExistsAtPath: schemesDirectory]) { @@ -173,8 +173,106 @@ [gamemodArray addObject:[NSNumber numberWithBool:NO]]; [mods release]; - // workaround for randomorder that has to be set to YES - [gamemodArray replaceObjectAtIndex:11 withObject:[NSNumber numberWithBool:YES]]; + switch (type) { + case 0: // default + [gamemodArray replaceObjectAtIndex:11 withObject:[NSNumber numberWithBool:YES]]; + break; + case 1: // pro mode + [basicArray replaceObjectAtIndex:2 withObject:[NSNumber numberWithInt:15]]; + [basicArray replaceObjectAtIndex:7 withObject:[NSNumber numberWithInt:0]]; + [basicArray replaceObjectAtIndex:11 withObject:[NSNumber numberWithInt:0]]; + [gamemodArray replaceObjectAtIndex:11 withObject:[NSNumber numberWithBool:YES]]; + [gamemodArray replaceObjectAtIndex:14 withObject:[NSNumber numberWithBool:YES]]; + break; + case 2: // shoppa + [basicArray replaceObjectAtIndex:2 withObject:[NSNumber numberWithInt:30]]; + [basicArray replaceObjectAtIndex:3 withObject:[NSNumber numberWithInt:50]]; + [basicArray replaceObjectAtIndex:7 withObject:[NSNumber numberWithInt:1]]; + [basicArray replaceObjectAtIndex:8 withObject:[NSNumber numberWithInt:0]]; + [basicArray replaceObjectAtIndex:9 withObject:[NSNumber numberWithInt:25]]; + [basicArray replaceObjectAtIndex:11 withObject:[NSNumber numberWithInt:0]]; + [basicArray replaceObjectAtIndex:13 withObject:[NSNumber numberWithInt:0]]; + [gamemodArray replaceObjectAtIndex:1 withObject:[NSNumber numberWithBool:YES]]; + [gamemodArray replaceObjectAtIndex:2 withObject:[NSNumber numberWithBool:YES]]; + [gamemodArray replaceObjectAtIndex:11 withObject:[NSNumber numberWithBool:YES]]; + [gamemodArray replaceObjectAtIndex:14 withObject:[NSNumber numberWithBool:YES]]; + [gamemodArray replaceObjectAtIndex:15 withObject:[NSNumber numberWithBool:YES]]; + [gamemodArray replaceObjectAtIndex:19 withObject:[NSNumber numberWithBool:YES]]; + break; + case 3: // clean slate + [gamemodArray replaceObjectAtIndex:6 withObject:[NSNumber numberWithBool:YES]]; + [gamemodArray replaceObjectAtIndex:11 withObject:[NSNumber numberWithBool:YES]]; + [gamemodArray replaceObjectAtIndex:18 withObject:[NSNumber numberWithBool:YES]]; + [gamemodArray replaceObjectAtIndex:19 withObject:[NSNumber numberWithBool:YES]]; + break; + case 4: // minefield + [basicArray replaceObjectAtIndex:0 withObject:[NSNumber numberWithInt:50]]; + [basicArray replaceObjectAtIndex:2 withObject:[NSNumber numberWithInt:30]]; + [basicArray replaceObjectAtIndex:7 withObject:[NSNumber numberWithInt:0]]; + [basicArray replaceObjectAtIndex:10 withObject:[NSNumber numberWithInt:0]]; + [basicArray replaceObjectAtIndex:11 withObject:[NSNumber numberWithInt:80]]; + [basicArray replaceObjectAtIndex:13 withObject:[NSNumber numberWithInt:0]]; + [gamemodArray replaceObjectAtIndex:11 withObject:[NSNumber numberWithBool:YES]]; + [gamemodArray replaceObjectAtIndex:14 withObject:[NSNumber numberWithBool:YES]]; + [gamemodArray replaceObjectAtIndex:15 withObject:[NSNumber numberWithBool:YES]]; + break; + case 5: // barrel mayhem + [basicArray replaceObjectAtIndex:2 withObject:[NSNumber numberWithInt:30]]; + [basicArray replaceObjectAtIndex:7 withObject:[NSNumber numberWithInt:0]]; + [basicArray replaceObjectAtIndex:10 withObject:[NSNumber numberWithInt:0]]; + [basicArray replaceObjectAtIndex:11 withObject:[NSNumber numberWithInt:0]]; + [basicArray replaceObjectAtIndex:13 withObject:[NSNumber numberWithInt:40]]; + [gamemodArray replaceObjectAtIndex:11 withObject:[NSNumber numberWithBool:YES]]; + [gamemodArray replaceObjectAtIndex:14 withObject:[NSNumber numberWithBool:YES]]; + break; + case 6: // tunnel hogs + [basicArray replaceObjectAtIndex:2 withObject:[NSNumber numberWithInt:30]]; + [basicArray replaceObjectAtIndex:9 withObject:[NSNumber numberWithInt:3]]; + [basicArray replaceObjectAtIndex:11 withObject:[NSNumber numberWithInt:10]]; + [basicArray replaceObjectAtIndex:12 withObject:[NSNumber numberWithInt:10]]; + [basicArray replaceObjectAtIndex:13 withObject:[NSNumber numberWithInt:10]]; + [gamemodArray replaceObjectAtIndex:2 withObject:[NSNumber numberWithBool:YES]]; + [gamemodArray replaceObjectAtIndex:11 withObject:[NSNumber numberWithBool:YES]]; + [gamemodArray replaceObjectAtIndex:14 withObject:[NSNumber numberWithBool:YES]]; + [gamemodArray replaceObjectAtIndex:15 withObject:[NSNumber numberWithBool:YES]]; + [gamemodArray replaceObjectAtIndex:16 withObject:[NSNumber numberWithBool:YES]]; + break; + case 7: // fort mode + [basicArray replaceObjectAtIndex:11 withObject:[NSNumber numberWithInt:0]]; + [basicArray replaceObjectAtIndex:13 withObject:[NSNumber numberWithInt:0]]; + [gamemodArray replaceObjectAtIndex:2 withObject:[NSNumber numberWithBool:YES]]; + [gamemodArray replaceObjectAtIndex:3 withObject:[NSNumber numberWithBool:YES]]; + [gamemodArray replaceObjectAtIndex:10 withObject:[NSNumber numberWithBool:YES]]; + [gamemodArray replaceObjectAtIndex:11 withObject:[NSNumber numberWithBool:YES]]; + break; + case 8: // timeless + [basicArray replaceObjectAtIndex:2 withObject:[NSNumber numberWithInt:100]]; + [basicArray replaceObjectAtIndex:4 withObject:[NSNumber numberWithInt:0]]; + [basicArray replaceObjectAtIndex:5 withObject:[NSNumber numberWithInt:0]]; + [basicArray replaceObjectAtIndex:9 withObject:[NSNumber numberWithInt:30]]; + [basicArray replaceObjectAtIndex:10 withObject:[NSNumber numberWithInt:5]]; + [basicArray replaceObjectAtIndex:11 withObject:[NSNumber numberWithInt:3]]; + [basicArray replaceObjectAtIndex:12 withObject:[NSNumber numberWithInt:10]]; + [gamemodArray replaceObjectAtIndex:11 withObject:[NSNumber numberWithBool:YES]]; + [gamemodArray replaceObjectAtIndex:20 withObject:[NSNumber numberWithBool:YES]]; + break; + case 9: // thinking with portals + [basicArray replaceObjectAtIndex:7 withObject:[NSNumber numberWithInt:2]]; + [basicArray replaceObjectAtIndex:8 withObject:[NSNumber numberWithInt:25]]; + [basicArray replaceObjectAtIndex:10 withObject:[NSNumber numberWithInt:4]]; + [basicArray replaceObjectAtIndex:11 withObject:[NSNumber numberWithInt:5]]; + [basicArray replaceObjectAtIndex:13 withObject:[NSNumber numberWithInt:5]]; + [gamemodArray replaceObjectAtIndex:9 withObject:[NSNumber numberWithBool:YES]]; + [gamemodArray replaceObjectAtIndex:11 withObject:[NSNumber numberWithBool:YES]]; + break; + case 10:// king mode + [gamemodArray replaceObjectAtIndex:11 withObject:[NSNumber numberWithBool:YES]]; + [gamemodArray replaceObjectAtIndex:12 withObject:[NSNumber numberWithBool:YES]]; + break; + default: + DLog(@"Impossible"); + break; + } NSMutableDictionary *theScheme = [[NSMutableDictionary alloc] initWithObjectsAndKeys: basicArray,@"basic", @@ -182,7 +280,7 @@ nil]; [gamemodArray release]; [basicArray release]; - + NSString *schemeFile = [[NSString alloc] initWithFormat:@"%@/%@.plist", schemesDirectory, nameWithoutExt]; [theScheme writeToFile:schemeFile atomically:YES]; diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/FortsViewController.m --- a/project_files/HedgewarsMobile/Classes/FortsViewController.m Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/FortsViewController.m Sun Sep 25 18:24:01 2011 +0200 @@ -23,7 +23,7 @@ #import "CommodityFunctions.h" #import "UIImageExtra.h" -#define IMGNUM_PER_FORT 4 +#define IMGNUM_PER_FORT 6 @implementation FortsViewController @synthesize teamDictionary, fortArray, lastIndexPath; @@ -40,10 +40,10 @@ [super viewDidLoad]; NSArray *directoryContents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:FORTS_DIRECTORY() error:NULL]; - NSMutableArray *filteredContents = [[NSMutableArray alloc] initWithCapacity:([directoryContents count] / 3)]; + NSMutableArray *filteredContents = [[NSMutableArray alloc] initWithCapacity:([directoryContents count] / IMGNUM_PER_FORT)]; // we need to remove the double entries and the L.png suffix for (int i = 0; i < [directoryContents count]; i++) { - if (i % IMGNUM_PER_FORT == 3) { + if (i % IMGNUM_PER_FORT == IMGNUM_PER_FORT-1) { NSString *currentName = [directoryContents objectAtIndex:i]; NSString *correctName = [currentName substringToIndex:([currentName length] - 5)]; [filteredContents addObject:correctName]; diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/GameConfigViewController.m --- a/project_files/HedgewarsMobile/Classes/GameConfigViewController.m Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/GameConfigViewController.m Sun Sep 25 18:24:01 2011 +0200 @@ -51,17 +51,17 @@ [alert show]; [alert release]; } else { - playSound(@"backSound"); + [AudioManagerController playBackSound]; [[self parentViewController] dismissModalViewControllerAnimated:YES]; } break; case 1: - playSound(@"clickSound"); + [AudioManagerController playClickSound]; theButton.enabled = NO; [self startGame:theButton]; break; case 2: - playSound(@"clickSound"); + [AudioManagerController playClickSound]; if (self.helpPage == nil) self.helpPage = [[HelpPageViewController alloc] initWithNibName:@"HelpPageLobbyViewController-iPad" bundle:nil]; self.helpPage.view.alpha = 0; @@ -79,7 +79,7 @@ -(IBAction) segmentPressed:(id) sender { UISegmentedControl *theSegment = (UISegmentedControl *)sender; - playSound(@"selSound"); + [AudioManagerController playSelectSound]; switch (theSegment.selectedSegmentIndex) { case 0: // this init here is just aestetic as this controller was already set up in viewDidLoad diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m --- a/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m Sun Sep 25 18:24:01 2011 +0200 @@ -24,6 +24,7 @@ #import "EngineProtocolNetwork.h" #import "OverlayViewController.h" #import "StatsPageViewController.h" +#import "AudioManagerController.h" #import "ObjcExports.h" @implementation GameInterfaceBridge @@ -120,7 +121,7 @@ [localeString release]; [ipcString release]; - objcExportsInit(self.overlayController); + objcExportsInit(); // this is the pascal fuction that starts the game, wrapped around isInGame [HedgewarsAppDelegate sharedAppDelegate].isInGame = YES; @@ -154,7 +155,7 @@ [userDefaults setObject:self.savePath forKey:@"savedGamePath"]; [userDefaults synchronize]; - [HedgewarsAppDelegate pauseBackgroundMusic]; + [AudioManagerController pauseBackgroundMusic]; // SYSTEMS ARE GO!! [self startGameEngine]; @@ -164,6 +165,8 @@ [userDefaults synchronize]; // now we can remove the cover with a transition + blackView.frame = theFrame; + blackView.alpha = 1; [UIView beginAnimations:@"fade in" context:NULL]; [UIView setAnimationDuration:1]; blackView.alpha = 0; @@ -177,8 +180,7 @@ // warn our host that it's going to be visible again [self.parentController viewWillAppear:YES]; - if ([[userDefaults objectForKey:@"music"] boolValue]) - [HedgewarsAppDelegate playBackgroundMusic]; + [AudioManagerController playBackgroundMusic]; } // set up variables for a local game @@ -210,7 +212,9 @@ } -(void) gameHasEndedWithStats:(NSArray *)stats { - // display stats page + // wrap this around a retain/realse to prevent being deallocated too soon + [self retain]; + // display stats page if there is something to display if (stats != nil) { StatsPageViewController *statsPage = [[StatsPageViewController alloc] initWithStyle:UITableViewStyleGrouped]; statsPage.statsArray = stats; @@ -225,6 +229,7 @@ // can remove the savefile if the replay has ended if (self.gameType == gtSave) [[NSFileManager defaultManager] removeItemAtPath:self.savePath error:nil]; + [self release]; } @end diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/GeneralSettingsViewController.m --- a/project_files/HedgewarsMobile/Classes/GeneralSettingsViewController.m Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/GeneralSettingsViewController.m Sun Sep 25 18:24:01 2011 +0200 @@ -22,6 +22,7 @@ #import "GeneralSettingsViewController.h" #import "CommodityFunctions.h" + @implementation GeneralSettingsViewController @@ -44,7 +45,7 @@ NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; [userDefaults synchronize]; if ([[userDefaults objectForKey:@"music"] boolValue] == NO) - [HedgewarsAppDelegate stopBackgroundMusic]; + [AudioManagerController stopBackgroundMusic]; [super viewWillDisappear:animated]; } @@ -64,7 +65,7 @@ [theOtherSwitch setOn:NO animated:YES]; if (theOtherSwitch.on) - [HedgewarsAppDelegate pauseBackgroundMusic]; + [AudioManagerController pauseBackgroundMusic]; break; case 20: //musicSwitch // if switch above (sound) is off, never turn on @@ -76,9 +77,9 @@ [settings setObject:[NSNumber numberWithBool:theSwitch.on] forKey:@"music"]; if (theSwitch.on) - [HedgewarsAppDelegate playBackgroundMusic]; + [AudioManagerController playBackgroundMusic]; else - [HedgewarsAppDelegate pauseBackgroundMusic]; + [AudioManagerController pauseBackgroundMusic]; break; case 30: //alternateSwitch diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/HedgewarsAppDelegate.h --- a/project_files/HedgewarsMobile/Classes/HedgewarsAppDelegate.h Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/HedgewarsAppDelegate.h Sun Sep 25 18:24:01 2011 +0200 @@ -23,27 +23,20 @@ #import "SDL_uikitappdelegate.h" @class MainMenuViewController; -@class AVAudioPlayer; @interface HedgewarsAppDelegate : SDLUIKitDelegate { MainMenuViewController *mainViewController; UIWindow *uiwindow; UIWindow *secondWindow; BOOL isInGame; - AVAudioPlayer *backgroundMusic; } @property (nonatomic,retain) MainMenuViewController *mainViewController; @property (nonatomic,retain) UIWindow *uiwindow; @property (nonatomic,retain) UIWindow *secondWindow; @property (assign) BOOL isInGame; -@property (nonatomic,retain) AVAudioPlayer *backgroundMusic; +(HedgewarsAppDelegate *)sharedAppDelegate; -+(void) playBackgroundMusic; -+(void) pauseBackgroundMusic; -+(void) stopBackgroundMusic; -+(void) loadBackgroundMusic; @end diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/HedgewarsAppDelegate.m --- a/project_files/HedgewarsMobile/Classes/HedgewarsAppDelegate.m Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/HedgewarsAppDelegate.m Sun Sep 25 18:24:01 2011 +0200 @@ -24,7 +24,6 @@ #import "ObjcExports.h" #import "CommodityFunctions.h" #import "MainMenuViewController.h" -#import "AVFoundation/AVAudioPlayer.h" #include @@ -37,7 +36,7 @@ @end @implementation HedgewarsAppDelegate -@synthesize mainViewController, uiwindow, secondWindow, isInGame, backgroundMusic; +@synthesize mainViewController, uiwindow, secondWindow, isInGame; // convenience method +(HedgewarsAppDelegate *)sharedAppDelegate { @@ -45,34 +44,6 @@ } #pragma mark - -#pragma mark Music control -+(void) playBackgroundMusic { - if ([HedgewarsAppDelegate sharedAppDelegate].backgroundMusic == nil) - [HedgewarsAppDelegate loadBackgroundMusic]; - [[HedgewarsAppDelegate sharedAppDelegate].backgroundMusic play]; -} - -+(void) pauseBackgroundMusic { - [[HedgewarsAppDelegate sharedAppDelegate].backgroundMusic pause]; -} - -+(void) stopBackgroundMusic { - [[HedgewarsAppDelegate sharedAppDelegate].backgroundMusic stop]; -} - -+(void) loadBackgroundMusic { - NSString *musicString = [[NSBundle mainBundle] pathForResource:@"hwclassic" ofType:@"mp3"]; - AVAudioPlayer *background = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:musicString] error:nil]; - - background.delegate = nil; - background.volume = 0.4f; - background.numberOfLoops = -1; - [background prepareToPlay]; - [HedgewarsAppDelegate sharedAppDelegate].backgroundMusic = background; - [background release]; -} - -#pragma mark - #pragma mark AppDelegate methods -(id) init { if (self = [super init]){ @@ -80,7 +51,6 @@ uiwindow = nil; secondWindow = nil; isInGame = NO; - backgroundMusic = nil; } return self; } @@ -89,7 +59,6 @@ [mainViewController release]; [uiwindow release]; [secondWindow release]; - [backgroundMusic release]; [super dealloc]; } @@ -125,20 +94,19 @@ -(void) applicationDidReceiveMemoryWarning:(UIApplication *)application { // don't stop music when it is playing if (self.isInGame) { - [self.backgroundMusic stop]; - self.backgroundMusic = nil; + [AudioManagerController cleanupMemory]; MSG_MEMCLEAN(); } print_free_memory(); // don't clean mainMenuViewController here!!! } +// true multitasking with sdl works only on 4.2 and above; we close the game to avoid a black screen at return -(void) applicationWillResignActive:(UIApplication *)application { - // true multitasking with sdl works only on 4.2 and above; we close the game to avoid a black screen at return - if (self.isInGame && ([[[UIDevice currentDevice] systemVersion] floatValue] < 4.2f)) - HW_terminate(NO); + if (self.isInGame && [[[UIDevice currentDevice] systemVersion] floatValue] < 4.2f) + HW_terminate(NO); + [super applicationWillResignActive:application]; } - @end diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/HogHatViewController.m --- a/project_files/HedgewarsMobile/Classes/HogHatViewController.m Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/HogHatViewController.m Sun Sep 25 18:24:01 2011 +0200 @@ -42,8 +42,8 @@ self.hatArray = array; // load the base hog image, drawing will occure in cellForRow... - NSString *normalHogFile = [[NSString alloc] initWithFormat:@"%@/Hedgehog.png",GRAPHICS_DIRECTORY()]; - UIImage *hogSprite = [[UIImage alloc] initWithContentsOfFile:normalHogFile andCutAt:CGRectMake(96, 0, 32, 32)]; + NSString *normalHogFile = [[NSString alloc] initWithFormat:@"%@/basehat-hedgehog.png",[[NSBundle mainBundle] resourcePath]]; + UIImage *hogSprite = [[UIImage alloc] initWithContentsOfFile:normalHogFile]; [normalHogFile release]; self.normalHogSprite = hogSprite; [hogSprite release]; diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/InGameMenuViewController.m --- a/project_files/HedgewarsMobile/Classes/InGameMenuViewController.m Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/InGameMenuViewController.m Sun Sep 25 18:24:01 2011 +0200 @@ -139,7 +139,7 @@ -(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UIActionSheet *actionSheet; - UIAlertView *alert; +// UIAlertView *alert; switch ([indexPath row]) { case 0: diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/LevelViewController.m --- a/project_files/HedgewarsMobile/Classes/LevelViewController.m Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/LevelViewController.m Sun Sep 25 18:24:01 2011 +0200 @@ -119,7 +119,7 @@ cell.accessoryType = UITableViewCellAccessoryNone; } - NSString *botlevelPath = [[NSString alloc] initWithFormat:@"%@/%d.png",BOTLEVELS_DIRECTORY(),row+1]; + NSString *botlevelPath = [[NSString alloc] initWithFormat:@"%@/bot%d.png",[[NSBundle mainBundle] resourcePath],row+1]; UIImage *levelImage = [[UIImage alloc] initWithContentsOfFile:botlevelPath]; [botlevelPath release]; cell.imageView.image = levelImage; diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/MainMenuViewController.m --- a/project_files/HedgewarsMobile/Classes/MainMenuViewController.m Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/MainMenuViewController.m Sun Sep 25 18:24:01 2011 +0200 @@ -27,9 +27,11 @@ #import "AboutViewController.h" #import "SavedGamesViewController.h" #import "RestoreViewController.h" +#import "GameInterfaceBridge.h" #import "Appirater.h" #import "ServerSetup.h" + @implementation MainMenuViewController @synthesize gameConfigViewController, settingsViewController, aboutViewController, savedGamesViewController, restoreViewController; @@ -71,16 +73,19 @@ // SCHEMES - always overwrite and delete custom ones if ([[NSFileManager defaultManager] fileExistsAtPath:SCHEMES_DIRECTORY()] == YES) [[NSFileManager defaultManager] removeItemAtPath:SCHEMES_DIRECTORY() error:NULL]; - NSString *baseSchemesDir = [[NSString alloc] initWithFormat:@"%@/Settings/Schemes/",resourcesDir]; - [[NSFileManager defaultManager] copyItemAtPath:baseSchemesDir toPath:SCHEMES_DIRECTORY() error:NULL]; - [baseSchemesDir release]; + createSchemeNamed(@"Default", 0); + createSchemeNamed(@"Pro Mode", 1); + createSchemeNamed(@"Shoppa", 2); + createSchemeNamed(@"Clean Slate", 3); + createSchemeNamed(@"Minefield", 4); + createSchemeNamed(@"Barrel Mayhem", 5); + createSchemeNamed(@"Tunnel Hogs", 6); + createSchemeNamed(@"Fort Mode", 7); + createSchemeNamed(@"Timeless", 8); + createSchemeNamed(@"Thinking with Portals", 9); + createSchemeNamed(@"King Mode", 10); // WEAPONS - always overwrite - if ([[NSFileManager defaultManager] fileExistsAtPath:WEAPONS_DIRECTORY()] == NO) - [[NSFileManager defaultManager] createDirectoryAtPath:WEAPONS_DIRECTORY() - withIntermediateDirectories:YES - attributes:nil - error:NULL]; createWeaponNamed(@"Default", 0); createWeaponNamed(@"Crazy", 1); createWeaponNamed(@"Pro Mode", 2); @@ -102,9 +107,6 @@ NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; NSString *trackingVersion = [userDefaults stringForKey:@"HedgeVersion"]; - if ([[userDefaults objectForKey:@"music"] boolValue]) - [HedgewarsAppDelegate playBackgroundMusic]; - if (trackingVersion == nil || [trackingVersion isEqualToString:version] == NO) { // remove any reminder of previous games as saves are going to be wiped out [userDefaults setObject:@"" forKey:@"savedGamePath"]; @@ -118,6 +120,7 @@ // prompt for restoring any previous game NSString *saveString = [userDefaults objectForKey:@"savedGamePath"]; if (saveString != nil && [saveString isEqualToString:@""] == NO) { + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(launchRestoredGame) name:@"launchRestoredGame" object:nil]; if (self.restoreViewController == nil) { NSString *xibName = [@"RestoreViewController-" stringByAppendingString:(IS_IPAD() ? @"iPad" : @"iPhone")]; RestoreViewController *restored = [[RestoreViewController alloc] initWithNibName:xibName bundle:nil]; @@ -126,7 +129,7 @@ self.restoreViewController = restored; [restored release]; } - [self performSelector:@selector(presentModalViewController:animated:) withObject:self.restoreViewController afterDelay:0.3]; + [self performSelector:@selector(presentModalViewController:animated:) withObject:self.restoreViewController afterDelay:0.25]; } else { // let's not prompt for rating when app crashed >_> [Appirater appLaunched]; @@ -145,6 +148,10 @@ */ } +-(void) viewWillAppear:(BOOL)animated { + [AudioManagerController playBackgroundMusic]; + [super viewWillAppear:animated]; +} #pragma mark - -(IBAction) switchViews:(id) sender { @@ -153,7 +160,7 @@ NSString *xib = nil; NSString *debugStr = nil; - playSound(@"clickSound"); + [AudioManagerController playClickSound]; switch (button.tag) { case 0: if (nil == self.gameConfigViewController) { @@ -232,6 +239,15 @@ } } +#pragma mark - +-(void) launchRestoredGame { + [[NSNotificationCenter defaultCenter] removeObserver:self]; + GameInterfaceBridge *bridge = [[GameInterfaceBridge alloc] initWithController:self]; + [bridge startSaveGame:[[NSUserDefaults standardUserDefaults] objectForKey:@"savedGamePath"]]; + [bridge release]; +} + +#pragma mark - -(void) viewDidUnload { self.gameConfigViewController = nil; self.settingsViewController = nil; diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/MapConfigViewController.m --- a/project_files/HedgewarsMobile/Classes/MapConfigViewController.m Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/MapConfigViewController.m Sun Sep 25 18:24:01 2011 +0200 @@ -40,7 +40,7 @@ } -(IBAction) mapButtonPressed { - playSound(@"clickSound"); + [AudioManagerController playClickSound]; [self updatePreview]; } @@ -307,7 +307,7 @@ [self updatePreview]; oldValue = num; } - playSound(@"clickSound"); + [AudioManagerController playClickSound]; } // perform actions based on the activated section, then call updatePreview to visually update the selection @@ -316,7 +316,7 @@ NSString *mapgen, *staticmap, *mission; NSInteger newPage = self.segmentedControl.selectedSegmentIndex; - playSound(@"selSound"); + [AudioManagerController playSelectSound]; switch (newPage) { case 0: // Random mapgen = @"e$mapgen 0"; diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/MasterViewController.m --- a/project_files/HedgewarsMobile/Classes/MasterViewController.m Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/MasterViewController.m Sun Sep 25 18:24:01 2011 +0200 @@ -92,7 +92,7 @@ iconStr = [NSString stringWithFormat:@"%@/Egg.png",GRAPHICS_DIRECTORY()]; break; case 2: - iconStr = [NSString stringWithFormat:@"%@/Molotov.png",GRAPHICS_DIRECTORY()]; + iconStr = [NSString stringWithFormat:@"%@/cheese.png",GRAPHICS_DIRECTORY()]; break; case 3: iconStr = [NSString stringWithFormat:@"%@/Target.png",GRAPHICS_DIRECTORY()]; @@ -166,7 +166,7 @@ nextController.navigationItem.hidesBackButton = NO; [self.navigationController pushViewController:nextController animated:YES]; } else { - playSound(@"clickSound"); + [AudioManagerController playClickSound]; nextController.navigationItem.hidesBackButton = YES; [targetController.navigationController pushViewController:nextController animated:NO]; } diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/ObjcExports.h --- a/project_files/HedgewarsMobile/Classes/ObjcExports.h Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/ObjcExports.h Sun Sep 25 18:24:01 2011 +0200 @@ -19,16 +19,15 @@ */ -@class OverlayViewController; - -void objcExportsInit(OverlayViewController *instance); -BOOL isGameRunning(); +void objcExportsInit(void); +BOOL isGameRunning(void); void setGameRunning(BOOL value); -NSInteger cachedGrenadeTime(); -void clearView(); +NSInteger cachedGrenadeTime(void); +void clearView(void); void setGrenadeTime(NSInteger value); +BOOL isApplePhone(void); -void startSpinningProgress(); -void stopSpinningProgress(); -void saveBeganSynching(); -void saveFinishedSynching(); +void startSpinningProgress(void); +void stopSpinningProgress(void); +void saveBeganSynching(void); +void saveFinishedSynching(void); diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/ObjcExports.m --- a/project_files/HedgewarsMobile/Classes/ObjcExports.m Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/ObjcExports.m Sun Sep 25 18:24:01 2011 +0200 @@ -37,8 +37,8 @@ #pragma mark - #pragma mark functions called like oop -void objcExportsInit(OverlayViewController* instance) { - overlay_instance = instance; +void objcExportsInit() { + overlay_instance = [OverlayViewController mainOverlay]; gameRunning = NO; savedGame = NO; grenadeTime = 2; @@ -62,6 +62,10 @@ #pragma mark - #pragma mark functions called by pascal code +BOOL inline isApplePhone() { + return (IS_IPAD() == NO); +} + void startSpinningProgress() { gameRunning = NO; overlay_instance.lowerIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; @@ -102,6 +106,7 @@ void saveBeganSynching() { savedGame = YES; stopSpinningProgress(); + [[UIApplication sharedApplication] setIdleTimerDisabled:YES]; overlay_instance.view.backgroundColor = [UIColor blackColor]; overlay_instance.view.alpha = 0.75; @@ -128,6 +133,7 @@ [overlay_instance.savesIndicator stopAnimating]; [overlay_instance.savesIndicator performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:1]; + [[UIApplication sharedApplication] setIdleTimerDisabled:NO]; gameRunning = YES; } diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/OverlayViewController.h --- a/project_files/HedgewarsMobile/Classes/OverlayViewController.h Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/OverlayViewController.h Sun Sep 25 18:24:01 2011 +0200 @@ -67,6 +67,8 @@ @property (assign) NSInteger initialScreenCount; ++(OverlayViewController *)mainOverlay; + -(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event; -(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event; -(void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event; diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/OverlayViewController.m --- a/project_files/HedgewarsMobile/Classes/OverlayViewController.m Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/OverlayViewController.m Sun Sep 25 18:24:01 2011 +0200 @@ -34,6 +34,8 @@ #define doNotDim() [dimTimer setFireDate:HIDING_TIME_NEVER] +static OverlayViewController *mainOverlay; + @implementation OverlayViewController @synthesize popoverController, popupMenu, helpPage, amvc, initialScreenCount, lowerIndicator, savesIndicator, confirmButton, grenadeTimeSegment; @@ -47,17 +49,22 @@ #pragma mark - #pragma mark View Management --(id) initWithCoder:(NSCoder *)aDecoder { - if ((self = [super initWithCoder:aDecoder])) { +-(id) initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { + if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) { isAttacking = NO; isPopoverVisible = NO; initialScreenCount = (IS_DUALHEAD() ? 2 : 1); lowerIndicator = nil; savesIndicator = nil; + mainOverlay = self; } return self; } ++(OverlayViewController *)mainOverlay { + return mainOverlay; +} + -(void) viewDidLoad { // fill all the screen available as sdlview disables autoresizing CGRect rect = [[UIScreen mainScreen] bounds]; @@ -108,6 +115,7 @@ // only objects initialized in viewDidLoad should be here dimTimer = nil; + mainOverlay = nil; self.helpPage = nil; [self dismissPopover]; self.popoverController = nil; @@ -278,7 +286,7 @@ HW_backjump(); break; case 10: - playSound(@"clickSound"); + [AudioManagerController playClickSound]; clearView(); HW_pause(); if (self.amvc.isVisible && IS_DUALHEAD() == NO) { @@ -289,7 +297,7 @@ [self showPopover]; break; case 11: - playSound(@"clickSound"); + [AudioManagerController playClickSound]; clearView(); if (IS_DUALHEAD() || [[[NSUserDefaults standardUserDefaults] objectForKey:@"classic_menu"] boolValue] == NO) { diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/PascalImports.h --- a/project_files/HedgewarsMobile/Classes/PascalImports.h Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/PascalImports.h Sun Sep 25 18:24:01 2011 +0200 @@ -71,8 +71,6 @@ void *HW_getSDLWindow(void); void HW_terminate(BOOL andCloseFrontend); - void HW_suspend(void); - void HW_resume(void); void HW_setCursor(int x, int y); void HW_getCursor(int *x, int *y); diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/RestoreViewController.h --- a/project_files/HedgewarsMobile/Classes/RestoreViewController.h Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/RestoreViewController.h Sun Sep 25 18:24:01 2011 +0200 @@ -21,14 +21,11 @@ #import -@class GameInterfaceBridge; @interface RestoreViewController : UIViewController { - GameInterfaceBridge *interfaceBridge; + } -@property (nonatomic,retain) GameInterfaceBridge *interfaceBridge; - -(IBAction) buttonReleased:(id) sender; @end diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/RestoreViewController.m --- a/project_files/HedgewarsMobile/Classes/RestoreViewController.m Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/RestoreViewController.m Sun Sep 25 18:24:01 2011 +0200 @@ -23,7 +23,6 @@ #import "GameInterfaceBridge.h" @implementation RestoreViewController -@synthesize interfaceBridge; // Override to allow orientations other than the default portrait orientation. -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { @@ -36,16 +35,11 @@ NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; if (theButton.tag != 0) { - playSound(@"clickSound"); - if (self.interfaceBridge == nil) { - GameInterfaceBridge *bridge = [[GameInterfaceBridge alloc] initWithController:self.parentViewController]; - self.interfaceBridge = bridge; - [bridge release]; - } + [AudioManagerController playClickSound]; [self.parentViewController dismissModalViewControllerAnimated:NO]; - [self.interfaceBridge startSaveGame:[defaults objectForKey:@"savedGamePath"]]; + [[NSNotificationCenter defaultCenter] postNotificationName:@"launchRestoredGame" object:nil]; } else { - playSound(@"backSound"); + [AudioManagerController playBackSound]; [defaults setObject:@"" forKey:@"savedGamePath"]; [defaults synchronize]; [self.parentViewController dismissModalViewControllerAnimated:YES]; @@ -65,18 +59,14 @@ } -(void) didReceiveMemoryWarning { - // don't nil this one or it won't be able to send messages - //self.interfaceBridge = nil; [super didReceiveMemoryWarning]; } -(void) viewDidUnload { - self.interfaceBridge = nil; [super viewDidUnload]; } -(void) dealloc { - releaseAndNil(interfaceBridge); [super dealloc]; } diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/SavedGamesViewController.m --- a/project_files/HedgewarsMobile/Classes/SavedGamesViewController.m Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/SavedGamesViewController.m Sun Sep 25 18:24:01 2011 +0200 @@ -69,7 +69,7 @@ UIButton *button = (UIButton *)sender; if (button.tag == 0) { - playSound(@"backSound"); + [AudioManagerController playBackSound]; [self.tableView setEditing:NO animated:YES]; [[self parentViewController] dismissModalViewControllerAnimated:YES]; } else { diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/SchemeSettingsViewController.m --- a/project_files/HedgewarsMobile/Classes/SchemeSettingsViewController.m Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/SchemeSettingsViewController.m Sun Sep 25 18:24:01 2011 +0200 @@ -78,7 +78,7 @@ -(void) addScheme:(id) sender { NSString *fileName = [[NSString alloc] initWithFormat:@"Scheme %u.plist", [self.listOfSchemes count]]; - createSchemeNamed([fileName stringByDeletingPathExtension]); + createSchemeNamed([fileName stringByDeletingPathExtension], 0); [self.listOfSchemes addObject:fileName]; diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/SingleSchemeViewController.m --- a/project_files/HedgewarsMobile/Classes/SingleSchemeViewController.m Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/SingleSchemeViewController.m Sun Sep 25 18:24:01 2011 +0200 @@ -184,7 +184,8 @@ [label release]; } - UIImage *img = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/icon%@.png",BTN_DIRECTORY(),[[self.basicSettingList objectAtIndex:row] objectForKey:@"image"]]]; + UIImage *img = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/icon%@.png",ICONS_DIRECTORY(), + [[self.basicSettingList objectAtIndex:row] objectForKey:@"image"]]]; cell.imageView.image = img; [img release]; @@ -230,7 +231,8 @@ switcher.tag = SWITCH_TAG + row; [switcher setOn:[[[self.schemeDictionary objectForKey:@"gamemod"] objectAtIndex:row] boolValue] animated:NO]; - UIImage *image = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/btn%@.png",BTN_DIRECTORY(),[[self.gameModifierArray objectAtIndex:row] objectForKey:@"image"]]]; + UIImage *image = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/btn%@.png",ICONS_DIRECTORY(), + [[self.gameModifierArray objectAtIndex:row] objectForKey:@"image"]]]; cell.imageView.image = image; [image release]; [cell.imageView.layer setCornerRadius:7.0f]; diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/SingleTeamViewController.m --- a/project_files/HedgewarsMobile/Classes/SingleTeamViewController.m Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/SingleTeamViewController.m Sun Sep 25 18:24:01 2011 +0200 @@ -85,8 +85,8 @@ [moreArray release]; // load the base hog image, drawing will occure in cellForRow... - NSString *normalHogFile = [[NSString alloc] initWithFormat:@"%@/Hedgehog.png",GRAPHICS_DIRECTORY()]; - UIImage *hogSprite = [[UIImage alloc] initWithContentsOfFile:normalHogFile andCutAt:CGRectMake(96, 0, 32, 32)]; + NSString *normalHogFile = [[NSString alloc] initWithFormat:@"%@/basehat-hedgehog.png",[[NSBundle mainBundle] resourcePath]]; + UIImage *hogSprite = [[UIImage alloc] initWithContentsOfFile:normalHogFile]; [normalHogFile release]; self.normalHogSprite = hogSprite; [hogSprite release]; @@ -255,24 +255,25 @@ [accessoryImage release]; break; case 2: // fort - accessoryImage = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/%@-preview.png", + accessoryImage = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/%@-icon.png", FORTS_DIRECTORY(),[teamDictionary objectForKey:@"fort"]]]; - cell.imageView.image = [accessoryImage scaleToSize:CGSizeMake(32, 32)]; + cell.imageView.image = accessoryImage; [accessoryImage release]; break; case 3: // flags accessoryImage = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/%@.png", FLAGS_DIRECTORY(),[teamDictionary objectForKey:@"flag"]]]; - cell.imageView.image = [accessoryImage scaleToSize:CGSizeMake(27, 19)]; + cell.imageView.image = [accessoryImage scaleToSize:CGSizeMake(26, 18)]; cell.imageView.layer.borderWidth = 0.3; [accessoryImage release]; break; case 4: // level - accessoryImage = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/%d.png", - BOTLEVELS_DIRECTORY(),[[[[teamDictionary objectForKey:@"hedgehogs"] - objectAtIndex:0] objectForKey:@"level"] - intValue]]]; - cell.imageView.image = [accessoryImage scaleToSize:CGSizeMake(32, 32)]; + accessoryImage = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/bot%d.png", + [[NSBundle mainBundle] resourcePath], + [[[[teamDictionary objectForKey:@"hedgehogs"] + objectAtIndex:0] objectForKey:@"level"] + intValue]]]; + cell.imageView.image = accessoryImage; [accessoryImage release]; break; default: diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m --- a/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m Sun Sep 25 18:24:01 2011 +0200 @@ -165,10 +165,12 @@ weaponCell.delegate = self; } - int x = ((row*32)/(int)self.ammoStoreImage.size.height)*32; - int y = (row*32)%(int)self.ammoStoreImage.size.height; + int size = 32 * getScreenScale(); + int corners = 8 * getScreenScale(); + int x = ((row*size)/(int)(self.ammoStoreImage.size.height*getScreenScale()))*size; + int y = (row*size)%(int)(self.ammoStoreImage.size.height*getScreenScale()); - UIImage *img = [[self.ammoStoreImage cutAt:CGRectMake(x, y, 32, 32)] makeRoundCornersOfSize:CGSizeMake(7, 7)]; + UIImage *img = [[self.ammoStoreImage cutAt:CGRectMake(x, y, size, size)] makeRoundCornersOfSize:CGSizeMake(corners, corners)]; weaponCell.weaponIcon.image = img; weaponCell.weaponName.text = [NSString stringWithUTF8String:HW_getWeaponNameByIndex(row)]; weaponCell.tag = row; diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/SplitViewRootController.m --- a/project_files/HedgewarsMobile/Classes/SplitViewRootController.m Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/SplitViewRootController.m Sun Sep 25 18:24:01 2011 +0200 @@ -77,7 +77,7 @@ } -(void) dismissModalViewControllerAnimated:(BOOL)animated { - playSound(@"backSound"); + [AudioManagerController playBackSound]; [self.parentViewController dismissModalViewControllerAnimated:YES]; } diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/StatsPageViewController.m --- a/project_files/HedgewarsMobile/Classes/StatsPageViewController.m Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/StatsPageViewController.m Sun Sep 25 18:24:01 2011 +0200 @@ -21,6 +21,7 @@ #import "StatsPageViewController.h" #import "CommodityFunctions.h" +#import @implementation StatsPageViewController @synthesize statsArray; @@ -57,11 +58,11 @@ #pragma mark - #pragma mark Table view data source -(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView { - return 4; + return 3; } -(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - if (section == 0 || section == 3) + if (section == 0) return 1; else if (section == 1) return [[self.statsArray objectAtIndex:0] count]; @@ -73,14 +74,16 @@ static NSString *CellIdentifier0 = @"Cell0"; NSInteger section = [indexPath section]; NSInteger row = [indexPath row]; - NSString *imgString = @""; + NSString *imgName = @""; + NSString *imgPath = ICONS_DIRECTORY(); UITableViewCell *cell = [aTableView dequeueReusableCellWithIdentifier:CellIdentifier0]; if (cell == nil) cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier0] autorelease]; if (section == 0) { // winning team - imgString = @"StatsStar"; + imgName = @"star"; + imgPath = [[NSBundle mainBundle] resourcePath]; cell.textLabel.text = [self.statsArray objectAtIndex:1]; cell.textLabel.textColor = UICOLOR_HW_YELLOW_TEXT; } else if (section == 1) { // teams ranking @@ -92,19 +95,16 @@ blue:(color & 0xFF)/255.0f alpha:1.0f]; cell.textLabel.text = [NSString stringWithFormat:@"%d. %@ (%@ kills)", row+1, [info objectAtIndex:2], [info objectAtIndex:1]]; - imgString = [NSString stringWithFormat:@"StatsMedal%d",row+1]; + imgName = [NSString stringWithFormat:@"StatsMedal%d",row+1]; } else if (section == 2) { // general info - imgString = @"iconDamage"; + imgName = @"iconDamage"; cell.textLabel.text = [self.statsArray objectAtIndex:row + 2]; cell.textLabel.textColor = UICOLOR_HW_YELLOW_TEXT; - } else { // exit button - cell.textLabel.text = NSLocalizedString(@"Done",@""); - cell.textLabel.textColor = [UIColor whiteColor]; - cell.accessoryView = nil; - cell.imageView.image = nil; } - UIImage *img = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/%@.png",BTN_DIRECTORY(),imgString]]; + NSString *imgString = [[NSString alloc] initWithFormat:@"%@/%@.png",imgPath,imgName]; + UIImage *img = [[UIImage alloc] initWithContentsOfFile:imgString]; + [imgString release]; UIImageView *imgView = [[UIImageView alloc] initWithImage:img]; cell.imageView.image = img; [img release]; @@ -138,13 +138,42 @@ return nil; } +-(CGFloat) tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section { + return self.tableView.rowHeight + 30; +} + +-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section { + if (section == 2) { + + UIView *footer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.height * 70 / 100, self.tableView.rowHeight)]; + footer.autoresizingMask = UIViewAutoresizingFlexibleWidth; + + UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(0, 17, self.view.frame.size.height * 70 / 100, self.tableView.rowHeight)]; + button.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; + [button setTitle:NSLocalizedString(@"Done",@"") forState:UIControlStateNormal]; + [button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; + [button setTitleColor:[UIColor grayColor] forState:UIControlStateHighlighted]; + + button.titleLabel.font = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]]; + button.backgroundColor = UICOLOR_HW_ALMOSTBLACK; + [button.layer setBorderWidth:1]; + [button.layer setBorderColor:UICOLOR_HW_YELLOW_BODER.CGColor]; + [button.layer setCornerRadius:9.0f]; + [button.layer setMasksToBounds:YES]; + [button addTarget:self action:@selector(dismissView) forControlEvents:UIControlEventTouchUpInside]; + [footer addSubview:button]; + [button release]; + + return [footer autorelease]; + } else + return nil; +} + #pragma mark - -#pragma mark Table view delegate --(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - if ([indexPath section] == 3) { - playSound(@"backSound"); - [self dismissModalViewControllerAnimated:YES]; - } +#pragma mark button delegate +-(void) dismissView { + [AudioManagerController playClickSound]; + [self dismissModalViewControllerAnimated:YES]; } #pragma mark - diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/SupportViewController.m --- a/project_files/HedgewarsMobile/Classes/SupportViewController.m Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/SupportViewController.m Sun Sep 25 18:24:01 2011 +0200 @@ -64,6 +64,7 @@ static NSString *CellIdentifier = @"Cell"; NSInteger row = [indexPath row]; NSInteger section = [indexPath section]; + NSString *imgName = @""; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) @@ -71,33 +72,35 @@ NSString *rowString = [self.waysToSupport objectAtIndex:(row + section)]; cell.textLabel.text = rowString; - NSString *imgString = nil; if (section == 0) { - imgString = [BTN_DIRECTORY() stringByAppendingString:@"/StatsStar.png"]; + imgName = @"star"; cell.textLabel.textAlignment = UITextAlignmentCenter; cell.imageView.image = nil; } else { cell.textLabel.textAlignment = UITextAlignmentLeft; switch (row) { case 0: - imgString = @"fb.png"; + imgName = @"fb"; break; case 1: - imgString = @"tw.png"; + imgName = @"tw"; break; case 2: - imgString = @"Icon-Small.png"; + imgName = @"hedgehog"; break; case 3: - imgString = @"irc.png"; + imgName = @"irc"; break; default: DLog(@"No way"); break; } } + + NSString *imgString = [[NSString alloc] initWithFormat:@"%@/%@.png",[[NSBundle mainBundle] resourcePath],imgName]; UIImage *img = [[UIImage alloc] initWithContentsOfFile:imgString]; + [imgString release]; cell.imageView.image = img; if (section == 0) { UIImageView *imgView = [[UIImageView alloc] initWithImage:img]; diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/TeamConfigViewController.m --- a/project_files/HedgewarsMobile/Classes/TeamConfigViewController.m Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/TeamConfigViewController.m Sun Sep 25 18:24:01 2011 +0200 @@ -102,7 +102,9 @@ } -(UIImage *)drawHogsRepeated:(NSInteger) manyTimes { - UIImage *hogSprite = [[UIImage alloc] initWithContentsOfFile:HEDGEHOG_FILE()]; + NSString *imgString = [[NSString alloc] initWithFormat:@"%@/hedgehog.png",[[NSBundle mainBundle] resourcePath]]; + UIImage *hogSprite = [[UIImage alloc] initWithContentsOfFile:imgString]; + [imgString release]; CGFloat screenScale = getScreenScale(); int w = hogSprite.size.width * screenScale; int h = hogSprite.size.height * screenScale; @@ -185,8 +187,9 @@ NSString *teamPath = [NSString stringWithFormat:@"%@/%@.plist",TEAMS_DIRECTORY(),cell.textLabel.text]; NSDictionary *firstHog = [[[NSDictionary dictionaryWithContentsOfFile:teamPath] objectForKey:@"hedgehogs"] objectAtIndex:0]; if ([[firstHog objectForKey:@"level"] intValue] != 0) { - NSString *filePath = [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Settings/Images/robotBadge.png"]; - UIImage *sprite = [[UIImage alloc] initWithContentsOfFile:filePath]; + NSString *imgString = [[NSString alloc] initWithFormat:@"%@/robotBadge.png",[[NSBundle mainBundle] resourcePath]]; + UIImage *sprite = [[UIImage alloc] initWithContentsOfFile:imgString]; + [imgString release]; UIImageView *spriteView = [[UIImageView alloc] initWithImage:sprite]; [sprite release]; diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Classes/WeaponCellView.m --- a/project_files/HedgewarsMobile/Classes/WeaponCellView.m Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/WeaponCellView.m Sun Sep 25 18:24:01 2011 +0200 @@ -67,15 +67,18 @@ crateSli.minimumValue = 0; crateSli.tag = 400; - NSString *imgAmmoStr = [NSString stringWithFormat:@"%@/iconAmmo.png",BTN_DIRECTORY()]; - NSString *imgDamageStr = [NSString stringWithFormat:@"%@/iconDamage.png",BTN_DIRECTORY()]; - NSString *imgTimeStr = [NSString stringWithFormat:@"%@/iconTime.png",BTN_DIRECTORY()]; - NSString *imgBoxStr = [NSString stringWithFormat:@"%@/iconBox.png",BTN_DIRECTORY()]; - + NSString *imgAmmoStr = [[NSString alloc] initWithFormat:@"%@/ammopic.png",ICONS_DIRECTORY()]; initialImg = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:imgAmmoStr]]; + [imgAmmoStr release]; + NSString *imgDamageStr = [[NSString alloc] initWithFormat:@"%@/iconDamage.png",ICONS_DIRECTORY()]; probabilityImg = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:imgDamageStr]]; + [imgDamageStr release]; + NSString *imgTimeStr = [[NSString alloc] initWithFormat:@"%@/iconTime.png",ICONS_DIRECTORY()]; delayImg = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:imgTimeStr]]; + [imgTimeStr release]; + NSString *imgBoxStr = [[NSString alloc] initWithFormat:@"%@/iconBox.png",ICONS_DIRECTORY()]; crateImg = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:imgBoxStr]]; + [imgBoxStr release]; initialLab = [[UILabel alloc] init]; initialLab.backgroundColor = [UIColor clearColor]; diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj --- a/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Sun Sep 25 18:24:01 2011 +0200 @@ -50,7 +50,7 @@ 61188C0512A6FE8F0026C5DA /* Data in Resources */ = {isa = PBXBuildFile; fileRef = 61798A5E114AE08600BA94A9 /* Data */; }; 61188C0612A6FE950026C5DA /* smallerBackground@2x~iphone.png in Resources */ = {isa = PBXBuildFile; fileRef = 6172FEEC1298D25D00D73365 /* smallerBackground@2x~iphone.png */; }; 61188C0712A6FE960026C5DA /* settingsButton@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6172FECA1298CE4E00D73365 /* settingsButton@2x.png */; }; - 61188C0812A6FE9A0026C5DA /* title@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 618899811299516000D55FD6 /* title@2x.png */; }; + 61188C0812A6FE9A0026C5DA /* title@2x~iphone.png in Resources */ = {isa = PBXBuildFile; fileRef = 618899811299516000D55FD6 /* title@2x~iphone.png */; }; 61188C0912A6FE9C0026C5DA /* tw@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6103D385129B348200911D8D /* tw@2x.png */; }; 611D9BFB12497E9800008271 /* SavedGamesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 611D9BF912497E9800008271 /* SavedGamesViewController.m */; }; 611D9BFC12497E9800008271 /* SavedGamesViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 611D9BFA12497E9800008271 /* SavedGamesViewController.xib */; }; @@ -113,6 +113,28 @@ 6167A6761391514600AA6D07 /* RestoreViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6167A6741391514600AA6D07 /* RestoreViewController.m */; }; 6167A6771391514600AA6D07 /* RestoreViewController-iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6167A6751391514600AA6D07 /* RestoreViewController-iPhone.xib */; }; 6167A72D13919E6800AA6D07 /* RestoreViewController-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6167A72C13919E6800AA6D07 /* RestoreViewController-iPad.xib */; }; + 6167C87414294727003DD50F /* surprise@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6167C87314294727003DD50F /* surprise@2x.png */; }; + 6167C88C14294738003DD50F /* denied@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6167C88B14294738003DD50F /* denied@2x.png */; }; + 6167C8F51429502C003DD50F /* hedgehog.png in Resources */ = {isa = PBXBuildFile; fileRef = 6167C8EF1429502C003DD50F /* hedgehog.png */; }; + 6167C8F61429502C003DD50F /* hedgehog@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6167C8F01429502C003DD50F /* hedgehog@2x.png */; }; + 6167C8F71429502C003DD50F /* robotBadge.png in Resources */ = {isa = PBXBuildFile; fileRef = 6167C8F11429502C003DD50F /* robotBadge.png */; }; + 6167C8F81429502C003DD50F /* robotBadge@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6167C8F21429502C003DD50F /* robotBadge@2x.png */; }; + 6167C8F91429502C003DD50F /* star.png in Resources */ = {isa = PBXBuildFile; fileRef = 6167C8F31429502C003DD50F /* star.png */; }; + 6167C8FA1429502C003DD50F /* star@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6167C8F41429502C003DD50F /* star@2x.png */; }; + 6167CA37142A6ED7003DD50F /* bot0.png in Resources */ = {isa = PBXBuildFile; fileRef = 6167CA2B142A6ED7003DD50F /* bot0.png */; }; + 6167CA38142A6ED7003DD50F /* bot0@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6167CA2C142A6ED7003DD50F /* bot0@2x.png */; }; + 6167CA39142A6ED7003DD50F /* bot1.png in Resources */ = {isa = PBXBuildFile; fileRef = 6167CA2D142A6ED7003DD50F /* bot1.png */; }; + 6167CA3A142A6ED7003DD50F /* bot1@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6167CA2E142A6ED7003DD50F /* bot1@2x.png */; }; + 6167CA3B142A6ED7003DD50F /* bot2.png in Resources */ = {isa = PBXBuildFile; fileRef = 6167CA2F142A6ED7003DD50F /* bot2.png */; }; + 6167CA3C142A6ED7003DD50F /* bot2@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6167CA30142A6ED7003DD50F /* bot2@2x.png */; }; + 6167CA3D142A6ED7003DD50F /* bot3.png in Resources */ = {isa = PBXBuildFile; fileRef = 6167CA31142A6ED7003DD50F /* bot3.png */; }; + 6167CA3E142A6ED7003DD50F /* bot3@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6167CA32142A6ED7003DD50F /* bot3@2x.png */; }; + 6167CA3F142A6ED7003DD50F /* bot4.png in Resources */ = {isa = PBXBuildFile; fileRef = 6167CA33142A6ED7003DD50F /* bot4.png */; }; + 6167CA40142A6ED7003DD50F /* bot4@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6167CA34142A6ED7003DD50F /* bot4@2x.png */; }; + 6167CA41142A6ED7003DD50F /* bot5.png in Resources */ = {isa = PBXBuildFile; fileRef = 6167CA35142A6ED7003DD50F /* bot5.png */; }; + 6167CA42142A6ED7003DD50F /* bot5@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6167CA36142A6ED7003DD50F /* bot5@2x.png */; }; + 6167CB48142A8769003DD50F /* basehat-hedgehog.png in Resources */ = {isa = PBXBuildFile; fileRef = 6167CB46142A8769003DD50F /* basehat-hedgehog.png */; }; + 6167CB49142A8769003DD50F /* basehat-hedgehog@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6167CB47142A8769003DD50F /* basehat-hedgehog@2x.png */; }; 6172FED91298CF9800D73365 /* background~iphone.png in Resources */ = {isa = PBXBuildFile; fileRef = 6172FED71298CF9800D73365 /* background~iphone.png */; }; 6172FEEF1298D25D00D73365 /* mediumBackground~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 6172FEEB1298D25D00D73365 /* mediumBackground~ipad.png */; }; 6172FEF11298D25D00D73365 /* smallerBackground~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 6172FEED1298D25D00D73365 /* smallerBackground~ipad.png */; }; @@ -192,6 +214,7 @@ 61B7A61812FA13B00051E14E /* libSDL_net.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 61B7A56812FA12D00051E14E /* libSDL_net.a */; }; 61B7A61912FA13B00051E14E /* libSDL_ttf.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 61B7A59012FA13330051E14E /* libSDL_ttf.a */; }; 61C079E411F35A300072BF46 /* EditableCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 61C079E311F35A300072BF46 /* EditableCellView.m */; }; + 61C28D3F142D380400DA16C2 /* AudioManagerController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61C28D3E142D380400DA16C2 /* AudioManagerController.m */; }; 61CADE331402EE290030C3EB /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61CADE321402EE290030C3EB /* ImageIO.framework */; }; 61D205A1127CDD1100ABD83E /* ObjcExports.m in Sources */ = {isa = PBXBuildFile; fileRef = 61D205A0127CDD1100ABD83E /* ObjcExports.m */; }; 61D3D2A51290E03A003CE7C3 /* irc.png in Resources */ = {isa = PBXBuildFile; fileRef = 61D3D2A41290E03A003CE7C3 /* irc.png */; }; @@ -203,7 +226,7 @@ 61E2F7441283752C00E12521 /* fb.png in Resources */ = {isa = PBXBuildFile; fileRef = 61E2F7421283752C00E12521 /* fb.png */; }; 61E2F7451283752C00E12521 /* tw.png in Resources */ = {isa = PBXBuildFile; fileRef = 61E2F7431283752C00E12521 /* tw.png */; }; 61E5D68D12AB006F00566F29 /* uLandPainted.pas in Sources */ = {isa = PBXBuildFile; fileRef = 61E5D68C12AB006F00566F29 /* uLandPainted.pas */; }; - 61EBA62A11DFF2BC0048B68A /* title.png in Resources */ = {isa = PBXBuildFile; fileRef = 61EBA62811DFF2BC0048B68A /* title.png */; }; + 61EBA62A11DFF2BC0048B68A /* title~iphone.png in Resources */ = {isa = PBXBuildFile; fileRef = 61EBA62811DFF2BC0048B68A /* title~iphone.png */; }; 61EDB5B0135B3F97009B29A6 /* GameInterfaceBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 61EDB5AF135B3F97009B29A6 /* GameInterfaceBridge.m */; }; 61EF920E11DF57AC003441C4 /* arrowDown.png in Resources */ = {isa = PBXBuildFile; fileRef = 61EF920511DF57AC003441C4 /* arrowDown.png */; }; 61EF920F11DF57AC003441C4 /* arrowLeft.png in Resources */ = {isa = PBXBuildFile; fileRef = 61EF920611DF57AC003441C4 /* arrowLeft.png */; }; @@ -434,6 +457,28 @@ 6167A6741391514600AA6D07 /* RestoreViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RestoreViewController.m; sourceTree = ""; }; 6167A6751391514600AA6D07 /* RestoreViewController-iPhone.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "RestoreViewController-iPhone.xib"; path = "../Resources/RestoreViewController-iPhone.xib"; sourceTree = ""; }; 6167A72C13919E6800AA6D07 /* RestoreViewController-iPad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "RestoreViewController-iPad.xib"; path = "../Resources/RestoreViewController-iPad.xib"; sourceTree = ""; }; + 6167C87314294727003DD50F /* surprise@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "surprise@2x.png"; path = "Resources/surprise@2x.png"; sourceTree = ""; }; + 6167C88B14294738003DD50F /* denied@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "denied@2x.png"; path = "Resources/denied@2x.png"; sourceTree = ""; }; + 6167C8EF1429502C003DD50F /* hedgehog.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = hedgehog.png; path = Resources/Icons/hedgehog.png; sourceTree = ""; }; + 6167C8F01429502C003DD50F /* hedgehog@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "hedgehog@2x.png"; path = "Resources/Icons/hedgehog@2x.png"; sourceTree = ""; }; + 6167C8F11429502C003DD50F /* robotBadge.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = robotBadge.png; path = Resources/Icons/robotBadge.png; sourceTree = ""; }; + 6167C8F21429502C003DD50F /* robotBadge@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "robotBadge@2x.png"; path = "Resources/Icons/robotBadge@2x.png"; sourceTree = ""; }; + 6167C8F31429502C003DD50F /* star.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = star.png; path = Resources/Icons/star.png; sourceTree = ""; }; + 6167C8F41429502C003DD50F /* star@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "star@2x.png"; path = "Resources/Icons/star@2x.png"; sourceTree = ""; }; + 6167CA2B142A6ED7003DD50F /* bot0.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = bot0.png; path = Resources/Icons/bot0.png; sourceTree = ""; }; + 6167CA2C142A6ED7003DD50F /* bot0@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "bot0@2x.png"; path = "Resources/Icons/bot0@2x.png"; sourceTree = ""; }; + 6167CA2D142A6ED7003DD50F /* bot1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = bot1.png; path = Resources/Icons/bot1.png; sourceTree = ""; }; + 6167CA2E142A6ED7003DD50F /* bot1@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "bot1@2x.png"; path = "Resources/Icons/bot1@2x.png"; sourceTree = ""; }; + 6167CA2F142A6ED7003DD50F /* bot2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = bot2.png; path = Resources/Icons/bot2.png; sourceTree = ""; }; + 6167CA30142A6ED7003DD50F /* bot2@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "bot2@2x.png"; path = "Resources/Icons/bot2@2x.png"; sourceTree = ""; }; + 6167CA31142A6ED7003DD50F /* bot3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = bot3.png; path = Resources/Icons/bot3.png; sourceTree = ""; }; + 6167CA32142A6ED7003DD50F /* bot3@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "bot3@2x.png"; path = "Resources/Icons/bot3@2x.png"; sourceTree = ""; }; + 6167CA33142A6ED7003DD50F /* bot4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = bot4.png; path = Resources/Icons/bot4.png; sourceTree = ""; }; + 6167CA34142A6ED7003DD50F /* bot4@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "bot4@2x.png"; path = "Resources/Icons/bot4@2x.png"; sourceTree = ""; }; + 6167CA35142A6ED7003DD50F /* bot5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = bot5.png; path = Resources/Icons/bot5.png; sourceTree = ""; }; + 6167CA36142A6ED7003DD50F /* bot5@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "bot5@2x.png"; path = "Resources/Icons/bot5@2x.png"; sourceTree = ""; }; + 6167CB46142A8769003DD50F /* basehat-hedgehog.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "basehat-hedgehog.png"; path = "Resources/Icons/basehat-hedgehog.png"; sourceTree = ""; }; + 6167CB47142A8769003DD50F /* basehat-hedgehog@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "basehat-hedgehog@2x.png"; path = "Resources/Icons/basehat-hedgehog@2x.png"; sourceTree = ""; }; 6172FEA21298C7F900D73365 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "Resources/Icons/Default@2x.png"; sourceTree = ""; }; 6172FEC81298CE4800D73365 /* savesButton@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "savesButton@2x.png"; path = "Resources/Frontend/savesButton@2x.png"; sourceTree = ""; }; 6172FECA1298CE4E00D73365 /* settingsButton@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "settingsButton@2x.png"; path = "Resources/Frontend/settingsButton@2x.png"; sourceTree = ""; }; @@ -493,7 +538,7 @@ 61842B3D122B65BD0096E335 /* helpabove.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = helpabove.png; path = Resources/Overlay/helpabove.png; sourceTree = ""; }; 61842B3F122B66280096E335 /* helpleft.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = helpleft.png; path = Resources/Overlay/helpleft.png; sourceTree = ""; }; 6187AEA5120781B900B31A27 /* Settings */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Settings; path = Resources/Settings; sourceTree = ""; }; - 618899811299516000D55FD6 /* title@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "title@2x.png"; path = "Resources/Frontend/title@2x.png"; sourceTree = ""; }; + 618899811299516000D55FD6 /* title@2x~iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "title@2x~iphone.png"; path = "Resources/Frontend/title@2x~iphone.png"; sourceTree = ""; }; 61889984129995B500D55FD6 /* title~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "title~ipad.png"; path = "Resources/Frontend/title~ipad.png"; sourceTree = ""; }; 618E27B612A2C30700C20EF0 /* SDL_net.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL_net.xcodeproj; path = "../../../Library/SDL_net/Xcode-iPhoneOS/SDL_net.xcodeproj"; sourceTree = SOURCE_ROOT; }; 619598181364BCD200B429B6 /* Tremor.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Tremor.xcodeproj; path = ../../misc/libtremor/Xcode/Tremor.xcodeproj; sourceTree = SOURCE_ROOT; }; @@ -528,6 +573,8 @@ 61B7A33712CC21080086B604 /* StatsPageViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StatsPageViewController.m; sourceTree = ""; }; 61C079E211F35A300072BF46 /* EditableCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EditableCellView.h; path = Classes/EditableCellView.h; sourceTree = ""; }; 61C079E311F35A300072BF46 /* EditableCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = EditableCellView.m; path = Classes/EditableCellView.m; sourceTree = ""; }; + 61C28D3D142D380400DA16C2 /* AudioManagerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioManagerController.h; path = Classes/AudioManagerController.h; sourceTree = ""; }; + 61C28D3E142D380400DA16C2 /* AudioManagerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AudioManagerController.m; path = Classes/AudioManagerController.m; sourceTree = ""; }; 61CADE321402EE290030C3EB /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; }; 61D2059F127CDD1100ABD83E /* ObjcExports.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ObjcExports.h; path = Classes/ObjcExports.h; sourceTree = ""; }; 61D205A0127CDD1100ABD83E /* ObjcExports.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ObjcExports.m; path = Classes/ObjcExports.m; sourceTree = ""; }; @@ -542,7 +589,7 @@ 61E2F7421283752C00E12521 /* fb.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = fb.png; path = Resources/Icons/fb.png; sourceTree = ""; }; 61E2F7431283752C00E12521 /* tw.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = tw.png; path = Resources/Icons/tw.png; sourceTree = ""; }; 61E5D68C12AB006F00566F29 /* uLandPainted.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = uLandPainted.pas; path = ../../hedgewars/uLandPainted.pas; sourceTree = SOURCE_ROOT; }; - 61EBA62811DFF2BC0048B68A /* title.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = title.png; path = Resources/Frontend/title.png; sourceTree = ""; }; + 61EBA62811DFF2BC0048B68A /* title~iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "title~iphone.png"; path = "Resources/Frontend/title~iphone.png"; sourceTree = ""; }; 61EDB5AE135B3F97009B29A6 /* GameInterfaceBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GameInterfaceBridge.h; sourceTree = ""; }; 61EDB5AF135B3F97009B29A6 /* GameInterfaceBridge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GameInterfaceBridge.m; sourceTree = ""; }; 61EF920511DF57AC003441C4 /* arrowDown.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = arrowDown.png; path = Resources/Overlay/arrowDown.png; sourceTree = ""; }; @@ -653,11 +700,13 @@ 29B97315FDCFA39411CA2CEA /* Other Sources */ = { isa = PBXGroup; children = ( + 61DE91561258B76800B80214 /* Custom UIs */, 61AC067212B2E32D000B52A2 /* Appirater.h */, 61AC067312B2E32D000B52A2 /* Appirater.m */, + 61C28D3D142D380400DA16C2 /* AudioManagerController.h */, + 61C28D3E142D380400DA16C2 /* AudioManagerController.m */, 6165929C11CA9E2F00D6E256 /* HedgewarsAppDelegate.h */, 6165929D11CA9E2F00D6E256 /* HedgewarsAppDelegate.m */, - 61DE91561258B76800B80214 /* Custom UIs */, 32CA4F630368D1EE00C91783 /* Hedgewars_Prefix.pch */, 61A97F0E136F675A00DD9878 /* hwconsts.h */, 6165922911CA9BD500D6E256 /* PascalImports.h */, @@ -678,8 +727,6 @@ 29B97317FDCFA39411CA2CEA /* Resources */ = { isa = PBXGroup; children = ( - 612CABCA1391D3D1005E9596 /* Sounds */, - 6199E86C12464A8E00DADF8C /* surprise.png */, 611EEBC0122B34A800DF6938 /* helpingame.png */, 611EEC30122B54D700DF6938 /* helpplain.png */, 611EEBC2122B355700DF6938 /* helpbottom.png */, @@ -687,6 +734,10 @@ 611EEBC3122B355700DF6938 /* helpright.png */, 61842B3F122B66280096E335 /* helpleft.png */, 6129B9F611EFB04D0017E305 /* denied.png */, + 6167C88B14294738003DD50F /* denied@2x.png */, + 6199E86C12464A8E00DADF8C /* surprise.png */, + 6167C87314294727003DD50F /* surprise@2x.png */, + 612CABCA1391D3D1005E9596 /* Sounds */, 61F7A42811E2905C0040BA66 /* Icons */, 61F903FA11DF58680068B24D /* Frontend */, 6179936611501D1E00BA94A9 /* Overlay */, @@ -726,8 +777,6 @@ 611D9BF312497B7700008271 /* Other Controllers */ = { isa = PBXGroup; children = ( - 61B7A33612CC21080086B604 /* StatsPageViewController.h */, - 61B7A33712CC21080086B604 /* StatsPageViewController.m */, 61F2E7CB1205EDE0005734F7 /* AboutViewController.h */, 61F2E7CC1205EDE0005734F7 /* AboutViewController.m */, 61F2E7CD1205EDE0005734F7 /* AboutViewController.xib */, @@ -738,6 +787,8 @@ 611D9BF812497E9800008271 /* SavedGamesViewController.h */, 611D9BF912497E9800008271 /* SavedGamesViewController.m */, 611D9BFA12497E9800008271 /* SavedGamesViewController.xib */, + 61B7A33612CC21080086B604 /* StatsPageViewController.h */, + 61B7A33712CC21080086B604 /* StatsPageViewController.m */, ); name = "Other Controllers"; sourceTree = ""; @@ -984,6 +1035,26 @@ 6103D383129B346A00911D8D /* fb@2x.png */, 61E2F7431283752C00E12521 /* tw.png */, 6103D385129B348200911D8D /* tw@2x.png */, + 6167C8EF1429502C003DD50F /* hedgehog.png */, + 6167C8F01429502C003DD50F /* hedgehog@2x.png */, + 6167C8F11429502C003DD50F /* robotBadge.png */, + 6167C8F21429502C003DD50F /* robotBadge@2x.png */, + 6167C8F31429502C003DD50F /* star.png */, + 6167C8F41429502C003DD50F /* star@2x.png */, + 6167CB46142A8769003DD50F /* basehat-hedgehog.png */, + 6167CB47142A8769003DD50F /* basehat-hedgehog@2x.png */, + 6167CA2B142A6ED7003DD50F /* bot0.png */, + 6167CA2C142A6ED7003DD50F /* bot0@2x.png */, + 6167CA2D142A6ED7003DD50F /* bot1.png */, + 6167CA2E142A6ED7003DD50F /* bot1@2x.png */, + 6167CA2F142A6ED7003DD50F /* bot2.png */, + 6167CA30142A6ED7003DD50F /* bot2@2x.png */, + 6167CA31142A6ED7003DD50F /* bot3.png */, + 6167CA32142A6ED7003DD50F /* bot3@2x.png */, + 6167CA33142A6ED7003DD50F /* bot4.png */, + 6167CA34142A6ED7003DD50F /* bot4@2x.png */, + 6167CA35142A6ED7003DD50F /* bot5.png */, + 6167CA36142A6ED7003DD50F /* bot5@2x.png */, 6183D83C11E2BCE200A88903 /* Default-ipad-Landscape.png */, 6183D83D11E2BCE200A88903 /* Default.png */, 6172FEA21298C7F900D73365 /* Default@2x.png */, @@ -1013,8 +1084,8 @@ 615FEAE012A2A6640098EE92 /* localplayButton~iphone.png */, 615FEADF12A2A6640098EE92 /* localplayButton~ipad.png */, 61F9040D11DF59D10068B24D /* netplayButton.png */, - 61EBA62811DFF2BC0048B68A /* title.png */, - 618899811299516000D55FD6 /* title@2x.png */, + 61EBA62811DFF2BC0048B68A /* title~iphone.png */, + 618899811299516000D55FD6 /* title@2x~iphone.png */, 61889984129995B500D55FD6 /* title~ipad.png */, 6174F7C612CD62E300205D6F /* smallerTitle.png */, 6174F7C712CD62E300205D6F /* smallerTitle@2x.png */, @@ -1274,7 +1345,7 @@ 61EF921411DF57AC003441C4 /* joyButtonForwardJump.png in Resources */, 61F9040911DF58B00068B24D /* settingsButton.png in Resources */, 61F9040B11DF59370068B24D /* background.png in Resources */, - 61EBA62A11DFF2BC0048B68A /* title.png in Resources */, + 61EBA62A11DFF2BC0048B68A /* title~iphone.png in Resources */, 61F7A43811E290650040BA66 /* Icon-72.png in Resources */, 61F7A43911E290650040BA66 /* Icon-Small-50.png in Resources */, 61F7A43A11E290650040BA66 /* Icon-Small.png in Resources */, @@ -1342,13 +1413,35 @@ 61188C0512A6FE8F0026C5DA /* Data in Resources */, 61188C0612A6FE950026C5DA /* smallerBackground@2x~iphone.png in Resources */, 61188C0712A6FE960026C5DA /* settingsButton@2x.png in Resources */, - 61188C0812A6FE9A0026C5DA /* title@2x.png in Resources */, + 61188C0812A6FE9A0026C5DA /* title@2x~iphone.png in Resources */, 61188C0912A6FE9C0026C5DA /* tw@2x.png in Resources */, 6174F7C812CD62E300205D6F /* smallerTitle.png in Resources */, 6174F7C912CD62E300205D6F /* smallerTitle@2x.png in Resources */, 6167A6771391514600AA6D07 /* RestoreViewController-iPhone.xib in Resources */, 6167A72D13919E6800AA6D07 /* RestoreViewController-iPad.xib in Resources */, 612CABC81391D3CC005E9596 /* hwclassic.mp3 in Resources */, + 6167C87414294727003DD50F /* surprise@2x.png in Resources */, + 6167C88C14294738003DD50F /* denied@2x.png in Resources */, + 6167C8F51429502C003DD50F /* hedgehog.png in Resources */, + 6167C8F61429502C003DD50F /* hedgehog@2x.png in Resources */, + 6167C8F71429502C003DD50F /* robotBadge.png in Resources */, + 6167C8F81429502C003DD50F /* robotBadge@2x.png in Resources */, + 6167C8F91429502C003DD50F /* star.png in Resources */, + 6167C8FA1429502C003DD50F /* star@2x.png in Resources */, + 6167CA37142A6ED7003DD50F /* bot0.png in Resources */, + 6167CA38142A6ED7003DD50F /* bot0@2x.png in Resources */, + 6167CA39142A6ED7003DD50F /* bot1.png in Resources */, + 6167CA3A142A6ED7003DD50F /* bot1@2x.png in Resources */, + 6167CA3B142A6ED7003DD50F /* bot2.png in Resources */, + 6167CA3C142A6ED7003DD50F /* bot2@2x.png in Resources */, + 6167CA3D142A6ED7003DD50F /* bot3.png in Resources */, + 6167CA3E142A6ED7003DD50F /* bot3@2x.png in Resources */, + 6167CA3F142A6ED7003DD50F /* bot4.png in Resources */, + 6167CA40142A6ED7003DD50F /* bot4@2x.png in Resources */, + 6167CA41142A6ED7003DD50F /* bot5.png in Resources */, + 6167CA42142A6ED7003DD50F /* bot5@2x.png in Resources */, + 6167CB48142A8769003DD50F /* basehat-hedgehog.png in Resources */, + 6167CB49142A8769003DD50F /* basehat-hedgehog@2x.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1366,7 +1459,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "#copy new stuff over old stuff\nrm -rf ${PROJECT_DIR}/Data\n\n#create config.inc\necho \"Updating config file...\"\nPROTO=`cat ${PROJECT_DIR}/../../CMakeLists.txt | grep HEDGEWARS_PROTO_VER | cut -d ' ' -f 2 | cut -d ')' -f 1`\nMAJN=`cat ${PROJECT_DIR}/../../CMakeLists.txt | grep CPACK_PACKAGE_VERSION_MAJOR | xargs | cut -d ' ' -f 2 |cut -d ')' -f 1`\nMINN=`cat ${PROJECT_DIR}/../../CMakeLists.txt | grep CPACK_PACKAGE_VERSION_MINOR | xargs | cut -d ' ' -f 2 |cut -d ')' -f 1`\nPATN=`cat ${PROJECT_DIR}/../../CMakeLists.txt | grep CPACK_PACKAGE_VERSION_PATCH | xargs | cut -d ' ' -f 2 | cut -d '$' -f 1`\nREVN=-`/usr/local/bin/hg id -n ${PROJECT_DIR}/../../`\necho \"const cNetProtoVersion = $PROTO; const cVersionString = '${MAJN}.${MINN}.${PATN}${REVN}'; const cLuaLibrary = '';\" > ${PROJECT_DIR}/../../hedgewars/config.inc\n\necho \"Copying Data...\"\ncp -R ${PROJECT_DIR}/../../share/hedgewars/Data ${PROJECT_DIR}/Data\n\n#copy some files from QTfrontend/res\necho \"Fetching additional graphics from QTfrontend/res...\"\nmkdir ${PROJECT_DIR}/Data/Graphics/Btn\ncp ${PROJECT_DIR}/../../QTfrontend/res/btn*.png ${PROJECT_DIR}/Data/Graphics/Btn/\ncp ${PROJECT_DIR}/../../QTfrontend/res/icon*.png ${PROJECT_DIR}/Data/Graphics/Btn/\ncp ${PROJECT_DIR}/../../QTfrontend/res/StatsMedal*.png ${PROJECT_DIR}/Data/Graphics/Btn/\ncp ${PROJECT_DIR}/../../QTfrontend/res/StatsR.png ${PROJECT_DIR}/Data/Graphics/Btn/StatsStar.png\ncp ${PROJECT_DIR}/../../QTfrontend/res/ammopic.png ${PROJECT_DIR}/Data/Graphics/Btn/iconAmmo.png\ncp -R ${PROJECT_DIR}/../../QTfrontend/res/botlevels ${PROJECT_DIR}/Data/Graphics/Hedgehog/botlevels/\n\necho \"Removing text and dummy files...\"\n#delete all CMakeLists.txt and image source files\nfind ${PROJECT_DIR}/Data -name CMakeLists.txt -delete\nfind ${PROJECT_DIR}/Data -name *.svg -delete\nfind ${PROJECT_DIR}/Data -name *.svgz -delete\nfind ${PROJECT_DIR}/Data -name *.sifz -delete\nfind ${PROJECT_DIR}/Data -name *.xcf -delete\nfind ${PROJECT_DIR}/Data -name *.orig -delete\n\n#delete desktop frontend translation\nrm -rf ${PROJECT_DIR}/Data/Locale/hedgewars_*\n\n#delete dummy maps and hats, misc stuff\nrm -rf ${PROJECT_DIR}/Data/Maps/{test*,Ruler}\nrm -rf ${PROJECT_DIR}/Data/Graphics/Hats/{TeamCap,TeamHeadband,TeamHair}\nrm -rf ${PROJECT_DIR}/Data/misc/\n\n#delete forbidden maps and WIP themes (remember to check that no Map uses them)\nrm -rf ${PROJECT_DIR}/Data/Maps/{Cheese,FlightJoust}\nrm -rf ${PROJECT_DIR}/Data/Themes/{Beach,Digital}\n\n#delete unused fonts\nrm -rf ${PROJECT_DIR}/Data/Fonts/{wqy-zenhei.ttc,DroidSansFallback.ttf}\n\n#delete all names, reserved hats\nrm -rf ${PROJECT_DIR}/Data/Names/\nrm -rf ${PROJECT_DIR}/Data/Graphics/Hats/Reserved/\n\necho \"Handling audio files...\"\n#delete the Classic voice\nrm -rf ${PROJECT_DIR}/Data/Sounds/voices/Classic\n#delete the main theme file\nrm -rf ${PROJECT_DIR}/Data/Music/main_theme.ogg\n#copy mono audio\ncp -R ${PROJECT_DIR}/Audio/* ${PROJECT_DIR}/Data/\n#remove unused voices\nfor i in {Amazing,Brilliant,Bugger,Bungee,Cutitout,Drat,Excellent,Fire,FlawlessPossibility,Gonnagetyou,Grenade,Hmm,Justyouwait,Leavemealone,Ohdear,Ouch,Perfect,Revenge,Runaway,Solong,Thisoneismine,VictoryPossibility,Watchthis,Whatthe,Whoopsee}; do find Data/Sounds/voices/ -name $i.ogg -delete; done\n\necho \"Tweaking Data contents...\"\n#move Lua maps in Missions\nmkdir ${PROJECT_DIR}/Data/Missions/Maps/\nmv ${PROJECT_DIR}/Data/Maps/{Basketball,Knockball,TrophyRace,CTF_Blizzard,Control} ${PROJECT_DIR}/Data/Missions/Maps/\n#workaround for missing map in CTF_Blizzard\nln -s ../../../Maps/Blizzard/map.png ${PROJECT_DIR}/Data/Missions/Maps/CTF_Blizzard/map.png\n#remove cfg files since we have plists\nfind ${PROJECT_DIR}/Data/Scripts -name *.cfg -delete\n\n#reduce the number of flakes for City\nawk '{if ($1 == 1500) $1=40; print $0}' < ${PROJECT_DIR}/Data/Themes/City/theme.cfg > /tmp/tempfile\nmv /tmp/tempfile ${PROJECT_DIR}/Data/Themes/City/theme.cfg\n\necho \"Done\""; + shellScript = "#copy new stuff over old stuff\nrm -rf ${PROJECT_DIR}/Data\n\n#create config.inc\necho \"Updating config file...\"\nPROTO=`cat ${PROJECT_DIR}/../../CMakeLists.txt | grep HEDGEWARS_PROTO_VER | cut -d ' ' -f 2 | cut -d ')' -f 1`\nMAJN=`cat ${PROJECT_DIR}/../../CMakeLists.txt | grep CPACK_PACKAGE_VERSION_MAJOR | xargs | cut -d ' ' -f 2 |cut -d ')' -f 1`\nMINN=`cat ${PROJECT_DIR}/../../CMakeLists.txt | grep CPACK_PACKAGE_VERSION_MINOR | xargs | cut -d ' ' -f 2 |cut -d ')' -f 1`\nPATN=`cat ${PROJECT_DIR}/../../CMakeLists.txt | grep CPACK_PACKAGE_VERSION_PATCH | xargs | cut -d ' ' -f 2 |cut -d '$' -f 1`\nREVN=-`/usr/local/bin/hg id -n ${PROJECT_DIR}/../../`\necho \"const cNetProtoVersion = $PROTO; const cVersionString = '${MAJN}.${MINN}.${PATN}${REVN}'; const cLuaLibrary = '';\" > ${PROJECT_DIR}/../../hedgewars/config.inc\n\necho \"Copying Data...\"\ncp -R ${PROJECT_DIR}/../../share/hedgewars/Data ${PROJECT_DIR}/Data\n\n#copy some files from QTfrontend/res\necho \"Fetching additional graphics from QTfrontend...\"\nmkdir ${PROJECT_DIR}/Data/Graphics/Icons\ncp ${PROJECT_DIR}/../../QTfrontend/res/{btn*,icon*,StatsMedal*,ammopic*}.png ${PROJECT_DIR}/Data/Graphics/Icons/\n\necho \"Removing text and dummy files...\"\n#delete all CMakeLists.txt and image source files\nfind ${PROJECT_DIR}/Data -name CMakeLists.txt -delete\nfind ${PROJECT_DIR}/Data -name *.svg* -delete\nfind ${PROJECT_DIR}/Data -name *.psd -delete\nfind ${PROJECT_DIR}/Data -name *.sifz -delete\nfind ${PROJECT_DIR}/Data -name *.xcf -delete\nfind ${PROJECT_DIR}/Data -name *.orig -delete\nfind ${PROJECT_DIR}/Data -name *.ts -delete\n\n#delete dummy maps and hats, misc stuff\nrm -rf ${PROJECT_DIR}/Data/Maps/test*\nrm -rf ${PROJECT_DIR}/Data/Graphics/Hats/{TeamCap,TeamHeadband,TeamHair}\nrm -rf ${PROJECT_DIR}/Data/misc/\n\n#delete forbidden maps and WIP themes (remember to check that no Map uses them)\nrm -rf ${PROJECT_DIR}/Data/Maps/{Cheese,FlightJoust}\nrm -rf ${PROJECT_DIR}/Data/Themes/{Beach,Digital}\n\n#delete all names, reserved hats and unused fonts\nrm -rf ${PROJECT_DIR}/Data/Names/\nrm -rf ${PROJECT_DIR}/Data/Graphics/Hats/Reserved/\nrm -rf ${PROJECT_DIR}/Data/Fonts/{wqy-zenhei.ttc,DroidSansFallback.ttf}\n\necho \"Handling audio files...\"\n#delete the Classic voice\nrm -rf ${PROJECT_DIR}/Data/Sounds/voices/Classic\n#delete the main theme file\nrm -rf ${PROJECT_DIR}/Data/Music/main_theme.ogg\n#copy mono audio\ncp -R ${PROJECT_DIR}/Audio/* ${PROJECT_DIR}/Data/\n#remove unused voices\nfor i in {Amazing,Brilliant,Bugger,Bungee,Cutitout,Drat,Excellent,Fire,FlawlessPossibility,Gonnagetyou,Grenade,Hmm,Justyouwait,Leavemealone,Ohdear,Ouch,Perfect,Revenge,Runaway,Solong,Thisoneismine,VictoryPossibility,Watchthis,Whatthe,Whoopsee}; do find Data/Sounds/voices/ -name $i.ogg -delete; done\n\necho \"Tweaking Data contents...\"\n#move Lua maps in Missions\nmkdir ${PROJECT_DIR}/Data/Missions/Maps/\nfor i in `ls ${PROJECT_DIR}/Data/Maps/`; do if [[ `ls -f ${PROJECT_DIR}/Data/Maps/$i/map.lua 2> /dev/null` != '' ]]; then mv ${PROJECT_DIR}/Data/Maps/$i ${PROJECT_DIR}/Data/Missions/Maps/; fi; done;\n#workaround for missing map in CTF_Blizzard\nln -s ../../../Maps/Blizzard/map.png ${PROJECT_DIR}/Data/Missions/Maps/CTF_Blizzard/map.png\n#remove cfg files since we have plists\nfind ${PROJECT_DIR}/Data/Scripts -name *.cfg -delete\nif ((`ls ${PROJECT_DIR}/Data/Scripts/Multiplayer/*.lua|wc -l` >= `ls ${PROJECT_DIR}/Data/Scripts/plist/*.plist|wc -l` ))\nthen\necho \"${PROJECT_DIR}/Data/Scripts/Multiplayer/Normal.plist:0: warning, missing plist implementation of a Multiplayer script file\"\nfi\n\n#reduce the number of flakes for City\nsed -ie 's/1500/50/' ${PROJECT_DIR}/Data/Themes/City/theme.cfg\n\necho \"Done\""; showEnvVarsInLog = 0; }; 9283011B0F10CB2D00CC5A3C /* Build libfpc.a */ = { @@ -1501,6 +1594,7 @@ 61EDB5B0135B3F97009B29A6 /* GameInterfaceBridge.m in Sources */, 61A976B3136F668500DD9878 /* uCursor.pas in Sources */, 6167A6761391514600AA6D07 /* RestoreViewController.m in Sources */, + 61C28D3F142D380400DA16C2 /* AudioManagerController.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1547,10 +1641,10 @@ CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; FPC_COMMON_OPTIONS = "-dIPHONEOS -Cs2000000 -vwi -B -Sgix"; - FPC_COMPILER_BINARY_DIR = /usr/local/lib/fpc/2.5.1; + FPC_COMPILER_BINARY_DIR = /usr/local/lib/fpc/2.7.1; FPC_MAIN_FILE = "$(PROJECT_DIR)/../../hedgewars/hwLibrary.pas"; FPC_RTL_UNITS_BASE = /usr/local/lib/fpc; - FPC_SPECIFIC_OPTIONS = "-Ci- -Cr- -Co- -O-2 -Xs -Cfvfpv2 -dNOCONSOLE"; + FPC_SPECIFIC_OPTIONS = "-Ci- -Cr- -Co- -Os -Xs -Cfvfpv3 -dNOCONSOLE"; FPC_UNITS_PATH = "-Fu\"$(PROJECT_DIR)\""; GCC_C_LANGUAGE_STANDARD = c99; GCC_DEBUGGING_SYMBOLS = default; @@ -1630,10 +1724,10 @@ CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; FPC_COMMON_OPTIONS = "-dIPHONEOS -Cs2000000 -vwi -B -Sgix"; - FPC_COMPILER_BINARY_DIR = /usr/local/lib/fpc/2.5.1; + FPC_COMPILER_BINARY_DIR = /usr/local/lib/fpc/2.7.1; FPC_MAIN_FILE = "$(PROJECT_DIR)/../../hedgewars/hwLibrary.pas"; FPC_RTL_UNITS_BASE = /usr/local/lib/fpc; - FPC_SPECIFIC_OPTIONS = "-dDEBUGFILE -O- -g -gl -gw2 -gt -ghttt -Xs- -Cfvfpv2"; + FPC_SPECIFIC_OPTIONS = "-dDEBUGFILE -O- -g -gl -gw2 -gt -ghttt -Xs- -Cfvfpv3"; FPC_UNITS_PATH = "-Fu\"$(PROJECT_DIR)\""; GCC_C_LANGUAGE_STANDARD = c99; GCC_DEBUGGING_SYMBOLS = full; @@ -1802,10 +1896,10 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; FPC_COMMON_OPTIONS = "-dIPHONEOS -Cs2000000 -vwi -B -Sgix"; - FPC_COMPILER_BINARY_DIR = /usr/local/lib/fpc/2.5.1; + FPC_COMPILER_BINARY_DIR = /usr/local/lib/fpc/2.7.1; FPC_MAIN_FILE = "$(PROJECT_DIR)/../../hedgewars/hwLibrary.pas"; FPC_RTL_UNITS_BASE = /usr/local/lib/fpc; - FPC_SPECIFIC_OPTIONS = "-Ci- -Cr- -Co- -O-2 -Xs -Cfvfpv2 -dDEBUGFILE"; + FPC_SPECIFIC_OPTIONS = "-Ci- -Cr- -Co- -Os -Xs -Cfvfpv3 -dDEBUGFILE"; FPC_UNITS_PATH = "-Fu\"$(PROJECT_DIR)\""; GCC_C_LANGUAGE_STANDARD = c99; GCC_DEBUGGING_SYMBOLS = default; diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Hedgewars_Prefix.pch --- a/project_files/HedgewarsMobile/Hedgewars_Prefix.pch Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Hedgewars_Prefix.pch Sun Sep 25 18:24:01 2011 +0200 @@ -28,10 +28,7 @@ #import "UIImageExtra.h" #import "CommodityFunctions.h" #import "HedgewarsAppDelegate.h" -#import "SDL.h" -#import "SDL_video.h" -#import "SDL_net.h" -#import "SDL_mixer.h" +#import "AudioManagerController.h" #endif diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Info.plist --- a/project_files/HedgewarsMobile/Info.plist Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Info.plist Sun Sep 25 18:24:01 2011 +0200 @@ -28,13 +28,15 @@ CFBundleSignature ???? CFBundleVersion - 1.3.1 + 1.3.2 LSRequiresIPhoneOS + UIPrerenderedIcon + + UIStatusBarHidden + UILaunchImageFile~ipad Default-ipad - UIStatusBarHidden - UISupportedInterfaceOrientations UIInterfaceOrientationLandscapeLeft diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Frontend/background@2x~iphone.png diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Frontend/localplayButton@2x~iphone.png diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Frontend/smallerBackground@2x~iphone.png diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Frontend/title.png Binary file project_files/HedgewarsMobile/Resources/Frontend/title.png has changed diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Frontend/title@2x.png Binary file project_files/HedgewarsMobile/Resources/Frontend/title@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Frontend/title@2x~iphone.png Binary file project_files/HedgewarsMobile/Resources/Frontend/title@2x~iphone.png has changed diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Frontend/title~iphone.png Binary file project_files/HedgewarsMobile/Resources/Frontend/title~iphone.png has changed diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Icons/basehat-hedgehog.png Binary file project_files/HedgewarsMobile/Resources/Icons/basehat-hedgehog.png has changed diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Icons/basehat-hedgehog@2x.png Binary file project_files/HedgewarsMobile/Resources/Icons/basehat-hedgehog@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Icons/bot0.png Binary file project_files/HedgewarsMobile/Resources/Icons/bot0.png has changed diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Icons/bot0@2x.png Binary file project_files/HedgewarsMobile/Resources/Icons/bot0@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Icons/bot1.png Binary file project_files/HedgewarsMobile/Resources/Icons/bot1.png has changed diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Icons/bot1@2x.png Binary file project_files/HedgewarsMobile/Resources/Icons/bot1@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Icons/bot2.png Binary file project_files/HedgewarsMobile/Resources/Icons/bot2.png has changed diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Icons/bot2@2x.png Binary file project_files/HedgewarsMobile/Resources/Icons/bot2@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Icons/bot3.png Binary file project_files/HedgewarsMobile/Resources/Icons/bot3.png has changed diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Icons/bot3@2x.png Binary file project_files/HedgewarsMobile/Resources/Icons/bot3@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Icons/bot4.png Binary file project_files/HedgewarsMobile/Resources/Icons/bot4.png has changed diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Icons/bot4@2x.png Binary file project_files/HedgewarsMobile/Resources/Icons/bot4@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Icons/bot5.png Binary file project_files/HedgewarsMobile/Resources/Icons/bot5.png has changed diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Icons/bot5@2x.png Binary file project_files/HedgewarsMobile/Resources/Icons/bot5@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Icons/hedgehog.png Binary file project_files/HedgewarsMobile/Resources/Icons/hedgehog.png has changed diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Icons/hedgehog@2x.png Binary file project_files/HedgewarsMobile/Resources/Icons/hedgehog@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Icons/robotBadge.png Binary file project_files/HedgewarsMobile/Resources/Icons/robotBadge.png has changed diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Icons/robotBadge@2x.png Binary file project_files/HedgewarsMobile/Resources/Icons/robotBadge@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Icons/star.png Binary file project_files/HedgewarsMobile/Resources/Icons/star.png has changed diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Icons/star@2x.png Binary file project_files/HedgewarsMobile/Resources/Icons/star@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/MainMenuViewController-iPhone.xib --- a/project_files/HedgewarsMobile/Resources/MainMenuViewController-iPhone.xib Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Resources/MainMenuViewController-iPhone.xib Sun Sep 25 18:24:01 2011 +0200 @@ -2,9 +2,9 @@ 1056 - 10H574 + 10K549 823 - 1038.35 + 1038.36 461.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -12,7 +12,7 @@ YES - + YES @@ -71,7 +71,7 @@ IBCocoaTouchFramework NSImage - title.png + title~iphone.png @@ -631,7 +631,7 @@ localplayButton~iphone.png savesButton.png settingsButton.png - title.png + title~iphone.png YES diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/RestoreViewController-iPad.xib --- a/project_files/HedgewarsMobile/Resources/RestoreViewController-iPad.xib Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Resources/RestoreViewController-iPad.xib Sun Sep 25 18:24:01 2011 +0200 @@ -2,9 +2,9 @@ 1056 - 10J869 + 10K549 823 - 1038.35 + 1038.36 461.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -105,8 +105,8 @@ 16 - 1 - MSAxIDAAA + 2 + MSAwLjc4MDM5MjIyOTYgMAA 1 @@ -305,7 +305,7 @@ YES RestoreViewController UIResponder - {{640, 244}, {540, 640}} + {{566, 244}, {540, 640}} com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/RestoreViewController-iPhone.xib --- a/project_files/HedgewarsMobile/Resources/RestoreViewController-iPhone.xib Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Resources/RestoreViewController-iPhone.xib Sun Sep 25 18:24:01 2011 +0200 @@ -2,9 +2,9 @@ 1056 - 10J869 + 10K549 823 - 1038.35 + 1038.36 461.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -71,8 +71,8 @@ 16 - 1 - MSAxIDAAA + 2 + MSAwLjgyNzQ1MTA1MDMgMAA 3 diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Settings/Images/hedgehog.png Binary file project_files/HedgewarsMobile/Resources/Settings/Images/hedgehog.png has changed diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Settings/Images/hedgehog@2x.png Binary file project_files/HedgewarsMobile/Resources/Settings/Images/hedgehog@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Settings/Images/robotBadge.png Binary file project_files/HedgewarsMobile/Resources/Settings/Images/robotBadge.png has changed diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Settings/Images/robotBadge@2x.png Binary file project_files/HedgewarsMobile/Resources/Settings/Images/robotBadge@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Settings/Schemes/Barrel Mayhem.plist --- a/project_files/HedgewarsMobile/Resources/Settings/Schemes/Barrel Mayhem.plist Sun Sep 25 18:22:12 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ - - - - - basic - - 100 - 100 - 30 - 15 - 47 - 5 - 100 - 0 - 35 - 25 - 0 - 0 - 0 - 40 - - gamemod - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Settings/Schemes/Clean Slate.plist --- a/project_files/HedgewarsMobile/Resources/Settings/Schemes/Clean Slate.plist Sun Sep 25 18:22:12 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ - - - - - basic - - 100 - 100 - 45 - 15 - 47 - 5 - 100 - 5 - 35 - 25 - 3 - 4 - 0 - 2 - - gamemod - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Settings/Schemes/Default.plist --- a/project_files/HedgewarsMobile/Resources/Settings/Schemes/Default.plist Sun Sep 25 18:22:12 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ - - - - - basic - - 100 - 100 - 45 - 15 - 47 - 5 - 100 - 5 - 35 - 25 - 3 - 4 - 0 - 2 - - gamemod - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Settings/Schemes/Fort Mode.plist --- a/project_files/HedgewarsMobile/Resources/Settings/Schemes/Fort Mode.plist Sun Sep 25 18:22:12 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ - - - - - basic - - 100 - 100 - 45 - 15 - 47 - 5 - 100 - 5 - 35 - 25 - 3 - 0 - 0 - 0 - - gamemod - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Settings/Schemes/King Mode.plist --- a/project_files/HedgewarsMobile/Resources/Settings/Schemes/King Mode.plist Sun Sep 25 18:22:12 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ - - - - - basic - - 100 - 100 - 45 - 15 - 47 - 5 - 100 - 5 - 35 - 25 - 3 - 4 - 0 - 2 - - gamemod - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Settings/Schemes/Minefield.plist --- a/project_files/HedgewarsMobile/Resources/Settings/Schemes/Minefield.plist Sun Sep 25 18:22:12 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ - - - - - basic - - 50 - 150 - 30 - 15 - 47 - 5 - 100 - 0 - 35 - 25 - 0 - 80 - 0 - 0 - - gamemod - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Settings/Schemes/Pro Mode.plist --- a/project_files/HedgewarsMobile/Resources/Settings/Schemes/Pro Mode.plist Sun Sep 25 18:22:12 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ - - - - - basic - - 100 - 100 - 15 - 15 - 47 - 5 - 100 - 0 - 35 - 25 - 3 - 0 - 0 - 2 - - gamemod - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Settings/Schemes/Shoppa.plist --- a/project_files/HedgewarsMobile/Resources/Settings/Schemes/Shoppa.plist Sun Sep 25 18:22:12 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ - - - - - basic - - 100 - 100 - 300 - 50 - 47 - 5 - 100 - 1 - 0 - 35 - 3 - 0 - 0 - 0 - - gamemod - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Settings/Schemes/Thinking with Portals.plist --- a/project_files/HedgewarsMobile/Resources/Settings/Schemes/Thinking with Portals.plist Sun Sep 25 18:22:12 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ - - - - - basic - - 100 - 100 - 45 - 15 - 47 - 5 - 100 - 2 - 25 - 25 - 4 - 5 - 0 - 5 - - gamemod - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Settings/Schemes/Timeless.plist --- a/project_files/HedgewarsMobile/Resources/Settings/Schemes/Timeless.plist Sun Sep 25 18:22:12 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ - - - - - basic - - 100 - 100 - 100 - 100 - 47 - 5 - 100 - 5 - 35 - 30 - 5 - 3 - 10 - 2 - - gamemod - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Settings/Schemes/Tunnel Hogs.plist --- a/project_files/HedgewarsMobile/Resources/Settings/Schemes/Tunnel Hogs.plist Sun Sep 25 18:22:12 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ - - - - - basic - - 100 - 100 - 30 - 15 - 47 - 5 - 100 - 5 - 35 - 3 - 25 - 10 - 10 - 10 - - gamemod - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Settings/credits.plist --- a/project_files/HedgewarsMobile/Resources/Settings/credits.plist Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Resources/Settings/credits.plist Sun Sep 25 18:24:01 2011 +0200 @@ -16,6 +16,9 @@ Richard "Sheepluva" Korlyi Henning "Prg" Kühn Henrik "Henek" Rostedt + John "Mikade" Lambert + Mayur "Zorg" Pawashe + Richard "Xeli" Deurwaarder John "Fizzy" Dum @@ -40,16 +43,19 @@ Andrey Korotaev Nina Kuisma Antoine Turmel - Peter Hüwe, Mario Liebisch - Luca Bonora + Peter Hüwe, Mario Liebisch, Richard Karolyi + Talos Kriti + Luca Bonora, Marco Bresciani Adam Etienne - Maciej Mroziński, Wojciech Latkowski, Maciej Górny + Anthony Bellew + Lukas Urbonas + Maciej Mroziński, Wojciech Latkowski, Piotr Mitana, Maciej Górny Fábio Canário Andrey Korotaev Jose Riha Carlos Vives - Niklas Grahn - Eugene V. Lyubimkin + Niklas Grahn, Henrik Rostedt + Eugene V. Lyubimkin, Igor Paliychuk, Eugene Sakara Aleksey Andreev @@ -58,19 +64,22 @@ Adam Higerd - Engine, frontend, net server author - Desktop frontend improvements - Many engine and frontend improvements + Engine, frontend, net server + Many desktop frontend improvements + Many engine and desktop frontend improvements Drillrocket, Ballgun, RC Plane weapons Mine number and time game settings Desktop frontend improvements Desktop frontend improvements Mac OS X and iPhone version - Gamepad support + Many engine and desktop frontend improvements + Gamepad and Lua integration Many engine improvements and graphics - Many engine and server improvements Maze maps - Engine and frontend improvements + Engine and desktop frontend improvements + Lua game modes and missions + Desktop frontend improvements + Android port Main graphics @@ -96,8 +105,11 @@ Finnish French German + Greek Italian Japanese + Korean + Lithuanian Polish Portuguese Russian diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/Settings/gameMods.plist --- a/project_files/HedgewarsMobile/Resources/Settings/gameMods.plist Sun Sep 25 18:22:12 2011 +0200 +++ b/project_files/HedgewarsMobile/Resources/Settings/gameMods.plist Sun Sep 25 18:24:01 2011 +0200 @@ -194,5 +194,13 @@ title Tag Team + + description + Add an indestructible border along the bottom + image + BottomBorder + title + Bottom Border + diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/denied@2x.png Binary file project_files/HedgewarsMobile/Resources/denied@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc project_files/HedgewarsMobile/Resources/surprise@2x.png Binary file project_files/HedgewarsMobile/Resources/surprise@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Forts/CMakeLists.txt --- a/share/hedgewars/Data/Forts/CMakeLists.txt Sun Sep 25 18:22:12 2011 +0200 +++ b/share/hedgewars/Data/Forts/CMakeLists.txt Sun Sep 25 18:24:01 2011 +0200 @@ -1,4 +1,6 @@ file(GLOB FortSprites *L.png *R.png) +list(REMOVE_ITEM FortSprites *@2x.png) +list(REMOVE_ITEM FortSprites *-icon.png) install(FILES ${FortSprites} diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Forts/Cake-icon.png Binary file share/hedgewars/Data/Forts/Cake-icon.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Forts/Cake-icon@2x.png Binary file share/hedgewars/Data/Forts/Cake-icon@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Forts/Castle-icon.png Binary file share/hedgewars/Data/Forts/Castle-icon.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Forts/Castle-icon@2x.png Binary file share/hedgewars/Data/Forts/Castle-icon@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Forts/Earth-icon.png Binary file share/hedgewars/Data/Forts/Earth-icon.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Forts/Earth-icon@2x.png Binary file share/hedgewars/Data/Forts/Earth-icon@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Forts/EvilChicken-icon.png Binary file share/hedgewars/Data/Forts/EvilChicken-icon.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Forts/EvilChicken-icon@2x.png Binary file share/hedgewars/Data/Forts/EvilChicken-icon@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Forts/Flowerhog-icon.png Binary file share/hedgewars/Data/Forts/Flowerhog-icon.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Forts/Flowerhog-icon@2x.png Binary file share/hedgewars/Data/Forts/Flowerhog-icon@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Forts/Hydrant-icon.png Binary file share/hedgewars/Data/Forts/Hydrant-icon.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Forts/Hydrant-icon@2x.png Binary file share/hedgewars/Data/Forts/Hydrant-icon@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Forts/Lego-icon.png Binary file share/hedgewars/Data/Forts/Lego-icon.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Forts/Lego-icon@2x.png Binary file share/hedgewars/Data/Forts/Lego-icon@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Forts/Plane-icon.png Binary file share/hedgewars/Data/Forts/Plane-icon.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Forts/Plane-icon@2x.png Binary file share/hedgewars/Data/Forts/Plane-icon@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Forts/Statue-icon.png Binary file share/hedgewars/Data/Forts/Statue-icon.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Forts/Statue-icon@2x.png Binary file share/hedgewars/Data/Forts/Statue-icon@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Forts/Tank-icon.png Binary file share/hedgewars/Data/Forts/Tank-icon.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Forts/Tank-icon@2x.png Binary file share/hedgewars/Data/Forts/Tank-icon@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Forts/UFO-icon.png Binary file share/hedgewars/Data/Forts/UFO-icon.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Forts/UFO-icon@2x.png Binary file share/hedgewars/Data/Forts/UFO-icon@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Forts/Wood-icon.png Binary file share/hedgewars/Data/Forts/Wood-icon.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Forts/Wood-icon@2x.png Binary file share/hedgewars/Data/Forts/Wood-icon@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Graphics/AmmoMenu/Ammos@2x.png Binary file share/hedgewars/Data/Graphics/AmmoMenu/Ammos@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Graphics/AmmoMenu/Ammos_bw@2x.png Binary file share/hedgewars/Data/Graphics/AmmoMenu/Ammos_bw@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Graphics/AmmoMenu/CMakeLists.txt --- a/share/hedgewars/Data/Graphics/AmmoMenu/CMakeLists.txt Sun Sep 25 18:22:12 2011 +0200 +++ b/share/hedgewars/Data/Graphics/AmmoMenu/CMakeLists.txt Sun Sep 25 18:24:01 2011 +0200 @@ -1,5 +1,5 @@ file(GLOB AmmoMenuSprites *.png) -list(REMOVE_ITEM AmmoMenuSprites *_iPhone.png) +list(REMOVE_ITEM AmmoMenuSprites *@2x.png) install(FILES ${AmmoMenuSprites} diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Graphics/CMakeLists.txt --- a/share/hedgewars/Data/Graphics/CMakeLists.txt Sun Sep 25 18:22:12 2011 +0200 +++ b/share/hedgewars/Data/Graphics/CMakeLists.txt Sun Sep 25 18:24:01 2011 +0200 @@ -6,6 +6,7 @@ add_subdirectory(SuddenDeath) file(GLOB BaseSprites *.png) +list(REMOVE_ITEM BaseSprites *@2x.png) install(FILES ${BaseSprites} diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Graphics/Egg@2x.png Binary file share/hedgewars/Data/Graphics/Egg@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Graphics/HellishBomb@2x.png Binary file share/hedgewars/Data/Graphics/HellishBomb@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Graphics/Seduction@2x.png Binary file share/hedgewars/Data/Graphics/Seduction@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Graphics/Target@2x.png Binary file share/hedgewars/Data/Graphics/Target@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Graphics/TargetBee@2x.png Binary file share/hedgewars/Data/Graphics/TargetBee@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Graphics/cheese@2x.png Binary file share/hedgewars/Data/Graphics/cheese@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Locale/de.lua --- a/share/hedgewars/Data/Locale/de.lua Sun Sep 25 18:22:12 2011 +0200 +++ b/share/hedgewars/Data/Locale/de.lua Sun Sep 25 18:24:01 2011 +0200 @@ -2,12 +2,12 @@ -- [":("] = "", -- ["!!!"] = "", -- ["..."] = "", - ["Accuracy Bonus!"] = "Präzisions-Bonus!", + ["Accuracy Bonus!"] = "Präzisions-Bonus!", -- ["Achievement Unlocked"] = "", -- User_Mission_-_Bamboo_Thicket, User_Mission_-_That_Sinking_Feeling, Tumbler ["a Hedgewars mini-game"] = "ein Hedgewars Mini-Spiel", -- Space_Invasion, The_Specialists ["Aiming Practice"] = "Zielübung", --Bazooka, Shotgun, SniperRifle ["Ammo Depleted!"] = "Munition erschöpft!", --- ["ammo extended!"] = "", + ["ammo extended!"] = "Munition aufgestockt!", ["Ammo is reset at the end of your turn."] = "Munition wird am Ende des Spielzuges zurückgesetzt.", ["Ammo Maniac!"] = "Munitionsverrückter!", ["Ammo"] = "Munition", @@ -20,17 +20,17 @@ ["Bat your opponents through the|baskets and out of the map!"] = "Schlage deine Widersacher durch|die Körbe und aus der Karte hinaus!", ["Bazooka Training"] = "Bazooka-Training", ["Best laps per team: "] = "Beste Rundenzeiten pro Team: ", - ["Best Team Times: "] = "Besten Team-Zeiten: ", + ["Best Team Times: "] = "Beste Team-Zeiten: ", ["Bloody Rookies"] = "Blutige Anfänger", -- 01#Boot_Camp, User_Mission_-_Dangerous_Ducklings, User_Mission_-_Diver, User_Mission_-_Spooky_Tree ["Boom!"] = "Bumm!", ["BOOM!"] = "KABUMM!", ["Boss defeated!"] = "Boss wurde besiegt!", ["Boss Slayer!"] = "Boss-Töter!", --- ["Build a track and race."] = "", + ["Build a track and race."] = "Konstruiere eine Strecke und mach ein Wettrennen.", ["CAPTURE THE FLAG"] = "EROBERE DIE FAHNE", ["Careless"] = "Achtlos", ["Change Weapon"] = "Waffenwechsel", - ["Clumsy"] = "Ungeschickt", + ["Clumsy"] = "Hoppla", ["Codename: Teamwork"] = "Code-Name: Teamwork", ["Complete the track as fast as you can!"] = "Durchlaufe die Strecke so schnell du kannst!", ["Congratulations!"] = "Gratulation!", @@ -40,22 +40,22 @@ ["DAMMIT, ROOKIE! GET OFF MY HEAD!"] = "VERDAMMT, REKRUT! RUNTER VON MEINEM KOPF!", ["DAMMIT, ROOKIE!"] = "VERDAMMT, REKRUT!", -- ["Dangerous Ducklings"] = "", - ["Deadweight"] = "Leergewicht", + ["Deadweight"] = "Gravitus", ["Demolition is fun!"] = "Zerstörung macht Spaß!", ["Depleted Kamikaze!"] = "Munitionsloses Kamikaze!", ["Destroy invaders to score points."] = "Zerstöre die Angreifer um Punkte zu erhalten.", -- ["Double Kill!"] = "", -- ["Drone Hunter!"] = "", --- ["Drowner"] = "", + ["Drowner"] = "Absäufer", ["Each turn you get 1-3 random weapons"] = "Du bekommst jede Runde 1-3 zufällig gewählte Waffen", ["Each turn you get one random weapon"] = "Du bekommst jede Runde eine zufällig gewählte Waffe.", ["Eliminate all enemies"] = "Vernichte alle Gegner", ["Eliminate all targets before your time runs out.|You have unlimited ammo for this mission."] = "Eliminiere alle Ziele bevor die Zeit ausläuft.|Du hast in dieser Mission unbegrenzte Munition.", --Bazooka, Shotgun, SniperRifle --- ["Eliminate Poison before the time runs out"] = "", + ["Eliminate Poison before the time runs out"] = "Neutralisiere das Gift bevor die Zeit abgelaufen ist", ["Eliminate the Blue Team"] = "Lösche das Blaue Team aus", --- ["Eliminate the enemy before the time runs out"] = "", -- User_Mission_-_Bamboo_Thicket, User_Mission_-_Newton_and_the_Hammock --- ["Eliminate the enemy hogs to win."] = "", --- ["Eliminate the enemy specialists."] = "", + ["Eliminate the enemy before the time runs out"] = "Vernichte den Feind bevor die Zeit abgelaufen ist", -- User_Mission_-_Bamboo_Thicket, User_Mission_-_Newton_and_the_Hammock + ["Eliminate the enemy hogs to win."] = "Vernichte alle gegnerischen Igel um zu gewinnen", + ["Eliminate the enemy specialists."] = "Vernichte die gegnerischen Spezialisten", ["- Eliminate Unit 3378 |- Feeble Resistance must survive"] = "- Vernichte Einheit 3378 | Kraftloser Widerstand muss überleben", -- ["Energetic Engineer"] = "", ["Enjoy the swim..."] = "Viel Spaß beim Schwimmen...", @@ -71,7 +71,7 @@ -- ["Friendly Fire!"] = "", ["fuel extended!"] = "Treibstoff aus!", ["GAME BEGUN!!!"] = "SPIEL GESTARTET!!!", --- ["Game Modifiers: "] = "", + ["Spielmodifikatoren: "] = "", ["GAME OVER!"] = "SPIEL ZU ENDE!", ["Game Started!"] = "Spiel Gestartet!]", ["Get on over there and take him out!"] = "Mach, dass du hinüber kommst und schalte ihn aus!", @@ -88,7 +88,7 @@ ["Hapless Hogs"] = "Glücklose Igel", [" Hapless Hogs left!"] = " Glücklose Igel verbleibend!", ["Health crates extend your time."] = "Medipacks verlängern deine Zeit.", --- ["Heavy"] = "", + ["Heavy"] = "Schwierig", ["Hedgewars-Basketball"] = "Hedgewars-Basketball", ["Hedgewars-Knockball"] = "Hedgewars-Knockball", ["Heh, it's not that bad."] = "Hehe, so schlimm ist es nicht.", @@ -126,15 +126,15 @@ -- ["Newton's Hammock"] = "", ["NOT ENOUGH WAYPOINTS"] = "NICHT GENUG WEGPUNKTE", ["Not So Friendly Match"] = "Kein-so-Freundschaftsspiel", -- Basketball, Knockball --- ["Oh no! Just try again!"] = "", -- User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork + ["Oh no! Just try again!"] = "Oh nein! Versuch's nochmal!", -- User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork ["Oh no! Time's up! Just try again."] = "Oh nein! Die Zeit ist um! Versuche es nochmal.", --Bazooka, Shotgun, SniperRifle -- ["Operation Diver"] = "", ["Opposing Team: "] = "Gegnerisches Team: ", --- ["Pathetic Hog #%d"] = "", --- ["Pathetic Resistance"] = "", -- User_Mission_-_Bamboo_Thicket, User_Mission_-_Newton_and_the_Hammock + ["Pathetic Hog #%d"] = "Erbärmlicher Igel #%d", + ["Pathetic Resistance"] = "Erbärmlicher Widerstand", -- User_Mission_-_Bamboo_Thicket, User_Mission_-_Newton_and_the_Hammock ["Per-Hog Ammo"] = "Munition pro Igel", ["Place more waypoints using [ENTER]"] = "Setze mehr Wegpunkte durch Drücken von [ENTER]", --- ["Place more waypoints using the 'Air Attack' weapon."] = "", + ["Place more waypoints using the 'Air Attack' weapon."] = "Platziere mehr Wegpunkte durch Verwenden der 'Luftangriff'-Waffe", ["points"] = "Punkte", -- Control, CTF_Blizzard, Basic_Training_-_Bazooka, Basic_Training_-_Shotgun, Basic_Training_-_Sniper_Rifle ["Poison"] = "Gift", ["Power Remaining"] = "Verbleibende Energie", @@ -142,7 +142,7 @@ -- ["Press [Precise] to skip intro"] = "", ["Race complexity limit reached."] = "Rennkomplexitätslimit erreicht.", -- ["RACER"] = "", --- [" - Return the enemy flag to your base to score | - First team to 3 captures wins | - You may only score when your flag is in your base | - Hogs will drop the flag if killed, or drowned | - Dropped flags may be returned or recaptured | - Hogs respawn when killed"] = "", + [" - Return the enemy flag to your base to score | - First team to 3 captures wins | - You may only score when your flag is in your base | - Hogs will drop the flag if killed, or drowned | - Dropped flags may be returned or recaptured | - Hogs respawn when killed"] = " - Bringe die gegnerische Flagge zu deiner Heimatbasis um zu punkten. | - Das Team das zuerst 3 Flaggen erobert gewinnt. | - Du kannst nur punkten wenn deine eigene Flagge in deiner Basis ist | - Igel lassen die Flagge fallen wenn sie sterben oder ertrinken | - Fallen gelassene Flaggen können zurückgebracht oder wieder gestohlen werden | - Igel tauchen nach ihrem Tod wieder auf", -- ["Round Limit:"] = "", ["Round Limit"] = "Rundenbegrenzung", -- ["Rounds Complete: "] = "", @@ -150,7 +150,7 @@ ["RULES OF THE GAME [Press ESC to view]"] = "SPIEL REGELN (Drücke ESC zum Anzeigen)", -- ["s|"] = "", ["Save as many hapless hogs as possible!"] = "Rette so viele glücklose Igel als möglich!", --- ["SCORE"] = "", + ["PUNKTESTAND"] = "", -- ["sec"] = "", -- CTF_Blizzard, TrophyRace, Basic_Training_-_Bazooka, Basic_Training_-_Shotgun, Basic_Training_-_Sniper_Rifle, User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork, Capture_the_Flag ["See ya!"] = "Mach's gut!", ["selected!"] = "ausgewählt!", @@ -166,18 +166,18 @@ ["Shotgun Team"] = "Schrotflinten-Team", ["Shotgun Training"] = "Schrotflinten-Training", ["shots remaining."] = "Schüsse übrig", --- ["Silly"] = "", --- ["Sinky"] = "", + ["Silly"] = "Doofi", + ["Sinky"] = "Blubb", ["%s is out and Team %d|scored a penalty!| |Score:"] = "%s ist draußen und Team %d|erhält eine Strafe!| |Punktestand:", -- Basketball, Knockball ["%s is out and Team %d|scored a point!| |Score:"] = "%s ist draußen und Team %d|erhält einen Punkt!| |Punktestand:", -- Basketball, Knockball ["Sniper Training"] = "Scharfschützen-Training", ["Sniperz"] = "Heckenschützen", --- ["Sponge"] = "", + ["Sponge"] = "Schwamm", -- ["Spooky Tree"] = "", -- ["STATUS UPDATE"] = "", -- GaudyRacer, Space_Invasion --- ["Switched to "] = "", + ["Switched to "] = "Gewechselt zu ", -- ["Team %d: "] = "", --- ["Team Scores"] = "", -- Control, Space_Invasion + ["Team Scores"] = "Teampunktestand", -- Control, Space_Invasion -- ["That Sinking Feeling"] = "", ["That was pointless."] = "Das war sinnlos.", ["The enemy is hiding out on yonder ducky!"] = "Der Feind versteckt sich auf dem Entlein dort drüben!", @@ -192,9 +192,9 @@ ["Time Left: "] = "Verbleibende Zeit", ["TIME: "] = "ZEIT: ", ["Toggle Shield"] = "Schild ein/aus", --- ["Toxic Team"] = "", -- User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork --- ["TRACK COMPLETED"] = "", --- ["TRACK FAILED!"] = "", + ["Toxic Team"] = "Giftige Gegner", -- User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork + ["TRACK COMPLETED"] = "STRECKENLAUF BEENDET", + ["TRACK FAILED!"] = "STRECKENLAUF GESCHEITERT", -- ["TrophyRace"] = "", -- ["T_T"] = "", ["Tumbling Time Extended!"] = "Purzelzeit verlängert!", @@ -208,11 +208,11 @@ ["Use your rope to get from start to finish as fast as you can!"] = "Nutze das Seil um von Start zu Ziel zu gelangen - so schnell du kannst!", ["Victory for the "] = "Sieg für ", -- CTF_Blizzard, Capture_the_Flag ["Waypoint placed."] = "Wegpunkt gesetzt", --- ["Way-Points Remaining"] = "", --- ["Weapons Reset"] = "", + ["Way-Points Remaining"] = "Wegpunkte verbleibend", + ["Weapons Reset"] = "Waffenzurücksetzung", ["Well done."] = "Gut gemacht.", ["Will this ever end?"] = "Wird dies je enden?", - ["WINNING TIME: "] = "SIEGESZEIT: ", + ["WINNING TIME: "] = "BESTZEIT: ", ["You'd almost swear the water was rising!"] = "Man könnte fast schwören das Wasser würde steigen!", ["You have SCORED!!"] = "Du hast GEPUNKTET!", ["You saved"] = "Gerettet: ", diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Locale/de.txt --- a/share/hedgewars/Data/Locale/de.txt Sun Sep 25 18:22:12 2011 +0200 +++ b/share/hedgewars/Data/Locale/de.txt Sun Sep 25 18:24:01 2011 +0200 @@ -53,6 +53,9 @@ 00:50=Bohr-Luftangriff 00:51=Schlammball 00:52=Keine Waffe ausgewählt +00:53=ZeitBox +00:54=Bauwerk +00:55=Landkanone 01:00=Auf in die Schlacht! @@ -72,6 +75,12 @@ 01:12=Letzte Runde bis zum Sudden Death! 01:13=%1 Runden bis zum Sudden Death! 01:14=Mach dich bereit, %1! +01:15=Minimale +01:16=Niedrige +01:17=Normale +01:18=Hohe +01:19=Extreme +01:20=%1 Sprungkraft ; Event messages ; Hog (%1) died @@ -233,6 +242,12 @@ 03:47=Mach es weg! 03:48=Stop! Hammer time! 03:49=Tut, was man vermutet +03:50=Maulwurfsfreund +03:51=Am Boden gefunden +03:52=NICHT IN VERWENDUNG +03:53=Typ 40 +03:54=Baue etwas +03:55=Werkzeug ; Weapon Descriptions (use | as line breaks) 04:00=Greife deine Feinde mit einfachen Granaten an.|Der Zeitzünder steuert den Explosionszeitpunkt.|1-5: Zeitzünder einstellen|Angriff: Halten, um mit mehr Kraft zu werfen @@ -285,6 +300,13 @@ 04:47=Verdopple den Spaß mit zwei spitzigen, schicken, klebrigen Minen.|Löse eine Kettenreaktion aus oder beschütze dich (oder beides).|Angriff: Halten, um mit mehr Kraft zu feuern (zweimal) 04:48=Warum sind Maulwürfe verhasst? Einen|Igel in den Boden zu stampfen kann sehr lustig sein!|Ein guter Treffer des Hammers wird ein Drittel|der Lebenspunkte eines Igels abziehen und ihn|im Boden versenken.|Angriff: Aktivieren 04:49=Hol deine Freunde zurück!|Aber pass auf, dass du keine Feinde beschwörst.|Angriff: Gedrückt halten, um Igel langsam wiederauferstehen zu lassen.|Hoch: Beschleunige Totenbeschwörung +04:50=Verstecken sich Feinde im Untergrund?|Grabe sie aus mit dem Bohr-Luftangriff!|Der Zeitzünder bestimmt wie tief dieser graben wird. +04:51=Wirf mit Dreck um dich!|Schmerzt ein wenig und schubst Igel weg. +04:52=NICHT IN VERWENDUNG +04:53=Unternimm eine Reise durch Zeit und Raum,|während du deine Kameraden alleine am Schlachtfeld zurücklässt.|Sei darauf vorbereitet jederzeit wieder zurückzukommen,|oder auf Sudden Death wenn sie alle besiegt wurden.|Disclaimer: Nicht funktionstüchtig wenn in Sudden Death,|wenn du alleine bist - oder der König. +04:54=IN ARBEIT + +04:55=Versprühe einen Strahl klebriger Flocken.|Baue Brücken, begrabe Gegner, versiegle Tunnel.|Pass auf, dass du selbst nichts abbekommst! ; Game goal strings 05:00=Spielmodifikationen @@ -303,3 +325,10 @@ 05:13=Minenzünder: Minen explodieren sofort 05:14=Minenzünder: Minen explodieren nach 0 - 3 Sekunden 05:15=Prozentualer Schaden: Alle Waffen verursachen %1 % Schaden +05:16=Lebenspunkter aller Igel wird am Ende jeder Runde zurückgesetzt +05:17=Computergesteuerte Igel erscheinen nach dem Tod wieder +05:18=Unbegrenzte Attacken +05:19=Waffen werden am Ende jedes Zuges zurückgesetzt +05:20=Igel teilen Waffen nicht untereinander +05:21=Tag Team: Teams gleicher Farbe kommen nacheinander dran und teilen sich ihre Zugzeit. + diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Locale/en.txt --- a/share/hedgewars/Data/Locale/en.txt Sun Sep 25 18:22:12 2011 +0200 +++ b/share/hedgewars/Data/Locale/en.txt Sun Sep 25 18:24:01 2011 +0200 @@ -502,7 +502,7 @@ 04:48=Why should the moles get all the abuse?|Wacking a hog can be just as fun! A good|blow from this hammer will shave off one|third of a hog's health and plunge them|underground.|Attack: Activate 04:49=Resurrect your friends!|But beware that this also resurrects your foes.|Attack: Keep attack pressed to resurrect slowly|Up: Accelerate resurrection 04:50=Is someone hiding underground?|Dig them out with a drill strike!|Timer controls how far it will dig. -04:51=Get in a free shot in by hurling a ball of mud.|Stings a bit, and knocks hogs back. +04:51=Get in a free shot by hurling a ball of mud.|Stings a bit, and knocks hogs back. 04:52=UNUSED 04:53=Go on an adventure through time and space,|while leaving your comrades to fight on alone.|Be prepared to return at any time,|or for Sudden Death or if they are all defeated.|Disclaimer. Does not function in Sudden Death,|if you are alone, or if you are a King. 04:54=INCOMPLETE diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Locale/hedgewars_de.ts --- a/share/hedgewars/Data/Locale/hedgewars_de.ts Sun Sep 25 18:22:12 2011 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_de.ts Sun Sep 25 18:24:01 2011 +0200 @@ -5,26 +5,26 @@ AmmoSchemeModel new - Neu + neu copy of - + Kopie von DrawMapWidget File error - + Dateifehler Cannot open file '%1' for writing - + Datei '%1' konnte nicht für Schreibzugriff geöffnet werden. Cannot read file '%1' - + Datei '%1' konnte nicht gelese werden. @@ -61,7 +61,7 @@ When this option is enabled selecting a game scheme will auto-select a weapon - + Wenn diese Option aktiviert ist, wird durch Auswählen eines Spielprofils auch automatisch Waffen ausgewählt @@ -125,11 +125,11 @@ Demo name - + Demo-Name Demo name: - + Demo-Name: @@ -215,11 +215,11 @@ Seed - + Seed Set - + Setzen @@ -303,14 +303,17 @@ Nickname - Spitzname + Spitzname Some one already uses your nickname %1 on the server. Please pick another nickname: - + Jemand verwendet +deinen Spiznamen %1 +bereits auf dem Server. +Bitte wähle einen anderen Spitznamen: @@ -398,11 +401,11 @@ Drawn Maps - + Gezeichnete Karten All files - + Alle Dateien @@ -757,31 +760,31 @@ You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. Tips - + Du findest die Hedgewars Konfigurationsdateien unter "Library/Application Support/Hedgewars" in deinem Home-Verzeichnis. Erstelle Backups oder kopiere deine Dateien, aber editiere sie besser nicht selbst. You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. Tips - + Du findest die Hedgewars Konfigurationsdateien unter ".hedgewars" in deinem Home-Verzeichnis. Erstelle Backups oder kopiere deine Dateien, aber editiere sie besser nicht selbst. The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. Tips - + Die Windows version von Hedgewars unterstützt Xfire. Füge Hedgewars zu deiner Spieleliste hinzu damit deine Freunde dich spielen sehen können. Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. Tips - + Benutze den Molotov-Cocktail oder den Flammenwerfer um Igel vorübergehend am passieren von Gelände wie z.B. Tunnels oder Platformen zu hindern. The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. Tips - + Die Verwendung der Zielsuchende Biene ist ein bisschen knifflig. Ihr Wenderadius hängt von der Geschwindigkeit ab, versuche sie also nicht mit voller Stärke wegzuschießen. Downloadable Content - + Herunterladbare Inhalte @@ -810,15 +813,15 @@ Error - Fehler + Fehler Please enter room name - Bitte einen Raumnamen eingeben + Bitte einen Raumnamen eingeben OK - OK + OK @@ -864,27 +867,27 @@ New scheme - + Neues Spielprofil Edit scheme - + Spielprofil bearbeiten Delete scheme - + Spielprofil löschen New weapon set - + Neues Waffenprofil Edit weapon set - + Waffenprofil bearbeiten Delete weapon set - + Waffenprofil löschen @@ -1038,9 +1041,9 @@ %1 players online - - - + + %1 Spieler online + %1 Spieler online @@ -1091,10 +1094,6 @@ Die Landschaft ist nicht zerstörbar! - Add an indestructable border around the terrain - Einfügen eines unzerstörbaren Kartenrand - - Lower gravity Verringerte Schwerkraft @@ -1152,27 +1151,27 @@ You will not have to worry about wind anymore. - + Du wirst dich nicht mehr um Wind kümmern müssen. Wind will affect almost everything. - + Wind beeinflusst fast alles. Copy - + Kopieren Teams in each clan take successive turns sharing their turn time. - + Teams gleicher Farbe kommen nacheinander dran und teilen sich ihre Zugzeit. Add an indestructible border around the terrain - Einfügen eines unzerstörbaren Kartenrand + Fügt eine unzerstörbare Randbegrenzung um das Spielfeld herum hinzu. Add an indestructible border along the bottom - + Fügt eine unzerstörbare Randbegrenzung am unteren Kartenrand hinzu. @@ -1187,11 +1186,11 @@ New - Neu + Neu Copy - + Kopieren @@ -1269,7 +1268,7 @@ Update - Aktualisieren + Aktualisieren @@ -1379,67 +1378,67 @@ Disabled - + Deaktiviert Red/Cyan - + Rot/Türkis Cyan/Red - + Türkis/Rot Red/Blue - + Rot/Blau Blue/Red - + Blau/Rot Red/Green - + Rot/Grün Green/Red - + Grün/Rot Side-by-side - + Nebeneinander Top-Bottom - + Übereinander Wiggle - + Wackeln Red/Cyan grayscale - + Rot/Türkis Graustufen Cyan/Red grayscale - + Türkis/Rot Graustufen Red/Blue grayscale - + Rot/Blau Graustufen Blue/Red grayscale - + Blau/Rot Graustufen Red/Green grayscale - + Rot/Grün Graustufen Green/Red grayscale - + Grün/Rot Graustufen @@ -1494,7 +1493,7 @@ Schemes and Weapons - + Spielprofile und Waffen @@ -1671,31 +1670,31 @@ % Rope Length - + % Seillänge Stereo rendering - + Stereo-Rendering Game Options - + Spieloptionen Style - + Stil Scheme - + Spielprofil Password - Passwort + Passwort % Get Away Time - + % Rückzugszeit @@ -1768,27 +1767,27 @@ Teams - Teams + Teams Really delete this team? - + Dieses Team wirklich löschen? Schemes - + Spielprofil Can not delete default scheme '%1'! - + Standardspielprofil '%1' kann nicht gelöscht werden! Really delete this game scheme? - + Dieses Spielprofil wirklich löschen? Can not delete default weapon set '%1'! - + Standardwaffenprofil '%1' kann nicht gelöscht werden! @@ -1886,7 +1885,7 @@ more - + mehr @@ -1940,11 +1939,11 @@ new - Neu + neu copy of - + Kopie von @@ -2054,19 +2053,19 @@ Disable Wind - + Kein Wind More Wind - + Mehr Wind Tag Team - + Tag Team Add Bottom Border - + Untere Randbegrenzung hinzufügen diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Locale/hedgewars_pt_PT.ts --- a/share/hedgewars/Data/Locale/hedgewars_pt_PT.ts Sun Sep 25 18:22:12 2011 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_pt_PT.ts Sun Sep 25 18:24:01 2011 +0200 @@ -125,11 +125,11 @@ Demo name - + Nome do demo Demo name: - + Nome do demo: @@ -398,11 +398,11 @@ Drawn Maps - + Mapas Desenhados All files - + Todos os ficheiros @@ -752,7 +752,8 @@ Downloadable Content - + Conteúdo Transferível +Downloadable Content @@ -1010,8 +1011,8 @@ %1 players online + %1 jogador online %1 jogadores online - %1 jogador online @@ -1030,10 +1031,6 @@ O terreno não pode ser destruído! - Add an indestructable border around the terrain - Adiciona uma borda indestrutível à volta do terreno - - Lower gravity Baixa gravidade @@ -1139,11 +1136,11 @@ Add an indestructible border around the terrain - Adiciona uma borda indestrutível à volta do terreno + Adiciona uma barreira indestrutível à volta do terreno Add an indestructible border along the bottom - + Adiciona uma barreira indestrutível ao longo do fundo do terreno @@ -1671,7 +1668,7 @@ hedgehog %1 - + ouriço %1 @@ -2031,7 +2028,7 @@ Add Bottom Border - + Adicionar borda inferior diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Locale/pt_PT.lua --- a/share/hedgewars/Data/Locale/pt_PT.lua Sun Sep 25 18:22:12 2011 +0200 +++ b/share/hedgewars/Data/Locale/pt_PT.lua Sun Sep 25 18:24:01 2011 +0200 @@ -2,17 +2,17 @@ [":("] = ":(", ["!!!"] = "!!!", ["..."] = "...", --- ["Accuracy Bonus!"] = "", --- ["Achievement Unlocked"] = "", -- User_Mission_-_Bamboo_Thicket, User_Mission_-_That_Sinking_Feeling, Tumbler + ["Accuracy Bonus!"] = "Bónus de precisão!", +-- ["Achievement Unlocked"] = "Desbloqueado", -- User_Mission_-_Bamboo_Thicket, User_Mission_-_That_Sinking_Feeling, Tumbler ["a Hedgewars mini-game"] = "um mini-jogo Hedgewars", -- Space_Invasion, The_Specialists ["Aiming Practice"] = "Pratica a tua pontaria", --Bazooka, Shotgun, SniperRifle -- ["Ammo Depleted!"] = "", -- ["ammo extended!"] = "", -- ["Ammo is reset at the end of your turn."] = "", -- ["Ammo Maniac!"] = "", - ["Ammo"] = "Munições", + ["Ammo"] = "Munições", -- ["Available points remaining: "] = "", --- ["[Backspace]"] = "", + ["[Backspace]"] = "[Retrocesso (backspace)]", -- ["Bamboo Thicket"] = "", -- ["Barrel Eater!"] = "", -- ["Barrel Launcher"] = "", @@ -28,15 +28,15 @@ -- ["Boss Slayer!"] = "", -- ["Build a track and race."] = "", ["CAPTURE THE FLAG"] = "CAPTURAR A BANDEIRA", - ["Careless"] = "Descuidado", --- ["Change Weapon"] = "", + ["Careless"] = "Descuidado", + ["Change Weapon"] = "Trocar Arma", -- ["Clumsy"] = "", -- ["Codename: Teamwork"] = "", ["Complete the track as fast as you can!"] = "Completa a pista o mais rápido que conseguires!", ["Congratulations!"] = "Parabéns!", ["Congratulations! You've eliminated all targets|within the allowed time frame."] = "Parabéns! Eliminaste todos os alvos|dentro do tempo limite.", --Bazooka, Shotgun, SniperRifle -- ["Control pillars to score points."] = "", --- ["Cybernetic Empire"] = "", + ["Cybernetic Empire"] = "Império Cibernético", -- ["DAMMIT, ROOKIE!"] = "", -- ["DAMMIT, ROOKIE! GET OFF MY HEAD!"] = "", ["Dangerous Ducklings"] = "Patinhos perigosos", @@ -54,8 +54,8 @@ ["Eliminate Poison before the time runs out"] = "Elimina o Poison antes do tempo terminar.", ["Eliminate the Blue Team"] = "Elimina a equipa azul", -- ["Eliminate the enemy before the time runs out"] = "", -- User_Mission_-_Bamboo_Thicket, User_Mission_-_Newton_and_the_Hammock --- ["Eliminate the enemy hogs to win."] = "", --- ["Eliminate the enemy specialists."] = "", +-- ["Eliminate the enemy hogs to win."] = "Elimina os ouriços inimigos para ganhar.", +-- ["Eliminate the enemy specialists."] = "Elimina os especialistas inimigos.", -- ["- Eliminate Unit 3378 |- Feeble Resistance must survive"] = "", -- ["Energetic Engineer"] = "", ["Enjoy the swim..."] = "Aproveita o mergulho", @@ -71,13 +71,13 @@ -- ["Friendly Fire!"] = "", -- ["fuel extended!"] = "", -- ["GAME BEGUN!!!"] = "", --- ["Game Modifiers: "] = "", --- ["GAME OVER!"] = "", + ["Game Modifiers: "] = "Modificadores de Jogo: ", + ["GAME OVER!"] = "GAME OVER!", -- ["Game Started!"] = "", - ["Get on over there and take him out!"] = "Chega-te aqui e acaba com ele!", + ["Get on over there and take him out!"] = "Chega-te aqui e acaba com ele!", -- ["Goal"] = "", ["GO! GO! GO!"] = "GO! GO! GO!", - ["Good birdy......"] = "Bom passarito......", +-- ["Good birdy......"] = "Lindo\Bom passarito......" (needs ingame confirmation), ["Good luck out there!"] = "Boa sorte aí fora!", -- ["Good so far!"] = "", -- ["Good to go!"] = "", @@ -97,11 +97,11 @@ ["Hooray!"] = "Hurra!", ["Hunter"] = "Comando", --Bazooka, Shotgun, SniperRifle ["Instructor"] = "Instrutor", -- 01#Boot_Camp, User_Mission_-_Dangerous_Ducklings --- ["invaders destroyed"] = "", + ["invaders destroyed"] = "invasores destruidos", -- ["It's a good thing SUDDEN DEATH is 99 turns away..."] = "", -- ["Jumping is disabled"] = "", ["Kamikaze Expert!"] = "Kamikaze profissional!", --- ["Keep it up!"] = "", +-- ["Keep it up!"] = "Continua assim!", -- ["Killing spree!"] = "", -- ["KILLS"] = "", -- ["Last Target!"] = "", @@ -126,7 +126,7 @@ -- ["NOT ENOUGH WAYPOINTS"] = "", ["Not So Friendly Match"] = "Partida não muito amigável", -- Basketball, Knockball ["Oh no! Just try again!"] = "Oh não! Tenta novamente!", -- User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork - ["Oh no! Time's up! Just try again."] = "Oh não! Acabou o tempo! Tenta novamente.", --Bazooka, Shotgun, SniperRifle + ["Oh no! Time's up! Just try again."] = "Oh não! Terminou o tempo! Tenta novamente.", --Bazooka, Shotgun, SniperRifle ["Operation Diver"] = "Operação Mergulho", ["Opposing Team: "] = "Equipa adversária", ["Pathetic Hog #%d"] = "Ouriço patético #%d", @@ -136,8 +136,8 @@ -- ["Place more waypoints using the 'Air Attack' weapon."] = "", -- ["points"] = "", -- Control, Space_Invasion ["Poison"] = "Poison", --- ["Power Remaining"] = "", --- ["Prepare yourself"] = "", + ["Power Remaining"] = "Energia Restante", + ["Prepare yourself"] = "Prepara-te!", -- ["Press [Precise] to skip intro"] = "", -- ["Race complexity limit reached."] = "", -- ["RACER"] = "", @@ -147,14 +147,13 @@ -- ["Rounds Complete: "] = "", -- ["Rounds Complete"] = "", ["RULES OF THE GAME [Press ESC to view]"] = "REGRAS DE JOGO [Pressiona ESC para as visualizar]", - ["RULES OF THE GAME [Press ESC to view]"] = "REGRAS DE JOGO [Pressiona ESC para as visualizar]", -- ["s|"] = "", -- ["Save as many hapless hogs as possible!"] = "", --- ["SCORE"] = "", + ["SCORE"] = "RESULTADOS", ["sec"] = "seg", -- CTF_Blizzard, TrophyRace, Basic_Training_-_Bazooka, Basic_Training_-_Shotgun, Basic_Training_-_Sniper_Rifle, User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork, Capture_the_Flag ["See ya!"] = "Chau!", --- ["selected!"] = "", --- ["Shield boosted! +30 power"] = "", + ["selected!"] = "seleccionado!", +-- ["Shield boosted! +30 power"] = "Escudo melhorado! +30 energia (-unconfirmed)", ["Shield Depleted"] = "Escudo Esgotado", ["Shield is fully recharged!"] = "Escudo completamente recarregado!", -- ["Shield Master!"] = "", @@ -164,7 +163,7 @@ -- ["Shield Seeker!"] = "", ["Shotgun Team"] = "Caçadores", ["Shotgun Training"] = "Treino com Caçadeira", --- ["shots remaining."] = "", +-- ["shots remaining."] = "tiros restantes.", -- ["Silly"] = "", -- ["Sinky"] = "", ["%s is out and Team %d|scored a penalty!| |Score:"] = "%s está fora e a equipa %d|perde um ponto!| |Pontuação:", -- Basketball, Knockball @@ -183,17 +182,17 @@ ["The enemy is hiding out on yonder ducky!"] = "O inimigo está escondido ali a diante ao pé do patinho!", ["The flag will respawn next round."] = "A bandeira ira reaparecer no próximo turno.", -- ["The Nameless One"] = "", --- ["THE SPECIALISTS"] = "", + ["THE SPECIALISTS"] = "OS ESPECIALISTAS", -- ["This one's tricky."] = "", -- ["This rain is really something..."] = "", -- ["Timed Kamikaze!"] = "", -- ["Time Extended!"] = "", -- ["Time Extension"] = "", - ["TIME: "] = "TEMPO: ", + ["TIME: "] = "TEMPO: ", -- ["Toggle Shield"] = "", -- ["Toxic Team"] = "", -- User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork --- ["TRACK COMPLETED"] = "", --- ["TRACK FAILED!"] = "", +-- ["TRACK COMPLETED"] = "PISTA COMPLETA", +-- ["TRACK FAILED!"] = "PISTA", ["TrophyRace"] = "TrophyRace", ["T_T"] = "T_T", -- ["Tumbling Time Extended!"] = "", @@ -210,7 +209,7 @@ -- ["Waypoint placed."] = "", -- ["Way-Points Remaining"] = "", -- ["Weapons Reset"] = "", --- ["Well done."] = "", + ["Well done."] = "Bom trabalho.", -- ["Will this ever end?"] = "", -- ["WINNING TIME: "] = "", -- ["You'd almost swear the water was rising!"] = "", diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Locale/pt_PT.txt --- a/share/hedgewars/Data/Locale/pt_PT.txt Sun Sep 25 18:22:12 2011 +0200 +++ b/share/hedgewars/Data/Locale/pt_PT.txt Sun Sep 25 18:24:01 2011 +0200 @@ -53,7 +53,7 @@ 00:50=Ataque Perfurador 00:51=Bola de Lama 00:52=Nenhuma arma selecionada -00:53=TARDIS +00:53=Caixote do Tempo 00:54=Estrutura 00:55=Terreno-instantâneo @@ -235,12 +235,12 @@ 02:02=Luta com honra 02:02=Não desistas 02:02=Nunca te rendas -02:02=Rebenta-os e empilha-os +02:02=Rebenta e empilha! 02:02=Que comece a festa explosiva! 02:02=Espero que estejas pronto para a rixa! 02:02=Vai vai vai! 02:02=Os ouriços avançam! -02:02=Vai haver tiros e bombas e socos nas trombas! +02:02=Vai haver tiros, bombas e socos nas trombas! 02:02=Não temas! 02:02=Sê corajoso e conquista @@ -253,12 +253,12 @@ ; New health crate 02:05=Auxílio iminente! 02:05=Médico! -02:05=Primeiros-socorros atirados dos céus! +02:05=Kit de primeiros-socorros, largado do céu! 02:05=Um pacote de vida para ti 02:05=Energia... em forma de caixa! 02:05=O doutor chama 02:05=Ligaduras frescas! -02:05=Isto irá fazer-te sentir melhor +02:05=Isto vai-te fazer sentir melhor 02:05=Um Hi-Potion! Ups, jogo errado 02:05=Um "agarra-me já"! 02:05=Agarra-o @@ -448,6 +448,7 @@ 03:52=UNUSED 03:53=Modelo 40 03:54=Constroi qualquer coisa +03:55=Utilitário ; Weapon Descriptions (use | as line breaks) 04:00=Ataca os teus inimigos usando uma simples granada.|Explodirá quando o tempo chegar a zero.|1-5: Define o temporizador da granada|Ataque: Deixa premido para lançar com mais força @@ -500,6 +501,12 @@ 04:47=Duplica a diversão com estas duas minas autocolantes!|Utiliza-as para atacar ou defender. É contigo!|Ataque: Deixa pressionado para disparar mais longe 04:48=Porque é que têm as toupeiras de ser sempre as vitimas?|Dar marteladas em ouriços pode ser igualmente divertido!|Uma boa martelada rapidamente remove um terço da vida|de um ouriço e ainda o enterra no solo!|Ataque: Activar 04:49=Ressuscita os teus amigos!|Mas cuidado, esta tecnica ressuscita também os teus enimigos.|Ataque: Deixa pressionado para ressuscitar lentamente|Up: Acelerar a ressureição +04:50=Está alguém escondido num túnel subterrâneo?|Escava-os de lá para fora com um Ataque Perfurador!|O temporizador controla quão longe os misseis irão escavar. +04:51=Empurra um ouriço sem perder o turno|criando uma bola de lama tu mesmo! +04:52=UNUSED +04:53=Parte numa aventura pelo tempo e espaço,|deixando os teus colegas para se defenderem sozinhos.|Está preparado para regressar a qualquer altura,|para Morte Súbita ou se todos forem derrotados.|Atenção: Não funciona em Morte Súbita,|se estiveres sozinho, ou se fores o Rei. +04:54=INCOMPLETO +04:55=Aplica estas particulas de terreno em spray onde quiseres.|Constroi pontes, enterra inimigos ou fecha túneis.|Tem apenas cuidado, não o uses em ti proprio! ; Game goal strings 05:00=Modos de Jogo diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Locale/sk.lua --- a/share/hedgewars/Data/Locale/sk.lua Sun Sep 25 18:22:12 2011 +0200 +++ b/share/hedgewars/Data/Locale/sk.lua Sun Sep 25 18:24:01 2011 +0200 @@ -1,219 +1,175 @@ locale = { [":("] = ":(", ["!!!"] = "!!!", --- ["..."] = "", + ["..."] = "...", ["Accuracy Bonus!"] = "Bonus za presnosť!", --- ["Achievement Unlocked"] = "", -- User_Mission_-_Bamboo_Thicket, User_Mission_-_That_Sinking_Feeling, Tumbler ["a Hedgewars mini-game"] = "minihra Hedgewars", -- Space_Invasion, The_Specialists ["Aiming Practice"] = "Tréning presnosti", --Bazooka, Shotgun, SniperRifle - ["Ammo Depleted!"] = "Výzbroj vyčerpaná!", --- ["ammo extended!"] = "", --- ["Ammo is reset at the end of your turn."] = "", --- ["Ammo Maniac!"] = "", - ["Ammo"] = "Výzbroj", - ["Available points remaining: "] = "Zostavajúci počet bodov: ", --- ["[Backspace]"] = "", --- ["Bamboo Thicket"] = "", --- ["Barrel Eater!"] = "", --- ["Barrel Launcher"] = "", + ["Ammo"] = "Munícia", + ["Ammo Depleted!"] = "Munícia vyčerpaná!", + ["Ammo Maniac!"] = "Muničný maniak!", + ["Available points remaining: "] = "Zostávajúci počet bodov: ", ["Bat balls at your enemies and|push them into the sea!"] = "Loptami triafajte vašich nepriateľov|a zhoďte ich tak do mora!", - ["Bat your opponents through the|baskets and out of the map!"] = "Odpálkujte vašich súperov do koša|a von z mapy!", + ["Bat your opponents through the|baskets and out of the map!"] = "Odpálkujte vašich súperov cez kôš|von z mapy!", ["Bazooka Training"] = "Tréning s bazukou", ["Best laps per team: "] = "Najrýchlejšie kolá podľa tímov: ", - ["Best Team Times: "] = "Najrýchlejšie tímové časy: ", + ["Best Team Times: "] = "Najlepšie tímové časy: ", ["Bloody Rookies"] = "Mizerní zelenáči", -- 01#Boot_Camp, User_Mission_-_Dangerous_Ducklings, User_Mission_-_Diver, User_Mission_-_Spooky_Tree - ["Boom!"] = "Bum!", ["BOOM!"] = "BUM!", --- ["Boss defeated!"] = "", --- ["Boss Slayer!"] = "", --- ["Build a track and race."] = "", + ["Boom!"] = "Bum!", + ["Boss defeated!"] = "Vodca bol porazený!", + ["Boss Slayer!"] = "Vodca zabitý!", ["CAPTURE THE FLAG"] = "ZMOCNITE SA VLAJKY", - ["Careless"] = "Bezstarostný", --- ["Change Weapon"] = "", + ["Careless"] = "Neopatrný", ["Clumsy"] = "Nešikovný", - ["Codename: Teamwork"] = "Kódové meno: Teamová práca", --- ["Complete the track as fast as you can!"] = "", + ["Codename: Teamwork"] = "Krycie meno: Tímová práca", + ["Complete the track as fast as you can!"] = "Dokončite trasu tak rýchlo, ako len viete! ", ["Congratulations!"] = "Gratulujem!", ["Congratulations! You've eliminated all targets|within the allowed time frame."] = "Gratulujem! Zneškodnili ste všetky ciele|v stanovenom čase.", --Bazooka, Shotgun, SniperRifle - ["Control pillars to score points."] = "Ovládnite piliere, aby ste skórovali", + ["Control pillars to score points."] = "Obsaďte piliere, aby ste skórovali", ["Cybernetic Empire"] = "Kybertnetické impérium", ["DAMMIT, ROOKIE! GET OFF MY HEAD!"] = "Do kelu s tebou, zelenáč! Okamžite mi zlez z hlavy!", ["DAMMIT, ROOKIE!"] = "Prekliaty zelenáč!", ["Dangerous Ducklings"] = "Nebezpečné kačiatka", --- ["Deadweight"] = "", --- ["Demolition is fun!"] = "", --- ["Depleted Kamikaze!"] = "", --- ["Destroy invaders to score points."] = "", --- ["Double Kill!"] = "", --- ["Drone Hunter!"] = "", --- ["Drowner"] = "", --- ["Each turn you get 1-3 random weapons"] = "", --- ["Each turn you get one random weapon"] = "", + ["Deadweight"] = "Mŕtva váha", + ["Depleted Kamikaze!"] = "Vyčerpaný samovrah!", + ["Destroy invaders to score points."] = "Zničte votrelcov a získajte tak body.", + ["Drone Hunter!"] = "Lovec včeliakov!", + ["Drowner"] = "Utopenec", + ["Each turn you get 1-3 random weapons"] = "Každé kolo získate 1-3 náhodných zbraní", + ["Each turn you get one random weapon"] = "Každé kolo získate jednu náhodnú zbraň", ["Eliminate all enemies"] = "Zneškodnite všetkých nepriateľov", ["Eliminate all targets before your time runs out.|You have unlimited ammo for this mission."] = "Zneškodnite všetky ciele pred vypršaním času.|Na túto misiu máte neobmedzené množstvo streliva.", --Bazooka, Shotgun, SniperRifle ["Eliminate Poison before the time runs out"] = "Zneškodnite Poisona pred tým, ako vyprší čas", ["Eliminate the Blue Team"] = "Zneškodnite modrý tím", --- ["Eliminate the enemy before the time runs out"] = "", -- User_Mission_-_Bamboo_Thicket, User_Mission_-_Newton_and_the_Hammock --- ["Eliminate the enemy hogs to win."] = "", --- ["Eliminate the enemy specialists."] = "", + ["Eliminate the enemy specialists."] = "Zneškodnite nepriateľských špecialistov.", ["- Eliminate Unit 3378 |- Feeble Resistance must survive"] = "- Zneškodnite Jednotku 3378|- Slabý odpor musí prežiť", --- ["Energetic Engineer"] = "", ["Enjoy the swim..."] = "Užite si plávanie...", --- ["[Enter]"] = "", + ["[Enter]"] = "[Enter]", ["Fastest lap: "] = "Najrýchlejšie kolo: ", ["Feeble Resistance"] = "Slabý odpor", --- ["Fire"] = "", + ["Fire"] = "Oheň", ["Flag captured!"] = "Získaná vlajka!", ["Flag respawned!"] = "Vlajka obnovená!", ["Flag returned!"] = "Vlajka vrátená!", --- ["Flags, and their home base will be placed where each team ends their first turn."] = "", --- ["Flamer"] = "", --- ["Friendly Fire!"] = "", --- ["fuel extended!"] = "", --- ["GAME BEGUN!!!"] = "", --- ["Game Modifiers: "] = "", + ["Flags, and their home base will be placed where each team ends their first turn."] = "Vlajky a domovské základne budú umiestnené tam, kde každý tím skončí svoj prvý ťah.", + ["GAME BEGUN!!!"] = "HRA ZAČALA!!!", + ["Game Modifiers: "] = "Modifikátory hry: ", ["GAME OVER!"] = "KONIEC HRY!", ["Game Started!"] = "Hra začala!", - ["Get on over there and take him out!"] = "Okamžite poď sem a dostaň ho!", --- ["Goal"] = "", - ["GO! GO! GO!"] = "POĎ! POĎ! POĎ!", + ["Get on over there and take him out!"] = "Okamžite sa tam presuň a zneškodni ho!", + ["Goal"] = "Cieľ", + ["GO! GO! GO!"] = "POHYB! POHYB! POHYB!", ["Good birdy......"] = "Dobrý vtáčik......", ["Good luck out there!"] = "Veľa šťastia!", --- ["Good so far!"] = "", --- ["Good to go!"] = "", --- ["GOTCHA!"] = "", --- ["Grab Mines/Explosives"] = "", --- ["Hahahaha!"] = "", --- ["Haha, now THAT would be something!"] = "", --- ["Hapless Hogs"] = "", --- [" Hapless Hogs left!"] = "", --- ["Health crates extend your time."] = "", --- ["Heavy"] = "", + ["GOTCHA!"] = "A MÁM ŤA!", + ["Hahahaha!"] = "Hehehehe!", + ["Haha, now THAT would be something!"] = "Haha, tak TOTO bude niečo!", + ["Hapless Hogs"] = "Nešťastný ježko", + [" Hapless Hogs left!"] = " Nešťastný ježko odišiel!", + ["Heavy"] = "Ťažký", ["Hedgewars-Basketball"] = "Hedgewars-Basketbal", - ["Hedgewars-Knockball"] = "Hedgewars-Knockball", --- ["Heh, it's not that bad."] = "", --- ["Hit Combo!"] = "", + ["Hedgewars-Knockball"] = "Hedgewars-Vybíjaná", + ["Heh, it's not that bad."] = "Heh, to nie je také zlé.", + ["Hit Combo!"] = "Opakovaný zásah!", ["Hmmm..."] = "Hmm..", ["Hooray!"] = "Hurá!", ["Hunter"] = "Lovec", --Bazooka, Shotgun, SniperRifle ["Instructor"] = "Inštruktor", -- 01#Boot_Camp, User_Mission_-_Dangerous_Ducklings --- ["invaders destroyed"] = "", --- ["It's a good thing SUDDEN DEATH is 99 turns away..."] = "", --- ["Jumping is disabled"] = "", --- ["Kamikaze Expert!"] = "", --- ["Keep it up!"] = "", --- ["Killing spree!"] = "", --- ["KILLS"] = "", --- ["Last Target!"] = "", --- ["[Left Shift]"] = "", + ["invaders destroyed"] = "votrelci zničení", + ["It's a good thing SUDDEN DEATH is 99 turns away..."] = "Je dobré, že NÁHLA SMRŤ je tu až za 99 ťahov...", + ["Jumping is disabled"] = "Skákanie je vypnuté", + ["Kamikaze Expert!"] = "Expert na samovraždy!", + ["KILLS"] = "ZABITÍ:", + ["[Left Shift]"] = "[Ľavý Shift]", ["Listen up, maggot!!"] = "Počúvaj, ty biedny červ!", --- ["Lively Lifeguard"] = "", --- ["Mine Deployer"] = "", --- ["Mine Eater!"] = "", ["|- Mines Time:"] = "|- Časovač pre míny:", -- User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork ["MISSION FAILED"] = "MISIA NEÚSPEŠNÁ", -- User_Mission_-_Dangerous_Ducklings, User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork --- ["MISSION SUCCESS"] = "", + ["MISSION SUCCESS"] = "MISIA ÚSPEŠNÁ", ["MISSION SUCCESSFUL"] = "MISIA ÚSPEŠNÁ", -- User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork ["Movement: [Up], [Down], [Left], [Right]"] = "Pohyb: [Hore], [Dole], [Vľavo], [Vpravo]", --- ["Multi-shot!"] = "", --- ["Nameless Heroes"] = "", --- ["New Barrels Per Turn"] = "", --- ["NEW CLAN RECORD: "] = "", + ["Multi-shot!"] = "Opakovaná rana!", + ["Nameless Heroes"] = "Hrdinovia bez mena", + ["NEW CLAN RECORD: "] = "NOVÝ KLANOVÝ REKORD: ", ["NEW fastest lap: "] = "NOVÉ najrýchlejšie kolo: ", --- ["New Mines Per Turn"] = "", --- ["NEW RACE RECORD: "] = "", --- ["Newton's Hammock"] = "", --- ["NOT ENOUGH WAYPOINTS"] = "", + ["NEW RACE RECORD: "] = "NOVÝ TRAŤOVÝ REKORD: ", + ["NOT ENOUGH WAYPOINTS"] = "NEDOSTATOK NAVIGAČNÝCH BODOV", ["Not So Friendly Match"] = "Nie tak celkom priateľský zápas", -- Basketball, Knockball ["Oh no! Just try again!"] = "Áále nie! Tak to skúste znovu!", -- User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork ["Oh no! Time's up! Just try again."] = "Áále nie! Čas vypršal! Tak to skúste znovu.", --Bazooka, Shotgun, SniperRifle ["Operation Diver"] = "Operácia Potápač", - ["Opposing Team: "] = "Nepriateľský tím", + ["Opposing Team: "] = "Nepriateľský tím: ", ["Pathetic Hog #%d"] = "Žalostný ježko #%d", --- ["Pathetic Resistance"] = "", -- User_Mission_-_Bamboo_Thicket, User_Mission_-_Newton_and_the_Hammock --- ["Per-Hog Ammo"] = "", --- ["Place more waypoints using [ENTER]"] = "", --- ["Place more waypoints using the 'Air Attack' weapon."] = "", + ["Per-Hog Ammo"] = "Samostatná munícia pre ježkov", + ["Place more waypoints using [ENTER]"] = "Umiesnite viac bodov pomocou [ENTER]u", ["points"] = "body", -- Control, CTF_Blizzard, Basic_Training_-_Bazooka, Basic_Training_-_Shotgun, Basic_Training_-_Sniper_Rifle ["Poison"] = "Poison", --- ["Power Remaining"] = "", --- ["Prepare yourself"] = "", --- ["Press [Precise] to skip intro"] = "", --- ["Race complexity limit reached."] = "", --- ["RACER"] = "", - [" - Return the enemy flag to your base to score | - First team to 3 captures wins | - You may only score when your flag is in your base | - Hogs will drop the flag if killed, or drowned | - Dropped flags may be returned or recaptured | - Hogs respawn when killed"] = " - Skórujete prinesením nepriateľskej vlajky do vašej základne | - Prvý tím, ktorý dosiahne 3 body, vyhráva | - Skórujete len vtedy, keď je máte svoju vlajku v základni | - Spadnuté vlajky môžu byť vrátené na základňu alebo sa ich môže zmocniť súpere | - Ježkovia po smrti ožiujú", --- ["Round Limit:"] = "", --- ["Round Limit"] = "", --- ["Rounds Complete: "] = "", --- ["Rounds Complete"] = "", + ["Power Remaining"] = "Zostáva energie", + ["Press [Precise] to skip intro"] = "Stlačte [Presnejšie mierenie] pre preskočenie intra", + ["Race complexity limit reached."] = "Dosiahnutý limit zložitosti pretekov.", + [" - Return the enemy flag to your base to score | - First team to 3 captures wins | - You may only score when your flag is in your base | - Hogs will drop the flag if killed, or drowned | - Dropped flags may be returned or recaptured | - Hogs respawn when killed"] = " - Skórujete prinesením nepriateľskej vlajky do vašej základne | - Prvý tím, ktorý dosiahne 3 body, vyhráva | - Skórujete len vtedy, keď je máte svoju vlajku v základni | - Spadnuté vlajky môžu byť vrátené na základňu alebo sa ich môže zmocniť súper | - Ježkovia po smrti ožijú", + ["Round Limit"] = "Limit kôl", + ["Rounds Complete"] = "Dokončených kôl", ["RULES OF THE GAME [Press ESC to view]"] = "PRAVIDLÁ HRY [Stlačte Esc pre ich zobrazenie]", --- ["s|"] = "", --- ["Save as many hapless hogs as possible!"] = "", --- ["SCORE"] = "", + ["s|"] = "s|", + ["Save as many hapless hogs as possible!"] = "Zachráňte toľko nešťastných ježkov, koľko len môžete!", + ["SCORE"] = "SKÓRE", ["sec"] = "sek", -- CTF_Blizzard, TrophyRace, Basic_Training_-_Bazooka, Basic_Training_-_Shotgun, Basic_Training_-_Sniper_Rifle, User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork, Capture_the_Flag ["See ya!"] = "Tak zatiaľ!", --- ["selected!"] = "", --- ["s"] = "", -- GaudyRacer, Space_Invasion --- ["Shield boosted! +30 power"] = "", --- ["Shield Depleted"] = "", --- ["Shield is fully recharged!"] = "", --- ["Shield Master!"] = "", --- ["Shield Miser!"] = "", --- ["Shield OFF:"] = "", --- ["Shield ON:"] = "", --- ["Shield Seeker!"] = "", - ["Shotgun Team"] = "Shotgun tím", + ["s"] = "s", -- GaudyRacer, Space_Invasion + ["Shield boosted! +30 power"] = "Štít posilnený! Energia +30", + ["Shield Depleted"] = "Štít vyčerpaný", + ["Shield is fully recharged!"] = "Štít je plne nabitý!", + ["Shield Master!"] = "Štítový odborník", + ["Shield Miser!"] = "Štítový žgrloš", + ["Shield OFF:"] = "Štít VYPNUTÝ:", + ["Shield ON:"] = "Štít ZAPNUTÝ:", + ["Shield Seeker!"] = "Hľadač štítov!", + ["Shotgun Team"] = "Tím s brokovnicou", ["Shotgun Training"] = "Tréning s brokovnicou", --- ["shots remaining."] = "", --- ["Silly"] = "", --- ["Sinky"] = "", + ["Shots Left: "] = "Zostáva striel: ", -- GaudyRacer, Tumbler + ["Silly"] = "Hlúpy", + ["Sinky"] = "Prepadnutý", ["%s is out and Team %d|scored a penalty!| |Score:"] = "%s je mimo hru a tím %d|dostal trestný bod!| |Skóre:", -- Basketball, Knockball ["%s is out and Team %d|scored a point!| |Score:"] = "%s je mimo hru a tím %d|získal bod!| |Skóre:", -- Basketball, Knockball ["Sniper Training"] = "Tréning pre ostreľovačov", ["Sniperz"] = "Ostreľovači", --- ["Sponge"] = "", + ["Sponge"] = "Špongia", ["Spooky Tree"] = "Strašidelný strom", --- ["STATUS UPDATE"] = "", -- GaudyRacer, Space_Invasion --- ["Switched to "] = "", + ["STATUS UPDATE"] = "AKTUALIZÁCIA STAVU", -- GaudyRacer, Space_Invasion + ["Switched to "] = "Prepnutý na ", ["Team %d: "] = "Tím %d: ", --- ["Team Scores"] = "", -- Control, Space_Invasion --- ["That Sinking Feeling"] = "", + ["Team Scores"] = "Tímové skóre", -- Control, Space_Invasion + ["That Sinking Feeling"] = "Potopené pocity", ["That was pointless."] = "To bolo zbytočné.", ["The enemy is hiding out on yonder ducky!"] = "Nepriateľ sa schováva na tamtej kačičke!", ["The flag will respawn next round."] = "V ďalšom kole sa obnoví vlajka.", --- ["The Nameless One"] = "", --- ["THE SPECIALISTS"] = "", --- ["This one's tricky."] = "", --- ["This rain is really something..."] = "", + ["The Nameless One"] = "Bez mena", + ["THE SPECIALISTS"] = "ŠPECIALISTI", + ["This rain is really something..."] = "Ten dážď naozaj stojí za to...", ["TIME: "] = "ČAS: ", --- ["Timed Kamikaze!"] = "", --- ["Time Extended!"] = "", --- ["Time Extension"] = "", --- ["Toggle Shield"] = "", - ["Toxic Team"] = "Toxic tím", -- User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork --- ["TRACK COMPLETED"] = "", --- ["TRACK FAILED!"] = "", + ["Timed Kamikaze!"] = "Časovaná samovražda!", + ["Time Extended!"] = "Predĺžený čas!", + ["Time Left: "] = "Zostávajúci čas: ", + ["Toggle Shield"] = "Prepnúť štít", + ["Toxic Team"] = "Jedovatý tím", -- User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork + ["TRACK COMPLETED"] = "TRASA KOMPLETNÁ", + ["Track Time: "] = "Čas na trati: ", ["TrophyRace"] = "Preteky o trofej", ["T_T"] = "T_T", --- ["Tumbling Time Extended!"] = "", ["Turn Time"] = "Čas na ťah", --- ["Unit"] = "", ["Unit 3378"] = "Jednotka 3378", --- ["Unit 835"] = "", ["Unlimited Attacks"] = "Neobmedzené útoky", --- ["Unstoppable!"] = "", --- ["User Challenge"] = "", + ["User Challenge"] = "Výzva", ["Use your rope to get from start to finish as fast as you can!"] = "Použite lano na presun zo štartovnej pozície do cieľa tak rýchlo, ako to len viete!", + ["v.06"] = "v.06", ["Victory for the "] = "Víťazstvo pre", -- CTF_Blizzard, Capture_the_Flag --- ["Waypoint placed."] = "", --- ["Way-Points Remaining"] = "", --- ["Weapons Reset"] = "", --- ["Well done."] = "", --- ["Will this ever end?"] = "", --- ["WINNING TIME: "] = "", --- ["You'd almost swear the water was rising!"] = "", + ["Waypoint placed."] = "Navigačný bod umiestnený.", + ["Weapons Reset"] = "Zbrane obnovené", + ["WINNING TIME: "] = "VÍŤAZNÝ ČAS: ", + ["You'd almost swear the water was rising!"] = "Prisahali by ste, že voda stúpala!", ["You have SCORED!!"] = "SKÓROVALI ste!!", --- ["You saved"] = "", + ["You saved"] = "Uložili ste", ["You've failed. Try again."] = "Neuspeli ste. Skúste to znova.", ["You've reached the goal!| |Time: "] = "Dosiahli ste cieľ!| |Čas: ", ["'Zooka Team"] = "Bazuka tím", diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Locale/sk.txt --- a/share/hedgewars/Data/Locale/sk.txt Sun Sep 25 18:22:12 2011 +0200 +++ b/share/hedgewars/Data/Locale/sk.txt Sun Sep 25 18:24:01 2011 +0200 @@ -258,7 +258,7 @@ 03:43=Zahrať Beathovenovu smrteľnú sonátu 03:44=Spotrebujte do: 1923 03:45=Sila vedy -03:46=Hot Hot Hot! +03:46=Páli, páli, páli! 03:47=Prilepte ich niekam šikovne! 03:48=A je tu Hammer-time! 03:49=Je dobrý na to, na čo si myslíte @@ -267,6 +267,7 @@ 03:52=NEPOUŽÍVANÉ 03:53=Typ 40 03:54=Postavte niečo +03:55=Pomôcka ; Popis zbraní (ako oddeľovač riadkov použite |) 04:00=Zaútočte na vašich nepriateľov obyčajným granátom.|Vybuchne vtedy, keď vyprší časomiera.|1‐5: Nastavenie časovača granátu|Útok: Držanie tlačidla zvyšuje silu hodu| @@ -319,6 +320,12 @@ 04:47=Dvojnásobná radosť s dvoma ostnatými,|prikrádajúcimi sa, lepkavými mínami. Pripravte|reťazovú reakciu alebo sa ochráňte (alebo oboje|naraz!)|Útok: Podržte dlhšie pre vyššiu silu výstrelu|(dvakrát)| 04:48=Prečo si vylievať svoj hnev len na krtkoch?|Búchanie po ježkoch vie byť rovnako zábavné! Dobrá|rana týmto kladivom vezme ježkovi tretinu jeho|zdravia a zarazí ho do zeme.|Útok: Aktivovanie| 04:49=Oživte vašich priateľov!|Ale pozor, že táto zbraň oživí aj vašich nepriateľov.|Útok: Pre pomalé oživovanie držte útok stlačený|Hore: Urýchlenie oživovania +04:50=Skrýva sa pred vami nepriateľ pod zemou? Vykopte|ho pomocou raketovej vŕtačky!|Časovač nastavuje počet sekúnd|do detonácie. +04:51=Nemíňajte muníciu - hod blatom je zdarma.|Trošku štípe a dokáže ježka zhodiť. +04:52=NEPOUŽITÉ +04:53=Vyberte sa na cestu časom a priestorom|a nechajte vašich priateľov bojovať bez vás.|Buďte pripravený vrátiť sa kedykoľvek,|buď pri Náhlej smrti alebo keď sú všetci porazení.|Poznámka: Nefunguje počas Náhlej smrti,|ak ste sám alebo ak ste kráľom. +04:54=NEKOMPLETNÉ +04:55=Rozprášte prúd lepkavej hliny.|Postavte mosty, pochovajte nepriateľov,|zapečaťte tunely. Buďte|však opatrný a nezašpinte sa|od nej aj vy. ; Reťazce pre ciele hry diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Maps/Control/preview@2x.png Binary file share/hedgewars/Data/Maps/Control/preview@2x.png has changed diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Names/cowboy.txt --- a/share/hedgewars/Data/Names/cowboy.txt Sun Sep 25 18:22:12 2011 +0200 +++ b/share/hedgewars/Data/Names/cowboy.txt Sun Sep 25 18:24:01 2011 +0200 @@ -7,7 +7,7 @@ Tom Ernesto Douglas -sm_mario +Mario Jose Francisco Brian diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Names/ninja.txt --- a/share/hedgewars/Data/Names/ninja.txt Sun Sep 25 18:22:12 2011 +0200 +++ b/share/hedgewars/Data/Names/ninja.txt Sun Sep 25 18:24:01 2011 +0200 @@ -6,4 +6,4 @@ Arashi Bushi Itami -sf_kenshi +Kenshi diff -r 5b2b86a37089 -r a28be05b20bc share/hedgewars/Data/Themes/Deepspace/theme.cfg --- a/share/hedgewars/Data/Themes/Deepspace/theme.cfg Sun Sep 25 18:22:12 2011 +0200 +++ b/share/hedgewars/Data/Themes/Deepspace/theme.cfg Sun Sep 25 18:24:01 2011 +0200 @@ -4,6 +4,6 @@ water-bottom = $2A, $2A, $2A water-opacity = $CC music = hell.ogg -clouds = 9 +clouds = 0 flakes = 50, 1, 1000, 50, 50 ;1, 1000, 50, 50 are copied from bamboo theme, as these numbers are required