Oolite 1.91.0.7645-241119-222d325
Loading...
Searching...
No Matches
PlayerEntity.h File Reference
import <Foundation/Foundation.h>
import "WormholeEntity.h"
import "ShipEntity.h"
import "GuiDisplayGen.h"
import "OOTypes.h"
import "OOJSPropID.h"
import "OOCommodityMarket.h"
#include "OOGUIScreenID.tbl"
#include "OOGalacticHyperspaceBehaviour.tbl"
+ Include dependency graph for PlayerEntity.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  PlayerEntity
 

Macros

#define ALLOW_CUSTOM_VIEWS_WHILE_PAUSED   1
 
#define SCRIPT_TIMER_INTERVAL   10.0
 
#define OO_VARIABLE_TORUS_SPEED   1
 
#define GUI_ROW_INIT(GUI)
 
#define GUI_FIRST_ROW(GROUP)
 
#define GUI_ROW(GROUP, ITEM)
 
#define CUSTOM_VIEW_MAX_ZOOM_IN   1.5
 
#define CUSTOM_VIEW_MAX_ZOOM_OUT   25
 
#define ENTRY(label, value)
 
#define GALACTIC_HYPERSPACE_ENTRY(label, value)
 
#define CHART_WIDTH_AT_MAX_ZOOM   64.0
 
#define CHART_HEIGHT_AT_MAX_ZOOM   64.0
 
#define CHART_MAX_ZOOM   (256.0/CHART_WIDTH_AT_MAX_ZOOM)
 
#define CHART_SCROLL_AT_X   25.0
 
#define CHART_SCROLL_AT_Y   31.0
 
#define CHART_CLIP_BORDER   10.0
 
#define CHART_SCREEN_VERTICAL_CENTRE   (10*MAIN_GUI_ROW_HEIGHT)
 
#define CHART_SCREEN_VERTICAL_CENTRE_COMPACT   (7*MAIN_GUI_ROW_HEIGHT)
 
#define CHART_ZOOM_SPEED_FACTOR   1.05
 
#define CHART_ZOOM_SHOW_LABELS   2.0
 
#define OO_RESOLUTION_OPTION   1
 
#define CUSTOMEQUIP_EQUIPKEY   @"equipmentKey"
 
#define CUSTOMEQUIP_EQUIPNAME   @"equipmentName"
 
#define CUSTOMEQUIP_KEYACTIVATE   @"keyActivate"
 
#define CUSTOMEQUIP_KEYMODE   @"keyMode"
 
#define CUSTOMEQUIP_BUTTONACTIVATE   @"buttonActivate"
 
#define CUSTOMEQUIP_BUTTONMODE   @"buttonMode"
 
#define KEYCONFIG_CUSTOMEQUIP   @"CustomEquipActivation"
 
#define ECM_ENERGY_DRAIN_FACTOR   20.0f
 
#define ECM_DURATION   2.5f
 
#define ROLL_DAMPING_FACTOR   1.0f
 
#define PITCH_DAMPING_FACTOR   1.0f
 
#define YAW_DAMPING_FACTOR   1.0f
 
#define PLAYER_MAX_WEAPON_TEMP   256.0f
 
#define PLAYER_MAX_FUEL   70
 
#define PLAYER_MAX_MISSILES   16
 
#define PLAYER_STARTING_MAX_MISSILES   4
 
#define PLAYER_STARTING_MISSILES   3
 
#define PLAYER_DIAL_MAX_ALTITUDE   40000.0
 
#define PLAYER_SUPER_ALTITUDE2   10000000000.0
 
#define PLAYER_MAX_TRUMBLES   24
 
#define PLAYER_TARGET_MEMORY_SIZE   16
 
#define HYPERSPEED_FACTOR   [PLAYER hyperspeedFactor]
 
#define MIN_HYPERSPEED_FACTOR   32.0
 
#define MAX_HYPERSPEED_FACTOR   1024.0
 
#define PLAYER_SHIP_DESC   @"cobra3-player"
 
#define ESCAPE_SEQUENCE_TIME   10.0
 
#define FORWARD_FACING_STRING   DESC(@"forward-facing-string")
 
#define AFT_FACING_STRING   DESC(@"aft-facing-string")
 
#define PORT_FACING_STRING   DESC(@"port-facing-string")
 
#define STARBOARD_FACING_STRING   DESC(@"starboard-facing-string")
 
#define KEY_REPEAT_INTERVAL   0.20
 
#define PLAYER_SHIP_CLOCK_START   (2084004 * 86400.0)
 
#define PLAYER_SHIP_SUBENTITY_TRADE_IN_VALUE   3
 
#define CONTRACTS_GOOD_KEY   @"contracts_fulfilled"
 
#define CONTRACTS_BAD_KEY   @"contracts_expired"
 
#define CONTRACTS_UNKNOWN_KEY   @"contracts_unknown"
 
#define PASSAGE_GOOD_KEY   @"passage_fulfilled"
 
#define PASSAGE_BAD_KEY   @"passage_expired"
 
#define PASSAGE_UNKNOWN_KEY   @"passage_unknown"
 
#define PARCEL_GOOD_KEY   @"parcels_fulfilled"
 
#define PARCEL_BAD_KEY   @"parcels_expired"
 
#define PARCEL_UNKNOWN_KEY   @"parcels_unknown"
 
#define SCANNER_ZOOM_RATE_UP   2.0
 
#define SCANNER_ZOOM_RATE_DOWN   -8.0
 
#define SCANNER_ECM_FUZZINESS   1.25
 
#define PLAYER_INTERNAL_DAMAGE_FACTOR   31
 
#define PLAYER_DOCKING_AI_NAME   @"oolite-player-AI.plist"
 
#define MANIFEST_SCREEN_ROW_BACK   1
 
#define MANIFEST_SCREEN_ROW_NEXT   ([[PLAYER hud] isHidden]?27:20)
 
#define MISSION_DEST_LEGACY   @"__oolite_legacy_destinations"
 
#define PLAYER   OOGetPlayer()
 
#define KILOGRAMS_PER_POD   1000
 
#define MAX_KILOGRAMS_IN_SAFE   ((KILOGRAMS_PER_POD / 2) - 1)
 
#define GRAMS_PER_POD   (KILOGRAMS_PER_POD * 1000)
 
#define MAX_GRAMS_IN_SAFE   ((GRAMS_PER_POD / 2) - 1)
 

Typedefs

typedef uint16_t OOAlertFlags
 

Enumerations

enum  OOGUIScreenID
 
enum  OOGalacticHyperspaceBehaviour { GALACTIC_HYPERSPACE_MAX = GALACTIC_HYPERSPACE_BEHAVIOUR_FIXED_COORDINATES }
 
enum  { kOOGUIScreenIDDefault = GUI_SCREEN_MAIN , kOOGalacticHyperspaceBehaviourDefault = GALACTIC_HYPERSPACE_BEHAVIOUR_UNKNOWN }
 
enum  OOPrimedEquipmentMode { OOPRIMEDEQUIP_ACTIVATED , OOPRIMEDEQUIP_MODE }
 
enum  OOSpeechSettings { OOSPEECHSETTINGS_OFF = 0 , OOSPEECHSETTINGS_COMMS = 1 , OOSPEECHSETTINGS_ALL = 2 }
 
enum  {
  GUI_ROW_OPTIONS_QUICKSAVE , GUI_ROW_OPTIONS_SAVE , GUI_ROW_OPTIONS_LOAD , GUI_ROW_OPTIONS_SPACER1 ,
  GUI_ROW_OPTIONS_GAMEOPTIONS , GUI_ROW_OPTIONS_SPACER2 , GUI_ROW_OPTIONS_BEGIN_NEW , GUI_ROW_OPTIONS_END_OF_LIST ,
  STATUS_EQUIPMENT_FIRST_ROW = 10 , STATUS_EQUIPMENT_MAX_ROWS = 8 , STATUS_EQUIPMENT_BIGGUI_EXTRA_ROWS = 6 , GUI_ROW_EQUIPMENT_START = 3 ,
  GUI_MAX_ROWS_EQUIPMENT = 12 , GUI_ROW_EQUIPMENT_DETAIL = GUI_ROW_EQUIPMENT_START + GUI_MAX_ROWS_EQUIPMENT + 1 , GUI_ROW_EQUIPMENT_CASH = 1 , GUI_ROW_MARKET_KEY = 1 ,
  GUI_ROW_MARKET_START = 2 , GUI_ROW_MARKET_SCROLLUP = 4 , GUI_ROW_MARKET_SCROLLDOWN = 16 , GUI_ROW_MARKET_LAST = 18 ,
  GUI_ROW_MARKET_END = 19 , GUI_ROW_MARKET_CASH = 20 , GUI_ROW_INTERFACES_HEADING = 1 , GUI_ROW_INTERFACES_START = 3 ,
  GUI_MAX_ROWS_INTERFACES = 12 , GUI_ROW_INTERFACES_DETAIL = GUI_ROW_INTERFACES_START + GUI_MAX_ROWS_INTERFACES + 1 , GUI_ROW_NO_INTERFACES = 3 , GUI_ROW_SCENARIOS_START = 3 ,
  GUI_MAX_ROWS_SCENARIOS = 12 , GUI_ROW_SCENARIOS_DETAIL = GUI_ROW_SCENARIOS_START + GUI_MAX_ROWS_SCENARIOS + 2 , GUI_ROW_CHART_SYSTEM = 19 , GUI_ROW_CHART_SYSTEM_COMPACT = 17 ,
  GUI_ROW_PLANET_FINDER = 20
}
 
enum  {
  GUI_ROW_GAMEOPTIONS_AUTOSAVE , GUI_ROW_GAMEOPTIONS_DOCKINGCLEARANCE , GUI_ROW_GAMEOPTIONS_SPACER1 , GUI_ROW_GAMEOPTIONS_VOLUME ,
  GUI_ROW_GAMEOPTIONS_SPEECH , GUI_ROW_GAMEOPTIONS_MUSIC , GUI_ROW_GAMEOPTIONS_SPACER2 , GUI_ROW_GAMEOPTIONS_DISPLAY ,
  GUI_ROW_GAMEOPTIONS_DISPLAYSTYLE , GUI_ROW_GAMEOPTIONS_DETAIL , GUI_ROW_GAMEOPTIONS_WIREFRAMEGRAPHICS , GUI_ROW_GAMEOPTIONS_PROCEDURALLYTEXTUREDPLANETS ,
  GUI_ROW_GAMEOPTIONS_SHADEREFFECTS , GUI_ROW_GAMEOPTIONS_FOV , GUI_ROW_GAMEOPTIONS_COLORBLINDMODE , GUI_ROW_GAMEOPTIONS_SPACER_STICKMAPPER ,
  GUI_ROW_GAMEOPTIONS_STICKMAPPER , GUI_ROW_GAMEOPTIONS_KEYMAPPER , GUI_ROW_GAMEOPTIONS_SPACER3 , GUI_ROW_GAMEOPTIONS_BACK ,
  GUI_ROW_GAMEOPTIONS_END_OF_LIST
}
 
enum  { GUI_ROW_GAMEOPTIONS_HDRPAPERWHITE = GUI_ROW_GAMEOPTIONS_WIREFRAMEGRAPHICS , GUI_ROW_GAMEOPTIONS_HDRMAXBRIGHTNESS = GUI_ROW_GAMEOPTIONS_DETAIL }
 
enum  OOFuelScoopStatus { SCOOP_STATUS_NOT_INSTALLED = 0 , SCOOP_STATUS_FULL_HOLD , SCOOP_STATUS_OKAY , SCOOP_STATUS_ACTIVE }
 
enum  {
  ALERT_FLAG_DOCKED = 0x010 , ALERT_FLAG_MASS_LOCK = 0x020 , ALERT_FLAG_YELLOW_LIMIT = 0x03f , ALERT_FLAG_TEMP = 0x040 ,
  ALERT_FLAG_ALT = 0x080 , ALERT_FLAG_ENERGY = 0x100 , ALERT_FLAG_HOSTILES = 0x200
}
 
enum  OOMissileStatus { MISSILE_STATUS_SAFE , MISSILE_STATUS_ARMED , MISSILE_STATUS_TARGET_LOCKED }
 
enum  OOPlayerFleeingStatus {
  PLAYER_FLEEING_UNLIKELY = -1 , PLAYER_FLEEING_NONE = 0 , PLAYER_FLEEING_MAYBE = 1 , PLAYER_FLEEING_CARGO = 2 ,
  PLAYER_FLEEING_LIKELY = 3
}
 
enum  OOMarketFilterMode {
  MARKET_FILTER_MODE_OFF = 0 , MARKET_FILTER_MODE_TRADE = 1 , MARKET_FILTER_MODE_HOLD = 2 , MARKET_FILTER_MODE_STOCK = 3 ,
  MARKET_FILTER_MODE_LEGAL = 4 , MARKET_FILTER_MODE_RESTRICTED = 5 , MARKET_FILTER_MODE_MAX = 5
}
 
enum  OOMarketSorterMode {
  MARKET_SORTER_MODE_OFF = 0 , MARKET_SORTER_MODE_ALPHA = 1 , MARKET_SORTER_MODE_PRICE = 2 , MARKET_SORTER_MODE_STOCK = 3 ,
  MARKET_SORTER_MODE_HOLD = 4 , MARKET_SORTER_MODE_UNIT = 5 , MARKET_SORTER_MODE_MAX = 5
}
 

Functions

OOINLINE PlayerEntityOOGetPlayer (void) INLINE_CONST_FUNC
 
NSString * OODisplayRatingStringFromKillCount (unsigned kills)
 
NSString * KillCountToRatingAndKillString (unsigned kills)
 
NSString * OODisplayStringFromLegalStatus (int legalStatus)
 
NSString * OOStringFromGUIScreenID (OOGUIScreenID screen) CONST_FUNC
 
OOGUIScreenID OOGUIScreenIDFromString (NSString *string) PURE_FUNC
 
OOGalacticHyperspaceBehaviour OOGalacticHyperspaceBehaviourFromString (NSString *string) PURE_FUNC
 
NSString * OOStringFromGalacticHyperspaceBehaviour (OOGalacticHyperspaceBehaviour behaviour) CONST_FUNC
 

Macro Definition Documentation

◆ AFT_FACING_STRING

#define AFT_FACING_STRING   DESC(@"aft-facing-string")

Definition at line 332 of file PlayerEntity.h.

◆ ALLOW_CUSTOM_VIEWS_WHILE_PAUSED

#define ALLOW_CUSTOM_VIEWS_WHILE_PAUSED   1

Definition at line 42 of file PlayerEntity.h.

◆ CHART_CLIP_BORDER

#define CHART_CLIP_BORDER   10.0

Definition at line 106 of file PlayerEntity.h.

◆ CHART_HEIGHT_AT_MAX_ZOOM

#define CHART_HEIGHT_AT_MAX_ZOOM   64.0

Definition at line 100 of file PlayerEntity.h.

◆ CHART_MAX_ZOOM

#define CHART_MAX_ZOOM   (256.0/CHART_WIDTH_AT_MAX_ZOOM)

Definition at line 102 of file PlayerEntity.h.

Referenced by MissionRunScreen().

◆ CHART_SCREEN_VERTICAL_CENTRE

#define CHART_SCREEN_VERTICAL_CENTRE   (10*MAIN_GUI_ROW_HEIGHT)

Definition at line 107 of file PlayerEntity.h.

◆ CHART_SCREEN_VERTICAL_CENTRE_COMPACT

#define CHART_SCREEN_VERTICAL_CENTRE_COMPACT   (7*MAIN_GUI_ROW_HEIGHT)

Definition at line 108 of file PlayerEntity.h.

◆ CHART_SCROLL_AT_X

#define CHART_SCROLL_AT_X   25.0

Definition at line 104 of file PlayerEntity.h.

◆ CHART_SCROLL_AT_Y

#define CHART_SCROLL_AT_Y   31.0

Definition at line 105 of file PlayerEntity.h.

◆ CHART_WIDTH_AT_MAX_ZOOM

#define CHART_WIDTH_AT_MAX_ZOOM   64.0

Definition at line 99 of file PlayerEntity.h.

◆ CHART_ZOOM_SHOW_LABELS

#define CHART_ZOOM_SHOW_LABELS   2.0

Definition at line 111 of file PlayerEntity.h.

◆ CHART_ZOOM_SPEED_FACTOR

#define CHART_ZOOM_SPEED_FACTOR   1.05

Definition at line 109 of file PlayerEntity.h.

◆ CONTRACTS_BAD_KEY

#define CONTRACTS_BAD_KEY   @"contracts_expired"

Definition at line 343 of file PlayerEntity.h.

◆ CONTRACTS_GOOD_KEY

#define CONTRACTS_GOOD_KEY   @"contracts_fulfilled"

Definition at line 342 of file PlayerEntity.h.

◆ CONTRACTS_UNKNOWN_KEY

#define CONTRACTS_UNKNOWN_KEY   @"contracts_unknown"

Definition at line 344 of file PlayerEntity.h.

◆ CUSTOM_VIEW_MAX_ZOOM_IN

#define CUSTOM_VIEW_MAX_ZOOM_IN   1.5

Definition at line 54 of file PlayerEntity.h.

◆ CUSTOM_VIEW_MAX_ZOOM_OUT

#define CUSTOM_VIEW_MAX_ZOOM_OUT   25

Definition at line 55 of file PlayerEntity.h.

◆ CUSTOMEQUIP_BUTTONACTIVATE

#define CUSTOMEQUIP_BUTTONACTIVATE   @"buttonActivate"

Definition at line 125 of file PlayerEntity.h.

◆ CUSTOMEQUIP_BUTTONMODE

#define CUSTOMEQUIP_BUTTONMODE   @"buttonMode"

Definition at line 126 of file PlayerEntity.h.

◆ CUSTOMEQUIP_EQUIPKEY

#define CUSTOMEQUIP_EQUIPKEY   @"equipmentKey"

Definition at line 121 of file PlayerEntity.h.

◆ CUSTOMEQUIP_EQUIPNAME

#define CUSTOMEQUIP_EQUIPNAME   @"equipmentName"

Definition at line 122 of file PlayerEntity.h.

◆ CUSTOMEQUIP_KEYACTIVATE

#define CUSTOMEQUIP_KEYACTIVATE   @"keyActivate"

Definition at line 123 of file PlayerEntity.h.

◆ CUSTOMEQUIP_KEYMODE

#define CUSTOMEQUIP_KEYMODE   @"keyMode"

Definition at line 124 of file PlayerEntity.h.

◆ ECM_DURATION

#define ECM_DURATION   2.5f

Definition at line 296 of file PlayerEntity.h.

◆ ECM_ENERGY_DRAIN_FACTOR

#define ECM_ENERGY_DRAIN_FACTOR   20.0f

Definition at line 295 of file PlayerEntity.h.

◆ ENTRY

#define ENTRY ( label,
value )
Value:
label,

Definition at line 57 of file PlayerEntity.h.

◆ ESCAPE_SEQUENCE_TIME

#define ESCAPE_SEQUENCE_TIME   10.0

Definition at line 329 of file PlayerEntity.h.

◆ FORWARD_FACING_STRING

#define FORWARD_FACING_STRING   DESC(@"forward-facing-string")

Definition at line 331 of file PlayerEntity.h.

◆ GALACTIC_HYPERSPACE_ENTRY

#define GALACTIC_HYPERSPACE_ENTRY ( label,
value )
Value:
GALACTIC_HYPERSPACE_##label = value,

Definition at line 64 of file PlayerEntity.h.

◆ GRAMS_PER_POD

#define GRAMS_PER_POD   (KILOGRAMS_PER_POD * 1000)

Definition at line 1334 of file PlayerEntity.h.

◆ GUI_FIRST_ROW

#define GUI_FIRST_ROW ( GROUP)
Value:
((GUI_DEFAULT_ROWS - GUI_ROW_##GROUP##OPTIONS_END_OF_LIST) / 2)
#define GUI_DEFAULT_ROWS

Definition at line 50 of file PlayerEntity.h.

◆ GUI_ROW

#define GUI_ROW ( GROUP,
ITEM )
Value:
(GUI_FIRST_ROW(GROUP) - 4 + GUI_ROW_##GROUP##OPTIONS_##ITEM)
#define GUI_FIRST_ROW(GROUP)

Definition at line 52 of file PlayerEntity.h.

◆ GUI_ROW_INIT

#define GUI_ROW_INIT ( GUI)
Value:
/*int n_rows = [(GUI) rows]*/

Definition at line 49 of file PlayerEntity.h.

◆ HYPERSPEED_FACTOR

#define HYPERSPEED_FACTOR   [PLAYER hyperspeedFactor]

Definition at line 320 of file PlayerEntity.h.

Referenced by ShipSetProperty().

◆ KEY_REPEAT_INTERVAL

#define KEY_REPEAT_INTERVAL   0.20

Definition at line 336 of file PlayerEntity.h.

◆ KEYCONFIG_CUSTOMEQUIP

#define KEYCONFIG_CUSTOMEQUIP   @"CustomEquipActivation"

Definition at line 127 of file PlayerEntity.h.

◆ KILOGRAMS_PER_POD

#define KILOGRAMS_PER_POD   1000

Definition at line 1332 of file PlayerEntity.h.

◆ MANIFEST_SCREEN_ROW_BACK

#define MANIFEST_SCREEN_ROW_BACK   1

Definition at line 361 of file PlayerEntity.h.

◆ MANIFEST_SCREEN_ROW_NEXT

#define MANIFEST_SCREEN_ROW_NEXT   ([[PLAYER hud] isHidden]?27:20)

Definition at line 362 of file PlayerEntity.h.

◆ MAX_GRAMS_IN_SAFE

#define MAX_GRAMS_IN_SAFE   ((GRAMS_PER_POD / 2) - 1)

Definition at line 1335 of file PlayerEntity.h.

◆ MAX_HYPERSPEED_FACTOR

#define MAX_HYPERSPEED_FACTOR   1024.0

Definition at line 322 of file PlayerEntity.h.

◆ MAX_KILOGRAMS_IN_SAFE

#define MAX_KILOGRAMS_IN_SAFE   ((KILOGRAMS_PER_POD / 2) - 1)

Definition at line 1333 of file PlayerEntity.h.

◆ MIN_HYPERSPEED_FACTOR

#define MIN_HYPERSPEED_FACTOR   32.0

Definition at line 321 of file PlayerEntity.h.

Referenced by ShipSetProperty().

◆ MISSION_DEST_LEGACY

#define MISSION_DEST_LEGACY   @"__oolite_legacy_destinations"

Definition at line 364 of file PlayerEntity.h.

◆ OO_RESOLUTION_OPTION

#define OO_RESOLUTION_OPTION   1

Definition at line 117 of file PlayerEntity.h.

◆ OO_VARIABLE_TORUS_SPEED

#define OO_VARIABLE_TORUS_SPEED   1

Definition at line 46 of file PlayerEntity.h.

◆ PARCEL_BAD_KEY

#define PARCEL_BAD_KEY   @"parcels_expired"

Definition at line 349 of file PlayerEntity.h.

◆ PARCEL_GOOD_KEY

#define PARCEL_GOOD_KEY   @"parcels_fulfilled"

Definition at line 348 of file PlayerEntity.h.

◆ PARCEL_UNKNOWN_KEY

#define PARCEL_UNKNOWN_KEY   @"parcels_unknown"

Definition at line 350 of file PlayerEntity.h.

◆ PASSAGE_BAD_KEY

#define PASSAGE_BAD_KEY   @"passage_expired"

Definition at line 346 of file PlayerEntity.h.

◆ PASSAGE_GOOD_KEY

#define PASSAGE_GOOD_KEY   @"passage_fulfilled"

Definition at line 345 of file PlayerEntity.h.

◆ PASSAGE_UNKNOWN_KEY

#define PASSAGE_UNKNOWN_KEY   @"passage_unknown"

Definition at line 347 of file PlayerEntity.h.

◆ PITCH_DAMPING_FACTOR

#define PITCH_DAMPING_FACTOR   1.0f

Definition at line 299 of file PlayerEntity.h.

◆ PLAYER

◆ PLAYER_DIAL_MAX_ALTITUDE

#define PLAYER_DIAL_MAX_ALTITUDE   40000.0

Definition at line 312 of file PlayerEntity.h.

◆ PLAYER_DOCKING_AI_NAME

#define PLAYER_DOCKING_AI_NAME   @"oolite-player-AI.plist"

Definition at line 359 of file PlayerEntity.h.

◆ PLAYER_INTERNAL_DAMAGE_FACTOR

#define PLAYER_INTERNAL_DAMAGE_FACTOR   31

Definition at line 357 of file PlayerEntity.h.

◆ PLAYER_MAX_FUEL

#define PLAYER_MAX_FUEL   70

Definition at line 307 of file PlayerEntity.h.

Referenced by EquipmentInfoGetProperty().

◆ PLAYER_MAX_MISSILES

#define PLAYER_MAX_MISSILES   16

Definition at line 309 of file PlayerEntity.h.

◆ PLAYER_MAX_TRUMBLES

#define PLAYER_MAX_TRUMBLES   24

Definition at line 315 of file PlayerEntity.h.

◆ PLAYER_MAX_WEAPON_TEMP

#define PLAYER_MAX_WEAPON_TEMP   256.0f

Definition at line 302 of file PlayerEntity.h.

◆ PLAYER_SHIP_CLOCK_START

#define PLAYER_SHIP_CLOCK_START   (2084004 * 86400.0)

Definition at line 338 of file PlayerEntity.h.

◆ PLAYER_SHIP_DESC

#define PLAYER_SHIP_DESC   @"cobra3-player"

Definition at line 327 of file PlayerEntity.h.

◆ PLAYER_SHIP_SUBENTITY_TRADE_IN_VALUE

#define PLAYER_SHIP_SUBENTITY_TRADE_IN_VALUE   3

Definition at line 340 of file PlayerEntity.h.

Referenced by ShipRestoreSubEntities().

◆ PLAYER_STARTING_MAX_MISSILES

#define PLAYER_STARTING_MAX_MISSILES   4

Definition at line 310 of file PlayerEntity.h.

◆ PLAYER_STARTING_MISSILES

#define PLAYER_STARTING_MISSILES   3

Definition at line 311 of file PlayerEntity.h.

◆ PLAYER_SUPER_ALTITUDE2

#define PLAYER_SUPER_ALTITUDE2   10000000000.0

Definition at line 313 of file PlayerEntity.h.

◆ PLAYER_TARGET_MEMORY_SIZE

#define PLAYER_TARGET_MEMORY_SIZE   16

Definition at line 317 of file PlayerEntity.h.

◆ PORT_FACING_STRING

#define PORT_FACING_STRING   DESC(@"port-facing-string")

Definition at line 333 of file PlayerEntity.h.

◆ ROLL_DAMPING_FACTOR

#define ROLL_DAMPING_FACTOR   1.0f

Definition at line 298 of file PlayerEntity.h.

◆ SCANNER_ECM_FUZZINESS

#define SCANNER_ECM_FUZZINESS   1.25

Definition at line 355 of file PlayerEntity.h.

◆ SCANNER_ZOOM_RATE_DOWN

#define SCANNER_ZOOM_RATE_DOWN   -8.0

Definition at line 354 of file PlayerEntity.h.

◆ SCANNER_ZOOM_RATE_UP

#define SCANNER_ZOOM_RATE_UP   2.0

Definition at line 353 of file PlayerEntity.h.

◆ SCRIPT_TIMER_INTERVAL

#define SCRIPT_TIMER_INTERVAL   10.0

Definition at line 43 of file PlayerEntity.h.

◆ STARBOARD_FACING_STRING

#define STARBOARD_FACING_STRING   DESC(@"starboard-facing-string")

Definition at line 334 of file PlayerEntity.h.

◆ YAW_DAMPING_FACTOR

#define YAW_DAMPING_FACTOR   1.0f

Definition at line 300 of file PlayerEntity.h.

Typedef Documentation

◆ OOAlertFlags

typedef uint16_t OOAlertFlags

Definition at line 246 of file PlayerEntity.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
kOOGUIScreenIDDefault 
kOOGalacticHyperspaceBehaviourDefault 

Definition at line 77 of file PlayerEntity.h.

78{
79 // Values used for unknown strings.
80 kOOGUIScreenIDDefault = GUI_SCREEN_MAIN,
81 kOOGalacticHyperspaceBehaviourDefault = GALACTIC_HYPERSPACE_BEHAVIOUR_UNKNOWN
82};
@ kOOGUIScreenIDDefault
@ kOOGalacticHyperspaceBehaviourDefault

◆ anonymous enum

anonymous enum
Enumerator
GUI_ROW_OPTIONS_QUICKSAVE 
GUI_ROW_OPTIONS_SAVE 
GUI_ROW_OPTIONS_LOAD 
GUI_ROW_OPTIONS_SPACER1 
GUI_ROW_OPTIONS_GAMEOPTIONS 
GUI_ROW_OPTIONS_SPACER2 
GUI_ROW_OPTIONS_BEGIN_NEW 
GUI_ROW_OPTIONS_END_OF_LIST 
STATUS_EQUIPMENT_FIRST_ROW 
STATUS_EQUIPMENT_MAX_ROWS 
STATUS_EQUIPMENT_BIGGUI_EXTRA_ROWS 
GUI_ROW_EQUIPMENT_START 
GUI_MAX_ROWS_EQUIPMENT 
GUI_ROW_EQUIPMENT_DETAIL 
GUI_ROW_EQUIPMENT_CASH 
GUI_ROW_MARKET_KEY 
GUI_ROW_MARKET_START 
GUI_ROW_MARKET_SCROLLUP 
GUI_ROW_MARKET_SCROLLDOWN 
GUI_ROW_MARKET_LAST 
GUI_ROW_MARKET_END 
GUI_ROW_MARKET_CASH 
GUI_ROW_INTERFACES_HEADING 
GUI_ROW_INTERFACES_START 
GUI_MAX_ROWS_INTERFACES 
GUI_ROW_INTERFACES_DETAIL 
GUI_ROW_NO_INTERFACES 
GUI_ROW_SCENARIOS_START 
GUI_MAX_ROWS_SCENARIOS 
GUI_ROW_SCENARIOS_DETAIL 
GUI_ROW_CHART_SYSTEM 
GUI_ROW_CHART_SYSTEM_COMPACT 
GUI_ROW_PLANET_FINDER 

Definition at line 129 of file PlayerEntity.h.

130{
138#if OOLITE_SDL
139 GUI_ROW_OPTIONS_SPACER3,
140 GUI_ROW_OPTIONS_QUIT,
141#endif
143
147
170};
@ GUI_ROW_MARKET_SCROLLUP
@ GUI_ROW_OPTIONS_QUICKSAVE
@ STATUS_EQUIPMENT_FIRST_ROW
@ GUI_ROW_EQUIPMENT_CASH
@ GUI_ROW_OPTIONS_SAVE
@ GUI_ROW_MARKET_CASH
@ GUI_ROW_OPTIONS_END_OF_LIST
@ GUI_ROW_OPTIONS_LOAD
@ GUI_ROW_OPTIONS_BEGIN_NEW
@ GUI_ROW_SCENARIOS_START
@ GUI_ROW_OPTIONS_SPACER2
@ GUI_ROW_CHART_SYSTEM_COMPACT
@ GUI_ROW_EQUIPMENT_DETAIL
@ GUI_ROW_MARKET_KEY
@ GUI_ROW_OPTIONS_SPACER1
@ STATUS_EQUIPMENT_MAX_ROWS
@ GUI_ROW_SCENARIOS_DETAIL
@ GUI_MAX_ROWS_SCENARIOS
@ GUI_ROW_MARKET_SCROLLDOWN
@ GUI_MAX_ROWS_EQUIPMENT
@ GUI_ROW_NO_INTERFACES
@ GUI_ROW_EQUIPMENT_START
@ GUI_ROW_MARKET_START
@ GUI_ROW_MARKET_END
@ GUI_ROW_CHART_SYSTEM
@ GUI_ROW_INTERFACES_DETAIL
@ GUI_ROW_INTERFACES_HEADING
@ GUI_ROW_MARKET_LAST
@ STATUS_EQUIPMENT_BIGGUI_EXTRA_ROWS
@ GUI_ROW_PLANET_FINDER
@ GUI_ROW_INTERFACES_START
@ GUI_MAX_ROWS_INTERFACES
@ GUI_ROW_OPTIONS_GAMEOPTIONS

◆ anonymous enum

anonymous enum
Enumerator
GUI_ROW_GAMEOPTIONS_AUTOSAVE 
GUI_ROW_GAMEOPTIONS_DOCKINGCLEARANCE 
GUI_ROW_GAMEOPTIONS_SPACER1 
GUI_ROW_GAMEOPTIONS_VOLUME 
GUI_ROW_GAMEOPTIONS_SPEECH 
GUI_ROW_GAMEOPTIONS_MUSIC 
GUI_ROW_GAMEOPTIONS_SPACER2 
GUI_ROW_GAMEOPTIONS_DISPLAY 
GUI_ROW_GAMEOPTIONS_DISPLAYSTYLE 
GUI_ROW_GAMEOPTIONS_DETAIL 
GUI_ROW_GAMEOPTIONS_WIREFRAMEGRAPHICS 
GUI_ROW_GAMEOPTIONS_PROCEDURALLYTEXTUREDPLANETS 
GUI_ROW_GAMEOPTIONS_SHADEREFFECTS 
GUI_ROW_GAMEOPTIONS_FOV 
GUI_ROW_GAMEOPTIONS_COLORBLINDMODE 
GUI_ROW_GAMEOPTIONS_SPACER_STICKMAPPER 
GUI_ROW_GAMEOPTIONS_STICKMAPPER 
GUI_ROW_GAMEOPTIONS_KEYMAPPER 
GUI_ROW_GAMEOPTIONS_SPACER3 
GUI_ROW_GAMEOPTIONS_BACK 
GUI_ROW_GAMEOPTIONS_END_OF_LIST 

Definition at line 176 of file PlayerEntity.h.

177{
182#if OOLITE_SPEECH_SYNTH
184#if !OOLITE_MAC_OS_X
185 // FIXME: should have voice option for OS X
186 GUI_ROW_GAMEOPTIONS_SPEECH_LANGUAGE,
187 GUI_ROW_GAMEOPTIONS_SPEECH_GENDER,
188#endif
189#endif
191#if OO_RESOLUTION_OPTION
194#endif
198#if !NEW_PLANETS
200#endif
202#if OOLITE_SDL
203 GUI_ROW_GAMEOPTIONS_GAMMA,
204#endif
212
214};
@ GUI_ROW_GAMEOPTIONS_SPACER3
@ GUI_ROW_GAMEOPTIONS_SPACER1
@ GUI_ROW_GAMEOPTIONS_SPACER2
@ GUI_ROW_GAMEOPTIONS_AUTOSAVE
@ GUI_ROW_GAMEOPTIONS_FOV
@ GUI_ROW_GAMEOPTIONS_KEYMAPPER
@ GUI_ROW_GAMEOPTIONS_WIREFRAMEGRAPHICS
@ GUI_ROW_GAMEOPTIONS_COLORBLINDMODE
@ GUI_ROW_GAMEOPTIONS_SPEECH
@ GUI_ROW_GAMEOPTIONS_DISPLAY
@ GUI_ROW_GAMEOPTIONS_BACK
@ GUI_ROW_GAMEOPTIONS_SHADEREFFECTS
@ GUI_ROW_GAMEOPTIONS_MUSIC
@ GUI_ROW_GAMEOPTIONS_SPACER_STICKMAPPER
@ GUI_ROW_GAMEOPTIONS_PROCEDURALLYTEXTUREDPLANETS
@ GUI_ROW_GAMEOPTIONS_VOLUME
@ GUI_ROW_GAMEOPTIONS_STICKMAPPER
@ GUI_ROW_GAMEOPTIONS_DETAIL
@ GUI_ROW_GAMEOPTIONS_END_OF_LIST
@ GUI_ROW_GAMEOPTIONS_DOCKINGCLEARANCE
@ GUI_ROW_GAMEOPTIONS_DISPLAYSTYLE

◆ anonymous enum

anonymous enum
Enumerator
GUI_ROW_GAMEOPTIONS_HDRPAPERWHITE 
GUI_ROW_GAMEOPTIONS_HDRMAXBRIGHTNESS 

Definition at line 219 of file PlayerEntity.h.

◆ anonymous enum

anonymous enum
Enumerator
ALERT_FLAG_DOCKED 
ALERT_FLAG_MASS_LOCK 
ALERT_FLAG_YELLOW_LIMIT 
ALERT_FLAG_TEMP 
ALERT_FLAG_ALT 
ALERT_FLAG_ENERGY 
ALERT_FLAG_HOSTILES 

Definition at line 236 of file PlayerEntity.h.

237{
238 ALERT_FLAG_DOCKED = 0x010,
239 ALERT_FLAG_MASS_LOCK = 0x020,
241 ALERT_FLAG_TEMP = 0x040,
242 ALERT_FLAG_ALT = 0x080,
243 ALERT_FLAG_ENERGY = 0x100,
244 ALERT_FLAG_HOSTILES = 0x200
245};
@ ALERT_FLAG_TEMP
@ ALERT_FLAG_ENERGY
@ ALERT_FLAG_HOSTILES
@ ALERT_FLAG_DOCKED
@ ALERT_FLAG_MASS_LOCK
@ ALERT_FLAG_YELLOW_LIMIT
@ ALERT_FLAG_ALT

◆ OOFuelScoopStatus

Enumerator
SCOOP_STATUS_NOT_INSTALLED 
SCOOP_STATUS_FULL_HOLD 
SCOOP_STATUS_OKAY 
SCOOP_STATUS_ACTIVE 

Definition at line 226 of file PlayerEntity.h.

227{
228 // Exposed to shaders.
OOFuelScoopStatus
@ SCOOP_STATUS_FULL_HOLD
@ SCOOP_STATUS_NOT_INSTALLED
@ SCOOP_STATUS_ACTIVE
@ SCOOP_STATUS_OKAY

◆ OOGalacticHyperspaceBehaviour

Enumerator
GALACTIC_HYPERSPACE_MAX 

Definition at line 66 of file PlayerEntity.h.

67{
68 #include "OOGalacticHyperspaceBehaviour.tbl"
69
70 GALACTIC_HYPERSPACE_MAX = GALACTIC_HYPERSPACE_BEHAVIOUR_FIXED_COORDINATES
OOGalacticHyperspaceBehaviour
@ GALACTIC_HYPERSPACE_MAX

◆ OOGUIScreenID

Definition at line 59 of file PlayerEntity.h.

60{
61 #include "OOGUIScreenID.tbl"
OOGUIScreenID

◆ OOMarketFilterMode

Enumerator
MARKET_FILTER_MODE_OFF 
MARKET_FILTER_MODE_TRADE 
MARKET_FILTER_MODE_HOLD 
MARKET_FILTER_MODE_STOCK 
MARKET_FILTER_MODE_LEGAL 
MARKET_FILTER_MODE_RESTRICTED 
MARKET_FILTER_MODE_MAX 

Definition at line 268 of file PlayerEntity.h.

269{
275 MARKET_FILTER_MODE_RESTRICTED = 5, // import or export
276
277
278 MARKET_FILTER_MODE_MAX = 5 // always equal to highest real mode
OOMarketFilterMode
@ MARKET_FILTER_MODE_HOLD
@ MARKET_FILTER_MODE_RESTRICTED
@ MARKET_FILTER_MODE_MAX
@ MARKET_FILTER_MODE_STOCK
@ MARKET_FILTER_MODE_TRADE
@ MARKET_FILTER_MODE_OFF
@ MARKET_FILTER_MODE_LEGAL

◆ OOMarketSorterMode

Enumerator
MARKET_SORTER_MODE_OFF 
MARKET_SORTER_MODE_ALPHA 
MARKET_SORTER_MODE_PRICE 
MARKET_SORTER_MODE_STOCK 
MARKET_SORTER_MODE_HOLD 
MARKET_SORTER_MODE_UNIT 
MARKET_SORTER_MODE_MAX 

Definition at line 282 of file PlayerEntity.h.

283{
290
291 MARKET_SORTER_MODE_MAX = 5 // always equal to highest real mode
OOMarketSorterMode
@ MARKET_SORTER_MODE_PRICE
@ MARKET_SORTER_MODE_OFF
@ MARKET_SORTER_MODE_STOCK
@ MARKET_SORTER_MODE_ALPHA
@ MARKET_SORTER_MODE_MAX
@ MARKET_SORTER_MODE_UNIT
@ MARKET_SORTER_MODE_HOLD

◆ OOMissileStatus

Enumerator
MISSILE_STATUS_SAFE 
MISSILE_STATUS_ARMED 
MISSILE_STATUS_TARGET_LOCKED 

Definition at line 249 of file PlayerEntity.h.

250{
251 // Exposed to shaders.
OOMissileStatus
@ MISSILE_STATUS_TARGET_LOCKED
@ MISSILE_STATUS_ARMED
@ MISSILE_STATUS_SAFE

◆ OOPlayerFleeingStatus

Enumerator
PLAYER_FLEEING_UNLIKELY 
PLAYER_FLEEING_NONE 
PLAYER_FLEEING_MAYBE 
PLAYER_FLEEING_CARGO 
PLAYER_FLEEING_LIKELY 

Definition at line 258 of file PlayerEntity.h.

259{
OOPlayerFleeingStatus
@ PLAYER_FLEEING_MAYBE
@ PLAYER_FLEEING_LIKELY
@ PLAYER_FLEEING_NONE
@ PLAYER_FLEEING_CARGO
@ PLAYER_FLEEING_UNLIKELY

◆ OOPrimedEquipmentMode

Enumerator
OOPRIMEDEQUIP_ACTIVATED 
OOPRIMEDEQUIP_MODE 

Definition at line 84 of file PlayerEntity.h.

85{
OOPrimedEquipmentMode
@ OOPRIMEDEQUIP_ACTIVATED
@ OOPRIMEDEQUIP_MODE

◆ OOSpeechSettings

Enumerator
OOSPEECHSETTINGS_OFF 
OOSPEECHSETTINGS_COMMS 
OOSPEECHSETTINGS_ALL 

Definition at line 90 of file PlayerEntity.h.

91{
OOSpeechSettings
@ OOSPEECHSETTINGS_ALL
@ OOSPEECHSETTINGS_OFF
@ OOSPEECHSETTINGS_COMMS

Function Documentation

◆ KillCountToRatingAndKillString()

NSString * KillCountToRatingAndKillString ( unsigned kills)

Definition at line 432 of file OOConstToString.m.

433{
434 return [NSString stringWithFormat:@"%@ (%u)", OODisplayRatingStringFromKillCount(kills), kills];
435}
NSString * OODisplayRatingStringFromKillCount(unsigned kills)

◆ OODisplayRatingStringFromKillCount()

NSString * OODisplayRatingStringFromKillCount ( unsigned kills)

Definition at line 404 of file OOConstToString.m.

405{
406 enum { kRatingCount = 9 };
407
408 NSArray *ratingNames = nil;
409 const unsigned killThresholds[kRatingCount - 1] =
410 {
411 0x0008,
412 0x0010,
413 0x0020,
414 0x0040,
415 0x0080,
416 0x0200,
417 0x0A00,
418 0x1900
419 };
420 unsigned i;
421
422 ratingNames = [[UNIVERSE descriptions] oo_arrayForKey:@"rating"];
423 for (i = 0; i < kRatingCount - 1; ++i)
424 {
425 if (kills < killThresholds[i]) return [ratingNames oo_stringAtIndex:i];
426 }
427
428 return [ratingNames oo_stringAtIndex:kRatingCount - 1];
429}
return nil
#define UNIVERSE
Definition Universe.h:833

References nil.

Referenced by PlayerGetProperty().

+ Here is the caller graph for this function:

◆ OODisplayStringFromLegalStatus()

NSString * OODisplayStringFromLegalStatus ( int legalStatus)

Definition at line 438 of file OOConstToString.m.

439{
440 enum { kStatusCount = 3 };
441
442 NSArray *statusNames = nil;
443 const int statusThresholds[kStatusCount - 1] =
444 {
445 1,
446 51
447 };
448 unsigned i;
449
450 statusNames = [[UNIVERSE descriptions] oo_arrayForKey:@"legal_status"];
451 for (i = 0; i != kStatusCount - 1; ++i)
452 {
453 if (legalStatus < statusThresholds[i]) return [statusNames oo_stringAtIndex:i];
454 }
455
456 return [statusNames oo_stringAtIndex:kStatusCount - 1];
457}

References nil.

Referenced by PlayerGetProperty().

+ Here is the caller graph for this function:

◆ OOGalacticHyperspaceBehaviourFromString()

OOGalacticHyperspaceBehaviour OOGalacticHyperspaceBehaviourFromString ( NSString * string)

Definition at line 159 of file OOConstToString.m.

160{
161 #include "OOGalacticHyperspaceBehaviour.tbl"
162
163 // Transparently (but inefficiently) support american spelling. FIXME: remove in EMMSTRAN.
164 if ([string hasPrefix:@"BEHAVIOR_"])
165 {
166 string = [string substringFromIndex:[@"BEHAVIOR_" length]];
167 string = [@"BEHAVIOUR_" stringByAppendingString:string];
169 }
170
172}
OOGalacticHyperspaceBehaviour OOGalacticHyperspaceBehaviourFromString(NSString *string)

References kOOGalacticHyperspaceBehaviourDefault, and OOGalacticHyperspaceBehaviourFromString().

Referenced by OOGalacticHyperspaceBehaviourFromString().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ OOGetPlayer()

OOINLINE PlayerEntity * OOGetPlayer ( void )

Definition at line 1322 of file PlayerEntity.h.

1323{
1324 extern PlayerEntity *gOOPlayer;
1325#if OO_DEBUG
1326 NSCAssert(gOOPlayer != nil, @"PLAYER used when [PlayerEntity sharedPlayer] has not been called.");
1327#endif
1328 return gOOPlayer;
1329}
PlayerEntity * gOOPlayer

References gOOPlayer, and nil.

◆ OOGUIScreenIDFromString()

OOGUIScreenID OOGUIScreenIDFromString ( NSString * string)

Definition at line 175 of file OOConstToString.m.

176{
177 #include "OOGUIScreenID.tbl"
178
180}

References kOOGUIScreenIDDefault.

◆ OOStringFromGalacticHyperspaceBehaviour()

NSString * OOStringFromGalacticHyperspaceBehaviour ( OOGalacticHyperspaceBehaviour behaviour)

Definition at line 82 of file OOConstToString.m.

83{
84 switch (value)
85 {
86 #include "OOGalacticHyperspaceBehaviour.tbl"
87 }
88
89 return @"UNDEFINED";
90}

◆ OOStringFromGUIScreenID()

NSString * OOStringFromGUIScreenID ( OOGUIScreenID screen)

Definition at line 93 of file OOConstToString.m.

94{
95 switch (value)
96 {
97 #include "OOGUIScreenID.tbl"
98 }
99
100 return @"UNDEFINED";
101}