mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-11-04 05:05:13 +00:00
split: trees moving properly
was an issue with things spanning page boundaries
This commit is contained in:
parent
9308d0de62
commit
c8ef0589d4
@ -9,7 +9,7 @@ int main(int argc, char **argv) {
|
|||||||
// desired=5196;
|
// desired=5196;
|
||||||
// desired=4547;
|
// desired=4547;
|
||||||
// desired=9685;
|
// desired=9685;
|
||||||
desired=1673;
|
desired=236;
|
||||||
|
|
||||||
|
|
||||||
printf("You want %d cycles\n",desired);
|
printf("You want %d cycles\n",desired);
|
||||||
|
@ -88,7 +88,7 @@
|
|||||||
|
|
||||||
; Wait
|
; Wait
|
||||||
|
|
||||||
jsr wait_until_keypressed
|
; jsr wait_until_keypressed
|
||||||
|
|
||||||
; GR part
|
; GR part
|
||||||
bit LORES
|
bit LORES
|
||||||
@ -118,14 +118,14 @@ line_loop:
|
|||||||
|
|
||||||
; Wait
|
; Wait
|
||||||
|
|
||||||
jsr wait_until_keypressed
|
; jsr wait_until_keypressed
|
||||||
|
|
||||||
bit HIRES
|
bit HIRES
|
||||||
|
|
||||||
|
|
||||||
; Wait
|
; Wait
|
||||||
|
|
||||||
jsr wait_until_keypressed
|
; jsr wait_until_keypressed
|
||||||
|
|
||||||
;=====================================================
|
;=====================================================
|
||||||
; attempt vapor lock
|
; attempt vapor lock
|
||||||
@ -308,7 +308,7 @@ loop6:
|
|||||||
lda #<small_tree ; 2
|
lda #<small_tree ; 2
|
||||||
sta INL ; 3
|
sta INL ; 3
|
||||||
|
|
||||||
lda TREE2X ; 3
|
lda TREE1X ; 3
|
||||||
sta XPOS ; 3
|
sta XPOS ; 3
|
||||||
lda #28 ; 2
|
lda #28 ; 2
|
||||||
sta YPOS ; 3
|
sta YPOS ; 3
|
||||||
@ -320,12 +320,26 @@ loop6:
|
|||||||
;========
|
;========
|
||||||
; 603
|
; 603
|
||||||
|
|
||||||
; grsim_put_sprite_page(PAGE0,
|
;================
|
||||||
; small_tree,
|
; Draw Big Tree
|
||||||
; tree1_x,tree1_y);
|
|
||||||
; grsim_put_sprite_page(PAGE0,
|
lda #>big_tree ; 2
|
||||||
; big_tree,
|
sta INH ; 3
|
||||||
; tree2_x,tree2_y);
|
lda #<big_tree ; 2
|
||||||
|
sta INL ; 3
|
||||||
|
|
||||||
|
lda TREE2X ; 3
|
||||||
|
sta XPOS ; 3
|
||||||
|
lda #30 ; 2
|
||||||
|
sta YPOS ; 3
|
||||||
|
|
||||||
|
jsr put_sprite ; 6
|
||||||
|
;=========
|
||||||
|
; 27
|
||||||
|
; + 1410
|
||||||
|
;========
|
||||||
|
; 1437
|
||||||
|
|
||||||
|
|
||||||
; if (frame%8>4) {
|
; if (frame%8>4) {
|
||||||
; grsim_put_sprite_page(PAGE0,
|
; grsim_put_sprite_page(PAGE0,
|
||||||
@ -359,21 +373,21 @@ loop6:
|
|||||||
; 2216
|
; 2216
|
||||||
; Blanking time: 4550
|
; Blanking time: 4550
|
||||||
; Tree1 Sprite -603
|
; Tree1 Sprite -603
|
||||||
|
; Tree2 Sprite -1437
|
||||||
; Sprite -2216
|
; Sprite -2216
|
||||||
; Frame Update -13
|
; Frame Update -13
|
||||||
; Tree1 Update -21
|
; Tree1 Update -21
|
||||||
; Tree2 Update -21
|
; Tree2 Update -21
|
||||||
; JMP at end -3
|
; JMP at end -3
|
||||||
|
|
||||||
; 1673 is new number
|
; 236 is new number
|
||||||
; Try X=1 Y=152 cycles=1673
|
; Try X=3 Y=11 cycles=232 R4
|
||||||
|
|
||||||
|
lda #0 ; 2
|
||||||
; lda #0 ; 2
|
lda #0 ; 2
|
||||||
; lda #0 ; 2
|
ldy #11 ; 2
|
||||||
ldy #152 ; 2
|
|
||||||
loop7:
|
loop7:
|
||||||
ldx #1 ; 2
|
ldx #3 ; 2
|
||||||
loop8:
|
loop8:
|
||||||
dex ; 2
|
dex ; 2
|
||||||
bne loop8 ; 2nt/3
|
bne loop8 ; 2nt/3
|
||||||
@ -452,11 +466,11 @@ done_tree1:
|
|||||||
;===========================================================
|
;===========================================================
|
||||||
;===========================================================
|
;===========================================================
|
||||||
|
|
||||||
wait_until_keypressed:
|
;wait_until_keypressed:
|
||||||
lda KEYPRESS ; check if keypressed
|
; lda KEYPRESS ; check if keypressed
|
||||||
bpl wait_until_keypressed ; if not, loop
|
; bpl wait_until_keypressed ; if not, loop
|
||||||
bit KEYRESET
|
; bit KEYRESET
|
||||||
rts
|
; rts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -608,9 +622,11 @@ line4:.asciiz " * S E V E N "
|
|||||||
line5:.asciiz " . . . "
|
line5:.asciiz " . . . "
|
||||||
line6:.asciiz " . "
|
line6:.asciiz " . "
|
||||||
|
|
||||||
.include "../asm_routines/gr_offsets.s"
|
|
||||||
.include "../asm_routines/text_print.s"
|
.include "../asm_routines/text_print.s"
|
||||||
.include "../asm_routines/gr_hlin_double.s"
|
.include "../asm_routines/gr_hlin_double.s"
|
||||||
|
|
||||||
|
.align $100
|
||||||
|
.include "../asm_routines/gr_offsets.s"
|
||||||
.include "tfv_sprites.inc"
|
.include "tfv_sprites.inc"
|
||||||
|
|
||||||
.align $1000
|
.align $1000
|
||||||
|
Loading…
Reference in New Issue
Block a user