yapf/follow_track.cpp
author KUDr
Mon, 01 Jan 2007 23:37:39 +0000
branchcustombridgeheads
changeset 5629 7cb2c58f4a7c
parent 4462 808d9d5fb7a3
permissions -rw-r--r--
(svn r7735) - Fix: mingw compilation error (glx)
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$ */
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
     2
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
     3
#include "../stdafx.h"
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
     4
#include "yapf.hpp"
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
     5
#include "follow_track.hpp"
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
     6
4462
808d9d5fb7a3 (svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents: 3971
diff changeset
     7
void FollowTrackInit(FollowTrack_t *This, const Vehicle* v)
808d9d5fb7a3 (svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents: 3971
diff changeset
     8
{
808d9d5fb7a3 (svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents: 3971
diff changeset
     9
	CFollowTrackWater& F = *(CFollowTrackWater*) This;
808d9d5fb7a3 (svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents: 3971
diff changeset
    10
	F.Init(v, NULL);
808d9d5fb7a3 (svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents: 3971
diff changeset
    11
}
808d9d5fb7a3 (svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents: 3971
diff changeset
    12
3900
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    13
bool FollowTrackWater(FollowTrack_t *This, TileIndex old_tile, Trackdir old_td)
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    14
{
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    15
	CFollowTrackWater& F = *(CFollowTrackWater*) This;
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    16
	return F.Follow(old_tile, old_td);
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    17
}
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    18
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    19
bool FollowTrackRoad(FollowTrack_t *This, TileIndex old_tile, Trackdir old_td)
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    20
{
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    21
	CFollowTrackRoad& F = *(CFollowTrackRoad*) This;
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    22
	return F.Follow(old_tile, old_td);
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    23
}
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    24
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    25
bool FollowTrackRail(FollowTrack_t *This, TileIndex old_tile, Trackdir old_td)
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    26
{
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    27
	CFollowTrackRail& F = *(CFollowTrackRail*) This;
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    28
	return F.Follow(old_tile, old_td);
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    29
}
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    30
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    31
bool FollowTrackWaterNo90(FollowTrack_t *This, TileIndex old_tile, Trackdir old_td)
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    32
{
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    33
	CFollowTrackWaterNo90& F = *(CFollowTrackWaterNo90*) This;
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    34
	return F.Follow(old_tile, old_td);
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
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    37
bool FollowTrackRoadNo90(FollowTrack_t *This, TileIndex old_tile, Trackdir old_td)
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    38
{
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    39
	CFollowTrackRoadNo90& F = *(CFollowTrackRoadNo90*) This;
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    40
	return F.Follow(old_tile, old_td);
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    41
}
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    42
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    43
bool FollowTrackRailNo90(FollowTrack_t *This, TileIndex old_tile, Trackdir old_td)
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    44
{
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    45
	CFollowTrackRailNo90& F = *(CFollowTrackRailNo90*) This;
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    46
	return F.Follow(old_tile, old_td);
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff changeset
    47
}