Richard
Registered: Dec 2001 Posts: 621 |
Yet another coding problem
Hi gang,
I'm preparing a 4-level playable preview of Bomb Chase for Commodore Scene cover disk, but I seem to have some problems regarding my code. I set $0380 as level_ct, but the levels seem to skip once completed a certain level, therefore making my game preview a right pain in the a**e. Here's what I written:
lda level_ct
cmp #$01
beq blue (Works all the time)
cmp #$02
beq green
cmp #$03
beq red
cmp #$04
beq brown
jmp $5400 ;Display game complete message
blue lda #$06
ldx #$0e
sta $d022
stx $d023
jmp maingame
red lda #$02
ldx #$0a
sta $d022
jmp maingame
stx $d023
When a life is lost, a new interrupt is playing. The same goes for level complete. I add inc level_ct once, then jmp leveldone, but instead of jumping on to the next level screen and colour(once level 1 is complete). Please can you tell me what's wrong? Is it related to calling SEI to the level complete routine? If not, why is this happening? It's frustrating - for me I want to get this preview done before the weekend.
|