mirror of
https://codeberg.org/hkzlab/TK2048.git
synced 2025-12-25 10:42:17 +11:00
Reworked wait time before making a move in demo mode
This commit is contained in:
parent
a3425993b1
commit
d920f68139
2 changed files with 10 additions and 9 deletions
|
|
@ -93,7 +93,7 @@ void main(void) {
|
|||
__enable_interrupts();
|
||||
|
||||
uint16_t lfsr;
|
||||
uint16_t current_run = 0;
|
||||
uint16_t current_run = 0;
|
||||
while(1) { // Game loop
|
||||
lfsr = lfsr_update();
|
||||
|
||||
|
|
@ -103,16 +103,16 @@ void main(void) {
|
|||
snd_mod_button();
|
||||
done = 1;
|
||||
}
|
||||
__enable_interrupts();
|
||||
|
||||
if(!done && current_run < RUNS_TO_SKIP) {
|
||||
if(!done && current_run <= RUNS_TO_SKIP) {
|
||||
current_run++;
|
||||
__enable_interrupts();
|
||||
continue;
|
||||
} else {
|
||||
current_run = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
__disable_interrupts();
|
||||
current_run = 0;
|
||||
|
||||
if(!done) {
|
||||
switch((lfsr & 0x0003) + 1) {
|
||||
case K_UP:
|
||||
|
|
|
|||
|
|
@ -527,14 +527,15 @@ vdp_irq_handler:
|
|||
|
||||
;;; Save ZP
|
||||
jsr _irq_save_zp
|
||||
|
||||
lda VDP_REG
|
||||
|
||||
jsr vdp_write_interleaved_sat
|
||||
|
||||
;;; Restore ZP
|
||||
jsr _irq_restore_zp
|
||||
|
||||
;;; Clear the IRQ
|
||||
lda VDP_REG
|
||||
|
||||
; Restore the registers
|
||||
pla
|
||||
tay
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue