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

3
.gitignore vendored
View File

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

4
.vscode/launch.json vendored
View File

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

View File

@ -24,7 +24,7 @@ SRC_DIR := src
ASSETS_DIR := assets
INCLUDE_DIR := include
BUILD_DIR := build/$(VERSION)
DISK_DIR := $(BUILD_DIR)/disk
DISK_DIR := $(BUILD_DIR)/${VERSION}/disk
CONFIG_DIR := config
TOOLS_DIR := tools
@ -228,11 +228,11 @@ context:
$(M2CTX) $(SOURCE)
@echo ctx.c has been updated.
extract_sotn: $(SOTNDISK)
$(SOTNDISK) extract iso/sotn.cue iso/
extract_disk: $(SOTNDISK)
$(SOTNDISK) extract disks/sotn.$(VERSION).cue disks/$(VERSION)
disk: build $(SOTNDISK)
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)/DRA.BIN $(DISK_DIR)/DRA.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
| jp12 | PS1 | 1998-01-23 | same psx.exe as jp10
| 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 |
| pspus | PSP | 2007-09-10 |
| pspjp | PSP | 2007-09-14 |
@ -63,9 +63,8 @@ sudo apt-get install -y $(cat tools/requirements-debian.txt)
make update-dependencies
```
1. Create a new `iso/` folder and put the game disc image in, both BIN and CUE files
1. Run `mv iso/*.cue iso/sotn.cue`
1. Run `make extract_sotn`
1. Run `mv disks/*.cue disks/sotn.us.cue`
1. Run `make extract_disk`
## Build

View File

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

View File

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

View File

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

View File

@ -3,7 +3,7 @@ options:
basename: stcen
base_path: ..
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
asset_path: assets/st/cen
src_path: src/st/cen

View File

@ -3,7 +3,7 @@ options:
basename: stdre
base_path: ..
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
asset_path: assets/st/dre
src_path: src/st/dre

View File

@ -3,7 +3,7 @@ options:
basename: stmad
base_path: ..
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
asset_path: assets/st/mad
src_path: src/st/mad

View File

@ -3,7 +3,7 @@ options:
basename: stno3
base_path: ..
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
asset_path: assets/st/no3
src_path: src/st/no3

View File

@ -3,7 +3,7 @@ options:
basename: stnp3
base_path: ..
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
asset_path: assets/st/np3
src_path: src/st/np3

View File

@ -3,7 +3,7 @@ options:
basename: stnz0
base_path: ..
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
asset_path: assets/st/nz0
src_path: src/st/nz0

View File

@ -3,7 +3,7 @@ options:
basename: strwrp
base_path: ..
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
asset_path: assets/st/rwrp
src_path: src/st/rwrp

View File

@ -3,7 +3,7 @@ options:
basename: stsel
base_path: ..
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
asset_path: assets/st/sel
src_path: src/st/sel

View File

@ -3,7 +3,7 @@ options:
basename: stst0
base_path: ..
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
asset_path: assets/st/st0
src_path: src/st/st0

View File

@ -3,7 +3,7 @@ options:
basename: stwrp
base_path: ..
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
asset_path: assets/st/wrp
src_path: src/st/wrp

View File

@ -3,7 +3,7 @@ options:
basename: tt_000
base_path: ..
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
asset_path: assets/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