mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
CmdQueues
This commit is contained in:
parent
91f7491017
commit
8a6a1a7d77
@ -2997,10 +2997,10 @@ IsMobileBattle: ; 3d2f1
|
|||||||
Function3d2f7: ; 3d2f7
|
Function3d2f7: ; 3d2f7
|
||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
Function3d2fa: ; switch to fullscreen menu?
|
Function3d2fa: ; switch to fullscreen menu?
|
||||||
callba Function5004f
|
callba LoadPartyMenuGFX
|
||||||
callba Function50405
|
callba InitPartyMenuWithCancel
|
||||||
callba Function8e85
|
callba Function8e85
|
||||||
callba Function503e0
|
callba InitPartyMenuGFX
|
||||||
ret
|
ret
|
||||||
; 3d313
|
; 3d313
|
||||||
|
|
||||||
@ -5719,7 +5719,7 @@ MoveSelectionScreen: ; 3e4bc
|
|||||||
|
|
||||||
.asm_3e58e
|
.asm_3e58e
|
||||||
call MoveInfoBox
|
call MoveInfoBox
|
||||||
ld a, [wd0e3]
|
ld a, [wSwitchMon]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_3e5a3
|
jr z, .asm_3e5a3
|
||||||
hlcoord 5, 13
|
hlcoord 5, 13
|
||||||
@ -5742,7 +5742,7 @@ MoveSelectionScreen: ; 3e4bc
|
|||||||
push af
|
push af
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [wd0e3], a
|
ld [wSwitchMon], a
|
||||||
ld a, [MenuSelection2]
|
ld a, [MenuSelection2]
|
||||||
dec a
|
dec a
|
||||||
ld [MenuSelection2], a
|
ld [MenuSelection2], a
|
||||||
@ -5838,7 +5838,7 @@ endr
|
|||||||
; 3e643
|
; 3e643
|
||||||
|
|
||||||
.asm_3e643 ; 3e643
|
.asm_3e643 ; 3e643
|
||||||
ld a, [wd0e3]
|
ld a, [wSwitchMon]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_3e6bf
|
jr z, .asm_3e6bf
|
||||||
ld hl, BattleMonMoves
|
ld hl, BattleMonMoves
|
||||||
@ -5856,14 +5856,14 @@ endr
|
|||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and $f
|
and $f
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wd0e3]
|
ld a, [wSwitchMon]
|
||||||
swap a
|
swap a
|
||||||
add b
|
add b
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
jr .asm_3e682
|
jr .asm_3e682
|
||||||
|
|
||||||
.asm_3e671
|
.asm_3e671
|
||||||
ld a, [wd0e3]
|
ld a, [wSwitchMon]
|
||||||
cp b
|
cp b
|
||||||
jr nz, .asm_3e682
|
jr nz, .asm_3e682
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@ -5890,12 +5890,12 @@ endr
|
|||||||
|
|
||||||
.asm_3e69e
|
.asm_3e69e
|
||||||
xor a
|
xor a
|
||||||
ld [wd0e3], a
|
ld [wSwitchMon], a
|
||||||
jp MoveSelectionScreen
|
jp MoveSelectionScreen
|
||||||
|
|
||||||
.asm_3e6a5
|
.asm_3e6a5
|
||||||
push hl
|
push hl
|
||||||
ld a, [wd0e3]
|
ld a, [wSwitchMon]
|
||||||
dec a
|
dec a
|
||||||
ld c, a
|
ld c, a
|
||||||
ld b, 0
|
ld b, 0
|
||||||
@ -5917,7 +5917,7 @@ endr
|
|||||||
|
|
||||||
.asm_3e6bf
|
.asm_3e6bf
|
||||||
ld a, [MenuSelection2]
|
ld a, [MenuSelection2]
|
||||||
ld [wd0e3], a
|
ld [wSwitchMon], a
|
||||||
jp MoveSelectionScreen
|
jp MoveSelectionScreen
|
||||||
; 3e6c8
|
; 3e6c8
|
||||||
|
|
||||||
|
@ -698,3 +698,11 @@ const_value SET 1
|
|||||||
const FRUITTREE_PEWTER_CITY_1
|
const FRUITTREE_PEWTER_CITY_1
|
||||||
const FRUITTREE_PEWTER_CITY_2
|
const FRUITTREE_PEWTER_CITY_2
|
||||||
const FRUITTREE_FUCHSIA_CITY
|
const FRUITTREE_FUCHSIA_CITY
|
||||||
|
|
||||||
|
CMDQUEUE_TYPE EQU 0
|
||||||
|
CMDQUEUE_ADDR EQU 1
|
||||||
|
CMDQUEUE_03 EQU 3
|
||||||
|
CMDQUEUE_04 EQU 4
|
||||||
|
CMDQUEUE_05 EQU 5
|
||||||
|
CMDQUEUE_ENTRY_SIZE EQU 6
|
||||||
|
CMDQUEUE_CAPACITY EQU 4
|
||||||
|
@ -168,7 +168,7 @@ Function9676d: ; 9676d
|
|||||||
HandleMap: ; 96773
|
HandleMap: ; 96773
|
||||||
call ResetOverworldDelay
|
call ResetOverworldDelay
|
||||||
call Function967c1
|
call Function967c1
|
||||||
callba Function97e08
|
callba HandleCmdQueue ; no need to farcall
|
||||||
call MapEvents
|
call MapEvents
|
||||||
|
|
||||||
; Not immediately entering a connected map will cause problems.
|
; Not immediately entering a connected map will cause problems.
|
||||||
|
@ -335,8 +335,8 @@ DoBikeStep:: ; 97db3
|
|||||||
ret
|
ret
|
||||||
; 97df9
|
; 97df9
|
||||||
|
|
||||||
Function97df9:: ; 97df9
|
ClearCmdQueue:: ; 97df9
|
||||||
ld hl, wd6de
|
ld hl, wCmdQueue
|
||||||
ld de, 6
|
ld de, 6
|
||||||
ld c, 4
|
ld c, 4
|
||||||
xor a
|
xor a
|
||||||
@ -348,8 +348,8 @@ Function97df9:: ; 97df9
|
|||||||
ret
|
ret
|
||||||
; 97e08
|
; 97e08
|
||||||
|
|
||||||
Function97e08:: ; 97e08
|
HandleCmdQueue:: ; 97e08
|
||||||
ld hl, wd6de
|
ld hl, wCmdQueue
|
||||||
xor a
|
xor a
|
||||||
.loop
|
.loop
|
||||||
ld [hMapObjectIndexBuffer], a
|
ld [hMapObjectIndexBuffer], a
|
||||||
@ -359,106 +359,106 @@ Function97e08:: ; 97e08
|
|||||||
push hl
|
push hl
|
||||||
ld b, h
|
ld b, h
|
||||||
ld c, l
|
ld c, l
|
||||||
call Function97e79
|
call HandleQueuedCommand
|
||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
.skip
|
.skip
|
||||||
ld de, $0006
|
ld de, CMDQUEUE_ENTRY_SIZE
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hMapObjectIndexBuffer]
|
ld a, [hMapObjectIndexBuffer]
|
||||||
inc a
|
inc a
|
||||||
cp $4
|
cp CMDQUEUE_CAPACITY
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
ret
|
ret
|
||||||
; 97e25
|
; 97e25
|
||||||
|
|
||||||
Function97e25: ; 97e25
|
GetNthCmdQueueEntry: ; 97e25 unreferenced
|
||||||
ld hl, wd6de
|
ld hl, wCmdQueue
|
||||||
ld bc, 6
|
ld bc, CMDQUEUE_ENTRY_SIZE
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld b, h
|
ld b, h
|
||||||
ld c, l
|
ld c, l
|
||||||
ret
|
ret
|
||||||
; 97e31
|
; 97e31
|
||||||
|
|
||||||
Function97e31:: ; 97e31
|
WriteCmdQueue:: ; 97e31
|
||||||
push bc
|
push bc
|
||||||
push de
|
push de
|
||||||
call Function97e45
|
call .GetNextEmptyEntry
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
pop hl
|
pop hl
|
||||||
pop bc
|
pop bc
|
||||||
ret c
|
ret c
|
||||||
ld a, b
|
ld a, b
|
||||||
ld bc, $0005
|
ld bc, CMDQUEUE_ENTRY_SIZE - 1
|
||||||
call FarCopyBytes
|
call FarCopyBytes
|
||||||
xor a
|
xor a
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ret
|
ret
|
||||||
; 97e45
|
; 97e45
|
||||||
|
|
||||||
Function97e45: ; 97e45
|
.GetNextEmptyEntry: ; 97e45
|
||||||
ld hl, wd6de
|
ld hl, wCmdQueue
|
||||||
ld de, $0006
|
ld de, CMDQUEUE_ENTRY_SIZE
|
||||||
ld c, $4
|
ld c, CMDQUEUE_CAPACITY
|
||||||
.asm_97e4d
|
.loop
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_97e57
|
jr z, .done
|
||||||
add hl, de
|
add hl, de
|
||||||
dec c
|
dec c
|
||||||
jr nz, .asm_97e4d
|
jr nz, .loop
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_97e57
|
.done
|
||||||
ld a, $4
|
ld a, CMDQUEUE_CAPACITY
|
||||||
sub c
|
sub c
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
; 97e5c
|
; 97e5c
|
||||||
|
|
||||||
Function97e5c:: ; 97e5c
|
DelCmdQueue:: ; 97e5c
|
||||||
ld hl, wd6de
|
ld hl, wCmdQueue
|
||||||
ld de, $0006
|
ld de, CMDQUEUE_ENTRY_SIZE
|
||||||
ld c, $4
|
ld c, CMDQUEUE_CAPACITY
|
||||||
.asm_97e64
|
.loop
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp b
|
cp b
|
||||||
jr z, .asm_97e6e
|
jr z, .done
|
||||||
add hl, de
|
add hl, de
|
||||||
dec c
|
dec c
|
||||||
jr nz, .asm_97e64
|
jr nz, .loop
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_97e6e
|
.done
|
||||||
xor a
|
xor a
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
; 97e72
|
; 97e72
|
||||||
|
|
||||||
Function97e72: ; 97e72
|
_DelCmdQueue: ; 97e72
|
||||||
ld hl, 0
|
ld hl, CMDQUEUE_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], 0
|
ld [hl], 0
|
||||||
ret
|
ret
|
||||||
; 97e79
|
; 97e79
|
||||||
|
|
||||||
Function97e79: ; 97e79
|
HandleQueuedCommand: ; 97e79
|
||||||
ld hl, 0
|
ld hl, CMDQUEUE_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp 5
|
cp 5
|
||||||
jr c, .asm_97e83
|
jr c, .okay
|
||||||
xor a
|
xor a
|
||||||
|
|
||||||
.asm_97e83
|
.okay
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld hl, Table97e94
|
ld hl, .Jumptable_ba
|
||||||
rept 3
|
rept 3
|
||||||
add hl, de
|
add hl, de
|
||||||
endr
|
endr
|
||||||
@ -472,16 +472,16 @@ endr
|
|||||||
ret
|
ret
|
||||||
; 97e94
|
; 97e94
|
||||||
|
|
||||||
Table97e94: ; 97e94
|
.Jumptable_ba: ; 97e94
|
||||||
dba Function97eb7
|
dba CmdQueue_Null
|
||||||
dba Function97eb8
|
dba CmdQueue_Null2
|
||||||
dba Function97f42
|
dba CmdQueue_StoneTable
|
||||||
dba Function97ef9
|
dba CmdQueue_Type3
|
||||||
dba Function97ebc
|
dba CmdQueue_Type4
|
||||||
; 97ea3
|
; 97ea3
|
||||||
|
|
||||||
Function97ea3: ; 97ea3
|
CmdQueueAnonymousJumptable: ; 97ea3
|
||||||
ld hl, $0005
|
ld hl, CMDQUEUE_05
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
pop hl
|
pop hl
|
||||||
@ -489,45 +489,44 @@ Function97ea3: ; 97ea3
|
|||||||
ret
|
ret
|
||||||
; 97eab
|
; 97eab
|
||||||
|
|
||||||
Function97eab: ; 97eab
|
CmdQueueAnonJT_Increment: ; 97eab
|
||||||
ld hl, $0005
|
ld hl, CMDQUEUE_05
|
||||||
add hl, bc
|
add hl, bc
|
||||||
inc [hl]
|
inc [hl]
|
||||||
ret
|
ret
|
||||||
; 97eb1
|
; 97eb1
|
||||||
|
|
||||||
Function97eb1: ; 97eb1
|
CmdQueueAnonJT_Decrement: ; 97eb1
|
||||||
ld hl, $0005
|
ld hl, CMDQUEUE_05
|
||||||
add hl, bc
|
add hl, bc
|
||||||
dec [hl]
|
dec [hl]
|
||||||
ret
|
ret
|
||||||
; 97eb7
|
; 97eb7
|
||||||
|
|
||||||
Function97eb7: ; 97eb7
|
CmdQueue_Null: ; 97eb7
|
||||||
ret
|
ret
|
||||||
; 97eb8
|
; 97eb8
|
||||||
|
|
||||||
Function97eb8: ; 97eb8
|
CmdQueue_Null2: ; 97eb8
|
||||||
call ret_2f3e
|
call ret_2f3e
|
||||||
ret
|
ret
|
||||||
; 97ebc
|
; 97ebc
|
||||||
|
|
||||||
Function97ebc: ; 97ebc
|
CmdQueue_Type4: ; 97ebc
|
||||||
call Function97ea3
|
call CmdQueueAnonymousJumptable
|
||||||
dw Function97ec3
|
; anonymous jumptable
|
||||||
dw Function97ecd
|
dw .zero
|
||||||
|
dw .one
|
||||||
; 97ec3
|
; 97ec3
|
||||||
|
|
||||||
Function97ec3: ; 97ec3
|
.zero: ; 97ec3
|
||||||
ld a, [hSCY]
|
ld a, [hSCY]
|
||||||
ld hl, $0004
|
ld hl, 4
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
call Function97eab
|
call CmdQueueAnonJT_Increment
|
||||||
; 97ecd
|
.one: ; 97ecd
|
||||||
|
ld hl, 1
|
||||||
Function97ecd: ; 97ecd
|
|
||||||
ld hl, $0001
|
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
dec a
|
dec a
|
||||||
@ -535,7 +534,7 @@ Function97ecd: ; 97ecd
|
|||||||
jr z, .asm_97eee
|
jr z, .asm_97eee
|
||||||
and $1
|
and $1
|
||||||
jr z, .asm_97ee4
|
jr z, .asm_97ee4
|
||||||
ld hl, $0002
|
ld hl, 2
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hSCY]
|
ld a, [hSCY]
|
||||||
sub [hl]
|
sub [hl]
|
||||||
@ -543,7 +542,7 @@ Function97ecd: ; 97ecd
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_97ee4
|
.asm_97ee4
|
||||||
ld hl, $0002
|
ld hl, 2
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hSCY]
|
ld a, [hSCY]
|
||||||
add [hl]
|
add [hl]
|
||||||
@ -551,61 +550,60 @@ Function97ecd: ; 97ecd
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_97eee
|
.asm_97eee
|
||||||
ld hl, $0004
|
ld hl, 4
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [hSCY], a
|
ld [hSCY], a
|
||||||
call Function97e72
|
call _DelCmdQueue
|
||||||
ret
|
ret
|
||||||
; 97ef9
|
; 97ef9
|
||||||
|
|
||||||
Function97ef9: ; 97ef9
|
CmdQueue_Type3: ; 97ef9
|
||||||
call Function97ea3
|
call CmdQueueAnonymousJumptable
|
||||||
dw Function97f02
|
; anonymous jumptable
|
||||||
dw Function97f0a
|
dw .zero
|
||||||
dw Function97f1b
|
dw .one
|
||||||
|
dw .two
|
||||||
; 97f02
|
; 97f02
|
||||||
|
|
||||||
Function97f02: ; 97f02
|
.zero: ; 97f02
|
||||||
call Function97f38
|
call .IsPlayerFacingDown
|
||||||
jr z, Function97f2c
|
jr z, .PlayerNotFacingDown
|
||||||
call Function97eab
|
call CmdQueueAnonJT_Increment
|
||||||
; 97f0a
|
.one: ; 97f0a
|
||||||
|
call .IsPlayerFacingDown
|
||||||
|
jr z, .PlayerNotFacingDown
|
||||||
|
call CmdQueueAnonJT_Increment
|
||||||
|
|
||||||
Function97f0a: ; 97f0a
|
ld hl, 2
|
||||||
call Function97f38
|
|
||||||
jr z, Function97f2c
|
|
||||||
call Function97eab
|
|
||||||
|
|
||||||
ld hl, $0002
|
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd173], a
|
ld [wd173], a
|
||||||
ret
|
ret
|
||||||
; 97f1b
|
; 97f1b
|
||||||
|
|
||||||
Function97f1b: ; 97f1b
|
.two: ; 97f1b
|
||||||
call Function97f38
|
call .IsPlayerFacingDown
|
||||||
jr z, Function97f2c
|
jr z, .PlayerNotFacingDown
|
||||||
call Function97eb1
|
call CmdQueueAnonJT_Decrement
|
||||||
|
|
||||||
ld hl, $0003
|
ld hl, 3
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd173], a
|
ld [wd173], a
|
||||||
ret
|
ret
|
||||||
; 97f2c
|
; 97f2c
|
||||||
|
|
||||||
Function97f2c: ; 97f2c
|
.PlayerNotFacingDown: ; 97f2c
|
||||||
ld a, $7f
|
ld a, $7f
|
||||||
ld [wd173], a
|
ld [wd173], a
|
||||||
ld hl, $0005
|
ld hl, 5
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], 0
|
ld [hl], 0
|
||||||
ret
|
ret
|
||||||
; 97f38
|
; 97f38
|
||||||
|
|
||||||
Function97f38: ; 97f38
|
.IsPlayerFacingDown: ; 97f38
|
||||||
push bc
|
push bc
|
||||||
ld bc, PlayerStruct
|
ld bc, PlayerStruct
|
||||||
call GetSpriteDirection
|
call GetSpriteDirection
|
||||||
@ -614,50 +612,50 @@ Function97f38: ; 97f38
|
|||||||
ret
|
ret
|
||||||
; 97f42
|
; 97f42
|
||||||
|
|
||||||
Function97f42: ; 97f42
|
CmdQueue_StoneTable: ; 97f42
|
||||||
ld de, PlayerStruct
|
ld de, PlayerStruct
|
||||||
ld a, $d
|
ld a, NUM_OBJECT_STRUCTS
|
||||||
.asm_97f47
|
.loop
|
||||||
push af
|
push af
|
||||||
|
|
||||||
ld hl, 0
|
ld hl, OBJECT_SPRITE
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_97f71
|
jr z, .next
|
||||||
|
|
||||||
ld hl, $0003
|
ld hl, OBJECT_MOVEMENTTYPE
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp $19
|
cp STEP_TYPE_19
|
||||||
jr nz, .asm_97f71
|
jr nz, .next
|
||||||
|
|
||||||
ld hl, $000e
|
ld hl, OBJECT_NEXT_TILE
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
call CheckPitTile
|
call CheckPitTile
|
||||||
jr nz, .asm_97f71
|
jr nz, .next
|
||||||
|
|
||||||
ld hl, $0007
|
ld hl, OBJECT_DIRECTION_WALKING
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp $ff
|
cp STANDING
|
||||||
jr nz, .asm_97f71
|
jr nz, .next
|
||||||
call Function3567
|
call HandleStoneQueue
|
||||||
jr c, .asm_97f7c
|
jr c, .fall_down_hole
|
||||||
|
|
||||||
.asm_97f71
|
.next
|
||||||
ld hl, $0028
|
ld hl, OBJECT_STRUCT_LENGTH
|
||||||
add hl, de
|
add hl, de
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
dec a
|
dec a
|
||||||
jr nz, .asm_97f47
|
jr nz, .loop
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_97f7c
|
.fall_down_hole
|
||||||
pop af
|
pop af
|
||||||
ret
|
ret
|
||||||
; 97f7e
|
; 97f7e
|
||||||
|
@ -503,9 +503,9 @@ Function4484a: ; 0x4484a
|
|||||||
ld [PartyMenuActionText], a
|
ld [PartyMenuActionText], a
|
||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
.try_again
|
.try_again
|
||||||
callba Function5004f
|
callba LoadPartyMenuGFX
|
||||||
callba Function50405
|
callba InitPartyMenuWithCancel
|
||||||
callba Function503e0
|
callba InitPartyMenuGFX
|
||||||
callba WritePartyMenuTilemap
|
callba WritePartyMenuTilemap
|
||||||
callba PrintPartyMenuText
|
callba PrintPartyMenuText
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
|
@ -595,9 +595,9 @@ Function103fd: ; 103fd
|
|||||||
ld a, $8
|
ld a, $8
|
||||||
ld [PartyMenuActionText], a
|
ld [PartyMenuActionText], a
|
||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
callba Function5004f
|
callba LoadPartyMenuGFX
|
||||||
callba Function50405
|
callba InitPartyMenuWithCancel
|
||||||
callba Function503e0
|
callba InitPartyMenuGFX
|
||||||
.asm_10427
|
.asm_10427
|
||||||
callba WritePartyMenuTilemap
|
callba WritePartyMenuTilemap
|
||||||
callba PrintPartyMenuText
|
callba PrintPartyMenuText
|
||||||
|
@ -30,15 +30,15 @@ Function5001d: ; 5001d
|
|||||||
; 5003f
|
; 5003f
|
||||||
|
|
||||||
Function5003f: ; 5003f
|
Function5003f: ; 5003f
|
||||||
call Function5004f
|
call LoadPartyMenuGFX
|
||||||
call Function50405
|
call InitPartyMenuWithCancel
|
||||||
call Function503e0
|
call InitPartyMenuGFX
|
||||||
call WritePartyMenuTilemap
|
call WritePartyMenuTilemap
|
||||||
call PrintPartyMenuText
|
call PrintPartyMenuText
|
||||||
ret
|
ret
|
||||||
; 5004f
|
; 5004f
|
||||||
|
|
||||||
Function5004f: ; 5004f
|
LoadPartyMenuGFX: ; 5004f
|
||||||
call LoadFontsBattleExtra
|
call LoadFontsBattleExtra
|
||||||
callab Function8ad1 ; engine/color.asm
|
callab Function8ad1 ; engine/color.asm
|
||||||
callab InefficientlyClear121BytesAtwc300
|
callab InefficientlyClear121BytesAtwc300
|
||||||
@ -648,7 +648,7 @@ endr
|
|||||||
; 503e0
|
; 503e0
|
||||||
|
|
||||||
|
|
||||||
Function503e0: ; 503e0
|
InitPartyMenuGFX: ; 503e0
|
||||||
ld hl, PartyCount
|
ld hl, PartyCount
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
and a
|
and a
|
||||||
@ -656,7 +656,7 @@ Function503e0: ; 503e0
|
|||||||
ld c, a
|
ld c, a
|
||||||
xor a
|
xor a
|
||||||
ld [hObjectStructIndexBuffer], a
|
ld [hObjectStructIndexBuffer], a
|
||||||
.asm_503ea
|
.loop
|
||||||
push bc
|
push bc
|
||||||
push hl
|
push hl
|
||||||
ld hl, Function8e83f
|
ld hl, Function8e83f
|
||||||
@ -669,60 +669,62 @@ Function503e0: ; 503e0
|
|||||||
pop hl
|
pop hl
|
||||||
pop bc
|
pop bc
|
||||||
dec c
|
dec c
|
||||||
jr nz, .asm_503ea
|
jr nz, .loop
|
||||||
callab Function8cf69
|
callab Function8cf69
|
||||||
ret
|
ret
|
||||||
; 50405
|
; 50405
|
||||||
|
|
||||||
Function50405: ; 50405
|
InitPartyMenuWithCancel: ; 50405
|
||||||
|
; with cancel
|
||||||
xor a
|
xor a
|
||||||
ld [wd0e3], a
|
ld [wSwitchMon], a
|
||||||
ld de, Unknown_5044f
|
ld de, PartyMenuAttributes
|
||||||
call Function1bb1
|
call InitMenu3
|
||||||
ld a, [PartyCount]
|
ld a, [PartyCount]
|
||||||
inc a
|
inc a
|
||||||
ld [wcfa3], a
|
ld [wcfa3], a ; list length
|
||||||
dec a
|
dec a
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wd0d8]
|
ld a, [wPartyMenuCursor]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_50422
|
jr z, .skip
|
||||||
inc b
|
inc b
|
||||||
cp b
|
cp b
|
||||||
jr c, .asm_50424
|
jr c, .done
|
||||||
|
|
||||||
.asm_50422
|
.skip
|
||||||
ld a, $1
|
ld a, $1
|
||||||
|
|
||||||
.asm_50424
|
.done
|
||||||
ld [MenuSelection2], a
|
ld [MenuSelection2], a
|
||||||
ld a, $3
|
ld a, A_BUTTON | B_BUTTON
|
||||||
ld [wcfa8], a
|
ld [wcfa8], a
|
||||||
ret
|
ret
|
||||||
; 5042d
|
; 5042d
|
||||||
|
|
||||||
Function5042d: ; 0x5042d
|
InitPartyMenuNoCancel: ; 0x5042d
|
||||||
ld de, Unknown_5044f
|
; no cancel
|
||||||
call Function1bb1
|
ld de, PartyMenuAttributes
|
||||||
|
call InitMenu3
|
||||||
ld a, [PartyCount]
|
ld a, [PartyCount]
|
||||||
ld [wcfa3], a
|
ld [wcfa3], a ; list length
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wd0d8]
|
ld a, [wPartyMenuCursor]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_50444
|
jr z, .skip
|
||||||
inc b
|
inc b
|
||||||
cp b
|
cp b
|
||||||
jr c, .asm_50446
|
jr c, .done
|
||||||
.asm_50444
|
.skip
|
||||||
ld a, $1
|
ld a, $1
|
||||||
.asm_50446
|
.done
|
||||||
ld [MenuSelection2], a
|
ld [MenuSelection2], a
|
||||||
ld a, $3
|
ld a, A_BUTTON | B_BUTTON
|
||||||
ld [wcfa8], a
|
ld [wcfa8], a
|
||||||
ret
|
ret
|
||||||
; 5044f (14:444f)
|
; 5044f (14:444f)
|
||||||
|
|
||||||
Unknown_5044f: ; 5044f
|
PartyMenuAttributes: ; 5044f
|
||||||
; cursor y
|
; cursor y
|
||||||
; cursor x
|
; cursor x
|
||||||
; list length
|
; list length
|
||||||
@ -744,7 +746,7 @@ PartyMenuSelect: ; 0x50457
|
|||||||
ld a, [MenuSelection2] ; menu selection?
|
ld a, [MenuSelection2] ; menu selection?
|
||||||
cp b
|
cp b
|
||||||
jr z, .exitmenu ; CANCEL
|
jr z, .exitmenu ; CANCEL
|
||||||
ld [wd0d8], a
|
ld [wPartyMenuCursor], a
|
||||||
ld a, [hJoyLast]
|
ld a, [hJoyLast]
|
||||||
ld b, a
|
ld b, a
|
||||||
bit 1, b
|
bit 1, b
|
||||||
|
@ -2153,7 +2153,7 @@ CopyConvertedText: ; 976c8
|
|||||||
Script_itemtotext: ; 976d5
|
Script_itemtotext: ; 976d5
|
||||||
; script command 0x41
|
; script command 0x41
|
||||||
; parameters:
|
; parameters:
|
||||||
; item (ItemLabelByte)
|
; item (ItemLabelByte); use 0 to draw from ScriptVar
|
||||||
; memory (SingleByteParam)
|
; memory (SingleByteParam)
|
||||||
|
|
||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
@ -2923,7 +2923,7 @@ Script_writecmdqueue: ; 97a8b
|
|||||||
ld d, a
|
ld d, a
|
||||||
ld a, [ScriptBank]
|
ld a, [ScriptBank]
|
||||||
ld b, a
|
ld b, a
|
||||||
callba Function97e31
|
callba WriteCmdQueue ; no need to farcall
|
||||||
ret
|
ret
|
||||||
; 97a9e
|
; 97a9e
|
||||||
|
|
||||||
@ -2936,7 +2936,7 @@ Script_delcmdqueue: ; 97a9e
|
|||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
ld b, a
|
ld b, a
|
||||||
callba Function97e5c
|
callba DelCmdQueue ; no need to farcall
|
||||||
ret c
|
ret c
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
|
@ -533,9 +533,9 @@ StartMenu_Pokemon: ; 12976
|
|||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
|
|
||||||
.menu
|
.menu
|
||||||
callba Function5004f
|
callba LoadPartyMenuGFX
|
||||||
callba Function50405
|
callba InitPartyMenuWithCancel
|
||||||
callba Function503e0
|
callba InitPartyMenuGFX
|
||||||
|
|
||||||
.menunoreload
|
.menunoreload
|
||||||
callba WritePartyMenuTilemap
|
callba WritePartyMenuTilemap
|
||||||
@ -684,7 +684,7 @@ PartyMonItemName: ; 12a6c
|
|||||||
|
|
||||||
|
|
||||||
CancelPokemonAction: ; 12a79
|
CancelPokemonAction: ; 12a79
|
||||||
callba Function50405
|
callba InitPartyMenuWithCancel
|
||||||
callba Function8ea71
|
callba Function8ea71
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ret
|
ret
|
||||||
@ -746,10 +746,10 @@ SwitchPartyMons: ; 12aec
|
|||||||
|
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
inc a
|
inc a
|
||||||
ld [wd0e3], a
|
ld [wSwitchMon], a
|
||||||
|
|
||||||
callba Function8ea8c
|
callba Function8ea8c
|
||||||
callba Function5042d
|
callba InitPartyMenuNoCancel
|
||||||
|
|
||||||
ld a, 4
|
ld a, 4
|
||||||
ld [PartyMenuActionText], a
|
ld [PartyMenuActionText], a
|
||||||
@ -758,7 +758,7 @@ SwitchPartyMons: ; 12aec
|
|||||||
|
|
||||||
hlcoord 0, 1
|
hlcoord 0, 1
|
||||||
ld bc, 20 * 2
|
ld bc, 20 * 2
|
||||||
ld a, [wd0e3]
|
ld a, [wSwitchMon]
|
||||||
dec a
|
dec a
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld [hl], "▷"
|
ld [hl], "▷"
|
||||||
@ -775,9 +775,9 @@ SwitchPartyMons: ; 12aec
|
|||||||
xor a
|
xor a
|
||||||
ld [PartyMenuActionText], a
|
ld [PartyMenuActionText], a
|
||||||
|
|
||||||
callba Function5004f
|
callba LoadPartyMenuGFX
|
||||||
callba Function50405
|
callba InitPartyMenuWithCancel
|
||||||
callba Function503e0
|
callba InitPartyMenuGFX
|
||||||
|
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ret
|
ret
|
||||||
@ -1476,7 +1476,7 @@ Function12f5b: ; 12f5b
|
|||||||
Function12f73: ; 12f73
|
Function12f73: ; 12f73
|
||||||
call SetUpMoveScreenBG
|
call SetUpMoveScreenBG
|
||||||
ld de, Unknown_12fb2
|
ld de, Unknown_12fb2
|
||||||
call Function1bb1
|
call InitMenu3
|
||||||
call Function131ef
|
call Function131ef
|
||||||
ld hl, wcfa5
|
ld hl, wcfa5
|
||||||
set 6, [hl]
|
set 6, [hl]
|
||||||
@ -1505,7 +1505,7 @@ Function12f9f: ; 12f9f
|
|||||||
Function12fa0: ; 12fa0
|
Function12fa0: ; 12fa0
|
||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
ld [wd0e3], a
|
ld [wSwitchMon], a
|
||||||
ld hl, wcfa5
|
ld hl, wcfa5
|
||||||
res 6, [hl]
|
res 6, [hl]
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
@ -1543,7 +1543,7 @@ MoveScreenLoop: ; 12fd5
|
|||||||
call SetUpMoveScreenBG
|
call SetUpMoveScreenBG
|
||||||
call Function132d3
|
call Function132d3
|
||||||
ld de, Unknown_13163
|
ld de, Unknown_13163
|
||||||
call Function1bb1
|
call InitMenu3
|
||||||
.loop
|
.loop
|
||||||
call Function131ef
|
call Function131ef
|
||||||
ld hl, wcfa5
|
ld hl, wcfa5
|
||||||
|
80
home.asm
80
home.asm
@ -1214,12 +1214,12 @@ Function354b:: ; 354b joypad
|
|||||||
; 3567
|
; 3567
|
||||||
|
|
||||||
|
|
||||||
Function3567:: ; 3567
|
HandleStoneQueue:: ; 3567
|
||||||
ld a, [hROMBank]
|
ld a, [hROMBank]
|
||||||
push af
|
push af
|
||||||
|
|
||||||
call SwitchToMapScriptHeaderBank
|
call SwitchToMapScriptHeaderBank
|
||||||
call Function3574
|
call .WarpAction
|
||||||
|
|
||||||
pop bc
|
pop bc
|
||||||
ld a, b
|
ld a, b
|
||||||
@ -1227,39 +1227,39 @@ Function3567:: ; 3567
|
|||||||
ret
|
ret
|
||||||
; 3574
|
; 3574
|
||||||
|
|
||||||
Function3574:: ; 3574
|
.WarpAction ; 3574
|
||||||
ld hl, $0001
|
ld hl, OBJECT_MAP_OBJECT_INDEX
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp $ff
|
cp $ff
|
||||||
jr z, .asm_3597
|
jr z, .nope
|
||||||
|
|
||||||
ld l, a
|
ld l, a
|
||||||
push hl
|
push hl
|
||||||
call Function3599
|
call .IsPersonOnWarp
|
||||||
pop hl
|
pop hl
|
||||||
jr nc, .asm_3597
|
jr nc, .nope
|
||||||
ld d, a
|
ld d, a
|
||||||
ld e, l
|
ld e, l
|
||||||
call Function35de
|
call .IsObjectInStoneTable
|
||||||
jr nc, .asm_3597
|
jr nc, .nope
|
||||||
call CallMapScript
|
call CallMapScript
|
||||||
callba EnableScriptMode
|
callba EnableScriptMode
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_3597
|
.nope
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
; 3599
|
; 3599
|
||||||
|
|
||||||
Function3599:: ; 3599
|
.IsPersonOnWarp ; 3599
|
||||||
push de
|
push de
|
||||||
|
|
||||||
ld hl, $0010
|
ld hl, OBJECT_NEXT_MAP_X
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld hl, $0011
|
ld hl, OBJECT_NEXT_MAP_Y
|
||||||
add hl, de
|
add hl, de
|
||||||
ld e, [hl]
|
ld e, [hl]
|
||||||
|
|
||||||
@ -1268,93 +1268,93 @@ Function3599:: ; 3599
|
|||||||
ld a, e
|
ld a, e
|
||||||
sub 4
|
sub 4
|
||||||
ld e, a
|
ld e, a
|
||||||
call Function35b0
|
call .check_on_warp
|
||||||
|
|
||||||
pop de
|
pop de
|
||||||
ret
|
ret
|
||||||
; 35b0
|
; 35b0
|
||||||
|
|
||||||
Function35b0:: ; 35b0
|
.check_on_warp ; 35b0
|
||||||
ld hl, wCurrentCaller + 3
|
ld hl, wCurrMapWarpHeaderPointer
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, [wCurrentCaller + 2]
|
ld a, [wCurrMapWarpCount]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_35d3
|
jr z, .nope2
|
||||||
|
|
||||||
.loop
|
.loop
|
||||||
push af
|
push af
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp e
|
cp e
|
||||||
jr nz, .asm_35c8
|
jr nz, .not_on_warp
|
||||||
inc hl
|
inc hl
|
||||||
ld a, [hld]
|
ld a, [hld]
|
||||||
cp d
|
cp d
|
||||||
jr nz, .asm_35c8
|
jr nz, .not_on_warp
|
||||||
jr .asm_35d5
|
jr .found_warp
|
||||||
|
|
||||||
.asm_35c8
|
.not_on_warp
|
||||||
ld a, $5
|
ld a, 5
|
||||||
add l
|
add l
|
||||||
ld l, a
|
ld l, a
|
||||||
jr nc, .asm_35cf
|
jr nc, .no_carry
|
||||||
inc h
|
inc h
|
||||||
.asm_35cf
|
.no_carry
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
dec a
|
dec a
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
|
|
||||||
.asm_35d3
|
.nope2
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_35d5
|
.found_warp
|
||||||
pop af
|
pop af
|
||||||
ld d, a
|
ld d, a
|
||||||
ld a, [wCurrentCaller + 2]
|
ld a, [wCurrMapWarpCount]
|
||||||
sub d
|
sub d
|
||||||
inc a
|
inc a
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
; 35de
|
; 35de
|
||||||
|
|
||||||
Function35de:: ; 35de
|
.IsObjectInStoneTable ; 35de
|
||||||
inc e
|
inc e
|
||||||
ld hl, $0001
|
ld hl, CMDQUEUE_ADDR
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
ld l, a
|
ld l, a
|
||||||
.asm_35e6
|
.loop2
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp $ff
|
cp $ff
|
||||||
jr z, .asm_35fc
|
jr z, .nope3
|
||||||
cp d
|
cp d
|
||||||
jr nz, .asm_35f7
|
jr nz, .next_inc3
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp e
|
cp e
|
||||||
jr nz, .asm_35f8
|
jr nz, .next_inc2
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
ld l, a
|
ld l, a
|
||||||
jr .asm_35fe
|
jr .yes
|
||||||
|
|
||||||
.asm_35f7
|
.next_inc3
|
||||||
inc hl
|
inc hl
|
||||||
|
|
||||||
.asm_35f8
|
.next_inc2
|
||||||
rept 2
|
rept 2
|
||||||
inc hl
|
inc hl
|
||||||
endr
|
endr
|
||||||
jr .asm_35e6
|
jr .loop2
|
||||||
|
|
||||||
.asm_35fc
|
.nope3
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_35fe
|
.yes
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
; 3600
|
; 3600
|
||||||
|
@ -136,17 +136,17 @@ endr
|
|||||||
big_step_right
|
big_step_right
|
||||||
; 1bb1
|
; 1bb1
|
||||||
|
|
||||||
Function1bb1:: ; 1bb1
|
InitMenu3:: ; 1bb1
|
||||||
push hl
|
push hl
|
||||||
push bc
|
push bc
|
||||||
ld hl, wcfa1
|
ld hl, wcfa1
|
||||||
ld b, $8
|
ld b, $8
|
||||||
.asm_1bb8
|
.loop
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
inc de
|
inc de
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
dec b
|
dec b
|
||||||
jr nz, .asm_1bb8
|
jr nz, .loop
|
||||||
ld a, $1
|
ld a, $1
|
||||||
rept 2
|
rept 2
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
|
@ -1875,9 +1875,9 @@ UseItem_SelectMon: ; f1f9 (3:71f9)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
ChoosePkmnToUseItemOn: ; f21c (3:721c)
|
ChoosePkmnToUseItemOn: ; f21c (3:721c)
|
||||||
callba Function5004f
|
callba LoadPartyMenuGFX
|
||||||
callba Function50405
|
callba InitPartyMenuWithCancel
|
||||||
callba Function503e0
|
callba InitPartyMenuGFX
|
||||||
callba WritePartyMenuTilemap
|
callba WritePartyMenuTilemap
|
||||||
callba PrintPartyMenuText
|
callba PrintPartyMenuText
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
|
12
main.asm
12
main.asm
@ -14741,9 +14741,9 @@ Function2c7fb: ; 2c7fb
|
|||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
|
|
||||||
Function2c80a: ; 2c80a
|
Function2c80a: ; 2c80a
|
||||||
callba Function5004f
|
callba LoadPartyMenuGFX
|
||||||
callba Function50405
|
callba InitPartyMenuWithCancel
|
||||||
callba Function503e0
|
callba InitPartyMenuGFX
|
||||||
ld a, $3
|
ld a, $3
|
||||||
ld [PartyMenuActionText], a
|
ld [PartyMenuActionText], a
|
||||||
.loopback
|
.loopback
|
||||||
@ -18255,8 +18255,8 @@ Function4aa22: ; 4aa22
|
|||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
|
|
||||||
Function4aa25: ; 4aa25
|
Function4aa25: ; 4aa25
|
||||||
callba Function5004f
|
callba LoadPartyMenuGFX
|
||||||
callba Function50405
|
callba InitPartyMenuWithCancel
|
||||||
call Function4aad3
|
call Function4aad3
|
||||||
|
|
||||||
Function4aa34: ; 4aa34
|
Function4aa34: ; 4aa34
|
||||||
@ -36275,7 +36275,7 @@ RunCallback_05_03: ; 1045b0
|
|||||||
call RunMapCallback
|
call RunMapCallback
|
||||||
|
|
||||||
RunCallback_03: ; 1045c4
|
RunCallback_03: ; 1045c4
|
||||||
callba Function97df9
|
callba ClearCmdQueue
|
||||||
ld a, $3
|
ld a, $3
|
||||||
call RunMapCallback
|
call RunMapCallback
|
||||||
call GetMapHeaderTimeOfDayNybble
|
call GetMapHeaderTimeOfDayNybble
|
||||||
|
@ -7,61 +7,61 @@ IcePathB1F_MapScriptHeader:
|
|||||||
|
|
||||||
; callbacks
|
; callbacks
|
||||||
|
|
||||||
dbw 3, UnknownScript_0x7e4be
|
dbw 3, .SetUpStoneTable
|
||||||
|
|
||||||
UnknownScript_0x7e4be:
|
.SetUpStoneTable:
|
||||||
writecmdqueue CmdQueue_0x7e4c2
|
writecmdqueue .CommandQueue
|
||||||
return
|
return
|
||||||
|
|
||||||
CmdQueue_0x7e4c2:
|
.CommandQueue:
|
||||||
dbw 2, StoneTable_0x7e4c7 ; check if any stones are sitting on a warp
|
dbw 2, .StoneTable ; check if any stones are sitting on a warp
|
||||||
db 0, 0 ; filler
|
db 0, 0 ; filler
|
||||||
|
|
||||||
StoneTable_0x7e4c7:
|
.StoneTable:
|
||||||
db 3, 2 ; warp, person
|
db 3, 2 ; warp, person
|
||||||
dw UnknownScript_0x7e4d8
|
dw .Boulder1
|
||||||
|
|
||||||
db 4, 3 ; warp, person
|
db 4, 3 ; warp, person
|
||||||
dw UnknownScript_0x7e4e0
|
dw .Boulder2
|
||||||
|
|
||||||
db 5, 4 ; warp, person
|
db 5, 4 ; warp, person
|
||||||
dw UnknownScript_0x7e4e8
|
dw .Boulder3
|
||||||
|
|
||||||
db 6, 5 ; warp, person
|
db 6, 5 ; warp, person
|
||||||
dw UnknownScript_0x7e4f0
|
dw .Boulder4
|
||||||
|
|
||||||
db $ff ; end
|
db -1 ; end
|
||||||
|
|
||||||
UnknownScript_0x7e4d8:
|
.Boulder1:
|
||||||
disappear 2
|
disappear 2
|
||||||
clearevent EVENT_BOULDER_IN_ICE_PATH_1A
|
clearevent EVENT_BOULDER_IN_ICE_PATH_1A
|
||||||
jump UnknownScript_0x7e4f8
|
jump .FinishBoulder
|
||||||
|
|
||||||
UnknownScript_0x7e4e0:
|
.Boulder2:
|
||||||
disappear 3
|
disappear 3
|
||||||
clearevent EVENT_BOULDER_IN_ICE_PATH_2A
|
clearevent EVENT_BOULDER_IN_ICE_PATH_2A
|
||||||
jump UnknownScript_0x7e4f8
|
jump .FinishBoulder
|
||||||
|
|
||||||
UnknownScript_0x7e4e8:
|
.Boulder3:
|
||||||
disappear 4
|
disappear 4
|
||||||
clearevent EVENT_BOULDER_IN_ICE_PATH_3A
|
clearevent EVENT_BOULDER_IN_ICE_PATH_3A
|
||||||
jump UnknownScript_0x7e4f8
|
jump .FinishBoulder
|
||||||
|
|
||||||
UnknownScript_0x7e4f0:
|
.Boulder4:
|
||||||
disappear 5
|
disappear 5
|
||||||
clearevent EVENT_BOULDER_IN_ICE_PATH_4A
|
clearevent EVENT_BOULDER_IN_ICE_PATH_4A
|
||||||
jump UnknownScript_0x7e4f8
|
jump .FinishBoulder
|
||||||
|
|
||||||
UnknownScript_0x7e4f8:
|
.FinishBoulder:
|
||||||
pause 30
|
pause 30
|
||||||
scall UnknownScript_0x7e504
|
scall .BoulderFallsThrough
|
||||||
loadfont
|
loadfont
|
||||||
writetext UnknownText_0x7e512
|
writetext UnknownText_0x7e512
|
||||||
closetext
|
closetext
|
||||||
loadmovesprites
|
loadmovesprites
|
||||||
end
|
end
|
||||||
|
|
||||||
UnknownScript_0x7e504:
|
.BoulderFallsThrough:
|
||||||
playsound SFX_STRENGTH
|
playsound SFX_STRENGTH
|
||||||
earthquake 80
|
earthquake 80
|
||||||
end
|
end
|
||||||
|
@ -1984,7 +1984,7 @@ Function100c74: ; 100c74
|
|||||||
|
|
||||||
Function100c98: ; 100c98
|
Function100c98: ; 100c98
|
||||||
ld de, Unknown_100cad
|
ld de, Unknown_100cad
|
||||||
call Function1bb1
|
call InitMenu3
|
||||||
ld a, [wd0eb]
|
ld a, [wd0eb]
|
||||||
inc a
|
inc a
|
||||||
ld [wcfa3], a
|
ld [wcfa3], a
|
||||||
@ -6305,7 +6305,7 @@ Function1029cf: ; 1029cf
|
|||||||
ld hl, wcd4b
|
ld hl, wcd4b
|
||||||
set 1, [hl]
|
set 1, [hl]
|
||||||
ld de, Unknown_102a33
|
ld de, Unknown_102a33
|
||||||
call Function1bb1
|
call InitMenu3
|
||||||
ld a, [wcd4a]
|
ld a, [wcd4a]
|
||||||
inc a
|
inc a
|
||||||
ld [wcd4a], a
|
ld [wcd4a], a
|
||||||
@ -6478,7 +6478,7 @@ Function102b4e: ; 102b4e
|
|||||||
ld a, [MenuSelection2]
|
ld a, [MenuSelection2]
|
||||||
push af
|
push af
|
||||||
ld de, Unknown_102b73
|
ld de, Unknown_102b73
|
||||||
call Function1bb1
|
call InitMenu3
|
||||||
pop af
|
pop af
|
||||||
ld [MenuSelection2], a
|
ld [MenuSelection2], a
|
||||||
ld a, [OTPartyCount]
|
ld a, [OTPartyCount]
|
||||||
@ -6503,7 +6503,7 @@ Function102b7b: ; 102b7b
|
|||||||
ld a, [MenuSelection2]
|
ld a, [MenuSelection2]
|
||||||
push af
|
push af
|
||||||
ld de, Unknown_102b94
|
ld de, Unknown_102b94
|
||||||
call Function1bb1
|
call InitMenu3
|
||||||
pop af
|
pop af
|
||||||
ld [MenuSelection2], a
|
ld [MenuSelection2], a
|
||||||
ld a, [PartyCount]
|
ld a, [PartyCount]
|
||||||
|
11
wram.asm
11
wram.asm
@ -1357,8 +1357,8 @@ wcf98:: ds 3
|
|||||||
wcf9b:: ds 3
|
wcf9b:: ds 3
|
||||||
wcf9e:: ds 3
|
wcf9e:: ds 3
|
||||||
wMenuData2End::
|
wMenuData2End::
|
||||||
|
wMenuData3::
|
||||||
wcfa1:: ds 1
|
wcfa1:: ds 1
|
||||||
|
|
||||||
wcfa2:: ds 1
|
wcfa2:: ds 1
|
||||||
wcfa3:: ds 1
|
wcfa3:: ds 1
|
||||||
wcfa4:: ds 1
|
wcfa4:: ds 1
|
||||||
@ -1366,6 +1366,7 @@ wcfa5:: ds 1 ; dynamic menu flags?
|
|||||||
wcfa6:: ds 1 ; dynamic menu flags?
|
wcfa6:: ds 1 ; dynamic menu flags?
|
||||||
wcfa7:: ds 1
|
wcfa7:: ds 1
|
||||||
wcfa8:: ds 1
|
wcfa8:: ds 1
|
||||||
|
wMenuData3End::
|
||||||
MenuSelection2:: ds 1
|
MenuSelection2:: ds 1
|
||||||
wcfaa:: ds 1
|
wcfaa:: ds 1
|
||||||
wcfab:: ds 1
|
wcfab:: ds 1
|
||||||
@ -1648,6 +1649,7 @@ CurMoveNum:: ; d0d5
|
|||||||
|
|
||||||
wd0d6:: ds 1
|
wd0d6:: ds 1
|
||||||
wd0d7:: ds 1
|
wd0d7:: ds 1
|
||||||
|
wPartyMenuCursor::
|
||||||
wd0d8:: ds 1
|
wd0d8:: ds 1
|
||||||
wItemsPocketCursor:: ds 1
|
wItemsPocketCursor:: ds 1
|
||||||
wKeyItemsPocketCursor:: ds 1
|
wKeyItemsPocketCursor:: ds 1
|
||||||
@ -1659,6 +1661,7 @@ wd0e0:: ds 1
|
|||||||
wd0e1:: ds 1
|
wd0e1:: ds 1
|
||||||
wd0e2:: ds 1
|
wd0e2:: ds 1
|
||||||
wMoveSwapBuffer::
|
wMoveSwapBuffer::
|
||||||
|
wSwitchMon::
|
||||||
wd0e3:: ds 1
|
wd0e3:: ds 1
|
||||||
wd0e4:: ds 4
|
wd0e4:: ds 4
|
||||||
wQueuedScriptBank:: ds 1
|
wQueuedScriptBank:: ds 1
|
||||||
@ -2284,10 +2287,10 @@ ENDM
|
|||||||
object_struct Object10
|
object_struct Object10
|
||||||
object_struct Object11
|
object_struct Object11
|
||||||
object_struct Object12
|
object_struct Object12
|
||||||
ObjectStructsEnd::
|
ObjectStructsEnd:: ; d6de
|
||||||
|
|
||||||
wd6de::
|
wCmdQueue:: ds CMDQUEUE_CAPACITY * CMDQUEUE_ENTRY_SIZE
|
||||||
ds $40
|
ds $28
|
||||||
|
|
||||||
MapObjects:: ; d71e
|
MapObjects:: ; d71e
|
||||||
map_object: MACRO
|
map_object: MACRO
|
||||||
|
Loading…
Reference in New Issue
Block a user