Reverted ld_hl_pointer macro

This commit is contained in:
PikalaxALT 2015-07-20 22:18:18 -04:00
parent d1e11f77e5
commit 471492b775
60 changed files with 1538 additions and 1079 deletions

View File

@ -413,10 +413,9 @@ UpdateChannels: ; e8125
; hl << 4
; each wavepattern is $0f bytes long
; so seeking is done in $10s
rept 4
add hl, hl
add hl, hl
add hl, hl
add hl, hl
endr
ld de, WaveSamples
add hl, de
; load wavepattern into $ff30-$ff3f
@ -1292,8 +1291,9 @@ GetNoiseSample: ; e86c5
ld d, $00
; load ptr to noise sample set in hl
ld hl, Drumkits
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -1306,8 +1306,9 @@ GetNoiseSample: ; e86c5
; use 'pitch' to seek noise sample set
ld e, a
ld d, $00
rept 2
add hl, de
add hl, de
endr
; load sample pointer into NoiseSampleAddress
ld a, [hli]
ld [NoiseSampleAddressLo], a
@ -1328,8 +1329,9 @@ ParseMusicCommand: ; e870f
ld d, $00
; seek command pointer
ld hl, MusicCommands
rept 2
add hl, de
add hl, de
endr
; jump to the new pointer
ld a, [hli]
ld h, [hl]
@ -1572,8 +1574,9 @@ MusicFB: ; e8817
inc hl
ld d, [hl]
; skip pointer
rept 2
inc de
inc de
endr
; update address
ld [hl], d
dec hl
@ -1623,8 +1626,9 @@ MusicEE; e883e
inc hl
ld d, [hl]
; skip pointer
rept 2
inc de
inc de
endr
; update address
ld [hl], d
dec hl
@ -2378,9 +2382,9 @@ _PlayCryHeader:: ; e8b79
; 3-byte pointers (bank, address)
ld hl, Cries
rept 3
add hl, de
add hl, de
add hl, de
endr
ld a, [hli]
ld [MusicBank], a
@ -2595,9 +2599,9 @@ PlayStereoSFX:: ; e8ca6
; get sfx ptr
ld hl, SFX
rept 3
add hl, de
add hl, de
add hl, de
endr
; bank
ld a, [hli]
@ -2692,8 +2696,9 @@ LoadChannel: ; e8d1b
ld c, a
ld b, $00
ld hl, ChannelPointers
rept 2
add hl, bc
add hl, bc
endr
ld c, [hl]
inc hl
ld b, [hl] ; bc = channel pointer
@ -3157,8 +3162,9 @@ ClearChannels:: ; e8fe9
; doesn't seem to be used, but functionally identical to SoundRestart
ld hl, rNR50
xor a
rept 2
ld [hli], a
ld [hli], a
endr
ld a, $80
ld [hli], a
ld hl, rNR10

View File

@ -275,8 +275,9 @@ Music_GoldenrodCity_Ch3: ; eb584
vibrato $8, $23
notetype $c, $25
Music_GoldenrodCity_branch_eb58c: ; eb58c
rept 2
callchannel Music_GoldenrodCity_branch_eb5aa
callchannel Music_GoldenrodCity_branch_eb5aa
endr
callchannel Music_GoldenrodCity_branch_eb5d2
note __, 3
octave 3

View File

@ -492,8 +492,9 @@ Music_JohtoWildBattle_branch_f5fdb: ; f5fdb
note G_, 2
loopchannel 7, Music_JohtoWildBattle_branch_f5fdb
note F#, 4
rept 2
callchannel Music_JohtoWildBattle_branch_f6055
callchannel Music_JohtoWildBattle_branch_f6055
endr
Music_JohtoWildBattle_branch_f5fe8: ; f5fe8
note D_, 2
note G_, 2

View File

@ -325,22 +325,25 @@ Music_KantoWildBattle_branch_ed1c8: ; ed1c8
note F_, 1
note F#, 1
notetype $6, $b7
rept 2
callchannel Music_KantoWildBattle_branch_ed307
callchannel Music_KantoWildBattle_branch_ed307
endr
forceoctave $1
rept 2
callchannel Music_KantoWildBattle_branch_ed307
callchannel Music_KantoWildBattle_branch_ed307
endr
forceoctave $0
rept 4
callchannel Music_KantoWildBattle_branch_ed307
callchannel Music_KantoWildBattle_branch_ed307
callchannel Music_KantoWildBattle_branch_ed307
callchannel Music_KantoWildBattle_branch_ed307
endr
forceoctave $1
rept 2
callchannel Music_KantoWildBattle_branch_ed307
callchannel Music_KantoWildBattle_branch_ed307
endr
forceoctave $0
rept 2
callchannel Music_KantoWildBattle_branch_ed307
callchannel Music_KantoWildBattle_branch_ed307
endr
note __, 16
octave 3
note A#, 16

View File

@ -193,9 +193,9 @@ AI_TryItem: ; 38105
jr z, .has_item
dec de
rept 3
inc hl
inc hl
inc hl
endr
jr .loop
.has_item
@ -213,8 +213,9 @@ AI_TryItem: ; 38105
pop de
pop hl
rept 2
inc hl
inc hl
endr
jr c, .loop
.used_item

View File

@ -133,16 +133,18 @@ AI_Setup: ; 385e0
call AI_50_50
jr c, .checkmove
rept 2
dec [hl]
dec [hl]
endr
jr .checkmove
.discourage
call Random
cp 30
jr c, .checkmove
rept 2
inc [hl]
inc [hl]
endr
jr .checkmove
; 38635
@ -262,8 +264,9 @@ AI_Offensive: ; 386a2
and a
jr nz, .checkmove
rept 2
inc [hl]
inc [hl]
endr
jr .checkmove
; 386be
@ -417,8 +420,9 @@ AI_Smart_Sleep: ; 387e3
.asm_387f0
call AI_50_50
ret c
rept 2
dec [hl]
dec [hl]
endr
ret
; 387f7
@ -529,8 +533,9 @@ AI_Smart_LockOn: ; 3881d
call AI_50_50
ret c
rept 2
dec [hl]
dec [hl]
endr
ret
.asm_38882
@ -555,8 +560,9 @@ AI_Smart_LockOn: ; 3881d
cp 180
jr nc, .asm_3888b
rept 2
dec [hl]
dec [hl]
endr
jr .asm_3888b
.asm_388a2
@ -596,9 +602,9 @@ AI_Smart_Explosion: ; 388a6
ret c
.asm_388c6
rept 3
inc [hl]
inc [hl]
inc [hl]
endr
ret
; 388ca
@ -610,9 +616,9 @@ AI_Smart_DreamEater: ; 388ca
call Random
cp 25
ret c
rept 3
dec [hl]
dec [hl]
dec [hl]
endr
ret
; 388d4
@ -639,8 +645,9 @@ AI_Smart_EvasionUp: ; 388d4
jr nc, .asm_38911
.asm_388ef
rept 2
dec [hl]
dec [hl]
endr
ret
.asm_388f2
@ -669,8 +676,9 @@ AI_Smart_EvasionUp: ; 388d4
jr c, .asm_38911
.asm_3890f
rept 2
inc [hl]
inc [hl]
endr
; 30% chance to end up here if enemy's HP is full and player is not badly poisoned.
; 77% chance to end up here if enemy's HP is above 50% but not full.
@ -714,8 +722,9 @@ AI_Smart_EvasionUp: ; 388d4
call Random
cp $50
ret c
rept 2
dec [hl]
dec [hl]
endr
ret
; Player is seeded.
@ -747,8 +756,9 @@ AI_Smart_AlwaysHit: ; 38947
call AI_80_20
ret c
rept 2
dec [hl]
dec [hl]
endr
ret
; 3895b
@ -818,8 +828,9 @@ AI_Smart_AccuracyDown: ; 38985
jr nc, .asm_389bf
.asm_3899d
rept 2
dec [hl]
dec [hl]
endr
ret
.asm_389a0
@ -848,8 +859,9 @@ AI_Smart_AccuracyDown: ; 38985
jr c, .asm_389bf
.asm_389bd
rept 2
inc [hl]
inc [hl]
endr
; We only end up here if the move has not been already encouraged.
.asm_389bf
@ -888,8 +900,9 @@ AI_Smart_AccuracyDown: ; 38985
call Random
cp $50
ret c
rept 2
dec [hl]
dec [hl]
endr
ret
; Player is seeded.
@ -997,8 +1010,9 @@ AI_Smart_Moonlight: ; 38a3a
call Random
cp $19
ret c
rept 2
dec [hl]
dec [hl]
endr
ret
; 38a4e
@ -1079,8 +1093,9 @@ AI_Smart_Bind: ; 38a71
ret nc
call AI_50_50
ret c
rept 2
dec [hl]
dec [hl]
endr
ret
; 38a9c
@ -1185,8 +1200,9 @@ AI_Smart_SpDefenseUp2: ; 38aed
.asm_38b09
call AI_80_20
ret c
rept 2
dec [hl]
dec [hl]
endr
ret
.asm_38b10
@ -1208,9 +1224,9 @@ AI_Smart_Fly: ; 38b12
call AICompareSpeed
ret nc
rept 3
dec [hl]
dec [hl]
dec [hl]
endr
ret
; 38b20
@ -1239,8 +1255,9 @@ AI_Smart_Paralyze: ; 38b26
ret nc
call AI_80_20
ret c
rept 2
dec [hl]
dec [hl]
endr
ret
.asm_38b3a
@ -1272,8 +1289,9 @@ AI_Smart_SpeedDownHit: ; 38b40
call Random
cp 30
ret c
rept 2
dec [hl]
dec [hl]
endr
ret
; 38b5c
@ -1510,14 +1528,15 @@ AI_Smart_Encore: ; 38c3b
call Random
cp $46
ret c
rept 2
dec [hl]
dec [hl]
endr
ret
.asm_38c81
rept 3
inc [hl]
inc [hl]
inc [hl]
endr
ret
.EncoreMoves:
@ -1587,15 +1606,15 @@ AI_Smart_SleepTalk: ; 38cba
cp $1
jr z, .asm_38cc7
rept 3
dec [hl]
dec [hl]
dec [hl]
endr
ret
.asm_38cc7
rept 3
inc [hl]
inc [hl]
inc [hl]
endr
ret
; 38ccb
@ -1607,9 +1626,9 @@ AI_Smart_DefrostOpponent: ; 38ccb
ld a, [EnemyMonStatus]
and $20
ret z
rept 3
dec [hl]
dec [hl]
dec [hl]
endr
ret
; 38cd5
@ -1666,8 +1685,9 @@ AI_Smart_Spite: ; 38cd5
call Random
cp $64
ret c
rept 2
dec [hl]
dec [hl]
endr
ret
; 38d16
@ -1708,9 +1728,9 @@ AI_Smart_HealBell: ; 38d1f
jr z, .next
; status
rept 3
dec hl
dec hl
dec hl
endr
ld a, [hl]
or c
ld c, a
@ -1735,8 +1755,9 @@ AI_Smart_HealBell: ; 38d1f
ret z
call AI_50_50
ret c
rept 2
dec [hl]
dec [hl]
endr
ret
.no_status
@ -1774,9 +1795,9 @@ AI_Smart_PriorityHit: ; 38d5a
ld a, [BattleMonHP]
sbc b
ret nc
rept 3
dec [hl]
dec [hl]
dec [hl]
endr
ret
; 38d93
@ -1900,9 +1921,9 @@ AI_Smart_MeanLook: ; 38dfb
.asm_38e26
call AI_80_20
ret c
rept 3
dec [hl]
dec [hl]
dec [hl]
endr
ret
; 38e2e
@ -1952,11 +1973,9 @@ AI_Smart_FlameWheel: ; 38e50
ld a, [EnemyMonStatus]
bit FRZ, a
ret z
rept 5
dec [hl]
dec [hl]
dec [hl]
dec [hl]
dec [hl]
endr
ret
; 38e5c
@ -1988,13 +2007,15 @@ AI_Smart_Curse: ; 38e5c
ret nc
call AI_80_20
ret c
rept 2
dec [hl]
dec [hl]
endr
ret
.asm_38e90
rept 2
inc [hl]
inc [hl]
endr
.asm_38e92
inc [hl]
.asm_38e93
@ -2044,8 +2065,9 @@ AI_Smart_Curse: ; 38e5c
call AI_50_50
ret c
rept 2
dec [hl]
dec [hl]
endr
ret
; 38ed2
@ -2097,8 +2119,9 @@ AI_Smart_Protect: ; 38ed2
call Random
cp 20
ret c
rept 2
inc [hl]
inc [hl]
endr
ret
; 38f1d
@ -2128,8 +2151,9 @@ AI_Smart_Foresight: ; 38f1d
call Random
cp 100
ret c
rept 2
dec [hl]
dec [hl]
endr
ret
; 38f4a
@ -2235,9 +2259,9 @@ AI_Smart_Endure: ; 38fac
call AI_80_20
ret c
rept 3
dec [hl]
dec [hl]
dec [hl]
endr
ret
.asm_38fcb
@ -2248,8 +2272,9 @@ AI_Smart_Endure: ; 38fac
call AI_50_50
ret c
rept 2
dec [hl]
dec [hl]
endr
ret
.asm_38fd8
@ -2271,14 +2296,15 @@ AI_Smart_FuryCutter: ; 38fdb
cp 2
jr c, .end
rept 2
dec [hl]
dec [hl]
endr
cp 3
jr c, .end
rept 3
dec [hl]
dec [hl]
dec [hl]
endr
.end
@ -2318,8 +2344,9 @@ AI_Smart_Rollout: ; 38fef
call Random
cp 200
ret nc
rept 2
dec [hl]
dec [hl]
endr
ret
.asm_39020
@ -2379,8 +2406,9 @@ AI_Smart_Earthquake: ; 39044
call AICompareSpeed
ret nc
rept 2
dec [hl]
dec [hl]
endr
ret
.could_dig
@ -2427,8 +2455,9 @@ AI_Smart_Pursuit: ; 39072
.asm_3907d
call AI_50_50
ret c
rept 2
dec [hl]
dec [hl]
endr
ret
; 39084
@ -2453,8 +2482,9 @@ AI_Smart_RapidSpin: ; 39084
call AI_80_20
ret c
rept 2
dec [hl]
dec [hl]
endr
ret
; 3909e
@ -2581,9 +2611,9 @@ AI_Smart_WeatherMove: ; 3910d
; 3911e
AIBadWeatherType: ; 3911e
rept 3
inc [hl]
inc [hl]
inc [hl]
endr
ret
; 39122
@ -2606,8 +2636,9 @@ AIGoodWeatherType: ; 39122
ret nz
.good
rept 2
dec [hl]
dec [hl]
endr
ret
; 39134
@ -2702,8 +2733,9 @@ AI_Smart_PsychUp: ; 39152
ret
.asm_39188
rept 2
inc [hl]
inc [hl]
endr
ret
; 3918b
@ -2788,8 +2820,9 @@ AI_Smart_Gust: ; 391d5
call AICompareSpeed
ret nc
rept 2
dec [hl]
dec [hl]
endr
ret
; Try to predict if the player will use Fly this turn.
@ -2816,8 +2849,9 @@ AI_Smart_FutureSight: ; 391f3
and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
ret z
rept 2
dec [hl]
dec [hl]
endr
ret
; 39200
@ -2852,16 +2886,18 @@ AI_Smart_Solarbeam: ; 3920b
cp 25 ; 1/10
ret c
rept 2
inc [hl]
inc [hl]
endr
ret
.asm_3921e
call AI_80_20
ret c
rept 2
dec [hl]
dec [hl]
endr
ret
; 39225
@ -2955,8 +2991,9 @@ AICheckPlayerHalfHP: ; 3926e
ld c, [hl]
sla c
rl b
rept 2
inc hl
inc hl
endr
ld a, [hld]
cp c
ld a, [hl]
@ -2976,8 +3013,9 @@ AICheckEnemyHalfHP: ; 39281
ld c, [hl]
sla c
rl b
rept 2
inc hl
inc hl
endr
ld a, [hld]
cp c
ld a, [hl]
@ -3001,8 +3039,9 @@ AICheckEnemyQuarterHP: ; 39298
rl b
sla c
rl b
rept 2
inc hl
inc hl
endr
ld a, [hld]
cp c
ld a, [hl]
@ -3024,8 +3063,9 @@ AICheckPlayerQuarterHP: ; 392b3
rl b
sla c
rl b
rept 2
inc hl
inc hl
endr
ld a, [hld]
cp c
ld a, [hl]
@ -3529,11 +3569,9 @@ AI_Risky: ; 394a9
jr nc, .nextmove
pop hl
rept 5
dec [hl]
dec [hl]
dec [hl]
dec [hl]
dec [hl]
endr
push hl
.nextmove

View File

@ -265,9 +265,9 @@ Functioncc23d: ; cc23d
ld a, [hl]
and $f0
ld [hli], a
rept 3
inc hl
inc hl
inc hl
endr
dec c
jr nz, .asm_cc249
ret
@ -341,8 +341,9 @@ Functioncc293: ; cc293
ld e, a
ld d, 0
ld hl, BattleAnimCommands
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
@ -488,8 +489,9 @@ BattleAnimCmd_FD: ; cc348 (33:4348)
ld e, [hl]
inc hl
ld d, [hl]
rept 2
inc de
inc de
endr
ld [hl], d
dec hl
ld [hl], e
@ -517,8 +519,9 @@ BattleAnimCmd_EF: ; cc383 (33:4383)
ld e, [hl]
inc hl
ld d, [hl]
rept 2
inc de
inc de
endr
ld [hl], d
dec hl
ld [hl], e
@ -544,8 +547,9 @@ BattleAnimCmd_FB: ; cc3b2 (33:43b2)
ld e, [hl]
inc hl
ld d, [hl]
rept 2
inc de
inc de
endr
ld [hl], d
dec hl
ld [hl], e
@ -572,8 +576,9 @@ BattleAnimCmd_F8: ; cc3d6 (33:43d6)
ld e, [hl]
inc hl
ld d, [hl]
rept 2
inc de
inc de
endr
ld [hl], d
dec hl
ld [hl], e
@ -601,8 +606,9 @@ BattleAnimCmd_EE: ; cc3fa (33:43fa)
ld e, [hl]
inc hl
ld d, [hl]
rept 2
inc de
inc de
endr
ld [hl], d
dec hl
ld [hl], e
@ -700,10 +706,9 @@ BattleAnimCmd_D5: ; cc485 (33:4485)
push hl
ld l, a
ld h, $0
rept 4
add hl, hl
add hl, hl
add hl, hl
add hl, hl
endr
ld de, $8310
add hl, de
ld a, [BattleAnimByte]
@ -797,8 +802,9 @@ BattleAnimCmd_D9: ; cc52c (33:452c)
ld a, [hl]
and a
jr z, .asm_cc537
rept 2
inc hl
inc hl
endr
jr .asm_cc52f
.asm_cc537
@ -852,8 +858,9 @@ BattleAnimCmd_DA: ; cc57e (33:457e)
ld a, [hl]
and a
jr z, .asm_cc589
rept 2
inc hl
inc hl
endr
jr .asm_cc581
.asm_cc589
@ -1243,10 +1250,9 @@ BattleAnimCmd_E1: ; cc807 (33:4807)
ld e, a
ld d, 0
ld hl, Datacc871
rept 4
add hl, de
add hl, de
add hl, de
add hl, de
endr
ld a, [rSVBK] ; $ff00+$70
push af
@ -1392,8 +1398,9 @@ Functioncc8d3: ; cc8d3
inc hl
ld d, [hl]
ld hl, BattleAnimations
rept 2
add hl, de
add hl, de
endr
call Function3ae1
call BattleAnimAssignPals
call BattleAnimDelayFrame

View File

@ -36,12 +36,9 @@ Functioncc9c4: ; cc9c4 (33:49c4)
ld e, a
ld d, 0
ld hl, BattleAnimObjects
rept 6
add hl, de
add hl, de
add hl, de
add hl, de
add hl, de
add hl, de
endr
ld e, l
ld d, h
ld hl, $0
@ -71,8 +68,9 @@ Functioncc9c4: ; cc9c4 (33:49c4)
ld a, [BattleAnimTemps + 2]
ld [hli], a
xor a
rept 2
ld [hli], a
ld [hli], a
endr
ld a, [BattleAnimTemps + 3]
ld [hli], a
xor a
@ -80,8 +78,9 @@ Functioncc9c4: ; cc9c4 (33:49c4)
dec a
ld [hli], a
xor a
rept 2
ld [hli], a
ld [hli], a
endr
ld [hl], a
ret
@ -516,8 +515,9 @@ Functionccfbe: ; ccfbe
ld e, [hl]
ld d, 0
ld hl, Jumptable_ccfce
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -670,10 +670,9 @@ Functioncd0a6: ; cd0a6 (33:50a6)
ld hl, $f
add hl, bc
ld a, [hl]
rept 4
inc [hl]
inc [hl]
inc [hl]
inc [hl]
endr
ld d, $10
push af
push de
@ -937,8 +936,9 @@ Functioncd232: ; cd232 (33:5232)
ld [hl], a
ld hl, $7
add hl, bc
rept 2
dec [hl]
dec [hl]
endr
ret
.asm_cd245
call Functioncc9bd
@ -1739,8 +1739,9 @@ Functioncd687: ; cd687 (33:5687)
ld [hl], a
ld hl, $f
add hl, bc
rept 2
inc [hl]
inc [hl]
endr
Functioncd6c5: ; cd6c5 (33:56c5)
ret
@ -1760,8 +1761,9 @@ Functioncd6d6: ; cd6d6 (33:56d6)
call Functioncc9bd
ret
asm_cd6da: ; cd6da (33:56da)
rept 2
inc a
inc a
endr
ld [hl], a
sub $10
ret c
@ -2128,8 +2130,9 @@ Functioncd8cc: ; cd8cc (33:58cc)
call Functionce7bf
ld hl, $f
add hl, bc
rept 2
inc [hl]
inc [hl]
endr
ld a, [hl]
and $1f
ret nz
@ -2550,8 +2553,9 @@ Functioncdb28: ; cdb28 (33:5b28)
ld a, [hl]
cp $98
ret nc
rept 2
inc [hl]
inc [hl]
endr
ld hl, $1
add hl, bc
set 0, [hl]
@ -2587,8 +2591,9 @@ Functioncdb65: ; cdb65 (33:5b65)
ld a, [hl]
cp $98
ret nc
rept 2
inc [hl]
inc [hl]
endr
ld hl, $f
add hl, bc
ld a, [hl]
@ -2722,8 +2727,9 @@ Functioncdc27: ; cdc27 (33:5c27)
ld hl, $f
add hl, bc
ld a, [hl]
rept 2
inc [hl]
inc [hl]
endr
ld d, $2
call Functionce734
ld hl, $9
@ -2871,8 +2877,9 @@ Functioncdcfe: ; cdcfe (33:5cfe)
ld hl, $10
add hl, bc
ld a, [hl]
rept 2
inc [hl]
inc [hl]
endr
ld d, $10
call Functionce734
ld d, a
@ -3083,8 +3090,9 @@ Functioncde28: ; cde28 (33:5e28)
ld hl, $f
add hl, bc
ld a, [hl]
rept 2
inc [hl]
inc [hl]
endr
ld d, $4
call Functionce734
ld hl, $9
@ -3112,8 +3120,9 @@ Functioncde54: ; cde54 (33:5e54)
ld hl, $f
add hl, bc
ld a, [hl]
rept 2
dec [hl]
dec [hl]
endr
ld d, $10
call Functionce734
ld hl, $a
@ -3353,8 +3362,9 @@ Functioncdf8c: ; cdf8c (33:5f8c)
ld [hl], a
ld hl, $b
add hl, bc
rept 2
inc [hl]
inc [hl]
endr
ld a, [hl]
and $7
ret nz
@ -3394,8 +3404,9 @@ Functioncdfcb: ; cdfcb (33:5fcb)
ld [hl], a
ld hl, $b
add hl, bc
rept 2
inc [hl]
inc [hl]
endr
ld a, [hl]
and $3
ret nz
@ -3404,8 +3415,9 @@ Functioncdfcb: ; cdfcb (33:5fcb)
ld a, [hl]
cp $d0
jr z, .asm_ce007
rept 2
dec [hl]
dec [hl]
endr
ret
.asm_ce007
call Functioncc9bd
@ -3930,8 +3942,9 @@ Functionce2cc: ; ce2cc (33:62cc)
ld [hl], a
ld hl, $10
add hl, bc
rept 2
dec [hl]
dec [hl]
endr
ret
Functionce2fd: ; ce2fd (33:62fd)
@ -4077,8 +4090,9 @@ Functionce3b4: ; ce3b4 (33:63b4)
ld hl, $f
add hl, bc
ld a, [hl]
rept 2
inc [hl]
inc [hl]
endr
push af
ld d, $2
call Functionce734
@ -4317,8 +4331,9 @@ Functionce508: ; ce508 (33:6508)
ld a, [hl]
cp $10
jr nc, .asm_ce52e
rept 2
inc [hl]
inc [hl]
endr
ld d, a
ld hl, $b
add hl, bc
@ -4428,12 +4443,14 @@ Functionce59a: ; ce59a (33:659a)
jr c, .asm_ce5b0
ld hl, $7
add hl, bc
rept 2
dec [hl]
dec [hl]
endr
ld hl, $8
add hl, bc
rept 2
inc [hl]
inc [hl]
endr
ret
.asm_ce5b0
call Functioncc9bd
@ -4446,8 +4463,9 @@ Functionce5b4: ; ce5b4 (33:65b4)
ld hl, $b
add hl, bc
ld a, [hl]
rept 2
inc [hl]
inc [hl]
endr
push af
push de
call Functionce734
@ -4474,10 +4492,9 @@ Functionce5dc: ; ce5dc (33:65dc)
ld a, [hl]
cp $d0
jr z, .asm_ce5ea
rept 4
dec [hl]
dec [hl]
dec [hl]
dec [hl]
endr
ret
.asm_ce5ea
call Functioncc9bd
@ -4510,10 +4527,9 @@ Functionce60a: ; ce60a (33:660a)
ld a, [hl]
cp $4
jr z, Functionce618
rept 4
inc [hl]
inc [hl]
inc [hl]
inc [hl]
endr
ret
Functionce618: ; ce618 (33:6618)
@ -4529,10 +4545,9 @@ Functionce622: ; ce622 (33:6622)
ld a, [hl]
cp $d8
ret z
rept 4
dec [hl]
dec [hl]
dec [hl]
dec [hl]
endr
ret
Functionce62f: ; ce62f (33:662f)
@ -4567,8 +4582,9 @@ Functionce648: ; ce648 (33:6648)
ld [hl], a
ld hl, $9
add hl, bc
rept 2
inc [hl]
inc [hl]
endr
ret
Functionce65c: ; ce65c (33:665c)
@ -4754,8 +4770,9 @@ Functionce749: ; ce749 (33:6749)
ld a, d
ld d, 0
ld hl, Unknown_ce77f
rept 2
add hl, de
add hl, de
endr
ld e, [hl]
inc hl
ld d, [hl]
@ -4864,8 +4881,9 @@ Functionce7d1: ; ce7d1
ld [hl], a
ld hl, $000d
add hl, bc
rept 2
dec [hl]
dec [hl]
endr
jr .asm_ce7d1
.asm_ce815
@ -4886,8 +4904,9 @@ Functionce823: ; ce823
ld e, [hl]
ld d, 0
ld hl, Unknown_ce85e
rept 2
add hl, de
add hl, de
endr
ld e, [hl]
inc hl
ld d, [hl]
@ -4904,8 +4923,9 @@ Functionce83c: ; ce83c
ld l, a
ld h, 0
ld de, Unknown_ceeae
rept 2
add hl, hl
add hl, hl
endr
add hl, de
ret
; ce846
@ -4915,8 +4935,9 @@ Functionce846: ; ce846 (33:6846)
push hl
ld l, a
ld h, 0
rept 2
add hl, hl
add hl, hl
endr
ld de, AnimObjGFX
add hl, de
ld c, [hl]

View File

@ -61,8 +61,9 @@ Functionc804a: ; c804a (32:404a)
ld e, [hl]
ld d, 0
ld hl, BattleBGEffects
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -708,9 +709,9 @@ Functionc83fa: ; c83fa (32:43fa)
ld l, a
ld a, [BattleAnimTemps + 2]
ld h, a
rept 3
add hl, de
add hl, de
add hl, de
endr
ld a, [hl]
cp $ff
jr z, Functionc8434
@ -756,8 +757,9 @@ Functionc843b: ; c843b (32:443b)
ld e, [hl]
ld d, 0
ld hl, Unknown_c849c
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -771,9 +773,9 @@ Functionc8458: ; c8458 (32:4458)
ld e, [hl]
ld d, 0
ld hl, Unknown_c84a8
rept 3
add hl, de
add hl, de
add hl, de
endr
ld a, [hli]
ld b, a
and $f
@ -793,8 +795,9 @@ Functionc8458: ; c8458 (32:4458)
ld e, [hl]
ld d, 0
ld hl, Unknown_c849c
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -1012,8 +1015,9 @@ Functionc85ce: ; c85ce (32:45ce)
ld a, [hl]
cp $20
jr nc, .asm_c85fc
rept 2
inc [hl]
inc [hl]
endr
call Functionc8f9a
ret
.asm_c85fc
@ -1388,8 +1392,9 @@ Functionc87de: ; c87de (32:47de)
call Functionc901b
ld hl, $2
add hl, bc
rept 2
inc [hl]
inc [hl]
endr
ret
Functionc8801: ; c8801 (32:4801)
@ -1792,8 +1797,9 @@ Functionc8a14: ; c8a14 (32:4a14)
call Functionc901b
ld hl, $3
add hl, bc
rept 2
inc [hl]
inc [hl]
endr
ret
Functionc8a36: ; c8a36 (32:4a36)
@ -1877,8 +1883,9 @@ Functionc8a9a: ; c8a9a (32:4a9a)
ld h, $d2
.asm_c8aa5
ld [hl], e
rept 2
inc hl
inc hl
endr
dec a
jr nz, .asm_c8aa5
ret

View File

@ -1840,8 +1840,9 @@ HandleWeather: ; 3cb9e
dec a
ld c, a
ld b, 0
rept 2
add hl, bc
add hl, bc
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -2552,8 +2553,9 @@ Function3d02b: ; 3d02b
dec a
ld c, a
ld b, 0
rept 2
add hl, bc
add hl, bc
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -2591,8 +2593,9 @@ Function3d099: ; 3d099
rl [hl]
ret nc
ld a, $ff
rept 2
ld [hli], a
ld [hli], a
endr
ld [hl], a
ret
; 3d0ab
@ -3756,10 +3759,9 @@ NewEnemyMonStatus: ; 3d834
ld [LastPlayerCounterMove], a
ld [LastEnemyMove], a
ld hl, EnemySubStatus1
rept 4
ld [hli], a
ld [hli], a
ld [hli], a
ld [hli], a
endr
ld [hl], a
ld [EnemyDisableCount], a
ld [EnemyFuryCutterCount], a
@ -4033,9 +4035,9 @@ Function3da0d: ; 3da0d
ld de, BattleMonDVs
ld bc, 2 + NUM_MOVES + 1 ; DVs, PP, happiness ; BattleMonLevel - BattleMonDVs
call CopyBytes
rept 3
inc hl
inc hl
inc hl
endr
ld de, BattleMonLevel
ld bc, 1 + 1 + 1 + 2 + 2 * 6 ; level, status, unused, stats
call CopyBytes
@ -4125,9 +4127,9 @@ Function3dabd: ; 3dabd
ld de, EnemyMonDVs
ld bc, 2 + NUM_MOVES + 1
call CopyBytes
rept 3
inc hl
inc hl
inc hl
endr
ld de, EnemyMonLevel
ld bc, 1 + 1 + 1 + 2 + 2 * 6
call CopyBytes
@ -4250,15 +4252,14 @@ NewBattleMonStatus: ; 3dbde
ld [LastPlayerCounterMove], a
ld [LastPlayerMove], a
ld hl, PlayerSubStatus1
rept 4
ld [hli], a
ld [hli], a
ld [hli], a
ld [hli], a
endr
ld [hl], a
ld hl, PlayerUsedMoves
rept 3
ld [hli], a
ld [hli], a
ld [hli], a
endr
ld [hl], a
ld [PlayerDisableCount], a
ld [PlayerFuryCutterCount], a
@ -4694,16 +4695,18 @@ Function3deb6: ; 3deb6
ld a, [hli]
cp $ff
jr z, .asm_3def9
rept 2
inc hl
inc hl
endr
cp b
jr nz, .asm_3dec7
pop bc
ld a, [bc]
ld [wd265], a
push bc
rept 2
dec hl
dec hl
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -5769,8 +5772,9 @@ Function3e4bc: ; 3e4bc
ld a, [wcfa9]
ld b, a
ld a, [wd0eb]
rept 2
inc a
inc a
endr
cp b
jp nz, .asm_3e57a
ld a, $1
@ -5953,8 +5957,9 @@ Function3e75f: ; 3e75f
ld bc, $0102
call PrintNum
pop hl
rept 2
inc hl
inc hl
endr
ld [hl], "/"
inc hl
ld de, wd265
@ -6583,9 +6588,9 @@ LoadEnemyMon: ; 3e8eb
xor a
ld h, d
ld l, e
rept 3
ld [hli], a
ld [hli], a
ld [hli], a
endr
ld [hl], a
; Make sure the predef knows this isn't a partymon
ld [MagikarpLength], a
@ -6758,8 +6763,9 @@ CheckUnownLetter: ; 3eb75
.next
; Make sure we haven't gone past the end of the table
rept 2
inc e
inc e
endr
ld a, e
cp a, .Set1 - .LetterSets
jr c, .loop
@ -7109,8 +7115,9 @@ BadgeStatBoosts: ; 3ed45
; Swap badges 3 (PlainBadge) and 5 (MineralBadge).
ld d, a
and %00000100
rept 2
add a
add a
endr
ld b, a
ld a, d
and %00010000
@ -7129,8 +7136,9 @@ BadgeStatBoosts: ; 3ed45
ld a, b
srl b
call c, BoostStat
rept 2
inc hl
inc hl
endr
; Check every other badge.
srl b
dec c
@ -7259,8 +7267,9 @@ _BattleRandom:: ; 3edd8
; a * 5 + 1
ld c, a
rept 2
add a
add a
endr
add c
inc a
@ -7392,8 +7401,9 @@ Function3ee3b: ; 3ee3b
ld [de], a
.asm_3eea9
rept 2
inc de
inc de
endr
dec c
jr nz, .asm_3ee7c
xor a
@ -7468,8 +7478,9 @@ Function3ee3b: ; 3ee3b
inc [hl]
jr nz, .asm_3ef3d
ld a, $ff
rept 2
ld [hli], a
ld [hli], a
endr
ld [hl], a
.asm_3ef3d
@ -7797,8 +7808,9 @@ Function3f136: ; 3f136
inc [hl]
jr nz, .asm_3f186
ld a, $ff
rept 2
ld [hli], a
ld [hli], a
endr
ld [hl], a
.asm_3f186
@ -8690,8 +8702,9 @@ Function3f71d: ; 3f71d
rl [hl]
jr nc, .asm_3f73d
ld a, $ff
rept 2
ld [hli], a
ld [hli], a
endr
ld [hl], a
.asm_3f73d
@ -9083,11 +9096,13 @@ Function3fa42: ; 3fa42
ld d, $5
.asm_3fa62
push hl
rept 2
inc hl
inc hl
endr
ld a, [hl]
rept 2
dec hl
dec hl
endr
and a
jr z, .asm_3fa85
push de
@ -9187,16 +9202,18 @@ Function3fac8: ; 3fac8
ld c, $1
.asm_3faed
ld a, b
rept 2
add b
add b
endr
ld e, a
ld d, $0
ld hl, DefaultFlypoint
add hl, de
push hl
ld a, c
rept 2
add c
add c
endr
ld e, a
ld d, $0
ld hl, DefaultFlypoint

View File

@ -50,8 +50,9 @@ DoMove: ; 3402c
ld c, a
ld b, 0
ld hl, MoveEffectsPointers
rept 2
add hl, bc
add hl, bc
endr
ld a, BANK(MoveEffectsPointers)
call GetFarHalfword
@ -100,8 +101,9 @@ DoMove: ; 3402c
ld c, a
ld b, 0
ld hl, BattleCommandPointers
rept 2
add hl, bc
add hl, bc
endr
pop bc
ld a, BANK(BattleCommandPointers)
@ -1062,8 +1064,9 @@ BattleCommand04: ; 34555
jp nz, EndMoveEffect
; SubStatus5
rept 2
inc de
inc de
endr
ld a, [de]
bit SUBSTATUS_TRANSFORMED, a
@ -1259,8 +1262,9 @@ BattleCommand05: ; 34631
jr nc, .ScopeLens
; +2 critical level
rept 2
inc c
inc c
endr
.ScopeLens
push bc
@ -1500,8 +1504,9 @@ BattleCommand07: ; 346d2
pop hl
.asm_347b3
rept 2
inc hl
inc hl
endr
jr .asm_34743
.end
@ -1746,11 +1751,9 @@ Function348de: ; 348de
jr c, .loop
; neutral
rept 5
inc c
inc c
inc c
inc c
inc c
endr
cp 10
jr z, .loop
@ -2239,8 +2242,9 @@ Function34b77: ; 34b77
ld b, [hl]
inc hl
ld c, [hl]
rept 2
inc hl
inc hl
endr
srl c
rl b
srl c
@ -3344,8 +3348,9 @@ EndMoveEffect: ; 352a3
ld a, [BattleScriptBufferLoc + 1]
ld h, a
ld a, $ff
rept 2
ld [hli], a
ld [hli], a
endr
ld [hl], a
ret
; 352b1
@ -3983,9 +3988,9 @@ Function355dd: ; 355dd
sla c
rl b
.asm_35604
rept 3
dec hl
dec hl
dec hl
endr
ld a, [hli]
ld l, [hl]
ld h, a
@ -4039,8 +4044,9 @@ BattleCommand62: ; 35612
xor a
ld hl, hDividend
rept 2
ld [hli], a
ld [hli], a
endr
ld [hl], a
; Level * 2
@ -4061,8 +4067,9 @@ BattleCommand62: ; 35612
pop bc
; + 2
rept 2
inc [hl]
inc [hl]
endr
; * bp
inc hl
@ -4523,9 +4530,9 @@ BattleCommand41: ; 35864
set SUBSTATUS_ENCORED, [hl]
call BattleRandom
and $3
rept 3
inc a
inc a
inc a
endr
ld [de], a
call Function36abf
jr nz, .asm_3591a
@ -4650,8 +4657,9 @@ BattleCommand42: ; 35926
ld [wd1ec], a
ld a, [hl]
ld [wd1ed], a
rept 2
dec de
dec de
endr
ld a, [de]
dec de
add b
@ -4664,12 +4672,12 @@ BattleCommand42: ; 35926
ld a, [CurDamage + 1]
rr a
ld [CurDamage + 1], a
rept 3
inc hl
inc hl
inc hl
inc de
inc de
endr
rept 3
inc de
endr
; fallthrough
; 359ac
@ -5142,8 +5150,9 @@ BattleCommand4a: ; 35c0f
call GetMoveName
call BattleRandom
and 3
rept 2
inc a
inc a
endr
ld b, a
ld a, [hl]
and $3f
@ -6854,8 +6863,9 @@ Function3661d: ; 3661d
dec c
ld b, 0
ld hl, Table0x364e6
rept 2
add hl, bc
add hl, bc
endr
xor a
ld [hMultiplicand], a
@ -7009,8 +7019,9 @@ BattleCommand22: ; 366e5
ld [wEnemyMoveStruct + MOVE_EFFECT], a
call BattleRandom
and 1
rept 2
inc a
inc a
endr
ld [bc], a
ld a, 1
ld [wc689], a
@ -7046,8 +7057,9 @@ BattleCommand3e: ; 3671a
set 7, [hl]
call BattleRandom
and $1
rept 2
inc a
inc a
endr
inc de
ld [de], a
.asm_3674c
@ -7885,9 +7897,9 @@ BattleCommand3b: ; 36c2d
ret nz
call BattleRandom
and 3
rept 3
inc a
inc a
inc a
endr
ld [hl], a
ld a, BATTLE_VARS_MOVE_ANIM
call GetBattleVar
@ -7899,8 +7911,9 @@ BattleCommand3b: ; 36c2d
ld a, [hli]
cp b
jr z, .asm_36c69
rept 2
inc hl
inc hl
endr
jr .asm_36c61
.asm_36c69
@ -7981,8 +7994,9 @@ BattleCommand27: ; 36cb2
ld [Buffer2], a
ld a, [hl]
ld [Buffer1], a
rept 2
dec hl
dec hl
endr
ld a, [hl]
ld [wd1ec], a
sub c
@ -8083,8 +8097,9 @@ Function36d70: ; 36d70
set SUBSTATUS_CONFUSED, [hl]
call BattleRandom
and 3
rept 2
inc a
inc a
endr
ld [bc], a
ld a, BATTLE_VARS_MOVE_EFFECT
@ -8263,8 +8278,9 @@ BattleCommand31: ; 36e7c
rr b
srl a
rr b
rept 2
dec hl
dec hl
endr
ld a, b
ld [de], a
ld a, [hld]
@ -8853,8 +8869,9 @@ BattleCommand2d: ; 371cd
ld a, [hli]
ld [de], a
inc hl
rept 2
inc de
inc de
endr
ld bc, NUM_MOVES
call CopyBytes
ld a, [hBattleTurn]
@ -9655,8 +9672,9 @@ BattleCommand66: ; 37991
ld a, [hli]
cp b
jr nc, .ok
rept 2
inc hl
inc hl
endr
jr .loop
.ok
ld d, [hl]
@ -10045,14 +10063,16 @@ BattleCommand6a6c: ; 37b7e
inc c
cp WEATHER_SUN
jr z, .Heal
rept 2
dec c
dec c
endr
.Heal
ld b, 0
ld hl, .Multipliers
rept 2
add hl, bc
add hl, bc
endr
ld a, [hli]
ld h, [hl]

View File

@ -45,8 +45,9 @@ HiddenPowerDamage: ; fbced
; Multiply by 5
ld b, a
rept 2
add a
add a
endr
add b
; Add Special & 3
@ -74,8 +75,9 @@ HiddenPowerDamage: ; fbced
ld a, [hl]
and 3 << 4
swap a
rept 2
add a
add a
endr
or b
; Skip Normal

View File

@ -141,8 +141,9 @@ CalcMagikarpLength: ; fbbfc
; hl = de * 10
ld h, d
ld l, e
rept 2
add hl, hl
add hl, hl
endr
add hl, de
add hl, hl

View File

@ -60,9 +60,9 @@ endr
jr c, .ReadMon
; Next monster...
rept 3
inc hl
inc hl
inc hl
endr
jr .CheckEncounter
.ReadMon
@ -98,8 +98,9 @@ endr
and 3
cp NITE
jr c, .TimeSpecies
rept 2
inc hl
inc hl
endr
.TimeSpecies
ld d, [hl]

View File

@ -262,10 +262,9 @@ Function8bc6:
bit 7, a
jr z, .asm_8bd7
and $7f
rept 4
inc hl
inc hl
inc hl
inc hl
endr
.asm_8bd7
asm_8bd7
@ -361,8 +360,9 @@ Function8c43: ; 8c43
.asm_8c5a
ld l, c
ld h, $0
rept 2
add hl, hl
add hl, hl
endr
ld bc, Palettes_a8be
add hl, bc
ld bc, $0004
@ -398,8 +398,9 @@ Function8c8a: ; 8c8a
ld hl, Unknown_8f6a
ld b, 0
dec c
rept 2
add hl, bc
add hl, bc
endr
ld a, [rSVBK]
push af
ld a, $5
@ -420,9 +421,9 @@ Function8c8a: ; 8c8a
Function8cb4: ; 8cb4
ld l, e
ld h, 0
rept 3
add hl, hl
add hl, hl
add hl, hl
endr
ld de, Palettes_8d05
add hl, de
call CheckCGB
@ -433,8 +434,9 @@ Function8cb4: ; 8cb4
ld bc, $0010
call CopyBytes
pop hl
rept 2
inc hl
inc hl
endr
ld a, [hli]
ld [wcda9 + 3], a
ld a, [hli]
@ -556,9 +558,9 @@ Function9615: ; 9615
Function9625: ; 9625
ld l, a
ld h, $0
rept 3
add hl, hl
add hl, hl
add hl, hl
endr
ld bc, Palettes_9df6
add hl, bc
ret
@ -639,15 +641,13 @@ Function9673: ; 9673
ld c, $8
.asm_9683
ld a, $ff
rept 4
ld [hli], a
ld [hli], a
ld [hli], a
ld [hli], a
endr
xor a
rept 4
ld [hli], a
ld [hli], a
ld [hli], a
ld [hli], a
endr
dec c
jr nz, .asm_9683
pop af
@ -897,9 +897,9 @@ Function97e5: ; 97e5
Function97ee: ; 97ee
ld l, a
ld h, $0
rept 3
add hl, hl
add hl, hl
add hl, hl
endr
ld bc, PokemonPalettes
add hl, bc
ret
@ -913,10 +913,9 @@ Function97f9: ; 97f9
call CheckShininess
pop hl
ret nc
rept 4
inc hl
inc hl
inc hl
inc hl
endr
ret
; 9809
@ -1140,8 +1139,9 @@ Function994a: ; 994a
jr nz, .asm_99a6
ld a, $20
ld [rJOYP], a
rept 2
ld a, [rJOYP]
ld a, [rJOYP]
endr
call Function9a7a
call Function9a7a
ld a, $30
@ -1150,19 +1150,16 @@ Function994a: ; 994a
call Function9a7a
ld a, $10
ld [rJOYP], a
rept 6
ld a, [rJOYP]
ld a, [rJOYP]
ld a, [rJOYP]
ld a, [rJOYP]
ld a, [rJOYP]
ld a, [rJOYP]
endr
call Function9a7a
call Function9a7a
ld a, $30
ld [rJOYP], a
rept 3
ld a, [rJOYP]
ld a, [rJOYP]
ld a, [rJOYP]
endr
call Function9a7a
call Function9a7a
ld a, [rJOYP]
@ -1949,16 +1946,17 @@ Functionb1de: ; b1de
ld e, a
ld d, 0
ld hl, Unknown_b279
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
ld a, [TimeOfDayPal]
and 3
rept 3
add a
add a
add a
endr
ld e, a
ld d, 0
add hl, de
@ -2027,10 +2025,9 @@ endr
and 3
cp NITE
jr c, .asm_b26d
rept 4
inc hl
inc hl
inc hl
inc hl
endr
.asm_b26d
ld de, Unkn1Pals + 8 * 6 + 2
ld bc, 4

View File

@ -260,8 +260,9 @@ Function109926: ; 109926
ld e, a
ld d, 0
ld hl, Jumptable_109937
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -326,8 +327,9 @@ Function109986: ; 109986 (42:5986)
cp $30
jr c, Function109986
ld a, [wcf66]
rept 2
dec a
dec a
endr
ld [wcf66], a
ld hl, LYOverrides + $1f
call Function1099a3
@ -397,8 +399,9 @@ ParseCredits: ; 1099aa
ld e, a
ld d, 0
ld hl, CreditsStrings
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld d, [hl]
ld e, a
@ -582,10 +585,9 @@ Function109aff: ; 109aff (42:5aff)
dec c
jr nz, .asm_109b08
pop hl
rept 4
inc hl
inc hl
inc hl
inc hl
endr
dec b
jr nz, .asm_109b01
ret
@ -735,8 +737,9 @@ Function109bca: ; 109bca (42:5bca)
ld [hl], a
ld a, [wcf65]
and 3
rept 2
add a
add a
endr
add e
add a
ld e, a

View File

@ -794,8 +794,9 @@ TryReadSign: ; 96a38
push hl
call PlayTalkObject
pop hl
rept 2
inc hl
inc hl
endr
call GetMapScriptHeaderBank
call GetFarHalfword
call GetMapScriptHeaderBank

View File

@ -439,9 +439,9 @@ Function97e79: ; 97e79
ld e, a
ld d, 0
ld hl, Table97e94
rept 3
add hl, de
add hl, de
add hl, de
endr
ld a, [hli]
push af
ld a, [hli]

View File

@ -66,9 +66,9 @@ PickedFruitTree: ; 4405f
ResetFruitTrees: ; 4406a
xor a
ld hl, FruitTreeFlags
rept 3
ld [hli], a
ld [hli], a
ld [hli], a
endr
ld [hl], a
ld hl, DailyFlags
set 4, [hl]

View File

@ -3,8 +3,9 @@ GetLandmarkCoords: ; 0x1ca896
push hl
ld l, e
ld h, 0
rept 2
add hl, hl
add hl, hl
endr
ld de, Landmarks
add hl, de
ld a, [hli]
@ -23,8 +24,9 @@ GetLandmarkName:: ; 0x1ca8a5
ld l, e
ld h, 0
rept 2
add hl, hl
add hl, hl
endr
ld de, Landmarks + 2
add hl, de
ld a, [hli]

View File

@ -656,9 +656,9 @@ Function467b: ; 467b
ld [hl], a
ld hl, OBJECT_27
add hl, bc
rept 3
ld [hli], a
ld [hli], a
ld [hli], a
endr
ld [hl], a
ld hl, OBJECT_DIRECTION_WALKING
add hl, bc
@ -675,8 +675,9 @@ Function4690: ; 4690
bit 2, [hl]
jr nz, .ok
rept 2
add a
add a
endr
and %00001100
ld hl, OBJECT_FACING
add hl, bc
@ -750,8 +751,9 @@ GetStepVector: ; 46e9
add hl, bc
ld a, [hl]
and %00001111
rept 2
add a
add a
endr
ld l, a
ld h, 0
ld de, StepVectors
@ -3079,8 +3081,9 @@ Function57ca: ; 57ca
ret z
ld a, [wd45b]
and 3
rept 2
add a
add a
endr
jr Function57db
; 57d9

View File

@ -6,8 +6,9 @@ RunMapSetupScript:: ; 15363
ld c, a
ld b, 0
ld hl, MapSetupScripts
rept 2
add hl, bc
add hl, bc
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -259,9 +260,9 @@ ReadMapSetupScript: ; 1541d
ld c, a
ld b, 0
ld hl, MapSetupCommands
rept 3
add hl, bc
add hl, bc
add hl, bc
endr
; bank
ld b, [hl]

View File

@ -1235,8 +1235,9 @@ Function10866: ; 10866 (4:4866)
Function1086b: ; 1086b
ld e, a
ld d, 0
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -1285,8 +1286,9 @@ Function1089d: ; 1089d
.asm_108b3
ld hl, PackGFXPointers
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld e, a
ld d, [hl]

View File

@ -899,10 +899,9 @@ asm_4065d: ; 4065d (10:465d)
ld e, a
ld d, 0
ld hl, Unknown_40a3e + 2
rept 4
add hl, de
add hl, de
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -1339,10 +1338,9 @@ Function409f1: ; 409f1 (10:49f1)
jr z, .asm_40a39
push af
ld hl, Unknown_40a3e
rept 4
add hl, de
add hl, de
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -1883,15 +1881,9 @@ Function40fcd: ; 40fcd (10:4fcd)
ld e, a
ld d, 0
ld hl, Strings_40fe4
rept 9
add hl, de
add hl, de
add hl, de
add hl, de
add hl, de
add hl, de
add hl, de
add hl, de
add hl, de
endr
ld e, l
ld d, h
pop hl
@ -2406,8 +2398,9 @@ Function41427: ; 41427
Function41432: ; 41432
ld e, a
ld d, 0
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a

View File

@ -861,8 +861,9 @@ Script_trainertext: ; 0x9710f
ld c, a
ld b, 0
ld hl, WalkingX
rept 2
add hl, bc
add hl, bc
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -1121,8 +1122,9 @@ Script_faceplayer: ; 0x9722e
ld e, a
callba GetRelativeFacing
ld a, d
rept 2
add a
add a
endr
ld e, a
ld a, [$ffe0]
ld d, a
@ -1155,8 +1157,9 @@ Script_faceperson: ; 0x97248
pop bc
ret c
ld a, d
rept 2
add a
add a
endr
ld e, a
ld d, c
call ApplyPersonFacing
@ -1177,8 +1180,9 @@ Script_spriteface: ; 0x97274
.asm_97280
ld d, a
call GetScriptByte
rept 2
add a
add a
endr
ld e, a
call ApplyPersonFacing
ret
@ -1638,9 +1642,9 @@ ScriptCall: ; 0x974cb
inc [hl]
ld d, $0
ld hl, wd43d
rept 3
add hl, de
add hl, de
add hl, de
endr
pop de
ld a, [ScriptBank]
ld [hli], a
@ -1811,9 +1815,9 @@ StdScript: ; 0x9757b
call GetScriptByte
ld d, a
ld hl, StdScripts
rept 3
add hl, de
add hl, de
add hl, de
endr
ld a, BANK(StdScripts)
call GetFarByte
ld b, a

View File

@ -345,8 +345,9 @@ Function10ef1c: ; 10ef1c
ld b, a
ld a, e
ld [hli], a
rept 2
inc e
inc e
endr
ld a, $80
ld [hli], a
dec c
@ -371,9 +372,9 @@ AnimateTitleCrystal: ; 10ef32
ld a, [hl]
add 2
ld [hli], a
rept 3
inc hl
inc hl
inc hl
endr
dec c
jr nz, .loop

View File

@ -37,8 +37,9 @@ SpecialDratini: ; 0x8b170
; get address of mon's first move
pop de
rept 2
inc de
inc de
endr
.GiveMoves
ld a, [hl]

View File

@ -287,8 +287,9 @@ PrintSeerText: ; 4f26d
ld e, a
ld d, 0
ld hl, SeerTexts
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a

View File

@ -110,8 +110,9 @@ Functiond00a3: ; d00a3
ld c, e
ld b, 0
ld hl, PokeAnims
rept 2
add hl, bc
add hl, bc
endr
ld a, [hli]
ld b, [hl]
ld c, a
@ -507,8 +508,9 @@ Functiond02f8: ; d02f8
ld a, [hli]
ld h, [hl]
ld l, a
rept 2
add hl, de
add hl, de
endr
ld a, [w2_d174]
call GetFarHalfword
ld a, l
@ -530,8 +532,9 @@ Functiond031b: ; d031b
ld a, [hli]
ld h, [hl]
ld l, a
rept 2
add hl, bc
add hl, bc
endr
ld a, [w2_d177]
call GetFarHalfword
ld a, [w2_d177]
@ -948,8 +951,9 @@ Functiond055c: ; d055c
dec a
ld e, a
ld d, 0
rept 2
add hl, de
add hl, de
endr
ld a, c
ld [w2_d174], a
call GetFarHalfword
@ -1018,8 +1022,9 @@ Functiond05ce: ; d05ce
dec a
ld e, a
ld d, 0
rept 2
add hl, de
add hl, de
endr
ld a, b
call GetFarHalfword
ld a, l
@ -1057,8 +1062,9 @@ Functiond061b: ; d061b
dec a
ld e, a
ld d, 0
rept 2
add hl, de
add hl, de
endr
ld a, [w2_d17a]
call GetFarHalfword
ld a, l

View File

@ -967,8 +967,9 @@ GetPokemonName:: ; 343b
ld e, a
ld h, 0
ld l, a
rept 2
add hl, hl
add hl, hl
endr
add hl, de
add hl, hl
ld de, PokemonNames
@ -1342,8 +1343,9 @@ Function35de:: ; 35de
inc hl
.asm_35f8
rept 2
inc hl
inc hl
endr
jr .asm_35e6
.asm_35fc
@ -2108,10 +2110,12 @@ Function3eea:: ; 3eea
push bc
ld de, AttrMap - TileMap
add hl, de
rept 2
inc b
inc b
inc c
endr
rept 2
inc c
endr
call Function3f35
pop bc
pop hl
@ -2135,10 +2139,12 @@ Function3f0d:: ; 3f0d
push bc
ld de, AttrMap - TileMap
add hl, de
rept 2
inc b
inc b
inc c
endr
rept 2
inc c
endr
call Function3f35
pop bc
pop hl
@ -2259,8 +2265,9 @@ Function3f9f:: ; 3f9f
ld c, $8
.asm_3fa5
ld a, [de]
rept 2
inc de
inc de
endr
cpl
ld [hl], $0
inc hl

View File

@ -158,12 +158,9 @@ PlayCryHeader:: ; 3be3
ld [MBC3RomBank], a
ld hl, CryHeaders
rept 6
add hl, de
add hl, de
add hl, de
add hl, de
add hl, de
add hl, de
endr
ld e, [hl]
inc hl

View File

@ -153,8 +153,9 @@ GetBattleVarAddr:: ; 39e7
ld hl, .battlevarpairs
ld c, a
ld b, 0
rept 2
add hl, bc
add hl, bc
endr
ld a, [hli]
ld h, [hl]
@ -174,8 +175,9 @@ GetBattleVarAddr:: ; 39e7
ld b, 0
ld hl, .vars
rept 2
add hl, bc
add hl, bc
endr
ld a, [hli]
ld h, [hl]

View File

@ -195,8 +195,9 @@ FarCopyBytesDouble:: ; e9b
.loop
ld a, [de]
inc de
rept 2
ld [hli], a
ld [hli], a
endr
.dec
dec c
jr nz, .loop
@ -406,9 +407,9 @@ Copy1bpp:: ; fa4
push af
ld h, 0
ld l, c
rept 3
add hl, hl
add hl, hl
add hl, hl
endr
ld b, h
ld c, l
pop af

View File

@ -66,12 +66,9 @@ LoadCryHeader:: ; 37f3
rst Bankswitch
ld hl, CryHeaders
rept 6
add hl, bc
add hl, bc
add hl, bc
add hl, bc
add hl, bc
add hl, bc
endr
ld e, [hl]
inc hl

View File

@ -42,8 +42,9 @@ Joypad:: ; 935
ld a, D_PAD
ld [rJOYP], a
; Read twice to give the request time to take.
rept 2
ld a, [rJOYP]
ld a, [rJOYP]
endr
; The Joypad register output is in the lo nybble (inversed).
; We make the hi nybble of our new container d-pad input.
@ -59,12 +60,9 @@ Joypad:: ; 935
ld a, BUTTONS
ld [rJOYP], a
; Wait for input to stabilize.
rept 6
ld a, [rJOYP]
ld a, [rJOYP]
ld a, [rJOYP]
ld a, [rJOYP]
ld a, [rJOYP]
ld a, [rJOYP]
endr
; Buttons take the lo nybble.
cpl
and $f
@ -211,8 +209,9 @@ GetJoypad:: ; 984
jr nz, .next
; The current input is overwritten.
rept 2
dec hl
dec hl
endr
ld b, NO_INPUT
jr .finishauto

View File

@ -303,8 +303,9 @@ Function2266:: ; 2266
; 22a3
Function22a3:: ; 22a3
rept 2
inc hl
inc hl
endr
scf
ret
; 22a7
@ -420,8 +421,9 @@ Function2336:: ; 2336
ld a, [hli]
ld h, [hl]
ld l, a
rept 2
inc hl
inc hl
endr
call Function23da
call Function23f1
call Function2408
@ -672,9 +674,9 @@ RestoreFacingAfterWarp:: ; 248a
ld a, [hli]
ld h, [hl]
ld l, a
rept 3
inc hl
inc hl
inc hl
endr
ld a, [WarpNumber]
dec a
ld c, a
@ -730,9 +732,9 @@ ChangeMap:: ; 24e4
ld [hConnectionStripLength], a
ld c, a
ld b, 0
rept 3
add hl, bc
add hl, bc
add hl, bc
endr
ld c, 3
add hl, bc
ld a, [MapBlockDataBank]
@ -1324,8 +1326,9 @@ Function27d3:: ; 27d3
ld a, d
ld [hli], a
ld a, e
rept 2
inc a
inc a
endr
and $1f
ld b, a
ld a, e
@ -1764,8 +1767,9 @@ endr
.nocarry
rr e
jr nc, .nocarry2
rept 2
inc hl
inc hl
endr
.nocarry2
ld a, [TilesetCollisionBank]
@ -2062,8 +2066,9 @@ GetAnyMapHeaderPointer:: ; 0x2bed
ld c, b
ld b, 0
ld hl, MapGroupPointers
rept 2
add hl, bc
add hl, bc
endr
ld a, [hli]
ld h, [hl]

View File

@ -28,8 +28,9 @@ Function180e:: ; 180e
.loop
cp [hl]
jr z, .found
rept 2
inc hl
inc hl
endr
dec c
jr nz, .loop
ld a, [UsedSprites + 1]
@ -511,8 +512,9 @@ rept OBJECT_STRUCT_3_DATA_WIDTH
endr
ld a, BANK(ObjectStruct3_Data)
call GetFarByte
rept 2
add a
add a
endr
and $c
pop de
pop bc

View File

@ -111,8 +111,9 @@ Function1db8:: ; 0x1db8
ld a, [hli]
ld h, [hl]
ld l, a
rept 2
inc hl
inc hl
endr
pop af
call GetNthString
ld d, h
@ -439,8 +440,9 @@ Function1f8d:: ; 1f8d
push de
ld a, [MenuSelection]
call Function1fb1
rept 2
inc hl
inc hl
endr
ld a, [hli]
ld d, [hl]
ld e, a
@ -451,8 +453,9 @@ Function1f8d:: ; 1f8d
Function1f9e:: ; 1f9e
call Function1fb1
rept 2
inc hl
inc hl
endr
ld a, [hli]
ld d, [hl]
ld e, a
@ -475,10 +478,9 @@ Function1fb1:: ; 1fb1
ld a, [hli]
ld h, [hl]
ld l, a
rept 4
add hl, de
add hl, de
add hl, de
add hl, de
endr
ret
; 1fbf
@ -497,8 +499,9 @@ Function1fbf:: ; 1fbf
ld [rSVBK], a
xor a
ld hl, $dfff
rept 2
ld [hld], a
ld [hld], a
endr
ld a, l
ld [wcf71], a
ld a, h

View File

@ -102,8 +102,9 @@ Function1b92:: ; 1b92
push hl
ld l, b
ld h, 0
rept 2
add hl, hl
add hl, hl
endr
ld e, a
ld d, 0
add hl, de
@ -131,12 +132,13 @@ Function1bb1:: ; 1bb1
dec b
jr nz, .asm_1bb8
ld a, $1
rept 2
ld [hli], a
ld [hli], a
endr
xor a
rept 3
ld [hli], a
ld [hli], a
ld [hli], a
endr
pop bc
pop hl
ret

View File

@ -126,10 +126,12 @@ TextBoxPalette:: ; 1024
; Fill text box width c height b at hl with pal 7
ld de, AttrMap - TileMap
add hl, de
rept 2
inc b
inc b
inc c
endr
rept 2
inc c
endr
ld a, TEXTBOX_PAL
.col
push bc
@ -626,10 +628,12 @@ Function138c:: ; 138c
inc de
dec c
jr nz, .row
rept 2
inc de
inc de
inc hl
endr
rept 2
inc hl
endr
pop af
dec a
jr nz, .col
@ -719,8 +723,9 @@ Function13f6:: ; 13f6
ld c, a
ld b, 0
ld hl, TextCommands
rept 2
add hl, bc
add hl, bc
endr
ld e, [hl]
inc hl
ld d, [hl]
@ -992,8 +997,9 @@ Text_PlaySound:: ; 1500
jr z, .done
cp b
jr z, .play
rept 2
inc hl
inc hl
endr
jr .loop
.play
@ -1088,8 +1094,9 @@ Text_14:: ; 156a
ld e, a
ld d, 0
ld hl, Unknown_24000
rept 2
add hl, de
add hl, de
endr
ld a, BANK(Unknown_24000)
call GetFarHalfword
ld d, h
@ -1110,8 +1117,9 @@ Text_15:: ; 1582
ld c, a
ld b, 0
ld hl, .Days
rept 2
add hl, bc
add hl, bc
endr
ld a, [hli]
ld h, [hl]
ld l, a

View File

@ -175,11 +175,13 @@ GetTileCoord:: ; 1d05
ld a, c
ld b, h
ld c, l
rept 2
add hl, hl
add hl, hl
endr
add hl, bc
rept 2
add hl, hl
add hl, hl
endr
ld c, a
xor a
ld b, a
@ -203,11 +205,13 @@ GetAttrCoord:: ; 1d21
ld a, c
ld b, h
ld c, l
rept 2
add hl, hl
add hl, hl
endr
add hl, bc
rept 2
add hl, hl
add hl, hl
endr
ld c, a
xor a
ld b, a

View File

@ -19,8 +19,9 @@ VBlank:: ; 283
ld e, a
ld d, 0
ld hl, .VBlanks
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a

View File

@ -77,8 +77,9 @@ endr
; We've done 2 16x8 blocks
ld a, [$ffdc]
rept 2
dec a
dec a
endr
ld [$ffdc], a
jr nz, .next

View File

@ -21,8 +21,9 @@ PrintItemDescription: ; 0x1c8955
dec a
ld c, a
ld b, 0
rept 2
add hl, bc
add hl, bc
endr
ld e, [hl]
inc hl
ld d, [hl]

View File

@ -253,8 +253,9 @@ ParkBall: ; e8a2
jr z, .asm_e906
cp c
jr z, .asm_e8fe
rept 2
inc hl
inc hl
endr
jr .asm_e8f2
.asm_e8fe
@ -287,8 +288,9 @@ ParkBall: ; e8a2
ld h, d
ld l, e
rept 2
add hl, de
add hl, de
endr
ld d, h
ld e, l
ld a, d
@ -802,8 +804,9 @@ HeavyBallMultiplier:
dec a
ld e, a
ld d, 0
rept 2
add hl, de
add hl, de
endr
ld a, BANK(PokedexDataPointerTable)
call GetFarHalfword
@ -816,8 +819,9 @@ HeavyBallMultiplier:
call GetPokedexEntryBank
push bc
rept 2
inc hl
inc hl
endr
call GetFarHalfword
srl h
@ -863,8 +867,9 @@ HeavyBallMultiplier:
ld a, c
cp [hl]
jr c, .heavymon
rept 2
inc hl
inc hl
endr
jr .lookup
.heavymon
@ -923,8 +928,9 @@ GLOBAL EvosAttacksPointers
ld c, a
ld b, 0
ld hl, EvosAttacksPointers
rept 2
add hl, bc
add hl, bc
endr
ld a, BANK(EvosAttacksPointers)
call GetFarHalfword
pop bc
@ -936,9 +942,9 @@ GLOBAL EvosAttacksPointers
pop bc
ret nz
rept 3
inc hl
inc hl
inc hl
endr
; Moon Stone's constant from Pokémon Red is used.
; No Pokémon evolve with Burn Heal,
@ -2119,8 +2125,9 @@ Functionf395: ; f395 (3:7395)
jr z, .asm_f3a9
cp d
jr z, .done
rept 2
inc hl
inc hl
endr
jr .next
.asm_f3a9
@ -2322,8 +2329,9 @@ XSpecial: ; f4c5
.asm_f4ce
cp [hl]
jr z, .asm_f4d5
rept 2
inc hl
inc hl
endr
jr .asm_f4ce
.asm_f4d5

View File

@ -665,8 +665,9 @@ Function1103ac: ; 1103ac
ld hl, Unknown_112037
ld de, $cb74
call Function110000
rept 2
inc de
inc de
endr
pop hl
ld bc, $0000
call Function110007
@ -724,9 +725,9 @@ Function110438: ; 110438
ld a, $c8
ld [hli], a
xor a
rept 3
ld [hli], a
ld [hli], a
ld [hli], a
endr
ld [hl], a
ld a, $ff
ld [$c86e], a
@ -947,9 +948,9 @@ Function1105dd: ; 1105dd
ld a, $c8
ld [hli], a
xor a
rept 3
ld [hli], a
ld [hli], a
ld [hli], a
endr
ld [hl], a
ld a, $ff
ld [$c86e], a
@ -1110,8 +1111,9 @@ Function1106ef: ; 1106ef
ld hl, Unknown_112072
ld b, $5
call Function110000
rept 2
inc de
inc de
endr
ld bc, $0001
ld hl, Unknown_11209e
call Function110007
@ -1377,8 +1379,9 @@ Function110905: ; 110905
ld hl, Unknown_112072
ld b, $5
call Function110000
rept 2
inc de
inc de
endr
ld hl, Unknown_1120c8
call Function110007
pop hl
@ -1542,10 +1545,12 @@ Function110a5b: ; 110a5b
ld [hli], a
ld a, d
ld [hli], a
rept 2
inc de
inc de
dec bc
endr
rept 2
dec bc
endr
ld hl, $c98f
ld a, e
ld [hli], a
@ -1565,8 +1570,9 @@ Function110a5b: ; 110a5b
xor a
ld [hli], a
xor a
rept 2
ld [hli], a
ld [hli], a
endr
xor a
ld [$c86b], a
ld de, $cb47
@ -1606,8 +1612,9 @@ Function110af4: ; 110af4
ld [hli], a
ld a, d
ld [hli], a
rept 2
inc de
inc de
endr
ld a, e
ld [hli], a
ld a, d
@ -1618,8 +1625,9 @@ Function110af4: ; 110af4
ld [$c86e], a
ld [$c86f], a
jr z, .asm_110b5c
rept 2
dec bc
dec bc
endr
ld a, [$c993]
or a
jp nz, .asm_110bd5
@ -1885,10 +1893,12 @@ Function110c9e: ; 110c9e
ld [hli], a
ld a, d
ld [hli], a
rept 2
inc de
inc de
dec bc
endr
rept 2
dec bc
endr
ld hl, $c98f
ld a, e
ld [hli], a
@ -1908,8 +1918,9 @@ Function110c9e: ; 110c9e
xor a
ld [hli], a
xor a
rept 2
ld [hli], a
ld [hli], a
endr
xor a
ld [$c86b], a
ld de, $cb47
@ -2124,14 +2135,16 @@ Function110ddd: ; 110ddd
ld [$c833], a
ld a, [hli]
ld [$c834], a
rept 2
inc hl
inc hl
endr
ld a, l
ld [$c97f], a
ld a, h
ld [$c980], a
rept 2
dec hl
dec hl
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -2253,9 +2266,9 @@ Function110ddd: ; 110ddd
.asm_110ee3
ld hl, $c98b
xor a
rept 3
ld [hli], a
ld [hli], a
ld [hli], a
endr
ld [hl], a
pop bc
pop de
@ -2273,8 +2286,9 @@ Function110ddd: ; 110ddd
ld [hli], a
ld a, d
ld [hli], a
rept 2
inc hl
inc hl
endr
xor a
ld [$c994], a
@ -2320,8 +2334,9 @@ Function110f07: ; 110f07
ld hl, $c866
ld b, $4
call Function110000
rept 2
inc de
inc de
endr
ld b, $6
call Function111f63
ld a, [$cabc]
@ -2393,8 +2408,9 @@ Function111044: ; 111044
ld [hli], a
ld a, d
ld [hli], a
rept 2
inc de
inc de
endr
ld a, e
ld [hli], a
ld a, d
@ -2404,8 +2420,9 @@ Function111044: ; 111044
or c
ld [$c86e], a
ld [$c86f], a
rept 2
dec bc
dec bc
endr
jp z, Function1111ca
ld a, [$c991]
or a
@ -2701,22 +2718,23 @@ Function1111fe: ; 1111fe
push de
push bc
push hl
rept 4
inc hl
inc hl
inc hl
inc hl
endr
ld a, [hli]
ld [$c833], a
ld a, [hli]
ld [$c834], a
rept 2
inc hl
inc hl
endr
ld a, l
ld [$c97f], a
ld a, h
ld [$c980], a
rept 2
dec hl
dec hl
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -2794,8 +2812,9 @@ Function1111fe: ; 1111fe
ld a, [hld]
cp $2f
jr nz, .asm_1112a4
rept 2
inc hl
inc hl
endr
ld a, [hl]
cp $30
jr c, .asm_1112cc
@ -2849,8 +2868,9 @@ Function1111fe: ; 1111fe
ld [hli], a
ld a, d
ld [hli], a
rept 2
inc hl
inc hl
endr
ld a, e
ld [hli], a
ld a, d
@ -2868,8 +2888,9 @@ Function1111fe: ; 1111fe
ld [$c9ac], a
ld a, [hli]
ld [$c9ad], a
rept 2
inc hl
inc hl
endr
ld a, [hli]
ld [$c876], a
ld a, [hl]
@ -2885,8 +2906,9 @@ Function111335: ; 111335
ld a, [hli]
ld h, [hl]
ld l, a
rept 2
inc hl
inc hl
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -3061,9 +3083,9 @@ Function1113fe: ; 1113fe
push hl
ld hl, $c829
xor a
rept 3
ld [hli], a
ld [hli], a
ld [hli], a
endr
ld [hl], a
ld de, $cb47
ld hl, Unknown_112072
@ -3076,8 +3098,9 @@ Function1113fe: ; 1113fe
cp $81
jr nc, .asm_111485
ld c, a
rept 2
inc a
inc a
endr
ld [de], a
inc de
ld a, $ff
@ -3089,8 +3112,9 @@ Function1113fe: ; 1113fe
ld b, c
call Function110000
ld b, c
rept 2
inc b
inc b
endr
call Function111f63
ld hl, $c822
set 7, [hl]
@ -3417,8 +3441,9 @@ Function11164f: ; 11164f (44:564f)
ld a, b
srl a
srl a
rept 2
add b
add b
endr
ld [hl], a
ret
@ -3558,9 +3583,9 @@ Function1116c5:: ; 1116c5 (44:56c5)
ld [$c800], a
xor a
ld hl, $c80a
rept 3
ld [hli], a
ld [hli], a
ld [hli], a
endr
ld hl, $c81f
ld a, [hli]
ld b, a
@ -4087,8 +4112,9 @@ Function111abd: ; 111abd (44:5abd)
ld [$c800], a
xor a
ld hl, $c80a
rept 2
ld [hli], a
ld [hli], a
endr
ld [hl], a
ld hl, $c815
ld a, [$c820]
@ -4291,8 +4317,9 @@ Function111c17: ; 111c17 (44:5c17)
.asm_111c52
ld b, a
ld a, [$ca3f]
rept 2
dec a
dec a
endr
cp b
jr c, .asm_111c6e
.asm_111c5b
@ -5563,8 +5590,9 @@ Function112451: ; 112451
xor a
ld [hli], a
xor a
rept 2
ld [hli], a
ld [hli], a
endr
pop de
ld a, $1
ld [$c994], a
@ -5689,21 +5717,24 @@ Function1125c7: ; 1125c7
ld [hli], a
ld a, d
ld [hli], a
rept 2
inc de
inc de
endr
ld a, $80
ld [hli], a
ld a, $c8
ld [hli], a
rept 2
dec bc
dec bc
endr
ld a, $fa
ld [hli], a
ld a, $0
ld [hli], a
xor a
rept 2
ld [hli], a
ld [hli], a
endr
ld de, $cb47
ld hl, Unknown_112072
ld b, $6
@ -6191,8 +6222,9 @@ Function1128db: ; 1128db
ld de, $cb4c
ld a, $1
ld [de], a
rept 2
inc de
inc de
endr
ld b, $1
call Function111f63
jr .asm_112941
@ -6425,8 +6457,9 @@ Function112a56: ; 112a56
ld a, [hli]
ld h, [hl]
ld l, a
rept 2
inc hl
inc hl
endr
ld a, e
ld [hli], a
ld a, d
@ -6923,8 +6956,9 @@ Function112d33: ; 112d33
ld hl, $c821
res 2, [hl]
ld hl, $c86b
rept 2
dec [hl]
dec [hl]
endr
.asm_112d82
ld hl, $c86b
@ -7083,8 +7117,9 @@ Function112d33: ; 112d33
cp $1
ld a, $32
jr z, .asm_112e95
rept 2
inc de
inc de
endr
inc a
.asm_112e95
@ -7463,8 +7498,9 @@ Function113095: ; 113095
.asm_1130d6
ld a, [$c82b]
ld c, a
rept 2
dec b
dec b
endr
ld a, b
ld [$c82d], a
jr z, .asm_11310d
@ -7472,8 +7508,9 @@ Function113095: ; 113095
ld d, a
ld a, [$c872]
ld e, a
rept 2
dec de
dec de
endr
xor a
or d
jr nz, .asm_1130f5
@ -7492,8 +7529,9 @@ Function113095: ; 113095
ld e, a
ld a, [$c875]
ld d, a
rept 2
inc de
inc de
endr
call Function110000
.asm_11310d
@ -7606,8 +7644,9 @@ Function113197: ; 113197
ld a, b
ld [de], a
inc de
rept 2
dec b
dec b
endr
call Function110000
xor a
ld [de], a
@ -7629,8 +7668,9 @@ Function1131a9: ; 1131a9
inc b
cp $a
jr nz, .asm_1131b7
rept 2
inc hl
inc hl
endr
dec b
ld c, b
call Function110000
@ -7674,8 +7714,9 @@ Function1131a9: ; 1131a9
ld hl, $c821
res 2, [hl]
ld hl, $c86b
rept 2
dec [hl]
dec [hl]
endr
ld a, $4
ret
; 113206
@ -7698,8 +7739,9 @@ Function113206: ; 113206
ld e, a
ld a, [$c875]
ld d, a
rept 2
inc de
inc de
endr
call Function110000
ld a, [$c991]
ld [$c993], a
@ -7970,8 +8012,9 @@ Function1133fe: ; 1133fe
ld a, [hli]
ld h, [hl]
ld l, a
rept 2
inc hl
inc hl
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -7982,8 +8025,9 @@ Function1133fe: ; 1133fe
ld a, [hld]
cp $2f
jr nz, .asm_11344c
rept 2
inc hl
inc hl
endr
ld e, l
ld d, h
.asm_113455
@ -8001,8 +8045,9 @@ Function1133fe: ; 1133fe
ld a, [hli]
ld h, [hl]
ld l, a
rept 2
inc hl
inc hl
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -8099,8 +8144,9 @@ Function1134cb: ; 1134cb
ret
.asm_1134f0
rept 2
inc [hl]
inc [hl]
endr
jr .asm_1134fc
.asm_1134f4
@ -8585,10 +8631,9 @@ Function1136c1: ; 1136c1
ld a, [hli]
ld h, [hl]
ld l, a
rept 4
inc hl
inc hl
inc hl
inc hl
endr
ld a, h
ld [$cc0d], a
ld a, l
@ -9126,9 +9171,9 @@ Function113c8e: ; 113c8e
ld bc, $0003
.asm_113ccf
rept 3
dec bc
dec bc
dec bc
endr
ld a, c
ld [$cc10], a
ld a, b
@ -9164,8 +9209,9 @@ Function113c8e: ; 113c8e
ld a, $3f
and c
ld [hld], a
rept 2
dec hl
dec hl
endr
pop de
ld b, h
ld c, l
@ -9276,10 +9322,9 @@ Function113d66: ; 113d66
ld c, a
ld a, [$cc11]
ld b, a
rept 4
dec bc
dec bc
dec bc
dec bc
endr
ld a, b
or c
jr z, .asm_113dae
@ -9513,8 +9558,9 @@ Function113ec7: ; 113ec7
ld a, [hli]
ld h, [hl]
ld l, a
rept 2
inc hl
inc hl
endr
ld a, [hld]
dec hl
xor $80
@ -9555,8 +9601,9 @@ Function113ef2: ; 113ef2
ld l, a
ld e, l
ld d, h
rept 2
add hl, de
add hl, de
endr
ld e, l
ld d, h
ld hl, $c815
@ -9616,8 +9663,9 @@ Function113f2d: ; 113f2d
ld l, a
ld e, l
ld d, h
rept 2
add hl, de
add hl, de
endr
ld e, l
ld d, h
ld hl, $c815

856
main.asm

File diff suppressed because it is too large Load Diff

View File

@ -12,7 +12,7 @@ RocketScript_0x1adbfa:
writetext UnknownText_0x1adc2e
closetext
loadmovesprites
winlosstext UnknownText_0x1add67, $ffff
winlosstext UnknownText_0x1add67, -1
loadtrainer GRUNTM, 31
startbattle
reloadmapmusic

View File

@ -552,16 +552,16 @@ Function17aa22: ; 17aa22 (5e:6a22)
push de
ld a, $3
call Function17aae0
rept 3
add a
add a
add a
endr
add $0
push af
ld a, $4
call Function17aae0
rept 3
add a
add a
add a
endr
add $8
ld c, a
pop af
@ -658,13 +658,15 @@ Function17aaa9: ; 17aaa9 (5e:6aa9)
Function17aac3: ; 17aac3 (5e:6ac3)
ld a, $b
push hl
rept 2
ld [hli], a
ld [hli], a
endr
pop hl
ld de, $14
add hl, de
rept 2
ld [hli], a
ld [hli], a
endr
ret
Function17aad0: ; 17aad0 (5e:6ad0)

View File

@ -114,8 +114,9 @@ Function1000ba: ; 1000ba
ld a, [wcd25]
ld e, a
ld d, $0
rept 2
add hl, de
add hl, de
endr
ld a, [CreditsTimer]
call GetFarHalfword
ld a, [CreditsTimer]
@ -1157,9 +1158,9 @@ Function1006fd: ; 1006fd
ld hl, $a800
call GetSRAMBank
xor a
rept 3
ld [hli], a
ld [hli], a
ld [hli], a
endr
call CloseSRAM
ret
; 10070d
@ -1892,8 +1893,9 @@ Function100bc2: ; 100bc2
ld a, [wcfa9]
ld b, a
ld a, [wd0eb]
rept 2
inc a
inc a
endr
cp b
jp nz, .asm_100bcb
ld a, $1
@ -2513,8 +2515,9 @@ Unknown_10102c: ; 10102c
Function101050: ; 101050
call Function10107d
ld a, [OTPartyCount]
rept 2
ld hl, $c608
ld hl, $c608
endr
ld bc, $01b3
call Function1010de
ld hl, wc7bb
@ -4696,8 +4699,9 @@ Function101ee2: ; 101ee2
Function101ee4: ; 101ee4
ld d, 0
ld hl, Unknown_101ef5
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld d, [hl]
ld e, a
@ -7143,9 +7147,9 @@ Function1030cd: ; 1030cd
ld a, [wcf44]
ld l, a
ld h, 0
rept 3
add hl, hl
add hl, hl
add hl, hl
endr
ld bc, Unknown_103112
add hl, bc
ld b, $30
@ -7164,8 +7168,9 @@ Function1030cd: ; 1030cd
inc hl
push hl
rept 2
add a
add a
endr
add Unknown_10327a % $100
ld l, a
@ -7628,8 +7633,9 @@ Function1035c6: ; 1035c6
callba Function10138b
ld b, 0
ld hl, Unknown_1035d7
rept 2
add hl, bc
add hl, bc
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -8030,8 +8036,9 @@ Function10383c: ; 10383c
ld [wdc60], a
xor a
ld hl, wdc5c
rept 2
ld [hli], a
ld [hli], a
endr
ld [hl], a
ld hl, UnknownText_0x103876
call PrintText

View File

@ -339,8 +339,9 @@ Function10827b: ; 10827b
ld e, a
ld d, 0
ld hl, Jumptable_10828a
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -920,8 +921,9 @@ Function108763: ; 108763
ld a, [hSCX]
cp $e0
jr z, .asm_108791
rept 2
dec a
dec a
endr
ld [hSCX], a
cp $f8
jr nz, .asm_10878a
@ -938,8 +940,9 @@ Function108763: ; 108763
ld a, [hSCY]
cp $f8
jr z, .asm_1087cb
rept 2
dec a
dec a
endr
ld [hSCY], a
cp $40
jr z, .asm_1087a9
@ -1089,8 +1092,9 @@ Function108894: ; 108894
ld a, [hSCY]
cp $78
jr z, .asm_1088ee
rept 2
inc a
inc a
endr
ld [hSCY], a
cp $30
jr z, .asm_1088c5
@ -1129,8 +1133,9 @@ Function108894: ; 108894
ld a, [hSCX]
cp $c
jr z, .asm_108906
rept 2
inc a
inc a
endr
ld [hSCX], a
cp $f8
jr nz, .asm_1088e7

View File

@ -152,8 +152,9 @@ Function114243:: ; 114243
Function11425c: ; 11425c
ld [wdc02], a
pop af
rept 2
ld [$ff8c], a
ld [$ff8c], a
endr
ld [$4000], a
ret
; 114268
@ -622,12 +623,13 @@ Function1144c8: ; 1144c8
Function1144d1: ; 1144d1
call Function114561
rept 2
dec de
dec de
endr
push de
rept 3
inc de
inc de
inc de
endr
inc hl
ld a, [de]
ld [hli], a
@ -989,8 +991,9 @@ Function1146a4: ; 1146a4
and a
jr nz, .asm_1146e8
.asm_1146da
rept 2
dec bc
dec bc
endr
call Function1149cc
and a
jr nz, .asm_1146e4
@ -1076,8 +1079,9 @@ Function1146fa: ; 1146fa
ld a, [wdc0e]
cp $3
jr nz, .asm_114773
rept 2
dec bc
dec bc
endr
.asm_114773
call Function1149cc
@ -1861,12 +1865,9 @@ Function114b55: ; 114b55
.asm_114b8c
pop hl
xor a
rept 6
ld [hli], a
ld [hli], a
ld [hli], a
ld [hli], a
ld [hli], a
ld [hli], a
endr
jr .asm_114b82
.asm_114b96
@ -2030,8 +2031,9 @@ Function114c5e: ; 114c5e
inc de
cp $3f
jr nz, .asm_114c62
rept 2
dec de
dec de
endr
.asm_114c75
ld a, [hli]
cp $3f
@ -2051,8 +2053,9 @@ Function114c5e: ; 114c5e
ld a, [hli]
cp $3d
jr nz, .asm_114c84
rept 2
dec bc
dec bc
endr
ld a, l
ld [wdc03], a
ld a, h
@ -2141,10 +2144,9 @@ Function114cd9: ; 114cd9
call Function114d99
pop hl
push hl
rept 4
inc hl
inc hl
inc hl
inc hl
endr
ld a, [hld]
cp b
jr c, .asm_114d2d
@ -2317,8 +2319,9 @@ Function114d99: ; 114d99
add hl, de
ld b, h
ld c, l
rept 2
inc bc
inc bc
endr
xor a
ret
; 114df1
@ -2513,8 +2516,9 @@ Function114ee9: ; 114ee9
ld a, b
ld [hli], a
ld a, c
rept 2
ld [hli], a
ld [hli], a
endr
ld a, [de]
ld [hli], a
inc de
@ -2912,8 +2916,9 @@ Function1150b3: ; 1150b3
.asm_11510b
pop hl
rept 2
dec hl
dec hl
endr
push de
call Function1158c2
pop de
@ -3429,8 +3434,9 @@ Function1153b5: ; 1153b5
ld e, [hl]
inc hl
ld d, [hl]
rept 2
inc hl
inc hl
endr
ld a, [de]
ld [hli], a
inc de
@ -4388,9 +4394,9 @@ Function1158c2: ; 1158c2
ld bc, $0003
.asm_115914
rept 3
dec bc
dec bc
dec bc
endr
ld a, c
ld [wdc19], a
ld a, b
@ -4404,10 +4410,9 @@ Function1158c2: ; 1158c2
ld e, [hl]
inc hl
ld d, [hl]
rept 4
inc de
inc de
inc de
inc de
endr
ld [hl], d
dec hl
ld [hl], e
@ -4442,8 +4447,9 @@ Function1158c2: ; 1158c2
ld a, $3f
and c
ld [hld], a
rept 2
dec hl
dec hl
endr
pop de
ld b, h
ld c, l
@ -4499,8 +4505,9 @@ Function1158c2: ; 1158c2
ld a, [hli]
ld c, a
ld b, [hl]
rept 2
inc bc
inc bc
endr
ld a, b
ld [hld], a
ld [hl], c
@ -4776,8 +4783,9 @@ Function115b00: ; 115b00
ld a, [wdc23]
cp $4
jr z, .asm_115b43
rept 2
inc hl
inc hl
endr
jr .asm_115b43
.asm_115b36
@ -4958,8 +4966,9 @@ Function115bc8: ; 115bc8
ret
.asm_115c33
rept 2
dec hl
dec hl
endr
xor a
ld [hl], a
ld a, $1
@ -5027,10 +5036,9 @@ Function115c49: ; 115c49
ld c, a
ld a, [wdc1a]
ld b, a
rept 4
dec bc
dec bc
dec bc
dec bc
endr
.asm_115c8c
ld a, [de]
cp $d
@ -5062,9 +5070,9 @@ Function115c49: ; 115c49
ld e, [hl]
inc hl
ld d, [hl]
rept 3
inc de
inc de
inc de
endr
ld [hl], d
dec hl
ld [hl], e
@ -5627,8 +5635,9 @@ Function1161b8: ; 1161b8
ld e, a
ld d, 0
ld hl, Jumptable_1161c7
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -6210,8 +6219,9 @@ Function11659d: ; 11659d
ld e, a
ld d, 0
ld hl, Jumptable_1165af
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -7726,8 +7736,9 @@ Function117719: ; 117719 (45:7719)
ld e, a
ld d, 0
ld hl, Jumptable_117728
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -8195,8 +8206,9 @@ Function117ae9: ; 0x117ae9
ld e, a
ld d, $0
ld hl, Pointers117af8
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -9023,8 +9035,9 @@ Function1184a5: ; 1184a5
ld e, a
ld d, 0
ld hl, Jumptable_1184b4
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -9067,8 +9080,9 @@ Function1184ec: ; 1184ec
ld e, a
ld d, 0
ld hl, Jumptable_1184fb
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -9124,8 +9138,9 @@ Function11854d: ; 11854d
ld e, a
ld d, 0
ld hl, Jumptable_11855c
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -9156,8 +9171,9 @@ Function11857c: ; 11857c
ld e, a
ld d, 0
ld hl, Jumptable_11858b
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -9200,8 +9216,9 @@ Function1185c3: ; 1185c3
ld e, a
ld d, 0
ld hl, Jumptable_1185d2
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -9257,8 +9274,9 @@ Function118624: ; 118624
ld e, a
ld d, 0
ld hl, Jumptable_118633
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -9304,8 +9322,9 @@ Function118671: ; 118671
ld e, a
ld d, 0
ld hl, Jumptable_118680
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -9345,8 +9364,9 @@ Function1186b2: ; 1186b2
ld e, a
ld d, 0
ld hl, Jumptable_1186c1
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -9387,8 +9407,9 @@ Function1186f5: ; 1186f5 (46:46f5)
ld e, a
ld d, 0
ld hl, Jumptable_118704
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -9436,8 +9457,9 @@ Function118746: ; 118746
ld e, a
ld d, 0
ld hl, Jumptable_118755
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -10071,8 +10093,9 @@ Function118b8c: ; 118b8c
jr nz, .asm_118b8c
dec hl
xor a
rept 2
ld [hli], a
ld [hli], a
endr
ret
; 118b9a
@ -10272,8 +10295,9 @@ asm_118e3e
ld a, [hld]
cp $2f
jr nz, .asm_118e3e
rept 2
inc hl
inc hl
endr
ld de, wcd85
ld c, $4
.asm_118e4a
@ -11132,8 +11156,9 @@ Function119413: ; 119413
ld c, a
ld a, [wd001]
ld b, a
rept 2
dec bc
dec bc
endr
ld hl, wd002
ld a, [hli]
ld e, a
@ -11298,10 +11323,9 @@ Function119471: ; 119471 (46:5471)
ld a, $10
cp b
jr z, .asm_119536
rept 4
inc hl
inc hl
inc hl
inc hl
endr
jr .asm_11957a
.asm_119536
ld a, [hli]
@ -11324,8 +11348,9 @@ Function119471: ; 119471 (46:5471)
.asm_119552
inc hl
.asm_119553
rept 2
inc hl
inc hl
endr
jr .asm_11955b
.asm_119557
ld de, $14
@ -11670,8 +11695,9 @@ Function1196f2: ; 1196f2
ld a, [hld]
cp $58
jr z, .asm_11975b
rept 2
inc hl
inc hl
endr
ld a, d
dec a
jr z, .asm_11978e
@ -12253,8 +12279,9 @@ Function119b6b: ; 119b6b
ld a, [de]
cp $d
jr nz, .asm_119b85
rept 2
inc de
inc de
endr
.asm_119b93
ld a, [de]
inc de
@ -12310,9 +12337,9 @@ Function119b6b: ; 119b6b
ld [hld], a
dec hl
pop de
rept 3
inc hl
inc hl
inc hl
endr
ld a, h
cp $e0
jr c, .asm_119b93
@ -12792,8 +12819,9 @@ Function119eee: ; 119eee (46:5eee)
ld e, a
ld d, 0
ld hl, Jumptable_119efd
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -13987,8 +14015,9 @@ Function11a8fa: ; 11a8fa
ld e, a
ld d, 0
ld hl, Jumptable_11a909
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -14758,8 +14787,9 @@ asm_11afbd:
dec a
ld c, a
ld b, 0
rept 2
add hl, bc
add hl, bc
endr
ld a, e
ld e, [hl]
inc hl
@ -15229,8 +15259,9 @@ Function11b236: ; 11b236
Function11b239: ; 11b239
ld e, a
ld d, 0
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -15583,8 +15614,9 @@ Function11b46a: ; 11b46a
ld e, a
ld d, 0
ld hl, Jumptable_11b479
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -15657,8 +15689,9 @@ Function11b483: ; 11b483
pop de
ld h, d
ld l, e
rept 2
dec hl
dec hl
endr
ld a, [de]
ld [hli], a
inc de
@ -15890,8 +15923,9 @@ Function11b65a: ; 11b65a
ld e, a
ld d, 0
ld hl, Jumptable_11b669
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -16520,8 +16554,9 @@ ENDC
.asm_11c040
push af
rept 2
add hl, bc
add hl, bc
endr
ld a, [hli]
ld c, a
ld a, [hl]
@ -16530,8 +16565,9 @@ ENDC
pop af
ld c, a
ld b, 0
rept 2
add hl, bc
add hl, bc
endr
ld a, [hli]
ld c, a
ld a, [hl]
@ -16920,8 +16956,9 @@ Function11c2ac: ; 11c2ac
ld e, a
ld d, 0
ld hl, Jumptable_11c2bb
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -17012,10 +17049,12 @@ Function11c346: ; 11c346 (47:4346)
Function11c35f: ; 11c35f (47:435f)
ld hl, wcd2f
rept 2
inc [hl]
inc [hl]
dec hl
endr
rept 2
dec hl
endr
dec [hl]
push af
ld de, wcd2d
@ -17026,10 +17065,12 @@ Function11c35f: ; 11c35f (47:435f)
Function11c373: ; 11c373 (47:4373)
ld hl, wcd30
rept 2
inc [hl]
inc [hl]
dec hl
endr
rept 2
dec hl
endr
dec [hl]
push af
ld de, wcd2d
@ -17672,8 +17713,9 @@ Function11c770: ; 11c770 (47:4770)
ld a, [CreditsTimer]
ld c, a
ld b, 0
rept 2
add hl, bc
add hl, bc
endr
ld a, [hl]
ld [wcd28], a
jr .asm_11c79f
@ -17748,8 +17790,9 @@ Function11c7bc: ; 11c7bc (47:47bc)
ld a, [wcd22]
ld e, a
ld d, $0
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld e, a
ld a, [hl]
@ -17759,8 +17802,9 @@ Function11c7bc: ; 11c7bc (47:47bc)
ld a, [wcd26]
ld e, a
ld d, $0
rept 2
add hl, de
add hl, de
endr
ld a, [wcd26]
ld e, a
.asm_11c831
@ -17927,8 +17971,9 @@ Function11c8f6: ; 11c8f6 (47:48f6)
ld c, a
ld b, $0
ld hl, wcd36
rept 2
add hl, bc
add hl, bc
endr
ld [hl], e
inc hl
ld [hl], d
@ -17948,8 +17993,9 @@ Function11c8f6: ; 11c8f6 (47:48f6)
ld a, [wcd22]
ld e, a
ld d, $0
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld e, a
ld a, [hl]
@ -17959,12 +18005,14 @@ Function11c8f6: ; 11c8f6 (47:48f6)
ld a, [wcd26]
ld e, a
ld d, $0
rept 2
add hl, de
add hl, de
endr
ld a, [wcd25]
ld e, a
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld e, a
ld a, [hl]
@ -18152,8 +18200,9 @@ Function11ca6a: ; 11ca6a (47:4a6a)
ld hl, wcd36
ld c, a
ld b, $0
rept 2
add hl, bc
add hl, bc
endr
ld [hl], b
inc hl
ld [hl], b
@ -18267,8 +18316,9 @@ Function11cb52: ; 11cb52 (47:4b52)
.asm_11cb58
dec a
jr z, .asm_11cb5f
rept 2
inc hl
inc hl
endr
jr .asm_11cb58
.asm_11cb5f
ld a, [hli]
@ -18327,8 +18377,9 @@ Function11cb66: ; 11cb66 (47:4b66)
.asm_11cbba
dec a
jr z, .asm_11cbc1
rept 2
inc hl
inc hl
endr
jr .asm_11cbba
.asm_11cbc1
ld a, [hli]
@ -18776,8 +18827,9 @@ Function11cfce: ; 11cfce (47:4fce)
ld [hli], a
ld a, [de]
inc de
rept 2
dec a
dec a
endr
jr z, .asm_11cff6
ld c, a
ld a, $7a
@ -18793,8 +18845,9 @@ Function11cfce: ; 11cfce (47:4fce)
add hl, bc
ld a, [de]
dec de
rept 2
dec a
dec a
endr
jr z, .asm_11d022
ld b, a
.asm_11d005
@ -18802,8 +18855,9 @@ Function11cfce: ; 11cfce (47:4fce)
ld a, $7c
ld [hli], a
ld a, [de]
rept 2
dec a
dec a
endr
jr z, .asm_11d015
ld c, a
ld a, $7f
@ -18825,8 +18879,9 @@ Function11cfce: ; 11cfce (47:4fce)
ld a, $7d
ld [hli], a
ld a, [de]
rept 2
dec a
dec a
endr
jr z, .asm_11d031
ld c, a
ld a, $7a
@ -18888,8 +18943,9 @@ Function11d035: ; 11d035 (47:5035)
ld a, [de]
cp $2
jr z, .asm_11d082
rept 2
dec a
dec a
endr
.asm_11d078
push af
ld a, $7a
@ -18915,8 +18971,9 @@ Function11d035: ; 11d035 (47:5035)
cp $2
ret z
push bc
rept 2
dec a
dec a
endr
ld c, a
ld b, a
ld de, $14
@ -18952,8 +19009,9 @@ Function11d0b6: ; 11d0b6 (47:50b6)
ld e, a
ld d, 0
ld hl, Jumptable_11d0c7
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -19588,8 +19646,9 @@ Function11d4aa: ; 11d4aa
ld hl, $0005
add hl, de
ld a, [bc]
rept 2
inc bc
inc bc
endr
push bc
.asm_11d4cf
push af
@ -21592,8 +21651,9 @@ Function16c943: ; 16c943
call Function16cae8
.asm_16c9e1
rept 2
inc e
inc e
endr
ld a, e
cp $8
jr nz, .asm_16c969
@ -21694,8 +21754,9 @@ Function16ca11: ; 16ca11
call Function16cae8
.asm_16ca88
rept 2
inc e
inc e
endr
ld a, e
cp $8
jr nz, .asm_16ca28
@ -22149,10 +22210,12 @@ Function16d61d: ; 16d61d
pop bc
ld de, AttrMap - TileMap
add hl, de
rept 2
inc b
inc b
inc c
endr
rept 2
inc c
endr
ld a, $7
.asm_16d630
push bc
@ -22753,8 +22816,9 @@ Function17023a: ; 17023a
ld e, a
ld d, 0
ld hl, Jumptable_170249
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -22980,8 +23044,9 @@ Function170394: ; 170394
ld a, $1
ld [hli], a
xor a
rept 2
ld [hli], a
ld [hli], a
endr
ld [hl], a
jr .asm_1703ff
@ -23009,8 +23074,9 @@ Function170394: ; 170394
predef Functione167
pop de
pop hl
rept 2
dec de
dec de
endr
ld a, [hli]
ld [de], a
inc de
@ -23172,8 +23238,9 @@ Function170510: ; 170510
ld e, a
ld d, 0
ld hl, Jumptable_17051f
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -23383,8 +23450,9 @@ Function17064b: ; 17064b
ld [hli], a
dec c
jr nz, .asm_170653
rept 2
inc hl
inc hl
endr
dec b
jr nz, .asm_170651
ret
@ -23421,8 +23489,9 @@ Function170687: ; 170687
ld e, a
ld d, 0
ld hl, Jumptable_170696
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -23852,13 +23921,13 @@ Function17093c: ; 17093c (5c:493c)
pop af
dec a
jr nz, .asm_17096e
rept 4
dec hl
dec hl
dec hl
dec hl
endr
ld a, $50
rept 2
ld [hli], a
ld [hli], a
endr
pop hl
ld a, EGG_TICKET
ld [CurItem], a
@ -23908,8 +23977,9 @@ Function1709bb: ; 1709bb (5c:49bb)
ld e, a
ld d, 0
ld hl, Jumptable_1709e7
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -24213,8 +24283,9 @@ Function170c06: ; 170c06
inc [hl]
.asm_170c15
rept 2
inc hl
inc hl
endr
ld a, [$a89b]
add [hl]
ld [hld], a
@ -24239,8 +24310,9 @@ Function170c06: ; 170c06
ld a, [hli]
ld b, a
ld c, [hl]
rept 2
inc hl
inc hl
endr
ld a, [hld]
sub c
ld c, a
@ -24464,8 +24536,9 @@ Function171a36: ; 171a36 (5c:5a36)
ld e, a
ld d, 0
ld hl, Jumptable_171a45
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -24589,9 +24662,9 @@ Function171aec: ; 171aec (5c:5aec)
.asm_171b34
pop hl
ld bc, $14
rept 3
add hl, bc
add hl, bc
add hl, bc
endr
pop af
dec a
jr nz, .asm_171b1b
@ -24820,8 +24893,9 @@ Function171ccd: ; 171ccd (5c:5ccd)
Function171cf0: ; 171cf0 (5c:5cf0)
xor a
hlcoord 4, 15
rept 2
ld [hli], a
ld [hli], a
endr
ld a, [wcd4b]
xor $1
ld [wcd4b], a

View File

@ -723,8 +723,9 @@ Function17d474: ; 17d474
ld e, a
ld d, 0
ld hl, Jumptable_17d483
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -905,14 +906,16 @@ Function17d48d: ; 17d48d
ld a, [wcd42]
ld c, a
ld b, $0
rept 2
add hl, bc
add hl, bc
endr
ld a, l
ld [wcd4b], a
ld a, h
ld [wcd4c], a
rept 2
add hl, bc
add hl, bc
endr
ld a, l
ld [wcd4d], a
ld a, h
@ -938,8 +941,9 @@ Function17d5c4:
.asm_17d5ce
srl a
jr c, .asm_17d5d6
rept 2
inc c
inc c
endr
jr .asm_17d5ce
.asm_17d5d6
@ -1026,10 +1030,12 @@ Function17d60b: ; 17d60b
ld [wcd4c], a
pop de
pop hl
rept 2
inc b
inc b
dec c
endr
rept 2
dec c
endr
jr z, .asm_17d684
push bc
push de
@ -1075,15 +1081,17 @@ Function17d6a1: ; 17d6a1
ld a, $5
call GetSRAMBank
ld hl, $b1d3
rept 2
add hl, bc
add hl, bc
endr
ld a, [hli]
ld [wcd47], a
ld a, [hl]
ld [BGMapPalBuffer], a
ld hl, $b1b3
rept 2
add hl, bc
add hl, bc
endr
ld a, [hli]
ld c, a
ld a, [hl]
@ -1099,8 +1107,9 @@ Function17d6a1: ; 17d6a1
ld de, wcd60
ld bc, $0004
call CopyBytes
rept 2
inc hl
inc hl
endr
ld de, wcd64
ld bc, $0004
call CopyBytes
@ -1136,8 +1145,9 @@ Function17d711:
ld e, a
ld d, 0
ld hl, Jumptable_17d72a
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -1991,8 +2001,9 @@ Function17dccf: ; 17dccf
ld a, [wcd2e]
ld c, a
ld b, $0
rept 2
add hl, bc
add hl, bc
endr
ld a, [hli]
ld c, a
ld a, [hl]
@ -2407,8 +2418,9 @@ Function17ded9: ; 17ded9
jr .asm_17df7b
.asm_17df79
rept 2
inc hl
inc hl
endr
.asm_17df7b
bit 4, b
@ -2461,8 +2473,9 @@ Function17ded9: ; 17ded9
jr .asm_17dfd2
.asm_17dfd0
rept 2
inc hl
inc hl
endr
.asm_17dfd2
bit 5, b
@ -2587,8 +2600,9 @@ Function17e026: ; 17e026
jr .asm_17e0a4
.asm_17e0a2
rept 2
inc hl
inc hl
endr
.asm_17e0a4
bit 4, b
@ -2604,8 +2618,9 @@ Function17e026: ; 17e026
jr .asm_17e0b6
.asm_17e0b4
rept 2
inc hl
inc hl
endr
.asm_17e0b6
bit 5, b
@ -2627,8 +2642,9 @@ Function17e026: ; 17e026
call CloseSRAM
pop hl
pop bc
rept 2
inc hl
inc hl
endr
jr asm_17e0ee
.asm_17e0e1
@ -2673,8 +2689,9 @@ Function17e0fd: ; 17e0fd
call ReceiveItem
pop hl
jr c, .asm_17e127
rept 2
inc hl
inc hl
endr
.asm_17e127
ld a, [hli]
@ -2704,8 +2721,9 @@ Function17e133: ; 17e133
callba MobileCheckOwnMonAnywhere
pop hl
jr c, .asm_17e159
rept 2
inc hl
inc hl
endr
.asm_17e159
ld a, [hli]
@ -2741,8 +2759,9 @@ Function17e165: ; 17e165
call CheckItem
pop hl
jr c, .asm_17e195
rept 2
inc hl
inc hl
endr
.asm_17e195
ld a, [hli]
@ -3207,8 +3226,9 @@ Function17e451: ; 17e451
ld [wcd2e], a
ld c, a
ld b, $0
rept 2
add hl, bc
add hl, bc
endr
push hl
ld hl, TileMap
ld bc, $0014
@ -3433,8 +3453,9 @@ Function17e5af: ; 17e5af
ld l, a
ld a, [wcd4e]
ld h, a
rept 2
add hl, bc
add hl, bc
endr
ld a, [hli]
ld e, a
ld a, [hli]
@ -3499,8 +3520,9 @@ Function17e613: ; 17e613
ld [hli], a
ld a, [de]
inc de
rept 2
dec a
dec a
endr
jr z, .asm_17e63f
ld c, a
ld a, [wcd53]
@ -3519,8 +3541,9 @@ Function17e613: ; 17e613
add hl, bc
ld a, [de]
dec de
rept 2
dec a
dec a
endr
jr z, .asm_17e674
ld b, a
.asm_17e651
@ -3529,8 +3552,9 @@ Function17e613: ; 17e613
add $3
ld [hli], a
ld a, [de]
rept 2
dec a
dec a
endr
jr z, .asm_17e664
ld c, a
ld a, $7f
@ -3556,8 +3580,9 @@ Function17e613: ; 17e613
add $5
ld [hli], a
ld a, [de]
rept 2
dec a
dec a
endr
jr z, .asm_17e689
ld c, a
ld a, [wcd53]
@ -3583,8 +3608,9 @@ Function17e691: ; 17e691
inc de
push af
ld a, [de]
rept 2
inc de
inc de
endr
and a
.asm_17e69f
jr z, .asm_17e6a5
@ -3736,8 +3762,9 @@ Function17f047: ; 17f047
ld e, a
ld d, 0
ld hl, Jumptable_17f061
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -3774,8 +3801,9 @@ Function17f081: ; 17f081
ld de, $0004
add hl, de
ld a, [hli]
rept 2
inc hl
inc hl
endr
ld e, l
ld d, h
ld l, c
@ -3918,8 +3946,9 @@ Function17f154: ; 17f154
pop hl
call Function17f524
jr c, .asm_17f167
rept 2
inc hl
inc hl
endr
ld e, l
ld d, h
ld a, [de]
@ -4107,8 +4136,9 @@ Function17f220: ; 17f220
ld e, a
ld d, 0
ld hl, .Genders
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld e, a
ld a, [hl]
@ -4370,8 +4400,9 @@ Function17f3f0: ; 17f3f0
ld a, [de]
ld c, a
ld b, $0
rept 2
add hl, bc
add hl, bc
endr
ld a, [hli]
ld e, a
ld a, [hli]
@ -4386,11 +4417,12 @@ Function17f3f0: ; 17f3f0
ld e, a
ld d, $0
pop hl
rept 2
add hl, de
add hl, de
inc hl
inc hl
endr
rept 3
inc hl
endr
ld e, l
ld d, h
ld l, c
@ -4451,8 +4483,9 @@ Function17f44f: ; 17f44f
ld de, $0005
add hl, de
ld a, [hli]
rept 2
inc hl
inc hl
endr
ld e, l
ld d, h
ld l, c
@ -4695,8 +4728,9 @@ Function17f5ae: ; 17f5ae
ld e, a
ld d, 0
ld hl, Table17f5bd
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -4770,8 +4804,9 @@ Function17f5e4: ; 17f5e4
ld e, a
ld d, $0
ld hl, Table_17f706
rept 2
add hl, de
add hl, de
endr
ld a, [wc301]
ld e, a
ld a, [wc302]
@ -4809,8 +4844,9 @@ Function17f5e4: ; 17f5e4
jr .asm_17f67d
.asm_17f674
rept 2
inc hl
inc hl
endr
dec c
jr nz, .asm_17f65d
@ -4828,8 +4864,9 @@ Function17f5e4: ; 17f5e4
ld e, a
ld d, 0
ld hl, Table_17f699
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld e, a
ld a, [hl]

View File

@ -10,9 +10,9 @@ UnusedTitleScreen: ; 10c000
ld [hBGMapMode], a
ld hl, wcf63
rept 3
ld [hli], a
ld [hli], a
ld [hli], a
endr
ld [hl], a
ld hl, UnusedTitleBG_GFX

View File

@ -93,16 +93,18 @@ Function8ddb: ; 8ddb
ld a, [EnemyHPPal]
ld l, a
ld h, $0
rept 2
add hl, hl
add hl, hl
endr
ld bc, Palettes_a8be
add hl, bc
call Function9643
ld a, [PlayerHPPal]
ld l, a
ld h, $0
rept 2
add hl, hl
add hl, hl
endr
ld bc, Palettes_a8be
add hl, bc
call Function9643
@ -213,8 +215,9 @@ Function8edb: ; 8edb
ld a, [wcda1]
ld l, a
ld h, $0
rept 2
add hl, hl
add hl, hl
endr
ld bc, Palettes_a8be
add hl, bc
call Function9643
@ -488,8 +491,9 @@ Function90f8: ; 90f8
Function9122: ; 9122
ld b, 0
ld hl, Jumptable_912d
rept 2
add hl, bc
add hl, bc
endr
ld a, [hli]
ld h, [hl]
ld l, a
@ -797,8 +801,9 @@ Function9373: ; 9373
ld a, [PlayerHPPal]
ld l, a
ld h, 0
rept 2
add hl, hl
add hl, hl
endr
ld bc, Palettes_a8be
add hl, bc
call Function9643

View File

@ -74,8 +74,9 @@ Function86b4: ; 86b4
ld a, [PlayerHPPal]
ld l, a
ld h, 0
rept 2
add hl, hl
add hl, hl
endr
ld de, Palettes_a8be
add hl, de
ld a, [hli]
@ -89,8 +90,9 @@ Function86b4: ; 86b4
ld a, [EnemyHPPal]
ld l, a
ld h, $0
rept 2
add hl, hl
add hl, hl
endr
ld de, Palettes_a8be
add hl, de
ld a, [hli]
@ -137,8 +139,9 @@ Function873c: ; 873c
call CopyBytes
ld hl, wcda9 + 1
ld [hl], $10
rept 2
inc hl
inc hl
endr
ld a, [PlayerHPPal]
add $2f
ld [hl], a
@ -161,8 +164,9 @@ Function8763: ; 8763
ld a, [wcda1]
ld l, a
ld h, $0
rept 2
add hl, hl
add hl, hl
endr
ld de, Palettes_a8be
add hl, de
ld a, [hli]
@ -303,10 +307,9 @@ Function8860: ; 8860
Function8867: ; 8867
ld b, 0
ld hl, Unknown_8878
rept 4
add hl, bc
add hl, bc
add hl, bc
add hl, bc
endr
ld e, [hl]
inc hl
ld d, [hl]
@ -461,9 +464,9 @@ Function8969: ; 8969
ld a, [CurPartySpecies]
ld l, a
ld h, 0
rept 3
add hl, hl
add hl, hl
add hl, hl
endr
ld de, PokemonPalettes
add hl, de
ld a, [wcf65]

View File

@ -22,8 +22,9 @@ SECTION "rst28",ROM0[JumpTable]
push de
ld e, a
ld d, 0
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a

View File

@ -85,8 +85,9 @@ GetTypeName: ; 50964
ld hl, TypeNames
ld e, a
ld d, 0
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a

View File

@ -16,8 +16,9 @@ _AnimateTileset:: ; fc000
ld [hTileAnimFrame], a
ld h, 0
rept 2
add hl, hl
add hl, hl
endr
add hl, de
; 2-byte parameter
@ -488,9 +489,9 @@ AnimateWaterTile: ; fc402
and 3 << 1
; 2 x 8 = 16 bytes per tile
rept 3
add a
add a
add a
endr
add WaterTileFrames % $100
ld l, a
@ -527,9 +528,9 @@ ForestTreeLeftAnimation: ; fc45c
.asm_fc46c
ld a, [TileAnimationTimer]
call GetForestTreeFrame
rept 3
add a
add a
add a
endr
add ForestTreeLeftFrames % $100
ld l, a
ld a, 0
@ -569,9 +570,9 @@ ForestTreeRightAnimation: ; fc4c4
.asm_fc4d4
ld a, [TileAnimationTimer]
call GetForestTreeFrame
rept 3
add a
add a
add a
endr
add ForestTreeLeftFrames % $100
ld l, a
ld a, 0
@ -605,9 +606,9 @@ ForestTreeLeftAnimation2: ; fc4f2
ld a, [TileAnimationTimer]
call GetForestTreeFrame
xor 2
rept 3
add a
add a
add a
endr
add ForestTreeLeftFrames % $100
ld l, a
ld a, 0
@ -637,9 +638,9 @@ ForestTreeRightAnimation2: ; fc51c
ld a, [TileAnimationTimer]
call GetForestTreeFrame
xor 2
rept 3
add a
add a
add a
endr
add ForestTreeLeftFrames % $100
ld l, a
ld a, 0
@ -729,8 +730,9 @@ SafariFountainAnim1: ; fc5cc
ld a, [TileAnimationTimer]
and 6
srl a
rept 2
inc a
inc a
endr
and 3
swap a
ld e, a
@ -750,9 +752,9 @@ SafariFountainAnim2: ; fc5eb
ld c, l
ld a, [TileAnimationTimer]
and 6
rept 3
add a
add a
add a
endr
ld e, a
ld d, 0
ld hl, SafariFountainFrames

View File

@ -8,8 +8,9 @@ GetTrainerDVs: ; 270c4
ld b, 0
ld hl, TrainerClassDVs
rept 2
add hl, bc
add hl, bc
endr
ld a, [hli]
ld b, a