Removed special characters from source code filenames.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@774 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
17761e7797
commit
b0b8b75b15
@ -21,8 +21,7 @@ endif
|
||||
OBJC_PROGRAM_NAME = oolite
|
||||
|
||||
oolite_C_FILES = vector.c legacy_random.c strlcpy.c
|
||||
oolite_OBJC_FILES = Comparison.m AI.m DustEntity.m Entity.m GameController.m GuiDisplayGen.m HeadUpDisplay.m main.m MyOpenGLView.m OpenGLSprite.m ParticleEntity.m PlanetEntity.m PlayerEntity_Additions.m PlayerEntity_contracts.m PlayerEntity_Controls.m PlayerEntity_Sound.m PlayerEntity.m ResourceManager.m RingEntity.m ShipEntity_AI.m ShipEntity.m SkyEntity.m StationEntity.m TextureStore.m Universe.m OOSound.m OOMusic.m SDLImage.m LoadSave.m OOFileManager.m JoystickHandler.m PlayerEntity_StickMapper.m OOBasicSoundReferencePoint.m OOBasicSoundSource.m OOCharacter.m OOTrumble.m WormholeEntity.m ScannerExtension.m OOXMLExtensions.m MutableDictionaryExtension.m Geometry.m Octree.m CollisionRegion.m OOColor.m ScriptCompiler.m StringTokeniser.m
|
||||
oolite_OBJC_FILES = Comparison.m AI.m DustEntity.m Entity.m GameController.m GuiDisplayGen.m HeadUpDisplay.m main.m MyOpenGLView.m OpenGLSprite.m ParticleEntity.m PlanetEntity.m PlayerEntityAdditions.m PlayerEntityContracts.m PlayerEntityControls.m PlayerEntitySound.m PlayerEntity.m ResourceManager.m RingEntity.m ShipEntityAI.m ShipEntity.m SkyEntity.m StationEntity.m TextureStore.m Universe.m OOSound.m OOMusic.m SDLImage.m LoadSave.m OOFileManager.m JoystickHandler.m PlayerEntity_StickMapper.m OOBasicSoundReferencePoint.m OOBasicSoundSource.m OOCharacter.m OOTrumble.m WormholeEntity.m ScannerExtension.m OOXMLExtensions.m MutableDictionaryExtension.m Geometry.m Octree.m CollisionRegion.m OOColor.m ScriptCompiler.m StringTokeniser.m
|
||||
|
||||
include $(GNUSTEP_MAKEFILES)/objc.make
|
||||
include GNUmakefile.postamble
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
#import "LoadSave.h"
|
||||
#import "OOFileManager.h"
|
||||
#import "GameController.h"
|
||||
#import "PlayerEntity (Controls).h"
|
||||
#import "PlayerEntityControls.h"
|
||||
#import "OOXMLExtensions.h"
|
||||
#import "OOSound.h"
|
||||
#import "OOColor.h"
|
||||
|
@ -45,7 +45,7 @@ Your fair use and other rights are in no way affected by the above.
|
||||
#import "Universe.h"
|
||||
#import "TextureStore.h"
|
||||
#import "MyOpenGLView.h"
|
||||
#import "ShipEntity (AI).h"
|
||||
#import "ShipEntityAI.h"
|
||||
#import "OOColor.h"
|
||||
#import "OOCharacter.h"
|
||||
|
||||
|
@ -230,7 +230,9 @@ enum
|
||||
BOOL show_info_flag;
|
||||
|
||||
@protected
|
||||
|
||||
NSDictionary *altShipinfoDictionary;
|
||||
NSString *altShipDesc;
|
||||
|
||||
NSString *ship_desc;
|
||||
int ship_trade_in_factor;
|
||||
|
||||
|
@ -38,10 +38,10 @@ Your fair use and other rights are in no way affected by the above.
|
||||
*/
|
||||
|
||||
#import "PlayerEntity.h"
|
||||
#import "PlayerEntity Additions.h"
|
||||
#import "PlayerEntity (contracts).h"
|
||||
#import "PlayerEntity (Controls).h"
|
||||
#import "PlayerEntity (Sound).h"
|
||||
#import "PlayerEntityAdditions.h"
|
||||
#import "PlayerEntityContracts.h"
|
||||
#import "PlayerEntityControls.h"
|
||||
#import "PlayerEntitySound.h"
|
||||
#import "entities.h"
|
||||
|
||||
#import "OOXMLExtensions.h"
|
||||
@ -3062,7 +3062,7 @@ double scoopSoundPlayTime = 0.0;
|
||||
[missile setOwner:self];
|
||||
[missile setDistanceTravelled:0.0];
|
||||
//debug
|
||||
//[missile setReportAImessages:YES];
|
||||
[missile setReportAImessages:YES];
|
||||
//
|
||||
[universe addEntity:missile];
|
||||
//NSLog(@"Missile collision radius is %.1f",missile->collision_radius);
|
||||
@ -5306,6 +5306,7 @@ static int last_outfitting_index;
|
||||
NSString* eq_key = (NSString*)[(NSArray*)[equipdata objectAtIndex:i] objectAtIndex:EQUIPMENT_KEY_INDEX];
|
||||
NSString* eq_key_damaged = [NSString stringWithFormat:@"%@_DAMAGED", eq_key];
|
||||
int min_techlevel = [(NSNumber *)[(NSArray *)[equipdata objectAtIndex:i] objectAtIndex:EQUIPMENT_TECH_LEVEL_INDEX] intValue];
|
||||
|
||||
NSMutableDictionary* eq_extra_info_dict = [NSMutableDictionary dictionary];
|
||||
if ([(NSArray *)[equipdata objectAtIndex:i] count] > 5)
|
||||
[eq_extra_info_dict addEntriesFromDictionary:(NSDictionary *)[(NSArray *)[equipdata objectAtIndex:i] objectAtIndex:EQUIPMENT_EXTRA_INFO_INDEX]];
|
||||
@ -5847,8 +5848,10 @@ static int last_outfitting_index;
|
||||
return YES;
|
||||
}
|
||||
|
||||
if (([eq_key hasSuffix:@"MISSILE"]||[eq_key hasSuffix:@"MINE"])&&(missiles >= max_missiles))
|
||||
if (([eq_key hasSuffix:@"MISSILE"]||[eq_key hasSuffix:@"MINE"])&&(missiles >= max_missiles)) {
|
||||
NSLog(@"rejecting missile because already full");
|
||||
return NO;
|
||||
}
|
||||
|
||||
if (([eq_key isEqual:@"EQ_PASSENGER_BERTH"])&&(cargo_space < 5))
|
||||
return NO;
|
||||
@ -5900,6 +5903,11 @@ static int last_outfitting_index;
|
||||
if ([eq_key hasSuffix:@"MISSILE"]||[eq_key hasSuffix:@"MINE"])
|
||||
{
|
||||
ShipEntity* weapon = [[universe getShipWithRole:eq_key] autorelease];
|
||||
if (weapon)
|
||||
NSLog(@"got ship for role %@", eq_key);
|
||||
else
|
||||
NSLog(@"could not find ship for role %@", eq_key);
|
||||
|
||||
BOOL mounted_okay = [self mountMissile:weapon];
|
||||
if (mounted_okay)
|
||||
{
|
||||
|
@ -38,7 +38,7 @@ Your fair use and other rights are in no way affected by the above.
|
||||
*/
|
||||
|
||||
#import "PlayerEntity.h"
|
||||
#import "PlayerEntity Additions.h"
|
||||
#import "PlayerEntityAdditions.h"
|
||||
#import "GuiDisplayGen.h"
|
||||
#import "Universe.h"
|
||||
#import "ResourceManager.h"
|
@ -38,7 +38,7 @@ Your fair use and other rights are in no way affected by the above.
|
||||
*/
|
||||
|
||||
#import "PlayerEntity.h"
|
||||
#import "PlayerEntity Additions.h"
|
||||
#import "PlayerEntityAdditions.h"
|
||||
|
||||
#define PASSENGER_KEY_NAME @"name"
|
||||
#define PASSENGER_KEY_DESTINATION_NAME @"destination_name"
|
@ -38,8 +38,8 @@ Your fair use and other rights are in no way affected by the above.
|
||||
*/
|
||||
|
||||
#import "PlayerEntity.h"
|
||||
#import "PlayerEntity Additions.h"
|
||||
#import "PlayerEntity (contracts).h"
|
||||
#import "PlayerEntityAdditions.h"
|
||||
#import "PlayerEntityContracts.h"
|
||||
#import "Universe.h"
|
||||
#import "AI.h"
|
||||
#import "OOColor.h"
|
@ -38,9 +38,9 @@ Your fair use and other rights are in no way affected by the above.
|
||||
*/
|
||||
|
||||
#import "PlayerEntity.h"
|
||||
#import "PlayerEntity (Controls).h"
|
||||
#import "PlayerEntity (Sound).h"
|
||||
#import "ShipEntity (AI).h"
|
||||
#import "PlayerEntityControls.h"
|
||||
#import "PlayerEntitySound.h"
|
||||
#import "ShipEntityAI.h"
|
||||
|
||||
#import "Universe.h"
|
||||
#import "GameController.h"
|
@ -6,7 +6,7 @@
|
||||
// Copyright 2005 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "PlayerEntity (Sound).h"
|
||||
#import "PlayerEntitySound.h"
|
||||
#import "OOSound.h"
|
||||
#import "OOSoundSource.h"
|
||||
#import "ResourceManager.h"
|
@ -14,7 +14,7 @@
|
||||
//
|
||||
|
||||
#import "PlayerEntity_StickMapper.h"
|
||||
#import "PlayerEntity (Controls).h"
|
||||
#import "PlayerEntityControls.h"
|
||||
#import "JoystickHandler.h"
|
||||
|
||||
@implementation PlayerEntity (StickMapper)
|
||||
|
@ -377,6 +377,8 @@ Your fair use and other rights are in no way affected by the above.
|
||||
|
||||
// shaders
|
||||
NSMutableDictionary* shader_info;
|
||||
|
||||
BOOL is_hulk; // This is used to distinguish abandoned ships from cargo
|
||||
}
|
||||
|
||||
// ship brains
|
||||
@ -724,6 +726,11 @@ inline BOOL pairOK(NSString* my_role, NSString* their_role);
|
||||
|
||||
- (void) setTrackCloseContacts:(BOOL) value;
|
||||
|
||||
- (BOOL) isHulk;
|
||||
- (void) claimAsSalvage;
|
||||
- (void) sendCoordinatesToPilot;
|
||||
- (void) pilotArrived;
|
||||
|
||||
/****************************************************************
|
||||
|
||||
straight c stuff
|
||||
|
@ -38,7 +38,7 @@ Your fair use and other rights are in no way affected by the above.
|
||||
*/
|
||||
|
||||
#import "ShipEntity.h"
|
||||
#import "ShipEntity (AI).h"
|
||||
#import "ShipEntityAI.h"
|
||||
#import "entities.h"
|
||||
|
||||
#import "vector.h"
|
||||
@ -209,6 +209,8 @@ Your fair use and other rights are in no way affected by the above.
|
||||
//
|
||||
brain = nil;
|
||||
//
|
||||
is_hulk = NO;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
@ -957,6 +959,8 @@ static NSMutableDictionary* smallOctreeDict = nil;
|
||||
//
|
||||
crew = nil;
|
||||
//
|
||||
is_hulk = NO;
|
||||
|
||||
[self setUpShipFromDictionary:dict];
|
||||
//
|
||||
reportAImessages = NO;
|
||||
@ -1250,6 +1254,9 @@ static NSMutableDictionary* smallOctreeDict = nil;
|
||||
[exhaust release];
|
||||
}
|
||||
}
|
||||
|
||||
if ([shipdict objectForKey:@"is_hulk"])
|
||||
is_hulk = [(NSString *)[shipdict objectForKey:@"is_hulk"] boolValue];
|
||||
//
|
||||
if ([shipdict objectForKey:@"subentities"])
|
||||
{
|
||||
@ -4714,10 +4721,16 @@ static GLfloat mascem_color2[4] = { 0.4, 0.1, 0.4, 1.0}; // purple
|
||||
thrust = thrust * 0.5;
|
||||
desired_speed = 0.0;
|
||||
max_flight_speed = 0.0;
|
||||
is_hulk = YES;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL) isHulk
|
||||
{
|
||||
return is_hulk;
|
||||
}
|
||||
|
||||
- (void) becomeExplosion
|
||||
{
|
||||
// check if we're destroying a subentity
|
||||
@ -8265,6 +8278,89 @@ inline BOOL pairOK(NSString* my_role, NSString* their_role)
|
||||
}
|
||||
}
|
||||
|
||||
- (void) claimAsSalvage
|
||||
{
|
||||
// Create a bouy and beacon where the hulk is.
|
||||
// Get the main GalCop station to launch a pilot boat to deliver a pilot to the hulk.
|
||||
NSLog(@"claimAsSalvage called on %@ %@", [self name], [self roles]);
|
||||
/*
|
||||
// Won't work in interstellar space because there is no GalCop station
|
||||
if ([[self planet_number] intValue] < 0)
|
||||
{
|
||||
NSLog(@"claimAsSalvage failed because in intersteller space");
|
||||
return;
|
||||
}
|
||||
*/
|
||||
// Not an abandoned hulk, so don't allow the salvage
|
||||
if (is_hulk != YES)
|
||||
{
|
||||
NSLog(@"claimAsSalvage failed because not a hulk");
|
||||
return;
|
||||
}
|
||||
|
||||
// Set target to main station, and return now if it can't be found
|
||||
[self setTargetToSystemStation];
|
||||
if (primaryTarget == NO_TARGET)
|
||||
{
|
||||
NSLog(@"claimAsSalvage failed because did not find a station");
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the station to launch a pilot boat to bring a pilot out to the hulk (use a viper for now)
|
||||
StationEntity *station = (StationEntity *)[universe entityForUniversalID:primaryTarget];
|
||||
NSLog(@"claimAsSalvage asking station to launch a pilot boat");
|
||||
[station launchShipWithRole:@"pilot"];
|
||||
[self setReportAImessages:YES];
|
||||
NSLog(@"claimAsSalvage setting own state machine to capturedShipAI.plist");
|
||||
[self setStateMachine:@"capturedShipAI.plist"];
|
||||
}
|
||||
|
||||
- (void) sendCoordinatesToPilot
|
||||
{
|
||||
Entity* scan, *pilot;
|
||||
n_scanned_ships = 0;
|
||||
scan = z_previous;
|
||||
NSLog(@"searching for pilot boat");
|
||||
while (scan &&(scan->isShip == NO))
|
||||
scan = scan->z_previous; // skip non-ships
|
||||
|
||||
pilot = nil;
|
||||
while (scan)
|
||||
{
|
||||
if (scan->isShip)
|
||||
{
|
||||
NSString *rolesString = [scan roles];
|
||||
NSArray *roles = [Entity scanTokensFromString:rolesString];
|
||||
if ([roles containsObject:@"pilot"] == YES)
|
||||
{
|
||||
if ([scan getPrimaryTargetID] == NO_TARGET)
|
||||
{
|
||||
NSLog(@"found pilot boat with no target, will use this one");
|
||||
pilot = scan;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
scan = scan->z_previous;
|
||||
while (scan && (scan->isShip == NO))
|
||||
scan = scan->z_previous;
|
||||
}
|
||||
|
||||
if (pilot != nil)
|
||||
{
|
||||
NSLog(@"becoming pilot target and setting AI");
|
||||
[pilot setReportAImessages:YES];
|
||||
[pilot addTarget:self];
|
||||
[pilot setStateMachine:@"pilotAI.plist"];
|
||||
[[self getAI] reactToMessage:@"FOUND_PILOT"];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) pilotArrived
|
||||
{
|
||||
[[self getAI] reactToMessage:@"PILOT_ARRIVED"];
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
// No over-ride of Entity's version of the method is required for non-Win32 platforms.
|
||||
- (void) reloadTextures
|
||||
|
@ -40,7 +40,7 @@ Your fair use and other rights are in no way affected by the above.
|
||||
*/
|
||||
//
|
||||
|
||||
#import "ShipEntity (AI).h"
|
||||
#import "ShipEntityAI.h"
|
||||
#import "entities.h"
|
||||
#import "vector.h"
|
||||
#import "Universe.h"
|
@ -38,7 +38,7 @@ Your fair use and other rights are in no way affected by the above.
|
||||
*/
|
||||
|
||||
#import "StationEntity.h"
|
||||
#import "ShipEntity (AI).h"
|
||||
#import "ShipEntityAI.h"
|
||||
#import "entities.h"
|
||||
|
||||
#import "AI.h"
|
||||
|
@ -41,8 +41,8 @@ Your fair use and other rights are in no way affected by the above.
|
||||
#import "ShipEntity.h"
|
||||
#import "StationEntity.h"
|
||||
#import "PlayerEntity.h"
|
||||
#import "PlayerEntity Additions.h"
|
||||
#import "PlayerEntity (contracts).h"
|
||||
#import "PlayerEntityAdditions.h"
|
||||
#import "PlayerEntityContracts.h"
|
||||
//
|
||||
#import "PlanetEntity.h"
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user