summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2013-09-07 23:38:29 -0500
committerBryan Bishop <kanzure@gmail.com>2013-09-07 23:38:29 -0500
commiteb669fb19a1a7250ddb8167e50f0cf448f1f9521 (patch)
tree88be6ef940b3310bce73c35b387e2837396f683d
parent92a4be1776c89bafff0a39c58dbad7b3f7dc77e2 (diff)
remove some experimental methods
These methods weren't needed. Turns out the problem was frameskip, these were just other attempts to try to do movement and text waiting.
-rw-r--r--vba.py56
1 files changed, 0 insertions, 56 deletions
diff --git a/vba.py b/vba.py
index 1efec4c..ea7bb2e 100644
--- a/vba.py
+++ b/vba.py
@@ -758,36 +758,6 @@ class crystal:
"""
@staticmethod
- def better_text_wait(limit=500):
- """
- Try to get out of text.
- """
- done = False
-
- while not done:
- if limit == 0:
- raise Exception("limit reached")
-
- press("a", holdsteps=10, aftersteps=1)
-
- stack = get_stack()
-
- # PrintLetterDelay
- pld = range(0x313d, 0x318c)
-
- delayframes = range(0x468, 0x46f)
-
- if any([address in stack for address in [0xaef] + pld + delayframes + range(0xa35, 0xa46)]):
- press("a", holdsteps=10, aftersteps=1)
- else:
- print str([hex(x) for x in stack])
- break
-
- limit = limit - 1
-
- print "limit is: " + str(limit)
-
- @staticmethod
def text_wait(step_size=1, max_wait=200, sfx_limit=0, debug=False, callback=None):
"""
Presses the "A" button when text is done being drawn to screen.
@@ -1170,32 +1140,6 @@ class crystal:
nstep(10)
memory = get_memory()
- @staticmethod
- def bad_move_d042(cmd, limit=1000):
- """
- Move until not moving.
- """
- press(cmd, holdsteps=10, aftersteps=0)
- press([])
-
- # still standing? probably at a wall or something.
- if get_memory()[0xd042] == 0x3e:
- return
-
- counter = 0
-
- # this doesn't work because sometimes 0xd042 happens more/less times
- while counter <= 6:
- # check MovementAnimation
- if get_memory()[0xd042] != 0x3e:
- print "0xd042 is not 0x3e"
- counter += 1
-
- # make the emulator state advance one frame or w/e
- step()
-
- print "counter: " + str(counter)
-
class TestEmulator(unittest.TestCase):
try:
state = load_state("cheating-12")