You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
fix more height/weight confusion and whitespacing
This commit is contained in:
@@ -5557,13 +5557,13 @@ class PokedexEntryPointerTable:
|
|||||||
self.parse()
|
self.parse()
|
||||||
|
|
||||||
script_parse_table[self.address : self.last_address] = self
|
script_parse_table[self.address : self.last_address] = self
|
||||||
|
|
||||||
def get_dependencies(self, recompute=False, global_dependencies=set()):
|
def get_dependencies(self, recompute=False, global_dependencies=set()):
|
||||||
global_dependencies.update(self.entries)
|
global_dependencies.update(self.entries)
|
||||||
dependencies = []
|
dependencies = []
|
||||||
[dependencies.extend(entry.get_dependencies(recompute=recompute, global_dependencies=global_dependencies)) for entry in self.entries]
|
[dependencies.extend(entry.get_dependencies(recompute=recompute, global_dependencies=global_dependencies)) for entry in self.entries]
|
||||||
return dependencies
|
return dependencies
|
||||||
|
|
||||||
def parse(self):
|
def parse(self):
|
||||||
size = 0
|
size = 0
|
||||||
lastpointer = 0
|
lastpointer = 0
|
||||||
@@ -5581,8 +5581,8 @@ class PokedexEntryPointerTable:
|
|||||||
#if pointer < lastpointer:
|
#if pointer < lastpointer:
|
||||||
# self.target_bank += 1
|
# self.target_bank += 1
|
||||||
# pointer += 0x4000
|
# pointer += 0x4000
|
||||||
self.entries.append(PokedexEntry(pointer, i+1))
|
self.entries.append(PokedexEntry(pointer, i+1))
|
||||||
|
|
||||||
size += 2
|
size += 2
|
||||||
self.size = size
|
self.size = size
|
||||||
self.last_address = self.address + self.size
|
self.last_address = self.address + self.size
|
||||||
@@ -5605,7 +5605,7 @@ class PokedexEntry:
|
|||||||
self.label = Label(name=pokename+"PokedexEntry", address=self.address, object=self)
|
self.label = Label(name=pokename+"PokedexEntry", address=self.address, object=self)
|
||||||
self.parse()
|
self.parse()
|
||||||
script_parse_table[address : self.last_address] = self
|
script_parse_table[address : self.last_address] = self
|
||||||
|
|
||||||
def get_dependencies(self, recompute=False, global_dependencies=set()):
|
def get_dependencies(self, recompute=False, global_dependencies=set()):
|
||||||
return []
|
return []
|
||||||
|
|
||||||
@@ -5615,17 +5615,17 @@ class PokedexEntry:
|
|||||||
jump = how_many_until(chr(0x50), address)
|
jump = how_many_until(chr(0x50), address)
|
||||||
self.species = parse_text_at(address, jump+1)
|
self.species = parse_text_at(address, jump+1)
|
||||||
address = address + jump + 1
|
address = address + jump + 1
|
||||||
|
|
||||||
self.weight = ord(rom[address ]) + (ord(rom[address+1]) << 8)
|
self.weight = ord(rom[address ]) + (ord(rom[address+1]) << 8)
|
||||||
self.height = ord(rom[address+2]) + (ord(rom[address+3]) << 8)
|
self.height = ord(rom[address+2]) + (ord(rom[address+3]) << 8)
|
||||||
address += 4
|
address += 4
|
||||||
|
|
||||||
jump = how_many_until(chr(0x50), address)
|
jump = how_many_until(chr(0x50), address)
|
||||||
self.page1 = PokedexText(address)
|
self.page1 = PokedexText(address)
|
||||||
address = address + jump + 1
|
address = address + jump + 1
|
||||||
jump = how_many_until(chr(0x50), address)
|
jump = how_many_until(chr(0x50), address)
|
||||||
self.page2 = PokedexText(address)
|
self.page2 = PokedexText(address)
|
||||||
|
|
||||||
self.last_address = address + jump + 1
|
self.last_address = address + jump + 1
|
||||||
#print(self.to_asm())
|
#print(self.to_asm())
|
||||||
return True
|
return True
|
||||||
@@ -5633,8 +5633,8 @@ class PokedexEntry:
|
|||||||
def to_asm(self):
|
def to_asm(self):
|
||||||
output = """\
|
output = """\
|
||||||
db "{0}" ; species name
|
db "{0}" ; species name
|
||||||
dw {1}, {2} ; weight, height
|
dw {1}, {2} ; height, weight
|
||||||
|
|
||||||
{3}
|
{3}
|
||||||
{4}""".format(self.species, self.weight, self.height, self.page1.to_asm(), self.page2.to_asm())
|
{4}""".format(self.species, self.weight, self.height, self.page1.to_asm(), self.page2.to_asm())
|
||||||
return output
|
return output
|
||||||
|
Reference in New Issue
Block a user