Change how game assets are managed

This commit is contained in:
Luciano Ciccariello 2023-02-21 23:25:24 +00:00
parent fa6dabde3c
commit d7417b7375
20 changed files with 44 additions and 32 deletions

View File

@ -15,11 +15,17 @@ on:
workflow_dispatch: workflow_dispatch:
jobs: jobs:
matrices:
strategy:
matrix:
version: ["us"]
build-and-test: build-and-test:
# build-and-test cannot work if the repository owner is not Xeeynamo # build-and-test cannot work if the repository owner is not Xeeynamo
# due to the missing secrets to clone the game's data repository # due to the missing secrets to clone the game's data repository
if: github.repository == 'Xeeynamo/sotn-decomp' if: github.repository == 'Xeeynamo/sotn-decomp'
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
VERSION=${{ matrix.version }}
steps: steps:
- name: Install requirements - name: Install requirements
run: sudo apt-get install gcc-mipsel-linux-gnu run: sudo apt-get install gcc-mipsel-linux-gnu
@ -27,16 +33,21 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
submodules: false submodules: false
- name: Clone game data repository - name: Clone dependencies
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
repository: xeeynamo/sotn-decomp-private repository: xeeynamo/sotn-decomp-dependencies
ref: ${{ matrix.version }}
token: ${{ secrets.SOTN_DECOM_PRIVATE_REPO_TOKEN }} token: ${{ secrets.SOTN_DECOM_PRIVATE_REPO_TOKEN }}
path: 'data' path: 'disks/dependencies'
- name: Copy game data - name: Setting up dependencies
working-directory: disks
run: | run: |
mkdir -p iso cat dependencies/* > dependencies.tar.gz
cp -r data/psx_us10/* ./iso tar -xf dependencies.tar.gz
mv *.cue sotn.${{ matrix.version }}.cue
- name: Extract dependencies
run: make extract_disk
- name: Split game data - name: Split game data
run: make -j extract run: make -j extract
- name: Build binaries - name: Build binaries

3
.gitignore vendored
View File

@ -4,8 +4,6 @@ BIN/ARC_F.BIN
BIN/RIC.BIN BIN/RIC.BIN
ST/ ST/
iso/
ctx.c ctx.c
ctx.c.m2c ctx.c.m2c
*.ld *.ld
@ -29,5 +27,6 @@ asm/*/st/*/nonmatchings/*/*/*.s
assets/ assets/
build/ build/
expected/ expected/
disks/
tools/go tools/go

4
.vscode/launch.json vendored
View File

@ -12,8 +12,8 @@
"program": "tools/sotn-disk", "program": "tools/sotn-disk",
"args": [ "args": [
"extract", "extract",
"../../iso/sotn.cue", "../../disks/sotn.us.cue",
"../../iso/" "../../disks/"
] ]
} }
] ]

View File

@ -24,7 +24,7 @@ SRC_DIR := src
ASSETS_DIR := assets ASSETS_DIR := assets
INCLUDE_DIR := include INCLUDE_DIR := include
BUILD_DIR := build/$(VERSION) BUILD_DIR := build/$(VERSION)
DISK_DIR := $(BUILD_DIR)/disk DISK_DIR := $(BUILD_DIR)/${VERSION}/disk
CONFIG_DIR := config CONFIG_DIR := config
TOOLS_DIR := tools TOOLS_DIR := tools
@ -228,11 +228,11 @@ context:
$(M2CTX) $(SOURCE) $(M2CTX) $(SOURCE)
@echo ctx.c has been updated. @echo ctx.c has been updated.
extract_sotn: $(SOTNDISK) extract_disk: $(SOTNDISK)
$(SOTNDISK) extract iso/sotn.cue iso/ $(SOTNDISK) extract disks/sotn.$(VERSION).cue disks/$(VERSION)
disk: build $(SOTNDISK) disk: build $(SOTNDISK)
mkdir -p $(DISK_DIR) mkdir -p $(DISK_DIR)
cp -r iso/* $(DISK_DIR) cp -r disks/${VERSION}/* $(DISK_DIR)
cp $(BUILD_DIR)/main.exe $(DISK_DIR)/SLUS_000.67 cp $(BUILD_DIR)/main.exe $(DISK_DIR)/SLUS_000.67
cp $(BUILD_DIR)/DRA.BIN $(DISK_DIR)/DRA.BIN cp $(BUILD_DIR)/DRA.BIN $(DISK_DIR)/DRA.BIN
cp $(BUILD_DIR)/RIC.BIN $(DISK_DIR)/BIN/RIC.BIN cp $(BUILD_DIR)/RIC.BIN $(DISK_DIR)/BIN/RIC.BIN

View File

@ -35,7 +35,7 @@ This repo does not include any assets or assembly code necessary for compiling t
| hk | PS1 | 1997-11-30 | same psx.exe as jp10 | hk | PS1 | 1997-11-30 | same psx.exe as jp10
| jp12 | PS1 | 1998-01-23 | same psx.exe as jp10 | jp12 | PS1 | 1998-01-23 | same psx.exe as jp10
| saturn | Saturn | 1998-04-27 | | saturn | Saturn | 1998-04-27 |
| psphd | PSP | 2006-10-22 | unknown PSP version | hd | PS1 | 2006-10-22 | build found in the PSP game
| pspko | PSP | 2007-09-07 | | pspko | PSP | 2007-09-07 |
| pspus | PSP | 2007-09-10 | | pspus | PSP | 2007-09-10 |
| pspjp | PSP | 2007-09-14 | | pspjp | PSP | 2007-09-14 |
@ -63,9 +63,8 @@ sudo apt-get install -y $(cat tools/requirements-debian.txt)
make update-dependencies make update-dependencies
``` ```
1. Create a new `iso/` folder and put the game disc image in, both BIN and CUE files 1. Run `mv disks/*.cue disks/sotn.us.cue`
1. Run `mv iso/*.cue iso/sotn.cue` 1. Run `make extract_disk`
1. Run `make extract_sotn`
## Build ## Build

View File

@ -3,7 +3,7 @@ options:
basename: dra basename: dra
base_path: .. base_path: ..
build_path: build/us build_path: build/us
target_path: iso/DRA.BIN target_path: disks/us/DRA.BIN
asm_path: asm/us/dra asm_path: asm/us/dra
asset_path: assets/dra asset_path: assets/dra
src_path: src/dra src_path: src/dra

View File

@ -3,7 +3,7 @@ options:
basename: main basename: main
base_path: .. base_path: ..
build_path: build/us build_path: build/us
target_path: iso/SLUS_000.67 target_path: disks/us/SLUS_000.67
asm_path: asm/us/main asm_path: asm/us/main
asset_path: assets/main asset_path: assets/main
src_path: src/main src_path: src/main

View File

@ -3,7 +3,7 @@ options:
basename: ric basename: ric
base_path: .. base_path: ..
build_path: build/us build_path: build/us
target_path: iso/BIN/RIC.BIN target_path: disks/us/BIN/RIC.BIN
asm_path: asm/us/ric asm_path: asm/us/ric
asset_path: assets/ric asset_path: assets/ric
src_path: src/ric src_path: src/ric

View File

@ -3,7 +3,7 @@ options:
basename: stcen basename: stcen
base_path: .. base_path: ..
build_path: build/us build_path: build/us
target_path: iso/ST/CEN/CEN.BIN target_path: disks/us/ST/CEN/CEN.BIN
asm_path: asm/us/st/cen asm_path: asm/us/st/cen
asset_path: assets/st/cen asset_path: assets/st/cen
src_path: src/st/cen src_path: src/st/cen

View File

@ -3,7 +3,7 @@ options:
basename: stdre basename: stdre
base_path: .. base_path: ..
build_path: build/us build_path: build/us
target_path: iso/ST/DRE/DRE.BIN target_path: disks/us/ST/DRE/DRE.BIN
asm_path: asm/us/st/dre asm_path: asm/us/st/dre
asset_path: assets/st/dre asset_path: assets/st/dre
src_path: src/st/dre src_path: src/st/dre

View File

@ -3,7 +3,7 @@ options:
basename: stmad basename: stmad
base_path: .. base_path: ..
build_path: build/us build_path: build/us
target_path: iso/ST/MAD/MAD.BIN target_path: disks/us/ST/MAD/MAD.BIN
asm_path: asm/us/st/mad asm_path: asm/us/st/mad
asset_path: assets/st/mad asset_path: assets/st/mad
src_path: src/st/mad src_path: src/st/mad

View File

@ -3,7 +3,7 @@ options:
basename: stno3 basename: stno3
base_path: .. base_path: ..
build_path: build/us build_path: build/us
target_path: iso/ST/NO3/NO3.BIN target_path: disks/us/ST/NO3/NO3.BIN
asm_path: asm/us/st/no3 asm_path: asm/us/st/no3
asset_path: assets/st/no3 asset_path: assets/st/no3
src_path: src/st/no3 src_path: src/st/no3

View File

@ -3,7 +3,7 @@ options:
basename: stnp3 basename: stnp3
base_path: .. base_path: ..
build_path: build/us build_path: build/us
target_path: iso/ST/NP3/NP3.BIN target_path: disks/us/ST/NP3/NP3.BIN
asm_path: asm/us/st/np3 asm_path: asm/us/st/np3
asset_path: assets/st/np3 asset_path: assets/st/np3
src_path: src/st/np3 src_path: src/st/np3

View File

@ -3,7 +3,7 @@ options:
basename: stnz0 basename: stnz0
base_path: .. base_path: ..
build_path: build/us build_path: build/us
target_path: iso/ST/NZ0/NZ0.BIN target_path: disks/us/ST/NZ0/NZ0.BIN
asm_path: asm/us/st/nz0 asm_path: asm/us/st/nz0
asset_path: assets/st/nz0 asset_path: assets/st/nz0
src_path: src/st/nz0 src_path: src/st/nz0

View File

@ -3,7 +3,7 @@ options:
basename: strwrp basename: strwrp
base_path: .. base_path: ..
build_path: build/us build_path: build/us
target_path: iso/ST/RWRP/RWRP.BIN target_path: disks/us/ST/RWRP/RWRP.BIN
asm_path: asm/us/st/rwrp asm_path: asm/us/st/rwrp
asset_path: assets/st/rwrp asset_path: assets/st/rwrp
src_path: src/st/rwrp src_path: src/st/rwrp

View File

@ -3,7 +3,7 @@ options:
basename: stsel basename: stsel
base_path: .. base_path: ..
build_path: build/us build_path: build/us
target_path: iso/ST/SEL/SEL.BIN target_path: disks/us/ST/SEL/SEL.BIN
asm_path: asm/us/st/sel asm_path: asm/us/st/sel
asset_path: assets/st/sel asset_path: assets/st/sel
src_path: src/st/sel src_path: src/st/sel

View File

@ -3,7 +3,7 @@ options:
basename: stst0 basename: stst0
base_path: .. base_path: ..
build_path: build/us build_path: build/us
target_path: iso/ST/ST0/ST0.BIN target_path: disks/us/ST/ST0/ST0.BIN
asm_path: asm/us/st/st0 asm_path: asm/us/st/st0
asset_path: assets/st/st0 asset_path: assets/st/st0
src_path: src/st/st0 src_path: src/st/st0

View File

@ -3,7 +3,7 @@ options:
basename: stwrp basename: stwrp
base_path: .. base_path: ..
build_path: build/us build_path: build/us
target_path: iso/ST/WRP/WRP.BIN target_path: disks/us/ST/WRP/WRP.BIN
asm_path: asm/us/st/wrp asm_path: asm/us/st/wrp
asset_path: assets/st/wrp asset_path: assets/st/wrp
src_path: src/st/wrp src_path: src/st/wrp

View File

@ -3,7 +3,7 @@ options:
basename: tt_000 basename: tt_000
base_path: .. base_path: ..
build_path: build/us build_path: build/us
target_path: iso/SERVANT/TT_000.BIN target_path: disks/us/SERVANT/TT_000.BIN
asm_path: asm/us/servant/tt_000 asm_path: asm/us/servant/tt_000
asset_path: assets/servant/tt_000 asset_path: assets/servant/tt_000
src_path: src/servant/tt_000 src_path: src/servant/tt_000

3
disks/README Normal file
View File

@ -0,0 +1,3 @@
Please store here your Castlevania: Symphony of the Night disk copy
You need to rename the CUE file as sotn.us.cue