mirror of
https://frontier.innolan.net/github/AmigaExamples.git
synced 2025-11-23 23:55:15 +00:00
wip baloon bob
This commit is contained in:
3
028.bs/.gitignore
vendored
3
028.bs/.gitignore
vendored
@ -1,4 +1,3 @@
|
|||||||
assets/P61.placeholder
|
assets/P61.*
|
||||||
assets/P61.song1
|
|
||||||
bin
|
bin
|
||||||
save
|
save
|
||||||
@ -12,7 +12,7 @@ BASE_ADDRESS=4000
|
|||||||
# note: this must be high enough not to conflict with MFMbufE
|
# note: this must be high enough not to conflict with MFMbufE
|
||||||
|
|
||||||
BOOTBLOCK_ASM=alpine_bootblock.s
|
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
|
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
|
||||||
|
|
||||||
IMAGES=foreground.png \
|
IMAGES=foreground.png \
|
||||||
background.png \
|
background.png \
|
||||||
@ -71,11 +71,12 @@ IMAGES=foreground.png \
|
|||||||
font8x8.png\
|
font8x8.png\
|
||||||
font8x85.png\
|
font8x85.png\
|
||||||
splash.png\
|
splash.png\
|
||||||
splashSave.png
|
splashSave.png\
|
||||||
|
baloonMask.png
|
||||||
|
|
||||||
IMAGEDATA=$(addprefix out/, $(IMAGES:.png=.bin))
|
IMAGEDATA=$(addprefix out/, $(IMAGES:.png=.bin))
|
||||||
|
|
||||||
VASM_EXTRA_ARGS=-DTIMING_TEST=0 -DSFX=1
|
VASM_EXTRA_ARGS=-DTIMING_TEST=0 -DSFX=1 -DBALOON_BOB=1
|
||||||
|
|
||||||
LINKER_OPTIONS=-T link.script.x
|
LINKER_OPTIONS=-T link.script.x
|
||||||
|
|
||||||
@ -196,6 +197,10 @@ 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
|
../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
|
$(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/splash.bin: assets/splash.png
|
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
|
$(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
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@ P61mode =2 ;Try other modes ONLY IF there are no Fxx commands >= 20.
|
|||||||
;; --- options common to all P61modes ---
|
;; --- options common to all P61modes ---
|
||||||
|
|
||||||
|
|
||||||
usecode=$800940D;$9409;$8000 ;CHANGE! to the USE hexcode from P61con for a big
|
usecode=-1;$8000 ;CHANGE! to the USE hexcode from P61con for a big
|
||||||
;CPU-time gain! (See module usecodes at end of source)
|
;CPU-time gain! (See module usecodes at end of source)
|
||||||
;Multiple songs, single playroutine? Just "OR" the
|
;Multiple songs, single playroutine? Just "OR" the
|
||||||
;usecodes together!
|
;usecodes together!
|
||||||
|
|||||||
BIN
028.bs/assets/baloonMask.png
Normal file
BIN
028.bs/assets/baloonMask.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
@ -4,8 +4,8 @@
|
|||||||
xdef RenderNextBackgroundFrame
|
xdef RenderNextBackgroundFrame
|
||||||
xdef backgroundScrollX
|
xdef backgroundScrollX
|
||||||
xdef backgroundOnscreen
|
xdef backgroundOnscreen
|
||||||
xdef backgroundOffscreen
|
xdef backgroundOffscreen
|
||||||
|
xdef backgroundTilemap
|
||||||
|
|
||||||
InitialiseBackground:
|
InitialiseBackground:
|
||||||
move.l #0,backgroundScrollX
|
move.l #0,backgroundScrollX
|
||||||
@ -32,10 +32,21 @@ RenderBackgroundTile:
|
|||||||
add.l d0,a0
|
add.l d0,a0
|
||||||
lea backgroundTilemap,a1
|
lea backgroundTilemap,a1
|
||||||
add.l #BITPLANE_WIDTH_BYTES-2,a0 ; dest
|
add.l #BITPLANE_WIDTH_BYTES-2,a0 ; dest
|
||||||
add.w (a2),a1 ; source tile
|
move.w (a2),d0 ; source tile
|
||||||
|
add.w d0,a1
|
||||||
move.l backgroundScrollX,d2
|
move.l backgroundScrollX,d2
|
||||||
lsr.b #BACKGROUND_SCROLL_SHIFT_CONVERT,d2 ; convert to pixels
|
lsr.b #BACKGROUND_SCROLL_SHIFT_CONVERT,d2 ; convert to pixels
|
||||||
andi.w #$f,d2 ; find the shift component
|
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
|
jsr BlitBackgroundTile
|
||||||
cmp.l #backgroundBitplanes1,backgroundOffscreen
|
cmp.l #backgroundBitplanes1,backgroundOffscreen
|
||||||
bne .offsetSub
|
bne .offsetSub
|
||||||
@ -57,10 +68,15 @@ RenderNextBackgroundFrame:
|
|||||||
bne .skip
|
bne .skip
|
||||||
move.l #0,backgroundScrollX
|
move.l #0,backgroundScrollX
|
||||||
.skip:
|
.skip:
|
||||||
bsr RenderBackgroundTile
|
|
||||||
|
if BALOON_BOB=1
|
||||||
|
jsr RenderBaloon
|
||||||
|
endif
|
||||||
|
bsr RenderBackgroundTile
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
backgroundScrollX:
|
backgroundScrollX:
|
||||||
dc.l 0
|
dc.l 0
|
||||||
backgroundTilemap:
|
backgroundTilemap:
|
||||||
@ -72,6 +88,7 @@ backgroundOnscreen:
|
|||||||
dc.l backgroundBitplanes1
|
dc.l backgroundBitplanes1
|
||||||
backgroundOffscreen:
|
backgroundOffscreen:
|
||||||
dc.l backgroundBitplanes2
|
dc.l backgroundBitplanes2
|
||||||
|
|
||||||
|
|
||||||
section .bss
|
section .bss
|
||||||
backgroundBitplanes1:
|
backgroundBitplanes1:
|
||||||
@ -81,5 +98,4 @@ backgroundBitplanes2:
|
|||||||
ds.b IMAGESIZE
|
ds.b IMAGESIZE
|
||||||
ds.b LINESIZE*10
|
ds.b LINESIZE*10
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -5,7 +5,7 @@
|
|||||||
</tileset>
|
</tileset>
|
||||||
<layer name="background" width="200" height="16">
|
<layer name="background" width="200" height="16">
|
||||||
<data encoding="base64" compression="zlib">
|
<data encoding="base64" compression="zlib">
|
||||||
eJztmslqxDAMhlPoHFrodIEuh+7tYbq8//NVhQoGN14k/ZacMIfvEEKwtctydtM07ZS8EK+G76M5IU4N358RW+KcuBhAHolsR8C1vPWw+YP9j597raeV74P4BKx/XHmfs6XVLpfElWGf18QNcUvcAe2ByDtS2Sy6lehhzta1te6TZ44H9r/9+NiA6Wnn3kTv+4F4JJ6IZ8F3tdzNds/VAI98LdGtVg9aO7LvvhHvU//4sMpXoqctLftOc5KX30nI1QCPvNDTJ6xreceHxpdaic7xa9wrwnctNpViPeelsO9+Ed9TfHxE23JJfnfgP7k6WDt35oiuH5p4R8xD0HkmEo0s3vK39JM1H46YYbKeouLDOvvQErWullKPopEFJX9rnCH6SdQMM4V9v6SnNfRXvZDmWml9W/LdTmucjdxPsu/PvYvur5YAIteWeodeeRGFtne3MMp9akR8eM4zDiwTa05CzQfZd0frr7Txv4bY87gbiagJnqD6uVH7q5HuB7zv8lCyS/dt6Wm8dBT1/1VU/cidZT3Oc63nYu9YRcku3belp2ldy1rfEbaQ5IFR64cWyeyo9VyMjlXr/U2rfUf+b2NOJ6yXUt7SrJP2kqU8kNan6PqxBrzPPNF3N8j/1eeInOel9Snnu+jY+OUH2JqqXQ==
|
eJztmsluAjEMhqdSObTqLnU5dN9EC+//fDUqlkbpZCa2/9gZyuETIAGO4zXOLLuuWyp5IV4Nv4/miDg2/P6UOCPOiYsG9JHodgCU5b0Piy3sf/y5ljytfl/Et0Huevt6OPG9nC2tdrkkrgTfT9d5TdwQt8Qd0B6IvCPVzbK3kn0YsvWUrPvkM8cD+18/PhZgato55Rn8f5Z1nwDkPxCPxJNQt6nczXbP1QCPfC3ZW+0+aO3IvvtGvHe4+Pjsvf/o/adVvzFq2tKy7jQnefmdhFwN8MhnNX3CKqtWfOTqh8aXSvGqTQjmslaE7+ZsiqirKdZzXgr77qr77dGj4yPalnPyuz1/ydXBqXNnjuj6oYl3zTxkDZDbKhpdvPUv6SenfDhihsn7FBUf1tlHCUN13EMukrG+U6MLSv/SOEP0k9YZZg72/bF92oX+qhbSXCutb3O+2ymNs5b7yY3v585C0f3VHEDk2rHeoVZeRKHt3S20cp8aER+WGdWe/4E1J6Hmg+y7rfVX2vjfhdjzuBvhmlBjxtoCqH6u1f6qpfsB77s8lO7SdVt6Gq89inr+Kqp+5M6yHue50nOxd6yidJeu29LTlMqy1neELSR5oNX6oUUyOyo9F6Nj1fo8a6l9W35uY2hPeF/G8pZGTjpfGMsDaX2Krh+7gPeZJ/ruBvm8+hCR87y0PuV8Fx0bG34AHDOqDg==
|
||||||
</data>
|
</data>
|
||||||
</layer>
|
</layer>
|
||||||
</map>
|
</map>
|
||||||
|
|||||||
254
028.bs/baloon.s
Normal file
254
028.bs/baloon.s
Normal file
@ -0,0 +1,254 @@
|
|||||||
|
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<<BACKGROUND_SCROLL_SHIFT_CONVERT,d2
|
||||||
|
cmp.l #0<<BACKGROUND_SCROLL_SHIFT_CONVERT,d2
|
||||||
|
bgt .dontReset
|
||||||
|
move.l #0,baloonLastSaveOffscreen
|
||||||
|
move.l #0,baloonLastSaveOnscreen
|
||||||
|
move.w #1,baloonsEnabled
|
||||||
|
;; move.l baloonStartX,baloonX
|
||||||
|
rts
|
||||||
|
.dontReset:
|
||||||
|
if 0
|
||||||
|
move.l baloonLastSaveOffscreen,d0
|
||||||
|
move.l backgroundOffscreen,d1
|
||||||
|
|
||||||
|
sub.l d1,d0
|
||||||
|
|
||||||
|
divu.w #BITPLANE_WIDTH_BYTES,d0
|
||||||
|
swap d0
|
||||||
|
|
||||||
|
cmp.w #BITPLANE_WIDTH_BYTES,d0
|
||||||
|
bge .1word
|
||||||
|
cmp.w #BITPLANE_WIDTH_BYTES-2,d0
|
||||||
|
bge .2word
|
||||||
|
bra .normal
|
||||||
|
|
||||||
|
.1word:
|
||||||
|
bsr RestorePreviousBaloonBackground1Word
|
||||||
|
rts
|
||||||
|
.2word:
|
||||||
|
bsr RestorePreviousBaloonBackground2Word
|
||||||
|
rts
|
||||||
|
.normal:
|
||||||
|
endif
|
||||||
|
WaitBlitter
|
||||||
|
move.w #0,BLTCON1(a6) ;
|
||||||
|
move.w #BC0F_SRCA|BC0F_DEST|$f0,BLTCON0(a6)
|
||||||
|
|
||||||
|
move.w #0,BLTAMOD(a6)
|
||||||
|
move.w #BITPLANE_WIDTH_BYTES-BALOON_BLIT_WIDTH_BYTES,BLTDMOD(a6) ;
|
||||||
|
|
||||||
|
move.l baloonSaveOffscreen,BLTAPTH(a6) ; source
|
||||||
|
move.l baloonLastSaveOffscreen,BLTDPTH(a6) ; dest
|
||||||
|
move.w #$ffff,BLTAFWM(a6)
|
||||||
|
move.w #$ffff,BLTALWM(a6)
|
||||||
|
move.w #(32*SCREEN_BIT_DEPTH)<<6|(BALOON_BLIT_WIDTH_WORDS),BLTSIZE(a6) ;rectangle size, starts blit
|
||||||
|
move.l #0,baloonLastSaveOffscreen
|
||||||
|
.skip:
|
||||||
|
rts
|
||||||
|
|
||||||
|
RestorePreviousBaloonBackground1Word:
|
||||||
|
cmp.l #0,baloonLastSaveOffscreen
|
||||||
|
beq .skip
|
||||||
|
WaitBlitter
|
||||||
|
move.w #0,BLTCON1(a6) ;
|
||||||
|
move.w #BC0F_SRCA|BC0F_DEST|$f0,BLTCON0(a6)
|
||||||
|
|
||||||
|
move.w #4,BLTAMOD(a6)
|
||||||
|
move.w #BITPLANE_WIDTH_BYTES-BALOON_BLIT_WIDTH_BYTES+4,BLTDMOD(a6) ;
|
||||||
|
|
||||||
|
move.l baloonSaveOffscreen,BLTAPTH(a6) ; source
|
||||||
|
move.l baloonLastSaveOffscreen,BLTDPTH(a6) ; dest
|
||||||
|
move.w #$ffff,BLTAFWM(a6)
|
||||||
|
move.w #$ffff,BLTALWM(a6)
|
||||||
|
move.w #(32*SCREEN_BIT_DEPTH)<<6|(1),BLTSIZE(a6) ;rectangle size, starts blit
|
||||||
|
move.l #0,baloonLastSaveOffscreen
|
||||||
|
.skip:
|
||||||
|
rts
|
||||||
|
|
||||||
|
RestorePreviousBaloonBackground2Word:
|
||||||
|
cmp.l #0,baloonLastSaveOffscreen
|
||||||
|
beq .skip
|
||||||
|
WaitBlitter
|
||||||
|
move.w #0,BLTCON1(a6) ;
|
||||||
|
move.w #BC0F_SRCA|BC0F_DEST|$f0,BLTCON0(a6)
|
||||||
|
|
||||||
|
move.w #2,BLTAMOD(a6)
|
||||||
|
move.w #BITPLANE_WIDTH_BYTES-BALOON_BLIT_WIDTH_BYTES+2,BLTDMOD(a6) ;
|
||||||
|
|
||||||
|
move.l baloonSaveOffscreen,BLTAPTH(a6) ; source
|
||||||
|
move.l baloonLastSaveOffscreen,BLTDPTH(a6) ; dest
|
||||||
|
move.w #$ffff,BLTAFWM(a6)
|
||||||
|
move.w #$ffff,BLTALWM(a6)
|
||||||
|
move.w #(32*SCREEN_BIT_DEPTH)<<6|(BALOON_BLIT_WIDTH_WORDS-1),BLTSIZE(a6) ;rectangle size, starts blit
|
||||||
|
move.l #0,baloonLastSaveOffscreen
|
||||||
|
.skip:
|
||||||
|
rts
|
||||||
|
|
||||||
|
SaveBaloonBackground:
|
||||||
|
;; a0.l source bitplane data
|
||||||
|
WaitBlitter
|
||||||
|
move.w #0,BLTCON1(a6) ;
|
||||||
|
move.w #BC0F_SRCA|BC0F_DEST|$f0,BLTCON0(a6)
|
||||||
|
|
||||||
|
move.w #BITPLANE_WIDTH_BYTES-BALOON_BLIT_WIDTH_BYTES,BLTAMOD(a6)
|
||||||
|
move.w #0,BLTDMOD(a6)
|
||||||
|
|
||||||
|
move.l a0,BLTAPTH(a6) ; source
|
||||||
|
move.l baloonSaveOffscreen,BLTDPTH(a6) ; dest
|
||||||
|
move.w #$ffff,BLTAFWM(a6)
|
||||||
|
move.w #$ffff,BLTALWM(a6)
|
||||||
|
move.w #(32*SCREEN_BIT_DEPTH)<<6|(BALOON_BLIT_WIDTH_WORDS),BLTSIZE(a6) ;rectangle size, starts blit
|
||||||
|
move.l a0,baloonLastSaveOffscreen
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
RenderBaloon:
|
||||||
|
|
||||||
|
cmp.w #2,baloonsEnabled
|
||||||
|
beq .renderBaloon
|
||||||
|
rts
|
||||||
|
.renderBaloon:
|
||||||
|
|
||||||
|
bsr RestorePreviousBaloonBackground
|
||||||
|
|
||||||
|
move.l baloonX,d2
|
||||||
|
add.l backgroundScrollX,d2
|
||||||
|
move.l baloonDeltaX,d1
|
||||||
|
add.l d1,baloonX
|
||||||
|
|
||||||
|
move.w baloonY,d1
|
||||||
|
mulu.w #BITPLANE_WIDTH_BYTES*SCREEN_BIT_DEPTH,d1
|
||||||
|
|
||||||
|
move.l d2,d0
|
||||||
|
lsr.w #BACKGROUND_SCROLL_SHIFT_CONVERT,d0 ; convert to pixels
|
||||||
|
lsr.w #3,d0 ; bytes to scroll
|
||||||
|
|
||||||
|
move.l backgroundOffscreen,a0
|
||||||
|
add.l d0,a0
|
||||||
|
add.l d1,a0
|
||||||
|
|
||||||
|
lea backgroundTilemap,a1
|
||||||
|
add.w #$c00,a1 ; source tile
|
||||||
|
|
||||||
|
bsr SaveBaloonBackground
|
||||||
|
|
||||||
|
WaitBlitter
|
||||||
|
move.w #0,BLTCON1(a6) ;
|
||||||
|
|
||||||
|
move.l d2,d0
|
||||||
|
lsr.w #BACKGROUND_SCROLL_SHIFT_CONVERT,d0 ; convert to pixels
|
||||||
|
lsl.w #8,d0 ; BLIT_SOURCE_SHIFT<<BLIT_ASHIFTSHIFT
|
||||||
|
lsl.w #4,d0 ; BLIT_SOURCE_SHIFT<<BLIT_ASHIFTSHIFT
|
||||||
|
|
||||||
|
move.w d0,BLTCON1(A6)
|
||||||
|
|
||||||
|
ori.w #BC0F_SRCA|BC0F_SRCB|BC0F_SRCC|BC0F_DEST|$ca,d0
|
||||||
|
;; A(mask) B(bob) C(bg) D(dest)
|
||||||
|
|
||||||
|
move.w d0,BLTCON0(a6)
|
||||||
|
|
||||||
|
move.w #0,BLTAMOD(a6) ; mask
|
||||||
|
move.w #BACKGROUND_TILEMAP_WIDTH_BYTES-BALOON_BLIT_WIDTH_BYTES,BLTBMOD(a6) ; bob
|
||||||
|
move.w #BITPLANE_WIDTH_BYTES-BALOON_BLIT_WIDTH_BYTES,BLTCMOD(a6) ; background
|
||||||
|
move.w #BITPLANE_WIDTH_BYTES-BALOON_BLIT_WIDTH_BYTES,BLTDMOD(a6) ; dest
|
||||||
|
|
||||||
|
move.l #baloonMask,BLTAPTH(a6) ; mask
|
||||||
|
move.l a1,BLTBPTH(a6) ; bob
|
||||||
|
move.l a0,BLTCPTH(a6) ; bg
|
||||||
|
move.l a0,BLTDPTH(a6) ; dest
|
||||||
|
|
||||||
|
move.w #$ffff,BLTAFWM(a6)
|
||||||
|
move.w #$0000,BLTALWM(a6)
|
||||||
|
move.w #(32*SCREEN_BIT_DEPTH)<<6|(BALOON_BLIT_WIDTH_WORDS),BLTSIZE(a6) ;rectangle size, starts blit
|
||||||
|
|
||||||
|
WaitBlitter
|
||||||
|
.dontRenderBaloon:
|
||||||
|
rts
|
||||||
|
|
||||||
|
baloonSaveOffscreen:
|
||||||
|
dc.l baloonSave1
|
||||||
|
baloonSaveOnscreen:
|
||||||
|
dc.l baloonSave2
|
||||||
|
baloonX:
|
||||||
|
dc.l (320-16)<<BACKGROUND_SCROLL_SHIFT_CONVERT
|
||||||
|
baloonY:
|
||||||
|
dc.w 20
|
||||||
|
baloonDeltaX:
|
||||||
|
dc.l -24
|
||||||
|
baloonStartX:
|
||||||
|
dc.l (320-32)<<BACKGROUND_SCROLL_SHIFT_CONVERT
|
||||||
|
baloonEndX:
|
||||||
|
dc.l 0
|
||||||
|
|
||||||
|
baloonsEnabled:
|
||||||
|
dc.w 0
|
||||||
|
baloonMask:
|
||||||
|
incbin "out/baloonMask-mask.bin"
|
||||||
|
|
||||||
|
baloonSave1:
|
||||||
|
ds.b BALOON_BLIT_WIDTH_BYTES*32*3
|
||||||
|
baloonSave2:
|
||||||
|
ds.b BALOON_BLIT_WIDTH_BYTES*32*3
|
||||||
|
baloonLastSaveOffscreen:
|
||||||
|
dc.l 0
|
||||||
|
baloonLastSaveOnscreen:
|
||||||
|
dc.l 0
|
||||||
|
endif
|
||||||
@ -169,7 +169,10 @@ BlueFill:
|
|||||||
jsr BlitFillColor
|
jsr BlitFillColor
|
||||||
jsr WaitVerticalBlank
|
jsr WaitVerticalBlank
|
||||||
jsr SwitchBuffers
|
jsr SwitchBuffers
|
||||||
jsr InitialiseBackground
|
;; jsr InitialiseBackground
|
||||||
|
if BALOON_BOB=1
|
||||||
|
jsr DisableBaloon
|
||||||
|
endif
|
||||||
movem.l (sp)+,d0-a6
|
movem.l (sp)+,d0-a6
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|||||||
@ -49,8 +49,9 @@ Entry:
|
|||||||
jsr ShowSplash
|
jsr ShowSplash
|
||||||
MainMenu:
|
MainMenu:
|
||||||
jsr ShowMenu
|
jsr ShowMenu
|
||||||
|
|
||||||
jsr BlueFill
|
jsr BlueFill
|
||||||
|
jsr InitialiseBackground
|
||||||
|
|
||||||
;; d0 - fg bitplane pointer offset
|
;; d0 - fg bitplane pointer offset
|
||||||
;; d1 - bg bitplane pointer offset
|
;; d1 - bg bitplane pointer offset
|
||||||
@ -162,12 +163,15 @@ FadeInLoop:
|
|||||||
move.l #0,verticalBlankCount
|
move.l #0,verticalBlankCount
|
||||||
move.l #1,frameCount
|
move.l #1,frameCount
|
||||||
move.l #FOREGROUND_SCROLL_PIXELS,foregroundScrollPixels
|
move.l #FOREGROUND_SCROLL_PIXELS,foregroundScrollPixels
|
||||||
|
if BALOON_BOB=1
|
||||||
|
jsr EnableBaloon
|
||||||
|
endif
|
||||||
bra GameLoop
|
bra GameLoop
|
||||||
.c1:
|
.c1:
|
||||||
bra FadeInLoop
|
bra FadeInLoop
|
||||||
|
|
||||||
|
|
||||||
GameLoop:
|
GameLoop:
|
||||||
move.l verticalBlankCount,d0
|
move.l verticalBlankCount,d0
|
||||||
move.l frameCount,d1
|
move.l frameCount,d1
|
||||||
cmp.l d1,d0
|
cmp.l d1,d0
|
||||||
@ -315,6 +319,9 @@ InstallNextLevel:
|
|||||||
|
|
||||||
LevelComplete:
|
LevelComplete:
|
||||||
PlaySound Yay
|
PlaySound Yay
|
||||||
|
if BALOON_BOB=1
|
||||||
|
jsr DisableBaloon
|
||||||
|
endif
|
||||||
jsr ResetItems
|
jsr ResetItems
|
||||||
jsr HidePlayer
|
jsr HidePlayer
|
||||||
jsr SelectNextPlayerSprite
|
jsr SelectNextPlayerSprite
|
||||||
@ -498,7 +505,10 @@ BigBang:
|
|||||||
.scrollFinished:
|
.scrollFinished:
|
||||||
|
|
||||||
PlaySound Falling
|
PlaySound Falling
|
||||||
jsr WaitVerticalBlank
|
jsr WaitVerticalBlank
|
||||||
|
if BALOON_BOB=1
|
||||||
|
jsr DisableBaloon
|
||||||
|
endif
|
||||||
jsr PlayNextSound
|
jsr PlayNextSound
|
||||||
jsr ResetItems
|
jsr ResetItems
|
||||||
move.w #0,moving
|
move.w #0,moving
|
||||||
|
|||||||
@ -19,14 +19,14 @@ SwitchBuffers:
|
|||||||
move.l a0,a1
|
move.l a0,a1
|
||||||
|
|
||||||
lea copperListBpl1Ptr,a0
|
lea copperListBpl1Ptr,a0
|
||||||
bsr.s PokeBitplanePointers
|
bsr PokeBitplanePointers
|
||||||
|
|
||||||
lea copperListBpl1Ptr_MP,a0
|
lea copperListBpl1Ptr_MP,a0
|
||||||
bsr.s PokeBitplanePointers
|
bsr PokeBitplanePointers
|
||||||
|
|
||||||
add.l #BITPLANE_WIDTH_BYTES*SCREEN_BIT_DEPTH*(96-1),d0
|
add.l #BITPLANE_WIDTH_BYTES*SCREEN_BIT_DEPTH*(96-1),d0
|
||||||
lea copperListBpl1Ptr2_MP,a0
|
lea copperListBpl1Ptr2_MP,a0
|
||||||
bsr.s PokeBitplanePointers
|
bsr PokeBitplanePointers
|
||||||
|
|
||||||
SwitchBackgroundBuffers:
|
SwitchBackgroundBuffers:
|
||||||
|
|
||||||
@ -34,6 +34,16 @@ SwitchBackgroundBuffers:
|
|||||||
lsr.w #BACKGROUND_SCROLL_SHIFT_CONVERT,d0 ; convert to pixels
|
lsr.w #BACKGROUND_SCROLL_SHIFT_CONVERT,d0 ; convert to pixels
|
||||||
lsr.w #3,d0 ; bytes to scroll
|
lsr.w #3,d0 ; bytes to scroll
|
||||||
|
|
||||||
|
if BALOON_BOB=1
|
||||||
|
move.l baloonSaveOffscreen,a0
|
||||||
|
move.l baloonSaveOnscreen,baloonSaveOffscreen
|
||||||
|
move.l a0,baloonSaveOnscreen
|
||||||
|
|
||||||
|
move.l baloonLastSaveOffscreen,a0
|
||||||
|
move.l baloonLastSaveOnscreen,baloonLastSaveOffscreen
|
||||||
|
move.l a0,baloonLastSaveOnscreen
|
||||||
|
endif
|
||||||
|
|
||||||
move.l backgroundOffscreen,a0
|
move.l backgroundOffscreen,a0
|
||||||
move.l backgroundOnscreen,backgroundOffscreen
|
move.l backgroundOnscreen,backgroundOffscreen
|
||||||
move.l a0,backgroundOnscreen
|
move.l a0,backgroundOnscreen
|
||||||
|
|||||||
24
028.bs/levels/level1.1_foreground.tmx
Normal file
24
028.bs/levels/level1.1_foreground.tmx
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<map version="1.0" orientation="orthogonal" renderorder="left-down" width="25" height="8" tilewidth="16" tileheight="16" nextobjectid="1">
|
||||||
|
<tileset firstgid="1" name="items" tilewidth="16" tileheight="16" tilecount="320" columns="20">
|
||||||
|
<image source="../assets/items.png" trans="000000" width="320" height="256"/>
|
||||||
|
</tileset>
|
||||||
|
<tileset firstgid="321" name="foreground" tilewidth="16" tileheight="16" tilecount="320" columns="20">
|
||||||
|
<image source="../assets/assets.png" width="320" height="256"/>
|
||||||
|
</tileset>
|
||||||
|
<layer name="foreground" width="25" height="8">
|
||||||
|
<data encoding="base64" compression="zlib">
|
||||||
|
eJxzZ2RgqGKCYEckNgi7o/HJlasD8p2AOAwLTa5cJZqdWUCx30CcC2SbM6Gqz8JhBiE5dDuQ3SOLZg9IjhMqhkwXQ/XtJMEfYWj2gMzIhco9h4rFMyFomD+UgWxDIOaHqofpw+cPcuIDZE8kE2n+oEV8RONJg9SSAwC2JUt4
|
||||||
|
</data>
|
||||||
|
</layer>
|
||||||
|
<layer name="pathway" width="25" height="8">
|
||||||
|
<data encoding="base64" compression="zlib">
|
||||||
|
eJxjYBgFo2AU4AIAAyAAAQ==
|
||||||
|
</data>
|
||||||
|
</layer>
|
||||||
|
<layer name="items" width="25" height="8">
|
||||||
|
<data encoding="base64" compression="zlib">
|
||||||
|
eJxjYBgYIIVHjpEM8xihmBuHPDMSW5oMN8HsQKYJqWUhQh0x9sGAABZ5RjQ5GJ+XBHPRAQcR9rARMIMcwE8DMykFAFiPAMk=
|
||||||
|
</data>
|
||||||
|
</layer>
|
||||||
|
</map>
|
||||||
@ -23,10 +23,6 @@ module
|
|||||||
section .noload
|
section .noload
|
||||||
cnop 0,512
|
cnop 0,512
|
||||||
diskmodule:
|
diskmodule:
|
||||||
if SFX=1
|
incbin "assets/P61.jmd-songA"
|
||||||
incbin "assets/P61.placeholder"
|
|
||||||
else
|
|
||||||
incbin "assets/P61.song1"
|
|
||||||
endif
|
|
||||||
cnop 0,512
|
cnop 0,512
|
||||||
enddiskmodule:
|
enddiskmodule:
|
||||||
@ -30,7 +30,6 @@ PlayNextSound:
|
|||||||
xdef PlayChachingSound
|
xdef PlayChachingSound
|
||||||
xdef PlayWhooshSound
|
xdef PlayWhooshSound
|
||||||
xdef PlayYaySound
|
xdef PlayYaySound
|
||||||
xdef PlayZapSound
|
|
||||||
|
|
||||||
PlayJumpSound:
|
PlayJumpSound:
|
||||||
lea jump(pc),a1
|
lea jump(pc),a1
|
||||||
@ -82,16 +81,6 @@ PlayYaySound:
|
|||||||
move.w #(DMAF_AUD3|DMAF_SETCLR),DMACON(a6)
|
move.w #(DMAF_AUD3|DMAF_SETCLR),DMACON(a6)
|
||||||
rts
|
rts
|
||||||
|
|
||||||
PlayZapSound:
|
|
||||||
KillSound
|
|
||||||
lea zap,a1
|
|
||||||
move.l a1,AUD3LCH(a6)
|
|
||||||
move.w #124,AUD3PER(a6)
|
|
||||||
move.w #64,AUD3VOL(a6)
|
|
||||||
move.w #(endZap-zap)/2,AUD3LEN(a6) ;Set length in words
|
|
||||||
move.w #(DMAF_AUD3|DMAF_SETCLR),DMACON(a6)
|
|
||||||
rts
|
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
jump:
|
jump:
|
||||||
incbin "out/jump.raw"
|
incbin "out/jump.raw"
|
||||||
@ -112,11 +101,6 @@ endWhoosh:
|
|||||||
yay:
|
yay:
|
||||||
incbin "out/yay.raw"
|
incbin "out/yay.raw"
|
||||||
endYay:
|
endYay:
|
||||||
zap:
|
|
||||||
;; incbin "out/zap.raw"
|
|
||||||
incbin "out/yay.raw"
|
|
||||||
endZap:
|
|
||||||
align 4
|
|
||||||
|
|
||||||
align 2
|
align 2
|
||||||
emptySound:
|
emptySound:
|
||||||
|
|||||||
Reference in New Issue
Block a user