summaryrefslogtreecommitdiff
path: root/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
commita0ecd40277a4ba74e765c3767dbfa47e859ce53a (patch)
tree84120756e7446a4c8ac7c1e6aead292414bb63f2 /crystal.py
parent894a2895f8da26fd0e13dcdaf16b442afb17fcec (diff)
fix size computation in GivePoke
original-commit-id: 63c161397dda62e09d91f107b97c8880b45e8aee
Diffstat (limited to 'crystal.py')
-rw-r--r--crystal.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/crystal.py b/crystal.py
index 626b086..b608101 100644
--- a/crystal.py
+++ b/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)