From af6b87ae494668ff32f6398bca0b5d5c746e0115 Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Sun, 17 Nov 2013 11:09:24 -0600 Subject: fix syntax error in audio.py --- pokemontools/audio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pokemontools/audio.py b/pokemontools/audio.py index 1cce1fe..e783b8f 100644 --- a/pokemontools/audio.py +++ b/pokemontools/audio.py @@ -209,7 +209,7 @@ class Channel: for class_ in sound_classes: if class_.id == i: return class_ - if self.channel in [4. 8]: return Noise + if self.channel in [4, 8]: return Noise return Note -- cgit v1.2.3 From 726d6f213470b09347326fb9dddb988de1e143b9 Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Sun, 17 Nov 2013 11:09:36 -0600 Subject: fix configuration import in audio.py --- pokemontools/audio.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pokemontools/audio.py b/pokemontools/audio.py index e783b8f..38fd65f 100644 --- a/pokemontools/audio.py +++ b/pokemontools/audio.py @@ -8,14 +8,19 @@ from gbz80disasm import get_global_address, get_local_address import crystal from crystal import music_classes as sound_classes -from crystal import Command -from crystal import load_rom +from crystal import ( + Command, + SingleByteParam, + MultiByteParam, + load_rom, +) + rom = load_rom() rom = bytearray(rom) -import config -conf = config.Config() +import configuration +conf = configuration.Config() def sort_asms(asms): -- cgit v1.2.3 From 9f55db88039fd7020508ab9a28c8740ef053967d Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Sun, 17 Nov 2013 11:20:09 -0600 Subject: make gfx.py not depend on crystal.py --- pokemontools/gfx.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pokemontools/gfx.py b/pokemontools/gfx.py index c7c6bec..1113b1a 100644 --- a/pokemontools/gfx.py +++ b/pokemontools/gfx.py @@ -5,12 +5,14 @@ import sys import png from math import sqrt, floor, ceil -import crystal +import configuration +config = configuration.Config() + import pokemon_constants import trainers if __name__ != "__main__": - rom = crystal.load_rom() + rom = romstr.RomStr(filename=config.rom_path) def hex_dump(input, debug=True): """ -- cgit v1.2.3 From f80e3a864a0ffae468c1e0e9401ac2aef9587d9f Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Sun, 17 Nov 2013 13:24:02 -0600 Subject: be sure to import romstr into gfx.py --- pokemontools/gfx.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pokemontools/gfx.py b/pokemontools/gfx.py index 1113b1a..d830259 100644 --- a/pokemontools/gfx.py +++ b/pokemontools/gfx.py @@ -10,6 +10,7 @@ config = configuration.Config() import pokemon_constants import trainers +import romstr if __name__ != "__main__": rom = romstr.RomStr(filename=config.rom_path) -- cgit v1.2.3