Merge branch 'newbugfixes'

Conflicts:
	data/mp/stats/weapons.txt
	src/Makefile.am
	src/ai.h
master
vexed 2013-12-07 21:26:19 -05:00
commit f29d13b4e8
14 changed files with 887 additions and 1052 deletions

View File

@ -36,6 +36,9 @@ dist_doc_DATA = \
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
# ignore the autorevision.cache file on make distcheck
distcleancheck_listfiles = find . -type f -print | grep -v 'autorevision.cache'
EXTRA_DIST= \ EXTRA_DIST= \
build_tools/autorevision \ build_tools/autorevision \
autogen.sh \ autogen.sh \

View File

@ -16,7 +16,6 @@ usage: ./autorevision {-t output-type | -s symbol} [-o cache-file [-f] ] [-V]
-s symbol = specify symbol output -s symbol = specify symbol output
-o cache-file = specify cache file location -o cache-file = specify cache file location
-f = force the use of cache data -f = force the use of cache data
-U = Check for untracked files in svn
-V = emit version and exit -V = emit version and exit
-? = help message -? = help message
@ -24,26 +23,13 @@ The folowing are valid output types:
h = Header for use with c/c++ h = Header for use with c/c++
xcode = Header useful for populating info.plist files xcode = Header useful for populating info.plist files
sh = Bash sytax sh = Bash sytax
py = Python file
pl = Perl file
lua = Lua file
php = PHP file
ini = INI file
js = javascript file
json = JSON file
java = Java file
javaprop = Java properties file
tex = (La)TeX file
m4 = m4 file
The following are valid symbols: The following are valid symbols:
VCS_TYPE VCS_TYPE
VCS_BASENAME VCS_BASENAME
VCS_NUM
VCS_DATE
VCS_BRANCH VCS_BRANCH
VCS_TAG VCS_TAG
VCS_TICK VCS_EXTRA
VCS_FULL_HASH VCS_FULL_HASH
VCS_SHORT_HASH VCS_SHORT_HASH
VCS_WC_MODIFIED VCS_WC_MODIFIED
@ -52,7 +38,7 @@ EOF
} }
# Config # Config
ARVERSION="1.6" ARVERSION="1.7-Warzone"
TARGETFILE="/dev/stdout" TARGETFILE="/dev/stdout"
while getopts ":t:o:s:Vf" OPTION; do while getopts ":t:o:s:Vf" OPTION; do
case "${OPTION}" in case "${OPTION}" in
@ -107,218 +93,22 @@ gitRepo() {
cd "$(git rev-parse --show-toplevel)" cd "$(git rev-parse --show-toplevel)"
VCS_TYPE="git" VCS_TYPE="git"
VCS_BASENAME="$(basename "${PWD}")" VCS_BASENAME="$(basename "${PWD}")"
# Is the working copy clean? # Is the working copy clean?
test -z "$(git status --untracked-files=normal --porcelain)" test -z "$(git status --untracked-files=no --porcelain)"
VCS_WC_MODIFIED="${?}" VCS_WC_MODIFIED="${?}"
# Enumeration of changesets
VCS_NUM="$(git rev-list --count HEAD 2>/dev/null)"
if [ -z "${VCS_NUM}" ]; then
echo "warning: Counting the number of revisions may be slower due to an outdated git version less than 1.7.2.3. If something breaks, please update it." 1>&2
VCS_NUM="$(git rev-list HEAD | wc -l)"
fi
# This may be a git-svn remote. If so, report the Subversion revision.
if [ -z "$(git config svn-remote.svn.url 2>/dev/null)" ]
then
# The full revision hash
VCS_FULL_HASH="$(git rev-parse HEAD)"
# The short hash
VCS_SHORT_HASH="$(echo "${VCS_FULL_HASH}" | cut -b 1-7)"
else
# The git-svn revision number
VCS_FULL_HASH="$(git svn find-rev HEAD)"
VCS_SHORT_HASH="${VCS_FULL_HASH}"
fi
# Current branch
VCS_BRANCH="$(git rev-parse --symbolic-full-name --verify "$(git name-rev --name-only --no-undefined HEAD 2>/dev/null)" 2>/dev/null | sed -e 's:refs/heads/::' | sed -e 's:refs/::')"
# Cache the description
local DESCRIPTION="$(git describe --long --tags 2>/dev/null)"
# Current or last tag ancestor (empty if no tags)
VCS_TAG="$(echo "${DESCRIPTION}" | sed -e "s:-g${VCS_SHORT_HASH}\$::" | sed -e 's:-[0-9]*$::')"
# Distance to last tag or an alias of VCS_NUM if there is no tag
if [ ! -z "${DESCRIPTION}" ]; then
VCS_TICK="$(echo "${DESCRIPTION}" | sed -e "s:${VCS_TAG}-::" -e "s:-g${VCS_SHORT_HASH}::")"
else
VCS_TICK="${VCS_NUM}"
fi
# Date of the current commit
VCS_DATE="$(git log -1 --pretty=format:%ci | sed -e 's: :T:' | sed -e 's: ::')"
}
# For hg repos
hgRepo() {
cd "$(hg root)"
VCS_TYPE="hg"
VCS_BASENAME="$(basename "${PWD}")"
# Is the working copy clean?
test -z "$(hg status -duram)"
VCS_WC_MODIFIED="${?}"
# Enumeration of changesets
VCS_NUM="$(hg id -n | tr -d '+')"
# The full revision hash # The full revision hash
VCS_FULL_HASH="$(hg log -r "${VCS_NUM}" -l 1 --template '{node}\n')" VCS_FULL_HASH="$(git rev-parse HEAD)"
# The short hash # The short hash
VCS_SHORT_HASH="$(hg id -i | tr -d '+')" VCS_SHORT_HASH="$(echo "${VCS_FULL_HASH}" | cut -b 1-7)"
# Current branch (if we are on a branch...)
# Current bookmark (bookmarks are roughly equivalent to git's branches) VCS_BRANCH="$(git symbolic-ref --short -q HEAD)"
# or branch if no bookmark # Check if we are on a tag
VCS_BRANCH="$(hg id -B | cut -d ' ' -f 1)" VCS_TAG="$(git describe --exact-match 2> /dev/null)"
# Fall back to the branch if there are no bookmarks # get some extra data in case we are not on a branch or a tag...
if [ -z "${VCS_BRANCH}" ]; then VCS_EXTRA="$(git describe 2> /dev/null)"
VCS_BRANCH="$(hg id -b)"
fi
# Current or last tag ancestor (excluding auto tags, empty if no tags)
VCS_TAG="$(hg log -r "${VCS_NUM}" -l 1 --template '{latesttag}\n' 2>/dev/null | sed -e 's:qtip::' -e 's:tip::' -e 's:qbase::' -e 's:qparent::' -e "s:$(hg --config 'extensions.color=' --color never qtop 2>/dev/null)::" | cut -d ' ' -f 1)"
# Distance to last tag or an alias of VCS_NUM if there is no tag
if [ ! -z "${VCS_TAG}" ]; then
VCS_TICK="$(hg log -r "${VCS_NUM}" -l 1 --template '{latesttagdistance}\n' 2>/dev/null)"
else
VCS_TICK="${VCS_NUM}"
fi
# Date of the current commit
VCS_DATE="$(hg log -r "${VCS_NUM}" -l 1 --template '{date|isodatesec}\n' 2>/dev/null | sed -e 's: :T:' | sed -e 's: ::')"
}
# For bzr repos
bzrRepo() {
cd "$(bzr root)"
VCS_TYPE="bzr"
VCS_BASENAME="$(basename "${PWD}")"
# Is the working copy clean?
bzr version-info --custom --template='{clean}\n' | grep -q '1'
VCS_WC_MODIFIED="${?}"
# Enumeration of changesets
VCS_NUM="$(bzr revno)"
# The full revision hash
VCS_FULL_HASH="$(bzr version-info --custom --template='{revision_id}\n')"
# The short hash
VCS_SHORT_HASH="${VCS_NUM}"
# Nick of the current branch
VCS_BRANCH="$(bzr nick)"
# Current or last tag ancestor (excluding auto tags, empty if no tags)
VCS_TAG="$(bzr tags --sort=time | sed '/?$/d' | tail -n1 | cut -d ' ' -f1)"
# Distance to last tag or an alias of VCS_NUM if there is no tag
if [ ! -z "${VCS_TAG}" ]; then
VCS_TICK="$(bzr log --line -r "tag:${VCS_TAG}.." | tail -n +2 | wc -l | sed -e 's:^ *::')"
else
VCS_TICK="${VCS_NUM}"
fi
# Date of the current commit
VCS_DATE="$(bzr version-info --custom --template='{date}\n' | sed -e 's: :T:' | sed -e 's: ::')"
}
# For svn repos
svnRepo() {
VCS_TYPE="svn"
case "${PWD}" in
/*trunk*|/*branches*|/*tags*)
local fn="${PWD}"
while [ "$(basename "${fn}")" != 'trunk' ] && [ "$(basename "${fn}")" != 'branches' ] && [ "$(basename "${fn}")" != 'tags' ] && [ "$(basename "${fn}")" != '/' ]; do
local fn="$(dirname "${fn}")"
done
fn="$(dirname "${fn}")"
if [ "${fn}" = '/' ]; then
VCS_BASENAME="$(basename "${PWD}")"
else
VCS_BASENAME="$(basename "${fn}")"
fi
;;
*) VCS_BASENAME="$(basename "${PWD}")" ;;
esac
# Cache svnversion output
local SVNVERSION="$(svnversion)"
# Is the working copy clean?
echo "${SVNVERSION}" | grep -q "M"
case "${?}" in
0)
VCS_WC_MODIFIED="1"
;;
1)
if [ ! -z "${UNTRACKEDFILES}"]; then
# `svnversion` does not detect untracked files and `svn status` is really slow, so only run it if we really have to.
if [ -z "$(svn status)" ]; then
VCS_WC_MODIFIED="0"
else
VCS_WC_MODIFIED="1"
fi
fi
;;
esac
# Enumeration of changesets
VCS_NUM="$(echo "${SVNVERSION}" | cut -d : -f 1 | sed -e 's:M::' -e 's:S::' -e 's:P::')"
# The full revision hash
VCS_FULL_HASH="${SVNVERSION}"
# The short hash
VCS_SHORT_HASH="${VCS_NUM}"
# Current branch
case "${PWD}" in
/*trunk*|/*branches*|/*tags*)
local lastbase=""
loacl fn="${PWD}"
while :
do
base="$(basename "${fn}")"
if [ "${base}" = 'trunk' ]; then
VCS_BRANCH='trunk'
break
elif [ "${base}" = 'branches' ] || [ "${base}" = 'tags' ]; then
VCS_BRANCH="${lastbase}"
break
elif [ "${base}" = '/' ]; then
VCS_BRANCH=""
break
fi
local lastbase="${base}"
local fn="$(dirname "${fn}")"
done
;;
*) VCS_BRANCH="" ;;
esac
# Current or last tag ancestor (empty if no tags). But "current tag"
# can't be extracted reliably because Subversion doesn't have tags the
# way other VCSes do.
VCS_TAG=""
VCS_TICK=""
# Date of the current commit
VCS_DATE="$(svn info | sed -n -e 's:Last Changed Date\: ::p' | sed 's: (.*)::' | sed -e 's: :T:' | sed -e 's: ::')"
} }
@ -332,11 +122,10 @@ hOutput() {
#define VCS_TYPE "${VCS_TYPE}" #define VCS_TYPE "${VCS_TYPE}"
#define VCS_BASENAME "${VCS_BASENAME}" #define VCS_BASENAME "${VCS_BASENAME}"
#define VCS_NUM ${VCS_NUM}
#define VCS_DATE "${VCS_DATE}"
#define VCS_BRANCH "${VCS_BRANCH}" #define VCS_BRANCH "${VCS_BRANCH}"
#define VCS_TAG "${VCS_TAG}" #define VCS_TAG "${VCS_TAG}"
#define VCS_TICK ${VCS_TICK} #define VCS_EXTRA "${VCS_EXTRA}"
#define VCS_FULL_HASH "${VCS_FULL_HASH}" #define VCS_FULL_HASH "${VCS_FULL_HASH}"
#define VCS_SHORT_HASH "${VCS_SHORT_HASH}" #define VCS_SHORT_HASH "${VCS_SHORT_HASH}"
@ -358,11 +147,9 @@ xcodeOutput() {
#define VCS_TYPE ${VCS_TYPE} #define VCS_TYPE ${VCS_TYPE}
#define VCS_BASENAME ${VCS_BASENAME} #define VCS_BASENAME ${VCS_BASENAME}
#define VCS_NUM ${VCS_NUM}
#define VCS_DATE ${VCS_DATE}
#define VCS_BRANCH ${VCS_BRANCH} #define VCS_BRANCH ${VCS_BRANCH}
#define VCS_TAG ${VCS_TAG} #define VCS_TAG ${VCS_TAG}
#define VCS_TICK ${VCS_TICK} #define VCS_EXTRA ${VCS_EXTRA}
#define VCS_FULL_HASH ${VCS_FULL_HASH} #define VCS_FULL_HASH ${VCS_FULL_HASH}
#define VCS_SHORT_HASH ${VCS_SHORT_HASH} #define VCS_SHORT_HASH ${VCS_SHORT_HASH}
@ -382,11 +169,9 @@ shOutput() {
VCS_TYPE="${VCS_TYPE}" VCS_TYPE="${VCS_TYPE}"
VCS_BASENAME="${VCS_BASENAME}" VCS_BASENAME="${VCS_BASENAME}"
VCS_NUM=${VCS_NUM}
VCS_DATE="${VCS_DATE}"
VCS_BRANCH="${VCS_BRANCH}" VCS_BRANCH="${VCS_BRANCH}"
VCS_TAG="${VCS_TAG}" VCS_TAG="${VCS_TAG}"
VCS_TICK=${VCS_TICK} VCS_EXTRA="${VCS_EXTRA}"
VCS_FULL_HASH="${VCS_FULL_HASH}" VCS_FULL_HASH="${VCS_FULL_HASH}"
VCS_SHORT_HASH="${VCS_SHORT_HASH}" VCS_SHORT_HASH="${VCS_SHORT_HASH}"
@ -396,293 +181,12 @@ VCS_WC_MODIFIED=${VCS_WC_MODIFIED}
# end # end
EOF EOF
} }
# For Python output
pyOutput() {
case "${VCS_WC_MODIFIED}" in
0) VCS_WC_MODIFIED="False" ;;
1) VCS_WC_MODIFIED="True" ;;
esac
cat > "${TARGETFILE}" << EOF
# Generated by autorevision - do not hand-hack!
VCS_TYPE = "${VCS_TYPE}"
VCS_BASENAME = "${VCS_BASENAME}"
VCS_NUM = ${VCS_NUM}
VCS_DATE = "${VCS_DATE}"
VCS_BRANCH = "${VCS_BRANCH}"
VCS_TAG = "${VCS_TAG}"
VCS_TICK = ${VCS_TICK}
VCS_FULL_HASH = "${VCS_FULL_HASH}"
VCS_SHORT_HASH = "${VCS_SHORT_HASH}"
VCS_WC_MODIFIED = ${VCS_WC_MODIFIED}
# end
EOF
}
# For Perl output
plOutput() {
cat << EOF
# Generated by autorevision - do not hand-hack!
\$VCS_TYPE = "${VCS_TYPE}";
\$VCS_BASENAME = "${VCS_BASENAME}"
\$VCS_NUM = ${VCS_NUM};
\$VCS_DATE = "${VCS_DATE}";
\$VCS_BRANCH = "${VCS_BRANCH}";
\$VCS_TAG = "${VCS_TAG}";
\$VCS_TICK = ${VCS_TICK};
\$VCS_FULL_HASH = "${VCS_FULL_HASH}";
\$VCS_SHORT_HASH = "${VCS_SHORT_HASH}";
\$VCS_WC_MODIFIED = ${VCS_WC_MODIFIED};
# end
EOF
}
# For lua output
luaOutput() {
case "${VCS_WC_MODIFIED}" in
0) VCS_WC_MODIFIED="false" ;;
1) VCS_WC_MODIFIED="true" ;;
esac
cat > "${TARGETFILE}" << EOF
-- Generated by autorevision - do not hand-hack!
VCS_TYPE = "${VCS_TYPE}"
VCS_BASENAME = "${VCS_BASENAME}"
VCS_NUM = ${VCS_NUM}
VCS_DATE = "${VCS_DATE}"
VCS_BRANCH = "${VCS_BRANCH}"
VCS_TAG = "${VCS_TAG}"
VCS_TICK = ${VCS_TICK}
VCS_FULL_HASH = "${VCS_FULL_HASH}"
VCS_SHORT_HASH = "${VCS_SHORT_HASH}"
VCS_WC_MODIFIED = ${VCS_WC_MODIFIED}
-- end
EOF
}
# For php output
phpOutput() {
case "${VCS_WC_MODIFIED}" in
0) VCS_WC_MODIFIED="false" ;;
1) VCS_WC_MODIFIED="true" ;;
esac
cat > "${TARGETFILE}" << EOF
<?php
# Generated by autorevision - do not hand-hack!
$GLOBALS["VCS_TYPE"] = "${VCS_TYPE}";
$GLOBALS["VCS_BASENAME"] = "${VCS_BASENAME}";
$GLOBALS["VCS_NUM"] = ${VCS_NUM};
$GLOBALS["VCS_DATE"] = "${VCS_DATE}";
$GLOBALS["VCS_BRANCH"] = "${VCS_BRANCH}";
$GLOBALS["VCS_TAG"] = "${VCS_TAG}";
$GLOBALS["VCS_TICK"] = ${VCS_TICK};
$GLOBALS["VCS_FULL_HASH"] = "${VCS_FULL_HASH}";
$GLOBALS["VCS_SHORT_HASH"] = "${VCS_SHORT_HASH}";
$GLOBALS["VCS_WC_MODIFIED"] = ${VCS_WC_MODIFIED};
# end
?>
EOF
}
# For ini output
iniOutput() {
case "${VCS_WC_MODIFIED}" in
0) VCS_WC_MODIFIED="false" ;;
1) VCS_WC_MODIFIED="true" ;;
esac
cat > "${TARGETFILE}" << EOF
; Generated by autorevision - do not hand-hack!
[VCS]
VCS_TYPE = "${VCS_TYPE}"
VCS_BASENAME = "${VCS_BASENAME}"
VCS_NUM = ${VCS_NUM}
VCS_DATE = "${VCS_DATE}"
VCS_BRANCH = "${VCS_BRANCH}"
VCS_TAG = "${VCS_TAG}"
VCS_TICK = ${VCS_TICK}
VCS_FULL_HASH = "${VCS_FULL_HASH}"
VCS_SHORT_HASH = "${VCS_SHORT_HASH}"
VCS_WC_MODIFIED = ${VCS_WC_MODIFIED}
; end
EOF
}
# For javascript output
jsOutput() {
case "${VCS_WC_MODIFIED}" in
1) VCS_WC_MODIFIED="true" ;;
0) VCS_WC_MODIFIED="false" ;;
esac
cat > "${TARGETFILE}" << EOF
/** Generated by autorevision - do not hand-hack! */
var autorevision = {
VCS_TYPE: "${VCS_TYPE}",
VCS_BASENAME: "${VCS_BASENAME}",
VCS_NUM: ${VCS_NUM},
VCS_DATE: "${VCS_DATE}",
VCS_BRANCH: "${VCS_BRANCH}",
VCS_TAG: "${VCS_TAG}",
VCS_TICK: ${VCS_TICK},
VCS_FULL_HASH: "${VCS_FULL_HASH}",
VCS_SHORT_HASH: "${VCS_SHORT_HASH}",
VCS_WC_MODIFIED: ${VCS_WC_MODIFIED}
};
/** Node.js compatibility */
if (typeof module !== 'undefined') {
module.exports = autorevision;
}
/** end */
EOF
}
# For JSON output
jsonOutput() {
case "${VCS_WC_MODIFIED}" in
1) VCS_WC_MODIFIED="true" ;;
0) VCS_WC_MODIFIED="false" ;;
esac
cat > "${TARGETFILE}" << EOF
{
"VCS_TYPE": "${VCS_TYPE}",
"VCS_BASENAME": "${VCS_BASENAME}",
"VCS_NUM": ${VCS_NUM},
"VCS_DATE": "${VCS_DATE}",
"VCS_BRANCH":"${VCS_BRANCH}",
"VCS_TAG": "${VCS_TAG}",
"VCS_TICK": ${VCS_TICK},
"VCS_FULL_HASH": "${VCS_FULL_HASH}",
"VCS_SHORT_HASH": "${VCS_SHORT_HASH}",
"VCS_WC_MODIFIED": ${VCS_WC_MODIFIED}
}
EOF
}
# For Java output
javaOutput() {
case "${VCS_WC_MODIFIED}" in
1) VCS_WC_MODIFIED="true" ;;
0) VCS_WC_MODIFIED="false" ;;
esac
cat > "${TARGETFILE}" << EOF
/* Generated by autorevision - do not hand-hack! */
import java.util.Date;
public class autorevision {
public static final String VCS_TYPE = "${VCS_TYPE}";
public static final String VCS_BASENAME = "${VCS_BASENAME}";
public static final long VCS_NUM = ${VCS_NUM};
public static final String VCS_DATE = "${VCS_DATE}";
public static final String VCS_BRANCH = "${VCS_BRANCH}";
public static final String VCS_TAG = "${VCS_TAG}";
public static final long VCS_TICK = ${VCS_TICK};
public static final String VCS_FULL_HASH = "${VCS_FULL_HASH}";
public static final String VCS_SHORT_HASH = "${VCS_SHORT_HASH}";
public static final boolean VCS_WC_MODIFIED = ${VCS_WC_MODIFIED};
}
EOF
}
# For Java properties output
javapropOutput() {
case "${VCS_WC_MODIFIED}" in
1) VCS_WC_MODIFIED="true" ;;
0) VCS_WC_MODIFIED="false" ;;
esac
cat > "${TARGETFILE}" << EOF
# Generated by autorevision - do not hand-hack!
VCS_TYPE=${VCS_TYPE}
VCS_BASENAME=${VCS_BASENAME}
VCS_NUM=${VCS_NUM}
VCS_DATE=${VCS_DATE}
VCS_BRANCH=${VCS_BRANCH}
VCS_TAG=${VCS_TAG}
VCS_TICK=${VCS_TICK}
VCS_FULL_HASH=${VCS_FULL_HASH}
VCS_SHORT_HASH=${VCS_SHORT_HASH}
VCS_WC_MODIFIED=${VCS_WC_MODIFIED}
EOF
}
# For m4 output
m4Output() {
cat > "${TARGETFILE}" << EOF
define(\`VCS_TYPE', \`${VCS_TYPE}')dnl
define(\`VCS_BASENAME', \`${VCS_BASENAME}')dnl
define(\`VCS_NUM', \`${VCS_NUM}')dnl
define(\`VCS_DATE', \`${VCS_DATE}')dnl
define(\`VCS_BRANCH', \`${VCS_BRANCH}')dnl
define(\`VCS_TAG', \`${VCS_TAG}')dnl
define(\`VCS_TICK', \`${VCS_TICK}')dnl
define(\`VCS_FULLHASH', \`${VCS_FULL_HASH}')dnl
define(\`VCS_SHIRTHASH', \`${VCS_SHORT_HASH}')dnl
define(\`VCS_WC_MODIFIED', \`${VCS_WC_MODIFIED}')dnl
EOF
}
# For (La)TeX output
texOutput() {
case "${VCS_WC_MODIFIED}" in
0) VCS_WC_MODIFIED="false" ;;
1) VCS_WC_MODIFIED="true" ;;
esac
cat > "${TARGETFILE}" << EOF
% Generated by autorevision - do not hand-hack!
\def \vcsType {${VCS_TYPE}}
\def \vcsBasename {${VCS_BASENAME}}
\def \vcsNum {${VCS_NUM}}
\def \vcsDate {${VCS_DATE}}
\def \vcsBranch {${VCS_BRANCH}}
\def \vcsTag {${VCS_TAG}}
\def \vcsTick {${VCS_TICK}}
\def \vcsFullHash {${VCS_FULL_HASH}}
\def \vcsShortHash {${VCS_SHORT_HASH}}
\def \vcsWCModified {${VCS_WC_MODIFIED}}
\endinput
EOF
}
# Detect and collect repo data. # Detect and collect repo data.
if [ -f "${CACHEFILE}" ] && [ "${CACHEFORCE}" = "1" ]; then if [ -f "${CACHEFILE}" ] && [ "${CACHEFORCE}" = "1" ]; then
# When requested only read from the cache to populate our symbols. # When requested only read from the cache to populate our symbols.
. "${CACHEFILE}" . "${CACHEFILE}"
elif [ ! -z "$(git rev-parse HEAD 2>/dev/null)" ]; then elif [ ! -z "$(git rev-parse HEAD 2>/dev/null)" ]; then
gitRepo gitRepo
elif [ ! -z "$(hg root 2>/dev/null)" ]; then
hgRepo
elif [ ! -z "$(bzr root 2>/dev/null)" ]; then
bzrRepo
elif [ ! -z "$(svn info 2>/dev/null)" ]; then
svnRepo
elif [ -f "${CACHEFILE}" ]; then elif [ -f "${CACHEFILE}" ]; then
# We are not in a repo; try to use a previously generated cache to populate our symbols. # We are not in a repo; try to use a previously generated cache to populate our symbols.
. "${CACHEFILE}" . "${CACHEFILE}"
@ -700,16 +204,12 @@ if [ ! -z "${VAROUT}" ]; then
echo "${VCS_TYPE}" echo "${VCS_TYPE}"
elif [ "${VAROUT}" = "VCS_BASENAME" ]; then elif [ "${VAROUT}" = "VCS_BASENAME" ]; then
echo "${VCS_BASENAME}" echo "${VCS_BASENAME}"
elif [ "${VAROUT}" = "VCS_NUM" ]; then
echo "${VCS_NUM}"
elif [ "${VAROUT}" = "VCS_DATE" ]; then
echo "${VCS_DATE}"
elif [ "${VAROUT}" = "VCS_BRANCH" ]; then elif [ "${VAROUT}" = "VCS_BRANCH" ]; then
echo "${VCS_BRANCH}" echo "${VCS_BRANCH}"
elif [ "${VAROUT}" = "VCS_TAG" ]; then elif [ "${VAROUT}" = "VCS_TAG" ]; then
echo "${VCS_TAG}" echo "${VCS_TAG}"
elif [ "${VAROUT}" = "VCS_TICK" ]; then elif [ "${VAROUT}" = "VCS_EXTRA" ]; then
echo "${VCS_TICK}" echo "${VCS_EXTRA}"
elif [ "${VAROUT}" = "VCS_FULL_HASH" ]; then elif [ "${VAROUT}" = "VCS_FULL_HASH" ]; then
echo "${VCS_FULL_HASH}" echo "${VCS_FULL_HASH}"
elif [ "${VAROUT}" = "VCS_SHORT_HASH" ]; then elif [ "${VAROUT}" = "VCS_SHORT_HASH" ]; then
@ -722,7 +222,6 @@ if [ ! -z "${VAROUT}" ]; then
fi fi
fi fi
# Detect requested output type and use it. # Detect requested output type and use it.
if [ ! -z "${AFILETYPE}" ]; then if [ ! -z "${AFILETYPE}" ]; then
if [ "${AFILETYPE}" = "h" ]; then if [ "${AFILETYPE}" = "h" ]; then
@ -731,28 +230,6 @@ if [ ! -z "${AFILETYPE}" ]; then
xcodeOutput xcodeOutput
elif [ "${AFILETYPE}" = "sh" ]; then elif [ "${AFILETYPE}" = "sh" ]; then
shOutput shOutput
elif [ "${AFILETYPE}" = "py" ] || [ "${AFILETYPE}" = "python" ]; then
pyOutput
elif [ "${AFILETYPE}" = "pl" ] || [ "${AFILETYPE}" = "perl" ]; then
plOutput
elif [ "${AFILETYPE}" = "lua" ]; then
luaOutput
elif [ "${AFILETYPE}" = "php" ]; then
phpOutput
elif [ "${AFILETYPE}" = "ini" ]; then
iniOutput
elif [ "${AFILETYPE}" = "js" ]; then
jsOutput
elif [ "${AFILETYPE}" = "json" ]; then
jsonOutput
elif [ "${AFILETYPE}" = "java" ]; then
javaOutput
elif [ "${AFILETYPE}" = "javaprop" ]; then
javapropOutput
elif [ "${AFILETYPE}" = "tex" ]; then
texOutput
elif [ "${AFILETYPE}" = "m4" ]; then
m4Output
else else
echo "error: Not a valid output type." 1>&2 echo "error: Not a valid output type." 1>&2
exit 1 exit 1

View File

@ -3383,7 +3383,7 @@ explosionWav = lrgexpl.ogg
[Cannon1Mk1] [Cannon1Mk1]
buildPower = 75 buildPower = 75
buildPoints = 375 buildPoints = 250
weight = 1000 weight = 1000
hitpoints = 250 hitpoints = 250
model = GNLCAN.PIE model = GNLCAN.PIE
@ -3420,7 +3420,7 @@ explosionWav = smlexpl.ogg
[Cannon1-VTOL] [Cannon1-VTOL]
buildPower = 75 buildPower = 75
buildPoints = 375 buildPoints = 250
weight = 1000 weight = 1000
hitpoints = 250 hitpoints = 250
model = GNLCAN.PIE model = GNLCAN.PIE

308
po/es.po
View File

@ -8,8 +8,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: warzone2100\n" "Project-Id-Version: warzone2100\n"
"Report-Msgid-Bugs-To: warzone2100-project@lists.sourceforge.net\n" "Report-Msgid-Bugs-To: warzone2100-project@lists.sourceforge.net\n"
"POT-Creation-Date: 2013-11-29 18:34+0100\n" "POT-Creation-Date: 2013-11-20 19:01+0100\n"
"PO-Revision-Date: 2012-09-13 15:18+0100\n" "PO-Revision-Date: 2013-11-27 15:21+0100\n"
"Last-Translator: Daniel Vijande <nsa_server@hotmail.com>\n" "Last-Translator: Daniel Vijande <nsa_server@hotmail.com>\n"
"Language-Team: Spanish <warzone2100-project@lists.sourceforge.net>\n" "Language-Team: Spanish <warzone2100-project@lists.sourceforge.net>\n"
"Language: es\n" "Language: es\n"
@ -11904,23 +11904,29 @@ msgid ""
"Your router doesn't support UPnP, you must manually configure your router & firewall to\n" "Your router doesn't support UPnP, you must manually configure your router & firewall to\n"
"open port 2100 before you can host a game." "open port 2100 before you can host a game."
msgstr "" msgstr ""
"Tu router no soporta UPnP, debes configurar tu router y cortafuegos manualmente para \n"
"abrir el puerto 2100 antes de poder hospedar una partida."
#: lib/netplay/netplay.cpp:999 #: lib/netplay/netplay.cpp:999
msgid "" msgid ""
"No UPnP device was found. You must manually configure your router & firewall to\n" "No UPnP device was found. You must manually configure your router & firewall to\n"
"open port 2100 before you can host a game." "open port 2100 before you can host a game."
msgstr "" msgstr ""
"No se encontró un el dispositivo UPnP. Deberás configurar manualmente tu router y cortafuegos para\n"
"abrir el puerto 2100 antes de poder hospedar una partida."
#: lib/netplay/netplay.cpp:1027 #: lib/netplay/netplay.cpp:1027
#, fuzzy, c-format #, c-format
msgid "Could not open require port (%s) on (%s)" msgid "Could not open require port (%s) on (%s)"
msgstr "¡No se pudo resolver el nombre del servidor maestro (%s)!" msgstr "¡No se pudo abrir el puerto necesario (%s) en (%s)!"
#: lib/netplay/netplay.cpp:1031 #: lib/netplay/netplay.cpp:1031
msgid "" msgid ""
"You must manually configure your router & firewall to\n" "You must manually configure your router & firewall to\n"
" open port 2100 before you can host a game." " open port 2100 before you can host a game."
msgstr "" msgstr ""
"Debes configurar tu router y cortafuegos manualmente para\n"
"abrir el puerto 2100 antes de hospedar una partida."
#: lib/netplay/netplay.cpp:1041 #: lib/netplay/netplay.cpp:1041
#, c-format #, c-format
@ -11928,6 +11934,8 @@ msgid ""
"Game configured port (%s) correctly on (%s)\n" "Game configured port (%s) correctly on (%s)\n"
"Your external IP is %s" "Your external IP is %s"
msgstr "" msgstr ""
"Puerto (%s) configurado correctamente en (%s)\n"
"Tu IP externa es %s"
#: lib/netplay/netplay.cpp:2176 #: lib/netplay/netplay.cpp:2176
#, c-format #, c-format
@ -11952,13 +11960,12 @@ msgid "Failed to get a lobby response!"
msgstr "Fallo al obtener respuesta del vestíbulo!" msgstr "Fallo al obtener respuesta del vestíbulo!"
#: po/custom/mac-infoplist.txt:1 #: po/custom/mac-infoplist.txt:1
#, fuzzy
msgid "" msgid ""
"Copyright © 1999-2004 Eidos Interactive.\n" "Copyright © 1999-2004 Eidos Interactive.\n"
"Copyright © 2005-2013 The Warzone 2100 Project" "Copyright © 2005-2013 The Warzone 2100 Project"
msgstr "" msgstr ""
"Copyright © 1999-2004 Eidos Interactive.\n" "Copyright © 1999-2004 Eidos Interactive.\n"
"Copyright © 2005-2010 The Warzone 2100 Project" "Copyright © 2005-2013 The Warzone 2100 Project"
#: po/custom/mac-infoplist.txt:2 #: po/custom/mac-infoplist.txt:2
#: po/custom/warzone2100.desktop.txt:2 #: po/custom/warzone2100.desktop.txt:2
@ -12006,8 +12013,8 @@ msgstr "Juego de Estrategia"
#: src/intelmap.cpp:530 #: src/intelmap.cpp:530
#: src/intorder.cpp:727 #: src/intorder.cpp:727
#: src/loadsave.cpp:250 #: src/loadsave.cpp:250
#: src/multimenu.cpp:506 #: src/multimenu.cpp:496
#: src/multimenu.cpp:1373 #: src/multimenu.cpp:1363
#: src/transporter.cpp:264 #: src/transporter.cpp:264
#: src/transporter.cpp:346 #: src/transporter.cpp:346
#: src/transporter.cpp:806 #: src/transporter.cpp:806
@ -12357,7 +12364,7 @@ msgid "Player dropped"
msgstr "Jugador Desconectado" msgstr "Jugador Desconectado"
#: src/display3d.cpp:666 #: src/display3d.cpp:666
#: src/multiint.cpp:2382 #: src/multiint.cpp:2375
msgid "Waiting for other players" msgid "Waiting for other players"
msgstr "Esperando a otros jugadores" msgstr "Esperando a otros jugadores"
@ -12494,9 +12501,8 @@ msgid "MAIN MENU"
msgstr "MENÚ PRINCIPAL" msgstr "MENÚ PRINCIPAL"
#: src/frontend.cpp:117 #: src/frontend.cpp:117
#, fuzzy
msgid "Official site: http://wz2100.net/" msgid "Official site: http://wz2100.net/"
msgstr "Visita el sitio oficial: http://wz2100.net" msgstr "Sitio oficial: http://wz2100.net"
#: src/frontend.cpp:187 #: src/frontend.cpp:187
msgid "Fast Play" msgid "Fast Play"
@ -12573,7 +12579,7 @@ msgstr "Unirse a una Partida"
#: src/frontend.cpp:400 #: src/frontend.cpp:400
msgid "TCP port 2100 must be opened in your firewall or router to host games!" msgid "TCP port 2100 must be opened in your firewall or router to host games!"
msgstr "" msgstr "¡El puerto TCP 2100 debe estar abierto en tu cortafuegos o router para hospedar partidas!"
#: src/frontend.cpp:464 #: src/frontend.cpp:464
#: src/multiint.cpp:1483 #: src/multiint.cpp:1483
@ -12661,7 +12667,7 @@ msgstr "50%"
#: src/frontend.cpp:563 #: src/frontend.cpp:563
#: src/frontend.cpp:706 #: src/frontend.cpp:706
#: src/multiplay.cpp:2020 #: src/multiplay.cpp:2002
msgid "Black" msgid "Black"
msgstr "Negro" msgstr "Negro"
@ -12861,7 +12867,7 @@ msgid "GAME OPTIONS"
msgstr "OPCIONES DE JUEGO" msgstr "OPCIONES DE JUEGO"
#: src/frontend.cpp:1482 #: src/frontend.cpp:1482
#: src/multiint.cpp:2651 #: src/multiint.cpp:2644
msgid "Mod: " msgid "Mod: "
msgstr "Mod:" msgstr "Mod:"
@ -12920,8 +12926,8 @@ msgid "Build (F3)"
msgstr "Construcción (F3)" msgstr "Construcción (F3)"
#: src/hci.cpp:3435 #: src/hci.cpp:3435
#: src/multiint.cpp:1596 #: src/multiint.cpp:1589
#: src/multimenu.cpp:808 #: src/multimenu.cpp:798
msgid "Power" msgid "Power"
msgstr "Energía" msgstr "Energía"
@ -13517,7 +13523,7 @@ msgstr "MAPEO DE TECLAS"
#: src/keyedit.cpp:377 #: src/keyedit.cpp:377
#: src/multiint.cpp:763 #: src/multiint.cpp:763
#: src/multiint.cpp:1263 #: src/multiint.cpp:1263
#: src/multiint.cpp:1682 #: src/multiint.cpp:1675
msgid "Return To Previous Screen" msgid "Return To Previous Screen"
msgstr "Volver a la Pantalla Anterior" msgstr "Volver a la Pantalla Anterior"
@ -14198,7 +14204,7 @@ msgstr "Hospedado por %s --- %s"
#: src/multiint.cpp:1029 #: src/multiint.cpp:1029
msgid "Can't find any games for your version." msgid "Can't find any games for your version."
msgstr "" msgstr "No se encontraron partidas para tu versión."
#: src/multiint.cpp:1044 #: src/multiint.cpp:1044
msgid "No games are available" msgid "No games are available"
@ -14249,9 +14255,8 @@ msgid "Refresh Games List"
msgstr "Actualizar Lista de Partidas" msgstr "Actualizar Lista de Partidas"
#: src/multiint.cpp:1271 #: src/multiint.cpp:1271
#, fuzzy
msgid "Filter Games List" msgid "Filter Games List"
msgstr "Actualizar Lista de Partidas" msgstr "Filtrar Lista de Partidas"
#: src/multiint.cpp:1298 #: src/multiint.cpp:1298
msgid "Enter Password:" msgid "Enter Password:"
@ -14290,301 +14295,292 @@ msgstr "Elegir Nombre de la Partida"
msgid "One-Player Skirmish" msgid "One-Player Skirmish"
msgstr "Escaramuza Un Jugador" msgstr "Escaramuza Un Jugador"
#: src/multiint.cpp:1503 #: src/multiint.cpp:1500
msgid "Select Map" msgid "Select Map"
msgstr "Elegir Mapa" msgstr "Elegir Mapa"
#: src/multiint.cpp:1504 #: src/multiint.cpp:1510
msgid "Map-Mod!"
msgstr ""
#: src/multiint.cpp:1517
msgid "Click to set Password" msgid "Click to set Password"
msgstr "Click para fijar contraseña" msgstr "Click para fijar contraseña"
#: src/multiint.cpp:1527 #: src/multiint.cpp:1520
#: src/multiint.cpp:1528 #: src/multiint.cpp:1521
msgid "Scavengers" msgid "Scavengers"
msgstr "Carroñeros" msgstr "Carroñeros"
#: src/multiint.cpp:1530 #: src/multiint.cpp:1523
msgid "No Scavengers" msgid "No Scavengers"
msgstr "Sin Carroñeros" msgstr "Sin Carroñeros"
#: src/multiint.cpp:1560 #: src/multiint.cpp:1553
msgid "Select Player Name" msgid "Select Player Name"
msgstr "Elegir Nombre del Jugador" msgstr "Elegir Nombre del Jugador"
#: src/multiint.cpp:1563 #: src/multiint.cpp:1556
#: src/multimenu.cpp:801 #: src/multimenu.cpp:791
msgid "Alliances" msgid "Alliances"
msgstr "Alianzas" msgstr "Alianzas"
#: src/multiint.cpp:1566 #: src/multiint.cpp:1559
msgid "No Alliances" msgid "No Alliances"
msgstr "Sin Alianzas" msgstr "Sin Alianzas"
#: src/multiint.cpp:1568 #: src/multiint.cpp:1561
msgid "Allow Alliances" msgid "Allow Alliances"
msgstr "Permitir Alianzas" msgstr "Permitir Alianzas"
#: src/multiint.cpp:1572 #: src/multiint.cpp:1565
msgid "Locked Teams" msgid "Locked Teams"
msgstr "Equipos Fijos" msgstr "Equipos Fijos"
#: src/multiint.cpp:1598 #: src/multiint.cpp:1591
msgid "Low Power Levels" msgid "Low Power Levels"
msgstr "Niveles de Energía Bajos" msgstr "Niveles de Energía Bajos"
#: src/multiint.cpp:1600 #: src/multiint.cpp:1593
msgid "Medium Power Levels" msgid "Medium Power Levels"
msgstr "Niveles de Energía Medios" msgstr "Niveles de Energía Medios"
#: src/multiint.cpp:1602 #: src/multiint.cpp:1595
msgid "High Power Levels" msgid "High Power Levels"
msgstr "Niveles de Energía Altos" msgstr "Niveles de Energía Altos"
#: src/multiint.cpp:1634 #: src/multiint.cpp:1627
msgid "Base" msgid "Base"
msgstr "Base" msgstr "Base"
#: src/multiint.cpp:1636 #: src/multiint.cpp:1629
msgid "Start with No Bases" msgid "Start with No Bases"
msgstr "Comenzar sin Bases" msgstr "Comenzar sin Bases"
#: src/multiint.cpp:1638 #: src/multiint.cpp:1631
msgid "Start with Bases" msgid "Start with Bases"
msgstr "Comenzar con Bases" msgstr "Comenzar con Bases"
#: src/multiint.cpp:1640 #: src/multiint.cpp:1633
msgid "Start with Advanced Bases" msgid "Start with Advanced Bases"
msgstr "Comenzar con Bases Avanzadas" msgstr "Comenzar con Bases Avanzadas"
#: src/multiint.cpp:1672 #: src/multiint.cpp:1665
msgid "Map Preview" msgid "Map Preview"
msgstr "Previsualizar Mapa" msgstr "Previsualizar Mapa"
#: src/multiint.cpp:1674 #: src/multiint.cpp:1667
msgid "Click to see Map" msgid "Click to see Map"
msgstr "Click para ver Mapa" msgstr "Click para ver Mapa"
#: src/multiint.cpp:1687 #: src/multiint.cpp:1680
#: src/multiint.cpp:1689 #: src/multiint.cpp:1682
msgid "Start Hosting Game" msgid "Start Hosting Game"
msgstr "Comenzar Hospedando un Juego" msgstr "Comenzar Hospedando un Juego"
#: src/multiint.cpp:1696 #: src/multiint.cpp:1689
#: src/multiint.cpp:1700 #: src/multiint.cpp:1693
msgid "Show Structure Limits" msgid "Show Structure Limits"
msgstr "Fijar Límites de Estructuras" msgstr "Fijar Límites de Estructuras"
#: src/multiint.cpp:1696 #: src/multiint.cpp:1689
#: src/multiint.cpp:1700 #: src/multiint.cpp:1693
msgid "Set Structure Limits" msgid "Set Structure Limits"
msgstr "Fijar Límites de Estructuras" msgstr "Fijar Límites de Estructuras"
#: src/multiint.cpp:1777 #: src/multiint.cpp:1770
msgid "DIFFICULTY" msgid "DIFFICULTY"
msgstr "DIFICULTAD" msgstr "DIFICULTAD"
#: src/multiint.cpp:1791 #: src/multiint.cpp:1784
msgid "Less aggressive" msgid "Less aggressive"
msgstr "Menos agresiva" msgstr "Menos agresiva"
#: src/multiint.cpp:1792 #: src/multiint.cpp:1785
msgid "Plays nice" msgid "Plays nice"
msgstr "Juega justamente" msgstr "Juega justamente"
#: src/multiint.cpp:1793 #: src/multiint.cpp:1786
msgid "No holds barred" msgid "No holds barred"
msgstr "Sin prohibiciones" msgstr "Sin prohibiciones"
#: src/multiint.cpp:1794 #: src/multiint.cpp:1787
msgid "Starts with advantages" msgid "Starts with advantages"
msgstr "Comenzar con ventaja" msgstr "Comenzar con ventaja"
#: src/multiint.cpp:1822 #: src/multiint.cpp:1815
msgid "CHOOSE AI" msgid "CHOOSE AI"
msgstr "ESCOGER IA" msgstr "ESCOGER IA"
#: src/multiint.cpp:1860 #: src/multiint.cpp:1853
msgid "Allow human players to join in this slot" msgid "Allow human players to join in this slot"
msgstr "Permitir usar esta ranura a jugadores humanos" msgstr "Permitir usar esta ranura a jugadores humanos"
#: src/multiint.cpp:1867 #: src/multiint.cpp:1860
msgid "Leave this slot unused" msgid "Leave this slot unused"
msgstr "Dejar esta ranura sin utilizar" msgstr "Dejar esta ranura sin utilizar"
#: src/multiint.cpp:2324 #: src/multiint.cpp:2317
msgid "Team" msgid "Team"
msgstr "Equipo" msgstr "Equipo"
#: src/multiint.cpp:2367 #: src/multiint.cpp:2360
msgid "You cannot change difficulty in a challenge" msgid "You cannot change difficulty in a challenge"
msgstr "No puedes cambiar la dificultad en un desafío" msgstr "No puedes cambiar la dificultad en un desafío"
#: src/multiint.cpp:2367 #: src/multiint.cpp:2360
msgid "Click to change difficulty" msgid "Click to change difficulty"
msgstr "Click para ajustar dificultad de la IA" msgstr "Click para ajustar dificultad de la IA"
#: src/multiint.cpp:2382 #: src/multiint.cpp:2375
msgid "Waiting for player" msgid "Waiting for player"
msgstr "Esperando por jugador" msgstr "Esperando por jugador"
#: src/multiint.cpp:2382 #: src/multiint.cpp:2375
msgid "Player is ready" msgid "Player is ready"
msgstr "El Jugador está listo" msgstr "El Jugador está listo"
#: src/multiint.cpp:2382 #: src/multiint.cpp:2375
msgid "Click when ready" msgid "Click when ready"
msgstr "Click cuando esté listo" msgstr "Click cuando esté listo"
#: src/multiint.cpp:2389 #: src/multiint.cpp:2382
msgid "READY?" msgid "READY?"
msgstr "¿LISTO?" msgstr "¿LISTO?"
#: src/multiint.cpp:2433 #: src/multiint.cpp:2426
msgid "PLAYERS" msgid "PLAYERS"
msgstr "JUGADORES" msgstr "JUGADORES"
#: src/multiint.cpp:2468 #: src/multiint.cpp:2461
msgid "Click to change to this slot" msgid "Click to change to this slot"
msgstr "Click para cambiar a esta ranura." msgstr "Click para cambiar a esta ranura."
#: src/multiint.cpp:2496 #: src/multiint.cpp:2489
msgid "Choose Team" msgid "Choose Team"
msgstr "Elegir equipo" msgstr "Elegir equipo"
#: src/multiint.cpp:2526 #: src/multiint.cpp:2519
msgid "Click to change player colour" msgid "Click to change player colour"
msgstr "Click para cambiar el color de jugador." msgstr "Click para cambiar el color de jugador."
#: src/multiint.cpp:2554 #: src/multiint.cpp:2547
msgid "Click to change player position" msgid "Click to change player position"
msgstr "Click para cambiar la posición de jugador." msgstr "Click para cambiar la posición de jugador."
#: src/multiint.cpp:2558 #: src/multiint.cpp:2551
msgid "Click to change AI" msgid "Click to change AI"
msgstr "Click para cambiar la IA" msgstr "Click para cambiar la IA"
#: src/multiint.cpp:2624 #: src/multiint.cpp:2617
msgid "CHAT" msgid "CHAT"
msgstr "CHAT" msgstr "CHAT"
#: src/multiint.cpp:2656 #: src/multiint.cpp:2649
msgid "All players need to have the same mods to join your game." msgid "All players need to have the same mods to join your game."
msgstr "Todos los jugadores necesitan tener los mismos mods para unirse" msgstr "Todos los jugadores necesitan tener los mismos mods para unirse"
#: src/multiint.cpp:2697 #: src/multiint.cpp:2690
msgid "Connecting to the lobby server..." msgid "Connecting to the lobby server..."
msgstr "Conectando al vestíbulo..." msgstr "Conectando al vestíbulo..."
#: src/multiint.cpp:3000 #: src/multiint.cpp:2993
#, c-format #, c-format
msgid "*** password [%s] is now required! ***" msgid "*** password [%s] is now required! ***"
msgstr "*** ¡contraseña requerida! [%s] ***" msgstr "*** ¡contraseña requerida! [%s] ***"
#: src/multiint.cpp:3006 #: src/multiint.cpp:2999
msgid "*** password is NOT required! ***" msgid "*** password is NOT required! ***"
msgstr "*** ¡contraseña NO requerida! ***" msgstr "*** ¡contraseña NO requerida! ***"
#: src/multiint.cpp:3020 #: src/multiint.cpp:3059
msgid "This is a map-mod, it can change your playing experience!"
msgstr ""
#: src/multiint.cpp:3072
msgid "Sorry! Failed to host the game." msgid "Sorry! Failed to host the game."
msgstr "¡Lo sentimos! No se pudo hospedar la partida" msgstr "¡Lo sentimos! No se pudo hospedar la partida"
#: src/multiint.cpp:3195 #: src/multiint.cpp:3182
msgid "'Locked Teams' mode enabled" msgid "'Locked Teams' mode enabled"
msgstr "Modo de Equipos Fijos Activado" msgstr "Modo de Equipos Fijos Activado"
#: src/multiint.cpp:3223 #: src/multiint.cpp:3210
#: src/multiint.cpp:3292 #: src/multiint.cpp:3279
#: src/multimenu.cpp:1496 #: src/multimenu.cpp:1486
#, c-format #, c-format
msgid "The host has kicked %s from the game!" msgid "The host has kicked %s from the game!"
msgstr "¡El anfitrión ha expulsado a %s de la partida!" msgstr "¡El anfitrión ha expulsado a %s de la partida!"
#: src/multiint.cpp:3358 #: src/multiint.cpp:3345
msgid "Host is Starting Game" msgid "Host is Starting Game"
msgstr "Anfitrión Comenzando Partida" msgstr "Anfitrión Comenzando Partida"
#: src/multiint.cpp:3937 #: src/multiint.cpp:3923
msgid "UPnP has been enabled." msgid "UPnP has been enabled."
msgstr "" msgstr "UPnP ha sido habilitado."
#: src/multiint.cpp:3943 #: src/multiint.cpp:3929
msgid "UPnP detection faled. You must manually configure router yourself." msgid "UPnP detection faled. You must manually configure router yourself."
msgstr "" msgstr "Detección de UPnP fallida. Debes configurar tu router manualmente."
#: src/multiint.cpp:3947 #: src/multiint.cpp:3933
#, fuzzy
msgid "UPnP detection is in progress..." msgid "UPnP detection is in progress..."
msgstr "Decodificación en progreso....." msgstr "Detección de UPnP en progreso..."
#: src/multiint.cpp:3954 #: src/multiint.cpp:3940
msgid "UPnP detection disabled by user. Autoconfig of port 2100 will not happen." msgid "UPnP detection disabled by user. Autoconfig of port 2100 will not happen."
msgstr "" msgstr "La detección UPnP está deshabilitada por el usuario. No se configurará el puerto 2100 automáticamente."
#: src/multiint.cpp:3960 #: src/multiint.cpp:3946
msgid "Hit the ready box to begin your challenge!" msgid "Hit the ready box to begin your challenge!"
msgstr "" msgstr "¡Pulsa en la casilla listo para comenzar el desafío!"
#: src/multiint.cpp:3964 #: src/multiint.cpp:3950
msgid "Press the start hosting button to begin hosting a game." msgid "Press the start hosting button to begin hosting a game."
msgstr "" msgstr "Pulsa el botón de hospedar para hospedar una partida."
#: src/multiint.cpp:4006 #: src/multiint.cpp:3992
msgid "Can't connect to lobby server!" msgid "Can't connect to lobby server!"
msgstr "¡No se pudo conectar al vestíbulo!" msgstr "¡No se pudo conectar al vestíbulo!"
#: src/multiint.cpp:4107 #: src/multiint.cpp:4084
#, c-format #, c-format
msgid "Mods: %s" msgid "Mods: %s"
msgstr "Mods: %s" msgstr "Mods: %s"
#: src/multiint.cpp:4114 #: src/multiint.cpp:4091
msgid "Mods: None!" msgid "Mods: None!"
msgstr "Mods: ¡Ninguno!" msgstr "Mods: ¡Ninguno!"
#: src/multiint.cpp:4124 #: src/multiint.cpp:4101
#, c-format #, c-format
msgid "Version: %s" msgid "Version: %s"
msgstr "Versión: %s" msgstr "Versión: %s"
#: src/multiint.cpp:4175 #: src/multiint.cpp:4152
#, c-format #, c-format
msgid "Click to take player slot %d" msgid "Click to take player slot %d"
msgstr "Click para cambiar la posición del jugador %d" msgstr "Click para cambiar la posición del jugador %d"
#: src/multiint.cpp:4184 #: src/multiint.cpp:4161
#: src/multiint.cpp:4386 #: src/multiint.cpp:4363
msgid "Open" msgid "Open"
msgstr "Abrir" msgstr "Abrir"
#: src/multiint.cpp:4184 #: src/multiint.cpp:4161
#: src/multiint.cpp:4387 #: src/multiint.cpp:4364
msgid "Closed" msgid "Closed"
msgstr "Cerrado" msgstr "Cerrado"
#: src/multiint.cpp:4234 #: src/multiint.cpp:4211
#, c-format #, c-format
msgid "Sending Map: %d%% " msgid "Sending Map: %d%% "
msgstr "Enviando Mapa: %d%%" msgstr "Enviando Mapa: %d%%"
#: src/multiint.cpp:4242 #: src/multiint.cpp:4219
#, c-format #, c-format
msgid "Map: %d%% downloaded" msgid "Map: %d%% downloaded"
msgstr "Mapa: %d%% descargado" msgstr "Mapa: %d%% descargado"
#: src/multiint.cpp:4268 #: src/multiint.cpp:4245
msgid "HOST" msgid "HOST"
msgstr "ANFITRIÓN" msgstr "ANFITRIÓN"
#: src/multiint.cpp:4275 #: src/multiint.cpp:4252
#: src/multimenu.cpp:815 #: src/multimenu.cpp:805
msgid "Ping" msgid "Ping"
msgstr "Ping" msgstr "Ping"
@ -14625,107 +14621,97 @@ msgstr "Restablecer Valores por defecto y Volver a la Pantalla Anterior"
msgid "Limits reset to default values" msgid "Limits reset to default values"
msgstr "Límites reiniciados a valores por defecto" msgstr "Límites reiniciados a valores por defecto"
#: src/multimenu.cpp:633 #: src/multimenu.cpp:623
msgid "Technology level 1" msgid "Technology level 1"
msgstr "Nivel Tecnológico 1" msgstr "Nivel Tecnológico 1"
#: src/multimenu.cpp:641 #: src/multimenu.cpp:631
msgid "Technology level 2" msgid "Technology level 2"
msgstr "Nivel Tecnológico 2" msgstr "Nivel Tecnológico 2"
#: src/multimenu.cpp:647 #: src/multimenu.cpp:637
msgid "Technology level 3" msgid "Technology level 3"
msgstr "Nivel Tecnológico 3" msgstr "Nivel Tecnológico 3"
#: src/multimenu.cpp:653 #: src/multimenu.cpp:643
msgid "Any number of players" msgid "Any number of players"
msgstr "Cualquier número de jugadores" msgstr "Cualquier número de jugadores"
#: src/multimenu.cpp:664 #: src/multimenu.cpp:654
#, c-format #, c-format
msgid "%d player" msgid "%d player"
msgid_plural "%d players" msgid_plural "%d players"
msgstr[0] "%d jugador" msgstr[0] "%d jugador"
msgstr[1] "%d jugadores" msgstr[1] "%d jugadores"
#: src/multimenu.cpp:802 #: src/multimenu.cpp:792
msgid "Score" msgid "Score"
msgstr "Puntuación" msgstr "Puntuación"
#: src/multimenu.cpp:803 #: src/multimenu.cpp:793
msgid "Kills" msgid "Kills"
msgstr "Muertes" msgstr "Muertes"
#: src/multimenu.cpp:804 #: src/multimenu.cpp:794
msgid "Units" msgid "Units"
msgstr "Unidades" msgstr "Unidades"
#: src/multimenu.cpp:819 #: src/multimenu.cpp:809
msgid "Structs" msgid "Structs"
msgstr "Estructuras" msgstr "Estructuras"
#: src/multimenu.cpp:831 #: src/multimenu.cpp:821
msgid "Sent/Received per sec —" msgid "Sent/Received per sec —"
msgstr "Enviado/Recibido por segundo —" msgstr "Enviado/Recibido por segundo —"
#: src/multimenu.cpp:831 #: src/multimenu.cpp:821
msgid "Total Sent/Received —" msgid "Total Sent/Received —"
msgstr "Total Enviado/Recibido —" msgstr "Total Enviado/Recibido —"
#: src/multimenu.cpp:836 #: src/multimenu.cpp:826
#, c-format #, c-format
msgid "Traf: %u/%u" msgid "Traf: %u/%u"
msgstr "Tráf: %u/%u" msgstr "Tráf: %u/%u"
#: src/multimenu.cpp:840 #: src/multimenu.cpp:830
#, c-format #, c-format
msgid "Uncompressed: %u/%u" msgid "Uncompressed: %u/%u"
msgstr "Descomprimido: %u/%u" msgstr "Descomprimido: %u/%u"
#: src/multimenu.cpp:844 #: src/multimenu.cpp:834
#, c-format #, c-format
msgid "Pack: %u/%u" msgid "Pack: %u/%u"
msgstr "Comprimido: %u/%u" msgstr "Comprimido: %u/%u"
#: src/multimenu.cpp:1146 #: src/multimenu.cpp:1136
msgid "Channel" msgid "Channel"
msgstr "Canal" msgstr "Canal"
#: src/multimenu.cpp:1160 #: src/multimenu.cpp:1150
msgid "Toggle Alliance State" msgid "Toggle Alliance State"
msgstr "Alternar Estado de la Alianza" msgstr "Alternar Estado de la Alianza"
#: src/multimenu.cpp:1179 #: src/multimenu.cpp:1169
msgid "Give Visibility Report" msgid "Give Visibility Report"
msgstr "Dar Informe de Visibilidad" msgstr "Dar Informe de Visibilidad"
#: src/multimenu.cpp:1185 #: src/multimenu.cpp:1175
msgid "Leak Technology Documents" msgid "Leak Technology Documents"
msgstr "Compartir Documentos Tecnológicos" msgstr "Compartir Documentos Tecnológicos"
#: src/multimenu.cpp:1192 #: src/multimenu.cpp:1182
msgid "Hand Over Selected Units" msgid "Hand Over Selected Units"
msgstr "Transferir las unidades seleccionadas" msgstr "Transferir las unidades seleccionadas"
#: src/multimenu.cpp:1198 #: src/multimenu.cpp:1188
msgid "Give Power To Player" msgid "Give Power To Player"
msgstr "Dar Energía al Jugador" msgstr "Dar Energía al Jugador"
#: src/multimenu.cpp:1498 #: src/multimenu.cpp:1488
#, c-format #, c-format
msgid "kicked %s : %s from the game, and added them to the banned list!" msgid "kicked %s : %s from the game, and added them to the banned list!"
msgstr "Expulsado %s: %s de la partida, y añadido a la lista de baneo!" msgstr "Expulsado %s: %s de la partida, y añadido a la lista de baneo!"
#: src/multiopt.cpp:227
#: src/multiplay.cpp:1722
msgid "Warning, this is a map-mod, it could alter normal gameplay."
msgstr ""
#: src/multiopt.cpp:231
#: src/multiplay.cpp:1726
msgid "Warning, HOST has altered the game code, and can't be trusted!"
msgstr ""
#: src/multiplay.cpp:263 #: src/multiplay.cpp:263
#, c-format #, c-format
msgid "Kicking player %s, because they tried to bypass data integrity check!" msgid "Kicking player %s, because they tried to bypass data integrity check!"
@ -14743,63 +14729,63 @@ msgstr "(privado a "
msgid "[invalid]" msgid "[invalid]"
msgstr "[inválido]" msgstr "[inválido]"
#: src/multiplay.cpp:2017 #: src/multiplay.cpp:1999
msgid "Green" msgid "Green"
msgstr "Verde" msgstr "Verde"
#: src/multiplay.cpp:2018 #: src/multiplay.cpp:2000
msgid "Orange" msgid "Orange"
msgstr "Naranja" msgstr "Naranja"
#: src/multiplay.cpp:2019 #: src/multiplay.cpp:2001
msgid "Grey" msgid "Grey"
msgstr "Gris" msgstr "Gris"
#: src/multiplay.cpp:2021 #: src/multiplay.cpp:2003
msgid "Red" msgid "Red"
msgstr "Rojo" msgstr "Rojo"
#: src/multiplay.cpp:2022 #: src/multiplay.cpp:2004
msgid "Blue" msgid "Blue"
msgstr "Azul" msgstr "Azul"
#: src/multiplay.cpp:2023 #: src/multiplay.cpp:2005
msgid "Pink" msgid "Pink"
msgstr "Rosa" msgstr "Rosa"
#: src/multiplay.cpp:2024 #: src/multiplay.cpp:2006
msgid "Cyan" msgid "Cyan"
msgstr "Cian" msgstr "Cian"
#: src/multiplay.cpp:2025 #: src/multiplay.cpp:2007
msgid "Yellow" msgid "Yellow"
msgstr "Amarillo" msgstr "Amarillo"
#: src/multiplay.cpp:2026 #: src/multiplay.cpp:2008
msgid "Purple" msgid "Purple"
msgstr "Púrpura" msgstr "Púrpura"
#: src/multiplay.cpp:2027 #: src/multiplay.cpp:2009
msgid "White" msgid "White"
msgstr "Blanco" msgstr "Blanco"
#: src/multiplay.cpp:2028 #: src/multiplay.cpp:2010
msgid "Bright blue" msgid "Bright blue"
msgstr "Azul Brillante" msgstr "Azul Brillante"
#: src/multiplay.cpp:2029 #: src/multiplay.cpp:2011
msgid "Neon green" msgid "Neon green"
msgstr "Verde Neón" msgstr "Verde Neón"
#: src/multiplay.cpp:2030 #: src/multiplay.cpp:2012
msgid "Infrared" msgid "Infrared"
msgstr "Infra-rojo" msgstr "Infra-rojo"
#: src/multiplay.cpp:2031 #: src/multiplay.cpp:2013
msgid "Ultraviolet" msgid "Ultraviolet"
msgstr "Ultravioleta" msgstr "Ultravioleta"
#: src/multiplay.cpp:2032 #: src/multiplay.cpp:2014
msgid "Brown" msgid "Brown"
msgstr "Marrón" msgstr "Marrón"
@ -15070,9 +15056,9 @@ msgstr " - Construido %s"
#. TRANSLATORS: This string looks as follows when expanded. #. TRANSLATORS: This string looks as follows when expanded.
#. "Version <version name/number> <working copy state><BUILD DATE><BUILD TYPE>" #. "Version <version name/number> <working copy state><BUILD DATE><BUILD TYPE>"
#: src/version.cpp:147 #: src/version.cpp:147
#, fuzzy, c-format #, c-format
msgid "Version %s%s%s%s" msgid "Version %s%s%s%s"
msgstr "Versión: %s-%s%s%s%s" msgstr "Versión: %s%s%s%s"
#~ msgid "Warzone 2100 is completely free and open source (FLOSS). Official site: http://wz2100.net/" #~ msgid "Warzone 2100 is completely free and open source (FLOSS). Official site: http://wz2100.net/"
#~ msgstr "Warzone 2100 es completamente gratuíto y de código abierto (FLOSS). Sitio Oficial: http://wz2100.net/" #~ msgstr "Warzone 2100 es completamente gratuíto y de código abierto (FLOSS). Sitio Oficial: http://wz2100.net/"

791
po/hu.po

File diff suppressed because it is too large Load Diff

View File

@ -18,7 +18,6 @@ autorevision.h autorevision.cache:
CLEANFILES = \ CLEANFILES = \
$(BUILT_SOURCES) \ $(BUILT_SOURCES) \
autorevision.cache \
autorevision.h.new \ autorevision.h.new \
$(MOCEDFILES) $(MOCEDFILES)

View File

@ -1185,6 +1185,20 @@ void aiUpdateDroid(DROID *psDroid)
} }
} }
/* Check if any of our weapons can hit the target... */
bool checkAnyWeaponsTarget(BASE_OBJECT *psObject, BASE_OBJECT *psTarget)
{
DROID *psDroid = (DROID *) psObject;
for (int i = 0;i < psDroid->numWeaps;i++)
{
if (validTarget(psObject, psTarget, i))
{
return true;
}
}
return false;
}
/* Set of rules which determine whether the weapon associated with the object can fire on the propulsion type of the target. */ /* Set of rules which determine whether the weapon associated with the object can fire on the propulsion type of the target. */
bool validTarget(BASE_OBJECT *psObject, BASE_OBJECT *psTarget, int weapon_slot) bool validTarget(BASE_OBJECT *psObject, BASE_OBJECT *psTarget, int weapon_slot)
{ {

View File

@ -83,7 +83,8 @@ bool aiChooseSensorTarget(BASE_OBJECT *psObj, BASE_OBJECT **ppsTarget);
/*set of rules which determine whether the weapon associated with the object /*set of rules which determine whether the weapon associated with the object
can fire on the propulsion type of the target*/ can fire on the propulsion type of the target*/
bool validTarget(BASE_OBJECT *psObject, BASE_OBJECT *psTarget, int weapon_slot); bool validTarget(BASE_OBJECT *psObject, BASE_OBJECT *psTarget, int weapon_slot);
// Check if any of the weapons can target the target
bool checkAnyWeaponsTarget(BASE_OBJECT *psObject, BASE_OBJECT *psTarget);
// Check properties of the AllianceType enum. // Check properties of the AllianceType enum.
static inline bool alliancesFixed(int t) { return t != ALLIANCES; } static inline bool alliancesFixed(int t) { return t != ALLIANCES; }
static inline bool alliancesSharedVision(int t) { return t == ALLIANCES_TEAMS || t == ALLIANCES_UNSHARED; } static inline bool alliancesSharedVision(int t) { return t == ALLIANCES_TEAMS || t == ALLIANCES_UNSHARED; }

View File

@ -549,6 +549,44 @@ bool CheckForMod(char *theMap)
return false; return false;
} }
// Mount the archive under the mountpoint, and enumerate the archive according to lookin
static bool CheckInMap(const char *archive, const char *mountpoint,const char *lookin)
{
bool mapmod = false;
if (!PHYSFS_mount(archive, mountpoint, PHYSFS_APPEND))
{
// We already checked to see if this was valid before, and now, something went seriously wrong.
debug(LOG_FATAL, "Could not mount %s, because: %s. Please delete the file, and run the game again. Game will now exit.", archive, PHYSFS_getLastError());
exit(-1);
}
char **filelist = PHYSFS_enumerateFiles(lookin);
for (char **file = filelist; *file != NULL; ++file)
{
if (PHYSFS_isDirectory(*file))
{
std::string checkfile = *file;
if (checkfile.compare("wrf")==0 || checkfile.compare("stats")==0 ||checkfile.compare("components")==0
|| checkfile.compare("anims")==0 || checkfile.compare("effects")==0 ||checkfile.compare("messages")==0
|| checkfile.compare("audio")==0 || checkfile.compare("sequenceaudio")==0 ||checkfile.compare("misc")==0
|| checkfile.compare("features")==0 || checkfile.compare("script")==0 ||checkfile.compare("structs")==0
|| checkfile.compare("tileset")==0 || checkfile.compare("images")==0 || checkfile.compare("texpages")==0 )
{
debug(LOG_WZ, "Detected: %s %s" , archive, checkfile.c_str());
mapmod = true;
break;
}
}
}
PHYSFS_freeList(filelist);
if (!PHYSFS_removeFromSearchPath(archive))
{
debug(LOG_ERROR, "Could not unmount %s, %s", archive, PHYSFS_getLastError());
}
return mapmod;
}
bool buildMapList() bool buildMapList()
{ {
@ -586,42 +624,18 @@ bool buildMapList()
if (PHYSFS_removeFromSearchPath(realFilePathAndName.c_str()) == 0) if (PHYSFS_removeFromSearchPath(realFilePathAndName.c_str()) == 0)
{ {
debug(LOG_ERROR, "Could not unmount %s", PHYSFS_getLastError()); debug(LOG_ERROR, "Could not unmount %s, %s", realFilePathAndName.c_str(), PHYSFS_getLastError());
}
// check what kind of map it is
if (!PHYSFS_mount(realFilePathAndName.c_str(), "WZMap", PHYSFS_APPEND))
{
debug(LOG_FATAL, "Could not mount %s, because: %s. Please delete the file, and run the game again. Game will now exit.", realFilePathAndName.c_str(), PHYSFS_getLastError());
exit(-1);
} }
filelist = PHYSFS_enumerateFiles("WZMap"); mapmod = CheckInMap(realFilePathAndName.c_str(), "WZMap", "WZMap");
for (char **file = filelist; *file != NULL; ++file) if (!mapmod)
{ {
if (PHYSFS_isDirectory(*file)) mapmod = CheckInMap(realFilePathAndName.c_str(), "WZMap", "WZMap/multiplay");
{ }
std::string checkfile = *file;
if (checkfile.compare("wrf")==0 || checkfile.compare("stats")==0 ||checkfile.compare("components")==0
|| checkfile.compare("anims")==0 || checkfile.compare("effects")==0 ||checkfile.compare("messages")==0
|| checkfile.compare("audio")==0 || checkfile.compare("sequenceaudio")==0 ||checkfile.compare("misc")==0
|| checkfile.compare("features")==0 || checkfile.compare("script")==0 ||checkfile.compare("structs")==0
|| checkfile.compare("tileset")==0 || checkfile.compare("images")==0 || checkfile.compare("texpages")==0 )
{
mapmod = true;
break;
}
}
}
PHYSFS_freeList(filelist);
CurrentMap.MapName = realFileName->c_str(); CurrentMap.MapName = realFileName->c_str();
CurrentMap.isMapMod = mapmod; CurrentMap.isMapMod = mapmod;
WZ_Maps.push_back(CurrentMap); WZ_Maps.push_back(CurrentMap);
if (PHYSFS_removeFromSearchPath(realFilePathAndName.c_str()) == 0)
{
debug(LOG_ERROR, "Could not unmount %s", PHYSFS_getLastError());
}
} }
return true; return true;

View File

@ -485,11 +485,11 @@ void loadMapPreview(bool hideInterface)
} }
if (psLevel->realFileName == NULL) if (psLevel->realFileName == NULL)
{ {
debug(LOG_INFO, "Loading map preview: \"%s\" builtin t%d", psLevel->pName, psLevel->dataDir); debug(LOG_WZ, "Loading map preview: \"%s\" builtin t%d", psLevel->pName, psLevel->dataDir);
} }
else else
{ {
debug(LOG_INFO, "Loading map preview: \"%s\" in (%s)\"%s\" %s t%d", psLevel->pName, PHYSFS_getRealDir(psLevel->realFileName), psLevel->realFileName, psLevel->realFileHash.toString().c_str(), psLevel->dataDir); debug(LOG_WZ, "Loading map preview: \"%s\" in (%s)\"%s\" %s t%d", psLevel->pName, PHYSFS_getRealDir(psLevel->realFileName), psLevel->realFileName, psLevel->realFileHash.toString().c_str(), psLevel->dataDir);
} }
rebuildSearchPath(psLevel->dataDir, false, psLevel->realFileName); rebuildSearchPath(psLevel->dataDir, false, psLevel->realFileName);
sstrcpy(aFileName, psLevel->apDataFiles[psLevel->game]); sstrcpy(aFileName, psLevel->apDataFiles[psLevel->game]);

View File

@ -1018,7 +1018,7 @@ void orderUpdateDroid(DROID *psDroid)
psFireTarget = psSpotter->psTarget[0]; psFireTarget = psSpotter->psTarget[0];
} }
if (psFireTarget && !psFireTarget->died) if (psFireTarget && !psFireTarget->died && checkAnyWeaponsTarget(psDroid, psFireTarget))
{ {
bAttack = false; bAttack = false;
if (isVtolDroid(psDroid)) if (isVtolDroid(psDroid))

View File

@ -27,90 +27,41 @@
#include "src/autorevision.h" #include "src/autorevision.h"
static const char vcs_date_cstr[] = VCS_DATE;
static const char vcs_branch_cstr[] = VCS_BRANCH; static const char vcs_branch_cstr[] = VCS_BRANCH;
static const char vcs_tag[] = VCS_TAG;
unsigned int version_getRevision() /** Composes a nicely formatted version string.
{ * Determine if we are on a tag (which will NOT show the hash)
return VCS_NUM; * or a branch (which WILL show the hash)
} * or in a detached state (which WILL show the hash)
*/
const char* version_getVersionString() const char *version_getVersionString()
{ {
static const char* version_string = NULL; static const char* version_string = NULL;
if (version_string == NULL) if (version_string == NULL)
{ {
if (strncmp(vcs_branch_cstr, "tags/", strlen("tags/")) == 0) if (strlen(vcs_tag))
{ {
version_string = vcs_branch_cstr + strlen("tags/"); version_string = vcs_tag;
} }
else if (strcmp(vcs_branch_cstr, "trunk") == 0) else if (strlen(vcs_branch_cstr))
{ {
version_string = "TRUNK " VCS_SHORT_HASH; version_string = (VCS_BRANCH " " VCS_SHORT_HASH);
}
else if (strncmp(vcs_branch_cstr, "branches/", strlen("branches/")) == 0)
{
version_string = (VCS_BRANCH " branch " VCS_SHORT_HASH) + strlen("branches/");
}
else if (strncmp(vcs_branch_cstr, "refs/heads/", strlen("refs/heads/")) == 0)
{
version_string = (VCS_BRANCH " branch " VCS_SHORT_HASH) + strlen("refs/heads/");
}
else if (VCS_NUM != 0)
{
version_string = VCS_BRANCH " " VCS_SHORT_HASH;
} }
else else
{ { // not a branch or a tag, so we are detached most likely.
version_string = VCS_SHORT_HASH; version_string = VCS_EXTRA;
} }
} }
return version_string; return version_string;
} }
bool version_modified() /** Composes a nicely formatted version string.
{ *
return VCS_WC_MODIFIED; */
} const char *version_getFormattedVersionString()
const char* version_getBuildDate()
{
return __DATE__;
}
const char* version_getBuildTime()
{
return __TIME__;
}
const char* version_getVcsDate()
{
#if (VCS_NUM == 0)
return "";
#else
static char vcs_date[sizeof(vcs_date_cstr) - 9] = { '\0' };
if (vcs_date[0] == '\0')
{
sstrcpy(vcs_date, vcs_date_cstr);
}
return vcs_date;
#endif
}
const char* version_getVcsTime()
{
#if (VCS_NUM == 0)
return "";
#else
return VCS_DATE + sizeof(VCS_DATE) - 8 - 1;
#endif
}
const char* version_getFormattedVersionString()
{ {
static char versionString[MAX_STR_LENGTH] = {'\0'}; static char versionString[MAX_STR_LENGTH] = {'\0'};
@ -122,7 +73,6 @@ const char* version_getFormattedVersionString()
#else #else
const char* wc_state = ""; const char* wc_state = "";
#endif #endif
// Compose the build type string // Compose the build type string
#ifdef DEBUG #ifdef DEBUG
const char* build_type = _(" - DEBUG"); const char* build_type = _(" - DEBUG");
@ -130,21 +80,10 @@ const char* version_getFormattedVersionString()
const char* build_type = ""; const char* build_type = "";
#endif #endif
const char* build_date = NULL;
if (strncmp(vcs_branch_cstr, "tags/", strlen("tags/")) != 0)
{
sasprintf((char**)&build_date, _(" - Built %s"), version_getBuildDate());
}
else
{
build_date = "";
}
// Construct the version string // Construct the version string
// TRANSLATORS: This string looks as follows when expanded. // TRANSLATORS: This string looks as follows when expanded.
// "Version <version name/number> <working copy state><BUILD DATE><BUILD TYPE>" // "Version <version name/number> <working copy state><BUILD DATE><BUILD TYPE>"
snprintf(versionString, MAX_STR_LENGTH, _("Version %s%s%s%s"), version_getVersionString(), wc_state, build_date, build_type); snprintf(versionString, MAX_STR_LENGTH, _("Version: %s,%s Built:%s%s"), version_getVersionString(), wc_state, __DATE__, build_type);
} }
return versionString; return versionString;

View File

@ -23,75 +23,7 @@
#include "lib/framework/types.h" #include "lib/framework/types.h"
/** Retrieve the low revision number extern const char *version_getVersionString(void);
* \return the lowest revision number of the working copy from which we built extern const char *version_getFormattedVersionString(void);
*/
extern unsigned int version_getLowRevision(void);
/** Retrieve the revision number
* \return the highest revision number of the working copy from which we built
*/
extern unsigned int version_getRevision(void);
/** Composes a simple version string.
*
* If we compiled from a tag, i.e. the checkout URI started with "tags/%s/",
* the resulting string will be the "%s" portion of the URI.
*
* When we compiled from a branch, i.e. the checkout URI started with
* "branches/%s/", the resulting string will be "%s branch <revision>".
*
* If we compiled from trunk, i.e. the checkout URI started with "trunk/",
* the resulting string will be "TRUNK <revision>".
*
* In all cases "<revision>" will be either "r<REVISION_NUMBER>" or
* "r<LOW_REVISION_NUMBER>:<HIGH_REVISION_NUMBER" in case of a mixed revision
* repository.
*/
extern const char* version_getVersionString(void);
/** Determines whether this version is compiled from a modified source tree.
* \return true if this version is compiled from modified sources, false when
* it is compiled from unmodified sources, or it cannot be determined
* whether changes have occurred.
*/
extern bool version_modified(void);
/** Retrieves the date at which this build was compiled.
* \return the date at which this build was made (uses __DATE__)
*/
extern const char* version_getBuildDate(void);
/** Retrieves the time at which this build was compiled.
* \return the time at which this build was made (uses __TIME__)
*/
extern const char* version_getBuildTime(void);
/** Retrieves the date at which the source of this build was committed.
* \return the date when this revision was committed to the subversion
* repository
*/
extern const char* version_getVcsDate(void);
/** Retrieves the time at which the source of this build was committed.
* \return the time when this revision was committed to the subversion
* repository
*/
extern const char* version_getVcsTime(void);
/** Composes a nicely formatted version string.
*
* It is formatted as follows:
* "Version <version string> <working copy state> - Built <DATE><BUILD TYPE>"
*
* - "<version string>" is the return value from version_getVersionString()
* - "<working copy state>" represents the modification and switch state
* of the working copy from which this build was made.
* - "<DATE>" the date of building as returned by version_getBuildDate() or
* version_getVcsDate(); the latter is only used when the working
* copy has no local modifications.
* - "<BUILD TYPE>" the type of build produced (i.e. DEBUG or not)
*/
extern const char* version_getFormattedVersionString(void);
#endif // __INCLUDED_VERSION_H__ #endif // __INCLUDED_VERSION_H__

View File

@ -135,15 +135,22 @@ TITLECODE titleLoop(void)
// then check --join and if neither, run the normal game menu. // then check --join and if neither, run the normal game menu.
if( hostlaunch ) if( hostlaunch )
{ {
NetPlay.bComms = true; // use network = true
NetPlay.isUPNP_CONFIGURED = false;
NetPlay.isUPNP_ERROR = false;
ingame.bHostSetup = true; ingame.bHostSetup = true;
bMultiPlayer = true; bMultiPlayer = true;
bMultiMessages = true; bMultiMessages = true;
game.type = SKIRMISH; // needed? NETinit(true);
NETdiscoverUPnPDevices();
game.type = SKIRMISH;
changeTitleMode(MULTIOPTION); changeTitleMode(MULTIOPTION);
hostlaunch = false; // reset the bool to default state. hostlaunch = false; // reset the bool to default state.
} }
else if(strlen(iptoconnect) ) else if(strlen(iptoconnect) )
{ {
NetPlay.bComms = true; // use network = true
NETinit(true);
joinGame(iptoconnect, 0); joinGame(iptoconnect, 0);
} }
else else