Changeged various option macros to use 0/1 convention instead of undefined/defined convention. Moved definition of these macros into an xcconfig file when building for OS X, so that their definition is shared with the debug OXP and is the same across configurations.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2298 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
Jens Ayton 2009-08-21 19:46:53 +00:00
parent 87a4359592
commit 8f31c44b21
33 changed files with 134 additions and 120 deletions

View File

@ -35,26 +35,28 @@ ifeq ($(debug),yes)
ADDITIONAL_CFLAGS += -g -O0 ADDITIONAL_CFLAGS += -g -O0
ADDITIONAL_OBJCFLAGS += -g -O0 ADDITIONAL_OBJCFLAGS += -g -O0
GNUSTEP_OBJ_DIR_NAME := $(GNUSTEP_OBJ_DIR_NAME).dbg GNUSTEP_OBJ_DIR_NAME := $(GNUSTEP_OBJ_DIR_NAME).dbg
ADDITIONAL_CFLAGS += -DDEBUG -DOO_DEBUG -DDEBUG_GRAPHVIZ
ADDITIONAL_OBJCFLAGS += -DDEBUG -DOO_DEBUG -DDEBUG_GRAPHVIZ
endif endif
ifeq ($(BUILD_WITH_DEBUG_FUNCTIONALITY),no) ifeq ($(BUILD_WITH_DEBUG_FUNCTIONALITY),no)
ADDITIONAL_CFLAGS += -DNDEBUG ADDITIONAL_CFLAGS += -DNDEBUG
ADDITIONAL_OBJCFLAGS += -DNDEBUG ADDITIONAL_OBJCFLAGS += -DNDEBUG
endif endif
ifeq ($(PROCEDURAL_PLANETS),yes) ifeq ($(PROCEDURAL_PLANETS),yes)
ADDITIONAL_CFLAGS += -DALLOW_PROCEDURAL_PLANETS ADDITIONAL_CFLAGS += -DALLOW_PROCEDURAL_PLANETS=1
ADDITIONAL_OBJCFLAGS += -DALLOW_PROCEDURAL_PLANETS ADDITIONAL_OBJCFLAGS += -DALLOW_PROCEDURAL_PLANETS=1
endif endif
ifeq ($(DOCKING_CLEARANCE),yes) ifeq ($(DOCKING_CLEARANCE),yes)
ADDITIONAL_CFLAGS += -DDOCKING_CLEARANCE_ENABLED ADDITIONAL_CFLAGS += -DDOCKING_CLEARANCE_ENABLED=1
ADDITIONAL_OBJCFLAGS += -DDOCKING_CLEARANCE_ENABLED ADDITIONAL_OBJCFLAGS += -DDOCKING_CLEARANCE_ENABLED=1
endif endif
ifeq ($(WORMHOLE_SCANNER),yes) ifeq ($(WORMHOLE_SCANNER),yes)
ADDITIONAL_CFLAGS += -DWORMHOLE_SCANNER ADDITIONAL_CFLAGS += -DWORMHOLE_SCANNER=1
ADDITIONAL_OBJCFLAGS += -DWORMHOLE_SCANNER ADDITIONAL_OBJCFLAGS += -DWORMHOLE_SCANNER=1
endif endif
ifeq ($(TARGET_INCOMING_MISSILES),yes) ifeq ($(TARGET_INCOMING_MISSILES),yes)
ADDITIONAL_CFLAGS += -DTARGET_INCOMING_MISSILES ADDITIONAL_CFLAGS += -DTARGET_INCOMING_MISSILES=1
ADDITIONAL_OBJCFLAGS += -DTARGET_INCOMING_MISSILES ADDITIONAL_OBJCFLAGS += -DTARGET_INCOMING_MISSILES=1
endif endif
ifeq ($(SNAPSHOT_BUILD), yes) ifeq ($(SNAPSHOT_BUILD), yes)

View File

@ -1632,6 +1632,7 @@
1AD1F4C70CD9E42A00EAE520 /* NSThreadOOExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSThreadOOExtensions.h; sourceTree = "<group>"; }; 1AD1F4C70CD9E42A00EAE520 /* NSThreadOOExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSThreadOOExtensions.h; sourceTree = "<group>"; };
1AD1F4C80CD9E42A00EAE520 /* NSThreadOOExtensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSThreadOOExtensions.m; sourceTree = "<group>"; }; 1AD1F4C80CD9E42A00EAE520 /* NSThreadOOExtensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSThreadOOExtensions.m; sourceTree = "<group>"; };
1AD6B3280E3BB55E001C42D9 /* debug-exports-64.exp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.exports; path = "debug-exports-64.exp"; sourceTree = "<group>"; }; 1AD6B3280E3BB55E001C42D9 /* debug-exports-64.exp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.exports; path = "debug-exports-64.exp"; sourceTree = "<group>"; };
1AD88FAF103F29D300AA36F4 /* oolite-options.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "oolite-options.xcconfig"; path = "src/Cocoa/oolite-options.xcconfig"; sourceTree = "<group>"; };
1ADA8AB10F42DBA80001BEC9 /* OODeepCopy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OODeepCopy.h; sourceTree = "<group>"; }; 1ADA8AB10F42DBA80001BEC9 /* OODeepCopy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OODeepCopy.h; sourceTree = "<group>"; };
1ADA8AB20F42DBA80001BEC9 /* OODeepCopy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OODeepCopy.m; sourceTree = "<group>"; }; 1ADA8AB20F42DBA80001BEC9 /* OODeepCopy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OODeepCopy.m; sourceTree = "<group>"; };
1ADBA54E0BD0F173008FC99C /* OOBasicMaterial.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OOBasicMaterial.h; sourceTree = "<group>"; }; 1ADBA54E0BD0F173008FC99C /* OOBasicMaterial.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OOBasicMaterial.h; sourceTree = "<group>"; };
@ -2792,6 +2793,7 @@
1A9407BF0BAF7032005F6CF3 /* GNUmakefile */, 1A9407BF0BAF7032005F6CF3 /* GNUmakefile */,
1AF8E33A0CC169F500CA6001 /* contributors.txt */, 1AF8E33A0CC169F500CA6001 /* contributors.txt */,
1A846BA90D79F9570081280D /* oolite-version.xcconfig */, 1A846BA90D79F9570081280D /* oolite-version.xcconfig */,
1AD88FAF103F29D300AA36F4 /* oolite-options.xcconfig */,
1A8A3BE90B963F02007D20B8 /* Source */, 1A8A3BE90B963F02007D20B8 /* Source */,
1AC0E9380B974D8700C46994 /* Documentation */, 1AC0E9380B974D8700C46994 /* Documentation */,
1A5BF2710916D45B00BF238F /* MDImporter */, 1A5BF2710916D45B00BF238F /* MDImporter */,
@ -3433,7 +3435,7 @@
/* Begin XCBuildConfiguration section */ /* Begin XCBuildConfiguration section */
08B31CAD08FE63D70038D42F /* Debug */ = { 08B31CAD08FE63D70038D42F /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 1A846BA90D79F9570081280D /* oolite-version.xcconfig */; baseConfigurationReference = 1AD88FAF103F29D300AA36F4 /* oolite-options.xcconfig */;
buildSettings = { buildSettings = {
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
COPY_SCHEMATA = 1; COPY_SCHEMATA = 1;
@ -3448,12 +3450,10 @@
GCC_OPTIMIZATION_LEVEL = 0; GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = XP_UNIX; GCC_PREPROCESSOR_DEFINITIONS = XP_UNIX;
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = ( GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = (
ALLOW_PROCEDURAL_PLANETS, "OO_DEBUG=1",
DOCKING_CLEARANCE_ENABLED, "DEBUG_GRAPHVIZ=1",
WORMHOLE_SCANNER,
OO_DEBUG,
DEBUG_GRAPHVIZ,
DEBUG, DEBUG,
$OOLITE_OPTION_MACROS,
); );
GCC_REUSE_STRINGS = YES; GCC_REUSE_STRINGS = YES;
GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_SYMBOLS_PRIVATE_EXTERN = NO;
@ -3505,7 +3505,7 @@
}; };
08B31CAE08FE63D70038D42F /* Deployment */ = { 08B31CAE08FE63D70038D42F /* Deployment */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 1A846BA90D79F9570081280D /* oolite-version.xcconfig */; baseConfigurationReference = 1AD88FAF103F29D300AA36F4 /* oolite-options.xcconfig */;
buildSettings = { buildSettings = {
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = YES; DEAD_CODE_STRIPPING = YES;
@ -3517,8 +3517,7 @@
GCC_OPTIMIZATION_LEVEL = s; GCC_OPTIMIZATION_LEVEL = s;
GCC_PREPROCESSOR_DEFINITIONS = XP_UNIX; GCC_PREPROCESSOR_DEFINITIONS = XP_UNIX;
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = ( GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = (
DOCKING_CLEARANCE_ENABLED, $OOLITE_OPTION_MACROS,
WORMHOLE_SCANNER,
NDEBUG, NDEBUG,
OO_EXCLUDE_DEBUG_SUPPORT, OO_EXCLUDE_DEBUG_SUPPORT,
); );
@ -3636,11 +3635,7 @@
GCC_ENABLE_FIX_AND_CONTINUE = NO; GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_OPTIMIZATION_LEVEL = s; GCC_OPTIMIZATION_LEVEL = s;
GCC_PREPROCESSOR_DEFINITIONS = XP_UNIX; GCC_PREPROCESSOR_DEFINITIONS = XP_UNIX;
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = ( GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = $OOLITE_OPTION_MACROS;
DOCKING_CLEARANCE_ENABLED,
WORMHOLE_SCANNER,
"OO_SMART_CRASH_REPORT_INSTALL=1",
);
GCC_REUSE_STRINGS = YES; GCC_REUSE_STRINGS = YES;
GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_TREAT_WARNINGS_AS_ERRORS = YES; GCC_TREAT_WARNINGS_AS_ERRORS = YES;
@ -3740,7 +3735,7 @@
}; };
1A581F5E0E311A59007594C1 /* Debug GCC 4.2/Leopard */ = { 1A581F5E0E311A59007594C1 /* Debug GCC 4.2/Leopard */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 1A846BA90D79F9570081280D /* oolite-version.xcconfig */; baseConfigurationReference = 1AD88FAF103F29D300AA36F4 /* oolite-options.xcconfig */;
buildSettings = { buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64"; ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64";
@ -3756,11 +3751,10 @@
GCC_OPTIMIZATION_LEVEL = 0; GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = XP_UNIX; GCC_PREPROCESSOR_DEFINITIONS = XP_UNIX;
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = ( GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = (
DOCKING_CLEARANCE_ENABLED, "OO_DEBUG=1",
WORMHOLE_SCANNER, "DEBUG_GRAPHVIZ=1",
OO_DEBUG,
DEBUG_GRAPHVIZ,
DEBUG, DEBUG,
$OOLITE_OPTION_MACROS,
); );
GCC_REUSE_STRINGS = YES; GCC_REUSE_STRINGS = YES;
GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_SYMBOLS_PRIVATE_EXTERN = NO;

View File

@ -87,7 +87,7 @@ enum {
BUTTON_ARMMISSILE, BUTTON_ARMMISSILE,
BUTTON_LAUNCHMISSILE, BUTTON_LAUNCHMISSILE,
BUTTON_UNARM, BUTTON_UNARM,
#ifdef TARGET_INCOMING_MISSILES #if TARGET_INCOMING_MISSILES
BUTTON_TARGETINCOMINGMISSILE, BUTTON_TARGETINCOMINGMISSILE,
#endif #endif
BUTTON_CYCLEMISSILE, BUTTON_CYCLEMISSILE,

View File

@ -0,0 +1,10 @@
#include "oolite-version.xcconfig"
ALLOW_PROCEDURAL_PLANETS = 1
DOCKING_CLEARANCE_ENABLED = 1
TARGET_INCOMING_MISSILES = 0
WORMHOLE_SCANNER = 1
OOLITE_OPTION_MACROS = ALLOW_PROCEDURAL_PLANETS=$(ALLOW_PROCEDURAL_PLANETS) DOCKING_CLEARANCE_ENABLED=$(DOCKING_CLEARANCE_ENABLED) TARGET_INCOMING_MISSILES=$(TARGET_INCOMING_MISSILES) WORMHOLE_SCANNER=$(WORMHOLE_SCANNER)

View File

@ -275,7 +275,7 @@ static float corona_blending;
int i; int i;
int percent_land; int percent_land;
#ifdef ALLOW_PROCEDURAL_PLANETS #if ALLOW_PROCEDURAL_PLANETS
BOOL procGen = [UNIVERSE doProcedurallyTexturedPlanets]; BOOL procGen = [UNIVERSE doProcedurallyTexturedPlanets];
#endif #endif
@ -363,7 +363,7 @@ static float corona_blending;
atmosphere = nil; atmosphere = nil;
#ifdef ALLOW_PROCEDURAL_PLANETS #if ALLOW_PROCEDURAL_PLANETS
if (procGen) if (procGen)
{ {
RANROTSeed ranrotSavedSeed = RANROTGetFullSeed(); RANROTSeed ranrotSavedSeed = RANROTGetFullSeed();
@ -446,7 +446,7 @@ static float corona_blending;
- (id) initWithSeed:(Random_Seed) p_seed - (id) initWithSeed:(Random_Seed) p_seed
{ {
NSMutableDictionary* planetInfo = [NSMutableDictionary dictionaryWithDictionary:[UNIVERSE generateSystemData:p_seed]]; NSMutableDictionary* planetInfo = [NSMutableDictionary dictionaryWithDictionary:[UNIVERSE generateSystemData:p_seed]];
#ifdef ALLOW_PROCEDURAL_PLANETS #if ALLOW_PROCEDURAL_PLANETS
if (![UNIVERSE doProcedurallyTexturedPlanets]) if (![UNIVERSE doProcedurallyTexturedPlanets])
#endif #endif
{ {
@ -571,7 +571,7 @@ static float corona_blending;
int i; int i;
int percent_land; int percent_land;
BOOL procGen = NO; BOOL procGen = NO;
#ifdef ALLOW_PROCEDURAL_PLANETS #if ALLOW_PROCEDURAL_PLANETS
procGen = [UNIVERSE doProcedurallyTexturedPlanets]; procGen = [UNIVERSE doProcedurallyTexturedPlanets];
#endif #endif
@ -723,7 +723,7 @@ static float corona_blending;
[planetInfo setObject:amb_polar_sea_color forKey:@"polar_sea_color"]; [planetInfo setObject:amb_polar_sea_color forKey:@"polar_sea_color"];
#ifdef ALLOW_PROCEDURAL_PLANETS #if ALLOW_PROCEDURAL_PLANETS
if (procGen) if (procGen)
{ {
if (!isTextured) if (!isTextured)
@ -1470,7 +1470,7 @@ void drawActiveCorona(GLfloat inner_radius, GLfloat outer_radius, GLfloat step,
textureName = tName; textureName = tName;
isTextureImage = isTextured = YES; isTextureImage = isTextured = YES;
#ifdef ALLOW_PROCEDURAL_PLANETS #if ALLOW_PROCEDURAL_PLANETS
// We always need to reset the model in order to repaint it - otherwise if someone // We always need to reset the model in order to repaint it - otherwise if someone
// has specified colour overrides in an OXP, those overrides affect the texture! // has specified colour overrides in an OXP, those overrides affect the texture!
// What if someone -wants- to re-colour a planetary texture using an OXP? // What if someone -wants- to re-colour a planetary texture using an OXP?

View File

@ -27,7 +27,7 @@ MA 02110-1301, USA.
*/ */
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#ifdef WORMHOLE_SCANNER #if WORMHOLE_SCANNER
#import "WormholeEntity.h" #import "WormholeEntity.h"
#endif #endif
#import "ShipEntity.h" #import "ShipEntity.h"
@ -93,7 +93,7 @@ enum
GUI_ROW_GAMEOPTIONS_DISPLAYSTYLE, GUI_ROW_GAMEOPTIONS_DISPLAYSTYLE,
GUI_ROW_GAMEOPTIONS_DETAIL, GUI_ROW_GAMEOPTIONS_DETAIL,
GUI_ROW_GAMEOPTIONS_WIREFRAMEGRAPHICS, GUI_ROW_GAMEOPTIONS_WIREFRAMEGRAPHICS,
#ifdef ALLOW_PROCEDURAL_PLANETS #if ALLOW_PROCEDURAL_PLANETS
GUI_ROW_GAMEOPTIONS_PROCEDURALLYTEXTUREDPLANETS, GUI_ROW_GAMEOPTIONS_PROCEDURALLYTEXTUREDPLANETS,
#endif #endif
GUI_ROW_GAMEOPTIONS_SHADEREFFECTS, GUI_ROW_GAMEOPTIONS_SHADEREFFECTS,
@ -286,7 +286,7 @@ typedef enum
// ...end save screen // ...end save screen
StationEntity *dockedStation; StationEntity *dockedStation;
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
/* Used by the DOCKING_CLEARANCE code to implement docking at non-main /* Used by the DOCKING_CLEARANCE code to implement docking at non-main
* stations. Could possibly overload use of 'dockedStation' instead * stations. Could possibly overload use of 'dockedStation' instead
* but that needs futher investigation to ensure it doesn't break anything. */ * but that needs futher investigation to ensure it doesn't break anything. */
@ -365,7 +365,7 @@ typedef enum
OOKeyCode key_target_missile; OOKeyCode key_target_missile;
OOKeyCode key_untarget_missile; OOKeyCode key_untarget_missile;
#ifdef TARGET_INCOMING_MISSILES #if TARGET_INCOMING_MISSILES
OOKeyCode key_target_incoming_missile; OOKeyCode key_target_incoming_missile;
#endif #endif
OOKeyCode key_ident_system; OOKeyCode key_ident_system;
@ -410,7 +410,7 @@ typedef enum
OOKeyCode key_custom_view; OOKeyCode key_custom_view;
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
OOKeyCode key_docking_clearance_request; OOKeyCode key_docking_clearance_request;
#endif #endif
@ -505,10 +505,10 @@ waitingForStickCallback: 1;
NSArray *_customViews; NSArray *_customViews;
OOUInteger _customViewIndex; OOUInteger _customViewIndex;
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
OODockingClearanceStatus dockingClearanceStatus; OODockingClearanceStatus dockingClearanceStatus;
#endif #endif
#ifdef WORMHOLE_SCANNER #if WORMHOLE_SCANNER
NSMutableArray *scannedWormholes; NSMutableArray *scannedWormholes;
#endif #endif
} }
@ -550,7 +550,7 @@ waitingForStickCallback: 1;
- (void) setDockedAtMainStation; - (void) setDockedAtMainStation;
- (StationEntity *) dockedStation; - (StationEntity *) dockedStation;
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
- (void) setTargetDockStationTo:(StationEntity *) value; - (void) setTargetDockStationTo:(StationEntity *) value;
- (StationEntity *) getTargetDockStation; - (StationEntity *) getTargetDockStation;
#endif #endif
@ -737,7 +737,7 @@ waitingForStickCallback: 1;
- (BOOL) scriptedMisjump; - (BOOL) scriptedMisjump;
- (void) setScriptedMisjump:(BOOL)newValue; - (void) setScriptedMisjump:(BOOL)newValue;
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
- (BOOL) clearedToDock; - (BOOL) clearedToDock;
- (void) setDockingClearanceStatus:(OODockingClearanceStatus) newValue; - (void) setDockingClearanceStatus:(OODockingClearanceStatus) newValue;
- (OODockingClearanceStatus) getDockingClearanceStatus; - (OODockingClearanceStatus) getDockingClearanceStatus;

View File

@ -118,7 +118,7 @@ static PlayerEntity *sSharedPlayer = nil;
- (void) performDeadUpdates:(OOTimeDelta)delta_t; - (void) performDeadUpdates:(OOTimeDelta)delta_t;
- (void) updateTargetting; - (void) updateTargetting;
- (BOOL) isValidTarget:(Entity*)target; - (BOOL) isValidTarget:(Entity*)target;
#ifdef WORMHOLE_SCANNER #if WORMHOLE_SCANNER
- (void) addScannedWormhole:(WormholeEntity*)wormhole; - (void) addScannedWormhole:(WormholeEntity*)wormhole;
- (void) updateWormholes; - (void) updateWormholes;
#endif #endif
@ -449,7 +449,7 @@ static PlayerEntity *sSharedPlayer = nil;
// trumble information // trumble information
[result setObject:[self trumbleValue] forKey:@"trumbles"]; [result setObject:[self trumbleValue] forKey:@"trumbles"];
#ifdef WORMHOLE_SCANNER #if WORMHOLE_SCANNER
// wormhole information // wormhole information
NSMutableArray * wormholeDicts = [NSMutableArray arrayWithCapacity:[scannedWormholes count]]; NSMutableArray * wormholeDicts = [NSMutableArray arrayWithCapacity:[scannedWormholes count]];
NSEnumerator * wormholes = [scannedWormholes objectEnumerator]; NSEnumerator * wormholes = [scannedWormholes objectEnumerator];
@ -711,7 +711,7 @@ static PlayerEntity *sSharedPlayer = nil;
system_seed = [UNIVERSE findSystemAtCoords:galaxy_coordinates withGalaxySeed:galaxy_seed]; system_seed = [UNIVERSE findSystemAtCoords:galaxy_coordinates withGalaxySeed:galaxy_seed];
target_system_seed = [UNIVERSE findSystemAtCoords:cursor_coordinates withGalaxySeed:galaxy_seed]; target_system_seed = [UNIVERSE findSystemAtCoords:cursor_coordinates withGalaxySeed:galaxy_seed];
#ifdef WORMHOLE_SCANNER #if WORMHOLE_SCANNER
// wormholes // wormholes
NSArray * whArray; NSArray * whArray;
whArray = [dict objectForKey:@"wormholes"]; whArray = [dict objectForKey:@"wormholes"];
@ -951,7 +951,7 @@ static PlayerEntity *sSharedPlayer = nil;
[UNIVERSE clearGUIs]; [UNIVERSE clearGUIs];
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
dockingClearanceStatus = DOCKING_CLEARANCE_STATUS_GRANTED; dockingClearanceStatus = DOCKING_CLEARANCE_STATUS_GRANTED;
targetDockStation = nil; targetDockStation = nil;
#endif #endif
@ -976,7 +976,7 @@ static PlayerEntity *sSharedPlayer = nil;
[save_path autorelease]; [save_path autorelease];
save_path = nil; save_path = nil;
#ifdef WORMHOLE_SCANNER #if WORMHOLE_SCANNER
[scannedWormholes release]; [scannedWormholes release];
scannedWormholes = [[NSMutableArray alloc] init]; scannedWormholes = [[NSMutableArray alloc] init];
#endif #endif
@ -1220,7 +1220,7 @@ static PlayerEntity *sSharedPlayer = nil;
[self destroySound]; [self destroySound];
#ifdef WORMHOLE_SCANNER #if WORMHOLE_SCANNER
[scannedWormholes release]; [scannedWormholes release];
scannedWormholes = nil; scannedWormholes = nil;
#endif #endif
@ -1311,7 +1311,7 @@ static PlayerEntity *sSharedPlayer = nil;
// TODO: this should probably be called from performInFlightUpdates: instead. -- Ahruman 20080322 // TODO: this should probably be called from performInFlightUpdates: instead. -- Ahruman 20080322
// Moved to performInFlightUpdates. -- Micha 20090403 // Moved to performInFlightUpdates. -- Micha 20090403
//[self updateTargetting]; //[self updateTargetting];
#ifdef WORMHOLE_SCANNER #if WORMHOLE_SCANNER
[self updateWormholes]; [self updateWormholes];
#endif #endif
} }
@ -1893,7 +1893,7 @@ static PlayerEntity *sSharedPlayer = nil;
[self setStatus:STATUS_IN_FLIGHT]; [self setStatus:STATUS_IN_FLIGHT];
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
[self setDockingClearanceStatus:DOCKING_CLEARANCE_STATUS_NONE]; [self setDockingClearanceStatus:DOCKING_CLEARANCE_STATUS_NONE];
#endif #endif
[self doScriptEvent:@"shipLaunchedFromStation"]; [self doScriptEvent:@"shipLaunchedFromStation"];
@ -1946,7 +1946,7 @@ static PlayerEntity *sSharedPlayer = nil;
return YES; return YES;
} }
#ifdef WORMHOLE_SCANNER #if WORMHOLE_SCANNER
// If target is an unexpired wormhole and the player has bought the Wormhole Scanner and we're in ID mode // If target is an unexpired wormhole and the player has bought the Wormhole Scanner and we're in ID mode
if ([target isWormhole] && [target scanClass] != CLASS_NO_DRAW && if ([target isWormhole] && [target scanClass] != CLASS_NO_DRAW &&
[self hasEquipmentItem:@"EQ_WORMHOLE_SCANNER"] && ident_engaged) [self hasEquipmentItem:@"EQ_WORMHOLE_SCANNER"] && ident_engaged)
@ -2018,7 +2018,7 @@ static PlayerEntity *sSharedPlayer = nil;
} }
} }
#ifdef WORMHOLE_SCANNER #if WORMHOLE_SCANNER
// If our primary target is a wormhole, check to see if we have additional // If our primary target is a wormhole, check to see if we have additional
// information // information
if ([[self primaryTarget] isWormhole]) if ([[self primaryTarget] isWormhole])
@ -2289,7 +2289,7 @@ static PlayerEntity *sSharedPlayer = nil;
return dockedStation; return dockedStation;
} }
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
- (void) setTargetDockStationTo:(StationEntity *) value - (void) setTargetDockStationTo:(StationEntity *) value
{ {
targetDockStation = value; targetDockStation = value;
@ -2684,7 +2684,7 @@ static PlayerEntity *sSharedPlayer = nil;
return DESC(@"no-target-string"); return DESC(@"no-target-string");
if ([target_entity isShip]) if ([target_entity isShip])
return [(ShipEntity*)target_entity identFromShip:self]; return [(ShipEntity*)target_entity identFromShip:self];
#ifdef WORMHOLE_SCANNER #if WORMHOLE_SCANNER
if ([target_entity isWormhole]) if ([target_entity isWormhole])
return [(WormholeEntity*)target_entity identFromShip:self]; return [(WormholeEntity*)target_entity identFromShip:self];
#endif #endif
@ -3467,7 +3467,7 @@ static PlayerEntity *sSharedPlayer = nil;
[self setStatus:STATUS_ESCAPE_SEQUENCE]; // firstly [self setStatus:STATUS_ESCAPE_SEQUENCE]; // firstly
ship_clock_adjust += 43200 + 5400 * (ranrot_rand() & 127); // add up to 8 days until rescue! ship_clock_adjust += 43200 + 5400 * (ranrot_rand() & 127); // add up to 8 days until rescue!
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
dockingClearanceStatus = DOCKING_CLEARANCE_STATUS_NOT_REQUIRED; dockingClearanceStatus = DOCKING_CLEARANCE_STATUS_NOT_REQUIRED;
#endif #endif
@ -3889,7 +3889,7 @@ static PlayerEntity *sSharedPlayer = nil;
[[OOMusicController sharedController] stopDockingMusic]; [[OOMusicController sharedController] stopDockingMusic];
[[OOMusicController sharedController] playDockedMusic]; [[OOMusicController sharedController] playDockedMusic];
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
// Did we fail to observe traffic control regulations? However, due to the state of emergency, // Did we fail to observe traffic control regulations? However, due to the state of emergency,
// apply no unauthorized docking penalties if a nova is ongoing. // apply no unauthorized docking penalties if a nova is ongoing.
if (![UNIVERSE strict] && [dockedStation requiresDockingClearance] && if (![UNIVERSE strict] && [dockedStation requiresDockingClearance] &&
@ -3950,7 +3950,7 @@ static PlayerEntity *sSharedPlayer = nil;
[station clearDockingCorridor]; [station clearDockingCorridor];
[self setAlertFlag:ALERT_FLAG_DOCKED to:NO]; [self setAlertFlag:ALERT_FLAG_DOCKED to:NO];
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
[self setDockingClearanceStatus:DOCKING_CLEARANCE_STATUS_NONE]; [self setDockingClearanceStatus:DOCKING_CLEARANCE_STATUS_NONE];
#endif #endif
@ -4822,7 +4822,7 @@ static PlayerEntity *sSharedPlayer = nil;
[gui setText:DESC(@"gameoptions-wireframe-graphics-no") forRow:GUI_ROW(GAME,WIREFRAMEGRAPHICS) align:GUI_ALIGN_CENTER]; [gui setText:DESC(@"gameoptions-wireframe-graphics-no") forRow:GUI_ROW(GAME,WIREFRAMEGRAPHICS) align:GUI_ALIGN_CENTER];
[gui setKey:GUI_KEY_OK forRow:GUI_ROW(GAME,WIREFRAMEGRAPHICS)]; [gui setKey:GUI_KEY_OK forRow:GUI_ROW(GAME,WIREFRAMEGRAPHICS)];
#ifdef ALLOW_PROCEDURAL_PLANETS #if ALLOW_PROCEDURAL_PLANETS
if ([UNIVERSE doProcedurallyTexturedPlanets]) if ([UNIVERSE doProcedurallyTexturedPlanets])
[gui setText:DESC(@"gameoptions-procedurally-textured-planets-yes") forRow:GUI_ROW(GAME,PROCEDURALLYTEXTUREDPLANETS) align:GUI_ALIGN_CENTER]; [gui setText:DESC(@"gameoptions-procedurally-textured-planets-yes") forRow:GUI_ROW(GAME,PROCEDURALLYTEXTUREDPLANETS) align:GUI_ALIGN_CENTER];
else else
@ -6522,7 +6522,7 @@ static int last_outfitting_index;
[super addTarget:targetEntity]; [super addTarget:targetEntity];
#ifdef WORMHOLE_SCANNER #if WORMHOLE_SCANNER
if ([targetEntity isWormhole]) if ([targetEntity isWormhole])
{ {
assert ([self hasEquipmentItem:@"EQ_WORMHOLE_SCANNER"]); assert ([self hasEquipmentItem:@"EQ_WORMHOLE_SCANNER"]);
@ -6873,7 +6873,7 @@ static int last_outfitting_index;
} }
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
- (BOOL)clearedToDock - (BOOL)clearedToDock
{ {
return dockingClearanceStatus > DOCKING_CLEARANCE_STATUS_REQUESTED; return dockingClearanceStatus > DOCKING_CLEARANCE_STATUS_REQUESTED;
@ -6924,7 +6924,7 @@ static int last_outfitting_index;
#endif #endif
#ifdef WORMHOLE_SCANNER #if WORMHOLE_SCANNER
// //
// Wormhole Scanner support functions // Wormhole Scanner support functions
// //

View File

@ -62,7 +62,7 @@ static BOOL previous_target_pressed;
static BOOL next_missile_pressed; static BOOL next_missile_pressed;
static BOOL fire_missile_pressed; static BOOL fire_missile_pressed;
static BOOL target_missile_pressed; static BOOL target_missile_pressed;
#ifdef TARGET_INCOMING_MISSILES #if TARGET_INCOMING_MISSILES
static BOOL target_incoming_missile_pressed; static BOOL target_incoming_missile_pressed;
#endif #endif
static BOOL ident_pressed; static BOOL ident_pressed;
@ -72,7 +72,7 @@ static BOOL rotateCargo_pressed;
static BOOL autopilot_key_pressed; static BOOL autopilot_key_pressed;
static BOOL fast_autopilot_key_pressed; static BOOL fast_autopilot_key_pressed;
static BOOL target_autopilot_key_pressed; static BOOL target_autopilot_key_pressed;
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
static BOOL docking_clearance_request_key_pressed; static BOOL docking_clearance_request_key_pressed;
#endif #endif
#ifndef NDEBUG #ifndef NDEBUG
@ -193,7 +193,7 @@ static NSTimeInterval time_last_frame;
LOAD_KEY_SETTING(key_target_missile, 't' ); LOAD_KEY_SETTING(key_target_missile, 't' );
LOAD_KEY_SETTING(key_untarget_missile, 'u' ); LOAD_KEY_SETTING(key_untarget_missile, 'u' );
#ifdef TARGET_INCOMING_MISSILES #if TARGET_INCOMING_MISSILES
LOAD_KEY_SETTING(key_target_incoming_missile, 'T' ); LOAD_KEY_SETTING(key_target_incoming_missile, 'T' );
#endif #endif
LOAD_KEY_SETTING(key_ident_system, 'r' ); LOAD_KEY_SETTING(key_ident_system, 'r' );
@ -214,7 +214,7 @@ static NSTimeInterval time_last_frame;
LOAD_KEY_SETTING(key_autopilot, 'c' ); LOAD_KEY_SETTING(key_autopilot, 'c' );
LOAD_KEY_SETTING(key_autopilot_target, 'C' ); LOAD_KEY_SETTING(key_autopilot_target, 'C' );
LOAD_KEY_SETTING(key_autodock, 'D' ); LOAD_KEY_SETTING(key_autodock, 'D' );
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
LOAD_KEY_SETTING(key_docking_clearance_request, 'L' ); LOAD_KEY_SETTING(key_docking_clearance_request, 'L' );
#endif #endif
@ -687,7 +687,7 @@ static NSTimeInterval time_last_frame;
ident_pressed = YES; ident_pressed = YES;
} }
else ident_pressed = NO; else ident_pressed = NO;
#ifdef TARGET_INCOMING_MISSILES #if TARGET_INCOMING_MISSILES
// target nearest incoming missile 'T' - useful for quickly giving a missile target to turrets // target nearest incoming missile 'T' - useful for quickly giving a missile target to turrets
if ([gameView isDown:key_target_incoming_missile] || joyButtonState[BUTTON_TARGETINCOMINGMISSILE]) if ([gameView isDown:key_target_incoming_missile] || joyButtonState[BUTTON_TARGETINCOMINGMISSILE])
{ {
@ -839,7 +839,7 @@ static NSTimeInterval time_last_frame;
[self setStatus:STATUS_AUTOPILOT_ENGAGED]; [self setStatus:STATUS_AUTOPILOT_ENGAGED];
[shipAI setState:@"GLOBAL"]; // reboot the AI [shipAI setState:@"GLOBAL"]; // reboot the AI
[self playAutopilotOn]; [self playAutopilotOn];
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
[self setDockingClearanceStatus:DOCKING_CLEARANCE_STATUS_GRANTED]; [self setDockingClearanceStatus:DOCKING_CLEARANCE_STATUS_GRANTED];
#endif #endif
[UNIVERSE addMessage:DESC(@"autopilot-on") forCount:4.5]; [UNIVERSE addMessage:DESC(@"autopilot-on") forCount:4.5];
@ -880,7 +880,7 @@ static NSTimeInterval time_last_frame;
[self setStatus:STATUS_AUTOPILOT_ENGAGED]; [self setStatus:STATUS_AUTOPILOT_ENGAGED];
[shipAI setState:@"GLOBAL"]; // restart the AI [shipAI setState:@"GLOBAL"]; // restart the AI
[self playAutopilotOn]; [self playAutopilotOn];
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
[self setDockingClearanceStatus:DOCKING_CLEARANCE_STATUS_GRANTED]; [self setDockingClearanceStatus:DOCKING_CLEARANCE_STATUS_GRANTED];
#endif #endif
[UNIVERSE addMessage:DESC(@"autopilot-on") forCount:4.5]; [UNIVERSE addMessage:DESC(@"autopilot-on") forCount:4.5];
@ -942,7 +942,7 @@ static NSTimeInterval time_last_frame;
[self markForFines]; [self markForFines];
} }
} }
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
[self setDockingClearanceStatus:DOCKING_CLEARANCE_STATUS_GRANTED]; [self setDockingClearanceStatus:DOCKING_CLEARANCE_STATUS_GRANTED];
#endif #endif
ship_clock_adjust = 1200.0; // 20 minutes penalty to enter dock ship_clock_adjust = 1200.0; // 20 minutes penalty to enter dock
@ -964,7 +964,7 @@ static NSTimeInterval time_last_frame;
else else
fast_autopilot_key_pressed = NO; fast_autopilot_key_pressed = NO;
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
// docking clearance request 'L', not available in strict mode // docking clearance request 'L', not available in strict mode
if ([gameView isDown:key_docking_clearance_request] && ![UNIVERSE strict]) if ([gameView isDown:key_docking_clearance_request] && ![UNIVERSE strict])
{ {
@ -2224,7 +2224,7 @@ static NSTimeInterval time_last_frame;
[gui setText:DESC(@"gameoptions-wireframe-graphics-no") forRow:GUI_ROW(GAME,WIREFRAMEGRAPHICS) align:GUI_ALIGN_CENTER]; [gui setText:DESC(@"gameoptions-wireframe-graphics-no") forRow:GUI_ROW(GAME,WIREFRAMEGRAPHICS) align:GUI_ALIGN_CENTER];
} }
#ifdef ALLOW_PROCEDURAL_PLANETS #if ALLOW_PROCEDURAL_PLANETS
if ((guiSelectedRow == GUI_ROW(GAME,PROCEDURALLYTEXTUREDPLANETS))&&(([gameView isDown:gvArrowKeyRight])||([gameView isDown:gvArrowKeyLeft]))) if ((guiSelectedRow == GUI_ROW(GAME,PROCEDURALLYTEXTUREDPLANETS))&&(([gameView isDown:gvArrowKeyRight])||([gameView isDown:gvArrowKeyLeft])))
{ {
if ([gameView isDown:gvArrowKeyRight] != [UNIVERSE doProcedurallyTexturedPlanets]) if ([gameView isDown:gvArrowKeyRight] != [UNIVERSE doProcedurallyTexturedPlanets])
@ -2829,7 +2829,7 @@ static BOOL toggling_music;
[self setStatus:STATUS_IN_FLIGHT]; [self setStatus:STATUS_IN_FLIGHT];
[self playAutopilotOff]; [self playAutopilotOff];
[UNIVERSE addMessage:DESC(@"autopilot-off") forCount:4.5]; [UNIVERSE addMessage:DESC(@"autopilot-off") forCount:4.5];
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
[self setDockingClearanceStatus:DOCKING_CLEARANCE_STATUS_NONE]; [self setDockingClearanceStatus:DOCKING_CLEARANCE_STATUS_NONE];
#endif #endif
[self doScriptEvent:@"playerCancelledAutoPilot"]; [self doScriptEvent:@"playerCancelledAutoPilot"];

View File

@ -233,7 +233,7 @@ typedef enum
- (BOOL) mapKey:(NSString *) keycode toOXP:(OOScript *)oxp; - (BOOL) mapKey:(NSString *) keycode toOXP:(OOScript *)oxp;
- (void) targetNearestHostile; - (void) targetNearestHostile;
#ifdef TARGET_INCOMING_MISSILES #if TARGET_INCOMING_MISSILES
- (void) targetNearestIncomingMissile; - (void) targetNearestIncomingMissile;
#endif #endif

View File

@ -2544,7 +2544,7 @@ static int scriptRandomSeed = -1; // ensure proper random function
return NO; // 0........... 1 2 3 return NO; // 0........... 1 2 3
PlanetEntity* doppelganger=nil; PlanetEntity* doppelganger=nil;
BOOL procGen = NO; BOOL procGen = NO;
#ifdef ALLOW_PROCEDURAL_PLANETS #if ALLOW_PROCEDURAL_PLANETS
procGen = [UNIVERSE doProcedurallyTexturedPlanets]; procGen = [UNIVERSE doProcedurallyTexturedPlanets];
if ([i_key isEqual:@"local-planet"] && procGen && [UNIVERSE sun]) if ([i_key isEqual:@"local-planet"] && procGen && [UNIVERSE sun])
{ {
@ -2645,7 +2645,7 @@ static int scriptRandomSeed = -1; // ensure proper random function
} }
#ifdef TARGET_INCOMING_MISSILES #if TARGET_INCOMING_MISSILES
- (void) targetNearestIncomingMissile - (void) targetNearestIncomingMissile
{ {
[self scanForNearestIncomingMissile]; [self scanForNearestIncomingMissile];

View File

@ -425,7 +425,7 @@ MA 02110-1301, USA.
allowable: HW_BUTTON allowable: HW_BUTTON
axisfn: STICK_NOFUNCTION axisfn: STICK_NOFUNCTION
butfn: BUTTON_UNARM]]; butfn: BUTTON_UNARM]];
#ifdef TARGET_INCOMING_MISSILES #if TARGET_INCOMING_MISSILES
[funcList addObject: [funcList addObject:
[self makeStickGuiDict: @"Target nearest incoming missile" [self makeStickGuiDict: @"Target nearest incoming missile"
allowable: HW_BUTTON allowable: HW_BUTTON

View File

@ -39,7 +39,7 @@ MA 02110-1301, USA.
- (void) scanForHostiles; - (void) scanForHostiles;
- (void) performTumble; - (void) performTumble;
- (void) performStop; - (void) performStop;
#ifdef TARGET_INCOMING_MISSILES #if TARGET_INCOMING_MISSILES
- (void) scanForNearestIncomingMissile; - (void) scanForNearestIncomingMissile;
#endif #endif

View File

@ -282,7 +282,7 @@ MA 02110-1301, USA.
} }
#ifdef TARGET_INCOMING_MISSILES #if TARGET_INCOMING_MISSILES
- (void) scanForNearestIncomingMissile - (void) scanForNearestIncomingMissile
{ {
BinaryOperationPredicateParameter param = BinaryOperationPredicateParameter param =

View File

@ -89,7 +89,7 @@ typedef enum
double last_patrol_report_time; double last_patrol_report_time;
double patrol_launch_interval; double patrol_launch_interval;
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
BOOL requiresDockingClearance; BOOL requiresDockingClearance;
#endif #endif
@ -186,7 +186,7 @@ typedef enum
- (void) acceptPatrolReportFrom:(ShipEntity*) patrol_ship; - (void) acceptPatrolReportFrom:(ShipEntity*) patrol_ship;
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
- (NSString *) acceptDockingClearanceRequestFrom:(ShipEntity *)other; - (NSString *) acceptDockingClearanceRequestFrom:(ShipEntity *)other;
- (BOOL) requiresDockingClearance; - (BOOL) requiresDockingClearance;
- (void) setRequiresDockingClearance:(BOOL)newValue; - (void) setRequiresDockingClearance:(BOOL)newValue;

View File

@ -247,7 +247,7 @@ static NSDictionary* instructions(int station_id, Vector coords, float speed, fl
} }
[shipsOnApproach removeAllObjects]; [shipsOnApproach removeAllObjects];
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
PlayerEntity *player = [PlayerEntity sharedPlayer]; PlayerEntity *player = [PlayerEntity sharedPlayer];
BOOL isDockingStation = (self == [player getTargetDockStation]); BOOL isDockingStation = (self == [player getTargetDockStation]);
if (isDockingStation && player && [player status] == STATUS_IN_FLIGHT && if (isDockingStation && player && [player status] == STATUS_IN_FLIGHT &&
@ -343,7 +343,7 @@ static NSDictionary* instructions(int station_id, Vector coords, float speed, fl
return instructions(universalID, ship->position, 0, 100, @"TRY_AGAIN_LATER", nil, NO); return instructions(universalID, ship->position, 0, 100, @"TRY_AGAIN_LATER", nil, NO);
} }
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
// If the ship is not on its docking approach and the player has // If the ship is not on its docking approach and the player has
// requested or even been granted docking clearance, then tell the // requested or even been granted docking clearance, then tell the
// ship to wait. // ship to wait.
@ -743,7 +743,7 @@ static NSDictionary* instructions(int station_id, Vector coords, float speed, fl
equipmentPriceFactor = [dict nonNegativeFloatForKey:@"equipment_price_factor" defaultValue:1.0]; equipmentPriceFactor = [dict nonNegativeFloatForKey:@"equipment_price_factor" defaultValue:1.0];
equipmentPriceFactor = OOMax_f(equipmentPriceFactor, 0.5f); equipmentPriceFactor = OOMax_f(equipmentPriceFactor, 0.5f);
hasNPCTraffic = [dict fuzzyBooleanForKey:@"has_npc_traffic" defaultValue:YES]; hasNPCTraffic = [dict fuzzyBooleanForKey:@"has_npc_traffic" defaultValue:YES];
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
// Non main stations may have requiresDockingClearance set to yes as a result of the code below, // Non main stations may have requiresDockingClearance set to yes as a result of the code below,
// but this variable should be irrelevant for them, as they do not make use of it anyway. // but this variable should be irrelevant for them, as they do not make use of it anyway.
NSDictionary *universalInfo = [[UNIVERSE planetInfo] dictionaryForKey:PLANETINFO_UNIVERSAL_KEY]; NSDictionary *universalInfo = [[UNIVERSE planetInfo] dictionaryForKey:PLANETINFO_UNIVERSAL_KEY];
@ -1045,7 +1045,7 @@ static NSDictionary* instructions(int station_id, Vector coords, float speed, fl
[super update:delta_t]; [super update:delta_t];
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
PlayerEntity *player = [PlayerEntity sharedPlayer]; PlayerEntity *player = [PlayerEntity sharedPlayer];
BOOL isDockingStation = (self == [player getTargetDockStation]); BOOL isDockingStation = (self == [player getTargetDockStation]);
if (isDockingStation && [player status] == STATUS_IN_FLIGHT && if (isDockingStation && [player status] == STATUS_IN_FLIGHT &&
@ -1924,7 +1924,7 @@ static NSDictionary* instructions(int station_id, Vector coords, float speed, fl
} }
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
- (NSString *) acceptDockingClearanceRequestFrom:(ShipEntity *)other - (NSString *) acceptDockingClearanceRequestFrom:(ShipEntity *)other
{ {
NSString *result = nil; NSString *result = nil;

View File

@ -82,7 +82,9 @@ typedef enum
- (NSArray*) shipsInTransit; - (NSArray*) shipsInTransit;
#if WORMHOLE_SCANNER
- (NSString *) identFromShip:(ShipEntity*) ship; - (NSString *) identFromShip:(ShipEntity*) ship;
#endif
- (NSDictionary *)getDict; - (NSDictionary *)getDict;

View File

@ -352,6 +352,7 @@ static void DrawWormholeCorona(GLfloat inner_radius, GLfloat outer_radius, int s
ClockToString(arrival_time, false)]; ClockToString(arrival_time, false)];
} }
#if WORMHOLE_SCANNER
- (NSString *) identFromShip:(ShipEntity*)ship - (NSString *) identFromShip:(ShipEntity*)ship
{ {
assert([ship hasEquipmentItem:@"EQ_WORMHOLE_SCANNER"]); assert([ship hasEquipmentItem:@"EQ_WORMHOLE_SCANNER"]);
@ -360,6 +361,7 @@ static void DrawWormholeCorona(GLfloat inner_radius, GLfloat outer_radius, int s
else else
return DESC(@"wormhole-desc"); return DESC(@"wormhole-desc");
} }
#endif
- (BOOL) canCollide - (BOOL) canCollide

View File

@ -2243,7 +2243,7 @@ static void hudDrawReticleOnTarget(Entity* target, PlayerEntity* player1, GLfloa
//rotate to face player1 //rotate to face player1
GLMultOOMatrix(back_mat); GLMultOOMatrix(back_mat);
// draw the reticle // draw the reticle
#ifdef WORMHOLE_SCANNER #if WORMHOLE_SCANNER
// Draw reticle cyan for Wormholes // Draw reticle cyan for Wormholes
if ([target isWormhole] ) if ([target isWormhole] )
{ {
@ -2286,7 +2286,7 @@ static void hudDrawReticleOnTarget(Entity* target, PlayerEntity* player1, GLfloa
OODrawString([player1 dialTargetName], rs0, 0.5 * rs2, 0, textsize); OODrawString([player1 dialTargetName], rs0, 0.5 * rs2, 0, textsize);
OODrawString(info, rs0, 0.5 * rs2 - line_height, 0, textsize); OODrawString(info, rs0, 0.5 * rs2 - line_height, 0, textsize);
#ifdef WORMHOLE_SCANNER #if WORMHOLE_SCANNER
if ([target isWormhole]) if ([target isWormhole])
{ {
// Note: No break statements in the following switch() since every case // Note: No break statements in the following switch() since every case

View File

@ -948,11 +948,11 @@ static void AgeListCheckIntegrity(OOCacheImpl *cache, NSString *context)
#endif // OOCACHE_PERFORM_INTEGRITY_CHECKS #endif // OOCACHE_PERFORM_INTEGRITY_CHECKS
#ifdef DEBUG_GRAPHVIZ #if DEBUG_GRAPHVIZ
/* NOTE: enabling AGE_LIST can result in graph rendering times of many hours, /* NOTE: enabling AGE_LIST can result in graph rendering times of many hours,
because determining paths for non-constraint arcs is NP-hard. In particular, because determining paths for non-constraint arcs is NP-hard. In particular,
I have up on rendering a dump of a fairly minimal cache manager after I gave up on rendering a dump of a fairly minimal cache manager after
three and a half hours. Individual caches were fine. three and a half hours. Individual caches were fine.
*/ */
#define AGE_LIST 0 #define AGE_LIST 0

View File

@ -715,7 +715,7 @@ static OOCacheManager *sSingleton = nil;
@end @end
#ifdef DEBUG_GRAPHVIZ #if DEBUG_GRAPHVIZ
@interface OOCache (DebugGraphViz) @interface OOCache (DebugGraphViz)
- (NSString *) generateGraphVizBodyWithRootNamed:(NSString *)rootName; - (NSString *) generateGraphVizBodyWithRootNamed:(NSString *)rootName;
@end @end

View File

@ -347,3 +347,7 @@ enum {
#define OOLITE_SPEECH_SYNTH 0 #define OOLITE_SPEECH_SYNTH 0
#endif #endif
#ifndef OO_DEBUG
#define OO_DEBUG 0
#endif

View File

@ -82,6 +82,6 @@ NSString *DisplayStringForMassUnitForCommodity(OOCargoType commodity);
OOGalacticHyperspaceBehaviour StringToGalacticHyperspaceBehaviour(NSString *string) PURE_FUNC; OOGalacticHyperspaceBehaviour StringToGalacticHyperspaceBehaviour(NSString *string) PURE_FUNC;
NSString *GalacticHyperspaceBehaviourToString(OOGalacticHyperspaceBehaviour behaviour) CONST_FUNC; NSString *GalacticHyperspaceBehaviourToString(OOGalacticHyperspaceBehaviour behaviour) CONST_FUNC;
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
NSString *DockingClearanceStatusToString(OODockingClearanceStatus dockingClearanceStatus) PURE_FUNC; NSString *DockingClearanceStatusToString(OODockingClearanceStatus dockingClearanceStatus) PURE_FUNC;
#endif #endif

View File

@ -606,7 +606,7 @@ NSString *DisplayStringForMassUnitForCommodity(OOCargoType commodity)
return DisplayStringForMassUnit([UNIVERSE unitsForCommodity:commodity]); return DisplayStringForMassUnit([UNIVERSE unitsForCommodity:commodity]);
} }
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
NSString *DockingClearanceStatusToString(OODockingClearanceStatus dockingClearanceStatus) NSString *DockingClearanceStatusToString(OODockingClearanceStatus dockingClearanceStatus)
{ {
switch (dockingClearanceStatus) switch (dockingClearanceStatus)

View File

@ -73,6 +73,6 @@ BOOL HasRolePredicate(Entity *ship, void *parameter); // Parameter: NSString
BOOL HasPrimaryRolePredicate(Entity *ship, void *parameter); // Parameter: NSString BOOL HasPrimaryRolePredicate(Entity *ship, void *parameter); // Parameter: NSString
BOOL HasRoleInSetPredicate(Entity *ship, void *parameter); // Parameter: NSSet BOOL HasRoleInSetPredicate(Entity *ship, void *parameter); // Parameter: NSSet
BOOL HasPrimaryRoleInSetPredicate(Entity *ship, void *parameter); // Parameter: NSSet BOOL HasPrimaryRoleInSetPredicate(Entity *ship, void *parameter); // Parameter: NSSet
#ifdef TARGET_INCOMING_MISSILES #if TARGET_INCOMING_MISSILES
BOOL IsHostileAgainstTargetPredicate(Entity *ship, void *parameter); // Parameter: id BOOL IsHostileAgainstTargetPredicate(Entity *ship, void *parameter); // Parameter: id
#endif #endif

View File

@ -168,7 +168,7 @@ BOOL HasPrimaryRoleInSetPredicate(Entity *ship, void *parameter)
} }
#ifdef TARGET_INCOMING_MISSILES #if TARGET_INCOMING_MISSILES
BOOL IsHostileAgainstTargetPredicate(Entity *ship, void *parameter) BOOL IsHostileAgainstTargetPredicate(Entity *ship, void *parameter)
{ {
return [(ShipEntity *)ship hasHostileTarget] && [(ShipEntity *)ship primaryTarget] == (ShipEntity *)parameter; return [(ShipEntity *)ship hasHostileTarget] && [(ShipEntity *)ship primaryTarget] == (ShipEntity *)parameter;

View File

@ -14,7 +14,7 @@
#define OOINLINE static inline #define OOINLINE static inline
#ifndef OO_DEBUG #if !OO_DEBUG
#define ALWAYS_INLINE_FUNC GCC_ATTR((always_inline)) // Force inlining of function #define ALWAYS_INLINE_FUNC GCC_ATTR((always_inline)) // Force inlining of function
#else #else
#define ALWAYS_INLINE_FUNC // Don't force inlining of function (because gdb is silly) #define ALWAYS_INLINE_FUNC // Don't force inlining of function (because gdb is silly)

View File

@ -89,7 +89,7 @@ void OOPrintLogHeader(void)
#define OS_TYPE_STRING "unknown system" #define OS_TYPE_STRING "unknown system"
#endif #endif
#ifdef OO_DEBUG #if OO_DEBUG
#define RELEASE_VARIANT_STRING " debug" #define RELEASE_VARIANT_STRING " debug"
#elif !defined (NDEBUG) #elif !defined (NDEBUG)
#define RELEASE_VARIANT_STRING " test release" #define RELEASE_VARIANT_STRING " test release"
@ -97,25 +97,25 @@ void OOPrintLogHeader(void)
#define RELEASE_VARIANT_STRING "" #define RELEASE_VARIANT_STRING ""
#endif #endif
#ifdef ALLOW_PROCEDURAL_PLANETS #if ALLOW_PROCEDURAL_PLANETS
#define OPT1_STR " [Procedural Planets]" #define OPT1_STR " [Procedural Planets]"
#else #else
#define OPT1_STR "" #define OPT1_STR ""
#endif #endif
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
#define OPT2_STR " [Docking Clearance]" #define OPT2_STR " [Docking Clearance]"
#else #else
#define OPT2_STR "" #define OPT2_STR ""
#endif #endif
#ifdef WORMHOLE_SCANNER #if WORMHOLE_SCANNER
#define OPT3_STR " [Wormhole Scanner]" #define OPT3_STR " [Wormhole Scanner]"
#else #else
#define OPT3_STR "" #define OPT3_STR ""
#endif #endif
#ifdef TARGET_INCOMING_MISSILES #if TARGET_INCOMING_MISSILES
#define OPT4_STR " [Target Incoming Missiles]" #define OPT4_STR " [Target Incoming Missiles]"
#else #else
#define OPT4_STR "" #define OPT4_STR ""

View File

@ -113,7 +113,7 @@ OOINLINE NSComparisonResult PQCompare(id a, id b, SEL comparator)
- (void)removeObjectAtIndex:(OOUInteger)i; - (void)removeObjectAtIndex:(OOUInteger)i;
#ifdef OO_DEBUG #if OO_DEBUG
- (void) appendDebugDataToString:(NSMutableString *)string index:(OOUInteger)i depth:(OOUInteger)depth; - (void) appendDebugDataToString:(NSMutableString *)string index:(OOUInteger)i depth:(OOUInteger)depth;
#endif #endif
@ -178,7 +178,7 @@ OOINLINE NSComparisonResult PQCompare(id a, id b, SEL comparator)
} }
#ifdef OO_DEBUG #if OO_DEBUG
- (NSString *) debugDescription - (NSString *) debugDescription
{ {
NSMutableString *result = nil; NSMutableString *result = nil;
@ -536,7 +536,7 @@ OOINLINE NSComparisonResult PQCompare(id a, id b, SEL comparator)
} }
#ifdef OO_DEBUG #if OO_DEBUG
- (void) appendDebugDataToString:(NSMutableString *)string index:(OOUInteger)i depth:(OOUInteger)depth - (void) appendDebugDataToString:(NSMutableString *)string index:(OOUInteger)i depth:(OOUInteger)depth
{ {
OOUInteger spaces; OOUInteger spaces;
@ -598,7 +598,7 @@ OOINLINE NSComparisonResult PQCompare(id a, id b, SEL comparator)
@end @end
#ifdef DEBUG_GRAPHVIZ #if DEBUG_GRAPHVIZ
@implementation OOPriorityQueue (DebugGraphViz) @implementation OOPriorityQueue (DebugGraphViz)
// Workaround for Xcode auto-indent bug // Workaround for Xcode auto-indent bug

View File

@ -300,7 +300,7 @@ typedef enum
} OOEnergyUnitType; } OOEnergyUnitType;
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
typedef enum typedef enum
{ {
DOCKING_CLEARANCE_STATUS_NONE, DOCKING_CLEARANCE_STATUS_NONE,

View File

@ -95,7 +95,7 @@ enum
kPlayer_trumbleCount, // number of trumbles, integer, read-only kPlayer_trumbleCount, // number of trumbles, integer, read-only
kPlayer_contractReputation, // reputation for cargo contracts, integer, read only kPlayer_contractReputation, // reputation for cargo contracts, integer, read only
kPlayer_passengerReputation, // reputation for passenger contracts, integer, read only kPlayer_passengerReputation, // reputation for passenger contracts, integer, read only
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
kPlayer_dockingClearanceStatus, // docking clearance status, string, read only kPlayer_dockingClearanceStatus, // docking clearance status, string, read only
#endif #endif
kPlayer_bounty // bounty, unsigned int, read/write kPlayer_bounty // bounty, unsigned int, read/write
@ -119,7 +119,7 @@ static JSPropertySpec sPlayerProperties[] =
{ "trumbleCount", kPlayer_trumbleCount, JSPROP_PERMANENT | JSPROP_ENUMERATE | JSPROP_READONLY }, { "trumbleCount", kPlayer_trumbleCount, JSPROP_PERMANENT | JSPROP_ENUMERATE | JSPROP_READONLY },
{ "contractReputation", kPlayer_contractReputation, JSPROP_PERMANENT | JSPROP_ENUMERATE | JSPROP_READONLY }, { "contractReputation", kPlayer_contractReputation, JSPROP_PERMANENT | JSPROP_ENUMERATE | JSPROP_READONLY },
{ "passengerReputation", kPlayer_passengerReputation, JSPROP_PERMANENT | JSPROP_ENUMERATE | JSPROP_READONLY }, { "passengerReputation", kPlayer_passengerReputation, JSPROP_PERMANENT | JSPROP_ENUMERATE | JSPROP_READONLY },
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
{ "dockingClearanceStatus", kPlayer_dockingClearanceStatus, JSPROP_PERMANENT | JSPROP_ENUMERATE | JSPROP_READONLY }, { "dockingClearanceStatus", kPlayer_dockingClearanceStatus, JSPROP_PERMANENT | JSPROP_ENUMERATE | JSPROP_READONLY },
#endif #endif
{ "bounty", kPlayer_bounty, JSPROP_PERMANENT | JSPROP_ENUMERATE }, { "bounty", kPlayer_bounty, JSPROP_PERMANENT | JSPROP_ENUMERATE },
@ -256,7 +256,7 @@ static JSBool PlayerGetProperty(JSContext *context, JSObject *this, jsval name,
OK = YES; OK = YES;
break; break;
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
case kPlayer_dockingClearanceStatus: case kPlayer_dockingClearanceStatus:
*outValue = [DockingClearanceStatusToString([player getDockingClearanceStatus]) javaScriptValueInContext:context]; *outValue = [DockingClearanceStatusToString([player getDockingClearanceStatus]) javaScriptValueInContext:context];
OK = YES; OK = YES;

View File

@ -70,7 +70,7 @@ enum
kStation_isMainStation, // Is [UNIVERSE station], boolean, read-only kStation_isMainStation, // Is [UNIVERSE station], boolean, read-only
kStation_hasNPCTraffic, kStation_hasNPCTraffic,
kStation_alertCondition, kStation_alertCondition,
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
kStation_requiresDockingClearance, kStation_requiresDockingClearance,
#endif #endif
}; };
@ -82,7 +82,7 @@ static JSPropertySpec sStationProperties[] =
{ "isMainStation", kStation_isMainStation, JSPROP_PERMANENT | JSPROP_ENUMERATE | JSPROP_READONLY }, { "isMainStation", kStation_isMainStation, JSPROP_PERMANENT | JSPROP_ENUMERATE | JSPROP_READONLY },
{ "hasNPCTraffic", kStation_hasNPCTraffic, JSPROP_PERMANENT | JSPROP_ENUMERATE }, { "hasNPCTraffic", kStation_hasNPCTraffic, JSPROP_PERMANENT | JSPROP_ENUMERATE },
{ "alertCondition", kStation_alertCondition, JSPROP_PERMANENT | JSPROP_ENUMERATE }, { "alertCondition", kStation_alertCondition, JSPROP_PERMANENT | JSPROP_ENUMERATE },
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
{ "requiresDockingClearance", kStation_requiresDockingClearance, JSPROP_PERMANENT | JSPROP_ENUMERATE }, { "requiresDockingClearance", kStation_requiresDockingClearance, JSPROP_PERMANENT | JSPROP_ENUMERATE },
#endif #endif
{ 0 } { 0 }
@ -160,7 +160,7 @@ static JSBool StationGetProperty(JSContext *context, JSObject *this, jsval name,
*outValue = INT_TO_JSVAL([entity alertLevel]); *outValue = INT_TO_JSVAL([entity alertLevel]);
break; break;
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
case kStation_requiresDockingClearance: case kStation_requiresDockingClearance:
*outValue = BOOLToJSVal([entity requiresDockingClearance]); *outValue = BOOLToJSVal([entity requiresDockingClearance]);
break; break;
@ -203,7 +203,7 @@ static JSBool StationSetProperty(JSContext *context, JSObject *this, jsval name,
} }
break; break;
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
case kStation_requiresDockingClearance: case kStation_requiresDockingClearance:
if (JS_ValueToBoolean(context, *value, &bValue)) if (JS_ValueToBoolean(context, *value, &bValue))
{ {
@ -237,7 +237,7 @@ static JSBool StationDockPlayer(JSContext *context, JSObject *this, uintN argc,
StationEntity *stationForDockingPlayer = nil; StationEntity *stationForDockingPlayer = nil;
JSStationGetStationEntity(context, this, &stationForDockingPlayer); JSStationGetStationEntity(context, this, &stationForDockingPlayer);
#ifdef DOCKING_CLEARANCE_ENABLED #if DOCKING_CLEARANCE_ENABLED
[player setDockingClearanceStatus:DOCKING_CLEARANCE_STATUS_GRANTED]; [player setDockingClearanceStatus:DOCKING_CLEARANCE_STATUS_GRANTED];
#endif #endif

View File

@ -249,7 +249,7 @@ enum
BOOL doLinkedListMaintenanceThisUpdate; BOOL doLinkedListMaintenanceThisUpdate;
// experimental proc-genned textures // experimental proc-genned textures
#ifdef ALLOW_PROCEDURAL_PLANETS #if ALLOW_PROCEDURAL_PLANETS
BOOL doProcedurallyTexturedPlanets; BOOL doProcedurallyTexturedPlanets;
#endif #endif
@ -269,7 +269,7 @@ enum
- (id)initWithGameView:(MyOpenGLView *)gameView; - (id)initWithGameView:(MyOpenGLView *)gameView;
#ifdef ALLOW_PROCEDURAL_PLANETS #if ALLOW_PROCEDURAL_PLANETS
- (BOOL) doProcedurallyTexturedPlanets; - (BOOL) doProcedurallyTexturedPlanets;
- (void) setDoProcedurallyTexturedPlanets:(BOOL) value; - (void) setDoProcedurallyTexturedPlanets:(BOOL) value;
#endif #endif

View File

@ -174,7 +174,7 @@ static OOComparisonResult comparePrice(id dict1, id dict2, void * context);
reducedDetail = [prefs boolForKey:@"reduced-detail-graphics" defaultValue:NO]; reducedDetail = [prefs boolForKey:@"reduced-detail-graphics" defaultValue:NO];
autoSave = [prefs boolForKey:@"autosave" defaultValue:NO]; autoSave = [prefs boolForKey:@"autosave" defaultValue:NO];
wireframeGraphics = [prefs boolForKey:@"wireframe-graphics" defaultValue:NO]; wireframeGraphics = [prefs boolForKey:@"wireframe-graphics" defaultValue:NO];
#ifdef ALLOW_PROCEDURAL_PLANETS #if ALLOW_PROCEDURAL_PLANETS
doProcedurallyTexturedPlanets = [prefs boolForKey:@"procedurally-textured-planets" defaultValue:NO]; doProcedurallyTexturedPlanets = [prefs boolForKey:@"procedurally-textured-planets" defaultValue:NO];
#endif #endif
shaderEffectsLevel = SHADERS_SIMPLE; shaderEffectsLevel = SHADERS_SIMPLE;
@ -374,7 +374,7 @@ static OOComparisonResult comparePrice(id dict1, id dict2, void * context);
} }
#ifdef ALLOW_PROCEDURAL_PLANETS #if ALLOW_PROCEDURAL_PLANETS
- (BOOL) doProcedurallyTexturedPlanets - (BOOL) doProcedurallyTexturedPlanets
{ {
return doProcedurallyTexturedPlanets; return doProcedurallyTexturedPlanets;
@ -1315,7 +1315,7 @@ GLfloat docked_light_specular[4] = { (GLfloat) 0.7, (GLfloat) 0.7, (GLfloat) 0.4
pool = [[NSAutoreleasePool alloc] init]; pool = [[NSAutoreleasePool alloc] init];
NS_DURING NS_DURING
WormholeEntity* whole = [activeWormholes objectAtIndex:0]; WormholeEntity* whole = [activeWormholes objectAtIndex:0];
#ifdef WORMHOLE_SCANNER #if WORMHOLE_SCANNER
// If the wormhole has been scanned by the player then the // If the wormhole has been scanned by the player then the
// PlayerEntity will take care of it // PlayerEntity will take care of it
if (![whole isScanned] && if (![whole isScanned] &&
@ -4619,7 +4619,7 @@ static BOOL MaintainLinkedLists(Universe* uni)
Entity *my_entities[ent_count]; Entity *my_entities[ent_count];
for (i = 0; i < ent_count; i++) for (i = 0; i < ent_count; i++)
#ifdef WORMHOLE_SCANNER #if WORMHOLE_SCANNER
if ( ([sortedEntities[i] isShip] && ![sortedEntities[i] isPlayer]) || [sortedEntities[i] isWormhole]) if ( ([sortedEntities[i] isShip] && ![sortedEntities[i] isPlayer]) || [sortedEntities[i] isWormhole])
#else #else
if ((sortedEntities[i]->isShip)&&(sortedEntities[i] != player)) if ((sortedEntities[i]->isShip)&&(sortedEntities[i] != player))