# HG changeset patch # User unc0rr # Date 1463516989 -10800 # Node ID a69124eb7ce77f2922b78761b12162fd3e06f699 # Parent 8c71c5a1172ff121c926d998918615ee522e8469# Parent 7654e23579347dc520afac1ebea9b2647db18423 Merge default diff -r 8c71c5a1172f -r a69124eb7ce7 .travis.yml --- a/.travis.yml Tue May 17 23:18:08 2016 +0300 +++ b/.travis.yml Tue May 17 23:29:49 2016 +0300 @@ -1,46 +1,64 @@ language: c +sudo: true os: - linux - osx + branches: only: master + compiler: - gcc - clang + env: - BUILD_ARGS="-DCMAKE_BUILD_TYPE=Release" - BUILD_ARGS="-DCMAKE_BUILD_TYPE=Debug" - - BUILD_ARGS="-DNOSERVER=1 -DBUILD_ENGINE_C=1" - - BUILD_ARGS="-DNOSERVER=1 -DNOVIDEOREC=1 -DNOPNG=1" + - BUILD_ARGS="-DNOSERVER=1 -DGL2=1 -DNOPNG=1" - BUILD_ARGS="-DNOSERVER=1 -DLUA_SYSTEM=0 -DPHYSFS_SYSTEM=0" + matrix: include: - - language: objective-c + - language: c + os: linux + compiler: clang + env: BUILD_ARGS="-DNOSERVER=1 -DBUILD_ENGINE_C=1" + - language: c + os: osx + compiler: clang + env: BUILD_ARGS="-DNOSERVER=1 -DBUILD_ENGINE_C=1" + - language: c + os: linux + compiler: clang + env: BUILD_ARGS="-DNOSERVER=1 -DBUILD_ENGINE_C=1 -DGL2=1" + - language: c os: osx - compiler: - env: BUILD_ARGS="IOS" SDL_LIB_PATH="$TRAVIS_BUILD_DIR/../Library" + compiler: clang + env: BUILD_ARGS="-DNOSERVER=1 -DBUILD_ENGINE_C=1 -DGL2=1" + - language: objective-c + sudo: required + os: osx + compiler: clang + env: TRAVIS_OS_NAME="ios" SDL_LIB_PATH="$TRAVIS_BUILD_DIR/../Library" osx_image: xcode7.2 - sudo: required + before_install: | - if [ "$BUILD_ARGS" == "IOS" ]; then + if [ "$TRAVIS_OS_NAME" == "linux" ]; then + sudo add-apt-repository -y ppa:zoogie/sdl2-snapshots + sudo apt-get update -qq + elif [ "$TRAVIS_OS_NAME" == "osx" ]; then + brew update --all + elif [ "$TRAVIS_OS_NAME" == "ios" ]; then hg clone http://hg.libsdl.org/SDL $SDL_LIB_PATH/SDL/ hg clone http://hg.libsdl.org/SDL_image $SDL_LIB_PATH/SDL_image/ hg clone http://hg.libsdl.org/SDL_net $SDL_LIB_PATH/SDL_net/ hg clone http://hg.libsdl.org/SDL_ttf $SDL_LIB_PATH/SDL_ttf/ hg clone http://hg.libsdl.org/SDL_mixer $SDL_LIB_PATH/SDL_mixer/ - elif [ "$TRAVIS_OS_NAME" == "linux" ]; then - sudo add-apt-repository -y ppa:zoogie/sdl2-snapshots - sudo apt-get update -qq - elif [ "$TRAVIS_OS_NAME" == "osx" ]; then - brew update --all fi + install: | - if [ "$BUILD_ARGS" == "IOS" ]; then - # FPC 3.0.0 required for using FPC 3.0.1 which contains rtl for ios - sudo bash tools/dmg_pkg_install.sh ftp://freepascal.stack.nl/pub/fpc/dist/3.0.0/i386-macosx/fpc-3.0.0.intel-macosx.dmg - sudo bash tools/dmg_pkg_install.sh ftp://freepascal.stack.nl/pub/fpc/dist/3.0.0/i386-macosx/fpc-3.0.1.intel-macosx.cross.ios.dmg - elif [ "$TRAVIS_OS_NAME" == "linux" ]; then + if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install debhelper cmake dpkg-dev libqt4-dev qt4-qmake libphysfs-dev libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev libsdl2-image-dev libsdl2-net-dev bzip2 ghc libghc-mtl-dev libghc-parsec3-dev libghc-bytestring-show-dev libghc-vector-dev libghc-zlib-dev libghc-random-dev libghc-stm-dev libghc-network-dev libghc-dataenc-dev libghc-hslogger-dev libghc-utf8-string-dev libghc-sha-dev libghc-entropy-dev liblua5.1-0-dev imagemagick fpc fp-compiler fp-units-misc libpng-dev fp-units-gfx libavcodec-dev libavformat-dev libglew1.6-dev elif [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install fpc glew qt physfs lua51 sdl2 sdl2_image sdl2_net sdl2_ttf ffmpeg ghc cabal-install @@ -55,31 +73,38 @@ cabal install --only-dependencies tools/pas2c/pas2c.cabal fi # avoid installing Sparkle, add default unit path - export BUILD_ARGS="$BUILD_ARGS -DNOAUTOUPDATE=1 -DCMAKE_Pascal_FLAGS=-Fu/usr/local/lib/fpc/$(fpc -iW)/units/x86_64-darwin/*/" + export BUILD_ARGS="$BUILD_ARGS -DNOAUTOUPDATE=1" + elif [ "$TRAVIS_OS_NAME" == "ios" ]; then + # FPC 3.0.0 required for using FPC 3.0.1 which contains rtl for ios + sudo bash tools/dmg_pkg_install.sh ftp://freepascal.stack.nl/pub/fpc/dist/3.0.0/i386-macosx/fpc-3.0.0.intel-macosx.dmg + sudo bash tools/dmg_pkg_install.sh ftp://freepascal.stack.nl/pub/fpc/dist/3.0.0/i386-macosx/fpc-3.0.1.intel-macosx.cross.ios.dmg fi + before_script: | - if [ "$BUILD_ARGS" == "IOS" ]; then - # More or less stable hw iOS version can be compiled with FPC 3.1.1, btw there are no (easy?) way to build it from sources, + if [ "$TRAVIS_OS_NAME" == "ios" ]; then + # More or less stable hw iOS version can be compiled with FPC 3.1.1, + # but there are no (easy?) way to build it from sources, # so we just temporary switch Xcode project to use FPC 3.0.1 git apply tools/fix_fpc_ios_build_patch.diff xctool -project ./project_files/HedgewarsMobile/Hedgewars.xcodeproj -scheme UpdateDataFolder build else mkdir build && cd build && cmake $BUILD_ARGS .. fi + script: | - if [ "$BUILD_ARGS" == "IOS" ]; then + if [ "$TRAVIS_OS_NAME" == "ios" ]; then xctool -project ./project_files/HedgewarsMobile/Hedgewars.xcodeproj -scheme Hedgewars -configuration Release build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO else make VERBOSE=1 fi + after_success: | - if [ "$BUILD_ARGS" == "IOS" ]; then - : - elif [ "$TRAVIS_OS_NAME" == "linux" ]; then + if [ "$TRAVIS_OS_NAME" == "linux" ]; then make test_verbose elif [ "$TRAVIS_OS_NAME" == "osx" ]; then make install fi + notifications: email: false irc: diff -r 8c71c5a1172f -r a69124eb7ce7 CMakeLists.txt --- a/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -54,10 +54,11 @@ if(BUILD_ENGINE_JS) if(NOT CMAKE_TOOLCHAIN_FILE) - message(FATAL_ERROR "Missing emscripten toolchain file\nRerun cmake with -DCMAKE_TOOLCHAIN_FILE=${CMAKE_SOURCE_DIR}/cmake_modules/Platform/Emscripten.cmake") + message(FATAL_ERROR "Missing emscripten toolchain file\nClean your cache and rerun cmake with -DCMAKE_TOOLCHAIN_FILE=${CMAKE_SOURCE_DIR}/cmake_modules/Platform/Emscripten.cmake") endif() set(BUILD_ENGINE_C ON CACHE STRING "Required for BUILD_ENGINE_JS" FORCE) + set(BUILD_ENGINE_LIBRARY ON CACHE STRING "Required for BUILD_ENGINE_JS" FORCE) set(NOAUTOUPDATE ON CACHE STRING "Required for BUILD_ENGINE_JS" FORCE) set(PHYSFS_SYSTEM OFF CACHE STRING "Required for BUILD_ENGINE_JS" FORCE) set(LUA_SYSTEM OFF CACHE STRING "Required for BUILD_ENGINE_JS" FORCE) @@ -65,6 +66,9 @@ set(NOSERVER ON CACHE STRING "Required for BUILD_ENGINE_JS" FORCE) set(GL2 ON CACHE STRING "Required for BUILD_ENGINE_JS" FORCE) set(BUILD_SHARED_LIBS OFF CACHE STRING "Required for BUILD_ENGINE_JS" FORCE) + + set(target_binary_install_dir "bin" CACHE PATH "install dest for binaries") + set(target_library_install_dir "lib" CACHE PATH "install dest for libs") endif() #system paths for finding required fonts (see share/hedgewars/Data/fonts) @@ -86,8 +90,6 @@ include(${CMAKE_MODULE_PATH}/paths.cmake) #general utilities include(${CMAKE_MODULE_PATH}/utils.cmake) -#paths initialization -include(${CMAKE_MODULE_PATH}/paths.cmake) #platform specific init code include(${CMAKE_MODULE_PATH}/platform.cmake) diff -r 8c71c5a1172f -r a69124eb7ce7 CREDITS --- a/CREDITS Tue May 17 23:18:08 2016 +0300 +++ b/CREDITS Tue May 17 23:29:49 2016 +0300 @@ -39,13 +39,14 @@ - Joshua Frese -> Bamboo (2008), EarthRise (2008), Freeway (2008), BambooPlinko (2008) - Stanko Tadić -> Castle (2008), PirateFlag (2008) - dctPL -> Sticks (2010) -- wolfmark & Dragonfly -> TrophyRace (2010), ShoppaKing (2010) +- wolfmarc & Dragonfly -> TrophyRace (2010), ShoppaKing (2010) ========== = MUSIC ========== +- HSR ( http://elhombresinremedio.com ) -> (new) City theme, Rock theme and many other tracks - John Dum -> Nature theme -- Jonatan Nilsson -> Pirate theme, City theme, Oriental theme, Snow theme +- Jonatan Nilsson -> Pirate theme, EarthRise (former City) theme, Oriental theme, Snow theme) - yd - http://opengameart.org/users/yd -> "oriented", used as Olympics SD theme - Kevin MacLeod - http://incompetech.com/ -> "hitman", used as basis for preliminary default SD theme @@ -57,6 +58,7 @@ - Stanko Tadić -> Hell (2008) - Julien Koesten -> Sheep (2008) - KoRn666 - Jungle (2010) +- Randy Broda -> Fruit (2013), Cake (2014) ========== = VOICES @@ -73,6 +75,11 @@ http://www.freesound.org/people/Edgar/sounds/162/ http://www.freesound.org/people/Ionizing/sounds/22033/ http://www.freesound.org/people/Jovica/sounds/38317/ - +- Cleaver impact sound remixed from + http://www.freesound.org/people/sethlind/sounds/265021/ +- Extra Time sound originally by uair01 (CC-BY), remixed from + http://www.freesound.org/people/uair01/sounds/65291/ +- Air mine impact sound by Wuzzy (WTFPL), based on + http://www.freesound.org/people/batchku/sounds/10479/ ALL OTHER CONTENT IS PROPERTY OF Andrey Korotaev UNLESS OTHERWISE SPECIFIED diff -r 8c71c5a1172f -r a69124eb7ce7 ChangeLog.txt --- a/ChangeLog.txt Tue May 17 23:18:08 2016 +0300 +++ b/ChangeLog.txt Tue May 17 23:29:49 2016 +0300 @@ -2,18 +2,53 @@ * bugfixes 0.9.22 -> 0.9.23 +Content: + + New hat: "tf_scout" (this time for real) + +Game engine: + Improved hedgehog spawns on maps that lack land mass or free space + Highlander mode displays game scheme specifics (mines timer, etc.) in ESC info - + AI hedgehogs know how to use Bee now + + AI hedgehogs can now use Bee and Vampirism + + Divided Teams mode will now work with more than 2 teams (Hint: you probably want to set world edges to "wrap" in such games) + + Fort Mode will now work with more than 2 teams + + Added "Forts" to map type selection. This makes the mode easier selectable/discoverable. Also the slider can be used to adjust the distance between forts. + + Render graves behind everything else, so that they can't hide mines etc. + + Several new sound effects for weapons and utilities + Small visual effects enhancements + + Briefly show theme and music authors in chat at start of game + * Fixed air-strikes drops being off-center + * Gameplay fix: Hammer damage is now rounded down. This means it will cause NO DAMAGE to a hedgehog with less than 3 hp. + * Fixed screenshots being too bright if taken in quick succession * Video recording functionality is restored - * Gameplay fix: Hammer damage is now rounded down. This means it will cause NO DAMAGE to a hedgehog with less than 3 hp. * Fixed bee not being affected by wrap world edge while still being thrown * Fixed turn not ending when sticky mine was trapped on rubberband - * Fixed screenshots being too bright if taken in quick succession - * Fixed hog-speech missing a response type (Justyouwait/"You're gonna pay for that") on some platforms (e.g. Linux) + * Fixed hedgehog-voices missing a response type (Justyouwait/"You're gonna pay for that") on some platforms (e.g. Linux) + * Fixed SD-flakes of themes not working if regular flakes were disabled + * Fixed RC planes being able to collect frozen crates + * Fixed Seduction's "Yoohoo!" sound not playing + * Fixed Hedgehogs getting hurt while firing deagle / sniper rifle bullet in certains situations * Various other fixes +Construction Mode: + + Added script parameter support: + + initialenergy: Amount of energy at start + + energyperround: New energy per round + + maxenergy: Maximum allowed + * Costs for weapon and utility crates were all equal + * Many other fixes and tweaks + +Missions and Game Styles: + + Added Basic Flying Saucer Training + + Rope-Knocking Challenge was improved (now awards score based on kills and time; taunts for knocking out hedgehogs) + * Portal Mind Challenge was cleaned up and reworked (especially less awful wording) + * Fixed TechRacer not recording finish if time was >= 100s + * Fixed Target Practice missions getting stuck when a target dropped into water + * Fixed mistakes and bad wording of strings in several missions, scripts and campaigns + +Frontend: + + Menu screens got few new icons and other tweaks, e.g. larger dropdown lists for easier access + + Clicking on "New" in weapon scheme editor now creates empty weapon scheme instead of default + Lua-API: + New call: SetCinematicMode(enable) -- e.g. for cutscenes etc. @@ -112,6 +147,7 @@ onHogAttack() can now be hooked with new parameter: onHogAttack(ammoType) - to conveniently find out which ammo/weapon is being used * Fixes: gfResetHealth is now a available like the other GameFlags + 0.9.19 -> 0.9.20: + New campaign, A Space Adventure! + Password protected rooms diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/hedgewars.qrc --- a/QTfrontend/hedgewars.qrc Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/hedgewars.qrc Tue May 17 23:29:49 2016 +0300 @@ -22,6 +22,12 @@ res/botlevels/3.png res/botlevels/4.png res/botlevels/5.png + res/botlevels/small0.png + res/botlevels/small1.png + res/botlevels/small2.png + res/botlevels/small3.png + res/botlevels/small4.png + res/botlevels/small5.png res/botlevels/net0.png res/botlevels/net1.png res/botlevels/net2.png diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/hwconsts.cpp.in --- a/QTfrontend/hwconsts.cpp.in Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/hwconsts.cpp.in Tue May 17 23:29:49 2016 +0300 @@ -41,6 +41,8 @@ QString * cDefaultAmmoStore = new QString( AMMOLINE_DEFAULT_QT AMMOLINE_DEFAULT_PROB AMMOLINE_DEFAULT_DELAY AMMOLINE_DEFAULT_CRATE ); +QString * cEmptyAmmoStore = new QString( AMMOLINE_EMPTY_QT AMMOLINE_EMPTY_PROB + AMMOLINE_EMPTY_DELAY AMMOLINE_EMPTY_CRATE ); int cAmmoNumber = cDefaultAmmoStore->size() / 4; QList< QPair > cDefaultAmmos = diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/hwconsts.h --- a/QTfrontend/hwconsts.h Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/hwconsts.h Tue May 17 23:29:49 2016 +0300 @@ -42,6 +42,7 @@ class QStandardItemModel; extern QString * cDefaultAmmoStore; +extern QString * cEmptyAmmoStore; extern int cAmmoNumber; extern QList< QPair > cDefaultAmmos; diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/hwform.cpp --- a/QTfrontend/hwform.cpp Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/hwform.cpp Tue May 17 23:29:49 2016 +0300 @@ -103,7 +103,9 @@ #include "AutoUpdater.h" #ifdef Q_OS_WIN +#ifndef WINVER #define WINVER 0x0500 +#endif #include #else #include diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/model/MapModel.cpp --- a/QTfrontend/model/MapModel.cpp Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/model/MapModel.cpp Tue May 17 23:29:49 2016 +0300 @@ -32,12 +32,26 @@ MapModel::MapInfo MapModel::MapInfoMaze = {MapModel::GeneratedMaze, "+maze+", "", 0, "", "", "", false}; MapModel::MapInfo MapModel::MapInfoPerlin = {MapModel::GeneratedMaze, "+perlin+", "", 0, "", "", "", false}; MapModel::MapInfo MapModel::MapInfoDrawn = {MapModel::HandDrawnMap, "+drawn+", "", 0, "", "", "", false}; - +MapModel::MapInfo MapModel::MapInfoForts = {MapModel::FortsMap, "+forts+", "", 0, "", "", "", false}; MapModel::MapModel(MapType maptype, QObject *parent) : QStandardItemModel(parent) { m_maptype = maptype; m_loaded = false; + m_filteredNoDLC = NULL; +} + +QSortFilterProxyModel * MapModel::withoutDLC() +{ + if (m_filteredNoDLC == NULL) + { + m_filteredNoDLC = new QSortFilterProxyModel(this); + m_filteredNoDLC->setSourceModel(this); + // filtering based on IsDlcRole would be nicer + // but seems this model can only do string-based filtering :| + m_filteredNoDLC->setFilterRegExp(QRegExp("^[^*]")); + } + return m_filteredNoDLC; } bool MapModel::loadMaps() diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/model/MapModel.h --- a/QTfrontend/model/MapModel.h Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/model/MapModel.h Tue May 17 23:29:49 2016 +0300 @@ -25,6 +25,7 @@ #define HEDGEWARS_MAPMODEL_H #include +#include #include #include #include @@ -52,7 +53,8 @@ GeneratedPerlin, HandDrawnMap, MissionMap, - StaticMap + StaticMap, + FortsMap }; /// a struct for holding the attributes of a map. @@ -99,11 +101,13 @@ QStandardItem * getMap(const QString & map); // Static MapInfos for drawn and generated maps - static MapInfo MapInfoRandom, MapInfoMaze, MapInfoPerlin, MapInfoDrawn; + static MapInfo MapInfoRandom, MapInfoMaze, MapInfoPerlin, MapInfoDrawn, MapInfoForts; /// Loads the maps bool loadMaps(); + /// returns this model but excluding DLC themes + QSortFilterProxyModel * withoutDLC(); private: /// map index lookup table. QPair contains: @@ -111,6 +115,7 @@ QHash m_mapIndexes; MapType m_maptype; bool m_loaded; + QSortFilterProxyModel * m_filteredNoDLC; /** * @brief Creates a QStandardItem, that holds the map info and item appearance. diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/model/ThemeModel.cpp --- a/QTfrontend/model/ThemeModel.cpp Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/model/ThemeModel.cpp Tue May 17 23:29:49 2016 +0300 @@ -31,6 +31,21 @@ m_data = QList >(); m_themesLoaded = false; + + m_filteredNoDLC = NULL; +} + +QSortFilterProxyModel * ThemeModel::withoutDLC() +{ + if (m_filteredNoDLC == NULL) + { + m_filteredNoDLC = new QSortFilterProxyModel(this); + m_filteredNoDLC->setSourceModel(this); + // filtering based on IsDlcRole would be nicer + // but seems this model can only do string-based filtering :| + m_filteredNoDLC->setFilterRegExp(QRegExp("^[^*]")); + } + return m_filteredNoDLC; } int ThemeModel::rowCount(const QModelIndex &parent) const diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/model/ThemeModel.h --- a/QTfrontend/model/ThemeModel.h Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/model/ThemeModel.h Tue May 17 23:29:49 2016 +0300 @@ -25,6 +25,7 @@ #define HEDGEWARS_THEMEMODEL_H #include +#include #include #include #include @@ -44,10 +45,12 @@ int rowCount(const QModelIndex &parent = QModelIndex()) const; QVariant data(const QModelIndex &index, int role) const; + QSortFilterProxyModel * withoutDLC(); private: mutable QList > m_data; mutable bool m_themesLoaded; + mutable QSortFilterProxyModel * m_filteredNoDLC; void loadThemes() const; }; diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/model/ammoSchemeModel.cpp --- a/QTfrontend/model/ammoSchemeModel.cpp Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/model/ammoSchemeModel.cpp Tue May 17 23:29:49 2016 +0300 @@ -755,13 +755,13 @@ if (row == -1) { QList newScheme = defaultScheme; - newScheme[0] = QVariant(tr("new")); + newScheme[0] = QVariant(tr("New")); schemes.insert(schemes.size(), newScheme); } else { QList newScheme = schemes[row]; - newScheme[0] = QVariant(tr("copy of %1").arg(newScheme[0].toString())); + newScheme[0] = QVariant(tr("Copy of %1").arg(newScheme[0].toString())); schemes.insert(schemes.size(), newScheme); } diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/model/roomslistmodel.cpp --- a/QTfrontend/model/roomslistmodel.cpp Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/model/roomslistmodel.cpp Tue May 17 23:29:49 2016 +0300 @@ -150,6 +150,7 @@ if (content == "+maze+") return tr("Random Maze"); if (content == "+perlin+") return tr("Random Perlin"); if (content == "+drawn+") return tr("Hand-drawn"); + if (content == "+forts+") return tr("Forts"); } // prefix ? if map not available @@ -168,6 +169,7 @@ content == "+maze+" || content == "+perlin+" || content == "+drawn+" || + content == "+forts+" || m_staticMapModel->mapExists(content) || m_missionMapModel->mapExists(content)) return QVariant(); diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/net/hwmap.h --- a/QTfrontend/net/hwmap.h Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/net/hwmap.h Tue May 17 23:29:49 2016 +0300 @@ -32,7 +32,8 @@ MAPGEN_MAZE = 1, MAPGEN_PERLIN = 2, MAPGEN_DRAWN = 3, - MAPGEN_MAP = 4 + MAPGEN_FORTS = 4, + MAPGEN_MAP = 5 }; class HWMap : public TCPBase diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/res/botlevels/small0.png Binary file QTfrontend/res/botlevels/small0.png has changed diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/res/botlevels/small1.png Binary file QTfrontend/res/botlevels/small1.png has changed diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/res/botlevels/small1.xcf Binary file QTfrontend/res/botlevels/small1.xcf has changed diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/res/botlevels/small2.png Binary file QTfrontend/res/botlevels/small2.png has changed diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/res/botlevels/small2.xcf Binary file QTfrontend/res/botlevels/small2.xcf has changed diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/res/botlevels/small3.png Binary file QTfrontend/res/botlevels/small3.png has changed diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/res/botlevels/small3.xcf Binary file QTfrontend/res/botlevels/small3.xcf has changed diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/res/botlevels/small4.png Binary file QTfrontend/res/botlevels/small4.png has changed diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/res/botlevels/small4.xcf Binary file QTfrontend/res/botlevels/small4.xcf has changed diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/res/botlevels/small5.png Binary file QTfrontend/res/botlevels/small5.png has changed diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/res/botlevels/small5.xcf Binary file QTfrontend/res/botlevels/small5.xcf has changed diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/ui/page/AbstractPage.cpp --- a/QTfrontend/ui/page/AbstractPage.cpp Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/ui/page/AbstractPage.cpp Tue May 17 23:29:49 2016 +0300 @@ -45,7 +45,7 @@ // stretch grid space for body and footer pageLayout->setColumnStretch(0,1); - pageLayout->setColumnStretch(1,2); + pageLayout->setColumnStretch(1,8); pageLayout->setColumnStretch(2,1); pageLayout->setRowStretch(0,1); pageLayout->setRowStretch(1,0); @@ -127,24 +127,24 @@ return btn; } -QPushButtonWithSound * AbstractPage::addButton(const QString & name, QGridLayout * grid, int row, int column, int rowSpan, int columnSpan, bool hasIcon) +QPushButtonWithSound * AbstractPage::addButton(const QString & name, QGridLayout * grid, int row, int column, int rowSpan, int columnSpan, bool hasIcon, Qt::Alignment alignment) { QPushButtonWithSound * btn = formattedButton(name, hasIcon); - grid->addWidget(btn, row, column, rowSpan, columnSpan); + grid->addWidget(btn, row, column, rowSpan, columnSpan, alignment); return btn; } -QPushButtonWithSound * AbstractPage::addButton(const QString & name, QBoxLayout * box, int where, bool hasIcon) +QPushButtonWithSound * AbstractPage::addButton(const QString & name, QBoxLayout * box, int where, bool hasIcon, Qt::Alignment alignment) { QPushButtonWithSound * btn = formattedButton(name, hasIcon); - box->addWidget(btn, where); + box->addWidget(btn, where, alignment); return btn; } -QPushButton* AbstractPage::addSoundlessButton(const QString & name, QBoxLayout * box, int where, bool hasIcon) +QPushButton* AbstractPage::addSoundlessButton(const QString & name, QBoxLayout * box, int where, bool hasIcon, Qt::Alignment alignment) { QPushButton* btn = formattedSoundlessButton(name, hasIcon); - box->addWidget(btn, where); + box->addWidget(btn, where, alignment); return btn; } diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/ui/page/AbstractPage.h --- a/QTfrontend/ui/page/AbstractPage.h Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/ui/page/AbstractPage.h Tue May 17 23:29:49 2016 +0300 @@ -185,10 +185,11 @@ * @param rowSpan how many layout rows the button will span. * @param columnSpan how many layout columns the button will span. * @param hasIcon set to true if this is a picture button. + * @param alignment alignment of the button in the layout. * * @return the button. */ - QPushButtonWithSound * addButton(const QString & name, QGridLayout * grid, int row, int column, int rowSpan = 1, int columnSpan = 1, bool hasIcon = false); + QPushButtonWithSound * addButton(const QString & name, QGridLayout * grid, int row, int column, int rowSpan = 1, int columnSpan = 1, bool hasIcon = false, Qt::Alignment alignment = 0); /** * @brief Creates a default formatted button and adds it to a @@ -198,11 +199,12 @@ * @param box pointer of the box layout in which to insert the button. * @param where layout ndex in which to insert the button. * @param hasIcon set to true if this is a picture button. + * @param alignment alignment of the button in the layout. * * @return the button. */ - QPushButtonWithSound * addButton(const QString & name, QBoxLayout * box, int where, bool hasIcon = false); - QPushButton* addSoundlessButton(const QString & name, QBoxLayout * box, int where, bool hasIcon = false); + QPushButtonWithSound * addButton(const QString & name, QBoxLayout * box, int where, bool hasIcon = false, Qt::Alignment alignment = 0); + QPushButton* addSoundlessButton(const QString & name, QBoxLayout * box, int where, bool hasIcon = false, Qt::Alignment alignment = 0); /** * @brief Changes visibility of the back-button. diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/ui/page/pagedata.cpp --- a/QTfrontend/ui/page/pagedata.cpp Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/ui/page/pagedata.cpp Tue May 17 23:29:49 2016 +0300 @@ -54,7 +54,8 @@ QHBoxLayout * bottomLayout = new QHBoxLayout(); bottomLayout->setStretch(0, 1); - pbOpenDir = addButton(tr("Open packages directory"), bottomLayout, 1, false); + pbOpenDir = addButton(tr("Open packages directory"), bottomLayout, 1, false, Qt::AlignBottom); + pbOpenDir->setMinimumHeight(50); bottomLayout->setStretch(2, 1); diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/ui/page/pageeditteam.cpp --- a/QTfrontend/ui/page/pageeditteam.cpp Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/ui/page/pageeditteam.cpp Tue May 17 23:29:49 2016 +0300 @@ -100,7 +100,7 @@ tmpLabel->setText(QLabel::tr("Name")); GBTLayout->addWidget(tmpLabel, 0, 0); tmpLabel = new QLabel(GBoxTeam); - tmpLabel->setText(QLabel::tr("Type")); + tmpLabel->setText(QLabel::tr("Player")); GBTLayout->addWidget(tmpLabel, 1, 0); tmpLabel = new QLabel(GBoxTeam); tmpLabel->setText(QLabel::tr("Grave")); @@ -118,19 +118,21 @@ vbox2->addWidget(GBoxTeam); CBTeamLvl = new QComboBox(GBoxTeam); - CBTeamLvl->setIconSize(QSize(48, 48)); - CBTeamLvl->addItem(QIcon(":/res/botlevels/0.png"), QComboBox::tr("Human")); + CBTeamLvl->setIconSize(QSize(32, 32)); + CBTeamLvl->addItem(QIcon(":/res/botlevels/small0.png"), QComboBox::tr("Human")); for(int i = 5; i > 0; i--) CBTeamLvl->addItem( - QIcon(QString(":/res/botlevels/%1.png").arg(6 - i)), - QString("%1 %2").arg(QComboBox::tr("Level")).arg(i) + QIcon(QString(":/res/botlevels/small%1.png").arg(6 - i)), + QComboBox::tr("Computer (Level %1)").arg(i) ); + CBTeamLvl->setFixedHeight(38); GBTLayout->addWidget(CBTeamLvl, 1, 1); CBGrave = new QComboBox(GBoxTeam); CBGrave->setMaxCount(65535); CBGrave->setMaxVisibleItems(20); CBGrave->setIconSize(QSize(32, 32)); + CBGrave->setFixedHeight(44); GBTLayout->addWidget(CBGrave, 2, 1); CBFlag = new QComboBox(GBoxTeam); @@ -145,6 +147,7 @@ hbox->addWidget(CBVoicepack, 100); btnTestSound = addSoundlessButton(":/res/PlaySound.png", hbox, 1, true); + btnTestSound->setWhatsThis("Play a random example of this voice"); hbox->setStretchFactor(btnTestSound, 1); GBTLayout->addLayout(hbox, 4, 1); @@ -153,6 +156,7 @@ GBoxFort->setTitle(QGroupBox::tr("Fort")); QGridLayout * GBFLayout = new QGridLayout(GBoxFort); CBFort = new QComboBox(GBoxFort); + CBFort->setMaxVisibleItems(25); CBFort->setMaxCount(65535); GBFLayout->addWidget(CBFort, 0, 0); FortPreview = new SquareLabel(GBoxFort); diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/ui/page/pageinfo.cpp --- a/QTfrontend/ui/page/pageinfo.cpp Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/ui/page/pageinfo.cpp Tue May 17 23:29:49 2016 +0300 @@ -40,9 +40,10 @@ QLayout * PageInfo::footerLayoutDefinition() { QHBoxLayout * bottomLayout = new QHBoxLayout(); - BtnSnapshots = addButton(":/res/Star.png", bottomLayout, 0, true); + bottomLayout->setContentsMargins(0,0,0,0); + BtnSnapshots = addButton(":/res/Star.png", bottomLayout, 0, true, Qt::AlignBottom); BtnSnapshots->setWhatsThis(tr("Open the snapshot folder")); - bottomLayout->setAlignment(BtnSnapshots, Qt::AlignRight | Qt::AlignVCenter); + BtnSnapshots->setMinimumSize(50,50); return bottomLayout; } diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/ui/page/pagemain.cpp --- a/QTfrontend/ui/page/pagemain.cpp Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/ui/page/pagemain.cpp Tue May 17 23:29:49 2016 +0300 @@ -109,11 +109,11 @@ btnBack->setWhatsThis(tr("Exit game")); #ifdef VIDEOREC - BtnVideos = addButton(":/res/Videos.png", bottomLayout, 1, true); + BtnVideos = addButton(":/res/Videos.png", bottomLayout, 1, true, Qt::AlignBottom); BtnVideos->setWhatsThis(tr("Manage videos recorded from game")); #endif - BtnSetup = addButton(":/res/Settings.png", bottomLayout, 2, true); + BtnSetup = addButton(":/res/Settings.png", bottomLayout, 2, true, Qt::AlignBottom); BtnSetup->setWhatsThis(tr("Edit game preferences")); return bottomLayout; diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/ui/page/pagemultiplayer.cpp --- a/QTfrontend/ui/page/pagemultiplayer.cpp Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/ui/page/pagemultiplayer.cpp Tue May 17 23:29:49 2016 +0300 @@ -46,7 +46,7 @@ { QHBoxLayout * bottomLeftLayout = new QHBoxLayout(); - btnSetup = addButton(":/res/Settings.png", bottomLeftLayout, 0, true); + btnSetup = addButton(":/res/Settings.png", bottomLeftLayout, 0, true, Qt::AlignBottom); btnSetup->setWhatsThis(tr("Edit game preferences")); return bottomLeftLayout; @@ -60,6 +60,7 @@ QSize sz = lp.actualSize(QSize(65535, 65535)); BtnStartMPGame = new QPushButton(); BtnStartMPGame->setText(tr("Start")); + BtnStartMPGame->setWhatsThis(tr("Start fighting (requires at least 2 teams)")); BtnStartMPGame->setMinimumWidth(sz.width() + 60); BtnStartMPGame->setIcon(lp); BtnStartMPGame->setFixedHeight(50); @@ -68,7 +69,7 @@ BtnStartMPGame->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); footerLayout->addStretch(); - footerLayout->addWidget(BtnStartMPGame); + footerLayout->addWidget(BtnStartMPGame, 0, Qt::AlignBottom); return footerLayout; } diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/ui/page/pagenet.cpp --- a/QTfrontend/ui/page/pagenet.cpp Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/ui/page/pagenet.cpp Tue May 17 23:29:49 2016 +0300 @@ -71,7 +71,7 @@ QHBoxLayout * footerLayout = new QHBoxLayout(); BtnNetSvrStart = formattedButton(QPushButton::tr("Start server")); - BtnNetSvrStart->setMinimumWidth(180); + BtnNetSvrStart->setMinimumSize(180, 50); QString serverPath = bindir->absolutePath() + "/hedgewars-server"; #ifdef Q_OS_WIN serverPath += + ".exe"; @@ -80,7 +80,7 @@ BtnNetSvrStart->setVisible(server.exists()); footerLayout->addStretch(); - footerLayout->addWidget(BtnNetSvrStart); + footerLayout->addWidget(BtnNetSvrStart, 0, Qt::AlignBottom); return footerLayout; } diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/ui/page/pagenetgame.cpp --- a/QTfrontend/ui/page/pagenetgame.cpp Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/ui/page/pagenetgame.cpp Tue May 17 23:29:49 2016 +0300 @@ -49,6 +49,7 @@ roomConfigLayout->setSpacing(0); leRoomName = new HistoryLineEdit(this, 10); + leRoomName->setWhatsThis(tr("Room name")); leRoomName->setMaxLength(60); leRoomName->setMinimumWidth(400); leRoomName->setMaximumWidth(600); @@ -58,6 +59,7 @@ roomConfigLayout->addWidget(leRoomName, 100); BtnUpdate = new QPushButton(); + BtnUpdate->setWhatsThis(tr("Update the room name")); BtnUpdate->setEnabled(false); BtnUpdate->setText(tr("Update")); BtnUpdate->setFixedHeight(leRoomName->height() - 0); @@ -86,7 +88,7 @@ // Game config - pGameCFG = new GameCFGWidget(this); + pGameCFG = new GameCFGWidget(this, true); pageLayout->addWidget(pGameCFG, 1, 0); // Teams @@ -111,8 +113,9 @@ QLayout * PageNetGame::footerLayoutLeftDefinition() { QHBoxLayout * bottomLeftLayout = new QHBoxLayout(); + bottomLeftLayout->setContentsMargins(0,0,0,0); - btnSetup = addButton(":/res/Settings.png", bottomLeftLayout, 0, true); + btnSetup = addButton(":/res/Settings.png", bottomLeftLayout, 0, true, Qt::AlignBottom); btnSetup->setWhatsThis(tr("Edit game preferences")); return bottomLeftLayout; @@ -125,13 +128,14 @@ // Ready button BtnGo = new QPushButton(this); - BtnGo->setIcon(QIcon(":/res/lightbulb_off.png")); BtnGo->setIconSize(QSize(25, 34)); + BtnGo->setWhatsThis(tr("Turn on the lightbulb to show the other players when you're ready to fight")); + setReadyStatus(false); BtnGo->setMinimumWidth(50); BtnGo->setMinimumHeight(50); bottomLayout->addStretch(); - bottomLayout->addWidget(BtnGo); + bottomLayout->addWidget(BtnGo, 0, Qt::AlignBottom); // Start button @@ -139,13 +143,14 @@ QSize sz = lp.actualSize(QSize(65535, 65535)); BtnStart = new QPushButton(); BtnStart->setText(tr("Start")); + BtnStart->setWhatsThis(tr("Start fighting (requires at least 2 teams)")); BtnStart->setMinimumWidth(sz.width() + 60); BtnStart->setIcon(lp); BtnStart->setFixedHeight(50); BtnStart->setIconSize(sz); BtnStart->setFlat(true); BtnStart->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - bottomLayout->addWidget(BtnStart); + bottomLayout->addWidget(BtnStart, 0, Qt::AlignBottom); return bottomLayout; } @@ -217,9 +222,13 @@ void PageNetGame::setReadyStatus(bool isReady) { if(isReady) + { BtnGo->setIcon(QIcon(":/res/lightbulb_on.png")); + } else + { BtnGo->setIcon(QIcon(":/res/lightbulb_off.png")); + } } void PageNetGame::onRoomNameEdited() diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/ui/page/pagenetserver.cpp --- a/QTfrontend/ui/page/pagenetserver.cpp Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/ui/page/pagenetserver.cpp Tue May 17 23:29:49 2016 +0300 @@ -98,10 +98,10 @@ BtnStart = formattedButton(QPushButton::tr("Start")); BtnStart->setWhatsThis(QPushButton::tr("Start private server")); - BtnStart->setMinimumWidth(180); + BtnStart->setMinimumSize(180, 50); bottomLayout->addStretch(); - bottomLayout->addWidget(BtnStart); + bottomLayout->addWidget(BtnStart, 0, Qt::AlignBottom); return bottomLayout; } diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/ui/page/pageplayrecord.cpp --- a/QTfrontend/ui/page/pageplayrecord.cpp Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/ui/page/pageplayrecord.cpp Tue May 17 23:29:49 2016 +0300 @@ -40,11 +40,6 @@ pageLayout->setColumnStretch(2, 1); pageLayout->setRowStretch(2, 100); - BtnPlayDemo = new QPushButton(this); - BtnPlayDemo->setFont(*font14); - BtnPlayDemo->setText(QPushButton::tr("Play demo")); - pageLayout->addWidget(BtnPlayDemo, 3, 2); - BtnRenameRecord = new QPushButton(this); BtnRenameRecord->setText(QPushButton::tr("Rename")); pageLayout->addWidget(BtnRenameRecord, 0, 2); @@ -60,6 +55,23 @@ return pageLayout; } +QLayout * PagePlayDemo::footerLayoutDefinition() +{ + QHBoxLayout * bottomLayout = new QHBoxLayout(); + + BtnPlayDemo = addButton(tr("Play demo"), bottomLayout, 0, false, Qt::AlignBottom); + const QIcon& lp = QIcon(":/res/Start.png"); + QSize sz = lp.actualSize(QSize(65535, 65535)); + BtnPlayDemo->setMinimumWidth(sz.width()); + BtnPlayDemo->setIcon(lp); + BtnPlayDemo->setFixedHeight(50); + BtnPlayDemo->setIconSize(sz); + BtnPlayDemo->setFlat(true); + BtnPlayDemo->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + + return bottomLayout; +} + void PagePlayDemo::connectSignals() { connect(BtnRenameRecord, SIGNAL(clicked()), this, SLOT(renameRecord())); @@ -85,12 +97,14 @@ dir.cd("Demos"); extension = "hwd"; BtnPlayDemo->setText(QPushButton::tr("Play demo")); + BtnPlayDemo->setWhatsThis(tr("Play the selected demo")); } else { dir.cd("Saves"); extension = "hws"; BtnPlayDemo->setText(QPushButton::tr("Load")); + BtnPlayDemo->setWhatsThis(tr("Load the selected game")); } dir.setFilter(QDir::Files); diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/ui/page/pageplayrecord.h --- a/QTfrontend/ui/page/pageplayrecord.h Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/ui/page/pageplayrecord.h Tue May 17 23:29:49 2016 +0300 @@ -52,6 +52,7 @@ private: QLayout * bodyLayoutDefinition(); + QLayout * footerLayoutDefinition(); void connectSignals(); RecordType recType; diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/ui/page/pageroomslist.cpp --- a/QTfrontend/ui/page/pageroomslist.cpp Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/ui/page/pageroomslist.cpp Tue May 17 23:29:49 2016 +0300 @@ -174,8 +174,8 @@ { QHBoxLayout * bottomLayout = new QHBoxLayout(); - BtnAdmin = addButton(tr("Admin features"), bottomLayout, 0); - BtnAdmin->setStyleSheet("padding: 4px auto;"); + BtnAdmin = addButton(tr("Admin features"), bottomLayout, 0, false, Qt::AlignBottom); + BtnAdmin->setMinimumSize(180, 50); BtnAdmin->setWhatsThis(tr("Open server administration page")); return bottomLayout; diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/ui/page/pagescheme.cpp --- a/QTfrontend/ui/page/pagescheme.cpp Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/ui/page/pagescheme.cpp Tue May 17 23:29:49 2016 +0300 @@ -30,6 +30,7 @@ #include "ammoSchemeModel.h" #include "pagescheme.h" #include "FreqSpinBox.h" +#include "MinesTimeSpinBox.h" QLayout * PageScheme::bodyLayoutDefinition() @@ -156,7 +157,7 @@ glGMLayout->addWidget(TBW_placehog,4,1,1,1); TBW_teamsDivide = new ToggleButtonWidget(gbGameModes, ":/res/btnTeamsDivide@2x.png"); - TBW_teamsDivide->setWhatsThis(tr("Teams will start on opposite sides of the terrain, two team colours max!")); + TBW_teamsDivide->setWhatsThis(tr("Each clan starts in its own part of the terrain.")); glGMLayout->addWidget(TBW_teamsDivide,4,2,1,1); TBW_tagteam = new ToggleButtonWidget(gbGameModes, ":/res/btnTagTeam@2x.png"); @@ -170,15 +171,37 @@ // Right QLabel * l; + QString wtDamageModifier = tr("Overall damage and knockback in percent"); + QString wtTurnTime = tr("Turn time in seconds"); + QString wtInitHealth = tr("Initial health of hedgehogs"); + QString wtSuddenDeath = tr("How many rounds have to be played before Sudden Death begins"); + QString wtWaterRise = tr("How much the water rises per turn while in Sudden Death. Set to 0 along with Sudden Death Health Decrease to disable Sudden Death."); + QString wtHealthDecrease = tr("How much health hedgehogs lose per turn while in Sudden Death, down to 1 health. Set to 0 along with Sudden Death Water Rise to disable Sudden Death."); + QString wtRopeModifier = tr("Maximum rope length in percent"); + QString wtHealthCrates = tr("Likelihood of a dropped crate being a health crate. All other crates will be weapon or utility crates."); + QString wtCaseProb = tr("Likelihood of a crate dropping before a turn"); + QString wtCrateHealth= tr("Health bonus for collecting a health crate"); + QString wtMinesTime = tr("Detonation timer of mines. The random timer lies between 0 and 5 seconds. The timer of air mines will be a quarter of the mines timer."); + QString wtMines = tr("Average number of mines to be placed a medium-sized island map. This number will be scaled for other maps."); + QString wtMineDuds = tr("Likelihood of a mine being a dud. Does not affect mines placed by hedgehogs."); + QString wtExplosives = tr("Average number of barrels to be placed a medium-sized island map. This number will be scaled for other maps."); + QString wtAirMines = tr("Average number of air mines to be placed a medium-sized island map. This number will be scaled for other maps."); + QString wtWorldEdge = tr("Affects the left and right boundaries of the map"); + QString wtGetAwayTime = tr("Time you get after an attack"); + QString wtScriptParam = tr("Additional parameter to configure game styles. The meaning depends on the used style, refer to the documentation. When in doubt, leave it empty."); + l = new QLabel(gbBasicSettings); l->setText(QLabel::tr("Damage Modifier")); + l->setWhatsThis(wtDamageModifier); l->setWordWrap(true); glBSLayout->addWidget(l,0,0,1,1); l = new QLabel(gbBasicSettings); + l->setWhatsThis(wtDamageModifier); l->setFixedSize(32,32); l->setPixmap(QPixmap(":/res/iconDamage.png")); glBSLayout->addWidget(l,0,1,1,1); SB_DamageModifier = new QSpinBox(gbBasicSettings); + SB_DamageModifier->setWhatsThis(wtDamageModifier); SB_DamageModifier->setRange(10, 300); SB_DamageModifier->setValue(100); SB_DamageModifier->setSingleStep(25); @@ -186,13 +209,16 @@ l = new QLabel(gbBasicSettings); l->setText(QLabel::tr("Turn Time")); + l->setWhatsThis(wtTurnTime); l->setWordWrap(true); glBSLayout->addWidget(l,1,0,1,1); l = new QLabel(gbBasicSettings); + l->setWhatsThis(wtTurnTime); l->setFixedSize(32,32); l->setPixmap(QPixmap(":/res/iconTime.png")); glBSLayout->addWidget(l,1,1,1,1); SB_TurnTime = new QSpinBox(gbBasicSettings); + SB_TurnTime->setWhatsThis(wtTurnTime); SB_TurnTime->setRange(1, 9999); SB_TurnTime->setValue(45); SB_TurnTime->setSingleStep(15); @@ -200,13 +226,16 @@ l = new QLabel(gbBasicSettings); l->setText(QLabel::tr("Initial Health")); + l->setWhatsThis(wtInitHealth); l->setWordWrap(true); glBSLayout->addWidget(l,2,0,1,1); l = new QLabel(gbBasicSettings); + l->setWhatsThis(wtInitHealth); l->setFixedSize(32,32); l->setPixmap(QPixmap(":/res/iconHealth.png")); glBSLayout->addWidget(l,2,1,1,1); SB_InitHealth = new QSpinBox(gbBasicSettings); + SB_InitHealth->setWhatsThis(wtInitHealth); SB_InitHealth->setRange(50, 200); SB_InitHealth->setValue(100); SB_InitHealth->setSingleStep(25); @@ -214,13 +243,16 @@ l = new QLabel(gbBasicSettings); l->setText(QLabel::tr("Sudden Death Timeout")); + l->setWhatsThis(wtSuddenDeath); l->setWordWrap(true); glBSLayout->addWidget(l,3,0,1,1); l = new QLabel(gbBasicSettings); l->setFixedSize(32,32); + l->setWhatsThis(wtSuddenDeath); l->setPixmap(QPixmap(":/res/iconSuddenDeathTime.png")); glBSLayout->addWidget(l,3,1,1,1); SB_SuddenDeath = new QSpinBox(gbBasicSettings); + SB_SuddenDeath->setWhatsThis(wtSuddenDeath); SB_SuddenDeath->setRange(0, 50); SB_SuddenDeath->setValue(15); SB_SuddenDeath->setSingleStep(3); @@ -228,13 +260,16 @@ l = new QLabel(gbBasicSettings); l->setText(QLabel::tr("Sudden Death Water Rise")); + l->setWhatsThis(wtWaterRise); l->setWordWrap(true); glBSLayout->addWidget(l,4,0,1,1); l = new QLabel(gbBasicSettings); + l->setWhatsThis(wtWaterRise); l->setFixedSize(32,32); l->setPixmap(QPixmap(":/res/iconSuddenDeathWater.png")); glBSLayout->addWidget(l,4,1,1,1); SB_WaterRise = new QSpinBox(gbBasicSettings); + SB_WaterRise->setWhatsThis(wtWaterRise); SB_WaterRise->setRange(0, 100); SB_WaterRise->setValue(47); SB_WaterRise->setSingleStep(5); @@ -242,13 +277,16 @@ l = new QLabel(gbBasicSettings); l->setText(QLabel::tr("Sudden Death Health Decrease")); + l->setWhatsThis(wtHealthDecrease); l->setWordWrap(true); glBSLayout->addWidget(l,5,0,1,1); l = new QLabel(gbBasicSettings); + l->setWhatsThis(wtHealthDecrease); l->setFixedSize(32,32); l->setPixmap(QPixmap(":/res/iconSuddenDeath.png")); glBSLayout->addWidget(l,5,1,1,1); SB_HealthDecrease = new QSpinBox(gbBasicSettings); + SB_HealthDecrease->setWhatsThis(wtHealthDecrease); SB_HealthDecrease->setRange(0, 100); SB_HealthDecrease->setValue(5); SB_HealthDecrease->setSingleStep(1); @@ -256,13 +294,16 @@ l = new QLabel(gbBasicSettings); l->setText(QLabel::tr("% Rope Length")); + l->setWhatsThis(wtRopeModifier); l->setWordWrap(true); glBSLayout->addWidget(l,6,0,1,1); l = new QLabel(gbBasicSettings); + l->setWhatsThis(wtRopeModifier); l->setFixedSize(32,32); l->setPixmap(QPixmap(":/res/iconRope.png")); glBSLayout->addWidget(l,6,1,1,1); SB_RopeModifier = new QSpinBox(gbBasicSettings); + SB_RopeModifier->setWhatsThis(wtRopeModifier); SB_RopeModifier->setRange(25, 999); SB_RopeModifier->setValue(100); SB_RopeModifier->setSingleStep(25); @@ -270,26 +311,32 @@ l = new QLabel(gbBasicSettings); l->setText(QLabel::tr("Crate Drops")); + l->setWhatsThis(wtCaseProb); l->setWordWrap(true); glBSLayout->addWidget(l,7,0,1,1); l = new QLabel(gbBasicSettings); l->setFixedSize(32,32); + l->setWhatsThis(wtCaseProb); l->setPixmap(QPixmap(":/res/iconBox.png")); glBSLayout->addWidget(l,7,1,1,1); SB_CaseProb = new FreqSpinBox(gbBasicSettings); + SB_CaseProb->setWhatsThis(wtCaseProb); SB_CaseProb->setRange(0, 9); SB_CaseProb->setValue(5); glBSLayout->addWidget(SB_CaseProb,7,2,1,1); l = new QLabel(gbBasicSettings); l->setText(QLabel::tr("% Health Crates")); + l->setWhatsThis(wtHealthCrates); l->setWordWrap(true); glBSLayout->addWidget(l,8,0,1,1); l = new QLabel(gbBasicSettings); l->setFixedSize(32,32); + l->setWhatsThis(wtHealthCrates); l->setPixmap(QPixmap(":/res/iconHealthPercent.png")); glBSLayout->addWidget(l,8,1,1,1); SB_HealthCrates = new QSpinBox(gbBasicSettings); + SB_HealthCrates->setWhatsThis(wtHealthCrates); SB_HealthCrates->setRange(0, 100); SB_HealthCrates->setValue(35); SB_HealthCrates->setSingleStep(5); @@ -297,13 +344,16 @@ l = new QLabel(gbBasicSettings); l->setText(QLabel::tr("Health in Crates")); + l->setWhatsThis(wtCrateHealth); l->setWordWrap(true); glBSLayout->addWidget(l,9,0,1,1); l = new QLabel(gbBasicSettings); l->setFixedSize(32,32); + l->setWhatsThis(wtCrateHealth); l->setPixmap(QPixmap(":/res/iconHealth.png")); glBSLayout->addWidget(l,9,1,1,1); SB_CrateHealth = new QSpinBox(gbBasicSettings); + SB_CrateHealth->setWhatsThis(wtCrateHealth); SB_CrateHealth->setRange(0, 200); SB_CrateHealth->setValue(25); SB_CrateHealth->setSingleStep(5); @@ -311,29 +361,33 @@ l = new QLabel(gbBasicSettings); l->setText(QLabel::tr("Mines Time")); + l->setWhatsThis(wtMinesTime); l->setWordWrap(true); glBSLayout->addWidget(l,10,0,1,1); l = new QLabel(gbBasicSettings); + l->setWhatsThis(wtMinesTime); l->setFixedSize(32,32); l->setPixmap(QPixmap(":/res/iconMineTime.png")); glBSLayout->addWidget(l,10,1,1,1); - SB_MinesTime = new QSpinBox(gbBasicSettings); + SB_MinesTime = new MinesTimeSpinBox(gbBasicSettings); + SB_MinesTime->setWhatsThis(wtMinesTime); SB_MinesTime->setRange(-1, 5); SB_MinesTime->setValue(3); SB_MinesTime->setSingleStep(1); - SB_MinesTime->setSpecialValueText(tr("Random")); - SB_MinesTime->setSuffix(" "+ tr("Seconds")); glBSLayout->addWidget(SB_MinesTime,10,2,1,1); l = new QLabel(gbBasicSettings); l->setText(QLabel::tr("Mines")); + l->setWhatsThis(wtMines); l->setWordWrap(true); glBSLayout->addWidget(l,11,0,1,1); l = new QLabel(gbBasicSettings); + l->setWhatsThis(wtMines); l->setFixedSize(32,32); l->setPixmap(QPixmap(":/res/iconMine.png")); glBSLayout->addWidget(l,11,1,1,1); SB_Mines = new QSpinBox(gbBasicSettings); + SB_Mines->setWhatsThis(wtMines); SB_Mines->setRange(0, 200); SB_Mines->setValue(0); SB_Mines->setSingleStep(5); @@ -341,27 +395,33 @@ l = new QLabel(gbBasicSettings); l->setText(QLabel::tr("% Dud Mines")); + l->setWhatsThis(wtMineDuds); l->setWordWrap(true); glBSLayout->addWidget(l,12,0,1,1); l = new QLabel(gbBasicSettings); + l->setWhatsThis(wtMineDuds); l->setFixedSize(32,32); l->setPixmap(QPixmap(":/res/iconDud.png")); glBSLayout->addWidget(l,12,1,1,1); SB_MineDuds = new QSpinBox(gbBasicSettings); + SB_MineDuds->setWhatsThis(wtMineDuds); SB_MineDuds->setRange(0, 100); SB_MineDuds->setValue(0); SB_MineDuds->setSingleStep(5); glBSLayout->addWidget(SB_MineDuds,12,2,1,1); l = new QLabel(gbBasicSettings); - l->setText(QLabel::tr("Explosives")); + l->setText(QLabel::tr("Barrels")); + l->setWhatsThis(wtExplosives); l->setWordWrap(true); glBSLayout->addWidget(l,13,0,1,1); l = new QLabel(gbBasicSettings); + l->setWhatsThis(wtExplosives); l->setFixedSize(32,32); l->setPixmap(QPixmap(":/res/iconExplosive.png")); glBSLayout->addWidget(l,13,1,1,1); SB_Explosives = new QSpinBox(gbBasicSettings); + SB_Explosives->setWhatsThis(wtExplosives); SB_Explosives->setRange(0, 200); SB_Explosives->setValue(0); SB_Explosives->setSingleStep(3); @@ -369,27 +429,33 @@ l = new QLabel(gbBasicSettings); l->setText(QLabel::tr("Air Mines")); + l->setWhatsThis(wtAirMines); l->setWordWrap(true); glBSLayout->addWidget(l,14,0,1,1); l = new QLabel(gbBasicSettings); + l->setWhatsThis(wtAirMines); l->setFixedSize(32,32); l->setPixmap(QPixmap(":/res/iconAirMine.png")); glBSLayout->addWidget(l,14,1,1,1); SB_AirMines = new QSpinBox(gbBasicSettings); + SB_AirMines->setWhatsThis(wtAirMines); SB_AirMines->setRange(0, 200); SB_AirMines->setValue(0); SB_AirMines->setSingleStep(5); glBSLayout->addWidget(SB_AirMines,14,2,1,1); l = new QLabel(gbBasicSettings); - l->setText(QLabel::tr("% Get Away Time")); + l->setText(QLabel::tr("% Retreat Time")); + l->setWhatsThis(wtGetAwayTime); l->setWordWrap(true); glBSLayout->addWidget(l,15,0,1,1); l = new QLabel(gbBasicSettings); + l->setWhatsThis(wtGetAwayTime); l->setFixedSize(32,32); l->setPixmap(QPixmap(":/res/iconTime.png")); glBSLayout->addWidget(l,15,1,1,1); SB_GetAwayTime = new QSpinBox(gbBasicSettings); + SB_GetAwayTime->setWhatsThis(wtGetAwayTime); SB_GetAwayTime->setRange(0, 999); SB_GetAwayTime->setValue(100); SB_GetAwayTime->setSingleStep(25); @@ -397,14 +463,17 @@ l = new QLabel(gbBasicSettings); l->setText(QLabel::tr("World Edge")); + l->setWhatsThis(wtWorldEdge); l->setWordWrap(true); glBSLayout->addWidget(l,16,0,1,1); l = new QLabel(gbBasicSettings); + l->setWhatsThis(wtWorldEdge); l->setFixedSize(32,32); l->setPixmap(QPixmap(":/res/iconEarth.png")); glBSLayout->addWidget(l,16,1,1,1); CB_WorldEdge = new QComboBox(gbBasicSettings); + CB_WorldEdge->setWhatsThis(wtWorldEdge); CB_WorldEdge->insertItem(0, tr("None (Default)")); CB_WorldEdge->insertItem(1, tr("Wrap (World wraps)")); CB_WorldEdge->insertItem(2, tr("Bounce (Edges reflect)")); @@ -415,14 +484,17 @@ l = new QLabel(gbBasicSettings); l->setText(QLabel::tr("Script parameter")); + l->setWhatsThis(wtScriptParam); l->setWordWrap(true); glBSLayout->addWidget(l,17,0,1,1); l = new QLabel(gbBasicSettings); + l->setWhatsThis(wtScriptParam); l->setFixedSize(32,32); l->setPixmap(QPixmap(":/res/iconScript.png")); glBSLayout->addWidget(l,17,1,1,1); LE_ScriptParam = new QLineEdit(gbBasicSettings); + LE_ScriptParam->setWhatsThis(wtScriptParam); LE_ScriptParam->setMaxLength(240); glBSLayout->addWidget(LE_ScriptParam,17,2,1,1); @@ -431,6 +503,7 @@ l->setText(QLabel::tr("Scheme Name:")); LE_name = new QLineEdit(this); + LE_name->setWhatsThis("Name of this scheme"); gl->addWidget(LE_name,15,1,1,5); gl->addWidget(l,15,0,1,1); diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/ui/page/pagescheme.h --- a/QTfrontend/ui/page/pagescheme.h Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/ui/page/pagescheme.h Tue May 17 23:29:49 2016 +0300 @@ -23,6 +23,7 @@ #include "togglebutton.h" class FreqSpinBox; +class MinesTimeSpinBox; class PageScheme : public AbstractPage { @@ -85,7 +86,7 @@ FreqSpinBox * SB_CaseProb; QSpinBox * SB_HealthCrates; QSpinBox * SB_CrateHealth; - QSpinBox * SB_MinesTime; + MinesTimeSpinBox * SB_MinesTime; QSpinBox * SB_Mines; QSpinBox * SB_AirMines; QSpinBox * SB_MineDuds; diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/ui/widget/MinesTimeSpinBox.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/ui/widget/MinesTimeSpinBox.cpp Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,40 @@ +/* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2015 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * @brief MinesTimeSpinBox class implementation + */ + +#include "MinesTimeSpinBox.h" + + +MinesTimeSpinBox::MinesTimeSpinBox(QWidget* parent) : QSpinBox(parent) +{ + // do nothing +}; + + +QString MinesTimeSpinBox::textFromValue(int value) const +{ + switch (value) + { + case -1: return tr("Random"); + default: return tr("%1 seconds", "", value).arg(value); + } +} diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/ui/widget/MinesTimeSpinBox.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/ui/widget/MinesTimeSpinBox.h Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,55 @@ +/* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2015 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * @brief MinesTimeSpinBox class definition + */ + +#ifndef HEDGEWARS_MINESTIMESPINBOX_H +#define HEDGEWARS_MINESTIMESPINBOX_H + +#include +#include + +/** + * SpinBox that returns its value as localized mines time. + * @since 0.9.23 + */ +class MinesTimeSpinBox : public QSpinBox +{ + Q_OBJECT + + public: + /** + * @brief Class constructor. + * @param parent parent widget. + */ + MinesTimeSpinBox(QWidget * parent); + + protected: + /** + * Returns it's value localized. + * @param value integer value to be representing as string. + * @return string representation + */ + QString textFromValue(int value) const; +}; + + +#endif // HEDGEWARS_MINESTIMESPINBOX_H diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/ui/widget/chatwidget.cpp --- a/QTfrontend/ui/widget/chatwidget.cpp Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/ui/widget/chatwidget.cpp Tue May 17 23:29:49 2016 +0300 @@ -210,6 +210,7 @@ // Chat view chatText = new QTextBrowser(this); + chatText->setWhatsThis(tr("Chat log")); chatText->document()->setDefaultStyleSheet(styleSheet()); chatText->setMinimumHeight(20); chatText->setMinimumWidth(10); @@ -226,6 +227,7 @@ // Hover: rgb(13, 5, 68) chatEditLine = new SmartLineEdit(); + chatEditLine->setWhatsThis(tr("Enter chat messages here and send them with [Enter]")); chatEditLine->setMaxLength(300); chatEditLine->setStyleSheet("SmartLineEdit { background-color: rgb(23, 11, 54); padding: 2px 8px; border-width: 0px; border-radius: 7px; } SmartLineEdit:hover, SmartLineEdit:focus { background-color: rgb(13, 5, 68); }"); chatEditLine->setFixedHeight(24); @@ -237,6 +239,7 @@ // Nickname list chatNicks = new QListView(this); + chatNicks->setWhatsThis(tr("List of players")); chatNicks->setIconSize(QSize(24, 16)); chatNicks->setSelectionMode(QAbstractItemView::SingleSelection); chatNicks->setEditTriggers(QAbstractItemView::NoEditTriggers); @@ -538,7 +541,9 @@ // add default commands QStringList cmds; - cmds << "/me" << "/discardStyleSheet" << "/saveStyleSheet"; + // /saveStyleSheet is(/was?) broken because of Physfs or something + // cmds << "/me" << "/discardStyleSheet" << "/saveStyleSheet"; + cmds << "/me" << "/info" << "/quit" << "/clear" << "/discardStyleSheet"; chatEditLine->addCommands(cmds); chatText->clear(); @@ -828,7 +833,10 @@ QString tline = line.trimmed(); if (tline.startsWith("/me")) return false; // not a real command - + else if (tline == "/clear") { + chatStrings.clear(); + chatText->clear(); + } else if (tline == "/discardStyleSheet") discardStyleSheet(); else if (tline == "/saveStyleSheet") diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/ui/widget/feedbackdialog.cpp --- a/QTfrontend/ui/widget/feedbackdialog.cpp Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/ui/widget/feedbackdialog.cpp Tue May 17 23:29:49 2016 +0300 @@ -35,7 +35,9 @@ #include #ifdef Q_OS_WIN +#ifndef WINVER #define WINVER 0x0500 +#endif #include #else #include diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/ui/widget/gamecfgwidget.cpp --- a/QTfrontend/ui/widget/gamecfgwidget.cpp Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/ui/widget/gamecfgwidget.cpp Tue May 17 23:29:49 2016 +0300 @@ -39,7 +39,7 @@ #include "GameStyleModel.h" #include "themeprompt.h" -GameCFGWidget::GameCFGWidget(QWidget* parent) : +GameCFGWidget::GameCFGWidget(QWidget* parent, bool randomWithoutDLC) : QGroupBox(parent) , mainLayout(this) , seedRegexp("\\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\}") @@ -80,6 +80,7 @@ // Map options pMapContainer = new HWMapContainer(mapContainerFree); + pMapContainer->setRandomWithoutDLC(randomWithoutDLC); stackLayout->addWidget(mapContainerFree, 0, Qt::AlignHCenter); pMapContainer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); pMapContainer->setFixedSize(width() - 14, 278); diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/ui/widget/gamecfgwidget.h --- a/QTfrontend/ui/widget/gamecfgwidget.h Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/ui/widget/gamecfgwidget.h Tue May 17 23:29:49 2016 +0300 @@ -40,7 +40,7 @@ Q_PROPERTY(bool master READ isMaster WRITE setMaster) public: - GameCFGWidget(QWidget* parent); + GameCFGWidget(QWidget* parent, bool randomWithoutDLC = false); quint32 getGameFlags() const; quint32 getInitHealth() const; QByteArray getFullConfig() const; diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/ui/widget/mapContainer.cpp --- a/QTfrontend/ui/widget/mapContainer.cpp Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/ui/widget/mapContainer.cpp Tue May 17 23:29:49 2016 +0300 @@ -63,6 +63,7 @@ m_script = QString(); m_prevMapFeatureSize = 12; m_mapFeatureSize = 12; + m_withoutDLC = false; hhSmall.load(":/res/hh_small.png"); hhLimit = 18; @@ -109,6 +110,7 @@ cType->insertItem(3, tr("Randomly generated"), MapModel::GeneratedMap); cType->insertItem(4, tr("Random maze"), MapModel::GeneratedMaze); cType->insertItem(5, tr("Random perlin"), MapModel::GeneratedPerlin); + cType->insertItem(6, tr("Forts"), MapModel::FortsMap); connect(cType, SIGNAL(currentIndexChanged(int)), this, SLOT(mapTypeChanged(int))); m_childWidgets << cType; @@ -125,6 +127,7 @@ btnRandomize->setFlat(true); btnRandomize->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); connect(btnRandomize, SIGNAL(clicked()), this, SLOT(setRandomMap())); + m_childWidgets << btnRandomize; btnRandomize->setStyleSheet("padding: 5px;"); btnRandomize->setFixedHeight(cType->height()); @@ -134,6 +137,7 @@ btnSeed = new QPushButton(parentWidget()->parentWidget()); btnSeed->setText(tr("Seed")); + btnSeed->setWhatsThis(tr("View and edit the seed, the source of randomness in the game")); btnSeed->setStyleSheet("padding: 5px;"); btnSeed->setFixedHeight(cType->height()); connect(btnSeed, SIGNAL(clicked()), this, SLOT(showSeedPrompt())); @@ -249,14 +253,29 @@ bottomLeftLayout->addStretch(1); /* Theme chooser */ + QHBoxLayout * themeHBox = new QHBoxLayout(this); + + btnRandTheme = new QPushButton(); + btnRandTheme->setWhatsThis(tr("Randomize the theme")); + btnRandTheme->setIcon(lp); + btnRandTheme->setIconSize(QSize(24, 24)); + btnRandTheme->setFixedHeight(30); + btnRandTheme->setFixedWidth(30); + connect(btnRandTheme, SIGNAL(clicked()), this, SLOT(setRandomTheme())); + m_childWidgets << btnTheme; + themeHBox->addWidget(btnRandTheme, 0); btnTheme = new QPushButton(this); + btnTheme->setWhatsThis(tr("Choose a theme")); btnTheme->setFlat(true); btnTheme->setIconSize(QSize(30, 30)); btnTheme->setFixedHeight(30); + btnTheme->setMaximumWidth(222); connect(btnTheme, SIGNAL(clicked()), this, SLOT(showThemePrompt())); m_childWidgets << btnTheme; - bottomLeftLayout->addWidget(btnTheme, 0); + themeHBox->addWidget(btnTheme, 1); + + bottomLeftLayout->addLayout(themeHBox); /* Add everything to main layout */ @@ -461,6 +480,10 @@ { //changeMapType(MapModel::HandDrawnMap); } + else if (map == "+forts+") + { + //nuffin + } else if (m_staticMapModel->mapExists(map)) { changeMapType(MapModel::StaticMap, m_staticMapModel->index(m_staticMapModel->findMap(map), 0)); @@ -495,18 +518,34 @@ if (!m_master) return; setRandomSeed(); + + QSortFilterProxyModel * mmodel = NULL; + switch(m_mapInfo.type) { case MapModel::GeneratedMap: case MapModel::GeneratedMaze: case MapModel::GeneratedPerlin: + case MapModel::FortsMap: setRandomTheme(); break; case MapModel::MissionMap: - missionMapChanged(m_missionMapModel->index(rand() % m_missionMapModel->rowCount(), 0)); + if (m_withoutDLC) + { + mmodel = m_missionMapModel->withoutDLC(); + missionMapChanged(mmodel->mapToSource(mmodel->index(rand() % mmodel->rowCount(),0))); + } + else + missionMapChanged(m_missionMapModel->index(rand() % m_missionMapModel->rowCount(),0)); break; case MapModel::StaticMap: - staticMapChanged(m_staticMapModel->index(rand() % m_staticMapModel->rowCount(), 0)); + if (m_withoutDLC) + { + mmodel = m_staticMapModel->withoutDLC(); + staticMapChanged(mmodel->mapToSource(mmodel->index(rand() % mmodel->rowCount(),0))); + } + else + staticMapChanged(m_staticMapModel->index(rand() % m_staticMapModel->rowCount(),0)); break; default: break; @@ -519,11 +558,23 @@ emit seedChanged(m_seed); } +void HWMapContainer::setRandomWithoutDLC(bool withoutDLC) +{ + m_withoutDLC = withoutDLC; +} + void HWMapContainer::setRandomTheme() { - if(!m_themeModel->rowCount()) return; - quint32 themeNum = rand() % m_themeModel->rowCount(); - updateTheme(m_themeModel->index(themeNum)); + QAbstractItemModel * tmodel; + + if (m_withoutDLC) + tmodel = m_themeModel->withoutDLC(); + else + tmodel = m_themeModel; + + if(!tmodel->rowCount()) return; + quint32 themeNum = rand() % tmodel->rowCount(); + updateTheme(tmodel->index(themeNum,0)); emit themeChanged(m_theme); } @@ -588,6 +639,10 @@ m_mapInfo.type = MapModel::HandDrawnMap; f = true; break; + case MAPGEN_FORTS: + m_mapInfo.type = MapModel::FortsMap; + f = true; + break; case MAPGEN_MAP: switch (m_mapInfo.type) { @@ -595,6 +650,7 @@ case MapModel::GeneratedMaze: case MapModel::GeneratedPerlin: case MapModel::HandDrawnMap: + case MapModel::FortsMap: m_mapInfo.type = MapModel::Invalid; default: break; @@ -679,6 +735,7 @@ case MapModel::GeneratedMaze: case MapModel::GeneratedPerlin: case MapModel::HandDrawnMap: + case MapModel::FortsMap: askForGeneratedPreview(); break; default: @@ -740,6 +797,44 @@ changeMapType((MapModel::MapType)cType->itemData(index).toInt()); } +void HWMapContainer::updateHelpTexts(MapModel::MapType type) +{ + QString randomAll = tr("Randomize the map, theme and seed"); + QString randomNoMap = tr("Randomize the theme and seed"); + QString randomSeed = tr("Randomize the seed"); + QString randomAllPrev = tr("Click to randomize the map, theme and seed"); + QString randomNoMapPrev = tr("Click to randomize the theme and seed"); + QString mfsComplex = QString(tr("Adjust the complexity of the generated map")); + QString mfsFortsDistance = QString(tr("Adjust the distance between forts")); + switch (type) + { + case MapModel::GeneratedMap: + case MapModel::GeneratedPerlin: + case MapModel::GeneratedMaze: + mapPreview->setWhatsThis(randomAllPrev); + mapFeatureSize->setWhatsThis(mfsComplex); + btnRandomize->setWhatsThis(randomAll); + break; + case MapModel::MissionMap: + case MapModel::StaticMap: + mapPreview->setWhatsThis(randomAllPrev); + btnRandomize->setWhatsThis(randomAll); + break; + case MapModel::HandDrawnMap: + mapPreview->setWhatsThis(tr("Click to edit")); + btnRandomize->setWhatsThis(randomSeed); + break; + case MapModel::FortsMap: + mapPreview->setWhatsThis(randomNoMapPrev); + mapFeatureSize->setWhatsThis(mfsFortsDistance); + btnRandomize->setWhatsThis(randomNoMap); + break; + default: + break; + } +} + + void HWMapContainer::changeMapType(MapModel::MapType type, const QModelIndex & newMap) { staticMapList->hide(); @@ -804,6 +899,11 @@ staticMapList->show(); emit mapChanged(m_curMap); break; + case MapModel::FortsMap: + mapgen = MAPGEN_FORTS; + setMapInfo(MapModel::MapInfoForts); + lblMapList->hide(); + break; default: break; } @@ -811,6 +911,9 @@ // Update theme button size updateThemeButtonSize(); + // Update “What's This?” help texts + updateHelpTexts(type); + // Update cType combobox for (int i = 0; i < cType->count(); i++) { @@ -829,6 +932,7 @@ void HWMapContainer::intSetFeatureSize(int val) { mapFeatureSize->setValue(val); + updateHelpTexts((MapModel::MapType)cType->itemData(cType->currentIndex()).toInt()); emit mapFeatureSizeChanged(val); } void HWMapContainer::setFeatureSize(int val) @@ -850,12 +954,16 @@ { btnTheme->setIconSize(QSize(30, 30)); btnTheme->setFixedHeight(30); + btnRandTheme->setFixedHeight(30); + btnRandTheme->setIconSize(QSize(24, 24)); } else { QSize iconSize = btnTheme->icon().actualSize(QSize(65535, 65535)); + btnRandTheme->setFixedHeight(64); btnTheme->setFixedHeight(64); btnTheme->setIconSize(iconSize); + btnRandTheme->setIconSize(QSize(32, 32)); } repaint(); diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/ui/widget/mapContainer.h --- a/QTfrontend/ui/widget/mapContainer.h Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/ui/widget/mapContainer.h Tue May 17 23:29:49 2016 +0300 @@ -85,6 +85,7 @@ void updateModelViews(); void onPreviewMapDestroyed(QObject * map); void setMaster(bool master); + void setRandomWithoutDLC(bool withoutDLC); signals: void seedChanged(const QString & seed); @@ -154,6 +155,7 @@ QPushButton * btnLoadMap; QPushButton * btnEditMap; QPushButton * btnRandomize; + QPushButton * btnRandTheme; QString selectedTheme; QPushButton * btnSeed; bool m_master; @@ -161,6 +163,7 @@ bool m_previewEnabled; bool m_missionsViewSetup; bool m_staticViewSetup; + bool m_withoutDLC; void intSetSeed(const QString & seed); void intSetMap(const QString & map); @@ -172,6 +175,7 @@ void mapChanged(const QModelIndex & map, int type, const QModelIndex & old = QModelIndex()); void setMapInfo(MapModel::MapInfo mapInfo); void changeMapType(MapModel::MapType type, const QModelIndex & newMap = QModelIndex()); + void updateHelpTexts(MapModel::MapType type); void updatePreview(); void updateThemeButtonSize(); void setupMissionMapsView(); diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/ui/widget/selectWeapon.cpp --- a/QTfrontend/ui/widget/selectWeapon.cpp Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/ui/widget/selectWeapon.cpp Tue May 17 23:29:49 2016 +0300 @@ -286,12 +286,12 @@ void SelWeaponWidget::newWeaponsName() { - QString newName = tr("new"); + QString newName = tr("New"); if(wconf->contains(newName)) { //name already used -> look for an appropriate name: int i=2; - while(wconf->contains(newName = tr("new")+QString::number(i++))) ; + while(wconf->contains(newName = tr("New (%1)").arg(i++))) ; } setWeaponsName(newName); } @@ -308,7 +308,7 @@ } else { - setWeapons(*cDefaultAmmoStore); + setWeapons(*cEmptyAmmoStore); } } @@ -322,12 +322,12 @@ if(wconf->contains(curWeaponsName)) { QString ammo = getWeaponsString(curWeaponsName); - QString newName = tr("copy of %1").arg(curWeaponsName); + QString newName = tr("Copy of %1").arg(curWeaponsName); if(wconf->contains(newName)) { //name already used -> look for an appropriate name: int i=2; - while(wconf->contains(newName = tr("copy of %1").arg(curWeaponsName+QString::number(i++)))); + while(wconf->contains(newName = tr("Copy of %1 (%2)").arg(curWeaponsName, i++))); } setWeaponsName(newName); setWeapons(ammo); diff -r 8c71c5a1172f -r a69124eb7ce7 QTfrontend/weapons.h --- a/QTfrontend/weapons.h Tue May 17 23:18:08 2016 +0300 +++ b/QTfrontend/weapons.h Tue May 17 23:29:49 2016 +0300 @@ -16,6 +16,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#define AMMOLINE_EMPTY_QT "000000900000000000000000000000000000000000000000000000000" +#define AMMOLINE_EMPTY_PROB "000000000000000000000000000000000000000000000000000000000" +#define AMMOLINE_EMPTY_DELAY "000000000000000000000000000000000000000000000000000000000" +#define AMMOLINE_EMPTY_CRATE "131111031211111112311411111111111111121111111111111111111" /* AmmoType lookup table (use monospace font / cursor movements) diff -r 8c71c5a1172f -r a69124eb7ce7 cmake_modules/Platform/Emscripten.cmake --- a/cmake_modules/Platform/Emscripten.cmake Tue May 17 23:18:08 2016 +0300 +++ b/cmake_modules/Platform/Emscripten.cmake Tue May 17 23:29:49 2016 +0300 @@ -58,7 +58,7 @@ # Abort if not found. if("${EMSCRIPTEN_ROOT_PATH}" STREQUAL "") - message(FATAL_ERROR "Could not locate the Emscripten compiler toolchain directory! Either set the EMSCRIPTEN environment variable, or pass -DEMSCRIPTEN_ROOT_PATH=xxx to CMake to explicitly specify the location of the compiler! This usually matches EMSCRIPTEN_ROOT from your ~/.emscripten file.") + message(FATAL_ERROR "Could not locate the Emscripten compiler toolchain directory! Set the EMSCRIPTEN environment variable to explicitly specify the location of the compiler! This usually matches EMSCRIPTEN_ROOT from your ~/.emscripten file.") endif() # Normalize, convert Windows backslashes to forward slashes or CMake will crash. diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/ArgParsers.pas --- a/hedgewars/ArgParsers.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/ArgParsers.pas Tue May 17 23:29:49 2016 +0300 @@ -22,6 +22,7 @@ interface procedure GetParams; + {$IFNDEF BSD} var operatingsystem_parameter_argc: NativeInt; external; operatingsystem_parameter_argv: pointer; external; diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/LuaPas.pas --- a/hedgewars/LuaPas.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/LuaPas.pas Tue May 17 23:29:49 2016 +0300 @@ -805,7 +805,7 @@ implementation uses - SysUtils; + uUtils; (*****************************************************************************) (* luaconfig.h *) diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/avwrapper/avwrapper.c --- a/hedgewars/avwrapper/avwrapper.c Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/avwrapper/avwrapper.c Tue May 17 23:29:49 2016 +0300 @@ -447,11 +447,11 @@ if (!(x & 1) && !(y & 1)) { int r = (buf[x * 4 + 0] + buf[(x + 1) * 4 + 0] + - buf[x * 4 + 0 + stride] + buf[(x + 1) * 4 + 0 + stride]) / 4; + buf[x * 4 + 0 - stride] + buf[(x + 1) * 4 + 0 - stride]) / 4; int g = (buf[x * 4 + 1] + buf[(x + 1) * 4 + 1] + - buf[x * 4 + 1 + stride] + buf[(x + 1) * 4 + 1 + stride]) / 4; + buf[x * 4 + 1 - stride] + buf[(x + 1) * 4 + 1 - stride]) / 4; int b = (buf[x * 4 + 2] + buf[(x + 1) * 4 + 2] + - buf[x * 4 + 2 + stride] + buf[(x + 1) * 4 + 2 + stride]) / 4; + buf[x * 4 + 2 - stride] + buf[(x + 1) * 4 + 2 - stride]) / 4; int cr = (int)(-0.14713f * r - 0.28886f * g + 0.436f * b); int cb = (int)( 0.615f * r - 0.51499f * g - 0.10001f * b); diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/hwengine.pas --- a/hedgewars/hwengine.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/hwengine.pas Tue May 17 23:29:49 2016 +0300 @@ -42,6 +42,22 @@ implementation uses uFLUICallback, uFLTypes; +// TODO localization support +procedure ShowCredits(); +var themeCredits, mapCredits: shortstring; +begin + if Length(cMapName) > 0 then + begin + mapCredits:= read1stLn(cPathz[ptMapCurrent] + '/credits.txt'); + if Length(mapCredits) > 0 then + AddChatString(char(#11) + '© Map: ' + mapCredits); + end; + + themeCredits:= read1stLn(cPathz[ptCurrTheme] + '/credits.txt'); + if Length(themeCredits) > 0 then + AddChatString(char(#12) + '© Theme: ' + themeCredits); +end; + /////////////////////////////////////////////////////////////////////////////// function DoTimer(Lag: LongInt): boolean; var s: shortstring; @@ -86,6 +102,7 @@ with TeamsArray[t]^ do MaxTeamHealth:= TeamHealth; RecountAllTeamsHealth; + if not cOnlyStats then ShowCredits; GameState:= gsGame; end; gsConfirm, gsGame, gsChat: diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/pas2cRedo.pas --- a/hedgewars/pas2cRedo.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/pas2cRedo.pas Tue May 17 23:29:49 2016 +0300 @@ -71,7 +71,7 @@ trunc, round, ceil : function : integer; abs, sqr : function : integer; - StrPas, FormatDateTime, copy, str, PosS, trim, LowerCase : function : shortstring; + StrPas, FormatDateTime, copy, str, PosS, LowerCase : function : shortstring; pos : function : integer; StrToInt : function : integer; SetLength, SetLengthA, val, StrDispose, StrCopy : procedure; @@ -84,8 +84,6 @@ min, max:function:integer; assign, rewrite, rewrite_2, reset, reset_2, flush, BlockWrite, BlockRead, close : procedure; FileExists, DirectoryExists, eof : function : boolean; - ExtractFileDir : function : string; - ExtractFileName : function : string; ParamCount : function : integer; ParamStr : function : string; diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/pas2cSystem.pas --- a/hedgewars/pas2cSystem.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/pas2cSystem.pas Tue May 17 23:29:49 2016 +0300 @@ -14,6 +14,7 @@ Int64 = integer; QWord = uinteger; GLint = integer; + GLsizei = integer; GLuint = integer; GLenum = integer; diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/uAI.pas --- a/hedgewars/uAI.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/uAI.pas Tue May 17 23:29:49 2016 +0300 @@ -30,7 +30,7 @@ implementation uses uConsts, SDLh, uAIMisc, uAIAmmoTests, uAIActions, - uAmmos, SysUtils, uTypes, + uAmmos, uTypes, uVariables, uCommands, uUtils, uDebug, uAILandMarks; var BestActions: TActions; diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/uChat.pas --- a/hedgewars/uChat.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/uChat.pas Tue May 17 23:29:49 2016 +0300 @@ -70,7 +70,7 @@ const - colors: array[#0..#9] of TSDL_Color = ( + colors: array[#0..#12] of TSDL_Color = ( (r:$FF; g:$FF; b:$FF; a:$FF), // #0 unused, feel free to take it for anything (r:$FF; g:$FF; b:$FF; a:$FF), // #1 chat message [White] (r:$FF; g:$00; b:$FF; a:$FF), // #2 action message [Purple] @@ -80,7 +80,10 @@ (r:$00; g:$FF; b:$FF; a:$FF), // #6 input line [Light Blue] (r:$FF; g:$80; b:$80; a:$FF), // #7 team gone [Light Red] (r:$FF; g:$D0; b:$80; a:$FF), // #8 team back [Light Orange] - (r:$DF; g:$DF; b:$DF; a:$FF) // #9 hog speech [Light Gray] + (r:$DF; g:$DF; b:$DF; a:$FF), // #9 hog speech [Light Gray] + (r:$FF; g:$00; b:$FF; a:$AF), // #10 music credits [Purple] + (r:$00; g:$FF; b:$FF; a:$AF), // #11 map credits [Light Blue] + (r:$FF; g:$D0; b:$80; a:$AF) // #12 theme credits [Light Orange] ); ChatCommandz: array [TChatCmd] of record ChatCmd: string[31]; @@ -205,10 +208,13 @@ end; const ClDisplayDuration = 12500; + CreditsDisplayDur = 2500; procedure SetLine(var cl: TChatLine; str: shortstring; isInput: boolean); var color : TSDL_Color; + credits: boolean; begin +credits:= false; if isInput then begin cl.s:= str; @@ -220,6 +226,7 @@ if str[1] <= High(colors) then begin color:= colors[str[1]]; + credits:= (str[1] >= #10) and (str[1] <= #12); delete(str, 1, 1); end // fallback if invalid color @@ -234,7 +241,10 @@ // set texture, note: variables cl.s and str will be different here if isInput RenderChatLineTex(cl, str); -cl.Time:= RealTicks + ClDisplayDuration; +if credits then + cl.Time:= RealTicks + CreditsDisplayDur +else + cl.Time:= RealTicks + ClDisplayDuration; end; // For uStore texture recreation diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/uGears.pas --- a/hedgewars/uGears.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/uGears.pas Tue May 17 23:29:49 2016 +0300 @@ -738,20 +738,101 @@ end end; +// sort clans horizontally (bubble-sort, because why not) +procedure SortHHsByClan(); +var n, newn, i, j, k, p: LongInt; + ar, clar: array[0..Pred(cMaxHHs)] of PHedgehog; + Count, clCount: Longword; + tmpX, tmpY: hwFloat; + hh1, hh2: PHedgehog; +begin +Count:= 0; +// add hedgehogs to the array in clan order +for p:= 0 to (ClansCount - 1) do + with SpawnClansArray[p]^ do + begin + // count hogs in this clan + clCount:= 0; + for j:= 0 to Pred(TeamsNumber) do + with Teams[j]^ do + for i:= 0 to cMaxHHIndex do + if Hedgehogs[i].Gear <> nil then + begin + clar[clCount]:= @Hedgehogs[i]; + inc(clCount); + end; + + // shuffle all hogs of this clan + for i:= 0 to clCount - 1 do + begin + j:= GetRandom(clCount); + k:= GetRandom(clCount); + if clar[j] <> clar[k] then + begin + hh1:= clar[j]; + clar[j]:= clar[k]; + clar[k]:= hh1; + end; + end; + + // add clan's hog to sorting array + for i:= 0 to clCount - 1 do + begin + ar[Count]:= clar[i]; + inc(Count); + end; + end; + + +// bubble-sort hog array +n:= Count - 1; + +repeat + newn:= 0; + for i:= 1 to n do + begin + hh1:= ar[i-1]; + hh2:= ar[i]; + if hwRound(hh1^.Gear^.X) > hwRound(hh2^.Gear^.X) then + begin + tmpX:= hh1^.Gear^.X; + tmpY:= hh1^.Gear^.Y; + hh1^.Gear^.X:= hh2^.Gear^.X; + hh1^.Gear^.Y:= hh2^.Gear^.Y; + hh2^.Gear^.X:= tmpX; + hh2^.Gear^.Y:= tmpY; + newn:= i; + end; + end; + n:= newn; +until n = 0; + +end; + procedure AssignHHCoords; var i, t, p, j: LongInt; ar: array[0..Pred(cMaxHHs)] of PHedgehog; Count: Longword; + divide, sectionDivide: boolean; begin if (GameFlags and gfPlaceHog) <> 0 then PlacingHogs:= true; -if (ClansCount = 2) and ((GameFlags and gfDivideTeams) <> 0) then + +divide:= ((GameFlags and gfDivideTeams) <> 0); +sectionDivide:= divide and ((GameFlags and gfForts) <> 0); + +// TODO: there might be a smarter way to decide if dividing clans into equal-width map sections makes sense +// e.g. by checking if there is enough spawn area in each section +if divide and (not sectionDivide) then + sectionDivide:= (ClansCount = 2); + +// in section-divide mode, divide the map into equal-width sections and put each clan in one of them +if sectionDivide then begin - t:= 0; - if checkFails(ClansCount = 2, 'More or less than 2 clans on map in divided teams mode!', true) then exit; - for p:= 0 to 1 do + t:= leftX; + for p:= 0 to (ClansCount - 1) do begin - with ClansArray[p]^ do + with SpawnClansArray[p]^ do for j:= 0 to Pred(TeamsNumber) do with Teams[j]^ do for i:= 0 to cMaxHHIndex do @@ -761,14 +842,18 @@ if PlacingHogs then Unplaced:= true else - FindPlace(Gear, false, t, t + LAND_WIDTH div 2, true);// could make Gear == nil; + FindPlace(Gear, false, t, t + playWidth div ClansCount, true);// could make Gear == nil; if Gear <> nil then begin Gear^.Pos:= GetRandom(49); - Gear^.dX.isNegative:= p = 1; + // unless the world is wrapping, make outter teams face to map center + if (WorldEdge <> weWrap) and ((p = 0) or (p = ClansCount - 1)) then + Gear^.dX.isNegative:= (p <> 0) + else + Gear^.dX.isNegative:= (GetRandom(2) = 1); end end; - t:= LAND_WIDTH div 2 + inc(t, playWidth div ClansCount); end end else // mix hedgehogs @@ -791,10 +876,10 @@ if PlacingHogs then ar[i]^.Unplaced:= true else - FindPlace(ar[i]^.Gear, false, 0, LAND_WIDTH, true); + FindPlace(ar[i]^.Gear, false, leftX, rightX, true); if ar[i]^.Gear <> nil then begin - ar[i]^.Gear^.dX.isNegative:= hwRound(ar[i]^.Gear^.X) > LAND_WIDTH div 2; + ar[i]^.Gear^.dX.isNegative:= hwRound(ar[i]^.Gear^.X) > leftX + playWidth div 2; ar[i]^.Gear^.Pos:= GetRandom(19) end; ar[i]:= ar[Count - 1]; @@ -822,8 +907,13 @@ sprTargetBee, 0, lfBasic, $FFFFFFFF, false, false, false); Gear^.Y:= int2hwFloat(hwRound(Gear^.Y) - 16 - Gear^.Radius); Gear^.State:= Gear^.State and (not gsttmpFlag); - AddFileLog('Carved a hole for hog at coordinates (' + inttostr(hwRound(Gear^.X)) + ',' + inttostr(hwRound(Gear^.Y)) + ')') - end + AddFileLog('Placed flower for hog at coordinates (' + inttostr(hwRound(Gear^.X)) + ',' + inttostr(hwRound(Gear^.Y)) + ')') + end; + + +// divided teams: sort the hedgehogs from left to right by clan and shuffle clan members +if divide and (not sectionDivide) then + SortHHsByClan(); end; diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/uGearsHandlersMess.pas --- a/hedgewars/uGearsHandlersMess.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/uGearsHandlersMess.pas Tue May 17 23:29:49 2016 +0300 @@ -6244,8 +6244,6 @@ if TestCollisionXwithGear(Gear, 1) <> 0 then ox:= 1; if TestCollisionXwithGear(Gear, -1) <> 0 then ox:= -1; if TestCollisionYwithGear(Gear, 1) <> 0 then oy:= 1; - if Gear^.Health > 0 then - PlaySound(sndRopeAttach); la:= _10000; if (ox <> 0) or (oy <> 0) then @@ -6255,6 +6253,9 @@ // debug for when we couldn't get an angle //AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtSmokeWhite); *) + if Gear^.Health > 0 then + PlaySound(Gear^.ImpactSound); + Gear^.DirAngle:= DxDy2Angle(Gear^.dX, Gear^.dY) + (random(30)-15); if (Gear^.dX.isNegative and Gear^.dY.isNegative) or ((not Gear^.dX.isNegative) and (not Gear^.dY.isNegative)) then Gear^.DirAngle:= Gear^.DirAngle-90; diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/uGearsHedgehog.pas --- a/hedgewars/uGearsHedgehog.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/uGearsHedgehog.pas Tue May 17 23:29:49 2016 +0300 @@ -386,7 +386,7 @@ end; amInvulnerable: Effects[heInvulnerable]:= 1; amExtraTime: begin - PlaySound(sndSwitchHog); + PlaySound(sndExtraTime); TurnTimeLeft:= TurnTimeLeft + 30000 end; amLaserSight: cLaserSighting:= true; @@ -732,8 +732,7 @@ PlaySound(sndShotgunReload); inc(HH^.Health, Gear^.Health); HH^.Hedgehog^.Effects[hePoisoned] := 0; - str(Gear^.Health, s); - s:= '+' + s; + s:= '+' + IntToStr(Gear^.Health); AddCaption(ansistring(s), HH^.Hedgehog^.Team^.Clan^.Color, capgrpAmmoinfo); RenderHealth(HH^.Hedgehog^); RecountTeamHealth(HH^.Hedgehog^.Team); diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/uGearsList.pas --- a/hedgewars/uGearsList.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/uGearsList.pas Tue May 17 23:29:49 2016 +0300 @@ -427,7 +427,7 @@ end end; gtAirMine: begin - gear^.ImpactSound:= sndDenied; + gear^.ImpactSound:= sndAirMineImpact; gear^.nImpactSounds:= 1; gear^.Health:= 30; gear^.State:= gear^.State or gstMoving or gstNoGravity or gstSubmersible; @@ -459,6 +459,7 @@ if gear^.Timer = 0 then gear^.Timer:= 500; end; gtKnife: begin + gear^.ImpactSound:= sndKnifeImpact; gear^.AdvBounce:= 1; gear^.Elasticity:= _0_8; gear^.Friction:= _0_8; diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/uGearsRender.pas --- a/hedgewars/uGearsRender.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/uGearsRender.pas Tue May 17 23:29:49 2016 +0300 @@ -1270,7 +1270,7 @@ end; gtDynamite: begin DrawSprite(sprDynamite, x - 16, y - 25, Gear^.Tag and 1, Gear^.Tag shr 1); - if (random(3) = 0) then + if (random(3) = 0) and ((Gear^.State and gstDrowning) = 0) then begin vg:= AddVisualGear(hwRound(Gear^.X)+12-(Gear^.Tag shr 1), hwRound(Gear^.Y)-16, vgtStraightShot); if vg <> nil then diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/uGearsUtils.pas --- a/hedgewars/uGearsUtils.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/uGearsUtils.pas Tue May 17 23:29:49 2016 +0300 @@ -274,8 +274,7 @@ // was considering pulsing on attack, Tiy thinks it should be permanent while in play //CurrentHedgehog^.Gear^.State:= CurrentHedgehog^.Gear^.State or gstVampiric; inc(CurrentHedgehog^.Gear^.Health,vampDmg); - str(vampDmg, s); - s:= '+' + s; + s:= '+' + IntToStr(vampDmg); AddCaption(ansistring(s), CurrentHedgehog^.Team^.Clan^.Color, capgrpAmmoinfo); RenderHealth(CurrentHedgehog^); RecountTeamHealth(CurrentHedgehog^.Team); @@ -939,7 +938,7 @@ while (cnt < 1000) do begin inc(cnt); - x:= leftX+GetRandom(rightX-leftX-32)+16; + x:= left+GetRandom(right-left-2*cHHRadius)+cHHRadius; y:= topY+GetRandom(LAND_HEIGHT-topY-64)+48; if NoGearsToAvoid(x, y, 100 div max(1,cnt div 100), 100 div max(1,cnt div 100)) then begin diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/uLand.pas --- a/hedgewars/uLand.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/uLand.pas Tue May 17 23:29:49 2016 +0300 @@ -30,7 +30,7 @@ procedure GenPreviewAlpha(out Preview: TPreviewAlpha); implementation -uses uConsole, uStore, uRandom, uLandObjects, uIO, uLandTexture, SysUtils, +uses uConsole, uStore, uRandom, uLandObjects, uIO, uLandTexture, uVariables, uUtils, uCommands, adler32, uDebug, uLandPainted, uTextures, uLandGenMaze, uPhysFSLayer, uScript, uLandGenPerlin, uLandGenTemplateBased, uLandUtils, uRenderUtils; @@ -348,35 +348,131 @@ AddProgress(); end; -procedure MakeFortsMap; -var tmpsurf: PSDL_Surface; +procedure MakeFortsPreview; +var gap: LongInt; + h1, h2, w1, w2, x, y, lastX, wbm, bmref: LongWord; +const fortHeight = 960; + fortWidth = 704; + bmHeight = 53; + bmWidth = 64; begin ResizeLand(4096,2048); -MaxHedgehogs:= 32; + +lastX:= LAND_WIDTH-1; + +gap:= (1024 - fortWidth) + 60 + 20 * cFeatureSize; + +h2:= LAND_HEIGHT-1; +h1:= h2 - fortHeight; +w2:= (LAND_WIDTH - gap) div 2; +w1:= w2 - fortWidth; +wbm:= h1 + bmHeight; + +// generate 2 forts in center +for y:= h1 to h2 do + for x:= w1 to w2 do + begin + if x mod 4 <> 0 then + begin + if (y <= wbm) and ((x - w1) mod (bmWidth * 2) >= bmWidth) then + continue; + Land[y,x]:= lfBasic; + Land[y,lastX-x]:= lfBasic; + end; + end; + +w2:= w1 - gap; +w1:= max(0, w2 - fortWidth); +wbm:= h1 + bmHeight; +bmref:= w2 + bmWidth; + +for y:= h1 to h2 do + for x:= w1 to w2 do + begin + if ((y - x) mod 2) = 0 then + begin + // align battlement on inner edge, because real outer edge could be offscreen + if (y <= wbm) and ((LAND_WIDTH + x - bmref) mod (bmWidth * 2) >= bmWidth) then + continue; + Land[y,x]:= lfBasic; + Land[y,lastX-x]:= lfBasic; + end; + end; +end; + +procedure MakeFortsMap; +var tmpsurf: PSDL_Surface; + sectionWidth, i, t, p: integer; + mirror: boolean; + pc: PClan; +begin + +// make the gaps between forts adjustable if fort map was selected +if cMapGen = mgForts then + sectionWidth:= 1024 + 60 + 20 * cFeatureSize +else + sectionWidth:= 1024 * 300; + +// mix up spawn/fort order of clans +for i:= 0 to ClansCount - 1 do + begin + t:= GetRandom(ClansCount); + p:= GetRandom(ClansCount); + if t <> p then + begin + pc:= SpawnClansArray[t]; + SpawnClansArray[t]:= SpawnClansArray[p]; + SpawnClansArray[p]:= pc; + end; + end; + +// figure out how much space we need +playWidth:= sectionWidth * ClansCount; + +// note: LAND_WIDTH might be bigger than specified below (rounded to next power of 2) +ResizeLand(playWidth, 2048); + // For now, defining a fort is playable area as 3072x1200 - there are no tall forts. The extra height is to avoid triggering border with current code, also if user turns on a border, it will give a bit more maneuvering room. playHeight:= 1200; -playWidth:= 2560; -leftX:= (LAND_WIDTH - playWidth) div 2; + +// center playable area in land array +leftX:= ((LAND_WIDTH - playWidth) div 2); rightX:= ((playWidth + (LAND_WIDTH - playWidth) div 2) - 1); topY:= LAND_HEIGHT - playHeight; WriteLnToConsole('Generating forts land...'); -tmpsurf:= LoadDataImage(ptForts, ClansArray[0]^.Teams[0]^.FortName + 'L', ifAlpha or ifCritical or ifTransparent or ifIgnoreCaps); -BlitImageAndGenerateCollisionInfo(leftX+150, LAND_HEIGHT - tmpsurf^.h, tmpsurf^.w, tmpsurf); -SDL_FreeSurface(tmpsurf); +for i := 0 to ClansCount - 1 do + begin + + // face in random direction + mirror:= (GetRandom(2) = 0); + // make first/last fort face inwards + if (WorldEdge <> weWrap) or (ClansCount = 2) then + mirror:= (i <> 0) and (mirror or (i = ClansCount - 1)); -// not critical because if no R we can fallback to mirrored L -tmpsurf:= LoadDataImage(ptForts, ClansArray[1]^.Teams[0]^.FortName + 'R', ifAlpha or ifTransparent or ifIgnoreCaps); -// fallback -if tmpsurf = nil then - begin - tmpsurf:= LoadDataImage(ptForts, ClansArray[1]^.Teams[0]^.FortName + 'L', ifAlpha or ifCritical or ifTransparent or ifIgnoreCaps); - BlitImageAndGenerateCollisionInfo(rightX - 150 - tmpsurf^.w, LAND_HEIGHT - tmpsurf^.h, tmpsurf^.w, tmpsurf, 0, true); - end -else - BlitImageAndGenerateCollisionInfo(rightX - 150 - tmpsurf^.w, LAND_HEIGHT - tmpsurf^.h, tmpsurf^.w, tmpsurf); -SDL_FreeSurface(tmpsurf); + if mirror then + begin + // not critical because if no R we can fallback to mirrored L + tmpsurf:= LoadDataImage(ptForts, SpawnClansArray[i]^.Teams[0]^.FortName + 'R', ifAlpha or ifTransparent or ifIgnoreCaps); + // fallback + if tmpsurf = nil then + begin + tmpsurf:= LoadDataImage(ptForts, SpawnClansArray[i]^.Teams[0]^.FortName + 'L', ifAlpha or ifCritical or ifTransparent or ifIgnoreCaps); + BlitImageAndGenerateCollisionInfo(leftX + sectionWidth * i + ((sectionWidth - tmpsurf^.w) div 2), LAND_HEIGHT - tmpsurf^.h, tmpsurf^.w, tmpsurf, 0, true); + end + else + BlitImageAndGenerateCollisionInfo(leftX + sectionWidth * i + ((sectionWidth - tmpsurf^.w) div 2), LAND_HEIGHT - tmpsurf^.h, tmpsurf^.w, tmpsurf); + SDL_FreeSurface(tmpsurf); + end + else + begin + tmpsurf:= LoadDataImage(ptForts, SpawnClansArray[i]^.Teams[0]^.FortName + 'L', ifAlpha or ifCritical or ifTransparent or ifIgnoreCaps); + BlitImageAndGenerateCollisionInfo(leftX + sectionWidth * i + ((sectionWidth - tmpsurf^.w) div 2), LAND_HEIGHT - tmpsurf^.h, tmpsurf^.w, tmpsurf); + SDL_FreeSurface(tmpsurf); + end; + + end; end; procedure LoadMapConfig; @@ -555,10 +651,12 @@ mgMaze : begin ResizeLand(4096,2048); GenMaze; end; mgPerlin: begin ResizeLand(4096,2048); GenPerlin; end; mgDrawn : GenDrawnMap; + mgForts : begin GameFlags:= (GameFlags or gfForts or gfDivideTeams); MakeFortsMap(); end; else OutError('Unknown mapgen', true); end; - GenLandSurface + if cMapGen <> mgForts then + GenLandSurface end else MakeFortsMap; @@ -698,6 +796,7 @@ mgMaze: begin ResizeLand(4096,2048); GenMaze; end; mgPerlin: begin ResizeLand(4096,2048); GenPerlin; end; mgDrawn: GenDrawnMap; + mgForts: MakeFortsPreview(); else OutError('Unknown mapgen', true); end; @@ -746,6 +845,7 @@ mgMaze: begin ResizeLand(4096,2048); GenMaze; end; mgPerlin: begin ResizeLand(4096,2048); GenPerlin; end; mgDrawn: GenDrawnMap; + mgForts: MakeFortsPreview; else OutError('Unknown mapgen', true); end; diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/uLandObjects.pas --- a/hedgewars/uLandObjects.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/uLandObjects.pas Tue May 17 23:29:49 2016 +0300 @@ -34,7 +34,7 @@ implementation uses uStore, uConsts, uConsole, uRandom, uSound - , uTypes, uVariables, uUtils, uDebug, SysUtils + , uTypes, uVariables, uDebug, uUtils , uPhysFSLayer; const MaxRects = 512; diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/uLandUtils.pas --- a/hedgewars/uLandUtils.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/uLandUtils.pas Tue May 17 23:29:49 2016 +0300 @@ -30,6 +30,7 @@ if (width div 4096 >= 2) or (height div 2048 >= 2) then cMaxZoomLevel:= cMaxZoomLevel/2; cMinMaxZoomLevelDelta:= cMaxZoomLevel - cMinZoomLevel end; +initScreenSpaceVars(); end; procedure InitWorldEdges(); diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/uLocale.pas --- a/hedgewars/uLocale.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/uLocale.pas Tue May 17 23:29:49 2016 +0300 @@ -30,7 +30,7 @@ function GetEventString(e: TEventId): ansistring; {$IFDEF HWLIBRARY} -procedure LoadLocaleWrapper(path: pchar; filename: pchar); cdecl; export; +procedure LoadLocaleWrapper(path: pchar; userpath: pchar; filename: pchar); cdecl; export; {$ENDIF} implementation @@ -133,22 +133,9 @@ FormatA:= copy(fmt, 1, i - 1) + arg + FormatA(copy(fmt, i + 2, Length(fmt) - i - 1), arg) end; -{$IFDEF HWLIBRARY} -procedure LoadLocaleWrapper(path: pchar; filename: pchar); cdecl; export; +procedure LoadLocaleWrapper(path: pchar; userpath: pchar; filename: pchar); cdecl; export; begin -// FIXME -{ PathPrefix := Strpas(path); - - uUtils.initModule(false); - uVariables.initModule; - uPhysFSLayer.initModule; -} LoadLocale(Strpas(filename)); -{ - uPhysFSLayer.freeModule; - uVariables.freeModule; - uUtils.freeModule;} end; -{$ENDIF} end. diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/uMatrix.pas --- a/hedgewars/uMatrix.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/uMatrix.pas Tue May 17 23:29:49 2016 +0300 @@ -260,7 +260,7 @@ write(Result[i, j]); writeln; end; - TryDo(false, 'error in matrix multiplication?!', true); + checkFails(false, 'error in matrix multiplication?!', true); end; {$ENDIF} diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/uMisc.pas --- a/hedgewars/uMisc.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/uMisc.pas Tue May 17 23:29:49 2016 +0300 @@ -33,7 +33,7 @@ function SDL_RectMake(x, y, width, height: LongInt): TSDL_Rect; inline; implementation -uses SysUtils, uVariables, uUtils +uses uVariables, uUtils {$IFDEF PNG_SCREENSHOTS}, PNGh, png {$ENDIF}; type PScreenshot = ^TScreenshot; diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/uPhysFSLayer.pas --- a/hedgewars/uPhysFSLayer.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/uPhysFSLayer.pas Tue May 17 23:29:49 2016 +0300 @@ -43,7 +43,7 @@ procedure hedgewarsMountPackage(filename: PChar); cdecl; external PhyslayerLibName; implementation -uses uConsts, uUtils, uVariables{$IFNDEF PAS2C}, sysutils{$ELSE}, physfs{$ENDIF}; +uses uConsts, uUtils, uVariables{$IFDEF PAS2C}, physfs{$ENDIF}; function PHYSFSRWOPS_openRead(fname: PChar): PSDL_RWops; cdecl; external PhyslayerLibName; function PHYSFSRWOPS_openWrite(fname: PChar): PSDL_RWops; cdecl; external PhyslayerLibName; @@ -205,7 +205,7 @@ {$ENDIF} begin //TODO: http://icculus.org/pipermail/physfs/2011-August/001006.html - cPhysfsId:= shortstring(GetCurrentDir()) + {$IFDEF DARWIN}{$IFNDEF IPHONEOS}'/Hedgewars.app/Contents/MacOS/' + {$ENDIF}{$ENDIF} ' hedgewars'; + cPhysfsId:= {$IFDEF DARWIN}{$IFNDEF IPHONEOS}'/Hedgewars.app/Contents/MacOS/' + {$ENDIF}{$ENDIF} ' hedgewars'; i:= PHYSFS_init(Str2PChar(cPhysfsId)); //AddFileLog('[PhysFS] init: ' + inttostr(i)); diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/uRandom.pas --- a/hedgewars/uRandom.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/uRandom.pas Tue May 17 23:29:49 2016 +0300 @@ -49,16 +49,14 @@ end; function GetNext: Longword; inline; -var s : string; begin -n:= (n + 1) and $3F; -cirbuf[n]:= + n:= (n + 1) and $3F; + cirbuf[n]:= (cirbuf[(n + 40) and $3F] + {n - 24 mod 64} cirbuf[(n + 9) and $3F]) {n - 55 mod 64} and $7FFFFFFF; {mod 2^31} - GetNext:= cirbuf[n]; - str(GetNext, s); + GetNext:= cirbuf[n]; end; procedure SetRandomSeed(Seed: shortstring; dropAdditionalPart: boolean); diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/uRender.pas --- a/hedgewars/uRender.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/uRender.pas Tue May 17 23:29:49 2016 +0300 @@ -103,8 +103,8 @@ implementation -uses {$IFNDEF PAS2C} StrUtils, {$ENDIF}SysUtils, uVariables, uUtils, uConsts - {$IFDEF GL2}, uMatrix, uConsole{$ENDIF}; +uses {$IFNDEF PAS2C} StrUtils, {$ENDIF}uVariables, uUtils, uConsts + {$IFDEF GL2}, uMatrix, uConsole{$ENDIF}, uPhysFSLayer, uDebug; {$IFDEF USE_TOUCH_INTERFACE} const @@ -256,33 +256,27 @@ function CompileShader(shaderFile: string; shaderType: GLenum): GLuint; var shader: GLuint; - f: Textfile; - source, line: AnsiString; + f: PFSFile; + source, line: ansistring; sourceA: Pchar; lengthA: GLint; compileResult: GLint; logLength: GLint; log: PChar; begin - Assign(f, PathPrefix + cPathz[ptShaders] + '/' + shaderFile); - filemode:= 0; // readonly - Reset(f); - if IOResult <> 0 then - begin - AddFileLog('Unable to load ' + shaderFile); - halt(HaltStartupError); - end; + f:= pfsOpenRead(cPathz[ptShaders] + '/' + shaderFile); + checkFails(f <> nil, 'Unable to load ' + shaderFile, true); source:=''; - while not eof(f) do + while not pfsEof(f) do begin - ReadLn(f, line); + pfsReadLnA(f, line); source:= source + line + #10; end; - Close(f); + pfsClose(f); - WriteLnToConsole('Compiling shader: ' + PathPrefix + cPathz[ptShaders] + '/' + shaderFile); + WriteLnToConsole('Compiling shader: ' + cPathz[ptShaders] + '/' + shaderFile); sourceA:=PChar(source); lengthA:=Length(source); @@ -468,7 +462,8 @@ begin // print up to 3 extentions per row // ExtractWord will return empty string if index out of range - AddFileLog(TrimRight( + //AddFileLog(TrimRight( + AddFileLog(Trim( ExtractWord(tmpint, tmpstr, [' ']) + ' ' + ExtractWord(tmpint+1, tmpstr, [' ']) + ' ' + ExtractWord(tmpint+2, tmpstr, [' ']) @@ -508,8 +503,7 @@ {$IFDEF GL2} {$IFDEF PAS2C} - err := glewInit(); - if err <> GLEW_OK then + if glewInit() <> GLEW_OK then begin WriteLnToConsole('Failed to initialize GLEW.'); halt(HaltStartupError); diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/uRenderUtils.pas --- a/hedgewars/uRenderUtils.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/uRenderUtils.pas Tue May 17 23:29:49 2016 +0300 @@ -39,7 +39,7 @@ function RenderSpeechBubbleTex(s: ansistring; SpeechType: Longword; font: THWFont): PTexture; implementation -uses uUtils, uVariables, uConsts, uTextures, SysUtils, uDebug; +uses uVariables, uConsts, uTextures, SysUtils, uUtils, uDebug; procedure DrawRoundRect(rect: PSDL_Rect; BorderColor, FillColor: Longword; Surface: PSDL_Surface; Clear: boolean); var r: TSDL_Rect; diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/uScript.pas --- a/hedgewars/uScript.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/uScript.pas Tue May 17 23:29:49 2016 +0300 @@ -75,14 +75,13 @@ uTypes, uVariables, uCommands, - uUtils, uCaptions, uDebug, uCollisions, uRenderUtils, uTextures, uLandGraphics, - SysUtils, + uUtils, uIO, uVisualGearsList, uGearsHandlersMess, @@ -1210,9 +1209,24 @@ end; function lc_getclancolor(L : Plua_State) : LongInt; Cdecl; +var idx: integer; begin - if CheckLuaParamCount(L, 1, 'GetClanColor', 'clan') then - lua_pushinteger(L, ClansArray[lua_tointeger(L, 1)]^.Color shl 8 or $FF) + if CheckLuaParamCount(L, 1, 'GetClanColor', 'clanIdx') then + begin + idx:= lua_tointeger(L, 1); + if (not lua_isnumber(L, 1)) then + begin + LuaError('Argument ''clanIdx'' must be a number!'); + lua_pushnil(L); + end + else if (idx < 0) or (idx >= ClansCount) then + begin + LuaError('Argument ''clanIdx'' out of range! (There are currently ' + IntToStr(ClansCount) + ' clans, so valid range is: 0-' + IntToStr(ClansCount-1) + ')'); + lua_pushnil(L); + end + else + lua_pushinteger(L, ClansArray[idx]^.Color shl 8 or $FF); + end else lua_pushnil(L); // return value on stack (nil) lc_getclancolor:= 1 @@ -2733,7 +2747,7 @@ ScriptSetInteger('HealthDecrease', cHealthDecrease); ScriptSetInteger('GetAwayTime', cGetAwayTime); ScriptSetString('Map', cMapName); -ScriptSetString('Theme', ''); +ScriptSetString('Theme', Theme); ScriptSetString('Goals', ''); ScriptCall('onGameInit'); diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/uSound.pas --- a/hedgewars/uSound.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/uSound.pas Tue May 17 23:29:49 2016 +0300 @@ -33,7 +33,7 @@ * The channel id can be used to stop a specific sound loop. *) interface -uses SDLh, uConsts, uTypes, SysUtils; +uses SDLh, uConsts, uTypes; procedure preInitModule; procedure initModule; @@ -110,7 +110,7 @@ var Volume: LongInt; SoundTimerTicks: Longword; implementation -uses uVariables, uConsole, uCommands, uDebug, uPhysFSLayer; +uses uVariables, uConsole, uCommands, uChat, uUtils, uDebug, uPhysFSLayer; const chanTPU = 32; var cInitVolume: LongInt; @@ -252,7 +252,10 @@ (FileName: 'TARDIS.ogg'; Path: ptSounds),// sndTardis (FileName: 'frozen_hog_impact.ogg'; Path: ptSounds),// sndFrozenHogImpact (FileName: 'ice_beam.ogg'; Path: ptSounds),// sndIceBeam - (FileName: 'hog_freeze.ogg'; Path: ptSounds) // sndHogFreeze + (FileName: 'hog_freeze.ogg'; Path: ptSounds),// sndHogFreeze + (FileName: 'airmine_impact.ogg'; Path: ptSounds),// sndAirMineImpact + (FileName: 'knife_impact.ogg'; Path: ptSounds),// sndKnifeImpact + (FileName: 'extratime.ogg'; Path: ptSounds) // sndExtraTime ); @@ -578,6 +581,20 @@ SDLCheck(Mus <> nil, 'Mix_LoadMUS_RW', false); WriteLnToConsole(msgOK); + // display music credits + s:= s + '_credits.txt'; + + // if per-file credits not found check general music credits file + if pfsExists(s) then + s:= read1stLn(s) + else if SuddenDeath and (SDMusicFN <> '') then + s:= readValueFromINI(SDMusicFN, '/Music/credits.txt') + else + s:= readValueFromINI(MusicFN, '/Music/credits.txt'); + + if Length(s) > 0 then + AddChatString(char(#10) + '© Music: ' + s); + SDLCheck(Mix_FadeInMusic(Mus, -1, 3000) <> -1, 'Mix_FadeInMusic', false) end; diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/uStore.pas --- a/hedgewars/uStore.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/uStore.pas Tue May 17 23:29:49 2016 +0300 @@ -578,7 +578,7 @@ procedure RenderHealth(var Hedgehog: THedgehog); var s: shortstring; begin -str(Hedgehog.Gear^.Health, s); +s:= IntToStr(Hedgehog.Gear^.Health); FreeAndNilTexture(Hedgehog.HealthTagTex); Hedgehog.HealthTagTex:= RenderStringTex(ansistring(s), Hedgehog.Team^.Clan^.Color, fnt16) end; diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/uTeams.pas --- a/hedgewars/uTeams.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/uTeams.pas Tue May 17 23:29:49 2016 +0300 @@ -396,6 +396,9 @@ inc(TeamsNumber) end; +// mirror changes into array for clans to spawn +SpawnClansArray:= ClansArray; + CurrentTeam:= team; AddTeam:= team; end; diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/uTouch.pas --- a/hedgewars/uTouch.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/uTouch.pas Tue May 17 23:29:49 2016 +0300 @@ -22,7 +22,7 @@ interface -uses SysUtils, uConsole, uVariables, SDLh, uFloat, uConsts, uCommands, GLUnit, uTypes, uCaptions, uAmmos, uWorld; +uses SysUtils, uUtils, uConsole, uVariables, SDLh, uFloat, uConsts, uCommands, GLUnit, uTypes, uCaptions, uAmmos, uWorld; procedure initModule; @@ -358,48 +358,50 @@ var xCursor, yCursor, index : LongInt; begin - //Check array sizes - if length(fingers) < pointerCount then +// check array size +// note: pointerCount will be incremented later, +// so at this point it's the index of the new entry +if Length(fingers) <= pointerCount then begin - setLength(fingers, length(fingers)*2); - for index := length(fingers) div 2 to length(fingers) do - fingers[index].id := nilFingerId; + setLength(fingers, Length(fingers)*2); + for index := Length(fingers) div 2 to (Length(fingers)-1) do + fingers[index].id := nilFingerId; end; - xCursor := convertToCursorX(x); - yCursor := convertToCursorY(y); +xCursor := convertToCursorX(x); +yCursor := convertToCursorY(y); - //on removing fingers, all fingers are moved to the left - //with dynamic arrays being zero based, the new position of the finger is the old pointerCount - fingers[pointerCount].id := id; - fingers[pointerCount].historicalX := xCursor; - fingers[pointerCount].historicalY := yCursor; - fingers[pointerCount].x := xCursor; - fingers[pointerCount].y := yCursor; - fingers[pointerCount].dx := 0; - fingers[pointerCount].dy := 0; - fingers[pointerCount].timeSinceDown:= RealTicks; - fingers[pointerCount].pressedWidget:= nil; +//on removing fingers, all fingers are moved to the left +//with dynamic arrays being zero based, the new position of the finger is the old pointerCount +fingers[pointerCount].id := id; +fingers[pointerCount].historicalX := xCursor; +fingers[pointerCount].historicalY := yCursor; +fingers[pointerCount].x := xCursor; +fingers[pointerCount].y := yCursor; +fingers[pointerCount].dx := 0; +fingers[pointerCount].dy := 0; +fingers[pointerCount].timeSinceDown:= RealTicks; +fingers[pointerCount].pressedWidget:= nil; - addFinger:= @fingers[pointerCount]; - inc(pointerCount); +addFinger:= @fingers[pointerCount]; +inc(pointerCount); end; function updateFinger(x, y, dx, dy: Longword; id: TSDL_FingerId): PTouch_Data; var finger : PTouch_Data; begin - finger:= findFinger(id); +finger:= findFinger(id); - if finger <> nil then - begin - finger^.x:= convertToCursorX(x); - finger^.y:= convertToCursorY(y); - finger^.dx:= dx; - finger^.dy:= dy; - end - else - WriteLnToConsole('finger ' + inttostr(id) + ' not found'); - updateFinger:= finger +if finger <> nil then + begin + finger^.x:= convertToCursorX(x); + finger^.y:= convertToCursorY(y); + finger^.dx:= dx; + finger^.dy:= dy; + end +else + WriteLnToConsole('finger ' + inttostr(id) + ' not found'); +updateFinger:= finger end; procedure deleteFinger(id: TSDL_FingerId); @@ -407,28 +409,28 @@ index : Longword; begin - dec(pointerCount); - for index := 0 to pointerCount do +dec(pointerCount); +for index := 0 to pointerCount do begin - if fingers[index].id = id then + if fingers[index].id = id then begin + //put the last finger into the spot of the finger to be removed, + //so that all fingers are packed to the far left + if pointerCount <> index then + begin + fingers[index].id := fingers[pointerCount].id; + fingers[index].x := fingers[pointerCount].x; + fingers[index].y := fingers[pointerCount].y; + fingers[index].historicalX := fingers[pointerCount].historicalX; + fingers[index].historicalY := fingers[pointerCount].historicalY; + fingers[index].timeSinceDown := fingers[pointerCount].timeSinceDown; + fingers[index].pressedWidget := fingers[pointerCount].pressedWidget; - //put the last finger into the spot of the finger to be removed, - //so that all fingers are packed to the far left - if pointerCount <> index then - begin - fingers[index].id := fingers[pointerCount].id; - fingers[index].x := fingers[pointerCount].x; - fingers[index].y := fingers[pointerCount].y; - fingers[index].historicalX := fingers[pointerCount].historicalX; - fingers[index].historicalY := fingers[pointerCount].historicalY; - fingers[index].timeSinceDown := fingers[pointerCount].timeSinceDown; - fingers[index].pressedWidget := fingers[pointerCount].pressedWidget; - - fingers[pointerCount].id := 0; + fingers[pointerCount].id := nilFingerId; end - else fingers[index].id := 0; - break; + else + fingers[index].id := nilFingerId; + break; end; end; @@ -513,7 +515,7 @@ var index: LongWord; begin - for index:= 0 to length(fingers) do + for index:= 0 to (Length(fingers)-1) do if fingers[index].id = id then begin findFinger:= @fingers[index]; @@ -641,8 +643,8 @@ pointerCount:= 0; setLength(fingers, 4); - for index := 0 to length(fingers) do - fingers[index].id := 0; + for index := 0 to (Length(fingers)-1) do + fingers[index].id := nilFingerId; rectSize:= baseRectSize; halfRectSize:= baseRectSize shr 1; diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/uTypes.pas --- a/hedgewars/uTypes.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/uTypes.pas Tue May 17 23:29:49 2016 +0300 @@ -145,7 +145,7 @@ sndPiano0, sndPiano1, sndPiano2, sndPiano3, sndPiano4, sndPiano5, sndPiano6, sndPiano7, sndPiano8, sndSkip, sndSineGun, sndOoff1, sndOoff2, sndOoff3, sndWhack, sndComeonthen, sndParachute, sndBump, sndResurrector, sndPlane, sndTardis, sndFrozenHogImpact, - sndIceBeam, sndHogFreeze + sndIceBeam, sndHogFreeze, sndAirMineImpact, sndKnifeImpact, sndExtraTime ); // Available ammo types to be used by hedgehogs @@ -180,7 +180,7 @@ TStereoMode = (smNone, smRedCyan, smCyanRed, smRedBlue, smBlueRed, smRedGreen, smGreenRed, smHorizontal, smVertical); TWorldEdge = (weNone, weWrap, weBounce, weSea, weSky); TUIDisplay = (uiAll, uiNoTeams, uiNone); - TMapGen = (mgRandom, mgMaze, mgPerlin, mgDrawn); + TMapGen = (mgRandom, mgMaze, mgPerlin, mgDrawn, mgForts); THHFont = record @@ -532,6 +532,8 @@ PCakeData = ^TCakeData; + TClansArray = array[0..Pred(cMaxTeams)] of PClan; + implementation end. diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/uUtils.pas --- a/hedgewars/uUtils.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/uUtils.pas Tue May 17 23:29:49 2016 +0300 @@ -23,10 +23,16 @@ interface uses uTypes, uFloat; +// returns s with whitespaces (chars <= #32) removed form both ends +function Trim(s: shortstring) : shortstring; + procedure SplitBySpace(var a, b: shortstring); procedure SplitByChar(var a, b: shortstring; c: char); procedure SplitByCharA(var a, b: ansistring; c: char); +function ExtractFileDir(s: shortstring) : shortstring; +function ExtractFileName(s: shortstring) : shortstring; + function EnumToStr(const en : TGearType) : shortstring; overload; function EnumToStr(const en : TVisualGearType) : shortstring; overload; function EnumToStr(const en : TSound) : shortstring; overload; @@ -70,6 +76,9 @@ function GetLaunchX(at: TAmmoType; dir: LongInt; angle: LongInt): LongInt; function GetLaunchY(at: TAmmoType; angle: LongInt): LongInt; +function read1stLn(filePath: shortstring): shortstring; +function readValueFromINI(key, filePath: shortstring): shortstring; + {$IFNDEF PAS2C} procedure Write(var f: textfile; s: shortstring); procedure WriteLn(var f: textfile; s: shortstring); @@ -95,7 +104,7 @@ implementation -uses {$IFNDEF PAS2C}typinfo, {$ENDIF}Math, uConsts, uVariables, SysUtils, uPhysFSLayer; +uses {$IFNDEF PAS2C}typinfo, {$ENDIF}Math, uConsts, uVariables, uPhysFSLayer, uDebug; {$IFDEF DEBUGFILE} var logFile: PFSFile; @@ -105,6 +114,100 @@ {$ENDIF} var CharArray: array[0..255] of Char; +// All leading/tailing characters with ordinal values less than or equal to 32 (a space) are stripped. +function Trim(s: shortstring) : shortstring; +var len, left, right: integer; +begin + +len:= Length(s); + +if len = 0 then + exit(s); + +// find first non-whitespace +left:= 1; +while left <= len do + begin + if s[left] > #32 then + break; + inc(left); + end; + +// find last non-whitespace +right:= len; +while right >= 1 do + begin + if s[right] > #32 then + break; + dec(right); + end; + +// string is whitespace only +if left > right then + exit(''); + +// get string without surrounding whitespace +len:= right - left + 1; + +Trim:= copy(s, left, len); + +end; + +function GetLastSlashPos(var s: shortString) : integer; +var lslash: integer; + c: char; +begin + +// find last slash +lslash:= Length(s); +while lslash >= 1 do + begin + c:= s[lslash]; + if (c = #47) or (c = #92) then + break; + dec(lslash); end; + +GetLastSlashPos:= lslash; +end; + +function ExtractFileDir(s: shortstring) : shortstring; +var lslash: byte; +begin + +if Length(s) = 0 then + exit(s); + +lslash:= GetLastSlashPos(s); + +if lslash <= 1 then + exit(''); + +s[0]:= char(lslash - 1); + +ExtractFileDir:= s; +end; + +function ExtractFileName(s: shortstring) : shortstring; +var lslash, len: byte; +begin + +len:= Length(s); + +if len = 0 then + exit(s); + +lslash:= GetLastSlashPos(s); + +if lslash < 1 then + exit(s); + +if lslash = len then + exit(''); + +len:= len - lslash; +ExtractFilename:= copy(s, lslash + 1, len); +end; + procedure SplitBySpace(var a,b: shortstring); begin SplitByChar(a,b,' '); @@ -352,7 +455,10 @@ {$IFDEF USE_VIDEO_RECORDING} EnterCriticalSection(logMutex); {$ENDIF} -pfsWriteLn(logFile, inttostr(GameTicks) + ': ' + s); +if logFile <> nil then + pfsWriteLn(logFile, inttostr(GameTicks) + ': ' + s) +else + WriteLn(stdout, inttostr(GameTicks) + ': ' + s); {$IFDEF USE_VIDEO_RECORDING} LeaveCriticalSection(logMutex); @@ -508,6 +614,51 @@ sanitizeCharForLog:= r end; +function read1stLn(filePath: shortstring): shortstring; +var f: pfsFile; +begin + read1stLn:= ''; + if pfsExists(filePath) then + begin + f:= pfsOpenRead(filePath); + if (not pfsEOF(f)) and allOK then + pfsReadLn(f, read1stLn); + pfsClose(f); + f:= nil; + end; +end; + +function readValueFromINI(key, filePath: shortstring): shortstring; +var f: pfsFile; + s: shortstring; + i: LongInt; +begin + s:= ''; + readValueFromINI:= ''; + + if pfsExists(filePath) then + begin + f:= pfsOpenRead(filePath); + + while (not pfsEOF(f)) and allOK do + begin pfsReadLn(f, s); + if Length(s) = 0 then + continue; + if s[1] = ';' then + continue; + + i:= Pos('=', s); + if Trim(Copy(s, 1, Pred(i))) = key then + begin + Delete(s, 1, i); + readValueFromINI:= s; + end; + end; + pfsClose(f); + f:= nil; + end; +end; + procedure initModule(isNotPreview: boolean); {$IFDEF DEBUGFILE} var logfileBase: shortstring; @@ -535,6 +686,8 @@ {$IFDEF USE_VIDEO_RECORDING} InitCriticalSection(logMutex); {$ENDIF} + if not pfsExists('/Logs') then + pfsMakeDir('/Logs'); // if log is locked, write to the next one i:= 0; while(i < 7) do @@ -544,6 +697,9 @@ break; inc(i) end; + + if logFile = nil then + WriteLn(stdout, '[WARNING] Could not open log file for writing. Log will be written to stdout!'); {$ENDIF} //mobile stuff diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/uVariables.pas --- a/hedgewars/uVariables.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/uVariables.pas Tue May 17 23:29:49 2016 +0300 @@ -23,6 +23,8 @@ uses SDLh, uTypes, uFloat, GLunit, uConsts, Math, uUtils{$IFDEF GL2}, uMatrix{$ENDIF}; +procedure initScreenSpaceVars(); + var /////// init flags /////// cMinScreenWidth : LongInt; @@ -2388,7 +2390,7 @@ CurrentHedgehog: PHedgehog; TeamsArray: array[0..Pred(cMaxTeams)] of PTeam; TeamsCount: Longword; - ClansArray: array[0..Pred(cMaxTeams)] of PClan; + ClansArray, SpawnClansArray: TClansArray; ClansCount: Longword; LocalClan: LongInt; // last non-bot, non-extdriven clan LocalTeam: LongInt; // last non-bot, non-extdriven clan first team @@ -2509,6 +2511,14 @@ cTagsMask:= htTeamName or htName or htHealth; end; +procedure initScreenSpaceVars(); +begin + // those values still are not perfect + cLeftScreenBorder:= round(-cMinZoomLevel * cScreenWidth); + cRightScreenBorder:= round(cMinZoomLevel * cScreenWidth + LAND_WIDTH); + cScreenSpace:= cRightScreenBorder - cLeftScreenBorder; +end; + procedure initModule; var s: shortstring; i: integer; @@ -2689,10 +2699,7 @@ CinematicBarH := 0; CinematicScript := false; - // those values still are not perfect - cLeftScreenBorder:= round(-cMinZoomLevel * cScreenWidth); - cRightScreenBorder:= round(cMinZoomLevel * cScreenWidth + LAND_WIDTH); - cScreenSpace:= cRightScreenBorder - cLeftScreenBorder; + initScreenSpaceVars(); dirtyLandTexCount:= 0; @@ -2766,6 +2773,8 @@ ClansArray[i]:= nil; end; + SpawnClansArray:= ClansArray; + for i:= Low(TeamsArray) to High(TeamsArray) do begin TeamsArray[i]:= nil; diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/uVideoRec.pas --- a/hedgewars/uVideoRec.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/uVideoRec.pas Tue May 17 23:29:49 2016 +0300 @@ -48,7 +48,7 @@ procedure freeModule; implementation -uses uVariables, uUtils, GLunit, SDLh, SysUtils, uIO, uMisc, uTypes, uDebug; +uses uVariables, GLunit, SDLh, SysUtils, uUtils, uIO, uMisc, uTypes, uDebug; type TAddFileLogRaw = procedure (s: pchar); cdecl; const AvwrapperLibName = 'libavwrapper'; diff -r 8c71c5a1172f -r a69124eb7ce7 hedgewars/uVisualGearsHandlers.pas --- a/hedgewars/uVisualGearsHandlers.pas Tue May 17 23:18:08 2016 +0300 +++ b/hedgewars/uVisualGearsHandlers.pas Tue May 17 23:29:49 2016 +0300 @@ -75,14 +75,19 @@ procedure initModule; implementation -uses uCollisions, uVariables, Math, uConsts, uVisualGearsList, uFloat, uSound, uRenderUtils, uWorld; +uses uCollisions, uVariables, Math, uConsts, uVisualGearsList, uFloat, uSound, uRenderUtils, uWorld, uUtils; procedure doStepFlake(Gear: PVisualGear; Steps: Longword); var sign: real; moved: boolean; vfc, vft: LongWord; begin -if vobCount = 0 then exit; +if SuddenDeathDmg then + begin + if (vobSDCount = 0) then exit; + end +else + if (vobCount = 0) then exit; sign:= 1; with Gear^ do @@ -692,9 +697,8 @@ procedure doStepHealthTag(Gear: PVisualGear; Steps: Longword); var s: shortstring; begin -s:= ''; +s:= IntToStr(Gear^.State); -str(Gear^.State, s); if Gear^.Hedgehog <> nil then Gear^.Tex:= RenderStringTex(ansistring(s), Gear^.Hedgehog^.Team^.Clan^.Color, fnt16) else diff -r 8c71c5a1172f -r a69124eb7ce7 project_files/HedgewarsMobile/Classes/PascalImports.h --- a/project_files/HedgewarsMobile/Classes/PascalImports.h Tue May 17 23:18:08 2016 +0300 +++ b/project_files/HedgewarsMobile/Classes/PascalImports.h Tue May 17 23:29:49 2016 +0300 @@ -29,7 +29,7 @@ */ void RunEngine(const int argc, const char *argv[]); - void LoadLocaleWrapper(const char *filepath, const char *filename); + void LoadLocaleWrapper(const char *filepath, const char *userpath, const char *filename); void HW_versionInfo(int *protoNum, char **versionStr); void *HW_getSDLWindow(void); diff -r 8c71c5a1172f -r a69124eb7ce7 project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m --- a/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m Tue May 17 23:18:08 2016 +0300 +++ b/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m Tue May 17 23:29:49 2016 +0300 @@ -39,7 +39,7 @@ self.trPath = [NSString stringWithFormat:@"%@", LOCALE_DIRECTORY()]; self.trFileName = [NSString stringWithFormat:@"%@.txt", [HWUtils languageID]]; // fill the data structure that we are going to read - LoadLocaleWrapper([self.trPath UTF8String], [self.trFileName UTF8String]); + LoadLocaleWrapper([self.trPath UTF8String], [DOCUMENTS_FOLDER() UTF8String], [self.trFileName UTF8String]); quantity = (char *)malloc(sizeof(char)*(HW_getNumberOfWeapons()+1)); probability = (char *)malloc(sizeof(char)*(HW_getNumberOfWeapons()+1)); diff -r 8c71c5a1172f -r a69124eb7ce7 project_files/hwc/CMakeLists.txt --- a/project_files/hwc/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/project_files/hwc/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -32,15 +32,15 @@ #get the list of pas files that are going to be converted and compiled file(GLOB engine_sources_pas "${CMAKE_SOURCE_DIR}/hedgewars/*.pas") -#TODO: temporary until cmake can configure itself accordingly -list(REMOVE_ITEM engine_sources_pas "${CMAKE_SOURCE_DIR}/hedgewars/uWeb.pas") list(REMOVE_ITEM engine_sources_pas "${CMAKE_SOURCE_DIR}/hedgewars/uVideoRec.pas") list(REMOVE_ITEM engine_sources_pas "${CMAKE_SOURCE_DIR}/hedgewars/uTouch.pas") list(REMOVE_ITEM engine_sources_pas "${CMAKE_SOURCE_DIR}/hedgewars/PNGh.pas") list(REMOVE_ITEM engine_sources_pas "${CMAKE_SOURCE_DIR}/hedgewars/pas2cSystem.pas") list(REMOVE_ITEM engine_sources_pas "${CMAKE_SOURCE_DIR}/hedgewars/pas2cRedo.pas") list(REMOVE_ITEM engine_sources_pas "${CMAKE_SOURCE_DIR}/hedgewars/hwLibrary.pas") -list(REMOVE_ITEM engine_sources_pas "${CMAKE_SOURCE_DIR}/hedgewars/uMatrix.pas") +if(NOT GL2) + list(REMOVE_ITEM engine_sources_pas "${CMAKE_SOURCE_DIR}/hedgewars/uMatrix.pas") +endif() #remove and readd hwengine so that it is compiled first, compiling every other file in the process list(REMOVE_ITEM engine_sources_pas ${CMAKE_SOURCE_DIR}/hedgewars/hwengine.pas) @@ -64,7 +64,13 @@ -d ENDIAN_LITTLE -d DEBUGFILE) if(BUILD_ENGINE_JS) - set(pas2c_args ${pas2c_args} -d WEBGL -d HWLIBRARY) + set(pas2c_args ${pas2c_args} -d WEBGL) +endif() +if(BUILD_ENGINE_LIBRARY) + set(pas2c_args ${pas2c_args} -d HWLIBRARY) +endif() +if(GL2) + set(pas2c_args ${pas2c_args} -d GL2) endif() #invoke pas2c on main module, it will call all the others @@ -80,7 +86,7 @@ if(BUILD_ENGINE_JS) - add_flag_append(CMAKE_C_FLAGS "-s ABORTING_MALLOC=0") + add_flag_append(CMAKE_C_FLAGS "--memory-init-file 0 -O0 --js-opts 0 -g4 --use-preload-plugins -s ASSERTIONS=2 -s USE_SDL=2 -s USE_SDL_IMAGE=1 -s USE_LIBPNG=1 -s USE_SDL_TTF=2 -s USE_VORBIS=1 -s USE_OGG=1 -s TOTAL_MEMORY=100000000 -s GL_UNSAFE_OPTS=0 -s EXPORTED_FUNCTIONS=\"['_hwengine_RunEngine', '_hwengine_MainLoop']\" --post-js ${CMAKE_SOURCE_DIR}/project_files/web/post.js --pre-js ${CMAKE_SOURCE_DIR}/project_files/web/pre.js") endif() #compile the c files diff -r 8c71c5a1172f -r a69124eb7ce7 project_files/hwc/rtl/GL.h --- a/project_files/hwc/rtl/GL.h Tue May 17 23:18:08 2016 +0300 +++ b/project_files/hwc/rtl/GL.h Tue May 17 23:29:49 2016 +0300 @@ -1,8 +1,37 @@ #pragma once -#ifdef __APPLE__ +#if defined(__APPLE__) && !defined(EMSCRIPTEN) #include #else #include "GL/gl.h" #endif +/* emscripten cannot find these functions */ +#ifdef EMSCRIPTEN +void glGetProgramInfoLog(GLuint program, GLsizei maxLength, GLsizei *length, GLchar *infoLog); +void glLinkProgram(GLuint program); +void glUniform1i(GLint location, GLint v0); +GLuint glCreateProgram(void); +void glUseProgram(GLuint program); +void glDeleteProgram(GLuint program); +void glGetProgramiv(GLuint program, GLenum pname, GLint *params); +void glDeleteShader(GLuint shader); +void glBindAttribLocation(GLuint program, GLuint index, const GLchar *name); +void glAttachShader(GLuint program, GLuint shader); +void glBindBuffer(GLenum target, GLuint buffer); +void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glEnableVertexAttribArray(GLuint index); +void glDisableVertexAttribArray(GLuint index); +void glGenBuffers(GLsizei n, GLuint * buffers); +void glDeleteBuffers(GLsizei n, const GLuint * buffers); +void glUniform4fv(GLint location, GLsizei count, const GLfloat *value); +void glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * pointer); +void glBufferData(GLenum target, GLsizeiptr size, const GLvoid * data, GLenum usage); +void glUniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GLint glGetUniformLocation(GLuint program, const GLchar *name); +void glGetShaderInfoLog(GLuint shader, GLsizei maxLength, GLsizei *length, GLchar *infoLog); +void glGetShaderiv(GLuint shader, GLenum pname, GLint *params); +GLuint glCreateShader(GLenum shaderType); +void glCompileShader(GLuint shader); +void glShaderSource(GLuint shader, GLsizei count,/* const dropped for pas2c compat */ GLchar **string, const GLint *length); +#endif diff -r 8c71c5a1172f -r a69124eb7ce7 project_files/web/post.js diff -r 8c71c5a1172f -r a69124eb7ce7 project_files/web/pre.js diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Locale/en.txt --- a/share/hedgewars/Data/Locale/en.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Locale/en.txt Tue May 17 23:29:49 2016 +0300 @@ -424,7 +424,7 @@ 03:22=Call me Indiana! 03:23=(Really) Martial Arts 03:24=The cake is NOT a lie! -03:25=Costume kit +03:25=Attractive weapon 03:26=Juicy grenade 03:27=Fiery grenade 03:28=Ballistic weapon @@ -487,7 +487,7 @@ 04:22=Not just for Indiana Jones! The whip is a|useful weapon in many situations. Especially|when you'd like to shove someone off a cliff.|Attack: Strike everything in front of you 04:23=If you have nothing to lose, this might be|quite handy. Sacrifice your hog by launching|it into a specific direction hurting everything|on his way and exploding at the end.|Attack: Launch the devastating and deadly attack 04:24=Happy Birthday! Launch this cake, let it walk right|next to your enemies and let them have an explosive|party. The cake is able to pass almost all terrain|but he might detonate earlier this way.|Attack: Start the cake or let it stop and explode -04:25=Use this disguise kit to get your enemies to jump|towards your hog (and into some gap or hole).|Attack: Use the kit and try to seduce another hog +04:25=With this costume kit your hog becomes irresistibly|attractive and makes nearby hogs jump in blind love|towards it (and into some gap or hole). The seduction is|so heartwarming, it even breaks the ice of frozen hogs.|Attack: Use the irresistable seduction 04:26=Throw this juicy (and bouncy) watermelon at|your enemies. Once the timer expires, it will|split into several explosive pieces.|1-5: Set watermelon's timer|Attack: Hold to shoot with more power 04:27=Let hellfire rain onto your opponents by using|this fiendish explosive. Don't get too close to|the explosion as smaller fires might last longer.|Attack: Hold to shoot with more power 04:28=Short time after launching this rocket, it will|start drilling through solid ground and explode|once its fuse is triggered or it resurfaces again.|Attack: Hold to shoot with more power diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Locale/hedgewars_ar.ts --- a/share/hedgewars/Data/Locale/hedgewars_ar.ts Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_ar.ts Tue May 17 23:29:49 2016 +0300 @@ -1,6 +1,6 @@ - + About @@ -612,6 +612,10 @@ Style: + + Forts + + HWNetServersModel @@ -1406,7 +1410,7 @@ Teams will start on opposite sides of the terrain, two team colours max! - الفرق تبدا في مكانين متقابلين. فريقان الحد الاقصى + الفرق تبدا في مكانين متقابلين. فريقان الحد الاقصى Land can not be destroyed! @@ -1536,6 +1540,10 @@ Sea (Edges connect to sea) + + Each clan starts in its own part of the terrain. + + PageSelectWeapon @@ -2644,6 +2652,10 @@ Random Perlin + + Forts + + SeedPrompt diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Locale/hedgewars_bg.ts --- a/share/hedgewars/Data/Locale/hedgewars_bg.ts Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_bg.ts Tue May 17 23:29:49 2016 +0300 @@ -1,6 +1,6 @@ - + About @@ -615,6 +615,10 @@ Style: + + Forts + + HWNetServersModel @@ -1424,10 +1428,6 @@ - Teams will start on opposite sides of the terrain, two team colours max! - - - Land can not be destroyed! @@ -1555,6 +1555,10 @@ Sea (Edges connect to sea) + + Each clan starts in its own part of the terrain. + + PageSelectWeapon @@ -2680,6 +2684,10 @@ Random Perlin + + Forts + + SeedPrompt diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Locale/hedgewars_cs.ts --- a/share/hedgewars/Data/Locale/hedgewars_cs.ts Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_cs.ts Tue May 17 23:29:49 2016 +0300 @@ -1,6 +1,6 @@ - + About @@ -621,6 +621,10 @@ Style: + + Forts + + HWNetServersModel @@ -1448,7 +1452,7 @@ Teams will start on opposite sides of the terrain, two team colours max! - Týmy startují na opačných stranách terénu, dvě barvy týmů maximálně! + Týmy startují na opačných stranách terénu, dvě barvy týmů maximálně! Land can not be destroyed! @@ -1570,6 +1574,10 @@ Sea (Edges connect to sea) + + Each clan starts in its own part of the terrain. + + PageSelectWeapon @@ -2697,6 +2705,10 @@ Random Perlin + + Forts + + SeedPrompt diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Locale/hedgewars_da.ts --- a/share/hedgewars/Data/Locale/hedgewars_da.ts Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_da.ts Tue May 17 23:29:49 2016 +0300 @@ -1,6 +1,6 @@ - + About @@ -619,6 +619,10 @@ Style: + + Forts + + HWNetServersModel @@ -1429,7 +1433,7 @@ Teams will start on opposite sides of the terrain, two team colours max! - Hold starter på hver sin side af banen. Maksimalt to holdfarver! + Hold starter på hver sin side af banen. Maksimalt to holdfarver! Land can not be destroyed! @@ -1559,6 +1563,10 @@ Sea (Edges connect to sea) + + Each clan starts in its own part of the terrain. + + PageSelectWeapon @@ -2688,6 +2696,10 @@ Random Perlin + + Forts + + SeedPrompt diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Locale/hedgewars_de.ts --- a/share/hedgewars/Data/Locale/hedgewars_de.ts Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_de.ts Tue May 17 23:29:49 2016 +0300 @@ -1,6 +1,6 @@ - + About @@ -119,17 +119,17 @@ Feedback - + View Ansehen - + Cancel Abbrechen - + Send Feedback Feedback senden @@ -138,7 +138,7 @@ Bitte gib uns Feedback! - + We are always happy about suggestions, ideas, or bug reports. Wir freuen uns immer über Vorschläge, Ideen oder Fehlerberichte. @@ -151,17 +151,17 @@ Deine E-Mail-Adresse ist optional, aber wir könnten sie brauchen, um dich zu kontaktieren. - + Send us feedback! Schicke uns dein Feedback! - + If you found a bug, you can see if it's already been reported here: Falls du einen Fehler gefunden hast, kannst du hier sehen, ob er bereits bekannt is (auf Englisch): - + Your email address is optional, but necessary if you want us to get back at you. Deine E-Mail-Adresse ist optional, es sei denn du möchtest, dass wir dir antworten. @@ -185,12 +185,12 @@ GameCFGWidget - + Edit weapons Arsenal bearbeiten - + Edit schemes Spielprofil bearbeiten @@ -199,7 +199,7 @@ Spieloptionen - + Game scheme will auto-select a weapon Das Auswählen eines Spielprofils wird automatisch ein Arsenal auswählen @@ -363,52 +363,52 @@ HWChatWidget - + %1 has been removed from your ignore list %1 wurde aus deiner Ignorierliste entfernt - + %1 has been added to your ignore list %1 wurde in deine Ignorierliste aufgenommen - + %1 has been removed from your friends list %1 wurde aus deiner Freundesliste entfernt - + %1 has been added to your friends list %1 wurde in deine Freundesliste aufgenommen - + Stylesheet imported from %1 Stylesheet aus %1 importiert - + Enter %1 if you want to use the current StyleSheet in future, enter %2 to reset! Gib %1 ein, wenn du das jetzige Stylesheet in Zukunft weiterverwenden willst; gib %2 ein, um es zurückzusetzen! - + Couldn't read %1 Konnte %1 nicht lesen - + StyleSheet discarded Stylesheet verworfen - + StyleSheet saved to %1 Stylesheet wurde nach %1 gesichert - + Failed to save StyleSheet to %1 Stylesheet konnte nicht nach %1 gesichert werden @@ -629,47 +629,47 @@ HWMapContainer - + All Alles - - Small - Klein - - - Medium - Mittel + Small + Klein - Large - Groß + Medium + Mittel - Cavern - Höhle + Large + Groß + Cavern + Höhle + + + Wacky Verrückt - - Small tunnels - Kleine Tunnel - - + Small tunnels + Kleine Tunnel + + + Medium tunnels Mittelgroße Tunnel - + Seed Seed @@ -704,59 +704,64 @@ Zufallslabyrinth - + + Forts + + + + Random Zufall - + Map preview: Kartenvorschau: - + Load map drawing Gezeichnete Karte laden - + Edit map drawing Gezeichnete Karte bearbeiten - + Small islands Kleine Inseln - - Medium islands - Mittelgroße Inseln - - + Medium islands + Mittelgroße Inseln + + + Large islands Große Inseln - + Map size: Kartengröße: - + Maze style: Labyrinth-Art: - - Mission: - Mission: - - + Mission: + Mission: + + + Map: Karte: @@ -765,28 +770,28 @@ Thema: - + Load drawn map Gezeichnete Karte laden - + Drawn Maps Gezeichnete Karten - + All files Alle Dateien - + Large tunnels Große Tunnel - - + + Theme: %1 Szenerie: %1 @@ -796,7 +801,7 @@ Perlinzufall - + Style: Stil: @@ -1494,52 +1499,52 @@ PageOptions - + New team Neues Team - + Edit team Team bearbeiten - + Delete team Team löschen - + You can't edit teams from team selection. Go back to main menu to add, edit or delete teams. Du kannst keine Teams bei der Team-Auswahl ändern. Gehe zum Hauptmenü zurück, um Teams hinzuzufügen, zu editieren oder zu löschen. - + New scheme Neues Spielprofil - + Edit scheme Spielprofil bearbeiten - + Delete scheme Spielprofil löschen - + New weapon set Neues Arsenal - + Edit weapon set Arsenal bearbeiten - + Delete weapon set Arsenal löschen @@ -1549,47 +1554,47 @@ Erweitert - + Reset to default colors Auf Standard-Farben zurücksetzen - + Proxy host Host - + Proxy port Port - + Proxy login Benutzername - + Proxy password Passwort - + No proxy Kein Proxy - + Socks5 proxy Socks5-Proxy - + HTTP proxy HTTP-Proxy - + System proxy settings System-Proxy-Einstellungen @@ -1610,7 +1615,7 @@ - + Game Spiel @@ -1645,62 +1650,62 @@ Teams - + Schemes Spielprofile - + Weapons Arsenale - + Frontend Benutzeroberfläche - + Custom colors Benutzerdefinierte Farben - + Game audio Ton im Spiel - + Frontend audio Ton in der Benutzeroberfläche - + Account Benutzerkonto - + Proxy settings Proxy-Einstellungen - + Miscellaneous Verschiedenes - + Updates Updates - + Check for updates nach Updates suchen - + Video recording options Videoaufzeichnungseinstellungen @@ -1804,27 +1809,27 @@ Löschen - + Gain 80% of the damage you do back in health 80% des ausgeteilten Schadens werden dir als Gesundheitspunkte gutgeschrieben + + Share your opponents pain, share their damage + Teile den Schmerz deines Gegners, teile seinen verursachten Schaden + + - Share your opponents pain, share their damage - Teile den Schmerz deines Gegners, teile seinen verursachten Schaden - - - Your hogs are unable to move, put your artillery skills to the test Deine Igel können sich nicht bewegen, gib Dein Bestes im Fernkampf + + Random + Zufall + + - Random - Zufall - - - Seconds Sekunden @@ -1834,67 +1839,66 @@ Verteidige deine Festung und zerstöre die des Gegners, maximal zwei Teamfarben! + Teams will start on opposite sides of the terrain, two team colours max! + Die Teams starten auf gegenüberliegenden Terrainseiten, maximal zwei Teamfarben! + + + + Land can not be destroyed! + Die Landschaft ist nicht zerstörbar! + + + + Lower gravity + Verringerte Schwerkraft + + + + Assisted aiming with laser sight + Zielfhilfe durch Laservisier + + + + All hogs have a personal forcefield + Alle Igel haben ein eigenes Schutzschild + + + + Order of play is random instead of in room order. + Gespielt wird in zufälliger Reihenfolge. + + + + Play with a King. If he dies, your side dies. + Beschütze deinen König! Ohne ihn hast du verloren. + + + + Take turns placing your hedgehogs before the start of play. + Platziere deine Igel selbständig vor Rundenbeginn. + + + + Ammo is shared between all teams that share a colour. + Alle Teams mit gleicher Farbe teilen sich den gleichen Waffenvorrat. + + - Teams will start on opposite sides of the terrain, two team colours max! - Die Teams starten auf gegenüberliegenden Terrainseiten, maximal zwei Teamfarben! + Disable girders when generating random maps. + Keine Bauträger auf Zufallskarten platzieren. - Land can not be destroyed! - Die Landschaft ist nicht zerstörbar! - - - - Lower gravity - Verringerte Schwerkraft - - - - Assisted aiming with laser sight - Zielfhilfe durch Laservisier - - - - All hogs have a personal forcefield - Alle Igel haben ein eigenes Schutzschild - - - - Order of play is random instead of in room order. - Gespielt wird in zufälliger Reihenfolge. + Disable land objects when generating random maps. + Keine Landschaftsobjekte beim Generieren von Zufallskarten platzieren. + + + + AI respawns on death. + KI wird wiederbelebt. - Play with a King. If he dies, your side dies. - Beschütze deinen König! Ohne ihn hast du verloren. - - - - Take turns placing your hedgehogs before the start of play. - Platziere deine Igel selbständig vor Rundenbeginn. - - - - Ammo is shared between all teams that share a colour. - Alle Teams mit gleicher Farbe teilen sich den gleichen Waffenvorrat. - - - - Disable girders when generating random maps. - Keine Bauträger auf Zufallskarten platzieren. - - - - Disable land objects when generating random maps. - Keine Landschaftsobjekte beim Generieren von Zufallskarten platzieren. - - - - AI respawns on death. - KI wird wiederbelebt. - - - All (living) hedgehogs are fully restored at the end of turn Alle (lebenden) Igel werden am Ende der Runde vollkommen geheilt @@ -1904,22 +1908,22 @@ Angriffe beenden die Runde nicht. - + Weapons are reset to starting values each turn. Arsenal wird jede Runde zurückgesetzt. - + Each hedgehog has its own ammo. It does not share with the team. Jeder Igel hat sein eigenes Arsenal. Es wird nicht mit dem Team geteilt. - + 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. @@ -1939,27 +1943,32 @@ Dem Spielfeld eine unzerstörbare Randbegrenzung hinzufügen - + Add an indestructible border along the bottom Dem unteren Kartenrand eine unzerstörbare Randbegrenzung anfügen + + Each clan starts in its own part of the terrain. + + + + + None (Default) + Keine (Standard) + + - None (Default) - Keine (Standard) + Wrap (World wraps) + Umbrechen (Welt wiederholt sich) - Wrap (World wraps) - Umbrechen (Welt wiederholt sich) + Bounce (Edges reflect) + Abprallen (Grenzen reflektieren) - Bounce (Edges reflect) - Abprallen (Grenzen reflektieren) - - - Sea (Edges connect to sea) Ozean (Grenzen sind mit dem Wasser verbunden) @@ -1967,22 +1976,22 @@ PageSelectWeapon - + Default Standard + + Delete + Löschen + + + + New + Neu + + - Delete - Löschen - - - - New - Neu - - - Copy Kopieren @@ -2133,23 +2142,23 @@ - + Ignore Ignorieren - + Add friend Als Freund hinzufügen - + Unignore Nicht mehr ignorieren - + Remove friend Als Freund entfernen @@ -2186,38 +2195,38 @@ QCheckBox - + Fullscreen Vollbild - + Show FPS Bildwiederholrate anzeigen - + Alternative damage show Alternativen Schaden anzeigen - + Append date and time to record file name Datum und Uhrzeit an Wiederholungsdateinamen anhängen - + Check for updates at startup Beim Spielstart nach neuen Versionen suchen - + Show ammo menu tooltips Kurzinfos für Waffen anzeigen - + Save password Passwort speichern @@ -2232,89 +2241,89 @@ Video ist privat - + Record audio Audio aufzeichnen - + Use game resolution Spielauflösung verwenden - + Visual effects Visuelle Effekte - - + + Sound Ton - + In-game sound effects Toneffekte im Spiel - - + + Music Musik - + In-game music Musik im Spiel - - Frontend sound effects - Toneffekte in der Benutzeroberfläche - - + Frontend sound effects + Toneffekte in der Benutzeroberfläche + + + Frontend music Musik in der Benutzeroberfläche - - Team - Team - - - - Enable team tags by default - Teambeschriftungsschilder standardmäßig aktivieren - - - - Hog - Igel - - - Enable hedgehog tags by default - Namensschilder standardmäßig aktivieren - - - - Health - Lebenspunkte + Team + Team + + + + Enable team tags by default + Teambeschriftungsschilder standardmäßig aktivieren - Enable health tags by default - Lebenspunktebeschriftungsschilder standardmäßig aktivieren - - - - Translucent - Transluzent + Hog + Igel + + + + Enable hedgehog tags by default + Namensschilder standardmäßig aktivieren + Health + Lebenspunkte + + + + Enable health tags by default + Lebenspunktebeschriftungsschilder standardmäßig aktivieren + + + + Translucent + Transluzent + + + Enable translucent tags by default Transluzente Beschriftungsschilder standardmäßig aktivieren @@ -2332,12 +2341,12 @@ Stufe - + (System default) (Systemstandard) - + Community @@ -2354,77 +2363,77 @@ Im Spiel - + 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 - - + 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 + + + + Red/Cyan grayscale + Rot/Türkis, Graustufen + + - Side-by-side - Nebeneinander + Cyan/Red grayscale + Türkis/Rot, Graustufen - Top-Bottom - Übereinander - - - - 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 @@ -2437,7 +2446,7 @@ Teammitglieder - + Fort Festung @@ -2480,7 +2489,7 @@ QLabel - + Weapons Arsenal @@ -2495,12 +2504,12 @@ Port: - + Resolution Auflösung - + FPS limit Bildwiederholratenbegrenzung (Hz) @@ -2519,57 +2528,57 @@ Version - + Initial sound volume Ausgangslautstärke - + Damage Modifier Prozentualer Schaden - + Turn Time Rundenzeit - + Initial Health Anfangslebenspunkte - + Sudden Death Timeout Runden bis Sudden Death - + Mines Time Minenzündzeit - + Mines Minen - + Air Mines Luftminen - + Scheme Name: Spielprofil: - + Crate Drops Kistenabwurf - + % Dud Mines % Blindgänger @@ -2599,12 +2608,12 @@ Stimme - + Locale Sprache - + Explosives Pulverfässer @@ -2613,37 +2622,37 @@ Tipp: - + Quality Qualität - + % Health Crates % Erste-Hilfe-Koffer - + Health in Crates Lebenspunkte in Erste-Hilfe-Koffern - + Sudden Death Water Rise Steigen des Wassers - + Sudden Death Health Decrease Schaden bei Sudden Death - + % Rope Length % Seillänge - + Stereo rendering Stereo-Rendering @@ -2653,12 +2662,12 @@ Stil - + Scheme Spielprofil - + % Get Away Time % Rückzugszeit @@ -2706,37 +2715,37 @@ Tags (durch Kommas getrennt): - + Description Beschreibung - + Nickname Spitzname - + Format Format - + Audio codec Audio-Codec - + Video codec Video-Codec - + Framerate Bildrate - + Bitrate (Kbps) Bitrate (kB/s) @@ -2746,37 +2755,37 @@ Diese Entwicklungsversion ist unfertig und könnte nicht kompatibel mit anderen Versionen des Spiels sein, wobei sogar einige Funktionen sogar kaputt oder unfertig sein könnten. - + Fullscreen Vollbild - + Fullscreen Resolution Vollbild-Auflösung - + Windowed Resolution Fenster-Auflösung - + Your Email Deine E-Mail-Adresse - + Summary Zusammenfassung - + Send system information Systeminformation senden - + Type the security code: Gib den Sicherheitscode ein: @@ -2797,22 +2806,22 @@ Tipp: %1 - + Displayed tags above hogs and translucent tags Angezeigte/transluzente Beschriftungsschilder über Igel - + This setting will be effective at next restart. Diese Einstellung tritt ab nächstem Neustart in Kraft. - + World Edge Spielfeldgrenze - + Script parameter Skriptparameter @@ -2826,12 +2835,12 @@ - + hedgehog %1 Igel %1 - + anonymous anonym @@ -2852,7 +2861,7 @@ Verbindung zum Server wurde unterbrochen - + Error Fehler @@ -2881,12 +2890,12 @@ - + Teams - Are you sure? Teams - Bist du dir sicher? - + Do you really want to delete the team '%1'? Willst du das Team »%1« wirklich löschen? @@ -2907,14 +2916,14 @@ Server konnte nicht gestartet werden - + Hedgewars - Error Hedgewars – Fehler - + Hedgewars - Success Hedgewars – Erfolg @@ -3068,7 +3077,7 @@ - + File error Dateifehler @@ -3079,12 +3088,12 @@ - + Cannot open '%1' for reading »%1« konnte zum Lesen nicht geöffnet werden - + Cannot use the ammo '%1'! Munition »%1« kann nicht benutzt werden! @@ -3120,23 +3129,23 @@ Hedgewars – Spitzname nicht registriert - + System Information Preview Systeminformations-Vorschau - - + + Failed to generate captcha Captcha-Generierung fehlgeschlagen - + Failed to download captcha Captcha-Download fehlgeschlagen - + Please fill out all fields. Email is optional. Bitte füll alle Felder aus. Das Feld »E-Mail« ist optional. @@ -3175,7 +3184,7 @@ QPushButton - + Go! Los! @@ -3245,7 +3254,7 @@ Laden - + Associate file extensions Dateitypen zuordnen @@ -3255,7 +3264,7 @@ Mehr Info - + Set default options Auf Standardeinstellungen zurücksetzen @@ -3282,7 +3291,7 @@ Hochladen abbrechen - + Restore default coding parameters Standard-Kodierungs-Einstellungen wiederherstellen @@ -3418,6 +3427,11 @@ Handgemalt + + Forts + + + Script Stil @@ -4314,264 +4328,264 @@ server - + Authentication failed Authentifizierung fehlgeschlagen - + 60 seconds cooldown after kick 60 Sekunden Abkühlzeit nach Hinauswurf - + kicked hinausgeworfen - + Ping timeout Ping-Timeout + + bye + tschüss + + - bye - tschüss - - - Your vote counted Deine Stimme zählte - + Pause toggled Pause umgeschaltet - + new seed Neuer Seed - + number of hedgehogs in team Anzahl der Igel im Team - + Empty config entry Leerer Konfigurations-Eintrag + + Corrupted hedgehogs info + Kaputte Igel-Info + + - Corrupted hedgehogs info - Kaputte Igel-Info + too many teams + zu viele Teams - too many teams - zu viele Teams + too many hedgehogs + zu viele Igel - too many hedgehogs - zu viele Igel + There's already a team with same name in the list + Es gibt bereits ein Team mit dem selben Namen in der Liste - There's already a team with same name in the list - Es gibt bereits ein Team mit dem selben Namen in der Liste + round in progress + laufende Runde - round in progress - laufende Runde + restricted + eingeschränkt - restricted - eingeschränkt + REMOVE_TEAM: no such team + REMOVE_TEAM: kein solches Team - REMOVE_TEAM: no such team - REMOVE_TEAM: kein solches Team + Not team owner! + Nicht Team-Besitzer*In! + + + + Less than two clans! + Weniger als zwei Klans! - Not team owner! - Nicht Team-Besitzer*In! - - - - Less than two clans! - Weniger als zwei Klans! + Room with such name already exists + ein Raum mit einem solchen Namen existiert bereits + + + + /maxteams: specify number from 2 to 8 + /maxteams: Zahl zwischen 2 und 8 wählen - Room with such name already exists - ein Raum mit einem solchen Namen existiert bereits + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs + Verfügbare »callvote«-Befehle: kick <Spitzname>, map <Name>, pause, newseed, hedgehogs - /maxteams: specify number from 2 to 8 - /maxteams: Zahl zwischen 2 und 8 wählen + callvote kick: specify nickname + callvote kick: Spitznamen festlegen - Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs - Verfügbare »callvote«-Befehle: kick <Spitzname>, map <Name>, pause, newseed, hedgehogs + callvote kick: no such user + callvote kick: Benutzer existiert nicht - callvote kick: specify nickname - callvote kick: Spitznamen festlegen + callvote map: no such map + callvote map: Karte existiert nicht - callvote kick: no such user - callvote kick: Benutzer existiert nicht + callvote pause: no game in progress + callvote pause: es läuft kein Spiel - callvote map: no such map - callvote map: Karte existiert nicht + callvote hedgehogs: specify number from 1 to 8 + callvote hedgehogs: Zahl zwischen 1 und 8 wählen + + + + Illegal room name + Verbotener Raumname + + + + No such room + Ein solcher Raum existiert nicht + + + + Joining restricted + Zutritt verboten + + + + Registered users only + Nur für registrierte Benutzer + + + + You are banned in this room + Du wurdest aus diesem Raum verbannt + + + + Nickname already chosen + Spitzname bereits gewählt + + + + Illegal nickname + Verbotener Spitzname + + + + Protocol already known + Protokoll bereits bekannt + + + + Bad number + Schlechte Zahl - callvote pause: no game in progress - callvote pause: es läuft kein Spiel - - - - callvote hedgehogs: specify number from 1 to 8 - callvote hedgehogs: Zahl zwischen 1 und 8 wählen - - - - Illegal room name - Verbotener Raumname - - - - No such room - Ein solcher Raum existiert nicht - - - - Joining restricted - Zutritt verboten - - - - Registered users only - Nur für registrierte Benutzer - - - - You are banned in this room - Du wurdest aus diesem Raum verbannt - - - - Nickname already chosen - Spitzname bereits gewählt - - - - Illegal nickname - Verbotener Spitzname - - - - Protocol already known - Protokoll bereits bekannt - - - - Bad number - Schlechte Zahl - - - Nickname is already in use Spitzname bereits in Benutzung + + Restricted + Eingeschränkt + + - Restricted - Eingeschränkt - - - Not room master Nicht Gastgeber + + No checker rights + Keine Rechte zum Benutzen des Inspektionshilfsprogramms + + + + Room version incompatible to your hedgewars version + Die Raumversion ist inkompatibel zu deiner Hedgewars-Version + + + + You already have voted + Du hast bereits deine Stimme abgegeben + + + + Voting closed + Abstimmung abgeschlossen + + + + New voting started + Neue Abstimmung gestartet + + + + Voting expired + Abstimmung abgelaufen + + + + kick + hinauswerfen + + + + map + Karte + + + + pause + pausieren + + + + Reconnected too fast + Zu schnell wieder verbunden + + - No checker rights - Keine Rechte zum Benutzen des Inspektionshilfsprogramms - - - - Room version incompatible to your hedgewars version - Die Raumversion ist inkompatibel zu deiner Hedgewars-Version - - - - You already have voted - Du hast bereits deine Stimme abgegeben - - - - Voting closed - Abstimmung abgeschlossen - - - - New voting started - Neue Abstimmung gestartet - - - - Voting expired - Abstimmung abgelaufen - - - - kick - hinauswerfen - - - - map - Karte - - - - pause - pausieren - - - - Reconnected too fast - Zu schnell wieder verbunden - - - Warning! Chat flood protection activated Nicht jeder weiß, was »Flooding« heißt, daher ist die Übersetzung etwas ausführlicher. Achtung! Chat-Flood-Schutz ist aktiv. Bitte red etwas langsamer. - + Excess flood Nicht jeder weiß, was »Flooding« heißt, daher wird es hier umschrieben. Zu viele Nachrichten in kurzer Zeit abgeschickt - + Game messages flood detected - 1 Zu viele Spielnachrichten in kurzer Zeit ermittelt – 1 @@ -4580,13 +4594,13 @@ Zu viele Spielnachrichten in kurzer Zeit ermittelt – 2 - + Warning! Joins flood protection activated Nicht jeder weiß, was »Flooding« heißt, daher ist die Übersetzung etwas ausführlicher und umschreibend. Achtung! Der Server wird ein zu schnelles Beitreten in kurzer Zeit nicht akzeptieren - + There's no voting going on Zur Zeit findet keine Abstimmung statt diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Locale/hedgewars_el.ts --- a/share/hedgewars/Data/Locale/hedgewars_el.ts Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_el.ts Tue May 17 23:29:49 2016 +0300 @@ -1,6 +1,6 @@ - + About @@ -613,6 +613,10 @@ Style: + + Forts + + HWNetServersModel @@ -1423,7 +1427,7 @@ Teams will start on opposite sides of the terrain, two team colours max! - Οι ομάδες θα ξεκινούν σε αντίθετες μεριές της πίστας, μέγιστο επιτρεπόμενο δυο χρώματα ομάδων! + Οι ομάδες θα ξεκινούν σε αντίθετες μεριές της πίστας, μέγιστο επιτρεπόμενο δυο χρώματα ομάδων! Land can not be destroyed! @@ -1553,6 +1557,10 @@ Sea (Edges connect to sea) + + Each clan starts in its own part of the terrain. + + PageSelectWeapon @@ -2678,6 +2686,10 @@ Random Perlin + + Forts + + SeedPrompt diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Locale/hedgewars_en.ts --- a/share/hedgewars/Data/Locale/hedgewars_en.ts Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_en.ts Tue May 17 23:29:49 2016 +0300 @@ -1,6 +1,6 @@ - + About @@ -138,6 +138,20 @@ + MinesTimeSpinBox + + Random + Random + + + %1 seconds + + %1 second + %1 seconds + + + + GameCFGWidget Edit weapons @@ -611,6 +625,10 @@ Style: + + Forts + + HWNetServersModel @@ -1405,7 +1423,7 @@ Teams will start on opposite sides of the terrain, two team colours max! - Teams will start on opposite sides of the terrain, two team colours max! + Teams will start on opposite sides of the terrain, two team colours max! Land can not be destroyed! @@ -1436,14 +1454,6 @@ Your hogs are unable to move, put your artillery skills to the test - Random - Random - - - Seconds - Seconds - - New New @@ -1535,6 +1545,10 @@ Sea (Edges connect to sea) + + Each clan starts in its own part of the terrain. + + PageSelectWeapon @@ -2644,6 +2658,10 @@ Random Perlin + + Forts + + SeedPrompt diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Locale/hedgewars_es.ts --- a/share/hedgewars/Data/Locale/hedgewars_es.ts Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_es.ts Tue May 17 23:29:49 2016 +0300 @@ -1,6 +1,6 @@ - + About @@ -619,6 +619,10 @@ Style: + + Forts + + HWNetServersModel @@ -1457,7 +1461,7 @@ Teams will start on opposite sides of the terrain, two team colours max! - Los equipos comenzarán en lados opuestos del terreno. ¡2 facciones como máximo! + Los equipos comenzarán en lados opuestos del terreno. ¡2 facciones como máximo! Land can not be destroyed! @@ -1559,6 +1563,10 @@ Sea (Edges connect to sea) + + Each clan starts in its own part of the terrain. + + PageSelectWeapon @@ -2684,6 +2692,10 @@ Random Perlin + + Forts + + SeedPrompt diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Locale/hedgewars_fi.ts --- a/share/hedgewars/Data/Locale/hedgewars_fi.ts Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_fi.ts Tue May 17 23:29:49 2016 +0300 @@ -1,6 +1,6 @@ - + About @@ -632,6 +632,10 @@ Style: Tyyli: + + Forts + + HWNetServersModel @@ -1445,7 +1449,7 @@ Teams will start on opposite sides of the terrain, two team colours max! - Joukkueet aloittavat kartan vastakkaisista päistä, maksimissaan kaksi joukkueväriä! + Joukkueet aloittavat kartan vastakkaisista päistä, maksimissaan kaksi joukkueväriä! Land can not be destroyed! @@ -1575,6 +1579,10 @@ Sea (Edges connect to sea) Meri (seinät ovat merta) + + Each clan starts in its own part of the terrain. + + PageSelectWeapon @@ -2705,6 +2713,10 @@ Random Perlin Satunnainen Perlin + + Forts + + SeedPrompt diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Locale/hedgewars_fr.ts --- a/share/hedgewars/Data/Locale/hedgewars_fr.ts Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_fr.ts Tue May 17 23:29:49 2016 +0300 @@ -1,6 +1,6 @@ - + About @@ -644,6 +644,10 @@ Style: + + Forts + + HWNetServersModel @@ -1502,7 +1506,7 @@ Teams will start on opposite sides of the terrain, two team colours max! - Les équipes démarreront de chaque coté du terrain, deux couleurs d'équipe au maximum ! + Les équipes démarreront de chaque coté du terrain, deux couleurs d'équipe au maximum ! Land can not be destroyed! @@ -1605,6 +1609,10 @@ Sea (Edges connect to sea) + + Each clan starts in its own part of the terrain. + + PageSelectWeapon @@ -2749,6 +2757,10 @@ Random Perlin + + Forts + + SeedPrompt diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Locale/hedgewars_gl.ts --- a/share/hedgewars/Data/Locale/hedgewars_gl.ts Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_gl.ts Tue May 17 23:29:49 2016 +0300 @@ -1,6 +1,6 @@ - + About @@ -611,6 +611,10 @@ Style: + + Forts + + HWNetServersModel @@ -1409,7 +1413,7 @@ Teams will start on opposite sides of the terrain, two team colours max! - Os bandos comezarán en lados opostos da superficie, máximo dous bandos! + Os bandos comezarán en lados opostos da superficie, máximo dous bandos! Land can not be destroyed! @@ -1539,6 +1543,10 @@ Sea (Edges connect to sea) + + Each clan starts in its own part of the terrain. + + PageSelectWeapon @@ -2647,6 +2655,10 @@ Random Perlin + + Forts + + SeedPrompt diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Locale/hedgewars_hu.ts --- a/share/hedgewars/Data/Locale/hedgewars_hu.ts Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_hu.ts Tue May 17 23:29:49 2016 +0300 @@ -1,6 +1,6 @@ - + About @@ -605,6 +605,10 @@ Style: + + Forts + + HWNetServersModel @@ -1394,7 +1398,7 @@ Teams will start on opposite sides of the terrain, two team colours max! - A csapatok a pálya két végén kezdenek. Legfeljebb két csapatszín! + A csapatok a pálya két végén kezdenek. Legfeljebb két csapatszín! Land can not be destroyed! @@ -1524,6 +1528,10 @@ Sea (Edges connect to sea) + + Each clan starts in its own part of the terrain. + + PageSelectWeapon @@ -2630,6 +2638,10 @@ Random Perlin + + Forts + + SeedPrompt diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Locale/hedgewars_it.ts --- a/share/hedgewars/Data/Locale/hedgewars_it.ts Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_it.ts Tue May 17 23:29:49 2016 +0300 @@ -1,6 +1,6 @@ - + About @@ -632,6 +632,10 @@ Style: Stile: + + Forts + + HWNetServersModel @@ -1430,7 +1434,7 @@ Teams will start on opposite sides of the terrain, two team colours max! - Le squadre inizieranno in lati opposti del terreno, due colori di squadra al massimo! + Le squadre inizieranno in lati opposti del terreno, due colori di squadra al massimo! Land can not be destroyed! @@ -1532,6 +1536,10 @@ Sea (Edges connect to sea) Mare (i bordi si connettono al mare) + + Each clan starts in its own part of the terrain. + + PageSelectWeapon @@ -2628,6 +2636,10 @@ Random Perlin Rumore casuale + + Forts + + SeedPrompt diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Locale/hedgewars_ja.ts --- a/share/hedgewars/Data/Locale/hedgewars_ja.ts Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_ja.ts Tue May 17 23:29:49 2016 +0300 @@ -1,6 +1,6 @@ - + About @@ -609,6 +609,10 @@ Style: + + Forts + + HWNetServersModel @@ -1393,10 +1397,6 @@ - Teams will start on opposite sides of the terrain, two team colours max! - - - Land can not be destroyed! @@ -1524,6 +1524,10 @@ Sea (Edges connect to sea) + + Each clan starts in its own part of the terrain. + + PageSelectWeapon @@ -2630,6 +2634,10 @@ Random Perlin + + Forts + + SeedPrompt diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Locale/hedgewars_ko.ts --- a/share/hedgewars/Data/Locale/hedgewars_ko.ts Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_ko.ts Tue May 17 23:29:49 2016 +0300 @@ -1,6 +1,6 @@ - + About @@ -605,6 +605,10 @@ Style: + + Forts + + HWNetServersModel @@ -1362,10 +1366,6 @@ - Teams will start on opposite sides of the terrain, two team colours max! - - - Land can not be destroyed! @@ -1493,6 +1493,10 @@ Sea (Edges connect to sea) + + Each clan starts in its own part of the terrain. + + PageSelectWeapon @@ -2583,6 +2587,10 @@ Random Perlin + + Forts + + SeedPrompt diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Locale/hedgewars_lt.ts --- a/share/hedgewars/Data/Locale/hedgewars_lt.ts Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_lt.ts Tue May 17 23:29:49 2016 +0300 @@ -1,6 +1,6 @@ - + About @@ -110,12 +110,12 @@ FeedbackDialog - + We are always happy about suggestions, ideas, or bug reports. - + Send us feedback! @@ -125,27 +125,27 @@ - + If you found a bug, you can see if it's already been reported here: - + Your email address is optional, but necessary if you want us to get back at you. - + View - + Cancel - + Send Feedback @@ -180,17 +180,17 @@ - + Edit schemes - + Edit weapons - + Game scheme will auto-select a weapon @@ -361,52 +361,52 @@ - + %1 has been removed from your ignore list - + %1 has been added to your ignore list - + %1 has been removed from your friends list - + %1 has been added to your friends list - + Stylesheet imported from %1 - + Enter %1 if you want to use the current StyleSheet in future, enter %2 to reset! - + Couldn't read %1 - + StyleSheet discarded - + StyleSheet saved to %1 - + Failed to save StyleSheet to %1 @@ -630,133 +630,138 @@ - + + Forts + + + + Random - + Map preview: - + Load map drawing - + Edit map drawing - - All - - - - Small + All - Medium + Small - Large + Medium - Cavern + Large + Cavern + + + + Wacky - - Large tunnels - - - - Small islands + Large tunnels - Medium islands + Small islands + Medium islands + + + + Large islands - + Map size: - + Maze style: - + Style: - - Mission: - - - + Mission: + + + + Map: - - + + Theme: %1 - + Load drawn map - + Drawn Maps - + All files - - Small tunnels - - - + Small tunnels + + + + Medium tunnels - + Seed @@ -1447,7 +1452,7 @@ - + Game @@ -1487,157 +1492,157 @@ - + New team - + Edit team - + Delete team - + You can't edit teams from team selection. Go back to main menu to add, edit or delete teams. - + Schemes - + New scheme - + Edit scheme - + Delete scheme - + Weapons - + New weapon set - + Edit weapon set - + Delete weapon set - + Frontend - + Custom colors - + Reset to default colors - + Game audio - + Frontend audio - + Account - + Proxy settings - + Proxy host - + Proxy port - + Proxy login - + Proxy password - + No proxy - + System proxy settings - + Socks5 proxy - + HTTP proxy - + Miscellaneous - + Updates - + Check for updates - + Video recording options @@ -1705,12 +1710,7 @@ - - Teams will start on opposite sides of the terrain, two team colours max! - - - - + Land can not be destroyed! @@ -1720,72 +1720,72 @@ - + Lower gravity - + Assisted aiming with laser sight - + All hogs have a personal forcefield - + All (living) hedgehogs are fully restored at the end of turn - - Gain 80% of the damage you do back in health - - - - - Share your opponents pain, share their damage - - - - Your hogs are unable to move, put your artillery skills to the test + Gain 80% of the damage you do back in health + Share your opponents pain, share their damage + + + + + Your hogs are unable to move, put your artillery skills to the test + + + + Order of play is random instead of in room order. - + Play with a King. If he dies, your side dies. + + Take turns placing your hedgehogs before the start of play. + + + + + Ammo is shared between all teams that share a colour. + + + + + Disable girders when generating random maps. + + + + + Disable land objects when generating random maps. + + + - Take turns placing your hedgehogs before the start of play. - - - - - Ammo is shared between all teams that share a colour. - - - - - Disable girders when generating random maps. - - - - - Disable land objects when generating random maps. - - - - AI respawns on death. @@ -1795,22 +1795,22 @@ - + Weapons are reset to starting values each turn. - + Each hedgehog has its own ammo. It does not share with the team. - + You will not have to worry about wind anymore. - + Wind will affect almost everything. @@ -1820,37 +1820,42 @@ - + Add an indestructible border along the bottom + + Each clan starts in its own part of the terrain. + + + + + Random + + + - Random - - - - Seconds + + None (Default) + + + - None (Default) + Wrap (World wraps) - Wrap (World wraps) + Bounce (Edges reflect) - Bounce (Edges reflect) - - - - Sea (Edges connect to sea) @@ -1873,22 +1878,22 @@ PageSelectWeapon - + Default - + New - - Copy - - - + Copy + + + + Delete @@ -2020,23 +2025,23 @@ - + Ignore - + Add friend - + Unignore - + Remove friend @@ -2079,115 +2084,115 @@ QCheckBox - + Show ammo menu tooltips - + Alternative damage show - - Team - - - - - Enable team tags by default - - - - - Hog - - - - Enable hedgehog tags by default - - - - - Health + Team + + + + + Enable team tags by default - Enable health tags by default - - - - - Translucent + Hog + + + + + Enable hedgehog tags by default + Health + + + + + Enable health tags by default + + + + + Translucent + + + + Enable translucent tags by default - + Visual effects - - + + Sound - + In-game sound effects - - + + Music - + In-game music - - Frontend sound effects - - - + Frontend sound effects + + + + Frontend music - + Append date and time to record file name - + Check for updates at startup - + Fullscreen - + Show FPS - + Save password @@ -2202,12 +2207,12 @@ - + Record audio - + Use game resolution @@ -2225,87 +2230,87 @@ - + Community - + (System default) - - Disabled - - - - - Red/Cyan - - - - - Cyan/Red - - - - - Red/Blue - - - - - Blue/Red - - - - Red/Green + Disabled - Green/Red - - - - - Side-by-side - - - - - Top-Bottom + Red/Cyan - Red/Cyan grayscale + Cyan/Red - Cyan/Red grayscale + Red/Blue - Red/Blue grayscale + Blue/Red - Blue/Red grayscale + Red/Green - Red/Green grayscale + Green/Red + + + + + Side-by-side + + + + + Top-Bottom + Red/Cyan grayscale + + + + + Cyan/Red grayscale + + + + + Red/Blue grayscale + + + + + Blue/Red grayscale + + + + + Red/Green grayscale + + + + Green/Red grayscale @@ -2323,7 +2328,7 @@ - + Fort @@ -2376,12 +2381,12 @@ - + Scheme - + Weapons @@ -2442,157 +2447,157 @@ - + Locale - + Nickname - + This setting will be effective at next restart. - + Resolution - + Quality - + Fullscreen - + Fullscreen Resolution - + Windowed Resolution - + Stereo rendering - + Displayed tags above hogs and translucent tags - + Initial sound volume - + FPS limit - + Damage Modifier - + Turn Time - + Initial Health - + Sudden Death Timeout - + Sudden Death Water Rise - + Sudden Death Health Decrease - + % Rope Length - + Crate Drops - + % Health Crates - + Health in Crates - + Mines Time - + Mines - + % Dud Mines - + Explosives - + Air Mines - + % Get Away Time - + World Edge - + Script parameter - + Scheme Name: @@ -2634,52 +2639,52 @@ - + Your Email - + Summary - + Send system information - + Description - + Type the security code: - + Format - + Audio codec - + Video codec - + Framerate - + Bitrate (Kbps) @@ -2693,12 +2698,12 @@ - + hedgehog %1 - + anonymous @@ -2714,12 +2719,12 @@ QMessageBox - + Teams - Are you sure? - + Do you really want to delete the team '%1'? @@ -2761,35 +2766,35 @@ - + Hedgewars - Error - + System Information Preview - - + + Failed to generate captcha - + Failed to download captcha - + Please fill out all fields. Email is optional. - + Hedgewars - Success @@ -2804,12 +2809,12 @@ - + Error - + Cannot use the ammo '%1'! @@ -2941,7 +2946,7 @@ - + File error @@ -2952,7 +2957,7 @@ - + Cannot open '%1' for reading @@ -3021,7 +3026,7 @@ - + Go! @@ -3077,7 +3082,7 @@ - + Associate file extensions @@ -3110,12 +3115,12 @@ - + Set default options - + Restore default coding parameters @@ -3253,6 +3258,11 @@ Hand-drawn + + + Forts + + SeedPrompt @@ -4113,272 +4123,272 @@ server + + Restricted + + + - Restricted + Not room master - Not room master + Corrupted hedgehogs info - Corrupted hedgehogs info + too many teams - too many teams + too many hedgehogs - too many hedgehogs + There's already a team with same name in the list - There's already a team with same name in the list + round in progress - round in progress + restricted - restricted + REMOVE_TEAM: no such team - REMOVE_TEAM: no such team + Not team owner! + + + + + Less than two clans! + + + + + You already have voted + + + + + Your vote counted + + + + + Voting closed + + + + + Pause toggled + + + + + New voting started + + + + + Voting expired + + + + + kick + + + + + map + + + + + pause + + + + + new seed + + + + + number of hedgehogs in team + + + + + Illegal room name - Not team owner! - - - - - Less than two clans! - - - - - You already have voted - - - - - Your vote counted - - - - - Voting closed - - - - - Pause toggled - - - - - New voting started - - - - - Voting expired - - - - - kick - - - - - map - - - - - pause - - - - - new seed - - - - - number of hedgehogs in team + Room with such name already exists - Illegal room name + /maxteams: specify number from 2 to 8 - Room with such name already exists + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs - /maxteams: specify number from 2 to 8 + callvote kick: specify nickname - Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs + callvote kick: no such user - callvote kick: specify nickname + callvote map: no such map - callvote kick: no such user + callvote pause: no game in progress - callvote map: no such map + callvote hedgehogs: specify number from 1 to 8 + + + + + Nickname already chosen + + + + + Illegal nickname + + + + + Protocol already known + + + + + Bad number - callvote pause: no game in progress + Nickname is already in use - callvote hedgehogs: specify number from 1 to 8 + No checker rights - Nickname already chosen + Authentication failed - Illegal nickname + 60 seconds cooldown after kick - Protocol already known + kicked - Bad number + Reconnected too fast - Nickname is already in use + Ping timeout + + + + + bye + + + + + No such room + + + + + Room version incompatible to your hedgewars version + + + + + Joining restricted + + + + + Registered users only + + + + + You are banned in this room - No checker rights + Warning! Chat flood protection activated - Authentication failed + Excess flood - 60 seconds cooldown after kick + Game messages flood detected - 1 - kicked + Warning! Joins flood protection activated - Reconnected too fast - - - - - Ping timeout - - - - - bye - - - - - No such room - - - - - Room version incompatible to your hedgewars version - - - - - Joining restricted - - - - - Registered users only - - - - - You are banned in this room - - - - - Warning! Chat flood protection activated - - - - - Excess flood - - - - - Game messages flood detected - 1 - - - - - Warning! Joins flood protection activated - - - - There's no voting going on - + Empty config entry diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Locale/hedgewars_ms.ts --- a/share/hedgewars/Data/Locale/hedgewars_ms.ts Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_ms.ts Tue May 17 23:29:49 2016 +0300 @@ -1,6 +1,6 @@ - + About @@ -110,12 +110,12 @@ FeedbackDialog - + We are always happy about suggestions, ideas, or bug reports. - + Send us feedback! @@ -125,27 +125,27 @@ - + If you found a bug, you can see if it's already been reported here: - + Your email address is optional, but necessary if you want us to get back at you. - + View - + Cancel - + Send Feedback @@ -178,17 +178,17 @@ - + Edit schemes - + Edit weapons - + Game scheme will auto-select a weapon @@ -349,52 +349,52 @@ - + %1 has been removed from your ignore list - + %1 has been added to your ignore list - + %1 has been removed from your friends list - + %1 has been added to your friends list - + Stylesheet imported from %1 - + Enter %1 if you want to use the current StyleSheet in future, enter %2 to reset! - + Couldn't read %1 - + StyleSheet discarded - + StyleSheet saved to %1 - + Failed to save StyleSheet to %1 @@ -618,133 +618,138 @@ - + + Forts + + + + Random - + Map preview: - + Load map drawing - + Edit map drawing - - All - - - - Small + All - Medium + Small - Large + Medium - Cavern + Large + Cavern + + + + Wacky - - Large tunnels - - - - Small islands + Large tunnels - Medium islands + Small islands + Medium islands + + + + Large islands - + Map size: - + Maze style: - + Style: - - Mission: - - - + Mission: + + + + Map: - - + + Theme: %1 - + Load drawn map - + Drawn Maps - + All files - - Small tunnels - - - + Small tunnels + + + + Medium tunnels - + Seed @@ -1419,7 +1424,7 @@ - + Game @@ -1459,157 +1464,157 @@ - + New team - + Edit team - + Delete team - + You can't edit teams from team selection. Go back to main menu to add, edit or delete teams. - + Schemes - + New scheme - + Edit scheme - + Delete scheme - + Weapons - + New weapon set - + Edit weapon set - + Delete weapon set - + Frontend - + Custom colors - + Reset to default colors - + Game audio - + Frontend audio - + Account - + Proxy settings - + Proxy host - + Proxy port - + Proxy login - + Proxy password - + No proxy - + System proxy settings - + Socks5 proxy - + HTTP proxy - + Miscellaneous - + Updates - + Check for updates - + Video recording options @@ -1675,12 +1680,7 @@ - - Teams will start on opposite sides of the terrain, two team colours max! - - - - + Land can not be destroyed! @@ -1690,72 +1690,72 @@ - + Lower gravity - + Assisted aiming with laser sight - + All hogs have a personal forcefield - + All (living) hedgehogs are fully restored at the end of turn - - Gain 80% of the damage you do back in health - - - - - Share your opponents pain, share their damage - - - - Your hogs are unable to move, put your artillery skills to the test + Gain 80% of the damage you do back in health + Share your opponents pain, share their damage + + + + + Your hogs are unable to move, put your artillery skills to the test + + + + Order of play is random instead of in room order. - + Play with a King. If he dies, your side dies. + + Take turns placing your hedgehogs before the start of play. + + + + + Ammo is shared between all teams that share a colour. + + + + + Disable girders when generating random maps. + + + + + Disable land objects when generating random maps. + + + - Take turns placing your hedgehogs before the start of play. - - - - - Ammo is shared between all teams that share a colour. - - - - - Disable girders when generating random maps. - - - - - Disable land objects when generating random maps. - - - - AI respawns on death. @@ -1765,22 +1765,22 @@ - + Weapons are reset to starting values each turn. - + Each hedgehog has its own ammo. It does not share with the team. - + You will not have to worry about wind anymore. - + Wind will affect almost everything. @@ -1790,37 +1790,42 @@ - + Add an indestructible border along the bottom + + Each clan starts in its own part of the terrain. + + + + + Random + + + - Random - - - - Seconds + + None (Default) + + + - None (Default) + Wrap (World wraps) - Wrap (World wraps) + Bounce (Edges reflect) - Bounce (Edges reflect) - - - - Sea (Edges connect to sea) @@ -1843,22 +1848,22 @@ PageSelectWeapon - + New - + Default - - Copy - - - + Copy + + + + Delete @@ -2003,23 +2008,23 @@ - + Ignore - + Add friend - + Unignore - + Remove friend @@ -2048,7 +2053,7 @@ QCheckBox - + Save password @@ -2063,119 +2068,119 @@ - + Check for updates at startup - + Fullscreen - + Alternative damage show - + Show FPS - + Show ammo menu tooltips - - Team - - - - - Enable team tags by default - - - - - Hog - - - - Enable hedgehog tags by default - - - - - Health + Team + + + + + Enable team tags by default - Enable health tags by default - - - - - Translucent + Hog + + + + + Enable hedgehog tags by default + Health + + + + + Enable health tags by default + + + + + Translucent + + + + Enable translucent tags by default - + Visual effects - - + + Sound - + In-game sound effects - - + + Music - + In-game music - - Frontend sound effects - - - + Frontend sound effects + + + + Frontend music - + Append date and time to record file name - + Record audio - + Use game resolution @@ -2193,87 +2198,87 @@ - + Community - + (System default) - - Disabled - - - - - Red/Cyan - - - - - Cyan/Red - - - - - Red/Blue - - - - - Blue/Red - - - - Red/Green + Disabled - Green/Red - - - - - Side-by-side - - - - - Top-Bottom + Red/Cyan - Red/Cyan grayscale + Cyan/Red - Cyan/Red grayscale + Red/Blue - Red/Blue grayscale + Blue/Red - Blue/Red grayscale + Red/Green - Red/Green grayscale + Green/Red + + + + + Side-by-side + + + + + Top-Bottom + Red/Cyan grayscale + + + + + Cyan/Red grayscale + + + + + Red/Blue grayscale + + + + + Blue/Red grayscale + + + + + Red/Green grayscale + + + + Green/Red grayscale @@ -2291,7 +2296,7 @@ - + Fort @@ -2401,27 +2406,27 @@ - + Your Email - + Summary - + Send system information - + Description - + Type the security code: @@ -2447,187 +2452,187 @@ - + Weapons - + Locale - + Nickname - + This setting will be effective at next restart. - + Resolution - + Quality - + Fullscreen - + Fullscreen Resolution - + Windowed Resolution - + Stereo rendering - + Displayed tags above hogs and translucent tags - + Initial sound volume - + FPS limit - + Damage Modifier - + Turn Time - + Initial Health - + Sudden Death Timeout - + Sudden Death Water Rise - + Sudden Death Health Decrease - + % Rope Length - + Crate Drops - + % Health Crates - + Health in Crates - + Mines Time - + Mines - + % Dud Mines - + Explosives - + Air Mines - + % Get Away Time - + World Edge - + Script parameter - + Scheme Name: - + Format - + Audio codec - + Video codec - + Framerate - + Bitrate (Kbps) @@ -2647,7 +2652,7 @@ - + Scheme @@ -2661,12 +2666,12 @@ - + hedgehog %1 - + anonymous @@ -2682,12 +2687,12 @@ QMessageBox - + Teams - Are you sure? - + Do you really want to delete the team '%1'? @@ -2729,35 +2734,35 @@ - + Hedgewars - Error - + System Information Preview - - + + Failed to generate captcha - + Failed to download captcha - + Please fill out all fields. Email is optional. - + Hedgewars - Success @@ -2897,7 +2902,7 @@ - + File error @@ -2908,17 +2913,17 @@ - + Cannot open '%1' for reading - + Error - + Cannot use the ammo '%1'! @@ -2992,7 +2997,7 @@ - + Go! @@ -3048,7 +3053,7 @@ - + Associate file extensions @@ -3076,12 +3081,12 @@ - + Set default options - + Restore default coding parameters @@ -3219,6 +3224,11 @@ Hand-drawn + + + Forts + + SeedPrompt @@ -4079,272 +4089,272 @@ server + + Restricted + + + - Restricted + Not room master - Not room master + Corrupted hedgehogs info - Corrupted hedgehogs info + too many teams - too many teams + too many hedgehogs - too many hedgehogs + There's already a team with same name in the list - There's already a team with same name in the list + round in progress - round in progress + restricted - restricted + REMOVE_TEAM: no such team - REMOVE_TEAM: no such team + Not team owner! + + + + + Less than two clans! + + + + + You already have voted + + + + + Your vote counted + + + + + Voting closed + + + + + Pause toggled + + + + + New voting started + + + + + Voting expired + + + + + kick + + + + + map + + + + + pause + + + + + new seed + + + + + number of hedgehogs in team + + + + + Illegal room name - Not team owner! - - - - - Less than two clans! - - - - - You already have voted - - - - - Your vote counted - - - - - Voting closed - - - - - Pause toggled - - - - - New voting started - - - - - Voting expired - - - - - kick - - - - - map - - - - - pause - - - - - new seed - - - - - number of hedgehogs in team + Room with such name already exists - Illegal room name + /maxteams: specify number from 2 to 8 - Room with such name already exists + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs - /maxteams: specify number from 2 to 8 + callvote kick: specify nickname - Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs + callvote kick: no such user - callvote kick: specify nickname + callvote map: no such map - callvote kick: no such user + callvote pause: no game in progress - callvote map: no such map + callvote hedgehogs: specify number from 1 to 8 + + + + + Nickname already chosen + + + + + Illegal nickname + + + + + Protocol already known + + + + + Bad number - callvote pause: no game in progress + Nickname is already in use - callvote hedgehogs: specify number from 1 to 8 + No checker rights - Nickname already chosen + Authentication failed - Illegal nickname + 60 seconds cooldown after kick - Protocol already known + kicked - Bad number + Reconnected too fast - Nickname is already in use + Ping timeout + + + + + bye + + + + + No such room + + + + + Room version incompatible to your hedgewars version + + + + + Joining restricted + + + + + Registered users only + + + + + You are banned in this room - No checker rights + Warning! Chat flood protection activated - Authentication failed + Excess flood - 60 seconds cooldown after kick + Game messages flood detected - 1 - kicked + Warning! Joins flood protection activated - Reconnected too fast - - - - - Ping timeout - - - - - bye - - - - - No such room - - - - - Room version incompatible to your hedgewars version - - - - - Joining restricted - - - - - Registered users only - - - - - You are banned in this room - - - - - Warning! Chat flood protection activated - - - - - Excess flood - - - - - Game messages flood detected - 1 - - - - - Warning! Joins flood protection activated - - - - There's no voting going on - + Empty config entry diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Locale/hedgewars_nl.ts --- a/share/hedgewars/Data/Locale/hedgewars_nl.ts Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_nl.ts Tue May 17 23:29:49 2016 +0300 @@ -1,6 +1,6 @@ - + About @@ -611,6 +611,10 @@ Style: + + Forts + + HWNetServersModel @@ -1377,10 +1381,6 @@ - Teams will start on opposite sides of the terrain, two team colours max! - - - Land can not be destroyed! @@ -1508,6 +1508,10 @@ Sea (Edges connect to sea) + + Each clan starts in its own part of the terrain. + + PageSelectWeapon @@ -2600,6 +2604,10 @@ Random Perlin + + Forts + + SeedPrompt diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Locale/hedgewars_pl.ts --- a/share/hedgewars/Data/Locale/hedgewars_pl.ts Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_pl.ts Tue May 17 23:29:49 2016 +0300 @@ -1,6 +1,6 @@ - + About @@ -638,6 +638,10 @@ Style: + + Forts + + HWNetServersModel @@ -1485,7 +1489,7 @@ Teams will start on opposite sides of the terrain, two team colours max! - Drużyny rozpoczną grę na przeciwległych stronach mapy. Maksymalnie dwa kolory drużyn! + Drużyny rozpoczną grę na przeciwległych stronach mapy. Maksymalnie dwa kolory drużyn! Land can not be destroyed! @@ -1607,6 +1611,10 @@ Sea (Edges connect to sea) + + Each clan starts in its own part of the terrain. + + PageSelectWeapon @@ -2781,6 +2789,10 @@ Random Perlin + + Forts + + SeedPrompt diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Locale/hedgewars_pt_BR.ts --- a/share/hedgewars/Data/Locale/hedgewars_pt_BR.ts Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_pt_BR.ts Tue May 17 23:29:49 2016 +0300 @@ -1,6 +1,6 @@ - + About @@ -629,6 +629,10 @@ Style: + + Forts + + HWNetServersModel @@ -1487,7 +1491,7 @@ Teams will start on opposite sides of the terrain, two team colours max! - Equipes começarão em lados opostos do terreno, 2 cores de equipe no máximo! + Equipes começarão em lados opostos do terreno, 2 cores de equipe no máximo! Land can not be destroyed! @@ -1589,6 +1593,10 @@ Sea (Edges connect to sea) + + Each clan starts in its own part of the terrain. + + PageSelectWeapon @@ -2731,6 +2739,10 @@ Random Perlin + + Forts + + SeedPrompt diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Locale/hedgewars_pt_PT.ts --- a/share/hedgewars/Data/Locale/hedgewars_pt_PT.ts Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_pt_PT.ts Tue May 17 23:29:49 2016 +0300 @@ -1,6 +1,6 @@ - + About @@ -636,6 +636,10 @@ Style: + + Forts + + HWNetServersModel @@ -1443,7 +1447,7 @@ Teams will start on opposite sides of the terrain, two team colours max! - As equipas começam em lados opostos do terreno, duas cores de equipa no máximo! + As equipas começam em lados opostos do terreno, duas cores de equipa no máximo! Land can not be destroyed! @@ -1573,6 +1577,10 @@ Sea (Edges connect to sea) + + Each clan starts in its own part of the terrain. + + PageSelectWeapon @@ -2735,6 +2743,10 @@ Random Perlin + + Forts + + SeedPrompt diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Locale/hedgewars_ro.ts --- a/share/hedgewars/Data/Locale/hedgewars_ro.ts Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_ro.ts Tue May 17 23:29:49 2016 +0300 @@ -1,6 +1,6 @@ - + About @@ -617,6 +617,10 @@ Style: + + Forts + + HWNetServersModel @@ -1420,7 +1424,7 @@ Teams will start on opposite sides of the terrain, two team colours max! - Teams will start on opposite sides of the terrain, two team colours max! + Teams will start on opposite sides of the terrain, two team colours max! Land can not be destroyed! @@ -1550,6 +1554,10 @@ Sea (Edges connect to sea) + + Each clan starts in its own part of the terrain. + + PageSelectWeapon @@ -2661,6 +2669,10 @@ Random Perlin + + Forts + + SeedPrompt diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Locale/hedgewars_ru.ts --- a/share/hedgewars/Data/Locale/hedgewars_ru.ts Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_ru.ts Tue May 17 23:29:49 2016 +0300 @@ -1,6 +1,6 @@ - + About @@ -637,6 +637,10 @@ Style: Стиль: + + Forts + + HWNetServersModel @@ -1504,7 +1508,7 @@ Teams will start on opposite sides of the terrain, two team colours max! - Команды располагаются в противоположных сторонах карты, два цвета команды на карте! + Команды располагаются в противоположных сторонах карты, два цвета команды на карте! Land can not be destroyed! @@ -1606,6 +1610,10 @@ Sea (Edges connect to sea) Море (края соединены с морем) + + Each clan starts in its own part of the terrain. + + PageSelectWeapon @@ -2750,6 +2758,10 @@ Random Perlin Случайная перлиновская + + Forts + + SeedPrompt diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Locale/hedgewars_sk.ts --- a/share/hedgewars/Data/Locale/hedgewars_sk.ts Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_sk.ts Tue May 17 23:29:49 2016 +0300 @@ -1,6 +1,6 @@ - + About @@ -628,6 +628,10 @@ Style: + + Forts + + HWNetServersModel @@ -1488,7 +1492,7 @@ Teams will start on opposite sides of the terrain, two team colours max! - Tímy začnú na opačných stranách terénu, maximálne dve tímové farby! + Tímy začnú na opačných stranách terénu, maximálne dve tímové farby! Land can not be destroyed! @@ -1590,6 +1594,10 @@ Sea (Edges connect to sea) + + Each clan starts in its own part of the terrain. + + PageSelectWeapon @@ -2747,6 +2755,10 @@ Random Perlin + + Forts + + SeedPrompt diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Locale/hedgewars_sv.ts --- a/share/hedgewars/Data/Locale/hedgewars_sv.ts Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_sv.ts Tue May 17 23:29:49 2016 +0300 @@ -1,6 +1,6 @@ - + About @@ -619,6 +619,10 @@ Style: + + Forts + + HWNetServersModel @@ -1457,7 +1461,7 @@ Teams will start on opposite sides of the terrain, two team colours max! - Lag startar på motsatta sidor av terrängen, två lagfärger max! + Lag startar på motsatta sidor av terrängen, två lagfärger max! Land can not be destroyed! @@ -1559,6 +1563,10 @@ Sea (Edges connect to sea) + + Each clan starts in its own part of the terrain. + + PageSelectWeapon @@ -2684,6 +2692,10 @@ Random Perlin + + Forts + + SeedPrompt diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Locale/hedgewars_tr_TR.ts --- a/share/hedgewars/Data/Locale/hedgewars_tr_TR.ts Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_tr_TR.ts Tue May 17 23:29:49 2016 +0300 @@ -1,6 +1,6 @@ - + About @@ -641,6 +641,10 @@ Theme: %1 + + Forts + + HWNetServersModel @@ -1451,7 +1455,7 @@ Teams will start on opposite sides of the terrain, two team colours max! - Takımlar bölgenin farklı taraflarında başlarlar, en fazla iki takım rengi! + Takımlar bölgenin farklı taraflarında başlarlar, en fazla iki takım rengi! Land can not be destroyed! @@ -1581,6 +1585,10 @@ Sea (Edges connect to sea) + + Each clan starts in its own part of the terrain. + + PageSelectWeapon @@ -2747,6 +2755,10 @@ Random Perlin + + Forts + + SeedPrompt diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Locale/hedgewars_uk.ts --- a/share/hedgewars/Data/Locale/hedgewars_uk.ts Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_uk.ts Tue May 17 23:29:49 2016 +0300 @@ -1,6 +1,6 @@ - + About @@ -639,6 +639,10 @@ Style: + + Forts + + HWNetServersModel @@ -1461,7 +1465,7 @@ Teams will start on opposite sides of the terrain, two team colours max! - Команди почнуть гру на протилежних кінцях карти, команди максимум двох кольорів! + Команди почнуть гру на протилежних кінцях карти, команди максимум двох кольорів! Land can not be destroyed! @@ -1591,6 +1595,10 @@ Sea (Edges connect to sea) Море (краї з'єднані з морем) + + Each clan starts in its own part of the terrain. + + PageSelectWeapon @@ -2723,6 +2731,10 @@ Random Perlin + + Forts + + SeedPrompt diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Locale/hedgewars_zh_CN.ts --- a/share/hedgewars/Data/Locale/hedgewars_zh_CN.ts Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_zh_CN.ts Tue May 17 23:29:49 2016 +0300 @@ -1,6 +1,6 @@ - + About @@ -110,12 +110,12 @@ FeedbackDialog - + We are always happy about suggestions, ideas, or bug reports. - + Send us feedback! @@ -125,27 +125,27 @@ - + If you found a bug, you can see if it's already been reported here: - + Your email address is optional, but necessary if you want us to get back at you. - + View - + Cancel 取消 - + Send Feedback @@ -178,17 +178,17 @@ - + Edit weapons - + Game scheme will auto-select a weapon - + Edit schemes 修改游戏设置 @@ -349,52 +349,52 @@ - + %1 has been removed from your ignore list - + %1 has been added to your ignore list - + %1 has been removed from your friends list - + %1 has been added to your friends list - + Stylesheet imported from %1 - + Enter %1 if you want to use the current StyleSheet in future, enter %2 to reset! - + Couldn't read %1 - + StyleSheet discarded - + StyleSheet saved to %1 - + Failed to save StyleSheet to %1 @@ -583,17 +583,17 @@ HWMapContainer - + Small tunnels - + Medium tunnels - + Seed @@ -633,118 +633,123 @@ - + + Forts + + + + Random - + Map preview: - + Load map drawing - + Edit map drawing - - All - 全部 - - - Small - 小型 + All + 全部 - Medium - 中型 + Small + 小型 - Large - 大型 + Medium + 中型 - Cavern - 洞穴 + Large + 大型 + Cavern + 洞穴 + + + Wacky 曲折 - - Large tunnels - - - - Small islands + Large tunnels - Medium islands + Small islands + Medium islands + + + + Large islands - + Map size: - + Maze style: - + Style: - - Mission: - - - + Mission: + + + + Map: - - + + Theme: %1 - + Load drawn map - + Drawn Maps - + All files @@ -1430,7 +1435,7 @@ - + Game @@ -1470,157 +1475,157 @@ 队伍 - + New team 新队伍 - + Edit team 修改队伍设定 - + Delete team - + You can't edit teams from team selection. Go back to main menu to add, edit or delete teams. - + Schemes - + New scheme - + Edit scheme - + Delete scheme - + Weapons 武器 - + New weapon set - + Edit weapon set - + Delete weapon set - + Frontend - + Custom colors - + Reset to default colors - + Game audio - + Frontend audio - + Account - + Proxy settings - + Proxy host - + Proxy port - + Proxy login - + Proxy password - + No proxy - + System proxy settings - + Socks5 proxy - + HTTP proxy - + Miscellaneous - + Updates - + Check for updates - + Video recording options @@ -1694,12 +1699,7 @@ - - Teams will start on opposite sides of the terrain, two team colours max! - - - - + Land can not be destroyed! @@ -1709,72 +1709,72 @@ - + Lower gravity - + Assisted aiming with laser sight - + All hogs have a personal forcefield - + All (living) hedgehogs are fully restored at the end of turn - - Gain 80% of the damage you do back in health - - - - - Share your opponents pain, share their damage - - - - Your hogs are unable to move, put your artillery skills to the test + Gain 80% of the damage you do back in health + Share your opponents pain, share their damage + + + + + Your hogs are unable to move, put your artillery skills to the test + + + + Order of play is random instead of in room order. - + Play with a King. If he dies, your side dies. + + Take turns placing your hedgehogs before the start of play. + + + + + Ammo is shared between all teams that share a colour. + + + + + Disable girders when generating random maps. + + + + + Disable land objects when generating random maps. + + + - Take turns placing your hedgehogs before the start of play. - - - - - Ammo is shared between all teams that share a colour. - - - - - Disable girders when generating random maps. - - - - - Disable land objects when generating random maps. - - - - AI respawns on death. @@ -1784,22 +1784,22 @@ - + Weapons are reset to starting values each turn. - + Each hedgehog has its own ammo. It does not share with the team. - + You will not have to worry about wind anymore. - + Wind will affect almost everything. @@ -1809,37 +1809,42 @@ - + Add an indestructible border along the bottom + + Each clan starts in its own part of the terrain. + + + + + Random + + + - Random - - - - Seconds + + None (Default) + + + - None (Default) + Wrap (World wraps) - Wrap (World wraps) + Bounce (Edges reflect) - Bounce (Edges reflect) - - - - Sea (Edges connect to sea) @@ -1862,22 +1867,22 @@ PageSelectWeapon - + New 新游戏 - + Default 默认 - - Copy - - - + Copy + + + + Delete 删除 @@ -2026,23 +2031,23 @@ - + Ignore - + Add friend - + Unignore - + Remove friend @@ -2070,115 +2075,115 @@ QCheckBox - + Fullscreen 游戏全屏幕 - + Show FPS 显示帧率 (FPS) - + Alternative damage show 另一种伤害显示方式 - - Team - - - - - Enable team tags by default - - - - - Hog - - - - Enable hedgehog tags by default - - - - - Health + Team + + + + + Enable team tags by default - Enable health tags by default - - - - - Translucent + Hog + + + + + Enable hedgehog tags by default + Health + + + + + Enable health tags by default + + + + + Translucent + + + + Enable translucent tags by default - + Visual effects - - + + Sound - + In-game sound effects - - + + Music - + In-game music - - Frontend sound effects - - - + Frontend sound effects + + + + Frontend music - + Check for updates at startup - + Show ammo menu tooltips - + Append date and time to record file name 记录名称中包含具体时间日期 - + Save password @@ -2193,12 +2198,12 @@ - + Record audio - + Use game resolution @@ -2211,7 +2216,7 @@ 玩家 - + Community @@ -2221,82 +2226,82 @@ Lv 级别 - + (System default) - - Disabled - - - - - Red/Cyan - - - - - Cyan/Red - - - - - Red/Blue - - - - - Blue/Red - - - - Red/Green + Disabled - Green/Red - - - - - Side-by-side - - - - - Top-Bottom + Red/Cyan - Red/Cyan grayscale + Cyan/Red - Cyan/Red grayscale + Red/Blue - Red/Blue grayscale + Blue/Red - Blue/Red grayscale + Red/Green - Red/Green grayscale + Green/Red + + + + + Side-by-side + + + + + Top-Bottom + Red/Cyan grayscale + + + + + Cyan/Red grayscale + + + + + Red/Blue grayscale + + + + + Blue/Red grayscale + + + + + Red/Green grayscale + + + + Green/Red grayscale @@ -2314,7 +2319,7 @@ - + Fort 城堡模式 @@ -2352,57 +2357,57 @@ QLabel - + Locale - + Nickname - + Displayed tags above hogs and translucent tags - + This setting will be effective at next restart. - + Resolution 分辨率 - + Quality - + Fullscreen 游戏全屏幕 - + Fullscreen Resolution - + Windowed Resolution - + Stereo rendering - + FPS limit FPS 上限 @@ -2437,7 +2442,7 @@ 端口: - + Weapons 武器 @@ -2446,102 +2451,102 @@ 版本 - + Initial sound volume 初始音量 - + Damage Modifier 伤害修改 - + Turn Time 回合时间 - + Initial Health 初始生命值 - + Sudden Death Timeout 死亡模式倒计时 - + Sudden Death Water Rise - + Sudden Death Health Decrease - + % Rope Length - + % Health Crates - + Health in Crates - + Mines Time - + Mines - + % Dud Mines - + Explosives - + Air Mines - + % Get Away Time - + World Edge - + Script parameter - + Scheme Name: 设置名称: - + Crate Drops 箱子降落 @@ -2608,27 +2613,27 @@ - + Your Email - + Summary - + Send system information - + Description - + Type the security code: @@ -2644,27 +2649,27 @@ - + Format - + Audio codec - + Video codec - + Framerate - + Bitrate (Kbps) @@ -2674,7 +2679,7 @@ - + Scheme @@ -2688,12 +2693,12 @@ - + hedgehog %1 - + anonymous @@ -2709,22 +2714,22 @@ QMessageBox - + Error 错误 - + Cannot use the ammo '%1'! - + Teams - Are you sure? - + Do you really want to delete the team '%1'? @@ -2766,35 +2771,35 @@ - + Hedgewars - Error - + System Information Preview - - + + Failed to generate captcha - + Failed to download captcha - + Please fill out all fields. Email is optional. - + Hedgewars - Success @@ -2934,7 +2939,7 @@ - + File error @@ -2945,7 +2950,7 @@ - + Cannot open '%1' for reading @@ -3009,7 +3014,7 @@ 连接 - + Go! 上场! @@ -3098,17 +3103,17 @@ - + Associate file extensions - + Set default options - + Restore default coding parameters @@ -3246,6 +3251,11 @@ Hand-drawn + + + Forts + + SeedPrompt @@ -4110,272 +4120,272 @@ server + + Restricted + + + - Restricted + Not room master - Not room master + Corrupted hedgehogs info - Corrupted hedgehogs info + too many teams - too many teams + too many hedgehogs - too many hedgehogs + There's already a team with same name in the list - There's already a team with same name in the list + round in progress - round in progress + restricted - restricted + REMOVE_TEAM: no such team - REMOVE_TEAM: no such team + Not team owner! + + + + + Less than two clans! + + + + + You already have voted + + + + + Your vote counted + + + + + Voting closed + + + + + Pause toggled + + + + + New voting started + + + + + Voting expired + + + + + kick + + + + + map + + + + + pause + 暂停 + + + + new seed + + + + + number of hedgehogs in team + + + + + Illegal room name - Not team owner! - - - - - Less than two clans! - - - - - You already have voted - - - - - Your vote counted - - - - - Voting closed - - - - - Pause toggled - - - - - New voting started - - - - - Voting expired - - - - - kick - - - - - map - - - - - pause - 暂停 - - - - new seed - - - - - number of hedgehogs in team + Room with such name already exists - Illegal room name + /maxteams: specify number from 2 to 8 - Room with such name already exists + Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs - /maxteams: specify number from 2 to 8 + callvote kick: specify nickname - Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs + callvote kick: no such user - callvote kick: specify nickname + callvote map: no such map - callvote kick: no such user + callvote pause: no game in progress - callvote map: no such map + callvote hedgehogs: specify number from 1 to 8 + + + + + Nickname already chosen + + + + + Illegal nickname + + + + + Protocol already known + + + + + Bad number - callvote pause: no game in progress + Nickname is already in use - callvote hedgehogs: specify number from 1 to 8 + No checker rights - Nickname already chosen + Authentication failed - Illegal nickname + 60 seconds cooldown after kick - Protocol already known + kicked - Bad number + Reconnected too fast - Nickname is already in use + Ping timeout + + + + + bye + + + + + No such room + + + + + Room version incompatible to your hedgewars version + + + + + Joining restricted + + + + + Registered users only + + + + + You are banned in this room - No checker rights + Warning! Chat flood protection activated - Authentication failed + Excess flood - 60 seconds cooldown after kick + Game messages flood detected - 1 - kicked + Warning! Joins flood protection activated - Reconnected too fast - - - - - Ping timeout - - - - - bye - - - - - No such room - - - - - Room version incompatible to your hedgewars version - - - - - Joining restricted - - - - - Registered users only - - - - - You are banned in this room - - - - - Warning! Chat flood protection activated - - - - - Excess flood - - - - - Game messages flood detected - 1 - - - - - Warning! Joins flood protection activated - - - - There's no voting going on - + Empty config entry diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Locale/hedgewars_zh_TW.ts --- a/share/hedgewars/Data/Locale/hedgewars_zh_TW.ts Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Locale/hedgewars_zh_TW.ts Tue May 17 23:29:49 2016 +0300 @@ -1,6 +1,6 @@ - + About @@ -617,6 +617,10 @@ Style: 風格: + + Forts + + HWNetServersModel @@ -1437,7 +1441,7 @@ Teams will start on opposite sides of the terrain, two team colours max! - 隊伍開始在對手的地盤,努力! + 隊伍開始在對手的地盤,努力! Land can not be destroyed! @@ -1539,6 +1543,10 @@ Sea (Edges connect to sea) 海水(邊緣連接到海) + + Each clan starts in its own part of the terrain. + + PageSelectWeapon @@ -2649,6 +2657,10 @@ Random Perlin + + Forts + + SeedPrompt diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Maps/Bamboo/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Bamboo/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Maps/Bamboo/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -2,4 +2,5 @@ map.png map.cfg preview.png + credits.txt DESTINATION ${SHAREPATH}Data/Maps/Bamboo) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Maps/Bamboo/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/Bamboo/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,1 @@ +Joshua Frese \ No newline at end of file diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Maps/BambooPlinko/CMakeLists.txt --- a/share/hedgewars/Data/Maps/BambooPlinko/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Maps/BambooPlinko/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -2,4 +2,5 @@ map.png map.cfg preview.png + credits.txt DESTINATION ${SHAREPATH}Data/Maps/BambooPlinko) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Maps/BambooPlinko/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/BambooPlinko/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,1 @@ +Joshua Frese \ No newline at end of file diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Maps/Bath/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Bath/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Maps/Bath/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -2,4 +2,5 @@ map.png map.cfg preview.png + credits.txt DESTINATION ${SHAREPATH}Data/Maps/Bath) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Maps/Bath/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/Bath/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,1 @@ +John Dum diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Maps/Castle/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Castle/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Maps/Castle/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -3,4 +3,5 @@ mask.png map.cfg preview.png + credits.txt DESTINATION ${SHAREPATH}Data/Maps/Castle) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Maps/Castle/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/Castle/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,1 @@ +Stanko Tadić \ No newline at end of file diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Maps/EarthRise/CMakeLists.txt --- a/share/hedgewars/Data/Maps/EarthRise/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Maps/EarthRise/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -3,4 +3,5 @@ mask.png map.cfg preview.png + credits.txt DESTINATION ${SHAREPATH}Data/Maps/EarthRise) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Maps/EarthRise/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/EarthRise/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,1 @@ +Joshua Frese \ No newline at end of file diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Maps/Hedgelove/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Hedgelove/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Maps/Hedgelove/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -2,4 +2,5 @@ map.png map.cfg preview.png + credits.txt DESTINATION ${SHAREPATH}Data/Maps/Hedgelove) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Maps/Hedgelove/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/Hedgelove/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,1 @@ +John Dum diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Maps/Hydrant/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Hydrant/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Maps/Hydrant/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -2,4 +2,5 @@ map.png map.cfg preview.png + credits.txt DESTINATION ${SHAREPATH}Data/Maps/Hydrant) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Maps/Hydrant/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/Hydrant/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,1 @@ +John Dum diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Maps/Mushrooms/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Mushrooms/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Maps/Mushrooms/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -3,4 +3,5 @@ mask.png map.cfg preview.png + credits.txt DESTINATION ${SHAREPATH}Data/Maps/Mushrooms) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Maps/Mushrooms/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/Mushrooms/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,1 @@ +John Dum diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Maps/PirateFlag/CMakeLists.txt --- a/share/hedgewars/Data/Maps/PirateFlag/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Maps/PirateFlag/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -2,5 +2,6 @@ map.png map.cfg preview.png + credits.txt DESTINATION ${SHAREPATH}Data/Maps/PirateFlag) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Maps/PirateFlag/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/PirateFlag/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,1 @@ +Stanko Tadić \ No newline at end of file diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Maps/Plane/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Plane/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Maps/Plane/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -2,5 +2,6 @@ map.png map.cfg preview.png + credits.txt DESTINATION ${SHAREPATH}Data/Maps/Plane) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Maps/Plane/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/Plane/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,1 @@ +John Dum diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Maps/ShoppaKing/CMakeLists.txt --- a/share/hedgewars/Data/Maps/ShoppaKing/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Maps/ShoppaKing/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -2,4 +2,5 @@ map.png map.cfg preview.png + credits.txt DESTINATION ${SHAREPATH}Data/Maps/ShoppaKing) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Maps/ShoppaKing/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/ShoppaKing/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,1 @@ +wolfmarc & Dragonfly \ No newline at end of file diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Maps/Sticks/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Sticks/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Maps/Sticks/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -2,4 +2,5 @@ map.png map.cfg preview.png + credits.txt DESTINATION ${SHAREPATH}Data/Maps/Sticks) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Maps/Sticks/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/Sticks/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,1 @@ +dctPL \ No newline at end of file diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Maps/TrophyRace/CMakeLists.txt --- a/share/hedgewars/Data/Maps/TrophyRace/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Maps/TrophyRace/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -5,4 +5,5 @@ mask.png preview.png desc.txt + credits.txt DESTINATION ${SHAREPATH}Data/Maps/TrophyRace) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Maps/TrophyRace/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/TrophyRace/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,1 @@ +wolfmarc & Dragonfly \ No newline at end of file diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Music/CMakeLists.txt --- a/share/hedgewars/Data/Music/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Music/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -2,4 +2,6 @@ install(FILES ${BaseMusic} + ${MusicCredits} + credits.txt DESTINATION ${SHAREPATH}Data/Music) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Music/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Music/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,7 @@ +City.ogg=HSR ( http://elhombresinremedio.com ) +Compost.ogg=HG +EarthRise.ogg=Jonatan Nilsson +oriental.ogg=Jonatan Nilsson +Rock.ogg=HSR ( http://elhombresinremedio.com ) +sdmusic.ogg=Kevin MacLeod - "Hitman" [sheepluva edit] +snow.ogg=Jonatan Nilsson diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua --- a/share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua Tue May 17 23:29:49 2016 +0300 @@ -1,5 +1,5 @@ --------------------------------------------------------- ---- LE CONSTRUCTION MODE 0.7 (badly adapted from Hedge Editor 0.5) +--- LE CONSTRUCTION MODE 0.7+ (badly adapted from Hedge Editor 0.5) --------------------------------------------------------- -- a hedgewars gameplay mode by mikade -- special thanks to all who helped test and offered suggestions @@ -22,6 +22,21 @@ -- limit number of generators? ------------------------------------------------------------------------------ +-- SCRIPT PARAMETER +------------------------------------------------------------------------------ +-- The script parameter can be used to configure the energy +-- of the game. It is a comma-seperated list of key=value pairs, where each +-- key is a word and each value is an integer between 0 and 4294967295. +-- +-- Possible keys: +--- initialenergy: Amount of energy that each team starts with (default: 550) +--- energyperround: Amount of energy that each team gets per round (default: 50) +--- maxenergy: Maximum amount of energy each team can hold (default: 1000) + +-- Example: “initialenergy=750, maxenergy=2000” starts thee game with 750 energy +-- and sets the maximum energy to 2000 + +------------------------------------------------------------------------------ --version history ------------------------------------------------------------------------------ --v0.1 @@ -58,10 +73,18 @@ --v0.6 (dev) -- added magic dance ---v.07 (pushed to repo) +--v0.7 (pushed to repo) -- added a cfg file -- removed another 903 lines of code we weren't using (lol) +--v0.7+ (merged in repo) +-- applied Wuzzy's patches: +-- script parameters: initialenergy, energyperround, maxenergy +-- fix crate costs +-- various minor tweaks and fixes +-- (see commits in official repo) +-- make Construction Mode play well together with fort mode (clan order = fort order) + -------------------------------- -- STRUCTURES LIST / IDEAS -------------------------------- @@ -112,6 +135,7 @@ HedgewarsScriptLoad("/Scripts/Locale.lua") HedgewarsScriptLoad("/Scripts/Tracker.lua") +HedgewarsScriptLoad("/Scripts/Params.lua") ---------------------------------------------- -- STRUC CRAP @@ -130,6 +154,8 @@ strucCircType = {} strucAltDisplay = {} +fortMode = false + placedExpense = 0 tempID = nil @@ -145,7 +171,6 @@ clanBoundsEY = {} clanPower = {} -clanBoon = {} clanID = {} clanLStrucIndex = {} @@ -154,6 +179,7 @@ clanLGearIndex = {} clanUsedExtraTime = {} clanCratesSpawned = {} +clanFirstTurn = {} effectTimer = 0 @@ -165,11 +191,16 @@ wCol = {} margin = 20 -tauntString = "" - vTag = {} lastWep = nil +checkForSpecialWeaponsIn = -1 + +-- Config variables (script parameter) +conf_initialEnergy = 550 +conf_energyPerRound = 50 +conf_maxEnergy = 1000 + function HideTags() for i = 0, 2 do @@ -187,7 +218,7 @@ if i == 0 then yOffset = 40 tCol = 0xffba00ff - tValue = 30--TimeLeft + tValue = 30 elseif i == 1 then zoomL = 1.1 xOffset = 45 @@ -199,7 +230,7 @@ xOffset = 60 + 35 yOffset = 70 tCol = 0xa800ffff - tValue = 10--shieldHealth - 80 + tValue = 10 end DeleteVisualGear(vTag[i]) @@ -267,7 +298,7 @@ function HandleBorderEffects() effectTimer = effectTimer + 1 - if effectTimer > 15 then --25 + if effectTimer > 15 then effectTimer = 1 for i = 1, #wX do BorderSpark(wX[i],wY[i],wWidth[i],wHeight[i], wCol[i]) @@ -283,16 +314,12 @@ function gearCanBeDeflected(gear) if (GetGearType(gear) == gtShell) or - --(GetGearType(gear) == gtBee) or (GetGearType(gear) == gtGrenade) or (GetGearType(gear) == gtAirBomb) or - --(GetGearType(gear) == gtRCPlane) or - --(GetGearType(gear) == gtRope) or (GetGearType(gear) == gtClusterBomb) or (GetGearType(gear) == gtCluster) or (GetGearType(gear) == gtGasBomb) or - --(GetGearType(gear) == gtSeduction) or - (GetGearType(gear) == gtMine) or ------- + (GetGearType(gear) == gtMine) or (GetGearType(gear) == gtMortar) or (GetGearType(gear) == gtHellishBomb) or (GetGearType(gear) == gtWatermelon) or @@ -300,15 +327,11 @@ (GetGearType(gear) == gtEgg) or (GetGearType(gear) == gtDrill) or (GetGearType(gear) == gtBall) or - (GetGearType(gear) == gtExplosives) or ------ + (GetGearType(gear) == gtExplosives) or (GetGearType(gear) == gtFlame) or (GetGearType(gear) == gtPortal) or (GetGearType(gear) == gtDynamite) or (GetGearType(gear) == gtSMine) or - --(GetGearType(gear) == gtKamikaze) or - --(GetGearType(gear) == gtRCPlane) or - --(GetGearType(gear) == gtCake) or - --(GetGearType(gear) == gtHedgehog) or ------ (GetGearType(gear) == gtKnife) or (GetGearType(gear) == gtJetpack) or -- test this and birdy plz (GetGearType(gear) == gtBirdy) or -- test this and birdy plz @@ -349,10 +372,6 @@ elseif (GetGearType(gear) == gtFlame) or (GetGearType(gear) == gtPortal) or (GetGearType(gear) == gtDynamite) - --(GetGearType(gear) == gtKamikaze) or - --(GetGearType(gear) == gtRCPlane) or - - --(GetGearType(gear) == gtCake) then dmg = 0 @@ -373,10 +392,10 @@ setGearValue(gear,"damage",dmg) setGearValue(gear,"deflects",0) - if (CurrentHedgehog ~= nil) then --and (gameStarted == true) then + if (CurrentHedgehog ~= nil) then setGearValue(gear,"owner",GetHogClan(CurrentHedgehog)) -- NEW NEEDS CHANGE? else - setGearValue(gear,"owner",10) -- nil + setGearValue(gear,"owner",10) end end @@ -408,13 +427,8 @@ if pType == loc("Reflector Shield") then table.insert(strucHealth,255) - --SetVisualGearValues(madness, g1, g2, 0, 0, g5, frameID, g7, visualSprite, g9, g10 ) - --SetState(tempG, bor(GetState(tempG),gstInvisible) ) - --table.insert(strucAltDisplay, madness) - else table.insert(strucHealth,1) - --table.insert(strucAltDisplay, 1) end table.insert(strucCirc,tempCirc) @@ -426,12 +440,10 @@ frameID = 7 elseif pType == loc("Healing Station") then table.insert(strucCircCol,0xFF00FF00) - --table.insert(strucCircCol,colorGreen) table.insert(strucCircRadius,500) frameID = 3 elseif pType == loc("Respawner") then table.insert(strucCircCol,0xFF00FF00) - --table.insert(strucCircCol,0xFF00FFFF) table.insert(strucCircRadius,75) runOnHogs(EnableHogResurrectionForThisClan) frameID = 1 @@ -439,9 +451,6 @@ table.insert(strucCircCol,0x0000FFFF) table.insert(strucCircRadius,350) frameID = 6 - elseif pType == loc("Core") then - table.insert(strucCircCol,0xFFFFFFFF) - table.insert(strucCircRadius,350) elseif pType == loc("Generator") then table.insert(strucCircCol,0xFFFF00FF) table.insert(strucCircRadius,75) @@ -470,10 +479,6 @@ SetState(tempG, bor(GetState(tempG),gstInvisible) ) table.insert(strucAltDisplay, madness) - -- may be needed for non gear-based structures - --table.insert(strucX, GetX(tempG)) - --table.insert(strucY, GetY(tempG)) - end -- this is basically onStructureDelete @@ -583,7 +588,6 @@ NR = strucCircRadius[i] else NR = (48/100*strucCircRadius[i])/2 - --NR = div((div(48,100) * strucCircRadius[tempID]),2) end if dist <= NR*NR then teleportOriginSuccessful = true @@ -594,7 +598,6 @@ NR = strucCircRadius[i] else NR = (48/100*strucCircRadius[i])/2 - --NR = div((div(48,100) * strucCircRadius[tempID]),2) end if dist <= NR*NR then teleportDestinationSuccessful = true @@ -615,222 +618,185 @@ --Check for proximity of gears to structures, and make structures behave accordingly function CheckProximity(gear) - --if isAStructureEffectingGear(gear) then - - dist = GetDistFromGearToXY(gear, GetX(strucGear[tempID]), GetY(strucGear[tempID])) - - -- calculate my real radius if I am an aura - if strucCircType[tempID] == 0 then - NR = strucCircRadius[tempID] - else - NR = (48/100*strucCircRadius[tempID])/2 - --NR = div((div(48,100) * strucCircRadius[tempID]),2) -- doesn't work ffff - --NR = div((48/100*strucCircRadius[tempID]),2) -- still works - - end - - -- we're in business - if dist <= NR*NR then + dist = GetDistFromGearToXY(gear, GetX(strucGear[tempID]), GetY(strucGear[tempID])) - - -- heal clan hogs - if strucType[tempID] == loc("Healing Station") then - - if GetGearType(gear) == gtHedgehog then - if GetHogClan(gear) == strucClan[tempID] then + -- calculate my real radius if I am an aura + if strucCircType[tempID] == 0 then + NR = strucCircRadius[tempID] + else + NR = (48/100*strucCircRadius[tempID])/2 + end - hogLife = GetHealth(gear) + 1 - if hogLife > 150 then - hogLife = 150 - end - SetHealth(gear, hogLife) - - -- change this to the med kit sprite health ++++s later - tempE = AddVisualGear(GetX(strucGear[tempID]), GetY(strucGear[tempID]), vgtSmoke, 0, true) - g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE) - SetVisualGearValues(tempE, g1, g2, g3, g4, g5, g6, g7, g8, g9, colorGreen ) + -- we're in business + if dist <= NR*NR then + -- heal clan hogs + if strucType[tempID] == loc("Healing Station") then + + if GetGearType(gear) == gtHedgehog then + if GetHogClan(gear) == strucClan[tempID] then + + hogLife = GetHealth(gear) + 1 + if hogLife > 150 then + hogLife = 150 end + SetHealth(gear, hogLife) + + -- change this to the med kit sprite health ++++s later + tempE = AddVisualGear(GetX(strucGear[tempID]), GetY(strucGear[tempID]), vgtSmoke, 0, true) + g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE) + SetVisualGearValues(tempE, g1, g2, g3, g4, g5, g6, g7, g8, g9, colorGreen ) + end + end + + -- explode enemy clan hogs + elseif strucType[tempID] == loc("Bio-Filter") then - -- explode enemy clan hogs - elseif strucType[tempID] == loc("Bio-Filter") then + if GetGearType(gear) == gtHedgehog then + if (GetHogClan(gear) ~= strucClan[tempID]) and (GetHealth(gear) > 0) then + AddGear(GetX(gear), GetY(gear), gtGrenade, 0, 0, 0, 1) + end + end + + -- were those weapons in your pocket, or were you just happy to see me? + elseif strucType[tempID] == loc("Weapon Filter") then + + if GetGearType(gear) == gtHedgehog then + if (GetHogClan(gear) ~= strucClan[tempID]) then - --tempE = AddVisualGear(GetX(strucGear[tempID]), GetY(strucGear[tempID]), vgtSmoke, 0, true) - --g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE) - --SetVisualGearValues(tempE, g1, g2, g3, g4, g5, g6, g7, g8, g9, colorRed ) + for wpnIndex = 1, #atkArray do + AddAmmo(gear, atkArray[wpnIndex][1], 0) + end + + for wpnIndex = 1, #utilArray do + AddAmmo(gear, utilArray[wpnIndex][1], 0) + end + + AddAmmo(gear, amAirAttack, 100) + AddAmmo(gear, amSwitch, 100) + AddAmmo(gear, amSkip, 100) - if GetGearType(gear) == gtHedgehog then - if (GetHogClan(gear) ~= strucClan[tempID]) and (GetHealth(gear) > 0) then - AddGear(GetX(gear), GetY(gear), gtGrenade, 0, 0, 0, 1) - end end + end + + -- BOUNCE! POGO! POGO! POGO! POGO! + elseif strucType[tempID] == loc("Reflector Shield") then + + -- add check for whose projectile it is + if gearCanBeDeflected(gear) == true then + + gOwner = getGearValue(gear,"owner") + gDeflects = getGearValue(gear,"deflects") + gDmg = getGearValue(gear,"damage") + + if gDeflects >= 3 then + DeleteGear(gear) + AddVisualGear(GetX(gear), GetY(gear), vgtSmoke, 0, false) + PlaySound(sndVaporize) + elseif gOwner ~= strucClan[tempID] then + --whether to vaporize gears or bounce them + if gDmg ~= 0 then + dx, dy = GetGearVelocity(gear) - -- were those weapons in your pocket, or were you just happy to see me? - elseif strucType[tempID] == loc("Weapon Filter") then + if (dx == 0) and (dy == 0) then + -- static mine, explosive, etc encountered + -- do nothing + else + + --let's bounce something! + + dx = dx*(-1) + dy = dy*(-1) + SetGearVelocity(gear,dx,dy) + setGearValue(gear,"deflects",(gDeflects+1)) - if GetGearType(gear) == gtHedgehog then - if (GetHogClan(gear) ~= strucClan[tempID]) then + AddVisualGear(GetX(gear), GetY(gear), vgtExplosion, 0, false) + PlaySound(sndExplosion) + + strucHealth[tempID] = strucHealth[tempID] - gDmg + strucCircCol[tempID] = strucCircCol[tempID] - gDmg - for wpnIndex = 1, #atkArray do - AddAmmo(gear, atkArray[wpnIndex][1], 0) + if strucHealth[tempID] <= 0 then + AddVisualGear(GetX(strucGear[tempID]), GetY(strucGear[tempID]), vgtExplosion, 0, false) + DeleteGear(strucGear[tempID]) + PlaySound(sndExplosion) + end + end - for wpnIndex = 1, #utilArray do - AddAmmo(gear, utilArray[wpnIndex][1], 0) - end - - AddAmmo(gear, amAirAttack, 100) - AddAmmo(gear, amSwitch, 100) - AddAmmo(gear, amSkip, 100) - - end - end - - -- BOUNCE! POGO! POGO! POGO! POGO! - elseif strucType[tempID] == loc("Reflector Shield") then - - -- add check for whose projectile it is - if gearCanBeDeflected(gear) == true then - - gOwner = getGearValue(gear,"owner") - gDeflects = getGearValue(gear,"deflects") - gDmg = getGearValue(gear,"damage") - - if gDeflects >= 3 then + else DeleteGear(gear) AddVisualGear(GetX(gear), GetY(gear), vgtSmoke, 0, false) PlaySound(sndVaporize) - elseif gOwner ~= strucClan[tempID] then - --whether to vaporize gears or bounce them - if gDmg ~= 0 then - dx, dy = GetGearVelocity(gear) - - if (dx == 0) and (dy == 0) then - -- static mine, explosive, etc encountered - -- do nothing - else - - --let's bounce something! - - --if dx == 0 then - -- bounce away eggs - -- dx = 0.5 - --end - - dx = dx*(-1) - dy = dy*(-1) - SetGearVelocity(gear,dx,dy) - setGearValue(gear,"deflects",(gDeflects+1)) - - AddVisualGear(GetX(gear), GetY(gear), vgtExplosion, 0, false) - PlaySound(sndExplosion) - - strucHealth[tempID] = strucHealth[tempID] - gDmg - strucCircCol[tempID] = strucCircCol[tempID] - gDmg - - if strucHealth[tempID] <= 0 then - AddVisualGear(GetX(strucGear[tempID]), GetY(strucGear[tempID]), vgtExplosion, 0, false) - DeleteGear(strucGear[tempID]) - PlaySound(sndExplosion) - end - - end - - else - DeleteGear(gear) - AddVisualGear(GetX(gear), GetY(gear), vgtSmoke, 0, false) - PlaySound(sndVaporize) - end - end - end - - --mark as within range of a teleporter node - elseif strucType[tempID] == loc("Teleportation Node") then - - if GetGearType(gear) == gtHedgehog then - if GetHogClan(gear) == strucClan[tempID] then - --tempE = AddVisualGear(GetX(strucGear[tempID]), GetY(strucGear[tempID]), vgtSmoke, 0, true) - - for i = 1, #sProx do - if sProx[i][1] == loc("Teleportation Mode") then - sProx[i][2] = true - end - end - end end + end - -- mark as within range of construction station - -- and thus allow menu access to placement modes - -- for girders, mines, sticky mines and barrels - elseif strucType[tempID] == loc("Construction Station") then + --mark as within range of a teleporter node + elseif strucType[tempID] == loc("Teleportation Node") then + + if GetGearType(gear) == gtHedgehog then + if GetHogClan(gear) == strucClan[tempID] then - if GetGearType(gear) == gtHedgehog then - if GetHogClan(gear) == strucClan[tempID] then - tempE = AddVisualGear(GetX(strucGear[tempID]), GetY(strucGear[tempID]), vgtSmoke, 0, true) + for i = 1, #sProx do + if sProx[i][1] == loc("Teleportation Mode") then + sProx[i][2] = true + end + end + + end + end - for i = 1, #sProx do - if ((sProx[i][1] == loc("Girder Placement Mode")) - or (sProx[i][1] == loc("Rubber Placement Mode")) - or (sProx[i][1] == loc("Mine Placement Mode")) - or (sProx[i][1] == loc("Sticky Mine Placement Mode")) - or (sProx[i][1] == loc("Barrel Placement Mode"))) - then - sProx[i][2] = true - end + -- mark as within range of construction station + -- and thus allow menu access to placement modes + -- for girders, mines, sticky mines and barrels + elseif strucType[tempID] == loc("Construction Station") then + + if GetGearType(gear) == gtHedgehog then + if GetHogClan(gear) == strucClan[tempID] then + tempE = AddVisualGear(GetX(strucGear[tempID]), GetY(strucGear[tempID]), vgtSmoke, 0, true) + + for i = 1, #sProx do + if ((sProx[i][1] == loc("Girder Placement Mode")) + or (sProx[i][1] == loc("Rubber Placement Mode")) + or (sProx[i][1] == loc("Mine Placement Mode")) + or (sProx[i][1] == loc("Sticky Mine Placement Mode")) + or (sProx[i][1] == loc("Barrel Placement Mode"))) + then + sProx[i][2] = true end + end - end end + end - -- mark as within stupport station range - -- and thus allow menu access to placement modes - -- for weapon, utility, and med crates - elseif strucType[tempID] == loc("Support Station") then + -- mark as within stupport station range + -- and thus allow menu access to placement modes + -- for weapon, utility, and med crates + elseif strucType[tempID] == loc("Support Station") then - if GetGearType(gear) == gtHedgehog then - if GetHogClan(gear) == strucClan[tempID] then - tempE = AddVisualGear(GetX(strucGear[tempID]), GetY(strucGear[tempID]), vgtSmoke, 0, true) + if GetGearType(gear) == gtHedgehog then + if GetHogClan(gear) == strucClan[tempID] then + tempE = AddVisualGear(GetX(strucGear[tempID]), GetY(strucGear[tempID]), vgtSmoke, 0, true) - for i = 1, #sProx do - if ((sProx[i][1] == loc("Health Crate Placement Mode")) - or (sProx[i][1] == loc("Weapon Crate Placement Mode")) - or (sProx[i][1] == loc("Utility Crate Placement Mode"))) - then - sProx[i][2] = true - --AddCaption("wahey in a support station") - end + for i = 1, #sProx do + if ((sProx[i][1] == loc("Health Crate Placement Mode")) + or (sProx[i][1] == loc("Weapon Crate Placement Mode")) + or (sProx[i][1] == loc("Utility Crate Placement Mode"))) + then + sProx[i][2] = true end + end - end end - - -- doesn't do shit - elseif strucType[tempID] == loc("Core") then - - if GetGearType(gear) == gtHedgehog then - if GetHogClan(gear) == strucClan[tempID] then - - tempE = AddVisualGear(GetX(strucGear[tempID]), GetY(strucGear[tempID]), vgtSmoke, 0, true) - g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE) - SetVisualGearValues(tempE, g1+20, g2, g3, g4, g5, g6, g7, g8, g9, GetClanColor(strucClan[tempID]) ) - - tempE = AddVisualGear(GetX(strucGear[tempID]), GetY(strucGear[tempID]), vgtSmoke, 0, true) - g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE) - SetVisualGearValues(tempE, g1-20, g2, g3, g4, g5, g6, g7, g8, g9, GetClanColor(strucClan[tempID]) ) - - end - end - end - end - --end + end end @@ -849,70 +815,49 @@ function HandleStructures() - for i = 1, #sProx do - sProx[i][2] = false + if GameTime % 100 == 0 then + for i = 1, #sProx do + sProx[i][2] = false - if sProx[i][1] == loc("Structure Placement Mode") then - sProx[i][2] = true + if sProx[i][1] == loc("Structure Placement Mode") then + sProx[i][2] = true + end + end - end for i = 1, #strucID do - g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(strucCirc[i]) - SetVisualGearValues(strucCirc[i], GetX(strucGear[i]), GetY(strucGear[i]), g3, g4, g5, g6, g7, strucCircRadius[i], g9, strucCircCol[i]) + SetVisualGearValues(strucCirc[i], GetX(strucGear[i]), GetY(strucGear[i]), nil, nil, nil, nil, nil, strucCircRadius[i], nil, strucCircCol[i]) tempID = i - g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(strucAltDisplay[i]) --8000 - SetVisualGearValues(strucAltDisplay[i], GetX(strucGear[i]), GetY(strucGear[i]), 0, 0, g5, g6, 800000, sprTarget, g9, g10 ) - - + SetVisualGearValues(strucAltDisplay[i], GetX(strucGear[i]), GetY(strucGear[i]), 0, 0, nil, nil, 800000, sprTarget) - -- Check For proximity of stuff to our structures - if isAStructureThatAppliesToMultipleGears(i) then - runOnGears(CheckProximity) - else -- only check prox on CurrentHedgehog - CheckProximity(CurrentHedgehog) - end - - if strucType[i] == loc("Core") then - tempE = AddVisualGear(GetX(strucGear[i]), GetY(strucGear[i]), vgtSmoke, 0, true) - g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE) - SetVisualGearValues(tempE, g1, g2, g3, g4, g5, g6, g7, g8, g9, GetClanColor(strucClan[i]) ) - elseif strucType[i] == loc("Reflector Shield") then - - + if GameTime % 100 == 0 then + -- Check For proximity of stuff to our structures + if isAStructureThatAppliesToMultipleGears(i) then + runOnGears(CheckProximity) + else -- only check prox on CurrentHedgehog + if CurrentHedgehog ~= nil then + CheckProximity(CurrentHedgehog) + end + end - --frameID = 1 - --visualSprite = sprTarget - --g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(strucAltDisplay[i]) --frameID / g6 - --SetVisualGearValues(strucAltDisplay[i], GetX(strucGear[i]), GetY(strucGear[i]), 0, 0, g5, g6, 8000, visualSprite, g9, g10 ) - - elseif strucType[i] == loc("Generator") then + if strucType[i] == loc("Generator") then - --frameID = 1 - --visualSprite = sprTarget - --layer - --tempE = AddVisualGear(GetX(strucGear[i]), GetY(strucGear[i]), vgtStraightShot, 1, true,1) - --g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE) --g9 - --SetVisualGearValues(tempE, g1, g2, 0, 0, g5, frameID, g7, visualSprite, g9, g10 ) - --SetState(strucGear[i], bor(GetState(strucGear[i]),gstInvisible) ) + for z = 0, ClansCount-1 do + if z == strucClan[i] then + increaseGearValue(strucGear[i],"power") + if getGearValue(strucGear[i],"power") == 10 then + setGearValue(strucGear[i],"power",0) + clanPower[z] = clanPower[z] + 1 + if conf_maxEnergy ~= "inf" and clanPower[z] > conf_maxEnergy then + clanPower[z] = conf_maxEnergy + end + end - --currently generate power for all clans. - -- or should power only be generated for current clan? - for z = 0, ClansCount-1 do - if z == strucClan[i] then - increaseGearValue(strucGear[i],"power") - if getGearValue(strucGear[i],"power") == 10 then - setGearValue(strucGear[i],"power",0) - clanPower[z] = clanPower[z] + 1 - if clanPower[z] > 1000 then - clanPower[z] = 1000 - end end - end end @@ -925,47 +870,41 @@ -- this is kinda messy and gross (even more than usual), fix it up at some point -- it just assumes that if you have access to girders, it works for rubbers -- as that is what the struc implemenation means due to construction station - anyUIProx = false - for i = 1, #sProx do + if GameTime % 100 == 0 and CurrentHedgehog ~= nil then + anyUIProx = false + for i = 1, #sProx do - if sProx[i][1] == loc("Girder Placement Mode") then - if sProx[i][2] == true then - AddAmmo(CurrentHedgehog, amGirder, 100) - AddAmmo(CurrentHedgehog, amRubber, 100) - AddAmmo(CurrentHedgehog, amDrillStrike, 100) - else - AddAmmo(CurrentHedgehog, amGirder, 0) - AddAmmo(CurrentHedgehog, amRubber, 0) - AddAmmo(CurrentHedgehog, amDrillStrike, 0) -- new - end - elseif sProx[i][1] == loc("Teleportation Mode") then - if sProx[i][2] == true then - AddAmmo(CurrentHedgehog, amTeleport, 100) - else - AddAmmo(CurrentHedgehog, amTeleport, 0) + if sProx[i][1] == loc("Girder Placement Mode") then + if sProx[i][2] == true then + AddAmmo(CurrentHedgehog, amGirder, 100) + AddAmmo(CurrentHedgehog, amRubber, 100) + AddAmmo(CurrentHedgehog, amDrillStrike, 100) + else + AddAmmo(CurrentHedgehog, amGirder, 0) + AddAmmo(CurrentHedgehog, amRubber, 0) + AddAmmo(CurrentHedgehog, amDrillStrike, 0) -- new + end + elseif sProx[i][1] == loc("Teleportation Mode") then + if sProx[i][2] == true then + AddAmmo(CurrentHedgehog, amTeleport, 100) + else + AddAmmo(CurrentHedgehog, amTeleport, 0) + end + elseif sProx[i][1] == loc("Weapon Crate Placement Mode") then + -- this is new stuff + if sProx[i][2] == true then + AddAmmo(CurrentHedgehog, amNapalm, 100) + else + AddAmmo(CurrentHedgehog, amNapalm, 0) + end end - elseif sProx[i][1] == loc("Weapon Crate Placement Mode") then - -- this is new stuff - if sProx[i][2] == true then - AddAmmo(CurrentHedgehog, amNapalm, 100) - else - AddAmmo(CurrentHedgehog, amNapalm, 0) - end - end - if (sProx[i][2] == true) then - anyUIProx = true - end - - end + if (sProx[i][2] == true) then + anyUIProx = true + end - -- doesn't do shit atm, maybe later when we add cores we can use this - --if anyUIProx == true then --(and core is placed) - -- AddAmmo(CurrentHedgehog, amAirAttack, 100) - --else - -- AddAmmo(CurrentHedgehog, amAirAttack, 0) - --end - + end + end end @@ -1012,18 +951,17 @@ {amGrenade, "amGrenade", 0, loc("Grenade"), 2*placeholder}, {amClusterBomb, "amClusterBomb", 0, loc("Cluster Bomb"), 3*placeholder}, + {amWatermelon, "amWatermelon", 0, loc("Watermelon Bomb"), 25*placeholder}, + {amHellishBomb, "amHellishBomb", 0, loc("Hellish hand-grenade"), 25*placeholder}, {amMolotov, "amMolotov", 0, loc("Molotov Cocktail"), 3*placeholder}, - {amWatermelon, "amWatermelon", 0, loc("Watermelon Bomb"), 25*placeholder}, - {amHellishBomb, "amHellishBomb", 0, loc("Hellish Handgrenade"), 25*placeholder}, - {amGasBomb, "amGasBomb", 0, loc("Limburger"), 3*placeholder}, + {amGasBomb, "amGasBomb", 0, loc("Old Limburger"), 3*placeholder}, {amShotgun, "amShotgun", 0, loc("Shotgun"), 2*placeholder}, {amDEagle, "amDEagle", 0, loc("Desert Eagle"), 2*placeholder}, + {amSniperRifle, "amSniperRifle", 0, loc("Sniper Rifle"), 3*placeholder}, + --{amSineGun, "amSineGun", 0, loc("Sine Gun"), 6*placeholder}, {amFlamethrower,"amFlamethrower", 0, loc("Flamethrower"), 4*placeholder}, - {amSniperRifle, "amSniperRifle", 0, loc("Sniper Rifle"), 3*placeholder}, - --{amSineGun, "amSineGun", 0, loc("SineGun"), 6*placeholder}, {amIceGun, "amIceGun", 0, loc("Freezer"), 15*placeholder}, - {amLandGun, "amLandGun", 0, loc("Land Sprayer"), 5*placeholder}, {amFirePunch, "amFirePunch", 0, loc("Shoryuken"), 3*placeholder}, {amWhip, "amWhip", 0, loc("Whip"), 1*placeholder}, @@ -1041,9 +979,9 @@ --{amAirAttack, "amAirAttack", 0, loc("Air Attack"), 10*placeholder}, --{amMineStrike, "amMineStrike", 0, loc("Mine Strike"), 15*placeholder}, - --{amDrillStrike, "amDrillStrike", 0, loc("Drill Strike"), 15*placeholder}, --{amNapalm, "amNapalm", 0, loc("Napalm"), 15*placeholder}, --{amPiano, "amPiano", 0, loc("Piano Strike"), 40*placeholder}, + --{amDrillStrike, "amDrillStrike", 0, loc("Drill Strike"), 15*placeholder}, {amKnife, "amKnife", 0, loc("Cleaver"), 2*placeholder}, @@ -1053,44 +991,32 @@ utilArray = { - {amBlowTorch, "amBlowTorch", 0, loc("Blowtorch"), 4*placeholder}, - {amPickHammer, "amPickHammer", 0, loc("Pickhammer"), 2*placeholder}, + {amPickHammer, "amPickHammer", 0, loc("Pick Hammer"), 2*placeholder}, + {amBlowTorch, "amBlowTorch", 0, loc("Blow Torch"), 4*placeholder}, --{amGirder, "amGirder", 0, loc("Girder"), 4*placeholder}, - --{amRubber, "amRubber", 0, loc("Rubber Band"), 5*placeholder}, - {amPortalGun, "amPortalGun", 0, loc("Personal Portal Device"), 15*placeholder}, + {amLandGun, "amLandGun", 0, loc("Land Spray"), 5*placeholder}, + --{amRubber, "amRubber", 0, loc("Rubber"), 5*placeholder}, {amRope, "amRope", 0, loc("Rope"), 7*placeholder}, {amParachute, "amParachute", 0, loc("Parachute"), 2*placeholder}, --{amTeleport, "amTeleport", 0, loc("Teleport"), 6*placeholder}, {amJetpack, "amJetpack", 0, loc("Flying Saucer"), 8*placeholder}, + {amPortalGun, "amPortalGun", 0, loc("Portable Portal Device"), 15*placeholder}, {amInvulnerable, "amInvulnerable", 0, loc("Invulnerable"), 5*placeholder}, {amLaserSight, "amLaserSight", 0, loc("Laser Sight"), 2*placeholder}, {amVampiric, "amVampiric", 0, loc("Vampirism"), 6*placeholder}, + --{amResurrector, "amResurrector", 0, loc("Resurrector"), 8*placeholder}, + --{amTardis, "amTardis", 0, loc("Time Box"), 2*placeholder}, + --{amSwitch, "amSwitch", 0, loc("Switch Hog"), 4*placeholder} {amLowGravity, "amLowGravity", 0, loc("Low Gravity"), 4*placeholder}, {amExtraDamage, "amExtraDamage", 0, loc("Extra Damage"), 6*placeholder}, {amExtraTime, "amExtraTime", 0, loc("Extra Time"), 8*placeholder} - --{amResurrector, "amResurrector", 0, loc("Resurrector"), 8*placeholder}, - --{amTardis, "amTardis", 0, loc("Tardis"), 2*placeholder}, - - --{amSwitch, "amSwitch", 0, loc("Switch Hog"), 4*placeholder} } ---------------------------- --- hog and map editting junk ----------------------------- - - local reducedSpriteIDArray = { - sprBigDigit, sprKowtow, sprBee, sprExplosion50, sprGirder - } - - local reducedSpriteTextArray = { - "sprBigDigit", "sprKowtow", "sprBee", "sprExplosion50", "sprGirder" - } - ----------------------------- -- placement shite ---------------------------- @@ -1105,16 +1031,9 @@ "Mine Placement Mode", "Sticky Mine Placement Mode", "Barrel Placement Mode", - "Health Crate Placement Mode", "Weapon Crate Placement Mode", "Utility Crate Placement Mode", - --"Target Placement Mode", - --"Cleaver Placement Mode", - - --"Advanced Repositioning Mode", - --"Tagging Mode", - --"Sprite Testing Mode", - --"Sprite Placement Mode", + "Health Crate Placement Mode", "Structure Placement Mode" } @@ -1125,16 +1044,9 @@ {loc("Mine Placement Mode"),false}, {loc("Sticky Mine Placement Mode"),false}, {loc("Barrel Placement Mode"),false}, - {loc("Health Crate Placement Mode"),false}, {loc("Weapon Crate Placement Mode"),false}, {loc("Utility Crate Placement Mode"),false}, - --{loc("Target Placement Mode"),false}, - --{loc("Cleaver Placement Mode"),false}, - - --{loc("Advanced Repositioning Mode"),false}, - --{loc("Tagging Mode"),false}, - --{loc("Sprite Testing Mode"),false}, - --{loc("Sprite Placement Mode"),false}, + {loc("Health Crate Placement Mode"),false}, {loc("Structure Placement Mode"),false}, {loc("Teleportation Mode"),false} } @@ -1143,8 +1055,6 @@ local pMode = {} -- pMode contains custom subsets of the main categories local pIndex = 1 -local genTimer = 0 - local CGR = 1 -- current girder rotation, we actually need this as HW remembers what rotation you last used local placedX = {} @@ -1202,7 +1112,7 @@ placedSpec[placedCount] = pMode[pIndex] if (clanUsedExtraTime[GetHogClan(CurrentHedgehog)] == true) and (cat[cIndex] == "Utility Crate Placement Mode") and (utilArray[pIndex][1] == amExtraTime) then - AddCaption(loc("You may only use 1 Extra Time per turn."),0xffba00ff,capgrpVolume) + AddCaption(loc("You may only spawn 1 Extra Time per turn."),0xffba00ff,capgrpVolume) PlaySound(sndDenied) elseif (clanCratesSpawned[GetHogClan(CurrentHedgehog)] > 4) and ( (cat[cIndex] == "Health Crate Placement Mode") or (cat[cIndex] == "Utility Crate Placement Mode") or (cat[cIndex] == "Weapon Crate Placement Mode") ) then AddCaption(loc("You may only spawn 5 crates per turn."),0xffba00ff,capgrpVolume) @@ -1218,12 +1128,7 @@ placedSpec[placedCount] = CGR elseif cat[cIndex] == "Rubber Placement Mode" then PlaceSprite(x,y, sprAmRubber, CGR, nil, nil, nil, nil, lfBouncy) - --PlaceGirder(x, y, CGR) placedSpec[placedCount] = CGR - elseif cat[cIndex] == "Target Placement Mode" then - gear = AddGear(x, y, gtTarget, 0, 0, 0, 0) - elseif cat[cIndex] == "Cleaver Placement Mode" then - gear = AddGear(x, y, gtKnife, 0, 0, 0, 0) elseif cat[cIndex] == "Health Crate Placement Mode" then gear = SpawnHealthCrate(x,y) SetHealth(gear, pMode[pIndex]) @@ -1252,88 +1157,6 @@ SetTimer(gear, pMode[pIndex]) elseif cat[cIndex] == "Sticky Mine Placement Mode" then gear = AddGear(x, y, gtSMine, 0, 0, 0, 0) - elseif cat[cIndex] == "Advanced Repositioning Mode" then - - if pMode[pIndex] == "Selection Mode" then - closestDist = 999999999 - closestGear = nil -- just in case - sGear = nil - runOnGears(SelectGear) - sGear = closestGear - closestGear = nil - elseif pMode[pIndex] == "Placement Mode" then - if sGear ~= nil then - SetGearPosition(sGear, x, y) - end - end - - elseif cat[cIndex] == "Tagging Mode" then - - closestDist = 999999999 - closestGear = nil - sGear = nil - runOnGears(SelectGear) - - - if closestGear ~= nil then - - if getGearValue(closestGear,"tag") == nil then - - --if there is no tag, add a victory/failure tag and circle - setGearValue(closestGear, "tCirc",AddVisualGear(0,0,vgtCircle,0,true)) - - --AddCaption("circ added",0xffba00ff,capgrpVolume) - - if pMode[pIndex] == "Tag Victory Mode" then - setGearValue(closestGear, "tag","victory") - SetVisualGearValues(getGearValue(closestGear,"tCirc"), 0, 0, 100, 255, 1, 10, 0, 40, 3, 0xff0000ff) - elseif pMode[pIndex] == "Tag Failure Mode" then - setGearValue(closestGear, "tag","failure") - SetVisualGearValues(getGearValue(closestGear,"tCirc"), 0, 0, 100, 255, 1, 10, 0, 40, 3, 0x0000ffff) - end - - - else - -- remove tag and delete circ - --AddCaption("circ removed",0xffba00ff,capgrpVolume) - setGearValue(closestGear, "tag", nil) - DeleteVisualGear(getGearValue(closestGear,"tCirc")) - setGearValue(closestGear, "tCirc", nil) - end - - end - - - elseif cat[cIndex] == "Sprite Testing Mode" then - - frameID = 1 - visualSprite = reducedSpriteIDArray[pIndex] - --visualSprite = spriteIDArray[pIndex] - tempE = AddVisualGear(x, y, vgtStraightShot, 0, true) - g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE) - SetVisualGearValues(tempE, g1, g2, 0, 0, g5, frameID, g7, visualSprite, g9, g10 ) - --sprHorizonLong crashes game, so does skyL, as does flake - - -- reduced list of cool sprites - -- sprBigDigit, sprKnife, sprFrozenHog, sprKowtow, sprBee, sprExplosion50, sprPiano, sprChunk, sprHHTelepMask, sprSeduction, sprSwitch, sprGirder, - --sprAMAmmos, sprAMSlotKeys, sprTurnsLeft, sprExplosivesRoll + maybe some others like the health case, arrows, etc - - elseif cat[cIndex] == "Sprite Placement Mode" then - - PlaceSprite(x,y, reducedSpriteIDArray[pIndex], 1, nil, nil, nil, nil, landType) - --PlaceGirder(x, y, CGR) - placedSpec[placedCount] = reducedSpriteTextArray[pIndex] - placedSuperSpec[placedCount] = landType - - if landType == lfIce then - placedSuperSpec[placedCount] = "lfIce" - elseif landType == lfIndestructible then - placedSuperSpec[placedCount] = "lfIndestructible" - elseif landType == lfBouncy then - placedSuperSpec[placedCount] = "lfBouncy" - else - placedSuperSpec[placedCount] = "lfNormal" - end elseif cat[cIndex] == "Structure Placement Mode" then @@ -1367,64 +1190,35 @@ if cat[cIndex] == "Girder Placement Mode" then pIndex = CGR - pMode = {"Girder"} - -- pCount = 1 + pMode = {loc("Girder")} elseif cat[cIndex] == "Rubber Placement Mode" then pIndex = CGR - pMode = {"Rubber"} + pMode = {loc("Rubber")} placedExpense = 3 - -- pCount = 1??? - elseif cat[cIndex] == "Target Placement Mode" then - pMode = {"Standard Target"} - elseif cat[cIndex] == "Cleaver Placement Mode" then - pMode = {"Standard Cleaver"} elseif cat[cIndex] == "Barrel Placement Mode" then - --pMode = {1,50,75,100} - pMode = {50} + pMode = {60} placedExpense = 10 elseif cat[cIndex] == "Health Crate Placement Mode" then - --pMode = {25,50,75,100} - pMode = {25} + pMode = {HealthCaseAmount} placedExpense = 5 elseif cat[cIndex] == "Weapon Crate Placement Mode" then for i = 1, #atkArray do - pMode[i] = atkArray[i][4] -- was [2] - --placedExpense = atkArray[5] + pMode[i] = atkArray[i][4] end - placedExpense = 30 + placedExpense = atkArray[pIndex][5] elseif cat[cIndex] == "Utility Crate Placement Mode" then for i = 1, #utilArray do - pMode[i] = utilArray[i][4] -- was [2] - --placedExpense = utilArray[5] + pMode[i] = utilArray[i][4] end - placedExpense = 20 + placedExpense = utilArray[pIndex][5] elseif cat[cIndex] == "Mine Placement Mode" then - --pMode = {1,1000,2000,3000,4000,5000,0} - pMode = {1,1000,2000,3000,4000,5000} - -- 0 is dud right, or is that nil? + pMode = {0,1000,2000,3000,4000,5000} placedExpense = 15 elseif cat[cIndex] == "Sticky Mine Placement Mode" then - pMode = {"Normal Sticky Mine"} - --elseif cat[cIndex] == "Gear Repositioning Mode" then - -- for i = 1, #hhs do - -- pMode[i] = GetHogName(hhs[i]) - -- end + pMode = {loc("Sticky Mine")} placedExpense = 20 - elseif cat[cIndex] == "Advanced Repositioning Mode" then - pMode = {"Selection Mode","Placement Mode"} - elseif cat[cIndex] == "Tagging Mode" then - pMode = {"Tag Victory Mode","Tag Failure Mode"} - elseif cat[cIndex] == "Sprite Testing Mode" or cat[cIndex] == "Sprite Placement Mode" then - --for i = 1, #spriteTextArray do - -- pMode[i] = spriteTextArray[i] - --end - for i = 1, #reducedSpriteTextArray do - pMode[i] = reducedSpriteTextArray[i] - end - placedExpense = 100 elseif cat[cIndex] == "Structure Placement Mode" then - pMode = {loc("Healing Station"), loc("Bio-Filter"), loc("Weapon Filter"), loc("Reflector Shield"), loc("Respawner"),loc("Teleportation Node"),--[[loc("Core"),]]loc("Generator"),loc("Construction Station"),loc("Support Station")} - --placedExpense = 100 + pMode = {loc("Healing Station"), loc("Bio-Filter"), loc("Weapon Filter"), loc("Reflector Shield"), loc("Respawner"),loc("Teleportation Node"),loc("Generator"),loc("Construction Station"),loc("Support Station")} end @@ -1435,6 +1229,8 @@ -- called in onGameTick() function HandleHedgeEditor() + HandleStructures() + if CurrentHedgehog ~= nil then if wallsVisible == true then @@ -1444,19 +1240,18 @@ if (CurrentHedgehog ~= nil) and (TurnTimeLeft ~= TurnTime) then if (lastWep ~= GetCurAmmoType()) then checkForSpecialWeapons() + elseif checkForSpecialWeaponsIn == 0 then + checkForSpecialWeapons() + checkForSpecialWeaponsIn = -1 + else + checkForSpecialWeaponsIn = checkForSpecialWeaponsIn - 1 end end - genTimer = genTimer + 1 - - if genTimer >= 100 then - - genTimer = 0 + if GameTime % 100 == 0 then DrawTag(1) - HandleStructures() - curWep = GetCurAmmoType() -- change to girder mode on weapon swap @@ -1468,16 +1263,17 @@ RedefineSubset() -- change to generic mode if girder no longer selected elseif (cIndex == 1) and (curWep ~= amGirder) then - cIndex = 3 -- was 2 + cIndex = 3 RedefineSubset() elseif (cIndex == 2) and (curWep ~= amRubber) then - cIndex = 3 --new + cIndex = 3 RedefineSubset() end -- update display selection criteria - if (curWep == amGirder) or (curWep == amAirAttack) or (curWep == amNapalm) or (curWep == amDrillStrike) or (curWep == amRubber) then + if ((curWep == amGirder) or (curWep == amAirAttack) or (curWep == amNapalm) or (curWep == amDrillStrike) or (curWep == amRubber)) + and (CurrentHedgehog ~= nil or band(GetState(CurrentHedgehog), gstHHDriven) ~= 0) then ---------------hooolllllyyyy fucking shit this -- code is a broken mess now @@ -1518,7 +1314,7 @@ AddCaption(loc(cat[cIndex]),0xffba00ff,capgrpMessage) - AddCaption(pMode[pIndex],0xffba00ff,capgrpMessage2) + showModeMessage() wallsVisible = true else wallsVisible = false @@ -1528,17 +1324,6 @@ end - --update selected gear display - if (cat[cIndex] == "Advanced Repositioning Mode") and (sGear ~= nil) then - SetVisualGearValues(sCirc, GetX(sGear), GetY(sGear), 100, 255, 1, 10, 0, 300, 3, 0xff00ffff) - elseif (cat[cIndex] == "Tagging Mode") then - if (sGear ~= nil) or (closestGear ~= nil) then - SetVisualGearValues(sCirc, GetX(sGear), GetY(sGear), 0, 1, 1, 10, 0, 1, 1, 0x00000000) - closestGear = nil - sGear = nil - end - end - -- some kind of target detected, tell me your story if cGear ~= nil then @@ -1555,52 +1340,13 @@ CGR = GetState(cGear) - -- improve rectangle test based on CGR when you can be bothered - --if TestRectForObstacle(x-20, y-20, x+20, y+20, true) then - -- AddCaption("Invalid Girder Placement",0xffba00ff,capgrpVolume) - --else - PlaceObject(x, y) - --end - - -- this allows the girder tool to be used like a mining laser - - --[[ - - if CGR < 4 then - AddGear(x, y, gtGrenade, 0, 0, 0, 1) - elseif CGR == 4 then - g = AddGear(x-30, y, gtGrenade, 0, 0, 0, 1) - g = AddGear(x+30, y, gtGrenade, 0, 0, 0, 1) - elseif CGR == 5 then ------- - g = AddGear(x+30, y+30, gtGrenade, 0, 0, 0, 1) - g = AddGear(x-30, y-30, gtGrenade, 0, 0, 0, 1) - elseif CGR == 6 then - g = AddGear(x, y+30, gtGrenade, 0, 0, 0, 1) - g = AddGear(x, y-30, gtGrenade, 0, 0, 0, 1) - elseif CGR == 7 then ------- - g = AddGear(x+30, y-30, gtGrenade, 0, 0, 0, 1) - g = AddGear(x-30, y+30, gtGrenade, 0, 0, 0, 1) - end -]] + PlaceObject(x, y) end end end --------------------------------------------------- --- EVENT HANDLERS --------------------------------------------------- - -function onTaunt(t) - tauntString = tauntString .. t - if (tauntString == "101") and (clanPower[GetHogClan(CurrentHedgehog)] < 300) and (clanBoon[GetHogClan(CurrentHedgehog)] == false) then - clanBoon[GetHogClan(CurrentHedgehog)] = true - clanPower[GetHogClan(CurrentHedgehog)] = 1000 - AddCaption(loc("The Great Hog in the sky sees your sadness and grants you a boon.")) - end -end - --------------------------------------------------------------- -- Cycle through selection subsets (by changing pIndex, pMode) -- i.e health of barrels, medikits, @@ -1611,6 +1357,8 @@ function updateCost() + if CurrentHedgehog == nil or band(GetState(CurrentHedgehog), gstHHDriven) == 0 then return end + if pMode[pIndex] == loc("Healing Station") then placedExpense = 50 elseif pMode[pIndex] == loc("Weapon Filter") then @@ -1629,11 +1377,9 @@ placedExpense = 300 elseif pMode[pIndex] == loc("Reflector Shield") then placedExpense = 200 - elseif pMode[pIndex] == loc("Core") then - placedExpense = 1 - elseif cat[cIndex] == loc("Weapon Crate Placement Mode") then + elseif cat[cIndex] == "Weapon Crate Placement Mode" then placedExpense = atkArray[pIndex][5] - elseif cat[cIndex] == loc("Utility Crate Placement Mode") then + elseif cat[cIndex] == "Utility Crate Placement Mode" then placedExpense = utilArray[pIndex][5] end @@ -1641,6 +1387,12 @@ end +function onTimer(key) + + checkForSpecialWeaponsIn = 1 + +end + function onLeft() pIndex = pIndex - 1 @@ -1649,7 +1401,7 @@ end if (curWep == amGirder) or (curWep == amAirAttack) or (curWep == amNapalm) or (curWep == amDrillStrike) then - AddCaption(pMode[pIndex],0xffba00ff,capgrpMessage2) + showModeMessage() updateCost() end @@ -1664,12 +1416,28 @@ end if (curWep == amGirder) or (curWep == amAirAttack) or (curWep == amNapalm) or (curWep == amDrillStrike) then - AddCaption(pMode[pIndex],0xffba00ff,capgrpMessage2) + showModeMessage() updateCost() end end +function showModeMessage() + if CurrentHedgehog == nil or band(GetState(CurrentHedgehog), gstHHDriven) == 0 then return end + local val = pMode[pIndex] + local str + if cat[cIndex] == "Mine Placement Mode" then + -- timer in seconds + str = string.format(loc("%d sec"), div(val, 1000)) + elseif cat[cIndex] == "Girder Placement Mode" then + str = loc("Girder") + elseif cat[cIndex] == "Rubber Placement Mode" then + str = loc("Rubber") + else + str = tostring(val) + end + AddCaption(str,0xffba00ff,capgrpMessage2) +end function updatePlacementDisplay(pDir) @@ -1683,10 +1451,6 @@ cIndex = 3 -- 2 ----we no longer hit girder by normal means end - -- new way of doing things - -- sProx[cIndex][2] == true just basically means we have ACCESS to something - -- but that doesn't neccessarily mean we are in the correct content menu, anymore - -- so we need to refine this a little if sProx[cIndex][2] == true then if (GetCurAmmoType() == amNapalm) then if (sProx[cIndex][1] == loc("Health Crate Placement Mode")) or @@ -1711,9 +1475,6 @@ if foundMatch == true then - --if sProx[cIndex][2] == true then - -- normal case (scrolling through) - --foundMatch = true RedefineSubset() updateCost() end @@ -1729,16 +1490,20 @@ --------------------------------------------------------- function onUp() - if ((curWep == amAirAttack) or (curWep == amNapalm) or (curWep == amDrillStrike) ) then - updatePlacementDisplay(-1) + if ( (curWep == amNapalm) or (curWep == amDrillStrike) ) then + if CurrentHedgehog ~= nil or band(GetState(CurrentHedgehog), gstHHDriven) ~= 0 then + updatePlacementDisplay(-1) + end end end function onDown() - if ((curWep == amAirAttack) or (curWep == amNapalm) or (curWep == amDrillStrike) ) then - updatePlacementDisplay(1) + if ( (curWep == amNapalm) or (curWep == amDrillStrike) ) then + if CurrentHedgehog ~= nil or band(GetState(CurrentHedgehog), gstHHDriven) ~= 0 then + updatePlacementDisplay(1) + end end end @@ -1747,6 +1512,29 @@ -- standard event handlers ---------------------------- +-- Parses a positive integer +function parseInt(str, default) + if str == nil then return default end + local s = string.match(str, "(%d*)") + if s ~= nil then + return math.min(4294967295, math.max(0, tonumber(s))) + else + return nil + end +end + +-- Parse parameters +function onParameters() + parseParams() + conf_initialEnergy = parseInt(params["initialenergy"], conf_initialEnergy) + conf_energyPerRound = parseInt(params["energyperround"], conf_energyPerRound) + if params["maxenergy"] == "inf" then + conf_maxEnergy = "inf" + else + conf_maxEnergy = parseInt(params["maxenergy"], conf_maxEnergy) + end +end + function onGameInit() Explosives = 0 @@ -1754,6 +1542,12 @@ EnableGameFlags(gfInfAttack) + fortMode = (MapGen == mgForts) or GetGameFlag(gfForts) + + -- if there are forts, let engine place the hogs on them + if fortMode then + EnableGameFlags(gfDivideTeams) + end RedefineSubset() @@ -1761,7 +1555,10 @@ function initialSetup(gear) - FindPlace(gear, false, clanBoundsSX[GetHogClan(gear)], clanBoundsEX[GetHogClan(gear)],true) + -- engine already placed hogs in fort mode + if not fortMode then + FindPlace(gear, false, clanBoundsSX[GetHogClan(gear)], clanBoundsEX[GetHogClan(gear)],true) + end -- for now, everyone should have this stuff AddAmmo(gear, amAirAttack, 100) @@ -1777,13 +1574,10 @@ ShowMission ( loc("CONSTRUCTION MODE"), loc("a Hedgewars mini-game"), - " " .. "|" .. loc("Build a fortress and destroy your enemy.") .. "|" .. - --loc("Defend your core from the enemy.") .. "|" .. loc("There are a variety of structures available to aid you.") .. "|" .. loc("Use the air-attack weapons and the arrow keys to select structures.") .. "|" .. " " .. "|" .. - --loc("Core") .. ": " .. loc("Allows placement of structures.") .. "|" .. loc("Healing Station") .. ": " .. loc("Grants nearby hogs life-regeneration.") .. "|" .. loc("Bio-Filter") .. ": " .. loc("Aggressively removes enemy hedgehogs.") .. "|" .. loc("Weapon Filter") .. ": " .. loc("Dematerializes weapons and equipment carried by enemy hedgehogs.") .. "|" .. @@ -1793,12 +1587,8 @@ loc("Respawner") .. ": " .. loc("Resurrects dead hedgehogs.") .. "|" .. loc("Teleportation Node") .. ": " .. loc("Allows free teleportation between other nodes.") .. "|" .. loc("Construction Station") .. ": " .. loc("Allows placement of girders, rubber-bands, mines, sticky mines and barrels.") .. "|" .. - loc("Support Station") .. ": " .. loc("Allows the placement of weapons, utiliites, and health crates.") .. "|" .. - - - " " .. "|" .. - --" " .. "|" .. - "", 4, 5000 + loc("Support Station") .. ": " .. loc("Allows the placement of weapons, utiliites, and health crates.") + , 4, 5000 ) @@ -1806,14 +1596,13 @@ SetVisualGearValues(sCirc, 0, 0, 100, 255, 1, 10, 0, 40, 3, 0x00000000) for i = 0, ClansCount-1 do - clanPower[i] = 500 - clanBoon[i] = false + clanPower[i] = conf_initialEnergy clanLWepIndex[i] = 1 -- for ease of use let's track this stuff clanLUtilIndex[i] = 1 clanLGearIndex[i] = 1 clanUsedExtraTime[i] = false clanCratesSpawned[i] = 0 - + clanFirstTurn[i] = true end @@ -1821,20 +1610,30 @@ tMapHeight = WaterLine - TopY clanInterval = div(tMapWidth,ClansCount) - for i = 1, ClansCount do + -- define construction areas for each clan + -- if there are forts-based spawn locations, adjust areas around them + for i = 0, ClansCount-1 do + local slot + if fortMode then + slot = div(GetX(getFirstHogOfClan(i))-LeftX,clanInterval) + else + slot = i + end - clanBoundsSX[i-1] = LeftX+(clanInterval*i)-clanInterval+20 - clanBoundsSY[i-1] = TopY - clanBoundsEX[i-1] = LeftX+(clanInterval*i)-20 - clanBoundsEY[i-1] = WaterLine + local color = GetClanColor(i) + + clanBoundsSX[i] = LeftX+(clanInterval*slot)+20 + clanBoundsSY[i] = TopY + clanBoundsEX[i] = LeftX+(clanInterval*slot)+clanInterval-20 + clanBoundsEY[i] = WaterLine --top and bottom - AddWall(LeftX+(clanInterval*i)-clanInterval,TopY,clanInterval,margin,GetClanColor(i-1)) - AddWall(LeftX+(clanInterval*i)-clanInterval,WaterLine-25,clanInterval,margin,GetClanColor(i-1)) + AddWall(LeftX+(clanInterval*slot),TopY,clanInterval,margin,color) + AddWall(LeftX+(clanInterval*slot),WaterLine-25,clanInterval,margin,color) --add a wall to the left and right - AddWall(LeftX+(clanInterval*i)-clanInterval+20,TopY,margin,WaterLine,GetClanColor(i-1)) - AddWall(LeftX+(clanInterval*i)-20,TopY,margin,WaterLine,GetClanColor(i-1)) + AddWall(LeftX+(clanInterval*slot)+20,TopY,margin,WaterLine,color) + AddWall(LeftX+(clanInterval*slot)+clanInterval-20,TopY,margin,WaterLine,color) end @@ -1845,10 +1644,17 @@ function onNewTurn() - tauntString = "" - clanPower[GetHogClan(CurrentHedgehog)] = clanPower[GetHogClan(CurrentHedgehog)] + 50 - clanUsedExtraTime[GetHogClan(CurrentHedgehog)] = false - clanCratesSpawned[GetHogClan(CurrentHedgehog)] = 0 + local clan = GetHogClan(CurrentHedgehog) + if clanFirstTurn[clan] then + clanFirstTurn[clan] = false + else + clanPower[clan] = clanPower[clan] + conf_energyPerRound + if conf_maxEnergy ~= "inf" and clanPower[clan] > conf_maxEnergy then + clanPower[clan] = conf_maxEnergy + end + end + clanUsedExtraTime[clan] = false + clanCratesSpawned[clan] = 0 end @@ -1871,7 +1677,6 @@ function onGearAdd(gear) if GetGearType(gear) == gtHedgehog then - --table.insert(hhs, gear) elseif (GetGearType(gear) == gtAirAttack) or (GetGearType(gear) == gtTeleport) or (GetGearType(gear) == gtGirder) then cGear = gear diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Scripts/TargetPractice.lua --- a/share/hedgewars/Data/Scripts/TargetPractice.lua Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Scripts/TargetPractice.lua Tue May 17 23:29:49 2016 +0300 @@ -150,12 +150,7 @@ end _G.onNewTurn = function() - -- TODO: Remove the else branch when 0.9.21 has been released - if SetWeapon ~= nil then - SetWeapon(params.ammoType) - else - ParseCommand("/setweap "..string.char(params.ammoType)) - end + SetWeapon(params.ammoType) end _G.spawnTarget = function() @@ -165,6 +160,8 @@ y = targets[scored+1].y SetGearPosition(gear, x, y) + + return gear end _G.onGameTick20 = function() @@ -229,6 +226,18 @@ end end + _G.onGearDelete = function(gear) + if GetGearType(gear) == gtTarget and band(GetState(gear), gstDrowning) ~= 0 then + AddCaption(loc("You lost your target, try again!", 0xFFFFFFFF, capgrpGameState)) + local newTarget = spawnTarget() + local x, y = GetGearPosition(newTarget) + local success = PlaceSprite(x, y + 24, sprAmGirder, 0, 0xFFFFFFFF, false, false, false) + if not success then + WriteLnToConsole("ERROR: Failed to spawn girder under respawned target!") + end + end + end + _G.generateStats = function() local accuracy = (scored/shots)*100 local end_score_targets = scored * math.ceil(6000/#targets) @@ -254,7 +263,7 @@ end end_score_overall = end_score_targets end + SendStat(siPointType, loc("point(s)")) SendStat(siPlayerKills, tostring(end_score_overall), loc(params.teamName)) - SendStat(siPointType, loc("points")) end end diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Scripts/Tracker.lua --- a/share/hedgewars/Data/Scripts/Tracker.lua Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Scripts/Tracker.lua Tue May 17 23:29:49 2016 +0300 @@ -243,6 +243,18 @@ end end +-- Returns the first hog (alive or not) in the given clan +function getFirstHogOfClan(clan) + for k, hogs in pairs(teams) do + for m, hog in ipairs(hogs) do + if GetHogClan(hog) == clan then + return hog + end + end + end + return nil +end + -- Run a function on all tracked hogs function runOnHogs(func) for k, hogs in pairs(teams) do diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Shaders/default.fs --- a/share/hedgewars/Data/Shaders/default.fs Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Shaders/default.fs Tue May 17 23:29:49 2016 +0300 @@ -1,3 +1,5 @@ +precision mediump float; + uniform sampler2D tex0; uniform vec4 tint; uniform bool enableTexture; diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Shaders/default.vs --- a/share/hedgewars/Data/Shaders/default.vs Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Shaders/default.vs Tue May 17 23:29:49 2016 +0300 @@ -1,4 +1,4 @@ - +precision mediump float; attribute vec2 vertex; attribute vec2 texcoord; diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Shaders/water.fs --- a/share/hedgewars/Data/Shaders/water.fs Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Shaders/water.fs Tue May 17 23:29:49 2016 +0300 @@ -1,3 +1,4 @@ +precision mediump float; varying vec4 vcolor; diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Shaders/water.vs --- a/share/hedgewars/Data/Shaders/water.vs Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Shaders/water.vs Tue May 17 23:29:49 2016 +0300 @@ -1,4 +1,4 @@ - +precision mediump float; attribute vec2 vertex; attribute vec4 color; diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Sounds/airmine_impact.ogg Binary file share/hedgewars/Data/Sounds/airmine_impact.ogg has changed diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Sounds/extratime.ogg Binary file share/hedgewars/Data/Sounds/extratime.ogg has changed diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Sounds/knife_impact.ogg Binary file share/hedgewars/Data/Sounds/knife_impact.ogg has changed diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/Art/CMakeLists.txt --- a/share/hedgewars/Data/Themes/Art/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Themes/Art/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -3,4 +3,5 @@ install(FILES theme.cfg ${images} + credits.txt DESTINATION ${SHAREPATH}Data/Themes/Art) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/Art/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Themes/Art/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,1 @@ +Zippy \ No newline at end of file diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/Bamboo/CMakeLists.txt --- a/share/hedgewars/Data/Themes/Bamboo/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Themes/Bamboo/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -3,4 +3,5 @@ install(FILES theme.cfg ${images} + credits.txt DESTINATION ${SHAREPATH}Data/Themes/Bamboo) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/Bamboo/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Themes/Bamboo/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,1 @@ +Joshua Frese \ No newline at end of file diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/Brick/CMakeLists.txt --- a/share/hedgewars/Data/Themes/Brick/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Themes/Brick/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -3,4 +3,5 @@ install(FILES theme.cfg ${images} + credits.txt DESTINATION ${SHAREPATH}Data/Themes/Brick) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/Brick/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Themes/Brick/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,1 @@ +AlexYeCu \ No newline at end of file diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/Cake/CMakeLists.txt --- a/share/hedgewars/Data/Themes/Cake/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Themes/Cake/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -3,4 +3,5 @@ install(FILES theme.cfg ${images} + credits.txt DESTINATION ${SHAREPATH}Data/Themes/Cake) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/Cake/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Themes/Cake/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,1 @@ +Randy \ No newline at end of file diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/Cave/CMakeLists.txt --- a/share/hedgewars/Data/Themes/Cave/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Themes/Cave/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -1,6 +1,8 @@ file(GLOB images *.png) +file(GLOB credits.txt credits) install(FILES theme.cfg ${images} + credits.txt DESTINATION ${SHAREPATH}Data/Themes/Cave) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/Cave/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Themes/Cave/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,1 @@ +Guillaume Englert diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/City/CMakeLists.txt --- a/share/hedgewars/Data/Themes/City/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Themes/City/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -3,4 +3,5 @@ install(FILES theme.cfg ${images} + credits.txt DESTINATION ${SHAREPATH}Data/Themes/City) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/City/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Themes/City/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,1 @@ +John Dum \ No newline at end of file diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/EarthRise/CMakeLists.txt --- a/share/hedgewars/Data/Themes/EarthRise/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Themes/EarthRise/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -3,4 +3,5 @@ install(FILES theme.cfg ${images} + credits.txt DESTINATION ${SHAREPATH}Data/Themes/EarthRise) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/EarthRise/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Themes/EarthRise/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,1 @@ +Joshua Frese \ No newline at end of file diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/Freeway/CMakeLists.txt --- a/share/hedgewars/Data/Themes/Freeway/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Themes/Freeway/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -3,4 +3,5 @@ install(FILES theme.cfg ${images} + credits.txt DESTINATION ${SHAREPATH}Data/Themes/Freeway) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/Freeway/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Themes/Freeway/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,1 @@ +Joshua Frese \ No newline at end of file diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/Fruit/CMakeLists.txt --- a/share/hedgewars/Data/Themes/Fruit/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Themes/Fruit/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -3,4 +3,5 @@ install(FILES theme.cfg ${images} + credits.txt DESTINATION ${SHAREPATH}Data/Themes/Fruit) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/Fruit/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Themes/Fruit/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,1 @@ +Randy \ No newline at end of file diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/Golf/CMakeLists.txt --- a/share/hedgewars/Data/Themes/Golf/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Themes/Golf/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -3,4 +3,5 @@ install(FILES theme.cfg ${images} + credits.txt DESTINATION ${SHAREPATH}Data/Themes/Golf) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/Golf/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Themes/Golf/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,1 @@ +RoFra \ No newline at end of file diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/Hell/CMakeLists.txt --- a/share/hedgewars/Data/Themes/Hell/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Themes/Hell/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -3,4 +3,5 @@ install(FILES theme.cfg ${images} + credits.txt DESTINATION ${SHAREPATH}Data/Themes/Hell) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/Hell/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Themes/Hell/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,1 @@ +Stanko Tadić \ No newline at end of file diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/Hoggywood/CMakeLists.txt --- a/share/hedgewars/Data/Themes/Hoggywood/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Themes/Hoggywood/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -3,4 +3,5 @@ install(FILES theme.cfg ${images} + credits.txt DESTINATION ${SHAREPATH}Data/Themes/Hoggywood) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/Hoggywood/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Themes/Hoggywood/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,1 @@ +RoFra, Wuzzy \ No newline at end of file diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/Jungle/CMakeLists.txt --- a/share/hedgewars/Data/Themes/Jungle/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Themes/Jungle/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -3,4 +3,5 @@ install(FILES theme.cfg ${images} + credits.txt DESTINATION ${SHAREPATH}Data/Themes/Jungle) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/Jungle/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Themes/Jungle/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,1 @@ +KoRn666 \ No newline at end of file diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/Nature/CMakeLists.txt --- a/share/hedgewars/Data/Themes/Nature/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Themes/Nature/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -3,4 +3,5 @@ install(FILES theme.cfg ${images} + credits.txt DESTINATION ${SHAREPATH}Data/Themes/Nature) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/Nature/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Themes/Nature/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,1 @@ +John Dum \ No newline at end of file diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/Sheep/CMakeLists.txt --- a/share/hedgewars/Data/Themes/Sheep/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Themes/Sheep/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -3,4 +3,5 @@ install(FILES theme.cfg ${images} + credits.txt DESTINATION ${SHAREPATH}Data/Themes/Sheep) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/Sheep/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Themes/Sheep/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,1 @@ +Julien Koesten \ No newline at end of file diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/Snow/CMakeLists.txt --- a/share/hedgewars/Data/Themes/Snow/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Themes/Snow/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -3,4 +3,5 @@ install(FILES theme.cfg ${images} + credits.txt DESTINATION ${SHAREPATH}Data/Themes/Snow) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/Snow/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Themes/Snow/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,1 @@ +John Dum \ No newline at end of file diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/Stage/CMakeLists.txt --- a/share/hedgewars/Data/Themes/Stage/CMakeLists.txt Tue May 17 23:18:08 2016 +0300 +++ b/share/hedgewars/Data/Themes/Stage/CMakeLists.txt Tue May 17 23:29:49 2016 +0300 @@ -3,4 +3,5 @@ install(FILES theme.cfg ${images} + credits.txt DESTINATION ${SHAREPATH}Data/Themes/Stage) diff -r 8c71c5a1172f -r a69124eb7ce7 share/hedgewars/Data/Themes/Stage/credits.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Themes/Stage/credits.txt Tue May 17 23:29:49 2016 +0300 @@ -0,0 +1,1 @@ +RoFra \ No newline at end of file