Fix triple newlines left over from removing address comments
This commit is contained in:
@@ -25,7 +25,6 @@ MapSetup_Sound_Off::
|
||||
pop hl
|
||||
ret
|
||||
|
||||
|
||||
UpdateSound::
|
||||
|
||||
push hl
|
||||
@@ -51,7 +50,6 @@ UpdateSound::
|
||||
pop hl
|
||||
ret
|
||||
|
||||
|
||||
_LoadMusicByte::
|
||||
; wCurMusicByte = [a:de]
|
||||
GLOBAL LoadMusicByte
|
||||
@@ -67,7 +65,6 @@ GLOBAL LoadMusicByte
|
||||
ld [MBC3RomBank], a
|
||||
ret
|
||||
|
||||
|
||||
PlayMusic::
|
||||
; Play music de.
|
||||
|
||||
@@ -102,7 +99,6 @@ PlayMusic::
|
||||
pop hl
|
||||
ret
|
||||
|
||||
|
||||
PlayMusic2::
|
||||
; Stop playing music, then play music de.
|
||||
|
||||
@@ -135,7 +131,6 @@ PlayMusic2::
|
||||
ret
|
||||
|
||||
|
||||
|
||||
PlayCry::
|
||||
; Play cry de.
|
||||
|
||||
@@ -187,7 +182,6 @@ endr
|
||||
pop hl
|
||||
ret
|
||||
|
||||
|
||||
PlaySFX::
|
||||
; Play sound effect de.
|
||||
; Sound effects are ordered by priority (highest to lowest)
|
||||
@@ -228,13 +222,11 @@ PlaySFX::
|
||||
pop hl
|
||||
ret
|
||||
|
||||
|
||||
WaitPlaySFX::
|
||||
call WaitSFX
|
||||
call PlaySFX
|
||||
ret
|
||||
|
||||
|
||||
WaitSFX::
|
||||
; infinite loop until sfx is done playing
|
||||
|
||||
@@ -545,7 +537,6 @@ TerminateExpBarSound::
|
||||
ld [rNR14], a
|
||||
ret
|
||||
|
||||
|
||||
ChannelsOff::
|
||||
; Quickly turn off music channels
|
||||
xor a
|
||||
|
@@ -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,7 +141,6 @@ FarCopyRadioText::
|
||||
ld [MBC3RomBank], a
|
||||
ret
|
||||
|
||||
|
||||
MobileTextBorder::
|
||||
|
||||
CELL_PHONE_TOP EQU $5e
|
||||
@@ -168,7 +159,6 @@ CELL_PHONE_BOTTOM EQU $5f
|
||||
ld [hl], CELL_PHONE_BOTTOM
|
||||
ret
|
||||
|
||||
|
||||
BattleTextBox::
|
||||
; Open a textbox and print text at hl.
|
||||
push hl
|
||||
@@ -180,7 +170,6 @@ BattleTextBox::
|
||||
call PrintTextBoxText
|
||||
ret
|
||||
|
||||
|
||||
StdBattleTextBox::
|
||||
; Open a textbox and print battle text at 20:hl.
|
||||
|
||||
|
@@ -1,6 +1,5 @@
|
||||
; Functions to copy data from ROM.
|
||||
|
||||
|
||||
Get2bpp_2::
|
||||
ld a, [rLCDC]
|
||||
bit rLCDC_ENABLE, a
|
||||
@@ -95,13 +94,11 @@ OldDMATransfer::
|
||||
ret
|
||||
|
||||
|
||||
|
||||
ReplaceKrisSprite::
|
||||
farcall _ReplaceKrisSprite
|
||||
ret
|
||||
|
||||
|
||||
|
||||
LoadStandardFont::
|
||||
farcall _LoadStandardFont
|
||||
ret
|
||||
@@ -111,7 +108,6 @@ LoadFontsBattleExtra::
|
||||
ret
|
||||
|
||||
|
||||
|
||||
LoadFontsExtra::
|
||||
farcall _LoadFontsExtra1
|
||||
farcall _LoadFontsExtra2
|
||||
@@ -140,7 +136,6 @@ DecompressRequest2bpp::
|
||||
ret
|
||||
|
||||
|
||||
|
||||
FarCopyBytes::
|
||||
; copy bc bytes from a:hl to de
|
||||
|
||||
@@ -156,7 +151,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 +188,6 @@ FarCopyBytesDouble::
|
||||
rst Bankswitch
|
||||
ret
|
||||
|
||||
|
||||
Request2bpp::
|
||||
; Load 2bpp at b:de to occupy c tiles of hl.
|
||||
ld a, [hBGMapMode]
|
||||
@@ -269,7 +262,6 @@ Request2bpp::
|
||||
ld c, a
|
||||
jr .loop
|
||||
|
||||
|
||||
Request1bpp::
|
||||
; Load 1bpp at b:de to occupy c tiles of hl.
|
||||
ld a, [hBGMapMode]
|
||||
@@ -344,7 +336,6 @@ Request1bpp::
|
||||
ld c, a
|
||||
jr .loop
|
||||
|
||||
|
||||
Get2bpp::
|
||||
ld a, [rLCDC]
|
||||
bit rLCDC_ENABLE, a
|
||||
@@ -374,7 +365,6 @@ Copy2bpp::
|
||||
|
||||
jp FarCopyBytes
|
||||
|
||||
|
||||
Get1bpp::
|
||||
ld a, [rLCDC]
|
||||
bit rLCDC_ENABLE, a
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -11,7 +11,6 @@ DelayFrame::
|
||||
jr nz, .halt
|
||||
ret
|
||||
|
||||
|
||||
DelayFrames::
|
||||
; Wait c frames
|
||||
call DelayFrame
|
||||
|
@@ -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
|
||||
|
@@ -14,7 +14,6 @@ FarCall_de::
|
||||
push de
|
||||
ret
|
||||
|
||||
|
||||
FarCall_hl::
|
||||
; Call a:hl.
|
||||
; Preserves other registers.
|
||||
|
@@ -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
|
||||
|
@@ -8,7 +8,6 @@ ResetGameTime::
|
||||
ld [wGameTimeFrames], a
|
||||
ret
|
||||
|
||||
|
||||
GameTimer::
|
||||
|
||||
nop
|
||||
@@ -24,12 +23,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 +42,6 @@ UpdateGameTimer::
|
||||
bit 0, [hl]
|
||||
ret nz
|
||||
|
||||
|
||||
; +1 frame
|
||||
ld hl, wGameTimeFrames
|
||||
ld a, [hl]
|
||||
@@ -57,7 +53,6 @@ UpdateGameTimer::
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
|
||||
.second
|
||||
xor a
|
||||
ld [hl], a
|
||||
@@ -73,7 +68,6 @@ UpdateGameTimer::
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
|
||||
.minute
|
||||
xor a
|
||||
ld [hl], a
|
||||
@@ -89,7 +83,6 @@ UpdateGameTimer::
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
|
||||
.hour
|
||||
xor a
|
||||
ld [hl], a
|
||||
@@ -101,7 +94,6 @@ UpdateGameTimer::
|
||||
ld l, a
|
||||
inc hl
|
||||
|
||||
|
||||
; Cap the timer after 1000 hours.
|
||||
ld a, h
|
||||
cp HIGH(1000)
|
||||
@@ -119,7 +111,6 @@ UpdateGameTimer::
|
||||
ld [wGameTimeSeconds], a
|
||||
ret
|
||||
|
||||
|
||||
.ok
|
||||
ld a, h
|
||||
ld [wGameTimeHours], a
|
||||
|
@@ -18,7 +18,6 @@ Reset::
|
||||
|
||||
jr Init
|
||||
|
||||
|
||||
_Start::
|
||||
cp $11
|
||||
jr z, .cgb
|
||||
@@ -33,7 +32,6 @@ _Start::
|
||||
ld a, $1
|
||||
ld [hSystemBooted], a
|
||||
|
||||
|
||||
Init::
|
||||
|
||||
di
|
||||
@@ -100,7 +98,6 @@ Init::
|
||||
call ClearSprites
|
||||
call ClearsScratch
|
||||
|
||||
|
||||
ld a, BANK(WriteOAMDMACodeToHRAM)
|
||||
rst Bankswitch
|
||||
|
||||
@@ -171,7 +168,6 @@ Init::
|
||||
ld [wMapMusic], a
|
||||
jp GameInit
|
||||
|
||||
|
||||
ClearVRAM::
|
||||
; Wipe VRAM banks 0 and 1
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -65,7 +65,6 @@ MobileReceive::
|
||||
|
||||
ret
|
||||
|
||||
|
||||
Timer::
|
||||
push af
|
||||
push bc
|
||||
|
@@ -109,7 +109,6 @@ GetBasePokemonName::
|
||||
pop hl
|
||||
ret
|
||||
|
||||
|
||||
GetPokemonName::
|
||||
; Get Pokemon name wd265.
|
||||
|
||||
|
@@ -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,7 +17,6 @@ UpdateCGBPals::
|
||||
and a
|
||||
ret z
|
||||
|
||||
|
||||
ForceUpdateCGBPals::
|
||||
|
||||
ld a, [rSVBK]
|
||||
@@ -69,7 +66,6 @@ endr
|
||||
scf
|
||||
ret
|
||||
|
||||
|
||||
DmgToCgbBGPals::
|
||||
; exists to forego reinserting cgb-converted image data
|
||||
|
||||
@@ -114,7 +110,6 @@ DmgToCgbBGPals::
|
||||
pop af
|
||||
ret
|
||||
|
||||
|
||||
DmgToCgbObjPals::
|
||||
; exists to forego reinserting cgb-converted image data
|
||||
|
||||
@@ -159,7 +154,6 @@ DmgToCgbObjPals::
|
||||
pop hl
|
||||
ret
|
||||
|
||||
|
||||
DmgToCgbObjPal0::
|
||||
ld [rOBP0], a
|
||||
push af
|
||||
@@ -236,7 +230,6 @@ DmgToCgbObjPal1::
|
||||
ret
|
||||
|
||||
|
||||
|
||||
CopyPals::
|
||||
; copy c palettes in order b from de to hl
|
||||
|
||||
@@ -289,7 +282,6 @@ endr
|
||||
jr nz, CopyPals
|
||||
ret
|
||||
|
||||
|
||||
ClearVBank1::
|
||||
ld a, [hCGB]
|
||||
and a
|
||||
@@ -307,11 +299,9 @@ ClearVBank1::
|
||||
ld [rVBK], a
|
||||
ret
|
||||
|
||||
|
||||
ret_d90::
|
||||
ret
|
||||
|
||||
|
||||
ReloadSpritesNoPalettes::
|
||||
ld a, [hCGB]
|
||||
and a
|
||||
@@ -331,7 +321,6 @@ ReloadSpritesNoPalettes::
|
||||
call DelayFrame
|
||||
ret
|
||||
|
||||
|
||||
FarCallSwapTextboxPalettes::
|
||||
homecall SwapTextboxPalettes
|
||||
ret
|
||||
|
@@ -47,7 +47,6 @@ BattleRandom::
|
||||
ld a, [wPredefTemp + 1]
|
||||
ret
|
||||
|
||||
|
||||
RandomRange::
|
||||
; Return a random number between 0 and a (non-inclusive).
|
||||
|
||||
|
@@ -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,7 +51,6 @@ TextBox::
|
||||
pop bc
|
||||
jr TextBoxPalette
|
||||
|
||||
|
||||
TextBoxBorder::
|
||||
|
||||
; Top
|
||||
@@ -102,7 +98,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 +122,6 @@ TextBoxPalette::
|
||||
jr nz, .col
|
||||
ret
|
||||
|
||||
|
||||
SpeechTextBox::
|
||||
; Standard textbox.
|
||||
hlcoord TEXTBOX_X, TEXTBOX_Y
|
||||
@@ -144,7 +138,6 @@ RadioTerminator::
|
||||
ret
|
||||
.stop db "@"
|
||||
|
||||
|
||||
PrintText::
|
||||
call SetUpTextBox
|
||||
BuenaPrintText::
|
||||
@@ -167,7 +160,6 @@ SetUpTextBox::
|
||||
pop hl
|
||||
ret
|
||||
|
||||
|
||||
PlaceString::
|
||||
push hl
|
||||
|
||||
@@ -285,14 +277,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 +308,6 @@ PlaceJPRoute: print_name PlaceJPRouteText
|
||||
PlaceWatashi: print_name PlaceWatashiText
|
||||
PlaceKokoWa: print_name PlaceKokoWaText
|
||||
|
||||
|
||||
PlaceMoveTargetsName::
|
||||
ld a, [hBattleTurn]
|
||||
xor 1
|
||||
@@ -343,7 +332,6 @@ PlaceMoveUsersName::
|
||||
ld de, wEnemyMonNick
|
||||
jr PlaceCommandCharacter
|
||||
|
||||
|
||||
PlaceEnemysName::
|
||||
push de
|
||||
|
||||
@@ -377,7 +365,6 @@ PlaceEnemysName::
|
||||
ld de, wOTClassName
|
||||
jr PlaceCommandCharacter
|
||||
|
||||
|
||||
PlaceGenderedPlayerName::
|
||||
push de
|
||||
ld de, wPlayerName
|
||||
@@ -391,7 +378,6 @@ PlaceGenderedPlayerName::
|
||||
ld de, ChanSuffixText
|
||||
jr PlaceCommandCharacter
|
||||
|
||||
|
||||
PlaceCommandCharacter::
|
||||
call PlaceString
|
||||
ld h, b
|
||||
@@ -472,7 +458,6 @@ TextFar::
|
||||
push hl
|
||||
jp NextChar
|
||||
|
||||
|
||||
LineChar::
|
||||
pop hl
|
||||
hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY + 2
|
||||
@@ -502,7 +487,6 @@ Paragraph::
|
||||
pop de
|
||||
jp NextChar
|
||||
|
||||
|
||||
_ContText::
|
||||
ld a, [wLinkMode]
|
||||
or a
|
||||
@@ -529,7 +513,6 @@ _ContTextNoPause::
|
||||
pop de
|
||||
jp NextChar
|
||||
|
||||
|
||||
ContText::
|
||||
push de
|
||||
ld de, .cont
|
||||
@@ -543,7 +526,6 @@ ContText::
|
||||
|
||||
.cont: db "<_CONT>@"
|
||||
|
||||
|
||||
PlaceDexEnd::
|
||||
; Ends a Pokédex entry in Gen 1.
|
||||
; Dex entries are now regular strings.
|
||||
@@ -661,7 +643,6 @@ PokeFluteTerminatorCharacter::
|
||||
|
||||
.stop: db "@"
|
||||
|
||||
|
||||
PlaceHLTextAtBC::
|
||||
ld a, [wTextBoxFlags]
|
||||
push af
|
||||
|
@@ -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
|
||||
@@ -203,7 +197,6 @@ InitTime::
|
||||
ret
|
||||
|
||||
|
||||
|
||||
PanicResetClock::
|
||||
call .ClearhRTC
|
||||
call SetClock
|
||||
@@ -218,7 +211,6 @@ PanicResetClock::
|
||||
ld [hRTCDayHi], a
|
||||
ret
|
||||
|
||||
|
||||
SetClock::
|
||||
; set clock data from hram
|
||||
|
||||
@@ -266,7 +258,6 @@ SetClock::
|
||||
call CloseSRAM ; unlatch clock, disable clock r/w
|
||||
ret
|
||||
|
||||
|
||||
ClearRTCStatus::
|
||||
; clear sRTCStatusFlags
|
||||
xor a
|
||||
|
@@ -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
|
||||
|
@@ -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,7 +355,6 @@ Serve2bppRequest::
|
||||
ret nc
|
||||
jr _Serve2bppRequest
|
||||
|
||||
|
||||
Serve2bppRequest_VBlank::
|
||||
|
||||
ld a, [wRequested2bpp]
|
||||
@@ -423,7 +404,6 @@ endr
|
||||
dec b
|
||||
jr nz, .next
|
||||
|
||||
|
||||
ld a, l
|
||||
ld [wRequested2bppDest], a
|
||||
ld a, h
|
||||
@@ -438,7 +418,6 @@ endr
|
||||
ld sp, hl
|
||||
ret
|
||||
|
||||
|
||||
AnimateTileset::
|
||||
; Only call during the first fifth of VBlank
|
||||
|
||||
|
@@ -13,7 +13,6 @@ RefreshScreen::
|
||||
rst Bankswitch
|
||||
ret
|
||||
|
||||
|
||||
CloseText::
|
||||
ld a, [hOAMUpdate]
|
||||
push af
|
||||
|
Reference in New Issue
Block a user