diff --git a/028.bs/Makefile b/028.bs/Makefile index 172e1ab..cfce4af 100644 --- a/028.bs/Makefile +++ b/028.bs/Makefile @@ -1,7 +1,8 @@ EXAMPLE_NAME=game1 BACKGROUND_COLOR=09e BACKGROUND_GREY_COLOR=777 -BACKGROUND_COLOR_LONG=000 153 238 255 +paletteA_BACKGROUND_COLOR_LONG=000 153 238 255 +paletteB_BACKGROUND_COLOR_LONG=000 000 102 187 # userstack used by bootblock USERSTACK_ADDRESS=7fffc @@ -77,21 +78,21 @@ include ../shared/base.mk out/foreground.bin: assets/assets.png $(IMAGECON) --use-palette=assets/paletteA_foreground_flags.pal --input $< $(IMAGECON_ARGS) --colors 8 --output-bitplanes --output-palette --full-color-palette-file --output-palette-asm --output-grey-palette --output-palette --output-png --output-copperlist --output out/foreground - sed -i '' "1s/.*/ dc.w COLOR00,\$$$(BACKGROUND_COLOR)/" out/foreground-copper-list.s + #sed -i '' "1s/.*/ dc.w COLOR00,\$$$(BACKGROUND_COLOR)/" out/foreground-copper-list.s sed -i '' "1s/.*/ dc.w COLOR00,\$$$(BACKGROUND_GREY_COLOR)/" out/foreground-grey-copper.s sed -i '' "2s/.*/ dc.w COLOR01,\$$888/" out/foreground-grey-copper.s sed -i '' "3s/.*/ dc.w COLOR02,\$$bbb/" out/foreground-grey-copper.s out/%_foreground-palette-table.s: assets/%_foreground_flags.pal $(IMAGECON) --use-palette=assets/$*_foreground_flags.pal --input assets/assets.png $(IMAGECON_ARGS) --colors 8 --full-color-palette-file --output-palette-asm --output-grey-palette --output-copperlist --output out/$*_foreground - sed -i '' "1s/.*/ dc.w \$$$(BACKGROUND_COLOR)/" out/$*_foreground-palette-table.s + sed -i '' "1s/.*/ dc.w \$$$($*_BACKGROUND_COLOR)/" out/$*_foreground-palette-table.s -out/%_bottom_section_flags.pal: assets/%_foreground_flags.pal assets/background.pal - cat assets/$*_foreground_flags.pal assets/background.pal | sed "1s/.*/$(BACKGROUND_COLOR_LONG)/" > out/$*_bottom_section_flags.pal +out/%_bottom_section_flags.pal: assets/%_foreground_flags.pal assets/%_background.pal + cat assets/$*_foreground_flags.pal assets/$*_background.pal | sed "1s/.*/$($*_BACKGROUND_COLOR_LONG)/" > out/$*_bottom_section_flags.pal -out/%_bottom_section_playarea.pal: assets/%_foreground_playarea.pal assets/background.pal - cat assets/$*_foreground_playarea.pal assets/background.pal | sed "1s/.*/$(BACKGROUND_COLOR_LONG)/" > out/$*_bottom_section_playarea.pal +out/%_bottom_section_playarea.pal: assets/%_foreground_playarea.pal assets/%_background.pal + cat assets/$*_foreground_playarea.pal assets/$*_background.pal | sed "1s/.*/$($*_BACKGROUND_COLOR_LONG)/" > out/$*_bottom_section_playarea.pal out/%_tileFadeFrom.pal: assets/%_foreground_playarea.pal cat assets/$*_foreground_playarea.pal | tail -1 | awk '1;1;' > out/$*_tileFadeFrom.pal @@ -100,7 +101,7 @@ out/%_tileFadeTo.pal: assets/%_foreground_playarea.pal cat assets/$*_foreground_playarea.pal | tail -3 | head -2 > out/$*_tileFadeTo.pal out/background.bin: assets/assets.png - $(IMAGECON) --use-palette=assets/background.pal --input $< $(IMAGECON_ARGS) --colors 8 --output-bitplanes --output-palette --full-color-palette-file --output-palette-asm --output-grey-palette --output-palette --output-png --output-copperlist --output out/background --palette-offset 8 + $(IMAGECON) --use-palette=assets/paletteA_background.pal --input $< $(IMAGECON_ARGS) --colors 8 --output-bitplanes --output-palette --full-color-palette-file --output-palette-asm --output-grey-palette --output-palette --output-png --output-copperlist --output out/background --palette-offset 8 out/panel.bin: assets/panel.png $(IMAGECON) --input $< $(IMAGECON_ARGS) --colors 16 --output-bitplanes --output-palette --full-color-palette-file --output-palette-asm --output-palette --output-png --output-copperlist --output-grey-palette --output out/panel --use-palette=assets/panel.pal diff --git a/028.bs/assets/background.pal b/028.bs/assets/paletteA_background.pal similarity index 100% rename from 028.bs/assets/background.pal rename to 028.bs/assets/paletteA_background.pal diff --git a/028.bs/assets/paletteB_background.pal b/028.bs/assets/paletteB_background.pal new file mode 100644 index 0000000..cbc8346 --- /dev/null +++ b/028.bs/assets/paletteB_background.pal @@ -0,0 +1,8 @@ +000 000 014 255 +029 192 255 255 +102 221 238 255 +071 174 192 255 +213 213 213 255 +210 000 039 255 +154 154 154 255 +000 000 000 000 diff --git a/028.bs/game1.s b/028.bs/game1.s index b45325e..bee6824 100644 --- a/028.bs/game1.s +++ b/028.bs/game1.s @@ -1227,26 +1227,6 @@ InstallSpriteColorPalette: include "out/sprite_coin-1-palette.s" include "out/sprite_arrow-1-palette.s" rts - -InstallColorPalette: - lea playAreaCopperPalettePtr1,a1 - lea playAreaCopperPalettePtr2,a2 - lea playAreaCopperPalettePtr3,a3 - move.l playAreaPalette,a0 - add.l #2,a1 - add.l #2,a2 - add.l #2,a3 - move.l #15,d0 -.loop: - move.w (a0),(a1) - move.w (a0),(a2) - move.w (a0),(a3) - add.l #2,a0 - add.l #4,a1 - add.l #4,a2 - add.l #4,a3 - dbra d0,.loop - rts InstallGreyPalette: lea playAreaCopperPalettePtr1,a1 @@ -1337,6 +1317,7 @@ InstallNextGreyPalette: lea playAreaCopperPalettePtr1,a1 lea playAreaCopperPalettePtr2,a2 lea playAreaCopperPalettePtr3,a3 + lea panelCopperPalettePtr,a4 ; write color00 for the panel palette here move.l playareaFadePtr,a0 move.l playareaFade,a5 add.l #(paletteA_playareaFadeComplete-paletteA_playareaFade),a5 @@ -1345,6 +1326,8 @@ InstallNextGreyPalette: add.l #2,a1 add.l #2,a2 add.l #2,a3 + add.l #2,a4 ; write color00 for the panel palette here + move.w (a0),(a4) ; write color00 for the panel palette here move.l #15,d0 .loop: move.w (a0),(a1) @@ -1364,12 +1347,13 @@ InstallNextGreyPanelPalette: lea panelFadeComplete,a2 cmp.l a2,a0 bge .done - add.l #2,a1 - move.l #15,d0 + add.l #6,a1 ; start at color01 as color00 was written in InstallNextGreyPalette + add.l #2,a0 ; start at color01 as color00 was written in InstallNextGreyPalette + move.l #14,d0 ; only 15 colors as color00 isn't written .loop: move.w (a0),(a1) add.l #2,a0 - add.l #4,a1 + add.l #4,a1 dbra d0,.loop add.l #16*2,panelFadePtr .done @@ -1595,13 +1579,13 @@ paletteB_tileFade: include "out/paletteB_tileFade.s" playAreaPalette: - dc.l paletteB_playAreaPalette + dc.l paletteA_playAreaPalette playareaFade: - dc.l paletteB_playareaFade + dc.l paletteA_playareaFade flagsFade: - dc.l paletteB_flagsFade + dc.l paletteA_flagsFade tileFade: - dc.l paletteB_tileFade + dc.l paletteA_tileFade paletteInstallers: dc.l InstallPaletteA