LCOV - code coverage report
Current view: top level - Core - OOTypes.h (source / functions) Hit Total Coverage
Test: coverxygen.info Lines: 0 38 0.0 %
Date: 2025-05-28 07:50:54 Functions: 0 0 -

          Line data    Source code
       1           0 : /*
       2             : 
       3             : OOTypes.h
       4             : 
       5             : Various simple types that don't require us to pull in the associated class
       6             : headers.
       7             : 
       8             : Oolite
       9             : Copyright (C) 2004-2013 Giles C Williams and contributors
      10             : 
      11             : This program is free software; you can redistribute it and/or
      12             : modify it under the terms of the GNU General Public License
      13             : as published by the Free Software Foundation; either version 2
      14             : of the License, or (at your option) any later version.
      15             : 
      16             : This program is distributed in the hope that it will be useful,
      17             : but WITHOUT ANY WARRANTY; without even the implied warranty of
      18             : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19             : GNU General Public License for more details.
      20             : 
      21             : You should have received a copy of the GNU General Public License
      22             : along with this program; if not, write to the Free Software
      23             : Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
      24             : MA 02110-1301, USA.
      25             : 
      26             : */
      27             : 
      28             : #include "OOFunctionAttributes.h"
      29             : #include "OOCocoa.h"
      30             : 
      31             : 
      32           0 : typedef enum
      33             : {
      34             :         OPTIMIZED_BY_NONE,
      35             :         OPTIMIZED_BY_JUMPS,
      36             :         OPTIMIZED_BY_TIME
      37             : } OORouteType;
      38             : 
      39             : 
      40           0 : #define ENTRY(label, value) label,
      41             : 
      42           0 : typedef enum
      43             : {
      44             :         #include "OOViewID.tbl"
      45             :                 
      46             :         kOOViewIDDefault = VIEW_NONE
      47             : } OOViewID;
      48             : 
      49           0 : typedef enum
      50             : {
      51             :         #include "OOLongRangeChartMode.tbl"
      52             : 
      53             :         kOOLongRangeChartModeDefault = OOLRC_MODE_UNKNOWN
      54             : } OOLongRangeChartMode;
      55             : 
      56             : #undef ENTRY
      57             : 
      58             : 
      59           0 : typedef enum
      60             : {
      61             :         AEGIS_NONE,
      62             :         AEGIS_CLOSE_TO_ANY_PLANET,
      63             :         AEGIS_CLOSE_TO_MAIN_PLANET,
      64             :         AEGIS_IN_DOCKING_RANGE
      65             : } OOAegisStatus;
      66             : 
      67             : 
      68           0 : typedef enum
      69             : {
      70             :         CARGO_NOT_CARGO                                 = -1,
      71             :         CARGO_SLAVES                                    = 3,
      72             :         CARGO_ALLOY                                             = 9,
      73             :         CARGO_MINERALS                                  = 12,
      74             :         CARGO_THARGOID                                  = 16,
      75             :         CARGO_RANDOM                                    = 100,
      76             :         CARGO_SCRIPTED_ITEM                             = 200,
      77             :         CARGO_CHARACTER                                 = 300
      78             : } OOCargoType;
      79             : 
      80             : /*
      81             : enum
      82             : {
      83             :         COMMODITY_UNDEFINED             = -1,
      84             :         
      85             :         // FIXME: hard-coded commodity types are used in OOJSManifest. Everything else is data-driven.
      86             :         COMMODITY_FOOD,         //      =  0 
      87             :         COMMODITY_TEXTILES,
      88             :         COMMODITY_RADIOACTIVES,
      89             :         COMMODITY_SLAVES,
      90             :         COMMODITY_LIQUOR_WINES,
      91             :         COMMODITY_LUXURIES,
      92             :         COMMODITY_NARCOTICS,
      93             :         COMMODITY_COMPUTERS,
      94             :         COMMODITY_MACHINERY,
      95             :         COMMODITY_ALLOYS,
      96             :         COMMODITY_FIREARMS,
      97             :         COMMODITY_FURS,
      98             :         COMMODITY_MINERALS,
      99             :         COMMODITY_GOLD,
     100             :         COMMODITY_PLATINUM,
     101             :         COMMODITY_GEM_STONES,
     102             :         COMMODITY_ALIEN_ITEMS
     103             : };
     104             : typedef NSInteger OOCommodityType;
     105             : */
     106           0 : typedef NSString* OOCommodityType;
     107             : 
     108           0 : typedef enum
     109             : {
     110             :         CARGO_FLAG_NONE                                 = 400,
     111             :         CARGO_FLAG_FULL_PLENTIFUL               = 501,
     112             :         CARGO_FLAG_FULL_SCARCE                  = 502,
     113             :         CARGO_FLAG_FULL_MEDICAL                         = 503,
     114             :         CARGO_FLAG_FULL_CONTRABAND                              = 504,
     115             :         CARGO_FLAG_PIRATE                               = 505,
     116             :         CARGO_FLAG_FULL_UNIFORM                 = 510,
     117             :         CARGO_FLAG_CANISTERS                    = 600,
     118             :         CARGO_FLAG_FULL_PASSENGERS              = 700
     119             : } OOCargoFlag;
     120             : 
     121             : 
     122           0 : typedef enum
     123             : {
     124             :         UNITS_TONS,
     125             :         UNITS_KILOGRAMS,
     126             :         UNITS_GRAMS
     127             : } OOMassUnit;
     128             : 
     129             : 
     130           0 : typedef enum
     131             : {
     132             :         ENERGY_UNIT_NONE,
     133             :         ENERGY_UNIT_NORMAL_DAMAGED,
     134             :         ENERGY_UNIT_NAVAL_DAMAGED,
     135             :         OLD_ENERGY_UNIT_NORMAL                  =15,
     136             :         OLD_ENERGY_UNIT_NAVAL                   = 20,
     137             :         ENERGY_UNIT_NORMAL                              = 8,
     138             :         ENERGY_UNIT_NAVAL                               = 16
     139             : } OOEnergyUnitType;
     140             : 
     141             : 
     142           0 : #define ENTRY(label, value) label = value,
     143             : 
     144           0 : typedef enum
     145             : {
     146             :         #include "OOCompassMode.tbl"
     147             : } OOCompassMode;
     148             : 
     149           0 : enum
     150             : {
     151             :         kOOCompassModeDefault           = COMPASS_MODE_BASIC
     152             : };
     153             : 
     154             : #undef ENTRY
     155             : 
     156           0 : typedef enum
     157             : {
     158           0 : #define DIFF_STRING_ENTRY(label, string) label,
     159             :         #include "OOLegalStatusReason.tbl"
     160             : #undef DIFF_STRING_ENTRY
     161             :         
     162             :         kOOLegalStatusReasonDefault = kOOLegalStatusReasonUnknown
     163             : } OOLegalStatusReason;
     164             : 
     165             : 
     166           0 : typedef enum
     167             : {
     168             :         DOCKING_CLEARANCE_STATUS_NONE,
     169             :         DOCKING_CLEARANCE_STATUS_NOT_REQUIRED,
     170             :         DOCKING_CLEARANCE_STATUS_REQUESTED,
     171             :         DOCKING_CLEARANCE_STATUS_GRANTED,
     172             :         DOCKING_CLEARANCE_STATUS_TIMING_OUT,
     173             : } OODockingClearanceStatus;
     174             : 
     175             : 
     176           0 : typedef uint32_t        OOCargoQuantity;
     177           0 : typedef int32_t         OOCargoQuantityDelta;
     178             : 
     179           0 : typedef uint16_t        OOFuelQuantity;
     180             : 
     181             : 
     182           0 : typedef uint64_t        OOCreditsQuantity;
     183           0 : #define kOOMaxCredits   ULLONG_MAX
     184             : 
     185             : 
     186           0 : typedef uint16_t        OOKeyCode;
     187             : 
     188             : 
     189           0 : typedef uint16_t        OOUniversalID;          // Valid IDs range from 100 to 1000.
     190             : 
     191           0 : enum
     192             : {
     193             :         UNIVERSE_MAX_ENTITIES   = 2048,
     194             :         NO_TARGET                               = 0,
     195             :         MIN_ENTITY_UID                  = 100,
     196             :         MAX_ENTITY_UID                  = MIN_ENTITY_UID + UNIVERSE_MAX_ENTITIES + 1
     197             : };
     198             : 
     199             : 
     200           0 : enum
     201             : {
     202             :         kOOVariableTechLevel    = 99
     203             : };
     204           0 : typedef NSUInteger      OOTechLevelID;          // 0..14, 99 is special. NSNotFound is used, so NSUInteger required.
     205             : 
     206           0 : typedef uint8_t         OOGovernmentID;         // 0..7
     207           0 : typedef uint8_t         OOEconomyID;            // 0..7
     208             : 
     209             : 
     210           0 : typedef uint8_t         OOGalaxyID;                     // 0..7
     211           0 : typedef int16_t         OOSystemID;                     // 0..255, -1 for interstellar space (?)
     212             : 
     213             : 
     214           0 : enum
     215             : {
     216             :         kOOMaximumGalaxyID                              = 7,
     217             :         kOOMaximumSystemID                              = 255,
     218             :         kOOMinimumSystemID                              = -1,
     219             :         kOOSystemIDInterstellarSpace    = kOOMinimumSystemID
     220             : };
     221             : 
     222             : 
     223           0 : typedef double OOTimeAbsolute;
     224           0 : typedef double OOTimeDelta;
     225             : 
     226             : 
     227           0 : typedef enum
     228             : {
     229             :         WEAPON_FACING_FORWARD                           = 1,
     230             :         WEAPON_FACING_AFT                                       = 2,
     231             :         WEAPON_FACING_PORT                                      = 4,
     232             :         WEAPON_FACING_STARBOARD                         = 8,
     233             :         
     234             :         WEAPON_FACING_NONE                                      = 0
     235             : } OOWeaponFacing;
     236             : 
     237           0 : typedef uint8_t OOWeaponFacingSet;      // May have multiple bits set.
     238             : 
     239           0 : #define VALID_WEAPON_FACINGS                    (WEAPON_FACING_NONE | WEAPON_FACING_FORWARD | WEAPON_FACING_AFT | WEAPON_FACING_PORT | WEAPON_FACING_STARBOARD)
     240             : 
     241             : 
     242           0 : typedef enum
     243             : {
     244             :         DETAIL_LEVEL_MINIMUM            = 0,
     245             :         DETAIL_LEVEL_NORMAL                     = 1,
     246             :         DETAIL_LEVEL_SHADERS            = 2,
     247             :         DETAIL_LEVEL_EXTRAS                     = 3,
     248             : 
     249             : 
     250             : 
     251             :         DETAIL_LEVEL_MAXIMUM            = 3
     252             : } OOGraphicsDetail;

Generated by: LCOV version 1.14