Browse Source

Merge remote-tracking branch 'refs/remotes/GarageGames/development' into development

chaigler 9 years ago
parent
commit
a1cc0a1ee1

+ 1 - 0
.gitignore

@@ -5,6 +5,7 @@
 .LSOverride
 /tmp/*
 /preferences.cs
+/engine/**/preferences.cs
 *.dso
 *.edso
 *.user

+ 19 - 0
LICENSE.md

@@ -0,0 +1,19 @@
+Copyright (c) 2012 GarageGames, LLC
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.

+ 21 - 0
README.md

@@ -51,3 +51,24 @@ Don't go it alone! Join the active community around Torque 2D at GarageGames.com
 * [Torque 2D Beginner Forum](http://www.garagegames.com/community/forums/84)
 * [Torque 2D Professional Forum](http://www.garagegames.com/community/forums/85)
 * [GarageGames Community Blogs](http://www.garagegames.com/community/blogs)
+
+# License
+Copyright (c) 2012 GarageGames, LLC
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.

+ 25 - 0
engine/compilers/VisualStudio 2013/main.cs

@@ -0,0 +1,25 @@
+//-----------------------------------------------------------------------------
+// Copyright (c) 2013 GarageGames, LLC
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to
+// deal in the Software without restriction, including without limitation the
+// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+// sell copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+// IN THE SOFTWARE.
+//-----------------------------------------------------------------------------
+
+// This file simply points to the real main.cs file in the root of the working directory.
+// This is needed if the project is run in debug mode from within VisualStudio.
+exec("../../../main.cs");

+ 25 - 0
engine/compilers/VisualStudio 2015/main.cs

@@ -0,0 +1,25 @@
+//-----------------------------------------------------------------------------
+// Copyright (c) 2013 GarageGames, LLC
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to
+// deal in the Software without restriction, including without limitation the
+// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+// sell copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+// IN THE SOFTWARE.
+//-----------------------------------------------------------------------------
+
+// This file simply points to the real main.cs file in the root of the working directory.
+// This is needed if the project is run in debug mode from within VisualStudio.
+exec("../../../main.cs");

+ 2 - 2
engine/source/2d/scene/WorldQuery.cc

@@ -719,8 +719,8 @@ bool WorldQuery::QueryCallback( S32 proxyId )
     if ( mQueryFilter.mEnabledFilter && !pSceneObject->isEnabled() )
         return true;
 
-    // Visible filter.
-    if ( mQueryFilter.mVisibleFilter && !pSceneObject->getVisible() )
+    // Visible filter.  If an object has a size x or y value of zero then they are treated here as invisible.
+    if (mQueryFilter.mVisibleFilter && (!pSceneObject->getVisible() || pSceneObject->getSize().isXZero() || pSceneObject->getSize().isYZero()))
         return true;
 
     // Picking allowed filter.

+ 4 - 4
engine/source/audio/audio.cc

@@ -2474,7 +2474,7 @@ bool OpenALInit()
       return false;
 
    // Create an openAL context
-#ifdef TORQUE_OS_LINUX
+#if defined(TORQUE_OS_LINUX) || defined(TORQUE_OS_OPENBSD)
    int freq = Con::getIntVariable("Pref::Unix::OpenALFrequency");
    if (freq == 0)
       freq = 22050;
@@ -2504,7 +2504,7 @@ bool OpenALInit()
       return false;
 
    // Make this context the active context
-#if defined(TORQUE_OS_ANDROID) || defined(TORQUE_OS_LINUX) || defined(TORQUE_OS_EMSCRIPTEN)
+#if defined(TORQUE_OS_ANDROID) || defined(TORQUE_OS_LINUX) || defined(TORQUE_OS_EMSCRIPTEN) || defined(TORQUE_OS_OPENBSD)
    alcMakeContextCurrent((ALCcontext*)mContext);
 #else
    alcMakeContextCurrent(mContext);
@@ -2590,7 +2590,7 @@ void OpenALShutdown()
 
    if (mContext)
    {
-#if defined(TORQUE_OS_ANDROID) || defined(TORQUE_OS_LINUX)
+#if defined(TORQUE_OS_ANDROID) || defined(TORQUE_OS_LINUX) || defined(TORQUE_OS_OPENBSD)
 	   alcDestroyContext((ALCcontext*)mContext);
 #elif defined(TORQUE_OS_EMSCRIPTEN)
       alcDestroyContext((ALCcontext*)mContext);
@@ -2602,7 +2602,7 @@ void OpenALShutdown()
    }
    if (mDevice)
    {
-#if defined(TORQUE_OS_ANDROID) || defined(TORQUE_OS_LINUX)
+#if defined(TORQUE_OS_ANDROID) || defined(TORQUE_OS_LINUX) || defined(TORQUE_OS_OPENBSD)
 	   alcCloseDevice((ALCdevice*)mDevice);
 #elif defined(TORQUE_OS_EMSCRIPTEN)
       alcCloseDevice((ALCdevice*)mDevice);

+ 1 - 1
engine/source/platform/platformAL.h

@@ -35,7 +35,7 @@
 //Android uses openal soft from https://github.com/AerialX/openal-soft-android
 #include <AL/al.h>
 #include <AL/alc.h>
-#elif defined(TORQUE_OS_LINUX)
+#elif defined(TORQUE_OS_LINUX) || defined(TORQUE_OS_OPENBSD)
 #include <AL/al.h>
 #include <AL/alc.h>
 #include "platform/eaxtypes.h"

+ 1 - 1
engine/source/platform/platformFileIO.h

@@ -26,7 +26,7 @@
 #include "platform/platform.h"
 #endif
 
-#ifdef TORQUE_OS_LINUX
+#if defined(TORQUE_OS_LINUX) || defined(TORQUE_OS_OPENBSD)
 // Need to remove this once Xlib stops leaking
 #undef Status
 #endif

+ 6 - 6
engine/source/platformX86UNIX/x86UNIXCPUInfo.cc

@@ -39,7 +39,7 @@ void detectX86CPUInfo(char *vendor, U32 *processor, U32 *properties);
 }
 
 /* used in the asm */
-static U32 time[2];
+static U32 Ttime[2];
 static U32 clockticks = 0;
 static char vendor[13] = {0,};
 static U32 properties = 0;
@@ -59,7 +59,7 @@ void Processor::init()
    PlatformSystemInfo.processor.mhz  = 0;
    PlatformSystemInfo.processor.properties = CPU_PROP_C;
 
-   clockticks = properties = processor = time[0] = 0;
+   clockticks = properties = processor = Ttime[0] = 0;
    dStrcpy(vendor, "");
 
    detectX86CPUInfo(vendor, &processor, &properties);
@@ -82,8 +82,8 @@ void Processor::init()
          "pushl  %eax\n"
          "pushl  %edx\n"
          "rdtsc\n"
-         "movl   %eax, (time)\n"
-         "movl   %edx, (time+4)\n"
+         "movl   %eax, (Ttime)\n"
+         "movl   %edx, (Ttime+4)\n"
          "popl   %edx\n"
          "popl   %eax\n"
          );
@@ -102,8 +102,8 @@ void Processor::init()
          "pushl  %eax\n"
          "pushl  %edx\n"
          "rdtsc\n"
-         "sub    (time+4), %edx\n"
-         "sbb    (time), %eax\n"
+         "sub    (Ttime+4), %edx\n"
+         "sbb    (Ttime), %eax\n"
          "mov    %eax, (clockticks)\n"
          "popl   %edx\n"
          "popl   %eax\n"

+ 1 - 1
engine/source/platformX86UNIX/x86UNIXProcessControl.cc

@@ -145,7 +145,7 @@ void ProcessControlInit()
 
    // we're not interested in the exit status of child processes, so this 
    // prevents zombies from accumulating.
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__OpenBSD__)
    signal(SIGCHLD, SIG_IGN);
 #else
    signal(SIGCLD, SIG_IGN);

+ 2 - 2
main.cs

@@ -54,7 +54,7 @@ AssetDatabase.EchoInfo = false;
 AssetDatabase.IgnoreAutoUnload = true;
 
 // Scan modules.
-ModuleDatabase.scanModules( "modules" );
+ModuleDatabase.scanModules( "./modules" );
 
 // Load AppCore module.
 ModuleDatabase.LoadExplicit( "AppCore" );
@@ -75,4 +75,4 @@ function androidBackButton(%val)
 		quit();
 	}
 
-}
+}