diff --git a/main.py b/main.py index 47729fa..f56c723 100644 --- a/main.py +++ b/main.py @@ -1,8 +1,17 @@ from pyboy import PyBoy +from pyboy.utils import WindowEvent + + +def load_state(path: str, pyboy: PyBoy) -> None: + with open(path, "rb") as state: + pyboy.load_state(state) + if __name__ == "__main__": pyboy = PyBoy("roms/ZeldaLinksAwakening.gb") + load_state("roms/ZeldaLinksAwakening.gb.state", pyboy) + while pyboy.tick(): pass