From 664eab605990c9e24e8faa54e4de2f83d74622e2 Mon Sep 17 00:00:00 2001 From: alpine9000 Date: Wed, 27 Apr 2016 18:56:26 +1000 Subject: [PATCH] wip pathway rendering --- 028.bs/Makefile | 2 +- 028.bs/constants.i | 2 +- 028.bs/game1.s | 20 +++++++++++++++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/028.bs/Makefile b/028.bs/Makefile index d1438a4..f0a55c5 100644 --- a/028.bs/Makefile +++ b/028.bs/Makefile @@ -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 diff --git a/028.bs/constants.i b/028.bs/constants.i index 30554a8..0cebba8 100644 --- a/028.bs/constants.i +++ b/028.bs/constants.i @@ -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) diff --git a/028.bs/game1.s b/028.bs/game1.s index bb69a73..e1953de 100644 --- a/028.bs/game1.s +++ b/028.bs/game1.s @@ -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