src/road.cpp
author convert-repo
Mon, 07 Apr 2008 16:21:55 +0000
changeset 10076 dfd70e42c4ae
parent 9282 2bb9703aeb39
child 10376 a1207076a5c7
permissions -rw-r--r--
update tags
8587
6db234b2b897 (svn r11652) -Codechange: add the svn $ header for several files
smatz
parents: 8328
diff changeset
     1
/* $Id$ */
6db234b2b897 (svn r11652) -Codechange: add the svn $ header for several files
smatz
parents: 8328
diff changeset
     2
8137
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
     3
#include "stdafx.h"
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
     4
#include "openttd.h"
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
     5
#include "rail_map.h"
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
     6
#include "road_map.h"
8598
14ae80fe4c8f (svn r11663) -Codechange: moving of the road related types and functions.
rubidium
parents: 8587
diff changeset
     7
#include "road_internal.h"
8137
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
     8
#include "water_map.h"
8732
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
     9
#include "genworld.h"
8750
fdd6054e7bae (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents: 8732
diff changeset
    10
#include "player_func.h"
fdd6054e7bae (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents: 8732
diff changeset
    11
#include "player_base.h"
9282
2bb9703aeb39 (svn r12490) -Codechange: rename engine.h to engine_func.h and remove unneeded inclusions of engine.h and/or replace them with engine_type.h.
rubidium
parents: 8883
diff changeset
    12
#include "engine_func.h"
8732
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
    13
#include "settings_type.h"
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
    14
#include "date_func.h"
8137
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    15
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    16
bool IsPossibleCrossing(const TileIndex tile, Axis ax)
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    17
{
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    18
	return (IsTileType(tile, MP_RAILWAY) &&
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    19
		!HasSignals(tile) &&
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    20
		GetTrackBits(tile) == (ax == AXIS_X ?  TRACK_BIT_Y : TRACK_BIT_X) &&
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    21
		GetTileSlope(tile, NULL) == SLOPE_FLAT);
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    22
}
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    23
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    24
RoadBits CleanUpRoadBits(const TileIndex tile, RoadBits org_rb)
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    25
{
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    26
	for (DiagDirection dir = DIAGDIR_BEGIN; dir < DIAGDIR_END; dir++) {
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    27
		const TileIndex neighbor_tile = TileAddByDiagDir(tile, dir);
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    28
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    29
		/* Get the Roadbit pointing to the neighbor_tile */
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    30
		const RoadBits target_rb = DiagDirToRoadBits(dir);
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    31
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    32
		/* If the roadbit is in the current plan */
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    33
		if (org_rb & target_rb) {
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    34
			bool connective = false;
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    35
			const RoadBits mirrored_rb = MirrorRoadBits(target_rb);
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    36
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    37
			switch (GetTileType(neighbor_tile)) {
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    38
				/* Allways connective ones */
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    39
				case MP_CLEAR: case MP_TREES:
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    40
					connective = true;
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    41
					break;
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    42
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    43
				/* The conditionaly connective ones */
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    44
				case MP_TUNNELBRIDGE:
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    45
				case MP_STATION:
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    46
				case MP_ROAD: {
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    47
					const RoadBits neighbor_rb = GetAnyRoadBits(neighbor_tile, ROADTYPE_ROAD) | GetAnyRoadBits(neighbor_tile, ROADTYPE_TRAM);
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    48
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    49
					/* Accept only connective tiles */
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    50
					connective = (neighbor_rb & mirrored_rb) || // Neighbor has got the fitting RoadBit
8328
6909973c8359 (svn r11382) -Codechange: renamed COUNTBITS to CountBits, as it is no longer a macro (skidd13)
truelight
parents: 8137
diff changeset
    51
							CountBits(neighbor_rb) == 1; // Neighbor has got only one Roadbit
8137
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    52
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    53
				} break;
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    54
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    55
				case MP_RAILWAY:
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    56
					connective = IsPossibleCrossing(neighbor_tile, DiagDirToAxis(dir));
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    57
					break;
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    58
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    59
				case MP_WATER:
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    60
					/* Check for real water tile */
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    61
					connective = !IsWater(neighbor_tile);
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    62
					break;
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    63
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    64
				/* The defentetly not connective ones */
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    65
				default: break;
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    66
			}
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    67
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    68
			/* If the neighbor tile is inconnective remove the planed road connection to it */
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    69
			if (!connective) org_rb ^= target_rb;
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    70
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    71
		}
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    72
	}
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    73
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    74
	return org_rb;
67a9579abd74 (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13.
rubidium
parents:
diff changeset
    75
}
8732
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
    76
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
    77
bool HasRoadTypesAvail(const PlayerID p, const RoadTypes rts)
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
    78
{
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
    79
	RoadTypes avail_roadtypes;
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
    80
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
    81
	if (p == OWNER_TOWN || _game_mode == GM_EDITOR || IsGeneratingWorld()) {
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
    82
		avail_roadtypes = ROADTYPES_ROAD;
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
    83
	} else {
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
    84
		if (!IsValidPlayer(p)) return false;
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
    85
		avail_roadtypes = (RoadTypes)GetPlayer(p)->avail_roadtypes | ROADTYPES_ROAD; // road is available for always for everybody
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
    86
	}
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
    87
	return (rts & ~avail_roadtypes) == 0;
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
    88
}
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
    89
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
    90
bool ValParamRoadType(const RoadType rt)
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
    91
{
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
    92
	return HasRoadTypesAvail(_current_player, RoadTypeToRoadTypes(rt));
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
    93
}
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
    94
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
    95
RoadTypes GetPlayerRoadtypes(PlayerID p)
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
    96
{
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
    97
	RoadTypes rt = ROADTYPES_NONE;
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
    98
8883
830c088b375e (svn r11957) -Codechange [FS#1678]: Minor simplification and optimisation when checking for available road/rail types (bilbo)
peter1138
parents: 8750
diff changeset
    99
	EngineID i;
830c088b375e (svn r11957) -Codechange [FS#1678]: Minor simplification and optimisation when checking for available road/rail types (bilbo)
peter1138
parents: 8750
diff changeset
   100
	FOR_ALL_ENGINEIDS_OF_TYPE(i, VEH_ROAD) {
8732
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
   101
		const Engine* e = GetEngine(i);
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
   102
		const EngineInfo *ei = EngInfo(i);
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
   103
8883
830c088b375e (svn r11957) -Codechange [FS#1678]: Minor simplification and optimisation when checking for available road/rail types (bilbo)
peter1138
parents: 8750
diff changeset
   104
		if (HasBit(ei->climates, _opt.landscape) &&
8732
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
   105
				(HasBit(e->player_avail, p) || _date >= e->intro_date + 365)) {
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
   106
			SetBit(rt, HasBit(ei->misc_flags, EF_ROAD_TRAM) ? ROADTYPE_TRAM : ROADTYPE_ROAD);
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
   107
		}
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
   108
	}
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
   109
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
   110
	return rt;
b18f578f7c16 (svn r11800) -Codechange: move some functions to a more logical location + some type safety.
rubidium
parents: 8627
diff changeset
   111
}