summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
Diffstat (limited to 'home')
-rw-r--r--home/audio.asm14
-rw-r--r--home/battle.asm21
-rw-r--r--home/copy.asm14
-rw-r--r--home/decompress.asm19
-rw-r--r--home/delay.asm1
-rw-r--r--home/fade.asm3
-rw-r--r--home/farcall.asm1
-rw-r--r--home/flag.asm2
-rw-r--r--home/game_time.asm10
-rw-r--r--home/init.asm5
-rw-r--r--home/joypad.asm6
-rw-r--r--home/lcd.asm4
-rw-r--r--home/map.asm7
-rw-r--r--home/math.asm4
-rw-r--r--home/menu.asm5
-rw-r--r--home/menu_window.asm2
-rw-r--r--home/mobile.asm1
-rw-r--r--home/movement.asm1
-rw-r--r--home/names.asm1
-rw-r--r--home/palettes.asm13
-rw-r--r--home/random.asm1
-rw-r--r--home/text.asm20
-rw-r--r--home/time.asm10
-rw-r--r--home/trainers.asm2
-rw-r--r--home/vblank.asm10
-rw-r--r--home/video.asm22
-rw-r--r--home/window.asm1
27 files changed, 4 insertions, 196 deletions
diff --git a/home/audio.asm b/home/audio.asm
index 11ebd9b6b..dd115449d 100644
--- a/home/audio.asm
+++ b/home/audio.asm
@@ -1,7 +1,6 @@
; Audio interfaces.
MapSetup_Sound_Off::
-
push hl
push de
push bc
@@ -25,9 +24,7 @@ MapSetup_Sound_Off::
pop hl
ret
-
UpdateSound::
-
push hl
push de
push bc
@@ -51,11 +48,8 @@ UpdateSound::
pop hl
ret
-
_LoadMusicByte::
; wCurMusicByte = [a:de]
-GLOBAL LoadMusicByte
-
ld [hROMBank], a
ld [MBC3RomBank], a
@@ -67,7 +61,6 @@ GLOBAL LoadMusicByte
ld [MBC3RomBank], a
ret
-
PlayMusic::
; Play music de.
@@ -102,7 +95,6 @@ PlayMusic::
pop hl
ret
-
PlayMusic2::
; Stop playing music, then play music de.
@@ -134,8 +126,6 @@ PlayMusic2::
pop hl
ret
-
-
PlayCry::
; Play cry de.
@@ -187,7 +177,6 @@ endr
pop hl
ret
-
PlaySFX::
; Play sound effect de.
; Sound effects are ordered by priority (highest to lowest)
@@ -228,13 +217,11 @@ PlaySFX::
pop hl
ret
-
WaitPlaySFX::
call WaitSFX
call PlaySFX
ret
-
WaitSFX::
; infinite loop until sfx is done playing
@@ -545,7 +532,6 @@ TerminateExpBarSound::
ld [rNR14], a
ret
-
ChannelsOff::
; Quickly turn off music channels
xor a
diff --git a/home/battle.asm b/home/battle.asm
index 1899a40dc..e88adef02 100644
--- a/home/battle.asm
+++ b/home/battle.asm
@@ -9,7 +9,6 @@ UserPartyAttr::
pop af
jr OTPartyAttr
-
OpponentPartyAttr::
push af
ld a, [hBattleTurn]
@@ -21,7 +20,6 @@ OpponentPartyAttr::
pop af
jr OTPartyAttr
-
BattlePartyAttr::
; Get attribute a from the party struct of the active battle mon.
push bc
@@ -34,7 +32,6 @@ BattlePartyAttr::
pop bc
ret
-
OTPartyAttr::
; Get attribute a from the party struct of the active enemy mon.
push bc
@@ -47,7 +44,6 @@ OTPartyAttr::
pop bc
ret
-
ResetDamage::
xor a
ld [wCurDamage], a
@@ -64,7 +60,6 @@ SetEnemyTurn::
ld [hBattleTurn], a
ret
-
UpdateOpponentInParty::
ld a, [hBattleTurn]
and a
@@ -110,7 +105,6 @@ UpdateEnemyMonInParty::
ld bc, wEnemyMonMaxHP - wEnemyMonLevel
jp CopyBytes
-
RefreshBattleHuds::
call UpdateBattleHuds
ld c, 3
@@ -122,10 +116,8 @@ UpdateBattleHuds::
farcall UpdateEnemyHUD
ret
-
INCLUDE "home/battle_vars.asm"
-
FarCopyRadioText::
inc hl
ld a, [hROMBank]
@@ -149,12 +141,7 @@ FarCopyRadioText::
ld [MBC3RomBank], a
ret
-
MobileTextBorder::
-
-CELL_PHONE_TOP EQU $5e
-CELL_PHONE_BOTTOM EQU $5f
-
; For mobile link battles only.
ld a, [wLinkMode]
cp LINK_MOBILE
@@ -163,12 +150,11 @@ CELL_PHONE_BOTTOM EQU $5f
; Draw a cell phone icon at the
; top right corner of the border.
hlcoord 19, 12
- ld [hl], CELL_PHONE_TOP
+ ld [hl], $5e ; top
hlcoord 19, 13
- ld [hl], CELL_PHONE_BOTTOM
+ ld [hl], $5f ; bottom
ret
-
BattleTextBox::
; Open a textbox and print text at hl.
push hl
@@ -180,7 +166,6 @@ BattleTextBox::
call PrintTextBoxText
ret
-
StdBattleTextBox::
; Open a textbox and print battle text at 20:hl.
@@ -197,7 +182,6 @@ StdBattleTextBox::
ret
GetBattleAnimPointer::
-
ld a, BANK(BattleAnimations)
rst Bankswitch
@@ -212,7 +196,6 @@ GetBattleAnimPointer::
ret
GetBattleAnimByte::
-
push hl
push de
diff --git a/home/copy.asm b/home/copy.asm
index 65be3895a..68ed240e3 100644
--- a/home/copy.asm
+++ b/home/copy.asm
@@ -1,6 +1,5 @@
; Functions to copy data from ROM.
-
Get2bpp_2::
ld a, [rLCDC]
bit rLCDC_ENABLE, a
@@ -94,14 +93,10 @@ OldDMATransfer::
ld [hBGMapMode], a
ret
-
-
ReplaceKrisSprite::
farcall _ReplaceKrisSprite
ret
-
-
LoadStandardFont::
farcall _LoadStandardFont
ret
@@ -110,8 +105,6 @@ LoadFontsBattleExtra::
farcall _LoadFontsBattleExtra
ret
-
-
LoadFontsExtra::
farcall _LoadFontsExtra1
farcall _LoadFontsExtra2
@@ -139,8 +132,6 @@ DecompressRequest2bpp::
call CloseSRAM
ret
-
-
FarCopyBytes::
; copy bc bytes from a:hl to de
@@ -156,7 +147,6 @@ FarCopyBytes::
rst Bankswitch
ret
-
FarCopyBytesDouble::
; Copy bc bytes from a:hl to bc*2 bytes at de,
; doubling each byte in the process.
@@ -194,7 +184,6 @@ FarCopyBytesDouble::
rst Bankswitch
ret
-
Request2bpp::
; Load 2bpp at b:de to occupy c tiles of hl.
ld a, [hBGMapMode]
@@ -269,7 +258,6 @@ Request2bpp::
ld c, a
jr .loop
-
Request1bpp::
; Load 1bpp at b:de to occupy c tiles of hl.
ld a, [hBGMapMode]
@@ -344,7 +332,6 @@ Request1bpp::
ld c, a
jr .loop
-
Get2bpp::
ld a, [rLCDC]
bit rLCDC_ENABLE, a
@@ -374,7 +361,6 @@ Copy2bpp::
jp FarCopyBytes
-
Get1bpp::
ld a, [rLCDC]
bit rLCDC_ENABLE, a
diff --git a/home/decompress.asm b/home/decompress.asm
index 104fa0e30..d4bab7a6a 100644
--- a/home/decompress.asm
+++ b/home/decompress.asm
@@ -13,17 +13,14 @@ FarDecompress::
rst Bankswitch
ret
-
Decompress::
; Pokemon Crystal uses an lz variant for compression.
; This is mainly (but not necessarily) used for graphics.
; This function decompresses lz-compressed data from hl to de.
-
LZ_END EQU $ff ; Compressed data is terminated with $ff.
-
; A typical control command consists of:
LZ_CMD EQU %11100000 ; command id (bits 5-7)
@@ -31,7 +28,6 @@ LZ_LEN EQU %00011111 ; length n (bits 0-4)
; Additional parameters are read during command execution.
-
; Commands:
LZ_LITERAL EQU 0 << 5 ; Read literal data for n bytes.
@@ -39,7 +35,6 @@ LZ_ITERATE EQU 1 << 5 ; Write the same byte for n bytes.
LZ_ALTERNATE EQU 2 << 5 ; Alternate two bytes for n bytes.
LZ_ZERO EQU 3 << 5 ; Write 0 for n bytes.
-
; Another class of commands reuses data from the decompressed output.
LZ_RW EQU 2 + 5 ; bit
@@ -52,7 +47,6 @@ LZ_REPEAT EQU 4 << 5 ; Repeat n bytes from the offset.
LZ_FLIP EQU 5 << 5 ; Repeat n bitflipped bytes.
LZ_REVERSE EQU 6 << 5 ; Repeat n bytes in reverse.
-
; If the value in the count needs to be larger than 5 bits,
; LZ_LONG can be used to expand the count to 10 bits.
LZ_LONG EQU 7 << 5
@@ -67,10 +61,8 @@ LZ_LONG_HI EQU %00000011
; x: the new control command
; y: the length
-
; For more information, refer to the code below and in extras/gfx.py.
-
; Save the output address
; for rewrite commands.
ld a, e
@@ -112,7 +104,6 @@ LZ_LONG_HI EQU %00000011
inc bc
jr .command
-
.short
push af
@@ -124,7 +115,6 @@ LZ_LONG_HI EQU %00000011
; read at least 1 byte
inc c
-
.command
; Increment loop counts.
; We bail the moment they hit 0.
@@ -143,7 +133,6 @@ LZ_LONG_HI EQU %00000011
cp LZ_ZERO
jr z, .Zero
-
.Literal:
; Read literal data for bc bytes.
.lloop
@@ -158,7 +147,6 @@ LZ_LONG_HI EQU %00000011
inc de
jr .lloop
-
.Iter:
; Write the same byte for bc bytes.
ld a, [hli]
@@ -174,7 +162,6 @@ LZ_LONG_HI EQU %00000011
inc de
jr .iloop
-
.Alt:
; Alternate two bytes for bc bytes.
dec c
@@ -204,7 +191,6 @@ LZ_LONG_HI EQU %00000011
inc hl
jr .Main
-
.Zero:
; Write 0 for bc bytes.
xor a
@@ -220,7 +206,6 @@ LZ_LONG_HI EQU %00000011
inc de
jr .zloop
-
.rewrite
; Repeat decompressed data from output.
push hl
@@ -274,7 +259,6 @@ LZ_LONG_HI EQU %00000011
; More practically, LZ_LONG is not recursive.
; For now, it defaults to LZ_REPEAT.
-
.Repeat:
; Copy decompressed data for bc bytes.
dec c
@@ -288,7 +272,6 @@ LZ_LONG_HI EQU %00000011
inc de
jr .Repeat
-
.Flip:
; Copy bitflipped decompressed data for bc bytes.
dec c
@@ -314,7 +297,6 @@ LZ_LONG_HI EQU %00000011
inc de
jr .Flip
-
.Reverse:
; Copy reversed decompressed data for bc bytes.
dec c
@@ -329,7 +311,6 @@ LZ_LONG_HI EQU %00000011
inc de
jr .Reverse
-
.donerw
pop hl
diff --git a/home/delay.asm b/home/delay.asm
index 7d3e05c03..4ad25ef21 100644
--- a/home/delay.asm
+++ b/home/delay.asm
@@ -11,7 +11,6 @@ DelayFrame::
jr nz, .halt
ret
-
DelayFrames::
; Wait c frames
call DelayFrame
diff --git a/home/fade.asm b/home/fade.asm
index 9b0d10134..56f0197e6 100644
--- a/home/fade.asm
+++ b/home/fade.asm
@@ -1,6 +1,5 @@
; Functions to fade the screen in and out.
-
Unreferenced_Function48c::
; TimeOfDayFade
ld a, [wTimeOfDayPal]
@@ -21,7 +20,6 @@ Unreferenced_Function48c::
ld [rOBP1], a
ret
-
RotateFourPalettesRight::
ld a, [hCGB]
and a
@@ -106,7 +104,6 @@ RotatePalettesLeft::
jr nz, RotatePalettesLeft
ret
-
IncGradGBPalTable_00:: db %11111111, %11111111, %11111111
IncGradGBPalTable_01:: db %11111110, %11111110, %11111110
IncGradGBPalTable_02:: db %11111001, %11111001, %11111001
diff --git a/home/farcall.asm b/home/farcall.asm
index 25b3cd007..cb87b1774 100644
--- a/home/farcall.asm
+++ b/home/farcall.asm
@@ -14,7 +14,6 @@ FarCall_de::
push de
ret
-
FarCall_hl::
; Call a:hl.
; Preserves other registers.
diff --git a/home/flag.asm b/home/flag.asm
index 796c19880..411f04184 100644
--- a/home/flag.asm
+++ b/home/flag.asm
@@ -24,7 +24,6 @@ ResetFlashIfOutOfCave::
res STATUSFLAGS_FLASH_F, [hl]
ret
-
EventFlagAction::
ld hl, wEventFlags
call FlagAction
@@ -97,7 +96,6 @@ FlagAction::
ld [hl], a
ret
-
CheckReceivedDex::
ld de, ENGINE_POKEDEX
ld b, CHECK_FLAG
diff --git a/home/game_time.asm b/home/game_time.asm
index 61cff0a16..0300db73d 100644
--- a/home/game_time.asm
+++ b/home/game_time.asm
@@ -8,9 +8,7 @@ ResetGameTime::
ld [wGameTimeFrames], a
ret
-
GameTimer::
-
nop
ld a, [rSVBK]
@@ -24,12 +22,10 @@ GameTimer::
ld [rSVBK], a
ret
-
UpdateGameTimer::
; Increment the game timer by one frame.
; The game timer is capped at 999:59:59.00.
-
; Don't update if game logic is paused.
ld a, [wGameLogicPaused]
and a
@@ -45,7 +41,6 @@ UpdateGameTimer::
bit 0, [hl]
ret nz
-
; +1 frame
ld hl, wGameTimeFrames
ld a, [hl]
@@ -57,7 +52,6 @@ UpdateGameTimer::
ld [hl], a
ret
-
.second
xor a
ld [hl], a
@@ -73,7 +67,6 @@ UpdateGameTimer::
ld [hl], a
ret
-
.minute
xor a
ld [hl], a
@@ -89,7 +82,6 @@ UpdateGameTimer::
ld [hl], a
ret
-
.hour
xor a
ld [hl], a
@@ -101,7 +93,6 @@ UpdateGameTimer::
ld l, a
inc hl
-
; Cap the timer after 1000 hours.
ld a, h
cp HIGH(1000)
@@ -119,7 +110,6 @@ UpdateGameTimer::
ld [wGameTimeSeconds], a
ret
-
.ok
ld a, h
ld [wGameTimeHours], a
diff --git a/home/init.asm b/home/init.asm
index 5496ba45f..dc1f538be 100644
--- a/home/init.asm
+++ b/home/init.asm
@@ -18,7 +18,6 @@ Reset::
jr Init
-
_Start::
cp $11
jr z, .cgb
@@ -33,9 +32,7 @@ _Start::
ld a, $1
ld [hSystemBooted], a
-
Init::
-
di
xor a
@@ -100,7 +97,6 @@ Init::
call ClearSprites
call ClearsScratch
-
ld a, BANK(WriteOAMDMACodeToHRAM)
rst Bankswitch
@@ -171,7 +167,6 @@ Init::
ld [wMapMusic], a
jp GameInit
-
ClearVRAM::
; Wipe VRAM banks 0 and 1
diff --git a/home/joypad.asm b/home/joypad.asm
index 5b11002c7..87fc60d7e 100644
--- a/home/joypad.asm
+++ b/home/joypad.asm
@@ -102,7 +102,6 @@ endr
ret
-
GetJoypad::
; Update mirror joypad input from hJoypadDown (real input)
@@ -190,7 +189,6 @@ GetJoypad::
rst Bankswitch
jr .quit
-
.updateauto
; An input of $ff will end the stream.
ld a, [hli]
@@ -230,7 +228,6 @@ GetJoypad::
ld [hJoyDown], a ; input
jr .quit
-
StartAutoInput::
; Start reading automated input stream at a:hl.
@@ -252,7 +249,6 @@ StartAutoInput::
ld [wInputType], a
ret
-
StopAutoInput::
; Clear variables related to automated input.
xor a
@@ -264,7 +260,6 @@ StopAutoInput::
ld [wInputType], a
ret
-
JoyTitleScreenInput::
.loop
@@ -292,7 +287,6 @@ JoyTitleScreenInput::
scf
ret
-
JoyWaitAorB::
.loop
call DelayFrame
diff --git a/home/lcd.asm b/home/lcd.asm
index ecac5b5c3..7ea53d453 100644
--- a/home/lcd.asm
+++ b/home/lcd.asm
@@ -1,6 +1,5 @@
; LCD handling
-
Unreferenced_Function547::
ld a, [hLCDCPointer]
cp rSCX - $ff00
@@ -10,7 +9,6 @@ Unreferenced_Function547::
ld [$ff00+c], a
ret
-
LCD::
push af
ld a, [hLCDCPointer]
@@ -34,7 +32,6 @@ LCD::
pop af
reti
-
DisableLCD::
; Turn the LCD off
@@ -68,7 +65,6 @@ DisableLCD::
ld [rIE], a
ret
-
EnableLCD::
ld a, [rLCDC]
set rLCDC_ENABLE, a
diff --git a/home/map.asm b/home/map.asm
index 416b2f51a..550486081 100644
--- a/home/map.asm
+++ b/home/map.asm
@@ -757,7 +757,6 @@ ChangeMap::
ret
FillMapConnections::
-
; North
ld a, [wNorthConnectedMapGroup]
cp $ff
@@ -855,7 +854,6 @@ FillMapConnections::
FillNorthConnectionStrip::
FillSouthConnectionStrip::
-
ld c, 3
.y
push de
@@ -890,7 +888,6 @@ FillSouthConnectionStrip::
FillWestConnectionStrip::
FillEastConnectionStrip::
-
.loop
ld a, [wMapWidth]
add 6
@@ -1646,9 +1643,9 @@ GetMovementPermissions::
.CheckHiNybble:
and $f0
- cp $b0
+ cp HI_NYBBLE_SIDE_WALLS
ret z
- cp $c0
+ cp HI_NYBBLE_UNUSED_C0
ret
GetFacingTileCoord::
diff --git a/home/math.asm b/home/math.asm
index 4a1711343..f385ccbf8 100644
--- a/home/math.asm
+++ b/home/math.asm
@@ -23,7 +23,6 @@ SimpleMultiply::
pop bc
ret
-
SimpleDivide::
; Divide a by c. Return quotient b and remainder a.
ld b, 0
@@ -35,7 +34,6 @@ SimpleDivide::
add c
ret
-
Multiply::
; Multiply hMultiplicand (3 bytes) by hMultiplier. Result in hProduct.
; All values are big endian.
@@ -48,7 +46,6 @@ Multiply::
pop hl
ret
-
Divide::
; Divide hDividend length b (max 4 bytes) by hDivisor. Result in hQuotient.
; All values are big endian.
@@ -61,7 +58,6 @@ Divide::
pop hl
ret
-
SubtractSigned::
; Return a - b, sign in carry.
sub b
diff --git a/home/menu.asm b/home/menu.asm
index dd8442cb7..d10b6e936 100644
--- a/home/menu.asm
+++ b/home/menu.asm
@@ -1,6 +1,5 @@
; Functions used in displaying and handling menus.
-
LoadMenuHeader::
call CopyMenuHeader
call PushWindow
@@ -18,7 +17,6 @@ StoreTo_wMenuCursorBuffer::
ld [wMenuCursorBuffer], a
ret
-
MenuTextBox::
push hl
call LoadMenuTextBox
@@ -109,7 +107,6 @@ CopyNameFromMenu::
pop hl
ret
-
YesNoBox::
lb bc, SCREEN_WIDTH - 6, 7
@@ -330,7 +327,6 @@ InitMenuCursorAndButtonPermissions::
.disallow_left_right
ret
-
GetScrollingMenuJoypad::
call ScrollingMenuJoypad
ld hl, wMenuJoypadFilter
@@ -495,7 +491,6 @@ MenuClickSound::
pop af
ret
-
PlayClickSFX::
push de
ld de, SFX_READ_TEXT_2
diff --git a/home/menu_window.asm b/home/menu_window.asm
index 49536d5f0..7c511097d 100644
--- a/home/menu_window.asm
+++ b/home/menu_window.asm
@@ -187,14 +187,12 @@ ClearWholeMenuBox::
call ClearBox
ret
-
MenuBoxCoord2Tile::
ld a, [wMenuBorderLeftCoord]
ld c, a
ld a, [wMenuBorderTopCoord]
ld b, a
-
Coord2Tile::
; Return the address of wTileMap(c, b) in hl.
xor a
diff --git a/home/mobile.asm b/home/mobile.asm
index c27012098..21af7a73b 100644
--- a/home/mobile.asm
+++ b/home/mobile.asm
@@ -65,7 +65,6 @@ MobileReceive::
ret
-
Timer::
push af
push bc
diff --git a/home/movement.asm b/home/movement.asm
index fe36511c5..2c19b6355 100644
--- a/home/movement.asm
+++ b/home/movement.asm
@@ -190,4 +190,3 @@ HideCursor::
ld l, a
ld [hl], " "
ret
-
diff --git a/home/names.asm b/home/names.asm
index cbe21b821..e9c36fc1d 100644
--- a/home/names.asm
+++ b/home/names.asm
@@ -109,7 +109,6 @@ GetBasePokemonName::
pop hl
ret
-
GetPokemonName::
; Get Pokemon name wd265.
diff --git a/home/palettes.asm b/home/palettes.asm
index 09858145a..d5b6abff5 100644
--- a/home/palettes.asm
+++ b/home/palettes.asm
@@ -1,6 +1,5 @@
; Functions dealing with palettes.
-
UpdatePalsIfCGB::
; update bgp data from wBGPals2
; update obp data from wOBPals2
@@ -11,7 +10,6 @@ UpdatePalsIfCGB::
and a
ret z
-
UpdateCGBPals::
; return carry if successful
; any pals to update?
@@ -19,9 +17,7 @@ UpdateCGBPals::
and a
ret z
-
ForceUpdateCGBPals::
-
ld a, [rSVBK]
push af
ld a, BANK(wBGPals2)
@@ -69,7 +65,6 @@ endr
scf
ret
-
DmgToCgbBGPals::
; exists to forego reinserting cgb-converted image data
@@ -114,7 +109,6 @@ DmgToCgbBGPals::
pop af
ret
-
DmgToCgbObjPals::
; exists to forego reinserting cgb-converted image data
@@ -159,7 +153,6 @@ DmgToCgbObjPals::
pop hl
ret
-
DmgToCgbObjPal0::
ld [rOBP0], a
push af
@@ -235,8 +228,6 @@ DmgToCgbObjPal1::
pop af
ret
-
-
CopyPals::
; copy c palettes in order b from de to hl
@@ -289,7 +280,6 @@ endr
jr nz, CopyPals
ret
-
ClearVBank1::
ld a, [hCGB]
and a
@@ -307,11 +297,9 @@ ClearVBank1::
ld [rVBK], a
ret
-
ret_d90::
ret
-
ReloadSpritesNoPalettes::
ld a, [hCGB]
and a
@@ -331,7 +319,6 @@ ReloadSpritesNoPalettes::
call DelayFrame
ret
-
FarCallSwapTextboxPalettes::
homecall SwapTextboxPalettes
ret
diff --git a/home/random.asm b/home/random.asm
index 0ee1c50f2..e436e4ff6 100644
--- a/home/random.asm
+++ b/home/random.asm
@@ -47,7 +47,6 @@ BattleRandom::
ld a, [wPredefTemp + 1]
ret
-
RandomRange::
; Return a random number between 0 and a (non-inclusive).
diff --git a/home/text.asm b/home/text.asm
index ceb249c4e..d74af02af 100644
--- a/home/text.asm
+++ b/home/text.asm
@@ -19,7 +19,6 @@ FillBoxWithByte::
jr nz, .row
ret
-
ClearTileMap::
; Fill wTileMap with blank tiles.
@@ -34,7 +33,6 @@ ClearTileMap::
ret z
jp WaitBGMap
-
ClearScreen::
ld a, PAL_BG_TEXT
hlcoord 0, 0, wAttrMap
@@ -42,7 +40,6 @@ ClearScreen::
call ByteFill
jr ClearTileMap
-
TextBox::
; Draw a text box at hl with room for b lines of c characters each.
; Places a border around the textbox, then switches the palette to the
@@ -54,9 +51,7 @@ TextBox::
pop bc
jr TextBoxPalette
-
TextBoxBorder::
-
; Top
push hl
ld a, "┌"
@@ -102,7 +97,6 @@ TextBoxBorder::
jr nz, .loop
ret
-
TextBoxPalette::
; Fill text box width c height b at hl with pal 7
ld de, wAttrMap - wTileMap
@@ -127,7 +121,6 @@ TextBoxPalette::
jr nz, .col
ret
-
SpeechTextBox::
; Standard textbox.
hlcoord TEXTBOX_X, TEXTBOX_Y
@@ -144,7 +137,6 @@ RadioTerminator::
ret
.stop db "@"
-
PrintText::
call SetUpTextBox
BuenaPrintText::
@@ -167,7 +159,6 @@ SetUpTextBox::
pop hl
ret
-
PlaceString::
push hl
@@ -285,14 +276,12 @@ ENDM
call PrintLetterDelay
jp NextChar
-
DayOfWeekChar::
ld c, l
ld b, h
farcall Function17f036
jp PlaceNextChar
-
print_name: MACRO
push de
ld de, \1
@@ -318,7 +307,6 @@ PlaceJPRoute: print_name PlaceJPRouteText
PlaceWatashi: print_name PlaceWatashiText
PlaceKokoWa: print_name PlaceKokoWaText
-
PlaceMoveTargetsName::
ld a, [hBattleTurn]
xor 1
@@ -343,7 +331,6 @@ PlaceMoveUsersName::
ld de, wEnemyMonNick
jr PlaceCommandCharacter
-
PlaceEnemysName::
push de
@@ -377,7 +364,6 @@ PlaceEnemysName::
ld de, wOTClassName
jr PlaceCommandCharacter
-
PlaceGenderedPlayerName::
push de
ld de, wPlayerName
@@ -391,7 +377,6 @@ PlaceGenderedPlayerName::
ld de, ChanSuffixText
jr PlaceCommandCharacter
-
PlaceCommandCharacter::
call PlaceString
ld h, b
@@ -472,7 +457,6 @@ TextFar::
push hl
jp NextChar
-
LineChar::
pop hl
hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY + 2
@@ -502,7 +486,6 @@ Paragraph::
pop de
jp NextChar
-
_ContText::
ld a, [wLinkMode]
or a
@@ -529,7 +512,6 @@ _ContTextNoPause::
pop de
jp NextChar
-
ContText::
push de
ld de, .cont
@@ -543,7 +525,6 @@ ContText::
.cont: db "<_CONT>@"
-
PlaceDexEnd::
; Ends a Pokédex entry in Gen 1.
; Dex entries are now regular strings.
@@ -661,7 +642,6 @@ PokeFluteTerminatorCharacter::
.stop: db "@"
-
PlaceHLTextAtBC::
ld a, [wTextBoxFlags]
push af
diff --git a/home/time.asm b/home/time.asm
index abac80e76..caf857a68 100644
--- a/home/time.asm
+++ b/home/time.asm
@@ -1,6 +1,5 @@
; Functions relating to the timer interrupt and the real-time-clock.
-
AskTimer::
push af
ld a, [hMobile]
@@ -12,7 +11,6 @@ AskTimer::
pop af
reti
-
LatchClock::
; latch clock counter data
ld a, 0
@@ -21,7 +19,6 @@ LatchClock::
ld [MBC3LatchClock], a
ret
-
UpdateTime::
call GetClock
call FixDays
@@ -29,7 +26,6 @@ UpdateTime::
farcall GetTimeOfDay
ret
-
GetClock::
; store clock data in hRTCDayHi-hRTCSeconds
@@ -70,7 +66,6 @@ GetClock::
call CloseSRAM
ret
-
FixDays::
; fix day count
; mod by 140
@@ -131,7 +126,6 @@ FixDays::
xor a
ret
-
FixTime::
; add ingame time (set at newgame) to current time
; day hr min sec
@@ -202,8 +196,6 @@ InitTime::
farcall _InitTime
ret
-
-
PanicResetClock::
call .ClearhRTC
call SetClock
@@ -218,7 +210,6 @@ PanicResetClock::
ld [hRTCDayHi], a
ret
-
SetClock::
; set clock data from hram
@@ -266,7 +257,6 @@ SetClock::
call CloseSRAM ; unlatch clock, disable clock r/w
ret
-
ClearRTCStatus::
; clear sRTCStatusFlags
xor a
diff --git a/home/trainers.asm b/home/trainers.asm
index e9c1c7167..5def6cf17 100644
--- a/home/trainers.asm
+++ b/home/trainers.asm
@@ -20,7 +20,6 @@ CheckTrainerBattle::
.loop
; Start a battle if the object:
-
push af
push de
@@ -128,7 +127,6 @@ LoadTrainer_continue::
ret
FacingPlayerDistance_bc::
-
push de
call FacingPlayerDistance
ld b, d
diff --git a/home/vblank.asm b/home/vblank.asm
index 3ae030ace..5e87dbcdf 100644
--- a/home/vblank.asm
+++ b/home/vblank.asm
@@ -6,7 +6,6 @@
; This prevents the display and audio output from lagging.
-
VBlank::
push af
push bc
@@ -45,7 +44,6 @@ VBlank::
dw VBlank6
dw VBlank0 ; just in case
-
VBlank0::
; normal operation
@@ -114,7 +112,6 @@ VBlank0::
call hTransferVirtualOAM
.done_oam
-
; vblank-sensitive operations are done
xor a
@@ -147,7 +144,6 @@ VBlank0::
ret
-
VBlank2::
; sound only
@@ -165,7 +161,6 @@ VBlank2::
ld [wVBlankOccurred], a
ret
-
VBlank1::
; scx, scy
; palettes
@@ -232,7 +227,6 @@ VBlank1::
ld [rIF], a
ret
-
UpdatePals::
; update pals for either dmg or cgb
@@ -251,7 +245,6 @@ UpdatePals::
and a
ret
-
VBlank3::
; scx, scy
; palettes
@@ -316,7 +309,6 @@ VBlank3::
ld [rIF], a
ret
-
VBlank4::
; bg map
; tiles
@@ -348,7 +340,6 @@ VBlank4::
rst Bankswitch
ret
-
VBlank5::
; scx
; palettes
@@ -397,7 +388,6 @@ VBlank5::
ld [rIE], a
ret
-
VBlank6::
; palettes
; tiles
diff --git a/home/video.asm b/home/video.asm
index 434783ba1..4b519fca0 100644
--- a/home/video.asm
+++ b/home/video.asm
@@ -17,7 +17,6 @@ DMATransfer::
scf
ret
-
UpdateBGMapBuffer::
; Copy [hBGMapTileCount] 16x8 tiles from wBGMapBuffer
; to bg map addresses in wBGMapBufferPtrs.
@@ -42,7 +41,6 @@ UpdateBGMapBuffer::
ld hl, wBGMapPalBuffer
ld de, wBGMapBuffer
-
.next
; Copy a pair of 16x8 blocks (one 16x16 block)
@@ -82,7 +80,6 @@ endr
jr nz, .next
-
ld a, [hSPBuffer]
ld l, a
ld a, [hSPBuffer + 1]
@@ -97,7 +94,6 @@ endr
scf
ret
-
WaitTop::
; Wait until the top third of the BG Map is being updated.
@@ -117,7 +113,6 @@ WaitTop::
ld [hBGMapMode], a
ret
-
UpdateBGMap::
; Update the BG Map, in thirds, from wTileMap and wAttrMap.
@@ -160,7 +155,6 @@ UpdateBGMap::
ld [hBGMapAddress + 1], a
ret
-
.Attr:
ld a, 1
ld [rVBK], a
@@ -172,11 +166,9 @@ UpdateBGMap::
ld [rVBK], a
ret
-
.Tiles:
hlcoord 0, 0
-
.update
ld [hSPBuffer], sp
@@ -188,10 +180,8 @@ UpdateBGMap::
jr z, .middle
; 2
-
THIRD_HEIGHT EQU SCREEN_HEIGHT / 3
-
.bottom
ld de, 2 * THIRD_HEIGHT * SCREEN_WIDTH
add hl, de
@@ -209,7 +199,6 @@ THIRD_HEIGHT EQU SCREEN_HEIGHT / 3
xor a
jr .start
-
.middle
ld de, THIRD_HEIGHT * SCREEN_WIDTH
add hl, de
@@ -227,7 +216,6 @@ THIRD_HEIGHT EQU SCREEN_HEIGHT / 3
ld a, 2
jr .start
-
.top
ld sp, hl
@@ -239,7 +227,6 @@ THIRD_HEIGHT EQU SCREEN_HEIGHT / 3
; Next time: middle third
ld a, 1
-
.start
; Which third to update next time
ld [hBGMapThird], a
@@ -250,7 +237,6 @@ THIRD_HEIGHT EQU SCREEN_HEIGHT / 3
; Discrepancy between wTileMap and BGMap
ld bc, BG_MAP_WIDTH - (SCREEN_WIDTH - 1)
-
.row
; Copy a row of 20 tiles
rept SCREEN_WIDTH / 2 - 1
@@ -269,7 +255,6 @@ endr
dec a
jr nz, .row
-
ld a, [hSPBuffer]
ld l, a
ld a, [hSPBuffer + 1]
@@ -277,7 +262,6 @@ endr
ld sp, hl
ret
-
Serve1bppRequest::
; Only call during the first fifth of VBlank
@@ -342,7 +326,6 @@ endr
dec b
jr nz, .next
-
ld a, l
ld [wRequested1bppDest], a
ld a, h
@@ -357,7 +340,6 @@ endr
ld sp, hl
ret
-
Serve2bppRequest::
; Only call during the first fifth of VBlank
@@ -373,9 +355,7 @@ Serve2bppRequest::
ret nc
jr _Serve2bppRequest
-
Serve2bppRequest_VBlank::
-
ld a, [wRequested2bpp]
and a
ret z
@@ -423,7 +403,6 @@ endr
dec b
jr nz, .next
-
ld a, l
ld [wRequested2bppDest], a
ld a, h
@@ -438,7 +417,6 @@ endr
ld sp, hl
ret
-
AnimateTileset::
; Only call during the first fifth of VBlank
diff --git a/home/window.asm b/home/window.asm
index f288e4eec..6d9bd5311 100644
--- a/home/window.asm
+++ b/home/window.asm
@@ -13,7 +13,6 @@ RefreshScreen::
rst Bankswitch
ret
-
CloseText::
ld a, [hOAMUpdate]
push af