mirror of https://github.com/pret/pokecrystal.git
Make proper cmdqueue constants
This commit is contained in:
parent
04d0490c4c
commit
23708441ef
|
@ -119,8 +119,14 @@ CMDQUEUE_05 EQU 5
|
|||
CMDQUEUE_ENTRY_SIZE EQU 6
|
||||
CMDQUEUE_CAPACITY EQU 4
|
||||
|
||||
; command queue types
|
||||
CMDQUEUE_STONETABLE EQU 2
|
||||
; HandleQueuedCommand.Jumptable indexes (see engine/overworld/events.asm)
|
||||
const_def
|
||||
const CMDQUEUE_NULL
|
||||
const CMDQUEUE_NULL2
|
||||
const CMDQUEUE_STONETABLE
|
||||
const CMDQUEUE_TYPE3
|
||||
const CMDQUEUE_TYPE4
|
||||
NUM_CMDQUEUE_TYPES EQU const_value
|
||||
|
||||
; elevfloor macro values
|
||||
; ElevatorFloorNames indexes (see data/events/elevator_floors.asm)
|
||||
|
|
|
@ -1336,8 +1336,8 @@ DoBikeStep::
|
|||
|
||||
ClearCmdQueue::
|
||||
ld hl, wCmdQueue
|
||||
ld de, 6
|
||||
ld c, 4
|
||||
ld de, CMDQUEUE_ENTRY_SIZE
|
||||
ld c, CMDQUEUE_CAPACITY
|
||||
xor a
|
||||
.loop
|
||||
ld [hl], a
|
||||
|
@ -1443,7 +1443,7 @@ HandleQueuedCommand:
|
|||
ld hl, CMDQUEUE_TYPE
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
cp 5
|
||||
cp NUM_CMDQUEUE_TYPES
|
||||
jr c, .okay
|
||||
xor a
|
||||
|
||||
|
|
Loading…
Reference in New Issue