[Orxonox-commit 6303] r10960 - in code/branches/presentationHS15: . data/levels data/levels/includes data/levels/templates data/overlays src/modules src/modules/hover
maxima at orxonox.net
maxima at orxonox.net
Wed Dec 9 12:47:30 CET 2015
Author: maxima
Date: 2015-12-09 12:47:30 +0100 (Wed, 09 Dec 2015)
New Revision: 10960
Added:
code/branches/presentationHS15/data/levels/Hover.oxw
code/branches/presentationHS15/data/levels/includes/weaponSettingsHover.oxi
code/branches/presentationHS15/data/levels/templates/spaceshipHover.oxt
code/branches/presentationHS15/data/overlays/HoverHUD.oxo
code/branches/presentationHS15/src/modules/hover/
code/branches/presentationHS15/src/modules/hover/CMakeLists.txt
code/branches/presentationHS15/src/modules/hover/FlagHUD.cc
code/branches/presentationHS15/src/modules/hover/FlagHUD.h
code/branches/presentationHS15/src/modules/hover/Hover.cc
code/branches/presentationHS15/src/modules/hover/Hover.h
code/branches/presentationHS15/src/modules/hover/HoverFlag.cc
code/branches/presentationHS15/src/modules/hover/HoverFlag.h
code/branches/presentationHS15/src/modules/hover/HoverOrigin.cc
code/branches/presentationHS15/src/modules/hover/HoverOrigin.h
code/branches/presentationHS15/src/modules/hover/HoverPrereqs.h
code/branches/presentationHS15/src/modules/hover/HoverShip.cc
code/branches/presentationHS15/src/modules/hover/HoverShip.h
code/branches/presentationHS15/src/modules/hover/HoverWall.cc
code/branches/presentationHS15/src/modules/hover/HoverWall.h
code/branches/presentationHS15/src/modules/hover/TimeHUD.cc
code/branches/presentationHS15/src/modules/hover/TimeHUD.h
Removed:
code/branches/presentationHS15/src/modules/hover/CMakeLists.txt
code/branches/presentationHS15/src/modules/hover/FlagHUD.cc
code/branches/presentationHS15/src/modules/hover/FlagHUD.h
code/branches/presentationHS15/src/modules/hover/Hover.cc
code/branches/presentationHS15/src/modules/hover/Hover.h
code/branches/presentationHS15/src/modules/hover/HoverFlag.cc
code/branches/presentationHS15/src/modules/hover/HoverFlag.h
code/branches/presentationHS15/src/modules/hover/HoverOrigin.cc
code/branches/presentationHS15/src/modules/hover/HoverOrigin.h
code/branches/presentationHS15/src/modules/hover/HoverPrereqs.h
code/branches/presentationHS15/src/modules/hover/HoverShip.cc
code/branches/presentationHS15/src/modules/hover/HoverShip.h
code/branches/presentationHS15/src/modules/hover/HoverWall.cc
code/branches/presentationHS15/src/modules/hover/HoverWall.h
code/branches/presentationHS15/src/modules/hover/TimeHUD.cc
code/branches/presentationHS15/src/modules/hover/TimeHUD.h
Modified:
code/branches/presentationHS15/
code/branches/presentationHS15/src/modules/CMakeLists.txt
Log:
Merged presentation and hover branches. Hover minigame works fine.
Property changes on: code/branches/presentationHS15
___________________________________________________________________
Modified: svn:mergeinfo
- /code/branches/ParticleEffectsFS15:10309-10612
/code/branches/Racingbot:9388-9513
/code/branches/SciptableControllerFS15:10308-10613
/code/branches/ScriptableController:9999-10075
/code/branches/ai:6592-7033
/code/branches/ai2:8721-8880
/code/branches/bigships:8137-8588
/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/clangenb:10385-10609
/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/core6:9552-9666
/code/branches/core7:10328-10623
/code/branches/data_cleanup:7537-7686
/code/branches/doc:7290-7400
/code/branches/dockingsystem:8101-8192
/code/branches/dockingsystem2:8196-8560
/code/branches/dynamicmatch:6584-7030
/code/branches/environment3:8887-8975
/code/branches/formation:8885-8991
/code/branches/formationFS15:10320-10610
/code/branches/formationupdate:9580-9624
/code/branches/fps:6591-7072
/code/branches/gamecontent:8893-8968
/code/branches/gameimmersion:8102-8577
/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/hud:8883-8986
/code/branches/hudHS14:10083-10241
/code/branches/hudelements:6584-6941
/code/branches/hudimprovements:7920-8672
/code/branches/ingamemenu:6000-6023
/code/branches/input:1629-1636
/code/branches/invaders:9694-9896
/code/branches/ipv6:7293-7458
/code/branches/keckslevelHS14:10082-10222
/code/branches/kicklib:7940-8096,8098-8277
/code/branches/kicklib2:8282-8350
/code/branches/largeShip1:9384-9515
/code/branches/lastmanstanding:7479-7644
/code/branches/lastmanstanding3:7903-8175
/code/branches/levelElias:9697-9921
/code/branches/levelKaan:9695-9921
/code/branches/levelMichael:9696-9921
/code/branches/leveljoemeHS14:10087-10223
/code/branches/libraries:5612-5692
/code/branches/libraries2:5703-5737
/code/branches/libs:9668-9674
/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/masterserverfix:8933-8936
/code/branches/menu:5941-6146,6148,7536-7687
/code/branches/menue:8884-8976
/code/branches/minigame4DHS14:10081-10230
/code/branches/miniprojects:2754-2824
/code/branches/modularships:9994-10071
/code/branches/multiplayerFS15:10324-10611
/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/newlevel2012:9033-9244
/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/output:8739-8857
/code/branches/overlay:2117-2385
/code/branches/pCuts:9023-9284
/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/pickup:8145-8555
/code/branches/pickup2:5942-6405
/code/branches/pickup2012:9029-9189
/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/pickupsFS14:10000-10259
/code/branches/png2:7262-7263
/code/branches/portals:8087-8455
/code/branches/portals2:8460-8602
/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,8500-8705
/code/branches/presentation2:6106-6416,7787-7800
/code/branches/presentation2011:8974-9015
/code/branches/presentation2012:9189-9268
/code/branches/presentation2012merge:9266-9347
/code/branches/presentation3:6913-7162
/code/branches/presentationFS14:10069-10215
/code/branches/presentationFS15:10499
/code/branches/presentationFS15merge:10595-10621
/code/branches/presentationHS12:9481-9525
/code/branches/presentationHS13:9891-9938
/code/branches/presentationHS14merge:10222-10257
/code/branches/questsystem:1894-2088
/code/branches/questsystem2:2107-2259
/code/branches/questsystem5:2776-2905
/code/branches/radarDreiD:9690-9901
/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/sfxThilo:9691-9917
/code/branches/shipSelection:9038-9206
/code/branches/skybox2:6559-6989
/code/branches/sound:2829-3010
/code/branches/sound2012:9205-9214
/code/branches/sound3:5941-6102
/code/branches/spaceNavigation:9381-9497
/code/branches/spaceboundaries:8085-8457
/code/branches/spaceboundaries2:8460-8613
/code/branches/spacerace:8182-8630
/code/branches/spaceraceTwo:8881-8996
/code/branches/spacestationentry:9699-9905
/code/branches/steering:5949-6091,8140-8595
/code/branches/storymodeHS14:10085-10254
/code/branches/surfaceRace:9028-9199
/code/branches/surfaceraceHS14:10080-10236
/code/branches/testing:9015-9549
/code/branches/tetris:8100-8563
/code/branches/towerdefenseFS15:10283-10614
/code/branches/towerdefenseHS14:10086-10247
/code/branches/turret:9380-9501
/code/branches/turretFS14:9998-10070
/code/branches/tutoriallevel:7827-8370
/code/branches/tutoriallevel2:8370-8452
/code/branches/tutoriallevel3:8453-8636
/code/branches/unity_build:8440-8716
/code/branches/usability:7915-8078
/code/branches/weapon:1925-2094
/code/branches/weapon2:2107-2488
/code/branches/weaponFS15:10302-10615
/code/branches/weapons:2897-3051,8143-8591
/code/branches/weaponsystem:2742-2890
/code/branches/weaponupdateHS14:10084-10237
+ /code/branches/ParticleEffectsFS15:10309-10612
/code/branches/Racingbot:9388-9513
/code/branches/SciptableControllerFS15:10308-10613
/code/branches/ScriptableController:9999-10075
/code/branches/ai:6592-7033
/code/branches/ai2:8721-8880
/code/branches/bigships:8137-8588
/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/clangenb:10385-10609
/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/core6:9552-9666
/code/branches/core7:10328-10623
/code/branches/data_cleanup:7537-7686
/code/branches/doc:7290-7400
/code/branches/dockingsystem:8101-8192
/code/branches/dockingsystem2:8196-8560
/code/branches/dynamicmatch:6584-7030
/code/branches/environment3:8887-8975
/code/branches/formation:8885-8991
/code/branches/formationFS15:10320-10610
/code/branches/formationupdate:9580-9624
/code/branches/fps:6591-7072
/code/branches/gamecontent:8893-8968
/code/branches/gameimmersion:8102-8577
/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/hoverHS15:10633-10959
/code/branches/hud:8883-8986
/code/branches/hudHS14:10083-10241
/code/branches/hudelements:6584-6941
/code/branches/hudimprovements:7920-8672
/code/branches/ingamemenu:6000-6023
/code/branches/input:1629-1636
/code/branches/invaders:9694-9896
/code/branches/ipv6:7293-7458
/code/branches/keckslevelHS14:10082-10222
/code/branches/kicklib:7940-8096,8098-8277
/code/branches/kicklib2:8282-8350
/code/branches/largeShip1:9384-9515
/code/branches/lastmanstanding:7479-7644
/code/branches/lastmanstanding3:7903-8175
/code/branches/levelElias:9697-9921
/code/branches/levelKaan:9695-9921
/code/branches/levelMichael:9696-9921
/code/branches/leveljoemeHS14:10087-10223
/code/branches/libraries:5612-5692
/code/branches/libraries2:5703-5737
/code/branches/libs:9668-9674
/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/masterserverfix:8933-8936
/code/branches/menu:5941-6146,6148,7536-7687
/code/branches/menue:8884-8976
/code/branches/minigame4DHS14:10081-10230
/code/branches/miniprojects:2754-2824
/code/branches/modularships:9994-10071
/code/branches/multiplayerFS15:10324-10611
/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/newlevel2012:9033-9244
/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/output:8739-8857
/code/branches/overlay:2117-2385
/code/branches/pCuts:9023-9284
/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/pickup:8145-8555
/code/branches/pickup2:5942-6405
/code/branches/pickup2012:9029-9189
/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/pickupsFS14:10000-10259
/code/branches/png2:7262-7263
/code/branches/portals:8087-8455
/code/branches/portals2:8460-8602
/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,8500-8705
/code/branches/presentation2:6106-6416,7787-7800
/code/branches/presentation2011:8974-9015
/code/branches/presentation2012:9189-9268
/code/branches/presentation2012merge:9266-9347
/code/branches/presentation3:6913-7162
/code/branches/presentationFS14:10069-10215
/code/branches/presentationFS15:10499
/code/branches/presentationFS15merge:10595-10621
/code/branches/presentationHS12:9481-9525
/code/branches/presentationHS13:9891-9938
/code/branches/presentationHS14merge:10222-10257
/code/branches/questsystem:1894-2088
/code/branches/questsystem2:2107-2259
/code/branches/questsystem5:2776-2905
/code/branches/radarDreiD:9690-9901
/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/sfxThilo:9691-9917
/code/branches/shipSelection:9038-9206
/code/branches/skybox2:6559-6989
/code/branches/sound:2829-3010
/code/branches/sound2012:9205-9214
/code/branches/sound3:5941-6102
/code/branches/spaceNavigation:9381-9497
/code/branches/spaceboundaries:8085-8457
/code/branches/spaceboundaries2:8460-8613
/code/branches/spacerace:8182-8630
/code/branches/spaceraceTwo:8881-8996
/code/branches/spacestationentry:9699-9905
/code/branches/steering:5949-6091,8140-8595
/code/branches/storymodeHS14:10085-10254
/code/branches/surfaceRace:9028-9199
/code/branches/surfaceraceHS14:10080-10236
/code/branches/testing:9015-9549
/code/branches/tetris:8100-8563
/code/branches/towerdefenseFS15:10283-10614
/code/branches/towerdefenseHS14:10086-10247
/code/branches/turret:9380-9501
/code/branches/turretFS14:9998-10070
/code/branches/tutoriallevel:7827-8370
/code/branches/tutoriallevel2:8370-8452
/code/branches/tutoriallevel3:8453-8636
/code/branches/unity_build:8440-8716
/code/branches/usability:7915-8078
/code/branches/weapon:1925-2094
/code/branches/weapon2:2107-2488
/code/branches/weaponFS15:10302-10615
/code/branches/weapons:2897-3051,8143-8591
/code/branches/weaponsystem:2742-2890
/code/branches/weaponupdateHS14:10084-10237
Copied: code/branches/presentationHS15/data/levels/Hover.oxw (from rev 10959, code/branches/hoverHS15/data/levels/Hover.oxw)
===================================================================
--- code/branches/presentationHS15/data/levels/Hover.oxw (rev 0)
+++ code/branches/presentationHS15/data/levels/Hover.oxw 2015-12-09 11:47:30 UTC (rev 10960)
@@ -0,0 +1,87 @@
+<LevelInfo
+ name = "Hover level"
+ description = "Level for Minigame Hover"
+ tags = "minigame"
+ screenshot = "emptylevel.png"
+/>
+
+<?lua
+ include("stats.oxo")
+ include("HUDTemplates3.oxo")
+ include("templates/lodInformation.oxt")
+?>
+
+<?lua
+ include("templates/spaceshipPirate.oxt")
+ include("templates/spaceshipHover.oxt")
+ include("overlays/HoverHUD.oxo")
+?>
+
+<Level
+plugins = hover
+gametype = Hover
+>
+ <templates>
+ <Template link=lodtemplate_default />
+ </templates>
+ <?lua include("includes/notifications.oxi") ?>
+
+ <Scene
+ ambientlight = "0.8, 0.8, 0.8"
+ skybox = "Orxonox/Starbox"
+ gravity = "0, -200, 0"
+ >
+
+
+
+
+
+ <StaticEntity position="0,0,0" collisionType="static">
+ <attached>
+ </attached>
+ <collisionShapes>
+ <BoxCollisionShape yaw="0" pitch="0" roll="0" position="500,0,0" halfExtents="500, 30, 2" />
+ <BoxCollisionShape yaw="0" pitch="0" roll="0" position="500,0,1000" halfExtents="500, 30, 2" />
+ <BoxCollisionShape yaw="0" pitch="0" roll="0" position="0,0,500" halfExtents="2, 30, 500" />
+ <BoxCollisionShape yaw="0" pitch="0" roll="0" position="1000,0,500" halfExtents="2, 30, 500" />
+
+ </collisionShapes>
+ </StaticEntity>
+
+ <StaticEntity position="0,0,0" collisionType="static">
+ <attached>
+ <Model position="500, -16,500" yaw="0" pitch="0" roll="0" scale3D="500, 16, 500" mesh="CubeGround.mesh" />
+ </attached>
+ <collisionShapes>
+ <BoxCollisionShape yaw="0" pitch="0" roll="0" position="0,50,0" halfExtents="10000, 1, 10000" />
+ <BoxCollisionShape yaw="0" pitch="0" roll="0" position="0,-10,0" halfExtents="10000, 10, 10000" />
+ <BoxCollisionShape yaw="0" pitch="0" roll="0" position="500, 0,0" halfExtents="1000, 1000, 1" />
+ <BoxCollisionShape yaw="0" pitch="0" roll="0" position="500, 0, 1000" halfExtents="1000, 1000, 1" />
+ <BoxCollisionShape yaw="0" pitch="0" roll="0" position="0, 0, 500" halfExtents="1, 1000, 1000" />
+ <BoxCollisionShape yaw="0" pitch="0" roll="0" position="1000, 0, 500" halfExtents="1, 1000, 1000" />
+
+
+ </collisionShapes>
+ </StaticEntity>
+
+
+ <MovableEntity position="0,0,0">
+ <attached>
+ <HoverOrigin>
+
+ <attached>
+
+ </attached>
+ </HoverOrigin>
+ </attached>
+ </MovableEntity>
+
+
+
+
+ <Light type=directional position="-50,500,-50" direction="0.577, -0.577, 0.577" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
+ <SpawnPoint team=0 position="50,20,50" lookat="100,20,100" spawnclass=HoverShip pawndesign=spaceshiphover />
+
+ </Scene>
+</Level>
+
Copied: code/branches/presentationHS15/data/levels/includes/weaponSettingsHover.oxi (from rev 10959, code/branches/hoverHS15/data/levels/includes/weaponSettingsHover.oxi)
===================================================================
--- code/branches/presentationHS15/data/levels/includes/weaponSettingsHover.oxi (rev 0)
+++ code/branches/presentationHS15/data/levels/includes/weaponSettingsHover.oxi 2015-12-09 11:47:30 UTC (rev 10960)
@@ -0,0 +1,27 @@
+<weaponslots>
+ <WeaponSlot position="-3,2,-3" />
+ <WeaponSlot position=" 3,2,-3" />
+</weaponslots>
+<weaponsets>
+ <WeaponSet firemode=0 />
+ <WeaponSet firemode=1 />
+</weaponsets>
+<weapons>
+ <WeaponPack>
+ <links>
+ <DefaultWeaponmodeLink firemode=0 weaponmode=0 />
+ <DefaultWeaponmodeLink firemode=1 weaponmode=1 />
+ </links>
+ <Weapon>
+ <IceGun mode=0 munitionpershot=0 delay=0.125 damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" projectileMesh="LaserBeam2.mesh" />
+ </Weapon>
+ <Weapon>
+ <IceGun mode=0 munitionpershot=0 delay=0 damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" projectileMesh="LaserBeam2.mesh" />
+ </Weapon>
+ </WeaponPack>
+ <WeaponPack>
+ <links>
+ <DefaultWeaponmodeLink firemode=1 weaponmode=0 />
+ </links>
+ </WeaponPack>
+</weapons>
Copied: code/branches/presentationHS15/data/levels/templates/spaceshipHover.oxt (from rev 10959, code/branches/hoverHS15/data/levels/templates/spaceshipHover.oxt)
===================================================================
--- code/branches/presentationHS15/data/levels/templates/spaceshipHover.oxt (rev 0)
+++ code/branches/presentationHS15/data/levels/templates/spaceshipHover.oxt 2015-12-09 11:47:30 UTC (rev 10960)
@@ -0,0 +1,99 @@
+<Template name=spaceshiphover>
+ <SpaceShip
+ hudtemplate = spaceshiphoverhud
+ camerapositiontemplate = spaceshiphovercameras
+ spawnparticlesource = "Orxonox/fairytwirl"
+ spawnparticleduration = 3
+ explosionchunks = 6
+
+ health = 100
+ maxhealth = 200
+ initialhealth = 100
+
+ shieldhealth = 25
+ initialshieldhealth = 25
+ maxshieldhealth = 40
+ shieldabsorption = 0.6
+ reloadrate = 2
+ reloadwaittime = 0.5
+
+ primaryThrust = 200
+ auxilaryThrust = 30
+ rotationThrust = 25
+
+ jumpBoost = 90
+
+ lift = 1;
+ stallSpeed = 220;
+
+ boostPower = 10
+ boostPowerRate = 1
+ boostRate = 5
+ boostCooldownDuration = 10
+
+ collisionType = "dynamic"
+ mass = 100
+ linearDamping = 0.2
+ angularDamping = 0.9999999
+ >
+ <engines>
+ <MultiStateEngine position=" 0, 0, 0" template=spaceshiphoverengine />
+ </engines>
+ <attached>
+ <Model position="0,0,-20" mesh="hovership_body.mesh" scale="5" yaw=180/>
+ <Model position="0,0,-20" mesh="hovership_engine.mesh" scale="5" yaw=180/>
+ <Model position="0,0,-20" mesh="hovership_gun.mesh" scale="5" yaw=180/>
+
+ </attached>
+ <collisionShapes>
+ <BoxCollisionShape position="0,-2 ,7" halfExtents="7, 4 ,30" />
+ </collisionShapes>
+
+<?lua
+ include("../includes/weaponSettingsHover.oxi")
+?>
+ </SpaceShip>
+</Template>
+
+<Template name=spaceshiphovercameras defaults=0>
+ <SpaceShip>
+ <camerapositions>
+ <CameraPosition position="0,8, 5" drag=true mouselook=true />
+ <CameraPosition position="0,8,5" yaw="180" drag=true mouselook=true />
+ </camerapositions>
+ </SpaceShip>
+</Template>
+
+<Template name=spaceshiphoverengine baseclass=Engine>
+ <MultiStateEngine
+ boostfactor = 2
+
+ speedfront = 90
+ speedback = 40
+ speedleftright = 40
+ speedupdown = 40
+
+ accelerationfront = 500
+ accelerationbrake = 500
+ accelerationback = 125
+ accelerationleftright = 125
+ accelerationupdown = 125
+ >
+ <EffectContainer condition="not idle">
+ <FadingBillboard mainstate=activity active=false scale=0.02 position=" 1.3, 0, 15" colour="1.0, 0.65, 0.2, 1.0" material="Examples/FlareZwei" turnontime=0.5 turnofftime=0.5 />
+ <FadingBillboard mainstate=activity active=false scale=0.02 position=" 0, 0, 15" colour="1.0, 0.65, 0.2, 1.0" material="Examples/FlareZwei" turnontime=0.5 turnofftime=0.5 />
+ <FadingBillboard mainstate=activity active=false scale=0.02 position="-1.3, 0, 15" colour="1.0, 0.65, 0.2, 1.0" material="Examples/FlareZwei" turnontime=0.5 turnofftime=0.5 />
+ </EffectContainer>
+ <EffectContainer condition="normal or boost">
+ <Backlight mainstate=activity active=false scale=0.8 name=bltest position=" 0, 0, 40" colour="1.0, 0.65, 0.2, 1.0" width=10 length=800 lifetime=1 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+
+ </EffectContainer>
+ <EffectContainer condition="boost">
+ <Backlight mainstate=activity active=false scale=0.8 name=bltest position=" 0, 0, 40" colour="1.0, 0.65, 0.2, 1.0" width=10 length=1600 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+ </EffectContainer>
+ <EffectContainer condition="brake">
+ <FadingBillboard mainstate=activity active=false scale=0.5 position=" 0, 0, 40" colour="0.8, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+
+ </EffectContainer>
+ </MultiStateEngine>
+</Template>
Copied: code/branches/presentationHS15/data/overlays/HoverHUD.oxo (from rev 10959, code/branches/hoverHS15/data/overlays/HoverHUD.oxo)
===================================================================
--- code/branches/presentationHS15/data/overlays/HoverHUD.oxo (rev 0)
+++ code/branches/presentationHS15/data/overlays/HoverHUD.oxo 2015-12-09 11:47:30 UTC (rev 10960)
@@ -0,0 +1,46 @@
+<Template name="HoverHUD">
+ <OverlayGroup name="HoverHUD" scale = "1, 1">
+ </OverlayGroup>
+</Template>
+
+
+<Template name="spaceshiphoverhud">
+ <OverlayGroup name = "spaceshiphoverhud" scale = "1, 1">
+ <TimeHUD
+ name = "TimerHUD"
+ position = "0.95, 0.02"
+ pickpoint = "0.0, 0.0"
+ font = "ShareTechMono"
+ textsize = 0.05
+ colour = "1.0, 1.0, 1.0, 1.0"
+ align = "right"
+ />
+
+ <FlagHUD
+ name = "FlagHUD"
+ position = "0.05, 0.02"
+ size = "0.18, 0.05"
+ />
+
+ <HUDHealthBar
+ name = "HealthBar1"
+ background = "Orxonox/HealthBarBackground"
+ size = "0.35, 0.0875"
+ position = "0.0 , 0.97"
+ pickpoint = "0, 1"
+ bartexture = "healthbar_bar.png"
+ textfont = "VeraMono"
+ textusebarcolour = true
+ textsize = 0.039
+ textoffset = "0.315, 0.05"
+ textpickpoint = "0, 0"
+ textalign = "right"
+ correctaspect = false
+ textcorrectaspect = false
+ >
+ <BarColour position = 0.0 colour = "0.7,0.2,0.2" />
+ <BarColour position = 0.5 colour = "0.7,0.7,0.2" />
+ <BarColour position = 1.0 colour = "0.2,0.7,0.2" />
+ </HUDHealthBar>
+ </OverlayGroup>
+</Template>
Modified: code/branches/presentationHS15/src/modules/CMakeLists.txt
===================================================================
--- code/branches/presentationHS15/src/modules/CMakeLists.txt 2015-12-09 11:14:46 UTC (rev 10959)
+++ code/branches/presentationHS15/src/modules/CMakeLists.txt 2015-12-09 11:47:30 UTC (rev 10960)
@@ -42,3 +42,4 @@
ADD_SUBDIRECTORY(jump)
ADD_SUBDIRECTORY(mini4dgame)
ADD_SUBDIRECTORY(dodgerace)
+ADD_SUBDIRECTORY(hover)
Deleted: code/branches/presentationHS15/src/modules/hover/CMakeLists.txt
===================================================================
--- code/branches/hoverHS15/src/modules/hover/CMakeLists.txt 2015-12-09 11:14:46 UTC (rev 10959)
+++ code/branches/presentationHS15/src/modules/hover/CMakeLists.txt 2015-12-09 11:47:30 UTC (rev 10960)
@@ -1,19 +0,0 @@
-SET_SOURCE_FILES(Hover_SRC_FILES
-Hover.cc
-HoverShip.cc
-HoverWall.cc
-HoverOrigin.cc
-TimeHUD.cc
-FlagHUD.cc
-HoverFlag.cc
-)
-
-ORXONOX_ADD_LIBRARY(hover
- PLUGIN
- FIND_HEADER_FILES
- LINK_LIBRARIES
- objects
- orxonox
- overlays
- SOURCE_FILES ${Hover_SRC_FILES}
-)
Copied: code/branches/presentationHS15/src/modules/hover/CMakeLists.txt (from rev 10959, code/branches/hoverHS15/src/modules/hover/CMakeLists.txt)
===================================================================
--- code/branches/presentationHS15/src/modules/hover/CMakeLists.txt (rev 0)
+++ code/branches/presentationHS15/src/modules/hover/CMakeLists.txt 2015-12-09 11:47:30 UTC (rev 10960)
@@ -0,0 +1,19 @@
+SET_SOURCE_FILES(Hover_SRC_FILES
+Hover.cc
+HoverShip.cc
+HoverWall.cc
+HoverOrigin.cc
+TimeHUD.cc
+FlagHUD.cc
+HoverFlag.cc
+)
+
+ORXONOX_ADD_LIBRARY(hover
+ PLUGIN
+ FIND_HEADER_FILES
+ LINK_LIBRARIES
+ objects
+ orxonox
+ overlays
+ SOURCE_FILES ${Hover_SRC_FILES}
+)
Deleted: code/branches/presentationHS15/src/modules/hover/FlagHUD.cc
===================================================================
--- code/branches/hoverHS15/src/modules/hover/FlagHUD.cc 2015-12-09 11:14:46 UTC (rev 10959)
+++ code/branches/presentationHS15/src/modules/hover/FlagHUD.cc 2015-12-09 11:47:30 UTC (rev 10960)
@@ -1,105 +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:
- * Cyrill Burgener
- *
- */
-
-/**
- @file FlagHUD.cc
- @brief Implementation of the FlagHUD
-*/
-
-#include "FlagHUD.h"
-
-#include <OgreOverlayManager.h>
-#include <OgreMaterialManager.h>
-#include <OgrePanelOverlayElement.h>
-
-#include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
-
-namespace orxonox
-{
- RegisterClass(FlagHUD);
-
- FlagHUD::FlagHUD(Context* context) : OrxonoxOverlay(context)
- {
- RegisterObject(FlagHUD);
-
- this->panel_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton()
- .createOverlayElement("Panel", "FlagHUD_Panel_" + getUniqueNumberString()));
- this->panel_->setMaterialName("Hover/Flag");
- this->overlay_->add2D(this->panel_);
-
- this->flagCount_ = 5;
- setFlagCount(5);
- }
-
-/**
- @brief Sets the amount of flags displayed, once zero it does not reappear
- @param flagCount
-*/
- void FlagHUD::setFlagCount(int flagCount) {
- if(flagCount == 0){
- this->panel_->hide();
- return;
- }
- this->panel_->setDimensions(
- this->panel_->_getRelativeWidth() / ((float) flagCount_) * ((float) flagCount),
- this->panel_->_getRelativeHeight()
- );
- this->panel_->setTiling(flagCount, 1.0f);
-
- this->flagCount_ = flagCount;
- }
-
- void FlagHUD::tick(float dt)
- {
- SUPER(FlagHUD, tick, dt);
-
- setFlagCount(this->hoverGame->getFlags());
-
- }
-
- void FlagHUD::changedOwner()
- {
- SUPER(FlagHUD, changedOwner);
-
- if (this->getOwner() && this->getOwner()->getGametype())
- {
- this->hoverGame = orxonox_cast<Hover*>(this->getOwner()->getGametype());
- }
- else
- {
- this->hoverGame = 0;
- }
- }
-
- FlagHUD::~FlagHUD()
- {
- if (this->isInitialized())
- {
- Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->panel_);
- }
- }
-}
Copied: code/branches/presentationHS15/src/modules/hover/FlagHUD.cc (from rev 10959, code/branches/hoverHS15/src/modules/hover/FlagHUD.cc)
===================================================================
--- code/branches/presentationHS15/src/modules/hover/FlagHUD.cc (rev 0)
+++ code/branches/presentationHS15/src/modules/hover/FlagHUD.cc 2015-12-09 11:47:30 UTC (rev 10960)
@@ -0,0 +1,105 @@
+/*
+ * 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:
+ * Cyrill Burgener
+ *
+ */
+
+/**
+ @file FlagHUD.cc
+ @brief Implementation of the FlagHUD
+*/
+
+#include "FlagHUD.h"
+
+#include <OgreOverlayManager.h>
+#include <OgreMaterialManager.h>
+#include <OgrePanelOverlayElement.h>
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+ RegisterClass(FlagHUD);
+
+ FlagHUD::FlagHUD(Context* context) : OrxonoxOverlay(context)
+ {
+ RegisterObject(FlagHUD);
+
+ this->panel_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton()
+ .createOverlayElement("Panel", "FlagHUD_Panel_" + getUniqueNumberString()));
+ this->panel_->setMaterialName("Hover/Flag");
+ this->overlay_->add2D(this->panel_);
+
+ this->flagCount_ = 5;
+ setFlagCount(5);
+ }
+
+/**
+ @brief Sets the amount of flags displayed, once zero it does not reappear
+ @param flagCount
+*/
+ void FlagHUD::setFlagCount(int flagCount) {
+ if(flagCount == 0){
+ this->panel_->hide();
+ return;
+ }
+ this->panel_->setDimensions(
+ this->panel_->_getRelativeWidth() / ((float) flagCount_) * ((float) flagCount),
+ this->panel_->_getRelativeHeight()
+ );
+ this->panel_->setTiling(flagCount, 1.0f);
+
+ this->flagCount_ = flagCount;
+ }
+
+ void FlagHUD::tick(float dt)
+ {
+ SUPER(FlagHUD, tick, dt);
+
+ setFlagCount(this->hoverGame->getFlags());
+
+ }
+
+ void FlagHUD::changedOwner()
+ {
+ SUPER(FlagHUD, changedOwner);
+
+ if (this->getOwner() && this->getOwner()->getGametype())
+ {
+ this->hoverGame = orxonox_cast<Hover*>(this->getOwner()->getGametype());
+ }
+ else
+ {
+ this->hoverGame = 0;
+ }
+ }
+
+ FlagHUD::~FlagHUD()
+ {
+ if (this->isInitialized())
+ {
+ Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->panel_);
+ }
+ }
+}
Deleted: code/branches/presentationHS15/src/modules/hover/FlagHUD.h
===================================================================
--- code/branches/hoverHS15/src/modules/hover/FlagHUD.h 2015-12-09 11:14:46 UTC (rev 10959)
+++ code/branches/presentationHS15/src/modules/hover/FlagHUD.h 2015-12-09 11:47:30 UTC (rev 10960)
@@ -1,63 +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:
- * Cyrill Burgener
- *
- */
-
- /**
- @file FlagHUD.h
- @brief Declaration of the FlagHUD class.
-*/
-
-#ifndef _FlagHUD_H__
-#define _FlagHUD_H__
-
-#include "overlays/OverlaysPrereqs.h"
-
-#include "util/Math.h"
-#include "util/OgreForwardRefs.h"
-#include "core/BaseObject.h"
-#include "overlays/OrxonoxOverlay.h"
-#include "Hover.h"
-
-namespace orxonox
-{
- class _OverlaysExport FlagHUD : public OrxonoxOverlay , public Tickable
- {
- public:
- FlagHUD(Context* context);
- virtual ~FlagHUD();
-
- virtual void tick(float dt);
- virtual void changedOwner();
-
- virtual void setFlagCount(int flagCount);
-
-
- private:
- Hover* hoverGame;
- Ogre::PanelOverlayElement* panel_;
- int flagCount_;
- };
-}
-#endif /* _FlagHUD_H__ */
Copied: code/branches/presentationHS15/src/modules/hover/FlagHUD.h (from rev 10959, code/branches/hoverHS15/src/modules/hover/FlagHUD.h)
===================================================================
--- code/branches/presentationHS15/src/modules/hover/FlagHUD.h (rev 0)
+++ code/branches/presentationHS15/src/modules/hover/FlagHUD.h 2015-12-09 11:47:30 UTC (rev 10960)
@@ -0,0 +1,63 @@
+/*
+ * 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:
+ * Cyrill Burgener
+ *
+ */
+
+ /**
+ @file FlagHUD.h
+ @brief Declaration of the FlagHUD class.
+*/
+
+#ifndef _FlagHUD_H__
+#define _FlagHUD_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "util/Math.h"
+#include "util/OgreForwardRefs.h"
+#include "core/BaseObject.h"
+#include "overlays/OrxonoxOverlay.h"
+#include "Hover.h"
+
+namespace orxonox
+{
+ class _OverlaysExport FlagHUD : public OrxonoxOverlay , public Tickable
+ {
+ public:
+ FlagHUD(Context* context);
+ virtual ~FlagHUD();
+
+ virtual void tick(float dt);
+ virtual void changedOwner();
+
+ virtual void setFlagCount(int flagCount);
+
+
+ private:
+ Hover* hoverGame;
+ Ogre::PanelOverlayElement* panel_;
+ int flagCount_;
+ };
+}
+#endif /* _FlagHUD_H__ */
Deleted: code/branches/presentationHS15/src/modules/hover/Hover.cc
===================================================================
--- code/branches/hoverHS15/src/modules/hover/Hover.cc 2015-12-09 11:14:46 UTC (rev 10959)
+++ code/branches/presentationHS15/src/modules/hover/Hover.cc 2015-12-09 11:47:30 UTC (rev 10960)
@@ -1,371 +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:
- * Manuel Meier
- * Co-authors:
- * Cyrill Muskelprotz
- *
- */
-
-/**
- @file Hover.cc
- @brief Implementation of the Hover class. Sets up the whole Minigame
-*/
-
-//#include "orxonox/worldentities/pawns/SpaceShip.h"
-#include "Hover.h"
-
-#include "HoverWall.h"
-#include "HoverFlag.h"
-#include "core/CoreIncludes.h"
-
-#include <iostream>
-#include <string>
-#include <time.h>
-#include <stdlib.h>
-#include <memory.h>
-#include <stdint.h>
-#include <fstream>
-#include <vector>
-
-namespace orxonox
-{
- bool firstTick = true;
-
- //Levelcode represents the pitch: It's a 10x10 field.
- // 1 represents a Wall on the right side of this square
- // 2 represents a Wall on the top of this square
- // 3 represents 2 and 1 at the same time
- // Note: the levelcode is generated from the Maze-Generator functions at the beginning of the game
- int levelcode[10][10] =
- {
- { 0,0,0,0,0,0,0,0,0,0 },
- { 0,0,0,0,0,0,0,0,0,0 },
- { 0,0,0,0,0,0,0,0,0,0 },
- { 0,0,0,0,0,0,0,0,0,0 },
- { 0,0,0,0,0,0,0,0,0,0 },
- { 0,0,0,0,0,0,0,0,0,0 },
- { 0,0,0,0,0,0,0,0,0,0 },
- { 0,0,0,0,0,0,0,0,0,0 },
- { 0,0,0,0,0,0,0,0,0,0 },
- { 0,0,0,0,0,0,0,0,0,0 }
- };
-
- const int NumCells = 10;
- unsigned char* g_Maze = new unsigned char[ NumCells* NumCells ];
-
- // current traversing position
- int g_PtX;
- int g_PtY;
-
- // return the current index in g_Maze
- int Hover::CellIdx()
- {
- return g_PtX + NumCells * g_PtY;
- }
-
-
- int Hover::RandomInt()
- {
- return (rand() % NumCells);
- }
-
- int Hover::RandomInt4()
- {
- return (rand() % 4);
- }
-
-
- RegisterUnloadableClass(Hover);
-
-
-
-
-
-
-
- Hover::Hover(Context* context) : Gametype(context)
- {
-
- RegisterObject(Hover);
- this->setHUDTemplate("HoverHUD");
- }
-
-
-
- void Hover::tick(float dt)
- {
-
- SUPER(Hover, tick, dt);
-
-
-
-
- if(firstTick)
- {
-
- std::fill( g_Maze, g_Maze + NumCells * NumCells, 0 );
- g_PtX=0;
- g_PtY=0;
- GenerateMaze();
- RenderMaze();
- firstTick = false;
-
- //Outer Walls
- for(int i = 0; i<10; i++){
- new HoverWall(origin_->getContext(), 0, i+1, 1);
- new HoverWall(origin_->getContext(), 10, i+1, 1);
- new HoverWall(origin_->getContext(), i+1, 0, 2);
- new HoverWall(origin_->getContext(), i+1, 10, 2);
- }
-
- //Generate inner Walls according to levelcode
- for(int y=0; y<10; y++){
- for(int x=0; x<10; x++){
- switch(levelcode[y][x]){
- case 1: new HoverWall(origin_->getContext(), x+1, 10-y, 1);
- break;
- case 3: new HoverWall(origin_->getContext(), x+1, 10-y, 1);
- case 2: new HoverWall(origin_->getContext(), x+1, 10-y, 0);
- default: break;
- }
-
-
-
- }
- }
-
- //Generate 5 flags randomly
- for ( int i = 0; i < 5; i++ )
- flagVector.push_back(new HoverFlag(origin_->getContext(), rand()%10, rand()%10));
-
- Flags_ = flagVector.size();
-
- }//firsttick end
-
- // Check if ship collided with one of the flags
- for ( unsigned int i = 0; i < flagVector.size(); i++ ){
- if(flagVector[i]->getCollided()){
- flagVector[i]->destroyLater();
- flagVector.erase (flagVector.begin()+i);
- }
- }
- Flags_ = flagVector.size();
-
-
-
- }
-
- int Hover::getFlags()
- {
-
- // Call start for the parent class.
- return Flags_;
- }
-
- void Hover::start()
- {
-
- // Call start for the parent class.
- Gametype::start();
-
- }
-
-
- void Hover::end()
- {
- // DON'T CALL THIS!
- // Deathmatch::end();
- // It will misteriously crash the game!
- // Instead startMainMenu, this won't crash.
- GSLevel::startMainMenu();
- }
-
-
-
-
- // Some definitions for the Maze-Generator
-
- // 0 1 2 3 4 5 6 7 8
- // U R D L
- int Heading_X[9] = { 0, 0,+1, 0, 0, 0, 0, 0,-1 };
- int Heading_Y[9] = { 0,-1, 0, 0,+1, 0, 0, 0, 0 };
- int Mask[9] = {
- 0,
- eDirection_Down | eDirection_Down << 4,
- eDirection_Left | eDirection_Left << 4,
- 0,
- eDirection_Up | eDirection_Up << 4,
- 0,
- 0,
- 0,
- eDirection_Right | eDirection_Right << 4
- };
-
-
- /**
- @brief
- Checks if Direction is valid (for Maze-Generator)
- */
- bool Hover::IsDirValid( eDirection Dir )
- {
- int NewX = g_PtX + Heading_X[ Dir ];
- int NewY = g_PtY + Heading_Y[ Dir ];
-
- if ( !Dir || NewX < 0 || NewY < 0 || NewX >= NumCells || NewY >= NumCells ) return false;
-
- return !g_Maze[ NewX + NumCells * NewY ];
- }
-
- /**
- @brief
- Generates new Direction (for Maze-Generator)
- */
- eDirection Hover::GetDirection()
- {
- eDirection Dir = eDirection( 1 << RandomInt4() );
-
- while ( true )
- {
- for ( int x = 0; x < 4; x++ )
- {
- if ( IsDirValid( Dir ) ) { return eDirection( Dir ); }
-
- Dir = eDirection( Dir << 1 );
-
- if ( Dir > eDirection_Left ) { Dir = eDirection_Up; }
- }
-
- Dir = eDirection( ( g_Maze[ CellIdx() ] & 0xf0 ) >> 4 );
-
- // nowhere to go
- if ( !Dir ) return eDirection_Invalid;
-
- g_PtX += Heading_X[ Dir ];
- g_PtY += Heading_Y[ Dir ];
-
- Dir = eDirection( 1 << RandomInt4() );
- }
- }
-
- /**
- @brief
- Generates a Maze (for Maze-Generator)
- */
- void Hover::GenerateMaze()
- {
-
- for ( eDirection Dir = GetDirection(); Dir != eDirection_Invalid; Dir = GetDirection() )
- {
- g_Maze[ CellIdx() ] |= Dir;
-
- g_PtX += Heading_X[ Dir ];
- g_PtY += Heading_Y[ Dir ];
-
- g_Maze[ CellIdx() ] = Mask[ Dir ];
- }
- }
-
- /**
- @brief
- Print Maze (for Debugging only)
- */
- void Hover::MazeOut(){
- for ( int y = 0; y < NumCells; y++ )
- {
- for ( int x = 0; x < NumCells; x++ )
- {
- char v = g_Maze[ y * NumCells + x ];
- orxout()<<"[";
- if ( ( v & eDirection_Up ) ) orxout()<<"U";
- else orxout()<<" ";
- if ( ( v & eDirection_Right ) ) orxout()<<"R";
- else orxout()<<" ";
- if ( ( v & eDirection_Down ) ) orxout()<<" ";
- else orxout()<<" ";
- if ( ( v & eDirection_Left ) ) orxout()<<" ";
- else orxout()<<" ";
- orxout()<<"]";
- }
- orxout()<<endl;
- }
-
- }
-
- /**
- @brief
- Print Levelcode (for Debugging only)
- */
- void Hover::LevelOut(){
- for ( int y = 0; y < NumCells; y++ )
- {
- for ( int x = 0; x < NumCells; x++ )
- {
- orxout()<<"[";
- if ( levelcode[x][y] < 2) orxout()<<"U";
- else orxout()<<" ";
- if ( levelcode[x][y] % 2 == 0) orxout()<<"R";
- else orxout()<<" ";
-
- orxout()<<" ";
- orxout()<<" ";
- orxout()<<"]";
- }
- orxout()<<endl;
- }
- }
-
- /**
- @brief
- Generate Levelcode from Maze
- */
- void Hover::RenderMaze()
- {
- for ( int y = 0; y < NumCells; y++ )
- {
- for ( int x = 0; x < NumCells; x++ )
- {
- char v = g_Maze[ y * NumCells + x ];
-
- if ( !( v & eDirection_Up ) && y >0) levelcode[y][x] |= 2;
- if ( !( v & eDirection_Right ) && x <9) levelcode[y][x] |= 1;
- }
- }
- for ( int y = 3; y < 7; y++ )
- {
- for ( int x = 3; x < 7; x++ )
- {
-
- if(y == 3 && x != 7)
- levelcode[y][x] &= 2;
- else if (x == 7 && y != 3)
- levelcode[y][x] &= 1;
- else if(x != 7)
- levelcode[y][x] = 0;
- }
- }
-
- }
-
-
-
-}
Copied: code/branches/presentationHS15/src/modules/hover/Hover.cc (from rev 10959, code/branches/hoverHS15/src/modules/hover/Hover.cc)
===================================================================
--- code/branches/presentationHS15/src/modules/hover/Hover.cc (rev 0)
+++ code/branches/presentationHS15/src/modules/hover/Hover.cc 2015-12-09 11:47:30 UTC (rev 10960)
@@ -0,0 +1,371 @@
+/*
+ * 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:
+ * Manuel Meier
+ * Co-authors:
+ * Cyrill Muskelprotz
+ *
+ */
+
+/**
+ @file Hover.cc
+ @brief Implementation of the Hover class. Sets up the whole Minigame
+*/
+
+//#include "orxonox/worldentities/pawns/SpaceShip.h"
+#include "Hover.h"
+
+#include "HoverWall.h"
+#include "HoverFlag.h"
+#include "core/CoreIncludes.h"
+
+#include <iostream>
+#include <string>
+#include <time.h>
+#include <stdlib.h>
+#include <memory.h>
+#include <stdint.h>
+#include <fstream>
+#include <vector>
+
+namespace orxonox
+{
+ bool firstTick = true;
+
+ //Levelcode represents the pitch: It's a 10x10 field.
+ // 1 represents a Wall on the right side of this square
+ // 2 represents a Wall on the top of this square
+ // 3 represents 2 and 1 at the same time
+ // Note: the levelcode is generated from the Maze-Generator functions at the beginning of the game
+ int levelcode[10][10] =
+ {
+ { 0,0,0,0,0,0,0,0,0,0 },
+ { 0,0,0,0,0,0,0,0,0,0 },
+ { 0,0,0,0,0,0,0,0,0,0 },
+ { 0,0,0,0,0,0,0,0,0,0 },
+ { 0,0,0,0,0,0,0,0,0,0 },
+ { 0,0,0,0,0,0,0,0,0,0 },
+ { 0,0,0,0,0,0,0,0,0,0 },
+ { 0,0,0,0,0,0,0,0,0,0 },
+ { 0,0,0,0,0,0,0,0,0,0 },
+ { 0,0,0,0,0,0,0,0,0,0 }
+ };
+
+ const int NumCells = 10;
+ unsigned char* g_Maze = new unsigned char[ NumCells* NumCells ];
+
+ // current traversing position
+ int g_PtX;
+ int g_PtY;
+
+ // return the current index in g_Maze
+ int Hover::CellIdx()
+ {
+ return g_PtX + NumCells * g_PtY;
+ }
+
+
+ int Hover::RandomInt()
+ {
+ return (rand() % NumCells);
+ }
+
+ int Hover::RandomInt4()
+ {
+ return (rand() % 4);
+ }
+
+
+ RegisterUnloadableClass(Hover);
+
+
+
+
+
+
+
+ Hover::Hover(Context* context) : Gametype(context)
+ {
+
+ RegisterObject(Hover);
+ this->setHUDTemplate("HoverHUD");
+ }
+
+
+
+ void Hover::tick(float dt)
+ {
+
+ SUPER(Hover, tick, dt);
+
+
+
+
+ if(firstTick)
+ {
+
+ std::fill( g_Maze, g_Maze + NumCells * NumCells, 0 );
+ g_PtX=0;
+ g_PtY=0;
+ GenerateMaze();
+ RenderMaze();
+ firstTick = false;
+
+ //Outer Walls
+ for(int i = 0; i<10; i++){
+ new HoverWall(origin_->getContext(), 0, i+1, 1);
+ new HoverWall(origin_->getContext(), 10, i+1, 1);
+ new HoverWall(origin_->getContext(), i+1, 0, 2);
+ new HoverWall(origin_->getContext(), i+1, 10, 2);
+ }
+
+ //Generate inner Walls according to levelcode
+ for(int y=0; y<10; y++){
+ for(int x=0; x<10; x++){
+ switch(levelcode[y][x]){
+ case 1: new HoverWall(origin_->getContext(), x+1, 10-y, 1);
+ break;
+ case 3: new HoverWall(origin_->getContext(), x+1, 10-y, 1);
+ case 2: new HoverWall(origin_->getContext(), x+1, 10-y, 0);
+ default: break;
+ }
+
+
+
+ }
+ }
+
+ //Generate 5 flags randomly
+ for ( int i = 0; i < 5; i++ )
+ flagVector.push_back(new HoverFlag(origin_->getContext(), rand()%10, rand()%10));
+
+ Flags_ = flagVector.size();
+
+ }//firsttick end
+
+ // Check if ship collided with one of the flags
+ for ( unsigned int i = 0; i < flagVector.size(); i++ ){
+ if(flagVector[i]->getCollided()){
+ flagVector[i]->destroyLater();
+ flagVector.erase (flagVector.begin()+i);
+ }
+ }
+ Flags_ = flagVector.size();
+
+
+
+ }
+
+ int Hover::getFlags()
+ {
+
+ // Call start for the parent class.
+ return Flags_;
+ }
+
+ void Hover::start()
+ {
+
+ // Call start for the parent class.
+ Gametype::start();
+
+ }
+
+
+ void Hover::end()
+ {
+ // DON'T CALL THIS!
+ // Deathmatch::end();
+ // It will misteriously crash the game!
+ // Instead startMainMenu, this won't crash.
+ GSLevel::startMainMenu();
+ }
+
+
+
+
+ // Some definitions for the Maze-Generator
+
+ // 0 1 2 3 4 5 6 7 8
+ // U R D L
+ int Heading_X[9] = { 0, 0,+1, 0, 0, 0, 0, 0,-1 };
+ int Heading_Y[9] = { 0,-1, 0, 0,+1, 0, 0, 0, 0 };
+ int Mask[9] = {
+ 0,
+ eDirection_Down | eDirection_Down << 4,
+ eDirection_Left | eDirection_Left << 4,
+ 0,
+ eDirection_Up | eDirection_Up << 4,
+ 0,
+ 0,
+ 0,
+ eDirection_Right | eDirection_Right << 4
+ };
+
+
+ /**
+ @brief
+ Checks if Direction is valid (for Maze-Generator)
+ */
+ bool Hover::IsDirValid( eDirection Dir )
+ {
+ int NewX = g_PtX + Heading_X[ Dir ];
+ int NewY = g_PtY + Heading_Y[ Dir ];
+
+ if ( !Dir || NewX < 0 || NewY < 0 || NewX >= NumCells || NewY >= NumCells ) return false;
+
+ return !g_Maze[ NewX + NumCells * NewY ];
+ }
+
+ /**
+ @brief
+ Generates new Direction (for Maze-Generator)
+ */
+ eDirection Hover::GetDirection()
+ {
+ eDirection Dir = eDirection( 1 << RandomInt4() );
+
+ while ( true )
+ {
+ for ( int x = 0; x < 4; x++ )
+ {
+ if ( IsDirValid( Dir ) ) { return eDirection( Dir ); }
+
+ Dir = eDirection( Dir << 1 );
+
+ if ( Dir > eDirection_Left ) { Dir = eDirection_Up; }
+ }
+
+ Dir = eDirection( ( g_Maze[ CellIdx() ] & 0xf0 ) >> 4 );
+
+ // nowhere to go
+ if ( !Dir ) return eDirection_Invalid;
+
+ g_PtX += Heading_X[ Dir ];
+ g_PtY += Heading_Y[ Dir ];
+
+ Dir = eDirection( 1 << RandomInt4() );
+ }
+ }
+
+ /**
+ @brief
+ Generates a Maze (for Maze-Generator)
+ */
+ void Hover::GenerateMaze()
+ {
+
+ for ( eDirection Dir = GetDirection(); Dir != eDirection_Invalid; Dir = GetDirection() )
+ {
+ g_Maze[ CellIdx() ] |= Dir;
+
+ g_PtX += Heading_X[ Dir ];
+ g_PtY += Heading_Y[ Dir ];
+
+ g_Maze[ CellIdx() ] = Mask[ Dir ];
+ }
+ }
+
+ /**
+ @brief
+ Print Maze (for Debugging only)
+ */
+ void Hover::MazeOut(){
+ for ( int y = 0; y < NumCells; y++ )
+ {
+ for ( int x = 0; x < NumCells; x++ )
+ {
+ char v = g_Maze[ y * NumCells + x ];
+ orxout()<<"[";
+ if ( ( v & eDirection_Up ) ) orxout()<<"U";
+ else orxout()<<" ";
+ if ( ( v & eDirection_Right ) ) orxout()<<"R";
+ else orxout()<<" ";
+ if ( ( v & eDirection_Down ) ) orxout()<<" ";
+ else orxout()<<" ";
+ if ( ( v & eDirection_Left ) ) orxout()<<" ";
+ else orxout()<<" ";
+ orxout()<<"]";
+ }
+ orxout()<<endl;
+ }
+
+ }
+
+ /**
+ @brief
+ Print Levelcode (for Debugging only)
+ */
+ void Hover::LevelOut(){
+ for ( int y = 0; y < NumCells; y++ )
+ {
+ for ( int x = 0; x < NumCells; x++ )
+ {
+ orxout()<<"[";
+ if ( levelcode[x][y] < 2) orxout()<<"U";
+ else orxout()<<" ";
+ if ( levelcode[x][y] % 2 == 0) orxout()<<"R";
+ else orxout()<<" ";
+
+ orxout()<<" ";
+ orxout()<<" ";
+ orxout()<<"]";
+ }
+ orxout()<<endl;
+ }
+ }
+
+ /**
+ @brief
+ Generate Levelcode from Maze
+ */
+ void Hover::RenderMaze()
+ {
+ for ( int y = 0; y < NumCells; y++ )
+ {
+ for ( int x = 0; x < NumCells; x++ )
+ {
+ char v = g_Maze[ y * NumCells + x ];
+
+ if ( !( v & eDirection_Up ) && y >0) levelcode[y][x] |= 2;
+ if ( !( v & eDirection_Right ) && x <9) levelcode[y][x] |= 1;
+ }
+ }
+ for ( int y = 3; y < 7; y++ )
+ {
+ for ( int x = 3; x < 7; x++ )
+ {
+
+ if(y == 3 && x != 7)
+ levelcode[y][x] &= 2;
+ else if (x == 7 && y != 3)
+ levelcode[y][x] &= 1;
+ else if(x != 7)
+ levelcode[y][x] = 0;
+ }
+ }
+
+ }
+
+
+
+}
Deleted: code/branches/presentationHS15/src/modules/hover/Hover.h
===================================================================
--- code/branches/hoverHS15/src/modules/hover/Hover.h 2015-12-09 11:14:46 UTC (rev 10959)
+++ code/branches/presentationHS15/src/modules/hover/Hover.h 2015-12-09 11:47:30 UTC (rev 10960)
@@ -1,105 +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.
- *
- * Master of Desaster:
- * Manuel Meier
- * Co-authors:
- * Cyrill Muskelprotz
- *
- */
-
-/**
- @file Hover.h
- @brief Gametype. For more information see .cc file
- @ingroup Hover
-*/
-
-#ifndef _Hover_H__
-#define _Hover_H__
-
-#include "HoverPrereqs.h"
-#include "HoverOrigin.h"
-
-#include "gametypes/Gametype.h"
-#include "core/EventIncludes.h"
-#include "core/command/Executor.h"
-#include "core/config/ConfigValueIncludes.h"
-
-#include "gamestates/GSLevel.h"
-#include "chat/ChatManager.h"
-#include <vector>
-
-// ! HACK
-#include "infos/PlayerInfo.h"
-
-#include "core/command/ConsoleCommand.h"
-
-#include "tools/Timer.h"
-
-
-
-namespace orxonox
-{
-
- enum eDirection
- {
- eDirection_Invalid = 0,
- eDirection_Up = 1,
- eDirection_Right = 2,
- eDirection_Down = 4,
- eDirection_Left = 8
- };
-
- class _HoverExport Hover : public Gametype
- {
- public:
- Hover(Context* context);
-
- virtual void start();
- virtual void end();
-
- virtual void tick(float dt);
-
- void setOrigin(HoverOrigin* origin)
- { this->origin_ = origin; }
-
- int getFlags();
- WeakPtr<HoverOrigin> origin_;
-
- private:
- int CellIdx();
- int RandomInt();
- int RandomInt4();
- int Flags_;
-
- bool IsDirValid( eDirection Dir );
- eDirection GetDirection();
- void GenerateMaze();
- void RenderMaze();
- void MazeOut();
- void LevelOut();
- std::vector<HoverFlag*> flagVector;
-
-
- };
-}
-
-#endif /* _Hover_H__ */
Copied: code/branches/presentationHS15/src/modules/hover/Hover.h (from rev 10959, code/branches/hoverHS15/src/modules/hover/Hover.h)
===================================================================
--- code/branches/presentationHS15/src/modules/hover/Hover.h (rev 0)
+++ code/branches/presentationHS15/src/modules/hover/Hover.h 2015-12-09 11:47:30 UTC (rev 10960)
@@ -0,0 +1,105 @@
+/*
+ * 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.
+ *
+ * Master of Desaster:
+ * Manuel Meier
+ * Co-authors:
+ * Cyrill Muskelprotz
+ *
+ */
+
+/**
+ @file Hover.h
+ @brief Gametype. For more information see .cc file
+ @ingroup Hover
+*/
+
+#ifndef _Hover_H__
+#define _Hover_H__
+
+#include "HoverPrereqs.h"
+#include "HoverOrigin.h"
+
+#include "gametypes/Gametype.h"
+#include "core/EventIncludes.h"
+#include "core/command/Executor.h"
+#include "core/config/ConfigValueIncludes.h"
+
+#include "gamestates/GSLevel.h"
+#include "chat/ChatManager.h"
+#include <vector>
+
+// ! HACK
+#include "infos/PlayerInfo.h"
+
+#include "core/command/ConsoleCommand.h"
+
+#include "tools/Timer.h"
+
+
+
+namespace orxonox
+{
+
+ enum eDirection
+ {
+ eDirection_Invalid = 0,
+ eDirection_Up = 1,
+ eDirection_Right = 2,
+ eDirection_Down = 4,
+ eDirection_Left = 8
+ };
+
+ class _HoverExport Hover : public Gametype
+ {
+ public:
+ Hover(Context* context);
+
+ virtual void start();
+ virtual void end();
+
+ virtual void tick(float dt);
+
+ void setOrigin(HoverOrigin* origin)
+ { this->origin_ = origin; }
+
+ int getFlags();
+ WeakPtr<HoverOrigin> origin_;
+
+ private:
+ int CellIdx();
+ int RandomInt();
+ int RandomInt4();
+ int Flags_;
+
+ bool IsDirValid( eDirection Dir );
+ eDirection GetDirection();
+ void GenerateMaze();
+ void RenderMaze();
+ void MazeOut();
+ void LevelOut();
+ std::vector<HoverFlag*> flagVector;
+
+
+ };
+}
+
+#endif /* _Hover_H__ */
Deleted: code/branches/presentationHS15/src/modules/hover/HoverFlag.cc
===================================================================
--- code/branches/hoverHS15/src/modules/hover/HoverFlag.cc 2015-12-09 11:14:46 UTC (rev 10959)
+++ code/branches/presentationHS15/src/modules/hover/HoverFlag.cc 2015-12-09 11:47:30 UTC (rev 10960)
@@ -1,143 +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:
- * Manuel Meier
- * Co-authors:
- * ...
- *
- */
-
-/**
- @file HoverFlag.cc
- @brief The Flags that are being set in the Hover Minigame They support two coordinates from 0-9 each
-*/
-
-#include "HoverFlag.h"
-#include "HoverShip.h"
-
-#include "core/CoreIncludes.h"
-#include "core/GameMode.h"
-#include "graphics/Model.h"
-#include "gametypes/Gametype.h"
-
-
-
-
-#include "core/XMLPort.h"
-
-namespace orxonox
-{
- RegisterClass(HoverFlag);
-
- HoverFlag::HoverFlag(Context* context) : StaticEntity(context)
- {
- RegisterObject(HoverFlag);
- model_ = NULL;
- cs_ = NULL;
- }
-
- /**
- @brief
- Constructor that expects two coordinate-values in the range 0-9
- @param xCoordinate
- X-Coordinate of the flage, 0-9, origin is bottom left
- @param yCoordinate
- Y-Coordinate of the flage, 0-9, origin is bottom left
- */
- HoverFlag::HoverFlag(Context* context, int xCoordinate, int yCoordinate) : StaticEntity(context)
- {
- RegisterObject(HoverFlag);
- enableCollisionCallback();
- model_ = NULL;
- cs_ = NULL;
-
- model_ = new Model(context);
- model_->setMeshSource("ss_flag_eu.mesh");
- model_->setScale3D(Vector3(5, 5, 5));
- model_->setPosition(Vector3(xCoordinate*100 + 50,10,yCoordinate*100 + 50));
-
- this->attach(model_);
-
- this->enableCollisionCallback();
- this->setCollisionResponse(true);
- this->setCollisionType(Static);
-
- cs_ = new BoxCollisionShape(context);
- cs_->setHalfExtents(Vector3(5, 5, 5));
- cs_->setPosition(Vector3(xCoordinate*100 + 50,0,yCoordinate*100 + 50));
-
- this->attachCollisionShape(cs_);
- this->collided_ = false;
-
- }
-
- /**
- @brief
- Destructor.
- */
- HoverFlag::~HoverFlag()
- {
-
- }
-
- //xml port unused
- void HoverFlag::XMLPort(Element& xmlelement, XMLPort::Mode mode)
- {
- SUPER(HoverFlag, XMLPort, xmlelement, mode);
- }
-
-
-
-
- /**
- @brief
- Is called every tick.
- @param dt
- The time since the last tick.
- */
- void HoverFlag::tick(float dt)
- {
- SUPER(HoverFlag, tick, dt);
-
- }
-
- /**
- @brief
- Checks if the Hovership collided with the flag
- */
- bool HoverFlag::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint)
- {
- if(otherObject->isA(Class(HoverShip)))
- collided_ = true;
- return false;
- }
-
- bool HoverFlag::getCollided(){
- return collided_;
- }
-
- void HoverFlag::setCollided(bool setValue){
- collided_ = setValue;
- }
-
-
-}
Copied: code/branches/presentationHS15/src/modules/hover/HoverFlag.cc (from rev 10959, code/branches/hoverHS15/src/modules/hover/HoverFlag.cc)
===================================================================
--- code/branches/presentationHS15/src/modules/hover/HoverFlag.cc (rev 0)
+++ code/branches/presentationHS15/src/modules/hover/HoverFlag.cc 2015-12-09 11:47:30 UTC (rev 10960)
@@ -0,0 +1,143 @@
+/*
+ * 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:
+ * Manuel Meier
+ * Co-authors:
+ * ...
+ *
+ */
+
+/**
+ @file HoverFlag.cc
+ @brief The Flags that are being set in the Hover Minigame They support two coordinates from 0-9 each
+*/
+
+#include "HoverFlag.h"
+#include "HoverShip.h"
+
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "graphics/Model.h"
+#include "gametypes/Gametype.h"
+
+
+
+
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+ RegisterClass(HoverFlag);
+
+ HoverFlag::HoverFlag(Context* context) : StaticEntity(context)
+ {
+ RegisterObject(HoverFlag);
+ model_ = NULL;
+ cs_ = NULL;
+ }
+
+ /**
+ @brief
+ Constructor that expects two coordinate-values in the range 0-9
+ @param xCoordinate
+ X-Coordinate of the flage, 0-9, origin is bottom left
+ @param yCoordinate
+ Y-Coordinate of the flage, 0-9, origin is bottom left
+ */
+ HoverFlag::HoverFlag(Context* context, int xCoordinate, int yCoordinate) : StaticEntity(context)
+ {
+ RegisterObject(HoverFlag);
+ enableCollisionCallback();
+ model_ = NULL;
+ cs_ = NULL;
+
+ model_ = new Model(context);
+ model_->setMeshSource("ss_flag_eu.mesh");
+ model_->setScale3D(Vector3(5, 5, 5));
+ model_->setPosition(Vector3(xCoordinate*100 + 50,10,yCoordinate*100 + 50));
+
+ this->attach(model_);
+
+ this->enableCollisionCallback();
+ this->setCollisionResponse(true);
+ this->setCollisionType(Static);
+
+ cs_ = new BoxCollisionShape(context);
+ cs_->setHalfExtents(Vector3(5, 5, 5));
+ cs_->setPosition(Vector3(xCoordinate*100 + 50,0,yCoordinate*100 + 50));
+
+ this->attachCollisionShape(cs_);
+ this->collided_ = false;
+
+ }
+
+ /**
+ @brief
+ Destructor.
+ */
+ HoverFlag::~HoverFlag()
+ {
+
+ }
+
+ //xml port unused
+ void HoverFlag::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+ {
+ SUPER(HoverFlag, XMLPort, xmlelement, mode);
+ }
+
+
+
+
+ /**
+ @brief
+ Is called every tick.
+ @param dt
+ The time since the last tick.
+ */
+ void HoverFlag::tick(float dt)
+ {
+ SUPER(HoverFlag, tick, dt);
+
+ }
+
+ /**
+ @brief
+ Checks if the Hovership collided with the flag
+ */
+ bool HoverFlag::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint)
+ {
+ if(otherObject->isA(Class(HoverShip)))
+ collided_ = true;
+ return false;
+ }
+
+ bool HoverFlag::getCollided(){
+ return collided_;
+ }
+
+ void HoverFlag::setCollided(bool setValue){
+ collided_ = setValue;
+ }
+
+
+}
Deleted: code/branches/presentationHS15/src/modules/hover/HoverFlag.h
===================================================================
--- code/branches/hoverHS15/src/modules/hover/HoverFlag.h 2015-12-09 11:14:46 UTC (rev 10959)
+++ code/branches/presentationHS15/src/modules/hover/HoverFlag.h 2015-12-09 11:47:30 UTC (rev 10960)
@@ -1,67 +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:
- * Manuel Meier
- * Co-authors:
- * ...
- *
- */
-
-/**
- @file HoverFlag.h
- @brief See .cc File
- @ingroup Hover
-*/
-
-#ifndef _HoverFlag_H__
-#define _HoverFlag_H__
-
-#include "HoverPrereqs.h"
-#include "util/Math.h"
-#include "worldentities/StaticEntity.h"
-#include "graphics/Model.h"
-#include "objects/collisionshapes/BoxCollisionShape.h"
-
-
-namespace orxonox
-{
- class _HoverExport HoverFlag : public StaticEntity
- {
- public:
- HoverFlag(Context* context);
- HoverFlag(Context* context, int xCoordinate, int yCoordinate);
- virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint);
- virtual ~HoverFlag();
- virtual void tick(float dt);
- virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
- bool getCollided();
- void setCollided(bool setValue);
-
- private:
- Model* model_;
- BoxCollisionShape* cs_;
- bool collided_;
-
- };
-}
-
-#endif /* _HoverFlag_H__ */
Copied: code/branches/presentationHS15/src/modules/hover/HoverFlag.h (from rev 10959, code/branches/hoverHS15/src/modules/hover/HoverFlag.h)
===================================================================
--- code/branches/presentationHS15/src/modules/hover/HoverFlag.h (rev 0)
+++ code/branches/presentationHS15/src/modules/hover/HoverFlag.h 2015-12-09 11:47:30 UTC (rev 10960)
@@ -0,0 +1,67 @@
+/*
+ * 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:
+ * Manuel Meier
+ * Co-authors:
+ * ...
+ *
+ */
+
+/**
+ @file HoverFlag.h
+ @brief See .cc File
+ @ingroup Hover
+*/
+
+#ifndef _HoverFlag_H__
+#define _HoverFlag_H__
+
+#include "HoverPrereqs.h"
+#include "util/Math.h"
+#include "worldentities/StaticEntity.h"
+#include "graphics/Model.h"
+#include "objects/collisionshapes/BoxCollisionShape.h"
+
+
+namespace orxonox
+{
+ class _HoverExport HoverFlag : public StaticEntity
+ {
+ public:
+ HoverFlag(Context* context);
+ HoverFlag(Context* context, int xCoordinate, int yCoordinate);
+ virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint);
+ virtual ~HoverFlag();
+ virtual void tick(float dt);
+ virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+ bool getCollided();
+ void setCollided(bool setValue);
+
+ private:
+ Model* model_;
+ BoxCollisionShape* cs_;
+ bool collided_;
+
+ };
+}
+
+#endif /* _HoverFlag_H__ */
Deleted: code/branches/presentationHS15/src/modules/hover/HoverOrigin.cc
===================================================================
--- code/branches/hoverHS15/src/modules/hover/HoverOrigin.cc 2015-12-09 11:14:46 UTC (rev 10959)
+++ code/branches/presentationHS15/src/modules/hover/HoverOrigin.cc 2015-12-09 11:47:30 UTC (rev 10960)
@@ -1,62 +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:
- * Manuel Meier
- * Co-authors:
- * ...
- *
- */
-
-/**
- @file HoverOrigin.cc
- @brief The HoverOrigin is a StaticEntity which represents the level of the minigame. All platforms, enemies and items are attached to the HoverOrigin.
-*/
-
-#include "HoverOrigin.h"
-#include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
-#include "Hover.h"
-
-namespace orxonox
-{
- RegisterClass(HoverOrigin);
-
- HoverOrigin::HoverOrigin(Context* context) : StaticEntity(context)
- {
- RegisterObject(HoverOrigin);
- checkGametype();
- }
-
- void HoverOrigin::XMLPort(Element& xmlelement, XMLPort::Mode mode)
- {
- SUPER(HoverOrigin, XMLPort, xmlelement, mode);
- }
-
- void HoverOrigin::checkGametype()
- {
- if (getGametype() != NULL && this->getGametype()->isA(Class(Hover)))
- {
- Hover* hoverGametype = orxonox_cast<Hover*>(this->getGametype());
- hoverGametype->setOrigin(this);
- }
- }
-}
Copied: code/branches/presentationHS15/src/modules/hover/HoverOrigin.cc (from rev 10959, code/branches/hoverHS15/src/modules/hover/HoverOrigin.cc)
===================================================================
--- code/branches/presentationHS15/src/modules/hover/HoverOrigin.cc (rev 0)
+++ code/branches/presentationHS15/src/modules/hover/HoverOrigin.cc 2015-12-09 11:47:30 UTC (rev 10960)
@@ -0,0 +1,62 @@
+/*
+ * 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:
+ * Manuel Meier
+ * Co-authors:
+ * ...
+ *
+ */
+
+/**
+ @file HoverOrigin.cc
+ @brief The HoverOrigin is a StaticEntity which represents the level of the minigame. All platforms, enemies and items are attached to the HoverOrigin.
+*/
+
+#include "HoverOrigin.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "Hover.h"
+
+namespace orxonox
+{
+ RegisterClass(HoverOrigin);
+
+ HoverOrigin::HoverOrigin(Context* context) : StaticEntity(context)
+ {
+ RegisterObject(HoverOrigin);
+ checkGametype();
+ }
+
+ void HoverOrigin::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+ {
+ SUPER(HoverOrigin, XMLPort, xmlelement, mode);
+ }
+
+ void HoverOrigin::checkGametype()
+ {
+ if (getGametype() != NULL && this->getGametype()->isA(Class(Hover)))
+ {
+ Hover* hoverGametype = orxonox_cast<Hover*>(this->getGametype());
+ hoverGametype->setOrigin(this);
+ }
+ }
+}
Deleted: code/branches/presentationHS15/src/modules/hover/HoverOrigin.h
===================================================================
--- code/branches/hoverHS15/src/modules/hover/HoverOrigin.h 2015-12-09 11:14:46 UTC (rev 10959)
+++ code/branches/presentationHS15/src/modules/hover/HoverOrigin.h 2015-12-09 11:47:30 UTC (rev 10960)
@@ -1,123 +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:
- * Manuel Meier
- * Co-authors:
- * ...
- *
- */
-
-#ifndef _HoverOrigin_H__
-#define _HoverOrigin_H__
-
-#include "HoverPrereqs.h"
-
-#include <string>
-
-#include <util/Math.h>
-
-#include "worldentities/StaticEntity.h"
-
-namespace orxonox
-{
-
- /**
- @brief
- The HoverOrigin implements the playing field @ref orxonox::Hover "Hover" takes place in and allows for many parameters of the minigame to be set.
- The playing field resides in the x,z-plane, with the x-axis being the horizontal axis and the z-axis being the vertical axis.
-
- Various parameters can be set:
- - The <b>dimension</b> is a vector, that defines the width and height of the playing field. The default is <em>(200, 120)</em>.
- - The <b>balltemplate</b> is a template that is applied to the @ref orxonox::HoverPlatform "HoverPlatform", it can be used to attach different things to it, e.g. its @ref orxonox::Model "Model". See below for a usage example.
- - The <b>battemplate</b> is a template that is applied to the @ref orxonox::HoverPlatform "HoverFigure", it can be used to attach different things to it, e.g. its @ref orxonox::Model "Model". See below for a usage example.
- - The <b>ballspeed</b> is the speed with which the @ref orxonox::HoverPlatform "HoverPlatform" moves. The default is <em>100</em>.
- - The <b>ballaccfactor</b> is the acceleration factor for the @ref orxonox::HoverPlatform "HoverPlatform". The default is <em>1.0</em>.
- - The <b>batspeed</b> is the speed with which the @ref orxonox::HoverFigure "HoverFigures" move. The default is <em>60</em>.
- - The <b>batlength</b> is the length of the @ref orxonox::HoverFigure "HoverFigures" as the percentage of the height of the playing field. The default is <em>0.25</em>.
-
- An example in XML of the HoverOrigin would be:
-
- First the needed templates:
- The template for the @ref orxonox::HoverPlatform "HoverPlatform".
- @code
- <Template name="Hoverball">
- <HoverPlatform>
- <attached>
- <Model mesh="sphere.mesh" scale="2" />
- <ParticleSpawner name="hiteffect" position="0,0,0" source="Orxonox/sparks2" lifetime="0.01" autostart="0" mainstate="spawn" />
- </attached>
- <eventlisteners>
- <EventTarget target="hiteffect" />
- </eventlisteners>
- </HoverPlatform>
- </Template>
- @endcode
- As can be seen, a sphere is attached as the @ref orxonox::Model "Model" for the @ref orxonox::HoverPlatform "HoverPlatform", and also an @ref orxonox::EventListener "EventListener" that triggers a @ref orxonox::ParticleSpawner "ParticleSpawner", whenever the ball hits the boundaries is attached.
-
- Additionally the template for the @ref orxonox::HoverFigure "HoverFigure".
- @code
- <Template name="Hoverbatcameras" defaults="0">
- <HoverFigure>
- <camerapositions>
- <CameraPosition position="0,200,0" pitch="-90" absolute="true" />
- </camerapositions>
- </HoverFigure>
- </Template>
-
- <Template name="Hoverbat">
- <HoverFigure camerapositiontemplate=Hoverbatcameras>
- <attached>
- <Model position="0,0,3" mesh="cube.mesh" scale3D="14,2,2" />
- </attached>
- </HoverFigure>
- </Template>
- @endcode
- As can be seen, there are actually two templates. The first template is needed to set the camera for the @ref orxonox::HoverFigure "HoverFigure". The second template ist the actual template for the @ref orxonox::HoverFigure "HoverFigure", the template for the camera position is added and a @ref orxonox::Model "Model" for the @ref orxonox::HoverFigure "HoverFigure" is attached.
- propellerTemplate_
- Finally the HoverOrigin is created.
- @code
- <HoverOrigin name="Hovercenter" dimension="200,120" balltemplate="Hoverball" battemplate="Hoverbat" ballspeed="200" ballaccfactor="1.0" batspeed="130" batlength="0.25">
- <attached>
- <Model position="0,0,60" mesh="cube.mesh" scale3D="105,1,1" />
- <Model position="0,0,-60" mesh="cube.mesh" scale3D="105,1,1" />
- </attached>
- </HoverOrigin>
- @endcode
- All parameters are specified. And also two @ref orxonox::Model "Models" (for the upper and lower boundary) are attached.
-
- For a more elaborate example, have a look at the <code>Hover.oxw</code> level file.
-
- */
- class _HoverExport HoverOrigin : public StaticEntity
- {
- public:
- HoverOrigin(Context* context); //!< Constructor. Registers and initializes the object and checks whether the gametype is actually Hover.
- virtual ~HoverOrigin() {}
- virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method to create a HoverOrigin through XML.
-
- private:
- void checkGametype();
-
- };
-}
-
-#endif /* _HoverOrigin_H__ */
Copied: code/branches/presentationHS15/src/modules/hover/HoverOrigin.h (from rev 10959, code/branches/hoverHS15/src/modules/hover/HoverOrigin.h)
===================================================================
--- code/branches/presentationHS15/src/modules/hover/HoverOrigin.h (rev 0)
+++ code/branches/presentationHS15/src/modules/hover/HoverOrigin.h 2015-12-09 11:47:30 UTC (rev 10960)
@@ -0,0 +1,123 @@
+/*
+ * 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:
+ * Manuel Meier
+ * Co-authors:
+ * ...
+ *
+ */
+
+#ifndef _HoverOrigin_H__
+#define _HoverOrigin_H__
+
+#include "HoverPrereqs.h"
+
+#include <string>
+
+#include <util/Math.h>
+
+#include "worldentities/StaticEntity.h"
+
+namespace orxonox
+{
+
+ /**
+ @brief
+ The HoverOrigin implements the playing field @ref orxonox::Hover "Hover" takes place in and allows for many parameters of the minigame to be set.
+ The playing field resides in the x,z-plane, with the x-axis being the horizontal axis and the z-axis being the vertical axis.
+
+ Various parameters can be set:
+ - The <b>dimension</b> is a vector, that defines the width and height of the playing field. The default is <em>(200, 120)</em>.
+ - The <b>balltemplate</b> is a template that is applied to the @ref orxonox::HoverPlatform "HoverPlatform", it can be used to attach different things to it, e.g. its @ref orxonox::Model "Model". See below for a usage example.
+ - The <b>battemplate</b> is a template that is applied to the @ref orxonox::HoverPlatform "HoverFigure", it can be used to attach different things to it, e.g. its @ref orxonox::Model "Model". See below for a usage example.
+ - The <b>ballspeed</b> is the speed with which the @ref orxonox::HoverPlatform "HoverPlatform" moves. The default is <em>100</em>.
+ - The <b>ballaccfactor</b> is the acceleration factor for the @ref orxonox::HoverPlatform "HoverPlatform". The default is <em>1.0</em>.
+ - The <b>batspeed</b> is the speed with which the @ref orxonox::HoverFigure "HoverFigures" move. The default is <em>60</em>.
+ - The <b>batlength</b> is the length of the @ref orxonox::HoverFigure "HoverFigures" as the percentage of the height of the playing field. The default is <em>0.25</em>.
+
+ An example in XML of the HoverOrigin would be:
+
+ First the needed templates:
+ The template for the @ref orxonox::HoverPlatform "HoverPlatform".
+ @code
+ <Template name="Hoverball">
+ <HoverPlatform>
+ <attached>
+ <Model mesh="sphere.mesh" scale="2" />
+ <ParticleSpawner name="hiteffect" position="0,0,0" source="Orxonox/sparks2" lifetime="0.01" autostart="0" mainstate="spawn" />
+ </attached>
+ <eventlisteners>
+ <EventTarget target="hiteffect" />
+ </eventlisteners>
+ </HoverPlatform>
+ </Template>
+ @endcode
+ As can be seen, a sphere is attached as the @ref orxonox::Model "Model" for the @ref orxonox::HoverPlatform "HoverPlatform", and also an @ref orxonox::EventListener "EventListener" that triggers a @ref orxonox::ParticleSpawner "ParticleSpawner", whenever the ball hits the boundaries is attached.
+
+ Additionally the template for the @ref orxonox::HoverFigure "HoverFigure".
+ @code
+ <Template name="Hoverbatcameras" defaults="0">
+ <HoverFigure>
+ <camerapositions>
+ <CameraPosition position="0,200,0" pitch="-90" absolute="true" />
+ </camerapositions>
+ </HoverFigure>
+ </Template>
+
+ <Template name="Hoverbat">
+ <HoverFigure camerapositiontemplate=Hoverbatcameras>
+ <attached>
+ <Model position="0,0,3" mesh="cube.mesh" scale3D="14,2,2" />
+ </attached>
+ </HoverFigure>
+ </Template>
+ @endcode
+ As can be seen, there are actually two templates. The first template is needed to set the camera for the @ref orxonox::HoverFigure "HoverFigure". The second template ist the actual template for the @ref orxonox::HoverFigure "HoverFigure", the template for the camera position is added and a @ref orxonox::Model "Model" for the @ref orxonox::HoverFigure "HoverFigure" is attached.
+ propellerTemplate_
+ Finally the HoverOrigin is created.
+ @code
+ <HoverOrigin name="Hovercenter" dimension="200,120" balltemplate="Hoverball" battemplate="Hoverbat" ballspeed="200" ballaccfactor="1.0" batspeed="130" batlength="0.25">
+ <attached>
+ <Model position="0,0,60" mesh="cube.mesh" scale3D="105,1,1" />
+ <Model position="0,0,-60" mesh="cube.mesh" scale3D="105,1,1" />
+ </attached>
+ </HoverOrigin>
+ @endcode
+ All parameters are specified. And also two @ref orxonox::Model "Models" (for the upper and lower boundary) are attached.
+
+ For a more elaborate example, have a look at the <code>Hover.oxw</code> level file.
+
+ */
+ class _HoverExport HoverOrigin : public StaticEntity
+ {
+ public:
+ HoverOrigin(Context* context); //!< Constructor. Registers and initializes the object and checks whether the gametype is actually Hover.
+ virtual ~HoverOrigin() {}
+ virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method to create a HoverOrigin through XML.
+
+ private:
+ void checkGametype();
+
+ };
+}
+
+#endif /* _HoverOrigin_H__ */
Deleted: code/branches/presentationHS15/src/modules/hover/HoverPrereqs.h
===================================================================
--- code/branches/hoverHS15/src/modules/hover/HoverPrereqs.h 2015-12-09 11:14:46 UTC (rev 10959)
+++ code/branches/presentationHS15/src/modules/hover/HoverPrereqs.h 2015-12-09 11:47:30 UTC (rev 10960)
@@ -1,77 +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:
- * Cyrill Burgener
- * Co-authors:
- * ...
- *
- */
-
-/**
- at file
- at brief
- Shared library macros, enums, constants and forward declarations for the Hover module
-*/
-
-#ifndef _HoverPrereqs_H__
-#define _HoverPrereqs_H__
-
-#include "OrxonoxConfig.h"
-#include "OrxonoxPrereqs.h"
-
-//-----------------------------------------------------------------------
-// Shared library settings
-//-----------------------------------------------------------------------
-
-#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(HOVER_STATIC_BUILD)
-# ifdef HOVER_SHARED_BUILD
-# define _HoverExport __declspec(dllexport)
-# else
-# if defined( __MINGW32__ )
-# define _HoverExport
-# else
-# define _HoverExport __declspec(dllimport)
-# endif
-# endif
-# define _HoverPrivate
-#elif defined (ORXONOX_GCC_VISIBILITY)
-# define _HoverExport __attribute__ ((visibility("default")))
-# define _HoverPrivate __attribute__ ((visibility("hidden")))
-#else
-# define _HoverExport
-# define _HoverPrivate
-#endif
-
-//-----------------------------------------------------------------------
-// Forward declarations
-//-----------------------------------------------------------------------
-
-namespace orxonox
-{
- class Hover;
- class HoverShip;
- class HoverWall;
- class HoverOrigin;
- class HoverFlag;
-}
-
-#endif /* _HoverPrereqs_H__*/
Copied: code/branches/presentationHS15/src/modules/hover/HoverPrereqs.h (from rev 10959, code/branches/hoverHS15/src/modules/hover/HoverPrereqs.h)
===================================================================
--- code/branches/presentationHS15/src/modules/hover/HoverPrereqs.h (rev 0)
+++ code/branches/presentationHS15/src/modules/hover/HoverPrereqs.h 2015-12-09 11:47:30 UTC (rev 10960)
@@ -0,0 +1,77 @@
+/*
+ * 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:
+ * Cyrill Burgener
+ * Co-authors:
+ * ...
+ *
+ */
+
+/**
+ at file
+ at brief
+ Shared library macros, enums, constants and forward declarations for the Hover module
+*/
+
+#ifndef _HoverPrereqs_H__
+#define _HoverPrereqs_H__
+
+#include "OrxonoxConfig.h"
+#include "OrxonoxPrereqs.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(HOVER_STATIC_BUILD)
+# ifdef HOVER_SHARED_BUILD
+# define _HoverExport __declspec(dllexport)
+# else
+# if defined( __MINGW32__ )
+# define _HoverExport
+# else
+# define _HoverExport __declspec(dllimport)
+# endif
+# endif
+# define _HoverPrivate
+#elif defined (ORXONOX_GCC_VISIBILITY)
+# define _HoverExport __attribute__ ((visibility("default")))
+# define _HoverPrivate __attribute__ ((visibility("hidden")))
+#else
+# define _HoverExport
+# define _HoverPrivate
+#endif
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+
+namespace orxonox
+{
+ class Hover;
+ class HoverShip;
+ class HoverWall;
+ class HoverOrigin;
+ class HoverFlag;
+}
+
+#endif /* _HoverPrereqs_H__*/
Deleted: code/branches/presentationHS15/src/modules/hover/HoverShip.cc
===================================================================
--- code/branches/hoverHS15/src/modules/hover/HoverShip.cc 2015-12-09 11:14:46 UTC (rev 10959)
+++ code/branches/presentationHS15/src/modules/hover/HoverShip.cc 2015-12-09 11:47:30 UTC (rev 10960)
@@ -1,143 +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:
- * Cyrill Burgener
- *
- */
-
-/**
- @file HoverShip.cc
- @brief Implementation of the HoverShip control
-*/
-
-#include "HoverShip.h"
-#include "core/CoreIncludes.h"
-
-namespace orxonox
-{
- RegisterClass(HoverShip);
-
- HoverShip::HoverShip(Context* context) : SpaceShip(context)
- {
- RegisterObject(HoverShip);
- enableCollisionCallback();
- isFloor_ = false;
- }
-
- void HoverShip::tick(float dt)
- {
- SUPER(HoverShip, tick, dt);
- }
-
- void HoverShip::moveFrontBack(const Vector2& value)
- { this->steering_.z -= value.x; }
-
- void HoverShip::moveRightLeft(const Vector2& value)
- { this->steering_.x += value.x; }
-
- void HoverShip::moveUpDown(const Vector2& value)
- { this->steering_.y += value.x; }
-
- void HoverShip::rotateYaw(const Vector2& value)
- {
- this->localAngularAcceleration_.setY(this->localAngularAcceleration_.y() + value.x);
-
- Pawn::rotateYaw(value);
- }
-
- void HoverShip::XMLPort(Element& xmlelement, XMLPort::Mode mode)
- {
- SUPER(HoverShip, XMLPort, xmlelement, mode);
-
- XMLPortParam(HoverShip, "jumpBoost", setJumpBoost, getJumpBoost, xmlelement, mode);
- }
-
- /**
- @brief
- sets this ships jumpBoost
- @param jumpBoost
- */
- void HoverShip::setJumpBoost(float jumpBoost)
- {
- this->jumpBoost_ = jumpBoost;
- }
-
- /**
- @brief
- returns this ships jumpBoost
- @returns jumpBoost
- */
- float HoverShip::getJumpBoost()
- {
- return jumpBoost_;
- }
-
- /**
- @brief
- Removed, does nothing.
- @param value
- */
- void HoverShip::rotatePitch(const Vector2& value) { }
-
- /**
- @brief
- Removed, does nothing.
- @param value
- */
- void HoverShip::rotateRoll(const Vector2& value) { }
-
- /**
- @brief
- Checks if the ship is touching the floor. The ship can only jump if there is contact with someting beneath it.
- */
- bool HoverShip::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint)
- {
- SpaceShip::collidesAgainst(otherObject, cs, contactPoint);
- //SUPER(HoverShip, collidesAgainst, otherObject, cs, contactPoint);
-
- if (contactPoint.m_normalWorldOnB.y() > 0.6
- && this->getVelocity().y < 1) {
- this->isFloor_ = true;
- } else {
- this->isFloor_ = false;
- }
-
- return false;
- }
-
- /**
- @brief
- Makes the ship jump
- @param bBoost
- */
- void HoverShip::boost(bool bBoost) {
- if (bBoost && this->isFloor_)
- {
- this->setVelocity(
- this->getVelocity().x,
- jumpBoost_,
- this->getVelocity().z
- );
- this->isFloor_ = false;
- }
- }
-}
Copied: code/branches/presentationHS15/src/modules/hover/HoverShip.cc (from rev 10959, code/branches/hoverHS15/src/modules/hover/HoverShip.cc)
===================================================================
--- code/branches/presentationHS15/src/modules/hover/HoverShip.cc (rev 0)
+++ code/branches/presentationHS15/src/modules/hover/HoverShip.cc 2015-12-09 11:47:30 UTC (rev 10960)
@@ -0,0 +1,143 @@
+/*
+ * 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:
+ * Cyrill Burgener
+ *
+ */
+
+/**
+ @file HoverShip.cc
+ @brief Implementation of the HoverShip control
+*/
+
+#include "HoverShip.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+ RegisterClass(HoverShip);
+
+ HoverShip::HoverShip(Context* context) : SpaceShip(context)
+ {
+ RegisterObject(HoverShip);
+ enableCollisionCallback();
+ isFloor_ = false;
+ }
+
+ void HoverShip::tick(float dt)
+ {
+ SUPER(HoverShip, tick, dt);
+ }
+
+ void HoverShip::moveFrontBack(const Vector2& value)
+ { this->steering_.z -= value.x; }
+
+ void HoverShip::moveRightLeft(const Vector2& value)
+ { this->steering_.x += value.x; }
+
+ void HoverShip::moveUpDown(const Vector2& value)
+ { this->steering_.y += value.x; }
+
+ void HoverShip::rotateYaw(const Vector2& value)
+ {
+ this->localAngularAcceleration_.setY(this->localAngularAcceleration_.y() + value.x);
+
+ Pawn::rotateYaw(value);
+ }
+
+ void HoverShip::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+ {
+ SUPER(HoverShip, XMLPort, xmlelement, mode);
+
+ XMLPortParam(HoverShip, "jumpBoost", setJumpBoost, getJumpBoost, xmlelement, mode);
+ }
+
+ /**
+ @brief
+ sets this ships jumpBoost
+ @param jumpBoost
+ */
+ void HoverShip::setJumpBoost(float jumpBoost)
+ {
+ this->jumpBoost_ = jumpBoost;
+ }
+
+ /**
+ @brief
+ returns this ships jumpBoost
+ @returns jumpBoost
+ */
+ float HoverShip::getJumpBoost()
+ {
+ return jumpBoost_;
+ }
+
+ /**
+ @brief
+ Removed, does nothing.
+ @param value
+ */
+ void HoverShip::rotatePitch(const Vector2& value) { }
+
+ /**
+ @brief
+ Removed, does nothing.
+ @param value
+ */
+ void HoverShip::rotateRoll(const Vector2& value) { }
+
+ /**
+ @brief
+ Checks if the ship is touching the floor. The ship can only jump if there is contact with someting beneath it.
+ */
+ bool HoverShip::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint)
+ {
+ SpaceShip::collidesAgainst(otherObject, cs, contactPoint);
+ //SUPER(HoverShip, collidesAgainst, otherObject, cs, contactPoint);
+
+ if (contactPoint.m_normalWorldOnB.y() > 0.6
+ && this->getVelocity().y < 1) {
+ this->isFloor_ = true;
+ } else {
+ this->isFloor_ = false;
+ }
+
+ return false;
+ }
+
+ /**
+ @brief
+ Makes the ship jump
+ @param bBoost
+ */
+ void HoverShip::boost(bool bBoost) {
+ if (bBoost && this->isFloor_)
+ {
+ this->setVelocity(
+ this->getVelocity().x,
+ jumpBoost_,
+ this->getVelocity().z
+ );
+ this->isFloor_ = false;
+ }
+ }
+}
Deleted: code/branches/presentationHS15/src/modules/hover/HoverShip.h
===================================================================
--- code/branches/hoverHS15/src/modules/hover/HoverShip.h 2015-12-09 11:14:46 UTC (rev 10959)
+++ code/branches/presentationHS15/src/modules/hover/HoverShip.h 2015-12-09 11:47:30 UTC (rev 10960)
@@ -1,82 +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:
- * Cyrill Burgener
- *
- */
-
-/**
- @file HoverShip.h
- @brief Declaration of the HoverShip class.
-*/
-
-#ifndef _HoverShip_H__
-#define _HoverShip_H__
-
-#include <BulletCollision/NarrowPhaseCollision/btManifoldPoint.h>
-
-#include "HoverPrereqs.h"
-
-#include "core/XMLPort.h"
-#include "worldentities/pawns/SpaceShip.h"
-#include "graphics/Camera.h"
-#include "core/class/Super.h"
-
-namespace orxonox
-{
- class _HoverExport HoverShip : public SpaceShip
- {
- private:
- float jumpBoost_;
- bool isFloor_;
-
- public:
- HoverShip(Context* context);
-
- virtual void tick(float dt);
-
- virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-
- virtual void setJumpBoost(float jumpBoost);
-
- virtual float getJumpBoost();
-
- virtual void moveFrontBack(const Vector2& value);
-
- virtual void moveRightLeft(const Vector2& value);
-
- virtual void moveUpDown(const Vector2& value);
-
- virtual void rotateYaw(const Vector2& value);
-
- virtual void rotatePitch(const Vector2& value);
-
- virtual void rotateRoll(const Vector2& value);
-
- virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint);
-
- virtual void boost(bool bBoost);
-
- };
-}
-
-#endif /* _HoverShip_H__ */
Copied: code/branches/presentationHS15/src/modules/hover/HoverShip.h (from rev 10959, code/branches/hoverHS15/src/modules/hover/HoverShip.h)
===================================================================
--- code/branches/presentationHS15/src/modules/hover/HoverShip.h (rev 0)
+++ code/branches/presentationHS15/src/modules/hover/HoverShip.h 2015-12-09 11:47:30 UTC (rev 10960)
@@ -0,0 +1,82 @@
+/*
+ * 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:
+ * Cyrill Burgener
+ *
+ */
+
+/**
+ @file HoverShip.h
+ @brief Declaration of the HoverShip class.
+*/
+
+#ifndef _HoverShip_H__
+#define _HoverShip_H__
+
+#include <BulletCollision/NarrowPhaseCollision/btManifoldPoint.h>
+
+#include "HoverPrereqs.h"
+
+#include "core/XMLPort.h"
+#include "worldentities/pawns/SpaceShip.h"
+#include "graphics/Camera.h"
+#include "core/class/Super.h"
+
+namespace orxonox
+{
+ class _HoverExport HoverShip : public SpaceShip
+ {
+ private:
+ float jumpBoost_;
+ bool isFloor_;
+
+ public:
+ HoverShip(Context* context);
+
+ virtual void tick(float dt);
+
+ virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+ virtual void setJumpBoost(float jumpBoost);
+
+ virtual float getJumpBoost();
+
+ virtual void moveFrontBack(const Vector2& value);
+
+ virtual void moveRightLeft(const Vector2& value);
+
+ virtual void moveUpDown(const Vector2& value);
+
+ virtual void rotateYaw(const Vector2& value);
+
+ virtual void rotatePitch(const Vector2& value);
+
+ virtual void rotateRoll(const Vector2& value);
+
+ virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint);
+
+ virtual void boost(bool bBoost);
+
+ };
+}
+
+#endif /* _HoverShip_H__ */
Deleted: code/branches/presentationHS15/src/modules/hover/HoverWall.cc
===================================================================
--- code/branches/hoverHS15/src/modules/hover/HoverWall.cc 2015-12-09 11:14:46 UTC (rev 10959)
+++ code/branches/presentationHS15/src/modules/hover/HoverWall.cc 2015-12-09 11:47:30 UTC (rev 10960)
@@ -1,134 +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:
- * Manuel Meier
- * Co-authors:
- * ...
- *
- */
-
-/**
- @file HoverWall.cc
- @brief Represents one Wall piece in the Hover Game
-*/
-
-#include "HoverWall.h"
-
-#include "core/CoreIncludes.h"
-#include "core/GameMode.h"
-#include "graphics/Model.h"
-#include "gametypes/Gametype.h"
-
-
-
-#include "core/XMLPort.h"
-
-namespace orxonox
-{
- RegisterClass(HoverWall);
-
- HoverWall::HoverWall(Context* context) : StaticEntity(context)
- {
- RegisterObject(HoverWall);
- model_ = NULL;
- cs_ = NULL;
- }
-
-
- /**
- @brief
- Constructor of a HoverWall
- @param x
- x-Coordinate of the Square that the Wall is attached to, 0-9, Origin is Bottom left
- @param y
- y-Coordinate of the Square that the Wall is attached to, 0-9, Origin is Bottom left
- @param orientation
- Wall on the right side (1) or on top (2) of this square, 0-1
- */
- HoverWall::HoverWall(Context* context, int x, int y, int orientation) : StaticEntity(context)
- {
- RegisterObject(HoverWall);
-
- int xSize_, zSize_, xPos_, zPos_;
-
- if(orientation == 1){
- xSize_ = 50;
- zSize_ = 2;
- zPos_ = x*100;
- xPos_ = y*100 -50;
- }
- else{
- xSize_ = 2;
- zSize_ = 50;
- zPos_ = x*100-50;
- xPos_ = y*100;
- }
-
-
- model_ = new Model(context);
- model_->setMeshSource("CuboidBody.mesh");
- model_->setScale3D(Vector3(xSize_, 30, zSize_));
- model_->setPosition(Vector3(xPos_,0,zPos_));
-
- this->attach(model_);
-
- this->enableCollisionCallback();
- this->setCollisionResponse(true);
- this->setCollisionType(Static);
-
- cs_ = new BoxCollisionShape(context);
- cs_->setHalfExtents(Vector3(xSize_, 30, zSize_));
- cs_->setPosition(Vector3(xPos_,0,zPos_));
-
- this->attachCollisionShape(cs_);
- }
-
- /**
- @brief
- Destructor.
- */
- HoverWall::~HoverWall()
- {
-
- }
-
- //xml port for loading height and width of the platform, unused
- void HoverWall::XMLPort(Element& xmlelement, XMLPort::Mode mode)
- {
- SUPER(HoverWall, XMLPort, xmlelement, mode);
- }
-
- /**
- @brief
- Is called every tick.
- Handles the movement of the ball and its interaction with the boundaries and bats.
- @param dt
- The time since the last tick.
- */
- void HoverWall::tick(float dt)
- {
- SUPER(HoverWall, tick, dt);
-
- }
-
-
-}
Copied: code/branches/presentationHS15/src/modules/hover/HoverWall.cc (from rev 10959, code/branches/hoverHS15/src/modules/hover/HoverWall.cc)
===================================================================
--- code/branches/presentationHS15/src/modules/hover/HoverWall.cc (rev 0)
+++ code/branches/presentationHS15/src/modules/hover/HoverWall.cc 2015-12-09 11:47:30 UTC (rev 10960)
@@ -0,0 +1,134 @@
+/*
+ * 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:
+ * Manuel Meier
+ * Co-authors:
+ * ...
+ *
+ */
+
+/**
+ @file HoverWall.cc
+ @brief Represents one Wall piece in the Hover Game
+*/
+
+#include "HoverWall.h"
+
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "graphics/Model.h"
+#include "gametypes/Gametype.h"
+
+
+
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+ RegisterClass(HoverWall);
+
+ HoverWall::HoverWall(Context* context) : StaticEntity(context)
+ {
+ RegisterObject(HoverWall);
+ model_ = NULL;
+ cs_ = NULL;
+ }
+
+
+ /**
+ @brief
+ Constructor of a HoverWall
+ @param x
+ x-Coordinate of the Square that the Wall is attached to, 0-9, Origin is Bottom left
+ @param y
+ y-Coordinate of the Square that the Wall is attached to, 0-9, Origin is Bottom left
+ @param orientation
+ Wall on the right side (1) or on top (2) of this square, 0-1
+ */
+ HoverWall::HoverWall(Context* context, int x, int y, int orientation) : StaticEntity(context)
+ {
+ RegisterObject(HoverWall);
+
+ int xSize_, zSize_, xPos_, zPos_;
+
+ if(orientation == 1){
+ xSize_ = 50;
+ zSize_ = 2;
+ zPos_ = x*100;
+ xPos_ = y*100 -50;
+ }
+ else{
+ xSize_ = 2;
+ zSize_ = 50;
+ zPos_ = x*100-50;
+ xPos_ = y*100;
+ }
+
+
+ model_ = new Model(context);
+ model_->setMeshSource("CuboidBody.mesh");
+ model_->setScale3D(Vector3(xSize_, 30, zSize_));
+ model_->setPosition(Vector3(xPos_,0,zPos_));
+
+ this->attach(model_);
+
+ this->enableCollisionCallback();
+ this->setCollisionResponse(true);
+ this->setCollisionType(Static);
+
+ cs_ = new BoxCollisionShape(context);
+ cs_->setHalfExtents(Vector3(xSize_, 30, zSize_));
+ cs_->setPosition(Vector3(xPos_,0,zPos_));
+
+ this->attachCollisionShape(cs_);
+ }
+
+ /**
+ @brief
+ Destructor.
+ */
+ HoverWall::~HoverWall()
+ {
+
+ }
+
+ //xml port for loading height and width of the platform, unused
+ void HoverWall::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+ {
+ SUPER(HoverWall, XMLPort, xmlelement, mode);
+ }
+
+ /**
+ @brief
+ Is called every tick.
+ Handles the movement of the ball and its interaction with the boundaries and bats.
+ @param dt
+ The time since the last tick.
+ */
+ void HoverWall::tick(float dt)
+ {
+ SUPER(HoverWall, tick, dt);
+
+ }
+
+
+}
Deleted: code/branches/presentationHS15/src/modules/hover/HoverWall.h
===================================================================
--- code/branches/hoverHS15/src/modules/hover/HoverWall.h 2015-12-09 11:14:46 UTC (rev 10959)
+++ code/branches/presentationHS15/src/modules/hover/HoverWall.h 2015-12-09 11:47:30 UTC (rev 10960)
@@ -1,63 +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:
- * Manuel Meier
- * Co-authors:
- * ...
- *
- */
-
-/**
- @file HoverWall.h
- @brief See .cc-file for further information
- @ingroup Hover
-*/
-
-#ifndef _HoverWall_H__
-#define _HoverWall_H__
-
-#include "HoverPrereqs.h"
-#include "util/Math.h"
-#include "worldentities/StaticEntity.h"
-#include "graphics/Model.h"
-#include "objects/collisionshapes/BoxCollisionShape.h"
-
-
-namespace orxonox
-{
- class _HoverExport HoverWall : public StaticEntity
- {
- public:
- HoverWall(Context* context);
- HoverWall(Context* context, int x, int y, int orientation);
- virtual ~HoverWall();
- virtual void tick(float dt);
- virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-
- private:
- Model* model_;
- BoxCollisionShape* cs_;
-
- };
-}
-
-#endif /* _HoverWall_H__ */
Copied: code/branches/presentationHS15/src/modules/hover/HoverWall.h (from rev 10959, code/branches/hoverHS15/src/modules/hover/HoverWall.h)
===================================================================
--- code/branches/presentationHS15/src/modules/hover/HoverWall.h (rev 0)
+++ code/branches/presentationHS15/src/modules/hover/HoverWall.h 2015-12-09 11:47:30 UTC (rev 10960)
@@ -0,0 +1,63 @@
+/*
+ * 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:
+ * Manuel Meier
+ * Co-authors:
+ * ...
+ *
+ */
+
+/**
+ @file HoverWall.h
+ @brief See .cc-file for further information
+ @ingroup Hover
+*/
+
+#ifndef _HoverWall_H__
+#define _HoverWall_H__
+
+#include "HoverPrereqs.h"
+#include "util/Math.h"
+#include "worldentities/StaticEntity.h"
+#include "graphics/Model.h"
+#include "objects/collisionshapes/BoxCollisionShape.h"
+
+
+namespace orxonox
+{
+ class _HoverExport HoverWall : public StaticEntity
+ {
+ public:
+ HoverWall(Context* context);
+ HoverWall(Context* context, int x, int y, int orientation);
+ virtual ~HoverWall();
+ virtual void tick(float dt);
+ virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+ private:
+ Model* model_;
+ BoxCollisionShape* cs_;
+
+ };
+}
+
+#endif /* _HoverWall_H__ */
Deleted: code/branches/presentationHS15/src/modules/hover/TimeHUD.cc
===================================================================
--- code/branches/hoverHS15/src/modules/hover/TimeHUD.cc 2015-12-09 11:14:46 UTC (rev 10959)
+++ code/branches/presentationHS15/src/modules/hover/TimeHUD.cc 2015-12-09 11:47:30 UTC (rev 10960)
@@ -1,133 +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:
- * Cyrill Burgener
- *
- */
-
-/**
- @file TimeHUD.cc
- @brief Implementation of the TimeHUD
-*/
-
-
-#include "TimeHUD.h"
-
-#include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
-#include "util/Convert.h"
-#include "Hover.h"
-
-namespace orxonox
-{
- RegisterClass(TimeHUD);
-
- TimeHUD::TimeHUD(Context* context) : OverlayText(context)
- {
- RegisterObject(TimeHUD);
-
- this->_time = 0.0f;
- this->_running = false;
- this->hoverGame = 0;
- setRunning(true);
- }
-
- void TimeHUD::XMLPort(Element& xmlelement, XMLPort::Mode mode)
- {
- SUPER(TimeHUD, XMLPort, xmlelement, mode);
- }
-
- inline std::string getTimeString(float time) {
- std::ostringstream ss;
-
- int h = ((int) (time * 100.0f)) % 100;
- int s = ((int) time) % 60;
- int m = (int) (time / 60.0f);
-
- ss << m << ":";
-
- if(s < 10) {
- ss << 0;
- }
- ss << s << ":";
-
- if(h < 10) {
- ss << 0;
- }
- ss << h << "s";
- return ss.str();
- }
-
- void TimeHUD::tick(float dt)
- {
- SUPER(TimeHUD, tick, dt);
-
- if(this->_running) {
- this->_time += dt;
- }
- if (this->hoverGame)
- {
- this->setCaption(getTimeString(this->_time));
- }
- if(this->hoverGame->getFlags() == 0)
- setRunning(false);
-
- }
-
- void TimeHUD::changedOwner()
- {
- SUPER(TimeHUD, changedOwner);
-
- if (this->getOwner() && this->getOwner()->getGametype())
- {
- this->hoverGame = orxonox_cast<Hover*>(this->getOwner()->getGametype());
- }
- else
- {
- this->hoverGame = 0;
- }
- }
-
- /**
- @brief
- sets if the clock is running
- @param running
- */
- void TimeHUD::setRunning(bool running)
- {
- this->_running = running;
- }
-
- /**
- @brief
- returns if the clock is running
- @returns running
- */
- bool TimeHUD::isRunning() {
- return this->_running;
- }
-
- void TimeHUD::reset()
- {
- this->_time = 0;
- }
-}
Copied: code/branches/presentationHS15/src/modules/hover/TimeHUD.cc (from rev 10959, code/branches/hoverHS15/src/modules/hover/TimeHUD.cc)
===================================================================
--- code/branches/presentationHS15/src/modules/hover/TimeHUD.cc (rev 0)
+++ code/branches/presentationHS15/src/modules/hover/TimeHUD.cc 2015-12-09 11:47:30 UTC (rev 10960)
@@ -0,0 +1,133 @@
+/*
+ * 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:
+ * Cyrill Burgener
+ *
+ */
+
+/**
+ @file TimeHUD.cc
+ @brief Implementation of the TimeHUD
+*/
+
+
+#include "TimeHUD.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "util/Convert.h"
+#include "Hover.h"
+
+namespace orxonox
+{
+ RegisterClass(TimeHUD);
+
+ TimeHUD::TimeHUD(Context* context) : OverlayText(context)
+ {
+ RegisterObject(TimeHUD);
+
+ this->_time = 0.0f;
+ this->_running = false;
+ this->hoverGame = 0;
+ setRunning(true);
+ }
+
+ void TimeHUD::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+ {
+ SUPER(TimeHUD, XMLPort, xmlelement, mode);
+ }
+
+ inline std::string getTimeString(float time) {
+ std::ostringstream ss;
+
+ int h = ((int) (time * 100.0f)) % 100;
+ int s = ((int) time) % 60;
+ int m = (int) (time / 60.0f);
+
+ ss << m << ":";
+
+ if(s < 10) {
+ ss << 0;
+ }
+ ss << s << ":";
+
+ if(h < 10) {
+ ss << 0;
+ }
+ ss << h << "s";
+ return ss.str();
+ }
+
+ void TimeHUD::tick(float dt)
+ {
+ SUPER(TimeHUD, tick, dt);
+
+ if(this->_running) {
+ this->_time += dt;
+ }
+ if (this->hoverGame)
+ {
+ this->setCaption(getTimeString(this->_time));
+ }
+ if(this->hoverGame->getFlags() == 0)
+ setRunning(false);
+
+ }
+
+ void TimeHUD::changedOwner()
+ {
+ SUPER(TimeHUD, changedOwner);
+
+ if (this->getOwner() && this->getOwner()->getGametype())
+ {
+ this->hoverGame = orxonox_cast<Hover*>(this->getOwner()->getGametype());
+ }
+ else
+ {
+ this->hoverGame = 0;
+ }
+ }
+
+ /**
+ @brief
+ sets if the clock is running
+ @param running
+ */
+ void TimeHUD::setRunning(bool running)
+ {
+ this->_running = running;
+ }
+
+ /**
+ @brief
+ returns if the clock is running
+ @returns running
+ */
+ bool TimeHUD::isRunning() {
+ return this->_running;
+ }
+
+ void TimeHUD::reset()
+ {
+ this->_time = 0;
+ }
+}
Deleted: code/branches/presentationHS15/src/modules/hover/TimeHUD.h
===================================================================
--- code/branches/hoverHS15/src/modules/hover/TimeHUD.h 2015-12-09 11:14:46 UTC (rev 10959)
+++ code/branches/presentationHS15/src/modules/hover/TimeHUD.h 2015-12-09 11:47:30 UTC (rev 10960)
@@ -1,61 +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:
- * Cyrill Burgener
- *
- */
-
- /**
- @file TimeHUD.h
- @brief Declaration of the TimeHUD class.
-*/
-
-#ifndef _TimeHUD_H__
-#define _TimeHUD_H__
-
-#include "hover/HoverPrereqs.h"
-
-#include "tools/interfaces/Tickable.h"
-#include "overlays/OverlayText.h"
-
-namespace orxonox
-{
- class _HoverExport TimeHUD : public OverlayText, public Tickable
- {
- public:
- TimeHUD(Context* context);
-
- virtual void tick(float dt);
- virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
- virtual void changedOwner();
-
- virtual void setRunning(bool running);
- virtual bool isRunning();
- virtual void reset();
-
- private:
- Hover* hoverGame;
- float _time;
- bool _running;
- };
-}
-#endif /* _TimeHUD_H__ */
Copied: code/branches/presentationHS15/src/modules/hover/TimeHUD.h (from rev 10959, code/branches/hoverHS15/src/modules/hover/TimeHUD.h)
===================================================================
--- code/branches/presentationHS15/src/modules/hover/TimeHUD.h (rev 0)
+++ code/branches/presentationHS15/src/modules/hover/TimeHUD.h 2015-12-09 11:47:30 UTC (rev 10960)
@@ -0,0 +1,61 @@
+/*
+ * 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:
+ * Cyrill Burgener
+ *
+ */
+
+ /**
+ @file TimeHUD.h
+ @brief Declaration of the TimeHUD class.
+*/
+
+#ifndef _TimeHUD_H__
+#define _TimeHUD_H__
+
+#include "hover/HoverPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OverlayText.h"
+
+namespace orxonox
+{
+ class _HoverExport TimeHUD : public OverlayText, public Tickable
+ {
+ public:
+ TimeHUD(Context* context);
+
+ virtual void tick(float dt);
+ virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+ virtual void changedOwner();
+
+ virtual void setRunning(bool running);
+ virtual bool isRunning();
+ virtual void reset();
+
+ private:
+ Hover* hoverGame;
+ float _time;
+ bool _running;
+ };
+}
+#endif /* _TimeHUD_H__ */
More information about the Orxonox-commit
mailing list