wip pathway rendering

This commit is contained in:
alpine9000
2016-04-27 18:56:26 +10:00
parent f41aaac3d7
commit 664eab6059
3 changed files with 21 additions and 3 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ out/panelFade.s: assets/panel.pal ../tools/fade/out/fade
../tools/fade/out/fade --from-grey --to=assets/panel.pal --output=panel > out/panelFade.s
out/tileFade.s: assets/tileFadeFrom.pal assets/tileFadeTo.pal ../tools/fade/out/fade
../tools/fade/out/fade --steps=48 --colors=2 --from=assets/tileFadeFrom.pal --to=assets/tileFadeTo.pal --output=tileFade > out/tileFade.s
../tools/fade/out/fade --steps=64 --colors=2 --from=assets/tileFadeFrom.pal --to=assets/tileFadeTo.pal --output=tileFade > out/tileFade.s
out/foreground-map.s: foreground.tmx
../tools/mapgen/out/mapgen --depth=3 --input=foreground.tmx
+1 -1
View File
@@ -9,7 +9,7 @@ PLAYER_TOP_Y equ (PLAYER_BOTTOM_Y-(7*16))
PLAYER_JUMP_PIXELS equ 8
PLAYER_JUMP_SHIFT_CONVERT equ 3 ; x = x / PLAYER_JUMP_PIXELS
PLAYER_CHECK_MISS_PIXELS equ 6
PLAYER_PAUSE_PIXELS equ 8
PLAYER_PAUSE_PIXELS equ 12
PLAYER_MOVE_PIXELS equ 2
PLAYER_SPRITE_VERTICAL_BYTES equ ((16*4)+12)
+19 -1
View File
@@ -223,6 +223,7 @@ Update:
.skipForegroundUpdates:
cmp.w #0,pathwayRenderPending
beq .dontRenderPathway
jsr InstallTilePalette
jsr RenderPathway
.dontRenderPathway:
jsr InstallNextTileColor
@@ -349,11 +350,14 @@ RenderNextForegroundFrame:
RenderPathway:
;; only render when scroll complete
if 0
move.l foregroundScrollX,d0
lsr.l #FOREGROUND_SCROLL_SHIFT_CONVERT,d0 ; convert to pixels
and.b #$f,d0
cmp.b #$f,d0
bne .skip
endif
sub.w #1,pathwayRenderPending
move.w pathwayXIndex,d5 ; x index
@@ -1012,6 +1016,20 @@ InstallFlagsGreyPalette:
rts
InstallTilePalette:
move.l #tileFade,tileFadePtr
lea playAreaCopperPalettePtr2,a1
add.l #6,a1 ; point to COLOR01
lea tileFade,a0
move.l #1,d0
.loop:
move.w (a0),(a1)
add.l #2,a0
add.l #4,a1
dbra d0,.loop
rts
InstallNextTileColor:
lea playAreaCopperPalettePtr2,a1
add.l #6,a1 ; point to COLOR01
@@ -1028,7 +1046,7 @@ InstallNextTileColor:
add.l #2*2,tileFadePtr
bra .done
.reset:
move.l #tileFade,tileFadePtr
;; move.l #tileFade,tileFadePtr
.done:
rts