mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
commit
3b20ea2916
@ -593,7 +593,7 @@ def asm_label(address):
|
|||||||
# why using a random value when you can use the address?
|
# why using a random value when you can use the address?
|
||||||
return ".ASM_" + hex(address)[2:]
|
return ".ASM_" + hex(address)[2:]
|
||||||
|
|
||||||
def output_bank_opcodes(original_offset, max_byte_count=0x4000):
|
def output_bank_opcodes(original_offset, max_byte_count=0x4000, debug = False):
|
||||||
#fs = current_address
|
#fs = current_address
|
||||||
#b = bank_byte
|
#b = bank_byte
|
||||||
#in = input_data -- rom
|
#in = input_data -- rom
|
||||||
@ -602,10 +602,13 @@ def output_bank_opcodes(original_offset, max_byte_count=0x4000):
|
|||||||
#ad = end_address
|
#ad = end_address
|
||||||
#a, oa = current_byte_number
|
#a, oa = current_byte_number
|
||||||
|
|
||||||
|
load_labels()
|
||||||
|
load_rom()
|
||||||
|
|
||||||
bank_id = 0
|
bank_id = 0
|
||||||
if original_offset > 0x8000:
|
if original_offset > 0x8000:
|
||||||
bank_id = original_offset / 0x4000
|
bank_id = original_offset / 0x4000
|
||||||
print "bank id is: " + str(bank_id)
|
if debug: print "bank id is: " + str(bank_id)
|
||||||
|
|
||||||
last_hl_address = None #for when we're scanning the main map script
|
last_hl_address = None #for when we're scanning the main map script
|
||||||
last_a_address = None
|
last_a_address = None
|
||||||
@ -843,7 +846,7 @@ def all_outstanding_labels_are_reverse(byte_labels, offset):
|
|||||||
if not label_id < offset: return False
|
if not label_id < offset: return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
load_labels()
|
|
||||||
load_rom()
|
|
||||||
print output_bank_opcodes(int(sys.argv[1], 16))[0]
|
print output_bank_opcodes(int(sys.argv[1], 16))[0]
|
||||||
|
16
main.asm
16
main.asm
@ -11414,7 +11414,7 @@ INCBIN "baserom.gbc",$3ddc8,$3e8eb - $3ddc8
|
|||||||
Function3e8eb: ; 3e8eb
|
Function3e8eb: ; 3e8eb
|
||||||
;part of battle init
|
;part of battle init
|
||||||
xor a
|
xor a
|
||||||
ld hl, EnemyMonSpecies2
|
ld hl, EnemyMonSpecies
|
||||||
ld bc, $0027
|
ld bc, $0027
|
||||||
call ByteFill
|
call ByteFill
|
||||||
ld a, [InLinkBattle]
|
ld a, [InLinkBattle]
|
||||||
@ -11423,8 +11423,8 @@ Function3e8eb: ; 3e8eb
|
|||||||
ld a, [$cfc0]
|
ld a, [$cfc0]
|
||||||
bit 0, a
|
bit 0, a
|
||||||
jp nz, $5abd
|
jp nz, $5abd
|
||||||
ld a, [EnemyMonSpecies]
|
ld a, [TempEnemyMonSpecies]
|
||||||
ld [EnemyMonSpecies2], a
|
ld [EnemyMonSpecies], a
|
||||||
ld [$cf60], a
|
ld [$cf60], a
|
||||||
ld [$d108], a
|
ld [$d108], a
|
||||||
call $3856
|
call $3856
|
||||||
@ -11515,7 +11515,7 @@ Function3e8eb: ; 3e8eb
|
|||||||
ld a, [$d22d]
|
ld a, [$d22d]
|
||||||
dec a
|
dec a
|
||||||
jr nz, .asm_3ea1a
|
jr nz, .asm_3ea1a
|
||||||
ld a, [EnemyMonSpecies]
|
ld a, [TempEnemyMonSpecies]
|
||||||
cp a, UNOWN
|
cp a, UNOWN
|
||||||
jr nz, .notunown
|
jr nz, .notunown
|
||||||
ld hl, EnemyMonDVs
|
ld hl, EnemyMonDVs
|
||||||
@ -11524,7 +11524,7 @@ Function3e8eb: ; 3e8eb
|
|||||||
call CheckUnownLetter
|
call CheckUnownLetter
|
||||||
jr c, .asm_3e9a0
|
jr c, .asm_3e9a0
|
||||||
.notunown
|
.notunown
|
||||||
ld a, [EnemyMonSpecies]
|
ld a, [TempEnemyMonSpecies]
|
||||||
cp a, MAGIKARP
|
cp a, MAGIKARP
|
||||||
jr nz, .asm_3ea1a
|
jr nz, .asm_3ea1a
|
||||||
ld de, EnemyMonDVs
|
ld de, EnemyMonDVs
|
||||||
@ -11679,7 +11679,7 @@ Function3e8eb: ; 3e8eb
|
|||||||
inc de
|
inc de
|
||||||
ld a, [$d240]
|
ld a, [$d240]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
ld a, [EnemyMonSpecies]
|
ld a, [TempEnemyMonSpecies]
|
||||||
ld [$d265], a
|
ld [$d265], a
|
||||||
call $343b
|
call $343b
|
||||||
ld a, [$d22d]
|
ld a, [$d22d]
|
||||||
@ -11689,7 +11689,7 @@ Function3e8eb: ; 3e8eb
|
|||||||
ld de, $c616
|
ld de, $c616
|
||||||
ld bc, $000b
|
ld bc, $000b
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld a, [EnemyMonSpecies]
|
ld a, [TempEnemyMonSpecies]
|
||||||
dec a
|
dec a
|
||||||
ld c, a
|
ld c, a
|
||||||
ld b, $01
|
ld b, $01
|
||||||
@ -11715,7 +11715,7 @@ CheckSleepingTreeMon: ; 3eb38
|
|||||||
jr z, .check
|
jr z, .check
|
||||||
ld hl, SleepingTreeMonNiteTable
|
ld hl, SleepingTreeMonNiteTable
|
||||||
.check
|
.check
|
||||||
ld a, [EnemyMonSpecies]
|
ld a, [TempEnemyMonSpecies]
|
||||||
ld de, $0001
|
ld de, $0001
|
||||||
call IsInArray
|
call IsInArray
|
||||||
ret c
|
ret c
|
||||||
|
Loading…
Reference in New Issue
Block a user