From f41aaac3d77a77adf93a8ae70a7dcd3593d24a7a Mon Sep 17 00:00:00 2001 From: alpine9000 Date: Wed, 27 Apr 2016 10:54:12 +1000 Subject: [PATCH] render pathways until empty column --- .gitignore | 4 ++-- 028.bs/.gitignore | 3 ++- 028.bs/constants.i | 2 +- 028.bs/game1.s | 21 +++++++++++++++++---- 028.bs/player.s | 3 ++- 5 files changed, 24 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 1190609..7af42b9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,5 @@ assets/demo_full.png out/ *~ -#*# -.#* \ No newline at end of file +\#*\# +.\#* \ No newline at end of file diff --git a/028.bs/.gitignore b/028.bs/.gitignore index 5b68c9f..8ac4160 100644 --- a/028.bs/.gitignore +++ b/028.bs/.gitignore @@ -1 +1,2 @@ -assets/P61.placeholder \ No newline at end of file +assets/P61.placeholder +bin \ No newline at end of file diff --git a/028.bs/constants.i b/028.bs/constants.i index 0cebba8..30554a8 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 12 +PLAYER_PAUSE_PIXELS equ 8 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 ec56d54..bb69a73 100644 --- a/028.bs/game1.s +++ b/028.bs/game1.s @@ -3,6 +3,7 @@ xdef BigBang xdef pathwayRenderPending + xdef pathwayXIndex xdef copperList xdef mpanelCopperList @@ -355,10 +356,11 @@ RenderPathway: bne .skip sub.w #1,pathwayRenderPending - move.w #6,d6 -.loopY: - move.l #5,d5 + move.w pathwayXIndex,d5 ; x index .loopX: + move.w #6,d6 ; y index + move.w #0,d7 ; number of rows without a pathway +.loopY: bsr GetPathTile move.l d0,a2 move.w (a2),d0 @@ -383,9 +385,18 @@ RenderPathway: move.l #10,d2 sub.l d6,d2 jsr BlitTile + bra .next .dontBlit: - dbra d5,.loopX + add.w #1,d7 + cmp.w pathwayXIndex,d5 + beq .next + cmp.w #7,d7 + beq .skip +.next: dbra d6,.loopY + add.w #1,d5 + bra .loopX + .skip: rts @@ -1121,6 +1132,8 @@ moving: dc.w 0 pathwayRenderPending: dc.w 0 +pathwayXIndex + dc.w 0 tileFadePtr: dc.l tileFade diff --git a/028.bs/player.s b/028.bs/player.s index aea9f37..d140a57 100644 --- a/028.bs/player.s +++ b/028.bs/player.s @@ -259,7 +259,8 @@ CheckPlayerMiss: blt .doBigBang sub.w #PLAYER_LEFT_X,d0 lsr.w #4,d0 ; x columns - + move.w d0,pathwayXIndex + move.l #(FOREGROUND_PLAYAREA_WIDTH_WORDS/2)-1,d1 sub.w d0,d1 mulu.w #FOREGROUND_PLAYAREA_HEIGHT_WORDS*2,d1