@@ -378,13 +378,6 @@ def km_b():
378378
379379# ── Stockage global des tuiles ────────────────────────────────
380380
381- _tuiles_xs = []
382- _tuiles_ys = []
383- _tuiles_off = []
384- _tuiles_n = []
385- _vus_n = []
386- _vus_cx = []
387- _vus_cy = []
388381_methode_active = 0
389382_gen_larg = 0.0
390383_gen_haut = 0.0
@@ -429,17 +422,8 @@ def _coord_vers_entier(valeur):
429422
430423
431424def _tuiles_reinit() :
432- global _tuiles_xs, _tuiles_ys, _tuiles_off, _tuiles_n
433- global _vus_n, _vus_cx, _vus_cy
434425 global _compte_tuiles, _cible_tuile, _cache_trouve, _cache_n, _cache_xs, _cache_ys, _cache_actif
435426 global _cache_x0, _cache_y0, _cache_x1, _cache_y1, _cache_x2, _cache_y2, _cache_x3, _cache_y3, _cache_x4, _cache_y4, _cache_x5, _cache_y5, _cache_x6, _cache_y6, _cache_x7, _cache_y7, _cache_x8, _cache_y8, _cache_x9, _cache_y9, _cache_x10, _cache_y10, _cache_x11, _cache_y11
436- _tuiles_xs = []
437- _tuiles_ys = []
438- _tuiles_off = []
439- _tuiles_n = []
440- _vus_n = []
441- _vus_cx = []
442- _vus_cy = []
443427 _compte_tuiles = 0
444428 _cible_tuile = 2147483647
445429 _cache_trouve = 0
@@ -714,16 +698,6 @@ def _ajouter_tuile_4(x0, y0, x1, y1, x2, y2, x3, y3, larg, haut):
714698 soit max_y = max(max(y0, y1), max(y2, y3))
715699 si _hors_champ(min_x, max_x, min_y, max_y, larg, haut) == 1 :
716700 retour 0
717- _tuiles_off.append(len(_tuiles_xs))
718- _tuiles_n.append(4 )
719- _tuiles_xs.append(_coord_vers_entier(x0))
720- _tuiles_ys.append(_coord_vers_entier(y0))
721- _tuiles_xs.append(_coord_vers_entier(x1))
722- _tuiles_ys.append(_coord_vers_entier(y1))
723- _tuiles_xs.append(_coord_vers_entier(x2))
724- _tuiles_ys.append(_coord_vers_entier(y2))
725- _tuiles_xs.append(_coord_vers_entier(x3))
726- _tuiles_ys.append(_coord_vers_entier(y3))
727701 retour 1
728702
729703
@@ -734,26 +708,11 @@ def _ajouter_tuile_6(x0, y0, x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, larg, haut)
734708 soit max_y = max(max(max(y0, y1), max(y2, y3)), max(y4, y5))
735709 si _hors_champ(min_x, max_x, min_y, max_y, larg, haut) == 1 :
736710 retour 0
737- _tuiles_off.append(len(_tuiles_xs))
738- _tuiles_n.append(6 )
739- _tuiles_xs.append(_coord_vers_entier(x0))
740- _tuiles_ys.append(_coord_vers_entier(y0))
741- _tuiles_xs.append(_coord_vers_entier(x1))
742- _tuiles_ys.append(_coord_vers_entier(y1))
743- _tuiles_xs.append(_coord_vers_entier(x2))
744- _tuiles_ys.append(_coord_vers_entier(y2))
745- _tuiles_xs.append(_coord_vers_entier(x3))
746- _tuiles_ys.append(_coord_vers_entier(y3))
747- _tuiles_xs.append(_coord_vers_entier(x4))
748- _tuiles_ys.append(_coord_vers_entier(y4))
749- _tuiles_xs.append(_coord_vers_entier(x5))
750- _tuiles_ys.append(_coord_vers_entier(y5))
751711 retour 1
752712
753713
754714
755715def _ajouter_poly(xs, ys, larg, haut):
756- global _vus_n, _vus_cx, _vus_cy
757716 global _compte_tuiles, _cible_tuile, _cache_actif, _cache_trouve, _cache_n, _cache_xs, _cache_ys
758717 global _cache_x0, _cache_y0, _cache_x1, _cache_y1, _cache_x2, _cache_y2, _cache_x3, _cache_y3, _cache_x4, _cache_y4, _cache_x5, _cache_y5, _cache_x6, _cache_y6, _cache_x7, _cache_y7, _cache_x8, _cache_y8, _cache_x9, _cache_y9, _cache_x10, _cache_y10, _cache_x11, _cache_y11
759718 n = len(xs)
@@ -1397,10 +1356,7 @@ def generer_tuiles(larg, haut, a, methode):
13971356
13981357def _charger_tuile_cache(i):
13991358 global _cache_n, _cache_xs, _cache_ys
1400- global _vus_n, _vus_cx, _vus_cy, _compte_tuiles, _cible_tuile, _cache_trouve, _cache_actif
1401- _vus_n = []
1402- _vus_cx = []
1403- _vus_cy = []
1359+ global _compte_tuiles, _cible_tuile, _cache_trouve, _cache_actif
14041360 _compte_tuiles = 0
14051361 _cible_tuile = entier(i)
14061362 _cache_trouve = 0
@@ -1429,8 +1385,8 @@ def _charger_tuile_cache(i):
14291385
14301386
14311387def tuile_n_sommets(i):
1432- global _tuiles_n, _methode_active, _cache_n
1433- global _vus_n, _vus_cx, _vus_cy, _compte_tuiles, _cible_tuile, _cache_trouve, _cache_xs, _cache_ys, _cache_actif
1388+ global _methode_active, _cache_n
1389+ global _compte_tuiles, _cible_tuile, _cache_trouve, _cache_xs, _cache_ys, _cache_actif
14341390 si _methode_active == 0 :
14351391 retour 6
14361392 si _methode_active == 1 :
@@ -1442,8 +1398,8 @@ def tuile_n_sommets(i):
14421398
14431399
14441400def tuile_sommet_x(i, j):
1445- global _tuiles_xs, _tuiles_off, _methode_active, _gen_larg, _gen_haut, _gen_a, _cache_xs
1446- global _vus_n, _vus_cx, _vus_cy, _compte_tuiles, _cible_tuile, _cache_trouve, _cache_n, _cache_ys, _cache_actif
1401+ global _methode_active, _gen_larg, _gen_haut, _gen_a, _cache_xs
1402+ global _compte_tuiles, _cible_tuile, _cache_trouve, _cache_n, _cache_ys, _cache_actif
14471403 global _cache_x0, _cache_x1, _cache_x2, _cache_x3, _cache_x4, _cache_x5, _cache_x6, _cache_x7, _cache_x8, _cache_x9, _cache_x10, _cache_x11
14481404 si _methode_active == 0 :
14491405 soit cx = _hex_centre_x_par_index(entier(i), _gen_larg, _gen_haut, _gen_a)
@@ -1469,8 +1425,8 @@ def tuile_sommet_x(i, j):
14691425
14701426
14711427def tuile_sommet_y(i, j):
1472- global _tuiles_ys, _tuiles_off, _methode_active, _gen_larg, _gen_haut, _gen_a, _cache_ys
1473- global _vus_n, _vus_cx, _vus_cy, _compte_tuiles, _cible_tuile, _cache_trouve, _cache_n, _cache_xs, _cache_actif
1428+ global _methode_active, _gen_larg, _gen_haut, _gen_a, _cache_ys
1429+ global _compte_tuiles, _cible_tuile, _cache_trouve, _cache_n, _cache_xs, _cache_actif
14741430 global _cache_y0, _cache_y1, _cache_y2, _cache_y3, _cache_y4, _cache_y5, _cache_y6, _cache_y7, _cache_y8, _cache_y9, _cache_y10, _cache_y11
14751431 si _methode_active == 0 :
14761432 soit cx = _hex_centre_x_par_index(entier(i), _gen_larg, _gen_haut, _gen_a)
0 commit comments