sb: get background pulsing
This commit is contained in:
parent
e645d558fa
commit
2fd78d96b2
|
@ -134,24 +134,32 @@ title_cycle_loop:
|
||||||
;===================
|
;===================
|
||||||
|
|
||||||
;==========================
|
;==========================
|
||||||
; Load Background
|
; Load Backgrounds
|
||||||
;===========================
|
;===========================
|
||||||
|
; this is tricky as there's not enough room
|
||||||
|
; so we are over-writing stuff carefully
|
||||||
|
|
||||||
load_background:
|
load_backgrounds:
|
||||||
|
|
||||||
; size in ldsizeh:ldsizel (f1/f0)
|
lda #<bg2_data
|
||||||
|
|
||||||
lda #<comp_data
|
|
||||||
sta ZX0_src
|
sta ZX0_src
|
||||||
lda #>comp_data
|
lda #>bg2_data
|
||||||
sta ZX0_src+1
|
sta ZX0_src+1
|
||||||
|
|
||||||
|
|
||||||
lda #$A0
|
lda #$A0
|
||||||
|
|
||||||
|
jsr full_decomp
|
||||||
|
|
||||||
|
lda #<bg1_data
|
||||||
|
sta ZX0_src
|
||||||
|
lda #>bg1_data
|
||||||
|
sta ZX0_src+1
|
||||||
|
|
||||||
|
lda #$80
|
||||||
|
|
||||||
jsr full_decomp
|
jsr full_decomp
|
||||||
|
|
||||||
|
|
||||||
;===================
|
;===================
|
||||||
; set up variables
|
; set up variables
|
||||||
|
|
||||||
|
@ -186,7 +194,7 @@ load_background:
|
||||||
title_data:
|
title_data:
|
||||||
.incbin "asplode_graphics/sb_title.hgr.zx02"
|
.incbin "asplode_graphics/sb_title.hgr.zx02"
|
||||||
|
|
||||||
comp_data:
|
bg1_data:
|
||||||
.incbin "asplode_graphics/sb_zone.hgr.zx02"
|
.incbin "asplode_graphics/sb_zone.hgr.zx02"
|
||||||
|
|
||||||
sound_data:
|
sound_data:
|
||||||
|
@ -208,6 +216,16 @@ main_loop:
|
||||||
; copy over background
|
; copy over background
|
||||||
;========================
|
;========================
|
||||||
reset_loop:
|
reset_loop:
|
||||||
|
|
||||||
|
lda FRAME
|
||||||
|
and #$2
|
||||||
|
beq odd_bg
|
||||||
|
even_bg:
|
||||||
|
lda #$A0
|
||||||
|
bne do_bg
|
||||||
|
odd_bg:
|
||||||
|
lda #$80
|
||||||
|
do_bg:
|
||||||
jsr hgr_copy
|
jsr hgr_copy
|
||||||
|
|
||||||
|
|
||||||
|
@ -790,3 +808,6 @@ bullet_vals_center:
|
||||||
; 31= 139
|
; 31= 139
|
||||||
|
|
||||||
; 9,5 -> 22,14 = 12x9 roughly. 3 times smaller, 4x3? 2x6?
|
; 9,5 -> 22,14 = 12x9 roughly. 3 times smaller, 4x3? 2x6?
|
||||||
|
|
||||||
|
bg2_data:
|
||||||
|
.incbin "asplode_graphics/sb_zone2.hgr.zx02"
|
||||||
|
|
|
@ -10,7 +10,19 @@ PNG2GR = ../../../utils/gr-utils/png2gr
|
||||||
PNG2SPRITES = ../../../utils/gr-utils/png2sprites
|
PNG2SPRITES = ../../../utils/gr-utils/png2sprites
|
||||||
HGR_SPRITE = ../../../utils/hgr-utils/hgr_make_sprite
|
HGR_SPRITE = ../../../utils/hgr-utils/hgr_make_sprite
|
||||||
|
|
||||||
all: sb_zone.hgr.zx02 sb_title.hgr.zx02 sb_sprites.inc
|
all: sb_zone.hgr.zx02 sb_zone2.hgr.zx02 \
|
||||||
|
sb_combined.hgr.zx02 \
|
||||||
|
sb_title.hgr.zx02 sb_sprites.inc
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
sb_combined.hgr.zx02: sb_zone.hgr sb_zone2.hgr
|
||||||
|
cat sb_zone.hgr > sb_combined.hgr
|
||||||
|
cat sb_zone2.hgr >> sb_combined.hgr
|
||||||
|
$(ZX02) sb_combined.hgr sb_combined.hgr.zx02
|
||||||
|
|
||||||
|
sb_zone.hgr: sb_zone.png
|
||||||
|
$(PNG_TO_HGR) sb_zone.png > sb_zone.hgr
|
||||||
|
|
||||||
####
|
####
|
||||||
|
|
||||||
|
@ -22,6 +34,15 @@ sb_zone.hgr: sb_zone.png
|
||||||
|
|
||||||
####
|
####
|
||||||
|
|
||||||
|
sb_zone2.hgr.zx02: sb_zone2.hgr
|
||||||
|
$(ZX02) sb_zone2.hgr sb_zone2.hgr.zx02
|
||||||
|
|
||||||
|
sb_zone2.hgr: sb_zone2.png
|
||||||
|
$(PNG_TO_HGR) sb_zone2.png > sb_zone2.hgr
|
||||||
|
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
sb_title.hgr.zx02: sb_title.hgr
|
sb_title.hgr.zx02: sb_title.hgr
|
||||||
$(ZX02) sb_title.hgr sb_title.hgr.zx02
|
$(ZX02) sb_title.hgr sb_title.hgr.zx02
|
||||||
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 16 KiB |
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
|
@ -20,6 +20,7 @@ asplode_loop:
|
||||||
; copy background
|
; copy background
|
||||||
;===================
|
;===================
|
||||||
|
|
||||||
|
lda #$a0
|
||||||
jsr hgr_copy
|
jsr hgr_copy
|
||||||
|
|
||||||
;==========================
|
;==========================
|
||||||
|
|
|
@ -1,25 +1,34 @@
|
||||||
|
; special case
|
||||||
;=========================================================
|
;=========================================================
|
||||||
; hgr copy from $2000 to $4000
|
; hgr copy from $A000/$8000 to current DRAW_PAGE
|
||||||
;=========================================================
|
;=========================================================
|
||||||
; copy $2000 to $4000
|
|
||||||
|
|
||||||
; would be faster if we unroll it, but much bigger
|
; would be faster if we unroll it, but much bigger
|
||||||
|
|
||||||
|
; old numbers
|
||||||
|
|
||||||
; 14+ ((14*256)+20)*32 + 5 = 115347 = 8.6fps
|
; 14+ ((14*256)+20)*32 + 5 = 115347 = 8.6fps
|
||||||
|
|
||||||
; theoretical unrolled, 30*6 bytes bigger (180 bytes?)
|
; theoretical unrolled, 30*6 bytes bigger (180 bytes?)
|
||||||
; 2 + ((9*32)+5)*256 + 5 = 75015 = 13.3 fps
|
; 2 + ((9*32)+5)*256 + 5 = 75015 = 13.3 fps
|
||||||
|
|
||||||
hgr_copy:
|
hgr_copy:
|
||||||
|
; copy from in A ($80/$A0)
|
||||||
|
|
||||||
|
sta hgr_copy_smc+2 ; 4
|
||||||
|
clc
|
||||||
|
adc #$20
|
||||||
|
sta hgr_copy_end_smc+1
|
||||||
|
|
||||||
|
; lda #$A0 ; 2
|
||||||
|
|
||||||
ldx #0 ; 2
|
ldx #0 ; 2
|
||||||
lda #$A0 ; 2
|
|
||||||
sta hgr_copy_smc+2 ; 4
|
|
||||||
|
|
||||||
lda DRAW_PAGE
|
lda DRAW_PAGE
|
||||||
clc
|
clc
|
||||||
adc #$20
|
adc #$20
|
||||||
; lda #$20 ; 2
|
|
||||||
sta hgr_copy_smc+5 ; 4
|
sta hgr_copy_smc+5 ; 4
|
||||||
|
|
||||||
hgr_copy_column:
|
hgr_copy_column:
|
||||||
|
@ -37,6 +46,7 @@ hgr_copy_smc:
|
||||||
inc hgr_copy_smc+5 ; 6
|
inc hgr_copy_smc+5 ; 6
|
||||||
|
|
||||||
lda hgr_copy_smc+2 ; 4
|
lda hgr_copy_smc+2 ; 4
|
||||||
|
hgr_copy_end_smc:
|
||||||
cmp #$C0 ; 2
|
cmp #$C0 ; 2
|
||||||
bne hgr_copy_column ; 2/3
|
bne hgr_copy_column ; 2/3
|
||||||
|
|
||||||
|
|
|
@ -185,7 +185,7 @@ sector_array:
|
||||||
|
|
||||||
|
|
||||||
length_array:
|
length_array:
|
||||||
.byte 40, 16, 16, 64 ; TITLE, DUCK, ROOF, ASPLODE
|
.byte 40, 16, 16, 70 ; TITLE, DUCK, ROOF, ASPLODE
|
||||||
.byte 32, 32, 32 ; TARGET, CLIFF, RAT
|
.byte 32, 32, 32 ; TARGET, CLIFF, RAT
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue