More splitting of main.asm; remove unneeded rept 2

This commit is contained in:
pikalaxalt
2016-05-04 11:46:23 -04:00
parent 82f1534925
commit 3713b71d9e
107 changed files with 1222 additions and 1610 deletions

View File

@@ -1348,9 +1348,8 @@ GetNoiseSample: ; e86c5
ld d, 0
; load ptr to noise sample set in hl
ld hl, Drumkits
rept 2
add hl, de
endr
add hl, de
ld a, [hli]
ld h, [hl]
ld l, a
@@ -1363,9 +1362,8 @@ endr
; use 'pitch' to seek noise sample set
ld e, a
ld d, 0
rept 2
add hl, de
endr
add hl, de
; load sample pointer into NoiseSampleAddress
ld a, [hli]
ld [NoiseSampleAddressLo], a
@@ -1387,9 +1385,8 @@ ParseMusicCommand: ; e870f
ld d, 0
; seek command pointer
ld hl, MusicCommands
rept 2
add hl, de
endr
add hl, de
; jump to the new pointer
ld a, [hli]
ld h, [hl]
@@ -1639,9 +1636,8 @@ Music_JumpIf: ; e8817
inc hl
ld d, [hl]
; skip pointer
rept 2
inc de
endr
inc de
; update address
ld [hl], d
dec hl
@@ -1693,9 +1689,8 @@ MusicEE; e883e
inc hl
ld d, [hl]
; skip pointer
rept 2
inc de
endr
inc de
; update address
ld [hl], d
dec hl
@@ -2811,9 +2806,8 @@ LoadChannel: ; e8d1b
ld c, a
ld b, 0
ld hl, ChannelPointers
rept 2
add hl, bc
endr
add hl, bc
ld c, [hl]
inc hl
ld b, [hl] ; bc = channel pointer
@@ -3282,9 +3276,8 @@ ClearChannels:: ; e8fe9
; doesn't seem to be used, but functionally identical to MapSetup_Sound_Off
ld hl, rNR50
xor a
rept 2
ld [hli], a
endr
ld [hli], a
ld a, $80
ld [hli], a
ld hl, rNR10

View File

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

View File

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

View File

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