[Orxonox-commit 3777] r8457 - in code/trunk: . data/levels src/modules src/modules/objects/triggers src/modules/portals
FelixSchulthess at orxonox.net
FelixSchulthess at orxonox.net
Thu May 12 13:51:19 CEST 2011
Author: FelixSchulthess
Date: 2011-05-12 13:51:18 +0200 (Thu, 12 May 2011)
New Revision: 8457
Added:
code/trunk/data/levels/portals.oxw
code/trunk/src/modules/portals/
code/trunk/src/modules/portals/CMakeLists.txt
code/trunk/src/modules/portals/PortalEndPoint.cc
code/trunk/src/modules/portals/PortalEndPoint.h
code/trunk/src/modules/portals/PortalLink.cc
code/trunk/src/modules/portals/PortalLink.h
code/trunk/src/modules/portals/PortalsPrecompiledHeaders.h
code/trunk/src/modules/portals/PortalsPrereqs.h
Removed:
code/trunk/src/modules/portals/CMakeLists.txt
code/trunk/src/modules/portals/PortalEndPoint.cc
code/trunk/src/modules/portals/PortalEndPoint.h
code/trunk/src/modules/portals/PortalLink.cc
code/trunk/src/modules/portals/PortalLink.h
code/trunk/src/modules/portals/PortalsPrecompiledHeaders.h
code/trunk/src/modules/portals/PortalsPrereqs.h
Modified:
code/trunk/
code/trunk/src/modules/CMakeLists.txt
code/trunk/src/modules/objects/triggers/MultiTrigger.h
Log:
merged portals branch into trunk
Property changes on: code/trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /code/branches/ai:6592-7033
/code/branches/buildsystem:1874-2276,2278-2400
/code/branches/buildsystem2:2506-2658
/code/branches/buildsystem3:2662-2708
/code/branches/ceguilua:1802-1808
/code/branches/chat:6527-6797
/code/branches/chat2:6836-6910
/code/branches/console:5941-6104
/code/branches/consolecommands2:6451-7178
/code/branches/consolecommands3:7178-7283
/code/branches/core3:1572-1739
/code/branches/core4:3221-3224,3227,3234-3238,3242,3244-3250,3252-3254,3256,3259-3261,3264-3265,3268-3275,3277-3278,3280,3284-3285,3287,3289-3294,3305,3309-3310
/code/branches/core5:5768-5928,6009
/code/branches/data_cleanup:7537-7686
/code/branches/doc:7290-7400
/code/branches/dynamicmatch:6584-7030
/code/branches/fps:6591-7072
/code/branches/gamestate:6430-6572,6621-6661
/code/branches/gamestates2:6594-6745
/code/branches/gametypes:2826-3031
/code/branches/gcc43:1580
/code/branches/gui:1635-1723,2795-2894
/code/branches/hudelements:6584-6941
/code/branches/ingamemenu:6000-6023
/code/branches/input:1629-1636
/code/branches/ipv6:7293-7458
/code/branches/kicklib:7940-8096,8098-8277
/code/branches/kicklib2:8282-8350
/code/branches/lastmanstanding:7479-7644
/code/branches/lastmanstanding3:7903-8175
/code/branches/libraries:5612-5692
/code/branches/libraries2:5703-5737
/code/branches/lod:6586-6911
/code/branches/lodfinal:2372-2411
/code/branches/mac_osx:7789-8128,8135
/code/branches/map:2801-3086,3089
/code/branches/masterserver:7502-7738
/code/branches/menu:5941-6146,6148,7536-7687
/code/branches/miniprojects:2754-2824
/code/branches/netp2:2835-2988
/code/branches/netp3:2988-3082
/code/branches/netp6:3214-3302
/code/branches/network:2356
/code/branches/network2:6434-6465
/code/branches/network3:7196-7344
/code/branches/network4:7497-7755
/code/branches/network5:7757-7781
/code/branches/network6:7823-8315
/code/branches/network64:2210-2355
/code/branches/notifications:7314-7401
/code/branches/objecthierarchy:1911-2085,2100,2110-2169
/code/branches/objecthierarchy2:2171-2479
/code/branches/ois_update:7506-7788
/code/branches/overlay:2117-2385
/code/branches/particles:2829-3085
/code/branches/particles2:6050-6106,6109
/code/branches/pch:3113-3194
/code/branches/physics:1912-2055,2107-2439
/code/branches/physics_merge:2436-2457
/code/branches/pickup2:5942-6405
/code/branches/pickup3:6418-6523
/code/branches/pickup4:6594-6710
/code/branches/pickups:1926-2086,2127,2827-2915
/code/branches/pickups2:2107-2497,2915-3071
/code/branches/png2:7262-7263
/code/branches/ppspickups1:6552-6708
/code/branches/ppspickups2:6527-6532,6554-6709
/code/branches/ppspickups3:6757-6997
/code/branches/ppspickups4:7003-7089
/code/branches/presentation:2369-2652,2654-2660,7736-7786
/code/branches/presentation2:6106-6416,7787-7800
/code/branches/presentation3:6913-7162
/code/branches/questsystem:1894-2088
/code/branches/questsystem2:2107-2259
/code/branches/questsystem5:2776-2905
/code/branches/releasetodo:7614-7647
/code/branches/resource:3327-3366
/code/branches/resource2:3372-5694
/code/branches/rocket:6523-6950
/code/branches/rocket2:6953-6970
/code/branches/script_trigger:1295-1953,1955
/code/branches/skybox2:6559-6989
/code/branches/sound:2829-3010
/code/branches/sound3:5941-6102
/code/branches/steering:5949-6091
/code/branches/tetris:8100-8107
/code/branches/usability:7915-8078
/code/branches/weapon:1925-2094
/code/branches/weapon2:2107-2488
/code/branches/weapons:2897-3051
/code/branches/weaponsystem:2742-2890
+ /code/branches/ai:6592-7033
/code/branches/buildsystem:1874-2276,2278-2400
/code/branches/buildsystem2:2506-2658
/code/branches/buildsystem3:2662-2708
/code/branches/ceguilua:1802-1808
/code/branches/chat:6527-6797
/code/branches/chat2:6836-6910
/code/branches/console:5941-6104
/code/branches/consolecommands2:6451-7178
/code/branches/consolecommands3:7178-7283
/code/branches/core3:1572-1739
/code/branches/core4:3221-3224,3227,3234-3238,3242,3244-3250,3252-3254,3256,3259-3261,3264-3265,3268-3275,3277-3278,3280,3284-3285,3287,3289-3294,3305,3309-3310
/code/branches/core5:5768-5928,6009
/code/branches/data_cleanup:7537-7686
/code/branches/doc:7290-7400
/code/branches/dynamicmatch:6584-7030
/code/branches/fps:6591-7072
/code/branches/gamestate:6430-6572,6621-6661
/code/branches/gamestates2:6594-6745
/code/branches/gametypes:2826-3031
/code/branches/gcc43:1580
/code/branches/gui:1635-1723,2795-2894
/code/branches/hudelements:6584-6941
/code/branches/ingamemenu:6000-6023
/code/branches/input:1629-1636
/code/branches/ipv6:7293-7458
/code/branches/kicklib:7940-8096,8098-8277
/code/branches/kicklib2:8282-8350
/code/branches/lastmanstanding:7479-7644
/code/branches/lastmanstanding3:7903-8175
/code/branches/libraries:5612-5692
/code/branches/libraries2:5703-5737
/code/branches/lod:6586-6911
/code/branches/lodfinal:2372-2411
/code/branches/mac_osx:7789-8128,8135
/code/branches/map:2801-3086,3089
/code/branches/masterserver:7502-7738
/code/branches/menu:5941-6146,6148,7536-7687
/code/branches/miniprojects:2754-2824
/code/branches/netp2:2835-2988
/code/branches/netp3:2988-3082
/code/branches/netp6:3214-3302
/code/branches/network:2356
/code/branches/network2:6434-6465
/code/branches/network3:7196-7344
/code/branches/network4:7497-7755
/code/branches/network5:7757-7781
/code/branches/network6:7823-8315
/code/branches/network64:2210-2355
/code/branches/notifications:7314-7401
/code/branches/objecthierarchy:1911-2085,2100,2110-2169
/code/branches/objecthierarchy2:2171-2479
/code/branches/ois_update:7506-7788
/code/branches/overlay:2117-2385
/code/branches/particles:2829-3085
/code/branches/particles2:6050-6106,6109
/code/branches/pch:3113-3194
/code/branches/physics:1912-2055,2107-2439
/code/branches/physics_merge:2436-2457
/code/branches/pickup2:5942-6405
/code/branches/pickup3:6418-6523
/code/branches/pickup4:6594-6710
/code/branches/pickups:1926-2086,2127,2827-2915
/code/branches/pickups2:2107-2497,2915-3071
/code/branches/png2:7262-7263
/code/branches/portals:8087-8455
/code/branches/ppspickups1:6552-6708
/code/branches/ppspickups2:6527-6532,6554-6709
/code/branches/ppspickups3:6757-6997
/code/branches/ppspickups4:7003-7089
/code/branches/presentation:2369-2652,2654-2660,7736-7786
/code/branches/presentation2:6106-6416,7787-7800
/code/branches/presentation3:6913-7162
/code/branches/questsystem:1894-2088
/code/branches/questsystem2:2107-2259
/code/branches/questsystem5:2776-2905
/code/branches/releasetodo:7614-7647
/code/branches/resource:3327-3366
/code/branches/resource2:3372-5694
/code/branches/rocket:6523-6950
/code/branches/rocket2:6953-6970
/code/branches/script_trigger:1295-1953,1955
/code/branches/skybox2:6559-6989
/code/branches/sound:2829-3010
/code/branches/sound3:5941-6102
/code/branches/steering:5949-6091
/code/branches/tetris:8100-8107
/code/branches/usability:7915-8078
/code/branches/weapon:1925-2094
/code/branches/weapon2:2107-2488
/code/branches/weapons:2897-3051
/code/branches/weaponsystem:2742-2890
Copied: code/trunk/data/levels/portals.oxw (from rev 8455, code/branches/portals/data/levels/portals.oxw)
===================================================================
--- code/trunk/data/levels/portals.oxw (rev 0)
+++ code/trunk/data/levels/portals.oxw 2011-05-12 11:51:18 UTC (rev 8457)
@@ -0,0 +1,111 @@
+
+<LevelInfo
+ name = "Portals"
+ description = "Level for testing portals"
+ tags = "tutorial"
+/>
+
+<?lua
+ include("HUDTemplates3.oxo")
+ include("stats.oxo")
+ include("templates/spaceshipAssff.oxt")
+ include("templates/pickupRepresentationTemplates.oxt")
+ include("templates/lodInformation.oxt")
+?>
+
+<Level
+ name = "Presentation"
+ description = "A simple testlevel"
+>
+ <templates>
+ <Template link=lodtemplate_default />
+ </templates>
+
+ <Scene
+ ambientlight = "0.5, 0.5, 0.5"
+ skybox = "Orxonox/skypanoramagen1"
+ >
+
+ <Template name=PortalDefault>
+ <PortalEndPoint>
+ <attached>
+ <Billboard material="Portals/Default" />
+ </attached>
+ </PortalEndPoint>
+ </Template>
+
+ <PortalEndPoint position="0,0,0" id="1" distance="40" target="MobileEntity" design="PortalDefault"/>
+ <PortalEndPoint position="-100,0,0" id="2" distance="40" target="MobileEntity" design="PortalDefault"/>
+ <PortalLink fromID="1" toID="2" />
+ <PortalLink fromID="2" toID="1" />
+
+ <!--PickupSpawner position="-200,0,0" triggerDistance="10" respawnTime="10" maxSpawnedItems="10">
+ <pickup>
+ <DronePickup template=dronepickup />
+ </pickup>
+ </PickupSpawner-->
+
+ <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
+
+ <SpawnPoint position="200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
+
+ <GlobalShader compositor="Bloom" visible=false>
+ <events>
+ <visibility>
+ <DistanceTrigger position="0,0,0" distance=30 target="Spectator" switch=true />
+ </visibility>
+ </events>
+ </GlobalShader>
+
+
+<!--
+ <Model position="0,0,0" scale=8 mesh="ast1.mesh" />
+ <StaticEntity position="0,0,0" collisionType=static>
+ <collisionShapes>
+ <SphereCollisionShape radius="20" />
+ </collisionShapes>
+ </StaticEntity>
+-->
+
+
+<!--
+ <?lua
+ for i = 1, 70, 1 do
+ ?>
+ <MovableEntity position="<?lua print(math.random() * 6000 - 3000)?>, <?lua print(math.random() * 6000 - 3000) ?>, <?lua print(math.random() * 1000 + 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
+ <attached>
+ <Model scale="<?lua print(math.random() * 30 + 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
+ </attached>
+ </MovableEntity>
+ <MovableEntity position="<?lua print(math.random() * 6000 - 3000)?>, <?lua print(math.random() * 6000 - 3000) ?>, <?lua print(math.random() * -1000 - 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
+ <attached>
+ <Model scale="<?lua print(math.random() * 30 + 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
+ </attached>
+ </MovableEntity>
+
+ <MovableEntity position="<?lua print(math.random() * 6000 - 3000)?>, <?lua print(math.random() * 1000 + 3000) ?>, <?lua print(math.random() * 6000 - 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
+ <attached>
+ <Model scale="<?lua print(math.random() * 30 + 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
+ </attached>
+ </MovableEntity>
+ <MovableEntity position="<?lua print(math.random() * 6000 - 3000)?>, <?lua print(math.random() * -1000 - 3000) ?>, <?lua print(math.random() * 6000 - 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
+ <attached>
+ <Model scale="<?lua print(math.random() * 30 + 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
+ </attached>
+ </MovableEntity>
+
+ <MovableEntity position="<?lua print(math.random() * 1000 + 3000)?>, <?lua print(math.random() * 6000 - 3000) ?>, <?lua print(math.random() * 6000 - 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
+ <attached>
+ <Model scale="<?lua print(math.random() * 30 + 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
+ </attached>
+ </MovableEntity>
+ <MovableEntity position="<?lua print(math.random() * -1000 - 3000)?>, <?lua print(math.random() * 6000 - 3000) ?>, <?lua print(math.random() * 6000 - 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
+ <attached>
+ <Model scale="<?lua print(math.random() * 30 + 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
+ </attached>
+ </MovableEntity>
+ <?lua end ?>
+-->
+
+ </Scene>
+</Level>
Modified: code/trunk/src/modules/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/CMakeLists.txt 2011-05-12 11:35:05 UTC (rev 8456)
+++ code/trunk/src/modules/CMakeLists.txt 2011-05-12 11:51:18 UTC (rev 8457)
@@ -31,5 +31,6 @@
ADD_SUBDIRECTORY(overlays)
ADD_SUBDIRECTORY(pickup)
ADD_SUBDIRECTORY(pong)
+ADD_SUBDIRECTORY(portals)
ADD_SUBDIRECTORY(questsystem)
ADD_SUBDIRECTORY(weapons)
Modified: code/trunk/src/modules/objects/triggers/MultiTrigger.h
===================================================================
--- code/trunk/src/modules/objects/triggers/MultiTrigger.h 2011-05-12 11:35:05 UTC (rev 8456)
+++ code/trunk/src/modules/objects/triggers/MultiTrigger.h 2011-05-12 11:51:18 UTC (rev 8457)
@@ -145,6 +145,8 @@
*/
inline bool isTarget(BaseObject* target)
{ if(target == NULL) return true; else return targetMask_.isIncluded(target->getIdentifier()); }
+
+ void addTarget(const std::string& targets); //!< Add some target to the MultiTrigger.
protected:
virtual std::queue<MultiTriggerState*>* letTrigger(void); //!< This method is called by the MultiTrigger to get information about new trigger events that need to be looked at.
@@ -157,8 +159,7 @@
void fire(bool status, BaseObject* originator = NULL); //!< Helper method. Creates an Event for the given status and originator and fires it.
void broadcast(bool status); //!< Helper method. Broadcasts an Event for every object that is a target.
- void addTarget(const std::string& targets); //!< Add some target to the MultiTrigger.
- void removeTarget(const std::string& targets); //!< Remove some target from the MultiTrigger.
+ void removeTarget(const std::string& target); //!< Remove some target from the MultiTrigger.
/**
@brief Get the target mask used to identify the targets of this MultiTrigger.
Deleted: code/trunk/src/modules/portals/CMakeLists.txt
===================================================================
--- code/branches/portals/src/modules/portals/CMakeLists.txt 2011-05-12 11:22:55 UTC (rev 8455)
+++ code/trunk/src/modules/portals/CMakeLists.txt 2011-05-12 11:51:18 UTC (rev 8457)
@@ -1,16 +0,0 @@
-SET_SOURCE_FILES(PORTALS_SRC_FILES
- PortalEndPoint.cc
- PortalLink.cc
-)
-
-ORXONOX_ADD_LIBRARY(portals
- MODULE
- FIND_HEADER_FILES
- TOLUA_FILES
- PCH_FILE
- PortalsPrecompiledHeaders.h
- LINK_LIBRARIES
- orxonox
- objects
- SOURCE_FILES ${PORTALS_SRC_FILES}
-)
Copied: code/trunk/src/modules/portals/CMakeLists.txt (from rev 8455, code/branches/portals/src/modules/portals/CMakeLists.txt)
===================================================================
--- code/trunk/src/modules/portals/CMakeLists.txt (rev 0)
+++ code/trunk/src/modules/portals/CMakeLists.txt 2011-05-12 11:51:18 UTC (rev 8457)
@@ -0,0 +1,16 @@
+SET_SOURCE_FILES(PORTALS_SRC_FILES
+ PortalEndPoint.cc
+ PortalLink.cc
+)
+
+ORXONOX_ADD_LIBRARY(portals
+ MODULE
+ FIND_HEADER_FILES
+ TOLUA_FILES
+ PCH_FILE
+ PortalsPrecompiledHeaders.h
+ LINK_LIBRARIES
+ orxonox
+ objects
+ SOURCE_FILES ${PORTALS_SRC_FILES}
+)
Deleted: code/trunk/src/modules/portals/PortalEndPoint.cc
===================================================================
--- code/branches/portals/src/modules/portals/PortalEndPoint.cc 2011-05-12 11:22:55 UTC (rev 8455)
+++ code/trunk/src/modules/portals/PortalEndPoint.cc 2011-05-12 11:51:18 UTC (rev 8457)
@@ -1,98 +0,0 @@
-#include "PortalEndPoint.h"
-#include "core/XMLPort.h"
-#include "objects/triggers/MultiTriggerContainer.h"
-#include "portals/PortalLink.h"
-#include "worldentities/MobileEntity.h"
-
-
-namespace orxonox
-{
- CreateFactory(PortalEndPoint);
-
- /*static*/ const std::string PortalEndPoint::EVENTFUNCTIONNAME = "execute";
-
- std::map<unsigned int, PortalEndPoint *> PortalEndPoint::idMap_s;
-
- PortalEndPoint::PortalEndPoint(BaseObject* creator) : StaticEntity(creator), id_(0), trigger_(new DistanceMultiTrigger(this))
- {
- RegisterObject(PortalEndPoint);
- this->trigger_->setName("portal");
- this->attach(trigger_);
- }
-
- PortalEndPoint::~PortalEndPoint()
- {
-
- }
-
- void PortalEndPoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
- {
- SUPER(PortalEndPoint, XMLPort, xmlelement, mode);
-
- XMLPortParam(PortalEndPoint, "id", setID, getID, xmlelement, mode);
- XMLPortParam(PortalEndPoint, "design", setTemplate, getTemplate, xmlelement, mode);
- XMLPortParamExtern(PortalEndPoint, DistanceMultiTrigger, this->trigger_, "distance", setDistance, getDistance, xmlelement, mode);
- XMLPortParamLoadOnly(PortalEndPoint, "target", setTargets, xmlelement, mode).defaultValues("Pawn");
-
- // Add the DistanceMultiTrigger as event source.
- this->addEventSource(this->trigger_, EVENTFUNCTIONNAME);
-
- if(mode == XMLPort::LoadObject)
- {
- PortalEndPoint::idMap_s[this->id_] = this;
- }
- }
-
- void PortalEndPoint::XMLEventPort(Element& xmlelement, XMLPort::Mode mode)
- {
- SUPER(PortalEndPoint, XMLEventPort, xmlelement, mode);
-
- XMLPortEventSink(PortalEndPoint, BaseObject, EVENTFUNCTIONNAME, execute, xmlelement, mode);
- }
-
- bool PortalEndPoint::execute(bool bTriggered, BaseObject* trigger)
- {
- if(!this->isActive())
- return true;
-
- MultiTriggerContainer * cont = orxonox_cast<MultiTriggerContainer *>(trigger);
- if(cont == 0)
- return true;
-
- DistanceMultiTrigger * originatingTrigger = orxonox_cast<DistanceMultiTrigger *>(cont->getOriginator());
- if(originatingTrigger == 0)
- {
- COUT(1) << "originator no DistanceMultiTrigger\n" << std::endl;
- return true;
- }
-
- MobileEntity * entity = orxonox_cast<MobileEntity *>(cont->getData());
- if(entity == 0)
- return true;
-
- if(bTriggered)
- {
- if(this->recentlyJumpedOut_.find(entity) == this->recentlyJumpedOut_.end()) // only enter the portal if not just jumped out of it
- {
- PortalLink::use(entity, this);
- }
- }
- else
- {
- this->recentlyJumpedOut_.erase(entity);
- }
-
- return true;
- }
-
- void PortalEndPoint::jumpOut(MobileEntity* entity)
- {
- this->recentlyJumpedOut_.insert(entity);
-
- entity->setPosition(this->getWorldPosition());
- entity->rotate(this->getWorldOrientation());
- entity->setVelocity(this->getWorldOrientation() * entity->getVelocity());
- entity->setVelocity(entity->getVelocity() * 1.5);
- }
-
-}
Copied: code/trunk/src/modules/portals/PortalEndPoint.cc (from rev 8455, code/branches/portals/src/modules/portals/PortalEndPoint.cc)
===================================================================
--- code/trunk/src/modules/portals/PortalEndPoint.cc (rev 0)
+++ code/trunk/src/modules/portals/PortalEndPoint.cc 2011-05-12 11:51:18 UTC (rev 8457)
@@ -0,0 +1,98 @@
+#include "PortalEndPoint.h"
+#include "core/XMLPort.h"
+#include "objects/triggers/MultiTriggerContainer.h"
+#include "portals/PortalLink.h"
+#include "worldentities/MobileEntity.h"
+
+
+namespace orxonox
+{
+ CreateFactory(PortalEndPoint);
+
+ /*static*/ const std::string PortalEndPoint::EVENTFUNCTIONNAME = "execute";
+
+ std::map<unsigned int, PortalEndPoint *> PortalEndPoint::idMap_s;
+
+ PortalEndPoint::PortalEndPoint(BaseObject* creator) : StaticEntity(creator), id_(0), trigger_(new DistanceMultiTrigger(this))
+ {
+ RegisterObject(PortalEndPoint);
+ this->trigger_->setName("portal");
+ this->attach(trigger_);
+ }
+
+ PortalEndPoint::~PortalEndPoint()
+ {
+
+ }
+
+ void PortalEndPoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+ {
+ SUPER(PortalEndPoint, XMLPort, xmlelement, mode);
+
+ XMLPortParam(PortalEndPoint, "id", setID, getID, xmlelement, mode);
+ XMLPortParam(PortalEndPoint, "design", setTemplate, getTemplate, xmlelement, mode);
+ XMLPortParamExtern(PortalEndPoint, DistanceMultiTrigger, this->trigger_, "distance", setDistance, getDistance, xmlelement, mode);
+ XMLPortParamLoadOnly(PortalEndPoint, "target", setTarget, xmlelement, mode).defaultValues("Pawn");
+
+ // Add the DistanceMultiTrigger as event source.
+ this->addEventSource(this->trigger_, EVENTFUNCTIONNAME);
+
+ if(mode == XMLPort::LoadObject)
+ {
+ PortalEndPoint::idMap_s[this->id_] = this;
+ }
+ }
+
+ void PortalEndPoint::XMLEventPort(Element& xmlelement, XMLPort::Mode mode)
+ {
+ SUPER(PortalEndPoint, XMLEventPort, xmlelement, mode);
+
+ XMLPortEventSink(PortalEndPoint, BaseObject, EVENTFUNCTIONNAME, execute, xmlelement, mode);
+ }
+
+ bool PortalEndPoint::execute(bool bTriggered, BaseObject* trigger)
+ {
+ if(!this->isActive())
+ return true;
+
+ MultiTriggerContainer * cont = orxonox_cast<MultiTriggerContainer *>(trigger);
+ if(cont == 0)
+ return true;
+
+ DistanceMultiTrigger * originatingTrigger = orxonox_cast<DistanceMultiTrigger *>(cont->getOriginator());
+ if(originatingTrigger == 0)
+ {
+ COUT(1) << "originator no DistanceMultiTrigger\n" << std::endl;
+ return true;
+ }
+
+ MobileEntity * entity = orxonox_cast<MobileEntity *>(cont->getData());
+ if(entity == 0)
+ return true;
+
+ if(bTriggered)
+ {
+ if(this->recentlyJumpedOut_.find(entity) == this->recentlyJumpedOut_.end()) // only enter the portal if not just jumped out of it
+ {
+ PortalLink::use(entity, this);
+ }
+ }
+ else
+ {
+ this->recentlyJumpedOut_.erase(entity);
+ }
+
+ return true;
+ }
+
+ void PortalEndPoint::jumpOut(MobileEntity* entity)
+ {
+ this->recentlyJumpedOut_.insert(entity);
+
+ entity->setPosition(this->getWorldPosition());
+ entity->rotate(this->getWorldOrientation());
+ entity->setVelocity(this->getWorldOrientation() * entity->getVelocity());
+ entity->setVelocity(entity->getVelocity() * 1.5);
+ }
+
+}
Deleted: code/trunk/src/modules/portals/PortalEndPoint.h
===================================================================
--- code/branches/portals/src/modules/portals/PortalEndPoint.h 2011-05-12 11:22:55 UTC (rev 8455)
+++ code/trunk/src/modules/portals/PortalEndPoint.h 2011-05-12 11:51:18 UTC (rev 8457)
@@ -1,78 +0,0 @@
-#ifndef _PortalEndPoint_H__
-#define _PortalEndPoint_H__
-
-#include "portals/PortalsPrereqs.h"
-
-#include <set>
-#include <string>
-#include <map>
-
-#include "worldentities/StaticEntity.h"
-#include "graphics/Billboard.h"
-#include "objects/triggers/DistanceMultiTrigger.h"
-#include "core/EventIncludes.h"
-
-namespace orxonox
-{
- class _PortalsExport PortalEndPoint : public StaticEntity
- {
- public:
- PortalEndPoint(BaseObject* creator);
- virtual ~PortalEndPoint();
- virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
- inline void setTargets(const std::string & targets) //!< add types which are allowed to activate the PortalEndPoint
- {
- this->trigger_->addTargets(targets);
- }
-
- void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
- static std::map<unsigned int, PortalEndPoint *> idMap_s; //!< Maps the id of each PortalEndPoint to a pointer to that PortalEndPoint
- inline void setID(unsigned int id)
- {
- this->id_ = id;
- }
-
- inline unsigned int getID() const
- {
- return this->id_;
- }
-
- /// \brief Set templateName_ (the name of the design Template) and add that Template to this Object
- inline void setTemplate(const std::string & name)
- {
- this->templateName_ = name;
- this->addTemplate(name);
- }
-
- /// \brief Get the name of the attached design template
- inline const std::string & getTemplate()
- {
- return this->templateName_;
- }
-
- /*! \brief This function is called each time the DistanceMultiTrigger of this PortalEndPoint changed
- * \param bTriggered true if the trigger was triggered on, false if the trigger has switched to off
- * \param trigger the MultiTriggerContainer containing the triggering BaseObject (and trigger_ the portal's MultiDistanceTrigger which we already know)
- *
- * if bTriggered is \c true the triggering entity enters this portal (if it is an entrance)
- * otherwise the triggering entity is removed from the set of entities who recently jumped out of this portal */
- bool execute(bool bTriggered, BaseObject* trigger);
-
- /*! \brief Let an Entity jump out of this portal no matter where it was before
- * \param entity The Entity which should jump out of this portal */
- void jumpOut(MobileEntity * entity);
- protected:
-
- private:
- static const std::string EVENTFUNCTIONNAME; //!< = "execute"
-
- unsigned int id_; //!< the hopefully (depends on the writer of the levelfile) unique id, which is used to establish links between PortalEndPoints
- DistanceMultiTrigger * trigger_; //!< the DistanceMultiTrigger which notices near entities of the defined type
- std::string templateName_; //!< The name of the design template used for this endpoint
-
- std::set<MobileEntity *> recentlyJumpedOut_; //!< Entities which recently jumped out of this EndPoint, hence they shouldn't be pulled in again if the endpoint is the beginning of a link
- };
-
-}
-
-#endif /* _Portals_H__ */
Copied: code/trunk/src/modules/portals/PortalEndPoint.h (from rev 8455, code/branches/portals/src/modules/portals/PortalEndPoint.h)
===================================================================
--- code/trunk/src/modules/portals/PortalEndPoint.h (rev 0)
+++ code/trunk/src/modules/portals/PortalEndPoint.h 2011-05-12 11:51:18 UTC (rev 8457)
@@ -0,0 +1,78 @@
+#ifndef _PortalEndPoint_H__
+#define _PortalEndPoint_H__
+
+#include "portals/PortalsPrereqs.h"
+
+#include <set>
+#include <string>
+#include <map>
+
+#include "worldentities/StaticEntity.h"
+#include "graphics/Billboard.h"
+#include "objects/triggers/DistanceMultiTrigger.h"
+#include "core/EventIncludes.h"
+
+namespace orxonox
+{
+ class _PortalsExport PortalEndPoint : public StaticEntity
+ {
+ public:
+ PortalEndPoint(BaseObject* creator);
+ virtual ~PortalEndPoint();
+ virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+ inline void setTarget(const std::string & target) //!< add types which are allowed to activate the PortalEndPoint
+ {
+ this->trigger_->addTarget(target);
+ }
+
+ void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
+ static std::map<unsigned int, PortalEndPoint *> idMap_s; //!< Maps the id of each PortalEndPoint to a pointer to that PortalEndPoint
+ inline void setID(unsigned int id)
+ {
+ this->id_ = id;
+ }
+
+ inline unsigned int getID() const
+ {
+ return this->id_;
+ }
+
+ /// \brief Set templateName_ (the name of the design Template) and add that Template to this Object
+ inline void setTemplate(const std::string & name)
+ {
+ this->templateName_ = name;
+ this->addTemplate(name);
+ }
+
+ /// \brief Get the name of the attached design template
+ inline const std::string & getTemplate()
+ {
+ return this->templateName_;
+ }
+
+ /*! \brief This function is called each time the DistanceMultiTrigger of this PortalEndPoint changed
+ * \param bTriggered true if the trigger was triggered on, false if the trigger has switched to off
+ * \param trigger the MultiTriggerContainer containing the triggering BaseObject (and trigger_ the portal's MultiDistanceTrigger which we already know)
+ *
+ * if bTriggered is \c true the triggering entity enters this portal (if it is an entrance)
+ * otherwise the triggering entity is removed from the set of entities who recently jumped out of this portal */
+ bool execute(bool bTriggered, BaseObject* trigger);
+
+ /*! \brief Let an Entity jump out of this portal no matter where it was before
+ * \param entity The Entity which should jump out of this portal */
+ void jumpOut(MobileEntity * entity);
+ protected:
+
+ private:
+ static const std::string EVENTFUNCTIONNAME; //!< = "execute"
+
+ unsigned int id_; //!< the hopefully (depends on the writer of the levelfile) unique id, which is used to establish links between PortalEndPoints
+ DistanceMultiTrigger * trigger_; //!< the DistanceMultiTrigger which notices near entities of the defined type
+ std::string templateName_; //!< The name of the design template used for this endpoint
+
+ std::set<MobileEntity *> recentlyJumpedOut_; //!< Entities which recently jumped out of this EndPoint, hence they shouldn't be pulled in again if the endpoint is the beginning of a link
+ };
+
+}
+
+#endif /* _Portals_H__ */
Deleted: code/trunk/src/modules/portals/PortalLink.cc
===================================================================
--- code/branches/portals/src/modules/portals/PortalLink.cc 2011-05-12 11:22:55 UTC (rev 8455)
+++ code/trunk/src/modules/portals/PortalLink.cc 2011-05-12 11:51:18 UTC (rev 8457)
@@ -1,52 +0,0 @@
-#include "PortalLink.h"
-#include "core/XMLPort.h"
-#include "objects/triggers/MultiTriggerContainer.h"
-#include "worldentities/MobileEntity.h"
-
-namespace orxonox
-{
- CreateFactory(PortalLink);
-
- std::map<PortalEndPoint *, PortalEndPoint *> PortalLink::links_s;
-
- PortalLink::PortalLink(BaseObject* creator) : BaseObject(creator), fromID_(0), toID_(0), from_(0), to_(0)
- {
- RegisterObject(PortalLink);
- }
-
- PortalLink::~PortalLink()
- {
- }
-
- void PortalLink::XMLPort(Element& xmlelement, XMLPort::Mode mode)
- {
- SUPER(PortalLink, XMLPort, xmlelement, mode);
- XMLPortParam(PortalLink, "fromID", setFromID, getFromID, xmlelement, mode);
- XMLPortParam(PortalLink, "toID", setToID, getToID, xmlelement, mode);
-
- if(mode == XMLPort::LoadObject)
- {
- PortalEndPoint * from = PortalEndPoint::idMap_s[this->fromID_];
- PortalEndPoint * to = PortalEndPoint::idMap_s[this->toID_];
- PortalLink::links_s[from] = to;
- }
- }
-
- void PortalLink::use(MobileEntity* entity, PortalEndPoint * entrance)
- {
- if(entrance == 0)
- {
- // TODO COUT
- return;
- }
-
- std::map<PortalEndPoint *, PortalEndPoint *>::iterator endpoint = PortalLink::links_s.find(entrance);
-
- if(endpoint == PortalLink::links_s.end()) // entrance has no corresponding exit
- return;
-
- endpoint->second->jumpOut(entity);
- }
-
-
-}
Copied: code/trunk/src/modules/portals/PortalLink.cc (from rev 8455, code/branches/portals/src/modules/portals/PortalLink.cc)
===================================================================
--- code/trunk/src/modules/portals/PortalLink.cc (rev 0)
+++ code/trunk/src/modules/portals/PortalLink.cc 2011-05-12 11:51:18 UTC (rev 8457)
@@ -0,0 +1,52 @@
+#include "PortalLink.h"
+#include "core/XMLPort.h"
+#include "objects/triggers/MultiTriggerContainer.h"
+#include "worldentities/MobileEntity.h"
+
+namespace orxonox
+{
+ CreateFactory(PortalLink);
+
+ std::map<PortalEndPoint *, PortalEndPoint *> PortalLink::links_s;
+
+ PortalLink::PortalLink(BaseObject* creator) : BaseObject(creator), fromID_(0), toID_(0), from_(0), to_(0)
+ {
+ RegisterObject(PortalLink);
+ }
+
+ PortalLink::~PortalLink()
+ {
+ }
+
+ void PortalLink::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+ {
+ SUPER(PortalLink, XMLPort, xmlelement, mode);
+ XMLPortParam(PortalLink, "fromID", setFromID, getFromID, xmlelement, mode);
+ XMLPortParam(PortalLink, "toID", setToID, getToID, xmlelement, mode);
+
+ if(mode == XMLPort::LoadObject)
+ {
+ PortalEndPoint * from = PortalEndPoint::idMap_s[this->fromID_];
+ PortalEndPoint * to = PortalEndPoint::idMap_s[this->toID_];
+ PortalLink::links_s[from] = to;
+ }
+ }
+
+ void PortalLink::use(MobileEntity* entity, PortalEndPoint * entrance)
+ {
+ if(entrance == 0)
+ {
+ // TODO COUT
+ return;
+ }
+
+ std::map<PortalEndPoint *, PortalEndPoint *>::iterator endpoint = PortalLink::links_s.find(entrance);
+
+ if(endpoint == PortalLink::links_s.end()) // entrance has no corresponding exit
+ return;
+
+ endpoint->second->jumpOut(entity);
+ }
+
+
+}
Deleted: code/trunk/src/modules/portals/PortalLink.h
===================================================================
--- code/branches/portals/src/modules/portals/PortalLink.h 2011-05-12 11:22:55 UTC (rev 8455)
+++ code/trunk/src/modules/portals/PortalLink.h 2011-05-12 11:51:18 UTC (rev 8457)
@@ -1,50 +0,0 @@
-#ifndef _PortalLink_H__
-#define _PortalLink_H__
-
-#include "portals/PortalsPrereqs.h"
-#include "tools/interfaces/Tickable.h"
-#include "core/BaseObject.h"
-#include "PortalEndPoint.h"
-#include "objects/eventsystem/EventListener.h"
-
-#include <map>
-
-namespace orxonox
-{
- class _PortalsExport PortalLink : public BaseObject
- {
- public:
- PortalLink(BaseObject* creator);
- virtual ~PortalLink();
- virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
- inline void setFromID(unsigned int from) //!< set the ID of the PortalEndPoint which should act as the entrance of this link
- {
- this->fromID_ = from;
- }
- inline unsigned int getFromID(unsigned int) const
- {
- return this->fromID_;
- }
- inline void setToID(unsigned int to) //!< set the ID of the PortalEndPoint which should act as the exit of this link
- {
- this->toID_ = to;
- }
- inline unsigned int getToID(unsigned int) const
- {
- return this->toID_;
- }
- static void use(MobileEntity * entity, PortalEndPoint * entrance); //
- protected:
- private:
- static std::map<PortalEndPoint *, PortalEndPoint *> links_s;
- unsigned int fromID_;
- unsigned int toID_;
- PortalEndPoint* from_;
- PortalEndPoint* to_;
- float activationRadius_;
- bool isNowPortable(WorldEntity * ent);
- };
-
-}
-
-#endif /* _Portals_H__ */
Copied: code/trunk/src/modules/portals/PortalLink.h (from rev 8455, code/branches/portals/src/modules/portals/PortalLink.h)
===================================================================
--- code/trunk/src/modules/portals/PortalLink.h (rev 0)
+++ code/trunk/src/modules/portals/PortalLink.h 2011-05-12 11:51:18 UTC (rev 8457)
@@ -0,0 +1,50 @@
+#ifndef _PortalLink_H__
+#define _PortalLink_H__
+
+#include "portals/PortalsPrereqs.h"
+#include "tools/interfaces/Tickable.h"
+#include "core/BaseObject.h"
+#include "PortalEndPoint.h"
+#include "objects/eventsystem/EventListener.h"
+
+#include <map>
+
+namespace orxonox
+{
+ class _PortalsExport PortalLink : public BaseObject
+ {
+ public:
+ PortalLink(BaseObject* creator);
+ virtual ~PortalLink();
+ virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+ inline void setFromID(unsigned int from) //!< set the ID of the PortalEndPoint which should act as the entrance of this link
+ {
+ this->fromID_ = from;
+ }
+ inline unsigned int getFromID(unsigned int) const
+ {
+ return this->fromID_;
+ }
+ inline void setToID(unsigned int to) //!< set the ID of the PortalEndPoint which should act as the exit of this link
+ {
+ this->toID_ = to;
+ }
+ inline unsigned int getToID(unsigned int) const
+ {
+ return this->toID_;
+ }
+ static void use(MobileEntity * entity, PortalEndPoint * entrance); //
+ protected:
+ private:
+ static std::map<PortalEndPoint *, PortalEndPoint *> links_s;
+ unsigned int fromID_;
+ unsigned int toID_;
+ PortalEndPoint* from_;
+ PortalEndPoint* to_;
+ float activationRadius_;
+ bool isNowPortable(WorldEntity * ent);
+ };
+
+}
+
+#endif /* _Portals_H__ */
Deleted: code/trunk/src/modules/portals/PortalsPrecompiledHeaders.h
===================================================================
--- code/branches/portals/src/modules/portals/PortalsPrecompiledHeaders.h 2011-05-12 11:22:55 UTC (rev 8455)
+++ code/trunk/src/modules/portals/PortalsPrecompiledHeaders.h 2011-05-12 11:51:18 UTC (rev 8457)
@@ -1,53 +0,0 @@
-/*
- * ORXONOX - the hottest 3D action shooter ever to exist
- * > www.orxonox.net <
- *
- *
- * License notice:
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Author:
- * Reto Grieder
- * Co-authors:
- * ...
- *
- */
-
-/**
- at file
- at brief
-*/
-
-#include "OrxonoxConfig.h"
-
-///////////////////////////////////////////
-///// Stable Headers /////
-///////////////////////////////////////////
-
-#include <LinearMath/btTransform.h>
-
-///////////////////////////////////////////
-///// All Rebuild Headers /////
-///////////////////////////////////////////
-
-#include "core/BaseObject.h"
-#include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
-
-
-// Just in case some header included windows.h
-#undef min
-#undef max
Copied: code/trunk/src/modules/portals/PortalsPrecompiledHeaders.h (from rev 8455, code/branches/portals/src/modules/portals/PortalsPrecompiledHeaders.h)
===================================================================
--- code/trunk/src/modules/portals/PortalsPrecompiledHeaders.h (rev 0)
+++ code/trunk/src/modules/portals/PortalsPrecompiledHeaders.h 2011-05-12 11:51:18 UTC (rev 8457)
@@ -0,0 +1,53 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Reto Grieder
+ * Co-authors:
+ * ...
+ *
+ */
+
+/**
+ at file
+ at brief
+*/
+
+#include "OrxonoxConfig.h"
+
+///////////////////////////////////////////
+///// Stable Headers /////
+///////////////////////////////////////////
+
+#include <LinearMath/btTransform.h>
+
+///////////////////////////////////////////
+///// All Rebuild Headers /////
+///////////////////////////////////////////
+
+#include "core/BaseObject.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+
+// Just in case some header included windows.h
+#undef min
+#undef max
Deleted: code/trunk/src/modules/portals/PortalsPrereqs.h
===================================================================
--- code/branches/portals/src/modules/portals/PortalsPrereqs.h 2011-05-12 11:22:55 UTC (rev 8455)
+++ code/trunk/src/modules/portals/PortalsPrereqs.h 2011-05-12 11:51:18 UTC (rev 8457)
@@ -1,73 +0,0 @@
-/*
- * ORXONOX - the hottest 3D action shooter ever to exist
- * > www.orxonox.net <
- *
- *
- * License notice:
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Author:
- * Damian 'Mozork' Frick
- * Co-authors:
- * ...
- *
- */
-
-/**
- at file
- at brief
- Shared library macros, enums, constants and forward declarations for the questsystem module
-*/
-
-#ifndef _PortalsPrereqs_H__
-#define _PortalsPrereqs_H__
-
-#include "OrxonoxConfig.h"
-#include "OrxonoxPrereqs.h"
-
-//-----------------------------------------------------------------------
-// Shared library settings
-//-----------------------------------------------------------------------
-
-#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(Portals_STATIC_BUILD)
-# ifdef Portals_SHARED_BUILD
-# define _PortalsExport __declspec(dllexport)
-# else
-# if defined( __MINGW32__ )
-# define _PortalsExport
-# else
-# define _PortalsExport __declspec(dllimport)
-# endif
-# endif
-#elif defined ( ORXONOX_GCC_VISIBILITY )
-# define _PortalsExport __attribute__ ((visibility("default")))
-#else
-# define _PortalsExport
-#endif
-
-//-----------------------------------------------------------------------
-// Forward declarations
-//-----------------------------------------------------------------------
-
-namespace orxonox
-{
-
- class PortalEndPoint;
- class PortalLink;
-
-}
-
-#endif /* _PortalsPrereqs_H__ */
Copied: code/trunk/src/modules/portals/PortalsPrereqs.h (from rev 8455, code/branches/portals/src/modules/portals/PortalsPrereqs.h)
===================================================================
--- code/trunk/src/modules/portals/PortalsPrereqs.h (rev 0)
+++ code/trunk/src/modules/portals/PortalsPrereqs.h 2011-05-12 11:51:18 UTC (rev 8457)
@@ -0,0 +1,73 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Damian 'Mozork' Frick
+ * Co-authors:
+ * ...
+ *
+ */
+
+/**
+ at file
+ at brief
+ Shared library macros, enums, constants and forward declarations for the questsystem module
+*/
+
+#ifndef _PortalsPrereqs_H__
+#define _PortalsPrereqs_H__
+
+#include "OrxonoxConfig.h"
+#include "OrxonoxPrereqs.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(Portals_STATIC_BUILD)
+# ifdef Portals_SHARED_BUILD
+# define _PortalsExport __declspec(dllexport)
+# else
+# if defined( __MINGW32__ )
+# define _PortalsExport
+# else
+# define _PortalsExport __declspec(dllimport)
+# endif
+# endif
+#elif defined ( ORXONOX_GCC_VISIBILITY )
+# define _PortalsExport __attribute__ ((visibility("default")))
+#else
+# define _PortalsExport
+#endif
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+
+namespace orxonox
+{
+
+ class PortalEndPoint;
+ class PortalLink;
+
+}
+
+#endif /* _PortalsPrereqs_H__ */
More information about the Orxonox-commit
mailing list