peasant: have all the kerrek sprites hooked up

This commit is contained in:
Vince Weaver 2021-12-26 20:21:14 -05:00
parent 15d6ba1d61
commit 12a06d01ce
2 changed files with 66 additions and 11 deletions

View File

@ -30,7 +30,9 @@ kerrek_no_draw:
kerrek_actually_draw: kerrek_actually_draw:
; draw body ;=================
; draw kerrek body
;=================
lda KERREK_DIRECTION lda KERREK_DIRECTION
beq kerrek_draw_body_left beq kerrek_draw_body_left
@ -82,30 +84,81 @@ kerrek_draw_body_common:
jsr hgr_draw_sprite jsr hgr_draw_sprite
.if 0
;=================
; draw kerrek head
;=================
lda KERREK_DIRECTION
beq kerrek_draw_head_left
kerrek_draw_head_right:
; draw head right
lda KERREK_X
and #1
beq kerrek_draw_head_right_even
kerrek_draw_head_right_odd:
lda #<kerrek_r1_head_sprite
sta INL
lda #>kerrek_r1_head_sprite
jmp kerrek_draw_head_right_common
kerrek_draw_head_right_even:
lda #<kerrek_r2_head_sprite
sta INL
lda #>kerrek_r2_head_sprite
kerrek_draw_head_right_common:
sta INH
ldx KERREK_X
inx
jmp kerrek_draw_head_common
kerrek_draw_head_left: kerrek_draw_head_left:
; draw head ; draw head left
lda KERREK_X
and #1
beq kerrek_draw_head_left_even
kerrek_draw_head_left_odd:
lda #<kerrek_l2_head_sprite
sta INL
lda #>kerrek_l2_head_sprite
jmp kerrek_draw_head_left_common
kerrek_draw_head_left_even:
lda #<kerrek_l1_head_sprite lda #<kerrek_l1_head_sprite
sta INL sta INL
lda #>kerrek_l1_head_sprite lda #>kerrek_l1_head_sprite
kerrek_draw_head_left_common:
sta INH sta INH
ldx KERREK_X ldx KERREK_X
dex dex
stx CURSOR_X stx CURSOR_X
ldx KERREK_Y
inx kerrek_draw_head_common:
inx
inx lda KERREK_Y
inx clc
inx adc #6
stx CURSOR_Y sta CURSOR_Y
jsr hgr_draw_sprite jsr hgr_draw_sprite
.endif
rts rts
;======================= ;=======================

View File

@ -64,6 +64,8 @@ LEVEL_OVER = $6C
NEW_FROM_DISK = $01 NEW_FROM_DISK = $01
KERREK_SPEED = $6D KERREK_SPEED = $6D
KERREK_DIRECTION= $6E ; 0 = left, 1=right KERREK_DIRECTION= $6E ; 0 = left, 1=right
KERREK_LEFT = 0
KERREK_RIGHT = 1
SPEECH_PTRL = $70 SPEECH_PTRL = $70