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 \
|
||||
lilia.zx0.prg \
|
||||
lilia_hero.zx0.prg \
|
||||
island.zx0.prg
|
||||
island.zx0.prg \
|
||||
clouds.zx0.prg
|
||||
|
||||
LZPRGS = \
|
||||
island_map.lz.prg
|
||||
|
|
@ -189,6 +190,7 @@ $(DISKIMAGE): $(ASSEMBLE) $(CC1541) $(ZX0PRGS) $(LZPRGS)
|
|||
-f "lilhero" -w lilia_hero.zx0.prg \
|
||||
-f "island" -w island.zx0.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:
|
||||
lda #0
|
||||
sta timer_mode
|
||||
sta $d015
|
||||
; TODO is there a delay here
|
||||
|
||||
part_10:
|
||||
jmp *
|
||||
; we run out of space before the fixed location vector return now
|
||||
jmp part_10
|
||||
|
||||
drawrow:
|
||||
ldy #0
|
||||
|
|
@ -810,13 +811,15 @@ init_2x:
|
|||
lda #$00
|
||||
sta $d012
|
||||
|
||||
position_2x_to_display:
|
||||
lda #51
|
||||
position_2x:
|
||||
:
|
||||
bit $d011
|
||||
bpl :-
|
||||
:
|
||||
bit $d011
|
||||
bmi :-
|
||||
lda #51
|
||||
:
|
||||
cmp $d012
|
||||
bne :-
|
||||
|
|
@ -1259,18 +1262,19 @@ irq_badguy:
|
|||
pla
|
||||
rti
|
||||
|
||||
badguy: .byte "badguy",0
|
||||
fontname: .byte "font",0
|
||||
sidname: .byte "sid", 0
|
||||
introname: .byte "intrbmp", 0
|
||||
towername: .byte "tower", 0
|
||||
towerbeamname: .byte "towerbm", 0
|
||||
fieldname: .byte "field", 0
|
||||
fallingstarname: .byte "fallstar", 0
|
||||
lilianame: .byte "lilia", 0
|
||||
liliaheroname: .byte "lilhero", 0
|
||||
islandname: .byte "island", 0
|
||||
islandmapname: .byte "islandmap", 0
|
||||
badguy: .byte "badguy",0
|
||||
fontname: .byte "font",0
|
||||
sidname: .byte "sid", 0
|
||||
introname: .byte "intrbmp", 0
|
||||
towername: .byte "tower", 0
|
||||
towerbeamname: .byte "towerbm", 0
|
||||
fieldname: .byte "field", 0
|
||||
fallingstarname: .byte "fallstar", 0
|
||||
lilianame: .byte "lilia", 0
|
||||
liliaheroname: .byte "lilhero", 0
|
||||
islandname: .byte "island", 0
|
||||
islandmapname: .byte "islandmap", 0
|
||||
cloudsname: .byte "clouds", 0
|
||||
|
||||
|
||||
darmtower_txt:
|
||||
|
|
@ -1429,6 +1433,107 @@ load_8000_zx02:
|
|||
pla
|
||||
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:
|
||||
ldy #$44
|
||||
.byte $2c ; skip next instruction
|
||||
|
|
|
|||
Loading…
Reference in a new issue