Skip to content
Snippets Groups Projects
Verified Commit 54848c80 authored by João Magalhães's avatar João Magalhães :rocket:
Browse files

chore: new image naming

parent 19891b80
No related branches found
No related tags found
1 merge request!36Support for Python
Pipeline #3636 passed
......@@ -4,6 +4,7 @@ from os.path import dirname, realpath, join
CURRENT_DIR = dirname(realpath(__file__))
ROM_PATH = join(CURRENT_DIR, "../../res/roms/demo/pocket.gb")
IMAGE_NAME = "pocket.png"
FRAME_COUNT = 12000
......@@ -15,4 +16,4 @@ for _ in range(FRAME_COUNT):
total = time() - start
print(f"Time taken: {total:.2f} seconds")
print(f"Speedup: {FRAME_COUNT / total / VISUAL_FREQ:.2f}x")
gb.save_image("pocket.png")
gb.save_image(IMAGE_NAME)
......@@ -4,6 +4,7 @@ from os.path import dirname, realpath, join
CURRENT_DIR = dirname(realpath(__file__))
ROM_PATH = join(CURRENT_DIR, "../../res/roms/demo/pocket.gb")
IMAGE_NAME = "pocket_pyboy.png"
FRAME_COUNT = 12000
VISUAL_FREQ = 59.7275
......@@ -19,4 +20,4 @@ with PyBoy(ROM_PATH, disable_renderer=True) as pyboy:
print(f"Speedup: {FRAME_COUNT / total / VISUAL_FREQ:.2f}x")
image = pyboy.screen_image()
if image:
image.save("pocket_pyboy.png")
image.save(IMAGE_NAME)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment