diff --git a/Engine/lib/squish/ChangeLog b/Engine/lib/squish/ChangeLog deleted file mode 100644 index ba03f4c57..000000000 --- a/Engine/lib/squish/ChangeLog +++ /dev/null @@ -1,52 +0,0 @@ -1.10 -* Iterative cluster fit is now considered to be a new compression mode -* The core cluster fit is now 4x faster using contributions by Ignacio -Castano from NVIDIA -* The single colour lookup table has been halved by exploiting symmetry - -1.9 -* Added contributed SSE1 truncate implementation -* Changed use of SQUISH_USE_SSE to be 1 for SSE and 2 for SSE2 instructions -* Cluster fit is now iterative to further reduce image error - -1.8 -* Switched from using floor to trunc for much better SSE performance (again) -* Xcode build now expects libpng in /usr/local for extra/squishpng - -1.7 -* Fixed floating-point equality issue in clusterfit sort (x86 affected only) -* Implemented proper SSE(2) floor function for 50% speedup on SSE builds -* The range fit implementation now uses the correct colour metric - -1.6 -* Fixed bug in CompressImage where masked pixels were not skipped over -* DXT3 and DXT5 alpha compression now properly use the mask to ignore pixels -* Fixed major DXT1 bug that can generate unexpected transparent pixels - -1.5 -* Added CompressMasked function to handle incomplete DXT blocks more cleanly -* Added kWeightColourByAlpha flag for better quality images when alpha blending - -1.4 -* Fixed stack overflow in rangefit - -1.3 -* Worked around SSE floor implementation bug, proper fix needed! -* This release has visual studio and makefile builds that work - -1.2 -* Added provably optimal single colour compressor -* Added extra/squishgen.cpp that generates single colour lookup tables - -1.1 -* Fixed a DXT1 colour output bug -* Changed argument order for Decompress function to match Compress -* Added GetStorageRequirements function -* Added CompressImage function -* Added DecompressImage function -* Moved squishtool.cpp to extra/squishpng.cpp -* Added extra/squishtest.cpp - -1.0 -* Initial release - diff --git a/Engine/lib/squish/LICENSE b/Engine/lib/squish/LICENSE new file mode 100644 index 000000000..ed1c78d93 --- /dev/null +++ b/Engine/lib/squish/LICENSE @@ -0,0 +1,20 @@ + Copyright (c) 2006 Simon Brown si@sjbrown.co.uk + + 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. diff --git a/Engine/lib/squish/alpha.cpp b/Engine/lib/squish/alpha.cpp index 2d77b6ba4..0f94e2147 100644 --- a/Engine/lib/squish/alpha.cpp +++ b/Engine/lib/squish/alpha.cpp @@ -24,8 +24,9 @@ -------------------------------------------------------------------------- */ #include "alpha.h" + +#include #include -#include namespace squish { diff --git a/Engine/lib/squish/alpha.h b/Engine/lib/squish/alpha.h index 573605255..e5e7f320a 100644 --- a/Engine/lib/squish/alpha.h +++ b/Engine/lib/squish/alpha.h @@ -26,7 +26,7 @@ #ifndef SQUISH_ALPHA_H #define SQUISH_ALPHA_H -#include +#include "squish.h" namespace squish { diff --git a/Engine/lib/squish/clusterfit.cpp b/Engine/lib/squish/clusterfit.cpp index afea84880..96704460e 100644 --- a/Engine/lib/squish/clusterfit.cpp +++ b/Engine/lib/squish/clusterfit.cpp @@ -31,22 +31,21 @@ namespace squish { -ClusterFit::ClusterFit( ColourSet const* colours, int flags ) +ClusterFit::ClusterFit( ColourSet const* colours, int flags, float* metric ) : ColourFit( colours, flags ) { // set the iteration count m_iterationCount = ( m_flags & kColourIterativeClusterFit ) ? kMaxIterations : 1; - // initialise the best error - m_besterror = VEC4_CONST( FLT_MAX ); - - // initialise the metric - bool perceptual = ( ( m_flags & kColourMetricPerceptual ) != 0 ); - if( perceptual ) - m_metric = Vec4( 0.2126f, 0.7152f, 0.0722f, 0.0f ); + // initialise the metric (old perceptual = 0.2126f, 0.7152f, 0.0722f) + if( metric ) + m_metric = Vec4( metric[0], metric[1], metric[2], 1.0f ); else m_metric = VEC4_CONST( 1.0f ); + // initialise the best error + m_besterror = VEC4_CONST( FLT_MAX ); + // cache some values int const count = m_colours->GetCount(); Vec3 const* values = m_colours->GetPoints(); diff --git a/Engine/lib/squish/clusterfit.h b/Engine/lib/squish/clusterfit.h index 17db5d387..c882469c8 100644 --- a/Engine/lib/squish/clusterfit.h +++ b/Engine/lib/squish/clusterfit.h @@ -27,7 +27,7 @@ #ifndef SQUISH_CLUSTERFIT_H #define SQUISH_CLUSTERFIT_H -#include +#include "squish.h" #include "maths.h" #include "simd.h" #include "colourfit.h" @@ -37,7 +37,7 @@ namespace squish { class ClusterFit : public ColourFit { public: - ClusterFit( ColourSet const* colours, int flags ); + ClusterFit( ColourSet const* colours, int flags, float* metric ); private: bool ConstructOrdering( Vec3 const& axis, int iteration ); diff --git a/Engine/lib/squish/colourblock.h b/Engine/lib/squish/colourblock.h index df0a47217..2562561d7 100644 --- a/Engine/lib/squish/colourblock.h +++ b/Engine/lib/squish/colourblock.h @@ -26,7 +26,7 @@ #ifndef SQUISH_COLOURBLOCK_H #define SQUISH_COLOURBLOCK_H -#include +#include "squish.h" #include "maths.h" namespace squish { diff --git a/Engine/lib/squish/colourfit.cpp b/Engine/lib/squish/colourfit.cpp index dba2b87e8..11efa4674 100644 --- a/Engine/lib/squish/colourfit.cpp +++ b/Engine/lib/squish/colourfit.cpp @@ -34,6 +34,10 @@ ColourFit::ColourFit( ColourSet const* colours, int flags ) { } +ColourFit::~ColourFit() +{ +} + void ColourFit::Compress( void* block ) { bool isDxt1 = ( ( m_flags & kDxt1 ) != 0 ); diff --git a/Engine/lib/squish/colourfit.h b/Engine/lib/squish/colourfit.h index a2d0559a3..759322329 100644 --- a/Engine/lib/squish/colourfit.h +++ b/Engine/lib/squish/colourfit.h @@ -26,9 +26,11 @@ #ifndef SQUISH_COLOURFIT_H #define SQUISH_COLOURFIT_H -#include +#include "squish.h" #include "maths.h" +#include + namespace squish { class ColourSet; @@ -37,6 +39,7 @@ class ColourFit { public: ColourFit( ColourSet const* colours, int flags ); + virtual ~ColourFit(); void Compress( void* block ); diff --git a/Engine/lib/squish/colourset.h b/Engine/lib/squish/colourset.h index dcf56ae28..0c66fe440 100644 --- a/Engine/lib/squish/colourset.h +++ b/Engine/lib/squish/colourset.h @@ -26,7 +26,7 @@ #ifndef SQUISH_COLOURSET_H #define SQUISH_COLOURSET_H -#include +#include "squish.h" #include "maths.h" namespace squish { diff --git a/Engine/lib/squish/config.h b/Engine/lib/squish/config.h index 8427407d4..2fad5576a 100644 --- a/Engine/lib/squish/config.h +++ b/Engine/lib/squish/config.h @@ -36,7 +36,7 @@ #define SQUISH_USE_SSE 0 #endif -// Internally et SQUISH_USE_SIMD when either Altivec or SSE is available. +// Internally set SQUISH_USE_SIMD when either Altivec or SSE is available. #if SQUISH_USE_ALTIVEC && SQUISH_USE_SSE #error "Cannot enable both Altivec and SSE!" #endif @@ -46,10 +46,4 @@ #define SQUISH_USE_SIMD 0 #endif -// TORQUE MODIFICATIONS -#ifdef TORQUE_DEBUG -# undef SQUISH_USE_SSE -# define SQUISH_USE_SSE 0 -#endif - #endif // ndef SQUISH_CONFIG_H diff --git a/Engine/lib/squish/maths.cpp b/Engine/lib/squish/maths.cpp index 59818a4d2..9af4197d3 100644 --- a/Engine/lib/squish/maths.cpp +++ b/Engine/lib/squish/maths.cpp @@ -30,6 +30,7 @@ */ #include "maths.h" +#include "simd.h" #include namespace squish { @@ -44,7 +45,8 @@ Sym3x3 ComputeWeightedCovariance( int n, Vec3 const* points, float const* weight total += weights[i]; centroid += weights[i]*points[i]; } - centroid /= total; + if( total > FLT_EPSILON ) + centroid /= total; // accumulate the covariance matrix Sym3x3 covariance( 0.0f ); @@ -65,6 +67,8 @@ Sym3x3 ComputeWeightedCovariance( int n, Vec3 const* points, float const* weight return covariance; } +#if 0 + static Vec3 GetMultiplicity1Evector( Sym3x3 const& matrix, float evalue ) { // compute M @@ -224,4 +228,32 @@ Vec3 ComputePrincipleComponent( Sym3x3 const& matrix ) } } +#else + +#define POWER_ITERATION_COUNT 8 + +Vec3 ComputePrincipleComponent( Sym3x3 const& matrix ) +{ + Vec4 const row0( matrix[0], matrix[1], matrix[2], 0.0f ); + Vec4 const row1( matrix[1], matrix[3], matrix[4], 0.0f ); + Vec4 const row2( matrix[2], matrix[4], matrix[5], 0.0f ); + Vec4 v = VEC4_CONST( 1.0f ); + for( int i = 0; i < POWER_ITERATION_COUNT; ++i ) + { + // matrix multiply + Vec4 w = row0*v.SplatX(); + w = MultiplyAdd(row1, v.SplatY(), w); + w = MultiplyAdd(row2, v.SplatZ(), w); + + // get max component from xyz in all channels + Vec4 a = Max(w.SplatX(), Max(w.SplatY(), w.SplatZ())); + + // divide through and advance + v = w*Reciprocal(a); + } + return v.GetVec3(); +} + +#endif + } // namespace squish diff --git a/Engine/lib/squish/rangefit.cpp b/Engine/lib/squish/rangefit.cpp index 5a6643605..3fca1245e 100644 --- a/Engine/lib/squish/rangefit.cpp +++ b/Engine/lib/squish/rangefit.cpp @@ -30,15 +30,14 @@ namespace squish { -RangeFit::RangeFit( ColourSet const* colours, int flags ) +RangeFit::RangeFit( ColourSet const* colours, int flags, float* metric ) : ColourFit( colours, flags ) { - // initialise the metric - bool perceptual = ( ( m_flags & kColourMetricPerceptual ) != 0 ); - if( perceptual ) - m_metric = Vec3( 0.2126f, 0.7152f, 0.0722f ); + // initialise the metric (old perceptual = 0.2126f, 0.7152f, 0.0722f) + if( metric ) + m_metric = Vec3( metric[0], metric[1], metric[2] ); else - m_metric = Vec3( 1.0f ); + m_metric = Vec3( 1.0f ); // initialise the best error m_besterror = FLT_MAX; diff --git a/Engine/lib/squish/rangefit.h b/Engine/lib/squish/rangefit.h index 795201993..e293bdcf3 100644 --- a/Engine/lib/squish/rangefit.h +++ b/Engine/lib/squish/rangefit.h @@ -26,7 +26,7 @@ #ifndef SQUISH_RANGEFIT_H #define SQUISH_RANGEFIT_H -#include +#include "squish.h" #include "colourfit.h" #include "maths.h" @@ -37,7 +37,7 @@ class ColourSet; class RangeFit : public ColourFit { public: - RangeFit( ColourSet const* colours, int flags ); + RangeFit( ColourSet const* colours, int flags, float* metric ); private: virtual void Compress3( void* block ); diff --git a/Engine/lib/squish/simd.h b/Engine/lib/squish/simd.h index 22bd10a46..92965e02e 100644 --- a/Engine/lib/squish/simd.h +++ b/Engine/lib/squish/simd.h @@ -27,14 +27,6 @@ #define SQUISH_SIMD_H #include "maths.h" - -#if SQUISH_USE_ALTIVEC -#include "simd_ve.h" -#elif SQUISH_USE_SSE -#include "simd_sse.h" -#else #include "simd_float.h" -#endif - #endif // ndef SQUISH_SIMD_H diff --git a/Engine/lib/squish/simd_sse.h b/Engine/lib/squish/simd_sse.h deleted file mode 100644 index e584f2a0e..000000000 --- a/Engine/lib/squish/simd_sse.h +++ /dev/null @@ -1,180 +0,0 @@ -/* ----------------------------------------------------------------------------- - - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - - 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. - - -------------------------------------------------------------------------- */ - -#ifndef SQUISH_SIMD_SSE_H -#define SQUISH_SIMD_SSE_H - -#include -#if ( SQUISH_USE_SSE > 1 ) -#include -#endif - -#define SQUISH_SSE_SPLAT( a ) \ - ( ( a ) | ( ( a ) << 2 ) | ( ( a ) << 4 ) | ( ( a ) << 6 ) ) - -#define SQUISH_SSE_SHUF( x, y, z, w ) \ - ( ( x ) | ( ( y ) << 2 ) | ( ( z ) << 4 ) | ( ( w ) << 6 ) ) - -namespace squish { - -#define VEC4_CONST( X ) Vec4( X ) - -class Vec4 -{ -public: - typedef Vec4 const& Arg; - - Vec4() {} - - explicit Vec4( __m128 v ) : m_v( v ) {} - - Vec4( Vec4 const& arg ) : m_v( arg.m_v ) {} - - Vec4& operator=( Vec4 const& arg ) - { - m_v = arg.m_v; - return *this; - } - - explicit Vec4( float s ) : m_v( _mm_set1_ps( s ) ) {} - - Vec4( float x, float y, float z, float w ) : m_v( _mm_setr_ps( x, y, z, w ) ) {} - - Vec3 GetVec3() const - { -#ifdef __GNUC__ - __attribute__ ((__aligned__ (16))) float c[4]; -#else - __declspec(align(16)) float c[4]; -#endif - _mm_store_ps( c, m_v ); - return Vec3( c[0], c[1], c[2] ); - } - - Vec4 SplatX() const { return Vec4( _mm_shuffle_ps( m_v, m_v, SQUISH_SSE_SPLAT( 0 ) ) ); } - Vec4 SplatY() const { return Vec4( _mm_shuffle_ps( m_v, m_v, SQUISH_SSE_SPLAT( 1 ) ) ); } - Vec4 SplatZ() const { return Vec4( _mm_shuffle_ps( m_v, m_v, SQUISH_SSE_SPLAT( 2 ) ) ); } - Vec4 SplatW() const { return Vec4( _mm_shuffle_ps( m_v, m_v, SQUISH_SSE_SPLAT( 3 ) ) ); } - - Vec4& operator+=( Arg v ) - { - m_v = _mm_add_ps( m_v, v.m_v ); - return *this; - } - - Vec4& operator-=( Arg v ) - { - m_v = _mm_sub_ps( m_v, v.m_v ); - return *this; - } - - Vec4& operator*=( Arg v ) - { - m_v = _mm_mul_ps( m_v, v.m_v ); - return *this; - } - - friend Vec4 operator+( Vec4::Arg left, Vec4::Arg right ) - { - return Vec4( _mm_add_ps( left.m_v, right.m_v ) ); - } - - friend Vec4 operator-( Vec4::Arg left, Vec4::Arg right ) - { - return Vec4( _mm_sub_ps( left.m_v, right.m_v ) ); - } - - friend Vec4 operator*( Vec4::Arg left, Vec4::Arg right ) - { - return Vec4( _mm_mul_ps( left.m_v, right.m_v ) ); - } - - //! Returns a*b + c - friend Vec4 MultiplyAdd( Vec4::Arg a, Vec4::Arg b, Vec4::Arg c ) - { - return Vec4( _mm_add_ps( _mm_mul_ps( a.m_v, b.m_v ), c.m_v ) ); - } - - //! Returns -( a*b - c ) - friend Vec4 NegativeMultiplySubtract( Vec4::Arg a, Vec4::Arg b, Vec4::Arg c ) - { - return Vec4( _mm_sub_ps( c.m_v, _mm_mul_ps( a.m_v, b.m_v ) ) ); - } - - friend Vec4 Reciprocal( Vec4::Arg v ) - { - // get the reciprocal estimate - __m128 estimate = _mm_rcp_ps( v.m_v ); - - // one round of Newton-Rhaphson refinement - __m128 diff = _mm_sub_ps( _mm_set1_ps( 1.0f ), _mm_mul_ps( estimate, v.m_v ) ); - return Vec4( _mm_add_ps( _mm_mul_ps( diff, estimate ), estimate ) ); - } - - friend Vec4 Min( Vec4::Arg left, Vec4::Arg right ) - { - return Vec4( _mm_min_ps( left.m_v, right.m_v ) ); - } - - friend Vec4 Max( Vec4::Arg left, Vec4::Arg right ) - { - return Vec4( _mm_max_ps( left.m_v, right.m_v ) ); - } - - friend Vec4 Truncate( Vec4::Arg v ) - { -#if ( SQUISH_USE_SSE == 1 ) - // convert to ints - __m128 input = v.m_v; - __m64 lo = _mm_cvttps_pi32( input ); - __m64 hi = _mm_cvttps_pi32( _mm_movehl_ps( input, input ) ); - - // convert to floats - __m128 part = _mm_movelh_ps( input, _mm_cvtpi32_ps( input, hi ) ); - __m128 truncated = _mm_cvtpi32_ps( part, lo ); - - // clear out the MMX multimedia state to allow FP calls later - _mm_empty(); - return Vec4( truncated ); -#else - // use SSE2 instructions - return Vec4( _mm_cvtepi32_ps( _mm_cvttps_epi32( v.m_v ) ) ); -#endif - } - - friend bool CompareAnyLessThan( Vec4::Arg left, Vec4::Arg right ) - { - __m128 bits = _mm_cmplt_ps( left.m_v, right.m_v ); - int value = _mm_movemask_ps( bits ); - return value != 0; - } - -private: - __m128 m_v; -}; - -} // namespace squish - -#endif // ndef SQUISH_SIMD_SSE_H diff --git a/Engine/lib/squish/simd_ve.h b/Engine/lib/squish/simd_ve.h deleted file mode 100644 index 9a33955ff..000000000 --- a/Engine/lib/squish/simd_ve.h +++ /dev/null @@ -1,166 +0,0 @@ -/* ----------------------------------------------------------------------------- - - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - - 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. - - -------------------------------------------------------------------------- */ - -#ifndef SQUISH_SIMD_VE_H -#define SQUISH_SIMD_VE_H - -#include -#undef bool - -namespace squish { - -#define VEC4_CONST( X ) Vec4( ( vector float )( X ) ) - -class Vec4 -{ -public: - typedef Vec4 Arg; - - Vec4() {} - - explicit Vec4( vector float v ) : m_v( v ) {} - - Vec4( Vec4 const& arg ) : m_v( arg.m_v ) {} - - Vec4& operator=( Vec4 const& arg ) - { - m_v = arg.m_v; - return *this; - } - - explicit Vec4( float s ) - { - union { vector float v; float c[4]; } u; - u.c[0] = s; - u.c[1] = s; - u.c[2] = s; - u.c[3] = s; - m_v = u.v; - } - - Vec4( float x, float y, float z, float w ) - { - union { vector float v; float c[4]; } u; - u.c[0] = x; - u.c[1] = y; - u.c[2] = z; - u.c[3] = w; - m_v = u.v; - } - - Vec3 GetVec3() const - { - union { vector float v; float c[4]; } u; - u.v = m_v; - return Vec3( u.c[0], u.c[1], u.c[2] ); - } - - Vec4 SplatX() const { return Vec4( vec_splat( m_v, 0 ) ); } - Vec4 SplatY() const { return Vec4( vec_splat( m_v, 1 ) ); } - Vec4 SplatZ() const { return Vec4( vec_splat( m_v, 2 ) ); } - Vec4 SplatW() const { return Vec4( vec_splat( m_v, 3 ) ); } - - Vec4& operator+=( Arg v ) - { - m_v = vec_add( m_v, v.m_v ); - return *this; - } - - Vec4& operator-=( Arg v ) - { - m_v = vec_sub( m_v, v.m_v ); - return *this; - } - - Vec4& operator*=( Arg v ) - { - m_v = vec_madd( m_v, v.m_v, ( vector float )( -0.0f ) ); - return *this; - } - - friend Vec4 operator+( Vec4::Arg left, Vec4::Arg right ) - { - return Vec4( vec_add( left.m_v, right.m_v ) ); - } - - friend Vec4 operator-( Vec4::Arg left, Vec4::Arg right ) - { - return Vec4( vec_sub( left.m_v, right.m_v ) ); - } - - friend Vec4 operator*( Vec4::Arg left, Vec4::Arg right ) - { - return Vec4( vec_madd( left.m_v, right.m_v, ( vector float )( -0.0f ) ) ); - } - - //! Returns a*b + c - friend Vec4 MultiplyAdd( Vec4::Arg a, Vec4::Arg b, Vec4::Arg c ) - { - return Vec4( vec_madd( a.m_v, b.m_v, c.m_v ) ); - } - - //! Returns -( a*b - c ) - friend Vec4 NegativeMultiplySubtract( Vec4::Arg a, Vec4::Arg b, Vec4::Arg c ) - { - return Vec4( vec_nmsub( a.m_v, b.m_v, c.m_v ) ); - } - - friend Vec4 Reciprocal( Vec4::Arg v ) - { - // get the reciprocal estimate - vector float estimate = vec_re( v.m_v ); - - // one round of Newton-Rhaphson refinement - vector float diff = vec_nmsub( estimate, v.m_v, ( vector float )( 1.0f ) ); - return Vec4( vec_madd( diff, estimate, estimate ) ); - } - - friend Vec4 Min( Vec4::Arg left, Vec4::Arg right ) - { - return Vec4( vec_min( left.m_v, right.m_v ) ); - } - - friend Vec4 Max( Vec4::Arg left, Vec4::Arg right ) - { - return Vec4( vec_max( left.m_v, right.m_v ) ); - } - - friend Vec4 Truncate( Vec4::Arg v ) - { - return Vec4( vec_trunc( v.m_v ) ); - } - - friend bool CompareAnyLessThan( Vec4::Arg left, Vec4::Arg right ) - { - return vec_any_lt( left.m_v, right.m_v ) != 0; - } - -private: - vector float m_v; -}; - -} // namespace squish - -#endif // ndef SQUISH_SIMD_VE_H diff --git a/Engine/lib/squish/singlecolourfit.cpp b/Engine/lib/squish/singlecolourfit.cpp index 7929ce120..e8a011769 100644 --- a/Engine/lib/squish/singlecolourfit.cpp +++ b/Engine/lib/squish/singlecolourfit.cpp @@ -26,7 +26,6 @@ #include "singlecolourfit.h" #include "colourset.h" #include "colourblock.h" -#include namespace squish { diff --git a/Engine/lib/squish/singlecolourfit.h b/Engine/lib/squish/singlecolourfit.h index 0388fda02..54ec17ebb 100644 --- a/Engine/lib/squish/singlecolourfit.h +++ b/Engine/lib/squish/singlecolourfit.h @@ -26,7 +26,7 @@ #ifndef SQUISH_SINGLECOLOURFIT_H #define SQUISH_SINGLECOLOURFIT_H -#include +#include "squish.h" #include "colourfit.h" namespace squish { diff --git a/Engine/lib/squish/singlecolourlookup.inl b/Engine/lib/squish/singlecolourlookup.inl index f1c95a102..5e911745e 100644 --- a/Engine/lib/squish/singlecolourlookup.inl +++ b/Engine/lib/squish/singlecolourlookup.inl @@ -1,3 +1,27 @@ +/* ----------------------------------------------------------------------------- + + Copyright (c) 2006 Simon Brown si@sjbrown.co.uk + + 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. + + -------------------------------------------------------------------------- */ static SingleColourLookup const lookup_5_3[] = { diff --git a/Engine/lib/squish/squish-Info.plist b/Engine/lib/squish/squish-Info.plist deleted file mode 100644 index 5cb05e056..000000000 --- a/Engine/lib/squish/squish-Info.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - com.sjbrown.squish - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - FMWK - CFBundleSignature - ???? - CFBundleVersion - 1.0 - - diff --git a/Engine/lib/squish/squish.cpp b/Engine/lib/squish/squish.cpp index bbe89bfcf..cd91f8746 100644 --- a/Engine/lib/squish/squish.cpp +++ b/Engine/lib/squish/squish.cpp @@ -23,7 +23,7 @@ -------------------------------------------------------------------------- */ -#include +#include "squish.h" #include "colourset.h" #include "maths.h" #include "rangefit.h" @@ -37,37 +37,58 @@ namespace squish { static int FixFlags( int flags ) { // grab the flag bits - int method = flags & ( kDxt1 | kDxt3 | kDxt5 ); + int method = flags & ( kDxt1 | kDxt3 | kDxt5 | kBc4 | kBc5 ); int fit = flags & ( kColourIterativeClusterFit | kColourClusterFit | kColourRangeFit ); - int metric = flags & ( kColourMetricPerceptual | kColourMetricUniform ); int extra = flags & kWeightColourByAlpha; // set defaults - if( method != kDxt3 && method != kDxt5 ) + if ( method != kDxt3 + && method != kDxt5 + && method != kBc4 + && method != kBc5 ) + { method = kDxt1; - if( fit != kColourRangeFit ) + } + if( fit != kColourRangeFit && fit != kColourIterativeClusterFit ) fit = kColourClusterFit; - if( metric != kColourMetricUniform ) - metric = kColourMetricPerceptual; // done - return method | fit | metric | extra; + return method | fit | extra; } -void Compress( u8 const* rgba, void* block, int flags ) -{ - // compress with full mask - CompressMasked( rgba, 0xffff, block, flags ); -} - -void CompressMasked( u8 const* rgba, int mask, void* block, int flags ) +void CompressMasked( u8 const* rgba, int mask, void* block, int flags, float* metric ) { // fix any bad flags flags = FixFlags( flags ); + if ( ( flags & ( kBc4 | kBc5 ) ) != 0 ) + { + u8 alpha[16*4]; + for( int i = 0; i < 16; ++i ) + { + alpha[i*4 + 3] = rgba[i*4 + 0]; // copy R to A + } + + u8* rBlock = reinterpret_cast< u8* >( block ); + CompressAlphaDxt5( alpha, mask, rBlock ); + + if ( ( flags & ( kBc5 ) ) != 0 ) + { + for( int i = 0; i < 16; ++i ) + { + alpha[i*4 + 3] = rgba[i*4 + 1]; // copy G to A + } + + u8* gBlock = reinterpret_cast< u8* >( block ) + 8; + CompressAlphaDxt5( alpha, mask, gBlock ); + } + + return; + } + // get the block locations void* colourBlock = block; - void* alphaBock = block; + void* alphaBlock = block; if( ( flags & ( kDxt3 | kDxt5 ) ) != 0 ) colourBlock = reinterpret_cast< u8* >( block ) + 8; @@ -84,21 +105,21 @@ void CompressMasked( u8 const* rgba, int mask, void* block, int flags ) else if( ( flags & kColourRangeFit ) != 0 || colours.GetCount() == 0 ) { // do a range fit - RangeFit fit( &colours, flags ); + RangeFit fit( &colours, flags, metric ); fit.Compress( colourBlock ); } else { // default to a cluster fit (could be iterative or not) - ClusterFit fit( &colours, flags ); + ClusterFit fit( &colours, flags, metric ); fit.Compress( colourBlock ); } // compress alpha separately if necessary if( ( flags & kDxt3 ) != 0 ) - CompressAlphaDxt3( rgba, mask, alphaBock ); + CompressAlphaDxt3( rgba, mask, alphaBlock ); else if( ( flags & kDxt5 ) != 0 ) - CompressAlphaDxt5( rgba, mask, alphaBock ); + CompressAlphaDxt5( rgba, mask, alphaBlock ); } void Decompress( u8* rgba, void const* block, int flags ) @@ -129,18 +150,18 @@ int GetStorageRequirements( int width, int height, int flags ) // compute the storage requirements int blockcount = ( ( width + 3 )/4 ) * ( ( height + 3 )/4 ); - int blocksize = ( ( flags & kDxt1 ) != 0 ) ? 8 : 16; - return blockcount*blocksize; + int blocksize = ( ( flags & ( kDxt1 | kBc4 ) ) != 0 ) ? 8 : 16; + return blockcount*blocksize; } -void CompressImage( u8 const* rgba, int width, int height, void* blocks, int flags ) +void CompressImage( u8 const* rgba, int width, int height, void* blocks, int flags, float* metric ) { // fix any bad flags flags = FixFlags( flags ); // initialise the block output u8* targetBlock = reinterpret_cast< u8* >( blocks ); - int bytesPerBlock = ( ( flags & kDxt1 ) != 0 ) ? 8 : 16; + int bytesPerBlock = ( ( flags & ( kDxt1 | kBc4 ) ) != 0 ) ? 8 : 16; // loop over blocks for( int y = 0; y < height; y += 4 ) @@ -179,7 +200,7 @@ void CompressImage( u8 const* rgba, int width, int height, void* blocks, int fla } // compress it into the output - CompressMasked( sourceRgba, mask, targetBlock, flags ); + CompressMasked( sourceRgba, mask, targetBlock, flags, metric ); // advance targetBlock += bytesPerBlock; @@ -194,7 +215,7 @@ void DecompressImage( u8* rgba, int width, int height, void const* blocks, int f // initialise the block input u8 const* sourceBlock = reinterpret_cast< u8 const* >( blocks ); - int bytesPerBlock = ( ( flags & kDxt1 ) != 0 ) ? 8 : 16; + int bytesPerBlock = ( ( flags & ( kDxt1 | kBc4 ) ) != 0 ) ? 8 : 16; // loop over blocks for( int y = 0; y < height; y += 4 ) diff --git a/Engine/lib/squish/squish.h b/Engine/lib/squish/squish.h index 5f5ac149d..175375f83 100644 --- a/Engine/lib/squish/squish.h +++ b/Engine/lib/squish/squish.h @@ -39,74 +39,42 @@ typedef unsigned char u8; enum { //! Use DXT1 compression. - kDxt1 = ( 1 << 0 ), - + kDxt1 = ( 1 << 0 ), + //! Use DXT3 compression. - kDxt3 = ( 1 << 1 ), - + kDxt3 = ( 1 << 1 ), + //! Use DXT5 compression. - kDxt5 = ( 1 << 2 ), - - //! Use a very slow but very high quality colour compressor. - kColourIterativeClusterFit = ( 1 << 8 ), - + kDxt5 = ( 1 << 2 ), + + //! Use BC4 compression. + kBc4 = ( 1 << 3 ), + + //! Use BC5 compression. + kBc5 = ( 1 << 4 ), + //! Use a slow but high quality colour compressor (the default). - kColourClusterFit = ( 1 << 3 ), - + kColourClusterFit = ( 1 << 5 ), + //! Use a fast but low quality colour compressor. - kColourRangeFit = ( 1 << 4 ), - - //! Use a perceptual metric for colour error (the default). - kColourMetricPerceptual = ( 1 << 5 ), + kColourRangeFit = ( 1 << 6 ), - //! Use a uniform metric for colour error. - kColourMetricUniform = ( 1 << 6 ), - //! Weight the colour by alpha during cluster fit (disabled by default). - kWeightColourByAlpha = ( 1 << 7 ) + kWeightColourByAlpha = ( 1 << 7 ), + + //! Use a very slow but very high quality colour compressor. + kColourIterativeClusterFit = ( 1 << 8 ), }; // ----------------------------------------------------------------------------- -/*! @brief Compresses a 4x4 block of pixels. - - @param rgba The rgba values of the 16 source pixels. - @param block Storage for the compressed DXT block. - @param flags Compression flags. - - The source pixels should be presented as a contiguous array of 16 rgba - values, with each component as 1 byte each. In memory this should be: - - { r1, g1, b1, a1, .... , r16, g16, b16, a16 } - - The flags parameter should specify either kDxt1, kDxt3 or kDxt5 compression, - however, DXT1 will be used by default if none is specified. When using DXT1 - compression, 8 bytes of storage are required for the compressed DXT block. - DXT3 and DXT5 compression require 16 bytes of storage per block. - - The flags parameter can also specify a preferred colour compressor and - colour error metric to use when fitting the RGB components of the data. - Possible colour compressors are: kColourClusterFit (the default), - kColourRangeFit or kColourIterativeClusterFit. Possible colour error metrics - are: kColourMetricPerceptual (the default) or kColourMetricUniform. If no - flags are specified in any particular category then the default will be - used. Unknown flags are ignored. - - When using kColourClusterFit, an additional flag can be specified to - weight the colour of each pixel by its alpha value. For images that are - rendered using alpha blending, this can significantly increase the - perceived quality. -*/ -void Compress( u8 const* rgba, void* block, int flags ); - -// ----------------------------------------------------------------------------- - /*! @brief Compresses a 4x4 block of pixels. @param rgba The rgba values of the 16 source pixels. @param mask The valid pixel mask. @param block Storage for the compressed DXT block. @param flags Compression flags. + @param metric An optional perceptual metric. The source pixels should be presented as a contiguous array of 16 rgba values, with each component as 1 byte each. In memory this should be: @@ -125,20 +93,68 @@ void Compress( u8 const* rgba, void* block, int flags ); compression, 8 bytes of storage are required for the compressed DXT block. DXT3 and DXT5 compression require 16 bytes of storage per block. - The flags parameter can also specify a preferred colour compressor and - colour error metric to use when fitting the RGB components of the data. - Possible colour compressors are: kColourClusterFit (the default), - kColourRangeFit or kColourIterativeClusterFit. Possible colour error metrics - are: kColourMetricPerceptual (the default) or kColourMetricUniform. If no - flags are specified in any particular category then the default will be - used. Unknown flags are ignored. + The flags parameter can also specify a preferred colour compressor to use + when fitting the RGB components of the data. Possible colour compressors + are: kColourClusterFit (the default), kColourRangeFit (very fast, low + quality) or kColourIterativeClusterFit (slowest, best quality). + + When using kColourClusterFit or kColourIterativeClusterFit, an additional + flag can be specified to weight the importance of each pixel by its alpha + value. For images that are rendered using alpha blending, this can + significantly increase the perceived quality. - When using kColourClusterFit, an additional flag can be specified to - weight the colour of each pixel by its alpha value. For images that are - rendered using alpha blending, this can significantly increase the - perceived quality. + The metric parameter can be used to weight the relative importance of each + colour channel, or pass NULL to use the default uniform weight of + { 1.0f, 1.0f, 1.0f }. This replaces the previous flag-based control that + allowed either uniform or "perceptual" weights with the fixed values + { 0.2126f, 0.7152f, 0.0722f }. If non-NULL, the metric should point to a + contiguous array of 3 floats. */ -void CompressMasked( u8 const* rgba, int mask, void* block, int flags ); +void CompressMasked( u8 const* rgba, int mask, void* block, int flags, float* metric = 0 ); + +// ----------------------------------------------------------------------------- + +/*! @brief Compresses a 4x4 block of pixels. + + @param rgba The rgba values of the 16 source pixels. + @param block Storage for the compressed DXT block. + @param flags Compression flags. + @param metric An optional perceptual metric. + + The source pixels should be presented as a contiguous array of 16 rgba + values, with each component as 1 byte each. In memory this should be: + + { r1, g1, b1, a1, .... , r16, g16, b16, a16 } + + The flags parameter should specify either kDxt1, kDxt3 or kDxt5 compression, + however, DXT1 will be used by default if none is specified. When using DXT1 + compression, 8 bytes of storage are required for the compressed DXT block. + DXT3 and DXT5 compression require 16 bytes of storage per block. + + The flags parameter can also specify a preferred colour compressor to use + when fitting the RGB components of the data. Possible colour compressors + are: kColourClusterFit (the default), kColourRangeFit (very fast, low + quality) or kColourIterativeClusterFit (slowest, best quality). + + When using kColourClusterFit or kColourIterativeClusterFit, an additional + flag can be specified to weight the importance of each pixel by its alpha + value. For images that are rendered using alpha blending, this can + significantly increase the perceived quality. + + The metric parameter can be used to weight the relative importance of each + colour channel, or pass NULL to use the default uniform weight of + { 1.0f, 1.0f, 1.0f }. This replaces the previous flag-based control that + allowed either uniform or "perceptual" weights with the fixed values + { 0.2126f, 0.7152f, 0.0722f }. If non-NULL, the metric should point to a + contiguous array of 3 floats. + + This method is an inline that calls CompressMasked with a mask of 0xffff, + provided for compatibility with older versions of squish. +*/ +inline void Compress( u8 const* rgba, void* block, int flags, float* metric = 0 ) +{ + CompressMasked( rgba, 0xffff, block, flags, metric ); +} // ----------------------------------------------------------------------------- @@ -186,6 +202,7 @@ int GetStorageRequirements( int width, int height, int flags ); @param height The height of the source image. @param blocks Storage for the compressed output. @param flags Compression flags. + @param metric An optional perceptual metric. The source pixels should be presented as a contiguous array of width*height rgba values, with each component as 1 byte each. In memory this should be: @@ -197,24 +214,29 @@ int GetStorageRequirements( int width, int height, int flags ); compression, 8 bytes of storage are required for each compressed DXT block. DXT3 and DXT5 compression require 16 bytes of storage per block. - The flags parameter can also specify a preferred colour compressor and - colour error metric to use when fitting the RGB components of the data. - Possible colour compressors are: kColourClusterFit (the default), - kColourRangeFit or kColourIterativeClusterFit. Possible colour error metrics - are: kColourMetricPerceptual (the default) or kColourMetricUniform. If no - flags are specified in any particular category then the default will be - used. Unknown flags are ignored. + The flags parameter can also specify a preferred colour compressor to use + when fitting the RGB components of the data. Possible colour compressors + are: kColourClusterFit (the default), kColourRangeFit (very fast, low + quality) or kColourIterativeClusterFit (slowest, best quality). + + When using kColourClusterFit or kColourIterativeClusterFit, an additional + flag can be specified to weight the importance of each pixel by its alpha + value. For images that are rendered using alpha blending, this can + significantly increase the perceived quality. - When using kColourClusterFit, an additional flag can be specified to - weight the colour of each pixel by its alpha value. For images that are - rendered using alpha blending, this can significantly increase the - perceived quality. + The metric parameter can be used to weight the relative importance of each + colour channel, or pass NULL to use the default uniform weight of + { 1.0f, 1.0f, 1.0f }. This replaces the previous flag-based control that + allowed either uniform or "perceptual" weights with the fixed values + { 0.2126f, 0.7152f, 0.0722f }. If non-NULL, the metric should point to a + contiguous array of 3 floats. - Internally this function calls squish::Compress for each block. To see how - much memory is required in the compressed image, use - squish::GetStorageRequirements. + Internally this function calls squish::CompressMasked for each block, which + allows for pixels outside the image to take arbitrary values. The function + squish::GetStorageRequirements can be called to compute the amount of memory + to allocate for the compressed output. */ -void CompressImage( u8 const* rgba, int width, int height, void* blocks, int flags ); +void CompressImage( u8 const* rgba, int width, int height, void* blocks, int flags, float* metric = 0 ); // ----------------------------------------------------------------------------- diff --git a/Engine/lib/squish/texture_compression_s3tc.txt b/Engine/lib/squish/texture_compression_s3tc.txt deleted file mode 100644 index f229cf367..000000000 --- a/Engine/lib/squish/texture_compression_s3tc.txt +++ /dev/null @@ -1,508 +0,0 @@ -Name - - EXT_texture_compression_s3tc - -Name Strings - - GL_EXT_texture_compression_s3tc - -Contact - - Pat Brown, NVIDIA Corporation (pbrown 'at' nvidia.com) - -Status - - FINAL - -Version - - 1.1, 16 November 2001 (containing only clarifications relative to - version 1.0, dated 7 July 2000) - -Number - - 198 - -Dependencies - - OpenGL 1.1 is required. - - GL_ARB_texture_compression is required. - - This extension is written against the OpenGL 1.2.1 Specification. - -Overview - - This extension provides additional texture compression functionality - specific to S3's S3TC format (called DXTC in Microsoft's DirectX API), - subject to all the requirements and limitations described by the extension - GL_ARB_texture_compression. - - This extension supports DXT1, DXT3, and DXT5 texture compression formats. - For the DXT1 image format, this specification supports an RGB-only mode - and a special RGBA mode with single-bit "transparent" alpha. - -IP Status - - Contact S3 Incorporated (http://www.s3.com) regarding any intellectual - property issues associated with implementing this extension. - - WARNING: Vendors able to support S3TC texture compression in Direct3D - drivers do not necessarily have the right to use the same functionality in - OpenGL. - -Issues - - (1) Should DXT2 and DXT4 (premultiplied alpha) formats be supported? - - RESOLVED: No -- insufficient interest. Supporting DXT2 and DXT4 - would require some rework to the TexEnv definition (maybe add a new - base internal format RGBA_PREMULTIPLIED_ALPHA) for these formats. - Note that the EXT_texture_env_combine extension (which extends normal - TexEnv modes) can be used to support textures with premultipled alpha. - - (2) Should generic "RGB_S3TC_EXT" and "RGBA_S3TC_EXT" enums be supported - or should we use only the DXT enums? - - RESOLVED: No. A generic RGBA_S3TC_EXT is problematic because DXT3 - and DXT5 are both nominally RGBA (and DXT1 with the 1-bit alpha is - also) yet one format must be chosen up front. - - (3) Should TexSubImage support all block-aligned edits or just the minimal - functionality required by the ARB_texture_compression extension? - - RESOLVED: Allow all valid block-aligned edits. - - (4) A pre-compressed image with a DXT1 format can be used as either an - RGB_S3TC_DXT1 or an RGBA_S3TC_DXT1 image. If the image has - transparent texels, how are they treated in each format? - - RESOLVED: The renderer has to make sure that an RGB_S3TC_DXT1 format - is decoded as RGB (where alpha is effectively one for all texels), - while RGBA_S3TC_DXT1 is decoded as RGBA (where alpha is zero for all - texels with "transparent" encodings). Otherwise, the formats are - identical. - - (5) Is the encoding of the RGB components for DXT1 formats correct in this - spec? MSDN documentation does not specify an RGB color for the - "transparent" encoding. Is it really black? - - RESOLVED: Yes. The specification for the DXT1 format initially - required black, but later changed that requirement to a - recommendation. All vendors involved in the definition of this - specification support black. In addition, specifying black has a - useful behavior. - - When blending multiple texels (GL_LINEAR filtering), mixing opaque and - transparent samples is problematic. Defining a black color on - transparent texels achieves a sensible result that works like a - texture with premultiplied alpha. For example, if three opaque white - and one transparent sample is being averaged, the result would be a - 75% intensity gray (with an alpha of 75%). This is the same result on - the color channels as would be obtained using a white color, 75% - alpha, and a SRC_ALPHA blend factor. - - (6) Is the encoding of the RGB components for DXT3 and DXT5 formats - correct in this spec? MSDN documentation suggests that the RGB blocks - for DXT3 and DXT5 are decoded as described by the DXT1 format. - - RESOLVED: Yes -- this appears to be a bug in the MSDN documentation. - The specification for the DXT2-DXT5 formats require decoding using the - opaque block encoding, regardless of the relative values of "color0" - and "color1". - -New Procedures and Functions - - None. - -New Tokens - - Accepted by the parameter of TexImage2D, CopyTexImage2D, - and CompressedTexImage2DARB and the parameter of - CompressedTexSubImage2DARB: - - COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 - COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 - COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 - COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 - -Additions to Chapter 2 of the OpenGL 1.2.1 Specification (OpenGL Operation) - - None. - -Additions to Chapter 3 of the OpenGL 1.2.1 Specification (Rasterization) - - Add to Table 3.16.1: Specific Compressed Internal Formats - - Compressed Internal Format Base Internal Format - ========================== ==================== - COMPRESSED_RGB_S3TC_DXT1_EXT RGB - COMPRESSED_RGBA_S3TC_DXT1_EXT RGBA - COMPRESSED_RGBA_S3TC_DXT3_EXT RGBA - COMPRESSED_RGBA_S3TC_DXT5_EXT RGBA - - - Modify Section 3.8.2, Alternate Image Specification - - (add to end of TexSubImage discussion, p.123 -- after edit from the - ARB_texture_compression spec) - - If the internal format of the texture image being modified is - COMPRESSED_RGB_S3TC_DXT1_EXT, COMPRESSED_RGBA_S3TC_DXT1_EXT, - COMPRESSED_RGBA_S3TC_DXT3_EXT, or COMPRESSED_RGBA_S3TC_DXT5_EXT, the - texture is stored using one of the several S3TC compressed texture image - formats. Such images are easily edited along 4x4 texel boundaries, so the - limitations on TexSubImage2D or CopyTexSubImage2D parameters are relaxed. - TexSubImage2D and CopyTexSubImage2D will result in an INVALID_OPERATION - error only if one of the following conditions occurs: - - * is not a multiple of four or equal to TEXTURE_WIDTH, - unless and are both zero. - * is not a multiple of four or equal to TEXTURE_HEIGHT, - unless and are both zero. - * or is not a multiple of four. - - The contents of any 4x4 block of texels of an S3TC compressed texture - image that does not intersect the area being modified are preserved during - valid TexSubImage2D and CopyTexSubImage2D calls. - - - Add to Section 3.8.2, Alternate Image Specification (adding to the end of - the CompressedTexImage section introduced by the ARB_texture_compression - spec) - - If is COMPRESSED_RGB_S3TC_DXT1_EXT, - COMPRESSED_RGBA_S3TC_DXT1_EXT, COMPRESSED_RGBA_S3TC_DXT3_EXT, or - COMPRESSED_RGBA_S3TC_DXT5_EXT, the compressed texture is stored using one - of several S3TC compressed texture image formats. The S3TC texture - compression algorithm supports only 2D images without borders. - CompressedTexImage1DARB and CompressedTexImage3DARB produce an - INVALID_ENUM error if is an S3TC format. - CompressedTexImage2DARB will produce an INVALID_OPERATION error if - is non-zero. - - - Add to Section 3.8.2, Alternate Image Specification (adding to the end of - the CompressedTexSubImage section introduced by the - ARB_texture_compression spec) - - If the internal format of the texture image being modified is - COMPRESSED_RGB_S3TC_DXT1_EXT, COMPRESSED_RGBA_S3TC_DXT1_EXT, - COMPRESSED_RGBA_S3TC_DXT3_EXT, or COMPRESSED_RGBA_S3TC_DXT5_EXT, the - texture is stored using one of the several S3TC compressed texture image - formats. Since the S3TC texture compression algorithm supports only 2D - images, CompressedTexSubImage1DARB and CompressedTexSubImage3DARB produce - an INVALID_ENUM error if is an S3TC format. Since S3TC images - are easily edited along 4x4 texel boundaries, the limitations on - CompressedTexSubImage2D are relaxed. CompressedTexSubImage2D will result - in an INVALID_OPERATION error only if one of the following conditions - occurs: - - * is not a multiple of four or equal to TEXTURE_WIDTH. - * is not a multiple of four or equal to TEXTURE_HEIGHT. - * or is not a multiple of four. - - The contents of any 4x4 block of texels of an S3TC compressed texture - image that does not intersect the area being modified are preserved during - valid TexSubImage2D and CopyTexSubImage2D calls. - -Additions to Chapter 4 of the OpenGL 1.2.1 Specification (Per-Fragment -Operations and the Frame Buffer) - - None. - -Additions to Chapter 5 of the OpenGL 1.2.1 Specification (Special Functions) - - None. - -Additions to Chapter 6 of the OpenGL 1.2.1 Specification (State and -State Requests) - - None. - -Additions to Appendix A of the OpenGL 1.2.1 Specification (Invariance) - - None. - -Additions to the AGL/GLX/WGL Specifications - - None. - -GLX Protocol - - None. - -Errors - - INVALID_ENUM is generated by CompressedTexImage1DARB or - CompressedTexImage3DARB if is - COMPRESSED_RGB_S3TC_DXT1_EXT, COMPRESSED_RGBA_S3TC_DXT1_EXT, - COMPRESSED_RGBA_S3TC_DXT3_EXT, or COMPRESSED_RGBA_S3TC_DXT5_EXT. - - INVALID_OPERATION is generated by CompressedTexImage2DARB if - is COMPRESSED_RGB_S3TC_DXT1_EXT, - COMPRESSED_RGBA_S3TC_DXT1_EXT, COMPRESSED_RGBA_S3TC_DXT3_EXT, or - COMPRESSED_RGBA_S3TC_DXT5_EXT and is not equal to zero. - - INVALID_ENUM is generated by CompressedTexSubImage1DARB or - CompressedTexSubImage3DARB if is COMPRESSED_RGB_S3TC_DXT1_EXT, - COMPRESSED_RGBA_S3TC_DXT1_EXT, COMPRESSED_RGBA_S3TC_DXT3_EXT, or - COMPRESSED_RGBA_S3TC_DXT5_EXT. - - INVALID_OPERATION is generated by TexSubImage2D CopyTexSubImage2D, or - CompressedTexSubImage2D if TEXTURE_INTERNAL_FORMAT is - COMPRESSED_RGB_S3TC_DXT1_EXT, COMPRESSED_RGBA_S3TC_DXT1_EXT, - COMPRESSED_RGBA_S3TC_DXT3_EXT, or COMPRESSED_RGBA_S3TC_DXT5_EXT and any of - the following apply: is not a multiple of four or equal to - TEXTURE_WIDTH; is not a multiple of four or equal to - TEXTURE_HEIGHT; or is not a multiple of four. - - - The following restrictions from the ARB_texture_compression specification - do not apply to S3TC texture formats, since subimage modification is - straightforward as long as the subimage is properly aligned. - - DELETE: INVALID_OPERATION is generated by TexSubImage1D, TexSubImage2D, - DELETE: TexSubImage3D, CopyTexSubImage1D, CopyTexSubImage2D, or - DELETE: CopyTexSubImage3D if the internal format of the texture image is - DELETE: compressed and , , or does not equal - DELETE: -b, where b is value of TEXTURE_BORDER. - - DELETE: INVALID_VALUE is generated by CompressedTexSubImage1DARB, - DELETE: CompressedTexSubImage2DARB, or CompressedTexSubImage3DARB if the - DELETE: entire texture image is not being edited: if , - DELETE: , or is greater than -b, + is - DELETE: less than w+b, + is less than h+b, or - DELETE: + is less than d+b, where b is the value of - DELETE: TEXTURE_BORDER, w is the value of TEXTURE_WIDTH, h is the value of - DELETE: TEXTURE_HEIGHT, and d is the value of TEXTURE_DEPTH. - - See also errors in the GL_ARB_texture_compression specification. - -New State - - In the "Textures" state table, increment the TEXTURE_INTERNAL_FORMAT - subscript for Z by 4 in the "Type" row. - -New Implementation Dependent State - - None - -Appendix - - S3TC Compressed Texture Image Formats - - Compressed texture images stored using the S3TC compressed image formats - are represented as a collection of 4x4 texel blocks, where each block - contains 64 or 128 bits of texel data. The image is encoded as a normal - 2D raster image in which each 4x4 block is treated as a single pixel. If - an S3TC image has a width or height less than four, the data corresponding - to texels outside the image are irrelevant and undefined. - - When an S3TC image with a width of , height of , and block size of - (8 or 16 bytes) is decoded, the corresponding image size (in - bytes) is: - - ceil(/4) * ceil(/4) * blocksize. - - When decoding an S3TC image, the block containing the texel at offset - (, ) begins at an offset (in bytes) relative to the base of the - image of: - - blocksize * (ceil(/4) * floor(/4) + floor(/4)). - - The data corresponding to a specific texel (, ) are extracted from a - 4x4 texel block using a relative (x,y) value of - - ( modulo 4, modulo 4). - - There are four distinct S3TC image formats: - - COMPRESSED_RGB_S3TC_DXT1_EXT: Each 4x4 block of texels consists of 64 - bits of RGB image data. - - Each RGB image data block is encoded as a sequence of 8 bytes, called (in - order of increasing address): - - c0_lo, c0_hi, c1_lo, c1_hi, bits_0, bits_1, bits_2, bits_3 - - The 8 bytes of the block are decoded into three quantities: - - color0 = c0_lo + c0_hi * 256 - color1 = c1_lo + c1_hi * 256 - bits = bits_0 + 256 * (bits_1 + 256 * (bits_2 + 256 * bits_3)) - - color0 and color1 are 16-bit unsigned integers that are unpacked to - RGB colors RGB0 and RGB1 as though they were 16-bit packed pixels with - a of RGB and a type of UNSIGNED_SHORT_5_6_5. - - bits is a 32-bit unsigned integer, from which a two-bit control code - is extracted for a texel at location (x,y) in the block using: - - code(x,y) = bits[2*(4*y+x)+1..2*(4*y+x)+0] - - where bit 31 is the most significant and bit 0 is the least - significant bit. - - The RGB color for a texel at location (x,y) in the block is given by: - - RGB0, if color0 > color1 and code(x,y) == 0 - RGB1, if color0 > color1 and code(x,y) == 1 - (2*RGB0+RGB1)/3, if color0 > color1 and code(x,y) == 2 - (RGB0+2*RGB1)/3, if color0 > color1 and code(x,y) == 3 - - RGB0, if color0 <= color1 and code(x,y) == 0 - RGB1, if color0 <= color1 and code(x,y) == 1 - (RGB0+RGB1)/2, if color0 <= color1 and code(x,y) == 2 - BLACK, if color0 <= color1 and code(x,y) == 3 - - Arithmetic operations are done per component, and BLACK refers to an - RGB color where red, green, and blue are all zero. - - Since this image has an RGB format, there is no alpha component and the - image is considered fully opaque. - - - COMPRESSED_RGBA_S3TC_DXT1_EXT: Each 4x4 block of texels consists of 64 - bits of RGB image data and minimal alpha information. The RGB components - of a texel are extracted in the same way as COMPRESSED_RGB_S3TC_DXT1_EXT. - - The alpha component for a texel at location (x,y) in the block is - given by: - - 0.0, if color0 <= color1 and code(x,y) == 3 - 1.0, otherwise - - IMPORTANT: When encoding an RGBA image into a format using 1-bit - alpha, any texels with an alpha component less than 0.5 end up with an - alpha of 0.0 and any texels with an alpha component greater than or - equal to 0.5 end up with an alpha of 1.0. When encoding an RGBA image - into the COMPRESSED_RGBA_S3TC_DXT1_EXT format, the resulting red, - green, and blue components of any texels with a final alpha of 0.0 - will automatically be zero (black). If this behavior is not desired - by an application, it should not use COMPRESSED_RGBA_S3TC_DXT1_EXT. - This format will never be used when a generic compressed internal - format (Table 3.16.2) is specified, although the nearly identical - format COMPRESSED_RGB_S3TC_DXT1_EXT (above) may be. - - - COMPRESSED_RGBA_S3TC_DXT3_EXT: Each 4x4 block of texels consists of 64 - bits of uncompressed alpha image data followed by 64 bits of RGB image - data. - - Each RGB image data block is encoded according to the - COMPRESSED_RGB_S3TC_DXT1_EXT format, with the exception that the two code - bits always use the non-transparent encodings. In other words, they are - treated as though color0 > color1, regardless of the actual values of - color0 and color1. - - Each alpha image data block is encoded as a sequence of 8 bytes, called - (in order of increasing address): - - a0, a1, a2, a3, a4, a5, a6, a7 - - The 8 bytes of the block are decoded into one 64-bit integer: - - alpha = a0 + 256 * (a1 + 256 * (a2 + 256 * (a3 + 256 * (a4 + - 256 * (a5 + 256 * (a6 + 256 * a7)))))) - - alpha is a 64-bit unsigned integer, from which a four-bit alpha value - is extracted for a texel at location (x,y) in the block using: - - alpha(x,y) = bits[4*(4*y+x)+3..4*(4*y+x)+0] - - where bit 63 is the most significant and bit 0 is the least - significant bit. - - The alpha component for a texel at location (x,y) in the block is - given by alpha(x,y) / 15. - - - COMPRESSED_RGBA_S3TC_DXT5_EXT: Each 4x4 block of texels consists of 64 - bits of compressed alpha image data followed by 64 bits of RGB image data. - - Each RGB image data block is encoded according to the - COMPRESSED_RGB_S3TC_DXT1_EXT format, with the exception that the two code - bits always use the non-transparent encodings. In other words, they are - treated as though color0 > color1, regardless of the actual values of - color0 and color1. - - Each alpha image data block is encoded as a sequence of 8 bytes, called - (in order of increasing address): - - alpha0, alpha1, bits_0, bits_1, bits_2, bits_3, bits_4, bits_5 - - The alpha0 and alpha1 are 8-bit unsigned bytes converted to alpha - components by multiplying by 1/255. - - The 6 "bits" bytes of the block are decoded into one 48-bit integer: - - bits = bits_0 + 256 * (bits_1 + 256 * (bits_2 + 256 * (bits_3 + - 256 * (bits_4 + 256 * bits_5)))) - - bits is a 48-bit unsigned integer, from which a three-bit control code - is extracted for a texel at location (x,y) in the block using: - - code(x,y) = bits[3*(4*y+x)+1..3*(4*y+x)+0] - - where bit 47 is the most significant and bit 0 is the least - significant bit. - - The alpha component for a texel at location (x,y) in the block is - given by: - - alpha0, code(x,y) == 0 - alpha1, code(x,y) == 1 - - (6*alpha0 + 1*alpha1)/7, alpha0 > alpha1 and code(x,y) == 2 - (5*alpha0 + 2*alpha1)/7, alpha0 > alpha1 and code(x,y) == 3 - (4*alpha0 + 3*alpha1)/7, alpha0 > alpha1 and code(x,y) == 4 - (3*alpha0 + 4*alpha1)/7, alpha0 > alpha1 and code(x,y) == 5 - (2*alpha0 + 5*alpha1)/7, alpha0 > alpha1 and code(x,y) == 6 - (1*alpha0 + 6*alpha1)/7, alpha0 > alpha1 and code(x,y) == 7 - - (4*alpha0 + 1*alpha1)/5, alpha0 <= alpha1 and code(x,y) == 2 - (3*alpha0 + 2*alpha1)/5, alpha0 <= alpha1 and code(x,y) == 3 - (2*alpha0 + 3*alpha1)/5, alpha0 <= alpha1 and code(x,y) == 4 - (1*alpha0 + 4*alpha1)/5, alpha0 <= alpha1 and code(x,y) == 5 - 0.0, alpha0 <= alpha1 and code(x,y) == 6 - 1.0, alpha0 <= alpha1 and code(x,y) == 7 - - -Revision History - - 1.1, 11/16/01 pbrown: Updated contact info, clarified where texels - fall within a single block. - - 1.0, 07/07/00 prbrown1: Published final version agreed to by working - group members. - - 0.9, 06/24/00 prbrown1: Documented that block-aligned TexSubImage calls - do not modify existing texels outside the - modified blocks. Added caveat to allow for a - (0,0)-anchored TexSubImage operation of - arbitrary size. - - 0.7, 04/11/00 prbrown1: Added issues on DXT1, DXT3, and DXT5 encodings - where the MSDN documentation doesn't match what - is really done. Added enum values from the - extension registry. - - 0.4, 03/28/00 prbrown1: Updated to reflect final version of the - ARB_texture_compression extension. Allowed - block-aligned TexSubImage calls. - - 0.3, 03/07/00 prbrown1: Resolved issues pertaining to the format of RGB - blocks in the DXT3 and DXT5 formats (they don't - ever use the "transparent" encoding). Fixed - decoding of DXT1 blocks. Pointed out issue of - "transparent" texels in DXT1 encodings having - different behaviors for RGB and RGBA internal - formats. - - 0.2, 02/23/00 prbrown1: Minor revisions; added several issues. - - 0.11, 02/17/00 prbrown1: Slight modification to error semantics - (INVALID_ENUM instead of INVALID_OPERATION). - - 0.1, 02/15/00 prbrown1: Initial revision. diff --git a/Engine/source/.gitattributes b/Engine/source/.gitattributes new file mode 100644 index 000000000..abf67ea1d --- /dev/null +++ b/Engine/source/.gitattributes @@ -0,0 +1,5 @@ +*.cpp filter=tabspace +*.h filter=tabspace +*.l filter=tabspace +*.y filter=tabspace +*.mm filter=tabspace diff --git a/Engine/source/T3D/aiPlayer.cpp b/Engine/source/T3D/aiPlayer.cpp index e952c2a8c..38a3133e6 100644 --- a/Engine/source/T3D/aiPlayer.cpp +++ b/Engine/source/T3D/aiPlayer.cpp @@ -35,9 +35,9 @@ static U32 sAIPlayerLoSMask = TerrainObjectType | StaticShapeObjectType | Static IMPLEMENT_CO_NETOBJECT_V1(AIPlayer); ConsoleDocClass( AIPlayer, - "@brief A Player object not controlled by conventional input, but by an AI engine.\n\n" + "@brief A Player object not controlled by conventional input, but by an AI engine.\n\n" - "The AIPlayer provides a Player object that may be controlled from script. You control " + "The AIPlayer provides a Player object that may be controlled from script. You control " "where the player moves and how fast. You may also set where the AIPlayer is aiming at " "-- either a location or another game object.\n\n" @@ -70,19 +70,19 @@ ConsoleDocClass( AIPlayer, "position to the center of the target's bounding box. The LOS ray test only checks against interiors, " "statis shapes, and terrain.\n\n" - "@tsexample\n" - "// Create the demo player object\n" - "%player = new AiPlayer()\n" - "{\n" - " dataBlock = DemoPlayer;\n" - " path = \"\";\n" - "};\n" - "@endtsexample\n\n" + "@tsexample\n" + "// Create the demo player object\n" + "%player = new AiPlayer()\n" + "{\n" + " dataBlock = DemoPlayer;\n" + " path = \"\";\n" + "};\n" + "@endtsexample\n\n" - "@see Player for a list of all inherited functions, variables, and base description\n" + "@see Player for a list of all inherited functions, variables, and base description\n" - "@ingroup AI\n" - "@ingroup gameObjects\n"); + "@ingroup AI\n" + "@ingroup gameObjects\n"); /** * Constructor */ @@ -147,7 +147,7 @@ void AIPlayer::initPersistFields() addField( "AttackRadius", TypeF32, Offset( mAttackRadius, AIPlayer ), "@brief Distance considered in firing range for callback purposes."); - + endGroup( "AI" ); #ifdef TORQUE_NAVIGATION_ENABLED @@ -399,11 +399,11 @@ bool AIPlayer::getAIMove(Move *movePtr) { clearPath(); mMoveState = ModeStop; - throwCallback("onTargetInRange"); + throwCallback("onTargetInRange"); } else if((getPosition() - mFollowData.object->getPosition()).len() < mAttackRadius) { - throwCallback("onTargetInFiringRange"); + throwCallback("onTargetInFiringRange"); } } } @@ -854,7 +854,7 @@ DefineEngineMethod(AIPlayer, getPathDestination, Point3F, (),, "@see setPathDestination()\n") { - return object->getPathDestination(); + return object->getPathDestination(); } void AIPlayer::followNavPath(NavPath *path) @@ -1148,7 +1148,7 @@ DefineEngineMethod( AIPlayer, setMoveSpeed, void, ( F32 speed ),, "@see getMoveDestination()\n") { - object->setMoveSpeed(speed); + object->setMoveSpeed(speed); } DefineEngineMethod( AIPlayer, getMoveSpeed, F32, ( ),, @@ -1186,7 +1186,7 @@ DefineEngineMethod( AIPlayer, getMoveDestination, Point3F, (),, "@see setMoveDestination()\n") { - return object->getMoveDestination(); + return object->getMoveDestination(); } DefineEngineMethod( AIPlayer, setAimLocation, void, ( Point3F target ),, @@ -1196,7 +1196,7 @@ DefineEngineMethod( AIPlayer, setAimLocation, void, ( Point3F target ),, "@see getAimLocation()\n") { - object->setAimLocation(target); + object->setAimLocation(target); } DefineEngineMethod( AIPlayer, getAimLocation, Point3F, (),, @@ -1212,7 +1212,7 @@ DefineEngineMethod( AIPlayer, getAimLocation, Point3F, (),, "@see setAimLocation()\n" "@see setAimObject()\n") { - return object->getAimLocation(); + return object->getAimLocation(); } ConsoleDocFragment _setAimObject( @@ -1240,7 +1240,7 @@ ConsoleDocFragment _setAimObject( DefineConsoleMethod( AIPlayer, setAimObject, void, ( const char * objName, Point3F offset ), (Point3F::Zero), "( GameBase obj, [Point3F offset] )" "Sets the bot's target object. Optionally set an offset from target location." - "@hide") + "@hide") { // Find the target @@ -1262,7 +1262,7 @@ DefineEngineMethod( AIPlayer, getAimObject, S32, (),, "@see setAimObject()\n") { - GameBase* obj = object->getAimObject(); + GameBase* obj = object->getAimObject(); return obj? obj->getId(): -1; } diff --git a/Engine/source/T3D/camera.cpp b/Engine/source/T3D/camera.cpp index a2acc3838..3a3fb9e4d 100644 --- a/Engine/source/T3D/camera.cpp +++ b/Engine/source/T3D/camera.cpp @@ -1351,7 +1351,7 @@ void Camera::consoleInit() // ExtendedMove support Con::addVariable("$camera::extendedMovePosRotIndex", TypeS32, &smExtendedMovePosRotIndex, "@brief The ExtendedMove position/rotation index used for camera movements.\n\n" - "@ingroup BaseCamera\n"); + "@ingroup BaseCamera\n"); } //----------------------------------------------------------------------------- diff --git a/Engine/source/T3D/decal/decalManager.cpp b/Engine/source/T3D/decal/decalManager.cpp index 2d2491a7f..812fa099d 100644 --- a/Engine/source/T3D/decal/decalManager.cpp +++ b/Engine/source/T3D/decal/decalManager.cpp @@ -546,7 +546,7 @@ void DecalManager::removeDecal( DecalInstance *inst ) // Remove the decal from the instance vector. - if( inst->mId != -1 && inst->mId < mDecalInstanceVec.size() ) + if( inst->mId != -1 && inst->mId < mDecalInstanceVec.size() ) mDecalInstanceVec[ inst->mId ] = NULL; // Release its geometry (if it has any). @@ -674,23 +674,23 @@ DecalInstance* DecalManager::raycast( const Point3F &start, const Point3F &end, if ( !worldSphere.intersectsRay( start, end ) ) continue; - - RayInfo ri; - bool containsPoint = false; - if ( gServerContainer.castRayRendered( start, end, STATIC_COLLISION_TYPEMASK, &ri ) ) - { - Point2F poly[4]; - poly[0].set( inst->mPosition.x - (inst->mSize / 2), inst->mPosition.y + (inst->mSize / 2)); - poly[1].set( inst->mPosition.x - (inst->mSize / 2), inst->mPosition.y - (inst->mSize / 2)); - poly[2].set( inst->mPosition.x + (inst->mSize / 2), inst->mPosition.y - (inst->mSize / 2)); - poly[3].set( inst->mPosition.x + (inst->mSize / 2), inst->mPosition.y + (inst->mSize / 2)); - - if ( MathUtils::pointInPolygon( poly, 4, Point2F(ri.point.x, ri.point.y) ) ) - containsPoint = true; - } + + RayInfo ri; + bool containsPoint = false; + if ( gServerContainer.castRayRendered( start, end, STATIC_COLLISION_TYPEMASK, &ri ) ) + { + Point2F poly[4]; + poly[0].set( inst->mPosition.x - (inst->mSize / 2), inst->mPosition.y + (inst->mSize / 2)); + poly[1].set( inst->mPosition.x - (inst->mSize / 2), inst->mPosition.y - (inst->mSize / 2)); + poly[2].set( inst->mPosition.x + (inst->mSize / 2), inst->mPosition.y - (inst->mSize / 2)); + poly[3].set( inst->mPosition.x + (inst->mSize / 2), inst->mPosition.y + (inst->mSize / 2)); + + if ( MathUtils::pointInPolygon( poly, 4, Point2F(ri.point.x, ri.point.y) ) ) + containsPoint = true; + } - if( !containsPoint ) - continue; + if( !containsPoint ) + continue; hitDecals.push_back( inst ); } @@ -1406,7 +1406,7 @@ void DecalManager::prepRenderImage( SceneRenderState* state ) query.init( rootFrustum.getPosition(), rootFrustum.getTransform().getForwardVector(), rootFrustum.getFarDist() ); - query.getLights( baseRenderInst.lights, 8 ); + query.getLights( baseRenderInst.lights, 8 ); } // Submit render inst... @@ -1575,7 +1575,7 @@ void DecalManager::clearData() } mData = NULL; - mDecalInstanceVec.clear(); + mDecalInstanceVec.clear(); _freePools(); } @@ -1758,7 +1758,7 @@ DefineEngineFunction( decalManagerEditDecal, bool, ( S32 decalID, Point3F pos, P { DecalInstance *decalInstance = gDecalManager->getDecal( decalID ); if( !decalInstance ) - return false; + return false; //Internally we need Point3F tangent instead of the user friendly F32 rotAroundNormal MatrixF mat( true ); diff --git a/Engine/source/T3D/fx/lightning.cpp b/Engine/source/T3D/fx/lightning.cpp index 027b329e5..767cb44f1 100644 --- a/Engine/source/T3D/fx/lightning.cpp +++ b/Engine/source/T3D/fx/lightning.cpp @@ -540,8 +540,8 @@ void Lightning::renderObject(ObjectRenderInst *ri, SceneRenderState *state, Base } //GFX->setZWriteEnable(true); - //GFX->setAlphaTestEnable(false); - //GFX->setAlphaBlendEnable(false); + //GFX->setAlphaTestEnable(false); + //GFX->setAlphaBlendEnable(false); } void Lightning::scheduleThunder(Strike* newStrike) @@ -743,9 +743,9 @@ void Lightning::warningFlashes() { LightningStrikeEvent* pEvent = new LightningStrikeEvent; pEvent->mLightning = this; - - pEvent->mStart.x = strikePoint.x; - pEvent->mStart.y = strikePoint.y; + + pEvent->mStart.x = strikePoint.x; + pEvent->mStart.y = strikePoint.y; nc->postNetEvent(pEvent); } @@ -905,7 +905,7 @@ void Lightning::strikeObject(ShapeBase* targetObj) { LightningStrikeEvent* pEvent = new LightningStrikeEvent; pEvent->mLightning = this; - + pEvent->mStart.x = strikePoint.x; pEvent->mStart.y = strikePoint.y; pEvent->mTarget = targetObj; @@ -1100,7 +1100,7 @@ void LightningBolt::render( const Point3F &camPos ) renderSegment(mMinorNodes[i], camPos, false); } - PrimBuild::end(); + PrimBuild::end(); for(LightingBoltList::Iterator i = splitList.begin(); i != splitList.end(); ++i) { @@ -1230,7 +1230,7 @@ void LightningBolt::createSplit( const Point3F &startingPoint, const Point3F &en { if( depth == 0 ) return; - + F32 chanceToEnd = gRandGen.randF(); if( chanceToEnd > 0.70f ) return; @@ -1275,7 +1275,7 @@ void LightningBolt::startSplits() for( U32 i=0; i 0.3f ) - continue; + continue; Node node = mMajorNodes.nodeList[i]; Node node2 = mMajorNodes.nodeList[i+1]; diff --git a/Engine/source/T3D/physics/bullet/btBody.cpp b/Engine/source/T3D/physics/bullet/btBody.cpp index 33d0240a4..32e8945c9 100644 --- a/Engine/source/T3D/physics/bullet/btBody.cpp +++ b/Engine/source/T3D/physics/bullet/btBody.cpp @@ -76,7 +76,7 @@ bool BtBody::init( PhysicsCollision *shape, AssertFatal( shape, "BtBody::init - Got a null collision shape!" ); AssertFatal( dynamic_cast( shape ), "BtBody::init - The collision shape is the wrong type!" ); AssertFatal( ((BtCollision*)shape)->getShape(), "BtBody::init - Got empty collision shape!" ); - + // Cleanup any previous actor. _releaseActor(); @@ -97,20 +97,20 @@ bool BtBody::init( PhysicsCollision *shape, btScalar *masses = new btScalar[ btCompound->getNumChildShapes() ]; for ( U32 j=0; j < btCompound->getNumChildShapes(); j++ ) - masses[j] = mass / btCompound->getNumChildShapes(); + masses[j] = mass / btCompound->getNumChildShapes(); btVector3 principalInertia; btTransform principal; btCompound->calculatePrincipalAxisTransform( masses, principal, principalInertia ); delete [] masses; - // Create a new compound with the shifted children. - btColShape = mCompound = new btCompoundShape(); - for ( U32 i=0; i < btCompound->getNumChildShapes(); i++ ) - { - btTransform newChildTransform = principal.inverse() * btCompound->getChildTransform(i); - mCompound->addChildShape( newChildTransform, btCompound->getChildShape(i) ); - } + // Create a new compound with the shifted children. + btColShape = mCompound = new btCompoundShape(); + for ( U32 i=0; i < btCompound->getNumChildShapes(); i++ ) + { + btTransform newChildTransform = principal.inverse() * btCompound->getChildTransform(i); + mCompound->addChildShape( newChildTransform, btCompound->getChildShape(i) ); + } localXfm = btCast( principal ); } diff --git a/Engine/source/T3D/physics/bullet/btWorld.cpp b/Engine/source/T3D/physics/bullet/btWorld.cpp index 0ad7418b8..0e71666d1 100644 --- a/Engine/source/T3D/physics/bullet/btWorld.cpp +++ b/Engine/source/T3D/physics/bullet/btWorld.cpp @@ -53,7 +53,7 @@ bool BtWorld::initWorld( bool isServer, ProcessList *processList ) { // Collision configuration contains default setup for memory, collision setup. mCollisionConfiguration = new btDefaultCollisionConfiguration(); - mDispatcher = new btCollisionDispatcher( mCollisionConfiguration ); + mDispatcher = new btCollisionDispatcher( mCollisionConfiguration ); btVector3 worldMin( -2000, -2000, -1000 ); btVector3 worldMax( 2000, 2000, 1000 ); diff --git a/Engine/source/T3D/physics/physicsShape.cpp b/Engine/source/T3D/physics/physicsShape.cpp index 627b38a35..662fa9769 100644 --- a/Engine/source/T3D/physics/physicsShape.cpp +++ b/Engine/source/T3D/physics/physicsShape.cpp @@ -242,7 +242,7 @@ void PhysicsShapeData::onRemove() void PhysicsShapeData::_onResourceChanged( const Torque::Path &path ) { - if ( path != Path( shapeName ) ) + if ( path != Path( shapeName ) ) return; // Reload the changed shape. @@ -360,8 +360,8 @@ bool PhysicsShapeData::preload( bool server, String &errorBuffer ) Vector mHulls; }; - DecompDesc d; - d.mVcount = polyList.mVertexList.size(); + DecompDesc d; + d.mVcount = polyList.mVertexList.size(); d.mVertices = doubleVerts.address(); d.mTcount = polyList.mIndexList.size() / 3; d.mIndices = polyList.mIndexList.address(); @@ -659,7 +659,7 @@ void PhysicsShape::onRemove() PhysicsPlugin::getPhysicsResetSignal().remove( this, &PhysicsShape::_onPhysicsReset ); if ( mDestroyedShape ) - mDestroyedShape->deleteObject(); + mDestroyedShape->deleteObject(); } // Remove the resource change signal. diff --git a/Engine/source/T3D/physics/physx3/px3Body.cpp b/Engine/source/T3D/physics/physx3/px3Body.cpp index 2d5fb46f7..ec4e3b979 100644 --- a/Engine/source/T3D/physics/physx3/px3Body.cpp +++ b/Engine/source/T3D/physics/physx3/px3Body.cpp @@ -80,7 +80,7 @@ bool Px3Body::init( PhysicsCollision *shape, AssertFatal( shape, "Px3Body::init - Got a null collision shape!" ); AssertFatal( dynamic_cast( shape ), "Px3Body::init - The collision shape is the wrong type!" ); AssertFatal( !((Px3Collision*)shape)->getShapes().empty(), "Px3Body::init - Got empty collision shape!" ); - + // Cleanup any previous actor. _releaseActor(); @@ -94,10 +94,10 @@ bool Px3Body::init( PhysicsCollision *shape, if ( isKinematic ) { - mActor = gPhysics3SDK->createRigidDynamic(physx::PxTransform(physx::PxIDENTITY())); - physx::PxRigidDynamic *actor = mActor->is(); - actor->setRigidDynamicFlag(physx::PxRigidDynamicFlag::eKINEMATIC, true); - actor->setMass(getMax( mass, 1.0f )); + mActor = gPhysics3SDK->createRigidDynamic(physx::PxTransform(physx::PxIDENTITY())); + physx::PxRigidDynamic *actor = mActor->is(); + actor->setRigidDynamicFlag(physx::PxRigidDynamicFlag::eKINEMATIC, true); + actor->setMass(getMax( mass, 1.0f )); } else if ( mass > 0.0f ) { @@ -107,7 +107,7 @@ bool Px3Body::init( PhysicsCollision *shape, { mActor = gPhysics3SDK->createRigidStatic(physx::PxTransform(physx::PxIDENTITY())); mIsStatic = true; - } + } mMaterial = gPhysics3SDK->createMaterial(0.6f,0.4f,0.1f); @@ -115,22 +115,22 @@ bool Px3Body::init( PhysicsCollision *shape, const Vector &shapes = mColShape->getShapes(); for ( U32 i=0; i < shapes.size(); i++ ) { - Px3CollisionDesc* desc = shapes[i]; - if( mass > 0.0f ) - { - if(desc->pGeometry->getType() == physx::PxGeometryType::eTRIANGLEMESH) - { - Con::errorf("PhysX3 Dynamic Triangle Mesh is not supported."); - } - } - physx::PxShape * pShape = mActor->createShape(*desc->pGeometry,*mMaterial); - physx::PxFilterData colData; - if(isDebris) - colData.word0 = PX3_DEBRIS; - else if(isTrigger) + Px3CollisionDesc* desc = shapes[i]; + if( mass > 0.0f ) + { + if(desc->pGeometry->getType() == physx::PxGeometryType::eTRIANGLEMESH) + { + Con::errorf("PhysX3 Dynamic Triangle Mesh is not supported."); + } + } + physx::PxShape * pShape = mActor->createShape(*desc->pGeometry,*mMaterial); + physx::PxFilterData colData; + if(isDebris) + colData.word0 = PX3_DEBRIS; + else if(isTrigger) colData.word0 = PX3_TRIGGER; - else - colData.word0 = PX3_DEFAULT; + else + colData.word0 = PX3_DEFAULT; //set local pose - actor->createShape with a local pose is deprecated in physx 3.3 pShape->setLocalPose(desc->pose); @@ -145,8 +145,8 @@ bool Px3Body::init( PhysicsCollision *shape, //mass & intertia has to be set after creating the shape if ( mass > 0.0f ) { - physx::PxRigidDynamic *actor = mActor->is(); - physx::PxRigidBodyExt::setMassAndUpdateInertia(*actor,mass); + physx::PxRigidDynamic *actor = mActor->is(); + physx::PxRigidBodyExt::setMassAndUpdateInertia(*actor,mass); } // This sucks, but it has to happen if we want @@ -178,9 +178,9 @@ void Px3Body::setMaterial( F32 restitution, actor->wakeUp(); } - mMaterial->setRestitution(restitution); - mMaterial->setStaticFriction(staticFriction); - mMaterial->setDynamicFriction(friction); + mMaterial->setRestitution(restitution); + mMaterial->setStaticFriction(staticFriction); + mMaterial->setDynamicFriction(friction); } @@ -189,7 +189,7 @@ void Px3Body::setSleepThreshold( F32 linear, F32 angular ) AssertFatal( mActor, "Px3Body::setSleepThreshold - The actor is null!" ); if(mIsStatic) - return; + return; physx::PxRigidDynamic *actor = mActor->is(); physx::PxF32 massNormalized= (linear*linear+angular*angular)/2.0f; @@ -200,7 +200,7 @@ void Px3Body::setDamping( F32 linear, F32 angular ) { AssertFatal( mActor, "Px3Body::setDamping - The actor is null!" ); if(mIsStatic) - return; + return; physx::PxRigidDynamic *actor = mActor->is(); actor->setLinearDamping( linear ); @@ -227,7 +227,7 @@ F32 Px3Body::getMass() const { AssertFatal( mActor, "PxBody::getCMassPosition - The actor is null!" ); if(mIsStatic) - return 0; + return 0; const physx::PxRigidDynamic *actor = mActor->is(); return actor->getMass(); @@ -237,7 +237,7 @@ Point3F Px3Body::getCMassPosition() const { AssertFatal( mActor, "Px3Body::getCMassPosition - The actor is null!" ); if(mIsStatic) - return px3Cast(mActor->getGlobalPose().p); + return px3Cast(mActor->getGlobalPose().p); physx::PxRigidDynamic *actor = mActor->is(); physx::PxTransform pose = actor->getGlobalPose() * actor->getCMassLocalPose(); @@ -326,11 +326,11 @@ Box3F Px3Body::getWorldBounds() U32 shapeCount = mActor->getNbShapes(); - physx::PxShape **shapes = new physx::PxShape*[shapeCount]; - mActor->getShapes(shapes, shapeCount); + physx::PxShape **shapes = new physx::PxShape*[shapeCount]; + mActor->getShapes(shapes, shapeCount); for ( U32 i = 0; i < shapeCount; i++ ) { - // Get the shape's bounds. + // Get the shape's bounds. shapeBounds = physx::PxShapeExt::getWorldBounds(*shapes[i],*mActor); // Combine them into the total bounds. bounds.include( shapeBounds ); @@ -355,11 +355,11 @@ void Px3Body::setSimulationEnabled( bool enabled ) mWorld->releaseWriteLock(); U32 shapeCount = mActor->getNbShapes(); - physx::PxShape **shapes = new physx::PxShape*[shapeCount]; - mActor->getShapes(shapes, shapeCount); + physx::PxShape **shapes = new physx::PxShape*[shapeCount]; + mActor->getShapes(shapes, shapeCount); for ( S32 i = 0; i < mActor->getNbShapes(); i++ ) { - shapes[i]->setFlag(physx::PxShapeFlag::eSIMULATION_SHAPE,!mIsEnabled);//????? + shapes[i]->setFlag(physx::PxShapeFlag::eSIMULATION_SHAPE,!mIsEnabled);//????? } delete [] shapes; @@ -377,10 +377,10 @@ void Px3Body::setTransform( const MatrixF &transform ) mActor->setGlobalPose(px3Cast(transform),false); if(mIsStatic) - return; + return; - physx::PxRigidDynamic *actor = mActor->is(); - bool kinematic = actor->getRigidDynamicFlags() & physx::PxRigidDynamicFlag::eKINEMATIC; + physx::PxRigidDynamic *actor = mActor->is(); + bool kinematic = actor->getRigidDynamicFlags() & physx::PxRigidDynamicFlag::eKINEMATIC; // If its dynamic we have more to do. if ( isDynamic() && !kinematic ) { @@ -412,8 +412,8 @@ void Px3Body::applyImpulse( const Point3F &origin, const Point3F &force ) physx::PxRigidDynamic *actor = mActor->is(); if ( mIsEnabled && isDynamic() ) physx::PxRigidBodyExt::addForceAtPos(*actor,px3Cast(force), - px3Cast(origin), - physx::PxForceMode::eIMPULSE); + px3Cast(origin), + physx::PxForceMode::eIMPULSE); } diff --git a/Engine/source/T3D/physics/physx3/px3Body.h b/Engine/source/T3D/physics/physx3/px3Body.h index 7873293bc..30f6f8895 100644 --- a/Engine/source/T3D/physics/physx3/px3Body.h +++ b/Engine/source/T3D/physics/physx3/px3Body.h @@ -41,9 +41,9 @@ class Px3Collision; struct Px3CollisionDesc; namespace physx{ - class PxRigidActor; - class PxMaterial; - class PxShape; + class PxRigidActor; + class PxMaterial; + class PxShape; } diff --git a/Engine/source/T3D/physics/physx3/px3World.cpp b/Engine/source/T3D/physics/physx3/px3World.cpp index 026d77832..a3732634e 100644 --- a/Engine/source/T3D/physics/physx3/px3World.cpp +++ b/Engine/source/T3D/physics/physx3/px3World.cpp @@ -71,113 +71,113 @@ Px3World::~Px3World() physx::PxCooking *Px3World::getCooking() { - return smCooking; + return smCooking; } bool Px3World::restartSDK( bool destroyOnly, Px3World *clientWorld, Px3World *serverWorld) { - // If either the client or the server still exist - // then we cannot reset the SDK. - if ( clientWorld || serverWorld ) - return false; + // If either the client or the server still exist + // then we cannot reset the SDK. + if ( clientWorld || serverWorld ) + return false; - if(smPvdConnection) - smPvdConnection->release(); + if(smPvdConnection) + smPvdConnection->release(); - if(smCooking) - smCooking->release(); + if(smCooking) + smCooking->release(); - if(smCpuDispatcher) - smCpuDispatcher->release(); + if(smCpuDispatcher) + smCpuDispatcher->release(); // Destroy the existing SDK. - if ( gPhysics3SDK ) - { - PxCloseExtensions(); - gPhysics3SDK->release(); - } + if ( gPhysics3SDK ) + { + PxCloseExtensions(); + gPhysics3SDK->release(); + } if(smErrorCallback) { SAFE_DELETE(smErrorCallback); } - if(smFoundation) - { - smFoundation->release(); - SAFE_DELETE(smErrorCallback); - } + if(smFoundation) + { + smFoundation->release(); + SAFE_DELETE(smErrorCallback); + } - // If we're not supposed to restart... return. - if ( destroyOnly ) + // If we're not supposed to restart... return. + if ( destroyOnly ) return true; - bool memTrack = false; + bool memTrack = false; #ifdef TORQUE_DEBUG - memTrack = true; + memTrack = true; #endif - smErrorCallback = new Px3ConsoleStream; - smFoundation = PxCreateFoundation(PX_PHYSICS_VERSION, smMemoryAlloc, *smErrorCallback); - smProfileZoneManager = &physx::PxProfileZoneManager::createProfileZoneManager(smFoundation); - gPhysics3SDK = PxCreatePhysics(PX_PHYSICS_VERSION, *smFoundation, physx::PxTolerancesScale(),memTrack,smProfileZoneManager); + smErrorCallback = new Px3ConsoleStream; + smFoundation = PxCreateFoundation(PX_PHYSICS_VERSION, smMemoryAlloc, *smErrorCallback); + smProfileZoneManager = &physx::PxProfileZoneManager::createProfileZoneManager(smFoundation); + gPhysics3SDK = PxCreatePhysics(PX_PHYSICS_VERSION, *smFoundation, physx::PxTolerancesScale(),memTrack,smProfileZoneManager); - if ( !gPhysics3SDK ) - { - Con::errorf( "PhysX3 failed to initialize!" ); - Platform::messageBox( Con::getVariable( "$appName" ), + if ( !gPhysics3SDK ) + { + Con::errorf( "PhysX3 failed to initialize!" ); + Platform::messageBox( Con::getVariable( "$appName" ), avar("PhysX3 could not be started!\r\n"), MBOk, MIStop ); - Platform::forceShutdown( -1 ); + Platform::forceShutdown( -1 ); - // We shouldn't get here, but this shuts up - // source diagnostic tools. - return false; - } + // We shouldn't get here, but this shuts up + // source diagnostic tools. + return false; + } - if(!PxInitExtensions(*gPhysics3SDK)) - { - Con::errorf( "PhysX3 failed to initialize extensions!" ); - Platform::messageBox( Con::getVariable( "$appName" ), + if(!PxInitExtensions(*gPhysics3SDK)) + { + Con::errorf( "PhysX3 failed to initialize extensions!" ); + Platform::messageBox( Con::getVariable( "$appName" ), avar("PhysX3 could not be started!\r\n"), MBOk, MIStop ); - Platform::forceShutdown( -1 ); - return false; - } + Platform::forceShutdown( -1 ); + return false; + } - smCooking = PxCreateCooking(PX_PHYSICS_VERSION, *smFoundation, physx::PxCookingParams(physx::PxTolerancesScale())); - if(!smCooking) - { - Con::errorf( "PhysX3 failed to initialize cooking!" ); - Platform::messageBox( Con::getVariable( "$appName" ), + smCooking = PxCreateCooking(PX_PHYSICS_VERSION, *smFoundation, physx::PxCookingParams(physx::PxTolerancesScale())); + if(!smCooking) + { + Con::errorf( "PhysX3 failed to initialize cooking!" ); + Platform::messageBox( Con::getVariable( "$appName" ), avar("PhysX3 could not be started!\r\n"), MBOk, MIStop ); - Platform::forceShutdown( -1 ); - return false; - } + Platform::forceShutdown( -1 ); + return false; + } #ifdef TORQUE_DEBUG - physx::PxVisualDebuggerConnectionFlags connectionFlags(physx::PxVisualDebuggerExt::getAllConnectionFlags()); - smPvdConnection = physx::PxVisualDebuggerExt::createConnection(gPhysics3SDK->getPvdConnectionManager(), - "localhost", 5425, 100, connectionFlags); + physx::PxVisualDebuggerConnectionFlags connectionFlags(physx::PxVisualDebuggerExt::getAllConnectionFlags()); + smPvdConnection = physx::PxVisualDebuggerExt::createConnection(gPhysics3SDK->getPvdConnectionManager(), + "localhost", 5425, 100, connectionFlags); #endif - return true; + return true; } void Px3World::destroyWorld() { - getPhysicsResults(); + getPhysicsResults(); mRenderBuffer = NULL; - // Release the tick processing signals. - if ( mProcessList ) - { - mProcessList->preTickSignal().remove( this, &Px3World::getPhysicsResults ); - mProcessList->postTickSignal().remove( this, &Px3World::tickPhysics ); - mProcessList = NULL; - } + // Release the tick processing signals. + if ( mProcessList ) + { + mProcessList->preTickSignal().remove( this, &Px3World::getPhysicsResults ); + mProcessList->postTickSignal().remove( this, &Px3World::tickPhysics ); + mProcessList = NULL; + } if(mControllerManager) { @@ -185,13 +185,13 @@ void Px3World::destroyWorld() mControllerManager = NULL; } - // Destroy the scene. - if ( mScene ) - { - // Release the scene. - mScene->release(); - mScene = NULL; - } + // Destroy the scene. + if ( mScene ) + { + // Release the scene. + mScene->release(); + mScene = NULL; + } } bool Px3World::initWorld( bool isServer, ProcessList *processList ) @@ -203,7 +203,7 @@ bool Px3World::initWorld( bool isServer, ProcessList *processList ) } mIsServer = isServer; - + physx::PxSceneDesc sceneDesc(gPhysics3SDK->getTolerancesScale()); sceneDesc.gravity = px3Cast(mGravity); @@ -217,26 +217,26 @@ bool Px3World::initWorld( bool isServer, ProcessList *processList ) sceneDesc.cpuDispatcher = smCpuDispatcher; Con::printf("PhysX3 using Cpu: %d workers", smCpuDispatcher->getWorkerCount()); } - + sceneDesc.flags |= physx::PxSceneFlag::eENABLE_CCD; sceneDesc.flags |= physx::PxSceneFlag::eENABLE_ACTIVETRANSFORMS; sceneDesc.filterShader = physx::PxDefaultSimulationFilterShader; - mScene = gPhysics3SDK->createScene(sceneDesc); + mScene = gPhysics3SDK->createScene(sceneDesc); //cache renderbuffer for use with debug drawing mRenderBuffer = const_cast(&mScene->getRenderBuffer()); - physx::PxDominanceGroupPair debrisDominance( 0.0f, 1.0f ); - mScene->setDominanceGroupPair(0,31,debrisDominance); + physx::PxDominanceGroupPair debrisDominance( 0.0f, 1.0f ); + mScene->setDominanceGroupPair(0,31,debrisDominance); mControllerManager = PxCreateControllerManager(*mScene); - AssertFatal( processList, "Px3World::init() - We need a process list to create the world!" ); - mProcessList = processList; - mProcessList->preTickSignal().notify( this, &Px3World::getPhysicsResults ); - mProcessList->postTickSignal().notify( this, &Px3World::tickPhysics, 1000.0f ); + AssertFatal( processList, "Px3World::init() - We need a process list to create the world!" ); + mProcessList = processList; + mProcessList->preTickSignal().notify( this, &Px3World::getPhysicsResults ); + mProcessList->postTickSignal().notify( this, &Px3World::tickPhysics, 1000.0f ); - return true; + return true; } // Most of this borrowed from bullet physics library, see btDiscreteDynamicsWorld.cpp bool Px3World::_simulate(const F32 dt) @@ -249,21 +249,21 @@ bool Px3World::_simulate(const F32 dt) numSimulationSubSteps = S32(mAccumulator / smPhysicsStepTime); mAccumulator -= numSimulationSubSteps * smPhysicsStepTime; } - if (numSimulationSubSteps) - { - //clamp the number of substeps, to prevent simulation grinding spiralling down to a halt - S32 clampedSimulationSteps = (numSimulationSubSteps > smPhysicsMaxSubSteps)? smPhysicsMaxSubSteps : numSimulationSubSteps; - - for (S32 i=0;ifetchResults(true); - mScene->simulate(smPhysicsStepTime); - } - } - - mIsSimulating = true; + if (numSimulationSubSteps) + { + //clamp the number of substeps, to prevent simulation grinding spiralling down to a halt + S32 clampedSimulationSteps = (numSimulationSubSteps > smPhysicsMaxSubSteps)? smPhysicsMaxSubSteps : numSimulationSubSteps; + + for (S32 i=0;ifetchResults(true); + mScene->simulate(smPhysicsStepTime); + } + } + + mIsSimulating = true; - return true; + return true; } void Px3World::tickPhysics( U32 elapsedMs ) @@ -290,45 +290,45 @@ void Px3World::tickPhysics( U32 elapsedMs ) void Px3World::getPhysicsResults() { - if ( !mScene || !mIsSimulating ) - return; + if ( !mScene || !mIsSimulating ) + return; - PROFILE_SCOPE(Px3World_GetPhysicsResults); + PROFILE_SCOPE(Px3World_GetPhysicsResults); - // Get results from scene. - mScene->fetchResults(true); - mIsSimulating = false; - mTickCount++; + // Get results from scene. + mScene->fetchResults(true); + mIsSimulating = false; + mTickCount++; // Con::printf( "%s PhysXWorld::getPhysicsResults!", this == smClientWorld ? "Client" : "Server" ); } void Px3World::releaseWriteLocks() { - Px3World *world = dynamic_cast( PHYSICSMGR->getWorld( "server" ) ); + Px3World *world = dynamic_cast( PHYSICSMGR->getWorld( "server" ) ); - if ( world ) - world->releaseWriteLock(); + if ( world ) + world->releaseWriteLock(); - world = dynamic_cast( PHYSICSMGR->getWorld( "client" ) ); + world = dynamic_cast( PHYSICSMGR->getWorld( "client" ) ); - if ( world ) - world->releaseWriteLock(); + if ( world ) + world->releaseWriteLock(); } void Px3World::releaseWriteLock() { - if ( !mScene || !mIsSimulating ) - return; + if ( !mScene || !mIsSimulating ) + return; - PROFILE_SCOPE(PxWorld_ReleaseWriteLock); + PROFILE_SCOPE(PxWorld_ReleaseWriteLock); - // We use checkResults here to release the write lock - // but we do not change the simulation flag or increment - // the tick count... we may have gotten results, but the - // simulation hasn't really ticked! - mScene->checkResults( true ); - //AssertFatal( mScene->isWritable(), "PhysX3World::releaseWriteLock() - We should have been writable now!" ); + // We use checkResults here to release the write lock + // but we do not change the simulation flag or increment + // the tick count... we may have gotten results, but the + // simulation hasn't really ticked! + mScene->checkResults( true ); + //AssertFatal( mScene->isWritable(), "PhysX3World::releaseWriteLock() - We should have been writable now!" ); } void Px3World::lockScenes() @@ -390,7 +390,7 @@ void Px3World::unlockScene() bool Px3World::castRay( const Point3F &startPnt, const Point3F &endPnt, RayInfo *ri, const Point3F &impulse ) { - physx::PxVec3 orig = px3Cast( startPnt ); + physx::PxVec3 orig = px3Cast( startPnt ); physx::PxVec3 dir = px3Cast( endPnt - startPnt ); physx::PxF32 maxDist = dir.magnitude(); dir.normalize(); @@ -404,11 +404,11 @@ bool Px3World::castRay( const Point3F &startPnt, const Point3F &endPnt, RayInfo physx::PxRaycastBuffer buf; if(!mScene->raycast(orig,dir,maxDist,buf,outFlags,filterData)) - return false; + return false; if(!buf.hasBlock) - return false; + return false; - const physx::PxRaycastHit hit = buf.block; + const physx::PxRaycastHit hit = buf.block; physx::PxRigidActor *actor = hit.actor; PhysicsUserData *userData = PhysicsUserData::cast( actor->userData ); @@ -456,15 +456,15 @@ PhysicsBody* Px3World::castRay( const Point3F &start, const Point3F &end, U32 bo physx::PxHitFlags outFlags(physx::PxHitFlag::eDISTANCE | physx::PxHitFlag::eIMPACT | physx::PxHitFlag::eNORMAL); physx::PxQueryFilterData filterData; if(bodyTypes & BT_Static) - filterData.flags |= physx::PxQueryFlag::eSTATIC; + filterData.flags |= physx::PxQueryFlag::eSTATIC; if(bodyTypes & BT_Dynamic) - filterData.flags |= physx::PxQueryFlag::eDYNAMIC; + filterData.flags |= physx::PxQueryFlag::eDYNAMIC; filterData.data.word0 = groups; physx::PxRaycastBuffer buf; if( !mScene->raycast(orig,dir,maxDist,buf,outFlags,filterData) ) - return NULL; + return NULL; if(!buf.hasBlock) return NULL; @@ -478,7 +478,7 @@ PhysicsBody* Px3World::castRay( const Point3F &start, const Point3F &end, U32 bo void Px3World::explosion( const Point3F &pos, F32 radius, F32 forceMagnitude ) { - physx::PxVec3 nxPos = px3Cast( pos ); + physx::PxVec3 nxPos = px3Cast( pos ); const physx::PxU32 bufferSize = 10; physx::PxSphereGeometry worldSphere(radius); physx::PxTransform pose(nxPos); @@ -520,14 +520,14 @@ void Px3World::setEnabled( bool enabled ) physx::PxController* Px3World::createController( physx::PxControllerDesc &desc ) { - if ( !mScene ) - return NULL; + if ( !mScene ) + return NULL; - // We need the writelock! - releaseWriteLock(); - physx::PxController* pController = mControllerManager->createController(desc); - AssertFatal( pController, "Px3World::createController - Got a null!" ); - return pController; + // We need the writelock! + releaseWriteLock(); + physx::PxController* pController = mControllerManager->createController(desc); + AssertFatal( pController, "Px3World::createController - Got a null!" ); + return pController; } static ColorI getDebugColor( physx::PxU32 packed ) diff --git a/Engine/source/T3D/physics/physx3/px3World.h b/Engine/source/T3D/physics/physx3/px3World.h index 72e67ddb9..5399c3f0a 100644 --- a/Engine/source/T3D/physics/physx3/px3World.h +++ b/Engine/source/T3D/physics/physx3/px3World.h @@ -42,66 +42,66 @@ class FixedStepper; enum Px3CollisionGroup { - PX3_DEFAULT = BIT(0), - PX3_PLAYER = BIT(1), - PX3_DEBRIS = BIT(2), - PX3_TRIGGER = BIT(3), + PX3_DEFAULT = BIT(0), + PX3_PLAYER = BIT(1), + PX3_DEBRIS = BIT(2), + PX3_TRIGGER = BIT(3), }; class Px3World : public PhysicsWorld { protected: - physx::PxScene* mScene; - bool mIsEnabled; - bool mIsSimulating; - bool mIsServer; + physx::PxScene* mScene; + bool mIsEnabled; + bool mIsSimulating; + bool mIsServer; bool mIsSceneLocked; - U32 mTickCount; - ProcessList *mProcessList; - F32 mEditorTimeScale; - bool mErrorReport; + U32 mTickCount; + ProcessList *mProcessList; + F32 mEditorTimeScale; + bool mErrorReport; physx::PxRenderBuffer *mRenderBuffer; - physx::PxControllerManager* mControllerManager; - static Px3ConsoleStream *smErrorCallback; - static physx::PxDefaultAllocator smMemoryAlloc; - static physx::PxFoundation* smFoundation; - static physx::PxCooking *smCooking; - static physx::PxProfileZoneManager* smProfileZoneManager; - static physx::PxDefaultCpuDispatcher* smCpuDispatcher; - static physx::PxVisualDebuggerConnection* smPvdConnection; - F32 mAccumulator; - bool _simulate(const F32 dt); + physx::PxControllerManager* mControllerManager; + static Px3ConsoleStream *smErrorCallback; + static physx::PxDefaultAllocator smMemoryAlloc; + static physx::PxFoundation* smFoundation; + static physx::PxCooking *smCooking; + static physx::PxProfileZoneManager* smProfileZoneManager; + static physx::PxDefaultCpuDispatcher* smCpuDispatcher; + static physx::PxVisualDebuggerConnection* smPvdConnection; + F32 mAccumulator; + bool _simulate(const F32 dt); public: - Px3World(); - virtual ~Px3World(); + Px3World(); + virtual ~Px3World(); - virtual bool initWorld( bool isServer, ProcessList *processList ); - virtual void destroyWorld(); - virtual void onDebugDraw( const SceneRenderState *state ); - virtual void reset() {} - virtual bool castRay( const Point3F &startPnt, const Point3F &endPnt, RayInfo *ri, const Point3F &impulse ); - virtual PhysicsBody* castRay( const Point3F &start, const Point3F &end, U32 bodyTypes = BT_All ); - virtual void explosion( const Point3F &pos, F32 radius, F32 forceMagnitude ); - virtual bool isEnabled() const { return mIsEnabled; } - physx::PxScene* getScene(){ return mScene;} - void setEnabled( bool enabled ); - U32 getTick() { return mTickCount; } + virtual bool initWorld( bool isServer, ProcessList *processList ); + virtual void destroyWorld(); + virtual void onDebugDraw( const SceneRenderState *state ); + virtual void reset() {} + virtual bool castRay( const Point3F &startPnt, const Point3F &endPnt, RayInfo *ri, const Point3F &impulse ); + virtual PhysicsBody* castRay( const Point3F &start, const Point3F &end, U32 bodyTypes = BT_All ); + virtual void explosion( const Point3F &pos, F32 radius, F32 forceMagnitude ); + virtual bool isEnabled() const { return mIsEnabled; } + physx::PxScene* getScene(){ return mScene;} + void setEnabled( bool enabled ); + U32 getTick() { return mTickCount; } void tickPhysics( U32 elapsedMs ); - void getPhysicsResults(); - void setEditorTimeScale( F32 timeScale ) { mEditorTimeScale = timeScale; } - const F32 getEditorTimeScale() const { return mEditorTimeScale; } - void releaseWriteLock(); - bool isServer(){return mIsServer;} - physx::PxController* createController( physx::PxControllerDesc &desc ); + void getPhysicsResults(); + void setEditorTimeScale( F32 timeScale ) { mEditorTimeScale = timeScale; } + const F32 getEditorTimeScale() const { return mEditorTimeScale; } + void releaseWriteLock(); + bool isServer(){return mIsServer;} + physx::PxController* createController( physx::PxControllerDesc &desc ); void lockScene(); void unlockScene(); - //static - static bool restartSDK( bool destroyOnly = false, Px3World *clientWorld = NULL, Px3World *serverWorld = NULL ); - static void releaseWriteLocks(); - static physx::PxCooking *getCooking(); + //static + static bool restartSDK( bool destroyOnly = false, Px3World *clientWorld = NULL, Px3World *serverWorld = NULL ); + static void releaseWriteLocks(); + static physx::PxCooking *getCooking(); static void lockScenes(); static void unlockScenes(); }; diff --git a/Engine/source/T3D/shapeImage.cpp b/Engine/source/T3D/shapeImage.cpp index 7ae902ed8..627e8e433 100644 --- a/Engine/source/T3D/shapeImage.cpp +++ b/Engine/source/T3D/shapeImage.cpp @@ -80,7 +80,7 @@ EndImplementEnumType; ImplementEnumType( ShapeBaseImageLightType, "@brief The type of light to attach to this ShapeBaseImage.\n\n" "@ingroup gameObjects\n\n") - { ShapeBaseImageData::NoLight, "NoLight", "No light is attached.\n" }, + { ShapeBaseImageData::NoLight, "NoLight", "No light is attached.\n" }, { ShapeBaseImageData::ConstantLight, "ConstantLight", "A constant emitting light is attached.\n" }, { ShapeBaseImageData::SpotLight, "SpotLight", "A spotlight is attached.\n" }, { ShapeBaseImageData::PulsingLight, "PulsingLight", "A pusling light is attached.\n" }, @@ -1532,7 +1532,7 @@ bool ShapeBase::unmountImage(U32 imageSlot) { AssertFatal(imageSlotcreateSource( stateData.sound, &getRenderTransform(), &velocity )); + image.addSoundSource(SFX->createSource( stateData.sound, &getRenderTransform(), &velocity )); } // Play animation diff --git a/Engine/source/T3D/staticShape.cpp b/Engine/source/T3D/staticShape.cpp index c48a96aa1..6548e2161 100644 --- a/Engine/source/T3D/staticShape.cpp +++ b/Engine/source/T3D/staticShape.cpp @@ -45,48 +45,48 @@ static const U32 sgAllowedDynamicTypes = 0xffffff; IMPLEMENT_CO_DATABLOCK_V1(StaticShapeData); ConsoleDocClass( StaticShapeData, - "@brief The most basic ShapeBaseData derrived shape datablock available in Torque 3D.\n\n" + "@brief The most basic ShapeBaseData derrived shape datablock available in Torque 3D.\n\n" - "When it comes to placing 3D objects in the scene, you effectively have two options:\n\n" - "1. TSStatic objects\n\n" - "2. ShapeBase derived objects\n\n" + "When it comes to placing 3D objects in the scene, you effectively have two options:\n\n" + "1. TSStatic objects\n\n" + "2. ShapeBase derived objects\n\n" - "Since ShapeBase and ShapeBaseData are not meant to be instantiated in script, you " - "will use one of its child classes instead. Several game related objects are derived " - "from ShapeBase: Player, Vehicle, Item, and so on.\n\n" + "Since ShapeBase and ShapeBaseData are not meant to be instantiated in script, you " + "will use one of its child classes instead. Several game related objects are derived " + "from ShapeBase: Player, Vehicle, Item, and so on.\n\n" - "When you need a 3D object with datablock capabilities, you will use an object derived " - "from ShapeBase. When you need an object with extremely low overhead, and with no other " - "purpose than to be a 3D object in the scene, you will use TSStatic.\n\n" + "When you need a 3D object with datablock capabilities, you will use an object derived " + "from ShapeBase. When you need an object with extremely low overhead, and with no other " + "purpose than to be a 3D object in the scene, you will use TSStatic.\n\n" - "The most basic child of ShapeBase is StaticShape. It does not introduce any of the " - "additional functionality you see in Player, Item, Vehicle or the other game play " - "heavy classes. At its core, it is comparable to a TSStatic, but with a datbalock. Having " + "The most basic child of ShapeBase is StaticShape. It does not introduce any of the " + "additional functionality you see in Player, Item, Vehicle or the other game play " + "heavy classes. At its core, it is comparable to a TSStatic, but with a datbalock. Having " "a datablock provides a location for common variables as well as having access to " "various ShapeBaseData, GameBaseData and SimDataBlock callbacks.\n\n" - "@tsexample\n" - "// Create a StaticShape using a datablock\n" - "datablock StaticShapeData(BasicShapeData)\n" - "{\n" - " shapeFile = \"art/shapes/items/kit/healthkit.dts\";\n" - " testVar = \"Simple string, not a stock variable\";\n" - "};\n\n" - "new StaticShape()\n" - "{\n" - " dataBlock = \"BasicShapeData\";\n" - " position = \"0.0 0.0 0.0\";\n" - " rotation = \"1 0 0 0\";\n" - " scale = \"1 1 1\";\n" - "};\n" - "@endtsexample\n\n" + "@tsexample\n" + "// Create a StaticShape using a datablock\n" + "datablock StaticShapeData(BasicShapeData)\n" + "{\n" + " shapeFile = \"art/shapes/items/kit/healthkit.dts\";\n" + " testVar = \"Simple string, not a stock variable\";\n" + "};\n\n" + "new StaticShape()\n" + "{\n" + " dataBlock = \"BasicShapeData\";\n" + " position = \"0.0 0.0 0.0\";\n" + " rotation = \"1 0 0 0\";\n" + " scale = \"1 1 1\";\n" + "};\n" + "@endtsexample\n\n" - "@see StaticShape\n" + "@see StaticShape\n" "@see ShapeBaseData\n" - "@see TSStatic\n\n" + "@see TSStatic\n\n" - "@ingroup gameObjects\n" - "@ingroup Datablocks"); + "@ingroup gameObjects\n" + "@ingroup Datablocks"); StaticShapeData::StaticShapeData() { @@ -128,47 +128,47 @@ void StaticShapeData::unpackData(BitStream* stream) IMPLEMENT_CO_NETOBJECT_V1(StaticShape); ConsoleDocClass( StaticShape, - "@brief The most basic 3D shape with a datablock available in Torque 3D.\n\n" + "@brief The most basic 3D shape with a datablock available in Torque 3D.\n\n" - "When it comes to placing 3D objects in the scene, you technically have two options:\n\n" - "1. TSStatic objects\n\n" - "2. ShapeBase derived objects\n\n" + "When it comes to placing 3D objects in the scene, you technically have two options:\n\n" + "1. TSStatic objects\n\n" + "2. ShapeBase derived objects\n\n" - "Since ShapeBase and ShapeBaseData are not meant to be instantiated in script, you " - "will use one of its child classes instead. Several game related objects are derived " - "from ShapeBase: Player, Vehicle, Item, and so on.\n\n" + "Since ShapeBase and ShapeBaseData are not meant to be instantiated in script, you " + "will use one of its child classes instead. Several game related objects are derived " + "from ShapeBase: Player, Vehicle, Item, and so on.\n\n" - "When you need a 3D object with datablock capabilities, you will use an object derived " - "from ShapeBase. When you need an object with extremely low overhead, and with no other " - "purpose than to be a 3D object in the scene, you will use TSStatic.\n\n" + "When you need a 3D object with datablock capabilities, you will use an object derived " + "from ShapeBase. When you need an object with extremely low overhead, and with no other " + "purpose than to be a 3D object in the scene, you will use TSStatic.\n\n" - "The most basic child of ShapeBase is StaticShape. It does not introduce any of the " - "additional functionality you see in Player, Item, Vehicle or the other game play " - "heavy classes. At its core, it is comparable to a TSStatic, but with a datbalock. Having " + "The most basic child of ShapeBase is StaticShape. It does not introduce any of the " + "additional functionality you see in Player, Item, Vehicle or the other game play " + "heavy classes. At its core, it is comparable to a TSStatic, but with a datbalock. Having " "a datablock provides a location for common variables as well as having access to " "various ShapeBaseData, GameBaseData and SimDataBlock callbacks.\n\n" - "@tsexample\n" - "// Create a StaticShape using a datablock\n" - "datablock StaticShapeData(BasicShapeData)\n" - "{\n" - " shapeFile = \"art/shapes/items/kit/healthkit.dts\";\n" - " testVar = \"Simple string, not a stock variable\";\n" - "};\n\n" - "new StaticShape()\n" - "{\n" - " dataBlock = \"BasicShapeData\";\n" - " position = \"0.0 0.0 0.0\";\n" - " rotation = \"1 0 0 0\";\n" - " scale = \"1 1 1\";\n" - "};\n" - "@endtsexample\n\n" + "@tsexample\n" + "// Create a StaticShape using a datablock\n" + "datablock StaticShapeData(BasicShapeData)\n" + "{\n" + " shapeFile = \"art/shapes/items/kit/healthkit.dts\";\n" + " testVar = \"Simple string, not a stock variable\";\n" + "};\n\n" + "new StaticShape()\n" + "{\n" + " dataBlock = \"BasicShapeData\";\n" + " position = \"0.0 0.0 0.0\";\n" + " rotation = \"1 0 0 0\";\n" + " scale = \"1 1 1\";\n" + "};\n" + "@endtsexample\n\n" - "@see StaticShapeData\n" - "@see ShapeBase\n" - "@see TSStatic\n\n" + "@see StaticShapeData\n" + "@see ShapeBase\n" + "@see TSStatic\n\n" - "@ingroup gameObjects\n"); + "@ingroup gameObjects\n"); StaticShape::StaticShape() { @@ -303,7 +303,7 @@ void StaticShape::unpackUpdate(NetConnection *connection, BitStream *bstream) // Marked internal, as this is flagged to be deleted // [8/1/2010 mperry] DefineConsoleMethod( StaticShape, setPoweredState, void, (bool isPowered), , "(bool isPowered)" - "@internal") + "@internal") { if(!object->isServerObject()) return; diff --git a/Engine/source/T3D/tsStatic.cpp b/Engine/source/T3D/tsStatic.cpp index 0f7b69ef3..84b3b0797 100644 --- a/Engine/source/T3D/tsStatic.cpp +++ b/Engine/source/T3D/tsStatic.cpp @@ -1222,17 +1222,17 @@ DefineEngineMethod( TSStatic, getTargetName, const char*, ( S32 index ),(0), "@return the name of the indexed material.\n" "@see getTargetCount()\n") { - TSStatic *obj = dynamic_cast< TSStatic* > ( object ); - if(obj) - { - // Try to use the client object (so we get the reskinned targets in the Material Editor) - if ((TSStatic*)obj->getClientObject()) - obj = (TSStatic*)obj->getClientObject(); + TSStatic *obj = dynamic_cast< TSStatic* > ( object ); + if(obj) + { + // Try to use the client object (so we get the reskinned targets in the Material Editor) + if ((TSStatic*)obj->getClientObject()) + obj = (TSStatic*)obj->getClientObject(); - return obj->getShapeInstance()->getTargetName(index); - } + return obj->getShapeInstance()->getTargetName(index); + } - return ""; + return ""; } DefineEngineMethod( TSStatic, getTargetCount, S32,(),, @@ -1240,17 +1240,17 @@ DefineEngineMethod( TSStatic, getTargetCount, S32,(),, "@return the number of materials in the shape.\n" "@see getTargetName()\n") { - TSStatic *obj = dynamic_cast< TSStatic* > ( object ); - if(obj) - { - // Try to use the client object (so we get the reskinned targets in the Material Editor) - if ((TSStatic*)obj->getClientObject()) - obj = (TSStatic*)obj->getClientObject(); + TSStatic *obj = dynamic_cast< TSStatic* > ( object ); + if(obj) + { + // Try to use the client object (so we get the reskinned targets in the Material Editor) + if ((TSStatic*)obj->getClientObject()) + obj = (TSStatic*)obj->getClientObject(); - return obj->getShapeInstance()->getTargetCount(); - } + return obj->getShapeInstance()->getTargetCount(); + } - return -1; + return -1; } // This method is able to change materials per map to with others. The material that is being replaced is being mapped to @@ -1317,10 +1317,10 @@ DefineEngineMethod( TSStatic, getModelFile, const char *, (),, "@return the shape filename\n\n" "@tsexample\n" - "// Acquire the model filename used on this shape.\n" - "%modelFilename = %obj.getModelFile();\n" + "// Acquire the model filename used on this shape.\n" + "%modelFilename = %obj.getModelFile();\n" "@endtsexample\n" ) { - return object->getShapeFileName(); + return object->getShapeFileName(); } diff --git a/Engine/source/T3D/tsStatic.cpp.orig b/Engine/source/T3D/tsStatic.cpp.orig new file mode 100644 index 000000000..11848499e --- /dev/null +++ b/Engine/source/T3D/tsStatic.cpp.orig @@ -0,0 +1,1330 @@ +//----------------------------------------------------------------------------- +// 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. +//----------------------------------------------------------------------------- + +#include "platform/platform.h" +#include "T3D/tsStatic.h" + +#include "core/resourceManager.h" +#include "core/stream/bitStream.h" +#include "scene/sceneRenderState.h" +#include "scene/sceneManager.h" +#include "scene/sceneObjectLightingPlugin.h" +#include "lighting/lightManager.h" +#include "math/mathIO.h" +#include "ts/tsShapeInstance.h" +#include "ts/tsMaterialList.h" +#include "console/consoleTypes.h" +#include "T3D/shapeBase.h" +#include "sim/netConnection.h" +#include "gfx/gfxDevice.h" +#include "gfx/gfxTransformSaver.h" +#include "ts/tsRenderState.h" +#include "collision/boxConvex.h" +#include "T3D/physics/physicsPlugin.h" +#include "T3D/physics/physicsBody.h" +#include "T3D/physics/physicsCollision.h" +#include "materials/materialDefinition.h" +#include "materials/materialManager.h" +#include "materials/matInstance.h" +#include "materials/materialFeatureData.h" +#include "materials/materialFeatureTypes.h" +#include "console/engineAPI.h" +#include "T3D/accumulationVolume.h" + +using namespace Torque; + +extern bool gEditingMission; + +IMPLEMENT_CO_NETOBJECT_V1(TSStatic); + +ConsoleDocClass( TSStatic, + "@brief A static object derived from a 3D model file and placed within the game world.\n\n" + + "TSStatic is the most basic 3D shape in Torque. Unlike StaticShape it doesn't make use of " + "a datablock. It derrives directly from SceneObject. This makes TSStatic extremely light " + "weight, which is why the Tools use this class when you want to drop in a DTS or DAE object.\n\n" + + "While a TSStatic doesn't provide any motion -- it stays were you initally put it -- it does allow for " + "a single ambient animation sequence to play when the object is first added to the scene.\n\n" + + "@tsexample\n" + "new TSStatic(Team1Base) {\n" + " shapeName = \"art/shapes/desertStructures/station01.dts\";\n" + " playAmbient = \"1\";\n" + " receiveSunLight = \"1\";\n" + " receiveLMLighting = \"1\";\n" + " useCustomAmbientLighting = \"0\";\n" + " customAmbientLighting = \"0 0 0 1\";\n" + " collisionType = \"Visible Mesh\";\n" + " decalType = \"Collision Mesh\";\n" + " allowPlayerStep = \"1\";\n" + " renderNormals = \"0\";\n" + " forceDetail = \"-1\";\n" + " position = \"315.18 -180.418 244.313\";\n" + " rotation = \"0 0 1 195.952\";\n" + " scale = \"1 1 1\";\n" + " isRenderEnabled = \"true\";\n" + " canSaveDynamicFields = \"1\";\n" + "};\n" + "@endtsexample\n" + + "@ingroup gameObjects\n" +); + +TSStatic::TSStatic() +: + cubeDescId( 0 ), + reflectorDesc( NULL ) +{ + mNetFlags.set(Ghostable | ScopeAlways); + + mTypeMask |= StaticObjectType | StaticShapeObjectType; + + mShapeName = ""; + mShapeInstance = NULL; + + mPlayAmbient = true; + mAmbientThread = NULL; + + mAllowPlayerStep = false; + + mConvexList = new Convex; + + mRenderNormalScalar = 0; + mForceDetail = -1; + + mMeshCulling = false; + mUseOriginSort = false; + + mUseAlphaFade = false; + mAlphaFadeStart = 100.0f; + mAlphaFadeEnd = 150.0f; + mInvertAlphaFade = false; + mAlphaFade = 1.0f; + mPhysicsRep = NULL; + + mCollisionType = CollisionMesh; + mDecalType = CollisionMesh; +} + +TSStatic::~TSStatic() +{ + delete mConvexList; + mConvexList = NULL; +} + +ImplementEnumType( TSMeshType, + "Type of mesh data available in a shape.\n" + "@ingroup gameObjects" ) + { TSStatic::None, "None", "No mesh data." }, + { TSStatic::Bounds, "Bounds", "Bounding box of the shape." }, + { TSStatic::CollisionMesh, "Collision Mesh", "Specifically desingated \"collision\" meshes." }, + { TSStatic::VisibleMesh, "Visible Mesh", "Rendered mesh polygons." }, +EndImplementEnumType; + + +void TSStatic::initPersistFields() +{ + addGroup("Media"); + + addField("shapeName", TypeShapeFilename, Offset( mShapeName, TSStatic ), + "%Path and filename of the model file (.DTS, .DAE) to use for this TSStatic." ); + + addProtectedField( "skin", TypeRealString, Offset( mAppliedSkinName, TSStatic ), &_setFieldSkin, &_getFieldSkin, + "@brief The skin applied to the shape.\n\n" + + "'Skinning' the shape effectively renames the material targets, allowing " + "different materials to be used on different instances of the same model.\n\n" + + "Any material targets that start with the old skin name have that part " + "of the name replaced with the new skin name. The initial old skin name is " + "\"base\". For example, if a new skin of \"blue\" was applied to a model " + "that had material targets base_body and face, the new targets " + "would be blue_body and face. Note that face was not " + "renamed since it did not start with the old skin name of \"base\".\n\n" + + "To support models that do not use the default \"base\" naming convention, " + "you can also specify the part of the name to replace in the skin field " + "itself. For example, if a model had a material target called shapemat, " + "we could apply a new skin \"shape=blue\", and the material target would be " + "renamed to bluemat (note \"shape\" has been replaced with \"blue\").\n\n" + + "Multiple skin updates can also be applied at the same time by separating " + "them with a semicolon. For example: \"base=blue;face=happy_face\".\n\n" + + "Material targets are only renamed if an existing Material maps to that " + "name, or if there is a diffuse texture in the model folder with the same " + "name as the new target.\n\n" ); + + endGroup("Media"); + + addGroup("Rendering"); + + addField( "playAmbient", TypeBool, Offset( mPlayAmbient, TSStatic ), + "Enables automatic playing of the animation sequence named \"ambient\" (if it exists) when the TSStatic is loaded."); + addField( "meshCulling", TypeBool, Offset( mMeshCulling, TSStatic ), + "Enables detailed culling of meshes within the TSStatic. Should only be used " + "with large complex shapes like buildings which contain many submeshes." ); + addField( "originSort", TypeBool, Offset( mUseOriginSort, TSStatic ), + "Enables translucent sorting of the TSStatic by its origin instead of the bounds." ); + + endGroup("Rendering"); + + addGroup( "Reflection" ); + addField( "cubeReflectorDesc", TypeRealString, Offset( cubeDescName, TSStatic ), + "References a ReflectorDesc datablock that defines performance and quality properties for dynamic reflections.\n"); + endGroup( "Reflection" ); + + addGroup("Collision"); + + addField( "collisionType", TypeTSMeshType, Offset( mCollisionType, TSStatic ), + "The type of mesh data to use for collision queries." ); + addField( "decalType", TypeTSMeshType, Offset( mDecalType, TSStatic ), + "The type of mesh data used to clip decal polygons against." ); + addField( "allowPlayerStep", TypeBool, Offset( mAllowPlayerStep, TSStatic ), + "@brief Allow a Player to walk up sloping polygons in the TSStatic (based on the collisionType).\n\n" + "When set to false, the slightest bump will stop the player from walking on top of the object.\n"); + + endGroup("Collision"); + + addGroup( "AlphaFade" ); + addField( "alphaFadeEnable", TypeBool, Offset(mUseAlphaFade, TSStatic), "Turn on/off Alpha Fade" ); + addField( "alphaFadeStart", TypeF32, Offset(mAlphaFadeStart, TSStatic), "Distance of start Alpha Fade" ); + addField( "alphaFadeEnd", TypeF32, Offset(mAlphaFadeEnd, TSStatic), "Distance of end Alpha Fade" ); + addField( "alphaFadeInverse", TypeBool, Offset(mInvertAlphaFade, TSStatic), "Invert Alpha Fade's Start & End Distance" ); + endGroup( "AlphaFade" ); + + addGroup("Debug"); + + addField( "renderNormals", TypeF32, Offset( mRenderNormalScalar, TSStatic ), + "Debug rendering mode shows the normals for each point in the TSStatic's mesh." ); + addField( "forceDetail", TypeS32, Offset( mForceDetail, TSStatic ), + "Forces rendering to a particular detail level." ); + + endGroup("Debug"); + + Parent::initPersistFields(); +} + +bool TSStatic::_setFieldSkin( void *object, const char *index, const char *data ) +{ + TSStatic *ts = static_cast( object ); + if ( ts ) + ts->setSkinName( data ); + return false; +} + +const char *TSStatic::_getFieldSkin( void *object, const char *data ) +{ + TSStatic *ts = static_cast( object ); + return ts ? ts->mSkinNameHandle.getString() : ""; +} + +void TSStatic::inspectPostApply() +{ + // Apply any transformations set in the editor + Parent::inspectPostApply(); + + if(isServerObject()) + { + setMaskBits(AdvancedStaticOptionsMask); + prepCollision(); + } + + _updateShouldTick(); +} + +bool TSStatic::onAdd() +{ + PROFILE_SCOPE(TSStatic_onAdd); + + if ( isServerObject() ) + { + // Handle the old "usePolysoup" field + SimFieldDictionary* fieldDict = getFieldDictionary(); + + if ( fieldDict ) + { + StringTableEntry slotName = StringTable->insert( "usePolysoup" ); + + SimFieldDictionary::Entry * entry = fieldDict->findDynamicField( slotName ); + + if ( entry ) + { + // Was "usePolysoup" set? + bool usePolysoup = dAtob( entry->value ); + + // "usePolysoup" maps to the new VisibleMesh type + if ( usePolysoup ) + mCollisionType = VisibleMesh; + + // Remove the field in favor on the new "collisionType" field + fieldDict->setFieldValue( slotName, "" ); + } + } + } + + if ( !Parent::onAdd() ) + return false; + + // Setup the shape. + if ( !_createShape() ) + { + Con::errorf( "TSStatic::onAdd() - Shape creation failed!" ); + return false; + } + + setRenderTransform(mObjToWorld); + + // Register for the resource change signal. + ResourceManager::get().getChangedSignal().notify( this, &TSStatic::_onResourceChanged ); + + addToScene(); + + if ( isClientObject() ) + { + mCubeReflector.unregisterReflector(); + + if ( reflectorDesc ) + mCubeReflector.registerReflector( this, reflectorDesc ); + } + + _updateShouldTick(); + + // Accumulation and environment mapping + if (isClientObject() && mShapeInstance) + { + AccumulationVolume::addObject(this); + } + + return true; +} + +bool TSStatic::_createShape() +{ + // Cleanup before we create. + mCollisionDetails.clear(); + mLOSDetails.clear(); + SAFE_DELETE( mPhysicsRep ); + SAFE_DELETE( mShapeInstance ); + mAmbientThread = NULL; + mShape = NULL; + + if (!mShapeName || mShapeName[0] == '\0') + { + Con::errorf( "TSStatic::_createShape() - No shape name!" ); + return false; + } + + mShapeHash = _StringTable::hashString(mShapeName); + + mShape = ResourceManager::get().load(mShapeName); + if ( bool(mShape) == false ) + { + Con::errorf( "TSStatic::_createShape() - Unable to load shape: %s", mShapeName ); + return false; + } + + if ( isClientObject() && + !mShape->preloadMaterialList(mShape.getPath()) && + NetConnection::filesWereDownloaded() ) + return false; + + mObjBox = mShape->bounds; + resetWorldBox(); + + mShapeInstance = new TSShapeInstance( mShape, isClientObject() ); + + if( isGhost() ) + { + // Reapply the current skin + mAppliedSkinName = ""; + reSkin(); + } + + prepCollision(); + + // Find the "ambient" animation if it exists + S32 ambientSeq = mShape->findSequence("ambient"); + + if ( ambientSeq > -1 && !mAmbientThread ) + mAmbientThread = mShapeInstance->addThread(); + + if ( mAmbientThread ) + mShapeInstance->setSequence( mAmbientThread, ambientSeq, 0); + + // Resolve CubeReflectorDesc. + if ( cubeDescName.isNotEmpty() ) + { + Sim::findObject( cubeDescName, reflectorDesc ); + } + else if( cubeDescId > 0 ) + { + Sim::findObject( cubeDescId, reflectorDesc ); + } + + return true; +} + +void TSStatic::prepCollision() +{ + // Let the client know that the collision was updated + setMaskBits( UpdateCollisionMask ); + + // Allow the ShapeInstance to prep its collision if it hasn't already + if ( mShapeInstance ) + mShapeInstance->prepCollision(); + + // Cleanup any old collision data + mCollisionDetails.clear(); + mLOSDetails.clear(); + mConvexList->nukeList(); + + if ( mCollisionType == CollisionMesh || mCollisionType == VisibleMesh ) + mShape->findColDetails( mCollisionType == VisibleMesh, &mCollisionDetails, &mLOSDetails ); + + _updatePhysics(); +} + +void TSStatic::_updatePhysics() +{ + SAFE_DELETE( mPhysicsRep ); + + if ( !PHYSICSMGR || mCollisionType == None ) + return; + + PhysicsCollision *colShape = NULL; + if ( mCollisionType == Bounds ) + { + MatrixF offset( true ); + offset.setPosition( mShape->center ); + colShape = PHYSICSMGR->createCollision(); + colShape->addBox( getObjBox().getExtents() * 0.5f * mObjScale, offset ); + } + else + colShape = mShape->buildColShape( mCollisionType == VisibleMesh, getScale() ); + + if ( colShape ) + { + PhysicsWorld *world = PHYSICSMGR->getWorld( isServerObject() ? "server" : "client" ); + mPhysicsRep = PHYSICSMGR->createBody(); + mPhysicsRep->init( colShape, 0, 0, this, world ); + mPhysicsRep->setTransform( getTransform() ); + } +} + +void TSStatic::onRemove() +{ + SAFE_DELETE( mPhysicsRep ); + + // Accumulation + if ( isClientObject() && mShapeInstance ) + { + if ( mShapeInstance->hasAccumulation() ) + AccumulationVolume::removeObject(this); + } + + mConvexList->nukeList(); + + removeFromScene(); + + // Remove the resource change signal. + ResourceManager::get().getChangedSignal().remove( this, &TSStatic::_onResourceChanged ); + + delete mShapeInstance; + mShapeInstance = NULL; + + mAmbientThread = NULL; + if ( isClientObject() ) + mCubeReflector.unregisterReflector(); + + Parent::onRemove(); +} + +void TSStatic::_onResourceChanged( const Torque::Path &path ) +{ + if ( path != Path( mShapeName ) ) + return; + + _createShape(); + _updateShouldTick(); +} + +void TSStatic::setSkinName( const char *name ) +{ + if ( !isGhost() ) + { + if ( name[0] != '\0' ) + { + // Use tags for better network performance + // Should be a tag, but we'll convert to one if it isn't. + if ( name[0] == StringTagPrefixByte ) + mSkinNameHandle = NetStringHandle( U32(dAtoi(name + 1)) ); + else + mSkinNameHandle = NetStringHandle( name ); + } + else + mSkinNameHandle = NetStringHandle(); + + setMaskBits( SkinMask ); + } +} + +void TSStatic::reSkin() +{ + if ( isGhost() && mShapeInstance && mSkinNameHandle.isValidString() ) + { + Vector skins; + String(mSkinNameHandle.getString()).split( ";", skins ); + + for (S32 i = 0; i < skins.size(); i++) + { + String oldSkin( mAppliedSkinName.c_str() ); + String newSkin( skins[i] ); + + // Check if the skin handle contains an explicit "old" base string. This + // allows all models to support skinning, even if they don't follow the + // "base_xxx" material naming convention. + S32 split = newSkin.find( '=' ); // "old=new" format skin? + if ( split != String::NPos ) + { + oldSkin = newSkin.substr( 0, split ); + newSkin = newSkin.erase( 0, split+1 ); + } + + mShapeInstance->reSkin( newSkin, oldSkin ); + mAppliedSkinName = newSkin; + } + } +} + +void TSStatic::processTick( const Move *move ) +{ + if ( isServerObject() && mPlayAmbient && mAmbientThread ) + mShapeInstance->advanceTime( TickSec, mAmbientThread ); + + if ( isMounted() ) + { + MatrixF mat( true ); + mMount.object->getMountTransform(mMount.node, mMount.xfm, &mat ); + setTransform( mat ); + } +} + +void TSStatic::interpolateTick( F32 delta ) +{ +} + +void TSStatic::advanceTime( F32 dt ) +{ + if ( mPlayAmbient && mAmbientThread ) + mShapeInstance->advanceTime( dt, mAmbientThread ); + + if ( isMounted() ) + { + MatrixF mat( true ); + mMount.object->getRenderMountTransform( dt, mMount.node, mMount.xfm, &mat ); + setRenderTransform( mat ); + } +} + +void TSStatic::_updateShouldTick() +{ + bool shouldTick = (mPlayAmbient && mAmbientThread) || isMounted(); + + if ( isTicking() != shouldTick ) + setProcessTick( shouldTick ); +} + +void TSStatic::prepRenderImage( SceneRenderState* state ) +{ + if( !mShapeInstance ) + return; + + Point3F cameraOffset; + getRenderTransform().getColumn(3,&cameraOffset); + cameraOffset -= state->getDiffuseCameraPosition(); + F32 dist = cameraOffset.len(); + if (dist < 0.01f) + dist = 0.01f; + + if (mUseAlphaFade) + { + mAlphaFade = 1.0f; + if ((mAlphaFadeStart < mAlphaFadeEnd) && mAlphaFadeStart > 0.1f) + { + if (mInvertAlphaFade) + { + if (dist <= mAlphaFadeStart) + { + return; + } + if (dist < mAlphaFadeEnd) + { + mAlphaFade = ((dist - mAlphaFadeStart) / (mAlphaFadeEnd - mAlphaFadeStart)); + } + } + else + { + if (dist >= mAlphaFadeEnd) + { + return; + } + if (dist > mAlphaFadeStart) + { + mAlphaFade -= ((dist - mAlphaFadeStart) / (mAlphaFadeEnd - mAlphaFadeStart)); + } + } + } + } + + F32 invScale = (1.0f/getMax(getMax(mObjScale.x,mObjScale.y),mObjScale.z)); + + // If we're currently rendering our own reflection we + // don't want to render ourselves into it. + if ( mCubeReflector.isRendering() ) + return; + + + if ( mForceDetail == -1 ) + mShapeInstance->setDetailFromDistance( state, dist * invScale ); + else + mShapeInstance->setCurrentDetail( mForceDetail ); + + if ( mShapeInstance->getCurrentDetail() < 0 ) + return; + + GFXTransformSaver saver; + + // Set up our TS render state. + TSRenderState rdata; + rdata.setSceneState( state ); + rdata.setFadeOverride( 1.0f ); + rdata.setOriginSort( mUseOriginSort ); + + if ( mCubeReflector.isEnabled() ) + rdata.setCubemap( mCubeReflector.getCubemap() ); + + // Acculumation + rdata.setAccuTex(mAccuTex); + + // If we have submesh culling enabled then prepare + // the object space frustum to pass to the shape. + Frustum culler; + if ( mMeshCulling ) + { + culler = state->getCullingFrustum(); + MatrixF xfm( true ); + xfm.scale( Point3F::One / getScale() ); + xfm.mul( getRenderWorldTransform() ); + xfm.mul( culler.getTransform() ); + culler.setTransform( xfm ); + rdata.setCuller( &culler ); + } + + // We might have some forward lit materials + // so pass down a query to gather lights. + LightQuery query; + query.init( getWorldSphere() ); + rdata.setLightQuery( &query ); + + MatrixF mat = getRenderTransform(); + mat.scale( mObjScale ); + GFX->setWorldMatrix( mat ); + + if ( state->isDiffusePass() && mCubeReflector.isEnabled() && mCubeReflector.getOcclusionQuery() ) + { + RenderPassManager *pass = state->getRenderPass(); + OccluderRenderInst *ri = pass->allocInst(); + + ri->type = RenderPassManager::RIT_Occluder; + ri->query = mCubeReflector.getOcclusionQuery(); + mObjToWorld.mulP( mObjBox.getCenter(), &ri->position ); + ri->scale.set( mObjBox.getExtents() ); + ri->orientation = pass->allocUniqueXform( mObjToWorld ); + ri->isSphere = false; + state->getRenderPass()->addInst( ri ); + } + + mShapeInstance->animate(); + if(mShapeInstance) + { + if (mUseAlphaFade) + { + mShapeInstance->setAlphaAlways(mAlphaFade); + S32 s = mShapeInstance->mMeshObjects.size(); + + for(S32 x = 0; x < s; x++) + { + mShapeInstance->mMeshObjects[x].visible = mAlphaFade; + } + } + } + mShapeInstance->render( rdata ); + + if ( mRenderNormalScalar > 0 ) + { + ObjectRenderInst *ri = state->getRenderPass()->allocInst(); + ri->renderDelegate.bind( this, &TSStatic::_renderNormals ); + ri->type = RenderPassManager::RIT_Editor; + state->getRenderPass()->addInst( ri ); + } +} + +void TSStatic::_renderNormals( ObjectRenderInst *ri, SceneRenderState *state, BaseMatInstance *overrideMat ) +{ + PROFILE_SCOPE( TSStatic_RenderNormals ); + + GFXTransformSaver saver; + + MatrixF mat = getRenderTransform(); + mat.scale( mObjScale ); + GFX->multWorld( mat ); + + S32 dl = mShapeInstance->getCurrentDetail(); + mShapeInstance->renderDebugNormals( mRenderNormalScalar, dl ); +} + +void TSStatic::onScaleChanged() +{ + Parent::onScaleChanged(); + + if ( mPhysicsRep ) + { + // If the editor is enabled delay the scale operation + // by a few milliseconds so that we're not rebuilding + // during an active scale drag operation. + if ( gEditingMission ) + mPhysicsRep->queueCallback( 500, Delegate( this, &TSStatic::_updatePhysics ) ); + else + _updatePhysics(); + } + + setMaskBits( ScaleMask ); +} + +void TSStatic::setTransform(const MatrixF & mat) +{ + Parent::setTransform(mat); + if ( !isMounted() ) + setMaskBits( TransformMask ); + + if ( mPhysicsRep ) + mPhysicsRep->setTransform( mat ); + + // Accumulation + if ( isClientObject() && mShapeInstance ) + { + if ( mShapeInstance->hasAccumulation() ) + AccumulationVolume::updateObject(this); + } + + // Since this is a static it's render transform changes 1 + // to 1 with it's collision transform... no interpolation. + setRenderTransform(mat); +} + +U32 TSStatic::packUpdate(NetConnection *con, U32 mask, BitStream *stream) +{ + U32 retMask = Parent::packUpdate(con, mask, stream); + + if ( stream->writeFlag( mask & TransformMask ) ) + mathWrite( *stream, getTransform() ); + + if ( stream->writeFlag( mask & ScaleMask ) ) + { + // Only write one bit if the scale is one. + if ( stream->writeFlag( mObjScale != Point3F::One ) ) + mathWrite( *stream, mObjScale ); + } + + if ( stream->writeFlag( mask & UpdateCollisionMask ) ) + stream->write( (U32)mCollisionType ); + + if ( stream->writeFlag( mask & SkinMask ) ) + con->packNetStringHandleU( stream, mSkinNameHandle ); + + if (stream->writeFlag(mask & AdvancedStaticOptionsMask)) + { + stream->writeString(mShapeName); + stream->write((U32)mDecalType); + + stream->writeFlag(mAllowPlayerStep); + stream->writeFlag(mMeshCulling); + stream->writeFlag(mUseOriginSort); + + stream->write(mRenderNormalScalar); + + stream->write(mForceDetail); + + stream->writeFlag(mPlayAmbient); + } + + if ( stream->writeFlag(mUseAlphaFade) ) + { + stream->write(mAlphaFadeStart); + stream->write(mAlphaFadeEnd); + stream->write(mInvertAlphaFade); + } + + if ( mLightPlugin ) + retMask |= mLightPlugin->packUpdate(this, AdvancedStaticOptionsMask, con, mask, stream); + + if( stream->writeFlag( reflectorDesc != NULL ) ) + { + stream->writeRangedU32( reflectorDesc->getId(), DataBlockObjectIdFirst, DataBlockObjectIdLast ); + } + return retMask; +} + +void TSStatic::unpackUpdate(NetConnection *con, BitStream *stream) +{ + Parent::unpackUpdate(con, stream); + + if ( stream->readFlag() ) // TransformMask + { + MatrixF mat; + mathRead( *stream, &mat ); + setTransform(mat); + setRenderTransform(mat); + } + + if ( stream->readFlag() ) // ScaleMask + { + if ( stream->readFlag() ) + { + VectorF scale; + mathRead( *stream, &scale ); + setScale( scale ); + } + else + setScale( Point3F::One ); + } + + if ( stream->readFlag() ) // UpdateCollisionMask + { + U32 collisionType = CollisionMesh; + + stream->read( &collisionType ); + + // Handle it if we have changed CollisionType's + if ( (MeshType)collisionType != mCollisionType ) + { + mCollisionType = (MeshType)collisionType; + + if ( isProperlyAdded() && mShapeInstance ) + prepCollision(); + } + } + + if (stream->readFlag()) // SkinMask + { + NetStringHandle skinDesiredNameHandle = con->unpackNetStringHandleU(stream);; + if (mSkinNameHandle != skinDesiredNameHandle) + { + mSkinNameHandle = skinDesiredNameHandle; + reSkin(); + } + } + + if (stream->readFlag()) // AdvancedStaticOptionsMask + { + mShapeName = stream->readSTString(); + + stream->read((U32*)&mDecalType); + + mAllowPlayerStep = stream->readFlag(); + mMeshCulling = stream->readFlag(); + mUseOriginSort = stream->readFlag(); + + stream->read(&mRenderNormalScalar); + + stream->read(&mForceDetail); + mPlayAmbient = stream->readFlag(); + } + + mUseAlphaFade = stream->readFlag(); + if (mUseAlphaFade) + { + stream->read(&mAlphaFadeStart); + stream->read(&mAlphaFadeEnd); + stream->read(&mInvertAlphaFade); + } + + if ( mLightPlugin ) + { + mLightPlugin->unpackUpdate(this, con, stream); + } + + if( stream->readFlag() ) + { + cubeDescId = stream->readRangedU32( DataBlockObjectIdFirst, DataBlockObjectIdLast ); + } + + if ( isProperlyAdded() ) + _updateShouldTick(); +} + +//---------------------------------------------------------------------------- +bool TSStatic::castRay(const Point3F &start, const Point3F &end, RayInfo* info) +{ + if ( mCollisionType == None ) + return false; + + if ( !mShapeInstance ) + return false; + + if ( mCollisionType == Bounds ) + { + F32 fst; + if (!mObjBox.collideLine(start, end, &fst, &info->normal)) + return false; + + info->t = fst; + info->object = this; + info->point.interpolate( start, end, fst ); + info->material = NULL; + return true; + } + else + { + RayInfo shortest = *info; + RayInfo localInfo; + shortest.t = 1e8f; + localInfo.generateTexCoord = info->generateTexCoord; + + for ( U32 i = 0; i < mLOSDetails.size(); i++ ) + { + mShapeInstance->animate( mLOSDetails[i] ); + + if ( mShapeInstance->castRayOpcode( mLOSDetails[i], start, end, &localInfo ) ) + { + localInfo.object = this; + + if (localInfo.t < shortest.t) + shortest = localInfo; + } + } + + if (shortest.object == this) + { + // Copy out the shortest time... + *info = shortest; + return true; + } + } + + return false; +} + +bool TSStatic::castRayRendered(const Point3F &start, const Point3F &end, RayInfo *info) +{ + if ( !mShapeInstance ) + return false; + + // Cast the ray against the currently visible detail + RayInfo localInfo; + bool res = mShapeInstance->castRayOpcode( mShapeInstance->getCurrentDetail(), start, end, &localInfo ); + + if ( res ) + { + *info = localInfo; + info->object = this; + return true; + } + + return false; +} + +bool TSStatic::buildPolyList(PolyListContext context, AbstractPolyList* polyList, const Box3F &box, const SphereF &) +{ + if ( !mShapeInstance ) + return false; + + // This is safe to set even if we're not outputing + polyList->setTransform( &mObjToWorld, mObjScale ); + polyList->setObject( this ); + + if ( context == PLC_Export ) + { + // Use highest detail level + S32 dl = 0; + + // Try to call on the client so we can export materials + if ( isServerObject() && getClientObject() ) + dynamic_cast(getClientObject())->mShapeInstance->buildPolyList( polyList, dl ); + else + mShapeInstance->buildPolyList( polyList, dl ); + } + else if ( context == PLC_Selection ) + { + // Use the last rendered detail level + S32 dl = mShapeInstance->getCurrentDetail(); + mShapeInstance->buildPolyListOpcode( dl, polyList, box ); + } + else + { + // Figure out the mesh type we're looking for. + MeshType meshType = ( context == PLC_Decal ) ? mDecalType : mCollisionType; + + if ( meshType == None ) + return false; + else if ( meshType == Bounds ) + polyList->addBox( mObjBox ); + else if ( meshType == VisibleMesh ) + mShapeInstance->buildPolyList( polyList, 0 ); + else + { + // Everything else is done from the collision meshes + // which may be built from either the visual mesh or + // special collision geometry. + for ( U32 i = 0; i < mCollisionDetails.size(); i++ ) + mShapeInstance->buildPolyListOpcode( mCollisionDetails[i], polyList, box ); + } + } + + return true; +} + +void TSStatic::buildConvex(const Box3F& box, Convex* convex) +{ + if ( mCollisionType == None ) + return; + + if ( mShapeInstance == NULL ) + return; + + // These should really come out of a pool + mConvexList->collectGarbage(); + + if ( mCollisionType == Bounds ) + { + // Just return a box convex for the entire shape... + Convex* cc = 0; + CollisionWorkingList& wl = convex->getWorkingList(); + for (CollisionWorkingList* itr = wl.wLink.mNext; itr != &wl; itr = itr->wLink.mNext) + { + if (itr->mConvex->getType() == BoxConvexType && + itr->mConvex->getObject() == this) + { + cc = itr->mConvex; + break; + } + } + if (cc) + return; + + // Create a new convex. + BoxConvex* cp = new BoxConvex; + mConvexList->registerObject(cp); + convex->addToWorkingList(cp); + cp->init(this); + + mObjBox.getCenter(&cp->mCenter); + cp->mSize.x = mObjBox.len_x() / 2.0f; + cp->mSize.y = mObjBox.len_y() / 2.0f; + cp->mSize.z = mObjBox.len_z() / 2.0f; + } + else // CollisionMesh || VisibleMesh + { + TSStaticPolysoupConvex::smCurObject = this; + + for (U32 i = 0; i < mCollisionDetails.size(); i++) + mShapeInstance->buildConvexOpcode( mObjToWorld, mObjScale, mCollisionDetails[i], box, convex, mConvexList ); + + TSStaticPolysoupConvex::smCurObject = NULL; + } +} + +SceneObject* TSStaticPolysoupConvex::smCurObject = NULL; + +TSStaticPolysoupConvex::TSStaticPolysoupConvex() +: box( 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f ), + normal( 0.0f, 0.0f, 0.0f, 0.0f ), + idx( 0 ), + mesh( NULL ) +{ + mType = TSPolysoupConvexType; + + for ( U32 i = 0; i < 4; ++i ) + { + verts[i].set( 0.0f, 0.0f, 0.0f ); + } +} + +Point3F TSStaticPolysoupConvex::support(const VectorF& vec) const +{ + F32 bestDot = mDot( verts[0], vec ); + + const Point3F *bestP = &verts[0]; + for(S32 i=1; i<4; i++) + { + F32 newD = mDot(verts[i], vec); + if(newD > bestDot) + { + bestDot = newD; + bestP = &verts[i]; + } + } + + return *bestP; +} + +Box3F TSStaticPolysoupConvex::getBoundingBox() const +{ + Box3F wbox = box; + wbox.minExtents.convolve( mObject->getScale() ); + wbox.maxExtents.convolve( mObject->getScale() ); + mObject->getTransform().mul(wbox); + return wbox; +} + +Box3F TSStaticPolysoupConvex::getBoundingBox(const MatrixF& mat, const Point3F& scale) const +{ + AssertISV(false, "TSStaticPolysoupConvex::getBoundingBox(m,p) - Not implemented. -- XEA"); + return box; +} + +void TSStaticPolysoupConvex::getPolyList(AbstractPolyList *list) +{ + // Transform the list into object space and set the pointer to the object + MatrixF i( mObject->getTransform() ); + Point3F iS( mObject->getScale() ); + list->setTransform(&i, iS); + list->setObject(mObject); + + // Add only the original collision triangle + S32 base = list->addPoint(verts[0]); + list->addPoint(verts[2]); + list->addPoint(verts[1]); + + list->begin(0, (U32)idx ^ (uintptr_t)mesh); + list->vertex(base + 2); + list->vertex(base + 1); + list->vertex(base + 0); + list->plane(base + 0, base + 1, base + 2); + list->end(); +} + +void TSStaticPolysoupConvex::getFeatures(const MatrixF& mat,const VectorF& n, ConvexFeature* cf) +{ + cf->material = 0; + cf->object = mObject; + + // For a tetrahedron this is pretty easy... first + // convert everything into world space. + Point3F tverts[4]; + mat.mulP(verts[0], &tverts[0]); + mat.mulP(verts[1], &tverts[1]); + mat.mulP(verts[2], &tverts[2]); + mat.mulP(verts[3], &tverts[3]); + + // points... + S32 firstVert = cf->mVertexList.size(); + cf->mVertexList.increment(); cf->mVertexList.last() = tverts[0]; + cf->mVertexList.increment(); cf->mVertexList.last() = tverts[1]; + cf->mVertexList.increment(); cf->mVertexList.last() = tverts[2]; + cf->mVertexList.increment(); cf->mVertexList.last() = tverts[3]; + + // edges... + cf->mEdgeList.increment(); + cf->mEdgeList.last().vertex[0] = firstVert+0; + cf->mEdgeList.last().vertex[1] = firstVert+1; + + cf->mEdgeList.increment(); + cf->mEdgeList.last().vertex[0] = firstVert+1; + cf->mEdgeList.last().vertex[1] = firstVert+2; + + cf->mEdgeList.increment(); + cf->mEdgeList.last().vertex[0] = firstVert+2; + cf->mEdgeList.last().vertex[1] = firstVert+0; + + cf->mEdgeList.increment(); + cf->mEdgeList.last().vertex[0] = firstVert+3; + cf->mEdgeList.last().vertex[1] = firstVert+0; + + cf->mEdgeList.increment(); + cf->mEdgeList.last().vertex[0] = firstVert+3; + cf->mEdgeList.last().vertex[1] = firstVert+1; + + cf->mEdgeList.increment(); + cf->mEdgeList.last().vertex[0] = firstVert+3; + cf->mEdgeList.last().vertex[1] = firstVert+2; + + // triangles... + cf->mFaceList.increment(); + cf->mFaceList.last().normal = PlaneF(tverts[2], tverts[1], tverts[0]); + cf->mFaceList.last().vertex[0] = firstVert+2; + cf->mFaceList.last().vertex[1] = firstVert+1; + cf->mFaceList.last().vertex[2] = firstVert+0; + + cf->mFaceList.increment(); + cf->mFaceList.last().normal = PlaneF(tverts[1], tverts[0], tverts[3]); + cf->mFaceList.last().vertex[0] = firstVert+1; + cf->mFaceList.last().vertex[1] = firstVert+0; + cf->mFaceList.last().vertex[2] = firstVert+3; + + cf->mFaceList.increment(); + cf->mFaceList.last().normal = PlaneF(tverts[2], tverts[1], tverts[3]); + cf->mFaceList.last().vertex[0] = firstVert+2; + cf->mFaceList.last().vertex[1] = firstVert+1; + cf->mFaceList.last().vertex[2] = firstVert+3; + + cf->mFaceList.increment(); + cf->mFaceList.last().normal = PlaneF(tverts[0], tverts[2], tverts[3]); + cf->mFaceList.last().vertex[0] = firstVert+0; + cf->mFaceList.last().vertex[1] = firstVert+2; + cf->mFaceList.last().vertex[2] = firstVert+3; + + // All done! +} + +void TSStatic::onMount( SceneObject *obj, S32 node ) +{ + Parent::onMount(obj, node); + _updateShouldTick(); +} + +void TSStatic::onUnmount( SceneObject *obj, S32 node ) +{ + Parent::onUnmount( obj, node ); + setMaskBits( TransformMask ); + _updateShouldTick(); +} + +//------------------------------------------------------------------------ +//These functions are duplicated in tsStatic and shapeBase. +//They each function a little differently; but achieve the same purpose of gathering +//target names/counts without polluting simObject. + +DefineEngineMethod( TSStatic, getTargetName, const char*, ( S32 index ),(0), + "Get the name of the indexed shape material.\n" + "@param index index of the material to get (valid range is 0 - getTargetCount()-1).\n" + "@return the name of the indexed material.\n" + "@see getTargetCount()\n") +{ + TSStatic *obj = dynamic_cast< TSStatic* > ( object ); + if(obj) + { + // Try to use the client object (so we get the reskinned targets in the Material Editor) + if ((TSStatic*)obj->getClientObject()) + obj = (TSStatic*)obj->getClientObject(); + + return obj->getShapeInstance()->getTargetName(index); + } + + return ""; +} + +DefineEngineMethod( TSStatic, getTargetCount, S32,(),, + "Get the number of materials in the shape.\n" + "@return the number of materials in the shape.\n" + "@see getTargetName()\n") +{ + TSStatic *obj = dynamic_cast< TSStatic* > ( object ); + if(obj) + { + // Try to use the client object (so we get the reskinned targets in the Material Editor) + if ((TSStatic*)obj->getClientObject()) + obj = (TSStatic*)obj->getClientObject(); + + return obj->getShapeInstance()->getTargetCount(); + } + + return -1; +} + +// This method is able to change materials per map to with others. The material that is being replaced is being mapped to +// unmapped_mat as a part of this transition + +DefineEngineMethod( TSStatic, changeMaterial, void, ( const char* mapTo, Material* oldMat, Material* newMat ),("",nullAsType(),nullAsType()), + "@brief Change one of the materials on the shape.\n\n" + + "This method changes materials per mapTo with others. The material that " + "is being replaced is mapped to unmapped_mat as a part of this transition.\n" + + "@note Warning, right now this only sort of works. It doesn't do a live " + "update like it should.\n" + + "@param mapTo the name of the material target to remap (from getTargetName)\n" + "@param oldMat the old Material that was mapped \n" + "@param newMat the new Material to map\n\n" + + "@tsexample\n" + "// remap the first material in the shape\n" + "%mapTo = %obj.getTargetName( 0 );\n" + "%obj.changeMaterial( %mapTo, 0, MyMaterial );\n" + "@endtsexample\n" ) +{ + // if no valid new material, theres no reason for doing this + if( !newMat ) + { + Con::errorf("TSShape::changeMaterial failed: New material does not exist!"); + return; + } + + TSMaterialList* shapeMaterialList = object->getShape()->materialList; + + // Check the mapTo name exists for this shape + S32 matIndex = shapeMaterialList->getMaterialNameList().find_next(String(mapTo)); + if (matIndex < 0) + { + Con::errorf("TSShape::changeMaterial failed: Invalid mapTo name '%s'", mapTo); + return; + } + + // Lets remap the old material off, so as to let room for our current material room to claim its spot + if( oldMat ) + oldMat->mMapTo = String("unmapped_mat"); + + newMat->mMapTo = mapTo; + + // Map the material by name in the matmgr + MATMGR->mapMaterial( mapTo, newMat->getName() ); + + // Replace instances with the new material being traded in. Lets make sure that we only + // target the specific targets per inst, this is actually doing more than we thought + delete shapeMaterialList->mMatInstList[matIndex]; + shapeMaterialList->mMatInstList[matIndex] = newMat->createMatInstance(); + + // Finish up preparing the material instances for rendering + const GFXVertexFormat *flags = getGFXVertexFormat(); + FeatureSet features = MATMGR->getDefaultFeatures(); + shapeMaterialList->getMaterialInst(matIndex)->init(features, flags); +} + +DefineEngineMethod( TSStatic, getModelFile, const char *, (),, + "@brief Get the model filename used by this shape.\n\n" + + "@return the shape filename\n\n" + "@tsexample\n" + "// Acquire the model filename used on this shape.\n" + "%modelFilename = %obj.getModelFile();\n" + "@endtsexample\n" + ) +{ +<<<<<<< HEAD + return object->getShapeFileName(); +======= + return object->getShapeFileName(); +>>>>>>> garagegames/development +} diff --git a/Engine/source/T3D/vehicles/guiSpeedometer.cpp b/Engine/source/T3D/vehicles/guiSpeedometer.cpp index b43f65951..847c24a8c 100644 --- a/Engine/source/T3D/vehicles/guiSpeedometer.cpp +++ b/Engine/source/T3D/vehicles/guiSpeedometer.cpp @@ -156,7 +156,7 @@ void GuiSpeedometerHud::onRender(Point2I offset, const RectI &updateRect) if (!conn) return; - // Requires either a vehicle control object or a vehicle-mounted player + // Requires either a vehicle control object or a vehicle-mounted player Vehicle* vehicle = dynamic_cast(conn->getControlObject()); if(!vehicle){ Player * player = dynamic_cast(conn->getControlObject()); @@ -183,20 +183,20 @@ void GuiSpeedometerHud::onRender(Point2I offset, const RectI &updateRect) F32 fillOffset = GFX->getFillConventionOffset(); // Find the fill offset Point2F viewCenter(offset.x + fillOffset + center.x, offset.y + fillOffset + center.y); - // Handle rotation calculations + // Handle rotation calculations F32 rotation, spinAngle; rotation = mMinAngle + (mMaxAngle - mMinAngle) * (mSpeed / mMaxSpeed); spinAngle = mDegToRad(rotation); MatrixF rotMatrix(EulerF(0.0, 0.0, spinAngle)); - // Set up the needle vertex list - Point3F vertList[5]; - vertList[0].set(+mNeedleLength,-mNeedleWidth,0); - vertList[1].set(+mNeedleLength,+mNeedleWidth,0); - vertList[2].set(-mTailLength ,+mNeedleWidth,0); - vertList[3].set(-mTailLength ,-mNeedleWidth,0); - vertList[4].set(+mNeedleLength,-mNeedleWidth,0); //// Get back to the start! - + // Set up the needle vertex list + Point3F vertList[5]; + vertList[0].set(+mNeedleLength,-mNeedleWidth,0); + vertList[1].set(+mNeedleLength,+mNeedleWidth,0); + vertList[2].set(-mTailLength ,+mNeedleWidth,0); + vertList[3].set(-mTailLength ,-mNeedleWidth,0); + vertList[4].set(+mNeedleLength,-mNeedleWidth,0); //// Get back to the start! + // Create a GFXStateBlock description if one has not been set. if (mBlendSB.isNull()) { diff --git a/Engine/source/app/badWordFilter.cpp b/Engine/source/app/badWordFilter.cpp index e267f5032..d0547e5ee 100644 --- a/Engine/source/app/badWordFilter.cpp +++ b/Engine/source/app/badWordFilter.cpp @@ -65,7 +65,7 @@ void BadWordFilter::create() { Con::addVariable("pref::enableBadWordFilter", TypeBool, &filteringEnabled, "@brief If true, the bad word filter will be enabled.\n\n" - "@ingroup Game"); + "@ingroup Game"); gBadWordFilter = new BadWordFilter; gBadWordFilter->addBadWord("shit"); gBadWordFilter->addBadWord("fuck"); @@ -251,7 +251,7 @@ DefineEngineFunction(addBadWord, bool, (const char* badWord),, "@ingroup Game") { - return gBadWordFilter->addBadWord(badWord); + return gBadWordFilter->addBadWord(badWord); } DefineEngineFunction(filterString, const char *, (const char* baseString, const char* replacementChars), (nullAsType(), nullAsType()), @@ -279,17 +279,17 @@ DefineEngineFunction(filterString, const char *, (const char* baseString, const "@ingroup Game") { - const char *replaceStr = NULL; + const char *replaceStr = NULL; - if(replacementChars) - replaceStr = replacementChars; - else - replaceStr = gBadWordFilter->getDefaultReplaceStr(); + if(replacementChars) + replaceStr = replacementChars; + else + replaceStr = gBadWordFilter->getDefaultReplaceStr(); - char *ret = Con::getReturnBuffer(dStrlen(baseString) + 1); - dStrcpy(ret, baseString); - gBadWordFilter->filterString(ret, replaceStr); - return ret; + char *ret = Con::getReturnBuffer(dStrlen(baseString) + 1); + dStrcpy(ret, baseString); + gBadWordFilter->filterString(ret, replaceStr); + return ret; } DefineEngineFunction(containsBadWords, bool, (const char* text),, @@ -316,17 +316,17 @@ DefineEngineFunction(containsBadWords, bool, (const char* text),, "// Otherwise print the original text\n" "if(containsBadWords(%userText))\n" "{\n" - " // Filter the string\n" - " %filteredText = filterString(%userText, %replacementChars);\n\n" - " // Print filtered text\n" - " echo(%filteredText);\n" + " // Filter the string\n" + " %filteredText = filterString(%userText, %replacementChars);\n\n" + " // Print filtered text\n" + " echo(%filteredText);\n" "}\n" "else\n" - " echo(%userText);\n\n" + " echo(%userText);\n\n" "@endtsexample\n" "@ingroup Game") { - return gBadWordFilter->containsBadWords(text); + return gBadWordFilter->containsBadWords(text); } diff --git a/Engine/source/console/CMDscan.cpp b/Engine/source/console/CMDscan.cpp index 6aedd587f..4a1c132b9 100644 --- a/Engine/source/console/CMDscan.cpp +++ b/Engine/source/console/CMDscan.cpp @@ -49,15 +49,15 @@ /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST -#else /* ! __cplusplus */ +#else /* ! __cplusplus */ #if __STDC__ #define YY_USE_PROTOS #define YY_USE_CONST -#endif /* __STDC__ */ -#endif /* ! __cplusplus */ +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ #ifdef __TURBOC__ #pragma warn -rch @@ -128,10 +128,10 @@ extern FILE *yyin, *yyout; * int a single C statement (which needs a semi-colon terminator). This * avoids problems with code like: * - * if ( condition_holds ) - * yyless( 5 ); - * else - * do_something_else(); + * if ( condition_holds ) + * yyless( 5 ); + * else + * do_something_else(); * * Prior to using the do-while the compiler would get upset at the * "else" because it interpreted the "if" statement as being all @@ -141,14 +141,14 @@ extern FILE *yyin, *yyout; /* Return all but the first 'n' matched characters back to the input stream. */ #define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - *yy_cp = yy_hold_char; \ - yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) + do \ + { \ + /* Undo effects of setting up yytext. */ \ + *yy_cp = yy_hold_char; \ + yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) #define unput(c) yyunput( c, yytext_ptr ) @@ -160,61 +160,61 @@ typedef unsigned int yy_size_t; struct yy_buffer_state - { - FILE *yy_input_file; + { + FILE *yy_input_file; - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; - int yy_buffer_status; + int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ #define YY_BUFFER_EOF_PENDING 2 - }; + }; static YY_BUFFER_STATE yy_current_buffer = 0; @@ -228,15 +228,15 @@ static YY_BUFFER_STATE yy_current_buffer = 0; /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; -static int yy_n_chars; /* number of characters read into yy_ch_buf */ +static int yy_n_chars; /* number of characters read into yy_ch_buf */ int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; -static int yy_init = 1; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ +static int yy_init = 1; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... @@ -264,18 +264,18 @@ static void yy_flex_free YY_PROTO(( void * )); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ - { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_is_interactive = is_interactive; \ - } + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_is_interactive = is_interactive; \ + } #define yy_set_bol(at_bol) \ - { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_at_bol = at_bol; \ - } + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_at_bol = at_bol; \ + } #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) @@ -294,11 +294,11 @@ static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ - yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ - yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yy_c_buf_p = yy_cp; + yytext_ptr = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yy_c_buf_p = yy_cp; #define YY_NUM_RULES 94 #define YY_END_OF_BUFFER 95 @@ -715,21 +715,21 @@ YY_MALLOC_DECL */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ - if ( yy_current_buffer->yy_is_interactive ) \ - { \ - int c = '*', n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ - && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); + if ( yy_current_buffer->yy_is_interactive ) \ + { \ + int c = '*', n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ + && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - @@ -770,280 +770,280 @@ YY_MALLOC_DECL #endif #define YY_RULE_SETUP \ - YY_USER_ACTION + YY_USER_ACTION YY_DECL - { - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; + { + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; #line 105 "CMDscan.l" ; #line 785 "CMDscan.cpp" - if ( yy_init ) - { - yy_init = 0; + if ( yy_init ) + { + yy_init = 0; #ifdef YY_USER_INIT - YY_USER_INIT; + YY_USER_INIT; #endif - if ( ! yy_start ) - yy_start = 1; /* first start state */ + if ( ! yy_start ) + yy_start = 1; /* first start state */ - if ( ! yyin ) - yyin = stdin; + if ( ! yyin ) + yyin = stdin; - if ( ! yyout ) - yyout = stdout; + if ( ! yyout ) + yyout = stdout; - if ( ! yy_current_buffer ) - yy_current_buffer = - yy_create_buffer( yyin, YY_BUF_SIZE ); + if ( ! yy_current_buffer ) + yy_current_buffer = + yy_create_buffer( yyin, YY_BUF_SIZE ); - yy_load_buffer_state(); - } + yy_load_buffer_state(); + } - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = yy_c_buf_p; + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = yy_c_buf_p; - /* Support of yytext. */ - *yy_cp = yy_hold_char; + /* Support of yytext. */ + *yy_cp = yy_hold_char; - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; - yy_current_state = yy_start; + yy_current_state = yy_start; yy_match: - do - { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if ( yy_accept[yy_current_state] ) - { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 224 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 338 ); + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if ( yy_accept[yy_current_state] ) + { + yy_last_accepting_state = yy_current_state; + yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 224 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 338 ); yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = yy_last_accepting_cpos; + yy_current_state = yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } - YY_DO_BEFORE_ACTION; + YY_DO_BEFORE_ACTION; -do_action: /* This label is used only to access EOF actions. */ +do_action: /* This label is used only to access EOF actions. */ - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yy_hold_char; - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; - goto yy_find_action; + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yy_hold_char; + yy_cp = yy_last_accepting_cpos; + yy_current_state = yy_last_accepting_state; + goto yy_find_action; case 1: YY_RULE_SETUP #line 107 "CMDscan.l" { } - YY_BREAK + YY_BREAK case 2: YY_RULE_SETUP #line 108 "CMDscan.l" { return(Sc_ScanDocBlock()); } - YY_BREAK + YY_BREAK case 3: YY_RULE_SETUP #line 109 "CMDscan.l" ; - YY_BREAK + YY_BREAK case 4: YY_RULE_SETUP #line 110 "CMDscan.l" ; - YY_BREAK + YY_BREAK case 5: YY_RULE_SETUP #line 111 "CMDscan.l" {lineIndex++;} - YY_BREAK + YY_BREAK case 6: YY_RULE_SETUP #line 112 "CMDscan.l" { return(Sc_ScanString(STRATOM)); } - YY_BREAK + YY_BREAK case 7: YY_RULE_SETUP #line 113 "CMDscan.l" { return(Sc_ScanString(TAGATOM)); } - YY_BREAK + YY_BREAK case 8: YY_RULE_SETUP #line 114 "CMDscan.l" { CMDlval.i = MakeToken< int >( opEQ, lineIndex ); return opEQ; } - YY_BREAK + YY_BREAK case 9: YY_RULE_SETUP #line 115 "CMDscan.l" { CMDlval.i = MakeToken< int >( opNE, lineIndex ); return opNE; } - YY_BREAK + YY_BREAK case 10: YY_RULE_SETUP #line 116 "CMDscan.l" { CMDlval.i = MakeToken< int >( opGE, lineIndex ); return opGE; } - YY_BREAK + YY_BREAK case 11: YY_RULE_SETUP #line 117 "CMDscan.l" { CMDlval.i = MakeToken< int >( opLE, lineIndex ); return opLE; } - YY_BREAK + YY_BREAK case 12: YY_RULE_SETUP #line 118 "CMDscan.l" { CMDlval.i = MakeToken< int >( opAND, lineIndex ); return opAND; } - YY_BREAK + YY_BREAK case 13: YY_RULE_SETUP #line 119 "CMDscan.l" { CMDlval.i = MakeToken< int >( opOR, lineIndex ); return opOR; } - YY_BREAK + YY_BREAK case 14: YY_RULE_SETUP #line 120 "CMDscan.l" { CMDlval.i = MakeToken< int >( opCOLONCOLON, lineIndex ); return opCOLONCOLON; } - YY_BREAK + YY_BREAK case 15: YY_RULE_SETUP #line 121 "CMDscan.l" { CMDlval.i = MakeToken< int >( opMINUSMINUS, lineIndex ); return opMINUSMINUS; } - YY_BREAK + YY_BREAK case 16: YY_RULE_SETUP #line 122 "CMDscan.l" { CMDlval.i = MakeToken< int >( opPLUSPLUS, lineIndex ); return opPLUSPLUS; } - YY_BREAK + YY_BREAK case 17: YY_RULE_SETUP #line 123 "CMDscan.l" { CMDlval.i = MakeToken< int >( opSTREQ, lineIndex ); return opSTREQ; } - YY_BREAK + YY_BREAK case 18: YY_RULE_SETUP #line 124 "CMDscan.l" { CMDlval.i = MakeToken< int >( opSTRNE, lineIndex ); return opSTRNE; } - YY_BREAK + YY_BREAK case 19: YY_RULE_SETUP #line 125 "CMDscan.l" { CMDlval.i = MakeToken< int >( opSHL, lineIndex ); return opSHL; } - YY_BREAK + YY_BREAK case 20: YY_RULE_SETUP #line 126 "CMDscan.l" { CMDlval.i = MakeToken< int >( opSHR, lineIndex ); return opSHR; } - YY_BREAK + YY_BREAK case 21: YY_RULE_SETUP #line 127 "CMDscan.l" { CMDlval.i = MakeToken< int >( opPLASN, lineIndex ); return opPLASN; } - YY_BREAK + YY_BREAK case 22: YY_RULE_SETUP #line 128 "CMDscan.l" { CMDlval.i = MakeToken< int >( opMIASN, lineIndex ); return opMIASN; } - YY_BREAK + YY_BREAK case 23: YY_RULE_SETUP #line 129 "CMDscan.l" { CMDlval.i = MakeToken< int >( opMLASN, lineIndex ); return opMLASN; } - YY_BREAK + YY_BREAK case 24: YY_RULE_SETUP #line 130 "CMDscan.l" { CMDlval.i = MakeToken< int >( opDVASN, lineIndex ); return opDVASN; } - YY_BREAK + YY_BREAK case 25: YY_RULE_SETUP #line 131 "CMDscan.l" { CMDlval.i = MakeToken< int >( opMODASN, lineIndex ); return opMODASN; } - YY_BREAK + YY_BREAK case 26: YY_RULE_SETUP #line 132 "CMDscan.l" { CMDlval.i = MakeToken< int >( opANDASN, lineIndex ); return opANDASN; } - YY_BREAK + YY_BREAK case 27: YY_RULE_SETUP #line 133 "CMDscan.l" { CMDlval.i = MakeToken< int >( opXORASN, lineIndex ); return opXORASN; } - YY_BREAK + YY_BREAK case 28: YY_RULE_SETUP #line 134 "CMDscan.l" { CMDlval.i = MakeToken< int >( opORASN, lineIndex ); return opORASN; } - YY_BREAK + YY_BREAK case 29: YY_RULE_SETUP #line 135 "CMDscan.l" { CMDlval.i = MakeToken< int >( opSLASN, lineIndex ); return opSLASN; } - YY_BREAK + YY_BREAK case 30: YY_RULE_SETUP #line 136 "CMDscan.l" { CMDlval.i = MakeToken< int >( opSRASN, lineIndex ); return opSRASN; } - YY_BREAK + YY_BREAK case 31: YY_RULE_SETUP #line 137 "CMDscan.l" { CMDlval.i = MakeToken< int >( opINTNAME, lineIndex ); return opINTNAME; } - YY_BREAK + YY_BREAK case 32: YY_RULE_SETUP #line 138 "CMDscan.l" { CMDlval.i = MakeToken< int >( opINTNAMER, lineIndex ); return opINTNAMER; } - YY_BREAK + YY_BREAK case 33: YY_RULE_SETUP #line 139 "CMDscan.l" { CMDlval.i = MakeToken< int >( '\n', lineIndex ); return '@'; } - YY_BREAK + YY_BREAK case 34: YY_RULE_SETUP #line 140 "CMDscan.l" { CMDlval.i = MakeToken< int >( '\t', lineIndex ); return '@'; } - YY_BREAK + YY_BREAK case 35: YY_RULE_SETUP #line 141 "CMDscan.l" { CMDlval.i = MakeToken< int >( ' ', lineIndex ); return '@'; } - YY_BREAK + YY_BREAK case 36: YY_RULE_SETUP #line 142 "CMDscan.l" { CMDlval.i = MakeToken< int >( 0, lineIndex ); return '@'; } - YY_BREAK + YY_BREAK case 37: YY_RULE_SETUP #line 143 "CMDscan.l" @@ -1070,7 +1070,7 @@ YY_RULE_SETUP break; } } - YY_BREAK + YY_BREAK case 38: #line 167 "CMDscan.l" case 39: @@ -1121,475 +1121,475 @@ case 61: YY_RULE_SETUP #line 189 "CMDscan.l" { CMDlval.i = MakeToken< int >( CMDtext[ 0 ], lineIndex ); return CMDtext[ 0 ]; } - YY_BREAK + YY_BREAK case 62: YY_RULE_SETUP #line 190 "CMDscan.l" { CMDlval.i = MakeToken< int >( rwIN, lineIndex ); return(rwIN); } - YY_BREAK + YY_BREAK case 63: YY_RULE_SETUP #line 191 "CMDscan.l" { CMDlval.i = MakeToken< int >( rwCASEOR, lineIndex ); return(rwCASEOR); } - YY_BREAK + YY_BREAK case 64: YY_RULE_SETUP #line 192 "CMDscan.l" { CMDlval.i = MakeToken< int >( rwBREAK, lineIndex ); return(rwBREAK); } - YY_BREAK + YY_BREAK case 65: YY_RULE_SETUP #line 193 "CMDscan.l" { CMDlval.i = MakeToken< int >( rwRETURN, lineIndex ); return(rwRETURN); } - YY_BREAK + YY_BREAK case 66: YY_RULE_SETUP #line 194 "CMDscan.l" { CMDlval.i = MakeToken< int >( rwELSE, lineIndex ); return(rwELSE); } - YY_BREAK + YY_BREAK case 67: YY_RULE_SETUP #line 195 "CMDscan.l" { CMDlval.i = MakeToken< int >( rwASSERT, lineIndex ); return(rwASSERT); } - YY_BREAK + YY_BREAK case 68: YY_RULE_SETUP #line 196 "CMDscan.l" { CMDlval.i = MakeToken< int >( rwWHILE, lineIndex ); return(rwWHILE); } - YY_BREAK + YY_BREAK case 69: YY_RULE_SETUP #line 197 "CMDscan.l" { CMDlval.i = MakeToken< int >( rwDO, lineIndex ); return(rwDO); } - YY_BREAK + YY_BREAK case 70: YY_RULE_SETUP #line 198 "CMDscan.l" { CMDlval.i = MakeToken< int >( rwIF, lineIndex ); return(rwIF); } - YY_BREAK + YY_BREAK case 71: YY_RULE_SETUP #line 199 "CMDscan.l" { CMDlval.i = MakeToken< int >( rwFOREACHSTR, lineIndex ); return(rwFOREACHSTR); } - YY_BREAK + YY_BREAK case 72: YY_RULE_SETUP #line 200 "CMDscan.l" { CMDlval.i = MakeToken< int >( rwFOREACH, lineIndex ); return(rwFOREACH); } - YY_BREAK + YY_BREAK case 73: YY_RULE_SETUP #line 201 "CMDscan.l" { CMDlval.i = MakeToken< int >( rwFOR, lineIndex ); return(rwFOR); } - YY_BREAK + YY_BREAK case 74: YY_RULE_SETUP #line 202 "CMDscan.l" { CMDlval.i = MakeToken< int >( rwCONTINUE, lineIndex ); return(rwCONTINUE); } - YY_BREAK + YY_BREAK case 75: YY_RULE_SETUP #line 203 "CMDscan.l" { CMDlval.i = MakeToken< int >( rwDEFINE, lineIndex ); return(rwDEFINE); } - YY_BREAK + YY_BREAK case 76: YY_RULE_SETUP #line 204 "CMDscan.l" { CMDlval.i = MakeToken< int >( rwDECLARE, lineIndex ); return(rwDECLARE); } - YY_BREAK + YY_BREAK case 77: YY_RULE_SETUP #line 205 "CMDscan.l" { CMDlval.i = MakeToken< int >( rwDECLARESINGLETON, lineIndex ); return(rwDECLARESINGLETON); } - YY_BREAK + YY_BREAK case 78: YY_RULE_SETUP #line 206 "CMDscan.l" { CMDlval.i = MakeToken< int >( rwDATABLOCK, lineIndex ); return(rwDATABLOCK); } - YY_BREAK + YY_BREAK case 79: YY_RULE_SETUP #line 207 "CMDscan.l" { CMDlval.i = MakeToken< int >( rwCASE, lineIndex ); return(rwCASE); } - YY_BREAK + YY_BREAK case 80: YY_RULE_SETUP #line 208 "CMDscan.l" { CMDlval.i = MakeToken< int >( rwSWITCHSTR, lineIndex ); return(rwSWITCHSTR); } - YY_BREAK + YY_BREAK case 81: YY_RULE_SETUP #line 209 "CMDscan.l" { CMDlval.i = MakeToken< int >( rwSWITCH, lineIndex ); return(rwSWITCH); } - YY_BREAK + YY_BREAK case 82: YY_RULE_SETUP #line 210 "CMDscan.l" { CMDlval.i = MakeToken< int >( rwDEFAULT, lineIndex ); return(rwDEFAULT); } - YY_BREAK + YY_BREAK case 83: YY_RULE_SETUP #line 211 "CMDscan.l" { CMDlval.i = MakeToken< int >( rwPACKAGE, lineIndex ); return(rwPACKAGE); } - YY_BREAK + YY_BREAK case 84: YY_RULE_SETUP #line 212 "CMDscan.l" { CMDlval.i = MakeToken< int >( rwNAMESPACE, lineIndex ); return(rwNAMESPACE); } - YY_BREAK + YY_BREAK case 85: YY_RULE_SETUP #line 213 "CMDscan.l" { CMDlval.i = MakeToken< int >( 1, lineIndex ); return INTCONST; } - YY_BREAK + YY_BREAK case 86: YY_RULE_SETUP #line 214 "CMDscan.l" { CMDlval.i = MakeToken< int >( 0, lineIndex ); return INTCONST; } - YY_BREAK + YY_BREAK case 87: YY_RULE_SETUP #line 215 "CMDscan.l" { return(Sc_ScanVar()); } - YY_BREAK + YY_BREAK case 88: YY_RULE_SETUP #line 216 "CMDscan.l" { return Sc_ScanIdent(); } - YY_BREAK + YY_BREAK case 89: YY_RULE_SETUP #line 217 "CMDscan.l" return(Sc_ScanHex()); - YY_BREAK + YY_BREAK case 90: YY_RULE_SETUP #line 218 "CMDscan.l" { CMDtext[CMDleng] = 0; CMDlval.i = MakeToken< int >( dAtoi(CMDtext), lineIndex ); return INTCONST; } - YY_BREAK + YY_BREAK case 91: YY_RULE_SETUP #line 219 "CMDscan.l" return Sc_ScanNum(); - YY_BREAK + YY_BREAK case 92: YY_RULE_SETUP #line 220 "CMDscan.l" return(ILLEGAL_TOKEN); - YY_BREAK + YY_BREAK case 93: YY_RULE_SETUP #line 221 "CMDscan.l" return(ILLEGAL_TOKEN); - YY_BREAK + YY_BREAK case 94: YY_RULE_SETUP #line 222 "CMDscan.l" ECHO; - YY_BREAK + YY_BREAK #line 1291 "CMDscan.cpp" case YY_STATE_EOF(INITIAL): - yyterminate(); + yyterminate(); - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yy_hold_char; + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yy_hold_char; - if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between yy_current_buffer and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yy_n_chars = yy_current_buffer->yy_n_chars; - yy_current_buffer->yy_input_file = yyin; - yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; - } + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between yy_current_buffer and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yy_n_chars = yy_current_buffer->yy_n_chars; + yy_current_buffer->yy_input_file = yyin; + yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; + } - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; - yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; + yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; - yy_current_state = yy_get_previous_state(); + yy_current_state = yy_get_previous_state(); - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ - yy_next_state = yy_try_NUL_trans( yy_current_state ); + yy_next_state = yy_try_NUL_trans( yy_current_state ); - yy_bp = yytext_ptr + YY_MORE_ADJ; + yy_bp = yytext_ptr + YY_MORE_ADJ; - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } - else - { - yy_cp = yy_c_buf_p; - goto yy_find_action; - } - } + else + { + yy_cp = yy_c_buf_p; + goto yy_find_action; + } + } - else switch ( yy_get_next_buffer() ) - { - case EOB_ACT_END_OF_FILE: - { - yy_did_buffer_switch_on_eof = 0; + else switch ( yy_get_next_buffer() ) + { + case EOB_ACT_END_OF_FILE: + { + yy_did_buffer_switch_on_eof = 0; - if ( yywrap() ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; + if ( yywrap() ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } - else - { - if ( ! yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } + else + { + if ( ! yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } - case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = - yytext_ptr + yy_amount_of_matched_text; + case EOB_ACT_CONTINUE_SCAN: + yy_c_buf_p = + yytext_ptr + yy_amount_of_matched_text; - yy_current_state = yy_get_previous_state(); + yy_current_state = yy_get_previous_state(); - yy_cp = yy_c_buf_p; - yy_bp = yytext_ptr + YY_MORE_ADJ; - goto yy_match; + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; + goto yy_match; - case EOB_ACT_LAST_MATCH: - yy_c_buf_p = - &yy_current_buffer->yy_ch_buf[yy_n_chars]; + case EOB_ACT_LAST_MATCH: + yy_c_buf_p = + &yy_current_buffer->yy_ch_buf[yy_n_chars]; - yy_current_state = yy_get_previous_state(); + yy_current_state = yy_get_previous_state(); - yy_cp = yy_c_buf_p; - yy_bp = yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of yylex */ + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer() - { - char *dest = yy_current_buffer->yy_ch_buf; - char *source = yytext_ptr; - int number_to_move, i; - int ret_val; + { + char *dest = yy_current_buffer->yy_ch_buf; + char *source = yytext_ptr; + int number_to_move, i; + int ret_val; - if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); + if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); - if ( yy_current_buffer->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a singled characater, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } + if ( yy_current_buffer->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a singled characater, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } - /* Try to read more data. */ + /* Try to read more data. */ - /* First move last chars to start of buffer. */ - number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; + /* First move last chars to start of buffer. */ + number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); - if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - yy_n_chars = 0; + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + yy_n_chars = 0; - else - { - int num_to_read = - yy_current_buffer->yy_buf_size - number_to_move - 1; + else + { + int num_to_read = + yy_current_buffer->yy_buf_size - number_to_move - 1; - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ #ifdef YY_USES_REJECT - YY_FATAL_ERROR( + YY_FATAL_ERROR( "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); #else - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = yy_current_buffer; + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = yy_current_buffer; - int yy_c_buf_p_offset = - (int) (yy_c_buf_p - b->yy_ch_buf); + int yy_c_buf_p_offset = + (int) (yy_c_buf_p - b->yy_ch_buf); - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yy_flex_realloc( (void *) b->yy_ch_buf, - b->yy_buf_size + 2 ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yy_flex_realloc( (void *) b->yy_ch_buf, + b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); - yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - num_to_read = yy_current_buffer->yy_buf_size - - number_to_move - 1; + num_to_read = yy_current_buffer->yy_buf_size - + number_to_move - 1; #endif - } + } - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; - /* Read in more data. */ - YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), - yy_n_chars, num_to_read ); - } + /* Read in more data. */ + YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), + yy_n_chars, num_to_read ); + } - if ( yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart( yyin ); - } + if ( yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin ); + } - else - { - ret_val = EOB_ACT_LAST_MATCH; - yy_current_buffer->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } + else + { + ret_val = EOB_ACT_LAST_MATCH; + yy_current_buffer->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } - else - ret_val = EOB_ACT_CONTINUE_SCAN; + else + ret_val = EOB_ACT_CONTINUE_SCAN; - yy_n_chars += number_to_move; - yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; - yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + yy_n_chars += number_to_move; + yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; + yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; + yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; - return ret_val; - } + return ret_val; + } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state() - { - yy_state_type yy_current_state; - char *yy_cp; + { + yy_state_type yy_current_state; + char *yy_cp; - yy_current_state = yy_start; + yy_current_state = yy_start; - for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) - { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 224 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - } + for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) + { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + yy_last_accepting_state = yy_current_state; + yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 224 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + } - return yy_current_state; - } + return yy_current_state; + } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis - * next_state = yy_try_NUL_trans( current_state ); + * next_state = yy_try_NUL_trans( current_state ); */ #ifdef YY_USE_PROTOS @@ -1598,27 +1598,27 @@ static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) static yy_state_type yy_try_NUL_trans( yy_current_state ) yy_state_type yy_current_state; #endif - { - int yy_is_jam; - char *yy_cp = yy_c_buf_p; + { + int yy_is_jam; + char *yy_cp = yy_c_buf_p; - YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 224 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 223); + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + yy_last_accepting_state = yy_current_state; + yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 224 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 223); - return yy_is_jam ? 0 : yy_current_state; - } + return yy_is_jam ? 0 : yy_current_state; + } #ifndef YY_NO_UNPUT @@ -1629,40 +1629,40 @@ static void yyunput( c, yy_bp ) int c; char *yy_bp; #endif - { - char *yy_cp = yy_c_buf_p; + { + char *yy_cp = yy_c_buf_p; - /* undo effects of setting up yytext */ - *yy_cp = yy_hold_char; + /* undo effects of setting up yytext */ + *yy_cp = yy_hold_char; - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - int number_to_move = yy_n_chars + 2; - char *dest = &yy_current_buffer->yy_ch_buf[ - yy_current_buffer->yy_buf_size + 2]; - char *source = - &yy_current_buffer->yy_ch_buf[number_to_move]; + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + int number_to_move = yy_n_chars + 2; + char *dest = &yy_current_buffer->yy_ch_buf[ + yy_current_buffer->yy_buf_size + 2]; + char *source = + &yy_current_buffer->yy_ch_buf[number_to_move]; - while ( source > yy_current_buffer->yy_ch_buf ) - *--dest = *--source; + while ( source > yy_current_buffer->yy_ch_buf ) + *--dest = *--source; - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - yy_n_chars = yy_current_buffer->yy_buf_size; + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + yy_n_chars = yy_current_buffer->yy_buf_size; - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } - *--yy_cp = (char) c; + *--yy_cp = (char) c; - yytext_ptr = yy_bp; - yy_hold_char = *yy_cp; - yy_c_buf_p = yy_cp; - } -#endif /* ifndef YY_NO_UNPUT */ + yytext_ptr = yy_bp; + yy_hold_char = *yy_cp; + yy_c_buf_p = yy_cp; + } +#endif /* ifndef YY_NO_UNPUT */ #ifdef __cplusplus @@ -1670,69 +1670,69 @@ static int yyinput() #else static int input() #endif - { - int c; + { + int c; - *yy_c_buf_p = yy_hold_char; + *yy_c_buf_p = yy_hold_char; - if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) - /* This was really a NUL. */ - *yy_c_buf_p = '\0'; + if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + /* This was really a NUL. */ + *yy_c_buf_p = '\0'; - else - { /* need more input */ - yytext_ptr = yy_c_buf_p; - ++yy_c_buf_p; + else + { /* need more input */ + yytext_ptr = yy_c_buf_p; + ++yy_c_buf_p; - switch ( yy_get_next_buffer() ) - { - case EOB_ACT_END_OF_FILE: - { - if ( yywrap() ) - { - yy_c_buf_p = - yytext_ptr + YY_MORE_ADJ; - return EOF; - } + switch ( yy_get_next_buffer() ) + { + case EOB_ACT_END_OF_FILE: + { + if ( yywrap() ) + { + yy_c_buf_p = + yytext_ptr + YY_MORE_ADJ; + return EOF; + } - if ( ! yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; + if ( ! yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; #ifdef __cplusplus - return yyinput(); + return yyinput(); #else - return input(); + return input(); #endif - } + } - case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; - break; + case EOB_ACT_CONTINUE_SCAN: + yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; + break; - case EOB_ACT_LAST_MATCH: + case EOB_ACT_LAST_MATCH: #ifdef __cplusplus - YY_FATAL_ERROR( - "unexpected last match in yyinput()" ); + YY_FATAL_ERROR( + "unexpected last match in yyinput()" ); #else - YY_FATAL_ERROR( - "unexpected last match in input()" ); + YY_FATAL_ERROR( + "unexpected last match in input()" ); #endif - } - } - } + } + } + } - c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ - *yy_c_buf_p = '\0'; /* preserve yytext */ - yy_hold_char = *++yy_c_buf_p; + c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ + *yy_c_buf_p = '\0'; /* preserve yytext */ + yy_hold_char = *++yy_c_buf_p; - return c; - } + return c; + } #ifdef YY_USE_PROTOS @@ -1741,13 +1741,13 @@ void yyrestart( FILE *input_file ) void yyrestart( input_file ) FILE *input_file; #endif - { - if ( ! yy_current_buffer ) - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); + { + if ( ! yy_current_buffer ) + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); - yy_init_buffer( yy_current_buffer, input_file ); - yy_load_buffer_state(); - } + yy_init_buffer( yy_current_buffer, input_file ); + yy_load_buffer_state(); + } #ifdef YY_USE_PROTOS @@ -1756,28 +1756,28 @@ void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) void yy_switch_to_buffer( new_buffer ) YY_BUFFER_STATE new_buffer; #endif - { - if ( yy_current_buffer == new_buffer ) - return; + { + if ( yy_current_buffer == new_buffer ) + return; - if ( yy_current_buffer ) - { - /* Flush out information for old buffer. */ - *yy_c_buf_p = yy_hold_char; - yy_current_buffer->yy_buf_pos = yy_c_buf_p; - yy_current_buffer->yy_n_chars = yy_n_chars; - } + if ( yy_current_buffer ) + { + /* Flush out information for old buffer. */ + *yy_c_buf_p = yy_hold_char; + yy_current_buffer->yy_buf_pos = yy_c_buf_p; + yy_current_buffer->yy_n_chars = yy_n_chars; + } - yy_current_buffer = new_buffer; - yy_load_buffer_state(); + yy_current_buffer = new_buffer; + yy_load_buffer_state(); - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yy_did_buffer_switch_on_eof = 1; - } + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yy_did_buffer_switch_on_eof = 1; + } #ifdef YY_USE_PROTOS @@ -1785,12 +1785,12 @@ void yy_load_buffer_state( void ) #else void yy_load_buffer_state() #endif - { - yy_n_chars = yy_current_buffer->yy_n_chars; - yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; - yyin = yy_current_buffer->yy_input_file; - yy_hold_char = *yy_c_buf_p; - } + { + yy_n_chars = yy_current_buffer->yy_n_chars; + yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; + yyin = yy_current_buffer->yy_input_file; + yy_hold_char = *yy_c_buf_p; + } #ifdef YY_USE_PROTOS @@ -1800,28 +1800,28 @@ YY_BUFFER_STATE yy_create_buffer( file, size ) FILE *file; int size; #endif - { - YY_BUFFER_STATE b; + { + YY_BUFFER_STATE b; - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b->yy_buf_size = size; + b->yy_buf_size = size; - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b->yy_is_our_buffer = 1; + b->yy_is_our_buffer = 1; - yy_init_buffer( b, file ); + yy_init_buffer( b, file ); - return b; - } + return b; + } #ifdef YY_USE_PROTOS @@ -1830,18 +1830,18 @@ void yy_delete_buffer( YY_BUFFER_STATE b ) void yy_delete_buffer( b ) YY_BUFFER_STATE b; #endif - { - if ( ! b ) - return; + { + if ( ! b ) + return; - if ( b == yy_current_buffer ) - yy_current_buffer = (YY_BUFFER_STATE) 0; + if ( b == yy_current_buffer ) + yy_current_buffer = (YY_BUFFER_STATE) 0; - if ( b->yy_is_our_buffer ) - yy_flex_free( (void *) b->yy_ch_buf ); + if ( b->yy_is_our_buffer ) + yy_flex_free( (void *) b->yy_ch_buf ); - yy_flex_free( (void *) b ); - } + yy_flex_free( (void *) b ); + } #ifndef YY_ALWAYS_INTERACTIVE @@ -1859,22 +1859,22 @@ FILE *file; #endif - { - yy_flush_buffer( b ); + { + yy_flush_buffer( b ); - b->yy_input_file = file; - b->yy_fill_buffer = 1; + b->yy_input_file = file; + b->yy_fill_buffer = 1; #if YY_ALWAYS_INTERACTIVE - b->yy_is_interactive = 1; + b->yy_is_interactive = 1; #else #if YY_NEVER_INTERACTIVE - b->yy_is_interactive = 0; + b->yy_is_interactive = 0; #else - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; #endif #endif - } + } #ifdef YY_USE_PROTOS @@ -1884,24 +1884,24 @@ void yy_flush_buffer( b ) YY_BUFFER_STATE b; #endif - { - b->yy_n_chars = 0; + { + b->yy_n_chars = 0; - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - b->yy_buf_pos = &b->yy_ch_buf[0]; + b->yy_buf_pos = &b->yy_ch_buf[0]; - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; - if ( b == yy_current_buffer ) - yy_load_buffer_state(); - } + if ( b == yy_current_buffer ) + yy_load_buffer_state(); + } #ifndef YY_NO_SCAN_BUFFER @@ -1912,33 +1912,33 @@ YY_BUFFER_STATE yy_scan_buffer( base, size ) char *base; yy_size_t size; #endif - { - YY_BUFFER_STATE b; + { + YY_BUFFER_STATE b; - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; - yy_switch_to_buffer( b ); + yy_switch_to_buffer( b ); - return b; - } + return b; + } #endif @@ -1949,13 +1949,13 @@ YY_BUFFER_STATE yy_scan_string( yyconst char *str ) YY_BUFFER_STATE yy_scan_string( str ) yyconst char *str; #endif - { - int len; - for ( len = 0; str[len]; ++len ) - ; + { + int len; + for ( len = 0; str[len]; ++len ) + ; - return yy_scan_bytes( str, len ); - } + return yy_scan_bytes( str, len ); + } #endif @@ -1967,34 +1967,34 @@ YY_BUFFER_STATE yy_scan_bytes( bytes, len ) yyconst char *bytes; int len; #endif - { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; + { + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; - /* Get memory for full buffer, including space for trailing EOB's. */ - n = len + 2; - buf = (char *) yy_flex_alloc( n ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + /* Get memory for full buffer, including space for trailing EOB's. */ + n = len + 2; + buf = (char *) yy_flex_alloc( n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - for ( i = 0; i < len; ++i ) - buf[i] = bytes[i]; + for ( i = 0; i < len; ++i ) + buf[i] = bytes[i]; - buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; + buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; - b = yy_scan_buffer( buf, n ); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + b = yy_scan_buffer( buf, n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; - return b; - } + return b; + } #endif @@ -2005,49 +2005,49 @@ static void yy_push_state( int new_state ) static void yy_push_state( new_state ) int new_state; #endif - { - if ( yy_start_stack_ptr >= yy_start_stack_depth ) - { - yy_size_t new_size; + { + if ( yy_start_stack_ptr >= yy_start_stack_depth ) + { + yy_size_t new_size; - yy_start_stack_depth += YY_START_STACK_INCR; - new_size = yy_start_stack_depth * sizeof( int ); + yy_start_stack_depth += YY_START_STACK_INCR; + new_size = yy_start_stack_depth * sizeof( int ); - if ( ! yy_start_stack ) - yy_start_stack = (int *) yy_flex_alloc( new_size ); + if ( ! yy_start_stack ) + yy_start_stack = (int *) yy_flex_alloc( new_size ); - else - yy_start_stack = (int *) yy_flex_realloc( - (void *) yy_start_stack, new_size ); + else + yy_start_stack = (int *) yy_flex_realloc( + (void *) yy_start_stack, new_size ); - if ( ! yy_start_stack ) - YY_FATAL_ERROR( - "out of memory expanding start-condition stack" ); - } + if ( ! yy_start_stack ) + YY_FATAL_ERROR( + "out of memory expanding start-condition stack" ); + } - yy_start_stack[yy_start_stack_ptr++] = YY_START; + yy_start_stack[yy_start_stack_ptr++] = YY_START; - BEGIN(new_state); - } + BEGIN(new_state); + } #endif #ifndef YY_NO_POP_STATE static void yy_pop_state() - { - if ( --yy_start_stack_ptr < 0 ) - YY_FATAL_ERROR( "start-condition stack underflow" ); + { + if ( --yy_start_stack_ptr < 0 ) + YY_FATAL_ERROR( "start-condition stack underflow" ); - BEGIN(yy_start_stack[yy_start_stack_ptr]); - } + BEGIN(yy_start_stack[yy_start_stack_ptr]); + } #endif #ifndef YY_NO_TOP_STATE static int yy_top_state() - { - return yy_start_stack[yy_start_stack_ptr - 1]; - } + { + return yy_start_stack[yy_start_stack_ptr - 1]; + } #endif #ifndef YY_EXIT_FAILURE @@ -2060,10 +2060,10 @@ static void yy_fatal_error( yyconst char msg[] ) static void yy_fatal_error( msg ) char msg[]; #endif - { - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); - } + { + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); + } @@ -2071,16 +2071,16 @@ char msg[]; #undef yyless #define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - yytext[yyleng] = yy_hold_char; \ - yy_c_buf_p = yytext + n - YY_MORE_ADJ; \ - yy_hold_char = *yy_c_buf_p; \ - *yy_c_buf_p = '\0'; \ - yyleng = n; \ - } \ - while ( 0 ) + do \ + { \ + /* Undo effects of setting up yytext. */ \ + yytext[yyleng] = yy_hold_char; \ + yy_c_buf_p = yytext + n - YY_MORE_ADJ; \ + yy_hold_char = *yy_c_buf_p; \ + *yy_c_buf_p = '\0'; \ + yyleng = n; \ + } \ + while ( 0 ) /* Internal utility routines. */ @@ -2094,11 +2094,11 @@ char *s1; yyconst char *s2; int n; #endif - { - int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; - } + { + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; + } #endif @@ -2108,9 +2108,9 @@ static void *yy_flex_alloc( yy_size_t size ) static void *yy_flex_alloc( size ) yy_size_t size; #endif - { - return (void *) malloc( size ); - } + { + return (void *) malloc( size ); + } #ifdef YY_USE_PROTOS static void *yy_flex_realloc( void *ptr, yy_size_t size ) @@ -2119,16 +2119,16 @@ static void *yy_flex_realloc( ptr, size ) void *ptr; yy_size_t size; #endif - { - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); - } + { + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); + } #ifdef YY_USE_PROTOS static void yy_flex_free( void *ptr ) @@ -2136,16 +2136,16 @@ static void yy_flex_free( void *ptr ) static void yy_flex_free( ptr ) void *ptr; #endif - { - free( ptr ); - } + { + free( ptr ); + } #if YY_MAIN int main() - { - yylex(); - return 0; - } + { + yylex(); + return 0; + } #endif #line 222 "CMDscan.l" diff --git a/Engine/source/console/SimXMLDocument.h b/Engine/source/console/SimXMLDocument.h index 3f6e2661c..342917cff 100644 --- a/Engine/source/console/SimXMLDocument.h +++ b/Engine/source/console/SimXMLDocument.h @@ -45,7 +45,7 @@ class SimXMLDocument: public SimObject { // This typedef is required for tie ins with the script language. // -------------------------------------------------------------------------- - protected: + protected: typedef SimObject Parent; // -------------------------------------------------------------------------- @@ -85,8 +85,8 @@ class SimXMLDocument: public SimObject bool nextSiblingElement(const char* rName); // push child element at index onto stack. bool pushChildElement(S32 index); - // Get element value - const char* elementValue(); + // Get element value + const char* elementValue(); // Pop last element off of stack. void popElement(void); @@ -94,16 +94,16 @@ class SimXMLDocument: public SimObject // Get attribute from top element on element stack. const char* attribute(const char* rAttribute); - // Does the attribute exist in the current element + // Does the attribute exist in the current element bool attributeExists(const char* rAttribute); - // Obtain the name of the current element's first or last attribute - const char* firstAttribute(); - const char* lastAttribute(); + // Obtain the name of the current element's first or last attribute + const char* firstAttribute(); + const char* lastAttribute(); - // Move through the current element's attributes to obtain their names - const char* nextAttribute(); - const char* prevAttribute(); + // Move through the current element's attributes to obtain their names + const char* nextAttribute(); + const char* prevAttribute(); // Set attribute of top element on element stack. void setAttribute(const char* rAttribute, const char* rVal); @@ -139,8 +139,8 @@ class SimXMLDocument: public SimObject TiXmlDocument* m_qDocument; // Stack of nodes. Vector m_paNode; - // The current attribute - TiXmlAttribute* m_CurrentAttribute; + // The current attribute + TiXmlAttribute* m_CurrentAttribute; public: DECLARE_CONOBJECT(SimXMLDocument); diff --git a/Engine/source/console/arrayObject.h b/Engine/source/console/arrayObject.h index caab6dbd5..81531b6c2 100644 --- a/Engine/source/console/arrayObject.h +++ b/Engine/source/console/arrayObject.h @@ -102,7 +102,7 @@ public: /// Returns the value for a given index. /// Will return a null value for an invalid index - const String& getValueFromIndex( S32 index ) const; + const String& getValueFromIndex( S32 index ) const; /// S32 getIndexFromKeyValue( const String &key, const String &value ) const; diff --git a/Engine/source/console/cmdgram.cpp b/Engine/source/console/cmdgram.cpp index 064394aaa..39fe8d3c3 100644 --- a/Engine/source/console/cmdgram.cpp +++ b/Engine/source/console/cmdgram.cpp @@ -11,78 +11,78 @@ #define yychar CMDchar #define yydebug CMDdebug #define yynerrs CMDnerrs -#define rwDEFINE 258 -#define rwENDDEF 259 -#define rwDECLARE 260 -#define rwDECLARESINGLETON 261 -#define rwBREAK 262 -#define rwELSE 263 -#define rwCONTINUE 264 -#define rwGLOBAL 265 -#define rwIF 266 -#define rwNIL 267 -#define rwRETURN 268 -#define rwWHILE 269 -#define rwDO 270 -#define rwENDIF 271 -#define rwENDWHILE 272 -#define rwENDFOR 273 -#define rwDEFAULT 274 -#define rwFOR 275 -#define rwFOREACH 276 -#define rwFOREACHSTR 277 -#define rwIN 278 -#define rwDATABLOCK 279 -#define rwSWITCH 280 -#define rwCASE 281 -#define rwSWITCHSTR 282 -#define rwCASEOR 283 -#define rwPACKAGE 284 -#define rwNAMESPACE 285 -#define rwCLASS 286 -#define rwASSERT 287 -#define ILLEGAL_TOKEN 288 -#define CHRCONST 289 -#define INTCONST 290 -#define TTAG 291 -#define VAR 292 -#define IDENT 293 -#define TYPEIDENT 294 -#define DOCBLOCK 295 -#define STRATOM 296 -#define TAGATOM 297 -#define FLTCONST 298 -#define opINTNAME 299 -#define opINTNAMER 300 -#define opMINUSMINUS 301 -#define opPLUSPLUS 302 -#define STMT_SEP 303 -#define opSHL 304 -#define opSHR 305 -#define opPLASN 306 -#define opMIASN 307 -#define opMLASN 308 -#define opDVASN 309 -#define opMODASN 310 -#define opANDASN 311 -#define opXORASN 312 -#define opORASN 313 -#define opSLASN 314 -#define opSRASN 315 -#define opCAT 316 -#define opEQ 317 -#define opNE 318 -#define opGE 319 -#define opLE 320 -#define opAND 321 -#define opOR 322 -#define opSTREQ 323 -#define opCOLONCOLON 324 -#define opMDASN 325 -#define opNDASN 326 -#define opNTASN 327 -#define opSTRNE 328 -#define UNARY 329 +#define rwDEFINE 258 +#define rwENDDEF 259 +#define rwDECLARE 260 +#define rwDECLARESINGLETON 261 +#define rwBREAK 262 +#define rwELSE 263 +#define rwCONTINUE 264 +#define rwGLOBAL 265 +#define rwIF 266 +#define rwNIL 267 +#define rwRETURN 268 +#define rwWHILE 269 +#define rwDO 270 +#define rwENDIF 271 +#define rwENDWHILE 272 +#define rwENDFOR 273 +#define rwDEFAULT 274 +#define rwFOR 275 +#define rwFOREACH 276 +#define rwFOREACHSTR 277 +#define rwIN 278 +#define rwDATABLOCK 279 +#define rwSWITCH 280 +#define rwCASE 281 +#define rwSWITCHSTR 282 +#define rwCASEOR 283 +#define rwPACKAGE 284 +#define rwNAMESPACE 285 +#define rwCLASS 286 +#define rwASSERT 287 +#define ILLEGAL_TOKEN 288 +#define CHRCONST 289 +#define INTCONST 290 +#define TTAG 291 +#define VAR 292 +#define IDENT 293 +#define TYPEIDENT 294 +#define DOCBLOCK 295 +#define STRATOM 296 +#define TAGATOM 297 +#define FLTCONST 298 +#define opINTNAME 299 +#define opINTNAMER 300 +#define opMINUSMINUS 301 +#define opPLUSPLUS 302 +#define STMT_SEP 303 +#define opSHL 304 +#define opSHR 305 +#define opPLASN 306 +#define opMIASN 307 +#define opMLASN 308 +#define opDVASN 309 +#define opMODASN 310 +#define opANDASN 311 +#define opXORASN 312 +#define opORASN 313 +#define opSLASN 314 +#define opSRASN 315 +#define opCAT 316 +#define opEQ 317 +#define opNE 318 +#define opGE 319 +#define opLE 320 +#define opAND 321 +#define opOR 322 +#define opSTREQ 323 +#define opCOLONCOLON 324 +#define opMDASN 325 +#define opNDASN 326 +#define opNTASN 327 +#define opSTRNE 328 +#define UNARY 329 #line 1 "cmdgram.y" @@ -182,9 +182,9 @@ typedef -#define YYFINAL 388 -#define YYFLAG -32768 -#define YYNTBASE 100 +#define YYFINAL 388 +#define YYFLAG -32768 +#define YYNTBASE 100 #define YYTRANSLATE(x) ((unsigned)(x) <= 329 ? yytranslate[x] : 140) @@ -502,7 +502,7 @@ static const short yypgoto[] = {-32768, }; -#define YYLAST 3042 +#define YYLAST 3042 static const short yytable[] = { 47, @@ -1183,50 +1183,50 @@ void *alloca (); It is replaced by the list of actions, each action as one case of the switch. */ -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY -2 -#define YYEOF 0 -#define YYACCEPT return(0) -#define YYABORT return(1) -#define YYERROR goto yyerrlab1 +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY -2 +#define YYEOF 0 +#define YYACCEPT return(0) +#define YYABORT return(1) +#define YYERROR goto yyerrlab1 /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ -#define YYFAIL goto yyerrlab +#define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(token, value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { yychar = (token), yylval = (value); \ - yychar1 = YYTRANSLATE (yychar); \ - YYPOPSTACK; \ - goto yybackup; \ - } \ - else \ - { yyerror ("syntax error: cannot back up"); YYERROR; } \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { yychar = (token), yylval = (value); \ + yychar1 = YYTRANSLATE (yychar); \ + YYPOPSTACK; \ + goto yybackup; \ + } \ + else \ + { yyerror ("syntax error: cannot back up"); YYERROR; } \ while (0) -#define YYTERROR 1 -#define YYERRCODE 256 +#define YYTERROR 1 +#define YYERRCODE 256 #ifndef YYPURE -#define YYLEX yylex() +#define YYLEX yylex() #endif #ifdef YYPURE #ifdef YYLSP_NEEDED #ifdef YYLEX_PARAM -#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) +#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) #else -#define YYLEX yylex(&yylval, &yylloc) +#define YYLEX yylex(&yylval, &yylloc) #endif #else /* not YYLSP_NEEDED */ #ifdef YYLEX_PARAM -#define YYLEX yylex(&yylval, YYLEX_PARAM) +#define YYLEX yylex(&yylval, YYLEX_PARAM) #else -#define YYLEX yylex(&yylval) +#define YYLEX yylex(&yylval) #endif #endif /* not YYLSP_NEEDED */ #endif @@ -1235,27 +1235,27 @@ while (0) #ifndef YYPURE -int yychar; /* the lookahead symbol */ -YYSTYPE yylval; /* the semantic value of the */ - /* lookahead symbol */ +int yychar; /* the lookahead symbol */ +YYSTYPE yylval; /* the semantic value of the */ + /* lookahead symbol */ #ifdef YYLSP_NEEDED -YYLTYPE yylloc; /* location data for the lookahead */ - /* symbol */ +YYLTYPE yylloc; /* location data for the lookahead */ + /* symbol */ #endif -int yynerrs; /* number of parse errors so far */ +int yynerrs; /* number of parse errors so far */ #endif /* not YYPURE */ #if YYDEBUG != 0 -int yydebug; /* nonzero means print parse trace */ +int yydebug; /* nonzero means print parse trace */ /* Since this is uninitialized, it does not stop multiple parsers from coexisting. */ #endif -/* YYINITDEPTH indicates the initial size of the parser's stacks */ +/* YYINITDEPTH indicates the initial size of the parser's stacks */ -#ifndef YYINITDEPTH +#ifndef YYINITDEPTH #define YYINITDEPTH 200 #endif @@ -1275,9 +1275,9 @@ int yydebug; /* nonzero means print parse trace */ int yyparse (void); #endif -#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ -#define __yy_memcpy(FROM,TO,COUNT) __builtin_memcpy(TO,FROM,COUNT) -#else /* not GNU C or C++ */ +#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ +#define __yy_memcpy(FROM,TO,COUNT) __builtin_memcpy(TO,FROM,COUNT) +#else /* not GNU C or C++ */ #ifndef __cplusplus /* This is the most reliable way to avoid incompatibilities @@ -1337,17 +1337,17 @@ yyparse(YYPARSE_PARAM) int yyn; short *yyssp; YYSTYPE *yyvsp; - int yyerrstatus; /* number of tokens to shift before error messages enabled */ - int yychar1 = 0; /* lookahead token as an internal (translated) token number */ + int yyerrstatus; /* number of tokens to shift before error messages enabled */ + int yychar1 = 0; /* lookahead token as an internal (translated) token number */ - short yyssa[YYINITDEPTH]; /* the state stack */ - YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ + short yyssa[YYINITDEPTH]; /* the state stack */ + YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ - short *yyss = yyssa; /* refer to the stacks thru separate pointers */ - YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ + short *yyss = yyssa; /* refer to the stacks thru separate pointers */ + YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ #ifdef YYLSP_NEEDED - YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ + YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ YYLTYPE *yyls = yylsa; YYLTYPE *yylsp; @@ -1367,9 +1367,9 @@ yyparse(YYPARSE_PARAM) #endif #endif - YYSTYPE yyval; /* the variable used to return */ - /* semantic values from the action */ - /* routines */ + YYSTYPE yyval; /* the variable used to return */ + /* semantic values from the action */ + /* routines */ int yylen; @@ -1381,7 +1381,7 @@ yyparse(YYPARSE_PARAM) yystate = 0; yyerrstatus = 0; yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ + yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack @@ -1416,20 +1416,20 @@ yynewstate: #ifdef yyoverflow /* Each stack pointer address is followed by the size of - the data in use in that stack, in bytes. */ + the data in use in that stack, in bytes. */ #ifdef YYLSP_NEEDED /* This used to be a conditional around just the two extra args, - but that might be undefined if yyoverflow is a macro. */ + but that might be undefined if yyoverflow is a macro. */ yyoverflow("parser stack overflow", - &yyss1, size * sizeof (*yyssp), - &yyvs1, size * sizeof (*yyvsp), - &yyls1, size * sizeof (*yylsp), - &yystacksize); + &yyss1, size * sizeof (*yyssp), + &yyvs1, size * sizeof (*yyvsp), + &yyls1, size * sizeof (*yylsp), + &yystacksize); #else yyoverflow("parser stack overflow", - &yyss1, size * sizeof (*yyssp), - &yyvs1, size * sizeof (*yyvsp), - &yystacksize); + &yyss1, size * sizeof (*yyssp), + &yyvs1, size * sizeof (*yyvsp), + &yystacksize); #endif yyss = yyss1; yyvs = yyvs1; @@ -1439,13 +1439,13 @@ yynewstate: #else /* no yyoverflow */ /* Extend the stack our own way. */ if (yystacksize >= YYMAXDEPTH) - { - yyerror("parser stack overflow"); - return 2; - } + { + yyerror("parser stack overflow"); + return 2; + } yystacksize *= 2; if (yystacksize > YYMAXDEPTH) - yystacksize = YYMAXDEPTH; + yystacksize = YYMAXDEPTH; yyss = (short *) alloca (yystacksize * sizeof (*yyssp)); __yy_memcpy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp)); yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp)); @@ -1464,11 +1464,11 @@ yynewstate: #if YYDEBUG != 0 if (yydebug) - fprintf(stderr, "Stack size increased to %d\n", yystacksize); + fprintf(stderr, "Stack size increased to %d\n", yystacksize); #endif if (yyssp >= yyss + yystacksize - 1) - YYABORT; + YYABORT; } #if YYDEBUG != 0 @@ -1498,21 +1498,21 @@ yynewstate: { #if YYDEBUG != 0 if (yydebug) - fprintf(stderr, "Reading a token: "); + fprintf(stderr, "Reading a token: "); #endif yychar = YYLEX; } /* Convert token to internal form (in yychar1) for indexing tables with */ - if (yychar <= 0) /* This means end of input. */ + if (yychar <= 0) /* This means end of input. */ { yychar1 = 0; - yychar = YYEOF; /* Don't call YYLEX any more */ + yychar = YYEOF; /* Don't call YYLEX any more */ #if YYDEBUG != 0 if (yydebug) - fprintf(stderr, "Now at end of input.\n"); + fprintf(stderr, "Now at end of input.\n"); #endif } else @@ -1521,15 +1521,15 @@ yynewstate: #if YYDEBUG != 0 if (yydebug) - { - fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); - /* Give the individual parser a way to print the precise meaning - of a token, for further debugging info. */ + { + fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); + /* Give the individual parser a way to print the precise meaning + of a token, for further debugging info. */ #ifdef YYPRINT - YYPRINT (stderr, yychar, yylval); + YYPRINT (stderr, yychar, yylval); #endif - fprintf (stderr, ")\n"); - } + fprintf (stderr, ")\n"); + } #endif } @@ -1549,7 +1549,7 @@ yynewstate: if (yyn < 0) { if (yyn == YYFLAG) - goto yyerrlab; + goto yyerrlab; yyn = -yyn; goto yyreduce; } @@ -1600,11 +1600,11 @@ yyreduce: int i; fprintf (stderr, "Reducing via rule %d (line %d), ", - yyn, yyrline[yyn]); + yyn, yyrline[yyn]); /* Print the symbols being reduced, and their result. */ for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) - fprintf (stderr, "%s ", yytname[yyrhs[i]]); + fprintf (stderr, "%s ", yytname[yyrhs[i]]); fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); } #endif @@ -2265,7 +2265,7 @@ case 162: short *ssp1 = yyss - 1; fprintf (stderr, "state stack now"); while (ssp1 != yyssp) - fprintf (stderr, " %d", *++ssp1); + fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif @@ -2315,44 +2315,44 @@ yyerrlab: /* here on detecting error */ yyn = yypact[yystate]; if (yyn > YYFLAG && yyn < YYLAST) - { - int size = 0; - char *msg; - int x, count; + { + int size = 0; + char *msg; + int x, count; - count = 0; - /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ - for (x = (yyn < 0 ? -yyn : 0); - x < (sizeof(yytname) / sizeof(char *)); x++) - if (yycheck[x + yyn] == x) - size += strlen(yytname[x]) + 15, count++; - msg = (char *) malloc(size + 15); - if (msg != 0) - { - strcpy(msg, "parse error"); + count = 0; + /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ + for (x = (yyn < 0 ? -yyn : 0); + x < (sizeof(yytname) / sizeof(char *)); x++) + if (yycheck[x + yyn] == x) + size += strlen(yytname[x]) + 15, count++; + msg = (char *) malloc(size + 15); + if (msg != 0) + { + strcpy(msg, "parse error"); - if (count < 5) - { - count = 0; - for (x = (yyn < 0 ? -yyn : 0); - x < (sizeof(yytname) / sizeof(char *)); x++) - if (yycheck[x + yyn] == x) - { - strcat(msg, count == 0 ? ", expecting `" : " or `"); - strcat(msg, yytname[x]); - strcat(msg, "'"); - count++; - } - } - yyerror(msg); - free(msg); - } - else - yyerror ("parse error; also virtual memory exceeded"); - } + if (count < 5) + { + count = 0; + for (x = (yyn < 0 ? -yyn : 0); + x < (sizeof(yytname) / sizeof(char *)); x++) + if (yycheck[x + yyn] == x) + { + strcat(msg, count == 0 ? ", expecting `" : " or `"); + strcat(msg, yytname[x]); + strcat(msg, "'"); + count++; + } + } + yyerror(msg); + free(msg); + } + else + yyerror ("parse error; also virtual memory exceeded"); + } else #endif /* YYERROR_VERBOSE */ - yyerror("parse error"); + yyerror("parse error"); } goto yyerrlab1; @@ -2364,11 +2364,11 @@ yyerrlab1: /* here on error raised explicitly by an action */ /* return failure if at end of input */ if (yychar == YYEOF) - YYABORT; + YYABORT; #if YYDEBUG != 0 if (yydebug) - fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); + fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); #endif yychar = YYEMPTY; @@ -2377,7 +2377,7 @@ yyerrlab1: /* here on error raised explicitly by an action */ /* Else will try to reuse lookahead token after shifting the error token. */ - yyerrstatus = 3; /* Each real token shifted decrements this */ + yyerrstatus = 3; /* Each real token shifted decrements this */ goto yyerrhandle; @@ -2405,7 +2405,7 @@ yyerrpop: /* pop the current state because it cannot handle the error token */ short *ssp1 = yyss - 1; fprintf (stderr, "Error: state stack now"); while (ssp1 != yyssp) - fprintf (stderr, " %d", *++ssp1); + fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif @@ -2424,7 +2424,7 @@ yyerrhandle: if (yyn < 0) { if (yyn == YYFLAG) - goto yyerrpop; + goto yyerrpop; yyn = -yyn; goto yyreduce; } diff --git a/Engine/source/console/cmdgram.h b/Engine/source/console/cmdgram.h index 83736a565..fc22f3df2 100644 --- a/Engine/source/console/cmdgram.h +++ b/Engine/source/console/cmdgram.h @@ -15,78 +15,78 @@ typedef union { AssignDecl asn; IfStmtNode* ifnode; } YYSTYPE; -#define rwDEFINE 258 -#define rwENDDEF 259 -#define rwDECLARE 260 -#define rwDECLARESINGLETON 261 -#define rwBREAK 262 -#define rwELSE 263 -#define rwCONTINUE 264 -#define rwGLOBAL 265 -#define rwIF 266 -#define rwNIL 267 -#define rwRETURN 268 -#define rwWHILE 269 -#define rwDO 270 -#define rwENDIF 271 -#define rwENDWHILE 272 -#define rwENDFOR 273 -#define rwDEFAULT 274 -#define rwFOR 275 -#define rwFOREACH 276 -#define rwFOREACHSTR 277 -#define rwIN 278 -#define rwDATABLOCK 279 -#define rwSWITCH 280 -#define rwCASE 281 -#define rwSWITCHSTR 282 -#define rwCASEOR 283 -#define rwPACKAGE 284 -#define rwNAMESPACE 285 -#define rwCLASS 286 -#define rwASSERT 287 -#define ILLEGAL_TOKEN 288 -#define CHRCONST 289 -#define INTCONST 290 -#define TTAG 291 -#define VAR 292 -#define IDENT 293 -#define TYPEIDENT 294 -#define DOCBLOCK 295 -#define STRATOM 296 -#define TAGATOM 297 -#define FLTCONST 298 -#define opINTNAME 299 -#define opINTNAMER 300 -#define opMINUSMINUS 301 -#define opPLUSPLUS 302 -#define STMT_SEP 303 -#define opSHL 304 -#define opSHR 305 -#define opPLASN 306 -#define opMIASN 307 -#define opMLASN 308 -#define opDVASN 309 -#define opMODASN 310 -#define opANDASN 311 -#define opXORASN 312 -#define opORASN 313 -#define opSLASN 314 -#define opSRASN 315 -#define opCAT 316 -#define opEQ 317 -#define opNE 318 -#define opGE 319 -#define opLE 320 -#define opAND 321 -#define opOR 322 -#define opSTREQ 323 -#define opCOLONCOLON 324 -#define opMDASN 325 -#define opNDASN 326 -#define opNTASN 327 -#define opSTRNE 328 -#define UNARY 329 +#define rwDEFINE 258 +#define rwENDDEF 259 +#define rwDECLARE 260 +#define rwDECLARESINGLETON 261 +#define rwBREAK 262 +#define rwELSE 263 +#define rwCONTINUE 264 +#define rwGLOBAL 265 +#define rwIF 266 +#define rwNIL 267 +#define rwRETURN 268 +#define rwWHILE 269 +#define rwDO 270 +#define rwENDIF 271 +#define rwENDWHILE 272 +#define rwENDFOR 273 +#define rwDEFAULT 274 +#define rwFOR 275 +#define rwFOREACH 276 +#define rwFOREACHSTR 277 +#define rwIN 278 +#define rwDATABLOCK 279 +#define rwSWITCH 280 +#define rwCASE 281 +#define rwSWITCHSTR 282 +#define rwCASEOR 283 +#define rwPACKAGE 284 +#define rwNAMESPACE 285 +#define rwCLASS 286 +#define rwASSERT 287 +#define ILLEGAL_TOKEN 288 +#define CHRCONST 289 +#define INTCONST 290 +#define TTAG 291 +#define VAR 292 +#define IDENT 293 +#define TYPEIDENT 294 +#define DOCBLOCK 295 +#define STRATOM 296 +#define TAGATOM 297 +#define FLTCONST 298 +#define opINTNAME 299 +#define opINTNAMER 300 +#define opMINUSMINUS 301 +#define opPLUSPLUS 302 +#define STMT_SEP 303 +#define opSHL 304 +#define opSHR 305 +#define opPLASN 306 +#define opMIASN 307 +#define opMLASN 308 +#define opDVASN 309 +#define opMODASN 310 +#define opANDASN 311 +#define opXORASN 312 +#define opORASN 313 +#define opSLASN 314 +#define opSRASN 315 +#define opCAT 316 +#define opEQ 317 +#define opNE 318 +#define opGE 319 +#define opLE 320 +#define opAND 321 +#define opOR 322 +#define opSTREQ 323 +#define opCOLONCOLON 324 +#define opMDASN 325 +#define opNDASN 326 +#define opNTASN 327 +#define opSTRNE 328 +#define UNARY 329 extern YYSTYPE CMDlval; diff --git a/Engine/source/console/compiledEval.cpp b/Engine/source/console/compiledEval.cpp index d61a8f353..f189d6268 100644 --- a/Engine/source/console/compiledEval.cpp +++ b/Engine/source/console/compiledEval.cpp @@ -242,7 +242,7 @@ inline void ExprEvalState::setCurVarName(StringTableEntry name) else if( getStackDepth() > 0 ) currentVariable = getCurrentFrame().lookup(name); if(!currentVariable && gWarnUndefinedScriptVariables) - Con::warnf(ConsoleLogEntry::Script, "Variable referenced before assignment: %s", name); + Con::warnf(ConsoleLogEntry::Script, "Variable referenced before assignment: %s", name); } inline void ExprEvalState::setCurVarNameCreate(StringTableEntry name) @@ -316,7 +316,7 @@ inline void ExprEvalState::setCopyVariable() default: currentVariable->setStringValue(copyVariable->getStringValue()); break; - } + } } } @@ -398,7 +398,7 @@ static void setFieldComponent( SimObject* object, StringTableEntry field, const // Ensure that the variable has a value if (!prevVal) - return; + return; static const StringTableEntry xyzw[] = { @@ -419,7 +419,7 @@ static void setFieldComponent( SimObject* object, StringTableEntry field, const // Insert the value into the specified // component of the string. if ( subField == xyzw[0] || subField == rgba[0] ) - dStrcpy( val, StringUnit::setUnit( prevVal, 0, strValue, " \t\n") ); + dStrcpy( val, StringUnit::setUnit( prevVal, 0, strValue, " \t\n") ); else if ( subField == xyzw[1] || subField == rgba[1] ) dStrcpy( val, StringUnit::setUnit( prevVal, 1, strValue, " \t\n") ); @@ -1020,7 +1020,7 @@ breakContinue: dataBlock->deleteObject(); currentNewObject = NULL; ip = failJump; - + // Prevent stack value corruption CSTK.popFrame(); STR.popFrame(); @@ -1164,8 +1164,8 @@ breakContinue: // This fixes a bug when not explicitly returning a value. case OP_RETURN_VOID: - STR.setStringValue(""); - // We're falling thru here on purpose. + STR.setStringValue(""); + // We're falling thru here on purpose. case OP_RETURN: retValue = STR.getStringValuePtr(); @@ -1437,7 +1437,7 @@ breakContinue: case OP_SAVEVAR_STR: gEvalState.setStringVariable(STR.getStringValue()); break; - + case OP_SAVEVAR_VAR: // this basically handles %var1 = %var2 gEvalState.setCopyVariable(); diff --git a/Engine/source/console/console.cpp b/Engine/source/console/console.cpp index d6e8908b4..2a070814b 100644 --- a/Engine/source/console/console.cpp +++ b/Engine/source/console/console.cpp @@ -278,8 +278,8 @@ bool useTimestamp = false; ConsoleFunctionGroupBegin( Clipboard, "Miscellaneous functions to control the clipboard and clear the console."); DefineConsoleFunction( cls, void, (), , "()" - "@brief Clears the console output.\n\n" - "@ingroup Console") + "@brief Clears the console output.\n\n" + "@ingroup Console") { if(consoleLogLocked) return; @@ -288,17 +288,17 @@ DefineConsoleFunction( cls, void, (), , "()" }; DefineConsoleFunction( getClipboard, const char*, (), , "()" - "@brief Get text from the clipboard.\n\n" - "@internal") + "@brief Get text from the clipboard.\n\n" + "@internal") { - return Platform::getClipboard(); + return Platform::getClipboard(); }; DefineConsoleFunction( setClipboard, bool, (const char* text), , "(string text)" "@brief Set the system clipboard.\n\n" - "@internal") + "@internal") { - return Platform::setClipboard(text); + return Platform::setClipboard(text); }; ConsoleFunctionGroupEnd( Clipboard ); @@ -332,25 +332,25 @@ void init() // Variables setVariable("Con::prompt", "% "); addVariable("Con::logBufferEnabled", TypeBool, &logBufferEnabled, "If true, the log buffer will be enabled.\n" - "@ingroup Console\n"); + "@ingroup Console\n"); addVariable("Con::printLevel", TypeS32, &printLevel, "@brief This is deprecated.\n\n" "It is no longer in use and does nothing.\n" - "@ingroup Console\n"); + "@ingroup Console\n"); addVariable("Con::warnUndefinedVariables", TypeBool, &gWarnUndefinedScriptVariables, "If true, a warning will be displayed in the console whenever a undefined variable is used in script.\n" - "@ingroup Console\n"); + "@ingroup Console\n"); addVariable( "instantGroup", TypeRealString, &gInstantGroup, "The group that objects will be added to when they are created.\n" - "@ingroup Console\n"); + "@ingroup Console\n"); addVariable("Con::objectCopyFailures", TypeS32, &gObjectCopyFailures, "If greater than zero then it counts the number of object creation " "failures based on a missing copy object and does not report an error..\n" - "@ingroup Console\n"); + "@ingroup Console\n"); // Current script file name and root addVariable( "Con::File", TypeString, &gCurrentFile, "The currently executing script file.\n" - "@ingroup FileSystem\n"); + "@ingroup FileSystem\n"); addVariable( "Con::Root", TypeString, &gCurrentRoot, "The mod folder for the currently executing script file.\n" - "@ingroup FileSystem\n" ); + "@ingroup FileSystem\n" ); // alwaysUseDebugOutput determines whether to send output to the platform's // "debug" system. see winConsole for an example. @@ -364,14 +364,14 @@ void init() addVariable("Con::alwaysUseDebugOutput", TypeBool, &alwaysUseDebugOutput, "@brief Determines whether to send output to the platform's \"debug\" system.\n\n" "@note This is disabled in shipping builds.\n" - "@ingroup Console"); + "@ingroup Console"); #else alwaysUseDebugOutput = false; #endif // controls whether a timestamp is prepended to every console message addVariable("Con::useTimestamp", TypeBool, &useTimestamp, "If true a timestamp is prepended to every console message.\n" - "@ingroup Console\n"); + "@ingroup Console\n"); // Plug us into the journaled console input signal. smConsoleInput.notify(postConsoleInput); @@ -599,7 +599,7 @@ static void log(const char *string) static void _printf(ConsoleLogEntry::Level level, ConsoleLogEntry::Type type, const char* fmt, va_list argptr) { if (!active) - return; + return; Con::active = false; char buffer[8192]; @@ -781,7 +781,7 @@ Dictionary::Entry *getAddVariableEntry(const char *name) StringTableEntry stName = StringTable->insert(name); Dictionary::Entry *entry = gEvalState.globalVars.lookup(stName); if (!entry) - entry = gEvalState.globalVars.add(stName); + entry = gEvalState.globalVars.add(stName); return entry; } @@ -791,7 +791,7 @@ Dictionary::Entry *getAddLocalVariableEntry(const char *name) StringTableEntry stName = StringTable->insert(name); Dictionary::Entry *entry = gEvalState.getCurrentFrame().lookup(stName); if (!entry) - entry = gEvalState.getCurrentFrame().add(stName); + entry = gEvalState.getCurrentFrame().add(stName); return entry; } @@ -802,7 +802,7 @@ void setVariable(const char *name, const char *value) if (getVariableObjectField(name, &obj, &objField)) { - obj->setDataField(StringTable->insert(objField), 0, value); + obj->setDataField(StringTable->insert(objField), 0, value); } else { @@ -824,13 +824,13 @@ void setBoolVariable(const char *varName, bool value) if (getVariableObjectField(varName, &obj, &objField)) { - obj->setDataField(StringTable->insert(objField), 0, value ? "1" : "0"); + obj->setDataField(StringTable->insert(objField), 0, value ? "1" : "0"); } else { varName = prependDollar(varName); Dictionary::Entry *entry = getAddVariableEntry(varName); - entry->setStringValue(value ? "1" : "0"); + entry->setStringValue(value ? "1" : "0"); } } @@ -841,9 +841,9 @@ void setIntVariable(const char *varName, S32 value) if (getVariableObjectField(varName, &obj, &objField)) { - char scratchBuffer[32]; - dSprintf(scratchBuffer, sizeof(scratchBuffer), "%d", value); - obj->setDataField(StringTable->insert(objField), 0, scratchBuffer); + char scratchBuffer[32]; + dSprintf(scratchBuffer, sizeof(scratchBuffer), "%d", value); + obj->setDataField(StringTable->insert(objField), 0, scratchBuffer); } else { @@ -860,15 +860,15 @@ void setFloatVariable(const char *varName, F32 value) if (getVariableObjectField(varName, &obj, &objField)) { - char scratchBuffer[32]; - dSprintf(scratchBuffer, sizeof(scratchBuffer), "%g", value); - obj->setDataField(StringTable->insert(objField), 0, scratchBuffer); + char scratchBuffer[32]; + dSprintf(scratchBuffer, sizeof(scratchBuffer), "%g", value); + obj->setDataField(StringTable->insert(objField), 0, scratchBuffer); } else { varName = prependDollar(varName); Dictionary::Entry *entry = getAddVariableEntry(varName); - entry->setFloatValue(value); + entry->setFloatValue(value); } } @@ -1020,7 +1020,7 @@ F32 getFloatVariable(const char *varName, F32 def) else { Dictionary::Entry *entry = getVariableEntry(varName); - return entry ? entry->getFloatValue() : def; + return entry ? entry->getFloatValue() : def; } } @@ -1308,8 +1308,8 @@ bool executeFile(const char* fileName, bool noCalls, bool journalScript) // Let's do a sanity check to complain about DSOs in the future. // - // MM: This doesn't seem to be working correctly for now so let's just not issue - // the warning until someone knows how to resolve it. + // MM: This doesn't seem to be working correctly for now so let's just not issue + // the warning until someone knows how to resolve it. // //if(compiled && rCom && rScr && Platform::compareFileTimes(comModifyTime, scrModifyTime) < 0) //{ @@ -1515,7 +1515,7 @@ ConsoleValueRef execute(S32 argc, ConsoleValueRef argv[]) #endif ConsoleStackFrameSaver stackSaver; stackSaver.save(); - return _internalExecute(argc, argv); + return _internalExecute(argc, argv); #ifdef TORQUE_MULTITHREAD } else @@ -2616,7 +2616,7 @@ const char *ConsoleValue::getStringValue() U32 stringLen = dStrlen(internalValue); U32 newLen = ((stringLen + 1) + 15) & ~15; // pad upto next cache line - + if (bufferLen == 0) sval = (char *) dMalloc(newLen); else if(newLen > bufferLen) diff --git a/Engine/source/console/consoleDoc.cpp b/Engine/source/console/consoleDoc.cpp index 41c5e8027..b442841a4 100644 --- a/Engine/source/console/consoleDoc.cpp +++ b/Engine/source/console/consoleDoc.cpp @@ -45,7 +45,7 @@ DefineConsoleFunction( dumpConsoleClasses, void, (bool dumpScript, bool dumpEngi "@brief Dumps all declared console classes to the console.\n\n" "@param dumpScript Optional parameter specifying whether or not classes defined in script should be dumped.\n" "@param dumpEngine Optional parameter specifying whether or not classes defined in the engine should be dumped.\n" - "@ingroup Logging") + "@ingroup Logging") { Namespace::dumpClasses( dumpScript, dumpEngine ); } @@ -54,7 +54,7 @@ DefineConsoleFunction(dumpConsoleFunctions, void, ( bool dumpScript, bool dumpEn "@brief Dumps all declared console functions to the console.\n" "@param dumpScript Optional parameter specifying whether or not functions defined in script should be dumped.\n" "@param dumpEngine Optional parameter specitying whether or not functions defined in the engine should be dumped.\n" - "@ingroup Logging") + "@ingroup Logging") { Namespace::dumpFunctions( dumpScript, dumpEngine ); } diff --git a/Engine/source/console/consoleFunctions.cpp b/Engine/source/console/consoleFunctions.cpp index 76b3f3d9f..bdf1d5cfe 100644 --- a/Engine/source/console/consoleFunctions.cpp +++ b/Engine/source/console/consoleFunctions.cpp @@ -463,12 +463,12 @@ DefineConsoleFunction( strposr, S32, ( const char* haystack, const char* needle, U32 sublen = dStrlen( needle ); U32 strlen = dStrlen( haystack ); S32 start = strlen - offset; - + if(start < 0 || start > strlen) return -1; if (start + sublen > strlen) - start = strlen - sublen; + start = strlen - sublen; for(; start >= 0; start--) if(!dStrncmp(haystack + start, needle, sublen)) return start; @@ -1022,15 +1022,15 @@ DefineConsoleFunction( strrchrpos, S32, ( const char* str, const char* chr, S32 //---------------------------------------------------------------- DefineConsoleFunction(ColorFloatToInt, ColorI, (ColorF color), , - "Convert from a float color to an integer color (0.0 - 1.0 to 0 to 255).\n" - "@param color Float color value to be converted in the form \"R G B A\", where R is red, G is green, B is blue, and A is alpha.\n" - "@return Converted color value (0 - 255)\n\n" - "@tsexample\n" - "ColorFloatToInt( \"0 0 1 0.5\" ) // Returns \"0 0 255 128\".\n" - "@endtsexample\n" - "@ingroup Strings") + "Convert from a float color to an integer color (0.0 - 1.0 to 0 to 255).\n" + "@param color Float color value to be converted in the form \"R G B A\", where R is red, G is green, B is blue, and A is alpha.\n" + "@return Converted color value (0 - 255)\n\n" + "@tsexample\n" + "ColorFloatToInt( \"0 0 1 0.5\" ) // Returns \"0 0 255 128\".\n" + "@endtsexample\n" + "@ingroup Strings") { - return (ColorI)color; + return (ColorI)color; } DefineConsoleFunction(ColorIntToFloat, ColorF, (ColorI color), , @@ -1201,8 +1201,8 @@ DefineConsoleFunction( isValidIP, bool, ( const char* str),, ConsoleFunction(addCaseSensitiveStrings,void,2,0,"[string1, string2, ...]" "Adds case sensitive strings to the StringTable.") { - for(int i = 1; i < argc; i++) - StringTable->insert(argv[i], true); + for(int i = 1; i < argc; i++) + StringTable->insert(argv[i], true); } //============================================================================= @@ -1645,7 +1645,7 @@ DefineConsoleFunction( nextToken, const char*, ( const char* str1, const char* t "@endtsexample\n\n" "@ingroup Strings" ) { - char buffer[4096]; + char buffer[4096]; dStrncpy(buffer, str1, 4096); char *str = buffer; @@ -1812,7 +1812,7 @@ DefineEngineFunction( detag, const char*, ( const char* str ),, "{\n" " onChatMessage(detag(%msgString), %voice, %pitch);\n" "}\n" - "@endtsexample\n\n" + "@endtsexample\n\n" "@see \\ref syntaxDataTypes under Tagged %Strings\n" "@see getTag()\n" @@ -2017,8 +2017,8 @@ DefineConsoleFunction( collapseEscape, const char*, ( const char* text ),, //----------------------------------------------------------------------------- DefineEngineFunction( setLogMode, void, ( S32 mode ),, - "@brief Determines how log files are written.\n\n" - "Sets the operational mode of the console logging system.\n\n" + "@brief Determines how log files are written.\n\n" + "Sets the operational mode of the console logging system.\n\n" "@param mode Parameter specifying the logging mode. This can be:\n" "- 1: Open and close the console log file for each seperate string of output. This will ensure that all " "parts get written out to disk and that no parts remain in intermediate buffers even if the process crashes.\n" @@ -2030,8 +2030,8 @@ DefineEngineFunction( setLogMode, void, ( S32 mode ),, "combined by binary OR with 0x4 to cause the logging system to flush all console log messages that had already been " "issued to the console system into the newly created log file.\n\n" - "@note Xbox 360 does not support logging to a file. Use Platform::OutputDebugStr in C++ instead." - "@ingroup Logging" ) + "@note Xbox 360 does not support logging to a file. Use Platform::OutputDebugStr in C++ instead." + "@ingroup Logging" ) { Con::setLogMode( mode ); } @@ -2144,7 +2144,7 @@ DefineEngineFunction( gotoWebPage, void, ( const char* address ),, DefineEngineFunction( displaySplashWindow, bool, (const char* path), (""), "Display a startup splash window suitable for showing while the engine still starts up.\n\n" "@note This is currently only implemented on Windows.\n\n" - "@param path relative path to splash screen image to display.\n" + "@param path relative path to splash screen image to display.\n" "@return True if the splash window could be successfully initialized.\n\n" "@ingroup Platform" ) { @@ -2395,19 +2395,19 @@ DefineConsoleFunction( setVariable, void, ( const char* varName, const char* val } DefineConsoleFunction( isFunction, bool, ( const char* funcName ), , "(string funcName)" - "@brief Determines if a function exists or not\n\n" - "@param funcName String containing name of the function\n" - "@return True if the function exists, false if not\n" - "@ingroup Scripting") + "@brief Determines if a function exists or not\n\n" + "@param funcName String containing name of the function\n" + "@return True if the function exists, false if not\n" + "@ingroup Scripting") { return Con::isFunction(funcName); } DefineConsoleFunction( getFunctionPackage, const char*, ( const char* funcName ), , "(string funcName)" - "@brief Provides the name of the package the function belongs to\n\n" - "@param funcName String containing name of the function\n" - "@return The name of the function's package\n" - "@ingroup Packages") + "@brief Provides the name of the package the function belongs to\n\n" + "@param funcName String containing name of the function\n" + "@return The name of the function's package\n" + "@ingroup Packages") { Namespace::Entry* nse = Namespace::global()->lookup( StringTable->insert( funcName ) ); if( !nse ) @@ -2417,11 +2417,11 @@ DefineConsoleFunction( getFunctionPackage, const char*, ( const char* funcName ) } DefineConsoleFunction( isMethod, bool, ( const char* nameSpace, const char* method ), , "(string namespace, string method)" - "@brief Determines if a class/namespace method exists\n\n" - "@param namespace Class or namespace, such as Player\n" - "@param method Name of the function to search for\n" - "@return True if the method exists, false if not\n" - "@ingroup Scripting\n") + "@brief Determines if a class/namespace method exists\n\n" + "@param namespace Class or namespace, such as Player\n" + "@param method Name of the function to search for\n" + "@return True if the method exists, false if not\n" + "@ingroup Scripting\n") { Namespace* ns = Namespace::find( StringTable->insert( nameSpace ) ); Namespace::Entry* nse = ns->lookup( StringTable->insert( method ) ); @@ -2432,11 +2432,11 @@ DefineConsoleFunction( isMethod, bool, ( const char* nameSpace, const char* meth } DefineConsoleFunction( getMethodPackage, const char*, ( const char* nameSpace, const char* method ), , "(string namespace, string method)" - "@brief Provides the name of the package the method belongs to\n\n" - "@param namespace Class or namespace, such as Player\n" - "@param method Name of the funciton to search for\n" - "@return The name of the method's package\n" - "@ingroup Packages") + "@brief Provides the name of the package the method belongs to\n\n" + "@param namespace Class or namespace, such as Player\n" + "@param method Name of the funciton to search for\n" + "@return The name of the method's package\n" + "@ingroup Packages") { Namespace* ns = Namespace::find( StringTable->insert( nameSpace ) ); if( !ns ) @@ -2450,13 +2450,13 @@ DefineConsoleFunction( getMethodPackage, const char*, ( const char* nameSpace, c } DefineConsoleFunction( isDefined, bool, ( const char* varName, const char* varValue ), ("") , "(string varName)" - "@brief Determines if a variable exists and contains a value\n" - "@param varName Name of the variable to search for\n" - "@return True if the variable was defined in script, false if not\n" + "@brief Determines if a variable exists and contains a value\n" + "@param varName Name of the variable to search for\n" + "@return True if the variable was defined in script, false if not\n" "@tsexample\n" "isDefined( \"$myVar\" );\n" "@endtsexample\n\n" - "@ingroup Scripting") + "@ingroup Scripting") { if(String::isEmpty(varName)) { @@ -2595,10 +2595,10 @@ DefineConsoleFunction( isCurrentScriptToolScript, bool, (), , "()" } DefineConsoleFunction( getModNameFromPath, const char *, ( const char* path ), , "(string path)" - "@brief Attempts to extract a mod directory from path. Returns empty string on failure.\n\n" - "@param File path of mod folder\n" - "@note This is no longer relevant in Torque 3D (which does not use mod folders), should be deprecated\n" - "@internal") + "@brief Attempts to extract a mod directory from path. Returns empty string on failure.\n\n" + "@param File path of mod folder\n" + "@note This is no longer relevant in Torque 3D (which does not use mod folders), should be deprecated\n" + "@internal") { StringTableEntry modPath = Con::getModNameFromPath(path); return modPath ? modPath : ""; @@ -2607,11 +2607,11 @@ DefineConsoleFunction( getModNameFromPath, const char *, ( const char* path ), , //----------------------------------------------------------------------------- DefineConsoleFunction( pushInstantGroup, void, ( String group ),("") , "([group])" - "@brief Pushes the current $instantGroup on a stack " - "and sets it to the given value (or clears it).\n\n" - "@note Currently only used for editors\n" - "@ingroup Editors\n" - "@internal") + "@brief Pushes the current $instantGroup on a stack " + "and sets it to the given value (or clears it).\n\n" + "@note Currently only used for editors\n" + "@ingroup Editors\n" + "@internal") { if( group.size() > 0 ) Con::pushInstantGroup( group ); @@ -2620,10 +2620,10 @@ DefineConsoleFunction( pushInstantGroup, void, ( String group ),("") , "([group] } DefineConsoleFunction( popInstantGroup, void, (), , "()" - "@brief Pop and restore the last setting of $instantGroup off the stack.\n\n" - "@note Currently only used for editors\n\n" - "@ingroup Editors\n" - "@internal") + "@brief Pop and restore the last setting of $instantGroup off the stack.\n\n" + "@note Currently only used for editors\n\n" + "@ingroup Editors\n" + "@internal") { Con::popInstantGroup(); } @@ -2631,8 +2631,8 @@ DefineConsoleFunction( popInstantGroup, void, (), , "()" //----------------------------------------------------------------------------- DefineConsoleFunction( getPrefsPath, const char *, ( const char* relativeFileName ), (""), "([relativeFileName])" - "@note Appears to be useless in Torque 3D, should be deprecated\n" - "@internal") + "@note Appears to be useless in Torque 3D, should be deprecated\n" + "@internal") { const char *filename = Platform::getPrefsPath(relativeFileName); if(filename == NULL || *filename == 0) @@ -2644,13 +2644,13 @@ DefineConsoleFunction( getPrefsPath, const char *, ( const char* relativeFileNam //----------------------------------------------------------------------------- ConsoleFunction( execPrefs, bool, 2, 4, "( string relativeFileName, bool noCalls=false, bool journalScript=false )" - "@brief Manually execute a special script file that contains game or editor preferences\n\n" - "@param relativeFileName Name and path to file from project folder\n" - "@param noCalls Deprecated\n" - "@param journalScript Deprecated\n" - "@return True if script was successfully executed\n" - "@note Appears to be useless in Torque 3D, should be deprecated\n" - "@ingroup Scripting") + "@brief Manually execute a special script file that contains game or editor preferences\n\n" + "@param relativeFileName Name and path to file from project folder\n" + "@param noCalls Deprecated\n" + "@param journalScript Deprecated\n" + "@return True if script was successfully executed\n" + "@note Appears to be useless in Torque 3D, should be deprecated\n" + "@ingroup Scripting") { const char *filename = Platform::getPrefsPath(argv[1]); if(filename == NULL || *filename == 0) @@ -2791,8 +2791,8 @@ DefineEngineFunction( isToolBuild, bool, (),, } DefineEngineFunction( getMaxDynamicVerts, S32, (),, - "Get max number of allowable dynamic vertices in a single vertex buffer.\n\n" - "@return the max number of allowable dynamic vertices in a single vertex buffer" ) + "Get max number of allowable dynamic vertices in a single vertex buffer.\n\n" + "@return the max number of allowable dynamic vertices in a single vertex buffer" ) { return MAX_DYNAMIC_VERTS / 2; } diff --git a/Engine/source/console/consoleInternal.cpp b/Engine/source/console/consoleInternal.cpp index c562b85c0..c9016e8dc 100644 --- a/Engine/source/console/consoleInternal.cpp +++ b/Engine/source/console/consoleInternal.cpp @@ -510,7 +510,7 @@ void ConsoleValue::setStringValue(const char * value) return; } */ - if (value == typeValueEmpty) + if (value == typeValueEmpty) { if (bufferLen > 0) { @@ -544,7 +544,7 @@ void ConsoleValue::setStringValue(const char * value) // may as well pad to the next cache line U32 newLen = ((stringLen + 1) + 15) & ~15; - + if(bufferLen == 0) sval = (char *) dMalloc(newLen); else if(newLen > bufferLen) @@ -573,7 +573,7 @@ void ConsoleValue::setStackStringValue(const char *value) bufferLen = 0; } - if (value == typeValueEmpty) + if (value == typeValueEmpty) { sval = typeValueEmpty; fval = 0.f; @@ -607,7 +607,7 @@ void ConsoleValue::setStringStackPtrValue(StringStackPtr ptrValue) if(type <= ConsoleValue::TypeInternalString) { const char *value = StringStackPtrRef(ptrValue).getPtr(&STR); - if (bufferLen > 0) + if (bufferLen > 0) { dFree(sval); bufferLen = 0; @@ -1418,14 +1418,14 @@ ConsoleValueRef Namespace::Entry::execute(S32 argc, ConsoleValueRef *argv, ExprE case StringCallbackType: return ConsoleValueRef::fromValue(CSTK.pushStackString(cb.mStringCallbackFunc(state->thisObject, argc, argv))); case IntCallbackType: - return ConsoleValueRef::fromValue(CSTK.pushUINT((U32)cb.mBoolCallbackFunc(state->thisObject, argc, argv))); + return ConsoleValueRef::fromValue(CSTK.pushUINT((U32)cb.mBoolCallbackFunc(state->thisObject, argc, argv))); case FloatCallbackType: - return ConsoleValueRef::fromValue(CSTK.pushFLT((U32)cb.mBoolCallbackFunc(state->thisObject, argc, argv))); + return ConsoleValueRef::fromValue(CSTK.pushFLT((U32)cb.mBoolCallbackFunc(state->thisObject, argc, argv))); case VoidCallbackType: cb.mVoidCallbackFunc(state->thisObject, argc, argv); return ConsoleValueRef(); case BoolCallbackType: - return ConsoleValueRef::fromValue(CSTK.pushUINT((U32)cb.mBoolCallbackFunc(state->thisObject, argc, argv))); + return ConsoleValueRef::fromValue(CSTK.pushUINT((U32)cb.mBoolCallbackFunc(state->thisObject, argc, argv))); } return ConsoleValueRef(); diff --git a/Engine/source/console/consoleLogger.cpp b/Engine/source/console/consoleLogger.cpp index cc0e2afaf..84347a332 100644 --- a/Engine/source/console/consoleLogger.cpp +++ b/Engine/source/console/consoleLogger.cpp @@ -226,20 +226,20 @@ void ConsoleLogger::log( const char *consoleLine ) //----------------------------------------------------------------------------- DefineConsoleMethod( ConsoleLogger, attach, bool, (), , "() Attaches the logger to the console and begins writing to file" - "@tsexample\n" - "// Create the logger\n" - "// Will automatically start writing to testLogging.txt with normal priority\n" - "new ConsoleLogger(logger, \"testLogging.txt\", false);\n\n" - "// Send something to the console, with the logger consumes and writes to file\n" - "echo(\"This is logged to the file\");\n\n" - "// Stop logging, but do not delete the logger\n" - "logger.detach();\n\n" - "echo(\"This is not logged to the file\");\n\n" - "// Attach the logger to the console again\n" - "logger.attach();\n\n" - "// Logging has resumed\n" - "echo(\"Logging has resumed\");" - "@endtsexample\n\n") + "@tsexample\n" + "// Create the logger\n" + "// Will automatically start writing to testLogging.txt with normal priority\n" + "new ConsoleLogger(logger, \"testLogging.txt\", false);\n\n" + "// Send something to the console, with the logger consumes and writes to file\n" + "echo(\"This is logged to the file\");\n\n" + "// Stop logging, but do not delete the logger\n" + "logger.detach();\n\n" + "echo(\"This is not logged to the file\");\n\n" + "// Attach the logger to the console again\n" + "logger.attach();\n\n" + "// Logging has resumed\n" + "echo(\"Logging has resumed\");" + "@endtsexample\n\n") { ConsoleLogger *logger = static_cast( object ); return logger->attach(); @@ -248,20 +248,20 @@ DefineConsoleMethod( ConsoleLogger, attach, bool, (), , "() Attaches the logger //----------------------------------------------------------------------------- DefineConsoleMethod( ConsoleLogger, detach, bool, (), , "() Detaches the logger from the console and stops writing to file" - "@tsexample\n" - "// Create the logger\n" - "// Will automatically start writing to testLogging.txt with normal priority\n" - "new ConsoleLogger(logger, \"testLogging.txt\", false);\n\n" - "// Send something to the console, with the logger consumes and writes to file\n" - "echo(\"This is logged to the file\");\n\n" - "// Stop logging, but do not delete the logger\n" - "logger.detach();\n\n" - "echo(\"This is not logged to the file\");\n\n" - "// Attach the logger to the console again\n" - "logger.attach();\n\n" - "// Logging has resumed\n" - "echo(\"Logging has resumed\");" - "@endtsexample\n\n") + "@tsexample\n" + "// Create the logger\n" + "// Will automatically start writing to testLogging.txt with normal priority\n" + "new ConsoleLogger(logger, \"testLogging.txt\", false);\n\n" + "// Send something to the console, with the logger consumes and writes to file\n" + "echo(\"This is logged to the file\");\n\n" + "// Stop logging, but do not delete the logger\n" + "logger.detach();\n\n" + "echo(\"This is not logged to the file\");\n\n" + "// Attach the logger to the console again\n" + "logger.attach();\n\n" + "// Logging has resumed\n" + "echo(\"Logging has resumed\");" + "@endtsexample\n\n") { ConsoleLogger *logger = static_cast( object ); return logger->detach(); diff --git a/Engine/source/console/consoleObject.cpp b/Engine/source/console/consoleObject.cpp index 43ffda293..2d9ba2a1e 100644 --- a/Engine/source/console/consoleObject.cpp +++ b/Engine/source/console/consoleObject.cpp @@ -334,15 +334,15 @@ AbstractClassRep *AbstractClassRep::getCommonParent( const AbstractClassRep *oth static char replacebuf[1024]; static char* suppressSpaces(const char* in_pname) { - U32 i = 0; - char chr; - do - { - chr = in_pname[i]; - replacebuf[i++] = (chr != 32) ? chr : '_'; - } while(chr); + U32 i = 0; + char chr; + do + { + chr = in_pname[i]; + replacebuf[i++] = (chr != 32) ? chr : '_'; + } while(chr); - return replacebuf; + return replacebuf; } void ConsoleObject::addGroup(const char* in_pGroupname, const char* in_pGroupDocs) @@ -740,8 +740,8 @@ static const char* returnClassList( Vector< AbstractClassRep* >& classes, U32 bu //------------------------------------------------------------------------------ DefineEngineFunction( isClass, bool, ( const char* identifier ),, - "@brief Returns true if the passed identifier is the name of a declared class.\n\n" - "@ingroup Console") + "@brief Returns true if the passed identifier is the name of a declared class.\n\n" + "@ingroup Console") { AbstractClassRep* rep = AbstractClassRep::findClassRep( identifier ); return rep != NULL; @@ -765,10 +765,10 @@ DefineEngineFunction( isMemberOfClass, bool, ( const char* className, const char } DefineEngineFunction( getDescriptionOfClass, const char*, ( const char* className ),, - "@brief Returns the description string for the named class.\n\n" - "@param className The name of the class.\n" - "@return The class description in string format.\n" - "@ingroup Console") + "@brief Returns the description string for the named class.\n\n" + "@param className The name of the class.\n" + "@return The class description in string format.\n" + "@ingroup Console") { AbstractClassRep* rep = AbstractClassRep::findClassRep( className ); if( rep ) @@ -779,9 +779,9 @@ DefineEngineFunction( getDescriptionOfClass, const char*, ( const char* classNam } DefineEngineFunction( getCategoryOfClass, const char*, ( const char* className ),, - "@brief Returns the category of the given class.\n\n" - "@param className The name of the class.\n" - "@ingroup Console") + "@brief Returns the category of the given class.\n\n" + "@param className The name of the class.\n" + "@ingroup Console") { AbstractClassRep* rep = AbstractClassRep::findClassRep( className ); if( rep ) @@ -792,12 +792,12 @@ DefineEngineFunction( getCategoryOfClass, const char*, ( const char* className } DefineEngineFunction( enumerateConsoleClasses, const char*, ( const char* className ), ( "" ), - "@brief Returns a list of classes that derive from the named class.\n\n" + "@brief Returns a list of classes that derive from the named class.\n\n" "If the named class is omitted this dumps all the classes.\n" "@param className The optional base class name.\n" - "@return A tab delimited list of classes.\n" + "@return A tab delimited list of classes.\n" "@ingroup Editors\n" - "@internal") + "@internal") { AbstractClassRep *base = NULL; if(className && *className) @@ -822,11 +822,11 @@ DefineEngineFunction( enumerateConsoleClasses, const char*, ( const char* classN } DefineEngineFunction( enumerateConsoleClassesByCategory, const char*, ( String category ),, - "@brief Provide a list of classes that belong to the given category.\n\n" - "@param category The category name.\n" - "@return A tab delimited list of classes.\n" - "@ingroup Editors\n" - "@internal") + "@brief Provide a list of classes that belong to the given category.\n\n" + "@param category The category name.\n" + "@return A tab delimited list of classes.\n" + "@ingroup Editors\n" + "@internal") { U32 categoryLength = category.length(); @@ -914,10 +914,10 @@ DefineEngineFunction( dumpNetStats, void, (),, } DefineEngineFunction( sizeof, S32, ( const char *objectOrClass ),, - "@brief Determines the memory consumption of a class or object.\n\n" - "@param objectOrClass The object or class being measured.\n" - "@return Returns the total size of an object in bytes.\n" - "@ingroup Debugging\n") + "@brief Determines the memory consumption of a class or object.\n\n" + "@param objectOrClass The object or class being measured.\n" + "@return Returns the total size of an object in bytes.\n" + "@ingroup Debugging\n") { AbstractClassRep *acr = NULL; SimObject *obj = Sim::findObject(objectOrClass); diff --git a/Engine/source/console/consoleParser.cpp b/Engine/source/console/consoleParser.cpp index 2491ea738..e2dd339f5 100644 --- a/Engine/source/console/consoleParser.cpp +++ b/Engine/source/console/consoleParser.cpp @@ -35,21 +35,21 @@ static ConsoleParser *gDefaultParser = NULL; void freeConsoleParserList(void) { - while(gParserList) - { + while(gParserList) + { ConsoleParser * pParser = gParserList; - gParserList = pParser->next; - delete pParser; - } + gParserList = pParser->next; + delete pParser; + } - gDefaultParser = NULL; + gDefaultParser = NULL; } bool addConsoleParser(char *ext, fnGetCurrentFile gcf, fnGetCurrentLine gcl, fnParse p, fnRestart r, fnSetScanBuffer ssb, bool def) { - AssertFatal(ext && gcf && gcl && p && r, "AddConsoleParser called with one or more NULL arguments"); + AssertFatal(ext && gcf && gcl && p && r, "AddConsoleParser called with one or more NULL arguments"); - ConsoleParser * pParser = new ConsoleParser; + ConsoleParser * pParser = new ConsoleParser; pParser->ext = ext; pParser->getCurrentFile = gcf; @@ -69,23 +69,23 @@ bool addConsoleParser(char *ext, fnGetCurrentFile gcf, fnGetCurrentLine gcl, fnP ConsoleParser * getParserForFile(const char *filename) { - if(filename == NULL) - return gDefaultParser; + if(filename == NULL) + return gDefaultParser; - char *ptr = dStrrchr((char *)filename, '.'); - if(ptr != NULL) - { - ptr++; + char *ptr = dStrrchr((char *)filename, '.'); + if(ptr != NULL) + { + ptr++; - ConsoleParser *p; - for(p = gParserList; p; p = p->next) - { - if(dStricmp(ptr, p->ext) == 0) - return p; - } - } + ConsoleParser *p; + for(p = gParserList; p; p = p->next) + { + if(dStricmp(ptr, p->ext) == 0) + return p; + } + } - return gDefaultParser; + return gDefaultParser; } } // end namespace Con diff --git a/Engine/source/console/consoleParser.h b/Engine/source/console/consoleParser.h index d033f75f4..ac1badaae 100644 --- a/Engine/source/console/consoleParser.h +++ b/Engine/source/console/consoleParser.h @@ -57,15 +57,15 @@ typedef void (*fnSetScanBuffer)(const char *sb, const char *fn); //----------------------------------------------------------------------------- struct ConsoleParser { - struct ConsoleParser *next; //!< Next object in list or NULL + struct ConsoleParser *next; //!< Next object in list or NULL - char *ext; //!< Filename extension handled by this parser - - fnGetCurrentFile getCurrentFile; //!< GetCurrentFile lexer function - fnGetCurrentLine getCurrentLine; //!< GetCurrentLine lexer function - fnParse parse; //!< Parse lexer function - fnRestart restart; //!< Restart lexer function - fnSetScanBuffer setScanBuffer; //!< SetScanBuffer lexer function + char *ext; //!< Filename extension handled by this parser + + fnGetCurrentFile getCurrentFile; //!< GetCurrentFile lexer function + fnGetCurrentLine getCurrentLine; //!< GetCurrentLine lexer function + fnParse parse; //!< Parse lexer function + fnRestart restart; //!< Restart lexer function + fnSetScanBuffer setScanBuffer; //!< SetScanBuffer lexer function }; // Macros @@ -74,18 +74,18 @@ struct ConsoleParser /// \brief Declare a parser's function prototypes //----------------------------------------------------------------------------- #define CON_DECLARE_PARSER(prefix) \ - const char * prefix##GetCurrentFile(); \ - S32 prefix##GetCurrentLine(); \ - void prefix##SetScanBuffer(const char *sb, const char *fn); \ - S32 prefix##parse(); \ - void prefix##restart(FILE *input_file) + const char * prefix##GetCurrentFile(); \ + S32 prefix##GetCurrentLine(); \ + void prefix##SetScanBuffer(const char *sb, const char *fn); \ + S32 prefix##parse(); \ + void prefix##restart(FILE *input_file) //----------------------------------------------------------------------------- /// \brief Helper macro to add console parsers //----------------------------------------------------------------------------- #define CON_ADD_PARSER(prefix, ext, def) \ - Compiler::addConsoleParser(ext, prefix##GetCurrentFile, prefix##GetCurrentLine, prefix##parse, \ - prefix##restart, prefix##SetScanBuffer, def) + Compiler::addConsoleParser(ext, prefix##GetCurrentFile, prefix##GetCurrentLine, prefix##parse, \ + prefix##restart, prefix##SetScanBuffer, def) //----------------------------------------------------------------------------- /// \brief Free the console parser list diff --git a/Engine/source/console/simManager.cpp b/Engine/source/console/simManager.cpp index 06027cdfe..4f12fa85f 100644 --- a/Engine/source/console/simManager.cpp +++ b/Engine/source/console/simManager.cpp @@ -99,7 +99,7 @@ U32 postEvent(SimObject *destObject, SimEvent* event,U32 time) Mutex::lockMutex(gEventQueueMutex); - if( time == -1 ) + if( time == -1 ) // FIXME: a smart compiler will remove this check. - see http://garagegames.com/community/resources/view/19785 for a fix time = gCurrentTime; event->time = time; diff --git a/Engine/source/forest/glsl/windDeformationGLSL.cpp b/Engine/source/forest/glsl/windDeformationGLSL.cpp index ae32b51f7..9c9ed6f42 100644 --- a/Engine/source/forest/glsl/windDeformationGLSL.cpp +++ b/Engine/source/forest/glsl/windDeformationGLSL.cpp @@ -60,7 +60,7 @@ MODULE_END; WindDeformationGLSL::WindDeformationGLSL() - : mDep( "shaders/common/gl/wind.glsl" ) + : mDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/gl/wind.glsl" )) { addDependency( &mDep ); } diff --git a/Engine/source/forest/hlsl/windDeformationHLSL.cpp b/Engine/source/forest/hlsl/windDeformationHLSL.cpp index 24acf769a..08bce353e 100644 --- a/Engine/source/forest/hlsl/windDeformationHLSL.cpp +++ b/Engine/source/forest/hlsl/windDeformationHLSL.cpp @@ -60,7 +60,7 @@ MODULE_END; WindDeformationHLSL::WindDeformationHLSL() - : mDep( "shaders/common/wind.hlsl" ) + : mDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/wind.hlsl" )) { addDependency( &mDep ); } diff --git a/Engine/source/gfx/D3D11/gfxD3D11Device.cpp b/Engine/source/gfx/D3D11/gfxD3D11Device.cpp index fd2e2e58b..16440eb64 100644 --- a/Engine/source/gfx/D3D11/gfxD3D11Device.cpp +++ b/Engine/source/gfx/D3D11/gfxD3D11Device.cpp @@ -670,8 +670,8 @@ void GFXD3D11Device::setupGenericShaders(GenericShaderType type) //shader model 4.0 is enough for the generic shaders const char* shaderModel = "4.0"; shaderData = new ShaderData(); - shaderData->setField("DXVertexShaderFile", "shaders/common/fixedFunction/colorV.hlsl"); - shaderData->setField("DXPixelShaderFile", "shaders/common/fixedFunction/colorP.hlsl"); + shaderData->setField("DXVertexShaderFile", String(Con::getVariable("$Core::CommonShaderPath")) + String("/fixedFunction/colorV.hlsl")); + shaderData->setField("DXPixelShaderFile", String(Con::getVariable("$Core::CommonShaderPath")) + String("/fixedFunction/colorP.hlsl")); shaderData->setField("pixVersion", shaderModel); shaderData->registerObject(); mGenericShader[GSColor] = shaderData->getShader(); @@ -680,8 +680,8 @@ void GFXD3D11Device::setupGenericShaders(GenericShaderType type) Sim::getRootGroup()->addObject(shaderData); shaderData = new ShaderData(); - shaderData->setField("DXVertexShaderFile", "shaders/common/fixedFunction/modColorTextureV.hlsl"); - shaderData->setField("DXPixelShaderFile", "shaders/common/fixedFunction/modColorTextureP.hlsl"); + shaderData->setField("DXVertexShaderFile", String(Con::getVariable("$Core::CommonShaderPath")) + String("/fixedFunction/modColorTextureV.hlsl")); + shaderData->setField("DXPixelShaderFile", String(Con::getVariable("$Core::CommonShaderPath")) + String("/fixedFunction/modColorTextureP.hlsl")); shaderData->setField("pixVersion", shaderModel); shaderData->registerObject(); mGenericShader[GSModColorTexture] = shaderData->getShader(); @@ -690,8 +690,8 @@ void GFXD3D11Device::setupGenericShaders(GenericShaderType type) Sim::getRootGroup()->addObject(shaderData); shaderData = new ShaderData(); - shaderData->setField("DXVertexShaderFile", "shaders/common/fixedFunction/addColorTextureV.hlsl"); - shaderData->setField("DXPixelShaderFile", "shaders/common/fixedFunction/addColorTextureP.hlsl"); + shaderData->setField("DXVertexShaderFile", String(Con::getVariable("$Core::CommonShaderPath")) + String("/fixedFunction/addColorTextureV.hlsl")); + shaderData->setField("DXPixelShaderFile", String(Con::getVariable("$Core::CommonShaderPath")) + String("/fixedFunction/addColorTextureP.hlsl")); shaderData->setField("pixVersion", shaderModel); shaderData->registerObject(); mGenericShader[GSAddColorTexture] = shaderData->getShader(); @@ -700,8 +700,8 @@ void GFXD3D11Device::setupGenericShaders(GenericShaderType type) Sim::getRootGroup()->addObject(shaderData); shaderData = new ShaderData(); - shaderData->setField("DXVertexShaderFile", "shaders/common/fixedFunction/textureV.hlsl"); - shaderData->setField("DXPixelShaderFile", "shaders/common/fixedFunction/textureP.hlsl"); + shaderData->setField("DXVertexShaderFile", String(Con::getVariable("$Core::CommonShaderPath")) + String("/fixedFunction/textureV.hlsl")); + shaderData->setField("DXPixelShaderFile", String(Con::getVariable("$Core::CommonShaderPath")) + String("/fixedFunction/textureP.hlsl")); shaderData->setField("pixVersion", shaderModel); shaderData->registerObject(); mGenericShader[GSTexture] = shaderData->getShader(); diff --git a/Engine/source/gfx/D3D9/gfxD3D9Device.cpp b/Engine/source/gfx/D3D9/gfxD3D9Device.cpp index 4f23d7a7d..05c3474dc 100644 --- a/Engine/source/gfx/D3D9/gfxD3D9Device.cpp +++ b/Engine/source/gfx/D3D9/gfxD3D9Device.cpp @@ -154,8 +154,8 @@ inline void GFXD3D9Device::setupGenericShaders( GenericShaderType type /* = GSCo ShaderData *shaderData; shaderData = new ShaderData(); - shaderData->setField("DXVertexShaderFile", "shaders/common/fixedFunction/colorV.hlsl"); - shaderData->setField("DXPixelShaderFile", "shaders/common/fixedFunction/colorP.hlsl"); + shaderData->setField("DXVertexShaderFile", String(Con::getVariable("$Core::CommonShaderPath")) + String("/fixedFunction/colorV.hlsl")); + shaderData->setField("DXPixelShaderFile", String(Con::getVariable("$Core::CommonShaderPath")) + String("/fixedFunction/colorP.hlsl")); shaderData->setField("pixVersion", "3.0"); shaderData->registerObject(); mGenericShader[GSColor] = shaderData->getShader(); @@ -164,8 +164,8 @@ inline void GFXD3D9Device::setupGenericShaders( GenericShaderType type /* = GSCo Sim::getRootGroup()->addObject(shaderData); shaderData = new ShaderData(); - shaderData->setField("DXVertexShaderFile", "shaders/common/fixedFunction/modColorTextureV.hlsl"); - shaderData->setField("DXPixelShaderFile", "shaders/common/fixedFunction/modColorTextureP.hlsl"); + shaderData->setField("DXVertexShaderFile", String(Con::getVariable("$Core::CommonShaderPath")) + String("/fixedFunction/modColorTextureV.hlsl")); + shaderData->setField("DXPixelShaderFile", String(Con::getVariable("$Core::CommonShaderPath")) + String("/fixedFunction/modColorTextureP.hlsl")); shaderData->setSamplerName("$diffuseMap", 0); shaderData->setField("pixVersion", "3.0"); shaderData->registerObject(); @@ -175,8 +175,8 @@ inline void GFXD3D9Device::setupGenericShaders( GenericShaderType type /* = GSCo Sim::getRootGroup()->addObject(shaderData); shaderData = new ShaderData(); - shaderData->setField("DXVertexShaderFile", "shaders/common/fixedFunction/addColorTextureV.hlsl"); - shaderData->setField("DXPixelShaderFile", "shaders/common/fixedFunction/addColorTextureP.hlsl"); + shaderData->setField("DXVertexShaderFile", String(Con::getVariable("$Core::CommonShaderPath")) + String("/fixedFunction/addColorTextureV.hlsl")); + shaderData->setField("DXPixelShaderFile", String(Con::getVariable("$Core::CommonShaderPath")) + String("/fixedFunction/addColorTextureP.hlsl")); shaderData->setSamplerName("$diffuseMap", 0); shaderData->setField("pixVersion", "3.0"); shaderData->registerObject(); @@ -186,8 +186,8 @@ inline void GFXD3D9Device::setupGenericShaders( GenericShaderType type /* = GSCo Sim::getRootGroup()->addObject(shaderData); shaderData = new ShaderData(); - shaderData->setField("DXVertexShaderFile", "shaders/common/fixedFunction/textureV.hlsl"); - shaderData->setField("DXPixelShaderFile", "shaders/common/fixedFunction/textureP.hlsl"); + shaderData->setField("DXVertexShaderFile", String(Con::getVariable("$Core::CommonShaderPath")) + String("/fixedFunction/textureV.hlsl")); + shaderData->setField("DXPixelShaderFile", String(Con::getVariable("$Core::CommonShaderPath")) + String("/fixedFunction/textureP.hlsl")); shaderData->setSamplerName("$diffuseMap", 0); shaderData->setField("pixVersion", "3.0"); shaderData->registerObject(); diff --git a/Engine/source/gfx/bitmap/gBitmap.cpp b/Engine/source/gfx/bitmap/gBitmap.cpp index 9e20d6951..019e92a57 100644 --- a/Engine/source/gfx/bitmap/gBitmap.cpp +++ b/Engine/source/gfx/bitmap/gBitmap.cpp @@ -611,31 +611,31 @@ bool GBitmap::checkForTransparency() //------------------------------------------------------------------------------ ColorF GBitmap::sampleTexel(F32 u, F32 v) const { - ColorF col(0.5f, 0.5f, 0.5f); - // normally sampling wraps all the way around at 1.0, - // but locking doesn't support this, and we seem to calc - // the uv based on a clamped 0 - 1... - Point2F max((F32)(getWidth()-1), (F32)(getHeight()-1)); - Point2F posf; - posf.x = mClampF(((u) * max.x), 0.0f, max.x); - posf.y = mClampF(((v) * max.y), 0.0f, max.y); - Point2I posi((S32)posf.x, (S32)posf.y); + ColorF col(0.5f, 0.5f, 0.5f); + // normally sampling wraps all the way around at 1.0, + // but locking doesn't support this, and we seem to calc + // the uv based on a clamped 0 - 1... + Point2F max((F32)(getWidth()-1), (F32)(getHeight()-1)); + Point2F posf; + posf.x = mClampF(((u) * max.x), 0.0f, max.x); + posf.y = mClampF(((v) * max.y), 0.0f, max.y); + Point2I posi((S32)posf.x, (S32)posf.y); - const U8 *buffer = getBits(); - U32 lexelindex = ((posi.y * getWidth()) + posi.x) * mBytesPerPixel; + const U8 *buffer = getBits(); + U32 lexelindex = ((posi.y * getWidth()) + posi.x) * mBytesPerPixel; - if(mBytesPerPixel == 2) - { - //U16 *buffer = (U16 *)lockrect->pBits; - } - else if(mBytesPerPixel > 2) - { - col.red = F32(buffer[lexelindex + 0]) / 255.0f; + if(mBytesPerPixel == 2) + { + //U16 *buffer = (U16 *)lockrect->pBits; + } + else if(mBytesPerPixel > 2) + { + col.red = F32(buffer[lexelindex + 0]) / 255.0f; col.green = F32(buffer[lexelindex + 1]) / 255.0f; - col.blue = F32(buffer[lexelindex + 2]) / 255.0f; - } + col.blue = F32(buffer[lexelindex + 2]) / 255.0f; + } - return col; + return col; } //-------------------------------------------------------------------------- diff --git a/Engine/source/gfx/gfxTextureManager.cpp b/Engine/source/gfx/gfxTextureManager.cpp index 781e0daa2..e9a3e57d4 100644 --- a/Engine/source/gfx/gfxTextureManager.cpp +++ b/Engine/source/gfx/gfxTextureManager.cpp @@ -42,9 +42,9 @@ using namespace Torque; S32 GFXTextureManager::smTextureReductionLevel = 0; -String GFXTextureManager::smMissingTexturePath("core/art/missingTexture"); -String GFXTextureManager::smUnavailableTexturePath("core/art/unavailable"); -String GFXTextureManager::smWarningTexturePath("core/art/warnmat"); +String GFXTextureManager::smMissingTexturePath(Con::getVariable("$Core::MissingTexturePath")); +String GFXTextureManager::smUnavailableTexturePath(Con::getVariable("$Core::UnAvailableTexturePath")); +String GFXTextureManager::smWarningTexturePath(Con::getVariable("$Core::WarningTexturePath")); GFXTextureManager::EventSignal GFXTextureManager::smEventSignal; diff --git a/Engine/source/gfx/gl/gfxGLDevice.cpp b/Engine/source/gfx/gl/gfxGLDevice.cpp index ce22f16a1..bc348671b 100644 --- a/Engine/source/gfx/gl/gfxGLDevice.cpp +++ b/Engine/source/gfx/gl/gfxGLDevice.cpp @@ -780,8 +780,8 @@ void GFXGLDevice::setupGenericShaders( GenericShaderType type ) ShaderData *shaderData; shaderData = new ShaderData(); - shaderData->setField("OGLVertexShaderFile", "shaders/common/fixedFunction/gl/colorV.glsl"); - shaderData->setField("OGLPixelShaderFile", "shaders/common/fixedFunction/gl/colorP.glsl"); + shaderData->setField("OGLVertexShaderFile", String(Con::getVariable("$Core::CommonShaderPath")) + String("/fixedFunction/gl/colorV.glsl")); + shaderData->setField("OGLPixelShaderFile", String(Con::getVariable("$Core::CommonShaderPath")) + String("/fixedFunction/gl/colorP.glsl")); shaderData->setField("pixVersion", "2.0"); shaderData->registerObject(); mGenericShader[GSColor] = shaderData->getShader(); @@ -790,8 +790,8 @@ void GFXGLDevice::setupGenericShaders( GenericShaderType type ) Sim::getRootGroup()->addObject(shaderData); shaderData = new ShaderData(); - shaderData->setField("OGLVertexShaderFile", "shaders/common/fixedFunction/gl/modColorTextureV.glsl"); - shaderData->setField("OGLPixelShaderFile", "shaders/common/fixedFunction/gl/modColorTextureP.glsl"); + shaderData->setField("OGLVertexShaderFile", String(Con::getVariable("$Core::CommonShaderPath")) + String("/fixedFunction/gl/modColorTextureV.glsl")); + shaderData->setField("OGLPixelShaderFile", String(Con::getVariable("$Core::CommonShaderPath")) + String("/fixedFunction/gl/modColorTextureP.glsl")); shaderData->setSamplerName("$diffuseMap", 0); shaderData->setField("pixVersion", "2.0"); shaderData->registerObject(); @@ -801,8 +801,8 @@ void GFXGLDevice::setupGenericShaders( GenericShaderType type ) Sim::getRootGroup()->addObject(shaderData); shaderData = new ShaderData(); - shaderData->setField("OGLVertexShaderFile", "shaders/common/fixedFunction/gl/addColorTextureV.glsl"); - shaderData->setField("OGLPixelShaderFile", "shaders/common/fixedFunction/gl/addColorTextureP.glsl"); + shaderData->setField("OGLVertexShaderFile", String(Con::getVariable("$Core::CommonShaderPath")) + String("/fixedFunction/gl/addColorTextureV.glsl")); + shaderData->setField("OGLPixelShaderFile", String(Con::getVariable("$Core::CommonShaderPath")) + String("/fixedFunction/gl/addColorTextureP.glsl")); shaderData->setSamplerName("$diffuseMap", 0); shaderData->setField("pixVersion", "2.0"); shaderData->registerObject(); @@ -812,8 +812,8 @@ void GFXGLDevice::setupGenericShaders( GenericShaderType type ) Sim::getRootGroup()->addObject(shaderData); shaderData = new ShaderData(); - shaderData->setField("OGLVertexShaderFile", "shaders/common/fixedFunction/gl/textureV.glsl"); - shaderData->setField("OGLPixelShaderFile", "shaders/common/fixedFunction/gl/textureP.glsl"); + shaderData->setField("OGLVertexShaderFile", String(Con::getVariable("$Core::CommonShaderPath")) + String("/fixedFunction/gl/textureV.glsl")); + shaderData->setField("OGLPixelShaderFile", String(Con::getVariable("$Core::CommonShaderPath")) + String("/fixedFunction/gl/textureP.glsl")); shaderData->setSamplerName("$diffuseMap", 0); shaderData->setField("pixVersion", "2.0"); shaderData->registerObject(); diff --git a/Engine/source/gui/worldEditor/worldEditor.cpp b/Engine/source/gui/worldEditor/worldEditor.cpp index 7708feb79..67c60601e 100644 --- a/Engine/source/gui/worldEditor/worldEditor.cpp +++ b/Engine/source/gui/worldEditor/worldEditor.cpp @@ -68,7 +68,8 @@ ImplementEnumType( WorldEditorDropType, { WorldEditor::DropAtScreenCenter, "screenCenter", "Places at a position projected outwards from the screen's center.\n" }, { WorldEditor::DropAtCentroid, "atCentroid", "Places at the center position of the current centroid.\n" }, { WorldEditor::DropToTerrain, "toTerrain", "Places on the terrain.\n" }, - { WorldEditor::DropBelowSelection, "belowSelection", "Places at a position below the selected object.\n" } + { WorldEditor::DropBelowSelection, "belowSelection", "Places at a position below the selected object.\n" }, + { WorldEditor::DropAtGizmo, "atGizmo", "Places at the gizmo point.\n" } EndImplementEnumType; ImplementEnumType( WorldEditorAlignmentType, @@ -643,10 +644,10 @@ void WorldEditor::dropSelection(Selection* sel) Point3F offset = -boxCenter; offset.z += bounds.len_z() * 0.5f; - sel->offset( offset, mGridSnap ? mGridPlaneSize : 0.f ); + sel->offset(offset, (!mUseGroupCenter && mGridSnap) ? mGridPlaneSize : 0.f); } else - sel->offset( Point3F( -centroid ), mGridSnap ? mGridPlaneSize : 0.f ); + sel->offset(Point3F(-centroid), (!mUseGroupCenter && mGridSnap) ? mGridPlaneSize : 0.f); break; } @@ -657,7 +658,7 @@ void WorldEditor::dropSelection(Selection* sel) if(mDropAtBounds && !sel->containsGlobalBounds()) center = sel->getBoxBottomCenter(); - sel->offset( Point3F( smCamPos - center ), mGridSnap ? mGridPlaneSize : 0.f ); + sel->offset(Point3F(smCamPos - center), (!mUseGroupCenter && mGridSnap) ? mGridPlaneSize : 0.f); sel->orient(smCamMatrix, center); break; } @@ -668,7 +669,7 @@ void WorldEditor::dropSelection(Selection* sel) if(mDropAtBounds && !sel->containsGlobalBounds()) sel->getBoxBottomCenter(); - sel->offset( Point3F( smCamPos - center ), mGridSnap ? mGridPlaneSize : 0.f ); + sel->offset(Point3F(smCamPos - center), (!mUseGroupCenter && mGridSnap) ? mGridPlaneSize : 0.f); break; } @@ -680,7 +681,7 @@ void WorldEditor::dropSelection(Selection* sel) Point3F offset = smCamPos - center; offset.z -= mDropBelowCameraOffset; - sel->offset( offset, mGridSnap ? mGridPlaneSize : 0.f ); + sel->offset(offset, (!mUseGroupCenter && mGridSnap) ? mGridPlaneSize : 0.f); break; } @@ -712,7 +713,7 @@ void WorldEditor::dropSelection(Selection* sel) event.vec = wp - smCamPos; event.vec.normalizeSafe(); event.vec *= viewdist; - sel->offset( Point3F( event.pos - center ) += event.vec, mGridSnap ? mGridPlaneSize : 0.f ); + sel->offset(Point3F(event.pos - center) += event.vec, (!mUseGroupCenter && mGridSnap) ? mGridPlaneSize : 0.f); break; } @@ -728,12 +729,26 @@ void WorldEditor::dropSelection(Selection* sel) dropBelowSelection(sel, centroid, mDropAtBounds); break; } + + case DropAtGizmo: + { + dropAtGizmo(sel, mGizmo->getPosition()-centroid); + break; + } } // updateClientTransforms(sel); } +void WorldEditor::dropAtGizmo(Selection* sel, const Point3F & gizmoPos) +{ + if (!sel->size()) + return; + + sel->offset(gizmoPos, (!mUseGroupCenter && mGridSnap) ? mGridPlaneSize : 0.f); +} + void WorldEditor::dropBelowSelection(Selection* sel, const Point3F & centroid, bool useBottomBounds) { if(!sel->size()) @@ -756,7 +771,7 @@ void WorldEditor::dropBelowSelection(Selection* sel, const Point3F & centroid, sel->enableCollision(); if( hit ) - sel->offset( ri.point - start, mGridSnap ? mGridPlaneSize : 0.f ); + sel->offset(ri.point - start, (!mUseGroupCenter && mGridSnap) ? mGridPlaneSize : 0.f); } //------------------------------------------------------------------------------ @@ -800,7 +815,7 @@ void WorldEditor::terrainSnapSelection(Selection* sel, U8 modifier, Point3F gizm { mStuckToGround = true; - sel->offset( ri.point - centroid, mGridSnap ? mGridPlaneSize : 0.f ); + sel->offset(ri.point - centroid, (!mUseGroupCenter && mGridSnap) ? mGridPlaneSize : 0.f); if(mTerrainSnapAlignment != AlignNone) { @@ -1026,7 +1041,7 @@ void WorldEditor::softSnapSelection(Selection* sel, U8 modifier, Point3F gizmoPo if ( minT <= 1.0f ) foundPoint += ( end - start ) * (0.5f - minT); - sel->offset( foundPoint - sel->getCentroid(), mGridSnap ? mGridPlaneSize : 0.f ); + sel->offset(foundPoint - sel->getCentroid(), (!mUseGroupCenter && mGridSnap) ? mGridPlaneSize : 0.f); } mSoftSnapIsStuck = found; @@ -1805,7 +1820,7 @@ WorldEditor::WorldEditor() mSoftSnapDebugPoint.set(0.0f, 0.0f, 0.0f); mGridSnap = false; - + mUseGroupCenter = true; mFadeIcons = true; mFadeIconsDist = 8.f; } @@ -2254,7 +2269,7 @@ void WorldEditor::on3DMouseDragged(const Gui3DMouseEvent & event) mGizmo->getProfile()->snapToGrid = snapToGrid; } - mSelected->offset( mGizmo->getOffset() ); + mSelected->offset(mGizmo->getOffset(), (!mUseGroupCenter && mGridSnap) ? mGridPlaneSize : 0.f); // Handle various sticking terrainSnapSelection( mSelected, event.modifier, mGizmo->getPosition() ); @@ -2686,7 +2701,8 @@ void WorldEditor::initPersistFields() addGroup( "Grid" ); addField( "gridSnap", TypeBool, Offset( mGridSnap, WorldEditor ), - "If true, transform operations will snap to the grid." ); + "If true, transform operations will snap to the grid."); + addField("useGroupCenter", TypeBool, Offset(mUseGroupCenter, WorldEditor)); endGroup( "Grid" ); @@ -3035,7 +3051,7 @@ void WorldEditor::transformSelection(bool position, Point3F& p, bool relativePos { if( relativePos ) { - mSelected->offset( p, mGridSnap ? mGridPlaneSize : 0.f ); + mSelected->offset(p, (!mUseGroupCenter && mGridSnap) ? mGridPlaneSize : 0.f); } else { @@ -3641,7 +3657,7 @@ void WorldEditor::makeSelectionPrefab( const char *filename ) else { //Only push the cleanup of the group if it's ONLY a SimGroup. - cleanup.push_back(grp); + cleanup.push_back( grp ); } } else diff --git a/Engine/source/gui/worldEditor/worldEditor.h b/Engine/source/gui/worldEditor/worldEditor.h index f1c231ee9..fb125daf5 100644 --- a/Engine/source/gui/worldEditor/worldEditor.h +++ b/Engine/source/gui/worldEditor/worldEditor.h @@ -164,7 +164,8 @@ class WorldEditor : public EditTSCtrl bool copySelection(Selection* sel); bool pasteSelection(bool dropSel=true); void dropSelection(Selection* sel); - void dropBelowSelection(Selection* sel, const Point3F & centroid, bool useBottomBounds=false); + void dropBelowSelection(Selection* sel, const Point3F & centroid, bool useBottomBounds = false); + void dropAtGizmo(Selection* sel, const Point3F & gizmoPos); void terrainSnapSelection(Selection* sel, U8 modifier, Point3F gizmoPos, bool forceStick=false); void softSnapSelection(Selection* sel, U8 modifier, Point3F gizmoPos); @@ -296,7 +297,8 @@ class WorldEditor : public EditTSCtrl DropAtScreenCenter, DropAtCentroid, DropToTerrain, - DropBelowSelection + DropBelowSelection, + DropAtGizmo }; // Snapping alignment mode @@ -349,6 +351,7 @@ class WorldEditor : public EditTSCtrl F32 mDropAtScreenCenterMax; bool mGridSnap; + bool mUseGroupCenter; bool mStickToGround; bool mStuckToGround; ///< Selection is stuck to the ground AlignmentType mTerrainSnapAlignment; ///< How does the stickied object align to the terrain diff --git a/Engine/source/gui/worldEditor/worldEditorSelection.cpp b/Engine/source/gui/worldEditor/worldEditorSelection.cpp index 72f406b98..57c2747d1 100644 --- a/Engine/source/gui/worldEditor/worldEditorSelection.cpp +++ b/Engine/source/gui/worldEditor/worldEditorSelection.cpp @@ -306,9 +306,9 @@ void WorldEditorSelection::offset( const Point3F& offset, F32 gridSnap ) if( gridSnap != 0.f ) { - wPos.x -= mFmod( wPos.x, gridSnap ); - wPos.y -= mFmod( wPos.y, gridSnap ); - wPos.z -= mFmod( wPos.z, gridSnap ); + wPos.x = _snapFloat(wPos.x, gridSnap); + wPos.y = _snapFloat(wPos.y, gridSnap); + wPos.z = _snapFloat(wPos.z, gridSnap); } mat.setColumn(3, wPos); @@ -318,6 +318,22 @@ void WorldEditorSelection::offset( const Point3F& offset, F32 gridSnap ) mCentroidValid = false; } +F32 WorldEditorSelection::_snapFloat(const F32 &val, const F32 &snap) const +{ + if (snap == 0.0f) + return val; + + F32 a = mFmod(val, snap); + + F32 temp = val; + + if (mFabs(a) > (snap / 2)) + val < 0.0f ? temp -= snap : temp += snap; + + return(temp - a); +} + + //----------------------------------------------------------------------------- void WorldEditorSelection::setPosition(const Point3F & pos) diff --git a/Engine/source/gui/worldEditor/worldEditorSelection.h b/Engine/source/gui/worldEditor/worldEditorSelection.h index a2ff89c42..9ff9eef9c 100644 --- a/Engine/source/gui/worldEditor/worldEditorSelection.h +++ b/Engine/source/gui/worldEditor/worldEditorSelection.h @@ -108,6 +108,7 @@ class WorldEditorSelection : public SimPersistSet // void offset(const Point3F& delta, F32 gridSnap = 0.f ); void setPosition(const Point3F & pos); + F32 _snapFloat(const F32 &val, const F32 &snap) const; void setCentroidPosition(bool useBoxCenter, const Point3F & pos); void orient(const MatrixF &, const Point3F &); diff --git a/Engine/source/materials/shaderData.cpp b/Engine/source/materials/shaderData.cpp index 829bbbbb1..29c379ed7 100644 --- a/Engine/source/materials/shaderData.cpp +++ b/Engine/source/materials/shaderData.cpp @@ -48,10 +48,10 @@ ConsoleDocClass( ShaderData, "// Used for the procedural clould system\n" "singleton ShaderData( CloudLayerShader )\n" "{\n" - " DXVertexShaderFile = \"shaders/common/cloudLayerV.hlsl\";\n" - " DXPixelShaderFile = \"shaders/common/cloudLayerP.hlsl\";\n" - " OGLVertexShaderFile = \"shaders/common/gl/cloudLayerV.glsl\";\n" - " OGLPixelShaderFile = \"shaders/common/gl/cloudLayerP.glsl\";\n" + " DXVertexShaderFile = $Core::CommonShaderPath @ \"/cloudLayerV.hlsl\";\n" + " DXPixelShaderFile = $Core::CommonShaderPath @ \"/cloudLayerP.hlsl\";\n" + " OGLVertexShaderFile = $Core::CommonShaderPath @ \"/gl/cloudLayerV.glsl\";\n" + " OGLPixelShaderFile = $Core::CommonShaderPath @ \"/gl/cloudLayerP.glsl\";\n" " pixVersion = 2.0;\n" "};\n" "@endtsexample\n\n" @@ -109,8 +109,8 @@ void ShaderData::initPersistFields() "@tsexample\n" "singleton ShaderData( FlashShader )\n" "{\n" - "DXVertexShaderFile = \"shaders/common/postFx/flashV.hlsl\";\n" - "DXPixelShaderFile = \"shaders/common/postFx/flashP.hlsl\";\n\n" + "DXVertexShaderFile = $shaderGen::cachePath @ \"/postFx/flashV.hlsl\";\n" + "DXPixelShaderFile = $shaderGen::cachePath @ \"/postFx/flashP.hlsl\";\n\n" " //Define setting the color of WHITE_COLOR.\n" "defines = \"WHITE_COLOR=float4(1.0,1.0,1.0,0.0)\";\n\n" "pixVersion = 2.0\n" diff --git a/Engine/source/math/mConsoleFunctions.cpp b/Engine/source/math/mConsoleFunctions.cpp index 08ebf72ba..651889539 100644 --- a/Engine/source/math/mConsoleFunctions.cpp +++ b/Engine/source/math/mConsoleFunctions.cpp @@ -373,3 +373,20 @@ DefineConsoleFunction( mGetAngleBetweenVectors, F32, (VectorF vecA, VectorF vecB { return MathUtils::getAngleBetweenVectors(vecA, vecB); } + +DefineConsoleFunction(mGetSignedAngleBetweenVectors, F32, (VectorF vecA, VectorF vecB, VectorF norm), (VectorF::Zero, VectorF::Zero, VectorF::Zero), + "Returns signed angle between two vectors, using a normal for orientation.\n" + "@param vecA First input vector." + "@param vecB Second input vector." + "@param norm Normal/Cross Product vector." + "@returns Angle between both vectors in radians." + "@ingroup Math") +{ + if (vecA.isZero() || vecB.isZero() || norm.isZero()) + { + Con::errorf("mGetSignedAngleBetweenVectors - Error! Requires all 3 vectors used to be non-zero!"); + return 0; + } + + return MathUtils::getSignedAngleBetweenVectors(vecA, vecB, norm); +} \ No newline at end of file diff --git a/Engine/source/math/mathUtils.cpp b/Engine/source/math/mathUtils.cpp index 48a4c6d99..19263e0a5 100644 --- a/Engine/source/math/mathUtils.cpp +++ b/Engine/source/math/mathUtils.cpp @@ -371,6 +371,18 @@ F32 getAngleBetweenVectors(VectorF vecA, VectorF vecB) return angle; } +F32 getSignedAngleBetweenVectors(VectorF vecA, VectorF vecB, VectorF norm) +{ + // angle in 0-180 + F32 angle = getAngleBetweenVectors(vecA, vecB); + F32 sign = mSign(mDot(norm, mCross(vecA, vecB))); + + // angle in -179-180 + F32 signed_angle = angle * sign; + + return signed_angle; +} + //----------------------------------------------------------------------------- void transformBoundingBox(const Box3F &sbox, const MatrixF &mat, const Point3F scale, Box3F &dbox) diff --git a/Engine/source/math/mathUtils.h b/Engine/source/math/mathUtils.h index cd4ac9a15..3787ebfeb 100644 --- a/Engine/source/math/mathUtils.h +++ b/Engine/source/math/mathUtils.h @@ -161,6 +161,11 @@ namespace MathUtils /// F32 getAngleBetweenVectors(VectorF vecA, VectorF vecB); + /// Returns the angle between two given vectors, utilizing a normal vector to discertain the angle's sign + /// + /// Angles is in RADIANS + /// + F32 getSignedAngleBetweenVectors(VectorF vecA, VectorF vecB, VectorF norm); /// Simple reflection equation - pass in a vector and a normal to reflect off of inline Point3F reflect( Point3F &inVec, Point3F &norm ) diff --git a/Engine/source/module/moduleDefinition.cpp b/Engine/source/module/moduleDefinition.cpp index 4fa82b856..523dffe02 100644 --- a/Engine/source/module/moduleDefinition.cpp +++ b/Engine/source/module/moduleDefinition.cpp @@ -51,6 +51,7 @@ mModuleId(StringTable->EmptyString()), mSynchronized( false ), mDeprecated( false ), mCriticalMerge( false ), + mOverrideExistingObjects(false), mModuleDescription( StringTable->EmptyString() ), mAuthor(StringTable->EmptyString()), mModuleGroup(StringTable->EmptyString()), @@ -91,6 +92,7 @@ void ModuleDefinition::initPersistFields() addProtectedField( "Synchronized", TypeBool, Offset(mSynchronized, ModuleDefinition), &setSynchronized, &defaultProtectedGetFn, &writeSynchronized, "Whether the module should be synchronized or not. Optional: If not specified then the module is not synchronized." ); addProtectedField( "Deprecated", TypeBool, Offset(mDeprecated, ModuleDefinition), &setDeprecated, &defaultProtectedGetFn, &writeDeprecated, "Whether the module is deprecated or not. Optional: If not specified then the module is not deprecated." ); addProtectedField( "CriticalMerge", TypeBool, Offset(mCriticalMerge, ModuleDefinition), &setDeprecated, &defaultProtectedGetFn, &writeCriticalMerge, "Whether the merging of a module prior to a restart is critical or not. Optional: If not specified then the module is not merge critical." ); + addProtectedField( "OverrideExistingObjects", TypeBool, Offset(mOverrideExistingObjects, ModuleDefinition), &setOverrideExistingObjects, &defaultProtectedGetFn, &writeOverrideExistingObjects, "Controls if when this module is loaded and the create function is executed, it will replace existing objects that share names or not."); addProtectedField( "Description", TypeString, Offset(mModuleDescription, ModuleDefinition), &setModuleDescription, &defaultProtectedGetFn, &writeModuleDescription, "The description typically used for debugging purposes but can be used for anything." ); addProtectedField( "Author", TypeString, Offset(mAuthor, ModuleDefinition), &setAuthor, &defaultProtectedGetFn, &writeAuthor, "The author of the module." ); addProtectedField( "Group", TypeString, Offset(mModuleGroup, ModuleDefinition), &setModuleGroup, &defaultProtectedGetFn, "The module group used typically when loading modules as a group." ); diff --git a/Engine/source/module/moduleDefinition.h b/Engine/source/module/moduleDefinition.h index c1c76d793..2ebb3f99a 100644 --- a/Engine/source/module/moduleDefinition.h +++ b/Engine/source/module/moduleDefinition.h @@ -89,6 +89,7 @@ private: bool mSynchronized; bool mDeprecated; bool mCriticalMerge; + bool mOverrideExistingObjects; StringTableEntry mModuleDescription; StringTableEntry mAuthor;; StringTableEntry mModuleGroup; @@ -141,6 +142,8 @@ public: inline bool getDeprecated( void ) const { return mDeprecated; } inline void setCriticalMerge( const bool mergeCritical ) { if ( checkUnlocked() ) { mCriticalMerge = mergeCritical; } } inline bool getCriticalMerge( void ) const { return mCriticalMerge; } + inline void setOverrideExistingObjects(const bool overrideExistingObj) { if (checkUnlocked()) { mOverrideExistingObjects = overrideExistingObj; } } + inline bool getOverrideExistingObjects(void) const { return mOverrideExistingObjects; } inline void setModuleDescription( const char* pModuleDescription ) { if ( checkUnlocked() ) { mModuleDescription = StringTable->insert(pModuleDescription); } } inline StringTableEntry getModuleDescription( void ) const { return mModuleDescription; } inline void setAuthor( const char* pAuthor ) { if ( checkUnlocked() ) { mAuthor = StringTable->insert(pAuthor); } } @@ -206,6 +209,8 @@ protected: static bool setDeprecated(void* obj, const char* index, const char* data) { static_cast(obj)->setDeprecated(dAtob(data)); return false; } static bool writeDeprecated( void* obj, StringTableEntry pFieldName ) { return static_cast(obj)->getDeprecated() == true; } static bool writeCriticalMerge( void* obj, StringTableEntry pFieldName ){ return static_cast(obj)->getCriticalMerge() == true; } + static bool setOverrideExistingObjects(void* obj, const char* index, const char* data) { static_cast(obj)->setOverrideExistingObjects(dAtob(data)); return false; } + static bool writeOverrideExistingObjects(void* obj, StringTableEntry pFieldName) { return static_cast(obj)->getOverrideExistingObjects() == true; } static bool setModuleDescription(void* obj, const char* index, const char* data) { static_cast(obj)->setModuleDescription(data); return false; } static bool writeModuleDescription( void* obj, StringTableEntry pFieldName ) { return static_cast(obj)->getModuleDescription() != StringTable->EmptyString(); } static bool setAuthor(void* obj, const char* index, const char* data) { static_cast(obj)->setAuthor(data); return false; } diff --git a/Engine/source/module/moduleManager.cpp b/Engine/source/module/moduleManager.cpp index 49cfeac9e..67a89e3e1 100644 --- a/Engine/source/module/moduleManager.cpp +++ b/Engine/source/module/moduleManager.cpp @@ -429,7 +429,22 @@ bool ModuleManager::loadModuleGroup( const char* pModuleGroup ) if ( pScopeSet->isMethod( pLoadReadyModuleDefinition->getCreateFunction() ) ) { // Yes, so call the create method. - Con::executef( pScopeSet, pLoadReadyModuleDefinition->getCreateFunction() ); + + //But first, check if we're overriding objects, and if so, set our console var to make that happen while we exec our create function + if (pLoadReadyModuleDefinition->getOverrideExistingObjects()) + { + String redefineBehaviorPrev = Con::getVariable("$Con::redefineBehavior"); + Con::setVariable("$Con::redefineBehavior", "replaceExisting"); + Con::executef(pScopeSet, pLoadReadyModuleDefinition->getCreateFunction()); + + //And now that we've executed, switch back to the prior behavior + Con::setVariable("$Con::redefineBehavior", redefineBehaviorPrev.c_str()); + } + else + { + //Nothing to do, just run the create function + Con::executef(pScopeSet, pLoadReadyModuleDefinition->getCreateFunction()); + } } } else diff --git a/Engine/source/navigation/navMesh.cpp b/Engine/source/navigation/navMesh.cpp index 7dbb40d6d..c9bbb1fa4 100644 --- a/Engine/source/navigation/navMesh.cpp +++ b/Engine/source/navigation/navMesh.cpp @@ -739,6 +739,7 @@ Box3F NavMesh::getTileBox(U32 id) void NavMesh::updateTiles(bool dirty) { + PROFILE_SCOPE(NavMesh_updateTiles); if(!isProperlyAdded()) return; @@ -793,6 +794,7 @@ void NavMesh::processTick(const Move *move) void NavMesh::buildNextTile() { + PROFILE_SCOPE(NavMesh_buildNextTile); if(!mDirtyTiles.empty()) { // Pop a single dirty tile and process it. @@ -1099,6 +1101,7 @@ unsigned char *NavMesh::buildTileData(const Tile &tile, TileData &data, U32 &dat /// this NavMesh object. void NavMesh::buildTiles(const Box3F &box) { + PROFILE_SCOPE(NavMesh_buildTiles); // Make sure we've already built or loaded. if(!nm) return; @@ -1124,6 +1127,7 @@ DefineEngineMethod(NavMesh, buildTiles, void, (Box3F box),, void NavMesh::buildTile(const U32 &tile) { + PROFILE_SCOPE(NavMesh_buildTile); if(tile < mTiles.size()) { mDirtyTiles.push_back_unique(tile); diff --git a/Engine/source/navigation/navPath.cpp b/Engine/source/navigation/navPath.cpp index 9409cc193..a66afe136 100644 --- a/Engine/source/navigation/navPath.cpp +++ b/Engine/source/navigation/navPath.cpp @@ -369,6 +369,7 @@ void NavPath::resize() bool NavPath::plan() { + PROFILE_SCOPE(NavPath_plan); // Initialise filter. mFilter.setIncludeFlags(mLinkTypes.getFlags()); @@ -430,15 +431,15 @@ bool NavPath::visitNext() if(dtStatusFailed(mQuery->findNearestPoly(from, extents, &mFilter, &startRef, NULL)) || !startRef) { - Con::errorf("No NavMesh polygon near visit point (%g, %g, %g) of NavPath %s", - start.x, start.y, start.z, getIdString()); + //Con::errorf("No NavMesh polygon near visit point (%g, %g, %g) of NavPath %s", + //start.x, start.y, start.z, getIdString()); return false; } if(dtStatusFailed(mQuery->findNearestPoly(to, extents, &mFilter, &endRef, NULL)) || !endRef) { - Con::errorf("No NavMesh polygon near visit point (%g, %g, %g) of NavPath %s", - end.x, end.y, end.z, getIdString()); + //Con::errorf("No NavMesh polygon near visit point (%g, %g, %g) of NavPath %s", + //end.x, end.y, end.z, getIdString()); return false; } @@ -452,6 +453,7 @@ bool NavPath::visitNext() bool NavPath::update() { + PROFILE_SCOPE(NavPath_update); if(dtStatusInProgress(mStatus)) mStatus = mQuery->updateSlicedFindPath(mMaxIterations, NULL); if(dtStatusSucceed(mStatus)) @@ -527,6 +529,7 @@ bool NavPath::finalise() void NavPath::processTick(const Move *move) { + PROFILE_SCOPE(NavPath_processTick); if(!mMesh) if(Sim::findObject(mMeshName.c_str(), mMesh)) plan(); diff --git a/Engine/source/platform/platformNet.cpp b/Engine/source/platform/platformNet.cpp index a96a0d06b..6e9f8e7c6 100644 --- a/Engine/source/platform/platformNet.cpp +++ b/Engine/source/platform/platformNet.cpp @@ -492,10 +492,10 @@ template T ReservedSocketList::resolve(NetSocket socketToResolve) return entry.used ? entry.value : -1; } -static ConnectionNotifyEvent* smConnectionNotify = NULL; -static ConnectionAcceptedEvent* smConnectionAccept = NULL; -static ConnectionReceiveEvent* smConnectionReceive = NULL; -static PacketReceiveEvent* smPacketReceive = NULL; +ConnectionNotifyEvent* Net::smConnectionNotify = NULL; +ConnectionAcceptedEvent* Net::smConnectionAccept = NULL; +ConnectionReceiveEvent* Net::smConnectionReceive = NULL; +PacketReceiveEvent* Net::smPacketReceive = NULL; ConnectionNotifyEvent& Net::getConnectionNotifyEvent() { @@ -809,6 +809,7 @@ NetSocket Net::openConnectTo(const char *addressString) error = Net::WrongProtocolType; } + // Open socket if (error == NoError || error == NeedHostLookup) { handleFd = openSocket(); diff --git a/Engine/source/platform/platformNet.h b/Engine/source/platform/platformNet.h index 50a2c1d4c..c07c2d9f6 100644 --- a/Engine/source/platform/platformNet.h +++ b/Engine/source/platform/platformNet.h @@ -214,6 +214,12 @@ struct Net static bool smMulticastEnabled; static bool smIpv4Enabled; static bool smIpv6Enabled; + + static ConnectionNotifyEvent* smConnectionNotify; + static ConnectionAcceptedEvent* smConnectionAccept; + static ConnectionReceiveEvent* smConnectionReceive; + static PacketReceiveEvent* smPacketReceive; + static bool init(); static void shutdown(); diff --git a/Engine/source/platform/profiler.cpp b/Engine/source/platform/profiler.cpp index 1083b6d08..444679284 100644 --- a/Engine/source/platform/profiler.cpp +++ b/Engine/source/platform/profiler.cpp @@ -54,9 +54,9 @@ Profiler *gProfiler = NULL; Vector gProfilerNodeStack; #define TORQUE_PROFILE_AT_ENGINE_START true #define PROFILER_DEBUG_PUSH_NODE( nodename ) \ -gProfilerNodeStack.push_back( nodename ); + gProfilerNodeStack.push_back( nodename ); #define PROFILER_DEBUG_POP_NODE() \ -gProfilerNodeStack.pop_back(); + gProfilerNodeStack.pop_back(); #else #define TORQUE_PROFILE_AT_ENGINE_START false #define PROFILER_DEBUG_PUSH_NODE( nodename ) ; @@ -68,7 +68,7 @@ gProfilerNodeStack.pop_back(); void startHighResolutionTimer(U32 time[2]) { //time[0] = Platform::getRealMilliseconds(); - + __asm { push eax @@ -89,7 +89,7 @@ U32 endHighResolutionTimer(U32 time[2]) U32 ticks; //ticks = Platform::getRealMilliseconds() - time[0]; //return ticks; - + __asm { push eax @@ -176,7 +176,7 @@ Profiler::Profiler() { mMaxStackDepth = MaxStackDepth; mCurrentHash = 0; - + mCurrentProfilerData = (ProfilerData *) malloc(sizeof(ProfilerData)); mCurrentProfilerData->mRoot = NULL; mCurrentProfilerData->mNextForRoot = NULL; @@ -195,12 +195,12 @@ Profiler::Profiler() mCurrentProfilerData->mPath = ""; #endif mRootProfilerData = mCurrentProfilerData; - + for(U32 i = 0; i < ProfilerData::HashTableSize; i++) mCurrentProfilerData->mChildHash[i] = 0; - + mProfileList = NULL; - + mEnabled = TORQUE_PROFILE_AT_ENGINE_START; mNextEnable = TORQUE_PROFILE_AT_ENGINE_START; mStackDepth = 0; @@ -222,20 +222,20 @@ void Profiler::reset() mEnabled = false; // in case we're in a profiler call. ProfilerData * head = mProfileList; ProfilerData * curr = head; - + while ( curr ) { head = curr->mNextProfilerData; free( curr ); - + if ( head ) curr = head; else curr = NULL; } - + mProfileList = NULL; - + for(ProfilerRootData *walk = ProfilerRootData::sRootList; walk; walk = walk->mNextRoot) { walk->mFirstProfilerData = 0; @@ -262,7 +262,7 @@ ProfilerRootData::ProfilerRootData(const char *name) for(ProfilerRootData *walk = sRootList; walk; walk = walk->mNextRoot) if(!dStrcmp(walk->mName, name)) AssertFatal( false, avar( "Duplicate profile name: %s", name ) ); - + mName = name; mNameHash = _StringTable::hashString(name); mNextRoot = sRootList; @@ -306,7 +306,7 @@ const char * Profiler::getProfilePath() if( !ThreadManager::isMainThread() ) return "[non-main thread]"; #endif - + return (mEnabled && mCurrentProfilerData) ? mCurrentProfilerData->mPath : "na"; } #endif @@ -318,14 +318,14 @@ const char * Profiler::constructProfilePath(ProfilerData * pd) { const bool saveEnable = gProfiler->mEnabled; gProfiler->mEnabled = false; - + const char * connector = " -> "; U32 len = dStrlen(pd->mParent->mPath); if (!len) connector = ""; len += dStrlen(connector); len += dStrlen(pd->mRoot->mName); - + U32 mark = FrameAllocator::getWaterMark(); char * buf = (char*)FrameAllocator::alloc(len+1); dStrcpy(buf,pd->mParent->mPath); @@ -348,25 +348,25 @@ void Profiler::hashPush(ProfilerRootData *root) if( !ThreadManager::isMainThread() ) return; #endif - + mStackDepth++; PROFILER_DEBUG_PUSH_NODE(root->mName); AssertFatal(mStackDepth <= mMaxStackDepth, "Stack overflow in profiler. You may have mismatched PROFILE_START and PROFILE_ENDs"); if(!mEnabled) return; - + ProfilerData *nextProfiler = NULL; if(!root->mEnabled || mCurrentProfilerData->mRoot == root) { mCurrentProfilerData->mSubDepth++; return; } - + if(mCurrentProfilerData->mLastSeenProfiler && mCurrentProfilerData->mLastSeenProfiler->mRoot == root) nextProfiler = mCurrentProfilerData->mLastSeenProfiler; - + if(!nextProfiler) { // first see if it's in the hash table... @@ -383,17 +383,17 @@ void Profiler::hashPush(ProfilerRootData *root) nextProfiler = (ProfilerData *) malloc(sizeof(ProfilerData)); for(U32 i = 0; i < ProfilerData::HashTableSize; i++) nextProfiler->mChildHash[i] = 0; - + nextProfiler->mRoot = root; nextProfiler->mNextForRoot = root->mFirstProfilerData; root->mFirstProfilerData = nextProfiler; - + nextProfiler->mNextProfilerData = mProfileList; mProfileList = nextProfiler; - + nextProfiler->mNextHash = mCurrentProfilerData->mChildHash[index]; mCurrentProfilerData->mChildHash[index] = nextProfiler; - + nextProfiler->mParent = mCurrentProfilerData; nextProfiler->mNextSibling = mCurrentProfilerData->mFirstChild; mCurrentProfilerData->mFirstChild = nextProfiler; @@ -443,7 +443,7 @@ void Profiler::hashPop(ProfilerRootData *expected) if( !ThreadManager::isMainThread() ) return; #endif - + mStackDepth--; PROFILER_DEBUG_POP_NODE(); AssertFatal(mStackDepth >= 0, "Stack underflow in profiler. You may have mismatched PROFILE_START and PROFILE_ENDs"); @@ -459,15 +459,15 @@ void Profiler::hashPop(ProfilerRootData *expected) { AssertISV(expected == mCurrentProfilerData->mRoot, "Profiler::hashPop - didn't get expected ProfilerRoot!"); } - + F64 fElapsed = endHighResolutionTimer(mCurrentProfilerData->mStartTime); - + mCurrentProfilerData->mTotalTime += fElapsed; mCurrentProfilerData->mParent->mSubTime += fElapsed; // mark it in the parent as well... mCurrentProfilerData->mRoot->mTotalTime += fElapsed; if(mCurrentProfilerData->mParent->mRoot) mCurrentProfilerData->mParent->mRoot->mSubTime += fElapsed; // mark it in the parent as well... - + mCurrentProfilerData = mCurrentProfilerData->mParent; } if(mStackDepth == 0) @@ -480,13 +480,13 @@ void Profiler::hashPop(ProfilerRootData *expected) } if(!mEnabled && mNextEnable) startHighResolutionTimer(mCurrentProfilerData->mStartTime); - + #if defined(TORQUE_OS_WIN) // The high performance counters under win32 are unreliable when running on multiple // processors. When the profiler is enabled, we restrict Torque to a single processor. if(mNextEnable != mEnabled) { - + if(mNextEnable) { Con::warnf("Warning: forcing the Torque profiler thread to run only on cpu 1."); @@ -502,7 +502,7 @@ void Profiler::hashPop(ProfilerRootData *expected) } } #endif - + mEnabled = mNextEnable; } } @@ -520,15 +520,15 @@ static void profilerDataDumpRecurse(ProfilerData *data, char *buffer, U32 buffer { // dump out this one: Con::printf("%7.3f %7.3f %8d %s%s", - 100 * data->mTotalTime / totalTime, - 100 * (data->mTotalTime - data->mSubTime) / totalTime, - data->mInvokeCount, - buffer, - data->mRoot ? data->mRoot->mName : "ROOT" ); + 100 * data->mTotalTime / totalTime, + 100 * (data->mTotalTime - data->mSubTime) / totalTime, + data->mInvokeCount, + buffer, + data->mRoot ? data->mRoot->mName : "ROOT" ); data->mTotalTime = 0; data->mSubTime = 0; data->mInvokeCount = 0; - + buffer[bufferLen] = ' '; buffer[bufferLen+1] = ' '; buffer[bufferLen+2] = 0; @@ -558,16 +558,16 @@ static void profilerDataDumpRecurseFile(ProfilerData *data, char *buffer, U32 bu { char pbuffer[256]; dSprintf(pbuffer, 255, "%7.3f %7.3f %8d %s%s\n", - 100 * data->mTotalTime / totalTime, - 100 * (data->mTotalTime - data->mSubTime) / totalTime, - data->mInvokeCount, - buffer, - data->mRoot ? data->mRoot->mName : "ROOT" ); + 100 * data->mTotalTime / totalTime, + 100 * (data->mTotalTime - data->mSubTime) / totalTime, + data->mInvokeCount, + buffer, + data->mRoot ? data->mRoot->mName : "ROOT" ); fws.write(dStrlen(pbuffer), pbuffer); data->mTotalTime = 0; data->mSubTime = 0; data->mInvokeCount = 0; - + buffer[bufferLen] = ' '; buffer[bufferLen+1] = ' '; buffer[bufferLen+2] = 0; @@ -599,7 +599,7 @@ void Profiler::dump() mEnabled = false; mStackDepth++; // may have some profiled calls... gotta turn em off. - + Vector rootVector; F64 totalTime = 0; for(ProfilerRootData *walk = ProfilerRootData::sRootList; walk; walk = walk->mNextRoot) @@ -608,8 +608,8 @@ void Profiler::dump() rootVector.push_back(walk); } dQsort((void *) &rootVector[0], rootVector.size(), sizeof(ProfilerRootData *), rootDataCompare); - - + + if (mDumpToConsole == true) { Con::printf("Profiler Data Dump:"); @@ -618,10 +618,10 @@ void Profiler::dump() for(U32 i = 0; i < rootVector.size(); i++) { Con::printf("%7.3f %7.3f %8d %s", - 100 * (rootVector[i]->mTotalTime - rootVector[i]->mSubTime) / totalTime, - 100 * rootVector[i]->mTotalTime / totalTime, - rootVector[i]->mTotalInvokeCount, - rootVector[i]->mName); + 100 * (rootVector[i]->mTotalTime - rootVector[i]->mSubTime) / totalTime, + 100 * rootVector[i]->mTotalTime / totalTime, + rootVector[i]->mTotalInvokeCount, + rootVector[i]->mName); rootVector[i]->mTotalInvokeCount = 0; rootVector[i]->mTotalTime = 0; rootVector[i]->mSubTime = 0; @@ -629,9 +629,9 @@ void Profiler::dump() Con::printf(""); Con::printf("Ordered by stack trace total time -"); Con::printf("%% Time %% NSTime Invoke # Name"); - + mCurrentProfilerData->mTotalTime = endHighResolutionTimer(mCurrentProfilerData->mStartTime); - + char depthBuffer[MaxStackDepth * 2 + 1]; depthBuffer[0] = 0; profilerDataDumpRecurse(mCurrentProfilerData, depthBuffer, 0, totalTime); @@ -643,44 +643,44 @@ void Profiler::dump() FileStream fws; bool success = fws.open(mDumpFileName, Torque::FS::File::Write); AssertFatal(success, "Cannot write profile dump to specified file!"); - char buffer[1024]; - - dStrcpy(buffer, "Profiler Data Dump:\n"); - fws.write(dStrlen(buffer), buffer); - dStrcpy(buffer, "Ordered by non-sub total time -\n"); - fws.write(dStrlen(buffer), buffer); - dStrcpy(buffer, "%%NSTime %% Time Invoke # Name\n"); - fws.write(dStrlen(buffer), buffer); - - for(U32 i = 0; i < rootVector.size(); i++) - { - dSprintf(buffer, 1023, "%7.3f %7.3f %8d %s\n", - 100 * (rootVector[i]->mTotalTime - rootVector[i]->mSubTime) / totalTime, - 100 * rootVector[i]->mTotalTime / totalTime, - rootVector[i]->mTotalInvokeCount, - rootVector[i]->mName); + char buffer[1024]; + + dStrcpy(buffer, "Profiler Data Dump:\n"); fws.write(dStrlen(buffer), buffer); - - rootVector[i]->mTotalInvokeCount = 0; - rootVector[i]->mTotalTime = 0; - rootVector[i]->mSubTime = 0; - } - dStrcpy(buffer, "\nOrdered by non-sub total time -\n"); - fws.write(dStrlen(buffer), buffer); - dStrcpy(buffer, "%%NSTime %% Time Invoke # Name\n"); - fws.write(dStrlen(buffer), buffer); - + dStrcpy(buffer, "Ordered by non-sub total time -\n"); + fws.write(dStrlen(buffer), buffer); + dStrcpy(buffer, "%%NSTime %% Time Invoke # Name\n"); + fws.write(dStrlen(buffer), buffer); + + for(U32 i = 0; i < rootVector.size(); i++) + { + dSprintf(buffer, 1023, "%7.3f %7.3f %8d %s\n", + 100 * (rootVector[i]->mTotalTime - rootVector[i]->mSubTime) / totalTime, + 100 * rootVector[i]->mTotalTime / totalTime, + rootVector[i]->mTotalInvokeCount, + rootVector[i]->mName); + fws.write(dStrlen(buffer), buffer); + + rootVector[i]->mTotalInvokeCount = 0; + rootVector[i]->mTotalTime = 0; + rootVector[i]->mSubTime = 0; + } + dStrcpy(buffer, "\nOrdered by non-sub total time -\n"); + fws.write(dStrlen(buffer), buffer); + dStrcpy(buffer, "%%NSTime %% Time Invoke # Name\n"); + fws.write(dStrlen(buffer), buffer); + mCurrentProfilerData->mTotalTime = endHighResolutionTimer(mCurrentProfilerData->mStartTime); - + char depthBuffer[MaxStackDepth * 2 + 1]; depthBuffer[0] = 0; profilerDataDumpRecurseFile(mCurrentProfilerData, depthBuffer, 0, totalTime, fws); mEnabled = enableSave; mStackDepth--; - + fws.close(); } - + mDumpToConsole = false; mDumpToFile = false; mDumpFileName[0] = '\0'; @@ -716,12 +716,12 @@ void Profiler::enableMarker(const char *marker, bool enable) //----------------------------------------------------------------------------- DefineEngineFunction( profilerMarkerEnable, void, ( const char* markerName, bool enable ), ( true ), - "@brief Enable or disable a specific profile.\n\n" - "@param enable Optional paramater to enable or disable the profile.\n" - "@param markerName Name of a specific marker to enable or disable.\n" - "@note Calling this function will first call profilerReset(), clearing all data from profiler. " - "All profile markers are enabled by default.\n\n" - "@ingroup Debugging") + "@brief Enable or disable a specific profile.\n\n" + "@param enable Optional paramater to enable or disable the profile.\n" + "@param markerName Name of a specific marker to enable or disable.\n" + "@note Calling this function will first call profilerReset(), clearing all data from profiler. " + "All profile markers are enabled by default.\n\n" + "@ingroup Debugging") { if( gProfiler ) gProfiler->enableMarker( markerName, enable ); @@ -730,47 +730,47 @@ DefineEngineFunction( profilerMarkerEnable, void, ( const char* markerName, bool //----------------------------------------------------------------------------- DefineEngineFunction( profilerEnable, void, ( bool enable ),, - "@brief Enables or disables the profiler.\n\n" - "Data is only gathered while the profiler is enabled.\n\n" - "@note Profiler is not available in shipping builds.\n" - "T3D has predefined profiling areas surrounded by markers, " - "but you may need to define additional markers (in C++) around areas you wish to profile," - " by using the PROFILE_START( markerName ); and PROFILE_END(); macros.\n\n" - "@ingroup Debugging\n" ) + "@brief Enables or disables the profiler.\n\n" + "Data is only gathered while the profiler is enabled.\n\n" + "@note Profiler is not available in shipping builds.\n" + "T3D has predefined profiling areas surrounded by markers, " + "but you may need to define additional markers (in C++) around areas you wish to profile," + " by using the PROFILE_START( markerName ); and PROFILE_END(); macros.\n\n" + "@ingroup Debugging\n" ) { if(gProfiler) gProfiler->enable(enable); } DefineEngineFunction(profilerDump, void, (),, - "@brief Dumps current profiling stats to the console window.\n\n" - "@note Markers disabled with profilerMarkerEnable() will be skipped over. " - "If the profiler is currently running, it will be disabled.\n" - "@ingroup Debugging") + "@brief Dumps current profiling stats to the console window.\n\n" + "@note Markers disabled with profilerMarkerEnable() will be skipped over. " + "If the profiler is currently running, it will be disabled.\n" + "@ingroup Debugging") { if(gProfiler) gProfiler->dumpToConsole(); } DefineEngineFunction( profilerDumpToFile, void, ( const char* fileName ),, - "@brief Dumps current profiling stats to a file.\n\n" - "@note If the profiler is currently running, it will be disabled.\n" - "@param fileName Name and path of file to save profiling stats to. Must use forward slashes (/). " - "Will attempt to create the file if it does not already exist.\n" - "@tsexample\n" - "profilerDumpToFile( \"C:/Torque/log1.txt\" );\n" - "@endtsexample\n\n" - "@ingroup Debugging" ) + "@brief Dumps current profiling stats to a file.\n\n" + "@note If the profiler is currently running, it will be disabled.\n" + "@param fileName Name and path of file to save profiling stats to. Must use forward slashes (/). " + "Will attempt to create the file if it does not already exist.\n" + "@tsexample\n" + "profilerDumpToFile( \"C:/Torque/log1.txt\" );\n" + "@endtsexample\n\n" + "@ingroup Debugging" ) { if(gProfiler) gProfiler->dumpToFile(fileName); } DefineEngineFunction( profilerReset, void, (),, - "@brief Resets the profiler, clearing it of all its data.\n\n" - "If the profiler is currently running, it will first be disabled. " - "All markers will retain their current enabled/disabled status.\n\n" - "@ingroup Debugging" ) + "@brief Resets the profiler, clearing it of all its data.\n\n" + "If the profiler is currently running, it will first be disabled. " + "All markers will retain their current enabled/disabled status.\n\n" + "@ingroup Debugging" ) { if(gProfiler) gProfiler->reset(); diff --git a/Engine/source/platform/test/netTest.cpp b/Engine/source/platform/test/netTest.cpp index 889d150f2..741e89ce0 100644 --- a/Engine/source/platform/test/netTest.cpp +++ b/Engine/source/platform/test/netTest.cpp @@ -76,8 +76,8 @@ TEST(Net, TCPRequest) handler.mDataReceived = 0; // Hook into the signals. - Net::smConnectionNotify .notify(&handler, &TcpHandle::notify); - Net::smConnectionReceive.notify(&handler, &TcpHandle::receive); + Net::smConnectionNotify ->notify(&handler, &TcpHandle::notify); + Net::smConnectionReceive->notify(&handler, &TcpHandle::receive); // Open a TCP connection to garagegames.com handler.mSocket = Net::openConnectTo("72.246.107.193:80"); @@ -85,8 +85,8 @@ TEST(Net, TCPRequest) while(Process::processEvents() && (Platform::getRealMilliseconds() < limit) ) {} // Unhook from the signals. - Net::smConnectionNotify .remove(&handler, &TcpHandle::notify); - Net::smConnectionReceive.remove(&handler, &TcpHandle::receive); + Net::smConnectionNotify ->remove(&handler, &TcpHandle::notify); + Net::smConnectionReceive->remove(&handler, &TcpHandle::receive); EXPECT_GT(handler.mDataReceived, 0) << "Didn't get any data back!"; @@ -139,8 +139,8 @@ struct JournalHandle mDataReceived = 0; // Hook into the signals. - Net::smConnectionNotify .notify(this, &JournalHandle::notify); - Net::smConnectionReceive.notify(this, &JournalHandle::receive); + Net::smConnectionNotify ->notify(this, &JournalHandle::notify); + Net::smConnectionReceive->notify(this, &JournalHandle::receive); // Open a TCP connection to garagegames.com mSocket = Net::openConnectTo("72.246.107.193:80"); @@ -149,8 +149,8 @@ struct JournalHandle while(Process::processEvents()) {} // Unhook from the signals. - Net::smConnectionNotify .remove(this, &JournalHandle::notify); - Net::smConnectionReceive.remove(this, &JournalHandle::receive); + Net::smConnectionNotify ->remove(this, &JournalHandle::notify); + Net::smConnectionReceive->remove(this, &JournalHandle::receive); EXPECT_GT(mDataReceived, 0) << "Didn't get any data back!"; diff --git a/Engine/source/postFx/postEffect.cpp b/Engine/source/postFx/postEffect.cpp index 7e4a6fed8..65cb69d20 100644 --- a/Engine/source/postFx/postEffect.cpp +++ b/Engine/source/postFx/postEffect.cpp @@ -411,10 +411,6 @@ bool PostEffect::onAdd() texFilename[0] == '#' ) continue; - // If '/', then path is specified, open normally - if ( texFilename[0] != '/' ) - texFilename = scriptPath.getFullPath() + '/' + texFilename; - // Try to load the texture. bool success = mTextures[i].set( texFilename, &PostFxTextureProfile, avar( "%s() - (line %d)", __FUNCTION__, __LINE__ ) ); if (!success) diff --git a/Engine/source/shaderGen/GLSL/bumpGLSL.cpp b/Engine/source/shaderGen/GLSL/bumpGLSL.cpp index bc11a156f..020107b57 100644 --- a/Engine/source/shaderGen/GLSL/bumpGLSL.cpp +++ b/Engine/source/shaderGen/GLSL/bumpGLSL.cpp @@ -236,7 +236,7 @@ void BumpFeatGLSL::setTexData( Material::StageData &stageDat, ParallaxFeatGLSL::ParallaxFeatGLSL() - : mIncludeDep( "shaders/common/gl/torque.glsl" ) + : mIncludeDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/gl/torque.glsl" )) { addDependency( &mIncludeDep ); } diff --git a/Engine/source/shaderGen/GLSL/pixSpecularGLSL.cpp b/Engine/source/shaderGen/GLSL/pixSpecularGLSL.cpp index 2ecb56df6..192641775 100644 --- a/Engine/source/shaderGen/GLSL/pixSpecularGLSL.cpp +++ b/Engine/source/shaderGen/GLSL/pixSpecularGLSL.cpp @@ -30,7 +30,7 @@ PixelSpecularGLSL::PixelSpecularGLSL() - : mDep( "shaders/common/gl/lighting.glsl" ) + : mDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/gl/lighting.glsl" )) { addDependency( &mDep ); } diff --git a/Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp b/Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp index cabedc14c..0a7ec2159 100644 --- a/Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp +++ b/Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp @@ -830,7 +830,7 @@ Var* ShaderFeatureGLSL::addOutDetailTexCoord( Vector &compon //**************************************************************************** DiffuseMapFeatGLSL::DiffuseMapFeatGLSL() -: mTorqueDep("shaders/common/gl/torque.glsl") +: mTorqueDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/gl/torque.glsl")) { addDependency(&mTorqueDep); } @@ -1975,7 +1975,7 @@ void ReflectCubeFeatGLSL::setTexData( Material::StageData &stageDat, //**************************************************************************** RTLightingFeatGLSL::RTLightingFeatGLSL() - : mDep( "shaders/common/gl/lighting.glsl" ) + : mDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/gl/lighting.glsl" )) { addDependency( &mDep ); } @@ -2190,7 +2190,7 @@ ShaderFeature::Resources RTLightingFeatGLSL::getResources( const MaterialFeature //**************************************************************************** FogFeatGLSL::FogFeatGLSL() - : mFogDep( "shaders/common/gl/torque.glsl" ) + : mFogDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/gl/torque.glsl" )) { addDependency( &mFogDep ); } @@ -2321,7 +2321,7 @@ ShaderFeature::Resources FogFeatGLSL::getResources( const MaterialFeatureData &f //**************************************************************************** VisibilityFeatGLSL::VisibilityFeatGLSL() - : mTorqueDep( "shaders/common/gl/torque.glsl" ) + : mTorqueDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/gl/torque.glsl" )) { addDependency( &mTorqueDep ); } @@ -2487,7 +2487,7 @@ void RenderTargetZeroGLSL::processPix( Vector &componentList, //**************************************************************************** HDROutGLSL::HDROutGLSL() - : mTorqueDep( "shaders/common/gl/torque.glsl" ) + : mTorqueDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/gl/torque.glsl" )) { addDependency( &mTorqueDep ); } @@ -2508,7 +2508,7 @@ void HDROutGLSL::processPix( Vector &componentList, #include "T3D/fx/groundCover.h" FoliageFeatureGLSL::FoliageFeatureGLSL() -: mDep( "shaders/common/gl/foliage.glsl" ) +: mDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/gl/foliage.glsl" )) { addDependency( &mDep ); } @@ -2654,7 +2654,7 @@ void ParticleNormalFeatureGLSL::processVert(Vector &componentL //**************************************************************************** ImposterVertFeatureGLSL::ImposterVertFeatureGLSL() - : mDep( "shaders/common/gl/imposter.glsl" ) + : mDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/gl/imposter.glsl" )) { addDependency( &mDep ); } diff --git a/Engine/source/shaderGen/GLSL/shaderGenGLSL.cpp b/Engine/source/shaderGen/GLSL/shaderGenGLSL.cpp index 6e068c7cf..d5556cb1f 100644 --- a/Engine/source/shaderGen/GLSL/shaderGenGLSL.cpp +++ b/Engine/source/shaderGen/GLSL/shaderGenGLSL.cpp @@ -37,8 +37,8 @@ void ShaderGenPrinterGLSL::printShaderHeader( Stream& stream ) stream.write( dStrlen(header1), header1 ); // Cheap HLSL compatibility. - const char* header3 = "#include \"shaders/common/gl/hlslCompat.glsl\"\r\n"; - stream.write( dStrlen(header3), header3 ); + String header3 = String("#include \"") + String(Con::getVariable("$Core::CommonShaderPath")) + String("/gl/hlslCompat.glsl\"\r\n"); + stream.write(dStrlen(header3), header3.c_str()); const char* header4 = "\r\n"; stream.write( dStrlen(header4), header4 ); diff --git a/Engine/source/shaderGen/HLSL/bumpHLSL.cpp b/Engine/source/shaderGen/HLSL/bumpHLSL.cpp index f6beb4cfc..79ea27714 100644 --- a/Engine/source/shaderGen/HLSL/bumpHLSL.cpp +++ b/Engine/source/shaderGen/HLSL/bumpHLSL.cpp @@ -268,7 +268,7 @@ void BumpFeatHLSL::setTexData( Material::StageData &stageDat, ParallaxFeatHLSL::ParallaxFeatHLSL() - : mIncludeDep( "shaders/common/torque.hlsl" ) + : mIncludeDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/torque.hlsl" )) { addDependency( &mIncludeDep ); } diff --git a/Engine/source/shaderGen/HLSL/pixSpecularHLSL.cpp b/Engine/source/shaderGen/HLSL/pixSpecularHLSL.cpp index b5a5a98b1..3a794a394 100644 --- a/Engine/source/shaderGen/HLSL/pixSpecularHLSL.cpp +++ b/Engine/source/shaderGen/HLSL/pixSpecularHLSL.cpp @@ -30,7 +30,7 @@ PixelSpecularHLSL::PixelSpecularHLSL() - : mDep( "shaders/common/lighting.hlsl" ) + : mDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/lighting.hlsl" )) { addDependency( &mDep ); } diff --git a/Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp b/Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp index 6e8a08347..8690ae610 100644 --- a/Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp +++ b/Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp @@ -853,7 +853,7 @@ Var* ShaderFeatureHLSL::addOutDetailTexCoord( Vector &compon //**************************************************************************** DiffuseMapFeatHLSL::DiffuseMapFeatHLSL() -: mTorqueDep("shaders/common/torque.hlsl") +: mTorqueDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/torque.hlsl")) { addDependency(&mTorqueDep); } @@ -2168,7 +2168,7 @@ void ReflectCubeFeatHLSL::setTexData( Material::StageData &stageDat, //**************************************************************************** RTLightingFeatHLSL::RTLightingFeatHLSL() - : mDep( "shaders/common/lighting.hlsl" ) + : mDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/lighting.hlsl" )) { addDependency( &mDep ); } @@ -2383,7 +2383,7 @@ ShaderFeature::Resources RTLightingFeatHLSL::getResources( const MaterialFeature //**************************************************************************** FogFeatHLSL::FogFeatHLSL() - : mFogDep( "shaders/common/torque.hlsl" ) + : mFogDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/torque.hlsl" )) { addDependency( &mFogDep ); } @@ -2514,7 +2514,7 @@ ShaderFeature::Resources FogFeatHLSL::getResources( const MaterialFeatureData &f //**************************************************************************** VisibilityFeatHLSL::VisibilityFeatHLSL() - : mTorqueDep( "shaders/common/torque.hlsl" ) + : mTorqueDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/torque.hlsl" )) { addDependency( &mTorqueDep ); } @@ -2681,7 +2681,7 @@ void RenderTargetZeroHLSL::processPix( Vector &componentList, //**************************************************************************** HDROutHLSL::HDROutHLSL() - : mTorqueDep( "shaders/common/torque.hlsl" ) + : mTorqueDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/torque.hlsl" )) { addDependency( &mTorqueDep ); } @@ -2702,7 +2702,7 @@ void HDROutHLSL::processPix( Vector &componentList, #include "T3D/fx/groundCover.h" FoliageFeatureHLSL::FoliageFeatureHLSL() -: mDep( "shaders/common/foliage.hlsl" ) +: mDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/foliage.hlsl" )) { addDependency( &mDep ); } @@ -2848,7 +2848,7 @@ void ParticleNormalFeatureHLSL::processVert(Vector &componentL //**************************************************************************** ImposterVertFeatureHLSL::ImposterVertFeatureHLSL() - : mDep( "shaders/common/imposter.hlsl" ) + : mDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/imposter.hlsl" )) { addDependency( &mDep ); } diff --git a/Engine/source/terrain/glsl/terrFeatureGLSL.cpp b/Engine/source/terrain/glsl/terrFeatureGLSL.cpp index f40776b80..193f9587c 100644 --- a/Engine/source/terrain/glsl/terrFeatureGLSL.cpp +++ b/Engine/source/terrain/glsl/terrFeatureGLSL.cpp @@ -70,7 +70,7 @@ MODULE_END; TerrainFeatGLSL::TerrainFeatGLSL() - : mTorqueDep( "shaders/common/gl/torque.glsl" ) + : mTorqueDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/gl/torque.glsl" )) { addDependency( &mTorqueDep ); } @@ -297,8 +297,8 @@ U32 TerrainBaseMapFeatGLSL::getOutputTargets( const MaterialFeatureData &fd ) co } TerrainDetailMapFeatGLSL::TerrainDetailMapFeatGLSL() - : mTorqueDep( "shaders/common/gl/torque.glsl" ), - mTerrainDep( "shaders/common/terrain/terrain.glsl" ) + : mTorqueDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/gl/torque.glsl" )), + mTerrainDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/terrain/terrain.glsl" )) { addDependency( &mTorqueDep ); @@ -667,8 +667,8 @@ U32 TerrainDetailMapFeatGLSL::getOutputTargets( const MaterialFeatureData &fd ) TerrainMacroMapFeatGLSL::TerrainMacroMapFeatGLSL() - : mTorqueDep( "shaders/common/gl/torque.glsl" ), - mTerrainDep( "shaders/common/terrain/terrain.glsl" ) + : mTorqueDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/gl/torque.glsl" )), + mTerrainDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/terrain/terrain.glsl" )) { addDependency( &mTorqueDep ); diff --git a/Engine/source/terrain/hlsl/terrFeatureHLSL.cpp b/Engine/source/terrain/hlsl/terrFeatureHLSL.cpp index 9bd77b664..74fdd417b 100644 --- a/Engine/source/terrain/hlsl/terrFeatureHLSL.cpp +++ b/Engine/source/terrain/hlsl/terrFeatureHLSL.cpp @@ -69,7 +69,7 @@ MODULE_END; TerrainFeatHLSL::TerrainFeatHLSL() - : mTorqueDep( "shaders/common/torque.hlsl" ) + : mTorqueDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/torque.hlsl" )) { addDependency( &mTorqueDep ); } @@ -315,8 +315,8 @@ U32 TerrainBaseMapFeatHLSL::getOutputTargets( const MaterialFeatureData &fd ) co } TerrainDetailMapFeatHLSL::TerrainDetailMapFeatHLSL() - : mTorqueDep( "shaders/common/torque.hlsl" ), - mTerrainDep( "shaders/common/terrain/terrain.hlsl" ) + : mTorqueDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/torque.hlsl" )), + mTerrainDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/terrain/terrain.hlsl" )) { addDependency( &mTorqueDep ); @@ -692,8 +692,8 @@ U32 TerrainDetailMapFeatHLSL::getOutputTargets( const MaterialFeatureData &fd ) TerrainMacroMapFeatHLSL::TerrainMacroMapFeatHLSL() - : mTorqueDep( "shaders/common/torque.hlsl" ), - mTerrainDep( "shaders/common/terrain/terrain.hlsl" ) + : mTorqueDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/torque.hlsl" )), + mTerrainDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/terrain/terrain.hlsl" )) { addDependency( &mTorqueDep ); diff --git a/Engine/source/windowManager/sdl/sdlSplashScreen.cpp b/Engine/source/windowManager/sdl/sdlSplashScreen.cpp index 1cf2440af..ffa09df8a 100644 --- a/Engine/source/windowManager/sdl/sdlSplashScreen.cpp +++ b/Engine/source/windowManager/sdl/sdlSplashScreen.cpp @@ -98,15 +98,31 @@ bool Platform::displaySplashWindow( String path ) SDL_RenderPresent(gSplashRenderer); } - return true; + return true; } bool Platform::closeSplashWindow() { - SDL_DestroyTexture(gSplashTexture); - SDL_FreeSurface(gSplashImage); - SDL_DestroyRenderer(gSplashRenderer); - SDL_DestroyWindow(gSplashWindow); + if (gSplashTexture != nullptr) + { + SDL_DestroyTexture(gSplashTexture); + gSplashTexture = nullptr; + } + if (gSplashImage != nullptr) + { + SDL_FreeSurface(gSplashImage); + gSplashImage = nullptr; + } + if (gSplashRenderer != nullptr) + { + SDL_DestroyRenderer(gSplashRenderer); + gSplashRenderer = nullptr; + } + if (gSplashWindow != nullptr) + { + SDL_DestroyWindow(gSplashWindow); + gSplashWindow = nullptr; + } return true; } \ No newline at end of file diff --git a/Engine/source/windowManager/sdl/sdlWindow.cpp b/Engine/source/windowManager/sdl/sdlWindow.cpp index 3c819248b..a48e3743d 100644 --- a/Engine/source/windowManager/sdl/sdlWindow.cpp +++ b/Engine/source/windowManager/sdl/sdlWindow.cpp @@ -104,37 +104,37 @@ mShouldLockMouse(false), mSuppressReset(false), mMenuHandle(NULL) { - mCursorController = new PlatformCursorControllerSDL( this ); + mCursorController = new PlatformCursorControllerSDL( this ); - mVideoMode.bitDepth = 32; - mVideoMode.fullScreen = false; - mVideoMode.refreshRate = 60; - mVideoMode.resolution.set(800,600); + mVideoMode.bitDepth = 32; + mVideoMode.fullScreen = false; + mVideoMode.refreshRate = 60; + mVideoMode.resolution.set(800,600); } PlatformWindowSDL::~PlatformWindowSDL() { - // delete our sdl handle.. - SDL_DestroyWindow(mWindowHandle); + // delete our sdl handle.. + SDL_DestroyWindow(mWindowHandle); - // unlink ourselves from the window list... - AssertFatal(mOwningManager, "PlatformWindowSDL::~PlatformWindowSDL - orphan window, cannot unlink!"); - mOwningManager->unlinkWindow(this); + // unlink ourselves from the window list... + AssertFatal(mOwningManager, "PlatformWindowSDL::~PlatformWindowSDL - orphan window, cannot unlink!"); + mOwningManager->unlinkWindow(this); } GFXDevice * PlatformWindowSDL::getGFXDevice() { - return mDevice; + return mDevice; } GFXWindowTarget * PlatformWindowSDL::getGFXTarget() { - return mTarget; + return mTarget; } const GFXVideoMode & PlatformWindowSDL::getVideoMode() { - return mVideoMode; + return mVideoMode; } void* PlatformWindowSDL::getSystemWindow(const WindowSystem system) @@ -162,41 +162,41 @@ void PlatformWindowSDL::setVideoMode( const GFXVideoMode &mode ) mVideoMode = mode; mSuppressReset = true; - // Set our window to have the right style based on the mode + // Set our window to have the right style based on the mode if(mode.fullScreen && !Platform::getWebDeployment() && !mOffscreenRender) - { + { setSize(mode.resolution); SDL_SetWindowFullscreen( mWindowHandle, SDL_WINDOW_FULLSCREEN); // When switching to Fullscreen, reset device after setting style - if(mTarget.isValid()) - mTarget->resetMode(); - } - else - { + if(mTarget.isValid()) + mTarget->resetMode(); + } + else + { // Reset device *first*, so that when we call setSize() and let it - // access the monitor settings, it won't end up with our fullscreen - // geometry that is just about to change. + // access the monitor settings, it won't end up with our fullscreen + // geometry that is just about to change. - if(mTarget.isValid()) - mTarget->resetMode(); + if(mTarget.isValid()) + mTarget->resetMode(); if (!mOffscreenRender) { - SDL_SetWindowFullscreen( mWindowHandle, 0); + SDL_SetWindowFullscreen( mWindowHandle, 0); } setSize(mode.resolution); centerWindow(); - } + } - mSuppressReset = false; + mSuppressReset = false; } bool PlatformWindowSDL::clearFullscreen() { - return true; + return true; } bool PlatformWindowSDL::isFullscreen() @@ -210,32 +210,32 @@ bool PlatformWindowSDL::isFullscreen() void PlatformWindowSDL::_setFullscreen(const bool fullscreen) { - if( isFullscreen() ) - return; + if( isFullscreen() ) + return; - if(fullscreen && !mOffscreenRender) - { - Con::printf("PlatformWindowSDL::setFullscreen (full) enter"); - SDL_SetWindowFullscreen( mWindowHandle, SDL_WINDOW_FULLSCREEN); - } - else - { - Con::printf("PlatformWindowSDL::setFullscreen (windowed) enter"); + if(fullscreen && !mOffscreenRender) + { + Con::printf("PlatformWindowSDL::setFullscreen (full) enter"); + SDL_SetWindowFullscreen( mWindowHandle, SDL_WINDOW_FULLSCREEN); + } + else + { + Con::printf("PlatformWindowSDL::setFullscreen (windowed) enter"); if (!mOffscreenRender) { - SDL_SetWindowFullscreen( mWindowHandle, SDL_WINDOW_FULLSCREEN_DESKTOP); + SDL_SetWindowFullscreen( mWindowHandle, SDL_WINDOW_FULLSCREEN_DESKTOP); } setSize(mVideoMode.resolution); - } - Con::printf("PlatformWindowSDL::setFullscreen exit"); + } + Con::printf("PlatformWindowSDL::setFullscreen exit"); } bool PlatformWindowSDL::setCaption( const char *cap ) { SDL_SetWindowTitle(mWindowHandle, cap); - return true; + return true; } const char * PlatformWindowSDL::getCaption() @@ -250,45 +250,45 @@ void PlatformWindowSDL::setFocus() void PlatformWindowSDL::setClientExtent( const Point2I newExtent ) { - Point2I oldExtent = getClientExtent(); - if (oldExtent == newExtent) - return; + Point2I oldExtent = getClientExtent(); + if (oldExtent == newExtent) + return; SDL_SetWindowSize(mWindowHandle, newExtent.x, newExtent.y); } const Point2I PlatformWindowSDL::getClientExtent() { - // Fetch Client Rect from Windows + // Fetch Client Rect from Windows Point2I size; - SDL_GetWindowSize(mWindowHandle, &size.x, &size.y); + SDL_GetWindowSize(mWindowHandle, &size.x, &size.y); - return size; + return size; } void PlatformWindowSDL::setBounds( const RectI &newBounds ) { - // TODO SDL + // TODO SDL } const RectI PlatformWindowSDL::getBounds() const { - // TODO SDL - return RectI(0, 0, 0, 0); + // TODO SDL + return RectI(0, 0, 0, 0); } void PlatformWindowSDL::setPosition( const Point2I newPosition ) { - SDL_SetWindowPosition( mWindowHandle, newPosition.x, newPosition.y ); + SDL_SetWindowPosition( mWindowHandle, newPosition.x, newPosition.y ); } const Point2I PlatformWindowSDL::getPosition() { - Point2I position; - SDL_GetWindowPosition( mWindowHandle, &position.x, &position.y ); + Point2I position; + SDL_GetWindowPosition( mWindowHandle, &position.x, &position.y ); - // Return position - return position; + // Return position + return position; } Point2I PlatformWindowSDL::clientToScreen( const Point2I& pos ) @@ -311,7 +311,7 @@ void PlatformWindowSDL::centerWindow() SDL_GetWindowSize(mWindowHandle, &sizeX, &sizeY); SDL_DisplayMode mode; - SDL_GetDesktopDisplayMode(0, &mode); + SDL_GetDesktopDisplayMode(0, &mode); U32 posX = (mode.w/2) - (sizeX/2); U32 posY = (mode.h/2) - (sizeY/2); @@ -325,21 +325,21 @@ bool PlatformWindowSDL::setSize( const Point2I &newSize ) // Let GFX get an update about the new resolution if (mTarget.isValid()) - mTarget->resetMode(); + mTarget->resetMode(); - return true; + return true; } bool PlatformWindowSDL::isOpen() { - return mWindowHandle; + return mWindowHandle; } bool PlatformWindowSDL::isVisible() { - // Is the window open and visible, ie. not minimized? - if(!mWindowHandle) - return false; + // Is the window open and visible, ie. not minimized? + if(!mWindowHandle) + return false; if (mOffscreenRender) return true; @@ -348,7 +348,7 @@ bool PlatformWindowSDL::isVisible() if( flags & SDL_WINDOW_SHOWN) return true; - return false; + return false; } bool PlatformWindowSDL::isFocused() @@ -389,7 +389,7 @@ bool PlatformWindowSDL::isMaximized() WindowId PlatformWindowSDL::getWindowId() { - return mWindowId; + return mWindowId; } void PlatformWindowSDL::minimize() @@ -397,7 +397,7 @@ void PlatformWindowSDL::minimize() if (mOffscreenRender) return; - SDL_MinimizeWindow( mWindowHandle ); + SDL_MinimizeWindow( mWindowHandle ); } void PlatformWindowSDL::maximize() @@ -405,7 +405,7 @@ void PlatformWindowSDL::maximize() if (mOffscreenRender) return; - SDL_MaximizeWindow( mWindowHandle ); + SDL_MaximizeWindow( mWindowHandle ); } void PlatformWindowSDL::restore() @@ -413,7 +413,7 @@ void PlatformWindowSDL::restore() if (mOffscreenRender) return; - SDL_RestoreWindow( mWindowHandle ); + SDL_RestoreWindow( mWindowHandle ); } void PlatformWindowSDL::hide() @@ -421,7 +421,7 @@ void PlatformWindowSDL::hide() if (mOffscreenRender) return; - SDL_HideWindow( mWindowHandle ); + SDL_HideWindow( mWindowHandle ); } void PlatformWindowSDL::show() @@ -429,17 +429,17 @@ void PlatformWindowSDL::show() if (mOffscreenRender) return; - SDL_ShowWindow( mWindowHandle ); + SDL_ShowWindow( mWindowHandle ); } void PlatformWindowSDL::close() { - delete this; + delete this; } void PlatformWindowSDL::defaultRender() { - // TODO SDL + // TODO SDL } void PlatformWindowSDL::_triggerMouseLocationNotify(const SDL_Event& evt) @@ -615,7 +615,7 @@ void PlatformWindowSDL::setMouseLocked( bool enable ) if (mOffscreenRender) return; - mMouseLocked = enable; + mMouseLocked = enable; SDL_SetWindowGrab( mWindowHandle, SDL_bool(enable) ); SDL_SetRelativeMouseMode( SDL_bool(enable) ); diff --git a/Templates/BaseGame/BaseGame.cmake b/Templates/BaseGame/BaseGame.cmake new file mode 100644 index 000000000..8b0a6700a --- /dev/null +++ b/Templates/BaseGame/BaseGame.cmake @@ -0,0 +1 @@ +# Project-specific Cmake configurations go here \ No newline at end of file diff --git a/Templates/Empty/DeleteCachedDTSs.bat b/Templates/BaseGame/DeleteCachedDTSs.bat similarity index 100% rename from Templates/Empty/DeleteCachedDTSs.bat rename to Templates/BaseGame/DeleteCachedDTSs.bat diff --git a/Templates/Empty/DeleteCachedDTSs.command b/Templates/BaseGame/DeleteCachedDTSs.command old mode 100755 new mode 100644 similarity index 100% rename from Templates/Empty/DeleteCachedDTSs.command rename to Templates/BaseGame/DeleteCachedDTSs.command diff --git a/Templates/Empty/DeleteDSOs.bat b/Templates/BaseGame/DeleteDSOs.bat similarity index 100% rename from Templates/Empty/DeleteDSOs.bat rename to Templates/BaseGame/DeleteDSOs.bat diff --git a/Templates/Empty/DeleteDSOs.command b/Templates/BaseGame/DeleteDSOs.command old mode 100755 new mode 100644 similarity index 100% rename from Templates/Empty/DeleteDSOs.command rename to Templates/BaseGame/DeleteDSOs.command diff --git a/Templates/Empty/DeletePrefs.bat b/Templates/BaseGame/DeletePrefs.bat similarity index 100% rename from Templates/Empty/DeletePrefs.bat rename to Templates/BaseGame/DeletePrefs.bat diff --git a/Templates/Empty/DeletePrefs.command b/Templates/BaseGame/DeletePrefs.command old mode 100755 new mode 100644 similarity index 100% rename from Templates/Empty/DeletePrefs.command rename to Templates/BaseGame/DeletePrefs.command diff --git a/Templates/Empty/cleanShaders.bat b/Templates/BaseGame/cleanShaders.bat similarity index 100% rename from Templates/Empty/cleanShaders.bat rename to Templates/BaseGame/cleanShaders.bat diff --git a/Templates/Empty/cleanShaders.command b/Templates/BaseGame/cleanShaders.command old mode 100755 new mode 100644 similarity index 100% rename from Templates/Empty/cleanShaders.command rename to Templates/BaseGame/cleanShaders.command diff --git a/Templates/BaseGame/game/Template.torsion.exports b/Templates/BaseGame/game/Template.torsion.exports new file mode 100644 index 000000000..c6a971eb4 --- /dev/null +++ b/Templates/BaseGame/game/Template.torsion.exports @@ -0,0 +1 @@ + diff --git a/Templates/Empty/game/core/scripts/client/audio.cs b/Templates/BaseGame/game/core/audio.cs similarity index 94% rename from Templates/Empty/game/core/scripts/client/audio.cs rename to Templates/BaseGame/game/core/audio.cs index 900ef40b1..a5932de8f 100644 --- a/Templates/Empty/game/core/scripts/client/audio.cs +++ b/Templates/BaseGame/game/core/audio.cs @@ -108,27 +108,7 @@ singleton SFXDescription( AudioMusic ) /// the defaults in the $pref::SFX:: globals. function sfxStartup() { - // The console builds should re-detect, by default, so that it plays nicely - // along side a PC build in the same script directory. - - if( $platform $= "xenon" ) - { - if( $pref::SFX::provider $= "DirectSound" || - $pref::SFX::provider $= "OpenAL" ) - { - $pref::SFX::provider = ""; - } - - if( $pref::SFX::provider $= "" ) - { - $pref::SFX::autoDetect = 1; - - warn( "Xbox360 is auto-detecting available sound providers..." ); - warn( " - You may wish to alter this functionality before release (core/scripts/client/audio.cs)" ); - } - } - - echo( "sfxStartup..." ); + echo( "\nsfxStartup..." ); // If we have a provider set, try initialize a device now. @@ -186,7 +166,8 @@ function sfxInit() echo( " Provider: " @ $pref::SFX::provider ); echo( " Device: " @ $pref::SFX::device ); echo( " Hardware: " @ %useHardware ); - echo( " Buffers: " @ %maxBuffers ); + echo( " Max Buffers: " @ %maxBuffers ); + echo( " " ); if( isDefined( "$pref::SFX::distanceModel" ) ) sfxSetDistanceModel( $pref::SFX::distanceModel ); @@ -396,7 +377,7 @@ function sfxSetChannelVolume( %channel, %volume ) %obj.setVolume( %volume ); } -singleton SimSet( SFXPausedSet ); +/*singleton SimSet( SFXPausedSet ); /// Pauses the playback of active sound sources. @@ -408,7 +389,7 @@ singleton SimSet( SFXPausedSet ); /// is used. /// /// @deprecated -/// +/// function sfxPause( %channels, %pauseSet ) { // Did we get a set to populate? @@ -452,4 +433,4 @@ function sfxResume( %pauseSet ) // Clear our pause set... the caller is left // to clear his own if he passed one. %pauseSet.clear(); -} +}*/ diff --git a/Templates/Empty/game/core/scripts/client/canvas.cs b/Templates/BaseGame/game/core/canvas.cs similarity index 52% rename from Templates/Empty/game/core/scripts/client/canvas.cs rename to Templates/BaseGame/game/core/canvas.cs index 5c1d377c5..b38cdccca 100644 --- a/Templates/Empty/game/core/scripts/client/canvas.cs +++ b/Templates/BaseGame/game/core/canvas.cs @@ -20,24 +20,61 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -//--------------------------------------------------------------------------------------------- -// initializeCanvas -// Constructs and initializes the default canvas window. -//--------------------------------------------------------------------------------------------- -$canvasCreated = false; +function createCanvas(%windowTitle) +{ + if ($isDedicated) + { + GFXInit::createNullDevice(); + return true; + } + + // Create the Canvas + $GameCanvas = new GuiCanvas(Canvas) + { + displayWindow = $platform !$= "windows"; + }; + + // Set the window title + if (isObject(Canvas)) + { + Canvas.setWindowTitle(%windowTitle @ " - " @ $pref::Video::displayDevice); + configureCanvas(); + } + else + { + error("Canvas creation failed. Shutting down."); + quit(); + } +} + +// Constants for referencing video resolution preferences +$WORD::RES_X = 0; +$WORD::RES_Y = 1; +$WORD::FULLSCREEN = 2; +$WORD::BITDEPTH = 3; +$WORD::REFRESH = 4; +$WORD::AA = 5; function configureCanvas() { // Setup a good default if we don't have one already. - if ($pref::Video::mode $= "") - $pref::Video::mode = "800 600 false 32 60 0"; + if ($pref::Video::Resolution $= "") + $pref::Video::Resolution = "800 600"; + if ($pref::Video::FullScreen $= "") + $pref::Video::FullScreen = false; + if ($pref::Video::BitDepth $= "") + $pref::Video::BitDepth = "32"; + if ($pref::Video::RefreshRate $= "") + $pref::Video::RefreshRate = "60"; + if ($pref::Video::AA $= "") + $pref::Video::AA = "4"; - %resX = getWord($pref::Video::mode, $WORD::RES_X); - %resY = getWord($pref::Video::mode, $WORD::RES_Y); - %fs = getWord($pref::Video::mode, $WORD::FULLSCREEN); - %bpp = getWord($pref::Video::mode, $WORD::BITDEPTH); - %rate = getWord($pref::Video::mode, $WORD::REFRESH); - %fsaa = getWord($pref::Video::mode, $WORD::AA); + %resX = $pref::Video::Resolution.x; + %resY = $pref::Video::Resolution.y; + %fs = $pref::Video::FullScreen; + %bpp = $pref::Video::BitDepth; + %rate = $pref::Video::RefreshRate; + %aa = $pref::Video::AA; if($cliFullscreen !$= "") { %fs = $cliFullscreen; @@ -45,8 +82,8 @@ function configureCanvas() } echo("--------------"); - echo("Attempting to set resolution to \"" @ %resX SPC %resY SPC %fs SPC %bpp SPC %rate SPC %fsaa @ "\""); - + echo("Attempting to set resolution to \"" @ %resX SPC %resY SPC %fs SPC %bpp SPC %rate SPC %aa @ "\""); + %deskRes = getDesktopResolution(); %deskResX = getWord(%deskRes, $WORD::RES_X); %deskResY = getWord(%deskRes, $WORD::RES_Y); @@ -91,8 +128,12 @@ function configureCanvas() } } } - - $pref::Video::mode = %resX SPC %resY SPC %fs SPC %bpp SPC %rate SPC %fsaa; + + $pref::Video::Resolution = %resX SPC %resY; + $pref::Video::FullScreen = %fs; + $pref::Video::BitDepth = %bpp; + $pref::Video::RefreshRate = %rate; + $pref::Video::AA = %aa; if (%fs == 1 || %fs $= "true") %fsLabel = "Yes"; @@ -104,90 +145,18 @@ function configureCanvas() "--Full Screen : " @ %fsLabel NL "--Bits Per Pixel : " @ %bpp NL "--Refresh Rate : " @ %rate NL - "--FSAA Level : " @ %fsaa NL + "--AA TypeXLevel : " @ %aa NL "--------------"); // Actually set the new video mode - Canvas.setVideoMode(%resX, %resY, %fs, %bpp, %rate, %fsaa); - - // FXAA piggybacks on the FSAA setting in $pref::Video::mode. + Canvas.setVideoMode(%resX, %resY, %fs, %bpp, %rate, %aa); + + commandToServer('setClientAspectRatio', %resX, %resY); + + // AA piggybacks on the AA setting in $pref::Video::mode. + // We need to parse the setting between AA modes, and then it's level + // It's formatted as AATypexAALevel + // So, FXAAx4 or MLAAx2 if ( isObject( FXAA_PostEffect ) ) - FXAA_PostEffect.isEnabled = ( %fsaa > 0 ) ? true : false; - - //if ( $pref::Video::autoDetect ) - // GraphicsQualityAutodetect(); -} - -function initializeCanvas() -{ - // Don't duplicate the canvas. - if($canvasCreated) - { - error("Cannot instantiate more than one canvas!"); - return; - } - - if (!createCanvas()) - { - error("Canvas creation failed. Shutting down."); - quit(); - } - - $canvasCreated = true; -} - -//--------------------------------------------------------------------------------------------- -// resetCanvas -// Forces the canvas to redraw itself. -//--------------------------------------------------------------------------------------------- -function resetCanvas() -{ - if (isObject(Canvas)) - Canvas.repaint(); -} - -//--------------------------------------------------------------------------------------------- -// Callbacks for window events. -//--------------------------------------------------------------------------------------------- - -function GuiCanvas::onLoseFocus(%this) -{ -} - -//--------------------------------------------------------------------------------------------- -// Full screen handling -//--------------------------------------------------------------------------------------------- - -function GuiCanvas::attemptFullscreenToggle(%this) -{ - // If the Editor is running then we cannot enter full screen mode - if ( EditorIsActive() && !%this.isFullscreen() ) - { - MessageBoxOK("Windowed Mode Required", "Please exit the Mission Editor to switch to full screen."); - return; - } - - // If the GUI Editor is running then we cannot enter full screen mode - if ( GuiEditorIsActive() && !%this.isFullscreen() ) - { - MessageBoxOK("Windowed Mode Required", "Please exit the GUI Editor to switch to full screen."); - return; - } - - %this.toggleFullscreen(); -} - -//--------------------------------------------------------------------------------------------- -// Editor Checking -// Needs to be outside of the tools directory so these work in non-tools builds -//--------------------------------------------------------------------------------------------- - -function EditorIsActive() -{ - return ( isObject(EditorGui) && Canvas.getContent() == EditorGui.getId() ); -} - -function GuiEditorIsActive() -{ - return ( isObject(GuiEditorGui) && Canvas.getContent() == GuiEditorGui.getId() ); + FXAA_PostEffect.isEnabled = ( %aa > 0 ) ? true : false; } diff --git a/Templates/BaseGame/game/core/console/console.gui b/Templates/BaseGame/game/core/console/console.gui new file mode 100644 index 000000000..8c6c7f63a --- /dev/null +++ b/Templates/BaseGame/game/core/console/console.gui @@ -0,0 +1,51 @@ +new GuiControl(ConsoleDlg) { + profile = "GuiDefaultProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "0 0"; + extent = "640 480"; + minExtent = "8 8"; + visible = "1"; + helpTag = "0"; + + new GuiConsoleEditCtrl(ConsoleEntry) { + profile = "ConsoleTextEditProfile"; + horizSizing = "width"; + vertSizing = "top"; + position = "0 462"; + extent = "640 18"; + minExtent = "8 8"; + visible = "1"; + altCommand = "ConsoleEntry::eval();"; + helpTag = "0"; + maxLength = "255"; + historySize = "40"; + password = "0"; + tabComplete = "0"; + sinkAllKeyEvents = "1"; + useSiblingScroller = "1"; + }; + new GuiScrollCtrl() { + internalName = "Scroll"; + profile = "ConsoleScrollProfile"; + horizSizing = "width"; + vertSizing = "height"; + position = "0 0"; + extent = "640 462"; + minExtent = "8 8"; + visible = "1"; + helpTag = "0"; + willFirstRespond = "1"; + hScrollBar = "alwaysOn"; + vScrollBar = "alwaysOn"; + lockHorizScroll = "false"; + lockVertScroll = "false"; + constantThumbHeight = "0"; + childMargin = "0 0"; + + new GuiConsole( ConsoleMessageLogView ) { + profile = "GuiConsoleProfile"; + position = "0 0"; + }; + }; +}; diff --git a/Templates/BaseGame/game/core/console/main.cs b/Templates/BaseGame/game/core/console/main.cs new file mode 100644 index 000000000..b36dafd24 --- /dev/null +++ b/Templates/BaseGame/game/core/console/main.cs @@ -0,0 +1,108 @@ +//----------------------------------------------------------------------------- +// 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. +//----------------------------------------------------------------------------- + +exec("./profiles.cs"); +exec("./console.gui"); + +GlobalActionMap.bind("keyboard", "tilde", "toggleConsole"); + +function ConsoleEntry::eval() +{ + %text = trim(ConsoleEntry.getValue()); + if(%text $= "") + return; + + // If it's missing a trailing () and it's not a variable, + // append the parentheses. + if(strpos(%text, "(") == -1 && !isDefined(%text)) { + if(strpos(%text, "=") == -1 && strpos(%text, " ") == -1) { + if(strpos(%text, "{") == -1 && strpos(%text, "}") == -1) { + %text = %text @ "()"; + } + } + } + + // Append a semicolon if need be. + %pos = strlen(%text) - 1; + if(strpos(%text, ";", %pos) == -1 && strpos(%text, "}") == -1) { + %text = %text @ ";"; + } + + // Turn off warnings for assigning from void + // and evaluate the snippet. + if(!isDefined("$Con::warnVoidAssignment")) + %oldWarnVoidAssignment = true; + else + %oldWarnVoidAssignment = $Con::warnVoidAssignment; + $Con::warnVoidAssignment = false; + + echo("==>" @ %text); + if( !startsWith(%text, "function ") + && !startsWith(%text, "datablock ") + && !startsWith(%text, "foreach(") + && !startsWith(%text, "foreach$(") + && !startsWith(%text, "if(") + && !startsWith(%text, "while(") + && !startsWith(%text, "for(") + && !startsWith(%text, "switch(") + && !startsWith(%text, "switch$(")) + eval("%result = " @ %text); + else + eval(%text); + $Con::warnVoidAssignment = %oldWarnVoidAssignment; + + ConsoleEntry.setValue(""); + + // Echo result. + if(%result !$= "") + echo(%result); +} + +function ToggleConsole(%make) +{ + if (%make) { + if (ConsoleDlg.isAwake()) { + // Deactivate the console. + Canvas.popDialog(ConsoleDlg); + } else { + Canvas.pushDialog(ConsoleDlg, 99); + } + } +} + +function ConsoleDlg::hideWindow(%this) +{ + %this-->Scroll.setVisible(false); +} + +function ConsoleDlg::showWindow(%this) +{ + %this-->Scroll.setVisible(true); +} + +function ConsoleDlg::setAlpha( %this, %alpha) +{ + if (%alpha $= "") + ConsoleScrollProfile.fillColor = $ConsoleDefaultFillColor; + else + ConsoleScrollProfile.fillColor = getWords($ConsoleDefaultFillColor, 0, 2) SPC %alpha * 255.0; +} diff --git a/Templates/Empty/game/core/art/skies/blank/materials.cs b/Templates/BaseGame/game/core/console/profiles.cs similarity index 52% rename from Templates/Empty/game/core/art/skies/blank/materials.cs rename to Templates/BaseGame/game/core/console/profiles.cs index 179eafcf2..b83dd4fa7 100644 --- a/Templates/Empty/game/core/art/skies/blank/materials.cs +++ b/Templates/BaseGame/game/core/console/profiles.cs @@ -20,50 +20,51 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -singleton CubemapData( BlackSkyCubemap ) +if(!isObject(GuiConsoleProfile)) +new GuiControlProfile(GuiConsoleProfile) { - cubeFace[0] = "./solidsky_black"; - cubeFace[1] = "./solidsky_black"; - cubeFace[2] = "./solidsky_black"; - cubeFace[3] = "./solidsky_black"; - cubeFace[4] = "./solidsky_black"; - cubeFace[5] = "./solidsky_black"; + fontType = ($platform $= "macos") ? "Monaco" : "Lucida Console"; + fontSize = ($platform $= "macos") ? 13 : 12; + fontColor = "255 255 255"; + fontColorHL = "0 255 255"; + fontColorNA = "255 0 0"; + fontColors[6] = "100 100 100"; + fontColors[7] = "100 100 0"; + fontColors[8] = "0 0 100"; + fontColors[9] = "0 100 0"; + category = "Core"; }; -singleton Material( BlackSkyMat ) -{ - cubemap = BlackSkyCubemap; - materialTag0 = "Skies"; +if(!isObject(GuiConsoleTextProfile)) +new GuiControlProfile(GuiConsoleTextProfile) +{ + fontColor = "0 0 0"; + autoSizeWidth = true; + autoSizeHeight = true; + textOffset = "2 2"; + opaque = true; + fillColor = "255 255 255"; + border = true; + borderThickness = 1; + borderColor = "0 0 0"; + category = "Core"; }; -singleton CubemapData( BlueSkyCubemap ) +if(!isObject(ConsoleScrollProfile)) +new GuiControlProfile(ConsoleScrollProfile : GuiScrollProfile) { - cubeFace[0] = "./solidsky_blue"; - cubeFace[1] = "./solidsky_blue"; - cubeFace[2] = "./solidsky_blue"; - cubeFace[3] = "./solidsky_blue"; - cubeFace[4] = "./solidsky_blue"; - cubeFace[5] = "./solidsky_blue"; + opaque = true; + fillColor = "0 0 0 175"; + border = 1; + //borderThickness = 0; + borderColor = "0 0 0"; + category = "Core"; }; -singleton Material( BlueSkyMat ) +if(!isObject(ConsoleTextEditProfile)) +new GuiControlProfile(ConsoleTextEditProfile : GuiTextEditProfile) { - cubemap = BlueSkyCubemap; - materialTag0 = "Skies"; -}; - -singleton CubemapData( GreySkyCubemap ) -{ - cubeFace[0] = "./solidsky_grey"; - cubeFace[1] = "./solidsky_grey"; - cubeFace[2] = "./solidsky_grey"; - cubeFace[3] = "./solidsky_grey"; - cubeFace[4] = "./solidsky_grey"; - cubeFace[5] = "./solidsky_grey"; -}; - -singleton Material( GreySkyMat ) -{ - cubemap = GreySkyCubemap; - materialTag0 = "Skies"; + fillColor = "242 241 240 255"; + fillColorHL = "255 255 255"; + category = "Core"; }; diff --git a/Templates/Empty/game/core/scripts/client/cursor.cs b/Templates/BaseGame/game/core/cursor.cs similarity index 99% rename from Templates/Empty/game/core/scripts/client/cursor.cs rename to Templates/BaseGame/game/core/cursor.cs index 951534331..f71bc023a 100644 --- a/Templates/Empty/game/core/scripts/client/cursor.cs +++ b/Templates/BaseGame/game/core/cursor.cs @@ -62,12 +62,11 @@ function GuiCanvas::checkCursor(%this) if ((%control.noCursor $= "") || !%control.noCursor) { showCursor(); - return true; + return; } } // If we get here, every control requested a hidden cursor, so we oblige. hideCursor(); - return false; } //--------------------------------------------------------------------------------------------- diff --git a/Templates/BaseGame/game/core/fonts/Arial 10 (ansi).uft b/Templates/BaseGame/game/core/fonts/Arial 10 (ansi).uft new file mode 100644 index 000000000..2b5649500 Binary files /dev/null and b/Templates/BaseGame/game/core/fonts/Arial 10 (ansi).uft differ diff --git a/Templates/BaseGame/game/core/fonts/Arial 12 (ansi).uft b/Templates/BaseGame/game/core/fonts/Arial 12 (ansi).uft new file mode 100644 index 000000000..67a177016 Binary files /dev/null and b/Templates/BaseGame/game/core/fonts/Arial 12 (ansi).uft differ diff --git a/Templates/BaseGame/game/core/fonts/Arial 14 (ansi).uft b/Templates/BaseGame/game/core/fonts/Arial 14 (ansi).uft new file mode 100644 index 000000000..159010c68 Binary files /dev/null and b/Templates/BaseGame/game/core/fonts/Arial 14 (ansi).uft differ diff --git a/Templates/BaseGame/game/core/fonts/Arial 16 (ansi).uft b/Templates/BaseGame/game/core/fonts/Arial 16 (ansi).uft new file mode 100644 index 000000000..058fbb305 Binary files /dev/null and b/Templates/BaseGame/game/core/fonts/Arial 16 (ansi).uft differ diff --git a/Templates/BaseGame/game/core/fonts/Arial 36 (ansi).uft b/Templates/BaseGame/game/core/fonts/Arial 36 (ansi).uft new file mode 100644 index 000000000..968441ce3 Binary files /dev/null and b/Templates/BaseGame/game/core/fonts/Arial 36 (ansi).uft differ diff --git a/Templates/BaseGame/game/core/fonts/Arial Bold 14 (ansi).uft b/Templates/BaseGame/game/core/fonts/Arial Bold 14 (ansi).uft new file mode 100644 index 000000000..60d7b0227 Binary files /dev/null and b/Templates/BaseGame/game/core/fonts/Arial Bold 14 (ansi).uft differ diff --git a/Templates/BaseGame/game/core/fonts/Arial Bold 16 (ansi).uft b/Templates/BaseGame/game/core/fonts/Arial Bold 16 (ansi).uft new file mode 100644 index 000000000..f1f94acb3 Binary files /dev/null and b/Templates/BaseGame/game/core/fonts/Arial Bold 16 (ansi).uft differ diff --git a/Templates/BaseGame/game/core/fonts/Arial Bold 18 (ansi).uft b/Templates/BaseGame/game/core/fonts/Arial Bold 18 (ansi).uft new file mode 100644 index 000000000..3460f7db9 Binary files /dev/null and b/Templates/BaseGame/game/core/fonts/Arial Bold 18 (ansi).uft differ diff --git a/Templates/BaseGame/game/core/fonts/ArialBold 14 (ansi).uft b/Templates/BaseGame/game/core/fonts/ArialBold 14 (ansi).uft new file mode 100644 index 000000000..9b103b3f7 Binary files /dev/null and b/Templates/BaseGame/game/core/fonts/ArialBold 14 (ansi).uft differ diff --git a/Templates/BaseGame/game/core/fonts/ArialItalic 14 (ansi).uft b/Templates/BaseGame/game/core/fonts/ArialItalic 14 (ansi).uft new file mode 100644 index 000000000..ca4a222cf Binary files /dev/null and b/Templates/BaseGame/game/core/fonts/ArialItalic 14 (ansi).uft differ diff --git a/Templates/BaseGame/game/core/fonts/Lucida Console 12 (ansi).uft b/Templates/BaseGame/game/core/fonts/Lucida Console 12 (ansi).uft new file mode 100644 index 000000000..cdb46f5ba Binary files /dev/null and b/Templates/BaseGame/game/core/fonts/Lucida Console 12 (ansi).uft differ diff --git a/Templates/Empty/game/core/scripts/client/clouds.cs b/Templates/BaseGame/game/core/gfxData/clouds.cs similarity index 76% rename from Templates/Empty/game/core/scripts/client/clouds.cs rename to Templates/BaseGame/game/core/gfxData/clouds.cs index 87284890a..00d56d6d3 100644 --- a/Templates/Empty/game/core/scripts/client/clouds.cs +++ b/Templates/BaseGame/game/core/gfxData/clouds.cs @@ -26,11 +26,11 @@ singleton ShaderData( CloudLayerShader ) { - DXVertexShaderFile = "shaders/common/cloudLayerV.hlsl"; - DXPixelShaderFile = "shaders/common/cloudLayerP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/cloudLayerV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/cloudLayerP.hlsl"; - OGLVertexShaderFile = "shaders/common/gl/cloudLayerV.glsl"; - OGLPixelShaderFile = "shaders/common/gl/cloudLayerP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/gl/cloudLayerV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/gl/cloudLayerP.glsl"; samplerNames[0] = "$normalHeightMap"; @@ -43,11 +43,11 @@ singleton ShaderData( CloudLayerShader ) singleton ShaderData( BasicCloudsShader ) { - DXVertexShaderFile = "shaders/common/basicCloudsV.hlsl"; - DXPixelShaderFile = "shaders/common/basicCloudsP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/basicCloudsV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/basicCloudsP.hlsl"; - OGLVertexShaderFile = "shaders/common/gl/basicCloudsV.glsl"; - OGLPixelShaderFile = "shaders/common/gl/basicCloudsP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/gl/basicCloudsV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/gl/basicCloudsP.glsl"; samplerNames[0] = "$diffuseMap"; diff --git a/Templates/Empty/game/core/scripts/client/commonMaterialData.cs b/Templates/BaseGame/game/core/gfxData/commonMaterialData.cs similarity index 100% rename from Templates/Empty/game/core/scripts/client/commonMaterialData.cs rename to Templates/BaseGame/game/core/gfxData/commonMaterialData.cs diff --git a/Templates/Empty/game/core/scripts/client/scatterSky.cs b/Templates/BaseGame/game/core/gfxData/scatterSky.cs similarity index 83% rename from Templates/Empty/game/core/scripts/client/scatterSky.cs rename to Templates/BaseGame/game/core/gfxData/scatterSky.cs index 57a8a9fb1..5add01d8b 100644 --- a/Templates/Empty/game/core/scripts/client/scatterSky.cs +++ b/Templates/BaseGame/game/core/gfxData/scatterSky.cs @@ -22,13 +22,11 @@ new GFXStateBlockData( ScatterSkySBData ) { - //cullDefined = true; cullMode = "GFXCullNone"; zDefined = true; zEnable = true; zWriteEnable = false; - //zFunc = "GFXCmpLessEqual"; samplersDefined = true; samplerStates[0] = SamplerClampLinear; @@ -38,11 +36,11 @@ new GFXStateBlockData( ScatterSkySBData ) singleton ShaderData( ScatterSkyShaderData ) { - DXVertexShaderFile = "shaders/common/scatterSkyV.hlsl"; - DXPixelShaderFile = "shaders/common/scatterSkyP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/scatterSkyV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/scatterSkyP.hlsl"; - OGLVertexShaderFile = "shaders/common/gl/scatterSkyV.glsl"; - OGLPixelShaderFile = "shaders/common/gl/scatterSkyP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/gl/scatterSkyV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/gl/scatterSkyP.glsl"; samplerNames[0] = "$nightSky"; diff --git a/Templates/Empty/game/core/scripts/client/shaders.cs b/Templates/BaseGame/game/core/gfxData/shaders.cs similarity index 51% rename from Templates/Empty/game/core/scripts/client/shaders.cs rename to Templates/BaseGame/game/core/gfxData/shaders.cs index 002053a1a..8dce075e5 100644 --- a/Templates/Empty/game/core/scripts/client/shaders.cs +++ b/Templates/BaseGame/game/core/gfxData/shaders.cs @@ -27,11 +27,11 @@ singleton ShaderData( ParticlesShaderData ) { - DXVertexShaderFile = "shaders/common/particlesV.hlsl"; - DXPixelShaderFile = "shaders/common/particlesP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/particlesV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/particlesP.hlsl"; - OGLVertexShaderFile = "shaders/common/gl/particlesV.glsl"; - OGLPixelShaderFile = "shaders/common/gl/particlesP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/gl/particlesV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/gl/particlesP.glsl"; samplerNames[0] = "$diffuseMap"; samplerNames[1] = "$prepassTex"; @@ -42,11 +42,11 @@ singleton ShaderData( ParticlesShaderData ) singleton ShaderData( OffscreenParticleCompositeShaderData ) { - DXVertexShaderFile = "shaders/common/particleCompositeV.hlsl"; - DXPixelShaderFile = "shaders/common/particleCompositeP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/particleCompositeV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/particleCompositeP.hlsl"; - OGLVertexShaderFile = "shaders/common/gl/particleCompositeV.glsl"; - OGLPixelShaderFile = "shaders/common/gl/particleCompositeP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/gl/particleCompositeV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/gl/particleCompositeP.glsl"; samplerNames[0] = "$colorSource"; samplerNames[1] = "$edgeSource"; @@ -59,11 +59,11 @@ singleton ShaderData( OffscreenParticleCompositeShaderData ) //----------------------------------------------------------------------------- new ShaderData( ReflectBump ) { - DXVertexShaderFile = "shaders/common/planarReflectBumpV.hlsl"; - DXPixelShaderFile = "shaders/common/planarReflectBumpP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/planarReflectBumpV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/planarReflectBumpP.hlsl"; - OGLVertexShaderFile = "shaders/common/gl/planarReflectBumpV.glsl"; - OGLPixelShaderFile = "shaders/common/gl/planarReflectBumpP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/gl/planarReflectBumpV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/gl/planarReflectBumpP.glsl"; samplerNames[0] = "$diffuseMap"; samplerNames[1] = "$refractMap"; @@ -74,11 +74,11 @@ new ShaderData( ReflectBump ) new ShaderData( Reflect ) { - DXVertexShaderFile = "shaders/common/planarReflectV.hlsl"; - DXPixelShaderFile = "shaders/common/planarReflectP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/planarReflectV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/planarReflectP.hlsl"; - OGLVertexShaderFile = "shaders/common/gl/planarReflectV.glsl"; - OGLPixelShaderFile = "shaders/common/gl/planarReflectP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/gl/planarReflectV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/gl/planarReflectP.glsl"; samplerNames[0] = "$diffuseMap"; samplerNames[1] = "$refractMap"; @@ -91,11 +91,11 @@ new ShaderData( Reflect ) //----------------------------------------------------------------------------- new ShaderData( fxFoliageReplicatorShader ) { - DXVertexShaderFile = "shaders/common/fxFoliageReplicatorV.hlsl"; - DXPixelShaderFile = "shaders/common/fxFoliageReplicatorP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/fxFoliageReplicatorV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/fxFoliageReplicatorP.hlsl"; - OGLVertexShaderFile = "shaders/common/gl/fxFoliageReplicatorV.glsl"; - OGLPixelShaderFile = "shaders/common/gl/fxFoliageReplicatorP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/gl/fxFoliageReplicatorV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/gl/fxFoliageReplicatorP.glsl"; samplerNames[0] = "$diffuseMap"; samplerNames[1] = "$alphaMap"; @@ -105,21 +105,21 @@ new ShaderData( fxFoliageReplicatorShader ) singleton ShaderData( VolumetricFogPrePassShader ) { - DXVertexShaderFile = "shaders/common/VolumetricFog/VFogPreV.hlsl"; - DXPixelShaderFile = "shaders/common/VolumetricFog/VFogPreP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/VolumetricFog/VFogPreV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/VolumetricFog/VFogPreP.hlsl"; - OGLVertexShaderFile = "shaders/common/VolumetricFog/gl/VFogPreV.glsl"; - OGLPixelShaderFile = "shaders/common/VolumetricFog/gl/VFogPreP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/VolumetricFog/gl/VFogPreV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/VolumetricFog/gl/VFogPreP.glsl"; pixVersion = 3.0; }; singleton ShaderData( VolumetricFogShader ) { - DXVertexShaderFile = "shaders/common/VolumetricFog/VFogV.hlsl"; - DXPixelShaderFile = "shaders/common/VolumetricFog/VFogP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/VolumetricFog/VFogV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/VolumetricFog/VFogP.hlsl"; - OGLVertexShaderFile = "shaders/common/VolumetricFog/gl/VFogV.glsl"; - OGLPixelShaderFile = "shaders/common/VolumetricFog/gl/VFogP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/VolumetricFog/gl/VFogV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/VolumetricFog/gl/VFogP.glsl"; samplerNames[0] = "$prepassTex"; samplerNames[1] = "$depthBuffer"; @@ -130,11 +130,23 @@ singleton ShaderData( VolumetricFogShader ) }; singleton ShaderData( VolumetricFogReflectionShader ) { - DXVertexShaderFile = "shaders/common/VolumetricFog/VFogPreV.hlsl"; - DXPixelShaderFile = "shaders/common/VolumetricFog/VFogRefl.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/VolumetricFog/VFogPreV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/VolumetricFog/VFogRefl.hlsl"; - OGLVertexShaderFile = "shaders/common/VolumetricFog/gl/VFogPreV.glsl"; - OGLPixelShaderFile = "shaders/common/VolumetricFog/gl/VFogRefl.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/VolumetricFog/gl/VFogPreV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/VolumetricFog/gl/VFogRefl.glsl"; + + pixVersion = 3.0; +}; +singleton ShaderData( CubemapSaveShader ) +{ + DXVertexShaderFile = "shaders/common/cubemapSaveV.hlsl"; + DXPixelShaderFile = "shaders/common/cubemapSaveP.hlsl"; + + OGLVertexShaderFile = "shaders/common/gl/cubemapSaveV.glsl"; + OGLPixelShaderFile = "shaders/common/gl/cubemapSaveP.glsl"; + + samplerNames[0] = "$cubemapTex"; pixVersion = 3.0; }; \ No newline at end of file diff --git a/Templates/Empty/game/core/scripts/client/terrainBlock.cs b/Templates/BaseGame/game/core/gfxData/terrainBlock.cs similarity index 82% rename from Templates/Empty/game/core/scripts/client/terrainBlock.cs rename to Templates/BaseGame/game/core/gfxData/terrainBlock.cs index 8be68f7d3..69802b1da 100644 --- a/Templates/Empty/game/core/scripts/client/terrainBlock.cs +++ b/Templates/BaseGame/game/core/gfxData/terrainBlock.cs @@ -23,11 +23,11 @@ /// Used when generating the blended base texture. singleton ShaderData( TerrainBlendShader ) { - DXVertexShaderFile = "shaders/common/terrain/blendV.hlsl"; - DXPixelShaderFile = "shaders/common/terrain/blendP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/terrain/blendV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/terrain/blendP.hlsl"; - OGLVertexShaderFile = "shaders/common/terrain/gl/blendV.glsl"; - OGLPixelShaderFile = "shaders/common/terrain/gl/blendP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/terrain/gl/blendV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/terrain/gl/blendP.glsl"; samplerNames[0] = "layerTex"; samplerNames[1] = "textureMap"; diff --git a/Templates/Empty/game/core/scripts/client/water.cs b/Templates/BaseGame/game/core/gfxData/water.cs similarity index 91% rename from Templates/Empty/game/core/scripts/client/water.cs rename to Templates/BaseGame/game/core/gfxData/water.cs index d010fe6d0..a7332d0c4 100644 --- a/Templates/Empty/game/core/scripts/client/water.cs +++ b/Templates/BaseGame/game/core/gfxData/water.cs @@ -28,11 +28,11 @@ singleton ShaderData( WaterShader ) { - DXVertexShaderFile = "shaders/common/water/waterV.hlsl"; - DXPixelShaderFile = "shaders/common/water/waterP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/water/waterV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/water/waterP.hlsl"; - OGLVertexShaderFile = "shaders/common/water/gl/waterV.glsl"; - OGLPixelShaderFile = "shaders/common/water/gl/waterP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/water/gl/waterV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/water/gl/waterP.glsl"; samplerNames[0] = "$bumpMap"; // noise samplerNames[1] = "$prepassTex"; // #prepass @@ -131,11 +131,11 @@ singleton CustomMaterial( UnderwaterMat ) singleton ShaderData( WaterBasicShader ) { - DXVertexShaderFile = "shaders/common/water/waterBasicV.hlsl"; - DXPixelShaderFile = "shaders/common/water/waterBasicP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/water/waterBasicV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/water/waterBasicP.hlsl"; - OGLVertexShaderFile = "shaders/common/water/gl/waterBasicV.glsl"; - OGLPixelShaderFile = "shaders/common/water/gl/waterBasicP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/water/gl/waterBasicV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/water/gl/waterBasicP.glsl"; samplerNames[0] = "$bumpMap"; samplerNames[2] = "$reflectMap"; diff --git a/Templates/Empty/game/core/profile/D3D9.ATITechnologiesInc.cs b/Templates/BaseGame/game/core/gfxprofile/D3D9.ATITechnologiesInc.cs similarity index 100% rename from Templates/Empty/game/core/profile/D3D9.ATITechnologiesInc.cs rename to Templates/BaseGame/game/core/gfxprofile/D3D9.ATITechnologiesInc.cs diff --git a/Templates/Empty/game/core/profile/D3D9.NVIDIA.GeForce8600.cs b/Templates/BaseGame/game/core/gfxprofile/D3D9.NVIDIA.GeForce8600.cs similarity index 100% rename from Templates/Empty/game/core/profile/D3D9.NVIDIA.GeForce8600.cs rename to Templates/BaseGame/game/core/gfxprofile/D3D9.NVIDIA.GeForce8600.cs diff --git a/Templates/Empty/game/core/profile/D3D9.NVIDIA.QuadroFXGo1000.cs b/Templates/BaseGame/game/core/gfxprofile/D3D9.NVIDIA.QuadroFXGo1000.cs similarity index 100% rename from Templates/Empty/game/core/profile/D3D9.NVIDIA.QuadroFXGo1000.cs rename to Templates/BaseGame/game/core/gfxprofile/D3D9.NVIDIA.QuadroFXGo1000.cs diff --git a/Templates/Empty/game/core/profile/D3D9.NVIDIA.cs b/Templates/BaseGame/game/core/gfxprofile/D3D9.NVIDIA.cs similarity index 100% rename from Templates/Empty/game/core/profile/D3D9.NVIDIA.cs rename to Templates/BaseGame/game/core/gfxprofile/D3D9.NVIDIA.cs diff --git a/Templates/Empty/game/core/profile/D3D9.cs b/Templates/BaseGame/game/core/gfxprofile/D3D9.cs similarity index 100% rename from Templates/Empty/game/core/profile/D3D9.cs rename to Templates/BaseGame/game/core/gfxprofile/D3D9.cs diff --git a/Templates/BaseGame/game/core/globals.cs b/Templates/BaseGame/game/core/globals.cs new file mode 100644 index 000000000..d4e4f1ca3 --- /dev/null +++ b/Templates/BaseGame/game/core/globals.cs @@ -0,0 +1,102 @@ +//----------------------------------------------------------------------------- +// 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. +//----------------------------------------------------------------------------- + +// ---------------------------------------------------------------------------- +// DInput keyboard, mouse, and joystick prefs +// ---------------------------------------------------------------------------- + +$pref::Input::MouseEnabled = 1; +$pref::Input::LinkMouseSensitivity = 1; +$pref::Input::KeyboardEnabled = 1; +$pref::Input::KeyboardTurnSpeed = 0.1; +$pref::Input::JoystickEnabled = 0; + +// ---------------------------------------------------------------------------- +// Video Preferences +// ---------------------------------------------------------------------------- + +// Set directory paths for various data or default images. +$pref::Video::ProfilePath = "core/gfxprofile"; +$pref::Video::missingTexturePath = "core/images/missingTexture.png"; +$pref::Video::unavailableTexturePath = "core/images/unavailable.png"; +$pref::Video::warningTexturePath = "core/images/warnMat.dds"; + +$pref::Video::disableVerticalSync = 1; +$pref::Video::mode = "800 600 false 32 60 4"; +$pref::Video::defaultFenceCount = 0; + +// This disables the hardware FSAA/MSAA so that we depend completely on the FXAA +// post effect which works on all cards and in deferred mode. Note that the new +// Intel Hybrid graphics on laptops will fail to initialize when hardware AA is +// enabled... so you've been warned. +$pref::Video::disableHardwareAA = true; + +$pref::Video::disableNormalmapping = false; +$pref::Video::disablePixSpecular = false; +$pref::Video::disableCubemapping = false; +$pref::Video::disableParallaxMapping = false; + +// The number of mipmap levels to drop on loaded textures to reduce video memory +// usage. It will skip any textures that have been defined as not allowing down +// scaling. +$pref::Video::textureReductionLevel = 0; + +$pref::Video::defaultAnisotropy = 1; +//$pref::Video::Gamma = 1.0; + +/// AutoDetect graphics quality levels the next startup. +$pref::Video::autoDetect = 1; + +// ---------------------------------------------------------------------------- +// Shader stuff +// ---------------------------------------------------------------------------- + +// This is the path used by ShaderGen to cache procedural shaders. If left +// blank ShaderGen will only cache shaders to memory and not to disk. +$shaderGen::cachePath = "data/shaderCache"; + +// Uncomment to disable ShaderGen, useful when debugging +//$ShaderGen::GenNewShaders = false; + +// Uncomment to dump disassembly for any shader that is compiled to disk. These +// will appear as shadername_dis.txt in the same path as the shader file. +//$gfx::disassembleAllShaders = true; + +// ---------------------------------------------------------------------------- +// Lighting and shadowing +// ---------------------------------------------------------------------------- + +// Uncomment to enable AdvancedLighting on the Mac (T3D 2009 Beta 3) +//$pref::machax::enableAdvancedLighting = true; + +$sceneLighting::cacheSize = 20000; +$sceneLighting::purgeMethod = "lastCreated"; +$sceneLighting::cacheLighting = 1; + +$pref::Shadows::textureScalar = 1.0; +$pref::Shadows::disable = false; + +// Sets the shadow filtering mode. +// None - Disables filtering. +// SoftShadow - Does a simple soft shadow +// SoftShadowHighQuality +$pref::Shadows::filterMode = "SoftShadow"; diff --git a/Templates/BaseGame/game/core/helperFunctions.cs b/Templates/BaseGame/game/core/helperFunctions.cs new file mode 100644 index 000000000..855b5164a --- /dev/null +++ b/Templates/BaseGame/game/core/helperFunctions.cs @@ -0,0 +1,954 @@ +//----------------------------------------------------------------------------- +// 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. +//----------------------------------------------------------------------------- + + +//------------------------------------------------------------------------------ +// Check if a script file exists, compiled or not. +function isScriptFile(%path) +{ + if( isFile(%path @ ".dso") || isFile(%path) ) + return true; + + return false; +} + +function loadMaterials() +{ + // Load any materials files for which we only have DSOs. + + for( %file = findFirstFile( "*/materials.cs.dso" ); + %file !$= ""; + %file = findNextFile( "*/materials.cs.dso" )) + { + // Only execute, if we don't have the source file. + %csFileName = getSubStr( %file, 0, strlen( %file ) - 4 ); + if( !isFile( %csFileName ) ) + exec( %csFileName ); + } + + // Load all source material files. + + for( %file = findFirstFile( "*/materials.cs" ); + %file !$= ""; + %file = findNextFile( "*/materials.cs" )) + { + exec( %file ); + } + + // Load all materials created by the material editor if + // the folder exists + if( IsDirectory( "materialEditor" ) ) + { + for( %file = findFirstFile( "materialEditor/*.cs.dso" ); + %file !$= ""; + %file = findNextFile( "materialEditor/*.cs.dso" )) + { + // Only execute, if we don't have the source file. + %csFileName = getSubStr( %file, 0, strlen( %file ) - 4 ); + if( !isFile( %csFileName ) ) + exec( %csFileName ); + } + + for( %file = findFirstFile( "materialEditor/*.cs" ); + %file !$= ""; + %file = findNextFile( "materialEditor/*.cs" )) + { + exec( %file ); + } + } +} + +function reloadMaterials() +{ + reloadTextures(); + loadMaterials(); + reInitMaterials(); +} + +function loadDatablockFiles( %datablockFiles, %recurse ) +{ + if ( %recurse ) + { + recursiveLoadDatablockFiles( %datablockFiles, 9999 ); + return; + } + + %count = %datablockFiles.count(); + for ( %i=0; %i < %count; %i++ ) + { + %file = %datablockFiles.getKey( %i ); + if ( !isFile(%file @ ".dso") && !isFile(%file) ) + continue; + + exec( %file ); + } + + // Destroy the incoming list. + //%datablockFiles.delete(); +} + +function recursiveLoadDatablockFiles( %datablockFiles, %previousErrors ) +{ + %reloadDatablockFiles = new ArrayObject(); + + // Keep track of the number of datablocks that + // failed during this pass. + %failedDatablocks = 0; + + // Try re-executing the list of datablock files. + %count = %datablockFiles.count(); + for ( %i=0; %i < %count; %i++ ) + { + %file = %datablockFiles.getKey( %i ); + if ( !isFile(%file @ ".dso") && !isFile(%file) ) + continue; + + // Start counting copy constructor creation errors. + $Con::objectCopyFailures = 0; + + exec( %file ); + + // If errors occured then store this file for re-exec later. + if ( $Con::objectCopyFailures > 0 ) + { + %reloadDatablockFiles.add( %file ); + %failedDatablocks = %failedDatablocks + $Con::objectCopyFailures; + } + } + + // Clear the object copy failure counter so that + // we get console error messages again. + $Con::objectCopyFailures = -1; + + // Delete the old incoming list... we're done with it. + //%datablockFiles.delete(); + + // If we still have datablocks to retry. + %newCount = %reloadDatablockFiles.count(); + if ( %newCount > 0 ) + { + // If the datablock failures have not been reduced + // from the last pass then we must have a real syntax + // error and not just a bad dependancy. + if ( %previousErrors > %failedDatablocks ) + recursiveLoadDatablockFiles( %reloadDatablockFiles, %failedDatablocks ); + + else + { + // Since we must have real syntax errors do one + // last normal exec to output error messages. + loadDatablockFiles( %reloadDatablockFiles, false ); + } + + return; + } + + // Cleanup the empty reload list. + %reloadDatablockFiles.delete(); +} + +function getUserPath() +{ + %temp = getUserHomeDirectory(); + echo(%temp); + if(!isDirectory(%temp)) + { + %temp = getUserDataDirectory(); + echo(%temp); + if(!isDirectory(%temp)) + { + %userPath = "data"; + } + else + { + //put it in appdata/roaming + %userPath = %temp @ "/" @ $appName; + } + } + else + { + //put it in user/documents + %userPath = %temp @ "/" @ $appName; + } + return %userPath; +} + +function getPrefpath() +{ + $prefPath = getUserPath() @ "/preferences"; + return $prefPath; +} + +function updateTSShapeLoadProgress(%progress, %msg) +{ + // Check if the loading GUI is visible and use that instead of the + // separate import progress GUI if possible + if ( isObject(LoadingGui) && LoadingGui.isAwake() ) + { + // Save/Restore load progress at the start/end of the import process + if ( %progress == 0 ) + { + ColladaImportProgress.savedProgress = LoadingProgress.getValue(); + ColladaImportProgress.savedText = LoadingProgressTxt.getValue(); + + ColladaImportProgress.msgPrefix = "Importing " @ %msg; + %msg = "Reading file into memory..."; + } + else if ( %progress == 1.0 ) + { + LoadingProgress.setValue( ColladaImportProgress.savedProgress ); + LoadingProgressTxt.setValue( ColladaImportProgress.savedText ); + } + + %msg = ColladaImportProgress.msgPrefix @ ": " @ %msg; + + %progressCtrl = LoadingProgress; + %textCtrl = LoadingProgressTxt; + } + else + { + //it's probably the editors using it + if(isFunction("updateToolTSShapeLoadProgress")) + { + updateToolTSShapeLoadProgress(%progress, %msg); + } + } + + // Update progress indicators + if (%progress == 0) + { + %progressCtrl.setValue(0.001); + %textCtrl.setText(%msg); + } + else if (%progress != 1.0) + { + %progressCtrl.setValue(%progress); + %textCtrl.setText(%msg); + } + + Canvas.repaint(33); +} + +/// A helper function which will return the ghosted client object +/// from a server object when connected to a local server. +function serverToClientObject( %serverObject ) +{ + assert( isObject( LocalClientConnection ), "serverToClientObject() - No local client connection found!" ); + assert( isObject( ServerConnection ), "serverToClientObject() - No server connection found!" ); + + %ghostId = LocalClientConnection.getGhostId( %serverObject ); + if ( %ghostId == -1 ) + return 0; + + return ServerConnection.resolveGhostID( %ghostId ); +} + +//---------------------------------------------------------------------------- +// Debug commands +//---------------------------------------------------------------------------- + +function netSimulateLag( %msDelay, %packetLossPercent ) +{ + if ( %packetLossPercent $= "" ) + %packetLossPercent = 0; + + commandToServer( 'NetSimulateLag', %msDelay, %packetLossPercent ); +} + +//Various client functions + +function validateDatablockName(%name) +{ + // remove whitespaces at beginning and end + %name = trim( %name ); + + // remove numbers at the beginning + %numbers = "0123456789"; + while( strlen(%name) > 0 ) + { + // the first character + %firstChar = getSubStr( %name, 0, 1 ); + // if the character is a number remove it + if( strpos( %numbers, %firstChar ) != -1 ) + { + %name = getSubStr( %name, 1, strlen(%name) -1 ); + %name = ltrim( %name ); + } + else + break; + } + + // replace whitespaces with underscores + %name = strreplace( %name, " ", "_" ); + + // remove any other invalid characters + %invalidCharacters = "-+*/%$&§=()[].?\"#,;!~<>|°^{}"; + %name = stripChars( %name, %invalidCharacters ); + + if( %name $= "" ) + %name = "Unnamed"; + + return %name; +} + +//-------------------------------------------------------------------------- +// Finds location of %word in %text, starting at %start. Works just like strPos +//-------------------------------------------------------------------------- + +function wordPos(%text, %word, %start) +{ + if (%start $= "") %start = 0; + + if (strpos(%text, %word, 0) == -1) return -1; + %count = getWordCount(%text); + if (%start >= %count) return -1; + for (%i = %start; %i < %count; %i++) + { + if (getWord( %text, %i) $= %word) return %i; + } + return -1; +} + +//-------------------------------------------------------------------------- +// Finds location of %field in %text, starting at %start. Works just like strPos +//-------------------------------------------------------------------------- + +function fieldPos(%text, %field, %start) +{ + if (%start $= "") %start = 0; + + if (strpos(%text, %field, 0) == -1) return -1; + %count = getFieldCount(%text); + if (%start >= %count) return -1; + for (%i = %start; %i < %count; %i++) + { + if (getField( %text, %i) $= %field) return %i; + } + return -1; +} + +//-------------------------------------------------------------------------- +// returns the text in a file with "\n" at the end of each line +//-------------------------------------------------------------------------- + +function loadFileText( %file) +{ + %fo = new FileObject(); + %fo.openForRead(%file); + %text = ""; + while(!%fo.isEOF()) + { + %text = %text @ %fo.readLine(); + if (!%fo.isEOF()) %text = %text @ "\n"; + } + + %fo.delete(); + return %text; +} + +function setValueSafe(%dest, %val) +{ + %cmd = %dest.command; + %alt = %dest.altCommand; + %dest.command = ""; + %dest.altCommand = ""; + + %dest.setValue(%val); + + %dest.command = %cmd; + %dest.altCommand = %alt; +} + +function shareValueSafe(%source, %dest) +{ + setValueSafe(%dest, %source.getValue()); +} + +function shareValueSafeDelay(%source, %dest, %delayMs) +{ + schedule(%delayMs, 0, shareValueSafe, %source, %dest); +} + + +//------------------------------------------------------------------------------ +// An Aggregate Control is a plain GuiControl that contains other controls, +// which all share a single job or represent a single value. +//------------------------------------------------------------------------------ + +// AggregateControl.setValue( ) propagates the value to any control that has an +// internal name. +function AggregateControl::setValue(%this, %val, %child) +{ + for(%i = 0; %i < %this.getCount(); %i++) + { + %obj = %this.getObject(%i); + if( %obj == %child ) + continue; + + if(%obj.internalName !$= "") + setValueSafe(%obj, %val); + } +} + +// AggregateControl.getValue() uses the value of the first control that has an +// internal name, if it has not cached a value via .setValue +function AggregateControl::getValue(%this) +{ + for(%i = 0; %i < %this.getCount(); %i++) + { + %obj = %this.getObject(%i); + if(%obj.internalName !$= "") + { + //error("obj = " @ %obj.getId() @ ", " @ %obj.getName() @ ", " @ %obj.internalName ); + //error(" value = " @ %obj.getValue()); + return %obj.getValue(); + } + } +} + +// AggregateControl.updateFromChild( ) is called by child controls to propagate +// a new value, and to trigger the onAction() callback. +function AggregateControl::updateFromChild(%this, %child) +{ + %val = %child.getValue(); + if(%val == mCeil(%val)){ + %val = mCeil(%val); + }else{ + if ( %val <= -100){ + %val = mCeil(%val); + }else if ( %val <= -10){ + %val = mFloatLength(%val, 1); + }else if ( %val < 0){ + %val = mFloatLength(%val, 2); + }else if ( %val >= 1000){ + %val = mCeil(%val); + }else if ( %val >= 100){ + %val = mFloatLength(%val, 1); + }else if ( %val >= 10){ + %val = mFloatLength(%val, 2); + }else if ( %val > 0){ + %val = mFloatLength(%val, 3); + } + } + %this.setValue(%val, %child); + %this.onAction(); +} + +// default onAction stub, here only to prevent console spam warnings. +function AggregateControl::onAction(%this) +{ +} + +// call a method on all children that have an internalName and that implement the method. +function AggregateControl::callMethod(%this, %method, %args) +{ + for(%i = 0; %i < %this.getCount(); %i++) + { + %obj = %this.getObject(%i); + if(%obj.internalName !$= "" && %obj.isMethod(%method)) + eval(%obj @ "." @ %method @ "( " @ %args @ " );"); + } + +} + +//------------------------------------------------------------------------------ +// Altered Version of TGB's QuickEditDropDownTextEditCtrl +//------------------------------------------------------------------------------ +function QuickEditDropDownTextEditCtrl::onRenameItem( %this ) +{ +} + +function QuickEditDropDownTextEditCtrl::updateFromChild( %this, %ctrl ) +{ + if( %ctrl.internalName $= "PopUpMenu" ) + { + %this->TextEdit.setText( %ctrl.getText() ); + } + else if ( %ctrl.internalName $= "TextEdit" ) + { + %popup = %this->PopupMenu; + %popup.changeTextById( %popup.getSelected(), %ctrl.getText() ); + %this.onRenameItem(); + } +} + +// Writes out all script functions to a file. +function writeOutFunctions() +{ + new ConsoleLogger(logger, "scriptFunctions.txt", false); + dumpConsoleFunctions(); + logger.delete(); +} + +// Writes out all script classes to a file. +function writeOutClasses() +{ + new ConsoleLogger(logger, "scriptClasses.txt", false); + dumpConsoleClasses(); + logger.delete(); +} + +// +function compileFiles(%pattern) +{ + %path = filePath(%pattern); + + %saveDSO = $Scripts::OverrideDSOPath; + %saveIgnore = $Scripts::ignoreDSOs; + + $Scripts::OverrideDSOPath = %path; + $Scripts::ignoreDSOs = false; + %mainCsFile = makeFullPath("main.cs"); + + for (%file = findFirstFileMultiExpr(%pattern); %file !$= ""; %file = findNextFileMultiExpr(%pattern)) + { + // we don't want to try and compile the primary main.cs + if(%mainCsFile !$= %file) + compile(%file, true); + } + + $Scripts::OverrideDSOPath = %saveDSO; + $Scripts::ignoreDSOs = %saveIgnore; + +} + +function displayHelp() +{ + // Notes on logmode: console logging is written to console.log. + // -log 0 disables console logging. + // -log 1 appends to existing logfile; it also closes the file + // (flushing the write buffer) after every write. + // -log 2 overwrites any existing logfile; it also only closes + // the logfile when the application shuts down. (default) + + error( + "Torque Demo command line options:\n"@ + " -log Logging behavior; see main.cs comments for details\n"@ + " -game Reset list of mods to only contain \n"@ + " Works like the -game argument\n"@ + " -dir Add to list of directories\n"@ + " -console Open a separate console\n"@ + " -jSave Record a journal\n"@ + " -jPlay Play back a journal\n"@ + " -help Display this help message\n" + ); +} + +// Execute startup scripts for each mod, starting at base and working up +function loadDir(%dir) +{ + pushback($userDirs, %dir, ";"); + + if (isScriptFile(%dir @ "/main.cs")) + exec(%dir @ "/main.cs"); +} + +function loadDirs(%dirPath) +{ + %dirPath = nextToken(%dirPath, token, ";"); + if (%dirPath !$= "") + loadDirs(%dirPath); + + if(exec(%token @ "/main.cs") != true) + { + error("Error: Unable to find specified directory: " @ %token ); + $dirCount--; + } +} + +//------------------------------------------------------------------------------ +// Utility remap functions: +//------------------------------------------------------------------------------ + +function ActionMap::copyBind( %this, %otherMap, %command ) +{ + if ( !isObject( %otherMap ) ) + { + error( "ActionMap::copyBind - \"" @ %otherMap @ "\" is not an object!" ); + return; + } + + %bind = %otherMap.getBinding( %command ); + if ( %bind !$= "" ) + { + %device = getField( %bind, 0 ); + %action = getField( %bind, 1 ); + %flags = %otherMap.isInverted( %device, %action ) ? "SDI" : "SD"; + %deadZone = %otherMap.getDeadZone( %device, %action ); + %scale = %otherMap.getScale( %device, %action ); + %this.bind( %device, %action, %flags, %deadZone, %scale, %command ); + } +} + +//------------------------------------------------------------------------------ +function ActionMap::blockBind( %this, %otherMap, %command ) +{ + if ( !isObject( %otherMap ) ) + { + error( "ActionMap::blockBind - \"" @ %otherMap @ "\" is not an object!" ); + return; + } + + %bind = %otherMap.getBinding( %command ); + if ( %bind !$= "" ) + %this.bind( getField( %bind, 0 ), getField( %bind, 1 ), "" ); +} + +//Dev helpers +/// Shortcut for typing dbgSetParameters with the default values torsion uses. +function dbgTorsion() +{ + dbgSetParameters( 6060, "password", false ); +} + +/// Reset the input state to a default of all-keys-up. +/// A helpful remedy for when Torque misses a button up event do to your breakpoints +/// and can't stop shooting / jumping / strafing. +function mvReset() +{ + for ( %i = 0; %i < 6; %i++ ) + setVariable( "mvTriggerCount" @ %i, 0 ); + + $mvUpAction = 0; + $mvDownAction = 0; + $mvLeftAction = 0; + $mvRightAction = 0; + + // There are others. +} + +//Persistance Manager tests + +new PersistenceManager(TestPManager); + +function runPManTest(%test) +{ + if (!isObject(TestPManager)) + return; + + if (%test $= "") + %test = 100; + + switch(%test) + { + case 0: + TestPManager.testFieldUpdates(); + case 1: + TestPManager.testObjectRename(); + case 2: + TestPManager.testNewObject(); + case 3: + TestPManager.testNewGroup(); + case 4: + TestPManager.testMoveObject(); + case 5: + TestPManager.testObjectRemove(); + case 100: + TestPManager.testFieldUpdates(); + TestPManager.testObjectRename(); + TestPManager.testNewObject(); + TestPManager.testNewGroup(); + TestPManager.testMoveObject(); + TestPManager.testObjectRemove(); + } +} + +function TestPManager::testFieldUpdates(%doNotSave) +{ + // Set some objects as dirty + TestPManager.setDirty(AudioGui); + TestPManager.setDirty(AudioSim); + TestPManager.setDirty(AudioMessage); + + // Alter some of the existing fields + AudioEffect.isLooping = true; + AudioMessage.isLooping = true; + AudioEffect.is3D = true; + + // Test removing a field + TestPManager.removeField(AudioGui, "isLooping"); + + // Alter some of the persistent fields + AudioGui.referenceDistance = 0.8; + AudioMessage.referenceDistance = 0.8; + + // Add some new dynamic fields + AudioGui.foo = "bar"; + AudioEffect.foo = "bar"; + + // Remove an object from the dirty list + // It shouldn't get updated in the file + TestPManager.removeDirty(AudioEffect); + + // Dirty an object in another file as well + TestPManager.setDirty(WarningMaterial); + + // Update a field that doesn't exist + WarningMaterial.glow[0] = true; + + // Drity another object to test for crashes + // when a dirty object is deleted + TestPManager.setDirty(SFXPausedSet); + + // Delete the object + SFXPausedSet.delete(); + + // Unless %doNotSave is set (by a batch/combo test) + // then go ahead and save now + if (!%doNotSave) + TestPManager.saveDirty(); +} + +function TestPManager::testObjectRename(%doNotSave) +{ + // Flag an object as dirty + if (isObject(AudioGui)) + TestPManager.setDirty(AudioGui); + else if (isObject(AudioGuiFoo)) + TestPManager.setDirty(AudioGuiFoo); + + // Rename it + if (isObject(AudioGui)) + AudioGui.setName(AudioGuiFoo); + else if (isObject(AudioGuiFoo)) + AudioGuiFoo.setName(AudioGui); + + // Unless %doNotSave is set (by a batch/combo test) + // then go ahead and save now + if (!%doNotSave) + TestPManager.saveDirty(); +} + +function TestPManager::testNewObject(%doNotSave) +{ + // Test adding a new named object + new SFXDescription(AudioNew) + { + volume = 0.5; + isLooping = true; + channel = $GuiAudioType; + foo = 2; + }; + + // Flag it as dirty + TestPManager.setDirty(AudioNew, "core/scripts/client/audio.cs"); + + // Test adding a new unnamed object + %obj = new SFXDescription() + { + volume = 0.75; + isLooping = true; + bar = 3; + }; + + // Flag it as dirty + TestPManager.setDirty(%obj, "core/scripts/client/audio.cs"); + + // Test adding an "empty" object + new SFXDescription(AudioEmpty); + + TestPManager.setDirty(AudioEmpty, "core/scripts/client/audio.cs"); + + // Unless %doNotSave is set (by a batch/combo test) + // then go ahead and save now + if (!%doNotSave) + TestPManager.saveDirty(); +} + +function TestPManager::testNewGroup(%doNotSave) +{ + // Test adding a new named SimGroup + new SimGroup(TestGroup) + { + foo = "bar"; + + new SFXDescription(TestObject) + { + volume = 0.5; + isLooping = true; + channel = $GuiAudioType; + foo = 1; + }; + new SimGroup(SubGroup) + { + foo = 2; + + new SFXDescription(SubObject) + { + volume = 0.5; + isLooping = true; + channel = $GuiAudioType; + foo = 3; + }; + }; + }; + + // Flag this as dirty + TestPManager.setDirty(TestGroup, "core/scripts/client/audio.cs"); + + // Test adding a new unnamed SimGroup + %group = new SimGroup() + { + foo = "bar"; + + new SFXDescription() + { + volume = 0.75; + channel = $GuiAudioType; + foo = 4; + }; + new SimGroup() + { + foo = 5; + + new SFXDescription() + { + volume = 0.75; + isLooping = true; + channel = $GuiAudioType; + foo = 6; + }; + }; + }; + + // Flag this as dirty + TestPManager.setDirty(%group, "core/scripts/client/audio.cs"); + + // Test adding a new unnamed SimSet + %set = new SimSet() + { + foo = "bar"; + + new SFXDescription() + { + volume = 0.75; + channel = $GuiAudioType; + foo = 7; + }; + new SimGroup() + { + foo = 8; + + new SFXDescription() + { + volume = 0.75; + isLooping = true; + channel = $GuiAudioType; + foo = 9; + }; + }; + }; + + // Flag this as dirty + TestPManager.setDirty(%set, "core/scripts/client/audio.cs"); + + // Unless %doNotSave is set (by a batch/combo test) + // then go ahead and save now + if (!%doNotSave) + TestPManager.saveDirty(); +} + +function TestPManager::testMoveObject(%doNotSave) +{ + // First add a couple of groups to the file + new SimGroup(MoveGroup1) + { + foo = "bar"; + + new SFXDescription(MoveObject1) + { + volume = 0.5; + isLooping = true; + channel = $GuiAudioType; + foo = 1; + }; + + new SimSet(SubGroup1) + { + new SFXDescription(SubObject1) + { + volume = 0.75; + isLooping = true; + channel = $GuiAudioType; + foo = 2; + }; + }; + }; + + // Flag this as dirty + TestPManager.setDirty(MoveGroup1, "core/scripts/client/audio.cs"); + + new SimGroup(MoveGroup2) + { + foo = "bar"; + + new SFXDescription(MoveObject2) + { + volume = 0.5; + isLooping = true; + channel = $GuiAudioType; + foo = 3; + }; + }; + + // Flag this as dirty + TestPManager.setDirty(MoveGroup2, "core/scripts/client/audio.cs"); + + // Unless %doNotSave is set (by a batch/combo test) + // then go ahead and save now + if (!%doNotSave) + TestPManager.saveDirty(); + + // Set them as dirty again + TestPManager.setDirty(MoveGroup1); + TestPManager.setDirty(MoveGroup2); + + // Give the subobject an new value + MoveObject1.foo = 4; + + // Move it into the other group + MoveGroup1.add(MoveObject2); + + // Switch the other subobject + MoveGroup2.add(MoveObject1); + + // Also add a new unnamed object to one of the groups + %obj = new SFXDescription() + { + volume = 0.75; + isLooping = true; + bar = 5; + }; + + MoveGroup1.add(%obj); + + // Unless %doNotSave is set (by a batch/combo test) + // then go ahead and save now + if (!%doNotSave) + TestPManager.saveDirty(); +} + +function TestPManager::testObjectRemove(%doNotSave) +{ + TestPManager.removeObjectFromFile(AudioSim); +} + diff --git a/Templates/Empty/game/core/scripts/client/postFx/AreaMap33.dds b/Templates/BaseGame/game/core/images/AreaMap33.dds similarity index 100% rename from Templates/Empty/game/core/scripts/client/postFx/AreaMap33.dds rename to Templates/BaseGame/game/core/images/AreaMap33.dds diff --git a/Templates/Empty/game/core/art/gui/images/button.png b/Templates/BaseGame/game/core/images/button.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/button.png rename to Templates/BaseGame/game/core/images/button.png diff --git a/Templates/Empty/game/core/scripts/client/postFx/textures/caustics_1.png b/Templates/BaseGame/game/core/images/caustics_1.png similarity index 100% rename from Templates/Empty/game/core/scripts/client/postFx/textures/caustics_1.png rename to Templates/BaseGame/game/core/images/caustics_1.png diff --git a/Templates/Empty/game/core/scripts/client/postFx/textures/caustics_2.png b/Templates/BaseGame/game/core/images/caustics_2.png similarity index 100% rename from Templates/Empty/game/core/scripts/client/postFx/textures/caustics_2.png rename to Templates/BaseGame/game/core/images/caustics_2.png diff --git a/Templates/Empty/game/core/art/gui/images/checkbox.png b/Templates/BaseGame/game/core/images/checkbox.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/checkbox.png rename to Templates/BaseGame/game/core/images/checkbox.png diff --git a/Templates/Empty/game/core/art/gui/images/group-border.png b/Templates/BaseGame/game/core/images/group-border.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/group-border.png rename to Templates/BaseGame/game/core/images/group-border.png diff --git a/Templates/Empty/game/core/art/gui/images/inactive-overlay.png b/Templates/BaseGame/game/core/images/inactive-overlay.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/inactive-overlay.png rename to Templates/BaseGame/game/core/images/inactive-overlay.png diff --git a/Templates/Empty/game/core/art/gui/images/loadingbar.png b/Templates/BaseGame/game/core/images/loadingbar.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/loadingbar.png rename to Templates/BaseGame/game/core/images/loadingbar.png diff --git a/Templates/Empty/game/core/art/materials.cs b/Templates/BaseGame/game/core/images/materials.cs similarity index 89% rename from Templates/Empty/game/core/art/materials.cs rename to Templates/BaseGame/game/core/images/materials.cs index c2bcf52a6..a13c751b3 100644 --- a/Templates/Empty/game/core/art/materials.cs +++ b/Templates/BaseGame/game/core/images/materials.cs @@ -20,13 +20,13 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -singleton Material( BlankWhite ) -{ - diffuseMap[0] = "core/art/white"; - mapTo = "white"; - materialTag0 = "Miscellaneous"; -}; - singleton Material( Empty ) { }; + +singleton Material(WarningMaterial) { + detailMap[0] = "missingTexture"; + diffuseColor[0] = "25 16 0"; + emissive[0] = false; + translucent = false; +}; diff --git a/Templates/Empty/game/core/art/missingTexture.png b/Templates/BaseGame/game/core/images/missingTexture.png similarity index 100% rename from Templates/Empty/game/core/art/missingTexture.png rename to Templates/BaseGame/game/core/images/missingTexture.png diff --git a/Templates/Empty/game/core/scripts/client/postFx/noise.png b/Templates/BaseGame/game/core/images/noise.png similarity index 100% rename from Templates/Empty/game/core/scripts/client/postFx/noise.png rename to Templates/BaseGame/game/core/images/noise.png diff --git a/Templates/Empty/game/core/scripts/client/postFx/null_color_ramp.png b/Templates/BaseGame/game/core/images/null_color_ramp.png similarity index 100% rename from Templates/Empty/game/core/scripts/client/postFx/null_color_ramp.png rename to Templates/BaseGame/game/core/images/null_color_ramp.png diff --git a/Templates/Empty/game/core/art/gui/images/scrollBar.png b/Templates/BaseGame/game/core/images/scrollBar.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/scrollBar.png rename to Templates/BaseGame/game/core/images/scrollBar.png diff --git a/Templates/Empty/game/core/art/gui/images/textEdit.png b/Templates/BaseGame/game/core/images/textEdit.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/textEdit.png rename to Templates/BaseGame/game/core/images/textEdit.png diff --git a/Templates/Empty/game/tools/gui/images/thumbHightlightButton.png b/Templates/BaseGame/game/core/images/thumbHighlightButton.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/thumbHightlightButton.png rename to Templates/BaseGame/game/core/images/thumbHighlightButton.png diff --git a/Templates/Empty/game/core/art/unavailable.png b/Templates/BaseGame/game/core/images/unavailable.png similarity index 100% rename from Templates/Empty/game/core/art/unavailable.png rename to Templates/BaseGame/game/core/images/unavailable.png diff --git a/Templates/Empty/game/core/art/warnMat.dds b/Templates/BaseGame/game/core/images/warnMat.dds similarity index 100% rename from Templates/Empty/game/core/art/warnMat.dds rename to Templates/BaseGame/game/core/images/warnMat.dds diff --git a/Templates/Empty/game/core/art/gui/images/window.png b/Templates/BaseGame/game/core/images/window.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/window.png rename to Templates/BaseGame/game/core/images/window.png diff --git a/Templates/Empty/game/core/scripts/client/lighting.cs b/Templates/BaseGame/game/core/lighting.cs similarity index 76% rename from Templates/Empty/game/core/scripts/client/lighting.cs rename to Templates/BaseGame/game/core/lighting.cs index 231b44d17..9ece7d1a0 100644 --- a/Templates/Empty/game/core/scripts/client/lighting.cs +++ b/Templates/BaseGame/game/core/lighting.cs @@ -20,16 +20,12 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- - -//--------------------------------------------------------------------------------------------- - -function initLightingSystems() +function initLightingSystems(%manager) { - echo( "\n--------- Initializing Lighting Systems ---------" ); + echo( "\nInitializing Lighting Systems" ); // First exec the scripts for the different light managers // in the lighting folder. - %pattern = "./lighting/*/init.cs"; %file = findFirstFile( %pattern ); if ( %file $= "" ) @@ -38,49 +34,30 @@ function initLightingSystems() %pattern = "./lighting/*/init.cs.dso"; %file = findFirstFile( %pattern ); } - + while( %file !$= "" ) { exec( %file ); %file = findNextFile( %pattern ); } - + // Try the perfered one first. - %success = setLightManager( $pref::lightManager ); - if ( !%success ) - { - // The perfered one fell thru... so go thru the default - // light managers until we find one that works. - %lmCount = getFieldCount( $lightManager::defaults ); - for ( %i = 0; %i < %lmCount; %i++ ) - { - %lmName = getField( $lightManager::defaults, %i ); - %success = setLightManager( %lmName ); - if ( %success ) - break; - } - } - + %success = setLightManager(%manager); + // Did we completely fail to initialize a light manager? - if ( !%success ) + if (!%success) { // If we completely failed to initialize a light // manager then the 3d scene cannot be rendered. quitWithErrorMessage( "Failed to set a light manager!" ); } - - echo( "\n" ); } //--------------------------------------------------------------------------------------------- function onLightManagerActivate( %lmName ) { - $pref::lightManager = %lmName; - echo( "Using " @ $pref::lightManager ); - // Call activation callbacks. - %activateNewFn = "onActivate" @ getWord( %lmName, 0 ) @ "LM"; if( isFunction( %activateNewFn ) ) eval( %activateNewFn @ "();" ); @@ -91,7 +68,6 @@ function onLightManagerActivate( %lmName ) function onLightManagerDeactivate( %lmName ) { // Call deactivation callback. - %deactivateOldFn = "onDeactivate" @ getWord( %lmName, 0 ) @ "LM"; if( isFunction( %deactivateOldFn ) ) eval( %deactivateOldFn @ "();" ); diff --git a/Templates/BaseGame/game/core/lighting/advanced/deferredShading.cs b/Templates/BaseGame/game/core/lighting/advanced/deferredShading.cs new file mode 100644 index 000000000..1b998db3b --- /dev/null +++ b/Templates/BaseGame/game/core/lighting/advanced/deferredShading.cs @@ -0,0 +1,70 @@ +singleton ShaderData( ClearGBufferShader ) +{ + DXVertexShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/deferredClearGBufferV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/deferredClearGBufferP.hlsl"; + + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/gl/deferredClearGBufferP.glsl"; + + pixVersion = 2.0; +}; + +singleton ShaderData( DeferredColorShader ) +{ + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFx/postFxV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/deferredColorShaderP.hlsl"; + + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/gl/deferredColorShaderP.glsl"; + + pixVersion = 2.0; +}; + +// Primary Deferred Shader +new GFXStateBlockData( AL_DeferredShadingState : PFX_DefaultStateBlock ) +{ + cullMode = GFXCullNone; + + blendDefined = true; + blendEnable = true; + blendSrc = GFXBlendSrcAlpha; + blendDest = GFXBlendInvSrcAlpha; + + samplersDefined = true; + samplerStates[0] = SamplerWrapLinear; + samplerStates[1] = SamplerWrapLinear; + samplerStates[2] = SamplerWrapLinear; + samplerStates[3] = SamplerWrapLinear; +}; + +new ShaderData( AL_DeferredShader ) +{ + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/deferredShadingP.hlsl"; + + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/gl/deferredShadingP.glsl"; + + samplerNames[0] = "colorBufferTex"; + samplerNames[1] = "lightPrePassTex"; + samplerNames[2] = "matInfoTex"; + samplerNames[3] = "prepassTex"; + + pixVersion = 2.0; +}; + +singleton PostEffect( AL_DeferredShading ) +{ + renderTime = "PFXAfterBin"; + renderBin = "SkyBin"; + shader = AL_DeferredShader; + stateBlock = AL_DeferredShadingState; + texture[0] = "#color"; + texture[1] = "#lightinfo"; + texture[2] = "#matinfo"; + texture[3] = "#prepass"; + + target = "$backBuffer"; + renderPriority = 10000; + allowReflectPass = true; +}; \ No newline at end of file diff --git a/Templates/Empty/game/core/scripts/client/lighting/advanced/init.cs b/Templates/BaseGame/game/core/lighting/advanced/init.cs similarity index 97% rename from Templates/Empty/game/core/scripts/client/lighting/advanced/init.cs rename to Templates/BaseGame/game/core/lighting/advanced/init.cs index d74aff69a..6941138c7 100644 --- a/Templates/Empty/game/core/scripts/client/lighting/advanced/init.cs +++ b/Templates/BaseGame/game/core/lighting/advanced/init.cs @@ -40,9 +40,6 @@ $pref::LightManager::sgUseToneMapping = ""; */ exec( "./shaders.cs" ); -exec( "./lightViz.cs" ); -exec( "./shadowViz.cs" ); -exec( "./shadowViz.gui" ); exec( "./deferredShading.cs" ); function onActivateAdvancedLM() @@ -59,7 +56,7 @@ function onActivateAdvancedLM() // Enable the offscreen target so that AL will work // with MSAA back buffers and for HDR rendering. AL_FormatToken.enable(); - + // Activate Deferred Shading AL_DeferredShading.enable(); } @@ -68,7 +65,7 @@ function onDeactivateAdvancedLM() { // Disable the offscreen render target. AL_FormatToken.disable(); - + // Deactivate Deferred Shading AL_DeferredShading.disable(); } diff --git a/Templates/Empty/game/core/scripts/client/lighting/advanced/shaders.cs b/Templates/BaseGame/game/core/lighting/advanced/shaders.cs similarity index 83% rename from Templates/Empty/game/core/scripts/client/lighting/advanced/shaders.cs rename to Templates/BaseGame/game/core/lighting/advanced/shaders.cs index 08a82b8dc..6cf97f810 100644 --- a/Templates/Empty/game/core/scripts/client/lighting/advanced/shaders.cs +++ b/Templates/BaseGame/game/core/lighting/advanced/shaders.cs @@ -60,11 +60,11 @@ new GFXStateBlockData( AL_VectorLightState ) // Vector Light Material new ShaderData( AL_VectorLightShader ) { - DXVertexShaderFile = "shaders/common/lighting/advanced/farFrustumQuadV.hlsl"; - DXPixelShaderFile = "shaders/common/lighting/advanced/vectorLightP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/farFrustumQuadV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/vectorLightP.hlsl"; - OGLVertexShaderFile = "shaders/common/lighting/advanced/gl/farFrustumQuadV.glsl"; - OGLPixelShaderFile = "shaders/common/lighting/advanced/gl/vectorLightP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/gl/farFrustumQuadV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/gl/vectorLightP.glsl"; samplerNames[0] = "$prePassBuffer"; samplerNames[1] = "$shadowMap"; @@ -74,6 +74,7 @@ new ShaderData( AL_VectorLightShader ) samplerNames[5] = "$lightBuffer"; samplerNames[6] = "$colorBuffer"; samplerNames[7] = "$matInfoBuffer"; + pixVersion = 3.0; }; @@ -85,7 +86,7 @@ new CustomMaterial( AL_VectorLightMaterial ) sampler["prePassBuffer"] = "#prepass"; sampler["shadowMap"] = "$dynamiclight"; sampler["dynamicShadowMap"] = "$dynamicShadowMap"; - sampler["ssaoMask"] = "#ssaoMask"; + sampler["ssaoMask"] = "#ssaoMask"; sampler["lightBuffer"] = "#lightinfo"; sampler["colorBuffer"] = "#color"; sampler["matInfoBuffer"] = "#matinfo"; @@ -136,11 +137,11 @@ new GFXStateBlockData( AL_ConvexLightState ) // Point Light Material new ShaderData( AL_PointLightShader ) { - DXVertexShaderFile = "shaders/common/lighting/advanced/convexGeometryV.hlsl"; - DXPixelShaderFile = "shaders/common/lighting/advanced/pointLightP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/convexGeometryV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/pointLightP.hlsl"; - OGLVertexShaderFile = "shaders/common/lighting/advanced/gl/convexGeometryV.glsl"; - OGLPixelShaderFile = "shaders/common/lighting/advanced/gl/pointLightP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/gl/convexGeometryV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/gl/pointLightP.glsl"; samplerNames[0] = "$prePassBuffer"; samplerNames[1] = "$shadowMap"; @@ -175,11 +176,11 @@ new CustomMaterial( AL_PointLightMaterial ) // Spot Light Material new ShaderData( AL_SpotLightShader ) { - DXVertexShaderFile = "shaders/common/lighting/advanced/convexGeometryV.hlsl"; - DXPixelShaderFile = "shaders/common/lighting/advanced/spotLightP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/convexGeometryV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/spotLightP.hlsl"; - OGLVertexShaderFile = "shaders/common/lighting/advanced/gl/convexGeometryV.glsl"; - OGLPixelShaderFile = "shaders/common/lighting/advanced/gl/spotLightP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/gl/convexGeometryV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/gl/spotLightP.glsl"; samplerNames[0] = "$prePassBuffer"; samplerNames[1] = "$shadowMap"; @@ -189,7 +190,7 @@ new ShaderData( AL_SpotLightShader ) samplerNames[5] = "$lightBuffer"; samplerNames[6] = "$colorBuffer"; samplerNames[7] = "$matInfoBuffer"; - + pixVersion = 3.0; }; @@ -252,11 +253,11 @@ new Material( AL_DefaultShadowMaterial ) // Particle System Point Light Material new ShaderData( AL_ParticlePointLightShader ) { - DXVertexShaderFile = "shaders/common/lighting/advanced/particlePointLightV.hlsl"; - DXPixelShaderFile = "shaders/common/lighting/advanced/particlePointLightP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/particlePointLightV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/particlePointLightP.hlsl"; - OGLVertexShaderFile = "shaders/common/lighting/advanced/gl/convexGeometryV.glsl"; - OGLPixelShaderFile = "shaders/common/lighting/advanced/gl/pointLightP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/gl/convexGeometryV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/gl/pointLightP.glsl"; samplerNames[0] = "$prePassBuffer"; diff --git a/Templates/Empty/game/core/scripts/client/lighting/basic/init.cs b/Templates/BaseGame/game/core/lighting/basic/init.cs similarity index 89% rename from Templates/Empty/game/core/scripts/client/lighting/basic/init.cs rename to Templates/BaseGame/game/core/lighting/basic/init.cs index ed2972c11..f298dfad2 100644 --- a/Templates/Empty/game/core/scripts/client/lighting/basic/init.cs +++ b/Templates/BaseGame/game/core/lighting/basic/init.cs @@ -40,11 +40,11 @@ singleton GFXStateBlockData( BL_ProjectedShadowSBData ) singleton ShaderData( BL_ProjectedShadowShaderData ) { - DXVertexShaderFile = "shaders/common/projectedShadowV.hlsl"; - DXPixelShaderFile = "shaders/common/projectedShadowP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/projectedShadowV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/projectedShadowP.hlsl"; - OGLVertexShaderFile = "shaders/common/gl/projectedShadowV.glsl"; - OGLPixelShaderFile = "shaders/common/gl/projectedShadowP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/gl/projectedShadowV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/gl/projectedShadowP.glsl"; samplerNames[0] = "inputTex"; diff --git a/Templates/Empty/game/core/scripts/client/lighting/basic/shadowFilter.cs b/Templates/BaseGame/game/core/lighting/basic/shadowFilter.cs similarity index 86% rename from Templates/Empty/game/core/scripts/client/lighting/basic/shadowFilter.cs rename to Templates/BaseGame/game/core/lighting/basic/shadowFilter.cs index 82484f515..5aea7b607 100644 --- a/Templates/Empty/game/core/scripts/client/lighting/basic/shadowFilter.cs +++ b/Templates/BaseGame/game/core/lighting/basic/shadowFilter.cs @@ -23,11 +23,11 @@ singleton ShaderData( BL_ShadowFilterShaderV ) { - DXVertexShaderFile = "shaders/common/lighting/basic/shadowFilterV.hlsl"; - DXPixelShaderFile = "shaders/common/lighting/basic/shadowFilterP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/lighting/basic/shadowFilterV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/lighting/basic/shadowFilterP.hlsl"; - OGLVertexShaderFile = "shaders/common/lighting/basic/gl/shadowFilterV.glsl"; - OGLPixelShaderFile = "shaders/common/lighting/basic/gl/shadowFilterP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/lighting/basic/gl/shadowFilterV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/lighting/basic/gl/shadowFilterP.glsl"; samplerNames[0] = "$diffuseMap"; diff --git a/Templates/Empty/game/core/scripts/client/lighting/shadowMaps/init.cs b/Templates/BaseGame/game/core/lighting/shadowMaps/init.cs similarity index 78% rename from Templates/Empty/game/core/scripts/client/lighting/shadowMaps/init.cs rename to Templates/BaseGame/game/core/lighting/shadowMaps/init.cs index b815ac265..f4875bf08 100644 --- a/Templates/Empty/game/core/scripts/client/lighting/shadowMaps/init.cs +++ b/Templates/BaseGame/game/core/lighting/shadowMaps/init.cs @@ -23,10 +23,10 @@ new ShaderData(BlurDepthShader) { - DXVertexShaderFile = "shaders/common/lighting/shadowMap/boxFilterV.hlsl"; - DXPixelShaderFile = "shaders/common/lighting/shadowMap/boxFilterP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/lighting/shadowMap/boxFilterV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/lighting/shadowMap/boxFilterP.hlsl"; - OGLVertexShaderFile = "shaders/common/lighting/shadowMap/gl/boxFilterV.glsl"; - OGLPixelShaderFile = "shaders/common/lighting/shadowMap/gl/boxFilterP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/lighting/shadowMap/gl/boxFilterV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/lighting/shadowMap/gl/boxFilterP.glsl"; pixVersion = 2.0; }; diff --git a/Templates/BaseGame/game/core/main.cs b/Templates/BaseGame/game/core/main.cs new file mode 100644 index 000000000..a8a396f41 --- /dev/null +++ b/Templates/BaseGame/game/core/main.cs @@ -0,0 +1,93 @@ +//----------------------------------------------------------------------------- +// 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. +//----------------------------------------------------------------------------- + +// ---------------------------------------------------------------------------- +// Initialize core sub system functionality such as audio, the Canvas, PostFX, +// rendermanager, light managers, etc. +// +// Note that not all of these need to be initialized before the client, although +// the audio should and the canvas definitely needs to be. I've put things here +// to distinguish between the purpose and functionality of the various client +// scripts. Game specific script isn't needed until we reach the shell menus +// and start a game or connect to a server. We get the various subsystems ready +// to go, and then use initClient() to handle the rest of the startup sequence. +// +// If this is too convoluted we can reduce this complexity after futher testing +// to find exactly which subsystems should be readied before kicking things off. +// ---------------------------------------------------------------------------- + +//We need to hook the missing/warn material stuff early, so do it here +$Core::MissingTexturePath = "core/images/missingTexture"; +$Core::UnAvailableTexturePath = "core/images/unavailable"; +$Core::WarningTexturePath = "core/images/warnMat"; +$Core::CommonShaderPath = "core/shaders"; + +exec("./helperFunctions.cs"); + +// We need some of the default GUI profiles in order to get the canvas and +// other aspects of the GUI system ready. +exec("./profiles.cs"); + +//This is a bit of a shortcut, but we'll load the client's default settings to ensure all the prefs get initialized correctly +%prefPath = getPrefpath(); +if ( isFile( %prefPath @ "/clientPrefs.cs" ) ) + exec( %prefPath @ "/clientPrefs.cs" ); +else + exec("data/defaults.cs"); + +%der = $pref::Video::displayDevice; + +// Initialization of the various subsystems requires some of the preferences +// to be loaded... so do that first. +exec("./globals.cs"); + +exec("./canvas.cs"); +exec("./cursor.cs"); + +exec("./renderManager.cs"); +exec("./lighting.cs"); + +exec("./audio.cs"); +exec("./sfx/audioAmbience.cs"); +exec("./sfx/audioData.cs"); +exec("./sfx/audioDescriptions.cs"); +exec("./sfx/audioEnvironments.cs"); +exec("./sfx/audioStates.cs"); + +exec("./parseArgs.cs"); + +// Materials and Shaders for rendering various object types +exec("./gfxData/commonMaterialData.cs"); +exec("./gfxData/shaders.cs"); +exec("./gfxData/terrainBlock.cs"); +exec("./gfxData/water.cs"); +exec("./gfxData/scatterSky.cs"); +exec("./gfxData/clouds.cs"); + +// Initialize all core post effects. +exec("./postFx.cs"); + +//VR stuff +exec("./oculusVR.cs"); + +// Seed the random number generator. +setRandomSeed(); \ No newline at end of file diff --git a/Templates/Empty/game/core/scripts/client/oculusVR.cs b/Templates/BaseGame/game/core/oculusVR.cs similarity index 100% rename from Templates/Empty/game/core/scripts/client/oculusVR.cs rename to Templates/BaseGame/game/core/oculusVR.cs diff --git a/Templates/Empty/game/core/scripts/client/oculusVROverlay.gui b/Templates/BaseGame/game/core/oculusVROverlay.gui similarity index 100% rename from Templates/Empty/game/core/scripts/client/oculusVROverlay.gui rename to Templates/BaseGame/game/core/oculusVROverlay.gui diff --git a/Templates/Empty/game/core/parseArgs.cs b/Templates/BaseGame/game/core/parseArgs.cs similarity index 82% rename from Templates/Empty/game/core/parseArgs.cs rename to Templates/BaseGame/game/core/parseArgs.cs index 373964c3d..811cee00c 100644 --- a/Templates/Empty/game/core/parseArgs.cs +++ b/Templates/BaseGame/game/core/parseArgs.cs @@ -22,7 +22,6 @@ //----------------------------------------------------------------------------- // Support functions used to manage the directory list - function pushFront(%list, %token, %delim) { if (%list !$= "") @@ -42,10 +41,7 @@ function popFront(%list, %delim) return nextToken(%list, unused, %delim); } -//----------------------------------------------------------------------------- -// The default global argument parsing - -function defaultParseArgs() +function parseArgs() { for ($i = 1; $i < $Game::argc ; $i++) { @@ -55,15 +51,49 @@ function defaultParseArgs() $logModeSpecified = false; // Check for dedicated run - if( stricmp($arg,"-dedicated") == 0 ) + /*if( stricmp($arg,"-dedicated") == 0 ) { $userDirs = $defaultGame; $dirCount = 1; $isDedicated = true; - } + }*/ switch$ ($arg) { + //-------------------- + case "-dedicated": + $userDirs = $defaultGame; + $dirCount = 1; + $isDedicated = true; + $Server::Dedicated = true; + enableWinConsole(true); + $argUsed[%i]++; + + //-------------------- + case "-mission": + $argUsed[%i]++; + if ($hasNextArg) + { + $missionArg = $nextArg; + $argUsed[%i+1]++; + %i++; + } + else + error("Error: Missing Command Line argument. Usage: -mission "); + + //-------------------- + case "-connect": + $argUsed[%i]++; + if ($hasNextArg) + { + $JoinGameAddress = $nextArg; + $argUsed[%i+1]++; + %i++; + } + else + error("Error: Missing Command Line argument. Usage: -connect "); + + //-------------------- case "-log": $argUsed[$i]++; @@ -128,15 +158,6 @@ function defaultParseArgs() else error("Error: Missing Command Line argument. Usage: -game "); - /* deprecated SRZ 11/29/07 - //-------------------- - case "-show": - // A useful shortcut for -mod show - $userMods = strreplace($userMods, "show", ""); - $userMods = pushFront($userMods, "show", ";"); - $argUsed[$i]++; - $modcount++; - */ //-------------------- case "-console": enableWinConsole(true); @@ -252,20 +273,24 @@ function defaultParseArgs() for(%i = $i + 2; %i < $Game::argc; %i++) { - %arg = $Game::argv[%i]; - %hasExt = strpos(%arg, ".mis"); + $arg = $Game::argv[%i]; + %hasExt = strpos($arg, ".mis"); if(%hasExt == -1) { - $levelToLoad = $levelToLoad @ %arg @ " "; + $levelToLoad = $levelToLoad @ $arg @ " "; } else { - $levelToLoad = $levelToLoad @ %arg; + $levelToLoad = $levelToLoad @ $arg; break; } } - } else - $levelToLoad = $nextArg; + } + else + { + $levelToLoad = $nextArg; + } + $argUsed[$i+1]++; $i++; } @@ -302,6 +327,37 @@ function defaultParseArgs() $genScript = true; $argUsed[$i]++; + case "-fullscreen": + $cliFullscreen = true; + $argUsed[%i]++; + + case "-windowed": + $cliFullscreen = false; + $argUsed[%i]++; + + case "-openGL": + $pref::Video::displayDevice = "OpenGL"; + $argUsed[%i]++; + + case "-directX": + $pref::Video::displayDevice = "D3D"; + $argUsed[%i]++; + + case "-autoVideo": + $pref::Video::displayDevice = ""; + $argUsed[%i]++; + + case "-prefs": + $argUsed[%i]++; + if ($hasNextArg) { + exec($nextArg, true, true); + $argUsed[%i+1]++; + %i++; + } + else + error("Error: Missing Command Line argument. Usage: -prefs "); + + //------------------- default: $argUsed[$i]++; @@ -333,4 +389,4 @@ function defaultParseArgs() $VideoCapture::encoder, $VideoCapture::fps, $videoCapture::width SPC $videoCapture::height ); } -} +} \ No newline at end of file diff --git a/Templates/Empty/game/core/scripts/client/postFx/GammaPostFX.cs b/Templates/BaseGame/game/core/postFX/GammaPostFX.cs similarity index 87% rename from Templates/Empty/game/core/scripts/client/postFx/GammaPostFX.cs rename to Templates/BaseGame/game/core/postFX/GammaPostFX.cs index b88f31305..8562b02b7 100644 --- a/Templates/Empty/game/core/scripts/client/postFx/GammaPostFX.cs +++ b/Templates/BaseGame/game/core/postFX/GammaPostFX.cs @@ -22,11 +22,11 @@ singleton ShaderData( GammaShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/gammaP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/gammaP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/gl/gammaP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/gl/gammaP.glsl"; samplerNames[0] = "$backBuffer"; samplerNames[1] = "$colorCorrectionTex"; @@ -55,6 +55,8 @@ singleton PostEffect( GammaPostFX ) texture[0] = "$backBuffer"; texture[1] = $HDRPostFX::colorCorrectionRamp; + + targetFormat = getBestHDRFormat(); }; function GammaPostFX::preProcess( %this ) diff --git a/Templates/Empty/game/core/scripts/client/postFx/MLAA.cs b/Templates/BaseGame/game/core/postFX/MLAA.cs similarity index 82% rename from Templates/Empty/game/core/scripts/client/postFx/MLAA.cs rename to Templates/BaseGame/game/core/postFX/MLAA.cs index bef075ec4..a67696d42 100644 --- a/Templates/Empty/game/core/scripts/client/postFx/MLAA.cs +++ b/Templates/BaseGame/game/core/postFX/MLAA.cs @@ -44,11 +44,11 @@ singleton GFXStateBlockData( MLAA_EdgeDetectStateBlock : PFX_DefaultStateBlock ) singleton ShaderData( MLAA_EdgeDetectionShader ) { - DXVertexShaderFile = "shaders/common/postFx/mlaa/offsetV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/mlaa/edgeDetectionP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/mlaa/offsetV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/mlaa/edgeDetectionP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/mlaa/gl/offsetV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/mlaa/gl/edgeDetectionP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/mlaa/gl/offsetV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/mlaa/gl/edgeDetectionP.glsl"; samplerNames[0] = "$colorMapG"; samplerNames[1] = "$prepassMap"; @@ -73,11 +73,11 @@ singleton GFXStateBlockData( MLAA_BlendWeightCalculationStateBlock : PFX_Default singleton ShaderData( MLAA_BlendWeightCalculationShader ) { - DXVertexShaderFile = "shaders/common/postFx/mlaa/passthruV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/mlaa/blendWeightCalculationP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/mlaa/passthruV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/mlaa/blendWeightCalculationP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/mlaa/gl/passthruV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/mlaa/gl/blendWeightCalculationP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/mlaa/gl/passthruV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/mlaa/gl/blendWeightCalculationP.glsl"; samplerNames[0] = "$edgesMap"; samplerNames[1] = "$edgesMapL"; @@ -103,11 +103,11 @@ singleton GFXStateBlockData( MLAA_NeighborhoodBlendingStateBlock : PFX_DefaultSt singleton ShaderData( MLAA_NeighborhoodBlendingShader ) { - DXVertexShaderFile = "shaders/common/postFx/mlaa/offsetV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/mlaa/neighborhoodBlendingP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/mlaa/offsetV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/mlaa/neighborhoodBlendingP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/mlaa/gl/offsetV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/mlaa/gl/neighborhoodBlendingP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/mlaa/gl/offsetV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/mlaa/gl/neighborhoodBlendingP.glsl"; samplerNames[0] = "$blendMap"; samplerNames[1] = "$colorMapL"; @@ -162,7 +162,7 @@ singleton PostEffect( MLAAFx ) texture[0] = "$inTex"; // Edges mask texture[1] = "$inTex"; // Edges mask - texture[2] = "AreaMap33.dds"; + texture[2] = "core/images/AreaMap33.dds"; }; new PostEffect() diff --git a/Templates/Empty/game/core/scripts/client/postFx/MotionBlurFx.cs b/Templates/BaseGame/game/core/postFX/MotionBlurFx.cs similarity index 82% rename from Templates/Empty/game/core/scripts/client/postFx/MotionBlurFx.cs rename to Templates/BaseGame/game/core/postFX/MotionBlurFx.cs index fea0c3bb3..da0912722 100644 --- a/Templates/Empty/game/core/scripts/client/postFx/MotionBlurFx.cs +++ b/Templates/BaseGame/game/core/postFX/MotionBlurFx.cs @@ -22,11 +22,11 @@ singleton ShaderData( PFX_MotionBlurShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; //we use the bare-bones postFxV.hlsl - DXPixelShaderFile = "shaders/common/postFx/motionBlurP.hlsl"; //new pixel shader + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; //we use the bare-bones postFxV.hlsl + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/motionBlurP.hlsl"; //new pixel shader - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/gl/motionBlurP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/gl/motionBlurP.glsl"; samplerNames[0] = "$backBuffer"; samplerNames[1] = "$prepassTex"; diff --git a/Templates/Empty/game/core/scripts/client/postFx/caustics.cs b/Templates/BaseGame/game/core/postFX/caustics.cs similarity index 83% rename from Templates/Empty/game/core/scripts/client/postFx/caustics.cs rename to Templates/BaseGame/game/core/postFX/caustics.cs index a712ef82a..25c1ac766 100644 --- a/Templates/Empty/game/core/scripts/client/postFx/caustics.cs +++ b/Templates/BaseGame/game/core/postFX/caustics.cs @@ -35,11 +35,11 @@ singleton GFXStateBlockData( PFX_CausticsStateBlock : PFX_DefaultStateBlock ) singleton ShaderData( PFX_CausticsShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/caustics/causticsP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/caustics/causticsP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/caustics/gl/causticsP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/caustics/gl/causticsP.glsl"; samplerNames[0] = "$prepassTex"; samplerNames[1] = "$causticsTex0"; @@ -58,7 +58,7 @@ singleton PostEffect( CausticsPFX ) shader = PFX_CausticsShader; stateBlock = PFX_CausticsStateBlock; texture[0] = "#prepass"; - texture[1] = "textures/caustics_1"; - texture[2] = "textures/caustics_2"; + texture[1] = "core/images/caustics_1"; + texture[2] = "core/images/caustics_2"; target = "$backBuffer"; }; diff --git a/Templates/Empty/game/core/scripts/client/postFx/chromaticLens.cs b/Templates/BaseGame/game/core/postFX/chromaticLens.cs similarity index 88% rename from Templates/Empty/game/core/scripts/client/postFx/chromaticLens.cs rename to Templates/BaseGame/game/core/postFX/chromaticLens.cs index 705986e7e..06b8d3988 100644 --- a/Templates/Empty/game/core/scripts/client/postFx/chromaticLens.cs +++ b/Templates/BaseGame/game/core/postFX/chromaticLens.cs @@ -45,11 +45,11 @@ singleton GFXStateBlockData( PFX_DefaultChromaticLensStateBlock ) singleton ShaderData( PFX_ChromaticLensShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/chromaticLens.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/chromaticLens.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/gl/chromaticLens.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/gl/chromaticLens.glsl"; samplerNames[0] = "$backBuffer"; diff --git a/Templates/Empty/game/core/scripts/client/postFx/default.postfxpreset.cs b/Templates/BaseGame/game/core/postFX/default.postfxpreset.cs similarity index 89% rename from Templates/Empty/game/core/scripts/client/postFx/default.postfxpreset.cs rename to Templates/BaseGame/game/core/postFX/default.postfxpreset.cs index e2d8ae125..077908ee8 100644 --- a/Templates/Empty/game/core/scripts/client/postFx/default.postfxpreset.cs +++ b/Templates/BaseGame/game/core/postFX/default.postfxpreset.cs @@ -19,13 +19,12 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. //----------------------------------------------------------------------------- - -$PostFXManager::Settings::EnableVignette = "0"; -$PostFXManager::Settings::EnableDOF = "0"; -$PostFXManager::Settings::EnabledSSAO = "0"; -$PostFXManager::Settings::EnableHDR = "0"; -$PostFXManager::Settings::EnableLightRays = "0"; -$PostFXManager::Settings::EnablePostFX = "0"; +$PostFXManager::Settings::EnableVignette = "1"; +$PostFXManager::Settings::EnableDOF = "1"; +$PostFXManager::Settings::EnabledSSAO = "1"; +$PostFXManager::Settings::EnableHDR = "1"; +$PostFXManager::Settings::EnableLightRays = "1"; +$PostFXManager::Settings::EnablePostFX = "1"; $PostFXManager::Settings::Vignette::VMax = "0.6"; $PostFXManager::Settings::DOF::BlurCurveFar = ""; $PostFXManager::Settings::DOF::BlurCurveNear = ""; @@ -40,7 +39,7 @@ $PostFXManager::Settings::HDR::blueShiftColor = "1.05 0.97 1.27"; $PostFXManager::Settings::HDR::brightPassThreshold = "1"; $PostFXManager::Settings::HDR::enableBloom = "1"; $PostFXManager::Settings::HDR::enableBlueShift = "0"; -$PostFXManager::Settings::HDR::enableToneMapping = "1"; +$PostFXManager::Settings::HDR::enableToneMapping = "0.5"; $PostFXManager::Settings::HDR::gaussMean = "0"; $PostFXManager::Settings::HDR::gaussMultiplier = "0.3"; $PostFXManager::Settings::HDR::gaussStdDev = "0.8"; @@ -70,4 +69,4 @@ $PostFXManager::Settings::SSAO::sNormalPow = "1"; $PostFXManager::Settings::SSAO::sNormalTol = "0"; $PostFXManager::Settings::SSAO::sRadius = "0.1"; $PostFXManager::Settings::SSAO::sStrength = "6"; -$PostFXManager::Settings::ColorCorrectionRamp = "core/scripts/client/postFx/null_color_ramp.png"; +$PostFXManager::Settings::ColorCorrectionRamp = "core/images/null_color_ramp.png"; diff --git a/Templates/Empty/game/core/scripts/client/postFx/dof.cs b/Templates/BaseGame/game/core/postFX/dof.cs similarity index 90% rename from Templates/Empty/game/core/scripts/client/postFx/dof.cs rename to Templates/BaseGame/game/core/postFX/dof.cs index 1ba1a476b..21ba52800 100644 --- a/Templates/Empty/game/core/scripts/client/postFx/dof.cs +++ b/Templates/BaseGame/game/core/postFX/dof.cs @@ -318,11 +318,11 @@ singleton GFXStateBlockData( PFX_DOFFinalStateBlock ) singleton ShaderData( PFX_DOFDownSampleShader ) { - DXVertexShaderFile = "shaders/common/postFx/dof/DOF_DownSample_V.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/dof/DOF_DownSample_P.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/dof/DOF_DownSample_V.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/dof/DOF_DownSample_P.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/dof/gl/DOF_DownSample_V.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/dof/gl/DOF_DownSample_P.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/dof/gl/DOF_DownSample_V.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/dof/gl/DOF_DownSample_P.glsl"; samplerNames[0] = "$colorSampler"; samplerNames[1] = "$depthSampler"; @@ -332,11 +332,11 @@ singleton ShaderData( PFX_DOFDownSampleShader ) singleton ShaderData( PFX_DOFBlurYShader ) { - DXVertexShaderFile = "shaders/common/postFx/dof/DOF_Gausian_V.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/dof/DOF_Gausian_P.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/dof/DOF_Gausian_V.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/dof/DOF_Gausian_P.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/dof/gl/DOF_Gausian_V.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/dof/gl/DOF_Gausian_P.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/dof/gl/DOF_Gausian_V.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/dof/gl/DOF_Gausian_P.glsl"; samplerNames[0] = "$diffuseMap"; @@ -351,11 +351,11 @@ singleton ShaderData( PFX_DOFBlurXShader : PFX_DOFBlurYShader ) singleton ShaderData( PFX_DOFCalcCoCShader ) { - DXVertexShaderFile = "shaders/common/postFx/dof/DOF_CalcCoC_V.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/dof/DOF_CalcCoC_P.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/dof/DOF_CalcCoC_V.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/dof/DOF_CalcCoC_P.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/dof/gl/DOF_CalcCoC_V.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/dof/gl/DOF_CalcCoC_P.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/dof/gl/DOF_CalcCoC_V.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/dof/gl/DOF_CalcCoC_P.glsl"; samplerNames[0] = "$shrunkSampler"; samplerNames[1] = "$blurredSampler"; @@ -365,11 +365,11 @@ singleton ShaderData( PFX_DOFCalcCoCShader ) singleton ShaderData( PFX_DOFSmallBlurShader ) { - DXVertexShaderFile = "shaders/common/postFx/dof/DOF_SmallBlur_V.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/dof/DOF_SmallBlur_P.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/dof/DOF_SmallBlur_V.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/dof/DOF_SmallBlur_P.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/dof/gl/DOF_SmallBlur_V.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/dof/gl/DOF_SmallBlur_P.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/dof/gl/DOF_SmallBlur_V.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/dof/gl/DOF_SmallBlur_P.glsl"; samplerNames[0] = "$colorSampler"; @@ -378,11 +378,11 @@ singleton ShaderData( PFX_DOFSmallBlurShader ) singleton ShaderData( PFX_DOFFinalShader ) { - DXVertexShaderFile = "shaders/common/postFx/dof/DOF_Final_V.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/dof/DOF_Final_P.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/dof/DOF_Final_V.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/dof/DOF_Final_P.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/dof/gl/DOF_Final_V.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/dof/gl/DOF_Final_P.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/dof/gl/DOF_Final_V.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/dof/gl/DOF_Final_P.glsl"; samplerNames[0] = "$colorSampler"; samplerNames[1] = "$smallBlurSampler"; diff --git a/Templates/Empty/game/core/scripts/client/postFx/edgeAA.cs b/Templates/BaseGame/game/core/postFX/edgeAA.cs similarity index 74% rename from Templates/Empty/game/core/scripts/client/postFx/edgeAA.cs rename to Templates/BaseGame/game/core/postFX/edgeAA.cs index 54e5264b8..4271a2ae1 100644 --- a/Templates/Empty/game/core/scripts/client/postFx/edgeAA.cs +++ b/Templates/BaseGame/game/core/postFX/edgeAA.cs @@ -34,11 +34,11 @@ singleton GFXStateBlockData( PFX_DefaultEdgeAAStateBlock ) singleton ShaderData( PFX_EdgeAADetectShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/edgeaa/edgeDetectP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/edgeaa/edgeDetectP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/edgeaa/gl/edgeDetectP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/edgeaa/gl/edgeDetectP.glsl"; samplerNames[0] = "$prepassBuffer"; @@ -47,11 +47,11 @@ singleton ShaderData( PFX_EdgeAADetectShader ) singleton ShaderData( PFX_EdgeAAShader ) { - DXVertexShaderFile = "shaders/common/postFx/edgeaa/edgeAAV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/edgeaa/edgeAAP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/edgeaa/edgeAAV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/edgeaa/edgeAAP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/edgeaa/gl/edgeAAV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/edgeaa/gl/edgeAAP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/edgeaa/gl/edgeAAV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/edgeaa/gl/edgeAAP.glsl"; samplerNames[0] = "$edgeBuffer"; samplerNames[1] = "$backBuffer"; @@ -61,11 +61,11 @@ singleton ShaderData( PFX_EdgeAAShader ) singleton ShaderData( PFX_EdgeAADebugShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/edgeaa/dbgEdgeDisplayP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/edgeaa/dbgEdgeDisplayP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/edgeaa/gl/dbgEdgeDisplayP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/edgeaa/gl/dbgEdgeDisplayP.glsl"; samplerNames[0] = "$edgeBuffer"; diff --git a/Templates/Empty/game/core/scripts/client/postFx/flash.cs b/Templates/BaseGame/game/core/postFX/flash.cs similarity index 87% rename from Templates/Empty/game/core/scripts/client/postFx/flash.cs rename to Templates/BaseGame/game/core/postFX/flash.cs index 244d91791..1c97c6411 100644 --- a/Templates/Empty/game/core/scripts/client/postFx/flash.cs +++ b/Templates/BaseGame/game/core/postFX/flash.cs @@ -22,11 +22,11 @@ singleton ShaderData( PFX_FlashShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/flashP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/flashP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/gl/flashP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/gl/flashP.glsl"; samplerNames[0] = "$backBuffer"; diff --git a/Templates/Empty/game/core/scripts/client/postFx/fog.cs b/Templates/BaseGame/game/core/postFX/fog.cs similarity index 85% rename from Templates/Empty/game/core/scripts/client/postFx/fog.cs rename to Templates/BaseGame/game/core/postFX/fog.cs index ea59a3f4c..48ed3c139 100644 --- a/Templates/Empty/game/core/scripts/client/postFx/fog.cs +++ b/Templates/BaseGame/game/core/postFX/fog.cs @@ -26,11 +26,11 @@ singleton ShaderData( FogPassShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/fogP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/fogP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/gl/fogP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/gl/fogP.glsl"; samplerNames[0] = "$prepassTex"; @@ -73,11 +73,11 @@ singleton PostEffect( FogPostFx ) singleton ShaderData( UnderwaterFogPassShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/underwaterFogP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/underwaterFogP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/gl/underwaterFogP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/gl/underwaterFogP.glsl"; samplerNames[0] = "$prepassTex"; samplerNames[1] = "$backbuffer"; diff --git a/Templates/Empty/game/core/scripts/client/postFx/fxaa.cs b/Templates/BaseGame/game/core/postFX/fxaa.cs similarity index 86% rename from Templates/Empty/game/core/scripts/client/postFx/fxaa.cs rename to Templates/BaseGame/game/core/postFX/fxaa.cs index d13b9a61e..4b81c6e19 100644 --- a/Templates/Empty/game/core/scripts/client/postFx/fxaa.cs +++ b/Templates/BaseGame/game/core/postFX/fxaa.cs @@ -36,11 +36,11 @@ singleton GFXStateBlockData( FXAA_StateBlock : PFX_DefaultStateBlock ) singleton ShaderData( FXAA_ShaderData ) { - DXVertexShaderFile = "shaders/common/postFx/fxaa/fxaaV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/fxaa/fxaaP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/fxaa/fxaaV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/fxaa/fxaaP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/fxaa/gl/fxaaV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/fxaa/gl/fxaaP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/fxaa/gl/fxaaV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/fxaa/gl/fxaaP.glsl"; samplerNames[0] = "$colorTex"; diff --git a/Templates/Empty/game/core/scripts/client/postFx/glow.cs b/Templates/BaseGame/game/core/postFX/glow.cs similarity index 83% rename from Templates/Empty/game/core/scripts/client/postFx/glow.cs rename to Templates/BaseGame/game/core/postFX/glow.cs index 78c46e56d..0f062f6f7 100644 --- a/Templates/Empty/game/core/scripts/client/postFx/glow.cs +++ b/Templates/BaseGame/game/core/postFX/glow.cs @@ -23,11 +23,11 @@ singleton ShaderData( PFX_GlowBlurVertShader ) { - DXVertexShaderFile = "shaders/common/postFx/glowBlurV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/glowBlurP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/glowBlurV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/glowBlurP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/gl/glowBlurV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/gl/glowBlurP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/glowBlurV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/gl/glowBlurP.glsl"; defines = "BLUR_DIR=float2(0.0,1.0)"; @@ -109,11 +109,11 @@ singleton PostEffect( GlowPostFx ) singleton ShaderData( PFX_VolFogGlowBlurVertShader ) { - DXVertexShaderFile = "shaders/common/postFx/glowBlurV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/VolFogGlowP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/glowBlurV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/VolFogGlowP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/gl/glowBlurV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/gl/VolFogGlowP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/glowBlurV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/gl/VolFogGlowP.glsl"; defines = "BLUR_DIR=float2(0.0,1.0)"; samplerNames[0] = "$diffuseMap"; @@ -121,11 +121,11 @@ singleton ShaderData( PFX_VolFogGlowBlurVertShader ) }; singleton ShaderData( PFX_VolFogGlowBlurHorzShader : PFX_VolFogGlowBlurVertShader ) { - DXVertexShaderFile = "shaders/common/postFx/glowBlurV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/VolFogGlowP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/glowBlurV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/VolFogGlowP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/gl/glowBlurV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/gl/VolFogGlowP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/glowBlurV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/gl/VolFogGlowP.glsl"; defines = "BLUR_DIR=float2(1.0,0.0)"; }; diff --git a/Templates/Empty/game/core/scripts/client/postFx/hdr.cs b/Templates/BaseGame/game/core/postFX/hdr.cs similarity index 82% rename from Templates/Empty/game/core/scripts/client/postFx/hdr.cs rename to Templates/BaseGame/game/core/postFX/hdr.cs index 60aecac96..621228532 100644 --- a/Templates/Empty/game/core/scripts/client/postFx/hdr.cs +++ b/Templates/BaseGame/game/core/postFX/hdr.cs @@ -46,7 +46,6 @@ $HDRPostFX::whiteCutoff = 1.0; /// average scene luminance. $HDRPostFX::adaptRate = 2.0; - /// Blends between the scene and the blue shifted version /// of the scene for a cinematic desaturated night effect. $HDRPostFX::enableBlueShift = 0.0; @@ -71,15 +70,15 @@ $HDRPostFX::gaussStdDev = 0.8; /// The 1x255 color correction ramp texture used /// by both the HDR shader and the GammaPostFx shader /// for doing full screen color correction. -$HDRPostFX::colorCorrectionRamp = "core/scripts/client/postFx/null_color_ramp.png"; +$HDRPostFX::colorCorrectionRamp = "core/images/null_color_ramp.png"; singleton ShaderData( HDR_BrightPassShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/hdr/brightPassFilterP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/hdr/gl/brightPassFilterP.glsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/hdr/brightPassFilterP.hlsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/hdr/gl/brightPassFilterP.glsl"; samplerNames[0] = "$inputTex"; samplerNames[1] = "$luminanceTex"; @@ -89,10 +88,10 @@ singleton ShaderData( HDR_BrightPassShader ) singleton ShaderData( HDR_DownScale4x4Shader ) { - DXVertexShaderFile = "shaders/common/postFx/hdr/downScale4x4V.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/hdr/downScale4x4P.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/hdr/gl/downScale4x4V.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/hdr/gl/downScale4x4P.glsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/hdr/downScale4x4V.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/hdr/downScale4x4P.hlsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/hdr/gl/downScale4x4V.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/hdr/gl/downScale4x4P.glsl"; samplerNames[0] = "$inputTex"; @@ -101,10 +100,10 @@ singleton ShaderData( HDR_DownScale4x4Shader ) singleton ShaderData( HDR_BloomGaussBlurHShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/hdr/bloomGaussBlurHP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/hdr/gl/bloomGaussBlurHP.glsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/hdr/bloomGaussBlurHP.hlsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/hdr/gl/bloomGaussBlurHP.glsl"; samplerNames[0] = "$inputTex"; @@ -113,10 +112,10 @@ singleton ShaderData( HDR_BloomGaussBlurHShader ) singleton ShaderData( HDR_BloomGaussBlurVShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/hdr/bloomGaussBlurVP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/hdr/gl/bloomGaussBlurVP.glsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/hdr/bloomGaussBlurVP.hlsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/hdr/gl/bloomGaussBlurVP.glsl"; samplerNames[0] = "$inputTex"; @@ -125,10 +124,10 @@ singleton ShaderData( HDR_BloomGaussBlurVShader ) singleton ShaderData( HDR_SampleLumShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/hdr/sampleLumInitialP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/hdr/gl/sampleLumInitialP.glsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/hdr/sampleLumInitialP.hlsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/hdr/gl/sampleLumInitialP.glsl"; samplerNames[0] = "$inputTex"; @@ -137,10 +136,10 @@ singleton ShaderData( HDR_SampleLumShader ) singleton ShaderData( HDR_DownSampleLumShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/hdr/sampleLumIterativeP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/hdr/gl/sampleLumIterativeP.glsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/hdr/sampleLumIterativeP.hlsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/hdr/gl/sampleLumIterativeP.glsl"; samplerNames[0] = "$inputTex"; @@ -149,10 +148,10 @@ singleton ShaderData( HDR_DownSampleLumShader ) singleton ShaderData( HDR_CalcAdaptedLumShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/hdr/calculateAdaptedLumP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/hdr/gl/calculateAdaptedLumP.glsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/hdr/calculateAdaptedLumP.hlsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/hdr/gl/calculateAdaptedLumP.glsl"; samplerNames[0] = "$currLum"; samplerNames[1] = "$lastAdaptedLum"; @@ -162,18 +161,17 @@ singleton ShaderData( HDR_CalcAdaptedLumShader ) singleton ShaderData( HDR_CombineShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/hdr/finalPassCombineP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/hdr/gl/finalPassCombineP.glsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/hdr/finalPassCombineP.hlsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/hdr/gl/finalPassCombineP.glsl"; samplerNames[0] = "$sceneTex"; samplerNames[1] = "$luminanceTex"; samplerNames[2] = "$bloomTex"; samplerNames[3] = "$colorCorrectionTex"; - samplerNames[4] = "prepassTex"; - + pixVersion = 3.0; }; @@ -477,10 +475,10 @@ singleton PostEffect( HDRPostFX ) singleton ShaderData( LuminanceVisShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/hdr/luminanceVisP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/hdr/gl/luminanceVisP.glsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/hdr/luminanceVisP.hlsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/hdr/gl/luminanceVisP.glsl"; samplerNames[0] = "$inputTex"; diff --git a/Templates/Empty/game/core/scripts/client/postFx/lightRay.cs b/Templates/BaseGame/game/core/postFX/lightRay.cs similarity index 82% rename from Templates/Empty/game/core/scripts/client/postFx/lightRay.cs rename to Templates/BaseGame/game/core/postFX/lightRay.cs index c13f1ca3b..b1a5d9015 100644 --- a/Templates/Empty/game/core/scripts/client/postFx/lightRay.cs +++ b/Templates/BaseGame/game/core/postFX/lightRay.cs @@ -32,11 +32,11 @@ $LightRayPostFX::resolutionScale = 1.0; singleton ShaderData( LightRayOccludeShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/lightRay/lightRayOccludeP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/lightRay/lightRayOccludeP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/lightRay/gl/lightRayOccludeP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/lightRay/gl/lightRayOccludeP.glsl"; samplerNames[0] = "$backBuffer"; samplerNames[1] = "$prepassTex"; @@ -46,11 +46,11 @@ singleton ShaderData( LightRayOccludeShader ) singleton ShaderData( LightRayShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/lightRay/lightRayP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/lightRay/lightRayP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/lightRay/gl/lightRayP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/lightRay/gl/lightRayP.glsl"; samplerNames[0] = "$frameSampler"; samplerNames[1] = "$backBuffer"; diff --git a/Templates/Empty/game/core/scripts/client/postFx/ovrBarrelDistortion.cs b/Templates/BaseGame/game/core/postFX/ovrBarrelDistortion.cs similarity index 85% rename from Templates/Empty/game/core/scripts/client/postFx/ovrBarrelDistortion.cs rename to Templates/BaseGame/game/core/postFX/ovrBarrelDistortion.cs index 1838aa621..1ea280863 100644 --- a/Templates/Empty/game/core/scripts/client/postFx/ovrBarrelDistortion.cs +++ b/Templates/BaseGame/game/core/postFX/ovrBarrelDistortion.cs @@ -30,11 +30,11 @@ if(!isFunction(isOculusVRDeviceActive)) singleton ShaderData( OVRMonoToStereoShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/oculusvr/monoToStereoP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/oculusvr/monoToStereoP.hlsl"; - //OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.hlsl"; - //OGLPixelShaderFile = "shaders/common/postFx/oculusvr/gl/monoToStereoP.glsl"; + //OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.hlsl"; + //OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/oculusvr/gl/monoToStereoP.glsl"; samplerNames[0] = "$backBuffer"; @@ -43,11 +43,11 @@ singleton ShaderData( OVRMonoToStereoShader ) singleton ShaderData( OVRBarrelDistortionShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/oculusvr/barrelDistortionP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/oculusvr/barrelDistortionP.hlsl"; - //OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - //OGLPixelShaderFile = "shaders/common/postFx/oculusvr/gl/barrelDistortionP.glsl"; + //OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + //OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/oculusvr/gl/barrelDistortionP.glsl"; samplerNames[0] = "$backBuffer"; @@ -56,8 +56,8 @@ singleton ShaderData( OVRBarrelDistortionShader ) singleton ShaderData( OVRBarrelDistortionChromaShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/oculusvr/barrelDistortionChromaP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/oculusvr/barrelDistortionChromaP.hlsl"; pixVersion = 2.0; }; diff --git a/Templates/Empty/game/core/scripts/client/postFx/postFXManager.gui b/Templates/BaseGame/game/core/postFX/postFxManager.gui similarity index 99% rename from Templates/Empty/game/core/scripts/client/postFx/postFXManager.gui rename to Templates/BaseGame/game/core/postFX/postFxManager.gui index e0519cc00..e74179374 100644 --- a/Templates/Empty/game/core/scripts/client/postFx/postFXManager.gui +++ b/Templates/BaseGame/game/core/postFX/postFxManager.gui @@ -2526,7 +2526,7 @@ sinkAllKeyEvents = "0"; password = "0"; passwordMask = "*"; - text = "core/scripts/client/postFx/null_color_ramp.png"; + text = "core/images/null_color_ramp.png"; maxLength = "1024"; margin = "0 0 0 0"; padding = "0 0 0 0"; diff --git a/Templates/Empty/game/core/scripts/client/postFx/postFxManager.gui.cs b/Templates/BaseGame/game/core/postFX/postFxManager.gui.cs similarity index 99% rename from Templates/Empty/game/core/scripts/client/postFx/postFxManager.gui.cs rename to Templates/BaseGame/game/core/postFX/postFxManager.gui.cs index 459e53a26..73dbec8b0 100644 --- a/Templates/Empty/game/core/scripts/client/postFx/postFxManager.gui.cs +++ b/Templates/BaseGame/game/core/postFX/postFxManager.gui.cs @@ -437,7 +437,7 @@ function ppColorCorrection_selectFile() function ppColorCorrection_selectFileHandler( %filename ) { if ( %filename $= "" || !isFile( %filename ) ) - %filename = "core/scripts/client/postFx/null_color_ramp.png"; + %filename = "core/images/null_color_ramp.png"; else %filename = makeRelativePath( %filename, getMainDotCsDir() ); diff --git a/Templates/Empty/game/core/scripts/client/postFx/postFxManager.gui.settings.cs b/Templates/BaseGame/game/core/postFX/postFxManager.gui.settings.cs similarity index 95% rename from Templates/Empty/game/core/scripts/client/postFx/postFxManager.gui.settings.cs rename to Templates/BaseGame/game/core/postFX/postFxManager.gui.settings.cs index 77d664f41..d0ba2c4ea 100644 --- a/Templates/Empty/game/core/scripts/client/postFx/postFxManager.gui.settings.cs +++ b/Templates/BaseGame/game/core/postFX/postFxManager.gui.settings.cs @@ -20,7 +20,7 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -$PostFXManager::defaultPreset = "core/scripts/client/postFx/default.postfxpreset.cs"; +$PostFXManager::defaultPreset = "core/postFX/default.postfxpreset.cs"; function PostFXManager::settingsSetEnabled(%this, %bEnablePostFX) { @@ -70,6 +70,7 @@ function PostFXManager::settingsSetEnabled(%this, %bEnablePostFX) postVerbose("% - PostFX Manager - PostFX disabled"); } + VolFogGlowPostFx.disable(); } @@ -302,15 +303,16 @@ function PostFXManager::settingsApplyFromPreset(%this) //Vignette settings $VignettePostEffect::VMax = $PostFXManager::Settings::Vignette::VMax; + $VignettePostEffect::VMin = $PostFXManager::Settings::Vignette::VMin; if ( $PostFXManager::forceEnableFromPresets ) { $PostFXManager::PostFX::Enabled = $PostFXManager::Settings::EnablePostFX; - $PostFXManager::PostFX::EnableDOF = $PostFXManager::Settings::EnableDOF; - $PostFXManager::PostFX::EnableVignette = $PostFXManager::Settings::EnableVignette; - $PostFXManager::PostFX::EnableLightRays = $PostFXManager::Settings::EnableLightRays; - $PostFXManager::PostFX::EnableHDR = $PostFXManager::Settings::EnableHDR; - $PostFXManager::PostFX::EnableSSAO = $PostFXManager::Settings::EnabledSSAO; + $PostFXManager::PostFX::EnableDOF = $pref::PostFX::EnableDOF ? $PostFXManager::Settings::EnableDOF : false; + $PostFXManager::PostFX::EnableVignette = $pref::PostFX::EnableVignette ? $PostFXManager::Settings::EnableVignette : false; + $PostFXManager::PostFX::EnableLightRays = $pref::PostFX::EnableLightRays ? $PostFXManager::Settings::EnableLightRays : false; + $PostFXManager::PostFX::EnableHDR = $pref::PostFX::EnableHDR ? $PostFXManager::Settings::EnableHDR : false; + $PostFXManager::PostFX::EnableSSAO = $pref::PostFX::EnabledSSAO ? $PostFXManager::Settings::EnableSSAO : false; %this.settingsSetEnabled( true ); } @@ -397,6 +399,7 @@ function PostFXManager::settingsApplyDOF(%this) function PostFXManager::settingsApplyVignette(%this) { $PostFXManager::Settings::Vignette::VMax = $VignettePostEffect::VMax; + $PostFXManager::Settings::Vignette::VMin = $VignettePostEffect::VMin; postVerbose("% - PostFX Manager - Settings Saved - Vignette"); @@ -410,7 +413,7 @@ function PostFXManager::settingsApplyAll(%this, %sFrom) $PostFXManager::Settings::EnableVignette = $PostFXManager::PostFX::EnableVignette; $PostFXManager::Settings::EnableLightRays = $PostFXManager::PostFX::EnableLightRays; $PostFXManager::Settings::EnableHDR = $PostFXManager::PostFX::EnableHDR; - $PostFXManager::Settings::EnabledSSAO = $PostFXManager::PostFX::EnableSSAO; + $PostFXManager::Settings::EnableSSAO = $PostFXManager::PostFX::EnableSSAO; // Apply settings should save the values in the system to the // the preset structure ($PostFXManager::Settings::*) diff --git a/Templates/Empty/game/core/scripts/client/postFx/postFxManager.persistance.cs b/Templates/BaseGame/game/core/postFX/postFxManager.persistance.cs similarity index 100% rename from Templates/Empty/game/core/scripts/client/postFx/postFxManager.persistance.cs rename to Templates/BaseGame/game/core/postFX/postFxManager.persistance.cs diff --git a/Templates/Empty/game/core/scripts/client/postFx/ssao.cs b/Templates/BaseGame/game/core/postFX/ssao.cs similarity index 88% rename from Templates/Empty/game/core/scripts/client/postFx/ssao.cs rename to Templates/BaseGame/game/core/postFX/ssao.cs index 063cee087..e88f7128b 100644 --- a/Templates/Empty/game/core/scripts/client/postFx/ssao.cs +++ b/Templates/BaseGame/game/core/postFX/ssao.cs @@ -150,11 +150,11 @@ singleton GFXStateBlockData( SSAOBlurStateBlock : PFX_DefaultStateBlock ) singleton ShaderData( SSAOShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/ssao/SSAO_P.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/ssao/SSAO_P.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/ssao/gl/SSAO_P.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/ssao/gl/SSAO_P.glsl"; samplerNames[0] = "$prepassMap"; samplerNames[1] = "$randNormalTex"; @@ -165,11 +165,11 @@ singleton ShaderData( SSAOShader ) singleton ShaderData( SSAOBlurYShader ) { - DXVertexShaderFile = "shaders/common/postFx/ssao/SSAO_Blur_V.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/ssao/SSAO_Blur_P.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/ssao/SSAO_Blur_V.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/ssao/SSAO_Blur_P.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/ssao/gl/SSAO_Blur_V.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/ssao/gl/SSAO_Blur_P.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/ssao/gl/SSAO_Blur_V.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/ssao/gl/SSAO_Blur_P.glsl"; samplerNames[0] = "$occludeMap"; samplerNames[1] = "$prepassMap"; @@ -200,7 +200,7 @@ singleton PostEffect( SSAOPostFx ) stateBlock = SSAOStateBlock; texture[0] = "#prepass"; - texture[1] = "noise.png"; + texture[1] = "core/images/noise.png"; texture[2] = "#ssao_pow_table"; target = "$outTex"; @@ -279,11 +279,11 @@ singleton PostEffect( SSAOVizPostFx ) singleton ShaderData( SSAOPowTableShader ) { - DXVertexShaderFile = "shaders/common/postFx/ssao/SSAO_PowerTable_V.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/ssao/SSAO_PowerTable_P.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/ssao/SSAO_PowerTable_V.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/ssao/SSAO_PowerTable_P.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/ssao/gl/SSAO_PowerTable_V.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/ssao/gl/SSAO_PowerTable_P.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/ssao/gl/SSAO_PowerTable_V.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/ssao/gl/SSAO_PowerTable_P.glsl"; pixVersion = 2.0; }; diff --git a/Templates/Empty/game/core/scripts/client/postFx/turbulence.cs b/Templates/BaseGame/game/core/postFX/turbulence.cs similarity index 86% rename from Templates/Empty/game/core/scripts/client/postFx/turbulence.cs rename to Templates/BaseGame/game/core/postFX/turbulence.cs index dd8c0e2dc..967c3b2bf 100644 --- a/Templates/Empty/game/core/scripts/client/postFx/turbulence.cs +++ b/Templates/BaseGame/game/core/postFX/turbulence.cs @@ -32,11 +32,11 @@ singleton GFXStateBlockData( PFX_TurbulenceStateBlock : PFX_DefaultStateBlock) singleton ShaderData( PFX_TurbulenceShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/turbulenceP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/turbulenceP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/gl/turbulenceP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/gl/turbulenceP.glsl"; samplerNames[0] = "$inputTex"; pixVersion = 3.0; diff --git a/Templates/Empty/game/core/scripts/client/postFx/vignette.cs b/Templates/BaseGame/game/core/postFX/vignette.cs similarity index 85% rename from Templates/Empty/game/core/scripts/client/postFx/vignette.cs rename to Templates/BaseGame/game/core/postFX/vignette.cs index 9a514ce8d..d22f7d14a 100644 --- a/Templates/Empty/game/core/scripts/client/postFx/vignette.cs +++ b/Templates/BaseGame/game/core/postFX/vignette.cs @@ -25,11 +25,11 @@ $VignettePostEffect::VMin = 0.2; singleton ShaderData( VignetteShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/vignette/VignetteP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/vignette/VignetteP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/gl//postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/vignette/gl/VignetteP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/vignette/gl/VignetteP.glsl"; samplerNames[0] = "$backBuffer"; diff --git a/Templates/Empty/game/core/scripts/client/postFx.cs b/Templates/BaseGame/game/core/postFx.cs similarity index 71% rename from Templates/Empty/game/core/scripts/client/postFx.cs rename to Templates/BaseGame/game/core/postFx.cs index 4e6451544..aa65262d8 100644 --- a/Templates/Empty/game/core/scripts/client/postFx.cs +++ b/Templates/BaseGame/game/core/postFx.cs @@ -20,48 +20,41 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- - -singleton GFXStateBlockData( PFX_DefaultStateBlock ) -{ - zDefined = true; - zEnable = false; - zWriteEnable = false; - - samplersDefined = true; - samplerStates[0] = SamplerClampLinear; -}; - singleton ShaderData( PFX_PassthruShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/postFx/passthruP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/passthruP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/postFx/gl/passthruP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/gl/passthruP.glsl"; samplerNames[0] = "$inputTex"; pixVersion = 2.0; }; -function initPostEffects() +function postFXInit() { - // First exec the scripts for the different light managers - // in the lighting folder. + exec("./postFX/postFxManager.gui"); - %pattern = "./postFx/*.cs"; - %file = findFirstFile( %pattern ); - if ( %file $= "" ) + //Load the core postFX files themselves + if (!$Server::Dedicated) { - // Try for DSOs next. - %pattern = "./postFx/*.cs.dso"; + //init the postFX + %pattern = "core/postFX/*.cs"; %file = findFirstFile( %pattern ); - } - - while( %file !$= "" ) - { - exec( %file ); - %file = findNextFile( %pattern ); + if ( %file $= "" ) + { + // Try for DSOs next. + %pattern = "core/postFX/*.cs.dso"; + %file = findFirstFile( %pattern ); + } + + while( %file !$= "" ) + { + exec( %file ); + %file = findNextFile( %pattern ); + } } } diff --git a/Templates/BaseGame/game/core/profiles.cs b/Templates/BaseGame/game/core/profiles.cs new file mode 100644 index 000000000..fa9d9b72a --- /dev/null +++ b/Templates/BaseGame/game/core/profiles.cs @@ -0,0 +1,226 @@ +//----------------------------------------------------------------------------- +// 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. +//----------------------------------------------------------------------------- + +// Set font cache path if it doesn't already exist. +if($Gui::fontCacheDirectory $= "") +{ + $Gui::fontCacheDirectory = expandFilename("./fonts"); +} + +// ---------------------------------------------------------------------------- +// GuiDefaultProfile is a special profile that all other profiles inherit +// defaults from. It must exist. +// ---------------------------------------------------------------------------- + +if(!isObject(GuiDefaultProfile)) +new GuiControlProfile (GuiDefaultProfile) +{ + tab = false; + canKeyFocus = false; + hasBitmapArray = false; + mouseOverSelected = false; + + // fill color + opaque = false; + fillColor = "242 241 240"; + fillColorHL ="228 228 235"; + fillColorSEL = "98 100 137"; + fillColorNA = "255 255 255 "; + + // border color + border = 0; + borderColor = "100 100 100"; + borderColorHL = "50 50 50 50"; + borderColorNA = "75 75 75"; + + // font + fontType = "Arial"; + fontSize = 14; + fontCharset = ANSI; + + fontColor = "0 0 0"; + fontColorHL = "0 0 0"; + fontColorNA = "0 0 0"; + fontColorSEL= "255 255 255"; + + // bitmap information + bitmap = ""; + bitmapBase = ""; + textOffset = "0 0"; + + // used by guiTextControl + modal = true; + justify = "left"; + autoSizeWidth = false; + autoSizeHeight = false; + returnTab = false; + numbersOnly = false; + cursorColor = "0 0 0 255"; +}; + +if(!isObject(GuiToolTipProfile)) +new GuiControlProfile (GuiToolTipProfile) +{ + // fill color + fillColor = "239 237 222"; + + // border color + borderColor = "138 134 122"; + + // font + fontType = "Arial"; + fontSize = 14; + fontColor = "0 0 0"; + + category = "Core"; +}; + +if(!isObject(GuiWindowProfile)) +new GuiControlProfile (GuiWindowProfile) +{ + opaque = false; + border = 2; + fillColor = "242 241 240"; + fillColorHL = "221 221 221"; + fillColorNA = "200 200 200"; + fontColor = "50 50 50"; + fontColorHL = "0 0 0"; + bevelColorHL = "255 255 255"; + bevelColorLL = "0 0 0"; + text = "untitled"; + bitmap = "./images/window"; + textOffset = "8 4"; + hasBitmapArray = true; + justify = "left"; + category = "Core"; +}; + + +if(!isObject(GuiTextEditProfile)) +new GuiControlProfile(GuiTextEditProfile) +{ + opaque = true; + bitmap = "./images/textEdit"; + hasBitmapArray = true; + border = -2; + fillColor = "242 241 240 0"; + fillColorHL = "255 255 255"; + fontColor = "0 0 0"; + fontColorHL = "255 255 255"; + fontColorSEL = "98 100 137"; + fontColorNA = "200 200 200"; + textOffset = "4 2"; + autoSizeWidth = false; + autoSizeHeight = true; + justify = "left"; + tab = true; + canKeyFocus = true; + category = "Core"; +}; + +if(!isObject(GuiScrollProfile)) +new GuiControlProfile(GuiScrollProfile) +{ + opaque = true; + fillcolor = "255 255 255"; + fontColor = "0 0 0"; + fontColorHL = "150 150 150"; + border = true; + bitmap = "./images/scrollBar"; + hasBitmapArray = true; + category = "Core"; +}; + +if(!isObject(GuiOverlayProfile)) +new GuiControlProfile(GuiOverlayProfile) +{ + opaque = true; + fontColor = "0 0 0"; + fontColorHL = "255 255 255"; + fillColor = "0 0 0 100"; + category = "Core"; +}; + +if(!isObject(GuiCheckBoxProfile)) +new GuiControlProfile(GuiCheckBoxProfile) +{ + opaque = false; + fillColor = "232 232 232"; + border = false; + borderColor = "100 100 100"; + fontSize = 14; + fontColor = "20 20 20"; + fontColorHL = "80 80 80"; + fontColorNA = "200 200 200"; + fixedExtent = true; + justify = "left"; + bitmap = "./images/checkbox"; + hasBitmapArray = true; + category = "Tools"; +}; + +if( !isObject( GuiProgressProfile ) ) +new GuiControlProfile( GuiProgressProfile ) +{ + opaque = false; + fillColor = "0 162 255 200"; + border = true; + borderColor = "50 50 50 200"; + category = "Core"; +}; + +if( !isObject( GuiProgressBitmapProfile ) ) +new GuiControlProfile( GuiProgressBitmapProfile ) +{ + border = false; + hasBitmapArray = true; + bitmap = "./images/loadingbar"; + category = "Core"; +}; + +if( !isObject( GuiProgressTextProfile ) ) +new GuiControlProfile( GuiProgressTextProfile ) +{ + fontSize = "14"; + fontType = "Arial"; + fontColor = "0 0 0"; + justify = "center"; + category = "Core"; +}; + +if( !isObject( GuiButtonProfile ) ) +new GuiControlProfile( GuiButtonProfile ) +{ + opaque = true; + border = true; + + fontColor = "50 50 50"; + fontColorHL = "0 0 0"; + fontColorNA = "200 200 200"; + //fontColorSEL ="0 0 0"; + fixedExtent = false; + justify = "center"; + canKeyFocus = false; + bitmap = "./images/button"; + hasBitmapArray = false; + category = "Core"; +}; diff --git a/Templates/Empty/game/core/scripts/client/renderManager.cs b/Templates/BaseGame/game/core/renderManager.cs similarity index 95% rename from Templates/Empty/game/core/scripts/client/renderManager.cs rename to Templates/BaseGame/game/core/renderManager.cs index ea7f84d03..f719ad1f0 100644 --- a/Templates/Empty/game/core/scripts/client/renderManager.cs +++ b/Templates/BaseGame/game/core/renderManager.cs @@ -89,6 +89,18 @@ function initRenderManager() DiffuseRenderPassManager.addManager( new RenderPassStateBin(FinalBin) { renderOrder = 1.7; stateToken = AL_FormatToken; } ); } +/// This is the Default PostFX state block. Put here to prevent any missing object +/// errors for below dependencies +singleton GFXStateBlockData( PFX_DefaultStateBlock ) +{ + zDefined = true; + zEnable = false; + zWriteEnable = false; + + samplersDefined = true; + samplerStates[0] = SamplerClampLinear; +}; + /// This post effect is used to copy data from the non-MSAA back-buffer to the /// device back buffer (which could be MSAA). It must be declared here so that /// it is initialized when 'AL_FormatToken' is initialzed. diff --git a/Templates/Empty/game/core/scripts/client/audioAmbiences.cs b/Templates/BaseGame/game/core/sfx/audioAmbience.cs similarity index 99% rename from Templates/Empty/game/core/scripts/client/audioAmbiences.cs rename to Templates/BaseGame/game/core/sfx/audioAmbience.cs index aa6452f7f..8c2bf270c 100644 --- a/Templates/Empty/game/core/scripts/client/audioAmbiences.cs +++ b/Templates/BaseGame/game/core/sfx/audioAmbience.cs @@ -20,7 +20,6 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- - singleton SFXAmbience( AudioAmbienceDefault ) { environment = AudioEnvOff; diff --git a/Templates/Empty/game/art/roads/materials.cs b/Templates/BaseGame/game/core/sfx/audioData.cs similarity index 70% rename from Templates/Empty/game/art/roads/materials.cs rename to Templates/BaseGame/game/core/sfx/audioData.cs index a3ff683d2..8584ce50e 100644 --- a/Templates/Empty/game/art/roads/materials.cs +++ b/Templates/BaseGame/game/core/sfx/audioData.cs @@ -20,23 +20,23 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -singleton Material(DefaultDecalRoadMaterial) +// Game specific audio descriptions. Always declare SFXDescription's (the type of sound) +// before SFXProfile's (the sound itself) when creating new ones + +singleton SFXDescription(BulletFireDesc : AudioEffect ) { - diffuseMap[0] = "art/roads/defaultRoadTextureTop.png"; - mapTo = "unmapped_mat"; - materialTag0 = "RoadAndPath"; + isLooping = false; + is3D = true; + ReferenceDistance = 10.0; + MaxDistance = 60.0; }; -singleton Material(DefaultRoadMaterialTop) +singleton SFXDescription(BulletImpactDesc : AudioEffect ) { - mapTo = "unmapped_mat"; - diffuseMap[0] = "art/roads/defaultRoadTextureTop.png"; - materialTag0 = "RoadAndPath"; + isLooping = false; + is3D = true; + ReferenceDistance = 10.0; + MaxDistance = 30.0; + volume = 0.4; + pitch = 1.4; }; - -singleton Material(DefaultRoadMaterialOther) -{ - mapTo = "unmapped_mat"; - diffuseMap[0] = "art/roads/defaultRoadTextureOther.png"; - materialTag0 = "RoadAndPath"; -}; \ No newline at end of file diff --git a/Templates/Empty/game/core/scripts/client/audioDescriptions.cs b/Templates/BaseGame/game/core/sfx/audioDescriptions.cs similarity index 100% rename from Templates/Empty/game/core/scripts/client/audioDescriptions.cs rename to Templates/BaseGame/game/core/sfx/audioDescriptions.cs diff --git a/Templates/Empty/game/core/scripts/client/audioEnvironments.cs b/Templates/BaseGame/game/core/sfx/audioEnvironments.cs similarity index 99% rename from Templates/Empty/game/core/scripts/client/audioEnvironments.cs rename to Templates/BaseGame/game/core/sfx/audioEnvironments.cs index 09fc4de1a..671825b6b 100644 --- a/Templates/Empty/game/core/scripts/client/audioEnvironments.cs +++ b/Templates/BaseGame/game/core/sfx/audioEnvironments.cs @@ -265,7 +265,7 @@ singleton SFXEnvironment( AudioEnvAuditorium ) decayTime = "4.32"; decayHFRatio = "0.59"; decayLFRatio = "1.0"; - reflections = "0.789"; + reflections = "1"; reflectionsDelay = "0.02"; reflectionsPan[ 0 ] = "0.0"; reflectionsPan[ 1 ] = "0.0"; diff --git a/Templates/Empty/game/core/scripts/client/audioStates.cs b/Templates/BaseGame/game/core/sfx/audioStates.cs similarity index 100% rename from Templates/Empty/game/core/scripts/client/audioStates.cs rename to Templates/BaseGame/game/core/sfx/audioStates.cs diff --git a/Templates/Empty/game/shaders/common/VolumetricFog/VFogP.hlsl b/Templates/BaseGame/game/core/shaders/VolumetricFog/VFogP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/VolumetricFog/VFogP.hlsl rename to Templates/BaseGame/game/core/shaders/VolumetricFog/VFogP.hlsl diff --git a/Templates/Empty/game/shaders/common/VolumetricFog/VFogPreP.hlsl b/Templates/BaseGame/game/core/shaders/VolumetricFog/VFogPreP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/VolumetricFog/VFogPreP.hlsl rename to Templates/BaseGame/game/core/shaders/VolumetricFog/VFogPreP.hlsl diff --git a/Templates/Empty/game/shaders/common/VolumetricFog/VFogPreV.hlsl b/Templates/BaseGame/game/core/shaders/VolumetricFog/VFogPreV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/VolumetricFog/VFogPreV.hlsl rename to Templates/BaseGame/game/core/shaders/VolumetricFog/VFogPreV.hlsl diff --git a/Templates/Empty/game/shaders/common/VolumetricFog/VFogRefl.hlsl b/Templates/BaseGame/game/core/shaders/VolumetricFog/VFogRefl.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/VolumetricFog/VFogRefl.hlsl rename to Templates/BaseGame/game/core/shaders/VolumetricFog/VFogRefl.hlsl diff --git a/Templates/Empty/game/shaders/common/VolumetricFog/VFogV.hlsl b/Templates/BaseGame/game/core/shaders/VolumetricFog/VFogV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/VolumetricFog/VFogV.hlsl rename to Templates/BaseGame/game/core/shaders/VolumetricFog/VFogV.hlsl diff --git a/Templates/Empty/game/shaders/common/VolumetricFog/gl/VFogP.glsl b/Templates/BaseGame/game/core/shaders/VolumetricFog/gl/VFogP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/VolumetricFog/gl/VFogP.glsl rename to Templates/BaseGame/game/core/shaders/VolumetricFog/gl/VFogP.glsl diff --git a/Templates/Empty/game/shaders/common/VolumetricFog/gl/VFogPreP.glsl b/Templates/BaseGame/game/core/shaders/VolumetricFog/gl/VFogPreP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/VolumetricFog/gl/VFogPreP.glsl rename to Templates/BaseGame/game/core/shaders/VolumetricFog/gl/VFogPreP.glsl diff --git a/Templates/Empty/game/shaders/common/VolumetricFog/gl/VFogPreV.glsl b/Templates/BaseGame/game/core/shaders/VolumetricFog/gl/VFogPreV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/VolumetricFog/gl/VFogPreV.glsl rename to Templates/BaseGame/game/core/shaders/VolumetricFog/gl/VFogPreV.glsl diff --git a/Templates/Empty/game/shaders/common/VolumetricFog/gl/VFogRefl.glsl b/Templates/BaseGame/game/core/shaders/VolumetricFog/gl/VFogRefl.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/VolumetricFog/gl/VFogRefl.glsl rename to Templates/BaseGame/game/core/shaders/VolumetricFog/gl/VFogRefl.glsl diff --git a/Templates/Empty/game/shaders/common/VolumetricFog/gl/VFogV.glsl b/Templates/BaseGame/game/core/shaders/VolumetricFog/gl/VFogV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/VolumetricFog/gl/VFogV.glsl rename to Templates/BaseGame/game/core/shaders/VolumetricFog/gl/VFogV.glsl diff --git a/Templates/Empty/game/shaders/common/basicCloudsP.hlsl b/Templates/BaseGame/game/core/shaders/basicCloudsP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/basicCloudsP.hlsl rename to Templates/BaseGame/game/core/shaders/basicCloudsP.hlsl diff --git a/Templates/Empty/game/shaders/common/basicCloudsV.hlsl b/Templates/BaseGame/game/core/shaders/basicCloudsV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/basicCloudsV.hlsl rename to Templates/BaseGame/game/core/shaders/basicCloudsV.hlsl diff --git a/Templates/Empty/game/shaders/common/cloudLayerP.hlsl b/Templates/BaseGame/game/core/shaders/cloudLayerP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/cloudLayerP.hlsl rename to Templates/BaseGame/game/core/shaders/cloudLayerP.hlsl diff --git a/Templates/Empty/game/shaders/common/cloudLayerV.hlsl b/Templates/BaseGame/game/core/shaders/cloudLayerV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/cloudLayerV.hlsl rename to Templates/BaseGame/game/core/shaders/cloudLayerV.hlsl diff --git a/Templates/Empty/game/shaders/common/fixedFunction/addColorTextureP.hlsl b/Templates/BaseGame/game/core/shaders/fixedFunction/addColorTextureP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/fixedFunction/addColorTextureP.hlsl rename to Templates/BaseGame/game/core/shaders/fixedFunction/addColorTextureP.hlsl diff --git a/Templates/Empty/game/shaders/common/fixedFunction/addColorTextureV.hlsl b/Templates/BaseGame/game/core/shaders/fixedFunction/addColorTextureV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/fixedFunction/addColorTextureV.hlsl rename to Templates/BaseGame/game/core/shaders/fixedFunction/addColorTextureV.hlsl diff --git a/Templates/Empty/game/shaders/common/fixedFunction/colorP.hlsl b/Templates/BaseGame/game/core/shaders/fixedFunction/colorP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/fixedFunction/colorP.hlsl rename to Templates/BaseGame/game/core/shaders/fixedFunction/colorP.hlsl diff --git a/Templates/Empty/game/shaders/common/fixedFunction/colorV.hlsl b/Templates/BaseGame/game/core/shaders/fixedFunction/colorV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/fixedFunction/colorV.hlsl rename to Templates/BaseGame/game/core/shaders/fixedFunction/colorV.hlsl diff --git a/Templates/Empty/game/shaders/common/fixedFunction/gl/addColorTextureP.glsl b/Templates/BaseGame/game/core/shaders/fixedFunction/gl/addColorTextureP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/fixedFunction/gl/addColorTextureP.glsl rename to Templates/BaseGame/game/core/shaders/fixedFunction/gl/addColorTextureP.glsl diff --git a/Templates/Empty/game/shaders/common/fixedFunction/gl/addColorTextureV.glsl b/Templates/BaseGame/game/core/shaders/fixedFunction/gl/addColorTextureV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/fixedFunction/gl/addColorTextureV.glsl rename to Templates/BaseGame/game/core/shaders/fixedFunction/gl/addColorTextureV.glsl diff --git a/Templates/Empty/game/shaders/common/fixedFunction/gl/colorP.glsl b/Templates/BaseGame/game/core/shaders/fixedFunction/gl/colorP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/fixedFunction/gl/colorP.glsl rename to Templates/BaseGame/game/core/shaders/fixedFunction/gl/colorP.glsl diff --git a/Templates/Empty/game/shaders/common/fixedFunction/gl/colorV.glsl b/Templates/BaseGame/game/core/shaders/fixedFunction/gl/colorV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/fixedFunction/gl/colorV.glsl rename to Templates/BaseGame/game/core/shaders/fixedFunction/gl/colorV.glsl diff --git a/Templates/Empty/game/shaders/common/fixedFunction/gl/modColorTextureP.glsl b/Templates/BaseGame/game/core/shaders/fixedFunction/gl/modColorTextureP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/fixedFunction/gl/modColorTextureP.glsl rename to Templates/BaseGame/game/core/shaders/fixedFunction/gl/modColorTextureP.glsl diff --git a/Templates/Empty/game/shaders/common/fixedFunction/gl/modColorTextureV.glsl b/Templates/BaseGame/game/core/shaders/fixedFunction/gl/modColorTextureV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/fixedFunction/gl/modColorTextureV.glsl rename to Templates/BaseGame/game/core/shaders/fixedFunction/gl/modColorTextureV.glsl diff --git a/Templates/Empty/game/shaders/common/fixedFunction/gl/targetRestoreP.glsl b/Templates/BaseGame/game/core/shaders/fixedFunction/gl/targetRestoreP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/fixedFunction/gl/targetRestoreP.glsl rename to Templates/BaseGame/game/core/shaders/fixedFunction/gl/targetRestoreP.glsl diff --git a/Templates/Empty/game/shaders/common/fixedFunction/gl/targetRestoreV.glsl b/Templates/BaseGame/game/core/shaders/fixedFunction/gl/targetRestoreV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/fixedFunction/gl/targetRestoreV.glsl rename to Templates/BaseGame/game/core/shaders/fixedFunction/gl/targetRestoreV.glsl diff --git a/Templates/Empty/game/shaders/common/fixedFunction/gl/textureP.glsl b/Templates/BaseGame/game/core/shaders/fixedFunction/gl/textureP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/fixedFunction/gl/textureP.glsl rename to Templates/BaseGame/game/core/shaders/fixedFunction/gl/textureP.glsl diff --git a/Templates/Empty/game/shaders/common/fixedFunction/gl/textureV.glsl b/Templates/BaseGame/game/core/shaders/fixedFunction/gl/textureV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/fixedFunction/gl/textureV.glsl rename to Templates/BaseGame/game/core/shaders/fixedFunction/gl/textureV.glsl diff --git a/Templates/Empty/game/shaders/common/fixedFunction/modColorTextureP.hlsl b/Templates/BaseGame/game/core/shaders/fixedFunction/modColorTextureP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/fixedFunction/modColorTextureP.hlsl rename to Templates/BaseGame/game/core/shaders/fixedFunction/modColorTextureP.hlsl diff --git a/Templates/Empty/game/shaders/common/fixedFunction/modColorTextureV.hlsl b/Templates/BaseGame/game/core/shaders/fixedFunction/modColorTextureV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/fixedFunction/modColorTextureV.hlsl rename to Templates/BaseGame/game/core/shaders/fixedFunction/modColorTextureV.hlsl diff --git a/Templates/Empty/game/shaders/common/fixedFunction/targetRestoreP.hlsl b/Templates/BaseGame/game/core/shaders/fixedFunction/targetRestoreP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/fixedFunction/targetRestoreP.hlsl rename to Templates/BaseGame/game/core/shaders/fixedFunction/targetRestoreP.hlsl diff --git a/Templates/Empty/game/shaders/common/fixedFunction/targetRestoreV.hlsl b/Templates/BaseGame/game/core/shaders/fixedFunction/targetRestoreV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/fixedFunction/targetRestoreV.hlsl rename to Templates/BaseGame/game/core/shaders/fixedFunction/targetRestoreV.hlsl diff --git a/Templates/Empty/game/shaders/common/fixedFunction/textureP.hlsl b/Templates/BaseGame/game/core/shaders/fixedFunction/textureP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/fixedFunction/textureP.hlsl rename to Templates/BaseGame/game/core/shaders/fixedFunction/textureP.hlsl diff --git a/Templates/Empty/game/shaders/common/fixedFunction/textureV.hlsl b/Templates/BaseGame/game/core/shaders/fixedFunction/textureV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/fixedFunction/textureV.hlsl rename to Templates/BaseGame/game/core/shaders/fixedFunction/textureV.hlsl diff --git a/Templates/Empty/game/shaders/common/foliage.hlsl b/Templates/BaseGame/game/core/shaders/foliage.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/foliage.hlsl rename to Templates/BaseGame/game/core/shaders/foliage.hlsl diff --git a/Templates/Empty/game/shaders/common/fxFoliageReplicatorP.hlsl b/Templates/BaseGame/game/core/shaders/fxFoliageReplicatorP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/fxFoliageReplicatorP.hlsl rename to Templates/BaseGame/game/core/shaders/fxFoliageReplicatorP.hlsl diff --git a/Templates/Empty/game/shaders/common/fxFoliageReplicatorV.hlsl b/Templates/BaseGame/game/core/shaders/fxFoliageReplicatorV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/fxFoliageReplicatorV.hlsl rename to Templates/BaseGame/game/core/shaders/fxFoliageReplicatorV.hlsl diff --git a/Templates/Empty/game/shaders/common/gl/basicCloudsP.glsl b/Templates/BaseGame/game/core/shaders/gl/basicCloudsP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/gl/basicCloudsP.glsl rename to Templates/BaseGame/game/core/shaders/gl/basicCloudsP.glsl diff --git a/Templates/Empty/game/shaders/common/gl/basicCloudsV.glsl b/Templates/BaseGame/game/core/shaders/gl/basicCloudsV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/gl/basicCloudsV.glsl rename to Templates/BaseGame/game/core/shaders/gl/basicCloudsV.glsl diff --git a/Templates/Empty/game/shaders/common/gl/blurP.glsl b/Templates/BaseGame/game/core/shaders/gl/blurP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/gl/blurP.glsl rename to Templates/BaseGame/game/core/shaders/gl/blurP.glsl diff --git a/Templates/Empty/game/shaders/common/gl/blurV.glsl b/Templates/BaseGame/game/core/shaders/gl/blurV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/gl/blurV.glsl rename to Templates/BaseGame/game/core/shaders/gl/blurV.glsl diff --git a/Templates/Empty/game/shaders/common/gl/cloudLayerP.glsl b/Templates/BaseGame/game/core/shaders/gl/cloudLayerP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/gl/cloudLayerP.glsl rename to Templates/BaseGame/game/core/shaders/gl/cloudLayerP.glsl diff --git a/Templates/Empty/game/shaders/common/gl/cloudLayerV.glsl b/Templates/BaseGame/game/core/shaders/gl/cloudLayerV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/gl/cloudLayerV.glsl rename to Templates/BaseGame/game/core/shaders/gl/cloudLayerV.glsl diff --git a/Templates/Empty/game/shaders/common/gl/foliage.glsl b/Templates/BaseGame/game/core/shaders/gl/foliage.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/gl/foliage.glsl rename to Templates/BaseGame/game/core/shaders/gl/foliage.glsl diff --git a/Templates/Empty/game/shaders/common/gl/fxFoliageReplicatorP.glsl b/Templates/BaseGame/game/core/shaders/gl/fxFoliageReplicatorP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/gl/fxFoliageReplicatorP.glsl rename to Templates/BaseGame/game/core/shaders/gl/fxFoliageReplicatorP.glsl diff --git a/Templates/Empty/game/shaders/common/gl/fxFoliageReplicatorV.glsl b/Templates/BaseGame/game/core/shaders/gl/fxFoliageReplicatorV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/gl/fxFoliageReplicatorV.glsl rename to Templates/BaseGame/game/core/shaders/gl/fxFoliageReplicatorV.glsl diff --git a/Templates/Empty/game/shaders/common/gl/guiMaterialV.glsl b/Templates/BaseGame/game/core/shaders/gl/guiMaterialV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/gl/guiMaterialV.glsl rename to Templates/BaseGame/game/core/shaders/gl/guiMaterialV.glsl diff --git a/Templates/Empty/game/shaders/common/gl/hlslCompat.glsl b/Templates/BaseGame/game/core/shaders/gl/hlslCompat.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/gl/hlslCompat.glsl rename to Templates/BaseGame/game/core/shaders/gl/hlslCompat.glsl diff --git a/Templates/Empty/game/shaders/common/gl/imposter.glsl b/Templates/BaseGame/game/core/shaders/gl/imposter.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/gl/imposter.glsl rename to Templates/BaseGame/game/core/shaders/gl/imposter.glsl diff --git a/Templates/Empty/game/shaders/common/gl/lighting.glsl b/Templates/BaseGame/game/core/shaders/gl/lighting.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/gl/lighting.glsl rename to Templates/BaseGame/game/core/shaders/gl/lighting.glsl diff --git a/Templates/Empty/game/shaders/common/gl/particleCompositeP.glsl b/Templates/BaseGame/game/core/shaders/gl/particleCompositeP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/gl/particleCompositeP.glsl rename to Templates/BaseGame/game/core/shaders/gl/particleCompositeP.glsl diff --git a/Templates/Empty/game/shaders/common/gl/particleCompositeV.glsl b/Templates/BaseGame/game/core/shaders/gl/particleCompositeV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/gl/particleCompositeV.glsl rename to Templates/BaseGame/game/core/shaders/gl/particleCompositeV.glsl diff --git a/Templates/Empty/game/shaders/common/gl/particlesP.glsl b/Templates/BaseGame/game/core/shaders/gl/particlesP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/gl/particlesP.glsl rename to Templates/BaseGame/game/core/shaders/gl/particlesP.glsl diff --git a/Templates/Empty/game/shaders/common/gl/particlesV.glsl b/Templates/BaseGame/game/core/shaders/gl/particlesV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/gl/particlesV.glsl rename to Templates/BaseGame/game/core/shaders/gl/particlesV.glsl diff --git a/Templates/Empty/game/shaders/common/gl/planarReflectBumpP.glsl b/Templates/BaseGame/game/core/shaders/gl/planarReflectBumpP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/gl/planarReflectBumpP.glsl rename to Templates/BaseGame/game/core/shaders/gl/planarReflectBumpP.glsl diff --git a/Templates/Empty/game/shaders/common/gl/planarReflectBumpV.glsl b/Templates/BaseGame/game/core/shaders/gl/planarReflectBumpV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/gl/planarReflectBumpV.glsl rename to Templates/BaseGame/game/core/shaders/gl/planarReflectBumpV.glsl diff --git a/Templates/Empty/game/shaders/common/gl/planarReflectP.glsl b/Templates/BaseGame/game/core/shaders/gl/planarReflectP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/gl/planarReflectP.glsl rename to Templates/BaseGame/game/core/shaders/gl/planarReflectP.glsl diff --git a/Templates/Empty/game/shaders/common/gl/planarReflectV.glsl b/Templates/BaseGame/game/core/shaders/gl/planarReflectV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/gl/planarReflectV.glsl rename to Templates/BaseGame/game/core/shaders/gl/planarReflectV.glsl diff --git a/Templates/Empty/game/shaders/common/gl/precipP.glsl b/Templates/BaseGame/game/core/shaders/gl/precipP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/gl/precipP.glsl rename to Templates/BaseGame/game/core/shaders/gl/precipP.glsl diff --git a/Templates/Empty/game/shaders/common/gl/precipV.glsl b/Templates/BaseGame/game/core/shaders/gl/precipV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/gl/precipV.glsl rename to Templates/BaseGame/game/core/shaders/gl/precipV.glsl diff --git a/Templates/Empty/game/shaders/common/gl/projectedShadowP.glsl b/Templates/BaseGame/game/core/shaders/gl/projectedShadowP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/gl/projectedShadowP.glsl rename to Templates/BaseGame/game/core/shaders/gl/projectedShadowP.glsl diff --git a/Templates/Empty/game/shaders/common/gl/projectedShadowV.glsl b/Templates/BaseGame/game/core/shaders/gl/projectedShadowV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/gl/projectedShadowV.glsl rename to Templates/BaseGame/game/core/shaders/gl/projectedShadowV.glsl diff --git a/Templates/Empty/game/shaders/common/gl/scatterSkyP.glsl b/Templates/BaseGame/game/core/shaders/gl/scatterSkyP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/gl/scatterSkyP.glsl rename to Templates/BaseGame/game/core/shaders/gl/scatterSkyP.glsl diff --git a/Templates/Empty/game/shaders/common/gl/scatterSkyV.glsl b/Templates/BaseGame/game/core/shaders/gl/scatterSkyV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/gl/scatterSkyV.glsl rename to Templates/BaseGame/game/core/shaders/gl/scatterSkyV.glsl diff --git a/Templates/Empty/game/shaders/common/gl/torque.glsl b/Templates/BaseGame/game/core/shaders/gl/torque.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/gl/torque.glsl rename to Templates/BaseGame/game/core/shaders/gl/torque.glsl diff --git a/Templates/Empty/game/shaders/common/gl/wavesP.glsl b/Templates/BaseGame/game/core/shaders/gl/wavesP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/gl/wavesP.glsl rename to Templates/BaseGame/game/core/shaders/gl/wavesP.glsl diff --git a/Templates/Empty/game/shaders/common/gl/wind.glsl b/Templates/BaseGame/game/core/shaders/gl/wind.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/gl/wind.glsl rename to Templates/BaseGame/game/core/shaders/gl/wind.glsl diff --git a/Templates/Empty/game/shaders/common/guiMaterialV.hlsl b/Templates/BaseGame/game/core/shaders/guiMaterialV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/guiMaterialV.hlsl rename to Templates/BaseGame/game/core/shaders/guiMaterialV.hlsl diff --git a/Templates/Empty/game/shaders/common/hlslStructs.h b/Templates/BaseGame/game/core/shaders/hlslStructs.h similarity index 100% rename from Templates/Empty/game/shaders/common/hlslStructs.h rename to Templates/BaseGame/game/core/shaders/hlslStructs.h diff --git a/Templates/Empty/game/shaders/common/hlslStructs.hlsl b/Templates/BaseGame/game/core/shaders/hlslStructs.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/hlslStructs.hlsl rename to Templates/BaseGame/game/core/shaders/hlslStructs.hlsl diff --git a/Templates/Empty/game/shaders/common/imposter.hlsl b/Templates/BaseGame/game/core/shaders/imposter.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/imposter.hlsl rename to Templates/BaseGame/game/core/shaders/imposter.hlsl diff --git a/Templates/Empty/game/shaders/common/lighting.hlsl b/Templates/BaseGame/game/core/shaders/lighting.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/lighting.hlsl rename to Templates/BaseGame/game/core/shaders/lighting.hlsl diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/convexGeometryV.hlsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/convexGeometryV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/advanced/convexGeometryV.hlsl rename to Templates/BaseGame/game/core/shaders/lighting/advanced/convexGeometryV.hlsl diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/deferredClearGBufferP.hlsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/deferredClearGBufferP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/advanced/deferredClearGBufferP.hlsl rename to Templates/BaseGame/game/core/shaders/lighting/advanced/deferredClearGBufferP.hlsl diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/deferredClearGBufferV.hlsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/deferredClearGBufferV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/advanced/deferredClearGBufferV.hlsl rename to Templates/BaseGame/game/core/shaders/lighting/advanced/deferredClearGBufferV.hlsl diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/deferredColorShaderP.hlsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/deferredColorShaderP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/advanced/deferredColorShaderP.hlsl rename to Templates/BaseGame/game/core/shaders/lighting/advanced/deferredColorShaderP.hlsl diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/deferredShadingP.hlsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/deferredShadingP.hlsl similarity index 98% rename from Templates/Empty/game/shaders/common/lighting/advanced/deferredShadingP.hlsl rename to Templates/BaseGame/game/core/shaders/lighting/advanced/deferredShadingP.hlsl index 992cde5cb..338ebd8da 100644 --- a/Templates/Empty/game/shaders/common/lighting/advanced/deferredShadingP.hlsl +++ b/Templates/BaseGame/game/core/shaders/lighting/advanced/deferredShadingP.hlsl @@ -22,7 +22,7 @@ #include "../../shaderModelAutoGen.hlsl" #include "../../postfx/postFx.hlsl" -#include "shaders/common/torque.hlsl" +#include "../../torque.hlsl" TORQUE_UNIFORM_SAMPLER2D(colorBufferTex,0); TORQUE_UNIFORM_SAMPLER2D(lightPrePassTex,1); diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/farFrustumQuad.hlsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/farFrustumQuad.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/advanced/farFrustumQuad.hlsl rename to Templates/BaseGame/game/core/shaders/lighting/advanced/farFrustumQuad.hlsl diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/farFrustumQuadV.hlsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/farFrustumQuadV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/advanced/farFrustumQuadV.hlsl rename to Templates/BaseGame/game/core/shaders/lighting/advanced/farFrustumQuadV.hlsl diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/gl/convexGeometryV.glsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/gl/convexGeometryV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/advanced/gl/convexGeometryV.glsl rename to Templates/BaseGame/game/core/shaders/lighting/advanced/gl/convexGeometryV.glsl diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/gl/deferredClearGBufferP.glsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/gl/deferredClearGBufferP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/advanced/gl/deferredClearGBufferP.glsl rename to Templates/BaseGame/game/core/shaders/lighting/advanced/gl/deferredClearGBufferP.glsl diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/gl/deferredColorShaderP.glsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/gl/deferredColorShaderP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/advanced/gl/deferredColorShaderP.glsl rename to Templates/BaseGame/game/core/shaders/lighting/advanced/gl/deferredColorShaderP.glsl diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/gl/deferredShadingP.glsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/gl/deferredShadingP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/advanced/gl/deferredShadingP.glsl rename to Templates/BaseGame/game/core/shaders/lighting/advanced/gl/deferredShadingP.glsl diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/gl/farFrustumQuad.glsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/gl/farFrustumQuad.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/advanced/gl/farFrustumQuad.glsl rename to Templates/BaseGame/game/core/shaders/lighting/advanced/gl/farFrustumQuad.glsl diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/gl/farFrustumQuadV.glsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/gl/farFrustumQuadV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/advanced/gl/farFrustumQuadV.glsl rename to Templates/BaseGame/game/core/shaders/lighting/advanced/gl/farFrustumQuadV.glsl diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/gl/lightingUtils.glsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/gl/lightingUtils.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/advanced/gl/lightingUtils.glsl rename to Templates/BaseGame/game/core/shaders/lighting/advanced/gl/lightingUtils.glsl diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/gl/pointLightP.glsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/gl/pointLightP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/advanced/gl/pointLightP.glsl rename to Templates/BaseGame/game/core/shaders/lighting/advanced/gl/pointLightP.glsl diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/gl/softShadow.glsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/gl/softShadow.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/advanced/gl/softShadow.glsl rename to Templates/BaseGame/game/core/shaders/lighting/advanced/gl/softShadow.glsl diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/gl/spotLightP.glsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/gl/spotLightP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/advanced/gl/spotLightP.glsl rename to Templates/BaseGame/game/core/shaders/lighting/advanced/gl/spotLightP.glsl diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/gl/vectorLightP.glsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/gl/vectorLightP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/advanced/gl/vectorLightP.glsl rename to Templates/BaseGame/game/core/shaders/lighting/advanced/gl/vectorLightP.glsl diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/lightingUtils.hlsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/lightingUtils.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/advanced/lightingUtils.hlsl rename to Templates/BaseGame/game/core/shaders/lighting/advanced/lightingUtils.hlsl diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/particlePointLightP.hlsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/particlePointLightP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/advanced/particlePointLightP.hlsl rename to Templates/BaseGame/game/core/shaders/lighting/advanced/particlePointLightP.hlsl diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/particlePointLightV.hlsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/particlePointLightV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/advanced/particlePointLightV.hlsl rename to Templates/BaseGame/game/core/shaders/lighting/advanced/particlePointLightV.hlsl diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/pointLightP.hlsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/pointLightP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/advanced/pointLightP.hlsl rename to Templates/BaseGame/game/core/shaders/lighting/advanced/pointLightP.hlsl diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/softShadow.hlsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/softShadow.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/advanced/softShadow.hlsl rename to Templates/BaseGame/game/core/shaders/lighting/advanced/softShadow.hlsl diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/spotLightP.hlsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/spotLightP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/advanced/spotLightP.hlsl rename to Templates/BaseGame/game/core/shaders/lighting/advanced/spotLightP.hlsl diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/vectorLightP.hlsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/vectorLightP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/advanced/vectorLightP.hlsl rename to Templates/BaseGame/game/core/shaders/lighting/advanced/vectorLightP.hlsl diff --git a/Templates/Empty/game/shaders/common/lighting/basic/gl/shadowFilterP.glsl b/Templates/BaseGame/game/core/shaders/lighting/basic/gl/shadowFilterP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/basic/gl/shadowFilterP.glsl rename to Templates/BaseGame/game/core/shaders/lighting/basic/gl/shadowFilterP.glsl diff --git a/Templates/Empty/game/shaders/common/lighting/basic/gl/shadowFilterV.glsl b/Templates/BaseGame/game/core/shaders/lighting/basic/gl/shadowFilterV.glsl similarity index 96% rename from Templates/Empty/game/shaders/common/lighting/basic/gl/shadowFilterV.glsl rename to Templates/BaseGame/game/core/shaders/lighting/basic/gl/shadowFilterV.glsl index 0eeb2e0fd..67b5f1378 100644 --- a/Templates/Empty/game/shaders/common/lighting/basic/gl/shadowFilterV.glsl +++ b/Templates/BaseGame/game/core/shaders/lighting/basic/gl/shadowFilterV.glsl @@ -20,7 +20,7 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -#include "../../../../../../shaders/common/gl/torque.glsl" +#include "../../../gl/torque.glsl" in vec4 vPosition; in vec2 vTexCoord0; diff --git a/Templates/Empty/game/shaders/common/lighting/basic/shadowFilterP.hlsl b/Templates/BaseGame/game/core/shaders/lighting/basic/shadowFilterP.hlsl similarity index 97% rename from Templates/Empty/game/shaders/common/lighting/basic/shadowFilterP.hlsl rename to Templates/BaseGame/game/core/shaders/lighting/basic/shadowFilterP.hlsl index b56aade8d..cf819eed3 100644 --- a/Templates/Empty/game/shaders/common/lighting/basic/shadowFilterP.hlsl +++ b/Templates/BaseGame/game/core/shaders/lighting/basic/shadowFilterP.hlsl @@ -20,7 +20,7 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -#include "shaders/common/postFx/postFx.hlsl" +#include "../../postFx/postFx.hlsl" TORQUE_UNIFORM_SAMPLER2D(diffuseMap, 0); diff --git a/Templates/Empty/game/shaders/common/lighting/basic/shadowFilterV.hlsl b/Templates/BaseGame/game/core/shaders/lighting/basic/shadowFilterV.hlsl similarity index 92% rename from Templates/Empty/game/shaders/common/lighting/basic/shadowFilterV.hlsl rename to Templates/BaseGame/game/core/shaders/lighting/basic/shadowFilterV.hlsl index c89af7357..d0838016b 100644 --- a/Templates/Empty/game/shaders/common/lighting/basic/shadowFilterV.hlsl +++ b/Templates/BaseGame/game/core/shaders/lighting/basic/shadowFilterV.hlsl @@ -20,8 +20,8 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -#include "../../../../../../shaders/common/postFx/postFx.hlsl" -#include "../../../../../../shaders/common/torque.hlsl" +#include "../../postFx/postFx.hlsl" +#include "../../torque.hlsl" float4 rtParams0; diff --git a/Templates/Empty/game/shaders/common/lighting/shadowMap/boxFilterP.hlsl b/Templates/BaseGame/game/core/shaders/lighting/shadowMap/boxFilterP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/shadowMap/boxFilterP.hlsl rename to Templates/BaseGame/game/core/shaders/lighting/shadowMap/boxFilterP.hlsl diff --git a/Templates/Empty/game/shaders/common/lighting/shadowMap/boxFilterV.hlsl b/Templates/BaseGame/game/core/shaders/lighting/shadowMap/boxFilterV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/shadowMap/boxFilterV.hlsl rename to Templates/BaseGame/game/core/shaders/lighting/shadowMap/boxFilterV.hlsl diff --git a/Templates/Empty/game/shaders/common/lighting/shadowMap/gl/boxFilterP.glsl b/Templates/BaseGame/game/core/shaders/lighting/shadowMap/gl/boxFilterP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/shadowMap/gl/boxFilterP.glsl rename to Templates/BaseGame/game/core/shaders/lighting/shadowMap/gl/boxFilterP.glsl diff --git a/Templates/Empty/game/shaders/common/lighting/shadowMap/gl/boxFilterV.glsl b/Templates/BaseGame/game/core/shaders/lighting/shadowMap/gl/boxFilterV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/shadowMap/gl/boxFilterV.glsl rename to Templates/BaseGame/game/core/shaders/lighting/shadowMap/gl/boxFilterV.glsl diff --git a/Templates/Empty/game/shaders/common/lighting/shadowMap/shadowMapIO.h b/Templates/BaseGame/game/core/shaders/lighting/shadowMap/shadowMapIO.h similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/shadowMap/shadowMapIO.h rename to Templates/BaseGame/game/core/shaders/lighting/shadowMap/shadowMapIO.h diff --git a/Templates/Empty/game/shaders/common/lighting/shadowMap/shadowMapIO_GLSL.h b/Templates/BaseGame/game/core/shaders/lighting/shadowMap/shadowMapIO_GLSL.h similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/shadowMap/shadowMapIO_GLSL.h rename to Templates/BaseGame/game/core/shaders/lighting/shadowMap/shadowMapIO_GLSL.h diff --git a/Templates/Empty/game/shaders/common/lighting/shadowMap/shadowMapIO_HLSL.h b/Templates/BaseGame/game/core/shaders/lighting/shadowMap/shadowMapIO_HLSL.h similarity index 100% rename from Templates/Empty/game/shaders/common/lighting/shadowMap/shadowMapIO_HLSL.h rename to Templates/BaseGame/game/core/shaders/lighting/shadowMap/shadowMapIO_HLSL.h diff --git a/Templates/Empty/game/shaders/common/particleCompositeP.hlsl b/Templates/BaseGame/game/core/shaders/particleCompositeP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/particleCompositeP.hlsl rename to Templates/BaseGame/game/core/shaders/particleCompositeP.hlsl diff --git a/Templates/Empty/game/shaders/common/particleCompositeV.hlsl b/Templates/BaseGame/game/core/shaders/particleCompositeV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/particleCompositeV.hlsl rename to Templates/BaseGame/game/core/shaders/particleCompositeV.hlsl diff --git a/Templates/Empty/game/shaders/common/particlesP.hlsl b/Templates/BaseGame/game/core/shaders/particlesP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/particlesP.hlsl rename to Templates/BaseGame/game/core/shaders/particlesP.hlsl diff --git a/Templates/Empty/game/shaders/common/particlesV.hlsl b/Templates/BaseGame/game/core/shaders/particlesV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/particlesV.hlsl rename to Templates/BaseGame/game/core/shaders/particlesV.hlsl diff --git a/Templates/Empty/game/shaders/common/planarReflectBumpP.hlsl b/Templates/BaseGame/game/core/shaders/planarReflectBumpP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/planarReflectBumpP.hlsl rename to Templates/BaseGame/game/core/shaders/planarReflectBumpP.hlsl diff --git a/Templates/Empty/game/shaders/common/planarReflectBumpV.hlsl b/Templates/BaseGame/game/core/shaders/planarReflectBumpV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/planarReflectBumpV.hlsl rename to Templates/BaseGame/game/core/shaders/planarReflectBumpV.hlsl diff --git a/Templates/Empty/game/shaders/common/planarReflectP.hlsl b/Templates/BaseGame/game/core/shaders/planarReflectP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/planarReflectP.hlsl rename to Templates/BaseGame/game/core/shaders/planarReflectP.hlsl diff --git a/Templates/Empty/game/shaders/common/planarReflectV.hlsl b/Templates/BaseGame/game/core/shaders/planarReflectV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/planarReflectV.hlsl rename to Templates/BaseGame/game/core/shaders/planarReflectV.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/VolFogGlowP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/VolFogGlowP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/VolFogGlowP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/VolFogGlowP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/caustics/causticsP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/caustics/causticsP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/caustics/causticsP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/caustics/causticsP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/caustics/gl/causticsP.glsl b/Templates/BaseGame/game/core/shaders/postFX/caustics/gl/causticsP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/caustics/gl/causticsP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/caustics/gl/causticsP.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/chromaticLens.hlsl b/Templates/BaseGame/game/core/shaders/postFX/chromaticLens.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/chromaticLens.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/chromaticLens.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/dof/DOF_CalcCoC_P.hlsl b/Templates/BaseGame/game/core/shaders/postFX/dof/DOF_CalcCoC_P.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/dof/DOF_CalcCoC_P.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/dof/DOF_CalcCoC_P.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/dof/DOF_CalcCoC_V.hlsl b/Templates/BaseGame/game/core/shaders/postFX/dof/DOF_CalcCoC_V.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/dof/DOF_CalcCoC_V.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/dof/DOF_CalcCoC_V.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/dof/DOF_DownSample_P.hlsl b/Templates/BaseGame/game/core/shaders/postFX/dof/DOF_DownSample_P.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/dof/DOF_DownSample_P.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/dof/DOF_DownSample_P.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/dof/DOF_DownSample_V.hlsl b/Templates/BaseGame/game/core/shaders/postFX/dof/DOF_DownSample_V.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/dof/DOF_DownSample_V.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/dof/DOF_DownSample_V.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/dof/DOF_Final_P.hlsl b/Templates/BaseGame/game/core/shaders/postFX/dof/DOF_Final_P.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/dof/DOF_Final_P.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/dof/DOF_Final_P.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/dof/DOF_Final_V.hlsl b/Templates/BaseGame/game/core/shaders/postFX/dof/DOF_Final_V.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/dof/DOF_Final_V.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/dof/DOF_Final_V.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/dof/DOF_Gausian_P.hlsl b/Templates/BaseGame/game/core/shaders/postFX/dof/DOF_Gausian_P.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/dof/DOF_Gausian_P.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/dof/DOF_Gausian_P.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/dof/DOF_Gausian_V.hlsl b/Templates/BaseGame/game/core/shaders/postFX/dof/DOF_Gausian_V.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/dof/DOF_Gausian_V.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/dof/DOF_Gausian_V.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/dof/DOF_Passthrough_V.hlsl b/Templates/BaseGame/game/core/shaders/postFX/dof/DOF_Passthrough_V.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/dof/DOF_Passthrough_V.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/dof/DOF_Passthrough_V.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/dof/DOF_SmallBlur_P.hlsl b/Templates/BaseGame/game/core/shaders/postFX/dof/DOF_SmallBlur_P.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/dof/DOF_SmallBlur_P.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/dof/DOF_SmallBlur_P.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/dof/DOF_SmallBlur_V.hlsl b/Templates/BaseGame/game/core/shaders/postFX/dof/DOF_SmallBlur_V.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/dof/DOF_SmallBlur_V.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/dof/DOF_SmallBlur_V.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/dof/gl/DOF_CalcCoC_P.glsl b/Templates/BaseGame/game/core/shaders/postFX/dof/gl/DOF_CalcCoC_P.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/dof/gl/DOF_CalcCoC_P.glsl rename to Templates/BaseGame/game/core/shaders/postFX/dof/gl/DOF_CalcCoC_P.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/dof/gl/DOF_CalcCoC_V.glsl b/Templates/BaseGame/game/core/shaders/postFX/dof/gl/DOF_CalcCoC_V.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/dof/gl/DOF_CalcCoC_V.glsl rename to Templates/BaseGame/game/core/shaders/postFX/dof/gl/DOF_CalcCoC_V.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/dof/gl/DOF_DownSample_P.glsl b/Templates/BaseGame/game/core/shaders/postFX/dof/gl/DOF_DownSample_P.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/dof/gl/DOF_DownSample_P.glsl rename to Templates/BaseGame/game/core/shaders/postFX/dof/gl/DOF_DownSample_P.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/dof/gl/DOF_DownSample_V.glsl b/Templates/BaseGame/game/core/shaders/postFX/dof/gl/DOF_DownSample_V.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/dof/gl/DOF_DownSample_V.glsl rename to Templates/BaseGame/game/core/shaders/postFX/dof/gl/DOF_DownSample_V.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/dof/gl/DOF_Final_P.glsl b/Templates/BaseGame/game/core/shaders/postFX/dof/gl/DOF_Final_P.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/dof/gl/DOF_Final_P.glsl rename to Templates/BaseGame/game/core/shaders/postFX/dof/gl/DOF_Final_P.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/dof/gl/DOF_Final_V.glsl b/Templates/BaseGame/game/core/shaders/postFX/dof/gl/DOF_Final_V.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/dof/gl/DOF_Final_V.glsl rename to Templates/BaseGame/game/core/shaders/postFX/dof/gl/DOF_Final_V.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/dof/gl/DOF_Gausian_P.glsl b/Templates/BaseGame/game/core/shaders/postFX/dof/gl/DOF_Gausian_P.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/dof/gl/DOF_Gausian_P.glsl rename to Templates/BaseGame/game/core/shaders/postFX/dof/gl/DOF_Gausian_P.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/dof/gl/DOF_Gausian_V.glsl b/Templates/BaseGame/game/core/shaders/postFX/dof/gl/DOF_Gausian_V.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/dof/gl/DOF_Gausian_V.glsl rename to Templates/BaseGame/game/core/shaders/postFX/dof/gl/DOF_Gausian_V.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/dof/gl/DOF_Passthrough_V.glsl b/Templates/BaseGame/game/core/shaders/postFX/dof/gl/DOF_Passthrough_V.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/dof/gl/DOF_Passthrough_V.glsl rename to Templates/BaseGame/game/core/shaders/postFX/dof/gl/DOF_Passthrough_V.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/dof/gl/DOF_SmallBlur_P.glsl b/Templates/BaseGame/game/core/shaders/postFX/dof/gl/DOF_SmallBlur_P.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/dof/gl/DOF_SmallBlur_P.glsl rename to Templates/BaseGame/game/core/shaders/postFX/dof/gl/DOF_SmallBlur_P.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/dof/gl/DOF_SmallBlur_V.glsl b/Templates/BaseGame/game/core/shaders/postFX/dof/gl/DOF_SmallBlur_V.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/dof/gl/DOF_SmallBlur_V.glsl rename to Templates/BaseGame/game/core/shaders/postFX/dof/gl/DOF_SmallBlur_V.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/edgeaa/dbgEdgeDisplayP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/edgeaa/dbgEdgeDisplayP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/edgeaa/dbgEdgeDisplayP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/edgeaa/dbgEdgeDisplayP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/edgeaa/edgeAAP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/edgeaa/edgeAAP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/edgeaa/edgeAAP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/edgeaa/edgeAAP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/edgeaa/edgeAAV.hlsl b/Templates/BaseGame/game/core/shaders/postFX/edgeaa/edgeAAV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/edgeaa/edgeAAV.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/edgeaa/edgeAAV.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/edgeaa/edgeDetectP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/edgeaa/edgeDetectP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/edgeaa/edgeDetectP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/edgeaa/edgeDetectP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/edgeaa/gl/dbgEdgeDisplayP.glsl b/Templates/BaseGame/game/core/shaders/postFX/edgeaa/gl/dbgEdgeDisplayP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/edgeaa/gl/dbgEdgeDisplayP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/edgeaa/gl/dbgEdgeDisplayP.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/edgeaa/gl/edgeAAP.glsl b/Templates/BaseGame/game/core/shaders/postFX/edgeaa/gl/edgeAAP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/edgeaa/gl/edgeAAP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/edgeaa/gl/edgeAAP.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/edgeaa/gl/edgeAAV.glsl b/Templates/BaseGame/game/core/shaders/postFX/edgeaa/gl/edgeAAV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/edgeaa/gl/edgeAAV.glsl rename to Templates/BaseGame/game/core/shaders/postFX/edgeaa/gl/edgeAAV.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/edgeaa/gl/edgeDetectP.glsl b/Templates/BaseGame/game/core/shaders/postFX/edgeaa/gl/edgeDetectP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/edgeaa/gl/edgeDetectP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/edgeaa/gl/edgeDetectP.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/flashP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/flashP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/flashP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/flashP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/fogP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/fogP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/fogP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/fogP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/fxaa/Fxaa3_11.h b/Templates/BaseGame/game/core/shaders/postFX/fxaa/Fxaa3_11.h similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/fxaa/Fxaa3_11.h rename to Templates/BaseGame/game/core/shaders/postFX/fxaa/Fxaa3_11.h diff --git a/Templates/Empty/game/shaders/common/postFx/fxaa/fxaaP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/fxaa/fxaaP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/fxaa/fxaaP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/fxaa/fxaaP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/fxaa/fxaaV.hlsl b/Templates/BaseGame/game/core/shaders/postFX/fxaa/fxaaV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/fxaa/fxaaV.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/fxaa/fxaaV.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/fxaa/gl/fxaaP.glsl b/Templates/BaseGame/game/core/shaders/postFX/fxaa/gl/fxaaP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/fxaa/gl/fxaaP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/fxaa/gl/fxaaP.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/fxaa/gl/fxaaV.glsl b/Templates/BaseGame/game/core/shaders/postFX/fxaa/gl/fxaaV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/fxaa/gl/fxaaV.glsl rename to Templates/BaseGame/game/core/shaders/postFX/fxaa/gl/fxaaV.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/gammaP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/gammaP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/gammaP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/gammaP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/gl/VolFogGlowP.glsl b/Templates/BaseGame/game/core/shaders/postFX/gl/VolFogGlowP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/gl/VolFogGlowP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/gl/VolFogGlowP.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/gl/chromaticLens.glsl b/Templates/BaseGame/game/core/shaders/postFX/gl/chromaticLens.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/gl/chromaticLens.glsl rename to Templates/BaseGame/game/core/shaders/postFX/gl/chromaticLens.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/gl/flashP.glsl b/Templates/BaseGame/game/core/shaders/postFX/gl/flashP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/gl/flashP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/gl/flashP.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/gl/fogP.glsl b/Templates/BaseGame/game/core/shaders/postFX/gl/fogP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/gl/fogP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/gl/fogP.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/gl/gammaP.glsl b/Templates/BaseGame/game/core/shaders/postFX/gl/gammaP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/gl/gammaP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/gl/gammaP.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/gl/glowBlurP.glsl b/Templates/BaseGame/game/core/shaders/postFX/gl/glowBlurP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/gl/glowBlurP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/gl/glowBlurP.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/gl/glowBlurV.glsl b/Templates/BaseGame/game/core/shaders/postFX/gl/glowBlurV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/gl/glowBlurV.glsl rename to Templates/BaseGame/game/core/shaders/postFX/gl/glowBlurV.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/gl/motionBlurP.glsl b/Templates/BaseGame/game/core/shaders/postFX/gl/motionBlurP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/gl/motionBlurP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/gl/motionBlurP.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/gl/passthruP.glsl b/Templates/BaseGame/game/core/shaders/postFX/gl/passthruP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/gl/passthruP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/gl/passthruP.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/gl/postFX.glsl b/Templates/BaseGame/game/core/shaders/postFX/gl/postFX.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/gl/postFX.glsl rename to Templates/BaseGame/game/core/shaders/postFX/gl/postFX.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/gl/postFxV.glsl b/Templates/BaseGame/game/core/shaders/postFX/gl/postFxV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/gl/postFxV.glsl rename to Templates/BaseGame/game/core/shaders/postFX/gl/postFxV.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/gl/turbulenceP.glsl b/Templates/BaseGame/game/core/shaders/postFX/gl/turbulenceP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/gl/turbulenceP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/gl/turbulenceP.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/gl/underwaterFogP.glsl b/Templates/BaseGame/game/core/shaders/postFX/gl/underwaterFogP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/gl/underwaterFogP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/gl/underwaterFogP.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/glowBlurP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/glowBlurP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/glowBlurP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/glowBlurP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/glowBlurV.hlsl b/Templates/BaseGame/game/core/shaders/postFX/glowBlurV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/glowBlurV.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/glowBlurV.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/hdr/bloomGaussBlurHP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/hdr/bloomGaussBlurHP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/hdr/bloomGaussBlurHP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/hdr/bloomGaussBlurHP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/hdr/bloomGaussBlurVP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/hdr/bloomGaussBlurVP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/hdr/bloomGaussBlurVP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/hdr/bloomGaussBlurVP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/hdr/brightPassFilterP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/hdr/brightPassFilterP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/hdr/brightPassFilterP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/hdr/brightPassFilterP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/hdr/calculateAdaptedLumP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/hdr/calculateAdaptedLumP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/hdr/calculateAdaptedLumP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/hdr/calculateAdaptedLumP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/hdr/downScale4x4P.hlsl b/Templates/BaseGame/game/core/shaders/postFX/hdr/downScale4x4P.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/hdr/downScale4x4P.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/hdr/downScale4x4P.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/hdr/downScale4x4V.hlsl b/Templates/BaseGame/game/core/shaders/postFX/hdr/downScale4x4V.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/hdr/downScale4x4V.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/hdr/downScale4x4V.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/hdr/finalPassCombineP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/hdr/finalPassCombineP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/hdr/finalPassCombineP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/hdr/finalPassCombineP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/hdr/gl/bloomGaussBlurHP.glsl b/Templates/BaseGame/game/core/shaders/postFX/hdr/gl/bloomGaussBlurHP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/hdr/gl/bloomGaussBlurHP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/hdr/gl/bloomGaussBlurHP.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/hdr/gl/bloomGaussBlurVP.glsl b/Templates/BaseGame/game/core/shaders/postFX/hdr/gl/bloomGaussBlurVP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/hdr/gl/bloomGaussBlurVP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/hdr/gl/bloomGaussBlurVP.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/hdr/gl/brightPassFilterP.glsl b/Templates/BaseGame/game/core/shaders/postFX/hdr/gl/brightPassFilterP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/hdr/gl/brightPassFilterP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/hdr/gl/brightPassFilterP.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/hdr/gl/calculateAdaptedLumP.glsl b/Templates/BaseGame/game/core/shaders/postFX/hdr/gl/calculateAdaptedLumP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/hdr/gl/calculateAdaptedLumP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/hdr/gl/calculateAdaptedLumP.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/hdr/gl/downScale4x4P.glsl b/Templates/BaseGame/game/core/shaders/postFX/hdr/gl/downScale4x4P.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/hdr/gl/downScale4x4P.glsl rename to Templates/BaseGame/game/core/shaders/postFX/hdr/gl/downScale4x4P.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/hdr/gl/downScale4x4V.glsl b/Templates/BaseGame/game/core/shaders/postFX/hdr/gl/downScale4x4V.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/hdr/gl/downScale4x4V.glsl rename to Templates/BaseGame/game/core/shaders/postFX/hdr/gl/downScale4x4V.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/hdr/gl/finalPassCombineP.glsl b/Templates/BaseGame/game/core/shaders/postFX/hdr/gl/finalPassCombineP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/hdr/gl/finalPassCombineP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/hdr/gl/finalPassCombineP.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/hdr/gl/luminanceVisP.glsl b/Templates/BaseGame/game/core/shaders/postFX/hdr/gl/luminanceVisP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/hdr/gl/luminanceVisP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/hdr/gl/luminanceVisP.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/hdr/gl/sampleLumInitialP.glsl b/Templates/BaseGame/game/core/shaders/postFX/hdr/gl/sampleLumInitialP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/hdr/gl/sampleLumInitialP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/hdr/gl/sampleLumInitialP.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/hdr/gl/sampleLumIterativeP.glsl b/Templates/BaseGame/game/core/shaders/postFX/hdr/gl/sampleLumIterativeP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/hdr/gl/sampleLumIterativeP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/hdr/gl/sampleLumIterativeP.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/hdr/luminanceVisP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/hdr/luminanceVisP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/hdr/luminanceVisP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/hdr/luminanceVisP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/hdr/sampleLumInitialP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/hdr/sampleLumInitialP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/hdr/sampleLumInitialP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/hdr/sampleLumInitialP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/hdr/sampleLumIterativeP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/hdr/sampleLumIterativeP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/hdr/sampleLumIterativeP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/hdr/sampleLumIterativeP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/lightRay/gl/lightRayOccludeP.glsl b/Templates/BaseGame/game/core/shaders/postFX/lightRay/gl/lightRayOccludeP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/lightRay/gl/lightRayOccludeP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/lightRay/gl/lightRayOccludeP.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/lightRay/gl/lightRayP.glsl b/Templates/BaseGame/game/core/shaders/postFX/lightRay/gl/lightRayP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/lightRay/gl/lightRayP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/lightRay/gl/lightRayP.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/lightRay/lightRayOccludeP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/lightRay/lightRayOccludeP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/lightRay/lightRayOccludeP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/lightRay/lightRayOccludeP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/lightRay/lightRayP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/lightRay/lightRayP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/lightRay/lightRayP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/lightRay/lightRayP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/mlaa/blendWeightCalculationP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/mlaa/blendWeightCalculationP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/mlaa/blendWeightCalculationP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/mlaa/blendWeightCalculationP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/mlaa/edgeDetectionP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/mlaa/edgeDetectionP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/mlaa/edgeDetectionP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/mlaa/edgeDetectionP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/mlaa/functions.hlsl b/Templates/BaseGame/game/core/shaders/postFX/mlaa/functions.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/mlaa/functions.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/mlaa/functions.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/mlaa/gl/blendWeightCalculationP.glsl b/Templates/BaseGame/game/core/shaders/postFX/mlaa/gl/blendWeightCalculationP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/mlaa/gl/blendWeightCalculationP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/mlaa/gl/blendWeightCalculationP.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/mlaa/gl/edgeDetectionP.glsl b/Templates/BaseGame/game/core/shaders/postFX/mlaa/gl/edgeDetectionP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/mlaa/gl/edgeDetectionP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/mlaa/gl/edgeDetectionP.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/mlaa/gl/functions.glsl b/Templates/BaseGame/game/core/shaders/postFX/mlaa/gl/functions.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/mlaa/gl/functions.glsl rename to Templates/BaseGame/game/core/shaders/postFX/mlaa/gl/functions.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/mlaa/gl/neighborhoodBlendingP.glsl b/Templates/BaseGame/game/core/shaders/postFX/mlaa/gl/neighborhoodBlendingP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/mlaa/gl/neighborhoodBlendingP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/mlaa/gl/neighborhoodBlendingP.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/mlaa/gl/offsetV.glsl b/Templates/BaseGame/game/core/shaders/postFX/mlaa/gl/offsetV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/mlaa/gl/offsetV.glsl rename to Templates/BaseGame/game/core/shaders/postFX/mlaa/gl/offsetV.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/mlaa/gl/passthruV.glsl b/Templates/BaseGame/game/core/shaders/postFX/mlaa/gl/passthruV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/mlaa/gl/passthruV.glsl rename to Templates/BaseGame/game/core/shaders/postFX/mlaa/gl/passthruV.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/mlaa/neighborhoodBlendingP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/mlaa/neighborhoodBlendingP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/mlaa/neighborhoodBlendingP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/mlaa/neighborhoodBlendingP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/mlaa/offsetV.hlsl b/Templates/BaseGame/game/core/shaders/postFX/mlaa/offsetV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/mlaa/offsetV.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/mlaa/offsetV.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/mlaa/passthruV.hlsl b/Templates/BaseGame/game/core/shaders/postFX/mlaa/passthruV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/mlaa/passthruV.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/mlaa/passthruV.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/motionBlurP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/motionBlurP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/motionBlurP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/motionBlurP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/oculusvr/barrelDistortionChromaP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/oculusvr/barrelDistortionChromaP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/oculusvr/barrelDistortionChromaP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/oculusvr/barrelDistortionChromaP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/oculusvr/barrelDistortionP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/oculusvr/barrelDistortionP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/oculusvr/barrelDistortionP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/oculusvr/barrelDistortionP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/oculusvr/gl/barrelDistortionChromaP.glsl b/Templates/BaseGame/game/core/shaders/postFX/oculusvr/gl/barrelDistortionChromaP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/oculusvr/gl/barrelDistortionChromaP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/oculusvr/gl/barrelDistortionChromaP.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/oculusvr/gl/barrelDistortionP.glsl b/Templates/BaseGame/game/core/shaders/postFX/oculusvr/gl/barrelDistortionP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/oculusvr/gl/barrelDistortionP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/oculusvr/gl/barrelDistortionP.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/oculusvr/gl/monoToStereoP.glsl b/Templates/BaseGame/game/core/shaders/postFX/oculusvr/gl/monoToStereoP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/oculusvr/gl/monoToStereoP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/oculusvr/gl/monoToStereoP.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/oculusvr/monoToStereoP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/oculusvr/monoToStereoP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/oculusvr/monoToStereoP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/oculusvr/monoToStereoP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/passthruP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/passthruP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/passthruP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/passthruP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/postFx.hlsl b/Templates/BaseGame/game/core/shaders/postFX/postFx.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/postFx.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/postFx.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/postFxV.glsl b/Templates/BaseGame/game/core/shaders/postFX/postFxV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/postFxV.glsl rename to Templates/BaseGame/game/core/shaders/postFX/postFxV.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/postFxV.hlsl b/Templates/BaseGame/game/core/shaders/postFX/postFxV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/postFxV.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/postFxV.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/ssao/SSAO_Blur_P.hlsl b/Templates/BaseGame/game/core/shaders/postFX/ssao/SSAO_Blur_P.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/ssao/SSAO_Blur_P.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/ssao/SSAO_Blur_P.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/ssao/SSAO_Blur_V.hlsl b/Templates/BaseGame/game/core/shaders/postFX/ssao/SSAO_Blur_V.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/ssao/SSAO_Blur_V.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/ssao/SSAO_Blur_V.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/ssao/SSAO_P.hlsl b/Templates/BaseGame/game/core/shaders/postFX/ssao/SSAO_P.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/ssao/SSAO_P.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/ssao/SSAO_P.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/ssao/SSAO_PowerTable_P.hlsl b/Templates/BaseGame/game/core/shaders/postFX/ssao/SSAO_PowerTable_P.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/ssao/SSAO_PowerTable_P.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/ssao/SSAO_PowerTable_P.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/ssao/SSAO_PowerTable_V.hlsl b/Templates/BaseGame/game/core/shaders/postFX/ssao/SSAO_PowerTable_V.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/ssao/SSAO_PowerTable_V.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/ssao/SSAO_PowerTable_V.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/ssao/gl/SSAO_Blur_P.glsl b/Templates/BaseGame/game/core/shaders/postFX/ssao/gl/SSAO_Blur_P.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/ssao/gl/SSAO_Blur_P.glsl rename to Templates/BaseGame/game/core/shaders/postFX/ssao/gl/SSAO_Blur_P.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/ssao/gl/SSAO_Blur_V.glsl b/Templates/BaseGame/game/core/shaders/postFX/ssao/gl/SSAO_Blur_V.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/ssao/gl/SSAO_Blur_V.glsl rename to Templates/BaseGame/game/core/shaders/postFX/ssao/gl/SSAO_Blur_V.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/ssao/gl/SSAO_P.glsl b/Templates/BaseGame/game/core/shaders/postFX/ssao/gl/SSAO_P.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/ssao/gl/SSAO_P.glsl rename to Templates/BaseGame/game/core/shaders/postFX/ssao/gl/SSAO_P.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/ssao/gl/SSAO_PowerTable_P.glsl b/Templates/BaseGame/game/core/shaders/postFX/ssao/gl/SSAO_PowerTable_P.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/ssao/gl/SSAO_PowerTable_P.glsl rename to Templates/BaseGame/game/core/shaders/postFX/ssao/gl/SSAO_PowerTable_P.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/ssao/gl/SSAO_PowerTable_V.glsl b/Templates/BaseGame/game/core/shaders/postFX/ssao/gl/SSAO_PowerTable_V.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/ssao/gl/SSAO_PowerTable_V.glsl rename to Templates/BaseGame/game/core/shaders/postFX/ssao/gl/SSAO_PowerTable_V.glsl diff --git a/Templates/Empty/game/shaders/common/postFx/turbulenceP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/turbulenceP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/turbulenceP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/turbulenceP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/underwaterFogP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/underwaterFogP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/underwaterFogP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/underwaterFogP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/vignette/VignetteP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/vignette/VignetteP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/vignette/VignetteP.hlsl rename to Templates/BaseGame/game/core/shaders/postFX/vignette/VignetteP.hlsl diff --git a/Templates/Empty/game/shaders/common/postFx/vignette/gl/VignetteP.glsl b/Templates/BaseGame/game/core/shaders/postFX/vignette/gl/VignetteP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/postFx/vignette/gl/VignetteP.glsl rename to Templates/BaseGame/game/core/shaders/postFX/vignette/gl/VignetteP.glsl diff --git a/Templates/Empty/game/shaders/common/precipP.hlsl b/Templates/BaseGame/game/core/shaders/precipP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/precipP.hlsl rename to Templates/BaseGame/game/core/shaders/precipP.hlsl diff --git a/Templates/Empty/game/shaders/common/precipV.hlsl b/Templates/BaseGame/game/core/shaders/precipV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/precipV.hlsl rename to Templates/BaseGame/game/core/shaders/precipV.hlsl diff --git a/Templates/Empty/game/shaders/common/projectedShadowP.hlsl b/Templates/BaseGame/game/core/shaders/projectedShadowP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/projectedShadowP.hlsl rename to Templates/BaseGame/game/core/shaders/projectedShadowP.hlsl diff --git a/Templates/Empty/game/shaders/common/projectedShadowV.hlsl b/Templates/BaseGame/game/core/shaders/projectedShadowV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/projectedShadowV.hlsl rename to Templates/BaseGame/game/core/shaders/projectedShadowV.hlsl diff --git a/Templates/Empty/game/shaders/common/ribbons/basicRibbonShaderP.hlsl b/Templates/BaseGame/game/core/shaders/ribbons/basicRibbonShaderP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/ribbons/basicRibbonShaderP.hlsl rename to Templates/BaseGame/game/core/shaders/ribbons/basicRibbonShaderP.hlsl diff --git a/Templates/Empty/game/shaders/common/ribbons/basicRibbonShaderV.hlsl b/Templates/BaseGame/game/core/shaders/ribbons/basicRibbonShaderV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/ribbons/basicRibbonShaderV.hlsl rename to Templates/BaseGame/game/core/shaders/ribbons/basicRibbonShaderV.hlsl diff --git a/Templates/Empty/game/shaders/common/ribbons/gl/basicRibbonShaderP.glsl b/Templates/BaseGame/game/core/shaders/ribbons/gl/basicRibbonShaderP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/ribbons/gl/basicRibbonShaderP.glsl rename to Templates/BaseGame/game/core/shaders/ribbons/gl/basicRibbonShaderP.glsl diff --git a/Templates/Empty/game/shaders/common/ribbons/gl/basicRibbonShaderV.glsl b/Templates/BaseGame/game/core/shaders/ribbons/gl/basicRibbonShaderV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/ribbons/gl/basicRibbonShaderV.glsl rename to Templates/BaseGame/game/core/shaders/ribbons/gl/basicRibbonShaderV.glsl diff --git a/Templates/Empty/game/shaders/common/ribbons/gl/texRibbonShaderP.glsl b/Templates/BaseGame/game/core/shaders/ribbons/gl/texRibbonShaderP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/ribbons/gl/texRibbonShaderP.glsl rename to Templates/BaseGame/game/core/shaders/ribbons/gl/texRibbonShaderP.glsl diff --git a/Templates/Empty/game/shaders/common/ribbons/gl/texRibbonShaderV.glsl b/Templates/BaseGame/game/core/shaders/ribbons/gl/texRibbonShaderV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/ribbons/gl/texRibbonShaderV.glsl rename to Templates/BaseGame/game/core/shaders/ribbons/gl/texRibbonShaderV.glsl diff --git a/Templates/Empty/game/shaders/common/ribbons/texRibbonShaderP.hlsl b/Templates/BaseGame/game/core/shaders/ribbons/texRibbonShaderP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/ribbons/texRibbonShaderP.hlsl rename to Templates/BaseGame/game/core/shaders/ribbons/texRibbonShaderP.hlsl diff --git a/Templates/Empty/game/shaders/common/ribbons/texRibbonShaderV.hlsl b/Templates/BaseGame/game/core/shaders/ribbons/texRibbonShaderV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/ribbons/texRibbonShaderV.hlsl rename to Templates/BaseGame/game/core/shaders/ribbons/texRibbonShaderV.hlsl diff --git a/Templates/Empty/game/shaders/common/scatterSkyP.hlsl b/Templates/BaseGame/game/core/shaders/scatterSkyP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/scatterSkyP.hlsl rename to Templates/BaseGame/game/core/shaders/scatterSkyP.hlsl diff --git a/Templates/Empty/game/shaders/common/scatterSkyV.hlsl b/Templates/BaseGame/game/core/shaders/scatterSkyV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/scatterSkyV.hlsl rename to Templates/BaseGame/game/core/shaders/scatterSkyV.hlsl diff --git a/Templates/Empty/game/shaders/common/shaderModel.hlsl b/Templates/BaseGame/game/core/shaders/shaderModel.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/shaderModel.hlsl rename to Templates/BaseGame/game/core/shaders/shaderModel.hlsl diff --git a/Templates/Empty/game/shaders/common/shaderModelAutoGen.hlsl b/Templates/BaseGame/game/core/shaders/shaderModelAutoGen.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/shaderModelAutoGen.hlsl rename to Templates/BaseGame/game/core/shaders/shaderModelAutoGen.hlsl diff --git a/Templates/Empty/game/shaders/common/shdrConsts.h b/Templates/BaseGame/game/core/shaders/shdrConsts.h similarity index 100% rename from Templates/Empty/game/shaders/common/shdrConsts.h rename to Templates/BaseGame/game/core/shaders/shdrConsts.h diff --git a/Templates/Empty/game/shaders/common/terrain/blendP.hlsl b/Templates/BaseGame/game/core/shaders/terrain/blendP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/terrain/blendP.hlsl rename to Templates/BaseGame/game/core/shaders/terrain/blendP.hlsl diff --git a/Templates/Empty/game/shaders/common/terrain/blendV.hlsl b/Templates/BaseGame/game/core/shaders/terrain/blendV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/terrain/blendV.hlsl rename to Templates/BaseGame/game/core/shaders/terrain/blendV.hlsl diff --git a/Templates/Empty/game/shaders/common/terrain/gl/blendP.glsl b/Templates/BaseGame/game/core/shaders/terrain/gl/blendP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/terrain/gl/blendP.glsl rename to Templates/BaseGame/game/core/shaders/terrain/gl/blendP.glsl diff --git a/Templates/Empty/game/shaders/common/terrain/gl/blendV.glsl b/Templates/BaseGame/game/core/shaders/terrain/gl/blendV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/terrain/gl/blendV.glsl rename to Templates/BaseGame/game/core/shaders/terrain/gl/blendV.glsl diff --git a/Templates/Empty/game/shaders/common/terrain/terrain.glsl b/Templates/BaseGame/game/core/shaders/terrain/terrain.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/terrain/terrain.glsl rename to Templates/BaseGame/game/core/shaders/terrain/terrain.glsl diff --git a/Templates/Empty/game/shaders/common/terrain/terrain.hlsl b/Templates/BaseGame/game/core/shaders/terrain/terrain.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/terrain/terrain.hlsl rename to Templates/BaseGame/game/core/shaders/terrain/terrain.hlsl diff --git a/Templates/Empty/game/shaders/common/torque.hlsl b/Templates/BaseGame/game/core/shaders/torque.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/torque.hlsl rename to Templates/BaseGame/game/core/shaders/torque.hlsl diff --git a/Templates/Empty/game/shaders/common/water/gl/waterBasicP.glsl b/Templates/BaseGame/game/core/shaders/water/gl/waterBasicP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/water/gl/waterBasicP.glsl rename to Templates/BaseGame/game/core/shaders/water/gl/waterBasicP.glsl diff --git a/Templates/Empty/game/shaders/common/water/gl/waterBasicV.glsl b/Templates/BaseGame/game/core/shaders/water/gl/waterBasicV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/water/gl/waterBasicV.glsl rename to Templates/BaseGame/game/core/shaders/water/gl/waterBasicV.glsl diff --git a/Templates/Empty/game/shaders/common/water/gl/waterP.glsl b/Templates/BaseGame/game/core/shaders/water/gl/waterP.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/water/gl/waterP.glsl rename to Templates/BaseGame/game/core/shaders/water/gl/waterP.glsl diff --git a/Templates/Empty/game/shaders/common/water/gl/waterV.glsl b/Templates/BaseGame/game/core/shaders/water/gl/waterV.glsl similarity index 100% rename from Templates/Empty/game/shaders/common/water/gl/waterV.glsl rename to Templates/BaseGame/game/core/shaders/water/gl/waterV.glsl diff --git a/Templates/Empty/game/shaders/common/water/waterBasicP.hlsl b/Templates/BaseGame/game/core/shaders/water/waterBasicP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/water/waterBasicP.hlsl rename to Templates/BaseGame/game/core/shaders/water/waterBasicP.hlsl diff --git a/Templates/Empty/game/shaders/common/water/waterBasicV.hlsl b/Templates/BaseGame/game/core/shaders/water/waterBasicV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/water/waterBasicV.hlsl rename to Templates/BaseGame/game/core/shaders/water/waterBasicV.hlsl diff --git a/Templates/Empty/game/shaders/common/water/waterP.hlsl b/Templates/BaseGame/game/core/shaders/water/waterP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/water/waterP.hlsl rename to Templates/BaseGame/game/core/shaders/water/waterP.hlsl diff --git a/Templates/Empty/game/shaders/common/water/waterV.hlsl b/Templates/BaseGame/game/core/shaders/water/waterV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/water/waterV.hlsl rename to Templates/BaseGame/game/core/shaders/water/waterV.hlsl diff --git a/Templates/Empty/game/shaders/common/wavesP.hlsl b/Templates/BaseGame/game/core/shaders/wavesP.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/wavesP.hlsl rename to Templates/BaseGame/game/core/shaders/wavesP.hlsl diff --git a/Templates/Empty/game/shaders/common/wavesV.hlsl b/Templates/BaseGame/game/core/shaders/wavesV.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/wavesV.hlsl rename to Templates/BaseGame/game/core/shaders/wavesV.hlsl diff --git a/Templates/Empty/game/shaders/common/wind.hlsl b/Templates/BaseGame/game/core/shaders/wind.hlsl similarity index 100% rename from Templates/Empty/game/shaders/common/wind.hlsl rename to Templates/BaseGame/game/core/shaders/wind.hlsl diff --git a/Templates/BaseGame/game/data/clientServer/ClientServer.cs b/Templates/BaseGame/game/data/clientServer/ClientServer.cs new file mode 100644 index 000000000..3cf7aaa55 --- /dev/null +++ b/Templates/BaseGame/game/data/clientServer/ClientServer.cs @@ -0,0 +1,112 @@ + +// The general flow of a gane - server's creation, loading and hosting clients, and then destruction is as follows: + +// First, a client will always create a server in the event that they want to host a single player +// game. Torque3D treats even single player connections as a soft multiplayer game, with some stuff +// in the networking short-circuited to sidestep around lag and packet transmission times. + +// initServer() is called, loading the default server scripts. +// After that, if this is a dedicated server session, initDedicated() is called, otherwise initClient is called +// to prep a playable client session. + +// When a local game is started - a listen server - via calling StartGame() a server is created and then the client is +// connected to it via createAndConnectToLocalServer(). + +function ClientServer::create( %this ) +{ + echo("\n--------- Initializing Directory: scripts ---------"); + exec( "./scripts/client/client.cs" ); + exec( "./scripts/server/server.cs" ); + + $Game::MissionGroup = "MissionGroup"; + + initServer(); + + %dbList = new ArrayObject(DatablockFilesList); + + // Start up in either client, or dedicated server mode + if ($Server::Dedicated) + { + initDedicated(); + } + else + { + initClient(); + } +} + +function ClientServer::destroy( %this ) +{ + // Ensure that we are disconnected and/or the server is destroyed. + // This prevents crashes due to the SceneGraph being deleted before + // the objects it contains. + if ($Server::Dedicated) + destroyServer(); + else + disconnect(); + + // Destroy the physics plugin. + physicsDestroy(); + + sfxShutdown(); + + echo("Exporting client prefs"); + %prefPath = getPrefpath(); + export("$pref::*", %prefPath @ "/clientPrefs.cs", false); + + echo("Exporting server prefs"); + export("$Pref::Server::*", %prefPath @ "/serverPrefs.cs", false); + BanList::Export(%prefPath @ "/banlist.cs"); +} + +//----------------------------------------------------------------------------- +function StartGame( %mission, %hostingType ) +{ + if( %mission $= "" ) + { + %id = CL_levelList.getSelectedId(); + %mission = getField(CL_levelList.getRowTextById(%id), 1); + //error("Cannot start a level with no level selected!"); + } + + if (%hostingType !$= "") + { + %serverType = %hostingType; + } + else + { + if ($pref::HostMultiPlayer) + %serverType = "MultiPlayer"; + else + %serverType = "SinglePlayer"; + } + + // Show the loading screen immediately. + if ( isObject( LoadingGui ) ) + { + Canvas.setContent("LoadingGui"); + LoadingProgress.setValue(1); + LoadingProgressTxt.setValue("LOADING MISSION FILE"); + Canvas.repaint(); + } + + createAndConnectToLocalServer( %serverType, %mission ); +} + +function JoinGame( %serverIndex ) +{ + // The server info index is stored in the row along with the + // rest of displayed info. + if( setServerInfo( %serverIndex ) ) + { + Canvas.setContent("LoadingGui"); + LoadingProgress.setValue(1); + LoadingProgressTxt.setValue("WAITING FOR SERVER"); + Canvas.repaint(); + + %conn = new GameConnection(ServerConnection); + %conn.setConnectArgs($pref::Player::Name); + %conn.setJoinPassword($Client::Password); + %conn.connect($ServerInfo::Address); + } +} \ No newline at end of file diff --git a/Templates/BaseGame/game/data/clientServer/ClientServer.module b/Templates/BaseGame/game/data/clientServer/ClientServer.module new file mode 100644 index 000000000..05c70a90d --- /dev/null +++ b/Templates/BaseGame/game/data/clientServer/ClientServer.module @@ -0,0 +1,9 @@ + + \ No newline at end of file diff --git a/Templates/BaseGame/game/data/clientServer/scripts/client/client.cs b/Templates/BaseGame/game/data/clientServer/scripts/client/client.cs new file mode 100644 index 000000000..0b18d81aa --- /dev/null +++ b/Templates/BaseGame/game/data/clientServer/scripts/client/client.cs @@ -0,0 +1,29 @@ +function initClient() +{ + echo("\n--------- Initializing " @ $appName @ ": Client Scripts ---------"); + + // Make sure this variable reflects the correct state. + $Server::Dedicated = false; + + // Game information used to query the master server + $Client::GameTypeQuery = $appName; + $Client::MissionTypeQuery = "Any"; + + exec( "data/clientServer/scripts/client/message.cs" ); + exec( "data/clientServer/scripts/client/connectionToServer.cs" ); + exec( "data/clientServer/scripts/client/levelDownload.cs" ); + exec( "data/clientServer/scripts/client/levelLoad.cs" ); + + //load prefs + %prefPath = getPrefpath(); + if ( isFile( %prefPath @ "/clientPrefs.cs" ) ) + exec( %prefPath @ "/clientPrefs.cs" ); + else + exec( "data/defaults.cs" ); + + loadMaterials(); + + // Copy saved script prefs into C++ code. + setDefaultFov( $pref::Player::defaultFov ); + setZoomSpeed( $pref::Player::zoomSpeed ); +} \ No newline at end of file diff --git a/Templates/Empty/game/scripts/client/serverConnection.cs b/Templates/BaseGame/game/data/clientServer/scripts/client/connectionToServer.cs similarity index 97% rename from Templates/Empty/game/scripts/client/serverConnection.cs rename to Templates/BaseGame/game/data/clientServer/scripts/client/connectionToServer.cs index 8bac91813..693c7fff7 100644 --- a/Templates/Empty/game/scripts/client/serverConnection.cs +++ b/Templates/BaseGame/game/data/clientServer/scripts/client/connectionToServer.cs @@ -22,26 +22,16 @@ // Functions dealing with connecting to a server - -//----------------------------------------------------------------------------- -// Server connection error -//----------------------------------------------------------------------------- - -addMessageCallback( 'MsgConnectionError', handleConnectionErrorMessage ); - -function handleConnectionErrorMessage(%msgType, %msgString, %msgError) -{ - // On connect the server transmits a message to display if there - // are any problems with the connection. Most connection errors - // are game version differences, so hopefully the server message - // will tell us where to get the latest version of the game. - $ServerConnectionErrorMessage = %msgError; -} - - //---------------------------------------------------------------------------- // GameConnection client callbacks //---------------------------------------------------------------------------- +// Called on the new connection object after connect() succeeds. +function GameConnection::onConnectionAccepted(%this) +{ + // Startup the physX world on the client before any + // datablocks and objects are ghosted over. + physicsInitWorld( "client" ); +} function GameConnection::initialControlSet(%this) { @@ -51,7 +41,7 @@ function GameConnection::initialControlSet(%this) // and we are now ready to go. // first check if the editor is active - if (!isToolBuild() || !Editor::checkActiveLoadDone()) + if (!isToolBuild() || !isMethod("Editor", "checkActiveLoadDone") || !Editor::checkActiveLoadDone()) { if (Canvas.getContent() != PlayGui.getId()) Canvas.setContent(PlayGui); @@ -68,14 +58,6 @@ function GameConnection::onControlObjectChange(%this) turnOffZoom(); } -// Called on the new connection object after connect() succeeds. -function GameConnection::onConnectionAccepted(%this) -{ - // Startup the physX world on the client before any - // datablocks and objects are ghosted over. - physicsInitWorld( "client" ); -} - function GameConnection::onConnectionError(%this, %msg) { // General connection error, usually raised by ghosted objects @@ -85,6 +67,20 @@ function GameConnection::onConnectionError(%this, %msg) MessageBoxOK( "DISCONNECT", $ServerConnectionErrorMessage @ " (" @ %msg @ ")" ); } +//----------------------------------------------------------------------------- +// Server connection error +//----------------------------------------------------------------------------- +addMessageCallback( 'MsgConnectionError', handleConnectionErrorMessage ); + +function handleConnectionErrorMessage(%msgType, %msgString, %msgError) +{ + // On connect the server transmits a message to display if there + // are any problems with the connection. Most connection errors + // are game version differences, so hopefully the server message + // will tell us where to get the latest version of the game. + $ServerConnectionErrorMessage = %msgError; +} + //----------------------------------------------------------------------------- // Disconnect //----------------------------------------------------------------------------- diff --git a/Templates/Empty/game/core/scripts/client/missionDownload.cs b/Templates/BaseGame/game/data/clientServer/scripts/client/levelDownload.cs similarity index 64% rename from Templates/Empty/game/core/scripts/client/missionDownload.cs rename to Templates/BaseGame/game/data/clientServer/scripts/client/levelDownload.cs index 78abee79f..dd70e31ea 100644 --- a/Templates/Empty/game/core/scripts/client/missionDownload.cs +++ b/Templates/BaseGame/game/data/clientServer/scripts/client/levelDownload.cs @@ -20,45 +20,64 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -//---------------------------------------------------------------------------- +//----------------------------------------------------------------------------- // Mission Loading -// Server download handshaking. This produces a number of onPhaseX -// calls so the game scripts can update the game's GUI. -// +// The client portion of the client/server mission loading process +//----------------------------------------------------------------------------- +//-------------------------------------------------------------------------- // Loading Phases: -// Phase 1: Download Datablocks -// Phase 2: Download Ghost Objects -// Phase 3: Scene Lighting -//---------------------------------------------------------------------------- +// Phase 1: Transmit Datablocks +// Transmit targets +// Phase 2: Transmit Ghost Objects +// Phase 3: Start Game +// +// The server invokes the client MissionStartPhase[1-3] function to request +// permission to start each phase. When a client is ready for a phase, +// it responds with MissionStartPhase[1-3]Ack. //---------------------------------------------------------------------------- // Phase 1 //---------------------------------------------------------------------------- - -function clientCmdMissionStartPhase1(%seq, %missionName, %musicTrack) +function clientCmdMissionStartPhase1(%seq, %missionName) { // These need to come after the cls. echo ("*** New Mission: " @ %missionName); echo ("*** Phase 1: Download Datablocks & Targets"); - onMissionDownloadPhase1(%missionName, %musicTrack); + + //Prep the postFX stuff + // Load the post effect presets for this mission. + %path = filePath( %missionName ) @ "/" @ fileBase( %missionName ) @ $PostFXManager::fileExtension; + + if ( isScriptFile( %path ) ) + { + postFXManager::loadPresetHandler( %path ); + } + else + { + PostFXManager::settingsApplyDefaultPreset(); + } + + onMissionDownloadPhase("LOADING DATABLOCKS"); + commandToServer('MissionStartPhase1Ack', %seq); } function onDataBlockObjectReceived(%index, %total) { - onPhase1Progress(%index / %total); + onMissionDownloadProgress(%index / %total); } //---------------------------------------------------------------------------- // Phase 2 //---------------------------------------------------------------------------- - function clientCmdMissionStartPhase2(%seq,%missionName) { - onPhase1Complete(); + onPhaseComplete(); echo ("*** Phase 2: Download Ghost Objects"); - onMissionDownloadPhase2(%missionName); - commandToServer('MissionStartPhase2Ack', %seq, $pref::Player:PlayerDB); + + onMissionDownloadPhase("LOADING OBJECTS"); + + commandToServer('MissionStartPhase2Ack', %seq); } function onGhostAlwaysStarted(%ghostCount) @@ -70,21 +89,21 @@ function onGhostAlwaysStarted(%ghostCount) function onGhostAlwaysObjectReceived() { $ghostsRecvd++; - onPhase2Progress($ghostsRecvd / $ghostCount); -} + onMissionDownloadProgress($ghostsRecvd / $ghostCount); +} //---------------------------------------------------------------------------- // Phase 3 //---------------------------------------------------------------------------- - function clientCmdMissionStartPhase3(%seq,%missionName) { - onPhase2Complete(); + onPhaseComplete(); StartClientReplication(); StartFoliageReplication(); // Load the static mission decals. - decalManagerLoad( %missionName @ ".decals" ); + if(isFile(%missionName @ ".decals")) + decalManagerLoad( %missionName @ ".decals" ); echo ("*** Phase 3: Mission Lighting"); $MSeq = %seq; @@ -97,14 +116,16 @@ function clientCmdMissionStartPhase3(%seq,%missionName) { echo("Lighting mission...."); schedule(1, 0, "updateLightingProgress"); - onMissionDownloadPhase3(%missionName); + + onMissionDownloadPhase("LIGHTING MISSION"); + $lightingMission = true; } } function updateLightingProgress() { - onPhase3Progress($SceneLighting::lightingProgress); + onMissionDownloadProgress($SceneLighting::lightingProgress); if ($lightingMission) $lightingProgressThread = schedule(1, 0, "updateLightingProgress"); } @@ -112,17 +133,17 @@ function updateLightingProgress() function sceneLightingComplete() { echo("Mission lighting done"); - onPhase3Complete(); + $lightingMission = false; + + onPhaseComplete("STARTING MISSION"); // The is also the end of the mission load cycle. - onMissionDownloadComplete(); commandToServer('MissionStartPhase3Ack', $MSeq); } //---------------------------------------------------------------------------- // Helper functions //---------------------------------------------------------------------------- - function connect(%server) { %conn = new GameConnection(ServerConnection); @@ -131,3 +152,34 @@ function connect(%server) %conn.setJoinPassword($Client::Password); %conn.connect(%server); } + +function onMissionDownloadPhase(%phase) +{ + if ( !isObject( LoadingProgress ) ) + return; + + LoadingProgress.setValue(0); + LoadingProgressTxt.setValue(%phase); + Canvas.repaint(); +} + +function onMissionDownloadProgress(%progress) +{ + if ( !isObject( LoadingProgress ) ) + return; + + LoadingProgress.setValue(%progress); + Canvas.repaint(33); +} + +function onPhaseComplete(%text) +{ + if ( !isObject( LoadingProgress ) ) + return; + + if(%text !$= "") + LoadingProgressTxt.setValue(%text); + + LoadingProgress.setValue( 1 ); + Canvas.repaint(); +} \ No newline at end of file diff --git a/Templates/Empty/game/core/scripts/client/mission.cs b/Templates/BaseGame/game/data/clientServer/scripts/client/levelLoad.cs similarity index 65% rename from Templates/Empty/game/core/scripts/client/mission.cs rename to Templates/BaseGame/game/data/clientServer/scripts/client/levelLoad.cs index 89b5ef2a7..c3fd04280 100644 --- a/Templates/Empty/game/core/scripts/client/mission.cs +++ b/Templates/BaseGame/game/data/clientServer/scripts/client/levelLoad.cs @@ -90,56 +90,3 @@ function clientCmdMissionEnd( %seq ) $Client::missionSeq = -1; } } - -/// Expands the name of a mission into the full -/// mission path and extension. -function expandMissionFileName( %missionFile ) -{ - // Expand any escapes in it. - %missionFile = expandFilename( %missionFile ); - - // If the mission file doesn't exist... try to fix up the string. - if ( !isFile( %missionFile ) ) - { - // Does it need a .mis? - if ( strStr( %missionFile, ".mis" ) == -1 ) - %newMission = %missionFile @ ".mis"; - - if ( !isFile( %newMission ) ) - { - // Attach a path to it. - %newMission = expandFilename( "levels/" @ %newMission ); - if ( !isFile( %newMission ) ) - { - warn( "The mission file '" @ %missionFile @ "' was not found!" ); - return ""; - } - } - - %missionFile = %newMission; - } - - return %missionFile; -} - -/// Load a single player level on the local server. -function loadLevel( %missionNameOrFile ) -{ - // Expand the mission name... this allows you to enter - // just the name and not the full path and extension. - %missionFile = expandMissionFileName( %missionNameOrFile ); - if ( %missionFile $= "" ) - return false; - - // Show the loading screen immediately. - if ( isObject( LoadingGui ) ) - { - Canvas.setContent("LoadingGui"); - LoadingProgress.setValue(1); - LoadingProgressTxt.setValue("LOADING MISSION FILE"); - Canvas.repaint(); - } - - // Prepare and launch the server. - return createAndConnectToLocalServer( "SinglePlayer", %missionFile ); -} diff --git a/Templates/Empty/game/core/scripts/client/message.cs b/Templates/BaseGame/game/data/clientServer/scripts/client/message.cs similarity index 89% rename from Templates/Empty/game/core/scripts/client/message.cs rename to Templates/BaseGame/game/data/clientServer/scripts/client/message.cs index 2dbb3c949..c532d50d9 100644 --- a/Templates/Empty/game/core/scripts/client/message.cs +++ b/Templates/BaseGame/game/data/clientServer/scripts/client/message.cs @@ -24,19 +24,6 @@ //----------------------------------------------------------------------------- // Functions that process commands sent from the server. - -// This function is for chat messages only; it is invoked on the client when -// the server does a commandToClient with the tag ChatMessage. (Cf. the -// functions chatMessage* in core/scripts/server/message.cs.) - -// This just invokes onChatMessage, which the mod code must define. - -function clientCmdChatMessage(%sender, %voice, %pitch, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10) -{ - onChatMessage(detag(%msgString), %voice, %pitch); -} - - // Game event descriptions, which may or may not include text messages, can be // sent using the message* functions in core/scripts/server/message.cs. Those // functions do commandToClient with the tag ServerMessage, which invokes the @@ -79,8 +66,6 @@ function addMessageCallback(%msgType, %func) $MSGCB[%msgType, %i] = %func; } - - // The following is the callback that will be executed for every ServerMessage, // because we're going to install it without a specified type. Any type- // specific callbacks will be executed afterward. diff --git a/Templates/Empty/game/core/scripts/server/audio.cs b/Templates/BaseGame/game/data/clientServer/scripts/server/audio.cs similarity index 100% rename from Templates/Empty/game/core/scripts/server/audio.cs rename to Templates/BaseGame/game/data/clientServer/scripts/server/audio.cs diff --git a/Templates/Empty/game/scripts/server/commands.cs b/Templates/BaseGame/game/data/clientServer/scripts/server/commands.cs similarity index 79% rename from Templates/Empty/game/scripts/server/commands.cs rename to Templates/BaseGame/game/data/clientServer/scripts/server/commands.cs index 2f33de30d..85a08cc47 100644 --- a/Templates/Empty/game/scripts/server/commands.cs +++ b/Templates/BaseGame/game/data/clientServer/scripts/server/commands.cs @@ -22,4 +22,14 @@ //----------------------------------------------------------------------------- // Misc. server commands avialable to clients -//----------------------------------------------------------------------------- \ No newline at end of file +//----------------------------------------------------------------------------- + +//---------------------------------------------------------------------------- +// Debug commands +//---------------------------------------------------------------------------- + +function serverCmdNetSimulateLag( %client, %msDelay, %packetLossPercent ) +{ + if ( %client.isAdmin ) + %client.setSimulatedNetParams( %packetLossPercent / 100.0, %msDelay ); +} \ No newline at end of file diff --git a/Templates/Empty/game/core/scripts/server/clientConnection.cs b/Templates/BaseGame/game/data/clientServer/scripts/server/connectionToClient.cs similarity index 54% rename from Templates/Empty/game/core/scripts/server/clientConnection.cs rename to Templates/BaseGame/game/data/clientServer/scripts/server/connectionToClient.cs index e1c359d71..c3a4a3e26 100644 --- a/Templates/Empty/game/core/scripts/server/clientConnection.cs +++ b/Templates/BaseGame/game/data/clientServer/scripts/server/connectionToClient.cs @@ -37,99 +37,51 @@ function GameConnection::onConnectRequest( %client, %netAddress, %name ) //----------------------------------------------------------------------------- // This script function is the first called on a client accept -// -function GameConnection::onConnect( %client, %name ) +function GameConnection::onConnect( %this, %clientData ) { - // Send down the connection error info, the client is - // responsible for displaying this message if a connection - // error occures. - messageClient(%client,'MsgConnectionError',"",$Pref::Server::ConnectionError); + // Send down the connection error info, the client is responsible for + // displaying this message if a connection error occurs. + messageClient(%this, 'MsgConnectionError', "", $Pref::Server::ConnectionError); + + // Send mission information to the client + sendLoadInfoToClient(%this); + + // Simulated client lag for testing... + // %client.setSimulatedNetParams(0.1, 30); + + // Get the client's unique id: + // %authInfo = %client.getAuthInfo(); + // %client.guid = getField(%authInfo, 3); + %this.guid = 0; + addToServerGuidList(%this.guid); + + // Set admin status + if (%this.getAddress() $= "local") + { + %this.isAdmin = true; + %this.isSuperAdmin = true; + } + else + { + %this.isAdmin = false; + %this.isSuperAdmin = false; + } + + echo("CADD: "@ %this @" "@ %this.getAddress()); - // Send mission information to the client - sendLoadInfoToClient( %client ); - - // Simulated client lag for testing... - // %client.setSimulatedNetParams(0.1, 30); - - // Get the client's unique id: - // %authInfo = %client.getAuthInfo(); - // %client.guid = getField( %authInfo, 3 ); - %client.guid = 0; - addToServerGuidList( %client.guid ); - - // Set admin status - if (%client.getAddress() $= "local") { - %client.isAdmin = true; - %client.isSuperAdmin = true; - } - else { - %client.isAdmin = false; - %client.isSuperAdmin = false; - } - - // Save client preferences on the connection object for later use. - %client.gender = "Male"; - %client.armor = "Light"; - %client.race = "Human"; - %client.skin = addTaggedString( "base" ); - %client.setPlayerName(%name); - %client.team = ""; - %client.score = 0; - - // - echo("CADD: " @ %client @ " " @ %client.getAddress()); - - // Inform the client of all the other clients - %count = ClientGroup.getCount(); - for (%cl = 0; %cl < %count; %cl++) { - %other = ClientGroup.getObject(%cl); - if ((%other != %client)) { - // These should be "silent" versions of these messages... - messageClient(%client, 'MsgClientJoin', "", - %other.playerName, - %other, - %other.sendGuid, - %other.team, - %other.score, - %other.isAIControlled(), - %other.isAdmin, - %other.isSuperAdmin); - } - } - - // Inform the client we've joined up - messageClient(%client, - 'MsgClientJoin', 'Welcome to a Torque application %1.', - %client.playerName, - %client, - %client.sendGuid, - %client.team, - %client.score, - %client.isAiControlled(), - %client.isAdmin, - %client.isSuperAdmin); - - // Inform all the other clients of the new guy - messageAllExcept(%client, -1, 'MsgClientJoin', '\c1%1 joined the game.', - %client.playerName, - %client, - %client.sendGuid, - %client.team, - %client.score, - %client.isAiControlled(), - %client.isAdmin, - %client.isSuperAdmin); - - // If the mission is running, go ahead download it to the client - if ($missionRunning) - { - %client.loadMission(); - } - else if ($Server::LoadFailMsg !$= "") - { - messageClient(%client, 'MsgLoadFailed', $Server::LoadFailMsg); - } - $Server::PlayerCount++; + // If the mission is running, go ahead download it to the client + if ($missionRunning) + { + %this.loadMission(); + } + else if ($Server::LoadFailMsg !$= "") + { + messageClient(%this, 'MsgLoadFailed', $Server::LoadFailMsg); + } + + %this.connectData = %clientData; + + $Server::PlayerCount++; } //----------------------------------------------------------------------------- @@ -180,21 +132,14 @@ function isNameUnique(%name) // function GameConnection::onDrop(%client, %reason) { - %client.onClientLeaveGame(); + if($missionRunning) + theLevelInfo.onClientLeaveGame(); removeFromServerGuidList( %client.guid ); - messageAllExcept(%client, -1, 'MsgClientDrop', '\c1%1 has left the game.', %client.playerName, %client); - removeTaggedString(%client.playerName); - echo("CDROP: " @ %client @ " " @ %client.getAddress()); $Server::PlayerCount--; - - // Reset the server if everyone has left the game - if( $Server::PlayerCount == 0 && $Server::Dedicated) - schedule(0, 0, "resetServerDefaults"); } - //----------------------------------------------------------------------------- function GameConnection::startMission(%this) @@ -214,22 +159,3 @@ function GameConnection::endMission(%this) // and should manually trigger a mission cleanup. commandToClient(%this, 'MissionEnd', $missionSequence); } - - -//-------------------------------------------------------------------------- -// Sync the clock on the client. - -function GameConnection::syncClock(%client, %time) -{ - commandToClient(%client, 'syncClock', %time); -} - - -//-------------------------------------------------------------------------- -// Update all the clients with the new score - -function GameConnection::incScore(%this,%delta) -{ - %this.score += %delta; - messageAll('MsgClientScoreChanged', "", %this.score, %this); -} diff --git a/Templates/Empty/game/core/scripts/server/defaults.cs b/Templates/BaseGame/game/data/clientServer/scripts/server/defaults.cs similarity index 97% rename from Templates/Empty/game/core/scripts/server/defaults.cs rename to Templates/BaseGame/game/data/clientServer/scripts/server/defaults.cs index 73c50a1a4..28f54b841 100644 --- a/Templates/Empty/game/core/scripts/server/defaults.cs +++ b/Templates/BaseGame/game/data/clientServer/scripts/server/defaults.cs @@ -20,6 +20,8 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- +//Firstly, set up our standard server prefs + // List of master servers to query, each one is tried in order // until one responds $Pref::Server::RegionMask = 2; @@ -57,4 +59,4 @@ $Pref::Server::TimeLimit = 20; // In minutes $Pref::Server::KickBanTime = 300; // specified in seconds $Pref::Server::BanTime = 1800; // specified in seconds $Pref::Server::FloodProtectionEnabled = 1; -$Pref::Server::MaxChatLen = 120; +$Pref::Server::MaxChatLen = 120; \ No newline at end of file diff --git a/Templates/Empty/game/core/scripts/server/kickban.cs b/Templates/BaseGame/game/data/clientServer/scripts/server/kickban.cs similarity index 100% rename from Templates/Empty/game/core/scripts/server/kickban.cs rename to Templates/BaseGame/game/data/clientServer/scripts/server/kickban.cs diff --git a/Templates/Empty/game/core/scripts/server/missionDownload.cs b/Templates/BaseGame/game/data/clientServer/scripts/server/levelDownload.cs similarity index 67% rename from Templates/Empty/game/core/scripts/server/missionDownload.cs rename to Templates/BaseGame/game/data/clientServer/scripts/server/levelDownload.cs index 2b1168b39..a598ee04f 100644 --- a/Templates/Empty/game/core/scripts/server/missionDownload.cs +++ b/Templates/BaseGame/game/data/clientServer/scripts/server/levelDownload.cs @@ -24,7 +24,6 @@ // Mission Loading // The server portion of the client/server mission loading process //----------------------------------------------------------------------------- - //-------------------------------------------------------------------------- // Loading Phases: // Phase 1: Transmit Datablocks @@ -36,6 +35,9 @@ // permission to start each phase. When a client is ready for a phase, // it responds with MissionStartPhase[1-3]Ack. +//---------------------------------------------------------------------------- +// Phase 1 +//---------------------------------------------------------------------------- function GameConnection::loadMission(%this) { // Send over the information that will display the server info @@ -44,12 +46,12 @@ function GameConnection::loadMission(%this) if (%this.isAIControlled()) { // Cut to the chase... - %this.onClientEnterGame(); + theLevelInfo.onEnterGame(%this); } else { - commandToClient(%this, 'MissionStartPhase1', $missionSequence, - $Server::MissionFile, MissionGroup.musicTrack); + commandToClient(%this, 'MissionStartPhase1', $missionSequence, $Server::MissionFile); + echo("*** Sending mission load to client: " @ $Server::MissionFile); } } @@ -57,10 +59,9 @@ function GameConnection::loadMission(%this) function serverCmdMissionStartPhase1Ack(%client, %seq) { // Make sure to ignore calls from a previous mission load - if (%seq != $missionSequence || !$MissionRunning) - return; - if (%client.currentPhase != 0) + if (%seq != $missionSequence || !$MissionRunning || %client.currentPhase != 0) return; + %client.currentPhase = 1; // Start with the CRC @@ -75,34 +76,31 @@ function serverCmdMissionStartPhase1Ack(%client, %seq) function GameConnection::onDataBlocksDone( %this, %missionSequence ) { // Make sure to ignore calls from a previous mission load - if (%missionSequence != $missionSequence) - return; - if (%this.currentPhase != 1) + if (%missionSequence != $missionSequence || %this.currentPhase != 1) return; + %this.currentPhase = 1.5; // On to the next phase commandToClient(%this, 'MissionStartPhase2', $missionSequence, $Server::MissionFile); } -function serverCmdMissionStartPhase2Ack(%client, %seq, %playerDB) +//---------------------------------------------------------------------------- +// Phase 2 +//---------------------------------------------------------------------------- +function serverCmdMissionStartPhase2Ack(%client, %seq) { // Make sure to ignore calls from a previous mission load - if (%seq != $missionSequence || !$MissionRunning) - return; - if (%client.currentPhase != 1.5) + if (%seq != $missionSequence || !$MissionRunning || %client.currentPhase != 1.5) return; + %client.currentPhase = 2; - // Set the player datablock choice - %client.playerDB = %playerDB; - // Update mod paths, this needs to get there before the objects. %client.transmitPaths(); // Start ghosting objects to the client %client.activateGhosting(); - } function GameConnection::clientWantsGhostAlwaysRetry(%client) @@ -113,7 +111,6 @@ function GameConnection::clientWantsGhostAlwaysRetry(%client) function GameConnection::onGhostAlwaysFailed(%client) { - } function GameConnection::onGhostAlwaysObjectsReceived(%client) @@ -122,24 +119,53 @@ function GameConnection::onGhostAlwaysObjectsReceived(%client) commandToClient(%client, 'MissionStartPhase3', $missionSequence, $Server::MissionFile); } +//---------------------------------------------------------------------------- +// Phase 3 +//---------------------------------------------------------------------------- function serverCmdMissionStartPhase3Ack(%client, %seq) { // Make sure to ignore calls from a previous mission load - if(%seq != $missionSequence || !$MissionRunning) - return; - if(%client.currentPhase != 2) + if(%seq != $missionSequence || !$MissionRunning || %client.currentPhase != 2) return; + %client.currentPhase = 3; // Server is ready to drop into the game - if ( $Pref::Server::MinPlayers > 1 ) + //Have any special game-play handling here + if(theLevelInfo.isMethod("onClientEnterGame")) { - PlayerReady(%client); + theLevelInfo.onClientEnterGame(%client); } else { - %client.startMission(); - %client.onClientEnterGame(); + //No Game mode class for the level info, so just spawn a default camera + // Set the control object to the default camera + if (!isObject(%client.camera)) + { + if(!isObject(Observer)) + { + datablock CameraData(Observer) + { + mode = "Observer"; + }; + } + + if (isDefined("$Game::DefaultCameraClass")) + %client.camera = spawnObject("Camera", Observer); + } + + // If we have a camera then set up some properties + if (isObject(%client.camera)) + { + MissionCleanup.add( %this.camera ); + %client.camera.scopeToClient(%client); + + %client.setControlObject(%client.camera); + + %client.camera.setTransform("0 0 1 0 0 0 0"); + } } -} + + %client.startMission(); +} \ No newline at end of file diff --git a/Templates/Empty/game/core/scripts/server/levelInfo.cs b/Templates/BaseGame/game/data/clientServer/scripts/server/levelInfo.cs similarity index 62% rename from Templates/Empty/game/core/scripts/server/levelInfo.cs rename to Templates/BaseGame/game/data/clientServer/scripts/server/levelInfo.cs index 49cf1c456..51df91204 100644 --- a/Templates/Empty/game/core/scripts/server/levelInfo.cs +++ b/Templates/BaseGame/game/data/clientServer/scripts/server/levelInfo.cs @@ -31,7 +31,8 @@ // // Clears the mission info stored //------------------------------------------------------------------------------ -function clearLoadInfo() { +function clearLoadInfo() +{ if (isObject(theLevelInfo)) theLevelInfo.delete(); } @@ -41,7 +42,8 @@ function clearLoadInfo() { // // Extract the map description from the .mis file //------------------------------------------------------------------------------ -function buildLoadInfo( %mission ) { +function buildLoadInfo( %mission ) +{ clearLoadInfo(); %infoObject = ""; @@ -107,3 +109,89 @@ function sendLoadInfoToClient( %client ) messageClient( %client, 'MsgLoadInfoDone' ); } + +// A function used in order to easily parse the MissionGroup for classes . I'm pretty +// sure at this point the function can be easily modified to search the any group as well. +function parseMissionGroup( %className, %childGroup ) +{ + if( getWordCount( %childGroup ) == 0) + %currentGroup = "MissionGroup"; + else + %currentGroup = %childGroup; + + for(%i = 0; %i < (%currentGroup).getCount(); %i++) + { + if( (%currentGroup).getObject(%i).getClassName() $= %className ) + return true; + + if( (%currentGroup).getObject(%i).getClassName() $= "SimGroup" ) + { + if( parseMissionGroup( %className, (%currentGroup).getObject(%i).getId() ) ) + return true; + } + } +} + +// +function parseMissionGroupForIds( %className, %childGroup ) +{ + if( getWordCount( %childGroup ) == 0) + %currentGroup = $Game::MissionGroup; + else + %currentGroup = %childGroup; + + for(%i = 0; %i < (%currentGroup).getCount(); %i++) + { + if( (%currentGroup).getObject(%i).getClassName() $= %className ) + %classIds = %classIds @ (%currentGroup).getObject(%i).getId() @ " "; + + if( (%currentGroup).getObject(%i).getClassName() $= "SimGroup" ) + %classIds = %classIds @ parseMissionGroupForIds( %className, (%currentGroup).getObject(%i).getId()); + } + return %classIds; +} + +function getLevelInfo( %missionFile ) +{ + clearLoadInfo(); + + %file = new FileObject(); + + %LevelInfoObject = ""; + + if ( %file.openForRead( %missionFile ) ) { + %inInfoBlock = false; + + while ( !%file.isEOF() ) { + %line = %file.readLine(); + %line = trim( %line ); + + if( %line $= "new ScriptObject(LevelInfo) {" ) + %inInfoBlock = true; + else if( %line $= "new LevelInfo(theLevelInfo) {" ) + %inInfoBlock = true; + else if( %inInfoBlock && %line $= "};" ) { + %inInfoBlock = false; + %LevelInfoObject = %LevelInfoObject @ %line; + break; + } + + if( %inInfoBlock ) + %LevelInfoObject = %LevelInfoObject @ %line @ " "; + } + + %file.close(); + } + %file.delete(); + + if( %LevelInfoObject !$= "" ) + { + %LevelInfoObject = "%LevelInfoObject = " @ %LevelInfoObject; + eval( %LevelInfoObject ); + + return %LevelInfoObject; + } + + // Didn't find our LevelInfo + return 0; +} \ No newline at end of file diff --git a/Templates/Empty/game/core/scripts/server/missionLoad.cs b/Templates/BaseGame/game/data/clientServer/scripts/server/levelLoad.cs similarity index 93% rename from Templates/Empty/game/core/scripts/server/missionLoad.cs rename to Templates/BaseGame/game/data/clientServer/scripts/server/levelLoad.cs index d85b15516..92801318d 100644 --- a/Templates/Empty/game/core/scripts/server/missionLoad.cs +++ b/Templates/BaseGame/game/data/clientServer/scripts/server/levelLoad.cs @@ -20,28 +20,25 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +// Mission Loading +// The server portion of the client/server mission loading process +//----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // Server mission loading //----------------------------------------------------------------------------- - // On every mission load except the first, there is a pause after // the initial mission info is downloaded to the client. $MissionLoadPause = 5000; //----------------------------------------------------------------------------- - +//This is the first call made by the server to kick the loading process off function loadMission( %missionName, %isFirstMission ) { endMission(); echo("*** LOADING MISSION: " @ %missionName); echo("*** Stage 1 load"); - // Reset all of these - if (isFunction("clearCenterPrintAll")) - clearCenterPrintAll(); - if (isFunction("clearBottomPrintAll")) - clearBottomPrintAll(); - // increment the mission sequence (used for ghost sequencing) $missionSequence++; $missionRunning = false; @@ -55,8 +52,10 @@ function loadMission( %missionName, %isFirstMission ) // Download mission info to the clients %count = ClientGroup.getCount(); - for( %cl = 0; %cl < %count; %cl++ ) { + for( %cl = 0; %cl < %count; %cl++ ) + { %client = ClientGroup.getObject( %cl ); + if (!%client.isAIControlled()) sendLoadInfoToClient(%client); } @@ -114,7 +113,6 @@ function loadMissionStage2() } // Set mission name. - if( isObject( theLevelInfo ) ) $Server::MissionName = theLevelInfo.levelName; @@ -130,19 +128,17 @@ function loadMissionStage2() // Mission loading done... echo("*** Mission loaded"); - + // Start all the clients in the mission $missionRunning = true; for( %clientIndex = 0; %clientIndex < ClientGroup.getCount(); %clientIndex++ ) ClientGroup.getObject(%clientIndex).loadMission(); // Go ahead and launch the game - onMissionLoaded(); + if(TheLevelInfo.isMethod("onMissionStart")) + TheLevelInfo.onMissionStart(); } - -//----------------------------------------------------------------------------- - function endMission() { if (!isObject( MissionGroup )) @@ -151,7 +147,7 @@ function endMission() echo("*** ENDING MISSION"); // Inform the game code we're done. - onMissionEnded(); + TheLevelInfo.onMissionEnded(); // Inform the clients for( %clientIndex = 0; %clientIndex < ClientGroup.getCount(); %clientIndex++ ) { @@ -169,9 +165,6 @@ function endMission() clearServerPaths(); } - -//----------------------------------------------------------------------------- - function resetMission() { echo("*** MISSION RESET"); @@ -184,5 +177,5 @@ function resetMission() clearServerPaths(); // - onMissionReset(); -} + TheLevelInfo.onMissionReset(); +} \ No newline at end of file diff --git a/Templates/Empty/game/core/scripts/client/actionMap.cs b/Templates/BaseGame/game/data/clientServer/scripts/server/message.cs similarity index 51% rename from Templates/Empty/game/core/scripts/client/actionMap.cs rename to Templates/BaseGame/game/data/clientServer/scripts/server/message.cs index 0f5ed7219..ebb1165aa 100644 --- a/Templates/Empty/game/core/scripts/client/actionMap.cs +++ b/Templates/BaseGame/game/data/clientServer/scripts/server/message.cs @@ -20,41 +20,31 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -//------------------------------------------------------------------------------ -// Utility remap functions: -//------------------------------------------------------------------------------ - -function ActionMap::copyBind( %this, %otherMap, %command ) +//----------------------------------------------------------------------------- +function messageClient(%client, %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10, %a11, %a12, %a13) { - if ( !isObject( %otherMap ) ) - { - error( "ActionMap::copyBind - \"" @ %otherMap @ "\" is not an object!" ); - return; - } + commandToClient(%client, 'ServerMessage', %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10, %a11, %a12, %a13); +} - %bind = %otherMap.getBinding( %command ); - if ( %bind !$= "" ) +function messageAll(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10, %a11, %a12, %a13) +{ + %count = ClientGroup.getCount(); + for(%cl = 0; %cl < %count; %cl++) { - %device = getField( %bind, 0 ); - %action = getField( %bind, 1 ); - %flags = %otherMap.isInverted( %device, %action ) ? "SDI" : "SD"; - %deadZone = %otherMap.getDeadZone( %device, %action ); - %scale = %otherMap.getScale( %device, %action ); - %this.bind( %device, %action, %flags, %deadZone, %scale, %command ); + %client = ClientGroup.getObject(%cl); + messageClient(%client, %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10, %a11, %a12, %a13); } } -//------------------------------------------------------------------------------ -function ActionMap::blockBind( %this, %otherMap, %command ) -{ - if ( !isObject( %otherMap ) ) +function messageAllExcept(%client, %team, %msgtype, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10, %a11, %a12, %a13) +{ + //can exclude a client, a team or both. A -1 value in either field will ignore that exclusion, so + //messageAllExcept(-1, -1, $Mesblah, 'Blah!'); will message everyone (since there shouldn't be a client -1 or client on team -1). + %count = ClientGroup.getCount(); + for(%cl= 0; %cl < %count; %cl++) { - error( "ActionMap::blockBind - \"" @ %otherMap @ "\" is not an object!" ); - return; + %recipient = ClientGroup.getObject(%cl); + if((%recipient != %client) && (%recipient.team != %team)) + messageClient(%recipient, %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10, %a11, %a12, %a13); } - - %bind = %otherMap.getBinding( %command ); - if ( %bind !$= "" ) - %this.bind( getField( %bind, 0 ), getField( %bind, 1 ), "" ); -} - +} \ No newline at end of file diff --git a/Templates/Empty/game/core/scripts/server/server.cs b/Templates/BaseGame/game/data/clientServer/scripts/server/server.cs similarity index 60% rename from Templates/Empty/game/core/scripts/server/server.cs rename to Templates/BaseGame/game/data/clientServer/scripts/server/server.cs index 7bd955f04..4fd007b35 100644 --- a/Templates/Empty/game/core/scripts/server/server.cs +++ b/Templates/BaseGame/game/data/clientServer/scripts/server/server.cs @@ -20,21 +20,52 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -function initBaseServer() +function initServer() { - // Base server functionality - exec("./audio.cs"); - exec("./message.cs"); - exec("./commands.cs"); - exec("./levelInfo.cs"); - exec("./missionLoad.cs"); - exec("./missionDownload.cs"); - exec("./clientConnection.cs"); - exec("./kickban.cs"); - exec("./game.cs"); - exec("./spawn.cs"); - exec("./camera.cs"); - exec("./centerPrint.cs"); + echo("\n--------- Initializing " @ $appName @ ": Server Scripts ---------"); + + //load prefs + %prefPath = getPrefpath(); + if ( isFile( %prefPath @ "/serverPrefs.cs" ) ) + exec( %prefPath @ "/serverPrefs.cs" ); + else + exec( "data/clientServer/scripts/server/defaults.cs" ); + + exec( "data/clientServer/scripts/server/audio.cs" ); + exec( "data/clientServer/scripts/server/commands.cs" ); + exec( "data/clientServer/scripts/server/kickban.cs" ); + exec( "data/clientServer/scripts/server/message.cs" ); + exec( "data/clientServer/scripts/server/levelDownload.cs" ); + exec( "data/clientServer/scripts/server/levelLoad.cs" ); + exec( "data/clientServer/scripts/server/levelInfo.cs" ); + exec( "data/clientServer/scripts/server/connectionToClient.cs" ); + + // Server::Status is returned in the Game Info Query and represents the + // current status of the server. This string sould be very short. + $Server::Status = "Unknown"; + + // Turn on testing/debug script functions + $Server::TestCheats = false; + + // Specify where the mission files are. + $Server::MissionFileSpec = "data/levels/*.mis"; +} + +//----------------------------------------------------------------------------- +function initDedicated() +{ + enableWinConsole(true); + echo("\n--------- Starting Dedicated Server ---------"); + + // Make sure this variable reflects the correct state. + $Server::Dedicated = true; + + // The server isn't started unless a mission has been specified. + if ($missionArg !$= "") { + createServer("MultiPlayer", $missionArg); + } + else + echo("No mission specified (use -mission filename)"); } /// Attempt to find an open port to initialize the server with @@ -59,7 +90,7 @@ function createAndConnectToLocalServer( %serverType, %level ) %conn = new GameConnection( ServerConnection ); RootGroup.add( ServerConnection ); - + %conn.setConnectArgs( $pref::Player::Name ); %conn.setJoinPassword( $Client::Password ); @@ -71,7 +102,7 @@ function createAndConnectToLocalServer( %serverType, %level ) return false; } - + return true; } @@ -117,33 +148,61 @@ function createServer(%serverType, %level) schedule(0,0,startHeartbeat); } - // Create the ServerGroup that will persist for the lifetime of the server. - new SimGroup(ServerGroup); - - // Load up any core datablocks - exec("core/art/datablocks/datablockExec.cs"); - // Let the game initialize some things now that the // the server has been created onServerCreated(); loadMission(%level, true); + $Game::running = true; + return true; } +function onServerCreated() +{ + // Server::GameType is sent to the master server. + // This variable should uniquely identify your game and/or mod. + $Server::GameType = $appName; + + // Server::MissionType sent to the master server. Clients can + // filter servers based on mission type. + // $Server::MissionType = "Deathmatch"; + + // GameStartTime is the sim time the game started. Used to calculated + // game elapsed time. + $Game::StartTime = 0; + + // Create the server physics world. + physicsInitWorld( "server" ); + + physicsStartSimulation("server"); + + %cnt = DatablockFilesList.count(); + + loadDatablockFiles( DatablockFilesList, true ); + + %cnt = DatablockFilesList.count(); + + // Keep track of when the game started + $Game::StartTime = $Sim::Time; +} + /// Shut down the server function destroyServer() { $Server::ServerType = ""; + $Server::Running = false; + allowConnections(false); stopHeartbeat(); $missionRunning = false; - // End any running levels - endMission(); + // End any running levels and shut down the physics sim onServerDestroyed(); + physicsDestroy(); + // Delete all the server objects if (isObject(ServerGroup)) ServerGroup.delete(); @@ -161,24 +220,44 @@ function destroyServer() deleteDataBlocks(); // Save any server settings + %prefPath = getPrefpath(); echo( "Exporting server prefs..." ); - export( "$Pref::Server::*", "~/prefs.cs", false ); + export( "$Pref::Server::*", %prefPath@"/serverPrefs.cs", false ); + + BanList::Export(%prefPath@"/banlist.cs"); // Increase the server session number. This is used to make sure we're // working with the server session we think we are. $Server::Session++; } -/// Reset the server's default prefs -function resetServerDefaults() +function onServerDestroyed() { - echo( "Resetting server defaults..." ); + physicsStopSimulation("server"); - exec( "~/defaults.cs" ); - exec( "~/prefs.cs" ); + if (!isObject( MissionGroup )) + return; - // Reload the current level - loadMission( $Server::MissionFile ); + echo("*** ENDING MISSION"); + + // Inform the game code we're done. + if(TheLevelInfo.isMethod("onMissionEnded")) + TheLevelInfo.onMissionEnded(); + + // Inform the clients + for( %clientIndex = 0; %clientIndex < ClientGroup.getCount(); %clientIndex++ ) { + // clear ghosts and paths from all clients + %cl = ClientGroup.getObject( %clientIndex ); + %cl.endMission(); + %cl.resetGhosting(); + %cl.clearPaths(); + } + + // Delete everything + MissionGroup.delete(); + MissionCleanup.delete(); + + clearServerPaths(); } /// Guid list maintenance functions @@ -213,4 +292,4 @@ function removeFromServerGuidList( %guid ) function onServerInfoQuery() { return "Doing Ok"; -} +} \ No newline at end of file diff --git a/Templates/BaseGame/game/data/defaults.cs b/Templates/BaseGame/game/data/defaults.cs new file mode 100644 index 000000000..ea7ee6a19 --- /dev/null +++ b/Templates/BaseGame/game/data/defaults.cs @@ -0,0 +1,218 @@ +$pref::Player::Name = "Visitor"; +$pref::Player::defaultFov = 75; +$pref::Player::zoomSpeed = 0; + +$pref::Net::LagThreshold = 400; +$pref::Net::Port = 28000; + +$pref::HudMessageLogSize = 40; +$pref::ChatHudLength = 1; + +$pref::Input::LinkMouseSensitivity = 1; +// DInput keyboard, mouse, and joystick prefs +$pref::Input::KeyboardEnabled = 1; +$pref::Input::MouseEnabled = 1; +$pref::Input::JoystickEnabled = 0; +$pref::Input::KeyboardTurnSpeed = 0.1; +$pref::Input::invertVerticalMouse = false; +$pref::Input::VertMouseSensitivity = 1; +$pref::Input::HorzMouseSensitivity = 1; +$pref::Input::RollMouseSensitivity = 1; +$pref::Input::ZoomVertMouseSensitivity = 0.3; +$pref::Input::ZoomHorzMouseSensitivity = 0.3; + +$sceneLighting::cacheSize = 20000; +$sceneLighting::purgeMethod = "lastCreated"; +$sceneLighting::cacheLighting = 1; + +$pref::Video::displayDevice = "D3D9"; +$pref::Video::disableVerticalSync = 1; +$pref::Video::Resolution = "1024 768"; +$pref::Video::FullScreen = false; +$pref::Video::BitDepth = "32"; +$pref::Video::RefreshRate = "60"; +$pref::Video::AA = "4"; +$pref::Video::defaultFenceCount = 0; +$pref::Video::screenShotSession = 0; +$pref::Video::screenShotFormat = "PNG"; + +/// This disables the hardware FSAA/MSAA so that +/// we depend completely on the FXAA post effect +/// which works on all cards and in deferred mode. +/// +/// Note the new Intel Hybrid graphics on laptops +/// will fail to initialize when hardware AA is +/// enabled... so you've been warned. +/// +$pref::Video::disableHardwareAA = true; + +$pref::Video::disableNormalmapping = false; + +$pref::Video::disablePixSpecular = false; + +$pref::Video::disableCubemapping = false; + +/// +$pref::Video::disableParallaxMapping = false; + +$pref::Video::Gamma = 2.2; +$pref::Video::Contrast = 1.0; +$pref::Video::Brightness = 0; + +/// The perfered light manager to use at startup. If blank +/// or if the selected one doesn't work on this platfom it +/// will try the defaults below. +$pref::lightManager = ""; + +/// This is the default list of light managers ordered from +/// most to least desirable for initialization. +$lightManager::defaults = "Advanced Lighting"; + +/// A scale to apply to the camera view distance +/// typically used for tuning performance. +$pref::camera::distanceScale = 1.0; + +/// Causes the system to do a one time autodetect +/// of an SFX provider and device at startup if the +/// provider is unset. +$pref::SFX::autoDetect = true; + +/// The sound provider to select at startup. Typically +/// this is DirectSound, OpenAL, or XACT. There is also +/// a special Null provider which acts normally, but +/// plays no sound. +$pref::SFX::provider = ""; + +/// The sound device to select from the provider. Each +/// provider may have several different devices. +$pref::SFX::device = "OpenAL"; + +/// If true the device will try to use hardware buffers +/// and sound mixing. If not it will use software. +$pref::SFX::useHardware = false; + +/// If you have a software device you have a +/// choice of how many software buffers to +/// allow at any one time. More buffers cost +/// more CPU time to process and mix. +$pref::SFX::maxSoftwareBuffers = 16; + +/// This is the playback frequency for the primary +/// sound buffer used for mixing. Although most +/// providers will reformat on the fly, for best +/// quality and performance match your sound files +/// to this setting. +$pref::SFX::frequency = 44100; + +/// This is the playback bitrate for the primary +/// sound buffer used for mixing. Although most +/// providers will reformat on the fly, for best +/// quality and performance match your sound files +/// to this setting. +$pref::SFX::bitrate = 32; + +/// The overall system volume at startup. Note that +/// you can only scale volume down, volume does not +/// get louder than 1. +$pref::SFX::masterVolume = 0.8; + +/// The startup sound channel volumes. These are +/// used to control the overall volume of different +/// classes of sounds. +$pref::SFX::channelVolume1 = 1; +$pref::SFX::channelVolume2 = 1; +$pref::SFX::channelVolume3 = 1; +$pref::SFX::channelVolume4 = 1; +$pref::SFX::channelVolume5 = 1; +$pref::SFX::channelVolume6 = 1; +$pref::SFX::channelVolume7 = 1; +$pref::SFX::channelVolume8 = 1; + +$pref::SFX::channelVolume[1] = 1; +$pref::SFX::channelVolume[2] = 1; +$pref::SFX::channelVolume[3] = 1; +$pref::SFX::channelVolume[4] = 1; + +$pref::PostEffect::PreferedHDRFormat = "GFXFormatR8G8B8A8"; + +/// This is an scalar which can be used to reduce the +/// reflection textures on all objects to save fillrate. +$pref::Reflect::refractTexScale = 1.0; + +/// This is the total frame in milliseconds to budget for +/// reflection rendering. If your CPU bound and have alot +/// of smaller reflection surfaces try reducing this time. +$pref::Reflect::frameLimitMS = 10; + +/// Set true to force all water objects to use static cubemap reflections. +$pref::Water::disableTrueReflections = false; + +// A global LOD scalar which can reduce the overall density of placed GroundCover. +$pref::GroundCover::densityScale = 1.0; + +/// An overall scaler on the lod switching between DTS models. +/// Smaller numbers makes the lod switch sooner. +$pref::TS::detailAdjust = 1.0; + +/// +$pref::Decals::enabled = true; + +/// +$pref::Decals::lifeTimeScale = "1"; + +/// The number of mipmap levels to drop on loaded textures +/// to reduce video memory usage. +/// +/// It will skip any textures that have been defined as not +/// allowing down scaling. +/// +$pref::Video::textureReductionLevel = 0; + +/// +$pref::Shadows::textureScalar = 1.0; + +/// +$pref::Shadows::disable = false; + +/// Sets the shadow filtering mode. +/// +/// None - Disables filtering. +/// +/// SoftShadow - Does a simple soft shadow +/// +/// SoftShadowHighQuality +/// +$pref::Shadows::filterMode = "SoftShadow"; + +/// +$pref::Video::defaultAnisotropy = 1; + +/// Radius in meters around the camera that ForestItems are affected by wind. +/// Note that a very large number with a large number of items is not cheap. +$pref::windEffectRadius = 25; + +/// AutoDetect graphics quality levels the next startup. +$pref::Video::autoDetect = 1; + +$PostFXManager::Settings::EnableDOF = "0"; +$PostFXManager::Settings::DOF::BlurCurveFar = ""; +$PostFXManager::Settings::DOF::BlurCurveNear = ""; +$PostFXManager::Settings::DOF::BlurMax = ""; +$PostFXManager::Settings::DOF::BlurMin = ""; +$PostFXManager::Settings::DOF::EnableAutoFocus = ""; +$PostFXManager::Settings::DOF::EnableDOF = ""; +$PostFXManager::Settings::DOF::FocusRangeMax = ""; +$PostFXManager::Settings::DOF::FocusRangeMin = ""; + +$PostFXManager::Settings::EnableLightRays = "0"; +$PostFXManager::Settings::LightRays::brightScalar = "0.75"; +$PostFXManager::Settings::LightRays::decay = "1.0"; +$PostFXManager::Settings::LightRays::density = "0.94"; +$PostFXManager::Settings::LightRays::numSamples = "40"; +$PostFXManager::Settings::LightRays::weight = "5.65"; + +$PostFXManager::Settings::EnableDOF = 1; +$pref::PostFX::EnableVignette = 1; +$pref::PostFX::EnableLightRays = 1; +$pref::PostFX::EnableHDR = 1; +$pref::PostFX::EnableSSAO = 1; \ No newline at end of file diff --git a/Templates/Empty/game/tools/materialEditor/gui/torusknowpreview.dts b/Templates/BaseGame/game/data/shaderCache/.gitignore similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/torusknowpreview.dts rename to Templates/BaseGame/game/data/shaderCache/.gitignore diff --git a/Templates/Empty/game/art/gui/splash.png b/Templates/BaseGame/game/data/splash.png similarity index 100% rename from Templates/Empty/game/art/gui/splash.png rename to Templates/BaseGame/game/data/splash.png diff --git a/Templates/Empty/game/core/torque.png b/Templates/BaseGame/game/data/torque.png similarity index 100% rename from Templates/Empty/game/core/torque.png rename to Templates/BaseGame/game/data/torque.png diff --git a/Templates/BaseGame/game/data/ui/UI.cs b/Templates/BaseGame/game/data/ui/UI.cs new file mode 100644 index 000000000..eac7f9232 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/UI.cs @@ -0,0 +1,74 @@ + +// The general flow of a gane - server's creation, loading and hosting clients, and then destruction is as follows: + +// First, a client will always create a server in the event that they want to host a single player +// game. Torque3D treats even single player connections as a soft multiplayer game, with some stuff +// in the networking short-circuited to sidestep around lag and packet transmission times. + +// initServer() is called, loading the default server scripts. +// After that, if this is a dedicated server session, initDedicated() is called, otherwise initClient is called +// to prep a playable client session. + +// When a local game is started - a listen server - via calling StartGame() a server is created and then the client is +// connected to it via createAndConnectToLocalServer(). + +function UI::create( %this ) +{ + if ($Server::Dedicated) + return; + + // Use our prefs to configure our Canvas/Window + configureCanvas(); + + //Load UI stuff + //we need to load this because some of the menu profiles use the sounds here + exec("./scripts/datablocks/guiSounds.cs"); + + //Profiles + exec("./scripts/profiles.cs"); + + //Now gui files + exec("./scripts/guis/mainMenu.gui"); + exec("./scripts/guis/chooseLevelDlg.gui"); + exec("./scripts/guis/joinServerMenu.gui"); + exec("./scripts/guis/loadingGui.gui"); + exec("./scripts/guis/optionsMenu.gui"); + exec("./scripts/guis/pauseMenu.gui"); + exec("./scripts/guis/remapDlg.gui"); + exec("./scripts/guis/remapConfirmDlg.gui"); + + exec("./scripts/guis/profiler.gui"); + exec("./scripts/guis/netGraphGui.gui"); + exec("./scripts/guis/FileDialog.gui"); + exec("./scripts/guis/guiMusicPlayer.gui"); + exec("./scripts/guis/startupGui.gui"); + + //Load gui companion scripts + exec("./scripts/chooseLevelDlg.cs"); + exec("./scripts/optionsList.cs"); + exec("./scripts/optionsMenu.cs"); + exec("./scripts/graphicsMenu.cs"); + exec("./scripts/controlsMenu.cs"); + exec("./scripts/chooseLevelDlg.cs"); + exec("./scripts/mainMenu.cs"); + exec("./scripts/joinServerMenu.cs"); + exec("./scripts/pauseMenu.cs"); + exec("./scripts/messageBoxes.cs"); + exec("./scripts/help.cs"); + exec("./scripts/cursors.cs"); + exec("./scripts/profiler.cs"); + exec("./scripts/FileDialog.cs"); + exec("./scripts/GuiTreeViewCtrl.cs"); + exec("./scripts/guiMusicPlayer.cs"); + exec("./scripts/startupGui.cs"); + + %dbList = new ArrayObject(LevelFilesList); + + loadStartup(); + //Canvas.pushDialog(MainMenuGui); +} + +function Game::destroy( %this ) +{ + +} \ No newline at end of file diff --git a/Templates/BaseGame/game/data/ui/UI.module b/Templates/BaseGame/game/data/ui/UI.module new file mode 100644 index 000000000..e22117d39 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/UI.module @@ -0,0 +1,9 @@ + + \ No newline at end of file diff --git a/Templates/BaseGame/game/data/ui/art/ScreenBrightness_Dark.png b/Templates/BaseGame/game/data/ui/art/ScreenBrightness_Dark.png new file mode 100644 index 000000000..85cde0bbc Binary files /dev/null and b/Templates/BaseGame/game/data/ui/art/ScreenBrightness_Dark.png differ diff --git a/Templates/BaseGame/game/data/ui/art/ScreenBrightness_Light.png b/Templates/BaseGame/game/data/ui/art/ScreenBrightness_Light.png new file mode 100644 index 000000000..6c16b7e44 Binary files /dev/null and b/Templates/BaseGame/game/data/ui/art/ScreenBrightness_Light.png differ diff --git a/Templates/BaseGame/game/data/ui/art/Torque-3D-logo-shortcut.png b/Templates/BaseGame/game/data/ui/art/Torque-3D-logo-shortcut.png new file mode 100644 index 000000000..d993d4893 Binary files /dev/null and b/Templates/BaseGame/game/data/ui/art/Torque-3D-logo-shortcut.png differ diff --git a/Templates/Empty/game/art/gui/Torque-3D-logo-w.png b/Templates/BaseGame/game/data/ui/art/Torque-3D-logo-w.png similarity index 100% rename from Templates/Empty/game/art/gui/Torque-3D-logo-w.png rename to Templates/BaseGame/game/data/ui/art/Torque-3D-logo-w.png diff --git a/Templates/BaseGame/game/data/ui/art/Torque-3D-logo.png b/Templates/BaseGame/game/data/ui/art/Torque-3D-logo.png new file mode 100644 index 000000000..e31d42a68 Binary files /dev/null and b/Templates/BaseGame/game/data/ui/art/Torque-3D-logo.png differ diff --git a/Templates/Empty/game/art/gui/Torque-3D-logo_alt.png b/Templates/BaseGame/game/data/ui/art/Torque-3D-logo_alt.png similarity index 100% rename from Templates/Empty/game/art/gui/Torque-3D-logo_alt.png rename to Templates/BaseGame/game/data/ui/art/Torque-3D-logo_alt.png diff --git a/Templates/BaseGame/game/data/ui/art/background-dark.png b/Templates/BaseGame/game/data/ui/art/background-dark.png new file mode 100644 index 000000000..fedbcfc93 Binary files /dev/null and b/Templates/BaseGame/game/data/ui/art/background-dark.png differ diff --git a/Templates/Empty/game/art/gui/background.png b/Templates/BaseGame/game/data/ui/art/background.png similarity index 100% rename from Templates/Empty/game/art/gui/background.png rename to Templates/BaseGame/game/data/ui/art/background.png diff --git a/Templates/Empty/game/core/art/gui/images/buttontab.png b/Templates/BaseGame/game/data/ui/art/buttontab.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/buttontab.png rename to Templates/BaseGame/game/data/ui/art/buttontab.png diff --git a/Templates/Empty/game/core/art/gui/images/chatHudBorderArray.png b/Templates/BaseGame/game/data/ui/art/chatHudBorderArray.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/chatHudBorderArray.png rename to Templates/BaseGame/game/data/ui/art/chatHudBorderArray.png diff --git a/Templates/Empty/game/tools/gui/images/checkbox.png b/Templates/BaseGame/game/data/ui/art/checkbox.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/checkbox.png rename to Templates/BaseGame/game/data/ui/art/checkbox.png diff --git a/Templates/Empty/game/core/art/gui/images/clear-btn_d.png b/Templates/BaseGame/game/data/ui/art/clear-btn_d.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/clear-btn_d.png rename to Templates/BaseGame/game/data/ui/art/clear-btn_d.png diff --git a/Templates/Empty/game/core/art/gui/images/clear-btn_h.png b/Templates/BaseGame/game/data/ui/art/clear-btn_h.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/clear-btn_h.png rename to Templates/BaseGame/game/data/ui/art/clear-btn_h.png diff --git a/Templates/Empty/game/core/art/gui/images/clear-btn_n.png b/Templates/BaseGame/game/data/ui/art/clear-btn_n.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/clear-btn_n.png rename to Templates/BaseGame/game/data/ui/art/clear-btn_n.png diff --git a/Templates/Empty/game/core/art/gui/images/collapse-toolbar_d.png b/Templates/BaseGame/game/data/ui/art/collapse-toolbar_d.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/collapse-toolbar_d.png rename to Templates/BaseGame/game/data/ui/art/collapse-toolbar_d.png diff --git a/Templates/Empty/game/core/art/gui/images/collapse-toolbar_h.png b/Templates/BaseGame/game/data/ui/art/collapse-toolbar_h.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/collapse-toolbar_h.png rename to Templates/BaseGame/game/data/ui/art/collapse-toolbar_h.png diff --git a/Templates/Empty/game/core/art/gui/images/collapse-toolbar_n.png b/Templates/BaseGame/game/data/ui/art/collapse-toolbar_n.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/collapse-toolbar_n.png rename to Templates/BaseGame/game/data/ui/art/collapse-toolbar_n.png diff --git a/Templates/Empty/game/core/art/gui/images/defaultCursor.png b/Templates/BaseGame/game/data/ui/art/defaultCursor.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/defaultCursor.png rename to Templates/BaseGame/game/data/ui/art/defaultCursor.png diff --git a/Templates/Empty/game/core/art/gui/images/dropDown.png b/Templates/BaseGame/game/data/ui/art/dropDown.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/dropDown.png rename to Templates/BaseGame/game/data/ui/art/dropDown.png diff --git a/Templates/Empty/game/core/art/gui/images/dropdown-button-arrow.png b/Templates/BaseGame/game/data/ui/art/dropdown-button-arrow.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/dropdown-button-arrow.png rename to Templates/BaseGame/game/data/ui/art/dropdown-button-arrow.png diff --git a/Templates/Empty/game/core/art/gui/images/dropdown-textEdit.png b/Templates/BaseGame/game/data/ui/art/dropdown-textEdit.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/dropdown-textEdit.png rename to Templates/BaseGame/game/data/ui/art/dropdown-textEdit.png diff --git a/Templates/Empty/game/core/art/gui/images/dropslider_d.png b/Templates/BaseGame/game/data/ui/art/dropslider_d.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/dropslider_d.png rename to Templates/BaseGame/game/data/ui/art/dropslider_d.png diff --git a/Templates/Empty/game/core/art/gui/images/dropslider_h.png b/Templates/BaseGame/game/data/ui/art/dropslider_h.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/dropslider_h.png rename to Templates/BaseGame/game/data/ui/art/dropslider_h.png diff --git a/Templates/Empty/game/core/art/gui/images/dropslider_n.png b/Templates/BaseGame/game/data/ui/art/dropslider_n.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/dropslider_n.png rename to Templates/BaseGame/game/data/ui/art/dropslider_n.png diff --git a/Templates/Empty/game/core/art/gui/images/expand-toolbar_d.png b/Templates/BaseGame/game/data/ui/art/expand-toolbar_d.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/expand-toolbar_d.png rename to Templates/BaseGame/game/data/ui/art/expand-toolbar_d.png diff --git a/Templates/Empty/game/core/art/gui/images/expand-toolbar_h.png b/Templates/BaseGame/game/data/ui/art/expand-toolbar_h.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/expand-toolbar_h.png rename to Templates/BaseGame/game/data/ui/art/expand-toolbar_h.png diff --git a/Templates/Empty/game/core/art/gui/images/expand-toolbar_n.png b/Templates/BaseGame/game/data/ui/art/expand-toolbar_n.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/expand-toolbar_n.png rename to Templates/BaseGame/game/data/ui/art/expand-toolbar_n.png diff --git a/Templates/Empty/game/core/art/gui/images/folder.png b/Templates/BaseGame/game/data/ui/art/folder.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/folder.png rename to Templates/BaseGame/game/data/ui/art/folder.png diff --git a/Templates/Empty/game/tools/gui/images/group-border.png b/Templates/BaseGame/game/data/ui/art/group-border.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/group-border.png rename to Templates/BaseGame/game/data/ui/art/group-border.png diff --git a/Templates/Empty/game/core/art/gui/images/hudfill.png b/Templates/BaseGame/game/data/ui/art/hudfill.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/hudfill.png rename to Templates/BaseGame/game/data/ui/art/hudfill.png diff --git a/Templates/Empty/game/tools/gui/images/inactive-overlay.png b/Templates/BaseGame/game/data/ui/art/inactive-overlay.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/inactive-overlay.png rename to Templates/BaseGame/game/data/ui/art/inactive-overlay.png diff --git a/Templates/BaseGame/game/data/ui/art/lagIcon.png b/Templates/BaseGame/game/data/ui/art/lagIcon.png new file mode 100644 index 000000000..cf158dd65 Binary files /dev/null and b/Templates/BaseGame/game/data/ui/art/lagIcon.png differ diff --git a/Templates/BaseGame/game/data/ui/art/loadingbar.png b/Templates/BaseGame/game/data/ui/art/loadingbar.png new file mode 100644 index 000000000..34f594403 Binary files /dev/null and b/Templates/BaseGame/game/data/ui/art/loadingbar.png differ diff --git a/Templates/Empty/game/core/art/gui/images/macCursor.png b/Templates/BaseGame/game/data/ui/art/macCursor.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/macCursor.png rename to Templates/BaseGame/game/data/ui/art/macCursor.png diff --git a/Templates/BaseGame/game/data/ui/art/menu-button.png b/Templates/BaseGame/game/data/ui/art/menu-button.png new file mode 100644 index 000000000..9964e0e69 Binary files /dev/null and b/Templates/BaseGame/game/data/ui/art/menu-button.png differ diff --git a/Templates/Empty/game/core/art/gui/images/menu.png b/Templates/BaseGame/game/data/ui/art/menu.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/menu.png rename to Templates/BaseGame/game/data/ui/art/menu.png diff --git a/Templates/Empty/game/core/art/gui/images/slider.png b/Templates/BaseGame/game/data/ui/art/menuSlider.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/slider.png rename to Templates/BaseGame/game/data/ui/art/menuSlider.png diff --git a/Templates/Empty/game/core/art/gui/images/new_d.png b/Templates/BaseGame/game/data/ui/art/new_d.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/new_d.png rename to Templates/BaseGame/game/data/ui/art/new_d.png diff --git a/Templates/Empty/game/core/art/gui/images/new_h.png b/Templates/BaseGame/game/data/ui/art/new_h.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/new_h.png rename to Templates/BaseGame/game/data/ui/art/new_h.png diff --git a/Templates/Empty/game/core/art/gui/images/new_n.png b/Templates/BaseGame/game/data/ui/art/new_n.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/new_n.png rename to Templates/BaseGame/game/data/ui/art/new_n.png diff --git a/Templates/Empty/game/art/gui/next-button_d.png b/Templates/BaseGame/game/data/ui/art/next-button_d.png similarity index 100% rename from Templates/Empty/game/art/gui/next-button_d.png rename to Templates/BaseGame/game/data/ui/art/next-button_d.png diff --git a/Templates/Empty/game/art/gui/next-button_h.png b/Templates/BaseGame/game/data/ui/art/next-button_h.png similarity index 100% rename from Templates/Empty/game/art/gui/next-button_h.png rename to Templates/BaseGame/game/data/ui/art/next-button_h.png diff --git a/Templates/Empty/game/art/gui/next-button_n.png b/Templates/BaseGame/game/data/ui/art/next-button_n.png similarity index 100% rename from Templates/Empty/game/art/gui/next-button_n.png rename to Templates/BaseGame/game/data/ui/art/next-button_n.png diff --git a/Templates/Empty/game/art/gui/no-preview.png b/Templates/BaseGame/game/data/ui/art/no-preview.png similarity index 100% rename from Templates/Empty/game/art/gui/no-preview.png rename to Templates/BaseGame/game/data/ui/art/no-preview.png diff --git a/Templates/Empty/game/core/art/gui/images/numericslider.png b/Templates/BaseGame/game/data/ui/art/numericslider.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/numericslider.png rename to Templates/BaseGame/game/data/ui/art/numericslider.png diff --git a/Templates/Empty/game/art/gui/previous-button_d.png b/Templates/BaseGame/game/data/ui/art/previous-button_d.png similarity index 100% rename from Templates/Empty/game/art/gui/previous-button_d.png rename to Templates/BaseGame/game/data/ui/art/previous-button_d.png diff --git a/Templates/Empty/game/art/gui/previous-button_h.png b/Templates/BaseGame/game/data/ui/art/previous-button_h.png similarity index 100% rename from Templates/Empty/game/art/gui/previous-button_h.png rename to Templates/BaseGame/game/data/ui/art/previous-button_h.png diff --git a/Templates/Empty/game/art/gui/previous-button_n.png b/Templates/BaseGame/game/data/ui/art/previous-button_n.png similarity index 100% rename from Templates/Empty/game/art/gui/previous-button_n.png rename to Templates/BaseGame/game/data/ui/art/previous-button_n.png diff --git a/Templates/Empty/game/tools/gui/images/radioButton.png b/Templates/BaseGame/game/data/ui/art/radioButton.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/radioButton.png rename to Templates/BaseGame/game/data/ui/art/radioButton.png diff --git a/Templates/Empty/game/tools/gui/images/scrollBar.png b/Templates/BaseGame/game/data/ui/art/scrollBar.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/scrollBar.png rename to Templates/BaseGame/game/data/ui/art/scrollBar.png diff --git a/Templates/BaseGame/game/data/ui/art/selector-button-blank.png b/Templates/BaseGame/game/data/ui/art/selector-button-blank.png new file mode 100644 index 000000000..e965b3af6 Binary files /dev/null and b/Templates/BaseGame/game/data/ui/art/selector-button-blank.png differ diff --git a/Templates/BaseGame/game/data/ui/art/selector-button-dark.png b/Templates/BaseGame/game/data/ui/art/selector-button-dark.png new file mode 100644 index 000000000..84ee7e6f3 Binary files /dev/null and b/Templates/BaseGame/game/data/ui/art/selector-button-dark.png differ diff --git a/Templates/BaseGame/game/data/ui/art/selector-button-highlight-only.png b/Templates/BaseGame/game/data/ui/art/selector-button-highlight-only.png new file mode 100644 index 000000000..77e01fc74 Binary files /dev/null and b/Templates/BaseGame/game/data/ui/art/selector-button-highlight-only.png differ diff --git a/Templates/Empty/game/core/art/gui/images/selector-button.png b/Templates/BaseGame/game/data/ui/art/selector-button.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/selector-button.png rename to Templates/BaseGame/game/data/ui/art/selector-button.png diff --git a/Templates/Empty/game/core/art/gui/images/separator-h.png b/Templates/BaseGame/game/data/ui/art/separator-h.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/separator-h.png rename to Templates/BaseGame/game/data/ui/art/separator-h.png diff --git a/Templates/Empty/game/core/art/gui/images/separator-v.png b/Templates/BaseGame/game/data/ui/art/separator-v.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/separator-v.png rename to Templates/BaseGame/game/data/ui/art/separator-v.png diff --git a/Templates/Empty/game/core/art/gui/images/slider-w-box.png b/Templates/BaseGame/game/data/ui/art/slider-w-box.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/slider-w-box.png rename to Templates/BaseGame/game/data/ui/art/slider-w-box.png diff --git a/Templates/Empty/game/tools/gui/images/slider.png b/Templates/BaseGame/game/data/ui/art/slider.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/slider.png rename to Templates/BaseGame/game/data/ui/art/slider.png diff --git a/Templates/Empty/game/core/art/gui/images/tab-border.png b/Templates/BaseGame/game/data/ui/art/tab-border.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/tab-border.png rename to Templates/BaseGame/game/data/ui/art/tab-border.png diff --git a/Templates/Empty/game/core/art/gui/images/tab.png b/Templates/BaseGame/game/data/ui/art/tab.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/tab.png rename to Templates/BaseGame/game/data/ui/art/tab.png diff --git a/Templates/Empty/game/tools/gui/images/textEditFrame.png b/Templates/BaseGame/game/data/ui/art/textEdit.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/textEditFrame.png rename to Templates/BaseGame/game/data/ui/art/textEdit.png diff --git a/Templates/Empty/game/core/art/gui/images/textEditSliderBox.png b/Templates/BaseGame/game/data/ui/art/textEditSliderBox.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/textEditSliderBox.png rename to Templates/BaseGame/game/data/ui/art/textEditSliderBox.png diff --git a/Templates/Empty/game/tools/gui/images/window.png b/Templates/BaseGame/game/data/ui/art/window.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/window.png rename to Templates/BaseGame/game/data/ui/art/window.png diff --git a/Templates/Empty/game/core/scripts/gui/FileDialog.cs b/Templates/BaseGame/game/data/ui/scripts/FileDialog.cs similarity index 99% rename from Templates/Empty/game/core/scripts/gui/FileDialog.cs rename to Templates/BaseGame/game/data/ui/scripts/FileDialog.cs index c5e693a80..4d67fd969 100644 --- a/Templates/Empty/game/core/scripts/gui/FileDialog.cs +++ b/Templates/BaseGame/game/data/ui/scripts/FileDialog.cs @@ -1,5 +1,3 @@ -exec("./FileDialog.gui"); - function PlatformFileDialog::buildFilters(%this) { %str = strreplace( %this.data.filters, "|", "\t"); diff --git a/Templates/Empty/game/scripts/gui/chooseLevelDlg.cs b/Templates/BaseGame/game/data/ui/scripts/chooseLevelDlg.cs similarity index 73% rename from Templates/Empty/game/scripts/gui/chooseLevelDlg.cs rename to Templates/BaseGame/game/data/ui/scripts/chooseLevelDlg.cs index 1cb60d4d7..c5ae1e297 100644 --- a/Templates/Empty/game/scripts/gui/chooseLevelDlg.cs +++ b/Templates/BaseGame/game/data/ui/scripts/chooseLevelDlg.cs @@ -20,58 +20,52 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -function StartLevel( %mission, %hostingType ) -{ - if( %mission $= "" ) - { - %id = CL_levelList.getSelectedId(); - %mission = getField(CL_levelList.getRowTextById(%id), 1); - } - - if (%hostingType !$= "") - { - %serverType = %hostingType; - } - else - { - if ($pref::HostMultiPlayer) - %serverType = "MultiPlayer"; - else - %serverType = "SinglePlayer"; - } - - // Show the loading screen immediately. - if ( isObject( LoadingGui ) ) - { - Canvas.setContent("LoadingGui"); - LoadingProgress.setValue(1); - LoadingProgressTxt.setValue("LOADING MISSION FILE"); - Canvas.repaint(); - } - - createAndConnectToLocalServer( %serverType, %mission ); -} - - //---------------------------------------- function ChooseLevelDlg::onWake( %this ) { CL_levelList.clear(); ChooseLevelWindow->SmallPreviews.clear(); - %i = 0; - for(%file = findFirstFile($Server::MissionFileSpec); %file !$= ""; %file = findNextFile($Server::MissionFileSpec)) + %this->CurrentPreview.visible = false; + %this->levelName.visible = false; + %this->LevelDescriptionLabel.visible = false; + %this->LevelDescription.visible = false; + + %count = LevelFilesList.count(); + + if(%count == 0) { + //We have no levels found. Prompt the user to open the editor to the default level if the tools are present + if(IsDirectory("tools")) + { + MessageBoxYesNo("Error", "No levels were found in any modules. Do you want to load the editor and start a new level?", + "fastLoadWorldEdit(1);", + "Canvas.popDialog(ChooseLevelDlg); if(isObject(ChooseLevelDlg.returnGui) && ChooseLevelDlg.returnGui.isMethod(\"onReturnTo\")) ChooseLevelDlg.returnGui.onReturnTo();"); + } + else + { + MessageBoxOK("Error", "No levels were found in any modules. Please ensure you have modules loaded that contain gameplay code and level files.", + "Canvas.popDialog(ChooseLevelDlg); if(isObject(ChooseLevelDlg.returnGui) && ChooseLevelDlg.returnGui.isMethod(\"onReturnTo\")) ChooseLevelDlg.returnGui.onReturnTo();"); + } + + return; + } + + for ( %i=0; %i < %count; %i++ ) + { + %file = LevelFilesList.getKey( %i ); + if ( !isFile(%file @ ".mis") && !isFile(%file) ) + continue; + // Skip our new level/mission if we arent choosing a level // to launch in the editor. if ( !%this.launchInEditor ) { - if (strstr(%file, "newMission.mis") > -1) + %fileName = fileName(%file); + if (strstr(%fileName, "newMission.mis") > -1 || strstr(%fileName, "newLevel.mis") > -1) continue; - if (strstr(%file, "newLevel.mis") > -1) - continue; } - + %this.addMissionFile( %file ); } @@ -92,18 +86,18 @@ function ChooseLevelDlg::onWake( %this ) for (%i = 0; %i < CL_levelList.rowCount(); %i++) { - %preview = new GuiBitmapButtonCtrl() { + %preview = new GuiButtonCtrl() { + profile = "GuiMenuButtonProfile"; internalName = "SmallPreview" @ %i; - Extent = "108 81"; - bitmap = "art/gui/no-preview"; + Extent = "368 35"; + text = getField(CL_levelList.getRowText(%i), 0); command = "ChooseLevelWindow.previewSelected(ChooseLevelWindow->SmallPreviews->SmallPreview" @ %i @ ");"; + buttonType = "RadioButton"; }; ChooseLevelWindow->SmallPreviews.add(%preview); - - // Set this small preview visible - if (%i >= 5) - %preview.setVisible(false); + + %rowText = CL_levelList.getRowText(%i); // Set the level index %preview.levelIndex = %i; @@ -116,7 +110,7 @@ function ChooseLevelDlg::onWake( %this ) %file = getField(CL_levelList.getRowText(%i), 1); // Find the preview image - %levelPreview = filePath(%file) @ "/" @ fileBase(%file) @ "_preview"; + %levelPreview = getField(CL_levelList.getRowText(%i), 3); // Test against all of the different image formats // This should probably be moved into an engine function @@ -128,7 +122,7 @@ function ChooseLevelDlg::onWake( %this ) isFile(%levelPreview @ ".mng") || isFile(%levelPreview @ ".tga")) { - %preview.setBitmap(%levelPreview); + %preview.bitmap = %levelPreview; } // Get the description @@ -172,7 +166,7 @@ function ChooseLevelDlg::onWake( %this ) ChooseLevelWindow->SmallPreviews.refresh(); } - if (ChooseLevelWindow->SmallPreviews.getCount() <= 1) + /*if (ChooseLevelWindow->SmallPreviews.getCount() <= 1) { // Hide the small previews ChooseLevelWindow->SmallPreviews.setVisible(false); @@ -194,8 +188,8 @@ function ChooseLevelDlg::onWake( %this ) %extentY = %extentY + getWord(ChooseLevelWindow->SmallPreviews.getExtent(), 1); %extentY = %extentY + 9; - ChooseLevelWIndow.setExtent(%extentX, %extentY); - } + //ChooseLevelWIndow.setExtent(%extentX, %extentY); + //}*/ } function ChooseLevelDlg::addMissionFile( %this, %file ) @@ -215,10 +209,13 @@ function ChooseLevelDlg::addMissionFile( %this, %file ) if (%LevelInfoObject.desc0 !$= "") %levelDesc = %LevelInfoObject.desc0; + if (%LevelInfoObject.preview !$= "") + %levelPreview = %LevelInfoObject.preview; + %LevelInfoObject.delete(); } - CL_levelList.addRow( CL_levelList.rowCount(), %levelName TAB %file TAB %levelDesc ); + CL_levelList.addRow( CL_levelList.rowCount(), %levelName TAB %file TAB %levelDesc TAB %levelPreview ); } function ChooseLevelDlg::onSleep( %this ) @@ -238,21 +235,38 @@ function ChooseLevelWindow::previewSelected(%this, %preview) // Set the large preview image if (isObject(%preview) && %preview.bitmap !$= "") + { + %this->CurrentPreview.visible = true; %this->CurrentPreview.setBitmap(%preview.bitmap); + } else - %this->CurrentPreview.setBitmap("art/gui/no-preview"); + { + %this->CurrentPreview.visible = false; + } // Set the current level name if (isObject(%preview) && %preview.levelName !$= "") + { + %this->LevelName.visible = true; %this->LevelName.setText(%preview.levelName); + } else - %this->LevelName.setText("Level"); + { + %this->LevelName.visible = false; + } // Set the current level description if (isObject(%preview) && %preview.levelDesc !$= "") + { + %this->LevelDescription.visible = true; + %this->LevelDescriptionLabel.visible = true; %this->LevelDescription.setText(%preview.levelDesc); + } else - %this->LevelDescription.setText("A Torque Level"); + { + %this->LevelDescription.visible = false; + %this->LevelDescriptionLabel.visible = false; + } } function ChooseLevelWindow::previousPreviews(%this) @@ -305,46 +319,24 @@ function ChooseLevelWindow::nextPreviews(%this) } } -//---------------------------------------- -function getLevelInfo( %missionFile ) +// Do this onMouseUp not via Command which occurs onMouseDown so we do +// not have a lingering mouseUp event lingering in the ether. +function ChooseLevelDlgGoBtn::onMouseUp( %this ) { - %file = new FileObject(); - - %LevelInfoObject = ""; - - if ( %file.openForRead( %missionFile ) ) { - %inInfoBlock = false; - - while ( !%file.isEOF() ) { - %line = %file.readLine(); - %line = trim( %line ); - - if( %line $= "new ScriptObject(LevelInfo) {" ) - %inInfoBlock = true; - else if( %line $= "new LevelInfo(theLevelInfo) {" ) - %inInfoBlock = true; - else if( %inInfoBlock && %line $= "};" ) { - %inInfoBlock = false; - %LevelInfoObject = %LevelInfoObject @ %line; - break; - } - - if( %inInfoBlock ) - %LevelInfoObject = %LevelInfoObject @ %line @ " "; - } - - %file.close(); - } - %file.delete(); + // So we can't fire the button when loading is in progress. + if ( isObject( ServerGroup ) ) + return; - if( %LevelInfoObject !$= "" ) - { - %LevelInfoObject = "%LevelInfoObject = " @ %LevelInfoObject; - eval( %LevelInfoObject ); - - return %LevelInfoObject; - } - - // Didn't find our LevelInfo - return 0; + // Launch the chosen level with the editor open? + if ( ChooseLevelDlg.launchInEditor ) + { + activatePackage( "BootEditor" ); + ChooseLevelDlg.launchInEditor = false; + StartGame("", "SinglePlayer"); + } + else + { + StartGame(); + } } + diff --git a/Templates/BaseGame/game/data/ui/scripts/controlsMenu.cs b/Templates/BaseGame/game/data/ui/scripts/controlsMenu.cs new file mode 100644 index 000000000..f9718e647 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/scripts/controlsMenu.cs @@ -0,0 +1,417 @@ +// ============================================================================= +// KEYBINDS MENU +// ============================================================================= +$RemapCount = 0; +$RemapName[$RemapCount] = "Forward"; +$RemapCmd[$RemapCount] = "moveforward"; +$RemapGroup[$RemapCount] = "Movement"; +$RemapCount++; +$RemapName[$RemapCount] = "Backward"; +$RemapCmd[$RemapCount] = "movebackward"; +$RemapGroup[$RemapCount] = "Movement"; +$RemapCount++; +$RemapName[$RemapCount] = "Strafe Left"; +$RemapCmd[$RemapCount] = "moveleft"; +$RemapGroup[$RemapCount] = "Movement"; +$RemapCount++; +$RemapName[$RemapCount] = "Strafe Right"; +$RemapCmd[$RemapCount] = "moveright"; +$RemapGroup[$RemapCount] = "Movement"; +$RemapCount++; +$RemapName[$RemapCount] = "Jump"; +$RemapCmd[$RemapCount] = "jump"; +$RemapGroup[$RemapCount] = "Movement"; +$RemapCount++; + +$RemapName[$RemapCount] = "Fire Weapon"; +$RemapCmd[$RemapCount] = "mouseFire"; +$RemapGroup[$RemapCount] = "Combat"; +$RemapCount++; +$RemapName[$RemapCount] = "Adjust Zoom"; +$RemapCmd[$RemapCount] = "setZoomFov"; +$RemapGroup[$RemapCount] = "Combat"; +$RemapCount++; +$RemapName[$RemapCount] = "Toggle Zoom"; +$RemapCmd[$RemapCount] = "toggleZoom"; +$RemapGroup[$RemapCount] = "Combat"; +$RemapCount++; + +$RemapName[$RemapCount] = "Free Look"; +$RemapCmd[$RemapCount] = "toggleFreeLook"; +$RemapGroup[$RemapCount] = "Miscellaneous"; +$RemapCount++; +$RemapName[$RemapCount] = "Switch 1st/3rd"; +$RemapCmd[$RemapCount] = "toggleFirstPerson"; +$RemapGroup[$RemapCount] = "Miscellaneous"; +$RemapCount++; +$RemapName[$RemapCount] = "Toggle Camera"; +$RemapCmd[$RemapCount] = "toggleCamera"; +$RemapGroup[$RemapCount] = "Miscellaneous"; +$RemapCount++; + +function ControlsMenu::onWake(%this) +{ + ControlSetList.clear(); + ControlSetList.add( "Movement", "Movement" ); + ControlSetList.add( "Combat", "Combat" ); + ControlSetList.add( "Miscellaneous", "Miscellaneous" ); + + ControlSetList.setSelected( "Movement", false ); + + ControlsMenuOptionsArray.clear(); + ControlsMenu.loadGroupKeybinds("Movement"); + ControlsMenuOptionsArray.refresh(); +} + +function ControlSetList::onSelect( %this, %id, %text ) +{ + ControlsMenuOptionsArray.clear(); + + if(%text $= "Movement") + ControlsMenu.loadGroupKeybinds("Movement"); + else if(%text $= "Combat") + ControlsMenu.loadGroupKeybinds("Combat"); + else if(%text $= "Miscellaneous") + ControlsMenu.loadGroupKeybinds("Miscellaneous"); + + ControlsMenuOptionsArray.refresh(); +} + +function ControlsMenuOKButton::onClick(%this) +{ + // write out the control config into the keybinds.cs file + %prefPath = getPrefpath(); + moveMap.save( %prefPath @ "/keybinds.cs" ); + + OptionsMenu.backOut(); +} + +function ControlsMenuDefaultsButton::onClick(%this) +{ + //For this to work with module-style, we have to figure that somewhere, we'll set where our default keybind script is at. + //This can be hardcoded in your actual project. + exec($KeybindPath); + ControlsMenu.reload(); +} + +function ControlsMenu::loadGroupKeybinds(%this, %keybindGroup) +{ + %optionIndex = 0; + for(%i=0; %i < $RemapCount; %i++) + { + //find and add all the keybinds for the particular group we're looking at + if($RemapGroup[%i] $= %keybindGroup) + { + %temp = %this.getKeybindString(%i); + + %option = %this.addKeybindOption(); + %option-->nameText.setText($RemapName[%i]); + %option-->rebindButton.setText(%temp); + %option-->rebindButton.keybindIndex = %i; + %option-->rebindButton.optionIndex = %optionIndex; + %optionIndex++; + } + } +} + +function ControlsMenu::addKeybindOption(%this) +{ + %tamlReader = new Taml(); + + %graphicsOption = %tamlReader.read("data/ui/scripts/guis/controlsMenuSetting.taml"); + + ControlsMenuOptionsArray.add(%graphicsOption); + + return %graphicsOption; +} + +function ControlsMenu::getKeybindString(%this, %index ) +{ + %name = $RemapName[%index]; + %cmd = $RemapCmd[%index]; + + %temp = moveMap.getBinding( %cmd ); + if ( %temp $= "" ) + return %name TAB ""; + + %mapString = ""; + + %count = getFieldCount( %temp ); + for ( %i = 0; %i < %count; %i += 2 ) + { + %device = getField( %temp, %i + 0 ); + %object = getField( %temp, %i + 1 ); + + %displayName = %this.getMapDisplayName( %device, %object ); + + if(%displayName !$= "") + { + %tmpMapString = %this.getMapDisplayName( %device, %object ); + + if(%mapString $= "") + { + %mapString = %tmpMapString; + } + else + { + if ( %tmpMapString !$= "") + { + %mapString = %mapString @ ", " @ %tmpMapString; + } + } + } + } + + return %mapString; +} + +function ControlsMenu::redoMapping( %device, %action, %cmd, %oldIndex, %newIndex ) +{ + //%actionMap.bind( %device, %action, $RemapCmd[%newIndex] ); + moveMap.bind( %device, %action, %cmd ); + + %remapList = %this-->OptRemapList; + %remapList.setRowById( %oldIndex, buildFullMapString( %oldIndex ) ); + %remapList.setRowById( %newIndex, buildFullMapString( %newIndex ) ); +} + +function ControlsMenu::getMapDisplayName( %this, %device, %action ) +{ + if ( %device $= "keyboard" ) + return( %action ); + else if ( strstr( %device, "mouse" ) != -1 ) + { + // Substitute "mouse" for "button" in the action string: + %pos = strstr( %action, "button" ); + if ( %pos != -1 ) + { + %mods = getSubStr( %action, 0, %pos ); + %object = getSubStr( %action, %pos, 1000 ); + %instance = getSubStr( %object, strlen( "button" ), 1000 ); + return( %mods @ "mouse" @ ( %instance + 1 ) ); + } + else + error( "Mouse input object other than button passed to getDisplayMapName!" ); + } + else if ( strstr( %device, "joystick" ) != -1 ) + { + // Substitute "joystick" for "button" in the action string: + %pos = strstr( %action, "button" ); + if ( %pos != -1 ) + { + %mods = getSubStr( %action, 0, %pos ); + %object = getSubStr( %action, %pos, 1000 ); + %instance = getSubStr( %object, strlen( "button" ), 1000 ); + return( %mods @ "joystick" @ ( %instance + 1 ) ); + } + else + { + %pos = strstr( %action, "pov" ); + if ( %pos != -1 ) + { + %wordCount = getWordCount( %action ); + %mods = %wordCount > 1 ? getWords( %action, 0, %wordCount - 2 ) @ " " : ""; + %object = getWord( %action, %wordCount - 1 ); + switch$ ( %object ) + { + case "upov": %object = "POV1 up"; + case "dpov": %object = "POV1 down"; + case "lpov": %object = "POV1 left"; + case "rpov": %object = "POV1 right"; + case "upov2": %object = "POV2 up"; + case "dpov2": %object = "POV2 down"; + case "lpov2": %object = "POV2 left"; + case "rpov2": %object = "POV2 right"; + default: %object = ""; + } + return( %mods @ %object ); + } + else + error( "Unsupported Joystick input object passed to getDisplayMapName!" ); + } + } + + return( "" ); +} + +function ControlsMenu::buildFullMapString( %this, %index ) +{ + %name = $RemapName[%index]; + %cmd = $RemapCmd[%index]; + + %temp = moveMap.getBinding( %cmd ); + if ( %temp $= "" ) + return %name TAB ""; + + %mapString = ""; + + %count = getFieldCount( %temp ); + for ( %i = 0; %i < %count; %i += 2 ) + { + if ( %mapString !$= "" ) + %mapString = %mapString @ ", "; + + %device = getField( %temp, %i + 0 ); + %object = getField( %temp, %i + 1 ); + %mapString = %mapString @ %this.getMapDisplayName( %device, %object ); + } + + return %name TAB %mapString; +} + +function ControlsMenu::fillRemapList( %this ) +{ + %remapList = %this-->OptRemapList; + + %remapList.clear(); + for ( %i = 0; %i < $RemapCount; %i++ ) + %remapList.addRow( %i, %this.buildFullMapString( %i ) ); +} + +function ControlsMenu::doRemap( %this ) +{ + %remapList = %this-->OptRemapList; + + %selId = %remapList.getSelectedId(); + %name = $RemapName[%selId]; + + RemapDlg-->OptRemapText.setValue( "Re-bind \"" @ %name @ "\" to..." ); + OptRemapInputCtrl.index = %selId; + Canvas.pushDialog( RemapDlg ); +} + +function ControlsMenuRebindButton::onClick(%this) +{ + %name = $RemapName[%this.keybindIndex]; + RemapDlg-->OptRemapText.setValue( "Re-bind \"" @ %name @ "\" to..." ); + + OptRemapInputCtrl.index = %this.keybindIndex; + OptRemapInputCtrl.optionIndex = %this.optionIndex; + Canvas.pushDialog( RemapDlg ); +} + +function OptRemapInputCtrl::onInputEvent( %this, %device, %action ) +{ + //error( "** onInputEvent called - device = " @ %device @ ", action = " @ %action @ " **" ); + Canvas.popDialog( RemapDlg ); + + // Test for the reserved keystrokes: + if ( %device $= "keyboard" ) + { + // Cancel... + if ( %action $= "escape" ) + { + // Do nothing... + return; + } + } + + %cmd = $RemapCmd[%this.index]; + %name = $RemapName[%this.index]; + + // Grab the friendly display name for this action + // which we'll use when prompting the user below. + %mapName = ControlsMenu.getMapDisplayName( %device, %action ); + + // Get the current command this action is mapped to. + %prevMap = moveMap.getCommand( %device, %action ); + + // If nothing was mapped to the previous command + // mapping then it's easy... just bind it. + if ( %prevMap $= "" ) + { + ControlsMenu.unbindExtraActions( %cmd, 1 ); + moveMap.bind( %device, %action, %cmd ); + + //ControlsMenu.reload(); + %newCommands = getField(ControlsMenu.buildFullMapString( %this.index ), 1); + ControlsMenuOptionsArray.getObject(%this.optionIndex)-->rebindButton.setText(%newCommands); + return; + } + + // If the previous command is the same as the + // current then they hit the same input as what + // was already assigned. + if ( %prevMap $= %cmd ) + { + ControlsMenu.unbindExtraActions( %cmd, 0 ); + moveMap.bind( %device, %action, %cmd ); + + //ControlsMenu.reload(); + %newCommands = getField(ControlsMenu.buildFullMapString( %this.index ), 1); + ControlsMenuOptionsArray.getObject(%this.optionIndex)-->rebindButton.setText(%newCommands); + return; + } + + // Look for the index of the previous mapping. + %prevMapIndex = ControlsMenu.findRemapCmdIndex( %prevMap ); + + // If we get a negative index then the previous + // mapping was to an item that isn't included in + // the mapping list... so we cannot unmap it. + if ( %prevMapIndex == -1 ) + { + MessageBoxOK( "Remap Failed", "\"" @ %mapName @ "\" is already bound to a non-remappable command!" ); + return; + } + + // Setup the forced remapping callback command. + %callback = "redoMapping(" @ %device @ ", \"" @ %action @ "\", \"" @ + %cmd @ "\", " @ %prevMapIndex @ ", " @ %this.index @ ");"; + + // Warn that we're about to remove the old mapping and + // replace it with another. + %prevCmdName = $RemapName[%prevMapIndex]; + Canvas.pushDialog( RemapConfirmDlg ); + + RemapConfirmationText.setText("\"" @ %mapName @ "\" is already bound to \"" + @ %prevCmdName @ "\"! Do you wish to replace this mapping?"); + RemapConfirmationYesButton.command = "ControlsMenu.redoMapping(" @ %device @ ", \"" @ %action @ "\", \"" @ + %cmd @ "\", " @ %prevMapIndex @ ", " @ %this.index @ "); Canvas.popDialog();"; + RemapConfirmationNoButton.command = "Canvas.popDialog();"; + + /*MessageBoxYesNo( "Warning", + "\"" @ %mapName @ "\" is already bound to \"" + @ %prevCmdName @ "\"!\nDo you wish to replace this mapping?", + %callback, "" );*/ +} + +function ControlsMenu::findRemapCmdIndex( %this, %command ) +{ + for ( %i = 0; %i < $RemapCount; %i++ ) + { + if ( %command $= $RemapCmd[%i] ) + return( %i ); + } + return( -1 ); +} + +/// This unbinds actions beyond %count associated to the +/// particular moveMap %commmand. +function ControlsMenu::unbindExtraActions( %this, %command, %count ) +{ + %temp = moveMap.getBinding( %command ); + if ( %temp $= "" ) + return; + + %count = getFieldCount( %temp ) - ( %count * 2 ); + for ( %i = 0; %i < %count; %i += 2 ) + { + %device = getField( %temp, %i + 0 ); + %action = getField( %temp, %i + 1 ); + + moveMap.unbind( %device, %action ); + } +} + +function ControlsMenu::redoMapping( %this, %device, %action, %cmd, %oldIndex, %newIndex ) +{ + //%actionMap.bind( %device, %action, $RemapCmd[%newIndex] ); + moveMap.bind( %device, %action, %cmd ); + + %remapList = %this-->OptRemapList; + %remapList.setRowById( %oldIndex, %this.buildFullMapString( %oldIndex ) ); + %remapList.setRowById( %newIndex, %this.buildFullMapString( %newIndex ) ); + + %this.changeSettingsPage(); +} \ No newline at end of file diff --git a/Templates/Empty/game/core/scripts/gui/cursors.cs b/Templates/BaseGame/game/data/ui/scripts/cursors.cs similarity index 100% rename from Templates/Empty/game/core/scripts/gui/cursors.cs rename to Templates/BaseGame/game/data/ui/scripts/cursors.cs diff --git a/Templates/Empty/game/art/lights/materials.cs b/Templates/BaseGame/game/data/ui/scripts/datablocks/guiSounds.cs similarity index 83% rename from Templates/Empty/game/art/lights/materials.cs rename to Templates/BaseGame/game/data/ui/scripts/datablocks/guiSounds.cs index 5371f3098..0e8534eec 100644 --- a/Templates/Empty/game/art/lights/materials.cs +++ b/Templates/BaseGame/game/data/ui/scripts/datablocks/guiSounds.cs @@ -19,12 +19,16 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. //----------------------------------------------------------------------------- - -singleton Material( Corona_Mat ) +singleton SFXProfile(menuButtonPressed) { - emissive = true; - translucent = true; - mapTo = "corona.png"; - diffuseMap[0] = "./corona.png"; - materialTag0 = "FX"; + preload = true; + description = AudioGui; + fileName = "data/ui/sound/buttonClick"; }; + +singleton SFXProfile(menuButtonHover) +{ + preload = true; + description = AudioGui; + fileName = "data/ui/sound/buttonHover"; +}; \ No newline at end of file diff --git a/Templates/BaseGame/game/data/ui/scripts/graphicsMenu.cs b/Templates/BaseGame/game/data/ui/scripts/graphicsMenu.cs new file mode 100644 index 000000000..7189d11c2 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/scripts/graphicsMenu.cs @@ -0,0 +1,567 @@ +// ============================================================================= +// GRAPHICS MENU +// ============================================================================= +//Mesh and Textures +// +function GraphicsMenu::onWake(%this) +{ + DisplaySettingsMenu.hidden = false; + GeneralGraphicsSettingsMenu.hidden = true; + + %this.refresh(); +} + +function GraphicsMenu::refresh(%this) +{ + // + // Display Menu + GraphicsMenuFullScreen.setStateOn( Canvas.isFullScreen() ); + GraphicsMenuVSync.setStateOn( !$pref::Video::disableVerticalSync ); + + %this.initResMenu(); + %resSelId = GraphicsMenuResolution.findText( _makePrettyResString( $pref::Video::mode ) ); + if( %resSelId != -1 ) + GraphicsMenuResolution.setSelected( %resSelId ); + + GraphicsMenuDriver.clear(); + + %buffer = getDisplayDeviceList(); + %count = getFieldCount( %buffer ); + for(%i = 0; %i < %count; %i++) + GraphicsMenuDriver.add(getField(%buffer, %i), %i); + + %selId = GraphicsMenuDriver.findText( getDisplayDeviceInformation() ); + if ( %selId == -1 ) + GraphicsMenuDriver.setFirstSelected(); + else + GraphicsMenuDriver.setSelected( %selId ); + // + + // + // General Graphics menu + GraphicsMenuShadowQlty.init(ShadowQualityList); + GraphicsMenuSoftShadow.init(SoftShadowList); + + GraphicsMenuModelDtl.init(MeshQualityGroup); + GraphicsMenuTextureDtl.init(TextureQualityGroup); + GraphicsMenuTerrainDtl.init(TerrainQualityGroup); + GraphicsMenuDecalLife.init(DecalLifetimeGroup); + GraphicsMenuGroundClutter.init(GroundCoverDensityGroup); + + GraphicsMenuMaterialQlty.init(ShaderQualityGroup); + + // Setup the anisotropic filtering menu. + %ansioCtrl = GraphicsMenuAniso; + %ansioCtrl.clear(); + %ansioCtrl.add( "16X", 16 ); + %ansioCtrl.add( "8X", 8 ); + %ansioCtrl.add( "4X", 4 ); + %ansioCtrl.add( "Off", 0 ); + %ansioCtrl.setSelected( $pref::Video::defaultAnisotropy, false ); + + // set up the Refresh Rate menu. + %refreshMenu = GraphicsMenuRefreshRate; + %refreshMenu.clear(); + // %refreshMenu.add("Auto", 60); + %refreshMenu.add("60", 60); + %refreshMenu.add("75", 75); + %refreshMenu.setSelected( $pref::Video::RefreshRate ); + + // Populate the Anti-aliasing popup. + %aaMenu = GraphicsMenuAA; + %aaMenu.clear(); + %aaMenu.Add( "4x", 4 ); + %aaMenu.Add( "2x", 2 ); + %aaMenu.Add( "1x", 1 ); + %aaMenu.Add( "Off", 0 ); + %aaMenu.setSelected( $pref::Video::AA ); + + //Parallax + GraphicsMenuParallax.setStateOn(!$pref::Video::disableParallaxMapping); + + //water reflections + GraphicsMenuWaterRefl.setStateOn(!$pref::Water::disableTrueReflections); + + GraphicsMenuParallax.setStateOn(!$pref::Video::disableParallaxMapping); + + GraphicsMenuAO.setStateOn($pref::PostFX::EnableSSAO); + GraphicsMenuHDR.setStateOn($pref::PostFX::EnableHDR); + GraphicsMenuDOF.setStateOn($pref::PostFX::EnableDOF); + GraphicsMenuVignette.setStateOn($pref::PostFX::EnableVignette); + GraphicsMenuLightRay.setStateOn($pref::PostFX::EnableLightRays); +} + +function GraphicsMenuOKButton::onClick(%this) +{ + //save the settings and then back out + GraphicsMenu.apply(); + OptionsMenu.backOut(); +} + +function GraphicsMenu::initResMenu( %this ) +{ + // Clear out previous values + %resMenu = GraphicsMenuResolution; + %resMenu.clear(); + + // If we are in a browser then we can't change our resolution through + // the options dialog + if (getWebDeployment()) + { + %count = 0; + %currRes = getWords(Canvas.getVideoMode(), $WORD::RES_X, $WORD::RES_Y); + %resMenu.add(%currRes, %count); + %count++; + + return; + } + + // Loop through all and add all valid resolutions + %count = 0; + %resCount = Canvas.getModeCount(); + for (%i = 0; %i < %resCount; %i++) + { + %testResString = Canvas.getMode( %i ); + %testRes = _makePrettyResString( %testResString ); + + // Only add to list if it isn't there already. + if (%resMenu.findText(%testRes) == -1) + { + %resMenu.add(%testRes, %i); + %count++; + } + } + + %resMenu.sort(); +} + +function GraphicsQualityPopup::init( %this, %qualityGroup ) +{ + assert( isObject( %this ) ); + assert( isObject( %qualityGroup ) ); + + %this.qualityGroup = %qualityGroup; + + // Clear the existing content first. + %this.clear(); + + // Fill it. + %select = -1; + for ( %i=0; %i < %qualityGroup.getCount(); %i++ ) + { + %level = %qualityGroup.getObject( %i ); + if ( %level.isCurrent() ) + %select = %i; + + %this.add( %level.displayName, %i ); + } + + // Setup a default selection. + if ( %select == -1 ) + %this.setText( "Custom" ); + else + %this.setSelected( %select ); +} + +function GraphicsQualityPopup::apply( %this ) +{ + %levelName = %this.getText(); + %this.qualityGroup.applySetting(%levelName); +} +// +function GraphicsMenu::Autodetect(%this) +{ + $pref::Video::autoDetect = false; + + %shaderVer = getPixelShaderVersion(); + %intel = ( strstr( strupr( getDisplayDeviceInformation() ), "INTEL" ) != -1 ) ? true : false; + %videoMem = GFXCardProfilerAPI::getVideoMemoryMB(); + + return %this.Autodetect_Apply( %shaderVer, %intel, %videoMem ); +} + +function GraphicsMenu::Autodetect_Apply(%this, %shaderVer, %intel, %videoMem ) +{ + if ( %shaderVer < 2.0 ) + { + return "Your video card does not meet the minimum requirment of shader model 2.0."; + } + + if ( %shaderVer < 3.0 || %intel ) + { + // Allow specular and normals for 2.0a and 2.0b + if ( %shaderVer > 2.0 ) + { + MeshQualityGroup.applySetting("Lowest"); + TextureQualityGroup.applySetting("Lowest"); + GroundCoverDensityGroup.applySetting("Lowest"); + DecalLifetimeGroup.applySetting("None"); + TerrainQualityGroup.applySetting("Lowest"); + ShaderQualityGroup.applySetting("High"); + + ShadowQualityList.applySetting("None"); + + SoftShadowList.applySetting("Off"); + + $pref::Shadows::useShadowCaching = true; + + $pref::Water::disableTrueReflections = true; + $pref::Video::disableParallaxMapping = true; + $pref::PostFX::EnableSSAO = false; + $pref::PostFX::EnableHDR = false; + $pref::PostFX::EnableDOF = false; + $pref::PostFX::EnableLightRays = false; + $pref::PostFX::EnableVignette = false; + + $pref::Video::AA = 0; + $pref::Video::disableVerticalSync = 0; + } + else + { + MeshQualityGroup.applySetting("Lowest"); + TextureQualityGroup.applySetting("Lowest"); + GroundCoverDensityGroup.applySetting("Lowest"); + DecalLifetimeGroup.applySetting("None"); + TerrainQualityGroup.applySetting("Lowest"); + ShaderQualityGroup.applySetting("Low"); + + ShadowQualityList.applySetting("None"); + + SoftShadowList.applySetting("Off"); + + $pref::Shadows::useShadowCaching = true; + + $pref::Water::disableTrueReflections = true; + $pref::Video::disableParallaxMapping = true; + $pref::PostFX::EnableSSAO = false; + $pref::PostFX::EnableHDR = false; + $pref::PostFX::EnableDOF = false; + $pref::PostFX::EnableLightRays = false; + $pref::PostFX::EnableVignette = false; + + $pref::Video::AA = 0; + $pref::Video::disableVerticalSync = 0; + } + } + else + { + if ( %videoMem > 1000 ) + { + MeshQualityGroup.applySetting("High"); + TextureQualityGroup.applySetting("High"); + GroundCoverDensityGroup.applySetting("High"); + DecalLifetimeGroup.applySetting("High"); + TerrainQualityGroup.applySetting("High"); + ShaderQualityGroup.applySetting("High"); + + ShadowQualityList.applySetting("High"); + + SoftShadowList.applySetting("High"); + + //Should this default to on in ultra settings? + $pref::Shadows::useShadowCaching = true; + + $pref::Water::disableTrueReflections = false; + $pref::Video::disableParallaxMapping = false; + $pref::PostFX::EnableSSAO = true; + $pref::PostFX::EnableHDR = true; + $pref::PostFX::EnableDOF = true; + $pref::PostFX::EnableLightRays = true; + $pref::PostFX::EnableVignette = true; + + $pref::Video::AA = 4; + $pref::Video::disableVerticalSync = 16; + } + else if ( %videoMem > 400 || %videoMem == 0 ) + { + MeshQualityGroup.applySetting("Medium"); + TextureQualityGroup.applySetting("Medium"); + GroundCoverDensityGroup.applySetting("Medium"); + DecalLifetimeGroup.applySetting("Medium"); + TerrainQualityGroup.applySetting("Medium"); + ShaderQualityGroup.applySetting("High"); + + ShadowQualityList.applySetting("Medium"); + + SoftShadowList.applySetting("Low"); + + $pref::Shadows::useShadowCaching = true; + + $pref::Water::disableTrueReflections = false; + $pref::Video::disableParallaxMapping = true; + $pref::PostFX::EnableSSAO = false; + $pref::PostFX::EnableHDR = true; + $pref::PostFX::EnableDOF = true; + $pref::PostFX::EnableLightRays = true; + $pref::PostFX::EnableVignette = true; + + $pref::Video::AA = 4; + $pref::Video::disableVerticalSync = 4; + + if ( %videoMem == 0 ) + return "Torque was unable to detect available video memory. Applying 'Medium' quality."; + } + else + { + MeshQualityGroup.applySetting("Low"); + TextureQualityGroup.applySetting("Low"); + GroundCoverDensityGroup.applySetting("Low"); + DecalLifetimeGroup.applySetting("Low"); + TerrainQualityGroup.applySetting("Low"); + ShaderQualityGroup.applySetting("Low"); + + ShadowQualityList.applySetting("None"); + + SoftShadowList.applySetting("Off"); + + $pref::Shadows::useShadowCaching = true; + + $pref::Water::disableTrueReflections = false; + $pref::Video::disableParallaxMapping = true; + $pref::PostFX::EnableSSAO = false; + $pref::PostFX::EnableHDR = false; + $pref::PostFX::EnableDOF = false; + $pref::PostFX::EnableLightRays = false; + $pref::PostFX::EnableVignette = false; + + $pref::Video::AA = 0; + $pref::Video::disableVerticalSync = 0; + } + } + + %this.refresh(); + + %this.apply(); + + //force postFX updates + PostFXManager.settingsEffectSetEnabled("SSAO", $pref::PostFX::EnableSSAO); + PostFXManager.settingsEffectSetEnabled("HDR", $pref::PostFX::EnableHDR); + PostFXManager.settingsEffectSetEnabled("DOF", $pref::PostFX::EnableDOF); + PostFXManager.settingsEffectSetEnabled("LightRays", $pref::PostFX::EnableLightRays); + PostFXManager.settingsEffectSetEnabled("Vignette", $pref::PostFX::EnableVignette); + + return "Graphics quality settings have been auto detected."; +} + +function _makePrettyResString( %resString ) +{ + %width = getWord( %resString, $WORD::RES_X ); + %height = getWord( %resString, $WORD::RES_Y ); + + %aspect = %width / %height; + %aspect = mRound( %aspect * 100 ) * 0.01; + + switch$( %aspect ) + { + case "1.33": + %aspect = "4:3"; + case "1.78": + %aspect = "16:9"; + default: + %aspect = ""; + } + + %outRes = %width @ " x " @ %height; + if ( %aspect !$= "" ) + %outRes = %outRes @ " (" @ %aspect @ ")"; + + return %outRes; +} + +// +function GraphicsMenuSetting::init( %this ) +{ + assert( isObject( %this ) ); + assert( isObject( %this.qualitySettingGroup ) ); + + // Fill it. + %select = -1; + %selectedName = ""; + for ( %i=0; %i < %this.qualitySettingGroup.getCount(); %i++ ) + { + %level = %this.qualitySettingGroup.getObject( %i ); + + %levelName = %level.displayName; + if ( %level.isCurrent() ) + { + %select = %i; + %selectedName = %level.displayName; + } + } + + // Setup a default selection. + if ( %select == -1 ) + { + %this-->SettingText.setText( "Custom" ); + %this.selectedLevel = %this.qualitySettingGroup.getCount(); + } + else + { + %this-->SettingText.setText(%selectedName); + %this.selectedLevel = %select; + } +} + +function GraphicsQualityLevel::isCurrent( %this ) +{ + // Test each pref to see if the current value + // equals our stored value. + + for ( %i=0; %i < %this.count(); %i++ ) + { + %pref = %this.getKey( %i ); + %value = %this.getValue( %i ); + + if ( getVariable( %pref ) !$= %value ) + return false; + } + + return true; +} + +function GraphicsQualityLevel::apply( %this ) +{ + for ( %i=0; %i < %this.count(); %i++ ) + { + %pref = %this.getKey( %i ); + %value = %this.getValue( %i ); + setVariable( %pref, %value ); + } + + // If we have an overloaded onApply method then + // call it now to finalize the changes. + if ( %this.isMethod( "onApply" ) ) + %this.onApply(); + else + { + %group = %this.getGroup(); + if ( isObject( %group ) && %group.isMethod( "onApply" ) ) + %group.onApply( %this ); + } +} + +function GraphicsOptionsMenuGroup::applySetting(%this, %settingName) +{ + for(%i=0; %i < %this.getCount(); %i++) + { + %setting = %this.getObject(%i); + if(%setting.displayName $= %settingName) + { + for ( %s=0; %s < %setting.count(); %s++ ) + { + %pref = %setting.getKey( %s ); + %value = %setting.getValue( %s ); + setVariable( %pref, %value ); + } + } + } +} + +function GraphicsMenu::apply(%this) +{ + %newAdapter = GraphicsMenuDriver.getText(); + %numAdapters = GFXInit::getAdapterCount(); + %newDevice = $pref::Video::displayDevice; + + for( %i = 0; %i < %numAdapters; %i ++ ) + { + if( GFXInit::getAdapterName( %i ) $= %newAdapter ) + { + %newDevice = GFXInit::getAdapterType( %i ); + break; + } + } + + // Change the device. + if ( %newDevice !$= $pref::Video::displayDevice ) + { + if ( %testNeedApply ) + return true; + + $pref::Video::displayDevice = %newDevice; + if( %newAdapter !$= getDisplayDeviceInformation() ) + MessageBoxOK( "Change requires restart", "Please restart the game for a display device change to take effect." ); + } + + GraphicsMenuShadowQlty.apply(); + GraphicsMenuSoftShadow.apply(); + + GraphicsMenuModelDtl.apply(); + GraphicsMenuTextureDtl.apply(); + GraphicsMenuTerrainDtl.apply(); + GraphicsMenuDecalLife.apply(); + GraphicsMenuGroundClutter.apply(); + + GraphicsMenuMaterialQlty.apply(); + + //Update Textures + reloadTextures(); + + //Update lighting + // Set the light manager. This should do nothing + // if its already set or if its not compatible. + setLightManager( $pref::lightManager ); + + PostFXManager.settingsEffectSetEnabled("SSAO", $pref::PostFX::EnableSSAO); + PostFXManager.settingsEffectSetEnabled("HDR", $pref::PostFX::EnableHDR); + PostFXManager.settingsEffectSetEnabled("DOF", $pref::PostFX::EnableDOF); + PostFXManager.settingsEffectSetEnabled("LightRays", $pref::PostFX::EnableLightRays); + PostFXManager.settingsEffectSetEnabled("Vignette", $pref::PostFX::EnableVignette); + + $pref::Video::disableParallaxMapping = !GraphicsMenuParallax.isStateOn(); + + //water reflections + $pref::Water::disableTrueReflections = !GraphicsMenuWaterRefl.isStateOn(); + + //Update the display settings now + $pref::Video::Resolution = getWords( Canvas.getMode( GraphicsMenuResolution.getSelected() ), $WORD::RES_X, $WORD::RES_Y ); + %newBpp = 32; // ... its not 1997 anymore. + $pref::Video::FullScreen = GraphicsMenuFullScreen.isStateOn() ? "true" : "false"; + $pref::Video::RefreshRate = GraphicsMenuRefreshRate.getSelected(); + $pref::Video::disableVerticalSync = !GraphicsMenuVSync.isStateOn(); + $pref::Video::AA = GraphicsMenuAA.getSelected(); + + if ( %newFullScreen $= "false" ) + { + // If we're in windowed mode switch the fullscreen check + // if the resolution is bigger than the desktop. + %deskRes = getDesktopResolution(); + %deskResX = getWord(%deskRes, $WORD::RES_X); + %deskResY = getWord(%deskRes, $WORD::RES_Y); + if ( getWord( %newRes, $WORD::RES_X ) > %deskResX || + getWord( %newRes, $WORD::RES_Y ) > %deskResY ) + { + $pref::Video::FullScreen = "true"; + GraphicsMenuFullScreen.setStateOn( true ); + } + } + + // Build the final mode string. + %newMode = $pref::Video::Resolution SPC $pref::Video::FullScreen SPC %newBpp SPC $pref::Video::RefreshRate SPC $pref::Video::AA; + + // Change the video mode. + if ( %newMode !$= $pref::Video::mode || + %newVsync != $pref::Video::disableVerticalSync ) + { + if ( %testNeedApply ) + return true; + + $pref::Video::mode = %newMode; + $pref::Video::disableVerticalSync = %newVsync; + configureCanvas(); + } + + // Check the anisotropic filtering. + %level = GraphicsMenuAniso.getSelected(); + if ( %level != $pref::Video::defaultAnisotropy ) + { + if ( %testNeedApply ) + return true; + + $pref::Video::defaultAnisotropy = %level; + } + + echo("Exporting client prefs"); + %prefPath = getPrefpath(); + export("$pref::*", %prefPath @ "/clientPrefs.cs", false); +} \ No newline at end of file diff --git a/Templates/Empty/game/core/scripts/gui/guiMusicPlayer.cs b/Templates/BaseGame/game/data/ui/scripts/guiMusicPlayer.cs similarity index 100% rename from Templates/Empty/game/core/scripts/gui/guiMusicPlayer.cs rename to Templates/BaseGame/game/data/ui/scripts/guiMusicPlayer.cs diff --git a/Templates/Empty/game/core/scripts/gui/guiTreeViewCtrl.cs b/Templates/BaseGame/game/data/ui/scripts/guiTreeViewCtrl.cs similarity index 100% rename from Templates/Empty/game/core/scripts/gui/guiTreeViewCtrl.cs rename to Templates/BaseGame/game/data/ui/scripts/guiTreeViewCtrl.cs diff --git a/Templates/Empty/game/core/scripts/gui/FileDialog.gui b/Templates/BaseGame/game/data/ui/scripts/guis/FileDialog.gui similarity index 100% rename from Templates/Empty/game/core/scripts/gui/FileDialog.gui rename to Templates/BaseGame/game/data/ui/scripts/guis/FileDialog.gui diff --git a/Templates/Empty/game/core/scripts/gui/messageBoxes/IODropdownDlg.ed.gui b/Templates/BaseGame/game/data/ui/scripts/guis/IODropdownDlg.ed.gui similarity index 100% rename from Templates/Empty/game/core/scripts/gui/messageBoxes/IODropdownDlg.ed.gui rename to Templates/BaseGame/game/data/ui/scripts/guis/IODropdownDlg.ed.gui diff --git a/Templates/Empty/game/core/art/gui/RecordingsDlg.gui b/Templates/BaseGame/game/data/ui/scripts/guis/RecordingsDlg.gui similarity index 100% rename from Templates/Empty/game/core/art/gui/RecordingsDlg.gui rename to Templates/BaseGame/game/data/ui/scripts/guis/RecordingsDlg.gui diff --git a/Templates/BaseGame/game/data/ui/scripts/guis/chooseLevelDlg.gui b/Templates/BaseGame/game/data/ui/scripts/guis/chooseLevelDlg.gui new file mode 100644 index 000000000..bcf9b1747 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/scripts/guis/chooseLevelDlg.gui @@ -0,0 +1,272 @@ +//--- OBJECT WRITE BEGIN --- +%guiContent = new GuiControl(ChooseLevelDlg) { + position = "0 0"; + extent = "1280 1024"; + minExtent = "8 8"; + horizSizing = "width"; + vertSizing = "height"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "1"; + enabled = "1"; + launchInEditor = "0"; + returnGui = "MainMenuGui"; + + new GuiControl(ChooseLevelWindow) { + position = "80 36"; + extent = "770 616"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiBitmapCtrl() { + bitmap = "data/ui/scripts/guis/art/no-preview"; + color = "255 255 255 255"; + wrap = "0"; + position = "369 31"; + extent = "400 300"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "0"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "CurrentPreview"; + hidden = "1"; + canSave = "1"; + canSaveDynamicFields = "1"; + enabled = "1"; + }; + new GuiTextCtrl() { + text = "Empty Room"; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "370 335"; + extent = "90 18"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "0"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "levelName"; + hidden = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Description:"; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "370 354"; + extent = "91 18"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "0"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "LevelDescriptionLabel"; + hidden = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiMLTextCtrl() { + lineSpacing = "2"; + allowColorChars = "0"; + maxChars = "-1"; + useURLMouseCursor = "0"; + position = "370 380"; + extent = "165 14"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMLWhiteTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "LevelDescription"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiBitmapButtonCtrl() { + bitmap = "data/ui/scripts/guis/art/previous-button"; + bitmapMode = "Stretched"; + autoFitExtents = "0"; + useModifiers = "0"; + useStates = "1"; + masked = "0"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "2 -1"; + extent = "368 33"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "0"; + active = "1"; + command = "ChooseLevelWindow.previousPreviews();"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "PreviousSmallPreviews"; + hidden = "1"; + canSave = "1"; + canSaveDynamicFields = "1"; + enabled = "1"; + wrap = "0"; + }; + new GuiBitmapButtonCtrl() { + bitmap = "data/ui/scripts/guis/art/next-button"; + bitmapMode = "Stretched"; + autoFitExtents = "0"; + useModifiers = "0"; + useStates = "1"; + masked = "0"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "-3 549"; + extent = "374 33"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "0"; + active = "1"; + command = "ChooseLevelWindow.nextPreviews();"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "NextSmallPreviews"; + hidden = "1"; + canSave = "1"; + canSaveDynamicFields = "1"; + enabled = "1"; + wrap = "0"; + }; + new GuiTextListCtrl(CL_levelList) { + columns = "0"; + fitParentWidth = "1"; + clipColumnText = "0"; + position = "-7 1"; + extent = "80 30"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiTextArrayProfile"; + visible = "0"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + hidden = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiDynamicCtrlArrayControl() { + colCount = "1"; + colSize = "368"; + rowCount = "14"; + rowSize = "35"; + rowSpacing = "0"; + colSpacing = "10"; + frozen = "0"; + autoCellSize = "1"; + fillRowFirst = "0"; + dynamicSize = "0"; + padding = "0 0 0 0"; + position = "2 33"; + extent = "368 516"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + internalName = "SmallPreviews"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl(ChooseLevelDlgGoBtn) { + text = "Start Level"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "371 583"; + extent = "399 33"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl(ChooseLevelDlgBackBtn) { + text = "Return to Menu"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "0 583"; + extent = "371 33"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + command = "Canvas.popDialog(ChooseLevelDlg);\n\nif(isObject(ChooseLevelDlg.returnGui) && ChooseLevelDlg.returnGui.isMethod(\"onReturnTo\")) ChooseLevelDlg.returnGui.onReturnTo();"; + accelerator = "escape"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; +}; +//--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/data/ui/scripts/guis/controlsMenuSetting.taml b/Templates/BaseGame/game/data/ui/scripts/guis/controlsMenuSetting.taml new file mode 100644 index 000000000..f0da59eed --- /dev/null +++ b/Templates/BaseGame/game/data/ui/scripts/guis/controlsMenuSetting.taml @@ -0,0 +1,102 @@ + + + + + + + diff --git a/Templates/BaseGame/game/data/ui/scripts/guis/graphicsMenuSettingsCtrl.taml b/Templates/BaseGame/game/data/ui/scripts/guis/graphicsMenuSettingsCtrl.taml new file mode 100644 index 000000000..b5beaf713 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/scripts/guis/graphicsMenuSettingsCtrl.taml @@ -0,0 +1,159 @@ + + + + + + + + + + diff --git a/Templates/BaseGame/game/data/ui/scripts/guis/graphicsMenuSettingsSlider.taml b/Templates/BaseGame/game/data/ui/scripts/guis/graphicsMenuSettingsSlider.taml new file mode 100644 index 000000000..4bbc1c982 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/scripts/guis/graphicsMenuSettingsSlider.taml @@ -0,0 +1,140 @@ + + + + + + + + + diff --git a/Templates/Empty/game/core/scripts/gui/guiMusicPlayer.gui b/Templates/BaseGame/game/data/ui/scripts/guis/guiMusicPlayer.gui similarity index 100% rename from Templates/Empty/game/core/scripts/gui/guiMusicPlayer.gui rename to Templates/BaseGame/game/data/ui/scripts/guis/guiMusicPlayer.gui diff --git a/Templates/BaseGame/game/data/ui/scripts/guis/joinServerMenu.gui b/Templates/BaseGame/game/data/ui/scripts/guis/joinServerMenu.gui new file mode 100644 index 000000000..96545c438 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/scripts/guis/joinServerMenu.gui @@ -0,0 +1,455 @@ +//--- OBJECT WRITE BEGIN --- +%guiContent = new GuiControl(JoinServerMenu) { + position = "0 0"; + extent = "1024 768"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "1"; + + new GuiControl(JoinServerWindow) { + position = "80 36"; + extent = "800 616"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl(JS_status) { + text = "No servers found."; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "277 31"; + extent = "148 18"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiScrollCtrl() { + willFirstRespond = "1"; + hScrollBar = "dynamic"; + vScrollBar = "alwaysOn"; + lockHorizScroll = "0"; + lockVertScroll = "0"; + constantThumbHeight = "0"; + childMargin = "0 0"; + mouseWheelScrollSpeed = "-1"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "10 80"; + extent = "780 461"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuScrollProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextListCtrl(JS_serverList) { + columns = "0 200 270 335 400"; + fitParentWidth = "1"; + clipColumnText = "0"; + position = "1 1"; + extent = "762 8"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiTextArrayProfile"; + visible = "1"; + active = "1"; + altCommand = "JoinServerDlg.join();"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiTextEditCtrl() { + historySize = "0"; + tabComplete = "0"; + sinkAllKeyEvents = "0"; + password = "0"; + passwordMask = "*"; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "116 31"; + extent = "144 18"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiTextEditProfile"; + visible = "1"; + active = "1"; + variable = "$pref::Player::Name"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Player Name:"; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "12 31"; + extent = "98 18"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Players"; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "269 59"; + extent = "36 18"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMLWhiteTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Version"; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "335 59"; + extent = "38 18"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMLWhiteTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Game"; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "412 59"; + extent = "28 18"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMLWhiteTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Ping"; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "212 59"; + extent = "20 18"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMLWhiteTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Server Name"; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "12 59"; + extent = "63 18"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMLWhiteTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiControl(JS_queryStatus) { + position = "10 541"; + extent = "778 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "0"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + hidden = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiProgressCtrl(JS_statusBar) { + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "84 0"; + extent = "695 35"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiProgressProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl(JS_cancelQuery) { + text = "Cancel!"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "0 0"; + extent = "84 35"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + command = "JoinServerDlg.cancel();"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl(JS_statusText) { + text = "Querying master server"; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "84 0"; + extent = "695 35"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiButtonCtrl(JoinServerBackBtn) { + text = "Return to Menu"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "0 583"; + extent = "160 33"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + command = "Canvas.popDialog(JoinServerMenu);\n\nif(isObject(JoinServerMenu.returnGui) && JoinServerMenu.returnGui.isMethod(\"onReturnTo\")) JoinServerMenu.returnGui.onReturnTo();"; + accelerator = "escape"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl(JoinServerQryLanBtn) { + text = "Query Lan"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "160 583"; + extent = "160 33"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + command = "JoinServerMenu.queryLan();"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl(JoinServerQryInternetBtn) { + text = "Query Internet"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "320 583"; + extent = "160 33"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + command = "JoinServerMenu.query();"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl(JoinServerRefreshBtn) { + text = "Refresh Server"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "480 583"; + extent = "160 33"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + command = "JoinServerMenu.refresh();"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl(JoinServerJoinBtn) { + text = "Join Server"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "640 583"; + extent = "160 33"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "0"; + command = "JoinServerMenu.join();"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; +}; +//--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/data/ui/scripts/guis/loadingGui.gui b/Templates/BaseGame/game/data/ui/scripts/guis/loadingGui.gui new file mode 100644 index 000000000..d51d9d94c --- /dev/null +++ b/Templates/BaseGame/game/data/ui/scripts/guis/loadingGui.gui @@ -0,0 +1,102 @@ +//--- OBJECT WRITE BEGIN --- +%guiContent = new GuiChunkedBitmapCtrl(LoadingGui) { + bitmap = "data/ui/art/background-dark.png"; + useVariable = "0"; + tile = "0"; + position = "0 0"; + extent = "1600 838"; + minExtent = "8 8"; + horizSizing = "width"; + vertSizing = "height"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "1"; + Enabled = "1"; + + new GuiControl() { + position = "391 429"; + extent = "497 166"; + minExtent = "8 8"; + horizSizing = "center"; + vertSizing = "center"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + command = "disconnect();\nCanvas.setContent(MainMenuGui);"; + accelerator = "escape"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiBitmapCtrl(LoadingLogo) { + bitmap = "data/ui/art/Torque-3D-logo.png"; + wrap = "0"; + position = "27 6"; + extent = "443 139"; + minExtent = "8 2"; + horizSizing = "center"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiProgressBitmapCtrl(LoadingProgress) { + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "17 126"; + extent = "464 24"; + minExtent = "8 2"; + horizSizing = "center"; + vertSizing = "bottom"; + profile = "GuiProgressBitmapProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl(LoadingProgressTxt) { + text = "LOADING DATABLOCKS"; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "28 144"; + extent = "440 20"; + minExtent = "8 8"; + horizSizing = "center"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; +}; +//--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/data/ui/scripts/guis/mainMenu.gui b/Templates/BaseGame/game/data/ui/scripts/guis/mainMenu.gui new file mode 100644 index 000000000..3d4964b5f --- /dev/null +++ b/Templates/BaseGame/game/data/ui/scripts/guis/mainMenu.gui @@ -0,0 +1,234 @@ +exec( "tools/gui/profiles.ed.cs" ); + +//--- OBJECT WRITE BEGIN --- +%guiContent = new GuiChunkedBitmapCtrl(MainMenuGui) { + bitmap = "data/ui/art/background-dark.png"; + useVariable = "0"; + tile = "0"; + position = "0 0"; + extent = "1280 1024"; + minExtent = "8 8"; + horizSizing = "width"; + vertSizing = "height"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "1"; + enabled = "1"; + isDecoy = "0"; + + new GuiBitmapButtonCtrl(MainMenuAppLogo) { + bitmap = "data/ui/art/Torque-3D-logo-shortcut.png"; + bitmapMode = "Stretched"; + autoFitExtents = "0"; + useModifiers = "0"; + useStates = "1"; + masked = "0"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "624 30"; + extent = "443 139"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + command = "gotoWebPage(\"forums.torque3d.org\");"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "1"; + }; + new GuiControl(MainMenuButtonContainer) { + position = "67 321"; + extent = "442 381"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "center"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiDynamicCtrlArrayControl() { + colCount = "1"; + colSize = "442"; + rowCount = "9"; + rowSize = "40"; + rowSpacing = "0"; + colSpacing = "0"; + frozen = "0"; + autoCellSize = "1"; + fillRowFirst = "0"; + dynamicSize = "0"; + padding = "0 0 0 0"; + position = "0 0"; + extent = "442 381"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiButtonCtrl() { + text = "Singleplayer"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "0 0"; + extent = "442 40"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiBlankMenuButtonProfile"; + visible = "1"; + active = "1"; + command = "MainMenuGui.openSinglePlayerMenu();"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl() { + text = "Create Server"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "0 40"; + extent = "442 40"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiBlankMenuButtonProfile"; + visible = "1"; + active = "1"; + command = "MainMenuGui.openMultiPlayerMenu();"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl() { + text = "Join Server"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "0 80"; + extent = "442 40"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiBlankMenuButtonProfile"; + visible = "1"; + active = "1"; + command = "Canvas.pushDialog(JoinServerMenu);"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl() { + text = "Options"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "0 120"; + extent = "442 40"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiBlankMenuButtonProfile"; + visible = "1"; + active = "1"; + command = "MainMenuGui.openOptionsMenu();"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl() { + text = "Launch World Editor"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "0 160"; + extent = "442 40"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiBlankMenuButtonProfile"; + visible = "1"; + active = "1"; + command = "fastLoadWorldEdit(1);"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl() { + text = "Launch GUI Editor"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "0 200"; + extent = "442 40"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiBlankMenuButtonProfile"; + visible = "1"; + active = "1"; + command = "fastLoadGUIEdit(1);"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl() { + text = "Exit"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "0 240"; + extent = "442 40"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiBlankMenuButtonProfile"; + visible = "1"; + active = "1"; + command = "quit();"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "ExitButton"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + }; +}; +//--- OBJECT WRITE END --- diff --git a/Templates/Empty/game/core/scripts/gui/messageBoxes/messageBoxOk.ed.gui b/Templates/BaseGame/game/data/ui/scripts/guis/messageBoxOK.gui similarity index 100% rename from Templates/Empty/game/core/scripts/gui/messageBoxes/messageBoxOk.ed.gui rename to Templates/BaseGame/game/data/ui/scripts/guis/messageBoxOK.gui diff --git a/Templates/Empty/game/core/scripts/gui/messageBoxes/messageBoxYesNo.ed.gui b/Templates/BaseGame/game/data/ui/scripts/guis/messageBoxYesNo.gui similarity index 100% rename from Templates/Empty/game/core/scripts/gui/messageBoxes/messageBoxYesNo.ed.gui rename to Templates/BaseGame/game/data/ui/scripts/guis/messageBoxYesNo.gui diff --git a/Templates/BaseGame/game/data/ui/scripts/guis/netGraphGui.gui b/Templates/BaseGame/game/data/ui/scripts/guis/netGraphGui.gui new file mode 100644 index 000000000..b034a447e --- /dev/null +++ b/Templates/BaseGame/game/data/ui/scripts/guis/netGraphGui.gui @@ -0,0 +1,557 @@ +function execNetGraphGuiGUI() +{ + if ( isObject( NetGraphGui ) ) + NetGraphGui.delete(); + + if ( isObject( NetGraphProfile ) ) + NetGraphProfile.delete(); + + if ( isObject( NetGraphGhostsActiveProfile ) ) + NetGraphGhostsActiveProfile.delete(); + + if ( isObject( NetGraphGhostUpdatesProfile ) ) + NetGraphGhostUpdatesProfile.delete(); + + if ( isObject( NetGraphBitsSentProfile ) ) + NetGraphBitsSentProfile.delete(); + + if ( isObject( NetGraphBitsReceivedProfile ) ) + NetGraphBitsReceivedProfile.delete(); + + if ( isObject( NetGraphLatencyProfile ) ) + NetGraphLatencyProfile.delete(); + + if ( isObject( NetGraphPacketLossProfile ) ) + NetGraphPacketLossProfile.delete(); + + exec( "./NetGraphGui.gui" ); +} + +// Profiles +new GuiControlProfile (NetGraphProfile) +{ + modal = false; + opaque = false; + canKeyFocus = false; +}; + +new GuiControlProfile (NetGraphKeyContainerProfile) +{ + border = true; + opaque = true; + fillColor = "100 100 100 200"; +}; +new GuiControlProfile (NetGraphGhostsActiveProfile) +{ + border = false; + fontColor = "255 255 255"; +}; +new GuiControlProfile (NetGraphGhostUpdatesProfile) +{ + border = false; + fontColor = "255 0 0"; +}; +new GuiControlProfile (NetGraphBitsSentProfile) +{ + border = false; + fontColor = "0 255 0"; +}; +new GuiControlProfile (NetGraphBitsReceivedProfile) +{ + border = false; + fontColor = "0 0 255"; +}; +new GuiControlProfile (NetGraphLatencyProfile) +{ + border = false; + fontColor = "0 255 255"; +}; +new GuiControlProfile (NetGraphPacketLossProfile) +{ + border = false; + fontColor = "0 0 0"; +}; + +//--- OBJECT WRITE BEGIN --- +%guiContent = new GuiControl(NetGraphGui) { + position = "0 0"; + extent = "1024 768"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "bottom"; + profile = "NetGraphProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "1"; + noCursor = "1"; + + new GuiGraphCtrl(NetGraph) { + centerY = "1"; + plotColor[0] = "1 1 1 1"; + plotColor[1] = "1 0 0 1"; + plotColor[2] = "0 1 0 1"; + plotColor[3] = "0 0 1 1"; + plotColor[4] = "0 1 1 1"; + plotColor[5] = "0 0 0 1"; + plotType[0] = "PolyLine"; + plotType[1] = "PolyLine"; + plotType[2] = "PolyLine"; + plotType[3] = "PolyLine"; + plotType[4] = "PolyLine"; + plotType[5] = "PolyLine"; + plotInterval[0] = "0"; + plotInterval[1] = "0"; + plotInterval[2] = "0"; + plotInterval[3] = "0"; + plotInterval[4] = "0"; + plotInterval[5] = "0"; + position = "816 5"; + extent = "200 200"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "bottom"; + profile = "NetGraphKeyContainerProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiControl() { + position = "816 205"; + extent = "200 104"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "bottom"; + profile = "NetGraphKeyContainerProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl(GhostsActive) { + text = "Ghosts Active"; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "100 18"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "bottom"; + profile = "NetGraphGhostsActiveProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl(GhostUpdates) { + text = "Ghost Updates"; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "100 0"; + extent = "100 18"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "bottom"; + profile = "NetGraphGhostUpdatesProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl(BitsSent) { + text = "Bytes Sent"; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 18"; + extent = "100 18"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "bottom"; + profile = "NetGraphBitsSentProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl(BitsReceived) { + text = "Bytes Received"; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "100 18"; + extent = "100 18"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "bottom"; + profile = "NetGraphBitsReceivedProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl(Latency) { + text = "Latency"; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 36"; + extent = "100 18"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "bottom"; + profile = "NetGraphLatencyProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl(PacketLoss) { + text = "Packet Loss"; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "100 36"; + extent = "59 18"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "bottom"; + profile = "NetGraphPacketLossProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Network Simulation:"; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 52"; + extent = "97 18"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "bottom"; + profile = "NetGraphPacketLossProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Simulated Latency:"; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 68"; + extent = "91 18"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "bottom"; + profile = "NetGraphPacketLossProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "ms"; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "179 68"; + extent = "20 18"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "bottom"; + profile = "NetGraphPacketLossProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextEditCtrl(NetGraphSimLatency) { + historySize = "0"; + tabComplete = "0"; + sinkAllKeyEvents = "0"; + password = "0"; + passwordMask = "*"; + text = "0"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "112 67"; + extent = "64 18"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiTextEditProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Simulated Packet Loss:"; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 83"; + extent = "111 18"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "bottom"; + profile = "NetGraphPacketLossProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "%"; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "179 84"; + extent = "20 18"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "bottom"; + profile = "NetGraphPacketLossProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextEditCtrl(NetGraphSimPacket) { + historySize = "0"; + tabComplete = "0"; + sinkAllKeyEvents = "0"; + password = "0"; + passwordMask = "*"; + text = "0"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "112 85"; + extent = "64 18"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiTextEditProfile"; + visible = "1"; + active = "1"; + command = "if(NetGraphSimLatency.text $= \"\" || NetGraphSimLatency.text < 0)\n{\n NetGraphSimLatency.text = 0;\n}\n\nif(NetGraphSimPacket.text $= \"\" || NetGraphSimPacket.text < 0)\n{\n NetGraphSimLatency.text = 0;\n}\nelse if(NetGraphSimPacket.text > 100)\n{\n NetGraphSimPacket.text = 100;\n}\n\nnetSimulateLag( NetGraphSimLatency.text, NetGraphSimPacket.text );"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; +}; +//--- OBJECT WRITE END --- + +// Functions +function toggleNetGraph() +{ + if(!$NetGraph::isInitialized) + { + NetGraph::updateStats(); + $NetGraph::isInitialized = true; + } + + if(!Canvas.isMember(NetGraphGui)) + { + Canvas.add(NetGraphGui); + } + else + { + Canvas.remove(NetGraphGui); + netSimulateLag( 0, 0 ); + } +} + +function NetGraph::updateStats() +{ + $NetGraphThread = NetGraph.schedule(32, "updateStats"); + + if(!$Stats::netGhostUpdates) + return; + + if(isobject(NetGraph)) + { + if(isobject(ServerConnection)) + NetGraph.addDatum(0,ServerConnection.getGhostsActive()); + GhostsActive.setText("Ghosts Active: " @ ServerConnection.getGhostsActive()); + NetGraph.addDatum(1,$Stats::netGhostUpdates); + GhostUpdates.setText("Ghost Updates: " @ $Stats::netGhostUpdates); + NetGraph.addDatum(2,$Stats::netBitsSent); + BitsSent.setText("Bytes Sent: " @ $Stats::netBitsSent); + NetGraph.addDatum(3,$Stats::netBitsReceived); + BitsReceived.setText("Bytes Received: " @ $Stats::netBitsReceived); + NetGraph.matchScale(2,3); + NetGraph.addDatum(4,ServerConnection.getPing()); + Latency.setText("Latency: " @ ServerConnection.getPing()); + NetGraph.addDatum(5,ServerConnection.getPacketLoss()); + PacketLoss.setText("Packet Loss: " @ ServerConnection.getPacketLoss()); + } +} + +function NetGraph::toggleKey() +{ + if(!GhostsActive.visible) + { + GhostsActive.visible = 1; + GhostUpdates.visible = 1; + BitsSent.visible = 1; + BitsReceived.visible = 1; + Latency.visible = 1; + PacketLoss.visible = 1; + } + else + { + GhostsActive.visible = 0; + GhostUpdates.visible = 0; + BitsSent.visible = 0; + BitsReceived.visible = 0; + Latency.visible = 0; + PacketLoss.visible = 0; + } +} + +function NetGraphSimLatency::onReturn(%this) +{ + NetGraph.updateNetworkSimulation(); +} + +function NetGraphSimPacket::onReturn(%this) +{ + NetGraph.updateNetworkSimulation(); +} + +function NetGraph::updateNetworkSimulation(%this) +{ + %latency = NetGraphSimLatency.getText(); + + if(%latency $= "" || %latency < 0) + { + NetGraphSimLatency.text = 0; + %latency = 0; + } + + %packetLoss = NetGraphSimPacket.getText(); + + if(%packetLoss $= "" || %packetLoss < 0) + { + NetGraphSimLatency.text = 0; + %packetLoss = 0; + } + else if(%packetLoss > 100) + { + NetGraphSimPacket.text = 100; + %packetLoss = 100; + } + + netSimulateLag( %latency, %packetLoss ); +} \ No newline at end of file diff --git a/Templates/Empty/game/art/gui/optionsDlg.gui b/Templates/BaseGame/game/data/ui/scripts/guis/optionsDlg.gui similarity index 100% rename from Templates/Empty/game/art/gui/optionsDlg.gui rename to Templates/BaseGame/game/data/ui/scripts/guis/optionsDlg.gui diff --git a/Templates/BaseGame/game/data/ui/scripts/guis/optionsMenu.gui b/Templates/BaseGame/game/data/ui/scripts/guis/optionsMenu.gui new file mode 100644 index 000000000..860850cb3 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/scripts/guis/optionsMenu.gui @@ -0,0 +1,5194 @@ +//--- OBJECT WRITE BEGIN --- +%guiContent = new GuiControl(OptionsMenu) { + position = "0 0"; + extent = "1280 720"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "1"; + returnGui = "MainMenuGui"; + tamlReader = "17544"; + tile = "0"; + useVariable = "0"; + + new GuiChunkedBitmapCtrl(OptionsMenuBG) { + useVariable = "0"; + tile = "0"; + position = "278 -645"; + extent = "1440 900"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "1"; + }; + new GuiTextCtrl(OptionsMenuHeader) { + text = "Controls"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "59 63"; + extent = "129 43"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "0"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + hidden = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiControl() { + position = "51 118"; + extent = "700 518"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiControl(OptionsMain) { + position = "1 1"; + extent = "700 320"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "center"; + profile = "GuiDefaultProfile"; + visible = "0"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + hidden = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiButtonCtrl(ControlsSettingsMenuButton) { + text = "Controls Settings"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "0 0"; + extent = "700 35"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl(GraphicsSettingsMenuButton) { + text = "Graphics Settings"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "0 35"; + extent = "700 35"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl(AudioSettingsMenuButton) { + text = "Audio Settings"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "0 105"; + extent = "700 35"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl(ScreenBrSettingsMenuButton) { + text = "Screen Brightness"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "0 140"; + extent = "700 35"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "0"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + hidden = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl(OptionsOKButton) { + text = "OK"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "0 285"; + extent = "233 35"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + command = "Canvas.popDialog(OptionsMenu);"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + class = "OptionsMenuOKButton"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl(OptionsCancelButton) { + text = "Cancel"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "233 285"; + extent = "233 35"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + accelerator = "escape"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + class = "OptionsMenuCancelButton"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl(OptionsDefaultButton) { + text = "Defaults"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "466 285"; + extent = "233 35"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + class = "OptionsMenuDefaultsButton"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl(GraphicsMenu) { + position = "1 -1"; + extent = "700 519"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "0"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + hidden = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiButtonCtrl() { + text = "Display"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "0 0"; + extent = "175 25"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + command = "DisplaySettingsMenu.hidden = false;\nGeneralGraphicsSettingsMenu.hidden = true;"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl() { + text = "General"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "175 0"; + extent = "175 25"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + command = "DisplaySettingsMenu.hidden = true;\nGeneralGraphicsSettingsMenu.hidden = false;"; + accelerator = "escape"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiContainer(DisplaySettingsMenu) { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 25"; + extent = "700 450"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiBitmapCtrl() { + bitmap = "data/ui/art/hudfill.png"; + wrap = "0"; + position = "0 0"; + extent = "700 450"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiControl() { + position = "0 0"; + extent = "450 80"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiControl() { + position = "0 0"; + extent = "450 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiBitmapCtrl() { + bitmap = "data/ui/art/hudfill.png"; + wrap = "0"; + position = "0 0"; + extent = "450 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Graphics Driver"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "450 18"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 20"; + extent = "450 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Driver"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiPopUpMenuCtrl(GraphicsMenuDriver) { + maxPopupHeight = "200"; + sbUsesNAColor = "0"; + reverseTextList = "0"; + bitmapBounds = "16 16"; + text = "NVIDIA GeForce GTX 950 (D3D9)"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "175 0"; + extent = "275 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiPopUpMenuProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + }; + new GuiControl() { + position = "0 72"; + extent = "450 220"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiControl() { + position = "0 0"; + extent = "450 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiBitmapCtrl() { + bitmap = "data/ui/art/hudfill.png"; + wrap = "0"; + position = "0 0"; + extent = "450 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Display Settings"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "450 18"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 20"; + extent = "350 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Resolution"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiPopUpMenuCtrl(GraphicsMenuResolution) { + maxPopupHeight = "200"; + sbUsesNAColor = "0"; + reverseTextList = "0"; + bitmapBounds = "16 16"; + text = "1280 x 720 (16:9)"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "175 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiPopUpMenuProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 40"; + extent = "350 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Full Screen"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl(GraphicsMenuFullScreen) { + text = "Button"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + position = "250 0"; + extent = "20 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiCheckBoxProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 60"; + extent = "350 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Refresh Rate"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiPopUpMenuCtrl(GraphicsMenuRefreshRate) { + maxPopupHeight = "200"; + sbUsesNAColor = "0"; + reverseTextList = "0"; + bitmapBounds = "16 16"; + text = "60"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "175 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiPopUpMenuProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 80"; + extent = "350 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "VSync"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl(GraphicsMenuVSync) { + text = "Button"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + position = "250 0"; + extent = "20 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiCheckBoxProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 120"; + extent = "450 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Field of View"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiSliderCtrl() { + range = "65 90"; + ticks = "25"; + snap = "1"; + value = "90"; + position = "190 0"; + extent = "209 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiSliderProfile"; + visible = "1"; + active = "1"; + variable = "$pref::Player::defaultFov"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "90"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "410 0"; + extent = "40 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + variable = "$pref::Player::defaultFov"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 160"; + extent = "450 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Gamma"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiSliderCtrl() { + range = "2 2.5"; + ticks = "0"; + snap = "0"; + value = "2"; + position = "190 0"; + extent = "261 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiSliderProfile"; + visible = "1"; + active = "1"; + variable = "$pref::Video::Gamma"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 180"; + extent = "450 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Brightness"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiSliderCtrl() { + range = "-0.5 0.5"; + ticks = "0"; + snap = "0"; + value = "0"; + position = "190 0"; + extent = "261 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiSliderProfile"; + visible = "1"; + active = "1"; + variable = "$pref::Video::Brightness"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 200"; + extent = "450 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Contrast"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiSliderCtrl() { + range = "0.5 1.5"; + ticks = "0"; + snap = "0"; + value = "1"; + position = "190 0"; + extent = "261 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiSliderProfile"; + visible = "1"; + active = "1"; + variable = "$pref::Video::Contrast"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + }; + }; + new GuiContainer(GeneralGraphicsSettingsMenu) { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 25"; + extent = "700 450"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "0"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + hidden = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiBitmapCtrl() { + bitmap = "data/ui/art/hudfill.png"; + wrap = "0"; + position = "0 0"; + extent = "700 450"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiContainer() { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "700 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiBitmapCtrl() { + bitmap = "data/ui/art/hudfill.png"; + wrap = "0"; + position = "0 0"; + extent = "700 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl(GraphisMenuPageText) { + text = "Overall Quality"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "11 0"; + extent = "116 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiPopUpMenuCtrl(GraphicsMenuOverallQlty) { + maxPopupHeight = "200"; + sbUsesNAColor = "0"; + reverseTextList = "0"; + bitmapBounds = "16 16"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "142 0"; + extent = "548 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiPopUpMenuProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + class = "GraphicsQualityPopup"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 25"; + extent = "350 80"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiControl() { + position = "0 0"; + extent = "350 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiBitmapCtrl() { + bitmap = "data/ui/art/hudfill.png"; + wrap = "0"; + position = "0 0"; + extent = "350 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Lighting"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "350 18"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 20"; + extent = "350 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Shadow Quality"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiPopUpMenuCtrl(GraphicsMenuShadowQlty) { + maxPopupHeight = "200"; + sbUsesNAColor = "0"; + reverseTextList = "0"; + bitmapBounds = "16 16"; + text = "High"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "175 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiPopUpMenuProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + class = "GraphicsQualityPopup"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 40"; + extent = "350 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Shadow Caching"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl(GraphicsMenuShadowCache) { + text = "Button"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + position = "250 0"; + extent = "20 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiCheckBoxProfile"; + visible = "1"; + active = "1"; + variable = "$pref::Shadows::useShadowCaching"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 60"; + extent = "350 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Soft Shadows"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiPopUpMenuCtrl(GraphicsMenuSoftShadow) { + maxPopupHeight = "200"; + sbUsesNAColor = "0"; + reverseTextList = "0"; + bitmapBounds = "16 16"; + text = "High"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "175 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiPopUpMenuProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + class = "GraphicsQualityPopup"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + }; + new GuiControl() { + position = "0 140"; + extent = "350 120"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiControl() { + position = "0 0"; + extent = "350 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiBitmapCtrl() { + bitmap = "data/ui/art/hudfill.png"; + wrap = "0"; + position = "0 0"; + extent = "350 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Models and Textures"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "350 18"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 20"; + extent = "350 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Model Detail"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiPopUpMenuCtrl(GraphicsMenuModelDtl) { + maxPopupHeight = "200"; + sbUsesNAColor = "0"; + reverseTextList = "0"; + bitmapBounds = "16 16"; + text = "High"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "175 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiPopUpMenuProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + class = "GraphicsQualityPopup"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 40"; + extent = "350 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Texture Detail"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiPopUpMenuCtrl(GraphicsMenuTextureDtl) { + maxPopupHeight = "200"; + sbUsesNAColor = "0"; + reverseTextList = "0"; + bitmapBounds = "16 16"; + text = "High"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "175 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiPopUpMenuProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + class = "GraphicsQualityPopup"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 60"; + extent = "350 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Terrain Detail"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiPopUpMenuCtrl(GraphicsMenuTerrainDtl) { + maxPopupHeight = "200"; + sbUsesNAColor = "0"; + reverseTextList = "0"; + bitmapBounds = "16 16"; + text = "High"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "175 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiPopUpMenuProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + class = "GraphicsQualityPopup"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 80"; + extent = "350 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Decal Lifetime"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiPopUpMenuCtrl(GraphicsMenuDecalLife) { + maxPopupHeight = "200"; + sbUsesNAColor = "0"; + reverseTextList = "0"; + bitmapBounds = "16 16"; + text = "High"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "175 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiPopUpMenuProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + class = "GraphicsQualityPopup"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 100"; + extent = "350 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Ground Clutter Density"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiPopUpMenuCtrl(GraphicsMenuGroundClutter) { + maxPopupHeight = "200"; + sbUsesNAColor = "0"; + reverseTextList = "0"; + bitmapBounds = "16 16"; + text = "High"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "175 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiPopUpMenuProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + class = "GraphicsQualityPopup"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + }; + new GuiControl() { + position = "350 25"; + extent = "350 220"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiControl() { + position = "0 0"; + extent = "350 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiBitmapCtrl() { + bitmap = "data/ui/art/hudfill.png"; + wrap = "0"; + position = "0 0"; + extent = "350 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Effects"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "350 18"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 20"; + extent = "350 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Material Quality"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiPopUpMenuCtrl(GraphicsMenuMaterialQlty) { + maxPopupHeight = "200"; + sbUsesNAColor = "0"; + reverseTextList = "0"; + bitmapBounds = "16 16"; + text = "High"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "175 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiPopUpMenuProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + class = "GraphicsQualityPopup"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 40"; + extent = "350 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "High Dynamic Range"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl(GraphicsMenuHDR) { + text = "Button"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + position = "250 0"; + extent = "20 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiCheckBoxProfile"; + visible = "1"; + active = "1"; + variable = "$pref::PostFX::EnableHDR"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 60"; + extent = "350 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Parallax"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl(GraphicsMenuParallax) { + text = "Button"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + position = "250 0"; + extent = "20 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiCheckBoxProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 80"; + extent = "350 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + variable = "$pref::PostFX::EnableSSAO"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Ambient Occlusion"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl(GraphicsMenuAO) { + text = "Button"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + position = "250 0"; + extent = "20 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiCheckBoxProfile"; + visible = "1"; + active = "1"; + variable = "$pref::PostFX::EnableSSAO"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 100"; + extent = "350 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Light Rays"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl(GraphicsMenuLightRay) { + text = "Button"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + position = "250 0"; + extent = "20 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiCheckBoxProfile"; + visible = "1"; + active = "1"; + variable = "$pref::PostFX::EnableLightRays"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 120"; + extent = "350 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Depth of Field"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl(GraphicsMenuDOF) { + text = "Button"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + position = "250 0"; + extent = "20 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiCheckBoxProfile"; + visible = "1"; + active = "1"; + variable = "$pref::PostFX::EnableDOF"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 160"; + extent = "350 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Water Reflections"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl(GraphicsMenuWaterRefl) { + text = "Button"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + position = "250 0"; + extent = "20 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiCheckBoxProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 140"; + extent = "350 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Vignetting"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl(GraphicsMenuVignette) { + text = "Button"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + position = "250 0"; + extent = "20 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiCheckBoxProfile"; + visible = "1"; + active = "1"; + variable = "$pref::PostFX::EnableVignette"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 180"; + extent = "350 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Anti Aliasing"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiPopUpMenuCtrl(GraphicsMenuAA) { + maxPopupHeight = "200"; + sbUsesNAColor = "0"; + reverseTextList = "0"; + bitmapBounds = "16 16"; + text = "4x"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "175 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiPopUpMenuProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 200"; + extent = "350 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Anisotropic Filtering"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiPopUpMenuCtrl(GraphicsMenuAniso) { + maxPopupHeight = "200"; + sbUsesNAColor = "0"; + reverseTextList = "0"; + bitmapBounds = "16 16"; + text = "16X"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "175 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiPopUpMenuProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + }; + }; + new GuiButtonCtrl() { + text = "OK"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "0 484"; + extent = "233 35"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + class = "GraphicsMenuOKButton"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl() { + text = "Cancel"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "233 484"; + extent = "233 35"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + accelerator = "escape"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + class = "OptionsMenuCancelButton"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl() { + text = "Defaults"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "466 484"; + extent = "233 35"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + command = "GraphicsMenu.Autodetect();\nGraphicsMenu.loadSettings();"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl(ScreenBrightnessMenu) { + position = "1 1"; + extent = "700 519"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "center"; + profile = "GuiDefaultProfile"; + visible = "0"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + hidden = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiChunkedBitmapCtrl() { + bitmap = "data/ui/art/hudfill.png"; + useVariable = "0"; + tile = "0"; + position = "0 0"; + extent = "700 450"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "1"; + + new GuiBitmapCtrl() { + bitmap = "data/ui/art/ScreenBrightness_Dark.png"; + wrap = "0"; + position = "0 100"; + extent = "350 200"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiBitmapCtrl() { + bitmap = "data/ui/art/ScreenBrightness_Light.png"; + wrap = "0"; + position = "350 100"; + extent = "350 200"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Adjust the brightness until only the right side image is visible."; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 400"; + extent = "700 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiButtonCtrl() { + text = "OK"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "0 484"; + extent = "233 35"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + class = "OptionsMenuOKButton"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl() { + text = "Cancel"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "233 484"; + extent = "233 35"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + accelerator = "escape"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + class = "OptionsMenuCancelButton"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl(BrightnessMenuDefaultsButton) { + text = "Defaults"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "466 484"; + extent = "233 35"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + class = "OptionsMenuDefaultsButton"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiChunkedBitmapCtrl() { + bitmap = "data/ui/art/hudfill.png"; + useVariable = "0"; + tile = "0"; + position = "0 450"; + extent = "700 34"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "1"; + + new GuiTextCtrl() { + text = "Screen Brightness"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "350 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiSliderCtrl(BrightnessMenuSlider) { + range = "0.001 2.2"; + ticks = "9"; + snap = "1"; + value = "1.1005"; + position = "350 9"; + extent = "340 68"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiSliderProfile"; + visible = "1"; + active = "1"; + variable = "$pref::Video::Gamma"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + }; + new GuiControl(ControlsMenu) { + position = "1 1"; + extent = "700 519"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "center"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiButtonCtrl() { + text = "Keyboard"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "0 0"; + extent = "175 25"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + command = "KeyboardControlPanel.hidden = false;\nMouseControlPanel.hidden = true;"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl() { + text = "Mouse"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "175 0"; + extent = "175 25"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + command = "KeyboardControlPanel.hidden = true;\nMouseControlPanel.hidden = false;"; + accelerator = "escape"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl() { + text = "Gamepad"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "350 0"; + extent = "175 25"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "0"; + active = "1"; + command = "DisplaySettingsMenu.hidden = true;\nGeneralGraphicsSettingsMenu.hidden = false;"; + accelerator = "escape"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + hidden = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiControl(KeyboardControlPanel) { + position = "0 25"; + extent = "700 460"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiContainer() { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "700 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiBitmapCtrl() { + bitmap = "data/ui/art/hudfill.png"; + wrap = "0"; + position = "0 0"; + extent = "700 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Control Set"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "11 0"; + extent = "116 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiPopUpMenuCtrl(ControlSetList) { + maxPopupHeight = "200"; + sbUsesNAColor = "0"; + reverseTextList = "0"; + bitmapBounds = "16 16"; + text = "Movement"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "142 0"; + extent = "548 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiPopUpMenuProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiContainer(ControlsSettingsMenu) { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 20"; + extent = "700 440"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiScrollCtrl() { + willFirstRespond = "1"; + hScrollBar = "alwaysOff"; + vScrollBar = "dynamic"; + lockHorizScroll = "0"; + lockVertScroll = "0"; + constantThumbHeight = "0"; + childMargin = "0 0"; + mouseWheelScrollSpeed = "-1"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "700 440"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiScrollProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiDynamicCtrlArrayControl(ControlsMenuOptionsArray) { + colCount = "1"; + colSize = "700"; + rowCount = "5"; + rowSize = "35"; + rowSpacing = "0"; + colSpacing = "0"; + frozen = "0"; + autoCellSize = "1"; + fillRowFirst = "1"; + dynamicSize = "0"; + padding = "0 0 0 0"; + position = "1 1"; + extent = "685 440"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuScrollProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + }; + }; + new GuiContainer(MouseControlPanel) { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 25"; + extent = "700 460"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "0"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + hidden = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiBitmapCtrl() { + bitmap = "data/ui/art/hudfill.png"; + wrap = "0"; + position = "0 0"; + extent = "700 460"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiControl() { + position = "0 0"; + extent = "490 202"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiControl() { + position = "0 20"; + extent = "490 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Invert Vertical"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "215 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl(ControlMenuInvertMouse) { + text = "Button"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + position = "258 0"; + extent = "20 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiCheckBoxProfile"; + visible = "1"; + active = "1"; + variable = "$pref::Input::invertVerticalMouse"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 40"; + extent = "490 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Vertical Sensitivity"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "215 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiSliderCtrl() { + range = "0.1 1"; + ticks = "8"; + snap = "1"; + value = "1"; + position = "215 0"; + extent = "220 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiSliderProfile"; + visible = "1"; + active = "1"; + variable = "$pref::Input::VertMouseSensitivity"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "1"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "440 0"; + extent = "50 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + variable = "$pref::Input::VertMouseSensitivity"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 60"; + extent = "490 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Horizontal Sensitivity"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "215 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiSliderCtrl() { + range = "0.1 1"; + ticks = "8"; + snap = "1"; + value = "1"; + position = "215 0"; + extent = "220 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiSliderProfile"; + visible = "1"; + active = "1"; + variable = "$pref::Input::HorzMouseSensitivity"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "1"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "440 0"; + extent = "50 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + variable = "$pref::Input::HorzMouseSensitivity"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 80"; + extent = "490 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Zoom Vertical Sensitivity"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "215 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiSliderCtrl() { + range = "0.1 1"; + ticks = "8"; + snap = "1"; + value = "0.3"; + position = "215 0"; + extent = "220 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiSliderProfile"; + visible = "1"; + active = "1"; + variable = "$pref::Input::ZoomVertMouseSensitivity"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "0.3"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "440 0"; + extent = "50 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + variable = "$pref::Input::ZoomVertMouseSensitivity"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 100"; + extent = "490 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Zoom Horizontal Sensitivity"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "215 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiSliderCtrl() { + range = "0.1 1"; + ticks = "8"; + snap = "1"; + value = "0.3"; + position = "215 0"; + extent = "220 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiSliderProfile"; + visible = "1"; + active = "1"; + variable = "$pref::Input::ZoomHorzMouseSensitivity"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "0.3"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "440 0"; + extent = "50 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + variable = "$pref::Input::ZoomHorzMouseSensitivity"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + }; + }; + new GuiButtonCtrl() { + text = "OK"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "0 484"; + extent = "233 35"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + class = "ControlsMenuOKButton"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl() { + text = "Cancel"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "233 484"; + extent = "233 35"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + accelerator = "escape"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + class = "OptionsMenuCancelButton"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl() { + text = "Defaults"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "466 484"; + extent = "233 35"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + class = "ControlsMenuDefaultsButton"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl(AudioMenu) { + position = "1 1"; + extent = "700 519"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "center"; + profile = "GuiDefaultProfile"; + visible = "0"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + hidden = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiBitmapCtrl() { + bitmap = "data/ui/art/hudfill.png"; + wrap = "0"; + position = "0 0"; + extent = "700 450"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiContainer() { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "700 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiBitmapCtrl() { + bitmap = "data/ui/art/hudfill.png"; + wrap = "0"; + position = "0 0"; + extent = "700 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl(AudioMenuPageText) { + text = "Audio"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "700 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiContainer(AudioSettingsMenu) { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 40"; + extent = "700 442"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "0"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + hidden = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiDynamicCtrlArrayControl(AudioMenuOptionsArray) { + colCount = "1"; + colSize = "700"; + rowCount = "6"; + rowSize = "35"; + rowSpacing = "0"; + colSpacing = "0"; + frozen = "0"; + autoCellSize = "1"; + fillRowFirst = "1"; + dynamicSize = "0"; + padding = "0 0 0 0"; + position = "0 0"; + extent = "700 444"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiContainer() { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "700 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + class = "GraphicsMenuSetting"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiBitmapCtrl() { + bitmap = "data/ui/art/hudfill.png"; + wrap = "0"; + position = "0 0"; + extent = "450 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiContainer() { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "450 0"; + extent = "250 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiBitmapCtrl() { + bitmap = "data/ui/art/hudfill.png"; + wrap = "0"; + position = "35 0"; + extent = "180 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "XAudio"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "35 0"; + extent = "180 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + internalName = "SettingText"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl() { + text = ">"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "215 0"; + extent = "35 35"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + class = "OptionsMenuForwardSetting"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl() { + text = "<"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "0 0"; + extent = "35 35"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + class = "OptionsMenuBackSetting"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiTextCtrl() { + text = "Sound Provider"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "450 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + internalName = "nameText"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiContainer() { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 35"; + extent = "700 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + class = "GraphicsMenuSetting"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiBitmapCtrl() { + bitmap = "data/ui/art/hudfill.png"; + wrap = "0"; + position = "0 0"; + extent = "450 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiContainer() { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "450 0"; + extent = "250 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiBitmapCtrl() { + bitmap = "data/ui/art/hudfill.png"; + wrap = "0"; + position = "35 0"; + extent = "180 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Speakers (High Definition Audio Device)"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "35 0"; + extent = "180 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + internalName = "SettingText"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl() { + text = ">"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "215 0"; + extent = "35 35"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + class = "OptionsMenuForwardSetting"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl() { + text = "<"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "0 0"; + extent = "35 35"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + class = "OptionsMenuBackSetting"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiTextCtrl() { + text = "Sound Device"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "450 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + internalName = "nameText"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiContainer() { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 70"; + extent = "700 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiBitmapCtrl() { + bitmap = "data/ui/art/hudfill.png"; + wrap = "0"; + position = "0 0"; + extent = "450 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiContainer() { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "450 0"; + extent = "250 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiBitmapCtrl() { + bitmap = "data/ui/art/hudfill.png"; + wrap = "0"; + position = "0 0"; + extent = "250 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiSliderCtrl() { + range = "0.1 1"; + ticks = "8"; + snap = "1"; + value = "0.8"; + position = "0 0"; + extent = "200 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiSliderProfile"; + visible = "1"; + active = "1"; + variable = "$pref::SFX::masterVolume"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "slider"; + class = "OptionsMenuSlider"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "8"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "200 0"; + extent = "50 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + internalName = "valueText"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiTextCtrl() { + text = "Master Audio Volume"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "450 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + internalName = "nameText"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiContainer() { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 105"; + extent = "700 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiBitmapCtrl() { + bitmap = "data/ui/art/hudfill.png"; + wrap = "0"; + position = "0 0"; + extent = "450 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiContainer() { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "450 0"; + extent = "250 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiBitmapCtrl() { + bitmap = "data/ui/art/hudfill.png"; + wrap = "0"; + position = "0 0"; + extent = "250 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiSliderCtrl() { + range = "0.1 1"; + ticks = "8"; + snap = "1"; + value = "0.1"; + position = "0 0"; + extent = "200 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiSliderProfile"; + visible = "1"; + active = "1"; + variable = "$pref::SFX::channelVolume[1]"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "slider"; + class = "OptionsMenuSlider"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "10"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "200 0"; + extent = "50 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + internalName = "valueText"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiTextCtrl() { + text = "Gui Volume"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "450 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + internalName = "nameText"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiContainer() { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 140"; + extent = "700 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiBitmapCtrl() { + bitmap = "data/ui/art/hudfill.png"; + wrap = "0"; + position = "0 0"; + extent = "450 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiContainer() { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "450 0"; + extent = "250 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiBitmapCtrl() { + bitmap = "data/ui/art/hudfill.png"; + wrap = "0"; + position = "0 0"; + extent = "250 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiSliderCtrl() { + range = "0.1 1"; + ticks = "8"; + snap = "1"; + value = "0.1"; + position = "0 0"; + extent = "200 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiSliderProfile"; + visible = "1"; + active = "1"; + variable = "$pref::SFX::channelVolume[2]"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "slider"; + class = "OptionsMenuSlider"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "10"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "200 0"; + extent = "50 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + internalName = "valueText"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiTextCtrl() { + text = "Effect Volume"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "450 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + internalName = "nameText"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiContainer() { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 175"; + extent = "700 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiBitmapCtrl() { + bitmap = "data/ui/art/hudfill.png"; + wrap = "0"; + position = "0 0"; + extent = "450 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiContainer() { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "450 0"; + extent = "250 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiBitmapCtrl() { + bitmap = "data/ui/art/hudfill.png"; + wrap = "0"; + position = "0 0"; + extent = "250 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiSliderCtrl() { + range = "0.1 1"; + ticks = "8"; + snap = "1"; + value = "0.1"; + position = "0 0"; + extent = "200 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiSliderProfile"; + visible = "1"; + active = "1"; + variable = "$pref::SFX::channelVolume[4]"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "slider"; + class = "OptionsMenuSlider"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "10"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "200 0"; + extent = "50 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + internalName = "valueText"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiTextCtrl() { + text = "Music Volume"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "450 35"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + internalName = "nameText"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + }; + }; + new GuiControl() { + position = "0 40"; + extent = "450 140"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiControl() { + position = "0 0"; + extent = "450 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Sound Driver"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiPopUpMenuCtrl(AudioMenuSoundDriver) { + maxPopupHeight = "200"; + sbUsesNAColor = "0"; + reverseTextList = "0"; + bitmapBounds = "16 16"; + text = "XAudio"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "175 0"; + extent = "265 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiPopUpMenuProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 20"; + extent = "450 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Sound Device"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiPopUpMenuCtrl(AudioMenuSoundDevice) { + maxPopupHeight = "200"; + sbUsesNAColor = "0"; + reverseTextList = "0"; + bitmapBounds = "16 16"; + text = "Speakers (High Definition Audio Device)"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "175 0"; + extent = "265 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiPopUpMenuProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 60"; + extent = "450 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Master Audio Volume"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiSliderCtrl() { + range = "0.1 1"; + ticks = "8"; + snap = "1"; + value = "1"; + position = "190 0"; + extent = "209 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiSliderProfile"; + visible = "1"; + active = "1"; + variable = "$pref::SFX::masterVolume"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "1"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "410 0"; + extent = "40 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + variable = "$pref::SFX::masterVolume"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 80"; + extent = "450 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Gui Volume"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiSliderCtrl() { + range = "0.1 1"; + ticks = "8"; + snap = "1"; + value = "1"; + position = "190 0"; + extent = "209 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiSliderProfile"; + visible = "1"; + active = "1"; + variable = "$pref::SFX::channelVolume[1]"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "1"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "410 0"; + extent = "40 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + variable = "$pref::SFX::channelVolume[1]"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 100"; + extent = "450 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Effect Volume"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiSliderCtrl() { + range = "0.1 1"; + ticks = "8"; + snap = "1"; + value = "1"; + position = "190 0"; + extent = "209 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiSliderProfile"; + visible = "1"; + active = "1"; + variable = "$pref::SFX::channelVolume[2]"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "1"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "410 0"; + extent = "40 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + variable = "$pref::SFX::channelVolume[2]"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiControl() { + position = "0 120"; + extent = "450 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Music Volume"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 0"; + extent = "175 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiSliderCtrl() { + range = "0.1 1"; + ticks = "8"; + snap = "1"; + value = "1"; + position = "190 0"; + extent = "209 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiSliderProfile"; + visible = "1"; + active = "1"; + variable = "$pref::SFX::channelVolume[4]"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "1"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "410 0"; + extent = "40 20"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + variable = "$pref::SFX::channelVolume[4]"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + }; + new GuiButtonCtrl() { + text = "OK"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "0 484"; + extent = "233 35"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + class = "AudioMenuOKButton"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl() { + text = "Cancel"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "233 484"; + extent = "233 35"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + accelerator = "escape"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + class = "OptionsMenuCancelButton"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl(AudioMenuDefaultsButton) { + text = "Defaults"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "466 484"; + extent = "233 35"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + class = "OptionsMenuDefaultsButton"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + }; +}; +//--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/data/ui/scripts/guis/pauseMenu.gui b/Templates/BaseGame/game/data/ui/scripts/guis/pauseMenu.gui new file mode 100644 index 000000000..5995cdf36 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/scripts/guis/pauseMenu.gui @@ -0,0 +1,153 @@ +//--- OBJECT WRITE BEGIN --- +%guiContent = new GuiControl(PauseMenu) { + position = "0 0"; + extent = "1024 768"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "1"; + tamlReader = "19772"; + tile = "0"; + useVariable = "0"; + + new GuiChunkedBitmapCtrl(PauseMenuBG) { + bitmap = "data/ui/art/hudfill"; + useVariable = "0"; + tile = "0"; + position = "0 0"; + extent = "1024 768"; + minExtent = "8 2"; + horizSizing = "width"; + vertSizing = "height"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "1"; + }; + new GuiControl() { + position = "51 118"; + extent = "700 518"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiControl(PauseOptionsMain) { + position = "1 1"; + extent = "700 320"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "center"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiButtonCtrl(PauseMenuExitButton) { + text = "Exit Game"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "0 0"; + extent = "700 35"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + command = "escapeFromGame();"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl(PauseMenuOptionsButton) { + text = "Options"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "0 35"; + extent = "700 35"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + command = "PauseMenu.openOptionsMenu();"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl(PauseMenuControlsButton) { + text = "Controls"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "0 70"; + extent = "700 35"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + command = "PauseMenu.openControlsMenu();"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl(PauseMenuCancelButton) { + text = "Cancel"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "1"; + position = "466 285"; + extent = "233 35"; + minExtent = "8 8"; + horizSizing = "relative"; + vertSizing = "bottom"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + command = "Canvas.popDialog();"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + class = "OptionsMenuDefaultsButton"; + canSave = "1"; + canSaveDynamicFields = "0"; + accelerator="escape"; + }; + }; + }; +}; +//--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/data/ui/scripts/guis/profiler.gui b/Templates/BaseGame/game/data/ui/scripts/guis/profiler.gui new file mode 100644 index 000000000..46628c6df --- /dev/null +++ b/Templates/BaseGame/game/data/ui/scripts/guis/profiler.gui @@ -0,0 +1,324 @@ +//--- OBJECT WRITE BEGIN --- +%guiContent = new GuiControl(ProfilerGui) { + position = "0 0"; + extent = "1024 768"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "1"; + + new GuiWindowCtrl(ppProfilerWindow) { + text = "Profiler Manager"; + resizeWidth = "0"; + resizeHeight = "0"; + canMove = "1"; + canClose = "1"; + canMinimize = "0"; + canMaximize = "0"; + canCollapse = "0"; + closeCommand = "Canvas.popDialog(ProfilerGui);"; + edgeSnap = "0"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "306 216"; + extent = "415 199"; + minExtent = "8 8"; + horizSizing = "center"; + vertSizing = "center"; + profile = "GuiWindowProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiCheckBoxCtrl(ppShowFps) { + text = "Show Fps"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + position = "13 24"; + extent = "127 30"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiCheckBoxProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + tooltip = "Enable or Disable the Fps counter"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl(ppShowGfx) { + text = "Show Gfx"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + position = "13 40"; + extent = "127 30"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiCheckBoxProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + tooltip = "Enable or Disable the Gfx"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl(ppShowShadow) { + text = "Show Shadow"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + position = "13 56"; + extent = "127 30"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiCheckBoxProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + tooltip = "Enable or Disable the Shdow"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl(ppShowNet) { + text = "Show Net"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + position = "13 136"; + extent = "127 30"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiCheckBoxProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + tooltip = "Enable or Disable the Network activity"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl(ppShowForest) { + text = "Show Forest"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + position = "13 120"; + extent = "127 30"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiCheckBoxProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + tooltip = "Enable or Disable the Forest"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl(ppShowGroundcover) { + text = "Show Groundcover"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + position = "13 104"; + extent = "127 30"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiCheckBoxProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + tooltip = "Enable or Disable the Groundcover"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl(ppShowTerrain) { + text = "Show Terrain"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + position = "13 88"; + extent = "127 30"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiCheckBoxProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + tooltip = "Enable or Disable the Terrain"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl(ppShowSfx) { + text = "Show Sfx"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + position = "13 72"; + extent = "127 30"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiCheckBoxProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + tooltip = "Enable or Disable the Sfx"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl(ppOptionsEnableDisable) { + text = "On/Off OSD"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "309 38"; + extent = "93 23"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiButtonProfile"; + visible = "1"; + active = "1"; + command = "showMetrics(true);"; + tooltipProfile = "GuiToolTipProfile"; + tooltip = "Apply the setting from the dialog box"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl(ppOptionsUpdate) { + text = "Update"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "200 38"; + extent = "93 23"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiButtonProfile"; + visible = "1"; + active = "1"; + command = "showMetrics(false);"; + tooltipProfile = "GuiToolTipProfile"; + tooltip = "Update the profiler with the new parameters"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl(ppOptionsDoProfiling) { + text = "DoProfiling"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "309 141"; + extent = "93 23"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiButtonProfile"; + visible = "1"; + active = "1"; + command = "doProfileFromGui();"; + tooltipProfile = "GuiToolTipProfile"; + tooltip = "Does the profile for the ammount of time specified "; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl(DurationLabel) { + text = "Duration[ms]"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "200 144"; + extent = "39 21"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiTextRightProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextEditCtrl(Duration) { + historySize = "0"; + tabComplete = "0"; + sinkAllKeyEvents = "0"; + password = "0"; + passwordMask = "*"; + text = "1000"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "249 144"; + extent = "53 18"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiTextEditProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; +}; +//--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/data/ui/scripts/guis/remapConfirmDlg.gui b/Templates/BaseGame/game/data/ui/scripts/guis/remapConfirmDlg.gui new file mode 100644 index 000000000..e0489a9f8 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/scripts/guis/remapConfirmDlg.gui @@ -0,0 +1,125 @@ +//--- OBJECT WRITE BEGIN --- +%guiContent = new GuiControl(RemapConfirmDlg) { + position = "0 0"; + extent = "1024 768"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "1"; + helpTag = "0"; + + new GuiContainer(RemapConfirmationPanel) { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "168 352"; + extent = "700 64"; + minExtent = "8 2"; + horizSizing = "center"; + vertSizing = "center"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiChunkedBitmapCtrl() { + bitmap = "data/ui/art/hudfill.png"; + useVariable = "0"; + tile = "0"; + position = "0 0"; + extent = "700 64"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl(RemapConfirmationText) { + text = "\"m\" is already bound to \"Forward\"!\nDo you wish to replace this mapping?"; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 8"; + extent = "700 20"; + minExtent = "8 8"; + horizSizing = "width"; + vertSizing = "height"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + accelerator = "return"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl(RemapConfirmationYesButton) { + text = "Yes"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "270 36"; + extent = "80 22"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "top"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + command = "ControlsMenu.redoMapping(keyboard, \"m\", \"jump\", 0, 4); Canvas.popDialog();"; + accelerator = "return"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl(RemapConfirmationNoButton) { + text = "No"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "367 36"; + extent = "80 22"; + minExtent = "8 8"; + horizSizing = "right"; + vertSizing = "top"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + command = "Canvas.popDialog();"; + accelerator = "escape"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; +}; +//--- OBJECT WRITE END --- diff --git a/Templates/Empty/game/art/gui/remapDlg.gui b/Templates/BaseGame/game/data/ui/scripts/guis/remapDlg.gui similarity index 54% rename from Templates/Empty/game/art/gui/remapDlg.gui rename to Templates/BaseGame/game/data/ui/scripts/guis/remapDlg.gui index d14fec661..a4dd8edac 100644 --- a/Templates/Empty/game/art/gui/remapDlg.gui +++ b/Templates/BaseGame/game/data/ui/scripts/guis/remapDlg.gui @@ -15,28 +15,19 @@ canSaveDynamicFields = "1"; helpTag = "0"; - new GuiWindowCtrl() { - text = "Remap Control"; - resizeWidth = "1"; - resizeHeight = "1"; - canMove = "1"; - canClose = "1"; - canMinimize = "1"; - canMaximize = "1"; - canCollapse = "0"; - edgeSnap = "1"; + new GuiContainer(RemapPanel) { margin = "0 0 0 0"; padding = "0 0 0 0"; anchorTop = "1"; anchorBottom = "0"; anchorLeft = "1"; anchorRight = "0"; - position = "390 352"; - extent = "243 64"; - minExtent = "8 8"; + position = "162 352"; + extent = "700 64"; + minExtent = "8 2"; horizSizing = "center"; vertSizing = "center"; - profile = "GuiWindowProfile"; + profile = "GuiDefaultProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; @@ -45,37 +36,13 @@ canSave = "1"; canSaveDynamicFields = "0"; - new GuiTextCtrl() { - text = "Re-bind control to..."; - maxLength = "255"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "49 32"; - extent = "144 20"; + new GuiInputCtrl(OptRemapInputCtrl) { + lockMouse = "0"; + position = "480 0"; + extent = "64 64"; minExtent = "8 8"; horizSizing = "width"; vertSizing = "height"; - profile = "GuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - internalName = "OptRemapText"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiInputCtrl(OptRemapInputCtrl) { - lockMouse = "0"; - position = "0 0"; - extent = "64 64"; - minExtent = "8 8"; - horizSizing = "center"; - vertSizing = "bottom"; profile = "GuiInputCtrlProfile"; visible = "1"; active = "1"; @@ -85,6 +52,71 @@ canSave = "1"; canSaveDynamicFields = "0"; }; + new GuiChunkedBitmapCtrl() { + bitmap = "data/ui/art/hudfill.png"; + useVariable = "0"; + tile = "0"; + position = "0 0"; + extent = "700 64"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Press escape to cancel"; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "247 34"; + extent = "242 20"; + minExtent = "8 8"; + horizSizing = "width"; + vertSizing = "height"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Re-bind \"\" to..."; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "177 8"; + extent = "384 20"; + minExtent = "8 8"; + horizSizing = "width"; + vertSizing = "height"; + profile = "GuiMenuButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + internalName = "OptRemapText"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; }; }; //--- OBJECT WRITE END --- diff --git a/Templates/Empty/game/art/gui/StartupGui.gui b/Templates/BaseGame/game/data/ui/scripts/guis/startupGui.gui similarity index 100% rename from Templates/Empty/game/art/gui/StartupGui.gui rename to Templates/BaseGame/game/data/ui/scripts/guis/startupGui.gui diff --git a/Templates/Empty/game/core/scripts/gui/help.cs b/Templates/BaseGame/game/data/ui/scripts/help.cs similarity index 100% rename from Templates/Empty/game/core/scripts/gui/help.cs rename to Templates/BaseGame/game/data/ui/scripts/help.cs diff --git a/Templates/BaseGame/game/data/ui/scripts/joinServerMenu.cs b/Templates/BaseGame/game/data/ui/scripts/joinServerMenu.cs new file mode 100644 index 000000000..5529ebaed --- /dev/null +++ b/Templates/BaseGame/game/data/ui/scripts/joinServerMenu.cs @@ -0,0 +1,143 @@ + +function JoinServerMenu::onWake() +{ + // Double check the status. Tried setting this the control + // inactive to start with, but that didn't seem to work. + JoinServerJoinBtn.setActive(JS_serverList.rowCount() > 0); +} + +//---------------------------------------- +function JoinServerMenu::query(%this) +{ + queryMasterServer( + 0, // Query flags + $Client::GameTypeQuery, // gameTypes + $Client::MissionTypeQuery, // missionType + 0, // minPlayers + 100, // maxPlayers + 0, // maxBots + 2, // regionMask + 0, // maxPing + 100, // minCPU + 0 // filterFlags + ); +} + +//---------------------------------------- +function JoinServerMenu::queryLan(%this) +{ + queryLANServers( + $pref::Net::Port, // lanPort for local queries + 0, // Query flags + $Client::GameTypeQuery, // gameTypes + $Client::MissionTypeQuery, // missionType + 0, // minPlayers + 100, // maxPlayers + 0, // maxBots + 2, // regionMask + 0, // maxPing + 100, // minCPU + 0 // filterFlags + ); +} + +//---------------------------------------- +function JoinServerMenu::cancel(%this) +{ + cancelServerQuery(); + JS_queryStatus.setVisible(false); +} + + +//---------------------------------------- +function JoinServerMenu::join(%this) +{ + cancelServerQuery(); + %index = JS_serverList.getSelectedId(); + + JoinGame(%index); +} + +//---------------------------------------- +function JoinServerMenu::refresh(%this) +{ + cancelServerQuery(); + %index= JS_serverList.getSelectedId(); + + // The server info index is stored in the row along with the + // rest of displayed info. + if( setServerInfo( %index ) ) + querySingleServer( $ServerInfo::Address, 0 ); +} + +//---------------------------------------- +function JoinServerMenu::refreshSelectedServer( %this ) +{ + querySingleServer( $JoinGameAddress, 0 ); +} + +//---------------------------------------- +function JoinServerMenu::exit(%this) +{ + cancelServerQuery(); + + Canvas.popDialog(JoinServerMenu); +} + +//---------------------------------------- +function JoinServerMenu::update(%this) +{ + // Copy the servers into the server list. + JS_queryStatus.setVisible(false); + JS_serverList.clear(); + %sc = getServerCount(); + for( %i = 0; %i < %sc; %i ++ ) { + setServerInfo(%i); + JS_serverList.addRow( %i, + $ServerInfo::Name TAB + $ServerInfo::Ping TAB + $ServerInfo::PlayerCount @ "/" @ $ServerInfo::MaxPlayers TAB + $ServerInfo::Version TAB + $ServerInfo::MissionName + ); + } + JS_serverList.sort(0); + JS_serverList.setSelectedRow(0); + JS_serverList.scrollVisible(0); + + JoinServerJoinBtn.setActive(JS_serverList.rowCount() > 0); +} + +//---------------------------------------- +function onServerQueryStatus(%status, %msg, %value) +{ + echo("ServerQuery: " SPC %status SPC %msg SPC %value); + // Update query status + // States: start, update, ping, query, done + // value = % (0-1) done for ping and query states + if (!JS_queryStatus.isVisible()) + JS_queryStatus.setVisible(true); + + switch$ (%status) { + case "start": + JoinServerJoinBtn.setActive(false); + JoinServerQryInternetBtn.setActive(false); + JS_statusText.setText(%msg); + JS_statusBar.setValue(0); + JS_serverList.clear(); + + case "ping": + JS_statusText.setText("Ping Servers"); + JS_statusBar.setValue(%value); + + case "query": + JS_statusText.setText("Query Servers"); + JS_statusBar.setValue(%value); + + case "done": + JoinServerQryInternetBtn.setActive(true); + JS_queryStatus.setVisible(false); + JS_status.setText(%msg); + JoinServerMenu.update(); + } +} diff --git a/Templates/BaseGame/game/data/ui/scripts/mainMenu.cs b/Templates/BaseGame/game/data/ui/scripts/mainMenu.cs new file mode 100644 index 000000000..3a3b22f61 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/scripts/mainMenu.cs @@ -0,0 +1,41 @@ +function MainMenuGui::onWake(%this) +{ + if (isFunction("getWebDeployment") && + getWebDeployment() && + isObject(%this-->ExitButton)) + %this-->ExitButton.setVisible(false); + + MainMenuButtonContainer.hidden = false; +} + +function MainMenuGui::openSinglePlayerMenu(%this) +{ + $pref::HostMultiPlayer=false; + Canvas.pushDialog(ChooseLevelDlg); + ChooseLevelDlg.returnGui = %this; + MainMenuButtonContainer.hidden = true; + MainMenuAppLogo.setBitmap("data/ui/art/Torque-3D-logo"); +} + +function MainMenuGui::openMultiPlayerMenu(%this) +{ + $pref::HostMultiPlayer=true; + Canvas.pushDialog(ChooseLevelDlg); + ChooseLevelDlg.returnGui = %this; + MainMenuButtonContainer.hidden = true; + MainMenuAppLogo.setBitmap("data/ui/art/Torque-3D-logo"); +} + +function MainMenuGui::openOptionsMenu(%this) +{ + Canvas.pushDialog(OptionsMenu); + OptionsMenu.returnGui = %this; + MainMenuButtonContainer.hidden = true; + MainMenuAppLogo.setBitmap("data/ui/art/Torque-3D-logo"); +} + +function MainMenuGui::onReturnTo(%this) +{ + MainMenuButtonContainer.hidden = false; + MainMenuAppLogo.setBitmap("data/ui/art/Torque-3D-logo-shortcut"); +} \ No newline at end of file diff --git a/Templates/BaseGame/game/data/ui/scripts/messageBoxes.cs b/Templates/BaseGame/game/data/ui/scripts/messageBoxes.cs new file mode 100644 index 000000000..9a130b7ca --- /dev/null +++ b/Templates/BaseGame/game/data/ui/scripts/messageBoxes.cs @@ -0,0 +1,290 @@ +//----------------------------------------------------------------------------- +// 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. +//----------------------------------------------------------------------------- + + +// Cleanup Dialog created by 'core' +if( isObject( MessageBoxYesNoDlg ) ) + MessageBoxYesNoDlg.delete(); +if( isObject( MessageBoxOKDlg ) ) + MessageBoxOKDlg.delete(); + +// Load Editor Dialogs +exec("./guis/messageBoxOk.gui"); +exec("./guis/messageBoxYesNo.gui"); + +// -------------------------------------------------------------------- +// Message Sound +// -------------------------------------------------------------------- +/*new SFXDescription(MessageBoxAudioDescription) +{ + volume = 1.0; + isLooping = false; + is3D = false; + channel = $GuiAudioType; +}; + +new SFXProfile(messageBoxBeep) +{ + filename = "./messageBoxSound"; + description = MessageBoxAudioDescription; + preload = true; +};*/ + + + + +//--------------------------------------------------------------------------------------------- +// messageCallback +// Calls a callback passed to a message box. +//--------------------------------------------------------------------------------------------- +function messageCallback(%dlg, %callback) +{ + Canvas.popDialog(%dlg); + eval(%callback); +} + +//The # in the function passed replaced with the output +//of the preset menu. +function IOCallback(%dlg, %callback) +{ + %id = IODropdownMenu.getSelected(); + %text = IODropdownMenu.getTextById(%id); + %callback = strreplace(%callback, "#", %text); + eval(%callback); + + Canvas.popDialog(%dlg); +} + +//--------------------------------------------------------------------------------------------- +// MBSetText +// Sets the text of a message box and resizes it to accomodate the new string. +//--------------------------------------------------------------------------------------------- +function MBSetText(%text, %frame, %msg) +{ + // Get the extent of the text box. + %ext = %text.getExtent(); + // Set the text in the center of the text box. + %text.setText("" @ %msg); + // Force the textbox to resize itself vertically. + %text.forceReflow(); + // Grab the new extent of the text box. + %newExtent = %text.getExtent(); + + // Get the vertical change in extent. + %deltaY = getWord(%newExtent, 1) - getWord(%ext, 1); + + // Resize the window housing the text box. + %windowPos = %frame.getPosition(); + %windowExt = %frame.getExtent(); + %frame.resize(getWord(%windowPos, 0), getWord(%windowPos, 1) - (%deltaY / 2), + getWord(%windowExt, 0), getWord(%windowExt, 1) + %deltaY); + + %frame.canMove = "0"; + //%frame.canClose = "0"; + %frame.resizeWidth = "0"; + %frame.resizeHeight = "0"; + %frame.canMinimize = "0"; + %frame.canMaximize = "0"; + + //sfxPlayOnce( messageBoxBeep ); +} + +//--------------------------------------------------------------------------------------------- +// Various message box display functions. Each one takes a window title, a message, and a +// callback for each button. +//--------------------------------------------------------------------------------------------- + +function MessageBoxOK(%title, %message, %callback) +{ + MBOKFrame.text = %title; + Canvas.pushDialog(MessageBoxOKDlg); + MBSetText(MBOKText, MBOKFrame, %message); + MessageBoxOKDlg.callback = %callback; +} + +function MessageBoxOKDlg::onSleep( %this ) +{ + %this.callback = ""; +} + +function MessageBoxOKCancel(%title, %message, %callback, %cancelCallback) +{ + MBOKCancelFrame.text = %title; + Canvas.pushDialog(MessageBoxOKCancelDlg); + MBSetText(MBOKCancelText, MBOKCancelFrame, %message); + MessageBoxOKCancelDlg.callback = %callback; + MessageBoxOKCancelDlg.cancelCallback = %cancelCallback; +} + +function MessageBoxOKCancelDlg::onSleep( %this ) +{ + %this.callback = ""; +} + +function MessageBoxOKCancelDetails(%title, %message, %details, %callback, %cancelCallback) +{ + if(%details $= "") + { + MBOKCancelDetailsButton.setVisible(false); + } + + MBOKCancelDetailsScroll.setVisible(false); + + MBOKCancelDetailsFrame.setText( %title ); + + Canvas.pushDialog(MessageBoxOKCancelDetailsDlg); + MBSetText(MBOKCancelDetailsText, MBOKCancelDetailsFrame, %message); + MBOKCancelDetailsInfoText.setText(%details); + + %textExtent = MBOKCancelDetailsText.getExtent(); + %textExtentY = getWord(%textExtent, 1); + %textPos = MBOKCancelDetailsText.getPosition(); + %textPosY = getWord(%textPos, 1); + + %extentY = %textPosY + %textExtentY + 65; + + MBOKCancelDetailsInfoText.setExtent(285, 128); + + MBOKCancelDetailsFrame.setExtent(300, %extentY); + + MessageBoxOKCancelDetailsDlg.callback = %callback; + MessageBoxOKCancelDetailsDlg.cancelCallback = %cancelCallback; + + MBOKCancelDetailsFrame.defaultExtent = MBOKCancelDetailsFrame.getExtent(); +} + +function MBOKCancelDetailsToggleInfoFrame() +{ + if(!MBOKCancelDetailsScroll.isVisible()) + { + MBOKCancelDetailsScroll.setVisible(true); + MBOKCancelDetailsText.forceReflow(); + %textExtent = MBOKCancelDetailsText.getExtent(); + %textExtentY = getWord(%textExtent, 1); + %textPos = MBOKCancelDetailsText.getPosition(); + %textPosY = getWord(%textPos, 1); + + %verticalStretch = %textExtentY; + + if((%verticalStretch > 260) || (%verticalStretch < 0)) + %verticalStretch = 260; + + %extent = MBOKCancelDetailsFrame.defaultExtent; + %height = getWord(%extent, 1); + + %posY = %textPosY + %textExtentY + 10; + %posX = getWord(MBOKCancelDetailsScroll.getPosition(), 0); + MBOKCancelDetailsScroll.setPosition(%posX, %posY); + MBOKCancelDetailsScroll.setExtent(getWord(MBOKCancelDetailsScroll.getExtent(), 0), %verticalStretch); + MBOKCancelDetailsFrame.setExtent(300, %height + %verticalStretch + 10); + } else + { + %extent = MBOKCancelDetailsFrame.defaultExtent; + %width = getWord(%extent, 0); + %height = getWord(%extent, 1); + MBOKCancelDetailsFrame.setExtent(%width, %height); + MBOKCancelDetailsScroll.setVisible(false); + } +} + +function MessageBoxOKCancelDetailsDlg::onSleep( %this ) +{ + %this.callback = ""; +} + +function MessageBoxYesNo(%title, %message, %yesCallback, %noCallback) +{ + MBYesNoFrame.text = %title; + Canvas.pushDialog(MessageBoxYesNoDlg); + MBSetText(MBYesNoText, MBYesNoFrame, %message); + MessageBoxYesNoDlg.yesCallBack = %yesCallback; + MessageBoxYesNoDlg.noCallback = %noCallBack; +} + +function MessageBoxYesNoCancel(%title, %message, %yesCallback, %noCallback, %cancelCallback) +{ + MBYesNoCancelFrame.text = %title; + MessageBoxYesNoDlg.profile = "GuiOverlayProfile"; + Canvas.pushDialog(MessageBoxYesNoCancelDlg); + MBSetText(MBYesNoCancelText, MBYesNoCancelFrame, %message); + MessageBoxYesNoCancelDlg.yesCallBack = %yesCallback; + MessageBoxYesNoCancelDlg.noCallback = %noCallBack; + MessageBoxYesNoCancelDlg.cancelCallback = %cancelCallback; +} + +function MessageBoxYesNoDlg::onSleep( %this ) +{ + %this.yesCallback = ""; + %this.noCallback = ""; +} + +//--------------------------------------------------------------------------------------------- +// MessagePopup +// Displays a message box with no buttons. Disappears after %delay milliseconds. +//--------------------------------------------------------------------------------------------- +function MessagePopup(%title, %message, %delay) +{ + // Currently two lines max. + MessagePopFrame.setText(%title); + Canvas.pushDialog(MessagePopupDlg); + MBSetText(MessagePopText, MessagePopFrame, %message); + if (%delay !$= "") + schedule(%delay, 0, CloseMessagePopup); +} + +//--------------------------------------------------------------------------------------------- +// IODropdown +// By passing in a simgroup or simset, the user will be able to choose a child of that group +// through a guiPopupMenuCtrl +//--------------------------------------------------------------------------------------------- + +function IODropdown(%title, %message, %simgroup, %callback, %cancelCallback) +{ + IODropdownFrame.text = %title; + Canvas.pushDialog(IODropdownDlg); + MBSetText(IODropdownText, IODropdownFrame, %message); + + if(isObject(%simgroup)) + { + for(%i = 0; %i < %simgroup.getCount(); %i++) + IODropdownMenu.add(%simgroup.getObject(%i).getName()); + + } + + IODropdownMenu.sort(); + IODropdownMenu.setFirstSelected(0); + + IODropdownDlg.callback = %callback; + IODropdownDlg.cancelCallback = %cancelCallback; +} + +function IODropdownDlg::onSleep( %this ) +{ + %this.callback = ""; + %this.cancelCallback = ""; + IODropdownMenu.clear(); +} + +function CloseMessagePopup() +{ + Canvas.popDialog(MessagePopupDlg); +} diff --git a/Templates/BaseGame/game/data/ui/scripts/optionsList.cs b/Templates/BaseGame/game/data/ui/scripts/optionsList.cs new file mode 100644 index 000000000..ad1da0759 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/scripts/optionsList.cs @@ -0,0 +1,437 @@ +new SimGroup( MeshQualityGroup ) +{ + class = "GraphicsOptionsMenuGroup"; + + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "High"; + + key["$pref::TS::detailAdjust"] = 1.5; + key["$pref::TS::skipRenderDLs"] = 0; + }; + new ArrayObject( ) + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Medium"; + + key["$pref::TS::detailAdjust"] = 1.0; + key["$pref::TS::skipRenderDLs"] = 0; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Low"; + + key["$pref::TS::detailAdjust"] = 0.75; + key["$pref::TS::skipRenderDLs"] = 0; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Lowest"; + + key["$pref::TS::detailAdjust"] = 0.5; + key["$pref::TS::skipRenderDLs"] = 1; + }; +}; + +new SimGroup( TextureQualityGroup ) +{ + class = "GraphicsOptionsMenuGroup"; + + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "High"; + + key["$pref::Video::textureReductionLevel"] = 0; + key["$pref::Reflect::refractTexScale"] = 1.25; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Medium"; + + key["$pref::Video::textureReductionLevel"] = 0; + key["$pref::Reflect::refractTexScale"] = 1; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Low"; + + key["$pref::Video::textureReductionLevel"] = 1; + key["$pref::Reflect::refractTexScale"] = 0.75; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Lowest"; + + key["$pref::Video::textureReductionLevel"] = 2; + key["$pref::Reflect::refractTexScale"] = 0.5; + }; +}; + +new SimGroup( GroundCoverDensityGroup ) +{ + class = "GraphicsOptionsMenuGroup"; + + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "High"; + + key["$pref::GroundCover::densityScale"] = 1.0; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Medium"; + + key["$pref::GroundCover::densityScale"] = 0.75; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Low"; + + key["$pref::GroundCover::densityScale"] = 0.5; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Lowest"; + + key["$pref::GroundCover::densityScale"] = 0.25; + }; +}; + +new SimGroup( DecalLifetimeGroup ) +{ + class = "GraphicsOptionsMenuGroup"; + + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "High"; + + key["$pref::decalMgr::enabled"] = true; + key["$pref::Decals::lifeTimeScale"] = 1; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Medium"; + + key["$pref::decalMgr::enabled"] = true; + key["$pref::Decals::lifeTimeScale"] = 0.5; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Low"; + + key["$pref::decalMgr::enabled"] = true; + key["$pref::Decals::lifeTimeScale"] = 0.25; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "None"; + + key["$pref::decalMgr::enabled"] = false; + }; +}; + +new SimGroup( TerrainQualityGroup ) +{ + class = "GraphicsOptionsMenuGroup"; + + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "High"; + + key["$pref::Terrain::lodScale"] = 0.75; + key["$pref::Terrain::detailScale"] = 1.5; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Medium"; + + key["$pref::Terrain::lodScale"] = 1.0; + key["$pref::Terrain::detailScale"] = 1.0; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Low"; + + key["$pref::Terrain::lodScale"] = 1.5; + key["$pref::Terrain::detailScale"] = 0.75; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Lowest"; + + key["$pref::Terrain::lodScale"] = 2.0; + key["$pref::Terrain::detailScale"] = 0.5; + }; +}; + +//Shadows and Lighting +new SimGroup( ShadowQualityList ) +{ + class = "GraphicsOptionsMenuGroup"; + + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "High"; + + key["$pref::lightManager"] = "Advanced Lighting"; + key["$pref::Shadows::disable"] = false; + key["$pref::Shadows::textureScalar"] = 1.0; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Medium"; + + key["$pref::lightManager"] = "Advanced Lighting"; + key["$pref::Shadows::disable"] = false; + key["$pref::Shadows::textureScalar"] = 0.5; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Low"; + + key["$pref::lightManager"] = "Advanced Lighting"; + key["$pref::Shadows::disable"] = false; + key["$pref::Shadows::textureScalar"] = 0.25; + + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "None"; + + key["$pref::lightManager"] = "Advanced Lighting"; + key["$pref::Shadows::disable"] = true; + key["$pref::Shadows::textureScalar"] = 0.5; + }; +}; + +new SimGroup( ShadowDistanceList ) +{ + class = "GraphicsOptionsMenuGroup"; + + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Highest"; + + key["$pref::Shadows::drawDistance"] = 2; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "High"; + + key["$pref::Shadows::drawDistance"] = 1.5; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Medium"; + + key["$pref::Shadows::drawDistance"] = 1; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Low"; + + key["$pref::Shadows::drawDistance"] = 0.5; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Lowest"; + + key["$pref::Shadows::drawDistance"] = 0.25; + }; +}; + +new SimGroup( SoftShadowList ) +{ + class = "GraphicsOptionsMenuGroup"; + + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "High"; + + key["$pref::Shadows::filterMode"] = "SoftShadowHighQuality"; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Low"; + + key["$pref::Shadows::filterMode"] = "SoftShadow"; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Off"; + + key["$pref::Shadows::filterMode"] = "None"; + }; +}; + +new SimGroup( LightDistanceList ) +{ + class = "GraphicsOptionsMenuGroup"; + + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Highest"; + + key["$pref::Lights::drawDistance"] = 2; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "High"; + + key["$pref::Lights::drawDistance"] = 1.5; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Medium"; + + key["$pref::Lights::drawDistance"] = 1; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Low"; + + key["$pref::Lights::drawDistance"] = 0.5; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Lowest"; + + key["$pref::Lights::drawDistance"] = 0.25; + }; +}; + +new SimGroup( ShaderQualityGroup ) +{ + class = "GraphicsOptionsMenuGroup"; + + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "High"; + + key["$pref::Video::disablePixSpecular"] = false; + key["$pref::Video::disableNormalmapping"] = false; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Low"; + + key["$pref::Video::disablePixSpecular"] = true; + key["$pref::Video::disableNormalmapping"] = true; + }; +}; \ No newline at end of file diff --git a/Templates/BaseGame/game/data/ui/scripts/optionsMenu.cs b/Templates/BaseGame/game/data/ui/scripts/optionsMenu.cs new file mode 100644 index 000000000..40807691c --- /dev/null +++ b/Templates/BaseGame/game/data/ui/scripts/optionsMenu.cs @@ -0,0 +1,473 @@ +//options settings + +//Screen and Display menu +//Renderer Mode +//Screen resolution +//Windowed/fullscreen(borderless?) +//VSync + +//Screen brightness +//screen brightness +//screen gamma + +//Lighting Menu +//Shadow Distance(Distance shadows are drawn to. Also affects shadowmap slices) +//Shadow Quality(Resolution of shadows rendered, setting to none disables dynamic shadows) +//Soft Shadows(Whether shadow softening is used) +//Shadow caching(If the lights enable it, shadow caching is activated) +//Light Draw Distance(How far away lights are still drawn. Doesn't impact vector lights like the sun) + +//Mesh and Textures Menu +//Draw distance(Overall draw distance) -slider +//Object draw distance(Draw distance from small/unimportant objects) -slider +//Mesh quality +//Texture quality +//Foliage draw distance +//Terrain Quality +//Decal Quality + +//Effects Menu +//Parallax +//HDR +//Light shafts +//Motion Blur +//Depth of Field +//SSAO +//AA(ModelXAmount)[defualt is FXAA] +//Anisotropic filtering + +//Keybinds + +//Camera +//horizontal mouse sensitivity +//vert mouse sensitivity +//invert vertical +//zoom mouse sensitivities(both horz/vert) +//headbob +//FOV + +function OptionsMenu::onWake(%this) +{ + OptionsMain.hidden = false; + ControlsMenu.hidden = true; + GraphicsMenu.hidden = true; + AudioMenu.hidden = true; + CameraMenu.hidden = true; + ScreenBrightnessMenu.hidden = true; + + OptionsOKButton.hidden = false; + OptionsCancelButton.hidden = false; + OptionsDefaultsButton.hidden = false; +} + +function OptionsMenuOKButton::onClick(%this) +{ + //save the settings and then back out + + OptionsMenu.backOut(); +} + +function OptionsMenuCancelButton::onClick(%this) +{ + //we don't save, so go straight to backing out of the menu + OptionsMenu.backOut(); +} + +function OptionsMenuDefaultsButton::onClick(%this) +{ + //we don't save, so go straight to backing out of the menu + OptionsMenu.backOut(); +} + +function ControlsSettingsMenuButton::onClick(%this) +{ + OptionsMain.hidden = true; + ControlsMenu.hidden = false; + + KeyboardControlPanel.hidden = false; + MouseControlPanel.hidden = true; + + ControlsMenu.reload(); +} + +function GraphicsSettingsMenuButton::onClick(%this) +{ + OptionsMain.hidden = true; + GraphicsMenu.hidden = false; +} + +function CameraSettingsMenuButton::onClick(%this) +{ + OptionsMain.hidden = true; + CameraMenu.hidden = false; + + CameraMenu.loadSettings(); +} + +function AudioSettingsMenuButton::onClick(%this) +{ + OptionsMain.hidden = true; + AudioMenu.hidden = false; + AudioMenu.loadSettings(); +} + +function ScreenBrSettingsMenuButton::onClick(%this) +{ + OptionsMain.hidden = true; + ScreenBrightnessMenu.hidden = false; +} + +function OptionsMenu::backOut(%this) +{ + //save the settings and then back out + if(OptionsMain.hidden == false) + { + //we're not in a specific menu, so we're actually exiting + Canvas.popDialog(OptionsMenu); + + if(isObject(OptionsMenu.returnGui) && OptionsMenu.returnGui.isMethod("onReturnTo")) + OptionsMenu.returnGui.onReturnTo(); + } + else + { + OptionsMain.hidden = false; + ControlsMenu.hidden = true; + GraphicsMenu.hidden = true; + CameraMenu.hidden = true; + AudioMenu.hidden = true; + ScreenBrightnessMenu.hidden = true; + } +} + +function OptionsMenu::addSettingOption(%this, %arrayTarget) +{ + %graphicsOption = OptionsMenu.tamlReader.read("data/ui/scripts/guis/graphicsMenuSettingsCtrl.taml"); + + %arrayTarget.add(%graphicsOption); + + return %graphicsOption; +} + +function OptionsMenu::addSliderOption(%this, %arrayTarget, %range, %ticks, %variable, %value, %class) +{ + %graphicsOption = OptionsMenu.tamlReader.read("data/ui/scripts/guis/graphicsMenuSettingsSlider.taml"); + + %arrayTarget.add(%graphicsOption); + + if(%range !$= "") + { + %graphicsOption-->slider.range = %range; + } + + if(%ticks !$= "") + { + %graphicsOption-->slider.ticks = %ticks; + } + + if(%variable !$= "") + { + %graphicsOption-->slider.variable = %variable; + } + + if(%value !$= "") + { + %graphicsOption-->slider.setValue(%value); + } + + if(%class !$= "") + { + %graphicsOption-->slider.className = %class; + } + else + %graphicsOption-->slider.className = OptionsMenuSlider; + + %graphicsOption-->slider.snap = true; + + %graphicsOption-->slider.onValueSet(); + + return %graphicsOption; +} + +function OptionsMenuSlider::onMouseDragged(%this) +{ + %this.onValueSet(); +} + +function OptionsMenuSlider::onValueSet(%this) +{ + %this.getParent().getParent()-->valueText.setText(mRound(%this.value * 10)); +} + +function FOVOptionSlider::onMouseDragged(%this) +{ + %this.onValueSet(); +} + +function FOVOptionSlider::onValueSet(%this) +{ + %this.getParent().getParent()-->valueText.setText(mRound(%this.value)); +} + +/// Returns true if the current quality settings equal +/// this graphics quality level. +function OptionsMenuSettingLevel::isCurrent( %this ) +{ + // Test each pref to see if the current value + // equals our stored value. + + for ( %i=0; %i < %this.count(); %i++ ) + { + %pref = %this.getKey( %i ); + %value = %this.getValue( %i ); + + %prefVarValue = getVariable( %pref ); + if ( getVariable( %pref ) !$= %value ) + return false; + } + + return true; +} +// ============================================================================= +// CAMERA MENU +// ============================================================================= +function CameraMenu::onWake(%this) +{ + +} + +function CameraMenu::apply(%this) +{ + setFOV($pref::Player::defaultFov); +} + +function CameraMenu::loadSettings(%this) +{ + CameraMenuOptionsArray.clear(); + + %option = OptionsMenu.addSettingOption(CameraMenuOptionsArray); + %option-->nameText.setText("Invert Vertical"); + %option.qualitySettingGroup = InvertVerticalMouse; + %option.init(); + + %option = OptionsMenu.addSliderOption(CameraMenuOptionsArray, "0.1 1", 8, "$pref::Input::VertMouseSensitivity", $pref::Input::VertMouseSensitivity); + %option-->nameText.setText("Vertical Sensitivity"); + + %option = OptionsMenu.addSliderOption(CameraMenuOptionsArray, "0.1 1", 8, "$pref::Input::HorzMouseSensitivity", $pref::Input::HorzMouseSensitivity); + %option-->nameText.setText("Horizontal Sensitivity"); + + %option = OptionsMenu.addSliderOption(CameraMenuOptionsArray, "0.1 1", 8, "$pref::Input::ZoomVertMouseSensitivity", $pref::Input::ZoomVertMouseSensitivity); + %option-->nameText.setText("Zoom Vertical Sensitivity"); + + %option = OptionsMenu.addSliderOption(CameraMenuOptionsArray, "0.1 1", 8, "$pref::Input::ZoomHorzMouseSensitivity", $pref::Input::ZoomHorzMouseSensitivity); + %option-->nameText.setText("Zoom Horizontal Sensitivity"); + + %option = OptionsMenu.addSliderOption(CameraMenuOptionsArray, "65 90", 25, "$pref::Player::defaultFov", $pref::Player::defaultFov, FOVOptionSlider); + %option-->nameText.setText("Field of View"); + + CameraMenuOptionsArray.refresh(); +} + +function CameraMenuOKButton::onClick(%this) +{ + //save the settings and then back out + CameraMenu.apply(); + OptionsMenu.backOut(); +} + +function CameraMenuDefaultsButton::onClick(%this) +{ + +} +// ============================================================================= +// AUDIO MENU +// ============================================================================= +$AudioTestHandle = 0; +// Description to use for playing the volume test sound. This isn't +// played with the description of the channel that has its volume changed +// because we know nothing about the playback state of the channel. If it +// is paused or stopped, the test sound would not play then. +$AudioTestDescription = new SFXDescription() +{ + sourceGroup = AudioChannelMaster; +}; + +function AudioMenu::loadSettings(%this) +{ + // Audio + //OptAudioHardwareToggle.setStateOn($pref::SFX::useHardware); + //OptAudioHardwareToggle.setActive( true ); + + %this-->OptAudioVolumeMaster.setValue( $pref::SFX::masterVolume ); + %this-->OptAudioVolumeShell.setValue( $pref::SFX::channelVolume[ $GuiAudioType] ); + %this-->OptAudioVolumeSim.setValue( $pref::SFX::channelVolume[ $SimAudioType ] ); + %this-->OptAudioVolumeMusic.setValue( $pref::SFX::channelVolume[ $MusicAudioType ] ); + + AudioMenuSoundDriver.clear(); + %buffer = sfxGetAvailableDevices(); + %count = getRecordCount( %buffer ); + for(%i = 0; %i < %count; %i++) + { + %record = getRecord(%buffer, %i); + %provider = getField(%record, 0); + + if ( AudioMenuSoundDriver.findText( %provider ) == -1 ) + AudioMenuSoundDriver.add( %provider, %i ); + } + + AudioMenuSoundDriver.sort(); + + %selId = AudioMenuSoundDriver.findText($pref::SFX::provider); + if ( %selId == -1 ) + AudioMenuSoundDriver.setFirstSelected(); + else + AudioMenuSoundDriver.setSelected( %selId ); +} + +function AudioMenu::loadDevices(%this) +{ + if(!isObject(SoundDeviceGroup)) + { + new SimGroup( SoundDeviceGroup ); + } + else + { + SoundDeviceGroup.clear(); + } + + %buffer = sfxGetAvailableDevices(); + %count = getRecordCount( %buffer ); + for (%i = 0; %i < %count; %i++) + { + %record = getRecord(%buffer, %i); + %provider = getField(%record, 0); + %device = getField(%record, 1); + + if($pref::SFX::provider !$= %provider) + continue; + + %setting = new ArrayObject() + { + class = "OptionsMenuSettingLevel"; + caseSensitive = true; + + displayName = %device; + + key["$pref::SFX::Device"] = %device; + }; + + SoundDeviceGroup.add(%setting); + } +} + +function AudioMenu::apply(%this) +{ + sfxSetMasterVolume( $pref::SFX::masterVolume ); + + sfxSetChannelVolume( $GuiAudioType, $pref::SFX::channelVolume[ $GuiAudioType ] ); + sfxSetChannelVolume( $SimAudioType, $pref::SFX::channelVolume[ $SimAudioType ] ); + sfxSetChannelVolume( $MusicAudioType, $pref::SFX::channelVolume[ $MusicAudioType ] ); + + if ( !sfxCreateDevice( $pref::SFX::provider, + $pref::SFX::device, + $pref::SFX::useHardware, + -1 ) ) + error( "Unable to create SFX device: " @ $pref::SFX::provider + SPC $pref::SFX::device + SPC $pref::SFX::useHardware ); + + if( !isObject( $AudioTestHandle ) ) + { + sfxPlay(menuButtonPressed); + } +} + +function AudioMenuOKButton::onClick(%this) +{ + //save the settings and then back out + AudioMenu.apply(); + OptionsMenu.backOut(); +} + +function AudioMenuDefaultsButton::onClick(%this) +{ + sfxInit(); + AudioMenu.loadSettings(); +} + +function OptAudioUpdateMasterVolume( %volume ) +{ + if( %volume == $pref::SFX::masterVolume ) + return; + + sfxSetMasterVolume( %volume ); + $pref::SFX::masterVolume = %volume; + + if( !isObject( $AudioTestHandle ) ) + $AudioTestHandle = sfxPlayOnce( AudioChannel, "art/sound/ui/volumeTest.wav" ); +} + +function OptAudioUpdateChannelVolume( %description, %volume ) +{ + %channel = sfxGroupToOldChannel( %description.sourceGroup ); + + if( %volume == $pref::SFX::channelVolume[ %channel ] ) + return; + + sfxSetChannelVolume( %channel, %volume ); + $pref::SFX::channelVolume[ %channel ] = %volume; + + if( !isObject( $AudioTestHandle ) ) + { + $AudioTestDescription.volume = %volume; + $AudioTestHandle = sfxPlayOnce( $AudioTestDescription, "art/sound/ui/volumeTest.wav" ); + } +} + +function AudioMenuSoundDriver::onSelect( %this, %id, %text ) +{ + // Skip empty provider selections. + if ( %text $= "" ) + return; + + $pref::SFX::provider = %text; + AudioMenuSoundDevice.clear(); + + %buffer = sfxGetAvailableDevices(); + %count = getRecordCount( %buffer ); + for(%i = 0; %i < %count; %i++) + { + %record = getRecord(%buffer, %i); + %provider = getField(%record, 0); + %device = getField(%record, 1); + + if (%provider !$= %text) + continue; + + if ( AudioMenuSoundDevice.findText( %device ) == -1 ) + AudioMenuSoundDevice.add( %device, %i ); + } + + // Find the previous selected device. + %selId = AudioMenuSoundDevice.findText($pref::SFX::device); + if ( %selId == -1 ) + AudioMenuSoundDevice.setFirstSelected(); + else + AudioMenuSoundDevice.setSelected( %selId ); +} + +function AudioMenuSoundDevice::onSelect( %this, %id, %text ) +{ + // Skip empty selections. + if ( %text $= "" ) + return; + + $pref::SFX::device = %text; + + if ( !sfxCreateDevice( $pref::SFX::provider, + $pref::SFX::device, + $pref::SFX::useHardware, + -1 ) ) + error( "Unable to create SFX device: " @ $pref::SFX::provider + SPC $pref::SFX::device + SPC $pref::SFX::useHardware ); +} diff --git a/Templates/BaseGame/game/data/ui/scripts/pauseMenu.cs b/Templates/BaseGame/game/data/ui/scripts/pauseMenu.cs new file mode 100644 index 000000000..b23b423f0 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/scripts/pauseMenu.cs @@ -0,0 +1,30 @@ +function PauseMenu::onWake(%this) +{ + $timescale = 0; +} + +function PauseMenu::onSleep(%this) +{ + $timescale = 1; +} + +function PauseMenu::openOptionsMenu(%this) +{ + Canvas.pushDialog(OptionsMenu); + OptionsMenu.returnGui = %this; + PauseOptionsMain.hidden = true; +} + +function PauseMenu::openControlsMenu(%this) +{ + Canvas.pushDialog(OptionsMenu); + OptionsMenu.returnGui = %this; + PauseOptionsMain.hidden = true; + OptionsMain.hidden = true; + ControlsMenu.hidden = false; +} + +function PauseMenu::onReturnTo(%this) +{ + PauseOptionsMain.hidden = false; +} \ No newline at end of file diff --git a/Templates/Empty/game/core/scripts/client/metrics.cs b/Templates/BaseGame/game/data/ui/scripts/profiler.cs similarity index 75% rename from Templates/Empty/game/core/scripts/client/metrics.cs rename to Templates/BaseGame/game/data/ui/scripts/profiler.cs index e881b9f7f..bc73338bf 100644 --- a/Templates/Empty/game/core/scripts/client/metrics.cs +++ b/Templates/BaseGame/game/data/ui/scripts/profiler.cs @@ -20,8 +20,115 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -// load gui used to display various metric outputs -exec("~/art/gui/FrameOverlayGui.gui"); +$MetricsParamArray[0] = "fps "; +$MetricsParamArray[1] = "shadow "; +$MetricsParamArray[2] = "gfx "; +$MetricsParamArray[3] = "sfx "; +$MetricsParamArray[4] = "terrain "; +$MetricsParamArray[5] = "groundcover "; +$MetricsParamArray[6] = "forest "; +$MetricsParamArray[7] = "net "; +$EnableProfiler = false; +$string = ""; //string used to collet the parameters for metrics function + +function showMetrics(%var) +{ + $string = ""; + if(ppShowFps.getValue()) + { + $string = $string @ $MetricsParamArray[0]; + } + if(ppShowShadow.getValue()) + { + $string = $string @ $MetricsParamArray[1]; + } + if(ppShowGfx.getValue()) + { + $string = $string @ $MetricsParamArray[2]; + } + if(ppShowSfx.getValue()) + { + $string = $string @ $MetricsParamArray[3]; + } + if(ppShowTerrain.getValue()) + { + $string = $string @ $MetricsParamArray[4]; + } + if(ppShowForest.getValue()) + { + $string = $string @ $MetricsParamArray[5]; + } + if(ppShowGroundcover.getValue()) + { + $string = $string @ $MetricsParamArray[6]; + } + if(ppShowNet.getValue()) + { + $string = $string @ $MetricsParamArray[7]; + } + + if(%var) + { + $EnableProfiler = !($EnableProfiler); + + if($EnableProfiler) + { + metrics($string); + } + else if((false == $EnableProfiler)) + { + metrics(); + } + } + else if($EnableProfiler) //will enter only when the enable/disable button was pressed + { + metrics($string); + } +} + +function showMetics(%var) +{ + if(%var) + { + metrics($string); + } + else if(true == $EnableProfiler) + { + $EnableProfiler = false; + metrics(); + } +} + +GlobalActionMap.bind(keyboard, "ctrl F2", showMetics); + +%guiContent = new GuiControl(FrameOverlayGui) { + profile = "GuiModelessDialogProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "0 0"; + extent = "640 480"; + minExtent = "8 8"; + visible = "True"; + setFirstResponder = "True"; + modal = "false"; + helpTag = "0"; + noCursor = true; + new GuiConsoleTextCtrl(TextOverlayControl) { + profile = "GuiConsoleTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "5 5"; + extent = "130 18"; + minExtent = "4 4"; + visible = "True"; + setFirstResponder = "True"; + modal = "True"; + helpTag = "0"; + expression = "10"; + command = "Canvas.popDialog(FrameOverlayGui);"; + accelerator = "escape"; + }; +}; // Note: To implement your own metrics overlay // just add a function with a name in the form @@ -192,6 +299,15 @@ function partMetricsCallback() return particleMetricsCallback(); } +function imposterMetricsCallback() +{ + return " | IMPOSTER |" @ + " Rendered: " @ $ImposterStats::rendered @ + " Batches: " @ $ImposterStats::batches @ + " DrawCalls: " @ $ImposterStats::drawCalls @ + " Polys: " @ $ImposterStats::polyCount @ + " RtChanges: " @ $ImposterStats::rtChanges; +} // alias function audioMetricsCallback() @@ -248,4 +364,4 @@ function metrics( %expr ) } else $GameCanvas.popDialog(FrameOverlayGui); -} +} \ No newline at end of file diff --git a/Templates/Empty/game/core/art/gui/profiles.cs b/Templates/BaseGame/game/data/ui/scripts/profiles.cs similarity index 57% rename from Templates/Empty/game/core/art/gui/profiles.cs rename to Templates/BaseGame/game/data/ui/scripts/profiles.cs index 13c4272f5..5e6303fb0 100644 --- a/Templates/Empty/game/core/art/gui/profiles.cs +++ b/Templates/BaseGame/game/data/ui/scripts/profiles.cs @@ -1,84 +1,77 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -// If we got back no prefs path modification -if( $Gui::fontCacheDirectory $= "") +if( !isObject( GuiMenuButtonProfile ) ) +new GuiControlProfile( GuiMenuButtonProfile ) { - $Gui::fontCacheDirectory = expandFilename( "~/fonts" ); -} - -// ---------------------------------------------------------------------------- -// GuiDefaultProfile is a special profile that all other profiles inherit -// defaults from. It must exist. -// ---------------------------------------------------------------------------- - -if( !isObject( GuiDefaultProfile ) ) -new GuiControlProfile (GuiDefaultProfile) -{ - tab = false; - canKeyFocus = false; - hasBitmapArray = false; - mouseOverSelected = false; - - // fill color - opaque = false; - fillColor = "242 241 240"; - fillColorHL ="228 228 235"; - fillColorSEL = "98 100 137"; - fillColorNA = "255 255 255 "; - - // border color - border = 0; - borderColor = "100 100 100"; - borderColorHL = "50 50 50 50"; - borderColorNA = "75 75 75"; - - // font - fontType = "Arial"; - fontSize = 14; - fontCharset = ANSI; - - fontColor = "0 0 0"; + opaque = true; + border = false; + fontSize = 18; + fontType = "Arial Bold"; + fontColor = "240 240 240"; fontColorHL = "0 0 0"; - fontColorNA = "0 0 0"; - fontColorSEL= "255 255 255"; + fontColorNA = "125 125 125"; + //fontColorSEL ="0 0 0"; + fixedExtent = false; + justify = "center"; + canKeyFocus = false; + bitmap = "data/ui/art/menu-button"; + hasBitmapArray = false; + soundButtonDown = menuButtonPressed; + soundButtonOver = menuButtonHover; + category = "Core"; +}; - // bitmap information - bitmap = ""; - bitmapBase = ""; - textOffset = "0 0"; +if( !isObject( GuiHighlightMenuButtonProfile ) ) +new GuiControlProfile( GuiHighlightMenuButtonProfile ) +{ + opaque = true; + border = false; + fontSize = 18; + fontType = "Arial Bold"; + fontColor = "240 240 240"; + fontColorHL = "0 0 0"; + fontColorNA = "125 125 125"; + //fontColorSEL ="0 0 0"; + fixedExtent = false; + justify = "center"; + canKeyFocus = false; + bitmap = "data/ui/art/selector-button-highlight-only"; + hasBitmapArray = false; + category = "Core"; +}; - // used by guiTextControl - modal = true; - justify = "left"; - autoSizeWidth = false; - autoSizeHeight = false; - returnTab = false; - numbersOnly = false; - cursorColor = "0 0 0 255"; +if( !isObject( GuiBlankMenuButtonProfile ) ) +new GuiControlProfile( GuiBlankMenuButtonProfile ) +{ + opaque = true; + border = false; + fontSize = 18; + fontType = "Arial Bold"; + fontColor = "200 200 200"; + fontColorHL = "255 255 255"; + fontColorNA = "200 200 200"; + //fontColorSEL ="0 0 0"; + fixedExtent = false; + justify = "center"; + canKeyFocus = false; + bitmap = "data/ui/art/selector-button-blank"; + hasBitmapArray = false; + soundButtonDown = menuButtonPressed; + soundButtonOver = menuButtonHover; + category = "Core"; +}; - // sounds - //soundButtonDown = ""; - //soundButtonOver = ""; +if( !isObject( GuiMenuTextProfile ) ) +new GuiControlProfile( GuiMenuTextProfile ) +{ + opaque = true; + border = false; + fontSize = 18; + fontType = "Arial Bold"; + fontColor = "240 240 240"; + fontColorHL = "0 0 0"; + fontColorNA = "125 125 125"; + fixedExtent = false; + justify = "center"; + category = "Core"; }; if( !isObject( GuiSolidDefaultProfile ) ) @@ -103,7 +96,7 @@ new GuiControlProfile( GuiGroupBorderProfile ) border = false; opaque = false; hasBitmapArray = true; - bitmap = "./images/group-border"; + bitmap = "data/ui/art/group-border"; category = "Core"; }; @@ -113,24 +106,7 @@ new GuiControlProfile( GuiTabBorderProfile ) border = false; opaque = false; hasBitmapArray = true; - bitmap = "./images/tab-border"; - category = "Core"; -}; - -if( !isObject( GuiToolTipProfile ) ) -new GuiControlProfile (GuiToolTipProfile) -{ - // fill color - fillColor = "239 237 222"; - - // border color - borderColor = "138 134 122"; - - // font - fontType = "Arial"; - fontSize = 14; - fontColor = "0 0 0"; - + bitmap = "data/ui/art/tab-border"; category = "Core"; }; @@ -152,26 +128,6 @@ new GuiControlProfile (GuiFrameSetProfile) category = "Core"; }; -if( !isObject( GuiWindowProfile ) ) -new GuiControlProfile (GuiWindowProfile) -{ - opaque = false; - border = 2; - fillColor = "242 241 240"; - fillColorHL = "221 221 221"; - fillColorNA = "200 200 200"; - fontColor = "50 50 50"; - fontColorHL = "0 0 0"; - bevelColorHL = "255 255 255"; - bevelColorLL = "0 0 0"; - text = "untitled"; - bitmap = "./images/window"; - textOffset = "8 4"; - hasBitmapArray = true; - justify = "left"; - category = "Core"; -}; - if( !isObject( GuiInputCtrlProfile ) ) new GuiControlProfile( GuiInputCtrlProfile ) { @@ -229,181 +185,30 @@ new GuiControlProfile( GuiMLTextProfile ) category = "Core"; }; +if( !isObject( GuiMLWhiteTextProfile ) ) +new GuiControlProfile( GuiMLWhiteTextProfile ) +{ + fontColor = "220 220 220"; + fontColorHL = "255 255 255"; + autoSizeWidth = true; + autoSizeHeight = true; + border = false; + category = "Core"; +}; + if( !isObject( GuiTextArrayProfile ) ) new GuiControlProfile( GuiTextArrayProfile : GuiTextProfile ) { - fontColor = "50 50 50"; + fontColor = "250 250 250"; fontColorHL = " 0 0 0"; fontColorSEL = "0 0 0"; - fillColor ="200 200 200"; - fillColorHL = "228 228 235"; - fillColorSEL = "200 200 200"; + fillColor ="50 50 50"; + fillColorHL = "125 125 125"; + fillColorSEL = "180 180 180"; border = false; category = "Core"; }; -if( !isObject( GuiTextEditProfile ) ) -new GuiControlProfile( GuiTextEditProfile ) -{ - opaque = true; - bitmap = "./images/textEdit"; - hasBitmapArray = true; - border = -2; // fix to display textEdit img - //borderWidth = "1"; // fix to display textEdit img - //borderColor = "100 100 100"; - fillColor = "242 241 240 0"; - fillColorHL = "255 255 255"; - fontColor = "0 0 0"; - fontColorHL = "255 255 255"; - fontColorSEL = "98 100 137"; - fontColorNA = "200 200 200"; - textOffset = "4 2"; - autoSizeWidth = false; - autoSizeHeight = true; - justify = "left"; - tab = true; - canKeyFocus = true; - category = "Core"; -}; - -if( !isObject( GuiProgressProfile ) ) -new GuiControlProfile( GuiProgressProfile ) -{ - opaque = false; - fillColor = "0 162 255 200"; - border = true; - borderColor = "50 50 50 200"; - category = "Core"; -}; - -if( !isObject( GuiProgressBitmapProfile ) ) -new GuiControlProfile( GuiProgressBitmapProfile ) -{ - border = false; - hasBitmapArray = true; - bitmap = "./images/loadingbar"; - category = "Core"; -}; - -if( !isObject( GuiProgressTextProfile ) ) -new GuiControlProfile( GuiProgressTextProfile ) -{ - fontSize = "14"; - fontType = "Arial"; - fontColor = "0 0 0"; - justify = "center"; - category = "Core"; -}; - -if( !isObject( GuiButtonProfile ) ) -new GuiControlProfile( GuiButtonProfile ) -{ - opaque = true; - border = true; - - fontColor = "50 50 50"; - fontColorHL = "0 0 0"; - fontColorNA = "200 200 200"; - //fontColorSEL ="0 0 0"; - fixedExtent = false; - justify = "center"; - canKeyFocus = false; - bitmap = "./images/button"; - hasBitmapArray = false; - category = "Core"; -}; - -if( !isObject( GuiMenuButtonProfile ) ) -new GuiControlProfile( GuiMenuButtonProfile ) -{ - opaque = true; - border = false; - fontSize = 18; - fontType = "Arial Bold"; - fontColor = "50 50 50"; - fontColorHL = "0 0 0"; - fontColorNA = "200 200 200"; - //fontColorSEL ="0 0 0"; - fixedExtent = false; - justify = "center"; - canKeyFocus = false; - bitmap = "./images/selector-button"; - hasBitmapArray = false; - category = "Core"; -}; - -if( !isObject( GuiButtonTabProfile ) ) -new GuiControlProfile( GuiButtonTabProfile ) -{ - opaque = true; - border = true; - fontColor = "50 50 50"; - fontColorHL = "0 0 0"; - fontColorNA = "0 0 0"; - fixedExtent = false; - justify = "center"; - canKeyFocus = false; - bitmap = "./images/buttontab"; - category = "Core"; -}; - -if( !isObject( GuiCheckBoxProfile ) ) -new GuiControlProfile( GuiCheckBoxProfile ) -{ - opaque = false; - fillColor = "232 232 232"; - border = false; - borderColor = "100 100 100"; - fontSize = 14; - fontColor = "20 20 20"; - fontColorHL = "80 80 80"; - fontColorNA = "200 200 200"; - fixedExtent = true; - justify = "left"; - bitmap = "./images/checkbox"; - hasBitmapArray = true; - category = "Core"; -}; - -if( !isObject( GuiScrollProfile ) ) -new GuiControlProfile( GuiScrollProfile ) -{ - opaque = true; - fillcolor = "255 255 255"; - fontColor = "0 0 0"; - fontColorHL = "150 150 150"; - //borderColor = GuiDefaultProfile.borderColor; - border = true; - bitmap = "./images/scrollBar"; - hasBitmapArray = true; - category = "Core"; -}; - -if( !isObject( GuiOverlayProfile ) ) -new GuiControlProfile( GuiOverlayProfile ) -{ - opaque = true; - fillcolor = "255 255 255"; - fontColor = "0 0 0"; - fontColorHL = "255 255 255"; - fillColor = "0 0 0 100"; - category = "Core"; -}; - -if( !isObject( GuiSliderProfile ) ) -new GuiControlProfile( GuiSliderProfile ) -{ - bitmap = "./images/slider"; - category = "Core"; -}; - -if( !isObject( GuiSliderBoxProfile ) ) -new GuiControlProfile( GuiSliderBoxProfile ) -{ - bitmap = "./images/slider-w-box"; - category = "Core"; -}; - // ---------------------------------------------------------------------------- // TODO: Revisit Popupmenu // ---------------------------------------------------------------------------- @@ -419,7 +224,7 @@ new GuiControlProfile( GuiPopupMenuItemBorder : GuiButtonProfile ) fixedExtent = false; justify = "center"; canKeyFocus = false; - bitmap = "./images/button"; + bitmap = "data/ui/art/button"; category = "Core"; }; @@ -432,7 +237,7 @@ new GuiControlProfile( GuiPopUpMenuDefault : GuiDefaultProfile ) border = 0; borderThickness = 0; fixedExtent = true; - bitmap = "./images/scrollbar"; + bitmap = "data/ui/art/scrollBar"; hasBitmapArray = true; profileForChildren = GuiPopupMenuItemBorder; fillColor = "242 241 240 ";//"255 255 255";//100 @@ -449,7 +254,7 @@ if( !isObject( GuiPopUpMenuProfile ) ) new GuiControlProfile( GuiPopUpMenuProfile : GuiPopUpMenuDefault ) { textOffset = "6 4"; - bitmap = "./images/dropDown"; + bitmap = "data/ui/art/dropDown"; hasBitmapArray = true; border = 1; profileForChildren = GuiPopUpMenuDefault; @@ -467,7 +272,7 @@ new GuiControlProfile( GuiTabBookProfile ) fontType = "Arial"; fontSize = 14; justify = "center"; - bitmap = "./images/tab"; + bitmap = "data/ui/art/tab"; tabWidth = 64; tabHeight = 24; tabPosition = "Top"; @@ -484,7 +289,7 @@ new GuiControlProfile( GuiTabPageProfile : GuiDefaultProfile ) fontType = "Arial"; fontSize = 10; justify = "center"; - bitmap = "./images/tab"; + bitmap = "data/ui/art/tab"; opaque = false; fillColor = "240 239 238"; category = "Core"; @@ -578,7 +383,47 @@ new GuiControlProfile( GuiRadioProfile ) fontColor = "20 20 20"; fontColorHL = "80 80 80"; fixedExtent = true; - bitmap = "./images/radioButton"; + bitmap = "data/ui/art/radioButton"; hasBitmapArray = true; category = "Core"; }; + +// --------------------------------------------------------------------------- +// Slider control +// --------------------------------------------------------------------------- +if( !isObject( GuiSliderProfile ) ) +new GuiControlProfile( GuiSliderProfile ) +{ + bitmap = "data/ui/art/slider"; + category = "Core"; +}; + +// +// Scroll Profile +// +if(!isObject(GuiMenuScrollProfile)) +new GuiControlProfile(GuiMenuScrollProfile) +{ + opaque = true; + fillcolor = "50 50 50"; + fontColor = "200 200 200"; + fontColorHL = "250 250 250"; + border = true; + bitmap = "data/ui/art/scrollBar"; + hasBitmapArray = true; + category = "Core"; +}; + +// Scroll +if(!isObject(GuiMenuScrollProfile)) +new GuiControlProfile(GuiMenuScrollProfile) +{ + opaque = true; + fillcolor = "128 128 128"; + fontColor = "0 0 0"; + fontColorHL = "150 150 150"; + border = true; + bitmap = "./images/scrollBar"; + hasBitmapArray = true; + category = "Core"; +}; \ No newline at end of file diff --git a/Templates/Empty/game/scripts/gui/startupGui.cs b/Templates/BaseGame/game/data/ui/scripts/startupGui.cs similarity index 73% rename from Templates/Empty/game/scripts/gui/startupGui.cs rename to Templates/BaseGame/game/data/ui/scripts/startupGui.cs index afd4be7d4..fc5095c2d 100644 --- a/Templates/Empty/game/scripts/gui/startupGui.cs +++ b/Templates/BaseGame/game/data/ui/scripts/startupGui.cs @@ -32,10 +32,10 @@ function loadStartup() // A list of the splash screens and logos // to cycle through. Note that they have to // be in consecutive numerical order - StartupGui.bitmap0 = "art/gui/background"; - StartupGui.logo0 = "art/gui/Torque-3D-logo"; - StartupGui.logoPos0 = "178 251"; - StartupGui.logoExtent0 = "443 139"; + StartupGui.bitmap[0] = "data/ui/art/background-dark"; + StartupGui.logo[0] = "data/ui/art/Torque-3D-logo"; + StartupGui.logoPos[0] = "178 251"; + StartupGui.logoExtent[0] = "443 139"; // Call the next() function to set our firt // splash screen @@ -63,26 +63,26 @@ function StartupGui::next(%this) Canvas.setContent(BlankGui); // Set our bitmap and reset the done variable - %this.setBitmap(getVariable(%this @ ".bitmap" @ $StartupIdx)); + %this.setBitmap(%this.bitmap[$StartupIdx]); %this.done = false; // If we have a logo then set it if (isObject(%this->StartupLogo)) { - if (getVariable(%this @ ".logo" @ $StartupIdx) !$= "") + if (%this.logo[$StartupIdx] !$= "") { - %this->StartupLogo.setBitmap(getVariable(%this @ ".logo" @ $StartupIdx)); + %this->StartupLogo.setBitmap(%this.logo[$StartupIdx]); - if (getVariable(%this @ ".logoPos" @ $StartupIdx) !$= "") + if (%this.logoPos[$StartupIdx] !$= "") { - %logoPosX = getWord(getVariable(%this @ ".logoPos" @ $StartupIdx), 0); - %logoPosY = getWord(getVariable(%this @ ".logoPos" @ $StartupIdx), 1); + %logoPosX = getWord(%this.logoPos[$StartupIdx], 0); + %logoPosY = getWord(%this.logoPos[$StartupIdx], 1); %this->StartupLogo.setPosition(%logoPosX, %logoPosY); } - if (getVariable(%this @ ".logoExtent" @ $StartupIdx) !$= "") - %this->StartupLogo.setExtent(getVariable(%this @ ".logoExtent" @ $StartupIdx)); + if (%this.logoExtent[$StartupIdx] !$= "") + %this->StartupLogo.setExtent(%this.logoExtent[$StartupIdx]); %this->StartupLogo.setVisible(true); } @@ -93,20 +93,20 @@ function StartupGui::next(%this) // If we have a secondary logo then set it if (isObject(%this->StartupLogoSecondary)) { - if (getVariable(%this @ ".seclogo" @ $StartupIdx) !$= "") + if (%this.seclogo[$StartupIdx] !$= "") { - %this->StartupLogoSecondary.setBitmap(getVariable(%this @ ".seclogo" @ $StartupIdx)); + %this->StartupLogoSecondary.setBitmap(%this.seclogo[$StartupIdx]); - if (getVariable(%this @ ".seclogoPos" @ $StartupIdx) !$= "") + if (%this.seclogoPos[$StartupIdx] !$= "") { - %logoPosX = getWord(getVariable(%this @ ".seclogoPos" @ $StartupIdx), 0); - %logoPosY = getWord(getVariable(%this @ ".seclogoPos" @ $StartupIdx), 1); + %logoPosX = getWord(%this.seclogoPos[$StartupIdx], 0); + %logoPosY = getWord(%this.seclogoPos[$StartupIdx], 1); %this->StartupLogoSecondary.setPosition(%logoPosX, %logoPosY); } - if (getVariable(%this @ ".seclogoExtent" @ $StartupIdx) !$= "") - %this->StartupLogoSecondary.setExtent(getVariable(%this @ ".seclogoExtent" @ $StartupIdx)); + if (%this.seclogoExtent[$StartupIdx] !$= "") + %this->StartupLogoSecondary.setExtent(%this.seclogoExtent[$StartupIdx]); %this->StartupLogoSecondary.setVisible(true); } @@ -128,7 +128,7 @@ function StartupGui::onDone(%this) if (%this.done) { // See if we have a valid bitmap for the next screen - if (getVariable(%this @ ".bitmap" @ $StartupIdx) $= "") + if (%this.bitmap[$StartupIdx] $= "") { // Clear our data and load the main menu %this.done = true; @@ -144,7 +144,7 @@ function StartupGui::onDone(%this) //BlankGui.delete(); //flushTextureCache(); - loadMainMenu(); + Canvas.setContent(MainMenuGui); } else { diff --git a/Templates/BaseGame/game/data/ui/sound/buttonClick.wav b/Templates/BaseGame/game/data/ui/sound/buttonClick.wav new file mode 100644 index 000000000..ec55432ee Binary files /dev/null and b/Templates/BaseGame/game/data/ui/sound/buttonClick.wav differ diff --git a/Templates/BaseGame/game/data/ui/sound/buttonHover.wav b/Templates/BaseGame/game/data/ui/sound/buttonHover.wav new file mode 100644 index 000000000..e7276cde4 Binary files /dev/null and b/Templates/BaseGame/game/data/ui/sound/buttonHover.wav differ diff --git a/Templates/BaseGame/game/main.cs.in b/Templates/BaseGame/game/main.cs.in new file mode 100644 index 000000000..2ec150c0d --- /dev/null +++ b/Templates/BaseGame/game/main.cs.in @@ -0,0 +1,95 @@ +$Core::windowIcon = "data/icon.png"; +$Core::splashWindowImage = "data/splash.png"; + +// Display a splash window immediately to improve app responsiveness before +// engine is initialized and main window created. +displaySplashWindow($Core::splashWindowImage); + +// Console does something. +setLogMode(6); + +// Disable script trace. +trace(false); + +// Set the name of our application +$appName = "@TORQUE_APP_NAME@"; + +//----------------------------------------------------------------------------- +// Load up scripts to initialise subsystems. +exec("core/main.cs"); + +// Parse the command line arguments +echo("\n--------- Parsing Arguments ---------"); +parseArgs(); + +// The canvas needs to be initialized before any gui scripts are run since +// some of the controls assume that the canvas exists at load time. +createCanvas($appName); + +//----------------------------------------------------------------------------- +// Load console. +exec("core/console/main.cs"); + +// Init the physics plugin. +physicsInit(); + +sfxStartup(); + +// Set up networking. +setNetPort(0); + +// Start processing file change events. +startFileChangeNotifications(); + +// If we have editors, initialize them here as well +if(isFile("tools/main.cs") && !$isDedicated) + exec("tools/main.cs"); + +ModuleDatabase.setModuleExtension("module"); +ModuleDatabase.scanModules( "data", false ); +ModuleDatabase.LoadGroup( "Game" ); + +if( !$isDedicated ) +{ + // Start rendering and stuff. + initRenderManager(); + initLightingSystems("Advanced Lighting"); + + //load prefs + %prefPath = getPrefpath(); + if ( isFile( %prefPath @ "/clientPrefs.cs" ) ) + exec( %prefPath @ "/clientPrefs.cs" ); + else + exec("data/defaults.cs"); + + configureCanvas(); + + //Autodetect settings if it's our first time + if($pref::Video::autoDetect) + GraphicsMenu.Autodetect(); + + postFXInit(); + + closeSplashWindow(); + + // As we know at this point that the initial load is complete, + // we can hide any splash screen we have, and show the canvas. + // This keeps things looking nice, instead of having a blank window + Canvas.showWindow(); +} +else +{ + closeSplashWindow(); +} + +echo("Engine initialized..."); + +//----------------------------------------------------------------------------- +// Called when the engine is shutting down. +function onExit() +{ + // Stop file change events. + stopFileChangeNotifications(); + + ModuleDatabase.UnloadExplicit( "Game" ); +} \ No newline at end of file diff --git a/Templates/Empty/game/runTests.cs b/Templates/BaseGame/game/runTests.cs similarity index 100% rename from Templates/Empty/game/runTests.cs rename to Templates/BaseGame/game/runTests.cs diff --git a/Templates/Empty/game/tools/base/canvas/baseCanvas.ed.cs b/Templates/BaseGame/game/tools/base/canvas/baseCanvas.ed.cs similarity index 100% rename from Templates/Empty/game/tools/base/canvas/baseCanvas.ed.cs rename to Templates/BaseGame/game/tools/base/canvas/baseCanvas.ed.cs diff --git a/Templates/Empty/game/core/art/grids/512_black.png b/Templates/BaseGame/game/tools/base/images/512_black.png similarity index 100% rename from Templates/Empty/game/core/art/grids/512_black.png rename to Templates/BaseGame/game/tools/base/images/512_black.png diff --git a/Templates/Empty/game/core/art/grids/512_blue.png b/Templates/BaseGame/game/tools/base/images/512_blue.png similarity index 100% rename from Templates/Empty/game/core/art/grids/512_blue.png rename to Templates/BaseGame/game/tools/base/images/512_blue.png diff --git a/Templates/Empty/game/core/art/grids/512_forestgreen.png b/Templates/BaseGame/game/tools/base/images/512_forestgreen.png similarity index 100% rename from Templates/Empty/game/core/art/grids/512_forestgreen.png rename to Templates/BaseGame/game/tools/base/images/512_forestgreen.png diff --git a/Templates/Empty/game/core/art/grids/512_forestgreen_lines.png b/Templates/BaseGame/game/tools/base/images/512_forestgreen_lines.png similarity index 100% rename from Templates/Empty/game/core/art/grids/512_forestgreen_lines.png rename to Templates/BaseGame/game/tools/base/images/512_forestgreen_lines.png diff --git a/Templates/Empty/game/core/art/grids/512_green.png b/Templates/BaseGame/game/tools/base/images/512_green.png similarity index 100% rename from Templates/Empty/game/core/art/grids/512_green.png rename to Templates/BaseGame/game/tools/base/images/512_green.png diff --git a/Templates/Empty/game/core/art/grids/512_grey.png b/Templates/BaseGame/game/tools/base/images/512_grey.png similarity index 100% rename from Templates/Empty/game/core/art/grids/512_grey.png rename to Templates/BaseGame/game/tools/base/images/512_grey.png diff --git a/Templates/Empty/game/core/art/grids/512_grey_base.png b/Templates/BaseGame/game/tools/base/images/512_grey_base.png similarity index 100% rename from Templates/Empty/game/core/art/grids/512_grey_base.png rename to Templates/BaseGame/game/tools/base/images/512_grey_base.png diff --git a/Templates/Empty/game/core/art/grids/512_orange.png b/Templates/BaseGame/game/tools/base/images/512_orange.png similarity index 100% rename from Templates/Empty/game/core/art/grids/512_orange.png rename to Templates/BaseGame/game/tools/base/images/512_orange.png diff --git a/Templates/Empty/game/core/art/grids/512_orange_lines.png b/Templates/BaseGame/game/tools/base/images/512_orange_lines.png similarity index 100% rename from Templates/Empty/game/core/art/grids/512_orange_lines.png rename to Templates/BaseGame/game/tools/base/images/512_orange_lines.png diff --git a/Templates/Empty/game/core/art/grids/512_red.png b/Templates/BaseGame/game/tools/base/images/512_red.png similarity index 100% rename from Templates/Empty/game/core/art/grids/512_red.png rename to Templates/BaseGame/game/tools/base/images/512_red.png diff --git a/Templates/BaseGame/game/tools/base/images/black.png b/Templates/BaseGame/game/tools/base/images/black.png new file mode 100644 index 000000000..f3d8a1d2a Binary files /dev/null and b/Templates/BaseGame/game/tools/base/images/black.png differ diff --git a/Templates/BaseGame/game/tools/base/images/gray.png b/Templates/BaseGame/game/tools/base/images/gray.png new file mode 100644 index 000000000..566fd5e6c Binary files /dev/null and b/Templates/BaseGame/game/tools/base/images/gray.png differ diff --git a/Templates/BaseGame/game/tools/base/images/materials.cs b/Templates/BaseGame/game/tools/base/images/materials.cs new file mode 100644 index 000000000..11b766b04 --- /dev/null +++ b/Templates/BaseGame/game/tools/base/images/materials.cs @@ -0,0 +1,80 @@ +//----------------------------------------------------------------------------- +// Torque +// Copyright GarageGames, LLC 2011 +//----------------------------------------------------------------------------- + +singleton CubemapData( BlankSkyCubemap ) +{ + cubeFace[0] = "./skybox_1"; + cubeFace[1] = "./skybox_2"; + cubeFace[2] = "./skybox_3"; + cubeFace[3] = "./skybox_4"; + cubeFace[4] = "./skybox_5"; + cubeFace[5] = "./skybox_6"; +}; + +singleton Material( BlankSkyMat ) +{ + cubemap = BlankSkyCubemap; + isSky = true; +}; + +singleton Material(White) +{ + diffuseMap[0] = "./white.png"; +}; + +singleton Material(Gray) +{ + diffuseMap[0] = "./gray.png"; +}; + +singleton Material(Black) +{ + diffuseMap[0] = "./black.png"; +}; + +singleton Material(Grid_512_Black) +{ + diffuseMap[0] = "./512_black.png"; +}; + +singleton Material(Grid_512_ForestGreen) +{ + diffuseMap[0] = "./512_forestgreen.png"; +}; + +singleton Material(Grid_512_ForestGreen_Lines) +{ + diffuseMap[0] = "./512_forestgreen_lines.png"; +}; + +singleton Material(Grid_512_Green) +{ + diffuseMap[0] = "./512_green.png"; +}; + +singleton Material(Grid_512_Grey) +{ + diffuseMap[0] = "./512_grey.png"; +}; + +singleton Material(Grid_512_Grey_Base) +{ + diffuseMap[0] = "./512_grey_base.png"; +}; + +singleton Material(Grid_512_Orange) +{ + diffuseMap[0] = "./512_orange.png"; +}; + +singleton Material(Grid_512_Orange_Lines) +{ + diffuseMap[0] = "./512_orange_lines.png"; +}; + +singleton Material(Grid_512_Red) +{ + diffuseMap[0] = "./512_red.png"; +}; \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/base/images/sky_skybox.dml b/Templates/BaseGame/game/tools/base/images/sky_skybox.dml new file mode 100644 index 000000000..5ca0a1cb6 --- /dev/null +++ b/Templates/BaseGame/game/tools/base/images/sky_skybox.dml @@ -0,0 +1,7 @@ +skybox_1 +skybox_2 +skybox_3 +skybox_4 +skybox_5 +skybox_6 +skybox_6 \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/base/images/skybox_1.jpg b/Templates/BaseGame/game/tools/base/images/skybox_1.jpg new file mode 100644 index 000000000..871322e94 Binary files /dev/null and b/Templates/BaseGame/game/tools/base/images/skybox_1.jpg differ diff --git a/Templates/BaseGame/game/tools/base/images/skybox_2.jpg b/Templates/BaseGame/game/tools/base/images/skybox_2.jpg new file mode 100644 index 000000000..3e2a810de Binary files /dev/null and b/Templates/BaseGame/game/tools/base/images/skybox_2.jpg differ diff --git a/Templates/BaseGame/game/tools/base/images/skybox_3.jpg b/Templates/BaseGame/game/tools/base/images/skybox_3.jpg new file mode 100644 index 000000000..757f99b33 Binary files /dev/null and b/Templates/BaseGame/game/tools/base/images/skybox_3.jpg differ diff --git a/Templates/BaseGame/game/tools/base/images/skybox_4.jpg b/Templates/BaseGame/game/tools/base/images/skybox_4.jpg new file mode 100644 index 000000000..30eb1d2a3 Binary files /dev/null and b/Templates/BaseGame/game/tools/base/images/skybox_4.jpg differ diff --git a/Templates/BaseGame/game/tools/base/images/skybox_5.jpg b/Templates/BaseGame/game/tools/base/images/skybox_5.jpg new file mode 100644 index 000000000..10a24db73 Binary files /dev/null and b/Templates/BaseGame/game/tools/base/images/skybox_5.jpg differ diff --git a/Templates/Empty/game/core/art/skies/blank/solidsky_blue.jpg b/Templates/BaseGame/game/tools/base/images/skybox_6.jpg similarity index 100% rename from Templates/Empty/game/core/art/skies/blank/solidsky_blue.jpg rename to Templates/BaseGame/game/tools/base/images/skybox_6.jpg diff --git a/Templates/BaseGame/game/tools/base/images/white.png b/Templates/BaseGame/game/tools/base/images/white.png new file mode 100644 index 000000000..410223f25 Binary files /dev/null and b/Templates/BaseGame/game/tools/base/images/white.png differ diff --git a/Templates/Empty/game/tools/base/main.cs b/Templates/BaseGame/game/tools/base/main.cs similarity index 100% rename from Templates/Empty/game/tools/base/main.cs rename to Templates/BaseGame/game/tools/base/main.cs diff --git a/Templates/Empty/game/tools/base/menuBar/baseMenu.ed.cs b/Templates/BaseGame/game/tools/base/menuBar/baseMenu.ed.cs similarity index 100% rename from Templates/Empty/game/tools/base/menuBar/baseMenu.ed.cs rename to Templates/BaseGame/game/tools/base/menuBar/baseMenu.ed.cs diff --git a/Templates/Empty/game/tools/base/menuBar/fileMenu.ed.cs b/Templates/BaseGame/game/tools/base/menuBar/fileMenu.ed.cs similarity index 100% rename from Templates/Empty/game/tools/base/menuBar/fileMenu.ed.cs rename to Templates/BaseGame/game/tools/base/menuBar/fileMenu.ed.cs diff --git a/Templates/Empty/game/tools/base/menuBar/menuBuilder.ed.cs b/Templates/BaseGame/game/tools/base/menuBar/menuBuilder.ed.cs similarity index 100% rename from Templates/Empty/game/tools/base/menuBar/menuBuilder.ed.cs rename to Templates/BaseGame/game/tools/base/menuBar/menuBuilder.ed.cs diff --git a/Templates/Empty/game/tools/base/utils/inspector.ed.cs b/Templates/BaseGame/game/tools/base/utils/inspector.ed.cs similarity index 100% rename from Templates/Empty/game/tools/base/utils/inspector.ed.cs rename to Templates/BaseGame/game/tools/base/utils/inspector.ed.cs diff --git a/Templates/Empty/game/tools/base/utils/objectNameValidation.ed.cs b/Templates/BaseGame/game/tools/base/utils/objectNameValidation.ed.cs similarity index 100% rename from Templates/Empty/game/tools/base/utils/objectNameValidation.ed.cs rename to Templates/BaseGame/game/tools/base/utils/objectNameValidation.ed.cs diff --git a/Templates/Empty/game/tools/base/utils/swatchButtons.ed.cs b/Templates/BaseGame/game/tools/base/utils/swatchButtons.ed.cs similarity index 100% rename from Templates/Empty/game/tools/base/utils/swatchButtons.ed.cs rename to Templates/BaseGame/game/tools/base/utils/swatchButtons.ed.cs diff --git a/Templates/Empty/game/tools/base/utils/treeViewFilterCtrls.ed.cs b/Templates/BaseGame/game/tools/base/utils/treeViewFilterCtrls.ed.cs similarity index 100% rename from Templates/Empty/game/tools/base/utils/treeViewFilterCtrls.ed.cs rename to Templates/BaseGame/game/tools/base/utils/treeViewFilterCtrls.ed.cs diff --git a/Templates/Empty/game/tools/base/utils/undoActions.ed.cs b/Templates/BaseGame/game/tools/base/utils/undoActions.ed.cs similarity index 100% rename from Templates/Empty/game/tools/base/utils/undoActions.ed.cs rename to Templates/BaseGame/game/tools/base/utils/undoActions.ed.cs diff --git a/Templates/Empty/game/tools/classIcons/BasicClouds.png b/Templates/BaseGame/game/tools/classIcons/BasicClouds.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/BasicClouds.png rename to Templates/BaseGame/game/tools/classIcons/BasicClouds.png diff --git a/Templates/Empty/game/tools/classIcons/Camera.png b/Templates/BaseGame/game/tools/classIcons/Camera.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/Camera.png rename to Templates/BaseGame/game/tools/classIcons/Camera.png diff --git a/Templates/Empty/game/tools/classIcons/CameraBookmark.png b/Templates/BaseGame/game/tools/classIcons/CameraBookmark.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/CameraBookmark.png rename to Templates/BaseGame/game/tools/classIcons/CameraBookmark.png diff --git a/Templates/Empty/game/tools/classIcons/CloudLayer.png b/Templates/BaseGame/game/tools/classIcons/CloudLayer.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/CloudLayer.png rename to Templates/BaseGame/game/tools/classIcons/CloudLayer.png diff --git a/Templates/Empty/game/tools/classIcons/ConvexShape.png b/Templates/BaseGame/game/tools/classIcons/ConvexShape.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/ConvexShape.png rename to Templates/BaseGame/game/tools/classIcons/ConvexShape.png diff --git a/Templates/Empty/game/tools/classIcons/CreatorTree.png b/Templates/BaseGame/game/tools/classIcons/CreatorTree.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/CreatorTree.png rename to Templates/BaseGame/game/tools/classIcons/CreatorTree.png diff --git a/Templates/Empty/game/tools/classIcons/DecalRoad.png b/Templates/BaseGame/game/tools/classIcons/DecalRoad.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/DecalRoad.png rename to Templates/BaseGame/game/tools/classIcons/DecalRoad.png diff --git a/Templates/Empty/game/tools/classIcons/Forest.png b/Templates/BaseGame/game/tools/classIcons/Forest.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/Forest.png rename to Templates/BaseGame/game/tools/classIcons/Forest.png diff --git a/Templates/Empty/game/tools/classIcons/ForestBrush.png b/Templates/BaseGame/game/tools/classIcons/ForestBrush.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/ForestBrush.png rename to Templates/BaseGame/game/tools/classIcons/ForestBrush.png diff --git a/Templates/Empty/game/tools/classIcons/ForestBrushElement.png b/Templates/BaseGame/game/tools/classIcons/ForestBrushElement.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/ForestBrushElement.png rename to Templates/BaseGame/game/tools/classIcons/ForestBrushElement.png diff --git a/Templates/Empty/game/tools/classIcons/GameTSCtrl.png b/Templates/BaseGame/game/tools/classIcons/GameTSCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GameTSCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GameTSCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GroundCover.png b/Templates/BaseGame/game/tools/classIcons/GroundCover.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GroundCover.png rename to Templates/BaseGame/game/tools/classIcons/GroundCover.png diff --git a/Templates/Empty/game/tools/classIcons/GroundPlane.png b/Templates/BaseGame/game/tools/classIcons/GroundPlane.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GroundPlane.png rename to Templates/BaseGame/game/tools/classIcons/GroundPlane.png diff --git a/Templates/Empty/game/tools/classIcons/GuiAutoScrollCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiAutoScrollCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiAutoScrollCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiAutoScrollCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiBitmapBorderCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiBitmapBorderCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiBitmapBorderCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiBitmapBorderCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiBitmapButtonCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiBitmapButtonCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiBitmapButtonCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiBitmapButtonCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiBitmapButtonTextCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiBitmapButtonTextCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiBitmapButtonTextCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiBitmapButtonTextCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiBitmapCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiBitmapCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiBitmapCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiBitmapCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiBorderButtonCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiBorderButtonCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiBorderButtonCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiBorderButtonCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiButtonCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiButtonCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiButtonCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiButtonCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiCheckBoxCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiCheckBoxCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiCheckBoxCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiCheckBoxCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiColorPickerCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiColorPickerCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiColorPickerCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiColorPickerCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiContainer.png b/Templates/BaseGame/game/tools/classIcons/GuiContainer.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiContainer.png rename to Templates/BaseGame/game/tools/classIcons/GuiContainer.png diff --git a/Templates/Empty/game/tools/classIcons/GuiControl.png b/Templates/BaseGame/game/tools/classIcons/GuiControl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiControl.png rename to Templates/BaseGame/game/tools/classIcons/GuiControl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiControlArrayControl.png b/Templates/BaseGame/game/tools/classIcons/GuiControlArrayControl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiControlArrayControl.png rename to Templates/BaseGame/game/tools/classIcons/GuiControlArrayControl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiCrossHairHud.png b/Templates/BaseGame/game/tools/classIcons/GuiCrossHairHud.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiCrossHairHud.png rename to Templates/BaseGame/game/tools/classIcons/GuiCrossHairHud.png diff --git a/Templates/Empty/game/tools/classIcons/GuiDecoyCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiDecoyCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiDecoyCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiDecoyCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiDragAndDropControl.png b/Templates/BaseGame/game/tools/classIcons/GuiDragAndDropControl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiDragAndDropControl.png rename to Templates/BaseGame/game/tools/classIcons/GuiDragAndDropControl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiDynamicCtrlArrayControl.png b/Templates/BaseGame/game/tools/classIcons/GuiDynamicCtrlArrayControl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiDynamicCtrlArrayControl.png rename to Templates/BaseGame/game/tools/classIcons/GuiDynamicCtrlArrayControl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiFadeinBitmapCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiFadeinBitmapCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiFadeinBitmapCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiFadeinBitmapCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiFileTreeCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiFileTreeCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiFileTreeCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiFileTreeCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiFilterCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiFilterCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiFilterCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiFilterCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiFormCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiFormCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiFormCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiFormCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiFrameSetCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiFrameSetCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiFrameSetCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiFrameSetCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiGradientSwatchCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiGradientSwatchCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiGradientSwatchCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiGradientSwatchCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiGraphCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiGraphCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiGraphCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiGraphCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiHealthBarHud.png b/Templates/BaseGame/game/tools/classIcons/GuiHealthBarHud.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiHealthBarHud.png rename to Templates/BaseGame/game/tools/classIcons/GuiHealthBarHud.png diff --git a/Templates/Empty/game/tools/classIcons/GuiIconButtonCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiIconButtonCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiIconButtonCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiIconButtonCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiListBoxCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiListBoxCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiListBoxCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiListBoxCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiMLTextCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiMLTextCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiMLTextCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiMLTextCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiMLTextEditCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiMLTextEditCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiMLTextEditCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiMLTextEditCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiMenuBar.png b/Templates/BaseGame/game/tools/classIcons/GuiMenuBar.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiMenuBar.png rename to Templates/BaseGame/game/tools/classIcons/GuiMenuBar.png diff --git a/Templates/Empty/game/tools/classIcons/GuiObjectView.png b/Templates/BaseGame/game/tools/classIcons/GuiObjectView.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiObjectView.png rename to Templates/BaseGame/game/tools/classIcons/GuiObjectView.png diff --git a/Templates/Empty/game/tools/classIcons/GuiPanel.png b/Templates/BaseGame/game/tools/classIcons/GuiPanel.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiPanel.png rename to Templates/BaseGame/game/tools/classIcons/GuiPanel.png diff --git a/Templates/Empty/game/tools/classIcons/GuiPopUpMenuCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiPopUpMenuCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiPopUpMenuCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiPopUpMenuCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiPopUpMenuCtrlEx.png b/Templates/BaseGame/game/tools/classIcons/GuiPopUpMenuCtrlEx.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiPopUpMenuCtrlEx.png rename to Templates/BaseGame/game/tools/classIcons/GuiPopUpMenuCtrlEx.png diff --git a/Templates/Empty/game/tools/classIcons/GuiProgressBitmapCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiProgressBitmapCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiProgressBitmapCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiProgressBitmapCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiProgressCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiProgressCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiProgressCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiProgressCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiRadioCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiRadioCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiRadioCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiRadioCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiRectHandles.png b/Templates/BaseGame/game/tools/classIcons/GuiRectHandles.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiRectHandles.png rename to Templates/BaseGame/game/tools/classIcons/GuiRectHandles.png diff --git a/Templates/Empty/game/tools/classIcons/GuiRolloutCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiRolloutCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiRolloutCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiRolloutCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiScrollCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiScrollCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiScrollCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiScrollCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiSplitContainer.png b/Templates/BaseGame/game/tools/classIcons/GuiSplitContainer.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiSplitContainer.png rename to Templates/BaseGame/game/tools/classIcons/GuiSplitContainer.png diff --git a/Templates/Empty/game/tools/classIcons/GuiStackControl.png b/Templates/BaseGame/game/tools/classIcons/GuiStackControl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiStackControl.png rename to Templates/BaseGame/game/tools/classIcons/GuiStackControl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiSwatchButtonCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiSwatchButtonCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiSwatchButtonCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiSwatchButtonCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiTabBookCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiTabBookCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiTabBookCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiTabBookCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiTabPageCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiTabPageCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiTabPageCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiTabPageCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiTextCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiTextCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiTextCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiTextCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiTextEditCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiTextEditCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiTextEditCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiTextEditCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiTextEditSliderCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiTextEditSliderCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiTextEditSliderCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiTextEditSliderCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiTextListCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiTextListCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiTextListCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiTextListCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiTheoraCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiTheoraCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiTheoraCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiTheoraCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiTreeViewCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiTreeViewCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiTreeViewCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiTreeViewCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiWindowCollapseCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiWindowCollapseCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiWindowCollapseCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiWindowCollapseCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/GuiWindowCtrl.png b/Templates/BaseGame/game/tools/classIcons/GuiWindowCtrl.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/GuiWindowCtrl.png rename to Templates/BaseGame/game/tools/classIcons/GuiWindowCtrl.png diff --git a/Templates/Empty/game/tools/classIcons/Item.png b/Templates/BaseGame/game/tools/classIcons/Item.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/Item.png rename to Templates/BaseGame/game/tools/classIcons/Item.png diff --git a/Templates/Empty/game/tools/classIcons/LevelInfo.png b/Templates/BaseGame/game/tools/classIcons/LevelInfo.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/LevelInfo.png rename to Templates/BaseGame/game/tools/classIcons/LevelInfo.png diff --git a/Templates/Empty/game/tools/classIcons/Lightning.png b/Templates/BaseGame/game/tools/classIcons/Lightning.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/Lightning.png rename to Templates/BaseGame/game/tools/classIcons/Lightning.png diff --git a/Templates/Empty/game/tools/classIcons/Marker.png b/Templates/BaseGame/game/tools/classIcons/Marker.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/Marker.png rename to Templates/BaseGame/game/tools/classIcons/Marker.png diff --git a/Templates/Empty/game/tools/classIcons/MeshRoad.png b/Templates/BaseGame/game/tools/classIcons/MeshRoad.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/MeshRoad.png rename to Templates/BaseGame/game/tools/classIcons/MeshRoad.png diff --git a/Templates/Empty/game/tools/classIcons/MissionArea.png b/Templates/BaseGame/game/tools/classIcons/MissionArea.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/MissionArea.png rename to Templates/BaseGame/game/tools/classIcons/MissionArea.png diff --git a/Templates/Empty/game/tools/classIcons/NavMesh.png b/Templates/BaseGame/game/tools/classIcons/NavMesh.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/NavMesh.png rename to Templates/BaseGame/game/tools/classIcons/NavMesh.png diff --git a/Templates/Empty/game/tools/classIcons/NavPath.png b/Templates/BaseGame/game/tools/classIcons/NavPath.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/NavPath.png rename to Templates/BaseGame/game/tools/classIcons/NavPath.png diff --git a/Templates/Empty/game/tools/classIcons/ParticleEmitter.png b/Templates/BaseGame/game/tools/classIcons/ParticleEmitter.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/ParticleEmitter.png rename to Templates/BaseGame/game/tools/classIcons/ParticleEmitter.png diff --git a/Templates/Empty/game/tools/classIcons/ParticleEmitterNode.png b/Templates/BaseGame/game/tools/classIcons/ParticleEmitterNode.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/ParticleEmitterNode.png rename to Templates/BaseGame/game/tools/classIcons/ParticleEmitterNode.png diff --git a/Templates/Empty/game/tools/classIcons/Path.png b/Templates/BaseGame/game/tools/classIcons/Path.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/Path.png rename to Templates/BaseGame/game/tools/classIcons/Path.png diff --git a/Templates/Empty/game/tools/classIcons/PhysicalZone.png b/Templates/BaseGame/game/tools/classIcons/PhysicalZone.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/PhysicalZone.png rename to Templates/BaseGame/game/tools/classIcons/PhysicalZone.png diff --git a/Templates/Empty/game/tools/classIcons/Player.png b/Templates/BaseGame/game/tools/classIcons/Player.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/Player.png rename to Templates/BaseGame/game/tools/classIcons/Player.png diff --git a/Templates/Empty/game/tools/classIcons/PointLight.png b/Templates/BaseGame/game/tools/classIcons/PointLight.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/PointLight.png rename to Templates/BaseGame/game/tools/classIcons/PointLight.png diff --git a/Templates/Empty/game/tools/classIcons/Portal.png b/Templates/BaseGame/game/tools/classIcons/Portal.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/Portal.png rename to Templates/BaseGame/game/tools/classIcons/Portal.png diff --git a/Templates/Empty/game/tools/classIcons/Precipitation.png b/Templates/BaseGame/game/tools/classIcons/Precipitation.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/Precipitation.png rename to Templates/BaseGame/game/tools/classIcons/Precipitation.png diff --git a/Templates/Empty/game/tools/classIcons/Prefab.png b/Templates/BaseGame/game/tools/classIcons/Prefab.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/Prefab.png rename to Templates/BaseGame/game/tools/classIcons/Prefab.png diff --git a/Templates/Empty/game/tools/classIcons/PxCloth.png b/Templates/BaseGame/game/tools/classIcons/PxCloth.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/PxCloth.png rename to Templates/BaseGame/game/tools/classIcons/PxCloth.png diff --git a/Templates/Empty/game/tools/classIcons/River.png b/Templates/BaseGame/game/tools/classIcons/River.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/River.png rename to Templates/BaseGame/game/tools/classIcons/River.png diff --git a/Templates/Empty/game/tools/classIcons/SFXEmitter.png b/Templates/BaseGame/game/tools/classIcons/SFXEmitter.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/SFXEmitter.png rename to Templates/BaseGame/game/tools/classIcons/SFXEmitter.png diff --git a/Templates/Empty/game/tools/classIcons/ScatterSky.png b/Templates/BaseGame/game/tools/classIcons/ScatterSky.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/ScatterSky.png rename to Templates/BaseGame/game/tools/classIcons/ScatterSky.png diff --git a/Templates/Empty/game/tools/classIcons/SceneObject.png b/Templates/BaseGame/game/tools/classIcons/SceneObject.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/SceneObject.png rename to Templates/BaseGame/game/tools/classIcons/SceneObject.png diff --git a/Templates/Empty/game/tools/classIcons/SimDataBlock.png b/Templates/BaseGame/game/tools/classIcons/SimDataBlock.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/SimDataBlock.png rename to Templates/BaseGame/game/tools/classIcons/SimDataBlock.png diff --git a/Templates/Empty/game/tools/classIcons/SimObject.png b/Templates/BaseGame/game/tools/classIcons/SimObject.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/SimObject.png rename to Templates/BaseGame/game/tools/classIcons/SimObject.png diff --git a/Templates/Empty/game/tools/classIcons/SimSet.png b/Templates/BaseGame/game/tools/classIcons/SimSet.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/SimSet.png rename to Templates/BaseGame/game/tools/classIcons/SimSet.png diff --git a/Templates/Empty/game/tools/classIcons/SkyBox.png b/Templates/BaseGame/game/tools/classIcons/SkyBox.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/SkyBox.png rename to Templates/BaseGame/game/tools/classIcons/SkyBox.png diff --git a/Templates/Empty/game/tools/classIcons/SpawnSphere.png b/Templates/BaseGame/game/tools/classIcons/SpawnSphere.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/SpawnSphere.png rename to Templates/BaseGame/game/tools/classIcons/SpawnSphere.png diff --git a/Templates/Empty/game/tools/classIcons/SpotLight.png b/Templates/BaseGame/game/tools/classIcons/SpotLight.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/SpotLight.png rename to Templates/BaseGame/game/tools/classIcons/SpotLight.png diff --git a/Templates/Empty/game/tools/classIcons/Sun.png b/Templates/BaseGame/game/tools/classIcons/Sun.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/Sun.png rename to Templates/BaseGame/game/tools/classIcons/Sun.png diff --git a/Templates/Empty/game/tools/classIcons/TSForestItemData.png b/Templates/BaseGame/game/tools/classIcons/TSForestItemData.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/TSForestItemData.png rename to Templates/BaseGame/game/tools/classIcons/TSForestItemData.png diff --git a/Templates/Empty/game/tools/classIcons/TSStatic.png b/Templates/BaseGame/game/tools/classIcons/TSStatic.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/TSStatic.png rename to Templates/BaseGame/game/tools/classIcons/TSStatic.png diff --git a/Templates/Empty/game/tools/classIcons/TerrainBlock.png b/Templates/BaseGame/game/tools/classIcons/TerrainBlock.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/TerrainBlock.png rename to Templates/BaseGame/game/tools/classIcons/TerrainBlock.png diff --git a/Templates/Empty/game/tools/classIcons/TimeOfDay.png b/Templates/BaseGame/game/tools/classIcons/TimeOfDay.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/TimeOfDay.png rename to Templates/BaseGame/game/tools/classIcons/TimeOfDay.png diff --git a/Templates/Empty/game/tools/classIcons/Trigger.png b/Templates/BaseGame/game/tools/classIcons/Trigger.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/Trigger.png rename to Templates/BaseGame/game/tools/classIcons/Trigger.png diff --git a/Templates/Empty/game/tools/classIcons/VolumetricFog.png b/Templates/BaseGame/game/tools/classIcons/VolumetricFog.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/VolumetricFog.png rename to Templates/BaseGame/game/tools/classIcons/VolumetricFog.png diff --git a/Templates/Empty/game/tools/classIcons/WaterBlock.png b/Templates/BaseGame/game/tools/classIcons/WaterBlock.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/WaterBlock.png rename to Templates/BaseGame/game/tools/classIcons/WaterBlock.png diff --git a/Templates/Empty/game/tools/classIcons/WaterPlane.png b/Templates/BaseGame/game/tools/classIcons/WaterPlane.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/WaterPlane.png rename to Templates/BaseGame/game/tools/classIcons/WaterPlane.png diff --git a/Templates/Empty/game/tools/classIcons/Zone.png b/Templates/BaseGame/game/tools/classIcons/Zone.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/Zone.png rename to Templates/BaseGame/game/tools/classIcons/Zone.png diff --git a/Templates/Empty/game/tools/classIcons/cameraSpawn.png b/Templates/BaseGame/game/tools/classIcons/cameraSpawn.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/cameraSpawn.png rename to Templates/BaseGame/game/tools/classIcons/cameraSpawn.png diff --git a/Templates/Empty/game/tools/classIcons/decal.png b/Templates/BaseGame/game/tools/classIcons/decal.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/decal.png rename to Templates/BaseGame/game/tools/classIcons/decal.png diff --git a/Templates/Empty/game/tools/classIcons/decalNode.png b/Templates/BaseGame/game/tools/classIcons/decalNode.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/decalNode.png rename to Templates/BaseGame/game/tools/classIcons/decalNode.png diff --git a/Templates/Empty/game/tools/classIcons/default.png b/Templates/BaseGame/game/tools/classIcons/default.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/default.png rename to Templates/BaseGame/game/tools/classIcons/default.png diff --git a/Templates/Empty/game/tools/classIcons/fxFoliageReplicator.png b/Templates/BaseGame/game/tools/classIcons/fxFoliageReplicator.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/fxFoliageReplicator.png rename to Templates/BaseGame/game/tools/classIcons/fxFoliageReplicator.png diff --git a/Templates/Empty/game/tools/classIcons/fxShapeReplicator.png b/Templates/BaseGame/game/tools/classIcons/fxShapeReplicator.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/fxShapeReplicator.png rename to Templates/BaseGame/game/tools/classIcons/fxShapeReplicator.png diff --git a/Templates/Empty/game/tools/classIcons/interiorInstance.png b/Templates/BaseGame/game/tools/classIcons/interiorInstance.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/interiorInstance.png rename to Templates/BaseGame/game/tools/classIcons/interiorInstance.png diff --git a/Templates/Empty/game/tools/classIcons/particleEffecterObject.png b/Templates/BaseGame/game/tools/classIcons/particleEffecterObject.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/particleEffecterObject.png rename to Templates/BaseGame/game/tools/classIcons/particleEffecterObject.png diff --git a/Templates/Empty/game/tools/classIcons/particleEmitterObject.png b/Templates/BaseGame/game/tools/classIcons/particleEmitterObject.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/particleEmitterObject.png rename to Templates/BaseGame/game/tools/classIcons/particleEmitterObject.png diff --git a/Templates/Empty/game/tools/classIcons/particleSimulation.png b/Templates/BaseGame/game/tools/classIcons/particleSimulation.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/particleSimulation.png rename to Templates/BaseGame/game/tools/classIcons/particleSimulation.png diff --git a/Templates/Empty/game/tools/classIcons/pathMarker.png b/Templates/BaseGame/game/tools/classIcons/pathMarker.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/pathMarker.png rename to Templates/BaseGame/game/tools/classIcons/pathMarker.png diff --git a/Templates/Empty/game/tools/classIcons/volumeLight.png b/Templates/BaseGame/game/tools/classIcons/volumeLight.png similarity index 100% rename from Templates/Empty/game/tools/classIcons/volumeLight.png rename to Templates/BaseGame/game/tools/classIcons/volumeLight.png diff --git a/Templates/Empty/game/tools/componentEditor/gui/superToolTipDlg.ed.gui b/Templates/BaseGame/game/tools/componentEditor/gui/superToolTipDlg.ed.gui similarity index 100% rename from Templates/Empty/game/tools/componentEditor/gui/superToolTipDlg.ed.gui rename to Templates/BaseGame/game/tools/componentEditor/gui/superToolTipDlg.ed.gui diff --git a/Templates/Empty/game/tools/componentEditor/main.cs b/Templates/BaseGame/game/tools/componentEditor/main.cs similarity index 100% rename from Templates/Empty/game/tools/componentEditor/main.cs rename to Templates/BaseGame/game/tools/componentEditor/main.cs diff --git a/Templates/Empty/game/tools/componentEditor/scripts/componentEditor.ed.cs b/Templates/BaseGame/game/tools/componentEditor/scripts/componentEditor.ed.cs similarity index 100% rename from Templates/Empty/game/tools/componentEditor/scripts/componentEditor.ed.cs rename to Templates/BaseGame/game/tools/componentEditor/scripts/componentEditor.ed.cs diff --git a/Templates/Empty/game/tools/componentEditor/scripts/superToolTipDlg.ed.cs b/Templates/BaseGame/game/tools/componentEditor/scripts/superToolTipDlg.ed.cs similarity index 100% rename from Templates/Empty/game/tools/componentEditor/scripts/superToolTipDlg.ed.cs rename to Templates/BaseGame/game/tools/componentEditor/scripts/superToolTipDlg.ed.cs diff --git a/Templates/Empty/game/tools/convexEditor/convexEditor.cs b/Templates/BaseGame/game/tools/convexEditor/convexEditor.cs similarity index 100% rename from Templates/Empty/game/tools/convexEditor/convexEditor.cs rename to Templates/BaseGame/game/tools/convexEditor/convexEditor.cs diff --git a/Templates/Empty/game/tools/convexEditor/convexEditorGui.cs b/Templates/BaseGame/game/tools/convexEditor/convexEditorGui.cs similarity index 100% rename from Templates/Empty/game/tools/convexEditor/convexEditorGui.cs rename to Templates/BaseGame/game/tools/convexEditor/convexEditorGui.cs diff --git a/Templates/Empty/game/tools/convexEditor/convexEditorGui.gui b/Templates/BaseGame/game/tools/convexEditor/convexEditorGui.gui similarity index 100% rename from Templates/Empty/game/tools/convexEditor/convexEditorGui.gui rename to Templates/BaseGame/game/tools/convexEditor/convexEditorGui.gui diff --git a/Templates/Empty/game/tools/convexEditor/convexEditorSettingsTab.ed.gui b/Templates/BaseGame/game/tools/convexEditor/convexEditorSettingsTab.ed.gui similarity index 100% rename from Templates/Empty/game/tools/convexEditor/convexEditorSettingsTab.ed.gui rename to Templates/BaseGame/game/tools/convexEditor/convexEditorSettingsTab.ed.gui diff --git a/Templates/Empty/game/tools/convexEditor/convexEditorToolbar.ed.gui b/Templates/BaseGame/game/tools/convexEditor/convexEditorToolbar.ed.gui similarity index 100% rename from Templates/Empty/game/tools/convexEditor/convexEditorToolbar.ed.gui rename to Templates/BaseGame/game/tools/convexEditor/convexEditorToolbar.ed.gui diff --git a/Templates/Empty/game/tools/convexEditor/images/convex-editor-btn_d.png b/Templates/BaseGame/game/tools/convexEditor/images/convex-editor-btn_d.png similarity index 100% rename from Templates/Empty/game/tools/convexEditor/images/convex-editor-btn_d.png rename to Templates/BaseGame/game/tools/convexEditor/images/convex-editor-btn_d.png diff --git a/Templates/Empty/game/tools/convexEditor/images/convex-editor-btn_h.png b/Templates/BaseGame/game/tools/convexEditor/images/convex-editor-btn_h.png similarity index 100% rename from Templates/Empty/game/tools/convexEditor/images/convex-editor-btn_h.png rename to Templates/BaseGame/game/tools/convexEditor/images/convex-editor-btn_h.png diff --git a/Templates/Empty/game/tools/convexEditor/images/convex-editor-btn_n.png b/Templates/BaseGame/game/tools/convexEditor/images/convex-editor-btn_n.png similarity index 100% rename from Templates/Empty/game/tools/convexEditor/images/convex-editor-btn_n.png rename to Templates/BaseGame/game/tools/convexEditor/images/convex-editor-btn_n.png diff --git a/Templates/Empty/game/tools/convexEditor/images/split-face-btn_d.png b/Templates/BaseGame/game/tools/convexEditor/images/split-face-btn_d.png similarity index 100% rename from Templates/Empty/game/tools/convexEditor/images/split-face-btn_d.png rename to Templates/BaseGame/game/tools/convexEditor/images/split-face-btn_d.png diff --git a/Templates/Empty/game/tools/convexEditor/images/split-face-btn_h.png b/Templates/BaseGame/game/tools/convexEditor/images/split-face-btn_h.png similarity index 100% rename from Templates/Empty/game/tools/convexEditor/images/split-face-btn_h.png rename to Templates/BaseGame/game/tools/convexEditor/images/split-face-btn_h.png diff --git a/Templates/Empty/game/tools/convexEditor/images/split-face-btn_i.png b/Templates/BaseGame/game/tools/convexEditor/images/split-face-btn_i.png similarity index 100% rename from Templates/Empty/game/tools/convexEditor/images/split-face-btn_i.png rename to Templates/BaseGame/game/tools/convexEditor/images/split-face-btn_i.png diff --git a/Templates/Empty/game/tools/convexEditor/images/split-face-btn_n.png b/Templates/BaseGame/game/tools/convexEditor/images/split-face-btn_n.png similarity index 100% rename from Templates/Empty/game/tools/convexEditor/images/split-face-btn_n.png rename to Templates/BaseGame/game/tools/convexEditor/images/split-face-btn_n.png diff --git a/Templates/Empty/game/tools/convexEditor/main.cs b/Templates/BaseGame/game/tools/convexEditor/main.cs similarity index 99% rename from Templates/Empty/game/tools/convexEditor/main.cs rename to Templates/BaseGame/game/tools/convexEditor/main.cs index 496140cd4..71e6b3090 100644 --- a/Templates/Empty/game/tools/convexEditor/main.cs +++ b/Templates/BaseGame/game/tools/convexEditor/main.cs @@ -201,7 +201,7 @@ function ConvexEditorPlugin::onSaveMission( %this, %missionFile ) function ConvexEditorPlugin::initSettings( %this ) { EditorSettings.beginGroup( "ConvexEditor", true ); - EditorSettings.setDefaultValue( "MaterialName", "Grid512_OrangeLines_Mat" ); + EditorSettings.setDefaultValue( "MaterialName", "Grid_512_Orange" ); EditorSettings.endGroup(); } diff --git a/Templates/Empty/game/tools/datablockEditor/DatablockEditorCreatePrompt.ed.gui b/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorCreatePrompt.ed.gui similarity index 100% rename from Templates/Empty/game/tools/datablockEditor/DatablockEditorCreatePrompt.ed.gui rename to Templates/BaseGame/game/tools/datablockEditor/DatablockEditorCreatePrompt.ed.gui diff --git a/Templates/Empty/game/tools/datablockEditor/DatablockEditorInspectorWindow.ed.gui b/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorInspectorWindow.ed.gui similarity index 100% rename from Templates/Empty/game/tools/datablockEditor/DatablockEditorInspectorWindow.ed.gui rename to Templates/BaseGame/game/tools/datablockEditor/DatablockEditorInspectorWindow.ed.gui diff --git a/Templates/Empty/game/tools/datablockEditor/DatablockEditorTreeWindow.ed.gui b/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorTreeWindow.ed.gui similarity index 100% rename from Templates/Empty/game/tools/datablockEditor/DatablockEditorTreeWindow.ed.gui rename to Templates/BaseGame/game/tools/datablockEditor/DatablockEditorTreeWindow.ed.gui diff --git a/Templates/Empty/game/tools/datablockEditor/datablockEditor.cs b/Templates/BaseGame/game/tools/datablockEditor/datablockEditor.cs similarity index 100% rename from Templates/Empty/game/tools/datablockEditor/datablockEditor.cs rename to Templates/BaseGame/game/tools/datablockEditor/datablockEditor.cs diff --git a/Templates/Empty/game/tools/datablockEditor/datablockEditorUndo.cs b/Templates/BaseGame/game/tools/datablockEditor/datablockEditorUndo.cs similarity index 100% rename from Templates/Empty/game/tools/datablockEditor/datablockEditorUndo.cs rename to Templates/BaseGame/game/tools/datablockEditor/datablockEditorUndo.cs diff --git a/Templates/Empty/game/tools/datablockEditor/main.cs b/Templates/BaseGame/game/tools/datablockEditor/main.cs similarity index 100% rename from Templates/Empty/game/tools/datablockEditor/main.cs rename to Templates/BaseGame/game/tools/datablockEditor/main.cs diff --git a/Templates/Empty/game/tools/debugger/gui/breakConditionDlg.ed.gui b/Templates/BaseGame/game/tools/debugger/gui/breakConditionDlg.ed.gui similarity index 100% rename from Templates/Empty/game/tools/debugger/gui/breakConditionDlg.ed.gui rename to Templates/BaseGame/game/tools/debugger/gui/breakConditionDlg.ed.gui diff --git a/Templates/Empty/game/tools/debugger/gui/connectDlg.ed.gui b/Templates/BaseGame/game/tools/debugger/gui/connectDlg.ed.gui similarity index 100% rename from Templates/Empty/game/tools/debugger/gui/connectDlg.ed.gui rename to Templates/BaseGame/game/tools/debugger/gui/connectDlg.ed.gui diff --git a/Templates/Empty/game/tools/debugger/gui/debugger.ed.gui b/Templates/BaseGame/game/tools/debugger/gui/debugger.ed.gui similarity index 100% rename from Templates/Empty/game/tools/debugger/gui/debugger.ed.gui rename to Templates/BaseGame/game/tools/debugger/gui/debugger.ed.gui diff --git a/Templates/Empty/game/tools/debugger/gui/editWatchDlg.ed.gui b/Templates/BaseGame/game/tools/debugger/gui/editWatchDlg.ed.gui similarity index 100% rename from Templates/Empty/game/tools/debugger/gui/editWatchDlg.ed.gui rename to Templates/BaseGame/game/tools/debugger/gui/editWatchDlg.ed.gui diff --git a/Templates/Empty/game/tools/debugger/gui/findDlg.ed.gui b/Templates/BaseGame/game/tools/debugger/gui/findDlg.ed.gui similarity index 100% rename from Templates/Empty/game/tools/debugger/gui/findDlg.ed.gui rename to Templates/BaseGame/game/tools/debugger/gui/findDlg.ed.gui diff --git a/Templates/Empty/game/tools/debugger/gui/watchDlg.ed.gui b/Templates/BaseGame/game/tools/debugger/gui/watchDlg.ed.gui similarity index 100% rename from Templates/Empty/game/tools/debugger/gui/watchDlg.ed.gui rename to Templates/BaseGame/game/tools/debugger/gui/watchDlg.ed.gui diff --git a/Templates/Empty/game/tools/debugger/main.cs b/Templates/BaseGame/game/tools/debugger/main.cs similarity index 100% rename from Templates/Empty/game/tools/debugger/main.cs rename to Templates/BaseGame/game/tools/debugger/main.cs diff --git a/Templates/Empty/game/tools/debugger/scripts/debugger.ed.cs b/Templates/BaseGame/game/tools/debugger/scripts/debugger.ed.cs similarity index 100% rename from Templates/Empty/game/tools/debugger/scripts/debugger.ed.cs rename to Templates/BaseGame/game/tools/debugger/scripts/debugger.ed.cs diff --git a/Templates/Empty/game/tools/decalEditor/add-decal_d.png b/Templates/BaseGame/game/tools/decalEditor/add-decal_d.png similarity index 100% rename from Templates/Empty/game/tools/decalEditor/add-decal_d.png rename to Templates/BaseGame/game/tools/decalEditor/add-decal_d.png diff --git a/Templates/Empty/game/tools/decalEditor/add-decal_h.png b/Templates/BaseGame/game/tools/decalEditor/add-decal_h.png similarity index 100% rename from Templates/Empty/game/tools/decalEditor/add-decal_h.png rename to Templates/BaseGame/game/tools/decalEditor/add-decal_h.png diff --git a/Templates/Empty/game/tools/decalEditor/add-decal_n.png b/Templates/BaseGame/game/tools/decalEditor/add-decal_n.png similarity index 100% rename from Templates/Empty/game/tools/decalEditor/add-decal_n.png rename to Templates/BaseGame/game/tools/decalEditor/add-decal_n.png diff --git a/Templates/Empty/game/tools/decalEditor/decal-editor_d.png b/Templates/BaseGame/game/tools/decalEditor/decal-editor_d.png similarity index 100% rename from Templates/Empty/game/tools/decalEditor/decal-editor_d.png rename to Templates/BaseGame/game/tools/decalEditor/decal-editor_d.png diff --git a/Templates/Empty/game/tools/decalEditor/decal-editor_h.png b/Templates/BaseGame/game/tools/decalEditor/decal-editor_h.png similarity index 100% rename from Templates/Empty/game/tools/decalEditor/decal-editor_h.png rename to Templates/BaseGame/game/tools/decalEditor/decal-editor_h.png diff --git a/Templates/Empty/game/tools/decalEditor/decal-editor_n.png b/Templates/BaseGame/game/tools/decalEditor/decal-editor_n.png similarity index 100% rename from Templates/Empty/game/tools/decalEditor/decal-editor_n.png rename to Templates/BaseGame/game/tools/decalEditor/decal-editor_n.png diff --git a/Templates/Empty/game/tools/decalEditor/decalEditor.cs b/Templates/BaseGame/game/tools/decalEditor/decalEditor.cs similarity index 100% rename from Templates/Empty/game/tools/decalEditor/decalEditor.cs rename to Templates/BaseGame/game/tools/decalEditor/decalEditor.cs diff --git a/Templates/Empty/game/tools/decalEditor/decalEditorActions.cs b/Templates/BaseGame/game/tools/decalEditor/decalEditorActions.cs similarity index 100% rename from Templates/Empty/game/tools/decalEditor/decalEditorActions.cs rename to Templates/BaseGame/game/tools/decalEditor/decalEditorActions.cs diff --git a/Templates/Empty/game/tools/decalEditor/decalEditorGui.cs b/Templates/BaseGame/game/tools/decalEditor/decalEditorGui.cs similarity index 100% rename from Templates/Empty/game/tools/decalEditor/decalEditorGui.cs rename to Templates/BaseGame/game/tools/decalEditor/decalEditorGui.cs diff --git a/Templates/Empty/game/tools/decalEditor/decalEditorGui.gui b/Templates/BaseGame/game/tools/decalEditor/decalEditorGui.gui similarity index 100% rename from Templates/Empty/game/tools/decalEditor/decalEditorGui.gui rename to Templates/BaseGame/game/tools/decalEditor/decalEditorGui.gui diff --git a/Templates/Empty/game/tools/decalEditor/main.cs b/Templates/BaseGame/game/tools/decalEditor/main.cs similarity index 100% rename from Templates/Empty/game/tools/decalEditor/main.cs rename to Templates/BaseGame/game/tools/decalEditor/main.cs diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/button.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/button.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/button.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/button.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/button_left.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/button_left.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/button_left.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/button_left.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/button_middle.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/button_middle.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/button_middle.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/button_middle.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/button_right.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/button_right.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/button_right.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/button_right.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/button_toolbar.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/button_toolbar.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/button_toolbar.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/button_toolbar.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/dropDown.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/dropDown.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/dropDown.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/dropDown.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/form.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/form.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/form.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/form.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/formMenu.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/formMenu.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/formMenu.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/formMenu.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/iconAccept.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/iconAccept.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/iconAccept.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/iconAccept.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/iconCancel.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/iconCancel.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/iconCancel.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/iconCancel.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/iconInformation.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/iconInformation.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/iconInformation.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/iconInformation.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/iconNext.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/iconNext.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/iconNext.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/iconNext.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/iconPrevious.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/iconPrevious.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/iconPrevious.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/iconPrevious.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/iconRSSNews.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/iconRSSNews.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/iconRSSNews.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/iconRSSNews.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/iconSave.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/iconSave.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/iconSave.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/iconSave.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/panel_button.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/panel_button.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/panel_button.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/panel_button.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/panel_dark.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/panel_dark.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/panel_dark.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/panel_dark.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/panel_light.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/panel_light.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/panel_light.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/panel_light.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/panel_medium.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/panel_medium.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/panel_medium.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/panel_medium.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/rollout.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/rollout.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/rollout.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/rollout.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/rollout_dark.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/rollout_dark.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/rollout_dark.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/rollout_dark.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/rollout_plusminus_header.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/rollout_plusminus_header.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/rollout_plusminus_header.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/rollout_plusminus_header.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/rollout_plusminus_transparent.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/rollout_plusminus_transparent.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/rollout_plusminus_transparent.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/rollout_plusminus_transparent.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/rollout_thin.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/rollout_thin.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/rollout_thin.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/rollout_thin.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/rollout_thin_light.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/rollout_thin_light.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/rollout_thin_light.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/rollout_thin_light.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/scroll.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/scroll.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/scroll.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/scroll.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/slider.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/slider.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/slider.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/slider.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/start/background.jpg b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/background.jpg similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/start/background.jpg rename to Templates/BaseGame/game/tools/editorClasses/gui/images/start/background.jpg diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/start/create.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/create.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/start/create.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/start/create.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/start/create_d.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/create_d.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/start/create_d.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/start/create_d.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/start/create_h.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/create_h.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/start/create_h.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/start/create_h.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/start/create_i.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/create_i.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/start/create_i.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/start/create_i.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/start/import.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/import.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/start/import.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/start/import.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/start/import_d.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/import_d.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/start/import_d.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/start/import_d.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/start/import_h.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/import_h.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/start/import_h.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/start/import_h.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/start/import_i.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/import_i.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/start/import_i.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/start/import_i.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/start/navPanel.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/navPanel.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/start/navPanel.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/start/navPanel.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/start/open.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/open.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/start/open.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/start/open.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/start/open_d.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/open_d.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/start/open_d.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/start/open_d.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/start/open_h.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/open_h.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/start/open_h.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/start/open_h.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/start/open_i.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/open_i.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/start/open_i.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/start/open_i.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/start/splash.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/splash.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/start/splash.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/start/splash.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/start/topBarLeft.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/topBarLeft.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/start/topBarLeft.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/start/topBarLeft.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/start/topBarMiddle.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/topBarMiddle.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/start/topBarMiddle.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/start/topBarMiddle.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/start/topBarRight.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/topBarRight.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/start/topBarRight.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/start/topBarRight.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/tabBook.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/tabBook.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/tabBook.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/tabBook.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/textEdit.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/textEdit.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/textEdit.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/textEdit.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/toolWindow.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/toolWindow.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/toolWindow.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/toolWindow.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/toolbar.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/toolbar.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/toolbar.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/toolbar.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/treeView.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/treeView.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/treeView.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/treeView.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/images/window.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/window.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/images/window.png rename to Templates/BaseGame/game/tools/editorClasses/gui/images/window.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/panels/editor-menubar.png b/Templates/BaseGame/game/tools/editorClasses/gui/panels/editor-menubar.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/panels/editor-menubar.png rename to Templates/BaseGame/game/tools/editorClasses/gui/panels/editor-menubar.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/panels/icon-dropdownbar.png b/Templates/BaseGame/game/tools/editorClasses/gui/panels/icon-dropdownbar.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/panels/icon-dropdownbar.png rename to Templates/BaseGame/game/tools/editorClasses/gui/panels/icon-dropdownbar.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/panels/inspector-style-rollout-dark.png b/Templates/BaseGame/game/tools/editorClasses/gui/panels/inspector-style-rollout-dark.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/panels/inspector-style-rollout-dark.png rename to Templates/BaseGame/game/tools/editorClasses/gui/panels/inspector-style-rollout-dark.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/panels/inspector-style-rollout-list.png b/Templates/BaseGame/game/tools/editorClasses/gui/panels/inspector-style-rollout-list.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/panels/inspector-style-rollout-list.png rename to Templates/BaseGame/game/tools/editorClasses/gui/panels/inspector-style-rollout-list.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/panels/inspector-style-rollout-noheader.png b/Templates/BaseGame/game/tools/editorClasses/gui/panels/inspector-style-rollout-noheader.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/panels/inspector-style-rollout-noheader.png rename to Templates/BaseGame/game/tools/editorClasses/gui/panels/inspector-style-rollout-noheader.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/panels/inspector-style-rollout.png b/Templates/BaseGame/game/tools/editorClasses/gui/panels/inspector-style-rollout.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/panels/inspector-style-rollout.png rename to Templates/BaseGame/game/tools/editorClasses/gui/panels/inspector-style-rollout.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/panels/inspector-style-rollout_inner.png b/Templates/BaseGame/game/tools/editorClasses/gui/panels/inspector-style-rollout_inner.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/panels/inspector-style-rollout_inner.png rename to Templates/BaseGame/game/tools/editorClasses/gui/panels/inspector-style-rollout_inner.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/panels/menu-fullborder.png b/Templates/BaseGame/game/tools/editorClasses/gui/panels/menu-fullborder.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/panels/menu-fullborder.png rename to Templates/BaseGame/game/tools/editorClasses/gui/panels/menu-fullborder.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/panels/menubar.png b/Templates/BaseGame/game/tools/editorClasses/gui/panels/menubar.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/panels/menubar.png rename to Templates/BaseGame/game/tools/editorClasses/gui/panels/menubar.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/panels/navPanel.png b/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanel.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/panels/navPanel.png rename to Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanel.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/panels/navPanelProfiles.ed.cs b/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanelProfiles.ed.cs similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/panels/navPanelProfiles.ed.cs rename to Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanelProfiles.ed.cs diff --git a/Templates/Empty/game/tools/editorClasses/gui/panels/navPanel_blue.png b/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanel_blue.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/panels/navPanel_blue.png rename to Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanel_blue.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/panels/navPanel_green.png b/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanel_green.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/panels/navPanel_green.png rename to Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanel_green.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/panels/navPanel_red.png b/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanel_red.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/panels/navPanel_red.png rename to Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanel_red.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/panels/navPanel_white.png b/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanel_white.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/panels/navPanel_white.png rename to Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanel_white.png diff --git a/Templates/Empty/game/tools/editorClasses/gui/panels/navPanel_yellow.png b/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanel_yellow.png similarity index 100% rename from Templates/Empty/game/tools/editorClasses/gui/panels/navPanel_yellow.png rename to Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanel_yellow.png diff --git a/Templates/Empty/game/tools/editorClasses/main.cs b/Templates/BaseGame/game/tools/editorClasses/main.cs similarity index 100% rename from Templates/Empty/game/tools/editorClasses/main.cs rename to Templates/BaseGame/game/tools/editorClasses/main.cs diff --git a/Templates/Empty/game/tools/editorClasses/scripts/RSSNews/RSSFeedScript.ed.cs b/Templates/BaseGame/game/tools/editorClasses/scripts/RSSNews/RSSFeedScript.ed.cs similarity index 100% rename from Templates/Empty/game/tools/editorClasses/scripts/RSSNews/RSSFeedScript.ed.cs rename to Templates/BaseGame/game/tools/editorClasses/scripts/RSSNews/RSSFeedScript.ed.cs diff --git a/Templates/Empty/game/tools/editorClasses/scripts/RSSNews/RSSStructs.ed.cs b/Templates/BaseGame/game/tools/editorClasses/scripts/RSSNews/RSSStructs.ed.cs similarity index 100% rename from Templates/Empty/game/tools/editorClasses/scripts/RSSNews/RSSStructs.ed.cs rename to Templates/BaseGame/game/tools/editorClasses/scripts/RSSNews/RSSStructs.ed.cs diff --git a/Templates/Empty/game/tools/editorClasses/scripts/contextPopup.ed.cs b/Templates/BaseGame/game/tools/editorClasses/scripts/contextPopup.ed.cs similarity index 100% rename from Templates/Empty/game/tools/editorClasses/scripts/contextPopup.ed.cs rename to Templates/BaseGame/game/tools/editorClasses/scripts/contextPopup.ed.cs diff --git a/Templates/Empty/game/tools/editorClasses/scripts/core/zip/zipFile.ed.cs b/Templates/BaseGame/game/tools/editorClasses/scripts/core/zip/zipFile.ed.cs similarity index 100% rename from Templates/Empty/game/tools/editorClasses/scripts/core/zip/zipFile.ed.cs rename to Templates/BaseGame/game/tools/editorClasses/scripts/core/zip/zipFile.ed.cs diff --git a/Templates/Empty/game/tools/editorClasses/scripts/expandos.ed.cs b/Templates/BaseGame/game/tools/editorClasses/scripts/expandos.ed.cs similarity index 100% rename from Templates/Empty/game/tools/editorClasses/scripts/expandos.ed.cs rename to Templates/BaseGame/game/tools/editorClasses/scripts/expandos.ed.cs diff --git a/Templates/Empty/game/tools/editorClasses/scripts/fileLoader.ed.cs b/Templates/BaseGame/game/tools/editorClasses/scripts/fileLoader.ed.cs similarity index 100% rename from Templates/Empty/game/tools/editorClasses/scripts/fileLoader.ed.cs rename to Templates/BaseGame/game/tools/editorClasses/scripts/fileLoader.ed.cs diff --git a/Templates/Empty/game/tools/editorClasses/scripts/guiClasses/guiThumbnail.ed.cs b/Templates/BaseGame/game/tools/editorClasses/scripts/guiClasses/guiThumbnail.ed.cs similarity index 100% rename from Templates/Empty/game/tools/editorClasses/scripts/guiClasses/guiThumbnail.ed.cs rename to Templates/BaseGame/game/tools/editorClasses/scripts/guiClasses/guiThumbnail.ed.cs diff --git a/Templates/Empty/game/tools/editorClasses/scripts/guiClasses/guiThumbnailPopup.ed.cs b/Templates/BaseGame/game/tools/editorClasses/scripts/guiClasses/guiThumbnailPopup.ed.cs similarity index 100% rename from Templates/Empty/game/tools/editorClasses/scripts/guiClasses/guiThumbnailPopup.ed.cs rename to Templates/BaseGame/game/tools/editorClasses/scripts/guiClasses/guiThumbnailPopup.ed.cs diff --git a/Templates/Empty/game/tools/editorClasses/scripts/guiFormClass.ed.cs b/Templates/BaseGame/game/tools/editorClasses/scripts/guiFormClass.ed.cs similarity index 100% rename from Templates/Empty/game/tools/editorClasses/scripts/guiFormClass.ed.cs rename to Templates/BaseGame/game/tools/editorClasses/scripts/guiFormClass.ed.cs diff --git a/Templates/Empty/game/tools/editorClasses/scripts/guiFormContentManager.ed.cs b/Templates/BaseGame/game/tools/editorClasses/scripts/guiFormContentManager.ed.cs similarity index 100% rename from Templates/Empty/game/tools/editorClasses/scripts/guiFormContentManager.ed.cs rename to Templates/BaseGame/game/tools/editorClasses/scripts/guiFormContentManager.ed.cs diff --git a/Templates/Empty/game/tools/editorClasses/scripts/guiFormLayoutManager.ed.cs b/Templates/BaseGame/game/tools/editorClasses/scripts/guiFormLayoutManager.ed.cs similarity index 100% rename from Templates/Empty/game/tools/editorClasses/scripts/guiFormLayoutManager.ed.cs rename to Templates/BaseGame/game/tools/editorClasses/scripts/guiFormLayoutManager.ed.cs diff --git a/Templates/Empty/game/tools/editorClasses/scripts/guiFormLibraryManager.ed.cs b/Templates/BaseGame/game/tools/editorClasses/scripts/guiFormLibraryManager.ed.cs similarity index 100% rename from Templates/Empty/game/tools/editorClasses/scripts/guiFormLibraryManager.ed.cs rename to Templates/BaseGame/game/tools/editorClasses/scripts/guiFormLibraryManager.ed.cs diff --git a/Templates/Empty/game/tools/editorClasses/scripts/guiFormMessageManager.ed.cs b/Templates/BaseGame/game/tools/editorClasses/scripts/guiFormMessageManager.ed.cs similarity index 100% rename from Templates/Empty/game/tools/editorClasses/scripts/guiFormMessageManager.ed.cs rename to Templates/BaseGame/game/tools/editorClasses/scripts/guiFormMessageManager.ed.cs diff --git a/Templates/Empty/game/tools/editorClasses/scripts/guiFormReferenceManager.ed.cs b/Templates/BaseGame/game/tools/editorClasses/scripts/guiFormReferenceManager.ed.cs similarity index 100% rename from Templates/Empty/game/tools/editorClasses/scripts/guiFormReferenceManager.ed.cs rename to Templates/BaseGame/game/tools/editorClasses/scripts/guiFormReferenceManager.ed.cs diff --git a/Templates/Empty/game/tools/editorClasses/scripts/input/applicationEvents.ed.cs b/Templates/BaseGame/game/tools/editorClasses/scripts/input/applicationEvents.ed.cs similarity index 100% rename from Templates/Empty/game/tools/editorClasses/scripts/input/applicationEvents.ed.cs rename to Templates/BaseGame/game/tools/editorClasses/scripts/input/applicationEvents.ed.cs diff --git a/Templates/Empty/game/tools/editorClasses/scripts/input/dragDropEvents.ed.cs b/Templates/BaseGame/game/tools/editorClasses/scripts/input/dragDropEvents.ed.cs similarity index 100% rename from Templates/Empty/game/tools/editorClasses/scripts/input/dragDropEvents.ed.cs rename to Templates/BaseGame/game/tools/editorClasses/scripts/input/dragDropEvents.ed.cs diff --git a/Templates/Empty/game/tools/editorClasses/scripts/input/inputEvents.ed.cs b/Templates/BaseGame/game/tools/editorClasses/scripts/input/inputEvents.ed.cs similarity index 100% rename from Templates/Empty/game/tools/editorClasses/scripts/input/inputEvents.ed.cs rename to Templates/BaseGame/game/tools/editorClasses/scripts/input/inputEvents.ed.cs diff --git a/Templates/Empty/game/art/shapes/.gitignore b/Templates/BaseGame/game/tools/editorClasses/scripts/platform/.gitignore similarity index 100% rename from Templates/Empty/game/art/shapes/.gitignore rename to Templates/BaseGame/game/tools/editorClasses/scripts/platform/.gitignore diff --git a/Templates/Empty/game/tools/editorClasses/scripts/preferencesManager.ed.cs b/Templates/BaseGame/game/tools/editorClasses/scripts/preferencesManager.ed.cs similarity index 100% rename from Templates/Empty/game/tools/editorClasses/scripts/preferencesManager.ed.cs rename to Templates/BaseGame/game/tools/editorClasses/scripts/preferencesManager.ed.cs diff --git a/Templates/Empty/game/tools/editorClasses/scripts/projects/projectEvents.ed.cs b/Templates/BaseGame/game/tools/editorClasses/scripts/projects/projectEvents.ed.cs similarity index 100% rename from Templates/Empty/game/tools/editorClasses/scripts/projects/projectEvents.ed.cs rename to Templates/BaseGame/game/tools/editorClasses/scripts/projects/projectEvents.ed.cs diff --git a/Templates/Empty/game/tools/editorClasses/scripts/projects/projectInternalInterface.ed.cs b/Templates/BaseGame/game/tools/editorClasses/scripts/projects/projectInternalInterface.ed.cs similarity index 100% rename from Templates/Empty/game/tools/editorClasses/scripts/projects/projectInternalInterface.ed.cs rename to Templates/BaseGame/game/tools/editorClasses/scripts/projects/projectInternalInterface.ed.cs diff --git a/Templates/Empty/game/tools/editorClasses/scripts/utility.ed.cs b/Templates/BaseGame/game/tools/editorClasses/scripts/utility.ed.cs similarity index 100% rename from Templates/Empty/game/tools/editorClasses/scripts/utility.ed.cs rename to Templates/BaseGame/game/tools/editorClasses/scripts/utility.ed.cs diff --git a/Templates/Empty/game/art/terrains/materials.cs b/Templates/BaseGame/game/tools/forestEditor/brushes.cs similarity index 100% rename from Templates/Empty/game/art/terrains/materials.cs rename to Templates/BaseGame/game/tools/forestEditor/brushes.cs diff --git a/Templates/Empty/game/tools/forestEditor/forestEditToolbar.ed.gui b/Templates/BaseGame/game/tools/forestEditor/forestEditToolbar.ed.gui similarity index 100% rename from Templates/Empty/game/tools/forestEditor/forestEditToolbar.ed.gui rename to Templates/BaseGame/game/tools/forestEditor/forestEditToolbar.ed.gui diff --git a/Templates/Empty/game/tools/forestEditor/forestEditor.cs b/Templates/BaseGame/game/tools/forestEditor/forestEditor.cs similarity index 100% rename from Templates/Empty/game/tools/forestEditor/forestEditor.cs rename to Templates/BaseGame/game/tools/forestEditor/forestEditor.cs diff --git a/Templates/Empty/game/tools/forestEditor/forestEditorGui.cs b/Templates/BaseGame/game/tools/forestEditor/forestEditorGui.cs similarity index 100% rename from Templates/Empty/game/tools/forestEditor/forestEditorGui.cs rename to Templates/BaseGame/game/tools/forestEditor/forestEditorGui.cs diff --git a/Templates/Empty/game/tools/forestEditor/forestEditorGui.gui b/Templates/BaseGame/game/tools/forestEditor/forestEditorGui.gui similarity index 100% rename from Templates/Empty/game/tools/forestEditor/forestEditorGui.gui rename to Templates/BaseGame/game/tools/forestEditor/forestEditorGui.gui diff --git a/Templates/Empty/game/tools/forestEditor/images/erase-all-btn_d.png b/Templates/BaseGame/game/tools/forestEditor/images/erase-all-btn_d.png similarity index 100% rename from Templates/Empty/game/tools/forestEditor/images/erase-all-btn_d.png rename to Templates/BaseGame/game/tools/forestEditor/images/erase-all-btn_d.png diff --git a/Templates/Empty/game/tools/forestEditor/images/erase-all-btn_h.png b/Templates/BaseGame/game/tools/forestEditor/images/erase-all-btn_h.png similarity index 100% rename from Templates/Empty/game/tools/forestEditor/images/erase-all-btn_h.png rename to Templates/BaseGame/game/tools/forestEditor/images/erase-all-btn_h.png diff --git a/Templates/Empty/game/tools/forestEditor/images/erase-all-btn_n.png b/Templates/BaseGame/game/tools/forestEditor/images/erase-all-btn_n.png similarity index 100% rename from Templates/Empty/game/tools/forestEditor/images/erase-all-btn_n.png rename to Templates/BaseGame/game/tools/forestEditor/images/erase-all-btn_n.png diff --git a/Templates/Empty/game/tools/forestEditor/images/erase-element-btn_d.png b/Templates/BaseGame/game/tools/forestEditor/images/erase-element-btn_d.png similarity index 100% rename from Templates/Empty/game/tools/forestEditor/images/erase-element-btn_d.png rename to Templates/BaseGame/game/tools/forestEditor/images/erase-element-btn_d.png diff --git a/Templates/Empty/game/tools/forestEditor/images/erase-element-btn_h.png b/Templates/BaseGame/game/tools/forestEditor/images/erase-element-btn_h.png similarity index 100% rename from Templates/Empty/game/tools/forestEditor/images/erase-element-btn_h.png rename to Templates/BaseGame/game/tools/forestEditor/images/erase-element-btn_h.png diff --git a/Templates/Empty/game/tools/forestEditor/images/erase-element-btn_n.png b/Templates/BaseGame/game/tools/forestEditor/images/erase-element-btn_n.png similarity index 100% rename from Templates/Empty/game/tools/forestEditor/images/erase-element-btn_n.png rename to Templates/BaseGame/game/tools/forestEditor/images/erase-element-btn_n.png diff --git a/Templates/Empty/game/tools/forestEditor/images/forest-editor-btn_d.png b/Templates/BaseGame/game/tools/forestEditor/images/forest-editor-btn_d.png similarity index 100% rename from Templates/Empty/game/tools/forestEditor/images/forest-editor-btn_d.png rename to Templates/BaseGame/game/tools/forestEditor/images/forest-editor-btn_d.png diff --git a/Templates/Empty/game/tools/forestEditor/images/forest-editor-btn_h.png b/Templates/BaseGame/game/tools/forestEditor/images/forest-editor-btn_h.png similarity index 100% rename from Templates/Empty/game/tools/forestEditor/images/forest-editor-btn_h.png rename to Templates/BaseGame/game/tools/forestEditor/images/forest-editor-btn_h.png diff --git a/Templates/Empty/game/tools/forestEditor/images/forest-editor-btn_n.png b/Templates/BaseGame/game/tools/forestEditor/images/forest-editor-btn_n.png similarity index 100% rename from Templates/Empty/game/tools/forestEditor/images/forest-editor-btn_n.png rename to Templates/BaseGame/game/tools/forestEditor/images/forest-editor-btn_n.png diff --git a/Templates/Empty/game/tools/forestEditor/images/new-brush_d.png b/Templates/BaseGame/game/tools/forestEditor/images/new-brush_d.png similarity index 100% rename from Templates/Empty/game/tools/forestEditor/images/new-brush_d.png rename to Templates/BaseGame/game/tools/forestEditor/images/new-brush_d.png diff --git a/Templates/Empty/game/tools/forestEditor/images/new-brush_h.png b/Templates/BaseGame/game/tools/forestEditor/images/new-brush_h.png similarity index 100% rename from Templates/Empty/game/tools/forestEditor/images/new-brush_h.png rename to Templates/BaseGame/game/tools/forestEditor/images/new-brush_h.png diff --git a/Templates/Empty/game/tools/forestEditor/images/new-brush_n.png b/Templates/BaseGame/game/tools/forestEditor/images/new-brush_n.png similarity index 100% rename from Templates/Empty/game/tools/forestEditor/images/new-brush_n.png rename to Templates/BaseGame/game/tools/forestEditor/images/new-brush_n.png diff --git a/Templates/Empty/game/tools/forestEditor/images/new-element_d.png b/Templates/BaseGame/game/tools/forestEditor/images/new-element_d.png similarity index 100% rename from Templates/Empty/game/tools/forestEditor/images/new-element_d.png rename to Templates/BaseGame/game/tools/forestEditor/images/new-element_d.png diff --git a/Templates/Empty/game/tools/forestEditor/images/new-element_h.png b/Templates/BaseGame/game/tools/forestEditor/images/new-element_h.png similarity index 100% rename from Templates/Empty/game/tools/forestEditor/images/new-element_h.png rename to Templates/BaseGame/game/tools/forestEditor/images/new-element_h.png diff --git a/Templates/Empty/game/tools/forestEditor/images/new-element_n.png b/Templates/BaseGame/game/tools/forestEditor/images/new-element_n.png similarity index 100% rename from Templates/Empty/game/tools/forestEditor/images/new-element_n.png rename to Templates/BaseGame/game/tools/forestEditor/images/new-element_n.png diff --git a/Templates/Empty/game/tools/forestEditor/images/new-mesh_d.png b/Templates/BaseGame/game/tools/forestEditor/images/new-mesh_d.png similarity index 100% rename from Templates/Empty/game/tools/forestEditor/images/new-mesh_d.png rename to Templates/BaseGame/game/tools/forestEditor/images/new-mesh_d.png diff --git a/Templates/Empty/game/tools/forestEditor/images/new-mesh_h.png b/Templates/BaseGame/game/tools/forestEditor/images/new-mesh_h.png similarity index 100% rename from Templates/Empty/game/tools/forestEditor/images/new-mesh_h.png rename to Templates/BaseGame/game/tools/forestEditor/images/new-mesh_h.png diff --git a/Templates/Empty/game/tools/forestEditor/images/new-mesh_n.png b/Templates/BaseGame/game/tools/forestEditor/images/new-mesh_n.png similarity index 100% rename from Templates/Empty/game/tools/forestEditor/images/new-mesh_n.png rename to Templates/BaseGame/game/tools/forestEditor/images/new-mesh_n.png diff --git a/Templates/Empty/game/tools/forestEditor/images/paint-forest-btn_d.png b/Templates/BaseGame/game/tools/forestEditor/images/paint-forest-btn_d.png similarity index 100% rename from Templates/Empty/game/tools/forestEditor/images/paint-forest-btn_d.png rename to Templates/BaseGame/game/tools/forestEditor/images/paint-forest-btn_d.png diff --git a/Templates/Empty/game/tools/forestEditor/images/paint-forest-btn_h.png b/Templates/BaseGame/game/tools/forestEditor/images/paint-forest-btn_h.png similarity index 100% rename from Templates/Empty/game/tools/forestEditor/images/paint-forest-btn_h.png rename to Templates/BaseGame/game/tools/forestEditor/images/paint-forest-btn_h.png diff --git a/Templates/Empty/game/tools/forestEditor/images/paint-forest-btn_n.png b/Templates/BaseGame/game/tools/forestEditor/images/paint-forest-btn_n.png similarity index 100% rename from Templates/Empty/game/tools/forestEditor/images/paint-forest-btn_n.png rename to Templates/BaseGame/game/tools/forestEditor/images/paint-forest-btn_n.png diff --git a/Templates/Empty/game/tools/forestEditor/main.cs b/Templates/BaseGame/game/tools/forestEditor/main.cs similarity index 96% rename from Templates/Empty/game/tools/forestEditor/main.cs rename to Templates/BaseGame/game/tools/forestEditor/main.cs index 6a7dbf994..346365b04 100644 --- a/Templates/Empty/game/tools/forestEditor/main.cs +++ b/Templates/BaseGame/game/tools/forestEditor/main.cs @@ -93,9 +93,10 @@ function ForestEditorPlugin::onWorldEditorStartup( %this ) { new PersistenceManager( ForestDataManager ); - %brushPath = "art/forest/brushes.cs"; + %brushPath = "tools/forestEditor/brushes.cs"; + if ( !isFile( %brushPath ) ) - createPath( %brushPath ); + %successfulFile = createPath( %brushPath ); // This creates the ForestBrushGroup, all brushes, and elements. exec( %brushpath ); @@ -204,7 +205,7 @@ function ForestEditorPlugin::onActivated( %this ) } if ( %this.showError ) - MessageBoxOK( "Error", "Your art/forest folder does not contain a valid brushes.cs. Brushes you create will not be saved!" ); + MessageBoxOK( "Error", "Your tools/forestEditor folder does not contain a valid brushes.cs. Brushes you create will not be saved!" ); } function ForestEditorPlugin::onDeactivated( %this ) @@ -261,7 +262,7 @@ function ForestEditorPlugin::onSaveMission( %this, %missionFile ) } } - ForestBrushGroup.save( "art/forest/brushes.cs" ); + ForestBrushGroup.save( "tools/forestEditor/brushes.cs" ); } function ForestEditorPlugin::onEditorSleep( %this ) diff --git a/Templates/Empty/game/tools/forestEditor/tools.cs b/Templates/BaseGame/game/tools/forestEditor/tools.cs similarity index 100% rename from Templates/Empty/game/tools/forestEditor/tools.cs rename to Templates/BaseGame/game/tools/forestEditor/tools.cs diff --git a/Templates/Empty/game/tools/gui/EditorLoadingGui.gui b/Templates/BaseGame/game/tools/gui/EditorLoadingGui.gui similarity index 100% rename from Templates/Empty/game/tools/gui/EditorLoadingGui.gui rename to Templates/BaseGame/game/tools/gui/EditorLoadingGui.gui diff --git a/Templates/Empty/game/tools/gui/GuiEaseEditDlg.ed.cs b/Templates/BaseGame/game/tools/gui/GuiEaseEditDlg.ed.cs similarity index 100% rename from Templates/Empty/game/tools/gui/GuiEaseEditDlg.ed.cs rename to Templates/BaseGame/game/tools/gui/GuiEaseEditDlg.ed.cs diff --git a/Templates/Empty/game/tools/gui/GuiEaseEditDlg.ed.gui b/Templates/BaseGame/game/tools/gui/GuiEaseEditDlg.ed.gui similarity index 100% rename from Templates/Empty/game/tools/gui/GuiEaseEditDlg.ed.gui rename to Templates/BaseGame/game/tools/gui/GuiEaseEditDlg.ed.gui diff --git a/Templates/Empty/game/tools/gui/colladaImport.ed.gui b/Templates/BaseGame/game/tools/gui/colladaImport.ed.gui similarity index 100% rename from Templates/Empty/game/tools/gui/colladaImport.ed.gui rename to Templates/BaseGame/game/tools/gui/colladaImport.ed.gui diff --git a/Templates/Empty/game/tools/gui/colorPicker.ed.gui b/Templates/BaseGame/game/tools/gui/colorPicker.ed.gui similarity index 100% rename from Templates/Empty/game/tools/gui/colorPicker.ed.gui rename to Templates/BaseGame/game/tools/gui/colorPicker.ed.gui diff --git a/Templates/Empty/game/tools/gui/cursors.ed.cs b/Templates/BaseGame/game/tools/gui/cursors.ed.cs similarity index 100% rename from Templates/Empty/game/tools/gui/cursors.ed.cs rename to Templates/BaseGame/game/tools/gui/cursors.ed.cs diff --git a/Templates/Empty/game/tools/gui/fileDialogBase.ed.cs b/Templates/BaseGame/game/tools/gui/fileDialogBase.ed.cs similarity index 100% rename from Templates/Empty/game/tools/gui/fileDialogBase.ed.cs rename to Templates/BaseGame/game/tools/gui/fileDialogBase.ed.cs diff --git a/Templates/Empty/game/tools/gui/guiDialogs.ed.cs b/Templates/BaseGame/game/tools/gui/guiDialogs.ed.cs similarity index 98% rename from Templates/Empty/game/tools/gui/guiDialogs.ed.cs rename to Templates/BaseGame/game/tools/gui/guiDialogs.ed.cs index db09e8570..696b98975 100644 --- a/Templates/Empty/game/tools/gui/guiDialogs.ed.cs +++ b/Templates/BaseGame/game/tools/gui/guiDialogs.ed.cs @@ -36,3 +36,4 @@ exec("./guiObjectInspector.ed.cs"); exec("./uvEditor.ed.gui"); exec("./objectSelection.ed.cs"); exec("./guiPlatformGenericMenubar.ed.cs"); +exec("./postFxManager.gui"); \ No newline at end of file diff --git a/Templates/Empty/game/tools/gui/guiObjectInspector.ed.cs b/Templates/BaseGame/game/tools/gui/guiObjectInspector.ed.cs similarity index 100% rename from Templates/Empty/game/tools/gui/guiObjectInspector.ed.cs rename to Templates/BaseGame/game/tools/gui/guiObjectInspector.ed.cs diff --git a/Templates/Empty/game/tools/gui/guiObjectInspector.ed.gui b/Templates/BaseGame/game/tools/gui/guiObjectInspector.ed.gui similarity index 100% rename from Templates/Empty/game/tools/gui/guiObjectInspector.ed.gui rename to Templates/BaseGame/game/tools/gui/guiObjectInspector.ed.gui diff --git a/Templates/Empty/game/tools/gui/guiPlatformGenericMenubar.ed.cs b/Templates/BaseGame/game/tools/gui/guiPlatformGenericMenubar.ed.cs similarity index 100% rename from Templates/Empty/game/tools/gui/guiPlatformGenericMenubar.ed.cs rename to Templates/BaseGame/game/tools/gui/guiPlatformGenericMenubar.ed.cs diff --git a/Templates/Empty/game/tools/gui/guiPlatformGenericMenubar.ed.gui b/Templates/BaseGame/game/tools/gui/guiPlatformGenericMenubar.ed.gui similarity index 100% rename from Templates/Empty/game/tools/gui/guiPlatformGenericMenubar.ed.gui rename to Templates/BaseGame/game/tools/gui/guiPlatformGenericMenubar.ed.gui diff --git a/Templates/Empty/game/tools/gui/images/ColladaImport/iconAnimation.png b/Templates/BaseGame/game/tools/gui/images/ColladaImport/iconAnimation.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/ColladaImport/iconAnimation.png rename to Templates/BaseGame/game/tools/gui/images/ColladaImport/iconAnimation.png diff --git a/Templates/Empty/game/tools/gui/images/ColladaImport/iconExistingMaterial.png b/Templates/BaseGame/game/tools/gui/images/ColladaImport/iconExistingMaterial.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/ColladaImport/iconExistingMaterial.png rename to Templates/BaseGame/game/tools/gui/images/ColladaImport/iconExistingMaterial.png diff --git a/Templates/Empty/game/tools/gui/images/ColladaImport/iconIgnoreNode.png b/Templates/BaseGame/game/tools/gui/images/ColladaImport/iconIgnoreNode.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/ColladaImport/iconIgnoreNode.png rename to Templates/BaseGame/game/tools/gui/images/ColladaImport/iconIgnoreNode.png diff --git a/Templates/Empty/game/tools/gui/images/ColladaImport/iconLight.png b/Templates/BaseGame/game/tools/gui/images/ColladaImport/iconLight.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/ColladaImport/iconLight.png rename to Templates/BaseGame/game/tools/gui/images/ColladaImport/iconLight.png diff --git a/Templates/Empty/game/tools/gui/images/ColladaImport/iconMaterial.png b/Templates/BaseGame/game/tools/gui/images/ColladaImport/iconMaterial.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/ColladaImport/iconMaterial.png rename to Templates/BaseGame/game/tools/gui/images/ColladaImport/iconMaterial.png diff --git a/Templates/Empty/game/tools/gui/images/ColladaImport/iconMesh.png b/Templates/BaseGame/game/tools/gui/images/ColladaImport/iconMesh.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/ColladaImport/iconMesh.png rename to Templates/BaseGame/game/tools/gui/images/ColladaImport/iconMesh.png diff --git a/Templates/Empty/game/tools/gui/images/ColladaImport/iconNode.png b/Templates/BaseGame/game/tools/gui/images/ColladaImport/iconNode.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/ColladaImport/iconNode.png rename to Templates/BaseGame/game/tools/gui/images/ColladaImport/iconNode.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/align-bottom_d.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align-bottom_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/align-bottom_d.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/align-bottom_d.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/align-bottom_h.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align-bottom_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/align-bottom_h.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/align-bottom_h.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/align-bottom_n.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align-bottom_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/align-bottom_n.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/align-bottom_n.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/align-left_d.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align-left_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/align-left_d.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/align-left_d.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/align-left_h.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align-left_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/align-left_h.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/align-left_h.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/align-left_n.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align-left_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/align-left_n.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/align-left_n.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/align-right_d.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align-right_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/align-right_d.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/align-right_d.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/align-right_h.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align-right_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/align-right_h.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/align-right_h.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/align-right_n.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align-right_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/align-right_n.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/align-right_n.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/align-top_d.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align-top_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/align-top_d.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/align-top_d.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/align-top_h.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align-top_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/align-top_h.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/align-top_h.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/align-top_n.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align-top_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/align-top_n.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/align-top_n.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/bring-to-front_d.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/bring-to-front_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/bring-to-front_d.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/bring-to-front_d.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/bring-to-front_h.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/bring-to-front_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/bring-to-front_h.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/bring-to-front_h.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/bring-to-front_n.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/bring-to-front_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/bring-to-front_n.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/bring-to-front_n.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/centersnap_d.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/centersnap_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/centersnap_d.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/centersnap_d.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/centersnap_h.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/centersnap_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/centersnap_h.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/centersnap_h.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/centersnap_n.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/centersnap_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/centersnap_n.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/centersnap_n.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/distribute-horizontal_d.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/distribute-horizontal_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/distribute-horizontal_d.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/distribute-horizontal_d.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/distribute-horizontal_h.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/distribute-horizontal_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/distribute-horizontal_h.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/distribute-horizontal_h.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/distribute-horizontal_n.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/distribute-horizontal_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/distribute-horizontal_n.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/distribute-horizontal_n.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/distribute-vertical_d.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/distribute-vertical_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/distribute-vertical_d.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/distribute-vertical_d.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/distribute-vertical_h.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/distribute-vertical_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/distribute-vertical_h.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/distribute-vertical_h.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/distribute-vertical_n.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/distribute-vertical_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/distribute-vertical_n.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/distribute-vertical_n.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/edgesnap_d.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/edgesnap_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/edgesnap_d.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/edgesnap_d.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/edgesnap_h.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/edgesnap_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/edgesnap_h.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/edgesnap_h.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/edgesnap_n.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/edgesnap_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/edgesnap_n.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/edgesnap_n.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/gui-library_d.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/gui-library_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/gui-library_d.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/gui-library_d.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/gui-library_h.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/gui-library_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/gui-library_h.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/gui-library_h.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/gui-library_n.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/gui-library_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/gui-library_n.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/gui-library_n.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/horizontal-center_d.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/horizontal-center_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/horizontal-center_d.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/horizontal-center_d.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/horizontal-center_h.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/horizontal-center_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/horizontal-center_h.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/horizontal-center_h.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/horizontal-center_n.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/horizontal-center_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/horizontal-center_n.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/horizontal-center_n.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/send-to-back_d.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/send-to-back_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/send-to-back_d.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/send-to-back_d.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/send-to-back_h.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/send-to-back_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/send-to-back_h.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/send-to-back_h.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/send-to-back_n.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/send-to-back_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/send-to-back_n.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/send-to-back_n.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/snap-grid_d.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/snap-grid_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/snap-grid_d.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/snap-grid_d.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/snap-grid_h.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/snap-grid_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/snap-grid_h.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/snap-grid_h.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/snap-grid_n.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/snap-grid_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/snap-grid_n.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/snap-grid_n.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/vertical-center_d.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/vertical-center_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/vertical-center_d.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/vertical-center_d.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/vertical-center_h.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/vertical-center_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/vertical-center_h.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/vertical-center_h.png diff --git a/Templates/Empty/game/tools/gui/images/GUI-editor/vertical-center_n.png b/Templates/BaseGame/game/tools/gui/images/GUI-editor/vertical-center_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/GUI-editor/vertical-center_n.png rename to Templates/BaseGame/game/tools/gui/images/GUI-editor/vertical-center_n.png diff --git a/Templates/Empty/game/tools/gui/images/NESW.png b/Templates/BaseGame/game/tools/gui/images/NESW.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/NESW.png rename to Templates/BaseGame/game/tools/gui/images/NESW.png diff --git a/Templates/Empty/game/tools/gui/images/NWSE.png b/Templates/BaseGame/game/tools/gui/images/NWSE.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/NWSE.png rename to Templates/BaseGame/game/tools/gui/images/NWSE.png diff --git a/Templates/Empty/game/tools/gui/images/add-simgroup-btn_ctrl_d.png b/Templates/BaseGame/game/tools/gui/images/add-simgroup-btn_ctrl_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/add-simgroup-btn_ctrl_d.png rename to Templates/BaseGame/game/tools/gui/images/add-simgroup-btn_ctrl_d.png diff --git a/Templates/Empty/game/tools/gui/images/add-simgroup-btn_ctrl_h.png b/Templates/BaseGame/game/tools/gui/images/add-simgroup-btn_ctrl_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/add-simgroup-btn_ctrl_h.png rename to Templates/BaseGame/game/tools/gui/images/add-simgroup-btn_ctrl_h.png diff --git a/Templates/Empty/game/tools/gui/images/add-simgroup-btn_ctrl_n.png b/Templates/BaseGame/game/tools/gui/images/add-simgroup-btn_ctrl_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/add-simgroup-btn_ctrl_n.png rename to Templates/BaseGame/game/tools/gui/images/add-simgroup-btn_ctrl_n.png diff --git a/Templates/Empty/game/tools/gui/images/add-simgroup-btn_d.png b/Templates/BaseGame/game/tools/gui/images/add-simgroup-btn_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/add-simgroup-btn_d.png rename to Templates/BaseGame/game/tools/gui/images/add-simgroup-btn_d.png diff --git a/Templates/Empty/game/tools/gui/images/add-simgroup-btn_h.png b/Templates/BaseGame/game/tools/gui/images/add-simgroup-btn_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/add-simgroup-btn_h.png rename to Templates/BaseGame/game/tools/gui/images/add-simgroup-btn_h.png diff --git a/Templates/Empty/game/tools/gui/images/add-simgroup-btn_n.png b/Templates/BaseGame/game/tools/gui/images/add-simgroup-btn_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/add-simgroup-btn_n.png rename to Templates/BaseGame/game/tools/gui/images/add-simgroup-btn_n.png diff --git a/Templates/Empty/game/tools/gui/images/arrowbtn_d.png b/Templates/BaseGame/game/tools/gui/images/arrowbtn_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/arrowbtn_d.png rename to Templates/BaseGame/game/tools/gui/images/arrowbtn_d.png diff --git a/Templates/Empty/game/tools/gui/images/arrowbtn_n.png b/Templates/BaseGame/game/tools/gui/images/arrowbtn_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/arrowbtn_n.png rename to Templates/BaseGame/game/tools/gui/images/arrowbtn_n.png diff --git a/Templates/Empty/game/tools/gui/images/axis-icon_-x.png b/Templates/BaseGame/game/tools/gui/images/axis-icon_-x.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/axis-icon_-x.png rename to Templates/BaseGame/game/tools/gui/images/axis-icon_-x.png diff --git a/Templates/Empty/game/tools/gui/images/axis-icon_-y.png b/Templates/BaseGame/game/tools/gui/images/axis-icon_-y.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/axis-icon_-y.png rename to Templates/BaseGame/game/tools/gui/images/axis-icon_-y.png diff --git a/Templates/Empty/game/tools/gui/images/axis-icon_-z.png b/Templates/BaseGame/game/tools/gui/images/axis-icon_-z.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/axis-icon_-z.png rename to Templates/BaseGame/game/tools/gui/images/axis-icon_-z.png diff --git a/Templates/Empty/game/tools/gui/images/axis-icon_x.png b/Templates/BaseGame/game/tools/gui/images/axis-icon_x.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/axis-icon_x.png rename to Templates/BaseGame/game/tools/gui/images/axis-icon_x.png diff --git a/Templates/Empty/game/tools/gui/images/axis-icon_y.png b/Templates/BaseGame/game/tools/gui/images/axis-icon_y.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/axis-icon_y.png rename to Templates/BaseGame/game/tools/gui/images/axis-icon_y.png diff --git a/Templates/Empty/game/tools/gui/images/axis-icon_z.png b/Templates/BaseGame/game/tools/gui/images/axis-icon_z.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/axis-icon_z.png rename to Templates/BaseGame/game/tools/gui/images/axis-icon_z.png diff --git a/Templates/Empty/game/tools/gui/images/button.png b/Templates/BaseGame/game/tools/gui/images/button.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/button.png rename to Templates/BaseGame/game/tools/gui/images/button.png diff --git a/Templates/Empty/game/tools/gui/images/camera-btn_d.png b/Templates/BaseGame/game/tools/gui/images/camera-btn_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/camera-btn_d.png rename to Templates/BaseGame/game/tools/gui/images/camera-btn_d.png diff --git a/Templates/Empty/game/tools/gui/images/camera-btn_h.png b/Templates/BaseGame/game/tools/gui/images/camera-btn_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/camera-btn_h.png rename to Templates/BaseGame/game/tools/gui/images/camera-btn_h.png diff --git a/Templates/Empty/game/tools/gui/images/camera-btn_n.png b/Templates/BaseGame/game/tools/gui/images/camera-btn_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/camera-btn_n.png rename to Templates/BaseGame/game/tools/gui/images/camera-btn_n.png diff --git a/Templates/Empty/game/tools/gui/images/checkbox-list.png b/Templates/BaseGame/game/tools/gui/images/checkbox-list.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/checkbox-list.png rename to Templates/BaseGame/game/tools/gui/images/checkbox-list.png diff --git a/Templates/Empty/game/tools/gui/images/checkbox-list_fliped.png b/Templates/BaseGame/game/tools/gui/images/checkbox-list_fliped.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/checkbox-list_fliped.png rename to Templates/BaseGame/game/tools/gui/images/checkbox-list_fliped.png diff --git a/Templates/Empty/game/tools/gui/images/checkbox-menubar.png b/Templates/BaseGame/game/tools/gui/images/checkbox-menubar.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/checkbox-menubar.png rename to Templates/BaseGame/game/tools/gui/images/checkbox-menubar.png diff --git a/Templates/BaseGame/game/tools/gui/images/checkbox.png b/Templates/BaseGame/game/tools/gui/images/checkbox.png new file mode 100644 index 000000000..46e0ac959 Binary files /dev/null and b/Templates/BaseGame/game/tools/gui/images/checkbox.png differ diff --git a/Templates/Empty/game/tools/gui/images/clear-btn_d.png b/Templates/BaseGame/game/tools/gui/images/clear-btn_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/clear-btn_d.png rename to Templates/BaseGame/game/tools/gui/images/clear-btn_d.png diff --git a/Templates/Empty/game/tools/gui/images/clear-btn_h.png b/Templates/BaseGame/game/tools/gui/images/clear-btn_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/clear-btn_h.png rename to Templates/BaseGame/game/tools/gui/images/clear-btn_h.png diff --git a/Templates/Empty/game/tools/gui/images/clear-btn_n.png b/Templates/BaseGame/game/tools/gui/images/clear-btn_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/clear-btn_n.png rename to Templates/BaseGame/game/tools/gui/images/clear-btn_n.png diff --git a/Templates/Empty/game/tools/gui/images/clear-icon_d.png b/Templates/BaseGame/game/tools/gui/images/clear-icon_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/clear-icon_d.png rename to Templates/BaseGame/game/tools/gui/images/clear-icon_d.png diff --git a/Templates/Empty/game/tools/gui/images/clear-icon_h.png b/Templates/BaseGame/game/tools/gui/images/clear-icon_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/clear-icon_h.png rename to Templates/BaseGame/game/tools/gui/images/clear-icon_h.png diff --git a/Templates/Empty/game/tools/gui/images/clear-icon_n.png b/Templates/BaseGame/game/tools/gui/images/clear-icon_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/clear-icon_n.png rename to Templates/BaseGame/game/tools/gui/images/clear-icon_n.png diff --git a/Templates/Empty/game/tools/gui/images/collapse-toolbar_d.png b/Templates/BaseGame/game/tools/gui/images/collapse-toolbar_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/collapse-toolbar_d.png rename to Templates/BaseGame/game/tools/gui/images/collapse-toolbar_d.png diff --git a/Templates/Empty/game/tools/gui/images/collapse-toolbar_h.png b/Templates/BaseGame/game/tools/gui/images/collapse-toolbar_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/collapse-toolbar_h.png rename to Templates/BaseGame/game/tools/gui/images/collapse-toolbar_h.png diff --git a/Templates/Empty/game/tools/gui/images/collapse-toolbar_n.png b/Templates/BaseGame/game/tools/gui/images/collapse-toolbar_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/collapse-toolbar_n.png rename to Templates/BaseGame/game/tools/gui/images/collapse-toolbar_n.png diff --git a/Templates/Empty/game/tools/gui/images/copy-btn_d.png b/Templates/BaseGame/game/tools/gui/images/copy-btn_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/copy-btn_d.png rename to Templates/BaseGame/game/tools/gui/images/copy-btn_d.png diff --git a/Templates/Empty/game/tools/gui/images/copy-btn_h.png b/Templates/BaseGame/game/tools/gui/images/copy-btn_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/copy-btn_h.png rename to Templates/BaseGame/game/tools/gui/images/copy-btn_h.png diff --git a/Templates/Empty/game/tools/gui/images/copy-btn_i.png b/Templates/BaseGame/game/tools/gui/images/copy-btn_i.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/copy-btn_i.png rename to Templates/BaseGame/game/tools/gui/images/copy-btn_i.png diff --git a/Templates/Empty/game/tools/gui/images/copy-btn_n.png b/Templates/BaseGame/game/tools/gui/images/copy-btn_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/copy-btn_n.png rename to Templates/BaseGame/game/tools/gui/images/copy-btn_n.png diff --git a/Templates/Empty/game/core/art/gui/images/crosshair.png b/Templates/BaseGame/game/tools/gui/images/crosshair.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/crosshair.png rename to Templates/BaseGame/game/tools/gui/images/crosshair.png diff --git a/Templates/Empty/game/core/art/gui/images/crosshair_blue.png b/Templates/BaseGame/game/tools/gui/images/crosshair_blue.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/crosshair_blue.png rename to Templates/BaseGame/game/tools/gui/images/crosshair_blue.png diff --git a/Templates/Empty/game/tools/gui/images/delete_d.png b/Templates/BaseGame/game/tools/gui/images/delete_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/delete_d.png rename to Templates/BaseGame/game/tools/gui/images/delete_d.png diff --git a/Templates/Empty/game/tools/gui/images/delete_h.png b/Templates/BaseGame/game/tools/gui/images/delete_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/delete_h.png rename to Templates/BaseGame/game/tools/gui/images/delete_h.png diff --git a/Templates/Empty/game/tools/gui/images/delete_n.png b/Templates/BaseGame/game/tools/gui/images/delete_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/delete_n.png rename to Templates/BaseGame/game/tools/gui/images/delete_n.png diff --git a/Templates/Empty/game/tools/gui/images/dropDown-tab.png b/Templates/BaseGame/game/tools/gui/images/dropDown-tab.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/dropDown-tab.png rename to Templates/BaseGame/game/tools/gui/images/dropDown-tab.png diff --git a/Templates/Empty/game/tools/gui/images/dropDown.png b/Templates/BaseGame/game/tools/gui/images/dropDown.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/dropDown.png rename to Templates/BaseGame/game/tools/gui/images/dropDown.png diff --git a/Templates/Empty/game/tools/gui/images/dropdown-button-arrow.png b/Templates/BaseGame/game/tools/gui/images/dropdown-button-arrow.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/dropdown-button-arrow.png rename to Templates/BaseGame/game/tools/gui/images/dropdown-button-arrow.png diff --git a/Templates/Empty/game/tools/gui/images/dropdown-textEdit.png b/Templates/BaseGame/game/tools/gui/images/dropdown-textEdit.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/dropdown-textEdit.png rename to Templates/BaseGame/game/tools/gui/images/dropdown-textEdit.png diff --git a/Templates/Empty/game/tools/gui/images/dropslider_d.png b/Templates/BaseGame/game/tools/gui/images/dropslider_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/dropslider_d.png rename to Templates/BaseGame/game/tools/gui/images/dropslider_d.png diff --git a/Templates/Empty/game/tools/gui/images/dropslider_h.png b/Templates/BaseGame/game/tools/gui/images/dropslider_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/dropslider_h.png rename to Templates/BaseGame/game/tools/gui/images/dropslider_h.png diff --git a/Templates/Empty/game/tools/gui/images/dropslider_n.png b/Templates/BaseGame/game/tools/gui/images/dropslider_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/dropslider_n.png rename to Templates/BaseGame/game/tools/gui/images/dropslider_n.png diff --git a/Templates/Empty/game/tools/gui/images/expand-toolbar_d.png b/Templates/BaseGame/game/tools/gui/images/expand-toolbar_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/expand-toolbar_d.png rename to Templates/BaseGame/game/tools/gui/images/expand-toolbar_d.png diff --git a/Templates/Empty/game/tools/gui/images/expand-toolbar_h.png b/Templates/BaseGame/game/tools/gui/images/expand-toolbar_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/expand-toolbar_h.png rename to Templates/BaseGame/game/tools/gui/images/expand-toolbar_h.png diff --git a/Templates/Empty/game/tools/gui/images/expand-toolbar_n.png b/Templates/BaseGame/game/tools/gui/images/expand-toolbar_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/expand-toolbar_n.png rename to Templates/BaseGame/game/tools/gui/images/expand-toolbar_n.png diff --git a/Templates/Empty/game/tools/gui/images/folder.png b/Templates/BaseGame/game/tools/gui/images/folder.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/folder.png rename to Templates/BaseGame/game/tools/gui/images/folder.png diff --git a/Templates/Empty/game/tools/gui/images/folderUp.png b/Templates/BaseGame/game/tools/gui/images/folderUp.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/folderUp.png rename to Templates/BaseGame/game/tools/gui/images/folderUp.png diff --git a/Templates/Empty/game/tools/gui/images/folderUp_d.png b/Templates/BaseGame/game/tools/gui/images/folderUp_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/folderUp_d.png rename to Templates/BaseGame/game/tools/gui/images/folderUp_d.png diff --git a/Templates/Empty/game/tools/gui/images/folderUp_h.png b/Templates/BaseGame/game/tools/gui/images/folderUp_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/folderUp_h.png rename to Templates/BaseGame/game/tools/gui/images/folderUp_h.png diff --git a/Templates/BaseGame/game/tools/gui/images/group-border.png b/Templates/BaseGame/game/tools/gui/images/group-border.png new file mode 100644 index 000000000..61234ae1f Binary files /dev/null and b/Templates/BaseGame/game/tools/gui/images/group-border.png differ diff --git a/Templates/Empty/game/tools/gui/images/iconAccept.png b/Templates/BaseGame/game/tools/gui/images/iconAccept.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/iconAccept.png rename to Templates/BaseGame/game/tools/gui/images/iconAccept.png diff --git a/Templates/Empty/game/tools/gui/images/iconAdd.png b/Templates/BaseGame/game/tools/gui/images/iconAdd.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/iconAdd.png rename to Templates/BaseGame/game/tools/gui/images/iconAdd.png diff --git a/Templates/Empty/game/tools/gui/images/iconCancel.png b/Templates/BaseGame/game/tools/gui/images/iconCancel.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/iconCancel.png rename to Templates/BaseGame/game/tools/gui/images/iconCancel.png diff --git a/Templates/Empty/game/tools/gui/images/iconCollada.png b/Templates/BaseGame/game/tools/gui/images/iconCollada.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/iconCollada.png rename to Templates/BaseGame/game/tools/gui/images/iconCollada.png diff --git a/Templates/Empty/game/tools/gui/images/iconDelete.png b/Templates/BaseGame/game/tools/gui/images/iconDelete.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/iconDelete.png rename to Templates/BaseGame/game/tools/gui/images/iconDelete.png diff --git a/Templates/Empty/game/tools/gui/images/iconIcon.png b/Templates/BaseGame/game/tools/gui/images/iconIcon.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/iconIcon.png rename to Templates/BaseGame/game/tools/gui/images/iconIcon.png diff --git a/Templates/Empty/game/tools/gui/images/iconInformation.png b/Templates/BaseGame/game/tools/gui/images/iconInformation.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/iconInformation.png rename to Templates/BaseGame/game/tools/gui/images/iconInformation.png diff --git a/Templates/Empty/game/tools/gui/images/iconList.png b/Templates/BaseGame/game/tools/gui/images/iconList.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/iconList.png rename to Templates/BaseGame/game/tools/gui/images/iconList.png diff --git a/Templates/Empty/game/tools/gui/images/iconLocked.png b/Templates/BaseGame/game/tools/gui/images/iconLocked.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/iconLocked.png rename to Templates/BaseGame/game/tools/gui/images/iconLocked.png diff --git a/Templates/Empty/game/tools/gui/images/iconNew.png b/Templates/BaseGame/game/tools/gui/images/iconNew.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/iconNew.png rename to Templates/BaseGame/game/tools/gui/images/iconNew.png diff --git a/Templates/Empty/game/tools/gui/images/iconOpen.png b/Templates/BaseGame/game/tools/gui/images/iconOpen.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/iconOpen.png rename to Templates/BaseGame/game/tools/gui/images/iconOpen.png diff --git a/Templates/Empty/game/tools/gui/images/iconRefresh.png b/Templates/BaseGame/game/tools/gui/images/iconRefresh.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/iconRefresh.png rename to Templates/BaseGame/game/tools/gui/images/iconRefresh.png diff --git a/Templates/Empty/game/tools/gui/images/iconSave.png b/Templates/BaseGame/game/tools/gui/images/iconSave.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/iconSave.png rename to Templates/BaseGame/game/tools/gui/images/iconSave.png diff --git a/Templates/Empty/game/tools/gui/images/iconUnlocked.png b/Templates/BaseGame/game/tools/gui/images/iconUnlocked.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/iconUnlocked.png rename to Templates/BaseGame/game/tools/gui/images/iconUnlocked.png diff --git a/Templates/Empty/game/tools/gui/images/iconVisible.png b/Templates/BaseGame/game/tools/gui/images/iconVisible.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/iconVisible.png rename to Templates/BaseGame/game/tools/gui/images/iconVisible.png diff --git a/Templates/Empty/game/tools/gui/images/iconbutton.png b/Templates/BaseGame/game/tools/gui/images/iconbutton.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/iconbutton.png rename to Templates/BaseGame/game/tools/gui/images/iconbutton.png diff --git a/Templates/Empty/game/tools/gui/images/iconbuttonsmall.png b/Templates/BaseGame/game/tools/gui/images/iconbuttonsmall.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/iconbuttonsmall.png rename to Templates/BaseGame/game/tools/gui/images/iconbuttonsmall.png diff --git a/Templates/BaseGame/game/tools/gui/images/inactive-overlay.png b/Templates/BaseGame/game/tools/gui/images/inactive-overlay.png new file mode 100644 index 000000000..feab83209 Binary files /dev/null and b/Templates/BaseGame/game/tools/gui/images/inactive-overlay.png differ diff --git a/Templates/Empty/game/tools/gui/images/layers-btn_d.png b/Templates/BaseGame/game/tools/gui/images/layers-btn_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/layers-btn_d.png rename to Templates/BaseGame/game/tools/gui/images/layers-btn_d.png diff --git a/Templates/Empty/game/tools/gui/images/layers-btn_h.png b/Templates/BaseGame/game/tools/gui/images/layers-btn_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/layers-btn_h.png rename to Templates/BaseGame/game/tools/gui/images/layers-btn_h.png diff --git a/Templates/Empty/game/tools/gui/images/layers-btn_n.png b/Templates/BaseGame/game/tools/gui/images/layers-btn_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/layers-btn_n.png rename to Templates/BaseGame/game/tools/gui/images/layers-btn_n.png diff --git a/Templates/Empty/game/tools/gui/images/leftRight.png b/Templates/BaseGame/game/tools/gui/images/leftRight.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/leftRight.png rename to Templates/BaseGame/game/tools/gui/images/leftRight.png diff --git a/Templates/Empty/game/tools/gui/images/lock_d.png b/Templates/BaseGame/game/tools/gui/images/lock_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/lock_d.png rename to Templates/BaseGame/game/tools/gui/images/lock_d.png diff --git a/Templates/Empty/game/tools/gui/images/lock_h.png b/Templates/BaseGame/game/tools/gui/images/lock_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/lock_h.png rename to Templates/BaseGame/game/tools/gui/images/lock_h.png diff --git a/Templates/Empty/game/tools/gui/images/lock_n.png b/Templates/BaseGame/game/tools/gui/images/lock_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/lock_n.png rename to Templates/BaseGame/game/tools/gui/images/lock_n.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/arrow_d.png b/Templates/BaseGame/game/tools/gui/images/menubar/arrow_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/arrow_d.png rename to Templates/BaseGame/game/tools/gui/images/menubar/arrow_d.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/arrow_h.png b/Templates/BaseGame/game/tools/gui/images/menubar/arrow_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/arrow_h.png rename to Templates/BaseGame/game/tools/gui/images/menubar/arrow_h.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/arrow_n.png b/Templates/BaseGame/game/tools/gui/images/menubar/arrow_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/arrow_n.png rename to Templates/BaseGame/game/tools/gui/images/menubar/arrow_n.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/bounds-center_d.png b/Templates/BaseGame/game/tools/gui/images/menubar/bounds-center_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/bounds-center_d.png rename to Templates/BaseGame/game/tools/gui/images/menubar/bounds-center_d.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/bounds-center_h.png b/Templates/BaseGame/game/tools/gui/images/menubar/bounds-center_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/bounds-center_h.png rename to Templates/BaseGame/game/tools/gui/images/menubar/bounds-center_h.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/bounds-center_n.png b/Templates/BaseGame/game/tools/gui/images/menubar/bounds-center_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/bounds-center_n.png rename to Templates/BaseGame/game/tools/gui/images/menubar/bounds-center_n.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/delete-btn_d.png b/Templates/BaseGame/game/tools/gui/images/menubar/delete-btn_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/delete-btn_d.png rename to Templates/BaseGame/game/tools/gui/images/menubar/delete-btn_d.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/delete-btn_h.png b/Templates/BaseGame/game/tools/gui/images/menubar/delete-btn_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/delete-btn_h.png rename to Templates/BaseGame/game/tools/gui/images/menubar/delete-btn_h.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/delete-btn_i.png b/Templates/BaseGame/game/tools/gui/images/menubar/delete-btn_i.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/delete-btn_i.png rename to Templates/BaseGame/game/tools/gui/images/menubar/delete-btn_i.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/delete-btn_n.png b/Templates/BaseGame/game/tools/gui/images/menubar/delete-btn_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/delete-btn_n.png rename to Templates/BaseGame/game/tools/gui/images/menubar/delete-btn_n.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/explode-prefab_d.png b/Templates/BaseGame/game/tools/gui/images/menubar/explode-prefab_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/explode-prefab_d.png rename to Templates/BaseGame/game/tools/gui/images/menubar/explode-prefab_d.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/explode-prefab_h.png b/Templates/BaseGame/game/tools/gui/images/menubar/explode-prefab_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/explode-prefab_h.png rename to Templates/BaseGame/game/tools/gui/images/menubar/explode-prefab_h.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/explode-prefab_i.png b/Templates/BaseGame/game/tools/gui/images/menubar/explode-prefab_i.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/explode-prefab_i.png rename to Templates/BaseGame/game/tools/gui/images/menubar/explode-prefab_i.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/explode-prefab_n.png b/Templates/BaseGame/game/tools/gui/images/menubar/explode-prefab_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/explode-prefab_n.png rename to Templates/BaseGame/game/tools/gui/images/menubar/explode-prefab_n.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/fit-selection_d.png b/Templates/BaseGame/game/tools/gui/images/menubar/fit-selection_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/fit-selection_d.png rename to Templates/BaseGame/game/tools/gui/images/menubar/fit-selection_d.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/fit-selection_h.png b/Templates/BaseGame/game/tools/gui/images/menubar/fit-selection_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/fit-selection_h.png rename to Templates/BaseGame/game/tools/gui/images/menubar/fit-selection_h.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/fit-selection_n.png b/Templates/BaseGame/game/tools/gui/images/menubar/fit-selection_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/fit-selection_n.png rename to Templates/BaseGame/game/tools/gui/images/menubar/fit-selection_n.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/object-center_d.png b/Templates/BaseGame/game/tools/gui/images/menubar/object-center_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/object-center_d.png rename to Templates/BaseGame/game/tools/gui/images/menubar/object-center_d.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/object-center_h.png b/Templates/BaseGame/game/tools/gui/images/menubar/object-center_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/object-center_h.png rename to Templates/BaseGame/game/tools/gui/images/menubar/object-center_h.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/object-center_n.png b/Templates/BaseGame/game/tools/gui/images/menubar/object-center_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/object-center_n.png rename to Templates/BaseGame/game/tools/gui/images/menubar/object-center_n.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/object-node-icon_d.png b/Templates/BaseGame/game/tools/gui/images/menubar/object-node-icon_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/object-node-icon_d.png rename to Templates/BaseGame/game/tools/gui/images/menubar/object-node-icon_d.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/object-node-icon_h.png b/Templates/BaseGame/game/tools/gui/images/menubar/object-node-icon_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/object-node-icon_h.png rename to Templates/BaseGame/game/tools/gui/images/menubar/object-node-icon_h.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/object-node-icon_n.png b/Templates/BaseGame/game/tools/gui/images/menubar/object-node-icon_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/object-node-icon_n.png rename to Templates/BaseGame/game/tools/gui/images/menubar/object-node-icon_n.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/object-node-lable_d.png b/Templates/BaseGame/game/tools/gui/images/menubar/object-node-lable_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/object-node-lable_d.png rename to Templates/BaseGame/game/tools/gui/images/menubar/object-node-lable_d.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/object-node-lable_h.png b/Templates/BaseGame/game/tools/gui/images/menubar/object-node-lable_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/object-node-lable_h.png rename to Templates/BaseGame/game/tools/gui/images/menubar/object-node-lable_h.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/object-node-lable_n.png b/Templates/BaseGame/game/tools/gui/images/menubar/object-node-lable_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/object-node-lable_n.png rename to Templates/BaseGame/game/tools/gui/images/menubar/object-node-lable_n.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/object-transform_d.png b/Templates/BaseGame/game/tools/gui/images/menubar/object-transform_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/object-transform_d.png rename to Templates/BaseGame/game/tools/gui/images/menubar/object-transform_d.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/object-transform_h.png b/Templates/BaseGame/game/tools/gui/images/menubar/object-transform_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/object-transform_h.png rename to Templates/BaseGame/game/tools/gui/images/menubar/object-transform_h.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/object-transform_n.png b/Templates/BaseGame/game/tools/gui/images/menubar/object-transform_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/object-transform_n.png rename to Templates/BaseGame/game/tools/gui/images/menubar/object-transform_n.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/orbit-cam_d.png b/Templates/BaseGame/game/tools/gui/images/menubar/orbit-cam_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/orbit-cam_d.png rename to Templates/BaseGame/game/tools/gui/images/menubar/orbit-cam_d.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/orbit-cam_h.png b/Templates/BaseGame/game/tools/gui/images/menubar/orbit-cam_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/orbit-cam_h.png rename to Templates/BaseGame/game/tools/gui/images/menubar/orbit-cam_h.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/orbit-cam_n.png b/Templates/BaseGame/game/tools/gui/images/menubar/orbit-cam_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/orbit-cam_n.png rename to Templates/BaseGame/game/tools/gui/images/menubar/orbit-cam_n.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/rotate_d.png b/Templates/BaseGame/game/tools/gui/images/menubar/rotate_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/rotate_d.png rename to Templates/BaseGame/game/tools/gui/images/menubar/rotate_d.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/rotate_h.png b/Templates/BaseGame/game/tools/gui/images/menubar/rotate_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/rotate_h.png rename to Templates/BaseGame/game/tools/gui/images/menubar/rotate_h.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/rotate_n.png b/Templates/BaseGame/game/tools/gui/images/menubar/rotate_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/rotate_n.png rename to Templates/BaseGame/game/tools/gui/images/menubar/rotate_n.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/scale_d.png b/Templates/BaseGame/game/tools/gui/images/menubar/scale_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/scale_d.png rename to Templates/BaseGame/game/tools/gui/images/menubar/scale_d.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/scale_h.png b/Templates/BaseGame/game/tools/gui/images/menubar/scale_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/scale_h.png rename to Templates/BaseGame/game/tools/gui/images/menubar/scale_h.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/scale_n.png b/Templates/BaseGame/game/tools/gui/images/menubar/scale_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/scale_n.png rename to Templates/BaseGame/game/tools/gui/images/menubar/scale_n.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/select-bounds_d.png b/Templates/BaseGame/game/tools/gui/images/menubar/select-bounds_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/select-bounds_d.png rename to Templates/BaseGame/game/tools/gui/images/menubar/select-bounds_d.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/select-bounds_h.png b/Templates/BaseGame/game/tools/gui/images/menubar/select-bounds_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/select-bounds_h.png rename to Templates/BaseGame/game/tools/gui/images/menubar/select-bounds_h.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/select-bounds_n.png b/Templates/BaseGame/game/tools/gui/images/menubar/select-bounds_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/select-bounds_n.png rename to Templates/BaseGame/game/tools/gui/images/menubar/select-bounds_n.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/selection-to-prefab_d.png b/Templates/BaseGame/game/tools/gui/images/menubar/selection-to-prefab_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/selection-to-prefab_d.png rename to Templates/BaseGame/game/tools/gui/images/menubar/selection-to-prefab_d.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/selection-to-prefab_h.png b/Templates/BaseGame/game/tools/gui/images/menubar/selection-to-prefab_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/selection-to-prefab_h.png rename to Templates/BaseGame/game/tools/gui/images/menubar/selection-to-prefab_h.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/selection-to-prefab_i.png b/Templates/BaseGame/game/tools/gui/images/menubar/selection-to-prefab_i.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/selection-to-prefab_i.png rename to Templates/BaseGame/game/tools/gui/images/menubar/selection-to-prefab_i.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/selection-to-prefab_n.png b/Templates/BaseGame/game/tools/gui/images/menubar/selection-to-prefab_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/selection-to-prefab_n.png rename to Templates/BaseGame/game/tools/gui/images/menubar/selection-to-prefab_n.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/show-grid_d.png b/Templates/BaseGame/game/tools/gui/images/menubar/show-grid_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/show-grid_d.png rename to Templates/BaseGame/game/tools/gui/images/menubar/show-grid_d.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/show-grid_h.png b/Templates/BaseGame/game/tools/gui/images/menubar/show-grid_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/show-grid_h.png rename to Templates/BaseGame/game/tools/gui/images/menubar/show-grid_h.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/show-grid_n.png b/Templates/BaseGame/game/tools/gui/images/menubar/show-grid_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/show-grid_n.png rename to Templates/BaseGame/game/tools/gui/images/menubar/show-grid_n.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/show-preview_d.png b/Templates/BaseGame/game/tools/gui/images/menubar/show-preview_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/show-preview_d.png rename to Templates/BaseGame/game/tools/gui/images/menubar/show-preview_d.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/show-preview_h.png b/Templates/BaseGame/game/tools/gui/images/menubar/show-preview_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/show-preview_h.png rename to Templates/BaseGame/game/tools/gui/images/menubar/show-preview_h.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/show-preview_n.png b/Templates/BaseGame/game/tools/gui/images/menubar/show-preview_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/show-preview_n.png rename to Templates/BaseGame/game/tools/gui/images/menubar/show-preview_n.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/smooth-cam-rot_d.png b/Templates/BaseGame/game/tools/gui/images/menubar/smooth-cam-rot_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/smooth-cam-rot_d.png rename to Templates/BaseGame/game/tools/gui/images/menubar/smooth-cam-rot_d.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/smooth-cam-rot_h.png b/Templates/BaseGame/game/tools/gui/images/menubar/smooth-cam-rot_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/smooth-cam-rot_h.png rename to Templates/BaseGame/game/tools/gui/images/menubar/smooth-cam-rot_h.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/smooth-cam-rot_n.png b/Templates/BaseGame/game/tools/gui/images/menubar/smooth-cam-rot_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/smooth-cam-rot_n.png rename to Templates/BaseGame/game/tools/gui/images/menubar/smooth-cam-rot_n.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/smooth-cam_d.png b/Templates/BaseGame/game/tools/gui/images/menubar/smooth-cam_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/smooth-cam_d.png rename to Templates/BaseGame/game/tools/gui/images/menubar/smooth-cam_d.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/smooth-cam_h.png b/Templates/BaseGame/game/tools/gui/images/menubar/smooth-cam_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/smooth-cam_h.png rename to Templates/BaseGame/game/tools/gui/images/menubar/smooth-cam_h.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/smooth-cam_n.png b/Templates/BaseGame/game/tools/gui/images/menubar/smooth-cam_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/smooth-cam_n.png rename to Templates/BaseGame/game/tools/gui/images/menubar/smooth-cam_n.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/snap-bounds_d.png b/Templates/BaseGame/game/tools/gui/images/menubar/snap-bounds_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/snap-bounds_d.png rename to Templates/BaseGame/game/tools/gui/images/menubar/snap-bounds_d.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/snap-bounds_h.png b/Templates/BaseGame/game/tools/gui/images/menubar/snap-bounds_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/snap-bounds_h.png rename to Templates/BaseGame/game/tools/gui/images/menubar/snap-bounds_h.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/snap-bounds_n.png b/Templates/BaseGame/game/tools/gui/images/menubar/snap-bounds_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/snap-bounds_n.png rename to Templates/BaseGame/game/tools/gui/images/menubar/snap-bounds_n.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/snap-grid_d.png b/Templates/BaseGame/game/tools/gui/images/menubar/snap-grid_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/snap-grid_d.png rename to Templates/BaseGame/game/tools/gui/images/menubar/snap-grid_d.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/snap-grid_h.png b/Templates/BaseGame/game/tools/gui/images/menubar/snap-grid_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/snap-grid_h.png rename to Templates/BaseGame/game/tools/gui/images/menubar/snap-grid_h.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/snap-grid_n.png b/Templates/BaseGame/game/tools/gui/images/menubar/snap-grid_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/snap-grid_n.png rename to Templates/BaseGame/game/tools/gui/images/menubar/snap-grid_n.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/snap-objects_d.png b/Templates/BaseGame/game/tools/gui/images/menubar/snap-objects_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/snap-objects_d.png rename to Templates/BaseGame/game/tools/gui/images/menubar/snap-objects_d.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/snap-objects_h.png b/Templates/BaseGame/game/tools/gui/images/menubar/snap-objects_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/snap-objects_h.png rename to Templates/BaseGame/game/tools/gui/images/menubar/snap-objects_h.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/snap-objects_n.png b/Templates/BaseGame/game/tools/gui/images/menubar/snap-objects_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/snap-objects_n.png rename to Templates/BaseGame/game/tools/gui/images/menubar/snap-objects_n.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/snap-terrain_d.png b/Templates/BaseGame/game/tools/gui/images/menubar/snap-terrain_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/snap-terrain_d.png rename to Templates/BaseGame/game/tools/gui/images/menubar/snap-terrain_d.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/snap-terrain_h.png b/Templates/BaseGame/game/tools/gui/images/menubar/snap-terrain_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/snap-terrain_h.png rename to Templates/BaseGame/game/tools/gui/images/menubar/snap-terrain_h.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/snap-terrain_n.png b/Templates/BaseGame/game/tools/gui/images/menubar/snap-terrain_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/snap-terrain_n.png rename to Templates/BaseGame/game/tools/gui/images/menubar/snap-terrain_n.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/snapping-settings_d.png b/Templates/BaseGame/game/tools/gui/images/menubar/snapping-settings_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/snapping-settings_d.png rename to Templates/BaseGame/game/tools/gui/images/menubar/snapping-settings_d.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/snapping-settings_h.png b/Templates/BaseGame/game/tools/gui/images/menubar/snapping-settings_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/snapping-settings_h.png rename to Templates/BaseGame/game/tools/gui/images/menubar/snapping-settings_h.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/snapping-settings_n.png b/Templates/BaseGame/game/tools/gui/images/menubar/snapping-settings_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/snapping-settings_n.png rename to Templates/BaseGame/game/tools/gui/images/menubar/snapping-settings_n.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/translate_d.png b/Templates/BaseGame/game/tools/gui/images/menubar/translate_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/translate_d.png rename to Templates/BaseGame/game/tools/gui/images/menubar/translate_d.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/translate_h.png b/Templates/BaseGame/game/tools/gui/images/menubar/translate_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/translate_h.png rename to Templates/BaseGame/game/tools/gui/images/menubar/translate_h.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/translate_n.png b/Templates/BaseGame/game/tools/gui/images/menubar/translate_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/translate_n.png rename to Templates/BaseGame/game/tools/gui/images/menubar/translate_n.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/visibility-toggle_d.png b/Templates/BaseGame/game/tools/gui/images/menubar/visibility-toggle_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/visibility-toggle_d.png rename to Templates/BaseGame/game/tools/gui/images/menubar/visibility-toggle_d.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/visibility-toggle_h.png b/Templates/BaseGame/game/tools/gui/images/menubar/visibility-toggle_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/visibility-toggle_h.png rename to Templates/BaseGame/game/tools/gui/images/menubar/visibility-toggle_h.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/visibility-toggle_n.png b/Templates/BaseGame/game/tools/gui/images/menubar/visibility-toggle_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/visibility-toggle_n.png rename to Templates/BaseGame/game/tools/gui/images/menubar/visibility-toggle_n.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/world-transform_d.png b/Templates/BaseGame/game/tools/gui/images/menubar/world-transform_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/world-transform_d.png rename to Templates/BaseGame/game/tools/gui/images/menubar/world-transform_d.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/world-transform_h.png b/Templates/BaseGame/game/tools/gui/images/menubar/world-transform_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/world-transform_h.png rename to Templates/BaseGame/game/tools/gui/images/menubar/world-transform_h.png diff --git a/Templates/Empty/game/tools/gui/images/menubar/world-transform_n.png b/Templates/BaseGame/game/tools/gui/images/menubar/world-transform_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/menubar/world-transform_n.png rename to Templates/BaseGame/game/tools/gui/images/menubar/world-transform_n.png diff --git a/Templates/Empty/game/tools/gui/images/move.png b/Templates/BaseGame/game/tools/gui/images/move.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/move.png rename to Templates/BaseGame/game/tools/gui/images/move.png diff --git a/Templates/Empty/game/tools/gui/images/new-folder-btn_d.png b/Templates/BaseGame/game/tools/gui/images/new-folder-btn_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/new-folder-btn_d.png rename to Templates/BaseGame/game/tools/gui/images/new-folder-btn_d.png diff --git a/Templates/Empty/game/tools/gui/images/new-folder-btn_h.png b/Templates/BaseGame/game/tools/gui/images/new-folder-btn_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/new-folder-btn_h.png rename to Templates/BaseGame/game/tools/gui/images/new-folder-btn_h.png diff --git a/Templates/Empty/game/tools/gui/images/new-folder-btn_n.png b/Templates/BaseGame/game/tools/gui/images/new-folder-btn_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/new-folder-btn_n.png rename to Templates/BaseGame/game/tools/gui/images/new-folder-btn_n.png diff --git a/Templates/Empty/game/tools/gui/images/new_d.png b/Templates/BaseGame/game/tools/gui/images/new_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/new_d.png rename to Templates/BaseGame/game/tools/gui/images/new_d.png diff --git a/Templates/Empty/game/tools/gui/images/new_h.png b/Templates/BaseGame/game/tools/gui/images/new_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/new_h.png rename to Templates/BaseGame/game/tools/gui/images/new_h.png diff --git a/Templates/Empty/game/tools/gui/images/new_n.png b/Templates/BaseGame/game/tools/gui/images/new_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/new_n.png rename to Templates/BaseGame/game/tools/gui/images/new_n.png diff --git a/Templates/Empty/game/tools/gui/images/open-file_d.png b/Templates/BaseGame/game/tools/gui/images/open-file_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/open-file_d.png rename to Templates/BaseGame/game/tools/gui/images/open-file_d.png diff --git a/Templates/Empty/game/tools/gui/images/open-file_h.png b/Templates/BaseGame/game/tools/gui/images/open-file_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/open-file_h.png rename to Templates/BaseGame/game/tools/gui/images/open-file_h.png diff --git a/Templates/Empty/game/tools/gui/images/open-file_n.png b/Templates/BaseGame/game/tools/gui/images/open-file_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/open-file_n.png rename to Templates/BaseGame/game/tools/gui/images/open-file_n.png diff --git a/Templates/BaseGame/game/tools/gui/images/radioButton.png b/Templates/BaseGame/game/tools/gui/images/radioButton.png new file mode 100644 index 000000000..d5ecc9853 Binary files /dev/null and b/Templates/BaseGame/game/tools/gui/images/radioButton.png differ diff --git a/Templates/Empty/game/tools/gui/images/reset-icon_d.png b/Templates/BaseGame/game/tools/gui/images/reset-icon_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/reset-icon_d.png rename to Templates/BaseGame/game/tools/gui/images/reset-icon_d.png diff --git a/Templates/Empty/game/tools/gui/images/reset-icon_h.png b/Templates/BaseGame/game/tools/gui/images/reset-icon_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/reset-icon_h.png rename to Templates/BaseGame/game/tools/gui/images/reset-icon_h.png diff --git a/Templates/Empty/game/tools/gui/images/reset-icon_n.png b/Templates/BaseGame/game/tools/gui/images/reset-icon_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/reset-icon_n.png rename to Templates/BaseGame/game/tools/gui/images/reset-icon_n.png diff --git a/Templates/Empty/game/tools/gui/images/retarget-btn_d.png b/Templates/BaseGame/game/tools/gui/images/retarget-btn_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/retarget-btn_d.png rename to Templates/BaseGame/game/tools/gui/images/retarget-btn_d.png diff --git a/Templates/Empty/game/tools/gui/images/retarget-btn_h.png b/Templates/BaseGame/game/tools/gui/images/retarget-btn_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/retarget-btn_h.png rename to Templates/BaseGame/game/tools/gui/images/retarget-btn_h.png diff --git a/Templates/Empty/game/tools/gui/images/retarget-btn_i.png b/Templates/BaseGame/game/tools/gui/images/retarget-btn_i.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/retarget-btn_i.png rename to Templates/BaseGame/game/tools/gui/images/retarget-btn_i.png diff --git a/Templates/Empty/game/tools/gui/images/retarget-btn_n.png b/Templates/BaseGame/game/tools/gui/images/retarget-btn_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/retarget-btn_n.png rename to Templates/BaseGame/game/tools/gui/images/retarget-btn_n.png diff --git a/Templates/Empty/game/tools/gui/images/rl-loadingbar.png b/Templates/BaseGame/game/tools/gui/images/rl-loadingbar.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/rl-loadingbar.png rename to Templates/BaseGame/game/tools/gui/images/rl-loadingbar.png diff --git a/Templates/Empty/game/tools/gui/images/save-all_d.png b/Templates/BaseGame/game/tools/gui/images/save-all_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/save-all_d.png rename to Templates/BaseGame/game/tools/gui/images/save-all_d.png diff --git a/Templates/Empty/game/tools/gui/images/save-all_h.png b/Templates/BaseGame/game/tools/gui/images/save-all_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/save-all_h.png rename to Templates/BaseGame/game/tools/gui/images/save-all_h.png diff --git a/Templates/Empty/game/tools/gui/images/save-all_i.png b/Templates/BaseGame/game/tools/gui/images/save-all_i.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/save-all_i.png rename to Templates/BaseGame/game/tools/gui/images/save-all_i.png diff --git a/Templates/Empty/game/tools/gui/images/save-all_n.png b/Templates/BaseGame/game/tools/gui/images/save-all_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/save-all_n.png rename to Templates/BaseGame/game/tools/gui/images/save-all_n.png diff --git a/Templates/Empty/game/tools/gui/images/save-as_d.png b/Templates/BaseGame/game/tools/gui/images/save-as_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/save-as_d.png rename to Templates/BaseGame/game/tools/gui/images/save-as_d.png diff --git a/Templates/Empty/game/tools/gui/images/save-as_h.png b/Templates/BaseGame/game/tools/gui/images/save-as_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/save-as_h.png rename to Templates/BaseGame/game/tools/gui/images/save-as_h.png diff --git a/Templates/Empty/game/tools/gui/images/save-as_i.png b/Templates/BaseGame/game/tools/gui/images/save-as_i.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/save-as_i.png rename to Templates/BaseGame/game/tools/gui/images/save-as_i.png diff --git a/Templates/Empty/game/tools/gui/images/save-as_n.png b/Templates/BaseGame/game/tools/gui/images/save-as_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/save-as_n.png rename to Templates/BaseGame/game/tools/gui/images/save-as_n.png diff --git a/Templates/Empty/game/tools/gui/images/save-icon_d.png b/Templates/BaseGame/game/tools/gui/images/save-icon_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/save-icon_d.png rename to Templates/BaseGame/game/tools/gui/images/save-icon_d.png diff --git a/Templates/Empty/game/tools/gui/images/save-icon_h.png b/Templates/BaseGame/game/tools/gui/images/save-icon_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/save-icon_h.png rename to Templates/BaseGame/game/tools/gui/images/save-icon_h.png diff --git a/Templates/Empty/game/tools/gui/images/save-icon_i.png b/Templates/BaseGame/game/tools/gui/images/save-icon_i.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/save-icon_i.png rename to Templates/BaseGame/game/tools/gui/images/save-icon_i.png diff --git a/Templates/Empty/game/tools/gui/images/save-icon_n.png b/Templates/BaseGame/game/tools/gui/images/save-icon_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/save-icon_n.png rename to Templates/BaseGame/game/tools/gui/images/save-icon_n.png diff --git a/Templates/BaseGame/game/tools/gui/images/scrollBar.png b/Templates/BaseGame/game/tools/gui/images/scrollBar.png new file mode 100644 index 000000000..e8c34dc85 Binary files /dev/null and b/Templates/BaseGame/game/tools/gui/images/scrollBar.png differ diff --git a/Templates/Empty/game/tools/gui/images/separator-h.png b/Templates/BaseGame/game/tools/gui/images/separator-h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/separator-h.png rename to Templates/BaseGame/game/tools/gui/images/separator-h.png diff --git a/Templates/Empty/game/tools/gui/images/separator-v.png b/Templates/BaseGame/game/tools/gui/images/separator-v.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/separator-v.png rename to Templates/BaseGame/game/tools/gui/images/separator-v.png diff --git a/Templates/Empty/game/tools/gui/images/slider-w-box.png b/Templates/BaseGame/game/tools/gui/images/slider-w-box.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/slider-w-box.png rename to Templates/BaseGame/game/tools/gui/images/slider-w-box.png diff --git a/Templates/BaseGame/game/tools/gui/images/slider.png b/Templates/BaseGame/game/tools/gui/images/slider.png new file mode 100644 index 000000000..92fee1e9c Binary files /dev/null and b/Templates/BaseGame/game/tools/gui/images/slider.png differ diff --git a/Templates/Empty/game/tools/gui/images/tab-border.png b/Templates/BaseGame/game/tools/gui/images/tab-border.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/tab-border.png rename to Templates/BaseGame/game/tools/gui/images/tab-border.png diff --git a/Templates/Empty/game/tools/gui/images/tab.png b/Templates/BaseGame/game/tools/gui/images/tab.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/tab.png rename to Templates/BaseGame/game/tools/gui/images/tab.png diff --git a/Templates/Empty/game/tools/gui/images/textEdit.png b/Templates/BaseGame/game/tools/gui/images/textEdit.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/textEdit.png rename to Templates/BaseGame/game/tools/gui/images/textEdit.png diff --git a/Templates/BaseGame/game/tools/gui/images/textEditFrame.png b/Templates/BaseGame/game/tools/gui/images/textEditFrame.png new file mode 100644 index 000000000..5a65fac3c Binary files /dev/null and b/Templates/BaseGame/game/tools/gui/images/textEditFrame.png differ diff --git a/Templates/Empty/game/tools/gui/images/textEditSliderBox.png b/Templates/BaseGame/game/tools/gui/images/textEditSliderBox.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/textEditSliderBox.png rename to Templates/BaseGame/game/tools/gui/images/textEditSliderBox.png diff --git a/Templates/BaseGame/game/tools/gui/images/thumbHightlightButton.png b/Templates/BaseGame/game/tools/gui/images/thumbHightlightButton.png new file mode 100644 index 000000000..9d83b75f3 Binary files /dev/null and b/Templates/BaseGame/game/tools/gui/images/thumbHightlightButton.png differ diff --git a/Templates/Empty/game/tools/gui/images/toolbar-window.png b/Templates/BaseGame/game/tools/gui/images/toolbar-window.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/toolbar-window.png rename to Templates/BaseGame/game/tools/gui/images/toolbar-window.png diff --git a/Templates/Empty/game/tools/gui/images/transp_grid.png b/Templates/BaseGame/game/tools/gui/images/transp_grid.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/transp_grid.png rename to Templates/BaseGame/game/tools/gui/images/transp_grid.png diff --git a/Templates/Empty/game/tools/gui/images/treeView.png b/Templates/BaseGame/game/tools/gui/images/treeView.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/treeView.png rename to Templates/BaseGame/game/tools/gui/images/treeView.png diff --git a/Templates/Empty/game/core/art/gui/images/treeview/default.png b/Templates/BaseGame/game/tools/gui/images/treeview/default.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/treeview/default.png rename to Templates/BaseGame/game/tools/gui/images/treeview/default.png diff --git a/Templates/Empty/game/core/art/gui/images/treeview/hidden.png b/Templates/BaseGame/game/tools/gui/images/treeview/hidden.png similarity index 100% rename from Templates/Empty/game/core/art/gui/images/treeview/hidden.png rename to Templates/BaseGame/game/tools/gui/images/treeview/hidden.png diff --git a/Templates/Empty/game/tools/gui/images/upDown.png b/Templates/BaseGame/game/tools/gui/images/upDown.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/upDown.png rename to Templates/BaseGame/game/tools/gui/images/upDown.png diff --git a/Templates/Empty/game/tools/gui/images/uv-editor-btn_d.png b/Templates/BaseGame/game/tools/gui/images/uv-editor-btn_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/uv-editor-btn_d.png rename to Templates/BaseGame/game/tools/gui/images/uv-editor-btn_d.png diff --git a/Templates/Empty/game/tools/gui/images/uv-editor-btn_h.png b/Templates/BaseGame/game/tools/gui/images/uv-editor-btn_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/uv-editor-btn_h.png rename to Templates/BaseGame/game/tools/gui/images/uv-editor-btn_h.png diff --git a/Templates/Empty/game/tools/gui/images/uv-editor-btn_n.png b/Templates/BaseGame/game/tools/gui/images/uv-editor-btn_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/uv-editor-btn_n.png rename to Templates/BaseGame/game/tools/gui/images/uv-editor-btn_n.png diff --git a/Templates/Empty/game/tools/gui/images/visible_d.png b/Templates/BaseGame/game/tools/gui/images/visible_d.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/visible_d.png rename to Templates/BaseGame/game/tools/gui/images/visible_d.png diff --git a/Templates/Empty/game/tools/gui/images/visible_h.png b/Templates/BaseGame/game/tools/gui/images/visible_h.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/visible_h.png rename to Templates/BaseGame/game/tools/gui/images/visible_h.png diff --git a/Templates/Empty/game/tools/gui/images/visible_i.png b/Templates/BaseGame/game/tools/gui/images/visible_i.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/visible_i.png rename to Templates/BaseGame/game/tools/gui/images/visible_i.png diff --git a/Templates/Empty/game/tools/gui/images/visible_n.png b/Templates/BaseGame/game/tools/gui/images/visible_n.png similarity index 100% rename from Templates/Empty/game/tools/gui/images/visible_n.png rename to Templates/BaseGame/game/tools/gui/images/visible_n.png diff --git a/Templates/BaseGame/game/tools/gui/images/window.png b/Templates/BaseGame/game/tools/gui/images/window.png new file mode 100644 index 000000000..d9e8006e4 Binary files /dev/null and b/Templates/BaseGame/game/tools/gui/images/window.png differ diff --git a/Templates/Empty/game/tools/gui/materialSelector.ed.gui b/Templates/BaseGame/game/tools/gui/materialSelector.ed.gui similarity index 100% rename from Templates/Empty/game/tools/gui/materialSelector.ed.gui rename to Templates/BaseGame/game/tools/gui/materialSelector.ed.gui diff --git a/Templates/BaseGame/game/tools/gui/messageBoxes/IODropdownDlg.ed.gui b/Templates/BaseGame/game/tools/gui/messageBoxes/IODropdownDlg.ed.gui new file mode 100644 index 000000000..5fa0093da --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/messageBoxes/IODropdownDlg.ed.gui @@ -0,0 +1,159 @@ +//--- OBJECT WRITE BEGIN --- +%guiContent = new GuiControl(IODropdownDlg) { + profile = "GuiDefaultProfile"; + horizSizing = "width"; + vertSizing = "height"; + position = "0 0"; + extent = "640 480"; + minExtent = "8 8"; + visible = "1"; + helpTag = "0"; + new GuiWindowCtrl(IODropdownFrame) { + canSaveDynamicFields = "0"; + Profile = "GuiWindowProfile"; + horizSizing = "center"; + vertSizing = "center"; + position = "272 77"; + extent = "256 117"; + minExtent = "256 8"; + canSave = "1"; + Visible = "1"; + hovertime = "1000"; + maxLength = "255"; + resizeWidth = "1"; + resizeHeight = "1"; + canMove = "1"; + canClose = "1"; + canMinimize = "0"; + canMaximize = "0"; + minSize = "50 50"; + text = ""; + closeCommand="IOCallback(IODropdownDlg,IODropdownDlg.cancelCallback);"; + + new GuiMLTextCtrl(IODropdownText) { + text = ""; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + isContainer = "0"; + profile = "GuiMLTextProfile"; + horizSizing = "center"; + vertSizing = "bottom"; + position = "9 26"; + extent = "237 16"; + minExtent = "8 8"; + canSave = "1"; + visible = "1"; + tooltipprofile = "GuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiBitmapBorderCtrl() { + isContainer = "0"; + profile = "GuiGroupBorderProfile"; + horizSizing = "width"; + vertSizing = "bottom"; + position = "7 51"; + extent = "243 28"; + minExtent = "0 0"; + canSave = "1"; + visible = "1"; + tooltipprofile = "GuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl(IOInputText) { + text = "Decal Datablock"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + isContainer = "0"; + profile = "GuiTextRightProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "5 5"; + extent = "105 18"; + minExtent = "8 2"; + canSave = "1"; + visible = "1"; + tooltipprofile = "GuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiPopUpMenuCtrl(IODropdownMenu) { + maxPopupHeight = "200"; + sbUsesNAColor = "0"; + reverseTextList = "0"; + bitmapBounds = "16 16"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + isContainer = "0"; + profile = "GuiPopUpMenuProfile"; + horizSizing = "width"; + vertSizing = "bottom"; + position = "115 5"; + extent = "122 18"; + minExtent = "8 2"; + canSave = "1"; + visible = "1"; + tooltipprofile = "GuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + }; + new GuiButtonCtrl() { + text = "OK"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + isContainer = "0"; + profile = "GuiButtonProfile"; + horizSizing = "width"; + vertSizing = "top"; + position = "7 85"; + extent = "156 24"; + minExtent = "8 8"; + canSave = "1"; + visible = "1"; + accelerator = "return"; + command = "IOCallback(IODropdownDlg,IODropdownDlg.callback);"; + tooltipprofile = "GuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl() { + text = "Cancel"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + isContainer = "0"; + profile = "GuiButtonProfile"; + horizSizing = "left"; + vertSizing = "top"; + position = "170 85"; + extent = "80 24"; + minExtent = "8 8"; + canSave = "1"; + visible = "1"; + accelerator = "escape"; + command = "IOCallback(IODropdownDlg,IODropdownDlg.cancelCallback);"; + tooltipprofile = "GuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + }; +}; +//--- OBJECT WRITE END --- diff --git a/Templates/Empty/game/core/scripts/gui/messageBoxes/messageBox.ed.cs b/Templates/BaseGame/game/tools/gui/messageBoxes/messageBox.ed.cs similarity index 94% rename from Templates/Empty/game/core/scripts/gui/messageBoxes/messageBox.ed.cs rename to Templates/BaseGame/game/tools/gui/messageBoxes/messageBox.ed.cs index b4192ecb1..95592c016 100644 --- a/Templates/Empty/game/core/scripts/gui/messageBoxes/messageBox.ed.cs +++ b/Templates/BaseGame/game/tools/gui/messageBoxes/messageBox.ed.cs @@ -20,8 +20,6 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -if($GameCanvas == OculusCanvas) - $GameCanvas = Canvas; // Cleanup Dialog created by 'core' if( isObject( MessagePopupDlg ) ) @@ -41,13 +39,12 @@ if( isObject( IODropdownDlg ) ) // Load Editor Dialogs -exec("./messageBoxOk.ed.gui"); +exec("./messageBoxOK.ed.gui"); exec("./messageBoxYesNo.ed.gui"); exec("./messageBoxYesNoCancel.ed.gui"); -exec("./messageBoxOkCancel.ed.gui"); -exec("./MessageBoxOKCancelDetailsDlg.ed.gui"); +exec("./messageBoxOKCancel.ed.gui"); +exec("./messageBoxOKCancelDetailsDlg.ed.gui"); exec("./messagePopup.ed.gui"); -exec("./IODropdownDlg.ed.gui"); @@ -78,7 +75,7 @@ new SFXProfile(messageBoxBeep) //--------------------------------------------------------------------------------------------- function messageCallback(%dlg, %callback) { - $GameCanvas.popDialog(%dlg); + Canvas.popDialog(%dlg); eval(%callback); } @@ -91,7 +88,7 @@ function IOCallback(%dlg, %callback) %callback = strreplace(%callback, "#", %text); eval(%callback); - $GameCanvas.popDialog(%dlg); + Canvas.popDialog(%dlg); } //--------------------------------------------------------------------------------------------- @@ -136,7 +133,7 @@ function MBSetText(%text, %frame, %msg) function MessageBoxOK(%title, %message, %callback) { MBOKFrame.text = %title; - $GameCanvas.pushDialog(MessageBoxOKDlg); + Canvas.pushDialog(MessageBoxOKDlg); MBSetText(MBOKText, MBOKFrame, %message); MessageBoxOKDlg.callback = %callback; } @@ -149,7 +146,7 @@ function MessageBoxOKDlg::onSleep( %this ) function MessageBoxOKCancel(%title, %message, %callback, %cancelCallback) { MBOKCancelFrame.text = %title; - $GameCanvas.pushDialog(MessageBoxOKCancelDlg); + Canvas.pushDialog(MessageBoxOKCancelDlg); MBSetText(MBOKCancelText, MBOKCancelFrame, %message); MessageBoxOKCancelDlg.callback = %callback; MessageBoxOKCancelDlg.cancelCallback = %cancelCallback; @@ -171,7 +168,7 @@ function MessageBoxOKCancelDetails(%title, %message, %details, %callback, %cance MBOKCancelDetailsFrame.setText( %title ); - $GameCanvas.pushDialog(MessageBoxOKCancelDetailsDlg); + Canvas.pushDialog(MessageBoxOKCancelDetailsDlg); MBSetText(MBOKCancelDetailsText, MBOKCancelDetailsFrame, %message); MBOKCancelDetailsInfoText.setText(%details); @@ -235,7 +232,7 @@ function MessageBoxYesNo(%title, %message, %yesCallback, %noCallback) { MBYesNoFrame.text = %title; MessageBoxYesNoDlg.profile = "GuiOverlayProfile"; - $GameCanvas.pushDialog(MessageBoxYesNoDlg); + Canvas.pushDialog(MessageBoxYesNoDlg); MBSetText(MBYesNoText, MBYesNoFrame, %message); MessageBoxYesNoDlg.yesCallBack = %yesCallback; MessageBoxYesNoDlg.noCallback = %noCallBack; @@ -245,7 +242,7 @@ function MessageBoxYesNoCancel(%title, %message, %yesCallback, %noCallback, %can { MBYesNoCancelFrame.text = %title; MessageBoxYesNoDlg.profile = "GuiOverlayProfile"; - $GameCanvas.pushDialog(MessageBoxYesNoCancelDlg); + Canvas.pushDialog(MessageBoxYesNoCancelDlg); MBSetText(MBYesNoCancelText, MBYesNoCancelFrame, %message); MessageBoxYesNoCancelDlg.yesCallBack = %yesCallback; MessageBoxYesNoCancelDlg.noCallback = %noCallBack; @@ -266,7 +263,7 @@ function MessagePopup(%title, %message, %delay) { // Currently two lines max. MessagePopFrame.setText(%title); - $GameCanvas.pushDialog(MessagePopupDlg); + Canvas.pushDialog(MessagePopupDlg); MBSetText(MessagePopText, MessagePopFrame, %message); if (%delay !$= "") schedule(%delay, 0, CloseMessagePopup); @@ -281,7 +278,7 @@ function MessagePopup(%title, %message, %delay) function IODropdown(%title, %message, %simgroup, %callback, %cancelCallback) { IODropdownFrame.text = %title; - $GameCanvas.pushDialog(IODropdownDlg); + Canvas.pushDialog(IODropdownDlg); MBSetText(IODropdownText, IODropdownFrame, %message); if(isObject(%simgroup)) @@ -307,7 +304,7 @@ function IODropdownDlg::onSleep( %this ) function CloseMessagePopup() { - $GameCanvas.popDialog(MessagePopupDlg); + Canvas.popDialog(MessagePopupDlg); } //--------------------------------------------------------------------------------------------- diff --git a/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxOK.ed.gui b/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxOK.ed.gui new file mode 100644 index 000000000..52e119ea6 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxOK.ed.gui @@ -0,0 +1,60 @@ +//--- OBJECT WRITE BEGIN --- +%guiContent = new GuiControl(MessageBoxOKDlg) { + profile = "GuiOverlayProfile"; + horizSizing = "width"; + vertSizing = "height"; + position = "0 0"; + extent = "640 480"; + minExtent = "8 8"; + visible = "1"; + helpTag = "0"; + + new GuiWindowCtrl(MBOKFrame) { + profile = "GuiWindowProfile"; + horizSizing = "center"; + vertSizing = "center"; + position = "170 175"; + extent = "300 107"; + minExtent = "48 95"; + visible = "1"; + helpTag = "0"; + maxLength = "255"; + resizeWidth = "1"; + resizeHeight = "1"; + canMove = "1"; + canClose = "0"; + canMinimize = "0"; + canMaximize = "0"; + minSize = "50 50"; + text = ""; + + new GuiMLTextCtrl(MBOKText) { + profile = "GuiMLTextProfile"; + horizSizing = "center"; + vertSizing = "bottom"; + position = "9 35"; + extent = "281 24"; + minExtent = "8 8"; + visible = "1"; + helpTag = "0"; + lineSpacing = "2"; + allowColorChars = "0"; + maxChars = "-1"; + }; + new GuiButtonCtrl() { + profile = "GuiButtonProfile"; + horizSizing = "right"; + vertSizing = "top"; + position = "111 75"; + extent = "80 24"; + minExtent = "8 8"; + visible = "1"; + command = "MessageCallback(MessageBoxOKDlg,MessageBoxOKDlg.callback);"; + accelerator = "return"; + helpTag = "0"; + text = "Ok"; + simpleStyle = "0"; + }; + }; +}; +//--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxOKBuy.ed.gui b/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxOKBuy.ed.gui new file mode 100644 index 000000000..87dd913e0 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxOKBuy.ed.gui @@ -0,0 +1,85 @@ +//--- OBJECT WRITE BEGIN --- +%guiContent = new GuiControl(MessageBoxOKBuyDlg) { + profile = "ToolsGuiDefaultProfile"; + horizSizing = "width"; + vertSizing = "height"; + position = "0 0"; + extent = "640 480"; + minExtent = "8 8"; + visible = "1"; + helpTag = "0"; + + new GuiWindowCtrl(MBOKBuyFrame) { + profile = "ToolsGuiWindowProfile"; + horizSizing = "center"; + vertSizing = "center"; + position = "170 175"; + extent = "300 100"; + minExtent = "48 92"; + visible = "1"; + helpTag = "0"; + maxLength = "255"; + resizeWidth = "1"; + resizeHeight = "1"; + canMove = "1"; + canClose = "1"; + canMinimize = "0"; + canMaximize = "0"; + minSize = "50 50"; + text = ""; + closeCommand = "MessageCallback(MessageBoxOKBuyDlg,MessageBoxOKBuyDlg.noCallback);"; + + new GuiMLTextCtrl(MBOKBuyText) { + profile = "ToolsGuiMLTextProfile"; + horizSizing = "center"; + vertSizing = "bottom"; + position = "11 38"; + extent = "280 14"; + minExtent = "8 8"; + visible = "1"; + helpTag = "0"; + lineSpacing = "2"; + allowColorChars = "0"; + maxChars = "-1"; + }; + new GuiButtonCtrl() { + profile = "ToolsGuiButtonProfile"; + horizSizing = "right"; + vertSizing = "top"; + position = "70 68"; + extent = "80 22"; + minExtent = "8 8"; + visible = "1"; + command = "MessageCallback(MessageBoxOKBuyDlg,MessageBoxOKBuyDlg.OKCallback);"; + accelerator = "return"; + helpTag = "0"; + text = "OK"; + simpleStyle = "0"; + }; + new GuiButtonCtrl() { + profile = "ToolsGuiButtonProfile"; + horizSizing = "right"; + vertSizing = "top"; + position = "167 68"; + extent = "80 22"; + minExtent = "8 8"; + visible = "1"; + command = "MessageCallback(MessageBoxOKBuyDlg,MessageBoxOKBuyDlg.BuyCallback);"; + accelerator = "escape"; + helpTag = "0"; + text = "Buy Now!"; + simpleStyle = "0"; + }; + }; +}; +//--- OBJECT WRITE END --- + +function MessageBoxOKBuy(%title, %message, %OKCallback, %BuyCallback) +{ + MBOKBuyFrame.text = %title; + MessageBoxOKBuyDlg.profile = "ToolsGuiOverlayProfile"; + Canvas.pushDialog(MessageBoxOKBuyDlg); + MBSetText(MBOKBuyText, MBOKBuyFrame, %message); + MessageBoxOKBuyDlg.OKCallback = %OKCallback; + MessageBoxOKBuyDlg.BuyCallback = %BuyCallback; +} \ No newline at end of file diff --git a/Templates/Empty/game/core/scripts/gui/messageBoxes/messageBoxOkCancel.ed.gui b/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxOKCancel.ed.gui similarity index 100% rename from Templates/Empty/game/core/scripts/gui/messageBoxes/messageBoxOkCancel.ed.gui rename to Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxOKCancel.ed.gui diff --git a/Templates/Empty/game/core/scripts/gui/messageBoxes/MessageBoxOKCancelDetailsDlg.ed.gui b/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxOKCancelDetailsDlg.ed.gui similarity index 100% rename from Templates/Empty/game/core/scripts/gui/messageBoxes/MessageBoxOKCancelDetailsDlg.ed.gui rename to Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxOKCancelDetailsDlg.ed.gui diff --git a/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxYesNo.ed.gui b/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxYesNo.ed.gui new file mode 100644 index 000000000..3cd7d18ef --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxYesNo.ed.gui @@ -0,0 +1,75 @@ +//--- OBJECT WRITE BEGIN --- +%guiContent = new GuiControl(MessageBoxYesNoDlg) { + profile = "GuiOverlayProfile"; + horizSizing = "width"; + vertSizing = "height"; + position = "0 0"; + extent = "640 480"; + minExtent = "8 8"; + visible = "1"; + helpTag = "0"; + + new GuiWindowCtrl(MBYesNoFrame) { + profile = "GuiWindowProfile"; + horizSizing = "center"; + vertSizing = "center"; + position = "170 175"; + extent = "300 100"; + minExtent = "48 92"; + visible = "1"; + helpTag = "0"; + maxLength = "255"; + resizeWidth = "1"; + resizeHeight = "1"; + canMove = "1"; + canClose = "1"; + canMinimize = "0"; + canMaximize = "0"; + minSize = "50 50"; + text = ""; + closeCommand = "MessageCallback(MessageBoxYesNoDlg,MessageBoxYesNoDlg.noCallback);"; + + new GuiMLTextCtrl(MBYesNoText) { + profile = "GuiMLTextProfile"; + horizSizing = "center"; + vertSizing = "bottom"; + position = "11 38"; + extent = "280 14"; + minExtent = "8 8"; + visible = "1"; + helpTag = "0"; + lineSpacing = "2"; + allowColorChars = "0"; + maxChars = "-1"; + }; + new GuiButtonCtrl() { + profile = "GuiButtonProfile"; + horizSizing = "right"; + vertSizing = "top"; + position = "70 68"; + extent = "80 22"; + minExtent = "8 8"; + visible = "1"; + command = "MessageCallback(MessageBoxYesNoDlg,MessageBoxYesNoDlg.yesCallback);"; + accelerator = "return"; + helpTag = "0"; + text = "Yes"; + simpleStyle = "0"; + }; + new GuiButtonCtrl() { + profile = "GuiButtonProfile"; + horizSizing = "right"; + vertSizing = "top"; + position = "167 68"; + extent = "80 22"; + minExtent = "8 8"; + visible = "1"; + command = "MessageCallback(MessageBoxYesNoDlg,MessageBoxYesNoDlg.noCallback);"; + accelerator = "escape"; + helpTag = "0"; + text = "No"; + simpleStyle = "0"; + }; + }; +}; +//--- OBJECT WRITE END --- diff --git a/Templates/Empty/game/core/scripts/gui/messageBoxes/messageBoxYesNoCancel.ed.gui b/Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxYesNoCancel.ed.gui similarity index 100% rename from Templates/Empty/game/core/scripts/gui/messageBoxes/messageBoxYesNoCancel.ed.gui rename to Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxYesNoCancel.ed.gui diff --git a/Templates/Empty/game/core/scripts/gui/messageBoxes/messagePopup.ed.gui b/Templates/BaseGame/game/tools/gui/messageBoxes/messagePopup.ed.gui similarity index 100% rename from Templates/Empty/game/core/scripts/gui/messageBoxes/messagePopup.ed.gui rename to Templates/BaseGame/game/tools/gui/messageBoxes/messagePopup.ed.gui diff --git a/Templates/Empty/game/tools/gui/objectSelection.ed.cs b/Templates/BaseGame/game/tools/gui/objectSelection.ed.cs similarity index 100% rename from Templates/Empty/game/tools/gui/objectSelection.ed.cs rename to Templates/BaseGame/game/tools/gui/objectSelection.ed.cs diff --git a/Templates/Empty/game/tools/gui/openFileDialog.ed.cs b/Templates/BaseGame/game/tools/gui/openFileDialog.ed.cs similarity index 100% rename from Templates/Empty/game/tools/gui/openFileDialog.ed.cs rename to Templates/BaseGame/game/tools/gui/openFileDialog.ed.cs diff --git a/Templates/BaseGame/game/tools/gui/profilerGraph.cs b/Templates/BaseGame/game/tools/gui/profilerGraph.cs new file mode 100644 index 000000000..07cc2b940 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/profilerGraph.cs @@ -0,0 +1,113 @@ +$ProfilerGraph::refreshRate = 32; +// Profiles +new GuiControlProfile (ProfilerGraphProfile) +{ + modal = false; + opaque = false; + canKeyFocus = false; +}; + +new GuiControlProfile (ProfilerGraphKeyContainerProfile) +{ + border = true; + opaque = true; + fillColor = "100 100 100 200"; +}; +new GuiControlProfile (ProfilerGraphGraphFrameRateProfile) +{ + border = false; + fontColor = "255 255 255"; +}; +new GuiControlProfile (ProfilerGraphPolyCountProfile) +{ + border = false; + fontColor = "255 0 0"; +}; +new GuiControlProfile (ProfilerGraphDrawCountProfile) +{ + border = false; + fontColor = "0 255 0"; +}; +new GuiControlProfile (ProfilerGraphRTChangesProfile) +{ + border = false; + fontColor = "0 0 255"; +}; +new GuiControlProfile (ProfilerGraphLatencyProfile) +{ + border = false; + fontColor = "0 255 255"; +}; +new GuiControlProfile (ProfilerGraphPacketLossProfile) +{ + border = false; + fontColor = "0 0 0"; +}; + +function toggleProfilerGraph() +{ + if(!$ProfilerGraph::isInitialized) + { + ProfilerGraph::updateStats(); + $ProfilerGraph::isInitialized = true; + } + + if(!Canvas.isMember(ProfilerGraphGui)) + { + Canvas.add(ProfilerGraphGui); + } + else + Canvas.remove(ProfilerGraphGui); +} + +function ProfilerGraph::updateStats() +{ + $ProfilerGraphThread = ProfilerGraph.schedule($ProfilerGraph::refreshRate, "updateStats"); + + if(!$Stats::netGhostUpdates) + return; + + if(isobject(ProfilerGraph)) + { + GhostsActive.setText("Frame Rate: " @ $fps::real); + ProfilerGraph.addDatum(1,$fps::real); + + GhostUpdates.setText("Poly Count: " @ $GFXDeviceStatistics::polyCount); + ProfilerGraph.addDatum(2,$GFXDeviceStatistics::polyCount); + + BitsSent.setText("Draw Calls: " @ $GFXDeviceStatistics::drawCalls); + ProfilerGraph.addDatum(3,$GFXDeviceStatistics::drawCalls); + + BitsReceived.setText("Render Target Changes: " @ $GFXDeviceStatistics::renderTargetChanges); + ProfilerGraph.addDatum(4,$GFXDeviceStatistics::renderTargetChanges); + + ProfilerGraph.matchScale(2,3); + + //Latency.setText("Latency: " @ ServerConnection.getPing()); + //ProfilerGraph.addDatum(5,ServerConnection.getPacketLoss()); + + //PacketLoss.setText("Packet Loss: " @ ServerConnection.getPacketLoss()); + } +} + +function ProfilerGraph::toggleKey() +{ + if(!GhostsActive.visible) + { + GhostsActive.visible = 1; + GhostUpdates.visible = 1; + BitsSent.visible = 1; + BitsReceived.visible = 1; + Latency.visible = 1; + PacketLoss.visible = 1; + } + else + { + GhostsActive.visible = 0; + GhostUpdates.visible = 0; + BitsSent.visible = 0; + BitsReceived.visible = 0; + Latency.visible = 0; + PacketLoss.visible = 0; + } +} diff --git a/Templates/BaseGame/game/tools/gui/profilerGraph.gui b/Templates/BaseGame/game/tools/gui/profilerGraph.gui new file mode 100644 index 000000000..a008c227a --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/profilerGraph.gui @@ -0,0 +1,370 @@ +//--- OBJECT WRITE BEGIN --- +%guiContent = new GuiControl(ProfilerGraphGui) { + position = "0 0"; + extent = "1024 768"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "bottom"; + profile = "ProfilerGraphProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "1"; + noCursor = "1"; + + new GuiWindowCtrl() { + text = "Profiler"; + resizeWidth = "1"; + resizeHeight = "1"; + canMove = "1"; + canClose = "1"; + canMinimize = "1"; + canMaximize = "1"; + canCollapse = "0"; + edgeSnap = "1"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "96 232"; + extent = "558 283"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiWindowProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTabBookCtrl() { + tabPosition = "Top"; + tabMargin = "7"; + minTabWidth = "64"; + tabHeight = "20"; + allowReorder = "0"; + defaultPage = "-1"; + selectedPage = "0"; + frontTabPadding = "0"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 22"; + extent = "554 261"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiTabBookProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTabPageCtrl() { + fitBook = "1"; + text = "Main Render"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "0 20"; + extent = "554 241"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiTabPageProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiControl() { + position = "6 13"; + extent = "103 223"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "bottom"; + profile = "ProfilerGraphKeyContainerProfile"; + visible = "0"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + hidden = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl(GhostsActive) { + text = "Ghosts Active"; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "5 0"; + extent = "100 18"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "bottom"; + profile = "GuiTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl(GhostUpdates) { + text = "Ghost Updates"; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "3 72"; + extent = "100 18"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "bottom"; + profile = "GuiTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl(BitsSent) { + text = "Bytes Sent"; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "5 18"; + extent = "100 18"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "bottom"; + profile = "GuiTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl(BitsReceived) { + text = "Bytes Received"; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "3 90"; + extent = "100 18"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "bottom"; + profile = "GuiTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl(Latency) { + text = "Latency"; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "5 36"; + extent = "100 18"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "bottom"; + profile = "ProfilerGraphLatencyProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl(PacketLoss) { + text = "Packet Loss"; + maxLength = "255"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "3 108"; + extent = "59 18"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "bottom"; + profile = "ProfilerGraphPacketLossProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiGraphCtrl(ProfilerGraph) { + centerY = "1"; + plotColor[0] = "1 1 1 1"; + plotColor[1] = "1 0 0 1"; + plotColor[2] = "0 1 0 1"; + plotColor[3] = "0 0 1 1"; + plotColor[4] = "0 1 1 1"; + plotColor[5] = "0 0 0 1"; + plotType[0] = "PolyLine"; + plotType[1] = "PolyLine"; + plotType[2] = "PolyLine"; + plotType[3] = "PolyLine"; + plotType[4] = "PolyLine"; + plotType[5] = "PolyLine"; + plotInterval[0] = "0"; + plotInterval[1] = "0"; + plotInterval[2] = "0"; + plotInterval[3] = "0"; + plotInterval[4] = "0"; + plotInterval[5] = "0"; + position = "112 5"; + extent = "440 231"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "bottom"; + profile = "ProfilerGraphKeyContainerProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl() { + text = "Frame Rate"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + position = "9 0"; + extent = "99 30"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiCheckBoxProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl() { + text = "Poly Count"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + position = "9 32"; + extent = "99 30"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiCheckBoxProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl() { + text = "Draw Count"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + position = "9 64"; + extent = "99 30"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiCheckBoxProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl() { + text = "RT Changes"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + position = "9 96"; + extent = "99 30"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiCheckBoxProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + }; + }; +}; +//--- OBJECT WRITE END --- diff --git a/Templates/Empty/game/tools/gui/profiles.ed.cs b/Templates/BaseGame/game/tools/gui/profiles.ed.cs similarity index 100% rename from Templates/Empty/game/tools/gui/profiles.ed.cs rename to Templates/BaseGame/game/tools/gui/profiles.ed.cs diff --git a/Templates/Empty/game/tools/gui/saveChangesMBDlg.ed.gui b/Templates/BaseGame/game/tools/gui/saveChangesMBDlg.ed.gui similarity index 100% rename from Templates/Empty/game/tools/gui/saveChangesMBDlg.ed.gui rename to Templates/BaseGame/game/tools/gui/saveChangesMBDlg.ed.gui diff --git a/Templates/Empty/game/tools/gui/saveFileDialog.ed.cs b/Templates/BaseGame/game/tools/gui/saveFileDialog.ed.cs similarity index 100% rename from Templates/Empty/game/tools/gui/saveFileDialog.ed.cs rename to Templates/BaseGame/game/tools/gui/saveFileDialog.ed.cs diff --git a/Templates/Empty/game/tools/gui/scriptEditorDlg.ed.gui b/Templates/BaseGame/game/tools/gui/scriptEditorDlg.ed.gui similarity index 100% rename from Templates/Empty/game/tools/gui/scriptEditorDlg.ed.gui rename to Templates/BaseGame/game/tools/gui/scriptEditorDlg.ed.gui diff --git a/Templates/Empty/game/tools/gui/simViewDlg.ed.gui b/Templates/BaseGame/game/tools/gui/simViewDlg.ed.gui similarity index 100% rename from Templates/Empty/game/tools/gui/simViewDlg.ed.gui rename to Templates/BaseGame/game/tools/gui/simViewDlg.ed.gui diff --git a/Templates/Empty/game/tools/gui/uvEditor.ed.gui b/Templates/BaseGame/game/tools/gui/uvEditor.ed.gui similarity index 100% rename from Templates/Empty/game/tools/gui/uvEditor.ed.gui rename to Templates/BaseGame/game/tools/gui/uvEditor.ed.gui diff --git a/Templates/Empty/game/tools/guiEditor/gui/EditorChooseGUI.ed.gui b/Templates/BaseGame/game/tools/guiEditor/gui/EditorChooseGUI.ed.gui similarity index 100% rename from Templates/Empty/game/tools/guiEditor/gui/EditorChooseGUI.ed.gui rename to Templates/BaseGame/game/tools/guiEditor/gui/EditorChooseGUI.ed.gui diff --git a/Templates/Empty/game/tools/guiEditor/gui/gridTiny2.PNG b/Templates/BaseGame/game/tools/guiEditor/gui/gridTiny2.PNG similarity index 100% rename from Templates/Empty/game/tools/guiEditor/gui/gridTiny2.PNG rename to Templates/BaseGame/game/tools/guiEditor/gui/gridTiny2.PNG diff --git a/Templates/Empty/game/tools/guiEditor/gui/guiEditor.ed.gui b/Templates/BaseGame/game/tools/guiEditor/gui/guiEditor.ed.gui similarity index 100% rename from Templates/Empty/game/tools/guiEditor/gui/guiEditor.ed.gui rename to Templates/BaseGame/game/tools/guiEditor/gui/guiEditor.ed.gui diff --git a/Templates/Empty/game/tools/guiEditor/gui/guiEditorNewGuiDialog.ed.gui b/Templates/BaseGame/game/tools/guiEditor/gui/guiEditorNewGuiDialog.ed.gui similarity index 100% rename from Templates/Empty/game/tools/guiEditor/gui/guiEditorNewGuiDialog.ed.gui rename to Templates/BaseGame/game/tools/guiEditor/gui/guiEditorNewGuiDialog.ed.gui diff --git a/Templates/Empty/game/tools/guiEditor/gui/guiEditorPrefsDlg.ed.gui b/Templates/BaseGame/game/tools/guiEditor/gui/guiEditorPrefsDlg.ed.gui similarity index 100% rename from Templates/Empty/game/tools/guiEditor/gui/guiEditorPrefsDlg.ed.gui rename to Templates/BaseGame/game/tools/guiEditor/gui/guiEditorPrefsDlg.ed.gui diff --git a/Templates/Empty/game/tools/guiEditor/gui/guiEditorSelectDlg.ed.gui b/Templates/BaseGame/game/tools/guiEditor/gui/guiEditorSelectDlg.ed.gui similarity index 100% rename from Templates/Empty/game/tools/guiEditor/gui/guiEditorSelectDlg.ed.gui rename to Templates/BaseGame/game/tools/guiEditor/gui/guiEditorSelectDlg.ed.gui diff --git a/Templates/Empty/game/tools/guiEditor/main.cs b/Templates/BaseGame/game/tools/guiEditor/main.cs similarity index 100% rename from Templates/Empty/game/tools/guiEditor/main.cs rename to Templates/BaseGame/game/tools/guiEditor/main.cs diff --git a/Templates/Empty/game/tools/guiEditor/scripts/EditorChooseGUI.ed.cs b/Templates/BaseGame/game/tools/guiEditor/scripts/EditorChooseGUI.ed.cs similarity index 100% rename from Templates/Empty/game/tools/guiEditor/scripts/EditorChooseGUI.ed.cs rename to Templates/BaseGame/game/tools/guiEditor/scripts/EditorChooseGUI.ed.cs diff --git a/Templates/Empty/game/tools/guiEditor/scripts/fileDialogs.ed.cs b/Templates/BaseGame/game/tools/guiEditor/scripts/fileDialogs.ed.cs similarity index 100% rename from Templates/Empty/game/tools/guiEditor/scripts/fileDialogs.ed.cs rename to Templates/BaseGame/game/tools/guiEditor/scripts/fileDialogs.ed.cs diff --git a/Templates/Empty/game/tools/guiEditor/scripts/guiEditor.ed.cs b/Templates/BaseGame/game/tools/guiEditor/scripts/guiEditor.ed.cs similarity index 100% rename from Templates/Empty/game/tools/guiEditor/scripts/guiEditor.ed.cs rename to Templates/BaseGame/game/tools/guiEditor/scripts/guiEditor.ed.cs diff --git a/Templates/Empty/game/tools/guiEditor/scripts/guiEditorCanvas.ed.cs b/Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorCanvas.ed.cs similarity index 100% rename from Templates/Empty/game/tools/guiEditor/scripts/guiEditorCanvas.ed.cs rename to Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorCanvas.ed.cs diff --git a/Templates/Empty/game/tools/guiEditor/scripts/guiEditorContentList.ed.cs b/Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorContentList.ed.cs similarity index 100% rename from Templates/Empty/game/tools/guiEditor/scripts/guiEditorContentList.ed.cs rename to Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorContentList.ed.cs diff --git a/Templates/Empty/game/tools/guiEditor/scripts/guiEditorGroup.ed.cs b/Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorGroup.ed.cs similarity index 100% rename from Templates/Empty/game/tools/guiEditor/scripts/guiEditorGroup.ed.cs rename to Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorGroup.ed.cs diff --git a/Templates/Empty/game/tools/guiEditor/scripts/guiEditorInspector.ed.cs b/Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorInspector.ed.cs similarity index 100% rename from Templates/Empty/game/tools/guiEditor/scripts/guiEditorInspector.ed.cs rename to Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorInspector.ed.cs diff --git a/Templates/Empty/game/tools/guiEditor/scripts/guiEditorNewGuiDialog.ed.cs b/Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorNewGuiDialog.ed.cs similarity index 100% rename from Templates/Empty/game/tools/guiEditor/scripts/guiEditorNewGuiDialog.ed.cs rename to Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorNewGuiDialog.ed.cs diff --git a/Templates/Empty/game/tools/guiEditor/scripts/guiEditorPrefsDlg.ed.cs b/Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorPrefsDlg.ed.cs similarity index 100% rename from Templates/Empty/game/tools/guiEditor/scripts/guiEditorPrefsDlg.ed.cs rename to Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorPrefsDlg.ed.cs diff --git a/Templates/Empty/game/tools/guiEditor/scripts/guiEditorProfiles.ed.cs b/Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorProfiles.ed.cs similarity index 100% rename from Templates/Empty/game/tools/guiEditor/scripts/guiEditorProfiles.ed.cs rename to Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorProfiles.ed.cs diff --git a/Templates/Empty/game/tools/guiEditor/scripts/guiEditorSelectDlg.ed.cs b/Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorSelectDlg.ed.cs similarity index 100% rename from Templates/Empty/game/tools/guiEditor/scripts/guiEditorSelectDlg.ed.cs rename to Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorSelectDlg.ed.cs diff --git a/Templates/Empty/game/tools/guiEditor/scripts/guiEditorStatusBar.ed.cs b/Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorStatusBar.ed.cs similarity index 100% rename from Templates/Empty/game/tools/guiEditor/scripts/guiEditorStatusBar.ed.cs rename to Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorStatusBar.ed.cs diff --git a/Templates/Empty/game/tools/guiEditor/scripts/guiEditorToolbox.ed.cs b/Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorToolbox.ed.cs similarity index 100% rename from Templates/Empty/game/tools/guiEditor/scripts/guiEditorToolbox.ed.cs rename to Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorToolbox.ed.cs diff --git a/Templates/Empty/game/tools/guiEditor/scripts/guiEditorTreeView.ed.cs b/Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorTreeView.ed.cs similarity index 100% rename from Templates/Empty/game/tools/guiEditor/scripts/guiEditorTreeView.ed.cs rename to Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorTreeView.ed.cs diff --git a/Templates/Empty/game/tools/guiEditor/scripts/guiEditorUndo.ed.cs b/Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorUndo.ed.cs similarity index 100% rename from Templates/Empty/game/tools/guiEditor/scripts/guiEditorUndo.ed.cs rename to Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorUndo.ed.cs diff --git a/Templates/Empty/game/tools/levels/BlankRoom.mis b/Templates/BaseGame/game/tools/levels/BlankRoom.mis similarity index 58% rename from Templates/Empty/game/tools/levels/BlankRoom.mis rename to Templates/BaseGame/game/tools/levels/BlankRoom.mis index 5ca65ed5a..d8cd0768b 100644 --- a/Templates/Empty/game/tools/levels/BlankRoom.mis +++ b/Templates/BaseGame/game/tools/levels/BlankRoom.mis @@ -1,42 +1,57 @@ //--- OBJECT WRITE BEGIN --- new SimGroup(MissionGroup) { + canSave = "1"; canSaveDynamicFields = "1"; cdTrack = "2"; CTF_scoreLimit = "5"; - Enabled = "1"; + enabled = "1"; musicTrack = "lush"; - new LevelInfo(theLevelInfo) { + new LevelInfo(TheLevelInfo) { + nearClip = "0.1"; visibleDistance = "1000"; + visibleGhostDistance = "0"; + decalBias = "0.0015"; fogColor = "0.6 0.6 0.7 1"; fogDensity = "0"; fogDensityOffset = "700"; fogAtmosphereHeight = "0"; canvasClearColor = "0 0 0 255"; - canSaveDynamicFields = "1"; + ambientLightBlendPhase = "1"; + ambientLightBlendCurve = "0 0 -1 -1"; + advancedLightmapSupport = "0"; + soundAmbience = "AudioAmbienceDefault"; + soundDistanceModel = "Linear"; + canSave = "1"; + canSaveDynamicFields = "1"; + desc0 = "A blank room ready to be populated with Torque objects. Guns, anyone?"; + enabled = "1"; levelName = "Blank Room"; - desc0 = "A blank room ready to be populated with Torque objects.\n\nGuns, anyone?"; - Enabled = "1"; }; new SkyBox(theSky) { - canSaveDynamicFields = "1"; - Position = "0 0 0"; - rotation = "1 0 0 0"; - scale = "1 1 1"; - Material = "BlackSkyMat"; + Material = "BlankSkyMat"; drawBottom = "0"; fogBandHeight = "0"; - }; - new Sun(theSun) { - canSaveDynamicFields = "1"; - Position = "0 0 0"; + position = "0 0 0"; rotation = "1 0 0 0"; scale = "1 1 1"; + canSave = "1"; + canSaveDynamicFields = "1"; + }; + new Sun(theSun) { azimuth = "230.396"; elevation = "45"; color = "0.968628 0.901961 0.901961 1"; - ambient = "0.078431 0.113725 0.156863 1"; + ambient = "0.337255 0.533333 0.619608 1"; + brightness = "1"; castShadows = "1"; + staticRefreshFreq = "250"; + dynamicRefreshFreq = "8"; + coronaEnabled = "1"; + coronaScale = "0.5"; + coronaTint = "1 1 1 1"; + coronaUseLightColor = "1"; + flareScale = "1"; attenuationRatio = "0 1 1"; shadowType = "PSSM"; texSize = "1024"; @@ -47,47 +62,36 @@ new SimGroup(MissionGroup) { logWeight = "0.9"; fadeStartDistance = "0"; lastSplitTerrainOnly = "0"; - splitFadeDistances = "1 1 1 1"; + representedInLightmap = "0"; + shadowDarkenColor = "0 0 0 -1"; + includeLightmappedGeometryInShadow = "0"; + position = "0 0 0"; + rotation = "1 0 0 0"; + scale = "1 1 1"; + canSave = "1"; + canSaveDynamicFields = "1"; bias = "0.1"; Blur = "1"; - Enabled = "1"; + enabled = "1"; height = "1024"; lightBleedFactor = "0.8"; minVariance = "0"; pointShadowType = "PointShadowType_Paraboloid"; shadowBox = "-100 -100 -100 100 100 100"; + splitFadeDistances = "1 1 1 1"; width = "3072"; }; - new SimGroup(PlayerDropPoints) { + new GroundPlane() { + squareSize = "128"; + scaleU = "25"; + scaleV = "25"; + Material = "Grid_512_Grey"; + canSave = "1"; canSaveDynamicFields = "1"; - Enabled = "1"; - - new SpawnSphere() { - canSaveDynamicFields = "1"; - Position = "0 0 2"; + enabled = "1"; + position = "0 0 0"; rotation = "1 0 0 0"; scale = "1 1 1"; - dataBlock = "SpawnSphereMarker"; - radius = "5"; - autoSpawn = "false"; - sphereWeight = "1"; - indoorWeight = "1"; - outdoorWeight = "1"; - Enabled = "1"; - homingCount = "0"; - lockCount = "0"; - }; - }; - new GroundPlane() { - canSaveDynamicFields = "1"; - Position = "0 0 0"; - rotation = "1 0 0 0"; - scale = "1 1 1"; - squareSize = "128"; - scaleU = "12"; - scaleV = "12"; - Material = "BlankWhite"; - Enabled = "1"; }; }; //--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/tools/levels/BlankRoom.postfxpreset.cs b/Templates/BaseGame/game/tools/levels/BlankRoom.postfxpreset.cs new file mode 100644 index 000000000..8b616a84a --- /dev/null +++ b/Templates/BaseGame/game/tools/levels/BlankRoom.postfxpreset.cs @@ -0,0 +1,53 @@ +$PostFXManager::Settings::ColorCorrectionRamp = "core/images/null_color_ramp.png"; +$PostFXManager::Settings::DOF::BlurCurveFar = ""; +$PostFXManager::Settings::DOF::BlurCurveNear = ""; +$PostFXManager::Settings::DOF::BlurMax = ""; +$PostFXManager::Settings::DOF::BlurMin = ""; +$PostFXManager::Settings::DOF::EnableAutoFocus = ""; +$PostFXManager::Settings::DOF::EnableDOF = ""; +$PostFXManager::Settings::DOF::FocusRangeMax = ""; +$PostFXManager::Settings::DOF::FocusRangeMin = ""; +$PostFXManager::Settings::EnableDOF = "1"; +$PostFXManager::Settings::EnabledSSAO = "1"; +$PostFXManager::Settings::EnableHDR = "1"; +$PostFXManager::Settings::EnableLightRays = "1"; +$PostFXManager::Settings::EnablePostFX = "1"; +$PostFXManager::Settings::EnableSSAO = "1"; +$PostFXManager::Settings::EnableVignette = "1"; +$PostFXManager::Settings::HDR::adaptRate = "2"; +$PostFXManager::Settings::HDR::blueShiftColor = "1.05 0.97 1.27"; +$PostFXManager::Settings::HDR::brightPassThreshold = "1"; +$PostFXManager::Settings::HDR::enableBloom = "1"; +$PostFXManager::Settings::HDR::enableBlueShift = "0"; +$PostFXManager::Settings::HDR::enableToneMapping = "0.5"; +$PostFXManager::Settings::HDR::gaussMean = "0"; +$PostFXManager::Settings::HDR::gaussMultiplier = "0.3"; +$PostFXManager::Settings::HDR::gaussStdDev = "0.8"; +$PostFXManager::Settings::HDR::keyValue = "0.117347"; +$PostFXManager::Settings::HDR::minLuminace = "0.0459184"; +$PostFXManager::Settings::HDR::whiteCutoff = "1"; +$PostFXManager::Settings::LightRays::brightScalar = "0.75"; +$PostFXManager::Settings::LightRays::decay = "1.0"; +$PostFXManager::Settings::LightRays::density = "0.94"; +$PostFXManager::Settings::LightRays::numSamples = "40"; +$PostFXManager::Settings::LightRays::weight = "5.65"; +$PostFXManager::Settings::SSAO::blurDepthTol = "0.001"; +$PostFXManager::Settings::SSAO::blurNormalTol = "0.95"; +$PostFXManager::Settings::SSAO::lDepthMax = "2"; +$PostFXManager::Settings::SSAO::lDepthMin = "0.2"; +$PostFXManager::Settings::SSAO::lDepthPow = "0.2"; +$PostFXManager::Settings::SSAO::lNormalPow = "2"; +$PostFXManager::Settings::SSAO::lNormalTol = "-0.5"; +$PostFXManager::Settings::SSAO::lRadius = "1"; +$PostFXManager::Settings::SSAO::lStrength = "10"; +$PostFXManager::Settings::SSAO::overallStrength = "2"; +$PostFXManager::Settings::SSAO::quality = "0"; +$PostFXManager::Settings::SSAO::sDepthMax = "1"; +$PostFXManager::Settings::SSAO::sDepthMin = "0.1"; +$PostFXManager::Settings::SSAO::sDepthPow = "1"; +$PostFXManager::Settings::SSAO::sNormalPow = "1"; +$PostFXManager::Settings::SSAO::sNormalTol = "0"; +$PostFXManager::Settings::SSAO::sRadius = "0.1"; +$PostFXManager::Settings::SSAO::sStrength = "6"; +$PostFXManager::Settings::Vignette::VMax = 0.830218; +$PostFXManager::Settings::Vignette::VMin = 0.2; diff --git a/Templates/Empty/game/tools/levels/BlankRoom_preview.png b/Templates/BaseGame/game/tools/levels/BlankRoom_preview.png similarity index 100% rename from Templates/Empty/game/tools/levels/BlankRoom_preview.png rename to Templates/BaseGame/game/tools/levels/BlankRoom_preview.png diff --git a/Templates/Empty/game/tools/main.cs b/Templates/BaseGame/game/tools/main.cs similarity index 80% rename from Templates/Empty/game/tools/main.cs rename to Templates/BaseGame/game/tools/main.cs index 811cf79f9..dd238eac0 100644 --- a/Templates/Empty/game/tools/main.cs +++ b/Templates/BaseGame/game/tools/main.cs @@ -41,14 +41,14 @@ package Tools function loadKeybindings() { Parent::loadKeybindings(); - - } // Start-up. function onStart() { - Parent::onStart(); + //First, we want to ensure we don't inadvertently clean up our editor objects by leaving them in the MissionCleanup group, so lets change that real fast + $instantGroup = ""; + pushInstantGroup(); new Settings(EditorSettings) { file = "tools/settings.xml"; }; EditorSettings.read(); @@ -64,6 +64,7 @@ package Tools // Common GUI stuff. exec( "./gui/cursors.ed.cs" ); exec( "./gui/profiles.ed.cs" ); + exec( "./gui/messageBoxes/messageBox.ed.cs" ); exec( "./editorClasses/gui/panels/navPanelProfiles.ed.cs" ); // Make sure we get editor profiles before any GUI's @@ -130,7 +131,11 @@ package Tools // resources can override, redefine, or add functionality. Tools::LoadResources( $Tools::resourcePath ); - //$Scripts::ignoreDSOs = %toggle; + //Now that we're done loading, we can set the instant group back + popInstantGroup(); + $instantGroup = MissionCleanup; + pushInstantGroup(); + } function startToolTime(%tool) @@ -209,6 +214,61 @@ package Tools } }; +function fastLoadWorldEdit(%val) +{ + if(%val) + { + if(!$Tools::loaded) + { + onStart(); + } + + if(!$Game::running) + { + //startGame(); + activatePackage( "BootEditor" ); + ChooseLevelDlg.launchInEditor = false; + StartGame("tools/levels/BlankRoom.mis", "SinglePlayer"); + + if(!isObject(Observer)) + { + datablock CameraData(Observer) {}; + } + + %cam = new Camera() + { + datablock = Observer; + }; + + %cam.scopeToClient(LocalClientConnection); + + LocalClientConnection.setCameraObject(%cam); + LocalClientConnection.setControlObject(%cam); + + LocalClientConnection.camera = %cam; + + %cam.setPosition("0 0 0"); + } + else + { + toggleEditor(true); + } + } +} + +function fastLoadGUIEdit(%val) +{ + if(%val) + { + if(!$Tools::loaded) + { + onStart(); + } + + toggleGuiEditor(true); + } +} + function Tools::LoadResources( %path ) { %resourcesPath = %path @ "resources/"; @@ -228,3 +288,16 @@ function Tools::LoadResources( %path ) //----------------------------------------------------------------------------- activatePackage(Tools); +//This lets us fast-load the editor from the menu +GlobalActionMap.bind(keyboard, "F11", fastLoadWorldEdit); +GlobalActionMap.bind(keyboard, "F10", fastLoadGUIEdit); + +function EditorIsActive() +{ + return ( isObject(EditorGui) && Canvas.getContent() == EditorGui.getId() ); +} + +function GuiEditorIsActive() +{ + return ( isObject(GuiEditorGui) && Canvas.getContent() == GuiEditorGui.getId() ); +} diff --git a/Templates/Empty/game/tools/materialEditor/gui/MaterialToolbar.ed.gui b/Templates/BaseGame/game/tools/materialEditor/gui/MaterialToolbar.ed.gui similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/MaterialToolbar.ed.gui rename to Templates/BaseGame/game/tools/materialEditor/gui/MaterialToolbar.ed.gui diff --git a/Templates/Empty/game/tools/materialEditor/gui/Profiles.ed.cs b/Templates/BaseGame/game/tools/materialEditor/gui/Profiles.ed.cs similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/Profiles.ed.cs rename to Templates/BaseGame/game/tools/materialEditor/gui/Profiles.ed.cs diff --git a/Templates/Empty/game/tools/materialEditor/gui/change-material-btn_d.png b/Templates/BaseGame/game/tools/materialEditor/gui/change-material-btn_d.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/change-material-btn_d.png rename to Templates/BaseGame/game/tools/materialEditor/gui/change-material-btn_d.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/change-material-btn_h.png b/Templates/BaseGame/game/tools/materialEditor/gui/change-material-btn_h.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/change-material-btn_h.png rename to Templates/BaseGame/game/tools/materialEditor/gui/change-material-btn_h.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/change-material-btn_n.png b/Templates/BaseGame/game/tools/materialEditor/gui/change-material-btn_n.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/change-material-btn_n.png rename to Templates/BaseGame/game/tools/materialEditor/gui/change-material-btn_n.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/cubeMapEd_cubePreview.max b/Templates/BaseGame/game/tools/materialEditor/gui/cubeMapEd_cubePreview.max similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/cubeMapEd_cubePreview.max rename to Templates/BaseGame/game/tools/materialEditor/gui/cubeMapEd_cubePreview.max diff --git a/Templates/Empty/game/tools/materialEditor/gui/cubeMapEd_previewMat.jpg b/Templates/BaseGame/game/tools/materialEditor/gui/cubeMapEd_previewMat.jpg similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/cubeMapEd_previewMat.jpg rename to Templates/BaseGame/game/tools/materialEditor/gui/cubeMapEd_previewMat.jpg diff --git a/Templates/Empty/game/tools/materialEditor/gui/cube_xNeg.jpg b/Templates/BaseGame/game/tools/materialEditor/gui/cube_xNeg.jpg similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/cube_xNeg.jpg rename to Templates/BaseGame/game/tools/materialEditor/gui/cube_xNeg.jpg diff --git a/Templates/Empty/game/tools/materialEditor/gui/cube_xPos.jpg b/Templates/BaseGame/game/tools/materialEditor/gui/cube_xPos.jpg similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/cube_xPos.jpg rename to Templates/BaseGame/game/tools/materialEditor/gui/cube_xPos.jpg diff --git a/Templates/Empty/game/tools/materialEditor/gui/cube_yNeg.jpg b/Templates/BaseGame/game/tools/materialEditor/gui/cube_yNeg.jpg similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/cube_yNeg.jpg rename to Templates/BaseGame/game/tools/materialEditor/gui/cube_yNeg.jpg diff --git a/Templates/Empty/game/tools/materialEditor/gui/cube_yPos.jpg b/Templates/BaseGame/game/tools/materialEditor/gui/cube_yPos.jpg similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/cube_yPos.jpg rename to Templates/BaseGame/game/tools/materialEditor/gui/cube_yPos.jpg diff --git a/Templates/Empty/game/tools/materialEditor/gui/cube_zNeg.jpg b/Templates/BaseGame/game/tools/materialEditor/gui/cube_zNeg.jpg similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/cube_zNeg.jpg rename to Templates/BaseGame/game/tools/materialEditor/gui/cube_zNeg.jpg diff --git a/Templates/Empty/game/tools/materialEditor/gui/cube_zPos.jpg b/Templates/BaseGame/game/tools/materialEditor/gui/cube_zPos.jpg similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/cube_zPos.jpg rename to Templates/BaseGame/game/tools/materialEditor/gui/cube_zPos.jpg diff --git a/Templates/Empty/game/tools/materialEditor/gui/cubemapBtnBorder_d.png b/Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_d.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/cubemapBtnBorder_d.png rename to Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_d.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/cubemapBtnBorder_h.png b/Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_h.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/cubemapBtnBorder_h.png rename to Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_h.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/cubemapBtnBorder_i.png b/Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_i.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/cubemapBtnBorder_i.png rename to Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_i.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/cubemapBtnBorder_n.png b/Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_n.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/cubemapBtnBorder_n.png rename to Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_n.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/cubemapEd_spherePreview.max b/Templates/BaseGame/game/tools/materialEditor/gui/cubemapEd_spherePreview.max similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/cubemapEd_spherePreview.max rename to Templates/BaseGame/game/tools/materialEditor/gui/cubemapEd_spherePreview.max diff --git a/Templates/Empty/game/tools/materialEditor/gui/cubemaped_cubepreview.dts b/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cubepreview.dts similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/cubemaped_cubepreview.dts rename to Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cubepreview.dts diff --git a/Templates/Empty/game/tools/materialEditor/gui/cubemaped_cylinderpreview.dts b/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cylinderpreview.dts similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/cubemaped_cylinderpreview.dts rename to Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cylinderpreview.dts diff --git a/Templates/Empty/game/tools/materialEditor/gui/cubemaped_spherepreview.dts b/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_spherepreview.dts similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/cubemaped_spherepreview.dts rename to Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_spherepreview.dts diff --git a/Templates/Empty/game/tools/materialEditor/gui/cubematEd_cylinderPreview.max b/Templates/BaseGame/game/tools/materialEditor/gui/cubematEd_cylinderPreview.max similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/cubematEd_cylinderPreview.max rename to Templates/BaseGame/game/tools/materialEditor/gui/cubematEd_cylinderPreview.max diff --git a/Templates/Empty/game/tools/materialEditor/gui/cubepreview.dts b/Templates/BaseGame/game/tools/materialEditor/gui/cubepreview.dts similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/cubepreview.dts rename to Templates/BaseGame/game/tools/materialEditor/gui/cubepreview.dts diff --git a/Templates/Empty/game/tools/materialEditor/gui/cylinderpreview.dts b/Templates/BaseGame/game/tools/materialEditor/gui/cylinderpreview.dts similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/cylinderpreview.dts rename to Templates/BaseGame/game/tools/materialEditor/gui/cylinderpreview.dts diff --git a/Templates/Empty/game/tools/materialEditor/gui/gridTiny2.PNG b/Templates/BaseGame/game/tools/materialEditor/gui/gridTiny2.PNG similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/gridTiny2.PNG rename to Templates/BaseGame/game/tools/materialEditor/gui/gridTiny2.PNG diff --git a/Templates/Empty/game/tools/materialEditor/gui/guiMaterialPreviewWindow.ed.gui b/Templates/BaseGame/game/tools/materialEditor/gui/guiMaterialPreviewWindow.ed.gui similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/guiMaterialPreviewWindow.ed.gui rename to Templates/BaseGame/game/tools/materialEditor/gui/guiMaterialPreviewWindow.ed.gui diff --git a/Templates/Empty/game/tools/materialEditor/gui/guiMaterialPropertiesWindow.ed.gui b/Templates/BaseGame/game/tools/materialEditor/gui/guiMaterialPropertiesWindow.ed.gui similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/guiMaterialPropertiesWindow.ed.gui rename to Templates/BaseGame/game/tools/materialEditor/gui/guiMaterialPropertiesWindow.ed.gui diff --git a/Templates/Empty/game/tools/materialEditor/gui/matEd_cubePreview.max b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_cubePreview.max similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/matEd_cubePreview.max rename to Templates/BaseGame/game/tools/materialEditor/gui/matEd_cubePreview.max diff --git a/Templates/Empty/game/tools/materialEditor/gui/matEd_cylinderButt_d.jpg b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderButt_d.jpg similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/matEd_cylinderButt_d.jpg rename to Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderButt_d.jpg diff --git a/Templates/Empty/game/tools/materialEditor/gui/matEd_cylinderButt_h.jpg b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderButt_h.jpg similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/matEd_cylinderButt_h.jpg rename to Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderButt_h.jpg diff --git a/Templates/Empty/game/tools/materialEditor/gui/matEd_cylinderButt_n.jpg b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderButt_n.jpg similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/matEd_cylinderButt_n.jpg rename to Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderButt_n.jpg diff --git a/Templates/Empty/game/tools/materialEditor/gui/matEd_cylinderPreview.max b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderPreview.max similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/matEd_cylinderPreview.max rename to Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderPreview.max diff --git a/Templates/Empty/game/tools/materialEditor/gui/matEd_mappedMat.jpg b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_mappedMat.jpg similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/matEd_mappedMat.jpg rename to Templates/BaseGame/game/tools/materialEditor/gui/matEd_mappedMat.jpg diff --git a/Templates/Empty/game/tools/materialEditor/gui/matEd_pyramidPreview.max b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_pyramidPreview.max similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/matEd_pyramidPreview.max rename to Templates/BaseGame/game/tools/materialEditor/gui/matEd_pyramidPreview.max diff --git a/Templates/Empty/game/tools/materialEditor/gui/matEd_sphereButt_d.jpg b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_sphereButt_d.jpg similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/matEd_sphereButt_d.jpg rename to Templates/BaseGame/game/tools/materialEditor/gui/matEd_sphereButt_d.jpg diff --git a/Templates/Empty/game/tools/materialEditor/gui/matEd_sphereButt_h.jpg b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_sphereButt_h.jpg similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/matEd_sphereButt_h.jpg rename to Templates/BaseGame/game/tools/materialEditor/gui/matEd_sphereButt_h.jpg diff --git a/Templates/Empty/game/tools/materialEditor/gui/matEd_sphereButt_n.jpg b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_sphereButt_n.jpg similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/matEd_sphereButt_n.jpg rename to Templates/BaseGame/game/tools/materialEditor/gui/matEd_sphereButt_n.jpg diff --git a/Templates/Empty/game/tools/materialEditor/gui/matEd_spherePreview.max b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_spherePreview.max similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/matEd_spherePreview.max rename to Templates/BaseGame/game/tools/materialEditor/gui/matEd_spherePreview.max diff --git a/Templates/Empty/game/tools/materialEditor/gui/matEd_torusKnotPreview.max b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_torusKnotPreview.max similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/matEd_torusKnotPreview.max rename to Templates/BaseGame/game/tools/materialEditor/gui/matEd_torusKnotPreview.max diff --git a/Templates/Empty/game/tools/materialEditor/gui/matEd_torusPreview.max b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_torusPreview.max similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/matEd_torusPreview.max rename to Templates/BaseGame/game/tools/materialEditor/gui/matEd_torusPreview.max diff --git a/Templates/Empty/game/tools/materialEditor/gui/materialSelectorIcon_d.png b/Templates/BaseGame/game/tools/materialEditor/gui/materialSelectorIcon_d.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/materialSelectorIcon_d.png rename to Templates/BaseGame/game/tools/materialEditor/gui/materialSelectorIcon_d.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/materialSelectorIcon_h.png b/Templates/BaseGame/game/tools/materialEditor/gui/materialSelectorIcon_h.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/materialSelectorIcon_h.png rename to Templates/BaseGame/game/tools/materialEditor/gui/materialSelectorIcon_h.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/materialSelectorIcon_n.png b/Templates/BaseGame/game/tools/materialEditor/gui/materialSelectorIcon_n.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/materialSelectorIcon_n.png rename to Templates/BaseGame/game/tools/materialEditor/gui/materialSelectorIcon_n.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/mesh-selector-btn_d.png b/Templates/BaseGame/game/tools/materialEditor/gui/mesh-selector-btn_d.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/mesh-selector-btn_d.png rename to Templates/BaseGame/game/tools/materialEditor/gui/mesh-selector-btn_d.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/mesh-selector-btn_h.png b/Templates/BaseGame/game/tools/materialEditor/gui/mesh-selector-btn_h.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/mesh-selector-btn_h.png rename to Templates/BaseGame/game/tools/materialEditor/gui/mesh-selector-btn_h.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/mesh-selector-btn_n.png b/Templates/BaseGame/game/tools/materialEditor/gui/mesh-selector-btn_n.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/mesh-selector-btn_n.png rename to Templates/BaseGame/game/tools/materialEditor/gui/mesh-selector-btn_n.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/new-material_d.png b/Templates/BaseGame/game/tools/materialEditor/gui/new-material_d.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/new-material_d.png rename to Templates/BaseGame/game/tools/materialEditor/gui/new-material_d.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/new-material_h.png b/Templates/BaseGame/game/tools/materialEditor/gui/new-material_h.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/new-material_h.png rename to Templates/BaseGame/game/tools/materialEditor/gui/new-material_h.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/new-material_n.png b/Templates/BaseGame/game/tools/materialEditor/gui/new-material_n.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/new-material_n.png rename to Templates/BaseGame/game/tools/materialEditor/gui/new-material_n.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/pyramidpreview.dts b/Templates/BaseGame/game/tools/materialEditor/gui/pyramidpreview.dts similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/pyramidpreview.dts rename to Templates/BaseGame/game/tools/materialEditor/gui/pyramidpreview.dts diff --git a/Templates/Empty/game/tools/materialEditor/gui/screenFaded.png b/Templates/BaseGame/game/tools/materialEditor/gui/screenFaded.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/screenFaded.png rename to Templates/BaseGame/game/tools/materialEditor/gui/screenFaded.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/scrollBox.jpg b/Templates/BaseGame/game/tools/materialEditor/gui/scrollBox.jpg similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/scrollBox.jpg rename to Templates/BaseGame/game/tools/materialEditor/gui/scrollBox.jpg diff --git a/Templates/Empty/game/tools/materialEditor/gui/spherepreview.dts b/Templates/BaseGame/game/tools/materialEditor/gui/spherepreview.dts similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/spherepreview.dts rename to Templates/BaseGame/game/tools/materialEditor/gui/spherepreview.dts diff --git a/Templates/Empty/game/tools/materialEditor/gui/torusknotpreview.dts b/Templates/BaseGame/game/tools/materialEditor/gui/torusknotpreview.dts similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/torusknotpreview.dts rename to Templates/BaseGame/game/tools/materialEditor/gui/torusknotpreview.dts diff --git a/Templates/Empty/game/tools/worldEditor/gui/guiTerrainEditorToolbar.ed.gui b/Templates/BaseGame/game/tools/materialEditor/gui/torusknowpreview.dts similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/guiTerrainEditorToolbar.ed.gui rename to Templates/BaseGame/game/tools/materialEditor/gui/torusknowpreview.dts diff --git a/Templates/Empty/game/tools/materialEditor/gui/toruspreview.dts b/Templates/BaseGame/game/tools/materialEditor/gui/toruspreview.dts similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/toruspreview.dts rename to Templates/BaseGame/game/tools/materialEditor/gui/toruspreview.dts diff --git a/Templates/Empty/game/tools/materialEditor/gui/unknownImage.png b/Templates/BaseGame/game/tools/materialEditor/gui/unknownImage.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/unknownImage.png rename to Templates/BaseGame/game/tools/materialEditor/gui/unknownImage.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/unsavedWarn.png b/Templates/BaseGame/game/tools/materialEditor/gui/unsavedWarn.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/unsavedWarn.png rename to Templates/BaseGame/game/tools/materialEditor/gui/unsavedWarn.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/wav-none_d.png b/Templates/BaseGame/game/tools/materialEditor/gui/wav-none_d.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/wav-none_d.png rename to Templates/BaseGame/game/tools/materialEditor/gui/wav-none_d.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/wav-none_h.png b/Templates/BaseGame/game/tools/materialEditor/gui/wav-none_h.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/wav-none_h.png rename to Templates/BaseGame/game/tools/materialEditor/gui/wav-none_h.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/wav-none_i.png b/Templates/BaseGame/game/tools/materialEditor/gui/wav-none_i.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/wav-none_i.png rename to Templates/BaseGame/game/tools/materialEditor/gui/wav-none_i.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/wav-none_n.png b/Templates/BaseGame/game/tools/materialEditor/gui/wav-none_n.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/wav-none_n.png rename to Templates/BaseGame/game/tools/materialEditor/gui/wav-none_n.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/wav-sine_d.png b/Templates/BaseGame/game/tools/materialEditor/gui/wav-sine_d.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/wav-sine_d.png rename to Templates/BaseGame/game/tools/materialEditor/gui/wav-sine_d.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/wav-sine_h.png b/Templates/BaseGame/game/tools/materialEditor/gui/wav-sine_h.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/wav-sine_h.png rename to Templates/BaseGame/game/tools/materialEditor/gui/wav-sine_h.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/wav-sine_i.png b/Templates/BaseGame/game/tools/materialEditor/gui/wav-sine_i.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/wav-sine_i.png rename to Templates/BaseGame/game/tools/materialEditor/gui/wav-sine_i.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/wav-sine_n.png b/Templates/BaseGame/game/tools/materialEditor/gui/wav-sine_n.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/wav-sine_n.png rename to Templates/BaseGame/game/tools/materialEditor/gui/wav-sine_n.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/wav-square_d.png b/Templates/BaseGame/game/tools/materialEditor/gui/wav-square_d.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/wav-square_d.png rename to Templates/BaseGame/game/tools/materialEditor/gui/wav-square_d.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/wav-square_h.png b/Templates/BaseGame/game/tools/materialEditor/gui/wav-square_h.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/wav-square_h.png rename to Templates/BaseGame/game/tools/materialEditor/gui/wav-square_h.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/wav-square_i.png b/Templates/BaseGame/game/tools/materialEditor/gui/wav-square_i.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/wav-square_i.png rename to Templates/BaseGame/game/tools/materialEditor/gui/wav-square_i.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/wav-square_n.png b/Templates/BaseGame/game/tools/materialEditor/gui/wav-square_n.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/wav-square_n.png rename to Templates/BaseGame/game/tools/materialEditor/gui/wav-square_n.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/wav-triangle_d.png b/Templates/BaseGame/game/tools/materialEditor/gui/wav-triangle_d.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/wav-triangle_d.png rename to Templates/BaseGame/game/tools/materialEditor/gui/wav-triangle_d.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/wav-triangle_h.png b/Templates/BaseGame/game/tools/materialEditor/gui/wav-triangle_h.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/wav-triangle_h.png rename to Templates/BaseGame/game/tools/materialEditor/gui/wav-triangle_h.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/wav-triangle_i.png b/Templates/BaseGame/game/tools/materialEditor/gui/wav-triangle_i.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/wav-triangle_i.png rename to Templates/BaseGame/game/tools/materialEditor/gui/wav-triangle_i.png diff --git a/Templates/Empty/game/tools/materialEditor/gui/wav-triangle_n.png b/Templates/BaseGame/game/tools/materialEditor/gui/wav-triangle_n.png similarity index 100% rename from Templates/Empty/game/tools/materialEditor/gui/wav-triangle_n.png rename to Templates/BaseGame/game/tools/materialEditor/gui/wav-triangle_n.png diff --git a/Templates/Empty/game/tools/materialEditor/main.cs b/Templates/BaseGame/game/tools/materialEditor/main.cs similarity index 100% rename from Templates/Empty/game/tools/materialEditor/main.cs rename to Templates/BaseGame/game/tools/materialEditor/main.cs diff --git a/Templates/Empty/game/tools/materialEditor/scripts/materialEditor.ed.cs b/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.cs similarity index 100% rename from Templates/Empty/game/tools/materialEditor/scripts/materialEditor.ed.cs rename to Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.cs diff --git a/Templates/Empty/game/tools/materialEditor/scripts/materialEditorUndo.ed.cs b/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditorUndo.ed.cs similarity index 100% rename from Templates/Empty/game/tools/materialEditor/scripts/materialEditorUndo.ed.cs rename to Templates/BaseGame/game/tools/materialEditor/scripts/materialEditorUndo.ed.cs diff --git a/Templates/Empty/game/tools/meshRoadEditor/main.cs b/Templates/BaseGame/game/tools/meshRoadEditor/main.cs similarity index 100% rename from Templates/Empty/game/tools/meshRoadEditor/main.cs rename to Templates/BaseGame/game/tools/meshRoadEditor/main.cs diff --git a/Templates/Empty/game/tools/meshRoadEditor/meshRoadEditor.cs b/Templates/BaseGame/game/tools/meshRoadEditor/meshRoadEditor.cs similarity index 100% rename from Templates/Empty/game/tools/meshRoadEditor/meshRoadEditor.cs rename to Templates/BaseGame/game/tools/meshRoadEditor/meshRoadEditor.cs diff --git a/Templates/Empty/game/tools/meshRoadEditor/meshRoadEditorGui.cs b/Templates/BaseGame/game/tools/meshRoadEditor/meshRoadEditorGui.cs similarity index 100% rename from Templates/Empty/game/tools/meshRoadEditor/meshRoadEditorGui.cs rename to Templates/BaseGame/game/tools/meshRoadEditor/meshRoadEditorGui.cs diff --git a/Templates/Empty/game/tools/meshRoadEditor/meshRoadEditorGui.gui b/Templates/BaseGame/game/tools/meshRoadEditor/meshRoadEditorGui.gui similarity index 100% rename from Templates/Empty/game/tools/meshRoadEditor/meshRoadEditorGui.gui rename to Templates/BaseGame/game/tools/meshRoadEditor/meshRoadEditorGui.gui diff --git a/Templates/Empty/game/tools/meshRoadEditor/meshRoadEditorSettingsTab.gui b/Templates/BaseGame/game/tools/meshRoadEditor/meshRoadEditorSettingsTab.gui similarity index 100% rename from Templates/Empty/game/tools/meshRoadEditor/meshRoadEditorSettingsTab.gui rename to Templates/BaseGame/game/tools/meshRoadEditor/meshRoadEditorSettingsTab.gui diff --git a/Templates/Empty/game/tools/meshRoadEditor/meshRoadEditorToolbar.gui b/Templates/BaseGame/game/tools/meshRoadEditor/meshRoadEditorToolbar.gui similarity index 100% rename from Templates/Empty/game/tools/meshRoadEditor/meshRoadEditorToolbar.gui rename to Templates/BaseGame/game/tools/meshRoadEditor/meshRoadEditorToolbar.gui diff --git a/Templates/Empty/game/tools/missionAreaEditor/images/DefaultHandle.png b/Templates/BaseGame/game/tools/missionAreaEditor/images/DefaultHandle.png similarity index 100% rename from Templates/Empty/game/tools/missionAreaEditor/images/DefaultHandle.png rename to Templates/BaseGame/game/tools/missionAreaEditor/images/DefaultHandle.png diff --git a/Templates/Empty/game/tools/missionAreaEditor/images/mission-area_d.png b/Templates/BaseGame/game/tools/missionAreaEditor/images/mission-area_d.png similarity index 100% rename from Templates/Empty/game/tools/missionAreaEditor/images/mission-area_d.png rename to Templates/BaseGame/game/tools/missionAreaEditor/images/mission-area_d.png diff --git a/Templates/Empty/game/tools/missionAreaEditor/images/mission-area_h.png b/Templates/BaseGame/game/tools/missionAreaEditor/images/mission-area_h.png similarity index 100% rename from Templates/Empty/game/tools/missionAreaEditor/images/mission-area_h.png rename to Templates/BaseGame/game/tools/missionAreaEditor/images/mission-area_h.png diff --git a/Templates/Empty/game/tools/missionAreaEditor/images/mission-area_n.png b/Templates/BaseGame/game/tools/missionAreaEditor/images/mission-area_n.png similarity index 100% rename from Templates/Empty/game/tools/missionAreaEditor/images/mission-area_n.png rename to Templates/BaseGame/game/tools/missionAreaEditor/images/mission-area_n.png diff --git a/Templates/Empty/game/tools/missionAreaEditor/main.cs b/Templates/BaseGame/game/tools/missionAreaEditor/main.cs similarity index 100% rename from Templates/Empty/game/tools/missionAreaEditor/main.cs rename to Templates/BaseGame/game/tools/missionAreaEditor/main.cs diff --git a/Templates/Empty/game/tools/missionAreaEditor/missionAreaEditor.ed.cs b/Templates/BaseGame/game/tools/missionAreaEditor/missionAreaEditor.ed.cs similarity index 100% rename from Templates/Empty/game/tools/missionAreaEditor/missionAreaEditor.ed.cs rename to Templates/BaseGame/game/tools/missionAreaEditor/missionAreaEditor.ed.cs diff --git a/Templates/Empty/game/tools/missionAreaEditor/missionAreaEditorGui.ed.cs b/Templates/BaseGame/game/tools/missionAreaEditor/missionAreaEditorGui.ed.cs similarity index 100% rename from Templates/Empty/game/tools/missionAreaEditor/missionAreaEditorGui.ed.cs rename to Templates/BaseGame/game/tools/missionAreaEditor/missionAreaEditorGui.ed.cs diff --git a/Templates/Empty/game/tools/missionAreaEditor/missionAreaEditorGui.ed.gui b/Templates/BaseGame/game/tools/missionAreaEditor/missionAreaEditorGui.ed.gui similarity index 100% rename from Templates/Empty/game/tools/missionAreaEditor/missionAreaEditorGui.ed.gui rename to Templates/BaseGame/game/tools/missionAreaEditor/missionAreaEditorGui.ed.gui diff --git a/Templates/Empty/game/tools/navEditor/CreateNewNavMeshDlg.gui b/Templates/BaseGame/game/tools/navEditor/CreateNewNavMeshDlg.gui similarity index 100% rename from Templates/Empty/game/tools/navEditor/CreateNewNavMeshDlg.gui rename to Templates/BaseGame/game/tools/navEditor/CreateNewNavMeshDlg.gui diff --git a/Templates/Empty/game/tools/navEditor/NavEditorConsoleDlg.gui b/Templates/BaseGame/game/tools/navEditor/NavEditorConsoleDlg.gui similarity index 100% rename from Templates/Empty/game/tools/navEditor/NavEditorConsoleDlg.gui rename to Templates/BaseGame/game/tools/navEditor/NavEditorConsoleDlg.gui diff --git a/Templates/Empty/game/tools/navEditor/NavEditorGui.gui b/Templates/BaseGame/game/tools/navEditor/NavEditorGui.gui similarity index 100% rename from Templates/Empty/game/tools/navEditor/NavEditorGui.gui rename to Templates/BaseGame/game/tools/navEditor/NavEditorGui.gui diff --git a/Templates/Empty/game/tools/navEditor/NavEditorSettingsTab.gui b/Templates/BaseGame/game/tools/navEditor/NavEditorSettingsTab.gui similarity index 100% rename from Templates/Empty/game/tools/navEditor/NavEditorSettingsTab.gui rename to Templates/BaseGame/game/tools/navEditor/NavEditorSettingsTab.gui diff --git a/Templates/Empty/game/tools/navEditor/NavEditorToolbar.gui b/Templates/BaseGame/game/tools/navEditor/NavEditorToolbar.gui similarity index 100% rename from Templates/Empty/game/tools/navEditor/NavEditorToolbar.gui rename to Templates/BaseGame/game/tools/navEditor/NavEditorToolbar.gui diff --git a/Templates/Empty/game/tools/navEditor/done.wav b/Templates/BaseGame/game/tools/navEditor/done.wav similarity index 100% rename from Templates/Empty/game/tools/navEditor/done.wav rename to Templates/BaseGame/game/tools/navEditor/done.wav diff --git a/Templates/Empty/game/tools/navEditor/images/nav-cover_d.png b/Templates/BaseGame/game/tools/navEditor/images/nav-cover_d.png similarity index 100% rename from Templates/Empty/game/tools/navEditor/images/nav-cover_d.png rename to Templates/BaseGame/game/tools/navEditor/images/nav-cover_d.png diff --git a/Templates/Empty/game/tools/navEditor/images/nav-cover_h.png b/Templates/BaseGame/game/tools/navEditor/images/nav-cover_h.png similarity index 100% rename from Templates/Empty/game/tools/navEditor/images/nav-cover_h.png rename to Templates/BaseGame/game/tools/navEditor/images/nav-cover_h.png diff --git a/Templates/Empty/game/tools/navEditor/images/nav-cover_n.png b/Templates/BaseGame/game/tools/navEditor/images/nav-cover_n.png similarity index 100% rename from Templates/Empty/game/tools/navEditor/images/nav-cover_n.png rename to Templates/BaseGame/game/tools/navEditor/images/nav-cover_n.png diff --git a/Templates/Empty/game/tools/navEditor/images/nav-editor_d.png b/Templates/BaseGame/game/tools/navEditor/images/nav-editor_d.png similarity index 100% rename from Templates/Empty/game/tools/navEditor/images/nav-editor_d.png rename to Templates/BaseGame/game/tools/navEditor/images/nav-editor_d.png diff --git a/Templates/Empty/game/tools/navEditor/images/nav-editor_h.png b/Templates/BaseGame/game/tools/navEditor/images/nav-editor_h.png similarity index 100% rename from Templates/Empty/game/tools/navEditor/images/nav-editor_h.png rename to Templates/BaseGame/game/tools/navEditor/images/nav-editor_h.png diff --git a/Templates/Empty/game/tools/navEditor/images/nav-editor_n.png b/Templates/BaseGame/game/tools/navEditor/images/nav-editor_n.png similarity index 100% rename from Templates/Empty/game/tools/navEditor/images/nav-editor_n.png rename to Templates/BaseGame/game/tools/navEditor/images/nav-editor_n.png diff --git a/Templates/Empty/game/tools/navEditor/images/nav-link_d.png b/Templates/BaseGame/game/tools/navEditor/images/nav-link_d.png similarity index 100% rename from Templates/Empty/game/tools/navEditor/images/nav-link_d.png rename to Templates/BaseGame/game/tools/navEditor/images/nav-link_d.png diff --git a/Templates/Empty/game/tools/navEditor/images/nav-link_h.png b/Templates/BaseGame/game/tools/navEditor/images/nav-link_h.png similarity index 100% rename from Templates/Empty/game/tools/navEditor/images/nav-link_h.png rename to Templates/BaseGame/game/tools/navEditor/images/nav-link_h.png diff --git a/Templates/Empty/game/tools/navEditor/images/nav-link_n.png b/Templates/BaseGame/game/tools/navEditor/images/nav-link_n.png similarity index 100% rename from Templates/Empty/game/tools/navEditor/images/nav-link_n.png rename to Templates/BaseGame/game/tools/navEditor/images/nav-link_n.png diff --git a/Templates/Empty/game/tools/navEditor/main.cs b/Templates/BaseGame/game/tools/navEditor/main.cs similarity index 100% rename from Templates/Empty/game/tools/navEditor/main.cs rename to Templates/BaseGame/game/tools/navEditor/main.cs diff --git a/Templates/Empty/game/tools/navEditor/navEditor.cs b/Templates/BaseGame/game/tools/navEditor/navEditor.cs similarity index 100% rename from Templates/Empty/game/tools/navEditor/navEditor.cs rename to Templates/BaseGame/game/tools/navEditor/navEditor.cs diff --git a/Templates/Empty/game/tools/particleEditor/ParticleEditor.ed.gui b/Templates/BaseGame/game/tools/particleEditor/ParticleEditor.ed.gui similarity index 100% rename from Templates/Empty/game/tools/particleEditor/ParticleEditor.ed.gui rename to Templates/BaseGame/game/tools/particleEditor/ParticleEditor.ed.gui diff --git a/Templates/Empty/game/tools/particleEditor/images/play_btn_d.png b/Templates/BaseGame/game/tools/particleEditor/images/play_btn_d.png similarity index 100% rename from Templates/Empty/game/tools/particleEditor/images/play_btn_d.png rename to Templates/BaseGame/game/tools/particleEditor/images/play_btn_d.png diff --git a/Templates/Empty/game/tools/particleEditor/images/play_btn_h.png b/Templates/BaseGame/game/tools/particleEditor/images/play_btn_h.png similarity index 100% rename from Templates/Empty/game/tools/particleEditor/images/play_btn_h.png rename to Templates/BaseGame/game/tools/particleEditor/images/play_btn_h.png diff --git a/Templates/Empty/game/tools/particleEditor/images/play_btn_n.png b/Templates/BaseGame/game/tools/particleEditor/images/play_btn_n.png similarity index 100% rename from Templates/Empty/game/tools/particleEditor/images/play_btn_n.png rename to Templates/BaseGame/game/tools/particleEditor/images/play_btn_n.png diff --git a/Templates/Empty/game/tools/particleEditor/main.cs b/Templates/BaseGame/game/tools/particleEditor/main.cs similarity index 100% rename from Templates/Empty/game/tools/particleEditor/main.cs rename to Templates/BaseGame/game/tools/particleEditor/main.cs diff --git a/Templates/Empty/game/tools/particleEditor/particleEditor.ed.cs b/Templates/BaseGame/game/tools/particleEditor/particleEditor.ed.cs similarity index 100% rename from Templates/Empty/game/tools/particleEditor/particleEditor.ed.cs rename to Templates/BaseGame/game/tools/particleEditor/particleEditor.ed.cs diff --git a/Templates/Empty/game/tools/particleEditor/particleEditorUndo.ed.cs b/Templates/BaseGame/game/tools/particleEditor/particleEditorUndo.ed.cs similarity index 100% rename from Templates/Empty/game/tools/particleEditor/particleEditorUndo.ed.cs rename to Templates/BaseGame/game/tools/particleEditor/particleEditorUndo.ed.cs diff --git a/Templates/Empty/game/tools/particleEditor/particleEmitterEditor.ed.cs b/Templates/BaseGame/game/tools/particleEditor/particleEmitterEditor.ed.cs similarity index 100% rename from Templates/Empty/game/tools/particleEditor/particleEmitterEditor.ed.cs rename to Templates/BaseGame/game/tools/particleEditor/particleEmitterEditor.ed.cs diff --git a/Templates/Empty/game/tools/particleEditor/particleParticleEditor.ed.cs b/Templates/BaseGame/game/tools/particleEditor/particleParticleEditor.ed.cs similarity index 100% rename from Templates/Empty/game/tools/particleEditor/particleParticleEditor.ed.cs rename to Templates/BaseGame/game/tools/particleEditor/particleParticleEditor.ed.cs diff --git a/Templates/Empty/game/tools/physicsTools/main.cs b/Templates/BaseGame/game/tools/physicsTools/main.cs similarity index 100% rename from Templates/Empty/game/tools/physicsTools/main.cs rename to Templates/BaseGame/game/tools/physicsTools/main.cs diff --git a/Templates/Empty/game/core/fonts/.gitignore b/Templates/BaseGame/game/tools/resources/.gitignore similarity index 100% rename from Templates/Empty/game/core/fonts/.gitignore rename to Templates/BaseGame/game/tools/resources/.gitignore diff --git a/Templates/Empty/game/tools/riverEditor/RiverEditorGui.gui b/Templates/BaseGame/game/tools/riverEditor/RiverEditorGui.gui similarity index 100% rename from Templates/Empty/game/tools/riverEditor/RiverEditorGui.gui rename to Templates/BaseGame/game/tools/riverEditor/RiverEditorGui.gui diff --git a/Templates/Empty/game/tools/riverEditor/RiverEditorSettingsTab.gui b/Templates/BaseGame/game/tools/riverEditor/RiverEditorSettingsTab.gui similarity index 100% rename from Templates/Empty/game/tools/riverEditor/RiverEditorSettingsTab.gui rename to Templates/BaseGame/game/tools/riverEditor/RiverEditorSettingsTab.gui diff --git a/Templates/Empty/game/tools/riverEditor/RiverEditorToolbar.gui b/Templates/BaseGame/game/tools/riverEditor/RiverEditorToolbar.gui similarity index 100% rename from Templates/Empty/game/tools/riverEditor/RiverEditorToolbar.gui rename to Templates/BaseGame/game/tools/riverEditor/RiverEditorToolbar.gui diff --git a/Templates/Empty/game/tools/riverEditor/main.cs b/Templates/BaseGame/game/tools/riverEditor/main.cs similarity index 100% rename from Templates/Empty/game/tools/riverEditor/main.cs rename to Templates/BaseGame/game/tools/riverEditor/main.cs diff --git a/Templates/Empty/game/tools/riverEditor/riverEditor.cs b/Templates/BaseGame/game/tools/riverEditor/riverEditor.cs similarity index 100% rename from Templates/Empty/game/tools/riverEditor/riverEditor.cs rename to Templates/BaseGame/game/tools/riverEditor/riverEditor.cs diff --git a/Templates/Empty/game/tools/riverEditor/riverEditorGui.cs b/Templates/BaseGame/game/tools/riverEditor/riverEditorGui.cs similarity index 100% rename from Templates/Empty/game/tools/riverEditor/riverEditorGui.cs rename to Templates/BaseGame/game/tools/riverEditor/riverEditorGui.cs diff --git a/Templates/Empty/game/tools/roadEditor/RoadEditorGui.gui b/Templates/BaseGame/game/tools/roadEditor/RoadEditorGui.gui similarity index 100% rename from Templates/Empty/game/tools/roadEditor/RoadEditorGui.gui rename to Templates/BaseGame/game/tools/roadEditor/RoadEditorGui.gui diff --git a/Templates/Empty/game/tools/roadEditor/RoadEditorSettingsTab.gui b/Templates/BaseGame/game/tools/roadEditor/RoadEditorSettingsTab.gui similarity index 100% rename from Templates/Empty/game/tools/roadEditor/RoadEditorSettingsTab.gui rename to Templates/BaseGame/game/tools/roadEditor/RoadEditorSettingsTab.gui diff --git a/Templates/Empty/game/tools/roadEditor/RoadEditorToolbar.gui b/Templates/BaseGame/game/tools/roadEditor/RoadEditorToolbar.gui similarity index 100% rename from Templates/Empty/game/tools/roadEditor/RoadEditorToolbar.gui rename to Templates/BaseGame/game/tools/roadEditor/RoadEditorToolbar.gui diff --git a/Templates/Empty/game/tools/roadEditor/main.cs b/Templates/BaseGame/game/tools/roadEditor/main.cs similarity index 100% rename from Templates/Empty/game/tools/roadEditor/main.cs rename to Templates/BaseGame/game/tools/roadEditor/main.cs diff --git a/Templates/Empty/game/tools/roadEditor/roadEditor.cs b/Templates/BaseGame/game/tools/roadEditor/roadEditor.cs similarity index 100% rename from Templates/Empty/game/tools/roadEditor/roadEditor.cs rename to Templates/BaseGame/game/tools/roadEditor/roadEditor.cs diff --git a/Templates/Empty/game/tools/roadEditor/roadEditorGui.cs b/Templates/BaseGame/game/tools/roadEditor/roadEditorGui.cs similarity index 100% rename from Templates/Empty/game/tools/roadEditor/roadEditorGui.cs rename to Templates/BaseGame/game/tools/roadEditor/roadEditorGui.cs diff --git a/Templates/BaseGame/game/tools/settings.xml b/Templates/BaseGame/game/tools/settings.xml new file mode 100644 index 000000000..761b16978 --- /dev/null +++ b/Templates/BaseGame/game/tools/settings.xml @@ -0,0 +1,90 @@ + + + + 100 + 0 + 0.8 + 1 + 15 + 0.8 + 0 + + 500 + 255 255 255 20 + 0 + 0 + 10 10 10 + 0 + + + + screenCenter + 0 + 50 + WorldEditorInspectorPlugin + 40 + 6 + 1 + + 0 + 0 + 0 + 100 + 2 + 1 + 1 + + + http://www.garagegames.com/products/torque-3d/documentation/user + ../../../Documentation/Official Documentation.html + http://www.garagegames.com/products/torque-3d/forums + ../../../Documentation/Torque 3D - Script Manual.chm + + + 255 255 255 100 + 1 + 102 102 102 100 + 51 51 51 100 + 0 + + + tools/worldEditor/images/LockedHandle + tools/worldEditor/images/DefaultHandle + tools/worldEditor/images/SelectHandle + + + 1 + 1 + 1 + 1 + 1 + + + 0 255 0 255 + 100 100 100 255 + 255 255 255 255 + 255 0 0 255 + 255 255 0 255 + 0 0 255 255 + 255 255 0 255 + + + 8 + 1 + 0 + 255 + 20 + + + + data/FPSGameplay/levels + + + 25 + + + + + AIPlayer + + diff --git a/Templates/Empty/game/tools/shapeEditor/gui/Profiles.ed.cs b/Templates/BaseGame/game/tools/shapeEditor/gui/Profiles.ed.cs similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/gui/Profiles.ed.cs rename to Templates/BaseGame/game/tools/shapeEditor/gui/Profiles.ed.cs diff --git a/Templates/Empty/game/tools/shapeEditor/gui/ShapeEditorSettingsTab.gui b/Templates/BaseGame/game/tools/shapeEditor/gui/ShapeEditorSettingsTab.gui similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/gui/ShapeEditorSettingsTab.gui rename to Templates/BaseGame/game/tools/shapeEditor/gui/ShapeEditorSettingsTab.gui diff --git a/Templates/Empty/game/tools/shapeEditor/gui/ShapeEditorToolbar.ed.gui b/Templates/BaseGame/game/tools/shapeEditor/gui/ShapeEditorToolbar.ed.gui similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/gui/ShapeEditorToolbar.ed.gui rename to Templates/BaseGame/game/tools/shapeEditor/gui/ShapeEditorToolbar.ed.gui diff --git a/Templates/Empty/game/tools/shapeEditor/gui/shapeEdAdvancedWindow.ed.gui b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAdvancedWindow.ed.gui similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/gui/shapeEdAdvancedWindow.ed.gui rename to Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAdvancedWindow.ed.gui diff --git a/Templates/Empty/game/tools/shapeEditor/gui/shapeEdAnimWindow.ed.gui b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAnimWindow.ed.gui similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/gui/shapeEdAnimWindow.ed.gui rename to Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAnimWindow.ed.gui diff --git a/Templates/Empty/game/tools/shapeEditor/gui/shapeEdPreviewWindow.ed.gui b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdPreviewWindow.ed.gui similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/gui/shapeEdPreviewWindow.ed.gui rename to Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdPreviewWindow.ed.gui diff --git a/Templates/Empty/game/tools/shapeEditor/gui/shapeEdPropWindow.ed.gui b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdPropWindow.ed.gui similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/gui/shapeEdPropWindow.ed.gui rename to Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdPropWindow.ed.gui diff --git a/Templates/Empty/game/tools/shapeEditor/gui/shapeEdSelectWindow.ed.gui b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdSelectWindow.ed.gui similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/gui/shapeEdSelectWindow.ed.gui rename to Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdSelectWindow.ed.gui diff --git a/Templates/Empty/game/tools/shapeEditor/images/back_btn_d.png b/Templates/BaseGame/game/tools/shapeEditor/images/back_btn_d.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/back_btn_d.png rename to Templates/BaseGame/game/tools/shapeEditor/images/back_btn_d.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/back_btn_h.png b/Templates/BaseGame/game/tools/shapeEditor/images/back_btn_h.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/back_btn_h.png rename to Templates/BaseGame/game/tools/shapeEditor/images/back_btn_h.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/back_btn_n.png b/Templates/BaseGame/game/tools/shapeEditor/images/back_btn_n.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/back_btn_n.png rename to Templates/BaseGame/game/tools/shapeEditor/images/back_btn_n.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/collision-shape_d.png b/Templates/BaseGame/game/tools/shapeEditor/images/collision-shape_d.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/collision-shape_d.png rename to Templates/BaseGame/game/tools/shapeEditor/images/collision-shape_d.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/collision-shape_h.png b/Templates/BaseGame/game/tools/shapeEditor/images/collision-shape_h.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/collision-shape_h.png rename to Templates/BaseGame/game/tools/shapeEditor/images/collision-shape_h.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/collision-shape_n.png b/Templates/BaseGame/game/tools/shapeEditor/images/collision-shape_n.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/collision-shape_n.png rename to Templates/BaseGame/game/tools/shapeEditor/images/collision-shape_n.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/detail-levels_btn_d.png b/Templates/BaseGame/game/tools/shapeEditor/images/detail-levels_btn_d.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/detail-levels_btn_d.png rename to Templates/BaseGame/game/tools/shapeEditor/images/detail-levels_btn_d.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/detail-levels_btn_h.png b/Templates/BaseGame/game/tools/shapeEditor/images/detail-levels_btn_h.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/detail-levels_btn_h.png rename to Templates/BaseGame/game/tools/shapeEditor/images/detail-levels_btn_h.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/detail-levels_btn_n.png b/Templates/BaseGame/game/tools/shapeEditor/images/detail-levels_btn_n.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/detail-levels_btn_n.png rename to Templates/BaseGame/game/tools/shapeEditor/images/detail-levels_btn_n.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/fwd_btn_d.png b/Templates/BaseGame/game/tools/shapeEditor/images/fwd_btn_d.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/fwd_btn_d.png rename to Templates/BaseGame/game/tools/shapeEditor/images/fwd_btn_d.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/fwd_btn_h.png b/Templates/BaseGame/game/tools/shapeEditor/images/fwd_btn_h.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/fwd_btn_h.png rename to Templates/BaseGame/game/tools/shapeEditor/images/fwd_btn_h.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/fwd_btn_n.png b/Templates/BaseGame/game/tools/shapeEditor/images/fwd_btn_n.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/fwd_btn_n.png rename to Templates/BaseGame/game/tools/shapeEditor/images/fwd_btn_n.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/ghost_btn_d.png b/Templates/BaseGame/game/tools/shapeEditor/images/ghost_btn_d.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/ghost_btn_d.png rename to Templates/BaseGame/game/tools/shapeEditor/images/ghost_btn_d.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/ghost_btn_h.png b/Templates/BaseGame/game/tools/shapeEditor/images/ghost_btn_h.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/ghost_btn_h.png rename to Templates/BaseGame/game/tools/shapeEditor/images/ghost_btn_h.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/ghost_btn_n.png b/Templates/BaseGame/game/tools/shapeEditor/images/ghost_btn_n.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/ghost_btn_n.png rename to Templates/BaseGame/game/tools/shapeEditor/images/ghost_btn_n.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/highlight_material.png b/Templates/BaseGame/game/tools/shapeEditor/images/highlight_material.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/highlight_material.png rename to Templates/BaseGame/game/tools/shapeEditor/images/highlight_material.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/object-bounds_d.png b/Templates/BaseGame/game/tools/shapeEditor/images/object-bounds_d.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/object-bounds_d.png rename to Templates/BaseGame/game/tools/shapeEditor/images/object-bounds_d.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/object-bounds_h.png b/Templates/BaseGame/game/tools/shapeEditor/images/object-bounds_h.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/object-bounds_h.png rename to Templates/BaseGame/game/tools/shapeEditor/images/object-bounds_h.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/object-bounds_n.png b/Templates/BaseGame/game/tools/shapeEditor/images/object-bounds_n.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/object-bounds_n.png rename to Templates/BaseGame/game/tools/shapeEditor/images/object-bounds_n.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/object-fit-bounds_d.png b/Templates/BaseGame/game/tools/shapeEditor/images/object-fit-bounds_d.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/object-fit-bounds_d.png rename to Templates/BaseGame/game/tools/shapeEditor/images/object-fit-bounds_d.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/object-fit-bounds_h.png b/Templates/BaseGame/game/tools/shapeEditor/images/object-fit-bounds_h.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/object-fit-bounds_h.png rename to Templates/BaseGame/game/tools/shapeEditor/images/object-fit-bounds_h.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/object-fit-bounds_n.png b/Templates/BaseGame/game/tools/shapeEditor/images/object-fit-bounds_n.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/object-fit-bounds_n.png rename to Templates/BaseGame/game/tools/shapeEditor/images/object-fit-bounds_n.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/pause_btn_d.png b/Templates/BaseGame/game/tools/shapeEditor/images/pause_btn_d.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/pause_btn_d.png rename to Templates/BaseGame/game/tools/shapeEditor/images/pause_btn_d.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/pause_btn_h.png b/Templates/BaseGame/game/tools/shapeEditor/images/pause_btn_h.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/pause_btn_h.png rename to Templates/BaseGame/game/tools/shapeEditor/images/pause_btn_h.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/pause_btn_n.png b/Templates/BaseGame/game/tools/shapeEditor/images/pause_btn_n.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/pause_btn_n.png rename to Templates/BaseGame/game/tools/shapeEditor/images/pause_btn_n.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/pingpong_btn_d.png b/Templates/BaseGame/game/tools/shapeEditor/images/pingpong_btn_d.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/pingpong_btn_d.png rename to Templates/BaseGame/game/tools/shapeEditor/images/pingpong_btn_d.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/pingpong_btn_h.png b/Templates/BaseGame/game/tools/shapeEditor/images/pingpong_btn_h.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/pingpong_btn_h.png rename to Templates/BaseGame/game/tools/shapeEditor/images/pingpong_btn_h.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/pingpong_btn_n.png b/Templates/BaseGame/game/tools/shapeEditor/images/pingpong_btn_n.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/pingpong_btn_n.png rename to Templates/BaseGame/game/tools/shapeEditor/images/pingpong_btn_n.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/playbkwd_btn_d.png b/Templates/BaseGame/game/tools/shapeEditor/images/playbkwd_btn_d.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/playbkwd_btn_d.png rename to Templates/BaseGame/game/tools/shapeEditor/images/playbkwd_btn_d.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/playbkwd_btn_h.png b/Templates/BaseGame/game/tools/shapeEditor/images/playbkwd_btn_h.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/playbkwd_btn_h.png rename to Templates/BaseGame/game/tools/shapeEditor/images/playbkwd_btn_h.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/playbkwd_btn_n.png b/Templates/BaseGame/game/tools/shapeEditor/images/playbkwd_btn_n.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/playbkwd_btn_n.png rename to Templates/BaseGame/game/tools/shapeEditor/images/playbkwd_btn_n.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/playfwd_btn_d.png b/Templates/BaseGame/game/tools/shapeEditor/images/playfwd_btn_d.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/playfwd_btn_d.png rename to Templates/BaseGame/game/tools/shapeEditor/images/playfwd_btn_d.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/playfwd_btn_h.png b/Templates/BaseGame/game/tools/shapeEditor/images/playfwd_btn_h.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/playfwd_btn_h.png rename to Templates/BaseGame/game/tools/shapeEditor/images/playfwd_btn_h.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/playfwd_btn_n.png b/Templates/BaseGame/game/tools/shapeEditor/images/playfwd_btn_n.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/playfwd_btn_n.png rename to Templates/BaseGame/game/tools/shapeEditor/images/playfwd_btn_n.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/seq_bar-in_d.png b/Templates/BaseGame/game/tools/shapeEditor/images/seq_bar-in_d.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/seq_bar-in_d.png rename to Templates/BaseGame/game/tools/shapeEditor/images/seq_bar-in_d.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/seq_bar-in_h.png b/Templates/BaseGame/game/tools/shapeEditor/images/seq_bar-in_h.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/seq_bar-in_h.png rename to Templates/BaseGame/game/tools/shapeEditor/images/seq_bar-in_h.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/seq_bar-in_n.png b/Templates/BaseGame/game/tools/shapeEditor/images/seq_bar-in_n.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/seq_bar-in_n.png rename to Templates/BaseGame/game/tools/shapeEditor/images/seq_bar-in_n.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/seq_bar-out_d.png b/Templates/BaseGame/game/tools/shapeEditor/images/seq_bar-out_d.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/seq_bar-out_d.png rename to Templates/BaseGame/game/tools/shapeEditor/images/seq_bar-out_d.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/seq_bar-out_h.png b/Templates/BaseGame/game/tools/shapeEditor/images/seq_bar-out_h.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/seq_bar-out_h.png rename to Templates/BaseGame/game/tools/shapeEditor/images/seq_bar-out_h.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/seq_bar-out_n.png b/Templates/BaseGame/game/tools/shapeEditor/images/seq_bar-out_n.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/seq_bar-out_n.png rename to Templates/BaseGame/game/tools/shapeEditor/images/seq_bar-out_n.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/show-wireframe_d.png b/Templates/BaseGame/game/tools/shapeEditor/images/show-wireframe_d.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/show-wireframe_d.png rename to Templates/BaseGame/game/tools/shapeEditor/images/show-wireframe_d.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/show-wireframe_h.png b/Templates/BaseGame/game/tools/shapeEditor/images/show-wireframe_h.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/show-wireframe_h.png rename to Templates/BaseGame/game/tools/shapeEditor/images/show-wireframe_h.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/show-wireframe_n.png b/Templates/BaseGame/game/tools/shapeEditor/images/show-wireframe_n.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/show-wireframe_n.png rename to Templates/BaseGame/game/tools/shapeEditor/images/show-wireframe_n.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/shownodes_btn_d.png b/Templates/BaseGame/game/tools/shapeEditor/images/shownodes_btn_d.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/shownodes_btn_d.png rename to Templates/BaseGame/game/tools/shapeEditor/images/shownodes_btn_d.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/shownodes_btn_h.png b/Templates/BaseGame/game/tools/shapeEditor/images/shownodes_btn_h.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/shownodes_btn_h.png rename to Templates/BaseGame/game/tools/shapeEditor/images/shownodes_btn_h.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/shownodes_btn_n.png b/Templates/BaseGame/game/tools/shapeEditor/images/shownodes_btn_n.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/shownodes_btn_n.png rename to Templates/BaseGame/game/tools/shapeEditor/images/shownodes_btn_n.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/stepback_btn_d.png b/Templates/BaseGame/game/tools/shapeEditor/images/stepback_btn_d.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/stepback_btn_d.png rename to Templates/BaseGame/game/tools/shapeEditor/images/stepback_btn_d.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/stepback_btn_h.png b/Templates/BaseGame/game/tools/shapeEditor/images/stepback_btn_h.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/stepback_btn_h.png rename to Templates/BaseGame/game/tools/shapeEditor/images/stepback_btn_h.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/stepback_btn_n.png b/Templates/BaseGame/game/tools/shapeEditor/images/stepback_btn_n.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/stepback_btn_n.png rename to Templates/BaseGame/game/tools/shapeEditor/images/stepback_btn_n.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/stepfwd_btn_d.png b/Templates/BaseGame/game/tools/shapeEditor/images/stepfwd_btn_d.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/stepfwd_btn_d.png rename to Templates/BaseGame/game/tools/shapeEditor/images/stepfwd_btn_d.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/stepfwd_btn_h.png b/Templates/BaseGame/game/tools/shapeEditor/images/stepfwd_btn_h.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/stepfwd_btn_h.png rename to Templates/BaseGame/game/tools/shapeEditor/images/stepfwd_btn_h.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/stepfwd_btn_n.png b/Templates/BaseGame/game/tools/shapeEditor/images/stepfwd_btn_n.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/stepfwd_btn_n.png rename to Templates/BaseGame/game/tools/shapeEditor/images/stepfwd_btn_n.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/sun-btn_d.png b/Templates/BaseGame/game/tools/shapeEditor/images/sun-btn_d.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/sun-btn_d.png rename to Templates/BaseGame/game/tools/shapeEditor/images/sun-btn_d.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/sun-btn_h.png b/Templates/BaseGame/game/tools/shapeEditor/images/sun-btn_h.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/sun-btn_h.png rename to Templates/BaseGame/game/tools/shapeEditor/images/sun-btn_h.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/sun-btn_n.png b/Templates/BaseGame/game/tools/shapeEditor/images/sun-btn_n.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/sun-btn_n.png rename to Templates/BaseGame/game/tools/shapeEditor/images/sun-btn_n.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/transition_slider.png b/Templates/BaseGame/game/tools/shapeEditor/images/transition_slider.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/transition_slider.png rename to Templates/BaseGame/game/tools/shapeEditor/images/transition_slider.png diff --git a/Templates/Empty/game/tools/shapeEditor/images/trigger_marker.png b/Templates/BaseGame/game/tools/shapeEditor/images/trigger_marker.png similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/images/trigger_marker.png rename to Templates/BaseGame/game/tools/shapeEditor/images/trigger_marker.png diff --git a/Templates/Empty/game/tools/shapeEditor/main.cs b/Templates/BaseGame/game/tools/shapeEditor/main.cs similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/main.cs rename to Templates/BaseGame/game/tools/shapeEditor/main.cs diff --git a/Templates/Empty/game/tools/shapeEditor/scripts/shapeEditor.ed.cs b/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.cs similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/scripts/shapeEditor.ed.cs rename to Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.cs diff --git a/Templates/Empty/game/tools/shapeEditor/scripts/shapeEditorActions.ed.cs b/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditorActions.ed.cs similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/scripts/shapeEditorActions.ed.cs rename to Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditorActions.ed.cs diff --git a/Templates/Empty/game/tools/shapeEditor/scripts/shapeEditorHints.ed.cs b/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditorHints.ed.cs similarity index 100% rename from Templates/Empty/game/tools/shapeEditor/scripts/shapeEditorHints.ed.cs rename to Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditorHints.ed.cs diff --git a/Templates/Empty/game/tools/worldEditor/gui/AddFMODProjectDlg.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/AddFMODProjectDlg.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/AddFMODProjectDlg.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/AddFMODProjectDlg.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/AxisGizmoSettingsTab.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/AxisGizmoSettingsTab.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/AxisGizmoSettingsTab.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/AxisGizmoSettingsTab.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/CameraSettingsTab.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/CameraSettingsTab.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/CameraSettingsTab.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/CameraSettingsTab.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/EditorChooseLevelGui.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/EditorChooseLevelGui.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/EditorChooseLevelGui.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/EditorChooseLevelGui.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/EditorGui.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/EditorGui.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/EditorGui.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/EditorGui.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/EditorSettingsWindow.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/EditorSettingsWindow.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/EditorSettingsWindow.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/EditorSettingsWindow.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/GeneralSettingsTab.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/GeneralSettingsTab.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/GeneralSettingsTab.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/GeneralSettingsTab.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/GenericPromptDialog.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/GenericPromptDialog.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/GenericPromptDialog.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/GenericPromptDialog.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/ManageBookmarksWindow.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ManageBookmarksWindow.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/ManageBookmarksWindow.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/ManageBookmarksWindow.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/ManageSFXParametersWindow.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ManageSFXParametersWindow.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/ManageSFXParametersWindow.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/ManageSFXParametersWindow.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/ObjectEditorSettingsTab.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ObjectEditorSettingsTab.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/ObjectEditorSettingsTab.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/ObjectEditorSettingsTab.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/ObjectSnapOptionsWindow.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ObjectSnapOptionsWindow.ed.gui similarity index 98% rename from Templates/Empty/game/tools/worldEditor/gui/ObjectSnapOptionsWindow.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/ObjectSnapOptionsWindow.ed.gui index 24f5c8172..64332f8a3 100644 --- a/Templates/Empty/game/tools/worldEditor/gui/ObjectSnapOptionsWindow.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ObjectSnapOptionsWindow.ed.gui @@ -28,7 +28,7 @@ canMinimize = "0"; canMaximize = "0"; position = "400 31"; - extent =" 175 257"; + extent =" 175 267"; MinExtent = "175 130"; text = "Snap Options"; closeCommand = "ESnapOptions.hideDialog();"; @@ -51,7 +51,7 @@ Visible = "1"; hovertime = "1000"; Docking = "Client"; - Margin = "3 22 3 3"; + Margin = "3 32 3 3"; Padding = "0 0 0 0"; AnchorTop = "1"; AnchorBottom = "0"; @@ -793,6 +793,25 @@ canSave = "1"; canSaveDynamicFields = "0"; }; + new GuiCheckBoxCtrl() { + text = "Use Group Center"; + groupNum = "1"; + useMouseEvents = "0"; + isContainer = "0"; + horizSizing = "right"; + vertSizing = "top"; + position = "4 246"; + extent = "105 24"; + minExtent = "8 8"; + visible = "1"; + active = "1"; + command = "toggleSnappingOptions(\"byGroup\");"; + tooltipProfile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "GroupSnapButton"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; new GuiTextCtrl() { text = "Size"; maxLength = "1024"; diff --git a/Templates/Empty/game/tools/worldEditor/gui/ProceduralTerrainPainterGui.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ProceduralTerrainPainterGui.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/ProceduralTerrainPainterGui.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/ProceduralTerrainPainterGui.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/SelectObjectsWindow.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/SelectObjectsWindow.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/SelectObjectsWindow.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/SelectObjectsWindow.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/TerrainBrushSoftnessCurveDlg.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainBrushSoftnessCurveDlg.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/TerrainBrushSoftnessCurveDlg.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/TerrainBrushSoftnessCurveDlg.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/TerrainEditToolbar.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainEditToolbar.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/TerrainEditToolbar.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/TerrainEditToolbar.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/TerrainEditorSettingsTab.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainEditorSettingsTab.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/TerrainEditorSettingsTab.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/TerrainEditorSettingsTab.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/TerrainEditorVSettingsGui.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainEditorVSettingsGui.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/TerrainEditorVSettingsGui.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/TerrainEditorVSettingsGui.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/TerrainPainterToolbar.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainPainterToolbar.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/TerrainPainterToolbar.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/TerrainPainterToolbar.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/TerrainPainterWindow.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainPainterWindow.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/TerrainPainterWindow.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/TerrainPainterWindow.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/TimeAdjustGui.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/TimeAdjustGui.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/TimeAdjustGui.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/TimeAdjustGui.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/ToolsPaletteGroups/ConvexEditorPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ConvexEditorPalette.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/ToolsPaletteGroups/ConvexEditorPalette.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ConvexEditorPalette.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/ToolsPaletteGroups/DecalEditorPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/DecalEditorPalette.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/ToolsPaletteGroups/DecalEditorPalette.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/DecalEditorPalette.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/ToolsPaletteGroups/ForestEditorPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ForestEditorPalette.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/ToolsPaletteGroups/ForestEditorPalette.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ForestEditorPalette.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/ToolsPaletteGroups/MeshRoadEditorPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/MeshRoadEditorPalette.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/ToolsPaletteGroups/MeshRoadEditorPalette.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/MeshRoadEditorPalette.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/ToolsPaletteGroups/NavEditorPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/NavEditorPalette.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/ToolsPaletteGroups/NavEditorPalette.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/NavEditorPalette.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/ToolsPaletteGroups/RiverEditorPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/RiverEditorPalette.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/ToolsPaletteGroups/RiverEditorPalette.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/RiverEditorPalette.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/ToolsPaletteGroups/RoadEditorPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/RoadEditorPalette.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/ToolsPaletteGroups/RoadEditorPalette.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/RoadEditorPalette.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/ToolsPaletteGroups/ShapeEditorPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ShapeEditorPalette.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/ToolsPaletteGroups/ShapeEditorPalette.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ShapeEditorPalette.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/ToolsPaletteGroups/TerrainEditPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/TerrainEditPalette.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/ToolsPaletteGroups/TerrainEditPalette.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/TerrainEditPalette.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/ToolsPaletteGroups/TerrainPainterPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/TerrainPainterPalette.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/ToolsPaletteGroups/TerrainPainterPalette.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/TerrainPainterPalette.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/ToolsPaletteGroups/WorldEditorPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/WorldEditorPalette.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/ToolsPaletteGroups/WorldEditorPalette.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/WorldEditorPalette.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/ToolsPaletteGroups/init.cs b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/init.cs similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/ToolsPaletteGroups/init.cs rename to Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/init.cs diff --git a/Templates/Empty/game/tools/worldEditor/gui/ToolsPaletteWindow.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteWindow.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/ToolsPaletteWindow.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteWindow.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/ToolsToolbar.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsToolbar.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/ToolsToolbar.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/ToolsToolbar.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/TransformSelectionWindow.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/TransformSelectionWindow.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/TransformSelectionWindow.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/TransformSelectionWindow.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/VisibilityLayerWindow.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/VisibilityLayerWindow.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/VisibilityLayerWindow.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/VisibilityLayerWindow.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/WorldEditorInspectorWindow.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorInspectorWindow.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/WorldEditorInspectorWindow.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorInspectorWindow.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/WorldEditorToolbar.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorToolbar.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/WorldEditorToolbar.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorToolbar.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/WorldEditorTreeWindow.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorTreeWindow.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/WorldEditorTreeWindow.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorTreeWindow.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/guiCreateNewTerrainGui.gui b/Templates/BaseGame/game/tools/worldEditor/gui/guiCreateNewTerrainGui.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/guiCreateNewTerrainGui.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/guiCreateNewTerrainGui.gui diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/guiTerrainEditorToolbar.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/guiTerrainEditorToolbar.ed.gui new file mode 100644 index 000000000..e69de29bb diff --git a/Templates/Empty/game/tools/worldEditor/gui/guiTerrainExportGui.gui b/Templates/BaseGame/game/tools/worldEditor/gui/guiTerrainExportGui.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/guiTerrainExportGui.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/guiTerrainExportGui.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/guiTerrainImportGui.gui b/Templates/BaseGame/game/tools/worldEditor/gui/guiTerrainImportGui.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/guiTerrainImportGui.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/guiTerrainImportGui.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/guiTerrainMaterialDlg.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/guiTerrainMaterialDlg.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/guiTerrainMaterialDlg.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/guiTerrainMaterialDlg.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/guiWorldEditorCreatorWindow.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/guiWorldEditorCreatorWindow.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/guiWorldEditorCreatorWindow.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/guiWorldEditorCreatorWindow.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/guiWorldEditorMissionInspector.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/guiWorldEditorMissionInspector.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/guiWorldEditorMissionInspector.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/guiWorldEditorMissionInspector.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/objectBuilderGui.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/objectBuilderGui.ed.gui similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/objectBuilderGui.ed.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/objectBuilderGui.ed.gui diff --git a/Templates/Empty/game/tools/worldEditor/gui/profiles.ed.cs b/Templates/BaseGame/game/tools/worldEditor/gui/profiles.ed.cs similarity index 100% rename from Templates/Empty/game/tools/worldEditor/gui/profiles.ed.cs rename to Templates/BaseGame/game/tools/worldEditor/gui/profiles.ed.cs diff --git a/Templates/Empty/game/core/scripts/client/lighting/advanced/shadowViz.gui b/Templates/BaseGame/game/tools/worldEditor/gui/shadowViz.gui similarity index 100% rename from Templates/Empty/game/core/scripts/client/lighting/advanced/shadowViz.gui rename to Templates/BaseGame/game/tools/worldEditor/gui/shadowViz.gui diff --git a/Templates/Empty/game/tools/worldEditor/images/CUR_3darrow.png b/Templates/BaseGame/game/tools/worldEditor/images/CUR_3darrow.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/CUR_3darrow.png rename to Templates/BaseGame/game/tools/worldEditor/images/CUR_3darrow.png diff --git a/Templates/Empty/game/tools/worldEditor/images/CUR_3ddiagleft.png b/Templates/BaseGame/game/tools/worldEditor/images/CUR_3ddiagleft.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/CUR_3ddiagleft.png rename to Templates/BaseGame/game/tools/worldEditor/images/CUR_3ddiagleft.png diff --git a/Templates/Empty/game/tools/worldEditor/images/CUR_3ddiagright.png b/Templates/BaseGame/game/tools/worldEditor/images/CUR_3ddiagright.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/CUR_3ddiagright.png rename to Templates/BaseGame/game/tools/worldEditor/images/CUR_3ddiagright.png diff --git a/Templates/Empty/game/tools/worldEditor/images/CUR_3dleftright.png b/Templates/BaseGame/game/tools/worldEditor/images/CUR_3dleftright.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/CUR_3dleftright.png rename to Templates/BaseGame/game/tools/worldEditor/images/CUR_3dleftright.png diff --git a/Templates/Empty/game/tools/worldEditor/images/CUR_3dupdown.png b/Templates/BaseGame/game/tools/worldEditor/images/CUR_3dupdown.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/CUR_3dupdown.png rename to Templates/BaseGame/game/tools/worldEditor/images/CUR_3dupdown.png diff --git a/Templates/Empty/game/tools/worldEditor/images/CUR_grab.png b/Templates/BaseGame/game/tools/worldEditor/images/CUR_grab.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/CUR_grab.png rename to Templates/BaseGame/game/tools/worldEditor/images/CUR_grab.png diff --git a/Templates/Empty/game/tools/worldEditor/images/CUR_hand.png b/Templates/BaseGame/game/tools/worldEditor/images/CUR_hand.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/CUR_hand.png rename to Templates/BaseGame/game/tools/worldEditor/images/CUR_hand.png diff --git a/Templates/Empty/game/tools/worldEditor/images/CUR_rotate.png b/Templates/BaseGame/game/tools/worldEditor/images/CUR_rotate.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/CUR_rotate.png rename to Templates/BaseGame/game/tools/worldEditor/images/CUR_rotate.png diff --git a/Templates/Empty/game/tools/worldEditor/images/DefaultHandle.png b/Templates/BaseGame/game/tools/worldEditor/images/DefaultHandle.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/DefaultHandle.png rename to Templates/BaseGame/game/tools/worldEditor/images/DefaultHandle.png diff --git a/Templates/Empty/game/tools/worldEditor/images/LockedHandle.png b/Templates/BaseGame/game/tools/worldEditor/images/LockedHandle.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/LockedHandle.png rename to Templates/BaseGame/game/tools/worldEditor/images/LockedHandle.png diff --git a/Templates/Empty/game/tools/worldEditor/images/SelectHandle.png b/Templates/BaseGame/game/tools/worldEditor/images/SelectHandle.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/SelectHandle.png rename to Templates/BaseGame/game/tools/worldEditor/images/SelectHandle.png diff --git a/Templates/Empty/game/tools/worldEditor/images/boxBrush_d.PNG b/Templates/BaseGame/game/tools/worldEditor/images/boxBrush_d.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/boxBrush_d.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/boxBrush_d.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/boxBrush_h.PNG b/Templates/BaseGame/game/tools/worldEditor/images/boxBrush_h.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/boxBrush_h.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/boxBrush_h.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/boxBrush_n.PNG b/Templates/BaseGame/game/tools/worldEditor/images/boxBrush_n.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/boxBrush_n.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/boxBrush_n.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/brushAdjustHeight_d.PNG b/Templates/BaseGame/game/tools/worldEditor/images/brushAdjustHeight_d.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/brushAdjustHeight_d.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/brushAdjustHeight_d.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/brushAdjustHeight_h.PNG b/Templates/BaseGame/game/tools/worldEditor/images/brushAdjustHeight_h.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/brushAdjustHeight_h.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/brushAdjustHeight_h.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/brushAdjustHeight_n.png b/Templates/BaseGame/game/tools/worldEditor/images/brushAdjustHeight_n.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/brushAdjustHeight_n.png rename to Templates/BaseGame/game/tools/worldEditor/images/brushAdjustHeight_n.png diff --git a/Templates/Empty/game/tools/worldEditor/images/brushPaintNoise_d.png b/Templates/BaseGame/game/tools/worldEditor/images/brushPaintNoise_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/brushPaintNoise_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/brushPaintNoise_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/brushPaintNoise_h.png b/Templates/BaseGame/game/tools/worldEditor/images/brushPaintNoise_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/brushPaintNoise_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/brushPaintNoise_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/brushPaintNoise_n.png b/Templates/BaseGame/game/tools/worldEditor/images/brushPaintNoise_n.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/brushPaintNoise_n.png rename to Templates/BaseGame/game/tools/worldEditor/images/brushPaintNoise_n.png diff --git a/Templates/Empty/game/tools/worldEditor/images/brushThermalErosion.png b/Templates/BaseGame/game/tools/worldEditor/images/brushThermalErosion.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/brushThermalErosion.png rename to Templates/BaseGame/game/tools/worldEditor/images/brushThermalErosion.png diff --git a/Templates/Empty/game/tools/worldEditor/images/brushThermalErosion_d.png b/Templates/BaseGame/game/tools/worldEditor/images/brushThermalErosion_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/brushThermalErosion_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/brushThermalErosion_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/brushThermalErosion_h.png b/Templates/BaseGame/game/tools/worldEditor/images/brushThermalErosion_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/brushThermalErosion_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/brushThermalErosion_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/circleBrush_d.PNG b/Templates/BaseGame/game/tools/worldEditor/images/circleBrush_d.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/circleBrush_d.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/circleBrush_d.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/circleBrush_h.PNG b/Templates/BaseGame/game/tools/worldEditor/images/circleBrush_h.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/circleBrush_h.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/circleBrush_h.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/circleBrush_n.PNG b/Templates/BaseGame/game/tools/worldEditor/images/circleBrush_n.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/circleBrush_n.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/circleBrush_n.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/clearEmpty_d.PNG b/Templates/BaseGame/game/tools/worldEditor/images/clearEmpty_d.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/clearEmpty_d.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/clearEmpty_d.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/clearEmpty_h.PNG b/Templates/BaseGame/game/tools/worldEditor/images/clearEmpty_h.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/clearEmpty_h.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/clearEmpty_h.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/clearEmpty_n.PNG b/Templates/BaseGame/game/tools/worldEditor/images/clearEmpty_n.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/clearEmpty_n.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/clearEmpty_n.PNG diff --git a/Templates/Empty/game/core/scripts/client/lighting/advanced/depthviz.png b/Templates/BaseGame/game/tools/worldEditor/images/depthviz.png similarity index 100% rename from Templates/Empty/game/core/scripts/client/lighting/advanced/depthviz.png rename to Templates/BaseGame/game/tools/worldEditor/images/depthviz.png diff --git a/Templates/Empty/game/tools/worldEditor/images/flattenHeight_d.PNG b/Templates/BaseGame/game/tools/worldEditor/images/flattenHeight_d.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/flattenHeight_d.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/flattenHeight_d.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/flattenHeight_h.PNG b/Templates/BaseGame/game/tools/worldEditor/images/flattenHeight_h.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/flattenHeight_h.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/flattenHeight_h.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/flattenHeight_n.PNG b/Templates/BaseGame/game/tools/worldEditor/images/flattenHeight_n.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/flattenHeight_n.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/flattenHeight_n.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/lowerHeight_d.PNG b/Templates/BaseGame/game/tools/worldEditor/images/lowerHeight_d.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/lowerHeight_d.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/lowerHeight_d.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/lowerHeight_h.PNG b/Templates/BaseGame/game/tools/worldEditor/images/lowerHeight_h.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/lowerHeight_h.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/lowerHeight_h.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/lowerHeight_n.PNG b/Templates/BaseGame/game/tools/worldEditor/images/lowerHeight_n.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/lowerHeight_n.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/lowerHeight_n.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/maskBrush_d.PNG b/Templates/BaseGame/game/tools/worldEditor/images/maskBrush_d.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/maskBrush_d.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/maskBrush_d.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/maskBrush_h.PNG b/Templates/BaseGame/game/tools/worldEditor/images/maskBrush_h.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/maskBrush_h.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/maskBrush_h.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/maskBrush_n.PNG b/Templates/BaseGame/game/tools/worldEditor/images/maskBrush_n.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/maskBrush_n.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/maskBrush_n.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/raiseHeight_d.PNG b/Templates/BaseGame/game/tools/worldEditor/images/raiseHeight_d.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/raiseHeight_d.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/raiseHeight_d.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/raiseHeight_h.PNG b/Templates/BaseGame/game/tools/worldEditor/images/raiseHeight_h.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/raiseHeight_h.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/raiseHeight_h.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/raiseHeight_n.PNG b/Templates/BaseGame/game/tools/worldEditor/images/raiseHeight_n.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/raiseHeight_n.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/raiseHeight_n.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/add-mesh-road_d.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add-mesh-road_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/add-mesh-road_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/add-mesh-road_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/add-mesh-road_h.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add-mesh-road_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/add-mesh-road_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/add-mesh-road_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/add-mesh-road_n.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add-mesh-road_n.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/add-mesh-road_n.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/add-mesh-road_n.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/add-point_d.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add-point_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/add-point_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/add-point_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/add-point_h.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add-point_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/add-point_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/add-point_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/add-point_n.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add-point_n.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/add-point_n.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/add-point_n.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/add-river_d.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add-river_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/add-river_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/add-river_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/add-river_h.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add-river_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/add-river_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/add-river_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/add-river_n.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add-river_n.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/add-river_n.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/add-river_n.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/add-road-path_d.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add-road-path_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/add-road-path_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/add-road-path_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/add-road-path_h.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add-road-path_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/add-road-path_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/add-road-path_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/add-road-path_n.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add-road-path_n.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/add-road-path_n.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/add-road-path_n.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/menubar/show-spline_d.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show-spline_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/menubar/show-spline_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show-spline_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/menubar/show-spline_h.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show-spline_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/menubar/show-spline_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show-spline_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/menubar/show-spline_n.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show-spline_n.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/menubar/show-spline_n.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show-spline_n.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/menubar/show-texture_d.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show-texture_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/menubar/show-texture_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show-texture_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/menubar/show-texture_h.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show-texture_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/menubar/show-texture_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show-texture_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/menubar/show-texture_n.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show-texture_n.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/menubar/show-texture_n.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show-texture_n.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/menubar/show-wireframe_d.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show-wireframe_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/menubar/show-wireframe_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show-wireframe_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/menubar/show-wireframe_h.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show-wireframe_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/menubar/show-wireframe_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show-wireframe_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/menubar/show-wireframe_n.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show-wireframe_n.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/menubar/show-wireframe_n.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show-wireframe_n.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/move-point_d.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/move-point_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/move-point_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/move-point_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/move-point_h.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/move-point_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/move-point_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/move-point_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/move-point_n.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/move-point_n.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/move-point_n.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/move-point_n.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/rotate-point_d.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/rotate-point_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/rotate-point_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/rotate-point_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/rotate-point_h.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/rotate-point_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/rotate-point_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/rotate-point_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/rotate-point_n.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/rotate-point_n.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/rotate-point_n.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/rotate-point_n.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/scale-point_d.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/scale-point_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/scale-point_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/scale-point_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/scale-point_h.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/scale-point_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/scale-point_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/scale-point_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/scale-point_n.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/scale-point_n.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/scale-point_n.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/scale-point_n.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/subtract-point_d.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/subtract-point_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/subtract-point_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/subtract-point_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/subtract-point_h.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/subtract-point_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/subtract-point_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/subtract-point_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/road-river/subtract-point_n.png b/Templates/BaseGame/game/tools/worldEditor/images/road-river/subtract-point_n.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/road-river/subtract-point_n.png rename to Templates/BaseGame/game/tools/worldEditor/images/road-river/subtract-point_n.png diff --git a/Templates/Empty/game/tools/worldEditor/images/setEmpty_d.PNG b/Templates/BaseGame/game/tools/worldEditor/images/setEmpty_d.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/setEmpty_d.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/setEmpty_d.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/setEmpty_h.PNG b/Templates/BaseGame/game/tools/worldEditor/images/setEmpty_h.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/setEmpty_h.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/setEmpty_h.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/setEmpty_n.PNG b/Templates/BaseGame/game/tools/worldEditor/images/setEmpty_n.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/setEmpty_n.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/setEmpty_n.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/setHeight_d.PNG b/Templates/BaseGame/game/tools/worldEditor/images/setHeight_d.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/setHeight_d.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/setHeight_d.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/setHeight_h.PNG b/Templates/BaseGame/game/tools/worldEditor/images/setHeight_h.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/setHeight_h.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/setHeight_h.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/setHeight_n.PNG b/Templates/BaseGame/game/tools/worldEditor/images/setHeight_n.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/setHeight_n.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/setHeight_n.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/smoothHeight_d.PNG b/Templates/BaseGame/game/tools/worldEditor/images/smoothHeight_d.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/smoothHeight_d.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/smoothHeight_d.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/smoothHeight_h.PNG b/Templates/BaseGame/game/tools/worldEditor/images/smoothHeight_h.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/smoothHeight_h.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/smoothHeight_h.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/smoothHeight_n.PNG b/Templates/BaseGame/game/tools/worldEditor/images/smoothHeight_n.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/smoothHeight_n.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/smoothHeight_n.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/softCurve_d.PNG b/Templates/BaseGame/game/tools/worldEditor/images/softCurve_d.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/softCurve_d.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/softCurve_d.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/softCurve_h.PNG b/Templates/BaseGame/game/tools/worldEditor/images/softCurve_h.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/softCurve_h.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/softCurve_h.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/softCurve_n.PNG b/Templates/BaseGame/game/tools/worldEditor/images/softCurve_n.PNG similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/softCurve_n.PNG rename to Templates/BaseGame/game/tools/worldEditor/images/softCurve_n.PNG diff --git a/Templates/Empty/game/tools/worldEditor/images/terrainpainter/new_layer_icon.png b/Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/new_layer_icon.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/terrainpainter/new_layer_icon.png rename to Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/new_layer_icon.png diff --git a/Templates/Empty/game/tools/worldEditor/images/terrainpainter/terrain-painter-border-large.png b/Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/terrain-painter-border-large.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/terrainpainter/terrain-painter-border-large.png rename to Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/terrain-painter-border-large.png diff --git a/Templates/Empty/game/tools/worldEditor/images/terrainpainter/terrain-painter-border-new_h.png b/Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/terrain-painter-border-new_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/terrainpainter/terrain-painter-border-new_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/terrain-painter-border-new_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/terrainpainter/terrain-painter-border-new_n.png b/Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/terrain-painter-border-new_n.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/terrainpainter/terrain-painter-border-new_n.png rename to Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/terrain-painter-border-new_n.png diff --git a/Templates/Empty/game/tools/worldEditor/images/terrainpainter/terrain-painter-border_d.png b/Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/terrain-painter-border_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/terrainpainter/terrain-painter-border_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/terrain-painter-border_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/terrainpainter/terrain-painter-border_h.png b/Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/terrain-painter-border_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/terrainpainter/terrain-painter-border_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/terrain-painter-border_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/terrainpainter/terrain-painter-border_n.png b/Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/terrain-painter-border_n.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/terrainpainter/terrain-painter-border_n.png rename to Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/terrain-painter-border_n.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/3rd-person-camera_d.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/3rd-person-camera_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/3rd-person-camera_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/3rd-person-camera_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/3rd-person-camera_h.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/3rd-person-camera_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/3rd-person-camera_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/3rd-person-camera_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/3rd-person-camera_n.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/3rd-person-camera_n.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/3rd-person-camera_n.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/3rd-person-camera_n.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/camera_d.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/camera_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/camera_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/camera_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/camera_h.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/camera_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/camera_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/camera_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/camera_n.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/camera_n.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/camera_n.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/camera_n.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/datablock-editor_d.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/datablock-editor_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/datablock-editor_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/datablock-editor_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/datablock-editor_h.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/datablock-editor_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/datablock-editor_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/datablock-editor_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/datablock-editor_n.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/datablock-editor_n.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/datablock-editor_n.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/datablock-editor_n.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/gui.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/gui.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/gui.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/gui.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/gui_d.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/gui_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/gui_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/gui_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/gui_h.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/gui_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/gui_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/gui_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/matterial-editor_d.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/matterial-editor_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/matterial-editor_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/matterial-editor_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/matterial-editor_h.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/matterial-editor_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/matterial-editor_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/matterial-editor_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/matterial-editor_n.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/matterial-editor_n.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/matterial-editor_n.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/matterial-editor_n.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/mesh-road-editor_d.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/mesh-road-editor_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/mesh-road-editor_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/mesh-road-editor_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/mesh-road-editor_h.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/mesh-road-editor_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/mesh-road-editor_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/mesh-road-editor_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/mesh-road-editor_n.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/mesh-road-editor_n.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/mesh-road-editor_n.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/mesh-road-editor_n.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/missionarea-editor_d.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/missionarea-editor_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/missionarea-editor_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/missionarea-editor_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/missionarea-editor_h.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/missionarea-editor_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/missionarea-editor_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/missionarea-editor_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/missionarea-editor_n.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/missionarea-editor_n.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/missionarea-editor_n.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/missionarea-editor_n.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/paint-terrain_d.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/paint-terrain_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/paint-terrain_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/paint-terrain_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/paint-terrain_h.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/paint-terrain_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/paint-terrain_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/paint-terrain_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/paint-terrain_n.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/paint-terrain_n.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/paint-terrain_n.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/paint-terrain_n.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/particleeditor_d.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/particleeditor_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/particleeditor_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/particleeditor_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/particleeditor_h.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/particleeditor_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/particleeditor_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/particleeditor_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/particleeditor_n.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/particleeditor_n.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/particleeditor_n.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/particleeditor_n.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/playbutton_d.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/playbutton_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/playbutton_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/playbutton_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/playbutton_h.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/playbutton_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/playbutton_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/playbutton_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/playbutton_n.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/playbutton_n.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/playbutton_n.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/playbutton_n.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/player_d.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/player_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/player_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/player_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/player_h.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/player_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/player_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/player_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/player_n.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/player_n.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/player_n.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/player_n.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/river-editor_d.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/river-editor_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/river-editor_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/river-editor_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/river-editor_h.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/river-editor_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/river-editor_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/river-editor_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/river-editor_n.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/river-editor_n.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/river-editor_n.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/river-editor_n.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/road-path-editor_d.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/road-path-editor_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/road-path-editor_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/road-path-editor_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/road-path-editor_h.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/road-path-editor_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/road-path-editor_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/road-path-editor_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/road-path-editor_n.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/road-path-editor_n.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/road-path-editor_n.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/road-path-editor_n.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/sculpt-terrain_d.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/sculpt-terrain_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/sculpt-terrain_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/sculpt-terrain_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/sculpt-terrain_h.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/sculpt-terrain_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/sculpt-terrain_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/sculpt-terrain_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/sculpt-terrain_n.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/sculpt-terrain_n.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/sculpt-terrain_n.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/sculpt-terrain_n.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/shape-editor_d.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/shape-editor_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/shape-editor_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/shape-editor_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/shape-editor_h.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/shape-editor_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/shape-editor_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/shape-editor_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/shape-editor_n.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/shape-editor_n.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/shape-editor_n.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/shape-editor_n.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/transform-objects_d.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/transform-objects_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/transform-objects_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/transform-objects_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/transform-objects_h.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/transform-objects_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/transform-objects_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/transform-objects_h.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/transform-objects_n.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/transform-objects_n.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/transform-objects_n.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/transform-objects_n.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/world.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/world.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/world.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/world.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/world_d.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/world_d.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/world_d.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/world_d.png diff --git a/Templates/Empty/game/tools/worldEditor/images/toolbar/world_h.png b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/world_h.png similarity index 100% rename from Templates/Empty/game/tools/worldEditor/images/toolbar/world_h.png rename to Templates/BaseGame/game/tools/worldEditor/images/toolbar/world_h.png diff --git a/Templates/Empty/game/tools/worldEditor/main.cs b/Templates/BaseGame/game/tools/worldEditor/main.cs similarity index 96% rename from Templates/Empty/game/tools/worldEditor/main.cs rename to Templates/BaseGame/game/tools/worldEditor/main.cs index 59301ea53..8102438c6 100644 --- a/Templates/Empty/game/tools/worldEditor/main.cs +++ b/Templates/BaseGame/game/tools/worldEditor/main.cs @@ -43,12 +43,14 @@ function initializeWorldEditor() exec("./gui/AddFMODProjectDlg.ed.gui"); exec("./gui/SelectObjectsWindow.ed.gui"); exec("./gui/ProceduralTerrainPainterGui.gui" ); + exec("./gui/shadowViz.gui" ); // Load Scripts. exec("./scripts/menus.ed.cs"); exec("./scripts/menuHandlers.ed.cs"); exec("./scripts/editor.ed.cs"); - exec("./scripts/editor.bind.ed.cs"); + exec("./scripts/editorInputCommands.cs"); + exec("./scripts/editor.keybinds.cs"); exec("./scripts/undoManager.ed.cs"); exec("./scripts/lighting.ed.cs"); exec("./scripts/EditorGui.ed.cs"); @@ -61,6 +63,9 @@ function initializeWorldEditor() exec("./scripts/ManageSFXParametersWindow.ed.cs"); exec("./scripts/AddFMODProjectDlg.ed.cs"); exec("./scripts/SelectObjectsWindow.ed.cs"); + exec("./scripts/cameraCommands.ed.cs"); + exec("./scripts/lightViz.cs"); + exec("./scripts/shadowViz.cs"); // Load Custom Editors loadDirectory(expandFilename("./scripts/editors")); diff --git a/Templates/Empty/game/tools/worldEditor/scripts/AddFMODProjectDlg.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/AddFMODProjectDlg.ed.cs similarity index 100% rename from Templates/Empty/game/tools/worldEditor/scripts/AddFMODProjectDlg.ed.cs rename to Templates/BaseGame/game/tools/worldEditor/scripts/AddFMODProjectDlg.ed.cs diff --git a/Templates/Empty/game/tools/worldEditor/scripts/EditorChooseLevelGui.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/EditorChooseLevelGui.ed.cs similarity index 100% rename from Templates/Empty/game/tools/worldEditor/scripts/EditorChooseLevelGui.ed.cs rename to Templates/BaseGame/game/tools/worldEditor/scripts/EditorChooseLevelGui.ed.cs diff --git a/Templates/Empty/game/tools/worldEditor/scripts/EditorGui.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.cs similarity index 99% rename from Templates/Empty/game/tools/worldEditor/scripts/EditorGui.ed.cs rename to Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.cs index 31f794d17..bc1905292 100644 --- a/Templates/Empty/game/tools/worldEditor/scripts/EditorGui.ed.cs +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.cs @@ -2050,12 +2050,14 @@ function EWorldEditor::syncGui( %this ) EWorldEditorToolbar-->renderHandleBtn.setStateOn( EWorldEditor.renderObjHandle ); EWorldEditorToolbar-->renderTextBtn.setStateOn( EWorldEditor.renderObjText ); + EWorldEditorToolbar-->objectSnapDownBtn.setStateOn( %this.stickToGround ); SnapToBar-->objectSnapBtn.setStateOn( EWorldEditor.getSoftSnap() ); EWorldEditorToolbar-->softSnapSizeTextEdit.setText( EWorldEditor.getSoftSnapSize() ); ESnapOptions-->SnapSize.setText( EWorldEditor.getSoftSnapSize() ); ESnapOptions-->GridSize.setText( EWorldEditor.getGridSize() ); ESnapOptions-->GridSnapButton.setStateOn( %this.getGridSnap() ); + ESnapOptions-->GroupSnapButton.setStateOn( %this.UseGroupCenter ); SnapToBar-->objectGridSnapBtn.setStateOn( %this.getGridSnap() ); ESnapOptions-->NoSnapButton.setStateOn( !%this.stickToGround && !%this.getSoftSnap() && !%this.getGridSnap() ); } @@ -2458,6 +2460,11 @@ function toggleSnappingOptions( %var ) { EWorldEditor.setGridSnap( !EWorldEditor.getGridSnap() ); } + else if( %var $= "byGroup" ) + { + EWorldEditor.UseGroupCenter = !EWorldEditor.UseGroupCenter; + ESnapOptions->GroupSnapButton.setStateOn(EWorldEditor.UseGroupCenter); + } else { // No snapping. diff --git a/Templates/Empty/game/tools/worldEditor/scripts/ManageSFXParametersWindow.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/ManageSFXParametersWindow.ed.cs similarity index 100% rename from Templates/Empty/game/tools/worldEditor/scripts/ManageSFXParametersWindow.ed.cs rename to Templates/BaseGame/game/tools/worldEditor/scripts/ManageSFXParametersWindow.ed.cs diff --git a/Templates/Empty/game/tools/worldEditor/scripts/SelectObjectsWindow.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/SelectObjectsWindow.ed.cs similarity index 100% rename from Templates/Empty/game/tools/worldEditor/scripts/SelectObjectsWindow.ed.cs rename to Templates/BaseGame/game/tools/worldEditor/scripts/SelectObjectsWindow.ed.cs diff --git a/Templates/Empty/game/tools/worldEditor/scripts/cameraBookmarks.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/cameraBookmarks.ed.cs similarity index 100% rename from Templates/Empty/game/tools/worldEditor/scripts/cameraBookmarks.ed.cs rename to Templates/BaseGame/game/tools/worldEditor/scripts/cameraBookmarks.ed.cs diff --git a/Templates/Empty/game/core/scripts/server/commands.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/cameraCommands.ed.cs similarity index 75% rename from Templates/Empty/game/core/scripts/server/commands.cs rename to Templates/BaseGame/game/tools/worldEditor/scripts/cameraCommands.ed.cs index fc168be93..c842b77c1 100644 --- a/Templates/Empty/game/core/scripts/server/commands.cs +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/cameraCommands.ed.cs @@ -20,18 +20,11 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -//----------------------------------------------------------------------------- -// Misc. server commands avialable to clients -//----------------------------------------------------------------------------- - -//---------------------------------------------------------------------------- -// Debug commands -//---------------------------------------------------------------------------- - -function serverCmdNetSimulateLag( %client, %msDelay, %packetLossPercent ) +// Sync the Camera and the EditorGui +function clientCmdSyncEditorGui() { - if ( %client.isAdmin ) - %client.setSimulatedNetParams( %packetLossPercent / 100.0, %msDelay ); + if (isObject(EditorGui)) + EditorGui.syncCameraGui(); } //---------------------------------------------------------------------------- @@ -205,44 +198,3 @@ function serverCmdEditorCameraAutoFit(%client, %radius) %client.setControlObject(%client.camera); clientCmdSyncEditorGui(); } - -//---------------------------------------------------------------------------- -// Server admin -//---------------------------------------------------------------------------- - -function serverCmdSAD( %client, %password ) -{ - if( %password !$= "" && %password $= $Pref::Server::AdminPassword) - { - %client.isAdmin = true; - %client.isSuperAdmin = true; - %name = getTaggedString( %client.playerName ); - MessageAll( 'MsgAdminForce', "\c2" @ %name @ " has become Admin by force.", %client ); - } -} - -function serverCmdSADSetPassword(%client, %password) -{ - if(%client.isSuperAdmin) - $Pref::Server::AdminPassword = %password; -} - - -//---------------------------------------------------------------------------- -// Server chat message handlers -//---------------------------------------------------------------------------- - -function serverCmdTeamMessageSent(%client, %text) -{ - if(strlen(%text) >= $Pref::Server::MaxChatLen) - %text = getSubStr(%text, 0, $Pref::Server::MaxChatLen); - chatMessageTeam(%client, %client.team, '\c3%1: %2', %client.playerName, %text); -} - -function serverCmdMessageSent(%client, %text) -{ - if(strlen(%text) >= $Pref::Server::MaxChatLen) - %text = getSubStr(%text, 0, $Pref::Server::MaxChatLen); - chatMessageAll(%client, '\c4%1: %2', %client.playerName, %text); -} - diff --git a/Templates/Empty/game/tools/worldEditor/scripts/cursors.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/cursors.ed.cs similarity index 100% rename from Templates/Empty/game/tools/worldEditor/scripts/cursors.ed.cs rename to Templates/BaseGame/game/tools/worldEditor/scripts/cursors.ed.cs diff --git a/Templates/Empty/game/tools/worldEditor/scripts/editor.bind.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/editor.bind.ed.cs similarity index 100% rename from Templates/Empty/game/tools/worldEditor/scripts/editor.bind.ed.cs rename to Templates/BaseGame/game/tools/worldEditor/scripts/editor.bind.ed.cs diff --git a/Templates/Empty/game/tools/worldEditor/scripts/editor.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/editor.ed.cs similarity index 100% rename from Templates/Empty/game/tools/worldEditor/scripts/editor.ed.cs rename to Templates/BaseGame/game/tools/worldEditor/scripts/editor.ed.cs diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/editor.keybinds.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/editor.keybinds.cs new file mode 100644 index 000000000..b08200869 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/editor.keybinds.cs @@ -0,0 +1,80 @@ +//----------------------------------------------------------------------------- +// 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. +//----------------------------------------------------------------------------- + +if ( isObject( EditorMap ) ) + EditorMap.delete(); + +new ActionMap(EditorMap); + +//------------------------------------------------------------------------------ +// Non-remapable binds +//------------------------------------------------------------------------------ +EditorMap.bindCmd(keyboard, "escape", "", "Canvas.pushDialog(PauseMenu);"); + +//------------------------------------------------------------------------------ +// Movement Keys +//------------------------------------------------------------------------------ +EditorMap.bind( keyboard, a, editorMoveleft ); +EditorMap.bind( keyboard, d, editorMoveright ); +EditorMap.bind( keyboard, left, editorMoveleft ); +EditorMap.bind( keyboard, right, editorMoveright ); + +EditorMap.bind( keyboard, w, editorMoveforward ); +EditorMap.bind( keyboard, s, editorMovebackward ); +EditorMap.bind( keyboard, up, editorMoveforward ); +EditorMap.bind( keyboard, down, editorMovebackward ); + +EditorMap.bind( keyboard, e, editorMoveup ); +EditorMap.bind( keyboard, c, editorMovedown ); + +EditorMap.bind( mouse, xaxis, editorYaw ); +EditorMap.bind( mouse, yaxis, editorPitch ); + +//------------------------------------------------------------------------------ +// Mouse Trigger +//------------------------------------------------------------------------------ +EditorMap.bind( mouse, button0, editorClick ); +EditorMap.bind( mouse, button1, editorRClick ); + +//------------------------------------------------------------------------------ +// Camera & View functions +//------------------------------------------------------------------------------ +EditorMap.bind(keyboard, "alt c", toggleCamera); + +//------------------------------------------------------------------------------ +// Helper Functions +//------------------------------------------------------------------------------ +EditorMap.bind(keyboard, "F8", dropCameraAtPlayer); +EditorMap.bind(keyboard, "F7", dropPlayerAtCamera); + +//------------------------------------------------------------------------------ +// Debugging Functions +//------------------------------------------------------------------------------ +GlobalActionMap.bind(keyboard, "ctrl F2", showMetrics); +GlobalActionMap.bind(keyboard, "ctrl F3", doProfile); + +//------------------------------------------------------------------------------ +// Misc. +//------------------------------------------------------------------------------ +GlobalActionMap.bind(keyboard, "tilde", toggleConsole); + +EditorMap.bind( mouse, "alt zaxis", editorWheelFadeScroll ); diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/editorInputCommands.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/editorInputCommands.cs new file mode 100644 index 000000000..aa6f8d8b6 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/editorInputCommands.cs @@ -0,0 +1,181 @@ +//----------------------------------------------------------------------------- +// 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. +//----------------------------------------------------------------------------- + +//------------------------------------------------------------------------------ +// Non-remapable binds +//------------------------------------------------------------------------------ +function escapeFromGame() +{ + disconnect(); +} + +//------------------------------------------------------------------------------ +// Movement Keys +//------------------------------------------------------------------------------ +function editorMoveleft(%val) +{ + $mvLeftAction = %val * $Camera::movementSpeed; +} + +function editorMoveright(%val) +{ + $mvRightAction = %val * $Camera::movementSpeed; +} + +function editorMoveforward(%val) +{ + $mvForwardAction = %val * $Camera::movementSpeed; +} + +function editorMovebackward(%val) +{ + $mvBackwardAction = %val * $Camera::movementSpeed; +} + +function editorMoveup(%val) +{ + %object = ServerConnection.getControlObject(); + + if(%object.isInNamespaceHierarchy("Camera")) + $mvUpAction = %val * $Camera::movementSpeed; +} + +function editorMovedown(%val) +{ + %object = ServerConnection.getControlObject(); + + if(%object.isInNamespaceHierarchy("Camera")) + $mvDownAction = %val * $Camera::movementSpeed; +} + +function getEditorMouseAdjustAmount(%val) +{ + return(%val * ($cameraFov / 90) * 0.01); +} + +function editorYaw(%val) +{ + %yawAdj = getEditorMouseAdjustAmount(%val); + if(ServerConnection.isControlObjectRotDampedCamera()) + { + // Clamp and scale + %yawAdj = mClamp(%yawAdj, -m2Pi()+0.01, m2Pi()-0.01); + %yawAdj *= 0.5; + } + + $mvYaw += %yawAdj; +} + +function editorPitch(%val) +{ + %pitchAdj = getEditorMouseAdjustAmount(%val); + if(ServerConnection.isControlObjectRotDampedCamera()) + { + // Clamp and scale + %pitchAdj = mClamp(%pitchAdj, -m2Pi()+0.01, m2Pi()-0.01); + %pitchAdj *= 0.5; + } + + $mvPitch += %pitchAdj; +} + +//------------------------------------------------------------------------------ +// Mouse Trigger +//------------------------------------------------------------------------------ +function editorClick(%val) +{ + $mvTriggerCount0++; +} + +function editorRClick(%val) +{ + $mvTriggerCount1++; +} + +//------------------------------------------------------------------------------ +// Camera & View functions +//------------------------------------------------------------------------------ +function toggleCamera(%val) +{ + if (%val) + commandToServer('ToggleCamera'); +} + +//------------------------------------------------------------------------------ +// Helper Functions +//------------------------------------------------------------------------------ +function dropCameraAtPlayer(%val) +{ + if (%val) + commandToServer('dropCameraAtPlayer'); +} + +function dropPlayerAtCamera(%val) +{ + if (%val) + commandToServer('DropPlayerAtCamera'); +} + +//------------------------------------------------------------------------------ +// Debugging Functions +//------------------------------------------------------------------------------ +function showMetrics(%val) +{ + if(%val) + { + if(!Canvas.isMember(FrameOverlayGui)) + metrics("fps gfx shadow sfx terrain groundcover forest net"); + else + metrics(""); + } +} + +//------------------------------------------------------------------------------ +// +// Start profiler by pressing ctrl f3 +// ctrl f3 - starts profile that will dump to console and file +// +function doProfile(%val) +{ + if (%val) + { + // key down -- start profile + echo("Starting profile session..."); + profilerReset(); + profilerEnable(true); + } + else + { + // key up -- finish off profile + echo("Ending profile session..."); + + profilerDumpToFile("profilerDumpToFile" @ getSimTime() @ ".txt"); + profilerEnable(false); + } +} + +function editorWheelFadeScroll( %val ) +{ + EWorldEditor.fadeIconsDist += %val * 0.1; + if( EWorldEditor.fadeIconsDist < 0 ) + EWorldEditor.fadeIconsDist = 0; +} \ No newline at end of file diff --git a/Templates/Empty/game/tools/worldEditor/scripts/editorPlugin.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/editorPlugin.ed.cs similarity index 100% rename from Templates/Empty/game/tools/worldEditor/scripts/editorPlugin.ed.cs rename to Templates/BaseGame/game/tools/worldEditor/scripts/editorPlugin.ed.cs diff --git a/Templates/Empty/game/tools/worldEditor/scripts/editorPrefs.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/editorPrefs.ed.cs similarity index 100% rename from Templates/Empty/game/tools/worldEditor/scripts/editorPrefs.ed.cs rename to Templates/BaseGame/game/tools/worldEditor/scripts/editorPrefs.ed.cs diff --git a/Templates/Empty/game/tools/worldEditor/scripts/editorRender.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/editorRender.ed.cs similarity index 100% rename from Templates/Empty/game/tools/worldEditor/scripts/editorRender.ed.cs rename to Templates/BaseGame/game/tools/worldEditor/scripts/editorRender.ed.cs diff --git a/Templates/Empty/game/tools/worldEditor/scripts/editorSettingsWindow.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/editorSettingsWindow.ed.cs similarity index 100% rename from Templates/Empty/game/tools/worldEditor/scripts/editorSettingsWindow.ed.cs rename to Templates/BaseGame/game/tools/worldEditor/scripts/editorSettingsWindow.ed.cs diff --git a/Templates/Empty/game/tools/worldEditor/scripts/editors/creator.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/editors/creator.ed.cs similarity index 100% rename from Templates/Empty/game/tools/worldEditor/scripts/editors/creator.ed.cs rename to Templates/BaseGame/game/tools/worldEditor/scripts/editors/creator.ed.cs diff --git a/Templates/Empty/game/tools/worldEditor/scripts/editors/missionArea.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/editors/missionArea.ed.cs similarity index 100% rename from Templates/Empty/game/tools/worldEditor/scripts/editors/missionArea.ed.cs rename to Templates/BaseGame/game/tools/worldEditor/scripts/editors/missionArea.ed.cs diff --git a/Templates/Empty/game/tools/worldEditor/scripts/editors/terrainEditor.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/editors/terrainEditor.ed.cs similarity index 100% rename from Templates/Empty/game/tools/worldEditor/scripts/editors/terrainEditor.ed.cs rename to Templates/BaseGame/game/tools/worldEditor/scripts/editors/terrainEditor.ed.cs diff --git a/Templates/Empty/game/tools/worldEditor/scripts/editors/worldEditor.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/editors/worldEditor.ed.cs similarity index 100% rename from Templates/Empty/game/tools/worldEditor/scripts/editors/worldEditor.ed.cs rename to Templates/BaseGame/game/tools/worldEditor/scripts/editors/worldEditor.ed.cs diff --git a/Templates/Empty/game/tools/worldEditor/scripts/interfaces/levelInfoEditor.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/interfaces/levelInfoEditor.ed.cs similarity index 100% rename from Templates/Empty/game/tools/worldEditor/scripts/interfaces/levelInfoEditor.ed.cs rename to Templates/BaseGame/game/tools/worldEditor/scripts/interfaces/levelInfoEditor.ed.cs diff --git a/Templates/Empty/game/tools/worldEditor/scripts/interfaces/simObjectEditor.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/interfaces/simObjectEditor.ed.cs similarity index 100% rename from Templates/Empty/game/tools/worldEditor/scripts/interfaces/simObjectEditor.ed.cs rename to Templates/BaseGame/game/tools/worldEditor/scripts/interfaces/simObjectEditor.ed.cs diff --git a/Templates/Empty/game/tools/worldEditor/scripts/interfaces/terrainMaterialDlg.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/interfaces/terrainMaterialDlg.ed.cs similarity index 100% rename from Templates/Empty/game/tools/worldEditor/scripts/interfaces/terrainMaterialDlg.ed.cs rename to Templates/BaseGame/game/tools/worldEditor/scripts/interfaces/terrainMaterialDlg.ed.cs diff --git a/Templates/Empty/game/core/scripts/client/lighting/advanced/lightViz.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/lightViz.cs similarity index 66% rename from Templates/Empty/game/core/scripts/client/lighting/advanced/lightViz.cs rename to Templates/BaseGame/game/tools/worldEditor/scripts/lightViz.cs index fcaf72942..aaa46200e 100644 --- a/Templates/Empty/game/core/scripts/client/lighting/advanced/lightViz.cs +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/lightViz.cs @@ -19,7 +19,82 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. //----------------------------------------------------------------------------- +// Debug Shaders. +new ShaderData( AL_ColorBufferShader ) +{ + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = "./shaders/dbgColorBufferP.hlsl"; + + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = "./shaders/dbgColorBufferP.glsl"; + samplerNames[0] = "colorBufferTex"; + pixVersion = 2.0; +}; + +singleton PostEffect( AL_ColorBufferVisualize ) +{ + shader = AL_ColorBufferShader; + stateBlock = AL_DefaultVisualizeState; + texture[0] = "#color"; + target = "$backBuffer"; + renderPriority = 9999; +}; + +/// Toggles the visualization of the AL lighting specular power buffer. +function toggleColorBufferViz( %enable ) +{ + if ( %enable $= "" ) + { + $AL_ColorBufferShaderVar = AL_ColorBufferVisualize.isEnabled() ? false : true; + AL_ColorBufferVisualize.toggle(); + } + else if ( %enable ) + { + AL_DeferredShading.disable(); + AL_ColorBufferVisualize.enable(); + } + else if ( !%enable ) + { + AL_ColorBufferVisualize.disable(); + AL_DeferredShading.enable(); + } +} + +new ShaderData( AL_SpecMapShader ) +{ + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = "./shaders/dbgSpecMapVisualizeP.hlsl"; + + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = "./shaders/dbgSpecMapVisualizeP.glsl"; + + samplerNames[0] = "matinfoTex"; + pixVersion = 2.0; +}; + +singleton PostEffect( AL_SpecMapVisualize ) +{ + shader = AL_SpecMapShader; + stateBlock = AL_DefaultVisualizeState; + texture[0] = "#matinfo"; + target = "$backBuffer"; + renderPriority = 9999; +}; + +/// Toggles the visualization of the AL lighting specular power buffer. +function toggleSpecMapViz( %enable ) +{ + if ( %enable $= "" ) + { + $AL_SpecMapShaderVar = AL_SpecMapVisualize.isEnabled() ? false : true; + AL_SpecMapVisualize.toggle(); + } + else if ( %enable ) + AL_SpecMapVisualize.enable(); + else if ( !%enable ) + AL_SpecMapVisualize.disable(); +} new GFXStateBlockData( AL_DepthVisualizeState ) { @@ -50,11 +125,11 @@ new GFXStateBlockData( AL_DefaultVisualizeState ) new ShaderData( AL_DepthVisualizeShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/lighting/advanced/dbgDepthVisualizeP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = "./shaders/dbgDepthVisualizeP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/lighting/advanced/gl/dbgDepthVisualizeP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = "./shaders/dbgDepthVisualizeP.glsl"; samplerNames[0] = "prepassTex"; samplerNames[1] = "depthViz"; @@ -67,7 +142,7 @@ singleton PostEffect( AL_DepthVisualize ) shader = AL_DepthVisualizeShader; stateBlock = AL_DefaultVisualizeState; texture[0] = "#prepass"; - texture[1] = "depthviz"; + texture[1] = "tools/worldEditor/images/depthviz"; target = "$backBuffer"; renderPriority = 9999; }; @@ -86,11 +161,11 @@ function AL_DepthVisualize::onEnabled( %this ) new ShaderData( AL_GlowVisualizeShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/lighting/advanced/dbgGlowVisualizeP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = "./shaders/dbgGlowVisualizeP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/lighting/advanced/gl/dbgGlowVisualizeP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = "./shaders/dbgGlowVisualizeP.glsl"; samplerNames[0] = "glowBuffer"; pixVersion = 2.0; @@ -107,11 +182,11 @@ singleton PostEffect( AL_GlowVisualize ) new ShaderData( AL_NormalsVisualizeShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/lighting/advanced/dbgNormalVisualizeP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = "./shaders/dbgNormalVisualizeP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/lighting/advanced/gl/dbgNormalVisualizeP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = "./shaders/dbgNormalVisualizeP.glsl"; samplerNames[0] = "prepassTex"; @@ -143,11 +218,11 @@ function AL_NormalsVisualize::onEnabled( %this ) new ShaderData( AL_LightColorVisualizeShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/lighting/advanced/dbgLightColorVisualizeP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = "./shaders/dbgLightColorVisualizeP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/lighting/advanced/gl/dbgLightColorVisualizeP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = "./shaders/dbgLightColorVisualizeP.glsl"; samplerNames[0] = "lightPrePassTex"; @@ -178,11 +253,11 @@ function AL_LightColorVisualize::onEnabled( %this ) new ShaderData( AL_LightSpecularVisualizeShader ) { - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/lighting/advanced/dbgLightSpecularVisualizeP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl"; + DXPixelShaderFile = "./shaders/dbgLightSpecularVisualizeP.hlsl"; - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/lighting/advanced/gl/dbgLightSpecularVisualizeP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl"; + OGLPixelShaderFile = "./shaders/dbgLightSpecularVisualizeP.glsl"; samplerNames[0] = "lightPrePassTex"; @@ -292,4 +367,3 @@ function toggleBackbufferViz( %enable ) else if ( !%enable ) AL_DeferredShading.enable(); } - diff --git a/Templates/Empty/game/tools/worldEditor/scripts/lighting.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/lighting.ed.cs similarity index 100% rename from Templates/Empty/game/tools/worldEditor/scripts/lighting.ed.cs rename to Templates/BaseGame/game/tools/worldEditor/scripts/lighting.ed.cs diff --git a/Templates/Empty/game/tools/worldEditor/scripts/menuHandlers.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/menuHandlers.ed.cs similarity index 99% rename from Templates/Empty/game/tools/worldEditor/scripts/menuHandlers.ed.cs rename to Templates/BaseGame/game/tools/worldEditor/scripts/menuHandlers.ed.cs index 1823e0d55..f476ccaeb 100644 --- a/Templates/Empty/game/tools/worldEditor/scripts/menuHandlers.ed.cs +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/menuHandlers.ed.cs @@ -555,7 +555,7 @@ function EditorExplodePrefab() EditorTree.buildVisibleTree( true ); } -function bakeSelectedToMesh() +function makeSelectedAMesh() { %dlg = new SaveFileDialog() @@ -582,7 +582,7 @@ function bakeSelectedToMesh() if ( !%ret ) return; - EWorldEditor.bakeSelectionToMesh( %saveFile ); + EWorldEditor.makeSelectionAMesh( %saveFile ); EditorTree.buildVisibleTree( true ); } diff --git a/Templates/Empty/game/tools/worldEditor/scripts/menus.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/menus.ed.cs similarity index 99% rename from Templates/Empty/game/tools/worldEditor/scripts/menus.ed.cs rename to Templates/BaseGame/game/tools/worldEditor/scripts/menus.ed.cs index be068b9ed..dbe978cab 100644 --- a/Templates/Empty/game/tools/worldEditor/scripts/menus.ed.cs +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/menus.ed.cs @@ -315,6 +315,7 @@ function EditorGui::buildMenus(%this) item[5] = "at Centroid" TAB "" TAB "atCentroid"; item[6] = "to Terrain" TAB "" TAB "toTerrain"; item[7] = "Below Selection" TAB "" TAB "belowSelection"; + item[8] = "At Gizmo" TAB "" TAB "atGizmo"; }; %this.alignBoundsMenu = new PopupMenu() diff --git a/Templates/Empty/game/tools/worldEditor/scripts/objectSnapOptions.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/objectSnapOptions.ed.cs similarity index 100% rename from Templates/Empty/game/tools/worldEditor/scripts/objectSnapOptions.ed.cs rename to Templates/BaseGame/game/tools/worldEditor/scripts/objectSnapOptions.ed.cs diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/gl/dbgColorBufferP.glsl b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgColorBufferP.glsl similarity index 97% rename from Templates/Empty/game/shaders/common/lighting/advanced/gl/dbgColorBufferP.glsl rename to Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgColorBufferP.glsl index 12962e798..0b7e370bf 100644 --- a/Templates/Empty/game/shaders/common/lighting/advanced/gl/dbgColorBufferP.glsl +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgColorBufferP.glsl @@ -20,7 +20,7 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -#include "../../../gl/hlslCompat.glsl" +#include "core/shaders/gl/hlslCompat.glsl" in vec2 uv0; uniform sampler2D colorBufferTex; diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/dbgColorBufferP.hlsl b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgColorBufferP.hlsl similarity index 97% rename from Templates/Empty/game/shaders/common/lighting/advanced/dbgColorBufferP.hlsl rename to Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgColorBufferP.hlsl index ad3debbaf..e996f840a 100644 --- a/Templates/Empty/game/shaders/common/lighting/advanced/dbgColorBufferP.hlsl +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgColorBufferP.hlsl @@ -20,7 +20,7 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -#include "../../postfx/postFx.hlsl" +#include "core/shaders/postfx/postFx.hlsl" TORQUE_UNIFORM_SAMPLER2D(colorBufferTex,0); diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/gl/dbgDepthVisualizeP.glsl b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgDepthVisualizeP.glsl similarity index 97% rename from Templates/Empty/game/shaders/common/lighting/advanced/gl/dbgDepthVisualizeP.glsl rename to Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgDepthVisualizeP.glsl index 6b9dd72ad..31aa60ef4 100644 --- a/Templates/Empty/game/shaders/common/lighting/advanced/gl/dbgDepthVisualizeP.glsl +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgDepthVisualizeP.glsl @@ -20,7 +20,7 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -#include "../../../gl/hlslCompat.glsl" +#include "core/shaders/gl/hlslCompat.glsl" #include "shadergen:/autogenConditioners.h" in vec2 uv0; diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/dbgDepthVisualizeP.hlsl b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgDepthVisualizeP.hlsl similarity index 94% rename from Templates/Empty/game/shaders/common/lighting/advanced/dbgDepthVisualizeP.hlsl rename to Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgDepthVisualizeP.hlsl index 68df09a78..2f1be62b2 100644 --- a/Templates/Empty/game/shaders/common/lighting/advanced/dbgDepthVisualizeP.hlsl +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgDepthVisualizeP.hlsl @@ -20,8 +20,8 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -#include "../../postfx/postFx.hlsl" -#include "../../shaderModelAutoGen.hlsl" +#include "core/shaders/postfx/postFx.hlsl" +#include "core/shaders/shaderModelAutoGen.hlsl" TORQUE_UNIFORM_SAMPLER2D(prepassTex, 0); TORQUE_UNIFORM_SAMPLER1D(depthViz, 1); diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/gl/dbgGlowVisualizeP.glsl b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgGlowVisualizeP.glsl similarity index 97% rename from Templates/Empty/game/shaders/common/lighting/advanced/gl/dbgGlowVisualizeP.glsl rename to Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgGlowVisualizeP.glsl index 355e6ef53..cdc58d7c6 100644 --- a/Templates/Empty/game/shaders/common/lighting/advanced/gl/dbgGlowVisualizeP.glsl +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgGlowVisualizeP.glsl @@ -20,7 +20,7 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -#include "../../../gl/hlslCompat.glsl" +#include "core/shaders/gl/hlslCompat.glsl" in vec2 uv0; uniform sampler2D glowBuffer; diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/dbgGlowVisualizeP.hlsl b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgGlowVisualizeP.hlsl similarity index 97% rename from Templates/Empty/game/shaders/common/lighting/advanced/dbgGlowVisualizeP.hlsl rename to Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgGlowVisualizeP.hlsl index 257383659..b78d29d67 100644 --- a/Templates/Empty/game/shaders/common/lighting/advanced/dbgGlowVisualizeP.hlsl +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgGlowVisualizeP.hlsl @@ -20,7 +20,7 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -#include "../../postfx/postFx.hlsl" +#include "core/shaders/postfx/postFx.hlsl" TORQUE_UNIFORM_SAMPLER2D(glowBuffer, 0); diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/gl/dbgLightColorVisualizeP.glsl b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgLightColorVisualizeP.glsl similarity index 97% rename from Templates/Empty/game/shaders/common/lighting/advanced/gl/dbgLightColorVisualizeP.glsl rename to Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgLightColorVisualizeP.glsl index 3e7de5a66..0b375b646 100644 --- a/Templates/Empty/game/shaders/common/lighting/advanced/gl/dbgLightColorVisualizeP.glsl +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgLightColorVisualizeP.glsl @@ -20,7 +20,7 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -#include "../../../gl/hlslCompat.glsl" +#include "core/shaders/gl/hlslCompat.glsl" in vec2 uv0; uniform sampler2D lightPrePassTex; diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/dbgLightColorVisualizeP.hlsl b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgLightColorVisualizeP.hlsl similarity index 94% rename from Templates/Empty/game/shaders/common/lighting/advanced/dbgLightColorVisualizeP.hlsl rename to Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgLightColorVisualizeP.hlsl index ca6d8d677..7d66e2e69 100644 --- a/Templates/Empty/game/shaders/common/lighting/advanced/dbgLightColorVisualizeP.hlsl +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgLightColorVisualizeP.hlsl @@ -20,8 +20,8 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -#include "../../shaderModelAutoGen.hlsl" -#include "../../postfx/postFx.hlsl" +#include "core/shaders/shaderModelAutoGen.hlsl" +#include "core/shaders/postfx/postFx.hlsl" TORQUE_UNIFORM_SAMPLER2D(lightPrePassTex,0); diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/gl/dbgLightSpecularVisualizeP.glsl b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgLightSpecularVisualizeP.glsl similarity index 97% rename from Templates/Empty/game/shaders/common/lighting/advanced/gl/dbgLightSpecularVisualizeP.glsl rename to Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgLightSpecularVisualizeP.glsl index 7b654c936..679c18e16 100644 --- a/Templates/Empty/game/shaders/common/lighting/advanced/gl/dbgLightSpecularVisualizeP.glsl +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgLightSpecularVisualizeP.glsl @@ -20,7 +20,7 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -#include "../../../gl/hlslCompat.glsl" +#include "core/shaders/gl/hlslCompat.glsl" in vec2 uv0; uniform sampler2D lightPrePassTex; diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/dbgLightSpecularVisualizeP.hlsl b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgLightSpecularVisualizeP.hlsl similarity index 97% rename from Templates/Empty/game/shaders/common/lighting/advanced/dbgLightSpecularVisualizeP.hlsl rename to Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgLightSpecularVisualizeP.hlsl index 072f07e00..ed5c268d4 100644 --- a/Templates/Empty/game/shaders/common/lighting/advanced/dbgLightSpecularVisualizeP.hlsl +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgLightSpecularVisualizeP.hlsl @@ -20,7 +20,7 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -#include "../../postfx/postFx.hlsl" +#include "core/shaders/postfx/postFx.hlsl" TORQUE_UNIFORM_SAMPLER2D(lightPrePassTex,0); diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/gl/dbgNormalVisualizeP.glsl b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgNormalVisualizeP.glsl similarity index 97% rename from Templates/Empty/game/shaders/common/lighting/advanced/gl/dbgNormalVisualizeP.glsl rename to Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgNormalVisualizeP.glsl index 84ea4d3fb..2292e3538 100644 --- a/Templates/Empty/game/shaders/common/lighting/advanced/gl/dbgNormalVisualizeP.glsl +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgNormalVisualizeP.glsl @@ -20,7 +20,7 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -#include "../../../gl/hlslCompat.glsl" +#include "core/shaders/gl/hlslCompat.glsl" #include "shadergen:/autogenConditioners.h" in vec2 uv0; diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/dbgNormalVisualizeP.hlsl b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgNormalVisualizeP.hlsl similarity index 94% rename from Templates/Empty/game/shaders/common/lighting/advanced/dbgNormalVisualizeP.hlsl rename to Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgNormalVisualizeP.hlsl index 4f31d2c53..daacee307 100644 --- a/Templates/Empty/game/shaders/common/lighting/advanced/dbgNormalVisualizeP.hlsl +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgNormalVisualizeP.hlsl @@ -20,8 +20,8 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -#include "../../postfx/postFx.hlsl" -#include "../../shaderModelAutoGen.hlsl" +#include "core/shaders/postfx/postFx.hlsl" +#include "core/shaders/shaderModelAutoGen.hlsl" TORQUE_UNIFORM_SAMPLER2D(prepassTex, 0); diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/gl/dbgShadowVisualizeP.glsl b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgShadowVisualizeP.glsl similarity index 97% rename from Templates/Empty/game/shaders/common/lighting/advanced/gl/dbgShadowVisualizeP.glsl rename to Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgShadowVisualizeP.glsl index b51e7310a..f73f7812d 100644 --- a/Templates/Empty/game/shaders/common/lighting/advanced/gl/dbgShadowVisualizeP.glsl +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgShadowVisualizeP.glsl @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. //----------------------------------------------------------------------------- -#include "../../../gl/hlslCompat.glsl" +#include "core/shaders/gl/hlslCompat.glsl" in vec2 uv0; uniform sampler2D shadowMap; diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/dbgShadowVisualizeP.hlsl b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgShadowVisualizeP.hlsl similarity index 97% rename from Templates/Empty/game/shaders/common/lighting/advanced/dbgShadowVisualizeP.hlsl rename to Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgShadowVisualizeP.hlsl index b54833499..3c56c2abd 100644 --- a/Templates/Empty/game/shaders/common/lighting/advanced/dbgShadowVisualizeP.hlsl +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgShadowVisualizeP.hlsl @@ -20,7 +20,7 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -#include "../../shaderModel.hlsl" +#include "core/shaders/shaderModel.hlsl" struct MaterialDecoratorConnectV { diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/gl/dbgSpecMapVisualizeP.glsl b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgSpecMapVisualizeP.glsl similarity index 97% rename from Templates/Empty/game/shaders/common/lighting/advanced/gl/dbgSpecMapVisualizeP.glsl rename to Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgSpecMapVisualizeP.glsl index 3e5efd675..d391a1963 100644 --- a/Templates/Empty/game/shaders/common/lighting/advanced/gl/dbgSpecMapVisualizeP.glsl +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgSpecMapVisualizeP.glsl @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. //----------------------------------------------------------------------------- -#include "../../../gl/hlslCompat.glsl" +#include "core/shaders/gl/hlslCompat.glsl" in vec2 uv0; uniform sampler2D matinfoTex; diff --git a/Templates/Empty/game/shaders/common/lighting/advanced/dbgSpecMapVisualizeP.hlsl b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgSpecMapVisualizeP.hlsl similarity index 97% rename from Templates/Empty/game/shaders/common/lighting/advanced/dbgSpecMapVisualizeP.hlsl rename to Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgSpecMapVisualizeP.hlsl index eba38a879..59252cd7b 100644 --- a/Templates/Empty/game/shaders/common/lighting/advanced/dbgSpecMapVisualizeP.hlsl +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgSpecMapVisualizeP.hlsl @@ -20,7 +20,7 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -#include "../../postfx/postFx.hlsl" +#include "core/shaders/postfx/postFx.hlsl" TORQUE_UNIFORM_SAMPLER2D(matinfoTex,0); diff --git a/Templates/Empty/game/core/scripts/client/lighting/advanced/shadowViz.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/shadowViz.cs similarity index 90% rename from Templates/Empty/game/core/scripts/client/lighting/advanced/shadowViz.cs rename to Templates/BaseGame/game/tools/worldEditor/scripts/shadowViz.cs index c8db6456a..1bfa88488 100644 --- a/Templates/Empty/game/core/scripts/client/lighting/advanced/shadowViz.cs +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/shadowViz.cs @@ -22,11 +22,11 @@ new ShaderData( AL_ShadowVisualizeShader ) { - DXVertexShaderFile = "shaders/common/guiMaterialV.hlsl"; - DXPixelShaderFile = "shaders/common/lighting/advanced/dbgShadowVisualizeP.hlsl"; + DXVertexShaderFile = $Core::CommonShaderPath @ "/guiMaterialV.hlsl"; + DXPixelShaderFile = "./shaders/dbgShadowVisualizeP.hlsl"; - OGLVertexShaderFile = "shaders/common/gl/guiMaterialV.glsl"; - OGLPixelShaderFile = "shaders/common/lighting/advanced/gl/dbgShadowVisualizeP.glsl"; + OGLVertexShaderFile = $Core::CommonShaderPath @ "/gl/guiMaterialV.glsl"; + OGLPixelShaderFile = "./shaders/dbgShadowVisualizeP.glsl"; samplerNames[0] = "$shadowMap"; samplerNames[1] = "$depthViz"; @@ -40,7 +40,7 @@ new CustomMaterial( AL_ShadowVisualizeMaterial ) stateBlock = AL_DepthVisualizeState; sampler["shadowMap"] = "#AL_ShadowVizTexture"; - sampler["depthViz"] = "depthviz"; + sampler["depthViz"] = "tools/worldEditor/images/depthviz"; pixVersion = 2.0; }; @@ -75,7 +75,7 @@ function _setShadowVizLight( %light, %force ) if ( !AL_ShadowVizOverlayCtrl.isAwake() ) return; - if ( AL_ShadowVizOverlayCtrl.isLocked && !%force ) + if ( AL_ShadowVizOverlayCtrl.isLocked() && !%force ) return; // Resolve the object to the client side. diff --git a/Templates/Empty/game/tools/worldEditor/scripts/transformSelection.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/transformSelection.ed.cs similarity index 100% rename from Templates/Empty/game/tools/worldEditor/scripts/transformSelection.ed.cs rename to Templates/BaseGame/game/tools/worldEditor/scripts/transformSelection.ed.cs diff --git a/Templates/Empty/game/tools/worldEditor/scripts/undoManager.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/undoManager.ed.cs similarity index 100% rename from Templates/Empty/game/tools/worldEditor/scripts/undoManager.ed.cs rename to Templates/BaseGame/game/tools/worldEditor/scripts/undoManager.ed.cs diff --git a/Templates/Empty/game/tools/worldEditor/scripts/visibilityLayer.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/visibilityLayer.ed.cs similarity index 100% rename from Templates/Empty/game/tools/worldEditor/scripts/visibilityLayer.ed.cs rename to Templates/BaseGame/game/tools/worldEditor/scripts/visibilityLayer.ed.cs diff --git a/Templates/Empty/source/readme.txt b/Templates/BaseGame/source/readme.txt similarity index 100% rename from Templates/Empty/source/readme.txt rename to Templates/BaseGame/source/readme.txt diff --git a/Templates/Empty/source/torqueConfig.h b/Templates/BaseGame/source/torqueConfig.h similarity index 85% rename from Templates/Empty/source/torqueConfig.h rename to Templates/BaseGame/source/torqueConfig.h index 3ba8e3ca1..365476b19 100644 --- a/Templates/Empty/source/torqueConfig.h +++ b/Templates/BaseGame/source/torqueConfig.h @@ -32,7 +32,9 @@ //not only to your game proper, but also to all of your tools. /// What's the name of your application? Used in a variety of places. -#define TORQUE_APP_NAME "Empty" +#define TORQUE_APP_NAME "Full" + +#define TORQUE_NET_DEFAULT_MULTICAST_ADDRESS "ff04::7467:656E:6574:776B" /// What version of the application specific source code is this? /// @@ -146,6 +148,27 @@ /// still result in unexpected behavior, if other FrameTemp's are stomped. //#define FRAMEALLOCATOR_DEBUG_GUARD +/// This #define is used by the FrameAllocator to align starting addresses to +/// be byte aligned to this value. This is important on the 360 and possibly +/// on other platforms as well. Use this #define anywhere alignment is needed. +/// +/// NOTE: Do not change this value per-platform unless you have a very good +/// reason for doing so. It has the potential to cause inconsistencies in +/// memory which is allocated and expected to be contiguous. +/// +///@ TODO: Make sure that everywhere this should be used, it is being used. +#define TORQUE_BYTE_ALIGNMENT 4 + +/// This #define should be set if the engine should use a 32-bit format for +/// 24-bit textures. The most notable case is converting RGB->RGBX for various +/// reasons. + +// CodeReview: It may be worth determining this at run-time. Right now I just +// want to wrap code which forces the conversion from 24->32 in a common +// #define so it is easily turned on/off for the problems we are encountering in +// the lighting. [5/11/2007 Pat] +//#define TORQUE_FORCE_24_BIT_TO_32_BIT_TEXTURES + /// This #define is used by the FrameAllocator to set the size of the frame. /// /// It was previously set to 3MB but I've increased it to 32MB due to the @@ -200,6 +223,10 @@ # define TORQUE_INSTANCE_EXCLUSION "TorqueTest" #endif +// This is the lighting system thats enabled by default when the scene graphs are created. +//#define DEFAULT_LIGHTING_SYSTEM "SynapseGaming Lighting Kit" +#define DEFAULT_LIGHTING_SYSTEM "Basic Lighting" + // Someday, it might make sense to do some pragma magic here so we error // on inconsistent flags. diff --git a/Templates/BaseGame/thumb.png b/Templates/BaseGame/thumb.png new file mode 100644 index 000000000..abb73e9fc Binary files /dev/null and b/Templates/BaseGame/thumb.png differ diff --git a/Templates/Empty/buildFiles/VisualStudio 2008/projects/Torque.rc b/Templates/Empty/buildFiles/VisualStudio 2008/projects/Torque.rc deleted file mode 100644 index cf88543da..000000000 --- a/Templates/Empty/buildFiles/VisualStudio 2008/projects/Torque.rc +++ /dev/null @@ -1,85 +0,0 @@ -//Microsoft Developer Studio generated resource script. -// -#define IDI_ICON1 103 -#define IDI_ICON2 107 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 108 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1000 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "windows.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_ICON1 ICON DISCARDABLE "torque.ico" -IDI_ICON2 ICON DISCARDABLE "torque.ico" - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""windows.h""\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/Templates/Empty/buildFiles/VisualStudio 2008/projects/torque.ico b/Templates/Empty/buildFiles/VisualStudio 2008/projects/torque.ico deleted file mode 100644 index 22ac1a3d1..000000000 Binary files a/Templates/Empty/buildFiles/VisualStudio 2008/projects/torque.ico and /dev/null differ diff --git a/Templates/Empty/buildFiles/VisualStudio 2010/projects/Torque.Cpp.Win32.user.props b/Templates/Empty/buildFiles/VisualStudio 2010/projects/Torque.Cpp.Win32.user.props deleted file mode 100644 index d659420b0..000000000 --- a/Templates/Empty/buildFiles/VisualStudio 2010/projects/Torque.Cpp.Win32.user.props +++ /dev/null @@ -1,11 +0,0 @@ - - - - $(DXSDK_DIR)\Utilities\bin\x86;$(ExecutablePath) - $(DXSDK_DIR)\Include;$(IncludePath) - $(ReferencePath) - $(DXSDK_DIR)\Lib\x86;$(LibraryPath) - $(SourcePath) - $(ExcludePath) - - \ No newline at end of file diff --git a/Templates/Empty/buildFiles/VisualStudio 2010/projects/Torque.Cpp.x64.user.props b/Templates/Empty/buildFiles/VisualStudio 2010/projects/Torque.Cpp.x64.user.props deleted file mode 100644 index 12488dc9b..000000000 --- a/Templates/Empty/buildFiles/VisualStudio 2010/projects/Torque.Cpp.x64.user.props +++ /dev/null @@ -1,11 +0,0 @@ - - - - $(DXSDK_DIR)\Utilities\bin\x64;$(ExecutablePath) - $(DXSDK_DIR)\Include;$(IncludePath) - $(ReferencePath) - $(DXSDK_DIR)\Lib\x64;$(LibraryPath) - $(SourcePath) - $(ExcludePath) - - \ No newline at end of file diff --git a/Templates/Empty/buildFiles/VisualStudio 2010/projects/Torque.rc b/Templates/Empty/buildFiles/VisualStudio 2010/projects/Torque.rc deleted file mode 100644 index cf88543da..000000000 --- a/Templates/Empty/buildFiles/VisualStudio 2010/projects/Torque.rc +++ /dev/null @@ -1,85 +0,0 @@ -//Microsoft Developer Studio generated resource script. -// -#define IDI_ICON1 103 -#define IDI_ICON2 107 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 108 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1000 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "windows.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_ICON1 ICON DISCARDABLE "torque.ico" -IDI_ICON2 ICON DISCARDABLE "torque.ico" - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""windows.h""\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/Templates/Empty/buildFiles/VisualStudio 2010/projects/torque.ico b/Templates/Empty/buildFiles/VisualStudio 2010/projects/torque.ico deleted file mode 100644 index 22ac1a3d1..000000000 Binary files a/Templates/Empty/buildFiles/VisualStudio 2010/projects/torque.ico and /dev/null differ diff --git a/Templates/Empty/buildFiles/VisualStudio 2012/projects/Torque.rc b/Templates/Empty/buildFiles/VisualStudio 2012/projects/Torque.rc deleted file mode 100644 index cf88543da..000000000 --- a/Templates/Empty/buildFiles/VisualStudio 2012/projects/Torque.rc +++ /dev/null @@ -1,85 +0,0 @@ -//Microsoft Developer Studio generated resource script. -// -#define IDI_ICON1 103 -#define IDI_ICON2 107 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 108 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1000 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "windows.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_ICON1 ICON DISCARDABLE "torque.ico" -IDI_ICON2 ICON DISCARDABLE "torque.ico" - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""windows.h""\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/Templates/Empty/buildFiles/VisualStudio 2012/projects/torque.ico b/Templates/Empty/buildFiles/VisualStudio 2012/projects/torque.ico deleted file mode 100644 index 22ac1a3d1..000000000 Binary files a/Templates/Empty/buildFiles/VisualStudio 2012/projects/torque.ico and /dev/null differ diff --git a/Templates/Empty/buildFiles/compile.bat b/Templates/Empty/buildFiles/compile.bat deleted file mode 100644 index 3ca519151..000000000 --- a/Templates/Empty/buildFiles/compile.bat +++ /dev/null @@ -1,67 +0,0 @@ -@echo off -SETLOCAL - -REM Handle our optional parameters -SET COMPILER=%1 -SET CONFIG=%2 - -IF NOT DEFINED COMPILER SET COMPILER=VS2008 -IF NOT DEFINED CONFIG SET CONFIG=Release - -REM Setting up some variables - -REM Detecting the correct Program Files -IF DEFINED PROGRAMFILES(X86) SET PROGRAMROOT=%ProgramFiles(x86)% -IF NOT DEFINED PROGRAMROOT SET PROGRAMROOT=%ProgramFiles% - -REM First the defaults (set up for VS2008 by default) -SET ENVVAR="%PROGRAMROOT%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" -SET BUILDCMD=devenv.com -SET OPTIONS=/useenv /build "%CONFIG%|Win32" -SET BUILDDIR="VisualStudio 2008" - -REM Handle the non-defaults -IF %COMPILER% == VS2010 SET ENVVAR="%PROGRAMROOT%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" - -IF EXIST "%PROGRAMROOT%\Xoreax\IncrediBuild\BuildConsole.exe" SET BUILDCMD="%PROGRAMROOT%\Xoreax\IncrediBuild\BuildConsole.exe" -IF EXIST "%PROGRAMROOT%\Xoreax\IncrediBuild\BuildConsole.exe" SET OPTIONS=/build "%CONFIG%|Win32" - -IF %COMPILER% == VS2010 SET BUILDDIR="VisualStudio 2010" - - -echo Building all solutions under %COMPILER% with the %CONFIG% configuration - -echo Initializing %COMPILER% environment variables... -call %ENVVAR% - -echo Initializing the DirectX SDK environment variables... - -IF "%DXSDK_DIR%" == "" goto error_no_DXSDK_DIR -call "%DXSDK_DIR%Utilities\Bin\dx_setenv.cmd" x86 - -echo Moving to our build directory -cd %BUILDDIR% - -echo - Building -for %%a in (*.sln) do %BUILDCMD% "%%a" %OPTIONS% & IF ERRORLEVEL 1 goto error_compile - -REM It is just polite for a batch file to leave you in the same dir you started in -cd .. - -REM We were successful in everything so go to the end -goto :end - -:error_no_DXSDK_DIR -@echo ERROR: DXSDK_DIR variable is not set. Make sure the DirectX SDK is installed properly. -@goto end_error - -:error_compile -@echo ERROR: There was an error compiling a solution in %CD% -@goto end_error - -:end_error -ENDLOCAL -EXIT /B 1 - -:end -ENDLOCAL diff --git a/Templates/Empty/buildFiles/config/project.conf b/Templates/Empty/buildFiles/config/project.conf deleted file mode 100644 index 640ac9115..000000000 --- a/Templates/Empty/buildFiles/config/project.conf +++ /dev/null @@ -1,22 +0,0 @@ - diff --git a/Templates/Empty/buildFiles/config/project.linux.conf b/Templates/Empty/buildFiles/config/project.linux.conf deleted file mode 100644 index ae266adda..000000000 --- a/Templates/Empty/buildFiles/config/project.linux.conf +++ /dev/null @@ -1,67 +0,0 @@ - diff --git a/Templates/Empty/buildFiles/config/project.linux_ded.conf b/Templates/Empty/buildFiles/config/project.linux_ded.conf deleted file mode 100644 index 36ad788b4..000000000 --- a/Templates/Empty/buildFiles/config/project.linux_ded.conf +++ /dev/null @@ -1,65 +0,0 @@ - diff --git a/Templates/Empty/buildFiles/config/project.mac.conf b/Templates/Empty/buildFiles/config/project.mac.conf deleted file mode 100644 index e5fe3e501..000000000 --- a/Templates/Empty/buildFiles/config/project.mac.conf +++ /dev/null @@ -1,16 +0,0 @@ - diff --git a/Templates/Empty/buildFiles/config/projectCode.conf b/Templates/Empty/buildFiles/config/projectCode.conf deleted file mode 100644 index 57348ea8e..000000000 --- a/Templates/Empty/buildFiles/config/projectCode.conf +++ /dev/null @@ -1,12 +0,0 @@ - \ No newline at end of file diff --git a/Templates/Empty/buildFiles/config/torque3D_dedicated.conf b/Templates/Empty/buildFiles/config/torque3D_dedicated.conf deleted file mode 100644 index 18364e0a5..000000000 --- a/Templates/Empty/buildFiles/config/torque3D_dedicated.conf +++ /dev/null @@ -1,96 +0,0 @@ - diff --git a/Templates/Empty/buildFiles/config/webDeploy.conf b/Templates/Empty/buildFiles/config/webDeploy.conf deleted file mode 100644 index d542271cf..000000000 --- a/Templates/Empty/buildFiles/config/webDeploy.conf +++ /dev/null @@ -1,41 +0,0 @@ - diff --git a/Templates/Empty/buildFiles/config/webDeploy.mac.conf b/Templates/Empty/buildFiles/config/webDeploy.mac.conf deleted file mode 100644 index f466879e3..000000000 --- a/Templates/Empty/buildFiles/config/webDeploy.mac.conf +++ /dev/null @@ -1,20 +0,0 @@ - diff --git a/Templates/Empty/game/Empty.torsion b/Templates/Empty/game/Empty.torsion deleted file mode 100644 index 49bb1b7b5..000000000 --- a/Templates/Empty/game/Empty.torsion +++ /dev/null @@ -1,39 +0,0 @@ - -Empty - -main.cs -dbgSetParameters( #port#, "#password#", true ); - -core -scripts -art -levels -shaders -tools - -cs; gui - - -Release -Empty.exe - -true -true -true -false - - -Debug -Empty_DEBUG.exe - -false -false -true -false - - - -Empty -HEAD -true - diff --git a/Templates/Empty/game/art/datablocks/datablockExec.cs b/Templates/Empty/game/art/datablocks/datablockExec.cs deleted file mode 100644 index e26bcd9dc..000000000 --- a/Templates/Empty/game/art/datablocks/datablockExec.cs +++ /dev/null @@ -1,27 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -// Load up all datablocks. This function is called when -// a server is constructed. - -// LightFlareData and LightAnimData(s) -exec("./lights.cs"); diff --git a/Templates/Empty/game/art/datablocks/lights.cs b/Templates/Empty/game/art/datablocks/lights.cs deleted file mode 100644 index ea82fffd0..000000000 --- a/Templates/Empty/game/art/datablocks/lights.cs +++ /dev/null @@ -1,608 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - - -//------------------------------------------------------------------------------ -// LightAnimData -//------------------------------------------------------------------------------ - -datablock LightAnimData( NullLightAnim ) -{ - animEnabled = false; -}; - -datablock LightAnimData( PulseLightAnim ) -{ - brightnessA = 0; - brightnessZ = 1; - brightnessPeriod = 1; - brightnessKeys = "aza"; - brightnessSmooth = true; -}; - -datablock LightAnimData( SubtlePulseLightAnim ) -{ - brightnessA = 0.5; - brightnessZ = 1; - brightnessPeriod = 1; - brightnessKeys = "aza"; - brightnessSmooth = true; -}; - -datablock LightAnimData( FlickerLightAnim ) -{ - brightnessA = 1; - brightnessZ = 0; - brightnessPeriod = 5; - brightnessKeys = "aaazaaaaaazaaazaaazaaaaazaaaazzaaaazaaaaaazaaaazaaaza"; - brightnessSmooth = false; -}; - -datablock LightAnimData( BlinkLightAnim ) -{ - brightnessA = 0; - brightnessZ = 1; - brightnessPeriod = 5; - brightnessKeys = "azaaaazazaaaaaazaaaazaaaazzaaaaaazaazaaazaaaaaaa"; - brightnessSmooth = false; -}; - -datablock LightAnimData( FireLightAnim ) -{ - brightnessA = 0.75; - brightnessZ = 1; - brightnessPeriod = 0.7; - brightnessKeys = "annzzznnnzzzaznzzzz"; - brightnessSmooth = 0; - offsetA[0] = "-0.05"; - offsetA[1] = "-0.05"; - offsetA[2] = "-0.05"; - offsetZ[0] = "0.05"; - offsetZ[1] = "0.05"; - offsetZ[2] = "0.05"; - offsetPeriod[0] = "1.25"; - offsetPeriod[1] = "1.25"; - offsetPeriod[2] = "1.25"; - offsetKeys[0] = "ahahaazahakayajza"; - offsetKeys[1] = "ahahaazahakayajza"; - offsetKeys[2] = "ahahaazahakayajza"; - rotKeys[0] = ""; - rotKeys[1] = ""; - rotKeys[2] = ""; - colorKeys[0] = ""; - colorKeys[1] = ""; - colorKeys[2] = ""; -}; - -datablock LightAnimData( SpinLightAnim ) -{ - rotA[2] = "0"; - rotZ[2] = "360"; - rotPeriod[2] = "1"; - rotKeys[2] = "az"; - rotSmooth[2] = true; -}; - - -//------------------------------------------------------------------------------ -// LightFlareData -//------------------------------------------------------------------------------ - -datablock LightFlareData( NullLightFlare ) -{ - flareEnabled = false; -}; - -datablock LightFlareData( SunFlareExample ) -{ - overallScale = 4.0; - flareEnabled = true; - renderReflectPass = false; - flareTexture = "art/lights/lensFlareSheet0"; - - elementRect[0] = "512 0 512 512"; - elementDist[0] = 0.0; - elementScale[0] = 2.0; - elementTint[0] = "0.6 0.6 0.6"; - elementRotate[0] = true; - elementUseLightColor[0] = true; - - elementRect[1] = "1152 0 128 128"; - elementDist[1] = 0.3; - elementScale[1] = 0.7; - elementTint[1] = "1.0 1.0 1.0"; - elementRotate[1] = true; - elementUseLightColor[1] = true; - - elementRect[2] = "1024 0 128 128"; - elementDist[2] = 0.5; - elementScale[2] = 0.25; - elementTint[2] = "1.0 1.0 1.0"; - elementRotate[2] = true; - elementUseLightColor[2] = true; - - elementRect[3] = "1024 128 128 128"; - elementDist[3] = 0.8; - elementScale[3] = 0.7; - elementTint[3] = "1.0 1.0 1.0"; - elementRotate[3] = true; - elementUseLightColor[3] = true; - - elementRect[4] = "1024 0 128 128"; - elementDist[4] = 1.18; - elementScale[4] = 0.5; - elementTint[4] = "1.0 1.0 1.0"; - elementRotate[4] = true; - elementUseLightColor[4] = true; - - elementRect[5] = "1152 128 128 128"; - elementDist[5] = 1.25; - elementScale[5] = 0.25; - elementTint[5] = "1.0 1.0 1.0"; - elementRotate[5] = true; - elementUseLightColor[5] = true; - - elementRect[6] = "1024 0 128 128"; - elementDist[6] = 2.0; - elementScale[6] = 0.25; - elementTint[6] = "1.0 1.0 1.0"; - elementRotate[6] = true; - elementUseLightColor[6] = true; - occlusionRadius = "0.25"; -}; - -datablock LightFlareData( SunFlareExample2 ) -{ - overallScale = 2.0; - flareEnabled = true; - renderReflectPass = false; - flareTexture = "art/lights/lensFlareSheet0"; - - elementRect[0] = "1024 0 128 128"; - elementDist[0] = 0.5; - elementScale[0] = 0.25; - elementTint[0] = "1.0 1.0 1.0"; - elementRotate[0] = true; - elementUseLightColor[0] = true; - - elementRect[1] = "1024 128 128 128"; - elementDist[1] = 0.8; - elementScale[1] = 0.7; - elementTint[1] = "1.0 1.0 1.0"; - elementRotate[1] = true; - elementUseLightColor[1] = true; - - elementRect[2] = "1024 0 128 128"; - elementDist[2] = 1.18; - elementScale[2] = 0.5; - elementTint[2] = "1.0 1.0 1.0"; - elementRotate[2] = true; - elementUseLightColor[2] = true; - - elementRect[3] = "1152 128 128 128"; - elementDist[3] = 1.25; - elementScale[3] = 0.25; - elementTint[3] = "1.0 1.0 1.0"; - elementRotate[3] = true; - elementUseLightColor[3] = true; - - elementRect[4] = "1024 0 128 128"; - elementDist[4] = 2.0; - elementScale[4] = 0.25; - elementTint[4] = "0.7 0.7 0.7"; - elementRotate[4] = true; - elementUseLightColor[4] = true; - occlusionRadius = "0.25"; -}; - -datablock LightFlareData(SunFlareExample3) -{ - overallScale = 2.0; - flareEnabled = true; - renderReflectPass = false; - flareTexture = "art/lights/lensflareSheet3.png"; - - elementRect[0] = "0 256 256 256"; - elementDist[0] = "-0.6"; - elementScale[0] = "3.5"; - elementTint[0] = "0.537255 0.537255 0.537255 1"; - elementRotate[0] = true; - elementUseLightColor[0] = true; - - elementRect[1] = "128 128 128 128"; - elementDist[1] = "0.1"; - elementScale[1] = "1.5"; - elementTint[1] = "0.996078 0.976471 0.721569 1"; - elementRotate[1] = true; - elementUseLightColor[1] = true; - - elementRect[2] = "0 0 64 64"; - elementDist[2] = "0.4"; - elementScale[2] = "0.25"; - elementTint[2] = "0 0 1 1"; - elementRotate[2] = true; - elementUseLightColor[2] = true; - - elementRect[3] = "0 0 64 64"; - elementDist[3] = "0.45"; - elementScale[3] = 0.25; - elementTint[3] = "0 1 0 1"; - elementRotate[3] = true; - elementUseLightColor[3] = true; - - elementRect[4] = "0 0 64 64"; - elementDist[4] = "0.5"; - elementScale[4] = 0.25; - elementTint[4] = "1 0 0 1"; - elementRotate[4] = true; - elementUseLightColor[4] = true; - elementRect[9] = "256 0 256 256"; - elementDist[3] = "0.45"; - elementScale[3] = "0.25"; - elementScale[9] = "2"; - elementRect[4] = "0 0 64 64"; - elementRect[5] = "128 0 128 128"; - elementDist[4] = "0.5"; - elementDist[5] = "1.2"; - elementScale[1] = "1.5"; - elementScale[4] = "0.25"; - elementScale[5] = "0.5"; - elementTint[1] = "0.996078 0.976471 0.721569 1"; - elementTint[2] = "0 0 1 1"; - elementTint[5] = "0.721569 0 1 1"; - elementRotate[5] = "0"; - elementUseLightColor[5] = "1"; - elementRect[0] = "0 256 256 256"; - elementRect[1] = "128 128 128 128"; - elementRect[2] = "0 0 64 64"; - elementRect[3] = "0 0 64 64"; - elementDist[0] = "-0.6"; - elementDist[1] = "0.1"; - elementDist[2] = "0.4"; - elementScale[0] = "3.5"; - elementScale[2] = "0.25"; - elementTint[0] = "0.537255 0.537255 0.537255 1"; - elementTint[3] = "0 1 0 1"; - elementTint[4] = "1 0 0 1"; - elementRect[6] = "64 64 64 64"; - elementDist[6] = "0.9"; - elementScale[6] = "4"; - elementTint[6] = "0.00392157 0.721569 0.00392157 1"; - elementRotate[6] = "0"; - elementUseLightColor[6] = "1"; - elementRect[7] = "64 64 64 64"; - elementRect[8] = "64 64 64 64"; - elementDist[7] = "0.25"; - elementDist[8] = "0.18"; - elementDist[9] = "0"; - elementScale[7] = "2"; - elementScale[8] = "0.5"; - elementTint[7] = "0.6 0.0117647 0.741176 1"; - elementTint[8] = "0.027451 0.690196 0.0117647 1"; - elementTint[9] = "0.647059 0.647059 0.647059 1"; - elementRotate[9] = "0"; - elementUseLightColor[7] = "1"; - elementUseLightColor[8] = "1"; - elementRect[10] = "256 256 256 256"; - elementRect[11] = "0 64 64 64"; - elementRect[12] = "0 64 64 64"; - elementRect[13] = "64 0 64 64"; - elementDist[10] = "0"; - elementDist[11] = "-0.3"; - elementDist[12] = "-0.32"; - elementDist[13] = "1"; - elementScale[10] = "10"; - elementScale[11] = "2.5"; - elementScale[12] = "0.3"; - elementScale[13] = "0.4"; - elementTint[10] = "0.321569 0.321569 0.321569 1"; - elementTint[11] = "0.443137 0.0431373 0.00784314 1"; - elementTint[12] = "0.00784314 0.996078 0.0313726 1"; - elementTint[13] = "0.996078 0.94902 0.00784314 1"; - elementUseLightColor[10] = "1"; - elementUseLightColor[11] = "1"; - elementUseLightColor[13] = "1"; - elementRect[14] = "0 0 64 64"; - elementDist[14] = "0.15"; - elementScale[14] = "0.8"; - elementTint[14] = "0.505882 0.0470588 0.00784314 1"; - elementRotate[14] = "1"; - elementUseLightColor[9] = "1"; - elementUseLightColor[14] = "1"; - elementRect[15] = "64 64 64 64"; - elementRect[16] = "0 64 64 64"; - elementRect[17] = "0 0 64 64"; - elementRect[18] = "0 64 64 64"; - elementRect[19] = "256 0 256 256"; - elementDist[15] = "0.8"; - elementDist[16] = "0.7"; - elementDist[17] = "1.4"; - elementDist[18] = "-0.5"; - elementDist[19] = "-1.5"; - elementScale[15] = "3"; - elementScale[16] = "0.3"; - elementScale[17] = "0.2"; - elementScale[18] = "1"; - elementScale[19] = "35"; - elementTint[15] = "0.00784314 0.00784314 0.996078 1"; - elementTint[16] = "0.992157 0.992157 0.992157 1"; - elementTint[17] = "0.996078 0.603922 0.00784314 1"; - elementTint[18] = "0.2 0.00392157 0.47451 1"; - elementTint[19] = "0.607843 0.607843 0.607843 1"; - elementUseLightColor[15] = "1"; - elementUseLightColor[18] = "1"; - elementUseLightColor[19] = "1"; - occlusionRadius = "0.25"; -}; - - - -datablock LightFlareData(SunFlarePacificIsland) -{ - overallScale = 2.0; - flareEnabled = true; - renderReflectPass = false; - flareTexture = "art/lights/lensflareSheet3.png"; - - elementRect[0] = "0 256 256 256"; - elementDist[0] = "-0.6"; - elementScale[0] = "3.5"; - elementTint[0] = "0.537255 0.537255 0.537255 1"; - elementRotate[0] = true; - elementUseLightColor[0] = true; - - elementRect[1] = "128 128 128 128"; - elementDist[1] = "0.1"; - elementScale[1] = "1.5"; - elementTint[1] = "0.996078 0.976471 0.721569 1"; - elementRotate[1] = true; - elementUseLightColor[1] = true; - - elementRect[2] = "0 0 64 64"; - elementDist[2] = "0.4"; - elementScale[2] = "0.25"; - elementTint[2] = "0 0 1 1"; - elementRotate[2] = true; - elementUseLightColor[2] = true; - - elementRect[3] = "0 0 64 64"; - elementDist[3] = "0.45"; - elementScale[3] = 0.25; - elementTint[3] = "0 1 0 1"; - elementRotate[3] = true; - elementUseLightColor[3] = true; - - elementRect[4] = "0 0 64 64"; - elementDist[4] = "0.5"; - elementScale[4] = 0.25; - elementTint[4] = "1 0 0 1"; - elementRotate[4] = true; - elementUseLightColor[4] = true; - elementRect[9] = "256 0 256 256"; - elementDist[3] = "0.45"; - elementScale[3] = "0.25"; - elementScale[9] = "2"; - elementRect[4] = "0 0 64 64"; - elementRect[5] = "128 0 128 128"; - elementDist[4] = "0.5"; - elementDist[5] = "1.2"; - elementScale[1] = "1.5"; - elementScale[4] = "0.25"; - elementScale[5] = "0.5"; - elementTint[1] = "0.996078 0.976471 0.721569 1"; - elementTint[2] = "0 0 1 1"; - elementTint[5] = "0.721569 0 1 1"; - elementRotate[5] = "0"; - elementUseLightColor[5] = "1"; - elementRect[0] = "0 256 256 256"; - elementRect[1] = "128 128 128 128"; - elementRect[2] = "0 0 64 64"; - elementRect[3] = "0 0 64 64"; - elementDist[0] = "-0.6"; - elementDist[1] = "0.1"; - elementDist[2] = "0.4"; - elementScale[0] = "3.5"; - elementScale[2] = "0.25"; - elementTint[0] = "0.537255 0.537255 0.537255 1"; - elementTint[3] = "0 1 0 1"; - elementTint[4] = "1 0 0 1"; - elementRect[6] = "64 64 64 64"; - elementDist[6] = "0.9"; - elementScale[6] = "4"; - elementTint[6] = "0.00392157 0.721569 0.00392157 1"; - elementRotate[6] = "0"; - elementUseLightColor[6] = "1"; - elementRect[7] = "64 64 64 64"; - elementRect[8] = "64 64 64 64"; - elementDist[7] = "0.25"; - elementDist[8] = "0.18"; - elementDist[9] = "0"; - elementScale[7] = "2"; - elementScale[8] = "0.5"; - elementTint[7] = "0.6 0.0117647 0.741176 1"; - elementTint[8] = "0.027451 0.690196 0.0117647 1"; - elementTint[9] = "0.647059 0.647059 0.647059 1"; - elementRotate[9] = "0"; - elementUseLightColor[7] = "1"; - elementUseLightColor[8] = "1"; - elementRect[10] = "256 256 256 256"; - elementRect[11] = "0 64 64 64"; - elementRect[12] = "0 64 64 64"; - elementRect[13] = "64 0 64 64"; - elementDist[10] = "0"; - elementDist[11] = "-0.3"; - elementDist[12] = "-0.32"; - elementDist[13] = "1"; - elementScale[10] = "10"; - elementScale[11] = "2.5"; - elementScale[12] = "0.3"; - elementScale[13] = "0.4"; - elementTint[10] = "0.321569 0.321569 0.321569 1"; - elementTint[11] = "0.443137 0.0431373 0.00784314 1"; - elementTint[12] = "0.00784314 0.996078 0.0313726 1"; - elementTint[13] = "0.996078 0.94902 0.00784314 1"; - elementUseLightColor[10] = "1"; - elementUseLightColor[11] = "1"; - elementUseLightColor[13] = "1"; - elementRect[14] = "0 0 64 64"; - elementDist[14] = "0.15"; - elementScale[14] = "0.8"; - elementTint[14] = "0.505882 0.0470588 0.00784314 1"; - elementRotate[14] = "1"; - elementUseLightColor[9] = "1"; - elementUseLightColor[14] = "1"; - elementRect[15] = "64 64 64 64"; - elementRect[16] = "0 64 64 64"; - elementRect[17] = "0 0 64 64"; - elementRect[18] = "0 64 64 64"; - elementRect[19] = "256 0 256 256"; - elementDist[15] = "0.8"; - elementDist[16] = "0.7"; - elementDist[17] = "1.4"; - elementDist[18] = "-0.5"; - elementDist[19] = "-1.5"; - elementScale[15] = "3"; - elementScale[16] = "0.3"; - elementScale[17] = "0.2"; - elementScale[18] = "1"; - elementScale[19] = "35"; - elementTint[15] = "0.00784314 0.00784314 0.996078 1"; - elementTint[16] = "0.992157 0.992157 0.992157 1"; - elementTint[17] = "0.996078 0.603922 0.00784314 1"; - elementTint[18] = "0.2 0.00392157 0.47451 1"; - elementTint[19] = "0.607843 0.607843 0.607843 1"; - elementUseLightColor[15] = "1"; - elementUseLightColor[18] = "1"; - elementUseLightColor[19] = "1"; -}; - - - -datablock LightFlareData( LightFlareExample0 ) -{ - overallScale = 2.0; - flareEnabled = true; - renderReflectPass = true; - flareTexture = "art/lights/lensFlareSheet1"; - - elementRect[0] = "0 512 512 512"; - elementDist[0] = 0.0; - elementScale[0] = 0.5; - elementTint[0] = "1.0 1.0 1.0"; - elementRotate[0] = false; - elementUseLightColor[0] = false; - - elementRect[1] = "512 0 512 512"; - elementDist[1] = 0.0; - elementScale[1] = 2.0; - elementTint[1] = "0.5 0.5 0.5"; - elementRotate[1] = false; - elementUseLightColor[1] = false; - occlusionRadius = "0.25"; -}; - -datablock LightFlareData( LightFlareExample1 ) -{ - overallScale = 2.0; - flareEnabled = true; - renderReflectPass = true; - flareTexture = "art/lights/lensFlareSheet1"; - - elementRect[0] = "512 512 512 512"; - elementDist[0] = 0.0; - elementScale[0] = 0.5; - elementTint[0] = "1.0 1.0 1.0"; - elementRotate[0] = false; - elementUseLightColor[0] = false; - - elementRect[1] = "512 0 512 512"; - elementDist[1] = 0.0; - elementScale[1] = 2.0; - elementTint[1] = "0.5 0.5 0.5"; - elementRotate[1] = false; - elementUseLightColor[1] = false; - occlusionRadius = "0.25"; -}; - -datablock LightFlareData( LightFlareExample2 ) -{ - overallScale = 2.0; - flareEnabled = true; - renderReflectPass = true; - flareTexture = "art/lights/lensFlareSheet0"; - - elementRect[0] = "512 512 512 512"; - elementDist[0] = 0.0; - elementScale[0] = 0.5; - elementTint[0] = "1.0 1.0 1.0"; - elementRotate[0] = true; - elementUseLightColor[0] = true; - - elementRect[1] = "512 0 512 512"; - elementDist[1] = 0.0; - elementScale[1] = 2.0; - elementTint[1] = "0.7 0.7 0.7"; - elementRotate[1] = true; - elementUseLightColor[1] = true; - - elementRect[2] = "1152 0 128 128"; - elementDist[2] = 0.3; - elementScale[2] = 0.5; - elementTint[2] = "1.0 1.0 1.0"; - elementRotate[2] = true; - elementUseLightColor[2] = true; - - elementRect[3] = "1024 0 128 128"; - elementDist[3] = 0.5; - elementScale[3] = 0.25; - elementTint[3] = "1.0 1.0 1.0"; - elementRotate[3] = true; - elementUseLightColor[3] = true; - - elementRect[4] = "1024 128 128 128"; - elementDist[4] = 0.8; - elementScale[4] = 0.6; - elementTint[4] = "1.0 1.0 1.0"; - elementRotate[4] = true; - elementUseLightColor[4] = true; - - elementRect[5] = "1024 0 128 128"; - elementDist[5] = 1.18; - elementScale[5] = 0.5; - elementTint[5] = "0.7 0.7 0.7"; - elementRotate[5] = true; - elementUseLightColor[5] = true; - - elementRect[6] = "1152 128 128 128"; - elementDist[6] = 1.25; - elementScale[6] = 0.35; - elementTint[6] = "0.8 0.8 0.8"; - elementRotate[6] = true; - elementUseLightColor[6] = true; - - elementRect[7] = "1024 0 128 128"; - elementDist[7] = 2.0; - elementScale[7] = 0.25; - elementTint[7] = "1.0 1.0 1.0"; - elementRotate[7] = true; - elementUseLightColor[7] = true; -}; diff --git a/Templates/Empty/game/art/datablocks/managedDatablocks.cs b/Templates/Empty/game/art/datablocks/managedDatablocks.cs deleted file mode 100644 index c935f068a..000000000 --- a/Templates/Empty/game/art/datablocks/managedDatablocks.cs +++ /dev/null @@ -1,24 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -// This is the default save location for any Datablocks created in the -// Datablock Editor (this script is executed from onServerCreated()) \ No newline at end of file diff --git a/Templates/Empty/game/art/decals/managedDecalData.cs b/Templates/Empty/game/art/decals/managedDecalData.cs deleted file mode 100644 index 0f5501c61..000000000 --- a/Templates/Empty/game/art/decals/managedDecalData.cs +++ /dev/null @@ -1,25 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -// This is the default save location for any Decal datablocks created in the -// Decal Editor (this script is executed from onServerCreated()) - diff --git a/Templates/Empty/game/art/environment/FogMod_heavy.dds b/Templates/Empty/game/art/environment/FogMod_heavy.dds deleted file mode 100644 index 197dd4332..000000000 Binary files a/Templates/Empty/game/art/environment/FogMod_heavy.dds and /dev/null differ diff --git a/Templates/Empty/game/art/environment/FogMod_light.dds b/Templates/Empty/game/art/environment/FogMod_light.dds deleted file mode 100644 index d726795fa..000000000 Binary files a/Templates/Empty/game/art/environment/FogMod_light.dds and /dev/null differ diff --git a/Templates/Empty/game/art/environment/FogMod_med.dds b/Templates/Empty/game/art/environment/FogMod_med.dds deleted file mode 100644 index 2b25d3263..000000000 Binary files a/Templates/Empty/game/art/environment/FogMod_med.dds and /dev/null differ diff --git a/Templates/Empty/game/art/environment/Fog_Cube.DAE b/Templates/Empty/game/art/environment/Fog_Cube.DAE deleted file mode 100644 index 34cad9f48..000000000 --- a/Templates/Empty/game/art/environment/Fog_Cube.DAE +++ /dev/null @@ -1,177 +0,0 @@ - - - - - Richard - OpenCOLLADA for 3ds Max; Version: 1.4.1; Revision: exported; Platform: x64; Configuration: Release_Max2011_static - file:///G:/Documents%20and%20Settings/Richard/Mijn%20documenten/3dsmax/scenes/FogVolumes.max - - 2014-08-16T10:10:23 - 2014-08-16T10:10:23 - - Z_UP - - - - - - - - 0 0 0 1 - - - 0.588 0.588 0.588 1 - - - 0.588 0.588 0.588 1 - - - 0.9 0.9 0.9 1 - - - 0 - - - 0 0 0 1 - - - 1 1 1 1 - - - 1 - - - - - - - - 0 - 0 - 0 - 1.5 - 0 - 3 - 1 - 0 - - - 1 - 1 - 0 - 0.1 - 0 - - - - - - - - - - - - - - - -0.85 -1 -0.85 0.85 -0.85 -1 -1 0.85 -0.85 0.85 0.85 -1 -0.85 -1 0.85 1 -0.85 0.85 -1 0.85 0.85 0.85 1 0.85 -1 -0.85 -0.85 -0.85 -0.85 -1 1 -0.85 -0.85 0.85 -1 -0.85 -0.85 1 -0.85 -0.85 0.85 -1 0.85 1 -0.85 1 0.85 -0.85 -0.85 -0.85 1 -1 -0.85 0.85 0.85 -0.85 1 0.85 -1 0.85 -0.85 0.85 1 -0.85 1 0.85 0.85 0.85 1 1 0.85 0.85 - - - - - - - - - - -0.341586 -0.341586 -0.8755786 -0.341586 0.341586 -0.8755788 0.341586 0.341586 -0.8755788 0.341586 -0.341586 -0.8755788 -0.341586 -0.341586 0.8755786 0.341586 -0.341586 0.8755788 0.341586 0.341586 0.8755788 -0.341586 0.341586 0.8755788 -0.341586 -0.8755786 -0.341586 0.341586 -0.8755788 -0.341586 0.341586 -0.8755786 0.341586 -0.341586 -0.8755788 0.341586 0.8755786 -0.341586 -0.341586 0.8755788 0.341586 -0.341586 0.8755786 0.341586 0.341586 0.8755788 -0.341586 0.341586 0.341586 0.8755786 -0.341586 -0.341586 0.8755788 -0.341586 -0.341586 0.8755786 0.341586 0.341586 0.8755788 0.341586 -0.8755786 0.341586 -0.341586 -0.8755788 -0.341586 -0.341586 -0.8755786 -0.341586 0.341586 -0.8755788 0.341586 0.341586 - - - - - - - - - - 0 0 0 1 0 0 0 1 0 1 1 0 0 0 0 1 0 0 0 1 0 1 1 0 0 0 0 1 0 0 0 1 0 1 1 0 0.07542458 0.07542461 4.99755e-4 0.07542479 0.07542461 4.99547e-4 0.07542455 0.07542461 4.99755e-4 0.07542461 0.9245752 4.99547e-4 0.07542458 0.9245754 4.99755e-4 0.07542458 0.9245754 0.9995003 0.07542455 0.9245754 4.99755e-4 0.07542455 0.9245754 0.9995003 0.9245752 0.07542461 4.99576e-4 0.9245754 0.07542479 4.99547e-4 0.07542458 0.07542461 0.9995003 0.9245752 0.07542461 4.99576e-4 0.9245752 0.07542461 0.9995004 0.9245752 0.9245754 4.99547e-4 0.07542455 0.07542461 0.9995003 0.9245752 0.07542461 0.9995004 0.07542461 0.07542479 0.9995005 0.9245752 0.9245754 4.99576e-4 0.9245752 0.07542461 0.9995005 0.9245752 0.9245754 4.99576e-4 0.07542479 0.9245754 0.9995005 0.9245752 0.9245754 0.9995004 0.9245754 0.9245752 0.9995005 0.9245752 0.9245754 0.9995004 0.9995003 0.07542461 0.07542458 0.9245752 4.99547e-4 0.07542461 0.9245752 4.99547e-4 0.07542461 0.9995003 0.07542461 0.07542458 0.9995003 0.07542461 0.9245754 0.9245752 4.99547e-4 0.9245754 0.9245752 4.99547e-4 0.9245754 0.9995003 0.07542461 0.9245754 0.9995003 0.9245754 0.07542458 0.9245752 0.9995005 0.07542461 0.9995003 0.9245754 0.07542458 0.9245752 0.9995005 0.07542461 0.9995003 0.9245754 0.9245754 0.9245752 0.9995005 0.9245754 0.9995003 0.9245754 0.9245754 0.9245752 0.9995005 0.9245754 0.9995004 0.07542482 0.07542461 0.9995003 0.9245754 0.07542461 0.9245752 0.9995004 0.07542461 0.07542455 0.9995003 0.07542461 4.99606e-4 0.9245752 0.07542461 4.99725e-4 0.07542458 0.07542461 0.07542479 4.99576e-4 0.07542461 0.9245754 4.99755e-4 0.07542461 0.07542458 4.99755e-4 0.9245754 0.9245752 4.99576e-4 0.9245754 0.9995003 0.07542458 0.9245754 0.9995004 0.9245752 0.9245754 0.9245754 0.9995003 0.9245754 0.07542482 0.9995004 0.9245754 4.99755e-4 0.9245754 0.9245754 4.99576e-4 0.07542482 0.9245754 0.9995003 0.07542461 0.07542458 0.9995003 0.9245754 0.07542458 0.9995003 0.9245754 0.07542458 0.9995003 0.07542461 0.07542458 0.9995003 0.07542461 0.9245754 0.9995003 0.9245754 0.9245754 0.9995003 0.07542461 0.9245754 0.9995003 0.9245754 0.9245754 - - - - - - - - - - -0.8644259 0.01841655 0.3300502 -0.8715108 -0.05526615 0.3184382 -0.8644259 0.01841664 -0.3300501 -0.8715108 -0.05526611 -0.3184382 0.8738725 -0.06754867 0.3145678 0.8597026 -0.006149054 -0.3377912 0.8738725 -0.06754874 -0.3145678 0.8597026 -0.006148929 0.3377911 0.883319 -0.2990854 -0.116681 0.8478944 0.3571441 -0.06756432 0.8597026 0.3377913 0.00614921 0.883319 -0.2990854 0.116681 0.2990854 0.883319 -0.116681 -0.3571441 0.8478944 -0.06756432 -0.3377913 0.8597026 0.00614921 0.2990854 0.883319 0.116681 -0.883319 0.2990854 -0.116681 -0.8478944 -0.3571441 -0.06756432 -0.8597026 -0.3377913 0.00614921 -0.883319 0.2990854 0.116681 -0.2990854 -0.883319 -0.116681 0.3571441 -0.8478944 -0.06756432 0.3377913 -0.8597026 0.00614921 -0.2990854 -0.883319 0.116681 0.8360862 -0.3764972 0.1289794 0.7071068 -0.7071068 0 0.7071068 0.7071068 0 0.3764972 0.8360862 0.1289794 -0.3764972 -0.8360862 0.1289794 -0.7071068 -0.7071068 0 -0.7071068 0.7071068 0 -0.8360862 0.3764972 0.1289794 0.8360862 -0.3764971 -0.1289794 0.7071068 -0.7071068 0 0.3764971 0.8360862 -0.1289794 0.7071068 0.7071068 0 -0.3764971 -0.8360862 -0.1289794 -0.7071068 -0.7071068 0 -0.8360862 0.3764971 -0.1289794 -0.7071068 0.7071068 0 -0.376497 0.1289792 0.8360862 -0.3764973 -0.1289798 0.8360861 -0.8833191 -0.2990855 0.1166808 -0.883319 0.2990853 -0.1166812 -0.3764971 0.1289794 -0.8360862 -0.3764972 -0.1289795 -0.8360862 -0.8833191 -0.2990855 -0.1166807 -0.883319 0.2990853 0.1166812 0.883319 -0.2990853 0.1166812 0.8833191 0.2990855 -0.1166807 0.3764971 0.1289797 -0.8360862 0.3764971 -0.1289793 -0.8360862 0.883319 -0.2990853 -0.1166811 0.8833191 0.2990855 0.1166808 0.3764972 0.1289799 0.8360861 0.3764971 -0.128979 0.8360862 0.3764972 0.8360862 0.1289794 0.3764971 0.8360862 -0.1289794 0.8360862 -0.3764971 -0.1289794 0.8360862 -0.3764972 0.1289794 -0.8360862 0.3764972 0.1289794 -0.8360862 0.3764971 -0.1289794 -0.3764972 -0.8360862 0.1289794 -0.3764971 -0.8360862 -0.1289794 - - - - - - - - - - 0.1043954 -0.9396398 0.3258505 -0.06496345 -0.9379679 -0.3405817 0.1043953 -0.9396398 -0.3258505 -0.06496349 -0.937968 0.3405817 0.05187585 -0.9370471 -0.3453283 -0.1307439 -0.939827 -0.3156443 0.05187577 -0.9370471 0.3453283 -0.1307438 -0.939827 0.3156443 0 0.3634471 -0.9316148 -0.196368 0.2889368 -0.9369926 0.1307441 -0.3156442 -0.939827 0 -0.3634471 -0.9316148 -0.3634471 0 -0.9316148 -0.2889368 -0.196368 -0.9369926 0.3156442 0.1307441 -0.939827 0.3634471 0 -0.9316148 0 -0.3634471 -0.9316148 0.196368 -0.2889368 -0.9369926 -0.1307441 0.3156442 -0.939827 0 0.3634471 -0.9316148 0.3634471 0 -0.9316148 0.2889368 0.196368 -0.9369926 -0.3156442 -0.1307441 -0.939827 -0.3634471 0 -0.9316148 0.2608475 0.2608475 -0.9294714 0.6191276 0.6191276 -0.4830755 -0.6191276 0.6191276 -0.4830755 -0.2608475 0.2608475 -0.9294714 0.2608475 -0.2608475 -0.9294714 0.6191276 -0.6191276 -0.4830755 -0.6191276 -0.6191276 -0.4830755 -0.2608475 -0.2608475 -0.9294714 -0.2608475 -0.2608475 -0.9294714 -0.6191276 -0.6191276 -0.4830755 0.2608475 -0.2608475 -0.9294714 0.6191276 -0.6191276 -0.4830755 -0.2608475 0.2608475 -0.9294714 -0.6191276 0.6191276 -0.4830755 0.2608475 0.2608475 -0.9294714 0.6191276 0.6191276 -0.4830755 0.2608476 -0.9294715 0.2608473 -0.2608474 -0.9294714 -0.2608479 1.81809e-7 -0.363447 -0.9316149 2.27262e-7 -0.3634472 -0.9316148 0.2608475 -0.9294714 -0.2608475 -0.2608475 -0.9294714 0.2608477 2.72714e-7 -0.363447 0.9316149 2.72714e-7 -0.3634472 0.9316148 2.72714e-7 -0.3634472 -0.9316148 2.72714e-7 -0.363447 -0.9316149 -0.2608474 -0.9294714 -0.2608478 0.2608476 -0.9294714 0.2608474 1.81809e-7 -0.3634472 0.9316148 2.27262e-7 -0.3634471 0.9316149 -0.2608473 -0.9294714 0.260848 0.2608477 -0.9294715 -0.2608472 -0.2608475 0.2608475 -0.9294714 0.2608475 -0.2608475 -0.9294714 -0.2608475 -0.2608475 -0.9294714 0.2608475 0.2608475 -0.9294714 -0.2608475 -0.2608475 -0.9294714 0.2608475 0.2608475 -0.9294714 0.2608475 -0.2608475 -0.9294714 -0.2608475 0.2608475 -0.9294714 - - - - - - - - - - - - - - - - - -

9 0 21 0 13 1 25 1 3 2 15 2 3 2 15 2 1 3 13 3 9 0 21 0 16 4 28 4 18 5 30 5 22 6 34 6 22 6 34 6 20 7 32 7 16 4 28 4 0 8 12 8 11 9 23 9 19 10 31 10 19 10 31 10 4 11 16 11 0 8 12 8 10 12 22 12 15 13 27 13 23 14 35 14 23 14 35 14 5 15 17 15 10 12 22 12 14 16 26 16 12 17 24 17 21 18 33 18 21 18 33 18 7 19 19 19 14 16 26 16 2 20 14 20 8 21 20 21 17 22 29 22 17 22 29 22 6 23 18 23 2 20 14 20 0 8 36 24 8 21 20 21 9 0 37 25 1 3 38 26 10 12 39 27 11 9 23 9 2 20 40 28 12 17 24 17 13 1 41 29 3 2 42 30 14 16 43 31 15 13 27 13 4 11 44 32 16 4 45 33 17 22 29 22 5 15 46 34 18 5 47 35 19 10 31 10 6 23 48 36 20 7 49 37 21 18 33 18 7 19 50 38 22 6 51 39 23 14 35 14 9 0 21 0 8 21 52 40 2 20 53 41 2 20 53 41 13 1 25 1 9 0 21 0 13 1 25 1 12 17 54 42 14 16 55 43 14 16 55 43 3 2 15 2 13 1 25 1 3 2 15 2 15 13 56 44 10 12 57 45 10 12 57 45 1 3 13 3 3 2 15 2 1 3 13 3 11 9 58 46 0 8 59 47 0 8 59 47 9 0 21 0 1 3 13 3 16 4 28 4 4 11 60 48 19 10 61 49 19 10 61 49 18 5 30 5 16 4 28 4 18 5 30 5 5 15 62 50 23 14 63 51 23 14 63 51 22 6 34 6 18 5 30 5 22 6 34 6 7 19 64 52 21 18 65 53 21 18 65 53 20 7 32 7 22 6 34 6 20 7 32 7 6 23 66 54 17 22 67 55 17 22 67 55 16 4 28 4 20 7 32 7 11 9 23 9 10 12 68 56 5 15 69 57 5 15 69 57 19 10 31 10 11 9 23 9 4 11 70 58 17 22 29 22 8 21 20 21 8 21 20 21 0 8 71 59 4 11 70 58 15 13 27 13 14 16 72 60 7 19 73 61 7 19 73 61 23 14 35 14 15 13 27 13 12 17 24 17 2 20 74 62 6 23 75 63 6 23 75 63 21 18 33 18 12 17 24 17

-
-
-
-
- - - - - 0 0 0 - - - - - - - - - - - - - - - - - - - - 1 - 1 - 1 - 1 - - - - - - - - -
\ No newline at end of file diff --git a/Templates/Empty/game/art/environment/Fog_Cube.cs b/Templates/Empty/game/art/environment/Fog_Cube.cs deleted file mode 100644 index 3c686032c..000000000 --- a/Templates/Empty/game/art/environment/Fog_Cube.cs +++ /dev/null @@ -1,8 +0,0 @@ - -singleton TSShapeConstructor(Fog_CubeDAE) -{ - baseShape = "./Fog_Cube.DAE"; - lodType = "TrailingNumber"; - neverImport = "env*"; - loadLights = "0"; -}; diff --git a/Templates/Empty/game/art/gui/Torque-3D-logo.png b/Templates/Empty/game/art/gui/Torque-3D-logo.png deleted file mode 100644 index 2b8d32e43..000000000 Binary files a/Templates/Empty/game/art/gui/Torque-3D-logo.png and /dev/null differ diff --git a/Templates/Empty/game/art/gui/chooseLevelDlg.gui b/Templates/Empty/game/art/gui/chooseLevelDlg.gui deleted file mode 100644 index 747529cb4..000000000 --- a/Templates/Empty/game/art/gui/chooseLevelDlg.gui +++ /dev/null @@ -1,273 +0,0 @@ -//--- OBJECT WRITE BEGIN --- -%guiContent = new GuiControl(ChooseLevelDlg) { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "1"; - Profile = "GuiOverlayProfile"; - HorizSizing = "width"; - VertSizing = "height"; - position = "0 0"; - Extent = "1024 768"; - MinExtent = "8 8"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "GuiToolTipProfile"; - hovertime = "1000"; - - new GuiWindowCtrl(ChooseLevelWindow) { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "1"; - Profile = "GuiWindowProfile"; - HorizSizing = "center"; - VertSizing = "center"; - Position = "252 224"; - Extent = "600 433"; - MinExtent = "8 8"; - canSave = "1"; - isDecoy = "0"; - Visible = "1"; - tooltipprofile = "GuiToolTipProfile"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - resizeWidth = "0"; - resizeHeight = "0"; - canMove = "1"; - canClose = "1"; - canMinimize = "0"; - canMaximize = "0"; - minSize = "50 50"; - EdgeSnap = "1"; - text = "Choose Level"; - closeCommand = "Canvas.popDialog(ChooseLevelDlg);"; - - new GuiBitmapCtrl() { - canSaveDynamicFields = "1"; - internalName = "CurrentPreview"; - Enabled = "1"; - isContainer = "0"; - Profile = "GuiDefaultProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "10 31"; - Extent = "400 300"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "GuiToolTipProfile"; - hovertime = "1000"; - bitmap = "./no-preview"; - wrap = "0"; - }; - - new GuiTextCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - internalName = "LevelName"; - isContainer = "0"; - Profile = "GuiMediumTextProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "420 31"; - Extent = "165 18"; - MinExtent = "8 8"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "GuiToolTipProfile"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "Level"; - maxLength = "255"; - }; - new GuiTextCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "GuiTextProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "420 50"; - Extent = "72 18"; - MinExtent = "8 8"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "GuiToolTipProfile"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "Description:"; - maxLength = "255"; - }; - new GuiMLTextCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - internalName = "LevelDescription"; - isContainer = "0"; - Profile = "GuiMLTextProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "420 76"; - Extent = "165 189"; - MinExtent = "8 8"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "GuiToolTipProfile"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = ""; - maxLength = "255"; - }; - new GuiCheckBoxCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "GuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "420 303"; - Extent = "45 23"; - MinExtent = "8 8"; - canSave = "1"; - Visible = "1"; - Variable = "pref::HostMultiPlayer"; - tooltipprofile = "GuiToolTipProfile"; - hovertime = "1000"; - text = " Host"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - useInactiveState = "0"; - }; - new GuiButtonCtrl(ChooseLevelDlgGoBtn) { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "GuiMenuButtonProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "458 287"; - Extent = "143 56"; - MinExtent = "8 8"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "GuiToolTipProfile"; - hovertime = "1000"; - text = "Go!"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "1"; - }; - - new GuiBitmapButtonCtrl() { - canSaveDynamicFields = "1"; - internalName = "PreviousSmallPreviews"; - Enabled = "1"; - isContainer = "0"; - Profile = "GuiDefaultProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "10 343"; - Extent = "11 81"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "GuiToolTipProfile"; - hovertime = "1000"; - bitmap = "art/gui/previous-button"; - wrap = "0"; - command = "ChooseLevelWindow.previousPreviews();"; - }; - - new GuiDynamicCtrlArrayControl() { - internalName = "SmallPreviews"; - position = "24 343"; - extent = "600 81"; - autoCellSize = true; - colSpacing = 3; - colCount = 5; - rowCount = 1; - }; - - new GuiBitmapButtonCtrl() { - canSaveDynamicFields = "1"; - internalName = "NextSmallPreviews"; - Enabled = "1"; - isContainer = "0"; - Profile = "GuiDefaultProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "579 343"; - Extent = "11 81"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "GuiToolTipProfile"; - hovertime = "1000"; - bitmap = "art/gui/next-button"; - wrap = "0"; - command = "ChooseLevelWindow.nextPreviews();"; - }; - - new GuiTextListCtrl(CL_levelList) { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "1"; - Profile = "GuiTextArrayProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "1 1"; - Extent = "421 144"; - MinExtent = "8 8"; - canSave = "1"; - Visible = "0"; - tooltipprofile = "GuiToolTipProfile"; - hovertime = "1000"; - enumerate = "0"; - resizeCell = "1"; - columns = "0"; - fitParentWidth = "1"; - clipColumnText = "0"; - }; - }; -}; -//--- OBJECT WRITE END --- - -// Do this onMouseUp not via Command which occurs onMouseDown so we do -// not have a lingering mouseUp event lingering in the ether. -function ChooseLevelDlgGoBtn::onMouseUp( %this ) -{ - // So we can't fire the button when loading is in progress. - if ( isObject( ServerGroup ) ) - return; - - // Launch the chosen level with the editor open? - if ( ChooseLevelDlg.launchInEditor ) - { - activatePackage( "BootEditor" ); - ChooseLevelDlg.launchInEditor = false; - StartLevel("", "SinglePlayer"); - } - else - { - StartLevel(); - } -} diff --git a/Templates/Empty/game/art/gui/customProfiles.cs b/Templates/Empty/game/art/gui/customProfiles.cs deleted file mode 100644 index 235c665e6..000000000 --- a/Templates/Empty/game/art/gui/customProfiles.cs +++ /dev/null @@ -1,26 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -// ---------------------------------------------------------------------------- -// This is the default save location for any GuiProfiles created in the -// Gui Editor -// ---------------------------------------------------------------------------- diff --git a/Templates/Empty/game/art/gui/gameProfiles.cs b/Templates/Empty/game/art/gui/gameProfiles.cs deleted file mode 100644 index 02fd14721..000000000 --- a/Templates/Empty/game/art/gui/gameProfiles.cs +++ /dev/null @@ -1,25 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// Game specific profiles are located here -//----------------------------------------------------------------------------- \ No newline at end of file diff --git a/Templates/Empty/game/art/gui/hudfill.png b/Templates/Empty/game/art/gui/hudfill.png deleted file mode 100644 index e435854d2..000000000 Binary files a/Templates/Empty/game/art/gui/hudfill.png and /dev/null differ diff --git a/Templates/Empty/game/art/gui/loadingGui.gui b/Templates/Empty/game/art/gui/loadingGui.gui deleted file mode 100644 index 2704adeab..000000000 --- a/Templates/Empty/game/art/gui/loadingGui.gui +++ /dev/null @@ -1,99 +0,0 @@ -//--- OBJECT WRITE BEGIN --- -%guiContent = singleton GuiChunkedBitmapCtrl(LoadingGui) { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "1"; - Profile = "GuiContentProfile"; - HorizSizing = "width"; - VertSizing = "height"; - Position = "0 0"; - Extent = "800 600"; - MinExtent = "8 8"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "GuiToolTipProfile"; - hovertime = "1000"; - bitmap = "art/gui/background"; - useVariable = "0"; - tile = "0"; - - new GuiControl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "1"; - Profile = "GuiDefaultProfile"; - HorizSizing = "center"; - VertSizing = "center"; - Position = "151 217"; - Extent = "497 166"; - MinExtent = "8 8"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "GuiToolTipProfile"; - hovertime = "1000"; - - new GuiBitmapCtrl(LoadingLogo) { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "GuiDefaultProfile"; - HorizSizing = "center"; - VertSizing = "bottom"; - Position = "27 6"; - Extent = "443 139"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "GuiToolTipProfile"; - hovertime = "1000"; - bitmap = "art/gui/Torque-3D-logo.png"; - wrap = "0"; - }; - singleton GuiProgressBitmapCtrl(LoadingProgress) { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "GuiProgressBitmapProfile"; - HorizSizing = "center"; - VertSizing = "bottom"; - Position = "17 126"; - Extent = "464 24"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "GuiToolTipProfile"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - maxLength = "1024"; - }; - singleton GuiTextCtrl(LoadingProgressTxt) { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "GuiProgressTextProfile"; - HorizSizing = "center"; - VertSizing = "bottom"; - Position = "28 144"; - Extent = "440 20"; - MinExtent = "8 8"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "GuiToolTipProfile"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "WAITING FOR SERVER"; - maxLength = "255"; - }; - }; -}; -//--- OBJECT WRITE END --- diff --git a/Templates/Empty/game/art/gui/mainMenuGui.gui b/Templates/Empty/game/art/gui/mainMenuGui.gui deleted file mode 100644 index 212944c56..000000000 --- a/Templates/Empty/game/art/gui/mainMenuGui.gui +++ /dev/null @@ -1,191 +0,0 @@ -//--- OBJECT WRITE BEGIN --- -%guiContent = new GuiChunkedBitmapCtrl(MainMenuGui) { - bitmap = "art/gui/background"; - useVariable = "0"; - tile = "0"; - position = "0 0"; - extent = "1024 768"; - minExtent = "8 8"; - horizSizing = "width"; - vertSizing = "height"; - profile = "GuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "1"; - Enabled = "1"; - isDecoy = "0"; - - new GuiBitmapCtrl(MainMenuAppLogo) { - bitmap = "art/gui/Torque-3D-logo.png"; - wrap = "0"; - position = "540 30"; - extent = "443 139"; - minExtent = "8 2"; - horizSizing = "left"; - vertSizing = "bottom"; - profile = "GuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "1"; - Enabled = "1"; - isDecoy = "0"; - }; - new GuiControl() { - position = "359 171"; - extent = "306 425"; - minExtent = "8 2"; - horizSizing = "center"; - vertSizing = "center"; - profile = "GuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiButtonCtrl() { - text = "Play"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "1"; - position = "9 26"; - extent = "219 75"; - minExtent = "8 8"; - horizSizing = "relative"; - vertSizing = "bottom"; - profile = "GuiMenuButtonProfile"; - visible = "1"; - active = "1"; - command = "Canvas.pushDialog(ChooseLevelDlg);"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiButtonCtrl() { - text = "Options"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "9 104"; - extent = "289 75"; - minExtent = "8 8"; - horizSizing = "relative"; - vertSizing = "bottom"; - profile = "GuiMenuButtonProfile"; - visible = "1"; - active = "1"; - command = "Canvas.pushDialog(optionsDlg);"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiButtonCtrl() { - text = "Gui Editor"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "9 182"; - extent = "289 75"; - minExtent = "8 8"; - horizSizing = "relative"; - vertSizing = "bottom"; - profile = "GuiMenuButtonProfile"; - visible = "1"; - active = "1"; - command = "toggleGuiEditor(1);"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "The GUI Editor is accessible in-game by pressing F10"; - hovertime = "1000"; - isContainer = "0"; - internalName = "GuiEditorButton"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiButtonCtrl() { - text = "World Editor"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "9 260"; - extent = "289 75"; - minExtent = "8 8"; - horizSizing = "relative"; - vertSizing = "bottom"; - profile = "GuiMenuButtonProfile"; - visible = "1"; - active = "1"; - command = "toggleEditor(1);"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "The World Editor is accessible in-game by pressing F11"; - hovertime = "1000"; - isContainer = "0"; - internalName = "WorldEditorButton"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiButtonCtrl() { - text = "Exit"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "9 338"; - extent = "289 75"; - minExtent = "8 8"; - horizSizing = "relative"; - vertSizing = "bottom"; - profile = "GuiMenuButtonProfile"; - visible = "1"; - active = "1"; - command = "quit();"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - internalName = "ExitButton"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiButtonCtrl() { - text = "Replay"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "215 26"; - extent = "83 75"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiMenuButtonProfile"; - visible = "1"; - active = "1"; - command = "Canvas.pushDialog(RecordingsDlg);"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; -}; -//--- OBJECT WRITE END --- - -function MainMenuGui::onWake(%this) -{ - if (isFunction("getWebDeployment") && - getWebDeployment() && - isObject(%this-->ExitButton)) - %this-->ExitButton.setVisible(false); -} diff --git a/Templates/Empty/game/art/gui/playGui.gui b/Templates/Empty/game/art/gui/playGui.gui deleted file mode 100644 index 42238996d..000000000 --- a/Templates/Empty/game/art/gui/playGui.gui +++ /dev/null @@ -1,98 +0,0 @@ -//--- OBJECT WRITE BEGIN --- -%guiContent = new GameTSCtrl(PlayGui) { - canSaveDynamicFields = "1"; - isContainer = "1"; - Profile = "GuiContentProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "0 0"; - Extent = "1024 768"; - MinExtent = "8 8"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "GuiToolTipProfile"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - cameraZRot = "0"; - forceFOV = "0"; - Enabled = "1"; - helpTag = "0"; - noCursor = "1"; - - new GuiBitmapCtrl(CenterPrintDlg) { - canSaveDynamicFields = "0"; - isContainer = "0"; - Profile = "CenterPrintProfile"; - HorizSizing = "center"; - VertSizing = "center"; - position = "237 375"; - Extent = "550 20"; - MinExtent = "8 8"; - canSave = "1"; - Visible = "0"; - tooltipprofile = "GuiToolTipProfile"; - hovertime = "1000"; - bitmap = "art/gui/hudfill.png"; - wrap = "0"; - - new GuiMLTextCtrl(CenterPrintText) { - canSaveDynamicFields = "0"; - isContainer = "0"; - Profile = "CenterPrintTextProfile"; - HorizSizing = "center"; - VertSizing = "center"; - position = "0 0"; - Extent = "546 12"; - MinExtent = "8 8"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "GuiToolTipProfile"; - hovertime = "1000"; - lineSpacing = "2"; - allowColorChars = "0"; - maxChars = "-1"; - useURLMouseCursor = "0"; - }; - }; - new GuiBitmapCtrl(BottomPrintDlg) { - canSaveDynamicFields = "0"; - isContainer = "0"; - Profile = "CenterPrintProfile"; - HorizSizing = "center"; - VertSizing = "top"; - position = "237 719"; - Extent = "550 20"; - MinExtent = "8 8"; - canSave = "1"; - Visible = "0"; - tooltipprofile = "GuiToolTipProfile"; - hovertime = "1000"; - bitmap = "art/gui/hudfill.png"; - wrap = "0"; - - new GuiMLTextCtrl(BottomPrintText) { - canSaveDynamicFields = "0"; - isContainer = "0"; - Profile = "CenterPrintTextProfile"; - HorizSizing = "center"; - VertSizing = "center"; - position = "0 0"; - Extent = "546 12"; - MinExtent = "8 8"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "GuiToolTipProfile"; - hovertime = "1000"; - lineSpacing = "2"; - allowColorChars = "0"; - maxChars = "-1"; - useURLMouseCursor = "0"; - }; - }; -}; -//--- OBJECT WRITE END --- diff --git a/Templates/Empty/game/art/lights/corona.png b/Templates/Empty/game/art/lights/corona.png deleted file mode 100644 index b325da06e..000000000 Binary files a/Templates/Empty/game/art/lights/corona.png and /dev/null differ diff --git a/Templates/Empty/game/art/lights/lensFlareSheet0.png b/Templates/Empty/game/art/lights/lensFlareSheet0.png deleted file mode 100644 index c043c08ec..000000000 Binary files a/Templates/Empty/game/art/lights/lensFlareSheet0.png and /dev/null differ diff --git a/Templates/Empty/game/art/lights/lensFlareSheet1.png b/Templates/Empty/game/art/lights/lensFlareSheet1.png deleted file mode 100644 index 04abc05b3..000000000 Binary files a/Templates/Empty/game/art/lights/lensFlareSheet1.png and /dev/null differ diff --git a/Templates/Empty/game/art/lights/lensflareSheet3.png b/Templates/Empty/game/art/lights/lensflareSheet3.png deleted file mode 100644 index aa5f3ef47..000000000 Binary files a/Templates/Empty/game/art/lights/lensflareSheet3.png and /dev/null differ diff --git a/Templates/Empty/game/art/main.cs b/Templates/Empty/game/art/main.cs deleted file mode 100644 index 509b0f0c0..000000000 --- a/Templates/Empty/game/art/main.cs +++ /dev/null @@ -1,21 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- diff --git a/Templates/Empty/game/art/particles/managedParticleData.cs b/Templates/Empty/game/art/particles/managedParticleData.cs deleted file mode 100644 index 10ecb64a9..000000000 --- a/Templates/Empty/game/art/particles/managedParticleData.cs +++ /dev/null @@ -1,24 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -// This is the default save location for any Particle datablocks created in the -// Particle Editor (this script is executed from onServerCreated()) diff --git a/Templates/Empty/game/art/particles/managedParticleEmitterData.cs b/Templates/Empty/game/art/particles/managedParticleEmitterData.cs deleted file mode 100644 index 68ac4104a..000000000 --- a/Templates/Empty/game/art/particles/managedParticleEmitterData.cs +++ /dev/null @@ -1,24 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -// This is the default save location for any Particle Emitter datablocks created in the -// Particle Editor (this script is executed from onServerCreated()) diff --git a/Templates/Empty/game/art/ribbons/materials.cs b/Templates/Empty/game/art/ribbons/materials.cs deleted file mode 100644 index 9eacadb65..000000000 --- a/Templates/Empty/game/art/ribbons/materials.cs +++ /dev/null @@ -1,87 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -// This material should work fine for uniformly colored ribbons. - -//Basic ribbon shader///////////////////////////////////////////// - -new ShaderData( BasicRibbonShader ) -{ - DXVertexShaderFile = "shaders/common/ribbons/basicRibbonShaderV.hlsl"; - DXPixelShaderFile = "shaders/common/ribbons/basicRibbonShaderP.hlsl"; - - OGLVertexShaderFile = "shaders/common/ribbons/gl/basicRibbonShaderV.glsl"; - OGLPixelShaderFile = "shaders/common/ribbons/gl/basicRibbonShaderP.glsl"; - - samplerNames[0] = "$ribTex"; - - pixVersion = 2.0; -}; - -singleton CustomMaterial( BasicRibbonMat ) -{ - shader = BasicRibbonShader; - version = 2.0; - - emissive[0] = true; - - doubleSided = true; - translucent = true; - BlendOp = AddAlpha; - translucentBlendOp = AddAlpha; - - preload = true; -}; - -// This material can render a texture on top of a ribbon. - -//Texture ribbon shader///////////////////////////////////////////// - -new ShaderData( TexturedRibbonShader ) -{ - DXVertexShaderFile = "shaders/common/ribbons/texRibbonShaderV.hlsl"; - DXPixelShaderFile = "shaders/common/ribbons/texRibbonShaderP.hlsl"; - - OGLVertexShaderFile = "shaders/common/ribbons/gl/texRibbonShaderV.glsl"; - OGLPixelShaderFile = "shaders/common/ribbons/gl/texRibbonShaderP.glsl"; - - samplerNames[0] = "$ribTex"; - - pixVersion = 2.0; -}; - -singleton CustomMaterial( TexturedRibbonMat ) -{ - shader = TexturedRibbonShader; - version = 2.0; - - emissive[0] = true; - - doubleSided = true; - translucent = true; - BlendOp = AddAlpha; - translucentBlendOp = AddAlpha; - - sampler["ribTex"] = "art/ribbons/ribTex.png"; - - preload = true; -}; \ No newline at end of file diff --git a/Templates/Empty/game/art/ribbons/ribbonExec.cs b/Templates/Empty/game/art/ribbons/ribbonExec.cs deleted file mode 100644 index 8193b1b8b..000000000 --- a/Templates/Empty/game/art/ribbons/ribbonExec.cs +++ /dev/null @@ -1,23 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -exec("./ribbons.cs"); \ No newline at end of file diff --git a/Templates/Empty/game/art/ribbons/ribbons.cs b/Templates/Empty/game/art/ribbons/ribbons.cs deleted file mode 100644 index fdf5bf865..000000000 --- a/Templates/Empty/game/art/ribbons/ribbons.cs +++ /dev/null @@ -1,46 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -datablock RibbonNodeData(DefaultRibbonNodeData) -{ - timeMultiple = 1.0; -}; - -//ribbon data//////////////////////////////////////// - -datablock RibbonData(BasicRibbon) -{ - size[0] = 0.5; - color[0] = "1.0 0.0 0.0 1.0"; - position[0] = 0.0; - - size[1] = 0.0; - color[1] = "1.0 0.0 0.0 0.0"; - position[1] = 1.0; - - RibbonLength = 40; - fadeAwayStep = 0.1; - UseFadeOut = true; - RibbonMaterial = BasicRibbonMat; - - category = "FX"; -}; diff --git a/Templates/Empty/game/art/roads/defaultRoadTextureOther.png b/Templates/Empty/game/art/roads/defaultRoadTextureOther.png deleted file mode 100644 index a2f08fe6a..000000000 Binary files a/Templates/Empty/game/art/roads/defaultRoadTextureOther.png and /dev/null differ diff --git a/Templates/Empty/game/art/roads/defaultRoadTextureTop.png b/Templates/Empty/game/art/roads/defaultRoadTextureTop.png deleted file mode 100644 index 93ca1330b..000000000 Binary files a/Templates/Empty/game/art/roads/defaultRoadTextureTop.png and /dev/null differ diff --git a/Templates/Empty/game/art/roads/defaultpath.png b/Templates/Empty/game/art/roads/defaultpath.png deleted file mode 100644 index 2f08509c2..000000000 Binary files a/Templates/Empty/game/art/roads/defaultpath.png and /dev/null differ diff --git a/Templates/Empty/game/art/roads/defaultpath_normal.png b/Templates/Empty/game/art/roads/defaultpath_normal.png deleted file mode 100644 index 3122dbe41..000000000 Binary files a/Templates/Empty/game/art/roads/defaultpath_normal.png and /dev/null differ diff --git a/Templates/Empty/game/art/skies/clouds/cloud1.png b/Templates/Empty/game/art/skies/clouds/cloud1.png deleted file mode 100644 index f13b63d5a..000000000 Binary files a/Templates/Empty/game/art/skies/clouds/cloud1.png and /dev/null differ diff --git a/Templates/Empty/game/art/skies/clouds/cloud2.png b/Templates/Empty/game/art/skies/clouds/cloud2.png deleted file mode 100644 index a7ee34b6c..000000000 Binary files a/Templates/Empty/game/art/skies/clouds/cloud2.png and /dev/null differ diff --git a/Templates/Empty/game/art/skies/clouds/cloud3.png b/Templates/Empty/game/art/skies/clouds/cloud3.png deleted file mode 100644 index 5767f5486..000000000 Binary files a/Templates/Empty/game/art/skies/clouds/cloud3.png and /dev/null differ diff --git a/Templates/Empty/game/art/skies/clouds/clouds_normal_displacement.png b/Templates/Empty/game/art/skies/clouds/clouds_normal_displacement.png deleted file mode 100644 index 0419cdace..000000000 Binary files a/Templates/Empty/game/art/skies/clouds/clouds_normal_displacement.png and /dev/null differ diff --git a/Templates/Empty/game/art/skies/night/materials.cs b/Templates/Empty/game/art/skies/night/materials.cs deleted file mode 100644 index 79cc050fc..000000000 --- a/Templates/Empty/game/art/skies/night/materials.cs +++ /dev/null @@ -1,53 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -singleton CubemapData( NightCubemap ) -{ - cubeFace[0] = "./skybox_1"; - cubeFace[1] = "./skybox_2"; - cubeFace[2] = "./skybox_3"; - cubeFace[3] = "./skybox_4"; - cubeFace[4] = "./skybox_5"; - cubeFace[5] = "./skybox_6"; -}; - -singleton Material( NightSkyMat ) -{ - cubemap = NightCubemap; - materialTag0 = "Skies"; -}; - -singleton Material( Moon_Glow_Mat ) -{ - baseTex = "./moon_wglow.png"; - emissive = true; - translucent = true; - vertColor[ 0 ] = true; -}; - -singleton Material( Moon_Mat ) -{ - baseTex = "./moon_noglow.png"; - emissive = true; - translucent = true; - vertColor[ 0 ] = true; -}; diff --git a/Templates/Empty/game/art/skies/night/moon_noglow.png b/Templates/Empty/game/art/skies/night/moon_noglow.png deleted file mode 100644 index 973ddb6c2..000000000 Binary files a/Templates/Empty/game/art/skies/night/moon_noglow.png and /dev/null differ diff --git a/Templates/Empty/game/art/skies/night/moon_wcorona.png b/Templates/Empty/game/art/skies/night/moon_wcorona.png deleted file mode 100644 index 568f260ba..000000000 Binary files a/Templates/Empty/game/art/skies/night/moon_wcorona.png and /dev/null differ diff --git a/Templates/Empty/game/art/skies/night/moon_wglow.png b/Templates/Empty/game/art/skies/night/moon_wglow.png deleted file mode 100644 index e8fdf0647..000000000 Binary files a/Templates/Empty/game/art/skies/night/moon_wglow.png and /dev/null differ diff --git a/Templates/Empty/game/art/skies/night/skybox_1.png b/Templates/Empty/game/art/skies/night/skybox_1.png deleted file mode 100644 index aa9a94cc8..000000000 Binary files a/Templates/Empty/game/art/skies/night/skybox_1.png and /dev/null differ diff --git a/Templates/Empty/game/art/skies/night/skybox_2.png b/Templates/Empty/game/art/skies/night/skybox_2.png deleted file mode 100644 index c04d1648a..000000000 Binary files a/Templates/Empty/game/art/skies/night/skybox_2.png and /dev/null differ diff --git a/Templates/Empty/game/art/skies/night/skybox_3.png b/Templates/Empty/game/art/skies/night/skybox_3.png deleted file mode 100644 index 00d03d634..000000000 Binary files a/Templates/Empty/game/art/skies/night/skybox_3.png and /dev/null differ diff --git a/Templates/Empty/game/art/skies/night/skybox_4.png b/Templates/Empty/game/art/skies/night/skybox_4.png deleted file mode 100644 index 1ba8ba331..000000000 Binary files a/Templates/Empty/game/art/skies/night/skybox_4.png and /dev/null differ diff --git a/Templates/Empty/game/art/skies/night/skybox_5.png b/Templates/Empty/game/art/skies/night/skybox_5.png deleted file mode 100644 index c71140a0d..000000000 Binary files a/Templates/Empty/game/art/skies/night/skybox_5.png and /dev/null differ diff --git a/Templates/Empty/game/art/skies/night/skybox_6.png b/Templates/Empty/game/art/skies/night/skybox_6.png deleted file mode 100644 index 6398ace05..000000000 Binary files a/Templates/Empty/game/art/skies/night/skybox_6.png and /dev/null differ diff --git a/Templates/Empty/game/art/sound/ui/volumeTest.wav b/Templates/Empty/game/art/sound/ui/volumeTest.wav deleted file mode 100644 index 087c0db4e..000000000 Binary files a/Templates/Empty/game/art/sound/ui/volumeTest.wav and /dev/null differ diff --git a/Templates/Empty/game/art/water/depthcolor_ramp.png b/Templates/Empty/game/art/water/depthcolor_ramp.png deleted file mode 100644 index 749cec437..000000000 Binary files a/Templates/Empty/game/art/water/depthcolor_ramp.png and /dev/null differ diff --git a/Templates/Empty/game/art/water/foam.dds b/Templates/Empty/game/art/water/foam.dds deleted file mode 100644 index 6469bdb9c..000000000 Binary files a/Templates/Empty/game/art/water/foam.dds and /dev/null differ diff --git a/Templates/Empty/game/art/water/ripple.dds b/Templates/Empty/game/art/water/ripple.dds deleted file mode 100644 index aa9285883..000000000 Binary files a/Templates/Empty/game/art/water/ripple.dds and /dev/null differ diff --git a/Templates/Empty/game/core/art/datablocks/camera.cs b/Templates/Empty/game/core/art/datablocks/camera.cs deleted file mode 100644 index 06da4391e..000000000 --- a/Templates/Empty/game/core/art/datablocks/camera.cs +++ /dev/null @@ -1,30 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// Define a datablock class to use for our observer camera -//----------------------------------------------------------------------------- - -datablock CameraData(Observer) -{ - mode = "Observer"; -}; \ No newline at end of file diff --git a/Templates/Empty/game/core/art/datablocks/datablockExec.cs b/Templates/Empty/game/core/art/datablocks/datablockExec.cs deleted file mode 100644 index af059530d..000000000 --- a/Templates/Empty/game/core/art/datablocks/datablockExec.cs +++ /dev/null @@ -1,32 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -// Load up all datablocks. This function is called when -// a server is constructed. - -// Set up the Camera's -exec("./camera.cs"); - -// Common Marker's -exec("./markers.cs"); - -exec("./defaultparticle.cs"); diff --git a/Templates/Empty/game/core/art/datablocks/defaultparticle.cs b/Templates/Empty/game/core/art/datablocks/defaultparticle.cs deleted file mode 100644 index 7f973d525..000000000 --- a/Templates/Empty/game/core/art/datablocks/defaultparticle.cs +++ /dev/null @@ -1,66 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -datablock ParticleData(DefaultParticle) -{ - textureName = "core/art/defaultParticle"; - dragCoefficient = 0.498534; - gravityCoefficient = 0; - inheritedVelFactor = 0.499022; - constantAcceleration = 0.0; - lifetimeMS = 1313; - lifetimeVarianceMS = 500; - useInvAlpha = true; - spinRandomMin = -360; - spinRandomMax = 360; - spinSpeed = 1; - - colors[0] = "0.992126 0.00787402 0.0314961 1"; - colors[1] = "1 0.834646 0 0.645669"; - colors[2] = "1 0.299213 0 0.330709"; - colors[3] = "0.732283 1 0 0"; - - sizes[0] = 0; - sizes[1] = 0.497467; - sizes[2] = 0.73857; - sizes[3] = 0.997986; - - times[0] = 0.0; - times[1] = 0.247059; - times[2] = 0.494118; - times[3] = 1; - - animTexName = "core/art/defaultParticle"; -}; - -datablock ParticleEmitterData(DefaultEmitter) -{ - ejectionPeriodMS = "50"; - ejectionVelocity = "1"; - velocityVariance = "0"; - ejectionOffset = "0.2"; - thetaMax = "40"; - particles = "DefaultParticle"; - blendStyle = "ADDITIVE"; - softParticles = "0"; - softnessDistance = "1"; -}; diff --git a/Templates/Empty/game/core/art/datablocks/markers.cs b/Templates/Empty/game/core/art/datablocks/markers.cs deleted file mode 100644 index 04ea6af48..000000000 --- a/Templates/Empty/game/core/art/datablocks/markers.cs +++ /dev/null @@ -1,39 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -datablock MissionMarkerData(WayPointMarker) -{ - category = "Misc"; - shapeFile = "core/art/shapes/octahedron.dts"; -}; - -datablock MissionMarkerData(SpawnSphereMarker) -{ - category = "Misc"; - shapeFile = "core/art/shapes/octahedron.dts"; -}; - -datablock MissionMarkerData(CameraBookmarkMarker) -{ - category = "Misc"; - shapeFile = "core/art/shapes/camera.dts"; -}; diff --git a/Templates/Empty/game/core/art/defaultParticle.png b/Templates/Empty/game/core/art/defaultParticle.png deleted file mode 100644 index cb899f84d..000000000 Binary files a/Templates/Empty/game/core/art/defaultParticle.png and /dev/null differ diff --git a/Templates/Empty/game/core/art/fizz_noise.dds b/Templates/Empty/game/core/art/fizz_noise.dds deleted file mode 100644 index 2cb6cee10..000000000 Binary files a/Templates/Empty/game/core/art/fizz_noise.dds and /dev/null differ diff --git a/Templates/Empty/game/core/art/grids/materials.cs b/Templates/Empty/game/core/art/grids/materials.cs deleted file mode 100644 index ea05af987..000000000 --- a/Templates/Empty/game/core/art/grids/materials.cs +++ /dev/null @@ -1,91 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -singleton Material( Grid512_Black_Mat ) -{ - mapTo = "Grid512_Black_Mat"; - diffuseMap[0] = "512_black"; - materialTag0 = "TestMaterial"; -}; - -singleton Material( Grid512_Blue_Mat ) -{ - mapTo = "Grid512_Blue_Mat"; - diffuseMap[0] = "512_blue"; - materialTag0 = "TestMaterial"; -}; - -singleton Material( Grid512_ForestGreen_Mat ) -{ - mapTo = "Grid512_ForestGreen_Mat"; - diffuseMap[0] = "512_forestgreen"; - materialTag0 = "TestMaterial"; -}; - -singleton Material( Grid512_ForestGreenLines_Mat ) -{ - mapTo = "Grid512_ForestGreenLines_Mat"; - diffuseMap[0] = "512_forestgreen_lines"; - materialTag0 = "TestMaterial"; -}; - -singleton Material( Grid512_Green_Mat ) -{ - mapTo = "Grid512_Green_Mat"; - diffuseMap[0] = "512_green"; - materialTag0 = "TestMaterial"; -}; - -singleton Material( Grid512_Grey_Mat ) -{ - mapTo = "Grid512_Grey_Mat"; - diffuseMap[0] = "512_grey"; - materialTag0 = "TestMaterial"; -}; - -singleton Material( Grid512_GreyBase_Mat ) -{ - mapTo = "Grid512_GreyBase_Mat"; - diffuseMap[0] = "512_grey_base"; - materialTag0 = "TestMaterial"; -}; - -singleton Material( Grid512_Orange_Mat ) -{ - mapTo = "Grid512_Orange_Mat"; - diffuseMap[0] = "512_orange"; - materialTag0 = "TestMaterial"; -}; - -singleton Material( Grid512_OrangeLines_Mat ) -{ - mapTo = "Grid512_OrangeLines_Mat"; - diffuseMap[0] = "512_orange_lines"; - materialTag0 = "TestMaterial"; -}; - -singleton Material( Grid512_Red_Mat ) -{ - mapTo = "Grid512_Red_Mat"; - diffuseMap[0] = "512_red"; - materialTag0 = "TestMaterial"; -}; diff --git a/Templates/Empty/game/core/art/gui/FrameOverlayGui.gui b/Templates/Empty/game/core/art/gui/FrameOverlayGui.gui deleted file mode 100644 index eb810ee46..000000000 --- a/Templates/Empty/game/core/art/gui/FrameOverlayGui.gui +++ /dev/null @@ -1,30 +0,0 @@ -//--- OBJECT WRITE BEGIN --- -%guiContent = new GuiControl(FrameOverlayGui) { - profile = "GuiModelessDialogProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "0 0"; - extent = "640 480"; - minExtent = "8 8"; - visible = "True"; - setFirstResponder = "True"; - modal = "false"; - helpTag = "0"; - noCursor = true; - new GuiConsoleTextCtrl(TextOverlayControl) { - profile = "GuiConsoleTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "5 5"; - extent = "130 18"; - minExtent = "4 4"; - visible = "True"; - setFirstResponder = "True"; - modal = "True"; - helpTag = "0"; - expression = "10"; - command = "Canvas.popDialog(FrameOverlayGui);"; - accelerator = "escape"; - }; -}; -//--- OBJECT WRITE END --- diff --git a/Templates/Empty/game/core/art/gui/console.gui b/Templates/Empty/game/core/art/gui/console.gui deleted file mode 100644 index 70e5fb61b..000000000 --- a/Templates/Empty/game/core/art/gui/console.gui +++ /dev/null @@ -1,175 +0,0 @@ -//--- OBJECT WRITE BEGIN --- -%guiContent = new GuiControl(ConsoleDlg) { - profile = "GuiDefaultProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "0 0"; - extent = "640 480"; - minExtent = "8 8"; - visible = "1"; - helpTag = "0"; - - new GuiConsoleEditCtrl(ConsoleEntry) { - profile = "ConsoleTextEditProfile"; - horizSizing = "width"; - vertSizing = "top"; - position = "0 462"; - extent = "640 18"; - minExtent = "8 8"; - visible = "1"; - altCommand = "ConsoleEntry::eval();"; - helpTag = "0"; - maxLength = "255"; - historySize = "40"; - password = "0"; - tabComplete = "0"; - sinkAllKeyEvents = "1"; - useSiblingScroller = "1"; - }; - new GuiScrollCtrl() { - internalName = "Scroll"; - profile = "ConsoleScrollProfile"; - horizSizing = "width"; - vertSizing = "height"; - position = "0 0"; - extent = "640 462"; - minExtent = "8 8"; - visible = "1"; - helpTag = "0"; - willFirstRespond = "1"; - hScrollBar = "alwaysOn"; - vScrollBar = "alwaysOn"; - lockHorizScroll = "false"; - lockVertScroll = "false"; - constantThumbHeight = "0"; - childMargin = "0 0"; - - new GuiConsole( ConsoleMessageLogView ) { - profile = "GuiConsoleProfile"; - position = "0 0"; - }; - }; -}; -//--- OBJECT WRITE END --- - - -function ConsoleEntry::eval() -{ - %text = trim( ConsoleEntry.getValue() ); - if( %text $= "" ) - return; - - // If it's missing a trailing () and it's not a variable, - // append the parentheses. - - if( strpos(%text, "(") == -1 && !isDefined( %text ) ) - { - if(strpos(%text, "=") == -1 && strpos(%text, " ") == -1) - { - if(strpos(%text, "{") == -1 && strpos(%text, "}") == -1) - { - %text = %text @ "()"; - } - } - } - - // Append a semicolon if need be. - - %pos = strlen(%text) - 1; - if(strpos(%text, ";", %pos) == -1 && strpos(%text, "}") == -1) - { - %text = %text @ ";"; - } - - // Turn off warnings for assigning from void - // and evaluate the snippet. - - if( !isDefined( "$Con::warnVoidAssignment" ) ) - %oldWarnVoidAssignment = true; - else - %oldWarnVoidAssignment = $Con::warnVoidAssignment; - $Con::warnVoidAssignment = false; - - echo("==>" @ %text); - if( !startsWith( %text, "function " ) - && !startsWith( %text, "datablock " ) - && !startsWith( %text, "foreach(" ) - && !startsWith( %text, "foreach$(" ) - && !startsWith( %text, "if(" ) - && !startsWith( %text, "while(" ) - && !startsWith( %text, "for(" ) - && !startsWith( %text, "switch(" ) - && !startsWith( %text, "switch$(" ) ) - eval( "%result = " @ %text ); - else - eval( %text ); - $Con::warnVoidAssignment = %oldWarnVoidAssignment; - - ConsoleEntry.setValue(""); - - // Echo result. - - if( %result !$= "" ) - echo( %result ); -} - -function ToggleConsole(%make) -{ - if (%make) - { - if (ConsoleDlg.isAwake()) - { - // Deactivate the console. - Canvas.popDialog(ConsoleDlg); - } - else - { - Canvas.pushDialog(ConsoleDlg, 99); - } - } -} - -function ConsoleDlg::hideWindow( %this ) -{ - %this-->Scroll.setVisible( false ); -} - -function ConsoleDlg::showWindow( %this ) -{ - %this-->Scroll.setVisible( true ); -} - -function ConsoleDlg::setAlpha( %this, %alpha ) -{ - if ( %alpha $= "" ) - ConsoleScrollProfile.fillColor = $ConsoleDefaultFillColor; - else - ConsoleScrollProfile.fillColor = getWords( $ConsoleDefaultFillColor, 0, 2 ) SPC %alpha * 255.0; -} - -// If a message is selected that has a source location preceding it, allow jumping to the -// source location in Torsion by clicking on the message in the log view. -function ConsoleMessageLogView::onMessageSelected( %this, %level, %message ) -{ - if( !isFunction( "EditorOpenFileInTorsion" ) ) - return; - - %fileText = getWord( %message, 0 ); - %lineText = getWord( %message, 1 ); - - if( %fileText $= "" || %lineText $= "" ) - return; - - %fileName = makeFullPath( %fileText ); - if( !isFile( %fileName ) ) - return; - - %lineTextLen = strlen( %lineText ); - if( !startsWith( %lineText, "(" ) || - !endsWith( %lineText, "):" ) ) - return; - - %lineNumber = getSubStr( %lineText, 1, %lineTextLen - 2 ); - - EditorOpenFileInTorsion( %fileName, %lineNumber ); -} diff --git a/Templates/Empty/game/core/art/gui/consoleVarDlg.gui b/Templates/Empty/game/core/art/gui/consoleVarDlg.gui deleted file mode 100644 index fc7ab123e..000000000 --- a/Templates/Empty/game/core/art/gui/consoleVarDlg.gui +++ /dev/null @@ -1,118 +0,0 @@ -//--- OBJECT WRITE BEGIN --- -%guiContent = new GuiControl(ConsoleVarDlg) { - isContainer = "1"; - Profile = "GuiModelessDialogProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "0 0"; - Extent = "1024 768"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "GuiToolTipProfile"; - hovertime = "1000"; - canSaveDynamicFields = "1"; - noCursor = true; - - new GuiWindowCtrl() { - resizeWidth = "1"; - resizeHeight = "1"; - canMove = "1"; - canClose = "1"; - canMinimize = "1"; - canMaximize = "1"; - minSize = "50 50"; - EdgeSnap = "1"; - text = "Console Variables"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - isContainer = "1"; - Profile = "GuiWindowProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "131 153"; - Extent = "194 324"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "GuiToolTipProfile"; - hovertime = "1000"; - internalName = "window"; - canSaveDynamicFields = "0"; - closeCommand = "Canvas.popDialog( ConsoleVarDlg );"; - - new GuiScrollCtrl() { - willFirstRespond = "1"; - hScrollBar = "alwaysOff"; - vScrollBar = "dynamic"; - lockHorizScroll = "0"; - lockVertScroll = "0"; - constantThumbHeight = "0"; - childMargin = "0 0"; - mouseWheelScrollSpeed = "-1"; - Docking = "Client"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - isContainer = "1"; - Profile = "GuiScrollProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "1 21"; - Extent = "192 300"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "GuiToolTipProfile"; - hovertime = "1000"; - internalName = "Scroll"; - canSaveDynamicFields = "0"; - - new GuiVariableInspector(ConsoleVarInspector) { - StackingType = "Vertical"; - HorizStacking = "Left to Right"; - VertStacking = "Top to Bottom"; - Padding = "1"; - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "1"; - Profile = "GuiTransparentProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - Position = "1 1"; - Extent = "190 298"; - MinExtent = "16 16"; - canSave = "1"; - isDecoy = "0"; - Visible = "1"; - tooltipprofile = "GuiToolTipProfile"; - hovertime = "1000"; - dividerMargin = "5"; - }; - }; - }; -}; -//--- OBJECT WRITE END --- - -function InspectVars( %filter ) -{ - if ( %filter $= "" ) - %filter = "*"; - - //if ( !ConsoleVarDlg.isAwake() ) - Canvas.pushDialog( ConsoleVarDlg, 100 ); - - ConsoleVarInspector.loadVars( %filter ); -} - -function InspectVarsToggleCursor() -{ - ConsoleVarDlg.noCursor = !(ConsoleVarDlg.noCursor); -} \ No newline at end of file diff --git a/Templates/Empty/game/core/art/gui/images/radioButton.png b/Templates/Empty/game/core/art/gui/images/radioButton.png deleted file mode 100644 index 77bf29ca4..000000000 Binary files a/Templates/Empty/game/core/art/gui/images/radioButton.png and /dev/null differ diff --git a/Templates/Empty/game/core/art/gui/images/treeview/shll_icon_passworded.png b/Templates/Empty/game/core/art/gui/images/treeview/shll_icon_passworded.png deleted file mode 100644 index a5530e968..000000000 Binary files a/Templates/Empty/game/core/art/gui/images/treeview/shll_icon_passworded.png and /dev/null differ diff --git a/Templates/Empty/game/core/art/gui/images/treeview/shll_icon_passworded_hi.png b/Templates/Empty/game/core/art/gui/images/treeview/shll_icon_passworded_hi.png deleted file mode 100644 index 509c4f595..000000000 Binary files a/Templates/Empty/game/core/art/gui/images/treeview/shll_icon_passworded_hi.png and /dev/null differ diff --git a/Templates/Empty/game/core/art/gui/images/treeview/simgroup.png b/Templates/Empty/game/core/art/gui/images/treeview/simgroup.png deleted file mode 100644 index 0babc1392..000000000 Binary files a/Templates/Empty/game/core/art/gui/images/treeview/simgroup.png and /dev/null differ diff --git a/Templates/Empty/game/core/art/gui/images/treeview/simgroup_closed.png b/Templates/Empty/game/core/art/gui/images/treeview/simgroup_closed.png deleted file mode 100644 index 0babc1392..000000000 Binary files a/Templates/Empty/game/core/art/gui/images/treeview/simgroup_closed.png and /dev/null differ diff --git a/Templates/Empty/game/core/art/gui/images/treeview/simgroup_selected.png b/Templates/Empty/game/core/art/gui/images/treeview/simgroup_selected.png deleted file mode 100644 index 7a6bb8ec3..000000000 Binary files a/Templates/Empty/game/core/art/gui/images/treeview/simgroup_selected.png and /dev/null differ diff --git a/Templates/Empty/game/core/art/gui/images/treeview/simgroup_selected_closed.png b/Templates/Empty/game/core/art/gui/images/treeview/simgroup_selected_closed.png deleted file mode 100644 index 7a6bb8ec3..000000000 Binary files a/Templates/Empty/game/core/art/gui/images/treeview/simgroup_selected_closed.png and /dev/null differ diff --git a/Templates/Empty/game/core/art/gui/netGraphGui.gui b/Templates/Empty/game/core/art/gui/netGraphGui.gui deleted file mode 100644 index b62e8ea23..000000000 --- a/Templates/Empty/game/core/art/gui/netGraphGui.gui +++ /dev/null @@ -1,238 +0,0 @@ -function execNetGraphGuiGUI() -{ - if ( isObject( NetGraphGui ) ) - NetGraphGui.delete(); - - if ( isObject( NetGraphProfile ) ) - NetGraphProfile.delete(); - - if ( isObject( NetGraphGhostsActiveProfile ) ) - NetGraphGhostsActiveProfile.delete(); - - if ( isObject( NetGraphGhostUpdatesProfile ) ) - NetGraphGhostUpdatesProfile.delete(); - - if ( isObject( NetGraphBitsSentProfile ) ) - NetGraphBitsSentProfile.delete(); - - if ( isObject( NetGraphBitsReceivedProfile ) ) - NetGraphBitsReceivedProfile.delete(); - - if ( isObject( NetGraphLatencyProfile ) ) - NetGraphLatencyProfile.delete(); - - if ( isObject( NetGraphPacketLossProfile ) ) - NetGraphPacketLossProfile.delete(); - - exec( "./NetGraphGui.gui" ); -} - -// Profiles -new GuiControlProfile (NetGraphProfile) -{ - modal = false; - opaque = false; - canKeyFocus = false; -}; - -new GuiControlProfile (NetGraphKeyContainerProfile) -{ - border = true; - opaque = true; - fillColor = "100 100 100 200"; -}; -new GuiControlProfile (NetGraphGhostsActiveProfile) -{ - border = false; - fontColor = "255 255 255"; -}; -new GuiControlProfile (NetGraphGhostUpdatesProfile) -{ - border = false; - fontColor = "255 0 0"; -}; -new GuiControlProfile (NetGraphBitsSentProfile) -{ - border = false; - fontColor = "0 255 0"; -}; -new GuiControlProfile (NetGraphBitsReceivedProfile) -{ - border = false; - fontColor = "0 0 255"; -}; -new GuiControlProfile (NetGraphLatencyProfile) -{ - border = false; - fontColor = "0 255 255"; -}; -new GuiControlProfile (NetGraphPacketLossProfile) -{ - border = false; - fontColor = "0 0 0"; -}; - -//--- OBJECT WRITE BEGIN --- -new GuiControl(NetGraphGui) { - profile = "NetGraphProfile"; - horizSizing = "left"; - vertSizing = "bottom"; - position = "0 0"; - extent = "640 480"; - minExtent = "8 2"; - visible = "1"; - noCursor = "1"; - - new GuiGraphCtrl(NetGraph) { - profile = "NetGraphKeyContainerProfile"; - horizSizing = "left"; - vertSizing = "bottom"; - position = "432 5"; - extent = "200 200"; - minExtent = "8 2"; - visible = "1"; - }; - - new GuiControl() { - profile = "NetGraphKeyContainerProfile"; - horizSizing = "left"; - vertSizing = "bottom"; - position = "432 205"; - extent = "200 52"; - minExtent = "8 2"; - visible = "1"; - - new GuiTextCtrl(GhostsActive) { - profile = "NetGraphGhostsActiveProfile"; - horizSizing = "left"; - vertSizing = "bottom"; - position = "0 0"; - extent = "100 18"; - minExtent = "8 2"; - visible = "1"; - text = "Ghosts Active"; - maxLength = "255"; - }; - new GuiTextCtrl(GhostUpdates) { - profile = "NetGraphGhostUpdatesProfile"; - horizSizing = "left"; - vertSizing = "bottom"; - position = "100 0"; - extent = "100 18"; - minExtent = "8 2"; - visible = "1"; - text = "Ghost Updates"; - maxLength = "255"; - }; - new GuiTextCtrl(BitsSent) { - profile = "NetGraphBitsSentProfile"; - horizSizing = "left"; - vertSizing = "bottom"; - position = "0 18 "; - extent = "100 18"; - minExtent = "8 2"; - visible = "1"; - text = "Bytes Sent"; - maxLength = "255"; - }; - new GuiTextCtrl(BitsReceived) { - profile = "NetGraphBitsReceivedProfile"; - horizSizing = "left"; - vertSizing = "bottom"; - position = "100 18"; - extent = "100 18"; - minExtent = "8 2"; - visible = "1"; - text = "Bytes Received"; - maxLength = "255"; - }; - new GuiTextCtrl(Latency) { - profile = "NetGraphLatencyProfile"; - horizSizing = "left"; - vertSizing = "bottom"; - position = "0 36"; - extent = "100 18"; - minExtent = "8 2"; - visible = "1"; - text = "Latency"; - maxLength = "255"; - }; - new GuiTextCtrl(PacketLoss) { - profile = "NetGraphPacketLossProfile"; - horizSizing = "left"; - vertSizing = "bottom"; - position = "100 36"; - extent = "59 18"; - minExtent = "8 2"; - visible = "1"; - text = "Packet Loss"; - maxLength = "255"; - }; - }; -}; -//--- OBJECT WRITE END --- - -// Functions -function toggleNetGraph() -{ - if(!$NetGraph::isInitialized) - { - NetGraph::updateStats(); - $NetGraph::isInitialized = true; - } - - if(!Canvas.isMember(NetGraphGui)) - { - Canvas.add(NetGraphGui); - } - else - Canvas.remove(NetGraphGui); -} - -function NetGraph::updateStats() -{ - $NetGraphThread = NetGraph.schedule(32, "updateStats"); - - if(!$Stats::netGhostUpdates) - return; - - if(isobject(NetGraph)) - { - if(isobject(ServerConnection)) - NetGraph.addDatum(0,ServerConnection.getGhostsActive()); - GhostsActive.setText("Ghosts Active: " @ ServerConnection.getGhostsActive()); - NetGraph.addDatum(1,$Stats::netGhostUpdates); - GhostUpdates.setText("Ghost Updates: " @ $Stats::netGhostUpdates); - NetGraph.addDatum(2,$Stats::netBitsSent); - BitsSent.setText("Bytes Sent: " @ $Stats::netBitsSent); - NetGraph.addDatum(3,$Stats::netBitsReceived); - BitsReceived.setText("Bytes Received: " @ $Stats::netBitsReceived); - NetGraph.matchScale(2,3); - NetGraph.addDatum(4,ServerConnection.getPing()); - Latency.setText("Latency: " @ ServerConnection.getPing()); - NetGraph.addDatum(5,ServerConnection.getPacketLoss()); - PacketLoss.setText("Packet Loss: " @ ServerConnection.getPacketLoss()); - } -} - -function NetGraph::toggleKey() -{ - if(!GhostsActive.visible) - { - GhostsActive.visible = 1; - GhostUpdates.visible = 1; - BitsSent.visible = 1; - BitsReceived.visible = 1; - Latency.visible = 1; - PacketLoss.visible = 1; - } - else - { - GhostsActive.visible = 0; - GhostUpdates.visible = 0; - BitsSent.visible = 0; - BitsReceived.visible = 0; - Latency.visible = 0; - PacketLoss.visible = 0; - } -} diff --git a/Templates/Empty/game/core/art/shapes/.gitignore b/Templates/Empty/game/core/art/shapes/.gitignore deleted file mode 100644 index cbdc49d44..000000000 --- a/Templates/Empty/game/core/art/shapes/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -# Allow the following 3D mesh file formats in this directory: -!*.obj -!*.mtl -!*.3ds -!*.max diff --git a/Templates/Empty/game/core/art/shapes/base-normal.png b/Templates/Empty/game/core/art/shapes/base-normal.png deleted file mode 100644 index 27ed35fcd..000000000 Binary files a/Templates/Empty/game/core/art/shapes/base-normal.png and /dev/null differ diff --git a/Templates/Empty/game/core/art/shapes/base.png b/Templates/Empty/game/core/art/shapes/base.png deleted file mode 100644 index 34ac6baa2..000000000 Binary files a/Templates/Empty/game/core/art/shapes/base.png and /dev/null differ diff --git a/Templates/Empty/game/core/art/shapes/blue.jpg b/Templates/Empty/game/core/art/shapes/blue.jpg deleted file mode 100644 index b6fcd4e66..000000000 Binary files a/Templates/Empty/game/core/art/shapes/blue.jpg and /dev/null differ diff --git a/Templates/Empty/game/core/art/shapes/camera.dts b/Templates/Empty/game/core/art/shapes/camera.dts deleted file mode 100644 index fdd5dbbe0..000000000 Binary files a/Templates/Empty/game/core/art/shapes/camera.dts and /dev/null differ diff --git a/Templates/Empty/game/core/art/shapes/camera.mb b/Templates/Empty/game/core/art/shapes/camera.mb deleted file mode 100644 index 641f1c1b6..000000000 Binary files a/Templates/Empty/game/core/art/shapes/camera.mb and /dev/null differ diff --git a/Templates/Empty/game/core/art/shapes/camera.png b/Templates/Empty/game/core/art/shapes/camera.png deleted file mode 100644 index 4cde4fe67..000000000 Binary files a/Templates/Empty/game/core/art/shapes/camera.png and /dev/null differ diff --git a/Templates/Empty/game/core/art/shapes/green.jpg b/Templates/Empty/game/core/art/shapes/green.jpg deleted file mode 100644 index c95126226..000000000 Binary files a/Templates/Empty/game/core/art/shapes/green.jpg and /dev/null differ diff --git a/Templates/Empty/game/core/art/shapes/lightray.png b/Templates/Empty/game/core/art/shapes/lightray.png deleted file mode 100644 index 1f3ed83ba..000000000 Binary files a/Templates/Empty/game/core/art/shapes/lightray.png and /dev/null differ diff --git a/Templates/Empty/game/core/art/shapes/materials.cs b/Templates/Empty/game/core/art/shapes/materials.cs deleted file mode 100644 index f413f54b0..000000000 --- a/Templates/Empty/game/core/art/shapes/materials.cs +++ /dev/null @@ -1,161 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -singleton Material(OctahedronMat) -{ - mapTo = "green"; - - diffuseMap[0] = "camera"; - - translucent = "1"; - translucentBlendOp = "LerpAlpha"; - emissive = "0"; - castShadows = "0"; - - colorMultiply[0] = "0 1 0 1"; -}; - -singleton Material(SimpleConeMat) -{ - mapTo = "blue"; - - diffuseMap[0] = "blue"; - translucent = "0"; - emissive = "1"; - castShadows = "0"; -}; - -//--- camera.dts MATERIALS BEGIN --- -singleton Material(CameraMat) -{ - mapTo = "pasted__phongE1"; - - diffuseMap[0] = "camera"; - - diffuseColor[0] = "0 0.627451 1 1"; - specular[0] = "1 1 1 1"; - specularPower[0] = 211; - pixelSpecular[0] = 1; - emissive[0] = 1; - - doubleSided = 1; - translucent = true; - translucentBlendOp = "LerpAlpha"; - castShadows = false; - materialTag0 = "Miscellaneous"; -}; - -//--- camera.dts MATERIALS END --- -//--- noshape.dts MATERIALS BEGIN --- -singleton Material(noshape_NoShape) -{ - mapTo = "NoShape"; - - diffuseMap[0] = ""; - - diffuseColor[0] = "0.8 0.003067 0 .8"; - emissive[0] = 0; - - doubleSided = false; - translucent = 1; - translucentBlendOp = "LerpAlpha"; - castShadows = false; -}; - -//--- noshape.dts MATERIALS END --- - -//--- noshapetext.dae MATERIALS BEGIN --- -singleton Material(noshapetext_lambert1) -{ - mapTo = "lambert1"; - - diffuseMap[0] = ""; - - diffuseColor[0] = "0.4 0.4 0.4 1"; - specular[0] = "1 1 1 1"; - specularPower[0] = 8; - pixelSpecular[0] = false; - emissive[0] = true; - - doubleSided = false; - translucent = false; - translucentBlendOp = "None"; -}; - -singleton Material(noshapetext_noshape_mat) -{ - mapTo = "noshape_mat"; - - diffuseMap[0] = ""; - - diffuseColor[0] = "0.4 0.3504 0.363784 0.33058"; - specular[0] = "1 1 1 1"; - specularPower[0] = 8; - pixelSpecular[0] = false; - emissive[0] = true; - - doubleSided = false; - translucent = true; - translucentBlendOp = "None"; -}; - -//--- noshapetext.dae MATERIALS END --- - -//--- portal MATERIALS BEGIN --- - -singleton Material(portal5_portal_top) -{ - mapTo = "portal_top"; - - diffuseMap[0] = "top"; - normalMap[0] = "top-normal"; - - diffuseColor[0] = "0.4 0.4 0.4 1"; - specular[0] = "0.5 0.5 0.5 1"; - specularPower[0] = 2; - pixelSpecular[0] = false; - emissive[0] = true; - - doubleSided = false; - translucent = false; - translucentBlendOp = "None"; -}; - -singleton Material(portal5_portal_lightray) -{ - mapTo = "portal_lightray"; - - diffuseMap[0] = "lightray"; - - diffuseColor[0] = "0.4 0.4 0.4 0.64462"; - specular[0] = "0.5 0.5 0.5 1"; - specularPower[0] = 2; - pixelSpecular[0] = false; - emissive[0] = true; - - doubleSided = 1; - translucent = true; - translucentBlendOp = "AddAlpha"; - castShadows = "0"; -}; -//--- portal MATERIALS END --- - diff --git a/Templates/Empty/game/core/art/shapes/noshape.dts b/Templates/Empty/game/core/art/shapes/noshape.dts deleted file mode 100644 index a7a64cf10..000000000 Binary files a/Templates/Empty/game/core/art/shapes/noshape.dts and /dev/null differ diff --git a/Templates/Empty/game/core/art/shapes/noshape.mb b/Templates/Empty/game/core/art/shapes/noshape.mb deleted file mode 100644 index 24330c1db..000000000 Binary files a/Templates/Empty/game/core/art/shapes/noshape.mb and /dev/null differ diff --git a/Templates/Empty/game/core/art/shapes/octahedron.3ds b/Templates/Empty/game/core/art/shapes/octahedron.3ds deleted file mode 100644 index e4004f283..000000000 Binary files a/Templates/Empty/game/core/art/shapes/octahedron.3ds and /dev/null differ diff --git a/Templates/Empty/game/core/art/shapes/octahedron.dts b/Templates/Empty/game/core/art/shapes/octahedron.dts deleted file mode 100644 index c10f96663..000000000 Binary files a/Templates/Empty/game/core/art/shapes/octahedron.dts and /dev/null differ diff --git a/Templates/Empty/game/core/art/shapes/octahedron.max b/Templates/Empty/game/core/art/shapes/octahedron.max deleted file mode 100644 index 36a1aef66..000000000 Binary files a/Templates/Empty/game/core/art/shapes/octahedron.max and /dev/null differ diff --git a/Templates/Empty/game/core/art/shapes/portal.dts b/Templates/Empty/game/core/art/shapes/portal.dts deleted file mode 100644 index edbd851c7..000000000 Binary files a/Templates/Empty/game/core/art/shapes/portal.dts and /dev/null differ diff --git a/Templates/Empty/game/core/art/shapes/simplecone.3ds b/Templates/Empty/game/core/art/shapes/simplecone.3ds deleted file mode 100644 index 090cb5d93..000000000 Binary files a/Templates/Empty/game/core/art/shapes/simplecone.3ds and /dev/null differ diff --git a/Templates/Empty/game/core/art/shapes/simplecone.dts b/Templates/Empty/game/core/art/shapes/simplecone.dts deleted file mode 100644 index ed356132d..000000000 Binary files a/Templates/Empty/game/core/art/shapes/simplecone.dts and /dev/null differ diff --git a/Templates/Empty/game/core/art/shapes/simplecone.mtl b/Templates/Empty/game/core/art/shapes/simplecone.mtl deleted file mode 100644 index 4e946ac63..000000000 --- a/Templates/Empty/game/core/art/shapes/simplecone.mtl +++ /dev/null @@ -1,10 +0,0 @@ -newmtl simplecone -Ka 0 0 0 -Kd 0 0.501961 0.752941 -Ks 0 0 0 -Ni 1 -Ns 400 -Tf 1 1 1 -d 1 -map_Kd blue.jpg - diff --git a/Templates/Empty/game/core/art/shapes/top-normal.png b/Templates/Empty/game/core/art/shapes/top-normal.png deleted file mode 100644 index 30e35fedb..000000000 Binary files a/Templates/Empty/game/core/art/shapes/top-normal.png and /dev/null differ diff --git a/Templates/Empty/game/core/art/shapes/top.png b/Templates/Empty/game/core/art/shapes/top.png deleted file mode 100644 index 0ceb304da..000000000 Binary files a/Templates/Empty/game/core/art/shapes/top.png and /dev/null differ diff --git a/Templates/Empty/game/core/art/shapes/unit_capsule.dts b/Templates/Empty/game/core/art/shapes/unit_capsule.dts deleted file mode 100644 index bc9483fac..000000000 Binary files a/Templates/Empty/game/core/art/shapes/unit_capsule.dts and /dev/null differ diff --git a/Templates/Empty/game/core/art/shapes/unit_cube.dts b/Templates/Empty/game/core/art/shapes/unit_cube.dts deleted file mode 100644 index feee7cf94..000000000 Binary files a/Templates/Empty/game/core/art/shapes/unit_cube.dts and /dev/null differ diff --git a/Templates/Empty/game/core/art/shapes/unit_sphere.dts b/Templates/Empty/game/core/art/shapes/unit_sphere.dts deleted file mode 100644 index 4d435438e..000000000 Binary files a/Templates/Empty/game/core/art/shapes/unit_sphere.dts and /dev/null differ diff --git a/Templates/Empty/game/core/art/skies/blank/solidsky_black.jpg b/Templates/Empty/game/core/art/skies/blank/solidsky_black.jpg deleted file mode 100644 index bce44102c..000000000 Binary files a/Templates/Empty/game/core/art/skies/blank/solidsky_black.jpg and /dev/null differ diff --git a/Templates/Empty/game/core/art/skies/blank/solidsky_grey.jpg b/Templates/Empty/game/core/art/skies/blank/solidsky_grey.jpg deleted file mode 100644 index 7707d903a..000000000 Binary files a/Templates/Empty/game/core/art/skies/blank/solidsky_grey.jpg and /dev/null differ diff --git a/Templates/Empty/game/core/art/white.jpg b/Templates/Empty/game/core/art/white.jpg deleted file mode 100644 index e2f2a1a7e..000000000 Binary files a/Templates/Empty/game/core/art/white.jpg and /dev/null differ diff --git a/Templates/Empty/game/core/main.cs b/Templates/Empty/game/core/main.cs deleted file mode 100644 index f666c948c..000000000 --- a/Templates/Empty/game/core/main.cs +++ /dev/null @@ -1,183 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -// Constants for referencing video resolution preferences -$WORD::RES_X = 0; -$WORD::RES_Y = 1; -$WORD::FULLSCREEN = 2; -$WORD::BITDEPTH = 3; -$WORD::REFRESH = 4; -$WORD::AA = 5; - -//--------------------------------------------------------------------------------------------- -// CorePackage -// Adds functionality for this mod to some standard functions. -//--------------------------------------------------------------------------------------------- -package CorePackage -{ -//--------------------------------------------------------------------------------------------- -// onStart -// Called when the engine is starting up. Initializes this mod. -//--------------------------------------------------------------------------------------------- -function onStart() -{ - Parent::onStart(); - - // Here is where we will do the video device stuff, so it overwrites the defaults - // First set the PCI device variables (yes AGP/PCI-E works too) - $isFirstPersonVar = 1; - - // Uncomment to enable AdvancedLighting on the Mac (T3D 2009 Beta 3) - //$pref::machax::enableAdvancedLighting = true; - - // Uncomment to disable ShaderGen, useful when debugging - //$ShaderGen::GenNewShaders = false; - - // Uncomment to dump disassembly for any shader that is compiled to disk. - // These will appear as shadername_dis.txt in the same path as the - // hlsl or glsl shader. - //$gfx::disassembleAllShaders = true; - - // Uncomment useNVPerfHud to allow you to start up correctly - // when you drop your executable onto NVPerfHud - //$Video::useNVPerfHud = true; - - // Uncomment these to allow you to force your app into using - // a specific pixel shader version (0 is for fixed function) - //$pref::Video::forcePixVersion = true; - //$pref::Video::forcedPixVersion = 0; - - if ($platform $= "macos") - $pref::Video::displayDevice = "OpenGL"; - //else - //$pref::Video::displayDevice = "D3D9"; - - // Initialise stuff. - exec("./scripts/client/core.cs"); - initializeCore(); - - exec("./scripts/client/client.cs"); - exec("./scripts/server/server.cs"); - - exec("./scripts/gui/guiTreeViewCtrl.cs"); - exec("./scripts/gui/messageBoxes/messageBox.ed.cs"); - - echo(" % - Initialized Core"); -} - -//--------------------------------------------------------------------------------------------- -// onExit -// Called when the engine is shutting down. Shutdowns this mod. -//--------------------------------------------------------------------------------------------- -function onExit() -{ - // Shutdown stuff. - shutdownCore(); - - Parent::onExit(); -} - -function loadKeybindings() -{ - $keybindCount = 0; - // Load up the active projects keybinds. - if(isFunction("setupKeybinds")) - setupKeybinds(); -} - -//--------------------------------------------------------------------------------------------- -// displayHelp -// Prints the command line options available for this mod. -//--------------------------------------------------------------------------------------------- -function displayHelp() { - // Let the parent do its stuff. - Parent::displayHelp(); - - error("Core Mod options:\n" @ - " -fullscreen Starts game in full screen mode\n" @ - " -windowed Starts game in windowed mode\n" @ - " -autoVideo Auto detect video, but prefers OpenGL\n" @ - " -openGL Force OpenGL acceleration\n" @ - " -directX Force DirectX acceleration\n" @ - " -voodoo2 Force Voodoo2 acceleration\n" @ - " -prefs Exec the config file\n"); -} - -//--------------------------------------------------------------------------------------------- -// parseArgs -// Parses the command line arguments and processes those valid for this mod. -//--------------------------------------------------------------------------------------------- -function parseArgs() -{ - // Let the parent grab the arguments it wants first. - Parent::parseArgs(); - - // Loop through the arguments. - for (%i = 1; %i < $Game::argc; %i++) - { - %arg = $Game::argv[%i]; - %nextArg = $Game::argv[%i+1]; - %hasNextArg = $Game::argc - %i > 1; - - switch$ (%arg) - { - case "-fullscreen": - $cliFullscreen = true; - $argUsed[%i]++; - - case "-windowed": - $cliFullscreen = false; - $argUsed[%i]++; - - case "-openGL": - $pref::Video::displayDevice = "OpenGL"; - $argUsed[%i]++; - - case "-directX": - $pref::Video::displayDevice = "D3D"; - $argUsed[%i]++; - - case "-voodoo2": - $pref::Video::displayDevice = "Voodoo2"; - $argUsed[%i]++; - - case "-autoVideo": - $pref::Video::displayDevice = ""; - $argUsed[%i]++; - - case "-prefs": - $argUsed[%i]++; - if (%hasNextArg) { - exec(%nextArg, true, true); - $argUsed[%i+1]++; - %i++; - } - else - error("Error: Missing Command Line argument. Usage: -prefs "); - } - } -} - -}; - -activatePackage(CorePackage); - diff --git a/Templates/Empty/game/core/scripts/client/centerPrint.cs b/Templates/Empty/game/core/scripts/client/centerPrint.cs deleted file mode 100644 index 846afdbd8..000000000 --- a/Templates/Empty/game/core/scripts/client/centerPrint.cs +++ /dev/null @@ -1,95 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -$centerPrintActive = 0; -$bottomPrintActive = 0; - -// Selectable window sizes -$CenterPrintSizes[1] = 20; -$CenterPrintSizes[2] = 36; -$CenterPrintSizes[3] = 56; - -// time is specified in seconds -function clientCmdCenterPrint( %message, %time, %size ) -{ - // if centerprint already visible, reset text and time. - if ($centerPrintActive) { - if (centerPrintDlg.removePrint !$= "") - cancel(centerPrintDlg.removePrint); - } - else { - CenterPrintDlg.visible = 1; - $centerPrintActive = 1; - } - - CenterPrintText.setText( "" @ %message ); - CenterPrintDlg.extent = firstWord(CenterPrintDlg.extent) @ " " @ $CenterPrintSizes[%size]; - - if (%time > 0) - centerPrintDlg.removePrint = schedule( ( %time * 1000 ), 0, "clientCmdClearCenterPrint" ); -} - -// time is specified in seconds -function clientCmdBottomPrint( %message, %time, %size ) -{ - // if bottomprint already visible, reset text and time. - if ($bottomPrintActive) { - if( bottomPrintDlg.removePrint !$= "") - cancel(bottomPrintDlg.removePrint); - } - else { - bottomPrintDlg.setVisible(true); - $bottomPrintActive = 1; - } - - bottomPrintText.setText( "" @ %message ); - bottomPrintDlg.extent = firstWord(bottomPrintDlg.extent) @ " " @ $CenterPrintSizes[%size]; - - if (%time > 0) - bottomPrintDlg.removePrint = schedule( ( %time * 1000 ), 0, "clientCmdClearbottomPrint" ); -} - -function BottomPrintText::onResize(%this, %width, %height) -{ - %this.position = "0 0"; -} - -function CenterPrintText::onResize(%this, %width, %height) -{ - %this.position = "0 0"; -} - -//------------------------------------------------------------------------------------------------------- - -function clientCmdClearCenterPrint() -{ - $centerPrintActive = 0; - CenterPrintDlg.visible = 0; - CenterPrintDlg.removePrint = ""; -} - -function clientCmdClearBottomPrint() -{ - $bottomPrintActive = 0; - BottomPrintDlg.visible = 0; - BottomPrintDlg.removePrint = ""; -} diff --git a/Templates/Empty/game/core/scripts/client/client.cs b/Templates/Empty/game/core/scripts/client/client.cs deleted file mode 100644 index 4c8810e77..000000000 --- a/Templates/Empty/game/core/scripts/client/client.cs +++ /dev/null @@ -1,62 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -function initBaseClient() -{ - // Base client functionality - exec( "./message.cs" ); - exec( "./mission.cs" ); - exec( "./missionDownload.cs" ); - exec( "./actionMap.cs" ); - exec( "./renderManager.cs" ); - exec( "./lighting.cs" ); - - initRenderManager(); - initLightingSystems(); -} - -/// A helper function which will return the ghosted client object -/// from a server object when connected to a local server. -function serverToClientObject( %serverObject ) -{ - assert( isObject( LocalClientConnection ), "serverToClientObject() - No local client connection found!" ); - assert( isObject( ServerConnection ), "serverToClientObject() - No server connection found!" ); - - %ghostId = LocalClientConnection.getGhostId( %serverObject ); - if ( %ghostId == -1 ) - return 0; - - return ServerConnection.resolveGhostID( %ghostId ); -} - -//---------------------------------------------------------------------------- -// Debug commands -//---------------------------------------------------------------------------- - -function netSimulateLag( %msDelay, %packetLossPercent ) -{ - if ( %packetLossPercent $= "" ) - %packetLossPercent = 0; - - commandToServer( 'NetSimulateLag', %msDelay, %packetLossPercent ); -} - diff --git a/Templates/Empty/game/core/scripts/client/commands.cs b/Templates/Empty/game/core/scripts/client/commands.cs deleted file mode 100644 index 28c45007d..000000000 --- a/Templates/Empty/game/core/scripts/client/commands.cs +++ /dev/null @@ -1,28 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -// Sync the Camera and the EditorGui -function clientCmdSyncEditorGui() -{ - if (isObject(EditorGui)) - EditorGui.syncCameraGui(); -} \ No newline at end of file diff --git a/Templates/Empty/game/core/scripts/client/core.cs b/Templates/Empty/game/core/scripts/client/core.cs deleted file mode 100644 index ecf1626f8..000000000 --- a/Templates/Empty/game/core/scripts/client/core.cs +++ /dev/null @@ -1,278 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -//--------------------------------------------------------------------------------------------- -// initializeCore -// Initializes core game functionality. -//--------------------------------------------------------------------------------------------- -function initializeCore() -{ - // Not Reentrant - if( $coreInitialized == true ) - return; - - // Core keybindings. - GlobalActionMap.bind(keyboard, tilde, toggleConsole); - GlobalActionMap.bind(keyboard, "ctrl p", doScreenShot); - GlobalActionMap.bindcmd(keyboard, "alt enter", "Canvas.attemptFullscreenToggle();",""); - GlobalActionMap.bindcmd(keyboard, "alt k", "cls();", ""); -// GlobalActionMap.bindCmd(keyboard, "escape", "", "handleEscape();"); - - - - // Very basic functions used by everyone. - exec("./audio.cs"); - exec("./canvas.cs"); - exec("./cursor.cs"); - exec("./persistenceManagerTest.cs"); - - // Content. - exec("~/art/gui/profiles.cs"); - exec("~/scripts/gui/cursors.cs"); - - exec( "./audioEnvironments.cs" ); - exec( "./audioDescriptions.cs" ); - exec( "./audioStates.cs" ); - exec( "./audioAmbiences.cs" ); - - // Input devices - exec("~/scripts/client/oculusVR.cs"); - - // Seed the random number generator. - setRandomSeed(); - - // Set up networking. - setNetPort(0); - - // Initialize the canvas. - initializeCanvas(); - - // Start processing file change events. - startFileChangeNotifications(); - - // Core Guis. - exec("~/art/gui/console.gui"); - exec("~/art/gui/consoleVarDlg.gui"); - exec("~/art/gui/netGraphGui.gui"); - exec("~/art/gui/RecordingsDlg.gui"); - - // Gui Helper Scripts. - exec("~/scripts/gui/help.cs"); - - // Random Scripts. - exec("~/scripts/client/screenshot.cs"); - exec("~/scripts/client/scriptDoc.cs"); - //exec("~/scripts/client/keybindings.cs"); - exec("~/scripts/client/helperfuncs.cs"); - exec("~/scripts/client/commands.cs"); - - // Client scripts - exec("~/scripts/client/devHelpers.cs"); - exec("~/scripts/client/metrics.cs"); - exec("~/scripts/client/recordings.cs"); - exec("~/scripts/client/centerPrint.cs"); - - // Materials and Shaders for rendering various object types - loadCoreMaterials(); - - exec("~/scripts/client/commonMaterialData.cs"); - exec("~/scripts/client/shaders.cs"); - exec("~/scripts/client/materials.cs"); - exec("~/scripts/client/terrainBlock.cs"); - exec("~/scripts/client/water.cs"); - exec("~/scripts/client/imposter.cs"); - exec("~/scripts/client/scatterSky.cs"); - exec("~/scripts/client/clouds.cs"); - - // Initialize all core post effects. - exec("~/scripts/client/postFx.cs"); - initPostEffects(); - - // Initialize the post effect manager. - exec("~/scripts/client/postFx/postFXManager.gui"); - exec("~/scripts/client/postFx/postFXManager.gui.cs"); - exec("~/scripts/client/postFx/postFXManager.gui.settings.cs"); - exec("~/scripts/client/postFx/postFXManager.persistance.cs"); - - PostFXManager.settingsApplyDefaultPreset(); // Get the default preset settings - - // Set a default cursor. - Canvas.setCursor(DefaultCursor); - - loadKeybindings(); - - $coreInitialized = true; -} - -//--------------------------------------------------------------------------------------------- -// shutdownCore -// Shuts down core game functionality. -//--------------------------------------------------------------------------------------------- -function shutdownCore() -{ - // Stop file change events. - stopFileChangeNotifications(); - - sfxShutdown(); -} - -//--------------------------------------------------------------------------------------------- -// dumpKeybindings -// Saves of all keybindings. -//--------------------------------------------------------------------------------------------- -function dumpKeybindings() -{ - // Loop through all the binds. - for (%i = 0; %i < $keybindCount; %i++) - { - // If we haven't dealt with this map yet... - if (isObject($keybindMap[%i])) - { - // Save and delete. - $keybindMap[%i].save(getPrefsPath("bind.cs"), %i == 0 ? false : true); - $keybindMap[%i].delete(); - } - } -} - -function handleEscape() -{ - - if (isObject(EditorGui)) - { - if (Canvas.getContent() == EditorGui.getId()) - { - EditorGui.handleEscape(); - return; - } - else if ( EditorIsDirty() ) - { - MessageBoxYesNoCancel( "Level Modified", "Level has been modified in the Editor. Save?", - "EditorDoExitMission(1);", - "EditorDoExitMission();", - ""); - return; - } - } - - if (isObject(GuiEditor)) - { - if (GuiEditor.isAwake()) - { - GuiEditCanvas.quit(); - return; - } - } - - if (PlayGui.isAwake()) - escapeFromGame(); -} - -//----------------------------------------------------------------------------- -// loadMaterials - load all materials.cs files -//----------------------------------------------------------------------------- -function loadCoreMaterials() -{ - // Load any materials files for which we only have DSOs. - - for( %file = findFirstFile( "core/materials.cs.dso" ); - %file !$= ""; - %file = findNextFile( "core/materials.cs.dso" )) - { - // Only execute, if we don't have the source file. - %csFileName = getSubStr( %file, 0, strlen( %file ) - 4 ); - if( !isFile( %csFileName ) ) - exec( %csFileName ); - } - - // Load all source material files. - - for( %file = findFirstFile( "core/materials.cs" ); - %file !$= ""; - %file = findNextFile( "core/materials.cs" )) - { - exec( %file ); - } -} - -function reloadCoreMaterials() -{ - reloadTextures(); - loadCoreMaterials(); - reInitMaterials(); -} - -//----------------------------------------------------------------------------- -// loadMaterials - load all materials.cs files -//----------------------------------------------------------------------------- -function loadMaterials() -{ - // Load any materials files for which we only have DSOs. - - for( %file = findFirstFile( "*/materials.cs.dso" ); - %file !$= ""; - %file = findNextFile( "*/materials.cs.dso" )) - { - // Only execute, if we don't have the source file. - %csFileName = getSubStr( %file, 0, strlen( %file ) - 4 ); - if( !isFile( %csFileName ) ) - exec( %csFileName ); - } - - // Load all source material files. - - for( %file = findFirstFile( "*/materials.cs" ); - %file !$= ""; - %file = findNextFile( "*/materials.cs" )) - { - exec( %file ); - } - - // Load all materials created by the material editor if - // the folder exists - if( IsDirectory( "materialEditor" ) ) - { - for( %file = findFirstFile( "materialEditor/*.cs.dso" ); - %file !$= ""; - %file = findNextFile( "materialEditor/*.cs.dso" )) - { - // Only execute, if we don't have the source file. - %csFileName = getSubStr( %file, 0, strlen( %file ) - 4 ); - if( !isFile( %csFileName ) ) - exec( %csFileName ); - } - - for( %file = findFirstFile( "materialEditor/*.cs" ); - %file !$= ""; - %file = findNextFile( "materialEditor/*.cs" )) - { - exec( %file ); - } - } -} - -function reloadMaterials() -{ - reloadTextures(); - loadMaterials(); - reInitMaterials(); -} \ No newline at end of file diff --git a/Templates/Empty/game/core/scripts/client/defaults.cs b/Templates/Empty/game/core/scripts/client/defaults.cs deleted file mode 100644 index d1805d337..000000000 --- a/Templates/Empty/game/core/scripts/client/defaults.cs +++ /dev/null @@ -1,512 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -// The master server is declared with the server defaults, which is -// loaded on both clients & dedicated servers. If the server mod -// is not loaded on a client, then the master must be defined. -// $pref::Master[0] = "2:master.garagegames.com:28002"; - -$pref::Player::Name = "Visitor"; -$pref::Player::defaultFov = 65; -$pref::Player::zoomSpeed = 0; - -$pref::Net::LagThreshold = 400; -$pref::Net::Port = 28000; - -$pref::HudMessageLogSize = 40; -$pref::ChatHudLength = 1; - -$pref::Input::LinkMouseSensitivity = 1; -// DInput keyboard, mouse, and joystick prefs -$pref::Input::KeyboardEnabled = 1; -$pref::Input::MouseEnabled = 1; -$pref::Input::JoystickEnabled = 0; -$pref::Input::KeyboardTurnSpeed = 0.1; -$pref::Input::MouseWheelSpeed = 120; - -$sceneLighting::cacheSize = 20000; -$sceneLighting::purgeMethod = "lastCreated"; -$sceneLighting::cacheLighting = 1; - -$pref::Video::displayDevice = "D3D9"; -$pref::Video::disableVerticalSync = 1; -$pref::Video::mode = "1024 768 false 32 60 4"; -$pref::Video::defaultFenceCount = 0; -$pref::Video::screenShotSession = 0; -$pref::Video::screenShotFormat = "PNG"; - -/// This disables the hardware FSAA/MSAA so that -/// we depend completely on the FXAA post effect -/// which works on all cards and in deferred mode. -/// -/// Note the new Intel Hybrid graphics on laptops -/// will fail to initialize when hardware AA is -/// enabled... so you've been warned. -/// -$pref::Video::disableHardwareAA = true; - -$pref::Video::disableNormalmapping = false; - -$pref::Video::disablePixSpecular = false; - -$pref::Video::disableCubemapping = false; - -/// -$pref::Video::disableParallaxMapping = false; - -$pref::Video::Gamma = 2.2; -$pref::Video::Contrast = 1.0; -$pref::Video::Brightness = 0; - -// Console-friendly defaults -if($platform $= "xenon") -{ - // Save some fillrate on the X360, and take advantage of the HW scaling - $pref::Video::Resolution = "1152 640"; - $pref::Video::mode = $pref::Video::Resolution SPC "true 32 60 0"; - $pref::Video::fullScreen = 1; -} - -/// This is the path used by ShaderGen to cache procedural -/// shaders. If left blank ShaderGen will only cache shaders -/// to memory and not to disk. -$shaderGen::cachePath = "shaders/procedural"; - -/// The perfered light manager to use at startup. If blank -/// or if the selected one doesn't work on this platfom it -/// will try the defaults below. -$pref::lightManager = ""; - -/// This is the default list of light managers ordered from -/// most to least desirable for initialization. -$lightManager::defaults = "Advanced Lighting" NL "Basic Lighting"; - -/// A scale to apply to the camera view distance -/// typically used for tuning performance. -$pref::camera::distanceScale = 1.0; - -/// Causes the system to do a one time autodetect -/// of an SFX provider and device at startup if the -/// provider is unset. -$pref::SFX::autoDetect = true; - -/// The sound provider to select at startup. Typically -/// this is DirectSound, OpenAL, or XACT. There is also -/// a special Null provider which acts normally, but -/// plays no sound. -$pref::SFX::provider = ""; - -/// The sound device to select from the provider. Each -/// provider may have several different devices. -$pref::SFX::device = "OpenAL"; - -/// If true the device will try to use hardware buffers -/// and sound mixing. If not it will use software. -$pref::SFX::useHardware = false; - -/// If you have a software device you have a -/// choice of how many software buffers to -/// allow at any one time. More buffers cost -/// more CPU time to process and mix. -$pref::SFX::maxSoftwareBuffers = 16; - -/// This is the playback frequency for the primary -/// sound buffer used for mixing. Although most -/// providers will reformat on the fly, for best -/// quality and performance match your sound files -/// to this setting. -$pref::SFX::frequency = 44100; - -/// This is the playback bitrate for the primary -/// sound buffer used for mixing. Although most -/// providers will reformat on the fly, for best -/// quality and performance match your sound files -/// to this setting. -$pref::SFX::bitrate = 32; - -/// The overall system volume at startup. Note that -/// you can only scale volume down, volume does not -/// get louder than 1. -$pref::SFX::masterVolume = 0.8; - -/// The startup sound channel volumes. These are -/// used to control the overall volume of different -/// classes of sounds. -$pref::SFX::channelVolume1 = 1; -$pref::SFX::channelVolume2 = 1; -$pref::SFX::channelVolume3 = 1; -$pref::SFX::channelVolume4 = 1; -$pref::SFX::channelVolume5 = 1; -$pref::SFX::channelVolume6 = 1; -$pref::SFX::channelVolume7 = 1; -$pref::SFX::channelVolume8 = 1; - -$pref::PostEffect::PreferedHDRFormat = "GFXFormatR8G8B8A8"; - -/// This is an scalar which can be used to reduce the -/// reflection textures on all objects to save fillrate. -$pref::Reflect::refractTexScale = 1.0; - -/// This is the total frame in milliseconds to budget for -/// reflection rendering. If your CPU bound and have alot -/// of smaller reflection surfaces try reducing this time. -$pref::Reflect::frameLimitMS = 10; - -/// Set true to force all water objects to use static cubemap reflections. -$pref::Water::disableTrueReflections = false; - -// A global LOD scalar which can reduce the overall density of placed GroundCover. -$pref::GroundCover::densityScale = 1.0; - -/// An overall scaler on the lod switching between DTS models. -/// Smaller numbers makes the lod switch sooner. -$pref::TS::detailAdjust = 1.0; - -/// -$pref::Decals::enabled = true; - -/// -$pref::Decals::lifeTimeScale = "1"; - -/// The number of mipmap levels to drop on loaded textures -/// to reduce video memory usage. -/// -/// It will skip any textures that have been defined as not -/// allowing down scaling. -/// -$pref::Video::textureReductionLevel = 0; - -/// -$pref::Shadows::textureScalar = 1.0; - -/// -$pref::Shadows::disable = false; - -/// Sets the shadow filtering mode. -/// -/// None - Disables filtering. -/// -/// SoftShadow - Does a simple soft shadow -/// -/// SoftShadowHighQuality -/// -$pref::Shadows::filterMode = "SoftShadow"; - -/// -$pref::Video::defaultAnisotropy = 1; - -/// Radius in meters around the camera that ForestItems are affected by wind. -/// Note that a very large number with a large number of items is not cheap. -$pref::windEffectRadius = 25; - -/// AutoDetect graphics quality levels the next startup. -$pref::Video::autoDetect = 1; - -//----------------------------------------------------------------------------- -// Graphics Quality Groups -//----------------------------------------------------------------------------- - -// The graphics quality groups are used by the options dialog to -// control the state of the $prefs. You should overload these in -// your game specific defaults.cs file if they need to be changed. - -if ( isObject( MeshQualityGroup ) ) - MeshQualityGroup.delete(); -if ( isObject( TextureQualityGroup ) ) - TextureQualityGroup.delete(); -if ( isObject( LightingQualityGroup ) ) - LightingQualityGroup.delete(); -if ( isObject( ShaderQualityGroup ) ) - ShaderQualityGroup.delete(); - -new SimGroup( MeshQualityGroup ) -{ - new ArrayObject( [Lowest] ) - { - class = "GraphicsQualityLevel"; - caseSensitive = true; - - key["$pref::TS::detailAdjust"] = 0.5; - key["$pref::TS::skipRenderDLs"] = 1; - key["$pref::Terrain::lodScale"] = 2.0; - key["$pref::decalMgr::enabled"] = false; - key["$pref::GroundCover::densityScale"] = 0.5; - }; - - new ArrayObject( [Low] ) - { - class = "GraphicsQualityLevel"; - caseSensitive = true; - - key["$pref::TS::detailAdjust"] = 0.75; - key["$pref::TS::skipRenderDLs"] = 0; - key["$pref::Terrain::lodScale"] = 1.5; - key["$pref::decalMgr::enabled"] = true; - key["$pref::GroundCover::densityScale"] = 0.75; - }; - - new ArrayObject( [Normal] ) - { - class = "GraphicsQualityLevel"; - caseSensitive = true; - - key["$pref::TS::detailAdjust"] = 1.0; - key["$pref::TS::skipRenderDLs"] = 0; - key["$pref::Terrain::lodScale"] = 1.0; - key["$pref::decalMgr::enabled"] = true; - key["$pref::GroundCover::densityScale"] = 1.0; - }; - - new ArrayObject( [High] ) - { - class = "GraphicsQualityLevel"; - caseSensitive = true; - - key["$pref::TS::detailAdjust"] = 1.5; - key["$pref::TS::skipRenderDLs"] = 0; - key["$pref::Terrain::lodScale"] = 0.75; - key["$pref::decalMgr::enabled"] = true; - key["$pref::GroundCover::densityScale"] = 1.0; - }; -}; - - -new SimGroup( TextureQualityGroup ) -{ - new ArrayObject( [Lowest] ) - { - class = "GraphicsQualityLevel"; - caseSensitive = true; - - key["$pref::Video::textureReductionLevel"] = 2; - key["$pref::Reflect::refractTexScale"] = 0.5; - key["$pref::Terrain::detailScale"] = 0.5; - }; - - new ArrayObject( [Low] ) - { - class = "GraphicsQualityLevel"; - caseSensitive = true; - - key["$pref::Video::textureReductionLevel"] = 1; - key["$pref::Reflect::refractTexScale"] = 0.75; - key["$pref::Terrain::detailScale"] = 0.75; - }; - - new ArrayObject( [Normal] ) - { - class = "GraphicsQualityLevel"; - caseSensitive = true; - - key["$pref::Video::textureReductionLevel"] = 0; - key["$pref::Reflect::refractTexScale"] = 1; - key["$pref::Terrain::detailScale"] = 1; - }; - - new ArrayObject( [High] ) - { - class = "GraphicsQualityLevel"; - caseSensitive = true; - - key["$pref::Video::textureReductionLevel"] = 0; - key["$pref::Reflect::refractTexScale"] = 1.25; - key["$pref::Terrain::detailScale"] = 1.5; - }; -}; - -function TextureQualityGroup::onApply( %this, %level ) -{ - // Note that this can be a slow operation. - reloadTextures(); -} - - -new SimGroup( LightingQualityGroup ) -{ - new ArrayObject( [Lowest] ) - { - class = "GraphicsQualityLevel"; - caseSensitive = true; - - key["$pref::lightManager"] = "Basic Lighting"; - key["$pref::Shadows::disable"] = false; - key["$pref::Shadows::textureScalar"] = 0.5; - key["$pref::Shadows::filterMode"] = "None"; - }; - - new ArrayObject( [Low] ) - { - class = "GraphicsQualityLevel"; - caseSensitive = true; - - key["$pref::lightManager"] = "Advanced Lighting"; - key["$pref::Shadows::disable"] = false; - key["$pref::Shadows::textureScalar"] = 0.5; - key["$pref::Shadows::filterMode"] = "SoftShadow"; - }; - - new ArrayObject( [Normal] ) - { - class = "GraphicsQualityLevel"; - caseSensitive = true; - - key["$pref::lightManager"] = "Advanced Lighting"; - key["$pref::Shadows::disable"] = false; - key["$pref::Shadows::textureScalar"] = 1.0; - key["$pref::Shadows::filterMode"] = "SoftShadowHighQuality"; - }; - - new ArrayObject( [High] ) - { - class = "GraphicsQualityLevel"; - caseSensitive = true; - - key["$pref::lightManager"] = "Advanced Lighting"; - key["$pref::Shadows::disable"] = false; - key["$pref::Shadows::textureScalar"] = 2.0; - key["$pref::Shadows::filterMode"] = "SoftShadowHighQuality"; - }; -}; - -function LightingQualityGroup::onApply( %this, %level ) -{ - // Set the light manager. This should do nothing - // if its already set or if its not compatible. - setLightManager( $pref::lightManager ); -} - - -// TODO: Reduce shader complexity of water and the scatter sky here! -new SimGroup( ShaderQualityGroup ) -{ - new ArrayObject( [Lowest] ) - { - class = "GraphicsQualityLevel"; - caseSensitive = true; - - key["$pref::Video::disablePixSpecular"] = true; - key["$pref::Video::disableNormalmapping"] = true; - key["$pref::Video::disableParallaxMapping"] = true; - key["$pref::Water::disableTrueReflections"] = true; - }; - - new ArrayObject( [Low] ) - { - class = "GraphicsQualityLevel"; - caseSensitive = true; - - key["$pref::Video::disablePixSpecular"] = false; - key["$pref::Video::disableNormalmapping"] = false; - key["$pref::Video::disableParallaxMapping"] = true; - key["$pref::Water::disableTrueReflections"] = true; - }; - - new ArrayObject( [Normal] ) - { - class = "GraphicsQualityLevel"; - caseSensitive = true; - - key["$pref::Video::disablePixSpecular"] = false; - key["$pref::Video::disableNormalmapping"] = false; - key["$pref::Video::disableParallaxMapping"] = false; - key["$pref::Water::disableTrueReflections"] = false; - }; - - new ArrayObject( [High] ) - { - class = "GraphicsQualityLevel"; - caseSensitive = true; - - key["$pref::Video::disablePixSpecular"] = false; - key["$pref::Video::disableNormalmapping"] = false; - key["$pref::Video::disableParallaxMapping"] = false; - key["$pref::Water::disableTrueReflections"] = false; - }; -}; - - -function GraphicsQualityAutodetect() -{ - $pref::Video::autoDetect = false; - - %shaderVer = getPixelShaderVersion(); - %intel = ( strstr( strupr( getDisplayDeviceInformation() ), "INTEL" ) != -1 ) ? true : false; - %videoMem = GFXCardProfilerAPI::getVideoMemoryMB(); - - return GraphicsQualityAutodetect_Apply( %shaderVer, %intel, %videoMem ); -} - -function GraphicsQualityAutodetect_Apply( %shaderVer, %intel, %videoMem ) -{ - if ( %shaderVer < 2.0 ) - { - return "Your video card does not meet the minimum requirment of shader model 2.0."; - } - - if ( %shaderVer < 3.0 || %intel ) - { - // Allow specular and normals for 2.0a and 2.0b - if ( %shaderVer > 2.0 ) - { - MeshQualityGroup-->Lowest.apply(); - TextureQualityGroup-->Lowest.apply(); - LightingQualityGroup-->Lowest.apply(); - ShaderQualityGroup-->Low.apply(); - } - else - { - MeshQualityGroup-->Lowest.apply(); - TextureQualityGroup-->Lowest.apply(); - LightingQualityGroup-->Lowest.apply(); - ShaderQualityGroup-->Lowest.apply(); - } - } - else - { - if ( %videoMem > 1000 ) - { - MeshQualityGroup-->High.apply(); - TextureQualityGroup-->High.apply(); - LightingQualityGroup-->High.apply(); - ShaderQualityGroup-->High.apply(); - } - else if ( %videoMem > 400 || %videoMem == 0 ) - { - MeshQualityGroup-->Normal.apply(); - TextureQualityGroup-->Normal.apply(); - LightingQualityGroup-->Normal.apply(); - ShaderQualityGroup-->Normal.apply(); - - if ( %videoMem == 0 ) - return "Torque was unable to detect available video memory. Applying 'Normal' quality."; - } - else - { - MeshQualityGroup-->Low.apply(); - TextureQualityGroup-->Low.apply(); - LightingQualityGroup-->Low.apply(); - ShaderQualityGroup-->Low.apply(); - } - } - - return "Graphics quality settings have been auto detected."; -} \ No newline at end of file diff --git a/Templates/Empty/game/core/scripts/client/devHelpers.cs b/Templates/Empty/game/core/scripts/client/devHelpers.cs deleted file mode 100644 index 6af00d21c..000000000 --- a/Templates/Empty/game/core/scripts/client/devHelpers.cs +++ /dev/null @@ -1,43 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -/// Shortcut for typing dbgSetParameters with the default values torsion uses. -function dbgTorsion() -{ - dbgSetParameters( 6060, "password", false ); -} - -/// Reset the input state to a default of all-keys-up. -/// A helpful remedy for when Torque misses a button up event do to your breakpoints -/// and can't stop shooting / jumping / strafing. -function mvReset() -{ - for ( %i = 0; %i < 6; %i++ ) - setVariable( "mvTriggerCount" @ %i, 0 ); - - $mvUpAction = 0; - $mvDownAction = 0; - $mvLeftAction = 0; - $mvRightAction = 0; - - // There are others. -} \ No newline at end of file diff --git a/Templates/Empty/game/core/scripts/client/helperfuncs.cs b/Templates/Empty/game/core/scripts/client/helperfuncs.cs deleted file mode 100644 index f8988a270..000000000 --- a/Templates/Empty/game/core/scripts/client/helperfuncs.cs +++ /dev/null @@ -1,278 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -function validateDatablockName(%name) -{ - // remove whitespaces at beginning and end - %name = trim( %name ); - - // remove numbers at the beginning - %numbers = "0123456789"; - while( strlen(%name) > 0 ) - { - // the first character - %firstChar = getSubStr( %name, 0, 1 ); - // if the character is a number remove it - if( strpos( %numbers, %firstChar ) != -1 ) - { - %name = getSubStr( %name, 1, strlen(%name) -1 ); - %name = ltrim( %name ); - } - else - break; - } - - // replace whitespaces with underscores - %name = strreplace( %name, " ", "_" ); - - // remove any other invalid characters - %invalidCharacters = "-+*/%$&§=()[].?\"#,;!~<>|°^{}"; - %name = stripChars( %name, %invalidCharacters ); - - if( %name $= "" ) - %name = "Unnamed"; - - return %name; -} - -//-------------------------------------------------------------------------- -// Finds location of %word in %text, starting at %start. Works just like strPos -//-------------------------------------------------------------------------- - -function wordPos(%text, %word, %start) -{ - if (%start $= "") %start = 0; - - if (strpos(%text, %word, 0) == -1) return -1; - %count = getWordCount(%text); - if (%start >= %count) return -1; - for (%i = %start; %i < %count; %i++) - { - if (getWord( %text, %i) $= %word) return %i; - } - return -1; -} - -//-------------------------------------------------------------------------- -// Finds location of %field in %text, starting at %start. Works just like strPos -//-------------------------------------------------------------------------- - -function fieldPos(%text, %field, %start) -{ - if (%start $= "") %start = 0; - - if (strpos(%text, %field, 0) == -1) return -1; - %count = getFieldCount(%text); - if (%start >= %count) return -1; - for (%i = %start; %i < %count; %i++) - { - if (getField( %text, %i) $= %field) return %i; - } - return -1; -} - -//-------------------------------------------------------------------------- -// returns the text in a file with "\n" at the end of each line -//-------------------------------------------------------------------------- - -function loadFileText( %file) -{ - %fo = new FileObject(); - %fo.openForRead(%file); - %text = ""; - while(!%fo.isEOF()) - { - %text = %text @ %fo.readLine(); - if (!%fo.isEOF()) %text = %text @ "\n"; - } - - %fo.delete(); - return %text; -} - -function setValueSafe(%dest, %val) -{ - %cmd = %dest.command; - %alt = %dest.altCommand; - %dest.command = ""; - %dest.altCommand = ""; - - %dest.setValue(%val); - - %dest.command = %cmd; - %dest.altCommand = %alt; -} - -function shareValueSafe(%source, %dest) -{ - setValueSafe(%dest, %source.getValue()); -} - -function shareValueSafeDelay(%source, %dest, %delayMs) -{ - schedule(%delayMs, 0, shareValueSafe, %source, %dest); -} - - -//------------------------------------------------------------------------------ -// An Aggregate Control is a plain GuiControl that contains other controls, -// which all share a single job or represent a single value. -//------------------------------------------------------------------------------ - -// AggregateControl.setValue( ) propagates the value to any control that has an -// internal name. -function AggregateControl::setValue(%this, %val, %child) -{ - for(%i = 0; %i < %this.getCount(); %i++) - { - %obj = %this.getObject(%i); - if( %obj == %child ) - continue; - - if(%obj.internalName !$= "") - setValueSafe(%obj, %val); - } -} - -// AggregateControl.getValue() uses the value of the first control that has an -// internal name, if it has not cached a value via .setValue -function AggregateControl::getValue(%this) -{ - for(%i = 0; %i < %this.getCount(); %i++) - { - %obj = %this.getObject(%i); - if(%obj.internalName !$= "") - { - //error("obj = " @ %obj.getId() @ ", " @ %obj.getName() @ ", " @ %obj.internalName ); - //error(" value = " @ %obj.getValue()); - return %obj.getValue(); - } - } -} - -// AggregateControl.updateFromChild( ) is called by child controls to propagate -// a new value, and to trigger the onAction() callback. -function AggregateControl::updateFromChild(%this, %child) -{ - %val = %child.getValue(); - if(%val == mCeil(%val)){ - %val = mCeil(%val); - }else{ - if ( %val <= -100){ - %val = mCeil(%val); - }else if ( %val <= -10){ - %val = mFloatLength(%val, 1); - }else if ( %val < 0){ - %val = mFloatLength(%val, 2); - }else if ( %val >= 1000){ - %val = mCeil(%val); - }else if ( %val >= 100){ - %val = mFloatLength(%val, 1); - }else if ( %val >= 10){ - %val = mFloatLength(%val, 2); - }else if ( %val > 0){ - %val = mFloatLength(%val, 3); - } - } - %this.setValue(%val, %child); - %this.onAction(); -} - -// default onAction stub, here only to prevent console spam warnings. -function AggregateControl::onAction(%this) -{ -} - -// call a method on all children that have an internalName and that implement the method. -function AggregateControl::callMethod(%this, %method, %args) -{ - for(%i = 0; %i < %this.getCount(); %i++) - { - %obj = %this.getObject(%i); - if(%obj.internalName !$= "" && %obj.isMethod(%method)) - eval(%obj @ "." @ %method @ "( " @ %args @ " );"); - } - -} - -// A function used in order to easily parse the MissionGroup for classes . I'm pretty -// sure at this point the function can be easily modified to search the any group as well. -function parseMissionGroup( %className, %childGroup ) -{ - if( getWordCount( %childGroup ) == 0) - %currentGroup = "MissionGroup"; - else - %currentGroup = %childGroup; - - for(%i = 0; %i < (%currentGroup).getCount(); %i++) - { - if( (%currentGroup).getObject(%i).getClassName() $= %className ) - return true; - - if( (%currentGroup).getObject(%i).getClassName() $= "SimGroup" ) - { - if( parseMissionGroup( %className, (%currentGroup).getObject(%i).getId() ) ) - return true; - } - } -} - -// A variation of the above used to grab ids from the mission group based on classnames -function parseMissionGroupForIds( %className, %childGroup ) -{ - if( getWordCount( %childGroup ) == 0) - %currentGroup = "MissionGroup"; - else - %currentGroup = %childGroup; - - for(%i = 0; %i < (%currentGroup).getCount(); %i++) - { - if( (%currentGroup).getObject(%i).getClassName() $= %className ) - %classIds = %classIds @ (%currentGroup).getObject(%i).getId() @ " "; - - if( (%currentGroup).getObject(%i).getClassName() $= "SimGroup" ) - %classIds = %classIds @ parseMissionGroupForIds( %className, (%currentGroup).getObject(%i).getId()); - } - return trim( %classIds ); -} - -//------------------------------------------------------------------------------ -// Altered Version of TGB's QuickEditDropDownTextEditCtrl -//------------------------------------------------------------------------------ - -function QuickEditDropDownTextEditCtrl::onRenameItem( %this ) -{ -} - -function QuickEditDropDownTextEditCtrl::updateFromChild( %this, %ctrl ) -{ - if( %ctrl.internalName $= "PopUpMenu" ) - { - %this->TextEdit.setText( %ctrl.getText() ); - } - else if ( %ctrl.internalName $= "TextEdit" ) - { - %popup = %this->PopupMenu; - %popup.changeTextById( %popup.getSelected(), %ctrl.getText() ); - %this.onRenameItem(); - } -} diff --git a/Templates/Empty/game/core/scripts/client/imposter.cs b/Templates/Empty/game/core/scripts/client/imposter.cs deleted file mode 100644 index 08ebf6866..000000000 --- a/Templates/Empty/game/core/scripts/client/imposter.cs +++ /dev/null @@ -1,32 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - - -function imposterMetricsCallback() -{ - return " | IMPOSTER |" @ - " Rendered: " @ $ImposterStats::rendered @ - " Batches: " @ $ImposterStats::batches @ - " DrawCalls: " @ $ImposterStats::drawCalls @ - " Polys: " @ $ImposterStats::polyCount @ - " RtChanges: " @ $ImposterStats::rtChanges; -} \ No newline at end of file diff --git a/Templates/Empty/game/core/scripts/client/lighting/advanced/deferredShading.cs b/Templates/Empty/game/core/scripts/client/lighting/advanced/deferredShading.cs deleted file mode 100644 index ad9732e0f..000000000 --- a/Templates/Empty/game/core/scripts/client/lighting/advanced/deferredShading.cs +++ /dev/null @@ -1,147 +0,0 @@ -singleton ShaderData( ClearGBufferShader ) -{ - DXVertexShaderFile = "shaders/common/lighting/advanced/deferredClearGBufferV.hlsl"; - DXPixelShaderFile = "shaders/common/lighting/advanced/deferredClearGBufferP.hlsl"; - - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/lighting/advanced/gl/deferredClearGBufferP.glsl"; - - pixVersion = 2.0; -}; - -singleton ShaderData( DeferredColorShader ) -{ - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/lighting/advanced/deferredColorShaderP.hlsl"; - - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/lighting/advanced/gl/deferredColorShaderP.glsl"; - - pixVersion = 2.0; -}; - -// Primary Deferred Shader -new GFXStateBlockData( AL_DeferredShadingState : PFX_DefaultStateBlock ) -{ - cullMode = GFXCullNone; - - blendDefined = true; - blendEnable = true; - blendSrc = GFXBlendSrcAlpha; - blendDest = GFXBlendInvSrcAlpha; - - samplersDefined = true; - samplerStates[0] = SamplerWrapLinear; - samplerStates[1] = SamplerWrapLinear; - samplerStates[2] = SamplerWrapLinear; - samplerStates[3] = SamplerWrapLinear; -}; - -new ShaderData( AL_DeferredShader ) -{ - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/lighting/advanced/deferredShadingP.hlsl"; - - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/lighting/advanced/gl/deferredShadingP.glsl"; - - samplerNames[0] = "colorBufferTex"; - samplerNames[1] = "lightPrePassTex"; - samplerNames[2] = "matInfoTex"; - samplerNames[3] = "prepassTex"; - - pixVersion = 2.0; -}; - -singleton PostEffect( AL_DeferredShading ) -{ - renderTime = "PFXAfterBin"; - renderBin = "SkyBin"; - shader = AL_DeferredShader; - stateBlock = AL_DeferredShadingState; - texture[0] = "#color"; - texture[1] = "#lightinfo"; - texture[2] = "#matinfo"; - texture[3] = "#prepass"; - - target = "$backBuffer"; - renderPriority = 10000; - allowReflectPass = true; -}; - -// Debug Shaders. -new ShaderData( AL_ColorBufferShader ) -{ - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/lighting/advanced/dbgColorBufferP.hlsl"; - - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/lighting/advanced/gl/dbgColorBufferP.glsl"; - - samplerNames[0] = "colorBufferTex"; - pixVersion = 2.0; -}; - -singleton PostEffect( AL_ColorBufferVisualize ) -{ - shader = AL_ColorBufferShader; - stateBlock = AL_DefaultVisualizeState; - texture[0] = "#color"; - target = "$backBuffer"; - renderPriority = 9999; -}; - -/// Toggles the visualization of the AL lighting specular power buffer. -function toggleColorBufferViz( %enable ) -{ - if ( %enable $= "" ) - { - $AL_ColorBufferShaderVar = AL_ColorBufferVisualize.isEnabled() ? false : true; - AL_ColorBufferVisualize.toggle(); - } - else if ( %enable ) - { - AL_DeferredShading.disable(); - AL_ColorBufferVisualize.enable(); - } - else if ( !%enable ) - { - AL_ColorBufferVisualize.disable(); - AL_DeferredShading.enable(); - } -} - -new ShaderData( AL_SpecMapShader ) -{ - DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl"; - DXPixelShaderFile = "shaders/common/lighting/advanced/dbgSpecMapVisualizeP.hlsl"; - - OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl"; - OGLPixelShaderFile = "shaders/common/lighting/advanced/gl/dbgSpecMapVisualizeP.glsl"; - - samplerNames[0] = "matinfoTex"; - pixVersion = 2.0; -}; - -singleton PostEffect( AL_SpecMapVisualize ) -{ - shader = AL_SpecMapShader; - stateBlock = AL_DefaultVisualizeState; - texture[0] = "#matinfo"; - target = "$backBuffer"; - renderPriority = 9999; -}; - -/// Toggles the visualization of the AL lighting specular power buffer. -function toggleSpecMapViz( %enable ) -{ - if ( %enable $= "" ) - { - $AL_SpecMapShaderVar = AL_SpecMapVisualize.isEnabled() ? false : true; - AL_SpecMapVisualize.toggle(); - } - else if ( %enable ) - AL_SpecMapVisualize.enable(); - else if ( !%enable ) - AL_SpecMapVisualize.disable(); -} \ No newline at end of file diff --git a/Templates/Empty/game/core/scripts/client/materials.cs b/Templates/Empty/game/core/scripts/client/materials.cs deleted file mode 100644 index ea47690c2..000000000 --- a/Templates/Empty/game/core/scripts/client/materials.cs +++ /dev/null @@ -1,39 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -singleton Material( WarningMaterial ) -{ - diffuseMap[0] = "~/art/warnMat"; - emissive[0] = false; - translucent = false; -}; - - -singleton CubemapData( WarnMatCubeMap ) -{ - cubeFace[0] = "~/art/warnMat"; - cubeFace[1] = "~/art/warnMat"; - cubeFace[2] = "~/art/warnMat"; - cubeFace[3] = "~/art/warnMat"; - cubeFace[4] = "~/art/warnMat"; - cubeFace[5] = "~/art/warnMat"; -}; diff --git a/Templates/Empty/game/core/scripts/client/persistenceManagerTest.cs b/Templates/Empty/game/core/scripts/client/persistenceManagerTest.cs deleted file mode 100644 index a3ef4b84b..000000000 --- a/Templates/Empty/game/core/scripts/client/persistenceManagerTest.cs +++ /dev/null @@ -1,335 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -new PersistenceManager(TestPManager); - -function runPManTest(%test) -{ - if (!isObject(TestPManager)) - return; - - if (%test $= "") - %test = 100; - - switch(%test) - { - case 0: - TestPManager.testFieldUpdates(); - case 1: - TestPManager.testObjectRename(); - case 2: - TestPManager.testNewObject(); - case 3: - TestPManager.testNewGroup(); - case 4: - TestPManager.testMoveObject(); - case 5: - TestPManager.testObjectRemove(); - case 100: - TestPManager.testFieldUpdates(); - TestPManager.testObjectRename(); - TestPManager.testNewObject(); - TestPManager.testNewGroup(); - TestPManager.testMoveObject(); - TestPManager.testObjectRemove(); - } -} - -function TestPManager::testFieldUpdates(%doNotSave) -{ - // Set some objects as dirty - TestPManager.setDirty(AudioGui); - TestPManager.setDirty(AudioSim); - TestPManager.setDirty(AudioMessage); - - // Alter some of the existing fields - AudioEffect.isLooping = true; - AudioMessage.isLooping = true; - AudioEffect.is3D = true; - - // Test removing a field - TestPManager.removeField(AudioGui, "isLooping"); - - // Alter some of the persistent fields - AudioGui.referenceDistance = 0.8; - AudioMessage.referenceDistance = 0.8; - - // Add some new dynamic fields - AudioGui.foo = "bar"; - AudioEffect.foo = "bar"; - - // Remove an object from the dirty list - // It shouldn't get updated in the file - TestPManager.removeDirty(AudioEffect); - - // Dirty an object in another file as well - TestPManager.setDirty(WarningMaterial); - - // Update a field that doesn't exist - WarningMaterial.glow[0] = true; - - // Drity another object to test for crashes - // when a dirty object is deleted - TestPManager.setDirty(SFXPausedSet); - - // Delete the object - SFXPausedSet.delete(); - - // Unless %doNotSave is set (by a batch/combo test) - // then go ahead and save now - if (!%doNotSave) - TestPManager.saveDirty(); -} - -function TestPManager::testObjectRename(%doNotSave) -{ - // Flag an object as dirty - if (isObject(AudioGui)) - TestPManager.setDirty(AudioGui); - else if (isObject(AudioGuiFoo)) - TestPManager.setDirty(AudioGuiFoo); - - // Rename it - if (isObject(AudioGui)) - AudioGui.setName(AudioGuiFoo); - else if (isObject(AudioGuiFoo)) - AudioGuiFoo.setName(AudioGui); - - // Unless %doNotSave is set (by a batch/combo test) - // then go ahead and save now - if (!%doNotSave) - TestPManager.saveDirty(); -} - -function TestPManager::testNewObject(%doNotSave) -{ - // Test adding a new named object - new SFXDescription(AudioNew) - { - volume = 0.5; - isLooping = true; - channel = $GuiAudioType; - foo = 2; - }; - - // Flag it as dirty - TestPManager.setDirty(AudioNew, "core/scripts/client/audio.cs"); - - // Test adding a new unnamed object - %obj = new SFXDescription() - { - volume = 0.75; - isLooping = true; - bar = 3; - }; - - // Flag it as dirty - TestPManager.setDirty(%obj, "core/scripts/client/audio.cs"); - - // Test adding an "empty" object - new SFXDescription(AudioEmpty); - - TestPManager.setDirty(AudioEmpty, "core/scripts/client/audio.cs"); - - // Unless %doNotSave is set (by a batch/combo test) - // then go ahead and save now - if (!%doNotSave) - TestPManager.saveDirty(); -} - -function TestPManager::testNewGroup(%doNotSave) -{ - // Test adding a new named SimGroup - new SimGroup(TestGroup) - { - foo = "bar"; - - new SFXDescription(TestObject) - { - volume = 0.5; - isLooping = true; - channel = $GuiAudioType; - foo = 1; - }; - new SimGroup(SubGroup) - { - foo = 2; - - new SFXDescription(SubObject) - { - volume = 0.5; - isLooping = true; - channel = $GuiAudioType; - foo = 3; - }; - }; - }; - - // Flag this as dirty - TestPManager.setDirty(TestGroup, "core/scripts/client/audio.cs"); - - // Test adding a new unnamed SimGroup - %group = new SimGroup() - { - foo = "bar"; - - new SFXDescription() - { - volume = 0.75; - channel = $GuiAudioType; - foo = 4; - }; - new SimGroup() - { - foo = 5; - - new SFXDescription() - { - volume = 0.75; - isLooping = true; - channel = $GuiAudioType; - foo = 6; - }; - }; - }; - - // Flag this as dirty - TestPManager.setDirty(%group, "core/scripts/client/audio.cs"); - - // Test adding a new unnamed SimSet - %set = new SimSet() - { - foo = "bar"; - - new SFXDescription() - { - volume = 0.75; - channel = $GuiAudioType; - foo = 7; - }; - new SimGroup() - { - foo = 8; - - new SFXDescription() - { - volume = 0.75; - isLooping = true; - channel = $GuiAudioType; - foo = 9; - }; - }; - }; - - // Flag this as dirty - TestPManager.setDirty(%set, "core/scripts/client/audio.cs"); - - // Unless %doNotSave is set (by a batch/combo test) - // then go ahead and save now - if (!%doNotSave) - TestPManager.saveDirty(); -} - -function TestPManager::testMoveObject(%doNotSave) -{ - // First add a couple of groups to the file - new SimGroup(MoveGroup1) - { - foo = "bar"; - - new SFXDescription(MoveObject1) - { - volume = 0.5; - isLooping = true; - channel = $GuiAudioType; - foo = 1; - }; - - new SimSet(SubGroup1) - { - new SFXDescription(SubObject1) - { - volume = 0.75; - isLooping = true; - channel = $GuiAudioType; - foo = 2; - }; - }; - }; - - // Flag this as dirty - TestPManager.setDirty(MoveGroup1, "core/scripts/client/audio.cs"); - - new SimGroup(MoveGroup2) - { - foo = "bar"; - - new SFXDescription(MoveObject2) - { - volume = 0.5; - isLooping = true; - channel = $GuiAudioType; - foo = 3; - }; - }; - - // Flag this as dirty - TestPManager.setDirty(MoveGroup2, "core/scripts/client/audio.cs"); - - // Unless %doNotSave is set (by a batch/combo test) - // then go ahead and save now - if (!%doNotSave) - TestPManager.saveDirty(); - - // Set them as dirty again - TestPManager.setDirty(MoveGroup1); - TestPManager.setDirty(MoveGroup2); - - // Give the subobject an new value - MoveObject1.foo = 4; - - // Move it into the other group - MoveGroup1.add(MoveObject2); - - // Switch the other subobject - MoveGroup2.add(MoveObject1); - - // Also add a new unnamed object to one of the groups - %obj = new SFXDescription() - { - volume = 0.75; - isLooping = true; - bar = 5; - }; - - MoveGroup1.add(%obj); - - // Unless %doNotSave is set (by a batch/combo test) - // then go ahead and save now - if (!%doNotSave) - TestPManager.saveDirty(); -} - -function TestPManager::testObjectRemove(%doNotSave) -{ - TestPManager.removeObjectFromFile(AudioSim); -} diff --git a/Templates/Empty/game/core/scripts/client/recordings.cs b/Templates/Empty/game/core/scripts/client/recordings.cs deleted file mode 100644 index f281652a5..000000000 --- a/Templates/Empty/game/core/scripts/client/recordings.cs +++ /dev/null @@ -1,151 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// RecordingsGui is the main TSControl through which the a demo game recording -// is viewed. -//----------------------------------------------------------------------------- - -function recordingsDlg::onWake() -{ - RecordingsDlgList.clear(); - %i = 0; - %filespec = $currentMod @ "/recordings/*.rec"; - echo(%filespec); - for(%file = findFirstFile(%filespec); %file !$= ""; %file = findNextFile(%filespec)) - RecordingsDlgList.addRow(%i++, fileBase(%file)); - RecordingsDlgList.sort(0); - RecordingsDlgList.setSelectedRow(0); - RecordingsDlgList.scrollVisible(0); -} - -function StartSelectedDemo() -{ - // first unit is filename - %sel = RecordingsDlgList.getSelectedId(); - %rowText = RecordingsDlgList.getRowTextById(%sel); - - %file = $currentMod @ "/recordings/" @ getField(%rowText, 0) @ ".rec"; - - new GameConnection(ServerConnection); - RootGroup.add(ServerConnection); - - // Start up important client-side stuff, such as the group - // for particle emitters. This doesn't get launched during a demo - // as we short circuit the whole mission loading sequence. - clientStartMission(); - - if(ServerConnection.playDemo(%file)) - { - Canvas.setContent(PlayGui); - Canvas.popDialog(RecordingsDlg); - ServerConnection.prepDemoPlayback(); - } - else - { - MessageBoxOK("Playback Failed", "Demo playback failed for file '" @ %file @ "'."); - if (isObject(ServerConnection)) { - ServerConnection.delete(); - } - } -} - -function startDemoRecord() -{ - // make sure that current recording stream is stopped - ServerConnection.stopRecording(); - - // make sure we aren't playing a demo - if(ServerConnection.isDemoPlaying()) - return; - - for(%i = 0; %i < 1000; %i++) - { - %num = %i; - if(%num < 10) - %num = "0" @ %num; - if(%num < 100) - %num = "0" @ %num; - - %file = $currentMod @ "/recordings/demo" @ %num @ ".rec"; - if(!isfile(%file)) - break; - } - if(%i == 1000) - return; - - $DemoFileName = %file; - - ChatHud.AddLine( "\c4Recording to file [\c2" @ $DemoFileName @ "\cr]."); - - ServerConnection.startRecording($DemoFileName); - - // make sure start worked - if(!ServerConnection.isDemoRecording()) - { - deleteFile($DemoFileName); - ChatHud.AddLine( "\c3 *** Failed to record to file [\c2" @ $DemoFileName @ "\cr]."); - $DemoFileName = ""; - } -} - -function stopDemoRecord() -{ - // make sure we are recording - if(ServerConnection.isDemoRecording()) - { - ChatHud.AddLine( "\c4Recording file [\c2" @ $DemoFileName @ "\cr] finished."); - ServerConnection.stopRecording(); - } -} - -function demoPlaybackComplete() -{ - disconnect(); - - // Clean up important client-side stuff, such as the group - // for particle emitters and the decal manager. This doesn't get - // launched during a demo as we short circuit the whole mission - // handling functionality. - clientEndMission(); - - if (isObject( MainMenuGui )) - Canvas.setContent( MainMenuGui ); - - Canvas.pushDialog(RecordingsDlg); -} - -function deleteDemoRecord() -{ - %sel = RecordingsDlgList.getSelectedId(); - %rowText = RecordingsDlgList.getRowTextById(%sel); - %file = $currentMod @ "/recordings/" @ getField(%rowText, 0) @ ".rec"; - - if(!isfile(%file)) - { - RecordingsDlgList.removeRowById(%sel); - return; - } - - RecordingsDlgList.removeRowById(%sel); - fileDelete(%file); -} diff --git a/Templates/Empty/game/core/scripts/client/screenshot.cs b/Templates/Empty/game/core/scripts/client/screenshot.cs deleted file mode 100644 index 3c78aa2cd..000000000 --- a/Templates/Empty/game/core/scripts/client/screenshot.cs +++ /dev/null @@ -1,143 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -//--------------------------------------------------------------------------------------------- -// formatImageNumber -// Preceeds a number with zeros to make it 6 digits long. -//--------------------------------------------------------------------------------------------- -function formatImageNumber(%number) -{ - if(%number < 10) - %number = "0" @ %number; - if(%number < 100) - %number = "0" @ %number; - if(%number < 1000) - %number = "0" @ %number; - if(%number < 10000) - %number = "0" @ %number; - return %number; -} - -//--------------------------------------------------------------------------------------------- -// formatSessionNumber -// Preceeds a number with zeros to make it 4 digits long. -//--------------------------------------------------------------------------------------------- -function formatSessionNumber(%number) -{ - if(%number < 10) - %number = "0" @ %number; - if(%number < 100) - %number = "0" @ %number; - return %number; -} - -//--------------------------------------------------------------------------------------------- -// recordMovie -// Records a movie file from the Canvas content using the specified fps. -// Possible encoder values are "PNG" and "THEORA" (default). -//--------------------------------------------------------------------------------------------- - -$RecordingMovie = false; - -function recordMovie(%movieName, %fps, %encoder) -{ - // If the canvas doesn't exist yet, setup a flag so it'll - // start capturing as soon as it's created - if (!isObject(Canvas)) - return; - - if (%encoder $= "") - %encoder = "THEORA"; - %resolution = Canvas.getVideoMode(); - - // Start the movie recording - ChatHud.AddLine( "\c4Recording movie file to [\c2" @ %movieName @ "\cr].ogv."); - echo("Recording movie to: " @ %movieName); - startVideoCapture(Canvas, %movieName, %encoder, %fps); - - $RecordingMovie = true; -} - -function stopMovie() -{ - // Stop the current recording - ChatHud.AddLine( "\c4Recording movie file finished."); - echo("Stopped movie recording"); - - stopVideoCapture(); - - $RecordingMovie = false; -} - -/// This is bound in initializeCommon() to take -/// a screenshot on a keypress. -function doScreenShot( %val ) -{ - // This can be bound, so skip key up events. - if ( %val == 0 ) - return; - - _screenShot( 1 ); -} - -/// A counter for screen shots used by _screenShot(). -$screenshotNumber = 0; - -/// Internal function which generates unique filename -/// and triggers a screenshot capture. -function _screenShot( %tiles, %overlap ) -{ - if ( $pref::Video::screenShotSession $= "" ) - $pref::Video::screenShotSession = 0; - - if ( $screenshotNumber == 0 ) - $pref::Video::screenShotSession++; - - if ( $pref::Video::screenShotSession > 999 ) - $pref::Video::screenShotSession = 1; - - %name = "screenshot_" @ formatSessionNumber($pref::Video::screenShotSession) @ "-" @ - formatImageNumber($screenshotNumber); - %name = expandFileName( %name ); - - $screenshotNumber++; - - if ( ( $pref::Video::screenShotFormat $= "JPEG" ) || - ( $pref::video::screenShotFormat $= "JPG" ) ) - screenShot( %name, "JPEG", %tiles, %overlap ); - else - screenShot( %name, "PNG", %tiles, %overlap ); -} - -/// This will close the console and take a large format -/// screenshot by tiling the current backbuffer and save -/// it to the root game folder. -/// -/// For instance a tile setting of 4 with a window set to -/// 800x600 will output a 3200x2400 screenshot. -function tiledScreenShot( %tiles, %overlap ) -{ - // Pop the console off before we take the shot. - Canvas.popDialog( ConsoleDlg ); - - _screenShot( %tiles, %overlap ); -} diff --git a/Templates/Empty/game/core/scripts/client/scriptDoc.cs b/Templates/Empty/game/core/scripts/client/scriptDoc.cs deleted file mode 100644 index 9557cc7e0..000000000 --- a/Templates/Empty/game/core/scripts/client/scriptDoc.cs +++ /dev/null @@ -1,37 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -// Writes out all script functions to a file. -function writeOutFunctions() -{ - new ConsoleLogger(logger, "scriptFunctions.txt", false); - dumpConsoleFunctions(); - logger.delete(); -} - -// Writes out all script classes to a file. -function writeOutClasses() -{ - new ConsoleLogger(logger, "scriptClasses.txt", false); - dumpConsoleClasses(); - logger.delete(); -} diff --git a/Templates/Empty/game/core/scripts/gui/messageBoxes/messageBoxSound.wav b/Templates/Empty/game/core/scripts/gui/messageBoxes/messageBoxSound.wav deleted file mode 100644 index 4b703bc31..000000000 Binary files a/Templates/Empty/game/core/scripts/gui/messageBoxes/messageBoxSound.wav and /dev/null differ diff --git a/Templates/Empty/game/core/scripts/server/camera.cs b/Templates/Empty/game/core/scripts/server/camera.cs deleted file mode 100644 index e0c597148..000000000 --- a/Templates/Empty/game/core/scripts/server/camera.cs +++ /dev/null @@ -1,85 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -// Global movement speed that affects all cameras. This should be moved -// into the camera datablock. -$Camera::movementSpeed = 30; - -function Observer::onTrigger(%this,%obj,%trigger,%state) -{ - // state = 0 means that a trigger key was released - if (%state == 0) - return; - - // Default player triggers: 0=fire 1=altFire 2=jump - %client = %obj.getControllingClient(); - switch$ (%obj.mode) - { - case "Observer": - // Do something interesting. - - case "Corpse": - // Viewing dead corpse, so we probably want to respawn. - %client.spawnPlayer(); - - // Set the camera back into observer mode, since in - // debug mode we like to switch to it. - %this.setMode(%obj,"Observer"); - } -} - -function Observer::setMode(%this,%obj,%mode,%arg1,%arg2,%arg3) -{ - switch$ (%mode) - { - case "Observer": - // Let the player fly around - %obj.setFlyMode(); - - case "Corpse": - // Lock the camera down in orbit around the corpse, - // which should be arg1 - %transform = %arg1.getTransform(); - %obj.setOrbitMode(%arg1, %transform, 0.5, 4.5, 4.5); - - } - %obj.mode = %mode; -} - - -//----------------------------------------------------------------------------- -// Camera methods -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- - -function Camera::onAdd(%this,%obj) -{ - // Default start mode - %this.setMode(%this.mode); -} - -function Camera::setMode(%this,%mode,%arg1,%arg2,%arg3) -{ - // Punt this one over to our datablock - %this.getDatablock().setMode(%this,%mode,%arg1,%arg2,%arg3); -} diff --git a/Templates/Empty/game/core/scripts/server/centerPrint.cs b/Templates/Empty/game/core/scripts/server/centerPrint.cs deleted file mode 100644 index 7832a233d..000000000 --- a/Templates/Empty/game/core/scripts/server/centerPrint.cs +++ /dev/null @@ -1,104 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -function centerPrintAll( %message, %time, %lines ) -{ - if( %lines $= "" || ((%lines > 3) || (%lines < 1)) ) - %lines = 1; - - %count = ClientGroup.getCount(); - for (%i = 0; %i < %count; %i++) - { - %cl = ClientGroup.getObject(%i); - if( !%cl.isAIControlled() ) - commandToClient( %cl, 'centerPrint', %message, %time, %lines ); - } -} - -function bottomPrintAll( %message, %time, %lines ) -{ - if( %lines $= "" || ((%lines > 3) || (%lines < 1)) ) - %lines = 1; - - %count = ClientGroup.getCount(); - for (%i = 0; %i < %count; %i++) - { - %cl = ClientGroup.getObject(%i); - if( !%cl.isAIControlled() ) - commandToClient( %cl, 'bottomPrint', %message, %time, %lines ); - } -} - -//------------------------------------------------------------------------------------------------------- - -function centerPrint( %client, %message, %time, %lines ) -{ - if( %lines $= "" || ((%lines > 3) || (%lines < 1)) ) - %lines = 1; - - - commandToClient( %client, 'CenterPrint', %message, %time, %lines ); -} - -function bottomPrint( %client, %message, %time, %lines ) -{ - if( %lines $= "" || ((%lines > 3) || (%lines < 1)) ) - %lines = 1; - - commandToClient( %client, 'BottomPrint', %message, %time, %lines ); -} - -//------------------------------------------------------------------------------------------------------- - -function clearCenterPrint( %client ) -{ - commandToClient( %client, 'ClearCenterPrint'); -} - -function clearBottomPrint( %client ) -{ - commandToClient( %client, 'ClearBottomPrint'); -} - -//------------------------------------------------------------------------------------------------------- - -function clearCenterPrintAll() -{ - %count = ClientGroup.getCount(); - for (%i = 0; %i < %count; %i++) - { - %cl = ClientGroup.getObject(%i); - if( !%cl.isAIControlled() ) - commandToClient( %cl, 'ClearCenterPrint'); - } -} - -function clearBottomPrintAll() -{ - %count = ClientGroup.getCount(); - for (%i = 0; %i < %count; %i++) - { - %cl = ClientGroup.getObject(%i); - if( !%cl.isAIControlled() ) - commandToClient( %cl, 'ClearBottomPrint'); - } -} \ No newline at end of file diff --git a/Templates/Empty/game/core/scripts/server/game.cs b/Templates/Empty/game/core/scripts/server/game.cs deleted file mode 100644 index c135e6f99..000000000 --- a/Templates/Empty/game/core/scripts/server/game.cs +++ /dev/null @@ -1,209 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// The default hooks that are most likely be overridden/implemented by a game -//----------------------------------------------------------------------------- - -function onServerCreated() -{ - // Invoked by createServer(), when server is created and ready to go - - // Server::GameType is sent to the master server. - // This variable should uniquely identify your game and/or mod. - $Server::GameType = "Test App"; - - // Load up any objects or datablocks saved to the editor managed scripts - %datablockFiles = new ArrayObject(); - %datablockFiles.add( "art/ribbons/ribbonExec.cs" ); - %datablockFiles.add( "art/particles/managedParticleData.cs" ); - %datablockFiles.add( "art/particles/managedParticleEmitterData.cs" ); - %datablockFiles.add( "art/decals/managedDecalData.cs" ); - %datablockFiles.add( "art/datablocks/managedDatablocks.cs" ); - %datablockFiles.add( "art/forest/managedItemData.cs" ); - %datablockFiles.add( "art/datablocks/datablockExec.cs" ); - loadDatablockFiles( %datablockFiles, true ); - - // Run the other gameplay scripts in this folder - exec("./scriptExec.cs"); - - // For backwards compatibility... - createGame(); -} - -function loadDatablockFiles( %datablockFiles, %recurse ) -{ - if ( %recurse ) - { - recursiveLoadDatablockFiles( %datablockFiles, 9999 ); - return; - } - - %count = %datablockFiles.count(); - for ( %i=0; %i < %count; %i++ ) - { - %file = %datablockFiles.getKey( %i ); - if ( !isScriptFile( %file ) ) - continue; - - exec( %file ); - } - - // Destroy the incoming list. - %datablockFiles.delete(); -} - -function recursiveLoadDatablockFiles( %datablockFiles, %previousErrors ) -{ - %reloadDatablockFiles = new ArrayObject(); - - // Keep track of the number of datablocks that - // failed during this pass. - %failedDatablocks = 0; - - // Try re-executing the list of datablock files. - %count = %datablockFiles.count(); - for ( %i=0; %i < %count; %i++ ) - { - %file = %datablockFiles.getKey( %i ); - if ( !isScriptFile( %file ) ) - continue; - - // Start counting copy constructor creation errors. - $Con::objectCopyFailures = 0; - - exec( %file ); - - // If errors occured then store this file for re-exec later. - if ( $Con::objectCopyFailures > 0 ) - { - %reloadDatablockFiles.add( %file ); - %failedDatablocks = %failedDatablocks + $Con::objectCopyFailures; - } - } - - // Clear the object copy failure counter so that - // we get console error messages again. - $Con::objectCopyFailures = -1; - - // Delete the old incoming list... we're done with it. - %datablockFiles.delete(); - - // If we still have datablocks to retry. - %newCount = %reloadDatablockFiles.count(); - if ( %newCount > 0 ) - { - // If the datablock failures have not been reduced - // from the last pass then we must have a real syntax - // error and not just a bad dependancy. - if ( %lastFailures > %failedDatablocks ) - recursiveLoadDatablockFiles( %reloadDatablockFiles, %failedDatablocks ); - - else - { - // Since we must have real syntax errors do one - // last normal exec to output error messages. - loadDatablockFiles( %reloadDatablockFiles, false ); - } - - return; - } - - // Cleanup the empty reload list. - %reloadDatablockFiles.delete(); -} - -function onServerDestroyed() -{ - // Invoked by destroyServer(), right before the server is destroyed - destroyGame(); -} - -function onMissionLoaded() -{ - // Called by loadMission() once the mission is finished loading - startGame(); -} - -function onMissionEnded() -{ - // Called by endMission(), right before the mission is destroyed - endGame(); -} - -function onMissionReset() -{ - // Called by resetMission(), after all the temporary mission objects - // have been deleted. -} - - -//----------------------------------------------------------------------------- -// These methods are extensions to the GameConnection class. Extending -// GameConnection make is easier to deal with some of this functionality, -// but these could also be implemented as stand-alone functions. -//----------------------------------------------------------------------------- - -function GameConnection::onClientEnterGame(%this) -{ - // Called for each client after it's finished downloading the - // mission and is ready to start playing. -} - -function GameConnection::onClientLeaveGame(%this) -{ - // Call for each client that drops -} - - -//----------------------------------------------------------------------------- -// Functions that implement game-play -// These are here for backwards compatibilty only, games and/or mods should -// really be overloading the server and mission functions listed ubove. -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- - -function createGame() -{ - // This function is called by onServerCreated (above) -} - -function destroyGame() -{ - // This function is called by onServerDestroyed (above) -} - - -//----------------------------------------------------------------------------- - -function startGame() -{ - // This is where the game play should start - // The default onMissionLoaded function starts the game. -} - -function endGame() -{ - // This is where the game play should end - // The default onMissionEnded function shuts down the game. -} diff --git a/Templates/Empty/game/core/scripts/server/message.cs b/Templates/Empty/game/core/scripts/server/message.cs deleted file mode 100644 index eb060ca13..000000000 --- a/Templates/Empty/game/core/scripts/server/message.cs +++ /dev/null @@ -1,171 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// Server side message commands -//----------------------------------------------------------------------------- - -function messageClient(%client, %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10, %a11, %a12, %a13) -{ - commandToClient(%client, 'ServerMessage', %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10, %a11, %a12, %a13); -} - -function messageTeam(%team, %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10, %a11, %a12, %a13) -{ - %count = ClientGroup.getCount(); - for(%cl= 0; %cl < %count; %cl++) - { - %recipient = ClientGroup.getObject(%cl); - if(%recipient.team == %team) - messageClient(%recipient, %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10, %a11, %a12, %a13); - } -} - -function messageTeamExcept(%client, %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10, %a11, %a12, %a13) -{ - %team = %client.team; - %count = ClientGroup.getCount(); - for(%cl= 0; %cl < %count; %cl++) - { - %recipient = ClientGroup.getObject(%cl); - if((%recipient.team == %team) && (%recipient != %client)) - messageClient(%recipient, %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10, %a11, %a12, %a13); - } -} - -function messageAll(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10, %a11, %a12, %a13) -{ - %count = ClientGroup.getCount(); - for(%cl = 0; %cl < %count; %cl++) - { - %client = ClientGroup.getObject(%cl); - messageClient(%client, %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10, %a11, %a12, %a13); - } -} - -function messageAllExcept(%client, %team, %msgtype, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10, %a11, %a12, %a13) -{ - //can exclude a client, a team or both. A -1 value in either field will ignore that exclusion, so - //messageAllExcept(-1, -1, $Mesblah, 'Blah!'); will message everyone (since there shouldn't be a client -1 or client on team -1). - %count = ClientGroup.getCount(); - for(%cl= 0; %cl < %count; %cl++) - { - %recipient = ClientGroup.getObject(%cl); - if((%recipient != %client) && (%recipient.team != %team)) - messageClient(%recipient, %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10, %a11, %a12, %a13); - } -} - - -//--------------------------------------------------------------------------- -// Server side client chat'n -//--------------------------------------------------------------------------- - -//--------------------------------------------------------------------------- -// silly spam protection... -$SPAM_PROTECTION_PERIOD = 10000; -$SPAM_MESSAGE_THRESHOLD = 4; -$SPAM_PENALTY_PERIOD = 10000; -$SPAM_MESSAGE = '\c3FLOOD PROTECTION:\cr You must wait another %1 seconds.'; - -function GameConnection::spamMessageTimeout(%this) -{ - if(%this.spamMessageCount > 0) - %this.spamMessageCount--; -} - -function GameConnection::spamReset(%this) -{ - %this.isSpamming = false; -} - -function spamAlert(%client) -{ - if($Pref::Server::FloodProtectionEnabled != true) - return(false); - - if(!%client.isSpamming && (%client.spamMessageCount >= $SPAM_MESSAGE_THRESHOLD)) - { - %client.spamProtectStart = getSimTime(); - %client.isSpamming = true; - %client.schedule($SPAM_PENALTY_PERIOD, spamReset); - } - - if(%client.isSpamming) - { - %wait = mFloor(($SPAM_PENALTY_PERIOD - (getSimTime() - %client.spamProtectStart)) / 1000); - messageClient(%client, "", $SPAM_MESSAGE, %wait); - return(true); - } - - %client.spamMessageCount++; - %client.schedule($SPAM_PROTECTION_PERIOD, spamMessageTimeout); - return(false); -} - - -//--------------------------------------------------------------------------- - -function chatMessageClient( %client, %sender, %voiceTag, %voicePitch, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10 ) -{ - //see if the client has muted the sender - if ( !%client.muted[%sender] ) - commandToClient( %client, 'ChatMessage', %sender, %voiceTag, %voicePitch, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10 ); -} - -function chatMessageTeam( %sender, %team, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10 ) -{ - if ( ( %msgString $= "" ) || spamAlert( %sender ) ) - return; - - %count = ClientGroup.getCount(); - - for ( %i = 0; %i < %count; %i++ ) - { - %obj = ClientGroup.getObject( %i ); - if ( %obj.team == %sender.team ) - chatMessageClient( %obj, %sender, %sender.voiceTag, %sender.voicePitch, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10 ); - } -} - -function chatMessageAll( %sender, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10 ) -{ - if ( ( %msgString $= "" ) || spamAlert( %sender ) ) - return; - - %count = ClientGroup.getCount(); - - for ( %i = 0; %i < %count; %i++ ) - { - %obj = ClientGroup.getObject( %i ); - - if(%sender.team != 0) - chatMessageClient( %obj, %sender, %sender.voiceTag, %sender.voicePitch, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10 ); - else - { - // message sender is an observer -- only send message to other observers - if(%obj.team == %sender.team) - chatMessageClient( %obj, %sender, %sender.voiceTag, %sender.voicePitch, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10 ); - } - } -} - diff --git a/Templates/Empty/game/core/scripts/server/spawn.cs b/Templates/Empty/game/core/scripts/server/spawn.cs deleted file mode 100644 index 850033055..000000000 --- a/Templates/Empty/game/core/scripts/server/spawn.cs +++ /dev/null @@ -1,340 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// What kind of "player" is spawned is either controlled directly by the -// SpawnSphere or it defaults back to the values set here. This also controls -// which SimGroups to attempt to select the spawn sphere's from by walking down -// the list of SpawnGroups till it finds a valid spawn object. -//----------------------------------------------------------------------------- - -// Leave $Game::defaultPlayerClass and $Game::defaultPlayerDataBlock as empty strings ("") -// to spawn a the $Game::defaultCameraClass as the control object. -$Game::DefaultPlayerClass = "Player"; -$Game::DefaultPlayerDataBlock = "DefaultPlayerData"; -$Game::DefaultPlayerSpawnGroups = "PlayerSpawnPoints"; - -//----------------------------------------------------------------------------- -// What kind of "camera" is spawned is either controlled directly by the -// SpawnSphere or it defaults back to the values set here. This also controls -// which SimGroups to attempt to select the spawn sphere's from by walking down -// the list of SpawnGroups till it finds a valid spawn object. -//----------------------------------------------------------------------------- -$Game::DefaultCameraClass = "Camera"; -$Game::DefaultCameraDataBlock = "Observer"; -$Game::DefaultCameraSpawnGroups = "CameraSpawnPoints PlayerSpawnPoints"; - -//----------------------------------------------------------------------------- -// pickCameraSpawnPoint() is responsible for finding a valid spawn point for a -// camera. -//----------------------------------------------------------------------------- -function pickCameraSpawnPoint(%spawnGroups) -{ - // Walk through the groups until we find a valid object - for (%i = 0; %i < getWordCount(%spawnGroups); %i++) - { - %group = getWord(%spawnGroups, %i); - - %count = getWordCount(%group); - - if (isObject(%group)) - %spawnPoint = %group.getRandom(); - - if (isObject(%spawnPoint)) - return %spawnPoint; - } - - // Didn't find a spawn point by looking for the groups - // so let's return the "default" SpawnSphere - // First create it if it doesn't already exist - if (!isObject(DefaultCameraSpawnSphere)) - { - %spawn = new SpawnSphere(DefaultCameraSpawnSphere) - { - dataBlock = "SpawnSphereMarker"; - spawnClass = $Game::DefaultCameraClass; - spawnDatablock = $Game::DefaultCameraDataBlock; - }; - - // Add it to the MissionCleanup group so that it - // doesn't get saved to the Mission (and gets cleaned - // up of course) - MissionCleanup.add(%spawn); - } - - return DefaultCameraSpawnSphere; -} - -//----------------------------------------------------------------------------- -// pickPlayerSpawnPoint() is responsible for finding a valid spawn point for a -// player. -//----------------------------------------------------------------------------- -function pickPlayerSpawnPoint(%spawnGroups) -{ - // Walk through the groups until we find a valid object - for (%i = 0; %i < getWordCount(%spawnGroups); %i++) - { - %group = getWord(%spawnGroups, %i); - - if (isObject(%group)) - %spawnPoint = %group.getRandom(); - - if (isObject(%spawnPoint)) - return %spawnPoint; - } - - // Didn't find a spawn point by looking for the groups - // so let's return the "default" SpawnSphere - // First create it if it doesn't already exist - if (!isObject(DefaultPlayerSpawnSphere)) - { - %spawn = new SpawnSphere(DefaultPlayerSpawnSphere) - { - dataBlock = "SpawnSphereMarker"; - spawnClass = $Game::DefaultPlayerClass; - spawnDatablock = $Game::DefaultPlayerDataBlock; - }; - - // Add it to the MissionCleanup group so that it - // doesn't get saved to the Mission (and gets cleaned - // up of course) - MissionCleanup.add(%spawn); - } - - return DefaultPlayerSpawnSphere; -} - -//----------------------------------------------------------------------------- -// GameConnection::spawnCamera() is responsible for spawning a camera for a -// client -//----------------------------------------------------------------------------- -//function GameConnection::spawnCamera(%this, %spawnPoint) -//{ - //// Set the control object to the default camera - //if (!isObject(%this.camera)) - //{ - //if (isDefined("$Game::DefaultCameraClass")) - //%this.camera = spawnObject($Game::DefaultCameraClass, $Game::DefaultCameraDataBlock); - //} -// - //if(!isObject(%this.PathCamera)) - //{ - //// Create path camera - //%this.PathCamera = spawnObject("PathCamera", "LoopingCam"); - ////%this.PathCamera = new PathCamera() { - ////dataBlock = LoopingCam; - ////position = "0 0 300 1 0 0 0"; - ////}; - //} - //if(isObject(%this.PathCamera)) - //{ - //%this.PathCamera.setPosition("-54.0187 1.81237 5.14039"); - //%this.PathCamera.followPath(MenuPath); - //MissionCleanup.add( %this.PathCamera); - //%this.PathCamera.scopeToClient(%this); - //%this.setControlObject(%this.PathCamera); - //} - //// If we have a camera then set up some properties - //if (isObject(%this.camera)) - //{ - //MissionCleanup.add( %this.camera ); - //%this.camera.scopeToClient(%this); - // - ////%this.setControlObject(%this.camera); - ////%this.setControlObject(%this.PathCamera); -// - //if (isDefined("%spawnPoint")) - //{ - //// Attempt to treat %spawnPoint as an object - //if (getWordCount(%spawnPoint) == 1 && isObject(%spawnPoint)) - //{ - //%this.camera.setTransform(%spawnPoint.getTransform()); - //} - //else - //{ - //// Treat %spawnPoint as an AxisAngle transform - //%this.camera.setTransform(%spawnPoint); - //} - //} - //} -//} - -function GameConnection::spawnCamera(%this, %spawnPoint) -{ - // Set the control object to the default camera - if (!isObject(%this.camera)) - { - if (isDefined("$Game::DefaultCameraClass")) - %this.camera = spawnObject($Game::DefaultCameraClass, $Game::DefaultCameraDataBlock); - } - - // If we have a camera then set up some properties - if (isObject(%this.camera)) - { - MissionCleanup.add( %this.camera ); - %this.camera.scopeToClient(%this); - - %this.setControlObject(%this.camera); - - if (isDefined("%spawnPoint")) - { - // Attempt to treat %spawnPoint as an object - if (getWordCount(%spawnPoint) == 1 && isObject(%spawnPoint)) - { - %this.camera.setTransform(%spawnPoint.getTransform()); - } - else - { - // Treat %spawnPoint as an AxisAngle transform - %this.camera.setTransform(%spawnPoint); - } - } - } -} - -//----------------------------------------------------------------------------- -// GameConnection::spawnPlayer() is responsible for spawning a player for a -// client -//----------------------------------------------------------------------------- -function GameConnection::spawnPlayer(%this, %spawnPoint, %noControl) -{ - if (isObject(%this.player)) - { - // The client should not already have a player. Assigning - // a new one could result in an uncontrolled player object. - error("Attempting to create a player for a client that already has one!"); - } - - // Attempt to treat %spawnPoint as an object - if (getWordCount(%spawnPoint) == 1 && isObject(%spawnPoint)) - { - // Defaults - %spawnClass = $Game::DefaultPlayerClass; - %spawnDataBlock = $Game::DefaultPlayerDataBlock; - - // Overrides by the %spawnPoint - if (isDefined("%spawnPoint.spawnClass")) - { - %spawnClass = %spawnPoint.spawnClass; - %spawnDataBlock = %spawnPoint.spawnDatablock; - } - - // This may seem redundant given the above but it allows - // the SpawnSphere to override the datablock without - // overriding the default player class - if (isDefined("%spawnPoint.spawnDatablock")) - %spawnDataBlock = %spawnPoint.spawnDatablock; - - %spawnProperties = %spawnPoint.spawnProperties; - %spawnScript = %spawnPoint.spawnScript; - - // Spawn with the engine's Sim::spawnObject() function - %player = spawnObject(%spawnClass, %spawnDatablock, "", - %spawnProperties, %spawnScript); - - // If we have an object do some initial setup - if (isObject(%player)) - { - // Set the transform to %spawnPoint's transform - %player.setTransform(%spawnPoint.getTransform()); - } - else - { - // If we weren't able to create the player object then warn the user - if (isDefined("%spawnDatablock")) - { - MessageBoxOK("Spawn Player Failed", - "Unable to create a player with class " @ %spawnClass @ - " and datablock " @ %spawnDatablock @ ".\n\nStarting as an Observer instead.", - %this @ ".spawnCamera();"); - } - else - { - MessageBoxOK("Spawn Player Failed", - "Unable to create a player with class " @ %spawnClass @ - ".\n\nStarting as an Observer instead.", - %this @ ".spawnCamera();"); - } - } - } - else - { - // Create a default player - %player = spawnObject($Game::DefaultPlayerClass, $Game::DefaultPlayerDataBlock); - - if (!%player.isMemberOfClass("Player")) - warn("Trying to spawn a class that does not derive from Player."); - - // Treat %spawnPoint as a transform - %player.setTransform(%spawnPoint); - } - - // If we didn't actually create a player object then bail - if (!isObject(%player)) - { - // Make sure we at least have a camera - %this.spawnCamera(%spawnPoint); - - return; - } - - // Update the default camera to start with the player - if (isObject(%this.camera)) - { - if (%player.getClassname() $= "Player") - %this.camera.setTransform(%player.getEyeTransform()); - else - %this.camera.setTransform(%player.getTransform()); - } - - // Add the player object to MissionCleanup so that it - // won't get saved into the level files and will get - // cleaned up properly - MissionCleanup.add(%player); - - // Store the client object on the player object for - // future reference - %player.client = %this; - - // Player setup... - if (%player.isMethod("setShapeName")) - %player.setShapeName(%this.playerName); - - if (%player.isMethod("setEnergyLevel")) - %player.setEnergyLevel(%player.getDataBlock().maxEnergy); - - // Give the client control of the player - %this.player = %player; - - // Give the client control of the camera if in the editor - if( $startWorldEditor ) - { - %control = %this.camera; - %control.mode = toggleCameraFly; - EditorGui.syncCameraGui(); - } - else - %control = %player; - - if(!isDefined("%noControl")) - %this.setControlObject(%control); -} \ No newline at end of file diff --git a/Templates/Empty/game/levels/Empty Room.mis b/Templates/Empty/game/levels/Empty Room.mis deleted file mode 100644 index c3ba059a4..000000000 --- a/Templates/Empty/game/levels/Empty Room.mis +++ /dev/null @@ -1,83 +0,0 @@ -//--- OBJECT WRITE BEGIN --- -new SimGroup(MissionGroup) { - canSaveDynamicFields = "1"; - Enabled = "1"; - - new LevelInfo(theLevelInfo) { - visibleDistance = "1000"; - fogColor = "0.6 0.6 0.7 1"; - fogDensity = "0"; - fogDensityOffset = "700"; - fogAtmosphereHeight = "0"; - canvasClearColor = "0 0 0 255"; - canSaveDynamicFields = "1"; - levelName = "Empty Room"; - desc0 = "An empty room ready to be populated with Torque objects."; - Enabled = "1"; - }; - new SkyBox(theSky) { - canSaveDynamicFields = "1"; - Position = "0 0 0"; - rotation = "1 0 0 0"; - scale = "1 1 1"; - Material = "BlackSkyMat"; - drawBottom = "0"; - fogBandHeight = "0"; - }; - new Sun(theSun) { - canSaveDynamicFields = "1"; - Position = "0 0 0"; - rotation = "1 0 0 0"; - scale = "1 1 1"; - azimuth = "230.396"; - elevation = "45"; - color = "0.968628 0.901961 0.901961 1"; - ambient = "0.078431 0.113725 0.156863 1"; - castShadows = "1"; - attenuationRatio = "0 1 1"; - shadowType = "PSSM"; - texSize = "1024"; - overDarkFactor = "3000 2000 1000 250"; - shadowDistance = "400"; - shadowSoftness = "0.25"; - numSplits = "4"; - logWeight = "0.96"; - fadeStartDistance = "325"; - lastSplitTerrainOnly = "0"; - }; - new SimGroup(PlayerDropPoints) { - canSaveDynamicFields = "1"; - Enabled = "1"; - - new SpawnSphere() { - canSaveDynamicFields = "1"; - Position = "0 0 2"; - rotation = "1 0 0 0"; - scale = "1 1 1"; - dataBlock = "SpawnSphereMarker"; - radius = "5"; - spawnClass = ""; - spawnDatablock = ""; - autoSpawn = "0"; - sphereWeight = "1"; - indoorWeight = "1"; - outdoorWeight = "1"; - Enabled = "1"; - homingCount = "0"; - lockCount = "0"; - }; - }; - new GroundPlane() { - canSaveDynamicFields = "1"; - Position = "0 0 0"; - rotation = "1 0 0 0"; - scale = "1 1 1"; - squareSize = "128"; - scaleU = "12"; - scaleV = "12"; - Material = "BlankWhite"; - Enabled = "1"; - }; -}; -//--- OBJECT WRITE END --- - diff --git a/Templates/Empty/game/levels/Empty Room_preview.png b/Templates/Empty/game/levels/Empty Room_preview.png deleted file mode 100644 index 0cee49b84..000000000 Binary files a/Templates/Empty/game/levels/Empty Room_preview.png and /dev/null differ diff --git a/Templates/Empty/game/levels/main.cs b/Templates/Empty/game/levels/main.cs deleted file mode 100644 index 509b0f0c0..000000000 --- a/Templates/Empty/game/levels/main.cs +++ /dev/null @@ -1,21 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- diff --git a/Templates/Empty/game/main.cs b/Templates/Empty/game/main.cs deleted file mode 100644 index 44b333b87..000000000 --- a/Templates/Empty/game/main.cs +++ /dev/null @@ -1,299 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -// Set the name of our application -$appName = "Empty"; - -// The directory it is run from -$defaultGame = "scripts"; - -// Set profile directory -$Pref::Video::ProfilePath = "core/profile"; -$Core::windowIcon = "core/torque.png"; -$Core::splashWindowImage = "art/gui/splash.png"; - -function createCanvas(%windowTitle) -{ - if ($isDedicated) - { - GFXInit::createNullDevice(); - return true; - } - - // Create the Canvas - %foo = new GuiCanvas(Canvas) - { - displayWindow = $platform !$= "windows"; - }; - - $GameCanvas = %foo; - - // Set the window title - if (isObject(Canvas)) - Canvas.setWindowTitle(getEngineName() @ " - " @ $appName); - - return true; -} - -// Display the optional commandline arguements -$displayHelp = false; - -// Use these to record and play back crashes -//saveJournal("editorOnFileQuitCrash.jrn"); -//playJournal("editorOnFileQuitCrash.jrn"); - -//------------------------------------------------------------------------------ -// Check if a script file exists, compiled or not. -function isScriptFile(%path) -{ - if( isFile(%path @ ".dso") || isFile(%path) ) - return true; - - return false; -} - -//------------------------------------------------------------------------------ -// Process command line arguments -exec("core/parseArgs.cs"); - -$isDedicated = false; -$dirCount = 2; -$userDirs = $defaultGame @ ";art;levels"; - -// load tools scripts if we're a tool build -if (isToolBuild()) - $userDirs = "tools;" @ $userDirs; - - -// Parse the executable arguments with the standard -// function from core/main.cs -defaultParseArgs(); - - -if($dirCount == 0) { - $userDirs = $defaultGame; - $dirCount = 1; -} - -//----------------------------------------------------------------------------- -// Display a splash window immediately to improve app responsiveness before -// engine is initialized and main window created -if (!$isDedicated) - displaySplashWindow(); - - -//----------------------------------------------------------------------------- -// The displayHelp, onStart, onExit and parseArgs function are overriden -// by mod packages to get hooked into initialization and cleanup. - -function onStart() -{ - // Default startup function -} - -function onExit() -{ - // OnExit is called directly from C++ code, whereas onStart is - // invoked at the end of this file. -} - -function parseArgs() -{ - // Here for mod override, the arguments have already - // been parsed. -} - -function compileFiles(%pattern) -{ - %path = filePath(%pattern); - - %saveDSO = $Scripts::OverrideDSOPath; - %saveIgnore = $Scripts::ignoreDSOs; - - $Scripts::OverrideDSOPath = %path; - $Scripts::ignoreDSOs = false; - %mainCsFile = makeFullPath("main.cs"); - - for (%file = findFirstFileMultiExpr(%pattern); %file !$= ""; %file = findNextFileMultiExpr(%pattern)) - { - // we don't want to try and compile the primary main.cs - if(%mainCsFile !$= %file) - compile(%file, true); - } - - $Scripts::OverrideDSOPath = %saveDSO; - $Scripts::ignoreDSOs = %saveIgnore; - -} - -if($compileAll) -{ - echo(" --- Compiling all files ---"); - compileFiles("*.cs"); - compileFiles("*.gui"); - compileFiles("*.ts"); - echo(" --- Exiting after compile ---"); - quit(); -} - -if($compileTools) -{ - echo(" --- Compiling tools scritps ---"); - compileFiles("tools/*.cs"); - compileFiles("tools/*.gui"); - compileFiles("tools/*.ts"); - echo(" --- Exiting after compile ---"); - quit(); -} - -package Help { - function onExit() { - // Override onExit when displaying help - } -}; - -function displayHelp() { - activatePackage(Help); - - // Notes on logmode: console logging is written to console.log. - // -log 0 disables console logging. - // -log 1 appends to existing logfile; it also closes the file - // (flushing the write buffer) after every write. - // -log 2 overwrites any existing logfile; it also only closes - // the logfile when the application shuts down. (default) - - error( - "Torque Demo command line options:\n"@ - " -log Logging behavior; see main.cs comments for details\n"@ - " -game Reset list of mods to only contain \n"@ - " Works like the -game argument\n"@ - " -dir Add to list of directories\n"@ - " -console Open a separate console\n"@ - " -jSave Record a journal\n"@ - " -jPlay Play back a journal\n"@ - " -help Display this help message\n" - ); -} - - -//-------------------------------------------------------------------------- - -// Default to a new logfile each session. -if( !$logModeSpecified ) -{ - if( $platform !$= "xbox" && $platform !$= "xenon" ) - setLogMode(6); -} - -// Get the first dir on the list, which will be the last to be applied... this -// does not modify the list. -nextToken($userDirs, currentMod, ";"); - -// Execute startup scripts for each mod, starting at base and working up -function loadDir(%dir) -{ - pushback($userDirs, %dir, ";"); - - if (isScriptFile(%dir @ "/main.cs")) - exec(%dir @ "/main.cs"); -} - -echo("--------- Loading DIRS ---------"); -function loadDirs(%dirPath) -{ - %dirPath = nextToken(%dirPath, token, ";"); - if (%dirPath !$= "") - loadDirs(%dirPath); - - if(exec(%token @ "/main.cs") != true) - { - error("Error: Unable to find specified directory: " @ %token ); - $dirCount--; - } -} -loadDirs($userDirs); -echo(""); - -if($dirCount == 0) { - enableWinConsole(true); - error("Error: Unable to load any specified directories"); - quit(); -} -// Parse the command line arguments -echo("--------- Parsing Arguments ---------"); -parseArgs(); - -// Either display the help message or startup the app. -if ($displayHelp) { - enableWinConsole(true); - displayHelp(); - quit(); -} -else { - onStart(); - echo("Engine initialized..."); - - ModuleDatabase.scanModules( "" ); - - //You can also explicitly decalre some modules here to be loaded by default if they are part of your game - //Ex: ModuleDatabase.LoadExplicit( "AppCore" ); - - if( !$isDedicated ) - { - // As we know at this point that the initial load is complete, - // we can hide any splash screen we have, and show the canvas. - // This keeps things looking nice, instead of having a blank window - closeSplashWindow(); - Canvas.showWindow(); - } - - // Auto-load on the 360 - if( $platform $= "xenon" ) - { - %mission = "levels/Empty Terrain.mis"; - - echo("Xbox360 Autoloading level: '" @ %mission @ "'"); - - - if ($pref::HostMultiPlayer) - %serverType = "MultiPlayer"; - else - %serverType = "SinglePlayer"; - - createAndConnectToLocalServer( %serverType, %mission ); - } -} - -// Display an error message for unused arguments -for ($i = 1; $i < $Game::argc; $i++) { - if (!$argUsed[$i]) - error("Error: Unknown command line argument: " @ $Game::argv[$i]); -} - -// Automatically start up the appropriate eidtor, if any -if ($startWorldEditor) { - Canvas.setCursor("DefaultCursor"); - Canvas.setContent(EditorChooseLevelGui); -} else if ($startGUIEditor) { - Canvas.setCursor("DefaultCursor"); - Canvas.setContent(EditorChooseGUI); -} diff --git a/Templates/Empty/game/main.cs.in b/Templates/Empty/game/main.cs.in deleted file mode 100644 index a541cf3b7..000000000 --- a/Templates/Empty/game/main.cs.in +++ /dev/null @@ -1,292 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -// Set the name of our application -$appName = "@TORQUE_APP_NAME@"; - -// The directory it is run from -$defaultGame = "scripts"; - -// Set profile directory -$Pref::Video::ProfilePath = "core/profile"; - -function createCanvas(%windowTitle) -{ - if ($isDedicated) - { - GFXInit::createNullDevice(); - return true; - } - - // Create the Canvas - %foo = new GuiCanvas(Canvas) - { - displayWindow = $platform !$= "windows"; - }; - - $GameCanvas = %foo; - - // Set the window title - if (isObject(Canvas)) - Canvas.setWindowTitle(getEngineName() @ " - " @ $appName); - - return true; -} - -// Display the optional commandline arguements -$displayHelp = false; - -// Use these to record and play back crashes -//saveJournal("editorOnFileQuitCrash.jrn"); -//playJournal("editorOnFileQuitCrash.jrn"); - -//------------------------------------------------------------------------------ -// Check if a script file exists, compiled or not. -function isScriptFile(%path) -{ - if( isFile(%path @ ".dso") || isFile(%path) ) - return true; - - return false; -} - -//------------------------------------------------------------------------------ -// Process command line arguments -exec("core/parseArgs.cs"); - -$isDedicated = false; -$dirCount = 2; -$userDirs = $defaultGame @ ";art;levels"; - -// load tools scripts if we're a tool build -if (isToolBuild()) - $userDirs = "tools;" @ $userDirs; - - -// Parse the executable arguments with the standard -// function from core/main.cs -defaultParseArgs(); - - -if($dirCount == 0) { - $userDirs = $defaultGame; - $dirCount = 1; -} - -//----------------------------------------------------------------------------- -// Display a splash window immediately to improve app responsiveness before -// engine is initialized and main window created -if (!$isDedicated) - displaySplashWindow(); - - -//----------------------------------------------------------------------------- -// The displayHelp, onStart, onExit and parseArgs function are overriden -// by mod packages to get hooked into initialization and cleanup. - -function onStart() -{ - // Default startup function -} - -function onExit() -{ - // OnExit is called directly from C++ code, whereas onStart is - // invoked at the end of this file. -} - -function parseArgs() -{ - // Here for mod override, the arguments have already - // been parsed. -} - -function compileFiles(%pattern) -{ - %path = filePath(%pattern); - - %saveDSO = $Scripts::OverrideDSOPath; - %saveIgnore = $Scripts::ignoreDSOs; - - $Scripts::OverrideDSOPath = %path; - $Scripts::ignoreDSOs = false; - %mainCsFile = makeFullPath("main.cs"); - - for (%file = findFirstFileMultiExpr(%pattern); %file !$= ""; %file = findNextFileMultiExpr(%pattern)) - { - // we don't want to try and compile the primary main.cs - if(%mainCsFile !$= %file) - compile(%file, true); - } - - $Scripts::OverrideDSOPath = %saveDSO; - $Scripts::ignoreDSOs = %saveIgnore; - -} - -if($compileAll) -{ - echo(" --- Compiling all files ---"); - compileFiles("*.cs"); - compileFiles("*.gui"); - compileFiles("*.ts"); - echo(" --- Exiting after compile ---"); - quit(); -} - -if($compileTools) -{ - echo(" --- Compiling tools scritps ---"); - compileFiles("tools/*.cs"); - compileFiles("tools/*.gui"); - compileFiles("tools/*.ts"); - echo(" --- Exiting after compile ---"); - quit(); -} - -package Help { - function onExit() { - // Override onExit when displaying help - } -}; - -function displayHelp() { - activatePackage(Help); - - // Notes on logmode: console logging is written to console.log. - // -log 0 disables console logging. - // -log 1 appends to existing logfile; it also closes the file - // (flushing the write buffer) after every write. - // -log 2 overwrites any existing logfile; it also only closes - // the logfile when the application shuts down. (default) - - error( - "Torque Demo command line options:\n"@ - " -log Logging behavior; see main.cs comments for details\n"@ - " -game Reset list of mods to only contain \n"@ - " Works like the -game argument\n"@ - " -dir Add to list of directories\n"@ - " -console Open a separate console\n"@ - " -jSave Record a journal\n"@ - " -jPlay Play back a journal\n"@ - " -help Display this help message\n" - ); -} - - -//-------------------------------------------------------------------------- - -// Default to a new logfile each session. -if( !$logModeSpecified ) -{ - if( $platform !$= "xbox" && $platform !$= "xenon" ) - setLogMode(6); -} - -// Get the first dir on the list, which will be the last to be applied... this -// does not modify the list. -nextToken($userDirs, currentMod, ";"); - -// Execute startup scripts for each mod, starting at base and working up -function loadDir(%dir) -{ - pushback($userDirs, %dir, ";"); - - if (isScriptFile(%dir @ "/main.cs")) - exec(%dir @ "/main.cs"); -} - -echo("--------- Loading DIRS ---------"); -function loadDirs(%dirPath) -{ - %dirPath = nextToken(%dirPath, token, ";"); - if (%dirPath !$= "") - loadDirs(%dirPath); - - if(exec(%token @ "/main.cs") != true) - { - error("Error: Unable to find specified directory: " @ %token ); - $dirCount--; - } -} -loadDirs($userDirs); -echo(""); - -if($dirCount == 0) { - enableWinConsole(true); - error("Error: Unable to load any specified directories"); - quit(); -} -// Parse the command line arguments -echo("--------- Parsing Arguments ---------"); -parseArgs(); - -// Either display the help message or startup the app. -if ($displayHelp) { - enableWinConsole(true); - displayHelp(); - quit(); -} -else { - onStart(); - echo("Engine initialized..."); - - if( !$isDedicated ) - { - // As we know at this point that the initial load is complete, - // we can hide any splash screen we have, and show the canvas. - // This keeps things looking nice, instead of having a blank window - closeSplashWindow(); - Canvas.showWindow(); - } - - // Auto-load on the 360 - if( $platform $= "xenon" ) - { - %mission = "levels/Empty Terrain.mis"; - - echo("Xbox360 Autoloading level: '" @ %mission @ "'"); - - - if ($pref::HostMultiPlayer) - %serverType = "MultiPlayer"; - else - %serverType = "SinglePlayer"; - - createAndConnectToLocalServer( %serverType, %mission ); - } -} - -// Display an error message for unused arguments -for ($i = 1; $i < $Game::argc; $i++) { - if (!$argUsed[$i]) - error("Error: Unknown command line argument: " @ $Game::argv[$i]); -} - -// Automatically start up the appropriate eidtor, if any -if ($startWorldEditor) { - Canvas.setCursor("DefaultCursor"); - Canvas.setContent(EditorChooseLevelGui); -} else if ($startGUIEditor) { - Canvas.setCursor("DefaultCursor"); - Canvas.setContent(EditorChooseGUI); -} diff --git a/Templates/Empty/game/scripts/client/commands.cs b/Templates/Empty/game/scripts/client/commands.cs deleted file mode 100644 index 7444b3983..000000000 --- a/Templates/Empty/game/scripts/client/commands.cs +++ /dev/null @@ -1,31 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -//---------------------------------------------------------------------------- -// Game start / end events sent from the server -//---------------------------------------------------------------------------- - -function clientCmdGameEnd(%seq) -{ - // Stop local activity... the game will be destroyed on the server - sfxStopAll(); -} diff --git a/Templates/Empty/game/scripts/client/default.bind.cs b/Templates/Empty/game/scripts/client/default.bind.cs deleted file mode 100644 index b4216a33d..000000000 --- a/Templates/Empty/game/scripts/client/default.bind.cs +++ /dev/null @@ -1,526 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -if ( isObject( moveMap ) ) - moveMap.delete(); -new ActionMap(moveMap); - - -//------------------------------------------------------------------------------ -// Non-remapable binds -//------------------------------------------------------------------------------ - -function escapeFromGame() -{ - if ( $Server::ServerType $= "SinglePlayer" ) - MessageBoxYesNo( "Exit", "Exit from this Mission?", "disconnect();", ""); - else - MessageBoxYesNo( "Disconnect", "Disconnect from the server?", "disconnect();", ""); -} - -moveMap.bindCmd(keyboard, "escape", "", "handleEscape();"); - -//------------------------------------------------------------------------------ -// Movement Keys -//------------------------------------------------------------------------------ - -$movementSpeed = 1; // m/s - -function setSpeed(%speed) -{ - if(%speed) - $movementSpeed = %speed; -} - -function moveleft(%val) -{ - $mvLeftAction = %val * $movementSpeed; -} - -function moveright(%val) -{ - $mvRightAction = %val * $movementSpeed; -} - -function moveforward(%val) -{ - $mvForwardAction = %val * $movementSpeed; -} - -function movebackward(%val) -{ - $mvBackwardAction = %val * $movementSpeed; -} - -function moveup(%val) -{ - %object = ServerConnection.getControlObject(); - - if(%object.isInNamespaceHierarchy("Camera")) - $mvUpAction = %val * $movementSpeed; -} - -function movedown(%val) -{ - %object = ServerConnection.getControlObject(); - - if(%object.isInNamespaceHierarchy("Camera")) - $mvDownAction = %val * $movementSpeed; -} - -function turnLeft( %val ) -{ - $mvYawRightSpeed = %val ? $Pref::Input::KeyboardTurnSpeed : 0; -} - -function turnRight( %val ) -{ - $mvYawLeftSpeed = %val ? $Pref::Input::KeyboardTurnSpeed : 0; -} - -function panUp( %val ) -{ - $mvPitchDownSpeed = %val ? $Pref::Input::KeyboardTurnSpeed : 0; -} - -function panDown( %val ) -{ - $mvPitchUpSpeed = %val ? $Pref::Input::KeyboardTurnSpeed : 0; -} - -function getMouseAdjustAmount(%val) -{ - // based on a default camera FOV of 90' - return(%val * ($cameraFov / 90) * 0.01) * $pref::Input::LinkMouseSensitivity; -} - -function getGamepadAdjustAmount(%val) -{ - // based on a default camera FOV of 90' - return(%val * ($cameraFov / 90) * 0.01) * 10.0; -} - -function yaw(%val) -{ - %yawAdj = getMouseAdjustAmount(%val); - if(ServerConnection.isControlObjectRotDampedCamera()) - { - // Clamp and scale - %yawAdj = mClamp(%yawAdj, -m2Pi()+0.01, m2Pi()-0.01); - %yawAdj *= 0.5; - } - - $mvYaw += %yawAdj; -} - -function pitch(%val) -{ - %pitchAdj = getMouseAdjustAmount(%val); - if(ServerConnection.isControlObjectRotDampedCamera()) - { - // Clamp and scale - %pitchAdj = mClamp(%pitchAdj, -m2Pi()+0.01, m2Pi()-0.01); - %pitchAdj *= 0.5; - } - - $mvPitch += %pitchAdj; -} - -function jump(%val) -{ - $mvTriggerCount2++; -} - -function gamePadMoveX( %val ) -{ - $mvXAxis_L = %val; -} - -function gamePadMoveY( %val ) -{ - $mvYAxis_L = %val; -} - -function gamepadYaw(%val) -{ - %yawAdj = getGamepadAdjustAmount(%val); - if(ServerConnection.isControlObjectRotDampedCamera()) - { - // Clamp and scale - %yawAdj = mClamp(%yawAdj, -m2Pi()+0.01, m2Pi()-0.01); - %yawAdj *= 0.5; - } - - if(%yawAdj > 0) - { - $mvYawLeftSpeed = %yawAdj; - $mvYawRightSpeed = 0; - } - else - { - $mvYawLeftSpeed = 0; - $mvYawRightSpeed = -%yawAdj; - } -} - -function gamepadPitch(%val) -{ - %pitchAdj = getGamepadAdjustAmount(%val); - if(ServerConnection.isControlObjectRotDampedCamera()) - { - // Clamp and scale - %pitchAdj = mClamp(%pitchAdj, -m2Pi()+0.01, m2Pi()-0.01); - %pitchAdj *= 0.5; - } - - if(%pitchAdj > 0) - { - $mvPitchDownSpeed = %pitchAdj; - $mvPitchUpSpeed = 0; - } - else - { - $mvPitchDownSpeed = 0; - $mvPitchUpSpeed = -%pitchAdj; - } -} - -moveMap.bind( keyboard, a, moveleft ); -moveMap.bind( keyboard, d, moveright ); -moveMap.bind( keyboard, left, moveleft ); -moveMap.bind( keyboard, right, moveright ); - -moveMap.bind( keyboard, w, moveforward ); -moveMap.bind( keyboard, s, movebackward ); -moveMap.bind( keyboard, up, moveforward ); -moveMap.bind( keyboard, down, movebackward ); - -moveMap.bind( keyboard, e, moveup ); -moveMap.bind( keyboard, c, movedown ); - -moveMap.bind( keyboard, space, jump ); -moveMap.bind( mouse, xaxis, yaw ); -moveMap.bind( mouse, yaxis, pitch ); - -moveMap.bind( gamepad, thumbrx, "D", "-0.23 0.23", gamepadYaw ); -moveMap.bind( gamepad, thumbry, "D", "-0.23 0.23", gamepadPitch ); -moveMap.bind( gamepad, thumblx, "D", "-0.23 0.23", gamePadMoveX ); -moveMap.bind( gamepad, thumbly, "D", "-0.23 0.23", gamePadMoveY ); - -moveMap.bind( gamepad, btn_a, jump ); -moveMap.bindCmd( gamepad, btn_back, "disconnect();", "" ); - -moveMap.bindCmd(gamepad, dpadl, "toggleLightColorViz();", ""); -moveMap.bindCmd(gamepad, dpadu, "toggleDepthViz();", ""); -moveMap.bindCmd(gamepad, dpadd, "toggleNormalsViz();", ""); -moveMap.bindCmd(gamepad, dpadr, "toggleLightSpecularViz();", ""); - - -//------------------------------------------------------------------------------ -// Mouse Trigger -//------------------------------------------------------------------------------ - -function mouseFire(%val) -{ - $mvTriggerCount0++; -} - -function altTrigger(%val) -{ - $mvTriggerCount1++; -} - -moveMap.bind( mouse, button0, mouseFire ); -moveMap.bind( mouse, button1, altTrigger ); - -//------------------------------------------------------------------------------ -// Gamepad Trigger -//------------------------------------------------------------------------------ - -function gamepadFire(%val) -{ - if(%val > 0.1 && !$gamepadFireTriggered) - { - $gamepadFireTriggered = true; - $mvTriggerCount0++; - } - else if(%val <= 0.1 && $gamepadFireTriggered) - { - $gamepadFireTriggered = false; - $mvTriggerCount0++; - } -} - -function gamepadAltTrigger(%val) -{ - if(%val > 0.1 && !$gamepadAltTriggerTriggered) - { - $gamepadAltTriggerTriggered = true; - $mvTriggerCount1++; - } - else if(%val <= 0.1 && $gamepadAltTriggerTriggered) - { - $gamepadAltTriggerTriggered = false; - $mvTriggerCount1++; - } -} - -moveMap.bind(gamepad, triggerr, gamepadFire); -moveMap.bind(gamepad, triggerl, gamepadAltTrigger); - -//------------------------------------------------------------------------------ -// Zoom and FOV functions -//------------------------------------------------------------------------------ - -if($Player::CurrentFOV $= "") - $Player::CurrentFOV = $pref::Player::DefaultFOV / 2; - -// toggleZoomFOV() works by dividing the CurrentFOV by 2. Each time that this -// toggle is hit it simply divides the CurrentFOV by 2 once again. If the -// FOV is reduced below a certain threshold then it resets to equal half of the -// DefaultFOV value. This gives us 4 zoom levels to cycle through. - -function toggleZoomFOV() -{ - $Player::CurrentFOV = $Player::CurrentFOV / 2; - - if($Player::CurrentFOV < 5) - resetCurrentFOV(); - - if(ServerConnection.zoomed) - setFOV($Player::CurrentFOV); - else - { - setFov(ServerConnection.getControlCameraDefaultFov()); - } -} - -function resetCurrentFOV() -{ - $Player::CurrentFOV = ServerConnection.getControlCameraDefaultFov() / 2; -} - -function turnOffZoom() -{ - ServerConnection.zoomed = false; - setFov(ServerConnection.getControlCameraDefaultFov()); - - // Rather than just disable the DOF effect, we want to set it to the level's - // preset values. - //DOFPostEffect.disable(); - ppOptionsUpdateDOFSettings(); -} - -function setZoomFOV(%val) -{ - if(%val) - toggleZoomFOV(); -} - -function toggleZoom(%val) -{ - if (%val) - { - ServerConnection.zoomed = true; - setFov($Player::CurrentFOV); - - DOFPostEffect.setAutoFocus( true ); - DOFPostEffect.setFocusParams( 0.5, 0.5, 50, 500, -5, 5 ); - DOFPostEffect.enable(); - } - else - { - turnOffZoom(); - } -} - -moveMap.bind(keyboard, f, setZoomFOV); -moveMap.bind(keyboard, r, toggleZoom); -moveMap.bind( gamepad, btn_b, toggleZoom ); - -//------------------------------------------------------------------------------ -// Camera & View functions -//------------------------------------------------------------------------------ - -function toggleFreeLook( %val ) -{ - if ( %val ) - $mvFreeLook = true; - else - $mvFreeLook = false; -} - -function toggleFirstPerson(%val) -{ - if (%val) - { - ServerConnection.setFirstPerson(!ServerConnection.isFirstPerson()); - } -} - -function toggleCamera(%val) -{ - if (%val) - commandToServer('ToggleCamera'); -} - -moveMap.bind( keyboard, z, toggleFreeLook ); -moveMap.bind(keyboard, tab, toggleFirstPerson ); -moveMap.bind(keyboard, "alt c", toggleCamera); - -moveMap.bind( gamepad, btn_back, toggleCamera ); - - -//------------------------------------------------------------------------------ -// Demo recording functions -//------------------------------------------------------------------------------ - -function startRecordingDemo( %val ) -{ - if ( %val ) - startDemoRecord(); -} - -function stopRecordingDemo( %val ) -{ - if ( %val ) - stopDemoRecord(); -} - -moveMap.bind( keyboard, F3, startRecordingDemo ); -moveMap.bind( keyboard, F4, stopRecordingDemo ); - -//------------------------------------------------------------------------------ -// Theora Video Capture (Records a movie file) -//------------------------------------------------------------------------------ - -function toggleMovieRecording(%val) -{ - if (!%val) - return; - - %movieEncodingType = "THEORA"; // Valid encoder values are "PNG" and "THEORA" (default). - %movieFPS = 30; // video capture frame rate. - - if (!$RecordingMovie) - { - // locate a non-existent filename to use - for(%i = 0; %i < 1000; %i++) - { - %num = %i; - if(%num < 10) - %num = "0" @ %num; - if(%num < 100) - %num = "0" @ %num; - - %filePath = "movies/movie" @ %num; - if(!isfile(%filePath)) - break; - } - if(%i == 1000) - return; - - // Start the movie recording - recordMovie(%filePath, %movieFPS, %movieEncodingType); - - } - else - { - // Stop the current recording - stopMovie(); - } -} - -// Key binding works at any time and not just while in a game. -GlobalActionMap.bind(keyboard, "alt m", toggleMovieRecording); - -//------------------------------------------------------------------------------ -// Helper Functions -//------------------------------------------------------------------------------ - -function dropCameraAtPlayer(%val) -{ - if (%val) - commandToServer('dropCameraAtPlayer'); -} - -function dropPlayerAtCamera(%val) -{ - if (%val) - commandToServer('DropPlayerAtCamera'); -} - -moveMap.bind(keyboard, "F8", dropCameraAtPlayer); -moveMap.bind(keyboard, "F7", dropPlayerAtCamera); - -function bringUpOptions(%val) -{ - if (%val) - Canvas.pushDialog(OptionsDlg); -} - -GlobalActionMap.bind(keyboard, "ctrl o", bringUpOptions); - - -//------------------------------------------------------------------------------ -// Debugging Functions -//------------------------------------------------------------------------------ -function showMetrics(%val) -{ - if(%val) - metrics("fps gfx shadow sfx terrain groundcover forest net"); -} -GlobalActionMap.bind(keyboard, "ctrl F2", showMetrics); - -//------------------------------------------------------------------------------ -// -// Start profiler by pressing ctrl f3 -// ctrl f3 - starts profile that will dump to console and file -// -function doProfile(%val) -{ - if (%val) - { - // key down -- start profile - echo("Starting profile session..."); - profilerReset(); - profilerEnable(true); - } - else - { - // key up -- finish off profile - echo("Ending profile session..."); - - profilerDumpToFile("profilerDumpToFile" @ getSimTime() @ ".txt"); - profilerEnable(false); - } -} - -GlobalActionMap.bind(keyboard, "ctrl F3", doProfile); - -//------------------------------------------------------------------------------ -// Misc. -//------------------------------------------------------------------------------ - -GlobalActionMap.bind(keyboard, "tilde", toggleConsole); -GlobalActionMap.bindCmd(keyboard, "alt k", "cls();",""); -GlobalActionMap.bindCmd(keyboard, "alt enter", "", "Canvas.attemptFullscreenToggle();"); diff --git a/Templates/Empty/game/scripts/client/defaults.cs b/Templates/Empty/game/scripts/client/defaults.cs deleted file mode 100644 index f9b6c7e66..000000000 --- a/Templates/Empty/game/scripts/client/defaults.cs +++ /dev/null @@ -1,43 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -// First we execute the core default preferences. -exec( "core/scripts/client/defaults.cs" ); - - -// Now add your own game specific client preferences as -// well as any overloaded core defaults here. - - - - -// Finally load the preferences saved from the last -// game execution if they exist. -if ( $platform !$= "xenon" ) -{ - if ( isFile( "./prefs.cs" ) ) - exec( "./prefs.cs" ); -} -else -{ - echo( "Not loading client prefs.cs on Xbox360" ); -} \ No newline at end of file diff --git a/Templates/Empty/game/scripts/client/init.cs b/Templates/Empty/game/scripts/client/init.cs deleted file mode 100644 index fa9a8b8f9..000000000 --- a/Templates/Empty/game/scripts/client/init.cs +++ /dev/null @@ -1,180 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// Variables used by client scripts & code. The ones marked with (c) -// are accessed from code. Variables preceeded by Pref:: are client -// preferences and stored automatically in the ~/client/prefs.cs file -// in between sessions. -// -// (c) Client::MissionFile Mission file name -// ( ) Client::Password Password for server join - -// (?) Pref::Player::CurrentFOV -// (?) Pref::Player::DefaultFov -// ( ) Pref::Input::KeyboardTurnSpeed - -// (c) pref::Master[n] List of master servers -// (c) pref::Net::RegionMask -// (c) pref::Client::ServerFavoriteCount -// (c) pref::Client::ServerFavorite[FavoriteCount] -// .. Many more prefs... need to finish this off - -// Moves, not finished with this either... -// (c) firstPerson -// $mv*Action... - -//----------------------------------------------------------------------------- -// These are variables used to control the shell scripts and -// can be overriden by mods: -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -function initClient() -{ - echo("\n--------- Initializing " @ $appName @ ": Client Scripts ---------"); - - // Make sure this variable reflects the correct state. - $Server::Dedicated = false; - - // Game information used to query the master server - $Client::GameTypeQuery = $appName; - $Client::MissionTypeQuery = "Any"; - - // These should be game specific GuiProfiles. Custom profiles are saved out - // from the Gui Editor. Either of these may override any that already exist. - exec("art/gui/gameProfiles.cs"); - exec("art/gui/customProfiles.cs"); - - // The common module provides basic client functionality - initBaseClient(); - - // Use our prefs to configure our Canvas/Window - configureCanvas(); - - // Load up the Game GUI - exec("art/gui/playGui.gui"); - - // Load up the shell GUIs - exec("art/gui/mainMenuGui.gui"); - exec("art/gui/StartupGui.gui"); - exec("art/gui/chooseLevelDlg.gui"); - exec("art/gui/loadingGui.gui"); - exec("art/gui/optionsDlg.gui"); - exec("art/gui/remapDlg.gui"); - - // Gui scripts - exec("scripts/gui/playGui.cs"); - exec("scripts/gui/startupGui.cs"); - exec("scripts/gui/chooseLevelDlg.cs"); - exec("scripts/gui/loadingGui.cs"); - exec("scripts/gui/optionsDlg.cs"); - - // Client scripts - exec("./missionDownload.cs"); - exec("./serverConnection.cs"); - - // Default player key bindings - exec("./default.bind.cs"); - - if (isFile("./config.cs")) - exec("./config.cs"); - - loadMaterials(); - - // Really shouldn't be starting the networking unless we are - // going to connect to a remote server, or host a multi-player - // game. - setNetPort(0); - - // Copy saved script prefs into C++ code. - setDefaultFov( $pref::Player::defaultFov ); - setZoomSpeed( $pref::Player::zoomSpeed ); - - if( isScriptFile( expandFilename("./audioData.cs") ) ) - exec( "./audioData.cs" ); - - // Start up the main menu... this is separated out into a - // method for easier mod override. - - if ($startWorldEditor || $startGUIEditor) { - // Editor GUI's will start up in the primary main.cs once - // engine is initialized. - return; - } - - // Connect to server if requested. - if ($JoinGameAddress !$= "") { - // If we are instantly connecting to an address, load the - // loading GUI then attempt the connect. - loadLoadingGui(); - connect($JoinGameAddress, "", $Pref::Player::Name); - } - else { - // Otherwise go to the splash screen. - Canvas.setCursor("DefaultCursor"); - loadStartup(); - } -} - - -//----------------------------------------------------------------------------- - -function loadMainMenu() -{ - // Startup the client with the Main menu... - if (isObject( MainMenuGui )) - Canvas.setContent( MainMenuGui ); - - Canvas.setCursor("DefaultCursor"); - - // first check if we have a level file to load - if ($levelToLoad !$= "") - { - %levelFile = "levels/"; - %ext = getSubStr($levelToLoad, strlen($levelToLoad) - 3, 3); - if(%ext !$= "mis") - %levelFile = %levelFile @ $levelToLoad @ ".mis"; - else - %levelFile = %levelFile @ $levelToLoad; - - // Clear out the $levelToLoad so we don't attempt to load the level again - // later on. - $levelToLoad = ""; - - // let's make sure the file exists - %file = findFirstFile(%levelFile); - - if(%file !$= "") - createAndConnectToLocalServer( "SinglePlayer", %file ); - } -} - -function loadLoadingGui() -{ - Canvas.setContent("LoadingGui"); - LoadingProgress.setValue(1); - - LoadingProgressTxt.setValue("WAITING FOR SERVER"); - - Canvas.repaint(); -} diff --git a/Templates/Empty/game/scripts/client/missionDownload.cs b/Templates/Empty/game/scripts/client/missionDownload.cs deleted file mode 100644 index 1d740bc5c..000000000 --- a/Templates/Empty/game/scripts/client/missionDownload.cs +++ /dev/null @@ -1,215 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -//---------------------------------------------------------------------------- -// Mission Loading & Mission Info -// The mission loading server handshaking is handled by the -// core/scripts/client/missingLoading.cs. This portion handles the interface -// with the game GUI. -//---------------------------------------------------------------------------- - -//---------------------------------------------------------------------------- -// Loading Phases: -// Phase 1: Download Datablocks -// Phase 2: Download Ghost Objects -// Phase 3: Scene Lighting - -//---------------------------------------------------------------------------- -// Phase 1 -//---------------------------------------------------------------------------- - -function onMissionDownloadPhase1(%missionName, %musicTrack) -{ - // Load the post effect presets for this mission. - %path = "levels/" @ fileBase( %missionName ) @ $PostFXManager::fileExtension; - if ( isScriptFile( %path ) ) - postFXManager::loadPresetHandler( %path ); - else - PostFXManager::settingsApplyDefaultPreset(); - - // Close and clear the message hud (in case it's open) - if ( isObject( MessageHud ) ) - MessageHud.close(); - - // Reset the loading progress controls: - if ( !isObject( LoadingProgress ) ) - return; - - LoadingProgress.setValue(0); - LoadingProgressTxt.setValue("LOADING DATABLOCKS"); - Canvas.repaint(); -} - -function onPhase1Progress(%progress) -{ - if ( !isObject( LoadingProgress ) ) - return; - - LoadingProgress.setValue(%progress); - Canvas.repaint(33); -} - -function onPhase1Complete() -{ - if ( !isObject( LoadingProgress ) ) - return; - - LoadingProgress.setValue( 1 ); - Canvas.repaint(); -} - -//---------------------------------------------------------------------------- -// Phase 2 -//---------------------------------------------------------------------------- - -function onMissionDownloadPhase2() -{ - if ( !isObject( LoadingProgress ) ) - return; - - LoadingProgress.setValue(0); - LoadingProgressTxt.setValue("LOADING OBJECTS"); - Canvas.repaint(); -} - -function onPhase2Progress(%progress) -{ - if ( !isObject( LoadingProgress ) ) - return; - - LoadingProgress.setValue(%progress); - Canvas.repaint(33); -} - -function onPhase2Complete() -{ - if ( !isObject( LoadingProgress ) ) - return; - - LoadingProgress.setValue( 1 ); - Canvas.repaint(); -} - -function onFileChunkReceived(%fileName, %ofs, %size) -{ - if ( !isObject( LoadingProgress ) ) - return; - - LoadingProgress.setValue(%ofs / %size); - LoadingProgressTxt.setValue("Downloading " @ %fileName @ "..."); -} - -//---------------------------------------------------------------------------- -// Phase 3 -//---------------------------------------------------------------------------- - -function onMissionDownloadPhase3() -{ - if ( !isObject( LoadingProgress ) ) - return; - - LoadingProgress.setValue(0); - LoadingProgressTxt.setValue("LIGHTING MISSION"); - Canvas.repaint(); -} - -function onPhase3Progress(%progress) -{ - if ( !isObject( LoadingProgress ) ) - return; - - LoadingProgress.setValue(%progress); - Canvas.repaint(33); -} - -function onPhase3Complete() -{ - $lightingMission = false; - - if ( !isObject( LoadingProgress ) ) - return; - - LoadingProgressTxt.setValue("STARTING MISSION"); - LoadingProgress.setValue( 1 ); - Canvas.repaint(); -} - -//---------------------------------------------------------------------------- -// Mission loading done! -//---------------------------------------------------------------------------- - -function onMissionDownloadComplete() -{ - // Client will shortly be dropped into the game, so this is - // good place for any last minute gui cleanup. -} - - -//------------------------------------------------------------------------------ -// Before downloading a mission, the server transmits the mission -// information through these messages. -//------------------------------------------------------------------------------ - -addMessageCallback( 'MsgLoadInfo', handleLoadInfoMessage ); -addMessageCallback( 'MsgLoadDescripition', handleLoadDescriptionMessage ); -addMessageCallback( 'MsgLoadInfoDone', handleLoadInfoDoneMessage ); -addMessageCallback( 'MsgLoadFailed', handleLoadFailedMessage ); - -//------------------------------------------------------------------------------ - -function handleLoadInfoMessage( %msgType, %msgString, %mapName ) -{ - // Clear all of the loading info lines: - for( %line = 0; %line < LoadingGui.qLineCount; %line++ ) - LoadingGui.qLine[%line] = ""; - LoadingGui.qLineCount = 0; -} - -//------------------------------------------------------------------------------ - -function handleLoadDescriptionMessage( %msgType, %msgString, %line ) -{ - LoadingGui.qLine[LoadingGui.qLineCount] = %line; - LoadingGui.qLineCount++; - - // Gather up all the previous lines, append the current one - // and stuff it into the control - %text = ""; - - for( %line = 0; %line < LoadingGui.qLineCount - 1; %line++ ) - %text = %text @ LoadingGui.qLine[%line] @ " "; - %text = %text @ LoadingGui.qLine[%line] @ ""; -} - -//------------------------------------------------------------------------------ - -function handleLoadInfoDoneMessage( %msgType, %msgString ) -{ - // This will get called after the last description line is sent. -} - -//------------------------------------------------------------------------------ - -function handleLoadFailedMessage( %msgType, %msgString ) -{ - MessageBoxOK( "Mission Load Failed", %msgString NL "Press OK to return to the Main Menu", "disconnect();" ); -} diff --git a/Templates/Empty/game/scripts/gui/loadingGui.cs b/Templates/Empty/game/scripts/gui/loadingGui.cs deleted file mode 100644 index 08a79d839..000000000 --- a/Templates/Empty/game/scripts/gui/loadingGui.cs +++ /dev/null @@ -1,51 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -//------------------------------------------------------------------------------ -function LoadingGui::onAdd(%this) -{ - %this.qLineCount = 0; -} - -//------------------------------------------------------------------------------ -function LoadingGui::onWake(%this) -{ - // Play sound... - //CloseMessagePopup(); -} - -//------------------------------------------------------------------------------ -function LoadingGui::onSleep(%this) -{ - // Clear the load info: - if ( %this.qLineCount !$= "" ) - { - for ( %line = 0; %line < %this.qLineCount; %line++ ) - %this.qLine[%line] = ""; - } - %this.qLineCount = 0; - - LoadingProgress.setValue( 0 ); - LoadingProgressTxt.setValue( "WAITING FOR SERVER" ); - - // Stop sound... -} diff --git a/Templates/Empty/game/scripts/gui/optionsDlg.cs b/Templates/Empty/game/scripts/gui/optionsDlg.cs deleted file mode 100644 index 3e2ea865f..000000000 --- a/Templates/Empty/game/scripts/gui/optionsDlg.cs +++ /dev/null @@ -1,844 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - - -/// Returns true if the current quality settings equal -/// this graphics quality level. -function GraphicsQualityLevel::isCurrent( %this ) -{ - // Test each pref to see if the current value - // equals our stored value. - - for ( %i=0; %i < %this.count(); %i++ ) - { - %pref = %this.getKey( %i ); - %value = %this.getValue( %i ); - - if ( getVariable( %pref ) !$= %value ) - return false; - } - - return true; -} - -/// Applies the graphics quality settings and calls -/// 'onApply' on itself or its parent group if its -/// been overloaded. -function GraphicsQualityLevel::apply( %this ) -{ - for ( %i=0; %i < %this.count(); %i++ ) - { - %pref = %this.getKey( %i ); - %value = %this.getValue( %i ); - setVariable( %pref, %value ); - } - - // If we have an overloaded onApply method then - // call it now to finalize the changes. - if ( %this.isMethod( "onApply" ) ) - %this.onApply(); - else - { - %group = %this.getGroup(); - if ( isObject( %group ) && %group.isMethod( "onApply" ) ) - %group.onApply( %this ); - } -} - -function GraphicsQualityPopup::init( %this, %qualityGroup ) -{ - assert( isObject( %this ) ); - assert( isObject( %qualityGroup ) ); - - // Clear the existing content first. - %this.clear(); - - // Fill it. - %select = -1; - for ( %i=0; %i < %qualityGroup.getCount(); %i++ ) - { - %level = %qualityGroup.getObject( %i ); - if ( %level.isCurrent() ) - %select = %i; - - %this.add( %level.getInternalName(), %i ); - } - - // Setup a default selection. - if ( %select == -1 ) - %this.setText( "Custom" ); - else - %this.setSelected( %select ); -} - -function GraphicsQualityPopup::apply( %this, %qualityGroup, %testNeedApply ) -{ - assert( isObject( %this ) ); - assert( isObject( %qualityGroup ) ); - - %quality = %this.getText(); - - %index = %this.findText( %quality ); - if ( %index == -1 ) - return false; - - %level = %qualityGroup.getObject( %index ); - if ( isObject( %level ) && !%level.isCurrent() ) - { - if ( %testNeedApply ) - return true; - - %level.apply(); - } - - return false; -} - -function OptionsDlg::setPane(%this, %pane) -{ - %this-->OptAudioPane.setVisible(false); - %this-->OptGraphicsPane.setVisible(false); - %this-->OptNetworkPane.setVisible(false); - %this-->OptControlsPane.setVisible(false); - - %this.findObjectByInternalName( "Opt" @ %pane @ "Pane", true ).setVisible(true); - - %this.fillRemapList(); - - // Update the state of the apply button. - %this._updateApplyState(); -} - -function OptionsDlg::onWake(%this) -{ - if ( isFunction("getWebDeployment") && getWebDeployment() ) - { - // Cannot enable full screen under web deployment - %this-->OptGraphicsFullscreenToggle.setStateOn( false ); - %this-->OptGraphicsFullscreenToggle.setVisible( false ); - } - else - { - %this-->OptGraphicsFullscreenToggle.setStateOn( Canvas.isFullScreen() ); - } - %this-->OptGraphicsVSyncToggle.setStateOn( !$pref::Video::disableVerticalSync ); - - OptionsDlg.initResMenu(); - %resSelId = OptionsDlg-->OptGraphicsResolutionMenu.findText( _makePrettyResString( $pref::Video::mode ) ); - if( %resSelId != -1 ) - OptionsDlg-->OptGraphicsResolutionMenu.setSelected( %resSelId ); - - OptGraphicsDriverMenu.clear(); - - %buffer = getDisplayDeviceList(); - %count = getFieldCount( %buffer ); - for(%i = 0; %i < %count; %i++) - OptGraphicsDriverMenu.add(getField(%buffer, %i), %i); - - %selId = OptGraphicsDriverMenu.findText( getDisplayDeviceInformation() ); - if ( %selId == -1 ) - OptGraphicsDriverMenu.setFirstSelected(); - else - OptGraphicsDriverMenu.setSelected( %selId ); - - // Setup the graphics quality dropdown menus. - %this-->OptMeshQualityPopup.init( MeshQualityGroup ); - %this-->OptTextureQualityPopup.init( TextureQualityGroup ); - %this-->OptLightingQualityPopup.init( LightingQualityGroup ); - %this-->OptShaderQualityPopup.init( ShaderQualityGroup ); - - // Setup the anisotropic filtering menu. - %ansioCtrl = %this-->OptAnisotropicPopup; - %ansioCtrl.clear(); - %ansioCtrl.add( "Off", 0 ); - %ansioCtrl.add( "4X", 4 ); - %ansioCtrl.add( "8X", 8 ); - %ansioCtrl.add( "16X", 16 ); - %ansioCtrl.setSelected( $pref::Video::defaultAnisotropy, false ); - - // set up the Refresh Rate menu. - %refreshMenu = %this-->OptRefreshSelectMenu; - %refreshMenu.clear(); - // %refreshMenu.add("Auto", 60); - %refreshMenu.add("60", 60); - %refreshMenu.add("75", 75); - %refreshMenu.setSelected( getWord( $pref::Video::mode, $WORD::REFRESH ) ); - - // Audio - //OptAudioHardwareToggle.setStateOn($pref::SFX::useHardware); - //OptAudioHardwareToggle.setActive( true ); - - %this-->OptAudioVolumeMaster.setValue( $pref::SFX::masterVolume ); - %this-->OptAudioVolumeShell.setValue( $pref::SFX::channelVolume[ $GuiAudioType] ); - %this-->OptAudioVolumeSim.setValue( $pref::SFX::channelVolume[ $SimAudioType ] ); - %this-->OptAudioVolumeMusic.setValue( $pref::SFX::channelVolume[ $MusicAudioType ] ); - - OptAudioProviderList.clear(); - %buffer = sfxGetAvailableDevices(); - %count = getRecordCount( %buffer ); - for(%i = 0; %i < %count; %i++) - { - %record = getRecord(%buffer, %i); - %provider = getField(%record, 0); - - if ( OptAudioProviderList.findText( %provider ) == -1 ) - OptAudioProviderList.add( %provider, %i ); - } - - OptAudioProviderList.sort(); - - %selId = OptAudioProviderList.findText($pref::SFX::provider); - if ( %selId == -1 ) - OptAudioProviderList.setFirstSelected(); - else - OptAudioProviderList.setSelected( %selId ); - - // Populate the Anti-aliasing popup. - %aaMenu = %this-->OptAAQualityPopup; - %aaMenu.clear(); - %aaMenu.Add( "Off", 0 ); - %aaMenu.Add( "1x", 1 ); - %aaMenu.Add( "2x", 2 ); - %aaMenu.Add( "4x", 4 ); - %aaMenu.setSelected( getWord( $pref::Video::mode, $WORD::AA ) ); - - OptMouseSensitivity.value = $pref::Input::LinkMouseSensitivity; - - // Set the graphics pane to start. - %this-->OptGraphicsButton.performClick(); -} - -function OptionsDlg::onSleep(%this) -{ - // write out the control config into the rw/config.cs file - moveMap.save( "scripts/client/config.cs" ); -} - -function OptGraphicsDriverMenu::onSelect( %this, %id, %text ) -{ - // Attempt to keep the same resolution settings: - %resMenu = OptionsDlg-->OptGraphicsResolutionMenu; - %currRes = %resMenu.getText(); - - // If its empty the use the current. - if ( %currRes $= "" ) - %currRes = _makePrettyResString( Canvas.getVideoMode() ); - - // Fill the resolution list. - optionsDlg.initResMenu(); - - // Try to select the previous settings: - %selId = %resMenu.findText( %currRes ); - if ( %selId == -1 ) - %selId = 0; - %resMenu.setSelected( %selId ); - - OptionsDlg._updateApplyState(); -} - -function _makePrettyResString( %resString ) -{ - %width = getWord( %resString, $WORD::RES_X ); - %height = getWord( %resString, $WORD::RES_Y ); - - %aspect = %width / %height; - %aspect = mRound( %aspect * 100 ) * 0.01; - - switch$( %aspect ) - { - case "1.33": - %aspect = "4:3"; - case "1.78": - %aspect = "16:9"; - default: - %aspect = ""; - } - - %outRes = %width @ " x " @ %height; - if ( %aspect !$= "" ) - %outRes = %outRes @ " (" @ %aspect @ ")"; - - return %outRes; -} - -function OptionsDlg::initResMenu( %this ) -{ - // Clear out previous values - %resMenu = %this-->OptGraphicsResolutionMenu; - %resMenu.clear(); - - // If we are in a browser then we can't change our resolution through - // the options dialog - if (getWebDeployment()) - { - %count = 0; - %currRes = getWords(Canvas.getVideoMode(), $WORD::RES_X, $WORD::RES_Y); - %resMenu.add(%currRes, %count); - %count++; - - return; - } - - // Loop through all and add all valid resolutions - %count = 0; - %resCount = Canvas.getModeCount(); - for (%i = 0; %i < %resCount; %i++) - { - %testResString = Canvas.getMode( %i ); - %testRes = _makePrettyResString( %testResString ); - - // Only add to list if it isn't there already. - if (%resMenu.findText(%testRes) == -1) - { - %resMenu.add(%testRes, %i); - %count++; - } - } - - %resMenu.sort(); -} - -function OptionsDlg::applyGraphics( %this, %testNeedApply ) -{ - %newAdapter = OptGraphicsDriverMenu.getText(); - %numAdapters = GFXInit::getAdapterCount(); - %newDevice = $pref::Video::displayDevice; - - for( %i = 0; %i < %numAdapters; %i ++ ) - if( GFXInit::getAdapterName( %i ) $= %newAdapter ) - { - %newDevice = GFXInit::getAdapterType( %i ); - break; - } - - // Change the device. - if ( %newDevice !$= $pref::Video::displayDevice ) - { - if ( %testNeedApply ) - return true; - - $pref::Video::displayDevice = %newDevice; - if( %newAdapter !$= getDisplayDeviceInformation() ) - MessageBoxOK( "Change requires restart", "Please restart the game for a display device change to take effect." ); - } - - // Gather the new video mode. - if ( isFunction("getWebDeployment") && getWebDeployment() ) - { - // Under web deployment, we use the custom resolution rather than a Canvas - // defined one. - %newRes = %this-->OptGraphicsResolutionMenu.getText(); - } - else - { - %newRes = getWords( Canvas.getMode( %this-->OptGraphicsResolutionMenu.getSelected() ), $WORD::RES_X, $WORD::RES_Y ); - } - %newBpp = 32; // ... its not 1997 anymore. - %newFullScreen = %this-->OptGraphicsFullscreenToggle.getValue() ? "true" : "false"; - %newRefresh = %this-->OptRefreshSelectMenu.getSelected(); - %newVsync = !%this-->OptGraphicsVSyncToggle.getValue(); - %newFSAA = %this-->OptAAQualityPopup.getSelected(); - - // Under web deployment we can't be full screen. - if ( isFunction("getWebDeployment") && getWebDeployment() ) - { - %newFullScreen = false; - } - else if ( %newFullScreen $= "false" ) - { - // If we're in windowed mode switch the fullscreen check - // if the resolution is bigger than the desktop. - %deskRes = getDesktopResolution(); - %deskResX = getWord(%deskRes, $WORD::RES_X); - %deskResY = getWord(%deskRes, $WORD::RES_Y); - if ( getWord( %newRes, $WORD::RES_X ) > %deskResX || - getWord( %newRes, $WORD::RES_Y ) > %deskResY ) - { - %newFullScreen = "true"; - %this-->OptGraphicsFullscreenToggle.setStateOn( true ); - } - } - - // Build the final mode string. - %newMode = %newRes SPC %newFullScreen SPC %newBpp SPC %newRefresh SPC %newFSAA; - - // Change the video mode. - if ( %newMode !$= $pref::Video::mode || - %newVsync != $pref::Video::disableVerticalSync ) - { - if ( %testNeedApply ) - return true; - - $pref::Video::mode = %newMode; - $pref::Video::disableVerticalSync = %newVsync; - configureCanvas(); - } - - // Test and apply the graphics settings. - if ( %this-->OptMeshQualityPopup.apply( MeshQualityGroup, %testNeedApply ) ) return true; - if ( %this-->OptTextureQualityPopup.apply( TextureQualityGroup, %testNeedApply ) ) return true; - if ( %this-->OptLightingQualityPopup.apply( LightingQualityGroup, %testNeedApply ) ) return true; - if ( %this-->OptShaderQualityPopup.apply( ShaderQualityGroup, %testNeedApply ) ) return true; - - // Check the anisotropic filtering. - %level = %this-->OptAnisotropicPopup.getSelected(); - if ( %level != $pref::Video::defaultAnisotropy ) - { - if ( %testNeedApply ) - return true; - - $pref::Video::defaultAnisotropy = %level; - } - - // If we're applying the state then recheck the - // state to update the apply button. - if ( !%testNeedApply ) - %this._updateApplyState(); - - return false; -} - -function OptionsDlg::_updateApplyState( %this ) -{ - %applyCtrl = %this-->Apply; - %graphicsPane = %this-->OptGraphicsPane; - - assert( isObject( %applyCtrl ) ); - assert( isObject( %graphicsPane ) ); - - %applyCtrl.active = %graphicsPane.isVisible() && %this.applyGraphics( true ); -} - -function OptionsDlg::_autoDetectQuality( %this ) -{ - %msg = GraphicsQualityAutodetect(); - %this.onWake(); - - if ( %msg !$= "" ) - { - MessageBoxOK( "Notice", %msg ); - } -} - -$RemapCount = 0; -$RemapName[$RemapCount] = "Forward"; -$RemapCmd[$RemapCount] = "moveforward"; -$RemapCount++; -$RemapName[$RemapCount] = "Backward"; -$RemapCmd[$RemapCount] = "movebackward"; -$RemapCount++; -$RemapName[$RemapCount] = "Strafe Left"; -$RemapCmd[$RemapCount] = "moveleft"; -$RemapCount++; -$RemapName[$RemapCount] = "Strafe Right"; -$RemapCmd[$RemapCount] = "moveright"; -$RemapCount++; -$RemapName[$RemapCount] = "Turn Left"; -$RemapCmd[$RemapCount] = "turnLeft"; -$RemapCount++; -$RemapName[$RemapCount] = "Turn Right"; -$RemapCmd[$RemapCount] = "turnRight"; -$RemapCount++; -$RemapName[$RemapCount] = "Look Up"; -$RemapCmd[$RemapCount] = "panUp"; -$RemapCount++; -$RemapName[$RemapCount] = "Look Down"; -$RemapCmd[$RemapCount] = "panDown"; -$RemapCount++; -$RemapName[$RemapCount] = "Jump"; -$RemapCmd[$RemapCount] = "jump"; -$RemapCount++; -$RemapName[$RemapCount] = "Fire Weapon"; -$RemapCmd[$RemapCount] = "mouseFire"; -$RemapCount++; -$RemapName[$RemapCount] = "Adjust Zoom"; -$RemapCmd[$RemapCount] = "setZoomFov"; -$RemapCount++; -$RemapName[$RemapCount] = "Toggle Zoom"; -$RemapCmd[$RemapCount] = "toggleZoom"; -$RemapCount++; -$RemapName[$RemapCount] = "Free Look"; -$RemapCmd[$RemapCount] = "toggleFreeLook"; -$RemapCount++; -$RemapName[$RemapCount] = "Switch 1st/3rd"; -$RemapCmd[$RemapCount] = "toggleFirstPerson"; -$RemapCount++; -$RemapName[$RemapCount] = "Chat to Everyone"; -$RemapCmd[$RemapCount] = "toggleMessageHud"; -$RemapCount++; -$RemapName[$RemapCount] = "Message Hud PageUp"; -$RemapCmd[$RemapCount] = "pageMessageHudUp"; -$RemapCount++; -$RemapName[$RemapCount] = "Message Hud PageDown"; -$RemapCmd[$RemapCount] = "pageMessageHudDown"; -$RemapCount++; -$RemapName[$RemapCount] = "Resize Message Hud"; -$RemapCmd[$RemapCount] = "resizeMessageHud"; -$RemapCount++; -$RemapName[$RemapCount] = "Show Scores"; -$RemapCmd[$RemapCount] = "showPlayerList"; -$RemapCount++; -$RemapName[$RemapCount] = "Animation - Wave"; -$RemapCmd[$RemapCount] = "celebrationWave"; -$RemapCount++; -$RemapName[$RemapCount] = "Animation - Salute"; -$RemapCmd[$RemapCount] = "celebrationSalute"; -$RemapCount++; -$RemapName[$RemapCount] = "Suicide"; -$RemapCmd[$RemapCount] = "suicide"; -$RemapCount++; -$RemapName[$RemapCount] = "Toggle Camera"; -$RemapCmd[$RemapCount] = "toggleCamera"; -$RemapCount++; -$RemapName[$RemapCount] = "Drop Camera at Player"; -$RemapCmd[$RemapCount] = "dropCameraAtPlayer"; -$RemapCount++; -$RemapName[$RemapCount] = "Drop Player at Camera"; -$RemapCmd[$RemapCount] = "dropPlayerAtCamera"; -$RemapCount++; -$RemapName[$RemapCount] = "Bring up Options Dialog"; -$RemapCmd[$RemapCount] = "bringUpOptions"; -$RemapCount++; - - -function restoreDefaultMappings() -{ - moveMap.delete(); - exec( "scripts/client/default.bind.cs" ); - optionsDlg.fillRemapList(); -} - -function getMapDisplayName( %device, %action ) -{ - if ( %device $= "keyboard" ) - return( %action ); - else if ( strstr( %device, "mouse" ) != -1 ) - { - // Substitute "mouse" for "button" in the action string: - %pos = strstr( %action, "button" ); - if ( %pos != -1 ) - { - %mods = getSubStr( %action, 0, %pos ); - %object = getSubStr( %action, %pos, 1000 ); - %instance = getSubStr( %object, strlen( "button" ), 1000 ); - return( %mods @ "mouse" @ ( %instance + 1 ) ); - } - else - error( "Mouse input object other than button passed to getDisplayMapName!" ); - } - else if ( strstr( %device, "joystick" ) != -1 ) - { - // Substitute "joystick" for "button" in the action string: - %pos = strstr( %action, "button" ); - if ( %pos != -1 ) - { - %mods = getSubStr( %action, 0, %pos ); - %object = getSubStr( %action, %pos, 1000 ); - %instance = getSubStr( %object, strlen( "button" ), 1000 ); - return( %mods @ "joystick" @ ( %instance + 1 ) ); - } - else - { - %pos = strstr( %action, "pov" ); - if ( %pos != -1 ) - { - %wordCount = getWordCount( %action ); - %mods = %wordCount > 1 ? getWords( %action, 0, %wordCount - 2 ) @ " " : ""; - %object = getWord( %action, %wordCount - 1 ); - switch$ ( %object ) - { - case "upov": %object = "POV1 up"; - case "dpov": %object = "POV1 down"; - case "lpov": %object = "POV1 left"; - case "rpov": %object = "POV1 right"; - case "upov2": %object = "POV2 up"; - case "dpov2": %object = "POV2 down"; - case "lpov2": %object = "POV2 left"; - case "rpov2": %object = "POV2 right"; - default: %object = "??"; - } - return( %mods @ %object ); - } - else - error( "Unsupported Joystick input object passed to getDisplayMapName!" ); - } - } - - return( "??" ); -} - -function buildFullMapString( %index ) -{ - %name = $RemapName[%index]; - %cmd = $RemapCmd[%index]; - - %temp = moveMap.getBinding( %cmd ); - if ( %temp $= "" ) - return %name TAB ""; - - %mapString = ""; - - %count = getFieldCount( %temp ); - for ( %i = 0; %i < %count; %i += 2 ) - { - if ( %mapString !$= "" ) - %mapString = %mapString @ ", "; - - %device = getField( %temp, %i + 0 ); - %object = getField( %temp, %i + 1 ); - %mapString = %mapString @ getMapDisplayName( %device, %object ); - } - - return %name TAB %mapString; -} - -function OptionsDlg::fillRemapList( %this ) -{ - %remapList = %this-->OptRemapList; - - %remapList.clear(); - for ( %i = 0; %i < $RemapCount; %i++ ) - %remapList.addRow( %i, buildFullMapString( %i ) ); -} - -function OptionsDlg::doRemap( %this ) -{ - %remapList = %this-->OptRemapList; - - %selId = %remapList.getSelectedId(); - %name = $RemapName[%selId]; - - RemapDlg-->OptRemapText.setValue( "Re-bind \"" @ %name @ "\" to..." ); - OptRemapInputCtrl.index = %selId; - Canvas.pushDialog( RemapDlg ); -} - -function redoMapping( %device, %action, %cmd, %oldIndex, %newIndex ) -{ - //%actionMap.bind( %device, %action, $RemapCmd[%newIndex] ); - moveMap.bind( %device, %action, %cmd ); - - %remapList = %this-->OptRemapList; - %remapList.setRowById( %oldIndex, buildFullMapString( %oldIndex ) ); - %remapList.setRowById( %newIndex, buildFullMapString( %newIndex ) ); -} - -function findRemapCmdIndex( %command ) -{ - for ( %i = 0; %i < $RemapCount; %i++ ) - { - if ( %command $= $RemapCmd[%i] ) - return( %i ); - } - return( -1 ); -} - -/// This unbinds actions beyond %count associated to the -/// particular moveMap %commmand. -function unbindExtraActions( %command, %count ) -{ - %temp = moveMap.getBinding( %command ); - if ( %temp $= "" ) - return; - - %count = getFieldCount( %temp ) - ( %count * 2 ); - for ( %i = 0; %i < %count; %i += 2 ) - { - %device = getField( %temp, %i + 0 ); - %action = getField( %temp, %i + 1 ); - - moveMap.unbind( %device, %action ); - } -} - -function OptRemapInputCtrl::onInputEvent( %this, %device, %action ) -{ - //error( "** onInputEvent called - device = " @ %device @ ", action = " @ %action @ " **" ); - Canvas.popDialog( RemapDlg ); - - // Test for the reserved keystrokes: - if ( %device $= "keyboard" ) - { - // Cancel... - if ( %action $= "escape" ) - { - // Do nothing... - return; - } - } - - %cmd = $RemapCmd[%this.index]; - %name = $RemapName[%this.index]; - - // Grab the friendly display name for this action - // which we'll use when prompting the user below. - %mapName = getMapDisplayName( %device, %action ); - - // Get the current command this action is mapped to. - %prevMap = moveMap.getCommand( %device, %action ); - - // If nothing was mapped to the previous command - // mapping then it's easy... just bind it. - if ( %prevMap $= "" ) - { - unbindExtraActions( %cmd, 1 ); - moveMap.bind( %device, %action, %cmd ); - optionsDlg-->OptRemapList.setRowById( %this.index, buildFullMapString( %this.index ) ); - return; - } - - // If the previous command is the same as the - // current then they hit the same input as what - // was already assigned. - if ( %prevMap $= %cmd ) - { - unbindExtraActions( %cmd, 0 ); - moveMap.bind( %device, %action, %cmd ); - optionsDlg-->OptRemapList.setRowById( %this.index, buildFullMapString( %this.index ) ); - return; - } - - // Look for the index of the previous mapping. - %prevMapIndex = findRemapCmdIndex( %prevMap ); - - // If we get a negative index then the previous - // mapping was to an item that isn't included in - // the mapping list... so we cannot unmap it. - if ( %prevMapIndex == -1 ) - { - MessageBoxOK( "Remap Failed", "\"" @ %mapName @ "\" is already bound to a non-remappable command!" ); - return; - } - - // Setup the forced remapping callback command. - %callback = "redoMapping(" @ %device @ ", \"" @ %action @ "\", \"" @ - %cmd @ "\", " @ %prevMapIndex @ ", " @ %this.index @ ");"; - - // Warn that we're about to remove the old mapping and - // replace it with another. - %prevCmdName = $RemapName[%prevMapIndex]; - MessageBoxYesNo( "Warning", - "\"" @ %mapName @ "\" is already bound to \"" - @ %prevCmdName @ "\"!\nDo you wish to replace this mapping?", - %callback, "" ); -} - -$AudioTestHandle = 0; -// Description to use for playing the volume test sound. This isn't -// played with the description of the channel that has its volume changed -// because we know nothing about the playback state of the channel. If it -// is paused or stopped, the test sound would not play then. -$AudioTestDescription = new SFXDescription() -{ - sourceGroup = AudioChannelMaster; -}; - -function OptAudioUpdateMasterVolume( %volume ) -{ - if( %volume == $pref::SFX::masterVolume ) - return; - - sfxSetMasterVolume( %volume ); - $pref::SFX::masterVolume = %volume; - - if( !isObject( $AudioTestHandle ) ) - $AudioTestHandle = sfxPlayOnce( AudioChannel, "art/sound/ui/volumeTest.wav" ); -} - -function OptAudioUpdateChannelVolume( %description, %volume ) -{ - %channel = sfxGroupToOldChannel( %description.sourceGroup ); - - if( %volume == $pref::SFX::channelVolume[ %channel ] ) - return; - - sfxSetChannelVolume( %channel, %volume ); - $pref::SFX::channelVolume[ %channel ] = %volume; - - if( !isObject( $AudioTestHandle ) ) - { - $AudioTestDescription.volume = %volume; - $AudioTestHandle = sfxPlayOnce( $AudioTestDescription, "art/sound/ui/volumeTest.wav" ); - } -} - -function OptAudioProviderList::onSelect( %this, %id, %text ) -{ - // Skip empty provider selections. - if ( %text $= "" ) - return; - - $pref::SFX::provider = %text; - OptAudioDeviceList.clear(); - - %buffer = sfxGetAvailableDevices(); - %count = getRecordCount( %buffer ); - for(%i = 0; %i < %count; %i++) - { - %record = getRecord(%buffer, %i); - %provider = getField(%record, 0); - %device = getField(%record, 1); - - if (%provider !$= %text) - continue; - - if ( OptAudioDeviceList.findText( %device ) == -1 ) - OptAudioDeviceList.add( %device, %i ); - } - - // Find the previous selected device. - %selId = OptAudioDeviceList.findText($pref::SFX::device); - if ( %selId == -1 ) - OptAudioDeviceList.setFirstSelected(); - else - OptAudioDeviceList.setSelected( %selId ); -} - -function OptAudioDeviceList::onSelect( %this, %id, %text ) -{ - // Skip empty selections. - if ( %text $= "" ) - return; - - $pref::SFX::device = %text; - - if ( !sfxCreateDevice( $pref::SFX::provider, - $pref::SFX::device, - $pref::SFX::useHardware, - -1 ) ) - error( "Unable to create SFX device: " @ $pref::SFX::provider - SPC $pref::SFX::device - SPC $pref::SFX::useHardware ); -} - -function OptMouseSetSensitivity(%value) -{ - $pref::Input::LinkMouseSensitivity = %value; -} - -/* -function OptAudioHardwareToggle::onClick(%this) -{ - if (!sfxCreateDevice($pref::SFX::provider, $pref::SFX::device, $pref::SFX::useHardware, -1)) - error("Unable to create SFX device: " @ $pref::SFX::provider SPC $pref::SFX::device SPC $pref::SFX::useHardware); -} -*/ diff --git a/Templates/Empty/game/scripts/gui/playGui.cs b/Templates/Empty/game/scripts/gui/playGui.cs deleted file mode 100644 index 48b77d195..000000000 --- a/Templates/Empty/game/scripts/gui/playGui.cs +++ /dev/null @@ -1,80 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// PlayGui is the main TSControl through which the game is viewed. -// The PlayGui also contains the hud controls. -//----------------------------------------------------------------------------- - -function PlayGui::onWake(%this) -{ - // Turn off any shell sounds... - // sfxStop( ... ); - - $enableDirectInput = "1"; - activateDirectInput(); - - // Message hud dialog - if ( isObject( MainChatHud ) ) - { - Canvas.pushDialog( MainChatHud ); - chatHud.attach(HudMessageVector); - } - - // just update the action map here - moveMap.push(); - - // hack city - these controls are floating around and need to be clamped - if ( isFunction( "refreshCenterTextCtrl" ) ) - schedule(0, 0, "refreshCenterTextCtrl"); - if ( isFunction( "refreshBottomTextCtrl" ) ) - schedule(0, 0, "refreshBottomTextCtrl"); -} - -function PlayGui::onSleep(%this) -{ - if ( isObject( MainChatHud ) ) - Canvas.popDialog( MainChatHud ); - - // pop the keymaps - moveMap.pop(); -} - -function PlayGui::clearHud( %this ) -{ - Canvas.popDialog( MainChatHud ); - - while ( %this.getCount() > 0 ) - %this.getObject( 0 ).delete(); -} - -//----------------------------------------------------------------------------- - -function refreshBottomTextCtrl() -{ - BottomPrintText.position = "0 0"; -} - -function refreshCenterTextCtrl() -{ - CenterPrintText.position = "0 0"; -} diff --git a/Templates/Empty/game/scripts/main.cs b/Templates/Empty/game/scripts/main.cs deleted file mode 100644 index eea2e916b..000000000 --- a/Templates/Empty/game/scripts/main.cs +++ /dev/null @@ -1,142 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -// Load up core script base -loadDir("core"); // Should be loaded at a higher level, but for now leave -- SRZ 11/29/07 - -//----------------------------------------------------------------------------- -// Package overrides to initialize the mod. -package fps { - -function displayHelp() { - Parent::displayHelp(); - error( - "Fps Mod options:\n"@ - " -dedicated Start as dedicated server\n"@ - " -connect
For non-dedicated: Connect to a game at
\n" @ - " -mission For dedicated: Load the mission\n" - ); -} - -function parseArgs() -{ - // Call the parent - Parent::parseArgs(); - - // Arguments, which override everything else. - for (%i = 1; %i < $Game::argc ; %i++) - { - %arg = $Game::argv[%i]; - %nextArg = $Game::argv[%i+1]; - %hasNextArg = $Game::argc - %i > 1; - - switch$ (%arg) - { - //-------------------- - case "-dedicated": - $Server::Dedicated = true; - enableWinConsole(true); - $argUsed[%i]++; - - //-------------------- - case "-mission": - $argUsed[%i]++; - if (%hasNextArg) { - $missionArg = %nextArg; - $argUsed[%i+1]++; - %i++; - } - else - error("Error: Missing Command Line argument. Usage: -mission "); - - //-------------------- - case "-connect": - $argUsed[%i]++; - if (%hasNextArg) { - $JoinGameAddress = %nextArg; - $argUsed[%i+1]++; - %i++; - } - else - error("Error: Missing Command Line argument. Usage: -connect "); - } - } -} - -function onStart() -{ - // The core does initialization which requires some of - // the preferences to loaded... so do that first. - exec( "./client/defaults.cs" ); - exec( "./server/defaults.cs" ); - - Parent::onStart(); - echo("\n--------- Initializing Directory: scripts ---------"); - - // Load the scripts that start it all... - exec("./client/init.cs"); - exec("./server/init.cs"); - - // Init the physics plugin. - physicsInit(); - - // Start up the audio system. - sfxStartup(); - - // Server gets loaded for all sessions, since clients - // can host in-game servers. - initServer(); - - // Start up in either client, or dedicated server mode - if ($Server::Dedicated) - initDedicated(); - else - initClient(); -} - -function onExit() -{ - // Ensure that we are disconnected and/or the server is destroyed. - // This prevents crashes due to the SceneGraph being deleted before - // the objects it contains. - if ($Server::Dedicated) - destroyServer(); - else - disconnect(); - - // Destroy the physics plugin. - physicsDestroy(); - - echo("Exporting client prefs"); - export("$pref::*", "./client/prefs.cs", False); - - echo("Exporting server prefs"); - export("$Pref::Server::*", "./server/prefs.cs", False); - BanList::Export("./server/banlist.cs"); - - Parent::onExit(); -} - -}; // package fps - -// Activate the game package. -activatePackage(fps); diff --git a/Templates/Empty/game/scripts/server/VolumetricFog.cs b/Templates/Empty/game/scripts/server/VolumetricFog.cs deleted file mode 100644 index 53e03adf3..000000000 --- a/Templates/Empty/game/scripts/server/VolumetricFog.cs +++ /dev/null @@ -1,106 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -function VolumetricFog::onEnterFog(%this,%obj) -{ - // This method is called whenever the control object (Camera or Player) - // %obj enters the fog area. - - // echo("Control Object " @ %obj @ " enters fog " @ %this); -} - -function VolumetricFog::onLeaveFog(%this,%obj) -{ - // This method is called whenever the control object (Camera or Player) - // %obj leaves the fog area. - - // echo("Control Object " @ %obj @ " left fog " @ %this); -} - -function VolumetricFog::Dissolve(%this,%speed,%delete) -{ - // This method dissolves the fog at speed milliseconds - %this.isBuilding = true; - if (%this.FogDensity > 0) - { - %this.setFogDensity(%this.FogDensity - 0.005); - %this.schedule(%speed,Dissolve,%speed,%delete); - } - else - { - %this.isBuilding = false; - %this.SetFogDensity(0.0); - if (%delete !$= "" && %delete !$="0" && %delete !$="false") - %this.schedule(250,delete); - } -} - -function VolumetricFog::Thicken(%this,%speed, %end_density) -{ - // This method thickens the fog at speed milliseconds to a density of %end_density - - %this.isBuilding = true; - if (%this.FogDensity + 0.005 < %end_density) - { - %this.setFogDensity(%this.FogDensity + 0.005); - %this.schedule(%speed,Thicken,%speed, %end_density); - } - else - { - %this.setFogDensity(%end_density); - %this.isBuilding = false; - } -} - -function GenerateFog(%pos,%scale,%color,%density) -{ - // This function can be used to generate some fog caused by massive gunfire etc. - // Change shape and modulation data to your likings. - - %fog=new VolumetricFog() { - shapeName = "art/environment/Fog_Sphere.dts"; - fogColor = %color; - fogDensity = "0.0"; - ignoreWater = "0"; - MinSize = "250"; - FadeSize = "750"; - texture = "art/environment/FogMod_heavy.dds"; - tiles = "1"; - modStrength = "0.2"; - PrimSpeed = "-0.01 0.04"; - SecSpeed = "0.02 0.02"; - position = %pos; - rotation = "0 0 1 20.354"; - scale = %scale; - canSave = "1"; - canSaveDynamicFields = "1"; - }; - - if (isObject(%fog)) - { - MissionCleanup.add(%fog); - - %fog.Thicken(500,%density); - } - - return %fog; -} \ No newline at end of file diff --git a/Templates/Empty/game/scripts/server/defaults.cs b/Templates/Empty/game/scripts/server/defaults.cs deleted file mode 100644 index bc3ce3b34..000000000 --- a/Templates/Empty/game/scripts/server/defaults.cs +++ /dev/null @@ -1,43 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -// First we execute the core default preferences. -exec( "core/scripts/server/defaults.cs" ); - - -// Now add your own game specific server preferences as -// well as any overloaded core defaults here. - - - - -// Finally load the preferences saved from the last -// game execution if they exist. -if ( $platform !$= "xenon" ) -{ - if ( isFile( "./prefs.cs" ) ) - exec( "./prefs.cs" ); -} -else -{ - echo( "Not loading server prefs.cs on Xbox360" ); -} diff --git a/Templates/Empty/game/scripts/server/game.cs b/Templates/Empty/game/scripts/server/game.cs deleted file mode 100644 index d9529ca01..000000000 --- a/Templates/Empty/game/scripts/server/game.cs +++ /dev/null @@ -1,234 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// What kind of "player" is spawned is either controlled directly by the -// SpawnSphere or it defaults back to the values set here. This also controls -// which SimGroups to attempt to select the spawn sphere's from by walking down -// the list of SpawnGroups till it finds a valid spawn object. -// These override the values set in core/scripts/server/spawn.cs -//----------------------------------------------------------------------------- - -// Leave $Game::defaultPlayerClass and $Game::defaultPlayerDataBlock as empty strings ("") -// to spawn a the $Game::defaultCameraClass as the control object. -$Game::DefaultPlayerClass = ""; -$Game::DefaultPlayerDataBlock = ""; -$Game::DefaultPlayerSpawnGroups = "CameraSpawnPoints PlayerSpawnPoints PlayerDropPoints"; - -//----------------------------------------------------------------------------- -// What kind of "camera" is spawned is either controlled directly by the -// SpawnSphere or it defaults back to the values set here. This also controls -// which SimGroups to attempt to select the spawn sphere's from by walking down -// the list of SpawnGroups till it finds a valid spawn object. -// These override the values set in core/scripts/server/spawn.cs -//----------------------------------------------------------------------------- -$Game::DefaultCameraClass = "Camera"; -$Game::DefaultCameraDataBlock = "Observer"; -$Game::DefaultCameraSpawnGroups = "CameraSpawnPoints PlayerSpawnPoints PlayerDropPoints"; - -// Global movement speed that affects all Cameras -$Camera::MovementSpeed = 30; - -//----------------------------------------------------------------------------- -// GameConnection manages the communication between the server's world and the -// client's simulation. These functions are responsible for maintaining the -// client's camera and player objects. -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// This is the main entry point for spawning a control object for the client. -// The control object is the actual game object that the client is responsible -// for controlling in the client and server simulations. We also spawn a -// convenient camera object for use as an alternate control object. We do not -// have to spawn this camera object in order to function in the simulation. -// -// Called for each client after it's finished downloading the mission and is -// ready to start playing. -//----------------------------------------------------------------------------- -function GameConnection::onClientEnterGame(%this) -{ - // This function currently relies on some helper functions defined in - // core/scripts/spawn.cs. For custom spawn behaviors one can either - // override the properties on the SpawnSphere's or directly override the - // functions themselves. - - // Find a spawn point for the camera - %cameraSpawnPoint = pickCameraSpawnPoint($Game::DefaultCameraSpawnGroups); - // Spawn a camera for this client using the found %spawnPoint - %this.spawnCamera(%cameraSpawnPoint); - - // Find a spawn point for the player - %playerSpawnPoint = pickPlayerSpawnPoint($Game::DefaultPlayerSpawnGroups); - // Spawn a camera for this client using the found %spawnPoint - %this.spawnPlayer(%playerSpawnPoint); -} - -//----------------------------------------------------------------------------- -// Clean up the client's control objects -//----------------------------------------------------------------------------- -function GameConnection::onClientLeaveGame(%this) -{ - // Cleanup the camera - if (isObject(%this.camera)) - %this.camera.delete(); - // Cleanup the player - if (isObject(%this.player)) - %this.player.delete(); -} - -//----------------------------------------------------------------------------- -// Handle a player's death -//----------------------------------------------------------------------------- -function GameConnection::onDeath(%this, %sourceObject, %sourceClient, %damageType, %damLoc) -{ - // Clear out the name on the corpse - if (isObject(%this.player)) - { - if (%this.player.isMethod("setShapeName")) - %this.player.setShapeName(""); - } - - // Switch the client over to the death cam - if (isObject(%this.camera) && isObject(%this.player)) - { - %this.camera.setMode("Corpse", %this.player); - %this.setControlObject(%this.camera); - } - - // Unhook the player object - %this.player = 0; -} - -//----------------------------------------------------------------------------- -// Server, mission, and game management -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// The server has started up so do some game start up -//----------------------------------------------------------------------------- -function onServerCreated() -{ - // Server::GameType is sent to the master server. - // This variable should uniquely identify your game and/or mod. - $Server::GameType = "Torque 3D"; - - // Server::MissionType sent to the master server. Clients can - // filter servers based on mission type. - $Server::MissionType = "pureLIGHT"; - - // GameStartTime is the sim time the game started. Used to calculated - // game elapsed time. - $Game::StartTime = 0; - - // Create the server physics world. - physicsInitWorld( "server" ); - - // Load up any objects or datablocks saved to the editor managed scripts - %datablockFiles = new ArrayObject(); - %datablockFiles.add( "art/ribbons/ribbonExec.cs" ); - %datablockFiles.add( "art/particles/managedParticleData.cs" ); - %datablockFiles.add( "art/particles/managedParticleEmitterData.cs" ); - %datablockFiles.add( "art/decals/managedDecalData.cs" ); - %datablockFiles.add( "art/datablocks/managedDatablocks.cs" ); - %datablockFiles.add( "art/forest/managedItemData.cs" ); - %datablockFiles.add( "art/datablocks/datablockExec.cs" ); - loadDatablockFiles( %datablockFiles, true ); - - // Run the other gameplay scripts in this folder - exec("./scriptExec.cs"); - - // Keep track of when the game started - $Game::StartTime = $Sim::Time; -} - -//----------------------------------------------------------------------------- -// This function is called as part of a server shutdown -//----------------------------------------------------------------------------- -function onServerDestroyed() -{ - // Destroy the server physcis world - physicsDestroyWorld( "server" ); -} - -//----------------------------------------------------------------------------- -// Called by loadMission() once the mission is finished loading -//----------------------------------------------------------------------------- -function onMissionLoaded() -{ - // Start the server side physics simulation - physicsStartSimulation( "server" ); - - // Nothing special for now, just start up the game play - startGame(); -} - -//----------------------------------------------------------------------------- -// Called by endMission(), right before the mission is destroyed -//----------------------------------------------------------------------------- -function onMissionEnded() -{ - // Stop the server physics simulation - physicsStopSimulation( "server" ); - - // Normally the game should be ended first before the next - // mission is loaded, this is here in case loadMission has been - // called directly. The mission will be ended if the server - // is destroyed, so we only need to cleanup here. - $Game::Running = false; -} - -//----------------------------------------------------------------------------- -// Called once the game has started -//----------------------------------------------------------------------------- -function startGame() -{ - if ($Game::Running) - { - error("startGame(): End the game first!"); - return; - } - - $Game::Running = true; -} - -//----------------------------------------------------------------------------- -// Called once the game has ended -//----------------------------------------------------------------------------- -function endGame() -{ - if (!$Game::Running) - { - error("endGame(): No game running!"); - return; - } - - // Inform the client the game is over - for( %clientIndex = 0; %clientIndex < ClientGroup.getCount(); %clientIndex++ ) - { - %cl = ClientGroup.getObject( %clientIndex ); - commandToClient(%cl, 'GameEnd'); - } - - // Delete all the temporary mission objects - resetMission(); - $Game::Running = false; -} diff --git a/Templates/Empty/game/scripts/server/init.cs b/Templates/Empty/game/scripts/server/init.cs deleted file mode 100644 index 827bb5b93..000000000 --- a/Templates/Empty/game/scripts/server/init.cs +++ /dev/null @@ -1,96 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- - -// Variables used by server scripts & code. The ones marked with (c) -// are accessed from code. Variables preceeded by Pref:: are server -// preferences and stored automatically in the ServerPrefs.cs file -// in between server sessions. -// -// (c) Server::ServerType {SinglePlayer, MultiPlayer} -// (c) Server::GameType Unique game name -// (c) Server::Dedicated Bool -// ( ) Server::MissionFile Mission .mis file name -// (c) Server::MissionName DisplayName from .mis file -// (c) Server::MissionType Not used -// (c) Server::PlayerCount Current player count -// (c) Server::GuidList Player GUID (record list?) -// (c) Server::Status Current server status -// -// (c) Pref::Server::Name Server Name -// (c) Pref::Server::Password Password for client connections -// ( ) Pref::Server::AdminPassword Password for client admins -// (c) Pref::Server::Info Server description -// (c) Pref::Server::MaxPlayers Max allowed players -// (c) Pref::Server::RegionMask Registers this mask with master server -// ( ) Pref::Server::BanTime Duration of a player ban -// ( ) Pref::Server::KickBanTime Duration of a player kick & ban -// ( ) Pref::Server::MaxChatLen Max chat message len -// ( ) Pref::Server::FloodProtectionEnabled Bool - -//----------------------------------------------------------------------------- - - -//----------------------------------------------------------------------------- - -function initServer() -{ - echo("\n--------- Initializing " @ $appName @ ": Server Scripts ---------"); - - // Server::Status is returned in the Game Info Query and represents the - // current status of the server. This string sould be very short. - $Server::Status = "Unknown"; - - // Turn on testing/debug script functions - $Server::TestCheats = false; - - // Specify where the mission files are. - $Server::MissionFileSpec = "levels/*.mis"; - - // The common module provides the basic server functionality - initBaseServer(); - - // Load up game server support scripts - exec("./commands.cs"); - exec("./game.cs"); -} - - -//----------------------------------------------------------------------------- - -function initDedicated() -{ - enableWinConsole(true); - echo("\n--------- Starting Dedicated Server ---------"); - - // Make sure this variable reflects the correct state. - $Server::Dedicated = true; - - // The server isn't started unless a mission has been specified. - if ($missionArg !$= "") { - createServer("MultiPlayer", $missionArg); - } - else - echo("No mission specified (use -mission filename)"); -} - diff --git a/Templates/Empty/game/scripts/server/scriptExec.cs b/Templates/Empty/game/scripts/server/scriptExec.cs deleted file mode 100644 index 77a5d8d27..000000000 --- a/Templates/Empty/game/scripts/server/scriptExec.cs +++ /dev/null @@ -1,25 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -// Load up all scripts. This function is called when -// a server is constructed. -exec("./VolumetricFog.cs"); \ No newline at end of file diff --git a/Templates/Empty/game/shaders/.gitignore b/Templates/Empty/game/shaders/.gitignore deleted file mode 100644 index 5baa4d384..000000000 --- a/Templates/Empty/game/shaders/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/procedural/ diff --git a/Templates/Empty/game/shaders/procedural/.gitignore b/Templates/Empty/game/shaders/procedural/.gitignore deleted file mode 100644 index 1bc0e838a..000000000 --- a/Templates/Empty/game/shaders/procedural/.gitignore +++ /dev/null @@ -1 +0,0 @@ -# Keep directory in git repo diff --git a/Templates/Empty/game/tools/editorClasses/scripts/platform/.gitignore b/Templates/Empty/game/tools/editorClasses/scripts/platform/.gitignore deleted file mode 100644 index 1bc0e838a..000000000 --- a/Templates/Empty/game/tools/editorClasses/scripts/platform/.gitignore +++ /dev/null @@ -1 +0,0 @@ -# Keep directory in git repo diff --git a/Templates/Empty/game/tools/gui/images/crosshair.png b/Templates/Empty/game/tools/gui/images/crosshair.png deleted file mode 100644 index 06bcf5c6c..000000000 Binary files a/Templates/Empty/game/tools/gui/images/crosshair.png and /dev/null differ diff --git a/Templates/Empty/game/tools/gui/images/crosshair_blue.png b/Templates/Empty/game/tools/gui/images/crosshair_blue.png deleted file mode 100644 index d5b0485d7..000000000 Binary files a/Templates/Empty/game/tools/gui/images/crosshair_blue.png and /dev/null differ diff --git a/Templates/Empty/game/tools/gui/images/treeview/default.png b/Templates/Empty/game/tools/gui/images/treeview/default.png deleted file mode 100644 index ceadfa861..000000000 Binary files a/Templates/Empty/game/tools/gui/images/treeview/default.png and /dev/null differ diff --git a/Templates/Empty/game/tools/gui/images/treeview/hidden.png b/Templates/Empty/game/tools/gui/images/treeview/hidden.png deleted file mode 100644 index 0fbcf3840..000000000 Binary files a/Templates/Empty/game/tools/gui/images/treeview/hidden.png and /dev/null differ diff --git a/Templates/Empty/game/tools/resources/.gitignore b/Templates/Empty/game/tools/resources/.gitignore deleted file mode 100644 index 1bc0e838a..000000000 --- a/Templates/Empty/game/tools/resources/.gitignore +++ /dev/null @@ -1 +0,0 @@ -# Keep directory in git repo diff --git a/Templates/Empty/game/web/getplugin.jpg b/Templates/Empty/game/web/getplugin.jpg deleted file mode 100644 index 9881868cc..000000000 Binary files a/Templates/Empty/game/web/getplugin.jpg and /dev/null differ diff --git a/Templates/Empty/game/web/jquery-1.3.2.min.js b/Templates/Empty/game/web/jquery-1.3.2.min.js deleted file mode 100644 index b1ae21d8b..000000000 --- a/Templates/Empty/game/web/jquery-1.3.2.min.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * jQuery JavaScript Library v1.3.2 - * http://jquery.com/ - * - * Copyright (c) 2009 John Resig - * Dual licensed under the MIT and GPL licenses. - * http://docs.jquery.com/License - * - * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) - * Revision: 6246 - */ -(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("",""]||!O.indexOf("",""]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
"]||!O.indexOf("",""]||(!O.indexOf("",""]||!O.indexOf("",""]||!o.support.htmlSerialize&&[1,"div
","
"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); -/* - * Sizzle CSS Selector Engine - v0.9.3 - * Copyright 2009, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * More information: http://sizzlejs.com/ - */ -(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return UT[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="

";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="
";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("
").append(M.responseText.replace(//g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='
';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); \ No newline at end of file diff --git a/Templates/Empty/game/web/sample.html b/Templates/Empty/game/web/sample.html deleted file mode 100644 index 599566cfb..000000000 --- a/Templates/Empty/game/web/sample.html +++ /dev/null @@ -1,259 +0,0 @@ - - - - - - - - - - - - - - - - - - - -
-
-
Web Game Template
-
- -
-
(Press ESC to show the mouse cursor if hidden)
-
-
- - \ No newline at end of file diff --git a/Templates/Empty/game/web/styles.css b/Templates/Empty/game/web/styles.css deleted file mode 100644 index 4cabf802e..000000000 --- a/Templates/Empty/game/web/styles.css +++ /dev/null @@ -1,35 +0,0 @@ -body { - background-position: top center; - background-color: White; - margin: 0px; - text-align: center; /* for IE */ - font-size: 18px; - color: #FFFFFF; -} - -#torqueLogo { - position: absolute; - left: 0px; - margin-top: 2px; -} - -div#main { - width: 802px; - margin: 0px auto; - color: black; - font-weight: bold; - font-size: 22px; - font-family: Arial; - text-align: left; /* counter the body center */ -} - -div#gameobject { - margin: 18px 0px 18px; - border:1px solid #393E42; - width: 800px; - height: 600px; -} - - - - diff --git a/Templates/Empty/game/web/torque3D_logo.jpg b/Templates/Empty/game/web/torque3D_logo.jpg deleted file mode 100644 index 15d259de5..000000000 Binary files a/Templates/Empty/game/web/torque3D_logo.jpg and /dev/null differ diff --git a/Templates/Empty/generateProjects.bat b/Templates/Empty/generateProjects.bat deleted file mode 100644 index 9e43263dd..000000000 --- a/Templates/Empty/generateProjects.bat +++ /dev/null @@ -1,19 +0,0 @@ -@echo off -setlocal - -SET TORQUEDIR=%2 -IF NOT DEFINED TORQUEDIR SET TORQUEDIR=..\.. - -%TORQUEDIR%\engine\bin\php\php %TORQUEDIR%\Tools\projectGenerator\projectGenerator.php buildFiles/config/project.conf %TORQUEDIR% - -endlocal - -if X%1 == X ( - - echo. - echo REMEMBER: Restart VisualStudio if you are running it to be sure the new - echo project files are loaded! See docs for more info! - echo. - - pause -) diff --git a/Templates/Empty/generateProjects.command b/Templates/Empty/generateProjects.command deleted file mode 100755 index 2b980b6e0..000000000 --- a/Templates/Empty/generateProjects.command +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -cd "`dirname "$0"`" - -OS=`uname` - -if [ "$OS" = "Darwin" ]; then - /usr/bin/php ../../Tools/projectGenerator/projectGenerator.php buildFiles/config/project.mac.conf -else - /usr/bin/php ../../Tools/projectGenerator/projectGenerator.php buildFiles/config/project.linux.conf - /usr/bin/php ../../Tools/projectGenerator/projectGenerator.php buildFiles/config/project.linux_ded.conf -fi diff --git a/Templates/Empty/thumb.png b/Templates/Empty/thumb.png deleted file mode 100644 index 739b71ef0..000000000 Binary files a/Templates/Empty/thumb.png and /dev/null differ diff --git a/Templates/Empty/web/source/activex/IEWebGameCtrl.bmp b/Templates/Empty/web/source/activex/IEWebGameCtrl.bmp deleted file mode 100644 index 122976492..000000000 Binary files a/Templates/Empty/web/source/activex/IEWebGameCtrl.bmp and /dev/null differ diff --git a/Templates/Empty/web/source/activex/IEWebGameCtrl.cpp b/Templates/Empty/web/source/activex/IEWebGameCtrl.cpp deleted file mode 100644 index 2229e33bf..000000000 --- a/Templates/Empty/web/source/activex/IEWebGameCtrl.cpp +++ /dev/null @@ -1,482 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -#include "stdafx.h" -#include "IEWebGameCtrl.h" - -#include "../common/webCommon.h" - -// CIEWebGameCtrl (one and only one instance please) -CIEWebGameCtrl* CIEWebGameCtrl::sInstance = NULL; - -// Javascript accessible methods - -// plugin.getVariable("$MyVariable"); - get a Torque 3D console variable -STDMETHODIMP CIEWebGameCtrl::getVariable(BSTR name, BSTR* value) -{ - std::wstring wstr; - std::string sstr; - const char* astr; - - wstr.assign(name); - sstr = WebCommon::WStringToString(wstr); - astr = sstr.c_str(); - - const char* avalue = NULL; - char vinfo[256]; - vinfo[0] = 0; - - // requesting the version information - if (!_stricmp(astr, "$version")) - { - char plugin[4096]; - - GetModuleFileNameA(WebCommon::gPluginModule, plugin, 4096); - DWORD dwHandle = 0; - DWORD dwSize = GetFileVersionInfoSizeA(plugin, &dwHandle); - if (dwSize >= 0) - { - LPBYTE lpInfo = new BYTE[dwSize]; - ZeroMemory(lpInfo, dwSize); - if(GetFileVersionInfoA(plugin, 0, dwSize, lpInfo)) - { - UINT valLen = MAX_PATH; - LPVOID valPtr = NULL; - if(::VerQueryValue(lpInfo, - TEXT("\\"), - &valPtr, - &valLen)) - { - VS_FIXEDFILEINFO* pFinfo = (VS_FIXEDFILEINFO*)valPtr; - - sprintf(vinfo, "%i.%i", (pFinfo->dwProductVersionMS >> 16) & 0xFF, (pFinfo->dwFileVersionMS) & 0xFF); - - } - } - delete[] lpInfo; - } - - if (!vinfo[0]) - strcpy(vinfo, "-1"); - - - avalue = vinfo; - - } - else - avalue = WebCommon::GetVariable(astr); - - sstr = avalue; - wstr = WebCommon::StringToWString(sstr); - - *value = SysAllocString(wstr.c_str()); - - return S_OK; -} - - -// plugin.setVariable("$MyVariable", 42); - set a Torque 3D console variable -STDMETHODIMP CIEWebGameCtrl::setVariable(BSTR name, BSTR value) -{ - std::wstring wstr; - std::string nstr, vstr; - const char* vname; - const char* vvalue; - - wstr.assign(name); - nstr = WebCommon::WStringToString(wstr); - vname = nstr.c_str(); - - wstr.assign(value); - vstr = WebCommon::WStringToString(wstr); - vvalue = vstr.c_str(); - - WebCommon::SetVariable(vname, vvalue); - - return S_OK; -} - - -// plugin.startup(); - called once web page is fully loaded and plugin (including Torque 3D) is initialized -STDMETHODIMP CIEWebGameCtrl::startup() -{ - - mInitialized = true; - std::vector::iterator i; - for (i = mJavaScriptExports.begin(); i != mJavaScriptExports.end();i++) - { - internalExportFunction(*i); - } - - WebCommon::AddSecureFunctions(); - - return S_OK; -} - -// var result = plugin.callScript("mySecureFunction('one', 'two', 'three');"); - call a TorqueScript function marked as secure in webConfig.h with supplied arguments -// includes function parser -STDMETHODIMP CIEWebGameCtrl::callScript(BSTR code, BSTR* value) -{ - std::wstring wcode; - std::string scode; - wcode.assign(code); - scode = WebCommon::WStringToString(wcode); - const char* sig = scode.c_str(); - - // do not allow large strings which could be used maliciously - if (scode.length() > 255 || !mInitialized) - { - *value = SysAllocString(L""); - return E_INVALIDARG; - } - - // data buffers for laying out data in a Torque 3D console friendly manner - char nameSpace[256]; - char fname[256]; - char argv[256][256]; - char* argvv[256]; - int argc = 0; - unsigned int argBegin = 0; - - memset(nameSpace, 0, 256); - memset(fname, 0, 256); - memset(argv, 0, 256 * 256); - - for (unsigned int i = 0; i < scode.length(); i++) - { - if (sig[i] == ')' || sig[i] == ';') - { - //scan out last arg is any - char dummy[256]; - memset(dummy, 0, 256); - - WebCommon::StringCopy(dummy, &sig[argBegin], i - argBegin); - - if (strlen(dummy)) - { - strcpy_s(argv[argc], dummy); - argvv[argc] = argv[argc]; - argc++; - } - - break; // done - } - - // namespace - if (sig[i]==':') - { - if (nameSpace[0] || fname[0]) - { - *value = SysAllocString(L""); - return E_INVALIDARG; - } - - if (i > 0 && sig[i-1] == ':') - { - if (i - 2 > 0) - WebCommon::StringCopy(nameSpace, sig, i - 1); - } - - continue; - } - - // args begin - if (sig[i] == '(' ) - { - if (fname[0] || i < 1) - { - *value = SysAllocString(L""); - return E_INVALIDARG; - } - - //everything before this is function name, minus nameSpace - if (nameSpace[0]) - { - int nlen = strlen(nameSpace); - WebCommon::StringCopy(fname, &sig[nlen + 2], i - nlen - 2); - } - else - { - WebCommon::StringCopy(fname, sig, i); - } - - WebCommon::StringCopy(argv[0], fname, strlen(fname)+1); - argvv[0] = argv[0]; - argc++; - - argBegin = i + 1; - } - - // args - if (sig[i] == ',' ) - { - if (argBegin >= i || argc == 255) - { - *value = SysAllocString(L""); - return E_INVALIDARG; - } - - WebCommon::StringCopy(argv[argc], &sig[argBegin], i - argBegin); - argvv[argc] = argv[argc]; - - argc++; - argBegin = i + 1; - } - - } - - const char* retVal; - std::string sretVal; - std::wstring wretVal; - - if (fname[0]) - { - // call into the Torque 3D shared library (console system) and get return value - retVal = torque_callsecurefunction(nameSpace, fname, argc, (const char **) argvv); - - sretVal= retVal; - wretVal = WebCommon::StringToWString(sretVal); - - *value = SysAllocString(wretVal.c_str()); - } - else - { - *value = SysAllocString(L""); - return E_INVALIDARG; - } - - return S_OK; -} - -// the sole entry point for Torque 3D console system into our browser plugin (handed over as a function pointer) -static const char * MyStringCallback(void *obj, int argc, const char* argv[]) -{ - static char ret[4096]; - strcpy_s(ret,CIEWebGameCtrl::sInstance->callFunction(argv[0], argc, argv)); - return ret; -} - -// Get the location we're loading the plugin from (http://, file://) including address -// this is used by the domain locking feature to ensure that your plugin is only -// being used from your web site -bool CIEWebGameCtrl::checkDomain() -{ - HRESULT hrResult = S_FALSE; - IMoniker* pMoniker = NULL; - LPOLESTR sDisplayName; - - hrResult = m_spClientSite->GetMoniker(OLEGETMONIKER_TEMPFORUSER, - OLEWHICHMK_CONTAINER, - &pMoniker); - - if(SUCCEEDED(hrResult)) - { - hrResult = pMoniker->GetDisplayName(NULL, - NULL, - &sDisplayName); - pMoniker->Release(); - - std::wstring wstr; - std::string sstr; - - wstr.assign(sDisplayName); - sstr = WebCommon::WStringToString(wstr); - - return WebCommon::CheckDomain(sstr.c_str()); - } - - return false; -} - -// handles TorqueScript -> Javascript calling including return value -const char* CIEWebGameCtrl::callFunction(const char* name, LONG numArguments, const char* argv[]) -{ - - //sanity - if (numArguments > 200) - return ""; - - // A bunch of COM'esque stuff to which ultimately boils down to finding a Javascript function on the page - - HRESULT hr; - - LPOLECONTAINER pContainer; - IHTMLDocument* pHTML = NULL; - CComPtr pScript; - CComQIPtr pWin; - - - if (!m_spClientSite) - return ""; - - hr = m_spClientSite->GetContainer(&pContainer); - - if (FAILED(hr)) - { - return ""; - } - - hr = pContainer->QueryInterface(IID_IHTMLDocument, (void - **)&pHTML); - - if (FAILED(hr)) - { - pContainer->Release(); - return ""; - } - - hr = pHTML->get_Script(&pScript); - - if (FAILED(hr)) - { - pContainer->Release(); - pHTML->Release(); - return ""; - } - - DISPID idMethod = 0; - std::string smethod = name; - std::wstring wmethod = WebCommon::StringToWString(smethod); - OLECHAR FAR* sMethod = (OLECHAR FAR*)wmethod.c_str(); - hr = pScript->GetIDsOfNames(IID_NULL, &sMethod, 1, LOCALE_SYSTEM_DEFAULT,&idMethod); - - if (FAILED(hr)) - { - pContainer->Release(); - pHTML->Release(); - return ""; - } - - // setup arguments and return value variants - - VARIANT pVarRet = {0}; - - VariantInit(&pVarRet); - - if (numArguments <= 1) - { - DISPPARAMS dpNoArgs = {NULL, NULL, 0, 0}; - hr = pScript->Invoke(idMethod, IID_NULL, LOCALE_SYSTEM_DEFAULT, DISPATCH_METHOD, - &dpNoArgs, &pVarRet, NULL, NULL); - } - else - { - DISPPARAMS params; - VARIANTARG args[256]; - std::wstring wargs[256]; - - for (LONG i = 0; i < numArguments - 1; i++ ) - { - VariantInit(&args[i]); - // Invoke wants these in reverse order - std::string s = argv[numArguments - i - 1]; - wargs[i] = WebCommon::StringToWString(s); - args[i].vt = VT_BSTR; - args[i].bstrVal = SysAllocString(wargs[i].c_str()); - } - - params.cArgs = numArguments - 1; - params.rgdispidNamedArgs = NULL; - params.cNamedArgs = 0; - params.rgvarg = args; - - // whew, actually call the Javascript - hr = pScript->Invoke(idMethod, IID_NULL, LOCALE_SYSTEM_DEFAULT, DISPATCH_METHOD, - ¶ms, &pVarRet, NULL, NULL); - - for (LONG i = 0; i < numArguments - 1; i++ ) - { - SysFreeString(args[i].bstrVal); - } - - } - - if (FAILED(hr)) - { - pContainer->Release(); - pHTML->Release(); - return ""; - } - - VariantChangeType(&pVarRet, &pVarRet, 0, VT_BSTR); - - std::wstring wstr; - std::string sstr; - static char ret[4096]; - - wstr.assign(pVarRet.bstrVal); - sstr = WebCommon::WStringToString(wstr); - strcpy_s(ret, sstr.c_str()); - - pContainer->Release(); - pHTML->Release(); - - return ret; - -} - -// handle the actual export (once we're actually all ready to go) -void CIEWebGameCtrl::internalExportFunction(const JavasScriptExport& jsexport) -{ - torque_exportstringcallback(MyStringCallback,"JS",jsexport.jsCallback.c_str(),"",jsexport.numArguments,jsexport.numArguments); -} - -// plugin.exportFunction("MyJavascriptFunction",3); - export a Javascript function to the Torque 3D console system via its name and argument count -// If we haven't initialized Torque 3D yet, cache it -STDMETHODIMP CIEWebGameCtrl::exportFunction(BSTR callback, LONG numArguments) -{ - JavasScriptExport jsexport; - std::wstring wstr; - - wstr.assign(callback); - jsexport.jsCallback = WebCommon::WStringToString(wstr); - jsexport.numArguments = numArguments; - - if (!mInitialized) - { - //queue it up - mJavaScriptExports.push_back(jsexport); - } - else - { - internalExportFunction(jsexport); - } - - return S_OK; -} - - -// Our web deployment is installer based, no code signing necessary -STDMETHODIMP CIEWebGameCtrl::GetInterfaceSafetyOptions(REFIID riid, - DWORD *pdwSupportedOptions,DWORD *pdwEnabledOptions) -{ - return S_OK; -} - -STDMETHODIMP CIEWebGameCtrl::SetInterfaceSafetyOptions(REFIID riid, - DWORD dwOptionSetMask,DWORD dwEnabledOptions) -{ - return S_OK; -} - - - diff --git a/Templates/Empty/web/source/activex/IEWebGameCtrl.h b/Templates/Empty/web/source/activex/IEWebGameCtrl.h deleted file mode 100644 index 801f6743c..000000000 --- a/Templates/Empty/web/source/activex/IEWebGameCtrl.h +++ /dev/null @@ -1,177 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -// Torque 3D web deployment for Internet Explorer (ActiveX) - -#pragma once -#include "resource.h" // main symbols -#include -#include "IEWebGamePlugin_i.h" -#include "IEWebGameWindow.h" - -#if defined(_WIN32_WCE) && !defined(_CE_DCOM) && !defined(_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA) -#error "Single-threaded COM objects are not properly supported on Windows CE platform, such as the Windows Mobile platforms that do not include full DCOM support. Define _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA to force ATL to support creating single-thread COM object's and allow use of it's single-threaded COM object implementations. The threading model in your rgs file was set to 'Free' as that is the only threading model supported in non DCOM Windows CE platforms." -#endif - -// The heavy lifting is done by our game control (which inherits from WebGameWindow) - -// CIEWebGameCtrl -class ATL_NO_VTABLE CIEWebGameCtrl : - public CComObjectRootEx, - public CStockPropImpl, - public IPersistStreamInitImpl, - public IOleControlImpl, - public IOleObjectImpl, - public IOleInPlaceActiveObjectImpl, - public IViewObjectExImpl, - public IOleInPlaceObjectWindowlessImpl, - public IObjectSafetyImpl, - public CComCoClass, - public CComControl -{ -public: - - - - DECLARE_OLEMISC_STATUS(OLEMISC_RECOMPOSEONRESIZE | - OLEMISC_CANTLINKINSIDE | - OLEMISC_INSIDEOUT | - OLEMISC_ACTIVATEWHENVISIBLE | - OLEMISC_SETCLIENTSITEFIRST - ) - - DECLARE_REGISTRY_RESOURCEID(IDR_IEWEBGAMECTRL) - - - BEGIN_COM_MAP(CIEWebGameCtrl) - COM_INTERFACE_ENTRY(IIEWebGameCtrl) - COM_INTERFACE_ENTRY(IDispatch) - COM_INTERFACE_ENTRY(IViewObjectEx) - COM_INTERFACE_ENTRY(IViewObject2) - COM_INTERFACE_ENTRY(IViewObject) - COM_INTERFACE_ENTRY(IOleInPlaceObjectWindowless) - COM_INTERFACE_ENTRY(IOleInPlaceObject) - COM_INTERFACE_ENTRY2(IOleWindow, IOleInPlaceObjectWindowless) - COM_INTERFACE_ENTRY(IOleInPlaceActiveObject) - COM_INTERFACE_ENTRY(IOleControl) - COM_INTERFACE_ENTRY(IOleObject) - COM_INTERFACE_ENTRY(IPersistStreamInit) - COM_INTERFACE_ENTRY2(IPersist, IPersistStreamInit) - COM_INTERFACE_ENTRY_IID(IID_IObjectSafety, IObjectSafety) - - END_COM_MAP() - - BEGIN_PROP_MAP(CIEWebGameCtrl) - PROP_DATA_ENTRY("_cx", m_sizeExtent.cx, VT_UI4) - PROP_DATA_ENTRY("_cy", m_sizeExtent.cy, VT_UI4) - // Example entries - // PROP_ENTRY_TYPE("Property Name", dispid, clsid, vtType) - // PROP_PAGE(CLSID_StockColorPage) - END_PROP_MAP() - - - BEGIN_MSG_MAP(WebGameWindow) - CHAIN_MSG_MAP(WebGameWindow) - DEFAULT_REFLECTION_HANDLER() - END_MSG_MAP() - - // Handler prototypes: - // LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); - // LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); - // LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); - - // IViewObjectEx - DECLARE_VIEW_STATUS(0) - - // IIEWebGameCtrl -public: - - static CIEWebGameCtrl* sInstance; - - CIEWebGameCtrl() - { - m_bWindowOnly = TRUE; - sInstance = this; - mInitialized = false; - } - - DECLARE_PROTECT_FINAL_CONSTRUCT() - - HRESULT FinalConstruct() - { - return S_OK; - } - - void FinalRelease() - { - } - - // the javascript accessible methods which can be called our on plugin object - - // plugin.getVariable("$MyVariable"); - get a Torque 3D console variable - STDMETHOD(getVariable)(BSTR name, BSTR* value); - - // plugin.setVariable("$MyVariable", 42); - set a Torque 3D console variable - STDMETHOD(setVariable)(BSTR name, BSTR value); - - // var result = plugin.callScript("mySecureFunction('one', 'two', 'three');"); - call a TorqueScript function marked as secure in webConfig.h with supplied arguments - STDMETHOD(callScript)(BSTR code, BSTR* retValue); - - // plugin.exportFunction("MyJavascriptFunction",3); - export a Javascript function to the Torque 3D console system via its name and argument count - STDMETHOD(exportFunction)(BSTR name, LONG numArguments); - - // plugin.startup(); - called once web page is fully loaded and plugin (including Torque 3D) is initialized - STDMETHOD(startup)(); - - // TorqueScript -> Javascript call handling - const char* callFunction(const char* name, LONG numArguments, const char* argv[]); - - // our plugin requires no signing as it is installer based - STDMETHOD(GetInterfaceSafetyOptions)(REFIID riid, DWORD *pdwSupportedOptions, DWORD *pdwEnabledOptions); - STDMETHOD(SetInterfaceSafetyOptions)(REFIID riid, DWORD dwOptionSetMask, DWORD dwEnabledOptions); - - -protected: - - // these can be added on the page before we're initialized, so we cache them at startup - typedef struct JavasScriptExport - { - std::string jsCallback; //javascript function name - UINT numArguments; //the number of arguments it takes - }; - - std::vector mJavaScriptExports; - - // actually handle the export (once Torque 3D is fully initialized) - void internalExportFunction(const JavasScriptExport& jsexport); - - - BOOL mInitialized; - - // checks a given domain against the allowed domains in webConfig.h - bool checkDomain(); - - -}; - - -OBJECT_ENTRY_AUTO(__uuidof(IEWebGameCtrl), CIEWebGameCtrl) diff --git a/Templates/Empty/web/source/activex/IEWebGameCtrl.rgs b/Templates/Empty/web/source/activex/IEWebGameCtrl.rgs deleted file mode 100644 index b33ef937b..000000000 --- a/Templates/Empty/web/source/activex/IEWebGameCtrl.rgs +++ /dev/null @@ -1,34 +0,0 @@ -HKCR -{ - IEEmptyPlugin.IEWebGameCtrl.1 = s 'IEWebGameCtrl Class' - { - CLSID = s '{D62D1B36-253D-4218-B033-5ACE0B42B8BF}' - } - IEEmptyPlugin.IEWebGameCtrl = s 'IEWebGameCtrl Class' - { - CLSID = s '{D62D1B36-253D-4218-B033-5ACE0B42B8BF}' - CurVer = s 'IEEmptyPlugin.IEWebGameCtrl.1' - } - NoRemove CLSID - { - ForceRemove {D62D1B36-253D-4218-B033-5ACE0B42B8BF} = s 'IEWebGameCtrl Class' - { - ProgID = s 'IEEmptyPlugin.IEWebGameCtrl.1' - VersionIndependentProgID = s 'IEEmptyPlugin.IEWebGameCtrl' - ForceRemove 'Programmable' - InprocServer32 = s '%MODULE%' - { - val ThreadingModel = s 'Apartment' - } - val AppID = s '%APPID%' - ForceRemove 'Control' - ForceRemove 'ToolboxBitmap32' = s '%MODULE%, 102' - 'MiscStatus' = s '0' - { - '1' = s '%OLEMISC%' - } - 'TypeLib' = s '{5240D24D-FBCE-4AF2-99FC-4C7AD4318E91}' - 'Version' = s '1.0' - } - } -} diff --git a/Templates/Empty/web/source/activex/IEWebGamePlugin.cpp b/Templates/Empty/web/source/activex/IEWebGamePlugin.cpp deleted file mode 100644 index c2f03cda9..000000000 --- a/Templates/Empty/web/source/activex/IEWebGamePlugin.cpp +++ /dev/null @@ -1,91 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -#include "stdafx.h" -#include "resource.h" -#include "IEWebGamePlugin_i.h" -#include "dllmain.h" - -// Used to determine whether the DLL can be unloaded by OLE -STDAPI DllCanUnloadNow(void) -{ - return _AtlModule.DllCanUnloadNow(); -} - - -// Returns a class factory to create an object of the requested type -STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) -{ - return _AtlModule.DllGetClassObject(rclsid, riid, ppv); -} - - -// DllRegisterServer - Adds entries to the system registry -STDAPI DllRegisterServer(void) -{ - // registers object, typelib and all interfaces in typelib - HRESULT hr = _AtlModule.DllRegisterServer(); - return hr; -} - - -// DllUnregisterServer - Removes entries from the system registry -STDAPI DllUnregisterServer(void) -{ - HRESULT hr = _AtlModule.DllUnregisterServer(); - return hr; -} - -// DllInstall - Adds/Removes entries to the system registry per user -// per machine. -STDAPI DllInstall(BOOL bInstall, LPCWSTR pszCmdLine) -{ - HRESULT hr = E_FAIL; - static const wchar_t szUserSwitch[] = _T("user"); - - if (pszCmdLine != NULL) - { - if (_wcsnicmp(pszCmdLine, szUserSwitch, _countof(szUserSwitch)) == 0) - { -#if (_MSC_VER >= 1500) //vs2008 or higher - AtlSetPerUserRegistration(true); -#endif - } - } - - if (bInstall) - { - hr = DllRegisterServer(); - if (FAILED(hr)) - { - DllUnregisterServer(); - } - } - else - { - hr = DllUnregisterServer(); - } - - return hr; -} - - diff --git a/Templates/Empty/web/source/activex/IEWebGamePlugin.def b/Templates/Empty/web/source/activex/IEWebGamePlugin.def deleted file mode 100644 index a411e8436..000000000 --- a/Templates/Empty/web/source/activex/IEWebGamePlugin.def +++ /dev/null @@ -1,8 +0,0 @@ -; IEWebGamePlugin.def : Declares the module parameters. - -EXPORTS - DllCanUnloadNow PRIVATE - DllGetClassObject PRIVATE - DllRegisterServer PRIVATE - DllUnregisterServer PRIVATE - DllInstall PRIVATE diff --git a/Templates/Empty/web/source/activex/IEWebGamePlugin.idl b/Templates/Empty/web/source/activex/IEWebGamePlugin.idl deleted file mode 100644 index 17ab7087d..000000000 --- a/Templates/Empty/web/source/activex/IEWebGamePlugin.idl +++ /dev/null @@ -1,46 +0,0 @@ -// IEWebGamePlugin.idl : IDL source for IEWebGamePlugin -// - -// This file will be processed by the MIDL tool to -// produce the type library (IEWebGamePlugin.tlb) and marshalling code. - -#include "olectl.h" -import "oaidl.idl"; -import "ocidl.idl"; - -[ - object, - uuid(5240D24D-FBCE-4AF2-99FC-4C7AD4318E91), - dual, - nonextensible, - helpstring("IIEWebGameCtrl Interface"), - pointer_default(unique) -] -interface IIEWebGameCtrl : IDispatch{ - [propget, bindable, requestedit, id(DISPID_HWND)] - HRESULT HWND([out, retval]LONG_PTR* pHWND); - [id(1), helpstring("method getVariable")] HRESULT getVariable([in] BSTR name, [out, retval] BSTR* value); - [id(2), helpstring("method setVariable")] HRESULT setVariable([in] BSTR name, [in] BSTR value); - [id(3), helpstring("method export")] HRESULT exportFunction([in] BSTR callback, [in] LONG numArguments); - [id(4), helpstring("method callScript")] HRESULT callScript([in] BSTR code, [out, retval] BSTR* retValue); - [id(5), helpstring("method startup")] HRESULT startup(); -}; - -[ - uuid(FC143328-E29C-4BC4-8C83-618FEB562532), - version(1.0), - helpstring("IEEmptyPlugin 1.0 Type Library") -] -library IEEmptyPluginLib -{ - importlib("stdole2.tlb"); - [ - uuid(D62D1B36-253D-4218-B033-5ACE0B42B8BF), - control, - helpstring("IEWebGameCtrl Class") - ] - coclass IEWebGameCtrl - { - [default] interface IIEWebGameCtrl; - }; -}; diff --git a/Templates/Empty/web/source/activex/IEWebGamePlugin.rc b/Templates/Empty/web/source/activex/IEWebGamePlugin.rc deleted file mode 100644 index 493d95046..000000000 --- a/Templates/Empty/web/source/activex/IEWebGamePlugin.rc +++ /dev/null @@ -1,135 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#ifndef APSTUDIO_INVOKED -#include "targetver.h" -#endif -#include "winres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#ifndef APSTUDIO_INVOKED\r\n" - "#include ""targetver.h""\r\n" - "#endif\r\n" - "#include ""winres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "1 TYPELIB ""IEWebGamePlugin.tlb""\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904e4" - BEGIN - VALUE "PluginType", "ActiveX" - VALUE "CompanyName", "My Game Company" - VALUE "FileDescription", "ActiveX Web Game Plugin" - VALUE "FileVersion", "1.0.0.1" - VALUE "LegalCopyright", "(c) My Game Company. All rights reserved." - VALUE "InternalName", "IE Empty Plugin.dll" - VALUE "OriginalFilename", "IE Empty Plugin.dll" - VALUE "ProductName", "My Web Game" - VALUE "ProductVersion", "1.0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1252 - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// REGISTRY -// - -IDR_IEWEBGAMEPLUGIN REGISTRY "IEWebGamePlugin.rgs" -IDR_IEWEBGAMECTRL REGISTRY "IEWebGameCtrl.rgs" - -///////////////////////////////////////////////////////////////////////////// -// -// Bitmap -// - -IDB_IEWEBGAMECTRL BITMAP "IEWebGameCtrl.bmp" - -///////////////////////////////////////////////////////////////////////////// -// -// String Table -// - -STRINGTABLE -BEGIN - IDS_PROJNAME "IEEmptyPlugin" -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// -1 TYPELIB "IEWebGamePlugin.tlb" - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/Templates/Empty/web/source/activex/IEWebGamePlugin.rgs b/Templates/Empty/web/source/activex/IEWebGamePlugin.rgs deleted file mode 100644 index 085569d71..000000000 --- a/Templates/Empty/web/source/activex/IEWebGamePlugin.rgs +++ /dev/null @@ -1,11 +0,0 @@ -HKCR -{ - NoRemove AppID - { - '%APPID%' = s 'IEEmptyPlugin' - 'IEEmptyPlugin.DLL' - { - val AppID = s '%APPID%' - } - } -} diff --git a/Templates/Empty/web/source/activex/IEWebGameWindow.cpp b/Templates/Empty/web/source/activex/IEWebGameWindow.cpp deleted file mode 100644 index 7096a1bbc..000000000 --- a/Templates/Empty/web/source/activex/IEWebGameWindow.cpp +++ /dev/null @@ -1,182 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -#include "StdAfx.h" -#include -#include "IEWebGameWindow.h" -#include "../common/webCommon.h" - - -// We hook the keyboard at application level so we TAB, Backspace, other accelerator combos -// are captured and don't cause us grief -static HHOOK hHook = NULL; - -// Hook procedure for WH_GETMESSAGE hook type. -LRESULT CALLBACK GetMessageProc(int nCode, WPARAM wParam, LPARAM lParam) -{ - // If this is a keystrokes message, translate it in controls' - LPMSG lpMsg = (LPMSG) lParam; - if( (nCode >= 0) && - PM_REMOVE == wParam && - (lpMsg->message >= WM_KEYFIRST && lpMsg->message <= WM_KEYLAST) ) - { - if (torque_directmessage) - { - // call directly into the Torque 3D message queue, bypassing the windows event queue - // as we're hooking into the application level processing, this would cause a hang - torque_directmessage(lpMsg->message, lpMsg->wParam, lpMsg->lParam); - - // The value returned from this hookproc is ignored, and it cannot - // be used to tell Windows the message has been handled. To avoid - // further processing, convert the message to WM_NULL before - // returning. - lpMsg->message = WM_NULL; - lpMsg->lParam = 0L; - lpMsg->wParam = 0; - } - } - - // Passes the hook information to the next hook procedure in - // the current hook chain. - return ::CallNextHookEx(hHook, nCode, wParam, lParam); -} - - - - -WebGameWindow::WebGameWindow(void) -{ - mTimer = false; - mInitialized = false; -} - -WebGameWindow::~WebGameWindow(void) -{ - //handling threads in event callbacks (onDestroy for instance) seems to cause loads of problems (deadlocks, etc) - if (mInitialized) - WebCommon::ShutdownTorque3D(); -} - -// we use a timer to update the Torque 3D game loop (tick) and handle rendering -VOID CALLBACK MyTimerProc( - HWND hwnd, // handle to window for timer messages - UINT message, // WM_TIMER message - UINT idTimer, // timer identifier - DWORD dwTime) // current system time -{ - static bool reentrant = false; - - if (!reentrant) - { - reentrant = true; - torque_enginetick(); - reentrant = false; - } -} - -LRESULT -WebGameWindow::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) -{ - - bHandled = TRUE; - - // check that the domain we're loading the plugin from is allowed - if (!checkDomain()) - { - return -1; - } - - // load up the Torque 3D shared library and initialize it - if (!WebCommon::InitTorque3D(this->m_hWnd)) - { - return -1; - } - - mTimer = true; - mInitialized = true; - - // fire up timer for ticking Torque 3D update - SetTimer( 1, // timer identifier - 1, // 1 millisecond - (TIMERPROC) MyTimerProc); // timer callback - - hHook = ::SetWindowsHookEx( - WH_GETMESSAGE, - GetMessageProc, - WebCommon::gPluginModule, - GetCurrentThreadId()); - - return 0; -} - -//------------------------------------------------------------------------------ -/** -*/ -LRESULT -WebGameWindow::OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) -{ - // let the default handler run - bHandled = FALSE; - - // kill update timer - if (mTimer) - KillTimer( 1); - mTimer = false; - - if (hHook) - ::UnhookWindowsHookEx (hHook); - - hHook = NULL; - - return 0; -} - -//------------------------------------------------------------------------------ -/** -*/ - -LRESULT -WebGameWindow::OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) -{ - // let the default handler run - bHandled = FALSE; - - // resize the Torque 3D child window depending on our browser's parent window - if (mInitialized && torque_resizewindow) - { - int width = (int) LOWORD( lParam ); - int height = (int) HIWORD( lParam ); - torque_resizewindow(width,height); - } - return 0; -} - - -//------------------------------------------------------------------------------ -/** -*/ -LRESULT -WebGameWindow::OnMouseActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) -{ - return MA_ACTIVATE; -} - diff --git a/Templates/Empty/web/source/activex/IEWebGameWindow.h b/Templates/Empty/web/source/activex/IEWebGameWindow.h deleted file mode 100644 index 6c30ee68b..000000000 --- a/Templates/Empty/web/source/activex/IEWebGameWindow.h +++ /dev/null @@ -1,65 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -#pragma once - -#include "stdafx.h" -#include -#include - -// "Platform" window specifics to keep IE plugin consistent with Safari/Firefox/Chrome - -class WebGameWindow : public CWindowImpl -{ -public: - WebGameWindow(); - virtual ~WebGameWindow(); - - DECLARE_WND_CLASS(_T("WebGameCtrl:WebGameWindow")) - - BEGIN_MSG_MAP(WebGameWindow) - MESSAGE_HANDLER(WM_CREATE, OnCreate) - MESSAGE_HANDLER(WM_DESTROY, OnDestroy) - MESSAGE_HANDLER(WM_MOUSEACTIVATE, OnMouseActivate); - MESSAGE_HANDLER(WM_SIZE, OnSize); - END_MSG_MAP() - -public: - - // message handlers (all window based) - LRESULT OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); - LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); - LRESULT OnMouseActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); - LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); - -protected: - - // // checks a given domain against the allowed domains in webConfig.h (defined in IEWebGamePlugin) - virtual bool checkDomain() = 0; - -private: - - bool mTimer; - bool mInitialized; - -}; - diff --git a/Templates/Empty/web/source/activex/dllmain.cpp b/Templates/Empty/web/source/activex/dllmain.cpp deleted file mode 100644 index fb5281900..000000000 --- a/Templates/Empty/web/source/activex/dllmain.cpp +++ /dev/null @@ -1,38 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -// dllmain.cpp : Implementation of DllMain. - -#include "stdafx.h" -#include "resource.h" -#include "IEWebGamePlugin_i.h" -#include "dllmain.h" -#include "../common/webCommon.h" - -CIEWebGamePluginModule _AtlModule; - -// DLL Entry Point -extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) -{ - WebCommon::gPluginModule = (HMODULE) hInstance; - return _AtlModule.DllMain(dwReason, lpReserved); -} diff --git a/Templates/Empty/web/source/activex/dllmain.h b/Templates/Empty/web/source/activex/dllmain.h deleted file mode 100644 index 7e929ae25..000000000 --- a/Templates/Empty/web/source/activex/dllmain.h +++ /dev/null @@ -1,32 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -// dllmain.h : Declaration of module class. - -class CIEWebGamePluginModule : public CAtlDllModuleT< CIEWebGamePluginModule > -{ -public : - DECLARE_LIBID(LIBID_IEEmptyPluginLib) - DECLARE_REGISTRY_APPID_RESOURCEID(IDR_IEWEBGAMEPLUGIN, "{AB7615A3-A918-488B-B128-96DD62D0AE36}") -}; - -extern class CIEWebGamePluginModule _AtlModule; diff --git a/Templates/Empty/web/source/activex/resource.h b/Templates/Empty/web/source/activex/resource.h deleted file mode 100644 index 6fb015195..000000000 --- a/Templates/Empty/web/source/activex/resource.h +++ /dev/null @@ -1,19 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by IEWebGamePlugin.rc -// -#define IDS_PROJNAME 100 -#define IDR_IEWEBGAMEPLUGIN 101 -#define IDB_IEWEBGAMECTRL 102 -#define IDR_IEWEBGAMECTRL 103 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 201 -#define _APS_NEXT_COMMAND_VALUE 32768 -#define _APS_NEXT_CONTROL_VALUE 201 -#define _APS_NEXT_SYMED_VALUE 104 -#endif -#endif diff --git a/Templates/Empty/web/source/activex/stdafx.cpp b/Templates/Empty/web/source/activex/stdafx.cpp deleted file mode 100644 index bea35e638..000000000 --- a/Templates/Empty/web/source/activex/stdafx.cpp +++ /dev/null @@ -1,27 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -// stdafx.cpp : source file that includes just the standard includes -// IEWebGamePlugin.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" diff --git a/Templates/Empty/web/source/activex/stdafx.h b/Templates/Empty/web/source/activex/stdafx.h deleted file mode 100644 index fc7d0946a..000000000 --- a/Templates/Empty/web/source/activex/stdafx.h +++ /dev/null @@ -1,45 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, -// but are changed infrequently - -#pragma once - -#ifndef STRICT -#define STRICT -#endif - -#include "targetver.h" - -#define _ATL_APARTMENT_THREADED -#define _ATL_NO_AUTOMATIC_NAMESPACE - -#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit - -#include "resource.h" -#include -#include -#include - -using namespace ATL; \ No newline at end of file diff --git a/Templates/Empty/web/source/activex/targetver.h b/Templates/Empty/web/source/activex/targetver.h deleted file mode 100644 index 8ff0a6f4d..000000000 --- a/Templates/Empty/web/source/activex/targetver.h +++ /dev/null @@ -1,47 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -#pragma once - -// The following macros define the minimum required platform. The minimum required platform -// is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run -// your application. The macros work by enabling all features available on platform versions up to and -// including the version specified. - -// Modify the following defines if you have to target a platform prior to the ones specified below. -// Refer to MSDN for the latest info on corresponding values for different platforms. -#ifndef WINVER // Specifies that the minimum required platform is Windows Vista. -#define WINVER 0x0600 // Change this to the appropriate value to target other versions of Windows. -#endif - -#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. -#define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. -#endif - -#ifndef _WIN32_WINDOWS // Specifies that the minimum required platform is Windows 98. -#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later. -#endif - -#ifndef _WIN32_IE // Specifies that the minimum required platform is Internet Explorer 7.0. -#define _WIN32_IE 0x0700 // Change this to the appropriate value to target other versions of IE. -#endif - diff --git a/Templates/Empty/web/source/common/webCommon.cpp b/Templates/Empty/web/source/common/webCommon.cpp deleted file mode 100644 index d2b65556d..000000000 --- a/Templates/Empty/web/source/common/webCommon.cpp +++ /dev/null @@ -1,727 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -#include "webConfig.h" -#include "webCommon.h" - -#include -#include - -// Platform specific shared library handling - -#ifdef WIN32 - -#pragma warning( disable : 4996) - -#define TORQUE_OPEN LoadLibraryA -#define TORQUE_FUNCTION GetProcAddress -#define TORQUE_CLOSE FreeLibrary - -#define strncasecmp strnicmp -#define strcasecmp stricmp - -#else // Mac - -#define TORQUE_OPEN(path) dlopen(path, RTLD_LAZY | RTLD_LOCAL) -#define TORQUE_FUNCTION dlsym -#define TORQUE_CLOSE dlclose - -#endif - -// C Interface exported from the Torque 3D DLL (or Bundle on Mac) - -extern "C" -{ - // initialize Torque 3D including argument handling - bool (*torque_engineinit)(int argc, const char **argv) = NULL; - - // tick Torque 3D's main loop - int (*torque_enginetick)() = NULL; - - // set Torque 3D into web deployment mode (disable fullscreen exlusive mode, etc) - int (*torque_setwebdeployment)() = NULL; - - // shutdown the engine - bool (*torque_engineshutdown)() = NULL; - - // signal an engine shutdown (as with the quit(); console command) - void (*torque_enginesignalshutdown)() = NULL; - - // reset the engine, unloading any current level and returning to the main menu - void (*torque_reset)() = NULL; - - // Evaluate arbitrary TorqueScript (ONLY CALL torque_evaluate FROM TRUSTED CODE!!!) - const char* (*torque_evaluate)(const char* code) = NULL; - - // Get a console variable - const char* (*torque_getvariable)(const char* name) = NULL; - // Set a console variable - void (*torque_setvariable)(const char* name, const char* value) = NULL; - - // Export a function to the Torque 3D console system which matches the StringCallback function prototype - // specify the nameSpace, functionName, usage, min and max arguments - void (*torque_exportstringcallback)(StringCallback cb, const char *nameSpace, const char *funcName, const char* usage, int minArgs, int maxArgs) = NULL; - - // Set a TorqueScript console function as secure and available for JavaScript via the callScript plugin method - void (*torque_addsecurefunction)(const char* nameSpace, const char* fname) = NULL; - // Call a TorqueScript console function that has been marked as secure - const char* (*torque_callsecurefunction)(const char* nameSpace, const char* name, int argc, const char ** argv) = NULL; - - // resize the Torque 3D child window to the specified width and height - void (*torque_resizewindow)(int width, int height) = NULL; - -#ifndef WIN32 - // On Mac, handle the parent safari window - void (*torque_setsafariwindow)(NSWindow* window, int32 x, int32 y, int32 width, int32 height) = NULL; - // On Mac, sets the executable path - void (*torque_setexecutablepath)(const char *path) = NULL; -#else - // retrieve the render windows hwnd - void* (*torque_gethwnd)() = NULL; - - // directly add a message to the Torque 3D event queue, bypassing the Windows event queue - // this is useful in the case of the IE plugin, where we are hooking into an application - // level message, and posting to the windows queue would cause a hang - void (*torque_directmessage)(unsigned int message, unsigned int wparam, unsigned int lparam) = NULL; -#endif - -}; - -namespace WebCommon -{ - - std::string gPluginMIMEType; - -#ifdef WIN32 - - HMODULE gTorque3DModule = NULL; - HMODULE gPluginModule = 0; - - // bring up a platform specific message box (used for error reporting) - void MessageBox(void* parentWindow, const char* msg, const char* caption ) - { - ::MessageBoxA( (HWND) parentWindow, msg, caption, MB_OK|MB_ICONWARNING); - } - - // retrieve the game directory using the filename (which includes the full path) of the plugin DLL - const char* GetGameDirectory() - { - static char dir[4096]; - - GetModuleFileNameA(gPluginModule, dir, 4096); - - int i = strlen(dir) - 1; - while (i>=0) - { - if (dir[i] == '\\' || dir[i] == '/') - { - dir[i] = 0; - break; - } - - i--; - } - - return dir; - - } - - // retrieve the name of our game DLL (includes Torque 3D engine) based on naming convention - const char* GetGameLibrary() - { - char dir[4096]; - static char lib[4096]; - - lib[0] = 0; - - GetModuleFileNameA(gPluginModule, dir, 4096); - - int i = strlen(dir) - 1; - while (i>=0) - { - if (dir[i] == '\\' || dir[i] == '/') - { - // copy, minus the "NP " or "IE " of plugin name -#ifdef _DEBUG - sprintf(lib, "%s_DEBUG.dll", &dir[i+4]); -#else - sprintf(lib, "%s.dll", &dir[i+4]); -#endif - return lib; - } - - // strip off end - if (!strncmp(&dir[i], " Plugin", 7)) - dir[i] = 0; - - i--; - } - - return lib; - } - -#else - - void* gTorque3DModule = NULL; - NSBundle* gPluginBundle = NULL; - - // bring up a platform specific message box (used for error reporting) - void MessageBox(void* parentWindow, const char* msg, const char* caption ) - { - - // convert title and message to NSStrings - NSString *nsTitle = [NSString stringWithUTF8String:caption]; - NSString *nsMessage = [NSString stringWithUTF8String:msg]; - - - NSAlert *alert = [NSAlert alertWithMessageText:nsTitle -defaultButton:@"OK" -alternateButton:nil -otherButton:nil -informativeTextWithFormat:nsMessage]; - [alert runModal]; - } - - NSBundle* GetPluginBundle() - { - if (gPluginBundle) - return gPluginBundle; - - NSDictionary *mimeTypes; - NSString *mime; - NSEnumerator *f; - - NSArray *bundles = [NSBundle allBundles]; - for (int i = 0; i < [bundles count]; i++) { - NSBundle *b = [bundles objectAtIndex:i]; - - mimeTypes=[b objectForInfoDictionaryKey:@"WebPluginMIMETypes"]; - - if (!mimeTypes) - continue; - - f=[mimeTypes keyEnumerator]; - - while((mime=[f nextObject])) - { - if (gPluginMIMEType == std::string([mime UTF8String])) - { - gPluginBundle = b; - break; - } - } - } - - return gPluginBundle; - - } - - // retrieve the game's install folder based on entries from our plugin's Info.plist - const char* GetGameDirectory() - { - static char gamePath[2048] = {'\0'}; - - if (gamePath[0]) - return gamePath; - - NSBundle* pluginBundle = GetPluginBundle(); - - if (!pluginBundle) - return NULL; - - NSString *gameInstallPathKey = [NSString stringWithUTF8String:"GameInstallPath"]; - NSString *gameInstallPath = [pluginBundle objectForInfoDictionaryKey: gameInstallPathKey]; - - if (!gameInstallPath) - return NULL; - - strcpy(gamePath, [gameInstallPath UTF8String]); - - if (!gamePath[0]) - return NULL; - - return gamePath; - } - - // retrieve the game bundle (including Torque 3D engine) from the plugin Info.plist - const char* GetGameLibrary() - { - static char libPath[2048] = {'\0'}; - - if (libPath[0]) - return libPath; - - const char* gamePath = GetGameDirectory(); - - if (!gamePath) - return NULL; - - NSBundle* pluginBundle = GetPluginBundle(); - - if (!pluginBundle) - return NULL; - - // NSString* bundleIdentifier = [pluginBundle bundleIdentifier]; - - NSString *gameNameKey = [NSString stringWithUTF8String:"GameName"]; - NSString *gameName = [pluginBundle objectForInfoDictionaryKey: gameNameKey]; - - if (!gameName) - return NULL; - - const char* cgameName = [gameName UTF8String]; - - if (!cgameName[0]) - return NULL; - -#ifdef DEBUG - sprintf(libPath, "%s%s_DEBUG.app/Contents/Frameworks/%s Bundle.bundle/Contents/MacOS/%s Bundle", gamePath, cgameName, cgameName, cgameName); -#else - sprintf(libPath, "%s%s.app/Contents/Frameworks/%s Bundle.bundle/Contents/MacOS/%s Bundle", gamePath, cgameName, cgameName, cgameName); -#endif - - return libPath; - } - -#endif - - bool ChangeToGameDirectory() - { - const char* gameDir = GetGameDirectory(); - - if (!gameDir) - return false; - -#ifdef WIN32 - return SetCurrentDirectoryA(gameDir); -#else - return (chdir(gameDir) == 0); -#endif - - } - - // loads the Torque 3D shared library, sets web deployment mode, retrieves engine "C" interface - bool InitTorque3D(void* platformWindow, int clipLeft, int clipTop, int clipRight, int clipBottom) - { - const char* gameDir = GetGameDirectory(); - const char* gameLib = GetGameLibrary(); - - if (gTorque3DModule) - { - WebCommon::MessageBox( 0, "This plugin allows only one instance", "Error"); - return false; - } - - if (!gameDir || !gameLib) - { - WebCommon::MessageBox( 0, "Unable to get game plugin information", "Error"); - return false; - } - - if (!ChangeToGameDirectory()) - return false; - - std::string gameLibStr = gameLib; -#ifdef WIN32 - // We want to use an absolute path to the game library - gameLibStr = gameDir; - WebCommon::ConvertToWindowsPathSep(gameLibStr); - gameLibStr += "\\"; - gameLibStr += gameLib; -#endif - - gTorque3DModule = TORQUE_OPEN(gameLibStr.c_str()); - - if (!gTorque3DModule) - { - char error[4096]; -#ifdef WIN32 - sprintf(error, "Could not load game library: %s/%s. Please make sure you have the latest DirectX installed.", gameDir, gameLib); -#else - sprintf(error, "Could not load game library: %s/%s. ", gameDir, gameLib); -#endif - WebCommon::MessageBox( 0, error, "Error"); - return false; - } - - // snag all the exported functions of the "C" interface - - torque_engineinit = (bool (*)(int argc, const char **argv))TORQUE_FUNCTION(gTorque3DModule, "torque_engineinit"); - torque_enginetick = (int (*)())TORQUE_FUNCTION(gTorque3DModule, "torque_enginetick"); - torque_setwebdeployment = (int (*)())TORQUE_FUNCTION(gTorque3DModule, "torque_setwebdeployment"); - torque_engineshutdown = (bool (*)())TORQUE_FUNCTION(gTorque3DModule, "torque_engineshutdown"); - torque_enginesignalshutdown = (void (*)())TORQUE_FUNCTION(gTorque3DModule, "torque_enginesignalshutdown"); - torque_reset = (void (*)())TORQUE_FUNCTION(gTorque3DModule, "torque_reset"); - torque_evaluate = (const char* (*)(const char* code))TORQUE_FUNCTION(gTorque3DModule, "torque_evaluate"); - - torque_getvariable = (const char* (*)(const char* name))TORQUE_FUNCTION(gTorque3DModule, "torque_getvariable"); - torque_setvariable = (void (*)(const char* name, const char* value))TORQUE_FUNCTION(gTorque3DModule, "torque_setvariable"); - torque_exportstringcallback = (void (*)(StringCallback cb, const char *nameSpace, const char *funcName, const char* usage, int minArgs, int maxArgs))TORQUE_FUNCTION(gTorque3DModule, "torque_exportstringcallback"); - - torque_addsecurefunction = (void (*)(const char* nameSpace, const char* name))TORQUE_FUNCTION(gTorque3DModule, "torque_addsecurefunction"); - torque_callsecurefunction = (const char* (*)(const char* nameSpace, const char* name, int argc, const char ** argv))TORQUE_FUNCTION(gTorque3DModule, "torque_callsecurefunction"); - - torque_resizewindow = (void (*)(int width, int height))TORQUE_FUNCTION(gTorque3DModule, "torque_resizewindow"); - - // check that we got them all - - if (!torque_engineinit || - !torque_enginetick || - !torque_setwebdeployment || - !torque_engineshutdown || - !torque_enginesignalshutdown || - !torque_reset || - !torque_evaluate || - !torque_getvariable || - !torque_setvariable || - !torque_exportstringcallback || - !torque_addsecurefunction || - !torque_callsecurefunction || - !torque_resizewindow ) - { - WebCommon::MessageBox( platformWindow, "The plugin could not be initialized (missing function exports)", "Error"); - TORQUE_CLOSE(gTorque3DModule); - gTorque3DModule = NULL; - return false; - } - -#ifndef WIN32 - torque_setexecutablepath = (void (*)(const char *path)) dlsym(gTorque3DModule, "torque_setexecutablepath"); - torque_setsafariwindow = (void (*)(NSWindow* nswnd, int32, int32, int32, int32)) dlsym(gTorque3DModule, "torque_setsafariwindow"); - - if (!torque_setexecutablepath || !torque_setsafariwindow) - { - WebCommon::MessageBox( platformWindow, "The plugin could not be initialized (missing function exports)", "Error"); - TORQUE_CLOSE(gTorque3DModule); - gTorque3DModule = NULL; - return false; - } -#else - torque_gethwnd = (void* (*)())TORQUE_FUNCTION(gTorque3DModule, "torque_gethwnd"); - torque_directmessage = (void (*)(unsigned int message, unsigned int wparam, unsigned int lparam))TORQUE_FUNCTION(gTorque3DModule, "torque_directmessage"); - if (!torque_gethwnd || !torque_directmessage) - { - WebCommon::MessageBox( platformWindow, "The plugin could not be initialized (missing function exports)", "Error"); - TORQUE_CLOSE(gTorque3DModule); - gTorque3DModule = NULL; - return false; - } -#endif - - //tell Torque3D that we're a browser plugin - torque_setwebdeployment(); - - const char* args[3]; - int argc; - -#ifdef WIN32 - // windows uses a command line arg for parent window - char parentWindow[256]; - argc = 3; - sprintf(parentWindow, "%I64u", (unsigned __int64)platformWindow); - args[0] = "game.exe"; //just to satisfy command line parsing - args[1] = "-window"; - args[2] = parentWindow; -#else - - NSWindow* browserWindow = (NSWindow*) platformWindow; - - // tell Torque 3D about our parent browser window - // we initialize with zero size as the page hasn't completely loaded yet - // so, the plugin hasn't been resized by the page and it is better to not show - // anything than wrong extents - torque_setsafariwindow( browserWindow, 0, 0, 0, 0); - - argc = 1; - args[0] = gameDir; // just to satisfy command line parsing - -#endif - - // initialize Torque 3D! - if (!torque_engineinit(argc, args)) - { - WebCommon::MessageBox( platformWindow, "The plugin could not be initialized (internal initialization error)", "Error"); - return false; - } - - return true; - } - - // unloads the Torque 3D shared library (first signaling a shutdown for clean exit) - void ShutdownTorque3D() - { - if (gTorque3DModule) - { - ChangeToGameDirectory(); - torque_enginesignalshutdown(); - torque_enginetick(); - torque_engineshutdown(); - TORQUE_CLOSE(gTorque3DModule); - } - - gTorque3DModule = NULL; - - } - - // checks a given domain against the allowed domains in webConfig.h - bool CheckDomain(const char* url) - { - bool domainCheck = true; - -#ifndef WEBDEPLOY_DOMAIN_CHECK - domainCheck = false; -#endif - -#ifdef DEBUG -# ifdef WEBDEPLOY_DOMAIN_ALLOW_DEBUG - domainCheck = false; -# endif -#endif - - if (!domainCheck) - return true; // gets rid of "unreachable code" warning - - if (strlen(url) > 512) - return false; - - if (strlen(url) < 5) - return false; - - //do not allow file when using domain checking - if (!strncasecmp(url,"file",4)) - return false; - - char curl[512] = {0}; - - unsigned int begin = 0; - while(url[begin]) - { - if (url[begin] == ':') - { - if (begin + 3 > strlen(url)) - return false; - begin+=3; //skip :// - break; - } - begin++; - } - - unsigned int end = begin; - - while(end < strlen(url)) - { - if (url[end] == '/') - { - break; - } - - end++; - } - - strcpy(curl, &url[begin]); - curl[end-begin] = 0; - - // iterate checking against our allowed domains - for (int i = 0; gAllowedDomains[i]; i++) - if (!strcasecmp(curl, gAllowedDomains[i])) - return true; - - WebCommon::MessageBox( 0 , "This plugin cannot be executed from the domain specified", "Error"); - - return false; - } - - // exposes TorqueScript functions marked as secure in webConfig.h, these functions can then be called on the page via Javascript - void AddSecureFunctions() - { - char snamespace[256]; - char fname[256]; - - //define secure functions here - for (unsigned int i = 0; gSecureScript[i]; i++) - { - snamespace[0] = 0; - strcpy(fname, gSecureScript[i]); - - //scan through looking for namespace - for (unsigned int j = 1; j < strlen(fname)-2; j++) - { - if (fname[j] == ':' && fname[j+1] == ':') - { - strcpy(snamespace, gSecureScript[i]); - snamespace[j] = 0; - strcpy(fname,&gSecureScript[i][j+2]); - break; - - } - } - - torque_addsecurefunction(snamespace, fname); - - } - - } - - //simple string copy that eats white space - void StringCopy(char* dst, const char* src, int count) - { - int i, j; - bool eat = true; - for (i = 0, j = 0; i < count ; i++) - { - if (src[i] == 0) - { - dst[j] = 0; - return; - } - if (src[i] != '"' && src[i] != '\t' && src[i] != '\n' && src[i] != ')' && src[i] != '(') - { - if (eat && src[i] == ' ') - continue; - - if (src[i] == '\'') - { - eat = !eat; - continue; - } - - dst[j++] = src[i]; - } - } - } - - void SetVariable(const char* variable, const char* value) - { - char mvar[1024]; - char mvar2[1024]; - - if (strlen(variable) > 1023) - { - WebCommon::MessageBox( 0, "WebCommon::SetVariable - buffer overrun", "Error"); - return; - } - - // make local copies stripping off $ decorator is needed - if (variable[0] == '$') - strcpy(mvar, &variable[1]); - else - strcpy(mvar, variable); - - const char* js = "javascript::"; - - if (strncasecmp(js, mvar, 12)) - sprintf(mvar2, "Javascript::%s", mvar); - else - strcpy(mvar2, mvar); - - torque_setvariable(mvar2, value); - } - - const char* GetVariable(const char* variable) - { - char mvar[1024]; - char mvar2[1024]; - - if (strlen(variable) > 1023) - { - WebCommon::MessageBox( 0, "WebCommon::GetVariable - buffer overrun", "Error"); - return "0"; - } - - // make local copies stripping off $ decorator is needed - if (variable[0] == '$') - strcpy(mvar, &variable[1]); - else - strcpy(mvar, variable); - - const char* js = "javascript::"; - - if (strncasecmp(js, mvar, 12)) - sprintf(mvar2, "Javascript::%s", mvar); - else - strcpy(mvar2, mvar); - - return torque_getvariable(mvar2); - - } - - -#ifdef WIN32 - - // string conversion to/from wstring and string - std::wstring StringToWString( const std::string& str ) - { - size_t size = str.length(); - wchar_t* w = new wchar_t[size+1]; - - memset( w, 0, sizeof(wchar_t) * (size+1) ); - - MultiByteToWideChar( CP_ACP, - 0, - str.c_str(), - size, - w, - size ); - - std::wstring ws(w); - delete[] w; - return ws; - } - - std::string WStringToString( const std::wstring& wstr ) - { - size_t size = wstr.length(); - char* s = new char[size+1]; - - memset( s, 0, sizeof(char) * (size+1) ); - - WideCharToMultiByte( CP_ACP, - 0, - wstr.c_str(), - size, - s, - size, - NULL, - NULL ); - - std::string str(s); - delete[] s; - return str; - } - - void ConvertToWindowsPathSep(std::string& path) - { - size_t pos = 0; - while(pos < path.size() || pos != std::string::npos) - { - pos = path.find("/", pos); - if(pos != std::string::npos) - { - path.replace(pos, 1, "\\"); - ++pos; - } - } - } - -#endif - -} //namespace WebCommon \ No newline at end of file diff --git a/Templates/Empty/web/source/common/webCommon.h b/Templates/Empty/web/source/common/webCommon.h deleted file mode 100644 index a04664c7e..000000000 --- a/Templates/Empty/web/source/common/webCommon.h +++ /dev/null @@ -1,166 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -#ifndef _webcommon_h -#define _webcommon_h - -// Common web functionality between IE/Safari/Firefox/Chrome - -// Platform specific includes -#ifdef WIN32 - - #include - -#else // Mac - - #include - #include - #include - #include - #include - - #define OSCALL - -#endif - -// common includes -#include -#include -#include -#include -#include - -// Function prototype matching Torque 3D console callback convention -typedef const char * (*StringCallback)(void *obj, int argc, const char *argv[]); - -namespace WebCommon -{ - // loads the Torque 3D shared library, sets web deployment mode, retrieves engine "C" interface - bool InitTorque3D(void *platformWindow, int clipLeft = 0, int clipTop= 0, int clipRight = 0, int clipBottom = 0); - - // sets the current directory to the game install path - bool ChangeToGameDirectory(); - - // unloads the Torque 3D shared library (first signaling a shutdown for clean exit) - void ShutdownTorque3D(); - - // checks a given domain against the allowed domains in webConfig.h - bool CheckDomain(const char* url); - - // exposes TorqueScript functions marked as secure in webConfig.h, these functions can then be called on the page via Javascript - void AddSecureFunctions(); - - // bring up a platform specific message box (used for error reporting) - void MessageBox(void* parentWindow, const char* msg, const char* caption); - - // a handy string function that eats white space - void StringCopy(char* dst, const char* src, int count); - - void SetVariable(const char* variable, const char* value); - const char* GetVariable(const char* variable); - - extern std::string gPluginMIMEType; - -#ifdef WIN32 - // the handle of our plugin's DLL - extern HMODULE gPluginModule; - // the handle of the Torque 3D DLL - extern HMODULE gTorque3DModule; - - //string conversion to/from wstring and string - std::string WStringToString( const std::wstring& wstr); - std::wstring StringToWString( const std::string& str); - - void ConvertToWindowsPathSep(std::string& path); -#else //Mac - // ptr to the Torque 3D Bundle - extern void* gTorque3DModule; -#endif - -}; - -// C Interface exported from the Torque 3D DLL (or Bundle on Mac) - -extern "C" -{ - // initialize Torque 3D including argument handling - extern bool (*torque_engineinit)(int argc, const char **argv); - - // tick Torque 3D's main loop - extern int (*torque_enginetick)(); - - // set Torque 3D into web deployment mode (disable fullscreen exlusive mode, etc) - extern int (*torque_setwebdeployment)(); - - // shutdown the engine - extern bool (*torque_engineshutdown)(); - - // signal an engine shutdown (as with the quit(); console command) - extern void (*torque_enginesignalshutdown)(); - - // reset the engine, unloading any current level and returning to the main menu - extern void (*torque_reset)(); - - // Evaluate arbitrary TorqueScript (ONLY CALL torque_evaluate FROM TRUSTED CODE!!!) - extern const char* (*torque_evaluate)(const char* code); - - // Get a console variable - // For security, restricted to "Javascript::" namespace - extern const char* (*torque_getvariable)(const char* name); - // Set a console variable - // For security, restricted to "Javascript::" namespace - extern void (*torque_setvariable)(const char* name, const char* value); - - // Export a function to the Torque 3D console system which matches the StringCallback function prototype - // specify the nameSpace, functionName, usage, min and max arguments - extern void (*torque_exportstringcallback)(StringCallback cb, const char *nameSpace, const char *funcName, const char* usage, int minArgs, int maxArgs); - - // Set a TorqueScript console function as secure and available for JavaScript via the callScript plugin method - extern void (*torque_addsecurefunction)(const char* nameSpace, const char* fname); - // Call a TorqueScript console function that has been marked as secure - extern const char* (*torque_callsecurefunction)(const char* nameSpace, const char* name, int argc, const char ** argv); - - // resize the Torque 3D child window to the specified width and height - extern void (*torque_resizewindow)(int width, int height); - -#ifndef WIN32 - // On Mac, handle the parent safari window - extern void (*torque_setsafariwindow)(NSWindow* window, int32 x, int32 y, int32 width, int32 height); - - // On Mac, sets the executable path - extern void (*torque_setexecutablepath)(const char *path); -#else - // retrieve the render windows hwnd - extern void* (*torque_gethwnd)(); - - // directly add a message to the Torque 3D event queue, bypassing the Windows event queue - // this is useful in the case of the IE plugin, where we are hooking into an application - // level message, and posting to the windows queue would cause a hang - extern void (*torque_directmessage)(unsigned int message, unsigned int wparam, unsigned int lparam); -#endif - -}; - - - - -#endif \ No newline at end of file diff --git a/Templates/Empty/web/source/common/webConfig.h b/Templates/Empty/web/source/common/webConfig.h deleted file mode 100644 index b43609d58..000000000 --- a/Templates/Empty/web/source/common/webConfig.h +++ /dev/null @@ -1,44 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -// Define secure TorqueScript calls by adding them here. -// This list defines the calls that can be made by JavaScript into your game, so be very careful. - -const char* gSecureScript[] = { - "echo", - "testJavaScriptBridge", - //"MyNamespace::myfunction", - 0 //SENTINEL -}; - -// Define the domains which are allowed to run your game via the web -// Your game plugin will refuse to run from any other domain for security reasons. -// You can turn this off during development and/or for debug builds - -//#define WEBDEPLOY_DOMAIN_CHECK -//#define WEBDEPLOY_DOMAIN_ALLOW_DEBUG - -const char* gAllowedDomains[] = { - //"www.mydomain.com", - //"games.myotherdomain.com", - 0 //SENTINEL -}; \ No newline at end of file diff --git a/Templates/Empty/web/source/npplugin/mac/English.lproj/InfoPlist.strings b/Templates/Empty/web/source/npplugin/mac/English.lproj/InfoPlist.strings deleted file mode 100644 index 587f21ea6..000000000 Binary files a/Templates/Empty/web/source/npplugin/mac/English.lproj/InfoPlist.strings and /dev/null differ diff --git a/Templates/Empty/web/source/npplugin/mac/WebGamePlugin_Prefix.pch b/Templates/Empty/web/source/npplugin/mac/WebGamePlugin_Prefix.pch deleted file mode 100644 index d9c0295b2..000000000 --- a/Templates/Empty/web/source/npplugin/mac/WebGamePlugin_Prefix.pch +++ /dev/null @@ -1,5 +0,0 @@ -// -// Prefix header for all source files of the 'WebGamePlugin' target in the 'WebGamePlugin' project. -// - -#include diff --git a/Templates/Empty/web/source/npplugin/mac/npWebGamePlugin.h b/Templates/Empty/web/source/npplugin/mac/npWebGamePlugin.h deleted file mode 100644 index dda9759d4..000000000 --- a/Templates/Empty/web/source/npplugin/mac/npWebGamePlugin.h +++ /dev/null @@ -1,44 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -#pragma once - -#include "../../common/webCommon.h" - -class NPWebGamePlugin -{ -public: - - NPWebGamePlugin(NPP aInstance); - ~NPWebGamePlugin(); - - NPBool Open(NPWindow* aWindow); - void Close(); - NPBool IsOpen(); - - NPP mInstance; - bool mOpen; - - static NPWebGamePlugin* sInstance; -}; - - diff --git a/Templates/Empty/web/source/npplugin/mac/npWebGamePlugin.mm b/Templates/Empty/web/source/npplugin/mac/npWebGamePlugin.mm deleted file mode 100644 index 045209add..000000000 --- a/Templates/Empty/web/source/npplugin/mac/npWebGamePlugin.mm +++ /dev/null @@ -1,136 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -#include -#include - -#include "npWebGamePlugin.h" - -// Timer which ticks/renders Torque3D -static CFRunLoopTimerRef gTimer = NULL; - -static bool gHidden = false; - -static void timer_callback(CFRunLoopRef timer, void *info) -{ - - if (gHidden) - return; - - if (!torque_enginetick()) - { - //TODO: undefined when get quit from Torque 3D under Safari - } - -} - -NPWebGamePlugin* NPWebGamePlugin::sInstance = NULL; - -NPWebGamePlugin::NPWebGamePlugin(NPP aInstance) -{ - mOpen = FALSE; - mInstance = aInstance; - sInstance = this; -} - -NPWebGamePlugin::~NPWebGamePlugin() -{ - Close(); - sInstance = NULL; -} - -NPBool NPWebGamePlugin::Open(NPWindow* aWindow) -{ - gHidden = false; - - WebCommon::ChangeToGameDirectory(); - - if (mOpen || WebCommon::gTorque3DModule) - { - NP_CGContext *npcontext = reinterpret_cast (aWindow->window); - NSWindow* browserWindow = [[NSWindow alloc] initWithWindowRef:npcontext->window]; - torque_setsafariwindow( browserWindow, aWindow->clipRect.left, aWindow->clipRect.top, aWindow->clipRect.right - aWindow->clipRect.left, aWindow->clipRect.bottom - aWindow->clipRect.top ); - [browserWindow release]; - - mOpen = TRUE; - - return TRUE; - } - if (!aWindow) - return FALSE; - - mOpen = true; - - NP_CGContext *npcontext = reinterpret_cast (aWindow->window); - - // You may want to resize the browser window or set minimum sizes here for your web content - NSWindow* browserWindow = [[NSWindow alloc] initWithWindowRef:npcontext->window]; - - if (!browserWindow) - { - WebCommon::MessageBox( 0, "Web plugin unable to get browser window", "Error"); - return false; - } - - if (!WebCommon::InitTorque3D(browserWindow, aWindow->clipRect.left, aWindow->clipRect.top, aWindow->clipRect.right - aWindow->clipRect.left, aWindow->clipRect.bottom - aWindow->clipRect.top)) - return false; - - //setup high speed timer to tick Torque 3D - CFAllocatorRef allocator = kCFAllocatorDefault; - CFAbsoluteTime fireDate = CFAbsoluteTimeGetCurrent() + .001; - CFTimeInterval interval = .001; - CFOptionFlags flags = 0; - CFIndex order = 0; - CFRunLoopTimerCallBack callback = (CFRunLoopTimerCallBack)timer_callback; - CFRunLoopTimerContext context = { 0, NULL, NULL, NULL, NULL }; - gTimer = CFRunLoopTimerCreate(allocator, fireDate, interval, flags, order, callback, &context); - CFRunLoopAddTimer(CFRunLoopGetCurrent(), gTimer, kCFRunLoopDefaultMode); - - [browserWindow release]; - - return mOpen; -} - -void NPWebGamePlugin::Close() -{ - - if (!mOpen) - return; - - if (WebCommon::gTorque3DModule) - { - gHidden = true; - torque_setsafariwindow(NULL, 0, 0, 0, 0); - torque_reset(); - } - - //WebCommon::ShutdownTorque3D(); - - mOpen = false; -} - -NPBool NPWebGamePlugin::IsOpen() -{ - return mOpen; -} - - diff --git a/Templates/Empty/web/source/npplugin/npPlugin.cpp b/Templates/Empty/web/source/npplugin/npPlugin.cpp deleted file mode 100644 index 5f22d73a6..000000000 --- a/Templates/Empty/web/source/npplugin/npPlugin.cpp +++ /dev/null @@ -1,813 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -#include -#include - -#include "npWebGamePlugin.h" -#include "../common/webCommon.h" - -// Functions exported from the browser to our plugin -static NPNetscapeFuncs NPNFuncs; - -// Set once both the web page and plugin are fully loaded (including any possible Javascript <-> TorqueScript exports/imports) -static BOOL gInitialized = false; - -#ifndef WIN32 -// Entry points into our plugin for Safari -extern "C" { - -#pragma GCC visibility push(default) - -NPError NP_Initialize (NPNetscapeFuncs *browser); -NPError NP_GetEntryPoints (NPPluginFuncs *plugin); -NPError NP_Shutdown(); - -#pragma GCC visibility pop - -} -#endif - -// Converts a NPVARIANT variable to a C string representation -const char* MY_NPVARIANT_TO_STRING(const NPVariant& f) -{ - static std::string result; - char r[1024] = {0}; - - if (NPVARIANT_IS_VOID(f) || NPVARIANT_IS_NULL(f)) - return ""; - - if (NPVARIANT_IS_STRING(f)) - { - NPString str = NPVARIANT_TO_STRING(f); - result = std::string(str.UTF8Characters, str.UTF8Length); - return result.c_str(); - } - - if (NPVARIANT_IS_BOOLEAN(f)) - { - if (NPVARIANT_TO_BOOLEAN(f)) - return "1"; - return "0"; - } - - if (NPVARIANT_IS_INT32(f)) - { - sprintf(r, "%i", NPVARIANT_TO_INT32(f)); - result = r; - return result.c_str(); - } - - if (NPVARIANT_IS_DOUBLE(f)) - { - sprintf(r, "%f", NPVARIANT_TO_DOUBLE(f)); - result = r; - return result.c_str(); - } - - return ""; - -} - -// Javascript -> TorqueScript function calling (with parser) -const char* CallScript(const char* code) -{ - std::string scode = code; - const char* sig = scode.c_str(); - - // do not allow large strings which could be used maliciously - if (scode.length() > 255 || !gInitialized) - { - return ""; - } - - // data buffers for laying out data in a Torque 3D console friendly manner - char nameSpace[256]; - char fname[256]; - char argv[256][256]; - char* argvv[256]; - int argc = 0; - int argBegin = 0; - - memset(nameSpace, 0, 256); - memset(fname, 0, 256); - memset(argv, 0, 256 * 256); - - for (int i = 0; i < scode.length(); i++) - { - if (sig[i] == ')' || sig[i] == ';') - { - //scan out last arg is any - char dummy[256]; - memset(dummy, 0, 256); - - WebCommon::StringCopy(dummy, &sig[argBegin], i - argBegin); - - if (strlen(dummy)) - { - strcpy(argv[argc], dummy); - argvv[argc] = argv[argc]; - argc++; - } - - break; // done - } - - // handle namespace - if (sig[i]==':') - { - if (nameSpace[0] || fname[0]) - { - return ""; - } - - if (i > 0 && sig[i-1] == ':') - { - if (i - 2 > 0) - WebCommon::StringCopy(nameSpace, sig, i - 1); - } - - continue; - } - - // arguments begin - if (sig[i] == '(' ) - { - if (fname[0] || i < 1) - { - return ""; - } - - //everything before this is function name, minus nameSpace - if (nameSpace[0]) - { - int nlen = strlen(nameSpace); - WebCommon::StringCopy(fname, &sig[nlen + 2], i - nlen - 2); - } - else - { - WebCommon::StringCopy(fname, sig, i); - } - - WebCommon::StringCopy(argv[0], fname, strlen(fname)+1); - argvv[0] = argv[0]; - argc++; - - argBegin = i + 1; - } - - // argument - if (sig[i] == ',' ) - { - if (argBegin >= i || argc == 255) - { - return ""; - } - - WebCommon::StringCopy(argv[argc], &sig[argBegin], i - argBegin); - argvv[argc] = argv[argc]; - - argc++; - argBegin = i + 1; - } - - } - - static std::string retVal; - - if (fname[0]) - { - // call into the Torque 3D shared library (console system) and get return value - retVal = torque_callsecurefunction(nameSpace, fname, argc, (const char **) argvv); - return retVal.c_str(); - } - - return ""; -} - - -// TorqueScript -> JavaScript -const char* CallJavaScriptFunction(const char* name, int numArguments, const char* argv[]) -{ - // our plugin instance - NPP pNPInstance = NPWebGamePlugin::sInstance->mInstance; - - // holds the generated Javascript encoded as a NPString - NPString npScript; - - // retrieve our plugin object from the browser - NPObject* pluginObject; - - if (NPERR_NO_ERROR != NPNFuncs.getvalue(pNPInstance, NPNVPluginElementNPObject, &pluginObject)) - { - return NULL; - } - - // generate Javascript to be evaluated - std::string script = name; - script += "("; - for (int i = 1; i < numArguments; i++) - { - script += "\""; - script += argv[i]; - script += "\""; - if ( i + 1 < numArguments) - script += ", "; - } - script += ");"; - - //encode as a NPString - npScript.UTF8Characters = script.c_str(); - npScript.UTF8Length = script.length(); - - // finally, have browser evaluate our script and get the return value - NPVariant result; - NPNFuncs.evaluate(pNPInstance,pluginObject,&npScript,&result); - - return MY_NPVARIANT_TO_STRING(result); - -} - -// the sole entry point for Torque 3D console system into our browser plugin (handed over as a function pointer) -static const char * MyStringCallback(void *obj, int argc, const char* argv[]) -{ - static char ret[4096]; - strcpy(ret,CallJavaScriptFunction(argv[0], argc, argv)); - return ret; -} - - -// these can be added on the page before we're initialized, so we cache until we're ready for them -typedef struct -{ - std::string jsCallback; //javascript function name - unsigned int numArguments; //the number of arguments it takes -} JavasScriptExport; - -static std::vector gJavaScriptExports; - -// this actually exports the function to the Torque 3D console system -// we do this in two steps as we can't guarantee that Torque 3D is initialized on web page -// before JavaScript calls are made -void ExportFunctionInternal(const JavasScriptExport& jsexport) -{ - torque_exportstringcallback(MyStringCallback,"JS",jsexport.jsCallback.c_str(),"",jsexport.numArguments,jsexport.numArguments); -} - -// invoked via the Javascript plugin object startup() method once the page/plugin are fully loaded -void Startup() -{ - if (gInitialized) - return; - - // actually do the export on any cached functions - gInitialized = true; - std::vector::iterator i; - for (i = gJavaScriptExports.begin(); i != gJavaScriptExports.end();i++) - { - ExportFunctionInternal(*i); - } - - // setup the secure TorqueScript function calls we can call from Javascript (see webConfig.h) - WebCommon::AddSecureFunctions(); -} - -// Export a Javascript function to the Torque 3D console system, possibly caching it -void ExportFunction(const char* callback, int numArguments) -{ - JavasScriptExport jsexport; - jsexport.jsCallback = callback; - jsexport.numArguments = numArguments; - - if (!gInitialized) - { - //queue it up - gJavaScriptExports.push_back(jsexport); - } - else - { - ExportFunctionInternal(jsexport); - } -} - -// NP Plugin Interface - - -// Our plugin object structure "inherited" from NPObject -typedef struct -{ - // NPObject fields - NPClass *_class; - uint32_t referenceCount; - - // Here begins our custom fields (well, field) - - // Platform specific game plugin class (handles refresh, sizing, initialization of Torque 3D, etc) - NPWebGamePlugin* webPlugin; - -} PluginObject; - -static PluginObject* gPluginObject = NULL; - -// interface exports for our plugin that are expected to the browser - -void pluginInvalidate (); -bool pluginHasProperty (NPClass *theClass, NPIdentifier name); -bool pluginHasMethod (NPObject *npobj, NPIdentifier name); -bool pluginGetProperty (PluginObject *obj, NPIdentifier name, NPVariant *variant); -bool pluginSetProperty (PluginObject *obj, NPIdentifier name, const NPVariant *variant); -bool pluginInvoke (PluginObject *obj, NPIdentifier name, NPVariant *args, uint32_t argCount, NPVariant *result); -bool pluginInvokeDefault (PluginObject *obj, NPVariant *args, uint32_t argCount, NPVariant *result); -NPObject *pluginAllocate (NPP npp, NPClass *theClass); -void pluginDeallocate (PluginObject *obj); - -static NPClass _pluginFunctionPtrs = { - NP_CLASS_STRUCT_VERSION, - (NPAllocateFunctionPtr) pluginAllocate, - (NPDeallocateFunctionPtr) pluginDeallocate, - (NPInvalidateFunctionPtr) pluginInvalidate, - (NPHasMethodFunctionPtr) pluginHasMethod, - (NPInvokeFunctionPtr) pluginInvoke, - (NPInvokeDefaultFunctionPtr) pluginInvokeDefault, - (NPHasPropertyFunctionPtr) pluginHasProperty, - (NPGetPropertyFunctionPtr) pluginGetProperty, - (NPSetPropertyFunctionPtr) pluginSetProperty, -}; - -// versioning information - -static bool identifiersInitialized = false; - -#define ID_VERSION_PROPERTY 0 -#define NUM_PROPERTY_IDENTIFIERS 1 - -static NPIdentifier pluginPropertyIdentifiers[NUM_PROPERTY_IDENTIFIERS]; -static const NPUTF8 *pluginPropertyIdentifierNames[NUM_PROPERTY_IDENTIFIERS] = { - "version", -}; - -// methods that are callable on the plugin from Javascript - -#define ID_SETVARIABLE_METHOD 0 -#define ID_GETVARIABLE_METHOD 1 -#define ID_EXPORTFUNCTION_METHOD 2 -#define ID_CALLSCRIPT_METHOD 3 -#define ID_STARTUP_METHOD 4 -#define NUM_METHOD_IDENTIFIERS 5 - -static NPIdentifier pluginMethodIdentifiers[NUM_METHOD_IDENTIFIERS]; -static const NPUTF8 *pluginMethodIdentifierNames[NUM_METHOD_IDENTIFIERS] = { - "setVariable", - "getVariable", - "exportFunction", - "callScript", - "startup", -}; - -NPClass *getPluginClass(void) -{ - return &_pluginFunctionPtrs; -} - -// Sets up the property and method identifier arrays used by the browser -// via the hasProperty and hasMethod fuction pointers -static void initializeIdentifiers() -{ - // fill the property identifier array - NPNFuncs.getstringidentifiers(pluginPropertyIdentifierNames, - NUM_PROPERTY_IDENTIFIERS, - pluginPropertyIdentifiers); - - // fill the method identifier array - NPNFuncs.getstringidentifiers(pluginMethodIdentifierNames, - NUM_METHOD_IDENTIFIERS, - pluginMethodIdentifiers); -}; - -bool pluginHasProperty (NPClass *theClass, NPIdentifier name) -{ - for (int i = 0; i < NUM_PROPERTY_IDENTIFIERS; i++) { - if (name == pluginPropertyIdentifiers[i]) { - return true; - } - } - return false; -} - -bool pluginHasMethod(NPObject *npobj, NPIdentifier name) -{ - for (int i = 0; i < NUM_METHOD_IDENTIFIERS; i++) { - if (name == pluginMethodIdentifiers[i]) { - return true; - } - } - return false; -} - -// utility function that sets up a NPVariant from a std::string -void FillString(const std::string& src, NPVariant* variant) -{ - variant->type = NPVariantType_String; - variant->value.stringValue.UTF8Length = static_cast(src.length()); - variant->value.stringValue.UTF8Characters = reinterpret_cast(NPNFuncs.memalloc(src.size())); - memcpy((void*)variant->value.stringValue.UTF8Characters, src.c_str(), src.size()); -} - - -bool pluginGetProperty (PluginObject *obj, NPIdentifier name, NPVariant *variant) -{ - VOID_TO_NPVARIANT(*variant); - - if (name == pluginPropertyIdentifiers[ID_VERSION_PROPERTY]) { - FillString(std::string("1.0"), variant); - return true; - } - - //unknown property - return false; -} - -bool pluginSetProperty (PluginObject *obj, NPIdentifier name, const NPVariant *variant) -{ - - return false; -} - -// handle our plugin methods using standard np plugin conventions. -bool pluginInvoke (PluginObject *obj, NPIdentifier name, NPVariant *args, unsigned argCount, NPVariant *result) -{ - VOID_TO_NPVARIANT(*result); - - // sanity check - if (argCount > 16) - return false; - - // plugin.startup(); - called once web page is fully loaded and plugin (including Torque 3D) is initialized - if (name == pluginMethodIdentifiers[ID_STARTUP_METHOD]) { - result->type = NPVariantType_Void; - - Startup(); - return true; - } - // plugin.setVariable("$MyVariable", 42); - set a Torque 3D console variable - else if (name == pluginMethodIdentifiers[ID_SETVARIABLE_METHOD]) { - result->type = NPVariantType_Void; - if (argCount != 2) - return false; - - std::string arg0(MY_NPVARIANT_TO_STRING(args[0])); - std::string arg1(MY_NPVARIANT_TO_STRING(args[1])); - WebCommon::SetVariable(arg0.c_str(), arg1.c_str()); - return true; - } - // plugin.getVariable("$MyVariable"); - get a Torque 3D console variable - else if (name == pluginMethodIdentifiers[ID_GETVARIABLE_METHOD]) { - if (argCount != 1) - return false; - - std::string value; - std::string arg0(MY_NPVARIANT_TO_STRING(args[0])); - value = WebCommon::GetVariable(arg0.c_str()); - FillString(value, result); - - return true; - } - // plugin.exportFunction("MyJavascriptFunction",3); - export a Javascript function to the Torque 3D console system via its name and argument count - else if (name == pluginMethodIdentifiers[ID_EXPORTFUNCTION_METHOD]) { - result->type = NPVariantType_Void; - if (argCount != 2) - return false; - - std::string fname(MY_NPVARIANT_TO_STRING(args[0])); - - int argCount = 0; - - if (NPVARIANT_IS_DOUBLE(args[1])) - argCount = NPVARIANT_TO_DOUBLE(args[1]); - else - argCount = NPVARIANT_TO_INT32(args[1]); - - ExportFunction(fname.c_str(), argCount); - return true; - } - // var result = plugin.callScript("mySecureFunction('one', 'two', 'three');"); - call a TorqueScript function marked as secure in webConfig.h with supplied arguments - else if (name == pluginMethodIdentifiers[ID_CALLSCRIPT_METHOD]) { - - if (argCount != 1) - return false; - - std::string value; - std::string code(MY_NPVARIANT_TO_STRING(args[0])); - value = CallScript(code.c_str()); - FillString(value, result); - return true; - } - - - return false; -} - -bool pluginInvokeDefault (PluginObject *obj, NPVariant *args, unsigned argCount, NPVariant *result) -{ - VOID_TO_NPVARIANT(*result); - return false; -} - -void pluginInvalidate () -{ - // Make sure we've released any remaining references to JavaScript - // objects. -} - -NPObject *pluginAllocate (NPP npp, NPClass *theClass) -{ - - PluginObject *newInstance = new PluginObject; - - gPluginObject = newInstance; - - if (!identifiersInitialized) - { - identifiersInitialized = true; - initializeIdentifiers(); - } - - // platform specific NPWebGamePlugin instantiation - newInstance->webPlugin = new NPWebGamePlugin(npp); - - gInitialized = false; - gJavaScriptExports.clear(); - - return (NPObject *)newInstance; -} - -void pluginDeallocate (PluginObject *obj) -{ - delete obj; - gPluginObject = NULL; -} - -int32 NPP_Write (NPP instance, NPStream *stream, int32_t offset, int32_t len, void *buffer); - - -NPError OSCALL NP_GetEntryPoints(NPPluginFuncs* pFuncs) -{ - if (pFuncs == NULL) { - return NPERR_INVALID_FUNCTABLE_ERROR; - } - - // Safari sets the size field of pFuncs to 0 - if (pFuncs->size == 0) - pFuncs->size = sizeof(NPPluginFuncs); - if (pFuncs->size < sizeof(NPPluginFuncs)) { - return NPERR_INVALID_FUNCTABLE_ERROR; - } - - pFuncs->version = (NP_VERSION_MAJOR << 8) | NP_VERSION_MINOR; - pFuncs->newp = NPP_New; - pFuncs->destroy = NPP_Destroy; - pFuncs->setwindow = NPP_SetWindow; - pFuncs->newstream = NPP_NewStream; - pFuncs->destroystream = NPP_DestroyStream; - pFuncs->asfile = NPP_StreamAsFile; - pFuncs->writeready = NPP_WriteReady; - pFuncs->write = NPP_Write; - pFuncs->print = NPP_Print; - pFuncs->event = NPP_HandleEvent; - pFuncs->urlnotify = NPP_URLNotify; - pFuncs->getvalue = NPP_GetValue; - pFuncs->setvalue = NPP_SetValue; - pFuncs->javaClass = NULL; - - return NPERR_NO_ERROR; -} - -NPError OSCALL NP_Initialize(NPNetscapeFuncs* pFuncs) -{ - static bool _initialized = false; - if (!_initialized) { - _initialized = true; - } - - if (pFuncs == NULL) - return NPERR_INVALID_FUNCTABLE_ERROR; - - if ((pFuncs->version >> 8) > NP_VERSION_MAJOR) - return NPERR_INCOMPATIBLE_VERSION_ERROR; - - // Safari sets the pfuncs size to 0 - if (pFuncs->size == 0) - pFuncs->size = sizeof(NPNetscapeFuncs); - if (pFuncs->size < sizeof (NPNetscapeFuncs)) - return NPERR_INVALID_FUNCTABLE_ERROR; - - NPNFuncs = *pFuncs; - - return NPERR_NO_ERROR; -} - -NPError OSCALL NP_Shutdown() -{ - if (WebCommon::gTorque3DModule) - WebCommon::ShutdownTorque3D(); - - return NPERR_NO_ERROR; -} - - -NPError NPP_New(NPMIMEType pluginType, - NPP instance, uint16 mode, - int16 argc, char *argn[], - char *argv[], NPSavedData *saved) -{ - WebCommon::gPluginMIMEType = pluginType; - - if (gPluginObject) - { - WebCommon::MessageBox( 0, "This plugin allows only one instance", "Error"); - return NPERR_GENERIC_ERROR; - } - - // Get the location we're loading the plugin from (http://, file://) including address - // this is used by the domain locking feature to ensure that your plugin is only - // being used from your web site - - NPObject* windowObject = NULL; - NPNFuncs.getvalue( instance, NPNVWindowNPObject, &windowObject ); - - NPVariant variantValue; - NPIdentifier identifier = NPNFuncs.getstringidentifier( "location" ); - - if (!NPNFuncs.getproperty( instance, windowObject, identifier, &variantValue )) - return NPERR_GENERIC_ERROR; - - NPObject *locationObj = variantValue.value.objectValue; - - identifier = NPNFuncs.getstringidentifier( "href" ); - - if (!NPNFuncs.getproperty( instance, locationObj, identifier, &variantValue )) - return NPERR_GENERIC_ERROR; - - std::string url = MY_NPVARIANT_TO_STRING(variantValue); - - if (!WebCommon::CheckDomain(url.c_str())) - return NPERR_GENERIC_ERROR; - - // everything checks out, let's rock - - if (NPNFuncs.version >= 14) { - // this calls pluginAllocate - instance->pdata = NPNFuncs.createobject(instance, getPluginClass()); - } - -#ifndef WIN32 - // On Mac, make sure we're using CoreGraphics (otherwise 3D rendering fails) - NPNFuncs.setvalue(instance, (NPPVariable)NPNVpluginDrawingModel, (void *) NPDrawingModelCoreGraphics); -#endif - - //PluginObject *plugin = (PluginObject*)instance->pdata; - - return NPERR_NO_ERROR; -} - -// here is the place to clean up and destroy the object -NPError NPP_Destroy (NPP instance, NPSavedData** save) -{ - if (instance == NULL) - return NPERR_INVALID_INSTANCE_ERROR; - - if (instance->pdata != NULL) { - PluginObject *plugin = (PluginObject *)instance->pdata; - delete plugin->webPlugin; - - NPNFuncs.releaseobject((NPObject*) instance->pdata); - instance->pdata = NULL; - } - return NPERR_NO_ERROR; -} - -NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value) -{ - if (variable == NPPVpluginScriptableNPObject) { - - if (instance->pdata == NULL) { - instance->pdata = NPNFuncs.createobject(instance, getPluginClass()); - } - - NPObject* obj = reinterpret_cast(instance->pdata); - NPNFuncs.retainobject(obj); - void **v = (void **)value; - *v = obj; - return NPERR_NO_ERROR; - } - - return NPERR_GENERIC_ERROR; -} - -NPError NPP_SetValue(NPP instance, NPNVariable variable, void *value) -{ - return NPERR_GENERIC_ERROR; -} - -NPError NPP_NewStream(NPP instance, - NPMIMEType type, - NPStream* stream, - NPBool seekable, - uint16* stype) -{ - if(instance == NULL) - return NPERR_INVALID_INSTANCE_ERROR; - - return NPERR_NO_ERROR; -} - -int32 NPP_WriteReady (NPP instance, NPStream *stream) -{ - if (instance == NULL) - return NPERR_INVALID_INSTANCE_ERROR; - - return 0x0fffffff; -} - -int32 NPP_Write (NPP instance, NPStream *stream, int32_t offset, int32_t len, void *buffer) -{ - if (instance == NULL) - return NPERR_INVALID_INSTANCE_ERROR; - - return NPERR_NO_ERROR; -} - -NPError NPP_DestroyStream (NPP instance, NPStream *stream, NPError reason) -{ - if(instance == NULL) - return NPERR_INVALID_INSTANCE_ERROR; - - return NPERR_NO_ERROR; -} - - -void NPP_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData) -{ - -} - -void NPP_StreamAsFile (NPP instance, NPStream* stream, const char* fname) -{ -} - -void NPP_Print (NPP instance, NPPrint* printInfo) -{ -} - -int16 NPP_HandleEvent(NPP instance, void* event) -{ - return 0; -} -// browser communicated window changes (creation, etc) here -NPError NPP_SetWindow(NPP instance, NPWindow* window) -{ - // strange... - if (!window || !window->window) - return NPERR_GENERIC_ERROR; - // strange... - if (!instance) - return NPERR_INVALID_INSTANCE_ERROR; - - // get back the plugin instance object - PluginObject *plugin = (PluginObject *)instance->pdata; - NPWebGamePlugin* webPlugin = plugin->webPlugin; - if (webPlugin) { - if (!window->window) { - - } - else { - - // handle platform specific window and Torque 3D initialization - webPlugin->Open(window); - } - - return NPERR_NO_ERROR; - } - - // return an error if no object defined - return NPERR_GENERIC_ERROR; -} diff --git a/Templates/Empty/web/source/npplugin/windows/NPWebGamePlugin.rc b/Templates/Empty/web/source/npplugin/windows/NPWebGamePlugin.rc deleted file mode 100644 index 46f308fca..000000000 --- a/Templates/Empty/web/source/npplugin/windows/NPWebGamePlugin.rc +++ /dev/null @@ -1,106 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "windows.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0 - PRODUCTVERSION 1,0 - FILEFLAGSMASK 0x17L -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904e4" - BEGIN - VALUE "PluginType", "Mozilla" - VALUE "FileDescription", "My Web Game Plugin 1.0" - VALUE "FileExtents", "*" - VALUE "FileVersion", "1,0" - VALUE "InternalName", "My Web Game" - VALUE "MIMEType", "application/x-emptytemplateplugin" - VALUE "OriginalFilename", "NP Empty Plugin.dll" - VALUE "ProductName", "My Web Game" - VALUE "ProductVersion", "1,0" - VALUE "CompanyName", "My Game Company" - VALUE "CompanyKey", "mygamecompany" - VALUE "Plugin", "WebEmptyTemplate" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1252 - END -END - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""windows.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/Templates/Empty/web/source/npplugin/windows/jni.h b/Templates/Empty/web/source/npplugin/windows/jni.h deleted file mode 100644 index 6105e030b..000000000 --- a/Templates/Empty/web/source/npplugin/windows/jni.h +++ /dev/null @@ -1,1973 +0,0 @@ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (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.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Java Runtime Interface. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation and Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 1993-1996 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#ifndef JNI_H -#define JNI_H - -#include -#include - -/* jni_md.h contains the machine-dependent typedefs for jbyte, jint - and jlong */ - -#include "jni_md.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * JNI Types - */ - -typedef unsigned char jboolean; -typedef unsigned short jchar; -typedef short jshort; -typedef float jfloat; -typedef double jdouble; - -typedef jint jsize; - -#ifdef __cplusplus - -class _jobject {}; -class _jclass : public _jobject {}; -class _jthrowable : public _jobject {}; -class _jstring : public _jobject {}; -class _jarray : public _jobject {}; -class _jbooleanArray : public _jarray {}; -class _jbyteArray : public _jarray {}; -class _jcharArray : public _jarray {}; -class _jshortArray : public _jarray {}; -class _jintArray : public _jarray {}; -class _jlongArray : public _jarray {}; -class _jfloatArray : public _jarray {}; -class _jdoubleArray : public _jarray {}; -class _jobjectArray : public _jarray {}; - -typedef _jobject *jobject; -typedef _jclass *jclass; -typedef _jthrowable *jthrowable; -typedef _jstring *jstring; -typedef _jarray *jarray; -typedef _jbooleanArray *jbooleanArray; -typedef _jbyteArray *jbyteArray; -typedef _jcharArray *jcharArray; -typedef _jshortArray *jshortArray; -typedef _jintArray *jintArray; -typedef _jlongArray *jlongArray; -typedef _jfloatArray *jfloatArray; -typedef _jdoubleArray *jdoubleArray; -typedef _jobjectArray *jobjectArray; - -#else - -struct _jobject; - -typedef struct _jobject *jobject; -typedef jobject jclass; -typedef jobject jthrowable; -typedef jobject jstring; -typedef jobject jarray; -typedef jarray jbooleanArray; -typedef jarray jbyteArray; -typedef jarray jcharArray; -typedef jarray jshortArray; -typedef jarray jintArray; -typedef jarray jlongArray; -typedef jarray jfloatArray; -typedef jarray jdoubleArray; -typedef jarray jobjectArray; - -#endif - -typedef jobject jweak; - -#if 0 /* moved to jri_md.h */ -typedef jobject jref; /* For transition---not meant to be part of public - API anymore.*/ -#endif - -typedef union jvalue { - jboolean z; - jbyte b; - jchar c; - jshort s; - jint i; - jlong j; - jfloat f; - jdouble d; - jobject l; -} jvalue; - -struct _jfieldID; -typedef struct _jfieldID *jfieldID; - -struct _jmethodID; -typedef struct _jmethodID *jmethodID; - -/* - * jboolean constants - */ - -#define JNI_FALSE 0 -#define JNI_TRUE 1 - -/* - * possible return values for JNI functions. - */ - -#define JNI_OK 0 /* success */ -#define JNI_ERR (-1) /* unknown error */ -#define JNI_EDETACHED (-2) /* thread detached from the VM */ -#define JNI_EVERSION (-3) /* JNI version error */ -#define JNI_ENOMEM (-4) /* not enough memory */ -#define JNI_EEXIST (-5) /* VM already created */ -#define JNI_EINVAL (-6) /* invalid arguments */ - -/* - * used in ReleaseScalarArrayElements - */ - -#define JNI_COMMIT 1 -#define JNI_ABORT 2 - -/* - * used in RegisterNatives to describe native method name, signature, - * and function pointer. - */ - -typedef struct { - char *name; - char *signature; - void *fnPtr; -} JNINativeMethod; - -/* - * JNI Native Method Interface. - */ - -struct JNINativeInterface_; - -struct JNIEnv_; - -#ifdef __cplusplus -typedef JNIEnv_ JNIEnv; -#else -typedef const struct JNINativeInterface_ *JNIEnv; -#endif - -/* - * JNI Invocation Interface. - */ - -struct JNIInvokeInterface_; - -struct JavaVM_; - -#ifdef __cplusplus -typedef JavaVM_ JavaVM; -#else -typedef const struct JNIInvokeInterface_ *JavaVM; -#endif - -struct JNINativeInterface_ { - void *reserved0; - void *reserved1; - void *reserved2; - - void *reserved3; - jint (JNICALL *GetVersion)(JNIEnv *env); - - jclass (JNICALL *DefineClass) - (JNIEnv *env, const char *name, jobject loader, const jbyte *buf, - jsize len); - jclass (JNICALL *FindClass) - (JNIEnv *env, const char *name); - - jmethodID (JNICALL *FromReflectedMethod) - (JNIEnv *env, jobject method); - jfieldID (JNICALL *FromReflectedField) - (JNIEnv *env, jobject field); - - jobject (JNICALL *ToReflectedMethod) - (JNIEnv *env, jclass cls, jmethodID methodID, jboolean isStatic); - - jclass (JNICALL *GetSuperclass) - (JNIEnv *env, jclass sub); - jboolean (JNICALL *IsAssignableFrom) - (JNIEnv *env, jclass sub, jclass sup); - - jobject (JNICALL *ToReflectedField) - (JNIEnv *env, jclass cls, jfieldID fieldID, jboolean isStatic); - - jint (JNICALL *Throw) - (JNIEnv *env, jthrowable obj); - jint (JNICALL *ThrowNew) - (JNIEnv *env, jclass clazz, const char *msg); - jthrowable (JNICALL *ExceptionOccurred) - (JNIEnv *env); - void (JNICALL *ExceptionDescribe) - (JNIEnv *env); - void (JNICALL *ExceptionClear) - (JNIEnv *env); - void (JNICALL *FatalError) - (JNIEnv *env, const char *msg); - - jint (JNICALL *PushLocalFrame) - (JNIEnv *env, jint capacity); - jobject (JNICALL *PopLocalFrame) - (JNIEnv *env, jobject result); - - jobject (JNICALL *NewGlobalRef) - (JNIEnv *env, jobject lobj); - void (JNICALL *DeleteGlobalRef) - (JNIEnv *env, jobject gref); - void (JNICALL *DeleteLocalRef) - (JNIEnv *env, jobject obj); - jboolean (JNICALL *IsSameObject) - (JNIEnv *env, jobject obj1, jobject obj2); - jobject (JNICALL *NewLocalRef) - (JNIEnv *env, jobject ref); - jint (JNICALL *EnsureLocalCapacity) - (JNIEnv *env, jint capacity); - - jobject (JNICALL *AllocObject) - (JNIEnv *env, jclass clazz); - jobject (JNICALL *NewObject) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jobject (JNICALL *NewObjectV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jobject (JNICALL *NewObjectA) - (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); - - jclass (JNICALL *GetObjectClass) - (JNIEnv *env, jobject obj); - jboolean (JNICALL *IsInstanceOf) - (JNIEnv *env, jobject obj, jclass clazz); - - jmethodID (JNICALL *GetMethodID) - (JNIEnv *env, jclass clazz, const char *name, const char *sig); - - jobject (JNICALL *CallObjectMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jobject (JNICALL *CallObjectMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jobject (JNICALL *CallObjectMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args); - - jboolean (JNICALL *CallBooleanMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jboolean (JNICALL *CallBooleanMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jboolean (JNICALL *CallBooleanMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args); - - jbyte (JNICALL *CallByteMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jbyte (JNICALL *CallByteMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jbyte (JNICALL *CallByteMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args); - - jchar (JNICALL *CallCharMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jchar (JNICALL *CallCharMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jchar (JNICALL *CallCharMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args); - - jshort (JNICALL *CallShortMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jshort (JNICALL *CallShortMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jshort (JNICALL *CallShortMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args); - - jint (JNICALL *CallIntMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jint (JNICALL *CallIntMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jint (JNICALL *CallIntMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args); - - jlong (JNICALL *CallLongMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jlong (JNICALL *CallLongMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jlong (JNICALL *CallLongMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args); - - jfloat (JNICALL *CallFloatMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jfloat (JNICALL *CallFloatMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jfloat (JNICALL *CallFloatMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args); - - jdouble (JNICALL *CallDoubleMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jdouble (JNICALL *CallDoubleMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jdouble (JNICALL *CallDoubleMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args); - - void (JNICALL *CallVoidMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - void (JNICALL *CallVoidMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - void (JNICALL *CallVoidMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args); - - jobject (JNICALL *CallNonvirtualObjectMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jobject (JNICALL *CallNonvirtualObjectMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jobject (JNICALL *CallNonvirtualObjectMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - jvalue * args); - - jboolean (JNICALL *CallNonvirtualBooleanMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jboolean (JNICALL *CallNonvirtualBooleanMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jboolean (JNICALL *CallNonvirtualBooleanMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - jvalue * args); - - jbyte (JNICALL *CallNonvirtualByteMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jbyte (JNICALL *CallNonvirtualByteMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jbyte (JNICALL *CallNonvirtualByteMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - jvalue *args); - - jchar (JNICALL *CallNonvirtualCharMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jchar (JNICALL *CallNonvirtualCharMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jchar (JNICALL *CallNonvirtualCharMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - jvalue *args); - - jshort (JNICALL *CallNonvirtualShortMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jshort (JNICALL *CallNonvirtualShortMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jshort (JNICALL *CallNonvirtualShortMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - jvalue *args); - - jint (JNICALL *CallNonvirtualIntMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jint (JNICALL *CallNonvirtualIntMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jint (JNICALL *CallNonvirtualIntMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - jvalue *args); - - jlong (JNICALL *CallNonvirtualLongMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jlong (JNICALL *CallNonvirtualLongMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jlong (JNICALL *CallNonvirtualLongMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - jvalue *args); - - jfloat (JNICALL *CallNonvirtualFloatMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jfloat (JNICALL *CallNonvirtualFloatMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jfloat (JNICALL *CallNonvirtualFloatMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - jvalue *args); - - jdouble (JNICALL *CallNonvirtualDoubleMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jdouble (JNICALL *CallNonvirtualDoubleMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jdouble (JNICALL *CallNonvirtualDoubleMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - jvalue *args); - - void (JNICALL *CallNonvirtualVoidMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - void (JNICALL *CallNonvirtualVoidMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - void (JNICALL *CallNonvirtualVoidMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - jvalue * args); - - jfieldID (JNICALL *GetFieldID) - (JNIEnv *env, jclass clazz, const char *name, const char *sig); - - jobject (JNICALL *GetObjectField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jboolean (JNICALL *GetBooleanField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jbyte (JNICALL *GetByteField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jchar (JNICALL *GetCharField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jshort (JNICALL *GetShortField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jint (JNICALL *GetIntField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jlong (JNICALL *GetLongField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jfloat (JNICALL *GetFloatField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jdouble (JNICALL *GetDoubleField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - - void (JNICALL *SetObjectField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jobject val); - void (JNICALL *SetBooleanField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jboolean val); - void (JNICALL *SetByteField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jbyte val); - void (JNICALL *SetCharField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jchar val); - void (JNICALL *SetShortField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jshort val); - void (JNICALL *SetIntField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jint val); - void (JNICALL *SetLongField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jlong val); - void (JNICALL *SetFloatField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jfloat val); - void (JNICALL *SetDoubleField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jdouble val); - - jmethodID (JNICALL *GetStaticMethodID) - (JNIEnv *env, jclass clazz, const char *name, const char *sig); - - jobject (JNICALL *CallStaticObjectMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jobject (JNICALL *CallStaticObjectMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jobject (JNICALL *CallStaticObjectMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); - - jboolean (JNICALL *CallStaticBooleanMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jboolean (JNICALL *CallStaticBooleanMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jboolean (JNICALL *CallStaticBooleanMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); - - jbyte (JNICALL *CallStaticByteMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jbyte (JNICALL *CallStaticByteMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jbyte (JNICALL *CallStaticByteMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); - - jchar (JNICALL *CallStaticCharMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jchar (JNICALL *CallStaticCharMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jchar (JNICALL *CallStaticCharMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); - - jshort (JNICALL *CallStaticShortMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jshort (JNICALL *CallStaticShortMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jshort (JNICALL *CallStaticShortMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); - - jint (JNICALL *CallStaticIntMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jint (JNICALL *CallStaticIntMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jint (JNICALL *CallStaticIntMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); - - jlong (JNICALL *CallStaticLongMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jlong (JNICALL *CallStaticLongMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jlong (JNICALL *CallStaticLongMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); - - jfloat (JNICALL *CallStaticFloatMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jfloat (JNICALL *CallStaticFloatMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jfloat (JNICALL *CallStaticFloatMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); - - jdouble (JNICALL *CallStaticDoubleMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jdouble (JNICALL *CallStaticDoubleMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jdouble (JNICALL *CallStaticDoubleMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args); - - void (JNICALL *CallStaticVoidMethod) - (JNIEnv *env, jclass cls, jmethodID methodID, ...); - void (JNICALL *CallStaticVoidMethodV) - (JNIEnv *env, jclass cls, jmethodID methodID, va_list args); - void (JNICALL *CallStaticVoidMethodA) - (JNIEnv *env, jclass cls, jmethodID methodID, jvalue * args); - - jfieldID (JNICALL *GetStaticFieldID) - (JNIEnv *env, jclass clazz, const char *name, const char *sig); - jobject (JNICALL *GetStaticObjectField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jboolean (JNICALL *GetStaticBooleanField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jbyte (JNICALL *GetStaticByteField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jchar (JNICALL *GetStaticCharField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jshort (JNICALL *GetStaticShortField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jint (JNICALL *GetStaticIntField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jlong (JNICALL *GetStaticLongField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jfloat (JNICALL *GetStaticFloatField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jdouble (JNICALL *GetStaticDoubleField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - - void (JNICALL *SetStaticObjectField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value); - void (JNICALL *SetStaticBooleanField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value); - void (JNICALL *SetStaticByteField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jbyte value); - void (JNICALL *SetStaticCharField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jchar value); - void (JNICALL *SetStaticShortField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value); - void (JNICALL *SetStaticIntField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jint value); - void (JNICALL *SetStaticLongField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jlong value); - void (JNICALL *SetStaticFloatField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value); - void (JNICALL *SetStaticDoubleField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value); - - jstring (JNICALL *NewString) - (JNIEnv *env, const jchar *unicode, jsize len); - jsize (JNICALL *GetStringLength) - (JNIEnv *env, jstring str); - const jchar *(JNICALL *GetStringChars) - (JNIEnv *env, jstring str, jboolean *isCopy); - void (JNICALL *ReleaseStringChars) - (JNIEnv *env, jstring str, const jchar *chars); - - jstring (JNICALL *NewStringUTF) - (JNIEnv *env, const char *utf); - jsize (JNICALL *GetStringUTFLength) - (JNIEnv *env, jstring str); - const char* (JNICALL *GetStringUTFChars) - (JNIEnv *env, jstring str, jboolean *isCopy); - void (JNICALL *ReleaseStringUTFChars) - (JNIEnv *env, jstring str, const char* chars); - - - jsize (JNICALL *GetArrayLength) - (JNIEnv *env, jarray array); - - jobjectArray (JNICALL *NewObjectArray) - (JNIEnv *env, jsize len, jclass clazz, jobject init); - jobject (JNICALL *GetObjectArrayElement) - (JNIEnv *env, jobjectArray array, jsize index); - void (JNICALL *SetObjectArrayElement) - (JNIEnv *env, jobjectArray array, jsize index, jobject val); - - jbooleanArray (JNICALL *NewBooleanArray) - (JNIEnv *env, jsize len); - jbyteArray (JNICALL *NewByteArray) - (JNIEnv *env, jsize len); - jcharArray (JNICALL *NewCharArray) - (JNIEnv *env, jsize len); - jshortArray (JNICALL *NewShortArray) - (JNIEnv *env, jsize len); - jintArray (JNICALL *NewIntArray) - (JNIEnv *env, jsize len); - jlongArray (JNICALL *NewLongArray) - (JNIEnv *env, jsize len); - jfloatArray (JNICALL *NewFloatArray) - (JNIEnv *env, jsize len); - jdoubleArray (JNICALL *NewDoubleArray) - (JNIEnv *env, jsize len); - - jboolean * (JNICALL *GetBooleanArrayElements) - (JNIEnv *env, jbooleanArray array, jboolean *isCopy); - jbyte * (JNICALL *GetByteArrayElements) - (JNIEnv *env, jbyteArray array, jboolean *isCopy); - jchar * (JNICALL *GetCharArrayElements) - (JNIEnv *env, jcharArray array, jboolean *isCopy); - jshort * (JNICALL *GetShortArrayElements) - (JNIEnv *env, jshortArray array, jboolean *isCopy); - jint * (JNICALL *GetIntArrayElements) - (JNIEnv *env, jintArray array, jboolean *isCopy); - jlong * (JNICALL *GetLongArrayElements) - (JNIEnv *env, jlongArray array, jboolean *isCopy); - jfloat * (JNICALL *GetFloatArrayElements) - (JNIEnv *env, jfloatArray array, jboolean *isCopy); - jdouble * (JNICALL *GetDoubleArrayElements) - (JNIEnv *env, jdoubleArray array, jboolean *isCopy); - - void (JNICALL *ReleaseBooleanArrayElements) - (JNIEnv *env, jbooleanArray array, jboolean *elems, jint mode); - void (JNICALL *ReleaseByteArrayElements) - (JNIEnv *env, jbyteArray array, jbyte *elems, jint mode); - void (JNICALL *ReleaseCharArrayElements) - (JNIEnv *env, jcharArray array, jchar *elems, jint mode); - void (JNICALL *ReleaseShortArrayElements) - (JNIEnv *env, jshortArray array, jshort *elems, jint mode); - void (JNICALL *ReleaseIntArrayElements) - (JNIEnv *env, jintArray array, jint *elems, jint mode); - void (JNICALL *ReleaseLongArrayElements) - (JNIEnv *env, jlongArray array, jlong *elems, jint mode); - void (JNICALL *ReleaseFloatArrayElements) - (JNIEnv *env, jfloatArray array, jfloat *elems, jint mode); - void (JNICALL *ReleaseDoubleArrayElements) - (JNIEnv *env, jdoubleArray array, jdouble *elems, jint mode); - - void (JNICALL *GetBooleanArrayRegion) - (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf); - void (JNICALL *GetByteArrayRegion) - (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf); - void (JNICALL *GetCharArrayRegion) - (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf); - void (JNICALL *GetShortArrayRegion) - (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf); - void (JNICALL *GetIntArrayRegion) - (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf); - void (JNICALL *GetLongArrayRegion) - (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf); - void (JNICALL *GetFloatArrayRegion) - (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf); - void (JNICALL *GetDoubleArrayRegion) - (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf); - - void (JNICALL *SetBooleanArrayRegion) - (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf); - void (JNICALL *SetByteArrayRegion) - (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf); - void (JNICALL *SetCharArrayRegion) - (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf); - void (JNICALL *SetShortArrayRegion) - (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf); - void (JNICALL *SetIntArrayRegion) - (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf); - void (JNICALL *SetLongArrayRegion) - (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf); - void (JNICALL *SetFloatArrayRegion) - (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf); - void (JNICALL *SetDoubleArrayRegion) - (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf); - - jint (JNICALL *RegisterNatives) - (JNIEnv *env, jclass clazz, const JNINativeMethod *methods, - jint nMethods); - jint (JNICALL *UnregisterNatives) - (JNIEnv *env, jclass clazz); - - jint (JNICALL *MonitorEnter) - (JNIEnv *env, jobject obj); - jint (JNICALL *MonitorExit) - (JNIEnv *env, jobject obj); - - jint (JNICALL *GetJavaVM) - (JNIEnv *env, JavaVM **vm); - - void (JNICALL *GetStringRegion) - (JNIEnv *env, jstring str, jsize start, jsize len, jchar *buf); - void (JNICALL *GetStringUTFRegion) - (JNIEnv *env, jstring str, jsize start, jsize len, char *buf); - - void * (JNICALL *GetPrimitiveArrayCritical) - (JNIEnv *env, jarray array, jboolean *isCopy); - void (JNICALL *ReleasePrimitiveArrayCritical) - (JNIEnv *env, jarray array, void *carray, jint mode); - - const jchar * (JNICALL *GetStringCritical) - (JNIEnv *env, jstring string, jboolean *isCopy); - void (JNICALL *ReleaseStringCritical) - (JNIEnv *env, jstring string, const jchar *cstring); - - jweak (JNICALL *NewWeakGlobalRef) - (JNIEnv *env, jobject obj); - void (JNICALL *DeleteWeakGlobalRef) - (JNIEnv *env, jweak ref); - - jboolean (JNICALL *ExceptionCheck) - (JNIEnv *env); - - jobject (JNICALL *NewDirectByteBuffer) - (JNIEnv* env, void* address, jlong capacity); - void* (JNICALL *GetDirectBufferAddress) - (JNIEnv* env, jobject buf); - jlong (JNICALL *GetDirectBufferCapacity) - (JNIEnv* env, jobject buf); -}; - -/* - * We use inlined functions for C++ so that programmers can write: - * - * env->FindClass("java/lang/String") - * - * in C++ rather than: - * - * (*env)->FindClass(env, "java/lang/String") - * - * in C. - */ - -struct JNIEnv_ { - const struct JNINativeInterface_ *functions; -#ifdef __cplusplus - - jint GetVersion() { - return functions->GetVersion(this); - } - jclass DefineClass(const char *name, jobject loader, const jbyte *buf, - jsize len) { - return functions->DefineClass(this, name, loader, buf, len); - } - jclass FindClass(const char *name) { - return functions->FindClass(this, name); - } - jmethodID FromReflectedMethod(jobject method) { - return functions->FromReflectedMethod(this,method); - } - jfieldID FromReflectedField(jobject field) { - return functions->FromReflectedField(this,field); - } - - jobject ToReflectedMethod(jclass cls, jmethodID methodID, jboolean isStatic) { - return functions->ToReflectedMethod(this, cls, methodID, isStatic); - } - - jclass GetSuperclass(jclass sub) { - return functions->GetSuperclass(this, sub); - } - jboolean IsAssignableFrom(jclass sub, jclass sup) { - return functions->IsAssignableFrom(this, sub, sup); - } - - jobject ToReflectedField(jclass cls, jfieldID fieldID, jboolean isStatic) { - return functions->ToReflectedField(this,cls,fieldID,isStatic); - } - - jint Throw(jthrowable obj) { - return functions->Throw(this, obj); - } - jint ThrowNew(jclass clazz, const char *msg) { - return functions->ThrowNew(this, clazz, msg); - } - jthrowable ExceptionOccurred() { - return functions->ExceptionOccurred(this); - } - void ExceptionDescribe() { - functions->ExceptionDescribe(this); - } - void ExceptionClear() { - functions->ExceptionClear(this); - } - void FatalError(const char *msg) { - functions->FatalError(this, msg); - } - - jint PushLocalFrame(jint capacity) { - return functions->PushLocalFrame(this,capacity); - } - jobject PopLocalFrame(jobject result) { - return functions->PopLocalFrame(this,result); - } - - jobject NewGlobalRef(jobject lobj) { - return functions->NewGlobalRef(this,lobj); - } - void DeleteGlobalRef(jobject gref) { - functions->DeleteGlobalRef(this,gref); - } - void DeleteLocalRef(jobject obj) { - functions->DeleteLocalRef(this, obj); - } - - jboolean IsSameObject(jobject obj1, jobject obj2) { - return functions->IsSameObject(this,obj1,obj2); - } - - jobject NewLocalRef(jobject ref) { - return functions->NewLocalRef(this,ref); - } - jint EnsureLocalCapacity(jint capacity) { - return functions->EnsureLocalCapacity(this,capacity); - } - - jobject AllocObject(jclass clazz) { - return functions->AllocObject(this,clazz); - } - jobject NewObject(jclass clazz, jmethodID methodID, ...) { - va_list args; - jobject result; - va_start(args, methodID); - result = functions->NewObjectV(this,clazz,methodID,args); - va_end(args); - return result; - } - jobject NewObjectV(jclass clazz, jmethodID methodID, - va_list args) { - return functions->NewObjectV(this,clazz,methodID,args); - } - jobject NewObjectA(jclass clazz, jmethodID methodID, - jvalue *args) { - return functions->NewObjectA(this,clazz,methodID,args); - } - - jclass GetObjectClass(jobject obj) { - return functions->GetObjectClass(this,obj); - } - jboolean IsInstanceOf(jobject obj, jclass clazz) { - return functions->IsInstanceOf(this,obj,clazz); - } - - jmethodID GetMethodID(jclass clazz, const char *name, - const char *sig) { - return functions->GetMethodID(this,clazz,name,sig); - } - - jobject CallObjectMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jobject result; - va_start(args,methodID); - result = functions->CallObjectMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jobject CallObjectMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallObjectMethodV(this,obj,methodID,args); - } - jobject CallObjectMethodA(jobject obj, jmethodID methodID, - jvalue * args) { - return functions->CallObjectMethodA(this,obj,methodID,args); - } - - jboolean CallBooleanMethod(jobject obj, - jmethodID methodID, ...) { - va_list args; - jboolean result; - va_start(args,methodID); - result = functions->CallBooleanMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jboolean CallBooleanMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallBooleanMethodV(this,obj,methodID,args); - } - jboolean CallBooleanMethodA(jobject obj, jmethodID methodID, - jvalue * args) { - return functions->CallBooleanMethodA(this,obj,methodID, args); - } - - jbyte CallByteMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jbyte result; - va_start(args,methodID); - result = functions->CallByteMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jbyte CallByteMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallByteMethodV(this,obj,methodID,args); - } - jbyte CallByteMethodA(jobject obj, jmethodID methodID, - jvalue * args) { - return functions->CallByteMethodA(this,obj,methodID,args); - } - - jchar CallCharMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jchar result; - va_start(args,methodID); - result = functions->CallCharMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jchar CallCharMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallCharMethodV(this,obj,methodID,args); - } - jchar CallCharMethodA(jobject obj, jmethodID methodID, - jvalue * args) { - return functions->CallCharMethodA(this,obj,methodID,args); - } - - jshort CallShortMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jshort result; - va_start(args,methodID); - result = functions->CallShortMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jshort CallShortMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallShortMethodV(this,obj,methodID,args); - } - jshort CallShortMethodA(jobject obj, jmethodID methodID, - jvalue * args) { - return functions->CallShortMethodA(this,obj,methodID,args); - } - - jint CallIntMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jint result; - va_start(args,methodID); - result = functions->CallIntMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jint CallIntMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallIntMethodV(this,obj,methodID,args); - } - jint CallIntMethodA(jobject obj, jmethodID methodID, - jvalue * args) { - return functions->CallIntMethodA(this,obj,methodID,args); - } - - jlong CallLongMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jlong result; - va_start(args,methodID); - result = functions->CallLongMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jlong CallLongMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallLongMethodV(this,obj,methodID,args); - } - jlong CallLongMethodA(jobject obj, jmethodID methodID, - jvalue * args) { - return functions->CallLongMethodA(this,obj,methodID,args); - } - - jfloat CallFloatMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jfloat result; - va_start(args,methodID); - result = functions->CallFloatMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jfloat CallFloatMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallFloatMethodV(this,obj,methodID,args); - } - jfloat CallFloatMethodA(jobject obj, jmethodID methodID, - jvalue * args) { - return functions->CallFloatMethodA(this,obj,methodID,args); - } - - jdouble CallDoubleMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jdouble result; - va_start(args,methodID); - result = functions->CallDoubleMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jdouble CallDoubleMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallDoubleMethodV(this,obj,methodID,args); - } - jdouble CallDoubleMethodA(jobject obj, jmethodID methodID, - jvalue * args) { - return functions->CallDoubleMethodA(this,obj,methodID,args); - } - - void CallVoidMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - va_start(args,methodID); - functions->CallVoidMethodV(this,obj,methodID,args); - va_end(args); - } - void CallVoidMethodV(jobject obj, jmethodID methodID, - va_list args) { - functions->CallVoidMethodV(this,obj,methodID,args); - } - void CallVoidMethodA(jobject obj, jmethodID methodID, - jvalue * args) { - functions->CallVoidMethodA(this,obj,methodID,args); - } - - jobject CallNonvirtualObjectMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jobject result; - va_start(args,methodID); - result = functions->CallNonvirtualObjectMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jobject CallNonvirtualObjectMethodV(jobject obj, jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallNonvirtualObjectMethodV(this,obj,clazz, - methodID,args); - } - jobject CallNonvirtualObjectMethodA(jobject obj, jclass clazz, - jmethodID methodID, jvalue * args) { - return functions->CallNonvirtualObjectMethodA(this,obj,clazz, - methodID,args); - } - - jboolean CallNonvirtualBooleanMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jboolean result; - va_start(args,methodID); - result = functions->CallNonvirtualBooleanMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jboolean CallNonvirtualBooleanMethodV(jobject obj, jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallNonvirtualBooleanMethodV(this,obj,clazz, - methodID,args); - } - jboolean CallNonvirtualBooleanMethodA(jobject obj, jclass clazz, - jmethodID methodID, jvalue * args) { - return functions->CallNonvirtualBooleanMethodA(this,obj,clazz, - methodID, args); - } - - jbyte CallNonvirtualByteMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jbyte result; - va_start(args,methodID); - result = functions->CallNonvirtualByteMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jbyte CallNonvirtualByteMethodV(jobject obj, jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallNonvirtualByteMethodV(this,obj,clazz, - methodID,args); - } - jbyte CallNonvirtualByteMethodA(jobject obj, jclass clazz, - jmethodID methodID, jvalue * args) { - return functions->CallNonvirtualByteMethodA(this,obj,clazz, - methodID,args); - } - - jchar CallNonvirtualCharMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jchar result; - va_start(args,methodID); - result = functions->CallNonvirtualCharMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jchar CallNonvirtualCharMethodV(jobject obj, jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallNonvirtualCharMethodV(this,obj,clazz, - methodID,args); - } - jchar CallNonvirtualCharMethodA(jobject obj, jclass clazz, - jmethodID methodID, jvalue * args) { - return functions->CallNonvirtualCharMethodA(this,obj,clazz, - methodID,args); - } - - jshort CallNonvirtualShortMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jshort result; - va_start(args,methodID); - result = functions->CallNonvirtualShortMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jshort CallNonvirtualShortMethodV(jobject obj, jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallNonvirtualShortMethodV(this,obj,clazz, - methodID,args); - } - jshort CallNonvirtualShortMethodA(jobject obj, jclass clazz, - jmethodID methodID, jvalue * args) { - return functions->CallNonvirtualShortMethodA(this,obj,clazz, - methodID,args); - } - - jint CallNonvirtualIntMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jint result; - va_start(args,methodID); - result = functions->CallNonvirtualIntMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jint CallNonvirtualIntMethodV(jobject obj, jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallNonvirtualIntMethodV(this,obj,clazz, - methodID,args); - } - jint CallNonvirtualIntMethodA(jobject obj, jclass clazz, - jmethodID methodID, jvalue * args) { - return functions->CallNonvirtualIntMethodA(this,obj,clazz, - methodID,args); - } - - jlong CallNonvirtualLongMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jlong result; - va_start(args,methodID); - result = functions->CallNonvirtualLongMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jlong CallNonvirtualLongMethodV(jobject obj, jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallNonvirtualLongMethodV(this,obj,clazz, - methodID,args); - } - jlong CallNonvirtualLongMethodA(jobject obj, jclass clazz, - jmethodID methodID, jvalue * args) { - return functions->CallNonvirtualLongMethodA(this,obj,clazz, - methodID,args); - } - - jfloat CallNonvirtualFloatMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jfloat result; - va_start(args,methodID); - result = functions->CallNonvirtualFloatMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jfloat CallNonvirtualFloatMethodV(jobject obj, jclass clazz, - jmethodID methodID, - va_list args) { - return functions->CallNonvirtualFloatMethodV(this,obj,clazz, - methodID,args); - } - jfloat CallNonvirtualFloatMethodA(jobject obj, jclass clazz, - jmethodID methodID, - jvalue * args) { - return functions->CallNonvirtualFloatMethodA(this,obj,clazz, - methodID,args); - } - - jdouble CallNonvirtualDoubleMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jdouble result; - va_start(args,methodID); - result = functions->CallNonvirtualDoubleMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jdouble CallNonvirtualDoubleMethodV(jobject obj, jclass clazz, - jmethodID methodID, - va_list args) { - return functions->CallNonvirtualDoubleMethodV(this,obj,clazz, - methodID,args); - } - jdouble CallNonvirtualDoubleMethodA(jobject obj, jclass clazz, - jmethodID methodID, - jvalue * args) { - return functions->CallNonvirtualDoubleMethodA(this,obj,clazz, - methodID,args); - } - - void CallNonvirtualVoidMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - va_start(args,methodID); - functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args); - va_end(args); - } - void CallNonvirtualVoidMethodV(jobject obj, jclass clazz, - jmethodID methodID, - va_list args) { - functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args); - } - void CallNonvirtualVoidMethodA(jobject obj, jclass clazz, - jmethodID methodID, - jvalue * args) { - functions->CallNonvirtualVoidMethodA(this,obj,clazz,methodID,args); - } - - jfieldID GetFieldID(jclass clazz, const char *name, - const char *sig) { - return functions->GetFieldID(this,clazz,name,sig); - } - - jobject GetObjectField(jobject obj, jfieldID fieldID) { - return functions->GetObjectField(this,obj,fieldID); - } - jboolean GetBooleanField(jobject obj, jfieldID fieldID) { - return functions->GetBooleanField(this,obj,fieldID); - } - jbyte GetByteField(jobject obj, jfieldID fieldID) { - return functions->GetByteField(this,obj,fieldID); - } - jchar GetCharField(jobject obj, jfieldID fieldID) { - return functions->GetCharField(this,obj,fieldID); - } - jshort GetShortField(jobject obj, jfieldID fieldID) { - return functions->GetShortField(this,obj,fieldID); - } - jint GetIntField(jobject obj, jfieldID fieldID) { - return functions->GetIntField(this,obj,fieldID); - } - jlong GetLongField(jobject obj, jfieldID fieldID) { - return functions->GetLongField(this,obj,fieldID); - } - jfloat GetFloatField(jobject obj, jfieldID fieldID) { - return functions->GetFloatField(this,obj,fieldID); - } - jdouble GetDoubleField(jobject obj, jfieldID fieldID) { - return functions->GetDoubleField(this,obj,fieldID); - } - - void SetObjectField(jobject obj, jfieldID fieldID, jobject val) { - functions->SetObjectField(this,obj,fieldID,val); - } - void SetBooleanField(jobject obj, jfieldID fieldID, - jboolean val) { - functions->SetBooleanField(this,obj,fieldID,val); - } - void SetByteField(jobject obj, jfieldID fieldID, - jbyte val) { - functions->SetByteField(this,obj,fieldID,val); - } - void SetCharField(jobject obj, jfieldID fieldID, - jchar val) { - functions->SetCharField(this,obj,fieldID,val); - } - void SetShortField(jobject obj, jfieldID fieldID, - jshort val) { - functions->SetShortField(this,obj,fieldID,val); - } - void SetIntField(jobject obj, jfieldID fieldID, - jint val) { - functions->SetIntField(this,obj,fieldID,val); - } - void SetLongField(jobject obj, jfieldID fieldID, - jlong val) { - functions->SetLongField(this,obj,fieldID,val); - } - void SetFloatField(jobject obj, jfieldID fieldID, - jfloat val) { - functions->SetFloatField(this,obj,fieldID,val); - } - void SetDoubleField(jobject obj, jfieldID fieldID, - jdouble val) { - functions->SetDoubleField(this,obj,fieldID,val); - } - - jmethodID GetStaticMethodID(jclass clazz, const char *name, - const char *sig) { - return functions->GetStaticMethodID(this,clazz,name,sig); - } - - jobject CallStaticObjectMethod(jclass clazz, jmethodID methodID, - ...) { - va_list args; - jobject result; - va_start(args,methodID); - result = functions->CallStaticObjectMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jobject CallStaticObjectMethodV(jclass clazz, jmethodID methodID, - va_list args) { - return functions->CallStaticObjectMethodV(this,clazz,methodID,args); - } - jobject CallStaticObjectMethodA(jclass clazz, jmethodID methodID, - jvalue *args) { - return functions->CallStaticObjectMethodA(this,clazz,methodID,args); - } - - jboolean CallStaticBooleanMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jboolean result; - va_start(args,methodID); - result = functions->CallStaticBooleanMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jboolean CallStaticBooleanMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticBooleanMethodV(this,clazz,methodID,args); - } - jboolean CallStaticBooleanMethodA(jclass clazz, - jmethodID methodID, jvalue *args) { - return functions->CallStaticBooleanMethodA(this,clazz,methodID,args); - } - - jbyte CallStaticByteMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jbyte result; - va_start(args,methodID); - result = functions->CallStaticByteMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jbyte CallStaticByteMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticByteMethodV(this,clazz,methodID,args); - } - jbyte CallStaticByteMethodA(jclass clazz, - jmethodID methodID, jvalue *args) { - return functions->CallStaticByteMethodA(this,clazz,methodID,args); - } - - jchar CallStaticCharMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jchar result; - va_start(args,methodID); - result = functions->CallStaticCharMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jchar CallStaticCharMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticCharMethodV(this,clazz,methodID,args); - } - jchar CallStaticCharMethodA(jclass clazz, - jmethodID methodID, jvalue *args) { - return functions->CallStaticCharMethodA(this,clazz,methodID,args); - } - - jshort CallStaticShortMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jshort result; - va_start(args,methodID); - result = functions->CallStaticShortMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jshort CallStaticShortMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticShortMethodV(this,clazz,methodID,args); - } - jshort CallStaticShortMethodA(jclass clazz, - jmethodID methodID, jvalue *args) { - return functions->CallStaticShortMethodA(this,clazz,methodID,args); - } - - jint CallStaticIntMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jint result; - va_start(args,methodID); - result = functions->CallStaticIntMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jint CallStaticIntMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticIntMethodV(this,clazz,methodID,args); - } - jint CallStaticIntMethodA(jclass clazz, - jmethodID methodID, jvalue *args) { - return functions->CallStaticIntMethodA(this,clazz,methodID,args); - } - - jlong CallStaticLongMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jlong result; - va_start(args,methodID); - result = functions->CallStaticLongMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jlong CallStaticLongMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticLongMethodV(this,clazz,methodID,args); - } - jlong CallStaticLongMethodA(jclass clazz, - jmethodID methodID, jvalue *args) { - return functions->CallStaticLongMethodA(this,clazz,methodID,args); - } - - jfloat CallStaticFloatMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jfloat result; - va_start(args,methodID); - result = functions->CallStaticFloatMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jfloat CallStaticFloatMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticFloatMethodV(this,clazz,methodID,args); - } - jfloat CallStaticFloatMethodA(jclass clazz, - jmethodID methodID, jvalue *args) { - return functions->CallStaticFloatMethodA(this,clazz,methodID,args); - } - - jdouble CallStaticDoubleMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jdouble result; - va_start(args,methodID); - result = functions->CallStaticDoubleMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jdouble CallStaticDoubleMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticDoubleMethodV(this,clazz,methodID,args); - } - jdouble CallStaticDoubleMethodA(jclass clazz, - jmethodID methodID, jvalue *args) { - return functions->CallStaticDoubleMethodA(this,clazz,methodID,args); - } - - void CallStaticVoidMethod(jclass cls, jmethodID methodID, ...) { - va_list args; - va_start(args,methodID); - functions->CallStaticVoidMethodV(this,cls,methodID,args); - va_end(args); - } - void CallStaticVoidMethodV(jclass cls, jmethodID methodID, - va_list args) { - functions->CallStaticVoidMethodV(this,cls,methodID,args); - } - void CallStaticVoidMethodA(jclass cls, jmethodID methodID, - jvalue * args) { - functions->CallStaticVoidMethodA(this,cls,methodID,args); - } - - jfieldID GetStaticFieldID(jclass clazz, const char *name, - const char *sig) { - return functions->GetStaticFieldID(this,clazz,name,sig); - } - jobject GetStaticObjectField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticObjectField(this,clazz,fieldID); - } - jboolean GetStaticBooleanField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticBooleanField(this,clazz,fieldID); - } - jbyte GetStaticByteField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticByteField(this,clazz,fieldID); - } - jchar GetStaticCharField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticCharField(this,clazz,fieldID); - } - jshort GetStaticShortField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticShortField(this,clazz,fieldID); - } - jint GetStaticIntField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticIntField(this,clazz,fieldID); - } - jlong GetStaticLongField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticLongField(this,clazz,fieldID); - } - jfloat GetStaticFloatField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticFloatField(this,clazz,fieldID); - } - jdouble GetStaticDoubleField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticDoubleField(this,clazz,fieldID); - } - - void SetStaticObjectField(jclass clazz, jfieldID fieldID, - jobject value) { - functions->SetStaticObjectField(this,clazz,fieldID,value); - } - void SetStaticBooleanField(jclass clazz, jfieldID fieldID, - jboolean value) { - functions->SetStaticBooleanField(this,clazz,fieldID,value); - } - void SetStaticByteField(jclass clazz, jfieldID fieldID, - jbyte value) { - functions->SetStaticByteField(this,clazz,fieldID,value); - } - void SetStaticCharField(jclass clazz, jfieldID fieldID, - jchar value) { - functions->SetStaticCharField(this,clazz,fieldID,value); - } - void SetStaticShortField(jclass clazz, jfieldID fieldID, - jshort value) { - functions->SetStaticShortField(this,clazz,fieldID,value); - } - void SetStaticIntField(jclass clazz, jfieldID fieldID, - jint value) { - functions->SetStaticIntField(this,clazz,fieldID,value); - } - void SetStaticLongField(jclass clazz, jfieldID fieldID, - jlong value) { - functions->SetStaticLongField(this,clazz,fieldID,value); - } - void SetStaticFloatField(jclass clazz, jfieldID fieldID, - jfloat value) { - functions->SetStaticFloatField(this,clazz,fieldID,value); - } - void SetStaticDoubleField(jclass clazz, jfieldID fieldID, - jdouble value) { - functions->SetStaticDoubleField(this,clazz,fieldID,value); - } - - jstring NewString(const jchar *unicode, jsize len) { - return functions->NewString(this,unicode,len); - } - jsize GetStringLength(jstring str) { - return functions->GetStringLength(this,str); - } - const jchar *GetStringChars(jstring str, jboolean *isCopy) { - return functions->GetStringChars(this,str,isCopy); - } - void ReleaseStringChars(jstring str, const jchar *chars) { - functions->ReleaseStringChars(this,str,chars); - } - - jstring NewStringUTF(const char *utf) { - return functions->NewStringUTF(this,utf); - } - jsize GetStringUTFLength(jstring str) { - return functions->GetStringUTFLength(this,str); - } - const char* GetStringUTFChars(jstring str, jboolean *isCopy) { - return functions->GetStringUTFChars(this,str,isCopy); - } - void ReleaseStringUTFChars(jstring str, const char* chars) { - functions->ReleaseStringUTFChars(this,str,chars); - } - - jsize GetArrayLength(jarray array) { - return functions->GetArrayLength(this,array); - } - - jobjectArray NewObjectArray(jsize len, jclass clazz, - jobject init) { - return functions->NewObjectArray(this,len,clazz,init); - } - jobject GetObjectArrayElement(jobjectArray array, jsize index) { - return functions->GetObjectArrayElement(this,array,index); - } - void SetObjectArrayElement(jobjectArray array, jsize index, - jobject val) { - functions->SetObjectArrayElement(this,array,index,val); - } - - jbooleanArray NewBooleanArray(jsize len) { - return functions->NewBooleanArray(this,len); - } - jbyteArray NewByteArray(jsize len) { - return functions->NewByteArray(this,len); - } - jcharArray NewCharArray(jsize len) { - return functions->NewCharArray(this,len); - } - jshortArray NewShortArray(jsize len) { - return functions->NewShortArray(this,len); - } - jintArray NewIntArray(jsize len) { - return functions->NewIntArray(this,len); - } - jlongArray NewLongArray(jsize len) { - return functions->NewLongArray(this,len); - } - jfloatArray NewFloatArray(jsize len) { - return functions->NewFloatArray(this,len); - } - jdoubleArray NewDoubleArray(jsize len) { - return functions->NewDoubleArray(this,len); - } - - jboolean * GetBooleanArrayElements(jbooleanArray array, jboolean *isCopy) { - return functions->GetBooleanArrayElements(this,array,isCopy); - } - jbyte * GetByteArrayElements(jbyteArray array, jboolean *isCopy) { - return functions->GetByteArrayElements(this,array,isCopy); - } - jchar * GetCharArrayElements(jcharArray array, jboolean *isCopy) { - return functions->GetCharArrayElements(this,array,isCopy); - } - jshort * GetShortArrayElements(jshortArray array, jboolean *isCopy) { - return functions->GetShortArrayElements(this,array,isCopy); - } - jint * GetIntArrayElements(jintArray array, jboolean *isCopy) { - return functions->GetIntArrayElements(this,array,isCopy); - } - jlong * GetLongArrayElements(jlongArray array, jboolean *isCopy) { - return functions->GetLongArrayElements(this,array,isCopy); - } - jfloat * GetFloatArrayElements(jfloatArray array, jboolean *isCopy) { - return functions->GetFloatArrayElements(this,array,isCopy); - } - jdouble * GetDoubleArrayElements(jdoubleArray array, jboolean *isCopy) { - return functions->GetDoubleArrayElements(this,array,isCopy); - } - - void ReleaseBooleanArrayElements(jbooleanArray array, - jboolean *elems, - jint mode) { - functions->ReleaseBooleanArrayElements(this,array,elems,mode); - } - void ReleaseByteArrayElements(jbyteArray array, - jbyte *elems, - jint mode) { - functions->ReleaseByteArrayElements(this,array,elems,mode); - } - void ReleaseCharArrayElements(jcharArray array, - jchar *elems, - jint mode) { - functions->ReleaseCharArrayElements(this,array,elems,mode); - } - void ReleaseShortArrayElements(jshortArray array, - jshort *elems, - jint mode) { - functions->ReleaseShortArrayElements(this,array,elems,mode); - } - void ReleaseIntArrayElements(jintArray array, - jint *elems, - jint mode) { - functions->ReleaseIntArrayElements(this,array,elems,mode); - } - void ReleaseLongArrayElements(jlongArray array, - jlong *elems, - jint mode) { - functions->ReleaseLongArrayElements(this,array,elems,mode); - } - void ReleaseFloatArrayElements(jfloatArray array, - jfloat *elems, - jint mode) { - functions->ReleaseFloatArrayElements(this,array,elems,mode); - } - void ReleaseDoubleArrayElements(jdoubleArray array, - jdouble *elems, - jint mode) { - functions->ReleaseDoubleArrayElements(this,array,elems,mode); - } - - void GetBooleanArrayRegion(jbooleanArray array, - jsize start, jsize len, jboolean *buf) { - functions->GetBooleanArrayRegion(this,array,start,len,buf); - } - void GetByteArrayRegion(jbyteArray array, - jsize start, jsize len, jbyte *buf) { - functions->GetByteArrayRegion(this,array,start,len,buf); - } - void GetCharArrayRegion(jcharArray array, - jsize start, jsize len, jchar *buf) { - functions->GetCharArrayRegion(this,array,start,len,buf); - } - void GetShortArrayRegion(jshortArray array, - jsize start, jsize len, jshort *buf) { - functions->GetShortArrayRegion(this,array,start,len,buf); - } - void GetIntArrayRegion(jintArray array, - jsize start, jsize len, jint *buf) { - functions->GetIntArrayRegion(this,array,start,len,buf); - } - void GetLongArrayRegion(jlongArray array, - jsize start, jsize len, jlong *buf) { - functions->GetLongArrayRegion(this,array,start,len,buf); - } - void GetFloatArrayRegion(jfloatArray array, - jsize start, jsize len, jfloat *buf) { - functions->GetFloatArrayRegion(this,array,start,len,buf); - } - void GetDoubleArrayRegion(jdoubleArray array, - jsize start, jsize len, jdouble *buf) { - functions->GetDoubleArrayRegion(this,array,start,len,buf); - } - - void SetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len, - jboolean *buf) { - functions->SetBooleanArrayRegion(this,array,start,len,buf); - } - void SetByteArrayRegion(jbyteArray array, jsize start, jsize len, - jbyte *buf) { - functions->SetByteArrayRegion(this,array,start,len,buf); - } - void SetCharArrayRegion(jcharArray array, jsize start, jsize len, - jchar *buf) { - functions->SetCharArrayRegion(this,array,start,len,buf); - } - void SetShortArrayRegion(jshortArray array, jsize start, jsize len, - jshort *buf) { - functions->SetShortArrayRegion(this,array,start,len,buf); - } - void SetIntArrayRegion(jintArray array, jsize start, jsize len, - jint *buf) { - functions->SetIntArrayRegion(this,array,start,len,buf); - } - void SetLongArrayRegion(jlongArray array, jsize start, jsize len, - jlong *buf) { - functions->SetLongArrayRegion(this,array,start,len,buf); - } - void SetFloatArrayRegion(jfloatArray array, jsize start, jsize len, - jfloat *buf) { - functions->SetFloatArrayRegion(this,array,start,len,buf); - } - void SetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len, - jdouble *buf) { - functions->SetDoubleArrayRegion(this,array,start,len,buf); - } - - jint RegisterNatives(jclass clazz, const JNINativeMethod *methods, - jint nMethods) { - return functions->RegisterNatives(this,clazz,methods,nMethods); - } - jint UnregisterNatives(jclass clazz) { - return functions->UnregisterNatives(this,clazz); - } - - jint MonitorEnter(jobject obj) { - return functions->MonitorEnter(this,obj); - } - jint MonitorExit(jobject obj) { - return functions->MonitorExit(this,obj); - } - - jint GetJavaVM(JavaVM **vm) { - return functions->GetJavaVM(this,vm); - } - - void GetStringRegion(jstring str, jsize start, jsize len, jchar *buf) { - functions->GetStringRegion(this,str,start,len,buf); - } - void GetStringUTFRegion(jstring str, jsize start, jsize len, char *buf) { - functions->GetStringUTFRegion(this,str,start,len,buf); - } - - void * GetPrimitiveArrayCritical(jarray array, jboolean *isCopy) { - return functions->GetPrimitiveArrayCritical(this,array,isCopy); - } - void ReleasePrimitiveArrayCritical(jarray array, void *carray, jint mode) { - functions->ReleasePrimitiveArrayCritical(this,array,carray,mode); - } - - const jchar * GetStringCritical(jstring string, jboolean *isCopy) { - return functions->GetStringCritical(this,string,isCopy); - } - void ReleaseStringCritical(jstring string, const jchar *cstring) { - functions->ReleaseStringCritical(this,string,cstring); - } - - jweak NewWeakGlobalRef(jobject obj) { - return functions->NewWeakGlobalRef(this,obj); - } - void DeleteWeakGlobalRef(jweak ref) { - functions->DeleteWeakGlobalRef(this,ref); - } - - jboolean ExceptionCheck() { - return functions->ExceptionCheck(this); - } - - jobject NewDirectByteBuffer(void* address, jlong capacity) { - return functions->NewDirectByteBuffer(this, address, capacity); - } - void* GetDirectBufferAddress(jobject buf) { - return functions->GetDirectBufferAddress(this, buf); - } - jlong GetDirectBufferCapacity(jobject buf) { - return functions->GetDirectBufferCapacity(this, buf); - } - -#endif /* __cplusplus */ -}; - -typedef struct JavaVMOption { - char *optionString; - void *extraInfo; -} JavaVMOption; - -typedef struct JavaVMInitArgs { - jint version; - - jint nOptions; - JavaVMOption *options; - jboolean ignoreUnrecognized; -} JavaVMInitArgs; - -typedef struct JavaVMAttachArgs { - jint version; - - char *name; - jobject group; -} JavaVMAttachArgs; - -/* These structures will be VM-specific. */ - -typedef struct JDK1_1InitArgs { - jint version; - - char **properties; - jint checkSource; - jint nativeStackSize; - jint javaStackSize; - jint minHeapSize; - jint maxHeapSize; - jint verifyMode; - char *classpath; - - jint (JNICALL *vfprintf)(FILE *fp, const char *format, va_list args); - void (JNICALL *exit)(jint code); - void (JNICALL *abort)(void); - - jint enableClassGC; - jint enableVerboseGC; - jint disableAsyncGC; - jint verbose; - jboolean debugging; - jint debugPort; -} JDK1_1InitArgs; - -typedef struct JDK1_1AttachArgs { - void * __padding; /* C compilers don't allow empty structures. */ -} JDK1_1AttachArgs; - -#define JDK1_2 -#define JDK1_4 - -/* End VM-specific. */ - -struct JNIInvokeInterface_ { - void *reserved0; - void *reserved1; - void *reserved2; - - jint (JNICALL *DestroyJavaVM)(JavaVM *vm); - - jint (JNICALL *AttachCurrentThread)(JavaVM *vm, void **penv, void *args); - - jint (JNICALL *DetachCurrentThread)(JavaVM *vm); - - jint (JNICALL *GetEnv)(JavaVM *vm, void **penv, jint version); - - jint (JNICALL *AttachCurrentThreadAsDaemon)(JavaVM *vm, void **penv, void *args); -}; - -struct JavaVM_ { - const struct JNIInvokeInterface_ *functions; -#ifdef __cplusplus - - jint DestroyJavaVM() { - return functions->DestroyJavaVM(this); - } - jint AttachCurrentThread(void **penv, void *args) { - return functions->AttachCurrentThread(this, penv, args); - } - jint DetachCurrentThread() { - return functions->DetachCurrentThread(this); - } - - jint GetEnv(void **penv, jint version) { - return functions->GetEnv(this, penv, version); - } - jint AttachCurrentThreadAsDaemon(void **penv, void *args) { - return functions->AttachCurrentThreadAsDaemon(this, penv, args); - } -#endif -}; - -#ifdef _JNI_IMPLEMENTATION_ -#define _JNI_IMPORT_OR_EXPORT_ JNIEXPORT -#else -#define _JNI_IMPORT_OR_EXPORT_ JNIIMPORT -#endif -_JNI_IMPORT_OR_EXPORT_ jint JNICALL -JNI_GetDefaultJavaVMInitArgs(void *args); - -_JNI_IMPORT_OR_EXPORT_ jint JNICALL -JNI_CreateJavaVM(JavaVM **pvm, void **penv, void *args); - -_JNI_IMPORT_OR_EXPORT_ jint JNICALL -JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *); - -/* Defined by native libraries. */ -JNIEXPORT jint JNICALL -JNI_OnLoad(JavaVM *vm, void *reserved); - -JNIEXPORT void JNICALL -JNI_OnUnload(JavaVM *vm, void *reserved); - -#define JNI_VERSION_1_1 0x00010001 -#define JNI_VERSION_1_2 0x00010002 -#define JNI_VERSION_1_4 0x00010004 - -#ifdef __cplusplus -} /* extern "C" */ -#endif /* __cplusplus */ - -#endif /* JNI_H */ - - diff --git a/Templates/Empty/web/source/npplugin/windows/jni_md.h b/Templates/Empty/web/source/npplugin/windows/jni_md.h deleted file mode 100644 index 9e51692ef..000000000 --- a/Templates/Empty/web/source/npplugin/windows/jni_md.h +++ /dev/null @@ -1,215 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (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.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** - * - * - * This Original Code has been modified by IBM Corporation. - * Modifications made by IBM described herein are - * Copyright (c) International Business Machines - * Corporation, 2000 - * - * Modifications to Mozilla code or documentation - * identified per MPL Section 3.3 - * - * Date Modified by Description of modification - * 03/27/2000 IBM Corp. Set JNICALL to Optlink for - * use in OS2 - */ - -/******************************************************************************* - * Netscape version of jni_md.h -- depends on jri_md.h - ******************************************************************************/ - -#ifndef JNI_MD_H -#define JNI_MD_H - -#include "prtypes.h" /* needed for _declspec */ - -/******************************************************************************* - * WHAT'S UP WITH THIS FILE? - * - * This is where we define the mystical JNI_PUBLIC_API macro that works on all - * platforms. If you're running with Visual C++, Symantec C, or Borland's - * development environment on the PC, you're all set. Or if you're on the Mac - * with Metrowerks, Symantec or MPW with SC you're ok too. For UNIX it shouldn't - * matter. - - * Changes by sailesh on 9/26 - - * There are two symbols used in the declaration of the JNI functions - * and native code that uses the JNI: - * JNICALL - specifies the calling convention - * JNIEXPORT - specifies export status of the function - * - * The syntax to specify calling conventions is different in Win16 and - * Win32 - the brains at Micro$oft at work here. JavaSoft in their - * infinite wisdom cares for no platform other than Win32, and so they - * just define these two symbols as: - - #define JNIEXPORT __declspec(dllexport) - #define JNICALL __stdcall - - * We deal with this, in the way JRI defines the JRI_PUBLIC_API, by - * defining a macro called JNI_PUBLIC_API. Any of our developers who - * wish to use code for Win16 and Win32, _must_ use JNI_PUBLIC_API to - * be able to export functions properly. - - * Since we must also maintain compatibility with JavaSoft, we - * continue to define the symbol JNIEXPORT. However, use of this - * internally is deprecated, since it will cause a mess on Win16. - - * We _do not_ need a new symbol called JNICALL. Instead we - * redefine JNICALL in the same way JRI_CALLBACK was defined. - - ******************************************************************************/ - -/* DLL Entry modifiers... */ -/* Win32 */ -#if defined(XP_WIN) || defined(_WINDOWS) || defined(WIN32) || defined(_WIN32) -# include -# if defined(_MSC_VER) || defined(__GNUC__) -# if defined(WIN32) || defined(_WIN32) -# define JNI_PUBLIC_API(ResultType) _declspec(dllexport) ResultType __stdcall -# define JNI_PUBLIC_VAR(VarType) VarType -# define JNI_NATIVE_STUB(ResultType) _declspec(dllexport) ResultType -# define JNICALL __stdcall -# else /* !_WIN32 */ -# if defined(_WINDLL) -# define JNI_PUBLIC_API(ResultType) ResultType __cdecl __export __loadds -# define JNI_PUBLIC_VAR(VarType) VarType -# define JNI_NATIVE_STUB(ResultType) ResultType __cdecl __loadds -# define JNICALL __loadds -# else /* !WINDLL */ -# define JNI_PUBLIC_API(ResultType) ResultType __cdecl __export -# define JNI_PUBLIC_VAR(VarType) VarType -# define JNI_NATIVE_STUB(ResultType) ResultType __cdecl __export -# define JNICALL __export -# endif /* !WINDLL */ -# endif /* !_WIN32 */ -# elif defined(__BORLANDC__) -# if defined(WIN32) || defined(_WIN32) -# define JNI_PUBLIC_API(ResultType) __export ResultType -# define JNI_PUBLIC_VAR(VarType) VarType -# define JNI_NATIVE_STUB(ResultType) __export ResultType -# define JNICALL -# else /* !_WIN32 */ -# define JNI_PUBLIC_API(ResultType) ResultType _cdecl _export _loadds -# define JNI_PUBLIC_VAR(VarType) VarType -# define JNI_NATIVE_STUB(ResultType) ResultType _cdecl _loadds -# define JNICALL _loadds -# endif -# else -# error Unsupported PC development environment. -# endif -# ifndef IS_LITTLE_ENDIAN -# define IS_LITTLE_ENDIAN -# endif - /* This is the stuff inherited from JavaSoft .. */ -# define JNIEXPORT __declspec(dllexport) -# define JNIIMPORT __declspec(dllimport) - -/* OS/2 */ -#elif defined(XP_OS2) -# ifdef XP_OS2_VACPP -# define JNI_PUBLIC_API(ResultType) ResultType _System -# define JNI_PUBLIC_VAR(VarType) VarType -# define JNICALL _Optlink -# define JNIEXPORT -# define JNIIMPORT -# elif defined(__declspec) -# define JNI_PUBLIC_API(ResultType) __declspec(dllexport) ResultType -# define JNI_PUBLIC_VAR(VarType) VarType -# define JNI_NATIVE_STUB(ResultType) __declspec(dllexport) ResultType -# define JNICALL -# define JNIEXPORT -# define JNIIMPORT -# else -# define JNI_PUBLIC_API(ResultType) ResultType -# define JNI_PUBLIC_VAR(VarType) VarType -# define JNICALL -# define JNIEXPORT -# define JNIIMPORT -# endif -# ifndef IS_LITTLE_ENDIAN -# define IS_LITTLE_ENDIAN -# endif - -/* Mac */ -#elif macintosh || Macintosh || THINK_C -# if defined(__MWERKS__) /* Metrowerks */ -# if !__option(enumsalwaysint) -# error You need to define 'Enums Always Int' for your project. -# endif -# if defined(TARGET_CPU_68K) && !TARGET_RT_MAC_CFM -# if !__option(fourbyteints) -# error You need to define 'Struct Alignment: 68k' for your project. -# endif -# endif /* !GENERATINGCFM */ -# define JNI_PUBLIC_API(ResultType) __declspec(export) ResultType -# define JNI_PUBLIC_VAR(VarType) JNI_PUBLIC_API(VarType) -# define JNI_NATIVE_STUB(ResultType) JNI_PUBLIC_API(ResultType) -# elif defined(__SC__) /* Symantec */ -# error What are the Symantec defines? (warren@netscape.com) -# elif macintosh && applec /* MPW */ -# error Please upgrade to the latest MPW compiler (SC). -# else -# error Unsupported Mac development environment. -# endif -# define JNICALL - /* This is the stuff inherited from JavaSoft .. */ -# define JNIEXPORT -# define JNIIMPORT - -/* Unix or else */ -#else -# define JNI_PUBLIC_API(ResultType) ResultType -# define JNI_PUBLIC_VAR(VarType) VarType -# define JNI_NATIVE_STUB(ResultType) ResultType -# define JNICALL - /* This is the stuff inherited from JavaSoft .. */ -# define JNIEXPORT -# define JNIIMPORT -#endif - -#ifndef FAR /* for non-Win16 */ -#define FAR -#endif - -/* Get the rest of the stuff from jri_md.h */ -#include "jri_md.h" - -#endif /* JNI_MD_H */ diff --git a/Templates/Empty/web/source/npplugin/windows/jri.h b/Templates/Empty/web/source/npplugin/windows/jri.h deleted file mode 100644 index 866fc69aa..000000000 --- a/Templates/Empty/web/source/npplugin/windows/jri.h +++ /dev/null @@ -1,689 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (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.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -/******************************************************************************* - * Java Runtime Interface - ******************************************************************************/ - -#ifndef JRI_H -#define JRI_H - -#include "jritypes.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/******************************************************************************* - * JRIEnv - ******************************************************************************/ - -/* The type of the JRIEnv interface. */ -typedef struct JRIEnvInterface JRIEnvInterface; - -/* The type of a JRIEnv instance. */ -typedef const JRIEnvInterface* JRIEnv; - -/******************************************************************************* - * JRIEnv Operations - ******************************************************************************/ - -#define JRI_DefineClass(env, classLoader, buf, bufLen) \ - (((*(env))->DefineClass)(env, JRI_DefineClass_op, classLoader, buf, bufLen)) - -#define JRI_FindClass(env, name) \ - (((*(env))->FindClass)(env, JRI_FindClass_op, name)) - -#define JRI_Throw(env, obj) \ - (((*(env))->Throw)(env, JRI_Throw_op, obj)) - -#define JRI_ThrowNew(env, clazz, message) \ - (((*(env))->ThrowNew)(env, JRI_ThrowNew_op, clazz, message)) - -#define JRI_ExceptionOccurred(env) \ - (((*(env))->ExceptionOccurred)(env, JRI_ExceptionOccurred_op)) - -#define JRI_ExceptionDescribe(env) \ - (((*(env))->ExceptionDescribe)(env, JRI_ExceptionDescribe_op)) - -#define JRI_ExceptionClear(env) \ - (((*(env))->ExceptionClear)(env, JRI_ExceptionClear_op)) - -#define JRI_NewGlobalRef(env, ref) \ - (((*(env))->NewGlobalRef)(env, JRI_NewGlobalRef_op, ref)) - -#define JRI_DisposeGlobalRef(env, gref) \ - (((*(env))->DisposeGlobalRef)(env, JRI_DisposeGlobalRef_op, gref)) - -#define JRI_GetGlobalRef(env, gref) \ - (((*(env))->GetGlobalRef)(env, JRI_GetGlobalRef_op, gref)) - -#define JRI_SetGlobalRef(env, gref, ref) \ - (((*(env))->SetGlobalRef)(env, JRI_SetGlobalRef_op, gref, ref)) - -#define JRI_IsSameObject(env, a, b) \ - (((*(env))->IsSameObject)(env, JRI_IsSameObject_op, a, b)) - -#define JRI_NewObject(env) ((*(env))->NewObject) -#define JRI_NewObjectV(env, clazz, methodID, args) \ - (((*(env))->NewObjectV)(env, JRI_NewObject_op_va_list, clazz, methodID, args)) -#define JRI_NewObjectA(env, clazz, method, args) \ - (((*(env))->NewObjectA)(env, JRI_NewObject_op_array, clazz, methodID, args)) - -#define JRI_GetObjectClass(env, obj) \ - (((*(env))->GetObjectClass)(env, JRI_GetObjectClass_op, obj)) - -#define JRI_IsInstanceOf(env, obj, clazz) \ - (((*(env))->IsInstanceOf)(env, JRI_IsInstanceOf_op, obj, clazz)) - -#define JRI_GetMethodID(env, clazz, name, sig) \ - (((*(env))->GetMethodID)(env, JRI_GetMethodID_op, clazz, name, sig)) - -#define JRI_CallMethod(env) ((*(env))->CallMethod) -#define JRI_CallMethodV(env, obj, methodID, args) \ - (((*(env))->CallMethodV)(env, JRI_CallMethod_op_va_list, obj, methodID, args)) -#define JRI_CallMethodA(env, obj, methodID, args) \ - (((*(env))->CallMethodA)(env, JRI_CallMethod_op_array, obj, methodID, args)) - -#define JRI_CallMethodBoolean(env) ((*(env))->CallMethodBoolean) -#define JRI_CallMethodBooleanV(env, obj, methodID, args) \ - (((*(env))->CallMethodBooleanV)(env, JRI_CallMethodBoolean_op_va_list, obj, methodID, args)) -#define JRI_CallMethodBooleanA(env, obj, methodID, args) \ - (((*(env))->CallMethodBooleanA)(env, JRI_CallMethodBoolean_op_array, obj, methodID, args)) - -#define JRI_CallMethodByte(env) ((*(env))->CallMethodByte) -#define JRI_CallMethodByteV(env, obj, methodID, args) \ - (((*(env))->CallMethodByteV)(env, JRI_CallMethodByte_op_va_list, obj, methodID, args)) -#define JRI_CallMethodByteA(env, obj, methodID, args) \ - (((*(env))->CallMethodByteA)(env, JRI_CallMethodByte_op_array, obj, methodID, args)) - -#define JRI_CallMethodChar(env) ((*(env))->CallMethodChar) -#define JRI_CallMethodCharV(env, obj, methodID, args) \ - (((*(env))->CallMethodCharV)(env, JRI_CallMethodChar_op_va_list, obj, methodID, args)) -#define JRI_CallMethodCharA(env, obj, methodID, args) \ - (((*(env))->CallMethodCharA)(env, JRI_CallMethodChar_op_array, obj, methodID, args)) - -#define JRI_CallMethodShort(env) ((*(env))->CallMethodShort) -#define JRI_CallMethodShortV(env, obj, methodID, args) \ - (((*(env))->CallMethodShortV)(env, JRI_CallMethodShort_op_va_list, obj, methodID, args)) -#define JRI_CallMethodShortA(env, obj, methodID, args) \ - (((*(env))->CallMethodShortA)(env, JRI_CallMethodShort_op_array, obj, methodID, args)) - -#define JRI_CallMethodInt(env) ((*(env))->CallMethodInt) -#define JRI_CallMethodIntV(env, obj, methodID, args) \ - (((*(env))->CallMethodIntV)(env, JRI_CallMethodInt_op_va_list, obj, methodID, args)) -#define JRI_CallMethodIntA(env, obj, methodID, args) \ - (((*(env))->CallMethodIntA)(env, JRI_CallMethodInt_op_array, obj, methodID, args)) - -#define JRI_CallMethodLong(env) ((*(env))->CallMethodLong) -#define JRI_CallMethodLongV(env, obj, methodID, args) \ - (((*(env))->CallMethodLongV)(env, JRI_CallMethodLong_op_va_list, obj, methodID, args)) -#define JRI_CallMethodLongA(env, obj, methodID, args) \ - (((*(env))->CallMethodLongA)(env, JRI_CallMethodLong_op_array, obj, methodID, args)) - -#define JRI_CallMethodFloat(env) ((*(env))->CallMethodFloat) -#define JRI_CallMethodFloatV(env, obj, methodID, args) \ - (((*(env))->CallMethodFloatV)(env, JRI_CallMethodFloat_op_va_list, obj, methodID, args)) -#define JRI_CallMethodFloatA(env, obj, methodID, args) \ - (((*(env))->CallMethodFloatA)(env, JRI_CallMethodFloat_op_array, obj, methodID, args)) - -#define JRI_CallMethodDouble(env) ((*(env))->CallMethodDouble) -#define JRI_CallMethodDoubleV(env, obj, methodID, args) \ - (((*(env))->CallMethodDoubleV)(env, JRI_CallMethodDouble_op_va_list, obj, methodID, args)) -#define JRI_CallMethodDoubleA(env, obj, methodID, args) \ - (((*(env))->CallMethodDoubleA)(env, JRI_CallMethodDouble_op_array, obj, methodID, args)) - -#define JRI_GetFieldID(env, clazz, name, sig) \ - (((*(env))->GetFieldID)(env, JRI_GetFieldID_op, clazz, name, sig)) - -#define JRI_GetField(env, obj, fieldID) \ - (((*(env))->GetField)(env, JRI_GetField_op, obj, fieldID)) - -#define JRI_GetFieldBoolean(env, obj, fieldID) \ - (((*(env))->GetFieldBoolean)(env, JRI_GetFieldBoolean_op, obj, fieldID)) - -#define JRI_GetFieldByte(env, obj, fieldID) \ - (((*(env))->GetFieldByte)(env, JRI_GetFieldByte_op, obj, fieldID)) - -#define JRI_GetFieldChar(env, obj, fieldID) \ - (((*(env))->GetFieldChar)(env, JRI_GetFieldChar_op, obj, fieldID)) - -#define JRI_GetFieldShort(env, obj, fieldID) \ - (((*(env))->GetFieldShort)(env, JRI_GetFieldShort_op, obj, fieldID)) - -#define JRI_GetFieldInt(env, obj, fieldID) \ - (((*(env))->GetFieldInt)(env, JRI_GetFieldInt_op, obj, fieldID)) - -#define JRI_GetFieldLong(env, obj, fieldID) \ - (((*(env))->GetFieldLong)(env, JRI_GetFieldLong_op, obj, fieldID)) - -#define JRI_GetFieldFloat(env, obj, fieldID) \ - (((*(env))->GetFieldFloat)(env, JRI_GetFieldFloat_op, obj, fieldID)) - -#define JRI_GetFieldDouble(env, obj, fieldID) \ - (((*(env))->GetFieldDouble)(env, JRI_GetFieldDouble_op, obj, fieldID)) - -#define JRI_SetField(env, obj, fieldID, value) \ - (((*(env))->SetField)(env, JRI_SetField_op, obj, fieldID, value)) - -#define JRI_SetFieldBoolean(env, obj, fieldID, value) \ - (((*(env))->SetFieldBoolean)(env, JRI_SetFieldBoolean_op, obj, fieldID, value)) - -#define JRI_SetFieldByte(env, obj, fieldID, value) \ - (((*(env))->SetFieldByte)(env, JRI_SetFieldByte_op, obj, fieldID, value)) - -#define JRI_SetFieldChar(env, obj, fieldID, value) \ - (((*(env))->SetFieldChar)(env, JRI_SetFieldChar_op, obj, fieldID, value)) - -#define JRI_SetFieldShort(env, obj, fieldID, value) \ - (((*(env))->SetFieldShort)(env, JRI_SetFieldShort_op, obj, fieldID, value)) - -#define JRI_SetFieldInt(env, obj, fieldID, value) \ - (((*(env))->SetFieldInt)(env, JRI_SetFieldInt_op, obj, fieldID, value)) - -#define JRI_SetFieldLong(env, obj, fieldID, value) \ - (((*(env))->SetFieldLong)(env, JRI_SetFieldLong_op, obj, fieldID, value)) - -#define JRI_SetFieldFloat(env, obj, fieldID, value) \ - (((*(env))->SetFieldFloat)(env, JRI_SetFieldFloat_op, obj, fieldID, value)) - -#define JRI_SetFieldDouble(env, obj, fieldID, value) \ - (((*(env))->SetFieldDouble)(env, JRI_SetFieldDouble_op, obj, fieldID, value)) - -#define JRI_IsSubclassOf(env, a, b) \ - (((*(env))->IsSubclassOf)(env, JRI_IsSubclassOf_op, a, b)) - -#define JRI_GetStaticMethodID(env, clazz, name, sig) \ - (((*(env))->GetStaticMethodID)(env, JRI_GetStaticMethodID_op, clazz, name, sig)) - -#define JRI_CallStaticMethod(env) ((*(env))->CallStaticMethod) -#define JRI_CallStaticMethodV(env, clazz, methodID, args) \ - (((*(env))->CallStaticMethodV)(env, JRI_CallStaticMethod_op_va_list, clazz, methodID, args)) -#define JRI_CallStaticMethodA(env, clazz, methodID, args) \ - (((*(env))->CallStaticMethodA)(env, JRI_CallStaticMethod_op_array, clazz, methodID, args)) - -#define JRI_CallStaticMethodBoolean(env) ((*(env))->CallStaticMethodBoolean) -#define JRI_CallStaticMethodBooleanV(env, clazz, methodID, args) \ - (((*(env))->CallStaticMethodBooleanV)(env, JRI_CallStaticMethodBoolean_op_va_list, clazz, methodID, args)) -#define JRI_CallStaticMethodBooleanA(env, clazz, methodID, args) \ - (((*(env))->CallStaticMethodBooleanA)(env, JRI_CallStaticMethodBoolean_op_array, clazz, methodID, args)) - -#define JRI_CallStaticMethodByte(env) ((*(env))->CallStaticMethodByte) -#define JRI_CallStaticMethodByteV(env, clazz, methodID, args) \ - (((*(env))->CallStaticMethodByteV)(env, JRI_CallStaticMethodByte_op_va_list, clazz, methodID, args)) -#define JRI_CallStaticMethodByteA(env, clazz, methodID, args) \ - (((*(env))->CallStaticMethodByteA)(env, JRI_CallStaticMethodByte_op_array, clazz, methodID, args)) - -#define JRI_CallStaticMethodChar(env) ((*(env))->CallStaticMethodChar) -#define JRI_CallStaticMethodCharV(env, clazz, methodID, args) \ - (((*(env))->CallStaticMethodCharV)(env, JRI_CallStaticMethodChar_op_va_list, clazz, methodID, args)) -#define JRI_CallStaticMethodCharA(env, clazz, methodID, args) \ - (((*(env))->CallStaticMethodCharA)(env, JRI_CallStaticMethodChar_op_array, clazz, methodID, args)) - -#define JRI_CallStaticMethodShort(env) ((*(env))->CallStaticMethodShort) -#define JRI_CallStaticMethodShortV(env, clazz, methodID, args) \ - (((*(env))->CallStaticMethodShortV)(env, JRI_CallStaticMethodShort_op_va_list, clazz, methodID, args)) -#define JRI_CallStaticMethodShortA(env, clazz, methodID, args) \ - (((*(env))->CallStaticMethodShortA)(env, JRI_CallStaticMethodShort_op_array, clazz, methodID, args)) - -#define JRI_CallStaticMethodInt(env) ((*(env))->CallStaticMethodInt) -#define JRI_CallStaticMethodIntV(env, clazz, methodID, args) \ - (((*(env))->CallStaticMethodIntV)(env, JRI_CallStaticMethodInt_op_va_list, clazz, methodID, args)) -#define JRI_CallStaticMethodIntA(env, clazz, methodID, args) \ - (((*(env))->CallStaticMethodIntA)(env, JRI_CallStaticMethodInt_op_array, clazz, methodID, args)) - -#define JRI_CallStaticMethodLong(env) ((*(env))->CallStaticMethodLong) -#define JRI_CallStaticMethodLongV(env, clazz, methodID, args) \ - (((*(env))->CallStaticMethodLongV)(env, JRI_CallStaticMethodLong_op_va_list, clazz, methodID, args)) -#define JRI_CallStaticMethodLongA(env, clazz, methodID, args) \ - (((*(env))->CallStaticMethodLongA)(env, JRI_CallStaticMethodLong_op_array, clazz, methodID, args)) - -#define JRI_CallStaticMethodFloat(env) ((*(env))->CallStaticMethodFloat) -#define JRI_CallStaticMethodFloatV(env, clazz, methodID, args) \ - (((*(env))->CallStaticMethodFloatV)(env, JRI_CallStaticMethodFloat_op_va_list, clazz, methodID, args)) -#define JRI_CallStaticMethodFloatA(env, clazz, methodID, args) \ - (((*(env))->CallStaticMethodFloatA)(env, JRI_CallStaticMethodFloat_op_array, clazz, methodID, args)) - -#define JRI_CallStaticMethodDouble(env) ((*(env))->CallStaticMethodDouble) -#define JRI_CallStaticMethodDoubleV(env, clazz, methodID, args) \ - (((*(env))->CallStaticMethodDoubleV)(env, JRI_CallStaticMethodDouble_op_va_list, clazz, methodID, args)) -#define JRI_CallStaticMethodDoubleA(env, clazz, methodID, args) \ - (((*(env))->CallStaticMethodDoubleA)(env, JRI_CallStaticMethodDouble_op_array, clazz, methodID, args)) - -#define JRI_GetStaticFieldID(env, clazz, name, sig) \ - (((*(env))->GetStaticFieldID)(env, JRI_GetStaticFieldID_op, clazz, name, sig)) - -#define JRI_GetStaticField(env, clazz, fieldID) \ - (((*(env))->GetStaticField)(env, JRI_GetStaticField_op, clazz, fieldID)) - -#define JRI_GetStaticFieldBoolean(env, clazz, fieldID) \ - (((*(env))->GetStaticFieldBoolean)(env, JRI_GetStaticFieldBoolean_op, clazz, fieldID)) - -#define JRI_GetStaticFieldByte(env, clazz, fieldID) \ - (((*(env))->GetStaticFieldByte)(env, JRI_GetStaticFieldByte_op, clazz, fieldID)) - -#define JRI_GetStaticFieldChar(env, clazz, fieldID) \ - (((*(env))->GetStaticFieldChar)(env, JRI_GetStaticFieldChar_op, clazz, fieldID)) - -#define JRI_GetStaticFieldShort(env, clazz, fieldID) \ - (((*(env))->GetStaticFieldShort)(env, JRI_GetStaticFieldShort_op, clazz, fieldID)) - -#define JRI_GetStaticFieldInt(env, clazz, fieldID) \ - (((*(env))->GetStaticFieldInt)(env, JRI_GetStaticFieldInt_op, clazz, fieldID)) - -#define JRI_GetStaticFieldLong(env, clazz, fieldID) \ - (((*(env))->GetStaticFieldLong)(env, JRI_GetStaticFieldLong_op, clazz, fieldID)) - -#define JRI_GetStaticFieldFloat(env, clazz, fieldID) \ - (((*(env))->GetStaticFieldFloat)(env, JRI_GetStaticFieldFloat_op, clazz, fieldID)) - -#define JRI_GetStaticFieldDouble(env, clazz, fieldID) \ - (((*(env))->GetStaticFieldDouble)(env, JRI_GetStaticFieldDouble_op, clazz, fieldID)) - -#define JRI_SetStaticField(env, clazz, fieldID, value) \ - (((*(env))->SetStaticField)(env, JRI_SetStaticField_op, clazz, fieldID, value)) - -#define JRI_SetStaticFieldBoolean(env, clazz, fieldID, value) \ - (((*(env))->SetStaticFieldBoolean)(env, JRI_SetStaticFieldBoolean_op, clazz, fieldID, value)) - -#define JRI_SetStaticFieldByte(env, clazz, fieldID, value) \ - (((*(env))->SetStaticFieldByte)(env, JRI_SetStaticFieldByte_op, clazz, fieldID, value)) - -#define JRI_SetStaticFieldChar(env, clazz, fieldID, value) \ - (((*(env))->SetStaticFieldChar)(env, JRI_SetStaticFieldChar_op, clazz, fieldID, value)) - -#define JRI_SetStaticFieldShort(env, clazz, fieldID, value) \ - (((*(env))->SetStaticFieldShort)(env, JRI_SetStaticFieldShort_op, clazz, fieldID, value)) - -#define JRI_SetStaticFieldInt(env, clazz, fieldID, value) \ - (((*(env))->SetStaticFieldInt)(env, JRI_SetStaticFieldInt_op, clazz, fieldID, value)) - -#define JRI_SetStaticFieldLong(env, clazz, fieldID, value) \ - (((*(env))->SetStaticFieldLong)(env, JRI_SetStaticFieldLong_op, clazz, fieldID, value)) - -#define JRI_SetStaticFieldFloat(env, clazz, fieldID, value) \ - (((*(env))->SetStaticFieldFloat)(env, JRI_SetStaticFieldFloat_op, clazz, fieldID, value)) - -#define JRI_SetStaticFieldDouble(env, clazz, fieldID, value) \ - (((*(env))->SetStaticFieldDouble)(env, JRI_SetStaticFieldDouble_op, clazz, fieldID, value)) - -#define JRI_NewString(env, unicode, len) \ - (((*(env))->NewString)(env, JRI_NewString_op, unicode, len)) - -#define JRI_GetStringLength(env, string) \ - (((*(env))->GetStringLength)(env, JRI_GetStringLength_op, string)) - -#define JRI_GetStringChars(env, string) \ - (((*(env))->GetStringChars)(env, JRI_GetStringChars_op, string)) - -#define JRI_NewStringUTF(env, utf, len) \ - (((*(env))->NewStringUTF)(env, JRI_NewStringUTF_op, utf, len)) - -#define JRI_GetStringUTFLength(env, string) \ - (((*(env))->GetStringUTFLength)(env, JRI_GetStringUTFLength_op, string)) - -#define JRI_GetStringUTFChars(env, string) \ - (((*(env))->GetStringUTFChars)(env, JRI_GetStringUTFChars_op, string)) - -#define JRI_NewScalarArray(env, length, elementSig, initialElements) \ - (((*(env))->NewScalarArray)(env, JRI_NewScalarArray_op, length, elementSig, initialElements)) - -#define JRI_GetScalarArrayLength(env, array) \ - (((*(env))->GetScalarArrayLength)(env, JRI_GetScalarArrayLength_op, array)) - -#define JRI_GetScalarArrayElements(env, array) \ - (((*(env))->GetScalarArrayElements)(env, JRI_GetScalarArrayElements_op, array)) - -#define JRI_NewObjectArray(env, length, elementClass, initialElement) \ - (((*(env))->NewObjectArray)(env, JRI_NewObjectArray_op, length, elementClass, initialElement)) - -#define JRI_GetObjectArrayLength(env, array) \ - (((*(env))->GetObjectArrayLength)(env, JRI_GetObjectArrayLength_op, array)) - -#define JRI_GetObjectArrayElement(env, array, index) \ - (((*(env))->GetObjectArrayElement)(env, JRI_GetObjectArrayElement_op, array, index)) - -#define JRI_SetObjectArrayElement(env, array, index, value) \ - (((*(env))->SetObjectArrayElement)(env, JRI_SetObjectArrayElement_op, array, index, value)) - -#define JRI_RegisterNatives(env, clazz, nameAndSigArray, nativeProcArray) \ - (((*(env))->RegisterNatives)(env, JRI_RegisterNatives_op, clazz, nameAndSigArray, nativeProcArray)) - -#define JRI_UnregisterNatives(env, clazz) \ - (((*(env))->UnregisterNatives)(env, JRI_UnregisterNatives_op, clazz)) - -#define JRI_NewStringPlatform(env, string, len, encoding, encodingLength) \ - (((*(env))->NewStringPlatform)(env, JRI_NewStringPlatform_op, string, len, encoding, encodingLength)) - -#define JRI_GetStringPlatformChars(env, string, encoding, encodingLength) \ - (((*(env))->GetStringPlatformChars)(env, JRI_GetStringPlatformChars_op, string, encoding, encodingLength)) - - -/******************************************************************************* - * JRIEnv Interface - ******************************************************************************/ - -struct java_lang_ClassLoader; -struct java_lang_Class; -struct java_lang_Throwable; -struct java_lang_Object; -struct java_lang_String; - -struct JRIEnvInterface { - void* reserved0; - void* reserved1; - void* reserved2; - void* reserved3; - struct java_lang_Class* (*FindClass)(JRIEnv* env, jint op, const char* a); - void (*Throw)(JRIEnv* env, jint op, struct java_lang_Throwable* a); - void (*ThrowNew)(JRIEnv* env, jint op, struct java_lang_Class* a, const char* b); - struct java_lang_Throwable* (*ExceptionOccurred)(JRIEnv* env, jint op); - void (*ExceptionDescribe)(JRIEnv* env, jint op); - void (*ExceptionClear)(JRIEnv* env, jint op); - jglobal (*NewGlobalRef)(JRIEnv* env, jint op, void* a); - void (*DisposeGlobalRef)(JRIEnv* env, jint op, jglobal a); - void* (*GetGlobalRef)(JRIEnv* env, jint op, jglobal a); - void (*SetGlobalRef)(JRIEnv* env, jint op, jglobal a, void* b); - jbool (*IsSameObject)(JRIEnv* env, jint op, void* a, void* b); - void* (*NewObject)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...); - void* (*NewObjectV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c); - void* (*NewObjectA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c); - struct java_lang_Class* (*GetObjectClass)(JRIEnv* env, jint op, void* a); - jbool (*IsInstanceOf)(JRIEnv* env, jint op, void* a, struct java_lang_Class* b); - jint (*GetMethodID)(JRIEnv* env, jint op, struct java_lang_Class* a, const char* b, const char* c); - void* (*CallMethod)(JRIEnv* env, jint op, void* a, jint b, ...); - void* (*CallMethodV)(JRIEnv* env, jint op, void* a, jint b, va_list c); - void* (*CallMethodA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c); - jbool (*CallMethodBoolean)(JRIEnv* env, jint op, void* a, jint b, ...); - jbool (*CallMethodBooleanV)(JRIEnv* env, jint op, void* a, jint b, va_list c); - jbool (*CallMethodBooleanA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c); - jbyte (*CallMethodByte)(JRIEnv* env, jint op, void* a, jint b, ...); - jbyte (*CallMethodByteV)(JRIEnv* env, jint op, void* a, jint b, va_list c); - jbyte (*CallMethodByteA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c); - jchar (*CallMethodChar)(JRIEnv* env, jint op, void* a, jint b, ...); - jchar (*CallMethodCharV)(JRIEnv* env, jint op, void* a, jint b, va_list c); - jchar (*CallMethodCharA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c); - jshort (*CallMethodShort)(JRIEnv* env, jint op, void* a, jint b, ...); - jshort (*CallMethodShortV)(JRIEnv* env, jint op, void* a, jint b, va_list c); - jshort (*CallMethodShortA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c); - jint (*CallMethodInt)(JRIEnv* env, jint op, void* a, jint b, ...); - jint (*CallMethodIntV)(JRIEnv* env, jint op, void* a, jint b, va_list c); - jint (*CallMethodIntA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c); - jlong (*CallMethodLong)(JRIEnv* env, jint op, void* a, jint b, ...); - jlong (*CallMethodLongV)(JRIEnv* env, jint op, void* a, jint b, va_list c); - jlong (*CallMethodLongA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c); - jfloat (*CallMethodFloat)(JRIEnv* env, jint op, void* a, jint b, ...); - jfloat (*CallMethodFloatV)(JRIEnv* env, jint op, void* a, jint b, va_list c); - jfloat (*CallMethodFloatA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c); - jdouble (*CallMethodDouble)(JRIEnv* env, jint op, void* a, jint b, ...); - jdouble (*CallMethodDoubleV)(JRIEnv* env, jint op, void* a, jint b, va_list c); - jdouble (*CallMethodDoubleA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c); - jint (*GetFieldID)(JRIEnv* env, jint op, struct java_lang_Class* a, const char* b, const char* c); - void* (*GetField)(JRIEnv* env, jint op, void* a, jint b); - jbool (*GetFieldBoolean)(JRIEnv* env, jint op, void* a, jint b); - jbyte (*GetFieldByte)(JRIEnv* env, jint op, void* a, jint b); - jchar (*GetFieldChar)(JRIEnv* env, jint op, void* a, jint b); - jshort (*GetFieldShort)(JRIEnv* env, jint op, void* a, jint b); - jint (*GetFieldInt)(JRIEnv* env, jint op, void* a, jint b); - jlong (*GetFieldLong)(JRIEnv* env, jint op, void* a, jint b); - jfloat (*GetFieldFloat)(JRIEnv* env, jint op, void* a, jint b); - jdouble (*GetFieldDouble)(JRIEnv* env, jint op, void* a, jint b); - void (*SetField)(JRIEnv* env, jint op, void* a, jint b, void* c); - void (*SetFieldBoolean)(JRIEnv* env, jint op, void* a, jint b, jbool c); - void (*SetFieldByte)(JRIEnv* env, jint op, void* a, jint b, jbyte c); - void (*SetFieldChar)(JRIEnv* env, jint op, void* a, jint b, jchar c); - void (*SetFieldShort)(JRIEnv* env, jint op, void* a, jint b, jshort c); - void (*SetFieldInt)(JRIEnv* env, jint op, void* a, jint b, jint c); - void (*SetFieldLong)(JRIEnv* env, jint op, void* a, jint b, jlong c); - void (*SetFieldFloat)(JRIEnv* env, jint op, void* a, jint b, jfloat c); - void (*SetFieldDouble)(JRIEnv* env, jint op, void* a, jint b, jdouble c); - jbool (*IsSubclassOf)(JRIEnv* env, jint op, struct java_lang_Class* a, struct java_lang_Class* b); - jint (*GetStaticMethodID)(JRIEnv* env, jint op, struct java_lang_Class* a, const char* b, const char* c); - void* (*CallStaticMethod)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...); - void* (*CallStaticMethodV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c); - void* (*CallStaticMethodA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c); - jbool (*CallStaticMethodBoolean)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...); - jbool (*CallStaticMethodBooleanV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c); - jbool (*CallStaticMethodBooleanA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c); - jbyte (*CallStaticMethodByte)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...); - jbyte (*CallStaticMethodByteV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c); - jbyte (*CallStaticMethodByteA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c); - jchar (*CallStaticMethodChar)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...); - jchar (*CallStaticMethodCharV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c); - jchar (*CallStaticMethodCharA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c); - jshort (*CallStaticMethodShort)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...); - jshort (*CallStaticMethodShortV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c); - jshort (*CallStaticMethodShortA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c); - jint (*CallStaticMethodInt)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...); - jint (*CallStaticMethodIntV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c); - jint (*CallStaticMethodIntA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c); - jlong (*CallStaticMethodLong)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...); - jlong (*CallStaticMethodLongV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c); - jlong (*CallStaticMethodLongA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c); - jfloat (*CallStaticMethodFloat)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...); - jfloat (*CallStaticMethodFloatV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c); - jfloat (*CallStaticMethodFloatA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c); - jdouble (*CallStaticMethodDouble)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...); - jdouble (*CallStaticMethodDoubleV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c); - jdouble (*CallStaticMethodDoubleA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c); - jint (*GetStaticFieldID)(JRIEnv* env, jint op, struct java_lang_Class* a, const char* b, const char* c); - void* (*GetStaticField)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b); - jbool (*GetStaticFieldBoolean)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b); - jbyte (*GetStaticFieldByte)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b); - jchar (*GetStaticFieldChar)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b); - jshort (*GetStaticFieldShort)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b); - jint (*GetStaticFieldInt)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b); - jlong (*GetStaticFieldLong)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b); - jfloat (*GetStaticFieldFloat)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b); - jdouble (*GetStaticFieldDouble)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b); - void (*SetStaticField)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, void* c); - void (*SetStaticFieldBoolean)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jbool c); - void (*SetStaticFieldByte)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jbyte c); - void (*SetStaticFieldChar)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jchar c); - void (*SetStaticFieldShort)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jshort c); - void (*SetStaticFieldInt)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jint c); - void (*SetStaticFieldLong)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jlong c); - void (*SetStaticFieldFloat)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jfloat c); - void (*SetStaticFieldDouble)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jdouble c); - struct java_lang_String* (*NewString)(JRIEnv* env, jint op, const jchar* a, jint b); - jint (*GetStringLength)(JRIEnv* env, jint op, struct java_lang_String* a); - const jchar* (*GetStringChars)(JRIEnv* env, jint op, struct java_lang_String* a); - struct java_lang_String* (*NewStringUTF)(JRIEnv* env, jint op, const jbyte* a, jint b); - jint (*GetStringUTFLength)(JRIEnv* env, jint op, struct java_lang_String* a); - const jbyte* (*GetStringUTFChars)(JRIEnv* env, jint op, struct java_lang_String* a); - void* (*NewScalarArray)(JRIEnv* env, jint op, jint a, const char* b, const jbyte* c); - jint (*GetScalarArrayLength)(JRIEnv* env, jint op, void* a); - jbyte* (*GetScalarArrayElements)(JRIEnv* env, jint op, void* a); - void* (*NewObjectArray)(JRIEnv* env, jint op, jint a, struct java_lang_Class* b, void* c); - jint (*GetObjectArrayLength)(JRIEnv* env, jint op, void* a); - void* (*GetObjectArrayElement)(JRIEnv* env, jint op, void* a, jint b); - void (*SetObjectArrayElement)(JRIEnv* env, jint op, void* a, jint b, void* c); - void (*RegisterNatives)(JRIEnv* env, jint op, struct java_lang_Class* a, char** b, void** c); - void (*UnregisterNatives)(JRIEnv* env, jint op, struct java_lang_Class* a); - struct java_lang_Class* (*DefineClass)(JRIEnv* env, jint op, struct java_lang_ClassLoader* a, jbyte* b, jsize bLen); - struct java_lang_String* (*NewStringPlatform)(JRIEnv* env, jint op, const jbyte* a, jint b, const jbyte* c, jint d); - const jbyte* (*GetStringPlatformChars)(JRIEnv* env, jint op, struct java_lang_String* a, const jbyte* b, jint c); -}; - -/* -** **************************************************************************** -** JRIEnv Operation IDs -** *************************************************************************** -*/ - -typedef enum JRIEnvOperations { - JRI_Reserved0_op, - JRI_Reserved1_op, - JRI_Reserved2_op, - JRI_Reserved3_op, - JRI_FindClass_op, - JRI_Throw_op, - JRI_ThrowNew_op, - JRI_ExceptionOccurred_op, - JRI_ExceptionDescribe_op, - JRI_ExceptionClear_op, - JRI_NewGlobalRef_op, - JRI_DisposeGlobalRef_op, - JRI_GetGlobalRef_op, - JRI_SetGlobalRef_op, - JRI_IsSameObject_op, - JRI_NewObject_op, - JRI_NewObject_op_va_list, - JRI_NewObject_op_array, - JRI_GetObjectClass_op, - JRI_IsInstanceOf_op, - JRI_GetMethodID_op, - JRI_CallMethod_op, - JRI_CallMethod_op_va_list, - JRI_CallMethod_op_array, - JRI_CallMethodBoolean_op, - JRI_CallMethodBoolean_op_va_list, - JRI_CallMethodBoolean_op_array, - JRI_CallMethodByte_op, - JRI_CallMethodByte_op_va_list, - JRI_CallMethodByte_op_array, - JRI_CallMethodChar_op, - JRI_CallMethodChar_op_va_list, - JRI_CallMethodChar_op_array, - JRI_CallMethodShort_op, - JRI_CallMethodShort_op_va_list, - JRI_CallMethodShort_op_array, - JRI_CallMethodInt_op, - JRI_CallMethodInt_op_va_list, - JRI_CallMethodInt_op_array, - JRI_CallMethodLong_op, - JRI_CallMethodLong_op_va_list, - JRI_CallMethodLong_op_array, - JRI_CallMethodFloat_op, - JRI_CallMethodFloat_op_va_list, - JRI_CallMethodFloat_op_array, - JRI_CallMethodDouble_op, - JRI_CallMethodDouble_op_va_list, - JRI_CallMethodDouble_op_array, - JRI_GetFieldID_op, - JRI_GetField_op, - JRI_GetFieldBoolean_op, - JRI_GetFieldByte_op, - JRI_GetFieldChar_op, - JRI_GetFieldShort_op, - JRI_GetFieldInt_op, - JRI_GetFieldLong_op, - JRI_GetFieldFloat_op, - JRI_GetFieldDouble_op, - JRI_SetField_op, - JRI_SetFieldBoolean_op, - JRI_SetFieldByte_op, - JRI_SetFieldChar_op, - JRI_SetFieldShort_op, - JRI_SetFieldInt_op, - JRI_SetFieldLong_op, - JRI_SetFieldFloat_op, - JRI_SetFieldDouble_op, - JRI_IsSubclassOf_op, - JRI_GetStaticMethodID_op, - JRI_CallStaticMethod_op, - JRI_CallStaticMethod_op_va_list, - JRI_CallStaticMethod_op_array, - JRI_CallStaticMethodBoolean_op, - JRI_CallStaticMethodBoolean_op_va_list, - JRI_CallStaticMethodBoolean_op_array, - JRI_CallStaticMethodByte_op, - JRI_CallStaticMethodByte_op_va_list, - JRI_CallStaticMethodByte_op_array, - JRI_CallStaticMethodChar_op, - JRI_CallStaticMethodChar_op_va_list, - JRI_CallStaticMethodChar_op_array, - JRI_CallStaticMethodShort_op, - JRI_CallStaticMethodShort_op_va_list, - JRI_CallStaticMethodShort_op_array, - JRI_CallStaticMethodInt_op, - JRI_CallStaticMethodInt_op_va_list, - JRI_CallStaticMethodInt_op_array, - JRI_CallStaticMethodLong_op, - JRI_CallStaticMethodLong_op_va_list, - JRI_CallStaticMethodLong_op_array, - JRI_CallStaticMethodFloat_op, - JRI_CallStaticMethodFloat_op_va_list, - JRI_CallStaticMethodFloat_op_array, - JRI_CallStaticMethodDouble_op, - JRI_CallStaticMethodDouble_op_va_list, - JRI_CallStaticMethodDouble_op_array, - JRI_GetStaticFieldID_op, - JRI_GetStaticField_op, - JRI_GetStaticFieldBoolean_op, - JRI_GetStaticFieldByte_op, - JRI_GetStaticFieldChar_op, - JRI_GetStaticFieldShort_op, - JRI_GetStaticFieldInt_op, - JRI_GetStaticFieldLong_op, - JRI_GetStaticFieldFloat_op, - JRI_GetStaticFieldDouble_op, - JRI_SetStaticField_op, - JRI_SetStaticFieldBoolean_op, - JRI_SetStaticFieldByte_op, - JRI_SetStaticFieldChar_op, - JRI_SetStaticFieldShort_op, - JRI_SetStaticFieldInt_op, - JRI_SetStaticFieldLong_op, - JRI_SetStaticFieldFloat_op, - JRI_SetStaticFieldDouble_op, - JRI_NewString_op, - JRI_GetStringLength_op, - JRI_GetStringChars_op, - JRI_NewStringUTF_op, - JRI_GetStringUTFLength_op, - JRI_GetStringUTFChars_op, - JRI_NewScalarArray_op, - JRI_GetScalarArrayLength_op, - JRI_GetScalarArrayElements_op, - JRI_NewObjectArray_op, - JRI_GetObjectArrayLength_op, - JRI_GetObjectArrayElement_op, - JRI_SetObjectArrayElement_op, - JRI_RegisterNatives_op, - JRI_UnregisterNatives_op, - JRI_DefineClass_op, - JRI_NewStringPlatform_op, - JRI_GetStringPlatformChars_op -} JRIEnvOperations; - -#ifdef __cplusplus -} /* extern "C" */ -#endif /* __cplusplus */ - -#endif /* JRI_H */ -/******************************************************************************/ diff --git a/Templates/Empty/web/source/npplugin/windows/jri_md.h b/Templates/Empty/web/source/npplugin/windows/jri_md.h deleted file mode 100644 index 950481de3..000000000 --- a/Templates/Empty/web/source/npplugin/windows/jri_md.h +++ /dev/null @@ -1,574 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (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.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -/******************************************************************************* - * Java Runtime Interface - Machine Dependent Types - ******************************************************************************/ - -#ifndef JRI_MD_H -#define JRI_MD_H - -#include -#include "prtypes.h" /* Needed for HAS_LONG_LONG ifdefs */ - -#ifdef __cplusplus -extern "C" { -#endif - -/******************************************************************************* - * WHAT'S UP WITH THIS FILE? - * - * This is where we define the mystical JRI_PUBLIC_API macro that works on all - * platforms. If you're running with Visual C++, Symantec C, or Borland's - * development environment on the PC, you're all set. Or if you're on the Mac - * with Metrowerks, Symantec or MPW with SC you're ok too. For UNIX it shouldn't - * matter. - * - * On UNIX though you probably care about a couple of other symbols though: - * IS_LITTLE_ENDIAN must be defined for little-endian systems - * HAVE_LONG_LONG must be defined on systems that have 'long long' integers - * HAVE_ALIGNED_LONGLONGS must be defined if long-longs must be 8 byte aligned - * HAVE_ALIGNED_DOUBLES must be defined if doubles must be 8 byte aligned - * IS_64 must be defined on 64-bit machines (like Dec Alpha) - ******************************************************************************/ - -/* DLL Entry modifiers... */ - -/* Windows */ -#if defined(XP_WIN) || defined(_WINDOWS) || defined(WIN32) || defined(_WIN32) -# include -# if defined(_MSC_VER) || defined(__GNUC__) -# if defined(WIN32) || defined(_WIN32) -# define JRI_PUBLIC_API(ResultType) __declspec(dllexport) ResultType -# define JRI_PUBLIC_VAR(VarType) VarType -# define JRI_PUBLIC_VAR_EXP(VarType) __declspec(dllexport) VarType -# define JRI_PUBLIC_VAR_IMP(VarType) __declspec(dllimport) VarType -# define JRI_NATIVE_STUB(ResultType) __declspec(dllexport) ResultType -# define JRI_CALLBACK -# else /* !_WIN32 */ -# if defined(_WINDLL) -# define JRI_PUBLIC_API(ResultType) ResultType __cdecl __export __loadds -# define JRI_PUBLIC_VAR(VarType) VarType -# define JRI_PUBLIC_VAR_EXP(VarType) JRI_PUBLIC_VAR(VarType) -# define JRI_PUBLIC_VAR_IMP(VarType) JRI_PUBLIC_VAR(VarType) -# define JRI_NATIVE_STUB(ResultType) ResultType __cdecl __loadds -# define JRI_CALLBACK __loadds -# else /* !WINDLL */ -# define JRI_PUBLIC_API(ResultType) ResultType __cdecl __export -# define JRI_PUBLIC_VAR(VarType) VarType -# define JRI_PUBLIC_VAR_EXP(VarType) JRI_PUBLIC_VAR(VarType) -# define JRI_PUBLIC_VAR_IMP(VarType) JRI_PUBLIC_VAR(VarType) -# define JRI_NATIVE_STUB(ResultType) ResultType __cdecl __export -# define JRI_CALLBACK __export -# endif /* !WINDLL */ -# endif /* !_WIN32 */ -# elif defined(__BORLANDC__) -# if defined(WIN32) || defined(_WIN32) -# define JRI_PUBLIC_API(ResultType) __export ResultType -# define JRI_PUBLIC_VAR(VarType) VarType -# define JRI_PUBLIC_VAR_EXP(VarType) __export VarType -# define JRI_PUBLIC_VAR_IMP(VarType) __import VarType -# define JRI_NATIVE_STUB(ResultType) __export ResultType -# define JRI_CALLBACK -# else /* !_WIN32 */ -# define JRI_PUBLIC_API(ResultType) ResultType _cdecl _export _loadds -# define JRI_PUBLIC_VAR(VarType) VarType -# define JRI_PUBLIC_VAR_EXP(VarType) __cdecl __export VarType -# define JRI_PUBLIC_VAR_IMP(VarType) __cdecl __import VarType -# define JRI_NATIVE_STUB(ResultType) ResultType _cdecl _loadds -# define JRI_CALLBACK _loadds -# endif -# else -# error Unsupported PC development environment. -# endif -# ifndef IS_LITTLE_ENDIAN -# define IS_LITTLE_ENDIAN -# endif - -/* OS/2 */ -#elif defined(XP_OS2) -# ifdef XP_OS2_VACPP -# define JRI_PUBLIC_API(ResultType) ResultType _Optlink -# define JRI_PUBLIC_VAR(VarType) VarType -# define JRI_CALLBACK -# elif defined(__declspec) -# define JRI_PUBLIC_API(ResultType) __declspec(dllexport) ResultType -# define JRI_PUBLIC_VAR(VarType) VarType -# define JRI_PUBLIC_VAR_EXP(VarType) __declspec(dllexport) VarType -# define JRI_PUBLIC_VAR_IMP(VarType) __declspec(dllimport) VarType -# define JRI_NATIVE_STUB(ResultType) __declspec(dllexport) ResultType -# define JRI_CALLBACK -# else -# define JRI_PUBLIC_API(ResultType) ResultType -# define JRI_PUBLIC_VAR(VarType) VarType -# define JRI_CALLBACK -# endif - -/* Mac */ -#elif defined (macintosh) || Macintosh || THINK_C -# if defined(__MWERKS__) /* Metrowerks */ -# if !__option(enumsalwaysint) -# error You need to define 'Enums Always Int' for your project. -# endif -# if defined(TARGET_CPU_68K) && !TARGET_RT_MAC_CFM -# if !__option(fourbyteints) -# error You need to define 'Struct Alignment: 68k' for your project. -# endif -# endif /* !GENERATINGCFM */ -# define JRI_PUBLIC_API(ResultType) __declspec(export) ResultType -# define JRI_PUBLIC_VAR(VarType) JRI_PUBLIC_API(VarType) -# define JRI_PUBLIC_VAR_EXP(VarType) JRI_PUBLIC_API(VarType) -# define JRI_PUBLIC_VAR_IMP(VarType) JRI_PUBLIC_API(VarType) -# define JRI_NATIVE_STUB(ResultType) JRI_PUBLIC_API(ResultType) -# elif defined(__SC__) /* Symantec */ -# error What are the Symantec defines? (warren@netscape.com) -# elif macintosh && applec /* MPW */ -# error Please upgrade to the latest MPW compiler (SC). -# else -# error Unsupported Mac development environment. -# endif -# define JRI_CALLBACK - -/* Unix or else */ -#else -# define JRI_PUBLIC_API(ResultType) ResultType -# define JRI_PUBLIC_VAR(VarType) VarType -# define JRI_PUBLIC_VAR_EXP(VarType) JRI_PUBLIC_VAR(VarType) -# define JRI_PUBLIC_VAR_IMP(VarType) JRI_PUBLIC_VAR(VarType) -# define JRI_NATIVE_STUB(ResultType) ResultType -# define JRI_CALLBACK -#endif - -#ifndef FAR /* for non-Win16 */ -#define FAR -#endif - -/******************************************************************************/ - -/* Java Scalar Types */ - -#if 0 /* now in jni.h */ -typedef short jchar; -typedef short jshort; -typedef float jfloat; -typedef double jdouble; -typedef juint jsize; -#endif - -/* moved from jni.h -- Sun's new jni.h doesn't have this anymore */ -#ifdef __cplusplus -typedef class _jobject *jref; -#else -typedef struct _jobject *jref; -#endif - -typedef unsigned char jbool; -typedef signed char jbyte; -#ifdef IS_64 /* XXX ok for alpha, but not right on all 64-bit architectures */ -typedef unsigned int juint; -typedef int jint; -#else -typedef unsigned long juint; -typedef long jint; -#endif - -/******************************************************************************* - * jlong : long long (64-bit signed integer type) support. - ******************************************************************************/ - -/* -** Bit masking macros. (n must be <= 31 to be portable) -*/ -#define JRI_BIT(n) ((juint)1 << (n)) -#define JRI_BITMASK(n) (JRI_BIT(n) - 1) - -#ifdef HAVE_LONG_LONG - -#ifdef OSF1 - -/* long is default 64-bit on OSF1, -std1 does not allow long long */ -typedef long jlong; -typedef unsigned long julong; -#define jlong_MAXINT 0x7fffffffffffffffL -#define jlong_MININT 0x8000000000000000L -#define jlong_ZERO 0x0L - -#elif (defined(WIN32) || defined(_WIN32)) - -typedef LONGLONG jlong; -typedef DWORDLONG julong; -#define jlong_MAXINT 0x7fffffffffffffffi64 -#define jlong_MININT 0x8000000000000000i64 -#define jlong_ZERO 0x0i64 - -#else - -typedef long long jlong; -typedef unsigned long long julong; -#define jlong_MAXINT 0x7fffffffffffffffLL -#define jlong_MININT 0x8000000000000000LL -#define jlong_ZERO 0x0LL - -#endif - -#define jlong_IS_ZERO(a) ((a) == 0) -#define jlong_EQ(a, b) ((a) == (b)) -#define jlong_NE(a, b) ((a) != (b)) -#define jlong_GE_ZERO(a) ((a) >= 0) -#define jlong_CMP(a, op, b) ((a) op (b)) - -#define jlong_AND(r, a, b) ((r) = (a) & (b)) -#define jlong_OR(r, a, b) ((r) = (a) | (b)) -#define jlong_XOR(r, a, b) ((r) = (a) ^ (b)) -#define jlong_OR2(r, a) ((r) = (r) | (a)) -#define jlong_NOT(r, a) ((r) = ~(a)) - -#define jlong_NEG(r, a) ((r) = -(a)) -#define jlong_ADD(r, a, b) ((r) = (a) + (b)) -#define jlong_SUB(r, a, b) ((r) = (a) - (b)) - -#define jlong_MUL(r, a, b) ((r) = (a) * (b)) -#define jlong_DIV(r, a, b) ((r) = (a) / (b)) -#define jlong_MOD(r, a, b) ((r) = (a) % (b)) - -#define jlong_SHL(r, a, b) ((r) = (a) << (b)) -#define jlong_SHR(r, a, b) ((r) = (a) >> (b)) -#define jlong_USHR(r, a, b) ((r) = (julong)(a) >> (b)) -#define jlong_ISHL(r, a, b) ((r) = ((jlong)(a)) << (b)) - -#define jlong_L2I(i, l) ((i) = (int)(l)) -#define jlong_L2UI(ui, l) ((ui) =(unsigned int)(l)) -#define jlong_L2F(f, l) ((f) = (l)) -#define jlong_L2D(d, l) ((d) = (l)) - -#define jlong_I2L(l, i) ((l) = (i)) -#define jlong_UI2L(l, ui) ((l) = (ui)) -#define jlong_F2L(l, f) ((l) = (f)) -#define jlong_D2L(l, d) ((l) = (d)) - -#define jlong_UDIVMOD(qp, rp, a, b) \ - (*(qp) = ((julong)(a) / (b)), \ - *(rp) = ((julong)(a) % (b))) - -#else /* !HAVE_LONG_LONG */ - -typedef struct { -#ifdef IS_LITTLE_ENDIAN - juint lo, hi; -#else - juint hi, lo; -#endif -} jlong; -typedef jlong julong; - -extern jlong jlong_MAXINT, jlong_MININT, jlong_ZERO; - -#define jlong_IS_ZERO(a) (((a).hi == 0) && ((a).lo == 0)) -#define jlong_EQ(a, b) (((a).hi == (b).hi) && ((a).lo == (b).lo)) -#define jlong_NE(a, b) (((a).hi != (b).hi) || ((a).lo != (b).lo)) -#define jlong_GE_ZERO(a) (((a).hi >> 31) == 0) - -/* - * NB: jlong_CMP and jlong_UCMP work only for strict relationals (<, >). - */ -#define jlong_CMP(a, op, b) (((int32)(a).hi op (int32)(b).hi) || \ - (((a).hi == (b).hi) && ((a).lo op (b).lo))) -#define jlong_UCMP(a, op, b) (((a).hi op (b).hi) || \ - (((a).hi == (b).hi) && ((a).lo op (b).lo))) - -#define jlong_AND(r, a, b) ((r).lo = (a).lo & (b).lo, \ - (r).hi = (a).hi & (b).hi) -#define jlong_OR(r, a, b) ((r).lo = (a).lo | (b).lo, \ - (r).hi = (a).hi | (b).hi) -#define jlong_XOR(r, a, b) ((r).lo = (a).lo ^ (b).lo, \ - (r).hi = (a).hi ^ (b).hi) -#define jlong_OR2(r, a) ((r).lo = (r).lo | (a).lo, \ - (r).hi = (r).hi | (a).hi) -#define jlong_NOT(r, a) ((r).lo = ~(a).lo, \ - (r).hi = ~(a).hi) - -#define jlong_NEG(r, a) ((r).lo = -(int32)(a).lo, \ - (r).hi = -(int32)(a).hi - ((r).lo != 0)) -#define jlong_ADD(r, a, b) { \ - jlong _a, _b; \ - _a = a; _b = b; \ - (r).lo = _a.lo + _b.lo; \ - (r).hi = _a.hi + _b.hi + ((r).lo < _b.lo); \ -} - -#define jlong_SUB(r, a, b) { \ - jlong _a, _b; \ - _a = a; _b = b; \ - (r).lo = _a.lo - _b.lo; \ - (r).hi = _a.hi - _b.hi - (_a.lo < _b.lo); \ -} \ - -/* - * Multiply 64-bit operands a and b to get 64-bit result r. - * First multiply the low 32 bits of a and b to get a 64-bit result in r. - * Then add the outer and inner products to r.hi. - */ -#define jlong_MUL(r, a, b) { \ - jlong _a, _b; \ - _a = a; _b = b; \ - jlong_MUL32(r, _a.lo, _b.lo); \ - (r).hi += _a.hi * _b.lo + _a.lo * _b.hi; \ -} - -/* XXX _jlong_lo16(a) = ((a) << 16 >> 16) is better on some archs (not on mips) */ -#define _jlong_lo16(a) ((a) & JRI_BITMASK(16)) -#define _jlong_hi16(a) ((a) >> 16) - -/* - * Multiply 32-bit operands a and b to get 64-bit result r. - * Use polynomial expansion based on primitive field element (1 << 16). - */ -#define jlong_MUL32(r, a, b) { \ - juint _a1, _a0, _b1, _b0, _y0, _y1, _y2, _y3; \ - _a1 = _jlong_hi16(a), _a0 = _jlong_lo16(a); \ - _b1 = _jlong_hi16(b), _b0 = _jlong_lo16(b); \ - _y0 = _a0 * _b0; \ - _y1 = _a0 * _b1; \ - _y2 = _a1 * _b0; \ - _y3 = _a1 * _b1; \ - _y1 += _jlong_hi16(_y0); /* can't carry */ \ - _y1 += _y2; /* might carry */ \ - if (_y1 < _y2) _y3 += 1 << 16; /* propagate */ \ - (r).lo = (_jlong_lo16(_y1) << 16) + _jlong_lo16(_y0); \ - (r).hi = _y3 + _jlong_hi16(_y1); \ -} - -/* - * Divide 64-bit unsigned operand a by 64-bit unsigned operand b, setting *qp - * to the 64-bit unsigned quotient, and *rp to the 64-bit unsigned remainder. - * Minimize effort if one of qp and rp is null. - */ -#define jlong_UDIVMOD(qp, rp, a, b) jlong_udivmod(qp, rp, a, b) - -extern JRI_PUBLIC_API(void) -jlong_udivmod(julong *qp, julong *rp, julong a, julong b); - -#define jlong_DIV(r, a, b) { \ - jlong _a, _b; \ - juint _negative = (int32)(a).hi < 0; \ - if (_negative) { \ - jlong_NEG(_a, a); \ - } else { \ - _a = a; \ - } \ - if ((int32)(b).hi < 0) { \ - _negative ^= 1; \ - jlong_NEG(_b, b); \ - } else { \ - _b = b; \ - } \ - jlong_UDIVMOD(&(r), 0, _a, _b); \ - if (_negative) \ - jlong_NEG(r, r); \ -} - -#define jlong_MOD(r, a, b) { \ - jlong _a, _b; \ - juint _negative = (int32)(a).hi < 0; \ - if (_negative) { \ - jlong_NEG(_a, a); \ - } else { \ - _a = a; \ - } \ - if ((int32)(b).hi < 0) { \ - jlong_NEG(_b, b); \ - } else { \ - _b = b; \ - } \ - jlong_UDIVMOD(0, &(r), _a, _b); \ - if (_negative) \ - jlong_NEG(r, r); \ -} - -/* - * NB: b is a juint, not jlong or julong, for the shift ops. - */ -#define jlong_SHL(r, a, b) { \ - if (b) { \ - jlong _a; \ - _a = a; \ - if ((b) < 32) { \ - (r).lo = _a.lo << (b); \ - (r).hi = (_a.hi << (b)) | (_a.lo >> (32 - (b))); \ - } else { \ - (r).lo = 0; \ - (r).hi = _a.lo << ((b) & 31); \ - } \ - } else { \ - (r) = (a); \ - } \ -} - -/* a is an int32, b is int32, r is jlong */ -#define jlong_ISHL(r, a, b) { \ - if (b) { \ - jlong _a; \ - _a.lo = (a); \ - _a.hi = 0; \ - if ((b) < 32) { \ - (r).lo = (a) << (b); \ - (r).hi = ((a) >> (32 - (b))); \ - } else { \ - (r).lo = 0; \ - (r).hi = (a) << ((b) & 31); \ - } \ - } else { \ - (r).lo = (a); \ - (r).hi = 0; \ - } \ -} - -#define jlong_SHR(r, a, b) { \ - if (b) { \ - jlong _a; \ - _a = a; \ - if ((b) < 32) { \ - (r).lo = (_a.hi << (32 - (b))) | (_a.lo >> (b)); \ - (r).hi = (int32)_a.hi >> (b); \ - } else { \ - (r).lo = (int32)_a.hi >> ((b) & 31); \ - (r).hi = (int32)_a.hi >> 31; \ - } \ - } else { \ - (r) = (a); \ - } \ -} - -#define jlong_USHR(r, a, b) { \ - if (b) { \ - jlong _a; \ - _a = a; \ - if ((b) < 32) { \ - (r).lo = (_a.hi << (32 - (b))) | (_a.lo >> (b)); \ - (r).hi = _a.hi >> (b); \ - } else { \ - (r).lo = _a.hi >> ((b) & 31); \ - (r).hi = 0; \ - } \ - } else { \ - (r) = (a); \ - } \ -} - -#define jlong_L2I(i, l) ((i) = (l).lo) -#define jlong_L2UI(ui, l) ((ui) = (l).lo) -#define jlong_L2F(f, l) { double _d; jlong_L2D(_d, l); (f) = (float) _d; } - -#define jlong_L2D(d, l) { \ - int32 _negative; \ - jlong _absval; \ - \ - _negative = (l).hi >> 31; \ - if (_negative) { \ - jlong_NEG(_absval, l); \ - } else { \ - _absval = l; \ - } \ - (d) = (double)_absval.hi * 4.294967296e9 + _absval.lo; \ - if (_negative) \ - (d) = -(d); \ -} - -#define jlong_I2L(l, i) ((l).hi = (i) >> 31, (l).lo = (i)) -#define jlong_UI2L(l, ui) ((l).hi = 0, (l).lo = (ui)) -#define jlong_F2L(l, f) { double _d = (double) f; jlong_D2L(l, _d); } - -#define jlong_D2L(l, d) { \ - int _negative; \ - double _absval, _d_hi; \ - jlong _lo_d; \ - \ - _negative = ((d) < 0); \ - _absval = _negative ? -(d) : (d); \ - \ - (l).hi = (juint)(_absval / 4.294967296e9); \ - (l).lo = 0; \ - jlong_L2D(_d_hi, l); \ - _absval -= _d_hi; \ - _lo_d.hi = 0; \ - if (_absval < 0) { \ - _lo_d.lo = (juint) -_absval; \ - jlong_SUB(l, l, _lo_d); \ - } else { \ - _lo_d.lo = (juint) _absval; \ - jlong_ADD(l, l, _lo_d); \ - } \ - \ - if (_negative) \ - jlong_NEG(l, l); \ -} - -#endif /* !HAVE_LONG_LONG */ - -/******************************************************************************/ - -#ifdef HAVE_ALIGNED_LONGLONGS -#define JRI_GET_INT64(_t,_addr) ( ((_t).x[0] = ((jint*)(_addr))[0]), \ - ((_t).x[1] = ((jint*)(_addr))[1]), \ - (_t).l ) -#define JRI_SET_INT64(_t, _addr, _v) ( (_t).l = (_v), \ - ((jint*)(_addr))[0] = (_t).x[0], \ - ((jint*)(_addr))[1] = (_t).x[1] ) -#else -#define JRI_GET_INT64(_t,_addr) (*(jlong*)(_addr)) -#define JRI_SET_INT64(_t, _addr, _v) (*(jlong*)(_addr) = (_v)) -#endif - -/* If double's must be aligned on doubleword boundaries then define this */ -#ifdef HAVE_ALIGNED_DOUBLES -#define JRI_GET_DOUBLE(_t,_addr) ( ((_t).x[0] = ((jint*)(_addr))[0]), \ - ((_t).x[1] = ((jint*)(_addr))[1]), \ - (_t).d ) -#define JRI_SET_DOUBLE(_t, _addr, _v) ( (_t).d = (_v), \ - ((jint*)(_addr))[0] = (_t).x[0], \ - ((jint*)(_addr))[1] = (_t).x[1] ) -#else -#define JRI_GET_DOUBLE(_t,_addr) (*(jdouble*)(_addr)) -#define JRI_SET_DOUBLE(_t, _addr, _v) (*(jdouble*)(_addr) = (_v)) -#endif - -/******************************************************************************/ -#ifdef __cplusplus -} -#endif -#endif /* JRI_MD_H */ -/******************************************************************************/ diff --git a/Templates/Empty/web/source/npplugin/windows/jritypes.h b/Templates/Empty/web/source/npplugin/windows/jritypes.h deleted file mode 100644 index 2ef14aebe..000000000 --- a/Templates/Empty/web/source/npplugin/windows/jritypes.h +++ /dev/null @@ -1,243 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (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.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -/******************************************************************************* - * Java Runtime Interface - ******************************************************************************/ - -#ifndef JRITYPES_H -#define JRITYPES_H - -#include "jri_md.h" -#include "jni.h" -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/******************************************************************************* - * Types - ******************************************************************************/ - -struct JRIEnvInterface; - -typedef void* JRIRef; -typedef void* JRIGlobalRef; - -typedef jint JRIFieldID; -typedef jint JRIMethodID; - -/* synonyms: */ -typedef JRIGlobalRef jglobal; - -typedef union JRIValue { - jbool z; - jbyte b; - jchar c; - jshort s; - jint i; - jlong l; - jfloat f; - jdouble d; - jref r; -} JRIValue; - -typedef enum JRIBoolean { - JRIFalse = 0, - JRITrue = 1 -} JRIBoolean; - -typedef enum JRIConstant { - JRIUninitialized = -1 -} JRIConstant; - -/* convenience types (these must be distinct struct types for c++ overloading): */ -#if 0 /* now in jni.h */ -typedef struct jbooleanArrayStruct* jbooleanArray; -typedef struct jbyteArrayStruct* jbyteArray; -typedef struct jcharArrayStruct* jcharArray; -typedef struct jshortArrayStruct* jshortArray; -typedef struct jintArrayStruct* jintArray; -typedef struct jlongArrayStruct* jlongArray; -typedef struct jfloatArrayStruct* jfloatArray; -typedef struct jdoubleArrayStruct* jdoubleArray; -typedef struct jobjectArrayStruct* jobjectArray; -#endif -typedef struct jstringArrayStruct* jstringArray; -typedef struct jarrayArrayStruct* jarrayArray; - -#define JRIConstructorMethodName "" - -/******************************************************************************* - * Signature Construction Macros - ******************************************************************************/ - -/* -** These macros can be used to construct signature strings. Hopefully their names -** are a little easier to remember than the single character they correspond to. -** For example, to specify the signature of the method: -** -** public int read(byte b[], int off, int len); -** -** you could write something like this in C: -** -** char* readSig = JRISigMethod(JRISigArray(JRISigByte) -** JRISigInt -** JRISigInt) JRISigInt; -** -** Of course, don't put commas between the types. -*/ -#define JRISigArray(T) "[" T -#define JRISigByte "B" -#define JRISigChar "C" -#define JRISigClass(name) "L" name ";" -#define JRISigFloat "F" -#define JRISigDouble "D" -#define JRISigMethod(args) "(" args ")" -#define JRISigNoArgs "" -#define JRISigInt "I" -#define JRISigLong "J" -#define JRISigShort "S" -#define JRISigVoid "V" -#define JRISigBoolean "Z" - -/******************************************************************************* - * Environments - ******************************************************************************/ - -extern JRI_PUBLIC_API(const struct JRIEnvInterface**) -JRI_GetCurrentEnv(void); - -/******************************************************************************* - * Specific Scalar Array Types - ******************************************************************************/ - -/* -** The JRI Native Method Interface does not support boolean arrays. This -** is to allow Java runtime implementations to optimize boolean array -** storage. Using the ScalarArray operations on boolean arrays is bound -** to fail, so convert any boolean arrays to byte arrays in Java before -** passing them to a native method. -*/ - -#define JRI_NewByteArray(env, length, initialValues) \ - JRI_NewScalarArray(env, length, JRISigByte, (jbyte*)(initialValues)) -#define JRI_GetByteArrayLength(env, array) \ - JRI_GetScalarArrayLength(env, array) -#define JRI_GetByteArrayElements(env, array) \ - JRI_GetScalarArrayElements(env, array) - -#define JRI_NewCharArray(env, length, initialValues) \ - JRI_NewScalarArray(env, ((length) * sizeof(jchar)), JRISigChar, (jbyte*)(initialValues)) -#define JRI_GetCharArrayLength(env, array) \ - JRI_GetScalarArrayLength(env, array) -#define JRI_GetCharArrayElements(env, array) \ - ((jchar*)JRI_GetScalarArrayElements(env, array)) - -#define JRI_NewShortArray(env, length, initialValues) \ - JRI_NewScalarArray(env, ((length) * sizeof(jshort)), JRISigShort, (jbyte*)(initialValues)) -#define JRI_GetShortArrayLength(env, array) \ - JRI_GetScalarArrayLength(env, array) -#define JRI_GetShortArrayElements(env, array) \ - ((jshort*)JRI_GetScalarArrayElements(env, array)) - -#define JRI_NewIntArray(env, length, initialValues) \ - JRI_NewScalarArray(env, ((length) * sizeof(jint)), JRISigInt, (jbyte*)(initialValues)) -#define JRI_GetIntArrayLength(env, array) \ - JRI_GetScalarArrayLength(env, array) -#define JRI_GetIntArrayElements(env, array) \ - ((jint*)JRI_GetScalarArrayElements(env, array)) - -#define JRI_NewLongArray(env, length, initialValues) \ - JRI_NewScalarArray(env, ((length) * sizeof(jlong)), JRISigLong, (jbyte*)(initialValues)) -#define JRI_GetLongArrayLength(env, array) \ - JRI_GetScalarArrayLength(env, array) -#define JRI_GetLongArrayElements(env, array) \ - ((jlong*)JRI_GetScalarArrayElements(env, array)) - -#define JRI_NewFloatArray(env, length, initialValues) \ - JRI_NewScalarArray(env, ((length) * sizeof(jfloat)), JRISigFloat, (jbyte*)(initialValues)) -#define JRI_GetFloatArrayLength(env, array) \ - JRI_GetScalarArrayLength(env, array) -#define JRI_GetFloatArrayElements(env, array) \ - ((jfloat*)JRI_GetScalarArrayElements(env, array)) - -#define JRI_NewDoubleArray(env, length, initialValues) \ - JRI_NewScalarArray(env, ((length) * sizeof(jdouble)), JRISigDouble, (jbyte*)(initialValues)) -#define JRI_GetDoubleArrayLength(env, array) \ - JRI_GetScalarArrayLength(env, array) -#define JRI_GetDoubleArrayElements(env, array) \ - ((jdouble*)JRI_GetScalarArrayElements(env, array)) - -/******************************************************************************/ -/* -** JDK Stuff -- This stuff is still needed while we're using the JDK -** dynamic linking strategy to call native methods. -*/ - -typedef union JRI_JDK_stack_item { - /* Non pointer items */ - jint i; - jfloat f; - jint o; - /* Pointer items */ - void *h; - void *p; - unsigned char *addr; -#ifdef IS_64 - double d; - long l; /* == 64bits! */ -#endif -} JRI_JDK_stack_item; - -typedef union JRI_JDK_Java8Str { - jint x[2]; - jdouble d; - jlong l; - void *p; - float f; -} JRI_JDK_Java8; - -/******************************************************************************/ -#ifdef __cplusplus -} -#endif -#endif /* JRITYPES_H */ -/******************************************************************************/ diff --git a/Templates/Empty/web/source/npplugin/windows/npWebGamePlugin.cpp b/Templates/Empty/web/source/npplugin/windows/npWebGamePlugin.cpp deleted file mode 100644 index 0a68f8ff4..000000000 --- a/Templates/Empty/web/source/npplugin/windows/npWebGamePlugin.cpp +++ /dev/null @@ -1,173 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -#include -#include - -#include "npWebGamePlugin.h" -#include "../../common/webCommon.h" - -NPWebGamePlugin* NPWebGamePlugin::sInstance = NULL; - - -// we use a timer to update the Torque 3D game loop (tick) and handle rendering -VOID CALLBACK MyTimerProc( HWND hwnd, // handle to window for timer messages - UINT message, // WM_TIMER message - UINT idTimer, // timer identifier - DWORD dwTime) // current system time -{ - static bool reentrant = false; - - if (!reentrant) - { - reentrant = true; - torque_enginetick(); - reentrant = false; - } -} - -// custom window proc for our plugin's rendering window -static LRESULT CALLBACK NPWebGamePluginWinProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - NPWebGamePlugin* plugin = (NPWebGamePlugin*)GetWindowLongPtr(hWnd, GWL_USERDATA); - if (plugin) - { - switch (msg) - { - case WM_MOUSEACTIVATE: - break; - case WM_SIZE: - // handle resize of browser (sub)window updating our Torque 3D child window accordingly - int width = (int) LOWORD( lParam ); - int height = (int) HIWORD( lParam ); - torque_resizewindow(width,height); - - break; - } - - return CallWindowProc((WNDPROC)plugin->mOriginalWinProc, hWnd, msg, wParam, lParam); - } - else - { - return DefWindowProc(hWnd, msg, wParam, lParam); - } -} - -// DLL Entry Point -extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) -{ - WebCommon::gPluginModule = (HMODULE) hInstance; - return TRUE; -} - -NPWebGamePlugin::NPWebGamePlugin(NPP aInstance) -{ - - mOpen = FALSE; - mInstance = aInstance; - sInstance = this; - - mOriginalWinProc = NULL; - mHwnd = NULL; - -} - -NPWebGamePlugin::~NPWebGamePlugin() -{ - Close(); - sInstance = NULL; -} - - -NPBool NPWebGamePlugin::Open(NPWindow* aWindow) -{ - if (mOpen) - { - return TRUE; //firefox tries to open 2x - } - - if (!aWindow) - return FALSE; - - void* platformWindow = NULL; - - mHwnd = (HWND)aWindow->window; - - if (!mHwnd) - return FALSE; - - platformWindow = mHwnd; - - // replace our plugin window proc with a custom one (for handling resizing,etc) - mOriginalWinProc = SetWindowLongPtr(mHwnd, GWLP_WNDPROC, (LONG_PTR)NPWebGamePluginWinProc); - - LONG lStyle = GetWindowLong(mHwnd, GWL_STYLE); - SetWindowLong(mHwnd, GWL_STYLE, lStyle | WS_CLIPCHILDREN); - - SetWindowLongPtr(mHwnd, GWL_USERDATA, (LONG_PTR)this); - - - // load up the Torque 3D shared library and initialize it - if (!WebCommon::InitTorque3D(platformWindow)) - return false; - - mOpen = true; - - // fire up our tick/update timer - SetTimer( mHwnd, 1, // timer identifier - 1, // 1 millisecond - (TIMERPROC) MyTimerProc); // timer callback - - return mOpen; -} - -void NPWebGamePlugin::Close() -{ - - if (!mOpen) - return; - - if (mOriginalWinProc) - { - // restore original window proc - SetWindowLongPtr(mHwnd, GWLP_WNDPROC, mOriginalWinProc); - mOriginalWinProc = NULL; - } - - if (mHwnd) - { - // no more ticks please - KillTimer( mHwnd, 1); - } - - mHwnd = NULL; - - // shutdown and unload the Torque 3D DLL - WebCommon::ShutdownTorque3D(); - - mOpen = false; -} - -NPBool NPWebGamePlugin::IsOpen() -{ - return mOpen; -} diff --git a/Templates/Empty/web/source/npplugin/windows/npWebGamePlugin.def b/Templates/Empty/web/source/npplugin/windows/npWebGamePlugin.def deleted file mode 100644 index f32e3563a..000000000 --- a/Templates/Empty/web/source/npplugin/windows/npWebGamePlugin.def +++ /dev/null @@ -1,6 +0,0 @@ - - -EXPORTS - NP_GetEntryPoints @1 - NP_Initialize @2 - NP_Shutdown @3 diff --git a/Templates/Empty/web/source/npplugin/windows/npWebGamePlugin.h b/Templates/Empty/web/source/npplugin/windows/npWebGamePlugin.h deleted file mode 100644 index a18a370a6..000000000 --- a/Templates/Empty/web/source/npplugin/windows/npWebGamePlugin.h +++ /dev/null @@ -1,52 +0,0 @@ -//----------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------- - -#pragma once - -#include "np_pluginbase.h" - -// Windows specific NP plugin interface for handling platform window integration with Torque 3D -class NPWebGamePlugin -{ -public: - - NPWebGamePlugin(NPP aInstance); - ~NPWebGamePlugin(); - - // very simple interface based on browser window opening/closing - NPBool Open(NPWindow* aWindow); - void Close(); - NPBool IsOpen(); - - // plugin instance - NPP mInstance; - bool mOpen; - - static NPWebGamePlugin* sInstance; - - // Browser platform native window handle - HWND mHwnd; - LONG_PTR mOriginalWinProc; - -}; - - diff --git a/Templates/Empty/web/source/npplugin/windows/np_plat.h b/Templates/Empty/web/source/npplugin/windows/np_plat.h deleted file mode 100644 index 18d9c3e4e..000000000 --- a/Templates/Empty/web/source/npplugin/windows/np_plat.h +++ /dev/null @@ -1,166 +0,0 @@ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (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.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#ifndef _NPPLAT_H_ -#define _NPPLAT_H_ - -#ifdef XP_WIN - -// Modify the following defines if you have to target a platform prior to the ones specified below. -// Refer to MSDN for the latest info on corresponding values for different platforms. -#ifndef WINVER // Allow use of features specific to Windows XP or later. -#define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows. -#endif - -#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later. -#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows. -#endif - -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers -#include -#include - -#endif // XP_WIN - -#include "npapi.h" -#include "npupp.h" - -/**************************************************/ -/* */ -/* Windows */ -/* */ -/**************************************************/ -#ifdef XP_WIN - -//#include "windows.h" - -#endif //XP_WIN - -/**************************************************/ -/* */ -/* Unix */ -/* */ -/**************************************************/ -#ifdef XP_UNIX -#include -#endif //XP_UNIX - -/**************************************************/ -/* */ -/* Mac */ -/* */ -/**************************************************/ -#ifdef XP_MAC - -#include -#include -#include -#include -#include -#include - -// The Mixed Mode procInfos defined in npupp.h assume Think C- -// style calling conventions. These conventions are used by -// Metrowerks with the exception of pointer return types, which -// in Metrowerks 68K are returned in A0, instead of the standard -// D0. Thus, since NPN_MemAlloc and NPN_UserAgent return pointers, -// Mixed Mode will return the values to a 68K plugin in D0, but -// a 68K plugin compiled by Metrowerks will expect the result in -// A0. The following pragma forces Metrowerks to use D0 instead. -// -#ifdef __MWERKS__ -#ifndef powerc -#pragma pointers_in_D0 -#endif -#endif - -#ifdef __MWERKS__ -#ifndef powerc -#pragma pointers_in_A0 -#endif -#endif - -// The following fix for static initializers (which fixes a preious -// incompatibility with some parts of PowerPlant, was submitted by -// Jan Ulbrich. -#ifdef __MWERKS__ - #ifdef __cplusplus - extern "C" { - #endif - #ifndef powerc - extern void __InitCode__(void); - #else - extern void __sinit(void); - #define __InitCode__ __sinit - #endif - extern void __destroy_global_chain(void); - #ifdef __cplusplus - } - #endif // __cplusplus -#endif // __MWERKS__ - -// Wrapper functions for all calls from Netscape to the plugin. -// These functions let the plugin developer just create the APIs -// as documented and defined in npapi.h, without needing to -// install those functions in the function table or worry about -// setting up globals for 68K plugins. -NPError Private_Initialize(void); -void Private_Shutdown(void); -NPError Private_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved); -NPError Private_Destroy(NPP instance, NPSavedData** save); -NPError Private_SetWindow(NPP instance, NPWindow* window); -NPError Private_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype); -NPError Private_DestroyStream(NPP instance, NPStream* stream, NPError reason); -int32 Private_WriteReady(NPP instance, NPStream* stream); -int32 Private_Write(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer); -void Private_StreamAsFile(NPP instance, NPStream* stream, const char* fname); -void Private_Print(NPP instance, NPPrint* platformPrint); -int16 Private_HandleEvent(NPP instance, void* event); -void Private_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData); -NPError Private_GetValue(NPP instance, NPPVariable variable, void *result); -NPError Private_SetValue(NPP instance, NPNVariable variable, void *value); - -#endif //XP_MAC - -#ifndef HIBYTE -#define HIBYTE(i) (i >> 8) -#endif - -#ifndef LOBYTE -#define LOBYTE(i) (i & 0xff) -#endif - -#endif //_NPPLAT_H_ diff --git a/Templates/Empty/web/source/npplugin/windows/np_pluginbase.h b/Templates/Empty/web/source/npplugin/windows/np_pluginbase.h deleted file mode 100644 index e5e6fd037..000000000 --- a/Templates/Empty/web/source/npplugin/windows/np_pluginbase.h +++ /dev/null @@ -1,94 +0,0 @@ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (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.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#ifndef N_NP_PLUGIN_BASE_H -#define N_NP_PLUGIN_BASE_H - -#include "np_plat.h" - -struct NPPluginCreateData -{ - NPP instance; - NPMIMEType type; - uint16 mode; - int16 argc; - char** argn; - char** argv; - NPSavedData* saved; -}; - -class NPPluginBase -{ -public: - // these three methods must be implemented in the derived - // class platform specific way - virtual NPBool Open(NPWindow* aWindow) = 0; - virtual void Close() = 0; - virtual NPBool IsOpen() = 0; - - // implement all or part of those methods in the derived - // class as needed - virtual NPError SetWindow(NPWindow* pNPWindow) { return NPERR_NO_ERROR; } - virtual NPError NewStream(NPMIMEType type, NPStream* stream, - NPBool seekable, uint16* stype) { return NPERR_NO_ERROR; } - virtual NPError DestroyStream(NPStream *stream, NPError reason) { return NPERR_NO_ERROR; } - virtual void StreamAsFile(NPStream* stream, const char* fname) { return; } - virtual int32 WriteReady(NPStream *stream) { return 0x0fffffff; } - virtual int32 Write(NPStream *stream, int32 offset, - int32 len, void *buffer) { return len; } - virtual void Print(NPPrint* printInfo) { return; } - virtual uint16 HandleEvent(void* event) { return 0; } - virtual void URLNotify(const char* url, NPReason reason, - void* notifyData) { return; } - virtual NPError GetValue(NPPVariable variable, void *value) { return NPERR_NO_ERROR; } - virtual NPError SetValue(NPNVariable variable, void *value) { return NPERR_NO_ERROR; } -}; - -// functions that should be implemented for each specific plugin - -NPError NS_PluginInitialize(); -void NS_PluginShutdown(); - -// creation and destruction of the object of the derived class -NPPluginBase* NS_NewPluginInstance(NPPluginCreateData * aCreateDataStruct); -void NS_DestroyPluginInstance(NPPluginBase * aPlugin); - -#ifdef XP_UNIX -// global to get plugins name & description -NPError NS_PluginGetValue(NPPVariable aVariable, void *aValue); -#endif - -#endif // N_NP_PLUGIN_BASE_H diff --git a/Templates/Empty/web/source/npplugin/windows/npapi.h b/Templates/Empty/web/source/npplugin/windows/npapi.h deleted file mode 100644 index 6f783a1dd..000000000 --- a/Templates/Empty/web/source/npplugin/windows/npapi.h +++ /dev/null @@ -1,766 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (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.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - - -/* - * npapi.h $Revision: 3.48 $ - * Netscape client plug-in API spec - */ - -#ifndef _NPAPI_H_ -#define _NPAPI_H_ - -#ifdef __OS2__ -#pragma pack(1) -#endif - -#include "prtypes.h" -/* Copied from xp_core.h */ -/* removed #ifdef for hpux defined in /usr/include/model.h */ -#ifndef _INT16 -#define _INT16 -#endif -#ifndef _INT32 -#define _INT32 -#endif -#ifndef _UINT16 -#define _UINT16 -#endif -#ifndef _UINT32 -#define _UINT32 -#endif - -/* - * NO_NSPR_10_SUPPORT disables the inclusion - * of obsolete/protypes.h, whose int16, uint16, - * int32, and uint32 typedefs conflict with those - * in this file. - */ -#ifndef NO_NSPR_10_SUPPORT -#define NO_NSPR_10_SUPPORT -#endif -#ifdef OJI -#include "jri.h" /* Java Runtime Interface */ -#endif - -#if defined (__OS2__ ) || defined (OS2) -# ifndef XP_OS2 -# define XP_OS2 1 -# endif /* XP_OS2 */ -#endif /* __OS2__ */ - -#ifdef _WINDOWS -# include -# ifndef XP_WIN -# define XP_WIN 1 -# endif /* XP_WIN */ -#endif /* _WINDOWS */ - -#ifdef __MWERKS__ -# define _declspec __declspec -# ifdef __INTEL__ -# undef NULL -# ifndef XP_WIN -# define XP_WIN 1 -# endif /* XP_WIN */ -# endif /* __INTEL__ */ -#endif /* __MWERKS__ */ - -#ifdef XP_MACOSX -#include -#ifdef __LP64__ -#define NP_NO_QUICKDRAW -#endif -#endif - -#if defined(XP_UNIX) -# include -# if defined(MOZ_X11) -# include -# include -# endif -#endif - -/*----------------------------------------------------------------------*/ -/* Plugin Version Constants */ -/*----------------------------------------------------------------------*/ - -#define NP_VERSION_MAJOR 0 -#define NP_VERSION_MINOR 19 - - -/* The OS/2 version of Netscape uses RC_DATA to define the - mime types, file extensions, etc that are required. - Use a vertical bar to separate types, end types with \0. - FileVersion and ProductVersion are 32bit ints, all other - entries are strings the MUST be terminated wwith a \0. - -AN EXAMPLE: - -RCDATA NP_INFO_ProductVersion { 1,0,0,1,} - -RCDATA NP_INFO_MIMEType { "video/x-video|", - "video/x-flick\0" } -RCDATA NP_INFO_FileExtents { "avi|", - "flc\0" } -RCDATA NP_INFO_FileOpenName{ "MMOS2 video player(*.avi)|", - "MMOS2 Flc/Fli player(*.flc)\0" } - -RCDATA NP_INFO_FileVersion { 1,0,0,1 } -RCDATA NP_INFO_CompanyName { "Netscape Communications\0" } -RCDATA NP_INFO_FileDescription { "NPAVI32 Extension DLL\0" -RCDATA NP_INFO_InternalName { "NPAVI32\0" ) -RCDATA NP_INFO_LegalCopyright { "Copyright Netscape Communications \251 1996\0" -RCDATA NP_INFO_OriginalFilename { "NVAPI32.DLL" } -RCDATA NP_INFO_ProductName { "NPAVI32 Dynamic Link Library\0" } - -*/ - - -/* RC_DATA types for version info - required */ -#define NP_INFO_ProductVersion 1 -#define NP_INFO_MIMEType 2 -#define NP_INFO_FileOpenName 3 -#define NP_INFO_FileExtents 4 - -/* RC_DATA types for version info - used if found */ -#define NP_INFO_FileDescription 5 -#define NP_INFO_ProductName 6 - -/* RC_DATA types for version info - optional */ -#define NP_INFO_CompanyName 7 -#define NP_INFO_FileVersion 8 -#define NP_INFO_InternalName 9 -#define NP_INFO_LegalCopyright 10 -#define NP_INFO_OriginalFilename 11 - -#ifndef RC_INVOKED - - - -/*----------------------------------------------------------------------*/ -/* Definition of Basic Types */ -/*----------------------------------------------------------------------*/ - -#ifndef _UINT16 -typedef unsigned short uint16; -#endif - -#ifndef _UINT32 -# if defined(__alpha) || defined(__amd64__) || defined(__x86_64__) -typedef unsigned int uint32; -# else /* __alpha */ -typedef unsigned long uint32; -# endif /* __alpha */ -#endif - -/* - * AIX defines these in sys/inttypes.h included from sys/types.h - */ -#ifndef AIX -#ifndef _INT16 -typedef short int16; -#endif - -#ifndef _INT32 -# if defined(__alpha) || defined(__amd64__) || defined(__x86_64__) -typedef int int32; -# else /* __alpha */ -typedef long int32; -# endif /* __alpha */ -#endif -#endif - -#ifndef FALSE -#define FALSE (0) -#endif -#ifndef TRUE -#define TRUE (1) -#endif -#ifndef NULL -#define NULL (0L) -#endif - -#ifdef XP_MACOSX -typedef enum { -#ifndef NP_NO_QUICKDRAW - NPDrawingModelQuickDraw = 0, -#endif - NPDrawingModelCoreGraphics = 1 -} NPDrawingModel; -#endif - -typedef unsigned char NPBool; -typedef int16 NPError; -typedef int16 NPReason; -typedef char* NPMIMEType; - - - -/*----------------------------------------------------------------------*/ -/* Structures and definitions */ -/*----------------------------------------------------------------------*/ - -/* - * NPP is a plug-in's opaque instance handle - */ -typedef struct _NPP -{ - void* pdata; /* plug-in private data */ - void* ndata; /* netscape private data */ -} NPP_t; - -typedef NPP_t* NPP; - - -typedef struct _NPStream -{ - void* pdata; /* plug-in private data */ - void* ndata; /* netscape private data */ - const char* url; - uint32 end; - uint32 lastmodified; - void* notifyData; - const char* headers; /* Response headers from host. - * Exists only for >= NPVERS_HAS_RESPONSE_HEADERS. - * Used for HTTP only; NULL for non-HTTP. - * Available from NPP_NewStream onwards. - * Plugin should copy this data before storing it. - * Includes HTTP status line and all headers, - * preferably verbatim as received from server, - * headers formatted as in HTTP ("Header: Value"), - * and newlines (\n, NOT \r\n) separating lines. - * Terminated by \n\0 (NOT \n\n\0). */ -} NPStream; - - -typedef struct _NPByteRange -{ - int32 offset; /* negative offset means from the end */ - uint32 length; - struct _NPByteRange* next; -} NPByteRange; - - -typedef struct _NPSavedData -{ - int32 len; - void* buf; -} NPSavedData; - - -typedef struct _NPRect -{ - uint16 top; - uint16 left; - uint16 bottom; - uint16 right; -} NPRect; - -typedef struct _NPSize -{ - int32 width; - int32 height; -} NPSize; - -#ifdef XP_UNIX -/* - * Unix specific structures and definitions - */ - -/* - * Callback Structures. - * - * These are used to pass additional platform specific information. - */ -enum { - NP_SETWINDOW = 1, - NP_PRINT -}; - -typedef struct -{ - int32 type; -} NPAnyCallbackStruct; - -typedef struct -{ - int32 type; -#ifdef MOZ_X11 - Display* display; - Visual* visual; - Colormap colormap; - unsigned int depth; -#endif -} NPSetWindowCallbackStruct; - -typedef struct -{ - int32 type; - FILE* fp; -} NPPrintCallbackStruct; - -#endif /* XP_UNIX */ - - -/* - * The following masks are applied on certain platforms to NPNV and - * NPPV selectors that pass around pointers to COM interfaces. Newer - * compilers on some platforms may generate vtables that are not - * compatible with older compilers. To prevent older plugins from - * not understanding a new browser's ABI, these masks change the - * values of those selectors on those platforms. To remain backwards - * compatible with differenet versions of the browser, plugins can - * use these masks to dynamically determine and use the correct C++ - * ABI that the browser is expecting. This does not apply to Windows - * as Microsoft's COM ABI will likely not change. - */ - -#define NP_ABI_GCC3_MASK 0x10000000 -/* - * gcc 3.x generated vtables on UNIX and OSX are incompatible with - * previous compilers. - */ -#if (defined (XP_UNIX) && defined(__GNUC__) && (__GNUC__ >= 3)) -#define _NP_ABI_MIXIN_FOR_GCC3 NP_ABI_GCC3_MASK -#else -#define _NP_ABI_MIXIN_FOR_GCC3 0 -#endif - - -#define NP_ABI_MACHO_MASK 0x01000000 -/* - * On OSX, the Mach-O executable format is significantly - * different than CFM. In addition to having a different - * C++ ABI, it also has has different C calling convention. - * You must use glue code when calling between CFM and - * Mach-O C functions. - */ -#if (defined(TARGET_RT_MAC_MACHO)) -#define _NP_ABI_MIXIN_FOR_MACHO NP_ABI_MACHO_MASK -#else -#define _NP_ABI_MIXIN_FOR_MACHO 0 -#endif - - -#define NP_ABI_MASK (_NP_ABI_MIXIN_FOR_GCC3 | _NP_ABI_MIXIN_FOR_MACHO) - -/* - * List of variable names for which NPP_GetValue shall be implemented - */ -typedef enum { - NPPVpluginNameString = 1, - NPPVpluginDescriptionString, - NPPVpluginWindowBool, - NPPVpluginTransparentBool, - NPPVjavaClass, /* Not implemented in Mozilla 1.0 */ - NPPVpluginWindowSize, - NPPVpluginTimerInterval, - - NPPVpluginScriptableInstance = (10 | NP_ABI_MASK), - NPPVpluginScriptableIID = 11, - - /* Introduced in Mozilla 0.9.9 */ - NPPVjavascriptPushCallerBool = 12, - - /* Introduced in Mozilla 1.0 */ - NPPVpluginKeepLibraryInMemory = 13, - NPPVpluginNeedsXEmbed = 14, - - /* Get the NPObject for scripting the plugin. Introduced in Firefox - * 1.0 (NPAPI minor version 14). - */ - NPPVpluginScriptableNPObject = 15, - - /* Get the plugin value (as \0-terminated UTF-8 string data) for - * form submission if the plugin is part of a form. Use - * NPN_MemAlloc() to allocate memory for the string data. Introduced - * in Mozilla 1.8b2 (NPAPI minor version 15). - */ - NPPVformValue = 16 -#ifdef XP_MACOSX - /* Used for negotiating drawing models */ - , NPPVpluginDrawingModel = 1000 -#endif -} NPPVariable; - -/* - * List of variable names for which NPN_GetValue is implemented by Mozilla - */ -typedef enum { - NPNVxDisplay = 1, - NPNVxtAppContext, - NPNVnetscapeWindow, - NPNVjavascriptEnabledBool, - NPNVasdEnabledBool, - NPNVisOfflineBool, - - /* 10 and over are available on Mozilla builds starting with 0.9.4 */ - NPNVserviceManager = (10 | NP_ABI_MASK), - NPNVDOMElement = (11 | NP_ABI_MASK), /* available in Mozilla 1.2 */ - NPNVDOMWindow = (12 | NP_ABI_MASK), - NPNVToolkit = (13 | NP_ABI_MASK), - NPNVSupportsXEmbedBool = 14, - - /* Get the NPObject wrapper for the browser window. */ - NPNVWindowNPObject = 15, - - /* Get the NPObject wrapper for the plugins DOM element. */ - NPNVPluginElementNPObject = 16, - - NPNVSupportsWindowless = 17 - -#ifdef XP_MACOSX - /* Used for negotiating drawing models */ - , NPNVpluginDrawingModel = 1000 -#ifndef NP_NO_QUICKDRAW - , NPNVsupportsQuickDrawBool = 2000 -#endif - , NPNVsupportsCoreGraphicsBool = 2001 -#endif -} NPNVariable; - -/* - * The type of Tookkit the widgets use - */ -typedef enum { - NPNVGtk12 = 1, - NPNVGtk2 -} NPNToolkitType; - -/* - * The type of a NPWindow - it specifies the type of the data structure - * returned in the window field. - */ -typedef enum { - NPWindowTypeWindow = 1, - NPWindowTypeDrawable -} NPWindowType; - -typedef struct _NPWindow -{ - void* window; /* Platform specific window handle */ - /* OS/2: x - Position of bottom left corner */ - /* OS/2: y - relative to visible netscape window */ - int32 x; /* Position of top left corner relative */ - int32 y; /* to a netscape page. */ - uint32 width; /* Maximum window size */ - uint32 height; - NPRect clipRect; /* Clipping rectangle in port coordinates */ - /* Used by MAC only. */ -#if defined(XP_UNIX) && !defined(XP_MACOSX) - void * ws_info; /* Platform-dependent additonal data */ -#endif /* XP_UNIX */ - NPWindowType type; /* Is this a window or a drawable? */ -} NPWindow; - - -typedef struct _NPFullPrint -{ - NPBool pluginPrinted;/* Set TRUE if plugin handled fullscreen printing */ - NPBool printOne; /* TRUE if plugin should print one copy to default printer */ - void* platformPrint; /* Platform-specific printing info */ -} NPFullPrint; - -typedef struct _NPEmbedPrint -{ - NPWindow window; - void* platformPrint; /* Platform-specific printing info */ -} NPEmbedPrint; - -typedef struct _NPPrint -{ - uint16 mode; /* NP_FULL or NP_EMBED */ - union - { - NPFullPrint fullPrint; /* if mode is NP_FULL */ - NPEmbedPrint embedPrint; /* if mode is NP_EMBED */ - } print; -} NPPrint; - -#ifdef XP_MACOSX -typedef EventRecord NPEvent; -#elif defined(XP_WIN) -typedef struct _NPEvent -{ - uint16 event; - uint32 wParam; - uint32 lParam; -} NPEvent; -#elif defined(XP_OS2) -typedef struct _NPEvent -{ - uint32 event; - uint32 wParam; - uint32 lParam; -} NPEvent; -#elif defined (XP_UNIX) && defined(MOZ_X11) -typedef XEvent NPEvent; -#else -typedef void* NPEvent; -#endif /* XP_MACOSX */ - -#ifdef XP_MACOSX -typedef void* NPRegion; -#ifndef NP_NO_QUICKDRAW -typedef RgnHandle NPQDRegion; -#endif -typedef CGPathRef NPCGRegion; -#elif defined(XP_WIN) -typedef HRGN NPRegion; -#elif defined(XP_UNIX) && defined(MOZ_X11) -typedef Region NPRegion; -#else -typedef void *NPRegion; -#endif /* XP_MACOSX */ - -#ifdef XP_MACOSX -/* - * Mac-specific structures and definitions. - */ - -typedef struct NP_Port -{ - CGrafPtr port; /* Grafport */ - int32 portx; /* position inside the topmost window */ - int32 porty; -} NP_Port; - -typedef struct NP_CGContext -{ - CGContextRef context; - WindowRef window; -} NP_CGContext; - -/* - * Non-standard event types that can be passed to HandleEvent - */ - -enum NPEventType { - NPEventType_GetFocusEvent = (osEvt + 16), - NPEventType_LoseFocusEvent, - NPEventType_AdjustCursorEvent, - NPEventType_MenuCommandEvent, - NPEventType_ClippingChangedEvent, - NPEventType_ScrollingBeginsEvent = 1000, - NPEventType_ScrollingEndsEvent -}; - -#ifdef OBSOLETE -#define getFocusEvent (osEvt + 16) -#define loseFocusEvent (osEvt + 17) -#define adjustCursorEvent (osEvt + 18) -#endif -#endif /* XP_MACOSX */ - -/* - * Values for mode passed to NPP_New: - */ -#define NP_EMBED 1 -#define NP_FULL 2 - -/* - * Values for stream type passed to NPP_NewStream: - */ -#define NP_NORMAL 1 -#define NP_SEEK 2 -#define NP_ASFILE 3 -#define NP_ASFILEONLY 4 - -#define NP_MAXREADY (((unsigned)(~0)<<1)>>1) - - -/*----------------------------------------------------------------------*/ -/* Error and Reason Code definitions */ -/*----------------------------------------------------------------------*/ - -/* - * Values of type NPError: - */ -#define NPERR_BASE 0 -#define NPERR_NO_ERROR (NPERR_BASE + 0) -#define NPERR_GENERIC_ERROR (NPERR_BASE + 1) -#define NPERR_INVALID_INSTANCE_ERROR (NPERR_BASE + 2) -#define NPERR_INVALID_FUNCTABLE_ERROR (NPERR_BASE + 3) -#define NPERR_MODULE_LOAD_FAILED_ERROR (NPERR_BASE + 4) -#define NPERR_OUT_OF_MEMORY_ERROR (NPERR_BASE + 5) -#define NPERR_INVALID_PLUGIN_ERROR (NPERR_BASE + 6) -#define NPERR_INVALID_PLUGIN_DIR_ERROR (NPERR_BASE + 7) -#define NPERR_INCOMPATIBLE_VERSION_ERROR (NPERR_BASE + 8) -#define NPERR_INVALID_PARAM (NPERR_BASE + 9) -#define NPERR_INVALID_URL (NPERR_BASE + 10) -#define NPERR_FILE_NOT_FOUND (NPERR_BASE + 11) -#define NPERR_NO_DATA (NPERR_BASE + 12) -#define NPERR_STREAM_NOT_SEEKABLE (NPERR_BASE + 13) - -/* - * Values of type NPReason: - */ -#define NPRES_BASE 0 -#define NPRES_DONE (NPRES_BASE + 0) -#define NPRES_NETWORK_ERR (NPRES_BASE + 1) -#define NPRES_USER_BREAK (NPRES_BASE + 2) - -/* - * Don't use these obsolete error codes any more. - */ -#define NP_NOERR NP_NOERR_is_obsolete_use_NPERR_NO_ERROR -#define NP_EINVAL NP_EINVAL_is_obsolete_use_NPERR_GENERIC_ERROR -#define NP_EABORT NP_EABORT_is_obsolete_use_NPRES_USER_BREAK - -/* - * Version feature information - */ -#define NPVERS_HAS_STREAMOUTPUT 8 -#define NPVERS_HAS_NOTIFICATION 9 -#define NPVERS_HAS_LIVECONNECT 9 -#define NPVERS_WIN16_HAS_LIVECONNECT 9 -#define NPVERS_68K_HAS_LIVECONNECT 11 -#define NPVERS_HAS_WINDOWLESS 11 -#define NPVERS_HAS_XPCONNECT_SCRIPTING 13 -#define NPVERS_HAS_NPRUNTIME_SCRIPTING 14 -#define NPVERS_HAS_FORM_VALUES 15 -#define NPVERS_HAS_POPUPS_ENABLED_STATE 16 -#define NPVERS_HAS_RESPONSE_HEADERS 17 -#define NPVERS_HAS_NPOBJECT_ENUM 18 -#define NPVERS_HAS_PLUGIN_THREAD_ASYNC_CALL 19 - -/*----------------------------------------------------------------------*/ -/* Function Prototypes */ -/*----------------------------------------------------------------------*/ - -#if defined(_WINDOWS) && !defined(WIN32) -#define NP_LOADDS _loadds -#else -#if defined(__OS2__) -#define NP_LOADDS _System -#else -#define NP_LOADDS -#endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * NPP_* functions are provided by the plugin and called by the navigator. - */ - -#ifdef XP_UNIX -char* NPP_GetMIMEDescription(void); -#endif /* XP_UNIX */ - -NPError NP_LOADDS NPP_Initialize(void); -void NP_LOADDS NPP_Shutdown(void); -NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance, - uint16 mode, int16 argc, char* argn[], - char* argv[], NPSavedData* saved); -NPError NP_LOADDS NPP_Destroy(NPP instance, NPSavedData** save); -NPError NP_LOADDS NPP_SetWindow(NPP instance, NPWindow* window); -NPError NP_LOADDS NPP_NewStream(NPP instance, NPMIMEType type, - NPStream* stream, NPBool seekable, - uint16* stype); -NPError NP_LOADDS NPP_DestroyStream(NPP instance, NPStream* stream, - NPReason reason); -int32 NP_LOADDS NPP_WriteReady(NPP instance, NPStream* stream); -int32 NP_LOADDS NPP_Write(NPP instance, NPStream* stream, int32 offset, - int32 len, void* buffer); -void NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream, - const char* fname); -void NP_LOADDS NPP_Print(NPP instance, NPPrint* platformPrint); -int16 NP_LOADDS NPP_HandleEvent(NPP instance, void* event); -void NP_LOADDS NPP_URLNotify(NPP instance, const char* url, - NPReason reason, void* notifyData); -#ifdef OJI -jref NP_LOADDS NPP_GetJavaClass(void); -#endif -NPError NP_LOADDS NPP_GetValue(NPP instance, NPPVariable variable, void *value); -NPError NP_LOADDS NPP_SetValue(NPP instance, NPNVariable variable, void *value); - -/* - * NPN_* functions are provided by the navigator and called by the plugin. - */ -void NP_LOADDS NPN_Version(int* plugin_major, int* plugin_minor, - int* netscape_major, int* netscape_minor); -NPError NP_LOADDS NPN_GetURLNotify(NPP instance, const char* url, - const char* target, void* notifyData); -NPError NP_LOADDS NPN_GetURL(NPP instance, const char* url, - const char* target); -NPError NP_LOADDS NPN_PostURLNotify(NPP instance, const char* url, - const char* target, uint32 len, - const char* buf, NPBool file, - void* notifyData); -NPError NP_LOADDS NPN_PostURL(NPP instance, const char* url, - const char* target, uint32 len, - const char* buf, NPBool file); -NPError NP_LOADDS NPN_RequestRead(NPStream* stream, NPByteRange* rangeList); -NPError NP_LOADDS NPN_NewStream(NPP instance, NPMIMEType type, - const char* target, NPStream** stream); -int32 NP_LOADDS NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer); -NPError NP_LOADDS NPN_DestroyStream(NPP instance, NPStream* stream, NPReason reason); -void NP_LOADDS NPN_Status(NPP instance, const char* message); -const char* NP_LOADDS NPN_UserAgent(NPP instance); -void* NP_LOADDS NPN_MemAlloc(uint32 size); -void NP_LOADDS NPN_MemFree(void* ptr); -uint32 NP_LOADDS NPN_MemFlush(uint32 size); -void NP_LOADDS NPN_ReloadPlugins(NPBool reloadPages); -#ifdef OJI -JRIEnv* NP_LOADDS NPN_GetJavaEnv(void); -jref NP_LOADDS NPN_GetJavaPeer(NPP instance); -#endif -NPError NP_LOADDS NPN_GetValue(NPP instance, NPNVariable variable, void *value); -NPError NP_LOADDS NPN_SetValue(NPP instance, NPPVariable variable, void *value); -void NP_LOADDS NPN_InvalidateRect(NPP instance, NPRect *invalidRect); -void NP_LOADDS NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion); -void NP_LOADDS NPN_ForceRedraw(NPP instance); -void NP_LOADDS NPN_PushPopupsEnabledState(NPP instance, NPBool enabled); -void NP_LOADDS NPN_PopPopupsEnabledState(NPP instance); -void NP_LOADDS NPN_PluginThreadAsyncCall(NPP instance, - void (*func) (void *), - void *userData); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif - -#endif /* RC_INVOKED */ -#ifdef __OS2__ -#pragma pack() -#endif - -#endif /* _NPAPI_H_ */ diff --git a/Templates/Empty/web/source/npplugin/windows/npruntime.h b/Templates/Empty/web/source/npplugin/windows/npruntime.h deleted file mode 100644 index b8421a25e..000000000 --- a/Templates/Empty/web/source/npplugin/windows/npruntime.h +++ /dev/null @@ -1,423 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * Copyright © 2004, Apple Computer, Inc. and The Mozilla Foundation. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the names of Apple Computer, Inc. ("Apple") or The Mozilla - * Foundation ("Mozilla") nor the names of their contributors may be used - * to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE, MOZILLA AND THEIR CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE, MOZILLA OR - * THEIR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Revision 1 (March 4, 2004): - * Initial proposal. - * - * Revision 2 (March 10, 2004): - * All calls into script were made asynchronous. Results are - * provided via the NPScriptResultFunctionPtr callback. - * - * Revision 3 (March 10, 2004): - * Corrected comments to not refer to class retain/release FunctionPtrs. - * - * Revision 4 (March 11, 2004): - * Added additional convenience NPN_SetExceptionWithUTF8(). - * Changed NPHasPropertyFunctionPtr and NPHasMethodFunctionPtr to take NPClass - * pointers instead of NPObject pointers. - * Added NPIsValidIdentifier(). - * - * Revision 5 (March 17, 2004): - * Added context parameter to result callbacks from ScriptObject functions. - * - * Revision 6 (March 29, 2004): - * Renamed functions implemented by user agent to NPN_*. Removed _ from - * type names. - * Renamed "JavaScript" types to "Script". - * - * Revision 7 (April 21, 2004): - * NPIdentifier becomes a void*, was int32_t - * Remove NP_IsValidIdentifier, renamed NP_IdentifierFromUTF8 to NP_GetIdentifier - * Added NPVariant and modified functions to use this new type. - * - * Revision 8 (July 9, 2004): - * Updated to joint Apple-Mozilla license. - * - */ -#ifndef _NP_RUNTIME_H_ -#define _NP_RUNTIME_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include "nptypes.h" - -/* - This API is used to facilitate binding code written in C to script - objects. The API in this header does not assume the presence of a - user agent. That is, it can be used to bind C code to scripting - environments outside of the context of a user agent. - - However, the normal use of the this API is in the context of a - scripting environment running in a browser or other user agent. - In particular it is used to support the extended Netscape - script-ability API for plugins (NP-SAP). NP-SAP is an extension - of the Netscape plugin API. As such we have adopted the use of - the "NP" prefix for this API. - - The following NP{N|P}Variables were added to the Netscape plugin - API (in npapi.h): - - NPNVWindowNPObject - NPNVPluginElementNPObject - NPPVpluginScriptableNPObject - - These variables are exposed through NPN_GetValue() and - NPP_GetValue() (respectively) and are used to establish the - initial binding between the user agent and native code. The DOM - objects in the user agent can be examined and manipulated using - the NPN_ functions that operate on NPObjects described in this - header. - - To the extent possible the assumptions about the scripting - language used by the scripting environment have been minimized. -*/ - -#define NP_BEGIN_MACRO do { -#define NP_END_MACRO } while (0) - -/* - Objects (non-primitive data) passed between 'C' and script is - always wrapped in an NPObject. The 'interface' of an NPObject is - described by an NPClass. -*/ -typedef struct NPObject NPObject; -typedef struct NPClass NPClass; - -typedef char NPUTF8; -typedef struct _NPString { - const NPUTF8 *UTF8Characters; - uint32_t UTF8Length; -} NPString; - -typedef enum { - NPVariantType_Void, - NPVariantType_Null, - NPVariantType_Bool, - NPVariantType_Int32, - NPVariantType_Double, - NPVariantType_String, - NPVariantType_Object -} NPVariantType; - -typedef struct _NPVariant { - NPVariantType type; - union { - bool boolValue; - int32_t intValue; - double doubleValue; - NPString stringValue; - NPObject *objectValue; - } value; -} NPVariant; - -/* - NPN_ReleaseVariantValue is called on all 'out' parameters - references. Specifically it is to be called on variants that own - their value, as is the case with all non-const NPVariant* - arguments after a successful call to any methods (except this one) - in this API. - - After calling NPN_ReleaseVariantValue, the type of the variant - will be NPVariantType_Void. -*/ -void NPN_ReleaseVariantValue(NPVariant *variant); - -#define NPVARIANT_IS_VOID(_v) ((_v).type == NPVariantType_Void) -#define NPVARIANT_IS_NULL(_v) ((_v).type == NPVariantType_Null) -#define NPVARIANT_IS_BOOLEAN(_v) ((_v).type == NPVariantType_Bool) -#define NPVARIANT_IS_INT32(_v) ((_v).type == NPVariantType_Int32) -#define NPVARIANT_IS_DOUBLE(_v) ((_v).type == NPVariantType_Double) -#define NPVARIANT_IS_STRING(_v) ((_v).type == NPVariantType_String) -#define NPVARIANT_IS_OBJECT(_v) ((_v).type == NPVariantType_Object) - -#define NPVARIANT_TO_BOOLEAN(_v) ((_v).value.boolValue) -#define NPVARIANT_TO_INT32(_v) ((_v).value.intValue) -#define NPVARIANT_TO_DOUBLE(_v) ((_v).value.doubleValue) -#define NPVARIANT_TO_STRING(_v) ((_v).value.stringValue) -#define NPVARIANT_TO_OBJECT(_v) ((_v).value.objectValue) - -#define VOID_TO_NPVARIANT(_v) \ -NP_BEGIN_MACRO \ - (_v).type = NPVariantType_Void; \ - (_v).value.objectValue = NULL; \ -NP_END_MACRO - -#define NULL_TO_NPVARIANT(_v) \ -NP_BEGIN_MACRO \ - (_v).type = NPVariantType_Null; \ - (_v).value.objectValue = NULL; \ -NP_END_MACRO - -#define BOOLEAN_TO_NPVARIANT(_val, _v) \ -NP_BEGIN_MACRO \ - (_v).type = NPVariantType_Bool; \ - (_v).value.boolValue = !!(_val); \ -NP_END_MACRO - -#define INT32_TO_NPVARIANT(_val, _v) \ -NP_BEGIN_MACRO \ - (_v).type = NPVariantType_Int32; \ - (_v).value.intValue = _val; \ -NP_END_MACRO - -#define DOUBLE_TO_NPVARIANT(_val, _v) \ -NP_BEGIN_MACRO \ - (_v).type = NPVariantType_Double; \ - (_v).value.doubleValue = _val; \ -NP_END_MACRO - -#define STRINGZ_TO_NPVARIANT(_val, _v) \ -NP_BEGIN_MACRO \ - (_v).type = NPVariantType_String; \ - NPString str = { _val, strlen(_val) }; \ - (_v).value.stringValue = str; \ -NP_END_MACRO - -#define STRINGN_TO_NPVARIANT(_val, _len, _v) \ -NP_BEGIN_MACRO \ - (_v).type = NPVariantType_String; \ - NPString str = { _val, _len }; \ - (_v).value.stringValue = str; \ -NP_END_MACRO - -#define OBJECT_TO_NPVARIANT(_val, _v) \ -NP_BEGIN_MACRO \ - (_v).type = NPVariantType_Object; \ - (_v).value.objectValue = _val; \ -NP_END_MACRO - - -/* - Type mappings (JavaScript types have been used for illustration - purposes): - - JavaScript to C (NPVariant with type:) - undefined NPVariantType_Void - null NPVariantType_Null - Boolean NPVariantType_Bool - Number NPVariantType_Double or NPVariantType_Int32 - String NPVariantType_String - Object NPVariantType_Object - - C (NPVariant with type:) to JavaScript - NPVariantType_Void undefined - NPVariantType_Null null - NPVariantType_Bool Boolean - NPVariantType_Int32 Number - NPVariantType_Double Number - NPVariantType_String String - NPVariantType_Object Object -*/ - -typedef void *NPIdentifier; - -/* - NPObjects have methods and properties. Methods and properties are - identified with NPIdentifiers. These identifiers may be reflected - in script. NPIdentifiers can be either strings or integers, IOW, - methods and properties can be identified by either strings or - integers (i.e. foo["bar"] vs foo[1]). NPIdentifiers can be - compared using ==. In case of any errors, the requested - NPIdentifier(s) will be NULL. -*/ -NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name); -void NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount, - NPIdentifier *identifiers); -NPIdentifier NPN_GetIntIdentifier(int32_t intid); -bool NPN_IdentifierIsString(NPIdentifier identifier); - -/* - The NPUTF8 returned from NPN_UTF8FromIdentifier SHOULD be freed. -*/ -NPUTF8 *NPN_UTF8FromIdentifier(NPIdentifier identifier); - -/* - Get the integer represented by identifier. If identifier is not an - integer identifier, the behaviour is undefined. -*/ -int32_t NPN_IntFromIdentifier(NPIdentifier identifier); - -/* - NPObject behavior is implemented using the following set of - callback functions. - - The NPVariant *result argument of these functions (where - applicable) should be released using NPN_ReleaseVariantValue(). -*/ -typedef NPObject *(*NPAllocateFunctionPtr)(NPP npp, NPClass *aClass); -typedef void (*NPDeallocateFunctionPtr)(NPObject *npobj); -typedef void (*NPInvalidateFunctionPtr)(NPObject *npobj); -typedef bool (*NPHasMethodFunctionPtr)(NPObject *npobj, NPIdentifier name); -typedef bool (*NPInvokeFunctionPtr)(NPObject *npobj, NPIdentifier name, - const NPVariant *args, uint32_t argCount, - NPVariant *result); -typedef bool (*NPInvokeDefaultFunctionPtr)(NPObject *npobj, - const NPVariant *args, - uint32_t argCount, - NPVariant *result); -typedef bool (*NPHasPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name); -typedef bool (*NPGetPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name, - NPVariant *result); -typedef bool (*NPSetPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name, - const NPVariant *value); -typedef bool (*NPRemovePropertyFunctionPtr)(NPObject *npobj, - NPIdentifier name); -typedef bool (*NPEnumerationFunctionPtr)(NPObject *npobj, NPIdentifier **value, - uint32_t *count); -typedef bool (*NPConstructFunctionPtr)(NPObject *npobj, - const NPVariant *args, - uint32_t argCount, - NPVariant *result); - -/* - NPObjects returned by create, retain, invoke, and getProperty pass - a reference count to the caller. That is, the callee adds a - reference count which passes to the caller. It is the caller's - responsibility to release the returned object. - - NPInvokeFunctionPtr function may return 0 to indicate a void - result. - - NPInvalidateFunctionPtr is called by the scripting environment - when the native code is shutdown. Any attempt to message a - NPObject instance after the invalidate callback has been - called will result in undefined behavior, even if the native code - is still retaining those NPObject instances. (The runtime - will typically return immediately, with 0 or NULL, from an attempt - to dispatch to a NPObject, but this behavior should not be - depended upon.) - - The NPEnumerationFunctionPtr function may pass an array of - NPIdentifiers back to the caller. The callee allocs the memory of - the array using NPN_MemAlloc(), and it's the caller's responsibility - to release it using NPN_MemFree(). -*/ -struct NPClass -{ - uint32_t structVersion; - NPAllocateFunctionPtr allocate; - NPDeallocateFunctionPtr deallocate; - NPInvalidateFunctionPtr invalidate; - NPHasMethodFunctionPtr hasMethod; - NPInvokeFunctionPtr invoke; - NPInvokeDefaultFunctionPtr invokeDefault; - NPHasPropertyFunctionPtr hasProperty; - NPGetPropertyFunctionPtr getProperty; - NPSetPropertyFunctionPtr setProperty; - NPRemovePropertyFunctionPtr removeProperty; - NPEnumerationFunctionPtr enumerate; - NPConstructFunctionPtr construct; -}; - -#define NP_CLASS_STRUCT_VERSION 3 - -#define NP_CLASS_STRUCT_VERSION_ENUM 2 -#define NP_CLASS_STRUCT_VERSION_CTOR 3 - -#define NP_CLASS_STRUCT_VERSION_HAS_ENUM(npclass) \ - ((npclass)->structVersion >= NP_CLASS_STRUCT_VERSION_ENUM) - -#define NP_CLASS_STRUCT_VERSION_HAS_CTOR(npclass) \ - ((npclass)->structVersion >= NP_CLASS_STRUCT_VERSION_CTOR) - -struct NPObject { - NPClass *_class; - uint32_t referenceCount; - /* - * Additional space may be allocated here by types of NPObjects - */ -}; - -/* - If the class has an allocate function, NPN_CreateObject invokes - that function, otherwise a NPObject is allocated and - returned. This method will initialize the referenceCount member of - the NPObject to 1. -*/ -NPObject *NPN_CreateObject(NPP npp, NPClass *aClass); - -/* - Increment the NPObject's reference count. -*/ -NPObject *NPN_RetainObject(NPObject *npobj); - -/* - Decremented the NPObject's reference count. If the reference - count goes to zero, the class's destroy function is invoke if - specified, otherwise the object is freed directly. -*/ -void NPN_ReleaseObject(NPObject *npobj); - -/* - Functions to access script objects represented by NPObject. - - Calls to script objects are synchronous. If a function returns a - value, it will be supplied via the result NPVariant - argument. Successful calls will return true, false will be - returned in case of an error. - - Calls made from plugin code to script must be made from the thread - on which the plugin was initialized. -*/ - -bool NPN_Invoke(NPP npp, NPObject *npobj, NPIdentifier methodName, - const NPVariant *args, uint32_t argCount, NPVariant *result); -bool NPN_InvokeDefault(NPP npp, NPObject *npobj, const NPVariant *args, - uint32_t argCount, NPVariant *result); -bool NPN_Evaluate(NPP npp, NPObject *npobj, NPString *script, - NPVariant *result); -bool NPN_GetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName, - NPVariant *result); -bool NPN_SetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName, - const NPVariant *value); -bool NPN_RemoveProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName); -bool NPN_HasProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName); -bool NPN_HasMethod(NPP npp, NPObject *npobj, NPIdentifier methodName); -bool NPN_Enumerate(NPP npp, NPObject *npobj, NPIdentifier **identifier, - uint32_t *count); -bool NPN_Construct(NPP npp, NPObject *npobj, const NPVariant *args, - uint32_t argCount, NPVariant *result); - -/* - NPN_SetException may be called to trigger a script exception upon - return from entry points into NPObjects. Typical usage: - - NPN_SetException (npobj, message); -*/ -void NPN_SetException(NPObject *npobj, const NPUTF8 *message); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/Templates/Empty/web/source/npplugin/windows/nptypes.h b/Templates/Empty/web/source/npplugin/windows/nptypes.h deleted file mode 100644 index 6f6e3fbf4..000000000 --- a/Templates/Empty/web/source/npplugin/windows/nptypes.h +++ /dev/null @@ -1,105 +0,0 @@ -/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (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.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is - * mozilla.org. - * Portions created by the Initial Developer are Copyright (C) 2004 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Johnny Stenback (Original author) - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -/* - * Header file for ensuring that C99 types ([u]int32_t and bool) are - * available. - */ - -#if defined(WIN32) || defined(OS2) - /* - * Win32 and OS/2 don't know C99, so define [u]int_32 here. The bool - * is predefined tho, both in C and C++. - */ - typedef int int32_t; - typedef unsigned int uint32_t; -#elif defined(_AIX) || defined(__sun) || defined(__osf__) || defined(IRIX) || defined(HPUX) - /* - * AIX and SunOS ship a inttypes.h header that defines [u]int32_t, - * but not bool for C. - */ - #include - - #ifndef __cplusplus - typedef int bool; - #endif -#elif defined(bsdi) || defined(FREEBSD) || defined(OPENBSD) - /* - * BSD/OS, FreeBSD, and OpenBSD ship sys/types.h that define int32_t and - * u_int32_t. - */ - #include - - /* - * BSD/OS ships no header that defines uint32_t, nor bool (for C) - */ - #if defined(bsdi) - typedef u_int32_t uint32_t; - - #if !defined(__cplusplus) - typedef int bool; - #endif - #else - /* - * FreeBSD and OpenBSD define uint32_t and bool. - */ - #include - #include - #endif -#elif defined(BEOS) - #include -#else - /* - * For those that ship a standard C99 stdint.h header file, include - * it. Can't do the same for stdbool.h tho, since some systems ship - * with a stdbool.h file that doesn't compile! - */ - #include - - #ifndef __cplusplus - #if !defined(__GNUC__) || (__GNUC__ > 2 || __GNUC_MINOR__ > 95) - #include - #else - /* - * GCC 2.91 can't deal with a typedef for bool, but a #define - * works. - */ - #define bool int - #endif - #endif -#endif diff --git a/Templates/Empty/web/source/npplugin/windows/npupp.h b/Templates/Empty/web/source/npplugin/windows/npupp.h deleted file mode 100644 index 7079f40ee..000000000 --- a/Templates/Empty/web/source/npplugin/windows/npupp.h +++ /dev/null @@ -1,715 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (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.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - - -/* - * npupp.h $Revision: 3.26 $ - * function call mecahnics needed by platform specific glue code. - */ - - -#ifndef _NPUPP_H_ -#define _NPUPP_H_ - -#if defined(__OS2__) -#pragma pack(1) -#endif - -#ifndef GENERATINGCFM -#define GENERATINGCFM 0 -#endif - -#ifndef _NPAPI_H_ -#include "npapi.h" -#endif - -#include "npruntime.h" - -#include "jri.h" - - -/****************************************************************************************** - plug-in function table macros - for each function in and out of the plugin API we define - typedef NPP_FooUPP - #define NewNPP_FooProc - #define CallNPP_FooProc - *******************************************************************************************/ - - -/* NPP_Initialize */ -typedef void (* NP_LOADDS NPP_InitializeUPP)(void); -#define NewNPP_InitializeProc(FUNC) \ - ((NPP_InitializeUPP) (FUNC)) -#define CallNPP_InitializeProc(FUNC) \ - (*(FUNC))() - -/* NPP_Shutdown */ -typedef void (* NP_LOADDS NPP_ShutdownUPP)(void); -#define NewNPP_ShutdownProc(FUNC) \ - ((NPP_ShutdownUPP) (FUNC)) -#define CallNPP_ShutdownProc(FUNC) \ - (*(FUNC))() - -/* NPP_New */ -typedef NPError (* NP_LOADDS NPP_NewUPP)(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved); -#define NewNPP_NewProc(FUNC) \ - ((NPP_NewUPP) (FUNC)) -#define CallNPP_NewProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \ - (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) - -/* NPP_Destroy */ -typedef NPError (* NP_LOADDS NPP_DestroyUPP)(NPP instance, NPSavedData** save); -#define NewNPP_DestroyProc(FUNC) \ - ((NPP_DestroyUPP) (FUNC)) -#define CallNPP_DestroyProc(FUNC, ARG1, ARG2) \ - (*(FUNC))((ARG1), (ARG2)) - -/* NPP_SetWindow */ -typedef NPError (* NP_LOADDS NPP_SetWindowUPP)(NPP instance, NPWindow* window); -#define NewNPP_SetWindowProc(FUNC) \ - ((NPP_SetWindowUPP) (FUNC)) -#define CallNPP_SetWindowProc(FUNC, ARG1, ARG2) \ - (*(FUNC))((ARG1), (ARG2)) - -/* NPP_NewStream */ -typedef NPError (* NP_LOADDS NPP_NewStreamUPP)(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype); -#define NewNPP_NewStreamProc(FUNC) \ - ((NPP_NewStreamUPP) (FUNC)) -#define CallNPP_NewStreamProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \ - (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5)) - -/* NPP_DestroyStream */ -typedef NPError (* NP_LOADDS NPP_DestroyStreamUPP)(NPP instance, NPStream* stream, NPReason reason); -#define NewNPP_DestroyStreamProc(FUNC) \ - ((NPP_DestroyStreamUPP) (FUNC)) -#define CallNPP_DestroyStreamProc(FUNC, NPParg, NPStreamPtr, NPReasonArg) \ - (*(FUNC))((NPParg), (NPStreamPtr), (NPReasonArg)) - -/* NPP_WriteReady */ -typedef int32 (* NP_LOADDS NPP_WriteReadyUPP)(NPP instance, NPStream* stream); -#define NewNPP_WriteReadyProc(FUNC) \ - ((NPP_WriteReadyUPP) (FUNC)) -#define CallNPP_WriteReadyProc(FUNC, NPParg, NPStreamPtr) \ - (*(FUNC))((NPParg), (NPStreamPtr)) - -/* NPP_Write */ -typedef int32 (* NP_LOADDS NPP_WriteUPP)(NPP instance, NPStream* stream, int32_t offset, int32_t len, void* buffer); -#define NewNPP_WriteProc(FUNC) \ - ((NPP_WriteUPP) (FUNC)) -#define CallNPP_WriteProc(FUNC, NPParg, NPStreamPtr, offsetArg, lenArg, bufferPtr) \ - (*(FUNC))((NPParg), (NPStreamPtr), (offsetArg), (lenArg), (bufferPtr)) - -/* NPP_StreamAsFile */ -typedef void (* NP_LOADDS NPP_StreamAsFileUPP)(NPP instance, NPStream* stream, const char* fname); -#define NewNPP_StreamAsFileProc(FUNC) \ - ((NPP_StreamAsFileUPP) (FUNC)) -#define CallNPP_StreamAsFileProc(FUNC, ARG1, ARG2, ARG3) \ - (*(FUNC))((ARG1), (ARG2), (ARG3)) - -/* NPP_Print */ -typedef void (* NP_LOADDS NPP_PrintUPP)(NPP instance, NPPrint* platformPrint); -#define NewNPP_PrintProc(FUNC) \ - ((NPP_PrintUPP) (FUNC)) -#define CallNPP_PrintProc(FUNC, NPParg, NPPrintArg) \ - (*(FUNC))((NPParg), (NPPrintArg)) - -/* NPP_HandleEvent */ -typedef int16 (* NP_LOADDS NPP_HandleEventUPP)(NPP instance, void* event); -#define NewNPP_HandleEventProc(FUNC) \ - ((NPP_HandleEventUPP) (FUNC)) -#define CallNPP_HandleEventProc(FUNC, NPParg, voidPtr) \ - (*(FUNC))((NPParg), (voidPtr)) - -/* NPP_URLNotify */ -typedef void (* NP_LOADDS NPP_URLNotifyUPP)(NPP instance, const char* url, NPReason reason, void* notifyData); -#define NewNPP_URLNotifyProc(FUNC) \ - ((NPP_URLNotifyUPP) (FUNC)) -#define CallNPP_URLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ - (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) - -/* NPP_GetValue */ -typedef NPError (* NP_LOADDS NPP_GetValueUPP)(NPP instance, NPPVariable variable, void *ret_alue); -#define NewNPP_GetValueProc(FUNC) \ - ((NPP_GetValueUPP) (FUNC)) -#define CallNPP_GetValueProc(FUNC, ARG1, ARG2, ARG3) \ - (*(FUNC))((ARG1), (ARG2), (ARG3)) - -/* NPP_SetValue */ -typedef NPError (* NP_LOADDS NPP_SetValueUPP)(NPP instance, NPNVariable variable, void *ret_alue); -#define NewNPP_SetValueProc(FUNC) \ - ((NPP_SetValueUPP) (FUNC)) -#define CallNPP_SetValueProc(FUNC, ARG1, ARG2, ARG3) \ - (*(FUNC))((ARG1), (ARG2), (ARG3)) - -/* - * Netscape entry points - */ - - -/* NPN_GetValue */ -typedef NPError (* NP_LOADDS NPN_GetValueUPP)(NPP instance, NPNVariable variable, void *ret_alue); -#define NewNPN_GetValueProc(FUNC) \ - ((NPN_GetValueUPP) (FUNC)) -#define CallNPN_GetValueProc(FUNC, ARG1, ARG2, ARG3) \ - (*(FUNC))((ARG1), (ARG2), (ARG3)) - -/* NPN_SetValue */ -typedef NPError (* NP_LOADDS NPN_SetValueUPP)(NPP instance, NPPVariable variable, void *ret_alue); -#define NewNPN_SetValueProc(FUNC) \ - ((NPN_SetValueUPP) (FUNC)) -#define CallNPN_SetValueProc(FUNC, ARG1, ARG2, ARG3) \ - (*(FUNC))((ARG1), (ARG2), (ARG3)) - -/* NPN_GetUrlNotify */ -typedef NPError (* NP_LOADDS NPN_GetURLNotifyUPP)(NPP instance, const char* url, const char* window, void* notifyData); -#define NewNPN_GetURLNotifyProc(FUNC) \ - ((NPN_GetURLNotifyUPP) (FUNC)) -#define CallNPN_GetURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ - (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) - -/* NPN_PostUrlNotify */ -typedef NPError (* NP_LOADDS NPN_PostURLNotifyUPP)(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file, void* notifyData); -#define NewNPN_PostURLNotifyProc(FUNC) \ - ((NPN_PostURLNotifyUPP) (FUNC)) -#define CallNPN_PostURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \ - (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) - -/* NPN_GetUrl */ -typedef NPError (* NP_LOADDS NPN_GetURLUPP)(NPP instance, const char* url, const char* window); -#define NewNPN_GetURLProc(FUNC) \ - ((NPN_GetURLUPP) (FUNC)) -#define CallNPN_GetURLProc(FUNC, ARG1, ARG2, ARG3) \ - (*(FUNC))((ARG1), (ARG2), (ARG3)) - -/* NPN_PostUrl */ -typedef NPError (* NP_LOADDS NPN_PostURLUPP)(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file); -#define NewNPN_PostURLProc(FUNC) \ - ((NPN_PostURLUPP) (FUNC)) -#define CallNPN_PostURLProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \ - (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6)) - -/* NPN_RequestRead */ -typedef NPError (* NP_LOADDS NPN_RequestReadUPP)(NPStream* stream, NPByteRange* rangeList); -#define NewNPN_RequestReadProc(FUNC) \ - ((NPN_RequestReadUPP) (FUNC)) -#define CallNPN_RequestReadProc(FUNC, stream, range) \ - (*(FUNC))((stream), (range)) - -/* NPN_NewStream */ -typedef NPError (* NP_LOADDS NPN_NewStreamUPP)(NPP instance, NPMIMEType type, const char* window, NPStream** stream); -#define NewNPN_NewStreamProc(FUNC) \ - ((NPN_NewStreamUPP) (FUNC)) -#define CallNPN_NewStreamProc(FUNC, npp, type, window, stream) \ - (*(FUNC))((npp), (type), (window), (stream)) - -/* NPN_Write */ -typedef int32 (* NP_LOADDS NPN_WriteUPP)(NPP instance, NPStream* stream, int32 len, void* buffer); -#define NewNPN_WriteProc(FUNC) \ - ((NPN_WriteUPP) (FUNC)) -#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer) \ - (*(FUNC))((npp), (stream), (len), (buffer)) - -/* NPN_DestroyStream */ -typedef NPError (* NP_LOADDS NPN_DestroyStreamUPP)(NPP instance, NPStream* stream, NPReason reason); -#define NewNPN_DestroyStreamProc(FUNC) \ - ((NPN_DestroyStreamUPP) (FUNC)) -#define CallNPN_DestroyStreamProc(FUNC, npp, stream, reason) \ - (*(FUNC))((npp), (stream), (reason)) - -/* NPN_Status */ -typedef void (* NP_LOADDS NPN_StatusUPP)(NPP instance, const char* message); -#define NewNPN_StatusProc(FUNC) \ - ((NPN_StatusUPP) (FUNC)) -#define CallNPN_StatusProc(FUNC, npp, msg) \ - (*(FUNC))((npp), (msg)) - -/* NPN_UserAgent */ -typedef const char* (* NP_LOADDS NPN_UserAgentUPP)(NPP instance); -#define NewNPN_UserAgentProc(FUNC) \ - ((NPN_UserAgentUPP) (FUNC)) -#define CallNPN_UserAgentProc(FUNC, ARG1) \ - (*(FUNC))((ARG1)) - -/* NPN_MemAlloc */ -typedef void* (* NP_LOADDS NPN_MemAllocUPP)(uint32 size); -#define NewNPN_MemAllocProc(FUNC) \ - ((NPN_MemAllocUPP) (FUNC)) -#define CallNPN_MemAllocProc(FUNC, ARG1) \ - (*(FUNC))((ARG1)) - -/* NPN__MemFree */ -typedef void (* NP_LOADDS NPN_MemFreeUPP)(void* ptr); -#define NewNPN_MemFreeProc(FUNC) \ - ((NPN_MemFreeUPP) (FUNC)) -#define CallNPN_MemFreeProc(FUNC, ARG1) \ - (*(FUNC))((ARG1)) - -/* NPN_MemFlush */ -typedef uint32 (* NP_LOADDS NPN_MemFlushUPP)(uint32 size); -#define NewNPN_MemFlushProc(FUNC) \ - ((NPN_MemFlushUPP) (FUNC)) -#define CallNPN_MemFlushProc(FUNC, ARG1) \ - (*(FUNC))((ARG1)) - -/* NPN_ReloadPlugins */ -typedef void (* NP_LOADDS NPN_ReloadPluginsUPP)(NPBool reloadPages); -#define NewNPN_ReloadPluginsProc(FUNC) \ - ((NPN_ReloadPluginsUPP) (FUNC)) -#define CallNPN_ReloadPluginsProc(FUNC, ARG1) \ - (*(FUNC))((ARG1)) - -/* NPN_GetJavaEnv */ -typedef JRIEnv* (* NP_LOADDS NPN_GetJavaEnvUPP)(void); -#define NewNPN_GetJavaEnvProc(FUNC) \ - ((NPN_GetJavaEnvUPP) (FUNC)) -#define CallNPN_GetJavaEnvProc(FUNC) \ - (*(FUNC))() - -/* NPN_GetJavaPeer */ -typedef jref (* NP_LOADDS NPN_GetJavaPeerUPP)(NPP instance); -#define NewNPN_GetJavaPeerProc(FUNC) \ - ((NPN_GetJavaPeerUPP) (FUNC)) -#define CallNPN_GetJavaPeerProc(FUNC, ARG1) \ - (*(FUNC))((ARG1)) - -/* NPN_InvalidateRect */ -typedef void (* NP_LOADDS NPN_InvalidateRectUPP)(NPP instance, NPRect *rect); -#define NewNPN_InvalidateRectProc(FUNC) \ - ((NPN_InvalidateRectUPP) (FUNC)) -#define CallNPN_InvalidateRectProc(FUNC, ARG1, ARG2) \ - (*(FUNC))((ARG1), (ARG2)) - -/* NPN_InvalidateRegion */ -typedef void (* NP_LOADDS NPN_InvalidateRegionUPP)(NPP instance, NPRegion region); -#define NewNPN_InvalidateRegionProc(FUNC) \ - ((NPN_InvalidateRegionUPP) (FUNC)) -#define CallNPN_InvalidateRegionProc(FUNC, ARG1, ARG2) \ - (*(FUNC))((ARG1), (ARG2)) - -/* NPN_ForceRedraw */ -typedef void (* NP_LOADDS NPN_ForceRedrawUPP)(NPP instance); -#define NewNPN_ForceRedrawProc(FUNC) \ - ((NPN_ForceRedrawUPP) (FUNC)) -#define CallNPN_ForceRedrawProc(FUNC, ARG1) \ - (*(FUNC))((ARG1)) - -/* NPN_GetStringIdentifier */ -typedef NPIdentifier (* NP_LOADDS NPN_GetStringIdentifierUPP)(const NPUTF8* name); -#define NewNPN_GetStringIdentifierProc(FUNC) \ - ((NPN_GetStringIdentifierUPP) (FUNC)) -#define CallNPN_GetStringIdentifierProc(FUNC, ARG1) \ - (*(FUNC))((ARG1)) - -/* NPN_GetStringIdentifiers */ -typedef void (* NP_LOADDS NPN_GetStringIdentifiersUPP)(const NPUTF8** names, - int32_t nameCount, - NPIdentifier* identifiers); -#define NewNPN_GetStringIdentifiersProc(FUNC) \ - ((NPN_GetStringIdentifiersUPP) (FUNC)) -#define CallNPN_GetStringIdentifiersProc(FUNC, ARG1, ARG2, ARG3) \ - (*(FUNC))((ARG1), (ARG2), (ARG3)) - -/* NPN_GetIntIdentifier */ -typedef NPIdentifier (* NP_LOADDS NPN_GetIntIdentifierUPP)(int32_t intid); -#define NewNPN_GetIntIdentifierProc(FUNC) \ - ((NPN_GetIntIdentifierUPP) (FUNC)) -#define CallNPN_GetIntIdentifierProc(FUNC, ARG1) \ - (*(FUNC))((ARG1)) - -/* NPN_IdentifierIsString */ -typedef bool (* NP_LOADDS NPN_IdentifierIsStringUPP)(NPIdentifier identifier); -#define NewNPN_IdentifierIsStringProc(FUNC) \ - ((NPN_IdentifierIsStringUPP) (FUNC)) -#define CallNPN_IdentifierIsStringProc(FUNC, ARG1) \ - (*(FUNC))((ARG1)) - -/* NPN_UTF8FromIdentifier */ -typedef NPUTF8* (* NP_LOADDS NPN_UTF8FromIdentifierUPP)(NPIdentifier identifier); -#define NewNPN_UTF8FromIdentifierProc(FUNC) \ - ((NPN_UTF8FromIdentifierUPP) (FUNC)) -#define CallNPN_UTF8FromIdentifierProc(FUNC, ARG1) \ - (*(FUNC))((ARG1)) - -/* NPN_IntFromIdentifier */ -typedef int32_t (* NP_LOADDS NPN_IntFromIdentifierUPP)(NPIdentifier identifier); -#define NewNPN_IntFromIdentifierProc(FUNC) \ - ((NPN_IntFromIdentifierUPP) (FUNC)) -#define CallNPN_IntFromIdentifierProc(FUNC, ARG1) \ - (*(FUNC))((ARG1)) - -/* NPN_CreateObject */ -typedef NPObject* (* NP_LOADDS NPN_CreateObjectUPP)(NPP npp, NPClass *aClass); -#define NewNPN_CreateObjectProc(FUNC) \ - ((NPN_CreateObjectUPP) (FUNC)) -#define CallNPN_CreateObjectProc(FUNC, ARG1, ARG2) \ - (*(FUNC))((ARG1), (ARG2)) - -/* NPN_RetainObject */ -typedef NPObject* (* NP_LOADDS NPN_RetainObjectUPP)(NPObject *obj); -#define NewNPN_RetainObjectProc(FUNC) \ - ((NPN_RetainObjectUPP) (FUNC)) -#define CallNPN_RetainObjectProc(FUNC, ARG1) \ - (*(FUNC))((ARG1)) - -/* NPN_ReleaseObject */ -typedef void (* NP_LOADDS NPN_ReleaseObjectUPP)(NPObject *obj); -#define NewNPN_ReleaseObjectProc(FUNC) \ - ((NPN_ReleaseObjectUPP) (FUNC)) -#define CallNPN_ReleaseObjectProc(FUNC, ARG1) \ - (*(FUNC))((ARG1)) - -/* NPN_Invoke */ -typedef bool (* NP_LOADDS NPN_InvokeUPP)(NPP npp, NPObject* obj, NPIdentifier methodName, const NPVariant *args, uint32_t argCount, NPVariant *result); -#define NewNPN_InvokeProc(FUNC) \ - ((NPN_InvokeUPP) (FUNC)) -#define CallNPN_InvokeProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \ - (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6)) - -/* NPN_InvokeDefault */ -typedef bool (* NP_LOADDS NPN_InvokeDefaultUPP)(NPP npp, NPObject* obj, const NPVariant *args, uint32_t argCount, NPVariant *result); -#define NewNPN_InvokeDefaultProc(FUNC) \ - ((NPN_InvokeDefaultUPP) (FUNC)) -#define CallNPN_InvokeDefaultProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \ - (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5)) - -/* NPN_Evaluate */ -typedef bool (* NP_LOADDS NPN_EvaluateUPP)(NPP npp, NPObject *obj, NPString *script, NPVariant *result); -#define NewNPN_EvaluateProc(FUNC) \ - ((NPN_EvaluateUPP) (FUNC)) -#define CallNPN_EvaluateProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ - (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) - -/* NPN_GetProperty */ -typedef bool (* NP_LOADDS NPN_GetPropertyUPP)(NPP npp, NPObject *obj, NPIdentifier propertyName, NPVariant *result); -#define NewNPN_GetPropertyProc(FUNC) \ - ((NPN_GetPropertyUPP) (FUNC)) -#define CallNPN_GetPropertyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ - (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) - -/* NPN_SetProperty */ -typedef bool (* NP_LOADDS NPN_SetPropertyUPP)(NPP npp, NPObject *obj, NPIdentifier propertyName, const NPVariant *value); -#define NewNPN_SetPropertyProc(FUNC) \ - ((NPN_SetPropertyUPP) (FUNC)) -#define CallNPN_SetPropertyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ - (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) - -/* NPN_RemoveProperty */ -typedef bool (* NP_LOADDS NPN_RemovePropertyUPP)(NPP npp, NPObject *obj, NPIdentifier propertyName); -#define NewNPN_RemovePropertyProc(FUNC) \ - ((NPN_RemovePropertyUPP) (FUNC)) -#define CallNPN_RemovePropertyProc(FUNC, ARG1, ARG2, ARG3) \ - (*(FUNC))((ARG1), (ARG2), (ARG3)) - -/* NPN_HasProperty */ -typedef bool (* NP_LOADDS NPN_HasPropertyUPP)(NPP npp, NPObject *obj, NPIdentifier propertyName); -#define NewNPN_HasPropertyProc(FUNC) \ - ((NPN_HasPropertyUPP) (FUNC)) -#define CallNPN_HasPropertyProc(FUNC, ARG1, ARG2, ARG3) \ - (*(FUNC))((ARG1), (ARG2), (ARG3)) - -/* NPN_HasMethod */ -typedef bool (* NP_LOADDS NPN_HasMethodUPP)(NPP npp, NPObject *obj, NPIdentifier propertyName); -#define NewNPN_HasMethodProc(FUNC) \ - ((NPN_HasMethodUPP) (FUNC)) -#define CallNPN_HasMethodProc(FUNC, ARG1, ARG2, ARG3) \ - (*(FUNC))((ARG1), (ARG2), (ARG3)) - -/* NPN_ReleaseVariantValue */ -typedef void (* NP_LOADDS NPN_ReleaseVariantValueUPP)(NPVariant *variant); -#define NewNPN_ReleaseVariantValueProc(FUNC) \ - ((NPN_ReleaseVariantValueUPP) (FUNC)) -#define CallNPN_ReleaseVariantValueProc(FUNC, ARG1) \ - (*(FUNC))((ARG1)) - -/* NPN_SetException */ -typedef void (* NP_LOADDS NPN_SetExceptionUPP)(NPObject *obj, const NPUTF8 *message); -#define NewNPN_SetExceptionProc(FUNC) \ - ((NPN_SetExceptionUPP) (FUNC)) -#define CallNPN_SetExceptionProc(FUNC, ARG1, ARG2) \ - (*(FUNC))((ARG1), (ARG2)) - -/* NPN_PushPopupsEnabledStateUPP */ -typedef bool (* NP_LOADDS NPN_PushPopupsEnabledStateUPP)(NPP npp, NPBool enabled); -#define NewNPN_PushPopupsEnabledStateProc(FUNC) \ - ((NPN_PushPopupsEnabledStateUPP) (FUNC)) -#define CallNPN_PushPopupsEnabledStateProc(FUNC, ARG1, ARG2) \ - (*(FUNC))((ARG1), (ARG2)) - -/* NPN_PopPopupsEnabledState */ -typedef bool (* NP_LOADDS NPN_PopPopupsEnabledStateUPP)(NPP npp); -#define NewNPN_PopPopupsEnabledStateProc(FUNC) \ - ((NPN_PopPopupsEnabledStateUPP) (FUNC)) -#define CallNPN_PopPopupsEnabledStateProc(FUNC, ARG1) \ - (*(FUNC))((ARG1)) - -/* NPN_Enumerate */ -typedef bool (* NP_LOADDS NPN_EnumerateUPP)(NPP npp, NPObject *obj, NPIdentifier **identifier, uint32_t *count); -#define NewNPN_EnumerateProc(FUNC) \ - ((NPN_EnumerateUPP) (FUNC)) -#define CallNPN_EnumerateProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ - (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) - -/* NPN_PluginThreadAsyncCall */ -typedef void (* NP_LOADDS NPN_PluginThreadAsyncCallUPP)(NPP instance, void (*func)(void *), void *userData); -#define NewNPN_PluginThreadAsyncCallProc(FUNC) \ - ((NPN_PluginThreadAsyncCallUPP) (FUNC)) -#define CallNPN_PluginThreadAsyncCallProc(FUNC, ARG1, ARG2, ARG3) \ - (*(FUNC))((ARG1), (ARG2), (ARG3)) - -/* NPN_Construct */ -typedef bool (* NP_LOADDS NPN_ConstructUPP)(NPP npp, NPObject* obj, const NPVariant *args, uint32_t argCount, NPVariant *result); -#define NewNPN_ConstructProc(FUNC) \ - ((NPN_ConstructUPP) (FUNC)) -#define CallNPN_ConstructProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \ - (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5)) - - - -/****************************************************************************************** - * The actual plugin function table definitions - *******************************************************************************************/ - -typedef struct _NPPluginFuncs { - uint16 size; - uint16 version; - NPP_NewUPP newp; - NPP_DestroyUPP destroy; - NPP_SetWindowUPP setwindow; - NPP_NewStreamUPP newstream; - NPP_DestroyStreamUPP destroystream; - NPP_StreamAsFileUPP asfile; - NPP_WriteReadyUPP writeready; - NPP_WriteUPP write; - NPP_PrintUPP print; - NPP_HandleEventUPP event; - NPP_URLNotifyUPP urlnotify; - JRIGlobalRef javaClass; - NPP_GetValueUPP getvalue; - NPP_SetValueUPP setvalue; -} NPPluginFuncs; - -typedef struct _NPNetscapeFuncs { - uint16 size; - uint16 version; - NPN_GetURLUPP geturl; - NPN_PostURLUPP posturl; - NPN_RequestReadUPP requestread; - NPN_NewStreamUPP newstream; - NPN_WriteUPP write; - NPN_DestroyStreamUPP destroystream; - NPN_StatusUPP status; - NPN_UserAgentUPP uagent; - NPN_MemAllocUPP memalloc; - NPN_MemFreeUPP memfree; - NPN_MemFlushUPP memflush; - NPN_ReloadPluginsUPP reloadplugins; - NPN_GetJavaEnvUPP getJavaEnv; - NPN_GetJavaPeerUPP getJavaPeer; - NPN_GetURLNotifyUPP geturlnotify; - NPN_PostURLNotifyUPP posturlnotify; - NPN_GetValueUPP getvalue; - NPN_SetValueUPP setvalue; - NPN_InvalidateRectUPP invalidaterect; - NPN_InvalidateRegionUPP invalidateregion; - NPN_ForceRedrawUPP forceredraw; - NPN_GetStringIdentifierUPP getstringidentifier; - NPN_GetStringIdentifiersUPP getstringidentifiers; - NPN_GetIntIdentifierUPP getintidentifier; - NPN_IdentifierIsStringUPP identifierisstring; - NPN_UTF8FromIdentifierUPP utf8fromidentifier; - NPN_IntFromIdentifierUPP intfromidentifier; - NPN_CreateObjectUPP createobject; - NPN_RetainObjectUPP retainobject; - NPN_ReleaseObjectUPP releaseobject; - NPN_InvokeUPP invoke; - NPN_InvokeDefaultUPP invokeDefault; - NPN_EvaluateUPP evaluate; - NPN_GetPropertyUPP getproperty; - NPN_SetPropertyUPP setproperty; - NPN_RemovePropertyUPP removeproperty; - NPN_HasPropertyUPP hasproperty; - NPN_HasMethodUPP hasmethod; - NPN_ReleaseVariantValueUPP releasevariantvalue; - NPN_SetExceptionUPP setexception; - NPN_PushPopupsEnabledStateUPP pushpopupsenabledstate; - NPN_PopPopupsEnabledStateUPP poppopupsenabledstate; - NPN_EnumerateUPP enumerate; - NPN_PluginThreadAsyncCallUPP pluginthreadasynccall; - NPN_ConstructUPP construct; -} NPNetscapeFuncs; - - -#ifdef XP_MACOSX -/****************************************************************************************** - * Mac platform-specific plugin glue stuff - *******************************************************************************************/ - -/* - * Main entry point of the plugin. - * This routine will be called when the plugin is loaded. The function - * tables are passed in and the plugin fills in the NPPluginFuncs table - * and NPPShutdownUPP for Netscape's use. - */ -typedef NPError (* NP_LOADDS NPP_MainEntryUPP)(NPNetscapeFuncs*, NPPluginFuncs*, NPP_ShutdownUPP*); -#define NewNPP_MainEntryProc(FUNC) \ - ((NPP_MainEntryUPP) (FUNC)) -#define CallNPP_MainEntryProc(FUNC, netscapeFunc, pluginFunc, shutdownUPP) \ - (*(FUNC))((netscapeFunc), (pluginFunc), (shutdownUPP)) - -/* - * Mac OS X version(s) of NP_GetMIMEDescription(const char *) - * These can be called to retreive MIME information from the plugin dynamically - * - * Note: For compatibility with Quicktime, BPSupportedMIMEtypes is another way - * to get mime info from the plugin only on OSX and may not be supported - * in furture version -- use NP_GetMIMEDescription instead - */ - -enum -{ - kBPSupportedMIMETypesStructVers_1 = 1 -}; - -typedef struct _BPSupportedMIMETypes -{ - SInt32 structVersion; /* struct version */ - Handle typeStrings; /* STR# formated handle, allocated by plug-in */ - Handle infoStrings; /* STR# formated handle, allocated by plug-in */ -} BPSupportedMIMETypes; -OSErr BP_GetSupportedMIMETypes(BPSupportedMIMETypes *mimeInfo, UInt32 flags); - - /* NP_GetMIMEDescription */ -#define NP_GETMIMEDESCRIPTION_NAME "NP_GetMIMEDescription" -typedef const char* (* NP_LOADDS NP_GetMIMEDescriptionUPP)(); -#define NewNP_GetMIMEDescEntryProc(FUNC) \ - ((NP_GetMIMEDescriptionUPP) (FUNC)) -#define CallNP_GetMIMEDescEntryProc(FUNC) \ - (*(FUNC))() - -/* BP_GetSupportedMIMETypes */ -typedef OSErr (* NP_LOADDS BP_GetSupportedMIMETypesUPP)(BPSupportedMIMETypes*, UInt32); -#define NewBP_GetSupportedMIMETypesEntryProc(FUNC) \ - ((BP_GetSupportedMIMETypesUPP) (FUNC)) -#define CallBP_GetMIMEDescEntryProc(FUNC, mimeInfo, flags) \ - (*(FUNC))((mimeInfo), (flags)) - -#endif /* XP_MACOSX */ - -#if defined(_WINDOWS) -#define OSCALL WINAPI -#else -#if defined(__OS2__) -#define OSCALL _System -#else -#define OSCALL -#endif -#endif - -#if defined(XP_UNIX) -/* GCC 3.3 and later support the visibility attribute. */ -#if defined(__GNUC__) && \ - ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) -#define NP_VISIBILITY_DEFAULT __attribute__((visibility("default"))) -#else -#define NP_VISIBILITY_DEFAULT -#endif - -#define NP_EXPORT(__type) NP_VISIBILITY_DEFAULT __type -#endif - -#if defined( _WINDOWS ) || defined (__OS2__) - -#ifdef __cplusplus -extern "C" { -#endif - -/* plugin meta member functions */ -#if defined(__OS2__) - -typedef struct _NPPluginData { /* Alternate OS2 Plugin interface */ - char *pMimeTypes; - char *pFileExtents; - char *pFileOpenTemplate; - char *pProductName; - char *pProductDescription; - unsigned long dwProductVersionMS; - unsigned long dwProductVersionLS; -} NPPluginData; - -NPError OSCALL NP_GetPluginData(NPPluginData * pPluginData); - -#endif - -NPError OSCALL NP_GetEntryPoints(NPPluginFuncs* pFuncs); - -NPError OSCALL NP_Initialize(NPNetscapeFuncs* pFuncs); - -NPError OSCALL NP_Shutdown(); - -char* NP_GetMIMEDescription(); - -#ifdef __cplusplus -} -#endif - -#endif /* _WINDOWS || __OS2__ */ - -#if defined(__OS2__) -#pragma pack() -#endif - -#ifdef XP_UNIX - -#ifdef __cplusplus -extern "C" { -#endif - -/* plugin meta member functions */ - -NP_EXPORT(char*) NP_GetMIMEDescription(void); -NP_EXPORT(NPError) NP_Initialize(NPNetscapeFuncs*, NPPluginFuncs*); -NP_EXPORT(NPError) NP_Shutdown(void); -NP_EXPORT(NPError) NP_GetValue(void *future, NPPVariable aVariable, void *aValue); - -#ifdef __cplusplus -} -#endif - -#endif /* XP_UNIX */ - -#endif /* _NPUPP_H_ */ diff --git a/Templates/Empty/web/source/npplugin/windows/obsolete/protypes.h b/Templates/Empty/web/source/npplugin/windows/obsolete/protypes.h deleted file mode 100644 index 4405bfce2..000000000 --- a/Templates/Empty/web/source/npplugin/windows/obsolete/protypes.h +++ /dev/null @@ -1,252 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (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.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -/* - * This header typedefs the old 'native' types to the new PRs. - * These definitions are scheduled to be eliminated at the earliest - * possible time. The NSPR API is implemented and documented using - * the new definitions. - */ - -#if !defined(PROTYPES_H) -#define PROTYPES_H - -typedef PRUintn uintn; -#ifndef _XP_Core_ -typedef PRIntn intn; -#endif - -/* - * It is trickier to define uint, int8, uint8, int16, uint16, - * int32, uint32, int64, and uint64 because some of these int - * types are defined by standard header files on some platforms. - * Our strategy here is to include all such standard headers - * first, and then define these int types only if they are not - * defined by those standard headers. - */ - -/* - * BeOS defines all the int types below in its standard header - * file SupportDefs.h. - */ -#ifdef XP_BEOS -#include -#endif - -/* - * OpenVMS defines all the int types below in its standard - * header files ints.h and types.h. - */ -#ifdef VMS -#include -#include -#endif - -/* - * SVR4 typedef of uint is commonly found on UNIX machines. - * - * On AIX 4.3, sys/inttypes.h (which is included by sys/types.h) - * defines the types int8, int16, int32, and int64. - */ -#ifdef XP_UNIX -#include -#endif - -/* model.h on HP-UX defines int8, int16, and int32. */ -#ifdef HPUX -#include -#endif - -/* - * uint - */ - -#if !defined(XP_BEOS) && !defined(VMS) \ - && !defined(XP_UNIX) || defined(NTO) -typedef PRUintn uint; -#endif - -/* - * uint64 - */ - -#if !defined(XP_BEOS) && !defined(VMS) -typedef PRUint64 uint64; -#endif - -/* - * uint32 - */ - -#if !defined(XP_BEOS) && !defined(VMS) -#if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO) -typedef PRUint32 uint32; -#else -typedef unsigned long uint32; -#endif -#endif - -/* - * uint16 - */ - -#if !defined(XP_BEOS) && !defined(VMS) -typedef PRUint16 uint16; -#endif - -/* - * uint8 - */ - -#if !defined(XP_BEOS) && !defined(VMS) -typedef PRUint8 uint8; -#endif - -/* - * int64 - */ - -#if !defined(XP_BEOS) && !defined(VMS) \ - && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) -typedef PRInt64 int64; -#endif - -/* - * int32 - */ - -#if !defined(XP_BEOS) && !defined(VMS) \ - && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \ - && !defined(HPUX) -#if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO) -typedef PRInt32 int32; -#else -typedef long int32; -#endif -#endif - -/* - * int16 - */ - -#if !defined(XP_BEOS) && !defined(VMS) \ - && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \ - && !defined(HPUX) -typedef PRInt16 int16; -#endif - -/* - * int8 - */ - -#if !defined(XP_BEOS) && !defined(VMS) \ - && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \ - && !defined(HPUX) -typedef PRInt8 int8; -#endif - -typedef PRFloat64 float64; -typedef PRUptrdiff uptrdiff_t; -typedef PRUword uprword_t; -typedef PRWord prword_t; - - -/* Re: prbit.h */ -#define TEST_BIT PR_TEST_BIT -#define SET_BIT PR_SET_BIT -#define CLEAR_BIT PR_CLEAR_BIT - -/* Re: prarena.h->plarena.h */ -#define PRArena PLArena -#define PRArenaPool PLArenaPool -#define PRArenaStats PLArenaStats -#define PR_ARENA_ALIGN PL_ARENA_ALIGN -#define PR_INIT_ARENA_POOL PL_INIT_ARENA_POOL -#define PR_ARENA_ALLOCATE PL_ARENA_ALLOCATE -#define PR_ARENA_GROW PL_ARENA_GROW -#define PR_ARENA_MARK PL_ARENA_MARK -#define PR_CLEAR_UNUSED PL_CLEAR_UNUSED -#define PR_CLEAR_ARENA PL_CLEAR_ARENA -#define PR_ARENA_RELEASE PL_ARENA_RELEASE -#define PR_COUNT_ARENA PL_COUNT_ARENA -#define PR_ARENA_DESTROY PL_ARENA_DESTROY -#define PR_InitArenaPool PL_InitArenaPool -#define PR_FreeArenaPool PL_FreeArenaPool -#define PR_FinishArenaPool PL_FinishArenaPool -#define PR_CompactArenaPool PL_CompactArenaPool -#define PR_ArenaFinish PL_ArenaFinish -#define PR_ArenaAllocate PL_ArenaAllocate -#define PR_ArenaGrow PL_ArenaGrow -#define PR_ArenaRelease PL_ArenaRelease -#define PR_ArenaCountAllocation PL_ArenaCountAllocation -#define PR_ArenaCountInplaceGrowth PL_ArenaCountInplaceGrowth -#define PR_ArenaCountGrowth PL_ArenaCountGrowth -#define PR_ArenaCountRelease PL_ArenaCountRelease -#define PR_ArenaCountRetract PL_ArenaCountRetract - -/* Re: prhash.h->plhash.h */ -#define PRHashEntry PLHashEntry -#define PRHashTable PLHashTable -#define PRHashNumber PLHashNumber -#define PRHashFunction PLHashFunction -#define PRHashComparator PLHashComparator -#define PRHashEnumerator PLHashEnumerator -#define PRHashAllocOps PLHashAllocOps -#define PR_NewHashTable PL_NewHashTable -#define PR_HashTableDestroy PL_HashTableDestroy -#define PR_HashTableRawLookup PL_HashTableRawLookup -#define PR_HashTableRawAdd PL_HashTableRawAdd -#define PR_HashTableRawRemove PL_HashTableRawRemove -#define PR_HashTableAdd PL_HashTableAdd -#define PR_HashTableRemove PL_HashTableRemove -#define PR_HashTableEnumerateEntries PL_HashTableEnumerateEntries -#define PR_HashTableLookup PL_HashTableLookup -#define PR_HashTableDump PL_HashTableDump -#define PR_HashString PL_HashString -#define PR_CompareStrings PL_CompareStrings -#define PR_CompareValues PL_CompareValues - -#if defined(XP_MAC) -#ifndef TRUE /* Mac standard is lower case true */ - #define TRUE 1 -#endif -#ifndef FALSE /* Mac standard is lower case false */ - #define FALSE 0 -#endif -#endif - -#endif /* !defined(PROTYPES_H) */ diff --git a/Templates/Empty/web/source/npplugin/windows/prcpucfg.h b/Templates/Empty/web/source/npplugin/windows/prcpucfg.h deleted file mode 100644 index 026258b8c..000000000 --- a/Templates/Empty/web/source/npplugin/windows/prcpucfg.h +++ /dev/null @@ -1,300 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (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.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#ifndef nspr_cpucfg___ -#define nspr_cpucfg___ - -#ifndef XP_PC -#define XP_PC -#endif - -#ifndef WIN32 -#define WIN32 -#endif - -#ifndef WIN95 -#define WIN95 -#endif - -#define PR_AF_INET6 23 /* same as AF_INET6 */ - -#if defined(_M_IX86) || defined(_X86_) - -#define IS_LITTLE_ENDIAN 1 -#undef IS_BIG_ENDIAN - -#define PR_BYTES_PER_BYTE 1 -#define PR_BYTES_PER_SHORT 2 -#define PR_BYTES_PER_INT 4 -#define PR_BYTES_PER_INT64 8 -#define PR_BYTES_PER_LONG 4 -#define PR_BYTES_PER_FLOAT 4 -#define PR_BYTES_PER_WORD 4 -#define PR_BYTES_PER_DWORD 8 -#define PR_BYTES_PER_DOUBLE 8 - -#define PR_BITS_PER_BYTE 8 -#define PR_BITS_PER_SHORT 16 -#define PR_BITS_PER_INT 32 -#define PR_BITS_PER_INT64 64 -#define PR_BITS_PER_LONG 32 -#define PR_BITS_PER_FLOAT 32 -#define PR_BITS_PER_WORD 32 -#define PR_BITS_PER_DWORD 64 -#define PR_BITS_PER_DOUBLE 64 - -#define PR_BITS_PER_BYTE_LOG2 3 -#define PR_BITS_PER_SHORT_LOG2 4 -#define PR_BITS_PER_INT_LOG2 5 -#define PR_BITS_PER_INT64_LOG2 6 -#define PR_BITS_PER_LONG_LOG2 5 -#define PR_BITS_PER_FLOAT_LOG2 5 -#define PR_BITS_PER_WORD_LOG2 5 -#define PR_BITS_PER_DWORD_LOG2 6 -#define PR_BITS_PER_DOUBLE_LOG2 6 - -#define PR_ALIGN_OF_SHORT 2 -#define PR_ALIGN_OF_INT 4 -#define PR_ALIGN_OF_LONG 4 -#define PR_ALIGN_OF_INT64 8 -#define PR_ALIGN_OF_FLOAT 4 -#define PR_ALIGN_OF_WORD 4 -#define PR_ALIGN_OF_DWORD 8 -#define PR_ALIGN_OF_DOUBLE 4 -#define PR_ALIGN_OF_POINTER 4 - -#define PR_BYTES_PER_WORD_LOG2 2 -#define PR_BYTES_PER_DWORD_LOG2 2 - -#elif defined(_ALPHA_) - -#define IS_LITTLE_ENDIAN 1 -#undef IS_BIG_ENDIAN - -#define PR_BYTES_PER_BYTE 1 -#define PR_BYTES_PER_SHORT 2 -#define PR_BYTES_PER_INT 4 -#define PR_BYTES_PER_INT64 8 -#define PR_BYTES_PER_LONG 4 -#define PR_BYTES_PER_FLOAT 4 -#define PR_BYTES_PER_DOUBLE 8 -#define PR_BYTES_PER_WORD 4 -#define PR_BYTES_PER_DWORD 8 - -#define PR_BITS_PER_BYTE 8 -#define PR_BITS_PER_SHORT 16 -#define PR_BITS_PER_INT 32 -#define PR_BITS_PER_INT64 64 -#define PR_BITS_PER_LONG 32 -#define PR_BITS_PER_FLOAT 32 -#define PR_BITS_PER_DOUBLE 64 -#define PR_BITS_PER_WORD 32 - -#define PR_BITS_PER_BYTE_LOG2 3 -#define PR_BITS_PER_SHORT_LOG2 4 -#define PR_BITS_PER_INT_LOG2 5 -#define PR_BITS_PER_INT64_LOG2 6 -#define PR_BITS_PER_LONG_LOG2 5 -#define PR_BITS_PER_FLOAT_LOG2 5 -#define PR_BITS_PER_DOUBLE_LOG2 6 -#define PR_BITS_PER_WORD_LOG2 5 - -#define PR_BYTES_PER_WORD_LOG2 2 -#define PR_BYTES_PER_DWORD_LOG2 3 - -#define PR_ALIGN_OF_SHORT 2 -#define PR_ALIGN_OF_INT 4 -#define PR_ALIGN_OF_LONG 4 -#define PR_ALIGN_OF_INT64 8 -#define PR_ALIGN_OF_FLOAT 4 -#define PR_ALIGN_OF_DOUBLE 8 -#define PR_ALIGN_OF_POINTER 4 - -#elif defined(_AMD64_) - -#define IS_LITTLE_ENDIAN 1 -#undef IS_BIG_ENDIAN -#define IS_64 - -#define PR_BYTES_PER_BYTE 1 -#define PR_BYTES_PER_SHORT 2 -#define PR_BYTES_PER_INT 4 -#define PR_BYTES_PER_INT64 8 -#define PR_BYTES_PER_LONG 4 -#define PR_BYTES_PER_FLOAT 4 -#define PR_BYTES_PER_WORD 8 -#define PR_BYTES_PER_DWORD 8 -#define PR_BYTES_PER_DOUBLE 8 - -#define PR_BITS_PER_BYTE 8 -#define PR_BITS_PER_SHORT 16 -#define PR_BITS_PER_INT 32 -#define PR_BITS_PER_INT64 64 -#define PR_BITS_PER_LONG 32 -#define PR_BITS_PER_FLOAT 32 -#define PR_BITS_PER_WORD 64 -#define PR_BITS_PER_DWORD 64 -#define PR_BITS_PER_DOUBLE 64 - -#define PR_BITS_PER_BYTE_LOG2 3 -#define PR_BITS_PER_SHORT_LOG2 4 -#define PR_BITS_PER_INT_LOG2 5 -#define PR_BITS_PER_INT64_LOG2 6 -#define PR_BITS_PER_LONG_LOG2 5 -#define PR_BITS_PER_FLOAT_LOG2 5 -#define PR_BITS_PER_WORD_LOG2 6 -#define PR_BITS_PER_DWORD_LOG2 6 -#define PR_BITS_PER_DOUBLE_LOG2 6 - -#define PR_ALIGN_OF_SHORT 2 -#define PR_ALIGN_OF_INT 4 -#define PR_ALIGN_OF_LONG 4 -#define PR_ALIGN_OF_INT64 8 -#define PR_ALIGN_OF_FLOAT 4 -#define PR_ALIGN_OF_WORD 8 -#define PR_ALIGN_OF_DWORD 8 -#define PR_ALIGN_OF_DOUBLE 8 -#define PR_ALIGN_OF_POINTER 8 - -#define PR_BYTES_PER_WORD_LOG2 3 -#define PR_BYTES_PER_DWORD_LOG2 3 - -#elif defined(_IA64_) - -#define IS_LITTLE_ENDIAN 1 -#undef IS_BIG_ENDIAN -#define IS_64 - -#define PR_BYTES_PER_BYTE 1 -#define PR_BYTES_PER_SHORT 2 -#define PR_BYTES_PER_INT 4 -#define PR_BYTES_PER_INT64 8 -#define PR_BYTES_PER_LONG 4 -#define PR_BYTES_PER_FLOAT 4 -#define PR_BYTES_PER_WORD 8 -#define PR_BYTES_PER_DWORD 8 -#define PR_BYTES_PER_DOUBLE 8 - -#define PR_BITS_PER_BYTE 8 -#define PR_BITS_PER_SHORT 16 -#define PR_BITS_PER_INT 32 -#define PR_BITS_PER_INT64 64 -#define PR_BITS_PER_LONG 32 -#define PR_BITS_PER_FLOAT 32 -#define PR_BITS_PER_WORD 64 -#define PR_BITS_PER_DWORD 64 -#define PR_BITS_PER_DOUBLE 64 - -#define PR_BITS_PER_BYTE_LOG2 3 -#define PR_BITS_PER_SHORT_LOG2 4 -#define PR_BITS_PER_INT_LOG2 5 -#define PR_BITS_PER_INT64_LOG2 6 -#define PR_BITS_PER_LONG_LOG2 5 -#define PR_BITS_PER_FLOAT_LOG2 5 -#define PR_BITS_PER_WORD_LOG2 6 -#define PR_BITS_PER_DWORD_LOG2 6 -#define PR_BITS_PER_DOUBLE_LOG2 6 - -#define PR_ALIGN_OF_SHORT 2 -#define PR_ALIGN_OF_INT 4 -#define PR_ALIGN_OF_LONG 4 -#define PR_ALIGN_OF_INT64 8 -#define PR_ALIGN_OF_FLOAT 4 -#define PR_ALIGN_OF_WORD 8 -#define PR_ALIGN_OF_DWORD 8 -#define PR_ALIGN_OF_DOUBLE 8 -#define PR_ALIGN_OF_POINTER 8 - -#define PR_BYTES_PER_WORD_LOG2 3 -#define PR_BYTES_PER_DWORD_LOG2 3 - -#else /* defined(_M_IX86) || defined(_X86_) */ - -#error unknown processor architecture - -#endif /* defined(_M_IX86) || defined(_X86_) */ - -#ifndef HAVE_LONG_LONG -#define HAVE_LONG_LONG -#endif - -#ifndef NO_NSPR_10_SUPPORT - -#define BYTES_PER_BYTE PR_BYTES_PER_BYTE -#define BYTES_PER_SHORT PR_BYTES_PER_SHORT -#define BYTES_PER_INT PR_BYTES_PER_INT -#define BYTES_PER_INT64 PR_BYTES_PER_INT64 -#define BYTES_PER_LONG PR_BYTES_PER_LONG -#define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT -#define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE -#define BYTES_PER_WORD PR_BYTES_PER_WORD -#define BYTES_PER_DWORD PR_BYTES_PER_DWORD - -#define BITS_PER_BYTE PR_BITS_PER_BYTE -#define BITS_PER_SHORT PR_BITS_PER_SHORT -#define BITS_PER_INT PR_BITS_PER_INT -#define BITS_PER_INT64 PR_BITS_PER_INT64 -#define BITS_PER_LONG PR_BITS_PER_LONG -#define BITS_PER_FLOAT PR_BITS_PER_FLOAT -#define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE -#define BITS_PER_WORD PR_BITS_PER_WORD - -#define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2 -#define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2 -#define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2 -#define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2 -#define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2 -#define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2 -#define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2 -#define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2 - -#define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT -#define ALIGN_OF_INT PR_ALIGN_OF_INT -#define ALIGN_OF_LONG PR_ALIGN_OF_LONG -#define ALIGN_OF_INT64 PR_ALIGN_OF_INT64 -#define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT -#define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE -#define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER -#define ALIGN_OF_WORD PR_ALIGN_OF_WORD - -#define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2 -#define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2 -#define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2 - -#endif /* NO_NSPR_10_SUPPORT */ - -#endif /* nspr_cpucfg___ */ diff --git a/Templates/Empty/web/source/npplugin/windows/prtypes.h b/Templates/Empty/web/source/npplugin/windows/prtypes.h deleted file mode 100644 index 6850d6f9a..000000000 --- a/Templates/Empty/web/source/npplugin/windows/prtypes.h +++ /dev/null @@ -1,569 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (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.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -/* -** File: prtypes.h -** Description: Definitions of NSPR's basic types -** -** Prototypes and macros used to make up for deficiencies that we have found -** in ANSI environments. -** -** Since we do not wrap and all the other standard headers, authors -** of portable code will not know in general that they need these definitions. -** Instead of requiring these authors to find the dependent uses in their code -** and take the following steps only in those C files, we take steps once here -** for all C files. -**/ - -#ifndef prtypes_h___ -#define prtypes_h___ - -#ifdef MDCPUCFG -#include MDCPUCFG -#else -#include "prcpucfg.h" -#endif - -#include - -/*********************************************************************** -** MACROS: PR_EXTERN -** PR_IMPLEMENT -** DESCRIPTION: -** These are only for externally visible routines and globals. For -** internal routines, just use "extern" for type checking and that -** will not export internal cross-file or forward-declared symbols. -** Define a macro for declaring procedures return types. We use this to -** deal with windoze specific type hackery for DLL definitions. Use -** PR_EXTERN when the prototype for the method is declared. Use -** PR_IMPLEMENT for the implementation of the method. -** -** Example: -** in dowhim.h -** PR_EXTERN( void ) DoWhatIMean( void ); -** in dowhim.c -** PR_IMPLEMENT( void ) DoWhatIMean( void ) { return; } -** -** -***********************************************************************/ -#if defined(WIN32) - -#define PR_EXPORT(__type) extern __declspec(dllexport) __type -#define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type -#define PR_IMPORT(__type) __declspec(dllimport) __type -#define PR_IMPORT_DATA(__type) __declspec(dllimport) __type - -#define PR_EXTERN(__type) extern __declspec(dllexport) __type -#define PR_IMPLEMENT(__type) __declspec(dllexport) __type -#define PR_EXTERN_DATA(__type) extern __declspec(dllexport) __type -#define PR_IMPLEMENT_DATA(__type) __declspec(dllexport) __type - -#define PR_CALLBACK -#define PR_CALLBACK_DECL -#define PR_STATIC_CALLBACK(__x) static __x - -#elif defined(XP_BEOS) - -#define PR_EXPORT(__type) extern __declspec(dllexport) __type -#define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type -#define PR_IMPORT(__type) extern __declspec(dllexport) __type -#define PR_IMPORT_DATA(__type) extern __declspec(dllexport) __type - -#define PR_EXTERN(__type) extern __declspec(dllexport) __type -#define PR_IMPLEMENT(__type) __declspec(dllexport) __type -#define PR_EXTERN_DATA(__type) extern __declspec(dllexport) __type -#define PR_IMPLEMENT_DATA(__type) __declspec(dllexport) __type - -#define PR_CALLBACK -#define PR_CALLBACK_DECL -#define PR_STATIC_CALLBACK(__x) static __x - -#elif defined(WIN16) - -#define PR_CALLBACK_DECL __cdecl - -#if defined(_WINDLL) -#define PR_EXPORT(__type) extern __type _cdecl _export _loadds -#define PR_IMPORT(__type) extern __type _cdecl _export _loadds -#define PR_EXPORT_DATA(__type) extern __type _export -#define PR_IMPORT_DATA(__type) extern __type _export - -#define PR_EXTERN(__type) extern __type _cdecl _export _loadds -#define PR_IMPLEMENT(__type) __type _cdecl _export _loadds -#define PR_EXTERN_DATA(__type) extern __type _export -#define PR_IMPLEMENT_DATA(__type) __type _export - -#define PR_CALLBACK __cdecl __loadds -#define PR_STATIC_CALLBACK(__x) static __x PR_CALLBACK - -#else /* this must be .EXE */ -#define PR_EXPORT(__type) extern __type _cdecl _export -#define PR_IMPORT(__type) extern __type _cdecl _export -#define PR_EXPORT_DATA(__type) extern __type _export -#define PR_IMPORT_DATA(__type) extern __type _export - -#define PR_EXTERN(__type) extern __type _cdecl _export -#define PR_IMPLEMENT(__type) __type _cdecl _export -#define PR_EXTERN_DATA(__type) extern __type _export -#define PR_IMPLEMENT_DATA(__type) __type _export - -#define PR_CALLBACK __cdecl __loadds -#define PR_STATIC_CALLBACK(__x) __x PR_CALLBACK -#endif /* _WINDLL */ - -#elif defined(XP_MAC) - -#define PR_EXPORT(__type) extern __declspec(export) __type -#define PR_EXPORT_DATA(__type) extern __declspec(export) __type -#define PR_IMPORT(__type) extern __declspec(export) __type -#define PR_IMPORT_DATA(__type) extern __declspec(export) __type - -#define PR_EXTERN(__type) extern __declspec(export) __type -#define PR_IMPLEMENT(__type) __declspec(export) __type -#define PR_EXTERN_DATA(__type) extern __declspec(export) __type -#define PR_IMPLEMENT_DATA(__type) __declspec(export) __type - -#define PR_CALLBACK -#define PR_CALLBACK_DECL -#define PR_STATIC_CALLBACK(__x) static __x - -#elif defined(XP_OS2) && defined(__declspec) - -#define PR_EXPORT(__type) extern __declspec(dllexport) __type -#define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type -#define PR_IMPORT(__type) extern __declspec(dllimport) __type -#define PR_IMPORT_DATA(__type) extern __declspec(dllimport) __type - -#define PR_EXTERN(__type) extern __declspec(dllexport) __type -#define PR_IMPLEMENT(__type) __declspec(dllexport) __type -#define PR_EXTERN_DATA(__type) extern __declspec(dllexport) __type -#define PR_IMPLEMENT_DATA(__type) __declspec(dllexport) __type - -#define PR_CALLBACK -#define PR_CALLBACK_DECL -#define PR_STATIC_CALLBACK(__x) static __x - -#elif defined(XP_OS2_VACPP) - -#define PR_EXPORT(__type) extern __type -#define PR_EXPORT_DATA(__type) extern __type -#define PR_IMPORT(__type) extern __type -#define PR_IMPORT_DATA(__type) extern __type - -#define PR_EXTERN(__type) extern __type -#define PR_IMPLEMENT(__type) __type -#define PR_EXTERN_DATA(__type) extern __type -#define PR_IMPLEMENT_DATA(__type) __type -#define PR_CALLBACK _Optlink -#define PR_CALLBACK_DECL -#define PR_STATIC_CALLBACK(__x) static __x PR_CALLBACK - -#else /* Unix */ - -/* GCC 3.3 and later support the visibility attribute. */ -#if (__GNUC__ >= 4) || \ - (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) -#define PR_VISIBILITY_DEFAULT __attribute__((visibility("default"))) -#else -#define PR_VISIBILITY_DEFAULT -#endif - -#define PR_EXPORT(__type) extern PR_VISIBILITY_DEFAULT __type -#define PR_EXPORT_DATA(__type) extern PR_VISIBILITY_DEFAULT __type -#define PR_IMPORT(__type) extern PR_VISIBILITY_DEFAULT __type -#define PR_IMPORT_DATA(__type) extern PR_VISIBILITY_DEFAULT __type - -#define PR_EXTERN(__type) extern PR_VISIBILITY_DEFAULT __type -#define PR_IMPLEMENT(__type) PR_VISIBILITY_DEFAULT __type -#define PR_EXTERN_DATA(__type) extern PR_VISIBILITY_DEFAULT __type -#define PR_IMPLEMENT_DATA(__type) PR_VISIBILITY_DEFAULT __type -#define PR_CALLBACK -#define PR_CALLBACK_DECL -#define PR_STATIC_CALLBACK(__x) static __x - -#endif - -#if defined(_NSPR_BUILD_) -#define NSPR_API(__type) PR_EXPORT(__type) -#define NSPR_DATA_API(__type) PR_EXPORT_DATA(__type) -#else -#define NSPR_API(__type) PR_IMPORT(__type) -#define NSPR_DATA_API(__type) PR_IMPORT_DATA(__type) -#endif - -/*********************************************************************** -** MACROS: PR_BEGIN_MACRO -** PR_END_MACRO -** DESCRIPTION: -** Macro body brackets so that macros with compound statement definitions -** behave syntactically more like functions when called. -***********************************************************************/ -#define PR_BEGIN_MACRO do { -#define PR_END_MACRO } while (0) - -/*********************************************************************** -** MACROS: PR_BEGIN_EXTERN_C -** PR_END_EXTERN_C -** DESCRIPTION: -** Macro shorthands for conditional C++ extern block delimiters. -***********************************************************************/ -#ifdef __cplusplus -#define PR_BEGIN_EXTERN_C extern "C" { -#define PR_END_EXTERN_C } -#else -#define PR_BEGIN_EXTERN_C -#define PR_END_EXTERN_C -#endif - -/*********************************************************************** -** MACROS: PR_BIT -** PR_BITMASK -** DESCRIPTION: -** Bit masking macros. XXX n must be <= 31 to be portable -***********************************************************************/ -#define PR_BIT(n) ((PRUint32)1 << (n)) -#define PR_BITMASK(n) (PR_BIT(n) - 1) - -/*********************************************************************** -** MACROS: PR_ROUNDUP -** PR_MIN -** PR_MAX -** PR_ABS -** DESCRIPTION: -** Commonly used macros for operations on compatible types. -***********************************************************************/ -#define PR_ROUNDUP(x,y) ((((x)+((y)-1))/(y))*(y)) -#define PR_MIN(x,y) ((x)<(y)?(x):(y)) -#define PR_MAX(x,y) ((x)>(y)?(x):(y)) -#define PR_ABS(x) ((x)<0?-(x):(x)) - -PR_BEGIN_EXTERN_C - -/************************************************************************ -** TYPES: PRUint8 -** PRInt8 -** DESCRIPTION: -** The int8 types are known to be 8 bits each. There is no type that -** is equivalent to a plain "char". -************************************************************************/ -#if PR_BYTES_PER_BYTE == 1 -typedef unsigned char PRUint8; -/* -** Some cfront-based C++ compilers do not like 'signed char' and -** issue the warning message: -** warning: "signed" not implemented (ignored) -** For these compilers, we have to define PRInt8 as plain 'char'. -** Make sure that plain 'char' is indeed signed under these compilers. -*/ -#if (defined(HPUX) && defined(__cplusplus) \ - && !defined(__GNUC__) && __cplusplus < 199707L) \ - || (defined(SCO) && defined(__cplusplus) \ - && !defined(__GNUC__) && __cplusplus == 1L) -typedef char PRInt8; -#else -typedef signed char PRInt8; -#endif -#else -#error No suitable type for PRInt8/PRUint8 -#endif - -/************************************************************************ - * MACROS: PR_INT8_MAX - * PR_INT8_MIN - * PR_UINT8_MAX - * DESCRIPTION: - * The maximum and minimum values of a PRInt8 or PRUint8. -************************************************************************/ - -#define PR_INT8_MAX 127 -#define PR_INT8_MIN (-128) -#define PR_UINT8_MAX 255U - -/************************************************************************ -** TYPES: PRUint16 -** PRInt16 -** DESCRIPTION: -** The int16 types are known to be 16 bits each. -************************************************************************/ -#if PR_BYTES_PER_SHORT == 2 -typedef unsigned short PRUint16; -typedef short PRInt16; -#else -#error No suitable type for PRInt16/PRUint16 -#endif - -/************************************************************************ - * MACROS: PR_INT16_MAX - * PR_INT16_MIN - * PR_UINT16_MAX - * DESCRIPTION: - * The maximum and minimum values of a PRInt16 or PRUint16. -************************************************************************/ - -#define PR_INT16_MAX 32767 -#define PR_INT16_MIN (-32768) -#define PR_UINT16_MAX 65535U - -/************************************************************************ -** TYPES: PRUint32 -** PRInt32 -** DESCRIPTION: -** The int32 types are known to be 32 bits each. -************************************************************************/ -#if PR_BYTES_PER_INT == 4 -typedef unsigned int PRUint32; -typedef int PRInt32; -#define PR_INT32(x) x -#define PR_UINT32(x) x ## U -#elif PR_BYTES_PER_LONG == 4 -typedef unsigned long PRUint32; -typedef long PRInt32; -#define PR_INT32(x) x ## L -#define PR_UINT32(x) x ## UL -#else -#error No suitable type for PRInt32/PRUint32 -#endif - -/************************************************************************ - * MACROS: PR_INT32_MAX - * PR_INT32_MIN - * PR_UINT32_MAX - * DESCRIPTION: - * The maximum and minimum values of a PRInt32 or PRUint32. -************************************************************************/ - -#define PR_INT32_MAX PR_INT32(2147483647) -#define PR_INT32_MIN (-PR_INT32_MAX - 1) -#define PR_UINT32_MAX PR_UINT32(4294967295) - -/************************************************************************ -** TYPES: PRUint64 -** PRInt64 -** DESCRIPTION: -** The int64 types are known to be 64 bits each. Care must be used when -** declaring variables of type PRUint64 or PRInt64. Different hardware -** architectures and even different compilers have varying support for -** 64 bit values. The only guaranteed portability requires the use of -** the LL_ macros (see prlong.h). -************************************************************************/ -#ifdef HAVE_LONG_LONG -#if PR_BYTES_PER_LONG == 8 -typedef long PRInt64; -typedef unsigned long PRUint64; -#elif defined(WIN16) -typedef __int64 PRInt64; -typedef unsigned __int64 PRUint64; -#elif defined(WIN32) && !defined(__GNUC__) -typedef __int64 PRInt64; -typedef unsigned __int64 PRUint64; -#else -typedef long long PRInt64; -typedef unsigned long long PRUint64; -#endif /* PR_BYTES_PER_LONG == 8 */ -#else /* !HAVE_LONG_LONG */ -typedef struct { -#ifdef IS_LITTLE_ENDIAN - PRUint32 lo, hi; -#else - PRUint32 hi, lo; -#endif -} PRInt64; -typedef PRInt64 PRUint64; -#endif /* !HAVE_LONG_LONG */ - -/************************************************************************ -** TYPES: PRUintn -** PRIntn -** DESCRIPTION: -** The PRIntn types are most appropriate for automatic variables. They are -** guaranteed to be at least 16 bits, though various architectures may -** define them to be wider (e.g., 32 or even 64 bits). These types are -** never valid for fields of a structure. -************************************************************************/ -#if PR_BYTES_PER_INT >= 2 -typedef int PRIntn; -typedef unsigned int PRUintn; -#else -#error 'sizeof(int)' not sufficient for platform use -#endif - -/************************************************************************ -** TYPES: PRFloat64 -** DESCRIPTION: -** NSPR's floating point type is always 64 bits. -************************************************************************/ -typedef double PRFloat64; - -/************************************************************************ -** TYPES: PRSize -** DESCRIPTION: -** A type for representing the size of objects. -************************************************************************/ -typedef size_t PRSize; - - -/************************************************************************ -** TYPES: PROffset32, PROffset64 -** DESCRIPTION: -** A type for representing byte offsets from some location. -************************************************************************/ -typedef PRInt32 PROffset32; -typedef PRInt64 PROffset64; - -/************************************************************************ -** TYPES: PRPtrDiff -** DESCRIPTION: -** A type for pointer difference. Variables of this type are suitable -** for storing a pointer or pointer subtraction. -************************************************************************/ -typedef ptrdiff_t PRPtrdiff; - -/************************************************************************ -** TYPES: PRUptrdiff -** DESCRIPTION: -** A type for pointer difference. Variables of this type are suitable -** for storing a pointer or pointer sutraction. -************************************************************************/ -#ifdef _WIN64 -typedef unsigned __int64 PRUptrdiff; -#else -typedef unsigned long PRUptrdiff; -#endif - -/************************************************************************ -** TYPES: PRBool -** DESCRIPTION: -** Use PRBool for variables and parameter types. Use PR_FALSE and PR_TRUE -** for clarity of target type in assignments and actual arguments. Use -** 'if (bool)', 'while (!bool)', '(bool) ? x : y' etc., to test booleans -** just as you would C int-valued conditions. -************************************************************************/ -typedef PRIntn PRBool; -#define PR_TRUE 1 -#define PR_FALSE 0 - -/************************************************************************ -** TYPES: PRPackedBool -** DESCRIPTION: -** Use PRPackedBool within structs where bitfields are not desirable -** but minimum and consistant overhead matters. -************************************************************************/ -typedef PRUint8 PRPackedBool; - -/* -** Status code used by some routines that have a single point of failure or -** special status return. -*/ -typedef enum { PR_FAILURE = -1, PR_SUCCESS = 0 } PRStatus; - -#ifndef __PRUNICHAR__ -#define __PRUNICHAR__ -#if defined(WIN32) || defined(XP_MAC) -typedef wchar_t PRUnichar; -#else -typedef PRUint16 PRUnichar; -#endif -#endif - -/* -** WARNING: The undocumented data types PRWord and PRUword are -** only used in the garbage collection and arena code. Do not -** use PRWord and PRUword in new code. -** -** A PRWord is an integer that is the same size as a void*. -** It implements the notion of a "word" in the Java Virtual -** Machine. (See Sec. 3.4 "Words", The Java Virtual Machine -** Specification, Addison-Wesley, September 1996. -** http://java.sun.com/docs/books/vmspec/index.html.) -*/ -#ifdef _WIN64 -typedef __int64 PRWord; -typedef unsigned __int64 PRUword; -#else -typedef long PRWord; -typedef unsigned long PRUword; -#endif - -#if defined(NO_NSPR_10_SUPPORT) -#else -/********* ???????????????? FIX ME ??????????????????????????? *****/ -/********************** Some old definitions until pr=>ds transition is done ***/ -/********************** Also, we are still using NSPR 1.0. GC ******************/ -/* -** Fundamental NSPR macros, used nearly everywhere. -*/ - -#define PR_PUBLIC_API PR_IMPLEMENT - -/* -** Macro body brackets so that macros with compound statement definitions -** behave syntactically more like functions when called. -*/ -#define NSPR_BEGIN_MACRO do { -#define NSPR_END_MACRO } while (0) - -/* -** Macro shorthands for conditional C++ extern block delimiters. -*/ -#ifdef NSPR_BEGIN_EXTERN_C -#undef NSPR_BEGIN_EXTERN_C -#endif -#ifdef NSPR_END_EXTERN_C -#undef NSPR_END_EXTERN_C -#endif - -#ifdef __cplusplus -#define NSPR_BEGIN_EXTERN_C extern "C" { -#define NSPR_END_EXTERN_C } -#else -#define NSPR_BEGIN_EXTERN_C -#define NSPR_END_EXTERN_C -#endif - -#ifdef XP_MAC -#include "protypes.h" -#else -#include "obsolete/protypes.h" -#endif - -/********* ????????????? End Fix me ?????????????????????????????? *****/ -#endif /* NO_NSPR_10_SUPPORT */ - -PR_END_EXTERN_C - -#endif /* prtypes_h___ */ - diff --git a/Templates/Empty/web/source/npplugin/windows/resource.h b/Templates/Empty/web/source/npplugin/windows/resource.h deleted file mode 100644 index 18aed9c93..000000000 --- a/Templates/Empty/web/source/npplugin/windows/resource.h +++ /dev/null @@ -1,15 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by webgameplugin.rc -// - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 101 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1001 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/Templates/Full/game/Full.torsion.opt b/Templates/Full/game/Full.torsion.opt new file mode 100644 index 000000000..f41687c47 --- /dev/null +++ b/Templates/Full/game/Full.torsion.opt @@ -0,0 +1,20 @@ + +
127.0.0.1
+password +6060 +Debug + + + +art\main.cs +core\main.cs +..\..\Empty\game\core\main.cs +..\..\BaseGame\game\core\main.cs +core\scripts\client\postFx\MLAA.cs +core\scripts\client\postFx\ssao.cs +core\scripts\client\postFx\hdr.cs +core\scripts\client\postFx\dof.cs +core\scripts\client\postFx\caustics.cs +..\..\..\..\..\RnDBuildTest\My Projects\RnDTest\game\modules\TheFactory\components\FakeGISpotlight.cs + +
diff --git a/Templates/Full/game/core/main.cs b/Templates/Full/game/core/main.cs index f666c948c..9888fa4de 100644 --- a/Templates/Full/game/core/main.cs +++ b/Templates/Full/game/core/main.cs @@ -28,6 +28,12 @@ $WORD::BITDEPTH = 3; $WORD::REFRESH = 4; $WORD::AA = 5; +//We need to hook the missing/warn material stuff early, so do it here +$Core::MissingTexturePath = "core/art/missingTexture"; +$Core::UnAvailableTexturePath = "core/art/unavailable"; +$Core::WarningTexturePath = "core/art/warnMat"; +$Core::CommonShaderPath = "shaders/common"; + //--------------------------------------------------------------------------------------------- // CorePackage // Adds functionality for this mod to some standard functions. diff --git a/Templates/Full/game/core/scripts/client/postFx/MLAA.cs b/Templates/Full/game/core/scripts/client/postFx/MLAA.cs index f1656fb51..e09f45a3c 100644 --- a/Templates/Full/game/core/scripts/client/postFx/MLAA.cs +++ b/Templates/Full/game/core/scripts/client/postFx/MLAA.cs @@ -162,7 +162,7 @@ singleton PostEffect( MLAAFx ) texture[0] = "$inTex"; // Edges mask texture[1] = "$inTex"; // Edges mask - texture[2] = "AreaMap33.dds"; + texture[2] = "./AreaMap33.dds"; }; new PostEffect() diff --git a/Templates/Full/game/core/scripts/client/postFx/caustics.cs b/Templates/Full/game/core/scripts/client/postFx/caustics.cs index a712ef82a..7d598347e 100644 --- a/Templates/Full/game/core/scripts/client/postFx/caustics.cs +++ b/Templates/Full/game/core/scripts/client/postFx/caustics.cs @@ -58,7 +58,7 @@ singleton PostEffect( CausticsPFX ) shader = PFX_CausticsShader; stateBlock = PFX_CausticsStateBlock; texture[0] = "#prepass"; - texture[1] = "textures/caustics_1"; - texture[2] = "textures/caustics_2"; + texture[1] = "./textures/caustics_1"; + texture[2] = "./textures/caustics_2"; target = "$backBuffer"; }; diff --git a/Templates/Full/game/core/scripts/client/postFx/ssao.cs b/Templates/Full/game/core/scripts/client/postFx/ssao.cs index 063cee087..09dfa6bb4 100644 --- a/Templates/Full/game/core/scripts/client/postFx/ssao.cs +++ b/Templates/Full/game/core/scripts/client/postFx/ssao.cs @@ -200,7 +200,7 @@ singleton PostEffect( SSAOPostFx ) stateBlock = SSAOStateBlock; texture[0] = "#prepass"; - texture[1] = "noise.png"; + texture[1] = "./noise.png"; texture[2] = "#ssao_pow_table"; target = "$outTex"; diff --git a/Templates/Full/game/shaders/procedural/.gitignore b/Templates/Full/game/shaders/procedural/.gitignore deleted file mode 100644 index 1bc0e838a..000000000 --- a/Templates/Full/game/shaders/procedural/.gitignore +++ /dev/null @@ -1 +0,0 @@ -# Keep directory in git repo diff --git a/Templates/Full/game/tools/worldEditor/gui/ObjectSnapOptionsWindow.ed.gui b/Templates/Full/game/tools/worldEditor/gui/ObjectSnapOptionsWindow.ed.gui index 24f5c8172..64332f8a3 100644 --- a/Templates/Full/game/tools/worldEditor/gui/ObjectSnapOptionsWindow.ed.gui +++ b/Templates/Full/game/tools/worldEditor/gui/ObjectSnapOptionsWindow.ed.gui @@ -28,7 +28,7 @@ canMinimize = "0"; canMaximize = "0"; position = "400 31"; - extent =" 175 257"; + extent =" 175 267"; MinExtent = "175 130"; text = "Snap Options"; closeCommand = "ESnapOptions.hideDialog();"; @@ -51,7 +51,7 @@ Visible = "1"; hovertime = "1000"; Docking = "Client"; - Margin = "3 22 3 3"; + Margin = "3 32 3 3"; Padding = "0 0 0 0"; AnchorTop = "1"; AnchorBottom = "0"; @@ -793,6 +793,25 @@ canSave = "1"; canSaveDynamicFields = "0"; }; + new GuiCheckBoxCtrl() { + text = "Use Group Center"; + groupNum = "1"; + useMouseEvents = "0"; + isContainer = "0"; + horizSizing = "right"; + vertSizing = "top"; + position = "4 246"; + extent = "105 24"; + minExtent = "8 8"; + visible = "1"; + active = "1"; + command = "toggleSnappingOptions(\"byGroup\");"; + tooltipProfile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "GroupSnapButton"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; new GuiTextCtrl() { text = "Size"; maxLength = "1024"; diff --git a/Templates/Full/game/tools/worldEditor/scripts/EditorGui.ed.cs b/Templates/Full/game/tools/worldEditor/scripts/EditorGui.ed.cs index 31f794d17..bc1905292 100644 --- a/Templates/Full/game/tools/worldEditor/scripts/EditorGui.ed.cs +++ b/Templates/Full/game/tools/worldEditor/scripts/EditorGui.ed.cs @@ -2050,12 +2050,14 @@ function EWorldEditor::syncGui( %this ) EWorldEditorToolbar-->renderHandleBtn.setStateOn( EWorldEditor.renderObjHandle ); EWorldEditorToolbar-->renderTextBtn.setStateOn( EWorldEditor.renderObjText ); + EWorldEditorToolbar-->objectSnapDownBtn.setStateOn( %this.stickToGround ); SnapToBar-->objectSnapBtn.setStateOn( EWorldEditor.getSoftSnap() ); EWorldEditorToolbar-->softSnapSizeTextEdit.setText( EWorldEditor.getSoftSnapSize() ); ESnapOptions-->SnapSize.setText( EWorldEditor.getSoftSnapSize() ); ESnapOptions-->GridSize.setText( EWorldEditor.getGridSize() ); ESnapOptions-->GridSnapButton.setStateOn( %this.getGridSnap() ); + ESnapOptions-->GroupSnapButton.setStateOn( %this.UseGroupCenter ); SnapToBar-->objectGridSnapBtn.setStateOn( %this.getGridSnap() ); ESnapOptions-->NoSnapButton.setStateOn( !%this.stickToGround && !%this.getSoftSnap() && !%this.getGridSnap() ); } @@ -2458,6 +2460,11 @@ function toggleSnappingOptions( %var ) { EWorldEditor.setGridSnap( !EWorldEditor.getGridSnap() ); } + else if( %var $= "byGroup" ) + { + EWorldEditor.UseGroupCenter = !EWorldEditor.UseGroupCenter; + ESnapOptions->GroupSnapButton.setStateOn(EWorldEditor.UseGroupCenter); + } else { // No snapping. diff --git a/Templates/Full/game/tools/worldEditor/scripts/menus.ed.cs b/Templates/Full/game/tools/worldEditor/scripts/menus.ed.cs index be068b9ed..dbe978cab 100644 --- a/Templates/Full/game/tools/worldEditor/scripts/menus.ed.cs +++ b/Templates/Full/game/tools/worldEditor/scripts/menus.ed.cs @@ -315,6 +315,7 @@ function EditorGui::buildMenus(%this) item[5] = "at Centroid" TAB "" TAB "atCentroid"; item[6] = "to Terrain" TAB "" TAB "toTerrain"; item[7] = "Below Selection" TAB "" TAB "belowSelection"; + item[8] = "At Gizmo" TAB "" TAB "atGizmo"; }; %this.alignBoundsMenu = new PopupMenu() diff --git a/Tools/CMake/template.torsion.in b/Tools/CMake/template.torsion.in index f832ad13b..a1eeab78e 100644 --- a/Tools/CMake/template.torsion.in +++ b/Tools/CMake/template.torsion.in @@ -9,9 +9,10 @@ art levels shaders +data tools -cs; gui +cs; gui; taml; module; Release @@ -24,7 +25,7 @@ Debug -@TORQUE_APP_NAME@.exe +@TORQUE_APP_NAME@_Debug.exe true true diff --git a/Tools/CMake/torque3d.cmake b/Tools/CMake/torque3d.cmake index e934e37b4..5b9654dbf 100644 --- a/Tools/CMake/torque3d.cmake +++ b/Tools/CMake/torque3d.cmake @@ -624,7 +624,7 @@ endif() if(NOT EXISTS "${projectOutDir}/${PROJECT_NAME}.torsion") CONFIGURE_FILE("${cmakeDir}/template.torsion.in" "${projectOutDir}/${PROJECT_NAME}.torsion") endif() -if(EXISTS "${CMAKE_SOURCE_DIR}/Templates/${TORQUE_TEMPLATE}/game/main.cs.in" AND NOT EXISTS "${projectOutDir}/main.cs") +if(EXISTS "${CMAKE_SOURCE_DIR}/Templates/${TORQUE_TEMPLATE}/game/main.cs.in") CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/Templates/${TORQUE_TEMPLATE}/game/main.cs.in" "${projectOutDir}/main.cs") endif() if(WIN32)