summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorpikalaxalt <PikalaxALT@gmail.com>2016-05-10 12:31:49 -0400
committerpikalaxalt <PikalaxALT@gmail.com>2016-05-10 12:31:49 -0400
commitae36ef2c7fb722b7480d73c7a95a5d1e2ece7831 (patch)
treec6cfbfa143807b10f3baf86eeed3ff6275237c72 /engine
parente95d42e0af1921f516c1fd4269024aa3f586514f (diff)
Labeled every function in ROM0 that's referenced in the source
Diffstat (limited to 'engine')
-rwxr-xr-xengine/buy_sell_toss.asm2
-rwxr-xr-xengine/clock_reset.asm2
-rw-r--r--engine/color.asm16
-rwxr-xr-xengine/crystal_intro.asm12
-rwxr-xr-xengine/debug.asm8
-rw-r--r--engine/events.asm4
-rw-r--r--engine/events_2.asm4
-rwxr-xr-xengine/events_3.asm4
-rwxr-xr-xengine/evolution_animation.asm4
-rw-r--r--engine/fish.asm4
-rw-r--r--engine/fruit_trees.asm4
-rwxr-xr-xengine/healmachineanim.asm4
-rwxr-xr-xengine/link.asm8
-rw-r--r--engine/map_objects.asm4
-rw-r--r--engine/map_setup.asm4
-rwxr-xr-xengine/mart.asm16
-rwxr-xr-xengine/menu.asm4
-rwxr-xr-xengine/mon_icons.asm5
-rwxr-xr-xengine/move_mon.asm4
-rw-r--r--engine/predef.asm12
-rwxr-xr-xengine/printer.asm6
-rw-r--r--engine/scripting.asm12
-rwxr-xr-xengine/search.asm4
-rwxr-xr-xengine/slot_machine.asm12
-rw-r--r--engine/specials.asm4
-rwxr-xr-xengine/sprite_anims.asm8
-rwxr-xr-xengine/sprites.asm8
-rwxr-xr-xengine/startmenu.asm6
-rwxr-xr-xengine/time.asm8
-rw-r--r--engine/timeofdaypals.asm12
-rwxr-xr-xengine/timeset.asm4
-rw-r--r--engine/title.asm4
-rwxr-xr-xengine/tmhm2.asm4
-rwxr-xr-xengine/trainer_card.asm4
-rwxr-xr-xengine/variables.asm4
-rwxr-xr-xengine/warp_connection.asm2
-rwxr-xr-xengine/wildmons.asm12
37 files changed, 120 insertions, 119 deletions
diff --git a/engine/buy_sell_toss.asm b/engine/buy_sell_toss.asm
index 7f2ad2727..bd18cc83a 100755
--- a/engine/buy_sell_toss.asm
+++ b/engine/buy_sell_toss.asm
@@ -48,7 +48,7 @@ Toss_Sell_Loop: ; 24ff9
; 2500e
BuySellToss_InterpretJoypad: ; 2500e
- call Function354b ; get joypad
+ call JoyTextDelay_ForcehJoyDown ; get joypad
bit B_BUTTON_F, c
jr nz, .b
bit A_BUTTON_F, c
diff --git a/engine/clock_reset.asm b/engine/clock_reset.asm
index 546cc8c13..4e6f588e9 100755
--- a/engine/clock_reset.asm
+++ b/engine/clock_reset.asm
@@ -121,7 +121,7 @@ RestartClock: ; 20021 (8:4021)
; 0x200ba
.joy_loop
- call Function354b
+ call JoyTextDelay_ForcehJoyDown
ld c, a
push af
call .PrintTime
diff --git a/engine/color.asm b/engine/color.asm
index 74d194176..d9961613a 100644
--- a/engine/color.asm
+++ b/engine/color.asm
@@ -405,9 +405,9 @@ LoadStatsScreenPals:
Function8cb4:
ld l, e
ld h, 0
-rept 3
add hl, hl
-endr
+ add hl, hl
+ add hl, hl
ld de, Palettes_8d05
add hl, de
call CheckCGB
@@ -855,9 +855,9 @@ Function97e5:
GetMonPalettePointer:
ld l, a
ld h, $0
-rept 3
add hl, hl
-endr
+ add hl, hl
+ add hl, hl
ld bc, PokemonPalettes
add hl, bc
ret
@@ -1101,9 +1101,9 @@ endr
call SGBDelayCycles
ld a, $30
ld [rJOYP], a
-rept 3
ld a, [rJOYP]
-endr
+ ld a, [rJOYP]
+ ld a, [rJOYP]
call SGBDelayCycles
call SGBDelayCycles
ld a, [rJOYP]
@@ -1946,9 +1946,9 @@ LoadMapPals:
ld a, [MapGroup]
ld l, a
ld h, 0
-rept 3
add hl,hl
-endr
+ add hl,hl
+ add hl,hl
ld de, RoofPals
add hl, de
ld a, [TimeOfDayPal]
diff --git a/engine/crystal_intro.asm b/engine/crystal_intro.asm
index c40062c1a..8dde2fa0a 100755
--- a/engine/crystal_intro.asm
+++ b/engine/crystal_intro.asm
@@ -1655,9 +1655,9 @@ CrystalIntro_InitUnownAnim: ; e51dc (39:51dc)
ret
CrystalIntro_UnownFade: ; e5223 (39:5223)
-rept 3
add a
-endr
+ add a
+ add a
ld e, a
ld d, $0
ld hl, BGPals
@@ -1777,9 +1777,9 @@ Intro_Scene20_AppearUnown: ; e5348 (39:5348)
.got_pointer
ld a, [wcf65]
and $7
-rept 3
add a
-endr
+ add a
+ add a
ld c, a
ld a, [rSVBK]
push af
@@ -1835,9 +1835,9 @@ endr
; e539d
Intro_FadeUnownWordPals: ; e539d (39:539d)
-rept 3
add a
-endr
+ add a
+ add a
ld e, a
ld d, $0
ld hl, BGPals
diff --git a/engine/debug.asm b/engine/debug.asm
index 79d477dc1..78fc52489 100755
--- a/engine/debug.asm
+++ b/engine/debug.asm
@@ -573,9 +573,9 @@ Function81c33: ; 81c33
; 81ca7
Function81ca7: ; 81ca7
-rept 3
inc hl
-endr
+ inc hl
+ inc hl
ld a, [de]
call Function81cbc
ld a, [de]
@@ -1233,9 +1233,9 @@ Function8220f: ; 8220f
ld a, [wcf64]
ld l, a
ld h, $0
-rept 3
add hl, hl
-endr
+ add hl, hl
+ add hl, hl
ld de, UnknBGPals
add hl, de
ld de, wc608
diff --git a/engine/events.asm b/engine/events.asm
index 3bcac8925..495211141 100644
--- a/engine/events.asm
+++ b/engine/events.asm
@@ -1030,9 +1030,9 @@ DoPlayerEvent: ; 96beb
ld c, a
ld b, 0
ld hl, PlayerEventScriptPointers
-rept 3
add hl, bc
-endr
+ add hl, bc
+ add hl, bc
ld a, [hli]
ld [ScriptBank], a
ld a, [hli]
diff --git a/engine/events_2.asm b/engine/events_2.asm
index 2e7c37c92..af0f8df17 100644
--- a/engine/events_2.asm
+++ b/engine/events_2.asm
@@ -459,9 +459,9 @@ HandleQueuedCommand: ; 97e79
ld e, a
ld d, 0
ld hl, .Jumptable_ba
-rept 3
add hl, de
-endr
+ add hl, de
+ add hl, de
ld a, [hli]
push af
ld a, [hli]
diff --git a/engine/events_3.asm b/engine/events_3.asm
index 1ec8ae986..dfcf60e73 100755
--- a/engine/events_3.asm
+++ b/engine/events_3.asm
@@ -704,9 +704,9 @@ SelectTreeMon: ; b841f
.loop
sub [hl]
jr c, .ok
-rept 3
inc hl
-endr
+ inc hl
+ inc hl
jr .loop
.ok
diff --git a/engine/evolution_animation.asm b/engine/evolution_animation.asm
index 42df7eea4..bc0c0924a 100755
--- a/engine/evolution_animation.asm
+++ b/engine/evolution_animation.asm
@@ -353,9 +353,9 @@ EvolutionAnimation: ; 4e5e1
ld a, [hl]
or b
ld [hli], a
-rept 3
inc hl
-endr
+ inc hl
+ inc hl
dec c
jr nz, .loop6
pop bc
diff --git a/engine/fish.asm b/engine/fish.asm
index e21bab03d..44fe57b25 100644
--- a/engine/fish.asm
+++ b/engine/fish.asm
@@ -50,9 +50,9 @@ endr
cp [hl]
jr z, .ok
jr c, .ok
-rept 3
inc hl
-endr
+ inc hl
+ inc hl
jr .loop
.ok
inc hl
diff --git a/engine/fruit_trees.asm b/engine/fruit_trees.asm
index cbbe5faaf..09619cfa5 100644
--- a/engine/fruit_trees.asm
+++ b/engine/fruit_trees.asm
@@ -66,9 +66,9 @@ PickedFruitTree: ; 4405f
ResetFruitTrees: ; 4406a
xor a
ld hl, FruitTreeFlags
-rept 3
ld [hli], a
-endr
+ ld [hli], a
+ ld [hli], a
ld [hl], a
ld hl, DailyFlags
set 4, [hl]
diff --git a/engine/healmachineanim.asm b/engine/healmachineanim.asm
index 2b8f3b868..5162b3830 100755
--- a/engine/healmachineanim.asm
+++ b/engine/healmachineanim.asm
@@ -218,9 +218,9 @@ INCBIN "gfx/unknown/0123fc.2bpp"
ld [hld], a
ld a, e
ld [hli], a
-rept 3
inc hl
-endr
+ inc hl
+ inc hl
dec c
jr nz, .palette_loop_2
pop de
diff --git a/engine/link.asm b/engine/link.asm
index 03148abe7..759caecbc 100755
--- a/engine/link.asm
+++ b/engine/link.asm
@@ -579,9 +579,9 @@ FixDataForLinkTransfer: ; 28434
jr nz, .loop2
ld hl, wMisc
ld a, $fd
-rept 3
ld [hli], a
-endr
+ ld [hli], a
+ ld [hli], a
ld b, $c8
xor a
.loop3
@@ -1213,9 +1213,9 @@ InitTradeMenuDisplay: ; 287e3
callba InitTradeSpeciesList
xor a
ld hl, wOtherPlayerLinkMode
-rept 3
ld [hli], a
-endr
+ ld [hli], a
+ ld [hli], a
ld [hl], a
ld a, 1
ld [wMenuCursorY], a
diff --git a/engine/map_objects.asm b/engine/map_objects.asm
index 629e87fc7..a78e11f25 100644
--- a/engine/map_objects.asm
+++ b/engine/map_objects.asm
@@ -268,9 +268,9 @@ EndSpriteMovement: ; 467b
ld [hl], a
ld hl, OBJECT_MOVEMENT_BYTE_INDEX
add hl, bc
-rept 3
ld [hli], a
-endr
+ ld [hli], a
+ ld [hli], a
ld [hl], a ; OBJECT_30
ld hl, OBJECT_DIRECTION_WALKING
add hl, bc
diff --git a/engine/map_setup.asm b/engine/map_setup.asm
index 047f66533..38aaf5fec 100644
--- a/engine/map_setup.asm
+++ b/engine/map_setup.asm
@@ -204,9 +204,9 @@ ReadMapSetupScript: ; 1541d
ld c, a
ld b, 0
ld hl, MapSetupCommands
-rept 3
add hl, bc
-endr
+ add hl, bc
+ add hl, bc
; bank
ld b, [hl]
diff --git a/engine/mart.asm b/engine/mart.asm
index dfe7d89cd..7002902cc 100755
--- a/engine/mart.asm
+++ b/engine/mart.asm
@@ -418,9 +418,9 @@ GetMartDialogGroup: ; 15ca3
ld e, a
ld d, 0
ld hl, .MartTextFunctionPointers
-rept 3
add hl, de
-endr
+ add hl, de
+ add hl, de
ret
; 15cb0
@@ -576,9 +576,9 @@ BargainShopAskPurchaseQuantity:
ld h, [hl]
ld l, a
inc hl
-rept 3
add hl, de
-endr
+ add hl, de
+ add hl, de
inc hl
ld a, [hli]
ld [hMoneyTemp + 2], a
@@ -617,9 +617,9 @@ RooftopSaleAskPurchaseQuantity:
ld h, [hl]
ld l, a
inc hl
-rept 3
add hl, de
-endr
+ add hl, de
+ add hl, de
inc hl
ld e, [hl]
inc hl
@@ -663,9 +663,9 @@ MenuDataHeader_Buy: ; 0x15e18
ld c, a
ld b, 0
ld hl, wMartItem1BCD
-rept 3
add hl, bc
-endr
+ add hl, bc
+ add hl, bc
push de
ld d, h
ld e, l
diff --git a/engine/menu.asm b/engine/menu.asm
index 11c5098e8..e84d8d597 100755
--- a/engine/menu.asm
+++ b/engine/menu.asm
@@ -836,8 +836,8 @@ _InitVerticalMenuCursor:: ; 2446d
ld [hli], a
; wCursorOffCharacter, wCursorCurrentTile
xor a
-rept 3
ld [hli], a
-endr
+ ld [hli], a
+ ld [hli], a
ret
; 244c3
diff --git a/engine/mon_icons.asm b/engine/mon_icons.asm
index 4b7f03bfb..0b4b60060 100755
--- a/engine/mon_icons.asm
+++ b/engine/mon_icons.asm
@@ -169,9 +169,10 @@ InitPartyMenuIcon: ; 8e908 (23:6908)
call GetMemIconGFX
ld a, [hObjectStructIndexBuffer]
; y coord
-rept 4
add a
-endr
+ add a
+ add a
+ add a
add $1c
ld d, a
; x coord
diff --git a/engine/move_mon.asm b/engine/move_mon.asm
index 100cb3f0e..55a5b9201 100755
--- a/engine/move_mon.asm
+++ b/engine/move_mon.asm
@@ -1459,9 +1459,9 @@ CalcPkmnStatC: ; e17b
ld a, [hl]
swap a
and $1
-rept 3
add a
-endr
+ add a
+ add a
ld b, a
ld a, [hli]
and $1
diff --git a/engine/predef.asm b/engine/predef.asm
index b028cd9ac..e47cca90a 100644
--- a/engine/predef.asm
+++ b/engine/predef.asm
@@ -12,9 +12,9 @@ GetPredefPointer:: ; 854b
ld e, a
ld d, 0
ld hl, PredefPointers
-rept 3
- add hl,de
-endr
+ add hl, de
+ add hl, de
+ add hl, de
pop de
ld a, [hli]
@@ -64,7 +64,7 @@ PredefPointers:: ; 856b
add_predef CopyPkmnToTempMon
add_predef ListMoves ; $20
add_predef PlaceNonFaintStatus
- add_predef Function50cdb
+ add_predef Predef22
add_predef ListMovePP
add_predef GetGender
add_predef StatsScreenInit
@@ -102,7 +102,7 @@ PredefPointers:: ; 856b
add_predef PlaceStatusString
add_predef LoadMonAnimation
add_predef AnimateFrontpic
- add_predef Functiond0669 ; $48
+ add_predef Predef48 ; $48
add_predef HOF_AnimateFrontpic
- dbw $ff, Function2d43 ; ????
+ dwb $43ff, $2d
; 864c
diff --git a/engine/printer.asm b/engine/printer.asm
index 409c8a461..1762a5b81 100755
--- a/engine/printer.asm
+++ b/engine/printer.asm
@@ -293,9 +293,9 @@ Function841e2: ; 841e2 (21:41e2)
Function841fb: ; 841fb (21:41fb)
xor a
ld hl, wca82
-rept 3
ld [hli], a
-endr
+ ld [hli], a
+ ld [hli], a
ld [hl], a
ld hl, wca86
ld [hli], a
@@ -1362,7 +1362,7 @@ Function848ed: ; 848ed (21:48ed)
call AddNTimes
ld a, [hl]
pop hl
- call Function383d
+ call PrintLevel_Force3Digits
.ok2
ld hl, wd002
inc [hl]
diff --git a/engine/scripting.asm b/engine/scripting.asm
index d068d8044..076ca3b79 100644
--- a/engine/scripting.asm
+++ b/engine/scripting.asm
@@ -1652,9 +1652,9 @@ ScriptCall: ; 974cb
inc [hl]
ld d, $0
ld hl, wScriptStack
-rept 3
add hl, de
-endr
+ add hl, de
+ add hl, de
pop de
ld a, [ScriptBank]
ld [hli], a
@@ -1825,9 +1825,9 @@ StdScript: ; 9757b
call GetScriptByte
ld d, a
ld hl, StdScripts
-rept 3
add hl, de
-endr
+ add hl, de
+ add hl, de
ld a, BANK(StdScripts)
call GetFarByte
ld b, a
@@ -3160,9 +3160,9 @@ ExitScriptSubroutine: ; 97b9a
ld e, [hl]
ld d, $0
ld hl, wScriptStack
-rept 3
add hl,de
-endr
+ add hl,de
+ add hl,de
ld a, [hli]
ld b, a
and " "
diff --git a/engine/search.asm b/engine/search.asm
index 662623296..9543ecfbb 100755
--- a/engine/search.asm
+++ b/engine/search.asm
@@ -117,9 +117,9 @@ CheckOwnMonAnywhere: ; 0x4a721
; Load the box.
ld hl, BoxAddressTable1
ld b, 0
-rept 3
add hl, bc
-endr
+ add hl, bc
+ add hl, bc
ld a, [hli]
call GetSRAMBank
ld a, [hli]
diff --git a/engine/slot_machine.asm b/engine/slot_machine.asm
index c31dbd2b3..626989999 100755
--- a/engine/slot_machine.asm
+++ b/engine/slot_machine.asm
@@ -201,9 +201,9 @@ Function9282c: ; 9282c
ld a, [hl]
xor $20
ld [hli], a
-rept 3
inc hl
-endr
+ inc hl
+ inc hl
dec c
jr nz, .loop
ret
@@ -686,9 +686,9 @@ Slots_SpinReels: ; 92b0f (24:6b0f)
ld a, [hl]
add d
ld [hli], a
-rept 3
inc hl
-endr
+ inc hl
+ inc hl
dec e
jr nz, .loop
ret
@@ -1844,9 +1844,9 @@ SlotPayoutText: ; 93158 (24:7158)
ld e, a
ld d, 0
ld hl, .PayoutStrings
-rept 3
add hl, de
-endr
+ add hl, de
+ add hl, de
ld de, StringBuffer2
ld bc, 4
call CopyBytes
diff --git a/engine/specials.asm b/engine/specials.asm
index 06d3d2edd..841a59cd3 100644
--- a/engine/specials.asm
+++ b/engine/specials.asm
@@ -2,9 +2,9 @@
Special:: ; c01b
; Run script special de.
ld hl, SpecialsPointers
-rept 3
add hl,de
-endr
+ add hl,de
+ add hl,de
ld b, [hl]
inc hl
ld a, [hli]
diff --git a/engine/sprite_anims.asm b/engine/sprite_anims.asm
index 5addaad5d..1b3f720c9 100755
--- a/engine/sprite_anims.asm
+++ b/engine/sprite_anims.asm
@@ -630,9 +630,9 @@ DoAnimFrame: ; 8d24b
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld a, [hl]
-rept 3
inc [hl]
-endr
+ inc [hl]
+ inc [hl]
push af
push de
call .Sprites_Sine
@@ -807,9 +807,9 @@ endr
ld hl, SPRITEANIMSTRUCT_0B
add hl, bc
ld d, [hl]
-rept 3
inc [hl]
-endr
+ inc [hl]
+ inc [hl]
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
diff --git a/engine/sprites.asm b/engine/sprites.asm
index b88c2a8ed..74a56a38c 100755
--- a/engine/sprites.asm
+++ b/engine/sprites.asm
@@ -154,9 +154,9 @@ InitSpriteAnimStruct:: ; 8cfd6
ld e, a
ld d, 0
ld hl, SpriteAnimSeqData
-rept 3
add hl, de
-endr
+ add hl, de
+ add hl, de
ld e, l
ld d, h
; Set hl to the first field (field 0) in the current structure.
@@ -521,9 +521,9 @@ GetFrameOAMPointer: ; 8d1a2
ld e, a
ld d, 0
ld hl, SpriteAnimOAMData
-rept 3
add hl, de
-endr
+ add hl, de
+ add hl, de
ret
; 8d1ac
diff --git a/engine/startmenu.asm b/engine/startmenu.asm
index 68ac65e12..f289e4184 100755
--- a/engine/startmenu.asm
+++ b/engine/startmenu.asm
@@ -19,9 +19,9 @@ StartMenu:: ; 125cd
ld a, [wd0d2]
ld [wMenuCursorBuffer], a
call .DrawMenuAccount_
- call MenuFunc_1e7f
+ call DrawVariableLengthMenuBox
call .DrawBugContestStatusBox
- call Function2e31
+ call SafeUpdateSprites
call _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
callba LoadFonts_NoOAMUpdate
call .DrawBugContestStatus
@@ -142,7 +142,7 @@ StartMenu:: ; 125cd
call Call_ExitMenu
call ReloadTilesetAndPalettes
call .DrawMenuAccount_
- call MenuFunc_1e7f
+ call DrawVariableLengthMenuBox
call .DrawBugContestStatus
call UpdateSprites
call ret_d90
diff --git a/engine/time.asm b/engine/time.asm
index 8ea807972..2112ec35c 100755
--- a/engine/time.asm
+++ b/engine/time.asm
@@ -102,9 +102,9 @@ CheckDailyResetTimer:: ; 11452
ret nc
xor a
ld hl, DailyFlags
-rept 3
ld [hli], a
-endr
+ ld [hli], a
+ ld [hli], a
ld [hl], a
ld hl, wDailyRematchFlags
rept 4
@@ -381,9 +381,9 @@ CalcMinsHoursDaysSince: ; 115d6
; 115db
CalcSecsMinsHoursDaysSince: ; 115db
-rept 3
inc hl
-endr
+ inc hl
+ inc hl
ld a, [hSeconds]
ld c, a
sub [hl]
diff --git a/engine/timeofdaypals.asm b/engine/timeofdaypals.asm
index 3bba41f53..e9b19c6f7 100644
--- a/engine/timeofdaypals.asm
+++ b/engine/timeofdaypals.asm
@@ -140,9 +140,9 @@ Special_BattleTowerFade: ; 8c092
ld b, $4
.asm_8c09c
call DmgToCgbTimePals
-rept 3
inc hl
-endr
+ inc hl
+ inc hl
ld c, $7
call DelayFrames
dec b
@@ -304,9 +304,9 @@ DmgToCgbTimePals: ; 8c14e
ConvertTimePalsIncHL: ; 8c15e
.loop
call DmgToCgbTimePals
-rept 3
inc hl
-endr
+ inc hl
+ inc hl
ld c, 2
call DelayFrames
dec b
@@ -317,9 +317,9 @@ endr
ConvertTimePalsDecHL: ; 8c16d
.loop
call DmgToCgbTimePals
-rept 3
dec hl
-endr
+ dec hl
+ dec hl
ld c, 2
call DelayFrames
dec b
diff --git a/engine/timeset.asm b/engine/timeset.asm
index b21e62ea1..0abb7e88c 100755
--- a/engine/timeset.asm
+++ b/engine/timeset.asm
@@ -215,9 +215,9 @@ UnreferencedFunction907f1: ; 907f1
ld [hl], a
pop hl
call DisplayMinutesWithMinString
-rept 3
inc hl
-endr
+ inc hl
+ inc hl
ret
; 90810
diff --git a/engine/title.asm b/engine/title.asm
index 31fbe091e..012242491 100644
--- a/engine/title.asm
+++ b/engine/title.asm
@@ -377,9 +377,9 @@ AnimateTitleCrystal: ; 10ef32
ld a, [hl]
add 2
ld [hli], a
-rept 3
inc hl
-endr
+ inc hl
+ inc hl
dec c
jr nz, .loop
diff --git a/engine/tmhm2.asm b/engine/tmhm2.asm
index 7062149f8..6efd07294 100755
--- a/engine/tmhm2.asm
+++ b/engine/tmhm2.asm
@@ -423,9 +423,9 @@ TMHM_DisplayPocketItems: ; 2c9e2 (b:49e2)
.NotTMHM:
call TMHMPocket_GetCurrentLineCoord
-rept 3
inc hl
-endr
+ inc hl
+ inc hl
push de
ld de, TMHM_String_Cancel
call PlaceString
diff --git a/engine/trainer_card.asm b/engine/trainer_card.asm
index b6fac7f7c..a993ce4ba 100755
--- a/engine/trainer_card.asm
+++ b/engine/trainer_card.asm
@@ -62,9 +62,9 @@ TrainerCard: ; 25105
call WaitBGMap
ld hl, wJumptableIndex
xor a
-rept 3
ld [hli], a
-endr
+ ld [hli], a
+ ld [hli], a
ld [hl], a
ret
diff --git a/engine/variables.asm b/engine/variables.asm
index 3ddfce8d6..fde2583b7 100755
--- a/engine/variables.asm
+++ b/engine/variables.asm
@@ -7,9 +7,9 @@ _GetVarAction:: ; 80648 (20:4648)
ld c, a
ld b, 0
ld hl, .VarActionTable
-rept 3
add hl, bc
-endr
+ add hl, bc
+ add hl, bc
ld e, [hl]
inc hl
ld d, [hl]
diff --git a/engine/warp_connection.asm b/engine/warp_connection.asm
index 084343a33..515edce40 100755
--- a/engine/warp_connection.asm
+++ b/engine/warp_connection.asm
@@ -326,7 +326,7 @@ RefreshMapSprites: ; 1047f0
jr nz, .skip
ld hl, VramState
set 0, [hl]
- call Function2e31
+ call SafeUpdateSprites
.skip
ld a, [wPlayerSpriteSetupFlags]
and %00011100
diff --git a/engine/wildmons.asm b/engine/wildmons.asm
index 557630686..6208cfbce 100755
--- a/engine/wildmons.asm
+++ b/engine/wildmons.asm
@@ -62,9 +62,9 @@ FindNest: ; 2a01f
ld b, a
ld a, [hli]
ld c, a
-rept 3
inc hl
-endr
+ inc hl
+ inc hl
ld a, NUM_WILDMONS_PER_AREA_TIME_OF_DAY * 3
call .SearchMapForMon
jr nc, .next_grass
@@ -267,9 +267,9 @@ ChooseWildEncounter: ; 2a14f
call CheckEncounterRoamMon
jp c, .startwildbattle
-rept 3
inc hl
-endr
+ inc hl
+ inc hl
call CheckOnWater
ld de, .WaterMonTable
jr z, .watermon
@@ -595,9 +595,9 @@ CheckEncounterRoamMon: ; 2a2ce
cp [hl]
jr nz, .DontEncounterRoamMon
; We've decided to take on a beast, so stage its information for battle.
-rept 3
dec hl
-endr
+ dec hl
+ dec hl
ld a, [hli]
ld [TempWildMonSpecies], a
ld a, [hl]