diff options
Diffstat (limited to 'home')
-rw-r--r-- | home/audio.asm | 7 | ||||
-rw-r--r-- | home/battle.asm | 6 | ||||
-rw-r--r-- | home/copy.asm | 7 | ||||
-rw-r--r-- | home/cry.asm | 7 | ||||
-rw-r--r-- | home/joypad.asm | 13 | ||||
-rw-r--r-- | home/map.asm | 23 | ||||
-rw-r--r-- | home/map_objects.asm | 6 | ||||
-rw-r--r-- | home/menu.asm | 17 | ||||
-rw-r--r-- | home/movement.asm | 10 | ||||
-rw-r--r-- | home/text.asm | 24 | ||||
-rw-r--r-- | home/tilemap.asm | 12 | ||||
-rw-r--r-- | home/vblank.asm | 3 | ||||
-rw-r--r-- | home/video.asm | 3 |
13 files changed, 80 insertions, 58 deletions
diff --git a/home/audio.asm b/home/audio.asm index 859ace116..610117715 100644 --- a/home/audio.asm +++ b/home/audio.asm @@ -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 diff --git a/home/battle.asm b/home/battle.asm index fa72d75a0..832792d88 100644 --- a/home/battle.asm +++ b/home/battle.asm @@ -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] diff --git a/home/copy.asm b/home/copy.asm index d0bc1983f..f18b12802 100644 --- a/home/copy.asm +++ b/home/copy.asm @@ -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 diff --git a/home/cry.asm b/home/cry.asm index 456037db4..ac9ac8029 100644 --- a/home/cry.asm +++ b/home/cry.asm @@ -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 diff --git a/home/joypad.asm b/home/joypad.asm index 42a61cd5d..78a1ac143 100644 --- a/home/joypad.asm +++ b/home/joypad.asm @@ -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 diff --git a/home/map.asm b/home/map.asm index b93435517..2954c7d41 100644 --- a/home/map.asm +++ b/home/map.asm @@ -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] diff --git a/home/map_objects.asm b/home/map_objects.asm index 7c686e122..2b7bd9a92 100644 --- a/home/map_objects.asm +++ b/home/map_objects.asm @@ -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 diff --git a/home/menu.asm b/home/menu.asm index 26d47490b..2b9885834 100644 --- a/home/menu.asm +++ b/home/menu.asm @@ -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 diff --git a/home/movement.asm b/home/movement.asm index eb59c0525..e6e2e1025 100644 --- a/home/movement.asm +++ b/home/movement.asm @@ -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 diff --git a/home/text.asm b/home/text.asm index 4cb581bcb..98ca87051 100644 --- a/home/text.asm +++ b/home/text.asm @@ -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 diff --git a/home/tilemap.asm b/home/tilemap.asm index ceda55dd2..c9eaaba67 100644 --- a/home/tilemap.asm +++ b/home/tilemap.asm @@ -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 diff --git a/home/vblank.asm b/home/vblank.asm index 501da9382..b8b8b0efb 100644 --- a/home/vblank.asm +++ b/home/vblank.asm @@ -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 diff --git a/home/video.asm b/home/video.asm index 7392d6e0f..440c90307 100644 --- a/home/video.asm +++ b/home/video.asm @@ -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 |