Skip to content

Commit

Permalink
More splitting of main.asm; remove unneeded rept 2
Browse files Browse the repository at this point in the history
  • Loading branch information
PikalaxALT committed May 4, 2016
1 parent 82f1534 commit 3713b71
Show file tree
Hide file tree
Showing 107 changed files with 1,222 additions and 1,610 deletions.
21 changes: 7 additions & 14 deletions audio/engine.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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]
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions audio/music/goldenrodcity.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions audio/music/johtowildbattle.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 4 additions & 8 deletions audio/music/kantowildbattle.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions battle/ai/items.asm
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,8 @@ endr
pop de
pop hl

rept 2
inc hl
endr
inc hl
jr c, .loop

.used_item
Expand Down
3 changes: 1 addition & 2 deletions battle/ai/move.asm
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,8 @@ endr
ld hl, AIScoringPointers
dec c
ld b, 0
rept 2
add hl, bc
endr
add hl, bc
ld a, [hli]
ld h, [hl]
ld l, a
Expand Down
Loading

0 comments on commit 3713b71

Please sign in to comment.