You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
Use :: to export labels between objects.
This fixes the build.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
; Functions to copy data from ROM.
|
||||
|
||||
|
||||
Functiondc9: ; dc9
|
||||
Functiondc9:: ; dc9
|
||||
ld a, [rLCDC]
|
||||
bit 7, a
|
||||
jp z, Copy2bpp
|
||||
@@ -17,7 +17,7 @@ Functiondc9: ; dc9
|
||||
ret
|
||||
; ddc
|
||||
|
||||
Functionddc: ; ddc
|
||||
Functionddc:: ; ddc
|
||||
ld a, [rLCDC]
|
||||
bit 7, a
|
||||
jp z, Copy1bpp
|
||||
@@ -33,7 +33,7 @@ Functionddc: ; ddc
|
||||
ret
|
||||
; def
|
||||
|
||||
Functiondef: ; def
|
||||
Functiondef:: ; def
|
||||
ld [hBuffer], a
|
||||
ld a, [hROMBank]
|
||||
push af
|
||||
@@ -45,7 +45,7 @@ Functiondef: ; def
|
||||
ret
|
||||
; dfd
|
||||
|
||||
Functiondfd: ; dfd
|
||||
Functiondfd:: ; dfd
|
||||
dec c
|
||||
ld a, [hBGMapMode]
|
||||
push af
|
||||
@@ -105,37 +105,37 @@ Functiondfd: ; dfd
|
||||
|
||||
|
||||
|
||||
Functione4a: ; e4a
|
||||
Functione4a:: ; e4a
|
||||
callba Function14135
|
||||
ret
|
||||
; e51
|
||||
|
||||
|
||||
|
||||
Functione51: ; e51
|
||||
Functione51:: ; e51
|
||||
callba Functionfb449
|
||||
ret
|
||||
; e58
|
||||
|
||||
Functione58: ; e58
|
||||
Functione58:: ; e58
|
||||
callba Functionfb4be
|
||||
ret
|
||||
; e5f
|
||||
|
||||
|
||||
|
||||
Functione5f: ; e5f
|
||||
Functione5f:: ; e5f
|
||||
callba Functionfb48a
|
||||
callba Functionfb4b0
|
||||
ret
|
||||
; e6c
|
||||
|
||||
Functione6c: ; e6c
|
||||
Functione6c:: ; e6c
|
||||
callba Functionfb4b0
|
||||
ret
|
||||
; e73
|
||||
|
||||
Functione73: ; e73
|
||||
Functione73:: ; e73
|
||||
push de
|
||||
ld a, $0
|
||||
call GetSRAMBank
|
||||
@@ -153,7 +153,7 @@ Functione73: ; e73
|
||||
|
||||
|
||||
|
||||
FarCopyBytes: ; e8d
|
||||
FarCopyBytes:: ; e8d
|
||||
; copy bc bytes from a:hl to de
|
||||
|
||||
ld [hBuffer], a
|
||||
@@ -170,7 +170,7 @@ FarCopyBytes: ; e8d
|
||||
; 0xe9b
|
||||
|
||||
|
||||
FarCopyBytesDouble: ; e9b
|
||||
FarCopyBytesDouble:: ; e9b
|
||||
; Copy bc bytes from a:hl to bc*2 bytes at de,
|
||||
; doubling each byte in the process.
|
||||
|
||||
@@ -209,7 +209,7 @@ FarCopyBytesDouble: ; e9b
|
||||
; 0xeba
|
||||
|
||||
|
||||
Request2bpp: ; eba
|
||||
Request2bpp:: ; eba
|
||||
ld a, [hBGMapMode]
|
||||
push af
|
||||
xor a
|
||||
@@ -283,7 +283,7 @@ Request2bpp: ; eba
|
||||
; f1e
|
||||
|
||||
|
||||
Request1bpp: ; f1e
|
||||
Request1bpp:: ; f1e
|
||||
ld a, [hBGMapMode]
|
||||
push af
|
||||
xor a
|
||||
@@ -356,12 +356,12 @@ Request1bpp: ; f1e
|
||||
; f82
|
||||
|
||||
|
||||
Get2bpp: ; f82
|
||||
Get2bpp:: ; f82
|
||||
ld a, [rLCDC]
|
||||
bit 7, a
|
||||
jp nz, Request2bpp
|
||||
|
||||
Copy2bpp: ; f89
|
||||
Copy2bpp:: ; f89
|
||||
; copy c 2bpp tiles from b:de to hl
|
||||
|
||||
push hl
|
||||
@@ -387,12 +387,12 @@ Copy2bpp: ; f89
|
||||
; f9d
|
||||
|
||||
|
||||
Get1bpp: ; f9d
|
||||
Get1bpp:: ; f9d
|
||||
ld a, [rLCDC]
|
||||
bit 7, a
|
||||
jp nz, Request1bpp
|
||||
|
||||
Copy1bpp: ; fa4
|
||||
Copy1bpp:: ; fa4
|
||||
; copy c 1bpp tiles from b:de to hl
|
||||
|
||||
push de
|
||||
|
@@ -1,4 +1,4 @@
|
||||
CopyBytes: ; 0x3026
|
||||
CopyBytes:: ; 0x3026
|
||||
; copy bc bytes from hl to de
|
||||
inc b ; we bail the moment b hits 0, so include the last run
|
||||
inc c ; same thing; include last byte
|
||||
@@ -14,7 +14,7 @@ CopyBytes: ; 0x3026
|
||||
jr nz, .CopyByte
|
||||
ret
|
||||
|
||||
SwapBytes: ; 0x3034
|
||||
SwapBytes:: ; 0x3034
|
||||
; swap bc bytes between hl and de
|
||||
.Loop
|
||||
; stash [hl] away on the stack
|
||||
@@ -37,7 +37,7 @@ SwapBytes: ; 0x3034
|
||||
jr nz, .Loop
|
||||
ret
|
||||
|
||||
ByteFill: ; 0x3041
|
||||
ByteFill:: ; 0x3041
|
||||
; fill bc bytes with the value of a, starting at hl
|
||||
inc b ; we bail the moment b hits 0, so include the last run
|
||||
inc c ; same thing; include last byte
|
||||
@@ -51,7 +51,7 @@ ByteFill: ; 0x3041
|
||||
jr nz, .PutByte
|
||||
ret
|
||||
|
||||
GetFarByte: ; 0x304d
|
||||
GetFarByte:: ; 0x304d
|
||||
; retrieve a single byte from a:hl, and return it in a.
|
||||
; bankswitch to new bank
|
||||
ld [hBuffer], a
|
||||
@@ -72,7 +72,7 @@ GetFarByte: ; 0x304d
|
||||
ld a, [hBuffer]
|
||||
ret
|
||||
|
||||
GetFarHalfword: ; 0x305d
|
||||
GetFarHalfword:: ; 0x305d
|
||||
; retrieve a halfword from a:hl, and return it in hl.
|
||||
; bankswitch to new bank
|
||||
ld [hBuffer], a
|
||||
@@ -92,7 +92,7 @@ GetFarHalfword: ; 0x305d
|
||||
ret
|
||||
; 0x306b
|
||||
|
||||
FarCopyWRAM: ; 306b
|
||||
FarCopyWRAM:: ; 306b
|
||||
ld [hBuffer], a
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
@@ -104,7 +104,7 @@ FarCopyWRAM: ; 306b
|
||||
ret
|
||||
; 307b
|
||||
|
||||
GetFarWRAMByte: ; 307b
|
||||
GetFarWRAMByte:: ; 307b
|
||||
ld [hBuffer], a
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
@@ -118,7 +118,7 @@ GetFarWRAMByte: ; 307b
|
||||
ret
|
||||
; 308d
|
||||
|
||||
GetFarWRAMWord: ; 308d
|
||||
GetFarWRAMWord:: ; 308d
|
||||
ld [hBuffer], a
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
|
@@ -1,4 +1,4 @@
|
||||
FarDecompress: ; b40
|
||||
FarDecompress:: ; b40
|
||||
; Decompress graphics data at a:hl to de
|
||||
|
||||
; put a away for a sec
|
||||
@@ -20,7 +20,7 @@ FarDecompress: ; b40
|
||||
; b50
|
||||
|
||||
|
||||
Decompress: ; b50
|
||||
Decompress:: ; b50
|
||||
; Pokemon Crystal uses an lz variant for compression.
|
||||
|
||||
; This is mainly used for graphics, but the intro's
|
||||
|
@@ -1,4 +1,4 @@
|
||||
DelayFrame: ; 45a
|
||||
DelayFrame:: ; 45a
|
||||
; Wait for one frame
|
||||
ld a, 1
|
||||
ld [VBlankOccurred], a
|
||||
@@ -13,7 +13,7 @@ DelayFrame: ; 45a
|
||||
; 468
|
||||
|
||||
|
||||
DelayFrames: ; 468
|
||||
DelayFrames:: ; 468
|
||||
; Wait c frames
|
||||
call DelayFrame
|
||||
dec c
|
||||
|
@@ -5,20 +5,20 @@
|
||||
; and double speed at any time, but LCD output
|
||||
; collapses during the switch.
|
||||
|
||||
DoubleSpeed: ; 2fef
|
||||
DoubleSpeed:: ; 2fef
|
||||
ld hl, rKEY1
|
||||
bit 7, [hl]
|
||||
jr z, SwitchSpeed
|
||||
ret
|
||||
; 2ff7
|
||||
|
||||
NormalSpeed: ; 2ff7
|
||||
NormalSpeed:: ; 2ff7
|
||||
ld hl, rKEY1
|
||||
bit 7, [hl]
|
||||
ret z
|
||||
; 2ffd
|
||||
|
||||
SwitchSpeed: ; 2ffd
|
||||
SwitchSpeed:: ; 2ffd
|
||||
set 0, [hl]
|
||||
xor a
|
||||
ld [rIF], a
|
||||
|
@@ -1,7 +1,7 @@
|
||||
; Functions to fade the screen in and out.
|
||||
|
||||
|
||||
Function48c: ; 48c
|
||||
Function48c:: ; 48c
|
||||
ld a, [TimeOfDayPal]
|
||||
ld b, a
|
||||
ld hl, IncGradGBPalTable_11
|
||||
@@ -22,7 +22,7 @@ Function48c: ; 48c
|
||||
; 4a3
|
||||
|
||||
|
||||
Function4a3: ; 4a3
|
||||
Function4a3:: ; 4a3
|
||||
ld a, [hCGB]
|
||||
and a
|
||||
jr z, .asm_4af
|
||||
@@ -36,7 +36,7 @@ Function4a3: ; 4a3
|
||||
jr FadeOut
|
||||
; 4b6
|
||||
|
||||
Function4b6: ; 4b6
|
||||
Function4b6:: ; 4b6
|
||||
ld a, [hCGB]
|
||||
and a
|
||||
jr z, .asm_4c2
|
||||
@@ -49,7 +49,7 @@ Function4b6: ; 4b6
|
||||
ld b, 3
|
||||
; 4c7
|
||||
|
||||
FadeOut: ; 4c7
|
||||
FadeOut:: ; 4c7
|
||||
push de
|
||||
ld a, [hli]
|
||||
call DmgToCgbBGPals
|
||||
@@ -66,7 +66,7 @@ FadeOut: ; 4c7
|
||||
ret
|
||||
; 4dd
|
||||
|
||||
Function4dd: ; 4dd
|
||||
Function4dd:: ; 4dd
|
||||
ld a, [hCGB]
|
||||
and a
|
||||
jr z, .asm_4e9
|
||||
@@ -80,7 +80,7 @@ Function4dd: ; 4dd
|
||||
jr FadeIn
|
||||
; 4f0
|
||||
|
||||
Function4f0: ; 4f0
|
||||
Function4f0:: ; 4f0
|
||||
ld a, [hCGB]
|
||||
and a
|
||||
jr z, .asm_4fc
|
||||
@@ -94,7 +94,7 @@ Function4f0: ; 4f0
|
||||
; fallthrough
|
||||
; 501
|
||||
|
||||
FadeIn: ; 501
|
||||
FadeIn:: ; 501
|
||||
push de
|
||||
ld a, [hld]
|
||||
ld d, a
|
||||
@@ -113,22 +113,22 @@ FadeIn: ; 501
|
||||
|
||||
|
||||
; 517
|
||||
IncGradGBPalTable_00: db %11111111, %11111111, %11111111
|
||||
IncGradGBPalTable_01: db %11111110, %11111110, %11111110
|
||||
IncGradGBPalTable_02: db %11111001, %11111001, %11111001
|
||||
IncGradGBPalTable_03: db %11100100, %11100100, %11100100
|
||||
IncGradGBPalTable_04: db %11100100, %11100100, %11100100
|
||||
IncGradGBPalTable_05: db %10010000, %10010000, %10010000
|
||||
IncGradGBPalTable_06: db %01000000, %01000000, %01000000
|
||||
IncGradGBPalTable_07: db %00000000, %00000000, %00000000
|
||||
IncGradGBPalTable_00:: db %11111111, %11111111, %11111111
|
||||
IncGradGBPalTable_01:: db %11111110, %11111110, %11111110
|
||||
IncGradGBPalTable_02:: db %11111001, %11111001, %11111001
|
||||
IncGradGBPalTable_03:: db %11100100, %11100100, %11100100
|
||||
IncGradGBPalTable_04:: db %11100100, %11100100, %11100100
|
||||
IncGradGBPalTable_05:: db %10010000, %10010000, %10010000
|
||||
IncGradGBPalTable_06:: db %01000000, %01000000, %01000000
|
||||
IncGradGBPalTable_07:: db %00000000, %00000000, %00000000
|
||||
; bgp obp1 obp2
|
||||
IncGradGBPalTable_08: db %11111111, %11111111, %11111111
|
||||
IncGradGBPalTable_09: db %11111110, %11111110, %11111000
|
||||
IncGradGBPalTable_10: db %11111001, %11100100, %11100100
|
||||
IncGradGBPalTable_11: db %11100100, %11010000, %11100000
|
||||
IncGradGBPalTable_12: db %11100100, %11010000, %11100000
|
||||
IncGradGBPalTable_13: db %10010000, %10000000, %10010000
|
||||
IncGradGBPalTable_14: db %01000000, %01000000, %01000000
|
||||
IncGradGBPalTable_15: db %00000000, %00000000, %00000000
|
||||
IncGradGBPalTable_08:: db %11111111, %11111111, %11111111
|
||||
IncGradGBPalTable_09:: db %11111110, %11111110, %11111000
|
||||
IncGradGBPalTable_10:: db %11111001, %11100100, %11100100
|
||||
IncGradGBPalTable_11:: db %11100100, %11010000, %11100000
|
||||
IncGradGBPalTable_12:: db %11100100, %11010000, %11100000
|
||||
IncGradGBPalTable_13:: db %10010000, %10000000, %10010000
|
||||
IncGradGBPalTable_14:: db %01000000, %01000000, %01000000
|
||||
IncGradGBPalTable_15:: db %00000000, %00000000, %00000000
|
||||
; 547
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
FarCall_de: ; 2d54
|
||||
FarCall_de:: ; 2d54
|
||||
; Call a:de.
|
||||
; Preserves other registers.
|
||||
|
||||
@@ -16,7 +16,7 @@ FarCall_de: ; 2d54
|
||||
; 2d63
|
||||
|
||||
|
||||
FarCall_hl: ; 2d63
|
||||
FarCall_hl:: ; 2d63
|
||||
; Call a:hl.
|
||||
; Preserves other registers.
|
||||
|
||||
@@ -28,7 +28,7 @@ FarCall_hl: ; 2d63
|
||||
call Function2d82
|
||||
; 2d6e
|
||||
|
||||
ReturnFarCall: ; 2d6e
|
||||
ReturnFarCall:: ; 2d6e
|
||||
; We want to retain the contents of f.
|
||||
; To do this, we can pop to bc instead of af.
|
||||
|
||||
@@ -49,7 +49,7 @@ ReturnFarCall: ; 2d6e
|
||||
ret
|
||||
; 2d82
|
||||
|
||||
Function2d82: ; 2d82
|
||||
Function2d82:: ; 2d82
|
||||
jp [hl]
|
||||
; 2d83
|
||||
|
||||
|
@@ -1,11 +1,11 @@
|
||||
Function2e50: ; 2e50
|
||||
Function2e50:: ; 2e50
|
||||
xor a
|
||||
ld hl, EventFlags
|
||||
ld [hli], a
|
||||
ret
|
||||
; 2e56
|
||||
|
||||
Function2e56: ; 2e56
|
||||
Function2e56:: ; 2e56
|
||||
xor a
|
||||
ld hl, BikeFlags
|
||||
ld [hli], a
|
||||
@@ -13,7 +13,7 @@ Function2e56: ; 2e56
|
||||
ret
|
||||
; 2e5d
|
||||
|
||||
Function2e5d: ; 2e5d
|
||||
Function2e5d:: ; 2e5d
|
||||
ld a, [$d19a]
|
||||
cp $2
|
||||
jr z, .asm_2e69
|
||||
@@ -28,12 +28,12 @@ Function2e5d: ; 2e5d
|
||||
; 2e6f
|
||||
|
||||
|
||||
EventFlagAction: ; 0x2e6f
|
||||
EventFlagAction:: ; 0x2e6f
|
||||
ld hl, EventFlags
|
||||
call FlagAction
|
||||
ret
|
||||
|
||||
FlagAction: ; 0x2e76
|
||||
FlagAction:: ; 0x2e76
|
||||
; Perform action b on bit de in flag array hl.
|
||||
|
||||
; inputs:
|
||||
@@ -102,7 +102,7 @@ FlagAction: ; 0x2e76
|
||||
; 0x2ead
|
||||
|
||||
|
||||
Function2ead: ; 2ead
|
||||
Function2ead:: ; 2ead
|
||||
ld de, ENGINE_POKEDEX
|
||||
ld b, CHECK_FLAG
|
||||
callba EngineFlagAction
|
||||
|
@@ -1,4 +1,4 @@
|
||||
ResetGameTime: ; 208a
|
||||
ResetGameTime:: ; 208a
|
||||
xor a
|
||||
ld [GameTimeCap], a
|
||||
ld [GameTimeHours], a
|
||||
@@ -10,7 +10,7 @@ ResetGameTime: ; 208a
|
||||
; 209e
|
||||
|
||||
|
||||
GameTimer: ; 209e
|
||||
GameTimer:: ; 209e
|
||||
|
||||
nop
|
||||
|
||||
@@ -27,7 +27,7 @@ GameTimer: ; 209e
|
||||
; 20ad
|
||||
|
||||
|
||||
UpdateGameTimer: ; 20ad
|
||||
UpdateGameTimer:: ; 20ad
|
||||
; Increment the game timer by one frame.
|
||||
; The game timer is capped at 999:59:59.00.
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
AskSerial: ; 2063
|
||||
AskSerial:: ; 2063
|
||||
; send out a handshake while serial int is off
|
||||
ld a, [$c2d4]
|
||||
bit 0, a
|
||||
|
@@ -1,4 +1,4 @@
|
||||
Reset: ; 150
|
||||
Reset:: ; 150
|
||||
di
|
||||
call SoundRestart
|
||||
xor a
|
||||
@@ -20,7 +20,7 @@ Reset: ; 150
|
||||
; 16e
|
||||
|
||||
|
||||
_Start: ; 16e
|
||||
_Start:: ; 16e
|
||||
cp $11
|
||||
jr z, .asm_175
|
||||
xor a
|
||||
@@ -36,7 +36,7 @@ _Start: ; 16e
|
||||
; 17d
|
||||
|
||||
|
||||
Init: ; 17d
|
||||
Init:: ; 17d
|
||||
|
||||
di
|
||||
|
||||
@@ -177,7 +177,7 @@ Init: ; 17d
|
||||
; 245
|
||||
|
||||
|
||||
ClearVRAM: ; 245
|
||||
ClearVRAM:: ; 245
|
||||
; Wipe VRAM banks 0 and 1
|
||||
|
||||
ld a, 1
|
||||
@@ -194,7 +194,7 @@ ClearVRAM: ; 245
|
||||
ret
|
||||
; 25a
|
||||
|
||||
ClearWRAM: ; 25a
|
||||
ClearWRAM:: ; 25a
|
||||
; Wipe swappable WRAM banks (1-7)
|
||||
|
||||
ld a, 1
|
||||
@@ -212,7 +212,7 @@ ClearWRAM: ; 25a
|
||||
ret
|
||||
; 270
|
||||
|
||||
Function270: ; 270
|
||||
Function270:: ; 270
|
||||
ld a, $0
|
||||
call GetSRAMBank
|
||||
ld hl, $a000
|
||||
|
@@ -1,9 +1,9 @@
|
||||
DoItemEffect: ; 2f3f
|
||||
DoItemEffect:: ; 2f3f
|
||||
callba _DoItemEffect
|
||||
ret
|
||||
; 2f46
|
||||
|
||||
CheckTossableItem: ; 2f46
|
||||
CheckTossableItem:: ; 2f46
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
@@ -14,7 +14,7 @@ CheckTossableItem: ; 2f46
|
||||
ret
|
||||
; 2f53
|
||||
|
||||
TossItem: ; 2f53
|
||||
TossItem:: ; 2f53
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
@@ -34,7 +34,7 @@ TossItem: ; 2f53
|
||||
ret
|
||||
; 2f66
|
||||
|
||||
ReceiveItem: ; 2f66
|
||||
ReceiveItem:: ; 2f66
|
||||
push bc
|
||||
ld a, [hROMBank]
|
||||
push af
|
||||
@@ -54,7 +54,7 @@ ReceiveItem: ; 2f66
|
||||
ret
|
||||
; 2f79
|
||||
|
||||
CheckItem: ; 2f79
|
||||
CheckItem:: ; 2f79
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
|
@@ -1,4 +1,4 @@
|
||||
JoypadInt: ; 92e
|
||||
JoypadInt:: ; 92e
|
||||
; Replaced by Joypad, called from VBlank instead of the useless
|
||||
; joypad interrupt.
|
||||
|
||||
@@ -6,7 +6,7 @@ JoypadInt: ; 92e
|
||||
reti
|
||||
; 92f
|
||||
|
||||
ClearJoypad: ; 92f
|
||||
ClearJoypad:: ; 92f
|
||||
xor a
|
||||
; Pressed this frame (delta)
|
||||
ld [hJoyPressed], a
|
||||
@@ -15,7 +15,7 @@ ClearJoypad: ; 92f
|
||||
ret
|
||||
; 935
|
||||
|
||||
Joypad: ; 935
|
||||
Joypad:: ; 935
|
||||
; Read the joypad register and translate it to something more
|
||||
; workable for use in-game. There are 8 buttons, so we can use
|
||||
; one byte to contain all player input.
|
||||
@@ -109,7 +109,7 @@ Joypad: ; 935
|
||||
; 984
|
||||
|
||||
|
||||
GetJoypad: ; 984
|
||||
GetJoypad:: ; 984
|
||||
; Update mirror joypad input from hJoypadDown (real input)
|
||||
|
||||
; hJoyReleased: released this frame (delta)
|
||||
@@ -238,7 +238,7 @@ GetJoypad: ; 984
|
||||
; 9ee
|
||||
|
||||
|
||||
StartAutoInput: ; 9ee
|
||||
StartAutoInput:: ; 9ee
|
||||
; Start reading automated input stream at a:hl.
|
||||
|
||||
ld [AutoInputBank], a
|
||||
@@ -261,7 +261,7 @@ StartAutoInput: ; 9ee
|
||||
; a0a
|
||||
|
||||
|
||||
StopAutoInput: ; a0a
|
||||
StopAutoInput:: ; a0a
|
||||
; Clear variables related to automated input.
|
||||
xor a
|
||||
ld [AutoInputBank], a
|
||||
@@ -274,7 +274,7 @@ StopAutoInput: ; a0a
|
||||
; a1b
|
||||
|
||||
|
||||
Functiona1b: ; a1b
|
||||
Functiona1b:: ; a1b
|
||||
|
||||
call DelayFrame
|
||||
|
||||
@@ -302,7 +302,7 @@ Functiona1b: ; a1b
|
||||
; a36
|
||||
|
||||
|
||||
Functiona36: ; a36
|
||||
Functiona36:: ; a36
|
||||
call DelayFrame
|
||||
call GetJoypad
|
||||
ld a, [hJoyPressed]
|
||||
@@ -312,7 +312,7 @@ Functiona36: ; a36
|
||||
jr Functiona36
|
||||
; a46
|
||||
|
||||
Functiona46: ; a46
|
||||
Functiona46:: ; a46
|
||||
ld a, [hOAMUpdate]
|
||||
push af
|
||||
ld a, 1
|
||||
@@ -324,7 +324,7 @@ Functiona46: ; a46
|
||||
ret
|
||||
; a57
|
||||
|
||||
Functiona57: ; a57
|
||||
Functiona57:: ; a57
|
||||
call GetJoypad
|
||||
ld a, [$ffaa]
|
||||
and a
|
||||
@@ -354,7 +354,7 @@ Functiona57: ; a57
|
||||
ret
|
||||
; a80
|
||||
|
||||
Functiona80: ; a80
|
||||
Functiona80:: ; a80
|
||||
ld a, [$ffaf]
|
||||
push af
|
||||
ld a, [$ffb0]
|
||||
@@ -379,7 +379,7 @@ Functiona80: ; a80
|
||||
ret
|
||||
; aa5
|
||||
|
||||
Functionaa5: ; aa5
|
||||
Functionaa5:: ; aa5
|
||||
call Functiona57
|
||||
ld a, [$ffa9]
|
||||
and A_BUTTON | B_BUTTON
|
||||
@@ -387,7 +387,7 @@ Functionaa5: ; aa5
|
||||
ret
|
||||
; aaf
|
||||
|
||||
Functionaaf: ; aaf
|
||||
Functionaaf:: ; aaf
|
||||
ld a, [InLinkBattle]
|
||||
and a
|
||||
jr nz, .asm_ac1
|
||||
@@ -403,7 +403,7 @@ Functionaaf: ; aaf
|
||||
jp DelayFrames
|
||||
; ac6
|
||||
|
||||
Functionac6: ; ac6
|
||||
Functionac6:: ; ac6
|
||||
ld a, [hOAMUpdate]
|
||||
push af
|
||||
ld a, $1
|
||||
@@ -430,7 +430,7 @@ Functionac6: ; ac6
|
||||
ret
|
||||
; af5
|
||||
|
||||
Functionaf5: ; af5
|
||||
Functionaf5:: ; af5
|
||||
ld a, [$ff9b]
|
||||
and $10
|
||||
jr z, .asm_aff
|
||||
@@ -445,7 +445,7 @@ Functionaf5: ; af5
|
||||
ret
|
||||
; b06
|
||||
|
||||
Functionb06: ; b06
|
||||
Functionb06:: ; b06
|
||||
push bc
|
||||
ld a, [hl]
|
||||
ld b, a
|
||||
|
@@ -1,7 +1,7 @@
|
||||
; LCD handling
|
||||
|
||||
|
||||
Function547: ; 547
|
||||
Function547:: ; 547
|
||||
ld a, [hLCDStatCustom]
|
||||
cp rSCX & $ff
|
||||
ret nz
|
||||
@@ -12,7 +12,7 @@ Function547: ; 547
|
||||
; 552
|
||||
|
||||
|
||||
LCD: ; 552
|
||||
LCD:: ; 552
|
||||
push af
|
||||
ld a, [hLCDStatCustom]
|
||||
and a
|
||||
@@ -37,7 +37,7 @@ LCD: ; 552
|
||||
; 568
|
||||
|
||||
|
||||
DisableLCD: ; 568
|
||||
DisableLCD:: ; 568
|
||||
; Turn the LCD off
|
||||
|
||||
; Don't need to do anything if the LCD is already off
|
||||
@@ -72,7 +72,7 @@ DisableLCD: ; 568
|
||||
; 58a
|
||||
|
||||
|
||||
EnableLCD: ; 58a
|
||||
EnableLCD:: ; 58a
|
||||
ld a, [rLCDC]
|
||||
set 7, a ; lcd enable
|
||||
ld [rLCDC], a
|
||||
|
242
home/map.asm
242
home/map.asm
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
; Functions handling map objects.
|
||||
|
||||
|
||||
GetSpritePalette: ; 17ff
|
||||
GetSpritePalette:: ; 17ff
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
@@ -15,7 +15,7 @@ GetSpritePalette: ; 17ff
|
||||
; 180e
|
||||
|
||||
|
||||
Function180e: ; 180e
|
||||
Function180e:: ; 180e
|
||||
push hl
|
||||
push bc
|
||||
ld hl, $d156
|
||||
@@ -51,7 +51,7 @@ Function180e: ; 180e
|
||||
ret
|
||||
; 1836
|
||||
|
||||
Function1836: ; 1836
|
||||
Function1836:: ; 1836
|
||||
push de
|
||||
push hl
|
||||
|
||||
@@ -76,14 +76,14 @@ Function1836: ; 1836
|
||||
|
||||
|
||||
|
||||
Function184a: ; 184a
|
||||
Function184a:: ; 184a
|
||||
ld a, [StandingTile]
|
||||
call GetTileCollision
|
||||
ld b, a
|
||||
ret
|
||||
; 1852
|
||||
|
||||
Function1852: ; 1852
|
||||
Function1852:: ; 1852
|
||||
ld a, [StandingTile]
|
||||
call GetTileCollision
|
||||
sub 1
|
||||
@@ -93,7 +93,7 @@ Function1852: ; 1852
|
||||
; 185d
|
||||
|
||||
|
||||
GetTileCollision: ; 185d
|
||||
GetTileCollision:: ; 185d
|
||||
; Get the collision type of tile a.
|
||||
|
||||
push de
|
||||
@@ -121,7 +121,7 @@ GetTileCollision: ; 185d
|
||||
; 1875
|
||||
|
||||
|
||||
Function1875: ; 1875
|
||||
Function1875:: ; 1875
|
||||
ld d, a
|
||||
and $f0
|
||||
cp $10
|
||||
@@ -146,42 +146,42 @@ Function1875: ; 1875
|
||||
ret
|
||||
; 188e
|
||||
|
||||
Function188e: ; 188e
|
||||
Function188e:: ; 188e
|
||||
cp $14
|
||||
ret z
|
||||
cp $1c
|
||||
ret
|
||||
; 1894
|
||||
|
||||
CheckCutTreeTile: ; 1894
|
||||
CheckCutTreeTile:: ; 1894
|
||||
cp $12
|
||||
ret z
|
||||
cp $1a
|
||||
ret
|
||||
; 189a
|
||||
|
||||
CheckHeadbuttTreeTile: ; 189a
|
||||
CheckHeadbuttTreeTile:: ; 189a
|
||||
cp $15
|
||||
ret z
|
||||
cp $1d
|
||||
ret
|
||||
; 18a0
|
||||
|
||||
CheckCounterTile: ; 18a0
|
||||
CheckCounterTile:: ; 18a0
|
||||
cp $90
|
||||
ret z
|
||||
cp $98
|
||||
ret
|
||||
; 18a6
|
||||
|
||||
CheckPitTile: ; 18a6
|
||||
CheckPitTile:: ; 18a6
|
||||
cp $60
|
||||
ret z
|
||||
cp $68
|
||||
ret
|
||||
; 18ac
|
||||
|
||||
CheckIceTile: ; 18ac
|
||||
CheckIceTile:: ; 18ac
|
||||
cp $23
|
||||
ret z
|
||||
cp $2b
|
||||
@@ -190,7 +190,7 @@ CheckIceTile: ; 18ac
|
||||
ret
|
||||
; 18b4
|
||||
|
||||
CheckWhirlpoolTile: ; 18b4
|
||||
CheckWhirlpoolTile:: ; 18b4
|
||||
nop
|
||||
cp $24
|
||||
ret z
|
||||
@@ -200,14 +200,14 @@ CheckWhirlpoolTile: ; 18b4
|
||||
ret
|
||||
; 18bd
|
||||
|
||||
CheckWaterfallTile: ; 18bd
|
||||
CheckWaterfallTile:: ; 18bd
|
||||
cp $33
|
||||
ret z
|
||||
cp $3b
|
||||
ret
|
||||
; 18c3
|
||||
|
||||
CheckStandingOnEntrance: ; 18c3
|
||||
CheckStandingOnEntrance:: ; 18c3
|
||||
ld a, [StandingTile]
|
||||
cp $71 ; door
|
||||
ret z
|
||||
@@ -220,7 +220,7 @@ CheckStandingOnEntrance: ; 18c3
|
||||
; 18d2
|
||||
|
||||
|
||||
GetMapObject: ; 18d2
|
||||
GetMapObject:: ; 18d2
|
||||
; Return the location of map object a in bc.
|
||||
ld hl, MapObjects
|
||||
ld bc, $10
|
||||
@@ -231,7 +231,7 @@ GetMapObject: ; 18d2
|
||||
; 18de
|
||||
|
||||
|
||||
Function18de: ; 18de
|
||||
Function18de:: ; 18de
|
||||
ld [hConnectionStripLength], a
|
||||
call GetMapObject
|
||||
ld hl, $0000
|
||||
@@ -249,7 +249,7 @@ Function18de: ; 18de
|
||||
ret
|
||||
; 18f5
|
||||
|
||||
Function18f5: ; 18f5
|
||||
Function18f5:: ; 18f5
|
||||
ld hl, $0006
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
@@ -323,7 +323,7 @@ Function18f5: ; 18f5
|
||||
ret
|
||||
; 194d
|
||||
|
||||
Function194d: ; 194d
|
||||
Function194d:: ; 194d
|
||||
ld [hConnectionStripLength], a
|
||||
call GetMapObject
|
||||
call Function80e7
|
||||
@@ -332,7 +332,7 @@ Function194d: ; 194d
|
||||
|
||||
|
||||
|
||||
Function1956: ; 1956
|
||||
Function1956:: ; 1956
|
||||
ld [hConnectionStripLength], a
|
||||
call Function271e
|
||||
ld a, [hConnectionStripLength]
|
||||
@@ -341,7 +341,7 @@ Function1956: ; 1956
|
||||
ret
|
||||
; 1967
|
||||
|
||||
Function1967: ; 1967
|
||||
Function1967:: ; 1967
|
||||
ld [hConnectionStripLength], a
|
||||
call GetMapObject
|
||||
ld hl, $0000
|
||||
@@ -358,7 +358,7 @@ Function1967: ; 1967
|
||||
ret
|
||||
; 1985
|
||||
|
||||
Function1985: ; 1985
|
||||
Function1985:: ; 1985
|
||||
ld hl, $d4cd
|
||||
cp [hl]
|
||||
jr z, .asm_1990
|
||||
@@ -374,13 +374,13 @@ Function1985: ; 1985
|
||||
ret
|
||||
; 199f
|
||||
|
||||
Function199f: ; 199f
|
||||
Function199f:: ; 199f
|
||||
call Function1967
|
||||
call Function2712
|
||||
ret
|
||||
; 19a6
|
||||
|
||||
Function19a6: ; 19a6
|
||||
Function19a6:: ; 19a6
|
||||
push hl
|
||||
call GetMapObject
|
||||
ld d, b
|
||||
@@ -394,7 +394,7 @@ Function19a6: ; 19a6
|
||||
ret
|
||||
; 19b8
|
||||
|
||||
Function19b8: ; 19b8
|
||||
Function19b8:: ; 19b8
|
||||
call GetMapObject
|
||||
ld hl, $0000
|
||||
add hl, bc
|
||||
@@ -426,7 +426,7 @@ Function19b8: ; 19b8
|
||||
|
||||
|
||||
|
||||
Function19e9: ; 19e9
|
||||
Function19e9:: ; 19e9
|
||||
ld [$c2e2], a
|
||||
ld a, [hROMBank]
|
||||
ld [$c2e3], a
|
||||
@@ -451,7 +451,7 @@ Function19e9: ; 19e9
|
||||
|
||||
|
||||
|
||||
Function1a13: ; 1a13
|
||||
Function1a13:: ; 1a13
|
||||
push bc
|
||||
push de
|
||||
ld hl, $d4d6
|
||||
@@ -480,7 +480,7 @@ Function1a13: ; 1a13
|
||||
|
||||
|
||||
|
||||
Function1a2f: ; 1a2f
|
||||
Function1a2f:: ; 1a2f
|
||||
ld hl, $0003
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
@@ -502,7 +502,7 @@ Function1a2f: ; 1a2f
|
||||
ret
|
||||
; 1a47
|
||||
|
||||
Function1a47: ; 1a47
|
||||
Function1a47:: ; 1a47
|
||||
push bc
|
||||
push de
|
||||
ld e, a
|
||||
@@ -525,7 +525,7 @@ Function1a47: ; 1a47
|
||||
; 1a61
|
||||
|
||||
|
||||
Function1a61: ; 1a61
|
||||
Function1a61:: ; 1a61
|
||||
ld l, a
|
||||
ld a, [hROMBank]
|
||||
push af
|
||||
@@ -543,7 +543,7 @@ Function1a61: ; 1a61
|
||||
ret
|
||||
; 1a71
|
||||
|
||||
Function1a71: ; 1a71
|
||||
Function1a71:: ; 1a71
|
||||
ld hl, $0003
|
||||
add hl, de
|
||||
ld [hl], a
|
||||
@@ -591,7 +591,7 @@ Function1a71: ; 1a71
|
||||
ret
|
||||
; 1aae
|
||||
|
||||
Function1aae: ; 1aae
|
||||
Function1aae:: ; 1aae
|
||||
ld a, [hROMBank]
|
||||
push af
|
||||
ld a, [hli]
|
||||
@@ -616,20 +616,20 @@ Function1aae: ; 1aae
|
||||
ret
|
||||
; 1ac6
|
||||
|
||||
Function1ac6: ; 1ac6
|
||||
Function1ac6:: ; 1ac6
|
||||
ld hl, VramState
|
||||
set 0, [hl]
|
||||
ret
|
||||
; 1acc
|
||||
|
||||
Function1acc: ; 1acc
|
||||
Function1acc:: ; 1acc
|
||||
ld hl, VramState
|
||||
res 0, [hl]
|
||||
ret
|
||||
; 1ad2
|
||||
|
||||
|
||||
Function1ad2: ; 1ad2
|
||||
Function1ad2:: ; 1ad2
|
||||
ld a, [VramState]
|
||||
bit 0, a
|
||||
ret z
|
||||
@@ -639,7 +639,7 @@ Function1ad2: ; 1ad2
|
||||
; 1ae5
|
||||
|
||||
|
||||
Function1ae5: ; 1ae5
|
||||
Function1ae5:: ; 1ae5
|
||||
ld bc, $0028
|
||||
ld hl, $d4d6
|
||||
call AddNTimes
|
||||
@@ -648,7 +648,7 @@ Function1ae5: ; 1ae5
|
||||
ret
|
||||
; 1af1
|
||||
|
||||
Function1af1: ; 1af1
|
||||
Function1af1:: ; 1af1
|
||||
ld hl, $0000
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
@@ -656,7 +656,7 @@ Function1af1: ; 1af1
|
||||
ret
|
||||
; 1af8
|
||||
|
||||
Function1af8: ; 1af8
|
||||
Function1af8:: ; 1af8
|
||||
push af
|
||||
ld hl, $0008
|
||||
add hl, bc
|
||||
@@ -671,7 +671,7 @@ Function1af8: ; 1af8
|
||||
; 1b07
|
||||
|
||||
|
||||
GetSpriteDirection: ; 1b07
|
||||
GetSpriteDirection:: ; 1b07
|
||||
ld hl, $0008
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
|
@@ -1,4 +1,4 @@
|
||||
SimpleMultiply: ; 3105
|
||||
SimpleMultiply:: ; 3105
|
||||
; Return a * c.
|
||||
and a
|
||||
ret z
|
||||
@@ -15,7 +15,7 @@ SimpleMultiply: ; 3105
|
||||
; 3110
|
||||
|
||||
|
||||
SimpleDivide: ; 3110
|
||||
SimpleDivide:: ; 3110
|
||||
; Divide a by c. Return quotient b and remainder a.
|
||||
ld b, 0
|
||||
.loop
|
||||
@@ -28,7 +28,7 @@ SimpleDivide: ; 3110
|
||||
; 3119
|
||||
|
||||
|
||||
Multiply: ; 3119
|
||||
Multiply:: ; 3119
|
||||
; Multiply hMultiplicand (3 bytes) by hMultiplier. Result in hProduct.
|
||||
; All values are big endian.
|
||||
push hl
|
||||
@@ -42,7 +42,7 @@ Multiply: ; 3119
|
||||
; 3124
|
||||
|
||||
|
||||
Divide: ; 3124
|
||||
Divide:: ; 3124
|
||||
; Divide hDividend length b (max 4 bytes) by hDivisor. Result in hQuotient.
|
||||
; All values are big endian.
|
||||
push hl
|
||||
@@ -64,7 +64,7 @@ Divide: ; 3124
|
||||
; 3136
|
||||
|
||||
|
||||
SubtractSigned: ; 3136
|
||||
SubtractSigned:: ; 3136
|
||||
; Return a - b, sign in carry.
|
||||
sub b
|
||||
ret nc
|
||||
|
100
home/menu.asm
100
home/menu.asm
@@ -1,12 +1,12 @@
|
||||
; Functions used in displaying and handling menus.
|
||||
|
||||
|
||||
LoadMenuDataHeader: ; 0x1d35
|
||||
LoadMenuDataHeader:: ; 0x1d35
|
||||
call Function1d3c
|
||||
call Function1c00
|
||||
ret
|
||||
|
||||
Function1d3c: ; 0x1d3c
|
||||
Function1d3c:: ; 0x1d3c
|
||||
ld de, $cf81
|
||||
ld bc, $0010
|
||||
call CopyBytes
|
||||
@@ -15,30 +15,30 @@ Function1d3c: ; 0x1d3c
|
||||
ret
|
||||
; 0x1d4b
|
||||
|
||||
Function1d4b: ; 1d4b
|
||||
Function1d4b:: ; 1d4b
|
||||
ld [$cf88], a
|
||||
ret
|
||||
; 1d4f
|
||||
|
||||
|
||||
Function1d4f: ; 1d4f
|
||||
Function1d4f:: ; 1d4f
|
||||
push hl
|
||||
call Function1d58
|
||||
pop hl
|
||||
jp PrintText
|
||||
; 1d57
|
||||
|
||||
Function1d57: ; 1d57
|
||||
Function1d57:: ; 1d57
|
||||
ret
|
||||
; 1d58
|
||||
|
||||
Function1d58: ; 1d58
|
||||
Function1d58:: ; 1d58
|
||||
ld hl, MenuDataHeader_0x1d5f
|
||||
call LoadMenuDataHeader
|
||||
ret
|
||||
; 1d5f
|
||||
|
||||
MenuDataHeader_0x1d5f: ; 1d5f
|
||||
MenuDataHeader_0x1d5f:: ; 1d5f
|
||||
db $40 ; tile backup
|
||||
db 12, 0 ; start coords
|
||||
db 17, 19 ; end coords
|
||||
@@ -46,19 +46,19 @@ MenuDataHeader_0x1d5f: ; 1d5f
|
||||
db 0 ; default option
|
||||
; 1d67
|
||||
|
||||
Function1d67: ; 1d67
|
||||
Function1d67:: ; 1d67
|
||||
call Function1d4f
|
||||
call Function1c17
|
||||
ret
|
||||
; 1d6e
|
||||
|
||||
Function1d6e: ; 1d6e
|
||||
Function1d6e:: ; 1d6e
|
||||
ld hl, MenuDataHeader_0x1d75
|
||||
call LoadMenuDataHeader
|
||||
ret
|
||||
; 1d75
|
||||
|
||||
MenuDataHeader_0x1d75: ; 1d75
|
||||
MenuDataHeader_0x1d75:: ; 1d75
|
||||
db $40 ; tile backup
|
||||
db 0, 0 ; start coords
|
||||
db 17, 19 ; end coords
|
||||
@@ -66,12 +66,12 @@ MenuDataHeader_0x1d75: ; 1d75
|
||||
db 1 ; default option
|
||||
; 1d7d
|
||||
|
||||
Function1d7d: ; 1d7d
|
||||
Function1d7d:: ; 1d7d
|
||||
call Function1c07
|
||||
ret
|
||||
; 1d81
|
||||
|
||||
Function1d81: ; 0x1d81
|
||||
Function1d81:: ; 0x1d81
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
call Function1cbb
|
||||
@@ -95,7 +95,7 @@ Function1d81: ; 0x1d81
|
||||
ret
|
||||
; 0x1dab
|
||||
|
||||
Function1dab: ; 1dab
|
||||
Function1dab:: ; 1dab
|
||||
call LoadMenuDataHeader
|
||||
call Function1d81
|
||||
call Function1c17
|
||||
@@ -103,7 +103,7 @@ Function1dab: ; 1dab
|
||||
ret
|
||||
; 1db8
|
||||
|
||||
Function1db8: ; 0x1db8
|
||||
Function1db8:: ; 0x1db8
|
||||
push hl
|
||||
push bc
|
||||
push af
|
||||
@@ -124,17 +124,17 @@ Function1db8: ; 0x1db8
|
||||
; 0x1dcf
|
||||
|
||||
|
||||
YesNoBox: ; 1dcf
|
||||
YesNoBox:: ; 1dcf
|
||||
lb bc, 14, 7
|
||||
|
||||
PlaceYesNoBox: ; 1dd2
|
||||
PlaceYesNoBox:: ; 1dd2
|
||||
jr _YesNoBox
|
||||
|
||||
Function1dd4: ; 1dd4
|
||||
Function1dd4:: ; 1dd4
|
||||
call LoadMenuDataHeader
|
||||
jr Function1dfe
|
||||
|
||||
_YesNoBox: ; 1dd9
|
||||
_YesNoBox:: ; 1dd9
|
||||
; Return nc (yes) or c (no).
|
||||
push bc
|
||||
ld hl, YesNoMenuDataHeader
|
||||
@@ -157,7 +157,7 @@ _YesNoBox: ; 1dd9
|
||||
ld [$cf84], a
|
||||
call Function1c00
|
||||
|
||||
Function1dfe: ; 1dfe
|
||||
Function1dfe:: ; 1dfe
|
||||
call Function1d81
|
||||
push af
|
||||
ld c, $f
|
||||
@@ -178,7 +178,7 @@ Function1dfe: ; 1dfe
|
||||
ret
|
||||
; 1e1d
|
||||
|
||||
YesNoMenuDataHeader: ; 1e1d
|
||||
YesNoMenuDataHeader:: ; 1e1d
|
||||
db $40 ; tile backup
|
||||
db 5, 10 ; start coords
|
||||
db 9, 15 ; end coords
|
||||
@@ -186,20 +186,20 @@ YesNoMenuDataHeader: ; 1e1d
|
||||
db 1 ; default option
|
||||
; 1e25
|
||||
|
||||
YesNoMenuData2: ; 1e25
|
||||
YesNoMenuData2:: ; 1e25
|
||||
db $c0 ; flags
|
||||
db 2
|
||||
db "YES@"
|
||||
db "NO@"
|
||||
; 1e2e
|
||||
|
||||
Function1e2e: ; 1e2e
|
||||
Function1e2e:: ; 1e2e
|
||||
call Function1e35
|
||||
call Function1c00
|
||||
ret
|
||||
; 1e35
|
||||
|
||||
Function1e35: ; 1e35
|
||||
Function1e35:: ; 1e35
|
||||
push de
|
||||
call Function1d3c
|
||||
pop de
|
||||
@@ -224,7 +224,7 @@ Function1e35: ; 1e35
|
||||
ret
|
||||
; 1e5d
|
||||
|
||||
Function1e5d: ; 1e5d
|
||||
Function1e5d:: ; 1e5d
|
||||
call MenuFunc_1e7f
|
||||
call MenuWriteText
|
||||
call Function1eff
|
||||
@@ -234,7 +234,7 @@ Function1e5d: ; 1e5d
|
||||
ret
|
||||
; 1e70
|
||||
|
||||
SetUpMenu: ; 1e70
|
||||
SetUpMenu:: ; 1e70
|
||||
call MenuFunc_1e7f ; ???
|
||||
call MenuWriteText
|
||||
call Function1eff ; set up selection pointer
|
||||
@@ -242,14 +242,14 @@ SetUpMenu: ; 1e70
|
||||
set 7, [hl]
|
||||
ret
|
||||
|
||||
MenuFunc_1e7f: ; 0x1e7f
|
||||
MenuFunc_1e7f:: ; 0x1e7f
|
||||
call Function1c66
|
||||
call Function1ebd
|
||||
call Function1ea6
|
||||
call Function1cbb
|
||||
ret
|
||||
|
||||
MenuWriteText: ; 0x1e8c
|
||||
MenuWriteText:: ; 0x1e8c
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
call Function1ebd ; sort out the text
|
||||
@@ -265,7 +265,7 @@ MenuWriteText: ; 0x1e8c
|
||||
ret
|
||||
; 0x1ea6
|
||||
|
||||
Function1ea6: ; 1ea6
|
||||
Function1ea6:: ; 1ea6
|
||||
ld a, [$cf83]
|
||||
ld c, a
|
||||
ld a, [$cf85]
|
||||
@@ -281,7 +281,7 @@ Function1ea6: ; 1ea6
|
||||
ret
|
||||
; 1ebd
|
||||
|
||||
Function1ebd: ; 1ebd
|
||||
Function1ebd:: ; 1ebd
|
||||
ld hl, $cf93
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
@@ -306,7 +306,7 @@ Function1ebd: ; 1ebd
|
||||
ret
|
||||
; 1eda
|
||||
|
||||
Function1eda: ; 1eda
|
||||
Function1eda:: ; 1eda
|
||||
call Function1cfd
|
||||
ld bc, $002a
|
||||
add hl, bc
|
||||
@@ -329,14 +329,14 @@ Function1eda: ; 1eda
|
||||
jr .asm_1ee1
|
||||
; 1efb
|
||||
|
||||
Function1efb: ; 1efb
|
||||
Function1efb:: ; 1efb
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
jp [hl]
|
||||
; 1eff
|
||||
|
||||
Function1eff: ; 1eff
|
||||
Function1eff:: ; 1eff
|
||||
call Function1c10
|
||||
ld hl, $cfa8
|
||||
ld a, [$cf91]
|
||||
@@ -356,20 +356,20 @@ Function1eff: ; 1eff
|
||||
; 1f1a
|
||||
|
||||
|
||||
Function1f1a: ; 1f1a
|
||||
Function1f1a:: ; 1f1a
|
||||
call Function1bd3
|
||||
ld hl, $cfa8
|
||||
and [hl]
|
||||
jr Function1f2a
|
||||
; 1f23
|
||||
|
||||
Function1f23: ; 1f23
|
||||
Function1f23:: ; 1f23
|
||||
xor a
|
||||
ld [$cf73], a
|
||||
call Function1bc9
|
||||
; 1f2a
|
||||
|
||||
Function1f2a: ; 1f2a
|
||||
Function1f2a:: ; 1f2a
|
||||
bit 0, a
|
||||
jr nz, .asm_1f52
|
||||
bit 1, a
|
||||
@@ -420,7 +420,7 @@ Function1f2a: ; 1f2a
|
||||
ret
|
||||
; 1f79
|
||||
|
||||
Function1f79: ; 1f79
|
||||
Function1f79:: ; 1f79
|
||||
push de
|
||||
ld hl, $cf97
|
||||
ld a, [hli]
|
||||
@@ -435,7 +435,7 @@ Function1f79: ; 1f79
|
||||
ret
|
||||
; 1f8d
|
||||
|
||||
Function1f8d: ; 1f8d
|
||||
Function1f8d:: ; 1f8d
|
||||
push de
|
||||
ld a, [MenuSelection]
|
||||
call Function1fb1
|
||||
@@ -449,7 +449,7 @@ Function1f8d: ; 1f8d
|
||||
ret
|
||||
; 1f9e
|
||||
|
||||
Function1f9e: ; 1f9e
|
||||
Function1f9e:: ; 1f9e
|
||||
call Function1fb1
|
||||
inc hl
|
||||
inc hl
|
||||
@@ -459,7 +459,7 @@ Function1f9e: ; 1f9e
|
||||
ret
|
||||
; 1fa7
|
||||
|
||||
Function1fa7: ; 1fa7
|
||||
Function1fa7:: ; 1fa7
|
||||
ld a, [MenuSelection]
|
||||
call Function1fb1
|
||||
ld a, [hli]
|
||||
@@ -468,7 +468,7 @@ Function1fa7: ; 1fa7
|
||||
jp [hl]
|
||||
; 1fb1
|
||||
|
||||
Function1fb1: ; 1fb1
|
||||
Function1fb1:: ; 1fb1
|
||||
ld e, a
|
||||
ld d, $0
|
||||
ld hl, $cf97
|
||||
@@ -482,7 +482,7 @@ Function1fb1: ; 1fb1
|
||||
ret
|
||||
; 1fbf
|
||||
|
||||
Function1fbf: ; 1fbf
|
||||
Function1fbf:: ; 1fbf
|
||||
ld hl, $cf71
|
||||
call Function1ff0
|
||||
ld hl, $cf81
|
||||
@@ -508,14 +508,14 @@ Function1fbf: ; 1fbf
|
||||
ret
|
||||
; 1ff0
|
||||
|
||||
Function1ff0: ; 1ff0
|
||||
Function1ff0:: ; 1ff0
|
||||
ld bc, $0010
|
||||
xor a
|
||||
call ByteFill
|
||||
ret
|
||||
; 1ff8
|
||||
|
||||
Function1ff8: ; 1ff8
|
||||
Function1ff8:: ; 1ff8
|
||||
push af
|
||||
and $3
|
||||
jr z, .asm_2007
|
||||
@@ -530,7 +530,7 @@ Function1ff8: ; 1ff8
|
||||
; 2009
|
||||
|
||||
|
||||
PlayClickSFX: ; 2009
|
||||
PlayClickSFX:: ; 2009
|
||||
push de
|
||||
ld de, SFX_READ_TEXT_2
|
||||
call PlaySFX
|
||||
@@ -538,14 +538,14 @@ PlayClickSFX: ; 2009
|
||||
ret
|
||||
; 0x2012
|
||||
|
||||
Function2012: ; 2012
|
||||
Function2012:: ; 2012
|
||||
call Function1d4f
|
||||
call Functiona46
|
||||
call Function1c07
|
||||
ret
|
||||
; 201c
|
||||
|
||||
Function201c: ; 201c
|
||||
Function201c:: ; 201c
|
||||
ld [hBuffer], a
|
||||
ld a, [hROMBank]
|
||||
push af
|
||||
@@ -559,7 +559,7 @@ Function201c: ; 201c
|
||||
ret
|
||||
; 202a
|
||||
|
||||
Function202a: ; 202a
|
||||
Function202a:: ; 202a
|
||||
ld a, [hROMBank]
|
||||
ld [$cf94], a
|
||||
callba Function2400e
|
||||
@@ -567,7 +567,7 @@ Function202a: ; 202a
|
||||
ret
|
||||
; 2039
|
||||
|
||||
Function2039: ; 2039
|
||||
Function2039:: ; 2039
|
||||
ld a, [hROMBank]
|
||||
ld [$cf94], a
|
||||
callba Function24022
|
||||
@@ -575,7 +575,7 @@ Function2039: ; 2039
|
||||
ret
|
||||
; 2048
|
||||
|
||||
Function2048: ; 2048
|
||||
Function2048:: ; 2048
|
||||
ld a, [hROMBank]
|
||||
ld [$cf94], a
|
||||
callba Function2403c
|
||||
@@ -583,7 +583,7 @@ Function2048: ; 2048
|
||||
ret
|
||||
; 2057
|
||||
|
||||
Function2057: ; 2057
|
||||
Function2057:: ; 2057
|
||||
ld a, [hROMBank]
|
||||
push af
|
||||
ld a, $21
|
||||
|
@@ -1,4 +1,4 @@
|
||||
Function1b1e: ; 1b1e
|
||||
Function1b1e:: ; 1b1e
|
||||
ld [$d003], a
|
||||
xor a
|
||||
ld [DefaultFlypoint], a
|
||||
@@ -11,7 +11,7 @@ Function1b1e: ; 1b1e
|
||||
ret
|
||||
; 1b35
|
||||
|
||||
Function1b35: ; 1b35
|
||||
Function1b35:: ; 1b35
|
||||
ld a, [DefaultFlypoint]
|
||||
and a
|
||||
ret z
|
||||
@@ -20,7 +20,7 @@ Function1b35: ; 1b35
|
||||
ret
|
||||
; 1b3f
|
||||
|
||||
Function1b3f: ; 1b3f
|
||||
Function1b3f:: ; 1b3f
|
||||
push hl
|
||||
push de
|
||||
ld hl, DefaultFlypoint
|
||||
@@ -35,7 +35,7 @@ Function1b3f: ; 1b3f
|
||||
ret
|
||||
; 1b50
|
||||
|
||||
Function1b50: ; 1b50
|
||||
Function1b50:: ; 1b50
|
||||
push af
|
||||
ld a, c
|
||||
and a
|
||||
@@ -52,7 +52,7 @@ Function1b50: ; 1b50
|
||||
ret
|
||||
; 1b5f
|
||||
|
||||
Function1b5f: ; 1b5f
|
||||
Function1b5f:: ; 1b5f
|
||||
push af
|
||||
ld a, b
|
||||
sub d
|
||||
@@ -97,7 +97,7 @@ Function1b5f: ; 1b5f
|
||||
ret
|
||||
; 1b92
|
||||
|
||||
Function1b92: ; 1b92
|
||||
Function1b92:: ; 1b92
|
||||
push de
|
||||
push hl
|
||||
ld l, b
|
||||
@@ -119,7 +119,7 @@ Function1b92: ; 1b92
|
||||
db 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19
|
||||
; 1bb1
|
||||
|
||||
Function1bb1: ; 1bb1
|
||||
Function1bb1:: ; 1bb1
|
||||
push hl
|
||||
push bc
|
||||
ld hl, $cfa1
|
||||
@@ -142,19 +142,19 @@ Function1bb1: ; 1bb1
|
||||
ret
|
||||
; 1bc9
|
||||
|
||||
Function1bc9: ; 1bc9
|
||||
Function1bc9:: ; 1bc9
|
||||
callab Function241a8
|
||||
call Function1bdd
|
||||
ret
|
||||
; 1bd3
|
||||
|
||||
Function1bd3: ; 1bd3
|
||||
Function1bd3:: ; 1bd3
|
||||
callab Function241ab
|
||||
call Function1bdd
|
||||
ret
|
||||
; 1bdd
|
||||
|
||||
Function1bdd: ; 1bdd
|
||||
Function1bdd:: ; 1bdd
|
||||
push bc
|
||||
push af
|
||||
ld a, [$ffa9]
|
||||
@@ -170,7 +170,7 @@ Function1bdd: ; 1bdd
|
||||
ret
|
||||
; 1bee
|
||||
|
||||
Function1bee: ; 1bee
|
||||
Function1bee:: ; 1bee
|
||||
ld hl, $cfac
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
@@ -179,7 +179,7 @@ Function1bee: ; 1bee
|
||||
ret
|
||||
; 1bf7
|
||||
|
||||
Function1bf7: ; 1bf7
|
||||
Function1bf7:: ; 1bf7
|
||||
ld hl, $cfac
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
@@ -188,22 +188,22 @@ Function1bf7: ; 1bf7
|
||||
ret
|
||||
; 1c00
|
||||
|
||||
Function1c00: ; 1c00
|
||||
Function1c00:: ; 1c00
|
||||
callab Function24374
|
||||
ret
|
||||
; 1c07
|
||||
|
||||
Function1c07: ; 0x1c07
|
||||
Function1c07:: ; 0x1c07
|
||||
push af
|
||||
callab Function243e8
|
||||
pop af
|
||||
ret
|
||||
|
||||
Function1c10: ; 0x1c10
|
||||
Function1c10:: ; 0x1c10
|
||||
callab Function2446d
|
||||
ret
|
||||
|
||||
Function1c17: ; 0x1c17
|
||||
Function1c17:: ; 0x1c17
|
||||
push af
|
||||
call Function1c07
|
||||
call Function321c
|
||||
@@ -211,7 +211,7 @@ Function1c17: ; 0x1c17
|
||||
pop af
|
||||
ret
|
||||
|
||||
Function1c23: ; 0x1c23
|
||||
Function1c23:: ; 0x1c23
|
||||
call Function1cfd
|
||||
call Function1c30
|
||||
call Function1d19
|
||||
|
@@ -1,7 +1,7 @@
|
||||
; Functions dealing with palettes.
|
||||
|
||||
|
||||
UpdatePalsIfCGB: ; c2f
|
||||
UpdatePalsIfCGB:: ; c2f
|
||||
; update bgp data from BGPals
|
||||
; update obp data from OBPals
|
||||
; return carry if successful
|
||||
@@ -12,7 +12,7 @@ UpdatePalsIfCGB: ; c2f
|
||||
ret z
|
||||
|
||||
|
||||
UpdateCGBPals: ; c33
|
||||
UpdateCGBPals:: ; c33
|
||||
; return carry if successful
|
||||
; any pals to update?
|
||||
ld a, [hCGBPalUpdate]
|
||||
@@ -20,7 +20,7 @@ UpdateCGBPals: ; c33
|
||||
ret z
|
||||
|
||||
|
||||
ForceUpdateCGBPals: ; c37
|
||||
ForceUpdateCGBPals:: ; c37
|
||||
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
@@ -71,7 +71,7 @@ ForceUpdateCGBPals: ; c37
|
||||
; c9f
|
||||
|
||||
|
||||
DmgToCgbBGPals: ; c9f
|
||||
DmgToCgbBGPals:: ; c9f
|
||||
; exists to forego reinserting cgb-converted image data
|
||||
|
||||
; input: a -> bgp
|
||||
@@ -116,7 +116,7 @@ DmgToCgbBGPals: ; c9f
|
||||
; ccb
|
||||
|
||||
|
||||
DmgToCgbObjPals: ; ccb
|
||||
DmgToCgbObjPals:: ; ccb
|
||||
; exists to forego reinserting cgb-converted image data
|
||||
|
||||
; input: d -> obp1
|
||||
@@ -162,7 +162,7 @@ DmgToCgbObjPals: ; ccb
|
||||
; cf8
|
||||
|
||||
|
||||
Functioncf8: ; cf8
|
||||
Functioncf8:: ; cf8
|
||||
ld [rOBP0], a
|
||||
push af
|
||||
ld a, [hCGB]
|
||||
@@ -194,7 +194,7 @@ Functioncf8: ; cf8
|
||||
ret
|
||||
; d24
|
||||
|
||||
Functiond24: ; d24
|
||||
Functiond24:: ; d24
|
||||
ld [rOBP1], a
|
||||
push af
|
||||
ld a, [hCGB]
|
||||
@@ -228,7 +228,7 @@ Functiond24: ; d24
|
||||
|
||||
|
||||
|
||||
CopyPals: ; d50
|
||||
CopyPals:: ; d50
|
||||
; copy c palettes in order b from de to hl
|
||||
|
||||
push bc
|
||||
@@ -281,7 +281,7 @@ CopyPals: ; d50
|
||||
; d79
|
||||
|
||||
|
||||
Functiond79: ; d79
|
||||
Functiond79:: ; d79
|
||||
ld a, [hCGB]
|
||||
and a
|
||||
ret z
|
||||
@@ -297,12 +297,12 @@ Functiond79: ; d79
|
||||
; d90
|
||||
|
||||
|
||||
Functiond90: ; d90
|
||||
Functiond90:: ; d90
|
||||
ret
|
||||
; d91
|
||||
|
||||
|
||||
Functiond91: ; d91
|
||||
Functiond91:: ; d91
|
||||
ld a, [hCGB]
|
||||
and a
|
||||
ret z
|
||||
@@ -323,7 +323,7 @@ Functiond91: ; d91
|
||||
; db1
|
||||
|
||||
|
||||
Functiondb1: ; db1
|
||||
Functiondb1:: ; db1
|
||||
ld a, [hROMBank]
|
||||
push af
|
||||
ld a, BANK(Function4c000)
|
||||
@@ -334,7 +334,7 @@ Functiondb1: ; db1
|
||||
ret
|
||||
; dbd
|
||||
|
||||
Functiondbd: ; dbd
|
||||
Functiondbd:: ; dbd
|
||||
ld a, [hROMBank]
|
||||
push af
|
||||
ld a, BANK(Function4c03f)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user