1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
| Cls
Cr$ = ""
X0 = 7
Y0 = 29.8
Y1 = 37.75
Ech = 1
'X1 = X0 + (Y1 - Y0) * 640 / 480
'X1 = X0 + 12.74
X1 = X0 + 12
Screen 12
WINDOW (X0, Y0)-(X1, Y1)
Line (X0, Y1)-(X1, Y0), , B
WINDOW (X0, Y0)-(X1, Y1)
L = (Y1 - Y0) / 100
For tic = 0 To X1 Step Ech
Line (tic, Y0)-(tic, Y0 + L)
Line (tic, Y1)-(tic, Y1 - L)
Next tic
For tic = 0 To Y1 Step Ech
Line (X0, tic)-(X0 + L, tic)
Line (X1, tic)-(X1 - L, tic)
Next tic
GoSub TraceCarteGlobal
fin:
While Cr$ <> Chr$(13)
Cr$ = INKEY$
Wend
End
TraceCarteGlobal:
i = 0
Open "tungov.dat" For Input As #1
While Not EOF(1)
Line Input #1, Lig$
If Mid$(Lig$, 5, 1) <> "." Then GoSub TraceGouv
Wend
Close
Return
TraceGouv:
XX = 0: YY = 0
couleurGouv = 15
couleurChot = 11
couleurFront = 10
couleur = 15
i = i + 1
If i = 24 Then couleur = couleurFront
If i = 25 Then couleur = couleurGouv
If i = 26 Then couleur = couleurChot
If i = 27 Then couleur = couleurGouv
If i = 28 Then couleur = couleurFront
If i = 29 Then couleur = couleurChot
If i = 32 Then couleur = couleurChot
If i = 33 Then couleur = couleurGouv
If i = 39 Then couleur = couleurChot
If i = 40 Then couleur = couleurChot
If i = 41 Then couleur = couleurChot
If i = 42 Then couleur = couleurGouv
NbrPt = Val(Lig$)
For j = 1 To NbrPt
Line Input #1, Lig$
x = Val(Left$(Lig$, 7))
y = Val(Right$(Lig$, 5))
y = y + CorrectionY
If Abs(x - XX) < 0.25 And Abs(y - YY) < 0.25 Then Line (x, y)-(XX, YY), couleur
XX = x
YY = y
Next j
Color 15
Return |
Partager