summaryrefslogtreecommitdiff
path: root/extras/crystal.py
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2012-04-08 23:47:28 -0500
committerBryan Bishop <kanzure@gmail.com>2012-04-08 23:47:28 -0500
commit63c161397dda62e09d91f107b97c8880b45e8aee (patch)
tree51aca5dee0a8c43fcf1201cc5c4ce5fa97605766 /extras/crystal.py
parenta06abcf9f4fa2a734b67268c9233c0bd30243078 (diff)
fix size computation in GivePoke
Diffstat (limited to 'extras/crystal.py')
-rw-r--r--extras/crystal.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/extras/crystal.py b/extras/crystal.py
index 626b0864f..b608101e4 100644
--- a/extras/crystal.py
+++ b/extras/crystal.py
@@ -1539,8 +1539,13 @@ pokemon_constants = {
251: "CELEBI",
}
def get_pokemon_constant_by_id(id):
+ if id == 0: return None
return pokemon_constants[id]
+def parse_script_asm_at(*args, **kwargs):
+ #XXX TODO
+ return None
+
item_constants = {1: 'MASTER_BALL',
2: 'ULTRA_BALL',
3: 'BRIGHTPOWDER',
@@ -2517,7 +2522,7 @@ pksv_crystal_more = {
0x9C: ["specialphonecall", ["call_id", SingleByteParam], ["wtf", SingleByteParam]],
0x9D: ["checkphonecall"],
0x9E: ["verbosegiveitem", ["item", ItemLabelByte], ["quantity", DecimalParam]],
- 0x9F: ["verbosegiveitem2", ["unknown", SingleByteParam]],
+ 0x9F: ["verbosegiveitem2", ["item", ItemLabelByte]],
0xA0: ["loadwilddata", ["map_group", MapGroupParam], ["map_id", MapIdParam]],
0xA1: ["halloffame"],
0xA2: ["credits"],
@@ -2525,7 +2530,7 @@ pksv_crystal_more = {
0xA4: ["storetext", ["pointer", PointerLabelBeforeBank], ["memory", SingleByteParam]],
0xA5: ["displaylocation", ["id", SingleByteParam]],
0xA8: ["unknown0xa8", ["unknown", SingleByteParam]],
- 0xB2: ["unknown0xb2"],
+ 0xB2: ["unknown0xb2", ["unknown", SingleByteParam]],
}
class Command():
@@ -2630,6 +2635,7 @@ class GivePoke(Command):
raise Exception, "this should never happen"
current_address = self.address+1
i = 0
+ self.size = 1
for (key, param_type) in self.param_types.items():
#stop executing after the 4th byte unless it == 0x1
if i == 4: print "self.params[3].byte is: " + str(self.params[3].byte)