|
From: <cn...@us...> - 2009-11-03 08:24:51
|
Revision: 596
http://hgengine.svn.sourceforge.net/hgengine/?rev=596&view=rev
Author: cnlohr
Date: 2009-11-03 08:24:44 +0000 (Tue, 03 Nov 2009)
Log Message:
-----------
take advantage of new asset statechanger. Greatly increase quality of TextPlate.
Modified Paths:
--------------
Mercury2/Themes/default/File/scenegraph.xml
Mercury2/adv_set.c
Mercury2/modules/TextPlate.cpp
Mercury2/modules/TextPlate.h
Mercury2/src/MercuryAsset.cpp
Mercury2/src/MercuryAsset.h
Mercury2/src/Quad.cpp
Mercury2/src/Quad.h
Modified: Mercury2/Themes/default/File/scenegraph.xml
===================================================================
--- Mercury2/Themes/default/File/scenegraph.xml 2009-11-03 08:21:44 UTC (rev 595)
+++ Mercury2/Themes/default/File/scenegraph.xml 2009-11-03 08:24:44 UTC (rev 596)
@@ -1,8 +1,12 @@
<SceneGraph name="root">
+ <!--We have to put all states that are the generic state up here. This way, the states will fall back to these -->
+ <asset type="StateChanger" file="ColorChange:1,1,1,1" />
<node type="viewport" fov="45" aspect="1.3333" near="0.01" far="100" name="vp">
<node type="cameranode" movx="0" movz="0" movy="0" rotx="0" roty="0" rotz="0" name="camera">
- <node type="transformnode" movz="-5" movy="2">
- <node type="TextPlate" text="test font 123 HELLO WORLD!!! WOOT!" font="FONT:FreeSans.hgfont" size=".01" width="400" alphaPath="true" billboardaxis="0,-1,0" offset="-2,0,0" spheremode="false" />
+ <node type="transformnode" movz="-5" movy=".2">
+ <node type="TextPlate" text="x=3.14159" font="FONT:FreeSans.hgfont" size=".002" alphaPath="true" billboardaxis="0,-1,0" spheremode="false" alignment="CENTER" >
+ <asset type="StateChanger" file="ColorChange:0,0,0,1" />
+ </node>
</node>
<node type="transformnode" movz="-5" movx="-4" movy="2">
<node type="TextNode" text="Another test!" font="FONT:FreeMonoBold.hgfont" size=".01" width="300" alphaPath="true" alignment="LEFT" />
@@ -20,6 +24,7 @@
</node>
<node type="billboardnode" billboardaxis="0,-1,0" spheremode="true" >
<node type="transformnode" scalex="0.1" scaley="0.1" alphaPath="true">
+ <asset type="StateChanger" file="ColorChange:1,0,1,1" />
<asset type="texture" file="GRAPHIC:flame.png"/>
<asset type="quad"/>
</node>
Modified: Mercury2/adv_set.c
===================================================================
--- Mercury2/adv_set.c 2009-11-03 08:21:44 UTC (rev 595)
+++ Mercury2/adv_set.c 2009-11-03 08:24:44 UTC (rev 596)
@@ -14,7 +14,7 @@
src/Camera.cpp src/MercuryInput.cpp src/MQuaternion.cpp src/ModuleManager.cpp src/MercuryFBO.cpp \
src/GLHelpers.cpp src/FullscreenQuad.cpp src/MercuryNamedResource.cpp src/MercuryPrefs.cpp \
src/MercuryTheme.cpp src/Orthographic.cpp src/Light.cpp src/RenderDifferedLights.cpp \
- src/MercuryLog.cpp src/MercuryCTA.cpp src/DataTypes/MTriangle.cpp"
+ src/MercuryLog.cpp src/MercuryCTA.cpp src/DataTypes/MTriangle.cpp src/StateChanger.cpp"
SOURCES="$SOURCES src/MercuryFileDriverDirect.cpp src/MercuryFileDriverMem.cpp \
src/MercuryFileDriverPacked.cpp src/MercuryFileDriverZipped.cpp"
Modified: Mercury2/modules/TextPlate.cpp
===================================================================
--- Mercury2/modules/TextPlate.cpp 2009-11-03 08:21:44 UTC (rev 595)
+++ Mercury2/modules/TextPlate.cpp 2009-11-03 08:24:44 UTC (rev 596)
@@ -2,6 +2,9 @@
#include <TextNode.h>
#include <MercuryVertex.h>
#include <Viewport.h>
+#include <Quad.h>
+#include <GLHeaders.h>
+#include <StateChanger.h>
REGISTER_NODE_TYPE(TextPlate);
@@ -10,6 +13,13 @@
{
m_TextNode = (TextNode*)NODEFACTORY.Generate( "TextNode" );
AddChild( m_TextNode );
+
+ m_BackgroundColor = ASSETFACTORY.Generate( "StateChanger", "ColorChange:1,1,0,1" );
+ ((StateChanger*)m_BackgroundColor.Ptr())->LoadFromString( "ColorChange:1,1,0,1" );
+ AddAsset( m_BackgroundColor );
+
+ m_BackPlane = ASSETFACTORY.Generate( "Quad", "TBQ" );
+ AddAsset( m_BackPlane );
}
void TextPlate::Update(float dTime)
@@ -18,7 +28,6 @@
m_billboardMatrix.Translate( m_fvOffset );
}
-
void TextPlate::SaveToXML( MString & sXMLStream, int depth )
{
sXMLStream += ssprintf( "%*c<node ", depth*3, 32 );
@@ -43,8 +52,23 @@
if ( !node.Attribute("offset").empty() )
m_fvOffset = MercuryVector::CreateFromString( node.Attribute("offset") );
m_TextNode->LoadFromXML(node);
+ if ( !node.Attribute("text").empty() )
+ SetText( node.Attribute("text") );
}
+void TextPlate::SetText( const MString & sText )
+{
+ m_TextNode->SetText(sText);
+ m_TextNode->RenderText();
+
+ ((Quad*)m_BackPlane.Ptr())->LoadFromString( ssprintf( "%f,%f,%f,%f,-.01",
+ m_TextNode->GetRMinX() * 1.1 ,
+ m_TextNode->GetRMinY() * 1.1 ,
+ m_TextNode->GetRMaxX() * 1.1 ,
+ m_TextNode->GetRMaxY() * 1.1 ) );
+}
+
+
/****************************************************************************
* Copyright (C) 2009 by Charles Lohr *
* *
Modified: Mercury2/modules/TextPlate.h
===================================================================
--- Mercury2/modules/TextPlate.h 2009-11-03 08:21:44 UTC (rev 595)
+++ Mercury2/modules/TextPlate.h 2009-11-03 08:24:44 UTC (rev 596)
@@ -6,6 +6,8 @@
#include <MercuryVertex.h>
class TextNode;
+class Quad;
+class StateChanger;
class TextPlate : public BillboardNode
{
@@ -18,10 +20,14 @@
virtual void SaveToXML( MString & sXMLStream, int depth = 0 );
virtual void SaveToXMLTag( MString & sXMLStream );
+ void SetText( const MString & sText );
+
GENRTTI(TextPlate);
private:
MercuryVector m_fvOffset;
TextNode * m_TextNode;
+ MAutoPtr< MercuryAsset > m_BackgroundColor;
+ MAutoPtr< MercuryAsset > m_BackPlane;
};
#endif
@@ -58,3 +64,4 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE *
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
***************************************************************************/
+
Modified: Mercury2/src/MercuryAsset.cpp
===================================================================
--- Mercury2/src/MercuryAsset.cpp 2009-11-03 08:21:44 UTC (rev 595)
+++ Mercury2/src/MercuryAsset.cpp 2009-11-03 08:24:44 UTC (rev 596)
@@ -138,10 +138,10 @@
MAutoPtr<MercuryAsset> AssetFactory::Generate(const MString& type, const MString& key)
{
MString t = ToUpper( type );
-
+
MercuryAsset *asset = LocateAsset(t+key);
if ( asset ) return asset;
-
+
std::list< std::pair< MString, Callback0R< MAutoPtr<MercuryAsset> > > >::iterator i;
for (i = m_factoryCallbacks.begin(); i != m_factoryCallbacks.end(); ++i)
if (i->first == t) return i->second();
@@ -163,26 +163,36 @@
MHash< MercuryAsset*> AssetFactory::m_assetInstances;
-/***************************************************************************
- * Copyright (C) 2008 by Joshua Allen *
- * *
- * *
- * All rights reserved. *
- * *
- * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: *
- * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. *
- * * 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. *
- * * Neither the name of the <ORGANIZATION> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. *
- * *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT OWNER OR *
- * 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. *
+/****************************************************************************
+ * Copyright (C) 2009 - 2009 by Joshua Allen *
+ * Charles Lohr *
+ * *
+ * *
+ * All rights reserved. *
+ * *
+ * Redistribution and use in source and binary forms, with or without *
+ * modification, are permitted provided that the following conditions *
+ * are met: *
+ * * Redistributions of source code must retain the above copyright *
+ * notice, this list of conditions and the following disclaimer. *
+ * * 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. *
+ * * Neither the name of the Mercury Engine nor the names of its *
+ * contributors may be used to endorse or promote products derived *
+ * from this software without specific prior written permission. *
+ * *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT *
+ * OWNER OR 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. *
***************************************************************************/
+
Modified: Mercury2/src/MercuryAsset.h
===================================================================
--- Mercury2/src/MercuryAsset.h 2009-11-03 08:21:44 UTC (rev 595)
+++ Mercury2/src/MercuryAsset.h 2009-11-03 08:24:44 UTC (rev 596)
@@ -152,6 +152,8 @@
};
+#define ASSETFACTORY (AssetFactory::GetInstance())
+
static InstanceCounter<AssetFactory> AFcounter("AssetFactory");
#define REGISTER_ASSET_TYPE(class)\
@@ -170,26 +172,36 @@
#endif
-/***************************************************************************
- * Copyright (C) 2008 by Joshua Allen *
- * *
- * *
- * All rights reserved. *
- * *
- * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: *
- * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. *
- * * 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. *
- * * Neither the name of the <ORGANIZATION> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. *
- * *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT OWNER OR *
- * 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. *
+/****************************************************************************
+ * Copyright (C) 2009 - 2009 by Joshua Allen *
+ * Charles Lohr *
+ * *
+ * *
+ * All rights reserved. *
+ * *
+ * Redistribution and use in source and binary forms, with or without *
+ * modification, are permitted provided that the following conditions *
+ * are met: *
+ * * Redistributions of source code must retain the above copyright *
+ * notice, this list of conditions and the following disclaimer. *
+ * * 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. *
+ * * Neither the name of the Mercury Engine nor the names of its *
+ * contributors may be used to endorse or promote products derived *
+ * from this software without specific prior written permission. *
+ * *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT *
+ * OWNER OR 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. *
***************************************************************************/
+
Modified: Mercury2/src/Quad.cpp
===================================================================
--- Mercury2/src/Quad.cpp 2009-11-03 08:21:44 UTC (rev 595)
+++ Mercury2/src/Quad.cpp 2009-11-03 08:24:44 UTC (rev 596)
@@ -8,8 +8,74 @@
Quad::Quad()
:MercuryVBO()
{
+}
+
+Quad::~Quad()
+{
+ REMOVE_ASSET_INSTANCE(Quad,m_path);
+}
+
+Quad* Quad::Generate()
+{
+ Quad *asset = new Quad();
+ ADD_ASSET_INSTANCE(Quad,"",asset);
+ return asset;
+}
+
+void Quad::LoadFromXML(const XMLNode& node)
+{
+ LoadFromString( node.Attribute("file") );
+
+ MercuryAsset::LoadFromXML( node );
+}
+
+
+
+bool Quad::LoadFromString( const MString & sDescription )
+{
+ float lX = -0.5;
+ float lY = -0.5;
+ float hX = 0.5;
+ float hY = 0.5;
+ float zp = 0;
+ bool bResetRegistration = sDescription != m_path;
+
AllocateIndexSpace(6);
AllocateVertexSpace(4);
+
+ if( bResetRegistration )
+ REMOVE_ASSET_INSTANCE(Quad,m_path);
+ m_path = sDescription;
+ if( bResetRegistration )
+ ADD_ASSET_INSTANCE(Quad,m_path,this);
+
+ MVector< MString > vsDescription;
+ SplitStrings( sDescription, vsDescription, ",", " ", 1, 1 );
+
+ if( vsDescription.size() == 0 )
+ {
+ //Do nothing
+ }
+ else if( vsDescription.size() == 2 )
+ {
+ lX = 0;
+ lY = 0;
+ hX = StrToFloat( vsDescription[0] );
+ hY = StrToFloat( vsDescription[1] );
+ }
+ else if( vsDescription.size() == 4 || vsDescription.size() == 5 )
+ {
+ lX = StrToFloat( vsDescription[0] );
+ lY = StrToFloat( vsDescription[1] );
+ hX = StrToFloat( vsDescription[2] );
+ hY = StrToFloat( vsDescription[3] );
+ if( vsDescription.size() == 5 )
+ zp = StrToFloat( vsDescription[4] );
+ }
+ else
+ {
+ LOG.Write( ssprintf( "Invalid number of parameters passed into new Quad: \"%s\"", sDescription.c_str() ) );
+ }
// float* buffer = m_vertexData.m_vertexData();
int i = 0;
@@ -18,59 +84,62 @@
//this makes it so FBO images render correctly right out of the buffer, no flip needed
m_vertexData[i++] = 0; m_vertexData[i++] = 0;
m_vertexData[i++] = 0; m_vertexData[i++] = 0; m_vertexData[i++] = -1.0;
- m_vertexData[i++] = -0.5; m_vertexData[i++] = -0.5; m_vertexData[i++] = 0.0;
+ m_vertexData[i++] = lX; m_vertexData[i++] = lY; m_vertexData[i++] = zp;
m_vertexData[i++] = 1; m_vertexData[i++] = 0;
m_vertexData[i++] = 0; m_vertexData[i++] = 0; m_vertexData[i++] = -1.0;
- m_vertexData[i++] = 0.5; m_vertexData[i++] = -0.5; m_vertexData[i++] = 0.0;
+ m_vertexData[i++] = hX; m_vertexData[i++] = lY; m_vertexData[i++] = zp;
m_vertexData[i++] = 1; m_vertexData[i++] = 1;
m_vertexData[i++] = 0; m_vertexData[i++] = 0; m_vertexData[i++] = -1.0;
- m_vertexData[i++] = 0.5; m_vertexData[i++] = 0.5; m_vertexData[i++] = 0.0;
+ m_vertexData[i++] = hX; m_vertexData[i++] = hY; m_vertexData[i++] = zp;
m_vertexData[i++] = 0; m_vertexData[i++] = 1;
m_vertexData[i++] = 0; m_vertexData[i++] = 0; m_vertexData[i++] = -1.0;
- m_vertexData[i++] = -0.5; m_vertexData[i++] = 0.5; m_vertexData[i++] = 0.0;
+ m_vertexData[i++] = lX; m_vertexData[i++] = hY; m_vertexData[i++] = zp;
m_indexData[5] = m_indexData[0] = 0;
m_indexData[1] = 1;
m_indexData[3] = m_indexData[2] = 2;
m_indexData[4] = 3;
-}
-Quad::~Quad()
-{
- REMOVE_ASSET_INSTANCE(Quad,"");
-}
+ m_path = sDescription;
-Quad* Quad::Generate()
-{
- Quad *asset = new Quad();
- ADD_ASSET_INSTANCE(Quad,"",asset);
- LOG.Write( "new quad" );
- return asset;
+ return true;
}
-/***************************************************************************
- * Copyright (C) 2008 by Joshua Allen *
- * *
- * *
- * All rights reserved. *
- * *
- * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: *
- * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. *
- * * 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. *
- * * Neither the name of the <ORGANIZATION> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. *
- * *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT OWNER OR *
- * 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. *
+
+/****************************************************************************
+ * Copyright (C) 2009 - 2009 by Joshua Allen *
+ * Charles Lohr *
+ * *
+ * *
+ * All rights reserved. *
+ * *
+ * Redistribution and use in source and binary forms, with or without *
+ * modification, are permitted provided that the following conditions *
+ * are met: *
+ * * Redistributions of source code must retain the above copyright *
+ * notice, this list of conditions and the following disclaimer. *
+ * * 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. *
+ * * Neither the name of the Mercury Engine nor the names of its *
+ * contributors may be used to endorse or promote products derived *
+ * from this software without specific prior written permission. *
+ * *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT *
+ * OWNER OR 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. *
***************************************************************************/
+
+
Modified: Mercury2/src/Quad.h
===================================================================
--- Mercury2/src/Quad.h 2009-11-03 08:21:44 UTC (rev 595)
+++ Mercury2/src/Quad.h 2009-11-03 08:24:44 UTC (rev 596)
@@ -10,6 +10,9 @@
Quad();
~Quad();
+ void LoadFromXML(const XMLNode& node );
+ bool LoadFromString( const MString & sDescription );
+
static Quad* Generate();
GENRTTI( Quad );
private:
@@ -17,26 +20,36 @@
#endif
-/***************************************************************************
- * Copyright (C) 2008 by Joshua Allen *
- * *
- * *
- * All rights reserved. *
- * *
- * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: *
- * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. *
- * * 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. *
- * * Neither the name of the <ORGANIZATION> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. *
- * *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT OWNER OR *
- * 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. *
+/****************************************************************************
+ * Copyright (C) 2009 - 2009 by Joshua Allen *
+ * Charles Lohr *
+ * *
+ * *
+ * All rights reserved. *
+ * *
+ * Redistribution and use in source and binary forms, with or without *
+ * modification, are permitted provided that the following conditions *
+ * are met: *
+ * * Redistributions of source code must retain the above copyright *
+ * notice, this list of conditions and the following disclaimer. *
+ * * 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. *
+ * * Neither the name of the Mercury Engine nor the names of its *
+ * contributors may be used to endorse or promote products derived *
+ * from this software without specific prior written permission. *
+ * *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT *
+ * OWNER OR 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. *
***************************************************************************/
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|