mirror of
https://github.com/mwpenny/portal64-still-alive.git
synced 2024-10-19 22:27:36 -04:00
Work on build process
This commit is contained in:
parent
10ee8e3e79
commit
59c03abe37
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -3,9 +3,14 @@
|
|||
*.elf
|
||||
*.map
|
||||
*.z64
|
||||
*.blend1
|
||||
|
||||
build/
|
||||
debugger
|
||||
assets/
|
||||
assets_working/
|
||||
vpk/
|
||||
portal_pak_dir/
|
||||
portal_pak_modified/
|
||||
|
||||
tools/skeletool64
|
||||
tools/vtf2png
|
31
Makefile
31
Makefile
|
@ -11,6 +11,7 @@ include /usr/include/n64/make/PRdefs
|
|||
MIDICVT:=tools/midicvt
|
||||
SFZ2N64:=tools/sfz2n64
|
||||
SKELATOOL64:=tools/skeletool64
|
||||
VTF2PNG:=tools/vtf2png
|
||||
|
||||
OPTIMIZER := -O0
|
||||
LCDEFS := -DDEBUG -g -Isrc/ -I/usr/include/n64/nustd -Werror -Wall
|
||||
|
@ -84,6 +85,36 @@ src/models/subject.h src/models/subject_geo.inc.h: assets/fbx/Subject.fbx
|
|||
src/models/sphere.h src/models/sphere_geo.inc.h: assets/fbx/Sphere.fbx
|
||||
skeletool64 -s 100 -r 0,0,0 -n sphere -o src/models/sphere.h assets/fbx/Sphere.fbx
|
||||
|
||||
|
||||
####################
|
||||
## vpk extraction
|
||||
####################
|
||||
|
||||
portal_pak_dir: vpk/portal_pak_dir.vpk
|
||||
vpk -x portal_pak_dir vpk/portal_pak_dir.vpk
|
||||
|
||||
portal_pak_dir/materials/concrete/concrete_modular_wall001d.png
|
||||
|
||||
|
||||
TEXTURE_SCRIPTS = $(shell find assets/ -type f -name '*.ims')
|
||||
TEXTURE_IMAGES = $(TEXTURE_SCRIPTS:assets/%.ims=portal_pak_modified/%.png)
|
||||
|
||||
%.png: %.vtf
|
||||
$(VTF2PNG) $< $@
|
||||
|
||||
portal_pak_modified/%.png: portal_pak_dir/%.png assets/%.ims
|
||||
@mkdir -p $(@D)
|
||||
convert $< `cat $(@:portal_pak_modified/%.png=assets/%.ims)` $@
|
||||
|
||||
|
||||
####################
|
||||
## Materials
|
||||
####################
|
||||
|
||||
build/assets/materials/materials.h: assets/materials/materials.yaml $(TEXTURE_IMAGES)
|
||||
@mkdir -p $(@D)
|
||||
$(SKELATOOL64) -n materials -m $< -M $@
|
||||
|
||||
####################
|
||||
## Test Chambers
|
||||
####################
|
||||
|
|
14
README.md
14
README.md
|
@ -8,4 +8,18 @@ First, you will need to setup [modern sdk](https://crashoveride95.github.io/n64h
|
|||
|
||||
Next, you will need to downlaod blender 2.9 or higher. Then set the environment variable `BLENDER_2_9` to be the absolute path where the blender executable is located on your computer.
|
||||
|
||||
You will need to instal python vpk
|
||||
|
||||
```
|
||||
pip install vpk
|
||||
```
|
||||
|
||||
Build and install [vtf2png](https://github.com/eXeC64/vtf2png)
|
||||
|
||||
Install image magic
|
||||
|
||||
```
|
||||
sudo apt install imagemagic
|
||||
```
|
||||
|
||||
Finally run `make` to build the project
|
1
assets/materials/concrete/concrete_modular_wall001d.ims
Executable file
1
assets/materials/concrete/concrete_modular_wall001d.ims
Executable file
|
@ -0,0 +1 @@
|
|||
-crop 256x512+0+0 -resize 64x128
|
6
assets/materials/materials.yaml
Normal file
6
assets/materials/materials.yaml
Normal file
|
@ -0,0 +1,6 @@
|
|||
materials:
|
||||
concrete_modular_wall001d:
|
||||
gDPSetTile:
|
||||
filename: ../../portal_pak_modified/materials/concrete/concrete_modular_wall001d.png
|
||||
fmt: G_IM_FMT_I
|
||||
siz: G_IM_SIZ_4b
|
BIN
assets/test_chambers/test_chamber_00/test_chamber_00_0.blend
Normal file
BIN
assets/test_chambers/test_chamber_00/test_chamber_00_0.blend
Normal file
Binary file not shown.
Loading…
Reference in a new issue