summaryrefslogtreecommitdiff
path: root/extras/comparator.py
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2013-06-25 23:47:22 -0500
committerBryan Bishop <kanzure@gmail.com>2013-06-25 23:47:59 -0500
commitaee96a5cf75d5731cb8cb8eb97ad16cb44a7b53e (patch)
treec063c6de31c8b892e95fe24a9098a29e0c8ec8e3 /extras/comparator.py
parentb710b8721eb12db39ba0413fdaede654999a426a (diff)
parent72fbe86c7aee557282322666c1c3a25fbe964b0b (diff)
Merge branch 'cogitokat/master' into master.
fixes #152
Diffstat (limited to 'extras/comparator.py')
-rw-r--r--extras/comparator.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/extras/comparator.py b/extras/comparator.py
index 48bdb6b09..e338f4391 100644
--- a/extras/comparator.py
+++ b/extras/comparator.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
"""
-Finds shared functions between red/crystal.
+Find shared functions between red/crystal.
"""
from crystal import (
@@ -18,13 +18,13 @@ from romstr import (
def load_rom(path):
"""
- Loads a ROM file into an abbreviated RomStr object.
+ Load a ROM file into an abbreviated RomStr object.
"""
return direct_load_rom(filename=path)
def load_asm(path):
"""
- Loads source ASM into an abbreviated AsmList object.
+ Load source ASM into an abbreviated AsmList object.
"""
return direct_load_asm(filename=path)
@@ -63,7 +63,8 @@ found_blobs = []
class BinaryBlob(object):
"""
- Stores a label, line number, and addresses of a function from Pokémon Red.
+ Store a label, line number, and addresses of a function from Pokémon Red.
+
These details can be used to determine whether or not the function was
copied into Pokémon Crystal.
"""
@@ -128,7 +129,7 @@ class BinaryBlob(object):
def parse_from_red(self):
"""
- Reads bytes from Pokémon Red and stores them.
+ Read bytes from Pokémon Red and stores them.
"""
self.bytes = redrom[self.start_address : self.end_address + 1]
@@ -146,7 +147,7 @@ class BinaryBlob(object):
def find_in_crystal(self):
"""
- Checks whether or not the bytes appear in Pokémon Crystal.
+ Check whether or not the bytes appear in Pokémon Crystal.
"""
finditer = findall_iter(self.bytes, cryrom)
@@ -160,7 +161,7 @@ class BinaryBlob(object):
def find_by_first_bytes(self):
"""
- Finds this blob in Crystal based on the first n bytes.
+ Find this blob in Crystal based on the first n bytes.
"""
# how many bytes to match
@@ -194,7 +195,7 @@ redsrc = load_asm(pokered_src_path)
def scan_red_asm(bank_stop=3, debug=True):
"""
- Scans the ASM from Pokémon Red. Finds labels and objects. Does things.
+ Scan the ASM from Pokémon Red. Finds labels and objects. Does things.
Uses get_label_from_line and get_address_from_line_comment.
"""