summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-11-09 15:16:44 -0500
committerRangi <remy.oukaour+rangi42@gmail.com>2020-11-09 15:20:35 -0500
commitbc8636d68805116ef126feecc07cde63238490da (patch)
treed88fed0393eb69c8c37fbaf7ee21f7dd3af289c9
parent6e20c30f6e48ba36237d42b13ea6e6827b62ff40 (diff)
Replace $0 with 0 for "ld l, a / ld h, 0" idiom
-rw-r--r--engine/battle_anims/anim_commands.asm2
-rw-r--r--engine/battle_anims/bg_effects.asm6
-rw-r--r--engine/battle_anims/functions.asm10
-rw-r--r--engine/games/card_flip.asm2
-rw-r--r--engine/games/memory_game.asm4
-rw-r--r--engine/games/slot_machine.asm2
-rw-r--r--engine/games/unown_puzzle.asm4
-rw-r--r--engine/gfx/cgb_layouts.asm8
-rw-r--r--engine/gfx/color.asm8
-rw-r--r--engine/items/items.asm2
-rw-r--r--engine/link/link.asm2
-rw-r--r--engine/menus/scrolling_menu.asm4
-rw-r--r--engine/overworld/scripting.asm2
-rw-r--r--engine/phone/phone.asm2
-rw-r--r--engine/pokedex/pokedex.asm4
-rw-r--r--engine/pokegear/pokegear.asm2
-rw-r--r--engine/pokemon/bills_pc.asm8
-rw-r--r--engine/pokemon/mon_menu.asm8
-rw-r--r--engine/pokemon/party_menu.asm6
-rw-r--r--engine/pokemon/switchpartymons.asm4
-rw-r--r--engine/printer/printer.asm2
-rw-r--r--engine/rtc/reset_password.asm2
-rw-r--r--home/map.asm8
-rw-r--r--home/menu.asm4
24 files changed, 53 insertions, 53 deletions
diff --git a/engine/battle_anims/anim_commands.asm b/engine/battle_anims/anim_commands.asm
index 6d4129fa..9d9e6ef5 100644
--- a/engine/battle_anims/anim_commands.asm
+++ b/engine/battle_anims/anim_commands.asm
@@ -654,7 +654,7 @@ BattleAnimCmd_5GFX:
push bc
push hl
ld l, a
- ld h, $0
+ ld h, 0
rept 4
add hl, hl
endr
diff --git a/engine/battle_anims/bg_effects.asm b/engine/battle_anims/bg_effects.asm
index b504df29..466310fc 100644
--- a/engine/battle_anims/bg_effects.asm
+++ b/engine/battle_anims/bg_effects.asm
@@ -1951,7 +1951,7 @@ BattleBGEffect_FadeMonsToBlackRepeating:
swap a
sla a
ld e, a
- ld d, $0
+ ld d, 0
push bc
call BGEffect_CheckBattleTurn
jr nz, .player
@@ -2559,7 +2559,7 @@ BattleBGEffect_GetFirstDMGPal:
inc [hl]
BattleBGEffect_GetNextDMGPal:
ld l, a
- ld h, $0
+ ld h, 0
add hl, de
ld a, [hl]
cp -1
@@ -2752,7 +2752,7 @@ DeformWater:
ld a, [wBattleSineWaveTempProgress]
add e
ld e, a
- ld d, $0
+ ld d, 0
ret
BattleBGEffect_WavyScreenFX:
diff --git a/engine/battle_anims/functions.asm b/engine/battle_anims/functions.asm
index 2a72cf12..a38bf152 100644
--- a/engine/battle_anims/functions.asm
+++ b/engine/battle_anims/functions.asm
@@ -772,7 +772,7 @@ BattleAnimFunction_FireBlast:
call DeinitBattleAnimation
ret
-.one
+.one
; Flame that moves upward
ld hl, BATTLEANIMSTRUCT_YOFFSET
add hl, bc
@@ -2139,13 +2139,13 @@ BattleAnimFunction_Egg:
call BattleAnim_IncAnonJumptableIndex ; jumps to three
ret
-.egg_bomb_done
+.egg_bomb_done
; Increases jumptable index twice to four
call BattleAnim_IncAnonJumptableIndex
inc [hl]
ret
-.three
+.three
; Waits in place
ld hl, BATTLEANIMSTRUCT_VAR2
add hl, bc
@@ -3381,7 +3381,7 @@ BattleAnimFunction_SkyAttack:
call DeinitBattleAnimation
ret
-.SkyAttack_CyclePalette:
+.SkyAttack_CyclePalette:
; Cycles wOBP0 pallete
ld hl, BATTLEANIMSTRUCT_VAR2
add hl, bc
@@ -3390,7 +3390,7 @@ BattleAnimFunction_SkyAttack:
inc [hl]
srl a
ld e, a
- ld d, $0
+ ld d, 0
ldh a, [hSGB]
and a
jr nz, .sgb
diff --git a/engine/games/card_flip.asm b/engine/games/card_flip.asm
index 501d231d..1567eaf6 100644
--- a/engine/games/card_flip.asm
+++ b/engine/games/card_flip.asm
@@ -338,7 +338,7 @@ CardFlip_ShuffleDeck:
cp CARDFLIP_DECK_SIZE
jr nc, .loop
ld l, a
- ld h, $0
+ ld h, 0
add hl, de
ld a, [hl]
and a
diff --git a/engine/games/memory_game.asm b/engine/games/memory_game.asm
index 10a0b24e..8be4e51c 100644
--- a/engine/games/memory_game.asm
+++ b/engine/games/memory_game.asm
@@ -216,7 +216,7 @@ endr
pop af
push hl
ld e, a
- ld d, $0
+ ld d, 0
ld hl, wMemoryGameCards
add hl, de
ld a, [hl]
@@ -259,7 +259,7 @@ MemoryGame_CheckMatch:
ld a, [wMemoryGameCard1Location]
ld e, a
- ld d, $0
+ ld d, 0
ld hl, wMemoryGameCards
add hl, de
ld [hl], -1
diff --git a/engine/games/slot_machine.asm b/engine/games/slot_machine.asm
index c7198f13..aaede41e 100644
--- a/engine/games/slot_machine.asm
+++ b/engine/games/slot_machine.asm
@@ -550,7 +550,7 @@ Slots_GetCurrentReelState:
dec a
and $f
ld e, a
- ld d, $0
+ ld d, 0
ld hl, REEL_TILEMAP_ADDR
add hl, bc
ld a, [hli]
diff --git a/engine/games/unown_puzzle.asm b/engine/games/unown_puzzle.asm
index c5db774b..daf98738 100644
--- a/engine/games/unown_puzzle.asm
+++ b/engine/games/unown_puzzle.asm
@@ -97,7 +97,7 @@ InitUnownPuzzlePiecePositions:
and $f
ld hl, .PuzzlePieceInitialPositions
ld e, a
- ld d, $0
+ ld d, 0
add hl, de
ld e, [hl]
ld hl, wPuzzlePieces
@@ -449,7 +449,7 @@ UnownPuzzle_CheckCurrentTileOccupancy:
ld hl, wPuzzlePieces
ld a, [wUnownPuzzleCursorPosition]
ld e, a
- ld d, $0
+ ld d, 0
add hl, de
ld a, [hl]
ret
diff --git a/engine/gfx/cgb_layouts.asm b/engine/gfx/cgb_layouts.asm
index b5f298fe..a830e45a 100644
--- a/engine/gfx/cgb_layouts.asm
+++ b/engine/gfx/cgb_layouts.asm
@@ -87,7 +87,7 @@ _CGB_BattleColors:
call LoadPalette_White_Col1_Col2_Black ; PAL_BATTLE_BG_ENEMY
ld a, [wEnemyHPPal]
ld l, a
- ld h, $0
+ ld h, 0
add hl, hl
add hl, hl
ld bc, HPBarPals
@@ -95,7 +95,7 @@ _CGB_BattleColors:
call LoadPalette_White_Col1_Col2_Black ; PAL_BATTLE_BG_ENEMY_HP
ld a, [wPlayerHPPal]
ld l, a
- ld h, $0
+ ld h, 0
add hl, hl
add hl, hl
ld bc, HPBarPals
@@ -165,7 +165,7 @@ _CGB_StatsScreenHPPals:
ld de, wBGPals1
ld a, [wCurHPPal]
ld l, a
- ld h, $0
+ ld h, 0
add hl, hl
add hl, hl
ld bc, HPBarPals
@@ -753,7 +753,7 @@ _CGB_Pokepic:
.found_top
ld a, [wMenuBorderLeftCoord]
ld e, a
- ld d, $0
+ ld d, 0
add hl, de
ld a, [wMenuBorderTopCoord]
ld b, a
diff --git a/engine/gfx/color.asm b/engine/gfx/color.asm
index ea59575c..d319ab0d 100644
--- a/engine/gfx/color.asm
+++ b/engine/gfx/color.asm
@@ -119,7 +119,7 @@ SGB_ApplyPartyMenuHPPals:
ld hl, wHPPals
ld a, [wSGBPals]
ld e, a
- ld d, $0
+ ld d, 0
add hl, de
ld e, l
ld d, h
@@ -424,7 +424,7 @@ CopyPalettes:
GetPredefPal:
ld l, a
- ld h, $0
+ ld h, 0
add hl, hl
add hl, hl
add hl, hl
@@ -568,7 +568,7 @@ CGB_ApplyPartyMenuHPPals:
ld hl, wHPPals
ld a, [wSGBPals]
ld e, a
- ld d, $0
+ ld d, 0
add hl, de
ld e, l
ld d, h
@@ -688,7 +688,7 @@ CGBCopyTwoPredefObjectPals: ; unreferenced
_GetMonPalettePointer:
ld l, a
- ld h, $0
+ ld h, 0
add hl, hl
add hl, hl
add hl, hl
diff --git a/engine/items/items.asm b/engine/items/items.asm
index 42381b41..cfdd4a4c 100644
--- a/engine/items/items.asm
+++ b/engine/items/items.asm
@@ -240,7 +240,7 @@ RemoveItemFromPocket:
cp c
jr nc, .ok ; memory
ld c, a
- ld b, $0
+ ld b, 0
add hl, bc
add hl, bc
ld a, [wCurItem]
diff --git a/engine/link/link.asm b/engine/link/link.asm
index 648d7236..6784dde8 100644
--- a/engine/link/link.asm
+++ b/engine/link/link.asm
@@ -341,7 +341,7 @@ Gen2ToGen2LinkComms:
jr z, .start_copying_mail
ld hl, wcb4a
dec a
- ld b, $0
+ ld b, 0
ld c, a
add hl, bc
ld [hl], SERIAL_NO_DATA_BYTE
diff --git a/engine/menus/scrolling_menu.asm b/engine/menus/scrolling_menu.asm
index d23b4d1e..6a8d6fd4 100644
--- a/engine/menus/scrolling_menu.asm
+++ b/engine/menus/scrolling_menu.asm
@@ -425,7 +425,7 @@ ScrollingMenu_CallFunctions1and2:
and a
jr z, .done
ld e, a
- ld d, $0
+ ld d, 0
add hl, de
ld d, h
ld e, l
@@ -491,7 +491,7 @@ ScrollingMenu_GetListItemCoordAndFunctionArgs:
ld a, [wMenuScrollPosition]
add e
ld e, a
- ld d, $0
+ ld d, 0
ld hl, wMenuData_ItemsPointerAddr
ld a, [hli]
ld h, [hl]
diff --git a/engine/overworld/scripting.asm b/engine/overworld/scripting.asm
index ffb878a9..8c915bd4 100644
--- a/engine/overworld/scripting.asm
+++ b/engine/overworld/scripting.asm
@@ -866,7 +866,7 @@ ApplyObjectFacing:
Script_variablesprite:
call GetScriptByte
ld e, a
- ld d, $0
+ ld d, 0
ld hl, wVariableSprites
add hl, de
call GetScriptByte
diff --git a/engine/phone/phone.asm b/engine/phone/phone.asm
index 307b4607..49b3eb2f 100644
--- a/engine/phone/phone.asm
+++ b/engine/phone/phone.asm
@@ -230,7 +230,7 @@ GetAvailableCallers:
.different_map
ld a, [wNumAvailableCallers]
ld c, a
- ld b, $0
+ ld b, 0
inc a
ld [wNumAvailableCallers], a
ld hl, wAvailableCallers
diff --git a/engine/pokedex/pokedex.asm b/engine/pokedex/pokedex.asm
index 23840d1d..befc2f4c 100644
--- a/engine/pokedex/pokedex.asm
+++ b/engine/pokedex/pokedex.asm
@@ -1482,7 +1482,7 @@ Pokedex_PrintListing:
; Load de with wPokedexOrder + [wDexListingScrollOffset]
ld a, [wDexListingScrollOffset]
ld e, a
- ld d, $0
+ ld d, 0
ld hl, wPokedexOrder
add hl, de
ld e, l
@@ -1581,7 +1581,7 @@ Pokedex_GetSelectedMon:
ld hl, wDexListingScrollOffset
add [hl]
ld e, a
- ld d, $0
+ ld d, 0
ld hl, wPokedexOrder
add hl, de
ld a, [hl]
diff --git a/engine/pokegear/pokegear.asm b/engine/pokegear/pokegear.asm
index 6586774e..63b0944a 100644
--- a/engine/pokegear/pokegear.asm
+++ b/engine/pokegear/pokegear.asm
@@ -2653,7 +2653,7 @@ TownMapMon:
ld a, [wCurPartyMon]
ld hl, wPartySpecies
ld e, a
- ld d, $0
+ ld d, 0
add hl, de
ld a, [hl]
ld [wTempIconSpecies], a
diff --git a/engine/pokemon/bills_pc.asm b/engine/pokemon/bills_pc.asm
index 3be170ec..2ba4c48c 100644
--- a/engine/pokemon/bills_pc.asm
+++ b/engine/pokemon/bills_pc.asm
@@ -1099,7 +1099,7 @@ BillsPC_LoadMonStats:
ld hl, wBillsPC_ScrollPosition
add [hl]
ld e, a
- ld d, $0
+ ld d, 0
ld hl, wBillsPCPokemonList + 1 ; box number
add hl, de
add hl, de
@@ -1428,7 +1428,7 @@ BillsPC_GetSelectedPokemonSpecies:
ld hl, wBillsPC_ScrollPosition
add [hl]
ld e, a
- ld d, $0
+ ld d, 0
ld hl, wBillsPCPokemonList
add hl, de
add hl, de
@@ -2083,7 +2083,7 @@ MovePKMNWitoutMail_InsertMon:
CopySpeciesToTemp:
ld a, [wCurPartyMon]
ld c, a
- ld b, $0
+ ld b, 0
add hl, bc
ld a, [hl]
ld [wCurPartySpecies], a
@@ -2157,7 +2157,7 @@ BillsPC_ApplyPalettes:
BillsPC_Jumptable:
ld e, a
- ld d, $0
+ ld d, 0
add hl, de
add hl, de
ld a, [hli]
diff --git a/engine/pokemon/mon_menu.asm b/engine/pokemon/mon_menu.asm
index 9fb292f7..aaafad18 100644
--- a/engine/pokemon/mon_menu.asm
+++ b/engine/pokemon/mon_menu.asm
@@ -1051,7 +1051,7 @@ MoveScreenLoop:
ld a, [wMenuCursorY]
dec a
ld c, a
- ld b, $0
+ ld b, 0
add hl, bc
ld d, h
ld e, l
@@ -1059,7 +1059,7 @@ MoveScreenLoop:
ld a, [wMoveSwapBuffer]
dec a
ld c, a
- ld b, $0
+ ld b, 0
add hl, bc
ld a, [de]
ld b, [hl]
@@ -1096,7 +1096,7 @@ SetUpMoveScreenBG:
farcall ClearSpriteAnims2
ld a, [wCurPartyMon]
ld e, a
- ld d, $0
+ ld d, 0
ld hl, wPartySpecies
add hl, de
ld a, [hl]
@@ -1167,7 +1167,7 @@ PrepareToPlaceMoveData:
ld a, [wMenuCursorY]
dec a
ld c, a
- ld b, $0
+ ld b, 0
add hl, bc
ld a, [hl]
ld [wCurSpecies], a
diff --git a/engine/pokemon/party_menu.asm b/engine/pokemon/party_menu.asm
index f10248e4..16126667 100644
--- a/engine/pokemon/party_menu.asm
+++ b/engine/pokemon/party_menu.asm
@@ -134,7 +134,7 @@ PlacePartyHPBar:
ld hl, wHPPals
ld a, [wSGBPals]
ld c, a
- ld b, $0
+ ld b, 0
add hl, bc
call SetHPPal
ld b, SCGB_PARTY_MENU_HP_BARS
@@ -604,7 +604,7 @@ PartyMenuSelect:
dec a
ld [wCurPartyMon], a
ld c, a
- ld b, $0
+ ld b, 0
ld hl, wPartySpecies
add hl, bc
ld a, [hl]
@@ -637,7 +637,7 @@ PrintPartyMenuText:
and $f ; drop high nibble
ld hl, PartyMenuStrings
ld e, a
- ld d, $0
+ ld d, 0
add hl, de
add hl, de
ld a, [hli]
diff --git a/engine/pokemon/switchpartymons.asm b/engine/pokemon/switchpartymons.asm
index 512332fc..1ec3cf69 100644
--- a/engine/pokemon/switchpartymons.asm
+++ b/engine/pokemon/switchpartymons.asm
@@ -46,13 +46,13 @@ _SwitchPartyMons:
ld bc, wPartySpecies
ld a, [wSwitchMonTo]
ld l, a
- ld h, $0
+ ld h, 0
add hl, bc
ld d, h
ld e, l
ld a, [wSwitchMonFrom]
ld l, a
- ld h, $0
+ ld h, 0
add hl, bc
ld a, [hl]
push af
diff --git a/engine/printer/printer.asm b/engine/printer/printer.asm
index 5b17c52f..302119f7 100644
--- a/engine/printer/printer.asm
+++ b/engine/printer/printer.asm
@@ -848,7 +848,7 @@ Printer_GetMonGender:
Printer_GetBoxMonSpecies:
push hl
ld e, a
- ld d, $0
+ ld d, 0
ld a, [wAddrOfBoxToPrint]
ld l, a
ld a, [wAddrOfBoxToPrint + 1]
diff --git a/engine/rtc/reset_password.asm b/engine/rtc/reset_password.asm
index b935d747..4070d1d4 100644
--- a/engine/rtc/reset_password.asm
+++ b/engine/rtc/reset_password.asm
@@ -184,7 +184,7 @@ ClockResetPassword:
.getcurrentdigit
ld a, [wStringBuffer2 + 5]
ld e, a
- ld d, $0
+ ld d, 0
ld hl, wStringBuffer2
add hl, de
ret
diff --git a/home/map.asm b/home/map.asm
index 22719788..75281a1b 100644
--- a/home/map.asm
+++ b/home/map.asm
@@ -1029,7 +1029,7 @@ CoordinatesEventText::
CheckObjectMask::
ldh a, [hMapObjectIndexBuffer]
ld e, a
- ld d, $0
+ ld d, 0
ld hl, wObjectMasks
add hl, de
ld a, [hl]
@@ -1038,7 +1038,7 @@ CheckObjectMask::
MaskObject::
ldh a, [hMapObjectIndexBuffer]
ld e, a
- ld d, $0
+ ld d, 0
ld hl, wObjectMasks
add hl, de
ld [hl], -1 ; masked
@@ -1047,7 +1047,7 @@ MaskObject::
UnmaskObject::
ldh a, [hMapObjectIndexBuffer]
ld e, a
- ld d, $0
+ ld d, 0
ld hl, wObjectMasks
add hl, de
ld [hl], 0 ; unmasked
@@ -1565,7 +1565,7 @@ GetCoordTile::
and a
jr z, .nope
ld l, a
- ld h, $0
+ ld h, 0
add hl, hl
add hl, hl
ld a, [wTilesetCollisionAddress]
diff --git a/home/menu.asm b/home/menu.asm
index ed17e05e..8fb7c418 100644
--- a/home/menu.asm
+++ b/home/menu.asm
@@ -635,7 +635,7 @@ ContinueGettingMenuJoypad:
call GetMenuIndexSet
ld a, [wMenuCursorY]
ld l, a
- ld h, $0
+ ld h, 0
add hl, de
ld a, [hl]
ld [wMenuSelection], a
@@ -698,7 +698,7 @@ MenuJumptable::
GetMenuDataPointerTableEntry::
ld e, a
- ld d, $0
+ ld d, 0
ld hl, wMenuDataPointerTableAddr
ld a, [hli]
ld h, [hl]