Skip to content

Commit

Permalink
[EXPORT] Fixed missing data in PICO-8 export and Travis release:
Browse files Browse the repository at this point in the history
- fixed PICO-8 export script not taking data BGM and data runtime into account
- PICO-8 export also puts png and web exports in proper folders, ready for zipping
- fixed Travis release not exporting data BGM cartridge with the rest (preventing reload of Angel Island BGM)
  • Loading branch information
hsandt committed Dec 17, 2020
1 parent c3a50e0 commit 32b310a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ script:

before_deploy:
# zip multiple cartridges (including data) into one distributable archive
- cp data/data_stage*.p8 "build/v${BUILD_VERSION}_release"
- cp data/data_*.p8 "build/v${BUILD_VERSION}_release"
- pushd "build/v${BUILD_VERSION}_release"
- zip -r "picosonic_v${BUILD_VERSION}_release_cartridges.zip" .
- popd
Expand Down
27 changes: 21 additions & 6 deletions export_cartridge_release.p8
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,34 @@ local entry_cartridge = "picosonic_titlemenu.p8"
local additional_cartridges_list = {
"picosonic_ingame.p8",
"picosonic_stage_clear.p8",
"data_bgm1.p8",
"data_stage1_00.p8", "data_stage1_10.p8", "data_stage1_20.p8",
"data_stage1_01.p8", "data_stage1_11.p8", "data_stage1_21.p8"
"data_stage1_01.p8", "data_stage1_11.p8", "data_stage1_21.p8",
"data_stage1_runtime.p8"
}

-- first, load the additional cartridges just to save them as png cartridges
-- before we load the entry cartridge
-- the metadata label is used automatically
-- prepare folder for png cartridges
mkdir("picosonic_v5.0_release.png")

-- load each additional cartridge to save it as png cartridge
-- in folder created above
-- the metadata label is used automatically for each
for cartridge_name in all(additional_cartridges_list) do
load(cartridge_name)

cd("picosonic_v5.0_release.png")
save(cartridge_name..".png")
cd("..")
end

-- second, load the entry cartridge (titlemenu)
-- load the entry cartridge (titlemenu) last, since we're going to use it for export
-- just after
load(entry_cartridge)

-- save png cartridge
-- save as png cartridge
cd("picosonic_v5.0_release.png")
save(entry_cartridge..".png")
cd("..")

-- concatenate cartridge names with space separator with a very simplified version
-- of string.lua > joinstr_table that doesn't mind about adding an initial space
Expand All @@ -48,4 +59,8 @@ end
-- on pink (color 14) background => -c 14
-- and most importantly we pass ingame, stage_clear and data files as additional cartridges
export("picosonic_v5.0_release.bin "..additional_cartridges_string.." -i 160 -s 2 -c 14")

mkdir("picosonic_v5.0_release.web")
cd("picosonic_v5.0_release.web")
export("picosonic_v5.0_release.html "..additional_cartridges_string.." -i 160 -s 2 -c 14")
cd("..")

0 comments on commit 32b310a

Please sign in to comment.