diff --git a/028.bs/Makefile b/028.bs/Makefile index ec16511..99db8b0 100644 --- a/028.bs/Makefile +++ b/028.bs/Makefile @@ -14,7 +14,7 @@ BASE_ADDRESS=4000 # note: this must be high enough not to conflict with MFMbufE BOOTBLOCK_ASM=alpine_bootblock.s -OBJS=out/init.o out/utils.o out/image.o out/blit.o out/joystick.o out/player.o out/items.o out/blitmtext.o out/blitmtext85.o out/blittext.o out/music.o out/P6112-Play.o out/splash.o out/background.o out/sound.o out/trackloader.o out/disk.o out/counter.o out/map.o out/message.o out/menu.o out/credits.o out/baloon.o +OBJS=out/init.o out/utils.o out/image.o out/blit.o out/joystick.o out/player.o out/items.o out/blitmtext.o out/blitmtext85.o out/blittext.o out/music.o out/P6112-Play.o out/splash.o out/background.o out/sound.o out/trackloader.o out/disk.o out/counter.o out/map.o out/message.o out/menu.o out/credits.o out/bob.o IMAGES=foreground.png \ background.png \ @@ -76,12 +76,12 @@ IMAGES=foreground.png \ font8x85.png\ splash.png\ splashSave.png\ - baloonMask.png\ + backgroundMask-mask.png\ countdown.png IMAGEDATA=$(addprefix out/, $(IMAGES:.png=.bin)) -VASM_EXTRA_ARGS=-DSFX=1 -DBALOON_BOB=1 -DMAX_P61_SIZE=$(MAX_P61_SIZE) -allmp +VASM_EXTRA_ARGS=-DSFX=1 -DMAX_P61_SIZE=$(MAX_P61_SIZE) -allmp LINKER_OPTIONS=-T link.script.x @@ -219,9 +219,8 @@ out/splashSave.bin: assets/splash.png out/splash.bin ../tools/croppa/out/croppa --input=assets/splash.png --output=out/splashSave.png --width=96 --height=64 --rows=1 --cols=1 --dx=0 --dy=0 --x=112 --y=150 $(IMAGECON) --input out/splashSave.png $(IMAGECON_ARGS) --output-bitplanes --output-grey-palette-asm --output-palette-asm --output-palette --output out/splashSave --colors=32 --output-copperlist --full-color-palette-file --use-palette=out/splash.pal -out/baloonMask.bin: assets/background.png - #../tools/croppa/out/croppa --input=assets/background.png --output=out/baloonMask.png --width=48 --height=32 --rows=1 --cols=1 --dx=0 --dy=0 --x=0 --y=64 - $(IMAGECON) --input assets/baloonMask.png $(IMAGECON_ARGS) --output-mask --output out/baloonMask --colors=8 --transparent-color=0,0,0 --output-png --palette-offset=8 +out/backgroundMask-mask.bin: assets/background.png + $(IMAGECON) --input assets/background.png $(IMAGECON_ARGS) --output-mask --output out/backgroundMask --output-png --colors=8 --transparent-color=0,0,14 --output-png --palette-offset=8 out/splash.bin: assets/splash.png $(IMAGECON) --input $< $(IMAGECON_ARGS) --output-bitplanes --output-grey-palette-asm --output-palette-asm --output-palette --output out/splash --colors=32 --output-copperlist --full-color-palette-file diff --git a/028.bs/P6112-Options.i b/028.bs/P6112-Options.i index e65ded3..a120d34 100644 --- a/028.bs/P6112-Options.i +++ b/028.bs/P6112-Options.i @@ -5,7 +5,7 @@ P61mode =2 ;Try other modes ONLY IF there are no Fxx commands >= 20. ;; --- options common to all P61modes --- -usecode=-1;$8000 ;CHANGE! to the USE hexcode from P61con for a big +usecode=$8159|$800D40D|$1559;$8000 ;CHANGE! to the USE hexcode from P61con for a big ;CPU-time gain! (See module usecodes at end of source) ;Multiple songs, single playroutine? Just "OR" the ;usecodes together! diff --git a/028.bs/assets/background.png b/028.bs/assets/background.png index 85dd497..63d42ed 100644 Binary files a/028.bs/assets/background.png and b/028.bs/assets/background.png differ diff --git a/028.bs/background.s b/028.bs/background.s index 0104ff4..cdb6ff8 100644 --- a/028.bs/background.s +++ b/028.bs/background.s @@ -22,8 +22,27 @@ InitialiseBackground: move.l #0,d2 jsr BlitFillColor rts - + RenderBackgroundTile: + ;; a2 - map + move.l backgroundScrollX,d0 + lsr.w #BACKGROUND_SCROLL_SHIFT_CONVERT,d0 ; convert to pixels + lsr.w #3,d0 ; bytes to scroll + add.l d0,a0 + lea backgroundTilemap,a1 + add.l #BITPLANE_WIDTH_BYTES-2,a0 ; dest + move.w (a2),d0 ; source tile + add.w d0,a1 + move.l backgroundScrollX,d2 + lsr.b #BACKGROUND_SCROLL_SHIFT_CONVERT,d2 ; convert to pixels + andi.w #$f,d2 ; find the shift component + + ;; this is where the old baloon was triggered - won't work anymore + jsr BlitBackgroundTile + + rts + +OldRenderBackgroundTile: ;; a2 - map move.l backgroundScrollX,d0 lsr.w #BACKGROUND_SCROLL_SHIFT_CONVERT,d0 ; convert to pixels @@ -38,16 +57,8 @@ RenderBackgroundTile: lsr.b #BACKGROUND_SCROLL_SHIFT_CONVERT,d2 ; convert to pixels andi.w #$f,d2 ; find the shift component - - if BALOON_BOB=1 - cmp.w #$306,d0 - bne .dontTriggerBaloon - move.w d2,d0 - jsr TriggerBaloon -.dontTriggerBaloon: - endif - jsr BlitBackgroundTile + cmp.l #backgroundBitplanes1,backgroundOffscreen bne .offsetSub add.l #backgroundBitplanes2-backgroundBitplanes1,a0 @@ -55,7 +66,9 @@ RenderBackgroundTile: .offsetSub: sub.l #backgroundBitplanes2-backgroundBitplanes1,a0 .doBlit: - jsr BlitBackgroundTile + + jsr BlitBackgroundTile + rts RenderNextBackgroundFrame: @@ -69,11 +82,29 @@ RenderNextBackgroundFrame: move.l #0,backgroundScrollX .skip: - if BALOON_BOB=1 - jsr RenderBaloon - endif + + if 1 ; new background tile render method + + jsr RestoreBobBackgrounds + move.l backgroundOffscreen,a0 bsr RenderBackgroundTile + add.l #2,a2 + add.l #BACKGROUND_SCROLL_PIXELS,backgroundScrollX + move.l backgroundOffscreen,a0 + bsr RenderBackgroundTile + sub.l #BACKGROUND_SCROLL_PIXELS,backgroundScrollX + sub.l #2,a2 + + else + + jsr RestoreBobBackgrounds + move.l backgroundOffscreen,a0 + bsr OldRenderBackgroundTile + + endif + + jsr RenderBob rts diff --git a/028.bs/baloon.s b/028.bs/baloon.s deleted file mode 100644 index 2d4187e..0000000 --- a/028.bs/baloon.s +++ /dev/null @@ -1,254 +0,0 @@ - include "includes.i" - - if BALOON_BOB=1 - - xdef RenderBaloon - xdef baloonSaveOffscreen - xdef baloonSaveOnscreen - xdef baloonLastSaveOffscreen - xdef baloonLastSaveOnscreen - xdef DisableBaloon - xdef EnableBaloon - xdef TriggerBaloon - -BALOON_BLIT_WIDTH_BYTES equ 6 -BALOON_BLIT_WIDTH_WORDS equ BALOON_BLIT_WIDTH_BYTES/2 - -DisableBaloon: - bsr RestoreBaloonBackground - move.w #0,baloonsEnabled - move.l baloonStartX,baloonX - rts - -EnableBaloon: - move.w #1,baloonsEnabled - rts - -TriggerBaloon: - cmp.w #1,baloonsEnabled - bne .skip - ;; d0.w - y tile index - lsl.w #4,d0 - move.l #0,baloonLastSaveOffscreen - move.l #0,baloonLastSaveOnscreen - move.w d0,baloonY - move.l baloonStartX,baloonX - move.w #2,baloonsEnabled -.skip: - rts - -RestoreBaloonBackground: - bsr RestorePreviousBaloonBackground - move.l baloonSaveOffscreen,a0 - move.l baloonSaveOnscreen,baloonSaveOffscreen - move.l a0,baloonSaveOnscreen - - move.l baloonLastSaveOffscreen,a0 - move.l baloonLastSaveOnscreen,baloonLastSaveOffscreen - move.l a0,baloonLastSaveOnscreen - bsr RestorePreviousBaloonBackground - rts - - - -RestorePreviousBaloonBackground: - cmp.l #0,baloonLastSaveOffscreen - beq .skip - - move.l baloonX,d2 - add.l #16<