# HG changeset patch # User nemo # Date 1289658986 18000 # Node ID a69c73c5d173fa29cf2e00f3f75d2222d0afcada # Parent eb0f5c45e7ab09f5faedb29655b502182c948684# Parent 7dbdaeecebbf08bf106709b59552af5e961c7e31 merge of 0.9.14 changes into default - hopefully I successfully avoided the parts we don't want diff -r eb0f5c45e7ab -r a69c73c5d173 CMakeLists.txt --- a/CMakeLists.txt Sat Nov 13 14:40:06 2010 +0100 +++ b/CMakeLists.txt Sat Nov 13 09:36:26 2010 -0500 @@ -214,6 +214,7 @@ set(CPACK_SOURCE_IGNORE_FILES "~" + "\\\\.hg" "\\\\.svn" "\\\\.exe$" "\\\\.a$" @@ -229,7 +230,11 @@ "\\\\.tmp$" "\\\\.core$" "\\\\.sh$" + "\\\\.sifz$" + "\\\\.svg$" + "\\\\.svgz$" "\\\\.ppu$" + "\\\\.psd$" "\\\\.o$" "Makefile" "Doxyfile" @@ -242,7 +247,10 @@ "hwconsts.cpp$" "playlist.inc$" "CPack" -# "^${CMAKE_CURRENT_SOURCE_DIR}/misc/libopenalbridge" + "cmake_install.cmake$" + "config.inc$" + "hwengine.desktop$" +# "^${CMAKE_CURRENT_SOURCE_DIR}/misc/libopenalbridge" "^${CMAKE_CURRENT_SOURCE_DIR}/project_files/HedgewarsMobile/" "^${CMAKE_CURRENT_SOURCE_DIR}/bin/[a-z]" "^${CMAKE_CURRENT_SOURCE_DIR}/tools/templates" diff -r eb0f5c45e7ab -r a69c73c5d173 INSTALL --- a/INSTALL Sat Nov 13 14:40:06 2010 +0100 +++ b/INSTALL Sat Nov 13 09:36:26 2010 -0500 @@ -23,7 +23,7 @@ $ cmake -DCMAKE_BUILD_TYPE="Release" -DBUNDLE=1 . -if you have QT installed but it is not found you can set it up with -DQT_QMAKE_EXECUTABLE="path_to_qmake" +if you have Qt installed but it is not found you can set it up with -DQT_QMAKE_EXECUTABLE="path_to_qmake" 2. Compile: $ make diff -r eb0f5c45e7ab -r a69c73c5d173 README --- a/README Sat Nov 13 14:40:06 2010 +0100 +++ b/README Sat Nov 13 09:36:26 2010 -0500 @@ -3,5 +3,5 @@ Images and sounds are distributed under the terms of the GNU FDL licence. Source: -Copyright 2004-2009 Andrey Korotaev -Copyright 2006-2008 Igor Ulyanov aka Displacer \ No newline at end of file +Copyright 2004-2010 Andrey Korotaev +Portions copyright 2006-2008 Igor Ulyanov aka Displacer diff -r eb0f5c45e7ab -r a69c73c5d173 gameServer/Utils.hs --- a/gameServer/Utils.hs Sat Nov 13 14:40:06 2010 +0100 +++ b/gameServer/Utils.hs Sat Nov 13 09:36:26 2010 -0500 @@ -95,6 +95,8 @@ protoNumber2ver 30 = "0.9.13-dev" protoNumber2ver 31 = "0.9.13" protoNumber2ver 32 = "0.9.14-dev" +protoNumber2ver 33 = "0.9.14" +protoNumber2ver 34 = "0.9.15-dev" protoNumber2ver _ = "Unknown" askFromConsole :: String -> IO String diff -r eb0f5c45e7ab -r a69c73c5d173 misc/uSHA.pas --- a/misc/uSHA.pas Sat Nov 13 14:40:06 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,166 +0,0 @@ -(* - * Hedgewars, a free turn based strategy game - * Copyright (c) 2004-2010 Andrey Korotaev - * - * 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 - *) - -{$INCLUDE "options.inc"} - -unit uSHA; -interface -uses SDLh; - -type TSHA1Context = packed record - H: array[0..4] of LongWord; - Length, CurrLength: Int64; - Buf: array[0..63] of byte; - end; - TSHA1Digest = array[0..4] of LongWord; - -procedure SHA1Init(var Context: TSHA1Context); -procedure SHA1Update(var Context: TSHA1Context; Buf: PByteArray; Length: LongWord); -procedure SHA1UpdateLongwords(var Context: TSHA1Context; Buf: PLongwordArray; Length: LongWord); -function SHA1Final(Context: TSHA1Context): TSHA1Digest; - -implementation - -function rol(x: LongWord; y: Byte): LongWord; -begin - rol:= (X shl y) or (X shr (32 - y)) -end; - -function Ft(t, b, c, d: LongWord): LongWord; -begin -case t of - 0..19: Ft := (b and c) or ((not b) and d); - 20..39: Ft := b xor c xor d; - 40..59: Ft := (b and c) or (b and d) or (c and d); - else Ft := b xor c xor d; - end; -end; - -function Kt(t: Byte): LongWord; -begin - case t of - 0..19: Kt := $5A827999; - 20..39: Kt := $6ED9EBA1; - 40..59: Kt := $8F1BBCDC; - else - Kt := $CA62C1D6 - end; -end; - - -procedure SHA1Hash(var Context: TSHA1Context); -var S: array[0..4 ] of LongWord; - W: array[0..79] of LongWord; - i, t: LongWord; -begin -{$HINTS OFF} -move(Context.H, S, sizeof(S)); -{$HINTS ON} -for i:= 0 to 15 do - SDLNet_Write32(PLongWordArray(@Context.Buf)^[i], @W[i]); - -for i := 16 to 79 do - W[i] := rol(W[i - 3] xor W[i - 8] xor W[i - 14] xor W[i - 16], 1); - -for i := 0 to 79 do - begin - t:= rol(S[0], 5) + Ft(i, S[1], S[2], S[3]) + S[4] + W[i] + Kt(i); - S[4]:= S[3]; - S[3]:= S[2]; - S[2]:= rol(S[1], 30); - S[1]:= S[0]; - S[0]:= t - end; - -for i := 0 to 4 do - Context.H[i]:= Context.H[i] + S[i] -end; - -procedure SHA1Init(var Context: TSHA1Context); -begin - with Context do - begin - Length := 0; - CurrLength:= 0; - H[0]:= $67452301; - H[1]:= $EFCDAB89; - H[2]:= $98BADCFE; - H[3]:= $10325476; - H[4]:= $C3D2E1F0 - end -end; - -procedure SHA1Update(var Context: TSHA1Context; Buf: PByteArray; Length: LongWord); -var i: Longword; -begin -for i:= 0 to Pred(Length) do - begin - Context.Buf[Context.CurrLength]:= Buf^[i]; - inc(Context.CurrLength); - if Context.CurrLength = 64 then - begin - SHA1Hash(Context); - inc(Context.Length, 512); - Context.CurrLength:= 0 - end - end -end; - -procedure SHA1UpdateLongwords(var Context: TSHA1Context; Buf: PLongwordArray; Length: LongWord); -var i: Longword; -begin - for i:= 0 to Pred(Length div 4) do - begin - SDLNet_Write32(Buf^[i], @Context.Buf[Context.CurrLength]); - inc(Context.CurrLength, 4); - if Context.CurrLength = 64 then - begin - SHA1Hash(Context); - inc(Context.Length, 512); - Context.CurrLength:= 0 - end - end -end; - -function SHA1Final(Context: TSHA1Context): TSHA1Digest; -var i: LongWord; -begin - Context.Length:= Context.Length + Context.CurrLength shl 3; - Context.Buf[Context.CurrLength]:= $80; - inc(Context.CurrLength); - - if Context.CurrLength > 56 then - begin - FillChar(Context.Buf[Context.CurrLength], 64 - Context.CurrLength, 0); - Context.CurrLength:= 64; - SHA1Hash(Context); - Context.CurrLength:=0 - end; - - FillChar(Context.Buf[Context.CurrLength], 56 - Context.CurrLength, 0); - - for i:= 56 to 63 do - Context.Buf[i] := (Context.Length shr ((63 - i) * 8)) and $FF; - SHA1Hash(Context); - for i:= 0 to 4 do - SHA1Final[i]:= Context.H[i]; - - FillChar(Context, sizeof(Context), 0) -end; - -end. diff -r eb0f5c45e7ab -r a69c73c5d173 share/hedgewars/Data/Locale/hedgewars_en.ts --- a/share/hedgewars/Data/Locale/hedgewars_en.ts Sat Nov 13 14:40:06 2010 +0100 +++ b/share/hedgewars/Data/Locale/hedgewars_en.ts Sat Nov 13 09:36:26 2010 -0500 @@ -42,7 +42,7 @@ When this option is enabled selecting a game scheme will auto-select a weapon (and viceversa) - + When this option is enabled selecting a game scheme will auto-select a weapon (and vice versa) @@ -92,17 +92,17 @@ DefaultTeam - + Default Team Hedgewars Demo File File Types - + Hedgewars Demo File Hedgewars Save File File Types - + Hedgewars Save File @@ -156,7 +156,7 @@ Type - Type + Type Small tunnels @@ -347,19 +347,19 @@ Details - + Details Health graph - + Health graph Ranking - + Ranking The best shot award was won by <b>%1</b> with <b>%2</b> pts. - + The best shot award was won by <b>%1</b> with <b>%2</b> pts. The best killer is <b>%1</b> with <b>%2</b> kills in a turn. @@ -377,30 +377,28 @@ (%1 kill) - - - + + (%1 kill) + (%1 kills) <b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts. - <b>%1</b> killed <b>%2</b> of his own hedgehogs. - <b>%1</b> was scared and skipped turn <b>%2</b> times. - - - + + <b>%1</b> was scared and skipped turn <b>%2</b> time. + <b>%1</b> was scared and skipped turn <b>%2</b> times. @@ -724,7 +722,7 @@ You can't edit teams from team selection. Go back to main menu to add, edit or delete teams. - + You can't edit teams from team selection. Go back to main menu to add, edit or delete teams. @@ -1549,7 +1547,7 @@ Associate file extensions - + Associate file extensions @@ -1870,7 +1868,7 @@ slot 10 - slot 10 + slot 10 diff -r eb0f5c45e7ab -r a69c73c5d173 share/hedgewars/Data/Locale/hedgewars_es.ts --- a/share/hedgewars/Data/Locale/hedgewars_es.ts Sat Nov 13 14:40:06 2010 +0100 +++ b/share/hedgewars/Data/Locale/hedgewars_es.ts Sat Nov 13 09:36:26 2010 -0500 @@ -42,7 +42,7 @@ When this option is enabled selecting a game scheme will auto-select a weapon (and viceversa) - + Cuando esta opción esté activada escoger un modo de juego escogerá el set de armas correspondiente (y viceversa) @@ -670,12 +670,12 @@ 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 - + Puedes encontrar los archivos de configuración del juego en la carpeta "Library/Application Support/Hedgewars" dentro de tu directorio personal. Puedes hacer copias de seguridad de los mismos o copiarlos a otro ordenador si lo deseas, pero no intentes editarlos a mano para evitar posibles pérdidas de datos. 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 - + Puedes encontrar los archivos de configuración del juego en la carpeta ".hedgewars" dentro de tu directorio personal. Puedes hacer copias de seguridad de los mismos o copiarlos a otro ordenador si lo deseas, pero no intentes editarlos a mano para evitar posibles pérdidas de datos. @@ -1415,7 +1415,7 @@ Tip: - Consejo: + Consejo: This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! @@ -1441,11 +1441,11 @@ Sudden Death Health Decrease - Decremento de vida en muerte súbita + Disminución de vida por turno en muerte súbita Bind schemes and weapons - + Enlazar modos y sets diff -r eb0f5c45e7ab -r a69c73c5d173 share/hedgewars/Data/Locale/hedgewars_pl.ts --- a/share/hedgewars/Data/Locale/hedgewars_pl.ts Sat Nov 13 14:40:06 2010 +0100 +++ b/share/hedgewars/Data/Locale/hedgewars_pl.ts Sat Nov 13 09:36:26 2010 -0500 @@ -43,7 +43,7 @@ When this option is enabled selecting a game scheme will auto-select a weapon (and viceversa) - + Kiedy ta opcja jest włączona, wybór ustawnień gry zmienia uzbrojenie na odpowiadające (i vice versa) @@ -674,7 +674,7 @@ You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. Tips - Swoje zespoły i konfigurację gry znajdzie4sz w folderze "Moje Dokumenty\Hedgewars". Twórz regularnie kopie zapasowe ale nie edytuj tych plików własnoręcznie. + Swoje zespoły i konfigurację gry znajdziesz w folderze "Moje Dokumenty\Hedgewars". Twórz regularnie kopie zapasowe, ale nie edytuj tych plików własnoręcznie. 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. @@ -694,12 +694,12 @@ 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 - + Swoje zespoły i konfigurację gry znajdziesz w folderze "Biblioteka/Wsparcie aplikacji/Hedgewars" w towim katalogu domowym. Twórz regularnie kopie zapasowe, ale nie edytuj tych plików własnoręcznie. 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 - + Swoje zespoły i konfigurację gry znajdziesz w folderze ".hedgewars" w twoim katalogu domowym. Twórz regularnie kopie zapasowe, ale nie edytuj tych plików własnoręcznie. @@ -1474,7 +1474,7 @@ Bind schemes and weapons - + Połącz ustawienia gry z uzbrojeniem diff -r eb0f5c45e7ab -r a69c73c5d173 share/hedgewars/Data/Locale/hedgewars_ru.ts --- a/share/hedgewars/Data/Locale/hedgewars_ru.ts Sat Nov 13 14:40:06 2010 +0100 +++ b/share/hedgewars/Data/Locale/hedgewars_ru.ts Sat Nov 13 09:36:26 2010 -0500 @@ -376,8 +376,8 @@ A total of <b>%1</b> hedgehog(s) were killed during this round. Всего <b>%1</b> ёж был убит в течение игры. - Всего <b>%1</b> ёжа был убит в течение игры. - Всего <b>%1</b> ёжей был убит в течение игры. + Всего <b>%1</b> ежа были убиты в течение игры. + Всего <b>%1</b> ежей были убиты в течение игры. diff -r eb0f5c45e7ab -r a69c73c5d173 share/hedgewars/Data/Maps/Basketball/map.lua --- a/share/hedgewars/Data/Maps/Basketball/map.lua Sat Nov 13 14:40:06 2010 +0100 +++ b/share/hedgewars/Data/Maps/Basketball/map.lua Sat Nov 13 09:36:26 2010 -0500 @@ -15,7 +15,7 @@ ["en"] = "Not So Friendly Match", ["de"] = "Kein-so-Freundschaftsspiel", ["es"] = "Partido no-tan-amistoso", - ["pl"] = "Mecz Nie-Taki-Towarzyski", + ["pl"] = "Mecz Nie-Do-Końca Towarzyski", ["pt_PT"] = "Partida não muito amigável", ["sk"] = "Nie tak celkom priateľský zápas", ["sv"] = "En inte så vänlig match", diff -r eb0f5c45e7ab -r a69c73c5d173 share/hedgewars/Data/Maps/Knockball/map.lua --- a/share/hedgewars/Data/Maps/Knockball/map.lua Sat Nov 13 14:40:06 2010 +0100 +++ b/share/hedgewars/Data/Maps/Knockball/map.lua Sat Nov 13 09:36:26 2010 -0500 @@ -15,7 +15,7 @@ ["en"] = "Not So Friendly Match", ["de"] = "Kein-so-Freundschaftsspiel", ["es"] = "Partido no-tan-amistoso", - ["pl"] = "Mecz Nie-Taki-Towarzyski", + ["pl"] = "Mecz Nie-Do-Końca Towarzyski", ["pt_PT"] = "Partida não muito amigável", ["sk"] = "Nie tak celkom priateľký zápas", ["sv"] = "En inte så vänlig match", diff -r eb0f5c45e7ab -r a69c73c5d173 tools/MissionsEditor/MissionsEditor.pro --- a/tools/MissionsEditor/MissionsEditor.pro Sat Nov 13 14:40:06 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -# ------------------------------------------------- -# Project created by QtCreator 2009-10-21T19:51:57 -# ------------------------------------------------- -TARGET = MissionsEditor -TEMPLATE = app -SOURCES += main.cpp \ - editor.cpp \ - teamedit.cpp \ - hedgehogedit.cpp -HEADERS += editor.h \ - teamedit.h \ - hedgehogedit.h -FORMS += editor.ui \ - teamedit.ui \ - hedgehogedit.ui diff -r eb0f5c45e7ab -r a69c73c5d173 tools/MissionsEditor/editor.cpp --- a/tools/MissionsEditor/editor.cpp Sat Nov 13 14:40:06 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,160 +0,0 @@ -#include -#include -#include "editor.h" -#include "ui_editor.h" - -editor::editor(QWidget *parent) - : QMainWindow(parent), ui(new Ui::editor) -{ - ui->setupUi(this); - - reset(); - - cbFlags - << ui->cbForts - << ui->cbMultiWeapon - << ui->cbSolidLand - << ui->cbBorder - << ui->cbDivideTeams - << ui->cbLowGravity - << ui->cbLaserSight - << ui->cbInvulnerable - << ui->cbMines - << ui->cbVampiric - << ui->cbKarma - << ui->cbArtillery - << ui->cbOneClanMode - ; -} - -editor::~editor() -{ - delete ui; -} - -void editor::reset() -{ - for(int i = 0; i < 6; ++i) - { - ui->twTeams->setTabEnabled(i, false); - ui->twTeams->widget(i)->setEnabled(false); - } -} - -void editor::on_actionLoad_triggered() -{ - QString fileName = QFileDialog::getOpenFileName(this, QString(), QString(), "Missions (*.txt)"); - - if(!fileName.isEmpty()) - load(fileName); -} - -void editor::load(const QString & fileName) -{ - int currTeam = -1; - - QFile file(fileName); - - if(!file.open(QIODevice::ReadOnly)) - { - QMessageBox::warning(this, "File error", "No such file"); - return ; - } - - QTextStream stream(&file); - - while(!stream.atEnd()) - { - QString line = stream.readLine(); - if (line.startsWith("seed")) - ui->leSeed->setText(line.mid(5)); - else - if (line.startsWith("map")) - ui->leMap->setText(line.mid(4)); - else - if (line.startsWith("theme")) - ui->leTheme->setText(line.mid(6)); - else - if (line.startsWith("$turntime")) - ui->sbTurnTime->setValue(line.mid(10).toInt()); - else - if (line.startsWith("$casefreq")) - ui->sbCrateDrops->setValue(line.mid(10).toInt()); - else - if (line.startsWith("$damagepct")) - ui->sbDamageModifier->setValue(line.mid(11).toInt()); - else - if (line.startsWith("$gmflags")) - { - quint32 flags = line.mid(9).toInt(); - foreach(QCheckBox * cb, cbFlags) - { - cb->setChecked(flags & 1); - flags >>= 1; - } - } - else - if (line.startsWith("addteam") && (currTeam < 5)) - { - ++currTeam; - ui->twTeams->setTabEnabled(currTeam, true); - ui->twTeams->widget(currTeam)->setEnabled(true); - - line = line.mid(8); - int spacePos = line.indexOf('\x20'); - quint32 teamColor = line.left(spacePos).toUInt(); - QString teamName = line.mid(spacePos + 1); - - TeamEdit * te = qobject_cast(ui->twTeams->widget(currTeam)); - te->setTeam(teamName, teamColor); - } - else - if (line.startsWith("addhh") && (currTeam >= 0)) - { - line = line.mid(6); - quint32 level = line.left(1).toUInt(); - line = line.mid(2); - int spacePos = line.indexOf('\x20'); - quint32 health = line.left(spacePos).toUInt(); - QString hhName = line.mid(spacePos + 1); - - TeamEdit * te = qobject_cast(ui->twTeams->widget(currTeam)); - te->addHedgehog(level, health, hhName); - } - else - if (line.startsWith("fort") && (currTeam >= 0)) - { - TeamEdit * te = qobject_cast(ui->twTeams->widget(currTeam)); - te->setFort(line.mid(5)); - } - else - if (line.startsWith("hat") && (currTeam >= 0)) - { - TeamEdit * te = qobject_cast(ui->twTeams->widget(currTeam)); - te->setLastHHHat(line.mid(4)); - } - else - if (line.startsWith("hhcoords") && (currTeam >= 0)) - { - line = line.mid(9); - int spacePos = line.indexOf('\x20'); - int x = line.left(spacePos).toUInt(); - int y = line.mid(spacePos + 1).toInt(); - - TeamEdit * te = qobject_cast(ui->twTeams->widget(currTeam)); - te->setLastHHCoords(x, y); - } - else - if (line.startsWith("grave") && (currTeam >= 0)) - { - TeamEdit * te = qobject_cast(ui->twTeams->widget(currTeam)); - te->setGrave(line.mid(6)); - } - else - if (line.startsWith("voicepack") && (currTeam >= 0)) - { - TeamEdit * te = qobject_cast(ui->twTeams->widget(currTeam)); - te->setVoicepack(line.mid(10)); - } - } -} diff -r eb0f5c45e7ab -r a69c73c5d173 tools/MissionsEditor/editor.h --- a/tools/MissionsEditor/editor.h Sat Nov 13 14:40:06 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -#ifndef EDITOR_H -#define EDITOR_H - -#include - -namespace Ui -{ - class editor; -} - -class QCheckBox; - -class editor : public QMainWindow -{ - Q_OBJECT - -public: - editor(QWidget *parent = 0); - ~editor(); - -private: - Ui::editor *ui; - QList cbFlags; - - void load(const QString & fileName); - void reset(); - -private slots: - void on_actionLoad_triggered(); -}; - -#endif // EDITOR_H diff -r eb0f5c45e7ab -r a69c73c5d173 tools/MissionsEditor/editor.ui --- a/tools/MissionsEditor/editor.ui Sat Nov 13 14:40:06 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,406 +0,0 @@ - - - editor - - - - 0 - 0 - 419 - 476 - - - - editor - - - - - - - 2 - - - - Mission - - - - - - Name - - - - - - - - - - Description - - - - - - - - - - Map - - - - - - - Theme - - - - - - - - - - - - - - Options - - - - - - - - Invulnerable - - - - - - - Artillery - - - - - - - SolidLand - - - - - - - Vampiric - - - - - - - OneClanMode - - - true - - - - - - - Karma - - - - - - - LaserSight - - - - - - - Border - - - - - - - LowGravity - - - - - - - Mines - - - - - - - DivideTeams - - - - - - - MultiWeapon - - - true - - - - - - - Forts - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - Seed - - - - - - - foobar - - - - - - - Damage Modifier - - - - - - - Turn Time - - - - - - - Crate Drops - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - 10 - - - 300 - - - 15 - - - 100 - - - - - - - 1000 - - - 100000 - - - 5000 - - - 45000 - - - - - - - 3 - - - - - - - - - - Teams - - - - - - Add Team - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - true - - - 0 - - - - Team 1 - - - - - Team 2 - - - - - Team 3 - - - - - Team 4 - - - - - Team 5 - - - - - Team 6 - - - - - - - - - Triggers - - - - - - - - - - 0 - 0 - 419 - 28 - - - - - &File - - - - - - - - - - - - &Load... - - - - - &Save - - - - - &Quit - - - - - - - TeamEdit - QWidget -
teamedit.h
- 1 -
-
- - -
diff -r eb0f5c45e7ab -r a69c73c5d173 tools/MissionsEditor/hedgehogedit.cpp --- a/tools/MissionsEditor/hedgehogedit.cpp Sat Nov 13 14:40:06 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -#include "hedgehogedit.h" -#include "ui_hedgehogedit.h" - -HedgehogEdit::HedgehogEdit(QWidget *parent) : - QFrame(parent), - m_ui(new Ui::HedgehogEdit) -{ - m_ui->setupUi(this); -} - -HedgehogEdit::~HedgehogEdit() -{ - delete m_ui; -} - -void HedgehogEdit::changeEvent(QEvent *e) -{ - QWidget::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - m_ui->retranslateUi(this); - break; - default: - break; - } -} - -void HedgehogEdit::setHedgehog(quint32 level, quint32 health, const QString & name) -{ - m_ui->cbLevel->setCurrentIndex(level); - m_ui->sbHealth->setValue(health); - m_ui->leName->setText(name); -} - -void HedgehogEdit::setHat(const QString & name) -{ - m_ui->leHat->setText(name); -} - -void HedgehogEdit::setCoordinates(int x, int y) -{ - m_ui->pbCoordinates->setText(QString("%1x%2").arg(x).arg(y)); -} diff -r eb0f5c45e7ab -r a69c73c5d173 tools/MissionsEditor/hedgehogedit.h --- a/tools/MissionsEditor/hedgehogedit.h Sat Nov 13 14:40:06 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -#ifndef HEDGEHOGEDIT_H -#define HEDGEHOGEDIT_H - -#include - -namespace Ui { - class HedgehogEdit; -} - -class HedgehogEdit : public QFrame { - Q_OBJECT -public: - HedgehogEdit(QWidget *parent = 0); - ~HedgehogEdit(); - - void setHedgehog(quint32 level = 0, quint32 health = 100, const QString & name = QString()); - void setHat(const QString & name); - void setCoordinates(int x, int y); - -protected: - void changeEvent(QEvent *e); - -private: - Ui::HedgehogEdit *m_ui; -}; - -#endif // HEDGEHOGEDIT_H diff -r eb0f5c45e7ab -r a69c73c5d173 tools/MissionsEditor/hedgehogedit.ui --- a/tools/MissionsEditor/hedgehogedit.ui Sat Nov 13 14:40:06 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,138 +0,0 @@ - - - HedgehogEdit - - - - 0 - 0 - 400 - 300 - - - - Form - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 3 - - - 3 - - - - - - - - X - - - - - - - 0 - - - - Human - - - - - Level 5 - - - - - Level 4 - - - - - Level 3 - - - - - Level 2 - - - - - Level 1 - - - - - - - - - - - Name - - - - - - - Level - - - - - - - 1 - - - 300 - - - 100 - - - - - - - Health - - - - - - - Hat - - - - - - - Random - - - - - - - Place - - - - - - - - diff -r eb0f5c45e7ab -r a69c73c5d173 tools/MissionsEditor/main.cpp --- a/tools/MissionsEditor/main.cpp Sat Nov 13 14:40:06 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ -#include -#include "editor.h" - -int main(int argc, char *argv[]) -{ - QApplication a(argc, argv); - editor w; - w.show(); - return a.exec(); -} diff -r eb0f5c45e7ab -r a69c73c5d173 tools/MissionsEditor/teamedit.cpp --- a/tools/MissionsEditor/teamedit.cpp Sat Nov 13 14:40:06 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,98 +0,0 @@ -#include "teamedit.h" -#include "ui_teamedit.h" - -TeamEdit::TeamEdit(QWidget *parent) : - QWidget(parent), - m_ui(new Ui::TeamEdit) -{ - m_ui->setupUi(this); - - reset(); -} - -TeamEdit::~TeamEdit() -{ - delete m_ui; -} - -void TeamEdit::changeEvent(QEvent *e) -{ - QWidget::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - m_ui->retranslateUi(this); - break; - default: - break; - } -} - -void TeamEdit::reset() -{ - QLayout * l = m_ui->scrollArea->widget()->layout(); - - for(int i = 0; i < 8; ++i) - l->itemAt(i)->widget()->setVisible(false); -} - -void TeamEdit::setTeam(const QString & teamName, quint32 color) -{ - m_ui->leTeamName->setText(teamName); -} - -void TeamEdit::setFort(const QString & name) -{ - m_ui->leFort->setText(name); -} - -void TeamEdit::setGrave(const QString & name) -{ - m_ui->leGrave->setText(name); -} - -void TeamEdit::setVoicepack(const QString & name) -{ - m_ui->leVoicepack->setText(name); -} - -void TeamEdit::addHedgehog(quint32 level, quint32 health, const QString & name) -{ - QLayout * l = m_ui->scrollArea->widget()->layout(); - - int i = 0; - while((i < 8) && (l->itemAt(i)->widget()->isVisible())) ++i; - - if(i < 8) - { - HedgehogEdit * he = qobject_cast(l->itemAt(i)->widget()); - he->setHedgehog(level, health, name); - l->itemAt(i)->widget()->setVisible(true); - } -} - -void TeamEdit::setLastHHHat(const QString & name) -{ - QLayout * l = m_ui->scrollArea->widget()->layout(); - - int i = 0; - while((i < 8) && (l->itemAt(i)->widget()->isVisible())) ++i; - - --i; - - HedgehogEdit * he = qobject_cast(l->itemAt(i)->widget()); - he->setHat(name); -} - -void TeamEdit::setLastHHCoords(int x, int y) -{ - QLayout * l = m_ui->scrollArea->widget()->layout(); - - int i = 0; - while((i < 8) && (l->itemAt(i)->widget()->isVisible())) ++i; - - --i; - - HedgehogEdit * he = qobject_cast(l->itemAt(i)->widget()); - he->setCoordinates(x ,y); -} - diff -r eb0f5c45e7ab -r a69c73c5d173 tools/MissionsEditor/teamedit.h --- a/tools/MissionsEditor/teamedit.h Sat Nov 13 14:40:06 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -#ifndef TEAMEDIT_H -#define TEAMEDIT_H - -#include - -namespace Ui { - class TeamEdit; -} - -class TeamEdit : public QWidget { - Q_OBJECT -public: - TeamEdit(QWidget *parent = 0); - ~TeamEdit(); - - void reset(); - void setTeam(const QString & teamName = QString(), quint32 color = 0xdd0000); - void addHedgehog(quint32 level = 0, quint32 health = 100, const QString & name = QString()); - void setFort(const QString & name); - void setGrave(const QString & name); - void setLastHHHat(const QString & name); - void setLastHHCoords(int x, int y); - void setVoicepack(const QString & name); -protected: - void changeEvent(QEvent *e); - -private: - Ui::TeamEdit *m_ui; -}; - -#endif // TEAMEDIT_H diff -r eb0f5c45e7ab -r a69c73c5d173 tools/MissionsEditor/teamedit.ui --- a/tools/MissionsEditor/teamedit.ui Sat Nov 13 14:40:06 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,172 +0,0 @@ - - - TeamEdit - - - - 0 - 0 - 450 - 414 - - - - Form - - - - - - - - Team name - - - - - - - - - - - - - Colour - - - - - - - Fort - - - - - - - Grave - - - - - - - - - - - - - Voicepack - - - - - - - - - - - - true - - - - - 0 - 0 - 301 - 235 - - - - - 3 - - - 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Qt::Vertical - - - - 20 - 120 - - - - - - - - - - - - Add hedgehog - - - - - - - Qt::Vertical - - - - 117 - 125 - - - - - - - - Delete team - - - - - - - - HedgehogEdit - QWidget -
hedgehogedit.h
- 1 -
-
- - -