Skip to content
Snippets Groups Projects
Commit 4d7ca10c authored by Egli Adrian (IT-SCI-API-PFI)'s avatar Egli Adrian (IT-SCI-API-PFI)
Browse files

rendering

parent 74695352
No related branches found
No related tags found
No related merge requests found
...@@ -357,9 +357,9 @@ class PILSVG(PILGL): ...@@ -357,9 +357,9 @@ class PILSVG(PILGL):
] ]
scenery_files_d3 = [ scenery_files_d3 = [
"Scenery-Bergwelt_A_Teil_3_rechts.svg", "Scenery-Bergwelt_A_Teil_1_links.svg",
"Scenery-Bergwelt_A_Teil_2_mitte.svg", "Scenery-Bergwelt_A_Teil_2_mitte.svg",
"Scenery-Bergwelt_A_Teil_1_links.svg" "Scenery-Bergwelt_A_Teil_3_rechts.svg"
] ]
img_back_ground = self.pil_from_svg_file('svg', "Background_Light_green.svg") img_back_ground = self.pil_from_svg_file('svg', "Background_Light_green.svg")
...@@ -526,7 +526,27 @@ class PILSVG(PILGL): ...@@ -526,7 +526,27 @@ class PILSVG(PILGL):
a2 = (a + (col + row + col * row + col ** 3 + row ** 4)) a2 = (a + (col + row + col * row + col ** 3 + row ** 4))
if a2 % 64 > 11: if a2 % 64 > 11:
a = a2 a = a2
pil_track = self.scenery[a % len(self.scenery)] a_l = a % len(self.scenery)
pil_track = self.scenery[a_l]
if rail_grid is not None:
if a2 % 11 > 3:
if a_l == len(self.scenery) - 1:
# mountain
if col > 1 and row % 7 == 1:
if rail_grid[row, col - 1] == 0:
self.draw_image_row_col(self.scenery_d2[0], (row, col - 1),
layer=PILGL.RAIL_LAYER)
pil_track = self.scenery_d2[1]
if a2 % 11 > 3:
if a_l == len(self.scenery) - 1:
# mountain
if col > 2 and row % 5 == 0 and not (row % 7 == 1):
if rail_grid[row, col - 2] == 0 and rail_grid[row, col - 1] == 0:
self.draw_image_row_col(self.scenery_d3[0], (row, col - 2),
layer=PILGL.RAIL_LAYER)
self.draw_image_row_col(self.scenery_d3[1], (row, col - 1),
layer=PILGL.RAIL_LAYER)
pil_track = self.scenery_d3[2]
self.draw_image_row_col(pil_track, (row, col), layer=PILGL.RAIL_LAYER) self.draw_image_row_col(pil_track, (row, col), layer=PILGL.RAIL_LAYER)
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment