diff --git a/028.bs/Makefile b/028.bs/Makefile index 9bcf830..47fa3fb 100644 --- a/028.bs/Makefile +++ b/028.bs/Makefile @@ -47,6 +47,14 @@ IMAGES=foreground.png \ sprite_tank-5.png \ sprite_tank-6.png \ sprite_tank-7.png \ + sprite_car-0.png \ + sprite_car-1.png \ + sprite_car-2.png \ + sprite_car-3.png \ + sprite_car-4.png \ + sprite_car-5.png \ + sprite_car-6.png \ + sprite_car-7.png \ sprite_coin-0.png \ sprite_coin-1.png \ sprite_coin-2.png \ @@ -60,6 +68,11 @@ IMAGES=foreground.png \ sprite_fallingPig-2.png \ sprite_fallingPig-3.png \ sprite_fallingPig-4.png \ + sprite_fallingCar-0.png \ + sprite_fallingCar-1.png \ + sprite_fallingCar-2.png \ + sprite_fallingCar-3.png \ + sprite_fallingCar-4.png \ sprite_fallingRobot-0.png \ sprite_fallingRobot-1.png \ sprite_fallingRobot-2.png \ @@ -130,6 +143,9 @@ out/mpanel.bin: assets/mpanel.png out/sprite_pig-%.bin: out/sprite_pig-%.png $(IMAGECON) --input $< $(IMAGECON_ARGS) --colors 4 --output-bitplanes --output-palette --full-color-palette-file --output-palette-asm --output-palette --output-png --output-copperlist --output out/sprite_pig-$* --palette-offset 16 --use-palette=assets/pig.pal +out/sprite_car-%.bin: out/sprite_car-%.png + $(IMAGECON) --input $< $(IMAGECON_ARGS) --colors 4 --output-bitplanes --output-palette --full-color-palette-file --output-palette-asm --output-palette --output-png --output-copperlist --output out/sprite_car-$* --palette-offset 16 --use-palette=assets/car.pal + out/sprite_robot-%.bin: out/sprite_robot-%.png $(IMAGECON) --input $< $(IMAGECON_ARGS) --colors 4 --output-bitplanes --output-palette --full-color-palette-file --output-palette-asm --output-palette --output-png --output-copperlist --output out/sprite_robot-$* --palette-offset 16 --use-palette=assets/robot.pal @@ -140,6 +156,9 @@ out/sprite_tank-%.bin: out/sprite_tank-%.png out/sprite_fallingPig-%.bin: out/sprite_fallingPig-%.png $(IMAGECON) --input $< $(IMAGECON_ARGS) --colors 4 --output-bitplanes --output-palette --full-color-palette-file --output-palette-asm --output-palette --output-png --output-copperlist --output out/sprite_fallingPig-$* --palette-offset 16 --use-palette=assets/pig.pal +out/sprite_fallingCar-%.bin: out/sprite_fallingCar-%.png + $(IMAGECON) --input $< $(IMAGECON_ARGS) --colors 4 --output-bitplanes --output-palette --full-color-palette-file --output-palette-asm --output-palette --output-png --output-copperlist --output out/sprite_fallingCar-$* --palette-offset 16 --use-palette=assets/car.pal + out/sprite_fallingRobot-%.bin: out/sprite_fallingRobot-%.png $(IMAGECON) --input $< $(IMAGECON_ARGS) --colors 4 --output-bitplanes --output-palette --full-color-palette-file --output-palette-asm --output-palette --output-png --output-copperlist --output out/sprite_fallingRobot-$* --palette-offset 16 --use-palette=assets/robot.pal @@ -166,6 +185,10 @@ out/sprite_arrow%.bin: out/sprite_arrow%.png out/sprite_pig%.png: assets/assets.png ../tools/croppa/out/croppa --input=assets/assets.png --output=out/sprite_pig --width=16 --height=16 --rows=1 --cols=8 --dx=16 --dy=16 --x=192 --y=112 +.SECONDARY: +out/sprite_car%.png: assets/assets.png + ../tools/croppa/out/croppa --input=assets/assets.png --output=out/sprite_car --width=16 --height=16 --rows=1 --cols=8 --dx=16 --dy=16 --x=192 --y=0 + out/mpanelOrig.png: assets/mpanel.png ../tools/croppa/out/croppa --input=assets/mpanel.png --output=out/mpanelOrig.png --width=320 --height=16 --rows=1 --cols=1 --dx=0 --dy=0 --x=0 --y=8 @@ -181,6 +204,10 @@ out/sprite_tank%.png: assets/assets.png out/sprite_fallingPig%.png: assets/assets.png ../tools/croppa/out/croppa --input=assets/assets.png --output=out/sprite_fallingPig --width=16 --height=16 --rows=1 --cols=5 --dx=16 --dy=16 --x=192 --y=128 +.SECONDARY: +out/sprite_fallingCar%.png: assets/assets.png + ../tools/croppa/out/croppa --input=assets/assets.png --output=out/sprite_fallingCar --width=16 --height=16 --rows=1 --cols=5 --dx=16 --dy=16 --x=192 --y=32 + .SECONDARY: out/sprite_fallingRobot%.png: assets/assets.png ../tools/croppa/out/croppa --input=assets/assets.png --output=out/sprite_fallingRobot --width=16 --height=16 --rows=1 --cols=5 --dx=16 --dy=16 --x=192 --y=192 diff --git a/028.bs/assets/assets.png b/028.bs/assets/assets.png index 69d7df3..25f9e94 100644 Binary files a/028.bs/assets/assets.png and b/028.bs/assets/assets.png differ diff --git a/028.bs/assets/car.pal b/028.bs/assets/car.pal new file mode 100644 index 0000000..722ac21 --- /dev/null +++ b/028.bs/assets/car.pal @@ -0,0 +1,4 @@ +000 000 000 255 +252 011 042 255 +041 034 055 255 +152 148 165 255 diff --git a/028.bs/game1.s b/028.bs/game1.s index f4b78b3..4c445d0 100644 --- a/028.bs/game1.s +++ b/028.bs/game1.s @@ -899,12 +899,12 @@ BlitCountdown: Level 96,"PRESS FIRE TO ACTIVATE THE CLOCK",200,2*2,12,10,"EYES WILL UNHIDE THE BOARD",A,21,0,1,pig Level 97,"PRESS FIRE TO ACTIVATE THE EYE",100,2*2,12,10,"LEVEL 7",A,21,0,1,pig - Level 1,"WELCOME TO BLOCKY SKIESL!",75,2*2,12,10,"PHEW!, LEVEL 1 COMPLETE!",A,99,0,1,pig + Level 1,"WELCOME TO BLOCKY SKIES!",75,2*2,12,10,"PHEW!, LEVEL 1 COMPLETE!",A,99,0,1,pig Level 2,"HAVING FUN YET?",70,2*2,12,10,"LEVEL 2",B,98,2,0,robot Level 3,"GIDDY UP!",50,4*2,8,6,"GETTING FASTER!, LEVEL 3 COMPLETE!",C,98,2,0,pig Level 4,"LETS GO?",25,4*2,8,6,"LEVEL 4 COMPLETE",C,98,2,0,robot Level 5,"KABOOM?!",75,4*2,8,6,"PHEW!!! LEVEL 5 COMPLETE!",D,99,1,0,tank - Level 6,"WHAT? WHAT?!",50,4*2,8,6,"NICE! LEVEL 6 COMPLETE!",A,98,1,0,tank + Level 6,"WHAT? WHAT?!",50,4*2,8,6,"NICE! LEVEL 6 COMPLETE!",A,98,1,0,car Palette A diff --git a/028.bs/highscore.s b/028.bs/highscore.s index 143a920..c90a48e 100644 --- a/028.bs/highscore.s +++ b/028.bs/highscore.s @@ -8,37 +8,23 @@ SPLASH_SCREEN_WIDTH_BYTES equ 40 PLAY_COPPER_WORD equ $aad1 -MENU_TITLE_TOP_COLOR equ $be0 ;$e71 -MENU_TITLE_BOTTOM_COLOR equ $9d4 ;$fe7 -MENU_SELECTED_TOP_COLOR equ $f30 -MENU_SELECTED_BOTTOM_COLOR equ $d10 +MENU_TITLE_TOP_COLOR equ $7ef +MENU_TITLE_BOTTOM_COLOR equ $5cd +MENU_SELECTED_TOP_COLOR equ $4d2 +MENU_SELECTED_BOTTOM_COLOR equ $3e1 MENU_TEXT_COLOR equ $7ef -MENU_TEXT_BOTTOM_COLOR equ $5cd +MENU_TEXT_BOTTOM_COLOR equ $5cd +MENU_FIRE_TOP_COLOR equ $be0 ;$e71 +MENU_FIRE_BOTTOM_COLOR equ $9d4 ;$fe7 MENU_BOTTOM_OFFSET equ (firstBottomColor-firstTopColor) MENU_OFFSET equ (secondTopColor-firstTopColor) ShowHighScore: lea CUSTOM,a6 - jsr ReloadSplashScreen bsr HighlightScore - lea splash,a0 - add.l #(150*40*5)+((320-96)/16),a0 - - WaitBlitter - move.w #(BC0F_SRCA|BC0F_DEST|$f0),BLTCON0(A6) - move.w #0,BLTCON1(a6) - move.l #$ffffffff,BLTAFWM(a6) ;no masking of first/last word - move.w #(320-96)/8,BLTAMOD(a6) ;A modulo - move.w #0,BLTDMOD(a6) ;D modulo - move.l a0,BLTAPTH(a6) ;source graphic top left corner - move.l backgroundOffscreen,BLTDPTH(a6) ;destination top left corner - move.w #((64*5)<<6)|(96/16),BLTSIZE(a6) - -ReShowMenu: - move.w #1,splashInvalid jsr WaitVerticalBlank ;; set up default palette include "out/menu-palette.s" @@ -77,34 +63,17 @@ ReShowMenu: move.w #(INTF_SETCLR|INTF_VERTB|INTF_INTEN),INTENA(a6) bsr RenderHighScore - jsr WaitForJoystick jmp ShowMenu RenderHighScore: - move.l backgroundOffscreen,a0 - lea splash,a2 - add.l #(150*40*5)+((320-96)/16),a2 - - WaitBlitter - move.w #(BC0F_SRCA|BC0F_DEST|$f0),BLTCON0(A6) - move.w #0,BLTCON1(a6) - move.l #$ffffffff,BLTAFWM(a6) ;no masking of first/last word - move.w #0,BLTAMOD(a6) ;A modulo - move.w #(320-96)/8,BLTDMOD(a6) ;D modulo - move.l a0,BLTAPTH(a6) ;source graphic top left corner - move.l a2,BLTDPTH(a6) ;destination top left corner - move.w #((64*5)<<6)|(96/16),BLTSIZE(a6) - lea highScore,a1 lea splash,a0 move.w #(320/2)-(6*8)+4,d0 move.w #150-16,d1 jsr DrawMaskedText85 - lea highScores,a2 - .loop: move.w #9,d2 move.l (a2)+,d0 @@ -116,6 +85,11 @@ RenderHighScore: jsr DrawMaskedText85 cmp.l #endHighScores,a2 bne .loop + lea splash,a0 + lea pressFire,a1 + move.l #(320/2)-(6*8),d0 + add.w #16,d1 + jsr DrawMaskedText85 rts AddHighScore: @@ -127,7 +101,6 @@ AddHighScore: cmp.l #highScores,a0 blt .next bra .loop1 - .next: move.l #endHighScores-4,a0 .loop: @@ -170,6 +143,10 @@ highScore: dc.b " HI SCORES " dc.b 0 +pressFire: + dc.b " PRESS FIRE " + dc.b 0 + align 4 highScores: dc.l 10000 @@ -237,6 +214,12 @@ secondTopColor: dc.w MENU_TEXT_COLOR dc.w $ffdf,$fffe dc.w $06df,$fffe - dc.w COLOR31,MENU_TEXT_BOTTOM_COLOR + dc.w COLOR31,MENU_FIRE_BOTTOM_COLOR + dc.w $9df,$fffe + dc.w COLOR31 + dc.w MENU_FIRE_TOP_COLOR + dc.w $16df,$fffe + dc.w COLOR31,MENU_FIRE_BOTTOM_COLOR + dc.l $fffffffe diff --git a/028.bs/menu.s b/028.bs/menu.s index 0806fd3..c0aee68 100644 --- a/028.bs/menu.s +++ b/028.bs/menu.s @@ -18,22 +18,9 @@ MENU_BOTTOM_OFFSET equ (playBottomColor-playTopColor) ShowMenu: lea CUSTOM,a6 - - jsr ReloadSplashScreen - - lea splash,a0 - add.l #(150*40*5)+((320-96)/16),a0 - - WaitBlitter - move.w #(BC0F_SRCA|BC0F_DEST|$f0),BLTCON0(A6) - move.w #0,BLTCON1(a6) - move.l #$ffffffff,BLTAFWM(a6) ;no masking of first/last word - move.w #(320-96)/8,BLTAMOD(a6) ;A modulo - move.w #0,BLTDMOD(a6) ;D modulo - move.l a0,BLTAPTH(a6) ;source graphic top left corner - move.l backgroundOffscreen,BLTDPTH(a6) ;destination top left corner - move.w #((64*5)<<6)|(96/16),BLTSIZE(a6) - + jsr ReloadSplashScreen + jsr RestoreSplashMenuSection + ReShowMenu: jsr WaitVerticalBlank ;; set up default palette @@ -79,12 +66,13 @@ ReShowMenu: jsr WaitVerticalBlank jsr _ProcessJoystick - - RenderMenu: + ;; small restore + move.l backgroundOffscreen,a0 + add.l #((64)*(96/16)*5),a0 lea splash,a2 - add.l #(150*40*5)+((320-96)/16),a2 + add.l #((134+32)*40*5)+((320-96)/16),a2 WaitBlitter move.w #(BC0F_SRCA|BC0F_DEST|$f0),BLTCON0(A6) @@ -94,8 +82,8 @@ RenderMenu: move.w #(320-96)/8,BLTDMOD(a6) ;D modulo move.l a0,BLTAPTH(a6) ;source graphic top left corner move.l a2,BLTDPTH(a6) ;destination top left corner - move.w #((64*5)<<6)|(96/16),BLTSIZE(a6) - + move.w #((32*5)<<6)|(96/16),BLTSIZE(a6) + lea menu,a1 lea splash,a0 move.w #(320/2)-(6*8)+4,d0 diff --git a/028.bs/player.s b/028.bs/player.s index cbfaed4..8cec4ae 100644 --- a/028.bs/player.s +++ b/028.bs/player.s @@ -26,6 +26,7 @@ xdef playerLevelMissPixels xdef pigPlayerSpriteConfig + xdef carPlayerSpriteConfig xdef robotPlayerSpriteConfig xdef tankPlayerSpriteConfig xdef playerSpriteConfig @@ -299,6 +300,10 @@ InstallPigColorPalette: include "out/sprite_pig-0-palette.s" rts +InstallCarColorPalette: + include "out/sprite_car-0-palette.s" + rts + InstallRobotColorPalette: include "out/sprite_robot-0-palette.s" rts @@ -620,6 +625,11 @@ pigPlayerSpriteConfig: dc.l spritePig dc.l spriteFalling1 +carPlayerSpriteConfig: + dc.l InstallCarColorPalette + dc.l spriteCar + dc.l spriteFallingCar1 + robotPlayerSpriteConfig: dc.l InstallRobotColorPalette dc.l spriteRobot diff --git a/028.bs/splash.s b/028.bs/splash.s index 23d3ccd..b26211e 100644 --- a/028.bs/splash.s +++ b/028.bs/splash.s @@ -2,12 +2,29 @@ xdef ShowSplash xdef ReloadSplashScreen + xdef RestoreSplashMenuSection xdef splash xdef splashInvalid SPLASH_COLOR_DEPTH equ 5 SPLASH_SCREEN_WIDTH_BYTES equ 40 +RestoreSplashMenuSection: + move.l backgroundOffscreen,a0 + lea splash,a2 + add.l #(134*40*5)+((320-96)/16),a2 + + WaitBlitter + move.w #(BC0F_SRCA|BC0F_DEST|$f0),BLTCON0(A6) + move.w #0,BLTCON1(a6) + move.l #$ffffffff,BLTAFWM(a6) ;no masking of first/last word + move.w #0,BLTAMOD(a6) ;A modulo + move.w #(320-96)/8,BLTDMOD(a6) ;D modulo + move.l a0,BLTAPTH(a6) ;source graphic top left corner + move.l a2,BLTDPTH(a6) ;destination top left corner + move.w #((112*5)<<6)|(96/16),BLTSIZE(a6) + rts + ReloadSplashScreen: cmp.w #0,splashInvalid beq .skip @@ -16,6 +33,20 @@ ReloadSplashScreen: move.l #splash,a0 move.l #diskSplash,a1 jsr LoadDiskData + + lea splash,a0 + add.l #(134*40*5)+((320-96)/16),a0 + + WaitBlitter + move.w #(BC0F_SRCA|BC0F_DEST|$f0),BLTCON0(A6) + move.w #0,BLTCON1(a6) + move.l #$ffffffff,BLTAFWM(a6) ;no masking of first/last word + move.w #(320-96)/8,BLTAMOD(a6) ;A modulo + move.w #0,BLTDMOD(a6) ;D modulo + move.l a0,BLTAPTH(a6) ;source graphic top left corner + move.l backgroundOffscreen,BLTDPTH(a6) ;destination top left corner + move.w #((112*5)<<6)|(96/16),BLTSIZE(a6) + .skip: rts diff --git a/028.bs/sprite_data.i b/028.bs/sprite_data.i index 0b352f3..0129d91 100644 --- a/028.bs/sprite_data.i +++ b/028.bs/sprite_data.i @@ -124,6 +124,48 @@ spriteTankRightJump: dc.w 0,0 incbin "out/sprite_tank-2.bin" ; 7, right jump dc.l 0 + +spriteCar: +spriteCarUp: + dc.w 0,0 + dc.w 0,0 + incbin "out/sprite_car-1.bin" ; 0, up + dc.l 0 +spriteCarUpJump: + dc.w 0,0 + dc.w 0,0 + incbin "out/sprite_car-0.bin" ; 1, up jump + dc.l 0 +spriteCarDown: + dc.w 0,0 + dc.w 0,0 + incbin "out/sprite_car-5.bin" ; 2, down + dc.l 0 +spriteCarDownJump: + dc.w 0,0 + dc.w 0,0 + incbin "out/sprite_car-4.bin" ; 3, down jump + dc.l 0 +spriteCarLeft: + dc.w 0,0 + dc.w 0,0 + incbin "out/sprite_car-7.bin" ; 4, left + dc.l 0 +spriteCarLeftJump: + dc.w 0,0 + dc.w 0,0 + incbin "out/sprite_car-6.bin" ; 5, left jump + dc.l 0 +spriteCarRight: + dc.w 0,0 + dc.w 0,0 + incbin "out/sprite_car-3.bin" ; 6, right + dc.l 0 +spriteCarRightJump: + dc.w 0,0 + dc.w 0,0 + incbin "out/sprite_car-2.bin" ; 7, right jump + dc.l 0 spriteFalling0: dc.w 0,0 @@ -203,4 +245,31 @@ spriteFallingTank4: dc.w 0,0 dc.w 0,0 incbin "out/sprite_fallingTank-4.bin" + dc.l 0 + + +spriteFallingCar0: + dc.w 0,0 + dc.w 0,0 + incbin "out/sprite_fallingCar-0.bin" + dc.l 0 +spriteFallingCar1: + dc.w 0,0 + dc.w 0,0 + incbin "out/sprite_fallingCar-1.bin" + dc.l 0 +spriteFallingCar2: + dc.w 0,0 + dc.w 0,0 + incbin "out/sprite_fallingCar-2.bin" + dc.l 0 +spriteFallingCar3: + dc.w 0,0 + dc.w 0,0 + incbin "out/sprite_fallingCar-3.bin" + dc.l 0 +spriteFallingCar4: + dc.w 0,0 + dc.w 0,0 + incbin "out/sprite_fallingCar-4.bin" dc.l 0 \ No newline at end of file