Add clouds part
This commit is contained in:
parent
261f5c805e
commit
937bea7699
BIN
assets/clouds.png
Normal file
BIN
assets/clouds.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
BIN
assets/clouds.prg
Normal file
BIN
assets/clouds.prg
Normal file
Binary file not shown.
BIN
assets/clouds_sprites.png
Normal file
BIN
assets/clouds_sprites.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
BIN
assets/clouds_sprites.prg
Normal file
BIN
assets/clouds_sprites.prg
Normal file
Binary file not shown.
|
|
@ -138,7 +138,8 @@ ZX0PRGS = \
|
||||||
falling_star.zx0.prg \
|
falling_star.zx0.prg \
|
||||||
lilia.zx0.prg \
|
lilia.zx0.prg \
|
||||||
lilia_hero.zx0.prg \
|
lilia_hero.zx0.prg \
|
||||||
island.zx0.prg
|
island.zx0.prg \
|
||||||
|
clouds.zx0.prg
|
||||||
|
|
||||||
LZPRGS = \
|
LZPRGS = \
|
||||||
island_map.lz.prg
|
island_map.lz.prg
|
||||||
|
|
@ -189,6 +190,7 @@ $(DISKIMAGE): $(ASSEMBLE) $(CC1541) $(ZX0PRGS) $(LZPRGS)
|
||||||
-f "lilhero" -w lilia_hero.zx0.prg \
|
-f "lilhero" -w lilia_hero.zx0.prg \
|
||||||
-f "island" -w island.zx0.prg \
|
-f "island" -w island.zx0.prg \
|
||||||
-f "islandmap" -w island_map.lz.prg \
|
-f "islandmap" -w island_map.lz.prg \
|
||||||
|
-f "clouds" -w clouds.zx0.prg \
|
||||||
$@
|
$@
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
BIN
loader/samples/minexample/clouds.bin
Normal file
BIN
loader/samples/minexample/clouds.bin
Normal file
Binary file not shown.
|
|
@ -659,10 +659,11 @@ part_9:
|
||||||
@finish:
|
@finish:
|
||||||
lda #0
|
lda #0
|
||||||
sta timer_mode
|
sta timer_mode
|
||||||
|
sta $d015
|
||||||
; TODO is there a delay here
|
; TODO is there a delay here
|
||||||
|
|
||||||
part_10:
|
; we run out of space before the fixed location vector return now
|
||||||
jmp *
|
jmp part_10
|
||||||
|
|
||||||
drawrow:
|
drawrow:
|
||||||
ldy #0
|
ldy #0
|
||||||
|
|
@ -810,13 +811,15 @@ init_2x:
|
||||||
lda #$00
|
lda #$00
|
||||||
sta $d012
|
sta $d012
|
||||||
|
|
||||||
|
position_2x_to_display:
|
||||||
|
lda #51
|
||||||
|
position_2x:
|
||||||
:
|
:
|
||||||
bit $d011
|
bit $d011
|
||||||
bpl :-
|
bpl :-
|
||||||
:
|
:
|
||||||
bit $d011
|
bit $d011
|
||||||
bmi :-
|
bmi :-
|
||||||
lda #51
|
|
||||||
:
|
:
|
||||||
cmp $d012
|
cmp $d012
|
||||||
bne :-
|
bne :-
|
||||||
|
|
@ -1271,6 +1274,7 @@ lilianame: .byte "lilia", 0
|
||||||
liliaheroname: .byte "lilhero", 0
|
liliaheroname: .byte "lilhero", 0
|
||||||
islandname: .byte "island", 0
|
islandname: .byte "island", 0
|
||||||
islandmapname: .byte "islandmap", 0
|
islandmapname: .byte "islandmap", 0
|
||||||
|
cloudsname: .byte "clouds", 0
|
||||||
|
|
||||||
|
|
||||||
darmtower_txt:
|
darmtower_txt:
|
||||||
|
|
@ -1429,6 +1433,107 @@ load_8000_zx02:
|
||||||
pla
|
pla
|
||||||
jmp zx02
|
jmp zx02
|
||||||
|
|
||||||
|
part_10:
|
||||||
|
; the sprite data is embedded into first few bitmap pixels
|
||||||
|
; which are hidden by black border attributes
|
||||||
|
@y = $60
|
||||||
|
ldx #<cloudsname
|
||||||
|
ldy #>cloudsname
|
||||||
|
jsr load_8000_zx02_2000
|
||||||
|
jsr init_bmp
|
||||||
|
ldx #0
|
||||||
|
stx $d010
|
||||||
|
stx $d017
|
||||||
|
stx $d01d
|
||||||
|
stx $d025
|
||||||
|
stx frame
|
||||||
|
dex
|
||||||
|
stx $d01b
|
||||||
|
stx $d01c
|
||||||
|
lda #11
|
||||||
|
sta $d026
|
||||||
|
lda #@y+50
|
||||||
|
jsr position_2x
|
||||||
|
; draw top half
|
||||||
|
@loop:
|
||||||
|
bit $d011
|
||||||
|
bpl @loop
|
||||||
|
ldx #0
|
||||||
|
ldy #0
|
||||||
|
lda frame
|
||||||
|
cmp #200 ; TODO
|
||||||
|
bcc :+
|
||||||
|
jmp @finish
|
||||||
|
:
|
||||||
|
adc @sprxs,x
|
||||||
|
sta $d000,y
|
||||||
|
sta temp
|
||||||
|
lda @sprys,x
|
||||||
|
sta $d001,y
|
||||||
|
txa
|
||||||
|
ora #$80
|
||||||
|
sta $7f8,x
|
||||||
|
lda @sprcols,x
|
||||||
|
sta $d027,x
|
||||||
|
lda temp
|
||||||
|
iny
|
||||||
|
iny
|
||||||
|
inx
|
||||||
|
cpx #8
|
||||||
|
bcc :-
|
||||||
|
lda #$ff
|
||||||
|
sta $d015
|
||||||
|
|
||||||
|
; draw bottom half
|
||||||
|
:
|
||||||
|
bit $d011
|
||||||
|
bmi :-
|
||||||
|
lda #@y+37
|
||||||
|
:
|
||||||
|
cmp $d012
|
||||||
|
bcs :-
|
||||||
|
|
||||||
|
ldx #0
|
||||||
|
ldy #0
|
||||||
|
lda frame
|
||||||
|
clc
|
||||||
|
:
|
||||||
|
adc @sprxs+8,x
|
||||||
|
sta $d000,y
|
||||||
|
sta temp
|
||||||
|
lda @sprys+8,x
|
||||||
|
sta $d001,y
|
||||||
|
txa
|
||||||
|
ora #$88
|
||||||
|
sta $7f8,x
|
||||||
|
lda @sprcols+8,x
|
||||||
|
sta $d027,x
|
||||||
|
lda temp
|
||||||
|
iny
|
||||||
|
iny
|
||||||
|
inx
|
||||||
|
cpx #6
|
||||||
|
nop
|
||||||
|
bcc :-
|
||||||
|
|
||||||
|
inc frame
|
||||||
|
jmp @loop
|
||||||
|
|
||||||
|
@sprxs:
|
||||||
|
.byte 200, <-24, 24, 24, <-64, 24, 24, 24
|
||||||
|
.byte 200-40, 24, 24, 24, <-44, 24
|
||||||
|
|
||||||
|
@sprys:
|
||||||
|
.byte @y-8, @y, @y, @y, @y+21, @y+21, @y+21, @y+21
|
||||||
|
.byte @y+42, @y+42, @y+42, @y+42, @y+63, @y+63
|
||||||
|
|
||||||
|
@sprcols:
|
||||||
|
.byte 2, 5, 5, 5, 14, 14, 14, 6
|
||||||
|
.byte 2, 2, 2, 9, 2, 2
|
||||||
|
|
||||||
|
@finish:
|
||||||
|
jmp *
|
||||||
|
|
||||||
clear_2bufs:
|
clear_2bufs:
|
||||||
ldy #$44
|
ldy #$44
|
||||||
.byte $2c ; skip next instruction
|
.byte $2c ; skip next instruction
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue