merge Medo's GSoC work hedgeroid
authorXeli
Sun, 28 Oct 2012 15:12:37 +0100
branchhedgeroid
changeset 7857 2bc61f8841a1
parent 7855 ddcdedd3330b (current diff)
parent 7695 6237d2f002ba (diff)
child 7859 519d5bc91dd3
merge Medo's GSoC work
.hgignore
QTfrontend/CMakeLists.txt
QTfrontend/game.cpp
QTfrontend/net/newnetclient.h
hedgewars/hwengine.pas
hedgewars/uLandTemplates.pas
hedgewars/uStats.pas
project_files/Android-build/SDL-android-project/res/drawable-mdpi/backbutton.png
project_files/Android-build/SDL-android-project/res/drawable-mdpi/dropdown.9.png
project_files/Android-build/SDL-android-project/res/drawable-mdpi/savebutton.png
project_files/Android-build/SDL-android-project/res/drawable-mdpi/teamcount.xml
project_files/Android-build/SDL-android-project/res/drawable-mdpi/teamcount0.png
project_files/Android-build/SDL-android-project/res/drawable-mdpi/teamcount1.png
project_files/Android-build/SDL-android-project/res/drawable-mdpi/teamcount2.png
project_files/Android-build/SDL-android-project/res/drawable-mdpi/teamcount3.png
project_files/Android-build/SDL-android-project/res/drawable-mdpi/teamcount4.png
project_files/Android-build/SDL-android-project/res/drawable-mdpi/teamcount5.png
project_files/Android-build/SDL-android-project/res/drawable-mdpi/teamcount6.png
project_files/Android-build/SDL-android-project/res/drawable-mdpi/teamcount7.png
project_files/Android-build/SDL-android-project/res/drawable-mdpi/teamcount8.png
project_files/Android-build/SDL-android-project/res/drawable-mdpi/teamcount9.png
project_files/Android-build/SDL-android-project/res/layout/backbutton.xml
project_files/Android-build/SDL-android-project/res/layout/config.xml
project_files/Android-build/SDL-android-project/res/layout/main.xml
project_files/Android-build/SDL-android-project/res/layout/savebutton.xml
project_files/Android-build/SDL-android-project/res/layout/starting_game.xml
project_files/Android-build/SDL-android-project/res/layout/team_selection_dialog.xml
project_files/Android-build/SDL-android-project/res/layout/team_selector.xml
project_files/Android-build/SDL-android-project/res/raw/basicflags.xml
project_files/Android-build/SDL-android-project/res/raw/scheme_barrelmayhem.xml
project_files/Android-build/SDL-android-project/res/raw/scheme_cleanslate.xml
project_files/Android-build/SDL-android-project/res/raw/scheme_default_scheme.xml
project_files/Android-build/SDL-android-project/res/raw/scheme_fortmode.xml
project_files/Android-build/SDL-android-project/res/raw/scheme_kingmode.xml
project_files/Android-build/SDL-android-project/res/raw/scheme_minefield.xml
project_files/Android-build/SDL-android-project/res/raw/scheme_promode.xml
project_files/Android-build/SDL-android-project/res/raw/scheme_shoppa.xml
project_files/Android-build/SDL-android-project/res/raw/scheme_thinkingwithportals.xml
project_files/Android-build/SDL-android-project/res/raw/scheme_timeless.xml
project_files/Android-build/SDL-android-project/res/raw/scheme_tunnelhogs.xml
project_files/Android-build/SDL-android-project/res/raw/team_one.xml
project_files/Android-build/SDL-android-project/res/raw/team_two.xml
project_files/Android-build/SDL-android-project/res/raw/weapon_clean
project_files/Android-build/SDL-android-project/res/raw/weapon_crazy
project_files/Android-build/SDL-android-project/res/raw/weapon_default
project_files/Android-build/SDL-android-project/res/raw/weapon_mines
project_files/Android-build/SDL-android-project/res/raw/weapon_portals
project_files/Android-build/SDL-android-project/res/raw/weapon_promode
project_files/Android-build/SDL-android-project/res/raw/weapon_shoppa
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/GameMode.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/Grave.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/Map.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/Weapon.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/EngineProtocol/EngineProtocolNetwork.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/EngineProtocol/GameConfig.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/StartGameActivity.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/TeamSelectionActivity.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Utils.java
--- a/.hgignore	Sun Oct 28 13:28:23 2012 +0100
+++ b/.hgignore	Sun Oct 28 15:12:37 2012 +0100
@@ -41,7 +41,7 @@
 glob:*.rej
 glob:project_files/Android-build/SDL-android-project/jni/**
 glob:project_files/Android-build/SDL-android-project/obj
-glob:project_files/Android-build/SDL-android-project/libs
+glob:project_files/Android-build/SDL-android-project/libs/armeabi*
 glob:project_files/Android-build/SDL-android-project/bin
 glob:project_files/Android-build/SDL-android-project/gen
 glob:project_files/Android-build/SDL-android-project/local.properties
--- a/QTfrontend/CMakeLists.txt	Sun Oct 28 13:28:23 2012 +0100
+++ b/QTfrontend/CMakeLists.txt	Sun Oct 28 15:12:37 2012 +0100
@@ -140,7 +140,6 @@
     achievements.h
     binds.h
     ui_hwform.h
-    KB.h
     hwconsts.h
     sdlkeys.h
     campaign.h
--- a/QTfrontend/game.cpp	Sun Oct 28 13:28:23 2012 +0100
+++ b/QTfrontend/game.cpp	Sun Oct 28 15:12:37 2012 +0100
@@ -28,7 +28,6 @@
 #include "gameuiconfig.h"
 #include "gamecfgwidget.h"
 #include "teamselect.h"
-#include "KB.h"
 #include "proto.h"
 #include "campaign.h"
 
@@ -230,20 +229,6 @@
             emit ErrorMessage(QString("Last two engine messages:\n") + QString().append(msg.mid(2)).left(size - 4));
             return;
         }
-        case 'K':
-        {
-            ulong kb = msg.mid(2).toULong();
-            if (kb==1)
-            {
-                qWarning("%s", KBMessages[kb - 1].toLocal8Bit().constData());
-                return;
-            }
-            if (kb && kb <= KBmsgsCount)
-            {
-                emit ErrorMessage(KBMessages[kb - 1]);
-            }
-            return;
-        }
         case 'i':
         {
             emit GameStats(msg.at(2), QString::fromUtf8(msg.mid(3)));
@@ -269,7 +254,6 @@
             int size = msg.size();
             QString msgbody = QString::fromUtf8(msg.mid(2).left(size - 4));
             emit SendChat(msgbody);
-            // FIXME: /me command doesn't work here
             QByteArray buf;
             HWProto::addStringToBuffer(buf, "s" + HWProto::formatChatMsg(config->netNick(), msgbody) + "\x20\x20");
             demo.append(buf);
@@ -296,8 +280,7 @@
             {
                 emit SendNet(msg);
             }
-            if (msg.at(1) != 's')
-                demo.append(msg);
+            demo.append(msg);
         }
     }
 }
--- a/QTfrontend/net/newnetclient.h	Sun Oct 28 13:28:23 2012 +0100
+++ b/QTfrontend/net/newnetclient.h	Sun Oct 28 15:12:37 2012 +0100
@@ -74,27 +74,6 @@
         QSortFilterProxyModel * m_lobbyPlayersModel;
         QSortFilterProxyModel * m_roomPlayersModel;
 
-        template <typename T>
-        void SendCfgStrNet(T a)
-        {
-            QByteArray strmsg;
-            strmsg.append(a);
-            quint8 sz = strmsg.size();
-            QByteArray enginemsg = QByteArray((char *)&sz, 1) + strmsg;
-            QString _msg = delimeter + QString(enginemsg.toBase64());
-            RawSendNet(_msg);
-        }
-
-        template <typename T>
-        void SendCfgStrLoc(T a)
-        {
-            QByteArray strmsg;
-            strmsg.append(QString(a).toUtf8());
-            quint8 sz = strmsg.size();
-            QByteArray enginemsg = QByteArray((char *)&sz, 1) + strmsg;
-            emit FromNet(enginemsg);
-        }
-
         QStringList cmdbuf;
 
         void RawSendNet(const QString & buf);
--- a/hedgewars/hwLibrary.pas	Sun Oct 28 13:28:23 2012 +0100
+++ b/hedgewars/hwLibrary.pas	Sun Oct 28 15:12:37 2012 +0100
@@ -99,14 +99,18 @@
     JNI_HW_versionInfoVersion := envderef^.NewStringUTF(env, PChar(cVersionString));
 end;
 
+procedure JNI_HW_GenLandPreview(env: PJNIEnv; c: JClass; port: JInt); cdecl;
+begin
+	GenLandPreview(port);
+end;
+
 exports
     JNI_HW_versionInfoNet name Java_Prefix+'HWversionInfoNetProto', 
     JNI_HW_versionInfoVersion name Java_Prefix+'HWversionInfoVersion', 
-    GenLandPreview name Java_Prefix + 'GenLandPreview',
+    JNI_HW_GenLandPreview name Java_Prefix + 'HWGenLandPreview',
     HW_getNumberOfweapons name Java_Prefix + 'HWgetNumberOfWeapons',
     HW_getMaxNumberOfHogs name Java_Prefix + 'HWgetMaxNumberOfHogs',
     HW_getMaxNumberOfTeams name Java_Prefix + 'HWgetMaxNumberOfTeams',
-    HW_terminate name Java_Prefix + 'HWterminate',
     Game;
 {$ELSE}
 exports
--- a/hedgewars/hwengine.pas	Sun Oct 28 13:28:23 2012 +0100
+++ b/hedgewars/hwengine.pas	Sun Oct 28 15:12:37 2012 +0100
@@ -269,7 +269,7 @@
         CurrTime:= SDL_GetTicks();
         if PrevTime + longword(cTimerInterval) <= CurrTime then
         begin
-            isTerminated:= DoTimer(CurrTime - PrevTime);
+            isTerminated := isTerminated or DoTimer(CurrTime - PrevTime);
             PrevTime:= CurrTime
         end
         else SDL_Delay(1);
--- a/hedgewars/uLand.pas	Sun Oct 28 13:28:23 2012 +0100
+++ b/hedgewars/uLand.pas	Sun Oct 28 15:12:37 2012 +0100
@@ -124,7 +124,7 @@
     SDL_FreeSurface(tmpsurf);
 end;
 
-procedure SetPoints(var Template: TEdgeTemplate; var pa: TPixAr);
+procedure SetPoints(var Template: TEdgeTemplate; var pa: TPixAr; fps: PPointArray);
 var i: LongInt;
 begin
 with Template do
@@ -145,7 +145,7 @@
                if pa.ar[i].x <> NTPX then
                    pa.ar[i].x:= LAND_WIDTH - 1 - pa.ar[i].x;
             for i:= 0 to pred(FillPointsCount) do
-                FillPoints^[i].x:= LAND_WIDTH - 1 - FillPoints^[i].x;
+                fps^[i].x:= LAND_WIDTH - 1 - fps^[i].x;
             end;
 
 (*  Experiment in making this option more useful
@@ -178,9 +178,9 @@
             end;
         for i:= 0 to pred(FillPointsCount) do
             begin
-            dec(FillPoints^[i].y, 100);
-            if FillPoints^[i].y < 0 then
-                FillPoints^[i].y:= 0;
+            dec(fps^[i].y, 100);
+            if fps^[i].y < 0 then
+                fps^[i].y:= 0;
             end;
         end;
 
@@ -189,7 +189,7 @@
         for i:= 0 to pred(BasePointsCount) do
             pa.ar[i].y:= LAND_HEIGHT - 1 - pa.ar[i].y;
         for i:= 0 to pred(FillPointsCount) do
-            FillPoints^[i].y:= LAND_HEIGHT - 1 - FillPoints^[i].y;
+            fps^[i].y:= LAND_HEIGHT - 1 - fps^[i].y;
         end;
     end
 end;
@@ -199,13 +199,15 @@
 var pa: TPixAr;
     i: Longword;
     y, x: Longword;
+    fps: TPointArray;
 begin
+    fps:=Template.FillPoints^;
     ResizeLand(Template.TemplateWidth, Template.TemplateHeight);
     for y:= 0 to LAND_HEIGHT - 1 do
         for x:= 0 to LAND_WIDTH - 1 do
             Land[y, x]:= lfBasic;
     {$HINTS OFF}
-    SetPoints(Template, pa);
+    SetPoints(Template, pa, @fps);
     {$HINTS ON}
     for i:= 1 to Template.BezierizeCount do
         begin
@@ -222,7 +224,7 @@
 
     with Template do
         for i:= 0 to pred(FillPointsCount) do
-            with FillPoints^[i] do
+            with fps[i] do
                 FillLand(x, y);
 
     DrawEdge(pa, lfBasic);
--- a/hedgewars/uLandTemplates.pas	Sun Oct 28 13:28:23 2012 +0100
+++ b/hedgewars/uLandTemplates.pas	Sun Oct 28 15:12:37 2012 +0100
@@ -24,10 +24,12 @@
 
 const NTPX = Low(SmallInt);
 
-type TPointArray = array[0..64] of TSDL_Rect;
+type TRectArray = array[0..64] of TSDL_Rect;
+     PRectArray = ^TRectArray;
+     TPointArray = array[0..64] of TPoint;
      PPointArray = ^TPointArray;
      TEdgeTemplate = record
-                     BasePoints: PPointArray;
+                     BasePoints: PRectArray;
                      BasePointsCount: Longword;
                      FillPoints: PPointArray;
                      FillPointsCount: Longword;
--- a/hedgewars/uStats.pas	Sun Oct 28 13:28:23 2012 +0100
+++ b/hedgewars/uStats.pas	Sun Oct 28 15:12:37 2012 +0100
@@ -185,10 +185,12 @@
 begin
 if time > 4000 then
     begin
+	{$IFNDEF MOBILE}
     writeln(stdout, 'FLIGHT');
     writeln(stdout, Gear^.Hedgehog^.Team^.TeamName);
     writeln(stdout, inttostr(time));
     writeln(stdout, '');
+	{$ENDIF}
     end
 end;
 
@@ -290,6 +292,7 @@
 if KilledHHs > 0 then
     SendStat(siKilledHHs, IntToStr(KilledHHs));
 
+{$IFNDEF MOBILE}
 // now to console
 if winnersClan <> nil then 
     begin
@@ -301,6 +304,7 @@
     writeln(stdout, 'DRAW');
 
 writeln(stdout, '');
+{$ENDIF}
 end;
 
 procedure initModule;
--- a/project_files/Android-build/CMakeLists.txt	Sun Oct 28 13:28:23 2012 +0100
+++ b/project_files/Android-build/CMakeLists.txt	Sun Oct 28 15:12:37 2012 +0100
@@ -32,7 +32,7 @@
 endif()
 
 if(NOT ANDROID_NDK_TOOLCHAINDIR)
-    set(toolchainbase "${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.4.3/prebuilt")
+    set(toolchainbase "${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.6/prebuilt")
     find_path(ANDROID_NDK_TOOLCHAINDIR arm-linux-androideabi
                 "${toolchainbase}/linux-x86"
                 "${toolchainbase}/windows")
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/Licenses/Android Support library/NOTICE.txt	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,195 @@
+Notice for all the files in this folder.
+------------------------------------------------------------
+
+
+
+   Copyright (c) 2005-2008, The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/Licenses/ini4j/LICENSE.txt	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/Licenses/ini4j/NOTICE.txt	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,13 @@
+Copyright 2005,2009 Ivan SZKIBA
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
\ No newline at end of file
--- a/project_files/Android-build/SDL-android-project/AndroidManifest.xml	Sun Oct 28 13:28:23 2012 +0100
+++ b/project_files/Android-build/SDL-android-project/AndroidManifest.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -1,54 +1,105 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-      package="org.hedgewars.hedgeroid"
-      android:versionCode="8"
-      android:installLocation="preferExternal" android:versionName="0.2">
-    <uses-sdk android:targetSdkVersion="14" android:minSdkVersion="7"></uses-sdk>
-    <uses-permission android:name="android.permission.INTERNET"></uses-permission>
-    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
-    <application android:label="@string/app_name" android:icon="@drawable/icon">
-        <activity android:name=".MainActivity"
-                  android:label="@string/app_name"
- 		  		  android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
+    package="org.hedgewars.hedgeroid"
+    android:installLocation="preferExternal"
+    android:versionCode="8"
+    android:versionName="0.2" >
+
+    <uses-sdk
+        android:minSdkVersion="7"
+        android:targetSdkVersion="14" >
+    </uses-sdk>
+
+    <uses-permission android:name="android.permission.INTERNET" >
+    </uses-permission>
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" >
+    </uses-permission>
+
+    <application
+        android:icon="@drawable/icon"
+        android:label="@string/app_name" >
+        <activity
+            android:name=".MainActivity"
+            android:label="@string/app_name"
+            android:screenOrientation="landscape" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
-        <activity android:name=".SDLActivity"
-                  android:label="@string/app_name"
- 		  android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
-		  android:screenOrientation='landscape'>
+        <activity
+            android:name=".SDLActivity"
+            android:label="@string/app_name"
+            android:screenOrientation="landscape"
+            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
+        </activity>
+        <activity
+            android:name=".Downloader.DownloadFragment"
+            android:label="@string/app_name"
+            android:theme="@android:style/Theme.Dialog" >
         </activity>
-        
-        <activity android:name=".Downloader.DownloadFragment"
-                  android:label="@string/app_name"
-				  android:theme="@android:style/Theme.Dialog">
+        <activity
+            android:name=".Downloader.DownloadListActivity"
+            android:label="@string/app_name"
+            android:launchMode="singleTop"
+            android:screenOrientation="landscape"
+            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />
+
+        <service android:name=".Downloader.DownloadService" />
+		
+        <activity
+            android:name=".LocalRoomActivity"
+            android:label="@string/app_name"
+            android:screenOrientation="landscape" >
+        </activity>
+        <activity
+            android:name=".TeamListActivity"
+            android:label="@string/app_name"
+            android:screenOrientation="landscape"
+            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
         </activity>
-        
-        <activity android:name=".Downloader.DownloadListActivity"
-                  android:label="@string/app_name"
-				  android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
-				  android:screenOrientation='landscape'
-				  android:launchMode="singleTop"/>
-        
-        <service android:name=".Downloader.DownloadService"/>
-        
-        <activity android:name="StartGameActivity"
-                  android:label="@string/app_name"
-				  android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
-				  android:screenOrientation='landscape'>
+        <activity
+            android:name="TeamCreatorActivity"
+            android:label="@string/app_name"
+            android:screenOrientation="landscape"
+            android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
+            android:windowSoftInputMode="stateUnchanged" >
+        </activity>
+        <activity
+            android:name=".LobbyActivity"
+            android:label="@string/title_activity_lobby"
+            android:screenOrientation="landscape"
+            android:windowSoftInputMode="adjustPan" >
+        </activity>
+        <activity
+            android:name=".NetRoomActivity"
+            android:label="@string/title_activity_room"
+            android:screenOrientation="landscape"
+            android:windowSoftInputMode="adjustPan" >
         </activity>
-        <activity android:name="TeamSelectionActivity"
-                  android:label="@string/app_name"
-				  android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
-				  android:screenOrientation='landscape'>
+        <activity
+            android:name=".WeaponsetListActivity"
+            android:label="@string/title_activity_weaponset_list"
+            android:screenOrientation="landscape"
+            android:windowSoftInputMode="adjustPan" >
+        </activity>
+        <activity
+            android:name=".WeaponsetCreatorActivity"
+            android:label="@string/title_activity_weaponset_creator"
+            android:screenOrientation="landscape"
+            android:windowSoftInputMode="adjustPan" >
         </activity>
-        <activity android:name="TeamCreatorActivity"
-                  android:label="@string/app_name"
-				  android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
-				  android:screenOrientation='landscape'
-				  android:windowSoftInputMode="stateUnchanged">
+        <activity
+            android:name=".SchemeListActivity"
+            android:label="@string/title_activity_scheme_list"
+            android:screenOrientation="landscape"
+            android:windowSoftInputMode="adjustPan" >
+        </activity>
+        <activity
+            android:name=".SchemeCreatorActivity"
+            android:label="@string/title_activity_scheme_creator"
+            android:screenOrientation="landscape"
+            android:windowSoftInputMode="adjustPan" >
         </activity>
     </application>
-</manifest> 
+</manifest>
\ No newline at end of file
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Airplane.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/AmmoMenu/Ammos.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/AmmoMenu/Ammos_bw.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_42.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_anarchy.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_balrog.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_bars.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_birdy.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_bloodyblade.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_brittany.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_bustamove.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_cog.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_crossedswords.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_dragonrb.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_earth.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_earth2.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_eyeofhorus.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_face.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_fcw.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_female.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_galaxy.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_hax0r.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_hurrah.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_iluvu.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_lips.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_magicskull.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_male.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_mog.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_music.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_pacman.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_pacman2.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_pentagram.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_pirate.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_pokemon.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_scout.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_shoppa.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_sonic.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_spider.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_star.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_swordshield.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_swordshield2.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_vampire.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Flags/cm_yinyang.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Graves/Badger.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Graves/Cherry.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Graves/Duck2.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Graves/Earth.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Graves/Egg.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Graves/Flower.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Graves/Ghost.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Graves/Grave.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Graves/Plinko.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Graves/Rip.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Graves/Rubberduck.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Graves/Simple.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Graves/Statue.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Graves/bp2.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Graves/bubble.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Graves/chest.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Graves/coffin.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Graves/deadhog.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Graves/eyecross.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Graves/heart.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Graves/money.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Graves/mouton1.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Graves/octopus.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Graves/plant2.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Graves/plant3.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Graves/pokeball.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Graves/pyramid.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Graves/ring.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Graves/skull.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Graves/star.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Hats/android.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Hedgehog/amKamikaze.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Hedgehog/amSineGun.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/LandIce.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Molotov.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Progress.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/RCPlane.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Snow.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/SuddenDeath/SDFlake.png has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/botlevels.png has changed
--- a/project_files/Android-build/SDL-android-project/assets/Data/Locale/en.txt	Sun Oct 28 13:28:23 2012 +0100
+++ b/project_files/Android-build/SDL-android-project/assets/Data/Locale/en.txt	Sun Oct 28 15:12:37 2012 +0100
@@ -79,6 +79,7 @@
 01:18=High
 01:19=Extreme
 01:20=%1 Bounce
+01:21=Audio Muted
 
 ; Event messages
 ; Hog (%1) died
@@ -491,7 +492,7 @@
 04:36=Well, sometimes you're just too bad in aiming. Get|some assistance using modern day technology.|Attack: Activate
 04:37=Don't fear the daylight. It will just last one turn|but will enable you to absorb the damage you do to|other hogs.|Attack: Activate
 04:38=The sniper rifle can be the most devastating weapon|in your whole arsenal, however it's very ineffective|at close quarters. The damage dealt increases with|the distance to its target.|Attack: Shoot (twice)
-04:39=Fly to other parts of the map using the flying|saucer. This hard to master utility is able to|take you to almost any position on the battlefield.|Attack: Activate|Up/Left/Right: Apply force in one direction|Long Jump: Drop grenades or similar weapons
+04:39=Fly to other parts of the map using the flying|saucer. This hard to master utility can|take you to almost any position on the battlefield.|Attack: Activate|Up/Left/Right: Apply force in one direction|Long Jump: Drop grenades or similar weapons
 04:40=Set some ground on fire using this bottle filled|with (soon to be) burning liquid.|Attack: Hold to shoot with more power
 04:41=The evidence nature might even top the flying|saucer. Birdy can carry your hog around and|drop eggs on your enemies!|Be quick, as using Birdy eats into your turn|time!|Attack: Activate and drop eggs|Up/Left/Right: Flap in one direction
 04:42=This portable portal device is capable|of instantly transporting you, your enemies,|or your weaponry between two points on the|terrain.|Use it wisely and your campaign will be a...|HUGE SUCCESS!|Attack: Shoot a portal|Switch: Cycle portal colours
@@ -505,7 +506,7 @@
 04:50=Is someone hiding underground?|Dig them out with a drill strike!|Timer controls how far it will dig.
 04:51=Get in a free shot by hurling a ball of mud.|Stings a bit, and knocks hogs back.
 04:52=UNUSED
-04:53=Go on an adventure through time and space,|while leaving your comrades to fight on alone.|Be prepared to return at any time,|or for Sudden Death or if they are all defeated.|Disclaimer. Does not function in Sudden Death,|if you are alone, or if you are a King.
+04:53=Take a trip through time and space,|while leaving your comrades to fight on alone.|Be prepared to return at any time,|or for Sudden Death or if they are all defeated.|Disclaimer. Does not function in Sudden Death,|if you are alone, or if you are a King.
 04:54=INCOMPLETE                                                                                                                                     
 04:55=Spray a stream of sticky flakes.|Build bridges, bury enemies, seal off tunnels.|Be careful you don't get any on you!
 
Binary file project_files/Android-build/SDL-android-project/assets/Data/Locale/hedgewars_en.qm has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/assets/Data/Scripts/Locale.lua	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,18 @@
+-- Library for localizing strings in lua scripts
+
+local lang = loadfile(GetUserDataPath() .. "Locale/" .. tostring(L) .. ".lua")
+
+if lang ~= nil then
+    lang()
+else
+    lang = loadfile(GetDataPath() .. "Locale/" .. tostring(L) .. ".lua")
+    if lang ~= nil then
+        lang()
+    end
+end
+
+function loc(text)
+    if lang ~= nil and locale ~= nil and locale[text] ~= nil then return locale[text]
+    else return text
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/assets/Data/Scripts/Multiplayer/Balanced_Random_Weapon.cfg	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,2 @@
+Default
+locked
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/assets/Data/Scripts/Multiplayer/Balanced_Random_Weapon.lua	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,148 @@
+loadfile(GetDataPath() .. "Scripts/Locale.lua")()
+loadfile(GetDataPath() .. "Scripts/Tracker.lua")()
+
+local weapons = { amGrenade, amClusterBomb, amBazooka, amBee, amShotgun, amMine, amDEagle, amDynamite, amFirePunch, amWhip, amPickHammer, amBaseballBat, amMortar, amCake, amSeduction, amWatermelon, amHellishBomb, amDrill, amBallgun, amRCPlane, amSniperRifle, amMolotov, amBirdy, amBlowTorch, amGasBomb, amFlamethrower, amSMine, amKamikaze }
+
+--                      G,C,B,B,S,M,D,D,F,W,P,B,M,C,S,W,H,D,B,R,S,M,B,B,G,F,S,K
+local weapons_values = {1,1,1,2,1,1,1,2,1,1,1,2,1,3,1,3,3,2,3,3,1,1,2,1,1,2,2,1}
+
+local airweapons = { amAirAttack, amMineStrike, amNapalm, amDrillStrike }
+
+--                         A,M,N,D
+local airweapons_values = {2,2,2,2}
+
+local utilities = { amTeleport, amGirder, amSwitch, amLowGravity, amResurrector, amRope, amParachute, amJetpack, amPortalGun, amSnowball }
+
+--                        T,G,S,L,R,R,P,J,P,S
+local utilities_values = {1,2,2,1,2,2,1,2,2,2}
+
+function randomAmmo()
+    local n = 3   --"points" to be allocated on weapons
+
+    --pick random weapon and subtract cost
+    local r = GetRandom(table.maxn(weapons_values)) + 1
+    local picked_items = {}
+    table.insert(picked_items, weapons[r])
+    n = n - weapons_values[r]
+
+
+    --choose any weapons or utilities to use up remaining n
+
+    while n > 0 do
+        local items = {}
+        local items_values = {}
+
+        for i, w in pairs(weapons_values) do
+            local used = false
+            if w <= n then
+                --check that this weapon hasn't been given already
+                for j, k in pairs(picked_items) do
+                    if weapons[i] == k then
+                        used = true
+                    end
+                end
+                if not used then
+                    table.insert(items_values, w)
+                    table.insert(items, weapons[i])
+                end
+            end
+        end
+
+        for i, w in pairs(utilities_values) do
+            local used = false
+            if w <= n then
+                --check that this weapon hasn't been given already
+                for j, k in pairs(picked_items) do
+                    if utilities[i] == k then
+                        used = true
+                    end
+                end
+                if not used then
+                    table.insert(items_values, w)
+                    table.insert(items, utilities[i])
+                end
+            end
+        end
+
+        local r = GetRandom(table.maxn(items_values)) + 1
+        table.insert(picked_items, items[r])
+        n = n - items_values[r]
+    end
+
+    return picked_items
+end
+
+function assignAmmo(hog)
+    local name = GetHogTeamName(hog)
+    local processed = getTeamValue(name, "processed")
+    if processed == nil or not processed then
+        local ammo = getTeamValue(name, "ammo")
+        if ammo == nil then
+            ammo = randomAmmo()
+            setTeamValue(name, "ammo", ammo)
+        end
+        for i, w in pairs(ammo) do
+            AddAmmo(hog, w)
+        end
+        setTeamValue(name, "processed", true)
+    end
+end
+
+function reset(hog)
+    setTeamValue(GetHogTeamName(hog), "processed", false)
+end
+
+function onGameInit()
+    GameFlags = band(bor(GameFlags, gfResetWeps), bnot(gfPerHogAmmo))
+    Goals = loc("Each turn you get 1-3 random weapons")
+end
+
+function onGameStart()
+    trackTeams()
+    if MapHasBorder() == false then
+        for i, w in pairs(airweapons) do
+            table.insert(weapons, w)
+        end
+        for i, w in pairs(airweapons_values) do
+            table.insert(weapons_values, w)
+        end
+    end
+end
+
+function onAmmoStoreInit()
+    SetAmmo(amSkip, 9, 0, 0, 0)
+
+    SetAmmo(amExtraDamage, 0, 1, 0, 1)
+    SetAmmo(amInvulnerable, 0, 1, 0, 1)
+    SetAmmo(amExtraTime, 0, 1, 0, 1)
+    SetAmmo(amLaserSight, 0, 1, 0, 1)
+    SetAmmo(amVampiric, 0, 1, 0, 1)
+
+    for i, w in pairs(utilities) do
+        SetAmmo(w, 0, 0, 0, 1)
+    end
+
+    for i, w in pairs(weapons) do
+        SetAmmo(w, 0, 0, 0, 1)
+    end
+
+    for i, w in pairs(airweapons) do
+        SetAmmo(w, 0, 0, 0, 1)
+    end
+end
+
+function onNewTurn()
+    runOnGears(assignAmmo)
+    runOnGears(reset)
+    setTeamValue(GetHogTeamName(CurrentHedgehog), "ammo", nil)
+end
+
+function onGearAdd(gear)
+    if GetGearType(gear) == gtHedgehog then
+        trackGear(gear)
+    end
+end
+
+function onGearDelete(gear)
+    trackDeletion(gear)
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/assets/Data/Scripts/Multiplayer/Capture_the_Flag.cfg	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,2 @@
+Default
+Default
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/assets/Data/Scripts/Multiplayer/Capture_the_Flag.lua	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,630 @@
+---------------------------------------
+-- CAPTURE_THE_FLAG GAMEPLAY MODE 0.5
+-- by mikade
+---------------------------------------
+
+-- Version History
+---------
+-- 0.1
+---------
+
+-- [conversion from map-dependant CTF_Blizzard to map independant Capture the Flag]
+-- added an intial starting stage where flagspawn is decided by the players (weapon set will require a jetpack unless I set)
+-- changed the flag from a crate to a visual gear, and all associated methods and checks relating to flags (five hours later, lol)
+-- changed starting/respawning positioning to accommodate different map sizes
+-- added another circle to mark flag spawn
+-- added gameFlag filter
+-- changed scoring feedback
+-- cleaned up some code
+
+-- removing own flag from spawning point no longer possible
+-- destroying flags no longer possible.
+-- added basic glowing circle effect to spawn area
+-- added expanding circle to fgear itself
+
+-- removed teleporters
+-- removed random crate drops (this should be decided by scheme)
+-- removed set map criteria like minesNum, turnTime, explosives etc. except for sudden death
+-- removed weapon defintions
+-- removed placement and respawning methods, hopefully divideTeams will have this covered
+
+---------
+-- 0.2
+---------
+
+-- [now with user friendliness]
+-- flag is now placed wherever you end up at the end of your first turn, this ensures that it is always placed by turn 3
+-- removed a bunch of backup code and no-longer needed variables / methods from CTF_Blizzard days
+-- removed an aura that was still mistakenly hanging about
+-- added an in-game note about placements
+-- added an in-game note about the rules of the game
+-- added translation support and loc()'ed everything
+-- changed things so the seed is no longer always the same...
+
+-- In this version:
+---------
+-- 0.3
+---------
+-- [fufufufu kamikaze fix]
+-- added nill checks to make sure the player doesn't generate errors by producing a nil value in hhs[] when he uses kamikaze
+-- added a check to make sure the player doesn't kamikaze straight down and make the flag's starting point underwater
+-- added a check to make sure the player drops the flag if he has it and he uses kamikaze
+
+--------
+-- 0.4
+--------
+
+-- remove user-branding and version numbers
+-- removed some stuff that wasn't needed
+-- fix piano strike exploit
+-- changed delay to allow for better portals
+-- changed starting feedback a little
+-- increased the radius around the circle indicating the flag thief so that it doesn't obscure his health
+
+--------
+-- 0.5
+--------
+
+-- add support for more players
+-- allow limited sudden death
+-- stop TimeBox ruining my life
+-- profit???
+
+-----------------
+--SCRIPT BEGINS
+-----------------
+
+-- enable awesome translaction support so we can use loc() wherever we want
+loadfile(GetDataPath() .. "Scripts/Locale.lua")()
+
+---------------------------------------------------------------
+----------lots of bad variables and things
+----------because someone is too lazy
+----------to read about tables properly
+------------------ "Oh well, they probably have the memory"
+
+local gameStarted = false
+local gameTurns = 0
+
+--------------------------
+-- hog and team tracking variales
+--------------------------
+
+local numhhs = 0 -- store number of hedgehogs
+local hhs = {} -- store hedgehog gears
+
+local numTeams --  store the number of teams in the game
+local teamNameArr = {}	-- store the list of teams
+local teamSize = {}	-- store how many hogs per team
+local teamIndex = {} -- at what point in the hhs{} does each team begin
+
+-------------------
+-- flag variables
+-------------------
+
+local fPlaced = {} -- has the flag been placed TRUE/FALSE
+
+local fGear = {}	-- pointer to the visual gears that represent the flag
+local fGearX = {}
+local fGearY = {}
+
+local fThief = {}	-- pointer to the hogs who stole the flags
+local fIsMissing = {}	-- have the flags been destroyed or captured
+local fNeedsRespawn = {}	-- do the flags need to be respawned
+local fCaptures = {}	-- the team "scores" how many captures
+local fSpawnX = {}		-- spawn X for flags
+local fSpawnY = {}		-- spawn Y for flags
+
+local fThiefX = {}
+local fThiefY = {}
+local FTTC = 0 -- flag thief tracker counter
+
+local fSpawnC = {} -- spawn circle marker
+local fCirc = {} -- flag/carrier marker circles
+local fCol = {} -- colour of the clans
+
+local fGearRad = 0
+local fGearRadMin = 5
+local fGearRadMax = 33
+local fGearTimer = 0
+
+------------------------
+--flag methods
+------------------------
+
+function CheckScore(teamID)
+
+	if teamID == 0 then
+		alt = 1
+	elseif teamID == 1 then
+		alt = 0
+	end
+
+	if fCaptures[teamID] == 3 then
+		for i = 0, (numhhs-1) do
+			if hhs[i] ~= nil then
+				if GetHogClan(hhs[i]) == alt then
+					SetEffect(hhs[i], heResurrectable, false)
+					SetHealth(hhs[i],0)
+				end
+			end
+		end
+		if CurrentHedgehog ~= nil then
+			ShowMission(loc("GAME OVER!"), loc("Victory for the ") .. GetHogTeamName(CurrentHedgehog), loc("Hooray!"), 0, 0)
+		end
+	end
+
+end
+
+function DoFlagStuff(gear)
+
+	if (gear == fGear[0]) then
+		wtf = 0
+		bbq = 1
+	elseif (gear == fGear[1]) then
+		wtf = 1
+		bbq = 0
+	end
+
+	-- player has successfully captured the enemy flag
+	if (GetHogClan(CurrentHedgehog) == wtf) and (CurrentHedgehog == fThief[bbq]) and (fIsMissing[wtf] == false) then
+
+		DeleteVisualGear(fGear[wtf])
+		fGear[wtf] = nil -- the flag has now disappeared
+
+		fIsMissing[wtf] = false
+		fNeedsRespawn[wtf] = true
+		fIsMissing[bbq] = false
+		fNeedsRespawn[bbq] = true
+		fCaptures[wtf] = fCaptures[wtf] +1
+		ShowMission(loc("You have SCORED!!"), GetHogTeamName(CurrentHedgehog) .. ": " .. fCaptures[wtf], loc("Opposing Team: ") .. fCaptures[bbq], 0, 0)
+		PlaySound(sndVictory)
+		fThief[bbq] = nil -- player no longer has the enemy flag
+		CheckScore(wtf)
+
+	--if the player is returning the flag
+	elseif (GetHogClan(CurrentHedgehog) == wtf) and (fIsMissing[wtf] == true) then
+
+		DeleteVisualGear(fGear[wtf])
+		fGear[wtf] = nil -- the flag has now disappeared
+
+		fNeedsRespawn[wtf] = true
+		HandleRespawns() -- this will set fIsMissing[wtf] to false :)
+		AddCaption(loc("Flag returned!"))
+
+	--if the player is taking the enemy flag
+	elseif GetHogClan(CurrentHedgehog) == bbq then
+
+		DeleteVisualGear(fGear[wtf])
+		fGear[wtf] = nil -- the flag has now disappeared
+
+		fIsMissing[wtf] = true
+		for i = 0,numhhs-1 do
+			if CurrentHedgehog ~= nil then
+				if CurrentHedgehog == hhs[i] then
+					fThief[wtf] = hhs[i]
+				end
+			end
+		end
+		AddCaption(loc("Flag captured!"))
+
+	end
+
+end
+
+function CheckFlagProximity()
+
+	for i = 0, 1 do
+		if fGear[i] ~= nil then
+
+			g1X = fGearX[i]
+			g1Y = fGearY[i]
+
+			g2X, g2Y = GetGearPosition(CurrentHedgehog)
+
+			q = g1X - g2X
+			w = g1Y - g2Y
+			dist = (q*q) + (w*w)
+
+			if dist < 500 then --1600
+				DoFlagStuff(fGear[i])
+			end
+		end
+	end
+
+end
+
+
+function HandleRespawns()
+
+	for i = 0, 1 do
+
+		if fNeedsRespawn[i] == true then
+			fGear[i] = AddVisualGear(fSpawnX[i],fSpawnY[i],vgtCircle,0,true)
+			fGearX[i] = fSpawnX[i]
+			fGearY[i] = fSpawnY[i]
+
+			fNeedsRespawn[i] = false
+			fIsMissing[i] = false -- new, this should solve problems of a respawned flag being "returned" when a player tries to score
+			AddCaption(loc("Flag respawned!"))
+		end
+
+	end
+
+end
+
+
+function FlagThiefDead(gear)
+
+	if (gear == fThief[0]) then
+		wtf = 0
+		bbq = 1
+	elseif (gear == fThief[1]) then
+		wtf = 1
+		bbq = 0
+	end
+
+	if fThief[wtf] ~= nil then
+		-- falls into water
+		--ShowMission(LAND_HEIGHT,  fThiefY[wtf], (LAND_HEIGHT - fThiefY[wtf]), 0, 0)
+		if (LAND_HEIGHT - fThiefY[wtf]) < 15 then
+			fIsMissing[wtf] = true
+			fNeedsRespawn[wtf] = true
+			HandleRespawns()
+		else	--normally
+			fGearX[wtf]  =  fThiefX[wtf]
+			fGearY[wtf]  =  fThiefY[wtf]
+			fGear[wtf] = AddVisualGear(fGearX[wtf],fGearY[wtf],vgtCircle,0,true)
+		end
+
+		AddVisualGear(fThiefX[wtf], fThiefY[wtf], vgtBigExplosion, 0, false)
+		fThief[wtf] = nil
+	end
+
+end
+
+function HandleCircles()
+
+	fGearTimer = fGearTimer + 1
+	if fGearTimer == 50 then
+		fGearTimer = 0
+		fGearRad = fGearRad + 1
+		if fGearRad > fGearRadMax then
+			fGearRad = fGearRadMin
+		end
+	end
+
+	for i = 0, 1 do
+
+		--SetVisualGearValues(fSpawnC[i], fSpawnX[i],fSpawnY[i], 20, 200, 0, 0, 100, 50, 3, fCol[i]) -- draw a circ for spawning area
+
+		if fIsMissing[i] == false then -- draw a flag marker at the flag's spawning place
+			SetVisualGearValues(fCirc[i], fSpawnX[i],fSpawnY[i], 20, 20, 0, 10, 0, 33, 3, fCol[i])
+			if fGear[i] ~= nil then -- draw the flag gear itself
+				SetVisualGearValues(fGear[i], fSpawnX[i],fSpawnY[i], 20, 200, 0, 0, 100, fGearRad, 2, fCol[i])
+			end
+		elseif (fIsMissing[i] == true) and (fNeedsRespawn[i] == false) then
+			if fThief[i] ~= nil then -- draw circle round flag carrier			-- 33
+				SetVisualGearValues(fCirc[i], fThiefX[i], fThiefY[i], 20, 200, 0, 0, 100, 50, 3, fCol[i])
+				--AddCaption("circle marking carrier")
+			elseif fThief[i] == nil then -- draw cirle round dropped flag
+				--g1X,g1Y,g4,g5,g6,g7,g8,g9,g10,g11 =  GetVisualGearValues(fGear[i])
+				--SetVisualGearValues(fCirc[i], g1X, g1Y, 20, 200, 0, 0, 100, 33, 2, fCol[i])
+				SetVisualGearValues(fCirc[i], fGearX[i], fGearY[i], 20, 200, 0, 0, 100, 33, 3, fCol[i])
+				--AddCaption('dropped circle marker')
+				if fGear[i] ~= nil then -- flag gear itself
+					--SetVisualGearValues(fGear[i], g1X, g1Y, 20, 200, 0, 0, 100, 10, 4, fCol[i])
+					SetVisualGearValues(fGear[i], fGearX[i], fGearY[i], 20, 200, 0, 0, 100, fGearRad, 2, fCol[i])
+					--AddCaption('dropped flag itself')
+				end
+			end
+		end
+
+		if fNeedsRespawn[i] == true then -- if the flag has been destroyed, no need for a circle
+			SetVisualGearValues(fCirc[i], fSpawnX[i],fSpawnY[i], 20, 200, 0, 0, 100, 0, 0, fCol[i])
+			--AddCaption("needs respawn = true. flag 'destroyed'?")
+		end
+	end
+
+end
+
+------------------------
+-- general methods
+------------------------
+
+function CheckDistance(gear1, gear2)
+
+	g1X, g1Y = GetGearPosition(gear1)
+	g2X, g2Y = GetGearPosition(gear2)
+
+	g1X = g1X - g2X
+	g1Y = g1Y - g2Y
+	z = (g1X*g1X) + (g1Y*g1Y)
+
+	dist = z
+
+	return dist
+
+end
+
+function RebuildTeamInfo()
+
+
+	-- make a list of individual team names
+	for i = 0, (TeamsCount-1) do
+		teamNameArr[i] = i
+		teamSize[i] = 0
+		teamIndex[i] = 0
+	end
+	numTeams = 0
+
+	for i = 0, (numhhs-1) do
+
+		z = 0
+		unfinished = true
+		while(unfinished == true) do
+
+			newTeam = true
+			tempHogTeamName = GetHogTeamName(hhs[i]) -- this is the new name
+
+			if tempHogTeamName == teamNameArr[z] then
+				newTeam = false
+				unfinished = false
+			end
+
+			z = z + 1
+
+			if z == TeamsCount then
+				unfinished = false
+				if newTeam == true then
+					teamNameArr[numTeams] = tempHogTeamName
+					numTeams = numTeams + 1
+				end
+			end
+
+		end
+
+	end
+
+	-- find out how many hogs per team, and the index of the first hog in hhs
+	for i = 0, numTeams-1 do
+
+		for z = 0, numhhs-1 do
+			if GetHogTeamName(hhs[z]) == teamNameArr[i] then
+				if teamSize[i] == 0 then
+					teamIndex[i] = z -- should give starting index
+				end
+				teamSize[i] = teamSize[i] + 1
+				--add a pointer so this hog appears at i in hhs
+			end
+		end
+
+	end
+
+end
+
+function StartTheGame()
+
+	gameStarted = true
+	AddCaption(loc("Game Started!"))
+
+	for i = 0, 1 do
+
+		-- if someone uses kamikaze downwards, this can happen as the hog won't respawn
+		if (LAND_HEIGHT - fSpawnY[i]) < 0 then
+			tempG = AddGear(0, 0, gtTarget, 0, 0, 0, 0)
+     			FindPlace(tempG, true, 0, LAND_WIDTH, true)
+			fSpawnX[i], fSpawnY[i] = GetGearPosition(tempG)
+			DeleteGear(tempG)
+		end
+
+		fGear[i] = AddVisualGear(fSpawnX[i],fSpawnY[i],vgtCircle,0,true)
+		fCirc[i] = AddVisualGear(fSpawnX[i],fSpawnY[i],vgtCircle,0,true)
+		fSpawnC[i] = AddVisualGear(fSpawnX[i],fSpawnY[i],vgtCircle,0,true)
+
+		fGearX[i] = fSpawnX[i]
+		fGearY[i] = fSpawnY[i]
+
+		fCol[i] = GetClanColor(i)
+		fIsMissing[i] = false
+		fNeedsRespawn[i] = false
+		fCaptures[i] = 0
+
+		--SetVisualGearValues(zxc, 1000,1000, 20, 100, 0,    10,                     1,         100,        5,      GetClanColor(0))
+
+		SetVisualGearValues(fSpawnC[i], fSpawnX[i],fSpawnY[i], 20, 100, 0, 10, 0, 75, 5, fCol[i])
+
+	end
+
+end
+
+------------------------
+-- game methods
+------------------------
+
+function onGameInit()
+
+	GameFlags = band(bor(GameFlags, gfDivideTeams), bnot(gfKing + gfForts))
+	--SuddenDeathTurns = 999 -- suddendeath is off, effectively
+	WaterRise = 0
+	Delay = 10
+
+end
+
+
+function onGameStart()
+
+	--ShowMission(loc(caption), loc(subcaption), loc(goal), 0, 0)
+	ShowMission(loc("CAPTURE THE FLAG"), loc("Flags, and their home base will be placed where each team ends their first turn."), "", 0, 0)
+
+	RebuildTeamInfo()
+
+	-- should gfDivideTeams do this automatically?
+	--[[for i = 0, (TeamsCount-1) do
+		for g = teamIndex[i], (teamIndex[i]+teamSize[i]-1) do
+			if GetHogClan(hhs[g]) == 0 then
+				FindPlace(hhs[g], false, 0, LAND_WIDTH/2)
+			elseif GetHogClan(hhs[g]) == 1 then
+				FindPlace(hhs[g], false, LAND_WIDTH/2, LAND_WIDTH)
+			end
+		end
+	end]]
+
+	fPlaced[0] = false
+	fPlaced[1] = false
+
+	--zxc = AddVisualGear(fSpawnX[i],fSpawnY[i],vgtCircle,0,true)
+
+
+	--SetVisualGearValues(zxc, 1000,1000, 20, 255, 1,    10,                     0,         200,        1,      GetClanColor(0))
+					--minO,max0 -glowyornot	--pulsate timer	 -- fuckall      -- radius -- width  -- colour
+end
+
+
+function onNewTurn()
+
+	gameTurns = gameTurns + 1
+
+	if lastTeam ~= GetHogTeamName(CurrentHedgehog) then
+		lastTeam = GetHogTeamName(CurrentHedgehog)
+	end
+
+	--AddCaption("Handling respawns")
+	if gameStarted == true then
+		HandleRespawns()
+	--new method of placing starting flags
+	elseif gameTurns == 1 then
+		ShowMission(loc("CAPTURE THE FLAG"), loc("Flags, and their home base will be placed where each team ends their first turn."), "", 0, 0)
+	elseif gameTurns == 2 then
+		fPlaced[0] = true
+		ShowMission(loc("CAPTURE THE FLAG"), loc("RULES OF THE GAME [Press ESC to view]"), loc(" - Return the enemy flag to your base to score | - First team to 3 captures wins | - You may only score when your flag is in your base | - Hogs will drop the flag if killed, or drowned | - Dropped flags may be returned or recaptured | - Hogs respawn when killed"), 0, 0)
+	elseif gameTurns == 3 then
+		fPlaced[1] = true
+		StartTheGame()
+	end
+
+end
+
+function onGameTick()
+
+	-- onRessurect calls AFTER you have resurrected,
+	-- so keeping track of x,y a few milliseconds before
+	-- is useful
+	--FTTC = FTTC + 1
+	--if FTTC == 100 then
+	--	FTTC = 0
+		for i = 0,1 do
+			if fThief[i] ~= nil then
+				fThiefX[i] = GetX(fThief[i])
+				fThiefY[i] = GetY(fThief[i])
+			end
+		end
+	--end
+
+	-- things we wanna check often
+	if (CurrentHedgehog ~= nil) then
+		--AddCaption(LAND_HEIGHT - GetY(CurrentHedgehog))
+		--AddCaption(GetX(CurrentHedgehog) .. "; " .. GetY(CurrentHedgehog))
+		--CheckTeleporters()
+
+	end
+
+	if gameStarted == true then
+		HandleCircles()
+		if CurrentHedgehog ~= nil then
+			CheckFlagProximity()
+		end
+	elseif CurrentHedgehog ~= nil then -- if the game hasn't started yet, keep track of where we are gonna put the flags on turn end
+
+		if GetHogClan(CurrentHedgehog) == 0 then
+			i = 0
+		elseif GetHogClan(CurrentHedgehog) == 1 then
+			i = 1
+		end
+
+		fSpawnX[i] = GetX(CurrentHedgehog)
+		fSpawnY[i] = GetY(CurrentHedgehog)
+
+	end
+
+end
+
+function onGearResurrect(gear)
+
+	--AddCaption("A gear has been resurrected!")
+
+	-- mark the flag thief as dead if he needed a respawn
+	for i = 0,1 do
+		if gear == fThief[i] then
+			FlagThiefDead(gear)
+		end
+	end
+
+	-- should be covered by gfDivideTeams, actually
+	-- place hogs belonging to each clan either left or right side of map
+	--if GetHogClan(gear) == 0 then
+	--	FindPlace(gear, false, 0, LAND_WIDTH/2)
+	--elseif GetHogClan(gear) == 1 then
+	--	FindPlace(gear, false, LAND_WIDTH/2, LAND_WIDTH)
+	--end
+
+	AddVisualGear(GetX(gear), GetY(gear), vgtBigExplosion, 0, false)
+
+end
+
+function InABetterPlaceNow(gear)
+	for i = 0, (numhhs-1) do
+		if gear == hhs[i] then
+
+			for i = 0,1 do
+				if gear == fThief[i] then
+					FlagThiefDead(gear)
+				end
+			end
+			hhs[i] = nil
+		end
+	end
+end
+
+function onHogHide(gear)
+	 InABetterPlaceNow(gear)
+end
+
+function onHogRestore(gear)
+	match = false
+	for i = 0, (numhhs-1) do
+		if (hhs[i] == nil) and (match == false) then
+			hhs[i] = gear
+			--AddCaption(GetHogName(gear) .. " has reappeared it seems!")
+			match = true
+		end
+	end
+end
+
+
+function onGearAdd(gear)
+
+	if GetGearType(gear) == gtHedgehog then
+		hhs[numhhs] = gear
+		numhhs = numhhs + 1
+		SetEffect(gear, heResurrectable, true)
+
+	elseif GetGearType(gear) == gtPiano then
+
+		for i = 0, 1 do
+			if CurrentHedgehog == fThief[i] then
+				FlagThiefDead(gear)
+			end
+		end
+
+	end
+
+end
+
+function onGearDelete(gear)
+
+	if GetGearType(gear) == gtHedgehog then
+		InABetterPlaceNow(gear)
+	end
+
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/assets/Data/Scripts/Multiplayer/Highlander.cfg	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,2 @@
+Default
+Default
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/assets/Data/Scripts/Multiplayer/Highlander.lua	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,233 @@
+--------------------------------
+-- HIGHLANDER / HOGS OF WAR
+-- version 0.3c
+-- by mikade
+--------------------------------
+
+-----------
+--0.1
+-----------
+
+-- concept test
+
+-----------
+--0.2
+-----------
+
+-- remove tardis till Henek fixes his tracker
+-- change wep crates to health crates
+-- reset arb turntimevalue
+-- include randomOrder
+-- Until fixed .17 methods come out, remove switches and resurrector
+-- on request, removed kamikaze and piano weapons
+-- provisional fixing of bugs that can't actually be fixed yet
+
+-----------
+--0.3
+-----------
+
+-- meh, update incorrect display
+-- may change this in the future to have switches
+-- but for now people are used to it without, so~
+
+-- mudball is now counted as a utility
+
+-----------
+--0.3b
+-----------
+
+-- cleaned up code and got rid of unneccessary vars
+-- mudball is a weapon again
+-- landgun is now a utility
+-- extra time, vampirism utility removed
+-- hammer wep removed
+-- all hogs have kamikaze
+
+-----------
+--0.3c
+-----------
+
+-- restructured some code
+-- added napalm (whoops) to list of possible weapons you can get
+-- hogs no longer recieve airstrike-related weps on border maps
+
+loadfile(GetDataPath() .. "Scripts/Locale.lua")()
+loadfile(GetDataPath() .. "Scripts/Tracker.lua")()
+
+local airWeapons = 	{amAirAttack, amMineStrike, amNapalm, amDrillStrike --[[,amPiano]]}
+
+local atkArray = 	{
+					amBazooka, amBee, amMortar, amDrill, --[[amSnowball,]]
+					amGrenade, amClusterBomb, amMolotov, amWatermelon, amHellishBomb, amGasBomb,
+					amShotgun, amDEagle, amFlamethrower, amSniperRifle, amSineGun,
+					amFirePunch, amWhip, amBaseballBat, --[[amKamikaze,]] amSeduction, --[[amHammer,]]
+					amMine, amDynamite, amCake, amBallgun, amRCPlane, amSMine,
+					amRCPlane, amSMine,
+					amBirdy
+					}
+
+local utilArray = 	{
+					amBlowTorch, amPickHammer, amGirder, amPortalGun,
+					amRope, amParachute, amTeleport, amJetpack,
+					amInvulnerable, amLaserSight, --[[amVampiric,]]
+					amLowGravity, amExtraDamage, --[[amExtraTime,]]
+					amLandGun
+					--[[,amTardis, amResurrector, amSwitch]]
+					}
+
+local wepArray = 	{}
+
+local currName
+local lastName
+local started = false
+local switchStage = 0
+
+function StartingSetUp(gear)
+
+	for i = 1, #wepArray do
+		setGearValue(gear,wepArray[i],0)
+	end
+
+	setGearValue(gear,amKamikaze,1)
+
+	i = 1 + GetRandom(#atkArray)
+	setGearValue(gear,atkArray[i],1)
+
+	i = 1 + GetRandom(#utilArray)
+	setGearValue(gear,utilArray[i],1)
+
+	SetHealth(gear, 100)
+
+end
+
+--[[function SaveWeapons(gear)
+
+	-
+	for i = 1, (#wepArray) do
+		setGearValue(gear, wepArray[i], GetAmmoCount(gear, wepArray[i]) )
+		 --AddAmmo(gear, wepArray[i], getGearValue(gear,wepArray[i]) )
+	end
+
+end]]
+
+function ConvertValues(gear)
+
+	for i = 1, #wepArray do
+		AddAmmo(gear, wepArray[i], getGearValue(gear,wepArray[i]) )
+	end
+
+
+end
+
+
+function TransferWeps(gear)
+
+	if CurrentHedgehog ~= nil then
+
+		for i = 1, #wepArray do
+			val = getGearValue(gear,wepArray[i])
+			if val ~= 0 then
+				setGearValue(CurrentHedgehog, wepArray[i], val)
+				AddAmmo(CurrentHedgehog, wepArray[i], val)
+			end
+		end
+
+	end
+
+end
+
+function onGameInit()
+	GameFlags = gfInfAttack + gfRandomOrder
+	HealthCaseProb = 100
+end
+
+function onGameStart()
+
+
+	ShowMission	(
+				loc("HIGHLANDER"),
+				loc("Not all hogs are born equal."),
+
+				"- " .. loc("Eliminate enemy hogs and take their weapons.") .. "|" ..
+				"- " .. loc("Per-Hog Ammo") .. "|" ..
+				"- " .. loc("Weapons reset.") .. "|" ..
+				"- " .. loc("Unlimited Attacks") .. "|" ..
+				"", 4, 4000
+				)
+
+	if MapHasBorder() == false then
+        for i, w in pairs(airWeapons) do
+            table.insert(atkArray, w)
+        end
+    end
+
+	for i, w in pairs(atkArray) do
+        table.insert(wepArray, w)
+	end
+
+	for i, w in pairs(utilArray) do
+        table.insert(wepArray, w)
+	end
+
+	runOnGears(StartingSetUp)
+	runOnGears(ConvertValues)
+
+
+end
+
+function onNewTurn()
+--
+end
+
+
+function onGameTick20()
+
+	if (CurrentHedgehog ~= nil) then
+
+		currName = GetHogName(CurrentHedgehog)
+
+		if (currName ~= lastName) then
+			AddCaption(loc("Switched to ") .. currName .. "!")
+			ConvertValues(CurrentHedgehog)
+		end
+
+		lastName = currName
+	end
+
+end
+
+--[[function onHogHide(gear)
+	-- waiting for Henek
+end
+
+function onHogRestore(gear)
+	-- waiting for Henek
+end]]
+
+function onGearAdd(gear)
+
+	--if GetGearType(gear) == gtSwitcher then
+	--	SaveWeapons(CurrentHedgehog)
+	--end
+
+	if (GetGearType(gear) == gtHedgehog) then
+		trackGear(gear)
+	end
+
+end
+
+function onGearDelete(gear)
+
+	if (GetGearType(gear) == gtHedgehog) then --or (GetGearType(gear) == gtResurrector) then
+		TransferWeps(gear)
+		trackDeletion(gear)
+	end
+
+end
+
+function onAmmoStoreInit()
+	SetAmmo(amSkip, 9, 0, 0, 0)
+	SetAmmo(amKamikaze, 9, 0, 0, 0)
+	--SetAmmo(amSwitch, 9, 0, 0, 0) -------1
+end
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/assets/Data/Scripts/Multiplayer/No_Jumping.cfg	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,2 @@
+Default
+Default
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/assets/Data/Scripts/Multiplayer/No_Jumping.lua	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,34 @@
+--------------------------------
+-- NO JUMPING
+--------------------------------
+
+loadfile(GetDataPath() .. "Scripts/Locale.lua")()
+
+local specialGear = nil
+
+function onGameInit()
+    Goals = loc("Jumping is disabled")
+end
+
+function onNewTurn()
+	SetInputMask(band(0xFFFFFFFF, bnot(gmLJump + gmHJump)))
+end
+
+function onGearAdd(gear)
+
+	if (GetGearType(gear) == gtJetpack) or (GetGearType(gear) == gtRope) or (GetGearType(gear) == gtParachute) then
+		specialGear = gear
+		SetInputMask(band(0xFFFFFFFF, bnot(gmHJump)))
+	end
+
+end
+
+function onGearDelete(gear)
+
+	if (GetGearType(gear) == gtJetpack) or (GetGearType(gear) == gtRope) or (GetGearType(gear) == gtParachute) then
+		specialGear = nil
+		SetInputMask(band(0xFFFFFFFF, bnot(gmLJump + gmHJump)))
+	end
+
+end
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/assets/Data/Scripts/Multiplayer/Racer.cfg	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,2 @@
+Shoppa
+Shoppa
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/assets/Data/Scripts/Multiplayer/Racer.lua	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,700 @@
+
+------------------------------------------
+-- RACER 0.5
+-- map-independant racing script
+-- by mikade
+-----------------------------------------
+
+-----------------------------------
+--0.1: took all the code from crazy racer and scrapped most of it
+-----------------------------------
+
+-- Removed tumbler system
+-- Removed extra adds like boosters etc
+-- Added experimental waypoint placement system
+-- More user feedback
+-- Reduced race complexity limit to 5 waypoints
+-- stop placement at complexity limit reached and end turn
+-- guys dont keep racing after dying
+-- invulnerable feasibility
+-- reverted time keeping method
+-- reduced feedback display time
+-- colour-coded addcaptions
+-- cleaned up code
+-- support for more players properly added
+-- tardis fix
+-- remove airstrikes
+
+-- i think the remainder 0 .456 sec of the tracktime isnt getting reset on newturn
+
+-- update feedback
+
+-------
+-- 0.2
+-------
+
+-- allow gameflags
+-- extend time to 90s
+-- remove other air-attack based weps
+-- turn off water rise for sd
+
+-------
+-- 0.3
+-------
+
+-- prevent WP being placed in land
+-- prevent waypoints being placed outside border
+
+-------
+-- 0.4
+-------
+
+-- update user feedback
+-- add more sounds
+
+-------
+-- 0.5
+-------
+
+-- fix ghost disappearing if hog falls in water or somehow dies
+-- lengthen ghost tracking interval to improve performance on slower machines
+-- increase waypoint limit to 8
+-- allow for persistent showmission information
+
+-----------------------------
+-- SCRIPT BEGINS
+-----------------------------
+
+loadfile(GetDataPath() .. "Scripts/Locale.lua")()
+
+------------------
+-- Got Variables?
+------------------
+
+local fMod = 1000000 -- 1
+local roundLimit = 3
+local roundNumber = 0
+local firstClan = 10
+
+local fastX = {}
+local fastY = {}
+local fastCount = 0
+local fastIndex = 0
+local fastColour
+
+local currX = {}
+local currY = {}
+local currCount = 0
+
+--------------------------
+-- hog and team tracking variales
+--------------------------
+
+local numhhs = 0 -- store number of hedgehogs
+local hhs = {} -- store hedgehog gears
+
+local numTeams --  store the number of teams in the game
+local teamNameArr = {}	-- store the list of teams
+local teamClan = {}
+local teamSize = {}	-- store how many hogs per team
+local teamIndex = {} -- at what point in the hhs{} does each team begin
+
+local teamComment = {}
+local teamScore = {}
+
+-------
+-- racer vars
+--------
+
+local cGear = nil
+
+local bestClan = nil
+local bestTime = nil
+
+local gameBegun = false
+local gameOver = false
+local racerActive = false
+local trackTime = 0
+
+local wpCirc = {}
+local wpX = {}
+local wpY = {}
+local wpCol = {}
+local wpActive = {}
+local wpRad = 450 --75
+local wpCount = 0
+local wpLimit = 8
+
+local roundN
+local lastRound
+local RoundHasChanged
+
+-------------------
+-- general methods
+-------------------
+
+function RebuildTeamInfo()
+
+
+	-- make a list of individual team names
+	for i = 0, (TeamsCount-1) do
+		teamNameArr[i] = " " -- = i
+		teamSize[i] = 0
+		teamIndex[i] = 0
+		teamScore[i] = 100000
+	end
+	numTeams = 0
+
+	for i = 0, (numhhs-1) do
+
+		z = 0
+		unfinished = true
+		while(unfinished == true) do
+
+			newTeam = true
+			tempHogTeamName = GetHogTeamName(hhs[i]) -- this is the new name
+
+			if tempHogTeamName == teamNameArr[z] then
+				newTeam = false
+				unfinished = false
+			end
+
+			z = z + 1
+
+			if z == TeamsCount then
+				unfinished = false
+				if newTeam == true then
+					teamNameArr[numTeams] = tempHogTeamName
+					numTeams = numTeams + 1
+				end
+			end
+
+		end
+
+	end
+
+	-- find out how many hogs per team, and the index of the first hog in hhs
+	for i = 0, (numTeams-1) do
+		for z = 0, (numhhs-1) do
+			if GetHogTeamName(hhs[z]) == teamNameArr[i] then
+				teamClan[i] = GetHogClan(hhs[z])
+				if teamSize[i] == 0 then
+					teamIndex[i] = z -- should give starting index
+				end
+				teamSize[i] = teamSize[i] + 1
+				--add a pointer so this hog appears at i in hhs
+			end
+		end
+
+	end
+
+end
+
+
+-----------------
+-- RACER METHODS
+-----------------
+
+function CheckWaypoints()
+
+	trackFinished = true
+
+	for i = 0, (wpCount-1) do
+
+		g1X, g1Y = GetGearPosition(CurrentHedgehog)
+		g2X, g2Y = wpX[i], wpY[i]
+
+		g1X = g1X - g2X
+		g1Y = g1Y - g2Y
+		dist = (g1X*g1X) + (g1Y*g1Y)
+
+		--if i == 0 then
+		--	AddCaption(dist .. "/" .. (wpRad*wpRad) )
+		--end
+
+		NR = (48/100*wpRad)/2
+
+		if dist < (NR*NR) then
+		--if dist < (wpRad*wpRad) then
+			--AddCaption("howdy")
+			wpActive[i] = true
+			wpCol[i] = GetClanColor(GetHogClan(CurrentHedgehog)) -- new				--GetClanColor(1)
+			SetVisualGearValues(wpCirc[i], wpX[i], wpY[i], 20, 100, 1, 10, 0, wpRad, 5, wpCol[i])
+
+			wpRem = 0
+			for k = 0, (wpCount-1) do
+				if wpActive[k] == false then
+					wpRem = wpRem + 1
+				end
+			end
+
+			AddCaption(loc("Way-Points Remaining") .. ": " .. wpRem,0xffba00ff,capgrpAmmoinfo)
+
+		end
+
+		if wpActive[i] == false then
+			trackFinished = false
+		end
+
+	end
+
+	return(trackFinished)
+
+end
+
+function AdjustScores()
+
+	if bestTime == nil then
+		bestTime = 100000
+		bestClan = 10
+		bestTimeComment = "N/A"
+	end
+
+	newScore = false
+
+	-- update this clan's time if the new track is better
+	for i = 0, (numTeams-1) do
+		if teamClan[i] == GetHogClan(CurrentHedgehog) then
+			if trackTime < teamScore[i] then
+				teamScore[i] = trackTime
+				newScore = true
+			else
+				newScore = false
+			end
+		end
+	end
+
+	--bestTime = 100000
+	--bestClan = 10
+
+	-- find the best time out of those so far
+	for i = 0, (numTeams-1) do
+		if teamScore[i] < bestTime then
+			bestTime = teamScore[i]
+			bestClan = teamClan[i]
+		end
+	end
+
+	if bestTime ~= 100000 then
+		bestTimeComment = (bestTime/1000) ..loc("s")
+	end
+
+	if newScore == true then
+		if trackTime == bestTime then -- best time of the race
+			ShowMission(loc("RACER"),
+			loc("TRACK COMPLETED"),
+			loc("NEW RACE RECORD: ") .. (trackTime/1000) ..loc("s") .. "|" ..
+			loc("WINNING TIME: ") .. bestTimeComment, 0, 4000)
+			PlaySound(sndHomerun)
+		else	-- best time for the clan
+			ShowMission(loc("RACER"),
+			loc("TRACK COMPLETED"),
+			loc("NEW CLAN RECORD: ") .. (trackTime/1000) ..loc("s") .. "|" ..
+			loc("WINNING TIME: ") .. bestTimeComment, 4, 4000)
+		end
+	else -- not any kind of new score
+		ShowMission(loc("RACER"),
+		loc("TRACK COMPLETED"),
+		loc("TIME: ") .. (trackTime/1000) ..loc("s") .. "|" ..
+		loc("WINNING TIME: ") .. bestTimeComment, -amSkip, 4000)
+		PlaySound(sndHellish)
+	end
+
+
+	--------
+	--new
+	--------
+
+	if bestTime == trackTime then
+		--AddCaption("wooooooooooooooooooooooooooooo")
+
+		fastColour = GetClanColor(GetHogClan(CurrentHedgehog))
+
+		for i = 0, (currCount-1) do
+			fastX[i] = currX[i]
+			fastY[i] = currY[i]
+		end
+
+		fastCount = currCount
+		fastIndex = 0
+
+		--currCount = 0 -- is this needed?
+
+	else
+		currCount = 0
+		fastIndex = 0
+	end
+
+
+end
+
+function onNewRound()
+
+	roundNumber = roundNumber + 1
+
+	totalComment = ""
+	for i = 0, (TeamsCount-1) do
+			if teamNameArr[i] ~= " " then				-- teamScore[teamClan[i]]
+				teamComment[i] = teamNameArr[i] .. ": " .. (teamScore[i]/1000) .. loc("s|")
+				totalComment = totalComment .. teamComment[i]
+			elseif teamNameArr[i] == " " then
+				teamComment[i] = "|"
+			end
+	end
+
+	ShowMission(	loc("RACER"),
+					loc("STATUS UPDATE"),
+					loc("Rounds Complete: ") .. roundNumber .. "/" .. roundLimit .. "|" .. " " .. "|" ..
+					loc("Best Team Times: ") .. "|" .. totalComment, 0, 4000)
+
+	-- end game if its at round limit
+	if roundNumber == roundLimit then
+		for i = 0, (numhhs-1) do
+			if GetHogClan(hhs[i]) ~= bestClan then
+				SetEffect(hhs[i], heResurrectable, false)
+				SetHealth(hhs[i],0)
+			end
+		end
+		gameOver = true
+		TurnTimeLeft = 1
+	end
+
+end
+
+function CheckForNewRound()
+
+	-------------
+	------ new
+	-------------
+
+	--[[turnN = turnN + 1
+	if gameBegun == false then
+		if turnN == 2 then
+			for i = 0, (numhhs-1) do
+				if hhs[i] ~= nil then
+					SetEffect(hhs[i], heResurrectable, false)
+					SetHealth(hhs[i],0)
+				end
+			end
+			gameOver = true
+			TurnTimeLeft = 1
+		end
+	else
+
+
+	end]]
+
+	--[[if roundBegun == true then
+
+		if RoundHasChanged == true then
+			roundN = roundN + 1
+			RoundHasChanged = false
+			onNewRound()
+		end
+
+		if lastRound ~= TotalRounds then -- new round, but not really
+
+			if RoundHasChanged == false then
+				RoundHasChanged = true
+			end
+
+		end
+
+		AddCaption("RoundN:" .. roundN .. "; " .. "TR: " .. TotalRounds)
+
+		lastRound = TotalRounds
+
+	end]]
+
+	------------
+	----- old
+	------------
+
+	if GetHogClan(CurrentHedgehog) == firstClan then
+		onNewRound()
+	end
+
+end
+
+function DisableTumbler()
+	currCount = 0
+	fastIndex = 0
+	TurnTimeLeft = 0
+	racerActive = false -- newadd
+end
+
+function HandleGhost()
+
+	-- get the current xy of the racer at this point
+	currX[currCount] = GetX(CurrentHedgehog)
+	currY[currCount] = GetY(CurrentHedgehog)
+	currCount = currCount + 1
+
+	-- draw a ping of smoke where the fastest player was at this point
+	if (fastCount ~= 0) and (fastIndex < fastCount) then
+
+		fastIndex = fastIndex + 1
+
+		tempE = AddVisualGear(fastX[fastIndex], fastY[fastIndex], vgtSmoke, 0, false)
+		g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE)
+		SetVisualGearValues(tempE, g1, g2, g3, g4, g5, g6, g7, g8, g9, fastColour )
+
+		--AddCaption("fC: " .. fastIndex .. " / " .. fastCount)
+
+	else
+
+		--AddCaption("excep fC: " .. fastIndex .. " / " .. fastCount)
+
+	end
+
+
+
+end
+
+----------------------------------
+-- GAME METHODS / EVENT HANDLERS
+----------------------------------
+
+function onGameInit()
+	GameFlags = GameFlags + gfInfAttack + gfInvulnerable
+	CaseFreq = 0
+	TurnTime = 90000
+	WaterRise = 0
+end
+
+
+function onGameStart()
+
+	roundN = 0
+	lastRound = TotalRounds
+	RoundHasChanged = false -- true
+
+	RebuildTeamInfo()
+
+	ShowMission	(
+				loc("RACER"),
+				loc("a Hedgewars mini-game"),
+
+				loc("Build a track and race.") .. "|" ..
+				loc("Round Limit:") .. " " .. roundLimit .. "|" ..
+
+				"", 4, 4000
+				)
+end
+
+function PlaceWayPoint(x,y)
+
+	if (wpCount < wpLimit) then -- seems to not work with a hedgehog nil chek
+
+		wpX[wpCount] = x
+		wpY[wpCount] = y
+		wpCol[wpCount] = 0xffffffff
+		wpCirc[wpCount] = AddVisualGear(wpX[wpCount],wpY[wpCount],vgtCircle,0,true)
+																		--100
+		SetVisualGearValues(wpCirc[wpCount], wpX[wpCount], wpY[wpCount], 20, 100, 1, 10, 0, wpRad, 5, wpCol[wpCount])
+
+		wpCount = wpCount + 1
+
+		AddCaption(loc("Waypoint placed.") .. " " .. loc("Available points remaining: ") .. (wpLimit-wpCount))
+
+	end
+
+end
+
+function onNewTurn()
+
+	CheckForNewRound()
+
+	racerActive = false
+
+	trackTime = 0
+
+	currCount = 0 -- hopefully this solves problem
+	AddAmmo(CurrentHedgehog, amAirAttack, 0)
+	gTimer = 0
+
+	-- Set the waypoints to unactive on new round
+	for i = 0,(wpCount-1) do
+		wpActive[i] = false
+		wpCol[i] = 0xffffffff
+		SetVisualGearValues(wpCirc[i], wpX[i], wpY[i], 20, 100, 1, 10, 0, wpRad, 5, wpCol[i])
+	end
+
+	-- Handle Starting Stage of Game
+	if (gameOver == false) and (gameBegun == false) then
+		if wpCount >= 3 then
+			gameBegun = true
+			roundNumber = 0
+			firstClan = GetHogClan(CurrentHedgehog)
+			ShowMission(loc("RACER"),
+			loc("GAME BEGUN!!!"),
+			loc("Complete the track as fast as you can!"), 2, 4000)
+		else
+			ShowMission(loc("RACER"),
+			loc("NOT ENOUGH WAYPOINTS"),
+			loc("Place more waypoints using the 'Air Attack' weapon."), 2, 4000)
+			AddAmmo(CurrentHedgehog, amAirAttack, 4000)
+            ParseCommand("setweap " .. string.char(amAirAttack))
+		end
+	end
+
+	if gameOver == true then
+		gameBegun = false
+		racerActive = false -- newadd
+	end
+
+	AddAmmo(CurrentHedgehog, amTardis, 0)
+	AddAmmo(CurrentHedgehog, amDrillStrike, 0)
+	AddAmmo(CurrentHedgehog, amMineStrike, 0)
+	AddAmmo(CurrentHedgehog, amNapalm, 0)
+	AddAmmo(CurrentHedgehog, amPiano, 0)
+
+end
+
+function onGameTick20()
+
+	-- airstrike detected, convert this into a potential waypoint spot
+	if cGear ~= nil then
+		x,y = GetGearPosition(cGear)
+        if x > -9000 then
+            x,y = GetGearTarget(cGear)
+
+
+            if TestRectForObstacle(x-20, y-20, x+20, y+20, true) then
+                AddCaption(loc("Please place the way-point in the open, within the map boundaries."))
+                PlaySound(sndDenied)
+            elseif (y > WaterLine-50) then
+                AddCaption(loc("Please place the way-point further from the waterline."))
+                PlaySound(sndDenied)
+            else
+                PlaceWayPoint(x, y)
+                if wpCount == wpLimit then
+                    AddCaption(loc("Race complexity limit reached."))
+                    DisableTumbler()
+                end
+            end
+        else
+            DeleteGear(cGear)
+        end
+        SetGearPosition(cGear, -10000, 0)
+	end
+
+
+	-- start the player tumbling with a boom once their turn has actually begun
+	if racerActive == false then
+
+		if (TurnTimeLeft > 0) and (TurnTimeLeft ~= TurnTime) then
+
+			-- if the gamehas started put the player in the middle of the first
+			--waypoint that was placed
+			if gameBegun == true then
+				AddCaption(loc("Good to go!"))
+				racerActive = true
+				trackTime = 0
+
+				SetGearPosition(CurrentHedgehog, wpX[0], wpY[0])
+				AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), gtGrenade, 0, 0, 0, 1)
+				FollowGear(CurrentHedgehog)
+
+				HideMission()
+
+			else
+				-- still in placement mode
+			end
+
+		end
+	end
+
+
+
+	-- has the player started his tumbling spree?
+	if (CurrentHedgehog ~= nil) then
+
+		--airstrike conversion used to be here
+
+		-- if the RACE has started, show tracktimes and keep tabs on waypoints
+		if (racerActive == true) and (gameBegun == true) then
+
+			--ghost
+			if GameTime%40 == 0 then
+				HandleGhost()
+			end
+
+			trackTime = trackTime + 20
+
+			if GameTime%100 == 0 then
+                
+                if trackTime%1000 == 0 then
+                    AddCaption((trackTime/1000)..'.0',GetClanColor(GetHogClan(CurrentHedgehog)),capgrpMessage2)
+                else
+                    AddCaption(trackTime/1000,GetClanColor(GetHogClan(CurrentHedgehog)),capgrpMessage2)
+                end
+
+				if (CheckWaypoints() == true) then
+					AdjustScores()
+					racerActive = false
+					DisableTumbler()
+				end
+
+			end
+
+		end
+
+
+
+		-- if the player has expended his tunbling time, stop him tumbling
+		if TurnTimeLeft <= 20 then
+			DisableTumbler()
+		end
+
+	end
+
+end
+
+function onGearResurrect(gear)
+
+	AddVisualGear(GetX(gear), GetY(gear), vgtBigExplosion, 0, false)
+
+	if gear == CurrentHedgehog then
+		DisableTumbler()
+	end
+
+	-- if the player stops and "dies" or flies into water, stop him racing
+	--[[if gear == CurrentHedgehog then
+		DisableTumbler()
+		ShowMission(loc("RACER"),
+		loc("TRACK FAILED!"),
+		loc("WINNING TIME: ") .. bestTimeComment, -amSkip, 4000)
+	end]]
+
+end
+
+function onGearAdd(gear)
+
+	if GetGearType(gear) == gtHedgehog then
+		hhs[numhhs] = gear
+		numhhs = numhhs + 1
+		SetEffect(gear, heResurrectable, true)
+	end
+
+	if GetGearType(gear) == gtAirAttack then
+		cGear = gear
+	end
+
+end
+
+function onGearDelete(gear)
+
+	if GetGearType(gear) == gtAirAttack then
+		cGear = nil
+	end
+
+end
+
+--[[function onAmmoStoreInit()
+	SetAmmo(amRope, 9, 0, 0, 0)
+	SetAmmo(amJetpack, 9, 0, 0, 0)
+	SetAmmo(amSkip, 9, 0, 0, 0)
+end]]
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/assets/Data/Scripts/Multiplayer/Random_Weapon.cfg	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,2 @@
+Default
+locked
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/assets/Data/Scripts/Multiplayer/Random_Weapon.lua	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,113 @@
+-- Random Weapons, example for gameplay scripts
+
+-- Load the library for localisation ("loc" function)
+loadfile(GetDataPath() .. "Scripts/Locale.lua")()
+
+-- Load the gear tracker
+loadfile(GetDataPath() .. "Scripts/Tracker.lua")()
+
+-- List of available weapons
+local weapons = { amGrenade, amClusterBomb, amBazooka, amBee, amShotgun,
+            amMine, amDEagle, amDynamite, amFirePunch, amWhip, amPickHammer,
+            amBaseballBat, amTeleport, amMortar, amCake, amSeduction,
+            amWatermelon, amHellishBomb, amDrill, amBallgun, amRCPlane,
+            amSniperRifle, amMolotov, amBirdy, amBlowTorch, amGasBomb,
+            amFlamethrower, amSMine, amHammer }
+
+-- List of weapons that attack from the air
+local airweapons = { amAirAttack, amMineStrike, amNapalm, amDrillStrike }
+
+-- Function that assigns the team their weapon
+function assignAmmo(hog)
+    -- Get name of the current team
+    local name = GetHogTeamName(hog)
+    -- Get whither the team has been processed
+    local processed = getTeamValue(name, "processed")
+    -- If it has not, process it
+    if processed == nil or not processed then
+        -- Get the ammo for this hog's team
+        local ammo = getTeamValue(name, "ammo")
+        -- If there is no ammo, get a random one from the list and store it
+        if ammo == nil then
+            ammo = weapons[GetRandom(table.maxn(weapons)) + 1]
+            setTeamValue(name, "ammo", ammo)
+        end
+        -- Add the ammo for the hog
+        AddAmmo(hog, ammo)
+        -- Mark as processed
+        setTeamValue(name, "processed", true)
+    end
+end
+
+-- Mark team as not processed
+function reset(hog)
+    setTeamValue(GetHogTeamName(hog), "processed", false)
+end
+
+function onGameInit()
+    -- Limit flags that can be set, but allow game schemes to be used
+    GameFlags = band(bor(GameFlags, gfResetWeps), bnot(gfInfAttack))
+    -- Set a custom game goal that will show together with the scheme ones
+    Goals = loc("Each turn you get one random weapon")
+end
+
+function onGameStart()
+    -- Initialize the tracking of hogs and teams
+    trackTeams()
+    -- Add air weapons to the game if the border is not active
+    if MapHasBorder() == false then
+        for i, w in pairs(airweapons) do
+            table.insert(weapons, w)
+        end
+    end
+end
+
+function onAmmoStoreInit()
+    -- Allow skip at all times
+    SetAmmo(amSkip, 9, 0, 0, 0)
+
+    -- Let utilities be available through crates
+    SetAmmo(amParachute, 0, 1, 0, 1)
+    SetAmmo(amGirder, 0, 1, 0, 2)
+    SetAmmo(amSwitch, 0, 1, 0, 1)
+    SetAmmo(amLowGravity, 0, 1, 0, 1)
+    SetAmmo(amExtraDamage, 0, 1, 0, 1)
+    SetAmmo(amInvulnerable, 0, 1, 0, 1)
+    SetAmmo(amExtraTime, 0, 1, 0, 1)
+    SetAmmo(amLaserSight, 0, 1, 0, 1)
+    SetAmmo(amVampiric, 0, 1, 0, 1)
+    SetAmmo(amJetpack, 0, 1, 0, 1)
+    SetAmmo(amPortalGun, 0, 1, 0, 1)
+    SetAmmo(amResurrector, 0, 1, 0, 1)
+
+    -- Allow weapons to be used
+    for i, w in pairs(weapons) do
+        SetAmmo(w, 0, 0, 0, 1)
+    end
+
+    -- Allow air weapons to be used
+    for i, w in pairs(airweapons) do
+        SetAmmo(w, 0, 0, 0, 1)
+    end
+end
+
+function onNewTurn()
+    -- Give every team their weapons, so one can plan during anothers turn
+    runOnGears(assignAmmo)
+    -- Mark all teams as not processed
+    runOnGears(reset)
+    -- Set the current teams weapons to nil so they will get new after the turn has ended
+    setTeamValue(GetHogTeamName(CurrentHedgehog), "ammo", nil)
+end
+
+function onGearAdd(gear)
+    -- Catch hedgehogs for the tracker
+    if GetGearType(gear) == gtHedgehog then
+        trackGear(gear)
+    end
+end
+
+function onGearDelete(gear)
+    -- Remove hogs that are gone
+    trackDeletion(gear)
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/assets/Data/Scripts/Multiplayer/Space_Invasion.cfg	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,2 @@
+Default
+Default
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/assets/Data/Scripts/Multiplayer/Space_Invasion.lua	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,2435 @@
+
+loadfile(GetDataPath() .. "Scripts/Locale.lua")()
+loadfile(GetDataPath() .. "Scripts/Tracker.lua")()
+
+---------------------------------------------------
+---------------------------------------------------
+---------------------------------------------------
+--- Space Invasion Code Follows (1.1)
+---------------------------------------------------
+---------------------------------------------------
+-- VERSION HISTORY
+----------------
+-- version 0.1
+----------------
+-- conversion of tumbler into space invasion
+-- a million and one changes
+-- bells and whistles
+
+----------------
+-- version 0.2
+----------------
+-- code slowly getting cleaner, it still looks like a spaghetti monster tho
+-- lots of console tracking :/
+-- all visual gears are now compulsary (will probably revert this)
+-- implemented fMod to try combat desyncs and bring this in line with dev
+
+----------------
+-- version 0.3
+----------------
+-- values of scoring changed to 3:10, and now based on vCircScore
+-- time gained from killing a red circ increased from 3 to 4
+-- circles now spawn at a distance of at least 800 or until sanity limit
+-- roundsLimit now based off MinesTime (kinda, its an experiment)
+
+-----------------
+--0.4
+-----------------
+-- commented out a lot of WriteLnToConsoles (dont need them at this point)
+-- added some different WriteLnToConsoles
+-- changed some of the collision detect for explosives in checkvarious()
+
+-----------------
+--0.5
+-----------------
+-- added implementation for a projectile shield
+-- added a "bonus" orange invader that partially recharges player shield
+-- added a tough "blueboss" blue invader
+-- expanded user feedback
+-- circles now have health and are capable of being merely "damaged"
+-- redid a lot of the collision code and added CircleDamaged
+-- added more sounds to events
+-- added more visual gears
+
+-----------------
+--0.6
+-----------------
+-- removed a few WriteLns
+-- added randomized grunts on circ damage
+-- added (mostly) graceful fading out of circles :D:
+-- changed odds for circles
+-- changed user feedback
+-- fixed the location of the explosion where player bashes into circ
+
+-----------------
+--0.7
+-----------------
+-- added PlaySound(sndSuddenDeath) when ammo gets depleted
+-- added an extra "Ammo Depleted" note if user presses fire while empty
+-- specified how much shield power is gained on shield powerup collection
+-- changed odds for circles AGAIN, ammo is now sliiightly more common
+-- switched most of the explosions/smoke effects back to non-critical vgears (with a few exceptions)
+-- tumbletime is now based off turntime and is variable
+-- delete explosives in DeleteFarFlungBarrel rather than explode them on map boundaries to save on performance
+-- utilized the improved AddCaption to tint / prevent overrides
+-- temporarily disabled bugged sort that displays teams according to their score
+-- reluctantly changed the colour of the bonus circ to purple
+-- standarized point notation
+-- added some missing locs
+-- commented out remaining WriteLnToConsoles for the meanwhile with the prefix "nw"
+
+-- ACHIEIVEMENTS added
+-- (during one turn) aka repeatable
+-- Ammo Manic (Destroy 3 green circles for + 5 points)
+-- Drone Hunter (Destroy 5 red circles for + 10 points)
+-- Shield Seeker (Destroy 3 purple circles for +10 points)
+-- Boss Slayer (Destroy 2 blue circles for +25 points)
+
+-- Shield Master (disolve 5 shells for +10 points)
+-- Shield Miser (don't use your shield at all (3.5*roundkills)+2 points)
+
+-- Depleted Kamikaze! (kamikaze into a blue/red circ when you are out of ammo) 5pts
+-- Timed Kamikaze! (kamikaze into a blue/red circ when you only have 5s left) 10pts
+-- Kamikaze Expert (combination of the above two) 15pts
+
+-- Multi-shot (destroy more than 1 invader with a single bullet) 15pts
+-- X-Hit Combo (destroy another invader in less than 3 seconds) chainLength*2 points
+
+-- Accuracy Bonus (80% accuracy at the end of your turn with more than 5 shots fired) 15pts
+
+--(during the length of the game) aka non-repeatable
+-- 10/25/50 kills (+25/+50/+100 points)
+
+-----------------
+--0.8
+-----------------
+-- added a HUD for turntimeleft, ammo, shield
+-- shieldhealth hits 0 properly
+
+------------------------
+-- version 0.8.1
+------------------------
+
+-- stop hiding non-existant 4th Tag
+-- redraw HUD on screen resolution change
+
+------------------------
+-- version 0.9
+------------------------
+-- time for more 'EXPERIMENTS' mwahahahahahaha D:
+-- (hopefully) balanced Shield Miser
+-- bosses are no longer a redunkulous 50 points, but toned down to 30
+-- experimental radar (it's INTERACTIVE and math-heavy :D) (visual gears are safe... right? D:)
+-- bugfix and balance for multishot
+
+------------------------
+-- version 1.0
+------------------------
+-- if only version numbers actually worked like this, wouldn't that be awful :D
+-- added surfer achievement
+-- increased value of shield miser by 1 point per kill (OP?)
+
+------------------------
+-- version 1.1
+------------------------
+-- fixed radar so that blips dont go past circs when you get very close
+-- added a missing loc for shield depletion
+-- increased delay to 1000 to try stop noobies missing their turn
+-- added sniper achievement for hits from over a 1000000 away
+-- added achievement for 3 "sniper" shots in a round
+-- added achievement for 3 "point blank" shots in a round
+-- added "fierce Competition" achievement for shooting an enemy hog (once per round)
+-- some support for more weapons later
+
+--------------------------
+--notes for later
+--------------------------
+-- maybe add a check for a tie, IMPOSSIBRU THERE ARE NO TIES
+-- more achievements? (3 kamikazes in a row, supreme shield expert/miser etc?)
+
+-- if more weps are added, replace primshotsfired all over the place
+
+-- look for derp and let invaders shoot again
+
+-- more weps? flamer/machineballgun,
+-- some kind of bomb that just drops straight down
+-- "fire and forget" missile
+-- shockwave
+
+-- some kind of ability-meter that lets you do something awesome when you are
+-- doing really well in a given round.
+-- probably new kind of shield that pops any invaders who come near
+
+-- fix game never ending bug
+-- fix radar
+-- new invader: golden snitch, doesn't show up on your radar
+
+-- maybe replace (48/100*vCircRadius[i])/2 with something better
+
+
+--[[CAPTION CATEGORIES
+-----------------
+capgrpGameState
+-----------------
+AddCaption(LOC_NOT("Sniper!") .. " +10 " .. LOC_NOT("points") .. "!",0xffba00ff,capgrpAmmostate)
+--they call me bullsye
+--point blank combo
+--fierce Competition
+-----------------
+capgrpAmmostate
+-----------------
+AddCaption( chainLength .. LOC_NOT("-chain! +") .. chainLength*2 .. LOC_NOT(" points!"),0xffba00ff,capgrpAmmostate)
+AddCaption(LOC_NOT("Multi-shot! +15 points!"),0xffba00ff,capgrpAmmostate)
+
+-----------------
+capgrpAmmoinfo
+-----------------
+AddCaption(LOC_NOT("Shield Miser! +20 points!"),0xffba00ff,capgrpAmmoinfo)
+AddCaption(LOC_NOT("Shield Master! +10 points!"),0xffba00ff,capgrpAmmoinfo)
+
+-----------------
+capgrpVolume
+-----------------
+AddCaption(LOC_NOT("Boom! +25 points!"),0xffba00ff,capgrpVolume)
+AddCaption(LOC_NOT("BOOM! +50 points!"),0xffba00ff,capgrpVolume)
+AddCaption(LOC_NOT("BOOM! BOOM! BOOM! +100 points!"),0xffba00ff,capgrpVolume)
+AddCaption(LOC_NOT("Accuracy Bonus! +15 points!"),0xffba00ff,capgrpVolume)
+AddCaption(LOC_NOT("Surfer! +15 points!"),0xffba00ff,capgrpVolume)
+
+-----------------
+capgrpMessage
+-----------------
+AddCaption(LOC_NOT("Ammo Depleted!"),0xff0000ff,capgrpMessage)
+AddCaption(LOC_NOT("Ammo: ") .. primShotsLeft)
+AddCaption(LOC_NOT("Shield Depleted"),0xff0000ff,capgrpMessage)
+AddCaption( LOC_NOT("Shield ON:") .. " " .. shieldHealth - 80 .. " " .. LOC_NOT("Power Remaining") )
+AddCaption(LOC_NOT("Shield OFF:") .. " " .. shieldHealth - 80 .. " " .. LOC_NOT("Power Remaining") )
+
+AddCaption(LOC_NOT("Time Extended!") .. "+" .. 4 .. LOC_NOT("s"), 0xff0000ff,capgrpMessage )
+AddCaption("+" .. 3 .. " " .. LOC_NOT("Ammo"), 0x00ff00ff,capgrpMessage)
+AddCaption(LOC_NOT("Shield boosted! +30 power"), 0xff00ffff,capgrpMessage)
+AddCaption(LOC_NOT("Shield is fully recharged!"), 0xffae00ff,capgrpMessage)
+AddCaption(LOC_NOT("Boss defeated! +50 points!"), 0x0050ffff,capgrpMessage)
+
+AddCaption(LOC_NOT("GOTCHA!"))
+AddCaption(LOC_NOT("Kamikaze Expert! +15 points!"),0xffba00ff,capgrpMessage)
+AddCaption(LOC_NOT("Depleted Kamikaze! +5 points!"),0xffba00ff,capgrpMessage)
+AddCaption(LOC_NOT("Timed Kamikaze! +10 points!"),0xffba00ff,capgrpMessage)
+
+-----------------
+capgrpMessage2
+-----------------
+AddCaption(LOC_NOT("Drone Hunter! +10 points!"),0xffba00ff,capgrpMessage2)
+AddCaption(LOC_NOT("Ammo Maniac! +5 points!"),0xffba00ff,capgrpMessage2)
+AddCaption(LOC_NOT("Shield Seeker! +10 points!"),0xffba00ff,capgrpMessage2)
+AddCaption(LOC_NOT("Boss Slayer! +25 points!"),0xffba00ff,capgrpMessage2)
+]]
+
+----------------------------------
+-- so I herd u liek wariables
+----------------------------------
+
+--local fMod = 1	-- for use in .15 single player only, otherwise desync
+local fMod = 1000000 -- use this for dev and .16+ games
+
+-- some console stuff
+local shellID = 0
+local explosivesID = 0
+
+-- gaudyRacer
+local boosterOn = false
+local roundLimit = 3	-- no longer set here (see version history)
+local roundNumber = 0
+local firstClan = 10
+local gameOver = false
+local gameBegun = false
+
+local bestClan = 10
+local bestScore = 0
+local sdScore = {}
+local sdName = {}
+local sdKills = {}
+
+local roundN = 0
+local lastRound
+local RoundHasChanged = true
+
+--------------------------
+-- hog and team tracking variales
+--------------------------
+
+local numhhs = 0
+local hhs = {}
+
+local numTeams
+local teamNameArr = {}
+local teamClan = {}
+local teamSize = {}
+local teamIndex = {}
+
+local teamComment = {}
+local teamScore = {}
+local teamCircsKilled = {}
+local teamSurfer = {}
+
+-- stats variables
+--local teamRed = {}
+--local teamBlue = {}
+--local teamOrange = {}
+--local teamGreen = {}
+local roundKills = 0
+local RK = 0
+local GK = 0
+local BK = 0
+local OK = 0
+local SK = 0
+local shieldMiser = true
+local fierceComp = false
+local chainCounter = 0
+local chainLength = 0
+local shotsFired = 0
+local shotsHit = 0
+local SurfTime = 0
+local sniperHits = 0
+local pointBlankHits = 0
+---------------------
+-- tumbler goods
+---------------------
+
+local leftOn = false
+local rightOn = false
+local upOn = false
+local downOn = false
+
+----------------
+-- TUMBLER
+local wep = {}
+local wepAmmo = {}
+local wepCol = {}
+local wepIndex = 0
+local wepCount = 0
+local fireTimer = 0
+----------------
+
+
+
+local primShotsMax = 5
+local primShotsLeft = 0
+
+local TimeLeft = 0
+local stopMovement = false
+local tumbleStarted = false
+
+local beam = false
+local pShield
+local shieldHealth
+
+local shockwave
+local shockwaveHealth = 0
+local shockwaveRad = 300
+
+local vTag = {}
+
+-----------------------------------------------
+-- CIRCLY GOODIES
+-----------------------------------------------
+
+local CirclesAreGo = false
+local playerIsFine = true
+local targetHit = false
+
+local FadeAlpha = 0 -- used to fade the circles out gracefully when player dies
+local pTimer = 0 -- tracking projectiles following player
+
+--local m2Count = 0		-- handle speed of circs
+
+local vCirc = {}
+local vCCount = 0
+
+local rCirc = {}
+local rCircX = {}
+local rCircY = {}
+local rAlpha = 255
+local radShotsLeft = 0
+
+local vCircActive = {}
+local vCircHealth = {}
+local vType = {}
+local vCounter = {}		-- how often this circ gets to "fire" etc
+local vCounterLim = {} -- when vCounter == vCounterLim circle performs its special
+local vCircScore = {} -- how many points killing this invader gives
+
+local vCircRadMax = {}
+local vCircRadMin = {}
+local vCircRadDir = {}
+local vCircRadCounter = {}
+
+local vCircDX = {}
+local vCircDY = {}
+
+local vCircX = {}
+local vCircY = {}
+local vCircMinA = {}
+local vCircMaxA = {}
+local vCircType = {}
+local vCircPulse = {}
+local vCircFuckAll = {}
+local vCircRadius = {}
+local vCircWidth = {}
+local vCircCol = {}
+
+-------------------------------------------
+-- some lazy copypasta/modified methods
+-------------------------------------------
+
+
+
+function HideTags()
+
+	for i = 0, 2 do
+		SetVisualGearValues(vTag[i],0,0,0,0,0,1,0, 0, 240000, 0xffffff00)
+	end
+
+end
+
+function DrawTag(i)
+
+	zoomL = 1.3
+
+	xOffset = 40
+
+	if i == 0 then
+		yOffset = 40
+		tCol = 0xffba00ff
+		tValue = TimeLeft
+	elseif i == 1 then
+		zoomL = 1.1
+		yOffset = 70
+		tCol = 0x00ff00ff
+		tValue = wepAmmo[wepIndex] --primShotsLeft
+	elseif i == 2 then
+		zoomL = 1.1
+		xOffset = 40 + 35
+		yOffset = 70
+		tCol = 0xa800ffff
+		tValue = shieldHealth - 80
+	end
+
+	DeleteVisualGear(vTag[i])
+	vTag[i] = AddVisualGear(0, 0, vgtHealthTag, 0, false)
+	g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(vTag[i])
+	SetVisualGearValues	(
+				vTag[i], 		--id
+				-(ScreenWidth/2) + xOffset,	--xoffset
+				ScreenHeight - yOffset, --yoffset
+				0, 			--dx
+				0, 			--dy
+				zoomL, 			--zoom
+				1, 			--~= 0 means align to screen
+				g7, 			--frameticks
+				tValue, 		--value
+				240000, 		--timer
+				tCol		--GetClanColor( GetHogClan(CurrentHedgehog) )
+				)
+
+end
+
+function RebuildTeamInfo()
+
+	-- make a list of individual team names
+	for i = 0, (TeamsCount-1) do
+		teamNameArr[i] = " " -- = i
+		teamSize[i] = 0
+		teamIndex[i] = 0
+		teamScore[i] = 0
+		teamCircsKilled[i] = 0
+		teamSurfer[i] = false
+	end
+	numTeams = 0
+
+	for i = 0, (numhhs-1) do
+
+		z = 0
+		unfinished = true
+		while(unfinished == true) do
+
+			newTeam = true
+			tempHogTeamName = GetHogTeamName(hhs[i]) -- this is the new name
+
+			if tempHogTeamName == teamNameArr[z] then
+				newTeam = false
+				unfinished = false
+			end
+
+			z = z + 1
+
+			if z == (TeamsCount-1) then
+				unfinished = false
+				if newTeam == true then
+					teamNameArr[numTeams] = tempHogTeamName
+					numTeams = numTeams + 1
+				end
+			end
+
+		end
+
+	end
+
+	-- find out how many hogs per team, and the index of the first hog in hhs
+	for i = 0, (TeamsCount-1) do
+
+		for z = 0, (numhhs-1) do
+			if GetHogTeamName(hhs[z]) == teamNameArr[i] then
+				teamClan[i] = GetHogClan(hhs[z])
+				if teamSize[i] == 0 then
+					teamIndex[i] = z -- should give starting index
+				end
+				teamSize[i] = teamSize[i] + 1
+				--add a pointer so this hog appears at i in hhs
+			end
+		end
+
+	end
+
+end
+
+-- control
+function AwardPoints(p)
+
+	for i = 0,(TeamsCount-1) do
+		if teamClan[i] == GetHogClan(CurrentHedgehog) then
+			teamScore[i] = teamScore[i] + p
+		end
+	end
+
+end
+
+function AwardKills(t)
+
+	roundKills = roundKills + 1
+
+	for i = 0,(TeamsCount-1) do
+		if teamClan[i] == GetHogClan(CurrentHedgehog) then
+			teamCircsKilled[i] = teamCircsKilled[i] + 1
+
+			if teamCircsKilled[i] == 10 then
+				AddCaption(loc("Boom!") .. " +25 " .. loc("points").."!",0xffba00ff,capgrpVolume)
+				AwardPoints(25)
+			elseif teamCircsKilled[i] == 25 then
+				AddCaption(loc("BOOM!") .. " +50 " .. loc("points") .. "!",0xffba00ff,capgrpVolume)
+				AwardPoints(50)
+			elseif teamCircsKilled[i] == 50 then
+				AddCaption(loc("BOOM!") .. loc("BOOM!") .. loc("BOOM!") .. " +100 " .. loc("points") .. "!",0xffba00ff,capgrpVolume)
+				AwardPoints(100)
+			end
+
+			--[[
+			if t == "R" then
+				redCircsKilled[i] = redCircsKilled[i] + 1
+			end
+			--etc
+			--etc
+			]]
+		end
+	end
+
+end
+
+-----------------
+
+function bubbleSort(table)
+
+	for i = 1, #table do
+        for j = 2, #table do
+            if table[j] < table[j-1] then
+
+				temp = table[j-1]
+				t2 = sdName[j-1]
+				t3 = sdKills[j-1]
+
+				table[j-1] = table[j]
+                sdName[j-1] = sdName[j]
+				sdKills[j-1] = sdKills[j]
+
+				table[j] = temp
+				sdName[j] = t2
+				sdKills[j] = t3
+
+            end
+        end
+    end
+
+    return
+
+end
+
+-----------------
+
+function CommentOnScore()
+
+	for i = 0,(TeamsCount-1) do
+		sdScore[i] = teamScore[i]
+		sdKills[i] = teamCircsKilled[i]
+		sdName[i] = teamNameArr[i]
+	end
+
+	--bubbleSort(sdScore)
+
+	for i = 0,(TeamsCount-1) do
+		if sdName[i] ~= " " then
+			teamComment[i] = sdName[i] .. " |" ..
+			loc("SCORE") .. ": " .. sdScore[i] .. " " .. loc("points") .. "|" ..
+			loc("KILLS") .. ": " .. sdKills[i] .. " " .. loc("invaders destroyed") .. "|" ..
+			" " .. "|"
+		elseif sdName[i] == " " then
+			teamComment[i] = "|"
+		end
+	end
+
+	entireC = ""
+	for i = (TeamsCount-1),0,-1 do
+		entireC = entireC .. teamComment[i]
+	end
+
+	ShowMission("SPACE INVASION", loc("STATUS UPDATE"), loc("Rounds Complete") .. ": " .. roundNumber .. "/" .. roundLimit .. "| " .. "|" .. loc("Team Scores") .. ": |" ..entireC, 4, 1)
+
+end
+
+function onNewRound()
+	roundNumber = roundNumber + 1
+
+	CommentOnScore()
+
+	-- end game if its at round limit
+	if roundNumber == roundLimit then
+
+		for i = 0, (TeamsCount-1) do
+			if teamScore[i] > bestScore then
+				bestScore = teamScore[i]
+				bestClan = teamClan[i]
+			end
+		end
+
+		for i = 0, (numhhs-1) do
+			if GetHogClan(hhs[i]) ~= bestClan then
+				SetEffect(hhs[i], heResurrectable, false)
+				SetHealth(hhs[i],0)
+			end
+		end
+		gameOver = true
+		TurnTimeLeft = 0	--1
+		TimeLeft = 0
+	end
+end
+
+-- gaudy racer
+function CheckForNewRound()
+
+	----------
+	-- new
+	----------
+
+	--[[if gameBegun == true then
+
+		if RoundHasChanged == true then
+			roundN = roundN + 1
+			RoundHasChanged = false
+			onNewRound()
+		end
+
+		if lastRound ~= TotalRounds then -- new round, but not really
+
+			if RoundHasChanged == false then
+				RoundHasChanged = true
+			end
+
+		end
+
+		--AddCaption("RoundN:" .. roundN .. "; " .. "TR: " .. TotalRounds)
+		lastRound = TotalRounds
+
+	end]]
+
+	----------
+	-- old
+	----------
+	if GetHogClan(CurrentHedgehog) == firstClan then
+		onNewRound()
+	end
+
+end
+
+
+----------------------------------------
+-- some tumbler/space invaders methods
+----------------------------------------
+
+function isATrackedGear(gear)
+	if 	(GetGearType(gear) == gtExplosives) or
+		(GetGearType(gear) == gtShell) or
+		(GetGearType(gear) == gtFlame) or-- new -- gtBall
+		(GetGearType(gear) == gtBall)
+	then
+		return(true)
+	else
+		return(false)
+	end
+end
+
+function setNewGearValues(gear)
+
+	if GetGearType(gear) == gtShell then
+		lfs = 50	-- roughly 5 seconds
+		shellID = shellID + 1
+		setGearValue(gear,"ID",shellID)
+		--nw WriteLnToConsole("Just assigned ID " .. getGearValue(gear,"ID") .. " to this shell")
+	elseif GetGearType(gear) == gtBall then
+		lfs = 5 --70	-- 7s
+	elseif GetGearType(gear) == gtExplosives then
+		lfs = 15	-- 1.5s
+		explosivesID = explosivesID + 1
+		setGearValue(gear,"ID",explosivesID)
+		setGearValue(gear,"XP", GetX(gear))
+		setGearValue(gear,"YP", GetY(gear))
+		--nw WriteLnToConsole("Just assigned ID " .. getGearValue(gear,"ID") .. " to this explosives")
+	elseif GetGearType(gear) == gtFlame then
+		lfs = 5	-- 0.5s
+	else
+		lfs = 100
+	end
+
+	setGearValue(gear,"lifespan",lfs)
+	--WriteLnToConsole("I also set its lifespan to " .. lfs)
+
+
+end
+
+function HandleLifeSpan(gear)
+
+	decreaseGearValue(gear,"lifespan")
+
+	--WriteLnToConsole("Just decreased the lifespan of a gear to " .. getGearValue(gear,"lifespan"))
+	--WriteLnToConsole("The above event occured game Time: " .. GameTime .. "; luaTicks: " .. luaGameTicks)
+
+
+	if getGearValue(gear,"lifespan") == 0 then
+
+		if GetGearType(gear) == gtShell then
+			AddVisualGear(GetX(gear), GetY(gear), vgtExplosion, 0, false)
+			WriteLnToConsole("about to delete a shell due to lifespan == 0")
+		--elseif GetGearType(gear) == gtBall then
+		--	AddVisualGear(GetX(gear), GetY(gear), vgtSmoke, 0, true)
+		elseif GetGearType(gear) == gtExplosives then
+			AddVisualGear(GetX(gear), GetY(gear), vgtBigExplosion, 0, false)
+			--nw WriteLnToConsole("about to delete a explosive due to lifespan == 0")
+		elseif GetGearType(gear) == gtFlame then
+			AddVisualGear(GetX(gear), GetY(gear), vgtSmoke, 0, false)
+			--WriteLnToConsole("about to delete flame due to lifespan == 0")
+		end
+
+		DeleteGear(gear)
+
+	end
+
+end
+
+-- this prevents ugly barrel clipping sounds when a barrel flies off map limits
+function DeleteFarFlungBarrel(gear)
+
+	if GetGearType(gear) == gtExplosives then
+		if 	(GetX(gear) < -1900) or
+			(GetX(gear) > 6200) or
+			(GetY(gear) < -3400)
+		then
+			AddVisualGear(GetX(gear), GetY(gear), vgtBigExplosion, 0, false)
+			DeleteGear(gear)
+			--SetHealth(gear, 0)
+			--WriteLnToConsole("I'm setting barrel ID " .. getGearValue(gear,"ID") .. " to 0 health because it's been flung too close to the map edges. at Game Time: " .. GameTime .. "; luaTicks: " .. luaGameTicks)
+		end
+
+	end
+
+end
+
+-----------------------
+--EVENT HANDLERS
+-- action keys
+-----------------------
+
+function HandleFlameThrower()
+
+	--
+	--flamer
+
+	fireTimer = fireTimer + 1
+	if fireTimer == 6 then	-- 6
+		fireTimer = 0
+
+		if (wep[wepIndex] == loc("Flamer") ) and (preciseOn == true) and (wepAmmo[wepIndex] > 0) and (stopMovement == false) and (tumbleStarted == true) then
+
+			wepAmmo[wepIndex] = wepAmmo[wepIndex] - 1
+			AddCaption(
+			loc("Flamer") .. ": " ..
+			(wepAmmo[wepIndex]/800*100) - (wepAmmo[wepIndex]/800*100)%2 .. "%",
+			wepCol[2],
+			capgrpMessage2
+			)
+			DrawTag(3)
+
+			dx, dy = GetGearVelocity(CurrentHedgehog)					--gtFlame -- gtSnowball -- gtAirBomb
+			shell = AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), gtFlame, 0, 0, 0, 0)
+
+			xdev = 1 + GetRandom(35)	--25
+			xdev = xdev / 100
+
+			r = GetRandom(2)
+			if r == 1 then
+				xdev = xdev*-1
+			end
+
+			ydev = 1 + GetRandom(35)	--25
+			ydev = ydev / 100
+
+			r = GetRandom(2)
+			if r == 1 then
+				ydev = ydev*-1
+			end
+
+								--4.5	or 2.5 nonflames				--4.5
+			SetGearVelocity(shell, (dx*4.5)+(xdev*fMod), (dy*4.5)+(ydev*fMod))	--10
+
+		end
+
+	end
+
+
+end
+
+function ChangeWeapon()
+
+	wepIndex = wepIndex + 1
+	if wepIndex == wepCount then
+		wepIndex = 0
+	end
+
+	AddCaption(wep[wepIndex] .. " " .. loc("selected!"), wepCol[wepIndex],capgrpAmmoinfo )
+	AddCaption(wepAmmo[wepIndex] .. " " .. loc("shots remaining."), wepCol[wepIndex],capgrpMessage2)
+
+end
+
+--function onTimer()
+
+	-- experimental wep
+	--[[SetVisualGearValues(shockwave, GetX(CurrentHedgehog), GetY(CurrentHedgehog), 40, 255, 1, 10, 0, 300, 1, 0xff33ffff)
+	AddCaption("boom")
+	PlaySound(sndWarp)
+	shockwaveHealth = 100
+	shockwaveRad = 100]]
+
+
+	--change wep
+	--ChangeWeapon()
+
+	-- booster
+	--[[if boosterOn == false then
+		boosterOn = true
+	else
+		boosterOn = false
+	end]]
+
+--end
+
+-- o rite dis wan iz liek synched n stuff hope full lee
+-- old method
+--[[function onPrecise()
+
+
+	-- Fire Barrel
+	if (primShotsLeft > 0) and (CurrentHedgehog ~= nil) and (stopMovement == false) and (tumbleStarted == true) then
+
+		shotsFired = shotsFired +1
+
+		morte = AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), gtExplosives, 0, 0, 0, 1)
+
+		primShotsLeft = primShotsLeft - 1
+
+		if primShotsLeft == 0 then
+			PlaySound(sndSuddenDeath)
+			AddCaption(loc("Ammo Depleted!"),0xff0000ff,capgrpMessage)
+		else
+			AddCaption(loc("Ammo") .. ": " .. primShotsLeft)
+		end
+		DrawTag(1)
+
+		CopyPV(CurrentHedgehog, morte) -- new addition
+		x,y = GetGearVelocity(morte)
+
+		x = x*2
+		y = y*2
+		SetGearVelocity(morte, x, y)
+
+
+	elseif (primShotsLeft == 0) and (CurrentHedgehog ~= nil) and (stopMovement == false) and (tumbleStarted == true) then
+		AddCaption(loc("Ammo Depleted!"),0xff0000ff,capgrpMessage)
+	end
+
+
+end]]
+
+-- derp tumbler
+function onPrecise()
+
+	if (CurrentHedgehog ~= nil) and (stopMovement == false) and (tumbleStarted == true) and (wepAmmo[wepIndex] > 0) then
+
+		wepAmmo[wepIndex] = wepAmmo[wepIndex] - 1
+		--AddCaption(wepAmmo[wepIndex] .. " " .. loc("shots remaining."), wepCol[wepIndex],capgrpMessage2)
+
+		if wep[wepIndex] == loc("Barrel Launcher") then
+			shotsFired = shotsFired +1
+
+			morte = AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), gtExplosives, 0, 0, 0, 1)
+			CopyPV(CurrentHedgehog, morte) -- new addition
+			x,y = GetGearVelocity(morte)
+			x = x*2
+			y = y*2
+			SetGearVelocity(morte, x, y)
+
+			if wepAmmo[wepIndex] == 0 then
+			PlaySound(sndSuddenDeath)
+			AddCaption(loc("Ammo Depleted!"),0xff0000ff,capgrpMessage)
+			else
+				--AddCaption(loc("Ammo") .. ": " .. wepAmmo[wepIndex])
+			end
+			DrawTag(1)
+
+		elseif wep[wepIndex] == loc("Mine Deployer") then
+			morte = AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), gtAirBomb, 0, 0, 0, 0)
+			SetTimer(morte, 1000)
+			DrawTag(1)
+		end
+
+	elseif (wepAmmo[wepIndex] == 0) and (CurrentHedgehog ~= nil) and (stopMovement == false) and (tumbleStarted == true) then
+		AddCaption(loc("Ammo Depleted!"),0xff0000ff,capgrpMessage)
+	end
+
+	preciseOn = true
+
+end
+
+function onPreciseUp()
+	preciseOn = false
+end
+
+function onLJump()
+
+	if (CurrentHedgehog ~= nil) and (stopMovement == false) and (tumbleStarted == true) then
+		shieldMiser = false
+		if shieldHealth == 80 then
+			AddCaption(loc("Shield Depleted"),0xff0000ff,capgrpMessage)
+			PlaySound(sndMineTick)
+			PlaySound(sndSwitchHog)
+		elseif (beam == false) and (shieldHealth > 80) then
+			beam = true
+			SetVisualGearValues(pShield, GetX(CurrentHedgehog), GetY(CurrentHedgehog), 40, 255, 1, 10, 0, 300, 1, 0xa800ffff)
+			AddCaption( loc("Shield ON:") .. " " .. shieldHealth - 80 .. " " .. loc("Power Remaining") )
+			PlaySound(sndWarp)
+		else
+			beam = false
+			SetVisualGearValues(pShield, GetX(CurrentHedgehog), GetY(CurrentHedgehog), 0, 0, 1, 10, 0, 0, 0, 0xa800ffff)
+			AddCaption(loc("Shield OFF:") .. " " .. shieldHealth - 80 .. " " .. loc("Power Remaining") )
+		end
+	end
+end
+
+function onHJump()
+
+	if (CurrentHedgehog ~= nil) and (stopMovement == false) and (tumbleStarted == true) and
+	(rAlpha == 255) and (radShotsLeft > 0) then
+		rPingTimer = 0
+		rAlpha = 0
+		radShotsLeft = radShotsLeft -1
+		AddCaption(loc("Pings left:") .. " " .. radShotsLeft,GetClanColor(GetHogClan(CurrentHedgehog)),capgrpMessage)
+	end
+
+end
+
+-----------------
+-- movement keys
+-----------------
+
+function onLeft()
+	leftOn = true
+end
+
+function onRight()
+	rightOn = true
+end
+
+function onUp()
+	upOn = true
+end
+
+function onDown()
+	downOn = true
+end
+
+function onDownUp()
+	downOn = false
+end
+
+function onUpUp()
+	upOn = false
+end
+
+function onLeftUp()
+	leftOn = false
+end
+
+function onRightUp()
+	rightOn = false
+end
+
+--------------------------
+-- other event handlers
+--------------------------
+
+function onGameInit()
+	GameFlags = 0 + gfRandomOrder
+	Theme = "EarthRise"
+	CaseFreq = 0
+	HealthCaseProb = 0
+	MinesNum = 0
+	Explosives = 0
+	Delay = 1000
+
+	for i = 0, 3 do
+		vTag[0] = AddVisualGear(0, 0, vgtHealthTag, 0, false)
+	end
+
+	HideTags()
+
+	wep[0] = loc("Barrel Launcher")
+	wep[1] = loc("Mine Deployer")
+	wep[2] = loc("Flamer")
+
+	wepCol[0] = 0x78818eff
+	wepCol[1] = 0xa12a77ff
+	wepCol[2] = 0xf49318ff
+
+	wepCount = 3
+
+end
+
+function onGameStart()
+
+	if (MinesTime == -1000) or (MinesTime == 0) then
+		roundLimit = 3
+	else
+		roundLimit = (MinesTime / 1000)
+	end
+
+	ShowMission	(
+				"SPACE INVASION",
+				loc("a Hedgewars mini-game"),
+
+				loc("Destroy invaders to score points.") .. "|" ..
+				" " .. "|" ..
+
+				loc("Round Limit") .. ": " .. roundLimit .. "|" ..
+				loc("Turn Time") .. ": " .. (TurnTime/1000) .. loc("sec") .. "|" ..
+				" " .. "|" ..
+
+				loc("Movement: [Up], [Down], [Left], [Right]") .. "|" ..
+				loc("Fire") .. ": " .. loc("[Left Shift]") .. "|" ..
+				loc("Toggle Shield") .. ": " .. loc("[Enter]") .. "|" ..
+				loc("Radar Ping") .. ": " .. loc("[Backspace]") .. "|" ..
+
+				--" " .. "|" ..
+				--LOC_NOT("Invaders List: ") .. "|" ..
+				--LOC_NOT("Blue Jabberwock: (50 points)") .. "|" ..
+				--LOC_NOT("Red Warbler: (10 points)") .. "|" ..
+				--LOC_NOT("Orange Gob: (5 points)") .. "|" ..
+				--LOC_NOT("Green Wrangler: (3 points)") .. "|" ..
+
+
+				"", 4, 4000
+				)
+
+	CreateMeSomeCircles()
+	RebuildTeamInfo() -- control
+	lastRound = TotalRounds
+
+end
+
+function onScreenResize()
+
+	-- redraw Tags so that their screen locations are updated
+	if (CurrentHedgehog ~= nil) and (tumbleStarted == true) then
+			DrawTag(0)
+			DrawTag(1)
+			DrawTag(2)
+	end
+
+end
+
+function onNewTurn()
+
+	--primShotsLeft = primShotsMax
+	radShotsLeft = 2
+	stopMovement = false
+	tumbleStarted = false
+	boosterOn = false
+	beam = false
+	shieldHealth = 30 + 80 -- 50 = 5 secs, roughly
+	shockwaveHealth = 0
+
+	RK = 0
+	GK = 0
+	BK = 0
+	OK = 0
+	SK = 0
+	roundKills = 0
+	shieldMiser = true
+	fierceComp = false
+	shotsFired = 0
+	shotsHit = 0
+	sniperHits = 0
+	pointBlankHits = 0
+	chainLength = 0
+	chainCounter = 0
+	SurfTime = 12
+
+	-------------------------
+	-- gaudy racer
+	-------------------------
+	CheckForNewRound()
+
+	-- Handle Starting Stage of Game
+	if (gameOver == false) and (gameBegun == false) then
+		gameBegun = true
+		roundNumber = 0 -- 0
+		firstClan = GetHogClan(CurrentHedgehog)
+	end
+
+	if gameOver == true then
+		gameBegun = false
+		stopMovement = true
+		tumbleStarted = false
+		SetMyCircles(false)
+	end
+
+
+	-------
+	-- tumbler
+	----
+
+	wepAmmo[0] = 5
+	wepAmmo[1] = 2
+	wepAmmo[2] = 5000
+	wepIndex = 2
+	ChangeWeapon()
+
+
+	HideTags()
+
+	---------------
+	---------------
+	--AddCaption("num g: " .. numGears() )
+	--WriteLnToConsole("onNewTurn, I just set a bunch of variables to their necessary states. This was done at:")
+	--WriteLnToConsole("The above occured at Game Time: " .. GameTime .. "; luaTicks: " .. luaGameTicks)
+
+end
+
+function ThingsToBeRunOnGears(gear)
+
+	HandleLifeSpan(gear)
+	DeleteFarFlungBarrel(gear)
+
+	if CirclesAreGo == true then
+		CheckVarious(gear)
+		ProjectileTrack(gear)
+	end
+
+end
+
+
+function onGameTick20()
+
+
+	--WriteLnToConsole("Start of GameTick")
+
+	HandleCircles()
+
+	-- derp
+	--if shockwaveHealth > 0 then
+	--	shockwaveHealth = shockwaveHealth - 1
+	--	shockwaveRad = shockwaveRad + 5
+	--end
+
+
+	if GameTime%100 == 0 then
+
+		if beam == true then
+			shieldHealth = shieldHealth - 1
+			if shieldHealth < 80 then -- <= 80
+				shieldHealth = 80
+				beam = false
+				AddCaption(loc("Shield Depleted"),0xff0000ff,capgrpMessage)
+				PlaySound(sndMineTick)
+				PlaySound(sndSwitchHog)
+			end
+		end
+
+
+
+		--nw WriteLnToConsole("Starting ThingsToBeRunOnGears()")
+
+		runOnGears(ThingsToBeRunOnGears)
+
+		--nw WriteLnToConsole("Finished ThingsToBeRunOnGears()")
+
+		--runOnGears(HandleLifeSpan)
+		--runOnGears(DeleteFarFlungBarrel)
+
+		if CirclesAreGo == true and CurrentHedgehog ~= nil then
+			CheckDistances()
+			--runOnGears(CheckVarious)	-- used to be in handletracking for some bizarre reason
+			--runOnGears(ProjectileTrack)
+		end
+
+		-- white smoke trail as player falls from the sky
+		if (TimeLeft <= 0) and (stopMovement == true) and (CurrentHedgehog ~= nil) then
+			j,k = GetGearVelocity(CurrentHedgehog)
+			if (j ~= 0) and (k ~= 0) then
+				AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), vgtSmoke, 0, true)
+			end
+		end
+
+		--nw WriteLnToConsole("Finished 100Timer")
+
+	end
+
+
+	-- start the player tumbling with a boom once their turn has actually begun
+	if (tumbleStarted == false) and (gameOver == false) then
+		if (TurnTimeLeft > 0) and (TurnTimeLeft ~= TurnTime) then
+			--AddCaption(LOC_NOT("Good to go!"))
+			tumbleStarted = true
+			TimeLeft = div(TurnTime, 1000)	--45
+			FadeAlpha = 0
+			rAlpha = 255
+			AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), gtGrenade, 0, 0, 0, 1)
+			DrawTag(0)
+			DrawTag(1)
+			DrawTag(2)
+			SetMyCircles(true)
+		end
+	end
+
+	--WriteLnToConsole("Finished initial check")
+
+	if (CurrentHedgehog ~= nil) and (tumbleStarted == true) then
+
+		--AddCaption(GetX(CurrentHedgehog) .. ";" .. GetY(CurrentHedgehog) )
+
+		-- Calculate and display turn time
+		if GameTime%1000 == 0 then
+			TimeLeft = TimeLeft - 1
+
+			if TimeLeft >= 0 then
+				--AddCaption(LOC_NOT("Time Left: ") .. TimeLeft)
+				DrawTag(0)
+			end
+
+		end
+
+		--WriteLnToConsole("Finished timeleft calculations")
+
+		-------------------------------
+		-- Player has run out of luck (out of time or hit by gtShell)
+		-------------------------------
+		-- checks in FloatyThings
+		if PlayerIsFine() == false then
+			TimeLeft = 0
+		end
+
+		--WriteLnToConsole("successfully checked playerIsFine")
+
+		if (TimeLeft == 0) then
+			if (stopMovement == false) then	--time to stop the player
+				stopMovement = true
+				boosterOn = false
+				beam = false
+				upOn = false
+				down = false
+				leftOn = false
+				rightOn = false
+				SetMyCircles(false)
+				HideTags()
+				rAlpha = 255
+				--nw WriteLnToConsole("Player is out of luck")
+
+				if shieldMiser == true then
+
+					p = (roundKills*3.5) - ((roundKills*3.5)%1) + 2
+
+					AddCaption(loc("Shield Miser!") .." +" .. p .." ".. loc("points") .. "!",0xffba00ff,capgrpAmmoinfo)
+					AwardPoints(p)
+				end
+
+				if ((shotsHit / shotsFired * 100) >= 80) and (shotsFired > 4) then
+					AddCaption(loc("Accuracy Bonus!") .. " +15 " .. loc("points") .. "!",0xffba00ff,capgrpVolume)
+					AwardPoints(15)
+				end
+
+			end
+		else -- remove this if you want tumbler to fall slowly on death
+		-------------------------------
+		-- Player is still in luck
+		-------------------------------
+
+
+			--WriteLnToConsole("about to do chainCounter checks")
+			if chainCounter > 0 then
+				chainCounter = chainCounter -1
+				if chainCounter == 0 then
+					chainLength = 0
+				end
+			end
+
+			-- handle movement based on IO
+			if GameTime%100 == 0 then -- 100
+				--nw WriteLnToConsole("Start of Player MoveTimer")
+
+				---------------
+				-- new trail code
+				---------------
+				-- the trail lets you know you have 5s left to pilot, akin to birdy feathers
+				if (TimeLeft <= 5) and (TimeLeft > 0) then							--vgtSmoke
+					tempE = AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), 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(GetHogClan(CurrentHedgehog)) )
+				end
+				--------------
+				--------------
+
+				------------------------
+				-- surfer achievement
+				------------------------
+
+				if (WaterLine - GetY(CurrentHedgehog)) < 15 then
+					SurfTime = SurfTime -1
+				end
+
+				if SurfTime ~= 12 then
+
+					SurfTime = SurfTime - 1
+					if SurfTime <= 0 then
+						for i = 0,(TeamsCount-1) do
+							if teamClan[i] == GetHogClan(CurrentHedgehog) and (teamSurfer[i] == false) then
+								teamSurfer[i] = true
+								SurfTime = 12
+								AddCaption(loc("Surfer! +15 points!"),0xffba00ff,capgrpVolume)
+								AwardPoints(15)
+							end
+						end
+					end
+				end
+
+
+				dx, dy = GetGearVelocity(CurrentHedgehog)
+
+				--WriteLnToConsole("I just got the velocity of currenthedgehog. It is dx: " .. dx .. "; dy: " .. dy)
+				--WriteLnToConsole("The above event occured game Time: " .. GameTime .. "; luaTicks: " .. luaGameTicks)
+
+				if boosterOn == true then
+					tempE = AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), vgtDust, 0, false)
+					g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE)
+					SetVisualGearValues(tempE, g1, g2, g3, g4, g5, g6, g7, 1, g9, GetClanColor(GetHogClan(CurrentHedgehog)) )
+					dxlimit = 0.8*fMod
+					dylimit = 0.8*fMod
+				else
+					dxlimit = 0.4*fMod
+					dylimit = 0.4*fMod
+				end
+
+				if dx > dxlimit then
+					dx = dxlimit
+				end
+				if dy > dylimit then
+					dy = dylimit
+				end
+				if dx < -dxlimit then
+					dx = -dxlimit
+				end
+				if dy < -dylimit then
+					dy = -dylimit
+				end
+
+
+				if leftOn == true then
+					dx = dx - 0.1*fMod
+				end
+				if rightOn == true then
+					dx = dx + 0.1*fMod
+				end
+
+				if upOn == true then
+					dy = dy - 0.1*fMod
+				end
+				if downOn == true then
+					dy = dy + 0.1*fMod
+				end
+
+				SetGearVelocity(CurrentHedgehog, dx, dy)
+
+				--WriteLnToConsole("I just SET the velocity of currenthedgehog. It is now dx: " .. dx .. "; dy: " .. dy)
+				--WriteLnToConsole("The above event occured game Time: " .. GameTime .. "; luaTicks: " .. luaGameTicks)
+				--nw WriteLnToConsole("End of Player MoveTimer")
+
+			end
+
+
+			HandleFlameThrower()
+
+
+		end -- new end I put here to check if he's still alive or not
+
+	end
+
+	--WriteLnToConsole("End of GameTick")
+
+end
+
+function onGearDamage(gear, damage)
+	if GetGearType(gear) == gtHedgehog then
+		if (fierceComp == false) and (damage >= 60) and (GetHogClan(gear) ~= GetHogClan(CurrentHedgehog)) then
+			fierceComp = true
+			AddCaption(loc("Fierce Competition!") .. " +8 " .. loc("points") .. "!",0xffba00ff,capgrpGameState)
+			AwardPoints(8)
+		end
+	end
+end
+
+function onGearResurrect(gear)
+
+	-- did I fall into the water? well, that was a stupid thing to do
+	if gear == CurrentHedgehog then
+		TimeLeft = 0
+		--WriteLnToConsole("Current hedgehog just drowned himself")
+		--WriteLnToConsole("The above event occured game Time: " .. GameTime .. "; luaTicks: " .. luaGameTicks)
+	end
+
+end
+
+function onGearAdd(gear)
+
+	if isATrackedGear(gear) then
+		trackGear(gear)
+		setNewGearValues(gear)
+	end
+
+	--if GetGearType(gear) == gtBall then
+	--	SetTimer(gear, 5000)
+	--end
+
+	if GetGearType(gear) == gtHedgehog then
+		SetEffect(gear, heResurrectable, true)
+
+		-----------
+		-- control
+		hhs[numhhs] = gear
+		numhhs = numhhs + 1
+		-----------
+	end
+
+end
+
+function onGearDelete(gear)
+
+
+	--[[if GetGearType(gear) == gtShell then
+		--nw WriteLnToConsole("on GearDelete call. Shell ID: " .. getGearValue(gear,"ID"))
+		--WriteLnToConsole("The above event occured game Time: " .. GameTime .. "; luaTicks: " .. luaGameTicks)
+
+		--if CurrentHedgehog ~= nil then
+		--	WriteLnToConsole("As it happens, player is at: " .. GetX(CurrentHedgehog) .. "; " .. GetY(CurrentHedgehog))
+		--end
+	elseif GetGearType(gear) == gtExplosives then
+		--nw WriteLnToConsole("on GearDelete call. Explosives ID: " .. getGearValue(gear,"ID"))
+		--WriteLnToConsole("The above event occured game Time: " .. GameTime .. "; luaTicks: " .. luaGameTicks)
+
+		--if CurrentHedgehog ~= nil then
+		--	WriteLnToConsole("As it happens, player is at: " .. GetX(CurrentHedgehog) .. "; " .. GetY(CurrentHedgehog))
+		--end
+	elseif GetGearType(gear) == gtFlame then
+		--WriteLnToConsole("on GearDelete flame")
+	end]]
+
+	if isATrackedGear(gear) then
+		trackDeletion(gear)
+	end
+
+	if CurrentHedgehog ~= nil then
+		FollowGear(CurrentHedgehog)
+	end
+
+end
+
+
+
+------------------------------------------------------------
+------------------------------------------------------------
+------------------------------------------------------------
+------------------------------------------------------------
+-- FLOATY THINGS
+-- "I'll make this into a generic library and code properly
+-- when I have more time and feel less lazy"
+------------------------------------------------------------
+------------------------------------------------------------
+------------------------------------------------------------
+------------------------------------------------------------
+
+function DoHorribleThings(cUID)
+
+	-- work out the distance to the target
+	g1X, g1Y = GetGearPosition(CurrentHedgehog)
+	g2X, g2Y = vCircX[cUID], vCircY[cUID]
+	q = g1X - g2X
+	w = g1Y - g2Y
+	r = math.sqrt( (q*q) + (w*w) )	--alternate
+
+	opp = w
+	if opp < 0 then
+		opp = opp*-1
+	end
+
+	-- work out the angle (theta) to the target
+	t = math.deg ( math.asin(opp / r) )
+
+	-- based on the radius of the radar, calculate what x/y displacement should be
+	NR = 150 -- radius at which to draw circs
+	NX = math.cos( math.rad(t) ) * NR
+	NY = math.sin( math.rad(t) ) * NR
+
+	-- displace xy based on where this thing actually is
+
+	if r < NR then
+		rCircX[cUID] = g2X
+	elseif q > 0 then
+		rCircX[cUID] = g1X - NX
+	else
+		rCircX[cUID] = g1X + NX
+	end
+
+	if r < NR then
+		rCircY[cUID] = g2Y
+	elseif w > 0 then
+		rCircY[cUID] = g1Y - NY
+	else
+		rCircY[cUID] = g1Y + NY
+	end
+
+end
+
+function PlayerIsFine()
+	return (playerIsFine)
+end
+
+function GetDistFromXYtoXY(a, b, c, d)
+	q = a - c
+	w = b - d
+	return ( (q*q) + (w*w) )
+end
+
+function GetDistFromGearToGear(gear, gear2)
+
+	g1X, g1Y = GetGearPosition(gear)
+	g2X, g2Y = GetGearPosition(gear2)
+	q = g1X - g2X
+	w = g1Y - g2Y
+
+
+	--[[
+	WriteLnToConsole("I just got the position of two gears and calculated the distance betwen them")
+	if gear == CurrentHedgehog then
+		WriteLnToConsole("Gear 1 is CurrentHedgehog.")
+	end
+	if gear2 == CurrentHedgehog then
+		WriteLnToConsole("Gear 2 is CurrentHedgehog.")
+	end
+	WriteLnToConsole("G1X: " .. g1X .. "; G1Y: " .. g1Y)
+	WriteLnToConsole("G2X: " .. g2X .. "; G2Y: " .. g2Y)
+	WriteLnToConsole("Their distance is " .. (q*q) + (w*w) )
+	WriteLnToConsole("The above events occured game Time: " .. GameTime .. "; luaTicks: " .. luaGameTicks)
+]]
+
+
+	return ( (q*q) + (w*w) )
+
+end
+
+function GetDistFromGearToXY(gear, g2X, g2Y)
+
+	g1X, g1Y = GetGearPosition(gear)
+	q = g1X - g2X
+	w = g1Y - g2Y
+
+
+	--[[WriteLnToConsole("I just got the position of a gear and calculated the distance betwen it and another xy")
+	if gear == CurrentHedgehog then
+		WriteLnToConsole("Gear 1 is CurrentHedgehog.")
+	end
+
+	WriteLnToConsole("G1X: " .. g1X .. "; G1Y: " .. g1Y)
+	WriteLnToConsole("Other X: " .. g2X .. "; Other Y: " .. g2Y)
+	WriteLnToConsole("Their distance is " .. (q*q) + (w*w) )
+	WriteLnToConsole("The above events occured game Time: " .. GameTime .. "; luaTicks: " .. luaGameTicks)
+]]
+
+
+	return ( (q*q) + (w*w) )
+
+
+end
+
+function CreateMeSomeCircles()
+
+	for i = 0, 7 do
+		vCCount = vCCount +1
+		vCirc[i] = AddVisualGear(0,0,vgtCircle,0,true)
+
+		rCirc[i] = AddVisualGear(0,0,vgtCircle,0,true)
+		rCircX[i] = 0
+		rCircY[i] = 0
+
+		vCircDX[i] = 0
+		vCircDY[i] = 0
+
+		vType[i] = "generic"
+		vCounter[i] = 0
+		vCounterLim[i] = 150
+		vCircScore[i] = 0
+		vCircHealth[i] = 1
+
+		vCircMinA[i] = 80	--80 --20
+		vCircMaxA[i] = 255
+		vCircType[i] = 1	--1
+		vCircPulse[i] = 10
+		vCircFuckAll[i] = 0
+		vCircRadius[i] = 0
+		vCircWidth[i] = 3 --5
+
+		vCircRadMax[i] = 0
+		vCircRadMin[i] = 0
+		vCircRadDir[i] = -1
+		vCircRadCounter[i] = 0
+
+		vCircX[i], vCircY[i] = 0,0
+
+		vCircCol[i] = 0xff00ffff
+
+		SetVisualGearValues(vCirc[i], vCircX[i], vCircY[i], vCircMinA[i], vCircMaxA[i], vCircType[i], vCircPulse[i], vCircFuckAll[i], vCircRadius[i], vCircWidth[i], vCircCol[i])
+
+		SetVisualGearValues(rCirc[i], 0, 0, 100, 255, 1, 10, 0, 40, 3, vCircCol[i])
+
+	end
+
+	pShield = AddVisualGear(0,0,vgtCircle,0,true)
+	--SetVisualGearValues(pShield, GetX(CurrentHedgehog), GetY(CurrentHedgehog), 80, 200, 1, 10, 0, 200, 5, 0xff00ffff)
+
+
+	shockwave = AddVisualGear(0,0,vgtCircle,0,true)
+
+end
+
+function IGotMeASafeXYValue(i)
+
+	acceptibleDistance = 800
+
+	-- put this in here to thwart attempts at repositioning and test sanity limit
+	--vCircX[i] = GetX(CurrentHedgehog)+250
+	--vCircY[i] = GetY(CurrentHedgehog)+250
+
+	vCircX[i] = GetRandom(5000)
+	vCircY[i] = GetRandom(2000)
+	dist = GetDistFromGearToXY(CurrentHedgehog, vCircX[i], vCircY[i])
+	if dist > acceptibleDistance*acceptibleDistance then
+		return(true)
+	else
+		return(false)
+	end
+
+end
+
+function CircleDamaged(i)
+
+	res = ""
+	vCircHealth[i] = vCircHealth[i] -1
+
+	if vCircHealth[i] <= 0 then
+	-- circle is dead, do death effects/consequences
+
+		vCircActive[i] = false
+
+		if (vType[i] == "drone") then
+			PlaySound(sndHellishImpact4)
+			TimeLeft = TimeLeft + 4
+			AddCaption(loc("Time Extended!") .. "+" .. 4 .. loc("sec"), 0xff0000ff,capgrpMessage )
+			DrawTag(0)
+
+			morte = AddGear(vCircX[i], vCircY[i], gtExplosives, 0, 0, 0, 1)
+			SetHealth(morte, 0)
+
+			RK = RK + 1
+			if RK == 5 then
+				RK = 0
+				AddCaption(loc("Drone Hunter!") .. " +10 " .. loc("points") .. "!",0xffba00ff,capgrpMessage2)
+				AwardPoints(10)
+			end
+
+		elseif (vType[i] == "ammo") then
+			AddVisualGear(vCircX[i], vCircY[i], vgtExplosion, 0, false)
+			PlaySound(sndExplosion)
+			PlaySound(sndShotgunReload)
+			wepAmmo[0] = wepAmmo[0] +3
+			--primShotsLeft = primShotsLeft + 3
+			AddCaption("+" .. 3 .. " " .. loc("Ammo"), 0x00ff00ff,capgrpMessage)
+			DrawTag(1)
+
+			GK = GK + 1
+			if GK == 3 then
+				GK = 0
+				AddCaption(loc("Ammo Maniac!") .. " +5 " .. loc("points") .. "!",0xffba00ff,capgrpMessage2)
+				AwardPoints(5)
+			end
+
+		elseif (vType[i] == "bonus") then
+
+			AddVisualGear(vCircX[i], vCircY[i], vgtExplosion, 0, false)
+			PlaySound(sndExplosion)
+
+			AddVisualGear(vCircX[i], vCircY[i], vgtFire, 0, false)
+			AddVisualGear(vCircX[i], vCircY[i], vgtFire, 0, false)
+			AddVisualGear(vCircX[i], vCircY[i], vgtFire, 0, false)
+			AddVisualGear(vCircX[i], vCircY[i], vgtFire, 0, false)
+			AddVisualGear(vCircX[i], vCircY[i], vgtFire, 0, false)
+			AddVisualGear(vCircX[i], vCircY[i], vgtSmoke, 0, false)
+
+			PlaySound(sndVaporize)
+			--sndWarp sndMineTick --sndSwitchHog --sndSuddenDeath
+
+			shieldHealth = shieldHealth + 30
+			AddCaption(loc("Shield boosted! +30 power"), 0xa800ffff,capgrpMessage)
+			if shieldHealth >= 250 then
+				shieldHealth = 250
+				AddCaption(loc("Shield is fully recharged!"),0xa800ffff,capgrpMessage)
+			end
+			DrawTag(2)
+
+			OK = OK + 1
+			if OK == 3 then
+				OK = 0
+				AddCaption(loc("Shield Seeker!") .. " + 10 " .. loc("points") .. "!",0xffba00ff,capgrpMessage2)
+				AwardPoints(10)
+			end
+
+		elseif (vType[i] == "blueboss") then
+			PlaySound(sndHellishImpact3)
+			AddCaption(loc("Boss defeated!") .. " +30 " .. loc("points") .. "!", 0x0050ffff,capgrpMessage)
+
+			morte = AddGear(vCircX[i], vCircY[i], gtExplosives, 0, 0, 0, 1)
+			SetHealth(morte, 0)
+
+			BK = BK + 1
+			if BK == 2 then
+				BK = 0
+				AddCaption(loc("Boss Slayer!") .. " +25 " .. loc("points") .. "!",0xffba00ff,capgrpMessage2)
+				AwardPoints(25)
+			end
+
+		end
+
+		AwardPoints(vCircScore[i])
+		AwardKills()
+		SetUpCircle(i)
+		res = "fatal"
+
+		chainCounter = 3000
+		chainLength = chainLength + 1
+		if chainLength > 1 then
+			AddCaption( chainLength .. "-" .. loc("Hit Combo!") .. " +" .. chainLength*2 .. " " .. loc("points") .. "!",0xffba00ff,capgrpAmmostate)
+			AwardPoints(chainLength*2)
+		end
+
+	else
+	-- circle is merely damaged
+	-- do damage effects/sounds
+		AddVisualGear(vCircX[i], vCircY[i], vgtSteam, 0, false)
+		r = GetRandom(4)
+		if r == 0 then
+			PlaySound(sndHellishImpact1)
+		elseif r == 1 then
+			PlaySound(sndHellishImpact2)
+		elseif r == 2 then
+			PlaySound(sndHellishImpact3)
+		elseif r == 3 then
+			PlaySound(sndHellishImpact4)
+		end
+		res = "non-fatal"
+
+	end
+
+	return(res)
+
+end
+
+function SetUpCircle(i)
+
+
+	r = GetRandom(10)
+	--r = 8
+	-- 80% of spawning either red/green
+	if r <= 7 then
+
+		--r = GetRandom(5)
+		r = GetRandom(2)
+		--r = 1
+		if r == 0 then
+		--if r <= 2 then
+			vCircCol[i] = 0xff0000ff -- red
+			vType[i] = "drone"
+			vCircRadMin[i] = 50	*5
+			vCircRadMax[i] = 90	*5
+			vCounterLim[i] = 150
+			vCircScore[i] = 10
+			vCircHealth[i] = 1
+		--else
+		elseif r == 1 then
+			vCircCol[i] = 0x00ff00ff -- green
+			vType[i] = "ammo"
+			vCircRadMin[i] = 25	*7
+			vCircRadMax[i] = 30	*7
+			vCircScore[i] = 3
+			vCircHealth[i] = 1
+		end
+
+	-- 20% chance of spawning boss or bonus
+	else
+		r = GetRandom(5)
+		--r = GetRandom(2)
+		--r = 0
+		if r <= 1 then
+		--if r == 0 then
+			vCircCol[i] = 0x0050ffff -- sexy blue
+			vType[i] = "blueboss"
+			vCircRadMin[i] = 100*5
+			vCircRadMax[i] = 180*5
+			vCircWidth[i] = 1
+			vCounterLim[i] = 100
+			vCircScore[i] = 30
+			vCircHealth[i] = 3
+		else
+		--elseif r == 1 then
+			--vCircCol[i] = 0xffae00ff -- orange
+			vCircCol[i] = 0xa800ffff -- purp
+			vType[i] = "bonus"
+			vCircRadMin[i] = 20 *7
+			vCircRadMax[i] = 40 *7
+			vCircScore[i] = 5
+			vCircHealth[i] = 1
+		end
+
+	end
+
+	-- regenerate circle xy if too close to player or until sanity limit kicks in
+	reN = 0
+	--zzz = 0
+	while (reN < 10) do
+		if IGotMeASafeXYValue(i) == false then
+			reN = reN + 1
+			--zzz = zzz + 1
+		else
+			reN = 15
+		end
+	end
+	--AddCaption("Took me this many retries: " .. zzz) -- number of times it took to work
+
+	vCircRadius[i] = vCircRadMax[i] - GetRandom(vCircRadMin[i])
+
+	g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(vCirc[i])
+	SetVisualGearValues(vCirc[i], vCircX[i], vCircY[i], g3, g4, g5, g6, g7, vCircRadius[i], vCircWidth[i], vCircCol[i]-0x000000ff)
+	-- - -0x000000ff
+
+	g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(rCirc[i])
+	SetVisualGearValues(rCirc[i], 0, 0, g3, g4, g5, g6, g7, g8, g9, vCircCol[i]-0x000000ff)
+
+
+	vCircActive[i] = true -- new
+
+	--nw WriteLnToConsole("CIRC " .. i .. ": X: " .. vCircX[i] .. "; Y: " .. vCircY[i])
+	--nw WriteLnToConsole("CIRC " .. i .. ": dX: " .. vCircDX[i] .. "; dY: " .. vCircDY[i])
+	--nw WriteLnToConsole("CIRC " .. i .. ": RAD:" .. vCircRadius[i])
+
+end
+
+function SetMyCircles(s)
+
+	CirclesAreGo = s
+	playerIsFine = s
+
+	if s == true then
+		--nw WriteLnToConsole("About to set up all circles, old values are here:")
+		for i = 0,(vCCount-1) do
+			--nw WriteLnToConsole("CIRC " .. i .. ": X: " .. vCircX[i] .. "; Y: " .. vCircY[i])
+			--nw WriteLnToConsole("CIRC " .. i .. ": dX: " .. vCircDX[i] .. "; dY: " .. vCircDY[i])
+			--nw WriteLnToConsole("CIRC " .. i .. ": RAD:" .. vCircRadius[i])
+		end
+		--nw WriteLnToConsole("Old values given, new values to follow...")
+	end
+
+	for i = 0,(vCCount-1) do
+
+		if s == false then
+			--vCircCol[i] = 0xffffffff
+			vCircActive[i] = false
+		elseif s == true then
+			SetUpCircle(i)
+		end
+
+	end
+
+end
+
+function WellHeAintGonnaJumpNoMore(x,y)
+
+	AddVisualGear(x, y, vgtBigExplosion, 0, false)
+	playerIsFine = false
+	AddCaption(loc("GOTCHA!"))
+	PlaySound(sndExplosion)
+	PlaySound(sndHellish)
+
+	targetHit = true
+
+end
+
+--- collision detection for weapons fire
+function CheckVarious(gear)
+
+	--if (GetGearType(gear) == gtExplosives) then
+		--nw WriteLnToConsole("Start of CheckVarious(): Exp ID: " .. getGearValue(gear,"ID"))
+	--elseif (GetGearType(gear) == gtShell) then
+		--nw WriteLnToConsole("Start of CheckVarious(): Shell ID: " .. getGearValue(gear,"ID"))
+	--end
+
+	targetHit = false
+
+	-- if circle is hit by player fire
+	if (GetGearType(gear) == gtExplosives) then
+		circsHit = 0
+
+		for i = 0,(vCCount-1) do
+
+			--nw WriteLnToConsole("Is it neccessary to check for collision with circ " .. i)
+
+			--if (vCircActive[i] == true) and ( (vType[i] == "drone") ) then
+
+				--nw WriteLnToConsole("YES. about to calc distance between gtExplosives and circ " .. i)
+
+				dist = GetDistFromGearToXY(gear, vCircX[i], vCircY[i])
+
+				-- calculate my real radius if I am an aura
+				if vCircType[i] == 0 then
+					NR = vCircRadius[i]
+				else
+					NR = (48/100*vCircRadius[i])/2
+				end
+
+				if dist <= NR*NR then
+
+
+					--nw WriteLnToConsole("Collision confirmed. The gtExplosives is within the circ radius!")
+
+					dist = (GetDistFromXYtoXY(vCircX[i], vCircY[i], getGearValue(gear,"XP"), getGearValue(gear,"YP")) - (NR*NR))
+					--AddCaption(loc("Dist: ") .. dist .. "!",0xffba00ff,capgrpGameState)
+					if dist >= 1000000 then
+						sniperHits = sniperHits +1
+						AddCaption(loc("Sniper!") .. " +8 " .. loc("points") .. "!",0xffba00ff,capgrpGameState)
+						AwardPoints(8)
+						if sniperHits == 3 then
+							sniperHits = 0
+							AddCaption(loc("They Call Me Bullseye!") .. " +16 " .. loc("points") .. "!",0xffba00ff,capgrpGameState)
+							AwardPoints(15)
+						end
+					elseif dist <= 6000 then
+						pointBlankHits = pointBlankHits +1
+						if pointBlankHits == 3 then
+							pointBlankHits = 0
+							AddCaption(loc("Point Blank Combo!") .. " +5 " .. loc("points") .. "!",0xffba00ff,capgrpGameState)
+							AwardPoints(5)
+						end
+					end
+
+					AddVisualGear(GetX(gear), GetY(gear), vgtBigExplosion, 0, false)
+
+					targetHit = true
+					--DeleteGear(gear)
+					--SetHealth(gear,0)
+						--WriteLnToConsole("set " .. "Exp ID: " .. getGearValue(gear,"ID") .. " health to 0")
+						--WriteLnToConsole("targetHit set to true, explosive is at distance " .. dist .. "(within range " .. NR*NR.. ") of circ" )
+
+					CircleDamaged(i)
+
+					circsHit = circsHit + 1
+					if circsHit > 1 then
+						AddCaption(loc("Multi-shot!") .. " +15 " .. loc("points") .. "!",0xffba00ff,capgrpAmmostate)
+						AwardPoints(15)
+						circsHit = 0
+					end
+
+					shotsHit = shotsHit + 1
+
+
+
+				end
+
+			--end
+
+		end
+
+	-- if player is hit by circle bazooka
+	elseif (GetGearType(gear) == gtShell) and (CurrentHedgehog ~= nil) then --or (GetGearType(gear) == gtBall) then
+
+		dist = GetDistFromGearToGear(gear, CurrentHedgehog)
+
+		if beam == true then
+
+			if dist < 3000 then
+				tempE = AddVisualGear(GetX(gear), GetY(gear), 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, 0xff00ffff )
+				PlaySound(sndVaporize)
+				DeleteGear(gear)
+
+				SK = SK + 1
+				if SK == 5 then
+					SK = 0
+					AddCaption(loc("Shield Master!") .. " +10 " .. loc("points") .. "!",0xffba00ff,capgrpAmmoinfo)
+					AwardPoints(10)
+				end
+			end
+
+		elseif dist < 1600 then
+			WellHeAintGonnaJumpNoMore(GetX(gear), GetY(gear))
+		end
+
+		--[[if targetHit == true then
+			WriteLnToConsole("about to delete shell due to targetHit being set to true earlier")
+			DeleteGear(gear)
+			WriteLnToConsole("there, I deleted it")
+		end]]
+
+
+	end
+
+	if targetHit == true then
+			--nw WriteLnToConsole("about to delete something due to targetHit being set to true earlier")
+			DeleteGear(gear)
+			--nw WriteLnToConsole("there, I deleted it")
+	end
+
+	--nw WriteLnToConsole("End of CheckVarious()")
+
+end
+
+-- collision detection for player entering a circle
+function CheckDistances()
+
+	--nw WriteLnToConsole("Start of CheckDistances()")
+
+	for i = 0,(vCCount-1) do
+
+
+		--nw WriteLnToConsole("Attempting to calculate dist of circ " .. i)
+
+		g1X, g1Y = GetGearPosition(CurrentHedgehog)
+		g2X, g2Y = vCircX[i], vCircY[i]
+
+		g1X = g1X - g2X
+		g1Y = g1Y - g2Y
+		dist = (g1X*g1X) + (g1Y*g1Y)
+
+		--DoHorribleThings(i, g1X, g1Y, g2X, g2Y, dist)
+
+		--nw WriteLnToConsole("Calcs done. Dist to CurrentHedgehog is " .. dist)
+
+		-- calculate my real radius if I am an aura
+		if vCircType[i] == 0 then
+			NR = vCircRadius[i]
+		else
+			NR = (48/100*vCircRadius[i])/2
+		end
+
+		if dist <= NR*NR then
+
+			if 	(vCircActive[i] == true) and
+				((vType[i] == "ammo") or (vType[i] == "bonus") )
+			then
+
+				CircleDamaged(i)
+
+			elseif (vCircActive[i] == true) and
+					( (vType[i] == "drone") or (vType[i] == "blueboss") )
+			then
+
+				ss = CircleDamaged(i)
+				WellHeAintGonnaJumpNoMore(GetX(CurrentHedgehog),GetY(CurrentHedgehog))
+
+				if ss == "fatal" then
+
+					if (wepAmmo[0] == 0) and (TimeLeft <= 9) then
+					--if (primShotsLeft == 0) and (TimeLeft <= 9) then
+						AddCaption(loc("Kamikaze Expert!") .. " +15 " .. loc("points") .. "!",0xffba00ff,capgrpMessage)
+						AwardPoints(15)
+					elseif (wepAmmo[0] == 0) then
+						AddCaption(loc("Depleted Kamikaze!") .. " +5 " .. loc("points") .. "!",0xffba00ff,capgrpMessage)
+						AwardPoints(5)
+					elseif TimeLeft <= 9 then
+						AddCaption(loc("Timed Kamikaze!") .. " +10 " .. loc("points") .. "!",0xffba00ff,capgrpMessage)
+						AwardPoints(10)
+					end
+				end
+
+			end
+
+
+		end
+
+	end
+
+	--nw WriteLnToConsole("End of CheckDistances()")
+
+end
+
+function HandleCircles()
+
+	--[[if CirclesAreGo == true then
+
+		--CheckDistances()
+		--runOnGears(CheckVarious)	-- used to be in handletracking for some bizarre reason
+
+		--pTimer = pTimer + 1
+		--if pTimer == 100 then
+		--	pTimer = 0
+		--	runOnGears(ProjectileTrack)
+		--end
+
+	end]]
+
+
+	if rAlpha ~= 255 then
+
+		if GameTime%100 == 0 then
+
+			rAlpha = rAlpha + 5
+			if rAlpha >= 255 then
+				rAlpha = 255
+			end
+		end
+
+	end
+
+	for i = 0,(vCCount-1) do
+
+		--if (vCircActive[i] == true) then
+			SetVisualGearValues(rCirc[i], rCircX[i], rCircY[i], 100, 255, 1, 10, 0, 40, 3, vCircCol[i]-rAlpha)
+		--end
+
+
+
+		vCounter[i] = vCounter[i] + 1
+		if vCounter[i] >= vCounterLim[i] then
+
+			vCounter[i] = 0
+
+			if 	((vType[i] == "drone") or (vType[i] == "blueboss") ) and
+				(vCircActive[i] == true) then
+				AddGear(vCircX[i], vCircY[i], gtShell, 0, 0, 0, 1)
+
+				--WriteLnToConsole("Circle " .. i .. " just fired/added a gtShell")
+				--WriteLnToConsole("The above event occured game Time: " .. GameTime .. "; luaTicks: " .. luaGameTicks)
+
+			--elseif (vType[i] == "bluebottle") and (vCircActive[i] == true) then
+			--	AddGear(vCircX[i], vCircY[i]-vCircRadius[i], gtBall, 0, 0, 0, 1)
+			--	AddGear(vCircX[i], vCircY[i]+vCircRadius[i], gtBall, 0, 0, 0, 1)
+			--	AddGear(vCircX[i]-vCircRadius[i], vCircY[i], gtBall, 0, 0, 0, 1)
+			--	AddGear(vCircX[i]+vCircRadius[i], vCircY[i], gtBall, 0, 0, 0, 1)
+			end
+
+		end
+
+		if (vCircActive[i] == true) then
+
+			vCircRadCounter[i] = vCircRadCounter[i] + 1
+			if vCircRadCounter[i] == 100 then
+
+				vCircRadCounter[i] = 0
+
+				-- make my radius increase/decrease faster if I am an aura
+				if vCircType[i] == 0 then
+					M = 1
+				else
+					M = 10
+				end
+
+				vCircRadius[i] = vCircRadius[i] + vCircRadDir[i]
+				if vCircRadius[i] > vCircRadMax[i] then
+					vCircRadDir[i] = -M
+				elseif vCircRadius[i] < vCircRadMin[i] then
+					vCircRadDir[i] = M
+				end
+
+
+				-- random effect test
+				-- maybe use this to tell the difference between circs
+				-- you can kill by shooting or not
+				--vgtSmoke vgtSmokeWhite
+				--vgtSteam -- nice long trail
+				--vgtDust -- short trail on earthrise
+				--vgtSmokeTrace
+				if vType[i] == "ammo" then
+
+					tempE = AddVisualGear(vCircX[i], vCircY[i], vgtSmoke, 0, true)
+					g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE)	--0xff00ffff	--0x00ff00ff
+					SetVisualGearValues(tempE, vCircX[i], vCircY[i], g3, g4, g5, g6, g7, g8, g9, vCircCol[i] )
+
+					--AddVisualGear(vCircX[i], vCircY[i], vgtDust, 0, true)
+
+				elseif vType[i] == "bonus" then
+
+					tempE = AddVisualGear(vCircX[i], vCircY[i], vgtDust, 0, true)
+					g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE)	--0xff00ffff	--0x00ff00ff --vCircCol[i]
+					SetVisualGearValues(tempE, vCircX[i], vCircY[i], g3, g4, g5, g6, g7, 1, g9, 0xff00ffff )
+
+
+				elseif vType[i] == "blueboss" then
+
+					k = 25
+					g = vgtSteam
+					trailColour = 0xae00ffff
+
+					-- 0xffae00ff -- orange
+					-- 0xae00ffff -- purp
+
+					tempE = AddVisualGear(vCircX[i], vCircY[i], g, 0, true)
+					g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE)	--0xff00ffff	--0x00ff00ff
+					SetVisualGearValues(tempE, vCircX[i], vCircY[i]+k, g3, g4, g5, g6, g7, g8, g9, trailColour-75 )
+
+					tempE = AddVisualGear(vCircX[i], vCircY[i], g, 0, true)
+					g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE)	--0xff00ffff	--0x00ff00ff
+					SetVisualGearValues(tempE, vCircX[i]+k, vCircY[i]-k, g3, g4, g5, g6, g7, g8, g9, trailColour-75 )
+
+					tempE = AddVisualGear(vCircX[i], vCircY[i], g, 0, true)
+					g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE)	--0xff00ffff	--0x00ff00ff
+					SetVisualGearValues(tempE, vCircX[i]-k, vCircY[i]-k, g3, g4, g5, g6, g7, g8, g9, trailColour-75 )
+
+
+				end
+
+
+			end
+
+		end
+
+
+	end
+
+	-- alter the circles velocities
+	if GameTime%2000 == 0 then
+
+		for i = 0,(vCCount-1) do
+
+			-- bounce the circles off the edges if they go too far
+			-- or make them move in random directions
+
+			if vCircX[i] > 5500 then
+				vCircDX[i] = -4	--5 circmovchange
+			elseif vCircX[i] < -1500 then
+				vCircDX[i] = 4	--5 circmovchange
+			else
+
+				z = GetRandom(2)
+				if z == 1 then
+					z = 1
+				else
+					z = -1
+				end
+				vCircDX[i] = vCircDX[i] + GetRandom(3)*z	--3 circmovchange
+			end
+
+			if vCircY[i] > 1500 then
+				vCircDY[i] = -4	--5 circmovchange
+			elseif vCircY[i] < -2900 then
+				vCircDY[i] = 4	--5 circmovchange
+			else
+				z = GetRandom(2)
+				if z == 1 then
+					z = 1
+				else
+					z = -1
+				end
+				vCircDY[i] = vCircDY[i] + GetRandom(3)*z	--3 circmovchange
+			end
+
+		end
+
+	end
+
+	-- move the circles according to their current velocities
+	--m2Count = m2Count + 1
+	--if m2Count == 25 then	--25 circmovchange
+
+	--	m2Count = 0
+		for i = 0,(vCCount-1) do
+			vCircX[i] = vCircX[i] + vCircDX[i]
+			vCircY[i] = vCircY[i] + vCircDY[i]
+
+			if (CurrentHedgehog ~= nil) and (rAlpha ~= 255) then
+				DoHorribleThings(i)--(i, g1X, g1Y, g2X, g2Y, dist)
+			end
+
+		end
+
+		if (TimeLeft == 0) and (tumbleStarted == true) then
+
+			FadeAlpha = FadeAlpha + 1
+			if FadeAlpha >= 255 then
+				FadeAlpha = 255
+			end
+
+			--new
+			--if FadeAlpha == 1 then
+			--	AddCaption("GOT IT")
+			--	for i = 0,(vCCount-1) do
+			--		g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(vCirc[i])
+			--		vCircCol[i] = g10
+			--	end
+			--end
+
+		end
+
+
+		-- derp
+		if shockwaveHealth > 0 then
+			shockwaveHealth = shockwaveHealth - 1
+			shockwaveRad = shockwaveRad + 80
+
+			--mrm = ((48/100*shockwaveRad)/2)
+			--AddVisualGear(GetX(CurrentHedgehog)-mrm+GetRandom(mrm*2),GetY(CurrentHedgehog)-mrm+GetRandom(mrm*2), vgtSmoke, 0, false)
+		end
+
+
+
+	--end
+
+	for i = 0,(vCCount-1) do
+		g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(vCirc[i])		-- vCircCol[i] g10
+		SetVisualGearValues(vCirc[i], vCircX[i], vCircY[i], g3, g4, g5, g6, g7, vCircRadius[i], g9, g10)
+	end
+
+	if 	(TimeLeft == 0) or
+		((tumbleStarted == false)) then
+		for i = 0,(vCCount-1) do
+			g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(vCirc[i])		-- vCircCol[i] g10
+			SetVisualGearValues(vCirc[i], vCircX[i], vCircY[i], g3, g4, g5, g6, g7, vCircRadius[i], g9, (vCircCol[i]-FadeAlpha))
+		end
+	end
+
+
+	if (CurrentHedgehog ~= nil) then
+		if beam == true then
+			g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(pShield)
+			--SetVisualGearValues(pShield, GetX(CurrentHedgehog), GetY(CurrentHedgehog), g3, g4, g5, g6, g7, 200, g9, g10 )
+			SetVisualGearValues(pShield, GetX(CurrentHedgehog), GetY(CurrentHedgehog), g3, g4, g5, g6, g7, 200, g9, 0xa800ffff-0x000000ff - -shieldHealth )
+			DrawTag(2)
+		else
+			SetVisualGearValues(pShield, GetX(CurrentHedgehog), GetY(CurrentHedgehog), g3, g4, g5, g6, g7, 0, g9, g10 )
+		end
+
+		if shockwaveHealth > 0 then
+			g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(shockwave)
+			SetVisualGearValues(shockwave, GetX(CurrentHedgehog), GetY(CurrentHedgehog), g3, g4, g5, g6, g7, shockwaveRad, g9, 0xff3300ff-0x000000ff - -shockwaveHealth )
+		else
+			SetVisualGearValues(shockwave, GetX(CurrentHedgehog), GetY(CurrentHedgehog), g3, g4, g5, g6, g7, 0, g9, g10 )
+		end
+
+	end
+
+
+end
+
+function ProjectileTrack(gear)
+
+	if (GetGearType(gear) == gtShell) then
+
+		--nw WriteLnToConsole("ProjectileTrack() for Shell ID: " .. getGearValue(gear,"ID"))
+
+		-- newnew
+		if (GetGearType(gear) == gtShell) then
+			turningSpeed = 0.1*fMod
+		--elseif (GetGearType(gear) == gtBall) then
+		--	turningSpeed = 0.2*fMod
+		end
+
+		dx, dy = GetGearVelocity(gear)
+
+		--WriteLnToConsole("I'm trying to track currenthedge with shell ID: " .. getGearValue(gear,"ID"))
+		--WriteLnToConsole("I just got the velocity of the shell. It is dx: " .. dx .. "; dy: " .. dy)
+		--WriteLnToConsole("CurrentHedgehog is at X: " .. GetX(CurrentHedgehog) .. "; Y: " .. GetY(CurrentHedgehog) )
+
+        if CurrentHedgehog ~= nil then
+            if GetX(gear) > GetX(CurrentHedgehog) then
+                dx = dx - turningSpeed--0.1
+            else
+                dx = dx + turningSpeed--0.1
+            end
+
+            if GetY(gear) > GetY(CurrentHedgehog) then
+                dy = dy - turningSpeed--0.1
+            else
+                dy = dy + turningSpeed--0.1
+            end
+        end
+
+
+		if (GetGearType(gear) == gtShell) then
+			dxlimit = 0.4*fMod
+			dylimit = 0.4*fMod
+		--elseif (GetGearType(gear) == gtBall) then
+		--	dxlimit = 0.5	--  0.5 is about the same
+		--	dylimit = 0.5 -- 0.6 is faster than player
+		end
+
+		if dx > dxlimit then
+			dx = dxlimit
+		end
+		if dy > dylimit then
+			dy = dylimit
+		end
+		if dx < -dxlimit then
+			dx = -dxlimit
+		end
+		if dy < -dylimit then
+			dy = -dylimit
+		end
+
+		SetGearVelocity(gear, dx, dy)
+
+		--WriteLnToConsole("I just SET the velocity of shell towards currenthegdge. It is now dx: " .. dx .. "; dy: " .. dy)
+		--WriteLnToConsole("The above events occured game Time: " .. GameTime .. "; luaTicks: " .. luaGameTicks)
+		--nw WriteLnToConsole("ProjectileTrack() finished successfully")
+
+	end
+
+end
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/assets/Data/Scripts/Multiplayer/The_Specialists.cfg	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,2 @@
+Default
+Default
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/assets/Data/Scripts/Multiplayer/The_Specialists.lua	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,291 @@
+----------------------------------
+-- THE SPECIALISTS MODE 0.7
+-- by mikade
+----------------------------------
+
+-- version history
+-----------------
+-- version 0.1
+-----------------
+-- concept test
+
+----------------
+-- version 0.2
+----------------
+-- added gfRandomOrder to gameflags
+-- removed some deprecated variables/methods
+-- fixed lack of portal reset
+
+----------------
+-- version 0.3
+----------------
+-- added switching on start
+-- removed switch from engineer weaponset
+
+----------------
+-- version 0.4
+----------------
+-- Attempted to:
+-- fix potential switch explit
+-- improve user feedback on start
+
+----------------
+-- version 0.5
+----------------
+-- provision for variable minetimer / demo mines set to 5000ms
+-- don't autoswitch if player only has 1 hog on his team
+
+----------------
+-- version 0.6
+----------------
+-- for the meanwhile, don't drop any crates except health crates
+
+----------------
+-- version 0.7
+----------------
+-- perhogadmsdf :D :D :D :D
+
+--------------------
+--TO DO
+--------------------
+
+-- balance hog health, maybe
+-- add proper gameflag checking, maybe (so that we can throw in a .cfg and let the users break everything)
+
+loadfile(GetDataPath() .. "Scripts/Locale.lua")()
+loadfile(GetDataPath() .. "Scripts/Tracker.lua")()
+
+local numhhs = 0
+local hhs = {}
+
+local currName
+local lastName
+local started = false
+local switchStage = 0
+
+local hogCounter
+
+function CountHog(gear)
+	hogCounter = hogCounter +1
+end
+
+function onNewAmmoStore(groupIndex, hogIndex)
+
+	SetAmmo(amSkip, 9, 0, 0, 0)
+
+	if hogIndex == 0 then
+		SetAmmo(amBazooka, 1, 0, 0, 0)
+		SetAmmo(amGrenade, 1, 0, 0, 0)
+		SetAmmo(amShotgun, 1, 0, 0, 0)
+	elseif hogIndex == 1 then
+		SetAmmo(amGirder, 2, 0, 0, 0)
+		SetAmmo(amBlowTorch, 1, 0, 0, 0)
+		SetAmmo(amPickHammer, 1, 0, 0, 0)
+	elseif hogIndex == 2 then
+		SetAmmo(amRope, 9, 0, 0, 0)
+		SetAmmo(amParachute, 9, 0, 0, 0)
+		SetAmmo(amFirePunch, 1, 0, 0, 0)
+	elseif hogIndex == 3 then
+		SetAmmo(amDynamite, 1, 0, 0, 0)
+		SetAmmo(amMine, 1, 0, 0, 0)
+		SetAmmo(amDrill, 1, 0, 0, 0)
+	elseif hogIndex == 4 then
+		SetAmmo(amSniperRifle, 1, 0, 0, 0)
+		SetAmmo(amDEagle, 1, 0, 0, 0)
+		SetAmmo(amPortalGun, 2, 0, 0, 0)
+	elseif hogIndex == 5 then
+		SetAmmo(amSeduction, 9, 0, 0, 0)
+		SetAmmo(amResurrector, 1, 0, 0, 0)
+		SetAmmo(amInvulnerable, 1, 0, 0, 0)
+	elseif hogIndex == 6 then
+		SetAmmo(amFlamethrower, 1, 0, 0, 0)
+		SetAmmo(amMolotov, 1, 0, 0, 0)
+		SetAmmo(amNapalm, 1, 0, 0, 0)
+	elseif hogIndex == 7 then
+		SetAmmo(amBaseballBat, 1, 0, 0, 0)
+		SetAmmo(amGasBomb, 1, 0, 0, 0)
+		SetAmmo(amKamikaze, 1, 0, 0, 0)
+	end
+
+end
+
+function CreateTeam()
+
+	currTeam = ""
+	lastTeam = ""
+	z = 0
+
+	for i = 0, (numhhs-1) do
+
+			currTeam = GetHogTeamName(hhs[i])
+
+			if currTeam == lastTeam then
+					z = z + 1
+			else
+					z = 1
+			end
+
+			if z == 1 then
+
+					SetHogName(hhs[i],"Soldier")
+					SetHogHat(hhs[i], "sf_vega")
+					SetHealth(hhs[i],200)
+
+			elseif z == 2 then
+
+					SetHogHat(hhs[i], "Glasses")
+					SetHogName(hhs[i],"Engineer")
+
+			elseif z == 3 then
+
+					SetHogName(hhs[i],"Ninja")
+					SetHogHat(hhs[i], "NinjaFull")
+					SetHealth(hhs[i],80)
+
+			elseif z == 4 then
+
+					SetHogName(hhs[i],"Demo")
+					SetHogHat(hhs[i], "Skull")
+					SetHealth(hhs[i],200)
+
+			elseif z == 5 then
+
+					SetHogName(hhs[i],"Sniper")
+					SetHogHat(hhs[i], "Sniper")
+					SetHealth(hhs[i],120)
+
+			elseif z == 6 then
+
+					SetHogName(hhs[i],"Saint")
+					SetHogHat(hhs[i], "angel")
+					SetHealth(hhs[i],300)
+
+			elseif z == 7 then
+
+					SetHogName(hhs[i],"Pyro")
+					SetHogHat(hhs[i], "Gasmask")
+					SetHealth(hhs[i],150)
+
+			elseif z == 8 then
+
+					SetHogName(hhs[i],"Loon")
+					SetHogHat(hhs[i], "clown")
+					SetHealth(hhs[i],100)
+
+			end
+
+			lastTeam = GetHogTeamName(hhs[i])
+
+	end
+
+end
+
+function onGameInit()
+	GameFlags = gfRandomOrder + gfResetWeps + gfInfAttack + gfPlaceHog +gfPerHogAmmo
+	Delay = 10
+	HealthCaseProb = 100
+end
+
+function onGameStart()
+
+	CreateTeam()
+
+	ShowMission     (
+                                loc("THE SPECIALISTS"),
+                                loc("a Hedgewars mini-game"),
+
+                                loc("Eliminate the enemy specialists.") .. "|" ..
+                                " " .. "|" ..
+
+                                loc("Game Modifiers: ") .. "|" ..
+                                loc("Per-Hog Ammo") .. "|" ..
+                                loc("Weapons Reset") .. "|" ..
+                                loc("Unlimited Attacks") .. "|" ..
+
+                                "", 4, 4000
+                                )
+
+	trackTeams()
+
+end
+
+
+function onNewTurn()
+	currName = GetHogName(CurrentHedgehog)
+	lastName = GetHogName(CurrentHedgehog)
+	started = true
+	switchStage = 0
+end
+
+function onGameTick20()
+
+	if (CurrentHedgehog ~= nil) then
+
+		currName = GetHogName(CurrentHedgehog)
+
+		if (currName ~= lastName) and (switchStage > 5) then
+			AddCaption(loc("Switched to ") .. currName .. "!")
+		end
+
+		if (TurnTimeLeft > 0) and (TurnTimeLeft ~= TurnTime) and (switchStage < 5) then
+
+			AddCaption(loc("Prepare yourself") .. ", " .. currName .. "!")
+
+			hogCounter = 0
+			runOnHogsInTeam(CountHog, GetHogTeamName(CurrentHedgehog) )
+
+			if hogCounter > 1 then
+
+				switchStage = switchStage + 1
+
+				if switchStage == 1 then
+					AddAmmo(CurrentHedgehog, amSwitch, 1)
+
+				elseif switchStage == 2 then
+					ParseCommand("setweap " .. string.char(amSwitch))
+				elseif switchStage == 3 then
+					SetGearMessage(CurrentHedgehog,gmAttack)
+				elseif switchStage == 4 then
+					switchStage = 6
+					AddAmmo(CurrentHedgehog, amSwitch, 0)
+				end
+
+			else
+				switchStage = 6
+			end
+
+
+		end
+
+		lastName = currName
+
+	end
+
+end
+
+function onGearAdd(gear)
+
+    if GetGearType(gear) == gtHedgehog then
+		hhs[numhhs] = gear
+		numhhs = numhhs + 1
+	elseif (GetGearType(gear) == gtMine) and (started == true) then
+		SetTimer(gear,5000)
+	end
+
+	if (GetGearType(gear) == gtHedgehog) or (GetGearType(gear) == gtResurrector) then
+		trackGear(gear)
+	end
+
+
+end
+
+function onGearDelete(gear)
+	if (GetGearType(gear) == gtHedgehog) or (GetGearType(gear) == gtResurrector) then
+		trackDeletion(gear)
+	end
+end
+
+function onAmmoStoreInit()
+--
+end
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/assets/Data/Scripts/Multiplayer/Tumbler.cfg	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,2 @@
+Default
+Default
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/assets/Data/Scripts/Multiplayer/Tumbler.lua	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,786 @@
+------------------------------------
+-- TUMBLER
+-- v.0.7.1
+------------------------------------
+
+loadfile(GetDataPath() .. "Scripts/Locale.lua")()
+loadfile(GetDataPath() .. "Scripts/Tracker.lua")()
+
+local fMod = 1000000 -- use this for dev and .16+ games
+
+local leftOn = false
+local rightOn = false
+local upOn = false
+local downOn = false
+local preciseOn = false
+
+local wep = {}
+local wepAmmo = {}
+local wepCol = {}
+local wepIndex = 0
+local wepCount = 0
+local fGears = 0
+
+local mineSpawn
+local barrelSpawn
+
+local roundKills = 0
+local barrelsEaten = 0
+local minesEaten = 0
+
+local moveTimer = 0
+local fireTimer = 0
+local TimeLeftCounter = 0
+local TimeLeft = 0
+local stopMovement = false
+local tumbleStarted = false
+
+local vTag = {}
+
+------------------------
+-- version 0.4
+------------------------
+
+-- removed some old code/comments
+-- removed both shell and mortar as the primary and secondary weapons
+-- the primary weapon is now an explosive(barrel)
+
+-- added support for picking up barrels scattered about the map (backspace)
+-- added support for dragging around mines (enter toggles on/off)
+-- added support for primary fire being onAttackUp
+-- added a trail to indicate when the player has 5s or less left to tumble
+-- updated showmission to reflect changed controls and options
+
+------------------------
+-- version 0.5
+------------------------
+
+-- changed some of the user feedback
+-- i can't remember??
+-- substituted onAttackUp for onPrecise()
+-- brought in line with new velocity changes
+
+------------------------
+-- version 0.6
+------------------------
+
+-- reduced starting "ammo"
+-- randomly spawn new barrels/mines on new turn
+-- updated user feedback
+-- better locs and coloured addcaptions
+-- added tag for turntime
+-- removed tractor beam
+-- added two new weapons and changed ammo handling
+-- health crates now give tumbler time, and wep/utility give flamer ammo
+-- explosives AND mines can be picked up to increase their relative ammo
+-- replaced "no weapon" selected message that hw serves
+-- modified crate frequencies a bit
+-- added some simple kill-based achievements, i think
+
+------------------------
+-- version 0.7
+------------------------
+
+-- a few code optimisations/performance tweaks
+-- removed some deprecated code
+-- fix a potential spawn bug
+
+-- improved HUD (now shows ammo counts)
+-- improved user feedback (less generic messages)
+-- colour-coded addcaptions to match hud :)
+
+-- base tumbling time now equals scheme turntime
+-- tumbling time extension is now based on the amount of health contained in crate
+-- new mines per turn based on minesnum
+-- new barrels per turn based on explosives
+
+-- added 2 more achievements: barrel eater and mine eater (like kills, don't do anything atm)
+-- slightly increased grab distance for explosives/mines
+-- slightly increased flamer velocity
+-- slightly decreased flamer volume
+-- added a flame vaporiser (based on number of flame gears?)
+-- give tumblers an extra 47 health on the start of their tumble to counter the grenade (exp)
+-- refocus camera on tumbler on newturn (not on crates, barrels etc)
+-- increase delay: yes, yes, eat your hearts out
+
+-- commit log
+-- Better HUD
+-- Allow more user customization
+-- Bugfix for new gear spawns
+-- Performance tweaks
+-- Variety of small gameplay changes
+
+------------------------
+-- version 0.7.1
+------------------------
+
+-- redraw HUD on screen resolution change
+
+---------------------------
+-- some other ideas/things
+---------------------------
+--[[
+-- add better gameflag handling
+-- fix flamer "shots remaining" message on start or choose a standard versus %
+-- add more sounds
+-- better barrel/minespawn effects
+-- separate grab distance for mines/barrels
+-- [probably not] make barrels always explode?
+-- [probably not] persistent ammo?
+-- [probably not] dont hurt tumblers and restore their health at turn end?
+]]
+
+
+----------------------------------------------------------------
+----------------------------------------------------------------
+
+local flames = {}
+local fGearValues = {}
+
+function runOnflames(func)
+    for k, gear in ipairs(flames) do
+        func(gear)
+    end
+end
+
+function trackFGear(gear)
+    table.insert(flames, gear)
+end
+
+function trackFGearDeletion(gear)
+    fGearValues[gear] = nil
+    for k, g in ipairs(flames) do
+        if g == gear then
+            table.remove(flames, k)
+            break
+        end
+    end
+end
+
+function getFGearValue(gear, key)
+    if fGearValues[gear] ~= nil then
+        return fGearValues[gear][key]
+    end
+    return nil
+end
+
+function setFGearValue(gear, key, value)
+    found = false
+    for id, values in pairs(fGearValues) do
+        if id == gear then
+            values[key] = value
+            found = true
+        end
+    end
+    if not found then
+        fGearValues[gear] = { [key] = value }
+    end
+end
+
+function decreaseFGearValue(gear, key)
+    for id, values in pairs(fGearValues) do
+        if id == gear then
+            values[key] = values[key] - 1
+        end
+    end
+end
+
+function HandleLife(gear)
+
+	decreaseFGearValue(gear, "L")
+	if getFGearValue(gear, "L") == 0 then
+		AddVisualGear(GetX(gear), GetY(gear), vgtSmoke, 0, false)
+		DeleteGear(gear)
+	end
+
+end
+
+----------------------------------------------------------------
+----------------------------------------------------------------
+
+function HideTags()
+
+	for i = 0, 3 do
+		SetVisualGearValues(vTag[i],0,0,0,0,0,1,0, 0, 240000, 0xffffff00)
+	end
+
+end
+
+function DrawTag(i)
+
+	zoomL = 1.3
+
+	xOffset = 40
+
+	if i == 0 then
+		yOffset = 40
+		tCol = 0xffba00ff --0xffed09ff --0xffba00ff
+		tValue = TimeLeft
+	elseif i == 1 then
+		zoomL = 1.1
+		yOffset = 70
+		tCol = wepCol[0]
+		tValue = wepAmmo[0]
+	elseif i == 2 then
+		zoomL = 1.1
+		xOffset = 40 + 35
+		yOffset = 70
+		tCol = wepCol[1]
+		tValue = wepAmmo[1]
+	elseif i == 3 then
+		zoomL = 1.1
+		xOffset = 40 + 70
+		yOffset = 70
+		tCol = wepCol[2]
+		tValue = wepAmmo[2]
+	end
+
+	DeleteVisualGear(vTag[i])
+	vTag[i] = AddVisualGear(0, 0, vgtHealthTag, 0, false)
+	g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(vTag[i])
+	SetVisualGearValues	(
+				vTag[i], 		--id
+				-(ScreenWidth/2) + xOffset,	--xoffset
+				ScreenHeight - yOffset, --yoffset
+				0, 			--dx
+				0, 			--dy
+				zoomL, 			--zoom
+				1, 			--~= 0 means align to screen
+				g7, 			--frameticks
+				tValue, 		--value
+				240000, 		--timer
+				tCol		--GetClanColor( GetHogClan(CurrentHedgehog) )
+				)
+
+end
+
+function GetGearDistance(gear)
+
+	g1X, g1Y = GetGearPosition(gear)
+	g2X, g2Y = GetGearPosition(CurrentHedgehog)
+
+	q = g1X - g2X
+	w = g1Y - g2Y
+	return( (q*q) + (w*w) )
+
+end
+
+-- add to your ammo ***WHEN YOU PUSH A KEY*** near them
+-- yes that was my justification for a non generic method
+function CheckProximityToExplosives(gear)
+
+	if (GetGearDistance(gear) < 1400) then
+
+		if (GetGearType(gear) == gtExplosives) then
+
+			wepAmmo[0] = wepAmmo[0] + 1
+			PlaySound(sndShotgunReload)
+			DeleteGear(gear)
+			AddCaption(wep[0] .. " " .. loc("ammo extended!"), wepCol[0], capgrpAmmoinfo )
+			DrawTag(1)
+
+			barrelsEaten = barrelsEaten + 1
+			if barrelsEaten == 5 then
+				AddCaption(loc("Achievement Unlocked") .. ": " .. loc("Barrel Eater!"),0xffba00ff,capgrpMessage2)
+			end
+
+		elseif (GetGearType(gear) == gtMine) then
+			wepAmmo[1] = wepAmmo[1] + 1
+			PlaySound(sndShotgunReload)
+			DeleteGear(gear)
+			AddCaption(wep[1] .. " " .. loc("ammo extended!"), wepCol[1], capgrpAmmoinfo )
+			DrawTag(2)
+
+			minesEaten = minesEaten + 1
+			if minesEaten == 5 then
+				AddCaption(loc("Achievement Unlocked") .. ": " .. loc("Mine Eater!"),0xffba00ff,capgrpMessage2)
+			end
+
+		end
+
+	else
+		--AddCaption("There is nothing here...")
+	end
+
+end
+
+-- check proximity on crates
+function CheckProximity(gear)
+
+	dist = GetGearDistance(gear)
+
+	if (dist < 1600) and (GetGearType(gear) == gtCase) then
+
+		if GetHealth(gear) > 0 then
+
+			AddCaption(loc("Tumbling Time Extended!"), 0xffba00ff, capgrpMessage2 )
+
+			TimeLeft = TimeLeft + HealthCaseAmount  --5 --5s
+			DrawTag(0)
+			--PlaySound(sndShotgunReload)
+		else
+			wepAmmo[2] = wepAmmo[2] + 800
+			PlaySound(sndShotgunReload)
+			AddCaption(wep[2] .. " " .. loc("fuel extended!"), wepCol[2], capgrpAmmoinfo )
+			DrawTag(3)
+		end
+
+		DeleteGear(gear)
+
+	end
+
+end
+
+function ChangeWeapon()
+
+	wepIndex = wepIndex + 1
+	if wepIndex == wepCount then
+		wepIndex = 0
+	end
+
+	AddCaption(wep[wepIndex] .. " " .. loc("selected!"), wepCol[wepIndex],capgrpAmmoinfo )
+	AddCaption(wepAmmo[wepIndex] .. " " .. loc("shots remaining."), wepCol[wepIndex],capgrpMessage2)
+
+end
+
+---------------
+-- action keys
+---------------
+
+function onPrecise()
+
+	if (CurrentHedgehog ~= nil) and (stopMovement == false) and (tumbleStarted == true) and (wepAmmo[wepIndex] > 0) then
+
+		wepAmmo[wepIndex] = wepAmmo[wepIndex] - 1
+		AddCaption(wepAmmo[wepIndex] .. " " .. loc("shots remaining."), wepCol[wepIndex],capgrpMessage2)
+
+		if wep[wepIndex] == loc("Barrel Launcher") then
+			morte = AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), gtExplosives, 0, 0, 0, 1)
+			CopyPV(CurrentHedgehog, morte) -- new addition
+			x,y = GetGearVelocity(morte)
+			x = x*2
+			y = y*2
+			SetGearVelocity(morte, x, y)
+			DrawTag(1)
+
+		elseif wep[wepIndex] == loc("Mine Deployer") then
+			morte = AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), gtMine, 0, 0, 0, 0)
+			SetTimer(morte, 1000)
+			DrawTag(2)
+		end
+
+	end
+
+	preciseOn = true
+
+end
+
+function onPreciseUp()
+	preciseOn = false
+end
+
+function onHJump()
+	-- pick up explosives/mines if nearby them
+	if (CurrentHedgehog ~= nil) and (stopMovement == false) and (tumbleStarted == true) then
+		runOnGears(CheckProximityToExplosives)
+	end
+end
+
+function onLJump()
+	ChangeWeapon()
+end
+
+-----------------
+-- movement keys
+-----------------
+
+function onLeft()
+	if (CurrentHedgehog ~= nil) and (stopMovement == false) then
+		leftOn = true
+	end
+end
+
+function onRight()
+	if (CurrentHedgehog ~= nil) and (stopMovement == false) then
+		rightOn = true
+	end
+end
+
+function onUp()
+	if (CurrentHedgehog ~= nil) and (stopMovement == false) then
+		upOn = true
+	end
+end
+
+function onDown()
+	if (CurrentHedgehog ~= nil) and (stopMovement == false) then
+		downOn = true
+	end
+end
+
+function onDownUp()
+	downOn = false
+end
+function onUpUp()
+	upOn = false
+end
+function onLeftUp()
+	leftOn = false
+end
+function onRightUp()
+	rightOn = false
+end
+
+--------------------------
+-- other event handlers
+--------------------------
+
+function onGameInit()
+	CaseFreq = 0
+	HealthCaseProb = 0
+	Delay = 1000
+
+	mineSpawn = MinesNum
+	if mineSpawn > 4 then
+		mineSpawn = 4
+	end
+
+	barrelSpawn = Explosives
+	if barrelSpawn > 4 then
+		barrelSpawn = 4
+	end
+
+	--MinesNum = 0
+	--Explosives = 0
+
+	for i = 0, 3 do
+		vTag[0] = AddVisualGear(0, 0, vgtHealthTag, 0, false)
+	end
+
+	HideTags()
+
+	wep[0] = loc("Barrel Launcher")
+	wep[1] = loc("Mine Deployer")
+	wep[2] = loc("Flamer")
+
+	wepCol[0] = 0x78818eff
+	wepCol[1] = 0xa12a77ff
+	wepCol[2] = 0xf49318ff
+
+	wepCount = 3
+
+end
+
+function onGameStart()
+
+	ShowMission	(
+			"TUMBLER",
+			loc("a Hedgewars mini-game"),
+			loc("Eliminate the enemy hogs to win.") .. "|" ..
+			" " .. "|" ..
+
+			loc("New Mines Per Turn") .. ": " .. (mineSpawn) .. "|" ..
+			loc("New Barrels Per Turn") .. ": " .. (barrelSpawn) .. "|" ..
+			loc("Time Extension") .. ": " .. (HealthCaseAmount) .. loc("sec") .. "|" ..
+			" " .. "|" ..
+
+			loc("Movement: [Up], [Down], [Left], [Right]") .. "|" ..
+			loc("Fire") .. ": " .. loc("[Left Shift]") .. "|" ..
+			loc("Change Weapon") .. ": " .. loc("[Enter]") .. "|" ..
+			loc("Grab Mines/Explosives") .. ": " .. loc("[Backspace]") .. "|" ..
+
+			" " .. "|" ..
+
+			loc("Health crates extend your time.") .. "|" ..
+			loc("Ammo is reset at the end of your turn.") .. "|" ..
+
+			"", 4, 4000
+			)
+
+end
+
+function onScreenResize()
+
+	-- redraw Tags so that their screen locations are updated
+	if (CurrentHedgehog ~= nil) and (tumbleStarted == true) then
+		for i = 0, 3 do
+			DrawTag(i)
+		end
+	end
+
+end
+
+function onNewTurn()
+
+	stopMovement = false
+	tumbleStarted = false
+
+	-- randomly create new barrels mines on the map every turn (can be disabled by setting mine/barrels to 0 in scheme)
+	for i = 0, barrelSpawn-1 do
+		gear = AddGear(100, 100, gtExplosives, 0, 0, 0, 0)
+		SetHealth(gear, 100)
+		if FindPlace(gear, false, 0, LAND_WIDTH, false) ~= nil then
+			tempE = AddVisualGear(GetX(gear), GetY(gear), vgtBigExplosion, 0, false)
+		end
+	end
+	for i = 0, mineSpawn-1 do
+		gear = AddGear(100, 100, gtMine, 0, 0, 0, 0)
+		if FindPlace(gear, false, 0, LAND_WIDTH, false) ~= nil then
+			tempE = AddVisualGear(GetX(gear), GetY(gear), vgtBigExplosion, 0, false)
+		end
+	end
+
+	-- randomly spawn time extension crates / flamer fuel on the map
+	r = GetRandom(100)
+	if r > 50 then
+		gear = SpawnHealthCrate(0, 0)
+	end
+	r = GetRandom(100)
+	if r > 70 then
+		gear = SpawnAmmoCrate(0, 0, amSkip)
+	end
+
+	HideTags()
+
+	--reset ammo counts
+	wepAmmo[0] = 2
+	wepAmmo[1] = 1
+	wepAmmo[2] = 50 -- 50000 -- 50
+	wepIndex = 2
+	ChangeWeapon()
+
+	roundKills = 0
+	barrelsEaten = 0
+	minesEaten = 0
+
+	FollowGear(CurrentHedgehog)
+
+end
+
+
+function DisableTumbler()
+	stopMovement = true
+	upOn = false
+	down = false
+	leftOn = false
+	rightOn = false
+	HideTags()
+end
+
+function onGameTick()
+
+	-- start the player tumbling with a boom once their turn has actually begun
+	if tumbleStarted == false then
+		if (TurnTimeLeft > 0) and (TurnTimeLeft ~= TurnTime) then
+			--AddCaption(loc("Good to go!"))
+			tumbleStarted = true
+			TimeLeft = (TurnTime/1000)
+			AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), gtGrenade, 0, 0, 0, 1)
+			SetHealth(CurrentHedgehog, GetHealth(CurrentHedgehog) + 47) -- new
+			for i = 0, 3 do
+				DrawTag(i)
+			end
+		end
+	end
+
+	if (CurrentHedgehog ~= nil) and (tumbleStarted == true) then
+
+		runOnGears(CheckProximity) -- crates
+
+		-- Calculate and display turn time
+		TimeLeftCounter = TimeLeftCounter + 1
+		if TimeLeftCounter == 1000 then
+			TimeLeftCounter = 0
+			TimeLeft = TimeLeft - 1
+
+			if TimeLeft >= 0 then
+				DrawTag(0)
+			end
+
+		end
+
+		if TimeLeft == 0 then
+			DisableTumbler()
+		end
+
+		-- handle movement based on IO
+		moveTimer = moveTimer + 1
+		if moveTimer == 100 then -- 100
+			moveTimer = 0
+
+			runOnflames(HandleLife)
+
+			---------------
+			-- new trail code
+			---------------
+			-- the trail lets you know you have 5s left to pilot, akin to birdy feathers
+			if (TimeLeft <= 5) and (TimeLeft > 0) then
+				tempE = AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), vgtSmoke, 0, false)
+				g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE)
+				SetVisualGearValues(tempE, g1, g2, g3, g4, g5, g6, g7, g8, g9, GetClanColor(GetHogClan(CurrentHedgehog)) )
+			end
+			--------------
+
+			dx, dy = GetGearVelocity(CurrentHedgehog)
+
+			dxlimit = 0.4*fMod
+			dylimit = 0.4*fMod
+
+			if dx > dxlimit then
+				dx = dxlimit
+			end
+			if dy > dylimit then
+				dy = dylimit
+			end
+			if dx < -dxlimit then
+				dx = -dxlimit
+			end
+			if dy < -dylimit then
+				dy = -dylimit
+			end
+
+
+			if leftOn == true then
+				dx = dx - 0.1*fMod
+			end
+			if rightOn == true then
+				dx = dx + 0.1*fMod
+			end
+
+			if upOn == true then
+				dy = dy - 0.1*fMod
+			end
+			if downOn == true then
+				dy = dy + 0.1*fMod
+			end
+
+			SetGearVelocity(CurrentHedgehog, dx, dy)
+
+		end
+
+		--
+		--flamer
+		--
+		fireTimer = fireTimer + 1
+		if fireTimer == 6 then	-- 5 --10
+			fireTimer = 0
+
+			if (wep[wepIndex] == loc("Flamer") ) and (preciseOn == true) and (wepAmmo[wepIndex] > 0) and (stopMovement == false) and (tumbleStarted == true) then
+
+				wepAmmo[wepIndex] = wepAmmo[wepIndex] - 1
+				AddCaption(
+						loc("Flamer") .. ": " ..
+						(wepAmmo[wepIndex]/800*100) - (wepAmmo[wepIndex]/800*100)%2 .. "%",
+						wepCol[2],
+						capgrpMessage2
+						)
+				DrawTag(3)
+
+				dx, dy = GetGearVelocity(CurrentHedgehog)
+				shell = AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), gtFlame, 0, 0, 0, 0)
+
+				xdev = 1 + GetRandom(25)	--15
+				xdev = xdev / 100
+
+				r = GetRandom(2)
+				if r == 1 then
+					xdev = xdev*-1
+				end
+
+				ydev = 1 + GetRandom(25)	--15
+				ydev = ydev / 100
+
+				r = GetRandom(2)
+				if r == 1 then
+					ydev = ydev*-1
+				end
+
+				--*13	--8	*-4
+				SetGearVelocity(shell, (dx*4.5)+(xdev*fMod), (dy*4.5)+(ydev*fMod))	--10
+
+			end
+
+		end
+		--
+
+	end
+
+
+end
+
+function isATrackedGear(gear)
+	if 	(GetGearType(gear) == gtExplosives) or
+		(GetGearType(gear) == gtMine) or
+		(GetGearType(gear) == gtCase)
+	then
+		return(true)
+	else
+		return(false)
+	end
+end
+
+--[[function onGearDamage(gear, damage)
+	if gear == CurrentHedgehog then
+		-- You are now tumbling
+	end
+end]]
+
+function onGearAdd(gear)
+
+	if GetGearType(gear) == gtFlame then
+
+		trackFGear(gear)
+
+		fGears = fGears +1
+
+		if fGears < 80 then
+			setFGearValue(gear,"L",30)
+		else
+			setFGearValue(gear,"L",5) --3
+		end
+
+	elseif isATrackedGear(gear) then
+		trackGear(gear)
+	end
+
+end
+
+function onGearDelete(gear)
+
+	if GetGearType(gear) == gtFlame then
+		trackFGearDeletion(gear)
+		fGears = fGears -1
+
+	elseif isATrackedGear(gear) then
+		trackDeletion(gear)
+
+	-- achievements? prototype
+	elseif GetGearType(gear) == gtHedgehog then
+
+		if GetHogTeamName(gear) ~= GetHogTeamName(CurrentHedgehog) then
+
+			roundKills = roundKills + 1
+			if roundKills == 2 then
+				AddCaption(loc("Double Kill!"),0xffba00ff,capgrpMessage2)
+			elseif roundKills == 3 then
+				AddCaption(loc("Killing spree!"),0xffba00ff,capgrpMessage2)
+			elseif roundKills >= 4 then
+				AddCaption(loc("Unstoppable!"),0xffba00ff,capgrpMessage2)
+			end
+
+		elseif gear == CurrentHedgehog then
+			DisableTumbler()
+
+		elseif gear ~= CurrentHedgehog then
+			AddCaption(loc("Friendly Fire!"),0xffba00ff,capgrpMessage2)
+		end
+
+	end
+
+	if CurrentHedgehog ~= nil then
+		FollowGear(CurrentHedgehog)
+	end
+
+end
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/assets/Data/Scripts/Multiplayer/WxW.cfg	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,2 @@
+Shoppa
+Shoppa
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/assets/Data/Scripts/Multiplayer/WxW.lua	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,751 @@
+
+----------------------
+-- WALL TO WALL 0.4
+----------------------
+-- a shoppa minigame
+-- by mikade
+
+-- feel free to add map specific walls to LoadConfig, or post additional
+-- wall suggestions on our forum at: http://www.hedgewars.org/forum
+
+----------------
+--0.1
+----------------
+-- concept test
+
+----------------
+--0.2
+----------------
+-- unhardcoded turntimeleft, now uses shoppa default of 45s
+-- changed some things behind the scenes
+-- fixed oooooold radar bug
+-- added radar / script support for multiple crates
+-- tweaked weapons tables
+-- added surfing and changed crate spawn requirements a bit
+
+----------------
+--0.3
+----------------
+-- stuffed dirty clothes into cupboard
+-- improved user feedback
+-- added/improved experimental config system, input masks included :D
+
+----------------
+--0.4
+----------------
+-- for version 0.9.18, now detects border in correct location
+-- fix 0.3 config constraint
+-- remove unnecessary vars
+-- oops, remove hardcoding of minesnum,explosives
+-- ... and unhardcode turntime (again)... man, 30s is hard :(
+-- move some initialisations around
+-- numerous improvements to user feedback
+-- walls disappear after being touched
+-- added backwards compatibility with 0.9.17
+
+----------------
+--TO DO
+----------------
+-- achievements / try detect shoppa moves? :|
+-- maybe add ability for the user to place zones like in Racer?
+-- add more hard-coded values for specific maps
+
+-----------------------------
+-- GO PONIES, GO PONIES, GO!
+-----------------------------
+
+loadfile(GetDataPath() .. "Scripts/Locale.lua")()
+loadfile(GetDataPath() .. "Scripts/Tracker.lua")()
+loadfile(GetDataPath() .. "Scripts/Utils.lua")()
+
+-- experimental menu stuff
+local menuIndex = 1
+local menu = {}
+local preMenuCfg
+local postMenuCfg
+local roundN = 0
+
+-- config and wall variables
+local AFR = false
+local allowCrazyWeps = false
+local requireSurfer = true
+local wX = {}
+local wY = {}
+local wWidth = {}
+local wHeight = {}
+local wTouched = {}
+--local margin
+local wallsLeft = 0
+
+local highestY = 0
+local surferTimer = 0
+local hasSurfed = false
+local allWallsHit = false
+
+local gTimer = 1
+local effectTimer = 1
+
+local ropeG = nil
+local crateG = nil
+local allowCrate = true
+
+-- crate radar vars
+local rCirc = {}
+local rAlpha = 255
+local rPingTimer = 0
+local m2Count = 0
+
+local weapons = {}
+
+--[[local unlisted = {amTardis, amLandGun,amExtraTime,amExtraDamage,
+				amVampiric, amSwitch, amInvulnerable, amGirder, amJetpack,
+				amPortalGun, amTeleport, amResurrector, amLaserSight, amLowGravity,
+				amAirAttack, amNapalm, amMineStrike, amDrillStrike,
+				amKamikaze, amSnowball, amSeduction}]]
+
+local crazyWeps = {amWatermelon, amHellishBomb, amBallgun, amRCPlane}
+
+local groundWeps = 	{amBee, amShotgun,amDEagle,amFirePunch, amWhip,
+				amPickHammer, amBaseballBat, amCake,amBallgun,
+				amRCPlane, amSniperRifle, amBirdy, amBlowTorch, amGasBomb,
+				amFlamethrower, amSMine, amMortar, amHammer}
+
+local ropeWeps = {amGrenade, amClusterBomb, amBazooka, amMine, amDynamite,
+				amWatermelon, amHellishBomb, amDrill, amMolotov}
+
+-- 0.9.18+ extra custom data for preset maps
+local MapList =
+	{
+	--name,      						surfer, roof, 	LRwalls
+	{"Atlantis Shoppa", 			    true, 	false, true},
+	{"BambooPlinko", 				    true,	false, true},
+	{"BrickShoppa", 				    false, 	false, true},
+	{"BubbleFlow",   					true, 	false, true},
+	{"Cave",       						false, 	false, true},
+	{"Glass Shoppa",      				true, 	false, true},
+	{"HardIce",      					false, 	false, true},
+	{"Industrial",       				false,	false, true},
+	{"Islands",       					true, 	false, true},
+	{"Hedgelove",       				true, 	false, true},
+	{"NeonStyle",       				false, 	false, true},
+	{"Octorama",       					false, 	false, true},
+	{"red vs blue - Castle",     		true, 	false, true},
+	{"red vs blue - castle2",     		true, 	false, true},
+	{"red vs blue - True Shoppa Sky",   true, 	false, true},
+	{"Ropes",       					false, 	false, true},
+	{"Ropes Rearranged",      			false, 	false, true},
+	{"RopesRevenge Flipped",    		true, 	false, true},
+	{"Ropes Three",      				false, 	false, true},
+	{"RopesTwo",      					false, 	false, true},
+	{"ShapeShoppa1.0",     				true, 	false, true},
+	{"ShappeShoppa Darkhow",      		true, 	false, true},
+	{"ShoppaCave2",      				true, 	false, true},
+	{"ShoppaFun",      					true, 	false, true},
+	{"ShoppaGolf",      				false, 	false,  true},
+	{"ShoppaHell",      				false, 	true,  false},
+	{"ShoppaKing",       				false, 	false, false},
+	{"ShoppaNeon",       				false, 	false, true},
+	{"ShoppaSky",       				false, 	false, true},
+	{"Shoppawall",       				false, 	false, true},
+	{"SkatePark",       				false, 	false, true},
+	{"SloppyShoppa",      				false, 	false, true},
+	{"Sticks",       					true, 	false, true},
+	{"Symmetrical Ropes ",       		false, 	false, true},
+	{"Tetris",       					false, 	false, true},
+	{"TransRopes2",      				false, 	false, true},
+	{"Wildmap",      					false, 	false, true},
+	{"Winter Shoppa",      				false, 	false, true},
+	{"2Cshoppa",      					true, 	false, true}
+	}
+
+function BoolToCfgTxt(p)
+	if p == false then
+		return("Disabled")
+	else
+		return("Enabled")
+	end
+end
+
+function LoadConfig(p)
+
+	margin = 20
+	mapID = nil
+
+	-- 0.9.17
+	if Map == "CHANGE_ME" then
+		AddCaption(loc("For improved features/stability, play 0.9.18+"))
+		--AddWall(10,10,4085,margin)
+		AddWall(10,10,margin,2025)
+		AddWall(4085-margin,10,margin,2025)
+	end
+
+	--0.9.18+
+	for i = 1, #MapList do
+		if Map == MapList[i][1] then
+			mapID = i
+			--AddCaption(MapList[i][1] .. " found. reqSurf is " .. BoolToCfgTxt(MapList[i][2]))
+		end
+	end
+
+	if (p == 1) and (mapID ~= nil) then
+		requireSurfer = MapList[mapID][2]
+	end
+
+	if mapID ~= nil then
+
+		-- add a wall to the roof
+		if MapList[mapID][3] == true then
+			AddWall(LeftX+10,TopY+10,RightX-LeftX-20,margin)
+		end
+
+		-- add walls on the left and right border
+		if MapList[mapID][4] == true then
+			AddWall(LeftX+10,TopY+10,margin,WaterLine)
+			AddWall(RightX-10-margin,TopY+10,margin,WaterLine)
+		end
+
+		-- add map specific walls
+		if Map == "Ropes" then
+			AddWall(1092,934,54,262)
+			AddWall(2822,323,33,137)
+		elseif Map == "ShoppaKing" then
+			AddWall(3777,1520,50,196)
+			AddWall(1658,338,46,670)
+		elseif Map == "ShoppaHell" then
+			AddWall(2035,831,30,263)
+			AddWall(3968,1668,31,383)
+		elseif Map == "ShoppaNeon" then
+			AddWall(980,400,20,300)
+			AddWall(1940,400,20,300)
+			AddWall(3088,565,26,284)
+			AddWall(187,270,28,266)
+		end
+
+	-- if map is unrecognized, add two walls on the side borders
+	-- also, if version of hw is not 0.9.17 or lower
+	elseif Map ~= "CHANGE_ME" then
+		AddWall(LeftX+10,TopY+10,margin,WaterLine)
+		AddWall(RightX-10-margin,TopY+10,margin,WaterLine)
+	end
+
+
+end
+
+function AddWall(zXMin,zYMin, zWidth, zHeight)
+
+	table.insert(wX, zXMin)
+	table.insert(wY, zYMin)
+	table.insert(wWidth, zWidth)
+	table.insert(wHeight, zHeight)
+	table.insert(wTouched, false)
+
+end
+
+function DrawBlip(gear)
+	SetVisualGearValues(getGearValue(gear,"CIRC"), getGearValue(gear,"RX"), getGearValue(gear,"RY"), 100, 255, 1, 10, 0, 40, 3, GetClanColor(GetHogClan(CurrentHedgehog))-rAlpha)
+end
+
+function TrackRadarBlip(gear)
+
+	-- work out the distance to the target
+	g1X, g1Y = GetGearPosition(CurrentHedgehog)
+	g2X, g2Y = GetX(gear), GetY(gear)
+	q = g1X - g2X
+	w = g1Y - g2Y
+	r = math.sqrt( (q*q) + (w*w) )	--alternate
+
+	RCX = getGearValue(gear,"RX")
+	RCY = getGearValue(gear,"RY")
+
+	rCircDistance = r -- distance to circle
+
+	opp = w
+	if opp < 0 then
+		opp = opp*-1
+	end
+
+	-- work out the angle (theta) to the target
+	t = math.deg ( math.asin(opp / r) )
+
+	-- based on the radius of the radar, calculate what x/y displacement should be
+	NR = 150 -- radius at which to draw circs
+	NX = math.cos( math.rad(t) ) * NR
+	NY = math.sin( math.rad(t) ) * NR
+
+	if rCircDistance < NR then
+		RCX = g2X
+	elseif q > 0 then
+		RCX = g1X - NX
+	else
+		RCX = g1X + NX
+	end
+
+	if rCircDistance < NR then
+		RCY = g2Y
+	elseif w > 0 then
+		RCY = g1Y - NY
+	else
+		RCY = g1Y + NY
+	end
+
+	setGearValue(gear, "RX", RCX)
+	setGearValue(gear, "RY", RCY)
+
+end
+
+
+function HandleCircles()
+
+	-- enable this if you want the radar to only show for a few seconds
+	-- after you spawn the crate
+	--[[if rAlpha ~= 255 then
+
+		rPingTimer = rPingTimer + 1
+		if rPingTimer == 100 then
+			rPingTimer = 0
+
+			rAlpha = rAlpha + 5
+			if rAlpha >= 255 then
+				rAlpha = 255
+			end
+		end
+
+	end]]
+
+	runOnGears(DrawBlip)
+
+	m2Count = m2Count + 1
+	if m2Count == 25 then
+		m2Count = 0
+
+		if (CurrentHedgehog ~= nil) and (rAlpha ~= 255) then
+			runOnGears(TrackRadarBlip)
+		end
+
+	end
+
+end
+
+
+function CheckCrateConditions()
+
+	crateSpawn = true
+
+	if requireSurfer == true then
+		if hasSurfed == false then
+			crateSpawn = false
+		end
+	end
+
+	if #wTouched > 0 then
+		if allWallsHit == false then
+			crateSpawn = false
+		end
+	end
+
+	if crateSpawn == true then
+		if allowCrate == true then
+		--if (crateG == nil) and (allowCrate == true) then
+			--AddCaption("")
+			SpawnAmmoCrate(0, 0, weapons[1+GetRandom(#weapons)] )
+			rPingTimer = 0
+			rAlpha = 0
+			PlaySound(sndWarp)
+		end
+	end
+
+end
+
+function CheckSurfer()
+
+	if GetY(CurrentHedgehog) > highestY then
+		highestY = GetY(CurrentHedgehog)
+	end
+
+	if (highestY == (WaterLine-8)) and (hasSurfed == false)  then
+
+		surferTimer = surferTimer +1
+		if (surferTimer == 40) then
+			hasSurfed = true
+			AddCaption(loc("Surfer!"),0xffba00ff,capgrpMessage2)
+		end
+	end
+
+end
+
+
+
+function WallHit(id, zXMin,zYMin, zWidth, zHeight)
+
+	if wTouched[id] == false then
+		tempE = AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), vgtBigExplosion, 0, false)
+		PlaySound(sndExplosion)
+		wallsLeft = wallsLeft - 1
+
+		if wallsLeft == 0 then
+			AddCaption(loc("All walls touched!"))
+			allWallsHit = true
+			if (requireSurfer == true) and (hasSurfed == false) then
+				AddCaption(loc("Go surf!"),0xffba00ff,capgrpMessage2)
+			end
+		else
+			AddCaption(loc("Walls Left") .. ": " .. wallsLeft)
+		end
+
+	end
+
+	wTouched[id] = true
+	tempE = AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), vgtSmoke, 0, false)
+	--PlaySound(sndVaporize) -- yeah, this is just annoying as shit
+
+end
+
+function CheckForWallCollision()
+
+	for i = 1, #wTouched do
+		if gearIsInBox(CurrentHedgehog, wX[i],wY[i],wWidth[i],wHeight[i]) then
+			WallHit(i, wX[i],wY[i],wWidth[i],wHeight[i])
+		end
+	end
+
+end
+
+function BorderSpark(zXMin,zYMin, zWidth, zHeight, bCol)
+
+	eX = zXMin + GetRandom(zWidth+10)
+	eY = zYMin + GetRandom(zHeight+10)
+
+	tempE = AddVisualGear(eX, eY, vgtDust, 0, false)
+	if tempE ~= 0 then
+		g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE)
+		SetVisualGearValues(tempE, eX, eY, g3, g4, g5, g6, g7, 1, g9, bCol )
+	end
+
+end
+
+
+function HandleBorderEffects()
+
+	effectTimer = effectTimer + 1
+	if effectTimer > 15 then --25
+
+		effectTimer = 1
+
+		for i = 1, #wTouched do
+			if wTouched[i] == true then
+				--bCol = GetClanColor(GetHogClan(CurrentHedgehog))
+			else
+				--bCol = 0xFFFFFFFF
+				bCol = GetClanColor(GetHogClan(CurrentHedgehog))
+				BorderSpark(wX[i],wY[i],wWidth[i],wHeight[i], bCol)
+			end
+			--BorderSpark(wX[i],wY[i],wWidth[i],wHeight[i], bCol)
+		end
+
+	end
+
+end
+
+function onLJump()
+	if roundN < 2 then
+		roundN = 100
+		SetInputMask(0xFFFFFFFF)
+		TurnTimeLeft = 1
+		AddCaption(loc("Configuration accepted."),0xffba00ff,capgrpMessage)
+		HideMission()
+	end
+end
+
+function onAttack()
+
+	if roundN < 2 then
+
+		if menuIndex == 1 then
+
+			if #wTouched > 0 then
+				for i = 1, #wTouched do
+					wTouched[i] = nil
+					wX[i] = nil
+					wY[i] = nil
+					wWidth[i] = nil
+					wHeight[i] = nil
+				end
+			else
+				LoadConfig(2)
+			end
+
+		elseif menuIndex == 2 then
+			requireSurfer = not(requireSurfer)
+		elseif menuIndex == 3 then
+			AFR = not(AFR)
+		elseif menuIndex == 4 then
+			allowCrazyWeps = not(allowCrazyWeps)
+		end
+
+		UpdateMenu()
+		configureWeapons()
+		HandleStartingStage()
+
+	elseif (AFR == true) then
+
+		if (GetCurAmmoType() ~= amRope) and
+			(GetCurAmmoType() ~= amSkip) and
+			(GetCurAmmoType() ~= amNothing)
+		then
+			AddCaption(loc("You may only attack from a rope!"),0xffba00ff,capgrpMessage2)
+		end
+
+	end
+
+end
+
+function onDown()
+	if roundN < 2 then
+		menuIndex = menuIndex +1
+		if menuIndex > #menu then
+			menuIndex = 1
+		end
+		HandleStartingStage()
+	end
+end
+
+function onUp()
+	if roundN < 2 then
+		menuIndex = menuIndex -1
+		if 	menuIndex == 0 then
+			menuIndex = #menu
+		end
+		HandleStartingStage()
+	end
+end
+
+function onGameInit()
+
+	GameFlags = gfRandomOrder + gfBorder + gfSolidLand --+ gfInfAttack
+	HealthCaseProb = 0
+	CaseFreq = 0
+
+end
+
+function configureWeapons()
+
+	-- reset wep array
+	for i = 1, #weapons do
+		weapons[i] = nil
+	end
+
+	-- add rope weps
+	for i, w in pairs(ropeWeps) do
+        table.insert(weapons, w)
+	end
+
+	-- add ground weps
+	for i, w in pairs(groundWeps) do
+        table.insert(weapons, w)
+	end
+
+	-- remove ground weps if attacking from rope is mandatory
+	if AFR == true then
+		for i = 1, #weapons do
+			for w = 1, #groundWeps do
+				if groundWeps[w] == weapons[i] then
+					table.remove(weapons, i)
+				end
+			end
+		end
+	end
+
+	-- remove crazy weps is crazy weps aren't allowed
+	if allowCrazyWeps == false then
+		for i = 1, #weapons do
+			for w = 1, #crazyWeps do
+				if crazyWeps[w] == weapons[i] then
+					table.remove(weapons, i)
+				end
+			end
+		end
+	end
+
+end
+
+function onGameStart()
+
+	LoadConfig(1)
+	configureWeapons()
+	UpdateMenu()
+	HandleStartingStage()
+
+end
+
+function onNewTurn()
+
+	wallsLeft = #wTouched
+
+	for i = 1, #wTouched do
+		wTouched[i] = false
+	end
+
+	allowCrate = true
+
+	surferTimer = 0
+	hasSurfed = false
+	allWallsHit = false
+	highestY = 0
+
+	crateG = nil
+
+	-- new config stuff
+	roundN = roundN + 1
+	if roundN < 2 then
+		TurnTimeLeft = -1
+		SetInputMask(0)
+		allowCrate = false
+		HandleStartingStage() -- new
+	end
+
+end
+
+function UpdateMenu()
+
+	preMenuCfg = loc("Spawn the crate, and attack!") .. "|"
+	postMenuCfg = loc("Press [Enter] to accept this configuration.")
+
+	menu = 	{
+			loc("Walls Required") .. ": " .. #wTouched .. "|",
+			loc("Surf Before Crate") .. ": " .. BoolToCfgTxt(requireSurfer) .. "|",
+			loc("Attack From Rope") .. ": " .. BoolToCfgTxt(AFR) .. "|",
+			loc("Super Weapons") .. ": " .. BoolToCfgTxt(allowCrazyWeps) .. "|"
+			}
+end
+
+function HandleStartingStage()
+
+	temp = menu[menuIndex]
+	menu[menuIndex] = "--> " .. menu[menuIndex]
+
+	missionComment = ""
+	for i = 1, #menu do
+		missionComment = missionComment .. menu[i]
+	end
+
+	ShowMission	(
+				loc("WALL TO WALL") .. " 0.4",
+				loc("a shoppa minigame"),
+				preMenuCfg..
+				missionComment ..
+				postMenuCfg ..
+				--" " .. "|" ..
+				"", 4, 300000
+				)
+
+	menu[menuIndex] = temp
+
+end
+
+function onGameTick()
+
+	if CurrentHedgehog ~= nil then
+
+		--AddCaption(Map)
+		--AddCaption(RightX ..";" .. GetX(CurrentHedgehog))
+
+		CheckSurfer()
+
+		gTimer = gTimer + 1
+		if gTimer == 25 then
+			gTimer = 1
+
+			CheckForWallCollision()
+			CheckCrateConditions()
+
+			if (crateG == GetFollowGear()) and (crateG ~= nil) then
+				FollowGear(CurrentHedgehog)
+			end
+
+			-- if attackfromrope is set, forbid firing unless using rope
+			if (AFR == true) and (roundN >= 2) then
+				if (GetCurAmmoType() == amRope) or
+					(GetCurAmmoType() == amSkip) or
+					(GetCurAmmoType() == amNothing)
+				then
+					SetInputMask(0xFFFFFFFF)
+				elseif ropeG == nil then
+					SetInputMask(bnot(gmAttack))
+				end
+			end
+
+		end
+
+		HandleBorderEffects()
+		HandleCircles()
+
+	end
+
+end
+
+function onGearAdd(gear)
+
+	if GetGearType(gear) == gtRope then
+		ropeG = gear
+	elseif GetGearType(gear) == gtCase then
+
+		crateG = gear
+		trackGear(gear)
+
+		table.insert(rCirc, AddVisualGear(0,0,vgtCircle,0,true) )
+		setGearValue(gear,"CIRC",rCirc[#rCirc])
+		setGearValue(gear,"RX",0)
+		setGearValue(gear,"RY",0)
+		SetVisualGearValues(rCirc[#rCirc], 0, 0, 100, 255, 1, 10, 0, 40, 3, 0xff00ffff)
+
+		allowCrate = false
+
+		rPingTimer = 0
+		rAlpha = 0
+
+	end
+
+end
+
+function onGearDelete(gear)
+
+	if gear == ropeG then
+		ropeG = nil
+	elseif GetGearType(gear) == gtCase then
+
+		if gear == crateG then
+			crateG = nil
+		--	rAlpha = 255
+		end
+
+		for i = 1, #rCirc do
+			if rCirc[i] == getGearValue(gear,"CIRC") then
+				DeleteVisualGear(rCirc[i])
+				table.remove(rCirc, i)
+			end
+		end
+
+		trackDeletion(gear)
+
+	end
+
+end
+
+function onAmmoStoreInit()
+
+	for i, w in pairs(ropeWeps) do
+        SetAmmo(w, 0, 0, 0, 1)
+    end
+
+    for i, w in pairs(groundWeps) do
+        SetAmmo(w, 0, 0, 0, 1)
+    end
+
+    for i, w in pairs(crazyWeps) do
+        SetAmmo(w, 0, 0, 0, 1)
+    end
+
+	SetAmmo(amRope, 9, 0, 0, 0)
+	SetAmmo(amSkip, 9, 0, 0, 0)
+
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/assets/Data/Scripts/Tracker.lua	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,295 @@
+-- Library for keeping track of gears in the game
+-- and running functions on them
+-- also keeps track of clans and teams
+
+local trackingTeams = false
+local resurrecting = false
+local gears = {}
+local teams = {}
+local clans = {}
+local resurrectedHogs = {}
+local gearValues = {}
+local teamValues = {}
+local clanValues = {}
+
+-- Registers when a gear is added
+function trackGear(gear)
+    table.insert(gears, gear)
+    if trackingTeams and GetGearType(gear) == gtResurrector then
+        resurrecting = true
+    elseif resurrecting and GetGearType(gear) == gtHedgehog then
+        table.insert(resurrectedHogs, gear)
+    end
+end
+
+-- Registers when a gear is deleted
+function trackDeletion(gear)
+    gearValues[gear] = nil
+    for k, g in ipairs(gears) do
+        if g == gear then
+            table.remove(gears, k)
+            break
+        end
+    end
+    if trackingTeams and GetGearType(gear) == gtHedgehog then
+    	hogs = teams[GetHogTeamName(gear)]
+        if hogs ~= nil then
+            if table.maxn(hogs) == 1 then
+                hogs = nil
+            else
+				for k, hog in ipairs(hogs) do
+                    if hog == gear then
+                        table.remove(hogs, k)
+                        break
+                    end
+                end
+            end
+        end
+    elseif resurrecting and GetGearType(gear) == gtResurrector then
+        for k, gear in ipairs(resurrectedHogs) do
+            team = GetHogTeamName(gear)
+            if teams[team] == nil then
+                teams[team] = {}
+            end
+            table.insert(teams[team], gear)
+        end
+        resurrecting = false
+        resurrectedHogs = {}
+    end
+end
+
+-- Start to keep track of teams
+function trackTeams()
+    if not trackingTeams then
+        trackingTeams = true
+        for k, gear in ipairs(gears) do
+            if GetGearType(gear) == gtHedgehog then
+                team = GetHogTeamName(gear)
+                if teams[team] == nil then
+                    teams[team] = { gear }
+                    clans[team] = GetHogClan(gear)
+                else
+                    table.insert(teams[team], gear)
+                end
+            end
+        end
+    end
+end
+
+-- Registers when a hog is hidden
+function trackHiding(gear)
+    for k, g in ipairs(gears) do
+        if g == gear then
+            table.remove(gears, k)
+            break
+        end
+    end
+	
+    if trackingTeams then
+    	hogs = teams[GetHogTeamName(gear)]
+    	
+        if hogs ~= nil then
+            if table.maxn(hogs) == 1 then
+                hogs = nil
+            else
+                for k, hog in ipairs(hogs) do
+                    if hog == gear then
+                        table.remove(hogs, k)
+                        break
+                    end
+                end
+            end
+        end
+    end
+end
+
+-- Registers when a hog is restored
+function trackRestoring(gear)
+	table.insert(gears, gear)
+
+    if trackingTeams then
+        team = GetHogTeamName(gear)
+        if teams[team] == nil then
+            teams[team] = {}
+        end
+        table.insert(teams[team], gear)
+    end
+end
+
+-- Get a value for a specific gear
+function getGearValue(gear, key)
+    if gearValues[gear] ~= nil then
+        return gearValues[gear][key]
+    end
+    return nil
+end
+
+-- Set a value for a specific gear
+function setGearValue(gear, key, value)
+    found = false
+    for id, values in pairs(gearValues) do
+        if id == gear then
+            values[key] = value
+            found = true
+        end
+    end
+    if not found then
+        gearValues[gear] = { [key] = value }
+    end
+end
+
+-- Increase a value for a specific gear
+function increaseGearValue(gear, key)
+    for id, values in pairs(gearValues) do
+        if id == gear then
+            values[key] = values[key] + 1
+        end
+    end
+end
+
+-- Decrease a value for a specific gear
+function decreaseGearValue(gear, key)
+    for id, values in pairs(gearValues) do
+        if id == gear then
+            values[key] = values[key] - 1
+        end
+    end
+end
+
+-- Get a value for a specific team
+function getTeamValue(team, key)
+    if teamValues[team] ~= nil then
+        return teamValues[team][key]
+    end
+    return nil
+end
+
+-- Set a value for a specific team
+function setTeamValue(team, key, value)
+    found = false
+    for name, values in pairs(teamValues) do
+        if name == team then
+            values[key] = value
+            found = true
+        end
+    end
+    if not found then
+        teamValues[team] = { [key] = value }
+    end
+end
+
+-- Increase a value for a specific team
+function increaseTeamValue(team, key)
+    for name, values in pairs(teamValues) do
+        if name == team then
+            values[key] = values[key] + 1
+        end
+    end
+end
+
+-- Decrease a value for a specific team
+function decreaseTeamValue(team, key)
+    for name, values in pairs(teamValues) do
+        if name == team then
+            values[key] = values[key] - 1
+        end
+    end
+end
+
+-- Get a value for a specific clan
+function getClanValue(clan, key)
+    if clanValues[clan] ~= nil then
+        return clanValues[clan][key]
+    end
+    return nil
+end
+
+-- Set a value for a specific clan
+function setClanValue(clan, key, value)
+    found = false
+    for num, values in ipairs(clanValues) do
+        if num == clan then
+            values[key] = value
+            found = true
+        end
+    end
+    if not found then
+        clanValues[clan] = { [key] = value }
+    end
+end
+
+-- Increase a value for a specific clan
+function increaseClanValue(clan, key)
+    for num, values in ipairs(clanValues) do
+        if num == clan then
+            values[key] = values[key] + 1
+        end
+    end
+end
+
+-- Decrease a value for a specific clan
+function decreaseClanValue(clan, key)
+    for num, values in ipairs(clanValues) do
+        if num == clan then
+            values[key] = values[key] - 1
+        end
+    end
+end
+
+-- Run a function on all tracked gears
+function runOnGears(func)
+    for k, gear in ipairs(gears) do
+        func(gear)
+    end
+end
+
+-- Run a function on all tracked hogs
+function runOnHogs(func)
+    for k, hogs in pairs(teams) do
+        for m, hog in ipairs(hogs) do
+            func(hog)
+        end
+    end
+end
+
+-- Run a function on hogs in a team
+function runOnHogsInTeam(func, team)
+    if teams[team] ~= nil then
+        for k, hog in ipairs(teams[team]) do
+            func(hog)
+        end
+    end
+end
+
+-- Run a function on hogs in other teams
+function runOnHogsInOtherTeams(func, team)
+    for k, hogs in pairs(teams) do
+        if k ~= team then
+            for m, hog in ipairs(hogs) do
+                func(hog)
+            end
+        end
+    end
+end
+
+-- Run a function on hogs in a clan
+function runOnHogsInClan(func, clan)
+    for i = 1, table.maxn(clans) do
+        if clans[i] == clan then
+            for k, hog in ipairs(teams[i]) do
+                func(hog)
+            end
+        end
+    end
+end
+
+-- Run a function on hogs in other clans
+function runOnHogsInOtherClans(func, clan)
+    for i = 1, table.maxn(clans) do
+        if clans[i] ~= clan then
+            for k, hog in ipairs(teams[i]) do
+                func(hog)
+            end
+        end
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/assets/Data/Scripts/Utils.lua	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,22 @@
+-- Library for miscellaneous utilitiy functions
+
+-- Check if a gear is inside a box
+function gearIsInBox(gear, x, y, w, h)
+    gx, gy = GetGearPosition(gear)
+    if gx >= x and gy >= y and gx <= x + w and gy <= y + h then
+        return true
+    end
+    return false
+end
+
+-- Check if a gear is inside a circle
+function gearIsInCircle(gear, x, y, r, useRadius)
+    gx, gy = GetGearPosition(gear)
+    if useRadius then
+        r = r + GetGearRadius(gear)
+    end
+    if r ^ 2 >= (x - gx) ^ 2 + (y - gy) ^ 2 then
+        return true
+    end
+    return false
+end
Binary file project_files/Android-build/SDL-android-project/assets/Data/Sounds/TARDIS.ogg has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Sounds/beep.ogg has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Sounds/beewater.ogg has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Sounds/voices/Classic/Amazing.ogg has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Sounds/voices/Classic/Brilliant.ogg has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Sounds/voices/Classic/Bugger.ogg has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Sounds/voices/Classic/Bungee.ogg has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Sounds/voices/Classic/Cutitout.ogg has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Sounds/voices/Classic/Drat.ogg has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Sounds/voices/Classic/Excellent.ogg has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Sounds/voices/Classic/Fire.ogg has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Sounds/voices/Classic/Gonnagetyou.ogg has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Sounds/voices/Classic/Grenade.ogg has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Sounds/voices/Classic/Hmm.ogg has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Sounds/voices/Classic/Justyouwait.ogg has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Sounds/voices/Classic/Leavemealone.ogg has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Sounds/voices/Classic/Ohdear.ogg has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Sounds/voices/Classic/Ouch.ogg has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Sounds/voices/Classic/Perfect.ogg has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Sounds/voices/Classic/Revenge.ogg has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Sounds/voices/Classic/Runaway.ogg has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Sounds/voices/Classic/Solong.ogg has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Sounds/voices/Classic/Thisoneismine.ogg has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Sounds/voices/Classic/Watchthis.ogg has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Sounds/voices/Classic/Whatthe.ogg has changed
Binary file project_files/Android-build/SDL-android-project/assets/Data/Sounds/voices/Classic/Whoopsee.ogg has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/assets/assetsversion.txt	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,1 @@
+9
\ No newline at end of file
--- a/project_files/Android-build/SDL-android-project/jni/Android.mk	Sun Oct 28 13:28:23 2012 +0100
+++ b/project_files/Android-build/SDL-android-project/jni/Android.mk	Sun Oct 28 15:12:37 2012 +0100
@@ -6,5 +6,6 @@
 
 include $(CLEAR_VARS)
 include $(JNI_DIR)/../../../../misc/Android.mk
+include $(JNI_DIR)/../../../frontlib/Android.mk
 
 
--- a/project_files/Android-build/SDL-android-project/jni/SDL/src/main/android/SDL_android_main.cpp	Sun Oct 28 13:28:23 2012 +0100
+++ b/project_files/Android-build/SDL-android-project/jni/SDL/src/main/android/SDL_android_main.cpp	Sun Oct 28 15:12:37 2012 +0100
@@ -27,23 +27,20 @@
     char *argv[argc];
     jstring jstringArgv[argc];
     for(int i = 0; i < argc; i++){
-        jstringArgv[i] = (jstring)env->GetObjectArrayElement(strArray, i);  //get the element
-	argv[i] = (char*)malloc(sizeof(char) * env->GetStringLength(jstringArgv[i]));
-	strcpy(argv[i], env->GetStringUTFChars(jstringArgv[i], JNI_FALSE)); //copy it to a mutable location
-	//Don't release memory the JAVA GC will take care of it
-        //env->ReleaseStringChars(jstringArgv[i], (jchar*)argv[i]);           
+		jstringArgv[i] = (jstring)env->GetObjectArrayElement(strArray, i);  //get the element
+		argv[i] = (char*)malloc(env->GetStringUTFLength(jstringArgv[i]) + 1);
+		const char *str = env->GetStringUTFChars(jstringArgv[i], NULL);
+		strcpy(argv[i], str); //copy it to a mutable location
+        env->ReleaseStringUTFChars(jstringArgv[i], str);           
     }
     
     /* Run the application code! */
-    int status;
-    status = SDL_main(argc, argv);
+    int status = SDL_main(argc, argv);
 
     //Clean up argv
     for(int i = 0; i < argc; i++){
+		free(argv[i]);
     }
-
-    /* We exit here for consistency with other platforms. */
-    //exit(status); Xeli: Or lets not crash the entire app.....
 }
 
 /* vi: set ts=4 sw=4 expandtab: */
Binary file project_files/Android-build/SDL-android-project/libs/android-support-v13.jar has changed
Binary file project_files/Android-build/SDL-android-project/libs/armeabi/libjnidispatch.so has changed
Binary file project_files/Android-build/SDL-android-project/libs/jna.jar has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-hdpi/button_local_play.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-hdpi/button_network_play.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-large-mdpi/button_local_play.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-large-mdpi/button_network_play.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/backbutton.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/drawable-mdpi/button.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_focused="true" android:state_enabled="true" android:drawable="@drawable/button_focused" />
+    <item android:state_focused="true" android:state_enabled="false" android:drawable="@drawable/button_focused_disabled" />
+    <item android:state_focused="false" android:state_enabled="true" android:drawable="@drawable/button_normal" />
+    <item android:state_focused="false" android:state_enabled="false" android:drawable="@drawable/button_disabled" />
+</selector>
\ No newline at end of file
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/button_disabled.9.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/button_focused.9.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/button_focused_disabled.9.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/button_normal.9.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/dropdown.9.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/drawable-mdpi/dropdown.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_focused="true" android:state_enabled="true" android:drawable="@drawable/dropdown_focused" />
+    <item android:state_focused="true" android:state_enabled="false" android:drawable="@drawable/dropdown_focused_disabled" />
+    <item android:state_focused="false" android:state_enabled="true" android:drawable="@drawable/dropdown_normal" />
+    <item android:state_focused="false" android:state_enabled="false" android:drawable="@drawable/dropdown_disabled" />
+</selector>
\ No newline at end of file
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/dropdown_disabled.9.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/dropdown_focused.9.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/dropdown_focused_disabled.9.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/dropdown_normal.9.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/drawable-mdpi/hogcount.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,10 @@
+ <level-list xmlns:android="http://schemas.android.com/apk/res/android">
+  <item android:maxLevel="1" android:drawable="@drawable/hogcount1" />
+  <item android:maxLevel="2" android:drawable="@drawable/hogcount2" />
+  <item android:maxLevel="3" android:drawable="@drawable/hogcount3" />
+  <item android:maxLevel="4" android:drawable="@drawable/hogcount4" />
+  <item android:maxLevel="5" android:drawable="@drawable/hogcount5" />
+  <item android:maxLevel="6" android:drawable="@drawable/hogcount6" />
+  <item android:maxLevel="7" android:drawable="@drawable/hogcount7" />
+  <item android:maxLevel="8" android:drawable="@drawable/hogcount8" />
+ </level-list>
\ No newline at end of file
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/hogcount1.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/hogcount2.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/hogcount3.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/hogcount4.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/hogcount5.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/hogcount6.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/hogcount7.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/hogcount8.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/lightbulb_off.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/lightbulb_on.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/playerlist_player.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/roomlist_ingame.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/roomlist_preparing.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/savebutton.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/drawable-mdpi/team_local_by_level.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,8 @@
+<level-list xmlns:android="http://schemas.android.com/apk/res/android">
+	<item android:maxLevel="0" android:drawable="@drawable/human" />
+	<item android:maxLevel="1" android:drawable="@drawable/bot5" />
+	<item android:maxLevel="2" android:drawable="@drawable/bot4" />
+	<item android:maxLevel="3" android:drawable="@drawable/bot3" />
+	<item android:maxLevel="4" android:drawable="@drawable/bot2" />
+	<item android:maxLevel="5" android:drawable="@drawable/bot1" />
+</level-list>
\ No newline at end of file
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/team_net_bot1.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/team_net_bot2.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/team_net_bot3.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/team_net_bot4.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/team_net_bot5.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/drawable-mdpi/team_net_by_level.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,8 @@
+<level-list xmlns:android="http://schemas.android.com/apk/res/android">
+	<item android:maxLevel="0" android:drawable="@drawable/team_net_human" />
+	<item android:maxLevel="1" android:drawable="@drawable/team_net_bot5" />
+	<item android:maxLevel="2" android:drawable="@drawable/team_net_bot4" />
+	<item android:maxLevel="3" android:drawable="@drawable/team_net_bot3" />
+	<item android:maxLevel="4" android:drawable="@drawable/team_net_bot2" />
+	<item android:maxLevel="5" android:drawable="@drawable/team_net_bot1" />
+</level-list>
\ No newline at end of file
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/team_net_human.png has changed
--- a/project_files/Android-build/SDL-android-project/res/drawable-mdpi/teamcount.xml	Sun Oct 28 13:28:23 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
- <level-list xmlns:android="http://schemas.android.com/apk/res/android">
-  <item android:maxLevel="0" android:drawable="@drawable/teams_number0" />
-  <item android:maxLevel="1" android:drawable="@drawable/teams_number1" />
-  <item android:maxLevel="2" android:drawable="@drawable/teams_number2" />
-  <item android:maxLevel="3" android:drawable="@drawable/teams_number3" />
-  <item android:maxLevel="4" android:drawable="@drawable/teams_number4" />
-  <item android:maxLevel="5" android:drawable="@drawable/teams_number5" />
-  <item android:maxLevel="6" android:drawable="@drawable/teams_number6" />
-  <item android:maxLevel="7" android:drawable="@drawable/teams_number7" />
-  <item android:maxLevel="8" android:drawable="@drawable/teams_number8" />
-  <item android:maxLevel="9" android:drawable="@drawable/teams_number9" />
- </level-list>
\ No newline at end of file
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/teamcount0.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/teamcount1.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/teamcount2.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/teamcount3.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/teamcount4.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/teamcount5.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/teamcount6.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/teamcount7.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/teamcount8.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-mdpi/teamcount9.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/drawable-mdpi/teams_number.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,12 @@
+ <level-list xmlns:android="http://schemas.android.com/apk/res/android">
+  <item android:maxLevel="0" android:drawable="@drawable/teams_number0" />
+  <item android:maxLevel="1" android:drawable="@drawable/teams_number1" />
+  <item android:maxLevel="2" android:drawable="@drawable/teams_number2" />
+  <item android:maxLevel="3" android:drawable="@drawable/teams_number3" />
+  <item android:maxLevel="4" android:drawable="@drawable/teams_number4" />
+  <item android:maxLevel="5" android:drawable="@drawable/teams_number5" />
+  <item android:maxLevel="6" android:drawable="@drawable/teams_number6" />
+  <item android:maxLevel="7" android:drawable="@drawable/teams_number7" />
+  <item android:maxLevel="8" android:drawable="@drawable/teams_number8" />
+  <item android:maxLevel="9" android:drawable="@drawable/teams_number9" />
+ </level-list>
\ No newline at end of file
Binary file project_files/Android-build/SDL-android-project/res/drawable-small-hdpi/button_local_play.png has changed
Binary file project_files/Android-build/SDL-android-project/res/drawable-small-hdpi/button_network_play.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/layout-large/activity_lobby.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout
+	xmlns:android="http://schemas.android.com/apk/res/android"
+	xmlns:tools="http://schemas.android.com/tools"
+  	android:layout_width="fill_parent"
+	android:layout_height="fill_parent">
+	<include layout="@layout/background"/>
+
+	<LinearLayout
+	    android:layout_width="match_parent"
+	    android:layout_height="match_parent"
+	    android:orientation="vertical"
+	    android:padding="5dp" >
+	
+	    <FrameLayout
+	        android:layout_width="fill_parent"
+	        android:layout_height="0dp"
+	        android:layout_marginBottom="10dp"
+	        android:layout_weight="0.4"
+	        android:background="@drawable/box" >
+	
+	        <fragment
+	            android:id="@+id/roomListFragment"
+	            android:layout_width="fill_parent"
+	            android:layout_height="fill_parent"
+	            class="org.hedgewars.hedgeroid.RoomlistFragment"
+	            tools:layout="@layout/fragment_roomlist" />
+	    </FrameLayout>
+	
+	    <RelativeLayout
+	        android:layout_width="fill_parent"
+	        android:layout_height="0dp"
+	        android:layout_weight="0.6"
+	        android:baselineAligned="false"
+	        android:orientation="horizontal" >
+	
+	        <FrameLayout
+	            android:id="@+id/playerFrame"
+	            android:layout_width="250dp"
+	            android:layout_height="fill_parent"
+	            android:layout_alignParentRight="true"
+	            android:background="@drawable/box" >
+	
+	            <fragment
+	                android:id="@+id/playerListFragment"
+	                android:layout_width="fill_parent"
+	                android:layout_height="fill_parent"
+	                class="org.hedgewars.hedgeroid.LobbyPlayerlistFragment"
+	                tools:layout="@layout/fragment_playerlist" />
+	        </FrameLayout>
+	        
+	        <FrameLayout
+	            android:layout_width="0dp"
+	            android:layout_height="fill_parent"
+	            android:layout_alignParentLeft="true"
+	            android:layout_toLeftOf="@id/playerFrame"
+	            android:layout_marginRight="10dp"
+	            android:background="@drawable/box" >
+	
+	            <fragment
+	                android:id="@+id/chatFragment"
+	                android:layout_width="fill_parent"
+	                android:layout_height="fill_parent"
+	                class="org.hedgewars.hedgeroid.ChatFragment"
+	                tools:layout="@layout/fragment_chat" />
+	        </FrameLayout>
+	    </RelativeLayout>
+	
+	</LinearLayout>
+</FrameLayout>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/layout-large/activity_localroom.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent" >
+
+    <include layout="@layout/background" />
+
+    <RelativeLayout
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent"
+        android:padding="2dp" >
+
+        <LinearLayout
+            android:id="@+id/upperFrame"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:layout_alignParentLeft="true"
+            android:layout_alignParentRight="true"
+            android:layout_alignParentTop="true"
+            android:layout_marginBottom="4dp"
+            android:layout_above="@+id/startGame"
+            android:baselineAligned="false"
+            android:minHeight="200dp" >
+
+            <FrameLayout
+                android:id="@+id/mapFrame"
+                android:layout_width="0dp"
+                android:layout_height="fill_parent"
+                android:layout_marginRight="4dp"
+                android:layout_weight="1"
+                android:background="@drawable/box" >
+
+                <fragment
+                    android:id="@+id/mapFragment"
+                    android:layout_width="fill_parent"
+                    android:layout_height="fill_parent"
+                    class="org.hedgewars.hedgeroid.MapFragment"
+                    tools:layout="@layout/fragment_map" />
+            </FrameLayout>
+
+            <FrameLayout
+                android:id="@+id/settingsFrame"
+                android:layout_width="0dp"
+                android:layout_height="fill_parent"
+                android:layout_marginRight="4dp"
+                android:layout_weight="1"
+                android:background="@drawable/box" >
+
+                <fragment
+                    android:id="@+id/settingsFragment"
+                    android:layout_width="fill_parent"
+                    android:layout_height="fill_parent"
+                    class="org.hedgewars.hedgeroid.SettingsFragment"
+                    tools:layout="@layout/fragment_settings" />
+            </FrameLayout>
+
+            <FrameLayout
+                android:id="@+id/teamsFrame"
+                android:layout_width="0dp"
+                android:layout_height="fill_parent"
+                android:layout_weight="1"
+                android:background="@drawable/box" >
+
+                <fragment
+                    android:id="@+id/teamsFragment"
+                    android:layout_width="fill_parent"
+                    android:layout_height="fill_parent"
+                    class="org.hedgewars.hedgeroid.TeamlistFragment"
+                    tools:layout="@layout/fragment_teamlist" />
+            </FrameLayout>
+        </LinearLayout>
+
+        <Button
+            android:id="@id/startGame"
+            android:layout_width="200dp"
+            android:layout_height="67dp"
+            android:layout_alignParentBottom="true"
+            android:layout_centerHorizontal="true"
+            android:background="@drawable/startgamebutton" />
+    </RelativeLayout>
+
+</FrameLayout>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/layout-large/activity_netroom.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent" >
+
+    <include layout="@layout/background" />
+
+    <RelativeLayout
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent"
+        android:padding="2dp" >
+
+        <LinearLayout
+            android:id="@+id/upperFrame"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:layout_alignParentLeft="true"
+            android:layout_alignParentRight="true"
+            android:layout_alignParentTop="true"
+            android:layout_marginBottom="4dp"
+            android:baselineAligned="false"
+            android:minHeight="200dp" >
+            
+            <FrameLayout
+                android:id="@+id/mapFrame"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_marginRight="4dp"
+                android:layout_weight="1"
+                android:background="@drawable/box" >
+
+                <fragment
+                    android:id="@+id/mapFragment"
+                    android:layout_width="fill_parent"
+                    android:layout_height="fill_parent"
+                    class="org.hedgewars.hedgeroid.MapFragment"
+                    tools:layout="@layout/fragment_map" />
+            </FrameLayout>
+
+            <FrameLayout
+                android:id="@+id/settingsFrame"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_marginRight="4dp"
+                android:layout_weight="1"
+                android:background="@drawable/box" >
+
+                <fragment
+                    android:id="@+id/settingsFragment"
+                    android:layout_width="fill_parent"
+                    android:layout_height="fill_parent"
+                    class="org.hedgewars.hedgeroid.SettingsFragment"
+                    tools:layout="@layout/fragment_settings" />
+            </FrameLayout>
+
+            <FrameLayout
+                android:id="@+id/teamsFrame"
+                android:layout_width="0dp"
+                android:layout_height="fill_parent"
+                android:layout_weight="1"
+                android:background="@drawable/box" >
+
+                <fragment
+                    android:id="@+id/teamsFragment"
+                    android:layout_width="fill_parent"
+                    android:layout_height="fill_parent"
+                    class="org.hedgewars.hedgeroid.TeamlistFragment"
+                    tools:layout="@layout/fragment_teamlist" />
+            </FrameLayout>
+        </LinearLayout>
+
+        <FrameLayout
+            android:id="@+id/playerFrame"
+            android:layout_width="200dp"
+            android:layout_height="fill_parent"
+            android:layout_above="@+id/startGame"
+            android:layout_alignParentRight="true"
+            android:layout_below="@id/upperFrame"
+            android:background="@drawable/box" >
+
+            <fragment
+                android:id="@+id/playerListFragment"
+                android:layout_width="fill_parent"
+                android:layout_height="fill_parent"
+                class="org.hedgewars.hedgeroid.RoomPlayerlistFragment"
+                tools:layout="@layout/fragment_playerlist" />
+        </FrameLayout>
+
+        <FrameLayout
+            android:layout_width="0dp"
+            android:layout_height="fill_parent"
+            android:layout_alignParentBottom="true"
+            android:layout_alignParentLeft="true"
+            android:layout_below="@id/upperFrame"
+            android:layout_marginRight="4dp"
+            android:layout_toLeftOf="@id/playerFrame"
+            android:background="@drawable/box" >
+
+            <fragment
+                android:id="@+id/chatFragment"
+                android:layout_width="fill_parent"
+                android:layout_height="fill_parent"
+                class="org.hedgewars.hedgeroid.ChatFragment"
+                tools:layout="@layout/fragment_chat" />
+        </FrameLayout>
+
+        <Button
+            android:id="@id/startGame"
+            android:layout_width="200dp"
+            android:layout_height="67dp"
+            android:layout_marginTop="4dp"
+            android:layout_alignParentBottom="true"
+            android:layout_alignParentRight="true"
+            android:background="@drawable/startgamebutton" />
+
+    </RelativeLayout>
+
+</FrameLayout>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/layout-large/fragment_roomlist.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent" >
+
+    <FrameLayout
+        android:id="@+id/listHeader"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content" >
+	    <include layout="@layout/listview_room_header" />
+    </FrameLayout>
+
+    <ListView
+        android:id="@id/android:list"
+        android:layout_width="fill_parent"
+        android:layout_height="0dp"
+        android:layout_alignParentBottom="true"
+        android:layout_below="@+id/listHeader"
+        android:cacheColorHint="@android:color/transparent"
+        android:drawSelectorOnTop="false"
+        tools:listitem="@layout/listview_room" />
+
+    <TextView
+        android:id="@id/android:empty"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_centerHorizontal="true"
+        android:layout_centerVertical="true"
+        android:text="@string/no_rooms_in_list" />
+
+</RelativeLayout>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/layout-large/listview_room.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+	android:layout_width="fill_parent"
+	android:layout_height="wrap_content" 
+	android:paddingTop="4dp"
+	android:paddingBottom="4dp">
+	
+<TextView
+    android:id="@+id/roomname"
+    android:layout_width="0dp"
+    android:layout_height="wrap_content"
+    android:layout_gravity="center_vertical"
+    android:layout_weight="1.5"
+    android:padding="3dp"
+    android:drawablePadding="5dp"
+    android:gravity="left|center_vertical"
+    android:singleLine="true"
+    android:textAppearance="?android:attr/textAppearanceMedium"/>
+
+<include layout="@layout/roomlist_player_team_count" />
+
+<TextView
+    android:id="@+id/owner"
+	android:layout_width="0dp"
+	android:layout_height="wrap_content"
+	android:layout_weight="0.5"
+	android:padding="3dp"
+	android:gravity="left"
+	android:layout_gravity="center_vertical"
+	android:singleLine="true"/>
+
+<TextView
+    android:id="@+id/map"
+	android:layout_width="0dp"
+	android:layout_height="wrap_content"
+	android:layout_weight="0.5"
+	android:padding="3dp"
+	android:gravity="left"
+	android:layout_gravity="center_vertical"
+	android:singleLine="true"/>
+
+<TextView
+    android:id="@+id/scheme"
+	android:layout_width="0dp"
+	android:layout_height="wrap_content"
+	android:layout_weight="0.5"
+	android:padding="3dp"
+	android:gravity="left"
+	android:layout_gravity="center_vertical"
+	android:singleLine="true"/>
+
+<TextView
+    android:id="@+id/weapons"
+	android:layout_width="0dp"
+	android:layout_height="wrap_content"
+	android:layout_weight="0.5"
+	android:padding="3dp"
+	android:gravity="left"
+	android:layout_gravity="center_vertical"
+	android:singleLine="true"/>
+
+</LinearLayout>
+    
+    
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/layout-xlarge/roomlist_player_team_count.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<merge xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools">
+    
+	<TextView
+	    android:id="@+id/playercount"
+		android:layout_width="20dp"
+		android:layout_height="wrap_content"
+		android:padding="3dp"
+		android:gravity="center" 
+		android:layout_gravity="center_vertical"
+		android:singleLine="true"/>
+	
+	<TextView
+	    android:id="@+id/teamcount"
+		android:layout_width="20dp"
+		android:layout_height="wrap_content"
+		android:padding="3dp"
+		android:gravity="center"
+		android:layout_gravity="center_vertical"
+		android:singleLine="true"/>
+</merge>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/layout-xlarge/roomlist_player_team_count_header.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<merge xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools">
+    
+	<TextView
+	    android:id="@+id/playercount"
+		android:layout_width="20dp"
+		android:layout_height="wrap_content"
+		android:padding="3dp"
+		android:gravity="center" 
+		android:singleLine="true"
+		android:textAppearance="?android:attr/textAppearanceMedium"
+		android:text="@string/roomlist_header_clients"/>
+	
+	<TextView
+	    android:id="@+id/teamcount"
+		android:layout_width="20dp"
+		android:layout_height="wrap_content"
+		android:padding="3dp"
+		android:gravity="center"
+		android:singleLine="true"
+		android:textAppearance="?android:attr/textAppearanceMedium"
+		android:text="@string/roomlist_header_teams" />
+</merge>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/layout/activity_lobby.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent" >
+
+    <include layout="@layout/background" />
+
+    <TabHost
+        android:id="@android:id/tabhost"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent" >
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:orientation="horizontal" >
+
+            <TabWidget
+                android:id="@android:id/tabs"
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:layout_weight="0" />
+
+            <FrameLayout
+                android:id="@android:id/tabcontent"
+                android:layout_width="0dip"
+                android:layout_height="match_parent"
+                android:layout_weight="1" >
+
+                <fragment
+                    android:id="@+id/roomListFragment"
+                    android:layout_width="fill_parent"
+                    android:layout_height="fill_parent"
+                    class="org.hedgewars.hedgeroid.RoomlistFragment"
+                    tools:layout="@layout/fragment_roomlist" />
+
+                <fragment
+                    android:id="@+id/chatFragment"
+                    android:layout_width="fill_parent"
+                    android:layout_height="fill_parent"
+                    class="org.hedgewars.hedgeroid.ChatFragment"
+                    tools:layout="@layout/fragment_chat" />
+
+                <fragment
+                    android:id="@+id/playerListFragment"
+                    android:layout_width="fill_parent"
+                    android:layout_height="fill_parent"
+                    class="org.hedgewars.hedgeroid.LobbyPlayerlistFragment"
+                    tools:layout="@layout/fragment_playerlist" />
+            </FrameLayout>
+        </LinearLayout>
+    </TabHost>
+
+</FrameLayout>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/layout/activity_localroom.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent" >
+
+    <include layout="@layout/background" />
+
+    <TabHost
+        android:id="@android:id/tabhost"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent" >
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:orientation="horizontal" >
+
+            <TabWidget
+                android:id="@android:id/tabs"
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:layout_weight="0" />
+
+            <FrameLayout
+                android:id="@android:id/tabcontent"
+                android:layout_width="0dip"
+                android:layout_height="match_parent"
+                android:layout_weight="1" >
+
+                <fragment
+                    android:id="@+id/mapFragment"
+                    android:layout_width="fill_parent"
+                    android:layout_height="fill_parent"
+                    class="org.hedgewars.hedgeroid.MapFragment"
+                    tools:layout="@layout/fragment_map" />
+
+                <fragment
+                    android:id="@+id/settingsFragment"
+                    android:layout_width="fill_parent"
+                    android:layout_height="fill_parent"
+                    class="org.hedgewars.hedgeroid.SettingsFragment"
+                    tools:layout="@layout/fragment_settings" />
+
+                
+                <LinearLayout
+                    android:id="@+id/teamlistContainer"
+                    android:layout_width="fill_parent"
+                    android:layout_height="fill_parent"
+                    android:orientation="vertical" >
+	                <fragment
+	                    android:id="@+id/teamlistFragment"
+	                    android:layout_width="fill_parent"
+	                    android:layout_height="0dp"
+	                    android:layout_weight="1"
+	                    class="org.hedgewars.hedgeroid.TeamlistFragment"
+	                    tools:layout="@layout/fragment_teamlist" />
+
+                    <Button
+                        android:id="@+id/startGame"
+                        android:layout_width="120dp"
+                        android:layout_height="40dp"
+                        android:layout_gravity="right"
+                        android:layout_marginTop="4dp"
+                        android:background="@drawable/startgamebutton" />
+                </LinearLayout>
+            </FrameLayout>
+        </LinearLayout>
+    </TabHost>
+
+</FrameLayout>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/layout/activity_main.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent" >
+
+    <include layout="@layout/background" />
+
+    <RelativeLayout
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent" >
+
+        <View
+            android:id="@+id/placeholder"
+            android:layout_width="0dp"
+            android:layout_height="0dp"
+            android:layout_centerInParent="true" />
+
+        <FrameLayout
+            android:id="@+id/frameLayout1"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentBottom="true"
+            android:layout_alignParentLeft="true"
+            android:layout_alignParentTop="true"
+            android:layout_toLeftOf="@id/placeholder" >
+
+            <Button
+                android:id="@+id/startGame"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:drawableTop="@drawable/button_local_play"
+                android:text="@string/main_button_localplay" />
+        </FrameLayout>
+
+        <FrameLayout
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentBottom="true"
+            android:layout_alignParentRight="true"
+            android:layout_alignParentTop="true"
+            android:layout_toRightOf="@id/placeholder" >
+
+            <Button
+                android:id="@+id/joinLobby"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:drawableTop="@drawable/button_network_play"
+                android:text="@string/main_button_netplay" />
+        </FrameLayout>
+    </RelativeLayout>
+
+</FrameLayout>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/layout/activity_netroom.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent" >
+
+    <include layout="@layout/background" />
+
+    <TabHost
+        android:id="@android:id/tabhost"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent" >
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:orientation="horizontal" >
+
+            <TabWidget
+                android:id="@android:id/tabs"
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:layout_weight="0" />
+
+            <FrameLayout
+                android:id="@android:id/tabcontent"
+                android:layout_width="0dip"
+                android:layout_height="match_parent"
+                android:layout_weight="1" >
+
+                <fragment
+                    android:id="@+id/mapFragment"
+                    android:layout_width="fill_parent"
+                    android:layout_height="fill_parent"
+                    class="org.hedgewars.hedgeroid.MapFragment"
+                    tools:layout="@layout/fragment_map" />
+
+                <fragment
+                    android:id="@+id/settingsFragment"
+                    android:layout_width="fill_parent"
+                    android:layout_height="fill_parent"
+                    class="org.hedgewars.hedgeroid.SettingsFragment"
+                    tools:layout="@layout/fragment_settings" />
+
+                <fragment
+                    android:id="@+id/teamlistFragment"
+                    android:layout_width="fill_parent"
+                    android:layout_height="fill_parent"
+                    class="org.hedgewars.hedgeroid.TeamlistFragment"
+                    tools:layout="@layout/fragment_teamlist" />
+
+                <fragment
+                    android:id="@+id/chatFragment"
+                    android:layout_width="fill_parent"
+                    android:layout_height="fill_parent"
+                    class="org.hedgewars.hedgeroid.ChatFragment"
+                    tools:layout="@layout/fragment_chat" />
+
+                <LinearLayout
+                    android:id="@+id/playerListContainer"
+                    android:layout_width="fill_parent"
+                    android:layout_height="fill_parent"
+                    android:orientation="vertical" >
+
+                    <fragment
+                        android:id="@+id/playerListFragment"
+                        android:layout_width="fill_parent"
+                        android:layout_height="0dp"
+                        android:layout_weight="1"
+                        class="org.hedgewars.hedgeroid.RoomPlayerlistFragment"
+                        tools:layout="@layout/fragment_playerlist" />
+
+                    <Button
+                        android:id="@+id/startGame"
+                        android:layout_width="120dp"
+                        android:layout_height="40dp"
+                        android:layout_gravity="right"
+                        android:layout_marginTop="4dp"
+                        android:background="@drawable/startgamebutton" />
+                </LinearLayout>
+            </FrameLayout>
+        </LinearLayout>
+    </TabHost>
+
+</FrameLayout>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/layout/activity_schemelist.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical" >
+
+    <ListView 
+        android:id="@android:id/list"
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:layout_weight="1" 
+        android:cacheColorHint="@android:color/transparent" />
+
+	<Button
+        android:id="@+id/addButton"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:text="@string/schemelist_add_button_text"
+        android:background="@drawable/button" />
+
+</LinearLayout>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/layout/activity_teamlist.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout
+  xmlns:android="http://schemas.android.com/apk/res/android"
+  android:layout_width="fill_parent"
+  android:layout_height="fill_parent">
+  
+  <include layout="@layout/background"/>
+
+  <TextView
+    android:id="@android:id/empty"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:gravity="center"
+    android:text="@string/teamlist_empty" />
+  
+  <ListView
+  	android:id="@android:id/list"
+  	android:layout_height="fill_parent"
+  	android:layout_width="wrap_content"
+  	android:layout_margin="3dp"
+  	android:background="@drawable/box" />
+
+  <ImageButton
+   	android:id="@+id/btnAdd"
+   	android:layout_width="wrap_content"
+   	android:layout_height="50dip"
+   	android:layout_alignParentBottom="true"
+   	android:layout_alignParentRight="true"
+   	android:adjustViewBounds="true"
+   	android:scaleType="centerInside"
+   	android:background="@android:color/transparent"
+   	android:src="@drawable/settings"
+   	android:contentDescription="@string/teamlist_add_content_description"/>
+
+</RelativeLayout>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/layout/activity_weaponsetlist.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical" >
+
+    <TextView
+        android:id="@android:id/empty"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:gravity="center"
+        android:text="@string/weaponsetlist_empty" />
+
+    <ListView
+        android:id="@android:id/list"
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:layout_weight="1"
+        android:cacheColorHint="@android:color/transparent" />
+
+    <Button
+        android:id="@+id/addButton"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@drawable/button"
+        android:text="@string/weaponsetlist_add_button_text" />
+
+</LinearLayout>
\ No newline at end of file
--- a/project_files/Android-build/SDL-android-project/res/layout/backbutton.xml	Sun Oct 28 13:28:23 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<merge xmlns:android="http://schemas.android.com/apk/res/android">
-    <ImageButton
-    	android:id="@+id/btnBack"
-    	android:layout_width="120dip"
-    	android:layout_height="40dip"
-    	android:layout_alignParentBottom="true"
-    	android:layout_alignParentLeft="true"
-    	android:adjustViewBounds="true"
-    	android:scaleType="centerInside"
-    	android:background="@android:color/transparent"
-    	android:src="@drawable/backbutton"/>
-</merge>
\ No newline at end of file
--- a/project_files/Android-build/SDL-android-project/res/layout/config.xml	Sun Oct 28 13:28:23 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent">
-    	
-    <ListView
-    	android:id="@+id/listView"
-    	android:layout_width="wrap_content"
-    	android:layout_height="fill_parent"/>
-    	
-</RelativeLayout>
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/layout/fragment_chat.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical" >
+
+    <ListView 
+        android:id="@+id/chatConsole"
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:layout_weight="1" 
+        android:clickable="false"
+        android:cacheColorHint="@android:color/transparent"
+        android:transcriptMode="normal"
+        android:focusableInTouchMode="false"
+        android:focusable="false"
+        android:longClickable="false"
+        android:stackFromBottom="true"
+        />
+
+	<EditText
+        android:id="@+id/chatInput"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:hint="@string/chat_hint"
+        android:imeOptions="actionSend"
+        android:inputType="text" />
+
+</LinearLayout>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/layout/fragment_map.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical"
+    android:paddingBottom="3dp"
+    android:paddingLeft="5dp"
+    android:paddingRight="3dp"
+    android:paddingTop="3dp" >
+
+    <ImageView
+        android:id="@+id/mapPreview"
+        android:layout_width="256dip"
+        android:layout_height="128dip"
+        android:layout_alignParentTop="true"
+        android:layout_centerHorizontal="true"
+        android:background="@drawable/box"
+        android:scaleType="fitCenter"
+        android:src="@drawable/roomlist_preparing" />
+
+    <TableLayout
+        android:id="@+id/gameOptions"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_below="@id/mapPreview"
+        android:stretchColumns="1" >
+
+        <TableRow android:layout_marginTop="5dip" >
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/map_gen" />
+
+            <Spinner
+                android:id="@+id/spinMapType"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft = "5dip"
+                android:background="@drawable/dropdown" />
+        </TableRow>
+
+        <TableRow
+            android:id="@+id/rowMapName"
+            android:layout_marginTop="5dip" >
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:text="@string/map_name" />
+
+            <Spinner
+                android:id="@+id/spinMapName"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft = "5dip"
+                android:background="@drawable/dropdown" />
+        </TableRow>
+
+        <TableRow
+            android:id="@+id/rowTemplateFilter"
+            android:layout_marginTop="5dip"
+            android:visibility="gone" >
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:text="@string/map_template" />
+
+            <Spinner
+                android:id="@+id/spinTemplateFilter"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft = "5dip"
+                android:background="@drawable/dropdown" />
+        </TableRow>
+
+        <TableRow
+            android:id="@+id/rowMazeSize"
+            android:layout_marginTop="5dip"
+            android:visibility="gone" >
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:text="@string/map_maze_size" />
+
+            <Spinner
+                android:id="@+id/spinMazeSize"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft = "5dip"
+                android:background="@drawable/dropdown" />
+        </TableRow>
+
+        <Button
+            android:id="@+id/btnEditDrawnMap"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="5dip"
+            android:background="@drawable/button"
+            android:enabled="false"
+            android:text="@string/map_button_editdrawnmap"
+            android:visibility="gone" />
+    </TableLayout>
+
+</RelativeLayout>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/layout/fragment_playerlist.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical" >
+
+    <ListView
+        android:id="@id/android:list"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:drawSelectorOnTop="false"
+        android:cacheColorHint="@android:color/transparent"
+        tools:listitem="@layout/listview_player" />
+
+    <TextView
+        android:id="@id/android:empty"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:gravity="center"
+        android:text="@string/no_players_in_list" />
+</FrameLayout>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/layout/fragment_roomlist.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical"
+    android:paddingLeft="8dp"
+    android:paddingRight="8dp" >
+
+    <ListView
+        android:id="@id/android:list"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:drawSelectorOnTop="false"
+        android:cacheColorHint="@android:color/transparent"
+        tools:listitem="@layout/listview_room" />
+
+    <TextView
+        android:id="@id/android:empty"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:text="@string/no_rooms_in_list" />
+
+</LinearLayout>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/layout/fragment_settings.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:orientation="vertical"
+    android:paddingBottom="3dp"
+    android:paddingLeft="5dp"
+    android:paddingRight="3dp"
+    android:paddingTop="3dp" >
+
+    <TableLayout
+        android:id="@+id/gameOptions"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:stretchColumns="1" >
+
+        <TableRow>
+
+            <TextView
+                android:id="@+id/txtGameplay"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/start_gameplay" />
+
+            <Spinner
+                android:id="@+id/spinGameplay"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="5dip"
+                android:background="@drawable/dropdown" />
+        </TableRow>
+
+        <TableRow android:layout_marginTop="5dip" >
+
+            <TextView
+                android:id="@+id/txtGamescheme"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/start_gamescheme" />
+
+            <Spinner
+                android:id="@+id/spinGamescheme"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="5dip"
+                android:background="@drawable/dropdown" />
+        </TableRow>
+
+        <TableRow android:layout_marginTop="5dip" >
+
+            <TextView
+                android:id="@+id/txtweapons"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/start_weapons" />
+
+            <Spinner
+                android:id="@+id/spinweapons"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="5dip"
+                android:background="@drawable/dropdown" />
+        </TableRow>
+    </TableLayout>
+
+    <ImageView
+        android:id="@+id/imgTheme"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignBottom="@+id/spinTheme"
+        android:layout_alignLeft="@id/gameOptions"
+        android:layout_alignTop="@id/spinTheme"
+        android:adjustViewBounds="true" />
+
+    <Spinner
+        android:id="@id/spinTheme"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentRight="true"
+        android:layout_below="@id/gameOptions"
+        android:layout_marginTop="5dip"
+        android:layout_toRightOf="@+id/imgTheme"
+        android:background="@drawable/dropdown" />
+
+</RelativeLayout>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/layout/fragment_teamlist.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical"
+    android:paddingBottom="3dp"
+    android:paddingLeft="5dp"
+    android:paddingRight="3dp"
+    android:paddingTop="3dp" >
+
+    <ListView
+        android:id="@android:id/list"
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:layout_weight="1"
+        android:cacheColorHint="@android:color/transparent" />
+
+    <TextView
+        android:id="@id/android:empty"
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:layout_weight="1"
+        android:gravity="center"
+        android:text="@string/no_teams_in_list" />
+    
+    <Button
+        android:id="@+id/addTeamButton"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@drawable/button"
+        android:text="@string/teamlist_addteam" />
+
+</LinearLayout>
\ No newline at end of file
--- a/project_files/Android-build/SDL-android-project/res/layout/listview_item.xml	Sun Oct 28 13:28:23 2012 +0100
+++ b/project_files/Android-build/SDL-android-project/res/layout/listview_item.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <TextView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@android:id/text1"
 	android:layout_width="fill_parent"
 	android:layout_height="wrap_content"
 	android:textSize="10dip"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/layout/listview_player.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@android:id/text1"
+    android:layout_width="fill_parent"
+    android:layout_height="wrap_content"
+    android:paddingTop="4dp"
+	android:paddingBottom="4dp"
+    android:drawablePadding="5dp"
+    android:drawableLeft="@drawable/playerlist_player"
+    android:gravity="center_vertical|left"
+    android:singleLine="true"
+    android:textAppearance="?android:attr/textAppearanceMedium" />
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/layout/listview_room.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<TwoLineListItem xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="fill_parent"
+    android:layout_height="wrap_content"
+    android:mode="twoLine"
+    android:paddingTop="4dp"
+	android:paddingBottom="4dp">
+
+    <TextView
+        android:id="@android:id/text1"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:drawablePadding="5dp"
+        android:textAppearance="?android:attr/textAppearanceMedium" />
+
+    <TextView
+        android:id="@android:id/text2"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:layout_alignLeft="@android:id/text1"
+        android:layout_below="@android:id/text1"
+        android:textAppearance="?android:attr/textAppearanceSmall" />
+
+</TwoLineListItem>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/layout/listview_room_header.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+	android:layout_width="fill_parent"
+	android:layout_height="wrap_content" >
+	
+<TextView
+    android:id="@+id/roomname"
+    android:layout_width="0dp"
+    android:layout_height="wrap_content"
+    android:layout_gravity="center_vertical"
+    android:layout_weight="1.5"
+    android:padding="3dp"
+    android:gravity="center"
+    android:singleLine="true"
+    android:textAppearance="?android:attr/textAppearanceMedium"
+    android:text="@string/roomlist_header_roomname" />
+
+<include layout="@layout/roomlist_player_team_count_header" />
+
+<TextView
+    android:id="@+id/owner"
+	android:layout_width="0dp"
+	android:layout_height="wrap_content"
+	android:layout_weight="0.5"
+	android:padding="3dp"
+	android:gravity="center"
+	android:singleLine="true"
+	android:textAppearance="?android:attr/textAppearanceMedium"
+	android:text="@string/roomlist_header_owner" />
+
+<TextView
+    android:id="@+id/map"
+	android:layout_width="0dp"
+	android:layout_height="wrap_content"
+	android:layout_weight="0.5"
+	android:padding="3dp"
+	android:gravity="center"
+	android:singleLine="true"
+	android:textAppearance="?android:attr/textAppearanceMedium"
+	android:text="@string/roomlist_header_map" />
+
+<TextView
+    android:id="@+id/scheme"
+	android:layout_width="0dp"
+	android:layout_height="wrap_content"
+	android:layout_weight="0.5"
+	android:padding="3dp"
+	android:gravity="center"
+	android:singleLine="true"
+	android:textAppearance="?android:attr/textAppearanceMedium"
+	android:text="@string/roomlist_header_scheme" />
+
+<TextView
+    android:id="@+id/weapons"
+	android:layout_width="0dp"
+	android:layout_height="wrap_content"
+	android:layout_weight="0.5"
+	android:padding="3dp"
+	android:gravity="center"
+	android:singleLine="true"
+	android:textAppearance="?android:attr/textAppearanceMedium"
+	android:text="@string/roomlist_header_weapons" />
+
+</LinearLayout>
+    
+    
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/layout/listview_team.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="fill_parent"
+    android:layout_height="wrap_content"
+    android:paddingTop="4dp"
+	android:paddingBottom="4dp" >
+    <TextView
+        android:id="@android:id/text1"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center_vertical|left"
+        android:layout_weight="1"
+        android:gravity="center_vertical"
+        android:drawablePadding="5dp"
+        android:textAppearance="?android:attr/textAppearanceMedium" />
+
+    <ImageButton
+        android:id="@+id/colorButton"
+        android:layout_width="48dp"
+        android:layout_height="48dp"
+        android:layout_gravity="center_vertical|right"
+        android:src="#fff"
+        android:padding="8dp"
+        android:contentDescription="@string/teamlist_color_button_description" />
+    
+    <ImageButton
+        android:id="@+id/hogCountButton"
+        android:layout_width="48dp"
+        android:layout_height="48dp"
+        android:layout_gravity="center_vertical|right"
+        android:src="@drawable/hogcount"
+        android:scaleType="centerCrop"
+        android:padding="0dp"
+        android:contentDescription="@string/teamlist_hogcount_button_description" />
+</LinearLayout>
\ No newline at end of file
--- a/project_files/Android-build/SDL-android-project/res/layout/main.xml	Sun Oct 28 13:28:23 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<FrameLayout
-	xmlns:android="http://schemas.android.com/apk/res/android"
-  	android:layout_width="fill_parent"
-	android:layout_height="fill_parent">
-	<include layout="@layout/background"/>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="vertical"
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent"
-    >    
-    <Button
-    	android:id="@+id/downloader"
-    	android:layout_width="wrap_content"
-    	android:layout_height="wrap_content"
-    	android:text="downloader"/>
-    	
-    <Button
-    	android:id="@+id/startGame"
-    	android:layout_width="wrap_content"
-    	android:layout_height="wrap_content"
-    	android:text="startgame"/>
-    	
-</LinearLayout>
-</FrameLayout>
\ No newline at end of file
--- a/project_files/Android-build/SDL-android-project/res/layout/savebutton.xml	Sun Oct 28 13:28:23 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<merge xmlns:android="http://schemas.android.com/apk/res/android">
-    <ImageButton
-    	android:id="@+id/btnSave"
-    	android:layout_width="120dip"
-    	android:layout_height="40dip"
-    	android:layout_alignParentBottom="true"
-    	android:layout_alignParentRight="true"
-    	android:adjustViewBounds="true"
-    	android:scaleType="centerInside"
-    	android:background="@android:color/transparent"
-    	android:src="@drawable/savebutton"/>
-</merge>
\ No newline at end of file
--- a/project_files/Android-build/SDL-android-project/res/layout/starting_game.xml	Sun Oct 28 13:28:23 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,166 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent">
-    <include
-    	layout="@layout/background"/>
-     
-    <ImageView
-    	android:id="@+id/mapPreview"
-    	android:layout_width="256dip"
-    	android:layout_height="128dip"
-    	android:layout_margin="5dip"
-    	android:scaleType="fitXY"
-    	android:background="@drawable/box"
-    	android:src="@drawable/backbutton"/>
-    
-    <Spinner 
-       	android:id="@+id/spinMaps"
-       	android:layout_height="wrap_content"
-       	android:layout_width="wrap_content"    
-       	android:layout_below="@id/mapPreview"
-       	android:layout_alignRight="@id/mapPreview"
-       	android:layout_toRightOf="@+id/txtMap"
-       	android:background="@drawable/dropdown"/>
-    <TextView
-		android:id="@id/txtMap"
-		android:layout_width="wrap_content"
-		android:layout_height="wrap_content"
-		android:text="@string/start_map"
-		android:layout_alignTop="@id/spinMaps"
-		android:layout_alignBottom="@id/spinMaps"
-		android:layout_alignLeft="@id/mapPreview"
-		android:gravity="center"/>	
-   	
-    <TableLayout 
-       	android:id="@+id/gameOptions" 
-       	android:layout_height="wrap_content" 
-       	android:layout_width="wrap_content"
-       	android:layout_centerHorizontal="true"
-       	android:layout_toRightOf="@id/mapPreview" 
-       	android:layout_alignParentRight="true"
-       	android:padding="3dip"
-       	android:layout_margin="5dip"
-       	android:background="@drawable/box"
-       	android:stretchColumns="0,2"
-       	android:shrinkColumns="1">
-	       	
-       	<TableRow>
-        	 <TextView 
-		        android:id="@+id/txtGameplay"
-		        android:layout_height="wrap_content"
-		        android:layout_width="wrap_content"
-		        android:text="@string/start_gameplay"/>
-        	<Spinner
-	        	android:id="@+id/spinGameplay"
-	        	android:layout_height="wrap_content"
-		        android:layout_width="wrap_content"
-		        android:background="@drawable/dropdown"
-		        />
-		</TableRow>  
-		<TableRow>
-		    <TextView 
-		        android:id="@+id/txtGamescheme"
-		        android:layout_height="wrap_content"
-		        android:layout_width="wrap_content"
-		        android:text="@string/start_gamescheme"/>
-		    <Spinner
-		       	android:id="@+id/spinGamescheme"
-		       	android:layout_height="wrap_content"
-		        android:layout_width="wrap_content"
-		        android:background="@drawable/dropdown"/>
-		    <ImageButton
-		    	android:id="@+id/btnGamescheme"
-		    	android:layout_height="wrap_content"
-		        android:layout_width="wrap_content"
-		        android:background="@drawable/edit"
-		        android:adjustViewBounds="true"
-		        android:scaleType="centerInside"
-		        android:layout_gravity="center"
-		        android:padding="3dip"/>
-		 </TableRow>
-		 <TableRow>    
-		     <TextView 
-		        android:id="@+id/txtweapons"
-		        android:layout_height="wrap_content"
-		        android:layout_width="wrap_content"
-		        android:layout_below="@id/txtGamescheme"
-		        android:layout_marginTop="5dip"
-		        android:text="@string/start_weapons"/>
-	        
-	        <Spinner
-	        	android:id="@+id/spinweapons"
-	        	android:layout_height="wrap_content"
-		        android:layout_width="wrap_content"
-		        android:background="@drawable/dropdown"/>
-		    
-		    <ImageButton
-		    	android:id="@+id/btnweapons"
-		    	android:layout_height="wrap_content"
-		        android:layout_width="wrap_content"
-		        android:background="@drawable/edit"
-		        android:adjustViewBounds="true"
-		        android:scaleType="centerInside"
-		        android:layout_gravity="center"
-		        android:padding="3dip"/>
-        </TableRow>	
-    </TableLayout>
-        
-    <ImageView 
-       	android:id="@+id/imgTheme"
-       	android:layout_height="wrap_content" 
-       	android:layout_width="wrap_content"
-       	android:layout_alignTop="@+id/spinTheme"
-       	android:layout_alignBottom="@id/spinTheme"
-       	android:layout_alignLeft="@id/gameOptions"
-       	android:adjustViewBounds="true"/>
-       
-    <Spinner
-        android:id="@id/spinTheme"
-        android:layout_height="wrap_content"
-        android:layout_width="wrap_content" 
-        android:layout_toRightOf="@+id/imgTheme"
-        android:layout_alignParentRight="true"
-       	android:layout_below="@id/gameOptions"
-       	android:background="@drawable/dropdown"/>
-        
-	<include layout="@layout/backbutton"/>
-    
-    <LinearLayout
-    	android:layout_width="wrap_content"
-    	android:layout_height="wrap_content"
-    	android:layout_alignParentBottom="true"
-    	android:layout_centerHorizontal="true"
-    	android:orientation="horizontal">
-    <ImageButton
-    	android:id="@+id/btnTeams"
-    	android:layout_width="120dip"
-    	android:layout_height="40dip"
-    	android:adjustViewBounds="true"
-    	android:scaleType="centerInside"
-    	android:background="@android:color/transparent"
-    	android:src="@drawable/teams"/>
-    <ImageView
-    	android:id="@+id/imgTeamsCount"
-    	android:layout_width="40dip"
-    	android:layout_height="40dip"
-    	android:adjustViewBounds="true"
-    	android:scaleType="centerInside"
-    	android:background="@android:color/transparent"
-    	android:src="@drawable/teamcount"/>
-        
-    </LinearLayout>
-
-    <ImageButton
-    	android:id="@+id/btnStart"
-    	android:layout_width="120dip"
-    	android:layout_height="40dip"
-    	android:layout_alignParentBottom="true"
-    	android:layout_alignParentRight="true"
-    	android:adjustViewBounds="true"
-    	android:scaleType="centerInside"
-    	android:background="@android:color/transparent"
-    	android:src="@drawable/startgamebutton"/>
-
-</RelativeLayout>
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/layout/tab_indicator_vertical.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,23 @@
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="fill_parent"
+    android:layout_height="0dp"
+    android:layout_weight="1"
+    android:orientation="vertical"
+    android:background="@drawable/box">
+
+    <ImageView android:id="@+id/icon"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_centerHorizontal="true"
+    />
+
+    <TextView android:id="@+id/title"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:scrollHorizontally="false"
+        android:padding="4dp"
+        android:layout_alignParentBottom="true"
+        android:layout_centerHorizontal="true"
+        style="?android:attr/tabWidgetStyle"
+    />
+</RelativeLayout>
--- a/project_files/Android-build/SDL-android-project/res/layout/team_creation.xml	Sun Oct 28 13:28:23 2012 +0100
+++ b/project_files/Android-build/SDL-android-project/res/layout/team_creation.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -15,8 +15,6 @@
 	  	android:layout_width="fill_parent"
 	  	android:layout_height="fill_parent"
 	  	android:layout_weight="1">
-	  	<include layout="@layout/backbutton"/>
-	  	<include layout="@layout/savebutton"/>
 	  	<ScrollView
 		  	android:layout_width="fill_parent"
 		  	android:layout_height="fill_parent"
--- a/project_files/Android-build/SDL-android-project/res/layout/team_selection_dialog.xml	Sun Oct 28 13:28:23 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout
-  xmlns:android="http://schemas.android.com/apk/res/android"
-  android:orientation="vertical"
-  android:layout_width="wrap_content"
-  android:layout_height="wrap_content">
-  <TextView
-  	android:id="@+id/team_selection_dialog_select"
-  	android:layout_width="wrap_content"
-  	android:layout_height="wrap_content"
-  	android:text="@string/select"/>
-  <TextView
-  	android:id="@+id/team_selection_dialog_edit"
-  	android:layout_width="wrap_content"
-  	android:layout_height="wrap_content"
-  	android:text="@string/edit"/>
-  <TextView
-  	android:id="@+id/team_selection_dialog_delete"
-  	android:layout_width="wrap_content"
-  	android:layout_height="wrap_content"
-  	android:text="@string/delete"/>
-</LinearLayout>
--- a/project_files/Android-build/SDL-android-project/res/layout/team_selection_entry.xml	Sun Oct 28 13:28:23 2012 +0100
+++ b/project_files/Android-build/SDL-android-project/res/layout/team_selection_entry.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -31,7 +31,7 @@
   	android:layout_alignBottom="@id/imgDifficulty"
   	android:adjustViewBounds="true"
   	android:scaleType="centerInside"
-  	android:src="@drawable/teamcount7"/>
+  	android:src="@drawable/hogcount"/>
   <TextView
   	android:id="@+id/txtName"
   	android:layout_height="fill_parent"
--- a/project_files/Android-build/SDL-android-project/res/layout/team_selector.xml	Sun Oct 28 13:28:23 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout
-  xmlns:android="http://schemas.android.com/apk/res/android"
-  android:layout_width="fill_parent"
-  android:layout_height="fill_parent">
-  
-  <include layout="@layout/background"/>
- 
-  <include layout="@layout/backbutton"/>
-
-  <ImageButton
-   	android:id="@+id/btnAdd"
-   	android:layout_width="wrap_content"
-   	android:layout_height="50dip"
-   	android:layout_alignParentBottom="true"
-   	android:layout_alignParentRight="true"
-   	android:adjustViewBounds="true"
-   	android:scaleType="centerInside"
-   	android:background="@android:color/transparent"
-   	android:src="@drawable/settings"/>
- <TextView
-  	android:id="@+id/txtInfo"
-  	android:layout_height="wrap_content"
-  	android:layout_width="fill_parent"
-  	android:layout_alignParentBottom="true"
-  	android:layout_toRightOf="@id/btnBack"
-  	android:layout_toLeftOf="@id/btnAdd"
-  	android:layout_alignTop="@id/btnBack"
-  	android:layout_margin="3dp"
-  	android:gravity="center"
-  	android:background="@drawable/box"/>
-  	
-  
-
-  <LinearLayout
-  	android:orientation="horizontal"
-  	android:layout_width="fill_parent"
-  	android:layout_height="fill_parent"
-  	android:layout_above="@id/txtInfo"
-  	android:layout_margin="3dp">
-  	
-	  <ListView
-	  	android:id="@+id/selectedTeams"
-	  	android:layout_height="fill_parent"
-	  	android:layout_width="wrap_content"
-	  	android:layout_margin="3dp"
-	  	android:background="@drawable/box"
-	  	android:layout_weight="1"/>
-	  	
-	  <ListView
-	  	android:id="@+id/availableTeams"
-	  	android:layout_height="fill_parent"
-	  	android:layout_width="wrap_content"
-	  	android:layout_margin="3dp"
-	  	android:background="@drawable/box"
-	  	android:layout_weight="1"/>
-  </LinearLayout>
-</RelativeLayout>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/menu/lobby_options.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,10 @@
+<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+    <item
+        android:id="@+id/room_create"
+        android:title="@string/lobby_roomlistmenu_create"
+        android:showAsAction="ifRoom" />
+    <item
+        android:id="@+id/disconnect"
+        android:title="@string/lobby_menu_disconnect"
+        android:showAsAction="ifRoom" />
+</menu>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/menu/lobby_playerlist_context.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,10 @@
+<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+    <item
+        android:id="@+id/player_info"
+        android:title="@string/lobby_playerlist_contextmenu_info">
+    </item>
+    <item
+        android:id="@+id/player_follow"
+        android:title="@string/lobby_playerlist_contextmenu_follow">
+    </item>
+</menu>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/menu/main_options.xml	Sun Oct 28 15:12:37 2012 +0100
@@ -0,0 +1,20 @@
+<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+    <item
+        android:id="@+id/download"
+        android:title="@string/main_menu_downloader"
+        android:icon="@android:drawable/ic_menu_save"
+        android:showAsAction="ifRoom|withText" />
+    <item
+        android:id="@+id/preferences"
+        android:title="@string/main_menu_preferences"
+        android:icon="@android:drawable/ic_menu_preferences"
+        android:showAsAction="ifRoom|withText" />
+    <item
+        android:id="@+id/edit_teams"
+        android:title="@string/edit_teams_menu"
+        android:showAsAction="ifRoom|withText" />
+    <item
+        android:id="@+id/edit_weaponsets"
+        android:title="@string/edit_weaponsets_menu"
+        android:sho