summaryrefslogtreecommitdiff
path: root/app/bin/tcurve.c
diff options
context:
space:
mode:
Diffstat (limited to 'app/bin/tcurve.c')
-rw-r--r--app/bin/tcurve.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/app/bin/tcurve.c b/app/bin/tcurve.c
index 65b6bcc..5c56dd3 100644
--- a/app/bin/tcurve.c
+++ b/app/bin/tcurve.c
@@ -441,12 +441,14 @@ static void UpdateCurve( track_p trk, int inx, descData_p descUpd,
crvData.radius = xx0.radius;
crvDesc[RA].mode |= DESC_CHANGE;
} else {
- if ( crvData.pivot == DESC_PIVOT_FIRST || GetTrkEndTrk(trk,0) ) {
- Translate( &xx0.pos, xx0.pos, a0, xx0.radius-crvData.radius );
- } else if ( crvData.pivot == DESC_PIVOT_SECOND || GetTrkEndTrk(trk,1) ) {
- Translate( &xx0.pos, xx0.pos, a0+a1, xx0.radius-crvData.radius );
- } else {
- Translate( &xx0.pos, xx0.pos, a0+a1/2.0, xx0.radius-crvData.radius );
+ if ( xx0.helixTurns==0 && xx0.circle==FALSE ) {
+ if ( crvData.pivot == DESC_PIVOT_FIRST || GetTrkEndTrk(trk,0) ) {
+ Translate( &xx0.pos, xx0.pos, a0, xx0.radius-crvData.radius );
+ } else if ( crvData.pivot == DESC_PIVOT_SECOND || GetTrkEndTrk(trk,1) ) {
+ Translate( &xx0.pos, xx0.pos, a0+a1, xx0.radius-crvData.radius );
+ } else {
+ Translate( &xx0.pos, xx0.pos, a0+a1/2.0, xx0.radius-crvData.radius );
+ }
}
crvDesc[CE].mode |= DESC_CHANGE;
xx0.radius = crvData.radius;
@@ -748,9 +750,6 @@ static void DrawCurvedTies(
return;
}
- if (color == wDrawColorBlack) {
- color = tieColor;
- }
len = 2*M_PI*r*a1/360.0;
cnt = (int)floor(len/td.spacing + 0.5);
if ( len - td.spacing*cnt - (td.width/2) > (td.spacing - td.width)/2 ) {
@@ -829,9 +828,15 @@ EXPORT void DrawCurvedTrack(
if (color == wDrawColorBlack) {
color = normalColor;
}
+ int iDrawCenter = centerDrawMode;
+ if ( options & DTS_NOCENTER ) {
+ iDrawCenter = FALSE;
+ }
+ if ( d == &mapD ) {
+ iDrawCenter = FALSE;
+ }
if ( ! DrawTwoRails( d, 1 ) ) {
- DrawArc( d, p, r, a0, a1, (centerDrawMode
- && !(options&DTS_NOCENTER)) ? 1 : 0, width, color );
+ DrawArc( d, p, r, a0, a1, iDrawCenter, width, color );
} else {
if ( hasTrackCenterline(d)) {
long options = d->options;
@@ -840,8 +845,7 @@ EXPORT void DrawCurvedTrack(
d->options = options;
}
DrawArc( d, p, r+trackGauge/2.0, a0, a1, 0, width, color );
- DrawArc( d, p, r-trackGauge/2.0, a0, a1, (centerDrawMode
- && !(options&DTS_NOCENTER) ? 1: 0), width, color );
+ DrawArc( d, p, r-trackGauge/2.0, a0, a1, iDrawCenter, width, color );
if ( (d->options&DC_PRINT) && roadbedWidth > trackGauge
&& DrawTwoRails( d, 1 ) ) {
wDrawWidth rbw = (wDrawWidth)floor(roadbedLineWidth*(d->dpi/d->scale)+0.5);