V9.71
This commit is contained in:
f1iwq2
2025-01-02 12:26:41 +01:00
parent 02eccff67e
commit 4f3aff148a
32 changed files with 7143 additions and 1843 deletions

View File

@@ -46,7 +46,6 @@ var
procedure actualise_seltrains;
procedure affecte_Train_canton(AdrTrain,idcanton,sens : integer);
procedure xxxraz_trains_Idcanton(idc : integer);
procedure raz_cantons_train(AdrTrain : integer;raz : boolean);
procedure trouve_det_canton(idcanton : integer;var el1,el2 : integer);
function trouve_det_suiv_canton(idcanton,detecteur,sensTCO : integer) : integer;
@@ -54,8 +53,7 @@ procedure Maj_detecteurs_canton(i,AdrTrain,adresse : integer);
implementation
uses UnitConfigCellTCO,UnitTCO,unitconfig,unitDebug, UnitRouteTrains,
UnitInfo;
uses UnitConfigCellTCO,UnitTCO,unitconfig,unitDebug, UnitRouteTrains,UnitInfo;
{$R *.dfm}
@@ -179,32 +177,6 @@ begin
result:=xcanton;
end;
// raz des trains affectés au canton d'index "idc"
procedure xxxraz_trains_idcanton(idc : integer);
var ax,ay,i,ic : integer;
begin
if traceliste then Affiche('Raz train affectés au canton index='+intToSTR(idc),clyellow);
for i:=1 to Ntrains do
begin
ic:=index_canton_numero(trains[i].canton);
if ic=idc then
begin
routeSav:=trains[i].route; // sauvegarde la route
trains[i].canton:=0;
trains[i].route[0].adresse:=0;
if ic<>0 then
begin
ax:=canton[Ic].x;
ay:=canton[Ic].y;
tco[IndexTCOCourant,ax,ay].train:=0;
canton[Ic].indexTrain:=0;
canton[Ic].adresseTrain:=0;
canton[Ic].NomTrain:='';
end;
end;
end;
end;
// supprime le train AdrTrain de tous les cantons, et réaffiche les cantons effacés concernés
// si raz=true : raz aussi le train du détecteur
procedure raz_cantons_train(AdrTrain : integer;raz : boolean);
@@ -347,10 +319,10 @@ begin
with StringGridTrains do
begin
case canton[idcanton].SensLoco of
1 : Image:=ImageGauche;
2 : Image:=ImageDroite;
3 : Image:=ImageHaut;
4 : Image:=ImageBas;
SensGauche : Image:=ImageGauche;
SensDroit : Image:=ImageDroite;
SensHaut : Image:=ImageHaut;
SensBas : Image:=ImageBas;
else exit;
end;
StretchBlt(canvas.Handle,r.left,r.Top,ColWidths[6],RowHeights[6], // destination avec mise à l'échelle
@@ -516,8 +488,8 @@ begin
Canvas.Brush.Color:=coul;
Canvas.FillRect(Rect); // Efface la cellule qu'on va réécrire en mode WORDBREAK
// rectangle du texte
Inc(Rect.Left,2);
Inc(Rect.Top,2);
Inc(Rect.Left,1);
Inc(Rect.Top,1);
DrawText(Canvas.Handle,PChar(Cells[ACol, ARow]),-1,Rect,DT_NOPREFIX or DT_WORDBREAK);
end;
end;
@@ -684,7 +656,7 @@ begin
f:=canton[IdAutreCanton].SensLoco;
inc(f);
inc(f); // les sens vont de 1 à 4
if canton[IdAutreCanton].horizontal then
begin
if (f<SensGauche) or (f>SensDroit) then f:=SensGauche;
@@ -813,6 +785,5 @@ end;
end.