Updated dummy joystick handler to pretend to have yaw support.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1514 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
Jens Ayton 2008-03-25 22:42:44 +00:00
parent adecdd40cd
commit 4c2f7efcb2
3 changed files with 17 additions and 10 deletions

View File

@ -1019,7 +1019,7 @@
083325DC09DDBCDE00F5B8E4 /* OOColor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OOColor.m; sourceTree = "<group>"; };
083DB4D30A70E51E00B419B2 /* OOBrain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OOBrain.h; sourceTree = "<group>"; };
083DB4D40A70E51E00B419B2 /* OOBrain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OOBrain.m; sourceTree = "<group>"; };
0865432206B8447D000CA0AB /* Oolite.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Oolite.app; sourceTree = BUILT_PRODUCTS_DIR; };
0865432206B8447D000CA0AB /* OoliteDev.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OoliteDev.app; sourceTree = BUILT_PRODUCTS_DIR; };
0878FD2F086EF845004CB752 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
1A020E0A0D020AFB00C3F51E /* changedScriptHandlers.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = changedScriptHandlers.plist; sourceTree = "<group>"; };
@ -1682,7 +1682,7 @@
19C28FACFE9D520D11CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
0865432206B8447D000CA0AB /* Oolite.app */,
0865432206B8447D000CA0AB /* OoliteDev.app */,
1A71E6F30BCE340C00CD5C13 /* libpng.a */,
);
name = Products;
@ -2898,7 +2898,7 @@
name = Oolite;
productInstallPath = "$(HOME)/Applications";
productName = Oolite;
productReference = 0865432206B8447D000CA0AB /* Oolite.app */;
productReference = 0865432206B8447D000CA0AB /* OoliteDev.app */;
productType = "com.apple.product-type.application";
};
1A71E6F20BCE340C00CD5C13 /* libpng-custom */ = {

View File

@ -132,10 +132,11 @@ enum {
BOOL butstate[BUTTON_end];
}
+ (id)sharedStickHandler;
+ (id) sharedStickHandler;
- (int) getNumSticks;
- (NSPoint) getRollPitchAxis;
- (const BOOL *)getAllButtonStates;
- (double) getAxisState:(int)function;
- (const BOOL *) getAllButtonStates;
@end

View File

@ -53,26 +53,32 @@ JoystickHandler *sSharedStickHandler = nil;
@implementation JoystickHandler
+ (id)sharedStickHandler
+ (id) sharedStickHandler
{
if (sSharedStickHandler == nil) sSharedStickHandler = [[JoystickHandler alloc] init];
return sSharedStickHandler;
}
- (int)getNumSticks
- (int) getNumSticks
{
return 0;
}
- (NSPoint)getRollPitchAxis
- (NSPoint) getRollPitchAxis
{
return NSMakePoint(0.0f, 0.0f);
return NSZeroPoint;
}
- (const BOOL *)getAllButtonStates
- (double) getAxisState:(int)function
{
return 0.0;
}
- (const BOOL *) getAllButtonStates
{
return butstate;
}