# HG changeset patch
# User sheepluva
# Date 1461870908 -7200
# Node ID abcdb7bc2620244780a6f5a1a396b5605bfa4d8a
# Parent 54a1ac4123cd206cddbc7046a79650c6b509e437# Parent 10860d4bca227d1c062725ec355669b5a2756bcf
merge 3 new sound effects added by Wuzzy
diff -r 10860d4bca22 -r abcdb7bc2620 .travis.yml
--- a/.travis.yml Wed Apr 13 12:17:30 2016 +0200
+++ b/.travis.yml Thu Apr 28 21:15:08 2016 +0200
@@ -1,50 +1,60 @@
language: c
+sudo: false
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 -DLUA_SYSTEM=0 -DPHYSFS_SYSTEM=0"
+
matrix:
include:
+ - 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: objective-c
+ sudo: required
os: osx
- compiler:
- env: BUILD_ARGS="IOS" SDL_LIB_PATH="$TRAVIS_BUILD_DIR/../Library"
+ 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
- brew install sdl2_mixer --with-vorbis
+ brew install sdl2_mixer --with-libvorbis
# use cabal install haskell deps, pas2c ones are covered by server
if [[ "$BUILD_ARGS" != *"NOSERVER"* ]]; then
cabal update
@@ -55,31 +65,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 10860d4bca22 -r abcdb7bc2620 CMakeLists.txt
--- a/CMakeLists.txt Wed Apr 13 12:17:30 2016 +0200
+++ b/CMakeLists.txt Thu Apr 28 21:15:08 2016 +0200
@@ -41,6 +41,7 @@
option(SKIPBUNDLE "Do not create relocate bundle (off)" OFF)
option(BUILD_ENGINE_C "Compile hwengine as native C (off)" OFF)
+option(BUILD_ENGINE_JS "Compile hwengine as javascript (off)" OFF)
option(GL2 "Enable OpenGL 2 rendering !!!EXPERIMENTAL - DO NOT USE!!! [default: off)" OFF)
set(GHFLAGS "" CACHE STRING "Additional Haskell flags")
@@ -50,6 +51,25 @@
option(NOVERSIONINFOUPDATE "Disable update of version_info.txt. To be used if source is in a git/repo that is NOT the hedgewars repo" OFF)
+
+if(BUILD_ENGINE_JS)
+ if(NOT CMAKE_TOOLCHAIN_FILE)
+ 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(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)
+ set(NOVIDEOREC ON CACHE STRING "Required for BUILD_ENGINE_JS" FORCE)
+ 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)
#subdirectories will NOT be searched.
#all fonts that can't be found will be bundled with hedgewars
@@ -69,8 +89,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)
@@ -90,7 +108,10 @@
#perform safe check that enable/disable compilation features
-include(${CMAKE_MODULE_PATH}/compilerchecks.cmake)
+#skip when crosscompiling to javascript
+if(NOT BUILD_ENGINE_JS)
+ include(${CMAKE_MODULE_PATH}/compilerchecks.cmake)
+endif()
#set default compiler flags
add_flag_append(CMAKE_C_FLAGS "-Wall -pipe")
@@ -135,7 +156,7 @@
#build engine without freepascal
-if(BUILD_ENGINE_C)
+if(BUILD_ENGINE_C AND NOT BUILD_ENGINE_JS)
find_package(Clang REQUIRED)
if(${CLANG_VERSION} VERSION_LESS "3.0")
@@ -232,9 +253,13 @@
if(ANDROID)
add_subdirectory(project_files/Android-build)
else(ANDROID)
+ #skip frontend for javascript
+ if(NOT BUILD_ENGINE_JS)
+ add_subdirectory(QTfrontend)
+ add_subdirectory(share)
+ endif()
+
add_subdirectory(bin)
- add_subdirectory(QTfrontend)
- add_subdirectory(share)
add_subdirectory(tools)
endif(ANDROID)
diff -r 10860d4bca22 -r abcdb7bc2620 CREDITS
--- a/CREDITS Wed Apr 13 12:17:30 2016 +0200
+++ b/CREDITS Thu Apr 28 21:15:08 2016 +0200
@@ -75,7 +75,7 @@
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
+- 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/
diff -r 10860d4bca22 -r abcdb7bc2620 ChangeLog.txt
--- a/ChangeLog.txt Wed Apr 13 12:17:30 2016 +0200
+++ b/ChangeLog.txt Thu Apr 28 21:15:08 2016 +0200
@@ -6,12 +6,16 @@
+ Highlander mode displays game scheme specifics (mines timer, etc.) in ESC info
+ AI hedgehogs know how to use Bee now
+ Small visual effects enhancements
+ + 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.
* 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 SD-flakes of themes not working if regular flakes were disabled
* Various other fixes
Lua-API:
diff -r 10860d4bca22 -r abcdb7bc2620 QTfrontend/hedgewars.qrc
--- a/QTfrontend/hedgewars.qrc Wed Apr 13 12:17:30 2016 +0200
+++ b/QTfrontend/hedgewars.qrc Thu Apr 28 21:15:08 2016 +0200
@@ -122,7 +122,10 @@
res/btnBottomBorder@2x.pngres/iconBox.pngres/iconHealth.png
+ res/iconHealthPercent.pngres/iconSuddenDeath.png
+ res/iconSuddenDeathTime.png
+ res/iconSuddenDeathWater.pngres/iconDamage.pngres/iconDamageLockG.pngres/iconDamageLockR.png
@@ -130,9 +133,13 @@
res/iconTimeLockG.pngres/iconTimeLockR.pngres/iconMine.png
+ res/iconMineTime.pngres/iconDud.png
+ res/iconExplosive.png
+ res/iconAirMine.pngres/iconRope.pngres/iconEarth.png
+ res/iconScript.pngres/dice.pngres/Star.pngres/inverse-corner-bl.png
diff -r 10860d4bca22 -r abcdb7bc2620 QTfrontend/hwconsts.cpp.in
--- a/QTfrontend/hwconsts.cpp.in Wed Apr 13 12:17:30 2016 +0200
+++ b/QTfrontend/hwconsts.cpp.in Thu Apr 28 21:15:08 2016 +0200
@@ -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 10860d4bca22 -r abcdb7bc2620 QTfrontend/hwconsts.h
--- a/QTfrontend/hwconsts.h Wed Apr 13 12:17:30 2016 +0200
+++ b/QTfrontend/hwconsts.h Thu Apr 28 21:15:08 2016 +0200
@@ -42,6 +42,7 @@
class QStandardItemModel;
extern QString * cDefaultAmmoStore;
+extern QString * cEmptyAmmoStore;
extern int cAmmoNumber;
extern QList< QPair > cDefaultAmmos;
diff -r 10860d4bca22 -r abcdb7bc2620 QTfrontend/model/MapModel.cpp
--- a/QTfrontend/model/MapModel.cpp Wed Apr 13 12:17:30 2016 +0200
+++ b/QTfrontend/model/MapModel.cpp Thu Apr 28 21:15:08 2016 +0200
@@ -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 10860d4bca22 -r abcdb7bc2620 QTfrontend/model/MapModel.h
--- a/QTfrontend/model/MapModel.h Wed Apr 13 12:17:30 2016 +0200
+++ b/QTfrontend/model/MapModel.h Thu Apr 28 21:15:08 2016 +0200
@@ -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 10860d4bca22 -r abcdb7bc2620 QTfrontend/model/ThemeModel.cpp
--- a/QTfrontend/model/ThemeModel.cpp Wed Apr 13 12:17:30 2016 +0200
+++ b/QTfrontend/model/ThemeModel.cpp Thu Apr 28 21:15:08 2016 +0200
@@ -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 10860d4bca22 -r abcdb7bc2620 QTfrontend/model/ThemeModel.h
--- a/QTfrontend/model/ThemeModel.h Wed Apr 13 12:17:30 2016 +0200
+++ b/QTfrontend/model/ThemeModel.h Thu Apr 28 21:15:08 2016 +0200
@@ -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 10860d4bca22 -r abcdb7bc2620 QTfrontend/model/roomslistmodel.cpp
--- a/QTfrontend/model/roomslistmodel.cpp Wed Apr 13 12:17:30 2016 +0200
+++ b/QTfrontend/model/roomslistmodel.cpp Thu Apr 28 21:15:08 2016 +0200
@@ -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 10860d4bca22 -r abcdb7bc2620 QTfrontend/net/hwmap.h
--- a/QTfrontend/net/hwmap.h Wed Apr 13 12:17:30 2016 +0200
+++ b/QTfrontend/net/hwmap.h Thu Apr 28 21:15:08 2016 +0200
@@ -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 10860d4bca22 -r abcdb7bc2620 QTfrontend/res/iconAirMine.png
Binary file QTfrontend/res/iconAirMine.png has changed
diff -r 10860d4bca22 -r abcdb7bc2620 QTfrontend/res/iconDud.png
Binary file QTfrontend/res/iconDud.png has changed
diff -r 10860d4bca22 -r abcdb7bc2620 QTfrontend/res/iconDud@2x.png
Binary file QTfrontend/res/iconDud@2x.png has changed
diff -r 10860d4bca22 -r abcdb7bc2620 QTfrontend/res/iconExplosive.png
Binary file QTfrontend/res/iconExplosive.png has changed
diff -r 10860d4bca22 -r abcdb7bc2620 QTfrontend/res/iconExplosive@2x.png
Binary file QTfrontend/res/iconExplosive@2x.png has changed
diff -r 10860d4bca22 -r abcdb7bc2620 QTfrontend/res/iconHealthPercent.png
Binary file QTfrontend/res/iconHealthPercent.png has changed
diff -r 10860d4bca22 -r abcdb7bc2620 QTfrontend/res/iconMine.png
Binary file QTfrontend/res/iconMine.png has changed
diff -r 10860d4bca22 -r abcdb7bc2620 QTfrontend/res/iconMine@2x.png
Binary file QTfrontend/res/iconMine@2x.png has changed
diff -r 10860d4bca22 -r abcdb7bc2620 QTfrontend/res/iconMineTime.png
Binary file QTfrontend/res/iconMineTime.png has changed
diff -r 10860d4bca22 -r abcdb7bc2620 QTfrontend/res/iconScript.png
Binary file QTfrontend/res/iconScript.png has changed
diff -r 10860d4bca22 -r abcdb7bc2620 QTfrontend/res/iconScript@2x.png
Binary file QTfrontend/res/iconScript@2x.png has changed
diff -r 10860d4bca22 -r abcdb7bc2620 QTfrontend/res/iconSuddenDeathTime.png
Binary file QTfrontend/res/iconSuddenDeathTime.png has changed
diff -r 10860d4bca22 -r abcdb7bc2620 QTfrontend/res/iconSuddenDeathWater.png
Binary file QTfrontend/res/iconSuddenDeathWater.png has changed
diff -r 10860d4bca22 -r abcdb7bc2620 QTfrontend/ui/page/pagecampaign.cpp
--- a/QTfrontend/ui/page/pagecampaign.cpp Wed Apr 13 12:17:30 2016 +0200
+++ b/QTfrontend/ui/page/pagecampaign.cpp Thu Apr 28 21:15:08 2016 +0200
@@ -55,6 +55,9 @@
CBTeam = new QComboBox(this);
CBMission = new QComboBox(this);
CBCampaign = new QComboBox(this);
+ CBTeam->setMaxVisibleItems(30);
+ CBMission->setMaxVisibleItems(30);
+ CBCampaign->setMaxVisibleItems(30);
infoLayout->addWidget(btnPreview,0,1,2,1);
infoLayout->addWidget(lbltitle,0,2,1,2);
diff -r 10860d4bca22 -r abcdb7bc2620 QTfrontend/ui/page/pageeditteam.cpp
--- a/QTfrontend/ui/page/pageeditteam.cpp Wed Apr 13 12:17:30 2016 +0200
+++ b/QTfrontend/ui/page/pageeditteam.cpp Thu Apr 28 21:15:08 2016 +0200
@@ -129,16 +129,19 @@
CBGrave = new QComboBox(GBoxTeam);
CBGrave->setMaxCount(65535);
+ CBGrave->setMaxVisibleItems(20);
CBGrave->setIconSize(QSize(32, 32));
GBTLayout->addWidget(CBGrave, 2, 1);
CBFlag = new QComboBox(GBoxTeam);
CBFlag->setMaxCount(65535);
+ CBFlag->setMaxVisibleItems(50);
CBFlag->setIconSize(QSize(22, 15));
GBTLayout->addWidget(CBFlag, 3, 1);
QHBoxLayout * hbox = new QHBoxLayout();
CBVoicepack = new QComboBox(GBoxTeam);
+ CBVoicepack->setMaxVisibleItems(50);
hbox->addWidget(CBVoicepack, 100);
btnTestSound = addSoundlessButton(":/res/PlaySound.png", hbox, 1, true);
diff -r 10860d4bca22 -r abcdb7bc2620 QTfrontend/ui/page/pagenetgame.cpp
--- a/QTfrontend/ui/page/pagenetgame.cpp Wed Apr 13 12:17:30 2016 +0200
+++ b/QTfrontend/ui/page/pagenetgame.cpp Thu Apr 28 21:15:08 2016 +0200
@@ -86,7 +86,7 @@
// Game config
- pGameCFG = new GameCFGWidget(this);
+ pGameCFG = new GameCFGWidget(this, true);
pageLayout->addWidget(pGameCFG, 1, 0);
// Teams
diff -r 10860d4bca22 -r abcdb7bc2620 QTfrontend/ui/page/pageoptions.cpp
--- a/QTfrontend/ui/page/pageoptions.cpp Wed Apr 13 12:17:30 2016 +0200
+++ b/QTfrontend/ui/page/pageoptions.cpp Thu Apr 28 21:15:08 2016 +0200
@@ -132,6 +132,7 @@
groupTeams->layout()->setColumnStretch(0, 1);
CBTeamName = new QComboBox(groupTeams);
+ CBTeamName->setMaxVisibleItems(50);
groupTeams->layout()->addWidget(CBTeamName, 0, 0);
BtnNewTeam = new QPushButton(groupTeams);
@@ -172,6 +173,7 @@
groupSchemes->layout()->setColumnStretch(0, 1);
SchemesName = new QComboBox(groupSchemes);
+ SchemesName->setMaxVisibleItems(50);
groupSchemes->layout()->addWidget(SchemesName, 0, 0);
SchemeNew = new QPushButton(groupSchemes);
@@ -203,6 +205,7 @@
groupWeapons->layout()->setColumnStretch(0, 1);
WeaponsName = new QComboBox(groupWeapons);
+ WeaponsName->setMaxVisibleItems(50);
groupWeapons->layout()->addWidget(WeaponsName, 0, 0);
WeaponNew = new QPushButton(groupWeapons);
@@ -256,6 +259,7 @@
groupGame->layout()->addWidget(lblFullScreenRes, 1, 0);
CBResolution = new QComboBox(groupGame);
+ CBResolution->setMaxVisibleItems(50);
CBResolution->setFixedWidth(200);
groupGame->layout()->addWidget(CBResolution, 1, 1, Qt::AlignLeft);
@@ -310,6 +314,7 @@
groupGame->layout()->addWidget(lblStereo, 4, 0);
CBStereoMode = new QComboBox(groupGame);
+ CBStereoMode->setMaxVisibleItems(50);
CBStereoMode->addItem(QComboBox::tr("Disabled"));
CBStereoMode->addItem(QComboBox::tr("Red/Cyan"));
CBStereoMode->addItem(QComboBox::tr("Cyan/Red"));
@@ -618,6 +623,7 @@
groupMisc->layout()->addWidget(labelLanguage, 0, 0);
CBLanguage = new QComboBox(groupMisc);
+ CBLanguage->setMaxVisibleItems(50);
groupMisc->layout()->addWidget(CBLanguage, 0, 1);
QStringList locs = DataManager::instance().entryList("Locale", QDir::Files, QStringList("hedgewars_*.qm"));
CBLanguage->addItem(QComboBox::tr("(System default)"), QString());
@@ -696,6 +702,7 @@
// list of supported formats
comboAVFormats = new QComboBox(groupVideoRec);
+ comboAVFormats->setMaxVisibleItems(50);
groupVideoRec->layout()->addWidget(comboAVFormats, 0, 1, 1, 4);
LibavInteraction::instance().fillFormats(comboAVFormats);
@@ -716,6 +723,7 @@
// list of supported audio codecs
comboAudioCodecs = new QComboBox(groupVideoRec);
+ comboAudioCodecs->setMaxVisibleItems(50);
groupVideoRec->layout()->addWidget(comboAudioCodecs, 2, 1, 1, 3);
// checkbox 'record audio'
@@ -741,6 +749,7 @@
// list of supported video codecs
comboVideoCodecs = new QComboBox(groupVideoRec);
+ comboVideoCodecs->setMaxVisibleItems(50);
groupVideoRec->layout()->addWidget(comboVideoCodecs, 4, 1, 1, 4);
// label for resolution
diff -r 10860d4bca22 -r abcdb7bc2620 QTfrontend/ui/page/pagescheme.cpp
--- a/QTfrontend/ui/page/pagescheme.cpp Wed Apr 13 12:17:30 2016 +0200
+++ b/QTfrontend/ui/page/pagescheme.cpp Thu Apr 28 21:15:08 2016 +0200
@@ -71,102 +71,101 @@
TBW_mode_Forts->setWhatsThis(tr("Defend your fort and destroy the opponents, two team colours max!"));
glGMLayout->addWidget(TBW_mode_Forts,0,0,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!"));
- glGMLayout->addWidget(TBW_teamsDivide,0,1,1,1);
+ TBW_disablegirders = new ToggleButtonWidget(gbGameModes, ":/res/btnDisableGirders@2x.png");
+ TBW_disablegirders->setWhatsThis(tr("Disable girders when generating random maps."));
+ glGMLayout->addWidget(TBW_disablegirders,0,1,1,1);
- TBW_solid = new ToggleButtonWidget(gbGameModes, ":/res/btnSolid@2x.png");
- TBW_solid->setWhatsThis(tr("Land can not be destroyed!"));
- glGMLayout->addWidget(TBW_solid,0,2,1,1);
+ TBW_disablelandobjects = new ToggleButtonWidget(gbGameModes, ":/res/btnDisableLandObjects@2x.png");
+ TBW_disablelandobjects->setWhatsThis(tr("Disable land objects when generating random maps."));
+ glGMLayout->addWidget(TBW_disablelandobjects,0,2,1,1);
TBW_border = new ToggleButtonWidget(gbGameModes, ":/res/btnBorder@2x.png");
TBW_border->setWhatsThis(tr("Add an indestructible border around the terrain"));
glGMLayout->addWidget(TBW_border,0,3,1,1);
+ TBW_bottomborder = new ToggleButtonWidget(gbGameModes, ":/res/btnBottomBorder@2x.png");
+ TBW_bottomborder->setWhatsThis(tr("Add an indestructible border along the bottom"));
+ glGMLayout->addWidget(TBW_bottomborder,0,4,1,1);
+
+ TBW_solid = new ToggleButtonWidget(gbGameModes, ":/res/btnSolid@2x.png");
+ TBW_solid->setWhatsThis(tr("Land can not be destroyed!"));
+ glGMLayout->addWidget(TBW_solid,1,0,1,1);
+
TBW_lowGravity = new ToggleButtonWidget(gbGameModes, ":/res/btnLowGravity@2x.png");
TBW_lowGravity->setWhatsThis(tr("Lower gravity"));
- glGMLayout->addWidget(TBW_lowGravity,0,4,1,1);
-
- TBW_laserSight = new ToggleButtonWidget(gbGameModes, ":/res/btnLaserSight@2x.png");
- TBW_laserSight->setWhatsThis(tr("Assisted aiming with laser sight"));
- glGMLayout->addWidget(TBW_laserSight,1,0,1,1);
-
- TBW_invulnerable = new ToggleButtonWidget(gbGameModes, ":/res/btnInvulnerable@2x.png");
- TBW_invulnerable->setWhatsThis(tr("All hogs have a personal forcefield"));
- glGMLayout->addWidget(TBW_invulnerable,1,1,1,1);
+ glGMLayout->addWidget(TBW_lowGravity,1,1,1,1);
- TBW_resethealth = new ToggleButtonWidget(gbGameModes, ":/res/btnResetHealth@2x.png");
- TBW_resethealth->setWhatsThis(tr("All (living) hedgehogs are fully restored at the end of turn"));
- glGMLayout->addWidget(TBW_resethealth,1,2,1,1);
+ TBW_nowind = new ToggleButtonWidget(gbGameModes, ":/res/btnNoWind@2x.png");
+ TBW_nowind->setWhatsThis(tr("You will not have to worry about wind anymore."));
+ glGMLayout->addWidget(TBW_nowind,1,2,1,1);
- TBW_vampiric = new ToggleButtonWidget(gbGameModes, ":/res/btnVampiric@2x.png");
- TBW_vampiric->setWhatsThis(tr("Gain 80% of the damage you do back in health"));
- glGMLayout->addWidget(TBW_vampiric,1,3,1,1);
-
- TBW_karma = new ToggleButtonWidget(gbGameModes, ":/res/btnKarma@2x.png");
- TBW_karma->setWhatsThis(tr("Share your opponents pain, share their damage"));
- glGMLayout->addWidget(TBW_karma,1,4,1,1);
+ TBW_morewind = new ToggleButtonWidget(gbGameModes, ":/res/btnMoreWind@2x.png");
+ TBW_morewind->setWhatsThis(tr("Wind will affect almost everything."));
+ glGMLayout->addWidget(TBW_morewind,1,3,1,1);
TBW_artillery = new ToggleButtonWidget(gbGameModes, ":/res/btnArtillery@2x.png");
TBW_artillery->setWhatsThis(tr("Your hogs are unable to move, put your artillery skills to the test"));
- glGMLayout->addWidget(TBW_artillery,2,0,1,1);
+ glGMLayout->addWidget(TBW_artillery,1,4,1,1);
- TBW_randomorder = new ToggleButtonWidget(gbGameModes, ":/res/btnRandomOrder@2x.png");
- TBW_randomorder->setWhatsThis(tr("Order of play is random instead of in room order."));
- glGMLayout->addWidget(TBW_randomorder,2,1,1,1);
+ TBW_vampiric = new ToggleButtonWidget(gbGameModes, ":/res/btnVampiric@2x.png");
+ TBW_vampiric->setWhatsThis(tr("Gain 80% of the damage you do back in health"));
+ glGMLayout->addWidget(TBW_vampiric,2,0,1,1);
+
+ TBW_karma = new ToggleButtonWidget(gbGameModes, ":/res/btnKarma@2x.png");
+ TBW_karma->setWhatsThis(tr("Share your opponents pain, share their damage"));
+ glGMLayout->addWidget(TBW_karma,2,1,1,1);
- TBW_king = new ToggleButtonWidget(gbGameModes, ":/res/btnKing@2x.png");
- TBW_king->setWhatsThis(tr("Play with a King. If he dies, your side dies."));
- glGMLayout->addWidget(TBW_king,2,2,1,1);
+ TBW_resethealth = new ToggleButtonWidget(gbGameModes, ":/res/btnResetHealth@2x.png");
+ TBW_resethealth->setWhatsThis(tr("All (living) hedgehogs are fully restored at the end of turn"));
+ glGMLayout->addWidget(TBW_resethealth,2,2,1,1);
+
+ TBW_aisurvival = new ToggleButtonWidget(gbGameModes, ":/res/btnAISurvival@2x.png");
+ TBW_aisurvival->setWhatsThis(tr("AI respawns on death."));
+ glGMLayout->addWidget(TBW_aisurvival,2,3,1,1);
- TBW_placehog = new ToggleButtonWidget(gbGameModes, ":/res/btnPlaceHog@2x.png");
- TBW_placehog->setWhatsThis(tr("Take turns placing your hedgehogs before the start of play."));
- glGMLayout->addWidget(TBW_placehog,2,3,1,1);
+ TBW_invulnerable = new ToggleButtonWidget(gbGameModes, ":/res/btnInvulnerable@2x.png");
+ TBW_invulnerable->setWhatsThis(tr("All hogs have a personal forcefield"));
+ glGMLayout->addWidget(TBW_invulnerable,2,4,1,1);
+
+ TBW_perhogammo = new ToggleButtonWidget(gbGameModes, ":/res/btnPerHogAmmo@2x.png");
+ TBW_perhogammo->setWhatsThis(tr("Each hedgehog has its own ammo. It does not share with the team."));
+ glGMLayout->addWidget(TBW_perhogammo,3,0,1,1);
TBW_sharedammo = new ToggleButtonWidget(gbGameModes, ":/res/btnSharedAmmo@2x.png");
TBW_sharedammo->setWhatsThis(tr("Ammo is shared between all teams that share a colour."));
- glGMLayout->addWidget(TBW_sharedammo,2,4,1,1);
-
- TBW_disablegirders = new ToggleButtonWidget(gbGameModes, ":/res/btnDisableGirders@2x.png");
- TBW_disablegirders->setWhatsThis(tr("Disable girders when generating random maps."));
- glGMLayout->addWidget(TBW_disablegirders,3,0,1,1);
+ glGMLayout->addWidget(TBW_sharedammo,3,1,1,1);
- TBW_disablelandobjects = new ToggleButtonWidget(gbGameModes, ":/res/btnDisableLandObjects@2x.png");
- TBW_disablelandobjects->setWhatsThis(tr("Disable land objects when generating random maps."));
- glGMLayout->addWidget(TBW_disablelandobjects,3,1,1,1);
-
- TBW_aisurvival = new ToggleButtonWidget(gbGameModes, ":/res/btnAISurvival@2x.png");
- TBW_aisurvival->setWhatsThis(tr("AI respawns on death."));
- glGMLayout->addWidget(TBW_aisurvival,3,2,1,1);
+ TBW_resetweps = new ToggleButtonWidget(gbGameModes, ":/res/btnResetWeps@2x.png");
+ TBW_resetweps->setWhatsThis(tr("Weapons are reset to starting values each turn."));
+ glGMLayout->addWidget(TBW_resetweps,3,2,1,1);
TBW_infattack = new ToggleButtonWidget(gbGameModes, ":/res/btnInfAttack@2x.png");
TBW_infattack->setWhatsThis(tr("Attacking does not end your turn."));
glGMLayout->addWidget(TBW_infattack,3,3,1,1);
- TBW_resetweps = new ToggleButtonWidget(gbGameModes, ":/res/btnResetWeps@2x.png");
- TBW_resetweps->setWhatsThis(tr("Weapons are reset to starting values each turn."));
- glGMLayout->addWidget(TBW_resetweps,3,4,1,1);
+ TBW_laserSight = new ToggleButtonWidget(gbGameModes, ":/res/btnLaserSight@2x.png");
+ TBW_laserSight->setWhatsThis(tr("Assisted aiming with laser sight"));
+ glGMLayout->addWidget(TBW_laserSight,3,4,1,1);
- TBW_perhogammo = new ToggleButtonWidget(gbGameModes, ":/res/btnPerHogAmmo@2x.png");
- TBW_perhogammo->setWhatsThis(tr("Each hedgehog has its own ammo. It does not share with the team."));
- glGMLayout->addWidget(TBW_perhogammo,4,0,1,1);
+ TBW_randomorder = new ToggleButtonWidget(gbGameModes, ":/res/btnRandomOrder@2x.png");
+ TBW_randomorder->setWhatsThis(tr("Order of play is random instead of in room order."));
+ glGMLayout->addWidget(TBW_randomorder,4,0,1,1);
- TBW_nowind = new ToggleButtonWidget(gbGameModes, ":/res/btnNoWind@2x.png");
- TBW_nowind->setWhatsThis(tr("You will not have to worry about wind anymore."));
- glGMLayout->addWidget(TBW_nowind,4,1,1,1);
+ TBW_placehog = new ToggleButtonWidget(gbGameModes, ":/res/btnPlaceHog@2x.png");
+ TBW_placehog->setWhatsThis(tr("Take turns placing your hedgehogs before the start of play."));
+ glGMLayout->addWidget(TBW_placehog,4,1,1,1);
- TBW_morewind = new ToggleButtonWidget(gbGameModes, ":/res/btnMoreWind@2x.png");
- TBW_morewind->setWhatsThis(tr("Wind will affect almost everything."));
- glGMLayout->addWidget(TBW_morewind,4,2,1,1);
+ TBW_teamsDivide = new ToggleButtonWidget(gbGameModes, ":/res/btnTeamsDivide@2x.png");
+ 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");
TBW_tagteam->setWhatsThis(tr("Teams in each clan take successive turns sharing their turn time."));
glGMLayout->addWidget(TBW_tagteam,4,3,1,1);
- TBW_bottomborder = new ToggleButtonWidget(gbGameModes, ":/res/btnBottomBorder@2x.png");
- TBW_bottomborder->setWhatsThis(tr("Add an indestructible border along the bottom"));
- glGMLayout->addWidget(TBW_bottomborder,4,4,1,1);
-
+ TBW_king = new ToggleButtonWidget(gbGameModes, ":/res/btnKing@2x.png");
+ TBW_king->setWhatsThis(tr("Play with a King. If he dies, your side dies."));
+ glGMLayout->addWidget(TBW_king,4,4,1,1);
// Right
QLabel * l;
@@ -219,7 +218,7 @@
glBSLayout->addWidget(l,3,0,1,1);
l = new QLabel(gbBasicSettings);
l->setFixedSize(32,32);
- l->setPixmap(QPixmap(":/res/iconSuddenDeath.png"));
+ l->setPixmap(QPixmap(":/res/iconSuddenDeathTime.png"));
glBSLayout->addWidget(l,3,1,1,1);
SB_SuddenDeath = new QSpinBox(gbBasicSettings);
SB_SuddenDeath->setRange(0, 50);
@@ -233,7 +232,7 @@
glBSLayout->addWidget(l,4,0,1,1);
l = new QLabel(gbBasicSettings);
l->setFixedSize(32,32);
- l->setPixmap(QPixmap(":/res/iconSuddenDeath.png")); // TODO: icon
+ l->setPixmap(QPixmap(":/res/iconSuddenDeathWater.png"));
glBSLayout->addWidget(l,4,1,1,1);
SB_WaterRise = new QSpinBox(gbBasicSettings);
SB_WaterRise->setRange(0, 100);
@@ -247,7 +246,7 @@
glBSLayout->addWidget(l,5,0,1,1);
l = new QLabel(gbBasicSettings);
l->setFixedSize(32,32);
- l->setPixmap(QPixmap(":/res/iconSuddenDeath.png")); // TODO: icon
+ l->setPixmap(QPixmap(":/res/iconSuddenDeath.png"));
glBSLayout->addWidget(l,5,1,1,1);
SB_HealthDecrease = new QSpinBox(gbBasicSettings);
SB_HealthDecrease->setRange(0, 100);
@@ -288,7 +287,7 @@
glBSLayout->addWidget(l,8,0,1,1);
l = new QLabel(gbBasicSettings);
l->setFixedSize(32,32);
- l->setPixmap(QPixmap(":/res/iconHealth.png")); // TODO: icon
+ l->setPixmap(QPixmap(":/res/iconHealthPercent.png"));
glBSLayout->addWidget(l,8,1,1,1);
SB_HealthCrates = new QSpinBox(gbBasicSettings);
SB_HealthCrates->setRange(0, 100);
@@ -302,7 +301,7 @@
glBSLayout->addWidget(l,9,0,1,1);
l = new QLabel(gbBasicSettings);
l->setFixedSize(32,32);
- l->setPixmap(QPixmap(":/res/iconHealth.png")); // TODO: icon
+ l->setPixmap(QPixmap(":/res/iconHealth.png"));
glBSLayout->addWidget(l,9,1,1,1);
SB_CrateHealth = new QSpinBox(gbBasicSettings);
SB_CrateHealth->setRange(0, 200);
@@ -316,7 +315,7 @@
glBSLayout->addWidget(l,10,0,1,1);
l = new QLabel(gbBasicSettings);
l->setFixedSize(32,32);
- l->setPixmap(QPixmap(":/res/iconTime.png")); // TODO: icon
+ l->setPixmap(QPixmap(":/res/iconMineTime.png"));
glBSLayout->addWidget(l,10,1,1,1);
SB_MinesTime = new QSpinBox(gbBasicSettings);
SB_MinesTime->setRange(-1, 5);
@@ -332,7 +331,7 @@
glBSLayout->addWidget(l,11,0,1,1);
l = new QLabel(gbBasicSettings);
l->setFixedSize(32,32);
- l->setPixmap(QPixmap(":/res/iconMine.png")); // TODO: icon
+ l->setPixmap(QPixmap(":/res/iconMine.png"));
glBSLayout->addWidget(l,11,1,1,1);
SB_Mines = new QSpinBox(gbBasicSettings);
SB_Mines->setRange(0, 200);
@@ -360,7 +359,7 @@
glBSLayout->addWidget(l,13,0,1,1);
l = new QLabel(gbBasicSettings);
l->setFixedSize(32,32);
- l->setPixmap(QPixmap(":/res/iconDamage.png"));
+ l->setPixmap(QPixmap(":/res/iconExplosive.png"));
glBSLayout->addWidget(l,13,1,1,1);
SB_Explosives = new QSpinBox(gbBasicSettings);
SB_Explosives->setRange(0, 200);
@@ -374,7 +373,7 @@
glBSLayout->addWidget(l,14,0,1,1);
l = new QLabel(gbBasicSettings);
l->setFixedSize(32,32);
- l->setPixmap(QPixmap(":/res/iconMine.png")); // TODO: icon
+ l->setPixmap(QPixmap(":/res/iconAirMine.png"));
glBSLayout->addWidget(l,14,1,1,1);
SB_AirMines = new QSpinBox(gbBasicSettings);
SB_AirMines->setRange(0, 200);
@@ -420,7 +419,7 @@
glBSLayout->addWidget(l,17,0,1,1);
l = new QLabel(gbBasicSettings);
l->setFixedSize(32,32);
- l->setPixmap(QPixmap(":/res/iconBox.png"));
+ l->setPixmap(QPixmap(":/res/iconScript.png"));
glBSLayout->addWidget(l,17,1,1,1);
LE_ScriptParam = new QLineEdit(gbBasicSettings);
@@ -443,6 +442,7 @@
{
QHBoxLayout * bottomLayout = new QHBoxLayout();
selectScheme = new QComboBox(this);
+ selectScheme->setMaxVisibleItems(50);
bottomLayout->addWidget(selectScheme, 0);
BtnCopy = addButton(tr("Copy"), bottomLayout, 1);
diff -r 10860d4bca22 -r abcdb7bc2620 QTfrontend/ui/page/pageselectweapon.cpp
--- a/QTfrontend/ui/page/pageselectweapon.cpp Wed Apr 13 12:17:30 2016 +0200
+++ b/QTfrontend/ui/page/pageselectweapon.cpp Thu Apr 28 21:15:08 2016 +0200
@@ -40,6 +40,7 @@
QGridLayout * bottomLayout = new QGridLayout();
selectWeaponSet = new QComboBox(this);
+ selectWeaponSet->setMaxVisibleItems(50);
bottomLayout->addWidget(selectWeaponSet, 0, 0, 2, 1);
// first row
diff -r 10860d4bca22 -r abcdb7bc2620 QTfrontend/ui/widget/chatwidget.cpp
--- a/QTfrontend/ui/widget/chatwidget.cpp Wed Apr 13 12:17:30 2016 +0200
+++ b/QTfrontend/ui/widget/chatwidget.cpp Thu Apr 28 21:15:08 2016 +0200
@@ -538,7 +538,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 +830,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 10860d4bca22 -r abcdb7bc2620 QTfrontend/ui/widget/feedbackdialog.cpp
--- a/QTfrontend/ui/widget/feedbackdialog.cpp Wed Apr 13 12:17:30 2016 +0200
+++ b/QTfrontend/ui/widget/feedbackdialog.cpp Thu Apr 28 21:15:08 2016 +0200
@@ -61,7 +61,6 @@
setWindowFlags(Qt::Sheet);
setWindowModality(Qt::WindowModal);
setWindowTitle(tr("Feedback"));
- setMinimumSize(700, 460);
resize(700, 460);
setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
@@ -71,11 +70,9 @@
/* Top layout */
QVBoxLayout * pageLayout = new QVBoxLayout();
- QHBoxLayout * summaryLayout = new QHBoxLayout();
- QHBoxLayout * emailLayout = new QHBoxLayout();
- QHBoxLayout * descriptionLayout = new QHBoxLayout();
- QHBoxLayout * combinedTopLayout = new QHBoxLayout();
- QHBoxLayout * systemLayout = new QHBoxLayout();
+ QGridLayout * feedbackLayout = new QGridLayout();
+
+ setStyleSheet("QPushButton { padding: 5px }");
info = new QLabel();
info->setText(QString(
@@ -96,65 +93,45 @@
info->setOpenExternalLinks(true);
pageLayout->addWidget(info);
- QVBoxLayout * summaryEmailLayout = new QVBoxLayout();
-
- const int labelWidth = 90;
-
label_email = new QLabel();
label_email->setText(QLabel::tr("Your Email"));
- label_email->setFixedWidth(labelWidth);
- emailLayout->addWidget(label_email);
email = new QLineEdit();
- emailLayout->addWidget(email);
- summaryEmailLayout->addLayout(emailLayout);
+ feedbackLayout->addWidget(label_email, 0, 0);
+ feedbackLayout->addWidget(email, 0, 1);
label_summary = new QLabel();
label_summary->setText(QLabel::tr("Summary"));
- label_summary->setFixedWidth(labelWidth);
- summaryLayout->addWidget(label_summary);
summary = new QLineEdit();
- summaryLayout->addWidget(summary);
- summaryEmailLayout->addLayout(summaryLayout);
-
- combinedTopLayout->addLayout(summaryEmailLayout);
+ feedbackLayout->addWidget(label_summary, 1, 0);
+ feedbackLayout->addWidget(summary, 1, 1);
CheckSendSpecs = new QCheckBox();
CheckSendSpecs->setText(QLabel::tr("Send system information"));
CheckSendSpecs->setChecked(true);
- systemLayout->addWidget(CheckSendSpecs);
BtnViewInfo = new QPushButton(tr("View"));
- systemLayout->addWidget(BtnViewInfo, 1);
- BtnViewInfo->setFixedSize(60, 30);
+ BtnViewInfo->setFixedHeight(40);
+ feedbackLayout->addWidget(CheckSendSpecs, 0, 2, 2, 1);
+ feedbackLayout->addWidget(BtnViewInfo, 0, 3, 2, 1);
connect(BtnViewInfo, SIGNAL(clicked()), this, SLOT(ShowSpecs()));
- combinedTopLayout->addLayout(systemLayout);
- combinedTopLayout->setStretch(0, 1);
- combinedTopLayout->insertSpacing(1, 20);
-
- pageLayout->addLayout(combinedTopLayout);
label_description = new QLabel();
label_description->setText(QLabel::tr("Description"));
- label_description->setFixedWidth(labelWidth);
- descriptionLayout->addWidget(label_description, 0, Qt::AlignTop);
description = new QTextBrowser();
description->setReadOnly(false);
- descriptionLayout->addWidget(description);
- pageLayout->addLayout(descriptionLayout);
+ feedbackLayout->addWidget(label_description, 2, 0);
+ feedbackLayout->addWidget(description, 2, 1, 1, 3);
/* Bottom layout */
- QHBoxLayout * bottomLayout = new QHBoxLayout();
QHBoxLayout * captchaLayout = new QHBoxLayout();
QVBoxLayout * captchaInputLayout = new QVBoxLayout();
QPushButton * BtnCancel = new QPushButton(tr("Cancel"));
- bottomLayout->addWidget(BtnCancel, 0);
- BtnCancel->setFixedSize(100, 40);
+ feedbackLayout->addWidget(BtnCancel, 3, 0);
+ BtnCancel->setFixedHeight(40);
connect(BtnCancel, SIGNAL(clicked()), this, SLOT(reject()));
- bottomLayout->insertStretch(1);
-
label_captcha = new QLabel();
label_captcha->setStyleSheet("border: 3px solid #ffcc00; border-radius: 4px");
label_captcha->setText("loading captcha");
@@ -166,27 +143,27 @@
captchaInputLayout->addWidget(label_captcha_input);
captchaInputLayout->setAlignment(label_captcha, Qt::AlignBottom);
captcha_code = new QLineEdit();
- captcha_code->setFixedSize(165, 30);
+ captcha_code->setFixedHeight(30);
captchaInputLayout->addWidget(captcha_code);
captchaInputLayout->setAlignment(captcha_code, Qt::AlignTop);
captchaLayout->addLayout(captchaInputLayout);
captchaLayout->setAlignment(captchaInputLayout, Qt::AlignLeft);
- bottomLayout->addLayout(captchaLayout);
- bottomLayout->addSpacing(40);
+ QWidget * captchaLayoutWidget = new QWidget();
+ captchaLayoutWidget->setContentsMargins(0, 0, 0, 0);
+ captchaLayoutWidget->setLayout(captchaLayout);
+ feedbackLayout->addWidget(captchaLayoutWidget, 3, 1, 1, 2);
// TODO: Set green arrow icon for send button (:/res/Start.png)
BtnSend = new QPushButton(tr("Send Feedback"));
- bottomLayout->addWidget(BtnSend, 0);
- BtnSend->setFixedSize(120, 40);
+ feedbackLayout->addWidget(BtnSend, 3, 3);
+ BtnSend->setFixedHeight(40);
connect(BtnSend, SIGNAL(clicked()), this, SLOT(SendFeedback()));
- bottomLayout->setStretchFactor(captchaLayout, 0);
- bottomLayout->setStretchFactor(BtnSend, 1);
+ pageLayout->addLayout(feedbackLayout);
QVBoxLayout * dialogLayout = new QVBoxLayout(this);
dialogLayout->addLayout(pageLayout, 1);
- dialogLayout->addLayout(bottomLayout);
LoadCaptchaImage();
}
diff -r 10860d4bca22 -r abcdb7bc2620 QTfrontend/ui/widget/gamecfgwidget.cpp
--- a/QTfrontend/ui/widget/gamecfgwidget.cpp Wed Apr 13 12:17:30 2016 +0200
+++ b/QTfrontend/ui/widget/gamecfgwidget.cpp Thu Apr 28 21:15:08 2016 +0200
@@ -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);
@@ -108,6 +109,7 @@
GBoxOptionsLayout->addWidget(new QLabel(QLabel::tr("Style"), this), 1, 0);
Scripts = new QComboBox(this);
+ Scripts->setMaxVisibleItems(30);
GBoxOptionsLayout->addWidget(Scripts, 1, 1);
Scripts->setModel(DataManager::instance().gameStyleModel());
@@ -121,6 +123,7 @@
SchemeWidgetLayout->setMargin(0);
GameSchemes = new QComboBox(SchemeWidget);
+ GameSchemes->setMaxVisibleItems(30);
SchemeWidgetLayout->addWidget(GameSchemes, 0, 2);
connect(GameSchemes, SIGNAL(currentIndexChanged(int)), this, SLOT(schemeChanged(int)));
@@ -139,6 +142,7 @@
SchemeWidgetLayout->addWidget(new QLabel(QLabel::tr("Weapons"), SchemeWidget), 1, 0);
WeaponsName = new QComboBox(SchemeWidget);
+ WeaponsName->setMaxVisibleItems(30);
SchemeWidgetLayout->addWidget(WeaponsName, 1, 2);
connect(WeaponsName, SIGNAL(currentIndexChanged(int)), this, SLOT(ammoChanged(int)));
diff -r 10860d4bca22 -r abcdb7bc2620 QTfrontend/ui/widget/gamecfgwidget.h
--- a/QTfrontend/ui/widget/gamecfgwidget.h Wed Apr 13 12:17:30 2016 +0200
+++ b/QTfrontend/ui/widget/gamecfgwidget.h Thu Apr 28 21:15:08 2016 +0200
@@ -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 10860d4bca22 -r abcdb7bc2620 QTfrontend/ui/widget/keybinder.cpp
--- a/QTfrontend/ui/widget/keybinder.cpp Wed Apr 13 12:17:30 2016 +0200
+++ b/QTfrontend/ui/widget/keybinder.cpp Thu Apr 28 21:15:08 2016 +0200
@@ -170,6 +170,7 @@
comboBox->setModel((QAbstractItemModel*)DataManager::instance().bindsModel());
comboBox->setVisible(false);
comboBox->setFixedWidth(200);
+ comboBox->setMaxVisibleItems(50);
// Table row
int row = curTable->rowCount();
diff -r 10860d4bca22 -r abcdb7bc2620 QTfrontend/ui/widget/mapContainer.cpp
--- a/QTfrontend/ui/widget/mapContainer.cpp Wed Apr 13 12:17:30 2016 +0200
+++ b/QTfrontend/ui/widget/mapContainer.cpp Thu Apr 28 21:15:08 2016 +0200
@@ -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;
@@ -461,6 +463,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 +501,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 +541,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 +622,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 +633,7 @@
case MapModel::GeneratedMaze:
case MapModel::GeneratedPerlin:
case MapModel::HandDrawnMap:
+ case MapModel::FortsMap:
m_mapInfo.type = MapModel::Invalid;
default:
break;
@@ -679,6 +718,7 @@
case MapModel::GeneratedMaze:
case MapModel::GeneratedPerlin:
case MapModel::HandDrawnMap:
+ case MapModel::FortsMap:
askForGeneratedPreview();
break;
default:
@@ -804,6 +844,11 @@
staticMapList->show();
emit mapChanged(m_curMap);
break;
+ case MapModel::FortsMap:
+ mapgen = MAPGEN_FORTS;
+ setMapInfo(MapModel::MapInfoForts);
+ lblMapList->hide();
+ break;
default:
break;
}
diff -r 10860d4bca22 -r abcdb7bc2620 QTfrontend/ui/widget/mapContainer.h
--- a/QTfrontend/ui/widget/mapContainer.h Wed Apr 13 12:17:30 2016 +0200
+++ b/QTfrontend/ui/widget/mapContainer.h Thu Apr 28 21:15:08 2016 +0200
@@ -85,6 +85,7 @@
void updateModelViews();
void onPreviewMapDestroyed(QObject * map);
void setMaster(bool master);
+ void setRandomWithoutDLC(bool withoutDLC);
signals:
void seedChanged(const QString & seed);
@@ -161,6 +162,7 @@
bool m_previewEnabled;
bool m_missionsViewSetup;
bool m_staticViewSetup;
+ bool m_withoutDLC;
void intSetSeed(const QString & seed);
void intSetMap(const QString & map);
diff -r 10860d4bca22 -r abcdb7bc2620 QTfrontend/ui/widget/selectWeapon.cpp
--- a/QTfrontend/ui/widget/selectWeapon.cpp Wed Apr 13 12:17:30 2016 +0200
+++ b/QTfrontend/ui/widget/selectWeapon.cpp Thu Apr 28 21:15:08 2016 +0200
@@ -308,7 +308,7 @@
}
else
{
- setWeapons(*cDefaultAmmoStore);
+ setWeapons(*cEmptyAmmoStore);
}
}
diff -r 10860d4bca22 -r abcdb7bc2620 QTfrontend/weapons.h
--- a/QTfrontend/weapons.h Wed Apr 13 12:17:30 2016 +0200
+++ b/QTfrontend/weapons.h Thu Apr 28 21:15:08 2016 +0200
@@ -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 10860d4bca22 -r abcdb7bc2620 cmake_modules/CMakeSystemSpecificInformation.cmake
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cmake_modules/CMakeSystemSpecificInformation.cmake Thu Apr 28 21:15:08 2016 +0200
@@ -0,0 +1,123 @@
+# XXX Emscripten:
+# This file is copied as-is from the CMake source tree. Due to how CMake
+# platform toolchain files work, we must have a copy of this file located
+# relative to Emscripten platform toolchain file, or file inclusion order
+# in cmGlobalGenerator::EnableLanguage will not find Emscripten.cmake
+# toolchain file, and as a result, it is not possible to set the default
+# compilation output suffix to .js, and as a consequence the script
+# check_function_exists() will not function properly (it will try to
+# build to wrong file suffix)
+
+# CMake - Cross Platform Makefile Generator
+# Copyright 2000-2014 Kitware, Inc.
+# Copyright 2000-2011 Insight Software Consortium
+# All rights reserved.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+
+# * Neither the names of Kitware, Inc., the Insight Software Consortium,
+# nor the names of their contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# ------------------------------------------------------------------------------
+
+# The above copyright and license notice applies to distributions of
+# CMake in source and binary form. Some source files contain additional
+# notices of original copyright by their contributors; see each source
+# for details. Third-party software packages supplied with CMake under
+# compatible licenses provide their own copyright notices documented in
+# corresponding subdirectories.
+
+# ------------------------------------------------------------------------------
+
+# CMake was initially developed by Kitware with the following sponsorship:
+
+# * National Library of Medicine at the National Institutes of Health
+# as part of the Insight Segmentation and Registration Toolkit (ITK).
+
+# * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
+# Visualization Initiative.
+
+# * National Alliance for Medical Image Computing (NAMIC) is funded by the
+# National Institutes of Health through the NIH Roadmap for Medical Research,
+# Grant U54 EB005149.
+
+# * Kitware, Inc.
+
+# This file is included by cmGlobalGenerator::EnableLanguage.
+# It is included after the compiler has been determined, so
+# we know things like the compiler name and if the compiler is gnu.
+
+# before cmake 2.6 these variables were set in cmMakefile.cxx. This is still
+# done to keep scripts and custom language and compiler modules working.
+# But they are reset here and set again in the platform files for the target
+# platform, so they can be used for testing the target platform instead
+# of testing the host platform.
+set(APPLE )
+set(UNIX )
+set(CYGWIN )
+set(WIN32 )
+
+
+# include Generic system information
+include(CMakeGenericSystem)
+
+# 2. now include SystemName.cmake file to set the system specific information
+set(CMAKE_SYSTEM_INFO_FILE Platform/${CMAKE_SYSTEM_NAME})
+
+include(${CMAKE_SYSTEM_INFO_FILE} OPTIONAL RESULT_VARIABLE _INCLUDED_SYSTEM_INFO_FILE)
+
+if(NOT _INCLUDED_SYSTEM_INFO_FILE)
+ message("System is unknown to cmake, create:\n${CMAKE_SYSTEM_INFO_FILE}"
+ " to use this system, please send your config file to "
+ "cmake@www.cmake.org so it can be added to cmake")
+ if(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
+ configure_file(${CMAKE_BINARY_DIR}/CMakeCache.txt
+ ${CMAKE_BINARY_DIR}/CopyOfCMakeCache.txt COPYONLY)
+ message("Your CMakeCache.txt file was copied to CopyOfCMakeCache.txt. "
+ "Please send that file to cmake@www.cmake.org.")
+ endif()
+endif()
+
+
+# optionally include a file which can do extra-generator specific things, e.g.
+# CMakeFindEclipseCDT4.cmake asks gcc for the system include dirs for the Eclipse CDT4 generator
+if(CMAKE_EXTRA_GENERATOR)
+ string(REPLACE " " "" _CMAKE_EXTRA_GENERATOR_NO_SPACES ${CMAKE_EXTRA_GENERATOR} )
+ include("CMakeFind${_CMAKE_EXTRA_GENERATOR_NO_SPACES}" OPTIONAL)
+endif()
+
+
+# for most systems a module is the same as a shared library
+# so unless the variable CMAKE_MODULE_EXISTS is set just
+# copy the values from the LIBRARY variables
+# this has to be done after the system information has been loaded
+if(NOT CMAKE_MODULE_EXISTS)
+ set(CMAKE_SHARED_MODULE_PREFIX "${CMAKE_SHARED_LIBRARY_PREFIX}")
+ set(CMAKE_SHARED_MODULE_SUFFIX "${CMAKE_SHARED_LIBRARY_SUFFIX}")
+endif()
+
+
+set(CMAKE_SYSTEM_SPECIFIC_INFORMATION_LOADED 1)
diff -r 10860d4bca22 -r abcdb7bc2620 cmake_modules/CheckTypeSize.c.in
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cmake_modules/CheckTypeSize.c.in Thu Apr 28 21:15:08 2016 +0200
@@ -0,0 +1,37 @@
+@headers@
+
+#undef KEY
+#if defined(__i386)
+# define KEY '_','_','i','3','8','6'
+#elif defined(__x86_64)
+# define KEY '_','_','x','8','6','_','6','4'
+#elif defined(__ppc__)
+# define KEY '_','_','p','p','c','_','_'
+#elif defined(__ppc64__)
+# define KEY '_','_','p','p','c','6','4','_','_'
+#endif
+
+#define SIZE (sizeof(@type@))
+char info_size[] = {'I', 'N', 'F', 'O', ':', 's','i','z','e','[',
+ ('0' + ((SIZE / 10000)%10)),
+ ('0' + ((SIZE / 1000)%10)),
+ ('0' + ((SIZE / 100)%10)),
+ ('0' + ((SIZE / 10)%10)),
+ ('0' + (SIZE % 10)),
+ ']',
+#ifdef KEY
+ ' ','k','e','y','[', KEY, ']',
+#endif
+ '\0'};
+
+#ifdef __CLASSIC_C__
+int main(argc, argv) int argc; char *argv[];
+#else
+int main(int argc, char *argv[])
+#endif
+{
+ int require = 0;
+ require += info_size[argc];
+ (void)argv;
+ return SIZE;
+}
diff -r 10860d4bca22 -r abcdb7bc2620 cmake_modules/CheckTypeSize.cmake
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cmake_modules/CheckTypeSize.cmake Thu Apr 28 21:15:08 2016 +0200
@@ -0,0 +1,231 @@
+#.rst:
+# CheckTypeSize
+# -------------
+#
+# Check sizeof a type
+#
+# ::
+#
+# CHECK_TYPE_SIZE(TYPE VARIABLE [BUILTIN_TYPES_ONLY]
+# [LANGUAGE ])
+#
+# Check if the type exists and determine its size. On return,
+# "HAVE_${VARIABLE}" holds the existence of the type, and "${VARIABLE}"
+# holds one of the following:
+#
+# ::
+#
+# = type has non-zero size
+# "0" = type has arch-dependent size (see below)
+# "" = type does not exist
+#
+# Both ``HAVE_${VARIABLE}`` and ``${VARIABLE}`` will be created as internal
+# cache variables.
+#
+# Furthermore, the variable "${VARIABLE}_CODE" holds C preprocessor code
+# to define the macro "${VARIABLE}" to the size of the type, or leave
+# the macro undefined if the type does not exist.
+#
+# The variable "${VARIABLE}" may be "0" when CMAKE_OSX_ARCHITECTURES has
+# multiple architectures for building OS X universal binaries. This
+# indicates that the type size varies across architectures. In this
+# case "${VARIABLE}_CODE" contains C preprocessor tests mapping from
+# each architecture macro to the corresponding type size. The list of
+# architecture macros is stored in "${VARIABLE}_KEYS", and the value for
+# each key is stored in "${VARIABLE}-${KEY}".
+#
+# If the BUILTIN_TYPES_ONLY option is not given, the macro checks for
+# headers , , and , and saves results
+# in HAVE_SYS_TYPES_H, HAVE_STDINT_H, and HAVE_STDDEF_H. The type size
+# check automatically includes the available headers, thus supporting
+# checks of types defined in the headers.
+#
+# If LANGUAGE is set, the specified compiler will be used to perform the
+# check. Acceptable values are C and CXX
+#
+# Despite the name of the macro you may use it to check the size of more
+# complex expressions, too. To check e.g. for the size of a struct
+# member you can do something like this:
+#
+# ::
+#
+# check_type_size("((struct something*)0)->member" SIZEOF_MEMBER)
+#
+#
+#
+# The following variables may be set before calling this macro to modify
+# the way the check is run:
+#
+# ::
+#
+# CMAKE_REQUIRED_FLAGS = string of compile command line flags
+# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
+# CMAKE_REQUIRED_INCLUDES = list of include directories
+# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
+# CMAKE_REQUIRED_QUIET = execute quietly without messages
+# CMAKE_EXTRA_INCLUDE_FILES = list of extra headers to include
+
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+include(CheckIncludeFile)
+include(CheckIncludeFileCXX)
+
+cmake_policy(PUSH)
+cmake_policy(VERSION 3.0)
+
+get_filename_component(__check_type_size_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
+
+#-----------------------------------------------------------------------------
+# Helper function. DO NOT CALL DIRECTLY.
+function(__check_type_size_impl type var map builtin language)
+ if(NOT CMAKE_REQUIRED_QUIET)
+ message(STATUS "Check size of ${type}")
+ endif()
+
+ # Include header files.
+ set(headers)
+ if(builtin)
+ if(HAVE_SYS_TYPES_H)
+ set(headers "${headers}#include \n")
+ endif()
+ if(HAVE_STDINT_H)
+ set(headers "${headers}#include \n")
+ endif()
+ if(HAVE_STDDEF_H)
+ set(headers "${headers}#include \n")
+ endif()
+ endif()
+ foreach(h ${CMAKE_EXTRA_INCLUDE_FILES})
+ set(headers "${headers}#include \"${h}\"\n")
+ endforeach()
+
+ # Perform the check.
+
+ if("${language}" STREQUAL "C")
+ set(src ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckTypeSize/${var}.c)
+ elseif("${language}" STREQUAL "CXX")
+ set(src ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckTypeSize/${var}.cpp)
+ else()
+ message(FATAL_ERROR "Unknown language:\n ${language}\nSupported languages: C, CXX.\n")
+ endif()
+ set(bin ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckTypeSize/${var}.bin)
+ configure_file(${__check_type_size_dir}/CheckTypeSize.c.in ${src} @ONLY)
+ try_run(${var}_run_result HAVE_${var} ${CMAKE_BINARY_DIR} ${src}
+ COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
+ LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}
+ CMAKE_FLAGS
+ "-DCOMPILE_DEFINITIONS:STRING=${CMAKE_REQUIRED_FLAGS}"
+ "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}"
+ RUN_OUTPUT_VARIABLE ${var}_run_output
+ COMPILE_OUTPUT_VARIABLE output
+ )
+
+ if(${HAVE_${var}} AND NOT "${${var}_run_result}" STREQUAL "FAILED_TO_RUN")
+ set(${var} ${${var}_run_result})
+ if(NOT CMAKE_REQUIRED_QUIET)
+ message(STATUS "Check size of ${type} - done")
+ endif()
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ "Determining size of ${type} passed with the following output:\n${output}\n\n")
+ set(${var} "${${var}}" CACHE INTERNAL "CHECK_TYPE_SIZE: sizeof(${type})")
+ else()
+ # The check failed to compile.
+ if(NOT CMAKE_REQUIRED_QUIET)
+ message(STATUS "Check size of ${type} - failed")
+ endif()
+ file(READ ${src} content)
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Determining size of ${type} failed with the following output:\n${output}\n${src}:\n${content}\n\n")
+ set(${var} "" CACHE INTERNAL "CHECK_TYPE_SIZE: ${type} unknown")
+ file(REMOVE ${map})
+ endif()
+endfunction()
+
+#-----------------------------------------------------------------------------
+macro(CHECK_TYPE_SIZE TYPE VARIABLE)
+ # parse arguments
+ unset(doing)
+ foreach(arg ${ARGN})
+ if("x${arg}" STREQUAL "xBUILTIN_TYPES_ONLY")
+ set(_CHECK_TYPE_SIZE_${arg} 1)
+ unset(doing)
+ elseif("x${arg}" STREQUAL "xLANGUAGE") # change to MATCHES for more keys
+ set(doing "${arg}")
+ set(_CHECK_TYPE_SIZE_${doing} "")
+ elseif("x${doing}" STREQUAL "xLANGUAGE")
+ set(_CHECK_TYPE_SIZE_${doing} "${arg}")
+ unset(doing)
+ else()
+ message(FATAL_ERROR "Unknown argument:\n ${arg}\n")
+ endif()
+ endforeach()
+ if("x${doing}" MATCHES "^x(LANGUAGE)$")
+ message(FATAL_ERROR "Missing argument:\n ${doing} arguments requires a value\n")
+ endif()
+ if(DEFINED _CHECK_TYPE_SIZE_LANGUAGE)
+ if(NOT "x${_CHECK_TYPE_SIZE_LANGUAGE}" MATCHES "^x(C|CXX)$")
+ message(FATAL_ERROR "Unknown language:\n ${_CHECK_TYPE_SIZE_LANGUAGE}.\nSupported languages: C, CXX.\n")
+ endif()
+ set(_language ${_CHECK_TYPE_SIZE_LANGUAGE})
+ else()
+ set(_language C)
+ endif()
+
+ # Optionally check for standard headers.
+ if(_CHECK_TYPE_SIZE_BUILTIN_TYPES_ONLY)
+ set(_builtin 0)
+ else()
+ set(_builtin 1)
+ if("${_language}" STREQUAL "C")
+ check_include_file(sys/types.h HAVE_SYS_TYPES_H)
+ check_include_file(stdint.h HAVE_STDINT_H)
+ check_include_file(stddef.h HAVE_STDDEF_H)
+ elseif("${_language}" STREQUAL "CXX")
+ check_include_file_cxx(sys/types.h HAVE_SYS_TYPES_H)
+ check_include_file_cxx(stdint.h HAVE_STDINT_H)
+ check_include_file_cxx(stddef.h HAVE_STDDEF_H)
+ endif()
+ endif()
+ unset(_CHECK_TYPE_SIZE_BUILTIN_TYPES_ONLY)
+ unset(_CHECK_TYPE_SIZE_LANGUAGE)
+
+ # Compute or load the size or size map.
+ set(${VARIABLE}_KEYS)
+ set(_map_file ${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/CheckTypeSize/${VARIABLE}.cmake)
+ if(NOT DEFINED HAVE_${VARIABLE})
+ __check_type_size_impl(${TYPE} ${VARIABLE} ${_map_file} ${_builtin} ${_language})
+ endif()
+ include(${_map_file} OPTIONAL)
+ set(_map_file)
+ set(_builtin)
+
+ # Create preprocessor code.
+ if(${VARIABLE}_KEYS)
+ set(${VARIABLE}_CODE)
+ set(_if if)
+ foreach(key ${${VARIABLE}_KEYS})
+ set(${VARIABLE}_CODE "${${VARIABLE}_CODE}#${_if} defined(${key})\n# define ${VARIABLE} ${${VARIABLE}-${key}}\n")
+ set(_if elif)
+ endforeach()
+ set(${VARIABLE}_CODE "${${VARIABLE}_CODE}#else\n# error ${VARIABLE} unknown\n#endif")
+ set(_if)
+ elseif(${VARIABLE})
+ set(${VARIABLE}_CODE "#define ${VARIABLE} ${${VARIABLE}}")
+ else()
+ set(${VARIABLE}_CODE "/* #undef ${VARIABLE} */")
+ endif()
+endmacro()
+
+#-----------------------------------------------------------------------------
+cmake_policy(POP)
diff -r 10860d4bca22 -r abcdb7bc2620 cmake_modules/FindEmscripten.cmake
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cmake_modules/FindEmscripten.cmake Thu Apr 28 21:15:08 2016 +0200
@@ -0,0 +1,36 @@
+# - Try to find the Clang/LLVM executable
+# Once done this will define
+#
+# EMSCRIPTEN_FOUND - system has Clang
+# EMSCRIPTEN_VERSION - Clang version
+# EMSCRIPTEN_EXECUTABLE - Clang executable
+#
+# Copyright (c) 2013, Vittorio Giovara
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+find_program(EMSCRIPTEN_EXECUTABLE
+ NAMES emcc
+ PATHS /opt/local/bin /usr/local/bin /usr/bin)
+
+if (EMSCRIPTEN_EXECUTABLE)
+ execute_process(COMMAND ${EMSCRIPTEN_EXECUTABLE} -v
+ OUTPUT_VARIABLE EMSCRIPTEN_VERSION_OUTPUT
+ ERROR_VARIABLE EMSCRIPTEN_VERSION_ERROR
+ RESULT_VARIABLE EMSCRIPTEN_VERSION_RESULT
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+
+ if(${EMSCRIPTEN_VERSION_RESULT} EQUAL 0)
+ string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" EMSCRIPTEN_VERSION "${EMSCRIPTEN_VERSION_OUTPUT}")
+ string(REGEX REPLACE "([0-9]+\\.[0-9]+\\.[0-9]+)" "\\1" EMSCRIPTEN_VERSION "${EMSCRIPTEN_VERSION}")
+ else()
+ message(SEND_ERROR "Command \"${EMSCRIPTEN_EXECUTABLE} --version\" failed with output: ${EMSCRIPTEN_VERSION_ERROR}")
+ endif()
+endif()
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Emscripten DEFAULT_MSG EMSCRIPTEN_EXECUTABLE EMSCRIPTEN_VERSION)
+mark_as_advanced(EMSCRIPTEN_VERSION)
+
diff -r 10860d4bca22 -r abcdb7bc2620 cmake_modules/FindGLEW.cmake
--- a/cmake_modules/FindGLEW.cmake Wed Apr 13 12:17:30 2016 +0200
+++ b/cmake_modules/FindGLEW.cmake Thu Apr 28 21:15:08 2016 +0200
@@ -34,6 +34,11 @@
$ENV{PROGRAMFILES}/GLEW/lib
DOC "The GLEW library")
+if(BUILD_ENGINE_JS)
+ set(GLEW_INCLUDE_DIR "${EMSCRIPTEN_ROOT_PATH}/system/include")
+ SET(GLEW_LIBRARY "glew_emscripten_internal")
+endif()
+
find_package_handle_standard_args(GLEW DEFAULT_MSG GLEW_LIBRARY GLEW_INCLUDE_DIR)
mark_as_advanced(GLEW_LIBRARY GLEW_INCLUDE_DIR)
diff -r 10860d4bca22 -r abcdb7bc2620 cmake_modules/FindOpenGL.cmake
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cmake_modules/FindOpenGL.cmake Thu Apr 28 21:15:08 2016 +0200
@@ -0,0 +1,209 @@
+#.rst:
+# FindOpenGL
+# ----------
+#
+# FindModule for OpenGL and GLU.
+#
+# Result Variables
+# ^^^^^^^^^^^^^^^^
+#
+# This module sets the following variables:
+#
+# ``OPENGL_FOUND``
+# True, if the system has OpenGL.
+# ``OPENGL_XMESA_FOUND``
+# True, if the system has XMESA.
+# ``OPENGL_GLU_FOUND``
+# True, if the system has GLU.
+# ``OPENGL_INCLUDE_DIR``
+# Path to the OpenGL include directory.
+# ``OPENGL_LIBRARIES``
+# Paths to the OpenGL and GLU libraries.
+#
+# If you want to use just GL you can use these values:
+#
+# ``OPENGL_gl_LIBRARY``
+# Path to the OpenGL library.
+# ``OPENGL_glu_LIBRARY``
+# Path to the GLU library.
+#
+# OSX Specific
+# ^^^^^^^^^^^^
+#
+# On OSX default to using the framework version of OpenGL. People will
+# have to change the cache values of OPENGL_glu_LIBRARY and
+# OPENGL_gl_LIBRARY to use OpenGL with X11 on OSX.
+
+
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+set(_OpenGL_REQUIRED_VARS OPENGL_gl_LIBRARY)
+
+if (CYGWIN)
+
+ find_path(OPENGL_INCLUDE_DIR GL/gl.h )
+ list(APPEND _OpenGL_REQUIRED_VARS OPENGL_INCLUDE_DIR)
+
+ find_library(OPENGL_gl_LIBRARY opengl32 )
+
+ find_library(OPENGL_glu_LIBRARY glu32 )
+
+elseif (WIN32)
+
+ if(BORLAND)
+ set (OPENGL_gl_LIBRARY import32 CACHE STRING "OpenGL library for win32")
+ set (OPENGL_glu_LIBRARY import32 CACHE STRING "GLU library for win32")
+ else()
+ set (OPENGL_gl_LIBRARY opengl32 CACHE STRING "OpenGL library for win32")
+ set (OPENGL_glu_LIBRARY glu32 CACHE STRING "GLU library for win32")
+ endif()
+
+elseif (APPLE)
+
+ # The OpenGL.framework provides both gl and glu
+ find_library(OPENGL_gl_LIBRARY OpenGL DOC "OpenGL library for OS X")
+ find_library(OPENGL_glu_LIBRARY OpenGL DOC
+ "GLU library for OS X (usually same as OpenGL library)")
+ find_path(OPENGL_INCLUDE_DIR OpenGL/gl.h DOC "Include for OpenGL on OS X")
+ list(APPEND _OpenGL_REQUIRED_VARS OPENGL_INCLUDE_DIR)
+
+else()
+ if (CMAKE_SYSTEM_NAME MATCHES "HP-UX")
+ # Handle HP-UX cases where we only want to find OpenGL in either hpux64
+ # or hpux32 depending on if we're doing a 64 bit build.
+ if(CMAKE_SIZEOF_VOID_P EQUAL 4)
+ set(_OPENGL_LIB_PATH
+ /opt/graphics/OpenGL/lib/hpux32/)
+ else()
+ set(_OPENGL_LIB_PATH
+ /opt/graphics/OpenGL/lib/hpux64/
+ /opt/graphics/OpenGL/lib/pa20_64)
+ endif()
+ elseif(CMAKE_SYSTEM_NAME STREQUAL Haiku)
+ set(_OPENGL_LIB_PATH
+ /boot/develop/lib/x86)
+ set(_OPENGL_INCLUDE_PATH
+ /boot/develop/headers/os/opengl)
+ endif()
+
+ # The first line below is to make sure that the proper headers
+ # are used on a Linux machine with the NVidia drivers installed.
+ # They replace Mesa with NVidia's own library but normally do not
+ # install headers and that causes the linking to
+ # fail since the compiler finds the Mesa headers but NVidia's library.
+ # Make sure the NVIDIA directory comes BEFORE the others.
+ # - Atanas Georgiev
+
+ find_path(OPENGL_INCLUDE_DIR GL/gl.h
+ /usr/share/doc/NVIDIA_GLX-1.0/include
+ /usr/openwin/share/include
+ /opt/graphics/OpenGL/include /usr/X11R6/include
+ ${_OPENGL_INCLUDE_PATH}
+ )
+ list(APPEND _OpenGL_REQUIRED_VARS OPENGL_INCLUDE_DIR)
+
+ find_path(OPENGL_xmesa_INCLUDE_DIR GL/xmesa.h
+ /usr/share/doc/NVIDIA_GLX-1.0/include
+ /usr/openwin/share/include
+ /opt/graphics/OpenGL/include /usr/X11R6/include
+ )
+
+ find_library(OPENGL_gl_LIBRARY
+ NAMES GL MesaGL
+ PATHS /opt/graphics/OpenGL/lib
+ /usr/openwin/lib
+ /usr/shlib /usr/X11R6/lib
+ ${_OPENGL_LIB_PATH}
+ )
+
+ unset(_OPENGL_INCLUDE_PATH)
+ unset(_OPENGL_LIB_PATH)
+
+ find_library(OPENGL_glu_LIBRARY
+ NAMES GLU MesaGLU
+ PATHS ${OPENGL_gl_LIBRARY}
+ /opt/graphics/OpenGL/lib
+ /usr/openwin/lib
+ /usr/shlib /usr/X11R6/lib
+ )
+
+endif ()
+
+if(OPENGL_gl_LIBRARY)
+
+ if(OPENGL_xmesa_INCLUDE_DIR)
+ set( OPENGL_XMESA_FOUND "YES" )
+ else()
+ set( OPENGL_XMESA_FOUND "NO" )
+ endif()
+
+ set( OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY} ${OPENGL_LIBRARIES})
+ if(OPENGL_glu_LIBRARY)
+ set( OPENGL_GLU_FOUND "YES" )
+ if(NOT "${OPENGL_glu_LIBRARY}" STREQUAL "${OPENGL_gl_LIBRARY}")
+ set( OPENGL_LIBRARIES ${OPENGL_glu_LIBRARY} ${OPENGL_LIBRARIES} )
+ endif()
+ else()
+ set( OPENGL_GLU_FOUND "NO" )
+ endif()
+
+ # This deprecated setting is for backward compatibility with CMake1.4
+ set (OPENGL_LIBRARY ${OPENGL_LIBRARIES})
+
+endif()
+
+# This deprecated setting is for backward compatibility with CMake1.4
+set(OPENGL_INCLUDE_PATH ${OPENGL_INCLUDE_DIR})
+
+if(BUILD_ENGINE_JS)
+ # The implementation is based on the standard FindOpenGL.cmake provided
+ # with CMake, but customized for targeting Emscripten only.
+
+ # These libraries are provided with Emscripten
+ SET(OPENGL_FOUND TRUE)
+ SET(OPENGL_GLU_FOUND TRUE)
+
+ # Doesn't look like this one is part of Emscripten
+ SET(OPENGL_XMESA_FOUND FALSE)
+
+ # This is the path where is found
+ SET(OPENGL_INCLUDE_DIR "${EMSCRIPTEN_ROOT_PATH}/system/include")
+
+ # No library to link against for OpenGL, since Emscripten picks it up
+ # automatically from library_gl.js, but need to report something, or
+ # CMake thinks we failed in the search.
+ SET(OPENGL_LIBRARIES "opengl_emscripten_internal")
+ SET(OPENGL_gl_LIBRARY "gl_emscripten_internal")
+ SET(OPENGL_glu_LIBRARY "glu_emscripten_internal")
+
+ mark_as_advanced(
+ OPENGL_INCLUDE_DIR
+ OPENGL_glu_LIBRARY
+ OPENGL_gl_LIBRARY
+ )
+endif()
+
+# handle the QUIETLY and REQUIRED arguments and set OPENGL_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenGL REQUIRED_VARS ${_OpenGL_REQUIRED_VARS})
+unset(_OpenGL_REQUIRED_VARS)
+
+mark_as_advanced(
+ OPENGL_INCLUDE_DIR
+ OPENGL_xmesa_INCLUDE_DIR
+ OPENGL_glu_LIBRARY
+ OPENGL_gl_LIBRARY
+)
diff -r 10860d4bca22 -r abcdb7bc2620 cmake_modules/FindSDL2.cmake
--- a/cmake_modules/FindSDL2.cmake Wed Apr 13 12:17:30 2016 +0200
+++ b/cmake_modules/FindSDL2.cmake Thu Apr 28 21:15:08 2016 +0200
@@ -158,6 +158,11 @@
SET(SDL2_LIBRARY_TEMP "${SDL2_LIBRARY_TEMP}" CACHE INTERNAL "")
ENDIF(SDL2_LIBRARY_TEMP)
+if(BUILD_ENGINE_JS)
+ set(SDL2_LIBRARY "sdl2_emscripten_internal" CACHE STRING "emscripten override" FORCE)
+ set(SDL2_INCLUDE_DIR "${CMAKE_SYSTEM_INCLUDE_PATH}/SDL" CACHE STRING "emscripten override" FORCE)
+endif()
+
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2 REQUIRED_VARS SDL2_LIBRARY SDL2_INCLUDE_DIR)
diff -r 10860d4bca22 -r abcdb7bc2620 cmake_modules/FindSDL2_image.cmake
--- a/cmake_modules/FindSDL2_image.cmake Wed Apr 13 12:17:30 2016 +0200
+++ b/cmake_modules/FindSDL2_image.cmake Thu Apr 28 21:15:08 2016 +0200
@@ -74,6 +74,12 @@
set(SDL2_IMAGE_LIBRARIES ${SDL2_IMAGE_LIBRARY})
set(SDL2_IMAGE_INCLUDE_DIRS ${SDL2_IMAGE_INCLUDE_DIR})
+if(BUILD_ENGINE_JS)
+ set(SDL2_IMAGE_LIBRARY "sdl2_image_emscripten_internal")
+ set(SDL2_IMAGE_LIBRARIES "sdl2_image_emscripten_internal")
+ set(SDL2_IMAGE_INCLUDE_DIRS "${CMAKE_SYSTEM_INCLUDE_PATH}/SDL")
+endif()
+
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2_image
diff -r 10860d4bca22 -r abcdb7bc2620 cmake_modules/FindSDL2_mixer.cmake
--- a/cmake_modules/FindSDL2_mixer.cmake Wed Apr 13 12:17:30 2016 +0200
+++ b/cmake_modules/FindSDL2_mixer.cmake Thu Apr 28 21:15:08 2016 +0200
@@ -74,6 +74,12 @@
set(SDL2_MIXER_LIBRARIES ${SDL2_MIXER_LIBRARY})
set(SDL2_MIXER_INCLUDE_DIRS ${SDL2_MIXER_INCLUDE_DIR})
+if(BUILD_ENGINE_JS)
+ set(SDL2_MIXER_LIBRARY "sdl2_mixer_emscripten_internal")
+ set(SDL2_MIXER_LIBRARIES "sdl2_mixer_emscripten_internal")
+ set(SDL2_MIXER_INCLUDE_DIRS "${CMAKE_SYSTEM_INCLUDE_PATH}/SDL")
+endif()
+
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2_mixer
diff -r 10860d4bca22 -r abcdb7bc2620 cmake_modules/FindSDL2_net.cmake
--- a/cmake_modules/FindSDL2_net.cmake Wed Apr 13 12:17:30 2016 +0200
+++ b/cmake_modules/FindSDL2_net.cmake Thu Apr 28 21:15:08 2016 +0200
@@ -74,6 +74,12 @@
set(SDL2_NET_LIBRARIES ${SDL2_NET_LIBRARY})
set(SDL2_NET_INCLUDE_DIRS ${SDL2_NET_INCLUDE_DIR})
+if(BUILD_ENGINE_JS)
+ set(SDL2_NET_LIBRARY "sdl2_net_emscripten_internal")
+ set(SDL2_NET_LIBRARIES "sdl2_net_emscripten_internal")
+ set(SDL2_NET_INCLUDE_DIRS "${CMAKE_SYSTEM_INCLUDE_PATH}/SDL")
+endif()
+
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2_net
diff -r 10860d4bca22 -r abcdb7bc2620 cmake_modules/FindSDL2_ttf.cmake
--- a/cmake_modules/FindSDL2_ttf.cmake Wed Apr 13 12:17:30 2016 +0200
+++ b/cmake_modules/FindSDL2_ttf.cmake Thu Apr 28 21:15:08 2016 +0200
@@ -74,6 +74,12 @@
set(SDL2_TTF_LIBRARIES ${SDL2_TTF_LIBRARY})
set(SDL2_TTF_INCLUDE_DIRS ${SDL2_TTF_INCLUDE_DIR})
+if(BUILD_ENGINE_JS)
+ set(SDL2_TTF_LIBRARY "sdl2_ttf_emscripten_internal")
+ set(SDL2_TTF_LIBRARIES "sdl2_ttf_emscripten_internal")
+ set(SDL2_TTF_INCLUDE_DIRS "${CMAKE_SYSTEM_INCLUDE_PATH}/SDL")
+endif()
+
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2_ttf
diff -r 10860d4bca22 -r abcdb7bc2620 cmake_modules/Platform/Emscripten.cmake
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cmake_modules/Platform/Emscripten.cmake Thu Apr 28 21:15:08 2016 +0200
@@ -0,0 +1,275 @@
+# This file is a 'toolchain description file' for CMake.
+# It teaches CMake about the Emscripten compiler, so that CMake can generate makefiles
+# from CMakeLists.txt that invoke emcc.
+
+# To use this toolchain file with CMake, invoke CMake with the following command line parameters
+# cmake -DCMAKE_TOOLCHAIN_FILE=/cmake/Modules/Platform/Emscripten.cmake
+# -DCMAKE_BUILD_TYPE=
+# -G "Unix Makefiles" (Linux and OSX)
+# -G "MinGW Makefiles" (Windows)
+# # Note, pass in here ONLY the path to the file, not the filename 'CMakeLists.txt' itself.
+
+# After that, build the generated Makefile with the command 'make'. On Windows, you may download and use 'mingw32-make' instead.
+
+# The following variable describes the target OS we are building to.
+set(CMAKE_SYSTEM_NAME Emscripten)
+set(CMAKE_SYSTEM_VERSION 1)
+
+set(CMAKE_CROSSCOMPILING TRUE)
+
+# Advertise Emscripten as a 32-bit platform (as opposed to CMAKE_SYSTEM_PROCESSOR=x86_64 for 64-bit platform),
+# since some projects (e.g. OpenCV) use this to detect bitness.
+set(CMAKE_SYSTEM_PROCESSOR x86)
+
+# Tell CMake how it should instruct the compiler to generate multiple versions of an outputted .so library: e.g. "libfoo.so, libfoo.so.1, libfoo.so.1.4" etc.
+# This feature is activated if a shared library project has the property SOVERSION defined.
+set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
+
+# In CMake, CMAKE_HOST_WIN32 is set when we are cross-compiling from Win32 to Emscripten: http://www.cmake.org/cmake/help/v2.8.12/cmake.html#variable:CMAKE_HOST_WIN32
+# The variable WIN32 is set only when the target arch that will run the code will be WIN32, so unset WIN32 when cross-compiling.
+set(WIN32)
+
+# The same logic as above applies for APPLE and CMAKE_HOST_APPLE, so unset APPLE.
+set(APPLE)
+
+# And for UNIX and CMAKE_HOST_UNIX. However, Emscripten is often able to mimic being a Linux/Unix system, in which case a lot of existing CMakeLists.txt files can be configured for Emscripten while assuming UNIX build, so this is left enabled.
+set(UNIX 1)
+
+# Do a no-op access on the CMAKE_TOOLCHAIN_FILE variable so that CMake will not issue a warning on it being unused.
+if(CMAKE_TOOLCHAIN_FILE)
+endif()
+
+# In order for check_function_exists() detection to work, we must signal it to pass an additional flag, which causes the compilation
+# to abort if linking results in any undefined symbols. The CMake detection mechanism depends on the undefined symbol error to be raised.
+set(CMAKE_REQUIRED_FLAGS "-s ERROR_ON_UNDEFINED_SYMBOLS=1")
+
+# Locate where the Emscripten compiler resides in relative to this toolchain file.
+if("${EMSCRIPTEN_ROOT_PATH}" STREQUAL "")
+ get_filename_component(GUESS_EMSCRIPTEN_ROOT_PATH "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)
+ if(EXISTS "${GUESS_EMSCRIPTEN_ROOT_PATH}/emranlib")
+ set(EMSCRIPTEN_ROOT_PATH "${GUESS_EMSCRIPTEN_ROOT_PATH}")
+ endif()
+endif()
+
+# If not found by above search, locate using the EMSCRIPTEN environment variable.
+if("${EMSCRIPTEN_ROOT_PATH}" STREQUAL "")
+ set(EMSCRIPTEN_ROOT_PATH "$ENV{EMSCRIPTEN}")
+endif()
+
+# Abort if not found.
+if("${EMSCRIPTEN_ROOT_PATH}" STREQUAL "")
+ 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.
+get_filename_component(EMSCRIPTEN_ROOT_PATH "${EMSCRIPTEN_ROOT_PATH}" ABSOLUTE)
+
+if(NOT CMAKE_MODULE_PATH)
+ set(CMAKE_MODULE_PATH "")
+endif()
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${EMSCRIPTEN_ROOT_PATH}/cmake/Modules")
+
+set(CMAKE_FIND_ROOT_PATH "${EMSCRIPTEN_ROOT_PATH}/system")
+
+if(CMAKE_HOST_WIN32)
+ set(EMCC_SUFFIX ".bat")
+else()
+ set(EMCC_SUFFIX "")
+endif()
+
+# Specify the compilers to use for C and C++
+if("${CMAKE_C_COMPILER}" STREQUAL "")
+ set(CMAKE_C_COMPILER "${EMSCRIPTEN_ROOT_PATH}/emcc${EMCC_SUFFIX}")
+endif()
+if("${CMAKE_CXX_COMPILER}" STREQUAL "")
+ set(CMAKE_CXX_COMPILER "${EMSCRIPTEN_ROOT_PATH}/em++${EMCC_SUFFIX}")
+endif()
+
+if("${CMAKE_AR}" STREQUAL "")
+ set(CMAKE_AR "${EMSCRIPTEN_ROOT_PATH}/emar${EMCC_SUFFIX}" CACHE FILEPATH "Emscripten ar")
+endif()
+
+if("${CMAKE_RANLIB}" STREQUAL "")
+ set(CMAKE_RANLIB "${EMSCRIPTEN_ROOT_PATH}/emranlib${EMCC_SUFFIX}" CACHE FILEPATH "Emscripten ranlib")
+endif()
+
+# Don't do compiler autodetection, since we are cross-compiling.
+include(CMakeForceCompiler)
+CMAKE_FORCE_C_COMPILER("${CMAKE_C_COMPILER}" Clang)
+CMAKE_FORCE_CXX_COMPILER("${CMAKE_CXX_COMPILER}" Clang)
+
+# To find programs to execute during CMake run time with find_program(), e.g. 'git' or so, we allow looking
+# into system paths.
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+
+# Since Emscripten is a cross-compiler, we should never look at the system-provided directories like /usr/include and so on.
+# Therefore only CMAKE_FIND_ROOT_PATH should be used as a find directory. See http://www.cmake.org/cmake/help/v3.0/variable/CMAKE_FIND_ROOT_PATH_MODE_INCLUDE.html
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
+
+set(CMAKE_SYSTEM_INCLUDE_PATH "${EMSCRIPTEN_ROOT_PATH}/system/include")
+
+# We would prefer to specify a standard set of Clang+Emscripten-friendly common convention for suffix files, especially for CMake executable files,
+# but if these are adjusted, ${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake will fail, since it depends on being able to compile output files with predefined names.
+#SET(CMAKE_LINK_LIBRARY_SUFFIX "")
+#SET(CMAKE_STATIC_LIBRARY_PREFIX "")
+#SET(CMAKE_STATIC_LIBRARY_SUFFIX ".bc")
+#SET(CMAKE_SHARED_LIBRARY_PREFIX "")
+#SET(CMAKE_SHARED_LIBRARY_SUFFIX ".bc")
+SET(CMAKE_EXECUTABLE_SUFFIX ".js")
+#SET(CMAKE_FIND_LIBRARY_PREFIXES "")
+#SET(CMAKE_FIND_LIBRARY_SUFFIXES ".bc")
+
+SET(CMAKE_C_USE_RESPONSE_FILE_FOR_LIBRARIES 1)
+SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_LIBRARIES 1)
+SET(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
+SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1)
+SET(CMAKE_C_USE_RESPONSE_FILE_FOR_INCLUDES 1)
+SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_INCLUDES 1)
+
+set(CMAKE_C_RESPONSE_FILE_LINK_FLAG "@")
+set(CMAKE_CXX_RESPONSE_FILE_LINK_FLAG "@")
+
+# Specify the program to use when building static libraries. Force Emscripten-related command line options to clang.
+set(CMAKE_C_CREATE_STATIC_LIBRARY " rc ")
+set(CMAKE_CXX_CREATE_STATIC_LIBRARY " rc ")
+
+# Set a global EMSCRIPTEN variable that can be used in client CMakeLists.txt to detect when building using Emscripten.
+set(EMSCRIPTEN 1 CACHE BOOL "If true, we are targeting Emscripten output.")
+
+# Hardwire support for cmake-2.8/Modules/CMakeBackwardsCompatibilityC.cmake without having CMake to try complex things
+# to autodetect these:
+set(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
+set(CMAKE_SIZEOF_CHAR 1)
+set(CMAKE_SIZEOF_UNSIGNED_SHORT 2)
+set(CMAKE_SIZEOF_SHORT 2)
+set(CMAKE_SIZEOF_INT 4)
+set(CMAKE_SIZEOF_UNSIGNED_LONG 4)
+set(CMAKE_SIZEOF_UNSIGNED_INT 4)
+set(CMAKE_SIZEOF_LONG 4)
+set(CMAKE_SIZEOF_VOID_P 4)
+set(CMAKE_SIZEOF_FLOAT 4)
+set(CMAKE_SIZEOF_DOUBLE 8)
+set(CMAKE_C_SIZEOF_DATA_PTR 4)
+set(CMAKE_CXX_SIZEOF_DATA_PTR 4)
+set(CMAKE_HAVE_LIMITS_H 1)
+set(CMAKE_HAVE_UNISTD_H 1)
+set(CMAKE_HAVE_PTHREAD_H 1)
+set(CMAKE_HAVE_SYS_PRCTL_H 1)
+set(CMAKE_WORDS_BIGENDIAN 0)
+set(CMAKE_DL_LIBS)
+
+set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG -O2" CACHE STRING "Emscripten-overridden CMAKE_C_FLAGS_RELEASE")
+set(CMAKE_C_FLAGS_MINSIZEREL "-DNDEBUG -Os" CACHE STRING "Emscripten-overridden CMAKE_C_FLAGS_MINSIZEREL")
+set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2" CACHE STRING "Emscripten-overridden CMAKE_C_FLAGS_RELWITHDEBINFO")
+set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -O2" CACHE STRING "Emscripten-overridden CMAKE_CXX_FLAGS_RELEASE")
+set(CMAKE_CXX_FLAGS_MINSIZEREL "-DNDEBUG -Os" CACHE STRING "Emscripten-overridden CMAKE_CXX_FLAGS_MINSIZEREL")
+set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2" CACHE STRING "Emscripten-overridden CMAKE_CXX_FLAGS_RELWITHDEBINFO")
+
+set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-O2" CACHE STRING "Emscripten-overridden CMAKE_EXE_LINKER_FLAGS_RELEASE")
+set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "-Os" CACHE STRING "Emscripten-overridden CMAKE_EXE_LINKER_FLAGS_MINSIZEREL")
+set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Emscripten-overridden CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO")
+set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "-O2" CACHE STRING "Emscripten-overridden CMAKE_SHARED_LINKER_FLAGS_RELEASE")
+set(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "-Os" CACHE STRING "Emscripten-overridden CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL")
+set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Emscripten-overridden CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO")
+set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "-O2" CACHE STRING "Emscripten-overridden CMAKE_MODULE_LINKER_FLAGS_RELEASE")
+set(CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL "-Os" CACHE STRING "Emscripten-overridden CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL")
+set(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Emscripten-overridden CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO")
+
+function(em_validate_asmjs_after_build target)
+ add_custom_command(TARGET ${target} POST_BUILD COMMAND ${CMAKE_COMMAND} -E echo Validating build output for asm.js... COMMAND "python" ARGS "${EMSCRIPTEN_ROOT_PATH}/tools/validate_asmjs.py" "$")
+endfunction()
+
+# A global counter to guarantee unique names for js library files.
+set(link_js_counter 1)
+
+# Internal function: Do not call from user CMakeLists.txt files. Use one of em_link_js_library()/em_link_pre_js()/em_link_post_js() instead.
+function(em_add_tracked_link_flag target flagname)
+
+ # User can input list of JS files either as a single list, or as variable arguments to this function, so iterate over varargs, and treat each
+ # item in varargs as a list itself, to support both syntax forms.
+ foreach(jsFileList ${ARGN})
+ foreach(jsfile ${jsFileList})
+ # If the user edits the JS file, we want to relink the emscripten application, but unfortunately it is not possible to make a link step
+ # depend directly on a source file. Instead, we must make a dummy no-op build target on that source file, and make the project depend on
+ # that target.
+
+ # Sanitate the source .js filename to a good symbol name to use as a dummy filename.
+ get_filename_component(jsname "${jsfile}" NAME)
+ string(REGEX REPLACE "[/:\\\\.\ ]" "_" dummy_js_target ${jsname})
+ set(dummy_lib_name ${target}_${link_js_counter}_${dummy_js_target})
+ set(dummy_c_name "${CMAKE_BINARY_DIR}/${dummy_js_target}_tracker.c")
+
+ # Create a new static library target that with a single dummy .c file.
+ add_library(${dummy_lib_name} STATIC ${dummy_c_name})
+ # Make the dummy .c file depend on the .js file we are linking, so that if the .js file is edited, the dummy .c file, and hence the static library will be rebuild (no-op). This causes the main application to be relinked, which is what we want.
+ # This approach was recommended by http://www.cmake.org/pipermail/cmake/2010-May/037206.html
+ add_custom_command(OUTPUT ${dummy_c_name} COMMAND ${CMAKE_COMMAND} -E touch ${dummy_c_name} DEPENDS ${jsfile})
+ target_link_libraries(${target} ${dummy_lib_name})
+
+ # Link the js-library to the target
+ # When a linked library starts with a "-" cmake will just add it to the linker command line as it is.
+ # The advantage of doing it this way is that the js-library will also be automatically linked to targets
+ # that depend on this target.
+ get_filename_component(js_file_absolute_path "${jsfile}" ABSOLUTE )
+ target_link_libraries(${target} "${flagname} \"${js_file_absolute_path}\"")
+
+ math(EXPR link_js_counter "${link_js_counter} + 1")
+ endforeach()
+ endforeach()
+endfunction()
+
+# This function links a (list of ) .js library file(s) to the given CMake project.
+# Example: em_link_js_library(my_executable "lib1.js" "lib2.js")
+# will result in emcc passing --js-library lib1.js --js-library lib2.js to the emscripten linker, as well as
+# tracking the modification timestamp between the linked .js files and the main project, so that editing the .js file
+# will cause the target project to be relinked.
+function(em_link_js_library target)
+ em_add_tracked_link_flag(${target} "--js-library" ${ARGN})
+endfunction()
+
+# This function is identical to em_link_js_library(), except the .js files will be added with '--pre-js file.js' command line flag,
+# which is generally used to add some preamble .js code to a generated output file.
+function(em_link_pre_js target)
+ em_add_tracked_link_flag(${target} "--pre-js" ${ARGN})
+endfunction()
+
+# This function is identical to em_link_js_library(), except the .js files will be added with '--post-js file.js' command line flag,
+# which is generally used to add some postamble .js code to a generated output file.
+function(em_link_post_js target)
+ em_add_tracked_link_flag(${target} "--post-js" ${ARGN})
+endfunction()
+
+# Experimental support for targeting generation of Visual Studio project files (vs-tool) of Emscripten projects for Windows.
+# To use this, pass the combination -G "Visual Studio 10" -DCMAKE_TOOLCHAIN_FILE=Emscripten.cmake
+if ("${CMAKE_GENERATOR}" MATCHES "^Visual Studio.*")
+ # By default, CMake generates VS project files with a true directive.
+ # This causes VS to attempt to invoke rc.exe during the build, which will fail since app manifests are meaningless for Emscripten.
+ # To disable this, add the following linker flag. This flag will not go to emcc, since the Visual Studio CMake generator will swallow it.
+ set(EMSCRIPTEN_VS_LINKER_FLAGS "/MANIFEST:NO")
+ # CMake is hardcoded to write a ClCompile directive $(IntDir) in all VS project files it generates.
+ # This makes VS pass emcc a -o param that points to a directory instead of a file, which causes emcc autogenerate the output filename.
+ # CMake is hardcoded to assume all object files have the suffix .obj, so adjust the emcc-autogenerated default suffix name to match.
+ set(EMSCRIPTEN_VS_LINKER_FLAGS "${EMSCRIPTEN_VS_LINKER_FLAGS} --default-obj-ext .obj")
+ # Also hint CMake that it should not hardcode generation. Requires a custom CMake build for this to work (ignored on others)
+ # See http://www.cmake.org/Bug/view.php?id=14673 and https://github.com/juj/CMake
+ set(CMAKE_VS_NO_DEFAULT_OBJECTFILENAME 1)
+
+ # Apply and cache Emscripten Visual Studio IDE-specific linker flags.
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${EMSCRIPTEN_VS_LINKER_FLAGS}" CACHE STRING "")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${EMSCRIPTEN_VS_LINKER_FLAGS}" CACHE STRING "")
+ set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${EMSCRIPTEN_VS_LINKER_FLAGS}" CACHE STRING "")
+endif()
+
+if(NOT DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
+ find_program(NODE_JS_EXECUTABLE NAMES nodejs node)
+ if(NODE_JS_EXECUTABLE)
+ set(CMAKE_CROSSCOMPILING_EMULATOR "${NODE_JS_EXECUTABLE}" CACHE FILEPATH "Path to the emulator for the target system.")
+ endif()
+endif()
+
+# No-op on CMAKE_CROSSCOMPILING_EMULATOR so older versions of cmake do not
+# complain about unused CMake variable.
+if(CMAKE_CROSSCOMPILING_EMULATOR)
+endif()
diff -r 10860d4bca22 -r abcdb7bc2620 cmake_modules/TestBigEndian.cmake
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cmake_modules/TestBigEndian.cmake Thu Apr 28 21:15:08 2016 +0200
@@ -0,0 +1,30 @@
+#.rst:
+# TestBigEndian
+# -------------
+#
+# The TestBigEndian.cmake module that ships with CMake, which
+# checks if the system is big endian or little endian, assumes
+# that a binary is produced that will have bytes that correspond to the
+# endianness on the target system. Since emscripten produces Javascript, we
+# override the default behavior and always return little endian.
+#
+# ::
+#
+# TEST_BIG_ENDIAN(VARIABLE)
+# VARIABLE - variable to store the result to
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+function(TEST_BIG_ENDIAN VARIABLE)
+ set(${VARIABLE} 0 CACHE INTERNAL "Result of TEST_BIG_ENDIAN" FORCE)
+endfunction()
diff -r 10860d4bca22 -r abcdb7bc2620 hedgewars/ArgParsers.pas
--- a/hedgewars/ArgParsers.pas Wed Apr 13 12:17:30 2016 +0200
+++ b/hedgewars/ArgParsers.pas Thu Apr 28 21:15:08 2016 +0200
@@ -23,9 +23,9 @@
procedure GetParams;
{$IFDEF HWLIBRARY}
-var operatingsystem_parameter_argc: LongInt = 0; export;
- operatingsystem_parameter_argv: pointer = nil; export;
- operatingsystem_parameter_envp: pointer = nil; export;
+var operatingsystem_parameter_argc: LongInt = 0; {$IFNDEF PAS2C}cdecl; export;{$ENDIF}
+ operatingsystem_parameter_argv: pointer = nil; {$IFNDEF PAS2C}cdecl; export;{$ENDIF}
+ operatingsystem_parameter_envp: pointer = nil; {$IFNDEF PAS2C}cdecl; export;{$ENDIF}
function ParamCount: LongInt;
function ParamStr(i: LongInt): shortstring;
diff -r 10860d4bca22 -r abcdb7bc2620 hedgewars/SDLh.pas
--- a/hedgewars/SDLh.pas Wed Apr 13 12:17:30 2016 +0200
+++ b/hedgewars/SDLh.pas Thu Apr 28 21:15:08 2016 +0200
@@ -1047,7 +1047,6 @@
function SDL_GetError: PChar; cdecl; external SDLLibName;
-function SDL_SetVideoMode(width, height, bpp: LongInt; flags: LongWord): PSDL_Surface; cdecl; external SDLLibName;
function SDL_CreateRGBSurface(flags: LongWord; Width, Height, Depth: LongInt; RMask, GMask, BMask, AMask: LongWord): PSDL_Surface; cdecl; external SDLLibName;
function SDL_CreateRGBSurfaceFrom(pixels: Pointer; width, height, depth, pitch: LongInt; RMask, GMask, BMask, AMask: LongWord): PSDL_Surface; cdecl; external SDLLibName;
procedure SDL_FreeSurface(Surface: PSDL_Surface); cdecl; external SDLLibName;
diff -r 10860d4bca22 -r abcdb7bc2620 hedgewars/hwengine.pas
--- a/hedgewars/hwengine.pas Wed Apr 13 12:17:30 2016 +0200
+++ b/hedgewars/hwengine.pas Thu Apr 28 21:15:08 2016 +0200
@@ -39,7 +39,7 @@
;
{$IFDEF HWLIBRARY}
-procedure RunEngine(argc: LongInt; argv: PPChar); cdecl; export;
+function RunEngine(argc: LongInt; argv: PPChar): LongInt; cdecl; export;
procedure preInitEverything();
procedure initEverything(complete:boolean);
@@ -576,7 +576,7 @@
end;
{$IFDEF HWLIBRARY}
-procedure RunEngine(argc: LongInt; argv: PPChar); cdecl; export;
+function RunEngine(argc: LongInt; argv: PPChar): LongInt; cdecl; export;
begin
operatingsystem_parameter_argc:= argc;
operatingsystem_parameter_argv:= argv;
@@ -622,7 +622,7 @@
exit(HaltNoError);
{$ELSE}
{$IFDEF IPHONEOS}
- exit;
+ exit(HaltNoError);
{$ELSE}
halt(HaltNoError);
{$ENDIF}
diff -r 10860d4bca22 -r abcdb7bc2620 hedgewars/options.inc
--- a/hedgewars/options.inc Wed Apr 13 12:17:30 2016 +0200
+++ b/hedgewars/options.inc Thu Apr 28 21:15:08 2016 +0200
@@ -46,7 +46,9 @@
{$DEFINE USE_TOUCH_INTERFACE}
{$ELSE}
{$DEFINE USE_AM_NUMCOLUMN}
- {$DEFINE USE_S3D_RENDERING}
+ {$IFNDEF WEBGL}
+ {$DEFINE USE_S3D_RENDERING}
+ {$ENDIF}
{$ENDIF}
diff -r 10860d4bca22 -r abcdb7bc2620 hedgewars/pas2cRedo.pas
--- a/hedgewars/pas2cRedo.pas Wed Apr 13 12:17:30 2016 +0200
+++ b/hedgewars/pas2cRedo.pas Thu Apr 28 21:15:08 2016 +0200
@@ -113,4 +113,5 @@
Load_GL_VERSION_2_0 : procedure;
+ GetCurrentDir : function : PChar;
diff -r 10860d4bca22 -r abcdb7bc2620 hedgewars/uChat.pas
--- a/hedgewars/uChat.pas Wed Apr 13 12:17:30 2016 +0200
+++ b/hedgewars/uChat.pas Thu Apr 28 21:15:08 2016 +0200
@@ -1011,10 +1011,12 @@
procedure TextInput(var event: TSDL_TextInputEvent);
var s: shortstring;
l: byte;
+ isl: integer;
begin
DeleteSelected();
l:= 0;
+ // fetch all bytes of character/input
while event.text[l] <> #0 do
begin
s[l + 1]:= event.text[l];
@@ -1023,9 +1025,30 @@
if l > 0 then
begin
- if byte(InputStr.s[0]) + l > 240 then exit;
- s[0]:= char(l);
- InsertIntoInputStr(s);
+ isl:= Length(InputStr.s);
+ // check if user is typing a redundant closing hog-speech quotation mark
+ if (l = 1) and (isl >= 2) and (cursorPos = isl - 1) and charIsForHogSpeech(s[1])
+ and (s[1] = InputStr.s[1]) and (s[1] = InputStr.s[isl]) then
+ begin
+ MoveCursorToNextChar();
+ UpdateCursorCoords();
+ end
+ else
+ begin
+ // don't add input that doesn't fit
+ if isl + l > MaxInputStrLen then exit;
+ s[0]:= char(l);
+ InsertIntoInputStr(s);
+
+ // add closing hog speech quotation marks automagically
+ if (l = 1) and (Length(InputStr.s) = 1) and charIsForHogSpeech(s[1]) then
+ begin
+ InsertIntoInputStr(s);
+ MoveCursorToPreviousChar();
+ UpdateCursorCoords();
+ end;
+ end;
+
end
end;
diff -r 10860d4bca22 -r abcdb7bc2620 hedgewars/uGears.pas
--- a/hedgewars/uGears.pas Wed Apr 13 12:17:30 2016 +0200
+++ b/hedgewars/uGears.pas Thu Apr 28 21:15:08 2016 +0200
@@ -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, playWidth, 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 10860d4bca22 -r abcdb7bc2620 hedgewars/uGearsHandlersMess.pas
--- a/hedgewars/uGearsHandlersMess.pas Wed Apr 13 12:17:30 2016 +0200
+++ b/hedgewars/uGearsHandlersMess.pas Thu Apr 28 21:15:08 2016 +0200
@@ -3413,7 +3413,7 @@
Gear^.Timer := 0;
inc(Gear^.Pos);
if Gear^.Pos = 5 then
- PlaySoundV(sndYoohoo, Gear^.Hedgehog^.Team^.voicepack)
+ PlaySound(sndYoohoo);
end;
if (Gear^.Pos = 14) and (RealTicks and $3 = 0) then
diff -r 10860d4bca22 -r abcdb7bc2620 hedgewars/uGearsUtils.pas
--- a/hedgewars/uGearsUtils.pas Wed Apr 13 12:17:30 2016 +0200
+++ b/hedgewars/uGearsUtils.pas Thu Apr 28 21:15:08 2016 +0200
@@ -939,7 +939,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 10860d4bca22 -r abcdb7bc2620 hedgewars/uInputHandler.pas
--- a/hedgewars/uInputHandler.pas Wed Apr 13 12:17:30 2016 +0200
+++ b/hedgewars/uInputHandler.pas Thu Apr 28 21:15:08 2016 +0200
@@ -318,7 +318,7 @@
DefaultBinds[KeyNameToCode('j0a0d')]:= '+right';
DefaultBinds[KeyNameToCode('j0a1u')]:= '+up';
DefaultBinds[KeyNameToCode('j0a1d')]:= '+down';
- for i:= 1 to 10 do DefaultBinds[KeyNameToCode('f'+IntToStr(i))]:= 'slot '+IntToStr(i);
+ for i:= 1 to 10 do DefaultBinds[KeyNameToCode('f'+IntToStr(i))]:= 'slot '+char(48+i);
for i:= 1 to 5 do DefaultBinds[KeyNameToCode(IntToStr(i))]:= 'timer '+IntToStr(i);
loadBinds('dbind', cPathz[ptData] + '/settings.ini');
diff -r 10860d4bca22 -r abcdb7bc2620 hedgewars/uLand.pas
--- a/hedgewars/uLand.pas Wed Apr 13 12:17:30 2016 +0200
+++ b/hedgewars/uLand.pas Thu Apr 28 21:15:08 2016 +0200
@@ -33,7 +33,7 @@
uses uConsole, uStore, uRandom, uLandObjects, uIO, uLandTexture, SysUtils,
uVariables, uUtils, uCommands, adler32, uDebug, uLandPainted, uTextures,
uLandGenMaze, uPhysFSLayer, uScript, uLandGenPerlin,
- uLandGenTemplateBased, uLandUtils;
+ uLandGenTemplateBased, uLandUtils, uRenderUtils;
var digest: shortstring;
maskOnly: boolean;
@@ -49,7 +49,7 @@
procedure DrawBorderFromImage(Surface: PSDL_Surface);
var tmpsurf: PSDL_Surface;
- r, rr: TSDL_Rect;
+ //r, rr: TSDL_Rect;
x, yd, yu: LongInt;
targetMask: Word;
begin
@@ -79,25 +79,9 @@
while (yu < yd ) and ((Land[yu, x] and targetMask) = 0) do inc(yu);
if (yd < LAND_HEIGHT - 1) and ((yd - yu) >= 16) then
- begin
- rr.x:= x;
- rr.y:= yd - 15;
- r.x:= x mod tmpsurf^.w;
- r.y:= 16;
- r.w:= 1;
- r.h:= 16;
- SDL_UpperBlit(tmpsurf, @r, Surface, @rr);
- end;
+ copyToXYFromRect(tmpsurf, Surface, x mod tmpsurf^.w, 16, 1, 16, x, yd - 15);
if (yu > 0) then
- begin
- rr.x:= x;
- rr.y:= yu;
- r.x:= x mod tmpsurf^.w;
- r.y:= 0;
- r.w:= 1;
- r.h:= Min(16, yd - yu + 1);
- SDL_UpperBlit(tmpsurf, @r, Surface, @rr);
- end;
+ copyToXYFromRect(tmpsurf, Surface, x mod tmpsurf^.w, 0, 1, Min(16, yd - yu + 1), x, yu);
yd:= yu - 1;
until yd < 0;
end;
@@ -194,7 +178,8 @@
r.x:= 0;
while r.x < LAND_WIDTH do
begin
- SDL_UpperBlit(tmpsurf, nil, Surface, @r);
+ copyToXY(tmpsurf, Surface, r.x, r.y);
+ //SDL_UpperBlit(tmpsurf, nil, Surface, @r);
inc(r.x, tmpsurf^.w)
end;
inc(y, tmpsurf^.h);
@@ -363,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;
@@ -570,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;
@@ -713,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;
@@ -761,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 10860d4bca22 -r abcdb7bc2620 hedgewars/uLandUtils.pas
--- a/hedgewars/uLandUtils.pas Wed Apr 13 12:17:30 2016 +0200
+++ b/hedgewars/uLandUtils.pas Thu Apr 28 21:15:08 2016 +0200
@@ -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 10860d4bca22 -r abcdb7bc2620 hedgewars/uLocale.pas
--- a/hedgewars/uLocale.pas Wed Apr 13 12:17:30 2016 +0200
+++ b/hedgewars/uLocale.pas Thu Apr 28 21:15:08 2016 +0200
@@ -140,7 +140,12 @@
uUtils.initModule(false);
uVariables.initModule;
- uPhysFSLayer.initModule;
+
+ PathPrefix:= PathPrefix + #0;
+ UserPathPrefix:= UserPathPrefix + #0;
+ uPhysFSLayer.initModule(@PathPrefix[1], @UserPathPrefix[1]);
+ PathPrefix:= copy(PathPrefix, 1, length(PathPrefix) - 1);
+ UserPathPrefix:= copy(UserPathPrefix, 1, length(UserPathPrefix) - 1);
LoadLocale(Strpas(filename));
diff -r 10860d4bca22 -r abcdb7bc2620 hedgewars/uPhysFSLayer.pas
--- a/hedgewars/uPhysFSLayer.pas Wed Apr 13 12:17:30 2016 +0200
+++ b/hedgewars/uPhysFSLayer.pas Thu Apr 28 21:15:08 2016 +0200
@@ -198,7 +198,7 @@
begin
{$IFDEF HWLIBRARY}
//TODO: http://icculus.org/pipermail/physfs/2011-August/001006.html
- cPhysfsId:= GetCurrentDir() + {$IFDEF DARWIN}{$IFNDEF IPHONEOS}'/Hedgewars.app/Contents/MacOS/' + {$ENDIF}{$ENDIF} ' hedgewars';
+ cPhysfsId:= shortstring(GetCurrentDir()) + {$IFDEF DARWIN}{$IFNDEF IPHONEOS}'/Hedgewars.app/Contents/MacOS/' + {$ENDIF}{$ENDIF} ' hedgewars';
{$ELSE}
cPhysfsId:= ParamStr(0);
{$ENDIF}
diff -r 10860d4bca22 -r abcdb7bc2620 hedgewars/uScript.pas
--- a/hedgewars/uScript.pas Wed Apr 13 12:17:30 2016 +0200
+++ b/hedgewars/uScript.pas Thu Apr 28 21:15:08 2016 +0200
@@ -56,7 +56,6 @@
procedure freeModule;
implementation
-{$IFDEF USE_LUA_SCRIPT}
uses LuaPas,
uConsole,
@@ -104,6 +103,7 @@
PointsBuffer: shortstring;
prevCursorPoint: TPoint; // why is tpoint still in sdlh...
+{$IFDEF USE_LUA_SCRIPT}
procedure ScriptPrepareAmmoStore; forward;
procedure ScriptApplyAmmoStore; forward;
procedure ScriptSetAmmo(ammo : TAmmoType; count, probability, delay, reinforcement: Byte); forward;
@@ -338,7 +338,7 @@
LuaToMapGenOrd:= i;
end;
-// wrapped calls //
+// wrapped calls
// functions called from Lua:
// function(L : Plua_State) : LongInt; Cdecl;
@@ -490,7 +490,7 @@
cs:= 0; // current slot
fa:= 0; // first ammo item to check
- // if something is selected, find it's successor
+ // if something is selected, find it is successor
if curAmmoType <> amNothing then
begin
// get current slot index
@@ -499,7 +499,7 @@
while (fa < cMaxSlotAmmoIndex)
and (Ammo^[cs, fa].AmmoType <> CurAmmoType) do
inc(fa);
- // increase once more because we won't successor
+ // increase once more because we will not successor
inc(fa);
end;
@@ -913,7 +913,7 @@
lc_setvisualgearvalues:= 0
end;
-// so. going to use this to get/set some of the more obscure gear values which weren't already exposed elsewhere
+// so. going to use this to get/set some of the more obscure gear values which were not already exposed elsewhere
// can keep adding things in the future. isnoneornil makes it safe
function lc_getgearvalues(L : Plua_State) : LongInt; Cdecl;
var gear: PGear;
@@ -1210,9 +1210,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
@@ -1226,8 +1241,8 @@
begin
if CheckLuaParamCount(L, 2, 'SetClanColor', 'clan, color') then
begin
- i:= lua_tointeger(L,1);
- if i >= ClansCount then exit(0);
+ i:= lua_tointeger(L,1);
+ if i >= ClansCount then exit(0);
clan := ClansArray[i];
clan^.Color:= lua_tointeger(L, 2) shr 8;
@@ -1248,7 +1263,7 @@
team^.NameTagTex:= RenderStringTex(ansistring(clan^.Teams[i]^.TeamName), clan^.Color, fnt16);
end;
- FreeAndNilTexture(clan^.HealthTex);
+ FreeAndNilTexture(clan^.HealthTex);
clan^.HealthTex:= makeHealthBarTexture(cTeamHealthWidth + 5, clan^.Teams[0]^.NameTagTex^.h, clan^.Color);
end;
@@ -2287,16 +2302,16 @@
if CheckAndFetchLuaParamMinCount(L, 4, call, params, n) then
begin
if not lua_isnoneornil(L, 5) then
- tint := lua_tointeger(L, 5)
+ tint := lua_tointeger(L, 5)
else tint := $FFFFFFFF;
if not lua_isnoneornil(L, 6) then
- behind := lua_toboolean(L, 6)
+ behind := lua_toboolean(L, 6)
else behind := false;
if not lua_isnoneornil(L, 7) then
- flipHoriz := lua_toboolean(L, 7)
+ flipHoriz := lua_toboolean(L, 7)
else flipHoriz := false;
if not lua_isnoneornil(L, 8) then
- flipVert := lua_toboolean(L, 8)
+ flipVert := lua_toboolean(L, 8)
else flipVert := false;
lf:= 0;
@@ -2334,16 +2349,16 @@
if CheckAndFetchLuaParamMinCount(L, 4, call, params, n) then
begin
if not lua_isnoneornil(L, 5) then
- eraseOnLFMatch := lua_toboolean(L, 5)
+ eraseOnLFMatch := lua_toboolean(L, 5)
else eraseOnLFMatch := false;
if not lua_isnoneornil(L, 6) then
- onlyEraseLF := lua_toboolean(L, 6)
+ onlyEraseLF := lua_toboolean(L, 6)
else onlyEraseLF := false;
if not lua_isnoneornil(L, 7) then
- flipHoriz := lua_toboolean(L, 7)
+ flipHoriz := lua_toboolean(L, 7)
else flipHoriz := false;
if not lua_isnoneornil(L, 8) then
- flipVert := lua_toboolean(L, 8)
+ flipVert := lua_toboolean(L, 8)
else flipVert := false;
lf:= 0;
@@ -2733,7 +2748,7 @@
ScriptSetInteger('HealthDecrease', cHealthDecrease);
ScriptSetInteger('GetAwayTime', cGetAwayTime);
ScriptSetString('Map', cMapName);
-ScriptSetString('Theme', '');
+ScriptSetString('Theme', Theme);
ScriptSetString('Goals', '');
ScriptCall('onGameInit');
@@ -2869,7 +2884,7 @@
ScriptSetInteger('WaterLine', cWaterLine);
if isCursorVisible and (not bShowAmmoMenu) then
begin
- if (prevCursorPoint.X <> CursorPoint.X) or
+ if (prevCursorPoint.X <> CursorPoint.X) or
(prevCursorPoint.Y <> CursorPoint.Y) then
begin
ScriptSetInteger('CursorX', CursorPoint.X - WorldDx);
@@ -3028,13 +3043,13 @@
procedure ScriptSetAmmoDelay(ammo : TAmmoType; delay: Byte);
begin
-// change loadout string if ammo store hasn't been initialized yet
+// change loadout string if ammo store has not been initialized yet
if (StoreCnt = 0) then
begin
if (delay <= 9) then
ScriptAmmoDelay[ord(ammo)]:= inttostr(delay)[1];
end
-// change "live" delay values
+// change 'live' delay values
else if (CurrentTeam <> nil) then
ammoz[ammo].SkipTurns:= CurrentTeam^.Clan^.TurnNumber + delay;
end;
@@ -3452,6 +3467,22 @@
begin
end;
+procedure ScriptOnPreviewInit;
+begin
+end;
+
+procedure ScriptSetInteger(name : shortstring; value : LongInt);
+begin
+end;
+
+procedure ScriptSetString(name : shortstring; value : shortstring);
+begin
+end;
+
+procedure LuaParseString(s : ShortString);
+begin
+end;
+
procedure initModule;
begin
mapDims:= false;
diff -r 10860d4bca22 -r abcdb7bc2620 hedgewars/uSound.pas
--- a/hedgewars/uSound.pas Wed Apr 13 12:17:30 2016 +0200
+++ b/hedgewars/uSound.pas Thu Apr 28 21:15:08 2016 +0200
@@ -428,7 +428,7 @@
s:= cPathz[Soundz[snd].Path] + '/' + Soundz[snd].FileName;
WriteToConsole(msgLoading + s + ' ');
defVoicepack^.chunks[snd]:= Mix_LoadWAV_RW(rwopsOpenRead(s), 1);
- if not SDLCheck(defVoicepack^.chunks[snd] <> nil, 'Mix_LoadWAV_RW', true) then exit;
+ if SDLCheck(defVoicepack^.chunks[snd] <> nil, 'Mix_LoadWAV_RW', true) then exit;
WriteLnToConsole(msgOK);
end;
lastChan[snd]:= Mix_PlayChannelTimed(-1, defVoicepack^.chunks[snd], 0, -1)
diff -r 10860d4bca22 -r abcdb7bc2620 hedgewars/uTeams.pas
--- a/hedgewars/uTeams.pas Wed Apr 13 12:17:30 2016 +0200
+++ b/hedgewars/uTeams.pas Thu Apr 28 21:15:08 2016 +0200
@@ -396,6 +396,9 @@
inc(TeamsNumber)
end;
+// mirror changes into array for clans to spawn
+SpawnClansArray:= ClansArray;
+
CurrentTeam:= team;
AddTeam:= team;
end;
diff -r 10860d4bca22 -r abcdb7bc2620 hedgewars/uTypes.pas
--- a/hedgewars/uTypes.pas Wed Apr 13 12:17:30 2016 +0200
+++ b/hedgewars/uTypes.pas Thu Apr 28 21:15:08 2016 +0200
@@ -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 10860d4bca22 -r abcdb7bc2620 hedgewars/uUtils.pas
--- a/hedgewars/uUtils.pas Wed Apr 13 12:17:30 2016 +0200
+++ b/hedgewars/uUtils.pas Thu Apr 28 21:15:08 2016 +0200
@@ -352,7 +352,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);
@@ -544,6 +547,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 10860d4bca22 -r abcdb7bc2620 hedgewars/uVariables.pas
--- a/hedgewars/uVariables.pas Wed Apr 13 12:17:30 2016 +0200
+++ b/hedgewars/uVariables.pas Thu Apr 28 21:15:08 2016 +0200
@@ -23,6 +23,8 @@
uses SDLh, uTypes, uFloat, GLunit, uConsts, Math, uUtils{$IFDEF GL2}, uMatrix{$ENDIF};
+procedure initScreenSpaceVars();
+
var
/////// init flags ///////
cMinScreenWidth : LongInt;
@@ -2390,7 +2392,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
@@ -2514,6 +2516,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;
@@ -2694,10 +2704,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;
@@ -2771,6 +2778,8 @@
ClansArray[i]:= nil;
end;
+ SpawnClansArray:= ClansArray;
+
for i:= Low(TeamsArray) to High(TeamsArray) do
begin
TeamsArray[i]:= nil;
diff -r 10860d4bca22 -r abcdb7bc2620 hedgewars/uVisualGearsHandlers.pas
--- a/hedgewars/uVisualGearsHandlers.pas Wed Apr 13 12:17:30 2016 +0200
+++ b/hedgewars/uVisualGearsHandlers.pas Thu Apr 28 21:15:08 2016 +0200
@@ -82,7 +82,12 @@
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
diff -r 10860d4bca22 -r abcdb7bc2620 misc/liblua/CMakeLists.txt
--- a/misc/liblua/CMakeLists.txt Wed Apr 13 12:17:30 2016 +0200
+++ b/misc/liblua/CMakeLists.txt Thu Apr 28 21:15:08 2016 +0200
@@ -23,4 +23,8 @@
set(LUA_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE STRING "Lua include dir" FORCE)
set(LUA_LIBRARY ${lua_fullpath} CACHE STRING "Lua library" FORCE)
+#emscripten does not expose headers but has an internal binary copy
+if(BUILD_ENGINE_JS)
+ set(LUA_LIBRARY "lua_emscripten_internal" CACHE STRING "Lua library" FORCE)
+endif()
diff -r 10860d4bca22 -r abcdb7bc2620 misc/libphyslayer/CMakeLists.txt
--- a/misc/libphyslayer/CMakeLists.txt Wed Apr 13 12:17:30 2016 +0200
+++ b/misc/libphyslayer/CMakeLists.txt Thu Apr 28 21:15:08 2016 +0200
@@ -26,3 +26,7 @@
set(PHYSLAYER_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE STRING "Physlayer include dir" FORCE)
set(PHYSLAYER_LIBRARY ${physlayer_fullpath} CACHE STRING "Physlayer library" FORCE)
+if(BUILD_ENGINE_JS)
+ set_target_properties(physlayer PROPERTIES SUFFIX ".bc")
+endif()
+
diff -r 10860d4bca22 -r abcdb7bc2620 misc/libphyslayer/physfsrwops.c
--- a/misc/libphyslayer/physfsrwops.c Wed Apr 13 12:17:30 2016 +0200
+++ b/misc/libphyslayer/physfsrwops.c Thu Apr 28 21:15:08 2016 +0200
@@ -180,7 +180,7 @@
retval = SDL_AllocRW();
if (retval != NULL)
{
-#if TARGET_SDL13
+#if TARGET_SDL13 && !defined(EMSCRIPTEN)
retval->size = physfsrwops_size;
#endif
retval->seek = physfsrwops_seek;
diff -r 10860d4bca22 -r abcdb7bc2620 project_files/hwc/CMakeLists.txt
--- a/project_files/hwc/CMakeLists.txt Wed Apr 13 12:17:30 2016 +0200
+++ b/project_files/hwc/CMakeLists.txt Thu Apr 28 21:15:08 2016 +0200
@@ -57,15 +57,20 @@
list(APPEND engine_sources_pas ${CMAKE_SOURCE_DIR}/hedgewars/pas2cRedo.pas)
+set(pas2c_args -n hwengine
+ -i ${CMAKE_SOURCE_DIR}/hedgewars
+ -o ${CMAKE_CURRENT_BINARY_DIR}
+ -a ${CMAKE_CURRENT_BINARY_DIR}
+ -d ENDIAN_LITTLE
+ -d DEBUGFILE)
+if(BUILD_ENGINE_JS)
+ set(pas2c_args ${pas2c_args} -d WEBGL -d HWLIBRARY)
+endif()
+
#invoke pas2c on main module, it will call all the others
add_custom_command(OUTPUT ${engine_sources}
COMMAND "${EXECUTABLE_OUTPUT_PATH}/pas2c${CMAKE_EXECUTABLE_SUFFIX}"
- ARGS -n "hwengine"
- -i "${CMAKE_SOURCE_DIR}/hedgewars"
- -o "${CMAKE_CURRENT_BINARY_DIR}"
- -a "${CMAKE_CURRENT_BINARY_DIR}"
- -d "ENDIAN_LITTLE"
- -d "DEBUGFILE"
+ ARGS ${pas2c_args}
DEPENDS pas2c #converter tool
${engine_sources_pas} #original pascal file
)
@@ -74,12 +79,20 @@
add_custom_target(engine_c DEPENDS ${engine_sources})
+if(BUILD_ENGINE_JS)
+ add_flag_append(CMAKE_C_FLAGS "-s ABORTING_MALLOC=0")
+endif()
+
#compile the c files
add_definitions(-DPAS2C)
add_definitions(-Werror=incompatible-pointer-types)
add_executable(hwengine WIN32 ${engine_sources})
+if(BUILD_ENGINE_JS)
+ set_target_properties(hwengine PROPERTIES SUFFIX ".html")
+endif()
+
target_link_libraries(hwengine fpcrtl
${LUA_LIBRARY}
${OPENGL_LIBRARY}
diff -r 10860d4bca22 -r abcdb7bc2620 project_files/hwc/rtl/CMakeLists.txt
--- a/project_files/hwc/rtl/CMakeLists.txt Wed Apr 13 12:17:30 2016 +0200
+++ b/project_files/hwc/rtl/CMakeLists.txt Thu Apr 28 21:15:08 2016 +0200
@@ -5,12 +5,3 @@
add_library(fpcrtl STATIC ${fpcrtl_src})
-#if(WEBGL)
-# set_target_properties(fpcrtl PROPERTIES PREFIX "em")
-# set_target_properties(fpcrtl PROPERTIES SUFFIX ".bc")
-#endif(WEBGL)
-
-
-
-
-
diff -r 10860d4bca22 -r abcdb7bc2620 project_files/hwc/rtl/fileio.c
--- a/project_files/hwc/rtl/fileio.c Wed Apr 13 12:17:30 2016 +0200
+++ b/project_files/hwc/rtl/fileio.c Thu Apr 28 21:15:08 2016 +0200
@@ -8,9 +8,11 @@
#include
#include
#include
+#include
io_result_t IOResult;
int FileMode;
+char cwd[1024];
static void init(File f) {
f->fp = NULL;
@@ -219,6 +221,17 @@
return false;
}
+char * fpcrtl_getCurrentDir(void) {
+
+ IOResult = IO_NO_ERROR;
+
+ if (getcwd(cwd, sizeof(cwd)) != NULL)
+ return cwd;
+
+ IOResult = IO_ERROR_DUMMY;
+ return "";
+}
+
void __attribute__((overloadable)) fpcrtl_flush(Text f) {
fflush(f->fp);
}
diff -r 10860d4bca22 -r abcdb7bc2620 project_files/hwc/rtl/fileio.h
--- a/project_files/hwc/rtl/fileio.h Wed Apr 13 12:17:30 2016 +0200
+++ b/project_files/hwc/rtl/fileio.h Thu Apr 28 21:15:08 2016 +0200
@@ -75,4 +75,7 @@
bool fpcrtl_fileExists(string255 filename);
#define fpcrtl_FileExists fpcrtl_fileExists
+char * fpcrtl_getCurrentDir(void);
+#define fpcrtl_GetCurrentDir fpcrtl_getCurrentDir
+
#endif /* FILEIO_H_ */
diff -r 10860d4bca22 -r abcdb7bc2620 project_files/hwc/rtl/misc.c
--- a/project_files/hwc/rtl/misc.c Wed Apr 13 12:17:30 2016 +0200
+++ b/project_files/hwc/rtl/misc.c Thu Apr 28 21:15:08 2016 +0200
@@ -78,8 +78,8 @@
{
if(s.len < MAX_ANSISTRING_LENGTH)
{
+ ++s.len;
s.s[s.len] = c;
- ++s.len;
}
return s;
diff -r 10860d4bca22 -r abcdb7bc2620 project_files/hwc/rtl/pmath.h
--- a/project_files/hwc/rtl/pmath.h Wed Apr 13 12:17:30 2016 +0200
+++ b/project_files/hwc/rtl/pmath.h Thu Apr 28 21:15:08 2016 +0200
@@ -21,4 +21,17 @@
int __attribute__((overloadable)) fpcrtl_abs(int x);
int64_t __attribute__((overloadable)) fpcrtl_abs(int64_t x);
+/* emscripten cannot find math.h through our cmake */
+#ifdef EMSCRIPTEN
+double exp(double);
+double log(double);
+double sin(double);
+double cos(double);
+double fabs(double);
+double ceil(double);
+double sqrt(double);
+double atan(double);
+double atan2(double, double);
+#endif
+
#endif /* PMATH_H_ */
diff -r 10860d4bca22 -r abcdb7bc2620 project_files/hwc/rtl/system.c
--- a/project_files/hwc/rtl/system.c Wed Apr 13 12:17:30 2016 +0200
+++ b/project_files/hwc/rtl/system.c Thu Apr 28 21:15:08 2016 +0200
@@ -3,6 +3,7 @@
#include
#include
#include
+#include "pmath.h"
#ifndef M_PI
// some math.h do not have M_PI macros
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/campaigns_en.txt
--- a/share/hedgewars/Data/Locale/campaigns_en.txt Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/campaigns_en.txt Thu Apr 28 21:15:08 2016 +0200
@@ -19,16 +19,16 @@
A_Classic_Fairytale-epil.desc="Congratulations! Leaks a lot can finally leave in peace and get praised by his new friends and his tribe. Be proud for what you succeed! You can play again previous missions and see the other possible endings."
A_Space_Adventure-cosmos.desc="Hogera, the planet of hogs is about to be hit by a gigantic meteorite. In this race for survival you have to lead PAotH's best pilot, Hog Solo, in a space trip around the neighbor planets to collect all the 4 pieces of the long lost anti gravity device!"
-A_Space_Adventure-moon01.desc="Hog Solo has landed on the moon to refuel his saucer but professor Hogevil has gone there first and set an ambush! Rescue the captured PAotH researchers and drive professor Hogevil away!"
-A_Space_Adventure-moon02.desc="Hog Solo visits an hermit, old PAotH veteran, who lives in moon in order to gather some intel about Pr. Hogevil. However, he has to beat the hermit, Soneek the Crazy Runner, in a chase game first!"
+A_Space_Adventure-moon01.desc="Hog Solo has landed on the moon to refuel his saucer but professor Hogevil has gone there first and set an ambush! Rescue the captured PAotH researchers and drive Professor Hogevil away!"
+A_Space_Adventure-moon02.desc="Hog Solo visits an hermit, old PAotH veteran, who lives on the moon in order to gather some intel about Prof. Hogevil. However, he has to beat the hermit, Soneek the Crazy Runner, in a chase game first!"
A_Space_Adventure-ice01.desc="Welcome to the planet of ice. Here, it's so cold that most of Hog Solo's weapons won't work. You have to get the lost part from the bandit leader Thanta using the weapons that you'll find there!"
-A_Space_Adventure-ice02.desc="Hog Solo couldn't just visit the Ice Planet without visiting the Olympic stadium of saucer flying! In this mission you can prove your flying skills and claim your place between the best!"
+A_Space_Adventure-ice02.desc="Hog Solo couldn't just visit the Ice Planet without visiting the Olympic Stadium of Saucer Flying! In this mission you can prove your flying skills and claim your place among the best!"
A_Space_Adventure-desert01.desc="You have landed to the planet of sand! Hog Solo has to find the missing part in the underground tunnels. Be careful as vicious smugglers await to attack and rob you!"
A_Space_Adventure-desert02.desc="Hog Solo was searching for the part in this tunnel when it unexpectedly start getting flooded! Get to the surface as soon as possible and be careful not to trigger a mine."
A_Space_Adventure-desert03.desc="Hog Solo has some time to fly his RC plane and have some fun. Fly the RC plane and hit all the targets!"
A_Space_Adventure-fruit01.desc="In the fruit planet things aren't going so well. Hogs aren't collecting fruits but they are preparing for battle. You'll have to choose if you'll fight or if you'll flee."
-A_Space_Adventure-fruit02.desc="Hog Solo gets closer to the lost part in the Fruit Planet. Will Captain Lime help him acquire the part or not?"
-A_Space_Adventure-fruit03.desc="Hog Solo got lost and got ambushed by the Red Strawberries. Help him eliminate them and win some extra ammo for the Getting to the device mission."
-A_Space_Adventure-death01.desc="In the Death Planet, the most infertile planet around, Hog Solo is very close to get the last part of the device! However an unpleasant surprise awaits him..."
-A_Space_Adventure-death02.desc="Again Hog Solo has got himself in a difficult situation. Help him defeat the “5 deadly hogs“ in their own game!"
+A_Space_Adventure-fruit02.desc="Hog Solo gets closer to the lost part on the Fruit Planet. Will Captain Lime help him acquire the part or not?"
+A_Space_Adventure-fruit03.desc="Hog Solo got lost and got ambushed by the Red Strawberries. Help him eliminate them and win some extra ammo for the mission “Getting to the device”."
+A_Space_Adventure-death01.desc="On the Death Planet, the most infertile planet around, Hog Solo is very close to get the last part of the device! However, an unpleasant surprise awaits him ..."
+A_Space_Adventure-death02.desc="Again Hog Solo has got himself in a difficult situation. Help him defeat the “5 Deadly Hogs“ in their own game!"
A_Space_Adventure-final.desc="Hog Solo has to detonate some explosives that have been placed on the meteorite. Help him complete his mission without getting hurt!"
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/en.txt
--- a/share/hedgewars/Data/Locale/en.txt Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/en.txt Thu Apr 28 21:15:08 2016 +0200
@@ -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 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/fr.lua
--- a/share/hedgewars/Data/Locale/fr.lua Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/fr.lua Thu Apr 28 21:15:08 2016 +0200
@@ -17,7 +17,7 @@
["A Classic Fairytale"] = "Un conte classique de fée",
["Actually, you aren't worthy of life! Take this..."] = "En fait, tu n'es pas digne de vivre ! Prends ça....",
["A cy-what?"] = "Un cy-quoi ?",
- ["Advanced Repositioning Mode"] = "Mode de repositionnement avancé"
+ ["Advanced Repositioning Mode"] = "Mode de repositionnement avancé",
["Adventurous"] = "Aventurier",
["a frenetic Hedgewars mini-game"] = "un mini-jeu frénétique d'HedgeWars", -- Frenzy
["Africa"] = "Afrique", -- Continental_supplies
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/hedgewars_ar.ts
--- a/share/hedgewars/Data/Locale/hedgewars_ar.ts Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_ar.ts Thu Apr 28 21:15:08 2016 +0200
@@ -1,6 +1,6 @@
-
+About
@@ -612,6 +612,10 @@
+
+
+
+ HWNetServersModel
@@ -1406,7 +1410,7 @@
- الفرق تبدا في مكانين متقابلين. فريقان الحد الاقصى
+ الفرق تبدا في مكانين متقابلين. فريقان الحد الاقصى
@@ -1536,6 +1540,10 @@
+
+
+
+ PageSelectWeapon
@@ -2644,6 +2652,10 @@
+
+
+
+ SeedPrompt
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/hedgewars_bg.ts
--- a/share/hedgewars/Data/Locale/hedgewars_bg.ts Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_bg.ts Thu Apr 28 21:15:08 2016 +0200
@@ -1,6 +1,6 @@
-
+About
@@ -615,6 +615,10 @@
+
+
+
+ HWNetServersModel
@@ -1424,10 +1428,6 @@
-
-
-
-
@@ -1555,6 +1555,10 @@
+
+
+
+ PageSelectWeapon
@@ -2680,6 +2684,10 @@
+
+
+
+ SeedPrompt
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/hedgewars_cs.ts
--- a/share/hedgewars/Data/Locale/hedgewars_cs.ts Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_cs.ts Thu Apr 28 21:15:08 2016 +0200
@@ -1,6 +1,6 @@
-
+About
@@ -621,6 +621,10 @@
+
+
+
+ HWNetServersModel
@@ -1448,7 +1452,7 @@
- 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ě!
@@ -1570,6 +1574,10 @@
+
+
+
+ PageSelectWeapon
@@ -2697,6 +2705,10 @@
+
+
+
+ SeedPrompt
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/hedgewars_da.ts
--- a/share/hedgewars/Data/Locale/hedgewars_da.ts Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_da.ts Thu Apr 28 21:15:08 2016 +0200
@@ -1,6 +1,6 @@
-
+About
@@ -619,6 +619,10 @@
+
+
+
+ HWNetServersModel
@@ -1429,7 +1433,7 @@
- Hold starter på hver sin side af banen. Maksimalt to holdfarver!
+ Hold starter på hver sin side af banen. Maksimalt to holdfarver!
@@ -1559,6 +1563,10 @@
+
+
+
+ PageSelectWeapon
@@ -2688,6 +2696,10 @@
+
+
+
+ SeedPrompt
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/hedgewars_de.ts
--- a/share/hedgewars/Data/Locale/hedgewars_de.ts Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_de.ts Thu Apr 28 21:15:08 2016 +0200
@@ -1,6 +1,6 @@
-
+About
@@ -119,17 +119,17 @@
Feedback
-
+ Ansehen
-
+ Abbrechen
-
+ Feedback senden
@@ -138,7 +138,7 @@
Bitte gib uns Feedback!
-
+ 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.
-
+ Schicke uns dein Feedback!
-
+ Falls du einen Fehler gefunden hast, kannst du hier sehen, ob er bereits bekannt is (auf Englisch):
-
+ Deine E-Mail-Adresse ist optional, es sei denn du möchtest, dass wir dir antworten.
@@ -185,12 +185,12 @@
GameCFGWidget
-
+ Arsenal bearbeiten
-
+ Spielprofil bearbeiten
@@ -199,7 +199,7 @@
Spieloptionen
-
+ Das Auswählen eines Spielprofils wird automatisch ein Arsenal auswählen
@@ -363,52 +363,52 @@
HWChatWidget
-
+ %1 wurde aus deiner Ignorierliste entfernt
-
+ %1 wurde in deine Ignorierliste aufgenommen
-
+ %1 wurde aus deiner Freundesliste entfernt
-
+ %1 wurde in deine Freundesliste aufgenommen
-
+ Stylesheet aus %1 importiert
-
+ Gib %1 ein, wenn du das jetzige Stylesheet in Zukunft weiterverwenden willst; gib %2 ein, um es zurückzusetzen!
-
+ Konnte %1 nicht lesen
-
+ Stylesheet verworfen
-
+ Stylesheet wurde nach %1 gesichert
-
+ Stylesheet konnte nicht nach %1 gesichert werden
@@ -629,47 +629,47 @@
HWMapContainer
-
+ Alles
-
-
- Klein
-
-
-
- Mittel
+
+ Klein
-
- Groß
+
+ Mittel
-
- Höhle
+
+ Groß
+
+ Höhle
+
+
+ Verrückt
-
-
- Kleine Tunnel
-
-
+
+ Kleine Tunnel
+
+
+ Mittelgroße Tunnel
-
+ Seed
@@ -704,59 +704,64 @@
Zufallslabyrinth
-
+
+
+
+
+
+ Zufall
-
+ Kartenvorschau:
-
+ Gezeichnete
Karte laden
-
+ Gezeichnete
Karte bearbeiten
-
+ Kleine Inseln
-
-
- Mittelgroße Inseln
-
-
+
+ Mittelgroße Inseln
+
+
+ Große Inseln
-
+ Kartengröße:
-
+ Labyrinth-Art:
-
-
- Mission:
-
-
+
+ Mission:
+
+
+ Karte:
@@ -765,28 +770,28 @@
Thema:
-
+ Gezeichnete Karte laden
-
+ Gezeichnete Karten
-
+ Alle Dateien
-
+ Große Tunnel
-
-
+
+ Szenerie: %1
@@ -796,7 +801,7 @@
Perlinzufall
-
+ Stil:
@@ -1494,52 +1499,52 @@
PageOptions
-
+ Neues Team
-
+ Team bearbeiten
-
+ Team löschen
-
+ Du kannst keine Teams bei der Team-Auswahl ändern. Gehe zum Hauptmenü zurück, um Teams hinzuzufügen, zu editieren oder zu löschen.
-
+ Neues Spielprofil
-
+ Spielprofil bearbeiten
-
+ Spielprofil löschen
-
+ Neues Arsenal
-
+ Arsenal bearbeiten
-
+ Arsenal löschen
@@ -1549,47 +1554,47 @@
Erweitert
-
+ Auf Standard-Farben zurücksetzen
-
+ Host
-
+ Port
-
+ Benutzername
-
+ Passwort
-
+ Kein Proxy
-
+ Socks5-Proxy
-
+ HTTP-Proxy
-
+ System-Proxy-Einstellungen
@@ -1610,7 +1615,7 @@
-
+ Spiel
@@ -1645,62 +1650,62 @@
Teams
-
+ Spielprofile
-
+ Arsenale
-
+ Benutzeroberfläche
-
+ Benutzerdefinierte Farben
-
+ Ton im Spiel
-
+ Ton in der Benutzeroberfläche
-
+ Benutzerkonto
-
+ Proxy-Einstellungen
-
+ Verschiedenes
-
+ Updates
-
+ nach Updates suchen
-
+ Videoaufzeichnungseinstellungen
@@ -1804,27 +1809,27 @@
Löschen
-
+ 80% des ausgeteilten Schadens werden dir als Gesundheitspunkte gutgeschrieben
+
+
+ Teile den Schmerz deines Gegners, teile seinen verursachten Schaden
+
+
-
- Teile den Schmerz deines Gegners, teile seinen verursachten Schaden
-
-
- Deine Igel können sich nicht bewegen, gib Dein Bestes im Fernkampf
+
+
+ Zufall
+
+
-
- Zufall
-
-
- Sekunden
@@ -1834,67 +1839,66 @@
Verteidige deine Festung und zerstöre die des Gegners, maximal zwei Teamfarben!
+
+ Die Teams starten auf gegenüberliegenden Terrainseiten, maximal zwei Teamfarben!
+
+
+
+
+ Die Landschaft ist nicht zerstörbar!
+
+
+
+
+ Verringerte Schwerkraft
+
+
+
+
+ Zielfhilfe durch Laservisier
+
+
+
+
+ Alle Igel haben ein eigenes Schutzschild
+
+
+
+
+ Gespielt wird in zufälliger Reihenfolge.
+
+
+
+
+ Beschütze deinen König! Ohne ihn hast du verloren.
+
+
+
+
+ Platziere deine Igel selbständig vor Rundenbeginn.
+
+
+
+
+ Alle Teams mit gleicher Farbe teilen sich den gleichen Waffenvorrat.
+
+
-
- Die Teams starten auf gegenüberliegenden Terrainseiten, maximal zwei Teamfarben!
+
+ Keine Bauträger auf Zufallskarten platzieren.
-
- Die Landschaft ist nicht zerstörbar!
-
-
-
-
- Verringerte Schwerkraft
-
-
-
-
- Zielfhilfe durch Laservisier
-
-
-
-
- Alle Igel haben ein eigenes Schutzschild
-
-
-
-
- Gespielt wird in zufälliger Reihenfolge.
+
+ Keine Landschaftsobjekte beim Generieren von Zufallskarten platzieren.
+
+
+
+
+ KI wird wiederbelebt.
-
- Beschütze deinen König! Ohne ihn hast du verloren.
-
-
-
-
- Platziere deine Igel selbständig vor Rundenbeginn.
-
-
-
-
- Alle Teams mit gleicher Farbe teilen sich den gleichen Waffenvorrat.
-
-
-
-
- Keine Bauträger auf Zufallskarten platzieren.
-
-
-
-
- Keine Landschaftsobjekte beim Generieren von Zufallskarten platzieren.
-
-
-
-
- KI wird wiederbelebt.
-
-
- Alle (lebenden) Igel werden am Ende der Runde vollkommen geheilt
@@ -1904,22 +1908,22 @@
Angriffe beenden die Runde nicht.
-
+ Arsenal wird jede Runde zurückgesetzt.
-
+ Jeder Igel hat sein eigenes Arsenal. Es wird nicht mit dem Team geteilt.
-
+ Du wirst dich nicht mehr um Wind kümmern müssen.
-
+ Wind beeinflusst fast alles.
@@ -1939,27 +1943,32 @@
Dem Spielfeld eine unzerstörbare Randbegrenzung hinzufügen
-
+ Dem unteren Kartenrand eine unzerstörbare Randbegrenzung anfügen
+
+
+
+
+
+
+
+ Keine (Standard)
+
+
-
- Keine (Standard)
+
+ Umbrechen (Welt wiederholt sich)
-
- Umbrechen (Welt wiederholt sich)
+
+ Abprallen (Grenzen reflektieren)
-
- Abprallen (Grenzen reflektieren)
-
-
- Ozean (Grenzen sind mit dem Wasser verbunden)
@@ -1967,22 +1976,22 @@
PageSelectWeapon
-
+ Standard
+
+
+ Löschen
+
+
+
+
+ Neu
+
+
-
- Löschen
-
-
-
-
- Neu
-
-
- Kopieren
@@ -2133,23 +2142,23 @@
-
+ Ignorieren
-
+ Als Freund hinzufügen
-
+ Nicht mehr ignorieren
-
+ Als Freund entfernen
@@ -2186,38 +2195,38 @@
QCheckBox
-
+ Vollbild
-
+ Bildwiederholrate anzeigen
-
+ Alternativen Schaden anzeigen
-
+ Datum und Uhrzeit an Wiederholungsdateinamen anhängen
-
+ Beim Spielstart nach neuen Versionen suchen
-
+ Kurzinfos für Waffen anzeigen
-
+ Passwort speichern
@@ -2232,89 +2241,89 @@
Video ist privat
-
+ Audio aufzeichnen
-
+ Spielauflösung verwenden
-
+ Visuelle Effekte
-
-
+
+ Ton
-
+ Toneffekte im Spiel
-
-
+
+ Musik
-
+ Musik im Spiel
-
-
- Toneffekte in der Benutzeroberfläche
-
-
+
+ Toneffekte in der Benutzeroberfläche
+
+
+ Musik in der Benutzeroberfläche
-
-
- Team
-
-
-
-
- Teambeschriftungsschilder standardmäßig aktivieren
-
-
-
-
- Igel
-
-
-
- Namensschilder standardmäßig aktivieren
-
-
-
-
- Lebenspunkte
+
+ Team
+
+
+
+
+ Teambeschriftungsschilder standardmäßig aktivieren
-
- Lebenspunktebeschriftungsschilder standardmäßig aktivieren
-
-
-
-
- Transluzent
+
+ Igel
+
+
+
+
+ Namensschilder standardmäßig aktivieren
+
+ Lebenspunkte
+
+
+
+
+ Lebenspunktebeschriftungsschilder standardmäßig aktivieren
+
+
+
+
+ Transluzent
+
+
+ Transluzente Beschriftungsschilder standardmäßig aktivieren
@@ -2332,12 +2341,12 @@
Stufe
-
+ (Systemstandard)
-
+
@@ -2354,77 +2363,77 @@
Im Spiel
-
+ Deaktiviert
-
-
- Rot/Türkis
-
-
-
-
- Türkis/Rot
-
-
-
-
- Rot/Blau
-
-
-
-
- Blau/Rot
-
-
-
-
- Rot/Grün
-
-
+
+ Rot/Türkis
+
+
+
+
+ Türkis/Rot
+
+
+
+
+ Rot/Blau
+
+
+
+
+ Blau/Rot
+
+
+
+
+ Rot/Grün
+
+
+ Grün/Rot
+
+
+ Nebeneinander
+
+
+
+
+ Übereinander
+
+
+
+
+ Rot/Türkis, Graustufen
+
+
-
- Nebeneinander
+
+ Türkis/Rot, Graustufen
-
- Übereinander
-
-
-
-
- Rot/Türkis, Graustufen
-
-
-
-
- Türkis/Rot, Graustufen
-
-
- Rot/Blau, Graustufen
-
+ Blau/Rot, Graustufen
-
+ Rot/Grün, Graustufen
-
+ Grün/Rot, Graustufen
@@ -2437,7 +2446,7 @@
Teammitglieder
-
+ Festung
@@ -2480,7 +2489,7 @@
QLabel
-
+ Arsenal
@@ -2495,12 +2504,12 @@
Port:
-
+ Auflösung
-
+ Bildwiederholratenbegrenzung (Hz)
@@ -2519,57 +2528,57 @@
Version
-
+ Ausgangslautstärke
-
+ Prozentualer Schaden
-
+ Rundenzeit
-
+ Anfangslebenspunkte
-
+ Runden bis Sudden Death
-
+ Minenzündzeit
-
+ Minen
-
+ Luftminen
-
+ Spielprofil:
-
+ Kistenabwurf
-
+ % Blindgänger
@@ -2599,12 +2608,12 @@
Stimme
-
+ Sprache
-
+ Pulverfässer
@@ -2613,37 +2622,37 @@
Tipp:
-
+ Qualität
-
+ % Erste-Hilfe-Koffer
-
+ Lebenspunkte in Erste-Hilfe-Koffern
-
+ Steigen des Wassers
-
+ Schaden bei Sudden Death
-
+ % Seillänge
-
+ Stereo-Rendering
@@ -2653,12 +2662,12 @@
Stil
-
+ Spielprofil
-
+ % Rückzugszeit
@@ -2706,37 +2715,37 @@
Tags (durch Kommas getrennt):
-
+ Beschreibung
-
+ Spitzname
-
+ Format
-
+ Audio-Codec
-
+ Video-Codec
-
+ Bildrate
-
+ 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.
-
+ Vollbild
-
+ Vollbild-Auflösung
-
+ Fenster-Auflösung
-
+ Deine E-Mail-Adresse
-
+ Zusammenfassung
-
+ Systeminformation senden
-
+ Gib den Sicherheitscode ein:
@@ -2797,22 +2806,22 @@
Tipp: %1
-
+ Angezeigte/transluzente Beschriftungsschilder über Igel
-
+ Diese Einstellung tritt ab nächstem Neustart in Kraft.
-
+ Spielfeldgrenze
-
+ Skriptparameter
@@ -2826,12 +2835,12 @@
-
+ Igel %1
-
+ anonym
@@ -2852,7 +2861,7 @@
Verbindung zum Server wurde unterbrochen
-
+ Fehler
@@ -2881,12 +2890,12 @@
-
+ Teams - Bist du dir sicher?
-
+ Willst du das Team »%1« wirklich löschen?
@@ -2907,14 +2916,14 @@
Server konnte nicht gestartet werden
-
+ Hedgewars – Fehler
-
+ Hedgewars – Erfolg
@@ -3068,7 +3077,7 @@
-
+ Dateifehler
@@ -3079,12 +3088,12 @@
-
+ »%1« konnte zum Lesen nicht geöffnet werden
-
+ Munition »%1« kann nicht benutzt werden!
@@ -3120,23 +3129,23 @@
Hedgewars – Spitzname nicht registriert
-
+ Systeminformations-Vorschau
-
-
+
+ Captcha-Generierung fehlgeschlagen
-
+ Captcha-Download fehlgeschlagen
-
+ Bitte füll alle Felder aus. Das Feld »E-Mail« ist optional.
@@ -3175,7 +3184,7 @@
QPushButton
-
+ Los!
@@ -3245,7 +3254,7 @@
Laden
-
+ Dateitypen zuordnen
@@ -3255,7 +3264,7 @@
Mehr Info
-
+ Auf Standardeinstellungen zurücksetzen
@@ -3282,7 +3291,7 @@
Hochladen abbrechen
-
+ Standard-Kodierungs-Einstellungen wiederherstellen
@@ -3418,6 +3427,11 @@
Handgemalt
+
+
+
+
+ Stil
@@ -4314,264 +4328,264 @@
server
-
+ Authentifizierung fehlgeschlagen
-
+ 60 Sekunden Abkühlzeit nach Hinauswurf
-
+ hinausgeworfen
-
+ Ping-Timeout
+
+
+ tschüss
+
+
-
- tschüss
-
-
- Deine Stimme zählte
-
+ Pause umgeschaltet
-
+ Neuer Seed
-
+ Anzahl der Igel im Team
-
+ Leerer Konfigurations-Eintrag
+
+
+ Kaputte Igel-Info
+
+
-
- Kaputte Igel-Info
+
+ zu viele Teams
-
- zu viele Teams
+
+ zu viele Igel
-
- zu viele Igel
+
+ Es gibt bereits ein Team mit dem selben Namen in der Liste
-
- Es gibt bereits ein Team mit dem selben Namen in der Liste
+
+ laufende Runde
-
- laufende Runde
+
+ eingeschränkt
-
- eingeschränkt
+
+ REMOVE_TEAM: kein solches Team
-
- REMOVE_TEAM: kein solches Team
+
+ Nicht Team-Besitzer*In!
+
+
+
+
+ Weniger als zwei Klans!
-
- Nicht Team-Besitzer*In!
-
-
-
-
- Weniger als zwei Klans!
+
+ ein Raum mit einem solchen Namen existiert bereits
+
+
+
+
+ /maxteams: Zahl zwischen 2 und 8 wählen
-
- ein Raum mit einem solchen Namen existiert bereits
+
+ Verfügbare »callvote«-Befehle: kick <Spitzname>, map <Name>, pause, newseed, hedgehogs
-
- /maxteams: Zahl zwischen 2 und 8 wählen
+
+ callvote kick: Spitznamen festlegen
-
- Verfügbare »callvote«-Befehle: kick <Spitzname>, map <Name>, pause, newseed, hedgehogs
+
+ callvote kick: Benutzer existiert nicht
-
- callvote kick: Spitznamen festlegen
+
+ callvote map: Karte existiert nicht
-
- callvote kick: Benutzer existiert nicht
+
+ callvote pause: es läuft kein Spiel
-
- callvote map: Karte existiert nicht
+
+ callvote hedgehogs: Zahl zwischen 1 und 8 wählen
+
+
+
+
+ Verbotener Raumname
+
+
+
+
+ Ein solcher Raum existiert nicht
+
+
+
+
+ Zutritt verboten
+
+
+
+
+ Nur für registrierte Benutzer
+
+
+
+
+ Du wurdest aus diesem Raum verbannt
+
+
+
+
+ Spitzname bereits gewählt
+
+
+
+
+ Verbotener Spitzname
+
+
+
+
+ Protokoll bereits bekannt
+
+
+
+
+ Schlechte Zahl
-
- callvote pause: es läuft kein Spiel
-
-
-
-
- callvote hedgehogs: Zahl zwischen 1 und 8 wählen
-
-
-
-
- Verbotener Raumname
-
-
-
-
- Ein solcher Raum existiert nicht
-
-
-
-
- Zutritt verboten
-
-
-
-
- Nur für registrierte Benutzer
-
-
-
-
- Du wurdest aus diesem Raum verbannt
-
-
-
-
- Spitzname bereits gewählt
-
-
-
-
- Verbotener Spitzname
-
-
-
-
- Protokoll bereits bekannt
-
-
-
-
- Schlechte Zahl
-
-
- Spitzname bereits in Benutzung
+
+
+ Eingeschränkt
+
+
-
- Eingeschränkt
-
-
- Nicht Gastgeber
+
+
+ Keine Rechte zum Benutzen des Inspektionshilfsprogramms
+
+
+
+
+ Die Raumversion ist inkompatibel zu deiner Hedgewars-Version
+
+
+
+
+ Du hast bereits deine Stimme abgegeben
+
+
+
+
+ Abstimmung abgeschlossen
+
+
+
+
+ Neue Abstimmung gestartet
+
+
+
+
+ Abstimmung abgelaufen
+
+
+
+
+ hinauswerfen
+
+
+
+
+ Karte
+
+
+
+
+ pausieren
+
+
+
+
+ Zu schnell wieder verbunden
+
+
-
- Keine Rechte zum Benutzen des Inspektionshilfsprogramms
-
-
-
-
- Die Raumversion ist inkompatibel zu deiner Hedgewars-Version
-
-
-
-
- Du hast bereits deine Stimme abgegeben
-
-
-
-
- Abstimmung abgeschlossen
-
-
-
-
- Neue Abstimmung gestartet
-
-
-
-
- Abstimmung abgelaufen
-
-
-
-
- hinauswerfen
-
-
-
-
- Karte
-
-
-
-
- pausieren
-
-
-
-
- Zu schnell wieder verbunden
-
-
- Nicht jeder weiß, was »Flooding« heißt, daher ist die Übersetzung etwas ausführlicher.Achtung! Chat-Flood-Schutz ist aktiv. Bitte red etwas langsamer.
-
+ Nicht jeder weiß, was »Flooding« heißt, daher wird es hier umschrieben.Zu viele Nachrichten in kurzer Zeit abgeschickt
-
+ Zu viele Spielnachrichten in kurzer Zeit ermittelt – 1
@@ -4580,13 +4594,13 @@
Zu viele Spielnachrichten in kurzer Zeit ermittelt – 2
-
+ 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
-
+ Zur Zeit findet keine Abstimmung statt
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/hedgewars_el.ts
--- a/share/hedgewars/Data/Locale/hedgewars_el.ts Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_el.ts Thu Apr 28 21:15:08 2016 +0200
@@ -1,6 +1,6 @@
-
+About
@@ -613,6 +613,10 @@
+
+
+
+ HWNetServersModel
@@ -1423,7 +1427,7 @@
- Οι ομάδες θα ξεκινούν σε αντίθετες μεριές της πίστας, μέγιστο επιτρεπόμενο δυο χρώματα ομάδων!
+ Οι ομάδες θα ξεκινούν σε αντίθετες μεριές της πίστας, μέγιστο επιτρεπόμενο δυο χρώματα ομάδων!
@@ -1553,6 +1557,10 @@
+
+
+
+ PageSelectWeapon
@@ -2678,6 +2686,10 @@
+
+
+
+ SeedPrompt
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/hedgewars_en.ts
--- a/share/hedgewars/Data/Locale/hedgewars_en.ts Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_en.ts Thu Apr 28 21:15:08 2016 +0200
@@ -1,6 +1,6 @@
-
+About
@@ -611,6 +611,10 @@
+
+
+
+ HWNetServersModel
@@ -1405,7 +1409,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!
@@ -1535,6 +1539,10 @@
+
+
+
+ PageSelectWeapon
@@ -2644,6 +2652,10 @@
+
+
+
+ SeedPrompt
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/hedgewars_es.ts
--- a/share/hedgewars/Data/Locale/hedgewars_es.ts Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_es.ts Thu Apr 28 21:15:08 2016 +0200
@@ -1,6 +1,6 @@
-
+About
@@ -619,6 +619,10 @@
+
+
+
+ HWNetServersModel
@@ -1457,7 +1461,7 @@
- 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!
@@ -1559,6 +1563,10 @@
+
+
+
+ PageSelectWeapon
@@ -2684,6 +2692,10 @@
+
+
+
+ SeedPrompt
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/hedgewars_fi.ts
--- a/share/hedgewars/Data/Locale/hedgewars_fi.ts Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_fi.ts Thu Apr 28 21:15:08 2016 +0200
@@ -1,6 +1,6 @@
-
+About
@@ -632,6 +632,10 @@
Tyyli:
+
+
+
+ HWNetServersModel
@@ -1445,7 +1449,7 @@
- Joukkueet aloittavat kartan vastakkaisista päistä, maksimissaan kaksi joukkueväriä!
+ Joukkueet aloittavat kartan vastakkaisista päistä, maksimissaan kaksi joukkueväriä!
@@ -1575,6 +1579,10 @@
Meri (seinät ovat merta)
+
+
+
+ PageSelectWeapon
@@ -2705,6 +2713,10 @@
Satunnainen Perlin
+
+
+
+ SeedPrompt
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/hedgewars_fr.ts
--- a/share/hedgewars/Data/Locale/hedgewars_fr.ts Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_fr.ts Thu Apr 28 21:15:08 2016 +0200
@@ -1,6 +1,6 @@
-
+About
@@ -644,6 +644,10 @@
+
+
+
+ HWNetServersModel
@@ -1502,7 +1506,7 @@
- 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 !
@@ -1605,6 +1609,10 @@
+
+
+
+ PageSelectWeapon
@@ -2749,6 +2757,10 @@
+
+
+
+ SeedPrompt
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/hedgewars_gl.ts
--- a/share/hedgewars/Data/Locale/hedgewars_gl.ts Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_gl.ts Thu Apr 28 21:15:08 2016 +0200
@@ -1,6 +1,6 @@
-
+About
@@ -611,6 +611,10 @@
+
+
+
+ HWNetServersModel
@@ -1409,7 +1413,7 @@
- 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!
@@ -1539,6 +1543,10 @@
+
+
+
+ PageSelectWeapon
@@ -2647,6 +2655,10 @@
+
+
+
+ SeedPrompt
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/hedgewars_hu.ts
--- a/share/hedgewars/Data/Locale/hedgewars_hu.ts Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_hu.ts Thu Apr 28 21:15:08 2016 +0200
@@ -1,6 +1,6 @@
-
+About
@@ -605,6 +605,10 @@
+
+
+
+ HWNetServersModel
@@ -1394,7 +1398,7 @@
- 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!
@@ -1524,6 +1528,10 @@
+
+
+
+ PageSelectWeapon
@@ -2630,6 +2638,10 @@
+
+
+
+ SeedPrompt
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/hedgewars_it.ts
--- a/share/hedgewars/Data/Locale/hedgewars_it.ts Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_it.ts Thu Apr 28 21:15:08 2016 +0200
@@ -1,6 +1,6 @@
-
+About
@@ -632,6 +632,10 @@
Stile:
+
+
+
+ HWNetServersModel
@@ -1430,7 +1434,7 @@
- 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!
@@ -1532,6 +1536,10 @@
Mare (i bordi si connettono al mare)
+
+
+
+ PageSelectWeapon
@@ -2628,6 +2636,10 @@
Rumore casuale
+
+
+
+ SeedPrompt
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/hedgewars_ja.ts
--- a/share/hedgewars/Data/Locale/hedgewars_ja.ts Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_ja.ts Thu Apr 28 21:15:08 2016 +0200
@@ -1,6 +1,6 @@
-
+About
@@ -609,6 +609,10 @@
+
+
+
+ HWNetServersModel
@@ -1393,10 +1397,6 @@
-
-
-
-
@@ -1524,6 +1524,10 @@
+
+
+
+ PageSelectWeapon
@@ -2630,6 +2634,10 @@
+
+
+
+ SeedPrompt
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/hedgewars_ko.ts
--- a/share/hedgewars/Data/Locale/hedgewars_ko.ts Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_ko.ts Thu Apr 28 21:15:08 2016 +0200
@@ -1,6 +1,6 @@
-
+About
@@ -605,6 +605,10 @@
+
+
+
+ HWNetServersModel
@@ -1362,10 +1366,6 @@
-
-
-
-
@@ -1493,6 +1493,10 @@
+
+
+
+ PageSelectWeapon
@@ -2583,6 +2587,10 @@
+
+
+
+ SeedPrompt
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/hedgewars_lt.ts
--- a/share/hedgewars/Data/Locale/hedgewars_lt.ts Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_lt.ts Thu Apr 28 21:15:08 2016 +0200
@@ -1,6 +1,6 @@
-
+About
@@ -110,12 +110,12 @@
FeedbackDialog
-
+
-
+
@@ -125,27 +125,27 @@
-
+
-
+
-
+
-
+
-
+
@@ -180,17 +180,17 @@
-
+
-
+
-
+
@@ -361,52 +361,52 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -630,133 +630,138 @@
-
+
+
+
+
+
+
-
+
-
+
-
+
-
-
-
-
-
-
+
-
+
-
+
-
+
+
+
+
+
+
-
-
-
-
-
-
+
-
+
+
+
+
+
+
-
+
-
+
-
+
-
-
-
-
-
+
+
+
+
+
-
-
+
+
-
+
-
+
-
+
-
-
-
-
-
+
+
+
+
+
-
+
@@ -1447,7 +1452,7 @@
-
+
@@ -1487,157 +1492,157 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1705,12 +1710,7 @@
-
-
-
-
-
-
+
@@ -1720,72 +1720,72 @@
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1795,22 +1795,22 @@
-
+
-
+
-
+
-
+
@@ -1820,37 +1820,42 @@
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
+
-
+
-
-
-
-
-
@@ -1873,22 +1878,22 @@
PageSelectWeapon
-
+
-
+
-
-
-
-
-
+
+
+
+
+
@@ -2020,23 +2025,23 @@
-
+
-
+
-
+
-
+
@@ -2079,115 +2084,115 @@
QCheckBox
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
@@ -2202,12 +2207,12 @@
-
+
-
+
@@ -2225,87 +2230,87 @@
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -2323,7 +2328,7 @@
-
+
@@ -2376,12 +2381,12 @@
-
+
-
+
@@ -2442,157 +2447,157 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -2634,52 +2639,52 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -2693,12 +2698,12 @@
-
+
-
+
@@ -2714,12 +2719,12 @@
QMessageBox
-
+
-
+
@@ -2761,35 +2766,35 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -2804,12 +2809,12 @@
-
+
-
+
@@ -2941,7 +2946,7 @@
-
+
@@ -2952,7 +2957,7 @@
-
+
@@ -3021,7 +3026,7 @@
-
+
@@ -3077,7 +3082,7 @@
-
+
@@ -3110,12 +3115,12 @@
-
+
-
+
@@ -3253,6 +3258,11 @@
+
+
+
+
+ SeedPrompt
@@ -4113,272 +4123,272 @@
server
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/hedgewars_ms.ts
--- a/share/hedgewars/Data/Locale/hedgewars_ms.ts Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_ms.ts Thu Apr 28 21:15:08 2016 +0200
@@ -1,6 +1,6 @@
-
+About
@@ -110,12 +110,12 @@
FeedbackDialog
-
+
-
+
@@ -125,27 +125,27 @@
-
+
-
+
-
+
-
+
-
+
@@ -178,17 +178,17 @@
-
+
-
+
-
+
@@ -349,52 +349,52 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -618,133 +618,138 @@
-
+
+
+
+
+
+
-
+
-
+
-
+
-
-
-
-
-
-
+
-
+
-
+
-
+
+
+
+
+
+
-
-
-
-
-
-
+
-
+
+
+
+
+
+
-
+
-
+
-
+
-
-
-
-
-
+
+
+
+
+
-
-
+
+
-
+
-
+
-
+
-
-
-
-
-
+
+
+
+
+
-
+
@@ -1419,7 +1424,7 @@
-
+
@@ -1459,157 +1464,157 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1675,12 +1680,7 @@
-
-
-
-
-
-
+
@@ -1690,72 +1690,72 @@
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1765,22 +1765,22 @@
-
+
-
+
-
+
-
+
@@ -1790,37 +1790,42 @@
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
+
-
+
-
-
-
-
-
@@ -1843,22 +1848,22 @@
PageSelectWeapon
-
+
-
+
-
-
-
-
-
+
+
+
+
+
@@ -2003,23 +2008,23 @@
-
+
-
+
-
+
-
+
@@ -2048,7 +2053,7 @@
QCheckBox
-
+
@@ -2063,119 +2068,119 @@
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
+
+
+
+
+
-
+
-
+
-
+
@@ -2193,87 +2198,87 @@
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -2291,7 +2296,7 @@
-
+
@@ -2401,27 +2406,27 @@
-
+
-
+
-
+
-
+
-
+
@@ -2447,187 +2452,187 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -2647,7 +2652,7 @@
-
+
@@ -2661,12 +2666,12 @@
-
+
-
+
@@ -2682,12 +2687,12 @@
QMessageBox
-
+
-
+
@@ -2729,35 +2734,35 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -2897,7 +2902,7 @@
-
+
@@ -2908,17 +2913,17 @@
-
+
-
+
-
+
@@ -2992,7 +2997,7 @@
-
+
@@ -3048,7 +3053,7 @@
-
+
@@ -3076,12 +3081,12 @@
-
+
-
+
@@ -3219,6 +3224,11 @@
+
+
+
+
+ SeedPrompt
@@ -4079,272 +4089,272 @@
server
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/hedgewars_nl.ts
--- a/share/hedgewars/Data/Locale/hedgewars_nl.ts Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_nl.ts Thu Apr 28 21:15:08 2016 +0200
@@ -1,6 +1,6 @@
-
+About
@@ -611,6 +611,10 @@
+
+
+
+ HWNetServersModel
@@ -1377,10 +1381,6 @@
-
-
-
-
@@ -1508,6 +1508,10 @@
+
+
+
+ PageSelectWeapon
@@ -2600,6 +2604,10 @@
+
+
+
+ SeedPrompt
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/hedgewars_pl.ts
--- a/share/hedgewars/Data/Locale/hedgewars_pl.ts Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_pl.ts Thu Apr 28 21:15:08 2016 +0200
@@ -1,6 +1,6 @@
-
+About
@@ -638,6 +638,10 @@
+
+
+
+ HWNetServersModel
@@ -1485,7 +1489,7 @@
- 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!
@@ -1607,6 +1611,10 @@
+
+
+
+ PageSelectWeapon
@@ -2781,6 +2789,10 @@
+
+
+
+ SeedPrompt
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/hedgewars_pt_BR.ts
--- a/share/hedgewars/Data/Locale/hedgewars_pt_BR.ts Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_pt_BR.ts Thu Apr 28 21:15:08 2016 +0200
@@ -1,6 +1,6 @@
-
+About
@@ -629,6 +629,10 @@
+
+
+
+ HWNetServersModel
@@ -1487,7 +1491,7 @@
- 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!
@@ -1589,6 +1593,10 @@
+
+
+
+ PageSelectWeapon
@@ -2731,6 +2739,10 @@
+
+
+
+ SeedPrompt
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/hedgewars_pt_PT.ts
--- a/share/hedgewars/Data/Locale/hedgewars_pt_PT.ts Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_pt_PT.ts Thu Apr 28 21:15:08 2016 +0200
@@ -1,6 +1,6 @@
-
+About
@@ -636,6 +636,10 @@
+
+
+
+ HWNetServersModel
@@ -1443,7 +1447,7 @@
- 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!
@@ -1573,6 +1577,10 @@
+
+
+
+ PageSelectWeapon
@@ -2735,6 +2743,10 @@
+
+
+
+ SeedPrompt
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/hedgewars_ro.ts
--- a/share/hedgewars/Data/Locale/hedgewars_ro.ts Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_ro.ts Thu Apr 28 21:15:08 2016 +0200
@@ -1,6 +1,6 @@
-
+About
@@ -617,6 +617,10 @@
+
+
+
+ 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!
@@ -1550,6 +1554,10 @@
+
+
+
+ PageSelectWeapon
@@ -2661,6 +2669,10 @@
+
+
+
+ SeedPrompt
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/hedgewars_ru.ts
--- a/share/hedgewars/Data/Locale/hedgewars_ru.ts Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_ru.ts Thu Apr 28 21:15:08 2016 +0200
@@ -1,6 +1,6 @@
-
+About
@@ -637,6 +637,10 @@
Стиль:
+
+
+
+ HWNetServersModel
@@ -1504,7 +1508,7 @@
- Команды располагаются в противоположных сторонах карты, два цвета команды на карте!
+ Команды располагаются в противоположных сторонах карты, два цвета команды на карте!
@@ -1606,6 +1610,10 @@
Море (края соединены с морем)
+
+
+
+ PageSelectWeapon
@@ -2750,6 +2758,10 @@
Случайная перлиновская
+
+
+
+ SeedPrompt
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/hedgewars_sk.ts
--- a/share/hedgewars/Data/Locale/hedgewars_sk.ts Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_sk.ts Thu Apr 28 21:15:08 2016 +0200
@@ -1,6 +1,6 @@
-
+About
@@ -628,6 +628,10 @@
+
+
+
+ HWNetServersModel
@@ -1488,7 +1492,7 @@
- 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!
@@ -1590,6 +1594,10 @@
+
+
+
+ PageSelectWeapon
@@ -2747,6 +2755,10 @@
+
+
+
+ SeedPrompt
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/hedgewars_sv.ts
--- a/share/hedgewars/Data/Locale/hedgewars_sv.ts Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_sv.ts Thu Apr 28 21:15:08 2016 +0200
@@ -1,6 +1,6 @@
-
+About
@@ -619,6 +619,10 @@
+
+
+
+ HWNetServersModel
@@ -1457,7 +1461,7 @@
- Lag startar på motsatta sidor av terrängen, två lagfärger max!
+ Lag startar på motsatta sidor av terrängen, två lagfärger max!
@@ -1559,6 +1563,10 @@
+
+
+
+ PageSelectWeapon
@@ -2684,6 +2692,10 @@
+
+
+
+ SeedPrompt
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/hedgewars_tr_TR.ts
--- a/share/hedgewars/Data/Locale/hedgewars_tr_TR.ts Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_tr_TR.ts Thu Apr 28 21:15:08 2016 +0200
@@ -1,6 +1,6 @@
-
+About
@@ -641,6 +641,10 @@
+
+
+
+ HWNetServersModel
@@ -1451,7 +1455,7 @@
- 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!
@@ -1581,6 +1585,10 @@
+
+
+
+ PageSelectWeapon
@@ -2747,6 +2755,10 @@
+
+
+
+ SeedPrompt
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/hedgewars_uk.ts
--- a/share/hedgewars/Data/Locale/hedgewars_uk.ts Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_uk.ts Thu Apr 28 21:15:08 2016 +0200
@@ -1,6 +1,6 @@
-
+About
@@ -639,6 +639,10 @@
+
+
+
+ HWNetServersModel
@@ -1461,7 +1465,7 @@
- Команди почнуть гру на протилежних кінцях карти, команди максимум двох кольорів!
+ Команди почнуть гру на протилежних кінцях карти, команди максимум двох кольорів!
@@ -1591,6 +1595,10 @@
Море (краї з'єднані з морем)
+
+
+
+ PageSelectWeapon
@@ -2723,6 +2731,10 @@
+
+
+
+ SeedPrompt
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/hedgewars_zh_CN.ts
--- a/share/hedgewars/Data/Locale/hedgewars_zh_CN.ts Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_zh_CN.ts Thu Apr 28 21:15:08 2016 +0200
@@ -1,6 +1,6 @@
-
+About
@@ -110,12 +110,12 @@
FeedbackDialog
-
+
-
+
@@ -125,27 +125,27 @@
-
+
-
+
-
+
-
+ 取消
-
+
@@ -178,17 +178,17 @@
-
+
-
+
-
+ 修改游戏设置
@@ -349,52 +349,52 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -583,17 +583,17 @@
HWMapContainer
-
+
-
+
-
+
@@ -633,118 +633,123 @@
-
+
+
+
+
+
+
-
+
-
+
-
+
-
-
- 全部
-
-
-
- 小型
+
+ 全部
-
- 中型
+
+ 小型
-
- 大型
+
+ 中型
-
- 洞穴
+
+ 大型
+
+ 洞穴
+
+
+ 曲折
-
-
-
-
-
-
+
-
+
+
+
+
+
+
-
+
-
+
-
+
-
-
-
-
-
+
+
+
+
+
-
-
+
+
-
+
-
+
-
+
@@ -1430,7 +1435,7 @@
-
+
@@ -1470,157 +1475,157 @@
队伍
-
+ 新队伍
-
+ 修改队伍设定
-
+
-
+
-
+
-
+
-
+
-
+
-
+ 武器
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1694,12 +1699,7 @@
-
-
-
-
-
-
+
@@ -1709,72 +1709,72 @@
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1784,22 +1784,22 @@
-
+
-
+
-
+
-
+
@@ -1809,37 +1809,42 @@
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
+
-
+
-
-
-
-
-
@@ -1862,22 +1867,22 @@
PageSelectWeapon
-
+ 新游戏
-
+ 默认
-
-
-
-
-
+
+
+
+
+ 删除
@@ -2026,23 +2031,23 @@
-
+
-
+
-
+
-
+
@@ -2070,115 +2075,115 @@
QCheckBox
-
+ 游戏全屏幕
-
+ 显示帧率 (FPS)
-
+ 另一种伤害显示方式
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
+
+
+
+
+
-
+
-
+
-
+ 记录名称中包含具体时间日期
-
+
@@ -2193,12 +2198,12 @@
-
+
-
+
@@ -2211,7 +2216,7 @@
玩家
-
+
@@ -2221,82 +2226,82 @@
Lv 级别
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -2314,7 +2319,7 @@
-
+ 城堡模式
@@ -2352,57 +2357,57 @@
QLabel
-
+
-
+
-
+
-
+
-
+ 分辨率
-
+
-
+ 游戏全屏幕
-
+
-
+
-
+
-
+ FPS 上限
@@ -2437,7 +2442,7 @@
端口:
-
+ 武器
@@ -2446,102 +2451,102 @@
版本
-
+ 初始音量
-
+ 伤害修改
-
+ 回合时间
-
+ 初始生命值
-
+ 死亡模式倒计时
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+ 设置名称:
-
+ 箱子降落
@@ -2608,27 +2613,27 @@
-
+
-
+
-
+
-
+
-
+
@@ -2644,27 +2649,27 @@
-
+
-
+
-
+
-
+
-
+
@@ -2674,7 +2679,7 @@
-
+
@@ -2688,12 +2693,12 @@
-
+
-
+
@@ -2709,22 +2714,22 @@
QMessageBox
-
+ 错误
-
+
-
+
-
+
@@ -2766,35 +2771,35 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -2934,7 +2939,7 @@
-
+
@@ -2945,7 +2950,7 @@
-
+
@@ -3009,7 +3014,7 @@
连接
-
+ 上场!
@@ -3098,17 +3103,17 @@
-
+
-
+
-
+
@@ -3246,6 +3251,11 @@
+
+
+
+
+ SeedPrompt
@@ -4110,272 +4120,272 @@
server
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 暂停
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 暂停
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Locale/hedgewars_zh_TW.ts
--- a/share/hedgewars/Data/Locale/hedgewars_zh_TW.ts Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_zh_TW.ts Thu Apr 28 21:15:08 2016 +0200
@@ -1,6 +1,6 @@
-
+About
@@ -617,6 +617,10 @@
風格:
+
+
+
+ HWNetServersModel
@@ -1437,7 +1441,7 @@
- 隊伍開始在對手的地盤,努力!
+ 隊伍開始在對手的地盤,努力!
@@ -1539,6 +1543,10 @@
海水(邊緣連接到海)
+
+
+
+ PageSelectWeapon
@@ -2649,6 +2657,10 @@
+
+
+
+ SeedPrompt
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua Thu Apr 28 21:15:08 2016 +0200
@@ -61,7 +61,7 @@
director.name = loc("H")
director.x = 1350
director.y = 1550
-doctor.name = loc("Dr.Cornelius")
+doctor.name = loc("Dr. Cornelius")
doctor.x = 1300
doctor.y = 1550
guard1.name = loc("Bob")
@@ -362,10 +362,10 @@
if checkPointReached == 1 then
-- player climbed the moon with rope
FollowGear(doctor.gear)
- AnimSay(doctor.gear, loc("One cannot simply walk in moon with rope!"), SAY_SHOUT, 4000)
+ AnimSay(doctor.gear, loc("One does not simply rope to the moon!"), SAY_SHOUT, 4000)
SendStat(siGameResult, loc("This is the wrong way!"))
- SendStat(siCustomAchievement, loc("Collect the crate with the flying saucer"))
- SendStat(siCustomAchievement, loc("Fly to the moon"))
+ SendStat(siCustomAchievement, loc("Collect the crate with the flying saucer!"))
+ SendStat(siCustomAchievement, loc("Fly to the moon."))
SendStat(siPlayerKills,'0',teamC.name)
EndGame()
else
@@ -380,7 +380,7 @@
SaveCampaignVar("Mission1", "2")
SaveCampaignVar("Mission2", "13")
SaveCampaignVar("Mission3", "1")
- sendStats(loc("the moon"))
+ sendStats(loc("Hog Solo arrived at the moon!"))
end
end
@@ -402,7 +402,7 @@
SaveCampaignVar("Mission2", "10")
SaveCampaignVar("Mission3", "1")
end
- sendStats(loc("the Fruit Planet"))
+ sendStats(loc("Hog Solo arrived at the Fruit Planet!"))
end
end
@@ -417,7 +417,7 @@
SaveCampaignVar("Mission2", "7")
SaveCampaignVar("Mission3", "12")
SaveCampaignVar("Mission4", "1")
- sendStats(loc("the Desert Planet"))
+ sendStats(loc("Hog Solo arrived at the Desert Planet!"))
end
end
@@ -431,7 +431,7 @@
SaveCampaignVar("Mission1", "5")
SaveCampaignVar("Mission2", "6")
SaveCampaignVar("Mission3", "1")
- sendStats(loc("the Ice Planet"))
+ sendStats(loc("Hog Solo arrived at the Ice Planet!"))
end
end
@@ -447,7 +447,7 @@
SaveCampaignVar("Mission1", "9")
SaveCampaignVar("Mission2", "11")
SaveCampaignVar("Mission3", "1")
- sendStats(loc("the Planet of Death"))
+ sendStats(loc("Hog Solo arrived at the Planet of Death!"))
end
end
@@ -463,7 +463,7 @@
SaveCampaignVar("UnlockedMissions", "2")
SaveCampaignVar("Mission1", "14")
SaveCampaignVar("Mission2", "1")
- sendStats(loc("the meteorite"))
+ sendStats(loc("Hog Solo arrived at the meteorite!"))
end
end
@@ -522,23 +522,23 @@
-- DIALOG 01 - Start
AddSkipFunction(dialog01, Skipanim, {dialog01})
table.insert(dialog01, {func = AnimWait, args = {doctor.gear, 3000}})
- table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Near secret base 17 of PAotH in the rural Hogland..."), 4000}})
- table.insert(dialog01, {func = AnimSay, args = {director.gear, loc("So Hog Solo, here we are..."), SAY_SAY, 2000}})
- table.insert(dialog01, {func = AnimSay, args = {director.gear, loc("Behind these trees on the east side there is secret base 17"), SAY_SAY, 4000}})
+ table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Near Secret Base 17 of PAotH in the rural Hogland ..."), 4000}})
+ table.insert(dialog01, {func = AnimSay, args = {director.gear, loc("So Hog Solo, here we are ..."), SAY_SAY, 2000}})
+ table.insert(dialog01, {func = AnimSay, args = {director.gear, loc("Behind these trees on the east side there is Secret Base 17."), SAY_SAY, 4000}})
table.insert(dialog01, {func = AnimSay, args = {director.gear, loc("You have to continue alone from now on."), SAY_SAY, 3000}})
table.insert(dialog01, {func = AnimSay, args = {director.gear, loc("Be careful, the future of Hogera is in your hands!"), SAY_SAY, 7200}})
- table.insert(dialog01, {func = AnimSay, args = {doctor.gear, loc("We'll use our communicators to contact you"), SAY_SAY, 2600}})
- table.insert(dialog01, {func = AnimSay, args = {doctor.gear, loc("In am also entrusting you with some rope"), SAY_SAY, 5000}})
- table.insert(dialog01, {func = AnimSay, args = {doctor.gear, loc("You may find it handy"), SAY_SAY, 2300}})
- table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Thank you Dr.Cornelius"), SAY_SAY, 1600}})
- table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("I'll make good use of it"), SAY_SAY, 4500}})
- table.insert(dialog01, {func = AnimSay, args = {director.gear, loc("It would be wiser to steal the space ship while PAotH guards are taking a brake!"), SAY_SAY, 7000}})
+ table.insert(dialog01, {func = AnimSay, args = {doctor.gear, loc("We'll use our communicators to contact you."), SAY_SAY, 2600}})
+ table.insert(dialog01, {func = AnimSay, args = {doctor.gear, loc("In am also entrusting you with some rope."), SAY_SAY, 5000}})
+ table.insert(dialog01, {func = AnimSay, args = {doctor.gear, loc("You may find it handy."), SAY_SAY, 2300}})
+ table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Thank you, Dr. Cornelius."), SAY_SAY, 1600}})
+ table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("I'll make good use of it."), SAY_SAY, 4500}})
+ table.insert(dialog01, {func = AnimSay, args = {director.gear, loc("It would be wiser to steal the space ship while the PAotH guards are taking a brake!"), SAY_SAY, 7000}})
table.insert(dialog01, {func = AnimSay, args = {director.gear, loc("Remember! Many will seek the anti-gravity device! Now go, hurry up!"), SAY_SAY, 4000}})
table.insert(dialog01, {func = AnimSwitchHog, args = {hero.gear}})
-- DIALOG 02 - Hero got the saucer
AddSkipFunction(dialog02, Skipanim, {dialog02})
table.insert(dialog02, {func = AnimWait, args = {hero.gear, 500}})
- table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("CheckPoint reached!"), 4000}})
+ table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("Checkpoint reached!"), 4000}})
table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("Got the saucer!"), SAY_SHOUT, 2000}})
table.insert(dialog02, {func = AnimSay, args = {director.gear, loc("Nice!"), SAY_SHOUT, 1000}})
table.insert(dialog02, {func = AnimSay, args = {director.gear, loc("Now use it and go to the moon PAotH station to get more fuel!"), SAY_SHOUT, 5000}})
@@ -547,7 +547,7 @@
AddSkipFunction(dialog03, Skipanim, {dialog03})
table.insert(dialog03, {func = AnimWait, args = {guard1.gear, 4000}})
table.insert(dialog03, {func = AnimCaption, args = {guard1.gear, loc("Prepare to flee!"), 4000}})
- table.insert(dialog03, {func = AnimSay, args = {guard1.gear, loc("Hey").." "..guard2.name.."! "..loc("Look, someone is stealing the saucer!"), SAY_SHOUT, 4000}})
+ table.insert(dialog03, {func = AnimSay, args = {guard1.gear, string.format(loc("Hey, %s! Look, someone is stealing the saucer!"), guard2.name), SAY_SHOUT, 4000}})
table.insert(dialog03, {func = AnimSay, args = {guard2.gear, loc("I'll get him!"), SAY_SAY, 4000}})
table.insert(dialog03, {func = startCombat, args = {guard1.gear}})
-- DIALOG 04 - Hero out of sight
@@ -558,24 +558,24 @@
table.insert(dialog04, {func = AnimSwitchHog, args = {hero.gear}})
-- DIALOG 05 - Hero returned from moon without fuels
AddSkipFunction(dialog05, Skipanim, {dialog05})
- table.insert(dialog05, {func = AnimSay, args = {hero.gear, loc("I guess I can't go far without fuels!"), SAY_THINK, 6000}})
- table.insert(dialog05, {func = AnimSay, args = {hero.gear, loc("Go to go back"), SAY_THINK, 2000}})
+ table.insert(dialog05, {func = AnimSay, args = {hero.gear, loc("I guess I can't go far without fuel!"), SAY_THINK, 6000}})
+ table.insert(dialog05, {func = AnimSay, args = {hero.gear, loc("Got to go back."), SAY_THINK, 2000}})
table.insert(dialog05, {func = sendStatsOnRetry, args = {hero.gear}})
-- DIALOG 06 - Landing on wrong planet or on earth if not enough fuels
AddSkipFunction(dialog06, Skipanim, {dialog06})
table.insert(dialog06, {func = AnimCaption, args = {hero.gear, loc("You have to try again!"), 5000}})
- table.insert(dialog06, {func = AnimSay, args = {hero.gear, loc("Hm... Now I ran out of fuel..."), SAY_THINK, 3000}})
+ table.insert(dialog06, {func = AnimSay, args = {hero.gear, loc("Hm ... Now I ran out of fuel."), SAY_THINK, 3000}})
table.insert(dialog06, {func = sendStatsOnRetry, args = {hero.gear}})
-- DIALOG 07 - Hero lands on Death Planet but isn't allowed yet to play this map
AddSkipFunction(dialog07, Skipanim, {dialog07})
table.insert(dialog07, {func = AnimCaption, args = {hero.gear, loc("This planet seems dangerous!"), 5000}})
- table.insert(dialog07, {func = AnimSay, args = {hero.gear, loc("I am not ready for this planet yet. I should visit it when I have found all the other device parts"), SAY_THINK, 4000}})
+ table.insert(dialog07, {func = AnimSay, args = {hero.gear, loc("I am not ready for this planet yet. I should visit it when I have found all the other device parts."), SAY_THINK, 4000}})
-- DIALOG 08 - Hero wins death01
AddSkipFunction(dialog08, Skipanim, {dialog08})
- table.insert(dialog08, {func = AnimCaption, args = {hero.gear, loc("Under the meteorite shadow..."), 4000}})
- table.insert(dialog08, {func = AnimSay, args = {doctor.gear, loc("You did great Hog Solo! However we aren't out of danger yet!"), SAY_SHOUT, 4500}})
- table.insert(dialog08, {func = AnimSay, args = {doctor.gear, loc("The meteorite has come too close and the anti-gravity device isn't powerful enough to stop it now"), SAY_SHOUT, 5000}})
- table.insert(dialog08, {func = AnimSay, args = {doctor.gear, loc("We need it to get split into at least two parts"), SAY_SHOUT, 3000}})
+ table.insert(dialog08, {func = AnimCaption, args = {hero.gear, loc("Under the meteorites shadow ..."), 4000}})
+ table.insert(dialog08, {func = AnimSay, args = {doctor.gear, loc("You did great, Hog Solo! However, we aren't out of danger yet!"), SAY_SHOUT, 4500}})
+ table.insert(dialog08, {func = AnimSay, args = {doctor.gear, loc("The meteorite has come too close and the anti-gravity device isn't powerful enough to stop it now."), SAY_SHOUT, 5000}})
+ table.insert(dialog08, {func = AnimSay, args = {doctor.gear, loc("We need it to get split into at least two parts."), SAY_SHOUT, 3000}})
table.insert(dialog08, {func = AnimSay, args = {doctor.gear, loc("PAotH has sent explosives but unfortunately the trigger mechanism seems to be faulty!"), SAY_SHOUT, 5000}})
table.insert(dialog08, {func = AnimSay, args = {doctor.gear, loc("We need you to go there and detonate them yourself! Good luck!"), SAY_SHOUT, 500}})
table.insert(dialog08, {func = AnimWait, args = {doctor.gear, 3000}})
@@ -590,20 +590,20 @@
TurnTimeLeft = 0
end
-function sendStats(planet)
- SendStat(siGameResult, loc("Hog Solo arrived at "..planet))
- SendStat(siCustomAchievement, loc("Return to the mission menu by pressing the \"Go back\" button"))
- SendStat(siCustomAchievement, loc("You can choose another planet by replaying this mission"))
- SendStat(siCustomAchievement, loc("Planets with completed main missions will be marked with a flower"))
+function sendStats(planetMsg)
+ SendStat(siGameResult, planetMsg)
+ SendStat(siCustomAchievement, loc("Return to the mission menu by pressing the \"Go back\" button."))
+ SendStat(siCustomAchievement, loc("You can choose another planet by replaying this mission."))
+ SendStat(siCustomAchievement, loc("Planets with completed main missions will be marked with a flower."))
SendStat(siPlayerKills,'1',teamC.name)
EndGame()
end
function sendStatsOnRetry()
SendStat(siGameResult, loc("You have to travel again"))
- SendStat(siCustomAchievement, loc("Your first destination is the moon in order to get more fuel"))
- SendStat(siCustomAchievement, loc("You have to complete the main mission on moon in order to travel to other planets"))
- SendStat(siCustomAchievement, loc("You have to be careful and not die!"))
+ SendStat(siCustomAchievement, loc("Your first destination is the moon in order to get more fuel."))
+ SendStat(siCustomAchievement, loc("You have to complete the main mission on moon in order to travel to other planets."))
+ SendStat(siCustomAchievement, loc("You have to be careful and must not die!"))
SendStat(siPlayerKills,'0',teamC.name)
EndGame()
end
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death01.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death01.lua Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death01.lua Thu Apr 28 21:15:08 2016 +0200
@@ -44,17 +44,17 @@
local teamB = {}
local teamC = {}
-- hedgehogs values
-hero.name = "Hog Solo"
+hero.name = loc("Hog Solo")
hero.x = 520
hero.y = 845
hero.dead = false
-paoth1.name = "H"
+paoth1.name = loc("H")
paoth1.x = 3730
paoth1.y = 1480
-paoth2.name = "Dr.Cornelius"
+paoth2.name = loc("Dr. Cornelius")
paoth2.x = 3800
paoth2.y = 1480
-professor.name = "Prof. Hogevil"
+professor.name = loc("Prof. Hogevil")
professor.dead = false
thug1.x = 1265
thug1.y = 1400
@@ -123,7 +123,7 @@
HogTurnLeft(professor.bot, true)
professor.gear = professor.bot
for i=1,table.getn(thugs) do
- thugs[i].gear = AddHog(loc("thug").." #"..i, 1, thugs[i].health, "war_desertgrenadier1")
+ thugs[i].gear = AddHog(string.format(loc("Thug #%d"), i), 1, thugs[i].health, "war_desertgrenadier1")
AnimSetGearPosition(thugs[i].gear, thugs[i].x, thugs[i].y)
HogTurnLeft(thugs[i].gear, not thugs[i].turnLeft)
end
@@ -265,7 +265,7 @@
function heroDeath(gear)
SendStat(siGameResult, loc("Hog Solo lost, try again!"))
- SendStat(siCustomAchievement, loc("To win the game you have to eliminate all your enemies"))
+ SendStat(siCustomAchievement, loc("To win the game you have to eliminate all your enemies."))
SendStat(siPlayerKills,'1',teamC.name)
SendStat(siPlayerKills,'0',teamA.name)
EndGame()
@@ -274,10 +274,10 @@
function enemiesDeath(gear)
saveCompletedStatus(6)
SendStat(siGameResult, loc("Congratulations, you won!"))
- SendStat(siCustomAchievement, loc("You have successfully eliminated Professor Hogevil"))
- SendStat(siCustomAchievement, loc("You have rescued H and Dr.Cornelius"))
- SendStat(siCustomAchievement, loc("You have acquired the last device part"))
- SendStat(siCustomAchievement, loc("Now go and play the menu mission to complete the campaign"))
+ SendStat(siCustomAchievement, loc("You have successfully eliminated Professor Hogevil."))
+ SendStat(siCustomAchievement, loc("You have rescued H and Dr. Cornelius."))
+ SendStat(siCustomAchievement, loc("You have acquired the last device part."))
+ SendStat(siCustomAchievement, loc("Now go and play the menu mission to complete the campaign."))
SendStat(siPlayerKills,'1',teamA.name)
SendStat(siPlayerKills,'0',teamC.name)
EndGame()
@@ -296,11 +296,11 @@
-- DIALOG01, GAME START, INTRODUCTION
AddSkipFunction(dialog01, Skipanim, {dialog01})
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
- table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere in the uninhabitable Death Planet..."), 5000}})
+ table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere on the uninhabitable Death Planet ..."), 5000}})
table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("Welcome Hog Solo, surprised to see me?"), SAY_SAY, 4000}})
table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("As you can see I have survived our last encounter and I had time to plot my master plan!"), SAY_SAY, 4000}})
table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("I've thought that the best way to get the device is to let you collect most of the parts for me!"), SAY_SAY, 4000}})
- table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("So, now I got the last part and I have your friends captured..."), SAY_SAY, 4000}})
+ table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("So, now I got the last part and I have your friends captured."), SAY_SAY, 4000}})
table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("Will you give me the other parts?"), SAY_SAY, 4000}})
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("I will never hand you the parts!"), SAY_SAY, 4000}})
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death02.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death02.lua Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death02.lua Thu Apr 28 21:15:08 2016 +0200
@@ -10,19 +10,19 @@
----------------- VARIABLES --------------------
-- globals
local missionName = loc("Killing the specialists")
-local challengeObjectives = loc("Use your available weapons in order to eliminate the enemies").."|"..
- loc("Each time you play this missions enemy hogs will play in a random order").."|"..
- loc("At the start of the game each enemy hog has only the weapon that he is named after").."|"..
- loc("A random hedgehog will inherit the weapons of his deceased team-mates").."|"..
- loc("If you kill a hedgehog with the respective weapon your health points will be set to 100").."|"..
- loc("If you injure a hedgehog you'll get 35% of the damage dealt").."|"..
- loc("Every time you kill an enemy hog your ammo will get reset").."|"..
- loc("Rope won't get reset")
+local challengeObjectives = loc("Use your available weapons in order to eliminate the enemies.").."|"..
+ loc("Each time you play this missions enemy hogs will play in a random order.").."|"..
+ loc("At the start of the game each enemy hog has only the weapon that he is named after.").."|"..
+ loc("A random hedgehog will inherit the weapons of his deceased team-mates.").."|"..
+ loc("If you kill a hedgehog with the respective weapon your health points will be set to 100.").."|"..
+ loc("If you injure a hedgehog you'll get 35% of the damage dealt.").."|"..
+ loc("Every time you kill an enemy hog your ammo will get reset.").."|"..
+ loc("The rope won't get reset.")
-- dialogs
local dialog01 = {}
-- mission objectives
local goals = {
- [dialog01] = {missionName, loc("Challenge Objectives"), challengeObjectives, 1, 4500},
+ [dialog01] = {missionName, loc("Challenge objectives"), challengeObjectives, 1, 4500},
}
-- hogs
local hero = {
@@ -48,7 +48,7 @@
color = tonumber("38D61C",16) -- green
}
local teamB = {
- name = loc("5 deadly hogs"),
+ name = loc("5 Deadly Hogs"),
color = tonumber("FF0000",16) -- red
}
@@ -177,8 +177,8 @@
function heroDeath(gear)
SendStat(siGameResult, loc("Hog Solo lost, try again!"))
- SendStat(siCustomAchievement, loc("You have to eliminate all the enemies"))
- SendStat(siCustomAchievement, loc("Read the Challenge Objectives from within the mission for more details"))
+ SendStat(siCustomAchievement, loc("You have to eliminate all the enemies."))
+ SendStat(siCustomAchievement, loc("Read the challenge objectives from within the mission for more details."))
SendStat(siPlayerKills,'1',teamB.name)
SendStat(siPlayerKills,'0',teamA.name)
EndGame()
@@ -187,8 +187,8 @@
function heroWin(gear)
saveBonus(3, 4)
SendStat(siGameResult, loc("Congratulations, you won!"))
- SendStat(siCustomAchievement, loc("You complete the mission in "..TotalRounds.." rounds"))
- SendStat(siCustomAchievement, loc("The next 4 times you play the \"The last encounter\" mission you'll get 20 more hit points and a Laser Sight"))
+ SendStat(siCustomAchievement, string.format(loc("You completed the mission in %d rounds."), TotalRounds))
+ SendStat(siCustomAchievement, loc("The next 4 times you play the \"The last encounter\" mission you'll get 20 more hit points and a laser sight."))
SendStat(siPlayerKills,'1',teamA.name)
EndGame()
end
@@ -206,8 +206,8 @@
-- DIALOG 01 - Start, game instructions
AddSkipFunction(dialog01, Skipanim, {dialog01})
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
- table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere in the Planet of Death..."), 3000}})
- table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("...Hog Solo fights for his life"), 3000}})
+ table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere on the Planet of Death ..."), 3000}})
+ table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("... Hog Solo fights for his life"), 3000}})
table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Each time you play this missions enemy hogs will play in a random order"), 5000}})
table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("At the start of the game each enemy hog has only the weapon that he is named after"), 5000}})
table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("A random hedgehog will inherit the weapons of his deceased team-mates"), 5000}})
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua Thu Apr 28 21:15:08 2016 +0200
@@ -412,7 +412,7 @@
end
function heroFleeFirstBattle(gear)
- AnimSay(smuggler1.gear, loc("Run away you coward!"), SAY_SHOUT, 4000)
+ AnimSay(smuggler1.gear, loc("Run away, you coward!"), SAY_SHOUT, 4000)
TurnTimeLeft = 0
heroIsInBattle = false
ongoingBattle = 0
@@ -439,7 +439,7 @@
function heroAtThirdBattle(gear)
heroIsInBattle = true
ongoingBattle = 3
- AnimSay(smuggler3.gear, loc("Who's there?! I'll get you..."), SAY_SHOUT, 5000)
+ AnimSay(smuggler3.gear, loc("Who's there?! I'll get you!"), SAY_SHOUT, 5000)
AnimSwitchHog(smuggler3.gear)
TurnTimeLeft = 0
end
@@ -479,22 +479,22 @@
-- DIALOG 01 - Start, getting info about the device
AddSkipFunction(dialog01, Skipanim, {dialog01})
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
- table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("In the Planet of Sand, you have to double check your moves..."), 5000}})
- table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Finally you are here..."), SAY_SAY, 2000}})
+ table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("On the Planet of Sand, you have to double check your moves ..."), 5000}})
+ table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Finally you are here!"), SAY_SAY, 2000}})
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 2000}})
table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Thank you for meeting me on such a short notice!"), SAY_SAY, 3000}})
table.insert(dialog01, {func = AnimWait, args = {ally.gear, 4000}})
table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("No problem, I would do anything for H!"), SAY_SAY, 4000}})
table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Now listen carefully! Below us there are tunnels that have been created naturally over the years"), SAY_SAY, 4000}})
- table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("I have heard that the local tribes say that many years ago some PAotH scientists were dumping their waste here"), SAY_SAY, 5000}})
- table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("H confirmed that there isn't such a PAotH activity logged"), SAY_SAY, 4000}})
- table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("So, I believe that it's a good place to start"), SAY_SAY, 3000}})
- table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Beware though! Many smugglers come often to explore these tunnels and scavenge whatever valuable items they can find"), SAY_SAY, 5000}})
+ table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("I have heard that the local tribes say that many years ago some PAotH scientists were dumping their waste here."), SAY_SAY, 5000}})
+ table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("H confirmed that there isn't such a PAotH activity logged."), SAY_SAY, 4000}})
+ table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("So, I believe that it's a good place to start."), SAY_SAY, 3000}})
+ table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Beware, though! Many smugglers come often to explore these tunnels and scavenge whatever valuable items they can find."), SAY_SAY, 5000}})
table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("They won't hesitate to attack you in order to rob you!"), SAY_SAY, 4000}})
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 6000}})
- table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("OK, I'll be extra careful!"), SAY_SAY, 4000}})
+ table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Okay, I'll be extra careful!"), SAY_SAY, 4000}})
table.insert(dialog01, {func = AnimWait, args = {ally.gear, 2000}})
- table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("There is the tunnel entrance"), SAY_SAY, 3000}})
+ table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("The tunnel entrance is over there."), SAY_SAY, 3000}})
table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Good luck!"), SAY_SAY, 3000}})
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}})
table.insert(dialog01, {func = startMission, args = {hero.gear}})
@@ -510,11 +510,11 @@
function secondBattle()
-- second battle
if heroIsInBattle and ongoingBattle == 1 then
- AnimSay(smuggler1.gear, loc("Get him Spike!"), SAY_SHOUT, 4000)
+ AnimSay(smuggler1.gear, loc("Get him, Spike!"), SAY_SHOUT, 4000)
end
heroIsInBattle = true
ongoingBattle = 2
- AnimSay(smuggler2.gear, loc("This is seems like a wealthy hedgehog, nice..."), SAY_THINK, 5000)
+ AnimSay(smuggler2.gear, loc("This is seems like a wealthy hedgehog, nice ..."), SAY_THINK, 5000)
AnimSwitchHog(smuggler2.gear)
TurnTimeLeft = 0
end
@@ -551,14 +551,14 @@
function checkForWin()
if cratesFound == 0 then
-- have to look more
- AnimSay(hero.gear, loc("Haven't found it yet..."), SAY_THINK, 5000)
+ AnimSay(hero.gear, loc("Haven't found it yet ..."), SAY_THINK, 5000)
cratesFound = cratesFound + 1
elseif cratesFound == 1 then
-- end game
saveCompletedStatus(5)
- AnimSay(hero.gear, loc("Hoorah!!!"), SAY_SHOUT, 5000)
+ AnimSay(hero.gear, loc("Hooray!"), SAY_SHOUT, 5000)
SendStat(siGameResult, loc("Congratulations, you won!"))
- SendStat(siCustomAchievement, loc("To win the game you had to collect the 2 crates with no specific order"))
+ SendStat(siCustomAchievement, loc("To win the game you had to collect the 2 crates with no specific order."))
SendStat(siPlayerKills,'1',teamC.name)
SendStat(siPlayerKills,'0',teamB.name)
EndGame()
@@ -567,9 +567,9 @@
function lose()
SendStat(siGameResult, loc("Hog Solo lost, try again!"))
- SendStat(siCustomAchievement, loc("To win the game you have to find the right crate"))
- SendStat(siCustomAchievement, loc("You can avoid some battles"))
- SendStat(siCustomAchievement, loc("Use your ammo wisely"))
+ SendStat(siCustomAchievement, loc("To win the game you have to find the right crate."))
+ SendStat(siCustomAchievement, loc("You can avoid some battles."))
+ SendStat(siCustomAchievement, loc("Use your ammo wisely."))
SendStat(siCustomAchievement, loc("Don't destroy the device crate!"))
SendStat(siPlayerKills,'1',teamB.name)
SendStat(siPlayerKills,'0',teamC.name)
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert02.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert02.lua Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert02.lua Thu Apr 28 21:15:08 2016 +0200
@@ -144,17 +144,17 @@
function heroDeath(gear)
SendStat(siGameResult, loc("Hog Solo lost, try again!"))
- SendStat(siCustomAchievement, loc("To win the game you have to go to the surface"))
- SendStat(siCustomAchievement, loc("Most mines are not active"))
- SendStat(siCustomAchievement, loc("From the second turn and beyond the water rises"))
+ SendStat(siCustomAchievement, loc("To win the game you have to go to the surface."))
+ SendStat(siCustomAchievement, loc("Most mines are not active."))
+ SendStat(siCustomAchievement, loc("From the second turn and beyond the water rises."))
SendStat(siPlayerKills,'0',teamA.name)
EndGame()
end
function heroSafe(gear)
SendStat(siGameResult, loc("Congratulations, you won!"))
- SendStat(siCustomAchievement, loc("You have escaped successfully"))
- SendStat(siCustomAchievement, loc("Your escape took you "..TotalRounds.." turns"))
+ SendStat(siCustomAchievement, loc("You have escaped successfully."))
+ SendStat(siCustomAchievement, string.format(loc("Your escape took you %d turns."), TotalRounds))
SendStat(siPlayerKills,'1',teamA.name)
EndGame()
end
@@ -172,9 +172,9 @@
-- DIALOG 01 - Start
AddSkipFunction(dialog01, Skipanim, {dialog01})
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
- table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Many meters below the surface..."), 5000}})
- table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("The tunnel is about to get flooded..."), SAY_THINK, 4000}})
- table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("I have to reach the surface as quickly as I can..."), SAY_THINK, 4000}})
+ table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Many meters below the surface ..."), 5000}})
+ table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("The tunnel is about to get flooded!"), SAY_THINK, 4000}})
+ table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("I have to reach the surface as quickly as I can."), SAY_THINK, 4000}})
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}})
table.insert(dialog01, {func = challengeStart, args = {hero.gear}})
end
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert03.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert03.lua Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert03.lua Thu Apr 28 21:15:08 2016 +0200
@@ -18,7 +18,7 @@
local dialog01 = {}
-- mission objectives
local goals = {
- [dialog01] = {missionName, loc("Challenge Objectives"), challengeObjectives, 1, 4500},
+ [dialog01] = {missionName, loc("Challenge objectives"), challengeObjectives, 1, 4500},
}
-- hogs
local hero = {
@@ -81,7 +81,7 @@
function onGameStart()
AnimWait(hero.gear, 3000)
FollowGear(hero.gear)
- ShowMission(missionName, loc("Challenge Objectives"), challengeObjectives, -amSkip, 0)
+ ShowMission(missionName, loc("Challenge objectives"), challengeObjectives, -amSkip, 0)
AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0)
AddEvent(onLose, {hero.gear}, lose, {hero.gear}, 0)
@@ -159,7 +159,7 @@
-- DIALOG 01 - Start, game instructions
AddSkipFunction(dialog01, Skipanim, {dialog01})
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
- table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("On the Desert Planet, Hog Solo found some time to play with his RC plane..."), 3000}})
+ table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("On the Desert Planet, Hog Solo found some time to play with his RC plane"), 3000}})
table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Each time you destroy all the targets on your current level you'll get teleported to the next level"), 5000}})
table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("You'll have only one RC plane at the start of the mission"), 5000}})
table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("During the game you can get new RC planes by collecting the weapon crates"), 5000}})
@@ -209,18 +209,18 @@
function win()
saveBonus(1, 1)
SendStat(siGameResult, loc("Congratulations, you are the best!"))
- SendStat(siCustomAchievement, loc("You have destroyed all the targets"))
- SendStat(siCustomAchievement, loc("You are indeed the best PAotH pilot"))
- SendStat(siCustomAchievement, loc("Next time you play \"Searching in the dust\" you'll have an RC plane available"))
+ SendStat(siCustomAchievement, loc("You have destroyed all the targets."))
+ SendStat(siCustomAchievement, loc("You are indeed the best PAotH pilot."))
+ SendStat(siCustomAchievement, loc("Next time you play \"Searching in the dust\" you'll have an RC plane available."))
SendStat(siPlayerKills,'1',teamA.name)
EndGame()
end
function gameOver()
SendStat(siGameResult, loc("Hog Solo lost, try again!"))
- SendStat(siCustomAchievement, loc("You have to destroy all the targets"))
- SendStat(siCustomAchievement, loc("You will fail if you run out of ammo and there are still targets available"))
- SendStat(siCustomAchievement, loc("Read the Challenge Objectives from within the mission for more details"))
+ SendStat(siCustomAchievement, loc("You have to destroy all the targets."))
+ SendStat(siCustomAchievement, loc("You will fail if you run out of ammo and there are still targets available."))
+ SendStat(siCustomAchievement, loc("Read the challenge objectives from within the mission for more details."))
SendStat(siPlayerKills,'0',teamA.name)
EndGame()
end
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/final.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/final.lua Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/final.lua Thu Apr 28 21:15:08 2016 +0200
@@ -14,7 +14,7 @@
local missionName = loc("The big bang")
local challengeObjectives = loc("Find a way to detonate all the explosives and stay alive!").."|"..
loc("Red areas are indestructible").."|"..
- loc("Green areas aren't portal enabled")
+ loc("Green areas are portal-proof")
local explosives = {}
local currentHealth = 1
local currentDamage = 0
@@ -57,7 +57,7 @@
function onGameStart()
AnimWait(hero.gear, 3000)
FollowGear(hero.gear)
- ShowMission(missionName, loc("Challenge Objectives"), challengeObjectives, -amSkip, 0)
+ ShowMission(missionName, loc("Challenge objectives"), challengeObjectives, -amSkip, 0)
-- explosives
x = 400
@@ -143,8 +143,8 @@
function heroDeath(gear)
SendStat(siGameResult, loc("Hog Solo lost, try again!"))
SendStat(siCustomAchievement, loc("You have to destroy all the explosives without dying!"))
- SendStat(siCustomAchievement, loc("Red areas are indestructible"))
- SendStat(siCustomAchievement, loc("Green areas aren't portal enabled"))
+ SendStat(siCustomAchievement, loc("Red areas are indestructible."))
+ SendStat(siCustomAchievement, loc("Green areas are portal-proof and repel portals."))
SendStat(siPlayerKills,'0',teamA.name)
EndGame()
end
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit01.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit01.lua Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit01.lua Thu Apr 28 21:15:08 2016 +0200
@@ -32,9 +32,9 @@
local dialog03 = {}
-- mission objectives
local goals = {
- [dialog01] = {missionName, loc("Ready for Battle?"), loc("Walk left if you want to join Captain Lime or right if you want to decline his offer"), 1, 4000},
- [dialog02] = {missionName, loc("Battle Starts Now!"), loc("You have chosen to fight! Lead the Green Bananas to battle and eliminate all the enemies"), 1, 4000},
- [dialog03] = {missionName, loc("Time to run!"), loc("You have chosen to flee... Unfortunately the only place where you can launch your saucer is the left-most place on the map"), 1, 4000},
+ [dialog01] = {missionName, loc("Ready for Battle?"), loc("Walk left if you want to join Captain Lime or right if you want to decline his offer."), 1, 4000},
+ [dialog02] = {missionName, loc("Battle Starts Now!"), loc("You have chosen to fight! Lead the Green Bananas to battle and eliminate all the enemies!"), 1, 4000},
+ [dialog03] = {missionName, loc("Time to run!"), loc("You have chosen to flee ... Unfortunately, the only place where you can launch your saucer is the left-most place on the map."), 1, 4000},
}
-- crates
local crateWMX = 2170
@@ -387,42 +387,42 @@
-- DIALOG 01 - Start, Captain Lime talks explains to Hog Solo
AddSkipFunction(dialog01, Skipanim, {dialog01})
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
- table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere on the Planet of Fruits a terrible war is about to begin..."), 5000}})
+ table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere on the Planet of Fruits a terrible war is about to begin ..."), 5000}})
table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("I was told that as the leader of the king's guard, no one knows this world better than you!"), SAY_SAY, 5000}})
- table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("So, I kindly ask for your help"), SAY_SAY, 3000}})
+ table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("So, I kindly ask for your help."), SAY_SAY, 3000}})
table.insert(dialog01, {func = AnimWait, args = {green1.gear, 2000}})
- table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("You couldn't have come to a worse time Hog Solo!"), SAY_SAY, 3000}})
- table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("The clan of the Red Strawberry wants to take over the dominion and overthrone king Pineapple."), SAY_SAY, 5000}})
- table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("Under normal circumstances we could easily defeat them but we have kindly sent most of our men to the kingdom of Sand to help to the annual dusting of the king's palace."), SAY_SAY, 8000}})
- table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("However the army of Yellow Watermelons is about to attack any moment now."), SAY_SAY, 4000}})
+ table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("You couldn't have come to a worse time, Hog Solo!"), SAY_SAY, 3000}})
+ table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("The clan of the Red Strawberry wants to take over the dominion and overthrow King Pineapple."), SAY_SAY, 5000}})
+ table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("Under normal circumstances we could easily defeat them but we have kindly sent most of our men to the Kingdom of Sand to help with the annual dusting of the king's palace."), SAY_SAY, 8000}})
+ table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("However, the army of Yellow Watermelons is about to attack any moment now."), SAY_SAY, 4000}})
table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("I would gladly help you if we won this battle but under these circumstances I'll only help you if you fight for our side."), SAY_SAY, 6000}})
table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("What do you say? Will you fight for us?"), SAY_SAY, 3000}})
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}})
- table.insert(dialog01, {func = ShowMission, args = {missionName, loc("Ready for Battle?"), loc("Walk left if you want to join Captain Lime or right if you want to decline his offer"), 1, 7000}})
+ table.insert(dialog01, {func = ShowMission, args = {missionName, loc("Ready for Battle?"), loc("Walk left if you want to join Captain Lime or right if you want to decline his offer."), 1, 7000}})
table.insert(dialog01, {func = AnimSwitchHog, args = {hero.gear}})
-- DIALOG 02 - Hero selects to fight
AddSkipFunction(dialog02, Skipanim, {dialog02})
table.insert(dialog02, {func = AnimWait, args = {green1.gear, 3000}})
- table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("You choose well Hog Solo!"), SAY_SAY, 3000}})
- table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("I have only 3 hogs available and they are all cadets"), SAY_SAY, 4000}})
- table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("As you are more experienced, I want you to lead them to the battle"), SAY_SAY, 4000}})
- table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("I of course will observe the battle and intervene if necessary"), SAY_SAY, 5000}})
+ table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("You choose well, Hog Solo!"), SAY_SAY, 3000}})
+ table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("I have only 3 hogs available and they are all cadets."), SAY_SAY, 4000}})
+ table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("As you are more experienced, I want you to lead them to battle."), SAY_SAY, 4000}})
+ table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("Of course, I will observe the battle and intervene if necessary."), SAY_SAY, 5000}})
table.insert(dialog02, {func = AnimWait, args = {hero.gear, 4500}})
- table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("No problem Captain!"), SAY_SAY, 2000}})
+ table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("No problem, Captain!"), SAY_SAY, 2000}})
table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("The enemies aren't many anyway, it is going to be easy!"), SAY_SAY, 1}})
table.insert(dialog02, {func = AnimWait, args = {green1.gear, 9000}})
- table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("Don't be foolish son, there will be more"), SAY_SAY, 2000}})
+ table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("Don't be foolish, son, there will be more."), SAY_SAY, 2000}})
table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("Try to be smart and eliminate them quickly. This way you might scare off the rest!"), SAY_SAY, 5000}})
table.insert(dialog02, {func = AnimWait, args = {hero.gear, 5000}})
table.insert(dialog02, {func = startBattle, args = {hero.gear}})
-- DIALOG 03 - Hero selects to flee
AddSkipFunction(dialog03, Skipanim, {dialog03})
table.insert(dialog03, {func = AnimWait, args = {green1.gear, 3000}})
- table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Too bad... Then you should really leave!"), SAY_SAY, 3000}})
- table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Things are going to get messy around here"), SAY_SAY, 3000}})
- table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Also, you should know that the only place where you can fly is the left-most part of this area"), SAY_SAY, 5000}})
- table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("All the other places are protected by our flight-inhibiting weapons"), SAY_SAY, 4000}})
- table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Now go and don't waste more of my time you coward..."), SAY_SAY, 4000}})
+ table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Too bad! Then you should really leave!"), SAY_SAY, 3000}})
+ table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Things are going to get messy around here."), SAY_SAY, 3000}})
+ table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Also, you should know that the only place where you can fly is the left-most part of this area."), SAY_SAY, 5000}})
+ table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("All the other places are protected by our flight-inhibiting weapons."), SAY_SAY, 4000}})
+ table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Now go and don't waste more of my time, you coward!"), SAY_SAY, 4000}})
table.insert(dialog03, {func = AnimWait, args = {hero.gear, 5000}})
table.insert(dialog03, {func = startBattle, args = {hero.gear}})
end
@@ -447,16 +447,16 @@
function gameLost()
if chooseToBattle then
SendStat(siGameResult, loc("The Green Bananas lost, try again!"))
- SendStat(siCustomAchievement, loc("You have to eliminate all the visible enemies"))
- SendStat(siCustomAchievement, loc("5 additional enemies will be spawned during the game"))
- SendStat(siCustomAchievement, loc("You are in control of all the active ally units"))
- SendStat(siCustomAchievement, loc("The ally units share their ammo"))
- SendStat(siCustomAchievement, loc("Try to keep as many allies alive as possible"))
+ SendStat(siCustomAchievement, loc("You have to eliminate all the visible enemies."))
+ SendStat(siCustomAchievement, loc("5 additional enemies will be spawned during the game."))
+ SendStat(siCustomAchievement, loc("You are in control of all the active ally units."))
+ SendStat(siCustomAchievement, loc("The ally units share their ammo."))
+ SendStat(siCustomAchievement, loc("Try to keep as many allies alive as possible."))
else
SendStat(siGameResult, loc("Hog Solo couldn't escape, try again!"))
- SendStat(siCustomAchievement, loc("You have to get to the left-most land and remove any enemy hog from there"))
- SendStat(siCustomAchievement, loc("You will play every 3 turns"))
- SendStat(siCustomAchievement, loc("Green hogs won't intentionally hurt you"))
+ SendStat(siCustomAchievement, loc("You have to get to the left-most land and remove any enemy hog from there."))
+ SendStat(siCustomAchievement, loc("You will play every 3 turns."))
+ SendStat(siCustomAchievement, loc("Green hogs won't intentionally hurt you."))
end
SendStat(siPlayerKills,'1',teamC.name)
SendStat(siPlayerKills,'0',teamA.name)
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit02.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit02.lua Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit02.lua Thu Apr 28 21:15:08 2016 +0200
@@ -398,13 +398,13 @@
function heroDeath(gear)
if not ended then
SendStat(siGameResult, loc("Hog Solo lost, try again!"))
- SendStat(siCustomAchievement, loc("To win the game, Hog Solo has to get the bottom crates and come back to the surface"))
- SendStat(siCustomAchievement, loc("You can use the other 2 hogs to assist you"))
- SendStat(siCustomAchievement, loc("Do not destroy the crates"))
+ SendStat(siCustomAchievement, loc("To win the game, Hog Solo has to get the bottom crates and come back to the surface."))
+ SendStat(siCustomAchievement, loc("You can use the other 2 hogs to assist you."))
+ SendStat(siCustomAchievement, loc("Do not destroy the crates!"))
if tookPartInBattle then
- SendStat(siCustomAchievement, loc("You'll have to eliminate the Strawberry Assassins at the end"))
+ SendStat(siCustomAchievement, loc("You'll have to eliminate the Strawberry Assassins at the end."))
else
- SendStat(siCustomAchievement, loc("You'll have to eliminate Captain Lime at the end"))
+ SendStat(siCustomAchievement, loc("You'll have to eliminate Captain Lime at the end."))
SendStat(siCustomAchievement, loc("Don't eliminate Captain Lime before collecting the last crate!"))
end
SendStat(siPlayerKills,'0',teamA.name)
@@ -455,8 +455,8 @@
-- hero win in scenario of escape in 1st part
saveCompletedStatus(3)
SendStat(siGameResult, loc("Congratulations, you won!"))
- SendStat(siCustomAchievement, loc("You retrieved the lost part"))
- SendStat(siCustomAchievement, loc("You defended yourself against Captain Lime"))
+ SendStat(siCustomAchievement, loc("You retrieved the lost part."))
+ SendStat(siCustomAchievement, loc("You defended yourself against Captain Lime."))
SendStat(siPlayerKills,'1',teamA.name)
SendStat(siPlayerKills,'0',teamB.name)
EndGame()
@@ -466,8 +466,8 @@
-- hero win in battle scenario
saveCompletedStatus(3)
SendStat(siGameResult, loc("Congratulations, you won!"))
- SendStat(siCustomAchievement, loc("You retrieved the lost part"))
- SendStat(siCustomAchievement, loc("You defended yourself against Strawberry Assassins"))
+ SendStat(siCustomAchievement, loc("You retrieved the lost part."))
+ SendStat(siCustomAchievement, loc("You defended yourself against the Strawberry Assassins."))
SendStat(siPlayerKills,'1',teamA.name)
SendStat(siPlayerKills,'0',teamC.name)
EndGame()
@@ -502,7 +502,7 @@
-- DIALOG 01 - Start, Captain Lime helps Hog Solo because he took part in the battle
AddSkipFunction(dialog01, Skipanim, {dialog01})
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
- table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere else on the planet of fruits Captain Lime helps Hog Solo..."), 5000}})
+ table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere else on the planet of fruits, Captain Lime helps Hog Solo"), 5000}})
table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("You fought bravely and you helped us win this battle!"), SAY_SAY, 5000}})
table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("So, as promised I have brought you where I think that the device you are looking for is hidden."), SAY_SAY, 7000}})
table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("I know that your resources are low due to the battle but I'll send two of my best hogs to assist you."), SAY_SAY, 7000}})
@@ -512,23 +512,23 @@
-- DIALOG02 - Start, Hog Solo escaped from the previous battle
AddSkipFunction(dialog02, Skipanim, {dialog02})
table.insert(dialog02, {func = AnimWait, args = {hero.gear, 3000}})
- table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("Somewhere else on the planet of fruits Hog Solo gets closer to the device..."), 5000}})
- table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("You are the one who fled! So, you are alive..."), SAY_SAY, 4000}})
- table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("I'm still low on hogs. If you are not afraid I could use a set of extra hands"), SAY_SAY, 4000}})
+ table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("Somewhere else on the planet of fruits Hog Solo gets closer to the device"), 5000}})
+ table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("You are the one who fled! So, you are alive."), SAY_SAY, 4000}})
+ table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("I'm still low on hogs. If you are not afraid I could use a set of extra hands."), SAY_SAY, 4000}})
table.insert(dialog02, {func = AnimWait, args = {hero.gear, 8000}})
- table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("I am sorry but I was looking for a device that may be hidden somewhere around here"), SAY_SAY, 4500}})
+ table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("I am sorry but I was looking for a device that may be hidden somewhere around here."), SAY_SAY, 4500}})
table.insert(dialog02, {func = AnimWait, args = {green1.gear, 12500}})
table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("Many long forgotten things can be found in the same tunnels that we are about to explore!"), SAY_SAY, 7000}})
- table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("If you help us you can keep the device if you find it but we'll keep everything else"), SAY_SAY, 7000}})
+ table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("If you help us you can keep the device if you find it but we'll keep everything else."), SAY_SAY, 7000}})
table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("What do you say? Are you in?"), SAY_SAY, 3000}})
table.insert(dialog02, {func = AnimWait, args = {hero.gear, 1800}})
- table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("Ok then!"), SAY_SAY, 2000}})
+ table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("Okay then!"), SAY_SAY, 2000}})
table.insert(dialog02, {func = AnimSwitchHog, args = {hero.gear}})
-- DIALOG03 - At crates, hero learns that Captain Lime is bad
AddSkipFunction(dialog03, Skipanim, {dialog03})
table.insert(dialog03, {func = AnimWait, args = {hero.gear, 4000}})
table.insert(dialog03, {func = FollowGear, args = {hero.gear}})
- table.insert(dialog03, {func = AnimSay, args = {hero.gear, loc("Hoorah! I've found it, now I have to get back to Captain Lime!"), SAY_SAY, 4000}})
+ table.insert(dialog03, {func = AnimSay, args = {hero.gear, loc("Hooray! I've found it, now I have to get back to Captain Lime!"), SAY_SAY, 4000}})
table.insert(dialog03, {func = AnimWait, args = {green1.gear, 4000}})
table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("This Hog Solo is so naive! When he returns I'll shoot him and keep that device for myself!"), SAY_THINK, 4000}})
table.insert(dialog03, {func = goToThesurface, args = {hero.gear}})
@@ -536,7 +536,7 @@
AddSkipFunction(dialog04, Skipanim, {dialog04})
table.insert(dialog04, {func = AnimWait, args = {hero.gear, 4000}})
table.insert(dialog04, {func = FollowGear, args = {hero.gear}})
- table.insert(dialog04, {func = AnimSay, args = {hero.gear, loc("Hoorah! I've found it, now I have to get back to Captain Lime!"), SAY_SAY, 4000}})
+ table.insert(dialog04, {func = AnimSay, args = {hero.gear, loc("Hooray! I've found it, now I have to get back to Captain Lime!"), SAY_SAY, 4000}})
table.insert(dialog04, {func = AnimWait, args = {redHedgehogs[1].gear, 4000}})
table.insert(dialog04, {func = AnimSay, args = {redHedgehogs[1].gear, loc("We have spotted the enemy! We'll attack when the enemies start gathering!"), SAY_THINK, 4000}})
table.insert(dialog04, {func = goToThesurface, args = {hero.gear}})
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit03.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit03.lua Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit03.lua Thu Apr 28 21:15:08 2016 +0200
@@ -13,19 +13,19 @@
local missionName = loc("Precise shooting")
local timeLeft = 10000
local lastWeaponUsed = amSniperRifle
-local challengeObjectives = loc("Use your available weapons in order to eliminate the enemies").."|"..
- loc("You can only use the Sniper Rifle or the Watermelon bomb").."|"..
- loc("You'll have only 2 watermelon bombs during the game").."|"..
- loc("You'll get an extra Sniper Rifle every time you kill an enemy hog with a limit of max 4 rifles").."|"..
- loc("You'll get an extra Teleport every time you kill an enemy hog with a limit of max 2 teleports").."|"..
- loc("The first turn will last 25 sec and every other turn 15 sec").."|"..
- loc("If you skip a turn then the turn time left will be added to your next turn").."|"..
- loc("Some parts of the land are indestructible")
+local challengeObjectives = loc("Use your available weapons in order to eliminate the enemies.").."|"..
+ loc("You can only use the sniper rifle or the watermelon bomb.").."|"..
+ loc("You'll have only 2 watermelon bombs during the game.").."|"..
+ loc("You'll get an extra sniper rifle every time you kill an enemy hog with a limit of max 4 rifles.").."|"..
+ loc("You'll get an extra teleport every time you kill an enemy hog with a limit of max 2 teleports.").."|"..
+ loc("The first turn will last 25 sec and every other turn 15 sec.").."|"..
+ loc("If you skip a turn then the turn time left will be added to your next turn.").."|"..
+ loc("Some parts of the land are indestructible.")
-- dialogs
local dialog01 = {}
-- mission objectives
local goals = {
- [dialog01] = {missionName, loc("Challenge Objectives"), challengeObjectives, 1, 4500},
+ [dialog01] = {missionName, loc("Challenge objectives"), challengeObjectives, 1, 4500},
}
-- hogs
local hero = {
@@ -107,7 +107,7 @@
function onGameStart()
AnimWait(hero.gear, 3000)
FollowGear(hero.gear)
- ShowMission(missionName, loc("Challenge Objectives"), challengeObjectives, -amSkip, 0)
+ ShowMission(missionName, loc("Challenge objectives"), challengeObjectives, -amSkip, 0)
AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0)
AddEvent(onHeroWin, {hero.gear}, heroWin, {hero.gear}, 0)
@@ -203,8 +203,8 @@
function heroDeath(gear)
SendStat(siGameResult, loc("Hog Solo lost, try again!"))
- SendStat(siCustomAchievement, loc("You have to eliminate all the enemies"))
- SendStat(siCustomAchievement, loc("Read the Challenge Objectives from within the mission for more details"))
+ SendStat(siCustomAchievement, loc("You have to eliminate all the enemies."))
+ SendStat(siCustomAchievement, loc("Read the challenge objectives from within the mission for more details."))
SendStat(siPlayerKills,'1',teamB.name)
SendStat(siPlayerKills,'0',teamA.name)
EndGame()
@@ -213,8 +213,8 @@
function heroWin(gear)
saveBonus(2, 1)
SendStat(siGameResult, loc("Congratulations, you won!"))
- SendStat(siCustomAchievement, loc("You complete the mission in "..TotalRounds.." rounds"))
- SendStat(siCustomAchievement, loc("You will gain some extra ammo from the crates the next time you play the \"Getting to the device\" mission"))
+ SendStat(siCustomAchievement, string.format(loc("You completed the mission in %d rounds."), TotalRounds))
+ SendStat(siCustomAchievement, loc("You will gain some extra ammo from the crates the next time you play the \"Getting to the device\" mission."))
SendStat(siPlayerKills,'1',teamA.name)
EndGame()
end
@@ -232,13 +232,13 @@
-- DIALOG 01 - Start, game instructions
AddSkipFunction(dialog01, Skipanim, {dialog01})
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
- table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere in the Fruit Planet Hog Solo got lost..."), 5000}})
- table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("...and got ambushed by the Red Strawberries"), 5000}})
+ table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere in the Fruit Planet Hog Solo got lost ..."), 5000}})
+ table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("... and got ambushed by the Red Strawberries"), 5000}})
table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Use your available weapons in order to eliminate the enemies"), 5000}})
- table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("You can only use the Sniper Rifle or the Watermelon bomb"), 5000}})
+ table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("You can only use the sniper rifle or the watermelon bomb"), 5000}})
table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("You'll have only 2 watermelon bombs during the game"), 5000}})
- table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("You'll get an extra Sniper Rifle every time you kill an enemy hog with a limit of max 4 rifles"), 5000}})
- table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("You'll get an extra Teleport every time you kill an enemy hog with a limit of max 2 teleports"), 5000}})
+ table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("You'll get an extra sniper rifle every time you kill an enemy hog with a limit of max 4 rifles"), 5000}})
+ table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("You'll get an extra teleport every time you kill an enemy hog with a limit of max 2 teleports"), 5000}})
table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("The first turn will last 25 sec and every other turn 15 sec"), 5000}})
table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("If you skip the game your time left will be added to your next turn"), 5000}})
table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Some parts of the land are indestructible"), 5000}})
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice01.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice01.lua Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice01.lua Thu Apr 28 21:15:08 2016 +0200
@@ -428,9 +428,9 @@
function heroDeath(gear)
SendStat(siGameResult, loc("Hog Solo lost, try again!"))
- SendStat(siCustomAchievement, loc("To win the game you have to go next to Thanta"))
- SendStat(siCustomAchievement, loc("Most of the time you'll be able to use only the icegun"))
- SendStat(siCustomAchievement, loc("Use the bazooka and the flying saucer to get the icegun"))
+ SendStat(siCustomAchievement, loc("To win the game you have to stand next to Thanta."))
+ SendStat(siCustomAchievement, loc("Most of the time you'll be able to use the icegun only."))
+ SendStat(siCustomAchievement, loc("Use the bazooka and the flying saucer to get the icegun."))
SendStat(siPlayerKills,'1',teamB.name)
SendStat(siPlayerKills,'0',teamC.name)
EndGame()
@@ -454,10 +454,10 @@
function thantaDeath(gear)
SendStat(siGameResult, loc("Hog Solo lost, try again!"))
- SendStat(siCustomAchievement, loc("Noooo, Thanta has to stay alive!"))
- SendStat(siCustomAchievement, loc("To win the game you have to go next to Thanta"))
- SendStat(siCustomAchievement, loc("Most of the time you'll be able to use only the icegun"))
- SendStat(siCustomAchievement, loc("Use the bazooka and the flying saucer to get the icegun"))
+ SendStat(siCustomAchievement, loc("Noo, Thanta has to stay alive!"))
+ SendStat(siCustomAchievement, loc("To win the game you have to go next to Thanta."))
+ SendStat(siCustomAchievement, loc("Most of the time you'll be able to use the icegun only."))
+ SendStat(siCustomAchievement, loc("Use the bazooka and the flying saucer to get the icegun."))
SendStat(siPlayerKills,'1',teamB.name)
SendStat(siPlayerKills,'0',teamC.name)
EndGame()
@@ -490,29 +490,29 @@
-- DIALOG 01 - Start, welcome to moon
AddSkipFunction(dialog01, Skipanim, {dialog01})
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
- table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("On the Ice Planet, where ice rules..."), 5000}})
- table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Finally you are here..."), SAY_SAY, 2000}})
+ table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("On the Ice Planet, where ice rules ..."), 5000}})
+ table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Finally you are here!"), SAY_SAY, 2000}})
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 2000}})
- table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Hi! Nice to meet you"), SAY_SAY, 3000}})
+ table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Hi! Nice to meet you."), SAY_SAY, 3000}})
table.insert(dialog01, {func = AnimWait, args = {ally.gear, 2000}})
- table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Listen carefully! The bandit leader, Thanta, has recently found a very strange device"), SAY_SAY, 4000}})
- table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("He doesn't know it but this device is a part of the anti-gravity device"), SAY_SAY, 2500}})
+ table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Listen carefully! The bandit leader, Thanta, has recently found a very strange device."), SAY_SAY, 4000}})
+ table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("He doesn't know it but this device is a part of the anti-gravity device."), SAY_SAY, 2500}})
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 8000}})
table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Nice, then I should get the part as soon as possible!"), SAY_SAY, 4000}})
table.insert(dialog01, {func = AnimWait, args = {ally.gear, 4000}})
- table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Be careful, your gadgets won't work in the bandit area. You should get an ice gun"), SAY_SAY, 7000}})
+ table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Be careful, your gadgets won't work in the bandit area. You should get an ice gun."), SAY_SAY, 7000}})
table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("There is one below us!"), SAY_SAY, 4000}})
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}})
table.insert(dialog01, {func = AnimSwitchHog, args = {hero.gear}})
-- DIALOG 02 - Hero got to Thant2
AddSkipFunction(dialog02, Skipanim, {dialog02})
table.insert(dialog02, {func = AnimWait, args = {hero.gear, 3000}})
- table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("Congratulations, now you can take Thanta's device part..."), 5000}})
+ table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("Congratulations, now you can take Thanta's device part!"), 5000}})
table.insert(dialog02, {func = AnimSay, args = {bandit1.gear, loc("Oh! Please spare me. You can take all my treasures!"), SAY_SAY, 3000}})
table.insert(dialog02, {func = AnimWait, args = {hero.gear, 5000}})
table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("I just want the strange device you found!"), SAY_SAY, 3000}})
table.insert(dialog02, {func = AnimWait, args = {bandit1.gear, 4000}})
- table.insert(dialog02, {func = AnimSay, args = {bandit1.gear, loc("Here! Take it..."), SAY_SAY, 3000}})
+ table.insert(dialog02, {func = AnimSay, args = {bandit1.gear, loc("Here! Take it!"), SAY_SAY, 3000}})
table.insert(dialog02, {func = actionsOnWin, args = {}})
end
@@ -521,7 +521,7 @@
function actionsOnWin()
saveCompletedStatus(4)
SendStat(siGameResult, loc("Congratulations, you acquired the device part!"))
- SendStat(siCustomAchievement, loc("At the end of the game your health was ")..GetHealth(hero.gear))
+ SendStat(siCustomAchievement, string.format(loc("At the end of the game your health was %d."), GetHealth(hero.gear)))
-- maybe add number of tries for each part?
SendStat(siPlayerKills,'1',teamC.name)
SendStat(siPlayerKills,'0',teamB.name)
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice02.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice02.lua Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice02.lua Thu Apr 28 21:15:08 2016 +0200
@@ -22,7 +22,7 @@
local challengeObjectives = loc("To win the game you have to pass into the rings in time")..
"|"..loc("You'll get extra time in case you need it when you pass a ring").."|"..
loc("Every 2 rings, the ring color will be green and you'll get an extra flying saucer").."|"..
- loc("Use space button twice to change flying saucer while floating in mid-air")
+ loc("Use the attack key twice to change the flying saucer while floating in mid-air")
-- dialogs
local dialog01 = {}
-- mission objectives
@@ -99,7 +99,7 @@
function onGameStart()
AnimWait(hero.gear, 3000)
FollowGear(hero.gear)
- ShowMission(missionName, loc("Challenge Objectives"), challengeObjectives, -amSkip, 0)
+ ShowMission(missionName, loc("Challenge objectives"), challengeObjectives, -amSkip, 0)
AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0)
@@ -138,10 +138,10 @@
totalTime = totalTime / 1000
local saucersLeft = GetAmmoCount(hero.gear, amJetpack)
local saucersUsed = totalSaucers - saucersLeft
- SendStat(siGameResult, loc("Hoorah! You are a champion!"))
- SendStat(siCustomAchievement, loc("You completed the mission in "..totalTime.." seconds"))
- SendStat(siCustomAchievement, loc("You have used "..saucersUsed.." flying saucers"))
- SendStat(siCustomAchievement, loc("You had "..saucersLeft.." more flying saucers left"))
+ SendStat(siGameResult, loc("Hooray! You are a champion!"))
+ SendStat(siCustomAchievement, string.format(loc("You completed the mission in %.3f seconds.", totalTime)))
+ SendStat(siCustomAchievement, string.format(loc("You have used %d flying saucers.", saucersUsed)))
+ SendStat(siCustomAchievement, string.format(loc("You had %d additional flying saucers left"), saucersLeft))
SendStat(siPlayerKills,'1',teamA.name)
EndGame()
end
@@ -188,13 +188,13 @@
-- DIALOG 01 - Start, some story telling
AddSkipFunction(dialog01, Skipanim, {dialog01})
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
- table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("In the Ice Planet flying saucer stadium..."), 5000}})
- table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("This is the Olympic stadium of saucer flying..."), SAY_SAY, 4000}})
+ table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("In the Ice Planet Flying Saucer Stadium ..."), 5000}})
+ table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("This is the Olympic stadium of saucer flying."), SAY_SAY, 4000}})
table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("All the saucer pilots dream to come here one day in order to compete with the best!"), SAY_SAY, 5000}})
- table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Now you have the chance to try and claim the place that you deserve among the best..."), SAY_SAY, 6000}})
- table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Use the saucer and pass through the rings..."), 5000}})
+ table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Now you have the chance to try and claim the place that you deserve among the best."), SAY_SAY, 6000}})
+ table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Use the saucer and pass through the rings."), 5000}})
table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Pause the game by pressing the pause key (default \"P\") for more details"), 5000}})
- table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("... can you do it?"), SAY_SAY, 2000}})
+ table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Can you do it?"), SAY_SAY, 2000}})
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}})
table.insert(dialog01, {func = startFlying, args = {hero.gear}})
end
@@ -260,10 +260,10 @@
function heroLost()
SendStat(siGameResult, loc("Oh man! Learn how to fly!"))
- SendStat(siCustomAchievement, loc("To win the game you have to pass into the rings in time"))
- SendStat(siCustomAchievement, loc("You'll get extra time in case you need it when you pass a ring"))
- SendStat(siCustomAchievement, loc("Every 2 rings you'll get extra flying saucers"))
- SendStat(siCustomAchievement, loc("Use space button twice to change flying saucer while being on air"))
+ SendStat(siCustomAchievement, loc("To win the game you have to pass into the rings in time."))
+ SendStat(siCustomAchievement, loc("You'll get extra time in case you need it when you pass a ring."))
+ SendStat(siCustomAchievement, loc("Every 2 rings you'll get extra flying saucers."))
+ SendStat(siCustomAchievement, loc("Use the attack key twice to change the flying saucer while being in air."))
SendStat(siPlayerKills,'0',teamA.name)
EndGame()
end
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua Thu Apr 28 21:15:08 2016 +0200
@@ -330,7 +330,7 @@
function heroDeath(gear)
SendStat(siGameResult, loc("Hog Solo lost, try again!"))
- SendStat(siCustomAchievement, loc("You have to get the weapons and rescue the PAotH researchers"))
+ SendStat(siCustomAchievement, loc("You have to get the weapons and rescue the PAotH researchers."))
SendStat(siPlayerKills,'1',teamC.name)
SendStat(siPlayerKills,'0',teamD.name)
EndGame()
@@ -348,7 +348,7 @@
function professorHit(gear)
if currentHedgehog ~= hero.gear then
- AnimSay(professor.gear,loc("Don't hit me you fools!"), SAY_SHOUT, 2000)
+ AnimSay(professor.gear,loc("Don't hit me, you fools!"), SAY_SHOUT, 2000)
end
end
@@ -366,8 +366,8 @@
saveCompletedStatus(1)
SendStat(siGameResult, loc("Hog Solo wins, congratulations!"))
- SendStat(siCustomAchievement, loc("Eliminated the Professor Hogevil"))
- SendStat(siCustomAchievement, loc("Drove the minions away"))
+ SendStat(siCustomAchievement, loc("You have eliminated Professor Hogevil."))
+ SendStat(siCustomAchievement, loc("You drove the minions away."))
SendStat(siPlayerKills,'1',teamD.name)
SendStat(siPlayerKills,'0',teamC.name)
SaveCampaignVar("CosmosCheckPoint", "5") -- hero got fuels
@@ -383,8 +383,8 @@
saveCompletedStatus(1)
SendStat(siGameResult, loc("Congratulations, you won!"))
- SendStat(siCustomAchievement, loc("Eliminated the evil minions"))
- SendStat(siCustomAchievement, loc("Drove the Professor away"))
+ SendStat(siCustomAchievement, loc("You have eliminated the evil minions."))
+ SendStat(siCustomAchievement, loc("You drove Professor Hogevil away."))
SendStat(siPlayerKills,'1',teamD.name)
SendStat(siPlayerKills,'0',teamC.name)
SaveCampaignVar("CosmosCheckPoint", "5") -- hero got fuels
@@ -410,36 +410,36 @@
-- DIALOG 01 - Start, welcome to moon
AddSkipFunction(dialog01, Skipanim, {dialog01})
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
- table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Near PAotH base at moon..."), 4000}})
- table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("Hey Hog Solo! Finally you have come..."), SAY_SAY, 2000}})
+ table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Near a PAotH base on the moon ..."), 4000}})
+ table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("Hey, Hog Solo! Finally you have come!"), SAY_SAY, 2000}})
table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("It seems that Professor Hogevil has prepared for your arrival!"), SAY_SAY, 4000}})
table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("He has captured the rest of the PAotH team and awaits to capture you!"), SAY_SAY, 5000}})
table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("We have to hurry! Are you armed?"), SAY_SAY, 4300}})
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 450}})
- table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("No, I am afraid I had to travel light"), SAY_SAY, 2500}})
+ table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("No, I am afraid I had to travel light."), SAY_SAY, 2500}})
table.insert(dialog01, {func = AnimWait, args = {paoth1.gear, 3200}})
- table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("Ok, then you have to go and take some of the weapons we have hidden in case of an emergency!"), SAY_SAY, 7000}})
+ table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("Okay, then you have to go and take some of the weapons we have hidden in case of an emergency!"), SAY_SAY, 7000}})
table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("They are up there! Take this rope and hurry!"), SAY_SAY, 7000}})
- table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Ehm... ok..."), SAY_SAY, 2500}})
+ table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Ehm, okay ..."), SAY_SAY, 2500}})
table.insert(dialog01, {func = AnimSwitchHog, args = {hero.gear}})
-- DIALOG 02 - To the weapons platform
AddSkipFunction(dialog02, Skipanim, {dialog02})
table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("Checkpoint reached!"), 4000}})
- table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("I've made it! YEAAAAAH!"), SAY_SHOUT, 4000}})
+ table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("I've made it! Yeah!"), SAY_SHOUT, 4000}})
table.insert(dialog02, {func = AnimSay, args = {paoth1.gear, loc("Nice! Now hurry and get down! You have to rescue my friends!"), SAY_SHOUT, 7000}})
table.insert(dialog02, {func = setAfterDialog02, args = {}})
table.insert(dialog02, {func = AnimSwitchHog, args = {hero.gear}})
-- DIALOG 03 - Hero spotted and has no weapons
AddSkipFunction(dialog03, Skipanim, {dialog03})
table.insert(dialog03, {func = AnimCaption, args = {hero.gear, loc("Get ready to fight!"), 4000}})
- table.insert(dialog03, {func = AnimSay, args = {minion1.gear, loc("Look boss! There is the target!"), SAY_SHOUT, 4000}})
+ table.insert(dialog03, {func = AnimSay, args = {minion1.gear, loc("Look, boss! There is the target!"), SAY_SHOUT, 4000}})
table.insert(dialog03, {func = AnimSay, args = {professor.gear, loc("Prepare for battle!"), SAY_SHOUT, 4000}})
table.insert(dialog03, {func = AnimSay, args = {hero.gear, loc("Oops, I've been spotted and I have no weapons! I am doomed!"), SAY_THINK, 4000}})
table.insert(dialog03, {func = startCombat, args = {hero.gear}})
-- DIALOG 04 - Hero spotted and *HAS* weapons
AddSkipFunction(dialog04, Skipanim, {dialog04})
table.insert(dialog04, {func = AnimCaption, args = {hero.gear, loc("Get ready to fight!"), 4000}})
- table.insert(dialog04, {func = AnimSay, args = {minion1.gear, loc("Look boss! There is the target!"), SAY_SHOUT, 4000}})
+ table.insert(dialog04, {func = AnimSay, args = {minion1.gear, loc("Look, boss! There is the target!"), SAY_SHOUT, 4000}})
table.insert(dialog04, {func = AnimSay, args = {professor.gear, loc("Prepare for battle!"), SAY_SHOUT, 4000}})
table.insert(dialog04, {func = AnimSay, args = {hero.gear, loc("Here we go!"), SAY_THINK, 4000}})
table.insert(dialog04, {func = startCombat, args = {hero.gear}})
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon02.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon02.lua Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon02.lua Thu Apr 28 21:15:08 2016 +0200
@@ -20,7 +20,7 @@
local dialog02 = {}
-- mission objectives
local goals = {
- [dialog01] = {missionName, loc("Challenge Objectives"), challengeObjectives, 1, 4500},
+ [dialog01] = {missionName, loc("Challenge objectives"), challengeObjectives, 1, 4500},
}
-- hogs
local hero = {
@@ -79,7 +79,7 @@
function onGameStart()
AnimWait(hero.gear, 3000)
FollowGear(hero.gear)
- ShowMission(missionName, loc("Challenge Objectives"), challengeObjectives, -amSkip, 0)
+ ShowMission(missionName, loc("Challenge objectives"), challengeObjectives, -amSkip, 0)
AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0)
@@ -158,10 +158,10 @@
-- DIALOG 01 - Start, game instructions
AddSkipFunction(dialog01, Skipanim, {dialog01})
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3200}})
- table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("On the other side of the moon..."), 5000}})
- table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("So you are interested in Professor Hogevil"), SAY_SAY, 3000}})
- table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("We'll play a game first"), SAY_SAY, 3000}})
- table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("I'll let you know whatever I know about him if you manage to catch me 3 times"), SAY_SAY, 4000}})
+ table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("On the other side of the moon ..."), 5000}})
+ table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("So you are interested in Professor Hogevil, huh?"), SAY_SAY, 3000}})
+ table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("We'll play a game first."), SAY_SAY, 3000}})
+ table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("I'll let you know whatever I know about him if you manage to catch me 3 times."), SAY_SAY, 4000}})
table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("Let's go!"), SAY_SAY, 2000}})
table.insert(dialog01, {func = moveRunner, args = {}})
-- DIALOG 02 - Hog Solo story
@@ -169,14 +169,14 @@
table.insert(dialog02, {func = AnimWait, args = {hero.gear, 3200}})
table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("The truth about Professor Hogevil"), 5000}})
table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("Amazing! I was never beaten in a race before!"), SAY_SAY, 4000}})
- table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("So, let me tell you what I know about Professor Hogevil..."), SAY_SAY, 4000}})
- table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("Professor Hogevil, then known as James Hogus, worked for PAotH back in my time"), SAY_SAY, 4000}})
- table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("He was the lab assistant of Dr. Goodhogan, the inventor of the anti-gravity device"), SAY_SAY, 5000}})
- table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("During the final testing of the device an accident happened"), SAY_SAY, 5000}})
- table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("In this accident Professor Hogevil lost all his spines on his head!"), SAY_SAY, 5000}})
- table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("That's why he always wears a hat since then"), SAY_SAY, 4000}})
- table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("After that incident he went underground and started working on his plan to steal the device"), SAY_SAY, 5000}})
- table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("He is a very tough and very determined hedgehog. I would be extremely careful if I were you"), SAY_SAY, 5000}})
+ table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("So, let me tell you what I know about Professor Hogevil."), SAY_SAY, 4000}})
+ table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("Professor Hogevil, then known as James Hogus, worked for PAotH back in my time."), SAY_SAY, 4000}})
+ table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("He was the lab assistant of Dr. Goodhogan, the inventor of the anti-gravity device."), SAY_SAY, 5000}})
+ table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("During the final testing of the device an accident happened."), SAY_SAY, 5000}})
+ table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("In this accident, Professor Hogevil lost all his spines on his head!"), SAY_SAY, 5000}})
+ table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("That's why he always wears a hat since then."), SAY_SAY, 4000}})
+ table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("After that incident he went underground and started working on his plan to steal the device."), SAY_SAY, 5000}})
+ table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("He is a very tough and very determined hedgehog. I would be extremely careful if I were you."), SAY_SAY, 5000}})
table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("I should go now, goodbye!"), SAY_SAY, 3000}})
table.insert(dialog02, {func = win, args = {}})
end
@@ -208,8 +208,8 @@
if currentPosition ~= 1 then
PlaySound(sndVictory)
if currentPosition > 1 and currentPosition < 4 then
- AnimCaption(hero.gear, loc("Go get him again"), 3000)
- AnimSay(runner.gear, loc("You got me"), SAY_SAY, 3000)
+ AnimCaption(hero.gear, loc("Go, get him again!"), 3000)
+ AnimSay(runner.gear, loc("You got me!"), SAY_SAY, 3000)
end
previousTimeLeft = TurnTimeLeft
end
@@ -221,18 +221,18 @@
end
function lose()
- SendStat(siGameResult, loc("Too slow! Try again..."))
- SendStat(siCustomAchievement, loc("You have to catch the other hog 3 times"))
- SendStat(siCustomAchievement, loc("The time that you have left when you reach the blue hedgehog will be added to the next turn"))
- SendStat(siCustomAchievement, loc("Each turn you'll have only one rope to use"))
- SendStat(siCustomAchievement, loc("You'll lose if you die or if your time is up"))
+ SendStat(siGameResult, loc("Too slow! Try again ..."))
+ SendStat(siCustomAchievement, loc("You have to catch the other hog 3 times."))
+ SendStat(siCustomAchievement, loc("The time that you have left when you reach the blue hedgehog will be added to the next turn."))
+ SendStat(siCustomAchievement, loc("Each turn you'll have only one rope to use."))
+ SendStat(siCustomAchievement, loc("You'll lose if you die or if your time is up."))
SendStat(siPlayerKills,'0',teamA.name)
EndGame()
end
function win()
SendStat(siGameResult, loc("Congratulations, you are the fastest!"))
- SendStat(siCustomAchievement, loc("You have managed to catch the blue hedgehog in time"))
+ SendStat(siCustomAchievement, loc("You have managed to catch the blue hedgehog in time."))
SendStat(siPlayerKills,'1',teamA.name)
EndGame()
end
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Missions/Training/User_Mission_-_RCPlane_Challenge.lua
--- a/share/hedgewars/Data/Missions/Training/User_Mission_-_RCPlane_Challenge.lua Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Missions/Training/User_Mission_-_RCPlane_Challenge.lua Thu Apr 28 21:15:08 2016 +0200
@@ -487,4 +487,8 @@
function onAmmoStoreInit()
SetAmmo(amRCPlane, 9, 0, 0, 0)
-end
\ No newline at end of file
+end
+
+function onNewTurn()
+ SetWeapon(amRCPlane)
+end
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Missions/Training/User_Mission_-_Rope_Knock_Challenge.lua
--- a/share/hedgewars/Data/Missions/Training/User_Mission_-_Rope_Knock_Challenge.lua Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Missions/Training/User_Mission_-_Rope_Knock_Challenge.lua Thu Apr 28 21:15:08 2016 +0200
@@ -4,6 +4,7 @@
local missionWon = nil
local endTimer = 1000
local hogsKilled = 0
+local finishTime
local HogData = {
{"Bufon", "ShaggyYeti",false},
@@ -57,21 +58,33 @@
}
function GenericEnd()
- DismissTeam(loc("Wannabe Shoppsta"))
- DismissTeam(loc("Unsuspecting Louts"))
- DismissTeam(loc("Unlucky Sods"))
+ EndGame()
end
function GameOverMan()
missionWon = false
- ShowMission(loc("ROPE-KNOCKING"), loc("MISSION FAILED"), loc("Oh no! Just try again!"), -amSkip, 0)
+ ShowMission(loc("Rope-knocking Challenge"), loc("Challenge over!"), loc("Oh no! Just try again!"), -amSkip, 0)
+ SendStat(siGameResult, loc("Challenge over!"))
+ local score = math.ceil((hogsKilled / 16)*6000)
+ SendStat(siCustomAchievement, string.format(loc("You have killed %d of 16 hedgehogs (+%d points)."), hogsKilled, score))
+ SendStat(siPointType, "points")
+ SendStat(siPlayerKills, tostring(score), loc("Wannabe Shoppsta"))
PlaySound(sndHellish)
end
function GG()
missionWon = true
- ShowMission(loc("ROPE-KNOCKING"), loc("MISSION SUCCESS"), loc("Congratulations!") .. "|" .. loc("COMPLETION TIME") .. ": " .. (TurnTime - TurnTimeLeft) / 1000, 0, 0)
+ local completeTime = (TurnTime - finishTime) / 1000
+ ShowMission(loc("Rope-knocking Challenge"), loc("Challenge completed!"), loc("Congratulations!") .. "|" .. string.format(loc("Completion time: %.2fs"), completeTime), 0, 0)
PlaySound(sndHomerun)
+ SendStat(siGameResult, loc("Challenge completed!"))
+ local hogScore = math.ceil((hogsKilled / 16)*6000)
+ local timeScore = math.ceil((finishTime/TurnTime)*6000)
+ local score = hogScore + timeScore
+ SendStat(siCustomAchievement, string.format(loc("You have killed %d of 16 hedgehogs (+%d points)."), hogsKilled, hogScore))
+ SendStat(siCustomAchievement, string.format(loc("You have completed this challenge in %.2f s (+%d points)."), completeTime, timeScore))
+ SendStat(siPointType, "points")
+ SendStat(siPlayerKills, tostring(score), loc("Wannabe Shoppsta"))
end
function AssignCharacter(p)
@@ -114,16 +127,16 @@
MinesNum = 0
Explosives = 0
- AddTeam(loc("Wannabe Shoppsta"), 1175851, "Simple", "Island", "Default", "Hedgewars")
+ AddTeam(loc("Wannabe Shoppsta"), 0x11F12B, "Simple", "Island", "Default", "cm_shoppa")
hhs[0] = AddHog(loc("Ace"), 0, 1, "Gasmask")
SetGearPosition(player, 1380, 1500)
- AddTeam(loc("Unsuspecting Louts"), 14483456, "Simple", "Island", "Default", "Hedgewars")
+ AddTeam(loc("Unsuspecting Louts"), 0xDD0000, "Simple", "Island", "Default", "cm_face")
for i = 1, 8 do
hhs[i] = AddHog("generic", 0, 1, "NoHat")
end
- AddTeam(loc("Unlucky Sods"), 14483456, "Simple", "Island", "Default", "Hedgewars")
+ AddTeam(loc("Unlucky Sods"), 0xDD0000, "Simple", "Island", "Default", "cm_balrog")
for i = 9, 16 do
hhs[i] = AddHog("generic", 0, 1, "NoHat")
end
@@ -133,14 +146,16 @@
function onGameStart()
+ SendHealthStatsOff()
ShowMission (
- loc("ROPE-KNOCKING"),
- loc("a Hedgewars challenge"),
+ loc("Rope-knocking Challenge"),
+ loc("Challenge"),
loc("Use the rope to knock your enemies to their doom.") .. "|" ..
+ loc("Finish this challenge as fast as possible to earn bonus points."),
+ -amRope, 4000)
- "", -amRope, 4000
- )
+ PlaceGirder(46,1783, 0)
SetGearPosition(hhs[0], 2419, 1769)
SetGearPosition(hhs[1], 3350, 570)
@@ -180,9 +195,9 @@
end
if missionWon == true then
- AddCaption(loc("GG!"), 0xffba00ff,capgrpGameState)
+ AddCaption(loc("Victory!"), 0xFFFFFFFF,capgrpGameState)
else
- AddCaption(loc("Ouch!"), 0xffba00ff,capgrpGameState)
+ AddCaption(loc("Challenge over!"), 0xFFFFFFFF,capgrpGameState)
end
end
@@ -191,16 +206,18 @@
function onGearDamage(gear, damage)
- if gear ~= hhs[0] then
+ if gear ~= hhs[0] and GetGearType(gear) == gtHedgehog then
AddVisualGear(GetX(gear), GetY(gear), vgtBigExplosion, 0, false)
DeleteGear(gear)
PlaySound(sndExplosion)
+ AddCaption(string.format(knockTaunt(), GetHogName(gear)), 0xFFFFFFFF, capgrpMessage)
hogsKilled = hogsKilled +1
if hogsKilled == 15 then
PlaySound(sndRideOfTheValkyries)
elseif hogsKilled == 16 then
+ finishTime = TurnTimeLeft
GG()
end
@@ -208,6 +225,37 @@
end
+function knockTaunt()
+ local r = math.random(0,23)
+ local taunt
+ if r == 0 then taunt = loc("%s has been knocked out.")
+ elseif r == 1 then taunt = loc("%s hit the ground.")
+ elseif r == 2 then taunt = loc("%s splatted.")
+ elseif r == 3 then taunt = loc("%s was smashed.")
+ elseif r == 4 then taunt = loc("%s felt unstable.")
+ elseif r == 5 then taunt = loc("%s exploded.")
+ elseif r == 6 then taunt = loc("%s fell from a high cliff.")
+ elseif r == 7 then taunt = loc("%s goes the way of the lemming.")
+ elseif r == 8 then taunt = loc("%s was knocked away.")
+ elseif r == 9 then taunt = loc("%s was really unlucky.")
+ elseif r == 10 then taunt = loc("%s felt victim to rope-knocking.")
+ elseif r == 11 then taunt = loc("%s had no chance.")
+ elseif r == 12 then taunt = loc("%s was a good target.")
+ elseif r == 13 then taunt = loc("%s spawned at a really bad position.")
+ elseif r == 14 then taunt = loc("%s was doomed from the beginning.")
+ elseif r == 15 then taunt = loc("%s has fallen victim to gravity.")
+ elseif r == 16 then taunt = loc("%s hates Newton.") -- Isaac Newton
+ elseif r == 17 then taunt = loc("%s had it coming.")
+ elseif r == 18 then taunt = loc("%s is eliminated!")
+ elseif r == 19 then taunt = loc("%s fell too fast.")
+ elseif r == 20 then taunt = loc("%s flew like a rock.")
+ elseif r == 21 then taunt = loc("%s stumpled.")
+ elseif r == 22 then taunt = loc("%s was shoved away.")
+ elseif r == 23 then taunt = loc("%s didn't expect that.")
+ end
+ return taunt
+end
+
function onGearDelete(gear)
if (gear == hhs[0]) and (missionWon == nil) then
@@ -219,3 +267,7 @@
function onAmmoStoreInit()
SetAmmo(amRope, 9, 0, 0, 0)
end
+
+function onNewTurn()
+ SetWeapon(amRope)
+end
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Missions/Training/portal.lua
--- a/share/hedgewars/Data/Missions/Training/portal.lua Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Missions/Training/portal.lua Thu Apr 28 21:15:08 2016 +0200
@@ -2,13 +2,13 @@
HedgewarsScriptLoad("/Scripts/Utils.lua")
local MineArray = {}
-local player
+local player
local adviceGiven = false
local adviceGiven2 = false
function onGameInit()
Seed = 0 -- The base number for the random number generator
- GameFlags = gfInfAttack +gfBorder +gfDisableWind +gfSolidLand
+ GameFlags = gfInfAttack +gfBorder +gfDisableWind +gfSolidLand
TurnTime = 1500000 -- The time the player has to move each round (in ms)
CaseFreq = 0 -- The frequency of crate drops
MinesNum = 0 -- The number of mines being placed
@@ -16,32 +16,32 @@
Delay = 10 -- The delay between each round
Map = "portal" -- The map to be played
Theme = "Hell" -- The theme to be used
- Goals = loc("Use the portal to move fast and far, use it to kill, use it with caution!") --the goal ...
-
-
-----AddTeam(teamname, color, grave, fort, voicepack, flag)--
- AddTeam(loc("Subject"), 14483406, "Simple", "Island", "Default", "cm_star")
- player = AddHog(loc("player"), 0, 10, "Terminator_Glasses")
+ -- Disable Sudden Death
+ HealthDecrease = 0
+ WaterRise = 0
+
+ AddTeam(loc("Subjects"), 0xFFFF01, "Simple", "Island", "Default", "cm_test")
+ player = AddHog(loc("Subject 1"), 0, 10, "Terminator_Glasses")
- AddTeam(loc("Hell Army"), 1170801, "Simple", "Island", "Default", "cm_galaxy")
- enemy1 = AddHog(loc("Lucifer"), 1, 200, "thinkingcap")
- enemy2 = AddHog(loc("voldemort"), 1, 150, "WizardHat")
- enemy3 = AddHog(loc("zombi"), 1, 100, "zombi")
- enemy4 = AddHog(loc("Predator"), 1, 14, "predator")
- enemy5 = AddHog(loc("oneye"), 1, 50, "cyclops")
- enemy6 = AddHog(loc("razac"), 1, 50, "plaguemask")
+ AddTeam(loc("Hell Army"), 0xFF0402, "skull", "Island", "Default", "cm_hellish")
+ enemy1 = AddHog(loc("Lucifer"), 1, 200, "InfernalHorns")
+ enemy2 = AddHog(loc("Voldemort"), 1, 150, "WizardHat")
+ enemy3 = AddHog(loc("Zombi"), 1, 100, "Zombi")
+ enemy4 = AddHog(loc("Predator"), 1, 14, "anzac")
+ enemy5 = AddHog(loc("Oneye"), 1, 50, "cyclops")
+ enemy6 = AddHog(loc("Razac"), 1, 50, "Evil")
enemy7 = AddHog(loc("C-2"), 1, 50, "cyborg1")
enemy8 = AddHog(loc("Rider"), 1, 50, "scif_SparkssHelmet")
- AddTeam(loc("badmad"), 1170801, "Simple", "Island", "Default", "cm_jupiter")
+ AddTeam(loc("Badmad"), 0xFF0402, "skull", "Island", "Default", "cm_pentagram")
enemy9 = AddHog(loc("C-1"), 1, 50, "cyborg2")
- enemy10 = AddHog(loc("hiden"), 1, 40, "daftpunkguymanuel")
- enemy11 = AddHog(loc("ronald"), 1, 70, "clown")
- enemy12 = AddHog(loc("phosphatoglucidique"), 1, 50, "chef")
- enemy13 = AddHog(loc("Lestat"), 1, 30, "draculakz")
+ enemy10 = AddHog(loc("Hidden"), 1, 40, "bushhider")
+ enemy11 = AddHog(loc("Ronald"), 1, 70, "clown")
+ enemy12 = AddHog(loc("Phosphat"), 1, 50, "chef")
+ enemy13 = AddHog(loc("Lestat"), 1, 30, "vampirichog")
SetGearPosition(player, 350, 1820)
- SetGearPosition(enemy1, 2037, 1313)
+ SetGearPosition(enemy1, 2037, 1313)
SetGearPosition(enemy2, 1369, 1605)
SetGearPosition(enemy3, 1750, 1937)
SetGearPosition(enemy4, 3125, 89)
@@ -55,8 +55,6 @@
SetGearPosition(enemy12, 2666, 950)
SetGearPosition(enemy13, 3306, 1205)
-
-
end
function onAmmoStoreInit()
@@ -80,11 +78,7 @@
function onGameStart()
- SetWind(100)-- SetWind(windSpeed) Sets the current wind in the range of -100 to 100. Use together with gfDisableWind for full control.
- -- -100to0 is to the left, and 0to100 is to the right (of course more its far from 0, more the speed is high
- -- -100.............................0..................................+100
- -- <<<<<<<<--<<--<<<<<<<<<<<<<--<<<<<|||-->>>>>>>>-->>>>>>>>>>>>>>>-->>>>>> = wind direction
-
+ SetWind(100)
MineArray[0] = AddGear(840, 1847, gtMine, 0, 0, 0, 0)
MineArray[1] = AddGear(900, 1847, gtMine, 0, 0, 0, 0)
@@ -124,16 +118,14 @@
MineArray[34] = AddGear(1311, 1785, gtMine, 0, 0, 0, 0)
MineArray[35] = AddGear(4029, 89, gtMine, 0, 0, 0, 120)
- --MineArray[36] = AddGear(3376, 1947, gtMine, 0, 0, 0, 10)
- for i = 0,#MineArray do
- SetTimer(MineArray[i],050)
- SetState(MineArray[i],544)
- end
- --needed this MineArray cause timer didn't work, its was always 3sec, i wanna instant mines
+ for i = 0,#MineArray do
+ SetTimer(MineArray[i],050)
+ SetState(MineArray[i],544)
+ end
+ --needed this MineArray cause timer didn't work, its was always 3sec, i wanna instant mines
-
- --UTILITY CRATE--
+ --UTILITY CRATE--
parachute = SpawnUtilityCrate(1670, 1165, amParachute)
girder = SpawnUtilityCrate(2101, 1297, amGirder)
SpawnUtilityCrate(3965, 625, amBlowTorch)
@@ -144,9 +136,9 @@
SpawnUtilityCrate(130, 600, amPickHammer)
SpawnUtilityCrate(1660,1820, amLaserSight)
SpawnUtilityCrate(4070,1840, amLaserSight)
-
-
- --AMMO CRATE--
+
+
+ --AMMO CRATE--
portalgun = SpawnAmmoCrate(505, 1943, amPortalGun, 1000)
extratime = SpawnAmmoCrate(4020, 785, amExtraTime, 2)
SpawnAmmoCrate(425, 613, amSnowball)
@@ -159,77 +151,55 @@
SpawnAmmoCrate(2900, 1400, amRope)
SpawnAmmoCrate(4025, 1117, amFirePunch)
-
- --HEALTH CRATE--
+ --HEALTH CRATE--
SpawnHealthCrate(2000, 780)
-
- --GIRDER--
+
+ --GIRDER--
PlaceGirder(3363, 1323, 4)
-
- ShowMission (loc("Portal mission"), loc("training"), "", -amPortalGun, 5000)
- HogSay(player, loc("I should get myself a portal gun, maybe this crate has one"), SAY_THINK)
-
-
-
+ ShowMission (loc("Portal Mind Challenge"), loc("Mission"),
+ loc("Defeat all enemies!") .. "|" .. loc("In this mission you have infinite time."),
+ -amPortalGun, 5000)
+ HogSay(player, loc("I should get myself a portal device, maybe this crate has one."), SAY_THINK)
end
function onGameTick()
- if (player ~= nil) then
+ if (player ~= nil) then
if (gearIsInBox(player, 1650, 1907, 200, 60) and (adviceGiven == false)) then
adviceGiven = true
- HogSay(player, loc("Hmmm, I'll have to find some way of moving him off this anti-portal surface..."), SAY_THINK)
+ HogSay(player, loc("Hmmm, I’ll have to find some way of moving him off this anti-portal surface."), SAY_THINK)
elseif (gearIsInBox(player, 2960, 790, 200, 60) and (adviceGiven2 == false)) then
adviceGiven2 = true
- HogSay(player, loc("The anti-portal zone is all over the floor, and I have nothing to kill him...Droping something could hurt him enough to kill him..."), SAY_THINK)
- end
- end
-
+ HogSay(player, loc("The anti-portal surface is all over the floor, and I have nothing to kill him. Dropping something could hurt him enough to kill him."), SAY_THINK)
+ end
end
-
-
-
-
-function onNewturn()
-end
-
-
-function onGearAdd(gear)
end
function onGearDelete(gear)
+ -- Check gear collection
+ if CurrentHedgehog == player and (band(GetGearMessage(gear), gmDestroy) ~= 0) then
+ if gear == portalgun then
+ HogSay(player, loc("Great! Let’s kill all these enemies, using portals."), SAY_THINK)
+ end
- if gear == portalgun then
- --AddAmmo(player, amPortalGun, 10000)
- HogSay(player, loc("GREAT ! Let's kill all this enemies, using portals"), SAY_THINK)
+ if gear == girder then
+ HogSay(player, loc("This will be useful when I need a new platform or if I want to rise."), SAY_THINK)
+ end
+
+ if gear == parachute then
+ HogSay(player, loc("You can’t open a portal on the blue surface."), SAY_THINK)
+ end
+
+ if gear == extratime then
+ HogSay(player, loc("What?! For all this struggle I just win some ... time? Oh dear!"), SAY_SHOUT)
+ end
end
- if gear == girder then
- HogSay(player, loc("Will be useful if I need a new plateform or if I want to rise...."), SAY_THINK)
- end
-
- if gear == parachute then
- HogSay(player, loc("You can't fire a portal on the blue surface"), SAY_THINK)
+ if gear == player then
+ player = nil
end
---if you wanted to check for collection only
---you could probably say
---if (gear == myParachuteGear) and (band(GetGearMessage(gear), gmDestroy) ~= 0) then
-
- if gear == extratime then
- HogSay(player, loc(" What !! For all of this struggle i just win some ... TIME o0"), SAY_SHOUT)
- end
-
-
- if gear == player then
- player = nil
- end
end
-
-
-
-
-
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua
--- a/share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua Thu Apr 28 21:15:08 2016 +0200
@@ -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 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Scripts/Multiplayer/Racer.lua
--- a/share/hedgewars/Data/Scripts/Multiplayer/Racer.lua Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Racer.lua Thu Apr 28 21:15:08 2016 +0200
@@ -1,6 +1,6 @@
------------------------------------------
--- RACER 0.6
+-- RACER 0.8
-- map-independant racing script
-- by mikade
-----------------------------------------
@@ -73,6 +73,11 @@
-- switch to first available weapon if starting race with no weapon selected
+-------
+-- 0.8
+-------
+-- allow different boost directions
+
-----------------------------
-- SCRIPT BEGINS
-----------------------------
@@ -151,6 +156,10 @@
local lastRound
local RoundHasChanged
+local boostX = 0
+local boostY = 0
+local boostValue = 1
+
-------------------
-- general methods
-------------------
@@ -224,6 +233,31 @@
-- RACER METHODS
-----------------
+function onLeft()
+ boostX = boostX +boostValue
+end
+function onLeftUp()
+ boostX = boostX -boostValue
+end
+function onRight()
+ boostX = boostX -boostValue
+end
+function onRightUp()
+ boostX = boostX +boostValue
+end
+function onUp()
+ boostY = boostY +boostValue
+end
+function onUpUp()
+ boostY = boostY -boostValue
+end
+function onDown()
+ boostY = boostY -boostValue
+end
+function onDownUp()
+ boostY = boostY +boostValue
+end
+
function CheckWaypoints()
trackFinished = true
@@ -658,7 +692,7 @@
trackTime = 0
SetGearPosition(CurrentHedgehog, wpX[0], wpY[0])
- AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), gtGrenade, 0, 0, 0, 1)
+ AddGear(GetX(CurrentHedgehog)+boostX, GetY(CurrentHedgehog)+boostY, gtGrenade, 0, 0, 0, 1)
FollowGear(CurrentHedgehog)
HideMission()
diff -r 10860d4bca22 -r abcdb7bc2620 share/hedgewars/Data/Scripts/Tracker.lua
--- a/share/hedgewars/Data/Scripts/Tracker.lua Wed Apr 13 12:17:30 2016 +0200
+++ b/share/hedgewars/Data/Scripts/Tracker.lua Thu Apr 28 21:15:08 2016 +0200
@@ -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