You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(11) |
Apr
(47) |
May
(14) |
Jun
|
Jul
(73) |
Aug
(4) |
Sep
(2) |
Oct
(60) |
Nov
(48) |
Dec
(66) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
(1) |
Mar
(27) |
Apr
(82) |
May
(89) |
Jun
(91) |
Jul
(44) |
Aug
(53) |
Sep
(113) |
Oct
(20) |
Nov
(37) |
Dec
(10) |
2008 |
Jan
|
Feb
(2) |
Mar
|
Apr
(2) |
May
(21) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2009 |
Jan
(76) |
Feb
(89) |
Mar
(52) |
Apr
(11) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(27) |
2010 |
Jan
(11) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(9) |
Sep
|
Oct
|
Nov
|
Dec
(14) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(2) |
Sep
(11) |
Oct
(3) |
Nov
|
Dec
|
2013 |
Jan
(4) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ult...@us...> - 2006-11-30 02:51:53
|
Revision: 235 http://svn.sourceforge.net/opengate/?rev=235&view=rev Author: ultrasick Date: 2006-11-29 18:51:52 -0800 (Wed, 29 Nov 2006) Log Message: ----------- uploaded new stuff from opacma Added Paths: ----------- data/Commodities/barium.xml data/Commodities/cesium.xml data/Commodities/chemicals.xml data/Commodities/chromium.xml data/Commodities/fuel_cells.xml data/Commodities/helium.xml data/Commodities/iron.xml data/Commodities/medical_supplies.xml data/Commodities/nitrogen.xml data/Commodities/octavia_light.xml data/Commodities/xenon.xml Added: data/Commodities/barium.xml =================================================================== (Binary files differ) Property changes on: data/Commodities/barium.xml ___________________________________________________________________ Name: svn:mime-type + application/xml Name: svn:eol-style + native Added: data/Commodities/cesium.xml =================================================================== (Binary files differ) Property changes on: data/Commodities/cesium.xml ___________________________________________________________________ Name: svn:mime-type + application/xml Name: svn:eol-style + native Added: data/Commodities/chemicals.xml =================================================================== (Binary files differ) Property changes on: data/Commodities/chemicals.xml ___________________________________________________________________ Name: svn:mime-type + application/xml Name: svn:eol-style + native Added: data/Commodities/chromium.xml =================================================================== (Binary files differ) Property changes on: data/Commodities/chromium.xml ___________________________________________________________________ Name: svn:mime-type + application/xml Name: svn:eol-style + native Added: data/Commodities/fuel_cells.xml =================================================================== (Binary files differ) Property changes on: data/Commodities/fuel_cells.xml ___________________________________________________________________ Name: svn:mime-type + application/xml Name: svn:eol-style + native Added: data/Commodities/helium.xml =================================================================== (Binary files differ) Property changes on: data/Commodities/helium.xml ___________________________________________________________________ Name: svn:mime-type + application/xml Name: svn:eol-style + native Added: data/Commodities/iron.xml =================================================================== (Binary files differ) Property changes on: data/Commodities/iron.xml ___________________________________________________________________ Name: svn:mime-type + application/xml Name: svn:eol-style + native Added: data/Commodities/medical_supplies.xml =================================================================== (Binary files differ) Property changes on: data/Commodities/medical_supplies.xml ___________________________________________________________________ Name: svn:mime-type + application/xml Name: svn:eol-style + native Added: data/Commodities/nitrogen.xml =================================================================== (Binary files differ) Property changes on: data/Commodities/nitrogen.xml ___________________________________________________________________ Name: svn:mime-type + application/xml Name: svn:eol-style + native Added: data/Commodities/octavia_light.xml =================================================================== (Binary files differ) Property changes on: data/Commodities/octavia_light.xml ___________________________________________________________________ Name: svn:mime-type + application/xml Name: svn:eol-style + native Added: data/Commodities/xenon.xml =================================================================== (Binary files differ) Property changes on: data/Commodities/xenon.xml ___________________________________________________________________ Name: svn:mime-type + application/xml Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ult...@us...> - 2006-11-30 02:50:26
|
Revision: 234 http://svn.sourceforge.net/opengate/?rev=234&view=rev Author: ultrasick Date: 2006-11-29 18:50:27 -0800 (Wed, 29 Nov 2006) Log Message: ----------- uploaded new stuff from opacma Added Paths: ----------- data/Commodities/nitrogen.blend data/Commodities/nitrogen.png data/Commodities/octavia_light.blend data/Commodities/octavia_light.png Added: data/Commodities/nitrogen.blend =================================================================== (Binary files differ) Property changes on: data/Commodities/nitrogen.blend ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/nitrogen.png =================================================================== (Binary files differ) Property changes on: data/Commodities/nitrogen.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/octavia_light.blend =================================================================== (Binary files differ) Property changes on: data/Commodities/octavia_light.blend ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/octavia_light.png =================================================================== (Binary files differ) Property changes on: data/Commodities/octavia_light.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ult...@us...> - 2006-11-30 02:46:19
|
Revision: 233 http://svn.sourceforge.net/opengate/?rev=233&view=rev Author: ultrasick Date: 2006-11-29 18:46:19 -0800 (Wed, 29 Nov 2006) Log Message: ----------- uploaded new stuff from opacma Added Paths: ----------- data/Commodities/laser_components.blend data/Commodities/laser_components.jpg data/Commodities/medical_supplies.blend data/Commodities/medical_supplies.png data/Commodities/xenon.blend data/Commodities/xenon.png Added: data/Commodities/laser_components.blend =================================================================== (Binary files differ) Property changes on: data/Commodities/laser_components.blend ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/laser_components.jpg =================================================================== (Binary files differ) Property changes on: data/Commodities/laser_components.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/medical_supplies.blend =================================================================== (Binary files differ) Property changes on: data/Commodities/medical_supplies.blend ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/medical_supplies.png =================================================================== (Binary files differ) Property changes on: data/Commodities/medical_supplies.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/xenon.blend =================================================================== (Binary files differ) Property changes on: data/Commodities/xenon.blend ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/xenon.png =================================================================== (Binary files differ) Property changes on: data/Commodities/xenon.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ult...@us...> - 2006-11-30 02:43:13
|
Revision: 232 http://svn.sourceforge.net/opengate/?rev=232&view=rev Author: ultrasick Date: 2006-11-29 18:43:13 -0800 (Wed, 29 Nov 2006) Log Message: ----------- uploaded new stuff from opacma Added Paths: ----------- data/Commodities/CPU.blend data/Commodities/CPU.png data/Commodities/antimony.blend data/Commodities/antimony.jpg data/Commodities/barium.blend data/Commodities/barium.jpg data/Commodities/cesium.blend data/Commodities/cesium.jpg data/Commodities/chemicals.blend data/Commodities/chemicals.png data/Commodities/chromium.blend data/Commodities/chromium.jpg data/Commodities/fuel_cells.blend data/Commodities/fuel_cells.png data/Commodities/gold.png data/Commodities/helium.blend data/Commodities/helium.png data/Commodities/iron.blend data/Commodities/iron.jpg Added: data/Commodities/CPU.blend =================================================================== (Binary files differ) Property changes on: data/Commodities/CPU.blend ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/CPU.png =================================================================== (Binary files differ) Property changes on: data/Commodities/CPU.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/antimony.blend =================================================================== (Binary files differ) Property changes on: data/Commodities/antimony.blend ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/antimony.jpg =================================================================== (Binary files differ) Property changes on: data/Commodities/antimony.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/barium.blend =================================================================== (Binary files differ) Property changes on: data/Commodities/barium.blend ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/barium.jpg =================================================================== (Binary files differ) Property changes on: data/Commodities/barium.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/cesium.blend =================================================================== (Binary files differ) Property changes on: data/Commodities/cesium.blend ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/cesium.jpg =================================================================== (Binary files differ) Property changes on: data/Commodities/cesium.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/chemicals.blend =================================================================== (Binary files differ) Property changes on: data/Commodities/chemicals.blend ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/chemicals.png =================================================================== (Binary files differ) Property changes on: data/Commodities/chemicals.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/chromium.blend =================================================================== (Binary files differ) Property changes on: data/Commodities/chromium.blend ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/chromium.jpg =================================================================== (Binary files differ) Property changes on: data/Commodities/chromium.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/fuel_cells.blend =================================================================== (Binary files differ) Property changes on: data/Commodities/fuel_cells.blend ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/fuel_cells.png =================================================================== (Binary files differ) Property changes on: data/Commodities/fuel_cells.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/gold.png =================================================================== (Binary files differ) Property changes on: data/Commodities/gold.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/helium.blend =================================================================== (Binary files differ) Property changes on: data/Commodities/helium.blend ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/helium.png =================================================================== (Binary files differ) Property changes on: data/Commodities/helium.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/iron.blend =================================================================== (Binary files differ) Property changes on: data/Commodities/iron.blend ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/iron.jpg =================================================================== (Binary files differ) Property changes on: data/Commodities/iron.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ult...@us...> - 2006-11-30 02:26:10
|
Revision: 231 http://svn.sourceforge.net/opengate/?rev=231&view=rev Author: ultrasick Date: 2006-11-29 18:26:10 -0800 (Wed, 29 Nov 2006) Log Message: ----------- uploaded new stuff from opacma Modified Paths: -------------- data/Commodities/aluminium.xml data/Commodities/antimony.xml data/Commodities/copper.xml data/Commodities/cpu.xml data/Commodities/gold.blend data/Commodities/gold.xml data/Commodities/laser_components.xml Modified: data/Commodities/aluminium.xml =================================================================== (Binary files differ) Modified: data/Commodities/antimony.xml =================================================================== (Binary files differ) Modified: data/Commodities/copper.xml =================================================================== (Binary files differ) Modified: data/Commodities/cpu.xml =================================================================== (Binary files differ) Modified: data/Commodities/gold.blend =================================================================== (Binary files differ) Modified: data/Commodities/gold.xml =================================================================== (Binary files differ) Modified: data/Commodities/laser_components.xml =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ult...@us...> - 2006-11-30 02:24:17
|
Revision: 230 http://svn.sourceforge.net/opengate/?rev=230&view=rev Author: ultrasick Date: 2006-11-29 18:24:17 -0800 (Wed, 29 Nov 2006) Log Message: ----------- uploaded the new 78x78 pixel screenshot of octavia light models from george Modified Paths: -------------- data/Commodities/octavia_light_78x78.png Modified: data/Commodities/octavia_light_78x78.png =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ult...@us...> - 2006-11-30 02:22:00
|
Revision: 229 http://svn.sourceforge.net/opengate/?rev=229&view=rev Author: ultrasick Date: 2006-11-29 18:22:00 -0800 (Wed, 29 Nov 2006) Log Message: ----------- added some stuff for the GUI Added Paths: ----------- data/Commodities/CPU_78x78.png data/Commodities/chemicals_78x78.png data/Commodities/fuel_cells_78x78.png data/Commodities/gold_78x78.png data/Commodities/helium_78x78.png data/Commodities/medical_supplies_78x78.png data/Commodities/nitrogen_78x78.png data/Commodities/octavia_light_78x78.png Added: data/Commodities/CPU_78x78.png =================================================================== (Binary files differ) Property changes on: data/Commodities/CPU_78x78.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/chemicals_78x78.png =================================================================== (Binary files differ) Property changes on: data/Commodities/chemicals_78x78.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/fuel_cells_78x78.png =================================================================== (Binary files differ) Property changes on: data/Commodities/fuel_cells_78x78.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/gold_78x78.png =================================================================== (Binary files differ) Property changes on: data/Commodities/gold_78x78.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/helium_78x78.png =================================================================== (Binary files differ) Property changes on: data/Commodities/helium_78x78.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/medical_supplies_78x78.png =================================================================== (Binary files differ) Property changes on: data/Commodities/medical_supplies_78x78.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/nitrogen_78x78.png =================================================================== (Binary files differ) Property changes on: data/Commodities/nitrogen_78x78.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Commodities/octavia_light_78x78.png =================================================================== (Binary files differ) Property changes on: data/Commodities/octavia_light_78x78.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ult...@us...> - 2006-11-30 02:18:37
|
Revision: 228 http://svn.sourceforge.net/opengate/?rev=228&view=rev Author: ultrasick Date: 2006-11-29 18:18:36 -0800 (Wed, 29 Nov 2006) Log Message: ----------- renamed data/Components in data/Commodities Added Paths: ----------- data/Commodities/ Removed Paths: ------------- data/Components/ Copied: data/Commodities (from rev 223, data/Components) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ult...@us...> - 2006-11-30 02:16:21
|
Revision: 227 http://svn.sourceforge.net/opengate/?rev=227&view=rev Author: ultrasick Date: 2006-11-29 18:16:22 -0800 (Wed, 29 Nov 2006) Log Message: ----------- deleting empty directory (which isn't required anymore) Removed Paths: ------------- doc/meta_server/termless/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ult...@us...> - 2006-11-30 02:12:44
|
Revision: 226 http://svn.sourceforge.net/opengate/?rev=226&view=rev Author: ultrasick Date: 2006-11-29 18:12:45 -0800 (Wed, 29 Nov 2006) Log Message: ----------- version info won't be available anymore soon. use action=version_check in future (see docu) Removed Paths: ------------- doc/meta_server/termless/version_info.odt doc/meta_server/termless/version_info.pdf Deleted: doc/meta_server/termless/version_info.odt =================================================================== (Binary files differ) Deleted: doc/meta_server/termless/version_info.pdf =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ult...@us...> - 2006-11-30 02:11:13
|
Revision: 225 http://svn.sourceforge.net/opengate/?rev=225&view=rev Author: ultrasick Date: 2006-11-29 18:11:11 -0800 (Wed, 29 Nov 2006) Log Message: ----------- added some more info files Added Paths: ----------- doc/meta_server/check_version.odt doc/meta_server/check_version.pdf doc/meta_server/logout.odt doc/meta_server/logout.pdf Added: doc/meta_server/check_version.odt =================================================================== (Binary files differ) Property changes on: doc/meta_server/check_version.odt ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: doc/meta_server/check_version.pdf =================================================================== (Binary files differ) Property changes on: doc/meta_server/check_version.pdf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: doc/meta_server/logout.odt =================================================================== (Binary files differ) Property changes on: doc/meta_server/logout.odt ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: doc/meta_server/logout.pdf =================================================================== (Binary files differ) Property changes on: doc/meta_server/logout.pdf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ult...@us...> - 2006-11-30 02:08:17
|
Revision: 224 http://svn.sourceforge.net/opengate/?rev=224&view=rev Author: ultrasick Date: 2006-11-29 18:08:17 -0800 (Wed, 29 Nov 2006) Log Message: ----------- all variables in lowercase now Modified Paths: -------------- doc/meta_server/login.odt doc/meta_server/login.pdf Modified: doc/meta_server/login.odt =================================================================== (Binary files differ) Modified: doc/meta_server/login.pdf =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Daniel S. <dan...@gm...> - 2006-11-29 22:05:14
|
Yep, I am added you in my Gaim ;) But I need some time for the c++ Code, I think I can start on Saturday. Till there I have to read much code and install ogre and cegui on the Ubuntuu Box. I have an Memory Access Error on the Suse Box with the svn from today, = but I think it is a Problem with the Suse Box, not with the Code, I=B4ve got = the same Error with the swgemu. Greetz Daniel -----Urspr=FCngliche Nachricht----- Von: Tim Beelen [mailto:ab...@sl...]=20 Gesendet: Mittwoch, 29. November 2006 20:46 An: dan...@gm...; ope...@li... Betreff: Re: [Opengate-devel] GUI Hey Guys - and in particular Daniel,=20 Would you (anyone) like to help me building the OpenGate GUI using CEGUI? It will require some basic C++ programming (5 to 10 lines of code each time, not the entire code) to test the GUI widgets and scripting the GUI in XML.=20 I need someone with Linux, KDevelop, OGRE and CEGUI installed and that knows the how to use SVN, The Gimp (and maybe Inkscape) or is willing to learn how to do so.=20 Sincerely, Tim |
From: <qr...@us...> - 2006-11-29 20:25:24
|
Revision: 223 http://svn.sourceforge.net/opengate/?rev=223&view=rev Author: qrstuvw Date: 2006-11-29 12:25:20 -0800 (Wed, 29 Nov 2006) Log Message: ----------- - Debugged some stuff Modified Paths: -------------- src/common/Posix/Thread.h Modified: src/common/Posix/Thread.h =================================================================== --- src/common/Posix/Thread.h 2006-11-29 14:20:45 UTC (rev 222) +++ src/common/Posix/Thread.h 2006-11-29 20:25:20 UTC (rev 223) @@ -1,5 +1,6 @@ ///////////////////////////////////////////////////////////////////// -// Written by Phillip Sitbon +// Written by Phillip Sitbon - modified by Tim Beelen to compile on +// GCC 4.1.1 :) // Copyright 2003 // // Posix/Thread.h @@ -17,296 +18,302 @@ #define InvalidHandle 0 -template -< - typename Thread_T -> +typedef void *( * pthread_fn )( void * ); +template <typename Thread_T> class Thread { - private: - typedef struct Instance; +private: + typedef struct Instance; - public: - typedef Thread_T & Thread_R; - typedef const Thread_T & Thread_C_R; +public: + typedef Thread_T & Thread_R; + typedef const Thread_T & Thread_C_R; - typedef pthread_t Handle; - typedef void ( *Handler)( Thread_R ); + typedef pthread_t Handle; + typedef void ( *Handler)( Thread_R ); - protected: - Thread() {} +protected: + Thread() {} - virtual void ThreadMain( Thread_R ) = 0; + virtual void ThreadMain( Thread_R ) = 0; - static void Exit() - { pthread_exit(0); } + static void Exit() + { pthread_exit(0); } - static void TestCancel() - { pthread_testcancel(); } + static void TestCancel() + { pthread_testcancel(); } - static Handle Self() - { return (Handle)pthread_self(); } + static Handle Self() + { return (Handle)pthread_self(); } - public: +public: - static int Create( - const Handler & Function, - Thread_C_R Param, - Handle * const & H = 0, - const bool & CreateDetached = false, - const unsigned int & StackSize = 0, - const bool & CancelEnable = false, - const bool & CancelAsync = false - ) - { - M_Create().Lock(); - pthread_attr_t attr; - pthread_attr_init(&attr); + static int Create( + const Handler & Function, + Thread_C_R Param, + Handle * const & H = 0, + const bool & CreateDetached = false, + const unsigned int & StackSize = 0, + const bool & CancelEnable = false, + const bool & CancelAsync = false + ) + { + M_Create().Lock(); + pthread_attr_t attr; + pthread_attr_init(&attr); - if ( CreateDetached ) - pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED); + if ( CreateDetached ) + pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED); - if ( StackSize ) - pthread_attr_setstacksize(&attr,StackSize); + if ( StackSize ) + pthread_attr_setstacksize(&attr,StackSize); - Instance I(Param,0,Function,CancelEnable,CancelAsync); + Instance I(Param,0,Function,CancelEnable,CancelAsync); - int R = pthread_create((pthread_t *)H,&attr,ThreadMainHandler,(void *)&I); - pthread_attr_destroy(&attr); + Handle h=InvalidHandle; + int R = pthread_create((pthread_t *)&h,&attr,(pthread_fn)ThreadMainHandler,(void *)&I); - if ( !R ) S_Create().Wait(); - else if ( H ) *H = InvalidHandle; + pthread_attr_destroy(&attr); - M_Create().Unlock(); - return errno; - } + if(H) *H = h; + if ( !R ) S_Create().Wait(); - int Create( - Thread_C_R Param, - Handle * const & H = 0, - const bool & CreateDetached = false, - const unsigned int & StackSize = 0, - const bool & CancelEnable = false, - const bool & CancelAsync = false - ) const - { - M_Create().Lock(); - pthread_attr_t attr; - pthread_attr_init(&attr); + M_Create().Unlock(); + return errno; + } - if ( CreateDetached ) - pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED); + int Create( + Thread_C_R Param, + Handle * const & H = 0, + const bool & CreateDetached = false, + const unsigned int & StackSize = 0, + const bool & CancelEnable = false, + const bool & CancelAsync = false + ) const + { + M_Create().Lock(); + pthread_attr_t attr; + pthread_attr_init(&attr); - if ( StackSize ) - pthread_attr_setstacksize(&attr,StackSize); + if ( CreateDetached ) + pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED); - Instance I(Param,const_cast<Thread *>(this),0,CancelEnable,CancelAsync); + if ( StackSize ) + pthread_attr_setstacksize(&attr,StackSize); - int R = pthread_create((pthread_t *)H,&attr,ThreadMainHandler,(void *)&I); - pthread_attr_destroy(&attr); + Instance I(Param,const_cast<Thread *>(this),0,CancelEnable,CancelAsync); - if ( !R ) S_Create().Wait(); - else if ( H ) *H = InvalidHandle; + Handle h=InvalidHandle; + int R = pthread_create((pthread_t *)&h,&attr,(pthread_fn)ThreadMainHandler,(void *)&I); - M_Create().Unlock(); - return errno; - } + pthread_attr_destroy(&attr); - static int Join( Handle H ) - { return pthread_join(H,0); } + if(H) *H = h; + if ( !R ) S_Create().Wait(); - static int Kill( Handle H ) - { return pthread_cancel(H); } + M_Create().Unlock(); + return errno; + } - static int Detach( Handle H ) - { return pthread_detach(H); } + static int Join( Handle H ) +{ return pthread_join(H,0); } - private: + static int Kill( Handle H ) + { return pthread_cancel(H); } - static const Mutex &M_Create() { static Mutex M; return M; } - static const Semaphore &S_Create() { static Semaphore S; return S; } + static int Detach( Handle H ) + { return pthread_detach(H); } - static void *ThreadMainHandler( Instance *Param ) - { - Instance I(*Param); - Thread_T Data(I.Data); - S_Create().Post(); +private: - if ( I.Flags & 1 /*CancelEnable*/ ) - { - pthread_setcancelstate(PTHREAD_CANCEL_ENABLE,NULL); + static const Mutex &M_Create() { static Mutex M; return M; } + static const Semaphore &S_Create() { static Semaphore S; return S; } - if ( I.Flags & 2 /*CancelAsync*/ ) - pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS,NULL); - else - pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED,NULL); - } - else - { - pthread_setcancelstate(PTHREAD_CANCEL_DISABLE,NULL); - } + static void *ThreadMainHandler( Instance *Param ) + { + Instance I(*Param); + Thread_T Data(I.Data); + S_Create().Post(); - if ( I.Owner ) - I.Owner->ThreadMain(Data); - else - I.pFN(Data); + if ( I.Flags & 1 /*CancelEnable*/ ) + { + pthread_setcancelstate(PTHREAD_CANCEL_ENABLE,NULL); - return 0; - } + if ( I.Flags & 2 /*CancelAsync*/ ) + pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS,NULL); + else + pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED,NULL); + } + else + { + pthread_setcancelstate(PTHREAD_CANCEL_DISABLE,NULL); + } - struct Instance - { - Instance( Thread_C_R P, Thread<Thread_T> *const &O, const Thread<Thread_T>::Handler &pH = 0, const bool &CE=false, const bool &CA=false ) - : pFN(pH), Data(P), Owner(O), Flags(0) { if ( CE ) Flags|=1; if ( CA ) Flags|=2; } + if ( I.Owner ) + I.Owner->ThreadMain(Data); + else + I.pFN(Data); - Thread<Thread_T>::Thread_C_R Data; - Thread<Thread_T> * Owner; - Thread<Thread_T>::Handler pFN; - unsigned char Flags; - }; + return 0; + } + + struct Instance + { + Instance( Thread_C_R P, Thread<Thread_T> *const &O, const Thread<Thread_T>::Handler &pH = 0, const bool &CE=false, const bool &CA=false ) + : pFN(pH), Data(P), Owner(O), Flags(0) { if ( CE ) Flags|=1; if ( CA ) Flags|=2; } + + Handler pFN; + Thread_C_R Data; + Thread<Thread_T> * Owner; + unsigned char Flags; + }; }; ///////////////////////////////////////////////////////////////////// // Explicit specialization, no thread parameters // -class Thread<void> +template <> class Thread<void> { - private: - typedef struct Instance; +private: + typedef struct Instance; - public: - typedef pthread_t Handle; - typedef void ( *Handler)(); +public: + typedef pthread_t Handle; + typedef void ( *Handler)(); - protected: - Thread<void>() {} +protected: + Thread<void>() {} - virtual void ThreadMain() = 0; + virtual void ThreadMain() = 0; - static void Exit() - { pthread_exit(0); } + static void Exit() + { pthread_exit(0); } - static void TestCancel() - { pthread_testcancel(); } + static void TestCancel() + { pthread_testcancel(); } - static Handle Self() - { return (Handle)pthread_self(); } + static Handle Self() + { return (Handle)pthread_self(); } - public: +public: - static int Create( - const Handler & Function, - Handle * const & H = 0, - const bool & CreateDetached = false, - const unsigned int & StackSize = 0, - const bool & CancelEnable = false, - const bool & CancelAsync = false - ) - { - M_Create().Lock(); - pthread_attr_t attr; - pthread_attr_init(&attr); + static int Create( + const Handler & Function, + Handle * const & H = 0, + const bool & CreateDetached = false, + const unsigned int & StackSize = 0, + const bool & CancelEnable = false, + const bool & CancelAsync = false + ) + { + M_Create().Lock(); + pthread_attr_t attr; + pthread_attr_init(&attr); - if ( CreateDetached ) - pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED); + if ( CreateDetached ) + pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED); - if ( StackSize ) - pthread_attr_setstacksize(&attr,StackSize); + if ( StackSize ) + pthread_attr_setstacksize(&attr,StackSize); - Instance I(0,Function,CancelEnable,CancelAsync); + Instance I(0,Function,CancelEnable,CancelAsync); - int R = pthread_create((pthread_t *)H,&attr,ThreadMainHandler,(void *)&I); - pthread_attr_destroy(&attr); + Handle h=InvalidHandle; + int R = pthread_create((pthread_t *)&h,&attr,(pthread_fn)ThreadMainHandler,(void *)&I); - if ( !R ) S_Create().Wait(); - else if ( H ) *H = InvalidHandle; + pthread_attr_destroy(&attr); - M_Create().Unlock(); - return errno; - } + if(H) *H = h; + if ( !R ) S_Create().Wait(); - int Create( - Handle * const & H = 0, - const bool & CreateDetached = false, - const unsigned int & StackSize = 0, - const bool & CancelEnable = false, - const bool & CancelAsync = false - ) const - { - M_Create().Lock(); - pthread_attr_t attr; - pthread_attr_init(&attr); + M_Create().Unlock(); + return errno; + } - if ( CreateDetached ) - pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED); + int Create( + Handle * const & H = 0, + const bool & CreateDetached = false, + const unsigned int & StackSize = 0, + const bool & CancelEnable = false, + const bool & CancelAsync = false + ) const + { + M_Create().Lock(); + pthread_attr_t attr; + pthread_attr_init(&attr); - if ( StackSize ) - pthread_attr_setstacksize(&attr,StackSize); + if ( CreateDetached ) + pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED); - Instance I(const_cast<Thread *>(this),0,CancelEnable,CancelAsync); + if ( StackSize ) + pthread_attr_setstacksize(&attr,StackSize); - int R = pthread_create((pthread_t *)H,&attr,ThreadMainHandler,(void *)&I); - pthread_attr_destroy(&attr); + Instance I(const_cast<Thread *>(this),0,CancelEnable,CancelAsync); - if ( !R ) S_Create().Wait(); - else if ( H ) *H = InvalidHandle; + Handle h=InvalidHandle; + int R = pthread_create((pthread_t *)&h,&attr,(pthread_fn)ThreadMainHandler,(void *)&I); - M_Create().Unlock(); - return errno; - } + pthread_attr_destroy(&attr); - static int Join( Handle H ) - { return pthread_join(H,0); } + if(H) *H = h; + if ( !R ) S_Create().Wait(); - static int Kill( Handle H ) - { return pthread_cancel(H); } + M_Create().Unlock(); + return errno; + } - static int Detach( Handle H ) - { return pthread_detach(H); } + static int Join( Handle H ) +{ return pthread_join(H,0); } - private: + static int Kill( Handle H ) + { return pthread_cancel(H); } - static const Mutex &M_Create() { static Mutex M; return M; } - static const Semaphore &S_Create() { static Semaphore S; return S; } + static int Detach( Handle H ) + { return pthread_detach(H); } - static void *ThreadMainHandler( Instance *Param ) - { - Instance I(*Param); - S_Create().Post(); +private: - if ( I.Flags & 1 /*CancelEnable*/ ) - { - pthread_setcancelstate(PTHREAD_CANCEL_ENABLE,NULL); + static const Mutex &M_Create() { static Mutex M; return M; } + static const Semaphore &S_Create() { static Semaphore S; return S; } - if ( I.Flags & 2 /*CancelAsync*/ ) - pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS,NULL); - else - pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED,NULL); - } - else - { - pthread_setcancelstate(PTHREAD_CANCEL_DISABLE,NULL); - } + static void *ThreadMainHandler( Instance *Param ) + { + Instance I(*Param); + S_Create().Post(); - if ( I.Owner ) - I.Owner->ThreadMain(); - else - I.pFN(); + if ( I.Flags & 1 /*CancelEnable*/ ) + { + pthread_setcancelstate(PTHREAD_CANCEL_ENABLE,NULL); - return 0; - } + if ( I.Flags & 2 /*CancelAsync*/ ) + pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS,NULL); + else + pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED,NULL); + } + else + { + pthread_setcancelstate(PTHREAD_CANCEL_DISABLE,NULL); + } - struct Instance - { - Instance( Thread<void> *const &O, const Thread<void>::Handler &pH = 0, const bool &CE=false, const bool &CA=false ) - : pFN(pH), Owner(O), Flags(0) { if ( CE ) Flags|=1; if ( CA ) Flags|=2; } + if ( I.Owner ) + I.Owner->ThreadMain(); + else + I.pFN(); - Thread<void> * Owner; - Thread<void>::Handler pFN; - unsigned char Flags; - }; + return 0; + } + + struct Instance + { + Instance( Thread<void> *const &O, const Thread<void>::Handler &pH = 0, const bool &CE=false, const bool &CA=false ) + : pFN(pH), Owner(O), Flags(0) { if ( CE ) Flags|=1; if ( CA ) Flags|=2; } + + Thread<void>::Handler pFN; + Thread<void> * Owner; + unsigned char Flags; + }; }; #endif // !_Thread_Posix_ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Tim B. <ab...@sl...> - 2006-11-29 19:32:23
|
Hey Guys - and in particular Daniel, Would you (anyone) like to help me building the OpenGate GUI using CEGUI? It will require some basic C++ programming (5 to 10 lines of code each time, not the entire code) to test the GUI widgets and scripting the GUI in XML. I need someone with Linux, KDevelop, OGRE and CEGUI installed and that knows the how to use SVN, The Gimp (and maybe Inkscape) or is willing to learn how to do so. Sincerely, Tim |
From: <qr...@us...> - 2006-11-29 14:20:45
|
Revision: 222 http://svn.sourceforge.net/opengate/?rev=222&view=rev Author: qrstuvw Date: 2006-11-29 06:20:45 -0800 (Wed, 29 Nov 2006) Log Message: ----------- - Improved GUI look (Less EnB, more EVE) Can someone paint the station gui in the same style? Modified Paths: -------------- debug/data1.x/GUI/OpenGateLook.tga debug/data1.x/GUI/OpenGateLook.xcf Modified: debug/data1.x/GUI/OpenGateLook.tga =================================================================== (Binary files differ) Modified: debug/data1.x/GUI/OpenGateLook.xcf =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qr...@us...> - 2006-11-29 14:12:23
|
Revision: 221 http://svn.sourceforge.net/opengate/?rev=221&view=rev Author: qrstuvw Date: 2006-11-29 06:12:21 -0800 (Wed, 29 Nov 2006) Log Message: ----------- - Threading for Win32 and Posix - TODO: Implement this stuff into the META-server source (50% done) Added Paths: ----------- src/common/Mutex.h src/common/Posix/ src/common/Posix/Mutex.h src/common/Posix/Semaphore.h src/common/Posix/Thread.h src/common/Semaphore.h src/common/Thread.h src/common/Win32/ src/common/Win32/Mutex.h src/common/Win32/Semaphore.h src/common/Win32/Thread.h src/common/Win32/Win32.h Added: src/common/Mutex.h =================================================================== --- src/common/Mutex.h (rev 0) +++ src/common/Mutex.h 2006-11-29 14:12:21 UTC (rev 221) @@ -0,0 +1,12 @@ +#ifndef _Mutex_ +#define _Mutex_ + +#include <errno.h> + +#ifdef WIN32 + #include "Win32/Mutex.h" +#else + #include "Posix/Mutex.h" +#endif + +#endif // !_Mutex_ Property changes on: src/common/Mutex.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: src/common/Posix/Mutex.h =================================================================== --- src/common/Posix/Mutex.h (rev 0) +++ src/common/Posix/Mutex.h 2006-11-29 14:12:21 UTC (rev 221) @@ -0,0 +1,45 @@ +///////////////////////////////////////////////////////////////////// +// Written by Phillip Sitbon +// Copyright 2003 +// +// Posix/Mutex.h +// - Resource locking mechanism using Posix mutexes +// +///////////////////////////////////////////////////////////////////// + +#ifndef _Mutex_Posix_ +#define _Mutex_Posix_ + +#include <pthread.h> + +class Mutex +{ + mutable pthread_mutex_t M; + void operator=(Mutex &M) {} + Mutex( const Mutex &M ) {} + + public: + + Mutex() + { + pthread_mutexattr_t attr; + pthread_mutexattr_init(&attr); + pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE); + pthread_mutex_init(&M,&attr); + pthread_mutexattr_destroy(&attr); + } + + virtual ~Mutex() + { pthread_mutex_unlock(&M); pthread_mutex_destroy(&M); } + + int Lock() const + { return pthread_mutex_lock(&M); } + + int Lock_Try() const + { return pthread_mutex_trylock(&M); } + + int Unlock() const + { return pthread_mutex_unlock(&M); } +}; + +#endif // !_Mutex_Posix_ Property changes on: src/common/Posix/Mutex.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: src/common/Posix/Semaphore.h =================================================================== --- src/common/Posix/Semaphore.h (rev 0) +++ src/common/Posix/Semaphore.h 2006-11-29 14:12:21 UTC (rev 221) @@ -0,0 +1,42 @@ +///////////////////////////////////////////////////////////////////// +// Written by Phillip Sitbon +// Copyright 2003 +// +// Posix/Semaphore.h +// - Resource counting mechanism +// +///////////////////////////////////////////////////////////////////// + +#ifndef _Semaphore_Posix_ +#define _Semaphore_Posix_ + +#include <semaphore.h> + +class Semaphore +{ + sem_t S; + + public: + Semaphore( int init = 0 ) + { sem_init(&S,0,init); } + + virtual ~Semaphore() + { sem_destroy(&S); } + + void Wait() const + { sem_wait((sem_t *)&S); } + + int Wait_Try() const + { return (sem_trywait((sem_t *)&S)?errno:0); } + + int Post() const + { return (sem_post((sem_t *)&S)?errno:0); } + + int Value() const + { int V = -1; sem_getvalue((sem_t *)&S,&V); return V; } + + void Reset( int init = 0 ) + { sem_destroy(&S); sem_init(&S,0,init); } +}; + +#endif // !_Semaphore_Posix_ Property changes on: src/common/Posix/Semaphore.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: src/common/Posix/Thread.h =================================================================== --- src/common/Posix/Thread.h (rev 0) +++ src/common/Posix/Thread.h 2006-11-29 14:12:21 UTC (rev 221) @@ -0,0 +1,312 @@ +///////////////////////////////////////////////////////////////////// +// Written by Phillip Sitbon +// Copyright 2003 +// +// Posix/Thread.h +// - Posix thread +// +///////////////////////////////////////////////////////////////////// + +#ifndef _Thread_Posix_ +#define _Thread_Posix_ + +#include "Semaphore.h" +#include "Mutex.h" + +#include <pthread.h> + +#define InvalidHandle 0 + +template +< + typename Thread_T +> +class Thread +{ + private: + typedef struct Instance; + + public: + typedef Thread_T & Thread_R; + typedef const Thread_T & Thread_C_R; + + typedef pthread_t Handle; + typedef void ( *Handler)( Thread_R ); + + + protected: + Thread() {} + + virtual void ThreadMain( Thread_R ) = 0; + + static void Exit() + { pthread_exit(0); } + + static void TestCancel() + { pthread_testcancel(); } + + static Handle Self() + { return (Handle)pthread_self(); } + + public: + + static int Create( + const Handler & Function, + Thread_C_R Param, + Handle * const & H = 0, + const bool & CreateDetached = false, + const unsigned int & StackSize = 0, + const bool & CancelEnable = false, + const bool & CancelAsync = false + ) + { + M_Create().Lock(); + pthread_attr_t attr; + pthread_attr_init(&attr); + + if ( CreateDetached ) + pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED); + + if ( StackSize ) + pthread_attr_setstacksize(&attr,StackSize); + + Instance I(Param,0,Function,CancelEnable,CancelAsync); + + int R = pthread_create((pthread_t *)H,&attr,ThreadMainHandler,(void *)&I); + pthread_attr_destroy(&attr); + + if ( !R ) S_Create().Wait(); + else if ( H ) *H = InvalidHandle; + + M_Create().Unlock(); + return errno; + } + + int Create( + Thread_C_R Param, + Handle * const & H = 0, + const bool & CreateDetached = false, + const unsigned int & StackSize = 0, + const bool & CancelEnable = false, + const bool & CancelAsync = false + ) const + { + M_Create().Lock(); + pthread_attr_t attr; + pthread_attr_init(&attr); + + if ( CreateDetached ) + pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED); + + if ( StackSize ) + pthread_attr_setstacksize(&attr,StackSize); + + Instance I(Param,const_cast<Thread *>(this),0,CancelEnable,CancelAsync); + + int R = pthread_create((pthread_t *)H,&attr,ThreadMainHandler,(void *)&I); + pthread_attr_destroy(&attr); + + if ( !R ) S_Create().Wait(); + else if ( H ) *H = InvalidHandle; + + M_Create().Unlock(); + return errno; + } + + static int Join( Handle H ) + { return pthread_join(H,0); } + + static int Kill( Handle H ) + { return pthread_cancel(H); } + + static int Detach( Handle H ) + { return pthread_detach(H); } + + private: + + static const Mutex &M_Create() { static Mutex M; return M; } + static const Semaphore &S_Create() { static Semaphore S; return S; } + + static void *ThreadMainHandler( Instance *Param ) + { + Instance I(*Param); + Thread_T Data(I.Data); + S_Create().Post(); + + if ( I.Flags & 1 /*CancelEnable*/ ) + { + pthread_setcancelstate(PTHREAD_CANCEL_ENABLE,NULL); + + if ( I.Flags & 2 /*CancelAsync*/ ) + pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS,NULL); + else + pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED,NULL); + } + else + { + pthread_setcancelstate(PTHREAD_CANCEL_DISABLE,NULL); + } + + if ( I.Owner ) + I.Owner->ThreadMain(Data); + else + I.pFN(Data); + + return 0; + } + + struct Instance + { + Instance( Thread_C_R P, Thread<Thread_T> *const &O, const Thread<Thread_T>::Handler &pH = 0, const bool &CE=false, const bool &CA=false ) + : pFN(pH), Data(P), Owner(O), Flags(0) { if ( CE ) Flags|=1; if ( CA ) Flags|=2; } + + Thread<Thread_T>::Thread_C_R Data; + Thread<Thread_T> * Owner; + Thread<Thread_T>::Handler pFN; + unsigned char Flags; + }; +}; + +///////////////////////////////////////////////////////////////////// +// Explicit specialization, no thread parameters +// + +class Thread<void> +{ + private: + typedef struct Instance; + + public: + typedef pthread_t Handle; + typedef void ( *Handler)(); + + protected: + Thread<void>() {} + + virtual void ThreadMain() = 0; + + static void Exit() + { pthread_exit(0); } + + static void TestCancel() + { pthread_testcancel(); } + + static Handle Self() + { return (Handle)pthread_self(); } + + public: + + static int Create( + const Handler & Function, + Handle * const & H = 0, + const bool & CreateDetached = false, + const unsigned int & StackSize = 0, + const bool & CancelEnable = false, + const bool & CancelAsync = false + ) + { + M_Create().Lock(); + pthread_attr_t attr; + pthread_attr_init(&attr); + + if ( CreateDetached ) + pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED); + + if ( StackSize ) + pthread_attr_setstacksize(&attr,StackSize); + + Instance I(0,Function,CancelEnable,CancelAsync); + + int R = pthread_create((pthread_t *)H,&attr,ThreadMainHandler,(void *)&I); + pthread_attr_destroy(&attr); + + if ( !R ) S_Create().Wait(); + else if ( H ) *H = InvalidHandle; + + M_Create().Unlock(); + return errno; + } + + int Create( + Handle * const & H = 0, + const bool & CreateDetached = false, + const unsigned int & StackSize = 0, + const bool & CancelEnable = false, + const bool & CancelAsync = false + ) const + { + M_Create().Lock(); + pthread_attr_t attr; + pthread_attr_init(&attr); + + if ( CreateDetached ) + pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED); + + if ( StackSize ) + pthread_attr_setstacksize(&attr,StackSize); + + Instance I(const_cast<Thread *>(this),0,CancelEnable,CancelAsync); + + int R = pthread_create((pthread_t *)H,&attr,ThreadMainHandler,(void *)&I); + pthread_attr_destroy(&attr); + + if ( !R ) S_Create().Wait(); + else if ( H ) *H = InvalidHandle; + + M_Create().Unlock(); + return errno; + } + + static int Join( Handle H ) + { return pthread_join(H,0); } + + static int Kill( Handle H ) + { return pthread_cancel(H); } + + static int Detach( Handle H ) + { return pthread_detach(H); } + + private: + + static const Mutex &M_Create() { static Mutex M; return M; } + static const Semaphore &S_Create() { static Semaphore S; return S; } + + static void *ThreadMainHandler( Instance *Param ) + { + Instance I(*Param); + S_Create().Post(); + + if ( I.Flags & 1 /*CancelEnable*/ ) + { + pthread_setcancelstate(PTHREAD_CANCEL_ENABLE,NULL); + + if ( I.Flags & 2 /*CancelAsync*/ ) + pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS,NULL); + else + pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED,NULL); + } + else + { + pthread_setcancelstate(PTHREAD_CANCEL_DISABLE,NULL); + } + + if ( I.Owner ) + I.Owner->ThreadMain(); + else + I.pFN(); + + return 0; + } + + struct Instance + { + Instance( Thread<void> *const &O, const Thread<void>::Handler &pH = 0, const bool &CE=false, const bool &CA=false ) + : pFN(pH), Owner(O), Flags(0) { if ( CE ) Flags|=1; if ( CA ) Flags|=2; } + + Thread<void> * Owner; + Thread<void>::Handler pFN; + unsigned char Flags; + }; +}; + +#endif // !_Thread_Posix_ Property changes on: src/common/Posix/Thread.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: src/common/Semaphore.h =================================================================== --- src/common/Semaphore.h (rev 0) +++ src/common/Semaphore.h 2006-11-29 14:12:21 UTC (rev 221) @@ -0,0 +1,12 @@ +#ifndef _Semaphore_ +#define _Semaphore_ + +#include <errno.h> + +#ifdef WIN32 + #include "Win32/Semaphore.h" +#else + #include "Posix/Semaphore.h" +#endif + +#endif // !_Semaphore_ Property changes on: src/common/Semaphore.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: src/common/Thread.h =================================================================== --- src/common/Thread.h (rev 0) +++ src/common/Thread.h 2006-11-29 14:12:21 UTC (rev 221) @@ -0,0 +1,12 @@ +#ifndef _Thread_ +#define _Thread_ + +#include <errno.h> + +#ifdef WIN32 + #include "Win32/Thread.h" +#else + #include "Posix/Thread.h" +#endif + +#endif // !_Thread_ Property changes on: src/common/Thread.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: src/common/Win32/Mutex.h =================================================================== --- src/common/Win32/Mutex.h (rev 0) +++ src/common/Win32/Mutex.h 2006-11-29 14:12:21 UTC (rev 221) @@ -0,0 +1,41 @@ +///////////////////////////////////////////////////////////////////// +// Written by Phillip Sitbon +// Copyright 2003 +// +// Win32/Mutex.h +// - Resource locking mechanism using Critical Sections +// +///////////////////////////////////////////////////////////////////// + +#ifndef _Mutex_Win32_ +#define _Mutex_Win32_ + +#include "Win32.h" + +class Mutex +{ + mutable CRITICAL_SECTION C; + void operator=(Mutex &M) {} + Mutex( const Mutex &M ) {} + + public: + + Mutex() + { InitializeCriticalSection(&C); } + + virtual ~Mutex() + { DeleteCriticalSection(&C); } + + int Lock() const + { EnterCriticalSection(&C); return 0; } + +#if(_WIN32_WINNT >= 0x0400) + int Lock_Try() const + { return (TryEnterCriticalSection(&C)?0:EBUSY); } +#endif + + int Unlock() const + { LeaveCriticalSection(&C); return 0; } +}; + +#endif // !_Mutex_Win32_ Property changes on: src/common/Win32/Mutex.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: src/common/Win32/Semaphore.h =================================================================== --- src/common/Win32/Semaphore.h (rev 0) +++ src/common/Win32/Semaphore.h 2006-11-29 14:12:21 UTC (rev 221) @@ -0,0 +1,48 @@ +///////////////////////////////////////////////////////////////////// +// Written by Phillip Sitbon +// Copyright 2003 +// +// Win32/Semaphore.h +// - Resource counting mechanism +// +///////////////////////////////////////////////////////////////////// +#ifndef _Semaphore_Win32_ +#define _Semaphore_Win32_ + +#include "Win32.h" + +#define SEM_VALUE_MAX ((int) ((~0u) >> 1)) + +class Semaphore +{ + HANDLE S; + void operator=(const Semaphore &S){} + Semaphore(const Semaphore &S){} + + public: + Semaphore( int init = 0 ) + { S = CreateSemaphore(0,init,SEM_VALUE_MAX,0); } + + virtual ~Semaphore() + { CloseHandle(S); } + + void Wait() const + { WaitForSingleObject((HANDLE)S,INFINITE); } + + int Wait_Try() const + { return ((WaitForSingleObject((HANDLE)S,INFINITE)==WAIT_OBJECT_0)?0:EAGAIN); } + + int Post() const + { return (ReleaseSemaphore((HANDLE)S,1,0)?0:ERANGE); } + + int Value() const + { LONG V = -1; ReleaseSemaphore((HANDLE)S,0,&V); return V; } + + void Reset( int init = 0 ) + { + CloseHandle(S); + S = CreateSemaphore(0,init,SEM_VALUE_MAX,0); + } +}; + +#endif // !_Semaphore_Win32_ Property changes on: src/common/Win32/Semaphore.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: src/common/Win32/Thread.h =================================================================== --- src/common/Win32/Thread.h (rev 0) +++ src/common/Win32/Thread.h 2006-11-29 14:12:21 UTC (rev 221) @@ -0,0 +1,339 @@ +///////////////////////////////////////////////////////////////////// +// Written by Phillip Sitbon +// Copyright 2003 +// +// Win32/Thread.h +// - Windows thread +// +// - From CreateThread Platform SDK Documentation: +// +// "A thread that uses functions from the static C run-time +// libraries should use the beginthread and endthread C run-time +// functions for thread management rather than CreateThread and +// ExitThread. Failure to do so results in small memory leaks +// when ExitThread is called. Note that this is not a problem +// with the C run-time in a DLL." +// +// With regards to this, I have decided to use the CreateThread +// API, unless you define _CRT_ in which case there are two +// possibilities: +// +// 1. Define _USE_BEGINTHREAD: Uses _beginthread/_endthread +// (said to be *unreliable* in the SDK docs) +// +// 2. Don't - Uses _beginthreaded/_endthreadex +// +// A note about _endthread: +// +// It will call CloseHandle() on exit, and if it was already +// closed then you will get an exception. To prevent this, I +// removed the CloseHandle() functionality - this means that +// a Join() WILL wait on a Detach()'ed thread. +// +///////////////////////////////////////////////////////////////////// +#ifndef _Thread_Win32_ +#define _Thread_Win32_ + +#include "Win32.h" +#include "Semaphore.h" +#include "Mutex.h" + +#ifdef _CRT_ +# include <process.h> +# ifdef _USE_BEGINTHREAD +# define THREAD_CALL __cdecl +# define THREAD_HANDLE uintptr_t +# define THREAD_RET_T void +# define CREATE_THREAD_FAILED (-1L) +# define CREATE_THREAD_ERROR (errno) +# define CREATE_THREAD(_S,_F,_P) ((Handle)_beginthread((void (__cdecl *)(void *))_F,_S,(void *)_P)) +# define EXIT_THREAD _endthread() +# define CLOSE_HANDLE(x) 1 +# define THREAD_RETURN(x) return +# else +# define THREAD_CALL WINAPI +# define THREAD_HANDLE HANDLE +# define THREAD_RET_T UINT +# define CREATE_THREAD_FAILED (0L) +# define CREATE_THREAD_ERROR (errno) +# define CREATE_THREAD(_S,_F,_P) ((Handle)_beginthreadex(0,_S,(UINT (WINAPI *)(void *))_F,(void *)_P,0,0)) +# define EXIT_THREAD _endthreadex(0) +# define CLOSE_HANDLE(x) CloseHandle(x) +# define THREAD_RETURN(x) return(x) +# endif +#else +# define THREAD_CALL WINAPI +# define THREAD_HANDLE HANDLE +# define THREAD_RET_T DWORD +# define CREATE_THREAD_FAILED (0L) +# define CREATE_THREAD_ERROR GetLastError() +# define CREATE_THREAD(_S,_F,_P) ((Handle)CreateThread(0,_S,(DWORD (WINAPI *)(void *))_F,(void *)_P,0,0)) +# define EXIT_THREAD ExitThread(0) +# define CLOSE_HANDLE(x) CloseHandle(x) +# define THREAD_RETURN(x) return(x) +#endif + +#define InvalidHandle 0 + +template +< + typename Thread_T +> +class Thread +{ + private: + typedef struct Instance; + + public: + typedef Thread_T & Thread_R; + typedef const Thread_T & Thread_C_R; + + typedef THREAD_HANDLE Handle; + typedef void (* Handler)( Thread_R ); + + protected: + Thread() {} + + virtual void ThreadMain( Thread_R ) = 0; + + static void Exit() + { EXIT_THREAD; } + + static void TestCancel() + { Sleep(0); } + + static Handle Self() + { + //Handle Hnd = InvalidHandle; + //DuplicateHandle(GetCurrentProcess(),GetCurrentThread(),GetCurrentProcess(),(LPHANDLE)&Hnd,NULL,0,NULL); + //return Hnd; + + // only a pseudo-handle! + return (Handle)GetCurrentThread(); + } + + public: + + static int Create( + const Handler & Function, + Thread_C_R Param, + Handle * const & H = 0, + const bool & CreateDetached = false, + const unsigned int & StackSize = 0, + const bool & CancelEnable = false, // UNUSED + const bool & CancelAsync = false // UNUSED + ) + { + M_Create().Lock(); + + Instance I(Param,0,Function); + + Handle Hnd(CREATE_THREAD(StackSize,ThreadMainHandler,&I)); + + if ( Hnd == CREATE_THREAD_FAILED ) + { + if ( H ) *H = InvalidHandle; + M_Create().Unlock(); + return CREATE_THREAD_ERROR; + } + + if ( H ) *H = Hnd; + + S_Create().Wait(); + M_Create().Unlock(); + + if ( CreateDetached ) CLOSE_HANDLE(Hnd); + return 0; + } + + int Create( + Thread_C_R Param, + Handle * const & H = 0, + const bool & CreateDetached = false, + const unsigned int & StackSize = 0, + const bool & CancelEnable = false, // UNUSED + const bool & CancelAsync = false // UNUSED + ) const + { + M_Create().Lock(); + + Instance I(Param,const_cast<Thread *>(this)); + + Handle Hnd(CREATE_THREAD(StackSize,ThreadMainHandler,&I)); + + if ( Hnd == CREATE_THREAD_FAILED ) + { + if ( H ) *H = InvalidHandle; + M_Create().Unlock(); + return CREATE_THREAD_ERROR; + } + + if ( H ) *H = Hnd; + + S_Create().Wait(); + M_Create().Unlock(); + + if ( CreateDetached ) CLOSE_HANDLE(Hnd); + return 0; + } + + static int Join( const Handle &H ) + { + DWORD R = WaitForSingleObject((HANDLE)H,INFINITE); + + if ( (R == WAIT_OBJECT_0) || (R == WAIT_ABANDONED) ) + { + CLOSE_HANDLE(H); + return 0; + } + + if ( R == WAIT_TIMEOUT ) return EAGAIN; + return EINVAL; + } + + static int Kill( const Handle &H ) + { return TerminateThread((HANDLE)H,0) ? 0 : EINVAL; } + + static int Detach( const Handle &H ) + { return (CLOSE_HANDLE(H)?0:EINVAL); } + + private: + + static const Mutex &M_Create() { static Mutex M; return M; } + static const Semaphore &S_Create() { static Semaphore S; return S; } + + static THREAD_RET_T THREAD_CALL ThreadMainHandler( Instance *Param ) + { + Instance I(*Param); + Thread_T Data(I.Data); + S_Create().Post(); + + if ( I.Owner ) + I.Owner->ThreadMain(Data); + else + I.pFN(Data); + + Exit(); + THREAD_RETURN(0); + } + + struct Instance + { + Instance( Thread_C_R P, Thread<Thread_T> *const &O, const Thread<Thread_T>::Handler &pH = 0 ) + : pFN(pH), Data(P), Owner(O) {} + + Thread<Thread_T>::Thread_C_R Data; + Thread<Thread_T> * Owner; + Thread<Thread_T>::Handler pFN; + }; +}; + +///////////////////////////////////////////////////////////////////// +// Explicit Specialization of void +// +class Thread<void> +{ + private: + typedef struct Instance; + + public: + typedef THREAD_HANDLE Handle; + typedef void ( *Handler)(); + + protected: + Thread<void>() {} + + virtual void ThreadMain() = 0; + + static void Exit() + { EXIT_THREAD; } + + static void TestCancel() + { Sleep(0); } + + static Handle Self() + { return (Handle)GetCurrentThread(); } + + public: + + static int Create( + const Handler & Function, + Handle * const & H = 0, + const bool & CreateDetached = false, + const unsigned int & StackSize = 0, + const bool & CancelEnable = false, // UNUSED + const bool & CancelAsync = false // UNUSED + ) + { + Handle Hnd(CREATE_THREAD(StackSize,ThreadMainHandler_S,Function)); + + if ( Hnd == CREATE_THREAD_FAILED ) + { + if ( H ) *H = InvalidHandle; + return CREATE_THREAD_ERROR; + } + + if ( H ) *H = Hnd; + if ( CreateDetached ) CLOSE_HANDLE(Hnd); + return 0; + } + + int Create( + Handle * const & H = 0, + const bool & CreateDetached = false, + const unsigned int & StackSize = 0, + const bool & CancelEnable = false, // UNUSED + const bool & CancelAsync = false // UNUSED + ) const + { + Handle Hnd(CREATE_THREAD(StackSize,ThreadMainHandler,this)); + + if ( Hnd == CREATE_THREAD_FAILED ) + { + if ( H ) *H = InvalidHandle; + return CREATE_THREAD_ERROR; + } + + if ( H ) *H = Hnd; + if ( CreateDetached ) CLOSE_HANDLE(Hnd); + return 0; + } + + static int Join( const Handle &H ) + { + DWORD R = WaitForSingleObject((HANDLE)H,INFINITE); + + if ( (R == WAIT_OBJECT_0) || (R == WAIT_ABANDONED) ) + { + CLOSE_HANDLE(H); + return 0; + } + + if ( R == WAIT_TIMEOUT ) return EAGAIN; + return EINVAL; + } + + static int Kill( const Handle &H ) + { return TerminateThread((HANDLE)H,0) ? 0 : EINVAL; } + + static int Detach( const Handle &H ) + { return (CLOSE_HANDLE(H)?0:EINVAL); } + + private: + + static THREAD_RET_T THREAD_CALL ThreadMainHandler( Thread<void> *Param ) + { + Param->ThreadMain(); + Exit(); + THREAD_RETURN(0); + } + + static THREAD_RET_T THREAD_CALL ThreadMainHandler_S( Handler Param ) + { + Param(); + Exit(); + THREAD_RETURN(0); + } +}; + +#endif // !_Thread_Win32_ Property changes on: src/common/Win32/Thread.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: src/common/Win32/Win32.h =================================================================== --- src/common/Win32/Win32.h (rev 0) +++ src/common/Win32/Win32.h 2006-11-29 14:12:21 UTC (rev 221) @@ -0,0 +1,62 @@ +///////////////////////////////////////////////////////////////////// +// Written by Phillip Sitbon +// Copyright 2003 +// +// Win32.h +// - Windows includes +// +///////////////////////////////////////////////////////////////////// +#ifndef _Win32_ +#define _Win32_ + + #if !defined(_WINDOWS_) + // WIN32 Excludes + #ifdef WIN32_LEAN_AND_MEAN + # define VC_EXTRALEAN + # define WIN32_LEAN_AND_MEAN + # define _PRSHT_H_ + # define NOGDICAPMASKS // CC_*, LC_*, PC_*, CP_*, TC_*, RC_ + # define NOVIRTUALKEYCODES // VK_* + # define NOWINMESSAGES // WM_*, EM_*, LB_*, CB_* + # define NOWINSTYLES // WS_*, CS_*, ES_*, LBS_*, SBS_*, CBS_* + # define NOSYSMETRICS // SM_* + # define NOMENUS // MF_* + # define NOICONS // IDI_* + # define NOKEYSTATES // MK_* + # define NOSYSCOMMANDS // SC_* + # define NORASTEROPS // Binary and Tertiary raster ops + # define NOSHOWWINDOW // SW_* + # define OEMRESOURCE // OEM Resource values + # define NOATOM // Atom Manager routines + # define NOCLIPBOARD // Clipboard routines + # define NOCOLOR // Screen colors + # define NOCTLMGR // Control and Dialog routines + # define NODRAWTEXT // DrawText() and DT_* + # define NOGDI // All GDI defines and routines + # define NOKERNEL // All KERNEL defines and routines + # define NOUSER // All USER defines and routines + # define NONLS // All NLS defines and routines + # define NOMB // MB_* and MessageBox() + # define NOMEMMGR // GMEM_*, LMEM_*, GHND, LHND, associated routines + # define NOMETAFILE // typedef METAFILEPICT + # define NOMINMAX // Macros min(a,b) and max(a,b) + # define NOMSG // typedef MSG and associated routines + # define NOOPENFILE // OpenFile(), OemToAnsi, AnsiToOem, and OF_* + # define NOSCROLL // SB_* and scrolling routines + # define NOSERVICE // All Service Controller routines, SERVICE_ equates, etc. + # define NOSOUND // Sound driver routines + # define NOTEXTMETRIC // typedef TEXTMETRIC and associated routines + # define NOWH // SetWindowsHook and WH_* + # define NOWINOFFSETS // GWL_*, GCL_*, associated routines + # define NOCOMM // COMM driver routines + # define NOKANJI // Kanji support stuff. + # define NOHELP // Help engine interface. + # define NOPROFILER // Profiler interface. + # define NODEFERWINDOWPOS // DeferWindowPos routines + # define NOMCX // Modem Configuration Extensions + #endif // WIN32_LEAN_AND_MEAN + // + # include <windows.h> + #endif + +#endif // !_Win32_ \ No newline at end of file Property changes on: src/common/Win32/Win32.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qr...@us...> - 2006-11-28 20:25:57
|
Revision: 220 http://svn.sourceforge.net/opengate/?rev=220&view=rev Author: qrstuvw Date: 2006-11-28 12:25:56 -0800 (Tue, 28 Nov 2006) Log Message: ----------- Client now auths against META-server Modified Paths: -------------- src/client/Makefile.am src/client/ui/GUIManager.cpp src/client/ui/MainMenu.cpp src/client/ui/MainMenu.h src/opengate_client.cpp src/server/network_meta.cpp Added Paths: ----------- src/client/network_meta.cpp src/client/network_meta.h Modified: src/client/Makefile.am =================================================================== --- src/client/Makefile.am 2006-11-28 20:23:30 UTC (rev 219) +++ src/client/Makefile.am 2006-11-28 20:25:56 UTC (rev 220) @@ -3,9 +3,9 @@ METASOURCES = AUTO noinst_LTLIBRARIES = libopengate-client.la noinst_HEADERS = network.h GameState.h GameStateManager.h Global.h \ - GameManager.h CFunctions.h + GameManager.h CFunctions.h network_meta.h libopengate_client_la_SOURCES = network.cpp GameStateManager.cpp \ - GameManager.cpp + GameManager.cpp network_meta.cpp SUBDIRS = ui libopengate_client_la_LIBADD = $(top_builddir)/src/client/ui/libopengate-ui.la AM_CXXFLAGS = -DTIXML_USE_STL Added: src/client/network_meta.cpp =================================================================== --- src/client/network_meta.cpp (rev 0) +++ src/client/network_meta.cpp 2006-11-28 20:25:56 UTC (rev 220) @@ -0,0 +1,206 @@ +/*************************************************************************** + * network_meta.cpp + * + * Sat Aug 31 21:04:10 2006 + * Copyright 2006 Christoph Brill + * Email <eg...@us...> + ****************************************************************************/ + +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public License for more details. + * + * You should have received a copy of the GNU 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. + */ + +#include "network_meta.h" +#include <iostream> +#include <string> +#include <ctime> + +struct MemoryStruct +{ + char *memory; + size_t size; +}; + +void *myrealloc(void *ptr, size_t size) +{ + /* There might be a realloc() out there that doesn't like reallocing NULL pointers, so we take care of it here */ + if(ptr) + return realloc(ptr, size); + else + return malloc(size); +} + +size_t WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data) +{ + size_t realsize = size * nmemb; + struct MemoryStruct *mem = (struct MemoryStruct *)data; + + mem->memory = (char *)myrealloc(mem->memory, mem->size + realsize + 1); + if (mem->memory) + { + memcpy(&(mem->memory[mem->size]), ptr, realsize); + mem->size += realsize; + mem->memory[mem->size] = 0; + } + return realsize; +} + + +NetworkMeta::NetworkMeta() +{ + hostname = "opacma.ontheserver.de"; + curl_global_init(CURL_GLOBAL_ALL); + curl = curl_easy_init(); + //curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1); + //curl_easy_setopt(curl, CURLOPT_MUTE, 1); +} + +NetworkMeta::~NetworkMeta() +{ + curl_easy_cleanup(curl); +} + +#define LOGIN_FAILED_NO_USERNAME -1 +#define LOGIN_FAILED_NO_PASSWORD -2 +#define LOGIN_FAILED_USER_NOT_FOUND -3 +#define LOGIN_FAILED_PASSWORD_INCORRECT -4 +#define LOGIN_FAILED_NO_ACTION -101 +#define LOGIN_FAILED_UNKOWN_ACTION -102 +#define LOGIN_FAILED_DATABASE_UNAVAILABLE -103 + +int NetworkMeta::check_login(std::string username, std::string password) +{ + + //FIXME: the password needs some kind of client side encryption to protect against stolen accounts + + std::string request = "http://" + hostname + "/script/schnittstelle/?Action=login&user=" + username + "&password=" + password; + + int retval = -1; + std::string buf; + std::vector<std::string> metaServerData; + struct MemoryStruct chunk; + + chunk.memory=NULL; /* we expect realloc(NULL, size) to work */ + chunk.size = 0; + + curl_easy_setopt(curl, CURLOPT_URL, request.c_str()); + curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback); + curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&chunk); + curl_easy_setopt(curl, CURLOPT_USERAGENT, "libcurl-agent/1.0"); + + if (curl_easy_perform(curl) == 0) + { + if (chunk.memory) + { + std::stringstream ss(chunk.memory); + while (ss >> buf) + { + metaServerData.push_back(buf); + } + if (metaServerData.size() != 1) + { + OpenGateConsole::getSingleton().print("Login successful"); + OpenGateConsole::getSingleton().render(); + time_t rawtime; + struct tm * timeinfo; + rawtime = atoi(metaServerData.at(2).c_str()); + timeinfo = localtime ( &rawtime ); + std::string s = asctime (timeinfo); + s = "Last login: "+ s; + std::cout << s; + OpenGateConsole::getSingleton().print(s); + OpenGateConsole::getSingleton().render(); + retval = 1; + } + else + { + OpenGateConsole::getSingleton().print("Login failed!"); + OpenGateConsole::getSingleton().render(); + int errorCode = atoi(metaServerData.at(0).c_str()); + if (errorCode == (LOGIN_FAILED_NO_USERNAME)) + { + OpenGateConsole::getSingleton().print("Reason given by META server: You forgot to enter your username"); + OpenGateConsole::getSingleton().render(); + } + else if (errorCode == LOGIN_FAILED_NO_PASSWORD) + { + OpenGateConsole::getSingleton().print("Reason given by META server: You forgot to enter your password"); + OpenGateConsole::getSingleton().render(); + } + else if (errorCode == LOGIN_FAILED_USER_NOT_FOUND) + { + OpenGateConsole::getSingleton().print("Reason given by META server: User does not exist"); + OpenGateConsole::getSingleton().render(); + } + else if (errorCode == LOGIN_FAILED_PASSWORD_INCORRECT) + { + OpenGateConsole::getSingleton().print("Reason given by META server: Password is incorrect"); + OpenGateConsole::getSingleton().render(); + } + else if (errorCode == LOGIN_FAILED_DATABASE_UNAVAILABLE) + { + OpenGateConsole::getSingleton().print("Reason given by META server: Database is currently unavailable, please try again in a 10 minutes"); + OpenGateConsole::getSingleton().render(); + } + else + { + OpenGateConsole::getSingleton().print("Reason: Unknown error"); + OpenGateConsole::getSingleton().render(); + } + } + } + } + + if (chunk.memory) + { + free(chunk.memory); + } + + return retval; +} + +int NetworkMeta::verify_version() +{ + std::string request = "http://" + hostname + "/script/schnittstelle/termless/version_info.php"; + + int retval = -1; + + struct MemoryStruct chunk; + + chunk.memory=NULL; /* we expect realloc(NULL, size) to work */ + chunk.size = 0; + + curl_easy_setopt(curl, CURLOPT_URL, request.c_str()); + curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback); + curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&chunk); + curl_easy_setopt(curl, CURLOPT_USERAGENT, "libcurl-agent/1.0"); + + if (curl_easy_perform(curl) == 0) + { + if (chunk.memory) + { + std::string result = chunk.memory; + retval = result.compare(VERSION); + //TODO: Find out where VERSION comes from!! + } + } + + if (chunk.memory) + { + free(chunk.memory); + } + + return retval; +} Property changes on: src/client/network_meta.cpp ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: src/client/network_meta.h =================================================================== --- src/client/network_meta.h (rev 0) +++ src/client/network_meta.h 2006-11-28 20:25:56 UTC (rev 220) @@ -0,0 +1,109 @@ +/*************************************************************************** + * network_meta.h + * + * Sat Aug 31 21:04:10 2006 + * Copyright 2006 Christoph Brill + * Email <eg...@us...> + ****************************************************************************/ + +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public License for more details. + * + * You should have received a copy of the GNU 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. + */ + +#ifndef _OPENGATE_NETWORK_META_ +#define _OPENGATE_NETWORK_META_ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <stdio.h> +#include <string> +#include <curl/curl.h> +#include "ui/OpenGateConsole.h" +#include <sstream> + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * \brief This class handles the communication from the server to a HTTP-meta-server. + * + * All stuff that needs communication between the server and a metaserver is + * handled here. This so called "stuff" can be anything from the verification + * of the login of a user or informations about the list of active servers + * to current news or economic stuff like prices, availability of products, etc. + * + * \addtogroup Server + * + * \author Christoph Brill + * \version 1.0 + * \date 2006 + */ +class NetworkMeta { +public: + + /*! + * This constructor initializes the networking to the metaserver. It initializes + * libcurl and sets a default hostname of the metaserver. + */ + NetworkMeta(); + + /*! + * This destructor destroys the communication of the meta-server by cleaning up + * libcurl + */ + ~NetworkMeta(); + + /*! + * This function passes the arguments given to the metaserver for getting the + * login-result which is performed against a database. It is part of the + * meta-communication. + * + * \param username The username sent by the client to the server for login + * \param password The password sent by the client to the server for login + */ + int check_login(std::string username, std::string password); + + /*! + * This function allows the server to verify it is running the latest version. It + * should be run on server startup to guarantee that all server run identical + * versions of the game and can talk to each other. It is part of the + * meta-communication. + * + * \return It returns if the version of the metaserver is larger or smaller. + */ + int verify_version(); + +private: + + /*! + * This variable stores the name of the host we use as metaserver + */ + std::string hostname; + + /*! + * This variable holds the reference to curl for communication + */ + CURL *curl; +}; + +#ifdef __cplusplus +} +#endif + + +#endif Property changes on: src/client/network_meta.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Modified: src/client/ui/GUIManager.cpp =================================================================== --- src/client/ui/GUIManager.cpp 2006-11-28 20:23:30 UTC (rev 219) +++ src/client/ui/GUIManager.cpp 2006-11-28 20:25:56 UTC (rev 220) @@ -57,7 +57,7 @@ consoleWindow->addChildWindow(consoleText); consoleText->setPosition(CEGUI::Point(0.0f, 0.0f)); consoleText->setSize(CEGUI::Size(1.0f, 1.0f)); - consoleText->setText("OpenGate 0.1ALPHA\n[Console version 0.0.1BETA]"); + consoleText->setText("OpenGate 0.1ALPHA\nWarning: If you see this, the OpenGateConsole is broken!"); consoleText->setVerticalFormatting(CEGUI::StaticText::BottomAligned); consoleText->setHorizontalFormatting(CEGUI::StaticText::WordWrapLeftAligned); consoleText->setVerticalScrollbarEnabled(true); Modified: src/client/ui/MainMenu.cpp =================================================================== --- src/client/ui/MainMenu.cpp 2006-11-28 20:23:30 UTC (rev 219) +++ src/client/ui/MainMenu.cpp 2006-11-28 20:25:56 UTC (rev 220) @@ -27,11 +27,26 @@ createViewports(); createScene(); createGUI(); + OpenGateConsole::getSingleton().print("Checking OpenGate version..."); + OpenGateConsole::getSingleton().render(); + if (mNWM->verify_version() == 0) + { + OpenGateConsole::getSingleton().print("Version check OK"); + OpenGateConsole::getSingleton().render(); + } + else + { + connectButton->disable(); + usernameBox->disable(); + passwordBox->disable(); + OpenGateConsole::getSingleton().print("Version check failed, press Escape to quit and upgrade your version of OpenGate!"); + OpenGateConsole::getSingleton().render(); + } } //--------------------------------------------------------------------------------// /** Called when exiting this state */ -// Tim: pretty straightforward stuff. Just mail me if there are any questions. +// Tim: pretty straightforward stuff. Just mail me if there are any questions. void MainMenu::exit() { CEGUI::WindowManager::getSingleton().destroyAllWindows(); @@ -66,18 +81,19 @@ void MainMenu::createGUI() { GUI::getSingleton().initGUI(); + GUI::getSingleton().drawConsole(); CEGUI::MouseCursor::getSingleton().show(); // FIXME: Add comment loginWindow = (CEGUI::FrameWindow*)CEGUI::WindowManager::getSingleton().createWindow("OpenGateLook/OGDefaultFrameWindow", (CEGUI::utf8*)"LoginWindow"); mFramework->GUISheet->addChildWindow(loginWindow); - loginWindow->setPosition(CEGUI::Point(0.05f, 0.05f)); + loginWindow->setPosition(CEGUI::Point(0.3f, 0.3f)); loginWindow->setSize(CEGUI::Size(0.4f, 0.6f)); loginWindow->setText("Login"); loginWindow->setTitleBarEnabled(1); loginWindow->setFrameEnabled(1); loginWindow->setTitlebarFont("BlueHighway-10"); loginWindow->setSizingEnabled(false); - loginWindow->setDragMovingEnabled(false); + loginWindow->setDragMovingEnabled(true); //CEGUI::WindowManager::getSingleton().getWindow((CEGUI::utf8*)"FrameWindow")->setVisible(true); welcomeText = (CEGUI::StaticText*)CEGUI::WindowManager::getSingleton().createWindow("OpenGateLook/OGStaticText", (CEGUI::utf8*)"WelcomeText"); @@ -121,7 +137,10 @@ // Handle text accepted events usernameBox->subscribeEvent(CEGUI::Editbox::EventTextAccepted, CEGUI::Event::Subscriber(&MainMenu::handleUsernameAccepted, this)); - passwordBox->subscribeEvent(CEGUI::Editbox::EventTextAccepted, CEGUI::Event::Subscriber(&MainMenu::handlePasswordAccepted, this)); + passwordBox->subscribeEvent(CEGUI::Editbox::EventTextAccepted, CEGUI::Event::Subscriber(&MainMenu::handleConnect, this)); + + usernameBox->setSelection(0,64); + usernameBox->activate(); } void MainMenu::createScene() @@ -139,8 +158,46 @@ passwordBox->activate(); } -bool MainMenu::handlePasswordAccepted(const CEGUI::EventArgs& e) + +// TODO: Tim: Omg, wtfbbq make this one function, please +/*bool MainMenu::handlePasswordAccepted(const CEGUI::EventArgs& e) { - GUI::getSingleton().drawConsole(); connectButton->setText("Connecting"); + connectButton->disable(); + usernameBox->disable(); + passwordBox->deactivate(); + passwordBox->disable(); + OpenGateConsole::getSingleton().print("Connecting to the META-server... "); + OpenGateConsole::getSingleton().render(); + if (mNWM->check_login(usernameBox->getText().c_str(), passwordBox->getText().c_str()) != 1) + { + usernameBox->enable(); + usernameBox->activate(); + passwordBox->enable(); + connectButton->enable(); + connectButton->setText("Connect"); + return 0; + } + changeGameState(findByName("PlayState")); +}*/ + +bool MainMenu::handleConnect(const CEGUI::EventArgs& e) +{ + connectButton->setText("Connecting"); + connectButton->disable(); + usernameBox->disable(); + passwordBox->deactivate(); + passwordBox->disable(); + OpenGateConsole::getSingleton().print("Connecting to the META-server... "); + OpenGateConsole::getSingleton().render(); + if (mNWM->check_login(usernameBox->getText().c_str(), passwordBox->getText().c_str()) != 1) + { + usernameBox->enable(); + usernameBox->activate(); + passwordBox->enable(); + connectButton->enable(); + connectButton->setText("Connect"); + return 0; + } + changeGameState(findByName("PlayState")); } Modified: src/client/ui/MainMenu.h =================================================================== --- src/client/ui/MainMenu.h 2006-11-28 20:23:30 UTC (rev 219) +++ src/client/ui/MainMenu.h 2006-11-28 20:25:56 UTC (rev 220) @@ -8,6 +8,8 @@ #include "GameState.h" #include "Global.h" #include "GUIManager.h" +#include "network_meta.h" +#include "OpenGateConsole.h" #include <iostream> @@ -32,25 +34,20 @@ CEGUI::Editbox* passwordBox; CEGUI::PushButton* connectButton; Ogre::Radian mRotScale; + NetworkMeta *mNWM; - /** Ingame GUI stuff */ - CEGUI::ProgressBar* progressBar; - CEGUI::ProgressBar* progressBar1; - CEGUI::ProgressBar* progressBar2; - CEGUI::ProgressBar* progressBar3; - CEGUI::ProgressBar* progressBar4; - CEGUI::ProgressBar* progressBar5; - CEGUI::ProgressBar* progressBar6; // Methods --------------------------------------------------------------------------------- protected: MainMenu() - {} + { + mNWM = new NetworkMeta(); + } ~MainMenu() {} bool handleUsernameAccepted(const CEGUI::EventArgs& e); - bool handlePasswordAccepted(const CEGUI::EventArgs& e); +// bool handlePasswordAccepted(const CEGUI::EventArgs& e); void enter(); void exit(); void createCamera(); @@ -64,10 +61,7 @@ std::cout << "We are in the Main Menu.\n"; } - bool handleConnect(const CEGUI::EventArgs& e) - { - changeGameState(findByName("PlayState")); - } + bool handleConnect(const CEGUI::EventArgs& e); bool frameStarted(const Ogre::FrameEvent& evt) {} Modified: src/opengate_client.cpp =================================================================== --- src/opengate_client.cpp 2006-11-28 20:23:30 UTC (rev 219) +++ src/opengate_client.cpp 2006-11-28 20:25:56 UTC (rev 220) @@ -15,6 +15,10 @@ For now the gui is for CEGUI 0.4.1 */ +/** Killing all network functionality from revision 219 onwards + If you want your old source back, checkout 218 +*/ + // TODO: upgrade CEGUI to latest stable branch bitte /* @@ -50,8 +54,6 @@ #include "client/ui/application.h" #include "common/equipment/capacitor.h" -#include "client/network.h" - #include <OIS/OISException.h> // Tim: maybe everything should be merged in the GameManager class... @@ -140,8 +142,8 @@ } } - Network* nw = new Network(); - nw->login(username, password); +// Network* nw = new Network(); +// nw->login(username, password); /* Loader* loader = new Loader(); loader->parse_file("money.xml"); @@ -229,8 +231,8 @@ */ delete(f_storage); delete(loader); - nw->quit(); - delete(nw); +// nw->quit(); +// delete(nw); cout << "-------------" << std::endl; cout << "Shutting down" << std::endl; Modified: src/server/network_meta.cpp =================================================================== --- src/server/network_meta.cpp 2006-11-28 20:23:30 UTC (rev 219) +++ src/server/network_meta.cpp 2006-11-28 20:25:56 UTC (rev 220) @@ -79,6 +79,8 @@ std::string request = "http://" + hostname + "/script/schnittstelle/?Action=login&user=" + username + "&password=" + password; + std::cout << request; + int retval = -1; struct MemoryStruct chunk; @@ -101,11 +103,12 @@ std::string faction = result.substr(loc1+1, loc2-(loc1+1)); std::string lastlogin = result.substr(loc2+1); - std::cout << userid << ".." << faction << ".." << lastlogin << std::endl; - + std::cout << userid << " " << faction << " " << lastlogin << std::endl; + std::cout << "\n\nther is no spoon in here\n\n"; retval = 1; } else { + std::cout << "\n\nwhat are we doing here?\n\n"; retval = atoi(result.c_str()); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qr...@us...> - 2006-11-28 20:23:35
|
Revision: 219 http://svn.sourceforge.net/opengate/?rev=219&view=rev Author: qrstuvw Date: 2006-11-28 12:23:30 -0800 (Tue, 28 Nov 2006) Log Message: ----------- New documentaion by Ultrasick Modified Paths: -------------- doc/meta_server/login.odt doc/meta_server/login.pdf Modified: doc/meta_server/login.odt =================================================================== (Binary files differ) Modified: doc/meta_server/login.pdf =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qr...@us...> - 2006-11-27 21:39:47
|
Revision: 218 http://svn.sourceforge.net/opengate/?rev=218&view=rev Author: qrstuvw Date: 2006-11-27 13:39:48 -0800 (Mon, 27 Nov 2006) Log Message: ----------- Meta-server documentation by Ultrastick Added Paths: ----------- doc/meta_server/ doc/meta_server/login.odt doc/meta_server/login.pdf doc/meta_server/termless/ doc/meta_server/termless/version_info.odt doc/meta_server/termless/version_info.pdf Added: doc/meta_server/login.odt =================================================================== (Binary files differ) Property changes on: doc/meta_server/login.odt ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: doc/meta_server/login.pdf =================================================================== (Binary files differ) Property changes on: doc/meta_server/login.pdf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: doc/meta_server/termless/version_info.odt =================================================================== (Binary files differ) Property changes on: doc/meta_server/termless/version_info.odt ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: doc/meta_server/termless/version_info.pdf =================================================================== (Binary files differ) Property changes on: doc/meta_server/termless/version_info.pdf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qr...@us...> - 2006-11-26 23:02:18
|
Revision: 216 http://svn.sourceforge.net/opengate/?rev=216&view=rev Author: qrstuvw Date: 2006-11-26 15:02:18 -0800 (Sun, 26 Nov 2006) Log Message: ----------- Added Skybox material script Added Paths: ----------- debug/data1.x/Materials/skybox.material Added: debug/data1.x/Materials/skybox.material =================================================================== --- debug/data1.x/Materials/skybox.material (rev 0) +++ debug/data1.x/Materials/skybox.material 2006-11-26 23:02:18 UTC (rev 216) @@ -0,0 +1,17 @@ +material Examples/SpaceSkyBox +{ + technique + { + pass + { + lighting off + depth_write off + + texture_unit + { + cubic_texture stevecube.jpg separateUV + tex_address_mode clamp + } + } + } +} Property changes on: debug/data1.x/Materials/skybox.material ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qr...@us...> - 2006-11-26 21:04:52
|
Revision: 212 http://svn.sourceforge.net/opengate/?rev=212&view=rev Author: qrstuvw Date: 2006-11-26 13:04:49 -0800 (Sun, 26 Nov 2006) Log Message: ----------- Update Fedora-happy Modified Paths: -------------- aclocal.m4 configure.in data/Faction/Makefile.in opengate.kdevelop src/Makefile.am src/client/Makefile.am src/client/network.h src/client/ui/ActionConfig.cpp src/client/ui/ActionConfig.h src/client/ui/ActionMap.cpp src/client/ui/ActionMap.h src/client/ui/Makefile.am src/client/ui/avatar.h src/client/ui/camera.h src/client/ui/framelistener.cpp src/client/ui/framelistener.h src/common/loader.h src/common/objects/object.h src/opengate_client.cpp src/server/network.h Added Paths: ----------- debug/ debug/data/ debug/data/Faction/ debug/data/Rankings/ debug/data/Ships/ debug/data/Ships/Conflux/ debug/data/Ships/Conflux/C-0/ debug/data/Ships/Conflux/C-1/ debug/data/Ships/Conflux/C-2/ debug/data/Ships/Conflux/C-3/ debug/data1.x/ debug/data1.x/GUI/ debug/data1.x/GUI/BlueHighway.ttf debug/data1.x/GUI/OpenGateLook.tga debug/data1.x/GUI/OpenGateLook.xcf debug/data1.x/Materials/ debug/data1.x/Materials/skybox.zip debug/doc/ debug/src/ debug/src/client/ debug/src/client/ui/ debug/src/common/ debug/src/common/components/ debug/src/common/equipment/ debug/src/common/objects/ debug/src/deps/ debug/src/deps/tinyxml/ debug/src/server/ src/deps/ src/deps/tinyxml/ Modified: aclocal.m4 =================================================================== --- aclocal.m4 2006-11-26 18:35:35 UTC (rev 211) +++ aclocal.m4 2006-11-26 21:04:49 UTC (rev 212) @@ -219,14 +219,6 @@ [pic_mode=default]) test -z "$pic_mode" && pic_mode=default -# Check if we have a version mismatch between libtool.m4 and ltmain.sh. -# -# Note: This should be in AC_LIBTOOL_SETUP, _after_ $ltmain have been defined. -# We also should do it _before_ AC_LIBTOOL_LANG_C_CONFIG that actually -# calls AC_LIBTOOL_CONFIG and creates libtool. -# -_LT_VERSION_CHECK - # Use C for the default configuration in the libtool script tagname= AC_LIBTOOL_LANG_C_CONFIG @@ -234,41 +226,6 @@ ])# AC_LIBTOOL_SETUP -# _LT_VERSION_CHECK -# ----------------- -AC_DEFUN([_LT_VERSION_CHECK], -[AC_MSG_CHECKING([for correct ltmain.sh version]) -if test "x$ltmain" = "x" ; then - AC_MSG_RESULT(no) - AC_MSG_ERROR([ - -*** @<:@Gentoo@:>@ sanity check failed! *** -*** \$ltmain is not defined, please check the patch for consistency! *** -]) -fi -gentoo_lt_version="1.5.22" -gentoo_ltmain_version=`sed -n '/^[[ ]]*VERSION=/{s/^[[ ]]*VERSION=//;p;q;}' "$ltmain"` -if test "x$gentoo_lt_version" != "x$gentoo_ltmain_version" ; then - AC_MSG_RESULT(no) - AC_MSG_ERROR([ - -*** @<:@Gentoo@:>@ sanity check failed! *** -*** libtool.m4 and ltmain.sh have a version mismatch! *** -*** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) *** - -Please run: - - libtoolize --copy --force - -if appropriate, please contact the maintainer of this -package (or your distribution) for help. -]) -else - AC_MSG_RESULT(yes) -fi -])# _LT_VERSION_CHECK - - # _LT_AC_SYS_COMPILER # ------------------- AC_DEFUN([_LT_AC_SYS_COMPILER], @@ -1399,30 +1356,6 @@ esac ;; - linux*) - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - if test $supports_anon_versioning = yes; then - archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ -cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -$echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - else - $archive_expsym_cmds="$archive_cmds" - fi - else - ld_shlibs=no - fi - ;; - *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; @@ -1487,14 +1420,7 @@ *) objformat=elf ;; esac fi - # Handle Gentoo/FreeBSD as it was Linux - case $host_vendor in - gentoo) - version_type=linux ;; - *) - version_type=freebsd-$objformat ;; - esac - + version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' @@ -1505,12 +1431,6 @@ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; - linux) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - need_lib_prefix=no - need_version=no - ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in @@ -1658,10 +1578,27 @@ # before this can be enabled. hardcode_into_libs=yes + # find out which ABI we are using + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" + ;; + esac + fi + rm -rf conftest* + ;; + esac + # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -6606,8 +6543,7 @@ _PKG_TEXT ])], - [AC_MSG_RESULT([no]) - $4]) + [$4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [The pkg-config script could not be found or is too old. Make sure it Modified: configure.in =================================================================== --- configure.in 2006-11-26 18:35:35 UTC (rev 211) +++ configure.in 2006-11-26 21:04:49 UTC (rev 212) @@ -14,7 +14,8 @@ AM_LDFLAGS="$AM_LDFLAGS $OGRE_LIBS" # CEGUI - http://www.cegui.org.uk/wiki/ -PKG_CHECK_MODULES(CEGUI, [CEGUI >= 0.5.0]) +# Tim: Converting the GUI to 5.0 as we speak ;] +PKG_CHECK_MODULES(CEGUI, [CEGUI >= 0.4.1]) AM_CXXFLAGS="$AM_CXXFLAGS $CEGUI_CFLAGS" AM_LDFLAGS="$AM_LDFLAGS $CEGUI_LIBS" PKG_CHECK_MODULES(CEGUI_OGRE, [CEGUI-OGRE >= 1.2.1]) @@ -44,4 +45,4 @@ AC_SUBST(AM_CXXFLAGS, "$AM_CXXFLAGS") AC_SUBST(AM_LDFLAGS, "$AM_LDFLAGS") -AC_OUTPUT(Makefile data/Ships/Conflux/C-0/Makefile data/Ships/Conflux/C-1/Makefile data/Ships/Conflux/C-2/Makefile data/Ships/Conflux/C-3/Makefile data/Ships/Conflux/Makefile data/Ships/Makefile data/Rankings/Makefile data/Makefile src/server/Makefile src/Makefile src/client/ui/Makefile src/client/Makefile src/common/Makefile src/common/objects/Makefile src/common/components/Makefile src/common/equipment/Makefile doc/Makefile data/Faction/Makefile) +AC_OUTPUT(Makefile data/Ships/Conflux/C-0/Makefile data/Ships/Conflux/C-1/Makefile data/Ships/Conflux/C-2/Makefile data/Ships/Conflux/C-3/Makefile data/Ships/Conflux/Makefile data/Ships/Makefile data/Rankings/Makefile data/Makefile src/server/Makefile src/Makefile src/client/ui/Makefile src/client/Makefile src/common/Makefile src/common/objects/Makefile src/common/components/Makefile src/common/equipment/Makefile doc/Makefile data/Faction/Makefile src/deps/Makefile src/deps/tinyxml/Makefile) Modified: data/Faction/Makefile.in =================================================================== --- data/Faction/Makefile.in 2006-11-26 18:35:35 UTC (rev 211) +++ data/Faction/Makefile.in 2006-11-26 21:04:49 UTC (rev 212) @@ -94,7 +94,6 @@ FFLAGS = @FFLAGS@ GRAPPLE_CFLAGS = @GRAPPLE_CFLAGS@ GRAPPLE_LIBS = @GRAPPLE_LIBS@ -GREP = @GREP@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -128,9 +127,13 @@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ @@ -147,30 +150,23 @@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ -htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ -localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ -psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ Added: debug/data1.x/GUI/BlueHighway.ttf =================================================================== (Binary files differ) Property changes on: debug/data1.x/GUI/BlueHighway.ttf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: debug/data1.x/GUI/OpenGateLook.tga =================================================================== (Binary files differ) Property changes on: debug/data1.x/GUI/OpenGateLook.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: debug/data1.x/GUI/OpenGateLook.xcf =================================================================== (Binary files differ) Property changes on: debug/data1.x/GUI/OpenGateLook.xcf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: debug/data1.x/Materials/skybox.zip =================================================================== (Binary files differ) Property changes on: debug/data1.x/Materials/skybox.zip ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: opengate.kdevelop =================================================================== --- opengate.kdevelop 2006-11-26 18:35:35 UTC (rev 211) +++ opengate.kdevelop 2006-11-26 21:04:49 UTC (rev 212) @@ -13,26 +13,26 @@ <ignoreparts/> <projectdirectory>.</projectdirectory> <absoluteprojectpath>false</absoluteprojectpath> - <description></description> + <description/> <versioncontrol>kdevsubversion</versioncontrol> </general> <kdevautoproject> <general> - <activetarget>src/client/ui/libopengate-ui.la</activetarget> + <activetarget>src/opengate-server</activetarget> <useconfiguration>debug</useconfiguration> <useactivetarget>true</useactivetarget> </general> <run> - <mainprogram>src/opengate-server</mainprogram> + <mainprogram/> <terminal>true</terminal> - <directoryradio>executable</directoryradio> + <directoryradio>build</directoryradio> <runarguments> <opengate/> <opengate-server/> <opengate-client/> </runarguments> <customdirectory>/</customdirectory> - <programargs></programargs> + <programargs/> <autocompile>true</autocompile> <envvars/> </run> @@ -170,7 +170,7 @@ </kdevfileview> <kdevdocumentation> <projectdoc> - <docsystem>Doxygen-Dokumentation</docsystem> + <docsystem>Doxygen Documentation Collection</docsystem> <docurl>opengate.tag</docurl> <usermanualurl/> </projectdoc> @@ -224,12 +224,12 @@ </kdevcppsupport> <kdevdebugger> <general> - <programargs></programargs> - <gdbpath></gdbpath> + <programargs/> + <gdbpath/> <dbgshell>libtool</dbgshell> - <configGdbScript></configGdbScript> - <runShellScript></runShellScript> - <runGdbScript></runGdbScript> + <configGdbScript/> + <runShellScript/> + <runGdbScript/> <breakonloadinglibs>true</breakonloadinglibs> <separatetty>false</separatetty> <floatingtoolbar>false</floatingtoolbar> Modified: src/Makefile.am =================================================================== --- src/Makefile.am 2006-11-26 18:35:35 UTC (rev 211) +++ src/Makefile.am 2006-11-26 21:04:49 UTC (rev 212) @@ -2,22 +2,27 @@ # set the include path found by configure -INCLUDES= $(all_includes) +INCLUDES = -I$(top_srcdir)/src/client -I$(top_srcdir)/src/deps \ + -I/usr/local/include/CEGUI -I/usr/local/include/OGRE -I/usr/include/libxml2 $(all_includes) # the library search path. -SUBDIRS = common client server +SUBDIRS = deps common client server opengate_server_SOURCES = opengate_server.cpp opengate_server_LDADD = $(top_builddir)/src/server/libopengate-server.la \ $(top_builddir)/src/common/libopengate-common.la opengate_client_SOURCES = opengate_client.cpp -opengate_client_LDADD = $(top_builddir)/src/client/libopengate-client.la \ - $(top_builddir)/src/common/libopengate-common.la $(top_builddir)/src/common/equipment/libopengate-equipment.la +opengate_client_LDADD = $(top_builddir)/src/deps/tinyxml/libTinyXML.la \ + $(top_builddir)/src/client/libopengate-client.la $(top_builddir)/src/common/libopengate-common.la \ + $(top_builddir)/src/common/equipment/libopengate-equipment.la $(top_builddir)/src/deps/tinyxml/libTinyXML.a pkgdatadir = $(datadir)/games/@PACKAGE@ pkgdata_DATA = ogre.cfg \ plugins.cfg \ resources.cfg +AM_CXXFLAGS = -DTIXML_USE_STL + + Modified: src/client/Makefile.am =================================================================== --- src/client/Makefile.am 2006-11-26 18:35:35 UTC (rev 211) +++ src/client/Makefile.am 2006-11-26 21:04:49 UTC (rev 212) @@ -1,7 +1,11 @@ -INCLUDES = $(all_includes) +INCLUDES = -I$(top_srcdir)/src/deps -I/usr/local/include/CEGUI $(all_includes) \ + -I/usr/local/include/OGRE METASOURCES = AUTO noinst_LTLIBRARIES = libopengate-client.la -noinst_HEADERS = network.h -libopengate_client_la_SOURCES = network.cpp +noinst_HEADERS = network.h GameState.h GameStateManager.h Global.h \ + GameManager.h CFunctions.h +libopengate_client_la_SOURCES = network.cpp GameStateManager.cpp \ + GameManager.cpp SUBDIRS = ui libopengate_client_la_LIBADD = $(top_builddir)/src/client/ui/libopengate-ui.la +AM_CXXFLAGS = -DTIXML_USE_STL Modified: src/client/network.h =================================================================== --- src/client/network.h 2006-11-26 18:35:35 UTC (rev 211) +++ src/client/network.h 2006-11-26 21:04:49 UTC (rev 212) @@ -25,7 +25,7 @@ #ifndef _OPENGATE_NETWORK_ #define _OPENGATE_NETWORK_ -#include <grapple.h> +#include <grapple/grapple.h> #include <string> /*! Modified: src/client/ui/ActionConfig.cpp =================================================================== --- src/client/ui/ActionConfig.cpp 2006-11-26 18:35:35 UTC (rev 211) +++ src/client/ui/ActionConfig.cpp 2006-11-26 21:04:49 UTC (rev 212) @@ -29,14 +29,14 @@ #include <CEGUI/elements/CEGUIMultiColumnList.h> #include <CEGUI/elements/CEGUIListboxTextItem.h> -#include "OgreSceneManager.h" -#include "OgreCamera.h" -#include "OgreRoot.h" +#include "OGRE/OgreSceneManager.h" +#include "OGRE/OgreCamera.h" +#include "OGRE/OgreRoot.h" #include "ActionConfig.h" -#include "OISMouse.h" -#include "OISKeyboard.h" -#include "OISJoyStick.h" +#include "OIS/OISMouse.h" +#include "OIS/OISKeyboard.h" +#include "OIS/OISJoyStick.h" //Some Simple Configurable Action IDs const int A_JUMP = 1; //All Modified: src/client/ui/ActionConfig.h =================================================================== --- src/client/ui/ActionConfig.h 2006-11-26 18:35:35 UTC (rev 211) +++ src/client/ui/ActionConfig.h 2006-11-26 21:04:49 UTC (rev 212) @@ -24,12 +24,12 @@ #define ActionConfig_Header #include <CEGUI/CEGUIForwardRefs.h> -#include "OISPrereqs.h" -#include "OISEvents.h" +#include <OIS/OISPrereqs.h> +#include <OIS/OISEvents.h> -#include "OgrePrerequisites.h" -#include "OgreFrameListener.h" -#include "OgreVector3.h" +#include <OGRE/OgrePrerequisites.h> +#include <OGRE/OgreFrameListener.h> +#include <OGRE/OgreVector3.h> #include "ActionMap.h" #include "avatar.h" Modified: src/client/ui/ActionMap.cpp =================================================================== --- src/client/ui/ActionMap.cpp 2006-11-26 18:35:35 UTC (rev 211) +++ src/client/ui/ActionMap.cpp 2006-11-26 21:04:49 UTC (rev 212) @@ -1,7 +1,7 @@ #include "ActionMap.h" -#include "OISMouse.h" -#include "OISKeyboard.h" -#include "OISJoyStick.h" +#include "OIS/OISMouse.h" +#include "OIS/OISKeyboard.h" +#include "OIS/OISJoyStick.h" using namespace OIS; Modified: src/client/ui/ActionMap.h =================================================================== --- src/client/ui/ActionMap.h 2006-11-26 18:35:35 UTC (rev 211) +++ src/client/ui/ActionMap.h 2006-11-26 21:04:49 UTC (rev 212) @@ -22,10 +22,10 @@ */ #ifndef _OIS_ACTIONMAPHEADERS_ #define _OIS_ACTIONMAPHEADERS_ -#include "OISPrereqs.h" -#include "OISJoyStick.h" -#include "OISMouse.h" -#include "OISKeyboard.h" +#include <OIS/OISPrereqs.h> +#include <OIS/OISJoyStick.h> +#include <OIS/OISMouse.h> +#include <OIS/OISKeyboard.h> namespace OIS { Modified: src/client/ui/Makefile.am =================================================================== --- src/client/ui/Makefile.am 2006-11-26 18:35:35 UTC (rev 211) +++ src/client/ui/Makefile.am 2006-11-26 21:04:49 UTC (rev 212) @@ -1,7 +1,12 @@ -INCLUDES = $(all_includes) +INCLUDES = -I$(top_srcdir)/src/client -I$(top_srcdir)/src/deps \ + -I/usr/local/include/CEGUI -I/usr/local/include/OGRE $(all_includes) METASOURCES = AUTO noinst_LTLIBRARIES = libopengate-ui.la libopengate_ui_la_SOURCES = application.cpp framelistener.cpp ActionConfig.cpp \ - ActionMap.cpp + ActionMap.cpp Graphics.cpp InputManager.cpp MainMenu.cpp PlayState.cpp Console.cpp \ + OpenGateConsole.cpp GUIManager.cpp noinst_HEADERS = application.h framelistener.h ActionConfig.h ActionMap.h \ - camera.h + camera.h Graphics.h InputManager.h IntroState.h MainMenu.h PlayState.h Console.h \ + OpenGateConsole.h +AM_CXXFLAGS = -DTIXML_USE_STL +libopengate_ui_la_LIBADD = $(top_builddir)/src/deps/tinyxml/libTinyXML.a Modified: src/client/ui/avatar.h =================================================================== --- src/client/ui/avatar.h 2006-11-26 18:35:35 UTC (rev 211) +++ src/client/ui/avatar.h 2006-11-26 21:04:49 UTC (rev 212) @@ -25,7 +25,7 @@ #ifndef _OPENGATE_AVATAR_ #define _OPENGATE_AVATAR_ -#include "Ogre.h" +#include <OGRE/Ogre.h> class Character { // Attributes ------------------------------------------------------------------------------ Modified: src/client/ui/camera.h =================================================================== --- src/client/ui/camera.h 2006-11-26 18:35:35 UTC (rev 211) +++ src/client/ui/camera.h 2006-11-26 21:04:49 UTC (rev 212) @@ -25,7 +25,7 @@ #ifndef _OPENGATE_CAMERA_ #define _OPENGATE_CAMERA_ -#include "Ogre.h" +#include <OGRE/Ogre.h> // Our extended camera class class ExtendedCamera { Modified: src/client/ui/framelistener.cpp =================================================================== --- src/client/ui/framelistener.cpp 2006-11-26 18:35:35 UTC (rev 211) +++ src/client/ui/framelistener.cpp 2006-11-26 21:04:49 UTC (rev 212) @@ -25,8 +25,8 @@ #include "framelistener.h" #include <CEGUI/CEGUISystem.h> -#include <OISInputManager.h> -#include <OISJoyStick.h> +#include <OIS/OISInputManager.h> +#include <OIS/OISJoyStick.h> CEGUI::MouseButton convertOISMouseButtonToCegui(int buttonID) { switch (buttonID) { Modified: src/client/ui/framelistener.h =================================================================== --- src/client/ui/framelistener.h 2006-11-26 18:35:35 UTC (rev 211) +++ src/client/ui/framelistener.h 2006-11-26 21:04:49 UTC (rev 212) @@ -26,10 +26,10 @@ #define _OPENGATE_FRAMELISTENER_ #include "OGRE/Ogre.h" -#include "OgreCEGUIRenderer.h" +#include "OGRE/OgreCEGUIRenderer.h" -#include "OISMouse.h" -#include "OISKeyboard.h" +#include "OIS/OISMouse.h" +#include "OIS/OISKeyboard.h" #ifdef __cplusplus extern "C" { Modified: src/common/loader.h =================================================================== --- src/common/loader.h 2006-11-26 18:35:35 UTC (rev 211) +++ src/common/loader.h 2006-11-26 21:04:49 UTC (rev 212) @@ -29,9 +29,9 @@ #include <config.h> #endif -#include <libxml/parser.h> -#include <libxml/tree.h> -#include <libxml/xpath.h> +#include <libxml2/libxml/parser.h> +#include <libxml2/libxml/tree.h> +#include <libxml2/libxml/xpath.h> #include <iostream> #include <vector> Modified: src/common/objects/object.h =================================================================== --- src/common/objects/object.h 2006-11-26 18:35:35 UTC (rev 211) +++ src/common/objects/object.h 2006-11-26 21:04:49 UTC (rev 212) @@ -25,7 +25,7 @@ #ifndef _OPENGATE_OBJECT_ #define _OPENGATE_OBJECT_ -#include <OgreVector3.h> +#include <OGRE/OgreVector3.h> #ifdef __cplusplus extern "C" Modified: src/opengate_client.cpp =================================================================== --- src/opengate_client.cpp 2006-11-26 18:35:35 UTC (rev 211) +++ src/opengate_client.cpp 2006-11-26 21:04:49 UTC (rev 212) @@ -6,6 +6,17 @@ * Email <eg...@us...> ****************************************************************************/ +/** + Tim: pbbly won't compile anymore using the default CEGUI 0.4.1 + Please recompile CEGUI with -DTIXML_USE_STL (or recompile with xerces) + This is fixed in the latest stable branch where TinyXML is in it's own + namespace. + + For now the gui is for CEGUI 0.4.1 +*/ + +// TODO: upgrade CEGUI to latest stable branch bitte + /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -41,8 +52,12 @@ #include "client/network.h" -#include <OISException.h> +#include <OIS/OISException.h> +// Tim: maybe everything should be merged in the GameManager class... +#include "client/Global.h" +#include "client/GameManager.h" + #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 #define DELIMITER = "--" #else @@ -52,154 +67,177 @@ using namespace std; #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -void error_handle(std::string message) { + void error_handle(std::string message) + { #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 - MessageBox( NULL, message.c_str(), "An exception has occured!", MB_OK | MB_ICONERROR | MB_TASKMODAL); + MessageBox( NULL, message.c_str(), "An exception has occured!", MB_OK | MB_ICONERROR | MB_TASKMODAL); #else - std::cerr << "An exception has occured: " << message.c_str() << std::endl; + std::cerr << "An exception has occured: " << message.c_str() << std::endl; #endif -} + } #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 #define WIN32_LEAN_AND_MEAN #include "windows.h" -INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT) { + INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT) + { #else -int main(int argc, char **argv) { + int main(int argc, char **argv) + { #endif - cout << "-----------" << std::endl; - cout << "Statring up" << std::endl; - cout << "-----------" << std::endl; + cout << "-----------" << std::endl; + cout << "Statring up" << std::endl; + cout << "-----------" << std::endl; - std::string username = "DummyUser"; - std::string password = "DummyPass"; + std::string username = "DummyUser"; + std::string password = "DummyPass"; - for (int i = 1; i < argc; i++) { - std::string argument = argv[i]; - std::string::size_type loc_delim = argument.find("--", 0 ); - if (loc_delim != string::npos) { - std::string::size_type loc_value = argument.find("=", 0 ); - if (loc_delim != string::npos) { - std::string param = argument.substr(loc_delim+2, loc_value-(loc_delim+2)); - std::string value = argument.substr(loc_value+1); + for (int i = 1; i < argc; i++) + { + std::string argument = argv[i]; + std::string::size_type loc_delim = argument.find("--", 0 ); + if (loc_delim != string::npos) + { + std::string::size_type loc_value = argument.find("=", 0 ); + if (loc_delim != string::npos) + { + std::string param = argument.substr(loc_delim+2, loc_value-(loc_delim+2)); + std::string value = argument.substr(loc_value+1); - if (param.compare("user") == 0) { - username = value; - } else if (param.compare("password") == 0) { - password = value; - } else if (param.compare("help") == 0) { - std::cout << "Opengate " << VERSION << std::endl; - std::cout << "---------------" << std::endl; - std::cout << "Arguments:" << std::endl; - std::cout << " --user: Define the username for login" << std::endl; - std::cout << " --password: Define the password for login" << std::endl; - } else { - std::cout << "Argument " << param << " is unkown, ignoring it." << std::endl; + if (param.compare("user") == 0) + { + username = value; + } + else if (param.compare("password") == 0) + { + password = value; + } + else if (param.compare("help") == 0) + { + std::cout << "Opengate " << VERSION << std::endl; + std::cout << "---------------" << std::endl; + std::cout << "Arguments:" << std::endl; + std::cout << " --user: Define the username for login" << std::endl; + std::cout << " --password: Define the password for login" << std::endl; + } + else + { + std::cout << "Argument " << param << " is unkown, ignoring it." << std::endl; + } } - } else { - cout << "Didn't find Value" << endl; + else + { + cout << "Didn't find Value" << endl; + } } - } else { - cout << "Didn't find delimiter" << endl; + else + { + cout << "Didn't find delimiter" << endl; + } } - } - Network* nw = new Network(); - nw->login(username, password); + Network* nw = new Network(); + nw->login(username, password); -/* Loader* loader = new Loader(); - loader->parse_file("money.xml"); - cout << loader->get_option("/equipment/name") << std::endl; - cout << loader->get_option("/equipment/production-center") << std::endl; - loader->parse_file("ghost.xml"); - cout << loader->get_option("/equipment/name") << std::endl; - loader->parse_file("conflux_c0.xml"); - cout << loader->get_option("/ship/name") << std::endl;*/ + /* Loader* loader = new Loader(); + loader->parse_file("money.xml"); + cout << loader->get_option("/equipment/name") << std::endl; + cout << loader->get_option("/equipment/production-center") << std::endl; + loader->parse_file("ghost.xml"); + cout << loader->get_option("/equipment/name") << std::endl; + loader->parse_file("conflux_c0.xml"); + cout << loader->get_option("/ship/name") << std::endl;*/ - Loader* loader = Loader::get_instance(); -/* FactionStorage* storage = FactionStorage::get_instance(); - Faction* faction = storage->get_faction("Hallo"); - cout << faction->get_name() << std::endl; - cout << &faction << std::endl; - faction = storage->get_faction("Hallo"); - cout << faction->get_name() << std::endl; - cout << &faction << std::endl; - faction = storage->find_faction("Hallo"); - cout << faction->get_name() << std::endl; - cout << &faction << std::endl; - try { - faction = storage->find_faction("M\xF6p"); - } catch (std::exception& e) { - cout << e.what() << std::endl; - } catch (...) { - cout << "Unkown" << std::endl; - } - storage->get_faction("M\xF6p"); - storage->find_faction("M\xF6p"); - delete(storage);*/ - FactionStorage* f_storage = FactionStorage::get_instance(); + Loader* loader = Loader::get_instance(); + /* FactionStorage* storage = FactionStorage::get_instance(); + Faction* faction = storage->get_faction("Hallo"); + cout << faction->get_name() << std::endl; + cout << &faction << std::endl; + faction = storage->get_faction("Hallo"); + cout << faction->get_name() << std::endl; + cout << &faction << std::endl; + faction = storage->find_faction("Hallo"); + cout << faction->get_name() << std::endl; + cout << &faction << std::endl; + try { + faction = storage->find_faction("M�"); + } catch (std::exception& e) { + cout << e.what() << std::endl; + } catch (...) { + cout << "Unkown" << std::endl; + } + storage->get_faction("M�"); + storage->find_faction("M�"); + delete(storage);*/ + FactionStorage* f_storage = FactionStorage::get_instance(); - /*Engine* engine = new Engine("../../data/Engines/Money/money.xml"); - cout << "Name: " << engine->get_name() << std::endl; - cout << "Class: " << engine->get_class() << std::endl; - cout << "Faction: " << engine->get_faction()->get_name() << std::endl; - cout << "Description: " << engine->get_description() << std::endl; - cout << "Manufacturer: " << engine->get_manufacturer()->get_name() << std::endl; - cout << "Efficiency: " << engine->get_efficiency() << std::endl; - cout << "Max. Thrust: " << engine->get_max_thrust() << std::endl;*/ + /*Engine* engine = new Engine("../../data/Engines/Money/money.xml"); + cout << "Name: " << engine->get_name() << std::endl; + cout << "Class: " << engine->get_class() << std::endl; + cout << "Faction: " << engine->get_faction()->get_name() << std::endl; + cout << "Description: " << engine->get_description() << std::endl; + cout << "Manufacturer: " << engine->get_manufacturer()->get_name() << std::endl; + cout << "Efficiency: " << engine->get_efficiency() << std::endl; + cout << "Max. Thrust: " << engine->get_max_thrust() << std::endl;*/ - /*Capacitor* capacitor = new Capacitor("../../data/Capacitors/s_c_15.xml"); - cout << "Name: " << capacitor->get_name() << std::endl; - cout << "Class: " << capacitor->get_class() << std::endl; - cout << "Faction: " << capacitor->get_faction()->get_name() << std::endl; - cout << "Description: " << capacitor->get_description() << std::endl;*/ + /*Capacitor* capacitor = new Capacitor("../../data/Capacitors/s_c_15.xml"); + cout << "Name: " << capacitor->get_name() << std::endl; + cout << "Class: " << capacitor->get_class() << std::endl; + cout << "Faction: " << capacitor->get_faction()->get_name() << std::endl; + cout << "Description: " << capacitor->get_description() << std::endl;*/ - /*Ship* ship = new Ship("../../data/Ships/Solrain/Premia/solrain_premia.xml"); - cout << "Name: " << ship->get_name() << std::endl; - cout << "Guncount: " << ship->get_guncount() << std::endl; - std::vector<char*> data = ship->get_productioncenters(); - std::vector<char*>::const_iterator iter; - for (iter = data.begin(); iter != data.end(); iter++) { - cout << "Production Center: " << ((char*)*iter) << std::endl; - } - ship->set_capacitor(capacitor); - cout << "Name: " << ship->get_capacitor()->get_name() << std::endl;*/ + /*Ship* ship = new Ship("../../data/Ships/Solrain/Premia/solrain_premia.xml"); + cout << "Name: " << ship->get_name() << std::endl; + cout << "Guncount: " << ship->get_guncount() << std::endl; + std::vector<char*> data = ship->get_productioncenters(); + std::vector<char*>::const_iterator iter; + for (iter = data.begin(); iter != data.end(); iter++) { + cout << "Production Center: " << ((char*)*iter) << std::endl; + } + ship->set_capacitor(capacitor); + cout << "Name: " << ship->get_capacitor()->get_name() << std::endl;*/ - // Instantiate our subclass - OpengateApp myApp; + // Instantiate our subclass - try { - // ExampleApplication provides a go method, which starts the rendering. + // Tim: redirecting control to the state manager + GameManager myApp; myApp.go(); - } catch(Ogre::Exception& e) { - error_handle(e.getFullDescription()); - return EXIT_FAILURE; - } catch(OIS::Exception &oe) { - error_handle(oe.eText); - return EXIT_FAILURE; - } catch(...) { - error_handle("Unknown Type! "); - return EXIT_FAILURE; - } - //delete(capacitor); - //delete(engine); - //delete(ship); + /* OpengateApp myApp; + + try { + // ExampleApplication provides a go method, which starts the rendering. + myApp.go(); + } catch(Ogre::Exception& e) { + error_handle(e.getFullDescription()); + return EXIT_FAILURE; + } catch(OIS::Exception &oe) { + error_handle(oe.eText); + return EXIT_FAILURE; + } catch(...) { + error_handle("Unknown Type! "); + return EXIT_FAILURE; + } + + //delete(capacitor); + //delete(engine); + //delete(ship); + */ + delete(f_storage); + delete(loader); + nw->quit(); + delete(nw); - delete(f_storage); - delete(loader); - nw->quit(); - delete(nw); + cout << "-------------" << std::endl; + cout << "Shutting down" << std::endl; + cout << "-------------" << std::endl; + return EXIT_SUCCESS; + } - cout << "-------------" << std::endl; - cout << "Shutting down" << std::endl; - cout << "-------------" << std::endl; - return EXIT_SUCCESS; -} - #ifdef __cplusplus } #endif Modified: src/server/network.h =================================================================== --- src/server/network.h 2006-11-26 18:35:35 UTC (rev 211) +++ src/server/network.h 2006-11-26 21:04:49 UTC (rev 212) @@ -29,7 +29,7 @@ #include <config.h> #endif -#include <grapple.h> +#include <grapple/grapple.h> #include "network_meta.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-11-26 18:35:41
|
Revision: 211 http://svn.sourceforge.net/opengate/?rev=211&view=rev Author: egore Date: 2006-11-26 10:35:35 -0800 (Sun, 26 Nov 2006) Log Message: ----------- Depend on CEGUI 0.5.x branch Modified Paths: -------------- configure.in Modified: configure.in =================================================================== --- configure.in 2006-10-28 20:00:26 UTC (rev 210) +++ configure.in 2006-11-26 18:35:35 UTC (rev 211) @@ -14,7 +14,7 @@ AM_LDFLAGS="$AM_LDFLAGS $OGRE_LIBS" # CEGUI - http://www.cegui.org.uk/wiki/ -PKG_CHECK_MODULES(CEGUI, [CEGUI >= 0.4.1]) +PKG_CHECK_MODULES(CEGUI, [CEGUI >= 0.5.0]) AM_CXXFLAGS="$AM_CXXFLAGS $CEGUI_CFLAGS" AM_LDFLAGS="$AM_LDFLAGS $CEGUI_LIBS" PKG_CHECK_MODULES(CEGUI_OGRE, [CEGUI-OGRE >= 1.2.1]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Gary L. <Ult...@gm...> - 2006-11-26 14:21:33
|
Tim Beelen wrote: > Let me hear what you guys think. >=20 > Anyway I=E2=80=99ve got it compiled and you can dl it from > http://www.slowperson.com/OpenGate-November25.tar.bz2 Unfortunally my computer just didn't wanted to let me boot in linux. Usua= lly I use knoppix if I just=20 want to have a quick look at some stuff in linux but since I have this ne= w sound card knoppix doesn't=20 boot anymore. I guess you are no fan of microsoft, actually I am neither even if I use = windows quite often :-) But=20 maybe you could compile it for windows. If I had a running version of the= client with an xml file for=20 the user interface which includes ... let's say 2 images and 1 text ... I= could add all the objects from=20 the current javascript/html gui into this xml file of CEGUI and test it. = I really don't want to make=20 anyone digging through my html files because they are several thousand li= nes long. --- I just rendered and uploaded the new octavia light model into opacma and = a screenshot in the project=20 website. George sent me the new blender file yesterday. In my opinion it = looks great and I am looking=20 forward to see his models of textiles and of magnitic components which he= is currently working on. Gary |
From: Gary L. <Ult...@gm...> - 2006-10-28 20:14:05
|
Hi folks, I deleted my svn client because it is only bugging me and doesn't work as it should do. So don't worry if you won't notice any changes on the GUI, I am still working ... in the background :-) Gary |