From: <eg...@us...> - 2006-04-08 13:12:38
|
Revision: 40 Author: egore Date: 2006-04-08 06:12:24 -0700 (Sat, 08 Apr 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=40&view=rev Log Message: ----------- add implemenations of the splittet classes Modified Paths: -------------- src/Makefile.am src/Makefile.in src/main.cpp src/resources.cfg Added Paths: ----------- src/application.cpp src/framelistener.cpp Modified: src/Makefile.am =================================================================== --- src/Makefile.am 2006-04-08 13:10:17 UTC (rev 39) +++ src/Makefile.am 2006-04-08 13:12:24 UTC (rev 40) @@ -5,21 +5,23 @@ ## Please disable it in the Anjuta project configuration INCLUDES =\ - -I/usr/include/OGRE -I/usr/include/CEGUI -I/usr/share/doc/ogre-1.0.7/Samples/Common/include + -I/usr/include/OGRE -I/usr/include/CEGUI -I/usr/share/doc/ogre-1.0.7/Samples/Common/include -I../include AM_CXXFLAGS =\ -g -DEXT_HASH\ -Wall\ -g -bin_PROGRAMS = osjg +bin_PROGRAMS = opengate -osjg_SOURCES = \ - main.cc +opengate_SOURCES = \ + main.cpp\ + application.cpp\ + framelistener.cpp -osjg_LDFLAGS = \ +opengate_LDFLAGS = \ -L/usr/local/lib -osjg_LDADD = \ +opengate_LDADD = \ -lOgreMain -lCEGUIBase -lCEGUIOgreRenderer Modified: src/Makefile.in =================================================================== --- src/Makefile.in 2006-04-08 13:10:17 UTC (rev 39) +++ src/Makefile.in 2006-04-08 13:12:24 UTC (rev 40) @@ -36,7 +36,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -bin_PROGRAMS = osjg$(EXEEXT) +bin_PROGRAMS = opengate$(EXEEXT) subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -50,9 +50,10 @@ am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) -am_osjg_OBJECTS = main.$(OBJEXT) -osjg_OBJECTS = $(am_osjg_OBJECTS) -osjg_DEPENDENCIES = +am_opengate_OBJECTS = main.$(OBJEXT) application.$(OBJEXT) \ + framelistener.$(OBJEXT) +opengate_OBJECTS = $(am_opengate_OBJECTS) +opengate_DEPENDENCIES = DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -64,8 +65,8 @@ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(osjg_SOURCES) -DIST_SOURCES = $(osjg_SOURCES) +SOURCES = $(opengate_SOURCES) +DIST_SOURCES = $(opengate_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -195,26 +196,28 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ INCLUDES = \ - -I/usr/include/OGRE -I/usr/include/CEGUI -I/usr/share/doc/ogre-1.0.7/Samples/Common/include + -I/usr/include/OGRE -I/usr/include/CEGUI -I/usr/share/doc/ogre-1.0.7/Samples/Common/include -I../include AM_CXXFLAGS = \ -g -DEXT_HASH\ -Wall\ -g -osjg_SOURCES = \ - main.cc +opengate_SOURCES = \ + main.cpp\ + application.cpp\ + framelistener.cpp -osjg_LDFLAGS = \ +opengate_LDFLAGS = \ -L/usr/local/lib -osjg_LDADD = \ +opengate_LDADD = \ -lOgreMain -lCEGUIBase -lCEGUIOgreRenderer all: all-am .SUFFIXES: -.SUFFIXES: .cc .lo .o .obj +.SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -272,9 +275,9 @@ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done -osjg$(EXEEXT): $(osjg_OBJECTS) $(osjg_DEPENDENCIES) - @rm -f osjg$(EXEEXT) - $(CXXLINK) $(osjg_LDFLAGS) $(osjg_OBJECTS) $(osjg_LDADD) $(LIBS) +opengate$(EXEEXT): $(opengate_OBJECTS) $(opengate_DEPENDENCIES) + @rm -f opengate$(EXEEXT) + $(CXXLINK) $(opengate_LDFLAGS) $(opengate_OBJECTS) $(opengate_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -282,23 +285,25 @@ distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/application.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/framelistener.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ -.cc.o: +.cpp.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< -.cc.obj: +.cpp.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` -.cc.lo: +.cpp.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ Added: src/application.cpp =================================================================== --- src/application.cpp (rev 0) +++ src/application.cpp 2006-04-08 13:12:24 UTC (rev 40) @@ -0,0 +1,73 @@ +/*************************************************************************** + * application.cpp + * + * Sat Apr 8 10:24:00 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 "application.h" +#include "constants.h" + +OpengateApp::OpengateApp() { + +} + +OpengateApp::~OpengateApp() { + +} + +void OpengateApp::createCamera() { + // create the camera + mCamera = mSceneMgr->createCamera("PlayerCam"); + + // set its position, direction + mCamera->setPosition(Vector3(0,10,50)); + mCamera->lookAt(Vector3(0,0,0)); + + mCamera->setNearClipDistance(5); +} + +void OpengateApp::createViewports(void) { + // Create one viewport, entire window + Viewport* vp = mWindow->addViewport(mCamera); + vp->setBackgroundColour(ColourValue(0,0,0)); + + // Alter the camera aspect ratio to match the viewport + mCamera->setAspectRatio(Real(vp->getActualWidth()) / Real(vp->getActualHeight())); +} + +void OpengateApp::createScene(void) { + Entity* ent; + + // create an ambient light for the scene + mSceneMgr->setAmbientLight( ColourValue( 1, 1, 1 ) ); + mSceneMgr->setShadowTechnique( SHADOWTYPE_STENCIL_ADDITIVE ); + + // Create an entity + ent = mSceneMgr->createEntity( "Octavius Apteryx", "Ships/Octavius/Apteryx/octavius_apteryx.mesh" ); + mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(ent); + ent = mSceneMgr->createEntity( "Quantar Storm", "Ships/Quantar/Storm/quantar_storm.mesh" ); + mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(ent); +} + +void OpengateApp::createFrameListener(void) { + mFrameListener = new MyListener(mWindow, mCamera); + mRoot->addFrameListener(mFrameListener); +} Property changes on: src/application.cpp ___________________________________________________________________ Name: svn:mime-type + text/x-c++src Name: svn:eol-style + native Added: src/framelistener.cpp =================================================================== --- src/framelistener.cpp (rev 0) +++ src/framelistener.cpp 2006-04-08 13:12:24 UTC (rev 40) @@ -0,0 +1,36 @@ +/*************************************************************************** + * framelistener.cpp + * + * Sat Apr 8 10:51:05 2006 + * Copyright 2006 User + * Email + ****************************************************************************/ + +/* + * 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 "framelistener.h" + +MyListener::MyListener(RenderWindow* win, Camera* cam) : ExampleFrameListener(win, cam) { +} + +bool MyListener::frameStarted(const FrameEvent& evt) { + return ExampleFrameListener::frameStarted(evt); +} + +bool MyListener::frameEnded(const FrameEvent& evt) { + return ExampleFrameListener::frameEnded(evt); +} Property changes on: src/framelistener.cpp ___________________________________________________________________ Name: svn:mime-type + text/x-c++src Name: svn:eol-style + native Modified: src/main.cpp =================================================================== --- src/main.cpp 2006-04-08 13:10:17 UTC (rev 39) +++ src/main.cpp 2006-04-08 13:12:24 UTC (rev 40) @@ -1,74 +1,5 @@ -#include "ExampleApplication.h" +#include "application.h" -// Declare a subclass of the ExampleFrameListener class -class MyListener : public ExampleFrameListener { -public: - MyListener(RenderWindow* win, Camera* cam) : ExampleFrameListener(win, cam) { - } - - bool frameStarted(const FrameEvent& evt) { - return ExampleFrameListener::frameStarted(evt); - } - - bool frameEnded(const FrameEvent& evt) { - return ExampleFrameListener::frameEnded(evt); - } -}; - -// Declare a subclass of the ExampleApplication class -class SampleApp : public ExampleApplication { -public: - SampleApp() { - } - - ~SampleApp() { - } - -protected: - /** - * Creates a camera for the scene - */ - virtual void createCamera() { - // create the camera - mCamera = mSceneMgr->createCamera("PlayerCam"); - - // set its position, direction - mCamera->setPosition(Vector3(0,10,50)); - mCamera->lookAt(Vector3(0,0,0)); - - mCamera->setNearClipDistance(5); - } - - virtual void createViewports(void) { - // Create one viewport, entire window - Viewport* vp = mWindow->addViewport(mCamera); - vp->setBackgroundColour(ColourValue(0,0,0)); - - // Alter the camera aspect ratio to match the viewport - mCamera->setAspectRatio(Real(vp->getActualWidth()) / Real(vp->getActualHeight())); - } - - // Define what is in the scene - virtual void createScene(void) { - - Entity* ent; - - // create an ambient light for the scene - mSceneMgr->setAmbientLight( ColourValue( 1, 1, 1 ) ); - mSceneMgr->setShadowTechnique( SHADOWTYPE_STENCIL_ADDITIVE ); - - // Create an entity - ent = mSceneMgr->createEntity( "Octavius Apteryx", "octavius_apteryx.mesh" ); - mSceneMgr->getRootSceneNode()->createChildSceneNode( )->attachObject(ent); - } - - // Create new frame listener - void createFrameListener(void) { - mFrameListener = new MyListener(mWindow, mCamera); - mRoot->addFrameListener(mFrameListener); - } -}; - #ifdef __cplusplus extern "C" { #endif @@ -82,7 +13,7 @@ #endif { // Instantiate our subclass - SampleApp myApp; + OpengateApp myApp; try { // ExampleApplication provides a go method, which starts the rendering. Modified: src/resources.cfg =================================================================== --- src/resources.cfg 2006-04-08 13:10:17 UTC (rev 39) +++ src/resources.cfg 2006-04-08 13:12:24 UTC (rev 40) @@ -5,7 +5,7 @@ # Resource locations to be added to the default path [General] -FileSystem=../data/ships +FileSystem=../data FileSystem=../media FileSystem=../media/fonts FileSystem=../media/materials/programs This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-04-16 16:45:24
|
Revision: 56 Author: egore Date: 2006-04-16 09:45:02 -0700 (Sun, 16 Apr 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=56&view=rev Log Message: ----------- break everything by splitting Modified Paths: -------------- src/Makefile.am src/Makefile.in src/application.cpp src/avatar.cpp src/framelistener.cpp src/resources.cfg Added Paths: ----------- src/camera.cpp src/gamestate.cpp src/keyboard.cpp src/mouse.cpp src/movable_object.cpp Modified: src/Makefile.am =================================================================== --- src/Makefile.am 2006-04-16 16:43:53 UTC (rev 55) +++ src/Makefile.am 2006-04-16 16:45:02 UTC (rev 56) @@ -18,7 +18,12 @@ main.cpp\ application.cpp\ framelistener.cpp\ - avatar.cpp + avatar.cpp\ + keyboard.cpp\ + mouse.cpp\ + camera.cpp\ + gamestate.cpp\ + movable_object.cpp opengate_LDFLAGS = \ -L/usr/local/lib Modified: src/Makefile.in =================================================================== --- src/Makefile.in 2006-04-16 16:43:53 UTC (rev 55) +++ src/Makefile.in 2006-04-16 16:45:02 UTC (rev 56) @@ -51,7 +51,9 @@ binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_opengate_OBJECTS = main.$(OBJEXT) application.$(OBJEXT) \ - framelistener.$(OBJEXT) avatar.$(OBJEXT) + framelistener.$(OBJEXT) avatar.$(OBJEXT) keyboard.$(OBJEXT) \ + mouse.$(OBJEXT) camera.$(OBJEXT) gamestate.$(OBJEXT) \ + movable_object.$(OBJEXT) opengate_OBJECTS = $(am_opengate_OBJECTS) opengate_DEPENDENCIES = DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) @@ -207,7 +209,12 @@ main.cpp\ application.cpp\ framelistener.cpp\ - avatar.cpp + avatar.cpp\ + keyboard.cpp\ + mouse.cpp\ + camera.cpp\ + gamestate.cpp\ + movable_object.cpp opengate_LDFLAGS = \ -L/usr/local/lib @@ -288,8 +295,13 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/application.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avatar.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/camera.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/framelistener.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gamestate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keyboard.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mouse.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/movable_object.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ Modified: src/application.cpp =================================================================== --- src/application.cpp 2006-04-16 16:43:53 UTC (rev 55) +++ src/application.cpp 2006-04-16 16:45:02 UTC (rev 56) @@ -21,20 +21,43 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - + +#include <OgreNode.h> +#include <OgreEntity.h> +#include <OgreTextureManager.h> +#include <OgreViewport.h> +#include <CEGUI/elements/CEGUIPushButton.h> #include "application.h" #include "constants.h" -OpengateApp::OpengateApp() { - mFrameListener = 0; - mRoot = 0; +OpengateApp::OpengateApp() : mGUIRenderer(NULL), + mGUISystem(NULL), + mEditorGuiSheet(NULL){ + mFrameListener = NULL; + mRoot = NULL; } OpengateApp::~OpengateApp() { - if (mFrameListener) + if(mEditorGuiSheet) { + CEGUI::WindowManager::getSingleton().destroyWindow(mEditorGuiSheet); + } + if(mGUISystem) { + delete mGUISystem; + mGUISystem = 0; + } + if(mGUIRenderer) { + delete mGUIRenderer; + mGUIRenderer = 0; + } + if (mFrameListener) { delete mFrameListener; - if (mRoot) + } + if (mCamera) { + delete mCamera; + } + if (mRoot) { delete mRoot; + } } void OpengateApp::go(void) { @@ -48,8 +71,8 @@ } bool OpengateApp::setup(void) { - mRoot = new Root(); - + mRoot = new Ogre::Root(); + setupResources(); if (!configure()) @@ -58,7 +81,7 @@ chooseSceneManager(); // Set default mipmap level (NB some APIs ignore this) - TextureManager::getSingleton().setDefaultNumMipmaps(5); + Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(5); // Create any resource listeners (for loading screens) createResourceListener(); @@ -67,9 +90,10 @@ // Create the scene createScene(); + + mCamera = new Camera(mSceneMgr, mWindow, mAvatarNode, true); - createCamera(); - createViewports(); + setupEventHandlers(); createFrameListener(); @@ -93,50 +117,41 @@ void OpengateApp::chooseSceneManager(void) { // Get the SceneManager, in this case a generic one - mSceneMgr = mRoot->getSceneManager(ST_GENERIC); + mSceneMgr = mRoot->getSceneManager(Ogre::ST_GENERIC); } -void OpengateApp::createCamera() { - // create the camera - mCamera = mSceneMgr->createCamera("PlayerCam"); +void OpengateApp::createScene() { + // create an ambient light for the scene + mSceneMgr->setAmbientLight(Ogre::ColourValue( 1, 1, 1 )); + mSceneMgr->setShadowTechnique(Ogre::SHADOWTYPE_STENCIL_ADDITIVE); + mSceneMgr->setSkyBox(true, "Examples/SpaceSkyBox"); - // set its position, direction - mCamera->setPosition(Vector3(0,10,50)); - mCamera->lookAt(Vector3(0,0,0)); - //mCamera->setAutoTracking (true, mAvatarNode); // The camera will always look at the camera target - //mCamera->setFixedYawAxis (true); // Needed because of auto tracking + // setup GUI system + mGUIRenderer = new CEGUI::OgreCEGUIRenderer(mWindow, Ogre::RENDER_QUEUE_OVERLAY, false, 3000, mSceneMgr); + mGUISystem = new CEGUI::System(mGUIRenderer); + CEGUI::SchemeManager::getSingleton().loadScheme((CEGUI::utf8*)"TaharezLook.scheme"); + mGUISystem->setDefaultMouseCursor((CEGUI::utf8*)"TaharezLook", (CEGUI::utf8*)"MouseArrow"); + mGUISystem->setDefaultFont((CEGUI::utf8*)"Tahoma-12"); + mEditorGuiSheet= CEGUI::WindowManager::getSingleton().createWindow((CEGUI::utf8*)"DefaultWindow", (CEGUI::utf8*)"Sheet"); + mGUISystem->setGUISheet(mEditorGuiSheet); CEGUI::Logger::getSingleton().setLoggingLevel(CEGUI::Informative); - mCamera->setNearClipDistance(5); -} + CEGUI::PushButton* quitButton = (CEGUI::PushButton*)CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/Button", (CEGUI::utf8*)"Quit"); + mEditorGuiSheet->addChildWindow(quitButton); + quitButton->setPosition(CEGUI::Point(1.0f, 1.0f)); + quitButton->setSize(CEGUI::Size(0.3f, 0.1f)); + quitButton->setText("Quit"); -void OpengateApp::createViewports() { - // Create one viewport, entire window - Viewport* vp = mWindow->addViewport(mCamera); - vp->setBackgroundColour(ColourValue(0,0,0)); - - // Alter the camera aspect ratio to match the viewport - mCamera->setAspectRatio(Real(vp->getActualWidth()) / Real(vp->getActualHeight())); -} - -void OpengateApp::createScene() { - // create an ambient light for the scene - mSceneMgr->setAmbientLight( ColourValue( 1, 1, 1 ) ); - mSceneMgr->setShadowTechnique( SHADOWTYPE_STENCIL_ADDITIVE ); - - mSceneMgr->setSkyBox(true, "Examples/SpaceSkyBox"); - // Create an entity - Entity* ent = mSceneMgr->createEntity( "Octavius Apteryx", "Ships/Octavius/Apteryx/octavius_apteryx.mesh" ); + Ogre::Entity* ent = mSceneMgr->createEntity( "Octavius Apteryx", "Ships/Octavius/Apteryx/octavius_apteryx.mesh" ); mAvatarNode = mSceneMgr->getRootSceneNode()->createChildSceneNode(); mAvatarNode->attachObject(ent); - mAvatarNode->setPosition(Vector3(0,0,30)); - mAvatarNode->rotate(Vector3(0.,1.,0.),Degree(-90)); - //mSightNode = node->createChildSceneNode ("Octavius Apteryx" + "_sight", Vector3 (0, 0, 100)); + mAvatarNode->setPosition(Ogre::Vector3(0,0,30)); + mAvatarNode->rotate(Ogre::Vector3(0.,1.,0.), Ogre::Degree(-90)); mAvatar = new Avatar(mAvatarNode); - ent = mSceneMgr->createEntity( "Quantar Storm", "Ships/Quantar/Storm/quantar_storm.mesh" ); - SceneNode* node2 = mSceneMgr->getRootSceneNode()->createChildSceneNode(); - node2->attachObject(ent); + //ent = mSceneMgr->createEntity( "Quantar Storm", "Ships/Quantar/Storm/quantar_storm.mesh" ); + //Ogre::SceneNode* node2 = mSceneMgr->getRootSceneNode()->createChildSceneNode(); + //node2->attachObject(ent); } void OpengateApp::destroyScene(void) { @@ -144,30 +159,30 @@ } void OpengateApp::createFrameListener(void) { - mFrameListener = new MyListener(mWindow, mCamera, mAvatar, false, false); + mFrameListener = new OpengateListener(mWindow, mCamera, mAvatar, mGUIRenderer); mFrameListener->showDebugOverlay(true); mRoot->addFrameListener(mFrameListener); } void OpengateApp::setupResources(void) { // Load resource paths from config file - ConfigFile cf; + Ogre::ConfigFile cf; cf.load("resources.cfg"); // Go through all sections & settings in the file - ConfigFile::SectionIterator seci = cf.getSectionIterator(); + Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator(); - String secName, typeName, archName; + Ogre::String secName, typeName, archName; while (seci.hasMoreElements()) { secName = seci.peekNextKey(); - ConfigFile::SettingsMultiMap *settings = seci.getNext(); - ConfigFile::SettingsMultiMap::iterator i; + Ogre::ConfigFile::SettingsMultiMap *settings = seci.getNext(); + Ogre::ConfigFile::SettingsMultiMap::iterator i; for (i = settings->begin(); i != settings->end(); ++i) { typeName = i->first; archName = i->second; - ResourceGroupManager::getSingleton().addResourceLocation( + Ogre::ResourceGroupManager::getSingleton().addResourceLocation( archName, typeName, secName); } } @@ -180,6 +195,15 @@ void OpengateApp::loadResources(void) { // Initialise, parse scripts etc - ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); + Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); +} +void OpengateApp::setupEventHandlers(void) { + CEGUI::WindowManager& wmgr = CEGUI::WindowManager::getSingleton(); + wmgr.getWindow((CEGUI::utf8*)"Quit")->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&OpengateApp::handleQuit, this)); } + +bool OpengateApp::handleQuit(const CEGUI::EventArgs& e) { + static_cast<OpengateListener*>(mFrameListener)->requestShutdown(); + return true; +} Modified: src/avatar.cpp =================================================================== --- src/avatar.cpp 2006-04-16 16:43:53 UTC (rev 55) +++ src/avatar.cpp 2006-04-16 16:45:02 UTC (rev 56) @@ -2,8 +2,8 @@ * avatar.cpp * * Sun Apr 9 14:58:35 2006 - * Copyright 2006 User - * Email + * Copyright 2006 Christoph Brill + * Email <eg...@us...> ****************************************************************************/ /* @@ -24,11 +24,12 @@ #include "avatar.h" -Avatar::Avatar(SceneNode* node) { +Avatar::Avatar(Ogre::SceneNode* node) { mNode = node; - pitch = Radian(0.001396)*100; - roll = Radian(0.001222)*100; - yaw = Radian(0.001396)*100; + pitch = Ogre::Radian(0.001396)*100; + roll = Ogre::Radian(0.001222)*100; + yaw = Ogre::Radian(0.001396)*100; + mMoveEndOfFrame = false; //TODO } Avatar::~Avatar() { @@ -36,50 +37,61 @@ } bool Avatar::move(const int direction, float scale) { - Vector3 translateVector = mNode->getPosition(); - Quaternion newOrientation; + mTranslateVector = mNode->getPosition(); switch(direction) { case Avatar::LEFT: - translateVector += mNode->getOrientation () * Vector3 (0, 0, .1 * scale); + mTranslateVector += mNode->getOrientation () * Ogre::Vector3 (0, 0, .1 * scale); break; case Avatar::RIGHT: - translateVector -= mNode->getOrientation () * Vector3 (0, 0, .1 * scale); + mTranslateVector -= mNode->getOrientation () * Ogre::Vector3 (0, 0, .1 * scale); break; case Avatar::UP: - translateVector += mNode->getOrientation () * Vector3 (0, .1 * scale, 0); + mTranslateVector += mNode->getOrientation () * Ogre::Vector3 (0, .1 * scale, 0); break; case Avatar::DOWN: - translateVector -= mNode->getOrientation () * Vector3 (0, .1 * scale, 0); + mTranslateVector -= mNode->getOrientation () * Ogre::Vector3 (0, .1 * scale, 0); break; case Avatar::FRONT: - translateVector -= mNode->getOrientation () * Vector3 (1 * scale, 0, 0 ); + mTranslateVector -= mNode->getOrientation () * Ogre::Vector3 (1 * scale, 0, 0 ); break; case Avatar::BACK: - translateVector += mNode->getOrientation () * Vector3 (.5 * scale, 0, 0 ); + mTranslateVector += mNode->getOrientation () * Ogre::Vector3 (.5 * scale, 0, 0 ); break; + default: + break; + } + if (!mMoveEndOfFrame) { + mNode->setPosition(mTranslateVector); + } + return true; +} + +bool Avatar::rotate(int direction, Ogre::Degree scale) { + switch(direction) { case Avatar::YAW_LEFT: - newOrientation = Quaternion(yaw, Vector3::UNIT_Y); + mNewOrientation = Ogre::Quaternion(yaw*scale, Ogre::Vector3::UNIT_Y); break; case Avatar::YAW_RIGHT: - newOrientation = Quaternion(-yaw, Vector3::UNIT_Y); + mNewOrientation = Ogre::Quaternion(-yaw*scale, Ogre::Vector3::UNIT_Y); break; case Avatar::ROLL_LEFT: - newOrientation = Quaternion(roll, Vector3::UNIT_X); + mNewOrientation = Ogre::Quaternion(roll*scale, Ogre::Vector3::UNIT_X); break; case Avatar::ROLL_RIGHT: - newOrientation = Quaternion(-roll, Vector3::UNIT_X); + mNewOrientation = Ogre::Quaternion(-roll*scale, Ogre::Vector3::UNIT_X); break; case Avatar::PITCH_DOWN: - newOrientation = Quaternion(pitch, Vector3::UNIT_Z); + mNewOrientation = Ogre::Quaternion(pitch*scale, Ogre::Vector3::UNIT_Z); break; case Avatar::PITCH_UP: - newOrientation = Quaternion(-pitch, Vector3::UNIT_Z); + mNewOrientation = Ogre::Quaternion(-pitch*scale, Ogre::Vector3::UNIT_Z); break; default: - newOrientation = Quaternion(Degree(0), Vector3::UNIT_X); + mNewOrientation = Ogre::Quaternion(Ogre::Degree(0), Ogre::Vector3::UNIT_X); break; } - mNode->setPosition(translateVector); - mNode->rotate(newOrientation); + if (!mMoveEndOfFrame) { + mNode->rotate(mNewOrientation); + } return true; } Added: src/camera.cpp =================================================================== --- src/camera.cpp (rev 0) +++ src/camera.cpp 2006-04-16 16:45:02 UTC (rev 56) @@ -0,0 +1,134 @@ +/*************************************************************************** + * camera.cpp + * + * Sat Apr 15 17:51:12 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 <OgreViewport.h> +#include <OgreMath.h> +#include "camera.h" + +Camera::Camera(Ogre::SceneManager* sceneManager, Ogre::RenderWindow* window, Ogre::SceneNode* avatarNode, bool moveEndOfFrame) { + this->mMoveEndOfFrame = moveEndOfFrame; + + mCamera = NULL; + mRotX = 0; + mRotY = 0; + mTranslateVector = Ogre::Vector3::ZERO; + + createCamera(sceneManager, avatarNode); + createViewports(window); +} + +void Camera::createCamera(Ogre::SceneManager* sceneManager, Ogre::SceneNode* avatarNode) { + // create the camera + mCamera = sceneManager->createCamera("PlayerCam"); + + // set its position, direction + mCamera->setPosition(Ogre::Vector3(0,10,50)); + mCamera->lookAt(Ogre::Vector3(0,0,0)); + mCamera->setAutoTracking (true, avatarNode); // The camera will always look at the camera target + mCamera->setFixedYawAxis (true); // Needed because of auto tracking + mCamera->setNearClipDistance(5); +} + +void Camera::createViewports(Ogre::RenderWindow* window) { + // Create one viewport, entire window + Ogre::Viewport* vp = window->addViewport(mCamera); + vp->setBackgroundColour(Ogre::ColourValue(0,0,0)); + + // Alter the camera aspect ratio to match the viewport + mCamera->setAspectRatio(Ogre::Real(vp->getActualWidth()) / Ogre::Real(vp->getActualHeight())); +} + +void Camera::performMove() { + // Movement does not happen at once, so don't do it again at the end of the + // frame + if (!mMoveEndOfFrame) + return; + // Make all the changes to the camera + // Note that YAW direction is around a fixed axis (freelook style) rather + // than a natural YAW (e.g. airplane) + mCamera->rotate(mNewOrientation); + mCamera->moveRelative(mTranslateVector); +} + +bool Camera::move(const int direction, float scale) { + if (!mMoveEndOfFrame) { + reset(); + } + switch(direction) { + case Camera::LEFT: + mTranslateVector += Ogre::Vector3 (0, 0, .1 * scale); + break; + case Camera::RIGHT: + mTranslateVector -= Ogre::Vector3 (0, 0, .1 * scale); + break; + case Camera::UP: + mTranslateVector += Ogre::Vector3 (0, .1 * scale, 0); + break; + case Camera::DOWN: + mTranslateVector -= Ogre::Vector3 (0, .1 * scale, 0); + break; + case Camera::FRONT: + mTranslateVector -= Ogre::Vector3 (1 * scale, 0, 0 ); + break; + case Camera::BACK: + mTranslateVector += Ogre::Vector3 (.5 * scale, 0, 0 ); + break; + default: + break; + } + if (!mMoveEndOfFrame) { + mCamera->moveRelative(mTranslateVector); + } + return true; +} + +bool Camera::rotate(int direction, Ogre::Degree scale) { + switch(direction) { + case Camera::YAW_LEFT: + mNewOrientation = Ogre::Quaternion(scale, Ogre::Vector3::UNIT_Y); + break; + case Camera::YAW_RIGHT: + mNewOrientation = Ogre::Quaternion(-scale, Ogre::Vector3::UNIT_Y); + break; + case Camera::ROLL_LEFT: + mNewOrientation = Ogre::Quaternion(scale, Ogre::Vector3::UNIT_X); + break; + case Camera::ROLL_RIGHT: + mNewOrientation = Ogre::Quaternion(-scale, Ogre::Vector3::UNIT_X); + break; + case Camera::PITCH_DOWN: + mNewOrientation = Ogre::Quaternion(scale, Ogre::Vector3::UNIT_Z); + break; + case Camera::PITCH_UP: + mNewOrientation = Ogre::Quaternion(-scale, Ogre::Vector3::UNIT_Z); + break; + default: + mNewOrientation = Ogre::Quaternion(Ogre::Degree(0), Ogre::Vector3::UNIT_X); + break; + } + if (!mMoveEndOfFrame) { + mCamera->rotate(mNewOrientation); + } + return true; +} Property changes on: src/camera.cpp ___________________________________________________________________ Name: svn:mime-type + text/x-c++src Name: svn:eol-style + native Modified: src/framelistener.cpp =================================================================== --- src/framelistener.cpp 2006-04-16 16:43:53 UTC (rev 55) +++ src/framelistener.cpp 2006-04-16 16:45:02 UTC (rev 56) @@ -23,27 +23,38 @@ */ #include "framelistener.h" +#include <OgreRenderTarget.h> +#include <OgreRenderWindow.h> +#include <OgreOverlayElement.h> +#include <OgreMaterialManager.h> -MyListener::MyListener(RenderWindow* win, Camera* cam, Avatar* avatar, - bool useBufferedInputKeys = false, - bool useBufferedInputMouse = false) { - mDebugOverlay = OverlayManager::getSingleton().getByName("Core/DebugOverlay"); - mUseBufferedInputKeys = useBufferedInputKeys; - mUseBufferedInputMouse = useBufferedInputMouse; - mInputTypeSwitchingOn = mUseBufferedInputKeys || mUseBufferedInputMouse; +CEGUI::MouseButton convertOgreButtonToCegui(int buttonID) { + switch (buttonID) { + case Ogre::MouseEvent::BUTTON0_MASK: + return CEGUI::LeftButton; + case Ogre::MouseEvent::BUTTON1_MASK: + return CEGUI::RightButton; + case Ogre::MouseEvent::BUTTON2_MASK: + return CEGUI::MiddleButton; + case Ogre::MouseEvent::BUTTON3_MASK: + return CEGUI::X1Button; + default: + return CEGUI::LeftButton; + } +} + +OpengateListener::OpengateListener( + Ogre::RenderWindow* win, Camera* cam, Avatar* avatar, CEGUI::Renderer* renderer) : mGUIRenderer(renderer){ + mDebugOverlay = Ogre::OverlayManager::getSingleton().getByName("Core/DebugOverlay"); + mInputTypeSwitchingOn = false; mRotateSpeed = 36; - mMoveSpeed = 100; + mMoveSpeed = 10; + mShutdownRequested = false; - if (mInputTypeSwitchingOn) { - mEventProcessor = new EventProcessor(); - mEventProcessor->initialise(win); - mEventProcessor->startProcessingEvents(); - mEventProcessor->addKeyListener(this); - mInputDevice = mEventProcessor->getInputReader(); - } else { - mInputDevice = PlatformManager::getSingleton().createInputReader(); - mInputDevice->initialise(win, true, true); - } + mInputDevice = Ogre::PlatformManager::getSingleton().createInputReader(); + mInputDevice->initialise(win, true, true); + mKeyboard = new Keyboard(mInputDevice, avatar, cam); + mMouse = new Mouse(mInputDevice, avatar); mCamera = cam; mWindow = win; @@ -52,52 +63,46 @@ mNumScreenShots = 0; mTimeUntilNextToggle = 0; mSceneDetailIndex = 0; - mMoveScale = 0.0f; - mRotScale = 0.0f; - mTranslateVector = Vector3::ZERO; mAniso = 1; - mFiltering = TFO_BILINEAR; + mFiltering = Ogre::TFO_BILINEAR; showDebugOverlay(true); } -MyListener::~MyListener() { - if (mInputTypeSwitchingOn) { - delete mEventProcessor; - } else { - PlatformManager::getSingleton().destroyInputReader( mInputDevice ); - } +OpengateListener::~OpengateListener() { + delete mKeyboard; + Ogre::PlatformManager::getSingleton().destroyInputReader(mInputDevice); } -void MyListener::updateStats() { - static String currFps = "Current FPS: "; - static String avgFps = "Average FPS: "; - static String bestFps = "Best FPS: "; - static String worstFps = "Worst FPS: "; - static String tris = "Triangle Count: "; +void OpengateListener::updateStats() { + static Ogre::String currFps = "Current FPS: "; + static Ogre::String avgFps = "Average FPS: "; + static Ogre::String bestFps = "Best FPS: "; + static Ogre::String worstFps = "Worst FPS: "; + static Ogre::String tris = "Triangle Count: "; // update stats when necessary try { // get the statistics from the window - const RenderTarget::FrameStats& stats = mWindow->getStatistics(); + const Ogre::RenderTarget::FrameStats& stats = mWindow->getStatistics(); // get overlay elements for the statistics - OverlayElement* guiAvg = OverlayManager::getSingleton().getOverlayElement("Core/AverageFps"); - OverlayElement* guiCurr = OverlayManager::getSingleton().getOverlayElement("Core/CurrFps"); - OverlayElement* guiBest = OverlayManager::getSingleton().getOverlayElement("Core/BestFps"); - OverlayElement* guiWorst = OverlayManager::getSingleton().getOverlayElement("Core/WorstFps"); - OverlayElement* guiTris = OverlayManager::getSingleton().getOverlayElement("Core/NumTris"); - OverlayElement* guiDbg = OverlayManager::getSingleton().getOverlayElement("Core/DebugText"); + Ogre::OverlayElement* guiAvg = Ogre::OverlayManager::getSingleton().getOverlayElement("Core/AverageFps"); + Ogre::OverlayElement* guiCurr = Ogre::OverlayManager::getSingleton().getOverlayElement("Core/CurrFps"); + Ogre::OverlayElement* guiBest = Ogre::OverlayManager::getSingleton().getOverlayElement("Core/BestFps"); + Ogre::OverlayElement* guiWorst = Ogre::OverlayManager::getSingleton().getOverlayElement("Core/WorstFps"); + Ogre::OverlayElement* guiTris = Ogre::OverlayManager::getSingleton().getOverlayElement("Core/NumTris"); + Ogre::OverlayElement* guiDbg = Ogre::OverlayManager::getSingleton().getOverlayElement("Core/DebugText"); // add textual context to the overlay elements - guiAvg->setCaption(avgFps + StringConverter::toString(stats.avgFPS)); - guiCurr->setCaption(currFps + StringConverter::toString(stats.lastFPS)); - guiBest->setCaption(bestFps + StringConverter::toString(stats.bestFPS) - +" "+StringConverter::toString(stats.bestFrameTime)+" ms"); - guiWorst->setCaption(worstFps + StringConverter::toString(stats.worstFPS) - +" "+StringConverter::toString(stats.worstFrameTime)+" ms"); - guiTris->setCaption(tris + StringConverter::toString(stats.triangleCount)); + guiAvg->setCaption(avgFps + Ogre::StringConverter::toString(stats.avgFPS)); + guiCurr->setCaption(currFps + Ogre::StringConverter::toString(stats.lastFPS)); + guiBest->setCaption(bestFps + Ogre::StringConverter::toString(stats.bestFPS) + +" "+Ogre::StringConverter::toString(stats.bestFrameTime)+" ms"); + guiWorst->setCaption(worstFps + Ogre::StringConverter::toString(stats.worstFPS) + +" "+Ogre::StringConverter::toString(stats.worstFrameTime)+" ms"); + guiTris->setCaption(tris + Ogre::StringConverter::toString(stats.triangleCount)); guiDbg->setCaption(mWindow->getDebugText()); } catch(...) { @@ -105,210 +110,7 @@ } } -bool MyListener::processUnbufferedKeyInput(const FrameEvent& evt) { - - // Move avatar forwards - if (mInputDevice->isKeyDown(KC_U)) { - mAvatar->move(Avatar::FRONT, mMoveScale); - } - - // Move avatar backwards - if (mInputDevice->isKeyDown(KC_N)) { - mAvatar->move(Avatar::BACK, mMoveScale); - } - - // Move avatar forwards - if (mInputDevice->isKeyDown(KC_I)) { - mAvatar->move(Avatar::PITCH_DOWN, mMoveScale); - } - - // Move avatar backwards - if (mInputDevice->isKeyDown(KC_K)) { - mAvatar->move(Avatar::PITCH_UP, mMoveScale); - } - - // Move avatar left - if (mInputDevice->isKeyDown(KC_J)) { - mAvatar->move(Avatar::YAW_LEFT, mMoveScale); - } - - // Move avatar right - if (mInputDevice->isKeyDown(KC_L)) { - mAvatar->move(Avatar::YAW_RIGHT, mMoveScale); - } - - // Move avatar up - if (mInputDevice->isKeyDown(KC_PERIOD)) { - mAvatar->move(Avatar::ROLL_RIGHT, mMoveScale); - } - - // Move avatar down - if (mInputDevice->isKeyDown(KC_COMMA)) { - mAvatar->move(Avatar::ROLL_LEFT, mMoveScale); - } - - // Move camera left - if (mInputDevice->isKeyDown(KC_A)) { - mTranslateVector.x = -mMoveScale; - } - - // Move camera right - if (mInputDevice->isKeyDown(KC_D)) { - mTranslateVector.x = mMoveScale; - } - - // Move camera forward - if (mInputDevice->isKeyDown(KC_UP) || mInputDevice->isKeyDown(KC_W) ) { - printf("Now\n"); - mTranslateVector.z = -mMoveScale; - } - - // Move camera backwards - if (mInputDevice->isKeyDown(KC_DOWN) || mInputDevice->isKeyDown(KC_S) ) { - mTranslateVector.z = mMoveScale; - } - - // Move camera up - if (mInputDevice->isKeyDown(KC_PGUP)) { - mTranslateVector.y = mMoveScale; - } - - // Move camera down - if (mInputDevice->isKeyDown(KC_PGDOWN)) { - mTranslateVector.y = -mMoveScale; - } - - // Rotate kamera right - if (mInputDevice->isKeyDown(KC_RIGHT)) { - mCamera->yaw(-mRotScale); - } - - // Rotate kamera left - if (mInputDevice->isKeyDown(KC_LEFT)) { - mCamera->yaw(mRotScale); - } - - // quit game - if( mInputDevice->isKeyDown(KC_ESCAPE)) { - return false; - } - - // enable immediate or buffered mouse input - if (mInputTypeSwitchingOn && mInputDevice->isKeyDown(KC_M) && mTimeUntilNextToggle <= 0) { - switchMouseMode(); - mTimeUntilNextToggle = 1; - } - - // enable immediate or buffered keyboard input - if (mInputTypeSwitchingOn && mInputDevice->isKeyDown(KC_K) && mTimeUntilNextToggle <= 0) { - switchKeyMode(); - mTimeUntilNextToggle = 1; - } - - // enable/disable statistics display - if (mInputDevice->isKeyDown(KC_F) && mTimeUntilNextToggle <= 0) { - mStatsOn = !mStatsOn; - showDebugOverlay(mStatsOn); - - mTimeUntilNextToggle = 1; - } - - // switch filtering - if (mInputDevice->isKeyDown(KC_T) && mTimeUntilNextToggle <= 0) { - switch(mFiltering) { - case TFO_BILINEAR: - mFiltering = TFO_TRILINEAR; - mAniso = 1; - break; - case TFO_TRILINEAR: - mFiltering = TFO_ANISOTROPIC; - mAniso = 8; - break; - case TFO_ANISOTROPIC: - mFiltering = TFO_BILINEAR; - mAniso = 1; - break; - default: - break; - } - MaterialManager::getSingleton().setDefaultTextureFiltering(mFiltering); - MaterialManager::getSingleton().setDefaultAnisotropy(mAniso); - - showDebugOverlay(mStatsOn); - - mTimeUntilNextToggle = 1; - } - - // create screenshot - if (mInputDevice->isKeyDown(KC_SYSRQ) && mTimeUntilNextToggle <= 0) { - char tmp[20]; - sprintf(tmp, "screenshot_%d.png", ++mNumScreenShots); - mWindow->writeContentsToFile(tmp); - mTimeUntilNextToggle = 0.5; - mWindow->setDebugText(String("Wrote ") + tmp); - } - - // switch rendermode - if (mInputDevice->isKeyDown(KC_R) && mTimeUntilNextToggle <=0) { - mSceneDetailIndex = (mSceneDetailIndex+1)%3; - switch(mSceneDetailIndex) { - case 0 : mCamera->setDetailLevel(SDL_SOLID) ; break ; - case 1 : mCamera->setDetailLevel(SDL_WIREFRAME) ; break ; - case 2 : mCamera->setDetailLevel(SDL_POINTS) ; break ; - } - mTimeUntilNextToggle = 1; - } - - static bool displayCameraDetails = false; - if (mInputDevice->isKeyDown(KC_P) && mTimeUntilNextToggle <= 0) - { - - displayCameraDetails = !displayCameraDetails; - mTimeUntilNextToggle = 1; - if (!displayCameraDetails) - mWindow->setDebugText(""); - } - if (displayCameraDetails) - { - // Print camera details - mWindow->setDebugText("P: " + StringConverter::toString(mCamera->getDerivedPosition()) + " " + - "O: " + StringConverter::toString(mCamera->getDerivedOrientation())); - } - - // Return true to continue rendering - return true; -} - -bool MyListener::processUnbufferedMouseInput(const FrameEvent& evt) { - /* Rotation factors, may not be used if the second mouse button is pressed. */ - - /* If the second mouse button is pressed, then the mouse movement results in - sliding the camera, otherwise we rotate. */ - if( mInputDevice->getMouseButton(1)) { - mTranslateVector.x += mInputDevice->getMouseRelativeX() * 0.13; - mTranslateVector.y -= mInputDevice->getMouseRelativeY() * 0.13; - } - else { - mRotX = Degree(-mInputDevice->getMouseRelativeX() * 0.13); - mRotY = Degree(-mInputDevice->getMouseRelativeY() * 0.13); - } - - return true; -} - -void MyListener::moveCamera() { - if (mTranslateVector != Vector3::ZERO) - printf("Then\n"); - // Make all the changes to the camera - // Note that YAW direction is around a fixed axis (freelook style) rather - // than a natural YAW (e.g. airplane) - mCamera->yaw(mRotX); - mCamera->pitch(mRotY); - //TODO:mCamera->roll - mCamera->moveRelative(mTranslateVector); -} - -void MyListener::showDebugOverlay(bool show) { +void OpengateListener::showDebugOverlay(bool show) { if (mDebugOverlay) { if (show) { mDebugOverlay->show(); @@ -318,88 +120,66 @@ } } -bool MyListener::frameStarted(const FrameEvent& evt) { +bool OpengateListener::frameStarted(const Ogre::FrameEvent& evt) { if(mWindow->isClosed()) return false; - if (!mInputTypeSwitchingOn) { - mInputDevice->capture(); - } + mInputDevice->capture(); - if ( !mUseBufferedInputMouse || !mUseBufferedInputKeys) { - // one of the input modes is immediate, so setup what is needed for - // immediate mouse/key movement - if (mTimeUntilNextToggle >= 0) { - mTimeUntilNextToggle -= evt.timeSinceLastFrame; - } + // one of the input modes is immediate, so setup what is needed for + // immediate mouse/key movement + if (mTimeUntilNextToggle >= 0) { + mTimeUntilNextToggle -= evt.timeSinceLastFrame; + } - // If this is the first frame, pick a speed - if (evt.timeSinceLastFrame == 0) { - mMoveScale = 1; - mRotScale = 0.1; + // If this is the first frame, pick a speed + if (evt.timeSinceLastFrame == 0) { + mKeyboard->setScale(1.0); + mMouse->setScale(Ogre::Degree(0.1)); - // Otherwise scale movement units by time passed since last frame - } else { - // Move about 100 units per second, - mMoveScale = mMoveSpeed * evt.timeSinceLastFrame; - // Take about 10 seconds for full rotation - mRotScale = mRotateSpeed * evt.timeSinceLastFrame; - } - mRotX = 0; - mRotY = 0; - mTranslateVector = Vector3::ZERO; + // Otherwise scale movement units by time passed since last frame + } else { + // Move about 100 units per second, + mKeyboard->setScale(mMoveSpeed * evt.timeSinceLastFrame); + // Take about 10 seconds for full rotation + mMouse->setScale(mRotateSpeed * evt.timeSinceLastFrame); } + mCamera->reset(); - if (mUseBufferedInputKeys) { - // no need to do any processing here, it is handled by event - // processor and you get the results as KeyEvents - } else { - if (processUnbufferedKeyInput(evt) == false) { - // Game quit - return false; - } - } + if (mKeyboard->processKeyInput(evt) == false) { + // Game quit + return false; + } - if (mUseBufferedInputMouse) { - // no need to do any processing here, it is handled by event - // processor and you get the results as KeyEvents - } else { - if (processUnbufferedMouseInput(evt) == false) { - // Game quit - return false; - } - } + if (mMouse->processMouseInput(evt) == false) { + // Game quit + return false; + } // one of the input modes is immediate, so update the movement vector - if ( !mUseBufferedInputMouse || !mUseBufferedInputKeys) { - moveCamera(); - } + mCamera->performMove(); return true; } -bool MyListener::frameEnded(const FrameEvent& evt) { +bool OpengateListener::frameEnded(const Ogre::FrameEvent& evt) { + if (mShutdownRequested) { + return false; + } updateStats(); return true; } -void MyListener::switchMouseMode() { +void OpengateListener::requestShutdown() { + mShutdownRequested = true; +} + +void OpengateListener::switchMouseMode() { mUseBufferedInputMouse = !mUseBufferedInputMouse; mInputDevice->setBufferedInput(mUseBufferedInputKeys, mUseBufferedInputMouse); } -void MyListener::switchKeyMode() { +void OpengateListener::switchKeyMode() { mUseBufferedInputKeys = !mUseBufferedInputKeys; mInputDevice->setBufferedInput(mUseBufferedInputKeys, mUseBufferedInputMouse); } - -void MyListener::keyClicked(KeyEvent* e) { - if (e->getKeyChar() == 'm') { - switchMouseMode(); - } else if (e->getKeyChar() == 'k') { - switchKeyMode(); - } -} - -void MyListener::keyPressed(KeyEvent* e) {} -void MyListener::keyReleased(KeyEvent* e) {} Added: src/gamestate.cpp =================================================================== --- src/gamestate.cpp (rev 0) +++ src/gamestate.cpp 2006-04-16 16:45:02 UTC (rev 56) @@ -0,0 +1,41 @@ +/*************************************************************************** + * gamestate.cpp + * + * Sat Apr 15 18:18:13 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 "gamestate.h" + +Gamestate::Gamestate() { + mActivestate = Gamestate::GAME; +} + +bool Gamestate::setGamestate(int state) { + if ((state < Gamestate::MIN) || (state > Gamestate::MAX)) { + return false; + } + mActivestate = state; + return true; +} + +int Gamestate::getGamestate() { + return mActivestate; +} Property changes on: src/gamestate.cpp ___________________________________________________________________ Name: svn:mime-type + text/x-c++src Name: svn:eol-style + native Added: src/keyboard.cpp =================================================================== --- src/keyboard.cpp (rev 0) +++ src/keyboard.cpp 2006-04-16 16:45:02 UTC (rev 56) @@ -0,0 +1,199 @@ +/*************************************************************************** + * keyboard.cpp + * + * Sat Apr 15 16:31:18 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 "keyboard.h" + +Keyboard::Keyboard(Ogre::InputReader* inputDevice, Avatar* avatar, Camera* camera) { + this->mInputDevice = inputDevice; + this->mAvatar = avatar; + this->mCamera = camera; +} + +bool Keyboard::processKeyInput(const Ogre::FrameEvent& evt) { + Ogre::Vector3 translateVector = Ogre::Vector3::ZERO; + //Ogre::Radian rotX = 0; + //Ogre::Radian rotY = 0; + + // Move avatar forwards + if (mInputDevice->isKeyDown(Ogre::KC_U)) { + mAvatar->move(Avatar::FRONT, mMoveScale); + } + + // Move avatar backwards + if (mInputDevice->isKeyDown(Ogre::KC_N)) { + mAvatar->move(Avatar::BACK, mMoveScale); + } + + // Move avatar forwards + if (mInputDevice->isKeyDown(Ogre::KC_I)) { + mAvatar->move(Avatar::PITCH_DOWN, mMoveScale); + } + + // Move avatar backwards + if (mInputDevice->isKeyDown(Ogre::KC_K)) { + mAvatar->move(Avatar::PITCH_UP, mMoveScale); + } + + // Move avatar left + if (mInputDevice->isKeyDown(Ogre::KC_J)) { + mAvatar->move(Avatar::YAW_LEFT, mMoveScale); + } + + // Move avatar right + if (mInputDevice->isKeyDown(Ogre::KC_L)) { + mAvatar->move(Avatar::YAW_RIGHT, mMoveScale); + } + + // Move avatar up + if (mInputDevice->isKeyDown(Ogre::KC_PERIOD)) { + mAvatar->move(Avatar::ROLL_RIGHT, mMoveScale); + } + + // Move avatar down + if (mInputDevice->isKeyDown(Ogre::KC_COMMA)) { + mAvatar->move(Avatar::ROLL_LEFT, mMoveScale); + } + + // Move camera left + if (mInputDevice->isKeyDown(Ogre::KC_A)) { + mCamera->move(Camera::YAW_LEFT, mMoveScale); + } + + // Move camera right + if (mInputDevice->isKeyDown(Ogre::KC_D)) { + mCamera->move(Camera::YAW_RIGHT, mMoveScale); + } + + // Move camera forward + if (mInputDevice->isKeyDown(Ogre::KC_UP) || mInputDevice->isKeyDown(Ogre::KC_W) ) { + mCamera->move(Camera::FRONT, mMoveScale); + } + + // Move camera backwards + if (mInputDevice->isKeyDown(Ogre::KC_DOWN) || mInputDevice->isKeyDown(Ogre::KC_S) ) { + mCamera->move(Camera::BACK, mMoveScale); + } + + // Move camera up + if (mInputDevice->isKeyDown(Ogre::KC_PGUP)) { + mCamera->move(Camera::UP, mMoveScale); + } + + // Move camera down + if (mInputDevice->isKeyDown(Ogre::KC_PGDOWN)) { + mCamera->move(Camera::DOWN, mMoveScale); + } + + // Rotate kamera right + if (mInputDevice->isKeyDown(Ogre::KC_RIGHT)) { + //rotX = -mRotScale; + } + + // Rotate kamera left + if (mInputDevice->isKeyDown(Ogre::KC_LEFT)) { + //rotX = mRotScale; + } + + // quit game + if( mInputDevice->isKeyDown(Ogre::KC_ESCAPE)) { + return false; + } + + /*// enable/disable statistics display + if (mInputDevice->isKeyDown(Ogre::KC_F) && mTimeUntilNextToggle <= 0) { + mStatsOn = !mStatsOn; + showDebugOverlay(mStatsOn); + + mTimeUntilNextToggle = 1; + }TODO*/ + + /*// switch filtering + if (mInputDevice->isKeyDown(Ogre::KC_T) && mTimeUntilNextToggle <= 0) { + switch(mFiltering) { + case TFO_BILINEAR: + mFiltering = TFO_TRILINEAR; + mAniso = 1; + break; + case TFO_TRILINEAR: + mFiltering = TFO_ANISOTROPIC; + mAniso = 8; + break; + case TFO_ANISOTROPIC: + mFiltering = TFO_BILINEAR; + mAniso = 1; + break; + default: + break; + } + MaterialManager::getSingleton().setDefaultTextureFiltering(mFiltering); + MaterialManager::getSingleton().setDefaultAnisotropy(mAniso); + + showDebugOverlay(mStatsOn); + + mTimeUntilNextToggle = 1; + }TODO*/ + + // create screenshot + /*if (mInputDevice->isKeyDown(Ogre::KC_SYSRQ) && mTimeUntilNextToggle <= 0) { + char tmp[20]; + sprintf(tmp, "screenshot_%d.png", ++mNumScreenShots); + mWindow->writeContentsToFile(tmp); + mTimeUntilNextToggle = 0.5; + mWindow->setDebugText(String("Wrote ") + tmp); + }*/ + + // switch rendermode + /*if (mInputDevice->isKeyDown(Ogre::KC_R) && mTimeUntilNextToggle <=0) { + mSceneDetailIndex = (mSceneDetailIndex+1)%3; + switch(mSceneDetailIndex) { + case 0 : mCamera->setDetailLevel(Ogre::SDL_SOLID) ; break ; + case 1 : mCamera->setDetailLevel(Ogre::SDL_WIREFRAME) ; break ; + case 2 : mCamera->setDetailLevel(Ogre::SDL_POINTS) ; break ; + } + mTimeUntilNextToggle = 1; + }*/ + + /*static bool displayCameraDetails = false; + if (mInputDevice->isKeyDown(KC_P) && mTimeUntilNextToggle <= 0) + { + + displayCameraDetails = !displayCameraDetails; + mTimeUntilNextToggle = 1; + if (!displayCameraDetails) + mWindow->setDebugText(""); + } + if (displayCameraDetails) + { + // Print camera details + mWindow->setDebugText("P: " + StringConverter::toString(mCamera->getDerivedPosition()) + " " + + "O: " + StringConverter::toString(mCamera->getDerivedOrientation())); + }*/ + + // Return true to continue rendering + return true; +} + +void Keyboard::setScale(float moveScale) { + mMoveScale = moveScale; +} Property changes on: src/keyboard.cpp ___________________________________________________________________ Name: svn:mime-type + text/x-c++src Name: svn:eol-style + native Added: src/mouse.cpp =================================================================== --- src/mouse.cpp (rev 0) +++ src/mouse.cpp 2006-04-16 16:45:02 UTC (rev 56) @@ -0,0 +1,50 @@ +/*************************************************************************** + * mouse.cpp + * + * Sat Apr 15 16:55:56 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 "mouse.h" + +Mouse::Mouse(Ogre::InputReader* inputDevice, Avatar* avatar) { + this->mInputDevice = inputDevice; + this->mAvatar = avatar; + this->mTranslateVector = Ogre::Vector3::ZERO; +} + +bool Mouse::processMouseInput(const Ogre::FrameEvent& evt) { + /* Rotation factors, may not be used if the second mouse button is pressed. */ + + /* If the second mouse button is pressed, then the mouse movement results in + sliding the camera, otherwise we rotate. */ + if (mInputDevice->getMouseButton(1)) { + mAvatar->move(Avatar::LEFT, (mInputDevice->getMouseRelativeX() * 0.13)); + mAvatar->move(Avatar::DOWN, (mInputDevice->getMouseRelativeY() * 0.13)); + } else { + mAvatar->rotate(Avatar::YAW_RIGHT, Ogre::Degree(mInputDevice->getMouseRelativeX() * 0.13)); + mAvatar->rotate(Avatar::PITCH_DOWN, Ogre::Degree(mInputDevice->getMouseRelativeY() * 0.13)); + } + return true; +} + +void Mouse::setScale(Ogre::Degree rotScale) { + mRotScale = rotScale; +} Property changes on: src/mouse.cpp ___________________________________________________________________ Name: svn:mime-type + text/x-c++src Name: svn:eol-style + native Added: src/movable_object.cpp =================================================================== --- src/movable_object.cpp (rev 0) +++ src/movable_object.cpp 2006-04-16 16:45:02 UTC (rev 56) @@ -0,0 +1,31 @@ +/*************************************************************************** + * movable_object.cpp + * + * Sun Apr 16 15:55:48 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 "movable_object.h" + +void MovableObject::reset() { + //mRotX = 0; + //mRotY = 0; + mTranslateVector = Ogre::Vector3::ZERO; +} Property changes on: src/movable_object.cpp ___________________________________________________________________ Name: svn:mime-type + text/x-c++src Name: svn:eol-style + native Modified: src/resources.cfg =================================================================== --- src/resources.cfg 2006-04-16 16:43:53 UTC (rev 55) +++ src/resources.cfg 2006-04-16 16:45:02 UTC (rev 56) @@ -7,4 +7,5 @@ [General] FileSystem=../data FileSystem=../data/Materials +FileSystem=../data/Menus Zip=../data/Materials/skybox.zip This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-07-16 16:16:42
|
Revision: 76 Author: egore Date: 2006-07-16 09:16:22 -0700 (Sun, 16 Jul 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=76&view=rev Log Message: ----------- add generic interface for input devices (can be used in the planed input manager) Modified Paths: -------------- src/Makefile.am src/Makefile.in src/application.cpp src/avatar.cpp src/camera.cpp src/framelistener.cpp src/keyboard.cpp src/main.cpp src/mouse.cpp src/resources.cfg Added Paths: ----------- src/input.cpp Modified: src/Makefile.am =================================================================== --- src/Makefile.am 2006-07-16 16:12:36 UTC (rev 75) +++ src/Makefile.am 2006-07-16 16:16:22 UTC (rev 76) @@ -23,7 +23,10 @@ mouse.cpp\ camera.cpp\ gamestate.cpp\ - movable_object.cpp + movable_object.cpp\ + input.cpp\ + xml_parser.cpp\ + object.cpp opengate_LDFLAGS = \ -L/usr/local/lib Modified: src/Makefile.in =================================================================== --- src/Makefile.in 2006-07-16 16:12:36 UTC (rev 75) +++ src/Makefile.in 2006-07-16 16:16:22 UTC (rev 76) @@ -53,7 +53,8 @@ am_opengate_OBJECTS = main.$(OBJEXT) application.$(OBJEXT) \ framelistener.$(OBJEXT) avatar.$(OBJEXT) keyboard.$(OBJEXT) \ mouse.$(OBJEXT) camera.$(OBJEXT) gamestate.$(OBJEXT) \ - movable_object.$(OBJEXT) + movable_object.$(OBJEXT) input.$(OBJEXT) xml_parser.$(OBJEXT) \ + object.$(OBJEXT) opengate_OBJECTS = $(am_opengate_OBJECTS) opengate_DEPENDENCIES = DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) @@ -81,8 +82,6 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -CATALOGS = @CATALOGS@ -CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -93,7 +92,6 @@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ -DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ @@ -104,15 +102,11 @@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ -GMOFILES = @GMOFILES@ -GMSGFMT = @GMSGFMT@ +GREP = @GREP@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTOBJEXT = @INSTOBJEXT@ -INTLLIBS = @INTLLIBS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @@ -123,8 +117,6 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ -MKINSTALLDIRS = @MKINSTALLDIRS@ -MSGFMT = @MSGFMT@ NO_PREFIX_PACKAGE_DATA_DIR = @NO_PREFIX_PACKAGE_DATA_DIR@ NO_PREFIX_PACKAGE_DOC_DIR = @NO_PREFIX_PACKAGE_DOC_DIR@ NO_PREFIX_PACKAGE_HELP_DIR = @NO_PREFIX_PACKAGE_HELP_DIR@ @@ -143,23 +135,14 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -POFILES = @POFILES@ -POSUB = @POSUB@ -PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ -PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ -USE_NLS = @USE_NLS@ VERSION = @VERSION@ -XGETTEXT = @XGETTEXT@ -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@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ @@ -176,23 +159,30 @@ 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@ @@ -214,7 +204,10 @@ mouse.cpp\ camera.cpp\ gamestate.cpp\ - movable_object.cpp + movable_object.cpp\ + input.cpp\ + xml_parser.cpp\ + object.cpp opengate_LDFLAGS = \ -L/usr/local/lib @@ -298,10 +291,13 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/camera.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/framelistener.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gamestate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/input.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keyboard.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mouse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/movable_object.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/object.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xml_parser.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ Modified: src/application.cpp =================================================================== --- src/application.cpp 2006-07-16 16:12:36 UTC (rev 75) +++ src/application.cpp 2006-07-16 16:16:22 UTC (rev 76) @@ -38,16 +38,17 @@ } OpengateApp::~OpengateApp() { - if(mEditorGuiSheet) { + if (mGamestate) { + delete mGamestate; + } + if (mEditorGuiSheet) { CEGUI::WindowManager::getSingleton().destroyWindow(mEditorGuiSheet); } - if(mGUISystem) { + if (mGUISystem) { delete mGUISystem; - mGUISystem = 0; } - if(mGUIRenderer) { + if (mGUIRenderer) { delete mGUIRenderer; - mGUIRenderer = 0; } if (mFrameListener) { delete mFrameListener; @@ -92,10 +93,11 @@ createScene(); mCamera = new Camera(mSceneMgr, mWindow, mAvatarNode, true); - + mGamestate = new Gamestate(); setupEventHandlers(); createFrameListener(); + setupEventHandlers(); return true; @@ -117,7 +119,7 @@ void OpengateApp::chooseSceneManager(void) { // Get the SceneManager, in this case a generic one - mSceneMgr = mRoot->getSceneManager(Ogre::ST_GENERIC); + mSceneMgr = mRoot->createSceneManager(Ogre::ST_GENERIC, "ExampleSMInstance"); } void OpengateApp::createScene() { @@ -137,7 +139,7 @@ CEGUI::PushButton* quitButton = (CEGUI::PushButton*)CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/Button", (CEGUI::utf8*)"Quit"); mEditorGuiSheet->addChildWindow(quitButton); - quitButton->setPosition(CEGUI::Point(1.0f, 1.0f)); + quitButton->setPosition(CEGUI::Point(0.35f, 0.45f)); quitButton->setSize(CEGUI::Size(0.3f, 0.1f)); quitButton->setText("Quit"); @@ -159,7 +161,7 @@ } void OpengateApp::createFrameListener(void) { - mFrameListener = new OpengateListener(mWindow, mCamera, mAvatar, mGUIRenderer); + mFrameListener = new OpengateListener(mWindow, mCamera, mAvatar, mGUIRenderer, mGamestate); mFrameListener->showDebugOverlay(true); mRoot->addFrameListener(mFrameListener); } Modified: src/avatar.cpp =================================================================== --- src/avatar.cpp 2006-07-16 16:12:36 UTC (rev 75) +++ src/avatar.cpp 2006-07-16 16:16:22 UTC (rev 76) @@ -58,6 +58,7 @@ mTranslateVector += mNode->getOrientation () * Ogre::Vector3 (.5 * scale, 0, 0 ); break; default: + return false; break; } if (!mMoveEndOfFrame) { Modified: src/camera.cpp =================================================================== --- src/camera.cpp 2006-07-16 16:12:36 UTC (rev 75) +++ src/camera.cpp 2006-07-16 16:16:22 UTC (rev 76) @@ -95,7 +95,7 @@ mTranslateVector += Ogre::Vector3 (.5 * scale, 0, 0 ); break; default: - break; + return false; } if (!mMoveEndOfFrame) { mCamera->moveRelative(mTranslateVector); Modified: src/framelistener.cpp =================================================================== --- src/framelistener.cpp 2006-07-16 16:12:36 UTC (rev 75) +++ src/framelistener.cpp 2006-07-16 16:16:22 UTC (rev 76) @@ -44,7 +44,7 @@ } OpengateListener::OpengateListener( - Ogre::RenderWindow* win, Camera* cam, Avatar* avatar, CEGUI::Renderer* renderer) : mGUIRenderer(renderer){ + Ogre::RenderWindow* win, Camera* cam, Avatar* avatar, CEGUI::Renderer* renderer, Gamestate* gamestate) : mGUIRenderer(renderer){ mDebugOverlay = Ogre::OverlayManager::getSingleton().getByName("Core/DebugOverlay"); mInputTypeSwitchingOn = false; mRotateSpeed = 36; @@ -53,8 +53,8 @@ mInputDevice = Ogre::PlatformManager::getSingleton().createInputReader(); mInputDevice->initialise(win, true, true); - mKeyboard = new Keyboard(mInputDevice, avatar, cam); - mMouse = new Mouse(mInputDevice, avatar); + mKeyboard = new Keyboard(mInputDevice, avatar, renderer, gamestate); + mMouse = new Mouse(mInputDevice, avatar, renderer, gamestate); mCamera = cam; mWindow = win; @@ -146,12 +146,12 @@ } mCamera->reset(); - if (mKeyboard->processKeyInput(evt) == false) { + if (mKeyboard->processInput(evt) < 0) { // Game quit return false; } - if (mMouse->processMouseInput(evt) == false) { + if (mMouse->processInput(evt) < 0) { // Game quit return false; } Added: src/input.cpp =================================================================== --- src/input.cpp (rev 0) +++ src/input.cpp 2006-07-16 16:16:22 UTC (rev 76) @@ -0,0 +1,35 @@ +/*************************************************************************** + * input.cpp + * + * Mon Apr 17 11:36:04 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 "input.h" + +Input::Input(Ogre::InputReader* inputDevice, MovableObject* object, CEGUI::Renderer* guiRenderer, Gamestate* gamestate) { + this->mInputDevice = inputDevice; + this->mTarget = object; + this->mGuiRenderer = guiRenderer; + this->mGamestate = gamestate; +} + +Input::~Input() { +} Property changes on: src/input.cpp ___________________________________________________________________ Name: svn:mime-type + text/x-c++src Name: svn:eol-style + native Modified: src/keyboard.cpp =================================================================== --- src/keyboard.cpp 2006-07-16 16:12:36 UTC (rev 75) +++ src/keyboard.cpp 2006-07-16 16:16:22 UTC (rev 76) @@ -24,174 +24,138 @@ #include "keyboard.h" -Keyboard::Keyboard(Ogre::InputReader* inputDevice, Avatar* avatar, Camera* camera) { - this->mInputDevice = inputDevice; - this->mAvatar = avatar; - this->mCamera = camera; +Keyboard::Keyboard(Ogre::InputReader* inputDevice, Avatar* avatar, CEGUI::Renderer* guiRenderer, Gamestate* gamestate) + : Input (inputDevice, avatar, guiRenderer, gamestate) { + mTimeUntilNextToggle = 0; } -bool Keyboard::processKeyInput(const Ogre::FrameEvent& evt) { - Ogre::Vector3 translateVector = Ogre::Vector3::ZERO; - //Ogre::Radian rotX = 0; - //Ogre::Radian rotY = 0; - - // Move avatar forwards - if (mInputDevice->isKeyDown(Ogre::KC_U)) { - mAvatar->move(Avatar::FRONT, mMoveScale); - } +Keyboard::~Keyboard() { +} - // Move avatar backwards - if (mInputDevice->isKeyDown(Ogre::KC_N)) { - mAvatar->move(Avatar::BACK, mMoveScale); - } +Ogre::Real Keyboard::processInput(const Ogre::FrameEvent& evt) { - // Move avatar forwards - if (mInputDevice->isKeyDown(Ogre::KC_I)) { - mAvatar->move(Avatar::PITCH_DOWN, mMoveScale); - } + switch (mGamestate->getGamestate()) { + case Gamestate::GAME: + mTimeUntilNextToggle = 0; - // Move avatar backwards - if (mInputDevice->isKeyDown(Ogre::KC_K)) { - mAvatar->move(Avatar::PITCH_UP, mMoveScale); - } - - // Move avatar left - if (mInputDevice->isKeyDown(Ogre::KC_J)) { - mAvatar->move(Avatar::YAW_LEFT, mMoveScale); - } - - // Move avatar right - if (mInputDevice->isKeyDown(Ogre::KC_L)) { - mAvatar->move(Avatar::YAW_RIGHT, mMoveScale); - } - - // Move avatar up - if (mInputDevice->isKeyDown(Ogre::KC_PERIOD)) { - mAvatar->move(Avatar::ROLL_RIGHT, mMoveScale); - } - - // Move avatar down - if (mInputDevice->isKeyDown(Ogre::KC_COMMA)) { - mAvatar->move(Avatar::ROLL_LEFT, mMoveScale); - } - - // Move camera left - if (mInputDevice->isKeyDown(Ogre::KC_A)) { - mCamera->move(Camera::YAW_LEFT, mMoveScale); - } - - // Move camera right - if (mInputDevice->isKeyDown(Ogre::KC_D)) { - mCamera->move(Camera::YAW_RIGHT, mMoveScale); - } - - // Move camera forward - if (mInputDevice->isKeyDown(Ogre::KC_UP) || mInputDevice->isKeyDown(Ogre::KC_W) ) { - mCamera->move(Camera::FRONT, mMoveScale); - } - - // Move camera backwards - if (mInputDevice->isKeyDown(Ogre::KC_DOWN) || mInputDevice->isKeyDown(Ogre::KC_S) ) { - mCamera->move(Camera::BACK, mMoveScale); - } - - // Move camera up - if (mInputDevice->isKeyDown(Ogre::KC_PGUP)) { - mCamera->move(Camera::UP, mMoveScale); - } - - // Move camera down - if (mInputDevice->isKeyDown(Ogre::KC_PGDOWN)) { - mCamera->move(Camera::DOWN, mMoveScale); - } - - // Rotate kamera right - if (mInputDevice->isKeyDown(Ogre::KC_RIGHT)) { - //rotX = -mRotScale; - } + // Move avatar forwards + if (mInputDevice->isKeyDown(Ogre::KC_U)) { + mTarget->move(Avatar::FRONT, mMoveScale); + } - // Rotate kamera left - if (mInputDevice->isKeyDown(Ogre::KC_LEFT)) { - //rotX = mRotScale; - } - - // quit game - if( mInputDevice->isKeyDown(Ogre::KC_ESCAPE)) { - return false; - } - - /*// enable/disable statistics display - if (mInputDevice->isKeyDown(Ogre::KC_F) && mTimeUntilNextToggle <= 0) { - mStatsOn = !mStatsOn; - showDebugOverlay(mStatsOn); - - mTimeUntilNextToggle = 1; - }TODO*/ - - /*// switch filtering - if (mInputDevice->isKeyDown(Ogre::KC_T) && mTimeUntilNextToggle <= 0) { - switch(mFiltering) { - case TFO_BILINEAR: - mFiltering = TFO_TRILINEAR; - mAniso = 1; - break; - case TFO_TRILINEAR: - mFiltering = TFO_ANISOTROPIC; - mAniso = 8; - break; - case TFO_ANISOTROPIC: - mFiltering = TFO_BILINEAR; - mAniso = 1; - break; - default: - break; + // Move avatar backwards + if (mInputDevice->isKeyDown(Ogre::KC_N)) { + mTarget->move(Avatar::BACK, mMoveScale); } - MaterialManager::getSingleton().setDefaultTextureFiltering(mFiltering); - MaterialManager::getSingleton().setDefaultAnisotropy(mAniso); - - showDebugOverlay(mStatsOn); - - mTimeUntilNextToggle = 1; - }TODO*/ - - // create screenshot - /*if (mInputDevice->isKeyDown(Ogre::KC_SYSRQ) && mTimeUntilNextToggle <= 0) { - char tmp[20]; - sprintf(tmp, "screenshot_%d.png", ++mNumScreenShots); - mWindow->writeContentsToFile(tmp); - mTimeUntilNextToggle = 0.5; - mWindow->setDebugText(String("Wrote ") + tmp); - }*/ - - // switch rendermode - /*if (mInputDevice->isKeyDown(Ogre::KC_R) && mTimeUntilNextToggle <=0) { - mSceneDetailIndex = (mSceneDetailIndex+1)%3; - switch(mSceneDetailIndex) { - case 0 : mCamera->setDetailLevel(Ogre::SDL_SOLID) ; break ; - case 1 : mCamera->setDetailLevel(Ogre::SDL_WIREFRAME) ; break ; - case 2 : mCamera->setDetailLevel(Ogre::SDL_POINTS) ; break ; + + // Move avatar forwards + if (mInputDevice->isKeyDown(Ogre::KC_I)) { + mTarget->move(Avatar::PITCH_DOWN, mMoveScale); } - mTimeUntilNextToggle = 1; - }*/ - - /*static bool displayCameraDetails = false; - if (mInputDevice->isKeyDown(KC_P) && mTimeUntilNextToggle <= 0) - { - - displayCameraDetails = !displayCameraDetails; - mTimeUntilNextToggle = 1; - if (!displayCameraDetails) - mWindow->setDebugText(""); + + // Move avatar backwards + if (mInputDevice->isKeyDown(Ogre::KC_K)) { + mTarget->move(Avatar::PITCH_UP, mMoveScale); + } + + // Move avatar left + if (mInputDevice->isKeyDown(Ogre::KC_J)) { + mTarget->move(Avatar::YAW_LEFT, mMoveScale); + } + + // Move avatar right + if (mInputDevice->isKeyDown(Ogre::KC_L)) { + mTarget->move(Avatar::YAW_RIGHT, mMoveScale); + } + + // Move avatar up + if (mInputDevice->isKeyDown(Ogre::KC_PERIOD)) { + mTarget->move(Avatar::ROLL_RIGHT, mMoveScale); + } + + // Move avatar down + if (mInputDevice->isKeyDown(Ogre::KC_COMMA)) { + mTarget->move(Avatar::ROLL_LEFT, mMoveScale); + } + + // switch to menu + if( mInputDevice->isKeyDown(Ogre::KC_ESCAPE)) { + mGamestate->setGamestate(Gamestate::MENU); + } + + /*// switch filtering + if (mInputDevice->isKeyDown(Ogre::KC_T) && mTimeUntilNextToggle <= 0) { + switch(mFiltering) { + case TFO_BILINEAR: + mFiltering = TFO_TRILINEAR; + mAniso = 1; + break; + case TFO_TRILINEAR: + mFiltering = TFO_ANISOTROPIC; + mAniso = 8; + break; + case TFO_ANISOTROPIC: + mFiltering = TFO_BILINEAR; + mAniso = 1; + break; + default: + break; + } + MaterialManager::getSingleton().setDefaultTextureFiltering(mFiltering); + MaterialManager::getSingleton().setDefaultAnisotropy(mAniso); + + showDebugOverlay(mStatsOn); + + mTimeUntilNextToggle = 1; + } + + // create screenshot + if (mInputDevice->isKeyDown(Ogre::KC_SYSRQ) && mTimeUntilNextToggle <= 0) { + char tmp[20]; + sprintf(tmp, "screenshot_%d.png", ++mNumScreenShots); + mWindow->writeContentsToFile(tmp); + mTimeUntilNextToggle = 0.5; + mWindow->setDebugText(String("Wrote ") + tmp); + } + + // switch rendermode + if (mInputDevice->isKeyDown(Ogre::KC_R) && mTimeUntilNextToggle <=0) { + mSceneDetailIndex = (mSceneDetailIndex+1)%3; + switch(mSceneDetailIndex) { + case 0 : mCamera->setDetailLevel(Ogre::SDL_SOLID) ; break ; + case 1 : mCamera->setDetailLevel(Ogre::SDL_WIREFRAME) ; break ; + case 2 : mCamera->setDetailLevel(Ogre::SDL_POINTS) ; break ; + } + mTimeUntilNextToggle = 1; + } + + static bool displayCameraDetails = false; + if (mInputDevice->isKeyDown(KC_P) && mTimeUntilNextToggle <= 0) + { + + displayCameraDetails = !displayCameraDetails; + mTimeUntilNextToggle = 1; + if (!displayCameraDetails) + mWindow->setDebugText(""); + } + if (displayCameraDetails) + { + // Print camera details + mWindow->setDebugText("P: " + StringConverter::toString(mCamera->getDerivedPosition()) + " " + + "O: " + StringConverter::toString(mCamera->getDerivedOrientation())); + }*/ + + // Return true to continue rendering + return mTimeUntilNextToggle; + case Gamestate::MENU: + // quit game + if( mInputDevice->isKeyDown(Ogre::KC_ESCAPE)) { + return Input::GAME_QUIT; + } + return 0; + default: + return 0; } - if (displayCameraDetails) - { - // Print camera details - mWindow->setDebugText("P: " + StringConverter::toString(mCamera->getDerivedPosition()) + " " + - "O: " + StringConverter::toString(mCamera->getDerivedOrientation())); - }*/ - - // Return true to continue rendering - return true; } void Keyboard::setScale(float moveScale) { Modified: src/main.cpp =================================================================== --- src/main.cpp 2006-07-16 16:12:36 UTC (rev 75) +++ src/main.cpp 2006-07-16 16:16:22 UTC (rev 76) @@ -23,6 +23,7 @@ */ #include "application.h" +#include "xml_parser.h" #ifdef __cplusplus extern "C" { @@ -36,6 +37,14 @@ int main(int argc, char **argv) #endif { + + //XmlParser(); + + //exit(1); + + + + // Instantiate our subclass OpengateApp myApp; Modified: src/mouse.cpp =================================================================== --- src/mouse.cpp 2006-07-16 16:12:36 UTC (rev 75) +++ src/mouse.cpp 2006-07-16 16:16:22 UTC (rev 76) @@ -22,27 +22,43 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include <CEGUISystem.h> #include "mouse.h" -Mouse::Mouse(Ogre::InputReader* inputDevice, Avatar* avatar) { - this->mInputDevice = inputDevice; - this->mAvatar = avatar; - this->mTranslateVector = Ogre::Vector3::ZERO; +Mouse::Mouse(Ogre::InputReader* inputDevice, Avatar* avatar, CEGUI::Renderer* guiRenderer, Gamestate* gamestate) + : Input (inputDevice, avatar, guiRenderer, gamestate) { + mPressed = false; } -bool Mouse::processMouseInput(const Ogre::FrameEvent& evt) { - /* Rotation factors, may not be used if the second mouse button is pressed. */ - - /* If the second mouse button is pressed, then the mouse movement results in - sliding the camera, otherwise we rotate. */ - if (mInputDevice->getMouseButton(1)) { - mAvatar->move(Avatar::LEFT, (mInputDevice->getMouseRelativeX() * 0.13)); - mAvatar->move(Avatar::DOWN, (mInputDevice->getMouseRelativeY() * 0.13)); - } else { - mAvatar->rotate(Avatar::YAW_RIGHT, Ogre::Degree(mInputDevice->getMouseRelativeX() * 0.13)); - mAvatar->rotate(Avatar::PITCH_DOWN, Ogre::Degree(mInputDevice->getMouseRelativeY() * 0.13)); +Ogre::Real Mouse::processInput(const Ogre::FrameEvent& evt) { + + switch (mGamestate->getGamestate()) { + case Gamestate::GAME: + /* If the second mouse button is pressed, then the mouse movement results in + sliding the camera, otherwise we rotate. */ + if (mInputDevice->getMouseButton(1)) { + mTarget->move(Avatar::LEFT, (mInputDevice->getMouseRelativeX() * 0.13)); + mTarget->move(Avatar::DOWN, (mInputDevice->getMouseRelativeY() * 0.13)); + } else { + mTarget->rotate(Avatar::YAW_RIGHT, Ogre::Degree(mInputDevice->getMouseRelativeX() * 0.13)); + mTarget->rotate(Avatar::PITCH_DOWN, Ogre::Degree(mInputDevice->getMouseRelativeY() * 0.13)); + } + return 0; + case Gamestate::MENU: + CEGUI::System::getSingleton().injectMouseMove( + (mInputDevice->getMouseRelativeX() * 0.13) * mGuiRenderer->getWidth(), + (mInputDevice->getMouseRelativeY() * 0.13) * mGuiRenderer->getHeight()); + if (mInputDevice->getMouseButton(0)) { + CEGUI::System::getSingleton().injectMouseButtonDown(CEGUI::LeftButton); + mPressed = true; + } else if (mPressed && !mInputDevice->getMouseButton(0)) { + CEGUI::System::getSingleton().injectMouseButtonUp(CEGUI::LeftButton); + } + return 0; + default: + break; } - return true; + return 0; } void Mouse::setScale(Ogre::Degree rotScale) { Modified: src/resources.cfg =================================================================== --- src/resources.cfg 2006-07-16 16:12:36 UTC (rev 75) +++ src/resources.cfg 2006-07-16 16:16:22 UTC (rev 76) @@ -7,5 +7,5 @@ [General] FileSystem=../data FileSystem=../data/Materials -FileSystem=../data/Menus +Zip=../data/Menus/ogre_menu.zip Zip=../data/Materials/skybox.zip This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-07-16 18:46:46
|
Revision: 86 Author: egore Date: 2006-07-16 11:46:36 -0700 (Sun, 16 Jul 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=86&view=rev Log Message: ----------- drop crap and minor fixes to header files Modified Paths: -------------- src/common/loader.h src/common/objects/object.h Removed Paths: ------------- src/object.cpp src/object.h src/xml_parser.cpp src/xml_parser.h Modified: src/common/loader.h =================================================================== --- src/common/loader.h 2006-07-16 18:43:52 UTC (rev 85) +++ src/common/loader.h 2006-07-16 18:46:36 UTC (rev 86) @@ -30,6 +30,11 @@ #include <libxml/xpath.h> #include <iostream> +#ifdef __cplusplus +extern "C" +{ +#endif + class Loader { public: Loader(); @@ -66,4 +71,8 @@ xmlNodeSet* evaluate_xpath(char* path); }; +#ifdef __cplusplus +} #endif + +#endif /* _OPENGATE_LOADER_ */ Modified: src/common/objects/object.h =================================================================== --- src/common/objects/object.h 2006-07-16 18:43:52 UTC (rev 85) +++ src/common/objects/object.h 2006-07-16 18:46:36 UTC (rev 86) @@ -1,7 +1,7 @@ /*************************************************************************** * object.h * - * Sat Jul 15 14:52:39 2006 + * Thu May 25 11:42:32 2006 * Copyright 2006 Christoph Brill * Email <eg...@us...> ****************************************************************************/ @@ -25,10 +25,19 @@ #ifndef _OPENGATE_OBJECT_ #define _OPENGATE_OBJECT_ +#ifdef __cplusplus +extern "C" +{ +#endif + class Object { public: Object(); virtual ~Object(); }; +#ifdef __cplusplus +} #endif + +#endif /* _OPENGATE_OBJECT_ */ Deleted: src/object.cpp =================================================================== --- src/object.cpp 2006-07-16 18:43:52 UTC (rev 85) +++ src/object.cpp 2006-07-16 18:46:36 UTC (rev 86) @@ -1,33 +0,0 @@ -/*************************************************************************** - * object.cpp - * - * Thu May 25 11:45:21 2006 - * Copyright 2006 User - * Email - ****************************************************************************/ - -/* - * 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 "object.h" - -Object::Object() { - -} - -Object::~Object() { - -} Deleted: src/object.h =================================================================== --- src/object.h 2006-07-16 18:43:52 UTC (rev 85) +++ src/object.h 2006-07-16 18:46:36 UTC (rev 86) @@ -1,45 +0,0 @@ -/*************************************************************************** - * object.h - * - * Thu May 25 11:42:32 2006 - * Copyright 2006 User - * Email - ****************************************************************************/ - -/* - * 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 _OBJECT_H -#define _OBJECT_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -class Object { -public: - Object(); - virtual ~Object(); -protected: - int energy; -}; - -#ifdef __cplusplus -} -#endif - -#endif /* _OBJECT_H */ Deleted: src/xml_parser.cpp =================================================================== --- src/xml_parser.cpp 2006-07-16 18:43:52 UTC (rev 85) +++ src/xml_parser.cpp 2006-07-16 18:46:36 UTC (rev 86) @@ -1,37 +0,0 @@ -/*************************************************************************** - * xml_parser.cpp - * - * Sun Apr 23 10:38:02 2006 - * Copyright 2006 User - * Email - ****************************************************************************/ - -/* - * 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 "xml_parser.h" - -XmlParser::XmlParser() { - -} - -XmlParser::~XmlParser() { - -} - -int XmlParser::getInt() { - return -1; -} Deleted: src/xml_parser.h =================================================================== --- src/xml_parser.h 2006-07-16 18:43:52 UTC (rev 85) +++ src/xml_parser.h 2006-07-16 18:46:36 UTC (rev 86) @@ -1,48 +0,0 @@ -/*************************************************************************** - * xml_parser.h - * - * Sun Apr 23 10:34:26 2006 - * Copyright 2006 User - * Email - ****************************************************************************/ - -/* - * 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 _XML_PARSER_H -#define _XML_PARSER_H - -#include <string.h> - -#ifdef __cplusplus -extern "C" -{ -#endif - -class XmlParser { -public: - XmlParser(); - ~XmlParser(); - - int getInt(); - -}; - -#ifdef __cplusplus -} -#endif - -#endif /* _XML_PARSER_H */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-07-16 18:38:26
|
Revision: 84 Author: egore Date: 2006-07-16 11:35:45 -0700 (Sun, 16 Jul 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=84&view=rev Log Message: ----------- sync with loader-branch Modified Paths: -------------- src/Makefile.am src/Makefile.in Added Paths: ----------- src/application.h src/avatar.h src/camera.h src/client/ src/client/Makefile.am src/client/Makefile.in src/client/network.cpp src/client/network.h src/common/ src/common/Makefile.am src/common/Makefile.in src/common/company.cpp src/common/company.h src/common/company_storage.cpp src/common/company_storage.h src/common/components/ src/common/components/Makefile.am src/common/components/Makefile.in src/common/components/component.cpp src/common/components/component.h src/common/equipment/ src/common/equipment/Makefile.am src/common/equipment/Makefile.in src/common/equipment/ecms/ src/common/equipment/ecms/Makefile.am src/common/equipment/ecms/Makefile.in src/common/equipment/ecms/ecm.cpp src/common/equipment/ecms/ecm.h src/common/equipment/engines/ src/common/equipment/engines/Makefile.am src/common/equipment/engines/Makefile.in src/common/equipment/engines/engine.cpp src/common/equipment/engines/engine.h src/common/equipment/engines/money.cpp src/common/equipment/engines/money.h src/common/equipment/equipment.cpp src/common/equipment/equipment.h src/common/exception.cpp src/common/exception.h src/common/faction.cpp src/common/faction.h src/common/faction_storage.cpp src/common/faction_storage.h src/common/loader.cpp src/common/loader.h src/common/objects/ src/common/objects/Makefile.am src/common/objects/Makefile.in src/common/objects/movable_object.cpp src/common/objects/movable_object.h src/common/objects/object.cpp src/common/objects/object.h src/common/objects/ships/ src/common/objects/ships/Makefile.am src/common/objects/ships/Makefile.in src/common/objects/ships/ship.cpp src/common/objects/ships/ship.h src/constants.h src/framelistener.h src/gamestate.h src/input.h src/keyboard.h src/mouse.h src/movable_object.h src/object.h src/opengate_client.cpp src/opengate_server.cpp src/server/ src/server/Makefile.am src/server/Makefile.in src/server/network.cpp src/server/network.h src/xml_parser.h Property Changed: ---------------- src/Makefile.am src/Makefile.in src/application.cpp src/avatar.cpp src/camera.cpp src/framelistener.cpp src/gamestate.cpp src/input.cpp src/keyboard.cpp src/main.cpp src/mouse.cpp src/movable_object.cpp src/object.cpp src/xml_parser.cpp Modified: src/Makefile.am =================================================================== --- src/Makefile.am 2006-07-16 17:55:56 UTC (rev 83) +++ src/Makefile.am 2006-07-16 18:35:45 UTC (rev 84) @@ -1,36 +1,18 @@ -## Process this file with automake to produce Makefile.in +bin_PROGRAMS = opengate-server opengate-client -## Created by Anjuta - will be overwritten -## If you don't want it to overwrite it, -## Please disable it in the Anjuta project configuration -INCLUDES =\ - -I/usr/include/OGRE -I/usr/include/CEGUI -I../include +# set the include path found by configure +INCLUDES= $(all_includes) -AM_CXXFLAGS =\ - -g -DEXT_HASH\ - -Wall\ - -g +# the library search path. -bin_PROGRAMS = opengate -opengate_SOURCES = \ - main.cpp\ - application.cpp\ - framelistener.cpp\ - avatar.cpp\ - keyboard.cpp\ - mouse.cpp\ - camera.cpp\ - gamestate.cpp\ - movable_object.cpp\ - input.cpp\ - xml_parser.cpp\ - object.cpp +SUBDIRS = 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_LDFLAGS = \ - -L/usr/local/lib +opengate_client_SOURCES = opengate_client.cpp +opengate_client_LDADD = $(top_builddir)/src/client/libopengate-client.la\ + $(top_builddir)/src/common/libopengate-common.la -opengate_LDADD = \ - -lOgreMain -lCEGUIBase -lCEGUIOgreRenderer - Property changes on: src/Makefile.am ___________________________________________________________________ Name: svn:eolstyle + native Modified: src/Makefile.in =================================================================== --- src/Makefile.in 2006-07-16 17:55:56 UTC (rev 83) +++ src/Makefile.in 2006-07-16 18:35:45 UTC (rev 84) @@ -36,12 +36,11 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -bin_PROGRAMS = opengate$(EXEEXT) +bin_PROGRAMS = opengate-server$(EXEEXT) opengate-client$(EXEEXT) subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in +am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -50,13 +49,16 @@ am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) -am_opengate_OBJECTS = main.$(OBJEXT) application.$(OBJEXT) \ - framelistener.$(OBJEXT) avatar.$(OBJEXT) keyboard.$(OBJEXT) \ - mouse.$(OBJEXT) camera.$(OBJEXT) gamestate.$(OBJEXT) \ - movable_object.$(OBJEXT) input.$(OBJEXT) xml_parser.$(OBJEXT) \ - object.$(OBJEXT) -opengate_OBJECTS = $(am_opengate_OBJECTS) -opengate_DEPENDENCIES = +am_opengate_client_OBJECTS = opengate_client.$(OBJEXT) +opengate_client_OBJECTS = $(am_opengate_client_OBJECTS) +opengate_client_DEPENDENCIES = \ + $(top_builddir)/src/client/libopengate-client.la \ + $(top_builddir)/src/common/libopengate-common.la +am_opengate_server_OBJECTS = opengate_server.$(OBJEXT) +opengate_server_OBJECTS = $(am_opengate_server_OBJECTS) +opengate_server_DEPENDENCIES = \ + $(top_builddir)/src/server/libopengate-server.la \ + $(top_builddir)/src/common/libopengate-common.la DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -68,10 +70,17 @@ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(opengate_SOURCES) -DIST_SOURCES = $(opengate_SOURCES) +SOURCES = $(opengate_client_SOURCES) $(opengate_server_SOURCES) +DIST_SOURCES = $(opengate_client_SOURCES) $(opengate_server_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive ETAGS = etags CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ @@ -113,24 +122,11 @@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ -NO_PREFIX_PACKAGE_DATA_DIR = @NO_PREFIX_PACKAGE_DATA_DIR@ -NO_PREFIX_PACKAGE_DOC_DIR = @NO_PREFIX_PACKAGE_DOC_DIR@ -NO_PREFIX_PACKAGE_HELP_DIR = @NO_PREFIX_PACKAGE_HELP_DIR@ -NO_PREFIX_PACKAGE_MENU_DIR = @NO_PREFIX_PACKAGE_MENU_DIR@ -NO_PREFIX_PACKAGE_PIXMAPS_DIR = @NO_PREFIX_PACKAGE_PIXMAPS_DIR@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_DATA_DIR = @PACKAGE_DATA_DIR@ -PACKAGE_DOC_DIR = @PACKAGE_DOC_DIR@ -PACKAGE_HELP_DIR = @PACKAGE_HELP_DIR@ -PACKAGE_MENU_DIR = @PACKAGE_MENU_DIR@ PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_PIXMAPS_DIR = @PACKAGE_PIXMAPS_DIR@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ @@ -187,39 +183,25 @@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -INCLUDES = \ - -I/usr/include/OGRE -I/usr/include/CEGUI -I../include -AM_CXXFLAGS = \ - -g -DEXT_HASH\ - -Wall\ - -g +# set the include path found by configure +INCLUDES = $(all_includes) -opengate_SOURCES = \ - main.cpp\ - application.cpp\ - framelistener.cpp\ - avatar.cpp\ - keyboard.cpp\ - mouse.cpp\ - camera.cpp\ - gamestate.cpp\ - movable_object.cpp\ - input.cpp\ - xml_parser.cpp\ - object.cpp +# the library search path. +SUBDIRS = 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_LDFLAGS = \ - -L/usr/local/lib +opengate_client_SOURCES = opengate_client.cpp +opengate_client_LDADD = $(top_builddir)/src/client/libopengate-client.la\ + $(top_builddir)/src/common/libopengate-common.la -opengate_LDADD = \ - -lOgreMain -lCEGUIBase -lCEGUIOgreRenderer +all: all-recursive -all: all-am - .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -244,9 +226,9 @@ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) +$(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @@ -276,9 +258,12 @@ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done -opengate$(EXEEXT): $(opengate_OBJECTS) $(opengate_DEPENDENCIES) - @rm -f opengate$(EXEEXT) - $(CXXLINK) $(opengate_LDFLAGS) $(opengate_OBJECTS) $(opengate_LDADD) $(LIBS) +opengate-client$(EXEEXT): $(opengate_client_OBJECTS) $(opengate_client_DEPENDENCIES) + @rm -f opengate-client$(EXEEXT) + $(CXXLINK) $(opengate_client_LDFLAGS) $(opengate_client_OBJECTS) $(opengate_client_LDADD) $(LIBS) +opengate-server$(EXEEXT): $(opengate_server_OBJECTS) $(opengate_server_DEPENDENCIES) + @rm -f opengate-server$(EXEEXT) + $(CXXLINK) $(opengate_server_LDFLAGS) $(opengate_server_OBJECTS) $(opengate_server_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -286,18 +271,8 @@ distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/application.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avatar.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/camera.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/framelistener.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gamestate.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/input.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keyboard.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mouse.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/movable_object.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/object.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xml_parser.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opengate_client.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opengate_server.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @@ -330,6 +305,77 @@ -rm -f libtool uninstall-info-am: +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -340,10 +386,23 @@ mkid -fID $$unique tags: TAGS -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ @@ -356,7 +415,7 @@ $$tags $$unique; \ fi ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ @@ -405,22 +464,38 @@ || exit 1; \ fi; \ done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(mkdir_p) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + distdir) \ + || exit 1; \ + fi; \ + done check-am: all-am -check: check-am +check: check-recursive all-am: Makefile $(PROGRAMS) -installdirs: +installdirs: installdirs-recursive +installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -installcheck: installcheck-am +installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ @@ -436,23 +511,23 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -clean: clean-am +clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am -distclean: distclean-am +distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags -dvi: dvi-am +dvi: dvi-recursive dvi-am: -html: html-am +html: html-recursive -info: info-am +info: info-recursive info-am: @@ -460,42 +535,47 @@ install-exec-am: install-binPROGRAMS -install-info: install-info-am +install-info: install-info-recursive install-man: installcheck-am: -maintainer-clean: maintainer-clean-am +maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-am +mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool -pdf: pdf-am +pdf: pdf-recursive pdf-am: -ps: ps-am +ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ +uninstall-info: uninstall-info-recursive + +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ + clean clean-binPROGRAMS clean-generic clean-libtool \ + clean-recursive ctags ctags-recursive distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-recursive distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic \ + maintainer-clean-recursive mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \ + pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. Property changes on: src/Makefile.in ___________________________________________________________________ Name: svn:eolstyle + native Property changes on: src/application.cpp ___________________________________________________________________ Name: svn:eolstyle + native Copied: src/application.h (from rev 79, include/application.h) =================================================================== --- src/application.h (rev 0) +++ src/application.h 2006-07-16 18:35:45 UTC (rev 84) @@ -0,0 +1,141 @@ +/*************************************************************************** + * application.h + * + * Sat Apr 8 10:26:58 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 _APPLICATION_H +#define _APPLICATION_H + +#include <OgreConfigFile.h> +#include <OgreRoot.h> +#include <OgreCamera.h> +#include <OgreRenderWindow.h> +#include "framelistener.h" +#include "avatar.h" +#include "camera.h" +#include "gamestate.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +/*! + * + */ +class OpengateApp { +public: + + /*! \brief This default constructor instantiates an Application + * + * The default constructor is used to instantiates the Application. The + * Application can be considered as the object, that holds references to + * everything within the game. So here you can find the Scene, the Viewport + * to the scene, the camera(s) and the FrameListener. + */ + OpengateApp(); + + /*! \brief This destructor closes the application + * + * When this destructor is called, the game is done and will quit. + */ + ~OpengateApp(); + + /*! \brief The main "loop" of the game + * + * This method is running while the game is running. When this method is + * done, we are completely done. + */ + void go(); + +protected: + + CEGUI::OgreCEGUIRenderer* mGUIRenderer; + CEGUI::System* mGUISystem; + CEGUI::Window* mEditorGuiSheet; + Gamestate* mGamestate; + + Avatar* mAvatar; + Ogre::SceneNode* mAvatarNode; + + Ogre::Root* mRoot; + Camera* mCamera; + Ogre::SceneManager* mSceneMgr; + + OpengateListener* mFrameListener; + Ogre::RenderWindow* mWindow; + + Ogre::SceneManager* mGuiSceneMgr; + + /** Sets up the application - returns false if the user chooses to abandon configuration. */ + bool setup(void); + + /** Configures the application - returns false if the user chooses to abandon configuration. */ + bool configure(void); + + void chooseSceneManager(void); + + /*! \brief Creates a camera for the scene + * + * This method creates the necessary cameras for the game. Since we have a + * first person camera and a third person camera, we will use 2 cameras to + * do that. It would be possible to do that with one camera, but the concept + * in OGRE3D is to use 2 cameras. + */ + void createCamera(); + + /*! \brief Define what is in the scene + * + * This method created an initial scene. So here some common things will be + * loaded, like the space background, or jumpgates (which can be found in + * every sector) etc. + */ + void createScene(void); + + void destroyScene(void); + + /*! \biref Create the frame listener for the game + * + * This method creates the framelistener necessary to render a scene + */ + void createFrameListener(void); + + /// Method which will define the source of resources (other than current folder) + void setupResources(void); + + /// Optional override method where you can create resource listeners (e.g. for loading screens) + void createResourceListener(void); + + /// Optional override method where you can perform resource group loading + /// Must at least do ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); + void loadResources(void); + + void setupEventHandlers(void); + + bool handleQuit(const CEGUI::EventArgs& e); +}; + +#ifdef __cplusplus +} +#endif + +#endif /* _APPLICATION_H */ Property changes on: src/application.h ___________________________________________________________________ Name: svn:eolstyle + native Name: svn:mime-type + text/x-c++hdr Name: svn:eol-style + native Property changes on: src/avatar.cpp ___________________________________________________________________ Name: svn:eolstyle + native Copied: src/avatar.h (from rev 79, include/avatar.h) =================================================================== --- src/avatar.h (rev 0) +++ src/avatar.h 2006-07-16 18:35:45 UTC (rev 84) @@ -0,0 +1,106 @@ +/*************************************************************************** + * avatar.h + * + * Sun Apr 9 14:58:04 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 _AVATAR_H +#define _AVATAR_H + +#include <OgreSceneNode.h> +#include "movable_object.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +/*! \brief Class for the players avatar (the ship flying through space) + * \author Christoph Brill + * + * This class defines the players avatar. It is not only the graphical + * representation but also the technical. So it will contain ship-specific stuff, + * any maybe also weaponspecific, but that will follow later + */ +class Avatar : public MovableObject { +public: + /*! \brief Creates the avatar (not only the graphical representation, the + * real one) + */ + Avatar(Ogre::SceneNode* node); + + /*! \brief Destroys the avatar + */ + ~Avatar(); + + /*! \brief Moves the avatar + * + * This method moves the avatar in a given direction with a given scale. If + * "mMoveEndOfFrame" is true, it will only save the movement operation and + * perform the movement at the end of the frame (when performMove() is + * called). + * + * \param direction The direction the avatar is moving (i.e. Avatar::LEFT) + * \param scale The distance the avatar is moving (based on the time elapsed + * since the last frame + * \return Returns false, if an unkown direction was given + */ + virtual bool move(const int direction, float scale); + + /*! \brief Rotates the avatar + * + * This method rotates the avatar in a given direction with a given scale. + * If "mMoveEndOfFrame" is true, it will only save the rotation operation + * and perform the movement at the end of the frame (when performMove() is + * called). + * + * \param direction The direction the avatar is rotating (i.e. + * Avatar::YAW_LEFT) + * \param scale The degree the avatar is direction (based on the time + * elapsed since the last frame) + * \return Returns false, if an unkown rotation was given + */ + virtual bool rotate(int direction, Ogre::Degree scale); + + /*! \brief Performs movement at the end of the frame + * + * This method is called at the and of the frame to perform stored movement + * from the methods rotate() and move(). This movement is only stored if + * mMoveEndOfFrame is true, so otherwise nothing will happen in this method + */ + virtual void performMove() {}; + +private: + /*! Handle to the node the avatar is attached to */ + Ogre::SceneNode* mNode; + /*! Value that the players avatar can pitch in one frame */ + Ogre::Radian pitch; + /*! Value that the players avatar can yaw in one frame */ + Ogre::Radian yaw; + /*! Value that the players avatar can roll in one frame */ + Ogre::Radian roll; +}; + +#ifdef __cplusplus +} +#endif + +#endif /* _AVATAR_H */ Property changes on: src/avatar.h ___________________________________________________________________ Name: svn:eolstyle + native Name: svn:mime-type + text/x-c++hdr Name: svn:eol-style + native Property changes on: src/camera.cpp ___________________________________________________________________ Name: svn:eolstyle + native Copied: src/camera.h (from rev 79, include/camera.h) =================================================================== --- src/camera.h (rev 0) +++ src/camera.h 2006-07-16 18:35:45 UTC (rev 84) @@ -0,0 +1,127 @@ +/*************************************************************************** + * camera.h + * + * Sat Apr 15 17:51:35 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 _CAMERA_H +#define _CAMERA_H + +#include <OgreMath.h> +#include <OgreSceneManager.h> +#include <OgreCamera.h> +#include <OgreVector3.h> +#include <OgreRenderWindow.h> +#include "movable_object.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +class Camera : public MovableObject { +public: + /*! \brief creates a new camera + * + * This method creates a new camera by invoking createCamera() and + * createViewports(). + * \param sceneManager The handle to the scenemanager of the game (used in + * createCamera()). + * \param window The handle to the window of the game (used in + * createViewports()). + * \param avatarNode The handle to the scenenode of the players avatar (used + * in createCamera()). + * \param moveEndOfFrame If true, the movement will be done at once at the + * end of the frame. + */ + Camera(Ogre::SceneManager* sceneManager, Ogre::RenderWindow* window, Ogre::SceneNode* avatarNode, bool moveEndOfFrame); + + /*! \brief Moves the camera + * + * This method moves the camera in a given direction with a given scale. If + * "mMoveEndOfFrame" is true, it will only save the movement operation and + * perform the movement at the end of the frame (when performMove() is + * called). + * + * \param direction The direction the camera is moving (i.e. Camera::LEFT). + * \param scale The distance the camera is moving (based on the time elapsed + * since the last frame. + * \return Returns false, if an unkown direction was given. + */ + virtual bool move(const int direction, float scale); + + /*! \brief Rotates the camera + * + * This method rotates the camera in a given direction with a given scale. + * + * \param direction The direction the camera is rotating (i.e. + * Camera::YAW_LEFT). + * \param scale The degree the camera is direction (based on the time + * elapsed since the last frame). + * \return Returns false, if an unkown rotation was given. + */ + virtual bool rotate(int direction, Ogre::Degree scale); + + /*! \brief Performs movement at the end of the frame + * + * This method is called at the and of the frame to perform stored movement + * from the methods rotate() and move(). This movement is only stored if + * mMoveEndOfFrame is true, so otherwise nothing will happen in this method + */ + virtual void performMove(); + +private: + /*! Handle to the players camera so we can move it on mouse or keyboard + * input + */ + Ogre::Camera* mCamera; + + /*! Value to rotate the camera by X (=yaw) + */ + Ogre::Radian mRotX; + + /*! Value to rotate the camera by Y (=pitch) + */ + Ogre::Radian mRotY; + + /*! \brief Creates a camera for the scene + * + * This method creates the necessary cameras for the game. Since we have a + * first person camera and a third person camera, we will use 2 cameras to + * do that. It would be possible to do that with one camera, but the concept + * in OGRE3D is to use 2 cameras. + */ + void createCamera(Ogre::SceneManager* sceneManager, Ogre::SceneNode* avatarNode); + + /*! \brief Creates a viewport with the given cameras for the scene + * + * This method creates the viewport to the scene. This is what the user will + * actually see when playing the game. The viewport uses the given cameras + * to get its picture. + */ + void createViewports(Ogre::RenderWindow* window); +}; + +#ifdef __cplusplus +} +#endif + +#endif /* _CAMERA_H */ Property changes on: src/camera.h ___________________________________________________________________ Name: svn:eolstyle + native Name: svn:mime-type + text/x-c++hdr Name: svn:eol-style + native Added: src/client/Makefile.am =================================================================== --- src/client/Makefile.am (rev 0) +++ src/client/Makefile.am 2006-07-16 18:35:45 UTC (rev 84) @@ -0,0 +1,5 @@ +INCLUDES = $(all_includes) +METASOURCES = AUTO +noinst_LTLIBRARIES = libopengate-client.la +noinst_HEADERS = network.h +libopengate_client_la_SOURCES = network.cpp Property changes on: src/client/Makefile.am ___________________________________________________________________ Name: svn:eolstyle + native Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: src/client/Makefile.in =================================================================== --- src/client/Makefile.in (rev 0) +++ src/client/Makefile.in 2006-07-16 18:35:45 UTC (rev 84) @@ -0,0 +1,429 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../.. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/client +DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libopengate_client_la_LIBADD = +am_libopengate_client_la_OBJECTS = network.lo +libopengate_client_la_OBJECTS = $(am_libopengate_client_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(libopengate_client_la_SOURCES) +DIST_SOURCES = $(libopengate_client_la_SOURCES) +HEADERS = $(noinst_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GREP = @GREP@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +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@ +target_alias = @target_alias@ +INCLUDES = $(all_includes) +METASOURCES = AUTO +noinst_LTLIBRARIES = libopengate-client.la +noinst_HEADERS = network.h +libopengate_client_la_SOURCES = network.cpp +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/client/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/client/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libopengate-client.la: $(libopengate_client_la_OBJECTS) $(libopengate_client_la_DEPENDENCIES) + $(CXXLINK) $(libopengate_client_la_LDFLAGS) $(libopengate_client_la_OBJECTS) $(libopengate_client_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network.Plo@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-info-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: Property changes on: src/client/Makefile.in ___________________________________________________________________ Name: svn:eolstyle + native Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: src/client/network.cpp =================================================================== --- src/client/network.cpp (rev 0) +++ src/client/network.cpp 2006-07-16 18:35:45 UTC (rev 84) @@ -0,0 +1,59 @@ +/*************************************************************************** + * network.cpp + * + * Sat Jul 16 10:52:52 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.h" +#include "../common/exception.h" +#include <SDL/SDL.h> +#include <iostream> + +Network::Network() { + if (SDLNet_Init () < 0) { + printf ("ERR Net: %s\n", SDLNet_GetError ()); + exit (-1); + } + client_udp_port = 37601; +} + +void Network::open_connection(char* hostname, Uint16 port) { + if (SDLNet_ResolveHost (server_ip, hostname, port) < 0) { + printf ("SDLNet_ResolveHost: %s\n", SDLNet_GetError ()); + SDLNet_Quit(); + exit (-1); + } + client = SDLNet_TCP_Open (server_ip); + if (client == NULL) { + printf ("ERR TCP_Open: %s\n", SDLNet_GetError ()); + SDLNet_Quit (); + exit (-1); + } + client_udp = SDLNet_UDP_Open (client_udp_port); + if (client_udp == NULL) { + printf ("ERR UDP_Open: %s\n", SDLNet_GetError ()); + SDLNet_Quit (); + exit (-1); + } +} + +Network::~Network() { +} Property changes on: src/client/network.cpp ___________________________________________________________________ Name: svn:eolstyle + native Name: svn:mime-type + text/x-c++src Name: svn:eol-style + native Added: src/client/network.h =================================================================== --- src/client/network.h (rev 0) +++ src/client/network.h 2006-07-16 18:35:45 UTC (rev 84) @@ -0,0 +1,43 @@ +/*************************************************************************** + * network.h + * + * Sat Jul 16 10:52:52 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_ +#define _OPENGATE_NETWORK_ + +#include <SDL/SDL_net.h> + +class Network { +public: + Network(); + ~Network(); + void open_connection(char* hostname, Uint16 port); +private: + IPaddress* server_ip; + TCPsocket client; + UDPsocket client_udp; + Uint16 client_udp_port; + +}; + +#endif Property changes on: src/client/network.h ___________________________________________________________________ Name: svn:eolstyle + native Name: svn:mime-type + text/x-c++hdr Name: svn:eol-style + native Added: src/common/Makefile.am =================================================================== --- src/common/Makefile.am (rev 0) +++ src/common/Makefile.am 2006-07-16 18:35:45 UTC (rev 84) @@ -0,0 +1,11 @@ +INCLUDES = $(all_includes) +METASOURCES = AUTO +noinst_LTLIBRARIES = libopengate-common.la +libopengate_common_la_SOURCES = loader.cpp exception.cpp company.cpp \ + faction.cpp faction_storage.cpp company_storage.cpp +noinst_HEADERS = loader.h exception.h company.h faction.h faction_storage.h \ + company_storage.h +SUBDIRS = objects equipment components +libopengate_common_la_LIBADD = \ + $(top_builddir)/src/common/objects/libopengate-objects.la $(top_builddir)/src/common/equipment/libopengate-equipment.la \ + $(top_builddir)/src/common/components/libopengate-components.la Property changes on: src/common/Makefile.am ___________________________________________________________________ Name: svn:eolstyle + native Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: src/common/Makefile.in =================================================================== --- src/common/Makefile.in (rev 0) +++ src/common/Makefile.in 2006-07-16 18:35:45 UTC (rev 84) @@ -0,0 +1,558 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../.. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/common +DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libopengate_common_la_DEPENDENCIES = \ + $(top_builddir)/src/common/objects/libopengate-objects.la \ + $(top_builddir)/src/common/equipment/libopengate-equipment.la \ + $(top_builddir)/src/common/components/libopengate-components.la +am_libopengate_common_la_OBJECTS = loader.lo exception.lo company.lo \ + faction.lo faction_storage.lo company_storage.lo +libopengate_common_la_OBJECTS = $(am_libopengate_common_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(libopengate_common_la_SOURCES) +DIST_SOURCES = $(libopengate_common_la_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive +HEADERS = $(noinst_HEADERS) +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GREP = @GREP@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +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@ +target_alias = @target_alias@ +INCLUDES = $(all_includes) +METASOURCES = AUTO +noinst_LTLIBRARIES = libopengate-common.la +libopengate_common_la_SOURCES = loader.cpp exception.cpp company.cpp \ + faction.cpp faction_storage.cpp company_storage.cpp + +noinst_HEADERS = loader.h exception.h company.h faction.h faction_storage.h \ + company_storage.h + +SUBDIRS = objects equipment components +libopengate_common_la_LIBADD = \ + $(top_builddir)/src/common/objects/libopengate-objects.la $(top_builddir)/src/common/equipment/libopengate-equipment.la \ + $(top_builddir)/src/common/components/libopengate-components.la + +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(... [truncated message content] |
From: <eg...@us...> - 2006-07-18 20:13:08
|
Revision: 105 Author: egore Date: 2006-07-18 13:12:15 -0700 (Tue, 18 Jul 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=105&view=rev Log Message: ----------- cleanup directory structures Modified Paths: -------------- src/Makefile.am src/common/equipment/Makefile.am src/common/equipment/capacitors/Makefile.am src/common/equipment/ecms/Makefile.am src/common/equipment/engines/Makefile.am src/common/equipment/guns/Makefile.am src/common/objects/ships/Makefile.am src/common/objects/ships/ship.cpp src/common/objects/ships/ship.h src/opengate_client.cpp src/opengate_server.cpp Added Paths: ----------- src/common/equipment/capacitor.cpp src/common/equipment/capacitor.h src/common/equipment/ecm.cpp src/common/equipment/ecm.h src/common/equipment/engine.cpp src/common/equipment/engine.h src/common/equipment/gun.cpp src/common/equipment/gun.h Removed Paths: ------------- src/common/equipment/capacitors/capacitor.cpp src/common/equipment/capacitors/capacitor.h src/common/equipment/ecms/ecm.cpp src/common/equipment/ecms/ecm.h src/common/equipment/engines/engine.cpp src/common/equipment/engines/engine.h src/common/equipment/guns/gun.cpp src/common/equipment/guns/gun.h Modified: src/Makefile.am =================================================================== --- src/Makefile.am 2006-07-18 14:08:40 UTC (rev 104) +++ src/Makefile.am 2006-07-18 20:12:15 UTC (rev 105) @@ -13,6 +13,6 @@ $(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 +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 Modified: src/common/equipment/Makefile.am =================================================================== --- src/common/equipment/Makefile.am 2006-07-18 14:08:40 UTC (rev 104) +++ src/common/equipment/Makefile.am 2006-07-18 20:12:15 UTC (rev 105) @@ -2,7 +2,6 @@ METASOURCES = AUTO SUBDIRS = engines ecms capacitors guns noinst_LTLIBRARIES = libopengate-equipment.la -noinst_HEADERS = equipment.h -libopengate_equipment_la_SOURCES = equipment.cpp -libopengate_equipment_la_LIBADD = \ - $(top_builddir)/src/common/equipment/engines/libopengate-engine.la +noinst_HEADERS = equipment.h capacitor.h ecm.h engine.h gun.h +libopengate_equipment_la_SOURCES = equipment.cpp capacitor.cpp ecm.cpp \ + engine.cpp gun.cpp Copied: src/common/equipment/capacitor.cpp (from rev 104, src/common/equipment/capacitors/capacitor.cpp) =================================================================== --- src/common/equipment/capacitor.cpp (rev 0) +++ src/common/equipment/capacitor.cpp 2006-07-18 20:12:15 UTC (rev 105) @@ -0,0 +1,53 @@ +/*************************************************************************** + * capacitor.cpp + * + * Sat Jul 17 20:26:05 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 "capacitor.h" +#include "../loader.h" + +Capacitor::Capacitor(std::string filename) : Equipment(filename) { + _efficiency = 0; + _capacity = 0; +} + +Capacitor::~Capacitor() { + +} + +long Capacitor::get_efficiency() { + return _efficiency; +} + +long Capacitor::get_capacity() { + return _capacity; +} + +void Capacitor::initialize() { + + Equipment::initialize(); + + Loader* loader = Loader::get_instance(); + + _efficiency = atoi(loader->get_option("/equipment/efficiency")); + _capacity = atoi(loader->get_option("/equipment/capacity")); +} Copied: src/common/equipment/capacitor.h (from rev 104, src/common/equipment/capacitors/capacitor.h) =================================================================== --- src/common/equipment/capacitor.h (rev 0) +++ src/common/equipment/capacitor.h 2006-07-18 20:12:15 UTC (rev 105) @@ -0,0 +1,55 @@ +/*************************************************************************** + * capacitor.h + * + * Sat Jul 17 20:26:05 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_CAPACITOR_ +#define _OPENGATE_CAPACITOR_ + +#include "equipment.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +class Capacitor : public Equipment { +public: + Capacitor(std::string filename); + virtual ~Capacitor(); + long get_efficiency(); + long get_capacity(); + +protected: + virtual void initialize(); + +private: + long _efficiency; + long _capacity; + +}; + +#ifdef __cplusplus +} +#endif + +#endif /* _OPENGATE_CAPACITOR_ */ Modified: src/common/equipment/capacitors/Makefile.am =================================================================== --- src/common/equipment/capacitors/Makefile.am 2006-07-18 14:08:40 UTC (rev 104) +++ src/common/equipment/capacitors/Makefile.am 2006-07-18 20:12:15 UTC (rev 105) @@ -1,5 +1,3 @@ INCLUDES = $(all_includes) METASOURCES = AUTO -noinst_LTLIBRARIES = libopangate-capacitors.la -noinst_HEADERS = capacitor.h -libopangate_capacitors_la_SOURCES = capacitor.cpp + Deleted: src/common/equipment/capacitors/capacitor.cpp =================================================================== --- src/common/equipment/capacitors/capacitor.cpp 2006-07-18 14:08:40 UTC (rev 104) +++ src/common/equipment/capacitors/capacitor.cpp 2006-07-18 20:12:15 UTC (rev 105) @@ -1,53 +0,0 @@ -/*************************************************************************** - * capacitor.cpp - * - * Sat Jul 17 20:26:05 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 "capacitor.h" -#include "../../loader.h" - -Capacitor::Capacitor(std::string filename) : Equipment(filename) { - _efficiency = 0; - _capacity = 0; -} - -Capacitor::~Capacitor() { - -} - -long Capacitor::get_efficiency() { - return _efficiency; -} - -long Capacitor::get_capacity() { - return _capacity; -} - -void Capacitor::initialize() { - - Equipment::initialize(); - - Loader* loader = Loader::get_instance(); - - _efficiency = atoi(loader->get_option("/equipment/efficiency")); - _capacity = atoi(loader->get_option("/equipment/capacity")); -} Deleted: src/common/equipment/capacitors/capacitor.h =================================================================== --- src/common/equipment/capacitors/capacitor.h 2006-07-18 14:08:40 UTC (rev 104) +++ src/common/equipment/capacitors/capacitor.h 2006-07-18 20:12:15 UTC (rev 105) @@ -1,55 +0,0 @@ -/*************************************************************************** - * capacitor.h - * - * Sat Jul 17 20:26:05 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_CAPACITOR_ -#define _OPENGATE_CAPACITOR_ - -#include "../equipment.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -class Capacitor : public Equipment { -public: - Capacitor(std::string filename); - virtual ~Capacitor(); - long get_efficiency(); - long get_capacity(); - -protected: - virtual void initialize(); - -private: - long _efficiency; - long _capacity; - -}; - -#ifdef __cplusplus -} -#endif - -#endif /* _OPENGATE_CAPACITOR_ */ Copied: src/common/equipment/ecm.cpp (from rev 104, src/common/equipment/ecms/ecm.cpp) =================================================================== --- src/common/equipment/ecm.cpp (rev 0) +++ src/common/equipment/ecm.cpp 2006-07-18 20:12:15 UTC (rev 105) @@ -0,0 +1,47 @@ +/*************************************************************************** + * ecm.cpp + * + * Sat Jul 16 12:47:08 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 "ecm.h" +#include "../loader.h" + +ECM::ECM(std::string filename) : Equipment(filename) { + _sensorlevel = 0; + _power = 0; + initialize(); +} + +ECM::~ ECM() { + +} + +void ECM::initialize() { + + Equipment::initialize(); + + Loader* loader = Loader::get_instance(); + + _sensorlevel = atoi(loader->get_option("/equipment/sensorlevel")); + _power = atoi(loader->get_option("/equipment/power")); +} Copied: src/common/equipment/ecm.h (from rev 104, src/common/equipment/ecms/ecm.h) =================================================================== --- src/common/equipment/ecm.h (rev 0) +++ src/common/equipment/ecm.h 2006-07-18 20:12:15 UTC (rev 105) @@ -0,0 +1,46 @@ +/*************************************************************************** + * ecm.h + * + * Sat Jul 16 12:47:08 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_ECM_ +#define _OPENGATE_ECM_ + +#include "equipment.h" + +class ECM : public Equipment { +public: + ECM(std::string filename); + virtual ~ECM(); + + short get_sensorlevel(); + long get_power(); + +protected: + void initialize(); + +private: + short _sensorlevel; + long _power; +}; + +#endif Modified: src/common/equipment/ecms/Makefile.am =================================================================== --- src/common/equipment/ecms/Makefile.am 2006-07-18 14:08:40 UTC (rev 104) +++ src/common/equipment/ecms/Makefile.am 2006-07-18 20:12:15 UTC (rev 105) @@ -1,5 +1,2 @@ INCLUDES = $(all_includes) METASOURCES = AUTO -noinst_LTLIBRARIES = libopengate-ecm.la -libopengate_ecm_la_SOURCES = ecm.cpp -noinst_HEADERS = ecm.h Deleted: src/common/equipment/ecms/ecm.cpp =================================================================== --- src/common/equipment/ecms/ecm.cpp 2006-07-18 14:08:40 UTC (rev 104) +++ src/common/equipment/ecms/ecm.cpp 2006-07-18 20:12:15 UTC (rev 105) @@ -1,47 +0,0 @@ -/*************************************************************************** - * ecm.cpp - * - * Sat Jul 16 12:47:08 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 "ecm.h" -#include "../../loader.h" - -ECM::ECM(std::string filename) : Equipment(filename) { - _sensorlevel = 0; - _power = 0; - initialize(); -} - -ECM::~ ECM() { - -} - -void ECM::initialize() { - - Equipment::initialize(); - - Loader* loader = Loader::get_instance(); - - _sensorlevel = atoi(loader->get_option("/equipment/sensorlevel")); - _power = atoi(loader->get_option("/equipment/power")); -} Deleted: src/common/equipment/ecms/ecm.h =================================================================== --- src/common/equipment/ecms/ecm.h 2006-07-18 14:08:40 UTC (rev 104) +++ src/common/equipment/ecms/ecm.h 2006-07-18 20:12:15 UTC (rev 105) @@ -1,46 +0,0 @@ -/*************************************************************************** - * ecm.h - * - * Sat Jul 16 12:47:08 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_ECM_ -#define _OPENGATE_ECM_ - -#include "../equipment.h" - -class ECM : public Equipment { -public: - ECM(std::string filename); - virtual ~ECM(); - - short get_sensorlevel(); - long get_power(); - -protected: - void initialize(); - -private: - short _sensorlevel; - long _power; -}; - -#endif Copied: src/common/equipment/engine.cpp (from rev 104, src/common/equipment/engines/engine.cpp) =================================================================== --- src/common/equipment/engine.cpp (rev 0) +++ src/common/equipment/engine.cpp 2006-07-18 20:12:15 UTC (rev 105) @@ -0,0 +1,54 @@ +/*************************************************************************** + * engine.cpp + * + * Sat Jul 15 14:59:25 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 "engine.h" +#include "../loader.h" + +Engine::Engine(std::string filename) : Equipment(filename) { + _efficiency = 0.0; + _max_thrust = 0; + initialize(); +} + +Engine::~ Engine() { + +} + +double Engine::get_efficiency() { + return _efficiency; +} + +long Engine::get_max_thrust() { + return _max_thrust; +} + +void Engine::initialize() { + + Equipment::initialize(); + + Loader* loader = Loader::get_instance(); + + _efficiency = atof(loader->get_option("/equipment/efficiency")); + _max_thrust = atoi(loader->get_option("/equipment/max-thrust")); +} Copied: src/common/equipment/engine.h (from rev 104, src/common/equipment/engines/engine.h) =================================================================== --- src/common/equipment/engine.h (rev 0) +++ src/common/equipment/engine.h 2006-07-18 20:12:15 UTC (rev 105) @@ -0,0 +1,47 @@ +/*************************************************************************** + * engine.h + * + * Sat Jul 15 14:59:25 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_ENGINE_ +#define _OPENGATE_ENGINE_ + +#include "equipment.h" +#include <string> + +class Engine : public Equipment { +public: + Engine(std::string filename); + virtual ~Engine(); + double get_efficiency(); + long get_max_thrust(); + +protected: + virtual void initialize(); + +private: + double _efficiency; + long _max_thrust; + +}; + +#endif Modified: src/common/equipment/engines/Makefile.am =================================================================== --- src/common/equipment/engines/Makefile.am 2006-07-18 14:08:40 UTC (rev 104) +++ src/common/equipment/engines/Makefile.am 2006-07-18 20:12:15 UTC (rev 105) @@ -1,5 +1,2 @@ INCLUDES = $(all_includes) METASOURCES = AUTO -noinst_LTLIBRARIES = libopengate-engine.la -noinst_HEADERS = engine.h -libopengate_engine_la_SOURCES = engine.cpp Deleted: src/common/equipment/engines/engine.cpp =================================================================== --- src/common/equipment/engines/engine.cpp 2006-07-18 14:08:40 UTC (rev 104) +++ src/common/equipment/engines/engine.cpp 2006-07-18 20:12:15 UTC (rev 105) @@ -1,54 +0,0 @@ -/*************************************************************************** - * engine.cpp - * - * Sat Jul 15 14:59:25 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 "engine.h" -#include "../../loader.h" - -Engine::Engine(std::string filename) : Equipment(filename) { - _efficiency = 0.0; - _max_thrust = 0; - initialize(); -} - -Engine::~ Engine() { - -} - -double Engine::get_efficiency() { - return _efficiency; -} - -long Engine::get_max_thrust() { - return _max_thrust; -} - -void Engine::initialize() { - - Equipment::initialize(); - - Loader* loader = Loader::get_instance(); - - _efficiency = atof(loader->get_option("/equipment/efficiency")); - _max_thrust = atoi(loader->get_option("/equipment/max-thrust")); -} Deleted: src/common/equipment/engines/engine.h =================================================================== --- src/common/equipment/engines/engine.h 2006-07-18 14:08:40 UTC (rev 104) +++ src/common/equipment/engines/engine.h 2006-07-18 20:12:15 UTC (rev 105) @@ -1,47 +0,0 @@ -/*************************************************************************** - * engine.h - * - * Sat Jul 15 14:59:25 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_ENGINE_ -#define _OPENGATE_ENGINE_ - -#include "../equipment.h" -#include <string> - -class Engine : public Equipment { -public: - Engine(std::string filename); - virtual ~Engine(); - double get_efficiency(); - long get_max_thrust(); - -protected: - virtual void initialize(); - -private: - double _efficiency; - long _max_thrust; - -}; - -#endif Copied: src/common/equipment/gun.cpp (from rev 104, src/common/equipment/guns/gun.cpp) =================================================================== --- src/common/equipment/gun.cpp (rev 0) +++ src/common/equipment/gun.cpp 2006-07-18 20:12:15 UTC (rev 105) @@ -0,0 +1,42 @@ +/*************************************************************************** + * gun.cpp + * + * Sat Jul 17 20:46:27 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 "gun.h" +#include "../loader.h" + +Gun::Gun(std::string filename) : Equipment(filename) { + +} + +Gun::~Gun() { + +} + +void Gun::initialize() { + + Equipment::initialize(); + + Loader* loader = Loader::get_instance(); + +} Copied: src/common/equipment/gun.h (from rev 104, src/common/equipment/guns/gun.h) =================================================================== --- src/common/equipment/gun.h (rev 0) +++ src/common/equipment/gun.h 2006-07-18 20:12:15 UTC (rev 105) @@ -0,0 +1,52 @@ +/*************************************************************************** + * gun.h + * + * Sat Jul 17 20:46:27 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_GUN_ +#define _OPENGATE_GUN_ + +#include "equipment.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +class Gun : public Equipment { +public: + Gun(std::string filename); + virtual ~Gun(); + +protected: + virtual void initialize(); + +private: + +}; + + +#ifdef __cplusplus +} +#endif + +#endif /* _OPENGATE_GUN_ */ Modified: src/common/equipment/guns/Makefile.am =================================================================== --- src/common/equipment/guns/Makefile.am 2006-07-18 14:08:40 UTC (rev 104) +++ src/common/equipment/guns/Makefile.am 2006-07-18 20:12:15 UTC (rev 105) @@ -1,5 +1,2 @@ INCLUDES = $(all_includes) METASOURCES = AUTO -noinst_LTLIBRARIES = libopengate-guns.la -noinst_HEADERS = gun.h -libopengate_guns_la_SOURCES = gun.cpp Deleted: src/common/equipment/guns/gun.cpp =================================================================== --- src/common/equipment/guns/gun.cpp 2006-07-18 14:08:40 UTC (rev 104) +++ src/common/equipment/guns/gun.cpp 2006-07-18 20:12:15 UTC (rev 105) @@ -1,42 +0,0 @@ -/*************************************************************************** - * gun.cpp - * - * Sat Jul 17 20:46:27 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 "gun.h" -#include "../../loader.h" - -Gun::Gun(std::string filename) : Equipment(filename) { - -} - -Gun::~Gun() { - -} - -void Gun::initialize() { - - Equipment::initialize(); - - Loader* loader = Loader::get_instance(); - -} Deleted: src/common/equipment/guns/gun.h =================================================================== --- src/common/equipment/guns/gun.h 2006-07-18 14:08:40 UTC (rev 104) +++ src/common/equipment/guns/gun.h 2006-07-18 20:12:15 UTC (rev 105) @@ -1,52 +0,0 @@ -/*************************************************************************** - * gun.h - * - * Sat Jul 17 20:46:27 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_GUN_ -#define _OPENGATE_GUN_ - -#include "../equipment.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -class Gun : public Equipment { -public: - Gun(std::string filename); - virtual ~Gun(); - -protected: - virtual void initialize(); - -private: - -}; - - -#ifdef __cplusplus -} -#endif - -#endif /* _OPENGATE_GUN_ */ Modified: src/common/objects/ships/Makefile.am =================================================================== --- src/common/objects/ships/Makefile.am 2006-07-18 14:08:40 UTC (rev 104) +++ src/common/objects/ships/Makefile.am 2006-07-18 20:12:15 UTC (rev 105) @@ -3,3 +3,5 @@ noinst_LTLIBRARIES = libopengate-ship.la libopengate_ship_la_SOURCES = ship.cpp noinst_HEADERS = ship.h +libopengate_ship_la_LIBADD = \ + $(top_builddir)/src/common/equipment/libopengate-equipment.la Modified: src/common/objects/ships/ship.cpp =================================================================== --- src/common/objects/ships/ship.cpp 2006-07-18 14:08:40 UTC (rev 104) +++ src/common/objects/ships/ship.cpp 2006-07-18 20:12:15 UTC (rev 105) @@ -23,6 +23,7 @@ */ #include "ship.h" +#include "../../exception.h" #include "../../loader.h" #include "../../faction_storage.h" #include <vector> @@ -34,6 +35,9 @@ } Ship::~Ship() { + if (_capacitor) { + delete(_capacitor); + } } @@ -103,6 +107,24 @@ _faction = faction; } +Capacitor* Ship::get_capacitor() { + return _capacitor; +} + +void Ship::set_capacitor(Capacitor* capacitor) { + if (capacitor->get_size() > _capacitorsize) { + throw new Exception("Capacitor to big"); + } + if (_capacitor) { + delete(_capacitor); + } + _capacitor = capacitor; +} + +short Ship::get_capacitor_size() { + return _capacitorsize; +} + short Ship::get_guncount() { return _guncount; } Modified: src/common/objects/ships/ship.h =================================================================== --- src/common/objects/ships/ship.h 2006-07-18 14:08:40 UTC (rev 104) +++ src/common/objects/ships/ship.h 2006-07-18 20:12:15 UTC (rev 105) @@ -26,10 +26,10 @@ #define _OPENGATE_SHIP_ #include "../movable_object.h" -#include "../../equipment/engines/engine.h" -#include "../../equipment/ecms/ecm.h" -#include "../../equipment/capacitors/capacitor.h" -#include "../../equipment/guns/gun.h" +#include "../../equipment/engine.h" +#include "../../equipment/ecm.h" +#include "../../equipment/capacitor.h" +#include "../../equipment/gun.h" /** * This abstract class defines basic information about every ship @@ -54,6 +54,9 @@ std::string get_description(); void set_description(std::string description); + Capacitor* get_capacitor(); + void set_capacitor(Capacitor* capacitor); + short get_capacitor_size(); short get_guncount(); std::vector<char*> get_productioncenters(); Modified: src/opengate_client.cpp =================================================================== --- src/opengate_client.cpp 2006-07-18 14:08:40 UTC (rev 104) +++ src/opengate_client.cpp 2006-07-18 20:12:15 UTC (rev 105) @@ -27,13 +27,13 @@ #include <cstdlib> #include "common/objects/ships/ship.h" -#include "common/equipment/engines/engine.h" -#include "common/equipment/engines/money.h" +#include "common/equipment/engine.h" #include "common/loader.h" #include "common/faction_storage.h" #include "common/faction.h" #include "common/exception.h" #include "client/ui/application.h" +#include "common/equipment/capacitor.h" using namespace std; @@ -94,6 +94,12 @@ cout << "Max. Thrust: " << engine->get_max_thrust() << std::endl; delete(engine); + Capacitor* capacitor = new Capacitor("../../data/Capacitors/S-C-15/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; @@ -102,6 +108,8 @@ 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; delete(ship); delete(f_storage); Modified: src/opengate_server.cpp =================================================================== --- src/opengate_server.cpp 2006-07-18 14:08:40 UTC (rev 104) +++ src/opengate_server.cpp 2006-07-18 20:12:15 UTC (rev 105) @@ -26,10 +26,6 @@ #include <iostream> #include <cstdlib> -#include "common/objects/ships/ship.h" -#include "common/equipment/engines/engine.h" -#include "common/loader.h" - using namespace std; int main(int argc, char *argv[]) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-08-31 20:16:23
|
Revision: 149 http://svn.sourceforge.net/opengate/?rev=149&view=rev Author: egore Date: 2006-08-31 13:16:09 -0700 (Thu, 31 Aug 2006) Log Message: ----------- add meta-server authentication Modified Paths: -------------- ChangeLog opengate.kdevelop src/opengate_server.cpp src/server/Makefile.am Added Paths: ----------- src/server/network_meta.cpp src/server/network_meta.h Modified: ChangeLog =================================================================== --- ChangeLog 2006-08-27 18:19:29 UTC (rev 148) +++ ChangeLog 2006-08-31 20:16:09 UTC (rev 149) @@ -1,5 +1,12 @@ 2006-08-27 Christoph Brill <eg...@us...> + * src/server/network_meta.h, src/server/network_meta.cpp: add method + to authenticate against the meta-server + + * src/opengate_server.cpp: test method for authentication + +2006-08-27 Christoph Brill <eg...@us...> + * configure.in: add support for libgrapple, add support for libxml2 * src/client/network.h, src/client/network.cpp, src/server/network.h, Modified: opengate.kdevelop =================================================================== --- opengate.kdevelop 2006-08-27 18:19:29 UTC (rev 148) +++ opengate.kdevelop 2006-08-31 20:16:09 UTC (rev 149) @@ -13,7 +13,7 @@ <ignoreparts/> <projectdirectory>.</projectdirectory> <absoluteprojectpath>false</absoluteprojectpath> - <description/> + <description></description> <versioncontrol>kdevsubversion</versioncontrol> </general> <kdevautoproject> @@ -23,7 +23,7 @@ <useactivetarget>true</useactivetarget> </general> <run> - <mainprogram>src/opengate-client</mainprogram> + <mainprogram>src/opengate-server</mainprogram> <terminal>true</terminal> <directoryradio>executable</directoryradio> <runarguments> @@ -32,7 +32,7 @@ <opengate-client/> </runarguments> <customdirectory>/</customdirectory> - <programargs/> + <programargs></programargs> <autocompile>true</autocompile> <envvars/> </run> @@ -224,12 +224,12 @@ </kdevcppsupport> <kdevdebugger> <general> - <programargs/> - <gdbpath/> + <programargs></programargs> + <gdbpath></gdbpath> <dbgshell>libtool</dbgshell> - <configGdbScript/> - <runShellScript/> - <runGdbScript/> + <configGdbScript></configGdbScript> + <runShellScript></runShellScript> + <runGdbScript></runGdbScript> <breakonloadinglibs>true</breakonloadinglibs> <separatetty>false</separatetty> <floatingtoolbar>false</floatingtoolbar> Modified: src/opengate_server.cpp =================================================================== --- src/opengate_server.cpp 2006-08-27 18:19:29 UTC (rev 148) +++ src/opengate_server.cpp 2006-08-31 20:16:09 UTC (rev 149) @@ -28,17 +28,8 @@ #include <signal.h> #include "server/network.h" +#include "server/network_meta.h" - -#include <stdio.h> -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <netdb.h> -#include <string.h> - -#define DIRSIZE 1024 - bool done; /*! @brief a signal handler @@ -65,57 +56,14 @@ sleep(1); }*/ - char dir[DIRSIZE]; - int sd; - struct sockaddr_in sin; - struct sockaddr_in pin; - struct hostent *hp; + NetworkMeta* nwm = new NetworkMeta(); + printf("--(%d)--\n", nwm->check_login("XXX", "YYY")); - /* go find out about the desired host machine */ - if ((hp = gethostbyname("opengate.sourceforge.net")) == 0) { - perror("gethostbyname"); - exit(1); - } - - /* fill in the socket structure with host information */ - memset(&pin, 0, sizeof(pin)); - pin.sin_family = AF_INET; - pin.sin_addr.s_addr = ((struct in_addr *)(hp->h_addr))->s_addr; - pin.sin_port = htons(80); - - /* grab an Internet domain socket */ - if ((sd = socket(AF_INET, SOCK_STREAM, 0)) == -1) { - perror("socket"); - exit(1); - } - - /* connect to PORT on HOST */ - if (connect(sd,(struct sockaddr *) &pin, sizeof(pin)) == -1) { - perror("connect"); - exit(1); - } - - char* request = "GET /game/game_login.php HTTP/1.1\r\nHost: opengate.sourceforge.net\r\n\r\n"; - - /* send a message to the server PORT on machine HOST */ - if (send(sd, request, strlen(request), 0) == -1) { - perror("send"); - exit(1); - } - - /* wait for a message to come back from the server */ - if (recv(sd, dir, DIRSIZE, 0) == -1) { - perror("recv"); - exit(1); - } - - // spew-out the results and bail out of here! - printf("%s\n---\n", dir); - std::cout << "Shutting down" << std::endl; std::cout << "-------------" << std::endl; //delete(nw); + delete(nwm); return EXIT_SUCCESS; } Modified: src/server/Makefile.am =================================================================== --- src/server/Makefile.am 2006-08-27 18:19:29 UTC (rev 148) +++ src/server/Makefile.am 2006-08-31 20:16:09 UTC (rev 149) @@ -1,5 +1,5 @@ INCLUDES = $(all_includes) METASOURCES = AUTO noinst_LTLIBRARIES = libopengate-server.la -noinst_HEADERS = network.h -libopengate_server_la_SOURCES = network.cpp +noinst_HEADERS = network.h network_meta.h +libopengate_server_la_SOURCES = network.cpp network_meta.cpp Added: src/server/network_meta.cpp =================================================================== --- src/server/network_meta.cpp (rev 0) +++ src/server/network_meta.cpp 2006-08-31 20:16:09 UTC (rev 149) @@ -0,0 +1,125 @@ +/*************************************************************************** + * 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. + */ + +#include <network_meta.h> + +#include <iostream> + +int NetworkMeta::check_login(std::string username, std::string password) { + char dir[BUFFER_SIZE]; + int sd; + struct sockaddr_in sin; + struct sockaddr_in pin; + struct hostent *hp; + + std::string hostname = "opengate.sourceforge.net"; + + /* go find out about the desired host machine */ + if ((hp = gethostbyname(hostname.c_str())) == 0) { + perror("gethostbyname"); + exit(1); + } + + /* fill in the socket structure with host information */ + memset(&pin, 0, sizeof(pin)); + pin.sin_family = AF_INET; + pin.sin_addr.s_addr = ((struct in_addr *)(hp->h_addr))->s_addr; + pin.sin_port = htons(80); + + /* grab an Internet domain socket */ + if ((sd = socket(AF_INET, SOCK_STREAM, 0)) == -1) { + perror("socket"); + exit(1); + } + + /* connect to PORT on HOST */ + if (connect(sd,(struct sockaddr *) &pin, sizeof(pin)) == -1) { + perror("connect"); + exit(1); + } + + std::string request = "GET /game/game_login.php?username=" + username + "&password=" + password + " HTTP/1.1\r\nHost: " + hostname + "\r\n\r\n"; + + /* send a message to the server PORT on machine HOST */ + if (send(sd, request.c_str(), request.length(), 0) == -1) { + perror("send"); + exit(1); + } + + /* wait for a message to come back from the server */ + if (recv(sd, dir, BUFFER_SIZE, 0) == -1) { + perror("recv"); + exit(1); + } + + char* error = strstr(dir, "404 Not Found\r\n"); + if (error) { + return -100; + } + error = strstr(dir, "400 Bad Request\r\n"); + if (error) { + return -101; + } + + char* content = strstr(dir, "Content-Length: "); + if (content) { + // Apache 2.x + + // determine data length + content += strlen("Content-Length: "); + char* data_len_str = strstr(content, "\r\n"); + *data_len_str = '\0'; + int data_len = atoi(content); + *data_len_str = '\r'; + + // determine data + char* data = strstr(content, "\r\n\r\n"); + data += strlen("\r\n\r\n"); + char* data2 = data + data_len; + *data2 = '\0'; + int result = atoi(data); + return result; + + } else { + // Apache 1.3x + + content = strstr(dir, "\r\n\r\n"); + + // determine data length + content += strlen("\r\n\r\n"); + char* data_len_str = strstr(content, "\r\n"); + *data_len_str = '\0'; + int data_len = atoi(content); + *data_len_str = '\r'; + + // determine data + data_len_str += strlen("\r\n"); + char* data = strstr(data_len_str, "\r\n"); + data += strlen("\r\n"); + char* data2 = data + data_len; + *data2 = '\0'; + int result = atoi(data); + return result; + } +} Property changes on: src/server/network_meta.cpp ___________________________________________________________________ Name: svn:mime-type + text/x-c++src Name: svn:eol-style + native Added: src/server/network_meta.h =================================================================== --- src/server/network_meta.h (rev 0) +++ src/server/network_meta.h 2006-08-31 20:16:09 UTC (rev 149) @@ -0,0 +1,48 @@ +/*************************************************************************** + * 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 <sys/types.h> +#include <sys/socket.h> +#include <netinet/in.h> +#include <netdb.h> +#include <string.h> +#include <string> + +#define BUFFER_SIZE 512 + +class NetworkMeta { +public: + int check_login(std::string username, std::string password); + +}; + +#endif Property changes on: src/server/network_meta.h ___________________________________________________________________ Name: svn:mime-type + text/x-c++hdr Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-07-16 20:49:27
|
Revision: 90 Author: egore Date: 2006-07-16 13:48:05 -0700 (Sun, 16 Jul 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=90&view=rev Log Message: ----------- continue merge Modified Paths: -------------- src/Makefile.in src/client/Makefile.am src/client/Makefile.in src/common/Makefile.am src/common/Makefile.in src/common/components/Makefile.in src/common/components/component.cpp src/common/equipment/Makefile.in src/common/equipment/ecms/Makefile.in src/common/equipment/engines/Makefile.in src/common/objects/Makefile.in src/common/objects/movable_object.cpp src/common/objects/movable_object.h src/common/objects/object.h src/common/objects/ships/Makefile.in src/opengate_client.cpp src/server/Makefile.in Added Paths: ----------- src/client/input/ src/client/input/Makefile.am src/client/input/input.cpp src/client/input/input.h src/client/input/keyboard.cpp src/client/input/keyboard.h src/client/input/mouse.cpp src/client/input/mouse.h src/client/ui/ src/client/ui/Makefile.am src/client/ui/application.cpp src/client/ui/application.h src/client/ui/avatar.cpp src/client/ui/avatar.h src/client/ui/camera.cpp src/client/ui/camera.h src/client/ui/framelistener.cpp src/client/ui/framelistener.h src/common/gamestate.cpp src/common/gamestate.h Removed Paths: ------------- src/application.cpp src/application.h src/avatar.cpp src/avatar.h src/camera.cpp src/camera.h src/constants.h src/framelistener.cpp src/framelistener.h src/gamestate.cpp src/gamestate.h src/input.cpp src/input.h src/keyboard.cpp src/keyboard.h src/main.cpp src/mouse.cpp src/mouse.h src/movable_object.cpp src/movable_object.h Modified: src/Makefile.in =================================================================== --- src/Makefile.in 2006-07-16 20:36:10 UTC (rev 89) +++ src/Makefile.in 2006-07-16 20:48:05 UTC (rev 90) @@ -86,6 +86,8 @@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_LDFLAGS = @AM_LDFLAGS@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -93,6 +95,8 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ +CEGUI_CFLAGS = @CEGUI_CFLAGS@ +CEGUI_LIBS = @CEGUI_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -124,6 +128,8 @@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ +OGRE_CFLAGS = @OGRE_CFLAGS@ +OGRE_LIBS = @OGRE_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -131,6 +137,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -210,9 +217,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/Makefile + $(AUTOMAKE) --foreign src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ Deleted: src/application.cpp =================================================================== --- src/application.cpp 2006-07-16 20:36:10 UTC (rev 89) +++ src/application.cpp 2006-07-16 20:48:05 UTC (rev 90) @@ -1,211 +0,0 @@ -/*************************************************************************** - * application.cpp - * - * Sat Apr 8 10:24:00 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 <OgreNode.h> -#include <OgreEntity.h> -#include <OgreTextureManager.h> -#include <OgreViewport.h> -#include <CEGUI/elements/CEGUIPushButton.h> -#include "application.h" -#include "constants.h" - -OpengateApp::OpengateApp() : mGUIRenderer(NULL), - mGUISystem(NULL), - mEditorGuiSheet(NULL){ - mFrameListener = NULL; - mRoot = NULL; -} - -OpengateApp::~OpengateApp() { - if (mGamestate) { - delete mGamestate; - } - if (mEditorGuiSheet) { - CEGUI::WindowManager::getSingleton().destroyWindow(mEditorGuiSheet); - } - if (mGUISystem) { - delete mGUISystem; - } - if (mGUIRenderer) { - delete mGUIRenderer; - } - if (mFrameListener) { - delete mFrameListener; - } - if (mCamera) { - delete mCamera; - } - if (mRoot) { - delete mRoot; - } -} - -void OpengateApp::go(void) { - if (!setup()) - return; - - mRoot->startRendering(); - - // clean up - destroyScene(); -} - -bool OpengateApp::setup(void) { - mRoot = new Ogre::Root(); - - setupResources(); - - if (!configure()) - return false; - - chooseSceneManager(); - - // Set default mipmap level (NB some APIs ignore this) - Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(5); - - // Create any resource listeners (for loading screens) - createResourceListener(); - // Load resources - loadResources(); - - // Create the scene - createScene(); - - mCamera = new Camera(mSceneMgr, mWindow, mAvatarNode, true); - mGamestate = new Gamestate(); - setupEventHandlers(); - - createFrameListener(); - setupEventHandlers(); - - return true; - -} - -bool OpengateApp::configure(void) { - // Show the configuration dialog and initialise the system - // You can skip this and use root.restoreConfig() to load configuration - // settings if you were sure there are valid ones saved in ogre.cfg - if(mRoot->restoreConfig()) { - // If returned true, user clicked OK so initialise - // Here we choose to let the system create a default rendering window by passing 'true' - mWindow = mRoot->initialise(true); - return true; - } else { - return false; - } -} - -void OpengateApp::chooseSceneManager(void) { - // Get the SceneManager, in this case a generic one - mSceneMgr = mRoot->createSceneManager(Ogre::ST_GENERIC, "ExampleSMInstance"); -} - -void OpengateApp::createScene() { - // create an ambient light for the scene - mSceneMgr->setAmbientLight(Ogre::ColourValue( 1, 1, 1 )); - mSceneMgr->setShadowTechnique(Ogre::SHADOWTYPE_STENCIL_ADDITIVE); - mSceneMgr->setSkyBox(true, "Examples/SpaceSkyBox"); - - // setup GUI system - mGUIRenderer = new CEGUI::OgreCEGUIRenderer(mWindow, Ogre::RENDER_QUEUE_OVERLAY, false, 3000, mSceneMgr); - mGUISystem = new CEGUI::System(mGUIRenderer); - CEGUI::SchemeManager::getSingleton().loadScheme((CEGUI::utf8*)"TaharezLook.scheme"); - mGUISystem->setDefaultMouseCursor((CEGUI::utf8*)"TaharezLook", (CEGUI::utf8*)"MouseArrow"); - mGUISystem->setDefaultFont((CEGUI::utf8*)"Tahoma-12"); - mEditorGuiSheet= CEGUI::WindowManager::getSingleton().createWindow((CEGUI::utf8*)"DefaultWindow", (CEGUI::utf8*)"Sheet"); - mGUISystem->setGUISheet(mEditorGuiSheet); CEGUI::Logger::getSingleton().setLoggingLevel(CEGUI::Informative); - - CEGUI::PushButton* quitButton = (CEGUI::PushButton*)CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/Button", (CEGUI::utf8*)"Quit"); - mEditorGuiSheet->addChildWindow(quitButton); - quitButton->setPosition(CEGUI::Point(0.35f, 0.45f)); - quitButton->setSize(CEGUI::Size(0.3f, 0.1f)); - quitButton->setText("Quit"); - - // Create an entity - Ogre::Entity* ent = mSceneMgr->createEntity( "Octavius Apteryx", "Ships/Octavius/Apteryx/octavius_apteryx.mesh" ); - mAvatarNode = mSceneMgr->getRootSceneNode()->createChildSceneNode(); - mAvatarNode->attachObject(ent); - mAvatarNode->setPosition(Ogre::Vector3(0,0,30)); - mAvatarNode->rotate(Ogre::Vector3(0.,1.,0.), Ogre::Degree(-90)); - mAvatar = new Avatar(mAvatarNode); - - //ent = mSceneMgr->createEntity( "Quantar Storm", "Ships/Quantar/Storm/quantar_storm.mesh" ); - //Ogre::SceneNode* node2 = mSceneMgr->getRootSceneNode()->createChildSceneNode(); - //node2->attachObject(ent); -} - -void OpengateApp::destroyScene(void) { - -} - -void OpengateApp::createFrameListener(void) { - mFrameListener = new OpengateListener(mWindow, mCamera, mAvatar, mGUIRenderer, mGamestate); - mFrameListener->showDebugOverlay(true); - mRoot->addFrameListener(mFrameListener); -} - -void OpengateApp::setupResources(void) { - // Load resource paths from config file - Ogre::ConfigFile cf; - cf.load("resources.cfg"); - - // Go through all sections & settings in the file - Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator(); - - Ogre::String secName, typeName, archName; - while (seci.hasMoreElements()) - { - secName = seci.peekNextKey(); - Ogre::ConfigFile::SettingsMultiMap *settings = seci.getNext(); - Ogre::ConfigFile::SettingsMultiMap::iterator i; - for (i = settings->begin(); i != settings->end(); ++i) - { - typeName = i->first; - archName = i->second; - Ogre::ResourceGroupManager::getSingleton().addResourceLocation( - archName, typeName, secName); - } - } -} - -void OpengateApp::createResourceListener(void) -{ - -} - -void OpengateApp::loadResources(void) { - // Initialise, parse scripts etc - Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); -} - -void OpengateApp::setupEventHandlers(void) { - CEGUI::WindowManager& wmgr = CEGUI::WindowManager::getSingleton(); - wmgr.getWindow((CEGUI::utf8*)"Quit")->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&OpengateApp::handleQuit, this)); -} - -bool OpengateApp::handleQuit(const CEGUI::EventArgs& e) { - static_cast<OpengateListener*>(mFrameListener)->requestShutdown(); - return true; -} Deleted: src/application.h =================================================================== --- src/application.h 2006-07-16 20:36:10 UTC (rev 89) +++ src/application.h 2006-07-16 20:48:05 UTC (rev 90) @@ -1,141 +0,0 @@ -/*************************************************************************** - * application.h - * - * Sat Apr 8 10:26:58 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 _APPLICATION_H -#define _APPLICATION_H - -#include <OgreConfigFile.h> -#include <OgreRoot.h> -#include <OgreCamera.h> -#include <OgreRenderWindow.h> -#include "framelistener.h" -#include "avatar.h" -#include "camera.h" -#include "gamestate.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -/*! - * - */ -class OpengateApp { -public: - - /*! \brief This default constructor instantiates an Application - * - * The default constructor is used to instantiates the Application. The - * Application can be considered as the object, that holds references to - * everything within the game. So here you can find the Scene, the Viewport - * to the scene, the camera(s) and the FrameListener. - */ - OpengateApp(); - - /*! \brief This destructor closes the application - * - * When this destructor is called, the game is done and will quit. - */ - ~OpengateApp(); - - /*! \brief The main "loop" of the game - * - * This method is running while the game is running. When this method is - * done, we are completely done. - */ - void go(); - -protected: - - CEGUI::OgreCEGUIRenderer* mGUIRenderer; - CEGUI::System* mGUISystem; - CEGUI::Window* mEditorGuiSheet; - Gamestate* mGamestate; - - Avatar* mAvatar; - Ogre::SceneNode* mAvatarNode; - - Ogre::Root* mRoot; - Camera* mCamera; - Ogre::SceneManager* mSceneMgr; - - OpengateListener* mFrameListener; - Ogre::RenderWindow* mWindow; - - Ogre::SceneManager* mGuiSceneMgr; - - /** Sets up the application - returns false if the user chooses to abandon configuration. */ - bool setup(void); - - /** Configures the application - returns false if the user chooses to abandon configuration. */ - bool configure(void); - - void chooseSceneManager(void); - - /*! \brief Creates a camera for the scene - * - * This method creates the necessary cameras for the game. Since we have a - * first person camera and a third person camera, we will use 2 cameras to - * do that. It would be possible to do that with one camera, but the concept - * in OGRE3D is to use 2 cameras. - */ - void createCamera(); - - /*! \brief Define what is in the scene - * - * This method created an initial scene. So here some common things will be - * loaded, like the space background, or jumpgates (which can be found in - * every sector) etc. - */ - void createScene(void); - - void destroyScene(void); - - /*! \biref Create the frame listener for the game - * - * This method creates the framelistener necessary to render a scene - */ - void createFrameListener(void); - - /// Method which will define the source of resources (other than current folder) - void setupResources(void); - - /// Optional override method where you can create resource listeners (e.g. for loading screens) - void createResourceListener(void); - - /// Optional override method where you can perform resource group loading - /// Must at least do ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); - void loadResources(void); - - void setupEventHandlers(void); - - bool handleQuit(const CEGUI::EventArgs& e); -}; - -#ifdef __cplusplus -} -#endif - -#endif /* _APPLICATION_H */ Deleted: src/avatar.cpp =================================================================== --- src/avatar.cpp 2006-07-16 20:36:10 UTC (rev 89) +++ src/avatar.cpp 2006-07-16 20:48:05 UTC (rev 90) @@ -1,98 +0,0 @@ -/*************************************************************************** - * avatar.cpp - * - * Sun Apr 9 14:58:35 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 "avatar.h" - -Avatar::Avatar(Ogre::SceneNode* node) { - mNode = node; - pitch = Ogre::Radian(0.001396)*100; - roll = Ogre::Radian(0.001222)*100; - yaw = Ogre::Radian(0.001396)*100; - mMoveEndOfFrame = false; //TODO -} - -Avatar::~Avatar() { - -} - -bool Avatar::move(const int direction, float scale) { - mTranslateVector = mNode->getPosition(); - switch(direction) { - case Avatar::LEFT: - mTranslateVector += mNode->getOrientation () * Ogre::Vector3 (0, 0, .1 * scale); - break; - case Avatar::RIGHT: - mTranslateVector -= mNode->getOrientation () * Ogre::Vector3 (0, 0, .1 * scale); - break; - case Avatar::UP: - mTranslateVector += mNode->getOrientation () * Ogre::Vector3 (0, .1 * scale, 0); - break; - case Avatar::DOWN: - mTranslateVector -= mNode->getOrientation () * Ogre::Vector3 (0, .1 * scale, 0); - break; - case Avatar::FRONT: - mTranslateVector -= mNode->getOrientation () * Ogre::Vector3 (1 * scale, 0, 0 ); - break; - case Avatar::BACK: - mTranslateVector += mNode->getOrientation () * Ogre::Vector3 (.5 * scale, 0, 0 ); - break; - default: - return false; - break; - } - if (!mMoveEndOfFrame) { - mNode->setPosition(mTranslateVector); - } - return true; -} - -bool Avatar::rotate(int direction, Ogre::Degree scale) { - switch(direction) { - case Avatar::YAW_LEFT: - mNewOrientation = Ogre::Quaternion(yaw*scale, Ogre::Vector3::UNIT_Y); - break; - case Avatar::YAW_RIGHT: - mNewOrientation = Ogre::Quaternion(-yaw*scale, Ogre::Vector3::UNIT_Y); - break; - case Avatar::ROLL_LEFT: - mNewOrientation = Ogre::Quaternion(roll*scale, Ogre::Vector3::UNIT_X); - break; - case Avatar::ROLL_RIGHT: - mNewOrientation = Ogre::Quaternion(-roll*scale, Ogre::Vector3::UNIT_X); - break; - case Avatar::PITCH_DOWN: - mNewOrientation = Ogre::Quaternion(pitch*scale, Ogre::Vector3::UNIT_Z); - break; - case Avatar::PITCH_UP: - mNewOrientation = Ogre::Quaternion(-pitch*scale, Ogre::Vector3::UNIT_Z); - break; - default: - mNewOrientation = Ogre::Quaternion(Ogre::Degree(0), Ogre::Vector3::UNIT_X); - break; - } - if (!mMoveEndOfFrame) { - mNode->rotate(mNewOrientation); - } - return true; -} Deleted: src/avatar.h =================================================================== --- src/avatar.h 2006-07-16 20:36:10 UTC (rev 89) +++ src/avatar.h 2006-07-16 20:48:05 UTC (rev 90) @@ -1,106 +0,0 @@ -/*************************************************************************** - * avatar.h - * - * Sun Apr 9 14:58:04 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 _AVATAR_H -#define _AVATAR_H - -#include <OgreSceneNode.h> -#include "movable_object.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -/*! \brief Class for the players avatar (the ship flying through space) - * \author Christoph Brill - * - * This class defines the players avatar. It is not only the graphical - * representation but also the technical. So it will contain ship-specific stuff, - * any maybe also weaponspecific, but that will follow later - */ -class Avatar : public MovableObject { -public: - /*! \brief Creates the avatar (not only the graphical representation, the - * real one) - */ - Avatar(Ogre::SceneNode* node); - - /*! \brief Destroys the avatar - */ - ~Avatar(); - - /*! \brief Moves the avatar - * - * This method moves the avatar in a given direction with a given scale. If - * "mMoveEndOfFrame" is true, it will only save the movement operation and - * perform the movement at the end of the frame (when performMove() is - * called). - * - * \param direction The direction the avatar is moving (i.e. Avatar::LEFT) - * \param scale The distance the avatar is moving (based on the time elapsed - * since the last frame - * \return Returns false, if an unkown direction was given - */ - virtual bool move(const int direction, float scale); - - /*! \brief Rotates the avatar - * - * This method rotates the avatar in a given direction with a given scale. - * If "mMoveEndOfFrame" is true, it will only save the rotation operation - * and perform the movement at the end of the frame (when performMove() is - * called). - * - * \param direction The direction the avatar is rotating (i.e. - * Avatar::YAW_LEFT) - * \param scale The degree the avatar is direction (based on the time - * elapsed since the last frame) - * \return Returns false, if an unkown rotation was given - */ - virtual bool rotate(int direction, Ogre::Degree scale); - - /*! \brief Performs movement at the end of the frame - * - * This method is called at the and of the frame to perform stored movement - * from the methods rotate() and move(). This movement is only stored if - * mMoveEndOfFrame is true, so otherwise nothing will happen in this method - */ - virtual void performMove() {}; - -private: - /*! Handle to the node the avatar is attached to */ - Ogre::SceneNode* mNode; - /*! Value that the players avatar can pitch in one frame */ - Ogre::Radian pitch; - /*! Value that the players avatar can yaw in one frame */ - Ogre::Radian yaw; - /*! Value that the players avatar can roll in one frame */ - Ogre::Radian roll; -}; - -#ifdef __cplusplus -} -#endif - -#endif /* _AVATAR_H */ Deleted: src/camera.cpp =================================================================== --- src/camera.cpp 2006-07-16 20:36:10 UTC (rev 89) +++ src/camera.cpp 2006-07-16 20:48:05 UTC (rev 90) @@ -1,134 +0,0 @@ -/*************************************************************************** - * camera.cpp - * - * Sat Apr 15 17:51:12 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 <OgreViewport.h> -#include <OgreMath.h> -#include "camera.h" - -Camera::Camera(Ogre::SceneManager* sceneManager, Ogre::RenderWindow* window, Ogre::SceneNode* avatarNode, bool moveEndOfFrame) { - this->mMoveEndOfFrame = moveEndOfFrame; - - mCamera = NULL; - mRotX = 0; - mRotY = 0; - mTranslateVector = Ogre::Vector3::ZERO; - - createCamera(sceneManager, avatarNode); - createViewports(window); -} - -void Camera::createCamera(Ogre::SceneManager* sceneManager, Ogre::SceneNode* avatarNode) { - // create the camera - mCamera = sceneManager->createCamera("PlayerCam"); - - // set its position, direction - mCamera->setPosition(Ogre::Vector3(0,10,50)); - mCamera->lookAt(Ogre::Vector3(0,0,0)); - mCamera->setAutoTracking (true, avatarNode); // The camera will always look at the camera target - mCamera->setFixedYawAxis (true); // Needed because of auto tracking - mCamera->setNearClipDistance(5); -} - -void Camera::createViewports(Ogre::RenderWindow* window) { - // Create one viewport, entire window - Ogre::Viewport* vp = window->addViewport(mCamera); - vp->setBackgroundColour(Ogre::ColourValue(0,0,0)); - - // Alter the camera aspect ratio to match the viewport - mCamera->setAspectRatio(Ogre::Real(vp->getActualWidth()) / Ogre::Real(vp->getActualHeight())); -} - -void Camera::performMove() { - // Movement does not happen at once, so don't do it again at the end of the - // frame - if (!mMoveEndOfFrame) - return; - // Make all the changes to the camera - // Note that YAW direction is around a fixed axis (freelook style) rather - // than a natural YAW (e.g. airplane) - mCamera->rotate(mNewOrientation); - mCamera->moveRelative(mTranslateVector); -} - -bool Camera::move(const int direction, float scale) { - if (!mMoveEndOfFrame) { - reset(); - } - switch(direction) { - case Camera::LEFT: - mTranslateVector += Ogre::Vector3 (0, 0, .1 * scale); - break; - case Camera::RIGHT: - mTranslateVector -= Ogre::Vector3 (0, 0, .1 * scale); - break; - case Camera::UP: - mTranslateVector += Ogre::Vector3 (0, .1 * scale, 0); - break; - case Camera::DOWN: - mTranslateVector -= Ogre::Vector3 (0, .1 * scale, 0); - break; - case Camera::FRONT: - mTranslateVector -= Ogre::Vector3 (1 * scale, 0, 0 ); - break; - case Camera::BACK: - mTranslateVector += Ogre::Vector3 (.5 * scale, 0, 0 ); - break; - default: - return false; - } - if (!mMoveEndOfFrame) { - mCamera->moveRelative(mTranslateVector); - } - return true; -} - -bool Camera::rotate(int direction, Ogre::Degree scale) { - switch(direction) { - case Camera::YAW_LEFT: - mNewOrientation = Ogre::Quaternion(scale, Ogre::Vector3::UNIT_Y); - break; - case Camera::YAW_RIGHT: - mNewOrientation = Ogre::Quaternion(-scale, Ogre::Vector3::UNIT_Y); - break; - case Camera::ROLL_LEFT: - mNewOrientation = Ogre::Quaternion(scale, Ogre::Vector3::UNIT_X); - break; - case Camera::ROLL_RIGHT: - mNewOrientation = Ogre::Quaternion(-scale, Ogre::Vector3::UNIT_X); - break; - case Camera::PITCH_DOWN: - mNewOrientation = Ogre::Quaternion(scale, Ogre::Vector3::UNIT_Z); - break; - case Camera::PITCH_UP: - mNewOrientation = Ogre::Quaternion(-scale, Ogre::Vector3::UNIT_Z); - break; - default: - mNewOrientation = Ogre::Quaternion(Ogre::Degree(0), Ogre::Vector3::UNIT_X); - break; - } - if (!mMoveEndOfFrame) { - mCamera->rotate(mNewOrientation); - } - return true; -} Deleted: src/camera.h =================================================================== --- src/camera.h 2006-07-16 20:36:10 UTC (rev 89) +++ src/camera.h 2006-07-16 20:48:05 UTC (rev 90) @@ -1,127 +0,0 @@ -/*************************************************************************** - * camera.h - * - * Sat Apr 15 17:51:35 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 _CAMERA_H -#define _CAMERA_H - -#include <OgreMath.h> -#include <OgreSceneManager.h> -#include <OgreCamera.h> -#include <OgreVector3.h> -#include <OgreRenderWindow.h> -#include "movable_object.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -class Camera : public MovableObject { -public: - /*! \brief creates a new camera - * - * This method creates a new camera by invoking createCamera() and - * createViewports(). - * \param sceneManager The handle to the scenemanager of the game (used in - * createCamera()). - * \param window The handle to the window of the game (used in - * createViewports()). - * \param avatarNode The handle to the scenenode of the players avatar (used - * in createCamera()). - * \param moveEndOfFrame If true, the movement will be done at once at the - * end of the frame. - */ - Camera(Ogre::SceneManager* sceneManager, Ogre::RenderWindow* window, Ogre::SceneNode* avatarNode, bool moveEndOfFrame); - - /*! \brief Moves the camera - * - * This method moves the camera in a given direction with a given scale. If - * "mMoveEndOfFrame" is true, it will only save the movement operation and - * perform the movement at the end of the frame (when performMove() is - * called). - * - * \param direction The direction the camera is moving (i.e. Camera::LEFT). - * \param scale The distance the camera is moving (based on the time elapsed - * since the last frame. - * \return Returns false, if an unkown direction was given. - */ - virtual bool move(const int direction, float scale); - - /*! \brief Rotates the camera - * - * This method rotates the camera in a given direction with a given scale. - * - * \param direction The direction the camera is rotating (i.e. - * Camera::YAW_LEFT). - * \param scale The degree the camera is direction (based on the time - * elapsed since the last frame). - * \return Returns false, if an unkown rotation was given. - */ - virtual bool rotate(int direction, Ogre::Degree scale); - - /*! \brief Performs movement at the end of the frame - * - * This method is called at the and of the frame to perform stored movement - * from the methods rotate() and move(). This movement is only stored if - * mMoveEndOfFrame is true, so otherwise nothing will happen in this method - */ - virtual void performMove(); - -private: - /*! Handle to the players camera so we can move it on mouse or keyboard - * input - */ - Ogre::Camera* mCamera; - - /*! Value to rotate the camera by X (=yaw) - */ - Ogre::Radian mRotX; - - /*! Value to rotate the camera by Y (=pitch) - */ - Ogre::Radian mRotY; - - /*! \brief Creates a camera for the scene - * - * This method creates the necessary cameras for the game. Since we have a - * first person camera and a third person camera, we will use 2 cameras to - * do that. It would be possible to do that with one camera, but the concept - * in OGRE3D is to use 2 cameras. - */ - void createCamera(Ogre::SceneManager* sceneManager, Ogre::SceneNode* avatarNode); - - /*! \brief Creates a viewport with the given cameras for the scene - * - * This method creates the viewport to the scene. This is what the user will - * actually see when playing the game. The viewport uses the given cameras - * to get its picture. - */ - void createViewports(Ogre::RenderWindow* window); -}; - -#ifdef __cplusplus -} -#endif - -#endif /* _CAMERA_H */ Modified: src/client/Makefile.am =================================================================== --- src/client/Makefile.am 2006-07-16 20:36:10 UTC (rev 89) +++ src/client/Makefile.am 2006-07-16 20:48:05 UTC (rev 90) @@ -3,3 +3,6 @@ noinst_LTLIBRARIES = libopengate-client.la noinst_HEADERS = network.h libopengate_client_la_SOURCES = network.cpp +SUBDIRS = input ui +libopengate_client_la_LIBADD = $(top_builddir)/src/client/ui/libopengate-ui.la\ + $(top_builddir)/src/client/input/libopengate-input.la Modified: src/client/Makefile.in =================================================================== --- src/client/Makefile.in 2006-07-16 20:36:10 UTC (rev 89) +++ src/client/Makefile.in 2006-07-16 20:48:05 UTC (rev 90) @@ -48,7 +48,9 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) -libopengate_client_la_LIBADD = +libopengate_client_la_DEPENDENCIES = \ + $(top_builddir)/src/client/ui/libopengate-ui.la \ + $(top_builddir)/src/client/input/libopengate-input.la am_libopengate_client_la_OBJECTS = network.lo libopengate_client_la_OBJECTS = $(am_libopengate_client_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) @@ -64,14 +66,23 @@ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libopengate_client_la_SOURCES) DIST_SOURCES = $(libopengate_client_la_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_LDFLAGS = @AM_LDFLAGS@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -79,6 +90,8 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ +CEGUI_CFLAGS = @CEGUI_CFLAGS@ +CEGUI_LIBS = @CEGUI_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -110,6 +123,8 @@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ +OGRE_CFLAGS = @OGRE_CFLAGS@ +OGRE_LIBS = @OGRE_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -117,6 +132,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -174,8 +190,12 @@ noinst_LTLIBRARIES = libopengate-client.la noinst_HEADERS = network.h libopengate_client_la_SOURCES = network.cpp -all: all-am +SUBDIRS = input ui +libopengate_client_la_LIBADD = $(top_builddir)/src/client/ui/libopengate-ui.la\ + $(top_builddir)/src/client/input/libopengate-input.la +all: all-recursive + .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @@ -187,9 +207,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/client/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/client/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/client/Makefile + $(AUTOMAKE) --foreign src/client/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -258,6 +278,77 @@ -rm -f libtool uninstall-info-am: +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -268,10 +359,23 @@ mkid -fID $$unique tags: TAGS -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ @@ -284,7 +388,7 @@ $$tags $$unique; \ fi ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ @@ -333,19 +437,35 @@ || exit 1; \ fi; \ done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(mkdir_p) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + distdir) \ + || exit 1; \ + fi; \ + done check-am: all-am -check: check-am +check: check-recursive all-am: Makefile $(LTLIBRARIES) $(HEADERS) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -installcheck: installcheck-am +installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ @@ -361,24 +481,24 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -clean: clean-am +clean: clean-recursive clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am -distclean: distclean-am +distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags -dvi: dvi-am +dvi: dvi-recursive dvi-am: -html: html-am +html: html-recursive -info: info-am +info: info-recursive info-am: @@ -386,43 +506,47 @@ install-exec-am: -install-info: install-info-am +install-info: install-info-recursive install-man: installcheck-am: -maintainer-clean: maintainer-clean-am +maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-am +mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool -pdf: pdf-am +pdf: pdf-recursive pdf-am: -ps: ps-am +ps: ps-recursive ps-am: uninstall-am: uninstall-info-am -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ +uninstall-info: uninstall-info-recursive + +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ + clean clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-recursive ctags ctags-recursive distclean \ distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-info-am + distclean-recursive distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am install-info \ + install-info-am install-man install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic maintainer-clean-recursive \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. Added: src/client/input/Makefile.am =================================================================== --- src/client/input/Makefile.am (rev 0) +++ src/client/input/Makefile.am 2006-07-16 20:48:05 UTC (rev 90) @@ -0,0 +1,6 @@ +INCLUDES = $(all_includes) +METASOURCES = AUTO +noinst_LTLIBRARIES = libopengate-input.la +noinst_HEADERS = input.h keyboard.h mouse.h +libopengate_input_la_SOURCES = input.cpp keyboard.cpp mouse.cpp +libopengate_input_la_LIBADD = $(top_builddir)/src/common/libopengate-common.la Property changes on: src/client/input/Makefile.am ___________________________________________________________________ Name: svn:svn:eol-style + native Name: svn:mime-type + text/plain Name: svn:eol-style + native Copied: src/client/input/input.cpp (from rev 84, src/input.cpp) =================================================================== --- src/client/input/input.cpp (rev 0) +++ src/client/input/input.cpp 2006-07-16 20:48:05 UTC (rev 90) @@ -0,0 +1,35 @@ +/*************************************************************************** + * input.cpp + * + * Mon Apr 17 11:36:04 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 "input.h" + +Input::Input(Ogre::InputReader* inputDevice, MovableObject* object, CEGUI::Renderer* guiRenderer, Gamestate* gamestate) { + this->mInputDevice = inputDevice; + this->mTarget = object; + this->mGuiRenderer = guiRenderer; + this->mGamestate = gamestate; +} + +Input::~Input() { +} Copied: src/client/input/input.h (from rev 84, src/input.h) =================================================================== --- src/client/input/input.h (rev 0) +++ src/client/input/input.h 2006-07-16 20:48:05 UTC (rev 90) @@ -0,0 +1,109 @@ +/*************************************************************************** + * input.h + * + * Mon Apr 17 11:32:17 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 _INPUT_H +#define _INPUT_H + +#include <OGRE/OgreInput.h> +#include <OGRE/OgreFrameListener.h> +#include <CEGUIRenderer.h> +#include "../../common/objects/movable_object.h" +#include "../../common/gamestate.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +/*! \brief An abstract class for input devices + * \author Christoph Brill + * + * This class is an interface for all types of input devices (keyboard, mouse, + * joystick, gamepad, etc.). Every type of input device has to use this + * and implement its own processInput method. The idea of this class is to + * translate user input into reactions of an object (most likely the players + * avatar) in the game. + */ +class Input { +public: + /*! \brief Constructor to save the input device and the target + * + * This constructor will save the given input device and the given target + * for the input to perform movement based on the input states in the game. + * If (for example) we have a mouse as input device and the players avatar + * as target, we can rotate the players avatar based on mouse movement, or + * fire its weapons on mouseclicks + */ + Input(Ogre::InputReader* inputDevice, MovableObject* object, CEGUI::Renderer* guiRenderer, Gamestate* gamestate); + + /*! \brief Destructor + * + * This is a currently empty destructor, since we don't need to free + * anything + */ + virtual ~Input(); + + /*! \brief perform movement on input states + * + * This is the main method of this class. It will be called once in a frame + * to read the input states and react to them. If a player move the mouse + * the avatar will be moved to represent this change. + * + * \param evt the FrameEvent that happened (i.e. for getting the time since + * the last frame + * \return returns the time to the next "toggle-event" (to remove flickering + * when toggling to often) or a negative value on special states + */ + virtual Ogre::Real processInput(const Ogre::FrameEvent& evt) = 0; + + /*! Returned by processInput if the game should be quit */ + static const int GAME_QUIT = -1; + +protected: + + /*! Handle to the input device, which will give us the keyboard, mouse or + * joysick states + */ + Ogre::InputReader* mInputDevice; + + /*! Handle to the object that can be moved by the input device (i.e. the + * players avatar or a free camera) + */ + MovableObject* mTarget; + + /*! Handle to the GUI renderer when we are in the menu and want to react to + * events + */ + CEGUI::Renderer* mGuiRenderer; + + /*! Handle to the gamestate manager + */ + Gamestate* mGamestate; +}; + +#ifdef __cplusplus +} +#endif + +#endif /* _INPUT_H */ Copied: src/client/input/keyboard.cpp (from rev 84, src/keyboard.cpp) =================================================================== --- src/client/input/keyboard.cpp (rev 0) +++ src/client/input/keyboard.cpp 2006-07-16 20:48:05 UTC (rev 90) @@ -0,0 +1,163 @@ +/*************************************************************************** + * keyboard.cpp + * + * Sat Apr 15 16:31:18 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 "keyboard.h" + +Keyboard::Keyboard(Ogre::InputReader* inputDevice, Avatar* avatar, CEGUI::Renderer* guiRenderer, Gamestate* gamestate) + : Input (inputDevice, avatar, guiRenderer, gamestate) { + mTimeUntilNextToggle = 0; +} + +Keyboard::~Keyboard() { +} + +Ogre::Real Keyboard::processInput(const Ogre::FrameEvent& evt) { + + switch (mGamestate->getGamestate()) { + case Gamestate::GAME: + mTimeUntilNextToggle = 0; + + // Move avatar forwards + if (mInputDevice->isKeyDown(Ogre::KC_U)) { + mTarget->move(Avatar::FRONT, mMoveScale); + } + + // Move avatar backwards + if (mInputDevice->isKeyDown(Ogre::KC_N)) { + mTarget->move(Avatar::BACK, mMoveScale); + } + + // Move avatar forwards + if (mInputDevice->isKeyDown(Ogre::KC_I)) { + mTarget->move(Avatar::PITCH_DOWN, mMoveScale); + } + + // Move avatar backwards + if (mInputDevice->isKeyDown(Ogre::KC_K)) { + mTarget->move(Avatar::PITCH_UP, mMoveScale); + } + + // Move avatar left + if (mInputDevice->isKeyDown(Ogre::KC_J)) { + mTarget->move(Avatar::YAW_LEFT, mMoveScale); + } + + // Move avatar right + if (mInputDevice->isKeyDown(Ogre::KC_L)) { + mTarget->move(Avatar::YAW_RIGHT, mMoveScale); + } + + // Move avatar up + if (mInputDevice->isKeyDown(Ogre::KC_PERIOD)) { + mTarget->move(Avatar::ROLL_RIGHT, mMoveScale); + } + + // Move avatar down + if (mInputDevice->isKeyDown(Ogre::KC_COMMA)) { + mTarget->move(Avatar::ROLL_LEFT, mMoveScale); + } + + // switch to menu + if( mInputDevice->isKeyDown(Ogre::KC_ESCAPE)) { + mGamestate->setGamestate(Gamestate::MENU); + } + + /*// switch filtering + if (mInputDevice->isKeyDown(Ogre::KC_T) && mTimeUntilNextToggle <= 0) { + switch(mFiltering) { + case TFO_BILINEAR: + mFiltering = TFO_TRILINEAR; + mAniso = 1; + break; + case TFO_TRILINEAR: + mFiltering = TFO_ANISOTROPIC; + mAniso = 8; + break; + case TFO_ANISOTROPIC: + mFiltering = TFO_BILINEAR; + mAniso = 1; + break; + default: + break; + } + MaterialManager::getSingleton().setDefaultTextureFiltering(mFiltering); + MaterialManager::getSingleton().setDefaultAnisotropy(mAniso); + + showDebugOverlay(mStatsOn); + + mTimeUntilNextToggle = 1; + } + + // create screenshot + if (mInputDevice->isKeyDown(Ogre::KC_SYSRQ) && mTimeUntilNextToggle <= 0) { + char tmp[20]; + sprintf(tmp, "screenshot_%d.png", ++mNumScreenShots); + mWindow->writeContentsToFile(tmp); + mTimeUntilNextToggle = 0.5; + mWindow->setDebugText(String("Wrote ") + tmp); + } + + // switch rendermode + if (mInputDevice->isKeyDown(Ogre::KC_R) && mTimeUntilNextToggle <=0) { + mSceneDetailIndex = (mSceneDetailIndex+1)%3; + switch(mSceneDetailIndex) { + case 0 : mCamera->setDetailLevel(Ogre::SDL_SOLID) ; break ; + case 1 : mCamera->setDetailLevel(Ogre::SDL_WIREFRAME) ; break ; + case 2 : mCamera->setDetailLevel(Ogre::SDL_POINTS) ; break ; + } + mTimeUntilNextToggle = 1; + } + + static bool displayCameraDetails = false; + if (mInputDevice->isKeyDown(KC_P) && mTimeUntilNextToggle <= 0) + { + + displayCameraDetails = !displayCameraDetails; + mTimeUntilNextToggle = 1; + if (!displayCameraDetails) + mWindow->setDebugText(""); + } + if (displayCameraDetails) + { + // Print camera details + mWindow->setDebugText("P: " + StringConverter::toString(mCamera->getDerivedPosition()) + " " + + "O: " + StringConverter::toString(mCamera->getDerivedOrientation())); + }*/ + + // Return true to continue rendering + return mTimeUntilNextToggle; + case Gamestate::MENU: + // quit game + if( mInputDevice->isKeyDown(Ogre::KC_ESCAPE)) { + return Input::GAME_QUIT; + } + return 0; + default: + return 0; + } +} + +void Keyboard::setScale(float moveScale) { + mMoveScale = moveScale; +} Copied: src/client/input/keyboard.h (from rev 84, src/keyboard.h) =================================================================== --- src/client/input/keyboard.h (rev 0) +++ src/client/input/keyboard.h 2006-07-16 20:48:05 UTC (rev 90) @@ -0,0 +1,58 @@ +/*************************************************************************** + * keyboard.h + * + * Sat Apr 15 16:31:36 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 _KEYBOARD_H +#define _KEYBOARD_H + +#include <OgreInput.h> +#include <OgreFrameListener.h> +#include <OgreMath.h> +#include "../ui/avatar.h" +#include "input.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +class Keyboard : public Input { +public: + Keyboard(Ogre::InputReader* mInputDevice, Avatar* avatar, CEGUI::Renderer* guiRenderer, Gamestate* gamestate); + virtual ~Keyboard(); + virtual Ogre::Real processInput(const Ogre::FrameEvent& evt); + void setScale(float moveScale); +private: + + /*! Value to move the camera */ + float mMoveScale; + + /*! */ + Ogre::Real mTimeUntilNextToggle; +}; + +#ifdef __cplusplus +} +#endif + +#endif /* _KEYBOARD_H */ Copied: src/client/input/mouse.cpp (from rev 84, src/mouse.cpp) =================================================================== --- src/client/input/mouse.cpp (rev 0) +++ src/client/input/mouse.cpp 2006-07-16 20:48:05 UTC (rev 90) @@ -0,0 +1,66 @@ +/*************************************************************************** + * mouse.cpp + * + * Sat Apr 15 16:55:56 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 <CEGUISystem.h> +#include "mouse.h" + +Mouse::Mouse(Ogre::InputReader* inputDevice, Avatar* avatar, CEGUI::Renderer* guiRenderer, Gamestate* gamestate) + : Input (inputDevice, avatar, guiRenderer, gamestate) { + mPressed = false; +} + +Ogre::Real Mouse::processInput(const Ogre::FrameEvent& evt) { + + switch (mGamestate->getGamestate()) { + case Gamestate::GAME: + /* If the second mouse button is pressed, then the mouse movement results in + sliding the camera, otherwise we rotate. */ + if (mInputDevice->getMouseButton(1)) { + mTarget->move(Avatar::LEFT, (mInputDevice->getMouseRelativeX() * 0.13)); + mTarget->move(Avatar::DOWN, (mInputDevice->getMouseRelativeY() * 0.13)); + } else { + mTarget->rotate(Avatar::YAW_RIGHT, Ogre::Degree(mInputDevice->getMouseRelativeX() * 0.13)); + mTarget->rotate(Avatar::PITCH_DOWN, Ogre::Degree(mInputDevice->getMouseRelativeY() * 0.13)); + } + return 0; + case Gamestate::MENU: + CEGUI::System::getSingleton().injectMouseMove( + (mInputDevice->getMouseRelativeX() * 0.13) * mGuiRenderer->getWidth(), + (mInputDevice->getMouseRelativeY() * 0.13) * mGuiRenderer->getHeight()); + if (mInputDevice->getMouseButton(0)) { + CEGUI::System::getSingleton().injectMouseButtonDown(CEGUI::LeftButton); + mPressed = true; + } else if (mPressed && !mInputDevice->getMouseButton(0)) { + CEGUI::System::getSingleton().injectMouseButtonUp(CEGUI::LeftButton); + } + return 0; + default: + break; + } + return 0; +} + +void Mouse::setScale(Ogre::Degree rotScale) { + mRotScale = rotScale; +} Copied: src/client/input/mouse.h (from rev 84, src/mouse.h) =================================================================== --- src/client/input/mouse.h (rev 0) +++ src/client/input/mouse.h 2006-07-16 20:48:05 UTC (rev 90) @@ -0,0 +1,82 @@ +/*************************************************************************** + * mouse.h + * + * Sat Apr 15 16:55:15 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 _MOUSE_H +#define _MOUSE_H + +#include <OgreInput.h> +#include <OgreFrameListener.h> +#include <OgreMath.h> +#include "../ui/avatar.h" +#include "input.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +class Mouse : public Input { +public: + /*! \brief Creates a new camera to chase the players avatar + * + * This constructor saves the given avatar an... [truncated message content] |
From: <eg...@us...> - 2006-07-17 20:24:54
|
Revision: 99 Author: egore Date: 2006-07-17 13:24:15 -0700 (Mon, 17 Jul 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=99&view=rev Log Message: ----------- drop autogenerated files update loader for loading arrays add working ship loader Modified Paths: -------------- src/common/Makefile.am src/common/equipment/Makefile.am src/common/equipment/ecms/Makefile.am src/common/equipment/ecms/ecm.cpp src/common/equipment/ecms/ecm.h src/common/equipment/engines/Makefile.am src/common/equipment/engines/engine.cpp src/common/equipment/engines/engine.h src/common/equipment/equipment.cpp src/common/equipment/equipment.h src/common/loader.cpp src/common/loader.h src/common/objects/ships/ship.cpp src/common/objects/ships/ship.h src/opengate_client.cpp Added Paths: ----------- src/common/equipment/capacitors/Makefile.am src/common/equipment/capacitors/capacitor.cpp src/common/equipment/capacitors/capacitor.h src/common/equipment/guns/ src/common/equipment/guns/Makefile.am src/common/equipment/guns/gun.cpp src/common/equipment/guns/gun.h Removed Paths: ------------- src/Makefile.in src/client/Makefile.in src/common/Makefile.in src/common/components/Makefile.in src/common/equipment/Makefile.in src/common/equipment/ecms/Makefile.in src/common/equipment/engines/Makefile.in src/common/objects/Makefile.in src/common/objects/ships/Makefile.in src/server/Makefile.in Deleted: src/Makefile.in =================================================================== --- src/Makefile.in 2006-07-17 20:20:48 UTC (rev 98) +++ src/Makefile.in 2006-07-17 20:24:15 UTC (rev 99) @@ -1,590 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = opengate-server$(EXEEXT) opengate-client$(EXEEXT) -subdir = src -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -am_opengate_client_OBJECTS = opengate_client.$(OBJEXT) -opengate_client_OBJECTS = $(am_opengate_client_OBJECTS) -opengate_client_DEPENDENCIES = \ - $(top_builddir)/src/client/libopengate-client.la \ - $(top_builddir)/src/common/libopengate-common.la -am_opengate_server_OBJECTS = opengate_server.$(OBJEXT) -opengate_server_OBJECTS = $(am_opengate_server_OBJECTS) -opengate_server_DEPENDENCIES = \ - $(top_builddir)/src/server/libopengate-server.la \ - $(top_builddir)/src/common/libopengate-common.la -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(opengate_client_SOURCES) $(opengate_server_SOURCES) -DIST_SOURCES = $(opengate_client_SOURCES) $(opengate_server_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ - install-recursive installcheck-recursive installdirs-recursive \ - pdf-recursive ps-recursive uninstall-info-recursive \ - uninstall-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AM_CXXFLAGS = @AM_CXXFLAGS@ -AM_LDFLAGS = @AM_LDFLAGS@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CEGUI_CFLAGS = @CEGUI_CFLAGS@ -CEGUI_LIBS = @CEGUI_LIBS@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GREP = @GREP@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -OGRE_CFLAGS = @OGRE_CFLAGS@ -OGRE_LIBS = @OGRE_LIBS@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -RANLIB = @RANLIB@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -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@ -target_alias = @target_alias@ - -# set the include path found by configure -INCLUDES = $(all_includes) - -# the library search path. -SUBDIRS = 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 - -all: all-recursive - -.SUFFIXES: -.SUFFIXES: .cpp .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -opengate-client$(EXEEXT): $(opengate_client_OBJECTS) $(opengate_client_DEPENDENCIES) - @rm -f opengate-client$(EXEEXT) - $(CXXLINK) $(opengate_client_LDFLAGS) $(opengate_client_OBJECTS) $(opengate_client_LDADD) $(LIBS) -opengate-server$(EXEEXT): $(opengate_server_OBJECTS) $(opengate_server_DEPENDENCIES) - @rm -f opengate-server$(EXEEXT) - $(CXXLINK) $(opengate_server_LDFLAGS) $(opengate_server_OBJECTS) $(opengate_server_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opengate_client.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opengate_server.Po@am__quote@ - -.cpp.o: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cpp.obj: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cpp.lo: -@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(mkdir_p) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile $(PROGRAMS) -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-libtool distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: - -install-exec-am: install-binPROGRAMS - -install-info: install-info-recursive - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-info-am - -uninstall-info: uninstall-info-recursive - -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ - clean clean-binPROGRAMS clean-generic clean-libtool \ - clean-recursive ctags ctags-recursive distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-recursive distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic \ - maintainer-clean-recursive mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \ - pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ - uninstall-binPROGRAMS uninstall-info-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: Deleted: src/client/Makefile.in =================================================================== --- src/client/Makefile.in 2006-07-17 20:20:48 UTC (rev 98) +++ src/client/Makefile.in 2006-07-17 20:24:15 UTC (rev 99) @@ -1,553 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = src/client -DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libopengate_client_la_DEPENDENCIES = \ - $(top_builddir)/src/client/ui/libopengate-ui.la \ - $(top_builddir)/src/client/input/libopengate-input.la -am_libopengate_client_la_OBJECTS = network.lo -libopengate_client_la_OBJECTS = $(am_libopengate_client_la_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(libopengate_client_la_SOURCES) -DIST_SOURCES = $(libopengate_client_la_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ - install-recursive installcheck-recursive installdirs-recursive \ - pdf-recursive ps-recursive uninstall-info-recursive \ - uninstall-recursive -HEADERS = $(noinst_HEADERS) -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AM_CXXFLAGS = @AM_CXXFLAGS@ -AM_LDFLAGS = @AM_LDFLAGS@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CEGUI_CFLAGS = @CEGUI_CFLAGS@ -CEGUI_LIBS = @CEGUI_LIBS@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GREP = @GREP@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -OGRE_CFLAGS = @OGRE_CFLAGS@ -OGRE_LIBS = @OGRE_LIBS@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -RANLIB = @RANLIB@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -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@ -target_alias = @target_alias@ -INCLUDES = $(all_includes) -METASOURCES = AUTO -noinst_LTLIBRARIES = libopengate-client.la -noinst_HEADERS = network.h -libopengate_client_la_SOURCES = network.cpp -SUBDIRS = input ui -libopengate_client_la_LIBADD = $(top_builddir)/src/client/ui/libopengate-ui.la\ - $(top_builddir)/src/client/input/libopengate-input.la - -all: all-recursive - -.SUFFIXES: -.SUFFIXES: .cpp .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/client/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/client/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libopengate-client.la: $(libopengate_client_la_OBJECTS) $(libopengate_client_la_DEPENDENCIES) - $(CXXLINK) $(libopengate_client_la_LDFLAGS) $(libopengate_client_la_OBJECTS) $(libopengate_client_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network.Plo@am__quote@ - -.cpp.o: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cpp.obj: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cpp.lo: -@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(mkdir_p) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile $(LTLIBRARIES) $(HEADERS) -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-libtool distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-recursive - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-info-am - -uninstall-info: uninstall-info-recursive - -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ - clean clean-generic clean-libtool clean-noinstLTLIBRARIES \ - clean-recursive ctags ctags-recursive distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-recursive distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic maintainer-clean-recursive \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am uninstall-info-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: Modified: src/common/Makefile.am =================================================================== --- src/common/Makefile.am 2006-07-17 20:20:48 UTC (rev 98) +++ src/common/Makefile.am 2006-07-17 20:24:15 UTC (rev 99) @@ -2,7 +2,7 @@ METASOURCES = AUTO noinst_LTLIBRARIES = libopengate-common.la libopengate_common_la_SOURCES = loader.cpp exception.cpp company.cpp \ - faction.cpp faction_storage.cpp company_storage.cpp gamestate.h + faction.cpp faction_storage.cpp company_storage.cpp gamestate.cpp noinst_HEADERS = loader.h exception.h company.h faction.h faction_storage.h \ company_storage.h gamestate.h SUBDIRS = objects equipment components Deleted: src/common/Makefile.in =================================================================== --- src/common/Makefile.in 2006-07-17 20:20:48 UTC (rev 98) +++ src/common/Makefile.in 2006-07-17 20:24:15 UTC (rev 99) @@ -1,573 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = src/common -DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libopengate_common_la_DEPENDENCIES = \ - $(top_builddir)/src/common/objects/libopengate-objects.la \ - $(top_builddir)/src/common/equipment/libopengate-equipment.la \ - $(top_builddir)/src/common/components/libopengate-components.la -am_libopengate_common_la_OBJECTS = loader.lo exception.lo company.lo \ - faction.lo faction_storage.lo company_storage.lo -libopengate_common_la_OBJECTS = $(am_libopengate_common_la_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(libopengate_common_la_SOURCES) -DIST_SOURCES = $(libopengate_common_la_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ - install-recursive installcheck-recursive installdirs-recursive \ - pdf-recursive ps-recursive uninstall-info-recursive \ - uninstall-recursive -HEADERS = $(noinst_HEADERS) -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AM_CXXFLAGS = @AM_CXXFLAGS@ -AM_LDFLAGS = @AM_LDFLAGS@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CEGUI_CFLAGS = @CEGUI_CFLAGS@ -CEGUI_LIBS = @CEGUI_LIBS@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GREP = @GREP@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -OGRE_CFLAGS = @OGRE_CFLAGS@ -OGRE_LIBS = @OGRE_LIBS@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -RANLIB = @RANLIB@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -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@ -target_alias = @target_alias@ -INCLUDES = $(all_includes) -METASOURCES = AUTO -noinst_LTLIBRARIES = libopengate-common.la -libopengate_common_la_SOURCES = loader.cpp exception.cpp company.cpp \ - faction.cpp faction_storage.cpp company_storage.cpp gamestate.h - -noinst_HEADERS = loader.h exception.h company.h faction.h faction_storage.h \ - company_storage.h gamestate.h - -SUBDIRS = objects equipment components -libopengate_common_la_LIBADD = \ - $(top_builddir)/src/common/objects/libopengate-objects.la $(top_builddir)/src/common/equipment/libopengate-equipment.la \ - $(top_builddir)/src/common/components/libopengate-components.la - -all: all-recursive - -.SUFFIXES: -.SUFFIXES: .cpp .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/common/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/common/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libopengate-common.la: $(libopengate_common_la_OBJECTS) $(libopengate_common_la_DEPENDENCIES) - $(CXXLINK) $(libopengate_common_la_LDFLAGS) $(libopengate_common_la_OBJECTS) $(libopengate_common_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/company.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/company_storage.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exception.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/faction.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/faction_storage.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loader.Plo@am__quote@ - -.cpp.o: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cpp.obj: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cpp.lo: -@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(mkdir_p) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile $(LTLIBRARIES) $(HEADERS) -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-libtool distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-recursive - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-info-am - -uninstall-info: uninstall-info-recursive - -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ - clean clean-generic clean-libtool clean-noinstLTLIBRARIES \ - clean-recursive ctags ctags-recursive distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-recursive distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic maintainer-clean-recursive \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am uninstall-info-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: Deleted: src/common/components/Makefile.in =================================================================== --- src/common/components/Makefile.in 2006-07-17 20:20:48 UTC (rev 98) +++ src/common/components/Makefile.in 2006-07-17 20:24:15 UTC (rev 99) @@ -1,437 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C... [truncated message content] |
From: <eg...@us...> - 2006-07-18 21:24:49
|
Revision: 110 Author: egore Date: 2006-07-18 14:24:34 -0700 (Tue, 18 Jul 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=110&view=rev Log Message: ----------- ignore Makefile.in's fix capacitor Modified Paths: -------------- src/common/equipment/capacitor.cpp src/common/equipment/engine.h src/common/equipment/equipment.h src/opengate_client.cpp Property Changed: ---------------- src/ src/client/ src/client/input/ src/client/ui/ src/common/ src/common/components/ src/common/equipment/ src/common/objects/ src/server/ Property changes on: src ___________________________________________________________________ Name: svn:ignore + Makefile.in Property changes on: src/client ___________________________________________________________________ Name: svn:ignore + Makefile.in Property changes on: src/client/input ___________________________________________________________________ Name: svn:ignore + Makefile.in Property changes on: src/client/ui ___________________________________________________________________ Name: svn:ignore + Makefile.in Property changes on: src/common ___________________________________________________________________ Name: svn:ignore + Makefile.in Property changes on: src/common/components ___________________________________________________________________ Name: svn:ignore + Makefile.in Property changes on: src/common/equipment ___________________________________________________________________ Name: svn:ignore + Makefile.in Modified: src/common/equipment/capacitor.cpp =================================================================== --- src/common/equipment/capacitor.cpp 2006-07-18 21:11:38 UTC (rev 109) +++ src/common/equipment/capacitor.cpp 2006-07-18 21:24:34 UTC (rev 110) @@ -28,6 +28,7 @@ Capacitor::Capacitor(std::string filename) : Equipment(filename) { _efficiency = 0; _capacity = 0; + initialize(); } Capacitor::~Capacitor() { Modified: src/common/equipment/engine.h =================================================================== --- src/common/equipment/engine.h 2006-07-18 21:11:38 UTC (rev 109) +++ src/common/equipment/engine.h 2006-07-18 21:24:34 UTC (rev 110) @@ -28,6 +28,11 @@ #include "equipment.h" #include <string> +#ifdef __cplusplus +extern "C" +{ +#endif + class Engine : public Equipment { public: Engine(std::string filename); @@ -44,4 +49,8 @@ }; +#ifdef __cplusplus +} #endif + +#endif Modified: src/common/equipment/equipment.h =================================================================== --- src/common/equipment/equipment.h 2006-07-18 21:11:38 UTC (rev 109) +++ src/common/equipment/equipment.h 2006-07-18 21:24:34 UTC (rev 110) @@ -50,8 +50,8 @@ Company* get_manufacturer(); long get_price(); + void set_price(long price); int get_size(); - void set_price(long price); protected: Equipment(std::string filename); Property changes on: src/common/objects ___________________________________________________________________ Name: svn:ignore + Makefile.in Modified: src/opengate_client.cpp =================================================================== --- src/opengate_client.cpp 2006-07-18 21:11:38 UTC (rev 109) +++ src/opengate_client.cpp 2006-07-18 21:24:34 UTC (rev 110) @@ -26,7 +26,7 @@ #include <iostream> #include <cstdlib> -#include "common/objects/ships/ship.h" +#include "common/objects/ship.h" #include "common/equipment/engine.h" #include "common/loader.h" #include "common/faction_storage.h" @@ -92,7 +92,6 @@ 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; - delete(engine); Capacitor* capacitor = new Capacitor("../../data/Capacitors/S-C-15/s_c_15.xml"); cout << "Name: " << capacitor->get_name() << std::endl; @@ -110,6 +109,7 @@ } ship->set_capacitor(capacitor); cout << "Name: " << ship->get_capacitor()->get_name() << std::endl; + delete(engine); delete(ship); delete(f_storage); Property changes on: src/server ___________________________________________________________________ Name: svn:ignore + Makefile.in This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-07-30 19:14:32
|
Revision: 127 Author: egore Date: 2006-07-30 12:14:10 -0700 (Sun, 30 Jul 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=127&view=rev Log Message: ----------- Completely rework input system Add working CEGUI menu Note: You will not see anything in the game! Modified Paths: -------------- src/client/ui/Makefile.am src/client/ui/application.cpp src/client/ui/application.h src/client/ui/framelistener.cpp src/client/ui/framelistener.h src/ogre.cfg src/opengate_client.cpp src/resources.cfg Added Paths: ----------- src/client/ui/ActionConfig.cpp src/client/ui/ActionConfig.h src/client/ui/ActionMap.cpp src/client/ui/ActionMap.h Removed Paths: ------------- src/client/ui/avatar.cpp src/client/ui/avatar.h src/client/ui/camera.cpp src/client/ui/camera.h Added: src/client/ui/ActionConfig.cpp =================================================================== --- src/client/ui/ActionConfig.cpp (rev 0) +++ src/client/ui/ActionConfig.cpp 2006-07-30 19:14:10 UTC (rev 127) @@ -0,0 +1,770 @@ +/* +The zlib/libpng License + +Copyright (c) 2005 Phillip Castaneda (pjcast -- www.wreckedgames.com) + +This software is provided 'as-is', without any express or implied warranty. In no event will +the authors be held liable for any damages arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, including commercial +applications, and to alter it and redistribute it freely, subject to the following +restrictions: + + 1. The origin of this software must not be misrepresented; you must not claim that + you wrote the original software. If you use this software in a product, + an acknowledgment in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source distribution. +*/ +#include <CEGUI/CEGUIImageset.h> +#include <CEGUI/CEGUISystem.h> +#include <CEGUI/CEGUILogger.h> +#include <CEGUI/CEGUISchemeManager.h> +#include <CEGUI/CEGUIWindowManager.h> +#include <CEGUI/CEGUIWindow.h> +#include <CEGUI/elements/CEGUIMultiColumnList.h> +#include <CEGUI/elements/CEGUIListboxTextItem.h> + +#include "OgreSceneManager.h" +#include "OgreCamera.h" +#include "OgreRoot.h" + +#include "ActionConfig.h" +#include "OISMouse.h" +#include "OISKeyboard.h" +#include "OISJoyStick.h" + +//Some Simple Configurable Action IDs +const int A_JUMP = 1; //All +const int A_FIRE = 2; //All +const int A_MOVE = 3; //Only used for mouse and joy Move +const int A_MOVE_FORWARD = 4; //Keyboard only setting +const int A_MOVE_BACKWARD = 5; //Keyboard only setting +const int A_MOVE_LEFT = 6; //Keyboard only setting +const int A_MOVE_RIGHT = 7; //Keyboard only setting +const int A_LOOK = 8; //Only used for mouse and joy move +const int A_LOOK_UP = 9; //Keyboard only setting +const int A_LOOK_DOWN = 10; //Keyboard only setting +const int A_LOOK_LEFT = 11; //Keyboard only setting +const int A_LOOK_RIGHT = 12; //Keyboard only setting +const int A_CENTER_VIEW = 13; //All + +const int A_TEST_DONE = 14; //Action that happens when Escape Pushed + + +//--------------------------------------------------------------------------------// +ActionConfig::ActionConfig( OIS::Mouse *mouse, OIS::Keyboard *key, OIS::JoyStick *joy, + Ogre::SceneManager* scnMgr ) : + mMouse(mouse), mKey(key), mJoy(joy), mSceneMgr(scnMgr) +{ + //Create an ActionMap instance + actionMap = new OIS::ActionMap(mKey, mMouse, mJoy); + + using namespace CEGUI; + WindowManager& wmgr = WindowManager::getSingleton(); + + oldKeyListener = mKey->getEventCallback(); + oldMouseListener = mMouse->getEventCallback(); + + //One time MultiList Setup + MultiColumnList *listBox; + + //Keyboard list + listBox = (MultiColumnList*)wmgr.getWindow((utf8*)"Keyboard"); + listBox->setSelectionMode(MultiColumnList::RowSingle); + listBox->addColumn("Action", 0, 0.5f); + listBox->addColumn("Trigger", 1, 0.5f); + listBox->subscribeEvent(MultiColumnList::EventSelectionChanged, + Event::Subscriber(&ActionConfig::handleKeyboardSetup, this)); + //Mouse list + listBox = (MultiColumnList*)wmgr.getWindow((utf8*)"Mouse"); + listBox->setSelectionMode(MultiColumnList::RowSingle); + listBox->addColumn("Action", 0, 0.5f); + listBox->addColumn("Trigger", 1, 0.5f); + listBox->subscribeEvent(MultiColumnList::EventSelectionChanged, + Event::Subscriber(&ActionConfig::handleMouseSetup, this)); + //Joystick list + listBox = (MultiColumnList*)wmgr.getWindow((utf8*)"Joystick"); + listBox->setSelectionMode(MultiColumnList::RowSingle); + listBox->addColumn("Action", 0, 0.5f); + listBox->addColumn("Trigger", 1, 0.5f); + listBox->subscribeEvent(MultiColumnList::EventSelectionChanged, + Event::Subscriber(&ActionConfig::handleJoystickSetup, this)); + + //Create some functors for registering with ActionMap + fireBind = new OIS::ActionBind(&ActionConfig::handleFire,this); + jumpBind = new OIS::ActionBind(&ActionConfig::handleJump,this); + moveBind = new OIS::ActionBind(&ActionConfig::handleMove,this); + lookBind = new OIS::ActionBind(&ActionConfig::handleLook,this); + doneBind = new OIS::ActionBind(&ActionConfig::handleDone,this); + + //Reset everything + createScene(); + reset(); +} + +//--------------------------------------------------------------------------------// +ActionConfig::~ActionConfig() +{ + delete fireBind; + delete jumpBind; + delete moveBind; + delete lookBind; + delete doneBind; + + delete actionMap; +} + +//--------------------------------------------------------------------------------// +void ActionConfig::createScene() +{ + //Situate Camera, place guy, etc etc +} + +//--------------------------------------------------------------------------------// +void ActionConfig::reset() +{ + using namespace OIS; + + keyEvents.clear(); + mouseEvents.clear(); + joyEvents.clear(); + + currentAction = ""; + + //This should be saved/loaded from a file.. but, we will just set it up in code + + //Jumping + keyEvents.push_back(DemoActionEventInfo(A_JUMP,KC_SPACE,OIS_Button,jumpBind,"Jump")); + mouseEvents.push_back(DemoActionEventInfo(A_JUMP,MB_Right,OIS_Button,jumpBind,"Jump")); + joyEvents.push_back(DemoActionEventInfo(A_JUMP,1,OIS_Button,jumpBind,"Jump")); + + //Firing + keyEvents.push_back(DemoActionEventInfo(A_FIRE,KC_LCONTROL,OIS_Button,fireBind,"Fire")); + mouseEvents.push_back(DemoActionEventInfo(A_FIRE,MB_Left,OIS_Button,fireBind,"Fire")); + joyEvents.push_back(DemoActionEventInfo(A_FIRE,0,OIS_Button,fireBind,"Fire")); + + //Center View + keyEvents.push_back(DemoActionEventInfo(A_CENTER_VIEW,KC_INSERT,OIS_Button,lookBind,"Center View")); + mouseEvents.push_back(DemoActionEventInfo(A_CENTER_VIEW,MB_Middle,OIS_Button,lookBind,"Center View")); + joyEvents.push_back(DemoActionEventInfo(A_CENTER_VIEW,2,OIS_Button,lookBind,"Center View")); + + //Move - joyStick & Mouse Only + mouseEvents.push_back(DemoActionEventInfo(A_MOVE,-1,OIS_Axis,moveBind,"Move")); + joyEvents.push_back(DemoActionEventInfo(A_MOVE,0,OIS_Axis,moveBind,"Move")); + + //Look - joyStick & Mouse Only + mouseEvents.push_back(DemoActionEventInfo(A_LOOK,0,OIS_Axis,lookBind,"Look")); + joyEvents.push_back(DemoActionEventInfo(A_LOOK,1,OIS_Axis,lookBind,"Look")); + + //Keyboard only movement actions + keyEvents.push_back(DemoActionEventInfo(A_MOVE_FORWARD,KC_W,OIS_Button,moveBind,"Move Forward")); + keyEvents.push_back(DemoActionEventInfo(A_MOVE_BACKWARD,KC_S,OIS_Button,moveBind,"Move Backward")); + keyEvents.push_back(DemoActionEventInfo(A_MOVE_LEFT,KC_A,OIS_Button,moveBind,"Move Left")); + keyEvents.push_back(DemoActionEventInfo(A_MOVE_RIGHT,KC_D,OIS_Button,moveBind,"Move Right")); + + //Keyboard only looking actions + keyEvents.push_back(DemoActionEventInfo(A_LOOK_UP,KC_UP,OIS_Button,lookBind,"Look Up")); + keyEvents.push_back(DemoActionEventInfo(A_LOOK_DOWN,KC_DOWN,OIS_Button,lookBind,"Look Down")); + keyEvents.push_back(DemoActionEventInfo(A_LOOK_LEFT,KC_LEFT,OIS_Button,lookBind,"Look Left")); + keyEvents.push_back(DemoActionEventInfo(A_LOOK_RIGHT,KC_RIGHT,OIS_Button,lookBind,"Look Right")); + + //Setup CEGUI stuff + fillList(); +} + +//--------------------------------------------------------------------------------// +void ActionConfig::fillList() +{ + using namespace CEGUI; + WindowManager& wmgr = WindowManager::getSingleton(); + + //--------- KEYBOARD ACTION LIST --------------// + MultiColumnList *listBox = (MultiColumnList*)wmgr.getWindow((utf8*)"Keyboard"); + listBox->resetList(); + + std::vector<DemoActionEventInfo>::iterator i = keyEvents.begin(), e = keyEvents.end(); + ListboxTextItem* item = 0; + + for( ; i != e; ++i ) + { + int row = listBox->addRow(); + //Action ID Name + item = new ListboxTextItem( i->name.c_str(), 0); + item->setTextColours(ColourRect(colour(.5, 0, .3))); + listBox->setItem(item, MCLGridRef( row, 0 )); + + //Mapped Column + if( i->trigger != -1 ) + i->li = new ListboxTextItem(mKey->getAsString((OIS::KeyCode)i->trigger), 0); + else + i->li = new ListboxTextItem(" ", 0); + i->li->setTextColours(ColourRect(colour(.5, 0, .3))); + listBox->setItem(i->li, MCLGridRef( row, 1 )); + } + + //--------- MOUSE ACTION LIST --------------// + listBox = (MultiColumnList*)wmgr.getWindow((utf8*)"Mouse"); + listBox->resetList(); + + i = mouseEvents.begin(); e = mouseEvents.end(); + for( ; i != e; ++i ) + { + int row = listBox->addRow(); + //Action ID Name + item = new ListboxTextItem( i->name.c_str(), 0); + item->setTextColours(ColourRect(colour(.5, 0, .3))); + listBox->setItem(item, MCLGridRef( row, 0 )); + + //Command Column + i->li = new ListboxTextItem(getAxisButtonName(i->cType, i->trigger), 0); + i->li->setTextColours(ColourRect(colour(.5, 0, .3))); + listBox->setItem(i->li, MCLGridRef( row, 1 )); + } + + //--------- JOYSTICK ACTION LIST --------------// + listBox = (MultiColumnList *)wmgr.getWindow((utf8*)"Joystick"); + listBox->resetList(); //Clear any old values + + i = joyEvents.begin(); e = joyEvents.end(); + for( ; i != e; ++i ) + { + int row = listBox->addRow(); + //Action ID Name + item = new ListboxTextItem( i->name.c_str(), 0); + item->setTextColours(ColourRect(colour(.5, 0, .3))); + listBox->setItem(item, MCLGridRef( row, 0 )); + + //Command Column + i->li = new ListboxTextItem(getAxisButtonName(i->cType, i->trigger), 0); + i->li->setTextColours(ColourRect(colour(.5, 0, .3))); + listBox->setItem(i->li, MCLGridRef( row, 1 )); + } + + //Hide for controls that do not exist + if( !mKey ) wmgr.getWindow((utf8*)"Keyboard")->setVisible(false); + if( !mMouse ) wmgr.getWindow((utf8*)"Mouse")->setVisible(false); + if( !mJoy ) wmgr.getWindow((utf8*)"Joystick")->setVisible(false); +} + +//----------------------------------------------------------------// +bool ActionConfig::handleKeyboardSetup(const CEGUI::EventArgs& e) +{ + + using namespace CEGUI; + + MultiColumnList *listBox = (MultiColumnList*)WindowManager::getSingleton().getWindow((utf8*)"Keyboard"); + ListboxItem* item = listBox->getFirstSelectedItem(); + if( !item ) return false; + + //Disable main window.. Start handling Key Events.. Display window prompt + WindowManager::getSingleton().getWindow((utf8*)"Main")->setEnabled(false); + mKey->setEventCallback(this); + WindowManager::getSingleton().getWindow((utf8*)"ActionPrompt")->setVisible(true); + + std::ostringstream ss; + ss << "Push key for for \""; + //CEGUI::String op << is unresolved ??? oh well, this works for now + ss << "Push key for for \"" << item->getText().c_str() << "\" Action..." + << "\n\n Push ESCAPE to cancel"; + + WindowManager::getSingleton().getWindow((utf8*)"ActionPromptLable")->setText(ss.str()); + + currentAction = item->getText().c_str(); + + //Then, in our KeyListener.. the next keyevent we have, we assign that as the + //input. Close the window prompt. And update the MultiColumnList + return true; +} + +//----------------------------------------------------------------// +bool ActionConfig::handleMouseSetup(const CEGUI::EventArgs& e) +{ + using namespace CEGUI; + + MultiColumnList *listBox = (MultiColumnList*)WindowManager::getSingleton().getWindow((utf8*)"Mouse"); + ListboxItem* item = listBox->getFirstSelectedItem(); + if( !item ) return false; + + //Disable main window.. Start handling mouse & key Events.. Display window prompt + WindowManager::getSingleton().getWindow((utf8*)"Main")->setEnabled(false); + mMouse->setEventCallback(this); + WindowManager::getSingleton().getWindow((utf8*)"ActionPrompt")->setVisible(true); + + std::ostringstream ss; + ss << "Click or move mouse for \"" << item->getText().c_str() << "\" Action..."; + WindowManager::getSingleton().getWindow((utf8*)"ActionPromptLable")->setText(ss.str()); + + currentAction = item->getText().c_str(); + + return true; +} + +//----------------------------------------------------------------// +bool ActionConfig::handleJoystickSetup(const CEGUI::EventArgs& e) +{ + using namespace CEGUI; + + MultiColumnList *listBox = (MultiColumnList*)WindowManager::getSingleton().getWindow((utf8*)"Joystick"); + ListboxItem* item = listBox->getFirstSelectedItem(); + if( !item ) return false; + + //Disable main window.. Start handling mouse & key Events.. Display window prompt + WindowManager::getSingleton().getWindow((utf8*)"Main")->setEnabled(false); + mJoy->setEventCallback(this); + WindowManager::getSingleton().getWindow((utf8*)"ActionPrompt")->setVisible(true); + + std::ostringstream ss; + ss << "Click or move joystick for \"" << item->getText().c_str() << "\" Action..."; + WindowManager::getSingleton().getWindow((utf8*)"ActionPromptLable")->setText(ss.str()); + + currentAction = item->getText().c_str(); + + return true; +} + +//--------------------------------------------------------------------------------// +bool ActionConfig::keyPressed(const OIS::KeyEvent& arg) +{ + using namespace CEGUI; + // check for ESCAPE - cancel + if( arg.key != OIS::KC_ESCAPE ) + { + //Store Key press and update listbox + DemoActionEventInfo *act = getAction(keyEvents, currentAction); + if(act) + { + act->trigger = arg.key; + act->li->setText(mKey->getAsString((OIS::KeyCode)arg.key)); + ensureNoDuplicate(keyEvents, act); + } + } + + WindowManager::getSingleton().getWindow((utf8*)"Main")->setEnabled(true); + WindowManager::getSingleton().getWindow((utf8*)"ActionPrompt")->setVisible(false); + + //Set back old listener + mKey->setEventCallback(oldKeyListener); + + //We return false, because we care not for any more events + return false; +} + +//--------------------------------------------------------------------------------// +bool ActionConfig::mouseMoved(const OIS::MouseEvent& arg) +{ + using namespace CEGUI; + //Store Mouse Axis and update listbox + DemoActionEventInfo *act = getAction( mouseEvents, currentAction ); + if( act ) + { + act->cType = OIS::OIS_Axis; + if( arg.state.relZ != 0 ) + act->trigger = 1; //This is the mouse wheel + else + act->trigger = 0; //Normal XY mouse axis + + act->li->setText(getAxisButtonName(act->cType, act->trigger)); + ensureNoDuplicate(mouseEvents, act); + } + + WindowManager::getSingleton().getWindow((utf8*)"Main")->setEnabled(true); + WindowManager::getSingleton().getWindow((utf8*)"ActionPrompt")->setVisible(false); + + //Set back old listener + mMouse->setEventCallback(oldMouseListener); + + //We return false, because we care not for any more events + return false; +} + +//--------------------------------------------------------------------------------// +bool ActionConfig::mousePressed(const OIS::MouseEvent& arg, OIS::MouseButtonID id) +{ + using namespace CEGUI; + //Store Mouse Button and update listbox + DemoActionEventInfo *act = getAction( mouseEvents, currentAction ); + if( act ) + { + act->trigger = id; + act->cType = OIS::OIS_Button; + act->li->setText(getAxisButtonName(act->cType, act->trigger)); + ensureNoDuplicate(mouseEvents, act); + } + + WindowManager::getSingleton().getWindow((utf8*)"Main")->setEnabled(true); + WindowManager::getSingleton().getWindow((utf8*)"ActionPrompt")->setVisible(false); + + //Set back old listener + mMouse->setEventCallback(oldMouseListener); + + //We return false, because we care not for any more events + return false; +} + +//--------------------------------------------------------------------------------// +bool ActionConfig::buttonPressed(const OIS::JoyStickEvent &arg, int button) +{ + using namespace CEGUI; + //Store Mouse Button and update listbox + DemoActionEventInfo *act = getAction( joyEvents, currentAction ); + if( act ) + { + act->trigger = button; + act->cType = OIS::OIS_Button; + act->li->setText(getAxisButtonName(act->cType, act->trigger)); + ensureNoDuplicate(joyEvents, act); + } + + WindowManager::getSingleton().getWindow((utf8*)"Main")->setEnabled(true); + WindowManager::getSingleton().getWindow((utf8*)"ActionPrompt")->setVisible(false); + + //We return false, because we care not for any more events + return false; +} + +//--------------------------------------------------------------------------------// +bool ActionConfig::axisMoved(const OIS::JoyStickEvent &arg, int axis) +{ + using namespace CEGUI; + + DemoActionEventInfo *act = getAction( joyEvents, currentAction ); + if( act ) + { + act->cType = OIS::OIS_Axis; + act->trigger = axis; + act->li->setText(getAxisButtonName(act->cType, act->trigger)); + ensureNoDuplicate(joyEvents, act); + } + + WindowManager::getSingleton().getWindow((utf8*)"Main")->setEnabled(true); + WindowManager::getSingleton().getWindow((utf8*)"ActionPrompt")->setVisible(false); + + //We return false, because we care not for any more events + return false; +} + +//--------------------------------------------------------------------------------// +bool ActionConfig::povMoved(const OIS::JoyStickEvent &arg, int pov) +{ + using namespace CEGUI; + //Store Mouse Button and update listbox + DemoActionEventInfo *act = getAction( joyEvents, currentAction ); + if( act ) + { + act->cType = OIS::OIS_POV; + act->trigger = pov; + act->li->setText(getAxisButtonName(act->cType, act->trigger)); + ensureNoDuplicate(joyEvents, act); + } + + WindowManager::getSingleton().getWindow((utf8*)"Main")->setEnabled(true); + WindowManager::getSingleton().getWindow((utf8*)"ActionPrompt")->setVisible(false); + + //We return false, because we care not for any more events + return false; +} + +//--------------------------------------------------------------------------------// +DemoActionEventInfo* ActionConfig::getAction( std::vector<DemoActionEventInfo>& list, std::string name ) +{ + std::vector<DemoActionEventInfo>::iterator i = list.begin(), e = list.end(); + for(; i != e; ++i) + if( i->name == name ) return &(*i); + return 0; +} + +//--------------------------------------------------------------------------------// +void ActionConfig::ensureNoDuplicate( std::vector<DemoActionEventInfo>& list, DemoActionEventInfo* act ) +{ + std::vector<DemoActionEventInfo>::iterator i = list.begin(), e = list.end(); + for(; i != e; ++i) + { + if( i->trigger == act->trigger && + i->cType == act->cType && + i->name != act->name ) + { + //Opps.. one dup existed.. clear it + i->trigger = -1; + i->li->setText(""); + } + } +} + +//--------------------------------------------------------------------------------// +std::string ActionConfig::getAxisButtonName( OIS::ComponentType type, int trigger ) +{ + std::ostringstream ss; + + if( trigger != -1 ) + { + if( type == OIS::OIS_Button ) + ss << "Button "; + else if( type == OIS::OIS_Axis ) + ss << "Axis "; + else if( type == OIS::OIS_POV ) + ss << "POV "; + ss << trigger; + return ss.str(); + } + + return " "; +} + +//--------------------------------------------------------------------------------// +void ActionConfig::startTest() +{ + actionMap->reset(); + + //Configure the action map for each device + std::vector<DemoActionEventInfo>::iterator i = keyEvents.begin(), e = keyEvents.end(); + for( ; i != e; ++i ) + actionMap->addKeyboardAction( i->id, i->trigger, i->bound ); + + i = mouseEvents.begin(); e = mouseEvents.end(); + for( ; i != e; ++i ) + actionMap->addMouseAction( i->id, i->trigger, i->cType, i->bound ); + + i = joyEvents.begin(); e = joyEvents.end(); + for( ; i != e; ++i ) + actionMap->addJoyStickAction( i->id, i->trigger, i->cType, i->bound); + + //Setup a Key Event for exiting test - Escape Key + actionMap->addKeyboardAction( A_TEST_DONE, OIS::KC_ESCAPE, doneBind ); + + //Enable it.. this disables any registered buffered callbacks + actionMap->setEnabled(true); + + //Hide CEGUI Window + CEGUI::WindowManager::getSingleton().getWindow((CEGUI::utf8*)"Main")->setVisible(false); + CEGUI::System::getSingleton().setDefaultMouseCursor(0); + + Ogre::Root::getSingleton().addFrameListener(this); + + mMoveScale = 1.0f; + mRotXScale = 0.0f; + mRotYScale = 0.0f; +} + +//--------------------------------------------------------------------------------// +bool ActionConfig::frameStarted(const Ogre::FrameEvent& evt) +{ + Ogre::Camera *cam = mSceneMgr->getCamera("PlayerCam"); + + // Move about 100 units per second, + mMoveScale = 100 * evt.timeSinceLastFrame; + + cam->yaw(Ogre::Degree(mRotXScale)); + cam->pitch(Ogre::Degree(mRotYScale)); + cam->moveRelative(mTranslateVector); + return true; +} + +//--------------------------------------------------------------------------------// +void ActionConfig::handleJump( const OIS::ActionMapArg& arg ) +{ + //Don't really care if axis or not. we only want to do this on keydown & not on keyup + //if( arg.flags & OIS::OIS::ActionMapArg::AM_Button ) + //{ + // if( arg.flags & OIS::OIS::ActionMapArg::AM_ButtonDown ) + // do fire + // return; + //} + + //do Fire +} + +//--------------------------------------------------------------------------------// +void ActionConfig::handleFire( const OIS::ActionMapArg& arg ) +{ + //Don't really care if axis or not.. but, we only want to do this once + //if( arg.flags & OIS::OIS::ActionMapArg::AM_Button ) + //{ + // if( arg.flags & OIS::ActionMapArg::AM_ButtonDown ) + // do fire + // return; + //} + + //do Fire +} + +//--------------------------------------------------------------------------------// +void ActionConfig::handleMove( const OIS::ActionMapArg& arg ) +{ + switch( arg.ActionID ) + { + //Axis Event + case A_MOVE: + { + //User set button as move event - just ignore + if( arg.component->cType == OIS::OIS_Button ) + { + break; + } + else if( arg.component->cType == OIS::OIS_Axis ) + { + const OIS::Axis* axis = static_cast<const OIS::Axis*>(arg.component); + if( axis->absOnly == false ) + { + //Not an absolute only axis + mSceneMgr->getCamera("PlayerCam")->moveRelative( + Ogre::Vector3( axis->relX * 0.13f, //Move left/right + axis->relZ * 0.1f, //Up/Down + axis->relY * 0.13f ) ); //F/B + } + else + { + //Is an absolute only axis + //Up/Down + mTranslateVector.y = mMoveScale * axis->abZ/(float)OIS::JoyStick::MAX_AXIS; + //Move left/right + mTranslateVector.x = mMoveScale * axis->abX/(float)OIS::JoyStick::MAX_AXIS; + //Move forward/back + mTranslateVector.z = -mMoveScale * axis->abY/(float)OIS::JoyStick::MAX_AXIS; + } + } + else if( arg.component->cType == OIS::OIS_POV ) + { + using namespace OIS; + const Pov* pov = static_cast<const Pov*>(arg.component); + + if( pov->direction & Pov::North ) //Going up + mTranslateVector.z = -mMoveScale; + else if( pov->direction & Pov::South ) //Going down + mTranslateVector.z = mMoveScale; + + if( pov->direction & Pov::East ) //Going right + mTranslateVector.x = mMoveScale; + else if( pov->direction & Pov::West ) //Going left + mTranslateVector.x = -mMoveScale; + + if( pov->direction == Pov::Centered ) //stopped/centered out + mTranslateVector.x = mTranslateVector.z = 0; + } + break; + } + //Moves forward - Key event only + case A_MOVE_FORWARD: + if( arg.component->cType == OIS::OIS_Button ) + { + if( static_cast<const OIS::Button*>(arg.component)->pushed ) + mTranslateVector.z = -mMoveScale; + else + mTranslateVector.z = 0; + } + break; + //Moves Backwards - Key event only + case A_MOVE_BACKWARD: + if( arg.component->cType == OIS::OIS_Button ) + { + if( static_cast<const OIS::Button*>(arg.component)->pushed ) + mTranslateVector.z = mMoveScale; + else + mTranslateVector.z = 0; + } + break; + //Strafe Left - Key event only + case A_MOVE_LEFT: + if( arg.component->cType == OIS::OIS_Button ) + { + if( static_cast<const OIS::Button*>(arg.component)->pushed ) + mTranslateVector.x = -mMoveScale; + else + mTranslateVector.x = 0; + } + break; + //Strafe Right - Key event only + case A_MOVE_RIGHT: + if( arg.component->cType == OIS::OIS_Button ) + { + if( static_cast<const OIS::Button*>(arg.component)->pushed ) + mTranslateVector.x = mMoveScale; + else + mTranslateVector.x = 0; + } + break; + default: + break; + } +} + +//--------------------------------------------------------------------------------// +void ActionConfig::handleLook( const OIS::ActionMapArg& arg ) +{ + //Look - handles the camera looking.. Could just as well control + //the players view instead + switch( arg.ActionID ) + { + //Axis Event - hopefully + case A_LOOK: + { + //User set button as look axis - just ignore + if( arg.component->cType == OIS::OIS_Button ) + { + break; + } + else if( arg.component->cType == OIS::OIS_Axis ) + { + const OIS::Axis* axis = static_cast<const OIS::Axis*>(arg.component); + if( axis->absOnly == false ) + { + //Move using relative Axis + Ogre::Camera *cam = mSceneMgr->getCamera("PlayerCam"); + + cam->yaw(Ogre::Radian(Ogre::Degree(-axis->relX * 0.13f))); + cam->pitch(Ogre::Radian(Ogre::Degree(-axis->relY * 0.13f))); + } + else + { + //absolute only axis + mRotXScale = -axis->abX/OIS::JoyStick::MAX_AXIS * 0.05; + mRotYScale = -axis->abY/OIS::JoyStick::MAX_AXIS * 0.01; + } + } + break; + } + //Tilt View Up - Key Event only + case A_LOOK_UP: + break; + //Tilt view Down - Key Event only + case A_LOOK_DOWN: + break; + //Turn Left - Key Event only + case A_LOOK_LEFT: + break; + //Turn Right - Key Event only + case A_LOOK_RIGHT: + break; + //Centers/levels out - Don't care if button or axes + case A_CENTER_VIEW: + break; + default: break; + } +} + +//--------------------------------------------------------------------------------// +void ActionConfig::handleDone( const OIS::ActionMapArg& arg ) +{ + //ESCAPE Key event - only do once, though, they keyup should never reach us + //anyway + if( static_cast<const OIS::Button*>(arg.component)->pushed ) + { + //Stop the test, and reset listeners + actionMap->setEnabled(false); + + //Restore the old listeners.. which were replaced with the ActionMap + mKey->setEventCallback(oldKeyListener); + mMouse->setEventCallback(oldMouseListener); + + //Show CEGUI Window + CEGUI::WindowManager::getSingleton().getWindow((CEGUI::utf8*)"Main")->setVisible(true); + CEGUI::System::getSingleton().setDefaultMouseCursor((CEGUI::utf8*)"WindowsLook", + (CEGUI::utf8*)"MouseArrow"); + + Ogre::Root::getSingleton().removeFrameListener(this); + } +} Property changes on: src/client/ui/ActionConfig.cpp ___________________________________________________________________ Name: svn:mime-type + text/x-c++src Name: svn:eol-style + native Added: src/client/ui/ActionConfig.h =================================================================== --- src/client/ui/ActionConfig.h (rev 0) +++ src/client/ui/ActionConfig.h 2006-07-30 19:14:10 UTC (rev 127) @@ -0,0 +1,162 @@ +/* +The zlib/libpng License + +Copyright (c) 2005 Phillip Castaneda (pjcast -- www.wreckedgames.com) + +This software is provided 'as-is', without any express or implied warranty. In no event will +the authors be held liable for any damages arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, including commercial +applications, and to alter it and redistribute it freely, subject to the following +restrictions: + + 1. The origin of this software must not be misrepresented; you must not claim that + you wrote the original software. If you use this software in a product, + an acknowledgment in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source distribution. +*/ +#ifndef ActionConfig_Header +#define ActionConfig_Header +#include <CEGUI/CEGUIForwardRefs.h> + +#include "OISPrereqs.h" +#include "OISEvents.h" + +#include "OgrePrerequisites.h" +#include "OgreFrameListener.h" +#include "OgreVector3.h" + +#include "ActionMap.h" + +//Simple utility structure that extends the one from ActionMap.. As we want to store +//some additional info for configuring things +struct DemoActionEventInfo : public OIS::ActionEventInfo +{ + //! Constructor + DemoActionEventInfo(int iID,int iTrigger,OIS::ComponentType type,OIS::ActionBind* pBind,const std::string& sName ) : + ActionEventInfo(iID,iTrigger,type,pBind), name(sName), + li(0) {}; + + //! Friendly text name of the Action + std::string name; + //! The listboxitem that the Mapped Action will be displayed in + CEGUI::ListboxTextItem* li; +}; + +/** + This class is kinda a one stop class right now. This class handles setup, config, + and testing of ActionMap. Ideally, the actionmap should be loaded from a file. But, + for clarity, and less parsing code, it is setup via code. And also, the ActionMap class + could be configured from here, but should be passed back to wherever you want to + implement it at. + + This class inheirits from The three listeners for setting up the ActionMap + action triggers. + + And the framelistener is used for actionmap testing.. for movements +*/ +class ActionConfig : public OIS::KeyListener, public OIS::MouseListener, + public OIS::JoyStickListener, public Ogre::FrameListener +{ +public: + ActionConfig( OIS::Mouse *mouse, OIS::Keyboard *key, OIS::JoyStick *joy, + Ogre::SceneManager* scnMgr ); + ~ActionConfig(); + + //Resets everything back to default - lists, actions, scene + void reset(); + + //Go into test mode + void startTest(); + + //cegui event handlers + bool handleKeyboardSetup(const CEGUI::EventArgs& e); + bool handleMouseSetup(const CEGUI::EventArgs& e); + bool handleJoystickSetup(const CEGUI::EventArgs& e); + + //Example Methods used for recieveing Action Events + void handleJump( const OIS::ActionMapArg& ); + void handleFire( const OIS::ActionMapArg& ); + void handleMove( const OIS::ActionMapArg& ); + void handleLook( const OIS::ActionMapArg& ); //Handle Look and Center Actions + void handleDone( const OIS::ActionMapArg& ); + + //We only listen when we are configuring an action, and restore old listener + bool keyPressed(const OIS::KeyEvent& arg); + bool mouseMoved(const OIS::MouseEvent& arg); + bool mousePressed(const OIS::MouseEvent& arg, OIS::MouseButtonID); + bool buttonPressed(const OIS::JoyStickEvent &arg, int button); + bool axisMoved(const OIS::JoyStickEvent &arg, int axis ); + bool povMoved( const OIS::JoyStickEvent &arg, int pov ); + + //We ignore these + bool keyReleased(const OIS::KeyEvent&) {return false;} + bool mouseReleased(const OIS::MouseEvent&, OIS::MouseButtonID) {return false;} + bool buttonReleased(const OIS::JoyStickEvent &, int) {return false;} + + //Process frame events + bool frameStarted(const Ogre::FrameEvent& evt); + +protected: + //Internal helper methods + void fillList(); + void createScene(); + + //Returns a pointer to an actionevent based on the sent name + DemoActionEventInfo* getAction( std::vector<DemoActionEventInfo>& list, + std::string name ); + + //If an input event exists than remove that one + void ensureNoDuplicate( std::vector<DemoActionEventInfo>& list, + DemoActionEventInfo* act ); + + //Convert params into a string representing a button/axes number or " " + std::string getAxisButtonName( OIS::ComponentType type, int trigger ); + + //Keep a hold of some devices + OIS::Mouse *mMouse; + OIS::Keyboard *mKey; + OIS::JoyStick *mJoy; + + //Keep old listeners stored when we start messing with the current one + OIS::KeyListener* oldKeyListener; + OIS::MouseListener* oldMouseListener; + + //We keep seperate lists for each tyoe of device we want to support.. + //We then assign a default button, or -1 if it will be blank - to allow + //for assignment later, for each action + std::vector<DemoActionEventInfo> keyEvents; + std::vector<DemoActionEventInfo> mouseEvents; + std::vector<DemoActionEventInfo> joyEvents; + + //Use this to ensure that the same joystick type that was used previously, + //is still the one connected here + std::string joyName; + + //Represents the row (Action) that the user clicked.. and is configuring + std::string currentAction; + + //Our ActionMap instance + OIS::ActionMap* actionMap; + + //Functors for registering with ActionMap + OIS::ActionBind* fireBind; + OIS::ActionBind* jumpBind; + OIS::ActionBind* moveBind; + OIS::ActionBind* lookBind; + OIS::ActionBind* doneBind; + + //Ogre Scene Stuff - For testing the controls + Ogre::SceneManager* mSceneMgr; + Ogre::Vector3 mTranslateVector; + float mMoveScale; + float mRotXScale; + float mRotYScale; +}; + +#endif Property changes on: src/client/ui/ActionConfig.h ___________________________________________________________________ Name: svn:mime-type + text/x-c++hdr Name: svn:eol-style + native Added: src/client/ui/ActionMap.cpp =================================================================== --- src/client/ui/ActionMap.cpp (rev 0) +++ src/client/ui/ActionMap.cpp 2006-07-30 19:14:10 UTC (rev 127) @@ -0,0 +1,200 @@ +#include "ActionMap.h" +#include "OISMouse.h" +#include "OISKeyboard.h" +#include "OISJoyStick.h" + +using namespace OIS; + +//---------------------------------------------------------------------------// +ActionMap::~ActionMap() +{ + setEnabled(false); +} + +//---------------------------------------------------------------------------// +void ActionMap::setCallbacks( KeyListener* kl, MouseListener* ml ) +{ + keyCallback = kl; + mouseCallback = ml; +} + +//---------------------------------------------------------------------------// +void ActionMap::setEnabled( bool enabled ) +{ + if( enabled ) + { + if( mKey ) mKey->setEventCallback( this ); + if( mMouse ) mMouse->setEventCallback( this ); + if( mJoy ) mJoy->setEventCallback( this ); + } + else + { + if( mKey ) mKey->setEventCallback(0); + if( mMouse ) mMouse->setEventCallback(0); + if( mJoy ) mJoy->setEventCallback(0); + } +} + +//---------------------------------------------------------------------------// +void ActionMap::reset() +{ + mouseButtonEvents.clear(); + mouseXY.setProperties(-1, -1, OIS_Button, 0); + mouseZ.setProperties(-1, -1, OIS_Button, 0); + + joyButtonEvents.clear(); + joyAxisEvents.clear(); +} + +//---------------------------------------------------------------------------// +void ActionMap::addKeyboardAction(int iID, int iTrigger, ActionBind *pBind) +{ + keyEvents[iTrigger] = ActionEventInfo(iID, iTrigger, OIS_Button, pBind); +} + +//---------------------------------------------------------------------------// +void ActionMap::addMouseAction(int iID, int iTrigger, ComponentType type, ActionBind *pBind) +{ + if( type == OIS_Axis ) + { + if( iTrigger == 0 ) //XY Axis + mouseXY.setProperties( iID, iTrigger, type, pBind ); + else //Z Axis + mouseZ.setProperties( iID, iTrigger, type, pBind ); + } + else + mouseButtonEvents[iTrigger] = ActionEventInfo(iID, iTrigger, type, pBind); +} + +//---------------------------------------------------------------------------// +void ActionMap::addJoyStickAction(int iID, int iTrigger, ComponentType type, ActionBind *pBind) +{ + if( type == OIS_Button ) + joyButtonEvents[iTrigger] = ActionEventInfo(iID, iTrigger, type, pBind); + else if( type == OIS_Axis ) + joyAxisEvents[iTrigger] = ActionEventInfo(iID, iTrigger, type, pBind); + else if( type == OIS_POV ) + joyPovEvents[iTrigger] = ActionEventInfo(iID, iTrigger, type, pBind); +} + +//---------------------------------------------------------------------------// +bool ActionMap::keyPressed(const KeyEvent& arg) +{ + ActionList::iterator i = keyEvents.find(arg.key); + if( i != keyEvents.end() ) + i->second.bound->callMethod( ActionMapArg(i->second.id,&Button(true)) ); + + if( keyCallback ) + return keyCallback->keyPressed(arg); + else + return true; +} + +//---------------------------------------------------------------------------// +bool ActionMap::keyReleased(const KeyEvent& arg) +{ + ActionList::iterator i = keyEvents.find(arg.key); + if( i != keyEvents.end() ) + i->second.bound->callMethod(ActionMapArg(i->second.id,&Button(false))); + + if( keyCallback ) + return keyCallback->keyReleased(arg); + else + return true; +} + +//---------------------------------------------------------------------------// +bool ActionMap::mouseMoved(const MouseEvent& arg) +{ + if( arg.state.relZ == 0 ) //XY Axis + { + if( mouseXY.trigger != -1 ) + { + Axis axis(arg.state); + axis.abZ = axis.relZ = 0; //Zero out Z axis, as that is seperate + mouseXY.bound->callMethod(ActionMapArg(mouseXY.id,&axis)); + } + } + else //Z Axis + { + if( mouseZ.trigger != -1 ) + { + Axis axis; + axis.abZ = arg.state.abZ; + axis.relZ = arg.state.relZ; + mouseZ.bound->callMethod(ActionMapArg(mouseZ.id,&axis)); + } + } + + if( mouseCallback ) + return mouseCallback->mouseMoved(arg); + else + return true; +} + +//---------------------------------------------------------------------------// +bool ActionMap::mousePressed(const MouseEvent& arg, MouseButtonID button) +{ + ActionList::iterator i = mouseButtonEvents.find(button); + if( i != mouseButtonEvents.end() ) + i->second.bound->callMethod(ActionMapArg(i->second.id,&Button(true))); + + if( mouseCallback ) + return mouseCallback->mousePressed(arg, button); + else + return true; +} + +//---------------------------------------------------------------------------// +bool ActionMap::mouseReleased(const MouseEvent& arg, MouseButtonID button) +{ + ActionList::iterator i = mouseButtonEvents.find(button); + if( i != mouseButtonEvents.end() ) + i->second.bound->callMethod(ActionMapArg(i->second.id,&Button(false))); + + if( mouseCallback ) + return mouseCallback->mouseReleased(arg, button); + else + return true; +} + +//---------------------------------------------------------------------------// +bool ActionMap::axisMoved(const JoyStickEvent &arg, int axis) +{ + ActionList::iterator i = joyAxisEvents.find(axis); + if( i != joyAxisEvents.end() ) + i->second.bound->callMethod(ActionMapArg(i->second.id, + &arg.state.mAxes[axis])); + + return true; +} + +//---------------------------------------------------------------------------// +bool ActionMap::povMoved(const JoyStickEvent &arg, int pov) +{ + ActionList::iterator i = joyPovEvents.find(pov); + if( i != joyPovEvents.end() ) + i->second.bound->callMethod(ActionMapArg(i->second.id,&Pov(arg.state.mPOV[pov]))); + + return true; +} + +//---------------------------------------------------------------------------// +bool ActionMap::buttonPressed(const JoyStickEvent &arg, int button) +{ + ActionList::iterator i = joyButtonEvents.find(button); + if( i != joyButtonEvents.end() ) + i->second.bound->callMethod(ActionMapArg(i->second.id,&Button(true))); + + return true; +} + +//---------------------------------------------------------------------------// +bool ActionMap::buttonReleased(const JoyStickEvent& arg, int button) +{ + ActionList::iterator i = joyButtonEvents.find(button); + if( i != joyButtonEvents.end() ) + i->second.bound->callMethod(ActionMapArg(i->second.id,&Button(false))); + + return true; +} Property changes on: src/client/ui/ActionMap.cpp ___________________________________________________________________ Name: svn:mime-type + text/x-c++src Name: svn:eol-style + native Added: src/client/ui/ActionMap.h =================================================================== --- src/client/ui/ActionMap.h (rev 0) +++ src/client/ui/ActionMap.h 2006-07-30 19:14:10 UTC (rev 127) @@ -0,0 +1,281 @@ +/* +The zlib/libpng License + +Copyright (c) 2005 Phillip Castaneda (pjcast -- www.wreckedgames.com) + +This software is provided 'as-is', without any express or implied warranty. In no event will +the authors be held liable for any damages arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, including commercial +applications, and to alter it and redistribute it freely, subject to the following +restrictions: + + 1. The origin of this software must not be misrepresented; you must not claim that + you wrote the original software. If you use this software in a product, + an acknowledgment in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source distribution. +*/ +#ifndef _OIS_ACTIONMAPHEADERS_ +#define _OIS_ACTIONMAPHEADERS_ +#include "OISPrereqs.h" +#include "OISJoyStick.h" +#include "OISMouse.h" +#include "OISKeyboard.h" + +namespace OIS +{ + //*********** Base binding class ***************** + template <typename returnT, typename args> + class IBind + { + public: + virtual returnT operator()(args) const = 0; + virtual ~IBind() {} + }; + + //******** Implement of binding for member funtions + template <class T, typename returnT, typename Args> + class memberBind : public IBind<returnT, Args> + { + public: + typedef returnT(T::*F)(Args); + memberBind(F function, T* object) : + mFunction(function), mObject(object) {} + + virtual returnT operator()(Args args) const {return (mObject->*mFunction)(args);} + protected: + F mFunction; + T* mObject; + }; + + //***** Generic Binder (WIP) ************** + template <typename returnT, typename Args> + class Binder + { + Binder() : mObject(0) {} + public: + ~Binder() { delete mObject; } + + //Member Binding + template <class T> + Binder(returnT (T::*function)(Args), T* object) { + mObject = new memberBind<T, returnT, Args>(function, object); + } + //Todo regular function binding + + returnT callMethod(Args args) const { return (*mObject)(args); } + + protected: + IBind<returnT, Args>* mObject; + }; + + /** + Class used as parameter for handing out ActionMap Events + */ + class ActionMapArg + { + public: + ActionMapArg(int id, const Component* comp) : + ActionID(id), component(comp) {}; + + //! The ActionID + int ActionID; + + //! The component (button, Axis, POV, etc) + const Component* component; + }; + + //! function pointer that returns void and takes 'const ActionMapArg&' param + typedef Binder<void, const ActionMapArg&> ActionBind; + + /** + Utility structure used for storing event info + */ + struct ActionEventInfo + { + //! Default constructor + ActionEventInfo() : id(0), trigger(-1), cType(OIS_Button), bound(0) {}; + + /** + @remarks + Constructor + @param iID + ActionID + @param iTrigger + Trigger - KeyCode, Axis num, etc + @param bButton + True - button; false - other (axis) + @param pBind + Function pointer + */ + ActionEventInfo( int iID, int iTrigger, ComponentType type, ActionBind* pBind ) : + id(iID), trigger(iTrigger), cType(type), bound(pBind) {}; + + //! Utility method for setting up members + void setProperties( int iID, int iTrigger, ComponentType type, ActionBind* pBind ) + { + id = iID; + trigger = iTrigger; + cType = type; + bound = pBind; + } + + //! Action ID Numbercd + int id; + //! KeyCode/Axis number/Button number/etc + int trigger; + //! Type of component + ComponentType cType; + //! A function pointer for event callback + ActionBind* bound; + }; + + /** + Utility class for dispatching events based on Actions. + @Note Buttons get two events for pushed/released. + @See ActionMapArg for info on whether or not the button is pushed or not + */ + class ActionMap : public KeyListener, public MouseListener, public JoyStickListener + { + ActionMap() {}; + public: + /** + @remarks + Constructs ActionMap class + @param kb + Pointer to a keyboard device for events. Or null for no key device + @param mouse + Pointer to a mouse device for events. Or null for no mouse device + @param joy + Pointer to a joystick device for events. Or null for no joy device + */ + ActionMap( Keyboard* kb, Mouse* mouse, JoyStick* joy ) : + mKey(kb), mMouse(mouse), mJoy(joy), + keyCallback(0), mouseCallback(0) {}; + + virtual ~ActionMap(); + + /** + @remarks + If you want key and/or mouse events to also 'pass' through back to + your listener, pass in your listeners here + @param kl + KeyListener + @param ml + MouseListener + */ + void setCallbacks( KeyListener* kl, MouseListener* ml ); + + /** + @remarks + If you want key and/or mouse events to also 'pass' through back to + your listener, pass in your listeners here. Setting this true + will replace your listeners (of the valid devices you passed in earlier). + If you want to continue getting your own events too, refer to setCallbacks + @param enabled + true - start recieving/passing events. False - stop + */ + void setEnabled( bool enabled ); + + /** + @remarks + Clears out all event lists + */ + void reset(); + + /** + @remarks + Add an event for keyboard device + @param iID + ActionID number you want to pass through + @param iTrigger + The actual trigger value (KeyCode, Button number, Axis number). Must be unique for each button/axis of the same device (i.e. cannot register + two events for key '2'). + @param pBind + A valid function pointer used to call for event + */ + void addKeyboardAction(int iID, int iTrigger, ActionBind *pBind); + + /** + @remarks + Add an event for mouse device + @param iID + ActionID number you want to pass through + @param iTrigger + The actual trigger value (KeyCode, Button number, Axis number). Must be unique for each button/axis of the same device (i.e. cannot register + two events for button '0' left mouse). + @param type + type of component + @param pBind + A valid function pointer used to call for event + */ + void addMouseAction(int iID, int iTrigger, ComponentType type, ActionBind *pBind); + + /** + @remarks + Add an event for joystick device + @param iID + ActionID number you want to pass through + @param iTrigger + The actual trigger value (KeyCode, Button number, Axis number). Must be unique for each button/axis of the same device (i.e. cannot register + two events for button '0'). + @param type + type of component + @param pBind + A valid function pointer used to call for event + */ + void addJoyStickAction(int iID, int iTrigger, ComponentType type, ActionBind *pBind); + + protected: + //------ Buffered Device events ------------------------ + bool keyPressed(const KeyEvent& arg); + bool keyReleased(const KeyEvent&); + + bool mouseMoved(const MouseEvent& arg); + bool mousePressed(const MouseEvent& arg, MouseButtonID); + bool mouseReleased(const MouseEvent&, MouseButtonID); + + bool axisMoved(const JoyStickEvent &arg, int axis); + bool povMoved(const JoyStickEvent &arg, int pov); + bool buttonPressed(const JoyStickEvent &arg, int button); + bool buttonReleased(const JoyStickEvent&, int); + + //! Typedef for easy iteration int = Trigger number + typedef std::map<int, ActionEventInfo> ActionList; + + //! Keyboard events + ActionList keyEvents; + + //! Mouse button events + ActionList mouseButtonEvents; + //! Mouse XY axes events + ActionEventInfo mouseXY; + //! Mouse Z (wheel) axis events + ActionEventInfo mouseZ; + + //! Joy button events + ActionList joyButtonEvents; + //! Joy axes events + ActionList joyAxisEvents; + //! Joy POV events + ActionList joyPovEvents; + + //! Keyboard device + Keyboard* mKey; + //! Mouse device + Mouse* mMouse; + //! JoyStick device + JoyStick* mJoy; + + //! Keyboard callback pointer used to pass through events + KeyListener* keyCallback; + //! Mouse callback pointer used to pass through events + MouseListener* mouseCallback; + }; +} +#endif Property changes on: src/client/ui/ActionMap.h ___________________________________________________________________ Name: svn:mime-type + text/x-c++hdr Name: svn:eol-style + native Modified: src/client/ui/Makefile.am =================================================================== --- src/client/ui/Makefile.am 2006-07-30 18:46:33 UTC (rev 126) +++ src/client/ui/Makefile.am 2006-07-30 19:14:10 UTC (rev 127) @@ -1,6 +1,6 @@ INCLUDES = $(all_includes) METASOURCES = AUTO noinst_LTLIBRARIES = libopengate-ui.la -libopengate_ui_la_SOURCES = application.cpp camera.cpp framelistener.cpp \ - avatar.cpp -noinst_HEADERS = application.h camera.h framelistener.h avatar.h +libopengate_ui_la_SOURCES = application.cpp framelistener.cpp ActionConfig.cpp \ + ActionMap.cpp +noinst_HEADERS = application.h framelistener.h ActionConfig.h ActionMap.h Modified: src/client/ui/application.cpp =================================================================== --- src/client/ui/application.cpp 2006-07-30 18:46:33 UTC (rev 126) +++ src/client/ui/application.cpp 2006-07-30 19:14:10 UTC (rev 127) @@ -22,40 +22,26 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <OgreNode.h> -#include <OgreEntity.h> -#include <OgreTextureManager.h> -#include <OgreViewport.h> -#include <CEGUI/elements/CEGUIPushButton.h> #include "application.h" -OpengateApp::OpengateApp() : mGUIRenderer(NULL), mGUISystem(NULL), mEditorGuiSheet(NULL){ - mFrameListener = NULL; - mRoot = NULL; +#include <CEGUI/CEGUISystem.h> +#include <CEGUI/CEGUILogger.h> +#include <CEGUI/CEGUISchemeManager.h> +#include <CEGUI/CEGUIWindowManager.h> +#include <CEGUI/CEGUIWindow.h> +#include <CEGUI/elements/CEGUIPushButton.h> + +OpengateApp::OpengateApp() : mGUIRenderer(0), mGUISystem(0), actionConfig(0) { + mFrameListener = 0; + mRoot = 0; } OpengateApp::~OpengateApp() { - if (mGamestate) { - delete mGamestate; - } - if (mEditorGuiSheet) { - CEGUI::WindowManager::getSingleton().destroyWindow(mEditorGuiSheet); - } - if (mGUISystem) { - delete mGUISystem; - } - if (mGUIRenderer) { - delete mGUIRenderer; - } - if (mFrameListener) { - delete mFrameListener; - } - if (mCamera) { - delete mCamera; - } - if (mRoot) { - delete mRoot; - } + delete actionConfig; + delete mGUISystem; + delete mGUIRenderer; + delete mFrameListener; + delete mRoot; } void OpengateApp::go(void) { @@ -70,13 +56,15 @@ bool OpengateApp::setup(void) { mRoot = new Ogre::Root(); - + setupResources(); if (!configure()) return false; chooseSceneManager(); + createCamera(); + createViewports(); // Set default mipmap level (NB some APIs ignore this) Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(5); @@ -85,26 +73,18 @@ createResourceListener(); // Load resources loadResources(); - // Create the scene createScene(); - - mCamera = new Camera(mSceneMgr, mWindow, mAvatarNode, true); - mGamestate = new Gamestate(); - setupEventHandlers(); - createFrameListener(); - setupEventHandlers(); - return true; - } bool OpengateApp::configure(void) { // Show the configuration dialog and initialise the system // You can skip this and use root.restoreConfig() to load configuration // settings if you were sure there are valid ones saved in ogre.cfg - if(mRoot->restoreConfig()) { + //mRoot->showConfigDialog() + if (mRoot->restoreConfig()) { // If returned true, user clicked OK so initialise // Here we choose to let the system create a default rendering window by passing 'true' mWindow = mRoot->initialise(true); @@ -115,52 +95,57 @@ } void OpengateApp::chooseSceneManager(void) { - // Get the SceneManager, in this case a generic one + // Create the SceneManager, in this case a generic one mSceneMgr = mRoot->createSceneManager(Ogre::ST_GENERIC, "ExampleSMInstance"); } -void OpengateApp::createScene() { +void OpengateApp::createScene(void) { // create an ambient light for the scene mSceneMgr->setAmbientLight(Ogre::ColourValue( 1, 1, 1 )); mSceneMgr->setShadowTechnique(Ogre::SHADOWTYPE_STENCIL_ADDITIVE); mSceneMgr->setSkyBox(true, "Examples/SpaceSkyBox"); - // setup GUI system - mGUIRenderer = new CEGUI::OgreCEGUIRenderer(mWindow, Ogre::RENDER_QUEUE_OVERLAY, false, 3000, mSceneMgr); + Ogre::Light* l = mSceneMgr->createLight("MainLight"); + l->setPosition(20,80,50); + + Ogre::Entity* ent = mSceneMgr->createEntity( "Octavius Apteryx", "Ships/Octavius/Apteryx/octavius_apteryx.mesh" ); + mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(ent); + + //--------------- setup GUI system ---------------------// + mGUIRenderer = new CEGUI::OgreCEGUIRenderer(mWindow, Ogre::RENDER_QUEUE_OVERLAY, + false, 3000, mSceneMgr); mGUISystem = new CEGUI::System(mGUIRenderer); - CEGUI::SchemeManager::getSingleton().loadScheme((CEGUI::utf8*)"TaharezLook.scheme"); - mGUISystem->setDefaultMouseCursor((CEGUI::utf8*)"TaharezLook", (CEGUI::utf8*)"MouseArrow"); + CEGUI::Logger::getSingleton().setLoggingLevel(CEGUI::Informative); + CEGUI::SchemeManager::getSingleton().loadScheme((CEGUI::utf8*) + "WindowsLook.scheme"); + mGUISystem->setDefaultMouseCursor((CEGUI::utf8*)"WindowsLook",(CEGUI::utf8*) + "MouseArrow"); + mGUISystem->injectMousePosition(0,0); mGUISystem->setDefaultFont((CEGUI::utf8*)"Tahoma-12"); - mEditorGuiSheet= CEGUI::WindowManager::getSingleton().createWindow((CEGUI::utf8*)"DefaultWindow", (CEGUI::utf8*)"Sheet"); - mGUISystem->setGUISheet(mEditorGuiSheet); CEGUI::Logger::getSingleton().setLoggingLevel(CEGUI::Informative); - CEGUI::PushButton* quitButton = (CEGUI::PushButton*)CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/Button", (CEGUI::utf8*)"Quit"); - mEditorGuiSheet->addChildWindow(quitButton); - quitButton->setPosition(CEGUI::Point(0.35f, 0.45f)); - quitButton->setSize(CEGUI::Size(0.3f, 0.1f)); - quitButton->setText("Quit"); - - // Create an entity - Ogre::Entity* ent = mSceneMgr->createEntity( "Octavius Apteryx", "Ships/Octavius/Apteryx/octavius_apteryx.mesh" ); - mAvatarNode = mSceneMgr->getRootSceneNode()->createChildSceneNode(); - mAvatarNode->attachObject(ent); - mAvatarNode->setPosition(Ogre::Vector3(0,0,30)); - mAvatarNode->rotate(Ogre::Vector3(0.,1.,0.), Ogre::Degree(-90)); - mAvatar = new Avatar(mAvatarNode); - - //ent = mSceneMgr->createEntity( "Quantar Storm", "Ships/Quantar/Storm/quantar_storm.mesh" ); - //Ogre::SceneNode* node2 = mSceneMgr->getRootSceneNode()->createChildSceneNode(); - //node2->attachObject(ent); + CEGUI::Window* sheet = CEGUI::WindowManager::getSingleton().loadWindowLayout + ((CEGUI::utf8*)"ActionMapping.layout"); + mGUISystem->setGUISheet(sheet); + //Register our handlers for the three bottom buttons + setupEventHandlers(); } void OpengateApp::destroyScene(void) { - + } - + void OpengateApp::createFrameListener(void) { - mFrameListener = new OpengateListener(mWindow, mCamera, mAvatar, mGUIRenderer, mGamestate); - mFrameListener->showDebugOverlay(true); + mFrameListener= new OpengateListener(mWindow, mCamera, mGUIRenderer); mRoot->addFrameListener(mFrameListener); + + //Get Mouse & Keyboard, and create joystick if present + OpengateListener* gUI = static_cast<OpengateListener*>(mFrameListener); + OIS::Mouse* mouse = gUI->getMouse(); + OIS::Keyboard* kb = gUI->getKeyboard(); + OIS::JoyStick* joy = gUI->getJoyStick(); + + //Utility class for configuring, & testing ActionMap + actionConfig = new ActionConfig( mouse, kb, joy, mSceneMgr ); } void OpengateApp::setupResources(void) { @@ -187,8 +172,7 @@ } } -void OpengateApp::createResourceListener(void) -{ +void OpengateApp::createResourceListener(void) { } @@ -199,10 +183,50 @@ void OpengateApp::setupEventHandlers(void) { CEGUI::WindowManager& wmgr = CEGUI::WindowManager::getSingleton(); - wmgr.getWindow((CEGUI::utf8*)"Quit")->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&OpengateApp::handleQuit, this)); + wmgr.getWindow((CEGUI::utf8*)"Test")->subscribeEvent( + CEGUI::PushButton::EventClicked, + CEGUI::Event::Subscriber(&OpengateApp::handleTest, this)); + wmgr.getWindow((CEGUI::utf8*)"Reset")->subscribeEvent( + CEGUI::PushButton::EventClicked, + CEGUI::Event::Subscriber(&OpengateApp::handleReset, this)); + wmgr.getWindow((CEGUI::utf8*)"Quit")->subscribeEvent( + CEGUI::PushButton::EventClicked, + CEGUI::Event::Subscriber(&OpengateApp::handleQuit, this)); } +bool OpengateApp::handleTest(const CEGUI::EventArgs& e) { + actionConfig->startTest(); + return true; +} + +bool OpengateApp::handleReset(const CEGUI::EventArgs& e) { + actionConfig->reset(); + return true; +} + bool OpengateApp::handleQuit(const CEGUI::EventArgs& e) { static_cast<OpengateListener*>(mFrameListener)->requestShutdown(); return true; } + +void OpengateApp::createCamera(void) { + // Create the camera + mCamera = mSceneMgr->createCamera("PlayerCam"); + + // Position it at 500 in Z direction + mCamera->setPosition(Ogre::Vector3(0,0,500)); + // Look back along -Z + mCamera->lookAt(Ogre::Vector3(0,0,-300)); + mCamera->setNearClipDistance(5); +} + +void OpengateApp::createViewports(void) { + // Create one viewport, entire window + Ogre::Viewport* vp = mWindow->addViewport(mCamera); + vp->setBackgroundColour(Ogre::ColourValue(0,0,0)); + + // Alter the camera aspect ratio to match the viewport + mCamera->setAspectRatio(Ogre::Real(vp->getActualWidth()) / Ogre::Real(vp->getActualHeight())); +} + + Modified: src/client/ui/application.h =================================================================== --- src/client/ui/application.h 2006-07-30 18:46:33 UTC (rev 126) +++ src/client/ui/application.h 2006-07-30 19:14:10 UTC (rev 127) @@ -22,118 +22,68 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef _APPLICATION_H -#define _APPLICATION_H +#ifndef _OPENGATE_APPLICATION_ +#define _OPENGATE_APPLICATION_ -#include <OgreConfigFile.h> -#include <OgreRoot.h> -#include <OgreCamera.h> -#include <OgreRenderWindow.h> +#include <OGRE/Ogre.h> + +#include "ActionConfig.h" #include "framelistener.h" -#include "avatar.h" -#include "camera.h" -#include "../../common/gamestate.h" #ifdef __cplusplus -extern "C" -{ +extern "C" { #endif -/*! - * - */ class OpengateApp { -public: - /*! \brief This default constructor instantiates an Application - * - * The default constructor is used to instantiates the Application. The - * Application can be considered as the object, that holds references to - * everything within the game. So here you can find the Scene, the Viewport - * to the scene, the camera(s) and the FrameListener. - */ +public: OpengateApp(); - - /*! \brief This destructor closes the application - * - * When this destructor is called, the game is done and will quit. - */ ~OpengateApp(); + void go(void); - /*! \brief The main "loop" of the game - * - * This method is running while the game is running. When this method is - * done, we are completely done. - */ - void go(); - -protected: - +private: CEGUI::OgreCEGUIRenderer* mGUIRenderer; CEGUI::System* mGUISystem; - CEGUI::Window* mEditorGuiSheet; - Gamestate* mGamestate; + ActionConfig *actionConfig; - Avatar* mAvatar; - Ogre::SceneNode* mAvatarNode; + Ogre::Root *mRoot; + Ogre::Camera* mCamera; + Ogre::SceneManager* mSceneMgr; + OpengateListener* mFrameListener; + Ogre::RenderWindow* mWindow; - Ogre::Root* mRoot; - Camera* mCamera; - Ogre::SceneManager* mSceneMgr; + void createScene(void); - OpengateListener* mFrameListener; - Ogre::RenderWindow* mWindow; + void createFrameListener(void); - Ogre::SceneManager* mGuiSceneMgr; + void setupEventHandlers(void); - /** Sets up the application - returns false if the user chooses to abandon configuration. */ - bool setup(void); + bool handleTest(const CEGUI::EventArgs& e); - /** Configures the application - returns false if the user chooses to abandon c... [truncated message content] |
From: <eg...@us...> - 2006-09-01 23:06:08
|
Revision: 150 http://svn.sourceforge.net/opengate/?rev=150&view=rev Author: egore Date: 2006-09-01 16:05:50 -0700 (Fri, 01 Sep 2006) Log Message: ----------- add authentication against meta server from client Modified Paths: -------------- ChangeLog src/client/network.cpp src/client/network.h src/common/Makefile.am src/opengate_client.cpp src/opengate_server.cpp src/server/network.cpp src/server/network.h src/server/network_meta.cpp Added Paths: ----------- src/common/network_protocol.h Modified: ChangeLog =================================================================== --- ChangeLog 2006-08-31 20:16:09 UTC (rev 149) +++ ChangeLog 2006-09-01 23:05:50 UTC (rev 150) @@ -1,5 +1,18 @@ -2006-08-27 Christoph Brill <eg...@us...> +2006-09-02 Christoph Brill <eg...@us...> + * src/server/network.h, src/server/network.cpp: handle + client login and quit request + + * src/common/network_protocol.h: add first codes for client and server + communication + + * src/client/network.h, src/client/network.cpp, + src/opengate_client.cpp: send login to server and quit when client + quits + + +2006-08-30 Christoph Brill <eg...@us...> + * src/server/network_meta.h, src/server/network_meta.cpp: add method to authenticate against the meta-server Modified: src/client/network.cpp =================================================================== --- src/client/network.cpp 2006-08-31 20:16:09 UTC (rev 149) +++ src/client/network.cpp 2006-09-01 23:05:50 UTC (rev 150) @@ -27,8 +27,11 @@ #endif #include "network.h" +#include "../common/network_protocol.h" #include <string.h> +#include <iostream> +#include <sstream> Network::Network() { client = grapple_client_init(PACKAGE_NAME, VERSION); @@ -44,7 +47,19 @@ grapple_client_destroy(client); } -void Network::send() { - char* data = "opengate_test_message"; - grapple_confirmid confirm = grapple_client_send(client, GRAPPLE_SERVER, GRAPPLE_RELIABLE, data, strlen(data)); +void Network::send(std::string data) { + grapple_confirmid confirm = grapple_client_send(client, GRAPPLE_SERVER, GRAPPLE_RELIABLE, (char *)data.c_str(), data.length()); } + +void Network::login(std::string username, std::string password) { + std::ostringstream o; + o << PROTO_LOGIN; + this->send(o.str() + ", " + username + ", " + password); + //TODO: grapple_client_name_set(client, username.c_str()); +} + +void Network::quit() { + std::ostringstream o; + o << PROTO_QUIT; + this->send(o.str()); +} Modified: src/client/network.h =================================================================== --- src/client/network.h 2006-08-31 20:16:09 UTC (rev 149) +++ src/client/network.h 2006-09-01 23:05:50 UTC (rev 150) @@ -26,14 +26,17 @@ #define _OPENGATE_NETWORK_ #include <grapple.h> +#include <string> class Network { private: grapple_client client; + void send(std::string data); public: Network(); ~Network(); - void send(); + void login(std::string username, std::string password); + void quit(); }; #endif Modified: src/common/Makefile.am =================================================================== --- src/common/Makefile.am 2006-08-31 20:16:09 UTC (rev 149) +++ src/common/Makefile.am 2006-09-01 23:05:50 UTC (rev 150) @@ -4,7 +4,7 @@ libopengate_common_la_SOURCES = loader.cpp exception.cpp company.cpp \ faction.cpp faction_storage.cpp company_storage.cpp gamestate.cpp noinst_HEADERS = loader.h exception.h company.h faction.h faction_storage.h \ - company_storage.h gamestate.h + company_storage.h gamestate.h network_protocol.h SUBDIRS = objects equipment components libopengate_common_la_LIBADD = \ $(top_builddir)/src/common/objects/libopengate-objects.la $(top_builddir)/src/common/equipment/libopengate-equipment.la \ Added: src/common/network_protocol.h =================================================================== --- src/common/network_protocol.h (rev 0) +++ src/common/network_protocol.h 2006-09-01 23:05:50 UTC (rev 150) @@ -0,0 +1,26 @@ +/*************************************************************************** + * network_protocoll.h + * + * Sat Sept 01 00:11:55 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. + */ + +#define PROTO_LOGIN 01 +#define PROTO_QUIT 02 Property changes on: src/common/network_protocol.h ___________________________________________________________________ Name: svn:mime-type + text/x-c++hdr Name: svn:eol-style + native Modified: src/opengate_client.cpp =================================================================== --- src/opengate_client.cpp 2006-08-31 20:16:09 UTC (rev 149) +++ src/opengate_client.cpp 2006-09-01 23:05:50 UTC (rev 150) @@ -70,7 +70,7 @@ cout << "-----------" << std::endl; Network* nw = new Network(); - nw->send(); + nw->login("XXX", "YYY"); /* Loader* loader = new Loader(); loader->parse_file("money.xml"); @@ -152,6 +152,7 @@ delete(f_storage); delete(loader); + nw->quit(); delete(nw); cout << "-------------" << std::endl; Modified: src/opengate_server.cpp =================================================================== --- src/opengate_server.cpp 2006-08-31 20:16:09 UTC (rev 149) +++ src/opengate_server.cpp 2006-09-01 23:05:50 UTC (rev 150) @@ -28,9 +28,8 @@ #include <signal.h> #include "server/network.h" -#include "server/network_meta.h" -bool done; +Network* nw; /*! @brief a signal handler * @@ -40,30 +39,25 @@ */ void shutdown_server(int sig) { printf("Signal %d caught, starting shutdown.\n", sig); - done = true; + nw->set_done(); } int main(int argc, char *argv[]) { std::cout << "Statring up" << std::endl; std::cout << "-----------" << std::endl; - /*signal(SIGINT, shutdown_server); + signal(SIGINT, shutdown_server); - done = false; - Network* nw = new Network(2); - while (!done) { + nw = new Network(2); + while (!nw->is_done()) { nw->pull(); sleep(1); - }*/ + } - NetworkMeta* nwm = new NetworkMeta(); - printf("--(%d)--\n", nwm->check_login("XXX", "YYY")); - std::cout << "Shutting down" << std::endl; std::cout << "-------------" << std::endl; - //delete(nw); - delete(nwm); + delete(nw); return EXIT_SUCCESS; } Modified: src/server/network.cpp =================================================================== --- src/server/network.cpp 2006-08-31 20:16:09 UTC (rev 149) +++ src/server/network.cpp 2006-09-01 23:05:50 UTC (rev 150) @@ -27,27 +27,36 @@ #endif #include <iostream> - +#include <string> #include "network.h" +#include "../common/network_protocol.h" Network::Network(int max_users) { + done = false; + server = grapple_server_init(PACKAGE_NAME, VERSION); grapple_server_port_set(server, 1234); grapple_server_protocol_set(server, GRAPPLE_PROTOCOL_UDP); grapple_server_session_set(server, "Opengate Test Server"); grapple_server_start(server); grapple_server_maxusers_set(server, max_users); + + nwm = new NetworkMeta(); } Network::~Network() { //TODO: disconnect all clients grapple_server_stop(server); grapple_server_destroy(server); + delete(nwm); } void Network::pull() { std::cout << "pulling" << std::endl; grapple_message* message = 0; + char* data = 0; + int type = 0; + char* passwd = 0; if (grapple_server_messages_waiting(server)) { message = grapple_server_message_pull(server); switch (message->type) { @@ -62,6 +71,43 @@ case GRAPPLE_MSG_USER_MSG: std::cout << "message!" << std::endl; //Your code to handle this message + data = (char*)message->USER_MSG.data; + data += 2; + *data = '\0'; + data = (char*)message->USER_MSG.data; + type = atoi(data); + data += 2; + *data = ','; + + switch (type) { + case PROTO_LOGIN: + std::cout << "Login protocol message" << std::endl; + + // Null-terminate the string + data = (char*)message->USER_MSG.data; + data += message->USER_MSG.length; + *data = '\0'; + + // parse username an password from the string + data = (char*)message->USER_MSG.data + 3; + passwd = strstr(data, ", "); + *passwd = '\0'; + passwd += strlen(", "); + + printf("--(%d)--\n", nwm->check_login(data, passwd)); + + break; + + case PROTO_QUIT: + std::cout << "Quit protocol message" << std::endl; + done = true; + break; + + default: + std::cout << "Unkown protocol message: " << type << std::endl; + break; + } + break; case GRAPPLE_MSG_USER_DISCONNECTED: std::cout << "disconnected!" << std::endl; @@ -71,3 +117,11 @@ grapple_message_dispose(message); } } + +bool Network::is_done() { + return done; +} + +void Network::set_done() { + done = true; +} Modified: src/server/network.h =================================================================== --- src/server/network.h 2006-08-31 20:16:09 UTC (rev 149) +++ src/server/network.h 2006-09-01 23:05:50 UTC (rev 150) @@ -26,14 +26,19 @@ #define _OPENGATE_NETWORK_ #include <grapple.h> +#include "network_meta.h" class Network { private: grapple_server server; + NetworkMeta* nwm; + bool done; public: Network(int max_users); ~Network(); void pull(); + void set_done(); + bool is_done(); }; Modified: src/server/network_meta.cpp =================================================================== --- src/server/network_meta.cpp 2006-08-31 20:16:09 UTC (rev 149) +++ src/server/network_meta.cpp 2006-09-01 23:05:50 UTC (rev 150) @@ -59,7 +59,7 @@ exit(1); } - std::string request = "GET /game/game_login.php?username=" + username + "&password=" + password + " HTTP/1.1\r\nHost: " + hostname + "\r\n\r\n"; + std::string request = "GET /game/game_login.php?user=" + username + "&password=" + password + " HTTP/1.1\r\nHost: " + hostname + "\r\n\r\n"; /* send a message to the server PORT on machine HOST */ if (send(sd, request.c_str(), request.length(), 0) == -1) { @@ -116,10 +116,8 @@ // determine data data_len_str += strlen("\r\n"); char* data = strstr(data_len_str, "\r\n"); - data += strlen("\r\n"); - char* data2 = data + data_len; - *data2 = '\0'; - int result = atoi(data); + *data = '\0'; + int result = atoi(data_len_str); return result; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-10-23 21:56:20
|
Revision: 152 http://svn.sourceforge.net/opengate/?rev=152&view=rev Author: egore Date: 2006-10-23 14:55:52 -0700 (Mon, 23 Oct 2006) Log Message: ----------- use libcurl (currently broken!) update few XML-files from website add comments to some files add more loading-mechanisms completely break network_meta (no authetication against meta-server possible!) Modified Paths: -------------- ChangeLog aclocal.m4 configure.in data/Components/aluminium.xml data/Components/antimony.xml data/Components/copper.xml data/Components/cpu.xml data/Components/gold.xml data/Components/laser_components.xml data/Components/ram.xml src/common/company.cpp src/common/company.h src/common/faction.cpp src/common/faction.h src/common/faction_storage.cpp src/common/faction_storage.h src/common/loader.cpp src/common/loader.h src/common/objects/ship.cpp src/opengate_client.cpp src/server/network.h src/server/network_meta.cpp src/server/network_meta.h Modified: ChangeLog =================================================================== --- ChangeLog 2006-09-02 09:12:15 UTC (rev 151) +++ ChangeLog 2006-10-23 21:55:52 UTC (rev 152) @@ -1,3 +1,17 @@ +2006-10-23 Christoph Brill <eg...@us...> + + * src/common/company.cpp, src/common/company.h, + src/common/objects/station.cpp, src/common/objects/station.h: more + XML-loading-work + + * src/common/faction.h, src/common/faction_storage.h: doxygen for + documentation + +2006-10-18 Christoph Brill <eg...@us...> + + * src/server/network_meta.cpp, src/server/network_meta.h: try porting + the login mechanism to the new server-infrastructure without success + 2006-09-02 Christoph Brill <eg...@us...> * src/server/network.h, src/server/network.cpp, Modified: aclocal.m4 =================================================================== --- aclocal.m4 2006-09-02 09:12:15 UTC (rev 151) +++ aclocal.m4 2006-10-23 21:55:52 UTC (rev 152) @@ -6606,7 +6606,8 @@ _PKG_TEXT ])], - [$4]) + [AC_MSG_RESULT([no]) + $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-09-02 09:12:15 UTC (rev 151) +++ configure.in 2006-10-23 21:55:52 UTC (rev 152) @@ -36,6 +36,10 @@ AM_CXXFLAGS="$AM_CXXFLAGS $LIBXML2_CFLAGS" AM_LDFLAGS="$AM_LDFLAGS $LIBXML2_LIBS" +#libcurl - http://curl.haxx.se/libcurl/ +PKG_CHECK_MODULES(LIBCURL, [libcurl >= 7.5]) +AM_CXXFLAGS="$AM_CXXFLAGS $LIBCURL_CFLAGS" +AM_LDFLAGS="$AM_LDFLAGS $LIBCURL_LIBS" AC_SUBST(AM_CXXFLAGS, "$AM_CXXFLAGS") AC_SUBST(AM_LDFLAGS, "$AM_LDFLAGS") Modified: data/Components/aluminium.xml =================================================================== (Binary files differ) Modified: data/Components/antimony.xml =================================================================== (Binary files differ) Modified: data/Components/copper.xml =================================================================== (Binary files differ) Modified: data/Components/cpu.xml =================================================================== (Binary files differ) Modified: data/Components/gold.xml =================================================================== (Binary files differ) Modified: data/Components/laser_components.xml =================================================================== (Binary files differ) Modified: data/Components/ram.xml =================================================================== (Binary files differ) Modified: src/common/company.cpp =================================================================== --- src/common/company.cpp 2006-09-02 09:12:15 UTC (rev 151) +++ src/common/company.cpp 2006-10-23 21:55:52 UTC (rev 152) @@ -23,15 +23,27 @@ */ #include "company.h" +#include "loader.h" -Company::Company(std::string name) { - _name = name; +Company::Company(std::string filename) { + _filename = filename; + initialize(); } Company::~Company() { } +void Company::initialize() { + + Loader* loader = Loader::get_instance(); + loader->parse_file(_filename); + + // Naming + _name = loader->get_option("/company/name"); + +} + std::string Company::get_name() { return _name; } Modified: src/common/company.h =================================================================== --- src/common/company.h 2006-09-02 09:12:15 UTC (rev 151) +++ src/common/company.h 2006-10-23 21:55:52 UTC (rev 152) @@ -25,18 +25,65 @@ #ifndef _OPENGATE_COMPANY_ #define _OPENGATE_COMPANY_ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <string> +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * \brief This class defines a company in opengate. + * + * There are several companies in opengate. Which company produced a component + * is currently completely irrelevant, but will later be used for the economic + * calculations. + * + * \author Christoph Brill + * \version 1.0 + * \date 2006 + */ class Company { public: - Company(std::string name); + /*! + * This creates a company by loading it from a file based by it's filename. + * \param filename The relative path from the base datadir to the file + */ + Company(std::string filename); + + /*! + * This destroys the company. + */ virtual ~Company(); + /*! + * Getter for the name of the company. + * + * \return returns the name of the company (i.e. "T&P Systems") + */ std::string get_name(); private: + + virtual void initialize(); + + /*! + * The name of the company + */ std::string _name; + /*! + * The filename of the company + */ + std::string _filename; + }; +#ifdef __cplusplus +} #endif + +#endif /* _OPENGATE_COMPANY_ */ Modified: src/common/faction.cpp =================================================================== --- src/common/faction.cpp 2006-09-02 09:12:15 UTC (rev 151) +++ src/common/faction.cpp 2006-10-23 21:55:52 UTC (rev 152) @@ -23,15 +23,27 @@ */ #include "faction.h" +#include "loader.h" -Faction::Faction(std::string name) { - _name = name; - _description = std::string(""); +Faction::Faction(std::string filename) { + _filename = filename; + initialize(); } Faction::~Faction() { } +void Faction::initialize() { + + Loader* loader = Loader::get_instance(); + loader->parse_file(_filename); + + // Naming + _name = loader->get_option("/faction/name"); + _description = loader->get_option("/faction/description"); + +} + std::string Faction::get_name() { return _name; } Modified: src/common/faction.h =================================================================== --- src/common/faction.h 2006-09-02 09:12:15 UTC (rev 151) +++ src/common/faction.h 2006-10-23 21:55:52 UTC (rev 152) @@ -25,34 +25,72 @@ #ifndef _OPENGATE_FACTION_ #define _OPENGATE_FACTION_ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <string> -/** - * This class defines the basic structures for a faction in opengate. A faction - * is for example "Solrain". +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * \brief This class defines the basic structures for a faction in opengate. * - * @author Christoph Brill + * A faction is for example "Solrain". A faction has a short description and + * a name. That's all for now. + * + * \author Christoph Brill + * \version 1.0 + * \date 2006 */ class Faction { public: - Faction(std::string name); + /*! + * This constructor "creates" a faction. Actually a faction is loaded + * from a file so that passing the filename will load the details. + * \param filename The relative path from the base datadir to the file + */ + Faction(std::string filename); + + /*! + * This deletes the faction. Since nothing has been done with a faction + * it is normally discarded. + */ ~Faction(); - /** + /*! * Getter for the name of the faction. - * - * @return returns the name of the faction (i.e. "Octavius") + * + * \return returns the name of the faction (i.e. "Octavius") */ std::string get_name(); - /** + /*! * Getter for the description of the faction. - * - * @return returns a short background description of the faction (like history, population, etc.) + * + * \return returns a short background description of the faction (like history, population, etc.) */ std::string get_description(); private: + + virtual void initialize(); + std::string _filename; + + /*! + * The name of the faction + */ std::string _name; + + /*! + * The short description of the faction + */ std::string _description; }; +#ifdef __cplusplus +} #endif + +#endif /* _OPENGATE_FACTION_ */ + Modified: src/common/faction_storage.cpp =================================================================== --- src/common/faction_storage.cpp 2006-09-02 09:12:15 UTC (rev 151) +++ src/common/faction_storage.cpp 2006-10-23 21:55:52 UTC (rev 152) @@ -25,7 +25,8 @@ #include "faction_storage.h" #include "exception.h" -FactionStorage* FactionStorage::_storage_instance = NULL; +// Take care the singleton-member-variable is set to 0 at startup +FactionStorage* FactionStorage::_storage_instance = 0; FactionStorage::FactionStorage() { @@ -38,30 +39,30 @@ } } -Faction* FactionStorage::get_faction(std::string faction_name) { - if (!storage_contains(faction_name)) { - Faction* faction = new Faction(faction_name); +Faction* FactionStorage::get_faction(std::string faction_filename) { + if (!storage_contains(faction_filename)) { + Faction* faction = new Faction(faction_filename); data.push_back(faction); data.sort(); return faction; } - return find_faction(faction_name); + return find_faction(faction_filename); } -bool FactionStorage::storage_contains(std::string faction_name) { +bool FactionStorage::storage_contains(std::string faction_filename) { std::list<Faction*>::const_iterator iter; for (iter = data.begin(); iter != data.end(); iter++) { - if (((Faction*)*iter)->get_name() == faction_name) { + if (((Faction*)*iter)->get_name() == faction_filename) { return true; } } return false; } -Faction* FactionStorage::find_faction(std::string faction_name) { +Faction* FactionStorage::find_faction(std::string faction_filename) { std::list<Faction*>::const_iterator iter; for (iter = data.begin(); iter != data.end(); iter++) { - if (((Faction*)*iter)->get_name() == faction_name) { + if (((Faction*)*iter)->get_name() == faction_filename) { return (Faction*)*iter; } } Modified: src/common/faction_storage.h =================================================================== --- src/common/faction_storage.h 2006-09-02 09:12:15 UTC (rev 151) +++ src/common/faction_storage.h 2006-10-23 21:55:52 UTC (rev 152) @@ -25,26 +25,100 @@ #ifndef _OPENGATE_FACTION_STORAGE_ #define _OPENGATE_FACTION_STORAGE_ -#include "faction.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <list> #include <string> +#include "faction.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * \brief This class defines a loader for the factions in Opengate + * + * If you need a faction, use this class to load it. It is able to + * load a faction from it's XML-file and give it to you. It implements + * the "Singleton" design pattern so you just need to call get_instance() + * to get a valid faction storage. + * + * \author Christoph Brill + * \version 1.0 + * \date 2006 + */ class FactionStorage { public: - FactionStorage(); + /*! + * This destructes the storage and all stored factions with it. + */ ~FactionStorage(); + + /*! + * This method return the only instance of the faction storage. + * If you need one, use this method and don't create a new one. + * \return Returns the only instance of FactionStorage + */ inline static FactionStorage* get_instance() { - if (_storage_instance == NULL) { + if (_storage_instance == 0) { _storage_instance = new FactionStorage(); } return _storage_instance; } - Faction* get_faction(std::string faction_name); - bool storage_contains(std::string faction_name); - Faction* find_faction(std::string faction_name); + + /*! + * Get a faction by it's name. If the faction has been already + * loaded it is returned. If noone wanted it yet it is loaded + * from XML (using the Factions constructor). + * \param faction_filename Filename of the faction we want + * \return The faction as loaded from it's file + */ + Faction* get_faction(std::string faction_filename); + + /*! + * This method tests if a faction has been loaded. In most cases + * it's only instersing for internal cases, but if someone wants + * to know, here you can find the info. + * \param faction_filename Filename of the faction we want to know if it + * was loaded + * \return Returns true, if the Faction was loaded before + */ + bool storage_contains(std::string faction_filename); + + /*! + * This method works more or less like the get_faction()-method. + * The main (and important) difference is, that a faction is not + * loaded from a file if it was not found. If it wasn't found, + * an exception is thrown, so beware of messing with it. + * \param faction_filename Filename of the faction we want + * \return Returns the faction if found + */ + Faction* find_faction(std::string faction_filename); private: + + /*! + * This is the (currently) emtpy constructor of this storage. Noting + * is allocated, noting is done. + */ + FactionStorage(); + + /*! + * This it the variable that hold the single instance of the faction + * storage. It will be set to 0 in the corresponding cpp-file. + */ static FactionStorage* _storage_instance; + + /*! + * This variable holds the list of factions that have been loaded. + */ std::list<Faction*> data; }; +#ifdef __cplusplus +} #endif + +#endif /* _OPENGATE_FACTION_STORAGE_ */ Modified: src/common/loader.cpp =================================================================== --- src/common/loader.cpp 2006-09-02 09:12:15 UTC (rev 151) +++ src/common/loader.cpp 2006-10-23 21:55:52 UTC (rev 152) @@ -25,13 +25,14 @@ #include "loader.h" #include "exception.h" -Loader* Loader::_loader_instance = NULL; +Loader* Loader::_loader_instance = 0; + Loader::Loader() { - root_doc = NULL; - root_context = NULL; + root_doc = 0; + root_context = 0; - /* Init libxml */ + // Init libxml xmlInitParser(); LIBXML_TEST_VERSION; } Modified: src/common/loader.h =================================================================== --- src/common/loader.h 2006-09-02 09:12:15 UTC (rev 151) +++ src/common/loader.h 2006-10-23 21:55:52 UTC (rev 152) @@ -25,6 +25,10 @@ #ifndef _OPENGATE_LOADER_ #define _OPENGATE_LOADER_ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <libxml/parser.h> #include <libxml/tree.h> #include <libxml/xpath.h> @@ -36,28 +40,100 @@ { #endif +/*! + * \brief This class loads XML-files using libxml2. + * + * This is one of the key-parts of opengate. It is able to load a XML-file + * and provice it's contents to other classes. It also validates the XML-file + * so that only valid content is loaded. It implements the "Singleton"-Design- + * Pattern so we don't have multiple loaders. + * + * \author Christoph Brill + * \version 1.0 + * \date 2006 + */ class Loader { public: - Loader(); + + /*! + * This unloads a possibly loaded document and shuts down the + * libxml2-parser + */ ~Loader(); + + /*! + * This returns the single instance of the loader + * \return the single instance of the loader. + */ inline static Loader* get_instance() { - if (_loader_instance == NULL) { + if (_loader_instance == 0) { _loader_instance = new Loader(); } return _loader_instance; } + + /*! + * This parses a file based on it's filename. It is loaded from the + * filesystem and parsed into a X-Path-Model to read the values + * from there. + * \param filename The filename to load the XML-document from + */ void parse_file(std::string filename); + + /*! + * Reads an option from an XML-document parsed into the X-Path-Model. + * All options are returned as string. + * \param path The name of the value (for example: "/ship/name") + * \return The value of the path as string (for example "Premia") + */ char* get_option(char* path); - std::vector<char*> get_option_array(char* path); //TODO: return array! + + /*! + * Reads an option from an XML-document parsed into the X-Path-Model. + * All options are returned as std::vector of string. + * \param path The name of the value (for example: "/ship/production-center") + * \return The value of the path as std::vector of string + */ + std::vector<char*> get_option_array(char* path); + + /*! + * Get the count of the options found under a X-Path. This can be used + * to read an array with get_option_array. + * \param path The name of the value (for example: "/ship/production-center") + * \return Returns the number of values found at the path, i.e. 3 + */ int get_option_count(char* path); + + /*! + * Sets an option at a given path. This can be used for runtime-modifications of + * the X-Path-Model and later for saving the XML-file. It is currently limited to + * storing non-array-pathes. + * \param path The name of the value (for example: "/ship/name") + * \param value The value for the path as string (for example "Premia") + */ void set_option(char* path, const char* value); private: + + /*! + * This instantiates the loader. It takes care that the document + * is empty. It also initializes libxml2 and verifies the version. + */ + Loader(); + + /*! + * Variable to store the single instance of the Loader + */ static Loader* _loader_instance; - /** the resulting document tree */ + /*! + * The resulting document tree + */ xmlDocPtr root_doc; - /** the x-path context */ + + /*! + * The x-path context + */ xmlXPathContext* root_context; /** @@ -65,10 +141,13 @@ * they exist. */ void clean_parser(); + /** * This method gets an x-path (see http://www.w3schools.com/xpath/xpath_examples.asp for examples) * and evaluates if there is a possible value. If so, the value is returned. Otherwise an exception * is thrown. + * \param path The name of the value (for example: "/ship/name") + * \return Returns the value */ xmlNodeSet* evaluate_xpath(char* path); }; Modified: src/common/objects/ship.cpp =================================================================== --- src/common/objects/ship.cpp 2006-09-02 09:12:15 UTC (rev 151) +++ src/common/objects/ship.cpp 2006-10-23 21:55:52 UTC (rev 152) @@ -29,7 +29,6 @@ #include <vector> Ship::Ship(std::string filename) { - // TODO: intialize the variables _filename = filename; initialize(); } Modified: src/opengate_client.cpp =================================================================== --- src/opengate_client.cpp 2006-09-02 09:12:15 UTC (rev 151) +++ src/opengate_client.cpp 2006-10-23 21:55:52 UTC (rev 152) @@ -70,7 +70,7 @@ cout << "-----------" << std::endl; Network* nw = new Network(); - nw->login("XXX", "YYY"); + nw->login("egore911", "dexter"); /* Loader* loader = new Loader(); loader->parse_file("money.xml"); Modified: src/server/network.h =================================================================== --- src/server/network.h 2006-09-02 09:12:15 UTC (rev 151) +++ src/server/network.h 2006-10-23 21:55:52 UTC (rev 152) @@ -30,6 +30,7 @@ #endif #include <grapple.h> + #include "network_meta.h" class Network { Modified: src/server/network_meta.cpp =================================================================== --- src/server/network_meta.cpp 2006-09-02 09:12:15 UTC (rev 151) +++ src/server/network_meta.cpp 2006-10-23 21:55:52 UTC (rev 152) @@ -22,117 +22,32 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <network_meta.h> - +#include "network_meta.h" #include <iostream> NetworkMeta::NetworkMeta() { - hostname = "opengate.sourceforge.net"; + 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); } -bool NetworkMeta::perform_request(std::string request, char* buffer) { - - int sd; - struct sockaddr_in sin; - struct sockaddr_in pin; - struct hostent *hp; - - /* go find out about the desired host machine */ - if ((hp = gethostbyname(hostname.c_str())) == 0) { - perror("gethostbyname"); - return false; - } - - /* fill in the socket structure with host information */ - memset(&pin, 0, sizeof(pin)); - pin.sin_family = AF_INET; - pin.sin_addr.s_addr = ((struct in_addr *)(hp->h_addr))->s_addr; - pin.sin_port = htons(80); - - /* grab an Internet domain socket */ - if ((sd = socket(AF_INET, SOCK_STREAM, 0)) == -1) { - perror("socket"); - return false; - } - - /* connect to PORT on HOST */ - if (connect(sd,(struct sockaddr *) &pin, sizeof(pin)) == -1) { - perror("connect"); - return false; - } - - /* send a message to the server PORT on machine HOST */ - if (send(sd, request.c_str(), request.length(), 0) == -1) { - perror("send"); - return false; - } - - /* wait for a message to come back from the server */ - if (recv(sd, buffer, BUFFER_SIZE, 0) == -1) { - perror("recv"); - return false; - } - - char* error = strstr(buffer, "404 Not Found\r\n"); - if (error) { - return false; - } - error = strstr(buffer, "400 Bad Request\r\n"); - if (error) { - return false; - } - - return true; +NetworkMeta::~NetworkMeta() { + curl_easy_cleanup(curl); } int NetworkMeta::check_login(std::string username, std::string password) { - char dir[BUFFER_SIZE]; - for (int i = 0; i < BUFFER_SIZE; i++) { - dir[i] = '\0'; - } - std::string request = "GET /game/game_login.php?user=" + username + "&password=" + password + " HTTP/1.1\r\nHost: " + hostname + "\r\n\r\n"; - if (!perform_request(request, dir)) { - return -1; - } - char* content = strstr(dir, "Content-Length: "); - if (content) { - // Apache 2.x + //FIXME: look at http://curl.haxx.se/lxr/source/docs/examples/getinmemory.c - // determine data length - content += strlen("Content-Length: "); - char* data_len_str = strstr(content, "\r\n"); - *data_len_str = '\0'; - int data_len = atoi(content); - *data_len_str = '\r'; + std::string request = "http://" + hostname + "/script/schnittstelle/?Action=login&user=" + username + "&password=" + password; - // determine data - char* data = strstr(content, "\r\n\r\n"); - data += strlen("\r\n\r\n"); - char* data2 = data + data_len; - *data2 = '\0'; - int result = atoi(data); - return result; + std::cout << request << std::endl; - } else { - // Apache 1.3x + curl_easy_setopt(curl, CURLOPT_URL, request.c_str()); + CURLcode res = curl_easy_perform(curl); - content = strstr(dir, "\r\n\r\n"); - - // determine data length - content += strlen("\r\n\r\n"); - char* data_len_str = strstr(content, "\r\n"); - *data_len_str = '\0'; - int data_len = atoi(content); - *data_len_str = '\r'; - - // determine data - data_len_str += strlen("\r\n"); - char* data = strstr(data_len_str, "\r\n"); - *data = '\0'; - int result = atoi(data_len_str); - return result; - } } bool NetworkMeta::verify_version() { Modified: src/server/network_meta.h =================================================================== --- src/server/network_meta.h 2006-09-02 09:12:15 UTC (rev 151) +++ src/server/network_meta.h 2006-10-23 21:55:52 UTC (rev 152) @@ -36,17 +36,20 @@ #include <netdb.h> #include <string.h> #include <string> +#include <curl/curl.h> #define BUFFER_SIZE 512 class NetworkMeta { public: NetworkMeta(); + ~NetworkMeta(); int check_login(std::string username, std::string password); bool verify_version(); private: std::string hostname; bool perform_request(std::string request, char* buffer); + CURL *curl; }; #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-10-24 20:11:18
|
Revision: 153 http://svn.sourceforge.net/opengate/?rev=153&view=rev Author: egore Date: 2006-10-24 13:11:04 -0700 (Tue, 24 Oct 2006) Log Message: ----------- make login work, still need to parse returned values Modified Paths: -------------- ChangeLog src/opengate_client.cpp src/opengate_server.cpp src/server/network.cpp src/server/network_meta.cpp src/server/network_meta.h Modified: ChangeLog =================================================================== --- ChangeLog 2006-10-23 21:55:52 UTC (rev 152) +++ ChangeLog 2006-10-24 20:11:04 UTC (rev 153) @@ -1,3 +1,8 @@ +2006-10-24 Christoph Brill <eg...@us...> + + * src/opengate_client.cpp: add commandline parsing and parameters for + login + 2006-10-23 Christoph Brill <eg...@us...> * src/common/company.cpp, src/common/company.h, Modified: src/opengate_client.cpp =================================================================== --- src/opengate_client.cpp 2006-10-23 21:55:52 UTC (rev 152) +++ src/opengate_client.cpp 2006-10-24 20:11:04 UTC (rev 153) @@ -43,13 +43,18 @@ #include <OISException.h> +#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 +#define DELIMITER = "--" +#else +#define DELIMITER = "--" +#endif + using namespace std; #ifdef __cplusplus extern "C" { #endif - 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); @@ -69,8 +74,43 @@ cout << "Statring up" << std::endl; cout << "-----------" << std::endl; + std::string username = "Dummy"; + std::string password = "Dummy"; + + 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; + } + } else { + cout << "Didn't find Value" << endl; + } + } else { + cout << "Didn't find delimiter" << endl; + } + } + + std::cout << username << password << std::endl; + Network* nw = new Network(); - nw->login("egore911", "dexter"); + nw->login(username, password); /* Loader* loader = new Loader(); loader->parse_file("money.xml"); Modified: src/opengate_server.cpp =================================================================== --- src/opengate_server.cpp 2006-10-23 21:55:52 UTC (rev 152) +++ src/opengate_server.cpp 2006-10-24 20:11:04 UTC (rev 153) @@ -50,6 +50,7 @@ nw = new Network(2); while (!nw->is_done()) { + std::cout << "We're done!" << std::endl; nw->pull(); sleep(1); } Modified: src/server/network.cpp =================================================================== --- src/server/network.cpp 2006-10-23 21:55:52 UTC (rev 152) +++ src/server/network.cpp 2006-10-24 20:11:04 UTC (rev 153) @@ -22,9 +22,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include "network.h" + #include <iostream> #include <string> -#include "network.h" #include "../common/network_protocol.h" Network::Network(int max_users) { @@ -38,7 +39,7 @@ grapple_server_maxusers_set(server, max_users); nwm = new NetworkMeta(); - done = !nwm->verify_version(); + done = (nwm->verify_version() != 0); } Network::~Network() { Modified: src/server/network_meta.cpp =================================================================== --- src/server/network_meta.cpp 2006-10-23 21:55:52 UTC (rev 152) +++ src/server/network_meta.cpp 2006-10-24 20:11:04 UTC (rev 153) @@ -24,7 +24,39 @@ #include "network_meta.h" #include <iostream> +#include <string> + +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); @@ -39,18 +71,34 @@ int NetworkMeta::check_login(std::string username, std::string password) { + //FIXME: the password needs some kind of encryption to protect against stolen accounts + //FIXME: look at http://curl.haxx.se/lxr/source/docs/examples/getinmemory.c std::string request = "http://" + hostname + "/script/schnittstelle/?Action=login&user=" + username + "&password=" + password; - std::cout << request << std::endl; + 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"); CURLcode res = curl_easy_perform(curl); + std::cout << "Curl result: " << res << std::endl; + + std::cout << "Result: " << chunk.memory << std::endl; + + if (chunk.memory) + free(chunk.memory); + + return -1; } -bool NetworkMeta::verify_version() { +int NetworkMeta::verify_version() { // TODO: ask the server! - return true; + return 0; } Modified: src/server/network_meta.h =================================================================== --- src/server/network_meta.h 2006-10-23 21:55:52 UTC (rev 152) +++ src/server/network_meta.h 2006-10-24 20:11:04 UTC (rev 153) @@ -30,26 +30,79 @@ #endif #include <stdio.h> -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <netdb.h> -#include <string.h> #include <string> #include <curl/curl.h> -#define BUFFER_SIZE 512 +#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 passwort The password sent by the client to the server for login + */ int check_login(std::string username, std::string password); - bool verify_version(); + + /*! + * 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 the difference between the versions + * (for example: metaserver = 21, server = 19 -> returns 2) + */ + int verify_version(); + private: + + /*! + * This variable stores the name of the host we use as metaserver + */ std::string hostname; - bool perform_request(std::string request, char* buffer); + + /*! + * This variable holds the reference to curl for communication + */ CURL *curl; }; +#ifdef __cplusplus +} #endif + + +#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-10-24 21:31:53
|
Revision: 154 http://svn.sourceforge.net/opengate/?rev=154&view=rev Author: egore Date: 2006-10-24 14:31:40 -0700 (Tue, 24 Oct 2006) Log Message: ----------- more documentation Modified Paths: -------------- src/client/network.h src/common/equipment/capacitor.h src/server/network.cpp src/server/network.h src/server/network_meta.cpp Modified: src/client/network.h =================================================================== --- src/client/network.h 2006-10-24 20:11:04 UTC (rev 153) +++ src/client/network.h 2006-10-24 21:31:40 UTC (rev 154) @@ -28,15 +28,57 @@ #include <grapple.h> #include <string> +/*! + * \brief This class is the libgrapple based client of opengate. + * + * It is used for communication to the server and between other + * clients (possibly later). + * + * \addtogroup Client + * + * \author Christoph Brill + * \version 1.0 + * \date 2006 + */ class Network { -private: - grapple_client client; - void send(std::string data); public: + /*! + * This constructor creates a client. It initializes libgrapple. + */ Network(); + + /*! + * This destructor cleans up libgrapple for a clean shutdown. + */ ~Network(); + + /*! + * This method can be used for a loging against the server which + * will then authenticate against the metaserver. This is the + * PROTO_LOGIN command. + * + * \param username The username for the login (same as OPACMA) + * \param username The password for the login (same as OPACMA) + */ void login(std::string username, std::string password); + + /*! + * This is a method for the remote shutdown of a server. This is + * the PROTO_QUIT command. + */ void quit(); + +private: + + /*! + * Handle to the libgrapple client instance. + */ + grapple_client client; + + /*! + * This method wraps the libgrapple sending call to the server. + */ + void send(std::string data); }; #endif Modified: src/common/equipment/capacitor.h =================================================================== --- src/common/equipment/capacitor.h 2006-10-24 20:11:04 UTC (rev 153) +++ src/common/equipment/capacitor.h 2006-10-24 21:31:40 UTC (rev 154) @@ -32,6 +32,19 @@ { #endif +/*! + * \brief This class defines the data for a capacitor. + * + * This class, like all other object classes, can be loaded and filled by + * by an XML-document. It defines the details for a capacitor, which is + * a component that is plugged into the ship. + * + * \addtogroup Common + * + * \author Christoph Brill + * \version 1.0 + * \date 2006 + */ class Capacitor : public Equipment { public: Capacitor(std::string filename); Modified: src/server/network.cpp =================================================================== --- src/server/network.cpp 2006-10-24 20:11:04 UTC (rev 153) +++ src/server/network.cpp 2006-10-24 21:31:40 UTC (rev 154) @@ -40,6 +40,9 @@ nwm = new NetworkMeta(); done = (nwm->verify_version() != 0); + if (done) { + std::cerr << "The server is running a different version of opengate, cannot continue! " << std::endl; + } } Network::~Network() { Modified: src/server/network.h =================================================================== --- src/server/network.h 2006-10-24 20:11:04 UTC (rev 153) +++ src/server/network.h 2006-10-24 21:31:40 UTC (rev 154) @@ -33,18 +33,76 @@ #include "network_meta.h" +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * \brief This class is the libgrapple based server of opengate. + * + * It is used for communication to the client and between other + * servers. Currently it's implemented on a polling basis. + * + * \addtogroup Server + * + * \author Christoph Brill + * \version 1.0 + * \date 2006 + */ class Network { -private: - grapple_server server; - NetworkMeta* nwm; - bool done; public: + /*! + * This constructor creates a server. It initializes libgrapple + * and verifys it's running the latest version. + * + * \param max_users defines how many users may connect to this server + */ Network(int max_users); + + /*! + * This destructor cleans up libgrapple for a clean shutdown. + */ ~Network(); + + /*! + * This is currently the main function of the server. It polls libgrapples + * "incoming message box" and performs the requests by the client. + */ void pull(); + + /*! + * This method tells the server to shutdown gracefully + */ void set_done(); + + /*! + * This method tells if the server is running or not. + * + * \return Returns true, if the server is shutting down or already has been + * shut down. + */ bool is_done(); +private: + + /*! + * Handle to the libgrapple server instance. + */ + grapple_server server; + + /*! + * Handle to the metaserver connection. + */ + NetworkMeta* nwm; + + /*! + * Flag if the server is offline. + */ + bool done; }; +#ifdef __cplusplus +} #endif + +#endif Modified: src/server/network_meta.cpp =================================================================== --- src/server/network_meta.cpp 2006-10-24 20:11:04 UTC (rev 153) +++ src/server/network_meta.cpp 2006-10-24 21:31:40 UTC (rev 154) @@ -54,9 +54,6 @@ } - - - NetworkMeta::NetworkMeta() { hostname = "opacma.ontheserver.de"; curl_global_init(CURL_GLOBAL_ALL); @@ -69,14 +66,21 @@ 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 + int NetworkMeta::check_login(std::string username, std::string password) { - //FIXME: the password needs some kind of encryption to protect against stolen accounts + //FIXME: the password needs some kind of client side encryption to protect against stolen accounts - //FIXME: look at http://curl.haxx.se/lxr/source/docs/examples/getinmemory.c - std::string request = "http://" + hostname + "/script/schnittstelle/?Action=login&user=" + username + "&password=" + password; + int retval = -1; + struct MemoryStruct chunk; chunk.memory=NULL; /* we expect realloc(NULL, size) to work */ @@ -86,16 +90,33 @@ 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"); - CURLcode res = curl_easy_perform(curl); - std::cout << "Curl result: " << res << std::endl; + if (curl_easy_perform(curl) == 0) { + if (chunk.memory) { + std::string result = chunk.memory; + std::string::size_type loc1 = result.find(";", 0 ); + if (loc1 != std::string::npos) { + std::string::size_type loc2 = result.find(";", loc1+1); + std::string userid = result.substr(0, loc1); + std::string faction = result.substr(loc1+1, loc2-(loc1+1)); + std::string lastlogin = result.substr(loc2+1); - std::cout << "Result: " << chunk.memory << std::endl; + std::cout << userid << ".." << faction << ".." << lastlogin << std::endl; - if (chunk.memory) + retval = 1; + + } else { + retval = atoi(result.c_str()); + } + } + + } + + if (chunk.memory) { free(chunk.memory); + } - return -1; + return retval; } int NetworkMeta::verify_version() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-10-26 21:45:39
|
Revision: 156 http://svn.sourceforge.net/opengate/?rev=156&view=rev Author: egore Date: 2006-10-26 14:45:19 -0700 (Thu, 26 Oct 2006) Log Message: ----------- add versioncheck document object extend objects for hurtability Modified Paths: -------------- ChangeLog src/client/network.h src/common/company.h src/common/faction.h src/common/objects/Makefile.am src/common/objects/movable_object.cpp src/common/objects/object.cpp src/common/objects/object.h src/server/network_meta.cpp src/server/network_meta.h Added Paths: ----------- src/common/objects/hurtable_object.cpp src/common/objects/hurtable_object.h Modified: ChangeLog =================================================================== --- ChangeLog 2006-10-26 21:30:51 UTC (rev 155) +++ ChangeLog 2006-10-26 21:45:19 UTC (rev 156) @@ -1,3 +1,14 @@ +2006-10-26 Christoph Brill <eg...@us...> + + * doc/coding-style: add information about the coding style of opengate + + * src/common/objects/hurtable_object.h, + src/common/objects/hurtable_object.cpp, src/common/objects/object.h, + src/common/objects/object.cpp: add hurtable object and document object + + * src/server/network_meta.cpp: add method for checking the version + against the metaserver + 2006-10-24 Christoph Brill <eg...@us...> * src/opengate_client.cpp: add commandline parsing and parameters for Modified: src/client/network.h =================================================================== --- src/client/network.h 2006-10-26 21:30:51 UTC (rev 155) +++ src/client/network.h 2006-10-26 21:45:19 UTC (rev 156) @@ -58,7 +58,7 @@ * PROTO_LOGIN command. * * \param username The username for the login (same as OPACMA) - * \param username The password for the login (same as OPACMA) + * \param password The password for the login (same as OPACMA) */ void login(std::string username, std::string password); @@ -77,6 +77,7 @@ /*! * This method wraps the libgrapple sending call to the server. + * \param data The data will be sent to the server. */ void send(std::string data); }; Modified: src/common/company.h =================================================================== --- src/common/company.h 2006-10-26 21:30:51 UTC (rev 155) +++ src/common/company.h 2006-10-26 21:45:19 UTC (rev 156) @@ -68,6 +68,10 @@ private: + /*! + * This method loads the XML-file and writes it to the class members. + * Before this method has been called noone should work with this class. + */ virtual void initialize(); /*! Modified: src/common/faction.h =================================================================== --- src/common/faction.h 2006-10-26 21:30:51 UTC (rev 155) +++ src/common/faction.h 2006-10-26 21:45:19 UTC (rev 156) @@ -69,12 +69,21 @@ /*! * Getter for the description of the faction. * - * \return returns a short background description of the faction (like history, population, etc.) + * \return returns a short background description of the faction (like + * history, population, etc.) */ std::string get_description(); private: + /*! + * This method loads the XML-file and writes it to the class members. + * Before this method has been called noone should work with this class. + */ virtual void initialize(); + + /*! + * The filename of the faction + */ std::string _filename; /*! Modified: src/common/objects/Makefile.am =================================================================== --- src/common/objects/Makefile.am 2006-10-26 21:30:51 UTC (rev 155) +++ src/common/objects/Makefile.am 2006-10-26 21:45:19 UTC (rev 156) @@ -2,6 +2,6 @@ METASOURCES = AUTO noinst_LTLIBRARIES = libopengate-objects.la libopengate_objects_la_SOURCES = movable_object.cpp object.cpp ship.cpp \ - station.cpp -noinst_HEADERS = movable_object.h object.h ship.h station.h + station.cpp hurtable_object.cpp +noinst_HEADERS = movable_object.h object.h ship.h station.h hurtable_object.h Added: src/common/objects/hurtable_object.cpp =================================================================== --- src/common/objects/hurtable_object.cpp (rev 0) +++ src/common/objects/hurtable_object.cpp 2006-10-26 21:45:19 UTC (rev 156) @@ -0,0 +1,48 @@ +/*************************************************************************** + * hurtable_object.cpp + * + * Thu Oct 26 22:59:31 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 "hurtable_object.h" + +HurtableObject::HurtableObject(int max_health) { + this->max_health = max_health; + this->current_health = max_health; +} + +HurtableObject::~HurtableObject() { + this->max_health = 0; + this->current_health = 0; +} + +int HurtableObject::get_health() { + return this->current_health; +} + +void HurtableObject::set_health(int health) { + this->current_health = health > max_health ? max_health : health; +} + +void HurtableObject::modify_health(int health) { + this->current_health = (this->current_health + health) > max_health ? max_health : (this->current_health + health); +} + Property changes on: src/common/objects/hurtable_object.cpp ___________________________________________________________________ Name: svn:mime-type + text/x-c++src Name: svn:eol-style + native Added: src/common/objects/hurtable_object.h =================================================================== --- src/common/objects/hurtable_object.h (rev 0) +++ src/common/objects/hurtable_object.h 2006-10-26 21:45:19 UTC (rev 156) @@ -0,0 +1,102 @@ +/*************************************************************************** + * hurtable_object.h + * + * Thu Oct 26 22:59:31 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_HURTABLE_OBJECT_ +#define _OPENGATE_HURTABLE_OBJECT_ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include "object.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * \brief This class defines an object, that can be destroyed. + * + * This class is an interface for all elements that can be destroyed by a + * player or something like that. A ship, for example, is hurtable. You hit + * an asteroid, your ship gets hurt and can be destroyed, so: "a ship is a + * HurtableObject" + * + * \addtogroup Common + * + * \author Christoph Brill + * \version 1.0 + * \date 2006 + */ +class HurtableObject : public Object { +public: + /*! + * This creates a hurtable object with a given health. + * \param max_health This is the maximum health of this object and also + * the initial health. + */ + HurtableObject(int max_health); + + /*! + * This destroys the object + */ + virtual ~HurtableObject(); + + /*! + * This method is used to return the health of an object. + * \return Returns the health of the object + */ + int get_health(); + + /*! + * This sets the health for the object. If it is larger than the maximum, + * the health will be set to the maximum. + * \param health The new health value to set. + */ + void set_health(int health); + + /*! + * This helps modifying the health value. You can pass positive or + * negative numbers to the method. + * \param health amount of health to gain or lose + */ + void modify_health(int health); +private: + + /*! + * The maximum health an object can have + */ + int max_health; + + /*! + * The current health an object has + */ + int current_health; +}; + +#ifdef __cplusplus +} +#endif + +#endif Property changes on: src/common/objects/hurtable_object.h ___________________________________________________________________ Name: svn:mime-type + text/x-c++hdr Name: svn:eol-style + native Modified: src/common/objects/movable_object.cpp =================================================================== --- src/common/objects/movable_object.cpp 2006-10-26 21:30:51 UTC (rev 155) +++ src/common/objects/movable_object.cpp 2006-10-26 21:45:19 UTC (rev 156) @@ -24,7 +24,7 @@ #include "movable_object.h" -MovableObject::MovableObject() { +MovableObject::MovableObject() : Object() { } Modified: src/common/objects/object.cpp =================================================================== --- src/common/objects/object.cpp 2006-10-26 21:30:51 UTC (rev 155) +++ src/common/objects/object.cpp 2006-10-26 21:45:19 UTC (rev 156) @@ -25,9 +25,18 @@ #include "object.h" Object::Object() { + this->position = 0; +} + +Object::Object(Ogre::Vector3 position) { + this->position = position; } Object::~ Object() { } + +Ogre::Vector3 Object::get_position() { + return this->position; +} Modified: src/common/objects/object.h =================================================================== --- src/common/objects/object.h 2006-10-26 21:30:51 UTC (rev 155) +++ src/common/objects/object.h 2006-10-26 21:45:19 UTC (rev 156) @@ -32,13 +32,53 @@ { #endif +/*! + * \brief This class defines the basic structures of an object in opengate. + * + * An object can basically anything that is found with the 3D world of + * opengate. You see an asteroid, it's an object. You see a ship, an object. + * A jumpgate, an object. Space station, object. And so on. Objects in + * general are immovable, so if you need a moveable object, you're wrong + * here. Look at MovableObject for something like that. + * + * \addtogroup Common + * + * \author Christoph Brill + * \version 1.0 + * \date 2006 + */ class Object { public: + /*! + * This creates an object. An object has a position and an orienation. + * \param position The position of the object + * FIXME: needs a parameter for the orientation, figure out what in OGRE + * can be used. + */ + Object(Ogre::Vector3 position); + + /*! + * This creates an object for that we don't know the position in space yet. + */ Object(); + + /*! + * This destroys our object. + */ virtual ~Object(); + + /*! + * This gets the position of the object + * \return The position of the object with the OGRE world. + */ Ogre::Vector3 get_position(); + private: - Ogre::Vector3 _position; + + /*! + * This variable holds the position + */ + Ogre::Vector3 position; }; #ifdef __cplusplus Modified: src/server/network_meta.cpp =================================================================== --- src/server/network_meta.cpp 2006-10-26 21:30:51 UTC (rev 155) +++ src/server/network_meta.cpp 2006-10-26 21:45:19 UTC (rev 156) @@ -1,5 +1,5 @@ /*************************************************************************** - * network_meta.h + * network_meta.cpp * * Sat Aug 31 21:04:10 2006 * Copyright 2006 Christoph Brill @@ -120,6 +120,33 @@ } int NetworkMeta::verify_version() { - // TODO: ask the server! - return 0; + 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); + + std::cout << "Comparing " << result << " with " << VERSION << " gave " << retval << std::endl; + } + + } + + if (chunk.memory) { + free(chunk.memory); + } + + return retval; } Modified: src/server/network_meta.h =================================================================== --- src/server/network_meta.h 2006-10-26 21:30:51 UTC (rev 155) +++ src/server/network_meta.h 2006-10-26 21:45:19 UTC (rev 156) @@ -72,7 +72,7 @@ * meta-communication. * * \param username The username sent by the client to the server for login - * \param passwort The password 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); @@ -82,8 +82,7 @@ * versions of the game and can talk to each other. It is part of the * meta-communication. * - * \return It returns the difference between the versions - * (for example: metaserver = 21, server = 19 -> returns 2) + * \return It returns if the version of the metaserver is larger or smaller. */ int verify_version(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-10-28 19:11:01
|
Revision: 203 http://svn.sourceforge.net/opengate/?rev=203&view=rev Author: egore Date: 2006-10-28 12:10:52 -0700 (Sat, 28 Oct 2006) Log Message: ----------- comment out anything loaded by the loader ... it's broken *sigh* Modified Paths: -------------- configure.in src/common/equipment/engine.cpp src/opengate_client.cpp Modified: configure.in =================================================================== --- configure.in 2006-10-28 19:07:19 UTC (rev 202) +++ configure.in 2006-10-28 19:10:52 UTC (rev 203) @@ -44,4 +44,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) +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) Modified: src/common/equipment/engine.cpp =================================================================== --- src/common/equipment/engine.cpp 2006-10-28 19:07:19 UTC (rev 202) +++ src/common/equipment/engine.cpp 2006-10-28 19:10:52 UTC (rev 203) @@ -44,9 +44,7 @@ } void Engine::initialize() { - std::cout << "1" << std::endl; Equipment::initialize(); - std::cout << "2" << std::endl; Loader* loader = Loader::get_instance(); Modified: src/opengate_client.cpp =================================================================== --- src/opengate_client.cpp 2006-10-28 19:07:19 UTC (rev 202) +++ src/opengate_client.cpp 2006-10-28 19:10:52 UTC (rev 203) @@ -142,20 +142,20 @@ delete(storage);*/ FactionStorage* f_storage = FactionStorage::get_instance(); - Engine* engine = new Engine("../../data/Engines/Money/money.xml"); + /*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; + cout << "Max. Thrust: " << engine->get_max_thrust() << std::endl;*/ - Capacitor* capacitor = new Capacitor("../../data/Capacitors/s_c_15.xml"); + /*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; + 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; @@ -185,7 +185,8 @@ return EXIT_FAILURE; } - delete(engine); + //delete(capacitor); + //delete(engine); //delete(ship); delete(f_storage); 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: <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-30 13:20:13
|
Revision: 243 http://svn.sourceforge.net/opengate/?rev=243&view=rev Author: qrstuvw Date: 2006-11-30 05:20:13 -0800 (Thu, 30 Nov 2006) Log Message: ----------- - Threaded META server communication now works! - TODO: Definitly need to cleanup the class :) - TODO: Change the version_info to the new version_check protocol - FUN: Made the GUI ugly purple Modified Paths: -------------- debug/GFX.log debug/GUI.log debug/Graphics.xml debug/data1.x/GUI/OpenGateLook.tga debug/data1.x/GUI/OpenGateLook.xcf opengate.kdevelop opengate.kdevelop.pcs opengate.kdevses src/Makefile.am src/client/Makefile.am src/client/network_meta.cpp src/client/network_meta.h src/client/ui/MainMenu.cpp src/client/ui/MainMenu.h src/client/ui/Makefile.am src/client/ui/Makefile.in src/server/network_meta.cpp Modified: debug/GFX.log =================================================================== --- debug/GFX.log 2006-11-30 03:53:45 UTC (rev 242) +++ debug/GFX.log 2006-11-30 13:20:13 UTC (rev 243) @@ -1,48 +1,49 @@ -11:41:59: Creating resource group General -11:41:59: Creating resource group Internal -11:41:59: Creating resource group Autodetect -11:41:59: Registering ResourceManager for type Material -11:41:59: Registering ResourceManager for type Mesh -11:41:59: Registering ResourceManager for type Skeleton -11:41:59: MovableObjectFactory for type 'ParticleSystem' registered. -11:41:59: Loading library libOgrePlatform.so -11:41:59: OverlayElementFactory for type Panel registered. -11:41:59: OverlayElementFactory for type BorderPanel registered. -11:41:59: OverlayElementFactory for type TextArea registered. -11:41:59: Registering ResourceManager for type Font -11:41:59: ArchiveFactory for archive type FileSystem registered. -11:41:59: ArchiveFactory for archive type Zip registered. -11:41:59: DevIL version: Developer's Image Library (DevIL) 1.6.8pre Oct 23 2006 -11:41:59: DevIL image formats: bmp dib cut dcx dds gif hdr ico cur jpg jpe jpeg lif mdl mng jng pcx pic pix png pbm pgm pnm ppm psd pdd psp pxr sgi bw rgb rgba tga vda icb vst tif tiff wal xpm raw -11:41:59: Registering ResourceManager for type HighLevelGpuProgram -11:41:59: Registering ResourceManager for type Compositor -11:41:59: MovableObjectFactory for type 'Entity' registered. -11:41:59: MovableObjectFactory for type 'Light' registered. -11:41:59: MovableObjectFactory for type 'BillboardSet' registered. -11:41:59: MovableObjectFactory for type 'ManualObject' registered. -11:41:59: MovableObjectFactory for type 'BillboardChain' registered. -11:41:59: MovableObjectFactory for type 'RibbonTrail' registered. -11:41:59: *-*-* OGRE Initialising -11:41:59: *-*-* Version 1.2.3 (Dagon) -11:41:59: Loading library /usr/lib/OGRE/RenderSystem_GL.so -11:41:59: OpenGL Rendering Subsystem created. -11:41:59: Creating resource group GUI -11:41:59: Added resource location './data1.x/GUI' of type 'FileSystem' to resource group 'GUI' -11:41:59: Added resource location './data1.x/Materials' of type 'FileSystem' to resource group 'GUI' -11:41:59: Added resource location './data1.x/Materials/skybox.zip' of type 'Zip' to resource group 'GUI' -11:41:59: Initialising resource group GUI -11:41:59: Parsing scripts for resource group GUI -11:41:59: Parsing script skybox.material -11:41:59: Finished parsing scripts for resource group GUI -11:41:59: ****************************** +14:28:40: Creating resource group General +14:28:40: Creating resource group Internal +14:28:40: Creating resource group Autodetect +14:28:40: Registering ResourceManager for type Material +14:28:40: Registering ResourceManager for type Mesh +14:28:40: Registering ResourceManager for type Skeleton +14:28:40: MovableObjectFactory for type 'ParticleSystem' registered. +14:28:40: Loading library libOgrePlatform.so +14:28:40: OverlayElementFactory for type Panel registered. +14:28:40: OverlayElementFactory for type BorderPanel registered. +14:28:40: OverlayElementFactory for type TextArea registered. +14:28:40: Registering ResourceManager for type Font +14:28:40: ArchiveFactory for archive type FileSystem registered. +14:28:40: ArchiveFactory for archive type Zip registered. +14:28:40: DevIL version: Developer's Image Library (DevIL) 1.6.8pre Oct 23 2006 +14:28:40: DevIL image formats: bmp dib cut dcx dds gif hdr ico cur jpg jpe jpeg lif mdl mng jng pcx pic pix png pbm pgm pnm ppm psd pdd psp pxr sgi bw rgb rgba tga vda icb vst tif tiff wal xpm raw +14:28:40: Registering ResourceManager for type HighLevelGpuProgram +14:28:40: Registering ResourceManager for type Compositor +14:28:40: MovableObjectFactory for type 'Entity' registered. +14:28:40: MovableObjectFactory for type 'Light' registered. +14:28:40: MovableObjectFactory for type 'BillboardSet' registered. +14:28:40: MovableObjectFactory for type 'ManualObject' registered. +14:28:40: MovableObjectFactory for type 'BillboardChain' registered. +14:28:40: MovableObjectFactory for type 'RibbonTrail' registered. +14:28:40: *-*-* OGRE Initialising +14:28:40: *-*-* Version 1.2.3 (Dagon) +14:28:40: Loading library /usr/lib/OGRE/RenderSystem_GL.so +14:28:40: OpenGL Rendering Subsystem created. +14:28:40: Creating resource group GUI +14:28:40: Added resource location './data1.x/GUI' of type 'FileSystem' to resource group 'GUI' +14:28:40: Added resource location './data1.x/Materials' of type 'FileSystem' to resource group 'GUI' +14:28:40: Added resource location './data1.x/Materials/skybox.zip' of type 'Zip' to resource group 'GUI' +14:28:40: Initialising resource group GUI +14:28:40: Parsing scripts for resource group GUI +14:28:40: Parsing script skybox.material +14:28:40: Finished parsing scripts for resource group GUI +14:28:40: ****************************** *** Starting GLX Subsystem *** ****************************** -11:41:59: GLRenderSystem::createRenderWindow "OpenGate 0.1BETA", 800x600 windowed miscParams: FSAA=0 title=OpenGate 0.1BETA -11:41:59: GLXWindow::create -11:41:59: Parsing miscParams -11:41:59: GLXWindow::create -- Requested FSAA of 0 was not acquirable, defaulting to first suitable visual -11:41:59: GLXWindow::create -- Best visual is 35 -11:41:59: An exception has been thrown! +14:28:40: GLRenderSystem::createRenderWindow "OpenGate 0.1BETA", 800x600 windowed miscParams: FSAA=2 title=OpenGate 0.1BETA +14:28:40: GLXWindow::create +14:28:40: Parsing miscParams +14:28:40: GLXWindow::create -- FSAA only supported in fullscreen mode +14:28:40: GLXWindow::create -- Requested FSAA of 0 was not acquirable, defaulting to first suitable visual +14:28:40: GLXWindow::create -- Best visual is 35 +14:28:40: An exception has been thrown! ----------------------------------- Details: @@ -53,84 +54,84 @@ File: OgreResourceGroupManager.cpp Line: 598 Stack unwinding: <<beginning of stack>> -11:41:59: GL_VERSION = 2.0.6065 (8.29.6) -11:41:59: GL_VENDOR = ATI Technologies Inc. -11:41:59: GL_RENDERER = RADEON 9800 Pro Generic -11:41:59: GL_EXTENSIONS = GL_ARB_multitexture GL_EXT_texture_env_add GL_EXT_compiled_vertex_array GL_S3_s3tc GL_ARB_depth_texture GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_multisample GL_ARB_occlusion_query GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_shader_objects GL_ARB_shading_language_100 GL_ARB_shadow GL_ARB_shadow_ambient GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_float GL_ARB_texture_mirrored_repeat GL_ARB_texture_rectangle GL_ARB_transpose_matrix GL_ARB_vertex_blend GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_window_pos GL_ARB_draw_buffers GL_ATI_draw_buffers GL_ATI_element_array GL_ATI_envmap_bumpmap GL_ATI_fragment_shader GL_ATI_map_object_buffer GL_ATI_separate_stencil GL_ATI_texture_env_combine3 GL_ATI_texture_float GL_ATI_texture_mirror_once GL_ATI_vertex_array_object GL_ATI_vertex_attrib_array_object GL_ATI_vertex_streams GL_ATIX_texture_env_combine3 GL_ATIX_texture_env_route GL_ATIX_vertex_shader_output_point_size GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_clip_volume_hint GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_framebuffer_object GL_EXT_multi_draw_arrays GL_EXT_packed_pixels GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_EXT_texgen_reflection GL_EXT_texture3D GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map GL_EXT_texture_edge_clamp GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod_bias GL_EXT_texture_mirror_clamp GL_EXT_texture_object GL_EXT_texture_rectangle GL_EXT_vertex_array GL_EXT_vertex_shader GL_HP_occlusion_test GL_NV_blend_square GL_NV_occlusion_query GL_NV_texgen_reflection GL_SGI_color_matrix GL_SGIS_generate_mipmap GL_SGIS_texture_border_clamp GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_SUN_multi_draw_arrays -11:41:59: *************************** +14:28:40: GL_VERSION = 2.0.6065 (8.29.6) +14:28:40: GL_VENDOR = ATI Technologies Inc. +14:28:40: GL_RENDERER = RADEON 9800 Pro Generic +14:28:40: GL_EXTENSIONS = GL_ARB_multitexture GL_EXT_texture_env_add GL_EXT_compiled_vertex_array GL_S3_s3tc GL_ARB_depth_texture GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_multisample GL_ARB_occlusion_query GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_shader_objects GL_ARB_shading_language_100 GL_ARB_shadow GL_ARB_shadow_ambient GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_float GL_ARB_texture_mirrored_repeat GL_ARB_texture_rectangle GL_ARB_transpose_matrix GL_ARB_vertex_blend GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_window_pos GL_ARB_draw_buffers GL_ATI_draw_buffers GL_ATI_element_array GL_ATI_envmap_bumpmap GL_ATI_fragment_shader GL_ATI_map_object_buffer GL_ATI_separate_stencil GL_ATI_texture_env_combine3 GL_ATI_texture_float GL_ATI_texture_mirror_once GL_ATI_vertex_array_object GL_ATI_vertex_attrib_array_object GL_ATI_vertex_streams GL_ATIX_texture_env_combine3 GL_ATIX_texture_env_route GL_ATIX_vertex_shader_output_point_size GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_clip_volume_hint GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_framebuffer_object GL_EXT_multi_draw_arrays GL_EXT_packed_pixels GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_EXT_texgen_reflection GL_EXT_texture3D GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map GL_EXT_texture_edge_clamp GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod_bias GL_EXT_texture_mirror_clamp GL_EXT_texture_object GL_EXT_texture_rectangle GL_EXT_vertex_array GL_EXT_vertex_shader GL_HP_occlusion_test GL_NV_blend_square GL_NV_occlusion_query GL_NV_texgen_reflection GL_SGI_color_matrix GL_SGIS_generate_mipmap GL_SGIS_texture_border_clamp GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_SUN_multi_draw_arrays +14:28:40: *************************** *** GL Renderer Started *** *************************** -11:41:59: Registering ResourceManager for type GpuProgram -11:41:59: GLSL support detected -11:41:59: GL: Using GL_EXT_framebuffer_object for rendering to textures (best) -11:41:59: FBO PF_UNKNOWN depth/stencil support: D16S0 D24S0 D32S0 -11:41:59: FBO PF_R5G6B5 depth/stencil support: D0S0 D16S0 D24S0 D32S0 -11:41:59: FBO PF_B5G6R5 depth/stencil support: D0S0 D16S0 D24S0 D32S0 -11:41:59: FBO PF_A4R4G4B4 depth/stencil support: D0S0 D16S0 D24S0 D32S0 -11:41:59: FBO PF_A1R5G5B5 depth/stencil support: D0S0 D16S0 D24S0 D32S0 -11:41:59: FBO PF_R8G8B8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 -11:41:59: FBO PF_B8G8R8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 -11:41:59: FBO PF_A8R8G8B8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 -11:41:59: FBO PF_B8G8R8A8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 -11:41:59: FBO PF_A2R10G10B10 depth/stencil support: D0S0 D16S0 D24S0 D32S0 -11:41:59: FBO PF_A2B10G10R10 depth/stencil support: D0S0 D16S0 D24S0 D32S0 -11:41:59: FBO PF_FLOAT16_RGB depth/stencil support: D0S0 D16S0 D24S0 D32S0 -11:41:59: FBO PF_FLOAT16_RGBA depth/stencil support: D0S0 D16S0 D24S0 D32S0 -11:41:59: FBO PF_FLOAT32_RGB depth/stencil support: D0S0 D16S0 D24S0 D32S0 -11:41:59: FBO PF_FLOAT32_RGBA depth/stencil support: D0S0 D16S0 D24S0 D32S0 -11:41:59: FBO PF_X8R8G8B8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 -11:41:59: FBO PF_X8B8G8R8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 -11:41:59: FBO PF_SHORT_RGBA depth/stencil support: D0S0 D16S0 D24S0 D32S0 -11:41:59: FBO PF_R3G3B2 depth/stencil support: D0S0 D16S0 D24S0 D32S0 -11:41:59: [GL] : Valid FBO targets PF_UNKNOWN PF_R5G6B5 PF_B5G6R5 PF_A4R4G4B4 PF_A1R5G5B5 PF_R8G8B8 PF_B8G8R8 PF_A8R8G8B8 PF_B8G8R8A8 PF_A2R10G10B10 PF_A2B10G10R10 PF_FLOAT16_RGB PF_FLOAT16_RGBA PF_FLOAT32_RGB PF_FLOAT32_RGBA PF_X8R8G8B8 PF_X8B8G8R8 PF_SHORT_RGBA PF_R3G3B2 -11:41:59: RenderSystem capabilities -11:41:59: ------------------------- -11:41:59: * Hardware generation of mipmaps: yes -11:41:59: * Texture blending: yes -11:41:59: * Anisotropic texture filtering: yes -11:41:59: * Dot product texture operation: yes -11:41:59: * Cube mapping: yes -11:41:59: * Hardware stencil buffer: yes -11:41:59: - Stencil depth: 8 -11:41:59: - Two sided stencil support: yes -11:41:59: - Wrap stencil values: yes -11:41:59: * Hardware vertex / index buffers: yes -11:41:59: * Vertex programs: yes -11:41:59: - Max vertex program version: arbvp1 -11:41:59: * Fragment programs: yes -11:41:59: - Max fragment program version: arbfp1 -11:41:59: * Texture Compression: yes -11:41:59: - DXT: yes -11:41:59: - VTC: no -11:41:59: * Scissor Rectangle: yes -11:41:59: * Hardware Occlusion Query: yes -11:41:59: * User clip planes: yes -11:41:59: * VET_UBYTE4 vertex element type: yes -11:41:59: * Infinite far plane projection: yes -11:41:59: * Hardware render-to-texture: yes -11:41:59: * Floating point textures: yes -11:41:59: * Non-power-of-two textures: no -11:41:59: * Volume textures: yes -11:41:59: * Multiple Render Targets: 4 -11:41:59: * Point Sprites: yes -11:41:59: * Extended point parameters: yes -11:41:59: * Max Point Size: 1024 -11:41:59: Registering ResourceManager for type Texture -11:41:59: ResourceBackgroundQueue - threading disabled -11:41:59: Particle Renderer Type 'billboard' registered -11:41:59: Texture: OpenGateLook.tga: Loading 1 faces(PF_A8R8G8B8,512x512x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,512x512x1. -11:41:59: Texture: _cegui_ogre_0: Loading 1 faces(PF_A8R8G8B8,32x32x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1. -11:41:59: Texture: _cegui_ogre_1: Loading 1 faces(PF_A8R8G8B8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x256x1. -11:41:59: Texture: _cegui_ogre_2: Loading 1 faces(PF_A8R8G8B8,32x32x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1. -11:41:59: Texture: _cegui_ogre_3: Loading 1 faces(PF_A8R8G8B8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x256x1. -11:41:59: Creating viewport on target 'OpenGate 0.1BETA', rendering from camera 'DefaultCam', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0 -11:41:59: Viewport for camera 'DefaultCam', actual dimensions L: 0 T: 0 W: 800 H: 600 -11:41:59: Texture: stevecube_fr.jpg: Loading 1 faces(PF_B8G8R8,512x512x1) with 9 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1. -11:41:59: Texture: stevecube_bk.jpg: Loading 1 faces(PF_B8G8R8,512x512x1) with 9 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1. -11:41:59: Texture: stevecube_lf.jpg: Loading 1 faces(PF_B8G8R8,512x512x1) with 9 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1. -11:41:59: Texture: stevecube_rt.jpg: Loading 1 faces(PF_B8G8R8,512x512x1) with 9 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1. -11:41:59: Texture: stevecube_up.jpg: Loading 1 faces(PF_B8G8R8,512x512x1) with 9 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1. -11:41:59: Texture: stevecube_dn.jpg: Loading 1 faces(PF_B8G8R8,512x512x1) with 9 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1. -11:41:59: Texture: spot_shadow_fade.png: Loading 1 faces(PF_B8G8R8,128x128x1) with 7 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1. -11:42:40: Creating viewport on target 'OpenGate 0.1BETA', rendering from camera 'DefaultCam', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0 -11:42:40: Viewport for camera 'DefaultCam', actual dimensions L: 0 T: 0 W: 800 H: 600 +14:28:40: Registering ResourceManager for type GpuProgram +14:28:40: GLSL support detected +14:28:40: GL: Using GL_EXT_framebuffer_object for rendering to textures (best) +14:28:40: FBO PF_UNKNOWN depth/stencil support: D16S0 D24S0 D32S0 +14:28:40: FBO PF_R5G6B5 depth/stencil support: D0S0 D16S0 D24S0 D32S0 +14:28:40: FBO PF_B5G6R5 depth/stencil support: D0S0 D16S0 D24S0 D32S0 +14:28:41: FBO PF_A4R4G4B4 depth/stencil support: D0S0 D16S0 D24S0 D32S0 +14:28:41: FBO PF_A1R5G5B5 depth/stencil support: D0S0 D16S0 D24S0 D32S0 +14:28:41: FBO PF_R8G8B8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 +14:28:41: FBO PF_B8G8R8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 +14:28:41: FBO PF_A8R8G8B8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 +14:28:41: FBO PF_B8G8R8A8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 +14:28:41: FBO PF_A2R10G10B10 depth/stencil support: D0S0 D16S0 D24S0 D32S0 +14:28:41: FBO PF_A2B10G10R10 depth/stencil support: D0S0 D16S0 D24S0 D32S0 +14:28:41: FBO PF_FLOAT16_RGB depth/stencil support: D0S0 D16S0 D24S0 D32S0 +14:28:41: FBO PF_FLOAT16_RGBA depth/stencil support: D0S0 D16S0 D24S0 D32S0 +14:28:41: FBO PF_FLOAT32_RGB depth/stencil support: D0S0 D16S0 D24S0 D32S0 +14:28:41: FBO PF_FLOAT32_RGBA depth/stencil support: D0S0 D16S0 D24S0 D32S0 +14:28:41: FBO PF_X8R8G8B8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 +14:28:41: FBO PF_X8B8G8R8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 +14:28:41: FBO PF_SHORT_RGBA depth/stencil support: D0S0 D16S0 D24S0 D32S0 +14:28:41: FBO PF_R3G3B2 depth/stencil support: D0S0 D16S0 D24S0 D32S0 +14:28:41: [GL] : Valid FBO targets PF_UNKNOWN PF_R5G6B5 PF_B5G6R5 PF_A4R4G4B4 PF_A1R5G5B5 PF_R8G8B8 PF_B8G8R8 PF_A8R8G8B8 PF_B8G8R8A8 PF_A2R10G10B10 PF_A2B10G10R10 PF_FLOAT16_RGB PF_FLOAT16_RGBA PF_FLOAT32_RGB PF_FLOAT32_RGBA PF_X8R8G8B8 PF_X8B8G8R8 PF_SHORT_RGBA PF_R3G3B2 +14:28:41: RenderSystem capabilities +14:28:41: ------------------------- +14:28:41: * Hardware generation of mipmaps: yes +14:28:41: * Texture blending: yes +14:28:41: * Anisotropic texture filtering: yes +14:28:41: * Dot product texture operation: yes +14:28:41: * Cube mapping: yes +14:28:41: * Hardware stencil buffer: yes +14:28:41: - Stencil depth: 8 +14:28:41: - Two sided stencil support: yes +14:28:41: - Wrap stencil values: yes +14:28:41: * Hardware vertex / index buffers: yes +14:28:41: * Vertex programs: yes +14:28:41: - Max vertex program version: arbvp1 +14:28:41: * Fragment programs: yes +14:28:41: - Max fragment program version: arbfp1 +14:28:41: * Texture Compression: yes +14:28:41: - DXT: yes +14:28:41: - VTC: no +14:28:41: * Scissor Rectangle: yes +14:28:41: * Hardware Occlusion Query: yes +14:28:41: * User clip planes: yes +14:28:41: * VET_UBYTE4 vertex element type: yes +14:28:41: * Infinite far plane projection: yes +14:28:41: * Hardware render-to-texture: yes +14:28:41: * Floating point textures: yes +14:28:41: * Non-power-of-two textures: no +14:28:41: * Volume textures: yes +14:28:41: * Multiple Render Targets: 4 +14:28:41: * Point Sprites: yes +14:28:41: * Extended point parameters: yes +14:28:41: * Max Point Size: 1024 +14:28:41: Registering ResourceManager for type Texture +14:28:41: ResourceBackgroundQueue - threading disabled +14:28:41: Particle Renderer Type 'billboard' registered +14:28:41: Texture: OpenGateLook.tga: Loading 1 faces(PF_A8R8G8B8,512x512x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,512x512x1. +14:28:41: Texture: _cegui_ogre_0: Loading 1 faces(PF_A8R8G8B8,32x32x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1. +14:28:41: Texture: _cegui_ogre_1: Loading 1 faces(PF_A8R8G8B8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x256x1. +14:28:41: Texture: _cegui_ogre_2: Loading 1 faces(PF_A8R8G8B8,32x32x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1. +14:28:41: Texture: _cegui_ogre_3: Loading 1 faces(PF_A8R8G8B8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x256x1. +14:28:41: Creating viewport on target 'OpenGate 0.1BETA', rendering from camera 'DefaultCam', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0 +14:28:41: Viewport for camera 'DefaultCam', actual dimensions L: 0 T: 0 W: 800 H: 600 +14:28:41: Texture: stevecube_fr.jpg: Loading 1 faces(PF_B8G8R8,512x512x1) with 9 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1. +14:28:41: Texture: stevecube_bk.jpg: Loading 1 faces(PF_B8G8R8,512x512x1) with 9 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1. +14:28:41: Texture: stevecube_lf.jpg: Loading 1 faces(PF_B8G8R8,512x512x1) with 9 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1. +14:28:41: Texture: stevecube_rt.jpg: Loading 1 faces(PF_B8G8R8,512x512x1) with 9 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1. +14:28:41: Texture: stevecube_up.jpg: Loading 1 faces(PF_B8G8R8,512x512x1) with 9 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1. +14:28:41: Texture: stevecube_dn.jpg: Loading 1 faces(PF_B8G8R8,512x512x1) with 9 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1. +14:28:41: Texture: spot_shadow_fade.png: Loading 1 faces(PF_B8G8R8,128x128x1) with 7 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1. +14:28:53: Creating viewport on target 'OpenGate 0.1BETA', rendering from camera 'DefaultCam', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0 +14:28:53: Viewport for camera 'DefaultCam', actual dimensions L: 0 T: 0 W: 800 H: 600 Modified: debug/GUI.log =================================================================== --- debug/GUI.log 2006-11-30 03:53:45 UTC (rev 242) +++ debug/GUI.log 2006-11-30 13:20:13 UTC (rev 243) @@ -1,254 +1,254 @@ -27/11/2006 11:41:59 (InfL1) Attempting to load Scheme from file 'OpenGateLook.scheme'. -27/11/2006 11:41:59 (InfL2) Started creation of Scheme 'OpenGateLook' via XML file. -27/11/2006 11:41:59 (InfL2) Finished creation of Scheme 'OpenGateLook' via XML file. -27/11/2006 11:41:59 (InfL2) Loaded GUI scheme 'OpenGateLook' from data in file 'OpenGateLook.scheme'. -27/11/2006 11:41:59 (InfL2) ---- Begining resource loading for GUI scheme 'OpenGateLook' ---- -27/11/2006 11:41:59 (InfL1) Attempting to create an Imageset from the information specified in file 'OpenGateLook.imageset'. -27/11/2006 11:41:59 (InfL2) Started creation of Imageset 'OpenGateLook' via XML file. -27/11/2006 11:41:59 (InfL2) Finished creation of Imageset 'OpenGateLook' via XML file. -27/11/2006 11:41:59 (InfL1) Attempting to create Font from the information specified in file 'BlueHighway-12.font'. -27/11/2006 11:41:59 (InfL2) Started creation of Font 'BlueHighway-12' via XML file. -27/11/2006 11:41:59 (InfL1) Attempting to create Imageset 'BlueHighway-12_auto_glyph_images' with texture only. -27/11/2006 11:41:59 (InfL2) Font 'BlueHighway-12' now has the following glyphs defined: ' !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'. -27/11/2006 11:41:59 (InfL2) Finished creation of Font 'BlueHighway-12' via XML file. -27/11/2006 11:41:59 (InfL1) Attempting to create Font from the information specified in file 'BlueHighway-10.font'. -27/11/2006 11:41:59 (InfL2) Started creation of Font 'BlueHighway-10' via XML file. -27/11/2006 11:41:59 (InfL1) Attempting to create Imageset 'BlueHighway-10_auto_glyph_images' with texture only. -27/11/2006 11:41:59 (InfL2) Font 'BlueHighway-10' now has the following glyphs defined: ' !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'. -27/11/2006 11:41:59 (InfL2) Finished creation of Font 'BlueHighway-10' via XML file. -27/11/2006 11:41:59 (InfL1) ===== Falagard 'root' element: look and feel parsing begins ===== -27/11/2006 11:41:59 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGUIPanels'. -27/11/2006 11:41:59 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGUIPanels'. -27/11/2006 11:41:59 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGProgressBarShield'. -27/11/2006 11:41:59 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGProgressBarShield'. -27/11/2006 11:41:59 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGProgressBarEnergy'. -27/11/2006 11:41:59 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGProgressBarEnergy'. -27/11/2006 11:41:59 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGProgressBarHull'. -27/11/2006 11:41:59 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGProgressBarHull'. -27/11/2006 11:41:59 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGProgressBarVert'. -27/11/2006 11:41:59 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGProgressBarVert'. -27/11/2006 11:41:59 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGEditbox'. -27/11/2006 11:41:59 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGEditbox'. -27/11/2006 11:41:59 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGProgressBarWeapon1'. -27/11/2006 11:41:59 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGProgressBarWeapon1'. -27/11/2006 11:41:59 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGProgressBarWeapon2'. -27/11/2006 11:41:59 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGProgressBarWeapon2'. -27/11/2006 11:41:59 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGProgressBarWeapon3'. -27/11/2006 11:41:59 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGProgressBarWeapon3'. -27/11/2006 11:41:59 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGDefaultFrameWindow'. -27/11/2006 11:41:59 (Error) Exception: Imageset::getImage - The Image named 'OGDefaultWindowTopLeft' could not be found in Imageset 'OpenGateLook'. -27/11/2006 11:41:59 (Error) Exception: Imageset::getImage - The Image named 'OGDefaultWindowTopRight' could not be found in Imageset 'OpenGateLook'. -27/11/2006 11:41:59 (Error) Exception: Imageset::getImage - The Image named 'OGDefaultWindowTopEdge' could not be found in Imageset 'OpenGateLook'. -27/11/2006 11:41:59 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGDefaultFrameWindow'. -27/11/2006 11:41:59 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGDefaultTitlebar'. -27/11/2006 11:41:59 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGDefaultTitlebar'. -27/11/2006 11:41:59 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGButton'. -27/11/2006 11:41:59 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGButton'. -27/11/2006 11:41:59 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGStaticText'. -27/11/2006 11:41:59 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGStaticText'. -27/11/2006 11:41:59 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGStaticShared'. -27/11/2006 11:41:59 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGStaticShared'. -27/11/2006 11:41:59 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGVerticalScrollbarThumb'. -27/11/2006 11:41:59 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGVerticalScrollbarThumb'. -27/11/2006 11:41:59 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGVerticalScrollbar'. -27/11/2006 11:41:59 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGVerticalScrollbar'. -27/11/2006 11:41:59 (InfL1) ===== Look and feel parsing completed ===== -27/11/2006 11:41:59 (InfL1) No window factories specified for module 'CEGUIFalagardBase' - adding all available factories... -27/11/2006 11:41:59 (InfL1) WindowFactory for 'Falagard/Button' windows added. -27/11/2006 11:41:59 (InfL1) WindowFactory for 'Falagard/Checkbox' windows added. -27/11/2006 11:41:59 (InfL1) WindowFactory for 'Falagard/ComboDropList' windows added. -27/11/2006 11:41:59 (InfL1) WindowFactory for 'Falagard/Combobox' windows added. -27/11/2006 11:41:59 (InfL1) WindowFactory for 'Falagard/Editbox' windows added. -27/11/2006 11:41:59 (InfL1) WindowFactory for 'Falagard/FrameWindow' windows added. -27/11/2006 11:41:59 (InfL1) WindowFactory for 'Falagard/ListHeader' windows added. -27/11/2006 11:41:59 (InfL1) WindowFactory for 'Falagard/ListHeaderSegment' windows added. -27/11/2006 11:41:59 (InfL1) WindowFactory for 'Falagard/Listbox' windows added. -27/11/2006 11:41:59 (InfL1) WindowFactory for 'Falagard/Menubar' windows added. -27/11/2006 11:41:59 (InfL1) WindowFactory for 'Falagard/MenuItem' windows added. -27/11/2006 11:41:59 (InfL1) WindowFactory for 'Falagard/MultiColumnList' windows added. -27/11/2006 11:41:59 (InfL1) WindowFactory for 'Falagard/MultiLineEditbox' windows added. -27/11/2006 11:41:59 (InfL1) WindowFactory for 'Falagard/PopupMenu' windows added. -27/11/2006 11:41:59 (InfL1) WindowFactory for 'Falagard/ProgressBar' windows added. -27/11/2006 11:41:59 (InfL1) WindowFactory for 'Falagard/RadioButton' windows added. -27/11/2006 11:41:59 (InfL1) WindowFactory for 'Falagard/ScrollablePane' windows added. -27/11/2006 11:41:59 (InfL1) WindowFactory for 'Falagard/Scrollbar' windows added. -27/11/2006 11:41:59 (InfL1) WindowFactory for 'Falagard/Slider' windows added. -27/11/2006 11:41:59 (InfL1) WindowFactory for 'Falagard/Spinner' windows added. -27/11/2006 11:41:59 (InfL1) WindowFactory for 'Falagard/StaticImage' windows added. -27/11/2006 11:41:59 (InfL1) WindowFactory for 'Falagard/StaticText' windows added. -27/11/2006 11:41:59 (InfL1) WindowFactory for 'Falagard/SystemButton' windows added. -27/11/2006 11:41:59 (InfL1) WindowFactory for 'Falagard/TabButton' windows added. -27/11/2006 11:41:59 (InfL1) WindowFactory for 'Falagard/TabControl' windows added. -27/11/2006 11:41:59 (InfL1) WindowFactory for 'Falagard/TabPane' windows added. -27/11/2006 11:41:59 (InfL1) WindowFactory for 'Falagard/Thumb' windows added. -27/11/2006 11:41:59 (InfL1) WindowFactory for 'Falagard/Titlebar' windows added. -27/11/2006 11:41:59 (InfL1) WindowFactory for 'Falagard/Tooltip' windows added. -27/11/2006 11:41:59 (InfL1) Creating falagard mapping for type 'OpenGateLook/OGButton' using base type 'Falagard/Button' and LookN'Feel 'OpenGateLook/OGButton'. -27/11/2006 11:41:59 (InfL1) Creating falagard mapping for type 'OpenGateLook/OGDefaultFrameWindow' using base type 'Falagard/FrameWindow' and LookN'Feel 'OpenGateLook/OGDefaultFrameWindow'. -27/11/2006 11:41:59 (InfL1) Creating falagard mapping for type 'OpenGateLook/OGDefaultTitlebar' using base type 'Falagard/Titlebar' and LookN'Feel 'OpenGateLook/OGDefaultTitlebar'. -27/11/2006 11:41:59 (InfL1) Creating falagard mapping for type 'OpenGateLook/OGEditbox' using base type 'Falagard/Editbox' and LookN'Feel 'OpenGateLook/OGEditbox'. -27/11/2006 11:41:59 (InfL1) Creating falagard mapping for type 'OpenGateLook/OGProgressBarEnergy' using base type 'Falagard/ProgressBar' and LookN'Feel 'OpenGateLook/OGProgressBarEnergy'. -27/11/2006 11:41:59 (InfL1) Creating falagard mapping for type 'OpenGateLook/OGProgressBarHull' using base type 'Falagard/ProgressBar' and LookN'Feel 'OpenGateLook/OGProgressBarHull'. -27/11/2006 11:41:59 (InfL1) Creating falagard mapping for type 'OpenGateLook/OGProgressBarShield' using base type 'Falagard/ProgressBar' and LookN'Feel 'OpenGateLook/OGProgressBarShield'. -27/11/2006 11:41:59 (InfL1) Creating falagard mapping for type 'OpenGateLook/OGProgressBarVert' using base type 'Falagard/ProgressBar' and LookN'Feel 'OpenGateLook/OGProgressBarVert'. -27/11/2006 11:41:59 (InfL1) Creating falagard mapping for type 'OpenGateLook/OGProgressBarWeapon1' using base type 'Falagard/ProgressBar' and LookN'Feel 'OpenGateLook/OGProgressBarWeapon1'. -27/11/2006 11:41:59 (InfL1) Creating falagard mapping for type 'OpenGateLook/OGProgressBarWeapon2' using base type 'Falagard/ProgressBar' and LookN'Feel 'OpenGateLook/OGProgressBarWeapon2'. -27/11/2006 11:41:59 (InfL1) Creating falagard mapping for type 'OpenGateLook/OGProgressBarWeapon3' using base type 'Falagard/ProgressBar' and LookN'Feel 'OpenGateLook/OGProgressBarWeapon3'. -27/11/2006 11:41:59 (InfL1) Creating falagard mapping for type 'OpenGateLook/OGStaticText' using base type 'Falagard/StaticText' and LookN'Feel 'OpenGateLook/OGStaticText'. -27/11/2006 11:41:59 (InfL1) Creating falagard mapping for type 'OpenGateLook/OGSystemButton' using base type 'Falagard/SystemButton' and LookN'Feel 'OpenGateLook/OGButton'. -27/11/2006 11:41:59 (InfL1) Creating falagard mapping for type 'OpenGateLook/OGUIPanels' using base type 'Falagard/StaticImage' and LookN'Feel 'OpenGateLook/OGUIPanels'. -27/11/2006 11:41:59 (InfL1) Creating falagard mapping for type 'OpenGateLook/OGVerticalScrollbar' using base type 'Falagard/Scrollbar' and LookN'Feel 'OpenGateLook/OGVerticalScrollbar'. -27/11/2006 11:41:59 (InfL1) Creating falagard mapping for type 'OpenGateLook/OGVerticalScrollbarThumb' using base type 'Falagard/Thumb' and LookN'Feel 'OpenGateLook/OGVerticalScrollbarThumb'. -27/11/2006 11:41:59 (InfL2) ---- Resource loading for GUI scheme 'OpenGateLook' completed ---- -27/11/2006 11:41:59 (InfL2) Window 'Sheet' of type 'DefaultWindow' has been created. -27/11/2006 11:41:59 (InfL2) Window 'LoginWindow' of type 'OpenGateLook/OGDefaultFrameWindow' has been created. -27/11/2006 11:41:59 (InfL2) Assigning LookNFeel 'OpenGateLook/OGDefaultFrameWindow' to window 'LoginWindow'. -27/11/2006 11:41:59 (InfL2) Window 'LoginWindow__auto_titlebar__' of type 'OpenGateLook/OGDefaultTitlebar' has been created. -27/11/2006 11:41:59 (InfL2) Assigning LookNFeel 'OpenGateLook/OGDefaultTitlebar' to window 'LoginWindow__auto_titlebar__'. -27/11/2006 11:41:59 (InfL2) Window 'LoginWindow__auto_closebutton__' of type 'OpenGateLook/OGSystemButton' has been created. -27/11/2006 11:41:59 (InfL2) Assigning LookNFeel 'OpenGateLook/OGButton' to window 'LoginWindow__auto_closebutton__'. -27/11/2006 11:41:59 (InfL2) Window 'WelcomeText' of type 'OpenGateLook/OGStaticText' has been created. -27/11/2006 11:41:59 (InfL2) Assigning LookNFeel 'OpenGateLook/OGStaticText' to window 'WelcomeText'. -27/11/2006 11:41:59 (InfL2) Window 'WelcomeText__auto_hscrollbar__' of type 'OpenGateLook/OGVerticalScrollbar' has been created. -27/11/2006 11:41:59 (InfL2) Assigning LookNFeel 'OpenGateLook/OGVerticalScrollbar' to window 'WelcomeText__auto_hscrollbar__'. -27/11/2006 11:41:59 (InfL2) Window 'WelcomeText__auto_hscrollbar____auto_incbtn__' of type 'OpenGateLook/OGButton' has been created. -27/11/2006 11:41:59 (InfL2) Assigning LookNFeel 'OpenGateLook/OGButton' to window 'WelcomeText__auto_hscrollbar____auto_incbtn__'. -27/11/2006 11:41:59 (InfL2) Window 'WelcomeText__auto_hscrollbar____auto_decbtn__' of type 'OpenGateLook/OGButton' has been created. -27/11/2006 11:41:59 (InfL2) Assigning LookNFeel 'OpenGateLook/OGButton' to window 'WelcomeText__auto_hscrollbar____auto_decbtn__'. -27/11/2006 11:41:59 (InfL2) Window 'WelcomeText__auto_hscrollbar____auto_thumb__' of type 'OpenGateLook/OGVerticalScrollbarThumb' has been created. -27/11/2006 11:41:59 (InfL2) Assigning LookNFeel 'OpenGateLook/OGVerticalScrollbarThumb' to window 'WelcomeText__auto_hscrollbar____auto_thumb__'. -27/11/2006 11:41:59 (InfL2) Window 'WelcomeText__auto_vscrollbar__' of type 'OpenGateLook/OGVerticalScrollbar' has been created. -27/11/2006 11:41:59 (InfL2) Assigning LookNFeel 'OpenGateLook/OGVerticalScrollbar' to window 'WelcomeText__auto_vscrollbar__'. -27/11/2006 11:41:59 (InfL2) Window 'WelcomeText__auto_vscrollbar____auto_incbtn__' of type 'OpenGateLook/OGButton' has been created. -27/11/2006 11:41:59 (InfL2) Assigning LookNFeel 'OpenGateLook/OGButton' to window 'WelcomeText__auto_vscrollbar____auto_incbtn__'. -27/11/2006 11:41:59 (InfL2) Window 'WelcomeText__auto_vscrollbar____auto_decbtn__' of type 'OpenGateLook/OGButton' has been created. -27/11/2006 11:41:59 (InfL2) Assigning LookNFeel 'OpenGateLook/OGButton' to window 'WelcomeText__auto_vscrollbar____auto_decbtn__'. -27/11/2006 11:41:59 (InfL2) Window 'WelcomeText__auto_vscrollbar____auto_thumb__' of type 'OpenGateLook/OGVerticalScrollbarThumb' has been created. -27/11/2006 11:41:59 (InfL2) Assigning LookNFeel 'OpenGateLook/OGVerticalScrollbarThumb' to window 'WelcomeText__auto_vscrollbar____auto_thumb__'. -27/11/2006 11:41:59 (InfL2) Window 'UsernameBox' of type 'OpenGateLook/OGEditbox' has been created. -27/11/2006 11:41:59 (InfL2) Assigning LookNFeel 'OpenGateLook/OGEditbox' to window 'UsernameBox'. -27/11/2006 11:41:59 (InfL2) Window 'PasswordBox' of type 'OpenGateLook/OGEditbox' has been created. -27/11/2006 11:41:59 (InfL2) Assigning LookNFeel 'OpenGateLook/OGEditbox' to window 'PasswordBox'. -27/11/2006 11:41:59 (InfL2) Window 'Connect' of type 'OpenGateLook/OGButton' has been created. -27/11/2006 11:41:59 (InfL2) Assigning LookNFeel 'OpenGateLook/OGButton' to window 'Connect'. -27/11/2006 11:42:05 (InfL2) Window 'ConsoleWindow' of type 'OpenGateLook/OGDefaultFrameWindow' has been created. -27/11/2006 11:42:05 (InfL2) Assigning LookNFeel 'OpenGateLook/OGDefaultFrameWindow' to window 'ConsoleWindow'. -27/11/2006 11:42:05 (InfL2) Window 'ConsoleWindow__auto_titlebar__' of type 'OpenGateLook/OGDefaultTitlebar' has been created. -27/11/2006 11:42:05 (InfL2) Assigning LookNFeel 'OpenGateLook/OGDefaultTitlebar' to window 'ConsoleWindow__auto_titlebar__'. -27/11/2006 11:42:05 (InfL2) Window 'ConsoleWindow__auto_closebutton__' of type 'OpenGateLook/OGSystemButton' has been created. -27/11/2006 11:42:05 (InfL2) Assigning LookNFeel 'OpenGateLook/OGButton' to window 'ConsoleWindow__auto_closebutton__'. -27/11/2006 11:42:05 (InfL2) Window 'ConsoleText' of type 'OpenGateLook/OGStaticText' has been created. -27/11/2006 11:42:05 (InfL2) Assigning LookNFeel 'OpenGateLook/OGStaticText' to window 'ConsoleText'. -27/11/2006 11:42:05 (InfL2) Window 'ConsoleText__auto_hscrollbar__' of type 'OpenGateLook/OGVerticalScrollbar' has been created. -27/11/2006 11:42:05 (InfL2) Assigning LookNFeel 'OpenGateLook/OGVerticalScrollbar' to window 'ConsoleText__auto_hscrollbar__'. -27/11/2006 11:42:05 (InfL2) Window 'ConsoleText__auto_hscrollbar____auto_incbtn__' of type 'OpenGateLook/OGButton' has been created. -27/11/2006 11:42:05 (InfL2) Assigning LookNFeel 'OpenGateLook/OGButton' to window 'ConsoleText__auto_hscrollbar____auto_incbtn__'. -27/11/2006 11:42:05 (InfL2) Window 'ConsoleText__auto_hscrollbar____auto_decbtn__' of type 'OpenGateLook/OGButton' has been created. -27/11/2006 11:42:05 (InfL2) Assigning LookNFeel 'OpenGateLook/OGButton' to window 'ConsoleText__auto_hscrollbar____auto_decbtn__'. -27/11/2006 11:42:05 (InfL2) Window 'ConsoleText__auto_hscrollbar____auto_thumb__' of type 'OpenGateLook/OGVerticalScrollbarThumb' has been created. -27/11/2006 11:42:05 (InfL2) Assigning LookNFeel 'OpenGateLook/OGVerticalScrollbarThumb' to window 'ConsoleText__auto_hscrollbar____auto_thumb__'. -27/11/2006 11:42:05 (InfL2) Window 'ConsoleText__auto_vscrollbar__' of type 'OpenGateLook/OGVerticalScrollbar' has been created. -27/11/2006 11:42:05 (InfL2) Assigning LookNFeel 'OpenGateLook/OGVerticalScrollbar' to window 'ConsoleText__auto_vscrollbar__'. -27/11/2006 11:42:05 (InfL2) Window 'ConsoleText__auto_vscrollbar____auto_incbtn__' of type 'OpenGateLook/OGButton' has been created. -27/11/2006 11:42:05 (InfL2) Assigning LookNFeel 'OpenGateLook/OGButton' to window 'ConsoleText__auto_vscrollbar____auto_incbtn__'. -27/11/2006 11:42:05 (InfL2) Window 'ConsoleText__auto_vscrollbar____auto_decbtn__' of type 'OpenGateLook/OGButton' has been created. -27/11/2006 11:42:05 (InfL2) Assigning LookNFeel 'OpenGateLook/OGButton' to window 'ConsoleText__auto_vscrollbar____auto_decbtn__'. -27/11/2006 11:42:05 (InfL2) Window 'ConsoleText__auto_vscrollbar____auto_thumb__' of type 'OpenGateLook/OGVerticalScrollbarThumb' has been created. -27/11/2006 11:42:05 (InfL2) Assigning LookNFeel 'OpenGateLook/OGVerticalScrollbarThumb' to window 'ConsoleText__auto_vscrollbar____auto_thumb__'. -27/11/2006 11:42:05 (InfL2) Window 'ConsoleEditbox' of type 'OpenGateLook/OGEditbox' has been created. -27/11/2006 11:42:05 (InfL2) Assigning LookNFeel 'OpenGateLook/OGEditbox' to window 'ConsoleEditbox'. -27/11/2006 11:42:40 (InfL2) Window 'Connect' has been added to dead pool. -27/11/2006 11:42:40 (InfL2) Window 'ConsoleEditbox' has been added to dead pool. -27/11/2006 11:42:40 (InfL2) Window 'ConsoleText__auto_vscrollbar____auto_thumb__' has been added to dead pool. -27/11/2006 11:42:40 (InfL2) Window 'ConsoleText__auto_vscrollbar____auto_incbtn__' has been added to dead pool. -27/11/2006 11:42:40 (InfL2) Window 'ConsoleText__auto_vscrollbar____auto_decbtn__' has been added to dead pool. -27/11/2006 11:42:40 (InfL2) Window 'ConsoleText__auto_vscrollbar__' has been added to dead pool. -27/11/2006 11:42:40 (InfL2) Window 'ConsoleText__auto_hscrollbar____auto_thumb__' has been added to dead pool. -27/11/2006 11:42:40 (InfL2) Window 'ConsoleText__auto_hscrollbar____auto_incbtn__' has been added to dead pool. -27/11/2006 11:42:40 (InfL2) Window 'ConsoleText__auto_hscrollbar____auto_decbtn__' has been added to dead pool. -27/11/2006 11:42:40 (InfL2) Window 'ConsoleText__auto_hscrollbar__' has been added to dead pool. -27/11/2006 11:42:40 (InfL2) Window 'ConsoleText' has been added to dead pool. -27/11/2006 11:42:40 (InfL2) Window 'ConsoleWindow__auto_titlebar__' has been added to dead pool. -27/11/2006 11:42:40 (InfL2) Window 'ConsoleWindow__auto_closebutton__' has been added to dead pool. -27/11/2006 11:42:40 (InfL2) Window 'ConsoleWindow' has been added to dead pool. -27/11/2006 11:42:40 (InfL2) Window 'LoginWindow__auto_titlebar__' has been added to dead pool. -27/11/2006 11:42:40 (InfL2) Window 'LoginWindow__auto_closebutton__' has been added to dead pool. -27/11/2006 11:42:40 (InfL2) Window 'WelcomeText__auto_vscrollbar____auto_thumb__' has been added to dead pool. -27/11/2006 11:42:40 (InfL2) Window 'WelcomeText__auto_vscrollbar____auto_incbtn__' has been added to dead pool. -27/11/2006 11:42:40 (InfL2) Window 'WelcomeText__auto_vscrollbar____auto_decbtn__' has been added to dead pool. -27/11/2006 11:42:40 (InfL2) Window 'WelcomeText__auto_vscrollbar__' has been added to dead pool. -27/11/2006 11:42:40 (InfL2) Window 'WelcomeText__auto_hscrollbar____auto_thumb__' has been added to dead pool. -27/11/2006 11:42:40 (InfL2) Window 'WelcomeText__auto_hscrollbar____auto_incbtn__' has been added to dead pool. -27/11/2006 11:42:40 (InfL2) Window 'WelcomeText__auto_hscrollbar____auto_decbtn__' has been added to dead pool. -27/11/2006 11:42:40 (InfL2) Window 'WelcomeText__auto_hscrollbar__' has been added to dead pool. -27/11/2006 11:42:40 (InfL2) Window 'WelcomeText' has been added to dead pool. -27/11/2006 11:42:40 (InfL2) Window 'UsernameBox' has been added to dead pool. -27/11/2006 11:42:40 (InfL2) Window 'PasswordBox' has been added to dead pool. -27/11/2006 11:42:40 (InfL2) Window 'LoginWindow' has been added to dead pool. -27/11/2006 11:42:40 (InfL2) Window 'Sheet' has been added to dead pool. -27/11/2006 11:42:40 (InfL2) Window 'Sheet' of type 'DefaultWindow' has been created. -27/11/2006 11:42:40 (InfL2) Window 'ConsoleWindow' of type 'OpenGateLook/OGDefaultFrameWindow' has been created. -27/11/2006 11:42:40 (InfL2) Assigning LookNFeel 'OpenGateLook/OGDefaultFrameWindow' to window 'ConsoleWindow'. -27/11/2006 11:42:40 (InfL2) Window 'ConsoleWindow__auto_titlebar__' of type 'OpenGateLook/OGDefaultTitlebar' has been created. -27/11/2006 11:42:40 (InfL2) Assigning LookNFeel 'OpenGateLook/OGDefaultTitlebar' to window 'ConsoleWindow__auto_titlebar__'. -27/11/2006 11:42:40 (InfL2) Window 'ConsoleWindow__auto_closebutton__' of type 'OpenGateLook/OGSystemButton' has been created. -27/11/2006 11:42:40 (InfL2) Assigning LookNFeel 'OpenGateLook/OGButton' to window 'ConsoleWindow__auto_closebutton__'. -27/11/2006 11:42:40 (InfL2) Window 'ConsoleText' of type 'OpenGateLook/OGStaticText' has been created. -27/11/2006 11:42:40 (InfL2) Assigning LookNFeel 'OpenGateLook/OGStaticText' to window 'ConsoleText'. -27/11/2006 11:42:40 (InfL2) Window 'ConsoleText__auto_hscrollbar__' of type 'OpenGateLook/OGVerticalScrollbar' has been created. -27/11/2006 11:42:40 (InfL2) Assigning LookNFeel 'OpenGateLook/OGVerticalScrollbar' to window 'ConsoleText__auto_hscrollbar__'. -27/11/2006 11:42:40 (InfL2) Window 'ConsoleText__auto_hscrollbar____auto_incbtn__' of type 'OpenGateLook/OGButton' has been created. -27/11/2006 11:42:40 (InfL2) Assigning LookNFeel 'OpenGateLook/OGButton' to window 'ConsoleText__auto_hscrollbar____auto_incbtn__'. -27/11/2006 11:42:40 (InfL2) Window 'ConsoleText__auto_hscrollbar____auto_decbtn__' of type 'OpenGateLook/OGButton' has been created. -27/11/2006 11:42:40 (InfL2) Assigning LookNFeel 'OpenGateLook/OGButton' to window 'ConsoleText__auto_hscrollbar____auto_decbtn__'. -27/11/2006 11:42:40 (InfL2) Window 'ConsoleText__auto_hscrollbar____auto_thumb__' of type 'OpenGateLook/OGVerticalScrollbarThumb' has been created. -27/11/2006 11:42:40 (InfL2) Assigning LookNFeel 'OpenGateLook/OGVerticalScrollbarThumb' to window 'ConsoleText__auto_hscrollbar____auto_thumb__'. -27/11/2006 11:42:40 (InfL2) Window 'ConsoleText__auto_vscrollbar__' of type 'OpenGateLook/OGVerticalScrollbar' has been created. -27/11/2006 11:42:40 (InfL2) Assigning LookNFeel 'OpenGateLook/OGVerticalScrollbar' to window 'ConsoleText__auto_vscrollbar__'. -27/11/2006 11:42:40 (InfL2) Window 'ConsoleText__auto_vscrollbar____auto_incbtn__' of type 'OpenGateLook/OGButton' has been created. -27/11/2006 11:42:40 (InfL2) Assigning LookNFeel 'OpenGateLook/OGButton' to window 'ConsoleText__auto_vscrollbar____auto_incbtn__'. -27/11/2006 11:42:40 (InfL2) Window 'ConsoleText__auto_vscrollbar____auto_decbtn__' of type 'OpenGateLook/OGButton' has been created. -27/11/2006 11:42:40 (InfL2) Assigning LookNFeel 'OpenGateLook/OGButton' to window 'ConsoleText__auto_vscrollbar____auto_decbtn__'. -27/11/2006 11:42:40 (InfL2) Window 'ConsoleText__auto_vscrollbar____auto_thumb__' of type 'OpenGateLook/OGVerticalScrollbarThumb' has been created. -27/11/2006 11:42:40 (InfL2) Assigning LookNFeel 'OpenGateLook/OGVerticalScrollbarThumb' to window 'ConsoleText__auto_vscrollbar____auto_thumb__'. -27/11/2006 11:42:40 (InfL2) Window 'ConsoleEditbox' of type 'OpenGateLook/OGEditbox' has been created. -27/11/2006 11:42:40 (InfL2) Assigning LookNFeel 'OpenGateLook/OGEditbox' to window 'ConsoleEditbox'. -27/11/2006 11:42:40 (InfL2) Window 'userInterfacePanel' of type 'OpenGateLook/OGUIPanels' has been created. -27/11/2006 11:42:40 (InfL2) Assigning LookNFeel 'OpenGateLook/OGUIPanels' to window 'userInterfacePanel'. -27/11/2006 11:42:40 (InfL2) Window 'ProgressBar' of type 'OpenGateLook/OGProgressBarHull' has been created. -27/11/2006 11:42:40 (InfL2) Assigning LookNFeel 'OpenGateLook/OGProgressBarHull' to window 'ProgressBar'. -27/11/2006 11:42:40 (InfL2) Window 'ProgressBar1' of type 'OpenGateLook/OGProgressBarShield' has been created. -27/11/2006 11:42:40 (InfL2) Assigning LookNFeel 'OpenGateLook/OGProgressBarShield' to window 'ProgressBar1'. -27/11/2006 11:42:40 (InfL2) Window 'ProgressBar2' of type 'OpenGateLook/OGProgressBarEnergy' has been created. -27/11/2006 11:42:40 (InfL2) Assigning LookNFeel 'OpenGateLook/OGProgressBarEnergy' to window 'ProgressBar2'. -27/11/2006 11:42:40 (InfL2) Window 'ProgressBar3' of type 'OpenGateLook/OGProgressBarVert' has been created. -27/11/2006 11:42:40 (InfL2) Assigning LookNFeel 'OpenGateLook/OGProgressBarVert' to window 'ProgressBar3'. -27/11/2006 11:42:40 (InfL2) Window 'ProgressBar4' of type 'OpenGateLook/OGProgressBarWeapon1' has been created. -27/11/2006 11:42:40 (InfL2) Assigning LookNFeel 'OpenGateLook/OGProgressBarWeapon1' to window 'ProgressBar4'. -27/11/2006 11:42:40 (InfL2) Window 'ProgressBar5' of type 'OpenGateLook/OGProgressBarWeapon2' has been created. -27/11/2006 11:42:40 (InfL2) Assigning LookNFeel 'OpenGateLook/OGProgressBarWeapon2' to window 'ProgressBar5'. -27/11/2006 11:42:40 (InfL2) Window 'ProgressBar6' of type 'OpenGateLook/OGProgressBarWeapon3' has been created. -27/11/2006 11:42:40 (InfL2) Assigning LookNFeel 'OpenGateLook/OGProgressBarWeapon3' to window 'ProgressBar6'. -27/11/2006 11:42:43 (InfL2) Window 'ConsoleEditbox' has been added to dead pool. -27/11/2006 11:42:43 (InfL2) Window 'ConsoleText__auto_vscrollbar____auto_thumb__' has been added to dead pool. -27/11/2006 11:42:43 (InfL2) Window 'ConsoleText__auto_vscrollbar____auto_incbtn__' has been added to dead pool. -27/11/2006 11:42:43 (InfL2) Window 'ConsoleText__auto_vscrollbar____auto_decbtn__' has been added to dead pool. -27/11/2006 11:42:43 (InfL2) Window 'ConsoleText__auto_vscrollbar__' has been added to dead pool. -27/11/2006 11:42:43 (InfL2) Window 'ConsoleText__auto_hscrollbar____auto_thumb__' has been added to dead pool. -27/11/2006 11:42:43 (InfL2) Window 'ConsoleText__auto_hscrollbar____auto_incbtn__' has been added to dead pool. -27/11/2006 11:42:43 (InfL2) Window 'ConsoleText__auto_hscrollbar____auto_decbtn__' has been added to dead pool. -27/11/2006 11:42:43 (InfL2) Window 'ConsoleText__auto_hscrollbar__' has been added to dead pool. -27/11/2006 11:42:43 (InfL2) Window 'ConsoleText' has been added to dead pool. -27/11/2006 11:42:43 (InfL2) Window 'ConsoleWindow__auto_titlebar__' has been added to dead pool. -27/11/2006 11:42:43 (InfL2) Window 'ConsoleWindow__auto_closebutton__' has been added to dead pool. -27/11/2006 11:42:43 (InfL2) Window 'ConsoleWindow' has been added to dead pool. -27/11/2006 11:42:43 (InfL2) Window 'ProgressBar' has been added to dead pool. -27/11/2006 11:42:43 (InfL2) Window 'ProgressBar1' has been added to dead pool. -27/11/2006 11:42:43 (InfL2) Window 'ProgressBar2' has been added to dead pool. -27/11/2006 11:42:43 (InfL2) Window 'ProgressBar3' has been added to dead pool. -27/11/2006 11:42:43 (InfL2) Window 'ProgressBar4' has been added to dead pool. -27/11/2006 11:42:43 (InfL2) Window 'ProgressBar5' has been added to dead pool. -27/11/2006 11:42:43 (InfL2) Window 'ProgressBar6' has been added to dead pool. -27/11/2006 11:42:43 (InfL2) Window 'userInterfacePanel' has been added to dead pool. -27/11/2006 11:42:43 (InfL2) Window 'Sheet' has been added to dead pool. -27/11/2006 11:42:43 (Error) Unable to unload non-existant scheme 'OpenGateLook.scheme'. +30/11/2006 14:28:41 (InfL1) Attempting to load Scheme from file 'OpenGateLook.scheme'. +30/11/2006 14:28:41 (InfL2) Started creation of Scheme 'OpenGateLook' via XML file. +30/11/2006 14:28:41 (InfL2) Finished creation of Scheme 'OpenGateLook' via XML file. +30/11/2006 14:28:41 (InfL2) Loaded GUI scheme 'OpenGateLook' from data in file 'OpenGateLook.scheme'. +30/11/2006 14:28:41 (InfL2) ---- Begining resource loading for GUI scheme 'OpenGateLook' ---- +30/11/2006 14:28:41 (InfL1) Attempting to create an Imageset from the information specified in file 'OpenGateLook.imageset'. +30/11/2006 14:28:41 (InfL2) Started creation of Imageset 'OpenGateLook' via XML file. +30/11/2006 14:28:41 (InfL2) Finished creation of Imageset 'OpenGateLook' via XML file. +30/11/2006 14:28:41 (InfL1) Attempting to create Font from the information specified in file 'BlueHighway-12.font'. +30/11/2006 14:28:41 (InfL2) Started creation of Font 'BlueHighway-12' via XML file. +30/11/2006 14:28:41 (InfL1) Attempting to create Imageset 'BlueHighway-12_auto_glyph_images' with texture only. +30/11/2006 14:28:41 (InfL2) Font 'BlueHighway-12' now has the following glyphs defined: ' !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'. +30/11/2006 14:28:41 (InfL2) Finished creation of Font 'BlueHighway-12' via XML file. +30/11/2006 14:28:41 (InfL1) Attempting to create Font from the information specified in file 'BlueHighway-10.font'. +30/11/2006 14:28:41 (InfL2) Started creation of Font 'BlueHighway-10' via XML file. +30/11/2006 14:28:41 (InfL1) Attempting to create Imageset 'BlueHighway-10_auto_glyph_images' with texture only. +30/11/2006 14:28:41 (InfL2) Font 'BlueHighway-10' now has the following glyphs defined: ' !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'. +30/11/2006 14:28:41 (InfL2) Finished creation of Font 'BlueHighway-10' via XML file. +30/11/2006 14:28:41 (InfL1) ===== Falagard 'root' element: look and feel parsing begins ===== +30/11/2006 14:28:41 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGUIPanels'. +30/11/2006 14:28:41 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGUIPanels'. +30/11/2006 14:28:41 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGProgressBarShield'. +30/11/2006 14:28:41 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGProgressBarShield'. +30/11/2006 14:28:41 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGProgressBarEnergy'. +30/11/2006 14:28:41 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGProgressBarEnergy'. +30/11/2006 14:28:41 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGProgressBarHull'. +30/11/2006 14:28:41 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGProgressBarHull'. +30/11/2006 14:28:41 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGProgressBarVert'. +30/11/2006 14:28:41 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGProgressBarVert'. +30/11/2006 14:28:41 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGEditbox'. +30/11/2006 14:28:41 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGEditbox'. +30/11/2006 14:28:41 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGProgressBarWeapon1'. +30/11/2006 14:28:41 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGProgressBarWeapon1'. +30/11/2006 14:28:41 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGProgressBarWeapon2'. +30/11/2006 14:28:41 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGProgressBarWeapon2'. +30/11/2006 14:28:41 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGProgressBarWeapon3'. +30/11/2006 14:28:41 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGProgressBarWeapon3'. +30/11/2006 14:28:41 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGDefaultFrameWindow'. +30/11/2006 14:28:41 (Error) Exception: Imageset::getImage - The Image named 'OGDefaultWindowTopLeft' could not be found in Imageset 'OpenGateLook'. +30/11/2006 14:28:41 (Error) Exception: Imageset::getImage - The Image named 'OGDefaultWindowTopRight' could not be found in Imageset 'OpenGateLook'. +30/11/2006 14:28:41 (Error) Exception: Imageset::getImage - The Image named 'OGDefaultWindowTopEdge' could not be found in Imageset 'OpenGateLook'. +30/11/2006 14:28:41 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGDefaultFrameWindow'. +30/11/2006 14:28:41 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGDefaultTitlebar'. +30/11/2006 14:28:41 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGDefaultTitlebar'. +30/11/2006 14:28:41 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGButton'. +30/11/2006 14:28:41 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGButton'. +30/11/2006 14:28:41 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGStaticText'. +30/11/2006 14:28:41 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGStaticText'. +30/11/2006 14:28:41 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGStaticShared'. +30/11/2006 14:28:41 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGStaticShared'. +30/11/2006 14:28:41 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGVerticalScrollbarThumb'. +30/11/2006 14:28:41 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGVerticalScrollbarThumb'. +30/11/2006 14:28:41 (InfL2) ---> Start of definition for widget look 'OpenGateLook/OGVerticalScrollbar'. +30/11/2006 14:28:41 (InfL2) ---< End of definition for widget look 'OpenGateLook/OGVerticalScrollbar'. +30/11/2006 14:28:41 (InfL1) ===== Look and feel parsing completed ===== +30/11/2006 14:28:41 (InfL1) No window factories specified for module 'CEGUIFalagardBase' - adding all available factories... +30/11/2006 14:28:41 (InfL1) WindowFactory for 'Falagard/Button' windows added. +30/11/2006 14:28:41 (InfL1) WindowFactory for 'Falagard/Checkbox' windows added. +30/11/2006 14:28:41 (InfL1) WindowFactory for 'Falagard/ComboDropList' windows added. +30/11/2006 14:28:41 (InfL1) WindowFactory for 'Falagard/Combobox' windows added. +30/11/2006 14:28:41 (InfL1) WindowFactory for 'Falagard/Editbox' windows added. +30/11/2006 14:28:41 (InfL1) WindowFactory for 'Falagard/FrameWindow' windows added. +30/11/2006 14:28:41 (InfL1) WindowFactory for 'Falagard/ListHeader' windows added. +30/11/2006 14:28:41 (InfL1) WindowFactory for 'Falagard/ListHeaderSegment' windows added. +30/11/2006 14:28:41 (InfL1) WindowFactory for 'Falagard/Listbox' windows added. +30/11/2006 14:28:41 (InfL1) WindowFactory for 'Falagard/Menubar' windows added. +30/11/2006 14:28:41 (InfL1) WindowFactory for 'Falagard/MenuItem' windows added. +30/11/2006 14:28:41 (InfL1) WindowFactory for 'Falagard/MultiColumnList' windows added. +30/11/2006 14:28:41 (InfL1) WindowFactory for 'Falagard/MultiLineEditbox' windows added. +30/11/2006 14:28:41 (InfL1) WindowFactory for 'Falagard/PopupMenu' windows added. +30/11/2006 14:28:41 (InfL1) WindowFactory for 'Falagard/ProgressBar' windows added. +30/11/2006 14:28:41 (InfL1) WindowFactory for 'Falagard/RadioButton' windows added. +30/11/2006 14:28:41 (InfL1) WindowFactory for 'Falagard/ScrollablePane' windows added. +30/11/2006 14:28:41 (InfL1) WindowFactory for 'Falagard/Scrollbar' windows added. +30/11/2006 14:28:41 (InfL1) WindowFactory for 'Falagard/Slider' windows added. +30/11/2006 14:28:41 (InfL1) WindowFactory for 'Falagard/Spinner' windows added. +30/11/2006 14:28:41 (InfL1) WindowFactory for 'Falagard/StaticImage' windows added. +30/11/2006 14:28:41 (InfL1) WindowFactory for 'Falagard/StaticText' windows added. +30/11/2006 14:28:41 (InfL1) WindowFactory for 'Falagard/SystemButton' windows added. +30/11/2006 14:28:41 (InfL1) WindowFactory for 'Falagard/TabButton' windows added. +30/11/2006 14:28:41 (InfL1) WindowFactory for 'Falagard/TabControl' windows added. +30/11/2006 14:28:41 (InfL1) WindowFactory for 'Falagard/TabPane' windows added. +30/11/2006 14:28:41 (InfL1) WindowFactory for 'Falagard/Thumb' windows added. +30/11/2006 14:28:41 (InfL1) WindowFactory for 'Falagard/Titlebar' windows added. +30/11/2006 14:28:41 (InfL1) WindowFactory for 'Falagard/Tooltip' windows added. +30/11/2006 14:28:41 (InfL1) Creating falagard mapping for type 'OpenGateLook/OGButton' using base type 'Falagard/Button' and LookN'Feel 'OpenGateLook/OGButton'. +30/11/2006 14:28:41 (InfL1) Creating falagard mapping for type 'OpenGateLook/OGDefaultFrameWindow' using base type 'Falagard/FrameWindow' and LookN'Feel 'OpenGateLook/OGDefaultFrameWindow'. +30/11/2006 14:28:41 (InfL1) Creating falagard mapping for... [truncated message content] |