yake-svn Mailing List for Yake Engine (Page 19)
Status: Beta
Brought to you by:
psyclonist
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(17) |
Sep
(51) |
Oct
(2) |
Nov
(18) |
Dec
(66) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(44) |
Feb
(13) |
Mar
(73) |
Apr
(61) |
May
|
Jun
(4) |
Jul
(19) |
Aug
(50) |
Sep
(47) |
Oct
(7) |
Nov
(7) |
Dec
(14) |
2008 |
Jan
(2) |
Feb
|
Mar
(4) |
Apr
(4) |
May
(5) |
Jun
(7) |
Jul
(4) |
Aug
|
Sep
(5) |
Oct
|
Nov
(1) |
Dec
(4) |
2009 |
Jan
|
Feb
(22) |
Mar
(12) |
Apr
(1) |
May
(1) |
Jun
(4) |
Jul
(4) |
Aug
|
Sep
|
Oct
(17) |
Nov
(3) |
Dec
|
2010 |
Jan
|
Feb
|
Mar
(12) |
Apr
(11) |
May
|
Jun
(5) |
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <psy...@us...> - 2007-01-15 18:10:20
|
Revision: 1587 http://svn.sourceforge.net/yake/?rev=1587&view=rev Author: psyclonist Date: 2007-01-15 10:06:35 -0800 (Mon, 15 Jan 2007) Log Message: ----------- added IBody::translateMass(), provided implementation for "old force API" (#0000010), Modified Paths: -------------- trunk/yake/src/plugins/physicsODE/OdeBody.cpp trunk/yake/yake/physics/yakePhysicsBody.h trunk/yake/yake/physics/yakePhysicsPrerequisites.h trunk/yake/yake/plugins/physicsODE/OdeBody.h Modified: trunk/yake/src/plugins/physicsODE/OdeBody.cpp =================================================================== --- trunk/yake/src/plugins/physicsODE/OdeBody.cpp 2007-01-10 19:48:12 UTC (rev 1586) +++ trunk/yake/src/plugins/physicsODE/OdeBody.cpp 2007-01-15 18:06:35 UTC (rev 1587) @@ -307,6 +307,14 @@ } //----------------------------------------------------- + void OdeBody::translateMass( const Vector3& offset ) + { + YAKE_ASSERT( mOdeBody ).debug("need a valid body object"); + dMassTranslate( &mMass, offset.x, offset.y, offset.z ); + mOdeBody->setMass( &mMass ); + } + + //----------------------------------------------------- dBody* OdeBody::_getOdeBody() const { return mOdeBody; @@ -384,6 +392,40 @@ ++it; } } +#if defined(YAKE_PHYSICS_OLD_FORCE_API) + void OdeBody::addForce( const math::Vector3& rForce ) + { + this->addForce( Force(rForce, RF_GLOBAL) ); + } + void OdeBody::addForceAtPos( const math::Vector3& rForce, const math::Vector3& rPos ) + { + this->addForce( Force(rForce, RF_GLOBAL, rPos, RF_GLOBAL) ); + } + void OdeBody::addForceAtLocalPos( const math::Vector3& rForce, const math::Vector3& rPos ) + { + this->addForce( Force(rForce, RF_GLOBAL, rPos, RF_LOCAL) ); + } + void OdeBody::addLocalForce( const math::Vector3& rForce ) + { + this->addForce( Force(rForce, RF_LOCAL) ); + } + void OdeBody::addLocalForceAtLocalPos( const math::Vector3& rForce, const math::Vector3& rPos ) + { + this->addForce( Force(rForce, RF_LOCAL, rPos, RF_LOCAL) ); + } + void OdeBody::addLocalForceAtPos( const math::Vector3& rForce, const math::Vector3& rPos ) + { + this->addForce( Force(rForce, RF_LOCAL, rPos,RF_GLOBAL ) ); + } + void OdeBody::addTorque( const math::Vector3& rTorque ) + { + this->addTorque( Torque( rTorque, RF_GLOBAL ) ); + } + void OdeBody::addLocalTorque( const math::Vector3& rTorque ) + { + this->addTorque( Torque( rTorque, RF_LOCAL ) ); + } +#endif // YAKE_PHYSICS_OLD_FORCE_API } // physics } // yake Modified: trunk/yake/yake/physics/yakePhysicsBody.h =================================================================== --- trunk/yake/yake/physics/yakePhysicsBody.h 2007-01-10 19:48:12 UTC (rev 1586) +++ trunk/yake/yake/physics/yakePhysicsBody.h 2007-01-15 18:06:35 UTC (rev 1587) @@ -215,6 +215,10 @@ */ virtual real getMass() const = 0; + /** Translates the body's mass by the given offset. + */ + virtual void translateMass( const Vector3& offset ) = 0; + /* Get inertia tensor of the body. * */ Modified: trunk/yake/yake/physics/yakePhysicsPrerequisites.h =================================================================== --- trunk/yake/yake/physics/yakePhysicsPrerequisites.h 2007-01-10 19:48:12 UTC (rev 1586) +++ trunk/yake/yake/physics/yakePhysicsPrerequisites.h 2007-01-15 18:06:35 UTC (rev 1587) @@ -31,6 +31,13 @@ # include <yake/base/yakePrerequisites.h> #endif +// C O N F I G U R A T I O N + +//@todo move somewhere else? +//#define YAKE_PHYSICS_OLD_FORCE_API + +// -- + #if defined( YAKE_PHYSICS_EXPORTS ) # define YAKE_PHYSICS_API DLLEXPORT #else Modified: trunk/yake/yake/plugins/physicsODE/OdeBody.h =================================================================== --- trunk/yake/yake/plugins/physicsODE/OdeBody.h 2007-01-10 19:48:12 UTC (rev 1586) +++ trunk/yake/yake/plugins/physicsODE/OdeBody.h 2007-01-15 18:06:35 UTC (rev 1587) @@ -48,6 +48,7 @@ virtual real getMass() const; virtual void setMass( const MassDesc& rDesc ); virtual void addMass( const MassDesc& rDesc ); + virtual void translateMass( const Vector3& offset ); virtual math::Matrix3 getInertiaTensor() const; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-01-10 19:48:16
|
Revision: 1586 http://svn.sourceforge.net/yake/?rev=1586&view=rev Author: psyclonist Date: 2007-01-10 11:48:12 -0800 (Wed, 10 Jan 2007) Log Message: ----------- add files, fixed includes Modified Paths: -------------- trunk/yake/samples/net/roclient/ROClient.cpp trunk/yake/samples/net/roserver/ROServer.cpp Added Paths: ----------- trunk/yake/samples/net/inprocess/common.h trunk/yake/samples/net/roclient/ROClient.h trunk/yake/samples/net/roserver/ROServer.h Added: trunk/yake/samples/net/inprocess/common.h =================================================================== --- trunk/yake/samples/net/inprocess/common.h (rev 0) +++ trunk/yake/samples/net/inprocess/common.h 2007-01-10 19:48:12 UTC (rev 1586) @@ -0,0 +1,10 @@ +#ifndef YAKE_SAMPLE_NET_INPROCESS_COMMON_H +#define YAKE_SAMPLE_NET_INPROCESS_COMMON_H + +#include <yake/base/yake.h> +#include <yake/object/yakeObjects.h> +#include <yake/ent/ent.h> +#include <yake/net/net.h> +#include <yake/samples/net/common/common.h> + +#endif Modified: trunk/yake/samples/net/roclient/ROClient.cpp =================================================================== --- trunk/yake/samples/net/roclient/ROClient.cpp 2007-01-10 19:46:57 UTC (rev 1585) +++ trunk/yake/samples/net/roclient/ROClient.cpp 2007-01-10 19:48:12 UTC (rev 1586) @@ -1,10 +1,5 @@ -#include <yake/samples/net/roinprocess/pch.h> -#include <yake/base/yake.h> -#include <yake/object/yakeObjects.h> -#include <yake/ent/ent.h> -#include <yake/net/net.h> -#include <yake/samples/net/common/common.h> -#include <yake/samples/net/roclient/ROClient.h> +#include <samples/net/inprocess/common.h> +#include <samples/net/roclient/ROClient.h> namespace yake { namespace ro { Added: trunk/yake/samples/net/roclient/ROClient.h =================================================================== --- trunk/yake/samples/net/roclient/ROClient.h (rev 0) +++ trunk/yake/samples/net/roclient/ROClient.h 2007-01-10 19:48:12 UTC (rev 1586) @@ -0,0 +1,58 @@ +#ifndef RO_CLIENT_H +#define RO_CLIENT_H + +#include <yake/netsvc/netSvc.h> +#include <yake/samples/net/common/common.h> +#include <yake/samples/net/common/commonEvents.h> +#include <yake/samples/net/common/roCommon.h> + +namespace yake { +namespace ro { + + struct client : public net::IServiceHost + { + public: + client(const net::Address&); + ~client(); + + virtual net::NetEventConnectionPtr getEventConnection() const + { return evtConn_; } + + void setObjectManager(yake::ent::ObjectManager*); + + void waitForStart(); + void step(); + private: + virtual bool onStart(); + virtual void onStop(); + private: + net::Address serverAddr_; + yake::SharedPtr<net::IClientPacketConnection> conn_; + safe_var<bool> timedOut_; + yake::SharedPtr<net::INetEventConnection> evtConn_; + + volatile bool packetConnStarted_; + + enum stage_t { + CS_DEAD = 1, + CS_JOINING, + CS_RUNNING + }; + stage_t stage_; + + yake::ent::ObjectManager* objMgr_; + + typedef net::INetEventConnection::EvtProcessEventFn ProcessEventFn; + ProcessEventFn currEvtProcessFn_; + private: + void onClientStarted(); + void onTimeOut(); + void onProcessEvent(const net::PeerId, const net::NetEvent& , const net::ChannelId); + void running_onProcessEvent(const net::PeerId, const net::NetEvent& , const net::ChannelId); + void init_onProcessEvent(const net::PeerId, const net::NetEvent& , const net::ChannelId); + }; + +} // namespace ro +} // namespace yake + +#endif Modified: trunk/yake/samples/net/roserver/ROServer.cpp =================================================================== --- trunk/yake/samples/net/roserver/ROServer.cpp 2007-01-10 19:46:57 UTC (rev 1585) +++ trunk/yake/samples/net/roserver/ROServer.cpp 2007-01-10 19:48:12 UTC (rev 1586) @@ -1,9 +1,5 @@ -#include <yake/samples/net/roinprocess/pch.h> -#include <yake/object/yakeObjects.h> -#include <yake/ent/ent.h> -#include <yake/net/net.h> -#include <yake/samples/net/common/common.h> -#include <yake/samples/net/roserver/ROServer.h> +#include <samples/net/inprocess/common.h> +#include <samples/net/roserver/ROServer.h> namespace yake { namespace ro { Added: trunk/yake/samples/net/roserver/ROServer.h =================================================================== --- trunk/yake/samples/net/roserver/ROServer.h (rev 0) +++ trunk/yake/samples/net/roserver/ROServer.h 2007-01-10 19:48:12 UTC (rev 1586) @@ -0,0 +1,110 @@ +#ifndef RO_SERVER_H +#define RO_SERVER_H + +#include <yake/netsvc/netSvc.h> +#include <yake/samples/net/common/common.h> +#include <yake/samples/net/common/commonEvents.h> +#include <yake/samples/net/common/roCommon.h> + +namespace yake { +namespace ro { + namespace server_impl { + class client; + } + + struct server : public net::IServiceHost + { + public: + server(); + ~server(); + + // Call before start() + void setInterface(const net::Address&); + + // implement IServiceHost interface + virtual net::NetEventConnectionPtr getEventConnection() const + { return this->evtConn_; } + + // + + struct iclient + { + virtual ~iclient() {} + + virtual net::PeerId getPeerId() const = 0; + virtual void sendEvent(const net::NetEvent&, + const net::SendOptions& = net::SendOptions().channel(CHANNELID_CONTROL)) = 0; + protected: + iclient() {} + private: + iclient(const iclient&); + iclient& operator=(const iclient&); + }; + + void step(); + + //void queueEvent(const net::PeerId, net::NetEvent*, const net::ChannelId); + //void queueEventBroadcast(net::NetEvent*, const net::ChannelId); + + //typedef boost::function<void(s2cEvtClassTable&)> InitEvtClassTableFn; + //void setInitClassTableMessageFn(const InitEvtClassTableFn&); + void setClassTableMessage(const s2cEvtClassTable&); + + typedef SignalX<void(const net::PeerId)> PeerIdSignal; + typedef PeerIdSignal ClientSimulationStartedSignal; + typedef PeerIdSignal ClientDisconnectedSignal; + yake::SignalConnection subscribeToClientSimulationStarted(const ClientSimulationStartedSignal::slot_type&); + yake::SignalConnection subscribeToClientDisconnected(const ClientDisconnectedSignal::slot_type&); + + //private: + const s2cEvtClassTable& getClassTableMessage() const; + private: + server(const server&); + server& operator=(const server&); + friend class server_impl::client; + private: // IServiceHost + virtual bool onStart(); + virtual void onStop(); + private: // callback for yake::net interfaces: + void onServerStarted(); + void onReceivePacket(const net::PeerId, const net::PacketPtr&, const net::ChannelId); + void onProcessEvent(const net::PeerId, const net::NetEvent&, const net::ChannelId); + void onClientDisconnected(const net::PeerId); + private: // internal callback + void onClientSimStarted(iclient&); + private: + net::Address bindInterface_; + + // + volatile bool packetConnStarted_; + yake::SharedPtr<net::IServerPacketConnection> conn_; + yake::SharedPtr<net::INetEventConnection> evtConn_; + + typedef server_impl::client Client; + typedef yake::SharedPtr<Client> ClientPtr; + + typedef std::map<net::PeerId,ClientPtr> ClientPtrMap; + ClientPtrMap clients_; + + //@todo put into specialized object "NetEventQueue" + struct EventQEntry + { + net::NetEvent* evt_; + net::PeerId peerId_; + net::ChannelId channelId_; + EventQEntry(const net::PeerId, const net::NetEvent*, const net::ChannelId); + }; + typedef std::deque<EventQEntry> EventQ; + EventQ outEvtQ_; + //mutable boost::mutex outEvtQMtx_; + + //InitEvtClassTableFn initEvtClassTableFn_; + s2cEvtClassTable evtClassTbl_; + ClientSimulationStartedSignal sigClientSimulationStarted_; + ClientDisconnectedSignal sigClientDisconnected_; + }; + +} // namespace ro +} // namespace yake + +#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-01-10 19:46:57
|
Revision: 1585 http://svn.sourceforge.net/yake/?rev=1585&view=rev Author: psyclonist Date: 2007-01-10 11:46:57 -0800 (Wed, 10 Jan 2007) Log Message: ----------- dll binaries are now built in yake/common/bin/[debug|release|release_sym] Modified Paths: -------------- trunk/yake/scripts/premake/tools.lua Modified: trunk/yake/scripts/premake/tools.lua =================================================================== --- trunk/yake/scripts/premake/tools.lua 2007-01-10 19:46:07 UTC (rev 1584) +++ trunk/yake/scripts/premake/tools.lua 2007-01-10 19:46:57 UTC (rev 1585) @@ -79,26 +79,27 @@ if (windows) then addDefine("_CRT_SECURE_NO_DEPRECATE") addDefine("WIN32") - addDefine("_USRDLL") - else + addDefine("_USRDLL") + else addDefine("_REENTRANT") end + + local targetBaseDir = rootdir.."common/bin/" - debug = package.config.Debug - debug.target = (LIBFILE_PREFIX)..name..(DEBUG_DLL_SUFFIX) + debug.target = targetBaseDir.."debug/"..(LIBFILE_PREFIX)..name..(DEBUG_DLL_SUFFIX) debug.defines = {"_DEBUG"} debug.buildflags = {} releaseWithSym = package.config.ReleaseWithSymbols - releaseWithSym.target = (LIBFILE_PREFIX)..name.."_sym" + releaseWithSym.target = targetBaseDir.."release_sym/"..(LIBFILE_PREFIX)..name.."_sym" releaseWithSym.defines = {} releaseWithSym.buildflags = { "optimize-speed" } release = package.config.Release - release.target = (LIBFILE_PREFIX)..name + release.target = targetBaseDir.."release/"..(LIBFILE_PREFIX)..name release.defines = {} release.buildflags = { "no-symbols", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-01-10 19:46:25
|
Revision: 1584 http://svn.sourceforge.net/yake/?rev=1584&view=rev Author: psyclonist Date: 2007-01-10 11:46:07 -0800 (Wed, 10 Jan 2007) Log Message: ----------- updated build instructions Modified Paths: -------------- trunk/yake/BUILD Modified: trunk/yake/BUILD =================================================================== --- trunk/yake/BUILD 2007-01-10 19:33:40 UTC (rev 1583) +++ trunk/yake/BUILD 2007-01-10 19:46:07 UTC (rev 1584) @@ -13,8 +13,8 @@ 1.3 Building with Code::Blocks 1.4 Building with GCC 2 BUILD INSTRUCTIONS FOR YAKE ON PC/LINUX -2.1 Building Yake with SCons 2.1 Building Yake with premake +2.2 Building Yake with SCons 3 BUILD INSTRUCTIONS FOR CUSTOM PROJECTS 4 LIBRARY NAMING SCHEME @@ -85,9 +85,23 @@ 2. BUILD INSTRUCTIONS FOR YAKE ON PC/LINUX ------------------------------------------ -2.1 Building Yake with SCons +2.1 Building Yake with premake ------------------------------------------ +* Install premake + +* Set up the dependency directory (see 2.2 below) + +* Create makefiles & compile Yake + # cd yake/scripts/premake + # ./build_linux_gnu.sh + # make + + >> More instructions to come << + +2.2 Building Yake with SCons +------------------------------------------ + Last modified: 30/9/2005 by Stephan Kaiser (psy) Last modified: 22/9/2004 by Nikita Buida (mj) @@ -163,11 +177,6 @@ # From now on you're able to run the demos. You will need to set up working dir for demo, e.g. create config files and have Ogre's media. -2.2 Building Yake with premake ------------------------------------------- - - >> Instructions to come << - 3 BUILD INSTRUCTIONS FOR CUSTOM PROJECTS ---------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-01-10 19:33:41
|
Revision: 1583 http://svn.sourceforge.net/yake/?rev=1583&view=rev Author: psyclonist Date: 2007-01-10 11:33:40 -0800 (Wed, 10 Jan 2007) Log Message: ----------- added comment Modified Paths: -------------- trunk/yake/src/netsvc/netServiceHost.cpp Modified: trunk/yake/src/netsvc/netServiceHost.cpp =================================================================== --- trunk/yake/src/netsvc/netServiceHost.cpp 2007-01-10 19:33:12 UTC (rev 1582) +++ trunk/yake/src/netsvc/netServiceHost.cpp 2007-01-10 19:33:40 UTC (rev 1583) @@ -88,9 +88,13 @@ // find signal for this channel and event id: SigMap::const_iterator it = sigMap_.find( ChannelEventIdPair(cId,evt.id()) ); - if (it == sigMap_.end()) + if (it != sigMap_.end()) + { + (*it->second)(pId,evt,cId); return; - (*it->second)(pId,evt,cId); + } + + // no listener... } SignalConnection IServiceHost::subscribeToNetEvent( const net::NetEvent::id_type eId, const net::ChannelId cId, const EvtProcessEventFn& fn) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-01-10 19:33:12
|
Revision: 1582 http://svn.sourceforge.net/yake/?rev=1582&view=rev Author: psyclonist Date: 2007-01-10 11:33:12 -0800 (Wed, 10 Jan 2007) Log Message: ----------- fixed logging macro, fixed line ending consistency Modified Paths: -------------- trunk/yake/yake/base/yakeLog.h trunk/yake/yake/netsvc/netPrerequisites.h trunk/yake/yake/netsvc/netServiceHost.h trunk/yake/yake/samples/net/common/common.h Modified: trunk/yake/yake/base/yakeLog.h =================================================================== --- trunk/yake/yake/base/yakeLog.h 2007-01-10 19:32:23 UTC (rev 1581) +++ trunk/yake/yake/base/yakeLog.h 2007-01-10 19:33:12 UTC (rev 1582) @@ -163,11 +163,17 @@ # define TOSTRING(x) STRINGIFY (x) #endif +#if YAKE_COMPILER == COMPILER_GNUC #define YAKE_LOG_INFORMATION( what ) yake::logging::log( yake::logging::S_INFORMATION, "[File: \"__FILE__\"@\"TOSTRING(__LINE__)+\"] ", what ); #define YAKE_LOG_WARNING( what ) yake::logging::log( yake::logging::S_WARNING, "[File: \"__FILE__\"@\"TOSTRING(__LINE__)+\"] ", what ); #define YAKE_LOG_ERROR( what ) yake::logging::log( yake::logging::S_ERROR, "[File: \"__FILE__\"@\"TOSTRING(__LINE__)+\"] ", what ); #define YAKE_LOG( what ) yake::logging::log( yake::logging::S_INFORMATION, "[File: \"__FILE__\"@\"TOSTRING(__LINE__)+\"] ", what ); - +#else + #define YAKE_LOG_INFORMATION( what ) yake::logging::log( yake::logging::S_INFORMATION, "[File: "__FILE__"@"TOSTRING(__LINE__)+"] ", what ); + #define YAKE_LOG_WARNING( what ) yake::logging::log( yake::logging::S_WARNING, "[File: "__FILE__"@"TOSTRING(__LINE__)+"] ", what ); + #define YAKE_LOG_ERROR( what ) yake::logging::log( yake::logging::S_ERROR, "[File: "__FILE__"@"TOSTRING(__LINE__)+"] ", what ); + #define YAKE_LOG( what ) yake::logging::log( yake::logging::S_INFORMATION, "[File: "__FILE__"@"TOSTRING(__LINE__)+"] ", what ); +#endif } // namespace logging } // namespace yake Modified: trunk/yake/yake/netsvc/netPrerequisites.h =================================================================== --- trunk/yake/yake/netsvc/netPrerequisites.h 2007-01-10 19:32:23 UTC (rev 1581) +++ trunk/yake/yake/netsvc/netPrerequisites.h 2007-01-10 19:33:12 UTC (rev 1582) @@ -40,8 +40,8 @@ #define COUTLN(X) \ { \ std::stringstream ss; \ - ss << X << "\n"; \ - std::cout << ss.str(); \ + ss << X; \ + yake::logging::log( yake::logging::S_INFORMATION, ss.str() ); \ } /** @todo move the streaming operators */ Modified: trunk/yake/yake/netsvc/netServiceHost.h =================================================================== --- trunk/yake/yake/netsvc/netServiceHost.h 2007-01-10 19:32:23 UTC (rev 1581) +++ trunk/yake/yake/netsvc/netServiceHost.h 2007-01-10 19:33:12 UTC (rev 1582) @@ -3,7 +3,7 @@ #include <boost/thread/mutex.hpp> #include <yake/netsvc/netPrerequisites.h> -#include <yake/netsvc/netService.h> +#include <yake/netsvc/netService.h> #include <yake/base/templates/yakeSignals.h> #pragma warning(push) Modified: trunk/yake/yake/samples/net/common/common.h =================================================================== --- trunk/yake/yake/samples/net/common/common.h 2007-01-10 19:32:23 UTC (rev 1581) +++ trunk/yake/yake/samples/net/common/common.h 2007-01-10 19:33:12 UTC (rev 1582) @@ -8,13 +8,6 @@ #include <boost/thread/mutex.hpp> #include "config.h" -#define COUTLN(X) \ -{ \ - std::stringstream ss; \ - ss << X << "\n"; \ - std::cout << ss.str(); \ -} - template<typename T> struct safe_var { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-01-10 19:32:27
|
Revision: 1581 http://svn.sourceforge.net/yake/?rev=1581&view=rev Author: psyclonist Date: 2007-01-10 11:32:23 -0800 (Wed, 10 Jan 2007) Log Message: ----------- fixed dll export Modified Paths: -------------- trunk/yake/yake/plugins/modelLua/yakeLuaBinder.h Modified: trunk/yake/yake/plugins/modelLua/yakeLuaBinder.h =================================================================== --- trunk/yake/yake/plugins/modelLua/yakeLuaBinder.h 2007-01-10 19:31:58 UTC (rev 1580) +++ trunk/yake/yake/plugins/modelLua/yakeLuaBinder.h 2007-01-10 19:32:23 UTC (rev 1581) @@ -21,13 +21,21 @@ #ifndef YAKE_MODEL_LUA_BINDER_H #define YAKE_MODEL_LUA_BINDER_H +#include <yake/base/yakePrerequisites.h> + +#if defined( YAKE_MODELLUA_EXPORTS ) +# define YAKE_MODEL_LUA_API DLLEXPORT +#else +# define YAKE_MODEL_LUA_API DLLIMPORT +#endif + namespace yake { namespace model { namespace lua { - struct Binder : public scripting::IBinder + struct YAKE_MODEL_LUA_API Binder : public scripting::IBinder { - YAKE_DECLARE_CONCRETE( Binder, "yapp::model" ); + YAKE_DECLARE_CONCRETE( Binder, "yake::model" ); public: virtual void bind( scripting::IVM* pVM ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-01-10 19:32:00
|
Revision: 1580 http://svn.sourceforge.net/yake/?rev=1580&view=rev Author: psyclonist Date: 2007-01-10 11:31:58 -0800 (Wed, 10 Jan 2007) Log Message: ----------- formatting Modified Paths: -------------- trunk/yake/src/plugins/modelLua/yakeLuaBinder.cpp Modified: trunk/yake/src/plugins/modelLua/yakeLuaBinder.cpp =================================================================== --- trunk/yake/src/plugins/modelLua/yakeLuaBinder.cpp 2007-01-10 19:31:23 UTC (rev 1579) +++ trunk/yake/src/plugins/modelLua/yakeLuaBinder.cpp 2007-01-10 19:31:58 UTC (rev 1580) @@ -24,64 +24,62 @@ #include <yake/model/model.h> -namespace yake -{ - namespace model +namespace yake { +namespace model { +namespace lua { + + YAKE_REGISTER_CONCRETE( Binder ); + void Binder::bind( scripting::IVM* pVM ) { - namespace lua - { - YAKE_REGISTER_CONCRETE( Binder ); - void Binder::bind( scripting::IVM* pVM ) - { - scripting::LuaVM* pL = static_cast<scripting::LuaVM*>(pVM); - YAKE_ASSERT( pL ); - if (!pL) - return; + scripting::LuaVM* pL = static_cast<scripting::LuaVM*>(pVM); + YAKE_ASSERT( pL ); + if (!pL) + return; - using namespace luabind; - using namespace yake::model; + using namespace luabind; + using namespace yake::model; #define YAKE_MODEL_MODULE pL->getLuaState(), "yake" - module( YAKE_MODEL_MODULE ) - [ - class_<ModelComponent>( "ModelComponent" ) - //.def( constructor<>() ) - ]; + module( YAKE_MODEL_MODULE ) + [ + class_<ModelComponent>( "ModelComponent" ) + //.def( constructor<>() ) + ]; - module( YAKE_MODEL_MODULE ) - [ - class_<Graphical,ModelComponent>( "Graphical" ) - .def( constructor<>() ) - .def( "addSceneNode", &Graphical::addSceneNode ) - //.def( "getSceneNodes", &Graphical::getSceneNodes ) - .def( "getSceneNode", &Graphical::getSceneNode ) - .def( "getEntity", &Graphical::getEntity ) - .def( "getLight", &Graphical::getLight ) - .def( "translate", &Graphical::translate ) - ]; + module( YAKE_MODEL_MODULE ) + [ + class_<Graphical,ModelComponent>( "Graphical" ) + .def( constructor<>() ) + .def( "addSceneNode", &Graphical::addSceneNode ) + //.def( "getSceneNodes", &Graphical::getSceneNodes ) + .def( "getSceneNode", &Graphical::getSceneNode ) + .def( "getEntity", &Graphical::getEntity ) + .def( "getLight", &Graphical::getLight ) + .def( "translate", &Graphical::translate ) + ]; - module( YAKE_MODEL_MODULE ) - [ - class_<Physical,ModelComponent>( "Physical" ) - .def( constructor<>() ) - .def( "addActor", &Physical::addActor ) - .def( "addBody", &Physical::addBody ) - .def( "addJoint", &Physical::addBody ) - .def( "addAffector", &Physical::addAffector ) - .def( "addAffectorTargetActor", &Physical::addAffectorTargetActor ) - //void addAffectorTargetBody(physics::IBodyAffector*,physics::IBody*); - //void addAffectorTargetBody(physics::IBodyAffector*,const String& bodyXPath); - .def( "getActor", &Physical::getActor ) - .def( "getBody", &Physical::getBody ) - .def( "getJoint", &Physical::getJoint ) - .def( "getAffector", &Physical::getAffector ) - //.def( "translate", &Physical::translate ) - .def( "updateAffectors", &Physical::updateAffectors ) - ]; - } + module( YAKE_MODEL_MODULE ) + [ + class_<Physical,ModelComponent>( "Physical" ) + .def( constructor<>() ) + .def( "addActor", &Physical::addActor ) + .def( "addBody", &Physical::addBody ) + .def( "addJoint", &Physical::addBody ) + .def( "addAffector", &Physical::addAffector ) + .def( "addAffectorTargetActor", &Physical::addAffectorTargetActor ) + //void addAffectorTargetBody(physics::IBodyAffector*,physics::IBody*); + //void addAffectorTargetBody(physics::IBodyAffector*,const String& bodyXPath); + .def( "getActor", &Physical::getActor ) + .def( "getBody", &Physical::getBody ) + .def( "getJoint", &Physical::getJoint ) + .def( "getAffector", &Physical::getAffector ) + //.def( "translate", &Physical::translate ) + .def( "updateAffectors", &Physical::updateAffectors ) + ]; + } - } // namespace lua - } // namespace model +} // namespace lua +} // namespace model } // namespace yake This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-01-10 19:31:30
|
Revision: 1579 http://svn.sourceforge.net/yake/?rev=1579&view=rev Author: psyclonist Date: 2007-01-10 11:31:23 -0800 (Wed, 10 Jan 2007) Log Message: ----------- adjusted to recent logging and network interface modifications Modified Paths: -------------- trunk/yake/samples/net/packet/demo.cpp Modified: trunk/yake/samples/net/packet/demo.cpp =================================================================== --- trunk/yake/samples/net/packet/demo.cpp 2007-01-10 18:57:21 UTC (rev 1578) +++ trunk/yake/samples/net/packet/demo.cpp 2007-01-10 19:31:23 UTC (rev 1579) @@ -3,6 +3,8 @@ #include <yake/base/yake.h> // for YAKE_ASSERT etc #include <yake/samples/net/common/common.h> +using namespace yake; + /** A simple server class for managing packet connections. */ struct server @@ -11,7 +13,7 @@ server& operator=(const server&); server(const server&); public: - server(const net::Address&, const net::uint32 maxClients); + server(const net::Address&, const uint32 maxClients); ~server(); bool start(); @@ -31,10 +33,10 @@ private: bool started_; net::Address addr_; - net::uint32 maxClients_; + uint32 maxClients_; net::IServerPacketConnection* conn_; }; -server::server(const net::Address& addr, const net::uint32 maxClients) : +server::server(const net::Address& addr, const uint32 maxClients) : addr_(addr), maxClients_(maxClients), conn_(0), @@ -76,7 +78,7 @@ net::native::sleep(10); net::update(); } - COUTLN("server is running."); + YAKE_LOG_INFORMATION("server is running."); return true; } @@ -87,18 +89,26 @@ conn_->stop(); YAKE_SAFE_DELETE( conn_ ); } + +#define YAKE_LOG_INFORMATION_X(X) \ +{ \ +std::stringstream ss; \ +ss << X; \ +YAKE_LOG_INFORMATION(ss.str()); \ +} + void server::broadcastHello() { YAKE_ASSERT( conn_ ); YAKE_ASSERT( started_ ); std::string hello("hello!"); - conn_->send( hello.c_str(), hello.size(), net::SendOptions().reliable() ); - COUTLN("server:broadcastHello() " << conn_->getNumConnectedClients() << " client(s)"); + conn_->send( net::PacketPtr(new net::Packet(hello.c_str(), hello.size())), net::SendOptions().reliable() ); + YAKE_LOG_INFORMATION_X("server:broadcastHello() " << conn_->getNumConnectedClients() << " client(s)"); } -void client_onPacketReceived(const net::PeerId peerId, const void* data, const size_t len, const net::ChannelId channel) +void client_onPacketReceived(const net::PeerId peerId, const net::PacketPtr& pckt, const net::ChannelId channel) { - COUTLN(" client " << peerId << " packet(size=" << len << ") on channel " << int(channel) << "\n"); + YAKE_LOG_INFORMATION_X(" client " << peerId << " packet(size=" << pckt->payload().size() << ") on channel " << int(channel) << "\n"); } int main(int argc, char* argv[]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-01-10 18:57:21
|
Revision: 1578 http://svn.sourceforge.net/yake/?rev=1578&view=rev Author: psyclonist Date: 2007-01-10 10:57:21 -0800 (Wed, 10 Jan 2007) Log Message: ----------- reorganization Added Paths: ----------- trunk/yake/samples/net/packet/ trunk/yake/samples/net/roclient/ trunk/yake/samples/net/roserver/ Copied: trunk/yake/samples/net/packet (from rev 1574, trunk/yake/samples/base/net/packet) Copied: trunk/yake/samples/net/roclient (from rev 1574, trunk/yake/samples/base/net/roclient) Copied: trunk/yake/samples/net/roserver (from rev 1574, trunk/yake/samples/base/net/roserver) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-01-10 18:57:01
|
Revision: 1577 http://svn.sourceforge.net/yake/?rev=1577&view=rev Author: psyclonist Date: 2007-01-10 10:57:01 -0800 (Wed, 10 Jan 2007) Log Message: ----------- reorganization Removed Paths: ------------- trunk/yake/samples/base/net/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-01-10 18:55:52
|
Revision: 1576 http://svn.sourceforge.net/yake/?rev=1576&view=rev Author: psyclonist Date: 2007-01-10 10:55:51 -0800 (Wed, 10 Jan 2007) Log Message: ----------- reorganization Removed Paths: ------------- trunk/yake/samples/base/net/packet/ trunk/yake/samples/base/net/roclient/ trunk/yake/samples/base/net/roinprocess/ trunk/yake/samples/base/net/roserver/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-01-10 18:54:27
|
Revision: 1575 http://svn.sourceforge.net/yake/?rev=1575&view=rev Author: psyclonist Date: 2007-01-10 10:54:28 -0800 (Wed, 10 Jan 2007) Log Message: ----------- Added Paths: ----------- trunk/yake/samples/net/ trunk/yake/samples/net/inprocess/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-01-10 16:55:07
|
Revision: 1574 http://svn.sourceforge.net/yake/?rev=1574&view=rev Author: psyclonist Date: 2007-01-10 08:54:48 -0800 (Wed, 10 Jan 2007) Log Message: ----------- undef min and max as it collides with STL's min and max (windows include can define this, for example) Modified Paths: -------------- trunk/yake/yake/net/detail/netInternal.h Modified: trunk/yake/yake/net/detail/netInternal.h =================================================================== --- trunk/yake/yake/net/detail/netInternal.h 2007-01-03 22:59:52 UTC (rev 1573) +++ trunk/yake/yake/net/detail/netInternal.h 2007-01-10 16:54:48 UTC (rev 1574) @@ -93,4 +93,12 @@ #pragma warning(pop) +#ifdef min +#undef min #endif + +#ifdef max +#undef max +#endif + +#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-01-03 22:59:51
|
Revision: 1573 http://svn.sourceforge.net/yake/?rev=1573&view=rev Author: psyclonist Date: 2007-01-03 14:59:52 -0800 (Wed, 03 Jan 2007) Log Message: ----------- linux related changes Modified Paths: -------------- trunk/yake/scripts/premake/plugins.lua Modified: trunk/yake/scripts/premake/plugins.lua =================================================================== --- trunk/yake/scripts/premake/plugins.lua 2007-01-03 22:34:14 UTC (rev 1572) +++ trunk/yake/scripts/premake/plugins.lua 2007-01-03 22:59:52 UTC (rev 1573) @@ -3,7 +3,11 @@ -------------------------------------- function addPkgConfigLib(package,lib) - if options.target == gnu and os.execute("pkg-config --exists "..lib) then + local pkgexists = os.execute("pkg-config --exists "..lib) + print(pkgexists..lib) + if options.target == gnu and pkgexists then + local flags = os.execute("pkg-config --cflags "..lib) + print("flags "..flags) local cflags = "`pkg-config --cflags " if not cflags then print("ERROR: Failed to acquire cflags for library '" .. lib .. "'!") @@ -15,6 +19,7 @@ if not path then print("ERROR: Failed to find library '" .. lib .. "'!") end + print(path) table.insert(package.linkoptions,path.."/"..lib) end end @@ -28,6 +33,7 @@ useDep("oalpp") else addPkgConfigLib(package,"libopenalpp.so") + --addPkgConfigLib(package,"openalpp") --@todo Why does this not pick up the correct lib to link to? end addIncludePath("dependencies/openalpp/include") @@ -35,10 +41,14 @@ makeComponentPlugin("scriptingLua","YAKE_SCRIPTINGLUA_EXPORTS") addDependency("base") addDependency("scripting") + +if (windows) then + useDep("lua") + useDep("luabind") +else + addPkgConfigLib(package,"liblua50.so.5") +end -useDep("lua") -useDep("luabind") - -------------------------------------- makeComponentPlugin("physicsODE","YAKEPHYSICSODE_EXPORTS") addDependency("base") @@ -53,8 +63,12 @@ addDependency("scripting") addDependency("scriptingLua") -useDep("lua") -useDep("luabind") +if (windows) then + useDep("lua") + useDep("luabind") +else + addPkgConfigLib(package,"liblua50.so.5") +end -------------------------------------- makeComponentPlugin("modelLua","YAKE_MODELLUA_EXPORTS") @@ -63,8 +77,12 @@ addDependency("scripting") addDependency("scriptingLua") -useDep("lua") -useDep("luabind") +if (windows) then + useDep("lua") + useDep("luabind") +else + addPkgConfigLib(package,"liblua50.so.5") +end -------------------------------------- makeComponentPlugin("ceguiOgreRendererAdapter","YAKE_CEGUIRENDERERADAPTER_OGRE_EXPORTS") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-01-03 22:34:14
|
Revision: 1572 http://svn.sourceforge.net/yake/?rev=1572&view=rev Author: psyclonist Date: 2007-01-03 14:34:14 -0800 (Wed, 03 Jan 2007) Log Message: ----------- linux related changes Modified Paths: -------------- trunk/yake/scripts/linux/build.sh trunk/yake/src/plugins/audioOpenAL/yakeAudioSourceOpenAL.cpp trunk/yake/src/plugins/audioOpenAL/yakeAudioWorldOpenAL.cpp trunk/yake/src/plugins/audioOpenAL/yakePCH.cpp trunk/yake/yake/object/ObjectId.inl trunk/yake/yake/plugins/audioOpenAL/yakeAudioSystemOpenAL.h trunk/yake/yake/plugins/audioOpenAL/yakePCH.h trunk/yake/yake/raf/yakePrerequisites.h Modified: trunk/yake/scripts/linux/build.sh =================================================================== --- trunk/yake/scripts/linux/build.sh 2007-01-03 22:27:26 UTC (rev 1571) +++ trunk/yake/scripts/linux/build.sh 2007-01-03 22:34:14 UTC (rev 1572) @@ -1,4 +1,6 @@ #!/bin/bash -pushd ..\premake +#cd .. +#cd ../premake export SOLUTION_TARGET_DIR=linux -premake --file yake.lua --target gnu --os linux -cc gcc +./premake --file yake.lua --target gnu --os linux -cc gcc +#cd ../linux Modified: trunk/yake/src/plugins/audioOpenAL/yakeAudioSourceOpenAL.cpp =================================================================== --- trunk/yake/src/plugins/audioOpenAL/yakeAudioSourceOpenAL.cpp 2007-01-03 22:27:26 UTC (rev 1571) +++ trunk/yake/src/plugins/audioOpenAL/yakeAudioSourceOpenAL.cpp 2007-01-03 22:34:14 UTC (rev 1572) @@ -141,4 +141,4 @@ } } -} \ No newline at end of file +} Modified: trunk/yake/src/plugins/audioOpenAL/yakeAudioWorldOpenAL.cpp =================================================================== --- trunk/yake/src/plugins/audioOpenAL/yakeAudioWorldOpenAL.cpp 2007-01-03 22:27:26 UTC (rev 1571) +++ trunk/yake/src/plugins/audioOpenAL/yakeAudioWorldOpenAL.cpp 2007-01-03 22:34:14 UTC (rev 1572) @@ -118,4 +118,4 @@ } } -} \ No newline at end of file +} Modified: trunk/yake/src/plugins/audioOpenAL/yakePCH.cpp =================================================================== --- trunk/yake/src/plugins/audioOpenAL/yakePCH.cpp 2007-01-03 22:27:26 UTC (rev 1571) +++ trunk/yake/src/plugins/audioOpenAL/yakePCH.cpp 2007-01-03 22:34:14 UTC (rev 1572) @@ -24,4 +24,4 @@ source code distribution. ------------------------------------------------------------------------------------ */ -#include <yake/plugins/audioOpenAL/yakePCH.h> \ No newline at end of file +#include <yake/plugins/audioOpenAL/yakePCH.h> Modified: trunk/yake/yake/object/ObjectId.inl =================================================================== --- trunk/yake/yake/object/ObjectId.inl 2007-01-03 22:27:26 UTC (rev 1571) +++ trunk/yake/yake/object/ObjectId.inl 2007-01-03 22:34:14 UTC (rev 1572) @@ -107,7 +107,7 @@ return (id_ >= rhs.id_); } template<typename objectid_traits> -ObjectId<objectid_traits>::operator CombinedType() const +ObjectId<objectid_traits>::operator typename ObjectId<objectid_traits>::CombinedType() const { return id_; } Modified: trunk/yake/yake/plugins/audioOpenAL/yakeAudioSystemOpenAL.h =================================================================== --- trunk/yake/yake/plugins/audioOpenAL/yakeAudioSystemOpenAL.h 2007-01-03 22:27:26 UTC (rev 1571) +++ trunk/yake/yake/plugins/audioOpenAL/yakeAudioSystemOpenAL.h 2007-01-03 22:34:14 UTC (rev 1572) @@ -164,4 +164,4 @@ } } -#endif \ No newline at end of file +#endif Modified: trunk/yake/yake/plugins/audioOpenAL/yakePCH.h =================================================================== --- trunk/yake/yake/plugins/audioOpenAL/yakePCH.h 2007-01-03 22:27:26 UTC (rev 1571) +++ trunk/yake/yake/plugins/audioOpenAL/yakePCH.h 2007-01-03 22:34:14 UTC (rev 1572) @@ -31,4 +31,4 @@ #include <yake/audio/yakeAudio.h> #include <openalpp/alpp.h> -#endif \ No newline at end of file +#endif Modified: trunk/yake/yake/raf/yakePrerequisites.h =================================================================== --- trunk/yake/yake/raf/yakePrerequisites.h 2007-01-03 22:27:26 UTC (rev 1571) +++ trunk/yake/yake/raf/yakePrerequisites.h 2007-01-03 22:34:14 UTC (rev 1572) @@ -41,7 +41,11 @@ #endif // configuration -#define YAKE_RAF_USES_CEGUI 1 +#if YAKE_PLATFORM == PLATFORM_WIN32 //@todo fixme make it work on linux +# define YAKE_RAF_USES_CEGUI 1 +#else +# define YAKE_RAF_USES_CEGUI 0 +#endif namespace yake { } // namespace yake This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-01-03 22:27:26
|
Revision: 1571 http://svn.sourceforge.net/yake/?rev=1571&view=rev Author: psyclonist Date: 2007-01-03 14:27:26 -0800 (Wed, 03 Jan 2007) Log Message: ----------- linux related changes Modified Paths: -------------- trunk/yake/scripts/premake/build_linux_gnu.sh trunk/yake/scripts/premake/deps.lua trunk/yake/scripts/premake/plugins.lua trunk/yake/scripts/premake/tools.lua trunk/yake/scripts/premake/yake.lua Added Paths: ----------- trunk/yake/scripts/premake/clean_linux.gnu.sh Modified: trunk/yake/scripts/premake/build_linux_gnu.sh =================================================================== --- trunk/yake/scripts/premake/build_linux_gnu.sh 2007-01-03 21:31:06 UTC (rev 1570) +++ trunk/yake/scripts/premake/build_linux_gnu.sh 2007-01-03 22:27:26 UTC (rev 1571) @@ -1 +1,3 @@ -./premake --file yake.lua --target gnu --os linux +#!/bin/bash +export SOLUTION_TARGET_DIR=linux +./premake --file yake.lua --target gnu --os linux -cc gcc Added: trunk/yake/scripts/premake/clean_linux.gnu.sh =================================================================== --- trunk/yake/scripts/premake/clean_linux.gnu.sh (rev 0) +++ trunk/yake/scripts/premake/clean_linux.gnu.sh 2007-01-03 22:27:26 UTC (rev 1571) @@ -0,0 +1,3 @@ +#!/bin/bash +export SOLUTION_TARGET_DIR=linux +./premake --file yake.lua --os linux clean Property changes on: trunk/yake/scripts/premake/clean_linux.gnu.sh ___________________________________________________________________ Name: svn:executable + * Modified: trunk/yake/scripts/premake/deps.lua =================================================================== --- trunk/yake/scripts/premake/deps.lua 2007-01-03 21:31:06 UTC (rev 1570) +++ trunk/yake/scripts/premake/deps.lua 2007-01-03 22:27:26 UTC (rev 1571) @@ -90,7 +90,11 @@ if (windows) then defDepLibraryPath("oalpp","dependencies/OpenThreads/lib/win32") end -defDepLibraryPath("oalpp","dependencies/openalpp/lib") -defDepLibrary("oalpp","oalpp","Release") -defDepLibrary("oalpp","oalpp","ReleaseWithSymbols") -defDepLibrary("oalpp","oalppd","Debug") +defDepLibraryPath("oalpp","dependencies/openalpp/lib") +if (windows) then + defDepLibrary("oalpp","oalpp","Release") + defDepLibrary("oalpp","oalpp","ReleaseWithSymbols") + defDepLibrary("oalpp","oalppd","Debug") +elseif (linux) then + defDepLibrary("oalpp","libopenalpp") +end Modified: trunk/yake/scripts/premake/plugins.lua =================================================================== --- trunk/yake/scripts/premake/plugins.lua 2007-01-03 21:31:06 UTC (rev 1570) +++ trunk/yake/scripts/premake/plugins.lua 2007-01-03 22:27:26 UTC (rev 1571) @@ -1,13 +1,34 @@ -------------------------------------- -- YAKE build file make script -------------------------------------- + +function addPkgConfigLib(package,lib) + if options.target == gnu and os.execute("pkg-config --exists "..lib) then + local cflags = "`pkg-config --cflags " + if not cflags then + print("ERROR: Failed to acquire cflags for library '" .. lib .. "'!") + end + table.insert(package.buildoptions,"`pkg-config --cflags "..lib) + table.insert(package.linkoptions,"`pkg-config --libs "..lib) + else + local path = findlib(lib); + if not path then + print("ERROR: Failed to find library '" .. lib .. "'!") + end + table.insert(package.linkoptions,path.."/"..lib) + end +end -------------------------------------- makeComponentPlugin("audioOpenAL","YAKE_AUDIO_OPENAL_EXPORTS") addDependency("base") addDependency("audio") - -useDep("oalpp") + +if (windows) then + useDep("oalpp") +else + addPkgConfigLib(package,"libopenalpp.so") +end addIncludePath("dependencies/openalpp/include") -------------------------------------- Modified: trunk/yake/scripts/premake/tools.lua =================================================================== --- trunk/yake/scripts/premake/tools.lua 2007-01-03 21:31:06 UTC (rev 1570) +++ trunk/yake/scripts/premake/tools.lua 2007-01-03 22:27:26 UTC (rev 1571) @@ -79,7 +79,9 @@ if (windows) then addDefine("_CRT_SECURE_NO_DEPRECATE") addDefine("WIN32") - addDefine("_USRDLL") + addDefine("_USRDLL") + else + addDefine("_REENTRANT") end Modified: trunk/yake/scripts/premake/yake.lua =================================================================== --- trunk/yake/scripts/premake/yake.lua 2007-01-03 21:31:06 UTC (rev 1570) +++ trunk/yake/scripts/premake/yake.lua 2007-01-03 22:27:26 UTC (rev 1571) @@ -126,9 +126,12 @@ addDependency("model") addDependency("ent") addDependency("scripting") + +-- @todo FIXME works on linux, too... +if not linux then + useDep("cegui") +end -useDep("cegui") - -------------------------------------- --makeComponent("yappbase","YAKE_YAPP_EXPORTS") --addDependency("base") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-01-03 21:31:07
|
Revision: 1570 http://svn.sourceforge.net/yake/?rev=1570&view=rev Author: psyclonist Date: 2007-01-03 13:31:06 -0800 (Wed, 03 Jan 2007) Log Message: ----------- various linux compatiblity fixes Modified Paths: -------------- trunk/yake/buildspec.xml trunk/yake/src/net/detail/netCommon.cpp trunk/yake/src/net/detail/netEnetServerPacketConnection.cpp trunk/yake/src/plugins/physicsODE/OdeActor.cpp trunk/yake/src/raf/yakeApplication.cpp trunk/yake/yake/base/templates/yakeVector.h trunk/yake/yake/base/yakeLog.h trunk/yake/yake/msg/listener_mgr.h trunk/yake/yake/netsvc/netServiceHost.h trunk/yake/yake/object/ObjectManager.inl Modified: trunk/yake/buildspec.xml =================================================================== --- trunk/yake/buildspec.xml 2007-01-03 21:29:28 UTC (rev 1569) +++ trunk/yake/buildspec.xml 2007-01-03 21:31:06 UTC (rev 1570) @@ -8,7 +8,6 @@ <include>dependencies</include> <include>.</include> - <include>dependencies/ttl</include> <include>dependencies/OGRE</include> <include>dependencies/PLSM</include> <include>dependencies/ode/include</include> @@ -103,14 +102,14 @@ > <libadd>yakeBase</libadd> </BuildSharedLibrary> - +<!--@todo yakeNet <BuildSharedLibrary name="yakeNet" src="src/yake/net" > <libadd>yakeBase</libadd> </BuildSharedLibrary> - +--> <BuildSharedLibrary name="yakeLoader" src="src/yake/loader" @@ -192,7 +191,7 @@ <libadd>openalpp</libadd> <libadd>yakeAudio</libadd> </BuildSharedLibrary> ---> + <BuildSharedLibrary name="yakegraphicsOgre" src="src/yake/plugins/graphicsOgre" @@ -208,7 +207,7 @@ <libadd>yakeInput</libadd> <libadd>OgreMain</libadd> </BuildSharedLibrary> - +--> <BuildSharedLibrary name="yakephysicsODE" src="src/yake/plugins/physicsODE" @@ -216,7 +215,7 @@ <libadd>yakePhysics</libadd> <libadd>ode</libadd> </BuildSharedLibrary> - +<!-- <BuildSharedLibrary name="yakescriptingLua" src="src/yake/plugins/scriptingLua" @@ -225,7 +224,7 @@ <libadd>luabind</libadd> <libadd>lua</libadd> </BuildSharedLibrary> - +--> <!-- TODO Rename this thing? --> <BuildSharedLibrary name="yakescriptingBindingsLua" @@ -236,6 +235,7 @@ <libadd>lua</libadd> </BuildSharedLibrary> + <!--@todo reenable. it just took so long to compile/link ... <BuildSharedLibrary name="yakegraphicsLuaBindings" src="src/yake/plugins/graphicsLuaBindings" @@ -244,6 +244,7 @@ <libadd>luabind</libadd> <libadd>lua</libadd> </BuildSharedLibrary> + --> <BuildSharedLibrary name="yakebaseLuaBindings" @@ -254,38 +255,26 @@ <libadd>lua</libadd> </BuildSharedLibrary> -<!-- - ********************************************* - * YAPP * - ********************************************* ---> <BuildSharedLibrary - name="yappEvents" - src="src/yapp/base/event" - /> - - <BuildSharedLibrary name="yappBase" src="src/yapp/base" > <libadd>yakeBase</libadd> - <libadd>yappEvents</libadd> </BuildSharedLibrary> -<!-- <BuildSharedLibrary - name="yappLoader" - src="src/yapp/loader" + name="yakeLoader" + src="src/yake/loader" > <libadd>yappBase</libadd> </BuildSharedLibrary> <BuildSharedLibrary - name="yappModel" - src="src/yapp/model" + name="yakeModel" + src="src/yake/model" > - <libadd>yappBase</libadd> - <libadd>yappLoader</libadd> + <libadd>yakeBase</libadd> + <libadd>yakeLoader</libadd> </BuildSharedLibrary> --> @@ -296,14 +285,6 @@ <libadd>yappBase</libadd> </BuildSharedLibrary> - <!--<BuildSharedLibrary - name="yappEnt" - src="src/yapp/ent" - > - <libadd>yappBase</libadd> - <libadd>yappMsg</libadd> - </BuildSharedLibrary> - --> <BuildSharedLibrary name="yappVehicle" src="src/yapp/vehicle" @@ -317,11 +298,12 @@ src="src/yapp/raf" > <libadd>yappBase</libadd> + <!-- <libadd>yakeCEGUIOgreAdapter</libadd> <libadd>CEGUIOgreRenderer</libadd> + --> </BuildSharedLibrary> - - +<!-- <BuildSharedLibrary name="yakeCEGUIOgreAdapter" src="src/yapp/plugins/ceguiOgreRendererAdapter" @@ -329,7 +311,7 @@ <libadd>CEGUIBase</libadd> <libadd>OgreMain</libadd> </BuildSharedLibrary> - +--> <!--<BuildSharedLibrary name="yappEntLua" src="src/yapp/plugins/entLua" @@ -344,16 +326,15 @@ <libadd>luabind</libadd> </BuildSharedLibrary> --> - +<!-- <BuildSharedLibrary name="yappTerrainPhysicsManager" src="src/yapp/plugins/terrainPhysMgr" > <libadd>PagingLandscape</libadd> </BuildSharedLibrary> - +--> <!-- SAMPLES --> - <List name="common_libs"> <item>yakeBase</item> <item>yakeAudio</item> @@ -371,13 +352,14 @@ <libadd>common_libs</libadd> </BuildProgram> +<!-- <BuildProgram name="GraphicsDemo" src="src/yake/samples/graphics/demo" > <libadd>common_libs</libadd> </BuildProgram> - +--> <!-- <BuildProgram name="DotSceneGraphicsDemo" Modified: trunk/yake/src/net/detail/netCommon.cpp =================================================================== --- trunk/yake/src/net/detail/netCommon.cpp 2007-01-03 21:29:28 UTC (rev 1569) +++ trunk/yake/src/net/detail/netCommon.cpp 2007-01-03 21:31:06 UTC (rev 1570) @@ -4,28 +4,33 @@ #include <yake/base/native/yakeNative.h> #include <boost/lexical_cast.hpp> -// 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 +#if YAKE_PLATFORM == PLATFORM_WIN32 -#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 + // 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_WINDOWS // Allow use of features specific to Windows 98 or later. -#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later. -#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 -#ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later. -#define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE. + #ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later. + #define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later. + #endif + + #ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later. + #define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE. + #endif + + #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers + // Windows Header Files: + #include <windows.h> +#elif YAKE_PLATFORM == PLATFORM_LINUX + #include <unistd.h> #endif -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers -// Windows Header Files: -#include <windows.h> - namespace yake { namespace net { @@ -64,7 +69,13 @@ namespace native { void sleep(const uint32 ms) { +#if YAKE_PLATFORM == PLATFORM_WIN32 ::Sleep(ms); +#elif YAKE_PLATFORM == PLATFORM_LINUX + ::usleep(ms); +#else + #error("No nativ sleep() configured!") +#endif } } // namespace native Modified: trunk/yake/src/net/detail/netEnetServerPacketConnection.cpp =================================================================== --- trunk/yake/src/net/detail/netEnetServerPacketConnection.cpp 2007-01-03 21:29:28 UTC (rev 1569) +++ trunk/yake/src/net/detail/netEnetServerPacketConnection.cpp 2007-01-03 21:31:06 UTC (rev 1570) @@ -225,7 +225,7 @@ // timeouts { const double currT = m_timer.getTime(); - const double deltaT = max(currT - m_timeOfLastUpdate, 0.0001); + const double deltaT = std::max(currT - m_timeOfLastUpdate, 0.0001); NET_ASSERT( deltaT > 0. )(deltaT); PeerToClientMap::iterator itEnd = m_clients.end(); PeerToClientMap::iterator it = m_clients.begin(); Modified: trunk/yake/src/plugins/physicsODE/OdeActor.cpp =================================================================== --- trunk/yake/src/plugins/physicsODE/OdeActor.cpp 2007-01-03 21:29:28 UTC (rev 1569) +++ trunk/yake/src/plugins/physicsODE/OdeActor.cpp 2007-01-03 21:31:06 UTC (rev 1570) @@ -274,7 +274,7 @@ //----------------------------------------------------- void OdeActor::destroyShape( IShape* pShape ) { - OdeGeom* pGeom = checked_cast<OdeGeom*>( pShape ); + OdeGeom* pGeom = checked_cast<OdeGeom*,IShape>( pShape ); ShapeList::iterator victim = std::find( mShapes.begin(), mShapes.end(), pGeom ); YAKE_ASSERT( victim != mShapes.end()).error("This shape is'nt in the list!"); Modified: trunk/yake/src/raf/yakeApplication.cpp =================================================================== --- trunk/yake/src/raf/yakeApplication.cpp 2007-01-03 21:29:28 UTC (rev 1569) +++ trunk/yake/src/raf/yakeApplication.cpp 2007-01-03 21:31:06 UTC (rev 1570) @@ -39,7 +39,6 @@ //# pragma comment(lib,"CEGUIBase.lib") #endif #endif -#include <OgreNoMemoryMacros.h> namespace yake { namespace raf { Modified: trunk/yake/yake/base/templates/yakeVector.h =================================================================== --- trunk/yake/yake/base/templates/yakeVector.h 2007-01-03 21:29:28 UTC (rev 1569) +++ trunk/yake/yake/base/templates/yakeVector.h 2007-01-03 21:31:06 UTC (rev 1570) @@ -309,8 +309,10 @@ //out << "<" << typeid(_Value).name() << ">"; out << "[" << int(rhs.size()) << "]"; out << "("; - typedef Vector<_Value,_Alloc> ctr_type; - for (ctr_type::const_iterator it = rhs.begin(); it != rhs.end(); ++it) + typedef Vector<_Value,_Alloc> ctr_t; + typedef typename ctr_t::const_iterator iter_t; + iter_t itEnd = rhs.end(); + for (iter_t it = rhs.begin(); it != itEnd; ++it) { if (it != rhs.begin()) out << ", "; Modified: trunk/yake/yake/base/yakeLog.h =================================================================== --- trunk/yake/yake/base/yakeLog.h 2007-01-03 21:29:28 UTC (rev 1569) +++ trunk/yake/yake/base/yakeLog.h 2007-01-03 21:31:06 UTC (rev 1570) @@ -163,10 +163,10 @@ # define TOSTRING(x) STRINGIFY (x) #endif - #define YAKE_LOG_INFORMATION( what ) yake::logging::log( yake::logging::S_INFORMATION, "[File: "__FILE__"@"TOSTRING(__LINE__)+"] ", what ); - #define YAKE_LOG_WARNING( what ) yake::logging::log( yake::logging::S_WARNING, "[File: "__FILE__"@"TOSTRING(__LINE__)+"] ", what ); - #define YAKE_LOG_ERROR( what ) yake::logging::log( yake::logging::S_ERROR, "[File: "__FILE__"@"TOSTRING(__LINE__)+"] ", what ); - #define YAKE_LOG( what ) yake::logging::log( yake::logging::S_INFORMATION, "[File: "__FILE__"@"TOSTRING(__LINE__)+"] ", what ); + #define YAKE_LOG_INFORMATION( what ) yake::logging::log( yake::logging::S_INFORMATION, "[File: \"__FILE__\"@\"TOSTRING(__LINE__)+\"] ", what ); + #define YAKE_LOG_WARNING( what ) yake::logging::log( yake::logging::S_WARNING, "[File: \"__FILE__\"@\"TOSTRING(__LINE__)+\"] ", what ); + #define YAKE_LOG_ERROR( what ) yake::logging::log( yake::logging::S_ERROR, "[File: \"__FILE__\"@\"TOSTRING(__LINE__)+\"] ", what ); + #define YAKE_LOG( what ) yake::logging::log( yake::logging::S_INFORMATION, "[File: \"__FILE__\"@\"TOSTRING(__LINE__)+\"] ", what ); } // namespace logging } // namespace yake Modified: trunk/yake/yake/msg/listener_mgr.h =================================================================== --- trunk/yake/yake/msg/listener_mgr.h 2007-01-03 21:29:28 UTC (rev 1569) +++ trunk/yake/yake/msg/listener_mgr.h 2007-01-03 21:31:06 UTC (rev 1570) @@ -202,7 +202,7 @@ } // source // process - for(listener_list::iterator itListener = listenerCache.begin(); itListener != listenerCache.end(); ++itListener) + for(typename listener_list::iterator itListener = listenerCache.begin(); itListener != listenerCache.end(); ++itListener) { (*itListener)->execute(*msg); } Modified: trunk/yake/yake/netsvc/netServiceHost.h =================================================================== --- trunk/yake/yake/netsvc/netServiceHost.h 2007-01-03 21:29:28 UTC (rev 1569) +++ trunk/yake/yake/netsvc/netServiceHost.h 2007-01-03 21:31:06 UTC (rev 1570) @@ -3,7 +3,8 @@ #include <boost/thread/mutex.hpp> #include <yake/netsvc/netPrerequisites.h> -#include <yake/netsvc/netService.h> +#include <yake/netsvc/netService.h> +#include <yake/base/templates/yakeSignals.h> #pragma warning(push) #pragma warning(disable: 4275) // C4275: non dll-interface class 'X' used as base for dll-interface 'Y' Modified: trunk/yake/yake/object/ObjectManager.inl =================================================================== --- trunk/yake/yake/object/ObjectManager.inl 2007-01-03 21:29:28 UTC (rev 1569) +++ trunk/yake/yake/object/ObjectManager.inl 2007-01-03 21:31:06 UTC (rev 1570) @@ -156,7 +156,7 @@ // check for existing alias assert( !util::map_contains(strIdAliases_,aliasName) ); - StringToClassIdMap::const_iterator itFindAlias = strIdAliases_.find( aliasName ); + typename StringToClassIdMap::const_iterator itFindAlias = strIdAliases_.find( aliasName ); if (itFindAlias != strIdAliases_.end()) { // Alias is already registered but with the same ClassId. => Return success. @@ -206,7 +206,7 @@ template<typename obj_type, typename objectid_type> obj_type* ObjectManager<obj_type,objectid_type>::getObject(const ObjectId id) const { - IdObjMap::const_iterator it = objs_.find( id ); + typename IdObjMap::const_iterator it = objs_.find( id ); return ( it == objs_.end() ? 0 : it->second ); } template<typename obj_type, typename objectid_type> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-01-03 21:29:29
|
Revision: 1569 http://svn.sourceforge.net/yake/?rev=1569&view=rev Author: psyclonist Date: 2007-01-03 13:29:28 -0800 (Wed, 03 Jan 2007) Log Message: ----------- Added Paths: ----------- trunk/yake/scripts/linux/ trunk/yake/scripts/linux/build.sh Added: trunk/yake/scripts/linux/build.sh =================================================================== --- trunk/yake/scripts/linux/build.sh (rev 0) +++ trunk/yake/scripts/linux/build.sh 2007-01-03 21:29:28 UTC (rev 1569) @@ -0,0 +1,4 @@ +#!/bin/bash +pushd ..\premake +export SOLUTION_TARGET_DIR=linux +premake --file yake.lua --target gnu --os linux -cc gcc Property changes on: trunk/yake/scripts/linux/build.sh ___________________________________________________________________ Name: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-01-03 18:22:25
|
Revision: 1568 http://svn.sourceforge.net/yake/?rev=1568&view=rev Author: psyclonist Date: 2007-01-03 10:22:25 -0800 (Wed, 03 Jan 2007) Log Message: ----------- added missing eol at eof Modified Paths: -------------- trunk/yake/src/audio/yakePCH.cpp Modified: trunk/yake/src/audio/yakePCH.cpp =================================================================== --- trunk/yake/src/audio/yakePCH.cpp 2006-12-20 21:50:25 UTC (rev 1567) +++ trunk/yake/src/audio/yakePCH.cpp 2007-01-03 18:22:25 UTC (rev 1568) @@ -24,4 +24,4 @@ source code distribution. ------------------------------------------------------------------------------------ */ -#include <yake/audio/yakePCH.h> \ No newline at end of file +#include <yake/audio/yakePCH.h> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2006-12-20 21:50:33
|
Revision: 1567 http://svn.sourceforge.net/yake/?rev=1567&view=rev Author: psyclonist Date: 2006-12-20 13:50:25 -0800 (Wed, 20 Dec 2006) Log Message: ----------- fixed includes, updated logging demo, demo binaries are now built into samples/bin/[debug|release|release_sym], fixed debug output printing (now restores console settings on win32) Modified Paths: -------------- trunk/yake/samples/sampleLog/demo.cpp trunk/yake/scripts/premake/copy_bin_to_samples.cmd trunk/yake/scripts/premake/tools.lua trunk/yake/src/base/native/win32/yakeDebug.cpp trunk/yake/src/base/yakeLog.cpp trunk/yake/yake/base/native/yakeNative.h trunk/yake/yake/base/yakeLog.h Added Paths: ----------- trunk/yake/yake/base/native/yakeThreads.h Modified: trunk/yake/samples/sampleLog/demo.cpp =================================================================== --- trunk/yake/samples/sampleLog/demo.cpp 2006-12-19 21:29:33 UTC (rev 1566) +++ trunk/yake/samples/sampleLog/demo.cpp 2006-12-20 21:50:25 UTC (rev 1567) @@ -10,6 +10,7 @@ YAKE_LOG_INFORMATION("aloha"); YAKE_LOG_WARNING("aloha"); yake::logging::log( yake::logging::S_ERROR, "Batman, help! ", 42 ); + yake::logging::log( 99, "custom severity" ); } catch (yake::Exception& ex) { Modified: trunk/yake/scripts/premake/copy_bin_to_samples.cmd =================================================================== --- trunk/yake/scripts/premake/copy_bin_to_samples.cmd 2006-12-19 21:29:33 UTC (rev 1566) +++ trunk/yake/scripts/premake/copy_bin_to_samples.cmd 2006-12-20 21:50:25 UTC (rev 1567) @@ -1,4 +1,3 @@ @echo off -xcopy /y ..\..\common\bin\*.dll ..\..\samples\bin\ xcopy /y ..\..\common\bin\*_d.dll ..\..\samples\bin\debug\ pause Modified: trunk/yake/scripts/premake/tools.lua =================================================================== --- trunk/yake/scripts/premake/tools.lua 2006-12-19 21:29:33 UTC (rev 1566) +++ trunk/yake/scripts/premake/tools.lua 2006-12-20 21:50:25 UTC (rev 1567) @@ -260,19 +260,19 @@ package.config.ReleaseLib = nil debug = package.config.Debug - debug.target = name.."_d"..(EXEFILE_SUFFIX) + debug.target = rootdir.."samples/bin/debug/"..name.."_d"..(EXEFILE_SUFFIX) debug.defines = {"_DEBUG"} debug.buildflags = {} releaseWithSym = package.config.ReleaseWithSymbols - releaseWithSym.target = name.."_sym"..(EXEFILE_SUFFIX) + releaseWithSym.target = rootdir.."samples/bin/release_sym/"..name.."_sym"..(EXEFILE_SUFFIX) releaseWithSym.defines = {} releaseWithSym.buildflags = { "optimize-speed" } release = package.config.Release - release.target = name..(EXEFILE_SUFFIX) + release.target = rootdir.."samples/bin/release/"..name..(EXEFILE_SUFFIX) release.defines = {} release.buildflags = { "no-symbols", Modified: trunk/yake/src/base/native/win32/yakeDebug.cpp =================================================================== --- trunk/yake/src/base/native/win32/yakeDebug.cpp 2006-12-19 21:29:33 UTC (rev 1566) +++ trunk/yake/src/base/native/win32/yakeDebug.cpp 2006-12-20 21:50:25 UTC (rev 1567) @@ -153,21 +153,33 @@ static bool consoleApp_; } logConsole_g; -void debug_Log( const char * what, DebugLog::Severity eSeverity, const char * source ) +void debug_Log( const std::string& what, logging::severity_t sev ) { - static char szBuffer[ 1024 ]; + if (what.empty()) + return; + // save settings + HANDLE outHandle = GetStdHandle( STD_ERROR_HANDLE ); + CONSOLE_SCREEN_BUFFER_INFO csbiInfo; + ::GetConsoleScreenBufferInfo( outHandle, &csbiInfo ); - WORD wColor = ( WORD )( eSeverity == DebugLog::INFORMATIONS ? FOREGROUND_GREEN : - ( eSeverity == DebugLog::WARNINGS ? FOREGROUND_GREEN | FOREGROUND_RED : FOREGROUND_RED ) ); - wColor |= FOREGROUND_INTENSITY; - - if( *source ) - sprintf( szBuffer, "%s: %s", source, what ); + // print + WORD wAttributes = FOREGROUND_INTENSITY; + if (sev <= logging::S_ERROR) + wAttributes |= FOREGROUND_RED; // red + else if (sev <= logging::S_WARNING) + wAttributes |= FOREGROUND_GREEN | FOREGROUND_RED; // yellow + else if (sev < logging::S_LAST) + wAttributes |= FOREGROUND_GREEN; // green else - sprintf( szBuffer, "%s", what ); + wAttributes |= FOREGROUND_GREEN | FOREGROUND_RED; // yellow + ::SetConsoleTextAttribute( outHandle, wAttributes ); + DWORD dwWritten = 0; - logConsole_g.Print( szBuffer, wColor ); - logConsole_g.Print( "\n", FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED ); + ::BOOL bSuccess = WriteConsoleA( outHandle, what.c_str(), ( DWORD )what.length(), &dwWritten, 0 ); + assert( bSuccess ); + + // restore settings + ::SetConsoleTextAttribute( outHandle, csbiInfo.wAttributes ); } void debug_Print( const char * string ) Modified: trunk/yake/src/base/yakeLog.cpp =================================================================== --- trunk/yake/src/base/yakeLog.cpp 2006-12-19 21:29:33 UTC (rev 1566) +++ trunk/yake/src/base/yakeLog.cpp 2006-12-20 21:50:25 UTC (rev 1567) @@ -26,6 +26,8 @@ */ #include <yake/base/yakePCH.h> #include <yake/base/yakeLog.h> +#include <yake/base/native/yakeNative.h> +#include <boost/lexical_cast.hpp> namespace yake { namespace logging { @@ -41,11 +43,15 @@ ss << "["; ss << toString(Severity(sev)); if (sev >= S_LAST) - ss << "(" << severity_t(sev) << ")"; + { + ss << "("; + ss << boost::lexical_cast<std::string>(sev); + ss << ")"; + } ss << "]"; ss << "\t" << msg << "\n"; - std::cerr << ss.str(); + native::debug_Log( ss.str(), sev ); } const char* toString(const Severity sev) @@ -95,10 +101,10 @@ if (itEnabled != instance_.enabledSeverities_.end() && !itEnabled->second) return; + const threadid_t threadId = native::getCurrentThreadId(); TargetFnList::const_iterator itEnd = targets_.end(); for (TargetFnList::const_iterator it = targets_.begin(); it != itEnd; ++it) { - const threadid_t threadId = native::getCurrentThreadId(); (**it)(sev,instance().procId_.c_str(),threadId,msg); } } Modified: trunk/yake/yake/base/native/yakeNative.h =================================================================== --- trunk/yake/yake/base/native/yakeNative.h 2006-12-19 21:29:33 UTC (rev 1566) +++ trunk/yake/yake/base/native/yakeNative.h 2006-12-20 21:50:25 UTC (rev 1567) @@ -30,11 +30,12 @@ //============================================================================ #include <yake/base/yakePrerequisites.h> #include <yake/base/yakeProcessor.h> +#include <yake/base/native/yakeThreads.h> +#include <yake/base/yakeLog.h> //============================================================================ namespace yake { - typedef uint32 threadid_t; namespace native { // Library Interface. @@ -44,17 +45,8 @@ YAKE_BASE_API void library_Free(LibraryHandle); // Debugging Interface. - struct DebugLog - { - enum Severity - { - INFORMATIONS, - WARNINGS, - ERRORS - }; - }; YAKE_BASE_API bool debug_AssertFailed( const char* pszMessage, const char* pszCondition, const char* pszFile, int nLine, bool& rbIgnoreAlways ); - YAKE_BASE_API void debug_Log( const char* what, DebugLog::Severity, const char* source ); + YAKE_BASE_API void debug_Log( const std::string& what, logging::severity_t ); YAKE_BASE_API void debug_Print( const char* string ); // Critical Section Interface. @@ -73,8 +65,6 @@ // Application Information Interface. YAKE_BASE_API const char* getApplicationDir(); - YAKE_BASE_API threadid_t getCurrentThreadId(); - } // native } // yake Added: trunk/yake/yake/base/native/yakeThreads.h =================================================================== --- trunk/yake/yake/base/native/yakeThreads.h (rev 0) +++ trunk/yake/yake/base/native/yakeThreads.h 2006-12-20 21:50:25 UTC (rev 1567) @@ -0,0 +1,44 @@ +/* + ------------------------------------------------------------------------------------ + This file is part of YAKE + Copyright \xA9 2004 The YAKE Team + For the latest information visit http://www.yake.org + ------------------------------------------------------------------------------------ + This program is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License as published by the Free Software + Foundation; either version 2 of the License, or (at your option) any later + version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License along with + this program; if not, write to the Free Software Foundation, Inc., 59 Temple + Place - Suite 330, Boston, MA 02111-1307, USA, or go to + http://www.gnu.org/copyleft/lesser.txt. + ------------------------------------------------------------------------------------ + If you are interested in another license model contact the Yake Team via + E-Mail: te...@ya.... + For more information see the LICENSE file in the root directory of the + source code distribution. + ------------------------------------------------------------------------------------ +*/ +#ifndef YAKE_BASE_NATIVE_THREADS_H +#define YAKE_BASE_NATIVE_THREADS_H + +//============================================================================ +#include <yake/base/yakePrerequisites.h> + +//============================================================================ +namespace yake { + typedef uint32 threadid_t; +namespace native { + + YAKE_BASE_API threadid_t getCurrentThreadId(); + +} // native +} // yake + +#endif // YAKE_BASE_NATIVE_THREADS_H + Modified: trunk/yake/yake/base/yakeLog.h =================================================================== --- trunk/yake/yake/base/yakeLog.h 2006-12-19 21:29:33 UTC (rev 1566) +++ trunk/yake/yake/base/yakeLog.h 2006-12-20 21:50:25 UTC (rev 1567) @@ -34,7 +34,7 @@ #include <yake/base/yakeString.h> #include <yake/base/templates/yakeSingleton.h> -#include <yake/base/native/yakeNative.h> +#include <yake/base/native/yakeThreads.h> #include <boost/thread/mutex.hpp> namespace yake { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2006-12-19 21:29:34
|
Revision: 1566 http://svn.sourceforge.net/yake/?rev=1566&view=rev Author: psyclonist Date: 2006-12-19 13:29:33 -0800 (Tue, 19 Dec 2006) Log Message: ----------- added another sample to premake script Modified Paths: -------------- trunk/yake/samples/raf/demo1/yakeDemo.cpp trunk/yake/samples/raf/demo1/yakePCH.cpp trunk/yake/samples/raf/demo1/yakePCH.h trunk/yake/scripts/premake/samples.lua Modified: trunk/yake/samples/raf/demo1/yakeDemo.cpp =================================================================== --- trunk/yake/samples/raf/demo1/yakeDemo.cpp 2006-12-19 21:09:38 UTC (rev 1565) +++ trunk/yake/samples/raf/demo1/yakeDemo.cpp 2006-12-19 21:29:33 UTC (rev 1566) @@ -1,7 +1,7 @@ -#include <yapp/samples/raf/demo1/yakePCH.h> +#include <samples/raf/demo1/yakePCH.h> #include <yake/audio/yakeAudio.h> #include <yake/input/yakeInput.h> -#include <yapp/raf/yakeRaf.h> +#include <yake/raf/yakeRaf.h> using namespace yake; @@ -9,7 +9,7 @@ struct TheConfiguration : public raf::ApplicationConfiguration { virtual StringVector getLibraries() - { return MakeStringVector() << "scriptingLua" << "graphicsOgre" << "inputOgre"; } + { return MakeStringVector() << YAKE_LIB("scriptingLua") << YAKE_LIB("graphicsOgre") << YAKE_LIB("inputOgre"); } virtual StringVector getInputSystems() { return MakeStringVector() << "ogre"; } Modified: trunk/yake/samples/raf/demo1/yakePCH.cpp =================================================================== --- trunk/yake/samples/raf/demo1/yakePCH.cpp 2006-12-19 21:09:38 UTC (rev 1565) +++ trunk/yake/samples/raf/demo1/yakePCH.cpp 2006-12-19 21:29:33 UTC (rev 1566) @@ -1 +1 @@ -#include <yapp/samples/raf/demo1/yakePCH.h> +#include <samples/raf/demo1/yakePCH.h> Modified: trunk/yake/samples/raf/demo1/yakePCH.h =================================================================== --- trunk/yake/samples/raf/demo1/yakePCH.h 2006-12-19 21:09:38 UTC (rev 1565) +++ trunk/yake/samples/raf/demo1/yakePCH.h 2006-12-19 21:29:33 UTC (rev 1566) @@ -6,4 +6,3 @@ // Yake #include <yake/base/yake.h> #include <yake/scripting/yakeScriptingSystem.h> -#include <yapp/base/yapp.h> Modified: trunk/yake/scripts/premake/samples.lua =================================================================== --- trunk/yake/scripts/premake/samples.lua 2006-12-19 21:09:38 UTC (rev 1565) +++ trunk/yake/scripts/premake/samples.lua 2006-12-19 21:29:33 UTC (rev 1566) @@ -47,3 +47,8 @@ makeSample("sampleRafMinimal","samples/raf/minimal") useComponent("base") useComponent("raf") + +-------------------------------------- +makeSample("sampleRafDemo1","samples/raf/demo1") +useComponent("base") +useComponent("raf") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2006-12-19 21:09:39
|
Revision: 1565 http://svn.sourceforge.net/yake/?rev=1565&view=rev Author: psyclonist Date: 2006-12-19 13:09:38 -0800 (Tue, 19 Dec 2006) Log Message: ----------- added sample "RafMinimal" to premake script, added missing includes, various interface improvements Modified Paths: -------------- trunk/yake/samples/raf/minimal/yakeDemo.cpp trunk/yake/samples/raf/minimal/yakePCH.cpp trunk/yake/samples/raf/minimal/yakePCH.h trunk/yake/scripts/premake/samples.lua trunk/yake/src/raf/yakeApplication.cpp trunk/yake/yake/base/yakeString.h trunk/yake/yake/ent/prerequisites.h trunk/yake/yake/input/yakeInputEventGenerator.h trunk/yake/yake/raf/yakeApplication.h Modified: trunk/yake/samples/raf/minimal/yakeDemo.cpp =================================================================== --- trunk/yake/samples/raf/minimal/yakeDemo.cpp 2006-12-19 20:27:35 UTC (rev 1564) +++ trunk/yake/samples/raf/minimal/yakeDemo.cpp 2006-12-19 21:09:38 UTC (rev 1565) @@ -1,6 +1,6 @@ -#include <yapp/samples/raf/minimal/yakePCH.h> +#include <samples/raf/minimal/yakePCH.h> #include <yake/audio/yakeAudio.h> -#include <yapp/raf/yakeRaf.h> +#include <yake/raf/yakeRaf.h> using namespace yake; @@ -8,7 +8,7 @@ struct TheConfiguration : public raf::ApplicationConfiguration { virtual StringVector getLibraries() - { return MakeStringVector() << "scriptingLua"; } + { return MakeStringVector() << YAKE_LIB("scriptingLua"); } virtual StringVector getScriptingSystems() { return MakeStringVector() << "lua"; } Modified: trunk/yake/samples/raf/minimal/yakePCH.cpp =================================================================== --- trunk/yake/samples/raf/minimal/yakePCH.cpp 2006-12-19 20:27:35 UTC (rev 1564) +++ trunk/yake/samples/raf/minimal/yakePCH.cpp 2006-12-19 21:09:38 UTC (rev 1565) @@ -1,2 +1,2 @@ -#include <yapp/samples/raf/minimal/yakePCH.h> +#include <samples/raf/minimal/yakePCH.h> Modified: trunk/yake/samples/raf/minimal/yakePCH.h =================================================================== --- trunk/yake/samples/raf/minimal/yakePCH.h 2006-12-19 20:27:35 UTC (rev 1564) +++ trunk/yake/samples/raf/minimal/yakePCH.h 2006-12-19 21:09:38 UTC (rev 1565) @@ -6,4 +6,3 @@ // Yake #include <yake/base/yake.h> #include <yake/scripting/yakeScriptingSystem.h> -#include <yapp/base/yapp.h> Modified: trunk/yake/scripts/premake/samples.lua =================================================================== --- trunk/yake/scripts/premake/samples.lua 2006-12-19 20:27:35 UTC (rev 1564) +++ trunk/yake/scripts/premake/samples.lua 2006-12-19 21:09:38 UTC (rev 1565) @@ -42,3 +42,8 @@ useComponent("scripting") useComponent("ent") useComponent("entLua") + +-------------------------------------- +makeSample("sampleRafMinimal","samples/raf/minimal") +useComponent("base") +useComponent("raf") Modified: trunk/yake/src/raf/yakeApplication.cpp =================================================================== --- trunk/yake/src/raf/yakeApplication.cpp 2006-12-19 20:27:35 UTC (rev 1564) +++ trunk/yake/src/raf/yakeApplication.cpp 2006-12-19 21:09:38 UTC (rev 1565) @@ -98,11 +98,15 @@ } catch (yake::Exception& e) { - YAKE_LOG_ERROR("RAF catched a Yake exception!\nException Message: " + e.getMessage()); + YAKE_LOG_ERROR("RAF caught a Yake exception!\nException Message: " + e.getMessage()); } + catch (std::exception& e) + { + YAKE_LOG_ERROR(String("RAF caught a std::exception!\nException Message: ") + e.what()); + } catch (...) { - YAKE_LOG_ERROR("RAF catched an unhandled exception!"); + YAKE_LOG_ERROR("RAF caught an unhandled exception!"); } return false; } Modified: trunk/yake/yake/base/yakeString.h =================================================================== --- trunk/yake/yake/base/yakeString.h 2006-12-19 20:27:35 UTC (rev 1564) +++ trunk/yake/yake/base/yakeString.h 2006-12-19 21:09:38 UTC (rev 1565) @@ -97,6 +97,11 @@ struct YAKE_BASE_API MakeStringVector { + MakeStringVector & operator<<(const String& str) + { + m_strings.push_back(str); + return *this; + } MakeStringVector & operator<<(const char * str) { if (str) Modified: trunk/yake/yake/ent/prerequisites.h =================================================================== --- trunk/yake/yake/ent/prerequisites.h 2006-12-19 20:27:35 UTC (rev 1564) +++ trunk/yake/yake/ent/prerequisites.h 2006-12-19 21:09:38 UTC (rev 1565) @@ -31,6 +31,7 @@ #include "yake/statemachine/fsm_core.h" #include "yake/base/yakeTaggedListenerManager.h" #include "yake/base/templates/yakeVector.h" +#include <yake/base/templates/yakeSignals.h> #include "yake/object/yakeObjects.h" #if defined(YAKE_ENT_EXPORTS) Modified: trunk/yake/yake/input/yakeInputEventGenerator.h =================================================================== --- trunk/yake/yake/input/yakeInputEventGenerator.h 2006-12-19 20:27:35 UTC (rev 1564) +++ trunk/yake/yake/input/yakeInputEventGenerator.h 2006-12-19 21:09:38 UTC (rev 1565) @@ -30,6 +30,7 @@ #ifndef YAKE_INPUT_PREREQUISITES_H #include <yake/input/yakePrerequisites.h> #endif +#include <yake/base/templates/yakeSignals.h> namespace yake { namespace input { Modified: trunk/yake/yake/raf/yakeApplication.h =================================================================== --- trunk/yake/yake/raf/yakeApplication.h 2006-12-19 20:27:35 UTC (rev 1564) +++ trunk/yake/yake/raf/yakeApplication.h 2006-12-19 21:09:38 UTC (rev 1565) @@ -27,6 +27,15 @@ #ifndef YAKE_RAF_APPLICATION_H #define YAKE_RAF_APPLICATION_H +// Define YAKE_LIB() to be used by Configuration objects. +#if defined(YAKE_DEBUG) +# define YAKE_LIB_SUFFIX "_d" +#else +# define YAKE_LIB_SUFFIX "" +#endif +#define YAKE_LIB(NAME) String(String("yake_")+NAME+YAKE_LIB_SUFFIX) + + namespace yake { namespace audio { class IAudioSystem; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2006-12-19 20:27:36
|
Revision: 1564 http://svn.sourceforge.net/yake/?rev=1564&view=rev Author: psyclonist Date: 2006-12-19 12:27:35 -0800 (Tue, 19 Dec 2006) Log Message: ----------- fixed compatibility macro Modified Paths: -------------- trunk/yake/yake/base/yakeLog.h Modified: trunk/yake/yake/base/yakeLog.h =================================================================== --- trunk/yake/yake/base/yakeLog.h 2006-12-19 20:18:16 UTC (rev 1563) +++ trunk/yake/yake/base/yakeLog.h 2006-12-19 20:27:35 UTC (rev 1564) @@ -166,7 +166,7 @@ #define YAKE_LOG_INFORMATION( what ) yake::logging::log( yake::logging::S_INFORMATION, "[File: "__FILE__"@"TOSTRING(__LINE__)+"] ", what ); #define YAKE_LOG_WARNING( what ) yake::logging::log( yake::logging::S_WARNING, "[File: "__FILE__"@"TOSTRING(__LINE__)+"] ", what ); #define YAKE_LOG_ERROR( what ) yake::logging::log( yake::logging::S_ERROR, "[File: "__FILE__"@"TOSTRING(__LINE__)+"] ", what ); - #define YAKE_LOG( what ) yake::logging::log::log_information( yake::logging::S_INFORMATION, "[File: "__FILE__"@"TOSTRING(__LINE__)+"] ", what ); + #define YAKE_LOG( what ) yake::logging::log( yake::logging::S_INFORMATION, "[File: "__FILE__"@"TOSTRING(__LINE__)+"] ", what ); } // namespace logging } // namespace yake This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2006-12-19 20:18:17
|
Revision: 1563 http://svn.sourceforge.net/yake/?rev=1563&view=rev Author: psyclonist Date: 2006-12-19 12:18:16 -0800 (Tue, 19 Dec 2006) Log Message: ----------- added missing includes Modified Paths: -------------- trunk/yake/yake/data/yakeDataSerializer.h trunk/yake/yake/graphics/yakeGraphicalWorld.h trunk/yake/yake/physics/yakePhysicsJoint.h Modified: trunk/yake/yake/data/yakeDataSerializer.h =================================================================== --- trunk/yake/yake/data/yakeDataSerializer.h 2006-12-19 20:17:53 UTC (rev 1562) +++ trunk/yake/yake/data/yakeDataSerializer.h 2006-12-19 20:18:16 UTC (rev 1563) @@ -29,6 +29,7 @@ #include <yake/data/yakeDataPrerequisites.h> #include <yake/base/templates/yakeVariant.h> +#include <yake/base/templates/yakeSignals.h> namespace yake { namespace data { Modified: trunk/yake/yake/graphics/yakeGraphicalWorld.h =================================================================== --- trunk/yake/yake/graphics/yakeGraphicalWorld.h 2006-12-19 20:17:53 UTC (rev 1562) +++ trunk/yake/yake/graphics/yakeGraphicalWorld.h 2006-12-19 20:18:16 UTC (rev 1563) @@ -33,6 +33,7 @@ #include <yake/graphics/yakeGraphics.h> #include <yake/graphics/yakeGraphicsSystem.h> #include <yake/graphics/yakeEntity.h> +#include <yake/base/templates/yakeSignals.h> //============================================================================ // INTERFACE STRUCTURES / UTILITY CLASSES Modified: trunk/yake/yake/physics/yakePhysicsJoint.h =================================================================== --- trunk/yake/yake/physics/yakePhysicsJoint.h 2006-12-19 20:17:53 UTC (rev 1562) +++ trunk/yake/yake/physics/yakePhysicsJoint.h 2006-12-19 20:18:16 UTC (rev 1563) @@ -30,6 +30,7 @@ #ifndef YAKE_PHYSICS_PREQREQUISITES_H # include <yake/physics/yakePhysicsPrerequisites.h> #endif +#include <yake/base/templates/yakeSignals.h> namespace yake { namespace physics { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |