switched to command based rendering
[fishladder.git] / build.sh
index aa0d03e0c21f5fa1d6b07d7fa6ac41469bc05692..63f64def69addf806e2e5df32f4bc098604bd94a 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -65,6 +65,7 @@ if [ "$compile_tools" = true ]; then
        mkdir tools -p
        gcc -Wall -Wstrict-aliasing=3 $lib $flags mdlcomp.c gl/glad.c -o tools/mdlcomp $libs $steam_part -Wl,-rpath=./ $defines
        gcc -Wall -Wstrict-aliasing=3 $lib $flags fontcomp.c gl/glad.c -o tools/fontcomp $libs $steam_part -Wl,-rpath=./ $defines
+       gcc -Wall -Wstrict-aliasing=3 $lib $flags texsheet.c gl/glad.c -o tools/texsheet $libs $steam_part -Wl,-rpath=./ $defines
        gcc $lib qoiconv.c -std=c99 -O3 -o tools/qoiconv
 fi
 
@@ -77,13 +78,15 @@ for f in textures/*.png;
        ./tools/qoiconv $f ./_temp_textures/"$(basename "$f" .png).qoi"
 done
 
-#if [ "$compile_models" = true ]; then
-#      echo "Recompiling models"
-#      for f in models/*.obj; 
-#              do echo "Compiling $f..";
-#              ./tools/mdlcomp $f $f.h
-#      done
-#fi
+# Autocombine textures
+auto_combine=""
+cd textures_combine
+for f in *.png;
+       do echo "[combine] $f";
+       auto_combine="$auto_combine $f"
+done
+../tools/texsheet ../_temp_textures/autocombine.qoi ../sprites_autocombine.h sprites_auto_combine $auto_combine
+cd ..
 
 # Main build
 if [ "$do_build" = true ]; then