More labels, including fns responsible for partymon generation

This commit is contained in:
PikalaxALT 2015-10-07 13:19:41 -04:00
parent 7176eff7aa
commit edf42a54d5
20 changed files with 340 additions and 326 deletions

View File

@ -787,17 +787,17 @@ Function38511: ; 38511
; 3851e ; 3851e
Function3851e: ; 3851e Function3851e: ; 3851e
ld [hMultiplier], a ld [hDivisor], a
ld hl, EnemyMonMaxHP ld hl, EnemyMonMaxHP
ld a, [hli] ld a, [hli]
ld [hProduct], a ld [hDividend], a
ld a, [hl] ld a, [hl]
ld [hMultiplicand], a ld [hDividend + 1], a
ld b, $2 ld b, $2
call Divide call Divide
ld a, [$ffb6] ld a, [hQuotient + 2]
ld c, a ld c, a
ld a, [$ffb5] ld a, [hQuotient + 1]
ld b, a ld b, a
ld hl, EnemyMonHP + 1 ld hl, EnemyMonHP + 1
ld a, [hld] ld a, [hld]

View File

@ -240,14 +240,14 @@ Functioncc220: ; cc220
ld a, $80 ld a, $80
ld [hBGMapAddress], a ld [hBGMapAddress], a
ld a, $9a ld a, $9a
ld [$ffd7], a ld [hBGMapAddress + 1], a
call Function3200 call Function3200
ld a, $60 ld a, $60
ld [hWY], a ld [hWY], a
xor a xor a
ld [hBGMapAddress], a ld [hBGMapAddress], a
ld a, $98 ld a, $98
ld [$ffd7], a ld [hBGMapAddress + 1], a
call BattleAnimDelayFrame call BattleAnimDelayFrame
ret ret
; cc23d ; cc23d

View File

@ -1696,9 +1696,9 @@ Functioncd677: ; cd677 (33:5677)
ld a, $42 ld a, $42
ld [hLCDStatCustom], a ; $ff00+$c6 ld [hLCDStatCustom], a ; $ff00+$c6
ld a, $58 ld a, $58
ld [$ffc7], a ld [hLCDStatCustom + 1], a
ld a, $5e ld a, $5e
ld [$ffc8], a ld [hLCDStatCustom + 2], a
ret ret
Functioncd687: ; cd687 (33:5687) Functioncd687: ; cd687 (33:5687)
@ -1712,7 +1712,7 @@ Functioncd687: ; cd687 (33:5687)
jr nc, .asm_cd69b jr nc, .asm_cd69b
call Functionce72c call Functionce72c
xor a xor a
ld [$ffc7], a ld [hLCDStatCustom + 1], a
ret ret
.asm_cd69b .asm_cd69b
dec a dec a
@ -1730,7 +1730,7 @@ Functioncd687: ; cd687 (33:5687)
add [hl] add [hl]
sub $10 sub $10
ret c ret c
ld [$ffc7], a ld [hLCDStatCustom + 1], a
ld hl, $9 ld hl, $9
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
@ -1754,8 +1754,8 @@ Functioncd6c6: ; cd6c6 (33:56c6)
jr c, asm_cd6da jr c, asm_cd6da
xor a xor a
ld [hLCDStatCustom], a ; $ff00+$c6 ld [hLCDStatCustom], a ; $ff00+$c6
ld [$ffc7], a ld [hLCDStatCustom + 1], a
ld [$ffc8], a ld [hLCDStatCustom + 2], a
Functioncd6d6: ; cd6d6 (33:56d6) Functioncd6d6: ; cd6d6 (33:56d6)
call Functioncc9bd call Functioncc9bd
@ -1767,7 +1767,7 @@ endr
ld [hl], a ld [hl], a
sub $10 sub $10
ret c ret c
ld [$ffc7], a ld [hLCDStatCustom + 1], a
ret ret
Functioncd6e3: ; cd6e3 (33:56e3) Functioncd6e3: ; cd6e3 (33:56e3)

View File

@ -932,7 +932,7 @@ Functionc8565: ; c8565 (32:4565)
ld hl, w5_d422 ld hl, w5_d422
ld bc, $0 ld bc, $0
.asm_c8580 .asm_c8580
ld a, [$ffc7] ld a, [hLCDStatCustom + 1]
cp e cp e
jr nc, .asm_c858b jr nc, .asm_c858b
push hl push hl
@ -969,9 +969,9 @@ Functionc85a2: ; c85a2 (32:45a2)
ld a, $42 ld a, $42
ld [hLCDStatCustom], a ; $ff00+$c6 ld [hLCDStatCustom], a ; $ff00+$c6
xor a xor a
ld [$ffc7], a ld [hLCDStatCustom + 1], a
ld a, $5e ld a, $5e
ld [$ffc8], a ld [hLCDStatCustom + 2], a
ld de, $202 ld de, $202
call Functionc8f2e call Functionc8f2e
ret ret
@ -1044,9 +1044,9 @@ Functionc8610: ; c8610 (32:4610)
ld a, $43 ld a, $43
ld [hLCDStatCustom], a ; $ff00+$c6 ld [hLCDStatCustom], a ; $ff00+$c6
xor a xor a
ld [$ffc7], a ld [hLCDStatCustom + 1], a
ld a, $5f ld a, $5f
ld [$ffc8], a ld [hLCDStatCustom + 2], a
ld de, $605 ld de, $605
call Functionc8f2e call Functionc8f2e
ld hl, $3 ld hl, $3
@ -1140,9 +1140,9 @@ Functionc8698: ; c8698 (32:4698)
call Functionc8eca call Functionc8eca
ld a, $43 ld a, $43
call Functionc8ede call Functionc8ede
ld a, [$ffc8] ld a, [hLCDStatCustom + 2]
inc a inc a
ld [$ffc8], a ld [hLCDStatCustom + 2], a
ld hl, $2 ld hl, $2
add hl, bc add hl, bc
ld [hl], $0 ld [hl], $0
@ -1196,9 +1196,9 @@ Functionc86ea: ; c86ea (32:46ea)
inc a inc a
ld d, a ld d, a
ld h, $d2 ld h, $d2
ld a, [$ffc7] ld a, [hLCDStatCustom + 1]
ld l, a ld l, a
ld a, [$ffc8] ld a, [hLCDStatCustom + 2]
sub l sub l
srl a srl a
push af push af
@ -1238,7 +1238,7 @@ Functionc8712: ; c8712 (32:4712)
ld d, $2 ld d, $2
call Functionc8f2e call Functionc8f2e
ld h, $d2 ld h, $d2
ld a, [$ffc8] ld a, [hLCDStatCustom + 2]
ld l, a ld l, a
ld [hl], $0 ld [hl], $0
dec l dec l
@ -1246,7 +1246,7 @@ Functionc8712: ; c8712 (32:4712)
ret ret
Functionc8732: ; c8732 (32:4732) Functionc8732: ; c8732 (32:4732)
ld a, [$ffc8] ld a, [hLCDStatCustom + 2]
ld l, a ld l, a
ld h, $d2 ld h, $d2
ld e, l ld e, l
@ -1256,11 +1256,11 @@ Functionc8732: ; c8732 (32:4732)
ld a, [de] ld a, [de]
dec de dec de
ld [hld], a ld [hld], a
ld a, [$ffc7] ld a, [hLCDStatCustom + 1]
cp l cp l
jr nz, .asm_c873a jr nz, .asm_c873a
ld [hl], $90 ld [hl], $90
ld a, [$ffc8] ld a, [hLCDStatCustom + 2]
ld l, a ld l, a
ld a, [hl] ld a, [hl]
cp $1 cp $1
@ -1296,9 +1296,9 @@ Functionc876a: ; c876a (32:476a)
call Functionc8eca call Functionc8eca
ld a, $42 ld a, $42
call Functionc8ede call Functionc8ede
ld a, [$ffc8] ld a, [hLCDStatCustom + 2]
inc a inc a
ld [$ffc8], a ld [hLCDStatCustom + 2], a
ld hl, $2 ld hl, $2
add hl, bc add hl, bc
ld [hl], $1 ld [hl], $1
@ -1347,9 +1347,9 @@ Functionc87b2: ; c87b2 (32:47b2)
call Functionc8eca call Functionc8eca
ld a, $42 ld a, $42
call Functionc8ede call Functionc8ede
ld a, [$ffc8] ld a, [hLCDStatCustom + 2]
inc a inc a
ld [$ffc8], a ld [hLCDStatCustom + 2], a
ld hl, $2 ld hl, $2
add hl, bc add hl, bc
ld [hl], $2 ld [hl], $2
@ -1371,9 +1371,9 @@ Functionc87cf: ; c87cf (32:47cf)
call Functionc80e5 call Functionc80e5
Functionc87de: ; c87de (32:47de) Functionc87de: ; c87de (32:47de)
ld a, [$ffc7] ld a, [hLCDStatCustom + 1]
ld l, a ld l, a
ld a, [$ffc8] ld a, [hLCDStatCustom + 2]
sub l sub l
dec a dec a
ld hl, $2 ld hl, $2
@ -1416,9 +1416,9 @@ Functionc8810: ; c8810 (32:4810)
call Functionc8eca call Functionc8eca
ld a, $43 ld a, $43
call Functionc8ede call Functionc8ede
ld a, [$ffc8] ld a, [hLCDStatCustom + 2]
inc a inc a
ld [$ffc8], a ld [hLCDStatCustom + 2], a
ld hl, $3 ld hl, $3
add hl, bc add hl, bc
ld [hl], $0 ld [hl], $0
@ -1451,9 +1451,9 @@ Functionc8842: ; c8842 (32:4842)
call Functionc8eca call Functionc8eca
ld a, $43 ld a, $43
call Functionc8ef4 call Functionc8ef4
ld a, [$ffc8] ld a, [hLCDStatCustom + 2]
inc a inc a
ld [$ffc8], a ld [hLCDStatCustom + 2], a
ld hl, $3 ld hl, $3
add hl, bc add hl, bc
ld [hl], $0 ld [hl], $0
@ -1524,16 +1524,16 @@ Functionc88a5: ; c88a5 (32:48a5)
pop af pop af
jp Functionc900b jp Functionc900b
.asm_c88b7 .asm_c88b7
ld a, [$ffc7] ld a, [hLCDStatCustom + 1]
ld d, a ld d, a
ld a, [$ffc8] ld a, [hLCDStatCustom + 2]
sub d sub d
ld d, a ld d, a
ld h, LYOverridesBackup / $100 ld h, LYOverridesBackup / $100
ld a, [hSCY] ; $ff00+$d0 ld a, [hSCY] ; $ff00+$d0
or a or a
jr nz, .asm_c88d0 jr nz, .asm_c88d0
ld a, [$ffc7] ld a, [hLCDStatCustom + 1]
or a or a
jr z, .asm_c88d6 jr z, .asm_c88d6
dec a dec a
@ -1541,14 +1541,14 @@ Functionc88a5: ; c88a5 (32:48a5)
ld [hl], $0 ld [hl], $0
jr .asm_c88d6 jr .asm_c88d6
.asm_c88d0 .asm_c88d0
ld a, [$ffc8] ld a, [hLCDStatCustom + 2]
dec a dec a
ld l, a ld l, a
ld [hl], $0 ld [hl], $0
.asm_c88d6 .asm_c88d6
ld a, [hSCY] ; $ff00+$d0 ld a, [hSCY] ; $ff00+$d0
ld l, a ld l, a
ld a, [$ffc7] ld a, [hLCDStatCustom + 1]
sub l sub l
jr nc, .asm_c88e0 jr nc, .asm_c88e0
xor a xor a
@ -1581,9 +1581,9 @@ Functionc88f6: ; c88f6 (32:48f6)
call Functionc8eca call Functionc8eca
ld a, $43 ld a, $43
call Functionc8ede call Functionc8ede
ld a, [$ffc8] ld a, [hLCDStatCustom + 2]
inc a inc a
ld [$ffc8], a ld [hLCDStatCustom + 2], a
ld hl, $3 ld hl, $3
add hl, bc add hl, bc
ld [hl], $0 ld [hl], $0
@ -1628,9 +1628,9 @@ Functionc8933: ; c8933 (32:4933)
call Functionc8eca call Functionc8eca
ld a, $43 ld a, $43
call Functionc8ede call Functionc8ede
ld a, [$ffc8] ld a, [hLCDStatCustom + 2]
inc a inc a
ld [$ffc8], a ld [hLCDStatCustom + 2], a
ld hl, $3 ld hl, $3
add hl, bc add hl, bc
ld [hl], $0 ld [hl], $0
@ -1668,9 +1668,9 @@ Functionc896d: ; c896d (32:496d)
call Functionc8eca call Functionc8eca
ld a, $43 ld a, $43
call Functionc8ede call Functionc8ede
ld a, [$ffc8] ld a, [hLCDStatCustom + 2]
inc a inc a
ld [$ffc8], a ld [hLCDStatCustom + 2], a
xor a xor a
ld hl, $2 ld hl, $2
add hl, bc add hl, bc
@ -1767,9 +1767,9 @@ Functionc89f7: ; c89f7 (32:49f7)
call Functionc8eca call Functionc8eca
ld a, $42 ld a, $42
call Functionc8ef4 call Functionc8ef4
ld a, [$ffc8] ld a, [hLCDStatCustom + 2]
inc a inc a
ld [$ffc8], a ld [hLCDStatCustom + 2], a
ld hl, $2 ld hl, $2
add hl, bc add hl, bc
ld [hl], $1 ld [hl], $1
@ -1824,14 +1824,14 @@ Functionc8a49: ; c8a49 (32:4a49)
call Functionc8ecb call Functionc8ecb
ld a, $47 ld a, $47
call Functionc8ede call Functionc8ede
ld a, [$ffc8] ld a, [hLCDStatCustom + 2]
inc a inc a
ld [$ffc8], a ld [hLCDStatCustom + 2], a
ld a, [$ffc7] ld a, [hLCDStatCustom + 1]
ld l, a ld l, a
ld h, $d2 ld h, $d2
.asm_c8a60 .asm_c8a60
ld a, [$ffc8] ld a, [hLCDStatCustom + 2]
cp l cp l
jr z, .asm_c8a69 jr z, .asm_c8a69
xor a xor a
@ -1854,9 +1854,9 @@ Functionc8a70: ; c8a70 (32:4a70)
ld hl, $3 ld hl, $3
add hl, bc add hl, bc
ld [hl], $0 ld [hl], $0
ld a, [$ffc7] ld a, [hLCDStatCustom + 1]
inc a inc a
ld [$ffc7], a ld [hLCDStatCustom + 1], a
call Functionc80e5 call Functionc80e5
ret ret
@ -1864,7 +1864,7 @@ Functionc8a88: ; c8a88 (32:4a88)
call Functionc8ab0 call Functionc8ab0
jr nc, .asm_c8a96 jr nc, .asm_c8a96
call Functionc8a9a call Functionc8a9a
ld a, [$ffc8] ld a, [hLCDStatCustom + 2]
dec a dec a
ld l, a ld l, a
ld [hl], e ld [hl], e
@ -1875,9 +1875,9 @@ Functionc8a88: ; c8a88 (32:4a88)
Functionc8a9a: ; c8a9a (32:4a9a) Functionc8a9a: ; c8a9a (32:4a9a)
ld e, a ld e, a
ld a, [$ffc7] ld a, [hLCDStatCustom + 1]
ld l, a ld l, a
ld a, [$ffc8] ld a, [hLCDStatCustom + 2]
sub l sub l
srl a srl a
ld h, $d2 ld h, $d2
@ -1971,9 +1971,9 @@ Functionc8b0e: ; c8b0e (32:4b0e)
ld a, $47 ld a, $47
ld [hLCDStatCustom], a ; $ff00+$c6 ld [hLCDStatCustom], a ; $ff00+$c6
xor a xor a
ld [$ffc7], a ld [hLCDStatCustom + 1], a
ld a, $60 ld a, $60
ld [$ffc8], a ld [hLCDStatCustom + 2], a
ret ret
Functionc8b22: ; c8b22 (32:4b22) Functionc8b22: ; c8b22 (32:4b22)
@ -2221,9 +2221,9 @@ Functionc8c68: ; c8c68 (32:4c68)
call Functionc8eca call Functionc8eca
ld a, $43 ld a, $43
call Functionc8ede call Functionc8ede
ld a, [$ffc8] ld a, [hLCDStatCustom + 2]
inc a inc a
ld [$ffc8], a ld [hLCDStatCustom + 2], a
ld hl, $2 ld hl, $2
add hl, bc add hl, bc
ld [hl], $1 ld [hl], $1
@ -2268,9 +2268,9 @@ Functionc8cab: ; c8cab (32:4cab)
ld a, $43 ld a, $43
ld [hLCDStatCustom], a ; $ff00+$c6 ld [hLCDStatCustom], a ; $ff00+$c6
xor a xor a
ld [$ffc7], a ld [hLCDStatCustom + 1], a
ld a, $37 ld a, $37
ld [$ffc8], a ld [hLCDStatCustom + 2], a
ld hl, $3 ld hl, $3
add hl, bc add hl, bc
ld [hl], $0 ld [hl], $0
@ -2431,9 +2431,9 @@ Functionc8d8b: ; c8d8b (32:4d8b)
call Functionc8ecb call Functionc8ecb
ld a, $47 ld a, $47
call Functionc8ede call Functionc8ede
ld a, [$ffc8] ld a, [hLCDStatCustom + 2]
inc a inc a
ld [$ffc8], a ld [hLCDStatCustom + 2], a
ld hl, $3 ld hl, $3
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
@ -2669,9 +2669,9 @@ Functionc8ede: ; c8ede (32:4ede)
ld de, $2f5e ld de, $2f5e
.asm_c8eed .asm_c8eed
ld a, d ld a, d
ld [$ffc7], a ld [hLCDStatCustom + 1], a
ld a, e ld a, e
ld [$ffc8], a ld [hLCDStatCustom + 2], a
ret ret
Functionc8ef4: ; c8ef4 (32:4ef4) Functionc8ef4: ; c8ef4 (32:4ef4)
@ -2684,15 +2684,15 @@ Functionc8ef4: ; c8ef4 (32:4ef4)
ld de, $2d5e ld de, $2d5e
.asm_c8f03 .asm_c8f03
ld a, d ld a, d
ld [$ffc7], a ld [hLCDStatCustom + 1], a
ld a, e ld a, e
ld [$ffc8], a ld [hLCDStatCustom + 2], a
ret ret
Functionc8f0a: ; c8f0a (32:4f0a) Functionc8f0a: ; c8f0a (32:4f0a)
xor a xor a
ld [$ffc7], a ld [hLCDStatCustom + 1], a
ld [$ffc8], a ld [hLCDStatCustom + 2], a
call Functionc8eca call Functionc8eca
xor a xor a
ld [hLCDStatCustom], a ; $ff00+$c6 ld [hLCDStatCustom], a ; $ff00+$c6
@ -2706,8 +2706,8 @@ Functionc8f19: ; c8f19 (32:4f19)
ld [rBGP], a ; $ff00+$47 ld [rBGP], a ; $ff00+$47
ld [wcfc7], a ld [wcfc7], a
ld [wcfc9], a ld [wcfc9], a
ld [$ffc7], a ld [hLCDStatCustom + 1], a
ld [$ffc8], a ld [hLCDStatCustom + 2], a
call Functionc8eca call Functionc8eca
ret ret
@ -2723,10 +2723,10 @@ Functionc8f2e: ; c8f2e (32:4f2e)
ld [BattleAnimTemps + 3], a ld [BattleAnimTemps + 3], a
ld bc, LYOverridesBackup ld bc, LYOverridesBackup
.asm_c8f43 .asm_c8f43
ld a, [$ffc7] ld a, [hLCDStatCustom + 1]
cp c cp c
jr nc, .asm_c8f58 jr nc, .asm_c8f58
ld a, [$ffc8] ld a, [hLCDStatCustom + 2]
cp c cp c
jr c, .asm_c8f58 jr c, .asm_c8f58
ld a, [BattleAnimTemps + 2] ld a, [BattleAnimTemps + 2]
@ -2800,14 +2800,14 @@ Functionc8f9a: ; c8f9a (32:4f9a)
call Functionc905d call Functionc905d
ld e, a ld e, a
pop hl pop hl
ld a, [$ffc8] ld a, [hLCDStatCustom + 2]
cp c cp c
jr c, .asm_c8fcf jr c, .asm_c8fcf
ld a, e ld a, e
ld [bc], a ld [bc], a
inc bc inc bc
.asm_c8fcf .asm_c8fcf
ld a, [$ffc7] ld a, [hLCDStatCustom + 1]
cp l cp l
jr nc, .asm_c8fd6 jr nc, .asm_c8fd6
ld [hl], e ld [hl], e
@ -2824,7 +2824,7 @@ Functionc8f9a: ; c8f9a (32:4f9a)
ret ret
Functionc8fe4: ; c8fe4 (32:4fe4) Functionc8fe4: ; c8fe4 (32:4fe4)
ld a, [$ffc7] ld a, [hLCDStatCustom + 1]
ld e, a ld e, a
ld a, [BattleAnimTemps] ld a, [BattleAnimTemps]
add e add e
@ -2834,13 +2834,13 @@ Functionc8fe4: ; c8fe4 (32:4fe4)
Functionc8fef: ; c8fef (32:4fef) Functionc8fef: ; c8fef (32:4fef)
push bc push bc
ld a, [$ffc7] ld a, [hLCDStatCustom + 1]
ld l, a ld l, a
inc a inc a
ld e, a ld e, a
ld h, $d2 ld h, $d2
ld d, h ld d, h
ld a, [$ffc8] ld a, [hLCDStatCustom + 2]
sub l sub l
and a and a
jr z, .asm_c9009 jr z, .asm_c9009
@ -2862,9 +2862,9 @@ Functionc8fef: ; c8fef (32:4fef)
Functionc900b: ; c900b (32:500b) Functionc900b: ; c900b (32:500b)
push af push af
ld h, $d2 ld h, $d2
ld a, [$ffc7] ld a, [hLCDStatCustom + 1]
ld l, a ld l, a
ld a, [$ffc8] ld a, [hLCDStatCustom + 2]
sub l sub l
ld d, a ld d, a
pop af pop af
@ -2877,14 +2877,14 @@ Functionc900b: ; c900b (32:500b)
Functionc901b: ; c901b (32:501b) Functionc901b: ; c901b (32:501b)
push af push af
ld e, a ld e, a
ld a, [$ffc7] ld a, [hLCDStatCustom + 1]
ld l, a ld l, a
ld a, [$ffc8] ld a, [hLCDStatCustom + 2]
sub l sub l
sub e sub e
ld d, a ld d, a
ld h, $d2 ld h, $d2
ld a, [$ffc7] ld a, [hLCDStatCustom + 1]
ld l, a ld l, a
ld a, $90 ld a, $90
.asm_c902c .asm_c902c

View File

@ -3233,7 +3233,7 @@ Function3d444: ; 3d444
Function3d490: ; 3d490 Function3d490: ; 3d490
ld [$ffaf], a ld [hConnectionStripLength], a
ld c, a ld c, a
.asm_3d493 .asm_3d493
push bc push bc
@ -3257,7 +3257,7 @@ Function3d490: ; 3d490
; 3d4ae ; 3d4ae
Function3d4ae: ; 3d4ae Function3d4ae: ; 3d4ae
ld a, [$ffaf] ld a, [hConnectionStripLength]
ld c, a ld c, a
cp $8 cp $8
jr nz, .back jr nz, .back
@ -9442,7 +9442,7 @@ Function3fc30: ; 3fc30
Function3fc5b: ; 3fc5b Function3fc5b: ; 3fc5b
ld hl, Sprites ld hl, Sprites
xor a xor a
ld [$ffaf], a ld [hConnectionStripLength], a
ld b, $6 ld b, $6
ld e, $a8 ld e, $a8
.asm_3fc65 .asm_3fc65
@ -9453,10 +9453,10 @@ Function3fc5b: ; 3fc5b
inc hl inc hl
ld [hl], e ld [hl], e
inc hl inc hl
ld a, [$ffaf] ld a, [hConnectionStripLength]
ld [hli], a ld [hli], a
inc a inc a
ld [$ffaf], a ld [hConnectionStripLength], a
ld a, $1 ld a, $1
ld [hli], a ld [hli], a
ld a, d ld a, d
@ -9464,9 +9464,9 @@ Function3fc5b: ; 3fc5b
ld d, a ld d, a
dec c dec c
jr nz, .asm_3fc69 jr nz, .asm_3fc69
ld a, [$ffaf] ld a, [hConnectionStripLength]
add $3 add $3
ld [$ffaf], a ld [hConnectionStripLength], a
ld a, e ld a, e
add $8 add $8
ld e, a ld e, a

View File

@ -1390,7 +1390,7 @@ BattleCommand07: ; 346d2
cp c cp c
jr z, .stab jr z, .stab
jr .asm_3473a jr .SkipStab
.stab .stab
ld hl, CurDamage + 1 ld hl, CurDamage + 1
@ -1412,13 +1412,13 @@ BattleCommand07: ; 346d2
ld hl, TypeModifier ld hl, TypeModifier
set 7, [hl] set 7, [hl]
.asm_3473a .SkipStab
ld a, BATTLE_VARS_MOVE_TYPE ld a, BATTLE_VARS_MOVE_TYPE
call GetBattleVar call GetBattleVar
ld b, a ld b, a
ld hl, TypeMatchup ld hl, TypeMatchup
.asm_34743 .TypesLoop
ld a, [hli] ld a, [hli]
cp $ff cp $ff
@ -1426,38 +1426,39 @@ BattleCommand07: ; 346d2
; foresight ; foresight
cp $fe cp $fe
jr nz, .asm_34757 jr nz, .SkipForesightCheck
ld a, BATTLE_VARS_SUBSTATUS1_OPP ld a, BATTLE_VARS_SUBSTATUS1_OPP
call GetBattleVar call GetBattleVar
bit SUBSTATUS_IDENTIFIED, a bit SUBSTATUS_IDENTIFIED, a
jr nz, .end jr nz, .end
jr .asm_34743 jr .TypesLoop
.asm_34757 .SkipForesightCheck
cp b cp b
jr nz, .asm_347b3 jr nz, .SkipType
ld a, [hl] ld a, [hl]
cp d cp d
jr z, .asm_34763 jr z, .GotMatchup
cp e cp e
jr z, .asm_34763 jr z, .GotMatchup
jr .asm_347b3 jr .SkipType
.asm_34763 .GotMatchup
push hl push hl
push bc push bc
inc hl inc hl
ld a, [TypeModifier] ld a, [TypeModifier]
and %10000000 and %10000000
ld b, a ld b, a
; If the target is immune to the move, treat it as a miss and calculate the damage as 0
ld a, [hl] ld a, [hl]
and a and a
jr nz, .asm_34775 jr nz, .NotImmune
inc a inc a
ld [AttackMissed], a ld [AttackMissed], a
xor a xor a
.asm_34775 .NotImmune
ld [hMultiplier], a ld [hMultiplier], a
add b add b
ld [TypeModifier], a ld [TypeModifier], a
@ -1480,34 +1481,35 @@ BattleCommand07: ; 346d2
ld b, a ld b, a
ld a, [hProduct + 3] ld a, [hProduct + 3]
or b or b
jr z, .asm_347ab jr z, .ok ; This is a very convoluted way to get back that we've essentially dealt no damage.
ld a, $a ; Take the product and divide it by 10.
ld a, 10
ld [hDivisor], a ld [hDivisor], a
ld b, $4 ld b, 4
call Divide call Divide
ld a, [hQuotient + 1] ld a, [hQuotient + 1]
ld b, a ld b, a
ld a, [hQuotient + 2] ld a, [hQuotient + 2]
or b or b
jr nz, .asm_347ab jr nz, .ok
ld a, $1 ld a, 1
ld [$ffb6], a ld [hMultiplicand + 2], a
.asm_347ab .ok
ld a, [$ffb5] ld a, [hMultiplicand + 1]
ld [hli], a ld [hli], a
ld a, [$ffb6] ld a, [hMultiplicand + 2]
ld [hl], a ld [hl], a
pop bc pop bc
pop hl pop hl
.asm_347b3 .SkipType
rept 2 rept 2
inc hl inc hl
endr endr
jr .asm_34743 jr .TypesLoop
.end .end
call Function347c8 call Function347c8
@ -1545,32 +1547,32 @@ Function347d3: ; 347d3
ld a, 10 ; 1.0 ld a, 10 ; 1.0
ld [wd265], a ld [wd265], a
ld hl, TypeMatchup ld hl, TypeMatchup
.asm_347e7 .TypesLoop
ld a, [hli] ld a, [hli]
cp $ff cp $ff
jr z, .asm_3482f jr z, .End
cp $fe cp $fe
jr nz, .asm_347fb jr nz, .Next
ld a, BATTLE_VARS_SUBSTATUS1_OPP ld a, BATTLE_VARS_SUBSTATUS1_OPP
call GetBattleVar call GetBattleVar
bit SUBSTATUS_IDENTIFIED, a bit SUBSTATUS_IDENTIFIED, a
jr nz, .asm_3482f jr nz, .End
jr .asm_347e7 jr .TypesLoop
.asm_347fb .Next
cp d cp d
jr nz, .asm_34807 jr nz, .Nope
ld a, [hli] ld a, [hli]
cp b cp b
jr z, .asm_3480b jr z, .Yup
cp c cp c
jr z, .asm_3480b jr z, .Yup
jr .asm_34808 jr .Nope2
.asm_34807 .Nope
inc hl inc hl
.asm_34808 .Nope2
inc hl inc hl
jr .asm_347e7 jr .TypesLoop
.asm_3480b .Yup
xor a xor a
ld [hDividend + 0], a ld [hDividend + 0], a
ld [hMultiplicand + 0], a ld [hMultiplicand + 0], a
@ -1588,9 +1590,9 @@ Function347d3: ; 347d3
pop bc pop bc
ld a, [hQuotient + 2] ld a, [hQuotient + 2]
ld [wd265], a ld [wd265], a
jr .asm_347e7 jr .TypesLoop
.asm_3482f .End
pop bc pop bc
pop de pop de
pop hl pop hl
@ -1603,14 +1605,14 @@ BattleCommanda3: ; 34833
ld a, [wd265] ld a, [wd265]
and a and a
ld a, 10 ; 1.0 ld a, 10 ; 1.0
jr nz, .asm_3484a jr nz, .skip
call ResetDamage call ResetDamage
xor a xor a
ld [TypeModifier], a ld [TypeModifier], a
inc a inc a
ld [AttackMissed], a ld [AttackMissed], a
ret ret
.asm_3484a .skip
ld [wd265], a ld [wd265], a
ret ret
; 3484e ; 3484e

View File

@ -72,3 +72,7 @@ PLAYER_SURF_PIKA EQU 8
OBJECT_STRUCT_LENGTH EQU 40 OBJECT_STRUCT_LENGTH EQU 40
NUM_OBJECT_STRUCTS EQU 13 NUM_OBJECT_STRUCTS EQU 13
; After-Champion Spawn
SPAWN_LANCE EQU 1
SPAWN_RED EQU 2

View File

@ -121,7 +121,7 @@ StartMap: ; 96724
xor a xor a
ld [ScriptRunning], a ld [ScriptRunning], a
ld hl, MapStatus ld hl, MapStatus
ld bc, $3e ld bc, $3e ; 62
call ByteFill call ByteFill
callba Function113e5 callba Function113e5
call ClearJoypad call ClearJoypad
@ -137,13 +137,13 @@ EnterMap: ; 9673e
callba RunMapSetupScript callba RunMapSetupScript
call ClearAllScriptFlags3 call ClearAllScriptFlags3
ld a, [$ff9f] ld a, [hMapEntryMethod]
cp $f7 cp $f7
jr nz, .dontset jr nz, .dontset
call SetAll_ScriptFlags3 call SetAll_ScriptFlags3
.dontset .dontset
ld a, [$ff9f] ld a, [hMapEntryMethod]
cp $f3 cp $f3
jr nz, .dontresetpoison jr nz, .dontresetpoison
xor a xor a
@ -151,7 +151,7 @@ EnterMap: ; 9673e
.dontresetpoison .dontresetpoison
xor a xor a
ld [$ff9f], a ld [hMapEntryMethod], a
ld a, 2 ; HandleMap ld a, 2 ; HandleMap
ld [MapStatus], a ld [MapStatus], a
ret ret

View File

@ -1499,7 +1499,7 @@ Function4af0: ; 4af0
add hl, bc add hl, bc
ld [hl], 2 ld [hl], 2
ld hl, wd4cf ld hl, wd4cf
ld a, [$ffaf] ld a, [hConnectionStripLength]
cp [hl] cp [hl]
jr z, .ok jr z, .ok
ld hl, OBJECT_09 ld hl, OBJECT_09
@ -2508,7 +2508,7 @@ Function54b8: ; 54b8
ret z ret z
ld a, [wd4cd] ld a, [wd4cd]
ld d, a ld d, a
ld a, [$ffaf] ld a, [hConnectionStripLength]
cp d cp d
ret nz ret nz
ld a, e ld a, e
@ -2651,7 +2651,7 @@ Function5565: ; 5565
Function5579: ; 5579 Function5579: ; 5579
push bc push bc
ld a, [$ffaf] ld a, [hConnectionStripLength]
ld c, a ld c, a
call Function5582 call Function5582
pop bc pop bc
@ -2712,7 +2712,7 @@ Function55b9: ; 55b9
ld [hli], a ld [hli], a
ld a, [de] ld a, [de]
ld [hli], a ld [hli], a
ld a, [$ffaf] ld a, [hConnectionStripLength]
ld [hli], a ld [hli], a
push hl push hl
ld hl, OBJECT_MAP_X ld hl, OBJECT_MAP_X
@ -2737,7 +2737,7 @@ Function55e0:: ; 55e0
ld bc, ObjectStructs ld bc, ObjectStructs
xor a xor a
.loop .loop
ld [$ffaf], a ld [hConnectionStripLength], a
call GetObjectSprite call GetObjectSprite
jr z, .ok jr z, .ok
call Function565c call Function565c
@ -2747,7 +2747,7 @@ Function55e0:: ; 55e0
add hl, bc add hl, bc
ld b, h ld b, h
ld c, l ld c, l
ld a, [$ffaf] ld a, [hConnectionStripLength]
inc a inc a
cp NUM_OBJECT_STRUCTS cp NUM_OBJECT_STRUCTS
jr nz, .loop jr nz, .loop
@ -2801,13 +2801,13 @@ Function5645: ; 5645
xor a xor a
ld bc, ObjectStructs ld bc, ObjectStructs
.loop .loop
ld [$ffaf], a ld [hConnectionStripLength], a
call Function5680 call Function5680
ld hl, OBJECT_STRUCT_LENGTH ld hl, OBJECT_STRUCT_LENGTH
add hl, bc add hl, bc
ld b, h ld b, h
ld c, l ld c, l
ld a, [$ffaf] ld a, [hConnectionStripLength]
inc a inc a
cp NUM_OBJECT_STRUCTS cp NUM_OBJECT_STRUCTS
jr nz, .loop jr nz, .loop
@ -3032,7 +3032,7 @@ Function5781: ; 5781
ld bc, ObjectStructs ld bc, ObjectStructs
xor a xor a
.loop .loop
ld [$ffaf], a ld [hConnectionStripLength], a
call GetObjectSprite call GetObjectSprite
jr z, .next jr z, .next
call Function437b call Function437b
@ -3042,7 +3042,7 @@ Function5781: ; 5781
add hl, bc add hl, bc
ld b, h ld b, h
ld c, l ld c, l
ld a, [$ffaf] ld a, [hConnectionStripLength]
inc a inc a
cp NUM_OBJECT_STRUCTS cp NUM_OBJECT_STRUCTS
jr nz, .loop jr nz, .loop

View File

@ -1,6 +1,6 @@
RunMapSetupScript:: ; 15363 RunMapSetupScript:: ; 15363
ld a, [$ff9f] ld a, [hMapEntryMethod]
and $f and $f
dec a dec a
ld c, a ld c, a

View File

@ -36,7 +36,7 @@ PredefPointers:: ; 856b
add_predef FlagPredef add_predef FlagPredef
add_predef Functionc699 add_predef Functionc699
add_predef FillPP add_predef FillPP
add_predef Functiond88c add_predef TryAddMonToParty
add_predef Functionda96 add_predef Functionda96
add_predef Functiondb3f ; $8 add_predef Functiondb3f ; $8
add_predef SentPkmnIntoBox add_predef SentPkmnIntoBox

View File

@ -1258,7 +1258,7 @@ Script_appear: ; 0x972dd
call GetScriptByte call GetScriptByte
call GetScriptPerson call GetScriptPerson
call _CopyObjectStruct call _CopyObjectStruct
ld a, [$ffaf] ld a, [hConnectionStripLength]
ld b, 0 ; clear ld b, 0 ; clear
call ApplyEventActionAppearDisappear call ApplyEventActionAppearDisappear
ret ret
@ -1276,7 +1276,7 @@ Script_disappear: ; 0x972ee
ld a, [hLastTalked] ld a, [hLastTalked]
.ok .ok
call DeleteObjectStruct call DeleteObjectStruct
ld a, [$ffaf] ld a, [hConnectionStripLength]
ld b, 1 ; set ld b, 1 ; set
call ApplyEventActionAppearDisappear call ApplyEventActionAppearDisappear
callba RefreshMapAppearDisappear callba RefreshMapAppearDisappear
@ -1584,7 +1584,7 @@ Script_reloadmap: ; 0x97491
xor a xor a
ld [wd459], a ld [wd459], a
ld a, $f3 ld a, $f3
ld [$ff9f], a ld [hMapEntryMethod], a
ld a, $1 ld a, $1
call LoadMapStatus call LoadMapStatus
call StopScript call StopScript
@ -2839,7 +2839,7 @@ Script_warp: ; 0x97a1d
ld a, -1 ld a, -1
ld [wd001], a ld [wd001], a
ld a, -15 ld a, -15
ld [$ff9f], a ld [hMapEntryMethod], a
ld a, 1 ld a, 1
call LoadMapStatus call LoadMapStatus
call StopScript call StopScript
@ -2851,7 +2851,7 @@ Script_warp: ; 0x97a1d
ld a, -1 ld a, -1
ld [wd001], a ld [wd001], a
ld a, -5 ld a, -5
ld [$ff9f], a ld [hMapEntryMethod], a
ld a, 1 ld a, 1
call LoadMapStatus call LoadMapStatus
call StopScript call StopScript
@ -2994,7 +2994,7 @@ Script_newloadmap: ; 0x97b08
; which_method (SingleByteParam) ; which_method (SingleByteParam)
call GetScriptByte call GetScriptByte
ld [$ff9f], a ld [hMapEntryMethod], a
ld a, 1 ld a, 1
call LoadMapStatus call LoadMapStatus
call StopScript call StopScript
@ -3198,7 +3198,7 @@ Script_halloffame: ; 0x97bd5
Script_credits: ; 0x97bf3 Script_credits: ; 0x97bf3
; script command 0xa2 ; script command 0xa2
callba Function86455 callba RedCredits
; fallthrough ; fallthrough
DisplayCredits: DisplayCredits:

View File

@ -354,12 +354,12 @@ Functiona57:: ; a57
; a80 ; a80
Functiona80:: ; a80 Functiona80:: ; a80
ld a, [$ffaf] ld a, [hConnectionStripLength]
push af push af
ld a, [$ffb0] ld a, [$ffb0]
push af push af
xor a xor a
ld [$ffaf], a ld [hConnectionStripLength], a
ld a, $6 ld a, $6
ld [$ffb0], a ld [$ffb0], a
.asm_a8d .asm_a8d
@ -374,7 +374,7 @@ Functiona80:: ; a80
pop af pop af
ld [$ffb0], a ld [$ffb0], a
pop af pop af
ld [$ffaf], a ld [hConnectionStripLength], a
ret ret
; aa5 ; aa5
@ -452,9 +452,9 @@ Functionb06:: ; b06
cp b cp b
pop bc pop bc
jr nz, .asm_b27 jr nz, .asm_b27
ld a, [$ffaf] ld a, [hConnectionStripLength]
dec a dec a
ld [$ffaf], a ld [hConnectionStripLength], a
ret nz ret nz
ld a, [$ffb0] ld a, [$ffb0]
dec a dec a
@ -463,20 +463,20 @@ Functionb06:: ; b06
ld a, $7a ld a, $7a
ld [hl], a ld [hl], a
ld a, $ff ld a, $ff
ld [$ffaf], a ld [hConnectionStripLength], a
ld a, $6 ld a, $6
ld [$ffb0], a ld [$ffb0], a
ret ret
.asm_b27 .asm_b27
ld a, [$ffaf] ld a, [hConnectionStripLength]
and a and a
ret z ret z
dec a dec a
ld [$ffaf], a ld [hConnectionStripLength], a
ret nz ret nz
dec a dec a
ld [$ffaf], a ld [hConnectionStripLength], a
ld a, [$ffb0] ld a, [$ffb0]
dec a dec a
ld [$ffb0], a ld [$ffb0], a

View File

@ -207,10 +207,10 @@ endr
Function222a:: ; 222a Function222a:: ; 222a
ld a, $fa ld a, $fa
ld [$ff9f], a ld [hMapEntryMethod], a
callba RunMapSetupScript callba RunMapSetupScript
xor a xor a
ld [$ff9f], a ld [hMapEntryMethod], a
ret ret
; 2238 ; 2238

View File

@ -17,6 +17,7 @@ hSeconds EQU $ff98
hROMBank EQU $ff9d hROMBank EQU $ff9d
hVBlank EQU $ff9e hVBlank EQU $ff9e
hMapEntryMethod EQU $ff9f
hJoypadReleased EQU $ffa2 hJoypadReleased EQU $ffa2
hJoypadPressed EQU $ffa3 hJoypadPressed EQU $ffa3

View File

@ -562,7 +562,7 @@ endr
ld [MonType], a ld [MonType], a
call ClearSprites call ClearSprites
predef Functiond88c predef TryAddMonToParty
callba Function4db49 callba Function4db49
@ -691,7 +691,7 @@ endr
jr .asm_ebe2 jr .asm_ebe2
.asm_ebd1 .asm_ebd1
callba Functione6ce callba BugContest_SetCaughtContestMon
jr .asm_ebe2 jr .asm_ebe2
.asm_ebd9 .asm_ebd9

305
main.asm
View File

@ -142,8 +142,8 @@ NewGame: ; 5b6b
ld [wd001], a ld [wd001], a
ld a, $f1 ld a, $f1
ld [$ff9f], a ld [hMapEntryMethod], a
jp Function5e5d jp FinishContinueFunction
; 5b8f ; 5b8f
Function5b8f: ; 5b8f Function5b8f: ; 5b8f
@ -421,18 +421,18 @@ Continue: ; 5d65
ld [hBGMapMode], a ld [hBGMapMode], a
ld c, $14 ld c, $14
call DelayFrames call DelayFrames
call Function5e34 call ConfirmContinue
jr nc, .asm_5d8c jr nc, .Check1Pass
call WriteBackup call WriteBackup
jr .FailToLoad jr .FailToLoad
.asm_5d8c .Check1Pass
call Function5e48 call Function5e48
jr nc, .asm_5d96 jr nc, .Check2Pass
call WriteBackup call WriteBackup
jr .FailToLoad jr .FailToLoad
.asm_5d96 .Check2Pass
ld a, $8 ld a, $8
ld [MusicFade], a ld [MusicFade], a
ld a, MUSIC_NONE % $100 ld a, MUSIC_NONE % $100
@ -443,38 +443,38 @@ Continue: ; 5d65
call Function5df0 call Function5df0
call WriteBackup call WriteBackup
call ClearTileMap call ClearTileMap
ld c, $14 ld c, 20
call DelayFrames call DelayFrames
callba JumpRoamMons callba JumpRoamMons
callba Function105091 callba Function105091
callba Function140ae callba Function140ae
ld a, [wd4b5] ld a, [wSpawnAfterChampion]
cp $1 cp SPAWN_LANCE
jr z, .asm_5dd7 jr z, .SpawnAfterE4
ld a, $f2 ld a, $f2
ld [$ff9f], a ld [hMapEntryMethod], a
jp Function5e5d jp FinishContinueFunction
.FailToLoad .FailToLoad
ret ret
.asm_5dd7 .SpawnAfterE4
ld a, SPAWN_NEW_BARK ld a, SPAWN_NEW_BARK
ld [wd001], a ld [wd001], a
call Function5de7 call PostCreditsSpawn
jp Function5e5d jp FinishContinueFunction
; 5de2 ; 5de2
Function5de2: ; 5de2 SpawnAfterRed: ; 5de2
ld a, SPAWN_MT_SILVER ld a, SPAWN_MT_SILVER
ld [wd001], a ld [wd001], a
; 5de7 ; 5de7
Function5de7: ; 5de7 PostCreditsSpawn: ; 5de7
xor a xor a
ld [wd4b5], a ld [wSpawnAfterChampion], a
ld a, $f1 ld a, $f1
ld [$ff9f], a ld [hMapEntryMethod], a
ret ret
; 5df0 ; 5df0
@ -506,40 +506,40 @@ Function5df0: ; 5df0
ret ret
; 5e34 ; 5e34
Function5e34: ; 5e34 ConfirmContinue: ; 5e34
.asm_5e34 .loop
call DelayFrame call DelayFrame
call GetJoypad call GetJoypad
ld hl, hJoyPressed ld hl, hJoyPressed
bit 0, [hl] bit 0, [hl]
jr nz, .asm_5e47 jr nz, .PressA
bit 1, [hl] bit 1, [hl]
jr z, .asm_5e34 jr z, .loop
scf scf
ret ret
.asm_5e47 .PressA
ret ret
; 5e48 ; 5e48
Function5e48: ; 5e48 Function5e48: ; 5e48
call Function6e3 call Function6e3
and $80 and $80
jr z, .asm_5e5b jr z, .pass
callba Function20021 callba Function20021
ld a, c ld a, c
and a and a
jr z, .asm_5e5b jr z, .pass
scf scf
ret ret
.asm_5e5b .pass
xor a xor a
ret ret
; 5e5d ; 5e5d
Function5e5d: ; 5e5d FinishContinueFunction: ; 5e5d
.asm_5e5d .loop
xor a xor a
ld [wc2c1], a ld [wc2c1], a
ld [InLinkBattle], a ld [InLinkBattle], a
@ -549,14 +549,14 @@ Function5e5d: ; 5e5d
ld hl, wd83e ld hl, wd83e
set 1, [hl] set 1, [hl]
callba OverworldLoop callba OverworldLoop
ld a, [wd4b5] ld a, [wSpawnAfterChampion]
cp $2 cp SPAWN_RED
jr z, .asm_5e80 jr z, .AfterRed
jp Reset jp Reset
.asm_5e80 .AfterRed
call Function5de2 call SpawnAfterRed
jr .asm_5e5d jr .loop
; 5e85 ; 5e85
Function5e85: ; 5e85 Function5e85: ; 5e85
@ -2354,7 +2354,7 @@ CheckFacingObject:: ; 6fd9
.asm_6ff1 .asm_6ff1
ld bc, ObjectStructs ; redundant ld bc, ObjectStructs ; redundant
ld a, 0 ld a, 0
ld [$ffaf], a ld [hConnectionStripLength], a
call Function7041 call Function7041
ret nc ret nc
ld hl, OBJECT_DIRECTION_WALKING ld hl, OBJECT_DIRECTION_WALKING
@ -2382,7 +2382,7 @@ Function7009: ; 7009
; 7015 ; 7015
Function7015: ; 7015 Function7015: ; 7015
ld a, [$ffaf] ld a, [hConnectionStripLength]
call GetObjectStruct call GetObjectStruct
call Function7021 call Function7021
call Function7041 call Function7041
@ -2450,7 +2450,7 @@ Function7041: ; 7041
jr nz, .ok jr nz, .ok
.ok2 .ok2
ld a, [$ffaf] ld a, [hConnectionStripLength]
ld l, a ld l, a
ld a, [$ffb0] ld a, [$ffb0]
cp l cp l
@ -2467,7 +2467,7 @@ Function7041: ; 7041
ld a, [hl] ld a, [hl]
cp e cp e
jr nz, .nope jr nz, .nope
ld a, [$ffaf] ld a, [hConnectionStripLength]
ld l, a ld l, a
ld a, [$ffb0] ld a, [$ffb0]
cp l cp l
@ -2932,7 +2932,7 @@ SpecialGiveShuckle: ; 7305
ld a, 15 ld a, 15
ld [CurPartyLevel], a ld [CurPartyLevel], a
predef Functiond88c predef TryAddMonToParty
jr nc, .NotGiven jr nc, .NotGiven
; Caught data. ; Caught data.
@ -3205,7 +3205,7 @@ GetSpawnCoord: ; 8029
.ok .ok
ld [hl], e ld [hl], e
ld a, $0 ld a, $0
ld [$ffaf], a ld [hConnectionStripLength], a
ld bc, MapObjects ld bc, MapObjects
ld a, $0 ld a, $0
ld [$ffb0], a ld [$ffb0], a
@ -3262,7 +3262,7 @@ Function80a1:: ; 80a1
ld hl, OBJECT_MAP_Y ld hl, OBJECT_MAP_Y
add hl, bc add hl, bc
ld e, [hl] ld e, [hl]
ld a, [$ffaf] ld a, [hConnectionStripLength]
ld b, a ld b, a
call Function807e call Function807e
and a and a
@ -3343,7 +3343,7 @@ Function811d: ; 811d
ld hl, MAPOBJECT_OBJECT_STRUCT_ID ld hl, MAPOBJECT_OBJECT_STRUCT_ID
add hl, bc add hl, bc
ld [hl], a ld [hl], a
ld a, [$ffaf] ld a, [hConnectionStripLength]
ld [wc2f0], a ld [wc2f0], a
ld hl, MAPOBJECT_SPRITE ld hl, MAPOBJECT_SPRITE
add hl, bc add hl, bc
@ -3391,7 +3391,7 @@ Function8177: ; 8177
ld bc, MapObjects + OBJECT_LENGTH ld bc, MapObjects + OBJECT_LENGTH
ld a, 1 ld a, 1
.loop .loop
ld [$ffaf], a ld [hConnectionStripLength], a
ld hl, MAPOBJECT_SPRITE ld hl, MAPOBJECT_SPRITE
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
@ -3432,7 +3432,7 @@ Function8177: ; 8177
add hl, bc add hl, bc
ld b, h ld b, h
ld c, l ld c, l
ld a, [$ffaf] ld a, [hConnectionStripLength]
inc a inc a
cp NUM_OBJECTS cp NUM_OBJECTS
jr nz, .loop jr nz, .loop
@ -3476,7 +3476,7 @@ Function81ea: ; 81ea
ld bc, MapObjects + OBJECT_LENGTH ld bc, MapObjects + OBJECT_LENGTH
ld a, 1 ld a, 1
.loop .loop
ld [$ffaf], a ld [hConnectionStripLength], a
ld hl, MAPOBJECT_SPRITE ld hl, MAPOBJECT_SPRITE
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
@ -3511,7 +3511,7 @@ Function81ea: ; 81ea
add hl, bc add hl, bc
ld b, h ld b, h
ld c, l ld c, l
ld a, [$ffaf] ld a, [hConnectionStripLength]
inc a inc a
cp NUM_OBJECTS cp NUM_OBJECTS
jr nz, .loop jr nz, .loop
@ -3534,7 +3534,7 @@ Function823e: ; 823e
ld bc, MapObjects + OBJECT_LENGTH ld bc, MapObjects + OBJECT_LENGTH
ld a, 1 ld a, 1
.loop .loop
ld [$ffaf], a ld [hConnectionStripLength], a
ld hl, MAPOBJECT_SPRITE ld hl, MAPOBJECT_SPRITE
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
@ -3569,7 +3569,7 @@ Function823e: ; 823e
add hl, bc add hl, bc
ld b, h ld b, h
ld c, l ld c, l
ld a, [$ffaf] ld a, [hConnectionStripLength]
inc a inc a
cp NUM_OBJECTS cp NUM_OBJECTS
jr nz, .loop jr nz, .loop
@ -7915,40 +7915,47 @@ Functiond839: ; d839
; d88c ; d88c
Functiond88c: ; d88c TryAddMonToParty: ; d88c
; Whose is it?
ld de, PartyCount ld de, PartyCount
ld a, [MonType] ld a, [MonType]
and $f and $f
jr z, .asm_d899 jr z, .getpartylocation
ld de, OTPartyCount ld de, OTPartyCount
.asm_d899 .getpartylocation
; Do we have room for it?
ld a, [de] ld a, [de]
inc a inc a
cp PARTY_LENGTH + 1 cp PARTY_LENGTH + 1
ret nc ret nc
; Increase the party count
ld [de], a ld [de], a
ld a, [de] ld a, [de] ; Why are we doing this?
ld [$ffae], a ld [$ffae], a ; HRAM backup
add e add e
ld e, a ld e, a
jr nc, .asm_d8a7 jr nc, .loadspecies
inc d inc d
.asm_d8a7 .loadspecies
; Load the species of the Pokemon into the party list.
; The terminator is usually here, but it'll be back.
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
ld [de], a ld [de], a
; Load the terminator into the next slot.
inc de inc de
ld a, $ff ld a, -1
ld [de], a ld [de], a
; Now let's load the OT name.
ld hl, PartyMonOT ld hl, PartyMonOT
ld a, [MonType] ld a, [MonType]
and $f and $f
jr z, .asm_d8bc jr z, .loadOTname
ld hl, OTPartyMonOT ld hl, OTPartyMonOT
.asm_d8bc .loadOTname
ld a, [$ffae] ld a, [$ffae] ; Restore index from backup
dec a dec a
call SkipNames call SkipNames
ld d, h ld d, h
@ -7958,7 +7965,7 @@ Functiond88c: ; d88c
call CopyBytes call CopyBytes
ld a, [MonType] ld a, [MonType]
and a and a
jr nz, .asm_d8f0 jr nz, .skipnickname
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
ld [wd265], a ld [wd265], a
call GetPokemonName call GetPokemonName
@ -7972,19 +7979,19 @@ Functiond88c: ; d88c
ld bc, PKMN_NAME_LENGTH ld bc, PKMN_NAME_LENGTH
call CopyBytes call CopyBytes
.asm_d8f0 .skipnickname
ld hl, PartyMon1Species ld hl, PartyMon1Species
ld a, [MonType] ld a, [MonType]
and $f and $f
jr z, .asm_d8fd jr z, .initializeStats
ld hl, OTPartyMon1Species ld hl, OTPartyMon1Species
.asm_d8fd .initializeStats
ld a, [$ffae] ld a, [$ffae]
dec a dec a
ld bc, PartyMon2 - PartyMon1 ld bc, PartyMon2 - PartyMon1
call AddNTimes call AddNTimes
Functiond906: ; d906 GeneratePartyMonStats: ; d906
ld e, l ld e, l
ld d, h ld d, h
push hl push hl
@ -7997,10 +8004,10 @@ Functiond906: ; d906
ld a, [IsInBattle] ld a, [IsInBattle]
and a and a
ld a, $0 ld a, $0
jr z, .asm_d922 jr z, .skipitem
ld a, [EnemyMonItem] ld a, [EnemyMonItem]
.asm_d922 .skipitem
ld [de], a ld [de], a
inc de inc de
push de push de
@ -8008,10 +8015,10 @@ Functiond906: ; d906
ld l, e ld l, e
ld a, [IsInBattle] ld a, [IsInBattle]
and a and a
jr z, .asm_d943 jr z, .randomlygeneratemoves
ld a, [MonType] ld a, [MonType]
and a and a
jr nz, .asm_d943 jr nz, .randomlygeneratemoves
ld de, EnemyMonMoves ld de, EnemyMonMoves
rept NUM_MOVES + -1 rept NUM_MOVES + -1
ld a, [de] ld a, [de]
@ -8020,9 +8027,9 @@ Functiond906: ; d906
endr endr
ld a, [de] ld a, [de]
ld [hl], a ld [hl], a
jr .asm_d950 jr .next
.asm_d943 .randomlygeneratemoves
xor a xor a
rept NUM_MOVES + -1 rept NUM_MOVES + -1
ld [hli], a ld [hli], a
@ -8031,7 +8038,7 @@ Functiond906: ; d906
ld [Buffer1], a ld [Buffer1], a
predef FillMoves predef FillMoves
.asm_d950 .next
pop de pop de
rept 4 rept 4
inc de inc de
@ -8058,22 +8065,22 @@ endr
inc de inc de
xor a xor a
ld b, $a ld b, $a
.asm_d97a .loop
ld [de], a ld [de], a
inc de inc de
dec b dec b
jr nz, .asm_d97a jr nz, .loop
pop hl pop hl
push hl push hl
ld a, [MonType] ld a, [MonType]
and $f and $f
jr z, .asm_d992 jr z, .generateDVs
push hl push hl
callba GetTrainerDVs callba GetTrainerDVs
pop hl pop hl
jr .asm_d9b5 jr .initializetrainermonstats
.asm_d992 .generateDVs
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
ld [wd265], a ld [wd265], a
dec a dec a
@ -8087,13 +8094,13 @@ endr
push hl push hl
ld a, [IsInBattle] ld a, [IsInBattle]
and a and a
jr nz, .asm_d9f3 jr nz, .copywildmonstats
call Random call Random
ld b, a ld b, a
call Random call Random
ld c, a ld c, a
.asm_d9b5 .initializetrainermonstats
ld a, b ld a, b
ld [de], a ld [de], a
inc de inc de
@ -8111,7 +8118,7 @@ endr
rept 4 rept 4
inc de inc de
endr endr
ld a, $46 ld a, 70
ld [de], a ld [de], a
inc de inc de
xor a xor a
@ -8129,7 +8136,7 @@ endr
inc de inc de
ld [de], a ld [de], a
inc de inc de
ld bc, $000a ld bc, 10
add hl, bc add hl, bc
ld a, $1 ld a, $1
ld c, a ld c, a
@ -8141,9 +8148,9 @@ endr
ld a, [$ffb6] ld a, [$ffb6]
ld [de], a ld [de], a
inc de inc de
jr .asm_da29 jr .next2
.asm_d9f3 .copywildmonstats
ld a, [EnemyMonDVs] ld a, [EnemyMonDVs]
ld [de], a ld [de], a
inc de inc de
@ -8154,12 +8161,12 @@ endr
push hl push hl
ld hl, EnemyMonPP ld hl, EnemyMonPP
ld b, NUM_MOVES ld b, NUM_MOVES
.asm_da03 .wildmonpploop
ld a, [hli] ld a, [hli]
ld [de], a ld [de], a
inc de inc de
dec b dec b
jr nz, .asm_da03 jr nz, .wildmonpploop
pop hl pop hl
ld a, BASE_HAPPINESS ld a, BASE_HAPPINESS
@ -8189,30 +8196,30 @@ endr
ld [de], a ld [de], a
inc de inc de
.asm_da29 .next2
ld a, [IsInBattle] ld a, [IsInBattle]
dec a dec a
jr nz, .asm_da3b jr nz, .generatestats
ld hl, EnemyMonMaxHP ld hl, EnemyMonMaxHP
ld bc, $000c ld bc, 12
call CopyBytes call CopyBytes
pop hl pop hl
jr .asm_da45 jr .next3
.asm_da3b .generatestats
pop hl pop hl
ld bc, $000a ld bc, $000a
add hl, bc add hl, bc
ld b, $0 ld b, $0
call Functione167 call Functione167
.asm_da45 .next3
ld a, [MonType] ld a, [MonType]
and $f and $f
jr nz, .asm_da6b jr nz, .done
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
cp UNOWN cp UNOWN
jr nz, .asm_da6b jr nz, .done
ld hl, PartyMon1DVs ld hl, PartyMon1DVs
ld a, [PartyCount] ld a, [PartyCount]
dec a dec a
@ -8221,8 +8228,8 @@ endr
predef GetUnownLetter predef GetUnownLetter
callab Functionfba18 callab Functionfba18
.asm_da6b .done
scf scf ; When this function returns, the carry flag indicates success vs failure.
ret ret
; da6d ; da6d
@ -8992,7 +8999,7 @@ GiveEgg:: ; df8c
push bc push bc
call CheckSeenMon call CheckSeenMon
push bc push bc
call Functiond88c call TryAddMonToParty
pop bc pop bc
ld a, c ld a, c
and a and a
@ -9463,8 +9470,8 @@ GivePoke:: ; e277
push bc push bc
xor a xor a
ld [MonType], a ld [MonType], a
call Functiond88c call TryAddMonToParty
jr nc, .asm_e2b0 jr nc, .failed
ld hl, PartyMonNicknames ld hl, PartyMonNicknames
ld a, [PartyCount] ld a, [PartyCount]
dec a dec a
@ -9489,7 +9496,7 @@ GivePoke:: ; e277
ld [hl], a ld [hl], a
jr .asm_e2e1 jr .asm_e2e1
.asm_e2b0 .failed
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
ld [TempEnemyMonSpecies], a ld [TempEnemyMonSpecies], a
callab LoadEnemyMon callab LoadEnemyMon
@ -10113,43 +10120,43 @@ Functione6b3: ; e6b3
; e6ce ; e6ce
Functione6ce: ; e6ce BugContest_SetCaughtContestMon: ; e6ce
ld a, [wdf9c] ld a, [wContestMon]
and a and a
jr z, .asm_e6ea jr z, .firstcatch
ld [wd265], a ld [wd265], a
callba Functioncc0c7 callba DisplayAlreadyCaughtText
callba Functioncc000 callba DisplayCaughtContestMonStats
lb bc, 14, 7 lb bc, 14, 7
call PlaceYesNoBox call PlaceYesNoBox
ret c ret c
.asm_e6ea .firstcatch
call Functione6fd call .generatestats
ld a, [TempEnemyMonSpecies] ld a, [TempEnemyMonSpecies]
ld [wd265], a ld [wd265], a
call GetPokemonName call GetPokemonName
ld hl, UnknownText_0xe71d ld hl, .caughttext
call PrintText call PrintText
ret ret
; e6fd ; e6fd
Functione6fd: ; e6fd .generatestats: ; e6fd
ld a, [TempEnemyMonSpecies] ld a, [TempEnemyMonSpecies]
ld [CurSpecies], a ld [CurSpecies], a
ld [CurPartySpecies], a ld [CurPartySpecies], a
call GetBaseData call GetBaseData
xor a xor a
ld bc, PartyMon2 - PartyMon1 ld bc, PartyMon2 - PartyMon1
ld hl, wdf9c ld hl, wContestMon
call ByteFill call ByteFill
xor a xor a
ld [MonType], a ld [MonType], a
ld hl, wdf9c ld hl, wContestMon
jp Functiond906 jp GeneratePartyMonStats
; e71d ; e71d
UnknownText_0xe71d: ; 0xe71d .caughttext: ; 0xe71d
; Caught @ ! ; Caught @ !
text_jump UnknownText_0x1c10c0 text_jump UnknownText_0x1c10c0
db "@" db "@"
@ -14837,7 +14844,7 @@ endr
Special_GiveParkBalls: ; 135db Special_GiveParkBalls: ; 135db
xor a xor a
ld [wdf9c], a ld [wContestMon], a
ld a, 20 ld a, 20
ld [wdc79], a ld [wdc79], a
callba Function11490 callba Function11490
@ -15230,7 +15237,7 @@ Function13819: ; 13819
ld hl, wd00e ld hl, wd00e
ld a, 1 ld a, 1
ld [hli], a ld [hli], a
ld a, [wdf9c] ld a, [wContestMon]
ld [hli], a ld [hli], a
ld a, [hProduct] ld a, [hProduct]
ld [hli], a ld [hli], a
@ -24671,7 +24678,7 @@ Function24be7: ; 24be7
hlcoord 1, 1 hlcoord 1, 1
ld de, String24c4b ld de, String24c4b
call PlaceString call PlaceString
ld a, [wdf9c] ld a, [wContestMon]
and a and a
ld de, String24c59 ld de, String24c59
jr z, .asm_24c1e jr z, .asm_24c1e
@ -24681,7 +24688,7 @@ Function24be7: ; 24be7
.asm_24c1e .asm_24c1e
hlcoord 8, 1 hlcoord 8, 1
call PlaceString call PlaceString
ld a, [wdf9c] ld a, [wContestMon]
and a and a
jr z, .asm_24c3e jr z, .asm_24c3e
hlcoord 1, 3 hlcoord 1, 3
@ -35216,7 +35223,7 @@ TrainerType1: ; 397eb
ld a, OTPARTYMON ld a, OTPARTYMON
ld [MonType], a ld [MonType], a
push hl push hl
predef Functiond88c predef TryAddMonToParty
pop hl pop hl
jr .loop jr .loop
; 39806 ; 39806
@ -35237,7 +35244,7 @@ TrainerType2: ; 39806
ld [MonType], a ld [MonType], a
push hl push hl
predef Functiond88c predef TryAddMonToParty
ld a, [OTPartyCount] ld a, [OTPartyCount]
dec a dec a
ld hl, OTPartyMon1Moves ld hl, OTPartyMon1Moves
@ -35313,7 +35320,7 @@ TrainerType3: ; 39871
ld a, OTPARTYMON ld a, OTPARTYMON
ld [MonType], a ld [MonType], a
push hl push hl
predef Functiond88c predef TryAddMonToParty
ld a, [OTPartyCount] ld a, [OTPartyCount]
dec a dec a
ld hl, OTPartyMon1Item ld hl, OTPartyMon1Item
@ -35344,7 +35351,7 @@ TrainerType4: ; 3989d
ld [MonType], a ld [MonType], a
push hl push hl
predef Functiond88c predef TryAddMonToParty
ld a, [OTPartyCount] ld a, [OTPartyCount]
dec a dec a
ld hl, OTPartyMon1Item ld hl, OTPartyMon1Item
@ -44308,7 +44315,7 @@ Function4d9d3: ; 4d9d3
; 4d9e5 ; 4d9e5
CheckPartyFullAfterContest: ; 4d9e5 CheckPartyFullAfterContest: ; 4d9e5
ld a, [wdf9c] ld a, [wContestMon]
and a and a
jp z, Function4db35 jp z, Function4db35
ld [CurPartySpecies], a ld [CurPartySpecies], a
@ -44323,7 +44330,7 @@ CheckPartyFullAfterContest: ; 4d9e5
ld c, a ld c, a
ld b, $0 ld b, $0
add hl, bc add hl, bc
ld a, [wdf9c] ld a, [wContestMon]
ld [hli], a ld [hli], a
ld [CurSpecies], a ld [CurSpecies], a
ld a, $ff ld a, $ff
@ -44335,7 +44342,7 @@ CheckPartyFullAfterContest: ; 4d9e5
call AddNTimes call AddNTimes
ld d, h ld d, h
ld e, l ld e, l
ld hl, wdf9c ld hl, wContestMon
ld bc, PartyMon2 - PartyMon1 ld bc, PartyMon2 - PartyMon1
call CopyBytes call CopyBytes
ld a, [PartyCount] ld a, [PartyCount]
@ -44389,7 +44396,7 @@ CheckPartyFullAfterContest: ; 4d9e5
or b or b
ld [hl], a ld [hl], a
xor a xor a
ld [wdf9c], a ld [wContestMon], a
and a and a
ld [ScriptVar], a ld [ScriptVar], a
ret ret
@ -44405,7 +44412,7 @@ Function4daa3: ; 4daa3
jr nc, .asm_4db08 jr nc, .asm_4db08
xor a xor a
ld [CurPartyMon], a ld [CurPartyMon], a
ld hl, wdf9c ld hl, wContestMon
ld de, wd018 ld de, wd018
ld bc, sBoxMon2 - sBoxMon1 ld bc, sBoxMon2 - sBoxMon1
call CopyBytes call CopyBytes
@ -44451,7 +44458,7 @@ Function4daa3: ; 4daa3
ld [hl], a ld [hl], a
call CloseSRAM call CloseSRAM
xor a xor a
ld [wdf9c], a ld [wContestMon], a
ld a, $1 ld a, $1
ld [ScriptVar], a ld [ScriptVar], a
ret ret
@ -50505,7 +50512,7 @@ GetMovementAction: ; 802ec
IsNPCInFront: ; 80341 IsNPCInFront: ; 80341
ld a, 0 ld a, 0
ld [$ffaf], a ld [hConnectionStripLength], a
ld a, [MapX] ld a, [MapX]
ld d, a ld d, a
ld a, [WalkingX] ld a, [WalkingX]
@ -53994,8 +54001,8 @@ HallOfFame:: ; 0x8640e
ld a, 1 ld a, 1
ld [wc2cd], a ld [wc2cd], a
call Function2ed3 call Function2ed3
ld a, 1 ld a, SPAWN_LANCE
ld [wd4b5], a ld [wSpawnAfterChampion], a
; Enable the Pokégear map to cycle through all of Kanto ; Enable the Pokégear map to cycle through all of Kanto
ld hl, StatusFlags ld hl, StatusFlags
@ -54022,7 +54029,7 @@ HallOfFame:: ; 0x8640e
ret ret
; 0x86455 ; 0x86455
Function86455:: ; 86455 RedCredits:: ; 86455
ld a, MUSIC_NONE % $100 ld a, MUSIC_NONE % $100
ld [MusicFadeIDLo], a ld [MusicFadeIDLo], a
ld a, MUSIC_NONE / $100 ld a, MUSIC_NONE / $100
@ -54037,8 +54044,8 @@ Function86455:: ; 86455
ld c, $8 ld c, $8
call DelayFrames call DelayFrames
call Function2ed3 call Function2ed3
ld a, $2 ld a, SPAWN_RED
ld [wd4b5], a ld [wSpawnAfterChampion], a
ld a, [StatusFlags] ld a, [StatusFlags]
ld b, a ld b, a
callba Function109847 callba Function109847
@ -62349,8 +62356,8 @@ Function8c20f: ; 8c20f
call DelayFrame call DelayFrame
xor a xor a
ld [hLCDStatCustom], a ld [hLCDStatCustom], a
ld [$ffc7], a ld [hLCDStatCustom + 1], a
ld [$ffc8], a ld [hLCDStatCustom + 2], a
ld [hSCY], a ld [hSCY], a
ld a, $1 ld a, $1
ld [rSVBK], a ld [rSVBK], a
@ -62600,9 +62607,9 @@ Function8c3e8: ; 8c3e8 (23:43e8)
ld a, $43 ld a, $43
ld [hLCDStatCustom], a ; $ff00+$c6 ld [hLCDStatCustom], a ; $ff00+$c6
xor a xor a
ld [$ffc7], a ld [hLCDStatCustom + 1], a
ld a, $90 ld a, $90
ld [$ffc8], a ld [hLCDStatCustom + 2], a
xor a xor a
ld [wcf64], a ld [wcf64], a
ld [wcf65], a ld [wcf65], a
@ -63654,8 +63661,8 @@ Special_MagnetTrain: ; 8cc04
call WhiteBGMap call WhiteBGMap
xor a xor a
ld [hLCDStatCustom], a ld [hLCDStatCustom], a
ld [$ffc7], a ld [hLCDStatCustom + 1], a
ld [$ffc8], a ld [hLCDStatCustom + 2], a
ld [hSCX], a ld [hSCX], a
ld [Requested2bppSource], a ld [Requested2bppSource], a
ld [Requested2bppSource + 1], a ld [Requested2bppSource + 1], a
@ -76437,7 +76444,7 @@ INCBIN "gfx/credits/theend.2bpp"
SECTION "bank33", ROMX, BANK[$33] SECTION "bank33", ROMX, BANK[$33]
Functioncc000: ; cc000 DisplayCaughtContestMonStats: ; cc000
call WhiteBGMap call WhiteBGMap
call ClearTileMap call ClearTileMap
@ -76475,7 +76482,7 @@ Functioncc000: ; cc000
ld de, .Health ld de, .Health
call PlaceString call PlaceString
ld a, [wdf9c] ld a, [wContestMon]
ld [wd265], a ld [wd265], a
call GetPokemonName call GetPokemonName
ld de, StringBuffer1 ld de, StringBuffer1
@ -76533,13 +76540,13 @@ SwitchMonText: ; cc0c2
db "@" db "@"
; cc0c7 ; cc0c7
Functioncc0c7: ; cc0c7 DisplayAlreadyCaughtText: ; cc0c7
call GetPokemonName call GetPokemonName
ld hl, AlreadyCaughtText ld hl, .AlreadyCaughtText
jp PrintText jp PrintText
; cc0d0 ; cc0d0
AlreadyCaughtText: ; 0xcc0d0 .AlreadyCaughtText: ; 0xcc0d0
; You already caught a @ . ; You already caught a @ .
text_jump UnknownText_0x1c10dd text_jump UnknownText_0x1c10dd
db "@" db "@"
@ -87300,7 +87307,7 @@ Functionfcc63: ; fcc63
ld [MonType], a ld [MonType], a
ld [wd10b], a ld [wd10b], a
callab Functione039 callab Functione039
predef Functiond88c predef TryAddMonToParty
ld e, TRADE_DIALOG ld e, TRADE_DIALOG
call GetTradeAttribute call GetTradeAttribute
@ -88399,10 +88406,10 @@ Function104263: ; 104263 (41:4263)
ld c, $0 ld c, $0
Function104265: ; 104265 (41:4265) Function104265: ; 104265 (41:4265)
ld a, [$ffaf] ld a, [hConnectionStripLength]
push af push af
ld a, c ld a, c
ld [$ffaf], a ld [hConnectionStripLength], a
ld c, $12 ld c, $12
.asm_10426d .asm_10426d
ld b, $14 ld b, $14
@ -88412,7 +88419,7 @@ Function104265: ; 104265 (41:4265)
ld [hli], a ld [hli], a
dec b dec b
jr nz, .asm_10426f jr nz, .asm_10426f
ld a, [$ffaf] ld a, [hConnectionStripLength]
ld b, $c ld b, $c
.asm_104279 .asm_104279
ld [hli], a ld [hli], a
@ -88421,7 +88428,7 @@ Function104265: ; 104265 (41:4265)
dec c dec c
jr nz, .asm_10426d jr nz, .asm_10426d
pop af pop af
ld [$ffaf], a ld [hConnectionStripLength], a
ret ret

View File

@ -407,10 +407,10 @@ Function1002c9: ; 1002c9
Function1002dc: ; 1002dc Function1002dc: ; 1002dc
ld a, $f8 ld a, $f8
ld [$ff9f], a ld [hMapEntryMethod], a
callba RunMapSetupScript callba RunMapSetupScript
xor a xor a
ld [$ff9f], a ld [hMapEntryMethod], a
call Functione51 call Functione51
ret ret
; 1002ed ; 1002ed

View File

@ -2359,7 +2359,7 @@ Function17ded9: ; 17ded9
ld [MonType], a ld [MonType], a
push hl push hl
push bc push bc
predef Functiond88c predef TryAddMonToParty
callba Function4db49 callba Function4db49
pop bc pop bc
pop hl pop hl

View File

@ -1842,7 +1842,7 @@ wd25e:: ds 4
wd262:: ds 1 wd262:: ds 1
wd263:: ds 1 wd263:: ds 1
wd264:: ds 1 wd264:: ds 1
GetPokemonName_Parameter:: wNamedObjectIndexBuffer::
wd265:: ds 1 wd265:: ds 1
wd266:: ds 1 wd266:: ds 1
wd267:: ds 1 wd267:: ds 1
@ -1956,7 +1956,7 @@ RedsName:: ds NAME_LENGTH ; d49e
GreensName:: ds NAME_LENGTH ; d4a9 GreensName:: ds NAME_LENGTH ; d4a9
wd4b4:: ds 1 wd4b4:: ds 1
wd4b5:: ds 1 wSpawnAfterChampion:: ds 1
; init time set at newgame ; init time set at newgame
StartDay:: ; d4b6 StartDay:: ; d4b6