Commits

CSBerger committed 94848ff

added trigger class

Comments (0)

Files changed (4)

 	actionsToKeyBindings[ROLL_RIGHT] = '.';
 	actionsToKeyBindings[THROTTLE_DOWN] = '-';
 	actionsToKeyBindings[THROTTLE_UP] = '=';
-	actionsToKeyBindings[FIRE_GUN] = JOY_BUTTON_1;
+	actionsToKeyBindings[FIRE_GUN] = GLFW_KEY_SPACE;
 }
 
 void InputHandler::translateInputToActions(map<int, bool> & actionButtonsHeldDown, map<int, float> &steeringAxes) {

nightspace-mac2.xcodeproj/project.pbxproj

 /* End PBXCopyFilesBuildPhase section */
 
 /* Begin PBXFileReference section */
+		835F00FA15F1AAD2009B3C16 /* trigger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = trigger.h; sourceTree = "<group>"; };
 		83BE1FB6148B4D0100A251F6 /* boost.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = boost.framework; path = ../../../Libs/boost/framework/boost.framework; sourceTree = "<group>"; };
 		83BE1FBA148B4D2D00A251F6 /* libfreetype.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libfreetype.a; path = ../../../../../usr/local/lib/libfreetype.a; sourceTree = "<group>"; };
 		83BE1FC2148BDCE600A251F6 /* libftgl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libftgl.a; path = ../../../../../usr/local/lib/libftgl.a; sourceTree = "<group>"; };
 		83FCCAB214893E1B00047F46 = {
 			isa = PBXGroup;
 			children = (
-				83DFB76814907281004D307B /* libglfw.a */,
-				83BE1FC2148BDCE600A251F6 /* libftgl.a */,
+				83FCCB4014893EC200047F46 /* action.h */,
+				83FCCAE014893EA900047F46 /* art */,
+				83FCCAD014893EA900047F46 /* bindings.txt */,
+				83BE1FB6148B4D0100A251F6 /* boost.framework */,
+				83FCCB1514893EC200047F46 /* camera.cpp */,
+				83FCCB3E14893EC200047F46 /* camera.h */,
+				83FCCB3D14893EC200047F46 /* character.h */,
+				83FCCB1414893EC200047F46 /* controller.cpp */,
+				83FCCB3C14893EC200047F46 /* controller.h */,
+				83FCCB1314893EC200047F46 /* dummyController.cpp */,
+				83FCCB3B14893EC200047F46 /* dummyController.h */,
+				83FCCB1214893EC200047F46 /* entity.cpp */,
+				83FCCB3A14893EC200047F46 /* entity.h */,
+				83FCCB3914893EC200047F46 /* fileLoader.h */,
+				83FCCB1014893EC200047F46 /* fleeController.cpp */,
+				83FCCB3814893EC200047F46 /* fleeController.h */,
+				83FCCB0F14893EC200047F46 /* followController.cpp */,
+				83FCCB3714893EC200047F46 /* followController.h */,
+				83FCCAD914893EA900047F46 /* fonts */,
+				83FCCB0E14893EC200047F46 /* FTGLFontManager.cpp */,
+				83FCCB3614893EC200047F46 /* FTGLFontManager.h */,
+				83FCCB0D14893EC200047F46 /* GameClock.cpp */,
+				83FCCB3514893EC200047F46 /* GameClock.h */,
+				83FCCB0C14893EC200047F46 /* gamestate.cpp */,
+				83FCCB3414893EC200047F46 /* gamestate.h */,
+				83FCCAD714893EA900047F46 /* GL */,
+				83FCCB1914893EC200047F46 /* glew.c */,
+				83FCCB3314893EC200047F46 /* glew.h */,
+				83FCCB0B14893EC200047F46 /* GLGraphicsFont.cpp */,
+				83FCCB3214893EC200047F46 /* GLGraphicsFont.h */,
+				83FCCB0A14893EC200047F46 /* glShaderManager.cpp */,
+				83FCCB3114893EC200047F46 /* glshadermanager.h */,
+				83FCCAD614893EA900047F46 /* gouraud.frag */,
+				83FCCAD314893EA900047F46 /* gouraud.vert */,
+				83FCCB0814893EC200047F46 /* GraphicsFont.cpp */,
+				83FCCB2F14893EC200047F46 /* GraphicsFont.h */,
+				83FCCB0714893EC200047F46 /* gui.cpp */,
+				83FCCB2E14893EC200047F46 /* gui.h */,
+				83FCCB0614893EC200047F46 /* gunshot.cpp */,
+				83FCCB2D14893EC200047F46 /* gunshot.h */,
+				83FCCB0514893EC200047F46 /* HudElement.cpp */,
+				83FCCB2C14893EC200047F46 /* HudElement.h */,
+				83FCCB0414893EC200047F46 /* InputHandler.cpp */,
+				83FCCB2B14893EC200047F46 /* InputHandler.h */,
 				83DFB75D14906789004D307B /* libfreeimage.a */,
 				83BE1FBA148B4D2D00A251F6 /* libfreetype.a */,
-				83BE1FB6148B4D0100A251F6 /* boost.framework */,
+				83BE1FC2148BDCE600A251F6 /* libftgl.a */,
+				83DFB76814907281004D307B /* libglfw.a */,
+				83FCCB0314893EC200047F46 /* main.cpp */,
+				83FCCB0114893EC200047F46 /* mesh.cpp */,
+				83FCCB2914893EC200047F46 /* mesh.h */,
+				83FCCACF14893EA900047F46 /* mission1.txt */,
+				83FCCACE14893EA900047F46 /* mwing.txt */,
+				83FCCAC014893E1B00047F46 /* nightspace-mac2 */,
 				83FCCB6714895DD800047F46 /* OpenGL.framework */,
-				83FCCAF414893EC200047F46 /* vec.cpp */,
-				83FCCAF514893EC200047F46 /* util.cpp */,
-				83FCCAF614893EC200047F46 /* textureLoader.cpp */,
-				83FCCAF714893EC200047F46 /* SpeedBarHUD.cpp */,
+				83FCCB0014893EC200047F46 /* openGlRenderer.cpp */,
+				83FCCB2814893EC200047F46 /* openGlRenderer.h */,
+				83FCCAFF14893EC200047F46 /* particle.cpp */,
+				83FCCB2714893EC200047F46 /* particle.h */,
+				83FCCAFE14893EC200047F46 /* perception.cpp */,
+				83FCCB2614893EC200047F46 /* perception.h */,
+				83FCCAD514893EA900047F46 /* phong.frag */,
+				83FCCAD214893EA900047F46 /* phong.vert */,
+				83FCCAFD14893EC200047F46 /* playerController.cpp */,
+				83FCCB2514893EC200047F46 /* playerController.h */,
+				83FCCAFC14893EC200047F46 /* PlayerNameHUD.cpp */,
+				83FCCB2414893EC200047F46 /* PlayerNameHUD.h */,
+				83FCCABE14893E1B00047F46 /* Products */,
+				83FCCB1814893EC200047F46 /* pugiconfig.hpp */,
+				83FCCAFB14893EC200047F46 /* pugixml.cpp */,
+				83FCCB1714893EC200047F46 /* pugixml.hpp */,
+				83FCCB2314893EC200047F46 /* renderer.h */,
+				83FCCB2214893EC200047F46 /* resource.h */,
+				83FCCB2114893EC200047F46 /* settings.h */,
+				83FCCACB14893EA900047F46 /* settings.ini */,
+				83FCCAFA14893EC200047F46 /* ship.cpp */,
+				83FCCB2014893EC200047F46 /* ship.h */,
+				83FCCACA14893EA900047F46 /* ships.xml */,
+				83FCCAF914893EC200047F46 /* simulator.cpp */,
+				83FCCB1F14893EC200047F46 /* simulator.h */,
 				83FCCAF814893EC200047F46 /* SingleLogger.cpp */,
 				83FCCB1E14893EC200047F46 /* SingleLogger.h */,
-				83FCCAF914893EC200047F46 /* simulator.cpp */,
-				83FCCAFA14893EC200047F46 /* ship.cpp */,
-				83FCCAFB14893EC200047F46 /* pugixml.cpp */,
-				83FCCAFC14893EC200047F46 /* PlayerNameHUD.cpp */,
-				83FCCAFD14893EC200047F46 /* playerController.cpp */,
-				83FCCAFE14893EC200047F46 /* perception.cpp */,
-				83FCCAFF14893EC200047F46 /* particle.cpp */,
-				83FCCB0014893EC200047F46 /* openGlRenderer.cpp */,
-				83FCCB0114893EC200047F46 /* mesh.cpp */,
-				83FCCB0314893EC200047F46 /* main.cpp */,
-				83FCCB0414893EC200047F46 /* InputHandler.cpp */,
-				83FCCB0514893EC200047F46 /* HudElement.cpp */,
-				83FCCB0614893EC200047F46 /* gunshot.cpp */,
-				83FCCB0714893EC200047F46 /* gui.cpp */,
-				83FCCB0814893EC200047F46 /* GraphicsFont.cpp */,
-				83FCCB0A14893EC200047F46 /* glShaderManager.cpp */,
-				83FCCB0B14893EC200047F46 /* GLGraphicsFont.cpp */,
-				83FCCB0C14893EC200047F46 /* gamestate.cpp */,
-				83FCCB0D14893EC200047F46 /* GameClock.cpp */,
-				83FCCB0E14893EC200047F46 /* FTGLFontManager.cpp */,
-				83FCCB0F14893EC200047F46 /* followController.cpp */,
-				83FCCB1014893EC200047F46 /* fleeController.cpp */,
-				83FCCB1214893EC200047F46 /* entity.cpp */,
-				83FCCB1314893EC200047F46 /* dummyController.cpp */,
-				83FCCB1414893EC200047F46 /* controller.cpp */,
-				83FCCB1514893EC200047F46 /* camera.cpp */,
-				83FCCB1714893EC200047F46 /* pugixml.hpp */,
-				83FCCB1814893EC200047F46 /* pugiconfig.hpp */,
-				83FCCB1914893EC200047F46 /* glew.c */,
+				83FCCAF714893EC200047F46 /* SpeedBarHUD.cpp */,
+				83FCCB1D14893EC200047F46 /* SpeedBarHUD.h */,
+				83FCCACD14893EA900047F46 /* TextFile2.txt */,
+				83FCCAF614893EC200047F46 /* textureLoader.cpp */,
+				83FCCACC14893EA900047F46 /* TODO.txt */,
+				83FCCAD414893EA900047F46 /* toon.frag */,
+				83FCCAD114893EA900047F46 /* toon.vert */,
+				835F00FA15F1AAD2009B3C16 /* trigger.h */,
+				83FCCAF514893EC200047F46 /* util.cpp */,
+				83FCCB1C14893EC200047F46 /* util.h */,
+				83FCCAF414893EC200047F46 /* vec.cpp */,
+				83FCCB1B14893EC200047F46 /* vec.h */,
 				83FCCB1A14893EC200047F46 /* wglew.h */,
-				83FCCB1B14893EC200047F46 /* vec.h */,
-				83FCCB1C14893EC200047F46 /* util.h */,
-				83FCCB1D14893EC200047F46 /* SpeedBarHUD.h */,
-				83FCCB1F14893EC200047F46 /* simulator.h */,
-				83FCCB2014893EC200047F46 /* ship.h */,
-				83FCCB2114893EC200047F46 /* settings.h */,
-				83FCCB2214893EC200047F46 /* resource.h */,
-				83FCCB2314893EC200047F46 /* renderer.h */,
-				83FCCB2414893EC200047F46 /* PlayerNameHUD.h */,
-				83FCCB2514893EC200047F46 /* playerController.h */,
-				83FCCB2614893EC200047F46 /* perception.h */,
-				83FCCB2714893EC200047F46 /* particle.h */,
-				83FCCB2814893EC200047F46 /* openGlRenderer.h */,
-				83FCCB2914893EC200047F46 /* mesh.h */,
-				83FCCB2B14893EC200047F46 /* InputHandler.h */,
-				83FCCB2C14893EC200047F46 /* HudElement.h */,
-				83FCCB2D14893EC200047F46 /* gunshot.h */,
-				83FCCB2E14893EC200047F46 /* gui.h */,
-				83FCCB2F14893EC200047F46 /* GraphicsFont.h */,
-				83FCCB3114893EC200047F46 /* glshadermanager.h */,
-				83FCCB3214893EC200047F46 /* GLGraphicsFont.h */,
-				83FCCB3314893EC200047F46 /* glew.h */,
-				83FCCB3414893EC200047F46 /* gamestate.h */,
-				83FCCB3514893EC200047F46 /* GameClock.h */,
-				83FCCB3614893EC200047F46 /* FTGLFontManager.h */,
-				83FCCB3714893EC200047F46 /* followController.h */,
-				83FCCB3814893EC200047F46 /* fleeController.h */,
-				83FCCB3914893EC200047F46 /* fileLoader.h */,
-				83FCCB3A14893EC200047F46 /* entity.h */,
-				83FCCB3B14893EC200047F46 /* dummyController.h */,
-				83FCCB3C14893EC200047F46 /* controller.h */,
-				83FCCB3D14893EC200047F46 /* character.h */,
-				83FCCB3E14893EC200047F46 /* camera.h */,
-				83FCCB4014893EC200047F46 /* action.h */,
-				83FCCACA14893EA900047F46 /* ships.xml */,
-				83FCCACB14893EA900047F46 /* settings.ini */,
-				83FCCACC14893EA900047F46 /* TODO.txt */,
-				83FCCACD14893EA900047F46 /* TextFile2.txt */,
-				83FCCACE14893EA900047F46 /* mwing.txt */,
-				83FCCACF14893EA900047F46 /* mission1.txt */,
-				83FCCAD014893EA900047F46 /* bindings.txt */,
-				83FCCAD114893EA900047F46 /* toon.vert */,
-				83FCCAD214893EA900047F46 /* phong.vert */,
-				83FCCAD314893EA900047F46 /* gouraud.vert */,
-				83FCCAD414893EA900047F46 /* toon.frag */,
-				83FCCAD514893EA900047F46 /* phong.frag */,
-				83FCCAD614893EA900047F46 /* gouraud.frag */,
-				83FCCAD714893EA900047F46 /* GL */,
-				83FCCAD914893EA900047F46 /* fonts */,
-				83FCCAE014893EA900047F46 /* art */,
-				83FCCAC014893E1B00047F46 /* nightspace-mac2 */,
-				83FCCABE14893E1B00047F46 /* Products */,
 			);
 			sourceTree = "<group>";
 		};

nightspace-mac2.xcodeproj/project.xcworkspace/xcuserdata/chris.xcuserdatad/UserInterfaceState.xcuserstate

Binary file modified.
 #include "InputHandler.h"
 #include "perception.h"
 
+#include "trigger.h"
 const int deltaT = 0.1;
 
 class Simulator {