1
0
mirror of https://github.com/fumiama/c64-snake.git synced 2026-06-05 00:32:39 +08:00

move函数bug修复

This commit is contained in:
laffey98
2021-04-14 16:57:10 +08:00
parent 061cf0ef15
commit 63ad73e163
2 changed files with 10 additions and 1 deletions

View File

@@ -26,7 +26,7 @@ main:
* jsr move ; 蛇移动一格
jsr calcscore ; 计算得分
jsr printscore ; 打印分数
lda #32
lda #20
jsr delay ; 延时期间最后一个按键位于d
lda d
cmp #ed_g

View File

@@ -21,12 +21,16 @@ move:
bne +
lda #40
jsr _propergate_tail
jsr _head_move
rts
* ldy #1
lda (_stail),y
cmp #csnk ;right search
bne +
lda #1
jsr _propergate_tail
jsr _head_move
rts
* jsr _copy_to_ptr
lda #40
sta _tmp
@@ -36,6 +40,8 @@ move:
cmp #csnk ;up search
bne +
jsr _copy_to_tail
jsr _head_move
rts
* jsr _copy_to_ptr
lda #1
sta _tmp
@@ -44,11 +50,14 @@ move:
cmp #csnk ;left search
bne _head_move
jsr _copy_to_tail
jsr _head_move
rts
;;;;;;;;;;;;;;;;;;;;;;;;;
; head move
;;;;;;;;;;;;;;;;;;;;;;;;;
_head_move:
;lda #go_l ;测试用
ldy #0
`_m_judge_dir_head go_d, 40, _propergate_head
`_m_judge_dir_head go_r, 1, _propergate_head
`_m_judge_dir_head go_l, 1, _borrow_head