yake-svn Mailing List for Yake Engine (Page 13)
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-04-24 17:21:36
|
Revision: 1737 http://svn.sourceforge.net/yake/?rev=1737&view=rev Author: psyclonist Date: 2007-04-24 10:21:37 -0700 (Tue, 24 Apr 2007) Log Message: ----------- Modified Paths: -------------- branches/v0-6-0/yake/samples/bin/debug/commclient.cfg branches/v0-6-0/yake/samples/bin/debug/commserver.cfg branches/v0-6-0/yake/samples/net/commclient/demo.cpp branches/v0-6-0/yake/samples/net/commserver/demo.cpp branches/v0-6-0/yake/src/netsvc/netServiceHost.cpp branches/v0-6-0/yake/src/netsvc/service/netServerCommService.cpp branches/v0-6-0/yake/yake/netsvc/netServiceHost.h branches/v0-6-0/yake/yake/netsvc/service/netServerCommService.h Modified: branches/v0-6-0/yake/samples/bin/debug/commclient.cfg =================================================================== --- branches/v0-6-0/yake/samples/bin/debug/commclient.cfg 2007-04-24 17:19:29 UTC (rev 1736) +++ branches/v0-6-0/yake/samples/bin/debug/commclient.cfg 2007-04-24 17:21:37 UTC (rev 1737) @@ -2,6 +2,7 @@ { client { - server 192.168.1.33:40000 + ;server 192.168.1.33:40000 + server 127.0.0.1:40000 } } Modified: branches/v0-6-0/yake/samples/bin/debug/commserver.cfg =================================================================== --- branches/v0-6-0/yake/samples/bin/debug/commserver.cfg 2007-04-24 17:19:29 UTC (rev 1736) +++ branches/v0-6-0/yake/samples/bin/debug/commserver.cfg 2007-04-24 17:21:37 UTC (rev 1737) @@ -2,6 +2,6 @@ { server { - bind 192.168.1.33:40000 + ;bind 192.168.1.33:40000 } } Modified: branches/v0-6-0/yake/samples/net/commclient/demo.cpp =================================================================== --- branches/v0-6-0/yake/samples/net/commclient/demo.cpp 2007-04-24 17:19:29 UTC (rev 1736) +++ branches/v0-6-0/yake/samples/net/commclient/demo.cpp 2007-04-24 17:21:37 UTC (rev 1737) @@ -145,7 +145,7 @@ { this->requestStop(); } - else if (key == '\n' || key == '0x13' || key == '1') + else if (key == 13) { commService_->sendMessageToChannel("#lobby",currInput_); std::cout << '\n' << "I said: " << currInput_ << "\n"; @@ -179,8 +179,11 @@ String currInput_; }; +#include <yake/base/yakeStderrLog.h> int main(int argc, char* argv[]) { + SharedPtr<logging::log_listener> to_stderr( new logging::stderr_listener() ); + logging::addListener( to_stderr.get() ); try { Configuration cfg; Modified: branches/v0-6-0/yake/samples/net/commserver/demo.cpp =================================================================== --- branches/v0-6-0/yake/samples/net/commserver/demo.cpp 2007-04-24 17:19:29 UTC (rev 1736) +++ branches/v0-6-0/yake/samples/net/commserver/demo.cpp 2007-04-24 17:21:37 UTC (rev 1737) @@ -26,10 +26,6 @@ // register services { net::ServerCommService* commService = new net::ServerCommService(CHANNELID_COMM); - host_.subscribeToClientAccepted( - boost::bind(&net::ServerCommService::onClientConnected,commService,_1) ); - host_.subscribeToClientDisconnected( - boost::bind(&net::ServerCommService::onClientDisconnected,commService,_1) ); host_.addService( net::IServicePtr(commService), "comm" ); /* @@ -100,8 +96,11 @@ }; +#include <yake/base/yakeStderrLog.h> int main(int argc, char* argv[]) { + SharedPtr<logging::log_listener> to_stderr( new logging::stderr_listener() ); + logging::addListener( to_stderr.get() ); try { Configuration cfg; if (argc > 1) Modified: branches/v0-6-0/yake/src/netsvc/netServiceHost.cpp =================================================================== --- branches/v0-6-0/yake/src/netsvc/netServiceHost.cpp 2007-04-24 17:19:29 UTC (rev 1736) +++ branches/v0-6-0/yake/src/netsvc/netServiceHost.cpp 2007-04-24 17:21:37 UTC (rev 1737) @@ -32,6 +32,22 @@ namespace net { //----------------------------------------------------------------------------- + IServerServiceHost::IServerServiceHost() + { + } + IServerServiceHost::~IServerServiceHost() + { + } + SignalConnection IServerServiceHost::subscribeToClientAccepted(const ClientAcceptedSignal::slot_type& slot) + { + return sigClientAccepted_.connect( slot ); + } + SignalConnection IServerServiceHost::subscribeToClientDisconnected(const ClientDisconnectedSignal::slot_type& slot) + { + return sigClientDisconnected_.connect( slot ); + } + + //----------------------------------------------------------------------------- IServiceHost::IServiceHost() : running_(false) { } Modified: branches/v0-6-0/yake/src/netsvc/service/netServerCommService.cpp =================================================================== --- branches/v0-6-0/yake/src/netsvc/service/netServerCommService.cpp 2007-04-24 17:19:29 UTC (rev 1736) +++ branches/v0-6-0/yake/src/netsvc/service/netServerCommService.cpp 2007-04-24 17:21:37 UTC (rev 1737) @@ -40,20 +40,37 @@ void ServerCommService::onStart(IServiceHost& host) { YAKE_LOG_INFORMATION("server-comm", "starting comm service"); + + // + try { + IServerServiceHost& serverHost = dynamic_cast<IServerServiceHost&>(host); + connections_ += serverHost.subscribeToClientAccepted( + boost::bind(&net::ServerCommService::onClientConnected,this,_1) ); + connections_ += serverHost.subscribeToClientDisconnected( + boost::bind(&net::ServerCommService::onClientDisconnected,this,_1) ); + } + catch (std::bad_cast&) + { + YAKE_LOG_ERROR("server-comm", "service host is not a 'server service host'!"); + throw net::Exception("service host is not a 'server service host'",__FILE__,__LINE__); + } + + // evtConn_ = host.getEventConnection(); evtConn_->registerEvent( s2cEvtCommMsg::ID, NetEvent::DIR_ANY, s2cEvtCommMsg::create, s2cEvtCommMsg::destroy ); evtConn_->registerEvent( c2sEvtCommJoinChannel::ID, NetEvent::DIR_ANY, c2sEvtCommJoinChannel::create, c2sEvtCommJoinChannel::destroy ); - host.subscribeToNetEvent( s2cEvtCommMsg::ID, commChannelId_, - boost::bind(&ServerCommService::onProcessMsg,this,_1,_2,_3)); - host.subscribeToNetEvent( c2sEvtCommJoinChannel::ID, commChannelId_, - boost::bind(&ServerCommService::onProcessJoinRequest,this,_1,_2,_3)); + connections_ += host.subscribeToNetEvent( s2cEvtCommMsg::ID, commChannelId_, + boost::bind(&ServerCommService::onProcessMsg,this,_1,_2,_3)); + connections_ += host.subscribeToNetEvent( c2sEvtCommJoinChannel::ID, commChannelId_, + boost::bind(&ServerCommService::onProcessJoinRequest,this,_1,_2,_3)); } void ServerCommService::onStop(IServiceHost&) { YAKE_LOG_INFORMATION("server-comm", "stopping comm service"); + connections_.clearAndDisconnectAll(); } void ServerCommService::onClientConnected(const PeerId pId) { Modified: branches/v0-6-0/yake/yake/netsvc/netServiceHost.h =================================================================== --- branches/v0-6-0/yake/yake/netsvc/netServiceHost.h 2007-04-24 17:19:29 UTC (rev 1736) +++ branches/v0-6-0/yake/yake/netsvc/netServiceHost.h 2007-04-24 17:21:37 UTC (rev 1737) @@ -153,7 +153,26 @@ }; SigMap sigMap_; }; + /** Base class for server-side service hosts which provides additional + signals. + */ + struct NETSVC_API IServerServiceHost : public IServiceHost + { + protected: + IServerServiceHost(); + virtual ~IServerServiceHost(); + public: + typedef SignalX<void(const net::PeerId)> PeerIdSignal; + typedef PeerIdSignal ClientAcceptedSignal; + typedef PeerIdSignal ClientDisconnectedSignal; + SignalConnection subscribeToClientAccepted(const ClientAcceptedSignal::slot_type& slot); + SignalConnection subscribeToClientDisconnected(const ClientDisconnectedSignal::slot_type&); + protected: + ClientAcceptedSignal sigClientAccepted_; + ClientDisconnectedSignal sigClientDisconnected_; + }; + } // namespace net } // namespace yake Modified: branches/v0-6-0/yake/yake/netsvc/service/netServerCommService.h =================================================================== --- branches/v0-6-0/yake/yake/netsvc/service/netServerCommService.h 2007-04-24 17:19:29 UTC (rev 1736) +++ branches/v0-6-0/yake/yake/netsvc/service/netServerCommService.h 2007-04-24 17:21:37 UTC (rev 1737) @@ -74,6 +74,8 @@ }; typedef std::map<String,ChannelEntry> ChannelList; ChannelList channels_; + + SignalConnectionGroup connections_; }; } // namespace net This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-04-24 17:19:31
|
Revision: 1736 http://svn.sourceforge.net/yake/?rev=1736&view=rev Author: psyclonist Date: 2007-04-24 10:19:29 -0700 (Tue, 24 Apr 2007) Log Message: ----------- added missing API ... Modified Paths: -------------- branches/v0-6-0/yake/yake/base/yakeConfigFile.h Modified: branches/v0-6-0/yake/yake/base/yakeConfigFile.h =================================================================== --- branches/v0-6-0/yake/yake/base/yakeConfigFile.h 2007-04-24 17:19:00 UTC (rev 1735) +++ branches/v0-6-0/yake/yake/base/yakeConfigFile.h 2007-04-24 17:19:29 UTC (rev 1736) @@ -52,7 +52,7 @@ namespace yake { namespace base { - struct Configuration + struct YAKE_BASE_API Configuration { // types typedef boost::property_tree::ptree tree_type; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-04-24 17:19:00
|
Revision: 1735 http://svn.sourceforge.net/yake/?rev=1735&view=rev Author: psyclonist Date: 2007-04-24 10:19:00 -0700 (Tue, 24 Apr 2007) Log Message: ----------- added SignalConnectionGroup Modified Paths: -------------- branches/v0-6-0/yake/src/base/yake.cpp branches/v0-6-0/yake/yake/base/templates/yakeSignals.h branches/v0-6-0/yake/yake/base/yake.h Added Paths: ----------- branches/v0-6-0/yake/src/base/templates/yakeSignals.cpp Added: branches/v0-6-0/yake/src/base/templates/yakeSignals.cpp =================================================================== --- branches/v0-6-0/yake/src/base/templates/yakeSignals.cpp (rev 0) +++ branches/v0-6-0/yake/src/base/templates/yakeSignals.cpp 2007-04-24 17:19:00 UTC (rev 1735) @@ -0,0 +1,53 @@ +/* + ------------------------------------------------------------------------------------ + This file is part of YAKE + Copyright (c) 2004 - 2008 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. + ------------------------------------------------------------------------------------ +*/ +#include <yake/base/yakePCH.h> +#include <yake/base/templates/yakeSignals.h> + +namespace yake { + + //----------------------------------------------------- + SignalConnectionGroup::SignalConnectionGroup() + { + } + SignalConnectionGroup::~SignalConnectionGroup() + { + this->clearAndDisconnectAll(); + } + void SignalConnectionGroup::clearAndDisconnectAll() + { + for (SignalConnectionList::const_iterator it = connections_.begin(); + it != connections_.end(); ++it) + (*it).disconnect(); + connections_.clear(); + } + SignalConnectionGroup& SignalConnectionGroup::operator += (const SignalConnection& connection) + { + connections_.push_back( connection ); + return *this; + } + +} // yake Modified: branches/v0-6-0/yake/src/base/yake.cpp =================================================================== --- branches/v0-6-0/yake/src/base/yake.cpp 2007-04-24 16:02:00 UTC (rev 1734) +++ branches/v0-6-0/yake/src/base/yake.cpp 2007-04-24 17:19:00 UTC (rev 1735) @@ -26,3 +26,4 @@ */ #include <yake/base/yakePCH.h> #include <yake/base/yake.h> +#include <yake/base/templates/yakeSignals.h> \ No newline at end of file Modified: branches/v0-6-0/yake/yake/base/templates/yakeSignals.h =================================================================== --- branches/v0-6-0/yake/yake/base/templates/yakeSignals.h 2007-04-24 16:02:00 UTC (rev 1734) +++ branches/v0-6-0/yake/yake/base/templates/yakeSignals.h 2007-04-24 17:19:00 UTC (rev 1735) @@ -122,6 +122,25 @@ namespace yake { + /** A SignalConnectionGroup acts as a container of SignalConnections + and is usually used to control the life time if subscriptions to signals. + */ + struct YAKE_BASE_API SignalConnectionGroup : public boost::noncopyable + { + /** Constructs a SignalConnectionGroup. */ + SignalConnectionGroup(); + /** Disconnects all connections contained in this SignalConnectionGroup. */ + ~SignalConnectionGroup(); + /** Add a new connection to this SignalConnectionGroup. */ + SignalConnectionGroup& operator += (const SignalConnection& connection); + /** Disconnects all connections contained in this SignalConnectionGroup + and clears all references to these connections. + */ + void clearAndDisconnectAll(); + private: + typedef std::deque<SignalConnection> SignalConnectionList; + SignalConnectionList connections_; + }; } // yake Modified: branches/v0-6-0/yake/yake/base/yake.h =================================================================== --- branches/v0-6-0/yake/yake/base/yake.h 2007-04-24 16:02:00 UTC (rev 1734) +++ branches/v0-6-0/yake/yake/base/yake.h 2007-04-24 17:19:00 UTC (rev 1735) @@ -60,6 +60,7 @@ //#include "yakeDebugOutputStream.h" #include "yakeLibrary.h" #include <yake/base/type_info.h> +#include "yakeConfigFile.h" #include "math/yakeQuaternion.h" #include "math/yakeVector3.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-04-24 16:02:00
|
Revision: 1734 http://svn.sourceforge.net/yake/?rev=1734&view=rev Author: psyclonist Date: 2007-04-24 09:02:00 -0700 (Tue, 24 Apr 2007) Log Message: ----------- Added Paths: ----------- branches/v0-6-0/yake/samples/bin/release/yake.graphics.ogre_config.cfg branches/v0-6-0/yake/samples/bin/release/yake.graphics.ogre_plugins.cfg branches/v0-6-0/yake/samples/bin/release/yake.graphics.ogre_resources.cfg Added: branches/v0-6-0/yake/samples/bin/release/yake.graphics.ogre_config.cfg =================================================================== --- branches/v0-6-0/yake/samples/bin/release/yake.graphics.ogre_config.cfg (rev 0) +++ branches/v0-6-0/yake/samples/bin/release/yake.graphics.ogre_config.cfg 2007-04-24 16:02:00 UTC (rev 1734) @@ -0,0 +1,4 @@ +;scenemanager=exterior_close +;world=terrain.cfg +shadowtype=modulated_texture +;show_config_dialog=no Added: branches/v0-6-0/yake/samples/bin/release/yake.graphics.ogre_plugins.cfg =================================================================== --- branches/v0-6-0/yake/samples/bin/release/yake.graphics.ogre_plugins.cfg (rev 0) +++ branches/v0-6-0/yake/samples/bin/release/yake.graphics.ogre_plugins.cfg 2007-04-24 16:02:00 UTC (rev 1734) @@ -0,0 +1,7 @@ +PluginFolder=OgrePlugins +Plugin=RenderSystem_Direct3D9.dll +#Plugin=RenderSystem_Direct3D7.dll +Plugin=RenderSystem_GL.dll +Plugin=Plugin_OctreeSceneManager.dll +Plugin=Plugin_ParticleFX.dll +Plugin=Plugin_CgProgramManager.dll Added: branches/v0-6-0/yake/samples/bin/release/yake.graphics.ogre_resources.cfg =================================================================== --- branches/v0-6-0/yake/samples/bin/release/yake.graphics.ogre_resources.cfg (rev 0) +++ branches/v0-6-0/yake/samples/bin/release/yake.graphics.ogre_resources.cfg 2007-04-24 16:02:00 UTC (rev 1734) @@ -0,0 +1,27 @@ +# Resource locations to be added to the 'boostrap' path +# This also contains the minimum you need to use the Ogre example framework +[Bootstrap] +Zip=../../../common/media/OgreCore.zip + +# Resource locations to be added to the default path +[General] +FileSystem=../../../common/media/ +FileSystem=../../../common/media/graphics.delorean/ +FileSystem=../../../common/media/graphics.meshes/ +FileSystem=../../../common/media/graphics.scenes/r2t/ +FileSystem=../../../common/media/graphics.scenes/arena0/ +FileSystem=../../../common/media/graphics.textures/ +FileSystem=../../../common/media/graphics.materials/programs/ +FileSystem=../../../common/media/graphics.materials/scripts/ +FileSystem=../../../common/media/graphics.materials/textures/ +FileSystem=../../../common/media/graphics.fx/ +FileSystem=../../../common/media/samples/dotLink/DynTest/ +FileSystem=../../../common/media/samples/dotScene/ +FileSystem=../../../common/media/gui/configs/ +FileSystem=../../../common/media/gui/fonts/ +FileSystem=../../../common/media/gui/imagesets/ +FileSystem=../../../common/media/gui/layouts/ +FileSystem=../../../common/media/gui/looknfeel/ +FileSystem=../../../common/media/gui/lua_scripts/ +FileSystem=../../../common/media/gui/schemes/ +Zip=../../../common/media/skybox.zip This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-04-24 15:14:10
|
Revision: 1733 http://svn.sourceforge.net/yake/?rev=1733&view=rev Author: psyclonist Date: 2007-04-24 08:12:03 -0700 (Tue, 24 Apr 2007) Log Message: ----------- added references to libraries for 'ReleaseLib' and 'DebugLib' targets Modified Paths: -------------- branches/v0-6-0/yake/scripts/premake/deps.lua Modified: branches/v0-6-0/yake/scripts/premake/deps.lua =================================================================== --- branches/v0-6-0/yake/scripts/premake/deps.lua 2007-04-24 15:08:05 UTC (rev 1732) +++ branches/v0-6-0/yake/scripts/premake/deps.lua 2007-04-24 15:12:03 UTC (rev 1733) @@ -13,11 +13,15 @@ defDepIncludePath("ogre", "dependencies/ogrenew/CEGUIRenderer/include") defDepLibraryPath("ogre","dependencies/ogrenew/lib") defDepLibrary("ogre","OgreMain","Release") +defDepLibrary("ogre","OgreMain","ReleaseLib") defDepLibrary("ogre","OgreMain","ReleaseWithSymbols") defDepLibrary("ogre","OgreMain_d","Debug") +defDepLibrary("ogre","OgreMain_d","DebugLib") defDepLibrary("ogre","OgreGUIRenderer","Release") +defDepLibrary("ogre","OgreGUIRenderer","ReleaseLib") defDepLibrary("ogre","OgreGUIRenderer","ReleaseWithSymbols") defDepLibrary("ogre","OgreGUIRenderer_d","Debug") +defDepLibrary("ogre","OgreGUIRenderer_d","DebugLib") -------------------------------------- -- Dependency package OIS @@ -26,8 +30,10 @@ defDepIncludePath("ois", "dependencies/ogrenew/include/OIS") defDepLibraryPath("ois","dependencies/ogrenew/lib") defDepLibrary("ois","OIS","Release") +defDepLibrary("ois","OIS","ReleaseLib") defDepLibrary("ois","OIS","ReleaseWithSymbols") defDepLibrary("ois","OIS_d","Debug") +defDepLibrary("ois","OIS_d","DebugLib") -------------------------------------- -- Dependency package OSM @@ -55,8 +61,10 @@ defDepIncludePath("cegui", "dependencies/ogrenew/include/CEGUI") defDepLibraryPath("cegui","dependencies/ogrenew/lib") defDepLibrary("cegui","CEGUIBase","Release") +defDepLibrary("cegui","CEGUIBase","ReleaseLib") defDepLibrary("cegui","CEGUIBase","ReleaseWithSymbols") defDepLibrary("cegui","CEGUIBase_d","Debug") +defDepLibrary("cegui","CEGUIBase_d","DebugLib") -------------------------------------- -- Dependency package ENET (standalone - i.e. compiled into yake::net) @@ -110,8 +118,10 @@ defDepLibraryPath("oalpp","dependencies/openalpp/lib") if (windows) then defDepLibrary("oalpp","oalpp","Release") + defDepLibrary("oalpp","oalpp","ReleaseLib") defDepLibrary("oalpp","oalpp","ReleaseWithSymbols") defDepLibrary("oalpp","oalppd","Debug") + defDepLibrary("oalpp","oalppd","DebugLib") elseif (linux) then defDepLibrary("oalpp","libopenalpp") end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-04-24 15:11:22
|
Revision: 1732 http://svn.sourceforge.net/yake/?rev=1732&view=rev Author: psyclonist Date: 2007-04-24 08:08:05 -0700 (Tue, 24 Apr 2007) Log Message: ----------- fixed build script Modified Paths: -------------- branches/v0-6-0/yake/scripts/msvc80/build.cmd Modified: branches/v0-6-0/yake/scripts/msvc80/build.cmd =================================================================== --- branches/v0-6-0/yake/scripts/msvc80/build.cmd 2007-04-24 11:53:42 UTC (rev 1731) +++ branches/v0-6-0/yake/scripts/msvc80/build.cmd 2007-04-24 15:08:05 UTC (rev 1732) @@ -1,10 +1,10 @@ @echo off +setlocal pushd ..\premake if not exist premake.exe ( echo warning: premake.exe not found in yake/scripts/premake. echo This file is expected to be found in yake/scripts/premake or in global path. ) -setlocal set SOLUTION_TARGET_DIR=msvc80 premake --file yake.lua --target vs2005 %1 %2 %3 popd This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-04-24 11:53:41
|
Revision: 1731 http://svn.sourceforge.net/yake/?rev=1731&view=rev Author: psyclonist Date: 2007-04-24 04:53:42 -0700 (Tue, 24 Apr 2007) Log Message: ----------- added make_manual.pl Added Paths: ----------- branches/v0-6-0/yake/scripts/tools/make_manual.pl Added: branches/v0-6-0/yake/scripts/tools/make_manual.pl =================================================================== --- branches/v0-6-0/yake/scripts/tools/make_manual.pl (rev 0) +++ branches/v0-6-0/yake/scripts/tools/make_manual.pl 2007-04-24 11:53:42 UTC (rev 1731) @@ -0,0 +1,4 @@ +print "Generating manual...\n\n"; + +`cd ../../documentation/manual && rst2html.py --link-stylesheet --stylesheet "yake-manual.css" yake-manual.txt > yake-manual.html`; + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-04-23 13:31:58
|
Revision: 1730 http://svn.sourceforge.net/yake/?rev=1730&view=rev Author: psyclonist Date: 2007-04-23 06:31:56 -0700 (Mon, 23 Apr 2007) Log Message: ----------- added inputOgreOIS plugin settings and variables for controlling building inputOgre and inputOgreOIS. Modified Paths: -------------- branches/v0-6-0/yake/scripts/premake/config.lua branches/v0-6-0/yake/scripts/premake/plugins.lua Modified: branches/v0-6-0/yake/scripts/premake/config.lua =================================================================== --- branches/v0-6-0/yake/scripts/premake/config.lua 2007-04-23 13:29:09 UTC (rev 1729) +++ branches/v0-6-0/yake/scripts/premake/config.lua 2007-04-23 13:31:56 UTC (rev 1730) @@ -26,10 +26,14 @@ -- Plugins -------------------------------------- --- !! UNUSED FOR NOW !! +-- NB only some of these are implemented: --PLUGIN_SCRIPTING_LUA = true PLUGIN_AUDIO_OPENAL = true PLUGIN_GRAPHICS_OGRE = true + +PLUGIN_INPUT_OGRE_OIS = false -- enable for OGRE 1.4+ +PLUGIN_INPUT_OGRE = true -- enable for OGRE 1.2 and 1.3 + PLUGIN_PHYSICS_ODE = true PLUGIN_PHYSICS_NX = false Modified: branches/v0-6-0/yake/scripts/premake/plugins.lua =================================================================== --- branches/v0-6-0/yake/scripts/premake/plugins.lua 2007-04-23 13:29:09 UTC (rev 1729) +++ branches/v0-6-0/yake/scripts/premake/plugins.lua 2007-04-23 13:31:56 UTC (rev 1730) @@ -65,13 +65,25 @@ useDep("cegui") -------------------------------------- -makeComponentPlugin("inputOgre") -addDependency("base") -addDependency("input") +if PLUGIN_INPUT_OGRE then + makeComponentPlugin("inputOgre") + addDependency("base") + addDependency("input") -useDep("ogre") + useDep("ogre") +end -------------------------------------- +if PLUGIN_INPUT_OGRE_OIS then + makeComponentPlugin("inputOgreOIS") + addDependency("base") + addDependency("input") + + useDep("ogre") + useDep("ois") +end + +-------------------------------------- makeComponentPlugin("graphicsOgre","YAKE_GRAPHICSCONCRETEAPI_EXPORTS") addDependency("base") addDependency("graphics") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-04-23 13:29:30
|
Revision: 1729 http://svn.sourceforge.net/yake/?rev=1729&view=rev Author: psyclonist Date: 2007-04-23 06:29:09 -0700 (Mon, 23 Apr 2007) Log Message: ----------- fixed target directory for 'Release' target DLLs Modified Paths: -------------- branches/v0-6-0/yake/scripts/premake/tools.lua Modified: branches/v0-6-0/yake/scripts/premake/tools.lua =================================================================== --- branches/v0-6-0/yake/scripts/premake/tools.lua 2007-04-20 21:55:07 UTC (rev 1728) +++ branches/v0-6-0/yake/scripts/premake/tools.lua 2007-04-23 13:29:09 UTC (rev 1729) @@ -177,7 +177,7 @@ end release = package.config.Release - release.target = targetBaseDir.."release/"..(LIBFILE_PREFIX)..name + release.target = (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-04-20 21:55:07
|
Revision: 1728 http://svn.sourceforge.net/yake/?rev=1728&view=rev Author: psyclonist Date: 2007-04-20 14:55:07 -0700 (Fri, 20 Apr 2007) Log Message: ----------- fixed issues in network samples Modified Paths: -------------- branches/v0-6-0/yake/samples/net/commserver/demo.cpp Modified: branches/v0-6-0/yake/samples/net/commserver/demo.cpp =================================================================== --- branches/v0-6-0/yake/samples/net/commserver/demo.cpp 2007-04-20 21:54:47 UTC (rev 1727) +++ branches/v0-6-0/yake/samples/net/commserver/demo.cpp 2007-04-20 21:55:07 UTC (rev 1728) @@ -5,95 +5,10 @@ #include <samples/net/common/common.h> #include <samples/net/roserver/ROServer.h> +#include <samples/net/common/thread_application.h> #include <conio.h> -namespace yake { - struct ThreadedApp : public boost::noncopyable - { - ThreadedApp() : stop_app_(false) - { - } - void requestStop() - { - stop_app_ = true; - } - bool stopRequested() const - { - return stop_app_; - } - void run() - { - try { - this->onRun(); - } - catch (const net::Exception& e) - { - YAKE_LOG_ERROR("app",String("Caught yake::net exception: ") + e.what()); - } - catch (const Exception& e) - { - YAKE_LOG_ERROR("app",String("Caught yake exception: ") + e.what()); - } - catch (const std::exception& e) - { - YAKE_LOG_ERROR("app",String("Caught exception: ") + e.what()); - } - catch (...) - { - YAKE_LOG_ERROR("app",String("Caught unknown exception.")); - } - } - private: - virtual void onRun() = 0; - private: - volatile bool stop_app_; - }; - struct NetServerApp : public ThreadedApp - { - NetServerApp() - { - } - typedef SignalX<void(void)> StepSignal; - yake::SignalConnection connectToStep(const StepSignal::slot_type& slot) - { - return stepSig_.connect(slot); - } - yake::SignalConnection connectToSynchronizedNetStep(const StepSignal::slot_type& slot) - { - return netStepSig_.connect(slot); - } - private: - virtual void onInit() = 0; - virtual void onStep() = 0; - virtual void onShutdown() = 0; - private: - StepSignal stepSig_; - StepSignal netStepSig_; - virtual void onRun() - { - ::SetThreadAffinityMask( ::GetCurrentThread(), 0x1 ); - this->onInit(); - - // main loop - while (!stopRequested()) - { - net::update(); - { - net::scoped_lock lck; - netStepSig_(); - } - stepSig_(); - this->onStep(); - net::native::sleep(0); - } - - this->onShutdown(); - //stepSig_.disconnectAll(); - } - }; -} // namespace yake - using namespace yake; struct ServerApp : public yake::NetServerApp This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-04-20 21:54:50
|
Revision: 1727 http://svn.sourceforge.net/yake/?rev=1727&view=rev Author: psyclonist Date: 2007-04-20 14:54:47 -0700 (Fri, 20 Apr 2007) Log Message: ----------- fixed issues in network samples Modified Paths: -------------- branches/v0-6-0/yake/samples/net/common/commonEvents.h Added Paths: ----------- branches/v0-6-0/yake/samples/net/common/thread_application.h Modified: branches/v0-6-0/yake/samples/net/common/commonEvents.h =================================================================== --- branches/v0-6-0/yake/samples/net/common/commonEvents.h 2007-04-20 21:29:41 UTC (rev 1726) +++ branches/v0-6-0/yake/samples/net/common/commonEvents.h 2007-04-20 21:54:47 UTC (rev 1727) @@ -2,6 +2,8 @@ #define TEST_COMMONEVENTS_H #include <yake/ent/ent.h> +#include <yake/net/net.h> +#include <yake/netsvc/netSvc.h> #include <map> @@ -11,50 +13,7 @@ const yake::net::ChannelId CHANNELID_COMM = 3; //--- -/* -// pull in types -typedef yake::net::INetEventConnection::CreateEventFn CreateEventFn; -typedef yake::net::INetEventConnection::DestroyEventFn DestroyEventFn; -// event pool -struct EventPool -{ - EventPool(); - ~EventPool(); - void register_class(const yake::net::NetEvent::id_type id, const CreateEventFn&, const DestroyEventFn&); - { - classes_.insert( std::make_pair( id, ClassEntry(createFn,destroyFn) ) ); - } - yake::net::NetEvent* create(const yake::net::NetEvent::id_type); - void destroy(yake::net::NetEvent*); - void lookup(const yake::net::NetEvent::id_type id, CreateEventFn&, DestroyEventFn&); -private: - typedef std::deque<yake::net::NetEvent*> EventList; - struct ClassEntry - { - CreateEventFn createFn_; - DestroyEventFn destroyFn_; - EventList avail_; - EventList taken_; - }; - typedef std::map<yake::net::NetEvent::id_type,ClassEntry> ClassMap; //<= perfect candidate for AssocVector - ClassMap classes_; -}; - -// event registrator for use with pooled events and event connections -template<typename evt_type> -bool s_registerEvent(const EventPool& evtpool, - const yake::net::IEventConnection& conn, - const yake::net::NetEvent::id_type id, - const yake::net::NetEvent::Direction dir) -{ - CreateEventFn createFn = boost::bind(&EventPool::create,&evtpool,_1); - DestroyEventFn destroyFn = boost::bind(&EventPool::destroy,&evtpool,_1);; - conn.registerEvent(id,dir,ce.createFn,ce.destroyFn); -} -*/ -//--- - struct version_t { yake::uint8 ver[3]; Added: branches/v0-6-0/yake/samples/net/common/thread_application.h =================================================================== --- branches/v0-6-0/yake/samples/net/common/thread_application.h (rev 0) +++ branches/v0-6-0/yake/samples/net/common/thread_application.h 2007-04-20 21:54:47 UTC (rev 1727) @@ -0,0 +1,93 @@ +#ifndef YAKE_SAMPLES_NET_THREADED_APP_H +#define YAKE_SAMPLES_NET_THREADED_APP_H + +#include <samples/net/common/common.h> + +namespace yake { + struct ThreadedApp : public boost::noncopyable + { + ThreadedApp() : stop_app_(false) + { + } + void requestStop() + { + stop_app_ = true; + } + bool stopRequested() const + { + return stop_app_; + } + void run() + { + try { + this->onRun(); + } + catch (const net::Exception& e) + { + YAKE_LOG_ERROR("app",String("Caught yake::net exception: ") + e.what()); + } + catch (const Exception& e) + { + YAKE_LOG_ERROR("app",String("Caught yake exception: ") + e.what()); + } + catch (const std::exception& e) + { + YAKE_LOG_ERROR("app",String("Caught exception: ") + e.what()); + } + catch (...) + { + YAKE_LOG_ERROR("app",String("Caught unknown exception.")); + } + } + private: + virtual void onRun() = 0; + private: + volatile bool stop_app_; + }; + struct NetServerApp : public ThreadedApp + { + NetServerApp() + { + } + typedef SignalX<void(void)> StepSignal; + yake::SignalConnection connectToStep(const StepSignal::slot_type& slot) + { + return stepSig_.connect(slot); + } + yake::SignalConnection connectToSynchronizedNetStep(const StepSignal::slot_type& slot) + { + return netStepSig_.connect(slot); + } + private: + virtual void onInit() = 0; + virtual void onStep() = 0; + virtual void onShutdown() = 0; + private: + StepSignal stepSig_; + StepSignal netStepSig_; + virtual void onRun() + { + ::SetThreadAffinityMask( ::GetCurrentThread(), 0x1 ); + this->onInit(); + + // main loop + while (!stopRequested()) + { + net::update(); + { + net::scoped_lock lck; + netStepSig_(); + } + stepSig_(); + this->onStep(); + net::native::sleep(0); + } + + this->onShutdown(); + //stepSig_.disconnectAll(); + } + }; +} // 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-04-20 21:29:39
|
Revision: 1726 http://svn.sourceforge.net/yake/?rev=1726&view=rev Author: psyclonist Date: 2007-04-20 14:29:41 -0700 (Fri, 20 Apr 2007) Log Message: ----------- enabled new plugin inputOgreOIS, fixed build settings Modified Paths: -------------- trunk/yake/samples/vehicle/yakeDemo.cpp trunk/yake/scripts/premake/config.lua trunk/yake/scripts/premake/plugins.lua trunk/yake/scripts/premake/tools.lua Modified: trunk/yake/samples/vehicle/yakeDemo.cpp =================================================================== --- trunk/yake/samples/vehicle/yakeDemo.cpp 2007-04-20 21:26:23 UTC (rev 1725) +++ trunk/yake/samples/vehicle/yakeDemo.cpp 2007-04-20 21:29:41 UTC (rev 1726) @@ -19,7 +19,7 @@ struct TheConfiguration : public raf::ApplicationConfiguration { virtual StringVector getLibraries() - { return MakeStringVector() << YAKE_DYNLIB_NAME("graphicsOgre") << YAKE_DYNLIB_NAME("inputOgre") << YAKE_DYNLIB_NAME("physicsOde"); } + { return MakeStringVector() << YAKE_DYNLIB_NAME("graphicsOgre") << YAKE_DYNLIB_NAME("inputOgreOIS") << YAKE_DYNLIB_NAME("physicsOde"); } //virtual StringVector getScriptingSystems() //{ return MakeStringVector() << "lua"; } @@ -28,7 +28,7 @@ { return MakeStringVector() << "ogre3d"; } virtual StringVector getInputSystems() - { return MakeStringVector() << "ogre"; } + { return MakeStringVector() << "ois"; } virtual StringVector getPhysicsSystems() { return MakeStringVector() << "ode"; } Modified: trunk/yake/scripts/premake/config.lua =================================================================== --- trunk/yake/scripts/premake/config.lua 2007-04-20 21:26:23 UTC (rev 1725) +++ trunk/yake/scripts/premake/config.lua 2007-04-20 21:29:41 UTC (rev 1726) @@ -26,10 +26,14 @@ -- Plugins -------------------------------------- --- !! UNUSED FOR NOW !! +-- NB only some of these are implemented: --PLUGIN_SCRIPTING_LUA = true PLUGIN_AUDIO_OPENAL = true PLUGIN_GRAPHICS_OGRE = true + +PLUGIN_INPUT_OGRE_OIS = true -- enable for OGRE 1.4+ +PLUGIN_INPUT_OGRE = false -- enable for OGRE 1.2 and 1.3 + PLUGIN_PHYSICS_ODE = true PLUGIN_PHYSICS_NX = false Modified: trunk/yake/scripts/premake/plugins.lua =================================================================== --- trunk/yake/scripts/premake/plugins.lua 2007-04-20 21:26:23 UTC (rev 1725) +++ trunk/yake/scripts/premake/plugins.lua 2007-04-20 21:29:41 UTC (rev 1726) @@ -65,13 +65,25 @@ useDep("cegui") -------------------------------------- -makeComponentPlugin("inputOgre") -addDependency("base") -addDependency("input") +if PLUGIN_INPUT_OGRE then + makeComponentPlugin("inputOgre") + addDependency("base") + addDependency("input") -useDep("ogre") + useDep("ogre") +end -------------------------------------- +if PLUGIN_INPUT_OGRE_OIS then + makeComponentPlugin("inputOgreOIS") + addDependency("base") + addDependency("input") + + useDep("ogre") + useDep("ois") +end + +-------------------------------------- makeComponentPlugin("graphicsOgre","YAKE_GRAPHICSCONCRETEAPI_EXPORTS") addDependency("base") addDependency("graphics") Modified: trunk/yake/scripts/premake/tools.lua =================================================================== --- trunk/yake/scripts/premake/tools.lua 2007-04-20 21:26:23 UTC (rev 1725) +++ trunk/yake/scripts/premake/tools.lua 2007-04-20 21:29:41 UTC (rev 1726) @@ -177,7 +177,7 @@ end release = package.config.Release - release.target = targetBaseDir.."release/"..(LIBFILE_PREFIX)..name + release.target = (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-04-20 21:26:21
|
Revision: 1725 http://svn.sourceforge.net/yake/?rev=1725&view=rev Author: psyclonist Date: 2007-04-20 14:26:23 -0700 (Fri, 20 Apr 2007) Log Message: ----------- fixed function declaration Modified Paths: -------------- branches/v0-6-0/yake/src/plugins/physicsODE/OdeAvatar.cpp branches/v0-6-0/yake/yake/physics/yakePhysicsAvatar.h Modified: branches/v0-6-0/yake/src/plugins/physicsODE/OdeAvatar.cpp =================================================================== --- branches/v0-6-0/yake/src/plugins/physicsODE/OdeAvatar.cpp 2007-04-20 21:06:53 UTC (rev 1724) +++ branches/v0-6-0/yake/src/plugins/physicsODE/OdeAvatar.cpp 2007-04-20 21:26:23 UTC (rev 1725) @@ -414,7 +414,7 @@ } //----------------------------------------------------- - void OdeAvatar::getShapeSize( real& radius, real& height ) + void OdeAvatar::getShapeSize( real& radius, real& height ) const { if (mShape->getType() == ST_CYLINDER) { Modified: branches/v0-6-0/yake/yake/physics/yakePhysicsAvatar.h =================================================================== --- branches/v0-6-0/yake/yake/physics/yakePhysicsAvatar.h 2007-04-20 21:06:53 UTC (rev 1724) +++ branches/v0-6-0/yake/yake/physics/yakePhysicsAvatar.h 2007-04-20 21:26:23 UTC (rev 1725) @@ -79,7 +79,7 @@ virtual void setAcceleration(const real acc) = 0; virtual real getAcceleration() const = 0; /** @remarks depends on implementation... */ - virtual void getShapeSize(real& radius, real& height) = 0; + virtual void getShapeSize(real& radius, real& height) const = 0; //@todo should actually be a Vector2! in plane of current avatar. y ("up") is ignored. virtual void move( const Vector3& ) = 0; // max values [-1,+1] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-04-20 21:06:51
|
Revision: 1724 http://svn.sourceforge.net/yake/?rev=1724&view=rev Author: psyclonist Date: 2007-04-20 14:06:53 -0700 (Fri, 20 Apr 2007) Log Message: ----------- Copied remotely Added Paths: ----------- branches/v0-6-0/ Copied: branches/v0-6-0 (from rev 1723, trunk) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-04-20 21:04:27
|
Revision: 1723 http://svn.sourceforge.net/yake/?rev=1723&view=rev Author: psyclonist Date: 2007-04-20 14:04:29 -0700 (Fri, 20 Apr 2007) Log Message: ----------- various fixes in samples due to yake::net interface changes Modified Paths: -------------- trunk/yake/samples/net/commclient/demo.cpp trunk/yake/samples/net/commserver/demo.cpp trunk/yake/samples/net/inprocess/common.h trunk/yake/samples/net/inprocess/demo.cpp trunk/yake/samples/net/roclient/ROClient.cpp trunk/yake/samples/net/roclient/ROClient.h trunk/yake/samples/net/roserver/ROServer.cpp trunk/yake/samples/net/roserver/ROServer.h Added Paths: ----------- trunk/yake/samples/net/common/common.h Modified: trunk/yake/samples/net/commclient/demo.cpp =================================================================== --- trunk/yake/samples/net/commclient/demo.cpp 2007-04-20 20:35:54 UTC (rev 1722) +++ trunk/yake/samples/net/commclient/demo.cpp 2007-04-20 21:04:29 UTC (rev 1723) @@ -4,8 +4,11 @@ #include <yake/netsvc/netSvc.h> // networking services and service hosts #include <yake/netsvc/service/netClientCommService.h> +#include <samples/net/common/common.h> #include <samples/net/roclient/ROClient.h> +#include <conio.h> + namespace yake { struct ThreadedApp : public boost::noncopyable { Added: trunk/yake/samples/net/common/common.h =================================================================== --- trunk/yake/samples/net/common/common.h (rev 0) +++ trunk/yake/samples/net/common/common.h 2007-04-20 21:04:29 UTC (rev 1723) @@ -0,0 +1,7 @@ +#ifndef YAKE_SAMPLES_NET_COMMON_H +#define YAKE_SAMPLES_NET_COMMON_H + +#include <yake/net/net.h> +#include <samples/net/common/commonEvents.h> + +#endif Modified: trunk/yake/samples/net/commserver/demo.cpp =================================================================== --- trunk/yake/samples/net/commserver/demo.cpp 2007-04-20 20:35:54 UTC (rev 1722) +++ trunk/yake/samples/net/commserver/demo.cpp 2007-04-20 21:04:29 UTC (rev 1723) @@ -3,8 +3,10 @@ #include <yake/netsvc/netSvc.h> // networking services and service hosts #include <yake/netsvc/service/netServerCommService.h> +#include <samples/net/common/common.h> #include <samples/net/roserver/ROServer.h> +#include <conio.h> namespace yake { struct ThreadedApp : public boost::noncopyable Modified: trunk/yake/samples/net/inprocess/common.h =================================================================== --- trunk/yake/samples/net/inprocess/common.h 2007-04-20 20:35:54 UTC (rev 1722) +++ trunk/yake/samples/net/inprocess/common.h 2007-04-20 21:04:29 UTC (rev 1723) @@ -5,6 +5,5 @@ #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/inprocess/demo.cpp =================================================================== --- trunk/yake/samples/net/inprocess/demo.cpp 2007-04-20 20:35:54 UTC (rev 1722) +++ trunk/yake/samples/net/inprocess/demo.cpp 2007-04-20 21:04:29 UTC (rev 1723) @@ -11,7 +11,7 @@ #include <yake/netrepsvc/netRepSvc.h> -//#include <samples/net/common/common.h> +#include <samples/net/common/common.h> #include <samples/net/roserver/ROServer.h> #include <samples/net/roclient/ROClient.h> @@ -20,6 +20,8 @@ #include <boost/lexical_cast.hpp> +#define COUTLN(X) std::cout << X << "\n"; + namespace yake { //server-side, atm. @@ -510,6 +512,7 @@ SignalConnectionList stepSigConns_; }; +#include <conio.h> int main(int argc, char* argv[]) { ::SetThreadAffinityMask( ::GetCurrentThread(), 0x1 ); Modified: trunk/yake/samples/net/roclient/ROClient.cpp =================================================================== --- trunk/yake/samples/net/roclient/ROClient.cpp 2007-04-20 20:35:54 UTC (rev 1722) +++ trunk/yake/samples/net/roclient/ROClient.cpp 2007-04-20 21:04:29 UTC (rev 1723) @@ -32,7 +32,7 @@ conn_->connect( serverAddr_ ); this->waitForStart(); - if (timedOut_.getCopy()) + if (timedOut_) return false; return true; @@ -46,12 +46,12 @@ } void client::waitForStart() { - while (!timedOut_.getCopy() && !packetConnStarted_) + while (!timedOut_ && !packetConnStarted_) { net::native::sleep(0); net::update(); } - if (timedOut_.getCopy()) + if (timedOut_) return; // set up event connection assert( conn_ ); @@ -61,7 +61,7 @@ evtConn_->setPolling( true ); - evtConn_->registerEvent( c2sEvtJoinReq::ID, net::NetEvent::DIR_ANY, + evtConn_->registerEvent( yake::net::c2sEvtJoinReq::ID, net::NetEvent::DIR_ANY, c2sEvtJoinReq::create, c2sEvtJoinReq::destroy ); evtConn_->registerEvent( s2cEvtJoinReqReply::ID, net::NetEvent::DIR_ANY, s2cEvtJoinReqReply::create, s2cEvtJoinReqReply::destroy ); Modified: trunk/yake/samples/net/roclient/ROClient.h =================================================================== --- trunk/yake/samples/net/roclient/ROClient.h 2007-04-20 20:35:54 UTC (rev 1722) +++ trunk/yake/samples/net/roclient/ROClient.h 2007-04-20 21:04:29 UTC (rev 1723) @@ -2,9 +2,6 @@ #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 { @@ -26,7 +23,7 @@ private: net::Address serverAddr_; yake::SharedPtr<net::IClientPacketConnection> conn_; - safe_var<bool> timedOut_; + mutable bool timedOut_; yake::SharedPtr<net::INetEventConnection> evtConn_; volatile bool packetConnStarted_; Modified: trunk/yake/samples/net/roserver/ROServer.cpp =================================================================== --- trunk/yake/samples/net/roserver/ROServer.cpp 2007-04-20 20:35:54 UTC (rev 1722) +++ trunk/yake/samples/net/roserver/ROServer.cpp 2007-04-20 21:04:29 UTC (rev 1723) @@ -1,4 +1,5 @@ #include <samples/net/inprocess/common.h> +#include <samples/net/common/common.h> #include <samples/net/roserver/ROServer.h> #include <boost/lexical_cast.hpp> Modified: trunk/yake/samples/net/roserver/ROServer.h =================================================================== --- trunk/yake/samples/net/roserver/ROServer.h 2007-04-20 20:35:54 UTC (rev 1722) +++ trunk/yake/samples/net/roserver/ROServer.h 2007-04-20 21:04:29 UTC (rev 1723) @@ -3,9 +3,6 @@ #include <yake/netsvc/netSvc.h> #include <yake/netrepsvc/netEvents.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 { @@ -33,8 +30,7 @@ virtual ~iclient() {} virtual net::PeerId getPeerId() const = 0; - virtual void sendEvent(const net::NetEvent&, - const net::SendOptions& = net::SendOptions().channel(CHANNELID_CONTROL)) = 0; + virtual void sendEvent(const net::NetEvent&, const net::SendOptions&) = 0; protected: iclient() {} private: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-04-20 20:35:53
|
Revision: 1722 http://svn.sourceforge.net/yake/?rev=1722&view=rev Author: psyclonist Date: 2007-04-20 13:35:54 -0700 (Fri, 20 Apr 2007) Log Message: ----------- Added Paths: ----------- trunk/yake/samples/net/common/commonEvents.h Added: trunk/yake/samples/net/common/commonEvents.h =================================================================== --- trunk/yake/samples/net/common/commonEvents.h (rev 0) +++ trunk/yake/samples/net/common/commonEvents.h 2007-04-20 20:35:54 UTC (rev 1722) @@ -0,0 +1,138 @@ +#ifndef TEST_COMMONEVENTS_H +#define TEST_COMMONEVENTS_H + +#include <yake/ent/ent.h> + +#include <map> + +const yake::net::ChannelId CHANNELID_CONTROL = 0; +const yake::net::ChannelId CHANNELID_SIMCTRL = 1; +const yake::net::ChannelId CHANNELID_SIMUPD = 2; +const yake::net::ChannelId CHANNELID_COMM = 3; + +//--- +/* +// pull in types +typedef yake::net::INetEventConnection::CreateEventFn CreateEventFn; +typedef yake::net::INetEventConnection::DestroyEventFn DestroyEventFn; + +// event pool +struct EventPool +{ + EventPool(); + ~EventPool(); + void register_class(const yake::net::NetEvent::id_type id, const CreateEventFn&, const DestroyEventFn&); + { + classes_.insert( std::make_pair( id, ClassEntry(createFn,destroyFn) ) ); + } + yake::net::NetEvent* create(const yake::net::NetEvent::id_type); + void destroy(yake::net::NetEvent*); + void lookup(const yake::net::NetEvent::id_type id, CreateEventFn&, DestroyEventFn&); +private: + typedef std::deque<yake::net::NetEvent*> EventList; + struct ClassEntry + { + CreateEventFn createFn_; + DestroyEventFn destroyFn_; + EventList avail_; + EventList taken_; + }; + typedef std::map<yake::net::NetEvent::id_type,ClassEntry> ClassMap; //<= perfect candidate for AssocVector + ClassMap classes_; +}; + +// event registrator for use with pooled events and event connections +template<typename evt_type> +bool s_registerEvent(const EventPool& evtpool, + const yake::net::IEventConnection& conn, + const yake::net::NetEvent::id_type id, + const yake::net::NetEvent::Direction dir) +{ + CreateEventFn createFn = boost::bind(&EventPool::create,&evtpool,_1); + DestroyEventFn destroyFn = boost::bind(&EventPool::destroy,&evtpool,_1);; + conn.registerEvent(id,dir,ce.createFn,ce.destroyFn); +} +*/ +//--- + +struct version_t +{ + yake::uint8 ver[3]; + version_t() + { + ver[0] = 0; + ver[1] = 0; + ver[2] = 0; + } + version_t(const yake::uint8 maj, const yake::uint8 min, const yake::uint8 b) + { + ver[0] = maj; + ver[1] = min; + ver[2] = b; + } +}; +inline yake::net::obitstream& operator << (yake::net::obitstream& out, const version_t& rhs) +{ + out.write( rhs.ver[0], 8 ); + out.write( rhs.ver[1], 8 ); + out.write( rhs.ver[2], 8 ); + return out; +} +inline yake::net::ibitstream& operator >> (yake::net::ibitstream& in, version_t& rhs) +{ + in.read( rhs.ver[0], 8 ); + in.read( rhs.ver[1], 8 ); + in.read( rhs.ver[2], 8 ); + return in; +} + +struct c2sEvtJoinReq : public yake::net::NetEvent +{ + DECLARE_EVENT( c2sEvtJoinReq, 1 ); + virtual bool pack(yake::net::obitstream& out) const + { + out << version;; + return true; + } + virtual bool unpack(yake::net::ibitstream& in) + { + in >> version; + return true; + } + version_t version; +}; + +struct s2cEvtJoinReqReply : public yake::net::NetEvent +{ + DECLARE_EVENT( s2cEvtJoinReqReply, 2 ); + virtual bool pack(yake::net::obitstream& out) const + { + out.write( accepted ); + //std::string msg("i wanna join!"); + //out << msg; + return true; + } + virtual bool unpack(yake::net::ibitstream& in) + { + in.read( accepted ); + + //std::string msg; + //in >> msg; + //COUTLN("MSG: " << msg.c_str()); + return true; + } + bool accepted; +}; +struct c2sEvtSimOk : public yake::net::NetEvent +{ + DECLARE_EVENT( c2sEvtSimOk, 11 ); + virtual bool pack(yake::net::obitstream& out) const + { + return true; + } + virtual bool unpack(yake::net::ibitstream& in) + { + return true; + } +}; +#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-04-20 20:35:42
|
Revision: 1721 http://svn.sourceforge.net/yake/?rev=1721&view=rev Author: psyclonist Date: 2007-04-20 13:35:41 -0700 (Fri, 20 Apr 2007) Log Message: ----------- Added Paths: ----------- trunk/yake/samples/net/common/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-04-20 19:55:36
|
Revision: 1720 http://svn.sourceforge.net/yake/?rev=1720&view=rev Author: psyclonist Date: 2007-04-20 12:55:27 -0700 (Fri, 20 Apr 2007) Log Message: ----------- applied avatar patch Modified Paths: -------------- trunk/yake/src/plugins/physicsODE/OdeActor.cpp trunk/yake/src/plugins/physicsODE/OdeAvatar.cpp trunk/yake/yake/physics/yakePhysicsAvatar.h Modified: trunk/yake/src/plugins/physicsODE/OdeActor.cpp =================================================================== --- trunk/yake/src/plugins/physicsODE/OdeActor.cpp 2007-04-20 19:52:28 UTC (rev 1719) +++ trunk/yake/src/plugins/physicsODE/OdeActor.cpp 2007-04-20 19:55:27 UTC (rev 1720) @@ -126,7 +126,10 @@ { OdeSphere* pSphere = new OdeSphere( currentSpace, this, pSphereDesc->radius ); - result = createTransformGeom( pSphere, rShapeDesc.position, rShapeDesc.orientation ); + if (this->type_ == ACTOR_DYNAMIC) + result = createTransformGeom( pSphere, rShapeDesc.position, rShapeDesc.orientation ); + else + result = pSphere; } else if ( const IShape::BoxDesc* pBoxDesc = dynamic_cast<const IShape::BoxDesc*>( pShapeDesc ) ) { @@ -135,7 +138,10 @@ pBoxDesc->dimensions.x, pBoxDesc->dimensions.y, pBoxDesc->dimensions.z ); - result = createTransformGeom( pBox, rShapeDesc.position, rShapeDesc.orientation ); + if (this->type_ == ACTOR_DYNAMIC) + result = createTransformGeom( pBox, rShapeDesc.position, rShapeDesc.orientation ); + else + result = pBox; } else if ( const IShape::PlaneDesc* pPlaneDesc = dynamic_cast<const IShape::PlaneDesc*>( pShapeDesc ) ) { @@ -160,7 +166,11 @@ this, pCapsuleDesc->radius, pCapsuleDesc->height ); - result = createTransformGeom( pCapsule, rShapeDesc.position, rShapeDesc.orientation ); + if (this->type_ == ACTOR_DYNAMIC) + result = createTransformGeom( pCapsule, rShapeDesc.position, rShapeDesc.orientation ); + else + result = pCapsule; + } else if ( const IShape::TriMeshDesc* pTriMeshDesc = dynamic_cast<const IShape::TriMeshDesc*>( pShapeDesc ) ) { @@ -175,8 +185,11 @@ OdeTriMesh* pMesh = new OdeTriMesh( currentSpace, this, data.id ); YAKE_ASSERT( pMesh ).error( "Mesh with such id wasn't found!" ); + if (this->type_ == ACTOR_DYNAMIC) + result = createTransformGeom( pMesh, rShapeDesc.position, rShapeDesc.orientation ); + else + result = pMesh; - result = createTransformGeom( pMesh, rShapeDesc.position, rShapeDesc.orientation ); } YAKE_ASSERT( result != 0 ).error( "Unsupported shape type!" ); @@ -196,8 +209,8 @@ // result->setOrientation( pShapeDesc->orientation ); // } - if( mShapes.size() > 1) - addGeomToSpace( result);// it's time to create space for shapes + //if( mShapes.size() > 1) + //addGeomToSpace( result);// it's time to create space for shapes } return result; @@ -464,6 +477,8 @@ YAKE_ASSERT( pShape ); YAKE_ASSERT( mBody || !(massOrDensity) ).warning( "Attempt to set mass on nonexistant body!" ); + + if (mBody) { dGeomSetBody( pShape->_getOdeGeomID(), mBody->_getOdeBody()->id() ); @@ -472,7 +487,14 @@ { mBody->_applyMassDescFromShapeDesc( rShapeDesc, massOrDensity, type ); } + dGeomSetCategoryBits (pShape->_getOdeGeomID(),0x2); + dGeomSetCollideBits (pShape->_getOdeGeomID(),0xFFFFFFFF); } + else + { + dGeomSetCategoryBits (pShape->_getOdeGeomID(),0x1); + dGeomSetCollideBits (pShape->_getOdeGeomID(),0xFFFFFFFE); + } return pShape; } Modified: trunk/yake/src/plugins/physicsODE/OdeAvatar.cpp =================================================================== --- trunk/yake/src/plugins/physicsODE/OdeAvatar.cpp 2007-04-20 19:52:28 UTC (rev 1719) +++ trunk/yake/src/plugins/physicsODE/OdeAvatar.cpp 2007-04-20 19:55:27 UTC (rev 1720) @@ -33,6 +33,7 @@ #include <yake/plugins/physicsODE/OdeShapes.h> #include <yake/plugins/physicsODE/OdeRay.h> + namespace yake { namespace physics { @@ -54,8 +55,12 @@ mJumpApplies(0), mJumpTime(real(0.)), mCurrDirection(Vector3::kUnitZ), - mUp(Vector3::kUnitY) + mUp(Vector3::kUnitY), + mSpeed (real(15.)), + mAcceleration (real (5.)) { + YAKE_ASSERT( mOdeWorld ); + mUp = mOdeWorld ? mOdeWorld->getGlobalGravity().normalisedCopy() : Vector3::kUnitY; } //----------------------------------------------------- @@ -83,37 +88,66 @@ mOrientation = desc.orientation; mDimensions = desc.dimensions; - mHeightAboveGround = mDimensions.y*real(0.75); + mHeightAboveGround = mDimensions.y; mHeightAboveGroundDuck = real(0.5) * mHeightAboveGround; + mCapsuleHeight = mDimensions.z; + mCapsuleHeightDuck = real(0.5) * mCapsuleHeight; + mSphereRadius = mDimensions.x * real(0.5); mSphereOffset = Vector3(0,mHeightAboveGround,0); + + + //check if the height above ground is too low. + if (mHeightAboveGround < (mSphereRadius + mCapsuleHeight * 0.5)) + mHeightAboveGround = (mSphereRadius + (mCapsuleHeight * 0.5)) + real (0.1); + + if (mHeightAboveGroundDuck < (mSphereRadius + mCapsuleHeightDuck * 0.5)) + mHeightAboveGroundDuck = (mSphereRadius + (mCapsuleHeightDuck * 0.5)) + real (0.1); + + //configure ray mRayLength = 100.; // set to expected maximum height above ground... or better... mTopRayLength = 100.; + //create actor mActor = static_cast<OdeActor*>(static_cast<IWorld*>(mOdeWorld)->createActor( ACTOR_DYNAMIC )); YAKE_ASSERT( mActor ); - OdeGeom* pShape = static_cast<OdeGeom*>(mActor->createShape( IShape::SphereDesc( real(mSphereRadius) ) )); + + //Check if mCapsuleHeight is null. If it is, create a sphere if not, create a capsule. + + if (mCapsuleHeight == real(0)) + mShape = static_cast<OdeGeom*>(mActor->createShape( IShape::SphereDesc( real(mSphereRadius) ) )); + else + mShape = static_cast<OdeGeom*>(mActor->createShape( IShape::CapsuleDesc (real(mCapsuleHeight),real(mSphereRadius) ) )); + YAKE_ASSERT (mShape); + + //Set position / orientation of the Avatar. mActor->setPosition( mPosition + mSphereOffset ); mActor->setOrientation( mOrientation ); - mActor->getBody().setMass( 1 ); + //Set avatar mass. + mActor->getBody().setMass( IBody::CapsuleMassDesc (mSphereRadius,mCapsuleHeight,1) ); + + //Setup rays. mRay = new OdeRay( mOdeWorld, real(mRayLength) ); mRay->setDirection( -mUp ); - mRay->ignore( pShape->_getOdeGeomID() ); + mRay->ignore( mShape->_getOdeGeomID() ); mTopRay = new OdeRay( mOdeWorld, real(mTopRayLength) ); mTopRay->setDirection( mUp ); - mTopRay->ignore( pShape->_getOdeGeomID() ); + mTopRay->ignore( mShape->_getOdeGeomID() ); mPreStepConn = mOdeWorld->subscribeToPreStepInternal( boost::bind(&OdeAvatar::onPreStepInternal,this,_1) ); mPostStepConn = mOdeWorld->subscribeToPostStepInternal( boost::bind(&OdeAvatar::onPostStepInternal,this,_1) ); #ifdef YAKE_DEBUG std::cout << "ACTOR\n"; - std::cout << " dim = " << mDimensions << "\n"; + std::cout << " radius = " << mSphereRadius << "\n"; + std::cout << " height = " << mCapsuleHeight << "\n"; + std::cout << " height duck = " << mCapsuleHeightDuck << "\n"; std::cout << " pos = " << mPosition << "\n"; std::cout << " heightAboveGround = " << mHeightAboveGround << "\n"; + std::cout << " heightAboveGround duck= " << mHeightAboveGroundDuck << "\n"; std::cout << " sphereOffset = " << mSphereOffset << "\n"; std::cout << "\n"; #endif @@ -141,7 +175,7 @@ if (mJumpStartInProgress) { - mActor->getBody().addForce( Force( mUp * 40, RF_GLOBAL, mJumpTime) ); + mActor->getBody().addForce( Force( mUp * 40 * mActor->getBody().getMass(), RF_GLOBAL, mJumpTime) ); mJumpStartInProgress = false; return; } @@ -155,6 +189,9 @@ const Vector3 localCurrLinVel = mOrientation.Inverse() * currLinVel; const real currUpVel = localCurrLinVel.y; + const real gravL = mOdeWorld->getGlobalGravity().length(); + const Vector3 gravA = mUp * gravL; // + // const real targetHeightAboveGround = mDucking ? mHeightAboveGroundDuck : mHeightAboveGround; if (mRay->intersects()) @@ -167,41 +204,55 @@ if (!mJumping) { const Point3 intPoint = mRay->intersectionPoint(); - + // this is the 'ideal position' const Point3 targetPoint = intPoint + mUp * targetHeightAboveGround; + // determine current height above ground/object const Vector3 vCurrHeightAboveGround = (mPosition - intPoint); + + const real currHeightAboveGround = fabs((mOrientation.Inverse() * vCurrHeightAboveGround).y); - + // distToTarget < 0 if player is above ideal position // distToTarget > 0 if player is beneath ideal position const real distToTarget = targetHeightAboveGround - currHeightAboveGround; - - if (distToTarget < 0.) // if above ideal position - do nothing + + if (distToTarget < (targetHeightAboveGround * real(-0.1))) // if above ideal position + 10%, just let the gravity do the job. {} - else if (distToTarget > 0.) // if below ideal position - correct + else // if below ideal position - correct { //@todo make all this spring and damping stuff configurable... - const real k = real(1.1); - const real f1 = k * real(20.) * distToTarget; - const real f2 = k * real(10.) * currUpVel; + const real k = real(10.); + const real f1 = k * real(50.) * distToTarget; + const real f2 = k * real(5.) * currUpVel; + real f = (f1 - f2); - // upwards force to keep the avatar floating - real f = (f1 - f2); - if (f > 0.001) - { - mActor->getBody().addForce( Force(mUp * f, RF_GLOBAL) ); - } + + // upwards force to keep the avatar floating. + // gravity force is removed/countered. + const Vector3 forceOnBodyBelow((- gravA * mActor->getBody().getMass())+(mUp * f)); + + //Apply force. + mActor->getBody().addForce(Force(forceOnBodyBelow, RF_GLOBAL)); + } + //Add the avatar weight to the object below. + + IActor * actor = mRay->intersectionActor (); + if (actor && (actor->getType() == ACTOR_DYNAMIC)) + { + actor->getBody().addForce(Force(gravA * mActor->getBody().getMass(),RF_GLOBAL,mRay->intersectionPoint(),RF_GLOBAL)); + } + } } // velocity/forces in avatar's movement plane: - Vector3 localTargetVel = mCurrMoveInPlane * 15./*maxVel*/; //@todo make configurable - localTargetVel = (localTargetVel - localCurrLinVel); + Vector3 localTargetVel = mCurrMoveInPlane * mSpeed; + localTargetVel = mAcceleration *(localTargetVel - localCurrLinVel); localTargetVel.y = 0.; if (mJumping) localTargetVel *= real(0.2); // player is less able to control direction during jump - so scale influence @@ -291,7 +342,7 @@ { if (mJumping) return; - mDucking = false; + duck(false); mJumpApplies = 0; mJumpTime = real(0.2); mJumping = true; @@ -308,6 +359,14 @@ void OdeAvatar::duck(const bool yes) { mDucking = yes; + + //Check if we are using a capsule. + if (mShape && mShape->getType() == ST_CYLINDER) + { + //Change the capsule size. + const real newHeight = mDucking ? mCapsuleHeightDuck : mCapsuleHeight; + dGeomCapsuleSetParams (dGeomTransformGetGeom (mShape->_getOdeGeomID()), mSphereRadius, newHeight); + } } //----------------------------------------------------- @@ -329,7 +388,8 @@ { YAKE_ASSERT( mActor ); mOrientation = rOrientation; - mActor->setOrientation( mOrientation ); + //Set actor orientation. The actor is rotated 90\xB0 around the X axis to set the top of the capsule on Y axis. TODO: do it as a function of mUp. + mActor->setOrientation( mOrientation * Quaternion (sqrt(0.5),sqrt(0.5),0,0) ); mCurrDirection = mOrientation * Vector3::kUnitZ; } @@ -344,7 +404,7 @@ //----------------------------------------------------- Quaternion OdeAvatar::getOrientation() const { - return mOrientation; + return mOrientation ; } //----------------------------------------------------- @@ -353,11 +413,19 @@ mUp = -rkGravityDirection.normalisedCopy(); } - //----------------------------------------------------- - void OdeAvatar::getShapeSize(real& radius, real& height) const - { - radius = mDimensions.x; - radius = mDimensions.y; - } + //----------------------------------------------------- + void OdeAvatar::getShapeSize( real& radius, real& height ) + { + if (mShape->getType() == ST_CYLINDER) + { + dGeomCapsuleGetParams (dGeomTransformGetGeom (mShape->_getOdeGeomID()), &radius, &height); + } + else + { + radius = mSphereRadius; + height = real(0); //@todo should we return 2*radius here? + } + } + } // physics } // yake Modified: trunk/yake/yake/physics/yakePhysicsAvatar.h =================================================================== --- trunk/yake/yake/physics/yakePhysicsAvatar.h 2007-04-20 19:52:28 UTC (rev 1719) +++ trunk/yake/yake/physics/yakePhysicsAvatar.h 2007-04-20 19:55:27 UTC (rev 1720) @@ -74,7 +74,14 @@ virtual void setGravityDirection( const Vector3& rkGravityDirection ) = 0; //virtual void setTargetVelocity( const Vector3 & rkTargetVelocity ) = 0; - //@todo should actually be a Vector2! in plane of current player. y ("up") is ignored. + virtual void setSpeed(const real speed) = 0; + virtual real getSpeed() const = 0; + virtual void setAcceleration(const real acc) = 0; + virtual real getAcceleration() const = 0; + /** @remarks depends on implementation... */ + virtual void getShapeSize(real& radius, real& height) = 0; + + //@todo should actually be a Vector2! in plane of current avatar. y ("up") is ignored. virtual void move( const Vector3& ) = 0; // max values [-1,+1] virtual void jump() = 0; virtual bool isJumping() const = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-04-20 19:52:27
|
Revision: 1719 http://svn.sourceforge.net/yake/?rev=1719&view=rev Author: psyclonist Date: 2007-04-20 12:52:28 -0700 (Fri, 20 Apr 2007) Log Message: ----------- updated version info for OpenAL Modified Paths: -------------- trunk/yake/dependencies/DEPENDENCIES Modified: trunk/yake/dependencies/DEPENDENCIES =================================================================== --- trunk/yake/dependencies/DEPENDENCIES 2007-04-20 19:51:21 UTC (rev 1718) +++ trunk/yake/dependencies/DEPENDENCIES 2007-04-20 19:52:28 UTC (rev 1719) @@ -11,7 +11,7 @@ ode/ ODE 0.8 ogrenew/ OGRE 1.2 (aka Dagon) cegui/ CEGUI 0.5+ -OpenAL/ +OpenAL/ OpenAL 1.1 openalpp/ OpenThreads/ oSceneLoaderLib/ pseudo-.scene loader :P (Community Edition 2006/28.07) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-04-20 19:51:24
|
Revision: 1718 http://svn.sourceforge.net/yake/?rev=1718&view=rev Author: psyclonist Date: 2007-04-20 12:51:21 -0700 (Fri, 20 Apr 2007) Log Message: ----------- added getShapeSize() Modified Paths: -------------- trunk/yake/src/plugins/physicsODE/OdeAvatar.cpp trunk/yake/yake/plugins/physicsODE/OdeAvatar.h Modified: trunk/yake/src/plugins/physicsODE/OdeAvatar.cpp =================================================================== --- trunk/yake/src/plugins/physicsODE/OdeAvatar.cpp 2007-04-20 15:48:31 UTC (rev 1717) +++ trunk/yake/src/plugins/physicsODE/OdeAvatar.cpp 2007-04-20 19:51:21 UTC (rev 1718) @@ -353,5 +353,11 @@ mUp = -rkGravityDirection.normalisedCopy(); } + //----------------------------------------------------- + void OdeAvatar::getShapeSize(real& radius, real& height) const + { + radius = mDimensions.x; + radius = mDimensions.y; + } } // physics } // yake Modified: trunk/yake/yake/plugins/physicsODE/OdeAvatar.h =================================================================== --- trunk/yake/yake/plugins/physicsODE/OdeAvatar.h 2007-04-20 15:48:31 UTC (rev 1717) +++ trunk/yake/yake/plugins/physicsODE/OdeAvatar.h 2007-04-20 19:51:21 UTC (rev 1718) @@ -79,7 +79,7 @@ virtual real getAcceleration() const { return mAcceleration; } - virtual void getShapeSize(real& radius, real& height); + virtual void getShapeSize(real& radius, real& height) const; YAKE_MEMBERSIGNAL_VIRTUALIMPL(public, void(bool), OnJump) YAKE_MEMBERSIGNAL_FIRE_FN1(public, OnJump, jumping, bool) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-04-20 15:48:30
|
Revision: 1717 http://svn.sourceforge.net/yake/?rev=1717&view=rev Author: psyclonist Date: 2007-04-20 08:48:31 -0700 (Fri, 20 Apr 2007) Log Message: ----------- add enet includes to yake::net project Modified Paths: -------------- trunk/yake/scripts/premake/yake.lua Modified: trunk/yake/scripts/premake/yake.lua =================================================================== --- trunk/yake/scripts/premake/yake.lua 2007-04-20 15:48:21 UTC (rev 1716) +++ trunk/yake/scripts/premake/yake.lua 2007-04-20 15:48:31 UTC (rev 1717) @@ -161,6 +161,7 @@ -- Yes, we compile ENet into yake::net therefore include the sources: addMatching("dependencies/enet/*.c") +addMatching("dependencies/enet/include/*.h") useDep("enet") -- adds include paths, libs... This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-04-20 15:48:21
|
Revision: 1716 http://svn.sourceforge.net/yake/?rev=1716&view=rev Author: psyclonist Date: 2007-04-20 08:48:21 -0700 (Fri, 20 Apr 2007) Log Message: ----------- fixes because of interface change in yake::scripting Modified Paths: -------------- trunk/yake/samples/ent/sampleEntFsm/demo.cpp trunk/yake/scripts/premake/samples.lua trunk/yake/src/bindings.lua/detail/ent.lua.cpp trunk/yake/src/ent/entity.cpp trunk/yake/src/ent/vm_holder.cpp trunk/yake/yake/ent/entity.h trunk/yake/yake/ent/vm_holder.h Added Paths: ----------- trunk/yake/yake/scripting/scripting.h Modified: trunk/yake/samples/ent/sampleEntFsm/demo.cpp =================================================================== --- trunk/yake/samples/ent/sampleEntFsm/demo.cpp 2007-04-20 15:25:55 UTC (rev 1715) +++ trunk/yake/samples/ent/sampleEntFsm/demo.cpp 2007-04-20 15:48:21 UTC (rev 1716) @@ -1,7 +1,9 @@ //#include "yake/base/yakePrerequisites.h" #include "yake/base/yake.h" #include "yake/ent/ent.h" -#include "yake/plugins/entLua/entLua.h" +#include "yake/scripting/scripting.h" +#include "yake/bindings.lua/bindings.lua.h" +#include "yake/bindings.lua/bindings.lua.ent.h" using namespace yake; @@ -22,8 +24,9 @@ { YAKE_LOG( "exappOML", "onObjectCreated: class is '" + obj->isA()->name() + "'" ); - scripting::IVM* vm = scriptingSys_.createVM(); + scripting::VMPtr vm = scriptingSys_.createVM(); YAKE_ASSERT( vm ); + bind_all( vm.get() ); ent::Entity* ent = ent::Entity::cast(obj); YAKE_ASSERT( ent ); @@ -34,9 +37,9 @@ ent::Entity* ent = ent::Entity::cast(obj); YAKE_ASSERT( ent ); - scripting::IVM* vm = ent->detachVM("main"); + scripting::VMPtr vm = ent->detachVM("main"); YAKE_ASSERT( vm ); - delete vm; + // vm will destruct when scope is left. } virtual void onObjectInitialized(ent::Object* obj) { Modified: trunk/yake/scripts/premake/samples.lua =================================================================== --- trunk/yake/scripts/premake/samples.lua 2007-04-20 15:25:55 UTC (rev 1715) +++ trunk/yake/scripts/premake/samples.lua 2007-04-20 15:48:21 UTC (rev 1716) @@ -45,7 +45,7 @@ useComponent("base") useComponent("scripting") useComponent("ent") -useComponent("entLua") +useComponent("bindings.lua") -------------------------------------- makeSample("sampleAudio1","samples/audio/demo1") Modified: trunk/yake/src/bindings.lua/detail/ent.lua.cpp =================================================================== --- trunk/yake/src/bindings.lua/detail/ent.lua.cpp 2007-04-20 15:25:55 UTC (rev 1715) +++ trunk/yake/src/bindings.lua/detail/ent.lua.cpp 2007-04-20 15:48:21 UTC (rev 1716) @@ -174,7 +174,7 @@ Entity* ent = Entity::cast(&obj); if (ent) { - scripting::IVM* vm = ent->getFsmVM(); + scripting::VMPtr vm = ent->getFsmVM(); YAKE_ASSERT( vm ); detail::executeOfTable_2(*vm,"state",state,"on_enter"); } @@ -184,7 +184,7 @@ Entity* ent = Entity::cast(&obj); if (ent) { - scripting::IVM* vm = ent->getFsmVM(); + scripting::VMPtr vm = ent->getFsmVM(); YAKE_ASSERT( vm ); detail::executeOfTable_2(*vm,"state",state,"on_exit"); } Modified: trunk/yake/src/ent/entity.cpp =================================================================== --- trunk/yake/src/ent/entity.cpp 2007-04-20 15:25:55 UTC (rev 1715) +++ trunk/yake/src/ent/entity.cpp 2007-04-20 15:48:21 UTC (rev 1716) @@ -76,18 +76,22 @@ { return vms_.subscribeToVmDetached(slot); } - bool Entity::attachVM(scripting::IVM* vm,const String& tag) + bool Entity::attachVM(scripting::VMPtr vm,const String& tag) { return vms_.attachVM(vm,tag); } - scripting::IVM* Entity::detachVM(const String& tag) + scripting::VMPtr Entity::detachVM(const String& tag) { return vms_.detachVM(tag); } - scripting::IVM* Entity::getVM(const String& tag) const + scripting::VMPtr Entity::getVM(const String& tag) const { return vms_.getVM(tag); } + scripting::VMPtr Entity::getFsmVM() const + { + return this->getVM("main"); + } void Entity::setModel(ModelPtr modelPtr) { model_ = modelPtr; Modified: trunk/yake/src/ent/vm_holder.cpp =================================================================== --- trunk/yake/src/ent/vm_holder.cpp 2007-04-20 15:25:55 UTC (rev 1715) +++ trunk/yake/src/ent/vm_holder.cpp 2007-04-20 15:48:21 UTC (rev 1716) @@ -44,7 +44,7 @@ */ vms_.clear(); } - bool VMHolder::attachVM(scripting::IVM* vm,const String& tag) + bool VMHolder::attachVM(scripting::VMPtr vm,const String& tag) { YAKE_ASSERT(vm)(tag).debug("null vm"); if (!vm) @@ -60,29 +60,29 @@ sigAttached_(tag,vm); return true; } - scripting::IVM* VMHolder::detachVM(const String &tag) + scripting::VMPtr VMHolder::detachVM(const String &tag) { YAKE_ASSERT( !tag.empty() )(tag).debug("invalid tag"); if (tag.empty()) - return 0; + return scripting::VMPtr(); VmMap::iterator it = vms_.find(tag); YAKE_ASSERT( it != vms_.end() )(tag).debug("tag not found."); if (vms_.end() == it) - return 0; - scripting::IVM* vm = it->second; + return scripting::VMPtr(); + scripting::VMPtr vm = it->second; vms_.erase(tag); sigAttached_(tag,vm); return vm; } - scripting::IVM* VMHolder::getVM(const String &tag) const + scripting::VMPtr VMHolder::getVM(const String &tag) const { YAKE_ASSERT( !tag.empty() )(tag).debug("invalid tag"); if (tag.empty()) - return 0; + return scripting::VMPtr(); VmMap::const_iterator it = vms_.find(tag); YAKE_ASSERT( it != vms_.end() )(tag).debug("tag not found."); if (vms_.end() == it) - return 0; + return scripting::VMPtr(); return it->second; } SignalConnection VMHolder::subsribeToVmAttached(const VmAttachedSignal::slot_type& slot) Modified: trunk/yake/yake/ent/entity.h =================================================================== --- trunk/yake/yake/ent/entity.h 2007-04-20 15:25:55 UTC (rev 1715) +++ trunk/yake/yake/ent/entity.h 2007-04-20 15:48:21 UTC (rev 1716) @@ -60,14 +60,11 @@ SignalConnection subsribeToVmAttached(const VMHolder::VmAttachedSignal::slot_type&); SignalConnection subscribeToVmDetached(const VMHolder::VmDetachedSignal::slot_type&); - bool attachVM(scripting::IVM*,const String& tag); - scripting::IVM* detachVM(const String& tag); - scripting::IVM* getVM(const String& tag) const; + bool attachVM(scripting::VMPtr,const String& tag); + scripting::VMPtr detachVM(const String& tag); + scripting::VMPtr getVM(const String& tag) const; - scripting::IVM* getFsmVM() const - { - return this->getVM("main"); - } + scripting::VMPtr getFsmVM() const; void setModel(ModelPtr); ModelPtr getModel() const; @@ -94,7 +91,7 @@ #endif // signals - typedef boost::signal<void(const String&,scripting::IVM*)> VmInitializedSignal; + typedef boost::signal<void(const String&,scripting::VMPtr)> VmInitializedSignal; boost::signals::connection subscribeToVmInitialized(const VmInitializedSignal::slot_type&); private: Modified: trunk/yake/yake/ent/vm_holder.h =================================================================== --- trunk/yake/yake/ent/vm_holder.h 2007-04-20 15:25:55 UTC (rev 1715) +++ trunk/yake/yake/ent/vm_holder.h 2007-04-20 15:48:21 UTC (rev 1716) @@ -29,12 +29,9 @@ #include "yake/ent/prerequisites.h" #include "yake/ent/object_listener.h" +#include "yake/scripting/scripting.h" namespace yake { -namespace scripting { - class IVM; - class IScriptingSystem; -} namespace ent { /** Container for scripting machines with optional tags for identification. @@ -50,19 +47,19 @@ // operations /** @note Currently ownership is not transferred! */ - bool attachVM(scripting::IVM*,const String& tag); - scripting::IVM* detachVM(const String& tag); - scripting::IVM* getVM(const String& tag) const; + bool attachVM(scripting::VMPtr,const String& tag); + scripting::VMPtr detachVM(const String& tag); + scripting::VMPtr getVM(const String& tag) const; // signals - typedef SignalX<void(const String&,scripting::IVM*)> VmAttachedSignal; + typedef SignalX<void(const String&,scripting::VMPtr)> VmAttachedSignal; SignalConnection subsribeToVmAttached(const VmAttachedSignal::slot_type&); - typedef SignalX<void(const String&,scripting::IVM*)> VmDetachedSignal; + typedef SignalX<void(const String&,scripting::VMPtr)> VmDetachedSignal; SignalConnection subscribeToVmDetached(const VmDetachedSignal::slot_type&); private: VmAttachedSignal sigAttached_; VmDetachedSignal sigDetached_; - typedef std::map<String,scripting::IVM*> VmMap; + typedef std::map<String,scripting::VMPtr> VmMap; VmMap vms_; }; Added: trunk/yake/yake/scripting/scripting.h =================================================================== --- trunk/yake/yake/scripting/scripting.h (rev 0) +++ trunk/yake/yake/scripting/scripting.h 2007-04-20 15:48:21 UTC (rev 1716) @@ -0,0 +1,33 @@ +/* + ------------------------------------------------------------------------------------ + This file is part of YAKE + Copyright (c) 2004 - 2008 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_SCRIPTING_H +#define YAKE_SCRIPTING_H + +#include <yake/scripting/yakeScriptingSystem.h> + +#endif + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-04-20 15:25:54
|
Revision: 1715 http://svn.sourceforge.net/yake/?rev=1715&view=rev Author: psyclonist Date: 2007-04-20 08:25:55 -0700 (Fri, 20 Apr 2007) Log Message: ----------- fix because of interface change in yake::scripting Modified Paths: -------------- trunk/yake/samples/base/scripting/lua/yakeDemo.cpp Modified: trunk/yake/samples/base/scripting/lua/yakeDemo.cpp =================================================================== --- trunk/yake/samples/base/scripting/lua/yakeDemo.cpp 2007-04-20 15:20:47 UTC (rev 1714) +++ trunk/yake/samples/base/scripting/lua/yakeDemo.cpp 2007-04-20 15:25:55 UTC (rev 1715) @@ -31,7 +31,7 @@ SharedPtr<scripting::IScriptingSystem> scriptingSys = templates::create_default<scripting::IScriptingSystem>(); SharedPtr<scripting::IScriptingSystem> scriptingBindings = templates::create_default<scripting::IScriptingSystem>(); - SharedPtr<scripting::IVM> vm( scriptingSys->createVM() ); + scripting::VMPtr vm( scriptingSys->createVM() ); YAKE_ASSERT( vm ); bind_all( vm.get() ); @@ -42,9 +42,9 @@ // Execute a script created from a file. { - SharedPtr<scripting::IScript> script( scriptingSys->createScriptFromFile("../../../common/media/samples/scriptingLua/test.lua") ); + scripting::ScriptPtr script( scriptingSys->createScriptFromFile("../../../common/media/samples/scriptingLua/test.lua") ); YAKE_ASSERT( script ); - vm->execute( script.get() ); + vm->execute( script ); } vm.reset(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-04-20 15:21:05
|
Revision: 1714 http://svn.sourceforge.net/yake/?rev=1714&view=rev Author: psyclonist Date: 2007-04-20 08:20:47 -0700 (Fri, 20 Apr 2007) Log Message: ----------- fix because of interface change in yake::audio Modified Paths: -------------- trunk/yake/src/raf/yakeRtApplicationState.cpp Modified: trunk/yake/src/raf/yakeRtApplicationState.cpp =================================================================== --- trunk/yake/src/raf/yakeRtApplicationState.cpp 2007-04-20 15:18:43 UTC (rev 1713) +++ trunk/yake/src/raf/yakeRtApplicationState.cpp 2007-04-20 15:20:47 UTC (rev 1714) @@ -211,7 +211,7 @@ { audio::IAudioSystem* pSys = getApp().getAudioSystem(); YAKE_ASSERT( pSys ); - mAWorld.reset( pSys->createWorld() ); + mAWorld = pSys->createWorld(); } if (!mAWorld.get()) YAKE_EXCEPT("We really need a valid audio world here! Bailing out!"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2007-04-20 15:18:55
|
Revision: 1713 http://svn.sourceforge.net/yake/?rev=1713&view=rev Author: psyclonist Date: 2007-04-20 08:18:43 -0700 (Fri, 20 Apr 2007) Log Message: ----------- updated dependency info Modified Paths: -------------- trunk/yake/dependencies/DEPENDENCIES Modified: trunk/yake/dependencies/DEPENDENCIES =================================================================== --- trunk/yake/dependencies/DEPENDENCIES 2007-04-20 14:40:52 UTC (rev 1712) +++ trunk/yake/dependencies/DEPENDENCIES 2007-04-20 15:18:43 UTC (rev 1713) @@ -14,7 +14,7 @@ OpenAL/ openalpp/ OpenThreads/ -oSceneLoaderLib/ pseudo-.scene loader :P (used with Ogre) +oSceneLoaderLib/ pseudo-.scene loader :P (Community Edition 2006/28.07) tinyxml/ freealut/ freealut 1.1.0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |