Skip to content

Commit

Permalink
feat: introduce the entire process
Browse files Browse the repository at this point in the history
  • Loading branch information
mrneo240 committed Nov 13, 2022
1 parent 15353c2 commit f941a52
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
tools/
temp/
temp/
ICON_all/
BOX_all/
Binary file added EX_input/Dee Dee Planet.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PAL_input/4 Wheel Thunder (Europe).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added USA_input/4 Wheel Thunder (USA).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions catalogues/product_ex.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Propeller Arena.pvr,MK51162.pvr
Dee Dee Planet.pvr,HDR0041.pvr
11 changes: 11 additions & 0 deletions pack_DAT.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh
TOOLS=tools
OUT=output
IN_BOX=BOX_all
IN_ICON=ICON_all
OUT_BOX=${OUT}/BOX.DAT
OUT_ICON=${OUT}/ICON.DAT

# pack generated PVRs into DATs
${TOOLS}/datpack ${IN_BOX} ${OUT_BOX}
${TOOLS}/datpack ${IN_ICON} ${OUT_ICON}
9 changes: 9 additions & 0 deletions process.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
OUT=output
TOOLS=tools

# process images to proper format and location
./process_EX.sh

# pack DAT
./pack_DAT.sh
9 changes: 5 additions & 4 deletions process_EX.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh
TOOLS=tools
CAT=catalogues
IN=EX_input
OUT_BOX=BOX_all
OUT_ICON=ICON_all
Expand All @@ -8,16 +9,16 @@ OUT_ICON=ICON_all
mkdir -p ${OUT_BOX}

magick mogrify -path ${OUT_BOX} -resize 128x128! -format bmp -define bmp:format=bmp3 -type truecolor -depth 8 ${IN}/*
{TOOLS}/stbconv_smallargs -t -5 -nm -gi 1001 ${OUT_BOX}/*.bmp
${TOOLS}/stbconv -t -5 -nm -gi 1001 ${OUT_BOX}/*.bmp
rm ${OUT_BOX}/*.bmp
{TOOLS}/renamecsv ${OUT_BOX}/ product_aw.csv
${TOOLS}/renamecsv ${OUT_BOX}/ ${CAT}/product_ex.csv
# pvr format: no mipmap, twiddled, rgb565, global index 1001

#Icon
mkdir -p ${OUT_ICON}

magick mogrify -path ${OUT_ICON} -resize 256x256! -format bmp -define bmp:format=bmp3 -type truecolor -depth 8 ${IN}/*
{TOOLS}/stbconv_smallargs -t -5 -nm -gi 1001 ${OUT_ICON}/*.bmp
${TOOLS}/stbconv -t -5 -nm -gi 1001 ${OUT_ICON}/*.bmp
rm ${OUT_ICON}/*.bmp
{TOOLS}/renamecsv ${OUT_ICON}/ product_aw.csv
${TOOLS}/renamecsv ${OUT_ICON}/ ${CAT}/product_ex.csv
# pvr format: no mipmap, twiddled, rgb565, global index 1001
21 changes: 21 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh
OUT=output
TOOLS=tools
TEMP=temp

# setup folders
mkdir -p ${OUT}
mkdir -p ${TOOLS}
mkdir -p ${TEMP}

# clone tools and stbconv
git clone --depth 1 https://github.com/mrneo240/openmenu.git ${TEMP}/openmenu
git clone --depth 1 https://gitlab.com/HaydenKow/stbconv.git ${TEMP}/stbconv

# build both
make -j4 -C ${TEMP}/openmenu/tools
make -C ${TEMP}/stbconv stbconv_smallargs

# copy tools to tools dir
cp ${TEMP}/openmenu/tools/renamecsv ${TEMP}/openmenu/tools/datpack ${TOOLS}/
cp ${TEMP}/stbconv/stbconv_smallargs ${TOOLS}/stbconv

0 comments on commit f941a52

Please sign in to comment.