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_OBJCFLAGS += -g -O0
GNUSTEP_OBJ_DIR_NAME := $(GNUSTEP_OBJ_DIR_NAME).dbg
ADDITIONAL_CFLAGS += -DDEBUG -DOO_DEBUG -DDEBUG_GRAPHVIZ
ADDITIONAL_OBJCFLAGS += -DDEBUG -DOO_DEBUG -DDEBUG_GRAPHVIZ
endif
ifeq ($(BUILD_WITH_DEBUG_FUNCTIONALITY),no)
ADDITIONAL_CFLAGS += -DNDEBUG
ADDITIONAL_OBJCFLAGS += -DNDEBUG
endif
ifeq ($(PROCEDURAL_PLANETS),yes)
ADDITIONAL_CFLAGS += -DALLOW_PROCEDURAL_PLANETS
ADDITIONAL_OBJCFLAGS += -DALLOW_PROCEDURAL_PLANETS
ADDITIONAL_CFLAGS += -DALLOW_PROCEDURAL_PLANETS=1
ADDITIONAL_OBJCFLAGS += -DALLOW_PROCEDURAL_PLANETS=1
endif
ifeq ($(DOCKING_CLEARANCE),yes)
ADDITIONAL_CFLAGS += -DDOCKING_CLEARANCE_ENABLED
ADDITIONAL_OBJCFLAGS += -DDOCKING_CLEARANCE_ENABLED
ADDITIONAL_CFLAGS += -DDOCKING_CLEARANCE_ENABLED=1
ADDITIONAL_OBJCFLAGS += -DDOCKING_CLEARANCE_ENABLED=1
endif
ifeq ($(WORMHOLE_SCANNER),yes)
ADDITIONAL_CFLAGS += -DWORMHOLE_SCANNER
ADDITIONAL_OBJCFLAGS += -DWORMHOLE_SCANNER
ADDITIONAL_CFLAGS += -DWORMHOLE_SCANNER=1
ADDITIONAL_OBJCFLAGS += -DWORMHOLE_SCANNER=1
endif
ifeq ($(TARGET_INCOMING_MISSILES),yes)
ADDITIONAL_CFLAGS += -DTARGET_INCOMING_MISSILES
ADDITIONAL_OBJCFLAGS += -DTARGET_INCOMING_MISSILES
ADDITIONAL_CFLAGS += -DTARGET_INCOMING_MISSILES=1
ADDITIONAL_OBJCFLAGS += -DTARGET_INCOMING_MISSILES=1
endif
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>"; };
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>"; };
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>"; };
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>"; };
@ -2792,6 +2793,7 @@
1A9407BF0BAF7032005F6CF3 /* GNUmakefile */,
1AF8E33A0CC169F500CA6001 /* contributors.txt */,
1A846BA90D79F9570081280D /* oolite-version.xcconfig */,
1AD88FAF103F29D300AA36F4 /* oolite-options.xcconfig */,
1A8A3BE90B963F02007D20B8 /* Source */,
1AC0E9380B974D8700C46994 /* Documentation */,
1A5BF2710916D45B00BF238F /* MDImporter */,
@ -3433,7 +3435,7 @@
/* Begin XCBuildConfiguration section */
08B31CAD08FE63D70038D42F /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 1A846BA90D79F9570081280D /* oolite-version.xcconfig */;
baseConfigurationReference = 1AD88FAF103F29D300AA36F4 /* oolite-options.xcconfig */;
buildSettings = {
COPY_PHASE_STRIP = NO;
COPY_SCHEMATA = 1;
@ -3448,12 +3450,10 @@
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = XP_UNIX;
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = (
ALLOW_PROCEDURAL_PLANETS,
DOCKING_CLEARANCE_ENABLED,
WORMHOLE_SCANNER,
OO_DEBUG,
DEBUG_GRAPHVIZ,
"OO_DEBUG=1",
"DEBUG_GRAPHVIZ=1",
DEBUG,
$OOLITE_OPTION_MACROS,
);
GCC_REUSE_STRINGS = YES;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
@ -3505,7 +3505,7 @@
};
08B31CAE08FE63D70038D42F /* Deployment */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 1A846BA90D79F9570081280D /* oolite-version.xcconfig */;
baseConfigurationReference = 1AD88FAF103F29D300AA36F4 /* oolite-options.xcconfig */;
buildSettings = {
COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = YES;
@ -3517,8 +3517,7 @@
GCC_OPTIMIZATION_LEVEL = s;
GCC_PREPROCESSOR_DEFINITIONS = XP_UNIX;
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = (
DOCKING_CLEARANCE_ENABLED,
WORMHOLE_SCANNER,
$OOLITE_OPTION_MACROS,
NDEBUG,
OO_EXCLUDE_DEBUG_SUPPORT,
);
@ -3636,11 +3635,7 @@
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_OPTIMIZATION_LEVEL = s;
GCC_PREPROCESSOR_DEFINITIONS = XP_UNIX;
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = (
DOCKING_CLEARANCE_ENABLED,
WORMHOLE_SCANNER,
"OO_SMART_CRASH_REPORT_INSTALL=1",
);
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = $OOLITE_OPTION_MACROS;
GCC_REUSE_STRINGS = YES;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
@ -3740,7 +3735,7 @@
};
1A581F5E0E311A59007594C1 /* Debug GCC 4.2/Leopard */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 1A846BA90D79F9570081280D /* oolite-version.xcconfig */;
baseConfigurationReference = 1AD88FAF103F29D300AA36F4 /* oolite-options.xcconfig */;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64";
@ -3756,11 +3751,10 @@
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = XP_UNIX;
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = (
DOCKING_CLEARANCE_ENABLED,
WORMHOLE_SCANNER,
OO_DEBUG,
DEBUG_GRAPHVIZ,
"OO_DEBUG=1",
"DEBUG_GRAPHVIZ=1",
DEBUG,
$OOLITE_OPTION_MACROS,
);
GCC_REUSE_STRINGS = YES;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;

View File

@ -87,7 +87,7 @@ enum {
BUTTON_ARMMISSILE,
BUTTON_LAUNCHMISSILE,
BUTTON_UNARM,
#ifdef TARGET_INCOMING_MISSILES
#if TARGET_INCOMING_MISSILES
BUTTON_TARGETINCOMINGMISSILE,
#endif
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 percent_land;
#ifdef ALLOW_PROCEDURAL_PLANETS
#if ALLOW_PROCEDURAL_PLANETS
BOOL procGen = [UNIVERSE doProcedurallyTexturedPlanets];
#endif
@ -363,7 +363,7 @@ static float corona_blending;
atmosphere = nil;
#ifdef ALLOW_PROCEDURAL_PLANETS
#if ALLOW_PROCEDURAL_PLANETS
if (procGen)
{
RANROTSeed ranrotSavedSeed = RANROTGetFullSeed();
@ -446,7 +446,7 @@ static float corona_blending;
- (id) initWithSeed:(Random_Seed) p_seed
{
NSMutableDictionary* planetInfo = [NSMutableDictionary dictionaryWithDictionary:[UNIVERSE generateSystemData:p_seed]];
#ifdef ALLOW_PROCEDURAL_PLANETS
#if ALLOW_PROCEDURAL_PLANETS
if (![UNIVERSE doProcedurallyTexturedPlanets])
#endif
{
@ -571,7 +571,7 @@ static float corona_blending;
int i;
int percent_land;
BOOL procGen = NO;
#ifdef ALLOW_PROCEDURAL_PLANETS
#if ALLOW_PROCEDURAL_PLANETS
procGen = [UNIVERSE doProcedurallyTexturedPlanets];
#endif
@ -723,7 +723,7 @@ static float corona_blending;
[planetInfo setObject:amb_polar_sea_color forKey:@"polar_sea_color"];
#ifdef ALLOW_PROCEDURAL_PLANETS
#if ALLOW_PROCEDURAL_PLANETS
if (procGen)
{
if (!isTextured)
@ -1470,7 +1470,7 @@ void drawActiveCorona(GLfloat inner_radius, GLfloat outer_radius, GLfloat step,
textureName = tName;
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
// 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?

View File

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

View File

@ -118,7 +118,7 @@ static PlayerEntity *sSharedPlayer = nil;
- (void) performDeadUpdates:(OOTimeDelta)delta_t;
- (void) updateTargetting;
- (BOOL) isValidTarget:(Entity*)target;
#ifdef WORMHOLE_SCANNER
#if WORMHOLE_SCANNER
- (void) addScannedWormhole:(WormholeEntity*)wormhole;
- (void) updateWormholes;
#endif
@ -449,7 +449,7 @@ static PlayerEntity *sSharedPlayer = nil;
// trumble information
[result setObject:[self trumbleValue] forKey:@"trumbles"];
#ifdef WORMHOLE_SCANNER
#if WORMHOLE_SCANNER
// wormhole information
NSMutableArray * wormholeDicts = [NSMutableArray arrayWithCapacity:[scannedWormholes count]];
NSEnumerator * wormholes = [scannedWormholes objectEnumerator];
@ -711,7 +711,7 @@ static PlayerEntity *sSharedPlayer = nil;
system_seed = [UNIVERSE findSystemAtCoords:galaxy_coordinates withGalaxySeed:galaxy_seed];
target_system_seed = [UNIVERSE findSystemAtCoords:cursor_coordinates withGalaxySeed:galaxy_seed];
#ifdef WORMHOLE_SCANNER
#if WORMHOLE_SCANNER
// wormholes
NSArray * whArray;
whArray = [dict objectForKey:@"wormholes"];
@ -951,7 +951,7 @@ static PlayerEntity *sSharedPlayer = nil;
[UNIVERSE clearGUIs];
#ifdef DOCKING_CLEARANCE_ENABLED
#if DOCKING_CLEARANCE_ENABLED
dockingClearanceStatus = DOCKING_CLEARANCE_STATUS_GRANTED;
targetDockStation = nil;
#endif
@ -976,7 +976,7 @@ static PlayerEntity *sSharedPlayer = nil;
[save_path autorelease];
save_path = nil;
#ifdef WORMHOLE_SCANNER
#if WORMHOLE_SCANNER
[scannedWormholes release];
scannedWormholes = [[NSMutableArray alloc] init];
#endif
@ -1220,7 +1220,7 @@ static PlayerEntity *sSharedPlayer = nil;
[self destroySound];
#ifdef WORMHOLE_SCANNER
#if WORMHOLE_SCANNER
[scannedWormholes release];
scannedWormholes = nil;
#endif
@ -1311,7 +1311,7 @@ static PlayerEntity *sSharedPlayer = nil;
// TODO: this should probably be called from performInFlightUpdates: instead. -- Ahruman 20080322
// Moved to performInFlightUpdates. -- Micha 20090403
//[self updateTargetting];
#ifdef WORMHOLE_SCANNER
#if WORMHOLE_SCANNER
[self updateWormholes];
#endif
}
@ -1893,7 +1893,7 @@ static PlayerEntity *sSharedPlayer = nil;
[self setStatus:STATUS_IN_FLIGHT];
#ifdef DOCKING_CLEARANCE_ENABLED
#if DOCKING_CLEARANCE_ENABLED
[self setDockingClearanceStatus:DOCKING_CLEARANCE_STATUS_NONE];
#endif
[self doScriptEvent:@"shipLaunchedFromStation"];
@ -1946,7 +1946,7 @@ static PlayerEntity *sSharedPlayer = nil;
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 isWormhole] && [target scanClass] != CLASS_NO_DRAW &&
[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
// information
if ([[self primaryTarget] isWormhole])
@ -2289,7 +2289,7 @@ static PlayerEntity *sSharedPlayer = nil;
return dockedStation;
}
#ifdef DOCKING_CLEARANCE_ENABLED
#if DOCKING_CLEARANCE_ENABLED
- (void) setTargetDockStationTo:(StationEntity *) value
{
targetDockStation = value;
@ -2684,7 +2684,7 @@ static PlayerEntity *sSharedPlayer = nil;
return DESC(@"no-target-string");
if ([target_entity isShip])
return [(ShipEntity*)target_entity identFromShip:self];
#ifdef WORMHOLE_SCANNER
#if WORMHOLE_SCANNER
if ([target_entity isWormhole])
return [(WormholeEntity*)target_entity identFromShip:self];
#endif
@ -3467,7 +3467,7 @@ static PlayerEntity *sSharedPlayer = nil;
[self setStatus:STATUS_ESCAPE_SEQUENCE]; // firstly
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;
#endif
@ -3889,7 +3889,7 @@ static PlayerEntity *sSharedPlayer = nil;
[[OOMusicController sharedController] stopDockingMusic];
[[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,
// apply no unauthorized docking penalties if a nova is ongoing.
if (![UNIVERSE strict] && [dockedStation requiresDockingClearance] &&
@ -3950,7 +3950,7 @@ static PlayerEntity *sSharedPlayer = nil;
[station clearDockingCorridor];
[self setAlertFlag:ALERT_FLAG_DOCKED to:NO];
#ifdef DOCKING_CLEARANCE_ENABLED
#if DOCKING_CLEARANCE_ENABLED
[self setDockingClearanceStatus:DOCKING_CLEARANCE_STATUS_NONE];
#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 setKey:GUI_KEY_OK forRow:GUI_ROW(GAME,WIREFRAMEGRAPHICS)];
#ifdef ALLOW_PROCEDURAL_PLANETS
#if ALLOW_PROCEDURAL_PLANETS
if ([UNIVERSE doProcedurallyTexturedPlanets])
[gui setText:DESC(@"gameoptions-procedurally-textured-planets-yes") forRow:GUI_ROW(GAME,PROCEDURALLYTEXTUREDPLANETS) align:GUI_ALIGN_CENTER];
else
@ -6522,7 +6522,7 @@ static int last_outfitting_index;
[super addTarget:targetEntity];
#ifdef WORMHOLE_SCANNER
#if WORMHOLE_SCANNER
if ([targetEntity isWormhole])
{
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
{
return dockingClearanceStatus > DOCKING_CLEARANCE_STATUS_REQUESTED;
@ -6924,7 +6924,7 @@ static int last_outfitting_index;
#endif
#ifdef WORMHOLE_SCANNER
#if WORMHOLE_SCANNER
//
// Wormhole Scanner support functions
//

View File

@ -62,7 +62,7 @@ static BOOL previous_target_pressed;
static BOOL next_missile_pressed;
static BOOL fire_missile_pressed;
static BOOL target_missile_pressed;
#ifdef TARGET_INCOMING_MISSILES
#if TARGET_INCOMING_MISSILES
static BOOL target_incoming_missile_pressed;
#endif
static BOOL ident_pressed;
@ -72,7 +72,7 @@ static BOOL rotateCargo_pressed;
static BOOL autopilot_key_pressed;
static BOOL fast_autopilot_key_pressed;
static BOOL target_autopilot_key_pressed;
#ifdef DOCKING_CLEARANCE_ENABLED
#if DOCKING_CLEARANCE_ENABLED
static BOOL docking_clearance_request_key_pressed;
#endif
#ifndef NDEBUG
@ -193,7 +193,7 @@ static NSTimeInterval time_last_frame;
LOAD_KEY_SETTING(key_target_missile, 't' );
LOAD_KEY_SETTING(key_untarget_missile, 'u' );
#ifdef TARGET_INCOMING_MISSILES
#if TARGET_INCOMING_MISSILES
LOAD_KEY_SETTING(key_target_incoming_missile, 'T' );
#endif
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_target, 'C' );
LOAD_KEY_SETTING(key_autodock, 'D' );
#ifdef DOCKING_CLEARANCE_ENABLED
#if DOCKING_CLEARANCE_ENABLED
LOAD_KEY_SETTING(key_docking_clearance_request, 'L' );
#endif
@ -687,7 +687,7 @@ static NSTimeInterval time_last_frame;
ident_pressed = YES;
}
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
if ([gameView isDown:key_target_incoming_missile] || joyButtonState[BUTTON_TARGETINCOMINGMISSILE])
{
@ -839,7 +839,7 @@ static NSTimeInterval time_last_frame;
[self setStatus:STATUS_AUTOPILOT_ENGAGED];
[shipAI setState:@"GLOBAL"]; // reboot the AI
[self playAutopilotOn];
#ifdef DOCKING_CLEARANCE_ENABLED
#if DOCKING_CLEARANCE_ENABLED
[self setDockingClearanceStatus:DOCKING_CLEARANCE_STATUS_GRANTED];
#endif
[UNIVERSE addMessage:DESC(@"autopilot-on") forCount:4.5];
@ -880,7 +880,7 @@ static NSTimeInterval time_last_frame;
[self setStatus:STATUS_AUTOPILOT_ENGAGED];
[shipAI setState:@"GLOBAL"]; // restart the AI
[self playAutopilotOn];
#ifdef DOCKING_CLEARANCE_ENABLED
#if DOCKING_CLEARANCE_ENABLED
[self setDockingClearanceStatus:DOCKING_CLEARANCE_STATUS_GRANTED];
#endif
[UNIVERSE addMessage:DESC(@"autopilot-on") forCount:4.5];
@ -942,7 +942,7 @@ static NSTimeInterval time_last_frame;
[self markForFines];
}
}
#ifdef DOCKING_CLEARANCE_ENABLED
#if DOCKING_CLEARANCE_ENABLED
[self setDockingClearanceStatus:DOCKING_CLEARANCE_STATUS_GRANTED];
#endif
ship_clock_adjust = 1200.0; // 20 minutes penalty to enter dock
@ -964,7 +964,7 @@ static NSTimeInterval time_last_frame;
else
fast_autopilot_key_pressed = NO;
#ifdef DOCKING_CLEARANCE_ENABLED
#if DOCKING_CLEARANCE_ENABLED
// docking clearance request 'L', not available in strict mode
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];
}
#ifdef ALLOW_PROCEDURAL_PLANETS
#if ALLOW_PROCEDURAL_PLANETS
if ((guiSelectedRow == GUI_ROW(GAME,PROCEDURALLYTEXTUREDPLANETS))&&(([gameView isDown:gvArrowKeyRight])||([gameView isDown:gvArrowKeyLeft])))
{
if ([gameView isDown:gvArrowKeyRight] != [UNIVERSE doProcedurallyTexturedPlanets])
@ -2829,7 +2829,7 @@ static BOOL toggling_music;
[self setStatus:STATUS_IN_FLIGHT];
[self playAutopilotOff];
[UNIVERSE addMessage:DESC(@"autopilot-off") forCount:4.5];
#ifdef DOCKING_CLEARANCE_ENABLED
#if DOCKING_CLEARANCE_ENABLED
[self setDockingClearanceStatus:DOCKING_CLEARANCE_STATUS_NONE];
#endif
[self doScriptEvent:@"playerCancelledAutoPilot"];

View File

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

View File

@ -2544,7 +2544,7 @@ static int scriptRandomSeed = -1; // ensure proper random function
return NO; // 0........... 1 2 3
PlanetEntity* doppelganger=nil;
BOOL procGen = NO;
#ifdef ALLOW_PROCEDURAL_PLANETS
#if ALLOW_PROCEDURAL_PLANETS
procGen = [UNIVERSE doProcedurallyTexturedPlanets];
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
{
[self scanForNearestIncomingMissile];

View File

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

View File

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

View File

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

View File

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

View File

@ -247,7 +247,7 @@ static NSDictionary* instructions(int station_id, Vector coords, float speed, fl
}
[shipsOnApproach removeAllObjects];
#ifdef DOCKING_CLEARANCE_ENABLED
#if DOCKING_CLEARANCE_ENABLED
PlayerEntity *player = [PlayerEntity sharedPlayer];
BOOL isDockingStation = (self == [player getTargetDockStation]);
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);
}
#ifdef DOCKING_CLEARANCE_ENABLED
#if DOCKING_CLEARANCE_ENABLED
// If the ship is not on its docking approach and the player has
// requested or even been granted docking clearance, then tell the
// 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 = OOMax_f(equipmentPriceFactor, 0.5f);
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,
// 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];
@ -1045,7 +1045,7 @@ static NSDictionary* instructions(int station_id, Vector coords, float speed, fl
[super update:delta_t];
#ifdef DOCKING_CLEARANCE_ENABLED
#if DOCKING_CLEARANCE_ENABLED
PlayerEntity *player = [PlayerEntity sharedPlayer];
BOOL isDockingStation = (self == [player getTargetDockStation]);
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 *result = nil;

View File

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

View File

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

View File

@ -2243,7 +2243,7 @@ static void hudDrawReticleOnTarget(Entity* target, PlayerEntity* player1, GLfloa
//rotate to face player1
GLMultOOMatrix(back_mat);
// draw the reticle
#ifdef WORMHOLE_SCANNER
#if WORMHOLE_SCANNER
// Draw reticle cyan for Wormholes
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(info, rs0, 0.5 * rs2 - line_height, 0, textsize);
#ifdef WORMHOLE_SCANNER
#if WORMHOLE_SCANNER
if ([target isWormhole])
{
// 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
#ifdef DEBUG_GRAPHVIZ
#if DEBUG_GRAPHVIZ
/* 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,
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.
*/
#define AGE_LIST 0

View File

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

View File

@ -347,3 +347,7 @@ enum {
#define OOLITE_SPEECH_SYNTH 0
#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;
NSString *GalacticHyperspaceBehaviourToString(OOGalacticHyperspaceBehaviour behaviour) CONST_FUNC;
#ifdef DOCKING_CLEARANCE_ENABLED
#if DOCKING_CLEARANCE_ENABLED
NSString *DockingClearanceStatusToString(OODockingClearanceStatus dockingClearanceStatus) PURE_FUNC;
#endif

View File

@ -606,7 +606,7 @@ NSString *DisplayStringForMassUnitForCommodity(OOCargoType commodity)
return DisplayStringForMassUnit([UNIVERSE unitsForCommodity:commodity]);
}
#ifdef DOCKING_CLEARANCE_ENABLED
#if DOCKING_CLEARANCE_ENABLED
NSString *DockingClearanceStatusToString(OODockingClearanceStatus 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 HasRoleInSetPredicate(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
#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)
{
return [(ShipEntity *)ship hasHostileTarget] && [(ShipEntity *)ship primaryTarget] == (ShipEntity *)parameter;

View File

@ -14,7 +14,7 @@
#define OOINLINE static inline
#ifndef OO_DEBUG
#if !OO_DEBUG
#define ALWAYS_INLINE_FUNC GCC_ATTR((always_inline)) // Force inlining of function
#else
#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"
#endif
#ifdef OO_DEBUG
#if OO_DEBUG
#define RELEASE_VARIANT_STRING " debug"
#elif !defined (NDEBUG)
#define RELEASE_VARIANT_STRING " test release"
@ -97,25 +97,25 @@ void OOPrintLogHeader(void)
#define RELEASE_VARIANT_STRING ""
#endif
#ifdef ALLOW_PROCEDURAL_PLANETS
#if ALLOW_PROCEDURAL_PLANETS
#define OPT1_STR " [Procedural Planets]"
#else
#define OPT1_STR ""
#endif
#ifdef DOCKING_CLEARANCE_ENABLED
#if DOCKING_CLEARANCE_ENABLED
#define OPT2_STR " [Docking Clearance]"
#else
#define OPT2_STR ""
#endif
#ifdef WORMHOLE_SCANNER
#if WORMHOLE_SCANNER
#define OPT3_STR " [Wormhole Scanner]"
#else
#define OPT3_STR ""
#endif
#ifdef TARGET_INCOMING_MISSILES
#if TARGET_INCOMING_MISSILES
#define OPT4_STR " [Target Incoming Missiles]"
#else
#define OPT4_STR ""

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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