Skip to content
Snippets Groups Projects
Commit 4e1b3855 authored by Egli Adrian (IT-SCI-API-PFI)'s avatar Egli Adrian (IT-SCI-API-PFI)
Browse files
parents 7efb0816 f51c77cb
No related branches found
No related tags found
No related merge requests found
...@@ -164,13 +164,7 @@ class Demo: ...@@ -164,13 +164,7 @@ class Demo:
demo_001 = Demo(Scenario_Generator.load_scenario('complex_scene.pkl')) demo_001 = Demo(Scenario_Generator.load_scenario('complex_scene.pkl'))
demo_001.set_record_frames(os.path.join(__file_dirname__, '..', 'rendering', 'frame_{:04d}.bmp')) demo_001.set_record_frames(os.path.join(__file_dirname__, '..', 'rendering', 'frame_{:04d}.bmp'))
demo_001.run_demo(120) demo_001.run_demo(120)
@staticmethod
def run_complex_scene_2():
demo_001 = Demo(Scenario_Generator.load_scenario('complex_scene_2.pkl'))
demo_001.set_record_frames(os.path.join(__file_dirname__, '..', 'rendering', 'frame_{:04d}.bmp'))
demo_001.run_demo(120)
if __name__ == "__main__": if __name__ == "__main__":
Demo.run_complex_scene() Demo.run_complex_scene()
Demo.run_complex_scene_2()
...@@ -277,6 +277,7 @@ class Controller(object): ...@@ -277,6 +277,7 @@ class Controller(object):
# If the mouse is held down, enqueue an event in our own queue # If the mouse is held down, enqueue an event in our own queue
# The intention was to avoid too many redraws. # The intention was to avoid too many redraws.
# Reset the lrcStroke list, if ALT, CTRL or SHIFT pressed
if event["buttons"] > 0: if event["buttons"] > 0:
qEvents.append((time.time(), x, y)) qEvents.append((time.time(), x, y))
bShift = event["shiftKey"] bShift = event["shiftKey"]
...@@ -299,7 +300,6 @@ class Controller(object): ...@@ -299,7 +300,6 @@ class Controller(object):
return return
else: else:
self.lrcStroke = [] self.lrcStroke = []
if self.model.iSelectedAgent is not None: if self.model.iSelectedAgent is not None:
self.lrcStroke = [] self.lrcStroke = []
...@@ -328,7 +328,6 @@ class Controller(object): ...@@ -328,7 +328,6 @@ class Controller(object):
else: else:
self.model.mod_path(not event["shiftKey"]) self.model.mod_path(not event["shiftKey"])
def refresh(self, event): def refresh(self, event):
self.debug("refresh") self.debug("refresh")
self.view.redraw() self.view.redraw()
......
...@@ -439,7 +439,7 @@ class PILSVG(PILGL): ...@@ -439,7 +439,7 @@ class PILSVG(PILGL):
elif (self.background_grid[col][row] > 4) or ((col ** 3 + row ** 2 + col * row) % 10 == 0): elif (self.background_grid[col][row] > 4) or ((col ** 3 + row ** 2 + col * row) % 10 == 0):
a = int(self.background_grid[col][row]) - 4 a = int(self.background_grid[col][row]) - 4
a = (a + (col + row + col * row + col ** 3 + row ** 4)) % len(self.dScenery) a = (a + (col + row + col * row + col ** 3 + row ** 4)) % len(self.dScenery)
if (col + row + col * row ) % 10 > 2: if (col + row + col * row) % 10 > 2:
a = 0 a = 0
pilTrack = self.dScenery[a] pilTrack = self.dScenery[a]
......
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