src/yapf/yapf_settings.h
author celestar
Mon, 19 Mar 2007 12:38:16 +0000
branchgamebalance
changeset 9895 7bd07f43b0e3
parent 6447 3b71e57fd22b
child 10429 1b99254f9607
permissions -rw-r--r--
(svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
3900
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
     1
/* $Id$ */
6447
3b71e57fd22b (svn r8857) -Documentation: Added some doxygen @file tags, repaired others (the @file tag MUST be found before any line of code, that includes preprocessor directives).
celestar
parents: 6338
diff changeset
     2
3b71e57fd22b (svn r8857) -Documentation: Added some doxygen @file tags, repaired others (the @file tag MUST be found before any line of code, that includes preprocessor directives).
celestar
parents: 6338
diff changeset
     3
/** @file yapf_settings.h */
3b71e57fd22b (svn r8857) -Documentation: Added some doxygen @file tags, repaired others (the @file tag MUST be found before any line of code, that includes preprocessor directives).
celestar
parents: 6338
diff changeset
     4
3900
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
     5
#if !defined(YAPF_SETTINGS_H) || defined(YS_DEF)
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
     6
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
     7
# ifndef  YAPF_SETTINGS_H
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
     8
#  define  YAPF_SETTINGS_H
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
     9
# endif
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    10
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    11
# ifndef YS_DEF
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    12
/*
4549
60410aa1aa88 (svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents: 4411
diff changeset
    13
 *  if YS_DEF is not defined, we will only do following declaration:
9895
7bd07f43b0e3 (svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents: 6447
diff changeset
    14
 *  struct YapfSettings {
4549
60410aa1aa88 (svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents: 4411
diff changeset
    15
 *    bool   disable_node_optimization;
60410aa1aa88 (svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents: 4411
diff changeset
    16
 *    uint32 max_search_nodes;
60410aa1aa88 (svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents: 4411
diff changeset
    17
 *    .... all other yapf related settings ...
9895
7bd07f43b0e3 (svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents: 6447
diff changeset
    18
 *  };
4549
60410aa1aa88 (svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents: 4411
diff changeset
    19
 *
60410aa1aa88 (svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents: 4411
diff changeset
    20
 *  otherwise we will just expand YS_DEF_xx macros and then #undef them
60410aa1aa88 (svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents: 4411
diff changeset
    21
 */
9895
7bd07f43b0e3 (svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents: 6447
diff changeset
    22
#  define YS_DEF_BEGIN struct YapfSettings {
3900
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    23
#  define YS_DEF(type, name) type name;
9895
7bd07f43b0e3 (svn r9321) [gamebalance] -Sync: r9025:9314 from trunk
celestar
parents: 6447
diff changeset
    24
#  define YS_DEF_END };
3900
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    25
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    26
# endif /* !YS_DEF */
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    27
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    28
# ifndef   YS_DEF_BEGIN
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    29
#  define  YS_DEF_BEGIN
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    30
# endif // YS_DEF_BEGIN
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    31
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    32
# ifndef   YS_DEF_END
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    33
#  define  YS_DEF_END
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    34
# endif // YS_DEF_END
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    35
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    36
YS_DEF_BEGIN
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    37
	YS_DEF(bool  , disable_node_optimization)  ///< whether to use exit-dir instead of trackdir in node key
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    38
	YS_DEF(uint32, max_search_nodes)           ///< stop path-finding when this number of nodes visited
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    39
	YS_DEF(bool  , ship_use_yapf)              ///< use YAPF for ships
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    40
	YS_DEF(bool  , road_use_yapf)              ///< use YAPF for road
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    41
	YS_DEF(bool  , rail_use_yapf)              ///< use YAPF for rail
3981
dc7c472bfcf4 (svn r5169) - CodeChange: [YAPF] RVs now use YAPF_TILE_LENGTH as base unit and 2 configurable settings (slope and crossing penalties) for cost calculation
KUDr
parents: 3935
diff changeset
    42
	YS_DEF(uint32, road_slope_penalty)         ///< penalty for up-hill slope
4411
c8eaf5401817 (svn r6164) -Fix [YAPF]: Road vehicles preferring bends - added yapf.road_curve_penalty setting with default value 100 (=YAPF_TILE_LENGTH) that is saved only in MP games (mart3p)
KUDr
parents: 3981
diff changeset
    43
	YS_DEF(uint32, road_curve_penalty)         ///< penalty for curves
3981
dc7c472bfcf4 (svn r5169) - CodeChange: [YAPF] RVs now use YAPF_TILE_LENGTH as base unit and 2 configurable settings (slope and crossing penalties) for cost calculation
KUDr
parents: 3935
diff changeset
    44
	YS_DEF(uint32, road_crossing_penalty)      ///< penalty for level crossing
6338
0fb4f452873c (svn r8735) -Feature: drive-through road stops made possible by the hard work of mart3p.
rubidium
parents: 5726
diff changeset
    45
	YS_DEF(uint32, road_stop_penalty)          ///< penalty for going through a drive-through road stop
3900
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    46
	YS_DEF(bool  , rail_firstred_twoway_eol)   ///< treat first red two-way signal as dead end
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    47
	YS_DEF(uint32, rail_firstred_penalty)      ///< penalty for first red signal
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    48
	YS_DEF(uint32, rail_firstred_exit_penalty) ///< penalty for first red exit signal
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    49
	YS_DEF(uint32, rail_lastred_penalty)       ///< penalty for last red signal
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    50
	YS_DEF(uint32, rail_lastred_exit_penalty)  ///< penalty for last red exit signal
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    51
	YS_DEF(uint32, rail_station_penalty)       ///< penalty for non-target station tile
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    52
	YS_DEF(uint32, rail_slope_penalty)         ///< penalty for up-hill slope
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    53
	YS_DEF(uint32, rail_curve45_penalty)       ///< penalty for curve
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    54
	YS_DEF(uint32, rail_curve90_penalty)       ///< penalty for 90-deg curve
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    55
	YS_DEF(uint32, rail_depot_reverse_penalty) ///< penalty for reversing in the depot
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    56
	YS_DEF(uint32, rail_crossing_penalty)      ///< penalty for level crossing
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    57
	YS_DEF(uint32, rail_look_ahead_max_signals)///< max. number of signals taken into consideration in look-ahead load balancer
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    58
	YS_DEF(int32 , rail_look_ahead_signal_p0)  ///< constant in polynomial penalty function
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    59
	YS_DEF(int32 , rail_look_ahead_signal_p1)  ///< constant in polynomial penalty function
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    60
	YS_DEF(int32 , rail_look_ahead_signal_p2)  ///< constant in polynomial penalty function
3931
ca6abd14504a (svn r5066) -Feature: [YAPF] Train selects the best station platform by length
KUDr
parents: 3900
diff changeset
    61
3935
d0b7f6681727 (svn r5076) CodeChange: [YAPF] Platform selection feature related settings added into regular savegames (breaks savegame compatibility only with r5070 and 5071).
KUDr
parents: 3931
diff changeset
    62
	YS_DEF(uint32, rail_longer_platform_penalty)           ///< penalty for longer  station platform than train
d0b7f6681727 (svn r5076) CodeChange: [YAPF] Platform selection feature related settings added into regular savegames (breaks savegame compatibility only with r5070 and 5071).
KUDr
parents: 3931
diff changeset
    63
	YS_DEF(uint32, rail_longer_platform_per_tile_penalty)  ///< penalty for longer  station platform than train (per tile)
d0b7f6681727 (svn r5076) CodeChange: [YAPF] Platform selection feature related settings added into regular savegames (breaks savegame compatibility only with r5070 and 5071).
KUDr
parents: 3931
diff changeset
    64
	YS_DEF(uint32, rail_shorter_platform_penalty)          ///< penalty for shorter station platform than train
d0b7f6681727 (svn r5076) CodeChange: [YAPF] Platform selection feature related settings added into regular savegames (breaks savegame compatibility only with r5070 and 5071).
KUDr
parents: 3931
diff changeset
    65
	YS_DEF(uint32, rail_shorter_platform_per_tile_penalty) ///< penalty for shorter station platform than train (per tile)
5081
f71d1d2da6ed (svn r7145) Remove extra semicolons
tron
parents: 4549
diff changeset
    66
YS_DEF_END
3900
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    67
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    68
#undef YS_DEF_BEGIN
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    69
#undef YS_DEF
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    70
#undef YS_DEF_END
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    71
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    72
#endif /* !YAPF_SETTINGS_H || YS_DEF */