Skip to content

Commit

Permalink
Merge remote branch 'origin/master' into lua2
Browse files Browse the repository at this point in the history
Conflicts:
	autorevision.conf
	lib/Makefile.am
	lib/script/event.c
	src/scriptai.c
	src/scriptfuncs.c
	src/scriptfuncs.h
	src/scripttabs.c
  • Loading branch information
Cyp committed Dec 17, 2010
2 parents 8466fdd + 2bcb709 commit 498840b
Show file tree
Hide file tree
Showing 759 changed files with 80,659 additions and 60,921 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
*.pbxproj -crlf -diff -merge
*.pbxproj -crlf -merge
35 changes: 35 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ win32/libs/vorbis/*-stamp
win32/libs/vorbis/libvorbis-*/
win32/libs/zlib/*-stamp
win32/libs/zlib/zlib-*/
win32/debug/*
win32/release/*

# Autogenerated files:
*.lex.[ch]
Expand Down Expand Up @@ -174,6 +176,12 @@ tools/qwzm/ui_qwzm.h
/pkg/dpkg/warzone2100.substvars
/pkg/dpkg/warzone2100/

#Mac Stuff
.DS_Store
*.pbxuser
*.perspectivev3
macosx/configs/codeident

# build folders
/macosx/build/
/macosx/external/
Expand All @@ -184,3 +192,30 @@ tools/qwzm/ui_qwzm.h
/trunk
/newnet
/qt-trunk
/master
/3.0

#misc (MSVC)
*.orig
*.bak
*.exe
*.obj
*.suo
*.ncb
*.htm
*.mep
*.manifest
*.res
*.idb
*.pdb
*.diff
*.dep
*.user
data/*.dll
data/config/*
data/etc/*
data/fonts/
devpkg/*

# profiler stuff
win32/CodeAnalyst
4 changes: 3 additions & 1 deletion .hgignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Mac clutter
syntax: glob

# Mac clutter
.DS_Store
Icon?
._*
Expand All @@ -14,3 +15,4 @@ src/autorevision.h
macosx/build/*
macosx/external/*
macosx/prebuilt/*
macosx/configs/codeident
7 changes: 5 additions & 2 deletions COPYING.NONGPL
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
The following files are licensed other than under the GPL:

data/texpages/bdrops/backdrop5.png
data/texpages/bdrops/backdrop6.png
data/texpages/bdrops/backdrop0.png
data/texpages/bdrops/backdrop1.png
data/texpages/bdrops/backdrop2.png
- CC BY SA 3.0 - Copyright (c) 2007-2008 "B. V. Edwards" <cathuria>
data/texpages/bdrops/backdrop6.png
- CC0 - Copyright (c) 2010 jorzi
data/base/texpages/page-25-sky-urban.png
- CC BY 2.0 - Adapted from a photo Copyright (c) 2006 Mark A. Vargas
data/mods/global/newst_tiles/
Expand Down
29 changes: 28 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
SUBDIRS = build_tools win32 lib src data po doc icons pkg tests
SUBDIRS = \
build_tools/autorevision \
win32 \
lib/framework \
lib/exceptionhandler \
lib/script \
lib/sequence \
lib/iniparser \
lib/ivis_common \
lib/ivis_opengl \
lib/gamelib \
lib/sound \
lib/netplay \
lib/widget \
src \
data \
po \
doc \
icons \
pkg/nsis \
tests

dist_doc_DATA = \
AUTHORS \
Expand All @@ -23,3 +43,10 @@ EXTRA_DIST= \
# get rid of SVN stuff in the tarball
dist-hook:
rm -rf `find $(distdir) -type d -name .svn`

# HACK Don't give make errors when switching between trunk and branches.
# Works by finding the .deps/*.Po files which refer to source files that don't exist, and replacing them with a single dependency on the correct source file.
.PHONY: fixbrokendeps
fixbrokendeps:
$(srcdir)/fixbrokendependencies
all: fixbrokendeps
3 changes: 0 additions & 3 deletions build_tools/Makefile.am

This file was deleted.

63 changes: 56 additions & 7 deletions build_tools/autorevision/autorevision.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ using namespace std;
#include <windows.h>
inline void set_env(const char* k, const char* v) { SetEnvironmentVariableA(k, v); };
#ifdef _MSC_VER
// NOTE: Using STLport now, so need to include these extra headers
#include <stdio.h>
#include <stdlib.h>
#define popen _popen
#define pclose _pclose
#endif
Expand All @@ -62,6 +65,11 @@ class assign_once : public T
_assigned(false)
{}

const assign_once<T>& operator=(const assign_once<T>& data)
{
return *this = static_cast<const T&>(data);
}

const assign_once<T>& operator=(const T& data)
{
if (!_assigned)
Expand All @@ -88,12 +96,19 @@ class assign_once : public T
struct RevisionInformation
{
RevisionInformation() :
low_revision("unknown"),
revision("unknown"),
low_revisionCount("-1"),
revisionCount("-1"),
wc_modified(false),
wc_switched(false)
{}

assign_once<std::string> low_revision;
assign_once<std::string> revision;
assign_once<std::string> low_revisionCount;
assign_once<std::string> revisionCount;
assign_once<std::string> tag;

assign_once<std::string> date;

Expand Down Expand Up @@ -221,10 +236,11 @@ class RevGitQuery : public RevisionExtractor
virtual bool extractRevision(RevisionInformation& rev_info);

private:
std::string runCommand(char const *cmd) const;
std::string runCommand(char const *cmd);

private:
const std::string _workingDir;
int exitStatus;
};

class RevConfigFile : public RevisionExtractor
Expand Down Expand Up @@ -300,11 +316,15 @@ int main(int argc, char** argv)
RevConfigFile revRetr4(workingDir + "/autorevision.conf");
RevFileParse revRetr3(workingDir + "/_svn/entries", &revRetr4);
RevFileParse revRetr2(workingDir + "/.svn/entries", &revRetr3);
/*
RevGitSVNQuery revRetr2_2(workingDir, &revRetr2);
RevGitQuery revRetr2_1(workingDir, &revRetr2_2);
RevSVNQuery revRetr1(workingDir, &revRetr2_1);
RevSVNVersionQuery revRetr(workingDir, &revRetr1);
*/
// Don't check SVN, since something is modifying wc_modified, which isn't an assign_once, and couldn't be bothered to fix it.
RevGitQuery revRetr(workingDir, &revRetr2);

// Strings to extract Subversion information we want into
RevisionInformation rev_info;
Expand All @@ -321,6 +341,9 @@ int main(int argc, char** argv)
if (rev_info.date == "")
rev_info.date = "0000-00-00 00:00:00";

rev_info.low_revisionCount = rev_info.low_revision;
rev_info.revisionCount = rev_info.revision;

WriteOutput(outputFile, rev_info);

return 0;
Expand Down Expand Up @@ -607,8 +630,10 @@ bool RevGitSVNQuery::extractRevision(RevisionInformation& rev_info)
return RevisionExtractor::extractRevision(rev_info);
}

std::string RevGitQuery::runCommand(char const *cmd) const
std::string RevGitQuery::runCommand(char const *cmd)
{
exitStatus = -1;

std::string result;

const string cwd(GetWorkingDir());
Expand All @@ -632,7 +657,7 @@ std::string RevGitQuery::runCommand(char const *cmd) const
removeAfterNewLine(result);
}

pclose(process);
exitStatus = pclose(process);

return result;
}
Expand All @@ -648,13 +673,33 @@ bool RevGitQuery::extractRevision(RevisionInformation& rev_info)
{
// This command will return without success if the working copy is
// changed, whether checked into index or not.
rev_info.wc_modified = system("git diff --quiet HEAD");
runCommand("git diff --quiet HEAD");
rev_info.wc_modified = exitStatus != 0;
}
}
std::string tag = runCommand("git describe --exact-match --tags");
if (!tag.empty())
{
rev_info.tag = tag;
}
std::string branch = runCommand("git symbolic-ref HEAD");
if (!branch.empty())
{
rev_info.wc_uri = branch;
rev_info.tag = branch;
}
std::string revCount = runCommand("git rev-list --count HEAD");
if (!revCount.empty())
{
rev_info.low_revisionCount = revCount;
rev_info.revisionCount = revCount;
}
rev_info.low_revisionCount = "-42";
rev_info.revisionCount = "-42";
std::string date = runCommand("git log -1 --pretty=format:%ci");
if (!date.empty())
{
rev_info.date = date;
}

// The working copy URI still needs to be extracted. "svnversion" cannot
Expand Down Expand Up @@ -804,12 +849,16 @@ bool WriteOutput(const string& outputFile, const RevisionInformation& rev_info)
if(do_wx)
header << "#include <wx/string.h>\n";

header << "\n#define SVN_LOW_REV " << integerOnly(rev_info.low_revision.empty() ? rev_info.revision : rev_info.low_revision)
header << "\n#define SVN_LOW_REV " << (rev_info.low_revisionCount.empty() ? rev_info.revisionCount : rev_info.low_revisionCount)
<< "\n#define SVN_LOW_REV_STR \"" << (rev_info.low_revision.empty() ? rev_info.revision : rev_info.low_revision) << "\""
<< "\n#define SVN_REV " << integerOnly(rev_info.revision)
<< "\n#define SVN_REV " << rev_info.revisionCount
<< "\n#define SVN_REV_STR \"" << rev_info.revision << "\""
<< "\n#define SVN_DATE \"" << rev_info.date << "\""
<< "\n#define SVN_URI \"" << rev_info.wc_uri << "\"\n";
<< "\n#define SVN_URI \"" << rev_info.wc_uri << "\""
<< "\n#define SVN_TAG \"" << rev_info.tag << "\"\n"
<< "\n#define SVN_SHORT_HASH \"" << rev_info.revision.substr(0, 7) << "\""
<< "\n#define SVN_SHORT_HASH_WITHOUT_QUOTES " << rev_info.revision.substr(0, 7)
<< "\n";

header << "\n#define SVN_WC_MODIFIED " << rev_info.wc_modified
<< "\n#define SVN_WC_SWITCHED " << rev_info.wc_switched << "\n\n";
Expand Down
1 change: 1 addition & 0 deletions build_tools/changelog2bbcode.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/sh
sed -e 's/r\([0-9]\+\)/[rev]\1[\/rev]/g' \
-e 's/ticket:\([0-9]\+\)/[ticket]\1[\/ticket]/g'\
-e 's/commit:\(\([a-f0-9]\{10\}\)[a-f0-9]\{30\}\)/[url=http:\/\/developer.wz2100.net\/changeset\/\1]\2[\/url]/g' \
-e 's/\ \ \*/\ */g' \
-e 's/^\ \*\ \(.*\):/\n[\/list][b]\1[\/b][list]/g' \
-e 's/^\ \ \*/\ [*]/'
8 changes: 2 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AC_PREREQ([2.56])
AC_INIT([Warzone 2100],[TRUNK],[http://wz2100.net/],[warzone2100])
AC_INIT([Warzone 2100],[master],[http://wz2100.net/],[warzone2100])

AM_INIT_AUTOMAKE([1.10 tar-ustar])

Expand Down Expand Up @@ -230,7 +230,7 @@ else
fi

WZ_WARNINGS_GCC="-Wall -Wextra ${WZ_Wno_}unused-parameter ${WZ_Wno_}sign-compare -Wcast-align -Wwrite-strings -Wpointer-arith ${WZ_Wno_}format-security"
WZ_WARNINGS_GCC_C="${WZ_WARNINGS_GCC} ${WZ_Wno_}pointer-to-int-cast ${WZ_Wno_}strict-aliasing -Wstrict-prototypes -Wdeclaration-after-statement -Wc++-compat ${WZ_Wno_}c++-compat ${CFLAGS_IGNORE_WARNINGS}"
WZ_WARNINGS_GCC_C="${WZ_WARNINGS_GCC} -Wstrict-prototypes -Wdeclaration-after-statement -Wc++-compat ${WZ_Wno_}c++-compat ${CFLAGS_IGNORE_WARNINGS}"
WZ_WARNINGS_GCC_CXX="${WZ_WARNINGS_GCC}"
if test "x$enable_debug" = "xyes" ; then
if test "x$cc_icc" = "xyes" ; then
Expand Down Expand Up @@ -462,18 +462,14 @@ AC_CONFIG_HEADER([config.h])
AC_CONFIG_FILES([Makefile
po/Makefile.in
doc/Makefile
build_tools/Makefile
build_tools/autorevision/Makefile
icons/Makefile
data/Makefile
data/mods/Makefile
data/mods/multiplay/Makefile
data/music/Makefile
pkg/Makefile
pkg/nsis/Makefile
win32/Makefile
tests/Makefile
lib/Makefile
lib/framework/Makefile
lib/exceptionhandler/Makefile
lib/gamelib/Makefile
Expand Down
3 changes: 2 additions & 1 deletion data/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SUBDIRS = mods music
SUBDIRS = mods/multiplay music

stamp:
touch stamp
Expand Down Expand Up @@ -28,6 +28,7 @@ BASELIST = \
structs \
tagdefinitions \
texpages \
tileset \
wrf

PATCHLIST = \
Expand Down
2 changes: 1 addition & 1 deletion data/base/components/bodies/cybd_run.pie
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,4 @@ POLYGONS 8
200 4 15 14 13 12 102 186 106 186 106 199 102 199
200 4 19 18 17 16 102 186 98 186 98 199 102 199
200 4 22 21 20 13 57 201 50 201 50 214 57 214
200 4 25 24 12 23 50 187 57 187 57 200 50 200
200 4 25 24 12 23 50 187 57 187 57 200 50 200
12 changes: 6 additions & 6 deletions data/base/components/bodies/cybdpair.pie
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PIE 2
TYPE 200
TYPE 10200
TEXTURE 0 page-14-droid-hubs.png 256 256
LEVELS 1
LEVEL 1
Expand Down Expand Up @@ -72,13 +72,13 @@ POLYGONS 21
200 4 19 18 17 16 102 186 98 186 98 199 102 199
200 4 22 21 20 13 57 201 50 201 50 214 57 214
200 4 25 24 12 23 50 187 57 187 57 200 50 200
4200 4 29 28 27 26 8 1 19 17 19 246 1 246 1 230 19 230
4200 4 33 32 31 30 8 1 19 17 1 215 19 215 19 231 1 231
4200 4 37 36 35 34 8 1 9 15 57 200 66 200 66 214 57 214
4200 4 41 40 39 38 8 1 9 9 9 246 9 255 0 255 0 246
200 4 29 28 27 26 19 246 1 246 1 230 19 230
200 4 33 32 31 30 1 215 19 215 19 231 1 231
200 4 37 36 35 34 57 200 66 200 66 214 57 214
200 4 41 40 39 38 9 246 9 255 0 255 0 246
200 4 42 43 44 45 130 210 139 210 139 200 130 200
200 4 45 44 43 42 130 200 139 200 139 210 130 210
4200 4 48 47 46 11 8 1 9 15 66 200 57 200 57 214 66 214
200 4 48 47 46 11 66 200 57 200 57 214 66 214
200 4 52 51 50 49 137 197 137 186 126 186 126 197
200 4 56 55 54 53 118 186 112 186 112 197 118 197
200 4 57 56 50 51 137 186 124 186 127 190 137 190
Expand Down
Loading

0 comments on commit 498840b

Please sign in to comment.