Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weapon assets and statically linked #1470

Merged
merged 28 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
ecf74f9
Separate stage asset management
Xeeynamo Jul 26, 2024
71e9747
Move psx offsets into its own package
Xeeynamo Jul 28, 2024
ef7e85f
Extract animset as JSON
Xeeynamo Jul 28, 2024
acad979
Add support to build frameset
Xeeynamo Aug 4, 2024
a616582
Integrate asset manager with weapon overlay
Xeeynamo Aug 4, 2024
568219b
Statically link w_000
Xeeynamo Aug 4, 2024
9ee18e9
Ignore Splat animset
Xeeynamo Aug 4, 2024
206557c
Makefile clean-up
Xeeynamo Aug 4, 2024
dd86761
Merge branch 'master' into weapon-assets
Xeeynamo Aug 4, 2024
ad07443
Fix HD build
Xeeynamo Aug 4, 2024
7ea6258
Parallel asset build
Xeeynamo Aug 4, 2024
9c6d7aa
MT fixes
Xeeynamo Aug 4, 2024
be5a2fe
Mark all weapon symbols as static
Xeeynamo Aug 4, 2024
36a0e2c
Re-organize common weapon declarations order
Xeeynamo Aug 4, 2024
a31d932
Use dummy headers whenever is needed
Xeeynamo Aug 4, 2024
dddeffa
Merge branch 'master' into weapon-assets
Xeeynamo Aug 4, 2024
95fd236
Circumnavigate MSVC opitmization on w_000
Xeeynamo Aug 4, 2024
c6c09cb
try to fix msvc build
Xeeynamo Aug 4, 2024
f611b8c
Downgrade agent to win2019
Xeeynamo Aug 4, 2024
d7f6ad0
Revert "Downgrade agent to win2019"
Xeeynamo Aug 4, 2024
e5b8404
Merge branch 'master' into weapon-assets
Xeeynamo Aug 8, 2024
dc0f2fa
merge fixes
Xeeynamo Aug 8, 2024
4d7fbb8
MSVC fix attempt
Xeeynamo Aug 8, 2024
1b61bf3
Merge branch 'master' into weapon-assets
Xeeynamo Aug 8, 2024
51422c8
Remove unnecessary changes
Xeeynamo Aug 8, 2024
eeec44a
Downgrade agent to win2019
Xeeynamo Aug 4, 2024
1910f2c
Do not build empty sprite groups
Xeeynamo Aug 8, 2024
1b042c4
Revert "Downgrade agent to win2019"
Xeeynamo Aug 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ clean:
git clean -fdx assets/
git clean -fdx asm/$(VERSION)/
git clean -fdx build/$(VERSION)/
git clean -fdx $(SRC_DIR)/weapon
git clean -fdx config/
git clean -fdx function_calls/
git clean -fdx sotn_calltree.txt
Expand Down Expand Up @@ -328,15 +329,15 @@ $(ASM_DIR)/weapon/data/w_%.data.s: # create a fake empty file if all the data ha
touch $@
$(ASM_DIR)/weapon/data/w_%.sbss.s: # create a fake empty file if all the bss section has been imported
touch $@
$(BUILD_DIR)/weapon/w0_%.elf: $(BUILD_DIR)/$(SRC_DIR)/weapon/header.c.o $(BUILD_DIR)/$(ASSETS_DIR)/weapon/w_%_1.animset.o $(BUILD_DIR)/$(ASSETS_DIR)/weapon/w_%_2.animset.o $(BUILD_DIR)/$(SRC_DIR)/weapon/w_%.c.o $(BUILD_DIR)/$(ASM_DIR)/weapon/data/w_%.data.s.o $(BUILD_DIR)/$(ASM_DIR)/weapon/data/w_%.sbss.s.o
$(BUILD_DIR)/weapon/w0_%.elf: $(BUILD_DIR)/$(SRC_DIR)/weapon/w_%.c.o $(BUILD_DIR)/$(ASM_DIR)/weapon/data/w_%.data.s.o $(BUILD_DIR)/$(ASM_DIR)/weapon/data/w_%.sbss.s.o
$(LD) $(LD_FLAGS) --no-check-sections -o $@ \
-Map $(BUILD_DIR)/weapon/w0_$*.map \
-T weapon0.ld \
-T $(CONFIG_DIR)/undefined_syms.$(VERSION).txt \
-T $(CONFIG_DIR)/undefined_syms_auto.$(VERSION).weapon.txt \
-T $(CONFIG_DIR)/undefined_funcs_auto.$(VERSION).weapon.txt \
$^
$(BUILD_DIR)/weapon/w1_%.elf: $(BUILD_DIR)/$(SRC_DIR)/weapon/header.c.o $(BUILD_DIR)/$(ASSETS_DIR)/weapon/w_%_1.animset.o $(BUILD_DIR)/$(ASSETS_DIR)/weapon/w_%_2.animset.o $(BUILD_DIR)/$(SRC_DIR)/weapon/w_%.c.o $(BUILD_DIR)/$(ASM_DIR)/weapon/data/w_%.data.s.o $(BUILD_DIR)/$(ASM_DIR)/weapon/data/w_%.sbss.s.o
$(BUILD_DIR)/weapon/w1_%.elf: $(BUILD_DIR)/$(SRC_DIR)/weapon/w_%.c.o $(BUILD_DIR)/$(ASM_DIR)/weapon/data/w_%.data.s.o $(BUILD_DIR)/$(ASM_DIR)/weapon/data/w_%.sbss.s.o
$(LD) $(LD_FLAGS) --no-check-sections -o $@ \
-Map $(BUILD_DIR)/weapon/w1_$*.map \
-T weapon1.ld \
Expand Down Expand Up @@ -471,9 +472,6 @@ $(SOTNASSETS): $(GO) $(SOTNASSETS_SOURCES)
$(BUILD_DIR)/$(ASSETS_DIR)/%.spritesheet.json.o: $(ASSETS_DIR)/%.spritesheet.json
./tools/splat_ext/spritesheet.py encode $< $(BUILD_DIR)/$(ASSETS_DIR)/$*.s
$(AS) $(AS_FLAGS) -o $(BUILD_DIR)/$(ASSETS_DIR)/$*.o $(BUILD_DIR)/$(ASSETS_DIR)/$*.s
$(BUILD_DIR)/$(ASSETS_DIR)/%.animset.json.o: $(ASSETS_DIR)/%.animset.json
./tools/splat_ext/animset.py gen-asm $< $(BUILD_DIR)/$(ASSETS_DIR)/$*.s
$(AS) $(AS_FLAGS) -o $(BUILD_DIR)/$(ASSETS_DIR)/$*.o $(BUILD_DIR)/$(ASSETS_DIR)/$*.s
$(BUILD_DIR)/$(ASSETS_DIR)/dra/%.json.o: $(ASSETS_DIR)/dra/%.json
./tools/splat_ext/assets.py $< $(BUILD_DIR)/$(ASSETS_DIR)/dra/$*.s
$(AS) $(AS_FLAGS) -o $(BUILD_DIR)/$(ASSETS_DIR)/dra/$*.o $(BUILD_DIR)/$(ASSETS_DIR)/dra/$*.s
Expand Down
42 changes: 24 additions & 18 deletions Makefile.psx.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ extract_us: $(addprefix $(BUILD_DIR)/,$(addsuffix .ld,$(PSX_US_TARGETS)))
make build_assets
extract_hd: $(addprefix $(BUILD_DIR)/,$(addsuffix .ld,$(PSX_HD_TARGETS)))
make extract_assets_hd
make build_assets
make build_assets_hd

extract_disk_us: extract_disk_psxus
extract_disk_hd: extract_disk_pspeu
Expand Down Expand Up @@ -80,25 +80,31 @@ $(BUILD_DIR)/$(SRC_DIR)/main/psxsdk/libgpu/sys.c.o: $(SRC_DIR)/main/psxsdk/libgp
$(CPP) $(CPP_FLAGS) -lang-c $< | $(SOTNSTR) | $(ICONV) | $(CC) $(CC_FLAGS) $(PSXCC_FLAGS) | $(MASPSX_21) | $(AS) $(AS_FLAGS) -o $@

extract_assets: $(SOTNASSETS)
$(SOTNASSETS) extract -stage_ovl disks/$(VERSION)/ST/CEN/CEN.BIN -o assets/st/cen
$(SOTNASSETS) extract -stage_ovl disks/$(VERSION)/ST/DRE/DRE.BIN -o assets/st/dre
$(SOTNASSETS) extract -stage_ovl disks/$(VERSION)/ST/NO3/NO3.BIN -o assets/st/no3
$(SOTNASSETS) extract -stage_ovl disks/$(VERSION)/ST/NP3/NP3.BIN -o assets/st/np3
$(SOTNASSETS) extract -stage_ovl disks/$(VERSION)/ST/NZ0/NZ0.BIN -o assets/st/nz0
$(SOTNASSETS) extract -stage_ovl disks/$(VERSION)/ST/ST0/ST0.BIN -o assets/st/st0
$(SOTNASSETS) extract -stage_ovl disks/$(VERSION)/ST/WRP/WRP.BIN -o assets/st/wrp
$(SOTNASSETS) extract -stage_ovl disks/$(VERSION)/ST/RWRP/RWRP.BIN -o assets/st/rwrp
cd tools/sotn-assets; $(GO) install
$(SOTNASSETS) stage extract -stage_ovl disks/$(VERSION)/ST/CEN/CEN.BIN -o assets/st/cen
$(SOTNASSETS) stage extract -stage_ovl disks/$(VERSION)/ST/DRE/DRE.BIN -o assets/st/dre
$(SOTNASSETS) stage extract -stage_ovl disks/$(VERSION)/ST/NO3/NO3.BIN -o assets/st/no3
$(SOTNASSETS) stage extract -stage_ovl disks/$(VERSION)/ST/NP3/NP3.BIN -o assets/st/np3
$(SOTNASSETS) stage extract -stage_ovl disks/$(VERSION)/ST/NZ0/NZ0.BIN -o assets/st/nz0
$(SOTNASSETS) stage extract -stage_ovl disks/$(VERSION)/ST/ST0/ST0.BIN -o assets/st/st0
$(SOTNASSETS) stage extract -stage_ovl disks/$(VERSION)/ST/WRP/WRP.BIN -o assets/st/wrp
$(SOTNASSETS) stage extract -stage_ovl disks/$(VERSION)/ST/RWRP/RWRP.BIN -o assets/st/rwrp
$(SOTNASSETS) config extract config/assets.us.weapon.yaml
extract_assets_hd: $(SOTNASSETS)
$(SOTNASSETS) extract -stage_ovl disks/pspeu/PSP_GAME/USRDIR/res/ps/hdbin/wrp.bin -o assets/st/wrp
cd tools/sotn-assets; $(GO) install
$(SOTNASSETS) stage extract -stage_ovl disks/pspeu/PSP_GAME/USRDIR/res/ps/hdbin/wrp.bin -o assets/st/wrp
build_assets: $(SOTNASSETS)
$(SOTNASSETS) build_all -i assets/st/cen -o src/st/cen/
$(SOTNASSETS) build_all -i assets/st/dre -o src/st/dre/
$(SOTNASSETS) build_all -i assets/st/no3 -o src/st/no3/
$(SOTNASSETS) build_all -i assets/st/np3 -o src/st/np3/
$(SOTNASSETS) build_all -i assets/st/nz0 -o src/st/nz0/
$(SOTNASSETS) build_all -i assets/st/st0 -o src/st/st0/
$(SOTNASSETS) build_all -i assets/st/wrp -o src/st/wrp/
$(SOTNASSETS) build_all -i assets/st/rwrp -o src/st/rwrp/
$(SOTNASSETS) stage build_all -i assets/st/cen -o src/st/cen/
$(SOTNASSETS) stage build_all -i assets/st/dre -o src/st/dre/
$(SOTNASSETS) stage build_all -i assets/st/no3 -o src/st/no3/
$(SOTNASSETS) stage build_all -i assets/st/np3 -o src/st/np3/
$(SOTNASSETS) stage build_all -i assets/st/nz0 -o src/st/nz0/
$(SOTNASSETS) stage build_all -i assets/st/st0 -o src/st/st0/
$(SOTNASSETS) stage build_all -i assets/st/wrp -o src/st/wrp/
$(SOTNASSETS) stage build_all -i assets/st/rwrp -o src/st/rwrp/
$(SOTNASSETS) config build config/assets.$(VERSION).weapon.yaml
build_assets_hd: $(SOTNASSETS)
$(SOTNASSETS) stage build_all -i assets/st/wrp -o src/st/wrp/

$(BUILD_DIR)/assets/dra/memcard_%.png.o: assets/dra/memcard_%.png
mkdir -p $(dir $@)
Expand Down
Loading
Loading