mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Elevator
This commit is contained in:
parent
42dd25b3e5
commit
fe4ef4e595
@ -1,7 +1,7 @@
|
|||||||
DoPlayerTurn: ; 34000
|
DoPlayerTurn: ; 34000
|
||||||
call SetPlayerTurn
|
call SetPlayerTurn
|
||||||
|
|
||||||
ld a, [wd0ec]
|
ld a, [wPlayerAction]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
@ -9025,7 +9025,7 @@ BatonPass_LinkPlayerSwitch: ; 37a67
|
|||||||
ret z
|
ret z
|
||||||
|
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wd0ec], a
|
ld [wPlayerAction], a
|
||||||
|
|
||||||
call LoadStandardMenuDataHeader
|
call LoadStandardMenuDataHeader
|
||||||
ld hl, LinkBattleSendReceiveAction
|
ld hl, LinkBattleSendReceiveAction
|
||||||
@ -9033,7 +9033,7 @@ BatonPass_LinkPlayerSwitch: ; 37a67
|
|||||||
call WriteBackup
|
call WriteBackup
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [wd0ec], a
|
ld [wPlayerAction], a
|
||||||
ret
|
ret
|
||||||
; 37a82
|
; 37a82
|
||||||
|
|
||||||
|
@ -662,7 +662,7 @@ MenuDataHeader_Buy: ; 0x15e18
|
|||||||
; 15e30
|
; 15e30
|
||||||
|
|
||||||
.PrintBCDPrices: ; 15e30
|
.PrintBCDPrices: ; 15e30
|
||||||
ld a, [wcf77]
|
ld a, [wScrollingMenuCursorPosition]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld b, 0
|
ld b, 0
|
||||||
ld hl, wMartItem1BCD
|
ld hl, wMartItem1BCD
|
||||||
|
@ -167,11 +167,11 @@ UseRegisteredItem: ; 133c3
|
|||||||
.Overworld ; 13406
|
.Overworld ; 13406
|
||||||
call ResetWindow
|
call ResetWindow
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wd0ef], a
|
ld [wUsingItemWithSelect], a
|
||||||
call DoItemEffect
|
call DoItemEffect
|
||||||
xor a
|
xor a
|
||||||
ld [wd0ef], a
|
ld [wUsingItemWithSelect], a
|
||||||
ld a, [wd0ec]
|
ld a, [wItemEffectSucceeded]
|
||||||
cp 1
|
cp 1
|
||||||
jr nz, ._cantuse
|
jr nz, ._cantuse
|
||||||
scf
|
scf
|
||||||
|
@ -3,11 +3,11 @@ SwitchItemsInBag: ; 2490c (9:490c)
|
|||||||
and a
|
and a
|
||||||
jr z, .init
|
jr z, .init
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wCurrPocketCursorPosition]
|
ld a, [wScrollingMenuCursorPosition]
|
||||||
inc a
|
inc a
|
||||||
cp b
|
cp b
|
||||||
jr z, .trivial
|
jr z, .trivial
|
||||||
ld a, [wCurrPocketCursorPosition]
|
ld a, [wScrollingMenuCursorPosition]
|
||||||
call Function24a5c
|
call Function24a5c
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp $ff
|
cp $ff
|
||||||
@ -17,7 +17,7 @@ SwitchItemsInBag: ; 2490c (9:490c)
|
|||||||
ld [wSwitchItem], a
|
ld [wSwitchItem], a
|
||||||
call Function249a7
|
call Function249a7
|
||||||
jp c, Function249d1
|
jp c, Function249d1
|
||||||
ld a, [wCurrPocketCursorPosition]
|
ld a, [wScrollingMenuCursorPosition]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [wSwitchItem]
|
ld a, [wSwitchItem]
|
||||||
cp c
|
cp c
|
||||||
@ -25,7 +25,7 @@ SwitchItemsInBag: ; 2490c (9:490c)
|
|||||||
jr .asm_2494a
|
jr .asm_2494a
|
||||||
|
|
||||||
.init
|
.init
|
||||||
ld a, [wCurrPocketCursorPosition]
|
ld a, [wScrollingMenuCursorPosition]
|
||||||
inc a
|
inc a
|
||||||
ld [wSwitchItem], a
|
ld [wSwitchItem], a
|
||||||
ret
|
ret
|
||||||
@ -38,7 +38,7 @@ SwitchItemsInBag: ; 2490c (9:490c)
|
|||||||
.asm_2494a
|
.asm_2494a
|
||||||
ld a, [wSwitchItem]
|
ld a, [wSwitchItem]
|
||||||
call Function24a40
|
call Function24a40
|
||||||
ld a, [wCurrPocketCursorPosition]
|
ld a, [wScrollingMenuCursorPosition]
|
||||||
ld d, a
|
ld d, a
|
||||||
ld a, [wSwitchItem]
|
ld a, [wSwitchItem]
|
||||||
ld e, a
|
ld e, a
|
||||||
@ -55,7 +55,7 @@ SwitchItemsInBag: ; 2490c (9:490c)
|
|||||||
pop hl
|
pop hl
|
||||||
pop bc
|
pop bc
|
||||||
call Function24aab
|
call Function24aab
|
||||||
ld a, [wCurrPocketCursorPosition]
|
ld a, [wScrollingMenuCursorPosition]
|
||||||
call Function24a4d
|
call Function24a4d
|
||||||
xor a
|
xor a
|
||||||
ld [wSwitchItem], a
|
ld [wSwitchItem], a
|
||||||
@ -64,7 +64,7 @@ SwitchItemsInBag: ; 2490c (9:490c)
|
|||||||
.asm_2497a
|
.asm_2497a
|
||||||
ld a, [wSwitchItem]
|
ld a, [wSwitchItem]
|
||||||
call Function24a40
|
call Function24a40
|
||||||
ld a, [wCurrPocketCursorPosition]
|
ld a, [wScrollingMenuCursorPosition]
|
||||||
ld d, a
|
ld d, a
|
||||||
ld a, [wSwitchItem]
|
ld a, [wSwitchItem]
|
||||||
ld e, a
|
ld e, a
|
||||||
@ -78,7 +78,7 @@ SwitchItemsInBag: ; 2490c (9:490c)
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
pop bc
|
pop bc
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld a, [wCurrPocketCursorPosition]
|
ld a, [wScrollingMenuCursorPosition]
|
||||||
call Function24a4d
|
call Function24a4d
|
||||||
xor a
|
xor a
|
||||||
ld [wSwitchItem], a
|
ld [wSwitchItem], a
|
||||||
@ -89,12 +89,12 @@ Function249a7: ; 249a7 (9:49a7)
|
|||||||
call Function24a5c
|
call Function24a5c
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
ld a, [wCurrPocketCursorPosition]
|
ld a, [wScrollingMenuCursorPosition]
|
||||||
call Function24a5c
|
call Function24a5c
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jr nz, .asm_249cd
|
jr nz, .asm_249cd
|
||||||
ld a, [wCurrPocketCursorPosition]
|
ld a, [wScrollingMenuCursorPosition]
|
||||||
call Function24a97
|
call Function24a97
|
||||||
cp 99
|
cp 99
|
||||||
jr z, .asm_249cd
|
jr z, .asm_249cd
|
||||||
@ -115,7 +115,7 @@ Function249d1: ; 249d1 (9:49d1)
|
|||||||
call Function24a5c
|
call Function24a5c
|
||||||
inc hl
|
inc hl
|
||||||
push hl
|
push hl
|
||||||
ld a, [wCurrPocketCursorPosition]
|
ld a, [wScrollingMenuCursorPosition]
|
||||||
call Function24a5c
|
call Function24a5c
|
||||||
inc hl
|
inc hl
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@ -125,7 +125,7 @@ Function249d1: ; 249d1 (9:49d1)
|
|||||||
jr c, .asm_24a01
|
jr c, .asm_24a01
|
||||||
sub 99
|
sub 99
|
||||||
push af
|
push af
|
||||||
ld a, [wCurrPocketCursorPosition]
|
ld a, [wScrollingMenuCursorPosition]
|
||||||
call Function24a5c
|
call Function24a5c
|
||||||
inc hl
|
inc hl
|
||||||
ld [hl], 99
|
ld [hl], 99
|
||||||
@ -140,7 +140,7 @@ Function249d1: ; 249d1 (9:49d1)
|
|||||||
|
|
||||||
.asm_24a01
|
.asm_24a01
|
||||||
push af
|
push af
|
||||||
ld a, [wCurrPocketCursorPosition]
|
ld a, [wScrollingMenuCursorPosition]
|
||||||
call Function24a5c
|
call Function24a5c
|
||||||
inc hl
|
inc hl
|
||||||
pop af
|
pop af
|
||||||
|
@ -19,12 +19,12 @@ _BasementKey: ; 507b4
|
|||||||
ld hl, .BasementKeyScript
|
ld hl, .BasementKeyScript
|
||||||
call QueueScript
|
call QueueScript
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wd0ec], a
|
ld [wItemEffectSucceeded], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.nope
|
.nope
|
||||||
ld a, $0
|
ld a, $0
|
||||||
ld [wd0ec], a
|
ld [wItemEffectSucceeded], a
|
||||||
ret
|
ret
|
||||||
; 507e1
|
; 507e1
|
||||||
|
|
||||||
|
@ -24,12 +24,12 @@ _CardKey: ; 50779
|
|||||||
ld hl, .CardKeyScript
|
ld hl, .CardKeyScript
|
||||||
call QueueScript
|
call QueueScript
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wd0ec], a
|
ld [wItemEffectSucceeded], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.nope
|
.nope
|
||||||
ld a, $0
|
ld a, $0
|
||||||
ld [wd0ec], a
|
ld [wItemEffectSucceeded], a
|
||||||
ret
|
ret
|
||||||
; 507af
|
; 507af
|
||||||
|
|
||||||
|
@ -1,62 +1,62 @@
|
|||||||
Elevator:: ; 1342d
|
Elevator:: ; 1342d
|
||||||
call Function1344a
|
call .LoadPointer
|
||||||
call Function1347d
|
call .FindCurrentFloor
|
||||||
jr c, .asm_13448
|
jr c, .quit
|
||||||
ld [wd041], a
|
ld [wElevatorOriginFloor], a
|
||||||
call Function134dd
|
call Elevator_AskWhichFloor
|
||||||
jr c, .asm_13448
|
jr c, .quit
|
||||||
ld hl, wd041
|
ld hl, wElevatorOriginFloor
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jr z, .asm_13448
|
jr z, .quit
|
||||||
call Function134c0
|
call Elevator_GoToFloor
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_13448
|
.quit
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
; 1344a
|
; 1344a
|
||||||
|
|
||||||
Function1344a: ; 1344a
|
.LoadPointer: ; 1344a
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [EngineBuffer1], a
|
ld [wElevatorPointerBank], a
|
||||||
ld a, e
|
ld a, e
|
||||||
ld [wd03f], a
|
ld [wElevatorPointerLo], a
|
||||||
ld a, d
|
ld a, d
|
||||||
ld [wd040], a
|
ld [wElevatorPointerHi], a
|
||||||
call Function1345a
|
call .LoadFloors
|
||||||
ret
|
ret
|
||||||
; 1345a
|
; 1345a
|
||||||
|
|
||||||
Function1345a: ; 1345a
|
.LoadFloors: ; 1345a
|
||||||
ld de, OBPals + 8 * 6
|
ld de, CurElevator
|
||||||
ld bc, 4
|
ld bc, 4
|
||||||
ld hl, wd03f
|
ld hl, wElevatorPointerLo
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, [EngineBuffer1]
|
ld a, [wElevatorPointerBank]
|
||||||
call GetFarByte
|
call GetFarByte
|
||||||
inc hl
|
inc hl
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
inc de
|
||||||
.asm_1346f
|
.loop
|
||||||
ld a, [EngineBuffer1]
|
ld a, [wElevatorPointerBank]
|
||||||
call GetFarByte
|
call GetFarByte
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
inc de
|
||||||
add hl, bc
|
add hl, bc
|
||||||
cp $ff
|
cp -1
|
||||||
jr nz, .asm_1346f
|
jr nz, .loop
|
||||||
ret
|
ret
|
||||||
; 1347d
|
; 1347d
|
||||||
|
|
||||||
Function1347d: ; 1347d
|
.FindCurrentFloor: ; 1347d
|
||||||
ld hl, wd03f
|
ld hl, wElevatorPointerLo
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, [EngineBuffer1]
|
ld a, [wElevatorPointerBank]
|
||||||
call GetFarByte
|
call GetFarByte
|
||||||
ld c, a
|
ld c, a
|
||||||
inc hl
|
inc hl
|
||||||
@ -64,47 +64,46 @@ Function1347d: ; 1347d
|
|||||||
ld d, a
|
ld d, a
|
||||||
ld a, [BackupMapNumber]
|
ld a, [BackupMapNumber]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld b, $0
|
ld b, 0
|
||||||
.asm_13495
|
.loop2
|
||||||
ld a, [EngineBuffer1]
|
ld a, [wElevatorPointerBank]
|
||||||
call GetFarByte
|
call GetFarByte
|
||||||
cp $ff
|
cp -1
|
||||||
jr z, .asm_134be
|
jr z, .fail
|
||||||
rept 2
|
rept 2
|
||||||
inc hl
|
inc hl
|
||||||
endr
|
endr
|
||||||
ld a, [EngineBuffer1]
|
ld a, [wElevatorPointerBank]
|
||||||
call GetFarByte
|
call GetFarByte
|
||||||
inc hl
|
inc hl
|
||||||
cp d
|
cp d
|
||||||
jr nz, .asm_134b7
|
jr nz, .next1
|
||||||
ld a, [EngineBuffer1]
|
ld a, [wElevatorPointerBank]
|
||||||
call GetFarByte
|
call GetFarByte
|
||||||
inc hl
|
inc hl
|
||||||
cp e
|
cp e
|
||||||
jr nz, .asm_134b8
|
jr nz, .next2
|
||||||
jr .asm_134bb
|
jr .done
|
||||||
|
|
||||||
.asm_134b7
|
.next1
|
||||||
inc hl
|
inc hl
|
||||||
|
.next2
|
||||||
.asm_134b8
|
|
||||||
inc b
|
inc b
|
||||||
jr .asm_13495
|
jr .loop2
|
||||||
|
|
||||||
.asm_134bb
|
.done
|
||||||
xor a
|
xor a
|
||||||
ld a, b
|
ld a, b
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_134be
|
.fail
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
; 134c0
|
; 134c0
|
||||||
|
|
||||||
Function134c0: ; 134c0
|
Elevator_GoToFloor: ; 134c0
|
||||||
push af
|
push af
|
||||||
ld hl, wd03f
|
ld hl, wElevatorPointerLo
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
ld l, a
|
ld l, a
|
||||||
@ -114,13 +113,13 @@ Function134c0: ; 134c0
|
|||||||
call AddNTimes
|
call AddNTimes
|
||||||
inc hl
|
inc hl
|
||||||
ld de, BackupWarpNumber
|
ld de, BackupWarpNumber
|
||||||
ld a, [EngineBuffer1]
|
ld a, [wElevatorPointerBank]
|
||||||
ld bc, 3
|
ld bc, 3
|
||||||
call FarCopyBytes
|
call FarCopyBytes
|
||||||
ret
|
ret
|
||||||
; 134dd
|
; 134dd
|
||||||
|
|
||||||
Function134dd: ; 134dd
|
Elevator_AskWhichFloor: ; 134dd
|
||||||
call LoadStandardMenuDataHeader
|
call LoadStandardMenuDataHeader
|
||||||
ld hl, Elevator_WhichFloorText
|
ld hl, Elevator_WhichFloorText
|
||||||
call PrintText
|
call PrintText
|
||||||
@ -134,13 +133,13 @@ Function134dd: ; 134dd
|
|||||||
call HandleScrollingMenu
|
call HandleScrollingMenu
|
||||||
call WriteBackup
|
call WriteBackup
|
||||||
ld a, [wMenuJoypad]
|
ld a, [wMenuJoypad]
|
||||||
cp $2
|
cp B_BUTTON
|
||||||
jr z, .asm_1350b
|
jr z, .cancel
|
||||||
xor a
|
xor a
|
||||||
ld a, [wcf77]
|
ld a, [wScrollingMenuCursorPosition]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_1350b
|
.cancel
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
; 1350d
|
; 1350d
|
||||||
@ -178,10 +177,10 @@ Elevator_CurrentFloorText: ; 13537
|
|||||||
|
|
||||||
Elevator_GetCurrentFloorString: ; 1353f
|
Elevator_GetCurrentFloorString: ; 1353f
|
||||||
push hl
|
push hl
|
||||||
ld a, [wd041]
|
ld a, [wElevatorOriginFloor]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld hl, wd0f1
|
ld hl, CurElevatorFloors
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
pop de
|
pop de
|
||||||
@ -201,7 +200,7 @@ Elevator_MenuData2: ; 0x13558
|
|||||||
db $10 ; flags
|
db $10 ; flags
|
||||||
db 4, 0 ; rows, columns
|
db 4, 0 ; rows, columns
|
||||||
db 1 ; horizontal spacing
|
db 1 ; horizontal spacing
|
||||||
dbw 0, OBPals + 8 * 6
|
dbw 0, CurElevator
|
||||||
dba GetElevatorFlorStrings
|
dba GetElevatorFlorStrings
|
||||||
dba NULL
|
dba NULL
|
||||||
dba NULL
|
dba NULL
|
||||||
@ -209,7 +208,6 @@ Elevator_MenuData2: ; 0x13558
|
|||||||
|
|
||||||
GetElevatorFlorStrings: ; 13568
|
GetElevatorFlorStrings: ; 13568
|
||||||
ld a, [MenuSelection]
|
ld a, [MenuSelection]
|
||||||
|
|
||||||
GetFloorString: ; 1356b
|
GetFloorString: ; 1356b
|
||||||
push de
|
push de
|
||||||
call FloorToString
|
call FloorToString
|
||||||
|
@ -10,7 +10,7 @@ ItemFinder: ; 12580
|
|||||||
.resume
|
.resume
|
||||||
call QueueScript
|
call QueueScript
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wd0ec], a
|
ld [wItemEffectSucceeded], a
|
||||||
ret
|
ret
|
||||||
; 12599
|
; 12599
|
||||||
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
|
|
||||||
_SacredAsh: ; 507e6
|
_SacredAsh: ; 507e6
|
||||||
ld a, $0
|
ld a, $0
|
||||||
ld [wd0ec], a
|
ld [wItemEffectSucceeded], a
|
||||||
call CheckAnyFaintedMon
|
call CheckAnyFaintedMon
|
||||||
ret nc
|
ret nc
|
||||||
|
|
||||||
ld hl, SacredAshScript
|
ld hl, SacredAshScript
|
||||||
call QueueScript
|
call QueueScript
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wd0ec], a
|
ld [wItemEffectSucceeded], a
|
||||||
ret
|
ret
|
||||||
; 507fb
|
; 507fb
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ _Squirtbottle: ; 50730
|
|||||||
ld hl, UnknownScript_0x5073c
|
ld hl, UnknownScript_0x5073c
|
||||||
call QueueScript
|
call QueueScript
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wd0ec], a
|
ld [wItemEffectSucceeded], a
|
||||||
ret
|
ret
|
||||||
; 5073c
|
; 5073c
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ SweetScentFromMenu: ; 506bc
|
|||||||
ld hl, UnknownScript_0x506c8
|
ld hl, UnknownScript_0x506c8
|
||||||
call QueueScript
|
call QueueScript
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wd0ec], a
|
ld [wFieldMoveSucceeded], a
|
||||||
ret
|
ret
|
||||||
; 506c8
|
; 506c8
|
||||||
|
|
||||||
|
56
main.asm
56
main.asm
@ -351,7 +351,7 @@ endr
|
|||||||
ret z
|
ret z
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wd0d8]
|
ld a, [wPartyMenuCursor]
|
||||||
cp b
|
cp b
|
||||||
ret nz
|
ret nz
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
@ -2272,7 +2272,7 @@ CutFunction: ; c785
|
|||||||
call FieldMoveJumptable
|
call FieldMoveJumptable
|
||||||
jr nc, .loop
|
jr nc, .loop
|
||||||
and $7f
|
and $7f
|
||||||
ld [wd0ec], a
|
ld [wFieldMoveSucceeded], a
|
||||||
ret
|
ret
|
||||||
; c796
|
; c796
|
||||||
|
|
||||||
@ -2491,7 +2491,7 @@ WhirlpoolBlockPointers: ; c8a4
|
|||||||
OWFlash: ; c8ac
|
OWFlash: ; c8ac
|
||||||
call .CheckUseFlash
|
call .CheckUseFlash
|
||||||
and $7f
|
and $7f
|
||||||
ld [wd0ec], a
|
ld [wFieldMoveSucceeded], a
|
||||||
ret
|
ret
|
||||||
; c8b5
|
; c8b5
|
||||||
|
|
||||||
@ -2558,7 +2558,7 @@ SurfFunction: ; c909
|
|||||||
call FieldMoveJumptable
|
call FieldMoveJumptable
|
||||||
jr nc, .loop
|
jr nc, .loop
|
||||||
and $7f
|
and $7f
|
||||||
ld [wd0ec], a
|
ld [wFieldMoveSucceeded], a
|
||||||
ret
|
ret
|
||||||
; c91a
|
; c91a
|
||||||
|
|
||||||
@ -2778,16 +2778,16 @@ AskSurfText: ; ca36
|
|||||||
|
|
||||||
FlyFunction: ; ca3b
|
FlyFunction: ; ca3b
|
||||||
call ClearBuffer1
|
call ClearBuffer1
|
||||||
.asm_ca3e
|
.loop
|
||||||
ld hl, .data_ca4c
|
ld hl, .Jumptable
|
||||||
call FieldMoveJumptable
|
call FieldMoveJumptable
|
||||||
jr nc, .asm_ca3e
|
jr nc, .loop
|
||||||
and $7f
|
and $7f
|
||||||
ld [wd0ec], a
|
ld [wFieldMoveSucceeded], a
|
||||||
ret
|
ret
|
||||||
; ca4c
|
; ca4c
|
||||||
|
|
||||||
.data_ca4c
|
.Jumptable
|
||||||
dw .TryFly
|
dw .TryFly
|
||||||
dw .DoFly
|
dw .DoFly
|
||||||
dw .FailFly
|
dw .FailFly
|
||||||
@ -2875,7 +2875,7 @@ FlyFunction: ; ca3b
|
|||||||
Functioncade: ; cade
|
Functioncade: ; cade
|
||||||
call AttemptToWaterfall
|
call AttemptToWaterfall
|
||||||
and $7f
|
and $7f
|
||||||
ld [wd0ec], a
|
ld [wFieldMoveSucceeded], a
|
||||||
ret
|
ret
|
||||||
; cae7
|
; cae7
|
||||||
|
|
||||||
@ -3015,7 +3015,7 @@ dig_incave
|
|||||||
call FieldMoveJumptable
|
call FieldMoveJumptable
|
||||||
jr nc, .loop
|
jr nc, .loop
|
||||||
and $7f
|
and $7f
|
||||||
ld [wd0ec], a
|
ld [wFieldMoveSucceeded], a
|
||||||
ret
|
ret
|
||||||
; cbb2
|
; cbb2
|
||||||
|
|
||||||
@ -3149,7 +3149,7 @@ TeleportFunction: ; cc61
|
|||||||
call FieldMoveJumptable
|
call FieldMoveJumptable
|
||||||
jr nc, .loop
|
jr nc, .loop
|
||||||
and $7f
|
and $7f
|
||||||
ld [wd0ec], a
|
ld [wFieldMoveSucceeded], a
|
||||||
ret
|
ret
|
||||||
; cc72
|
; cc72
|
||||||
|
|
||||||
@ -3240,7 +3240,7 @@ Script_UsedTeleport: ; 0xccbb
|
|||||||
StrengthFunction: ; cce5
|
StrengthFunction: ; cce5
|
||||||
call .TryStrength
|
call .TryStrength
|
||||||
and $7f
|
and $7f
|
||||||
ld [wd0ec], a
|
ld [wFieldMoveSucceeded], a
|
||||||
ret
|
ret
|
||||||
; ccee
|
; ccee
|
||||||
|
|
||||||
@ -3397,7 +3397,7 @@ WhirlpoolFunction: ; cd9d
|
|||||||
call FieldMoveJumptable
|
call FieldMoveJumptable
|
||||||
jr nc, .loop
|
jr nc, .loop
|
||||||
and $7f
|
and $7f
|
||||||
ld [wd0ec], a
|
ld [wFieldMoveSucceeded], a
|
||||||
ret
|
ret
|
||||||
; cdae
|
; cdae
|
||||||
|
|
||||||
@ -3554,7 +3554,7 @@ UnknownText_0xce78: ; 0xce78
|
|||||||
HeadbuttFunction: ; ce7d
|
HeadbuttFunction: ; ce7d
|
||||||
call TryHeadbuttFromMenu
|
call TryHeadbuttFromMenu
|
||||||
and $7f
|
and $7f
|
||||||
ld [wd0ec], a
|
ld [wFieldMoveSucceeded], a
|
||||||
ret
|
ret
|
||||||
; ce86
|
; ce86
|
||||||
|
|
||||||
@ -3646,7 +3646,7 @@ UnknownText_0xcee6: ; 0xcee6
|
|||||||
RockSmashFunction: ; ceeb
|
RockSmashFunction: ; ceeb
|
||||||
call TryRockSmashFromMenu
|
call TryRockSmashFromMenu
|
||||||
and $7f
|
and $7f
|
||||||
ld [wd0ec], a
|
ld [wFieldMoveSucceeded], a
|
||||||
ret
|
ret
|
||||||
; cef4
|
; cef4
|
||||||
|
|
||||||
@ -3775,7 +3775,7 @@ FishFunction: ; cf8e
|
|||||||
call FieldMoveJumptable
|
call FieldMoveJumptable
|
||||||
jr nc, .loop
|
jr nc, .loop
|
||||||
and $7f
|
and $7f
|
||||||
ld [wd0ec], a
|
ld [wFieldMoveSucceeded], a
|
||||||
ret
|
ret
|
||||||
; cfa5
|
; cfa5
|
||||||
|
|
||||||
@ -3988,7 +3988,7 @@ UnknownText_0xd0ae: ; unused
|
|||||||
BikeFunction: ; d0b3
|
BikeFunction: ; d0b3
|
||||||
call .TryBike
|
call .TryBike
|
||||||
and $7f
|
and $7f
|
||||||
ld [wd0ec], a
|
ld [wFieldMoveSucceeded], a
|
||||||
ret
|
ret
|
||||||
; d0bc
|
; d0bc
|
||||||
|
|
||||||
@ -4045,7 +4045,7 @@ BikeFunction: ; d0b3
|
|||||||
; d119
|
; d119
|
||||||
|
|
||||||
.CheckIfRegistered: ; d119
|
.CheckIfRegistered: ; d119
|
||||||
ld a, [wd0ef]
|
ld a, [wUsingItemWithSelect]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
ld h, d
|
ld h, d
|
||||||
@ -8047,7 +8047,7 @@ MenuJoyAction: ; 24609
|
|||||||
ld [wItemQuantityBuffer], a
|
ld [wItemQuantityBuffer], a
|
||||||
call Function246fc
|
call Function246fc
|
||||||
dec a
|
dec a
|
||||||
ld [wcf77], a
|
ld [wScrollingMenuCursorPosition], a
|
||||||
ld [wd107], a
|
ld [wd107], a
|
||||||
ld a, [MenuSelection]
|
ld a, [MenuSelection]
|
||||||
cp -1
|
cp -1
|
||||||
@ -8075,7 +8075,7 @@ MenuJoyAction: ; 24609
|
|||||||
jp z, xor_a_dec_a
|
jp z, xor_a_dec_a
|
||||||
call Function246fc
|
call Function246fc
|
||||||
dec a
|
dec a
|
||||||
ld [wcf77], a
|
ld [wScrollingMenuCursorPosition], a
|
||||||
ld a, SELECT
|
ld a, SELECT
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
@ -8335,7 +8335,7 @@ Function247f0: ; 247f0
|
|||||||
.asm_2481a
|
.asm_2481a
|
||||||
ld a, [wMenuScrollPosition]
|
ld a, [wMenuScrollPosition]
|
||||||
add c
|
add c
|
||||||
ld [wcf77], a
|
ld [wScrollingMenuCursorPosition], a
|
||||||
ld a, c
|
ld a, c
|
||||||
call Function248d5
|
call Function248d5
|
||||||
ld a, [MenuSelection]
|
ld a, [MenuSelection]
|
||||||
@ -9681,10 +9681,10 @@ PlayBattleMusic: ; 2ee6c
|
|||||||
|
|
||||||
ClearBattleRAM: ; 2ef18
|
ClearBattleRAM: ; 2ef18
|
||||||
xor a
|
xor a
|
||||||
ld [wd0ec], a
|
ld [wPlayerAction], a
|
||||||
ld [wBattleResult], a
|
ld [wBattleResult], a
|
||||||
|
|
||||||
ld hl, wd0d8
|
ld hl, wPartyMenuCursor
|
||||||
rept 3
|
rept 3
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
endr
|
endr
|
||||||
@ -9726,7 +9726,7 @@ endr
|
|||||||
ld hl, hBGMapAddress
|
ld hl, hBGMapAddress
|
||||||
xor a
|
xor a
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld [hl], $98
|
ld [hl], VBGMap0 / $100
|
||||||
ret
|
ret
|
||||||
; 2ef6e
|
; 2ef6e
|
||||||
|
|
||||||
@ -9735,11 +9735,11 @@ FillBox: ; 2ef6e
|
|||||||
; with iterating tile starting from hFillBox at hl.
|
; with iterating tile starting from hFillBox at hl.
|
||||||
; Predef $13
|
; Predef $13
|
||||||
|
|
||||||
ld de, 20
|
ld de, SCREEN_WIDTH
|
||||||
|
|
||||||
ld a, [wc2c6]
|
ld a, [wc2c6]
|
||||||
and a
|
and a
|
||||||
jr nz, .left
|
jr nz, .right
|
||||||
|
|
||||||
ld a, [hFillBox]
|
ld a, [hFillBox]
|
||||||
.x1
|
.x1
|
||||||
@ -9760,7 +9760,7 @@ FillBox: ; 2ef6e
|
|||||||
jr nz, .x1
|
jr nz, .x1
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.left
|
.right
|
||||||
; Right-aligned.
|
; Right-aligned.
|
||||||
push bc
|
push bc
|
||||||
ld b, 0
|
ld b, 0
|
||||||
|
@ -55,7 +55,7 @@ Elevator_0x566e0:
|
|||||||
elevfloor _4F, 3, GOLDENROD_DEPT_STORE_4F
|
elevfloor _4F, 3, GOLDENROD_DEPT_STORE_4F
|
||||||
elevfloor _5F, 3, GOLDENROD_DEPT_STORE_5F
|
elevfloor _5F, 3, GOLDENROD_DEPT_STORE_5F
|
||||||
elevfloor _6F, 2, GOLDENROD_DEPT_STORE_6F
|
elevfloor _6F, 2, GOLDENROD_DEPT_STORE_6F
|
||||||
db $ff ; end
|
db -1 ; end
|
||||||
|
|
||||||
|
|
||||||
GoldenrodDeptStoreElevator_MapEventHeader:
|
GoldenrodDeptStoreElevator_MapEventHeader:
|
||||||
|
@ -426,7 +426,7 @@ Function48383: ; 48383 (12:4383)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Function483bb: ; 483bb (12:43bb)
|
Function483bb: ; 483bb (12:43bb)
|
||||||
ld hl, wcf77
|
ld hl, wScrollingMenuCursorPosition
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
inc a
|
inc a
|
||||||
ld [wd474], a
|
ld [wd474], a
|
||||||
|
@ -3473,7 +3473,7 @@ Function8a62c: ; 8a62c (22:662c)
|
|||||||
jr z, .asm_8a66a
|
jr z, .asm_8a66a
|
||||||
ld [MenuSelection], a
|
ld [MenuSelection], a
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wcf77]
|
ld a, [wScrollingMenuCursorPosition]
|
||||||
inc a
|
inc a
|
||||||
ld [wd034], a
|
ld [wd034], a
|
||||||
push bc
|
push bc
|
||||||
|
@ -818,7 +818,7 @@ Function8b7bd: ; 8b7bd
|
|||||||
and a
|
and a
|
||||||
jr z, .asm_8b7ea
|
jr z, .asm_8b7ea
|
||||||
dec a
|
dec a
|
||||||
ld [wcf77], a
|
ld [wScrollingMenuCursorPosition], a
|
||||||
|
|
||||||
.asm_8b7ea
|
.asm_8b7ea
|
||||||
hlcoord 0, 2
|
hlcoord 0, 2
|
||||||
|
20
wram.asm
20
wram.asm
@ -1495,8 +1495,7 @@ MenuSelection:: ds 1 ; cf74
|
|||||||
|
|
||||||
wcf75:: ds 1
|
wcf75:: ds 1
|
||||||
wcf76:: ds 1
|
wcf76:: ds 1
|
||||||
wCurrPocketCursorPosition::
|
wScrollingMenuCursorPosition:: ds 1
|
||||||
wcf77:: ds 1
|
|
||||||
wWindowStackSize:: ds 9
|
wWindowStackSize:: ds 9
|
||||||
|
|
||||||
; menu data header
|
; menu data header
|
||||||
@ -1792,6 +1791,7 @@ wd03b:: ds 3
|
|||||||
MenuItemsList::
|
MenuItemsList::
|
||||||
CurFruitTree::
|
CurFruitTree::
|
||||||
CurInput::
|
CurInput::
|
||||||
|
wElevatorPointerBank::
|
||||||
EngineBuffer1:: ; d03e
|
EngineBuffer1:: ; d03e
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
@ -1799,15 +1799,18 @@ wd03f::
|
|||||||
wJumpStdScriptBuffer::
|
wJumpStdScriptBuffer::
|
||||||
CurFruit:: ; d03f
|
CurFruit:: ; d03f
|
||||||
MartPointerBank::
|
MartPointerBank::
|
||||||
|
wElevatorPointerLo::
|
||||||
EngineBuffer2::
|
EngineBuffer2::
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
wd040::
|
wd040::
|
||||||
|
wElevatorPointerHi::
|
||||||
MartPointer:: ; d040
|
MartPointer:: ; d040
|
||||||
EngineBuffer3::
|
EngineBuffer3::
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
wd041::
|
wd041::
|
||||||
|
wElevatorOriginFloor::
|
||||||
EngineBuffer4::
|
EngineBuffer4::
|
||||||
wTempTrainerHeader::
|
wTempTrainerHeader::
|
||||||
wTempTrainerEventFlagLo::
|
wTempTrainerEventFlagLo::
|
||||||
@ -1877,8 +1880,8 @@ CurMoveNum:: ; d0d5
|
|||||||
|
|
||||||
wLastPocket:: ds 1
|
wLastPocket:: ds 1
|
||||||
wd0d7:: ds 1
|
wd0d7:: ds 1
|
||||||
wPartyMenuCursor::
|
wd0d8::
|
||||||
wd0d8:: ds 1
|
wPartyMenuCursor:: ds 1
|
||||||
wItemsPocketCursor:: ds 1
|
wItemsPocketCursor:: ds 1
|
||||||
wKeyItemsPocketCursor:: ds 1
|
wKeyItemsPocketCursor:: ds 1
|
||||||
wBallsPocketCursor:: ds 1
|
wBallsPocketCursor:: ds 1
|
||||||
@ -1904,7 +1907,7 @@ wPlayerAction::
|
|||||||
; 1 - use item
|
; 1 - use item
|
||||||
; 2 - switch
|
; 2 - switch
|
||||||
wSolvedUnownPuzzle::
|
wSolvedUnownPuzzle::
|
||||||
wd0ec:: ds 1
|
ds 1 ; d0ec
|
||||||
|
|
||||||
VramState:: ; d0ed
|
VramState:: ; d0ed
|
||||||
; bit 0: overworld sprite updating on/off
|
; bit 0: overworld sprite updating on/off
|
||||||
@ -1914,18 +1917,19 @@ VramState:: ; d0ed
|
|||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
wBattleResult:: ds 1
|
wBattleResult:: ds 1
|
||||||
wd0ef:: ds 1
|
wUsingItemWithSelect:: ds 1
|
||||||
CurMart:: ds 16
|
CurMart:: ds 16
|
||||||
|
CurMartEnd::
|
||||||
ds CurMart - @
|
ds CurMart - @
|
||||||
wd0f0:: ds 1
|
CurElevator:: ds 1
|
||||||
wd0f1::
|
wd0f1::
|
||||||
|
CurElevatorFloors::
|
||||||
wCurMessageIndex:: ds 1
|
wCurMessageIndex:: ds 1
|
||||||
wd0f2::
|
wd0f2::
|
||||||
wMailboxCount:: ds 1
|
wMailboxCount:: ds 1
|
||||||
wMailboxItems:: ds MAILBOX_CAPACITY
|
wMailboxItems:: ds MAILBOX_CAPACITY
|
||||||
wMailboxEnd:: ds 1 ; d1fe
|
wMailboxEnd:: ds 1 ; d1fe
|
||||||
ds 2
|
ds 2
|
||||||
CurMartEnd::
|
|
||||||
|
|
||||||
wd100:: ds 1
|
wd100:: ds 1
|
||||||
wd101:: ds 1
|
wd101:: ds 1
|
||||||
|
Loading…
Reference in New Issue
Block a user